commit stringlengths 40 40 | old_file stringlengths 4 118 | new_file stringlengths 4 118 | old_contents stringlengths 0 2.94k | new_contents stringlengths 1 4.43k | subject stringlengths 15 444 | message stringlengths 16 3.45k | lang stringclasses 1
value | license stringclasses 13
values | repos stringlengths 5 43.2k | prompt stringlengths 17 4.58k | response stringlengths 1 4.43k | prompt_tagged stringlengths 58 4.62k | response_tagged stringlengths 1 4.43k | text stringlengths 132 7.29k | text_tagged stringlengths 173 7.33k |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
67ea5109ddcdb19d77de882960d5eb791c1368ae | setup.py | setup.py | #!/usr/bin/python3
# SPDX-License-Identifier: LGPL-2.1+
from setuptools import setup, Command, find_packages
class BuildManpage(Command):
description = ('builds the manpage')
user_options = []
def initialize_options(self):
pass
def finalize_options(self):
pass
def run(self):
... | #!/usr/bin/python3
# SPDX-License-Identifier: LGPL-2.1+
from setuptools import setup, Command, find_packages
class BuildManpage(Command):
description = ('builds the manpage')
user_options = []
def initialize_options(self):
pass
def finalize_options(self):
pass
def run(self):
... | Include any files ending in '.install' in package data | Include any files ending in '.install' in package data
This makes sure the new `dpkg-reconfigure-dracut.install` file under resources
gets included as package data.
| Python | lgpl-2.1 | systemd/mkosi,systemd/mkosi | #!/usr/bin/python3
# SPDX-License-Identifier: LGPL-2.1+
from setuptools import setup, Command, find_packages
class BuildManpage(Command):
description = ('builds the manpage')
user_options = []
def initialize_options(self):
pass
def finalize_options(self):
pass
def run(self):
... | #!/usr/bin/python3
# SPDX-License-Identifier: LGPL-2.1+
from setuptools import setup, Command, find_packages
class BuildManpage(Command):
description = ('builds the manpage')
user_options = []
def initialize_options(self):
pass
def finalize_options(self):
pass
def run(self):
... | <commit_before>#!/usr/bin/python3
# SPDX-License-Identifier: LGPL-2.1+
from setuptools import setup, Command, find_packages
class BuildManpage(Command):
description = ('builds the manpage')
user_options = []
def initialize_options(self):
pass
def finalize_options(self):
pass
def ... | #!/usr/bin/python3
# SPDX-License-Identifier: LGPL-2.1+
from setuptools import setup, Command, find_packages
class BuildManpage(Command):
description = ('builds the manpage')
user_options = []
def initialize_options(self):
pass
def finalize_options(self):
pass
def run(self):
... | #!/usr/bin/python3
# SPDX-License-Identifier: LGPL-2.1+
from setuptools import setup, Command, find_packages
class BuildManpage(Command):
description = ('builds the manpage')
user_options = []
def initialize_options(self):
pass
def finalize_options(self):
pass
def run(self):
... | <commit_before>#!/usr/bin/python3
# SPDX-License-Identifier: LGPL-2.1+
from setuptools import setup, Command, find_packages
class BuildManpage(Command):
description = ('builds the manpage')
user_options = []
def initialize_options(self):
pass
def finalize_options(self):
pass
def ... |
b825ee12fd6abc91b80b8a62886b9c53b82cdeeb | test/task_test.py | test/task_test.py | import doctest
import unittest
import luigi.task
class TaskTest(unittest.TestCase):
def test_tasks_doctest(self):
doctest.testmod(luigi.task)
| import doctest
import unittest
import luigi.task
import luigi
from datetime import datetime, timedelta
class DummyTask(luigi.Task):
param = luigi.Parameter()
bool_param = luigi.BooleanParameter()
int_param = luigi.IntParameter()
float_param = luigi.FloatParameter()
date_param = luigi.DateParamet... | Add test for task to str params conversion | Add test for task to str params conversion
| Python | apache-2.0 | soxofaan/luigi,adaitche/luigi,alkemics/luigi,dlstadther/luigi,fw1121/luigi,lungetech/luigi,linsomniac/luigi,moandcompany/luigi,mbruggmann/luigi,vine/luigi,aeron15/luigi,leafjungle/luigi,Houzz/luigi,springcoil/luigi,ViaSat/luigi,Tarrasch/luigi,oldpa/luigi,linsomniac/luigi,dstandish/luigi,kalaidin/luigi,jw0201/luigi,h3bi... | import doctest
import unittest
import luigi.task
class TaskTest(unittest.TestCase):
def test_tasks_doctest(self):
doctest.testmod(luigi.task)
Add test for task to str params conversion | import doctest
import unittest
import luigi.task
import luigi
from datetime import datetime, timedelta
class DummyTask(luigi.Task):
param = luigi.Parameter()
bool_param = luigi.BooleanParameter()
int_param = luigi.IntParameter()
float_param = luigi.FloatParameter()
date_param = luigi.DateParamet... | <commit_before>import doctest
import unittest
import luigi.task
class TaskTest(unittest.TestCase):
def test_tasks_doctest(self):
doctest.testmod(luigi.task)
<commit_msg>Add test for task to str params conversion<commit_after> | import doctest
import unittest
import luigi.task
import luigi
from datetime import datetime, timedelta
class DummyTask(luigi.Task):
param = luigi.Parameter()
bool_param = luigi.BooleanParameter()
int_param = luigi.IntParameter()
float_param = luigi.FloatParameter()
date_param = luigi.DateParamet... | import doctest
import unittest
import luigi.task
class TaskTest(unittest.TestCase):
def test_tasks_doctest(self):
doctest.testmod(luigi.task)
Add test for task to str params conversionimport doctest
import unittest
import luigi.task
import luigi
from datetime import datetime, timedelta
class DummyTask(luigi.... | <commit_before>import doctest
import unittest
import luigi.task
class TaskTest(unittest.TestCase):
def test_tasks_doctest(self):
doctest.testmod(luigi.task)
<commit_msg>Add test for task to str params conversion<commit_after>import doctest
import unittest
import luigi.task
import luigi
from datetime import dat... |
b0202e8882f792feb041070baff7370cacf73751 | tests/test_api.py | tests/test_api.py | # -*- coding: utf-8 -*-
import subprocess
import time
from unittest import TestCase
from nose.tools import assert_equal
class TestOldApi(TestCase):
def setUp(self):
self.process = subprocess.Popen("openfisca-serve")
def tearDown(self):
self.process.terminate()
def test_response(self):
... | # -*- coding: utf-8 -*-
import subprocess
import time
from unittest import TestCase
from nose.tools import assert_equal
class TestOldApi(TestCase):
def setUp(self):
self.process = subprocess.Popen("openfisca-serve")
def tearDown(self):
self.process.terminate()
def test_response(self):
... | Test france compatibility with the new API | Test france compatibility with the new API
| Python | agpl-3.0 | antoinearnoud/openfisca-france,sgmap/openfisca-france,sgmap/openfisca-france,antoinearnoud/openfisca-france | # -*- coding: utf-8 -*-
import subprocess
import time
from unittest import TestCase
from nose.tools import assert_equal
class TestOldApi(TestCase):
def setUp(self):
self.process = subprocess.Popen("openfisca-serve")
def tearDown(self):
self.process.terminate()
def test_response(self):
... | # -*- coding: utf-8 -*-
import subprocess
import time
from unittest import TestCase
from nose.tools import assert_equal
class TestOldApi(TestCase):
def setUp(self):
self.process = subprocess.Popen("openfisca-serve")
def tearDown(self):
self.process.terminate()
def test_response(self):
... | <commit_before># -*- coding: utf-8 -*-
import subprocess
import time
from unittest import TestCase
from nose.tools import assert_equal
class TestOldApi(TestCase):
def setUp(self):
self.process = subprocess.Popen("openfisca-serve")
def tearDown(self):
self.process.terminate()
def test_r... | # -*- coding: utf-8 -*-
import subprocess
import time
from unittest import TestCase
from nose.tools import assert_equal
class TestOldApi(TestCase):
def setUp(self):
self.process = subprocess.Popen("openfisca-serve")
def tearDown(self):
self.process.terminate()
def test_response(self):
... | # -*- coding: utf-8 -*-
import subprocess
import time
from unittest import TestCase
from nose.tools import assert_equal
class TestOldApi(TestCase):
def setUp(self):
self.process = subprocess.Popen("openfisca-serve")
def tearDown(self):
self.process.terminate()
def test_response(self):
... | <commit_before># -*- coding: utf-8 -*-
import subprocess
import time
from unittest import TestCase
from nose.tools import assert_equal
class TestOldApi(TestCase):
def setUp(self):
self.process = subprocess.Popen("openfisca-serve")
def tearDown(self):
self.process.terminate()
def test_r... |
53f2e3e5b58b001743bdedb479697150a9205b3f | buffpy/tests/test_profiles_manager.py | buffpy/tests/test_profiles_manager.py | from nose.tools import eq_
from mock import MagicMock, patch
from buffpy.managers.profiles import Profiles
from buffpy.models.profile import Profile, PATHS
mocked_response = {
'name': 'me',
'service': 'twiter',
'id': 1
}
def test_profiles_manager_all_method():
'''
Test basic profiles retrieving
'''
... | from unittest.mock import MagicMock, patch
from buffpy.managers.profiles import Profiles
from buffpy.models.profile import Profile, PATHS
MOCKED_RESPONSE = {
"name": "me",
"service": "twiter",
"id": 1
}
def test_profiles_manager_all_method():
""" Should retrieve profile info. """
mocked_api = ... | Migrate profiles manager tests to pytest | Migrate profiles manager tests to pytest
| Python | mit | vtemian/buffpy | from nose.tools import eq_
from mock import MagicMock, patch
from buffpy.managers.profiles import Profiles
from buffpy.models.profile import Profile, PATHS
mocked_response = {
'name': 'me',
'service': 'twiter',
'id': 1
}
def test_profiles_manager_all_method():
'''
Test basic profiles retrieving
'''
... | from unittest.mock import MagicMock, patch
from buffpy.managers.profiles import Profiles
from buffpy.models.profile import Profile, PATHS
MOCKED_RESPONSE = {
"name": "me",
"service": "twiter",
"id": 1
}
def test_profiles_manager_all_method():
""" Should retrieve profile info. """
mocked_api = ... | <commit_before>from nose.tools import eq_
from mock import MagicMock, patch
from buffpy.managers.profiles import Profiles
from buffpy.models.profile import Profile, PATHS
mocked_response = {
'name': 'me',
'service': 'twiter',
'id': 1
}
def test_profiles_manager_all_method():
'''
Test basic profiles retri... | from unittest.mock import MagicMock, patch
from buffpy.managers.profiles import Profiles
from buffpy.models.profile import Profile, PATHS
MOCKED_RESPONSE = {
"name": "me",
"service": "twiter",
"id": 1
}
def test_profiles_manager_all_method():
""" Should retrieve profile info. """
mocked_api = ... | from nose.tools import eq_
from mock import MagicMock, patch
from buffpy.managers.profiles import Profiles
from buffpy.models.profile import Profile, PATHS
mocked_response = {
'name': 'me',
'service': 'twiter',
'id': 1
}
def test_profiles_manager_all_method():
'''
Test basic profiles retrieving
'''
... | <commit_before>from nose.tools import eq_
from mock import MagicMock, patch
from buffpy.managers.profiles import Profiles
from buffpy.models.profile import Profile, PATHS
mocked_response = {
'name': 'me',
'service': 'twiter',
'id': 1
}
def test_profiles_manager_all_method():
'''
Test basic profiles retri... |
bbc0b9cd9244079c14914763e60ec4ca9eb41b4e | byceps/blueprints/admin/site/forms.py | byceps/blueprints/admin/site/forms.py | """
byceps.blueprints.admin.site.forms
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
:Copyright: 2006-2019 Jochen Kupperschmidt
:License: Modified BSD, see LICENSE for details.
"""
from wtforms import SelectField, StringField
from wtforms.validators import InputRequired, Length, Optional
from ....util.l10n import LocalizedForm... | """
byceps.blueprints.admin.site.forms
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
:Copyright: 2006-2019 Jochen Kupperschmidt
:License: Modified BSD, see LICENSE for details.
"""
from wtforms import SelectField, StringField
from wtforms.validators import InputRequired, Length, Optional
from ....util.l10n import LocalizedForm... | Allow site names to be up to 40 chars long (instead of 20) | Allow site names to be up to 40 chars long (instead of 20)
| Python | bsd-3-clause | homeworkprod/byceps,m-ober/byceps,homeworkprod/byceps,m-ober/byceps,m-ober/byceps,homeworkprod/byceps | """
byceps.blueprints.admin.site.forms
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
:Copyright: 2006-2019 Jochen Kupperschmidt
:License: Modified BSD, see LICENSE for details.
"""
from wtforms import SelectField, StringField
from wtforms.validators import InputRequired, Length, Optional
from ....util.l10n import LocalizedForm... | """
byceps.blueprints.admin.site.forms
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
:Copyright: 2006-2019 Jochen Kupperschmidt
:License: Modified BSD, see LICENSE for details.
"""
from wtforms import SelectField, StringField
from wtforms.validators import InputRequired, Length, Optional
from ....util.l10n import LocalizedForm... | <commit_before>"""
byceps.blueprints.admin.site.forms
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
:Copyright: 2006-2019 Jochen Kupperschmidt
:License: Modified BSD, see LICENSE for details.
"""
from wtforms import SelectField, StringField
from wtforms.validators import InputRequired, Length, Optional
from ....util.l10n impor... | """
byceps.blueprints.admin.site.forms
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
:Copyright: 2006-2019 Jochen Kupperschmidt
:License: Modified BSD, see LICENSE for details.
"""
from wtforms import SelectField, StringField
from wtforms.validators import InputRequired, Length, Optional
from ....util.l10n import LocalizedForm... | """
byceps.blueprints.admin.site.forms
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
:Copyright: 2006-2019 Jochen Kupperschmidt
:License: Modified BSD, see LICENSE for details.
"""
from wtforms import SelectField, StringField
from wtforms.validators import InputRequired, Length, Optional
from ....util.l10n import LocalizedForm... | <commit_before>"""
byceps.blueprints.admin.site.forms
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
:Copyright: 2006-2019 Jochen Kupperschmidt
:License: Modified BSD, see LICENSE for details.
"""
from wtforms import SelectField, StringField
from wtforms.validators import InputRequired, Length, Optional
from ....util.l10n impor... |
1ab04355c0172682e9948847a01b073239d0ae64 | words.py | words.py | """Function to fetch words."""
import random
WORDLIST = 'wordlist.txt'
def get_random_word():
"""Get a random word from the wordlist."""
words = []
with open(WORDLIST, 'r') as f:
for word in f:
words.append(word)
return random.choice(words)
def get_random_word_scalable():
"... | """Function to fetch words."""
import random
WORDLIST = 'wordlist.txt'
def get_random_word(min_word_length):
"""Get a random word from the wordlist using no extra memory."""
num_words_processed = 0
curr_word = None
with open(WORDLIST, 'r') as f:
for word in f:
if len(word) < min_... | Use scalable get_word by default | Use scalable get_word by default
| Python | mit | andrewyang96/HangmanGame | """Function to fetch words."""
import random
WORDLIST = 'wordlist.txt'
def get_random_word():
"""Get a random word from the wordlist."""
words = []
with open(WORDLIST, 'r') as f:
for word in f:
words.append(word)
return random.choice(words)
def get_random_word_scalable():
"... | """Function to fetch words."""
import random
WORDLIST = 'wordlist.txt'
def get_random_word(min_word_length):
"""Get a random word from the wordlist using no extra memory."""
num_words_processed = 0
curr_word = None
with open(WORDLIST, 'r') as f:
for word in f:
if len(word) < min_... | <commit_before>"""Function to fetch words."""
import random
WORDLIST = 'wordlist.txt'
def get_random_word():
"""Get a random word from the wordlist."""
words = []
with open(WORDLIST, 'r') as f:
for word in f:
words.append(word)
return random.choice(words)
def get_random_word_sc... | """Function to fetch words."""
import random
WORDLIST = 'wordlist.txt'
def get_random_word(min_word_length):
"""Get a random word from the wordlist using no extra memory."""
num_words_processed = 0
curr_word = None
with open(WORDLIST, 'r') as f:
for word in f:
if len(word) < min_... | """Function to fetch words."""
import random
WORDLIST = 'wordlist.txt'
def get_random_word():
"""Get a random word from the wordlist."""
words = []
with open(WORDLIST, 'r') as f:
for word in f:
words.append(word)
return random.choice(words)
def get_random_word_scalable():
"... | <commit_before>"""Function to fetch words."""
import random
WORDLIST = 'wordlist.txt'
def get_random_word():
"""Get a random word from the wordlist."""
words = []
with open(WORDLIST, 'r') as f:
for word in f:
words.append(word)
return random.choice(words)
def get_random_word_sc... |
ba4a68871ee326de94203bf401e4d325b87bec9c | docs/conf.py | docs/conf.py | import pymanopt
# Package information
project = "Pymanopt"
author = "Jamie Townsend, Niklas Koep, Sebastian Weichwald"
copyright = "2016-2020, {:s}".format(author)
release = version = pymanopt.__version__
# Build settings
extensions = [
"sphinx.ext.autodoc",
"sphinx.ext.coverage",
"sphinx.ext.mathjax",
... | import pymanopt
# Package information
project = "Pymanopt"
author = "Jamie Townsend, Niklas Koep, Sebastian Weichwald"
copyright = "2016-2021, {:s}".format(author)
release = version = pymanopt.__version__
# Build settings
extensions = [
"sphinx.ext.autodoc",
"sphinx.ext.coverage",
"sphinx.ext.mathjax",
... | Update copyright string in docs | Update copyright string in docs
Signed-off-by: Niklas Koep <[email protected]>
| Python | bsd-3-clause | pymanopt/pymanopt,pymanopt/pymanopt | import pymanopt
# Package information
project = "Pymanopt"
author = "Jamie Townsend, Niklas Koep, Sebastian Weichwald"
copyright = "2016-2020, {:s}".format(author)
release = version = pymanopt.__version__
# Build settings
extensions = [
"sphinx.ext.autodoc",
"sphinx.ext.coverage",
"sphinx.ext.mathjax",
... | import pymanopt
# Package information
project = "Pymanopt"
author = "Jamie Townsend, Niklas Koep, Sebastian Weichwald"
copyright = "2016-2021, {:s}".format(author)
release = version = pymanopt.__version__
# Build settings
extensions = [
"sphinx.ext.autodoc",
"sphinx.ext.coverage",
"sphinx.ext.mathjax",
... | <commit_before>import pymanopt
# Package information
project = "Pymanopt"
author = "Jamie Townsend, Niklas Koep, Sebastian Weichwald"
copyright = "2016-2020, {:s}".format(author)
release = version = pymanopt.__version__
# Build settings
extensions = [
"sphinx.ext.autodoc",
"sphinx.ext.coverage",
"sphinx.... | import pymanopt
# Package information
project = "Pymanopt"
author = "Jamie Townsend, Niklas Koep, Sebastian Weichwald"
copyright = "2016-2021, {:s}".format(author)
release = version = pymanopt.__version__
# Build settings
extensions = [
"sphinx.ext.autodoc",
"sphinx.ext.coverage",
"sphinx.ext.mathjax",
... | import pymanopt
# Package information
project = "Pymanopt"
author = "Jamie Townsend, Niklas Koep, Sebastian Weichwald"
copyright = "2016-2020, {:s}".format(author)
release = version = pymanopt.__version__
# Build settings
extensions = [
"sphinx.ext.autodoc",
"sphinx.ext.coverage",
"sphinx.ext.mathjax",
... | <commit_before>import pymanopt
# Package information
project = "Pymanopt"
author = "Jamie Townsend, Niklas Koep, Sebastian Weichwald"
copyright = "2016-2020, {:s}".format(author)
release = version = pymanopt.__version__
# Build settings
extensions = [
"sphinx.ext.autodoc",
"sphinx.ext.coverage",
"sphinx.... |
e051ae3bdada17f31eb1c4ed68bcd41e6e20deab | cea/interfaces/dashboard/api/dashboard.py | cea/interfaces/dashboard/api/dashboard.py | from flask_restplus import Namespace, Resource, fields, abort
import cea.config
import cea.plots.cache
api = Namespace('Dashboard', description='Dashboard plots')
LAYOUTS = ['row', 'grid', 'map']
CATEGORIES = {c.name: {'label': c.label, 'plots': [{'id': p.id(), 'name': p.name} for p in c.plots]}
for c... | from flask_restplus import Namespace, Resource, fields, abort
import cea.config
import cea.plots.cache
api = Namespace('Dashboard', description='Dashboard plots')
LAYOUTS = ['row', 'grid', 'map']
CATEGORIES = {c.name: {'label': c.label, 'plots': [{'id': p.id(), 'name': p.name} for p in c.plots]}
for c... | Include plot title to plots | Include plot title to plots
| Python | mit | architecture-building-systems/CEAforArcGIS,architecture-building-systems/CEAforArcGIS | from flask_restplus import Namespace, Resource, fields, abort
import cea.config
import cea.plots.cache
api = Namespace('Dashboard', description='Dashboard plots')
LAYOUTS = ['row', 'grid', 'map']
CATEGORIES = {c.name: {'label': c.label, 'plots': [{'id': p.id(), 'name': p.name} for p in c.plots]}
for c... | from flask_restplus import Namespace, Resource, fields, abort
import cea.config
import cea.plots.cache
api = Namespace('Dashboard', description='Dashboard plots')
LAYOUTS = ['row', 'grid', 'map']
CATEGORIES = {c.name: {'label': c.label, 'plots': [{'id': p.id(), 'name': p.name} for p in c.plots]}
for c... | <commit_before>from flask_restplus import Namespace, Resource, fields, abort
import cea.config
import cea.plots.cache
api = Namespace('Dashboard', description='Dashboard plots')
LAYOUTS = ['row', 'grid', 'map']
CATEGORIES = {c.name: {'label': c.label, 'plots': [{'id': p.id(), 'name': p.name} for p in c.plots]}
... | from flask_restplus import Namespace, Resource, fields, abort
import cea.config
import cea.plots.cache
api = Namespace('Dashboard', description='Dashboard plots')
LAYOUTS = ['row', 'grid', 'map']
CATEGORIES = {c.name: {'label': c.label, 'plots': [{'id': p.id(), 'name': p.name} for p in c.plots]}
for c... | from flask_restplus import Namespace, Resource, fields, abort
import cea.config
import cea.plots.cache
api = Namespace('Dashboard', description='Dashboard plots')
LAYOUTS = ['row', 'grid', 'map']
CATEGORIES = {c.name: {'label': c.label, 'plots': [{'id': p.id(), 'name': p.name} for p in c.plots]}
for c... | <commit_before>from flask_restplus import Namespace, Resource, fields, abort
import cea.config
import cea.plots.cache
api = Namespace('Dashboard', description='Dashboard plots')
LAYOUTS = ['row', 'grid', 'map']
CATEGORIES = {c.name: {'label': c.label, 'plots': [{'id': p.id(), 'name': p.name} for p in c.plots]}
... |
7e9f8ca01b9cb1a70ee09dac9e0eecb8d370ad1f | acq4/devices/FalconTurret/falconturret.py | acq4/devices/FalconTurret/falconturret.py | import falconoptics
from ..FilterWheel import FilterWheel, FilterWheelFuture
class FalconTurret(FilterWheel):
def __init__(self, dm, config, name):
self.dev = falconoptics.Falcon(config_file=None, update_nonvolitile=True)
self.dev.home(block=False)
FilterWheel.__init__(self, dm, config, n... | from acq4.pyqtgraph.Qt import QtGui
import falconoptics
from ..FilterWheel import FilterWheel, FilterWheelFuture
class FalconTurret(FilterWheel):
def __init__(self, dm, config, name):
self.dev = falconoptics.Falcon(config_file=None, update_nonvolitile=True)
self.dev.home(block=False)
Filt... | Add home button to falcon turret dev gui | Add home button to falcon turret dev gui
| Python | mit | campagnola/acq4,acq4/acq4,pbmanis/acq4,pbmanis/acq4,meganbkratz/acq4,acq4/acq4,pbmanis/acq4,campagnola/acq4,campagnola/acq4,meganbkratz/acq4,pbmanis/acq4,meganbkratz/acq4,campagnola/acq4,acq4/acq4,acq4/acq4,meganbkratz/acq4 | import falconoptics
from ..FilterWheel import FilterWheel, FilterWheelFuture
class FalconTurret(FilterWheel):
def __init__(self, dm, config, name):
self.dev = falconoptics.Falcon(config_file=None, update_nonvolitile=True)
self.dev.home(block=False)
FilterWheel.__init__(self, dm, config, n... | from acq4.pyqtgraph.Qt import QtGui
import falconoptics
from ..FilterWheel import FilterWheel, FilterWheelFuture
class FalconTurret(FilterWheel):
def __init__(self, dm, config, name):
self.dev = falconoptics.Falcon(config_file=None, update_nonvolitile=True)
self.dev.home(block=False)
Filt... | <commit_before>import falconoptics
from ..FilterWheel import FilterWheel, FilterWheelFuture
class FalconTurret(FilterWheel):
def __init__(self, dm, config, name):
self.dev = falconoptics.Falcon(config_file=None, update_nonvolitile=True)
self.dev.home(block=False)
FilterWheel.__init__(self... | from acq4.pyqtgraph.Qt import QtGui
import falconoptics
from ..FilterWheel import FilterWheel, FilterWheelFuture
class FalconTurret(FilterWheel):
def __init__(self, dm, config, name):
self.dev = falconoptics.Falcon(config_file=None, update_nonvolitile=True)
self.dev.home(block=False)
Filt... | import falconoptics
from ..FilterWheel import FilterWheel, FilterWheelFuture
class FalconTurret(FilterWheel):
def __init__(self, dm, config, name):
self.dev = falconoptics.Falcon(config_file=None, update_nonvolitile=True)
self.dev.home(block=False)
FilterWheel.__init__(self, dm, config, n... | <commit_before>import falconoptics
from ..FilterWheel import FilterWheel, FilterWheelFuture
class FalconTurret(FilterWheel):
def __init__(self, dm, config, name):
self.dev = falconoptics.Falcon(config_file=None, update_nonvolitile=True)
self.dev.home(block=False)
FilterWheel.__init__(self... |
3e617e3ade1fa55562868c2e2bf8bc07f9b09a79 | skflow/tests/test_io.py | skflow/tests/test_io.py | # Copyright 2015 Google Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law o... | # Copyright 2015 Google Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law o... | Print when pandas not installed and removed unnecessary imports | Print when pandas not installed and removed unnecessary imports
| Python | apache-2.0 | anand-c-goog/tensorflow,alheinecke/tensorflow-xsmm,sandeepdsouza93/TensorFlow-15712,alisidd/tensorflow,paolodedios/tensorflow,kevin-coder/tensorflow-fork,sjperkins/tensorflow,yanchen036/tensorflow,with-git/tensorflow,benoitsteiner/tensorflow,kobejean/tensorflow,wangyum/tensorflow,Moriadry/tensorflow,rdipietro/tensorflo... | # Copyright 2015 Google Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law o... | # Copyright 2015 Google Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law o... | <commit_before># Copyright 2015 Google Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by a... | # Copyright 2015 Google Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law o... | # Copyright 2015 Google Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law o... | <commit_before># Copyright 2015 Google Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by a... |
411581b5b773daceee9d3e2d7751ca652d251c00 | aiosmtplib/__init__.py | aiosmtplib/__init__.py | """
aiosmtplib
==========
An asyncio SMTP client.
Roughly based (with API differences) on smtplib from the Python 3 standard
library by: The Dragon De Monsyne <[email protected]>
Author: Cole Maclean <[email protected]>
"""
__title__ = 'aiosmtplib'
__version__ = '0.1.7'
__author__ = 'Cole Maclean'
__license__ = 'MIT'
... | """
aiosmtplib
==========
An asyncio SMTP client.
Roughly based (with API differences) on smtplib from the Python 3 standard
library by: The Dragon De Monsyne <[email protected]>
Author: Cole Maclean <[email protected]>
"""
__title__ = 'aiosmtplib'
__version__ = '1.0.0'
__author__ = 'Cole Maclean'
__license__ = 'MIT'
... | Move to 1.0.0; let's all use semver | Move to 1.0.0; let's all use semver
| Python | mit | cole/aiosmtplib | """
aiosmtplib
==========
An asyncio SMTP client.
Roughly based (with API differences) on smtplib from the Python 3 standard
library by: The Dragon De Monsyne <[email protected]>
Author: Cole Maclean <[email protected]>
"""
__title__ = 'aiosmtplib'
__version__ = '0.1.7'
__author__ = 'Cole Maclean'
__license__ = 'MIT'
... | """
aiosmtplib
==========
An asyncio SMTP client.
Roughly based (with API differences) on smtplib from the Python 3 standard
library by: The Dragon De Monsyne <[email protected]>
Author: Cole Maclean <[email protected]>
"""
__title__ = 'aiosmtplib'
__version__ = '1.0.0'
__author__ = 'Cole Maclean'
__license__ = 'MIT'
... | <commit_before>"""
aiosmtplib
==========
An asyncio SMTP client.
Roughly based (with API differences) on smtplib from the Python 3 standard
library by: The Dragon De Monsyne <[email protected]>
Author: Cole Maclean <[email protected]>
"""
__title__ = 'aiosmtplib'
__version__ = '0.1.7'
__author__ = 'Cole Maclean'
__lic... | """
aiosmtplib
==========
An asyncio SMTP client.
Roughly based (with API differences) on smtplib from the Python 3 standard
library by: The Dragon De Monsyne <[email protected]>
Author: Cole Maclean <[email protected]>
"""
__title__ = 'aiosmtplib'
__version__ = '1.0.0'
__author__ = 'Cole Maclean'
__license__ = 'MIT'
... | """
aiosmtplib
==========
An asyncio SMTP client.
Roughly based (with API differences) on smtplib from the Python 3 standard
library by: The Dragon De Monsyne <[email protected]>
Author: Cole Maclean <[email protected]>
"""
__title__ = 'aiosmtplib'
__version__ = '0.1.7'
__author__ = 'Cole Maclean'
__license__ = 'MIT'
... | <commit_before>"""
aiosmtplib
==========
An asyncio SMTP client.
Roughly based (with API differences) on smtplib from the Python 3 standard
library by: The Dragon De Monsyne <[email protected]>
Author: Cole Maclean <[email protected]>
"""
__title__ = 'aiosmtplib'
__version__ = '0.1.7'
__author__ = 'Cole Maclean'
__lic... |
f1cdc9d6d4736202480045aa633fb0ac5992e7e3 | test/views.py | test/views.py | from django.core.urlresolvers import reverse_lazy, reverse
from django import forms
from .models import Author
from popupcrud.views import PopupCrudViewSet
# Create your views here.
class AuthorForm(forms.ModelForm):
sex = forms.ChoiceField(label="Sex", choices=(('M', 'Male'), ('F', 'Female')))
class Meta:
... | from django.core.urlresolvers import reverse_lazy, reverse
from django import forms
from .models import Author
from popupcrud.views import PopupCrudViewSet
# Create your views here.
class AuthorForm(forms.ModelForm):
sex = forms.ChoiceField(label="Sex", choices=(('M', 'Male'), ('F', 'Female')))
class Meta:
... | Handle PY3 default data conversion vagaries in unit test | Handle PY3 default data conversion vagaries in unit test
| Python | bsd-3-clause | harikvpy/django-popupcrud,harikvpy/django-popupcrud,harikvpy/django-popupcrud | from django.core.urlresolvers import reverse_lazy, reverse
from django import forms
from .models import Author
from popupcrud.views import PopupCrudViewSet
# Create your views here.
class AuthorForm(forms.ModelForm):
sex = forms.ChoiceField(label="Sex", choices=(('M', 'Male'), ('F', 'Female')))
class Meta:
... | from django.core.urlresolvers import reverse_lazy, reverse
from django import forms
from .models import Author
from popupcrud.views import PopupCrudViewSet
# Create your views here.
class AuthorForm(forms.ModelForm):
sex = forms.ChoiceField(label="Sex", choices=(('M', 'Male'), ('F', 'Female')))
class Meta:
... | <commit_before>from django.core.urlresolvers import reverse_lazy, reverse
from django import forms
from .models import Author
from popupcrud.views import PopupCrudViewSet
# Create your views here.
class AuthorForm(forms.ModelForm):
sex = forms.ChoiceField(label="Sex", choices=(('M', 'Male'), ('F', 'Female')))
... | from django.core.urlresolvers import reverse_lazy, reverse
from django import forms
from .models import Author
from popupcrud.views import PopupCrudViewSet
# Create your views here.
class AuthorForm(forms.ModelForm):
sex = forms.ChoiceField(label="Sex", choices=(('M', 'Male'), ('F', 'Female')))
class Meta:
... | from django.core.urlresolvers import reverse_lazy, reverse
from django import forms
from .models import Author
from popupcrud.views import PopupCrudViewSet
# Create your views here.
class AuthorForm(forms.ModelForm):
sex = forms.ChoiceField(label="Sex", choices=(('M', 'Male'), ('F', 'Female')))
class Meta:
... | <commit_before>from django.core.urlresolvers import reverse_lazy, reverse
from django import forms
from .models import Author
from popupcrud.views import PopupCrudViewSet
# Create your views here.
class AuthorForm(forms.ModelForm):
sex = forms.ChoiceField(label="Sex", choices=(('M', 'Male'), ('F', 'Female')))
... |
e28c0bd84dc8814654850b607afbdaeb669956c8 | tests/data.py | tests/data.py | # -*- coding: utf-8 -*-
import json as _json
from collections import OrderedDict as _OrderedDict
import os as _os
_thisdir = _os.path.dirname(__file__)
class MenuData(object):
_data_files = [
'data.json',
]
def __init__(self, *args, **kwargs):
dfiles = [_os.path.join(_thisdir, x) for x in ... | # -*- coding: utf-8 -*-
import json as _json
from collections import OrderedDict as _OrderedDict
import os as _os
_thisdir = _os.path.dirname(__file__)
class MenuData(object):
_data_files = [
'data.json',
]
def __init__(self, *args, **kwargs):
dfiles = [_os.path.join(_thisdir, x) for x in ... | Fix json bug for python35 in tests | Fix json bug for python35 in tests
| Python | mit | frostidaho/dynmen | # -*- coding: utf-8 -*-
import json as _json
from collections import OrderedDict as _OrderedDict
import os as _os
_thisdir = _os.path.dirname(__file__)
class MenuData(object):
_data_files = [
'data.json',
]
def __init__(self, *args, **kwargs):
dfiles = [_os.path.join(_thisdir, x) for x in ... | # -*- coding: utf-8 -*-
import json as _json
from collections import OrderedDict as _OrderedDict
import os as _os
_thisdir = _os.path.dirname(__file__)
class MenuData(object):
_data_files = [
'data.json',
]
def __init__(self, *args, **kwargs):
dfiles = [_os.path.join(_thisdir, x) for x in ... | <commit_before># -*- coding: utf-8 -*-
import json as _json
from collections import OrderedDict as _OrderedDict
import os as _os
_thisdir = _os.path.dirname(__file__)
class MenuData(object):
_data_files = [
'data.json',
]
def __init__(self, *args, **kwargs):
dfiles = [_os.path.join(_thisdi... | # -*- coding: utf-8 -*-
import json as _json
from collections import OrderedDict as _OrderedDict
import os as _os
_thisdir = _os.path.dirname(__file__)
class MenuData(object):
_data_files = [
'data.json',
]
def __init__(self, *args, **kwargs):
dfiles = [_os.path.join(_thisdir, x) for x in ... | # -*- coding: utf-8 -*-
import json as _json
from collections import OrderedDict as _OrderedDict
import os as _os
_thisdir = _os.path.dirname(__file__)
class MenuData(object):
_data_files = [
'data.json',
]
def __init__(self, *args, **kwargs):
dfiles = [_os.path.join(_thisdir, x) for x in ... | <commit_before># -*- coding: utf-8 -*-
import json as _json
from collections import OrderedDict as _OrderedDict
import os as _os
_thisdir = _os.path.dirname(__file__)
class MenuData(object):
_data_files = [
'data.json',
]
def __init__(self, *args, **kwargs):
dfiles = [_os.path.join(_thisdi... |
52fdf6c0183233d34bc987e27a5e727b71ba09f0 | src/main/translator-xml/PMLToXML.py | src/main/translator-xml/PMLToXML.py | #!/usr/bin/env/python
import sys
import os.path
import subprocess
# Read in a pml file and save to an xml file
def translate_pml_file(xml_file, pml_file):
pml_path = os.path.abspath(pml_file.name)
xml_path = os.path.abspath(xml_file.name)
# Call XML generator
# TODO: Remove abs-path
return_code... | #!/usr/bin/env/python
import sys
from os.path import isdir, split, abspath
import subprocess
# Read in a pml file and save to an xml file
def translate_pml_file(xml_file, pml_file):
pml_path = abspath(pml_file.name)
xml_path = abspath(xml_file)
# Call XML generator
# TODO: Remove abs-path
retur... | Change arg from file to path | Change arg from file to path
| Python | mit | CS4098/GroupProject,CS4098/GroupProject,CS4098/GroupProject | #!/usr/bin/env/python
import sys
import os.path
import subprocess
# Read in a pml file and save to an xml file
def translate_pml_file(xml_file, pml_file):
pml_path = os.path.abspath(pml_file.name)
xml_path = os.path.abspath(xml_file.name)
# Call XML generator
# TODO: Remove abs-path
return_code... | #!/usr/bin/env/python
import sys
from os.path import isdir, split, abspath
import subprocess
# Read in a pml file and save to an xml file
def translate_pml_file(xml_file, pml_file):
pml_path = abspath(pml_file.name)
xml_path = abspath(xml_file)
# Call XML generator
# TODO: Remove abs-path
retur... | <commit_before>#!/usr/bin/env/python
import sys
import os.path
import subprocess
# Read in a pml file and save to an xml file
def translate_pml_file(xml_file, pml_file):
pml_path = os.path.abspath(pml_file.name)
xml_path = os.path.abspath(xml_file.name)
# Call XML generator
# TODO: Remove abs-path
... | #!/usr/bin/env/python
import sys
from os.path import isdir, split, abspath
import subprocess
# Read in a pml file and save to an xml file
def translate_pml_file(xml_file, pml_file):
pml_path = abspath(pml_file.name)
xml_path = abspath(xml_file)
# Call XML generator
# TODO: Remove abs-path
retur... | #!/usr/bin/env/python
import sys
import os.path
import subprocess
# Read in a pml file and save to an xml file
def translate_pml_file(xml_file, pml_file):
pml_path = os.path.abspath(pml_file.name)
xml_path = os.path.abspath(xml_file.name)
# Call XML generator
# TODO: Remove abs-path
return_code... | <commit_before>#!/usr/bin/env/python
import sys
import os.path
import subprocess
# Read in a pml file and save to an xml file
def translate_pml_file(xml_file, pml_file):
pml_path = os.path.abspath(pml_file.name)
xml_path = os.path.abspath(xml_file.name)
# Call XML generator
# TODO: Remove abs-path
... |
a5a90924822754b483041ba29cefeba949e72f38 | securesystemslib/gpg/exceptions.py | securesystemslib/gpg/exceptions.py | """
<Program Name>
exceptions.py
<Author>
Santiago Torres-Arias <[email protected]>
Lukas Puehringer <[email protected]>
<Started>
Dec 8, 2017
<Copyright>
See LICENSE for licensing information.
<Purpose>
Define Exceptions used in the gpg package. Following the practice from
securesystemslib the ... | """
<Program Name>
exceptions.py
<Author>
Santiago Torres-Arias <[email protected]>
Lukas Puehringer <[email protected]>
<Started>
Dec 8, 2017
<Copyright>
See LICENSE for licensing information.
<Purpose>
Define Exceptions used in the gpg package. Following the practice from
securesystemslib the ... | Add custom KeyNotFoundError error to gpg module | Add custom KeyNotFoundError error to gpg module
| Python | mit | secure-systems-lab/securesystemslib,secure-systems-lab/securesystemslib | """
<Program Name>
exceptions.py
<Author>
Santiago Torres-Arias <[email protected]>
Lukas Puehringer <[email protected]>
<Started>
Dec 8, 2017
<Copyright>
See LICENSE for licensing information.
<Purpose>
Define Exceptions used in the gpg package. Following the practice from
securesystemslib the ... | """
<Program Name>
exceptions.py
<Author>
Santiago Torres-Arias <[email protected]>
Lukas Puehringer <[email protected]>
<Started>
Dec 8, 2017
<Copyright>
See LICENSE for licensing information.
<Purpose>
Define Exceptions used in the gpg package. Following the practice from
securesystemslib the ... | <commit_before>"""
<Program Name>
exceptions.py
<Author>
Santiago Torres-Arias <[email protected]>
Lukas Puehringer <[email protected]>
<Started>
Dec 8, 2017
<Copyright>
See LICENSE for licensing information.
<Purpose>
Define Exceptions used in the gpg package. Following the practice from
secure... | """
<Program Name>
exceptions.py
<Author>
Santiago Torres-Arias <[email protected]>
Lukas Puehringer <[email protected]>
<Started>
Dec 8, 2017
<Copyright>
See LICENSE for licensing information.
<Purpose>
Define Exceptions used in the gpg package. Following the practice from
securesystemslib the ... | """
<Program Name>
exceptions.py
<Author>
Santiago Torres-Arias <[email protected]>
Lukas Puehringer <[email protected]>
<Started>
Dec 8, 2017
<Copyright>
See LICENSE for licensing information.
<Purpose>
Define Exceptions used in the gpg package. Following the practice from
securesystemslib the ... | <commit_before>"""
<Program Name>
exceptions.py
<Author>
Santiago Torres-Arias <[email protected]>
Lukas Puehringer <[email protected]>
<Started>
Dec 8, 2017
<Copyright>
See LICENSE for licensing information.
<Purpose>
Define Exceptions used in the gpg package. Following the practice from
secure... |
dcbcd7434b8b4199242a479d187d2b833ca6ffcc | polling_stations/settings/constants/councils.py | polling_stations/settings/constants/councils.py | # settings for councils scraper
YVM_LA_URL = "https://www.yourvotematters.co.uk/_design/nested-content/results-page2/search-voting-locations-by-districtcode?queries_distcode_query=" # noqa
BOUNDARIES_URL = "https://ons-cache.s3.amazonaws.com/Local_Authority_Districts_April_2019_Boundaries_UK_BFE.geojson"
EC_COUNCIL_C... | # settings for councils scraper
YVM_LA_URL = "https://www.yourvotematters.co.uk/_design/nested-content/results-page2/search-voting-locations-by-districtcode?queries_distcode_query=" # noqa
BOUNDARIES_URL = "https://ons-cache.s3.amazonaws.com/Local_Authority_Districts_April_2019_Boundaries_UK_BFE.geojson"
EC_COUNCIL_C... | Set the EC API URL | Set the EC API URL
| Python | bsd-3-clause | DemocracyClub/UK-Polling-Stations,DemocracyClub/UK-Polling-Stations,DemocracyClub/UK-Polling-Stations | # settings for councils scraper
YVM_LA_URL = "https://www.yourvotematters.co.uk/_design/nested-content/results-page2/search-voting-locations-by-districtcode?queries_distcode_query=" # noqa
BOUNDARIES_URL = "https://ons-cache.s3.amazonaws.com/Local_Authority_Districts_April_2019_Boundaries_UK_BFE.geojson"
EC_COUNCIL_C... | # settings for councils scraper
YVM_LA_URL = "https://www.yourvotematters.co.uk/_design/nested-content/results-page2/search-voting-locations-by-districtcode?queries_distcode_query=" # noqa
BOUNDARIES_URL = "https://ons-cache.s3.amazonaws.com/Local_Authority_Districts_April_2019_Boundaries_UK_BFE.geojson"
EC_COUNCIL_C... | <commit_before># settings for councils scraper
YVM_LA_URL = "https://www.yourvotematters.co.uk/_design/nested-content/results-page2/search-voting-locations-by-districtcode?queries_distcode_query=" # noqa
BOUNDARIES_URL = "https://ons-cache.s3.amazonaws.com/Local_Authority_Districts_April_2019_Boundaries_UK_BFE.geojso... | # settings for councils scraper
YVM_LA_URL = "https://www.yourvotematters.co.uk/_design/nested-content/results-page2/search-voting-locations-by-districtcode?queries_distcode_query=" # noqa
BOUNDARIES_URL = "https://ons-cache.s3.amazonaws.com/Local_Authority_Districts_April_2019_Boundaries_UK_BFE.geojson"
EC_COUNCIL_C... | # settings for councils scraper
YVM_LA_URL = "https://www.yourvotematters.co.uk/_design/nested-content/results-page2/search-voting-locations-by-districtcode?queries_distcode_query=" # noqa
BOUNDARIES_URL = "https://ons-cache.s3.amazonaws.com/Local_Authority_Districts_April_2019_Boundaries_UK_BFE.geojson"
EC_COUNCIL_C... | <commit_before># settings for councils scraper
YVM_LA_URL = "https://www.yourvotematters.co.uk/_design/nested-content/results-page2/search-voting-locations-by-districtcode?queries_distcode_query=" # noqa
BOUNDARIES_URL = "https://ons-cache.s3.amazonaws.com/Local_Authority_Districts_April_2019_Boundaries_UK_BFE.geojso... |
4e31e5c776c40997cccd76d4ce592d7f3d5de752 | example/runner.py | example/runner.py | #!/usr/bin/python
import argparse
import sys
def args():
parser = argparse.ArgumentParser(description='Run the Furious Examples.')
parser.add_argument('--gae-sdk-path', metavar='S', dest="gae_lib_path",
default="/usr/local/google_appengine",
help='path to the ... | #!/usr/bin/python
import argparse
import sys
def args():
parser = argparse.ArgumentParser(description='Run the Furious Examples.')
parser.add_argument('--gae-sdk-path', metavar='S', dest="gae_lib_path",
default="/usr/local/google_appengine",
help='path to the ... | Update the way the url is handled. | Update the way the url is handled.
| Python | apache-2.0 | andreleblanc-wf/furious,Workiva/furious,rosshendrickson-wf/furious,beaulyddon-wf/furious,mattsanders-wf/furious,rosshendrickson-wf/furious,mattsanders-wf/furious,beaulyddon-wf/furious,andreleblanc-wf/furious,Workiva/furious | #!/usr/bin/python
import argparse
import sys
def args():
parser = argparse.ArgumentParser(description='Run the Furious Examples.')
parser.add_argument('--gae-sdk-path', metavar='S', dest="gae_lib_path",
default="/usr/local/google_appengine",
help='path to the ... | #!/usr/bin/python
import argparse
import sys
def args():
parser = argparse.ArgumentParser(description='Run the Furious Examples.')
parser.add_argument('--gae-sdk-path', metavar='S', dest="gae_lib_path",
default="/usr/local/google_appengine",
help='path to the ... | <commit_before>#!/usr/bin/python
import argparse
import sys
def args():
parser = argparse.ArgumentParser(description='Run the Furious Examples.')
parser.add_argument('--gae-sdk-path', metavar='S', dest="gae_lib_path",
default="/usr/local/google_appengine",
hel... | #!/usr/bin/python
import argparse
import sys
def args():
parser = argparse.ArgumentParser(description='Run the Furious Examples.')
parser.add_argument('--gae-sdk-path', metavar='S', dest="gae_lib_path",
default="/usr/local/google_appengine",
help='path to the ... | #!/usr/bin/python
import argparse
import sys
def args():
parser = argparse.ArgumentParser(description='Run the Furious Examples.')
parser.add_argument('--gae-sdk-path', metavar='S', dest="gae_lib_path",
default="/usr/local/google_appengine",
help='path to the ... | <commit_before>#!/usr/bin/python
import argparse
import sys
def args():
parser = argparse.ArgumentParser(description='Run the Furious Examples.')
parser.add_argument('--gae-sdk-path', metavar='S', dest="gae_lib_path",
default="/usr/local/google_appengine",
hel... |
24cbbd24e6398aa11956ac48282bd907806284c3 | genderbot.py | genderbot.py | import re
from twitterbot import TwitterBot
import wikipedia
class Genderbot(TwitterBot):
boring_article_regex = (r"municipality|village|town|football|genus|family|"
"administrative|district|community|region|hamlet|"
"school|actor|mountain|basketball|city|specie... | import re
from twitterbot import TwitterBot
import wikipedia
class Genderbot(TwitterBot):
boring_regex = (r"municipality|village|town|football|genus|family|"
"administrative|district|community|region|hamlet|"
"school|actor|mountain|basketball|city|species|film|"
... | Tweak boring regex to exclude more terms | Tweak boring regex to exclude more terms
| Python | mit | DanielleSucher/genderbot | import re
from twitterbot import TwitterBot
import wikipedia
class Genderbot(TwitterBot):
boring_article_regex = (r"municipality|village|town|football|genus|family|"
"administrative|district|community|region|hamlet|"
"school|actor|mountain|basketball|city|specie... | import re
from twitterbot import TwitterBot
import wikipedia
class Genderbot(TwitterBot):
boring_regex = (r"municipality|village|town|football|genus|family|"
"administrative|district|community|region|hamlet|"
"school|actor|mountain|basketball|city|species|film|"
... | <commit_before>import re
from twitterbot import TwitterBot
import wikipedia
class Genderbot(TwitterBot):
boring_article_regex = (r"municipality|village|town|football|genus|family|"
"administrative|district|community|region|hamlet|"
"school|actor|mountain|basketb... | import re
from twitterbot import TwitterBot
import wikipedia
class Genderbot(TwitterBot):
boring_regex = (r"municipality|village|town|football|genus|family|"
"administrative|district|community|region|hamlet|"
"school|actor|mountain|basketball|city|species|film|"
... | import re
from twitterbot import TwitterBot
import wikipedia
class Genderbot(TwitterBot):
boring_article_regex = (r"municipality|village|town|football|genus|family|"
"administrative|district|community|region|hamlet|"
"school|actor|mountain|basketball|city|specie... | <commit_before>import re
from twitterbot import TwitterBot
import wikipedia
class Genderbot(TwitterBot):
boring_article_regex = (r"municipality|village|town|football|genus|family|"
"administrative|district|community|region|hamlet|"
"school|actor|mountain|basketb... |
f68a3874eb9b80898a6c1acfc74e493aad5817d8 | source/services/rotten_tomatoes_service.py | source/services/rotten_tomatoes_service.py | import requests
from bs4 import BeautifulSoup
from source.models.rt_rating import RTRating
class RottenTomatoesService:
__URL = 'http://www.rottentomatoes.com/m/'
__SEPERATOR = '_'
def __init__(self, title):
self.title = title
def get_rt_rating(self):
search_url = self.__URL + self... | import requests
from bs4 import BeautifulSoup
from source.models.rt_rating import RTRating
class RottenTomatoesService:
__URL = 'http://www.rottentomatoes.com/m/'
__SEPERATOR = '_'
def __init__(self, title):
self.title = title
def get_rt_rating(self):
search_url = self.__URL + self... | Remove "A" from start of title for RT search | Remove "A" from start of title for RT search
| Python | mit | jeremyrea/caterblu,jeremyrea/caterblu,jeremyrea/caterblu,jeremyrea/caterblu | import requests
from bs4 import BeautifulSoup
from source.models.rt_rating import RTRating
class RottenTomatoesService:
__URL = 'http://www.rottentomatoes.com/m/'
__SEPERATOR = '_'
def __init__(self, title):
self.title = title
def get_rt_rating(self):
search_url = self.__URL + self... | import requests
from bs4 import BeautifulSoup
from source.models.rt_rating import RTRating
class RottenTomatoesService:
__URL = 'http://www.rottentomatoes.com/m/'
__SEPERATOR = '_'
def __init__(self, title):
self.title = title
def get_rt_rating(self):
search_url = self.__URL + self... | <commit_before>import requests
from bs4 import BeautifulSoup
from source.models.rt_rating import RTRating
class RottenTomatoesService:
__URL = 'http://www.rottentomatoes.com/m/'
__SEPERATOR = '_'
def __init__(self, title):
self.title = title
def get_rt_rating(self):
search_url = se... | import requests
from bs4 import BeautifulSoup
from source.models.rt_rating import RTRating
class RottenTomatoesService:
__URL = 'http://www.rottentomatoes.com/m/'
__SEPERATOR = '_'
def __init__(self, title):
self.title = title
def get_rt_rating(self):
search_url = self.__URL + self... | import requests
from bs4 import BeautifulSoup
from source.models.rt_rating import RTRating
class RottenTomatoesService:
__URL = 'http://www.rottentomatoes.com/m/'
__SEPERATOR = '_'
def __init__(self, title):
self.title = title
def get_rt_rating(self):
search_url = self.__URL + self... | <commit_before>import requests
from bs4 import BeautifulSoup
from source.models.rt_rating import RTRating
class RottenTomatoesService:
__URL = 'http://www.rottentomatoes.com/m/'
__SEPERATOR = '_'
def __init__(self, title):
self.title = title
def get_rt_rating(self):
search_url = se... |
033b17a8be5be32188ca9b5f286fe023fc07d34a | frappe/utils/pdf.py | frappe/utils/pdf.py | # Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
# MIT License. See license.txt
from __future__ import unicode_literals
import pdfkit, os, frappe
from frappe.utils import scrub_urls
def get_pdf(html, options=None):
if not options:
options = {}
options.update({
"print-media-type": None,
... | # Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
# MIT License. See license.txt
from __future__ import unicode_literals
import pdfkit, os, frappe
from frappe.utils import scrub_urls
def get_pdf(html, options=None):
if not options:
options = {}
options.update({
"print-media-type": None,
... | Remove margin constrains from PDF printing | Remove margin constrains from PDF printing
| Python | mit | BhupeshGupta/frappe,BhupeshGupta/frappe,BhupeshGupta/frappe,BhupeshGupta/frappe | # Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
# MIT License. See license.txt
from __future__ import unicode_literals
import pdfkit, os, frappe
from frappe.utils import scrub_urls
def get_pdf(html, options=None):
if not options:
options = {}
options.update({
"print-media-type": None,
... | # Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
# MIT License. See license.txt
from __future__ import unicode_literals
import pdfkit, os, frappe
from frappe.utils import scrub_urls
def get_pdf(html, options=None):
if not options:
options = {}
options.update({
"print-media-type": None,
... | <commit_before># Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
# MIT License. See license.txt
from __future__ import unicode_literals
import pdfkit, os, frappe
from frappe.utils import scrub_urls
def get_pdf(html, options=None):
if not options:
options = {}
options.update({
"print-media... | # Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
# MIT License. See license.txt
from __future__ import unicode_literals
import pdfkit, os, frappe
from frappe.utils import scrub_urls
def get_pdf(html, options=None):
if not options:
options = {}
options.update({
"print-media-type": None,
... | # Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
# MIT License. See license.txt
from __future__ import unicode_literals
import pdfkit, os, frappe
from frappe.utils import scrub_urls
def get_pdf(html, options=None):
if not options:
options = {}
options.update({
"print-media-type": None,
... | <commit_before># Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
# MIT License. See license.txt
from __future__ import unicode_literals
import pdfkit, os, frappe
from frappe.utils import scrub_urls
def get_pdf(html, options=None):
if not options:
options = {}
options.update({
"print-media... |
026c22ef25b28889e24f20f96ca6285289bcd46d | seven23/models/stats/middleware.py | seven23/models/stats/middleware.py |
from datetime import datetime
from seven23.models.profile.models import Profile
from rest_framework.authentication import TokenAuthentication
from seven23.models.stats.models import MonthlyActiveUser, DailyActiveUser
def active_user_middleware(get_response):
def middleware(request):
user = request.user
... |
from datetime import datetime
from seven23.models.profile.models import Profile
from rest_framework.authentication import TokenAuthentication
# from seven23.models.stats.models import MonthlyActiveUser, DailyActiveUser
def active_user_middleware(get_response):
def middleware(request):
user = request.user... | Disable stats after crash report until we find a alternative solution | Disable stats after crash report until we find a alternative solution
| Python | mit | sebastienbarbier/723e,sebastienbarbier/723e_server,sebastienbarbier/723e_server,sebastienbarbier/723e |
from datetime import datetime
from seven23.models.profile.models import Profile
from rest_framework.authentication import TokenAuthentication
from seven23.models.stats.models import MonthlyActiveUser, DailyActiveUser
def active_user_middleware(get_response):
def middleware(request):
user = request.user
... |
from datetime import datetime
from seven23.models.profile.models import Profile
from rest_framework.authentication import TokenAuthentication
# from seven23.models.stats.models import MonthlyActiveUser, DailyActiveUser
def active_user_middleware(get_response):
def middleware(request):
user = request.user... | <commit_before>
from datetime import datetime
from seven23.models.profile.models import Profile
from rest_framework.authentication import TokenAuthentication
from seven23.models.stats.models import MonthlyActiveUser, DailyActiveUser
def active_user_middleware(get_response):
def middleware(request):
user =... |
from datetime import datetime
from seven23.models.profile.models import Profile
from rest_framework.authentication import TokenAuthentication
# from seven23.models.stats.models import MonthlyActiveUser, DailyActiveUser
def active_user_middleware(get_response):
def middleware(request):
user = request.user... |
from datetime import datetime
from seven23.models.profile.models import Profile
from rest_framework.authentication import TokenAuthentication
from seven23.models.stats.models import MonthlyActiveUser, DailyActiveUser
def active_user_middleware(get_response):
def middleware(request):
user = request.user
... | <commit_before>
from datetime import datetime
from seven23.models.profile.models import Profile
from rest_framework.authentication import TokenAuthentication
from seven23.models.stats.models import MonthlyActiveUser, DailyActiveUser
def active_user_middleware(get_response):
def middleware(request):
user =... |
500859e22bd4fda1fe55f4375642ccd5c1186d44 | d_parser/helpers/parser_extender.py | d_parser/helpers/parser_extender.py | import logging
from d_parser.helpers import url_lib
from d_parser.helpers.get_body import get_body
from helpers.config import Config
logger = logging.getLogger('ddd_site_parse')
def check_body_errors(self, grab, task):
try:
self.status_counter[str(grab.doc.code)] += 1
except KeyError:
self.... | import logging
from d_parser.helpers import url_lib
from d_parser.helpers.get_body import get_body
from helpers.config import Config
logger = logging.getLogger('ddd_site_parse')
def check_body_errors(self, grab, task):
try:
self.status_counter[str(grab.doc.code)] += 1
except KeyError:
self.... | Add skip html log output config key | Add skip html log output config key
| Python | mit | Holovin/D_GrabDemo | import logging
from d_parser.helpers import url_lib
from d_parser.helpers.get_body import get_body
from helpers.config import Config
logger = logging.getLogger('ddd_site_parse')
def check_body_errors(self, grab, task):
try:
self.status_counter[str(grab.doc.code)] += 1
except KeyError:
self.... | import logging
from d_parser.helpers import url_lib
from d_parser.helpers.get_body import get_body
from helpers.config import Config
logger = logging.getLogger('ddd_site_parse')
def check_body_errors(self, grab, task):
try:
self.status_counter[str(grab.doc.code)] += 1
except KeyError:
self.... | <commit_before>import logging
from d_parser.helpers import url_lib
from d_parser.helpers.get_body import get_body
from helpers.config import Config
logger = logging.getLogger('ddd_site_parse')
def check_body_errors(self, grab, task):
try:
self.status_counter[str(grab.doc.code)] += 1
except KeyError... | import logging
from d_parser.helpers import url_lib
from d_parser.helpers.get_body import get_body
from helpers.config import Config
logger = logging.getLogger('ddd_site_parse')
def check_body_errors(self, grab, task):
try:
self.status_counter[str(grab.doc.code)] += 1
except KeyError:
self.... | import logging
from d_parser.helpers import url_lib
from d_parser.helpers.get_body import get_body
from helpers.config import Config
logger = logging.getLogger('ddd_site_parse')
def check_body_errors(self, grab, task):
try:
self.status_counter[str(grab.doc.code)] += 1
except KeyError:
self.... | <commit_before>import logging
from d_parser.helpers import url_lib
from d_parser.helpers.get_body import get_body
from helpers.config import Config
logger = logging.getLogger('ddd_site_parse')
def check_body_errors(self, grab, task):
try:
self.status_counter[str(grab.doc.code)] += 1
except KeyError... |
2f2cef54a98e2328a638d9bbdfd2e0312606d906 | plugins/GCodeWriter/__init__.py | plugins/GCodeWriter/__init__.py | # Copyright (c) 2015 Ultimaker B.V.
# Cura is released under the terms of the AGPLv3 or higher.
from . import GCodeWriter
from UM.i18n import i18nCatalog
catalog = i18nCatalog("cura")
def getMetaData():
return {
"type": "mesh_writer",
"plugin": {
"name": "GCode Writer",
"a... | # Copyright (c) 2015 Ultimaker B.V.
# Cura is released under the terms of the AGPLv3 or higher.
from . import GCodeWriter
from UM.i18n import i18nCatalog
catalog = i18nCatalog("cura")
def getMetaData():
return {
"type": "mesh_writer",
"plugin": {
"name": "GCode Writer",
"a... | Add mime types to GCodeWriter plugin | Add mime types to GCodeWriter plugin
| Python | agpl-3.0 | Curahelper/Cura,senttech/Cura,fieldOfView/Cura,hmflash/Cura,lo0ol/Ultimaker-Cura,Curahelper/Cura,markwal/Cura,ad1217/Cura,senttech/Cura,ad1217/Cura,lo0ol/Ultimaker-Cura,totalretribution/Cura,hmflash/Cura,bq/Ultimaker-Cura,ynotstartups/Wanhao,fieldOfView/Cura,totalretribution/Cura,fxtentacle/Cura,fxtentacle/Cura,ynotsta... | # Copyright (c) 2015 Ultimaker B.V.
# Cura is released under the terms of the AGPLv3 or higher.
from . import GCodeWriter
from UM.i18n import i18nCatalog
catalog = i18nCatalog("cura")
def getMetaData():
return {
"type": "mesh_writer",
"plugin": {
"name": "GCode Writer",
"a... | # Copyright (c) 2015 Ultimaker B.V.
# Cura is released under the terms of the AGPLv3 or higher.
from . import GCodeWriter
from UM.i18n import i18nCatalog
catalog = i18nCatalog("cura")
def getMetaData():
return {
"type": "mesh_writer",
"plugin": {
"name": "GCode Writer",
"a... | <commit_before># Copyright (c) 2015 Ultimaker B.V.
# Cura is released under the terms of the AGPLv3 or higher.
from . import GCodeWriter
from UM.i18n import i18nCatalog
catalog = i18nCatalog("cura")
def getMetaData():
return {
"type": "mesh_writer",
"plugin": {
"name": "GCode Writer",... | # Copyright (c) 2015 Ultimaker B.V.
# Cura is released under the terms of the AGPLv3 or higher.
from . import GCodeWriter
from UM.i18n import i18nCatalog
catalog = i18nCatalog("cura")
def getMetaData():
return {
"type": "mesh_writer",
"plugin": {
"name": "GCode Writer",
"a... | # Copyright (c) 2015 Ultimaker B.V.
# Cura is released under the terms of the AGPLv3 or higher.
from . import GCodeWriter
from UM.i18n import i18nCatalog
catalog = i18nCatalog("cura")
def getMetaData():
return {
"type": "mesh_writer",
"plugin": {
"name": "GCode Writer",
"a... | <commit_before># Copyright (c) 2015 Ultimaker B.V.
# Cura is released under the terms of the AGPLv3 or higher.
from . import GCodeWriter
from UM.i18n import i18nCatalog
catalog = i18nCatalog("cura")
def getMetaData():
return {
"type": "mesh_writer",
"plugin": {
"name": "GCode Writer",... |
87a72b219c2699e6bbb4354ae4b4f4ee356fd2c5 | plumeria/plugins/bing_images.py | plumeria/plugins/bing_images.py | from aiohttp import BasicAuth
from plumeria import config
from plumeria.command import commands, CommandError
from plumeria.message import Response
from plumeria.util import http
from plumeria.util.ratelimit import rate_limit
SEARCH_URL = "https://api.datamarket.azure.com/Bing/Search/v1/Image"
api_key = config.create... | from aiohttp import BasicAuth
from plumeria import config
from plumeria.command import commands, CommandError
from plumeria.message import Response
from plumeria.util import http
from plumeria.util.ratelimit import rate_limit
SEARCH_URL = "https://api.datamarket.azure.com/Bing/Search/v1/Image"
api_key = config.create... | Add !images as Bing !image alias. | Add !images as Bing !image alias.
| Python | mit | sk89q/Plumeria,sk89q/Plumeria,sk89q/Plumeria | from aiohttp import BasicAuth
from plumeria import config
from plumeria.command import commands, CommandError
from plumeria.message import Response
from plumeria.util import http
from plumeria.util.ratelimit import rate_limit
SEARCH_URL = "https://api.datamarket.azure.com/Bing/Search/v1/Image"
api_key = config.create... | from aiohttp import BasicAuth
from plumeria import config
from plumeria.command import commands, CommandError
from plumeria.message import Response
from plumeria.util import http
from plumeria.util.ratelimit import rate_limit
SEARCH_URL = "https://api.datamarket.azure.com/Bing/Search/v1/Image"
api_key = config.create... | <commit_before>from aiohttp import BasicAuth
from plumeria import config
from plumeria.command import commands, CommandError
from plumeria.message import Response
from plumeria.util import http
from plumeria.util.ratelimit import rate_limit
SEARCH_URL = "https://api.datamarket.azure.com/Bing/Search/v1/Image"
api_key ... | from aiohttp import BasicAuth
from plumeria import config
from plumeria.command import commands, CommandError
from plumeria.message import Response
from plumeria.util import http
from plumeria.util.ratelimit import rate_limit
SEARCH_URL = "https://api.datamarket.azure.com/Bing/Search/v1/Image"
api_key = config.create... | from aiohttp import BasicAuth
from plumeria import config
from plumeria.command import commands, CommandError
from plumeria.message import Response
from plumeria.util import http
from plumeria.util.ratelimit import rate_limit
SEARCH_URL = "https://api.datamarket.azure.com/Bing/Search/v1/Image"
api_key = config.create... | <commit_before>from aiohttp import BasicAuth
from plumeria import config
from plumeria.command import commands, CommandError
from plumeria.message import Response
from plumeria.util import http
from plumeria.util.ratelimit import rate_limit
SEARCH_URL = "https://api.datamarket.azure.com/Bing/Search/v1/Image"
api_key ... |
2fbc2522f473c5255e678d435689aead9116d2d3 | sieve/sieve.py | sieve/sieve.py | def sieve(n):
if n < 2:
return []
not_prime = set()
prime = [2]
for i in range(3, n+1, 2):
if i not in not_prime:
prime.append(i)
not_prime.update(range(i*i, n, i))
return prime
| def sieve(n):
if n < 2:
return []
not_prime = set()
prime = [2]
for i in range(3, n+1, 2):
if i not in not_prime:
prime.append(i)
not_prime.update(range(i*i, n+1, i))
return prime
| Fix bug where n is the square of a prime | Fix bug where n is the square of a prime
| Python | agpl-3.0 | CubicComet/exercism-python-solutions | def sieve(n):
if n < 2:
return []
not_prime = set()
prime = [2]
for i in range(3, n+1, 2):
if i not in not_prime:
prime.append(i)
not_prime.update(range(i*i, n, i))
return prime
Fix bug where n is the square of a prime | def sieve(n):
if n < 2:
return []
not_prime = set()
prime = [2]
for i in range(3, n+1, 2):
if i not in not_prime:
prime.append(i)
not_prime.update(range(i*i, n+1, i))
return prime
| <commit_before>def sieve(n):
if n < 2:
return []
not_prime = set()
prime = [2]
for i in range(3, n+1, 2):
if i not in not_prime:
prime.append(i)
not_prime.update(range(i*i, n, i))
return prime
<commit_msg>Fix bug where n is the square of a prime<commit_after> | def sieve(n):
if n < 2:
return []
not_prime = set()
prime = [2]
for i in range(3, n+1, 2):
if i not in not_prime:
prime.append(i)
not_prime.update(range(i*i, n+1, i))
return prime
| def sieve(n):
if n < 2:
return []
not_prime = set()
prime = [2]
for i in range(3, n+1, 2):
if i not in not_prime:
prime.append(i)
not_prime.update(range(i*i, n, i))
return prime
Fix bug where n is the square of a primedef sieve(n):
if n < 2:
return... | <commit_before>def sieve(n):
if n < 2:
return []
not_prime = set()
prime = [2]
for i in range(3, n+1, 2):
if i not in not_prime:
prime.append(i)
not_prime.update(range(i*i, n, i))
return prime
<commit_msg>Fix bug where n is the square of a prime<commit_after>d... |
4f7371dad85843c42b9cb427edebe5020586b61e | server/core/management/commands/poll_urls.py | server/core/management/commands/poll_urls.py | import datetime
import multiprocessing
from django.conf import settings
from django.core.management.base import BaseCommand, CommandError
from core.models import WebPage, PageScrapeResult
from core.views import scrape_url
class Command(BaseCommand):
help = "Poll all the urls and scrape the results"
can_impo... | import datetime
import multiprocessing
from django.conf import settings
from django.core.management.base import BaseCommand, CommandError
from core.models import WebPage, PageScrapeResult
from core.views import scrape_url
class Command(BaseCommand):
help = "Poll all the urls and scrape the results"
can_impo... | Reduce the number of processes used. | Reduce the number of processes used.
| Python | mit | theju/atifier,theju/atifier | import datetime
import multiprocessing
from django.conf import settings
from django.core.management.base import BaseCommand, CommandError
from core.models import WebPage, PageScrapeResult
from core.views import scrape_url
class Command(BaseCommand):
help = "Poll all the urls and scrape the results"
can_impo... | import datetime
import multiprocessing
from django.conf import settings
from django.core.management.base import BaseCommand, CommandError
from core.models import WebPage, PageScrapeResult
from core.views import scrape_url
class Command(BaseCommand):
help = "Poll all the urls and scrape the results"
can_impo... | <commit_before>import datetime
import multiprocessing
from django.conf import settings
from django.core.management.base import BaseCommand, CommandError
from core.models import WebPage, PageScrapeResult
from core.views import scrape_url
class Command(BaseCommand):
help = "Poll all the urls and scrape the result... | import datetime
import multiprocessing
from django.conf import settings
from django.core.management.base import BaseCommand, CommandError
from core.models import WebPage, PageScrapeResult
from core.views import scrape_url
class Command(BaseCommand):
help = "Poll all the urls and scrape the results"
can_impo... | import datetime
import multiprocessing
from django.conf import settings
from django.core.management.base import BaseCommand, CommandError
from core.models import WebPage, PageScrapeResult
from core.views import scrape_url
class Command(BaseCommand):
help = "Poll all the urls and scrape the results"
can_impo... | <commit_before>import datetime
import multiprocessing
from django.conf import settings
from django.core.management.base import BaseCommand, CommandError
from core.models import WebPage, PageScrapeResult
from core.views import scrape_url
class Command(BaseCommand):
help = "Poll all the urls and scrape the result... |
e8c6be3565bd8b33dfb7a01dfb77938534ce9d09 | pysswords/crypt.py | pysswords/crypt.py | import os
import gnupg
import logging
from .utils import which
def create_key_input(gpg, passphrase, testing=False):
key_input = gpg.gen_key_input(
name_real='Pysswords',
name_email='pysswords@pysswords',
name_comment='Autogenerated by Pysswords',
passphrase=passphrase,
te... | import os
import gnupg
import logging
from .utils import which
def create_key_input(gpg, passphrase, testing=False):
key_input = gpg.gen_key_input(
name_real='Pysswords',
name_email='pysswords@pysswords',
name_comment='Autogenerated by Pysswords',
passphrase=passphrase,
te... | Add load gpg to get an instance of gpg | Add load gpg to get an instance of gpg
| Python | mit | scorphus/passpie,scorphus/passpie,marcwebbie/passpie,eiginn/passpie,marcwebbie/pysswords,marcwebbie/passpie,eiginn/passpie | import os
import gnupg
import logging
from .utils import which
def create_key_input(gpg, passphrase, testing=False):
key_input = gpg.gen_key_input(
name_real='Pysswords',
name_email='pysswords@pysswords',
name_comment='Autogenerated by Pysswords',
passphrase=passphrase,
te... | import os
import gnupg
import logging
from .utils import which
def create_key_input(gpg, passphrase, testing=False):
key_input = gpg.gen_key_input(
name_real='Pysswords',
name_email='pysswords@pysswords',
name_comment='Autogenerated by Pysswords',
passphrase=passphrase,
te... | <commit_before>import os
import gnupg
import logging
from .utils import which
def create_key_input(gpg, passphrase, testing=False):
key_input = gpg.gen_key_input(
name_real='Pysswords',
name_email='pysswords@pysswords',
name_comment='Autogenerated by Pysswords',
passphrase=passphr... | import os
import gnupg
import logging
from .utils import which
def create_key_input(gpg, passphrase, testing=False):
key_input = gpg.gen_key_input(
name_real='Pysswords',
name_email='pysswords@pysswords',
name_comment='Autogenerated by Pysswords',
passphrase=passphrase,
te... | import os
import gnupg
import logging
from .utils import which
def create_key_input(gpg, passphrase, testing=False):
key_input = gpg.gen_key_input(
name_real='Pysswords',
name_email='pysswords@pysswords',
name_comment='Autogenerated by Pysswords',
passphrase=passphrase,
te... | <commit_before>import os
import gnupg
import logging
from .utils import which
def create_key_input(gpg, passphrase, testing=False):
key_input = gpg.gen_key_input(
name_real='Pysswords',
name_email='pysswords@pysswords',
name_comment='Autogenerated by Pysswords',
passphrase=passphr... |
044d2e1761a6330dad326470728ea4fadceef8d8 | PropertyVerification/ContractDebugger.py | PropertyVerification/ContractDebugger.py | class ContractDebugger:
def __init__(self, pathCondGen):
self.pathCondGen = pathCondGen
def explain_failures(self, contract_name, contract, success_pcs, failed_pcs):
print("Explaining why contract fails: " + contract_name)
print(success_pcs)
print(failed_pcs)
self.ge... | class ContractDebugger:
def __init__(self, pathCondGen):
self.pathCondGen = pathCondGen
def explain_failures(self, contract_name, contract, success_pcs, failed_pcs):
print("Explaining why contract fails: " + contract_name)
# print("Success PCs: ")
# print(success_pcs)
... | Print rule difference between good and bad sets. | Print rule difference between good and bad sets.
| Python | mit | levilucio/SyVOLT,levilucio/SyVOLT | class ContractDebugger:
def __init__(self, pathCondGen):
self.pathCondGen = pathCondGen
def explain_failures(self, contract_name, contract, success_pcs, failed_pcs):
print("Explaining why contract fails: " + contract_name)
print(success_pcs)
print(failed_pcs)
self.ge... | class ContractDebugger:
def __init__(self, pathCondGen):
self.pathCondGen = pathCondGen
def explain_failures(self, contract_name, contract, success_pcs, failed_pcs):
print("Explaining why contract fails: " + contract_name)
# print("Success PCs: ")
# print(success_pcs)
... | <commit_before>class ContractDebugger:
def __init__(self, pathCondGen):
self.pathCondGen = pathCondGen
def explain_failures(self, contract_name, contract, success_pcs, failed_pcs):
print("Explaining why contract fails: " + contract_name)
print(success_pcs)
print(failed_pcs)
... | class ContractDebugger:
def __init__(self, pathCondGen):
self.pathCondGen = pathCondGen
def explain_failures(self, contract_name, contract, success_pcs, failed_pcs):
print("Explaining why contract fails: " + contract_name)
# print("Success PCs: ")
# print(success_pcs)
... | class ContractDebugger:
def __init__(self, pathCondGen):
self.pathCondGen = pathCondGen
def explain_failures(self, contract_name, contract, success_pcs, failed_pcs):
print("Explaining why contract fails: " + contract_name)
print(success_pcs)
print(failed_pcs)
self.ge... | <commit_before>class ContractDebugger:
def __init__(self, pathCondGen):
self.pathCondGen = pathCondGen
def explain_failures(self, contract_name, contract, success_pcs, failed_pcs):
print("Explaining why contract fails: " + contract_name)
print(success_pcs)
print(failed_pcs)
... |
04bbe400396a5ef5b930b9db9d8d8e30ff6bf678 | medical_patient_ethnicity/models/medical_patient_ethnicity.py | medical_patient_ethnicity/models/medical_patient_ethnicity.py | # -*- coding: utf-8 -*-
# #############################################################################
#
# Tech-Receptives Solutions Pvt. Ltd.
# Copyright (C) 2004-TODAY Tech-Receptives(<http://www.techreceptives.com>)
# Special Credit and Thanks to Thymbra Latinoamericana S.A.
#
# This program is free softwa... | # -*- coding: utf-8 -*-
# #############################################################################
#
# Tech-Receptives Solutions Pvt. Ltd.
# Copyright (C) 2004-TODAY Tech-Receptives(<http://www.techreceptives.com>)
# Special Credit and Thanks to Thymbra Latinoamericana S.A.
#
# This program is free softwa... | Add description to ethnicity model | Add description to ethnicity model
| Python | agpl-3.0 | ShaheenHossain/eagle-medical,laslabs/vertical-medical,laslabs/vertical-medical,ShaheenHossain/eagle-medical | # -*- coding: utf-8 -*-
# #############################################################################
#
# Tech-Receptives Solutions Pvt. Ltd.
# Copyright (C) 2004-TODAY Tech-Receptives(<http://www.techreceptives.com>)
# Special Credit and Thanks to Thymbra Latinoamericana S.A.
#
# This program is free softwa... | # -*- coding: utf-8 -*-
# #############################################################################
#
# Tech-Receptives Solutions Pvt. Ltd.
# Copyright (C) 2004-TODAY Tech-Receptives(<http://www.techreceptives.com>)
# Special Credit and Thanks to Thymbra Latinoamericana S.A.
#
# This program is free softwa... | <commit_before># -*- coding: utf-8 -*-
# #############################################################################
#
# Tech-Receptives Solutions Pvt. Ltd.
# Copyright (C) 2004-TODAY Tech-Receptives(<http://www.techreceptives.com>)
# Special Credit and Thanks to Thymbra Latinoamericana S.A.
#
# This program... | # -*- coding: utf-8 -*-
# #############################################################################
#
# Tech-Receptives Solutions Pvt. Ltd.
# Copyright (C) 2004-TODAY Tech-Receptives(<http://www.techreceptives.com>)
# Special Credit and Thanks to Thymbra Latinoamericana S.A.
#
# This program is free softwa... | # -*- coding: utf-8 -*-
# #############################################################################
#
# Tech-Receptives Solutions Pvt. Ltd.
# Copyright (C) 2004-TODAY Tech-Receptives(<http://www.techreceptives.com>)
# Special Credit and Thanks to Thymbra Latinoamericana S.A.
#
# This program is free softwa... | <commit_before># -*- coding: utf-8 -*-
# #############################################################################
#
# Tech-Receptives Solutions Pvt. Ltd.
# Copyright (C) 2004-TODAY Tech-Receptives(<http://www.techreceptives.com>)
# Special Credit and Thanks to Thymbra Latinoamericana S.A.
#
# This program... |
10ddda3e230aa72889c81cd69792122b265010fe | rental/views/rental_state_view.py | rental/views/rental_state_view.py | from django.http import HttpResponseForbidden
from django.shortcuts import redirect, get_object_or_404
from django.views import View
from rental.state_transitions import allowed_transitions
from rental.models import Rental
class RentalStateView(View):
"""
Change the state of a given rental
If given an in... | from django.http import HttpResponseForbidden
from django.shortcuts import redirect, get_object_or_404
from django.views import View
from rental.availability import Availability
from rental.state_transitions import allowed_transitions
from rental.models import Rental
class RentalStateView(View):
"""
Change th... | Check availability when approving rental request | Check availability when approving rental request
| Python | agpl-3.0 | verleihtool/verleihtool,verleihtool/verleihtool,verleihtool/verleihtool,verleihtool/verleihtool | from django.http import HttpResponseForbidden
from django.shortcuts import redirect, get_object_or_404
from django.views import View
from rental.state_transitions import allowed_transitions
from rental.models import Rental
class RentalStateView(View):
"""
Change the state of a given rental
If given an in... | from django.http import HttpResponseForbidden
from django.shortcuts import redirect, get_object_or_404
from django.views import View
from rental.availability import Availability
from rental.state_transitions import allowed_transitions
from rental.models import Rental
class RentalStateView(View):
"""
Change th... | <commit_before>from django.http import HttpResponseForbidden
from django.shortcuts import redirect, get_object_or_404
from django.views import View
from rental.state_transitions import allowed_transitions
from rental.models import Rental
class RentalStateView(View):
"""
Change the state of a given rental
... | from django.http import HttpResponseForbidden
from django.shortcuts import redirect, get_object_or_404
from django.views import View
from rental.availability import Availability
from rental.state_transitions import allowed_transitions
from rental.models import Rental
class RentalStateView(View):
"""
Change th... | from django.http import HttpResponseForbidden
from django.shortcuts import redirect, get_object_or_404
from django.views import View
from rental.state_transitions import allowed_transitions
from rental.models import Rental
class RentalStateView(View):
"""
Change the state of a given rental
If given an in... | <commit_before>from django.http import HttpResponseForbidden
from django.shortcuts import redirect, get_object_or_404
from django.views import View
from rental.state_transitions import allowed_transitions
from rental.models import Rental
class RentalStateView(View):
"""
Change the state of a given rental
... |
dc5235afec231454594201a54039869da26db576 | enactiveagents/model/perceptionhandler.py | enactiveagents/model/perceptionhandler.py | """
Module that holds classes that represent an agent's perception handler.
"""
import abc
import world
import structure
class PerceptionHandler(object):
@abc.abstractmethod
def perceive(self, agent, world):
"""
Generates a percept given an agent and a world.
:param agent: The agent ... | """
Module that holds classes that represent an agent's perception handler.
"""
import abc
import world
import structure
class PerceptionHandler(object):
@abc.abstractmethod
def perceive(self, agent, world):
"""
Generates a percept given an agent and a world.
:param agent: The agent ... | Add block structure to perception handler. Slightly change perception handler logic. | Add block structure to perception handler. Slightly change perception handler logic.
| Python | mit | Beskhue/enactive-agents,Beskhue/enactive-agents,Beskhue/enactive-agents | """
Module that holds classes that represent an agent's perception handler.
"""
import abc
import world
import structure
class PerceptionHandler(object):
@abc.abstractmethod
def perceive(self, agent, world):
"""
Generates a percept given an agent and a world.
:param agent: The agent ... | """
Module that holds classes that represent an agent's perception handler.
"""
import abc
import world
import structure
class PerceptionHandler(object):
@abc.abstractmethod
def perceive(self, agent, world):
"""
Generates a percept given an agent and a world.
:param agent: The agent ... | <commit_before>"""
Module that holds classes that represent an agent's perception handler.
"""
import abc
import world
import structure
class PerceptionHandler(object):
@abc.abstractmethod
def perceive(self, agent, world):
"""
Generates a percept given an agent and a world.
:param ag... | """
Module that holds classes that represent an agent's perception handler.
"""
import abc
import world
import structure
class PerceptionHandler(object):
@abc.abstractmethod
def perceive(self, agent, world):
"""
Generates a percept given an agent and a world.
:param agent: The agent ... | """
Module that holds classes that represent an agent's perception handler.
"""
import abc
import world
import structure
class PerceptionHandler(object):
@abc.abstractmethod
def perceive(self, agent, world):
"""
Generates a percept given an agent and a world.
:param agent: The agent ... | <commit_before>"""
Module that holds classes that represent an agent's perception handler.
"""
import abc
import world
import structure
class PerceptionHandler(object):
@abc.abstractmethod
def perceive(self, agent, world):
"""
Generates a percept given an agent and a world.
:param ag... |
f6abaa5dba68bf010b847de0c6d37b87e5732eea | github2/commits.py | github2/commits.py | from github2.core import BaseData, GithubCommand, Attribute, DateAttribute
class Commit(BaseData):
message = Attribute("Commit message.")
parents = Attribute("List of parents for this commit.")
url = Attribute("Canonical URL for this commit.")
author = Attribute("Author metadata (dict with name/email.... | from github2.core import BaseData, GithubCommand, Attribute, DateAttribute
class Commit(BaseData):
message = Attribute("Commit message.")
parents = Attribute("List of parents for this commit.")
url = Attribute("Canonical URL for this commit.")
author = Attribute("Author metadata (dict with name/email.... | Fix typo authored_data -> authored_date | Fix typo authored_data -> authored_date
| Python | bsd-3-clause | ask/python-github2 | from github2.core import BaseData, GithubCommand, Attribute, DateAttribute
class Commit(BaseData):
message = Attribute("Commit message.")
parents = Attribute("List of parents for this commit.")
url = Attribute("Canonical URL for this commit.")
author = Attribute("Author metadata (dict with name/email.... | from github2.core import BaseData, GithubCommand, Attribute, DateAttribute
class Commit(BaseData):
message = Attribute("Commit message.")
parents = Attribute("List of parents for this commit.")
url = Attribute("Canonical URL for this commit.")
author = Attribute("Author metadata (dict with name/email.... | <commit_before>from github2.core import BaseData, GithubCommand, Attribute, DateAttribute
class Commit(BaseData):
message = Attribute("Commit message.")
parents = Attribute("List of parents for this commit.")
url = Attribute("Canonical URL for this commit.")
author = Attribute("Author metadata (dict w... | from github2.core import BaseData, GithubCommand, Attribute, DateAttribute
class Commit(BaseData):
message = Attribute("Commit message.")
parents = Attribute("List of parents for this commit.")
url = Attribute("Canonical URL for this commit.")
author = Attribute("Author metadata (dict with name/email.... | from github2.core import BaseData, GithubCommand, Attribute, DateAttribute
class Commit(BaseData):
message = Attribute("Commit message.")
parents = Attribute("List of parents for this commit.")
url = Attribute("Canonical URL for this commit.")
author = Attribute("Author metadata (dict with name/email.... | <commit_before>from github2.core import BaseData, GithubCommand, Attribute, DateAttribute
class Commit(BaseData):
message = Attribute("Commit message.")
parents = Attribute("List of parents for this commit.")
url = Attribute("Canonical URL for this commit.")
author = Attribute("Author metadata (dict w... |
b5a21c39c37c02ea7077ce92596d68e496473af0 | grako/rendering.py | grako/rendering.py | # -*- coding: utf-8 -*-
from __future__ import print_function, division, absolute_import, unicode_literals
import itertools
from .util import trim
def render(item, **fields):
""" Render the given item
"""
if item is None:
return ''
elif isinstance(item, Renderer):
return item.render(**f... | # -*- coding: utf-8 -*-
from __future__ import print_function, division, absolute_import, unicode_literals
import itertools
from .util import trim
def render(item, **fields):
""" Render the given item
"""
if item is None:
return ''
elif isinstance(item, Renderer):
return item.render(**f... | Allow override of template through return value of render_fields. | Allow override of template through return value of render_fields.
| Python | bsd-2-clause | frnknglrt/grako,vmuriart/grako | # -*- coding: utf-8 -*-
from __future__ import print_function, division, absolute_import, unicode_literals
import itertools
from .util import trim
def render(item, **fields):
""" Render the given item
"""
if item is None:
return ''
elif isinstance(item, Renderer):
return item.render(**f... | # -*- coding: utf-8 -*-
from __future__ import print_function, division, absolute_import, unicode_literals
import itertools
from .util import trim
def render(item, **fields):
""" Render the given item
"""
if item is None:
return ''
elif isinstance(item, Renderer):
return item.render(**f... | <commit_before># -*- coding: utf-8 -*-
from __future__ import print_function, division, absolute_import, unicode_literals
import itertools
from .util import trim
def render(item, **fields):
""" Render the given item
"""
if item is None:
return ''
elif isinstance(item, Renderer):
return ... | # -*- coding: utf-8 -*-
from __future__ import print_function, division, absolute_import, unicode_literals
import itertools
from .util import trim
def render(item, **fields):
""" Render the given item
"""
if item is None:
return ''
elif isinstance(item, Renderer):
return item.render(**f... | # -*- coding: utf-8 -*-
from __future__ import print_function, division, absolute_import, unicode_literals
import itertools
from .util import trim
def render(item, **fields):
""" Render the given item
"""
if item is None:
return ''
elif isinstance(item, Renderer):
return item.render(**f... | <commit_before># -*- coding: utf-8 -*-
from __future__ import print_function, division, absolute_import, unicode_literals
import itertools
from .util import trim
def render(item, **fields):
""" Render the given item
"""
if item is None:
return ''
elif isinstance(item, Renderer):
return ... |
17a42110978d2fc38daaf0e09e25da760ccdc339 | adhocracy4/emails/mixins.py | adhocracy4/emails/mixins.py | from email.mime.image import MIMEImage
from django.contrib.staticfiles import finders
from .base import EmailBase
class PlatformEmailMixin:
"""
Attaches the static file images/logo.png so it can be used in an html
email.
"""
def get_attachments(self):
attachments = super().get_attachments... | from email.mime.image import MIMEImage
from django.contrib.staticfiles import finders
from .base import EmailBase
class PlatformEmailMixin:
"""
Attaches the static file images/logo.png so it can be used in an html
email.
"""
def get_attachments(self):
attachments = super().get_attachments... | Allow svg as email logo attachment | Allow svg as email logo attachment
| Python | agpl-3.0 | liqd/adhocracy4,liqd/adhocracy4,liqd/adhocracy4,liqd/adhocracy4 | from email.mime.image import MIMEImage
from django.contrib.staticfiles import finders
from .base import EmailBase
class PlatformEmailMixin:
"""
Attaches the static file images/logo.png so it can be used in an html
email.
"""
def get_attachments(self):
attachments = super().get_attachments... | from email.mime.image import MIMEImage
from django.contrib.staticfiles import finders
from .base import EmailBase
class PlatformEmailMixin:
"""
Attaches the static file images/logo.png so it can be used in an html
email.
"""
def get_attachments(self):
attachments = super().get_attachments... | <commit_before>from email.mime.image import MIMEImage
from django.contrib.staticfiles import finders
from .base import EmailBase
class PlatformEmailMixin:
"""
Attaches the static file images/logo.png so it can be used in an html
email.
"""
def get_attachments(self):
attachments = super().... | from email.mime.image import MIMEImage
from django.contrib.staticfiles import finders
from .base import EmailBase
class PlatformEmailMixin:
"""
Attaches the static file images/logo.png so it can be used in an html
email.
"""
def get_attachments(self):
attachments = super().get_attachments... | from email.mime.image import MIMEImage
from django.contrib.staticfiles import finders
from .base import EmailBase
class PlatformEmailMixin:
"""
Attaches the static file images/logo.png so it can be used in an html
email.
"""
def get_attachments(self):
attachments = super().get_attachments... | <commit_before>from email.mime.image import MIMEImage
from django.contrib.staticfiles import finders
from .base import EmailBase
class PlatformEmailMixin:
"""
Attaches the static file images/logo.png so it can be used in an html
email.
"""
def get_attachments(self):
attachments = super().... |
9e7c7c17f17553d010bf61b4d8014b5f0c064aca | examples/freesolv/generate_experiments.py | examples/freesolv/generate_experiments.py | import yaml
import copy
vacuum_switching_lengths = [0, 100, 500, 1000, 5000, 10000]
solvent_switching_lengths = [500, 1000, 5000, 10000, 20000, 50000]
use_sterics = [True, False]
geometry_divisions = [90, 180, 360, 720]
# Load in template yaml:
with open("rj_hydration.yaml", "r") as templatefile:
template_yaml =... | Add script to generate the yaml files for experiments | Add script to generate the yaml files for experiments
| Python | mit | choderalab/perses,choderalab/perses | Add script to generate the yaml files for experiments | import yaml
import copy
vacuum_switching_lengths = [0, 100, 500, 1000, 5000, 10000]
solvent_switching_lengths = [500, 1000, 5000, 10000, 20000, 50000]
use_sterics = [True, False]
geometry_divisions = [90, 180, 360, 720]
# Load in template yaml:
with open("rj_hydration.yaml", "r") as templatefile:
template_yaml =... | <commit_before><commit_msg>Add script to generate the yaml files for experiments<commit_after> | import yaml
import copy
vacuum_switching_lengths = [0, 100, 500, 1000, 5000, 10000]
solvent_switching_lengths = [500, 1000, 5000, 10000, 20000, 50000]
use_sterics = [True, False]
geometry_divisions = [90, 180, 360, 720]
# Load in template yaml:
with open("rj_hydration.yaml", "r") as templatefile:
template_yaml =... | Add script to generate the yaml files for experimentsimport yaml
import copy
vacuum_switching_lengths = [0, 100, 500, 1000, 5000, 10000]
solvent_switching_lengths = [500, 1000, 5000, 10000, 20000, 50000]
use_sterics = [True, False]
geometry_divisions = [90, 180, 360, 720]
# Load in template yaml:
with open("rj_hydra... | <commit_before><commit_msg>Add script to generate the yaml files for experiments<commit_after>import yaml
import copy
vacuum_switching_lengths = [0, 100, 500, 1000, 5000, 10000]
solvent_switching_lengths = [500, 1000, 5000, 10000, 20000, 50000]
use_sterics = [True, False]
geometry_divisions = [90, 180, 360, 720]
# L... | |
9ce7ee71b5eddc0ceff578b45c1324f8eb09ffe1 | artbot_scraper/pipelines.py | artbot_scraper/pipelines.py | # -*- coding: utf-8 -*-
from django.db import IntegrityError
from scrapy.exceptions import DropItem
from titlecase import titlecase
from dateutil import parser, relativedelta
class EventPipeline(object):
def process_item(self, item, spider):
item['titleRaw'] = item['title']
... | # -*- coding: utf-8 -*-
from django.db import IntegrityError
from scrapy.exceptions import DropItem
from titlecase import titlecase
from dateutil import parser, relativedelta
class EventPipeline(object):
def process_item(self, item, spider):
item['titleRaw'] = item['title']
... | Verify that event end and start keys exist before accessing. | Verify that event end and start keys exist before accessing.
| Python | mit | coreymcdermott/artbot,coreymcdermott/artbot | # -*- coding: utf-8 -*-
from django.db import IntegrityError
from scrapy.exceptions import DropItem
from titlecase import titlecase
from dateutil import parser, relativedelta
class EventPipeline(object):
def process_item(self, item, spider):
item['titleRaw'] = item['title']
... | # -*- coding: utf-8 -*-
from django.db import IntegrityError
from scrapy.exceptions import DropItem
from titlecase import titlecase
from dateutil import parser, relativedelta
class EventPipeline(object):
def process_item(self, item, spider):
item['titleRaw'] = item['title']
... | <commit_before># -*- coding: utf-8 -*-
from django.db import IntegrityError
from scrapy.exceptions import DropItem
from titlecase import titlecase
from dateutil import parser, relativedelta
class EventPipeline(object):
def process_item(self, item, spider):
item['titleRaw'] = item[... | # -*- coding: utf-8 -*-
from django.db import IntegrityError
from scrapy.exceptions import DropItem
from titlecase import titlecase
from dateutil import parser, relativedelta
class EventPipeline(object):
def process_item(self, item, spider):
item['titleRaw'] = item['title']
... | # -*- coding: utf-8 -*-
from django.db import IntegrityError
from scrapy.exceptions import DropItem
from titlecase import titlecase
from dateutil import parser, relativedelta
class EventPipeline(object):
def process_item(self, item, spider):
item['titleRaw'] = item['title']
... | <commit_before># -*- coding: utf-8 -*-
from django.db import IntegrityError
from scrapy.exceptions import DropItem
from titlecase import titlecase
from dateutil import parser, relativedelta
class EventPipeline(object):
def process_item(self, item, spider):
item['titleRaw'] = item[... |
e2a4262035e0d99c83a1bef8fdd594745a66b011 | tests/app/views/test_application.py | tests/app/views/test_application.py | from nose.tools import assert_equal, assert_true
from ...helpers import BaseApplicationTest
class TestApplication(BaseApplicationTest):
def setup(self):
super(TestApplication, self).setup()
def test_analytics_code_should_be_in_javascript(self):
res = self.client.get('/static/javascripts/appli... | from nose.tools import assert_equal, assert_true
from ...helpers import BaseApplicationTest
class TestApplication(BaseApplicationTest):
def setup(self):
super(TestApplication, self).setup()
def test_analytics_code_should_be_in_javascript(self):
res = self.client.get('/static/javascripts/appli... | Test for presence of analytics in minified JS | Test for presence of analytics in minified JS
Minifying the JS shortens variable names wherever their scope makes it possible.
This means that `GOVUK.analytics.trackPageView` gets shortened to something like
`e.t.trackPageView`, and not in a predicatable way. Because the `trackPageView`
method could be used by indeter... | Python | mit | AusDTO/dto-digitalmarketplace-buyer-frontend,mtekel/digitalmarketplace-buyer-frontend,alphagov/digitalmarketplace-buyer-frontend,alphagov/digitalmarketplace-buyer-frontend,alphagov/digitalmarketplace-buyer-frontend,mtekel/digitalmarketplace-buyer-frontend,AusDTO/dto-digitalmarketplace-buyer-frontend,mtekel/digitalmarke... | from nose.tools import assert_equal, assert_true
from ...helpers import BaseApplicationTest
class TestApplication(BaseApplicationTest):
def setup(self):
super(TestApplication, self).setup()
def test_analytics_code_should_be_in_javascript(self):
res = self.client.get('/static/javascripts/appli... | from nose.tools import assert_equal, assert_true
from ...helpers import BaseApplicationTest
class TestApplication(BaseApplicationTest):
def setup(self):
super(TestApplication, self).setup()
def test_analytics_code_should_be_in_javascript(self):
res = self.client.get('/static/javascripts/appli... | <commit_before>from nose.tools import assert_equal, assert_true
from ...helpers import BaseApplicationTest
class TestApplication(BaseApplicationTest):
def setup(self):
super(TestApplication, self).setup()
def test_analytics_code_should_be_in_javascript(self):
res = self.client.get('/static/ja... | from nose.tools import assert_equal, assert_true
from ...helpers import BaseApplicationTest
class TestApplication(BaseApplicationTest):
def setup(self):
super(TestApplication, self).setup()
def test_analytics_code_should_be_in_javascript(self):
res = self.client.get('/static/javascripts/appli... | from nose.tools import assert_equal, assert_true
from ...helpers import BaseApplicationTest
class TestApplication(BaseApplicationTest):
def setup(self):
super(TestApplication, self).setup()
def test_analytics_code_should_be_in_javascript(self):
res = self.client.get('/static/javascripts/appli... | <commit_before>from nose.tools import assert_equal, assert_true
from ...helpers import BaseApplicationTest
class TestApplication(BaseApplicationTest):
def setup(self):
super(TestApplication, self).setup()
def test_analytics_code_should_be_in_javascript(self):
res = self.client.get('/static/ja... |
4dce72f60d5575212448a7432eecc118bfd3c845 | apps/reactions/permissions.py | apps/reactions/permissions.py | from rest_framework import permissions
# TODO Add write permission for 1%CREW / Assitants.
class IsAuthorOrReadOnly(permissions.BasePermission):
"""
Custom permission to only allow author of an object to edit it.
"""
def has_permission(self, request, view, obj=None):
# Skip the check unless th... | from rest_framework import permissions
# TODO Add write permission for 1%CREW / Assistants.
class IsAuthorOrReadOnly(permissions.BasePermission):
"""
Custom permission to only allow author of an object to edit it.
"""
def has_permission(self, request, view, obj=None):
# Skip the check unless t... | Fix spelling mistake in comment. | Fix spelling mistake in comment.
| Python | bsd-3-clause | onepercentclub/onepercentclub-site,onepercentclub/onepercentclub-site,onepercentclub/onepercentclub-site,onepercentclub/onepercentclub-site,onepercentclub/onepercentclub-site | from rest_framework import permissions
# TODO Add write permission for 1%CREW / Assitants.
class IsAuthorOrReadOnly(permissions.BasePermission):
"""
Custom permission to only allow author of an object to edit it.
"""
def has_permission(self, request, view, obj=None):
# Skip the check unless th... | from rest_framework import permissions
# TODO Add write permission for 1%CREW / Assistants.
class IsAuthorOrReadOnly(permissions.BasePermission):
"""
Custom permission to only allow author of an object to edit it.
"""
def has_permission(self, request, view, obj=None):
# Skip the check unless t... | <commit_before>from rest_framework import permissions
# TODO Add write permission for 1%CREW / Assitants.
class IsAuthorOrReadOnly(permissions.BasePermission):
"""
Custom permission to only allow author of an object to edit it.
"""
def has_permission(self, request, view, obj=None):
# Skip the ... | from rest_framework import permissions
# TODO Add write permission for 1%CREW / Assistants.
class IsAuthorOrReadOnly(permissions.BasePermission):
"""
Custom permission to only allow author of an object to edit it.
"""
def has_permission(self, request, view, obj=None):
# Skip the check unless t... | from rest_framework import permissions
# TODO Add write permission for 1%CREW / Assitants.
class IsAuthorOrReadOnly(permissions.BasePermission):
"""
Custom permission to only allow author of an object to edit it.
"""
def has_permission(self, request, view, obj=None):
# Skip the check unless th... | <commit_before>from rest_framework import permissions
# TODO Add write permission for 1%CREW / Assitants.
class IsAuthorOrReadOnly(permissions.BasePermission):
"""
Custom permission to only allow author of an object to edit it.
"""
def has_permission(self, request, view, obj=None):
# Skip the ... |
50f2acfcfe482c5452a80243b186ec411f672afc | boundaryservice/urls.py | boundaryservice/urls.py | from django.conf.urls.defaults import patterns, include, url
from boundaryservice.views import *
urlpatterns = patterns('',
url(r'^boundary-set/$', BoundarySetListView.as_view(), name='boundaryservice_set_list'),
url(r'^boundary-set/(?P<slug>[\w_-]+)/$', BoundarySetDetailView.as_view(), name='boundaryservice_... | from django.conf.urls.defaults import patterns, include, url
from boundaryservice.views import *
urlpatterns = patterns('',
url(r'^boundary-sets/$', BoundarySetListView.as_view(), name='boundaryservice_set_list'),
url(r'^boundary-sets/(?P<slug>[\w_-]+)/$', BoundarySetDetailView.as_view(), name='boundaryservic... | Use plural names for resource types in URLs | Use plural names for resource types in URLs
| Python | mit | datamade/represent-boundaries,opencorato/represent-boundaries,opencorato/represent-boundaries,datamade/represent-boundaries,datamade/represent-boundaries,opencorato/represent-boundaries | from django.conf.urls.defaults import patterns, include, url
from boundaryservice.views import *
urlpatterns = patterns('',
url(r'^boundary-set/$', BoundarySetListView.as_view(), name='boundaryservice_set_list'),
url(r'^boundary-set/(?P<slug>[\w_-]+)/$', BoundarySetDetailView.as_view(), name='boundaryservice_... | from django.conf.urls.defaults import patterns, include, url
from boundaryservice.views import *
urlpatterns = patterns('',
url(r'^boundary-sets/$', BoundarySetListView.as_view(), name='boundaryservice_set_list'),
url(r'^boundary-sets/(?P<slug>[\w_-]+)/$', BoundarySetDetailView.as_view(), name='boundaryservic... | <commit_before>from django.conf.urls.defaults import patterns, include, url
from boundaryservice.views import *
urlpatterns = patterns('',
url(r'^boundary-set/$', BoundarySetListView.as_view(), name='boundaryservice_set_list'),
url(r'^boundary-set/(?P<slug>[\w_-]+)/$', BoundarySetDetailView.as_view(), name='b... | from django.conf.urls.defaults import patterns, include, url
from boundaryservice.views import *
urlpatterns = patterns('',
url(r'^boundary-sets/$', BoundarySetListView.as_view(), name='boundaryservice_set_list'),
url(r'^boundary-sets/(?P<slug>[\w_-]+)/$', BoundarySetDetailView.as_view(), name='boundaryservic... | from django.conf.urls.defaults import patterns, include, url
from boundaryservice.views import *
urlpatterns = patterns('',
url(r'^boundary-set/$', BoundarySetListView.as_view(), name='boundaryservice_set_list'),
url(r'^boundary-set/(?P<slug>[\w_-]+)/$', BoundarySetDetailView.as_view(), name='boundaryservice_... | <commit_before>from django.conf.urls.defaults import patterns, include, url
from boundaryservice.views import *
urlpatterns = patterns('',
url(r'^boundary-set/$', BoundarySetListView.as_view(), name='boundaryservice_set_list'),
url(r'^boundary-set/(?P<slug>[\w_-]+)/$', BoundarySetDetailView.as_view(), name='b... |
1631eb5d1e009c236bdc3db1d2d44da9e9e9102a | kokki/cookbooks/busket/recipes/default.py | kokki/cookbooks/busket/recipes/default.py |
import os
from kokki import *
Package("erlang")
Package("mercurial",
provider = "kokki.providers.package.easy_install.EasyInstallProvider")
Script("install-busket",
not_if = lambda:os.path.exists(env.config.busket.path),
cwd = "/usr/local/src",
code = (
"git clone git://github.com/samuel/bus... |
import os
from kokki import *
Package("erlang")
# ubuntu's erlang is a bit messed up.. remove the man link
File("/usr/lib/erlang/man",
action = "delete")
Package("mercurial",
provider = "kokki.providers.package.easy_install.EasyInstallProvider")
Script("install-busket",
not_if = lambda:os.path.exists(en... | Remove man link for erlang in ubuntu | Remove man link for erlang in ubuntu
| Python | bsd-3-clause | samuel/kokki |
import os
from kokki import *
Package("erlang")
Package("mercurial",
provider = "kokki.providers.package.easy_install.EasyInstallProvider")
Script("install-busket",
not_if = lambda:os.path.exists(env.config.busket.path),
cwd = "/usr/local/src",
code = (
"git clone git://github.com/samuel/bus... |
import os
from kokki import *
Package("erlang")
# ubuntu's erlang is a bit messed up.. remove the man link
File("/usr/lib/erlang/man",
action = "delete")
Package("mercurial",
provider = "kokki.providers.package.easy_install.EasyInstallProvider")
Script("install-busket",
not_if = lambda:os.path.exists(en... | <commit_before>
import os
from kokki import *
Package("erlang")
Package("mercurial",
provider = "kokki.providers.package.easy_install.EasyInstallProvider")
Script("install-busket",
not_if = lambda:os.path.exists(env.config.busket.path),
cwd = "/usr/local/src",
code = (
"git clone git://github... |
import os
from kokki import *
Package("erlang")
# ubuntu's erlang is a bit messed up.. remove the man link
File("/usr/lib/erlang/man",
action = "delete")
Package("mercurial",
provider = "kokki.providers.package.easy_install.EasyInstallProvider")
Script("install-busket",
not_if = lambda:os.path.exists(en... |
import os
from kokki import *
Package("erlang")
Package("mercurial",
provider = "kokki.providers.package.easy_install.EasyInstallProvider")
Script("install-busket",
not_if = lambda:os.path.exists(env.config.busket.path),
cwd = "/usr/local/src",
code = (
"git clone git://github.com/samuel/bus... | <commit_before>
import os
from kokki import *
Package("erlang")
Package("mercurial",
provider = "kokki.providers.package.easy_install.EasyInstallProvider")
Script("install-busket",
not_if = lambda:os.path.exists(env.config.busket.path),
cwd = "/usr/local/src",
code = (
"git clone git://github... |
963f9ed01b400cd95e14aecdee7c265fe48a4d41 | mopidy_nad/__init__.py | mopidy_nad/__init__.py | import os
import pkg_resources
from mopidy import config, ext
__version__ = pkg_resources.get_distribution("Mopidy-NAD").version
class Extension(ext.Extension):
dist_name = "Mopidy-NAD"
ext_name = "nad"
version = __version__
def get_default_config(self):
conf_file = os.path.join(os.path.di... | import pathlib
import pkg_resources
from mopidy import config, ext
__version__ = pkg_resources.get_distribution("Mopidy-NAD").version
class Extension(ext.Extension):
dist_name = "Mopidy-NAD"
ext_name = "nad"
version = __version__
def get_default_config(self):
return config.read(pathlib.Pat... | Use pathlib to read ext.conf | Use pathlib to read ext.conf
| Python | apache-2.0 | mopidy/mopidy-nad | import os
import pkg_resources
from mopidy import config, ext
__version__ = pkg_resources.get_distribution("Mopidy-NAD").version
class Extension(ext.Extension):
dist_name = "Mopidy-NAD"
ext_name = "nad"
version = __version__
def get_default_config(self):
conf_file = os.path.join(os.path.di... | import pathlib
import pkg_resources
from mopidy import config, ext
__version__ = pkg_resources.get_distribution("Mopidy-NAD").version
class Extension(ext.Extension):
dist_name = "Mopidy-NAD"
ext_name = "nad"
version = __version__
def get_default_config(self):
return config.read(pathlib.Pat... | <commit_before>import os
import pkg_resources
from mopidy import config, ext
__version__ = pkg_resources.get_distribution("Mopidy-NAD").version
class Extension(ext.Extension):
dist_name = "Mopidy-NAD"
ext_name = "nad"
version = __version__
def get_default_config(self):
conf_file = os.path.... | import pathlib
import pkg_resources
from mopidy import config, ext
__version__ = pkg_resources.get_distribution("Mopidy-NAD").version
class Extension(ext.Extension):
dist_name = "Mopidy-NAD"
ext_name = "nad"
version = __version__
def get_default_config(self):
return config.read(pathlib.Pat... | import os
import pkg_resources
from mopidy import config, ext
__version__ = pkg_resources.get_distribution("Mopidy-NAD").version
class Extension(ext.Extension):
dist_name = "Mopidy-NAD"
ext_name = "nad"
version = __version__
def get_default_config(self):
conf_file = os.path.join(os.path.di... | <commit_before>import os
import pkg_resources
from mopidy import config, ext
__version__ = pkg_resources.get_distribution("Mopidy-NAD").version
class Extension(ext.Extension):
dist_name = "Mopidy-NAD"
ext_name = "nad"
version = __version__
def get_default_config(self):
conf_file = os.path.... |
334e13b39945dab3e2c03752f32af0de5e382e9d | base/consensus.py | base/consensus.py | from abc import ABCMeta, abstractmethod
class Consensus(metaclass=ABCMeta):
"""
An interface for defining a consensus protocol.
The 'propose' and 'decide' methods need to be defined
"""
@abstractmethod
def propose(self, message):
#raise NotImplementedError("Method 'propose' needs to be... | Add abstract Consensus protocol class | Add abstract Consensus protocol class
| Python | mit | koevskinikola/ByzantineRandomizedConsensus | Add abstract Consensus protocol class | from abc import ABCMeta, abstractmethod
class Consensus(metaclass=ABCMeta):
"""
An interface for defining a consensus protocol.
The 'propose' and 'decide' methods need to be defined
"""
@abstractmethod
def propose(self, message):
#raise NotImplementedError("Method 'propose' needs to be... | <commit_before><commit_msg>Add abstract Consensus protocol class<commit_after> | from abc import ABCMeta, abstractmethod
class Consensus(metaclass=ABCMeta):
"""
An interface for defining a consensus protocol.
The 'propose' and 'decide' methods need to be defined
"""
@abstractmethod
def propose(self, message):
#raise NotImplementedError("Method 'propose' needs to be... | Add abstract Consensus protocol classfrom abc import ABCMeta, abstractmethod
class Consensus(metaclass=ABCMeta):
"""
An interface for defining a consensus protocol.
The 'propose' and 'decide' methods need to be defined
"""
@abstractmethod
def propose(self, message):
#raise NotImplement... | <commit_before><commit_msg>Add abstract Consensus protocol class<commit_after>from abc import ABCMeta, abstractmethod
class Consensus(metaclass=ABCMeta):
"""
An interface for defining a consensus protocol.
The 'propose' and 'decide' methods need to be defined
"""
@abstractmethod
def propose(se... | |
cd9a32c9c6ff2adc9e85fe471c30cf555b8871b0 | tests/abm/test_pops.py | tests/abm/test_pops.py | # -*- coding: utf-8 -*-
"""
test_pops
~~~~~~~~~
tests for population code
"""
from abm import pops
from abm.entities import Task
import pytest
from scipy.stats.distributions import uniform
import numpy as np
@pytest.fixture
def basicenv():
return pops.Environment()
@pytest.mark.unit
def test_distr... | # -*- coding: utf-8 -*-
"""
test_pops
~~~~~~~~~
tests for population code
"""
from abm import pops
from abm.entities import Task
import pytest
from scipy.stats.distributions import uniform
import numpy as np
@pytest.fixture
def basicenv():
return pops.Environment()
@pytest.mark.unit
def test_distr... | Add newline at the end of the file for my sanity. | Add newline at the end of the file for my sanity.
| Python | mit | bhtucker/agents | # -*- coding: utf-8 -*-
"""
test_pops
~~~~~~~~~
tests for population code
"""
from abm import pops
from abm.entities import Task
import pytest
from scipy.stats.distributions import uniform
import numpy as np
@pytest.fixture
def basicenv():
return pops.Environment()
@pytest.mark.unit
def test_distr... | # -*- coding: utf-8 -*-
"""
test_pops
~~~~~~~~~
tests for population code
"""
from abm import pops
from abm.entities import Task
import pytest
from scipy.stats.distributions import uniform
import numpy as np
@pytest.fixture
def basicenv():
return pops.Environment()
@pytest.mark.unit
def test_distr... | <commit_before># -*- coding: utf-8 -*-
"""
test_pops
~~~~~~~~~
tests for population code
"""
from abm import pops
from abm.entities import Task
import pytest
from scipy.stats.distributions import uniform
import numpy as np
@pytest.fixture
def basicenv():
return pops.Environment()
@pytest.mark.unit... | # -*- coding: utf-8 -*-
"""
test_pops
~~~~~~~~~
tests for population code
"""
from abm import pops
from abm.entities import Task
import pytest
from scipy.stats.distributions import uniform
import numpy as np
@pytest.fixture
def basicenv():
return pops.Environment()
@pytest.mark.unit
def test_distr... | # -*- coding: utf-8 -*-
"""
test_pops
~~~~~~~~~
tests for population code
"""
from abm import pops
from abm.entities import Task
import pytest
from scipy.stats.distributions import uniform
import numpy as np
@pytest.fixture
def basicenv():
return pops.Environment()
@pytest.mark.unit
def test_distr... | <commit_before># -*- coding: utf-8 -*-
"""
test_pops
~~~~~~~~~
tests for population code
"""
from abm import pops
from abm.entities import Task
import pytest
from scipy.stats.distributions import uniform
import numpy as np
@pytest.fixture
def basicenv():
return pops.Environment()
@pytest.mark.unit... |
d3130c380c4b0621bbb9d9a990df91850bccb16b | comics/comics/crfh.py | comics/comics/crfh.py | from comics.aggregator.crawler import CrawlerBase, CrawlerImage
from comics.core.comic_data import ComicDataBase
class ComicData(ComicDataBase):
name = "Colleges Roomies from Hell"
language = "en"
url = "http://www.crfh.net/"
start_date = "1999-01-01"
rights = "Maritza Campos"
class Crawler(Craw... | from comics.aggregator.crawler import CrawlerBase, CrawlerImage
from comics.core.comic_data import ComicDataBase
class ComicData(ComicDataBase):
name = "Colleges Roomies from Hell"
language = "en"
url = "http://www.crfh.net/"
start_date = "1999-01-01"
rights = "Maritza Campos"
class Crawler(Craw... | Update "Colleges Roomies from Hell" after site change | Update "Colleges Roomies from Hell" after site change
| Python | agpl-3.0 | datagutten/comics,datagutten/comics,datagutten/comics,jodal/comics,jodal/comics,jodal/comics,jodal/comics,datagutten/comics | from comics.aggregator.crawler import CrawlerBase, CrawlerImage
from comics.core.comic_data import ComicDataBase
class ComicData(ComicDataBase):
name = "Colleges Roomies from Hell"
language = "en"
url = "http://www.crfh.net/"
start_date = "1999-01-01"
rights = "Maritza Campos"
class Crawler(Craw... | from comics.aggregator.crawler import CrawlerBase, CrawlerImage
from comics.core.comic_data import ComicDataBase
class ComicData(ComicDataBase):
name = "Colleges Roomies from Hell"
language = "en"
url = "http://www.crfh.net/"
start_date = "1999-01-01"
rights = "Maritza Campos"
class Crawler(Craw... | <commit_before>from comics.aggregator.crawler import CrawlerBase, CrawlerImage
from comics.core.comic_data import ComicDataBase
class ComicData(ComicDataBase):
name = "Colleges Roomies from Hell"
language = "en"
url = "http://www.crfh.net/"
start_date = "1999-01-01"
rights = "Maritza Campos"
cla... | from comics.aggregator.crawler import CrawlerBase, CrawlerImage
from comics.core.comic_data import ComicDataBase
class ComicData(ComicDataBase):
name = "Colleges Roomies from Hell"
language = "en"
url = "http://www.crfh.net/"
start_date = "1999-01-01"
rights = "Maritza Campos"
class Crawler(Craw... | from comics.aggregator.crawler import CrawlerBase, CrawlerImage
from comics.core.comic_data import ComicDataBase
class ComicData(ComicDataBase):
name = "Colleges Roomies from Hell"
language = "en"
url = "http://www.crfh.net/"
start_date = "1999-01-01"
rights = "Maritza Campos"
class Crawler(Craw... | <commit_before>from comics.aggregator.crawler import CrawlerBase, CrawlerImage
from comics.core.comic_data import ComicDataBase
class ComicData(ComicDataBase):
name = "Colleges Roomies from Hell"
language = "en"
url = "http://www.crfh.net/"
start_date = "1999-01-01"
rights = "Maritza Campos"
cla... |
33f7e94385a8d4fbba797fc81b2565906604c9a4 | src/zeit/content/cp/browser/area.py | src/zeit/content/cp/browser/area.py | # Copyright (c) 2009-2010 gocept gmbh & co. kg
# See also LICENSE.txt
import zeit.content.cp.browser.blocks.teaser
import zeit.content.cp.interfaces
import zeit.edit.browser.block
import zeit.edit.browser.view
import zope.formlib.form
class ViewletManager(zeit.edit.browser.block.BlockViewletManager):
@property
... | # Copyright (c) 2009-2010 gocept gmbh & co. kg
# See also LICENSE.txt
import zeit.content.cp.browser.blocks.teaser
import zeit.content.cp.interfaces
import zeit.edit.browser.block
import zeit.edit.browser.view
import zope.formlib.form
class ViewletManager(zeit.edit.browser.block.BlockViewletManager):
@property
... | Remove field that has now the same default implementation on it's super class. | Remove field that has now the same default implementation on it's super class.
| Python | bsd-3-clause | ZeitOnline/zeit.content.cp,ZeitOnline/zeit.content.cp | # Copyright (c) 2009-2010 gocept gmbh & co. kg
# See also LICENSE.txt
import zeit.content.cp.browser.blocks.teaser
import zeit.content.cp.interfaces
import zeit.edit.browser.block
import zeit.edit.browser.view
import zope.formlib.form
class ViewletManager(zeit.edit.browser.block.BlockViewletManager):
@property
... | # Copyright (c) 2009-2010 gocept gmbh & co. kg
# See also LICENSE.txt
import zeit.content.cp.browser.blocks.teaser
import zeit.content.cp.interfaces
import zeit.edit.browser.block
import zeit.edit.browser.view
import zope.formlib.form
class ViewletManager(zeit.edit.browser.block.BlockViewletManager):
@property
... | <commit_before># Copyright (c) 2009-2010 gocept gmbh & co. kg
# See also LICENSE.txt
import zeit.content.cp.browser.blocks.teaser
import zeit.content.cp.interfaces
import zeit.edit.browser.block
import zeit.edit.browser.view
import zope.formlib.form
class ViewletManager(zeit.edit.browser.block.BlockViewletManager):
... | # Copyright (c) 2009-2010 gocept gmbh & co. kg
# See also LICENSE.txt
import zeit.content.cp.browser.blocks.teaser
import zeit.content.cp.interfaces
import zeit.edit.browser.block
import zeit.edit.browser.view
import zope.formlib.form
class ViewletManager(zeit.edit.browser.block.BlockViewletManager):
@property
... | # Copyright (c) 2009-2010 gocept gmbh & co. kg
# See also LICENSE.txt
import zeit.content.cp.browser.blocks.teaser
import zeit.content.cp.interfaces
import zeit.edit.browser.block
import zeit.edit.browser.view
import zope.formlib.form
class ViewletManager(zeit.edit.browser.block.BlockViewletManager):
@property
... | <commit_before># Copyright (c) 2009-2010 gocept gmbh & co. kg
# See also LICENSE.txt
import zeit.content.cp.browser.blocks.teaser
import zeit.content.cp.interfaces
import zeit.edit.browser.block
import zeit.edit.browser.view
import zope.formlib.form
class ViewletManager(zeit.edit.browser.block.BlockViewletManager):
... |
a802501943757dd85ce66a11fcd7ae40c0239462 | datastructures.py | datastructures.py | #!/usr/bin/env python3
class Triangle:
"""A class structure for storing and minipulating a triangle.
The trianlge is represented as a 3-tuple of points. Each point is
represented as a 2-tuple of floats, the first element being the
x-coordinate and the second element being the y-coordinate.
Severa... | #!/usr/bin/env python3
import math
class Triangle:
"""A class structure for storing and minipulating a triangle.
The trianlge is represented as a 3-tuple of points. Each point is
represented as a 2-tuple of floats, the first element being the
x-coordinate and the second element being the y-coordinate... | Add method to rotate triangle | Add method to rotate triangle
| Python | mit | moyamo/polygon2square | #!/usr/bin/env python3
class Triangle:
"""A class structure for storing and minipulating a triangle.
The trianlge is represented as a 3-tuple of points. Each point is
represented as a 2-tuple of floats, the first element being the
x-coordinate and the second element being the y-coordinate.
Severa... | #!/usr/bin/env python3
import math
class Triangle:
"""A class structure for storing and minipulating a triangle.
The trianlge is represented as a 3-tuple of points. Each point is
represented as a 2-tuple of floats, the first element being the
x-coordinate and the second element being the y-coordinate... | <commit_before>#!/usr/bin/env python3
class Triangle:
"""A class structure for storing and minipulating a triangle.
The trianlge is represented as a 3-tuple of points. Each point is
represented as a 2-tuple of floats, the first element being the
x-coordinate and the second element being the y-coordina... | #!/usr/bin/env python3
import math
class Triangle:
"""A class structure for storing and minipulating a triangle.
The trianlge is represented as a 3-tuple of points. Each point is
represented as a 2-tuple of floats, the first element being the
x-coordinate and the second element being the y-coordinate... | #!/usr/bin/env python3
class Triangle:
"""A class structure for storing and minipulating a triangle.
The trianlge is represented as a 3-tuple of points. Each point is
represented as a 2-tuple of floats, the first element being the
x-coordinate and the second element being the y-coordinate.
Severa... | <commit_before>#!/usr/bin/env python3
class Triangle:
"""A class structure for storing and minipulating a triangle.
The trianlge is represented as a 3-tuple of points. Each point is
represented as a 2-tuple of floats, the first element being the
x-coordinate and the second element being the y-coordina... |
dfcb61ef1187f9d3cf80ffc55ad8aceafb0b29b3 | djoauth2/helpers.py | djoauth2/helpers.py | # coding: utf-8
import random
import urlparse
from string import ascii_letters, digits
from urllib import urlencode
# From http://tools.ietf.org/html/rfc6750#section-2.1
BEARER_TOKEN_CHARSET = ascii_letters + digits + '-._~+/'
def random_hash(length):
return ''.join(random.sample(BEARER_TOKEN_CHARSET, length))
d... | # coding: utf-8
import random
import urlparse
from string import ascii_letters, digits
from urllib import urlencode
# From http://tools.ietf.org/html/rfc6750#section-2.1
BEARER_TOKEN_CHARSET = ascii_letters + digits + '-._~+/'
def random_hash(length):
return ''.join(random.sample(BEARER_TOKEN_CHARSET, length))
d... | Fix query string update helper. | Fix query string update helper.
| Python | mit | seler/djoauth2,vden/djoauth2-ng,Locu/djoauth2,Locu/djoauth2,seler/djoauth2,vden/djoauth2-ng | # coding: utf-8
import random
import urlparse
from string import ascii_letters, digits
from urllib import urlencode
# From http://tools.ietf.org/html/rfc6750#section-2.1
BEARER_TOKEN_CHARSET = ascii_letters + digits + '-._~+/'
def random_hash(length):
return ''.join(random.sample(BEARER_TOKEN_CHARSET, length))
d... | # coding: utf-8
import random
import urlparse
from string import ascii_letters, digits
from urllib import urlencode
# From http://tools.ietf.org/html/rfc6750#section-2.1
BEARER_TOKEN_CHARSET = ascii_letters + digits + '-._~+/'
def random_hash(length):
return ''.join(random.sample(BEARER_TOKEN_CHARSET, length))
d... | <commit_before># coding: utf-8
import random
import urlparse
from string import ascii_letters, digits
from urllib import urlencode
# From http://tools.ietf.org/html/rfc6750#section-2.1
BEARER_TOKEN_CHARSET = ascii_letters + digits + '-._~+/'
def random_hash(length):
return ''.join(random.sample(BEARER_TOKEN_CHARSE... | # coding: utf-8
import random
import urlparse
from string import ascii_letters, digits
from urllib import urlencode
# From http://tools.ietf.org/html/rfc6750#section-2.1
BEARER_TOKEN_CHARSET = ascii_letters + digits + '-._~+/'
def random_hash(length):
return ''.join(random.sample(BEARER_TOKEN_CHARSET, length))
d... | # coding: utf-8
import random
import urlparse
from string import ascii_letters, digits
from urllib import urlencode
# From http://tools.ietf.org/html/rfc6750#section-2.1
BEARER_TOKEN_CHARSET = ascii_letters + digits + '-._~+/'
def random_hash(length):
return ''.join(random.sample(BEARER_TOKEN_CHARSET, length))
d... | <commit_before># coding: utf-8
import random
import urlparse
from string import ascii_letters, digits
from urllib import urlencode
# From http://tools.ietf.org/html/rfc6750#section-2.1
BEARER_TOKEN_CHARSET = ascii_letters + digits + '-._~+/'
def random_hash(length):
return ''.join(random.sample(BEARER_TOKEN_CHARSE... |
986901c9e91d44758200fb8d3264b88c0977be37 | lvsr/configs/timit_bothgru_hybrid2.py | lvsr/configs/timit_bothgru_hybrid2.py | Config(
net=Config(attention_type='hybrid2',
shift_predictor_dims=[100],
max_left=10,
max_right=100),
initialization=[
("/recognizer", "rec_weights_init", "IsotropicGaussian(0.1)"),
("/recognizer/generator/att_trans/hybrid_att/loc_att",
"weig... | Config(
net=Config(dec_transition='GatedRecurrent',
enc_transition='GatedRecurrent',
attention_type='hybrid2',
shift_predictor_dims=[100],
max_left=10,
max_right=100),
initialization=[
("/recognizer", "rec_weights_init", "Isotrop... | Fix hybrid2, but it is still no use | Fix hybrid2, but it is still no use
| Python | mit | nke001/attention-lvcsr,rizar/attention-lvcsr,rizar/attention-lvcsr,nke001/attention-lvcsr,nke001/attention-lvcsr,rizar/attention-lvcsr,nke001/attention-lvcsr,rizar/attention-lvcsr,rizar/attention-lvcsr,nke001/attention-lvcsr | Config(
net=Config(attention_type='hybrid2',
shift_predictor_dims=[100],
max_left=10,
max_right=100),
initialization=[
("/recognizer", "rec_weights_init", "IsotropicGaussian(0.1)"),
("/recognizer/generator/att_trans/hybrid_att/loc_att",
"weig... | Config(
net=Config(dec_transition='GatedRecurrent',
enc_transition='GatedRecurrent',
attention_type='hybrid2',
shift_predictor_dims=[100],
max_left=10,
max_right=100),
initialization=[
("/recognizer", "rec_weights_init", "Isotrop... | <commit_before>Config(
net=Config(attention_type='hybrid2',
shift_predictor_dims=[100],
max_left=10,
max_right=100),
initialization=[
("/recognizer", "rec_weights_init", "IsotropicGaussian(0.1)"),
("/recognizer/generator/att_trans/hybrid_att/loc_att",... | Config(
net=Config(dec_transition='GatedRecurrent',
enc_transition='GatedRecurrent',
attention_type='hybrid2',
shift_predictor_dims=[100],
max_left=10,
max_right=100),
initialization=[
("/recognizer", "rec_weights_init", "Isotrop... | Config(
net=Config(attention_type='hybrid2',
shift_predictor_dims=[100],
max_left=10,
max_right=100),
initialization=[
("/recognizer", "rec_weights_init", "IsotropicGaussian(0.1)"),
("/recognizer/generator/att_trans/hybrid_att/loc_att",
"weig... | <commit_before>Config(
net=Config(attention_type='hybrid2',
shift_predictor_dims=[100],
max_left=10,
max_right=100),
initialization=[
("/recognizer", "rec_weights_init", "IsotropicGaussian(0.1)"),
("/recognizer/generator/att_trans/hybrid_att/loc_att",... |
d48946c89b4436fad97fdee65e34d7ca77f58d95 | modules/base.py | modules/base.py | #-*- coding: utf-8 -*-
import pandas as pd
import pandas_datareader.data as web
import datetime
import config
import os
import re
import pickle
def get_file_path(code):
return os.path.join(config.DATA_PATH, 'data', code + '.pkl')
def download(code, year1, month1, day1, year2, month2, day2):
start = datetime.datet... | #-*- coding: utf-8 -*-
import pandas as pd
import pandas_datareader.data as web
import datetime
import config
import os
import re
import pickle
def get_file_path(code):
if not os.path.exists(config.DATA_PATH):
try:
os.makedirs(config.DATA_PATH)
except:
pass
return os.path.join(config.DATA_PATH... | Fix the FileNotFoundError when data director is not exist | Fix the FileNotFoundError when data director is not exist
| Python | mit | jongha/stock-ai,jongha/stock-ai,jongha/stock-ai,jongha/stock-ai | #-*- coding: utf-8 -*-
import pandas as pd
import pandas_datareader.data as web
import datetime
import config
import os
import re
import pickle
def get_file_path(code):
return os.path.join(config.DATA_PATH, 'data', code + '.pkl')
def download(code, year1, month1, day1, year2, month2, day2):
start = datetime.datet... | #-*- coding: utf-8 -*-
import pandas as pd
import pandas_datareader.data as web
import datetime
import config
import os
import re
import pickle
def get_file_path(code):
if not os.path.exists(config.DATA_PATH):
try:
os.makedirs(config.DATA_PATH)
except:
pass
return os.path.join(config.DATA_PATH... | <commit_before>#-*- coding: utf-8 -*-
import pandas as pd
import pandas_datareader.data as web
import datetime
import config
import os
import re
import pickle
def get_file_path(code):
return os.path.join(config.DATA_PATH, 'data', code + '.pkl')
def download(code, year1, month1, day1, year2, month2, day2):
start =... | #-*- coding: utf-8 -*-
import pandas as pd
import pandas_datareader.data as web
import datetime
import config
import os
import re
import pickle
def get_file_path(code):
if not os.path.exists(config.DATA_PATH):
try:
os.makedirs(config.DATA_PATH)
except:
pass
return os.path.join(config.DATA_PATH... | #-*- coding: utf-8 -*-
import pandas as pd
import pandas_datareader.data as web
import datetime
import config
import os
import re
import pickle
def get_file_path(code):
return os.path.join(config.DATA_PATH, 'data', code + '.pkl')
def download(code, year1, month1, day1, year2, month2, day2):
start = datetime.datet... | <commit_before>#-*- coding: utf-8 -*-
import pandas as pd
import pandas_datareader.data as web
import datetime
import config
import os
import re
import pickle
def get_file_path(code):
return os.path.join(config.DATA_PATH, 'data', code + '.pkl')
def download(code, year1, month1, day1, year2, month2, day2):
start =... |
785c154cb97dcf8bbdc9c3ad5d4da6049bf7155c | web_blog.py | web_blog.py | # -*- coding: utf-8 -*-
from flask import Flask
DB_SCHEMA = """
DROP TABLE IF EXISTS entries;
CREATE TABLE entries (
id serial PRIMARY KEY,
title VARCHAR(127) NOT NULL,
text VARCHAR(10000) NOT NULL,
created TIMESTAMP NOT NULL,
)
"""
app = FLask(__name__)
@app.route('/')
def hello():
return u'... | # -*- coding: utf-8 -*-
from flask import Flask
import os
import psycopg2
from contextlib import closing
DB_SCHEMA = """
DROP TABLE IF EXISTS entries;
CREATE TABLE entries (
id serial PRIMARY KEY,
title VARCHAR(127) NOT NULL,
text VARCHAR(10000) NOT NULL,
created TIMESTAMP NOT NULL
)
"""
app = Fla... | Add functionality to connect to DB server and initialize our blog's database | Add functionality to connect to DB server and initialize our blog's database
| Python | mit | charlieRode/web_blog | # -*- coding: utf-8 -*-
from flask import Flask
DB_SCHEMA = """
DROP TABLE IF EXISTS entries;
CREATE TABLE entries (
id serial PRIMARY KEY,
title VARCHAR(127) NOT NULL,
text VARCHAR(10000) NOT NULL,
created TIMESTAMP NOT NULL,
)
"""
app = FLask(__name__)
@app.route('/')
def hello():
return u'... | # -*- coding: utf-8 -*-
from flask import Flask
import os
import psycopg2
from contextlib import closing
DB_SCHEMA = """
DROP TABLE IF EXISTS entries;
CREATE TABLE entries (
id serial PRIMARY KEY,
title VARCHAR(127) NOT NULL,
text VARCHAR(10000) NOT NULL,
created TIMESTAMP NOT NULL
)
"""
app = Fla... | <commit_before># -*- coding: utf-8 -*-
from flask import Flask
DB_SCHEMA = """
DROP TABLE IF EXISTS entries;
CREATE TABLE entries (
id serial PRIMARY KEY,
title VARCHAR(127) NOT NULL,
text VARCHAR(10000) NOT NULL,
created TIMESTAMP NOT NULL,
)
"""
app = FLask(__name__)
@app.route('/')
def hello()... | # -*- coding: utf-8 -*-
from flask import Flask
import os
import psycopg2
from contextlib import closing
DB_SCHEMA = """
DROP TABLE IF EXISTS entries;
CREATE TABLE entries (
id serial PRIMARY KEY,
title VARCHAR(127) NOT NULL,
text VARCHAR(10000) NOT NULL,
created TIMESTAMP NOT NULL
)
"""
app = Fla... | # -*- coding: utf-8 -*-
from flask import Flask
DB_SCHEMA = """
DROP TABLE IF EXISTS entries;
CREATE TABLE entries (
id serial PRIMARY KEY,
title VARCHAR(127) NOT NULL,
text VARCHAR(10000) NOT NULL,
created TIMESTAMP NOT NULL,
)
"""
app = FLask(__name__)
@app.route('/')
def hello():
return u'... | <commit_before># -*- coding: utf-8 -*-
from flask import Flask
DB_SCHEMA = """
DROP TABLE IF EXISTS entries;
CREATE TABLE entries (
id serial PRIMARY KEY,
title VARCHAR(127) NOT NULL,
text VARCHAR(10000) NOT NULL,
created TIMESTAMP NOT NULL,
)
"""
app = FLask(__name__)
@app.route('/')
def hello()... |
ae5c29e06ce110de1c44ffc4c466a4c611007d22 | spyder_unittest/widgets/tests/__init__.py | spyder_unittest/widgets/tests/__init__.py | # -*- coding: utf-8 -*-
#
# Copyright © 2017 Spyder Project Contributors
# Licensed under the terms of the MIT License
# (see LICENSE.txt for details)
# noqa: D104
| Add copyright notice, skip docstring checks | Add copyright notice, skip docstring checks | Python | mit | jitseniesen/spyder-unittest | Add copyright notice, skip docstring checks | # -*- coding: utf-8 -*-
#
# Copyright © 2017 Spyder Project Contributors
# Licensed under the terms of the MIT License
# (see LICENSE.txt for details)
# noqa: D104
| <commit_before><commit_msg>Add copyright notice, skip docstring checks<commit_after> | # -*- coding: utf-8 -*-
#
# Copyright © 2017 Spyder Project Contributors
# Licensed under the terms of the MIT License
# (see LICENSE.txt for details)
# noqa: D104
| Add copyright notice, skip docstring checks# -*- coding: utf-8 -*-
#
# Copyright © 2017 Spyder Project Contributors
# Licensed under the terms of the MIT License
# (see LICENSE.txt for details)
# noqa: D104
| <commit_before><commit_msg>Add copyright notice, skip docstring checks<commit_after># -*- coding: utf-8 -*-
#
# Copyright © 2017 Spyder Project Contributors
# Licensed under the terms of the MIT License
# (see LICENSE.txt for details)
# noqa: D104
| |
9492441a3587f7257d6295ebcb93a3e20c16a1d2 | opensrs/models.py | opensrs/models.py | from dateutil.parser import parse
class Domain(object):
def __init__(self, data):
self.name = data['name']
self.auto_renew = (data['f_auto_renew'] == 'Y')
self.expiry_date = parse(data['expiredate']).date()
@property
def tld(self):
return self.name.rsplit('.', 1)[1]
| from dateutil.parser import parse
class Domain(object):
def __init__(self, data):
self.name = data['name']
self.auto_renew = (data['f_auto_renew'] == 'Y')
self.expiry_date = parse(data['expiredate']).date()
@property
def tld(self):
return self.name.split('.')[-1]
| Use more concise way to get tld | Use more concise way to get tld
| Python | mit | yola/opensrs,yola/opensrs | from dateutil.parser import parse
class Domain(object):
def __init__(self, data):
self.name = data['name']
self.auto_renew = (data['f_auto_renew'] == 'Y')
self.expiry_date = parse(data['expiredate']).date()
@property
def tld(self):
return self.name.rsplit('.', 1)[1]
Use mo... | from dateutil.parser import parse
class Domain(object):
def __init__(self, data):
self.name = data['name']
self.auto_renew = (data['f_auto_renew'] == 'Y')
self.expiry_date = parse(data['expiredate']).date()
@property
def tld(self):
return self.name.split('.')[-1]
| <commit_before>from dateutil.parser import parse
class Domain(object):
def __init__(self, data):
self.name = data['name']
self.auto_renew = (data['f_auto_renew'] == 'Y')
self.expiry_date = parse(data['expiredate']).date()
@property
def tld(self):
return self.name.rsplit('.... | from dateutil.parser import parse
class Domain(object):
def __init__(self, data):
self.name = data['name']
self.auto_renew = (data['f_auto_renew'] == 'Y')
self.expiry_date = parse(data['expiredate']).date()
@property
def tld(self):
return self.name.split('.')[-1]
| from dateutil.parser import parse
class Domain(object):
def __init__(self, data):
self.name = data['name']
self.auto_renew = (data['f_auto_renew'] == 'Y')
self.expiry_date = parse(data['expiredate']).date()
@property
def tld(self):
return self.name.rsplit('.', 1)[1]
Use mo... | <commit_before>from dateutil.parser import parse
class Domain(object):
def __init__(self, data):
self.name = data['name']
self.auto_renew = (data['f_auto_renew'] == 'Y')
self.expiry_date = parse(data['expiredate']).date()
@property
def tld(self):
return self.name.rsplit('.... |
c1bafcaa2c826ab450bd7a5e77a48fd742098e19 | trex/serializers.py | trex/serializers.py | # -*- coding: utf-8 -*-
#
# (c) 2014 Bjoern Ricks <[email protected]>
#
# See LICENSE comming with the source of 'trex' for details.
#
from rest_framework.serializers import (
HyperlinkedModelSerializer, HyperlinkedIdentityField,
)
from trex.models.project import Project, Entry
class ProjectSerializer(Hype... | # -*- coding: utf-8 -*-
#
# (c) 2014 Bjoern Ricks <[email protected]>
#
# See LICENSE comming with the source of 'trex' for details.
#
from rest_framework.serializers import (
HyperlinkedModelSerializer, HyperlinkedIdentityField,
)
from trex.models.project import Project, Entry, Tag
class ProjectSerializer... | Add EntryTagsSerializer for returning tags of an Entry | Add EntryTagsSerializer for returning tags of an Entry
| Python | mit | bjoernricks/trex,bjoernricks/trex | # -*- coding: utf-8 -*-
#
# (c) 2014 Bjoern Ricks <[email protected]>
#
# See LICENSE comming with the source of 'trex' for details.
#
from rest_framework.serializers import (
HyperlinkedModelSerializer, HyperlinkedIdentityField,
)
from trex.models.project import Project, Entry
class ProjectSerializer(Hype... | # -*- coding: utf-8 -*-
#
# (c) 2014 Bjoern Ricks <[email protected]>
#
# See LICENSE comming with the source of 'trex' for details.
#
from rest_framework.serializers import (
HyperlinkedModelSerializer, HyperlinkedIdentityField,
)
from trex.models.project import Project, Entry, Tag
class ProjectSerializer... | <commit_before># -*- coding: utf-8 -*-
#
# (c) 2014 Bjoern Ricks <[email protected]>
#
# See LICENSE comming with the source of 'trex' for details.
#
from rest_framework.serializers import (
HyperlinkedModelSerializer, HyperlinkedIdentityField,
)
from trex.models.project import Project, Entry
class Project... | # -*- coding: utf-8 -*-
#
# (c) 2014 Bjoern Ricks <[email protected]>
#
# See LICENSE comming with the source of 'trex' for details.
#
from rest_framework.serializers import (
HyperlinkedModelSerializer, HyperlinkedIdentityField,
)
from trex.models.project import Project, Entry, Tag
class ProjectSerializer... | # -*- coding: utf-8 -*-
#
# (c) 2014 Bjoern Ricks <[email protected]>
#
# See LICENSE comming with the source of 'trex' for details.
#
from rest_framework.serializers import (
HyperlinkedModelSerializer, HyperlinkedIdentityField,
)
from trex.models.project import Project, Entry
class ProjectSerializer(Hype... | <commit_before># -*- coding: utf-8 -*-
#
# (c) 2014 Bjoern Ricks <[email protected]>
#
# See LICENSE comming with the source of 'trex' for details.
#
from rest_framework.serializers import (
HyperlinkedModelSerializer, HyperlinkedIdentityField,
)
from trex.models.project import Project, Entry
class Project... |
1add854d3855dade0d6eea9a2740e8233d02cf6b | amitgroup/features/edge_descriptor.py | amitgroup/features/edge_descriptor.py |
from binary_descriptor import BinaryDescriptor
import amitgroup as ag
import amitgroup.features
# TODO: This is temporarily moved
#@BinaryDescriptor.register('edges')
class EdgeDescriptor(BinaryDescriptor):
"""
Binary descriptor based on edges.
The parameters are similar to :func:`amitgroup.features.bedg... |
from binary_descriptor import BinaryDescriptor
import amitgroup as ag
import amitgroup.features
# TODO: This is temporarily moved
#@BinaryDescriptor.register('edges')
class EdgeDescriptor(BinaryDescriptor):
"""
Binary descriptor based on edges.
The parameters are similar to :func:`amitgroup.features.bedg... | Fix bug in EdgeDescriptor setting. | Fix bug in EdgeDescriptor setting.
| Python | bsd-3-clause | amitgroup/amitgroup |
from binary_descriptor import BinaryDescriptor
import amitgroup as ag
import amitgroup.features
# TODO: This is temporarily moved
#@BinaryDescriptor.register('edges')
class EdgeDescriptor(BinaryDescriptor):
"""
Binary descriptor based on edges.
The parameters are similar to :func:`amitgroup.features.bedg... |
from binary_descriptor import BinaryDescriptor
import amitgroup as ag
import amitgroup.features
# TODO: This is temporarily moved
#@BinaryDescriptor.register('edges')
class EdgeDescriptor(BinaryDescriptor):
"""
Binary descriptor based on edges.
The parameters are similar to :func:`amitgroup.features.bedg... | <commit_before>
from binary_descriptor import BinaryDescriptor
import amitgroup as ag
import amitgroup.features
# TODO: This is temporarily moved
#@BinaryDescriptor.register('edges')
class EdgeDescriptor(BinaryDescriptor):
"""
Binary descriptor based on edges.
The parameters are similar to :func:`amitgrou... |
from binary_descriptor import BinaryDescriptor
import amitgroup as ag
import amitgroup.features
# TODO: This is temporarily moved
#@BinaryDescriptor.register('edges')
class EdgeDescriptor(BinaryDescriptor):
"""
Binary descriptor based on edges.
The parameters are similar to :func:`amitgroup.features.bedg... |
from binary_descriptor import BinaryDescriptor
import amitgroup as ag
import amitgroup.features
# TODO: This is temporarily moved
#@BinaryDescriptor.register('edges')
class EdgeDescriptor(BinaryDescriptor):
"""
Binary descriptor based on edges.
The parameters are similar to :func:`amitgroup.features.bedg... | <commit_before>
from binary_descriptor import BinaryDescriptor
import amitgroup as ag
import amitgroup.features
# TODO: This is temporarily moved
#@BinaryDescriptor.register('edges')
class EdgeDescriptor(BinaryDescriptor):
"""
Binary descriptor based on edges.
The parameters are similar to :func:`amitgrou... |
a2589c5203c90b3b8b5cc504da36708038e0eb58 | links/maker/urls.py | links/maker/urls.py | from django.conf.urls import patterns, url
from maker.views import (RegsitrationView,
AuthenticationView,
MakerSelfView,
MakerProfileView,
ResetPasswordRequestView,
ResetPasswordP... | from django.conf.urls import patterns, url
from maker.views import (RegsitrationView,
AuthenticationView,
MakerSelfView,
MakerProfileView,
ResetPasswordRequestView,
ResetPasswordP... | Change maker self URL name | Change maker self URL name
| Python | mit | projectweekend/Links-API,projectweekend/Links-API | from django.conf.urls import patterns, url
from maker.views import (RegsitrationView,
AuthenticationView,
MakerSelfView,
MakerProfileView,
ResetPasswordRequestView,
ResetPasswordP... | from django.conf.urls import patterns, url
from maker.views import (RegsitrationView,
AuthenticationView,
MakerSelfView,
MakerProfileView,
ResetPasswordRequestView,
ResetPasswordP... | <commit_before>from django.conf.urls import patterns, url
from maker.views import (RegsitrationView,
AuthenticationView,
MakerSelfView,
MakerProfileView,
ResetPasswordRequestView,
... | from django.conf.urls import patterns, url
from maker.views import (RegsitrationView,
AuthenticationView,
MakerSelfView,
MakerProfileView,
ResetPasswordRequestView,
ResetPasswordP... | from django.conf.urls import patterns, url
from maker.views import (RegsitrationView,
AuthenticationView,
MakerSelfView,
MakerProfileView,
ResetPasswordRequestView,
ResetPasswordP... | <commit_before>from django.conf.urls import patterns, url
from maker.views import (RegsitrationView,
AuthenticationView,
MakerSelfView,
MakerProfileView,
ResetPasswordRequestView,
... |
332ed6c26830bf2ac8e154948c4c58b745d5b5ae | cosmo_tester/test_suites/snapshots/conftest.py | cosmo_tester/test_suites/snapshots/conftest.py | import pytest
from cosmo_tester.framework.test_hosts import Hosts, get_image
from cosmo_tester.test_suites.snapshots import get_multi_tenant_versions_list
@pytest.fixture(scope='function', params=get_multi_tenant_versions_list())
def hosts(request, ssh_key, module_tmpdir, test_config, logger):
hosts = Hosts(
... | import pytest
from cosmo_tester.framework.test_hosts import Hosts, get_image
from cosmo_tester.test_suites.snapshots import get_multi_tenant_versions_list
@pytest.fixture(scope='function', params=get_multi_tenant_versions_list())
def hosts(request, ssh_key, module_tmpdir, test_config, logger):
hosts = Hosts(
... | Use correct rabbit certs on old IP setter | Use correct rabbit certs on old IP setter
| Python | apache-2.0 | cloudify-cosmo/cloudify-system-tests,cloudify-cosmo/cloudify-system-tests | import pytest
from cosmo_tester.framework.test_hosts import Hosts, get_image
from cosmo_tester.test_suites.snapshots import get_multi_tenant_versions_list
@pytest.fixture(scope='function', params=get_multi_tenant_versions_list())
def hosts(request, ssh_key, module_tmpdir, test_config, logger):
hosts = Hosts(
... | import pytest
from cosmo_tester.framework.test_hosts import Hosts, get_image
from cosmo_tester.test_suites.snapshots import get_multi_tenant_versions_list
@pytest.fixture(scope='function', params=get_multi_tenant_versions_list())
def hosts(request, ssh_key, module_tmpdir, test_config, logger):
hosts = Hosts(
... | <commit_before>import pytest
from cosmo_tester.framework.test_hosts import Hosts, get_image
from cosmo_tester.test_suites.snapshots import get_multi_tenant_versions_list
@pytest.fixture(scope='function', params=get_multi_tenant_versions_list())
def hosts(request, ssh_key, module_tmpdir, test_config, logger):
hos... | import pytest
from cosmo_tester.framework.test_hosts import Hosts, get_image
from cosmo_tester.test_suites.snapshots import get_multi_tenant_versions_list
@pytest.fixture(scope='function', params=get_multi_tenant_versions_list())
def hosts(request, ssh_key, module_tmpdir, test_config, logger):
hosts = Hosts(
... | import pytest
from cosmo_tester.framework.test_hosts import Hosts, get_image
from cosmo_tester.test_suites.snapshots import get_multi_tenant_versions_list
@pytest.fixture(scope='function', params=get_multi_tenant_versions_list())
def hosts(request, ssh_key, module_tmpdir, test_config, logger):
hosts = Hosts(
... | <commit_before>import pytest
from cosmo_tester.framework.test_hosts import Hosts, get_image
from cosmo_tester.test_suites.snapshots import get_multi_tenant_versions_list
@pytest.fixture(scope='function', params=get_multi_tenant_versions_list())
def hosts(request, ssh_key, module_tmpdir, test_config, logger):
hos... |
428ff018ccda3862446ebaadf61db1a03470c18f | tests/mltils/test_infrequent_value_encoder.py | tests/mltils/test_infrequent_value_encoder.py | # pylint: disable=missing-docstring, invalid-name, import-error
import pandas as pd
from mltils.encoders import InfrequentValueEncoder
def test_infrequent_value_encoder_1():
ive = InfrequentValueEncoder()
assert ive is not None
def test_infrequent_value_encoder_2():
df = pd.DataFrame({'A': ['a', 'a', '... | Add unit tests for InfrequentValueEncoder | Add unit tests for InfrequentValueEncoder
| Python | mit | rladeira/mltils | Add unit tests for InfrequentValueEncoder | # pylint: disable=missing-docstring, invalid-name, import-error
import pandas as pd
from mltils.encoders import InfrequentValueEncoder
def test_infrequent_value_encoder_1():
ive = InfrequentValueEncoder()
assert ive is not None
def test_infrequent_value_encoder_2():
df = pd.DataFrame({'A': ['a', 'a', '... | <commit_before><commit_msg>Add unit tests for InfrequentValueEncoder<commit_after> | # pylint: disable=missing-docstring, invalid-name, import-error
import pandas as pd
from mltils.encoders import InfrequentValueEncoder
def test_infrequent_value_encoder_1():
ive = InfrequentValueEncoder()
assert ive is not None
def test_infrequent_value_encoder_2():
df = pd.DataFrame({'A': ['a', 'a', '... | Add unit tests for InfrequentValueEncoder# pylint: disable=missing-docstring, invalid-name, import-error
import pandas as pd
from mltils.encoders import InfrequentValueEncoder
def test_infrequent_value_encoder_1():
ive = InfrequentValueEncoder()
assert ive is not None
def test_infrequent_value_encoder_2():... | <commit_before><commit_msg>Add unit tests for InfrequentValueEncoder<commit_after># pylint: disable=missing-docstring, invalid-name, import-error
import pandas as pd
from mltils.encoders import InfrequentValueEncoder
def test_infrequent_value_encoder_1():
ive = InfrequentValueEncoder()
assert ive is not None... | |
0fd7b771823b97cb5fb7789c981d4ab3befcd28e | bluebottle/homepage/models.py | bluebottle/homepage/models.py | from bluebottle.quotes.models import Quote
from bluebottle.slides.models import Slide
from bluebottle.statistics.models import Statistic
from bluebottle.projects.models import Project
class HomePage(object):
"""
Instead of serving all the objects separately we combine
Slide, Quote and Stats into a dummy o... | from bluebottle.quotes.models import Quote
from bluebottle.slides.models import Slide
from bluebottle.statistics.models import Statistic
from bluebottle.projects.models import Project
class HomePage(object):
"""
Instead of serving all the objects separately we combine
Slide, Quote and Stats into a dummy o... | Send an empty list instead of None if no projects | Send an empty list instead of None if no projects
selected for homepage.
| Python | bsd-3-clause | onepercentclub/bluebottle,onepercentclub/bluebottle,onepercentclub/bluebottle,onepercentclub/bluebottle,onepercentclub/bluebottle | from bluebottle.quotes.models import Quote
from bluebottle.slides.models import Slide
from bluebottle.statistics.models import Statistic
from bluebottle.projects.models import Project
class HomePage(object):
"""
Instead of serving all the objects separately we combine
Slide, Quote and Stats into a dummy o... | from bluebottle.quotes.models import Quote
from bluebottle.slides.models import Slide
from bluebottle.statistics.models import Statistic
from bluebottle.projects.models import Project
class HomePage(object):
"""
Instead of serving all the objects separately we combine
Slide, Quote and Stats into a dummy o... | <commit_before>from bluebottle.quotes.models import Quote
from bluebottle.slides.models import Slide
from bluebottle.statistics.models import Statistic
from bluebottle.projects.models import Project
class HomePage(object):
"""
Instead of serving all the objects separately we combine
Slide, Quote and Stats... | from bluebottle.quotes.models import Quote
from bluebottle.slides.models import Slide
from bluebottle.statistics.models import Statistic
from bluebottle.projects.models import Project
class HomePage(object):
"""
Instead of serving all the objects separately we combine
Slide, Quote and Stats into a dummy o... | from bluebottle.quotes.models import Quote
from bluebottle.slides.models import Slide
from bluebottle.statistics.models import Statistic
from bluebottle.projects.models import Project
class HomePage(object):
"""
Instead of serving all the objects separately we combine
Slide, Quote and Stats into a dummy o... | <commit_before>from bluebottle.quotes.models import Quote
from bluebottle.slides.models import Slide
from bluebottle.statistics.models import Statistic
from bluebottle.projects.models import Project
class HomePage(object):
"""
Instead of serving all the objects separately we combine
Slide, Quote and Stats... |
b46dc26e5e1b4c0388c330017dc52393417c3323 | tests/test_init.py | tests/test_init.py | from disco.test import TestCase, TestJob
class InitJob(TestJob):
sort = False
@staticmethod
def map_reader(stream, size, url, params):
params.x = 10
return (stream, size, url)
@staticmethod
def map_init(iter, params):
assert hasattr(params, 'x')
iter.next()
... | from disco.test import TestCase, TestJob
class InitJob(TestJob):
params = {'x': 10}
sort = False
@staticmethod
def map_init(iter, params):
iter.next()
params['x'] += 100
@staticmethod
def map(e, params):
yield e, int(e) + params['x']
@staticmethod
def reduce_i... | Revert "added a test for the map_reader before map_init -case which fails currently" (deprecate init functions instead) | Revert "added a test for the map_reader before map_init -case which fails currently"
(deprecate init functions instead)
This reverts commit 88551bf444b7b358fea8e7eb4475df2c5d87ceeb.
| Python | bsd-3-clause | ErikDubbelboer/disco,pombredanne/disco,mwilliams3/disco,simudream/disco,pombredanne/disco,simudream/disco,mozilla/disco,beni55/disco,ErikDubbelboer/disco,pavlobaron/disco_playground,pooya/disco,ktkt2009/disco,scrapinghub/disco,seabirdzh/disco,pombredanne/disco,pooya/disco,pombredanne/disco,mwilliams3/disco,ktkt2009/dis... | from disco.test import TestCase, TestJob
class InitJob(TestJob):
sort = False
@staticmethod
def map_reader(stream, size, url, params):
params.x = 10
return (stream, size, url)
@staticmethod
def map_init(iter, params):
assert hasattr(params, 'x')
iter.next()
... | from disco.test import TestCase, TestJob
class InitJob(TestJob):
params = {'x': 10}
sort = False
@staticmethod
def map_init(iter, params):
iter.next()
params['x'] += 100
@staticmethod
def map(e, params):
yield e, int(e) + params['x']
@staticmethod
def reduce_i... | <commit_before>from disco.test import TestCase, TestJob
class InitJob(TestJob):
sort = False
@staticmethod
def map_reader(stream, size, url, params):
params.x = 10
return (stream, size, url)
@staticmethod
def map_init(iter, params):
assert hasattr(params, 'x')
iter... | from disco.test import TestCase, TestJob
class InitJob(TestJob):
params = {'x': 10}
sort = False
@staticmethod
def map_init(iter, params):
iter.next()
params['x'] += 100
@staticmethod
def map(e, params):
yield e, int(e) + params['x']
@staticmethod
def reduce_i... | from disco.test import TestCase, TestJob
class InitJob(TestJob):
sort = False
@staticmethod
def map_reader(stream, size, url, params):
params.x = 10
return (stream, size, url)
@staticmethod
def map_init(iter, params):
assert hasattr(params, 'x')
iter.next()
... | <commit_before>from disco.test import TestCase, TestJob
class InitJob(TestJob):
sort = False
@staticmethod
def map_reader(stream, size, url, params):
params.x = 10
return (stream, size, url)
@staticmethod
def map_init(iter, params):
assert hasattr(params, 'x')
iter... |
fefa46e21724fcd87cda0fa58101e1a74a31adec | molly/apps/places/importers/naptan.py | molly/apps/places/importers/naptan.py | from datetime import timedelta
import httplib
from tempfile import TemporaryFile
from zipfile import ZipFile
from celery.schedules import schedule
from molly.apps.places.parsers.naptan import NaptanParser
class NaptanImporter(object):
IMPORTER_NAME = 'naptan'
IMPORT_SCHEDULE = schedule(run_every=timedelta(w... | from datetime import timedelta
import httplib
from tempfile import TemporaryFile
from zipfile import ZipFile
from celery.schedules import schedule
from molly.apps.places.parsers.naptan import NaptanParser
class NaptanImporter(object):
IMPORTER_NAME = 'naptan'
IMPORT_SCHEDULE = schedule(run_every=timedelta(w... | Update the importer to use the places service | Update the importer to use the places service
| Python | apache-2.0 | ManchesterIO/mollyproject-next,ManchesterIO/mollyproject-next,ManchesterIO/mollyproject-next | from datetime import timedelta
import httplib
from tempfile import TemporaryFile
from zipfile import ZipFile
from celery.schedules import schedule
from molly.apps.places.parsers.naptan import NaptanParser
class NaptanImporter(object):
IMPORTER_NAME = 'naptan'
IMPORT_SCHEDULE = schedule(run_every=timedelta(w... | from datetime import timedelta
import httplib
from tempfile import TemporaryFile
from zipfile import ZipFile
from celery.schedules import schedule
from molly.apps.places.parsers.naptan import NaptanParser
class NaptanImporter(object):
IMPORTER_NAME = 'naptan'
IMPORT_SCHEDULE = schedule(run_every=timedelta(w... | <commit_before>from datetime import timedelta
import httplib
from tempfile import TemporaryFile
from zipfile import ZipFile
from celery.schedules import schedule
from molly.apps.places.parsers.naptan import NaptanParser
class NaptanImporter(object):
IMPORTER_NAME = 'naptan'
IMPORT_SCHEDULE = schedule(run_ev... | from datetime import timedelta
import httplib
from tempfile import TemporaryFile
from zipfile import ZipFile
from celery.schedules import schedule
from molly.apps.places.parsers.naptan import NaptanParser
class NaptanImporter(object):
IMPORTER_NAME = 'naptan'
IMPORT_SCHEDULE = schedule(run_every=timedelta(w... | from datetime import timedelta
import httplib
from tempfile import TemporaryFile
from zipfile import ZipFile
from celery.schedules import schedule
from molly.apps.places.parsers.naptan import NaptanParser
class NaptanImporter(object):
IMPORTER_NAME = 'naptan'
IMPORT_SCHEDULE = schedule(run_every=timedelta(w... | <commit_before>from datetime import timedelta
import httplib
from tempfile import TemporaryFile
from zipfile import ZipFile
from celery.schedules import schedule
from molly.apps.places.parsers.naptan import NaptanParser
class NaptanImporter(object):
IMPORTER_NAME = 'naptan'
IMPORT_SCHEDULE = schedule(run_ev... |
ff0da634e1fa0f8b190a3ba2cac3a03f7df75f91 | memegen/test/test_routes__common.py | memegen/test/test_routes__common.py | # pylint: disable=unused-variable
from unittest.mock import patch, Mock
from memegen.app import create_app
from memegen.settings import get_config
from memegen.routes._common import display
def describe_display():
app = create_app(get_config('test'))
app.config['GOOGLE_ANALYTICS_TID'] = 'my_tid'
reque... | # pylint: disable=unused-variable,expression-not-assigned
from unittest.mock import patch, call, Mock
import pytest
from expecter import expect
from memegen.app import create_app
from memegen.settings import get_config
from memegen.routes._common import display
def describe_display():
@pytest.fixture
def ... | Test that a request defaults to sending an image | Test that a request defaults to sending an image
| Python | mit | joshfriend/memegen,joshfriend/memegen,DanLindeman/memegen,DanLindeman/memegen,DanLindeman/memegen,DanLindeman/memegen,joshfriend/memegen,joshfriend/memegen | # pylint: disable=unused-variable
from unittest.mock import patch, Mock
from memegen.app import create_app
from memegen.settings import get_config
from memegen.routes._common import display
def describe_display():
app = create_app(get_config('test'))
app.config['GOOGLE_ANALYTICS_TID'] = 'my_tid'
reque... | # pylint: disable=unused-variable,expression-not-assigned
from unittest.mock import patch, call, Mock
import pytest
from expecter import expect
from memegen.app import create_app
from memegen.settings import get_config
from memegen.routes._common import display
def describe_display():
@pytest.fixture
def ... | <commit_before># pylint: disable=unused-variable
from unittest.mock import patch, Mock
from memegen.app import create_app
from memegen.settings import get_config
from memegen.routes._common import display
def describe_display():
app = create_app(get_config('test'))
app.config['GOOGLE_ANALYTICS_TID'] = 'my_... | # pylint: disable=unused-variable,expression-not-assigned
from unittest.mock import patch, call, Mock
import pytest
from expecter import expect
from memegen.app import create_app
from memegen.settings import get_config
from memegen.routes._common import display
def describe_display():
@pytest.fixture
def ... | # pylint: disable=unused-variable
from unittest.mock import patch, Mock
from memegen.app import create_app
from memegen.settings import get_config
from memegen.routes._common import display
def describe_display():
app = create_app(get_config('test'))
app.config['GOOGLE_ANALYTICS_TID'] = 'my_tid'
reque... | <commit_before># pylint: disable=unused-variable
from unittest.mock import patch, Mock
from memegen.app import create_app
from memegen.settings import get_config
from memegen.routes._common import display
def describe_display():
app = create_app(get_config('test'))
app.config['GOOGLE_ANALYTICS_TID'] = 'my_... |
ccf60e9e79b8b2db8cbf7918caf23314e8790134 | lib/reporter.py | lib/reporter.py | #!/usr/bin/python
import sys
import os
name = sys.argv[1]
status = sys.stdin.readline()
status = status.rstrip(os.linesep)
print("<%s>" % name)
print("\t<status=\"%s\" />" % status)
if status != "SKIP":
print("\t<outcome>")
for line in sys.stdin:
# Escaping, ... !
print(line.rstrip(os.linesep))
p... | #!/usr/bin/python
import sys
import os
name = sys.argv[1]
status = sys.stdin.readline()
status = status.rstrip(os.linesep)
print("<%s status=\"%s\">" % (name, status))
print("\t<outcome>")
for line in sys.stdin:
# Escaping, ... !
print(line.rstrip(os.linesep))
print("\t</outcome>")
print("</%s>" % name)
| Fix the XML format produced | Fix the XML format produced
| Python | apache-2.0 | CESNET/secant,CESNET/secant | #!/usr/bin/python
import sys
import os
name = sys.argv[1]
status = sys.stdin.readline()
status = status.rstrip(os.linesep)
print("<%s>" % name)
print("\t<status=\"%s\" />" % status)
if status != "SKIP":
print("\t<outcome>")
for line in sys.stdin:
# Escaping, ... !
print(line.rstrip(os.linesep))
p... | #!/usr/bin/python
import sys
import os
name = sys.argv[1]
status = sys.stdin.readline()
status = status.rstrip(os.linesep)
print("<%s status=\"%s\">" % (name, status))
print("\t<outcome>")
for line in sys.stdin:
# Escaping, ... !
print(line.rstrip(os.linesep))
print("\t</outcome>")
print("</%s>" % name)
| <commit_before>#!/usr/bin/python
import sys
import os
name = sys.argv[1]
status = sys.stdin.readline()
status = status.rstrip(os.linesep)
print("<%s>" % name)
print("\t<status=\"%s\" />" % status)
if status != "SKIP":
print("\t<outcome>")
for line in sys.stdin:
# Escaping, ... !
print(line.rstrip(o... | #!/usr/bin/python
import sys
import os
name = sys.argv[1]
status = sys.stdin.readline()
status = status.rstrip(os.linesep)
print("<%s status=\"%s\">" % (name, status))
print("\t<outcome>")
for line in sys.stdin:
# Escaping, ... !
print(line.rstrip(os.linesep))
print("\t</outcome>")
print("</%s>" % name)
| #!/usr/bin/python
import sys
import os
name = sys.argv[1]
status = sys.stdin.readline()
status = status.rstrip(os.linesep)
print("<%s>" % name)
print("\t<status=\"%s\" />" % status)
if status != "SKIP":
print("\t<outcome>")
for line in sys.stdin:
# Escaping, ... !
print(line.rstrip(os.linesep))
p... | <commit_before>#!/usr/bin/python
import sys
import os
name = sys.argv[1]
status = sys.stdin.readline()
status = status.rstrip(os.linesep)
print("<%s>" % name)
print("\t<status=\"%s\" />" % status)
if status != "SKIP":
print("\t<outcome>")
for line in sys.stdin:
# Escaping, ... !
print(line.rstrip(o... |
d2bac1fe8dc6d90d0d680a97aec0646ad9674bae | qrl/core/ntp.py | qrl/core/ntp.py | # coding=utf-8
# Distributed under the MIT software license, see the accompanying
# file LICENSE or http://www.opensource.org/licenses/mit-license.php.
import sys
from time import time
from ntplib import NTPClient
from qrl.core import logger
ntp_server = 'pool.ntp.org'
version = 3
times = 5
drift = None
def get_n... | # coding=utf-8
# Distributed under the MIT software license, see the accompanying
# file LICENSE or http://www.opensource.org/licenses/mit-license.php.
import sys
from time import time
from ntplib import NTPClient
from qrl.core import logger
ntp_servers = ['pool.ntp.org', 'ntp.ubuntu.com']
NTP_VERSION = 3
NTP_RETRI... | Support multiple servers and retries | Support multiple servers and retries
| Python | mit | jleni/QRL,elliottdehn/QRL,randomshinichi/QRL,elliottdehn/QRL,theQRL/QRL,theQRL/QRL,cyyber/QRL,randomshinichi/QRL,jleni/QRL,cyyber/QRL,elliottdehn/QRL,elliottdehn/QRL | # coding=utf-8
# Distributed under the MIT software license, see the accompanying
# file LICENSE or http://www.opensource.org/licenses/mit-license.php.
import sys
from time import time
from ntplib import NTPClient
from qrl.core import logger
ntp_server = 'pool.ntp.org'
version = 3
times = 5
drift = None
def get_n... | # coding=utf-8
# Distributed under the MIT software license, see the accompanying
# file LICENSE or http://www.opensource.org/licenses/mit-license.php.
import sys
from time import time
from ntplib import NTPClient
from qrl.core import logger
ntp_servers = ['pool.ntp.org', 'ntp.ubuntu.com']
NTP_VERSION = 3
NTP_RETRI... | <commit_before># coding=utf-8
# Distributed under the MIT software license, see the accompanying
# file LICENSE or http://www.opensource.org/licenses/mit-license.php.
import sys
from time import time
from ntplib import NTPClient
from qrl.core import logger
ntp_server = 'pool.ntp.org'
version = 3
times = 5
drift = N... | # coding=utf-8
# Distributed under the MIT software license, see the accompanying
# file LICENSE or http://www.opensource.org/licenses/mit-license.php.
import sys
from time import time
from ntplib import NTPClient
from qrl.core import logger
ntp_servers = ['pool.ntp.org', 'ntp.ubuntu.com']
NTP_VERSION = 3
NTP_RETRI... | # coding=utf-8
# Distributed under the MIT software license, see the accompanying
# file LICENSE or http://www.opensource.org/licenses/mit-license.php.
import sys
from time import time
from ntplib import NTPClient
from qrl.core import logger
ntp_server = 'pool.ntp.org'
version = 3
times = 5
drift = None
def get_n... | <commit_before># coding=utf-8
# Distributed under the MIT software license, see the accompanying
# file LICENSE or http://www.opensource.org/licenses/mit-license.php.
import sys
from time import time
from ntplib import NTPClient
from qrl.core import logger
ntp_server = 'pool.ntp.org'
version = 3
times = 5
drift = N... |
83ed5ca9bc388dbe9b2d82510842a99b3a2e5ce7 | src/personalisation/middleware.py | src/personalisation/middleware.py | from personalisation.models import AbstractBaseRule, Segment
class SegmentMiddleware(object):
"""Middleware for testing and putting a user in a segment"""
def __init__(self, get_response=None):
self.get_response = get_response
def __call__(self, request):
segments = Segment.objects.all()... | from personalisation.models import AbstractBaseRule, Segment
class SegmentMiddleware(object):
"""Middleware for testing and putting a user in a segment"""
def __init__(self, get_response=None):
self.get_response = get_response
def __call__(self, request):
segments = Segment.objects.all()... | Create empty 'segments' object in session if none exists | Create empty 'segments' object in session if none exists
| Python | mit | LabD/wagtail-personalisation,LabD/wagtail-personalisation,LabD/wagtail-personalisation | from personalisation.models import AbstractBaseRule, Segment
class SegmentMiddleware(object):
"""Middleware for testing and putting a user in a segment"""
def __init__(self, get_response=None):
self.get_response = get_response
def __call__(self, request):
segments = Segment.objects.all()... | from personalisation.models import AbstractBaseRule, Segment
class SegmentMiddleware(object):
"""Middleware for testing and putting a user in a segment"""
def __init__(self, get_response=None):
self.get_response = get_response
def __call__(self, request):
segments = Segment.objects.all()... | <commit_before>from personalisation.models import AbstractBaseRule, Segment
class SegmentMiddleware(object):
"""Middleware for testing and putting a user in a segment"""
def __init__(self, get_response=None):
self.get_response = get_response
def __call__(self, request):
segments = Segmen... | from personalisation.models import AbstractBaseRule, Segment
class SegmentMiddleware(object):
"""Middleware for testing and putting a user in a segment"""
def __init__(self, get_response=None):
self.get_response = get_response
def __call__(self, request):
segments = Segment.objects.all()... | from personalisation.models import AbstractBaseRule, Segment
class SegmentMiddleware(object):
"""Middleware for testing and putting a user in a segment"""
def __init__(self, get_response=None):
self.get_response = get_response
def __call__(self, request):
segments = Segment.objects.all()... | <commit_before>from personalisation.models import AbstractBaseRule, Segment
class SegmentMiddleware(object):
"""Middleware for testing and putting a user in a segment"""
def __init__(self, get_response=None):
self.get_response = get_response
def __call__(self, request):
segments = Segmen... |
c0e98c14813c966ecd9e6b47395cb336a244f090 | discussion/forms.py | discussion/forms.py | from django import forms
from discussion.models import Comment, Post, Discussion
from notification.models import NoticeSetting
class CommentForm(forms.ModelForm):
class Meta:
exclude = ('user', 'post')
model = Comment
widgets = {
'body': forms.Textarea(attrs={'placeholder': 'R... | from django import forms
from django.utils.translation import ugettext_lazy as _
from discussion.models import Comment, Post, Discussion
from notification.models import NoticeSetting
class CommentForm(forms.ModelForm):
class Meta:
exclude = ('user', 'post')
model = Comment
widgets = {
... | Make the odd string translatable. | Make the odd string translatable.
| Python | bsd-2-clause | incuna/django-discussion,lehins/lehins-discussion,lehins/lehins-discussion,incuna/django-discussion,lehins/lehins-discussion | from django import forms
from discussion.models import Comment, Post, Discussion
from notification.models import NoticeSetting
class CommentForm(forms.ModelForm):
class Meta:
exclude = ('user', 'post')
model = Comment
widgets = {
'body': forms.Textarea(attrs={'placeholder': 'R... | from django import forms
from django.utils.translation import ugettext_lazy as _
from discussion.models import Comment, Post, Discussion
from notification.models import NoticeSetting
class CommentForm(forms.ModelForm):
class Meta:
exclude = ('user', 'post')
model = Comment
widgets = {
... | <commit_before>from django import forms
from discussion.models import Comment, Post, Discussion
from notification.models import NoticeSetting
class CommentForm(forms.ModelForm):
class Meta:
exclude = ('user', 'post')
model = Comment
widgets = {
'body': forms.Textarea(attrs={'p... | from django import forms
from django.utils.translation import ugettext_lazy as _
from discussion.models import Comment, Post, Discussion
from notification.models import NoticeSetting
class CommentForm(forms.ModelForm):
class Meta:
exclude = ('user', 'post')
model = Comment
widgets = {
... | from django import forms
from discussion.models import Comment, Post, Discussion
from notification.models import NoticeSetting
class CommentForm(forms.ModelForm):
class Meta:
exclude = ('user', 'post')
model = Comment
widgets = {
'body': forms.Textarea(attrs={'placeholder': 'R... | <commit_before>from django import forms
from discussion.models import Comment, Post, Discussion
from notification.models import NoticeSetting
class CommentForm(forms.ModelForm):
class Meta:
exclude = ('user', 'post')
model = Comment
widgets = {
'body': forms.Textarea(attrs={'p... |
18e310680f7dfd8f5a5186baf37cab9968f19012 | django_base/urls.py | django_base/urls.py | from django.conf.urls import patterns, include, url
from django.contrib import admin
admin.autodiscover()
urlpatterns = patterns('',
url(r'^admin/doc/', include('django.contrib.admindocs.urls')),
url(r'^admin/', include(admin.site.urls)),
)
| from django.conf.urls import patterns, include, url
from django.contrib import admin
admin.autodiscover()
urlpatterns = patterns('',
url(r'^admin/', include(admin.site.urls)),
)
| Remove admin docs by default since they are never used. | Remove admin docs by default since they are never used. | Python | bsd-3-clause | SheepDogInc/django-base,SheepDogInc/django-base | from django.conf.urls import patterns, include, url
from django.contrib import admin
admin.autodiscover()
urlpatterns = patterns('',
url(r'^admin/doc/', include('django.contrib.admindocs.urls')),
url(r'^admin/', include(admin.site.urls)),
)
Remove admin docs by default since they are never used. | from django.conf.urls import patterns, include, url
from django.contrib import admin
admin.autodiscover()
urlpatterns = patterns('',
url(r'^admin/', include(admin.site.urls)),
)
| <commit_before>from django.conf.urls import patterns, include, url
from django.contrib import admin
admin.autodiscover()
urlpatterns = patterns('',
url(r'^admin/doc/', include('django.contrib.admindocs.urls')),
url(r'^admin/', include(admin.site.urls)),
)
<commit_msg>Remove admin docs by default since they ar... | from django.conf.urls import patterns, include, url
from django.contrib import admin
admin.autodiscover()
urlpatterns = patterns('',
url(r'^admin/', include(admin.site.urls)),
)
| from django.conf.urls import patterns, include, url
from django.contrib import admin
admin.autodiscover()
urlpatterns = patterns('',
url(r'^admin/doc/', include('django.contrib.admindocs.urls')),
url(r'^admin/', include(admin.site.urls)),
)
Remove admin docs by default since they are never used.from django.co... | <commit_before>from django.conf.urls import patterns, include, url
from django.contrib import admin
admin.autodiscover()
urlpatterns = patterns('',
url(r'^admin/doc/', include('django.contrib.admindocs.urls')),
url(r'^admin/', include(admin.site.urls)),
)
<commit_msg>Remove admin docs by default since they ar... |
d6601b9d7bdbf81d89f3d165f11845384d09797c | dsub/_dsub_version.py | dsub/_dsub_version.py | # Copyright 2017 Google Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or a... | # Copyright 2017 Google Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or a... | Update dsub version to 0.4.2 | Update dsub version to 0.4.2
PiperOrigin-RevId: 337172014
| Python | apache-2.0 | DataBiosphere/dsub,DataBiosphere/dsub | # Copyright 2017 Google Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or a... | # Copyright 2017 Google Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or a... | <commit_before># Copyright 2017 Google Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by appl... | # Copyright 2017 Google Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or a... | # Copyright 2017 Google Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or a... | <commit_before># Copyright 2017 Google Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by appl... |
24045cd16a862ebd31f4a88a733a05bf2aff03a5 | easygeoip/urls_api.py | easygeoip/urls_api.py | from django.conf.urls import patterns, url
# API URLs
from .views import LocationFromIpView
urlpatterns = patterns('',
url(r'^location/(?P<ip_address>(\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}))/$', LocationFromIpView.as_view(),
name='geoip-explicit-ip-view'),
url(r'^location/$', LocationFromIpView.as_view()... | from django.conf.urls import url
# API URLs
from .views import LocationFromIpView
urlpatterns = [
url(r'^location/(?P<ip_address>(\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}))/$', LocationFromIpView.as_view(),
name='geoip-explicit-ip-view'),
url(r'^location/$', LocationFromIpView.as_view(), name='geoip-implici... | Upgrade to new urlpatterns format | Upgrade to new urlpatterns format | Python | mit | lambdacomplete/django-easygeoip | from django.conf.urls import patterns, url
# API URLs
from .views import LocationFromIpView
urlpatterns = patterns('',
url(r'^location/(?P<ip_address>(\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}))/$', LocationFromIpView.as_view(),
name='geoip-explicit-ip-view'),
url(r'^location/$', LocationFromIpView.as_view()... | from django.conf.urls import url
# API URLs
from .views import LocationFromIpView
urlpatterns = [
url(r'^location/(?P<ip_address>(\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}))/$', LocationFromIpView.as_view(),
name='geoip-explicit-ip-view'),
url(r'^location/$', LocationFromIpView.as_view(), name='geoip-implici... | <commit_before>from django.conf.urls import patterns, url
# API URLs
from .views import LocationFromIpView
urlpatterns = patterns('',
url(r'^location/(?P<ip_address>(\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}))/$', LocationFromIpView.as_view(),
name='geoip-explicit-ip-view'),
url(r'^location/$', LocationFromI... | from django.conf.urls import url
# API URLs
from .views import LocationFromIpView
urlpatterns = [
url(r'^location/(?P<ip_address>(\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}))/$', LocationFromIpView.as_view(),
name='geoip-explicit-ip-view'),
url(r'^location/$', LocationFromIpView.as_view(), name='geoip-implici... | from django.conf.urls import patterns, url
# API URLs
from .views import LocationFromIpView
urlpatterns = patterns('',
url(r'^location/(?P<ip_address>(\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}))/$', LocationFromIpView.as_view(),
name='geoip-explicit-ip-view'),
url(r'^location/$', LocationFromIpView.as_view()... | <commit_before>from django.conf.urls import patterns, url
# API URLs
from .views import LocationFromIpView
urlpatterns = patterns('',
url(r'^location/(?P<ip_address>(\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}))/$', LocationFromIpView.as_view(),
name='geoip-explicit-ip-view'),
url(r'^location/$', LocationFromI... |
cb4973909ea662abdf718e5a831806dcb0ecc821 | 14B-088/HI/HI_correct_mask_model.py | 14B-088/HI/HI_correct_mask_model.py |
'''
Swap the spatial axes. Swap the spectral and stokes axes.
'''
import sys
from astropy.io import fits
hdu = fits.open(sys.argv[1], mode='update')
hdu[0].data = hdu[0].data.swapaxes(0, 1)
hdu[0].data = hdu[0].data[:, :, :, ::-1]
hdu[0].data = hdu[0].data[:, :, ::-1, :]
hdu.flush()
execfile("~/Dropbox/code_dev... |
'''
\Swap the spectral and stokes axes. Needed due to issue in regridding function
'''
import sys
from astropy.io import fits
hdu = fits.open(sys.argv[1], mode='update')
hdu[0].data = hdu[0].data.swapaxes(0, 1)
execfile("/home/eric/Dropbox/code_development/ewky_scripts/header_swap_axis.py")
hdu[0].header = heade... | Update what's needed to correct mask and model | Update what's needed to correct mask and model
| Python | mit | e-koch/VLA_Lband,e-koch/VLA_Lband |
'''
Swap the spatial axes. Swap the spectral and stokes axes.
'''
import sys
from astropy.io import fits
hdu = fits.open(sys.argv[1], mode='update')
hdu[0].data = hdu[0].data.swapaxes(0, 1)
hdu[0].data = hdu[0].data[:, :, :, ::-1]
hdu[0].data = hdu[0].data[:, :, ::-1, :]
hdu.flush()
execfile("~/Dropbox/code_dev... |
'''
\Swap the spectral and stokes axes. Needed due to issue in regridding function
'''
import sys
from astropy.io import fits
hdu = fits.open(sys.argv[1], mode='update')
hdu[0].data = hdu[0].data.swapaxes(0, 1)
execfile("/home/eric/Dropbox/code_development/ewky_scripts/header_swap_axis.py")
hdu[0].header = heade... | <commit_before>
'''
Swap the spatial axes. Swap the spectral and stokes axes.
'''
import sys
from astropy.io import fits
hdu = fits.open(sys.argv[1], mode='update')
hdu[0].data = hdu[0].data.swapaxes(0, 1)
hdu[0].data = hdu[0].data[:, :, :, ::-1]
hdu[0].data = hdu[0].data[:, :, ::-1, :]
hdu.flush()
execfile("~/D... |
'''
\Swap the spectral and stokes axes. Needed due to issue in regridding function
'''
import sys
from astropy.io import fits
hdu = fits.open(sys.argv[1], mode='update')
hdu[0].data = hdu[0].data.swapaxes(0, 1)
execfile("/home/eric/Dropbox/code_development/ewky_scripts/header_swap_axis.py")
hdu[0].header = heade... |
'''
Swap the spatial axes. Swap the spectral and stokes axes.
'''
import sys
from astropy.io import fits
hdu = fits.open(sys.argv[1], mode='update')
hdu[0].data = hdu[0].data.swapaxes(0, 1)
hdu[0].data = hdu[0].data[:, :, :, ::-1]
hdu[0].data = hdu[0].data[:, :, ::-1, :]
hdu.flush()
execfile("~/Dropbox/code_dev... | <commit_before>
'''
Swap the spatial axes. Swap the spectral and stokes axes.
'''
import sys
from astropy.io import fits
hdu = fits.open(sys.argv[1], mode='update')
hdu[0].data = hdu[0].data.swapaxes(0, 1)
hdu[0].data = hdu[0].data[:, :, :, ::-1]
hdu[0].data = hdu[0].data[:, :, ::-1, :]
hdu.flush()
execfile("~/D... |
f16add1160e5a76f94be30ea54cea27045c32705 | tests/test_blacklist.py | tests/test_blacklist.py | import unittest
import config
from .. import ntokloapi
class BlacklistTest(unittest.TestCase):
def setUp(self):
self.blacklist = ntokloapi.Blacklist(config.TEST_KEY, config.TEST_SECRET)
def test_blacklist_add_singleitem(self):
response = self.blacklist.add(productid=['10201', ])
as... | import unittest
import config
import ntokloapi
class BlacklistTest(unittest.TestCase):
def setUp(self):
self.blacklist = ntokloapi.Blacklist(config.TEST_KEY, config.TEST_SECRET)
def test_blacklist_add_singleitem(self):
response = self.blacklist.add(productid=['10201', ])
assert res... | Fix unit tests for the blacklist | Fix unit tests for the blacklist
| Python | apache-2.0 | nToklo/ntokloapi-python | import unittest
import config
from .. import ntokloapi
class BlacklistTest(unittest.TestCase):
def setUp(self):
self.blacklist = ntokloapi.Blacklist(config.TEST_KEY, config.TEST_SECRET)
def test_blacklist_add_singleitem(self):
response = self.blacklist.add(productid=['10201', ])
as... | import unittest
import config
import ntokloapi
class BlacklistTest(unittest.TestCase):
def setUp(self):
self.blacklist = ntokloapi.Blacklist(config.TEST_KEY, config.TEST_SECRET)
def test_blacklist_add_singleitem(self):
response = self.blacklist.add(productid=['10201', ])
assert res... | <commit_before>import unittest
import config
from .. import ntokloapi
class BlacklistTest(unittest.TestCase):
def setUp(self):
self.blacklist = ntokloapi.Blacklist(config.TEST_KEY, config.TEST_SECRET)
def test_blacklist_add_singleitem(self):
response = self.blacklist.add(productid=['10201'... | import unittest
import config
import ntokloapi
class BlacklistTest(unittest.TestCase):
def setUp(self):
self.blacklist = ntokloapi.Blacklist(config.TEST_KEY, config.TEST_SECRET)
def test_blacklist_add_singleitem(self):
response = self.blacklist.add(productid=['10201', ])
assert res... | import unittest
import config
from .. import ntokloapi
class BlacklistTest(unittest.TestCase):
def setUp(self):
self.blacklist = ntokloapi.Blacklist(config.TEST_KEY, config.TEST_SECRET)
def test_blacklist_add_singleitem(self):
response = self.blacklist.add(productid=['10201', ])
as... | <commit_before>import unittest
import config
from .. import ntokloapi
class BlacklistTest(unittest.TestCase):
def setUp(self):
self.blacklist = ntokloapi.Blacklist(config.TEST_KEY, config.TEST_SECRET)
def test_blacklist_add_singleitem(self):
response = self.blacklist.add(productid=['10201'... |
f8f0335a1a790b1ef8163a2be968b29769be80a2 | arim/models.py | arim/models.py | from django.db import models
class Lease(models.Model):
class Meta:
db_table = 'autoreg'
mac = models.CharField(max_length=17, db_index=True)
ip = models.IntegerField(primary_key=True)
date = models.IntegerField()
| from django.db import models
from ipaddr import IPv4Address
class Lease(models.Model):
class Meta:
db_table = 'autoreg'
mac = models.CharField(max_length=17, db_index=True)
ip = models.IntegerField(primary_key=True)
date = models.IntegerField()
def __str__(self):
return unicode(s... | Add __str__, __unicode__, and __repr__ | Add __str__, __unicode__, and __repr__
| Python | bsd-3-clause | drkitty/arim,OSU-Net/arim,OSU-Net/arim,drkitty/arim,drkitty/arim,OSU-Net/arim | from django.db import models
class Lease(models.Model):
class Meta:
db_table = 'autoreg'
mac = models.CharField(max_length=17, db_index=True)
ip = models.IntegerField(primary_key=True)
date = models.IntegerField()
Add __str__, __unicode__, and __repr__ | from django.db import models
from ipaddr import IPv4Address
class Lease(models.Model):
class Meta:
db_table = 'autoreg'
mac = models.CharField(max_length=17, db_index=True)
ip = models.IntegerField(primary_key=True)
date = models.IntegerField()
def __str__(self):
return unicode(s... | <commit_before>from django.db import models
class Lease(models.Model):
class Meta:
db_table = 'autoreg'
mac = models.CharField(max_length=17, db_index=True)
ip = models.IntegerField(primary_key=True)
date = models.IntegerField()
<commit_msg>Add __str__, __unicode__, and __repr__<commit_after> | from django.db import models
from ipaddr import IPv4Address
class Lease(models.Model):
class Meta:
db_table = 'autoreg'
mac = models.CharField(max_length=17, db_index=True)
ip = models.IntegerField(primary_key=True)
date = models.IntegerField()
def __str__(self):
return unicode(s... | from django.db import models
class Lease(models.Model):
class Meta:
db_table = 'autoreg'
mac = models.CharField(max_length=17, db_index=True)
ip = models.IntegerField(primary_key=True)
date = models.IntegerField()
Add __str__, __unicode__, and __repr__from django.db import models
from ipaddr ... | <commit_before>from django.db import models
class Lease(models.Model):
class Meta:
db_table = 'autoreg'
mac = models.CharField(max_length=17, db_index=True)
ip = models.IntegerField(primary_key=True)
date = models.IntegerField()
<commit_msg>Add __str__, __unicode__, and __repr__<commit_after>... |
f21ae3ffb99c5b90cb329317b2c6282e4992f6cc | safety/utils.py | safety/utils.py | # -*- coding: utf-8 -*-
import importlib
import re
import warnings
from django.conf import settings
from django.utils.translation import ugettext_lazy as _, ugettext
BROWSERS = (
(re.compile('Chrome'), _('Chrome')),
(re.compile('Safari'), _('Safari')),
(re.compile('Firefox'), _('Firefox')),
(re.compi... | # -*- coding: utf-8 -*-
try:
from django.utils.importlib import import_module
except ImportError:
from importlib import import_module
from django.conf import settings
from django.core.exceptions import ImproperlyConfigured
def get_session_store():
mod = getattr(settings, 'SESSION_ENGINE', 'django.contrib... | Add get_resolver() util and remove get_device() (now use ua-parser). | Add get_resolver() util and remove get_device() (now use ua-parser).
| Python | mit | ulule/django-safety,ulule/django-safety | # -*- coding: utf-8 -*-
import importlib
import re
import warnings
from django.conf import settings
from django.utils.translation import ugettext_lazy as _, ugettext
BROWSERS = (
(re.compile('Chrome'), _('Chrome')),
(re.compile('Safari'), _('Safari')),
(re.compile('Firefox'), _('Firefox')),
(re.compi... | # -*- coding: utf-8 -*-
try:
from django.utils.importlib import import_module
except ImportError:
from importlib import import_module
from django.conf import settings
from django.core.exceptions import ImproperlyConfigured
def get_session_store():
mod = getattr(settings, 'SESSION_ENGINE', 'django.contrib... | <commit_before># -*- coding: utf-8 -*-
import importlib
import re
import warnings
from django.conf import settings
from django.utils.translation import ugettext_lazy as _, ugettext
BROWSERS = (
(re.compile('Chrome'), _('Chrome')),
(re.compile('Safari'), _('Safari')),
(re.compile('Firefox'), _('Firefox'))... | # -*- coding: utf-8 -*-
try:
from django.utils.importlib import import_module
except ImportError:
from importlib import import_module
from django.conf import settings
from django.core.exceptions import ImproperlyConfigured
def get_session_store():
mod = getattr(settings, 'SESSION_ENGINE', 'django.contrib... | # -*- coding: utf-8 -*-
import importlib
import re
import warnings
from django.conf import settings
from django.utils.translation import ugettext_lazy as _, ugettext
BROWSERS = (
(re.compile('Chrome'), _('Chrome')),
(re.compile('Safari'), _('Safari')),
(re.compile('Firefox'), _('Firefox')),
(re.compi... | <commit_before># -*- coding: utf-8 -*-
import importlib
import re
import warnings
from django.conf import settings
from django.utils.translation import ugettext_lazy as _, ugettext
BROWSERS = (
(re.compile('Chrome'), _('Chrome')),
(re.compile('Safari'), _('Safari')),
(re.compile('Firefox'), _('Firefox'))... |
eda91552ae26188afbad74115495e44e07827c4d | typ/version.py | typ/version.py | # Copyright 2014 Google Inc. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or ag... | # Copyright 2014 Google Inc. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or ag... | Add a -vvv mode to log when tests are queued for running. | Add a -vvv mode to log when tests are queued for running.
If one is running a bunch of tests in parallel and something
is not working right, it can be useful to see which tests are
currently executing at the same time. There isn't a great way
to do this in typ, because we don't know when tests are actually
picked up f... | Python | apache-2.0 | dpranke/typ | # Copyright 2014 Google Inc. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or ag... | # Copyright 2014 Google Inc. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or ag... | <commit_before># Copyright 2014 Google Inc. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by appli... | # Copyright 2014 Google Inc. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or ag... | # Copyright 2014 Google Inc. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or ag... | <commit_before># Copyright 2014 Google Inc. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by appli... |
8b374d041d97307962cdf562c52b2a72345a4efc | snowman/urls.py | snowman/urls.py | """snowman URL Configuration
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/1.10/topics/http/urls/
Examples:
Function views
1. Add an import: from my_app import views
2. Add a URL to urlpatterns: url(r'^$', views.home, name='home')
Class-ba... | """snowman URL Configuration
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/1.10/topics/http/urls/
Examples:
Function views
1. Add an import: from my_app import views
2. Add a URL to urlpatterns: url(r'^$', views.home, name='home')
Class-ba... | Add simple login form in the API. | Add simple login form in the API.
This is usefull for developers to explore the Browlable api directly
on the browser.
| Python | mit | johnnywell/snowman | """snowman URL Configuration
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/1.10/topics/http/urls/
Examples:
Function views
1. Add an import: from my_app import views
2. Add a URL to urlpatterns: url(r'^$', views.home, name='home')
Class-ba... | """snowman URL Configuration
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/1.10/topics/http/urls/
Examples:
Function views
1. Add an import: from my_app import views
2. Add a URL to urlpatterns: url(r'^$', views.home, name='home')
Class-ba... | <commit_before>"""snowman URL Configuration
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/1.10/topics/http/urls/
Examples:
Function views
1. Add an import: from my_app import views
2. Add a URL to urlpatterns: url(r'^$', views.home, name='... | """snowman URL Configuration
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/1.10/topics/http/urls/
Examples:
Function views
1. Add an import: from my_app import views
2. Add a URL to urlpatterns: url(r'^$', views.home, name='home')
Class-ba... | """snowman URL Configuration
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/1.10/topics/http/urls/
Examples:
Function views
1. Add an import: from my_app import views
2. Add a URL to urlpatterns: url(r'^$', views.home, name='home')
Class-ba... | <commit_before>"""snowman URL Configuration
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/1.10/topics/http/urls/
Examples:
Function views
1. Add an import: from my_app import views
2. Add a URL to urlpatterns: url(r'^$', views.home, name='... |
0d5946f0c61bcb629d8a1bbacf09bcc5719986fc | textRenderer.py | textRenderer.py | import colorsys
from PIL import Image, ImageFont, ImageDraw
class TextRenderer:
def __init__(self, font="./NotoSansCJK-Bold.otf",
font_color=(0, 120, 0), color_bg=False):
self.image = None
# params
self.color_bg = color_bg
self.font_color = font_color
# ... | from PIL import Image, ImageFont, ImageDraw
class TextRenderer:
def __init__(self, font="./NotoSansCJK-Bold.otf",
font_color=(0, 120, 0), color_bg=False):
# params
self.color_bg = color_bg
self.font_color = font_color
# new image and font
self.font = Imag... | Remove all unused code in text renderer. | Remove all unused code in text renderer.
| Python | mit | marqsm/LED-bot,marqsm/LED-bot,marqsm/LED-bot,marqsm/LED-bot | import colorsys
from PIL import Image, ImageFont, ImageDraw
class TextRenderer:
def __init__(self, font="./NotoSansCJK-Bold.otf",
font_color=(0, 120, 0), color_bg=False):
self.image = None
# params
self.color_bg = color_bg
self.font_color = font_color
# ... | from PIL import Image, ImageFont, ImageDraw
class TextRenderer:
def __init__(self, font="./NotoSansCJK-Bold.otf",
font_color=(0, 120, 0), color_bg=False):
# params
self.color_bg = color_bg
self.font_color = font_color
# new image and font
self.font = Imag... | <commit_before>import colorsys
from PIL import Image, ImageFont, ImageDraw
class TextRenderer:
def __init__(self, font="./NotoSansCJK-Bold.otf",
font_color=(0, 120, 0), color_bg=False):
self.image = None
# params
self.color_bg = color_bg
self.font_color = font_co... | from PIL import Image, ImageFont, ImageDraw
class TextRenderer:
def __init__(self, font="./NotoSansCJK-Bold.otf",
font_color=(0, 120, 0), color_bg=False):
# params
self.color_bg = color_bg
self.font_color = font_color
# new image and font
self.font = Imag... | import colorsys
from PIL import Image, ImageFont, ImageDraw
class TextRenderer:
def __init__(self, font="./NotoSansCJK-Bold.otf",
font_color=(0, 120, 0), color_bg=False):
self.image = None
# params
self.color_bg = color_bg
self.font_color = font_color
# ... | <commit_before>import colorsys
from PIL import Image, ImageFont, ImageDraw
class TextRenderer:
def __init__(self, font="./NotoSansCJK-Bold.otf",
font_color=(0, 120, 0), color_bg=False):
self.image = None
# params
self.color_bg = color_bg
self.font_color = font_co... |
edf38ad11631ad5e793eb9ac95dbc865595d517b | glue_vispy_viewers/common/layer_state.py | glue_vispy_viewers/common/layer_state.py | from __future__ import absolute_import, division, print_function
from glue.external.echo import CallbackProperty, keep_in_sync
from glue.core.state_objects import State
__all__ = ['VispyLayerState']
class VispyLayerState(State):
"""
A base state object for all Vispy layers
"""
layer = CallbackPrope... | from __future__ import absolute_import, division, print_function
from glue.external.echo import CallbackProperty, keep_in_sync
from glue.core.state_objects import State
from glue.core.message import LayerArtistUpdatedMessage
__all__ = ['VispyLayerState']
class VispyLayerState(State):
"""
A base state object... | Make sure layer artist icon updates when changing the color mode or colormaps | Make sure layer artist icon updates when changing the color mode or colormaps | Python | bsd-2-clause | glue-viz/glue-vispy-viewers,PennyQ/astro-vispy,astrofrog/glue-3d-viewer,glue-viz/glue-3d-viewer,astrofrog/glue-vispy-viewers | from __future__ import absolute_import, division, print_function
from glue.external.echo import CallbackProperty, keep_in_sync
from glue.core.state_objects import State
__all__ = ['VispyLayerState']
class VispyLayerState(State):
"""
A base state object for all Vispy layers
"""
layer = CallbackPrope... | from __future__ import absolute_import, division, print_function
from glue.external.echo import CallbackProperty, keep_in_sync
from glue.core.state_objects import State
from glue.core.message import LayerArtistUpdatedMessage
__all__ = ['VispyLayerState']
class VispyLayerState(State):
"""
A base state object... | <commit_before>from __future__ import absolute_import, division, print_function
from glue.external.echo import CallbackProperty, keep_in_sync
from glue.core.state_objects import State
__all__ = ['VispyLayerState']
class VispyLayerState(State):
"""
A base state object for all Vispy layers
"""
layer ... | from __future__ import absolute_import, division, print_function
from glue.external.echo import CallbackProperty, keep_in_sync
from glue.core.state_objects import State
from glue.core.message import LayerArtistUpdatedMessage
__all__ = ['VispyLayerState']
class VispyLayerState(State):
"""
A base state object... | from __future__ import absolute_import, division, print_function
from glue.external.echo import CallbackProperty, keep_in_sync
from glue.core.state_objects import State
__all__ = ['VispyLayerState']
class VispyLayerState(State):
"""
A base state object for all Vispy layers
"""
layer = CallbackPrope... | <commit_before>from __future__ import absolute_import, division, print_function
from glue.external.echo import CallbackProperty, keep_in_sync
from glue.core.state_objects import State
__all__ = ['VispyLayerState']
class VispyLayerState(State):
"""
A base state object for all Vispy layers
"""
layer ... |
818d6584164f04001bf0e75f62c526284521ce69 | demae/dest/s3_dest.py | demae/dest/s3_dest.py | import pandas as pd
import gzip
import boto3
import re
def default_key_map(key):
return re.sub('_input', '_output', key)
class S3Dest():
def __init__(self, key_map=default_key_map):
self.key_map = key_map
def skip_keys(self, bucket, source_prefix):
s3 = boto3.resource('s3')
obj... | import pandas as pd
import gzip
import boto3
import re
import io
def default_key_map(key):
return re.sub('_input', '_output', key)
class S3Dest():
def __init__(self, key_map=default_key_map):
self.key_map = key_map
def skip_keys(self, bucket, source_prefix):
s3 = boto3.resource('s3')
... | Use managed transfer for uploading | Use managed transfer for uploading
| Python | mit | uiureo/demae | import pandas as pd
import gzip
import boto3
import re
def default_key_map(key):
return re.sub('_input', '_output', key)
class S3Dest():
def __init__(self, key_map=default_key_map):
self.key_map = key_map
def skip_keys(self, bucket, source_prefix):
s3 = boto3.resource('s3')
obj... | import pandas as pd
import gzip
import boto3
import re
import io
def default_key_map(key):
return re.sub('_input', '_output', key)
class S3Dest():
def __init__(self, key_map=default_key_map):
self.key_map = key_map
def skip_keys(self, bucket, source_prefix):
s3 = boto3.resource('s3')
... | <commit_before>import pandas as pd
import gzip
import boto3
import re
def default_key_map(key):
return re.sub('_input', '_output', key)
class S3Dest():
def __init__(self, key_map=default_key_map):
self.key_map = key_map
def skip_keys(self, bucket, source_prefix):
s3 = boto3.resource('s... | import pandas as pd
import gzip
import boto3
import re
import io
def default_key_map(key):
return re.sub('_input', '_output', key)
class S3Dest():
def __init__(self, key_map=default_key_map):
self.key_map = key_map
def skip_keys(self, bucket, source_prefix):
s3 = boto3.resource('s3')
... | import pandas as pd
import gzip
import boto3
import re
def default_key_map(key):
return re.sub('_input', '_output', key)
class S3Dest():
def __init__(self, key_map=default_key_map):
self.key_map = key_map
def skip_keys(self, bucket, source_prefix):
s3 = boto3.resource('s3')
obj... | <commit_before>import pandas as pd
import gzip
import boto3
import re
def default_key_map(key):
return re.sub('_input', '_output', key)
class S3Dest():
def __init__(self, key_map=default_key_map):
self.key_map = key_map
def skip_keys(self, bucket, source_prefix):
s3 = boto3.resource('s... |
f6e18d142ac965221737205f65d66751ea02f168 | hack_plot/management/commands/parse_authlog.py | hack_plot/management/commands/parse_authlog.py | from django.core.management.base import BaseCommand, CommandError
from ...cron import parse_auth_log
class Command(BaseCommand):
def handle(self, *args, **options):
parse_auth_log()
| from django.conf import settings
from django.core.management.base import BaseCommand, CommandError
try:
import simplejson as json
except ImportError as e:
import json
from rest_framework.renderers import JSONRenderer
from unipath import Path
from ...api.serializers import HackLocationSerializer
from ...cron ... | Write hack locations to json after parsing log file | Write hack locations to json after parsing log file
| Python | mit | hellsgate1001/graphs,hellsgate1001/graphs,hellsgate1001/graphs | from django.core.management.base import BaseCommand, CommandError
from ...cron import parse_auth_log
class Command(BaseCommand):
def handle(self, *args, **options):
parse_auth_log()
Write hack locations to json after parsing log file | from django.conf import settings
from django.core.management.base import BaseCommand, CommandError
try:
import simplejson as json
except ImportError as e:
import json
from rest_framework.renderers import JSONRenderer
from unipath import Path
from ...api.serializers import HackLocationSerializer
from ...cron ... | <commit_before>from django.core.management.base import BaseCommand, CommandError
from ...cron import parse_auth_log
class Command(BaseCommand):
def handle(self, *args, **options):
parse_auth_log()
<commit_msg>Write hack locations to json after parsing log file<commit_after> | from django.conf import settings
from django.core.management.base import BaseCommand, CommandError
try:
import simplejson as json
except ImportError as e:
import json
from rest_framework.renderers import JSONRenderer
from unipath import Path
from ...api.serializers import HackLocationSerializer
from ...cron ... | from django.core.management.base import BaseCommand, CommandError
from ...cron import parse_auth_log
class Command(BaseCommand):
def handle(self, *args, **options):
parse_auth_log()
Write hack locations to json after parsing log filefrom django.conf import settings
from django.core.management.base import ... | <commit_before>from django.core.management.base import BaseCommand, CommandError
from ...cron import parse_auth_log
class Command(BaseCommand):
def handle(self, *args, **options):
parse_auth_log()
<commit_msg>Write hack locations to json after parsing log file<commit_after>from django.conf import settings... |
49069663a3fe3d44be9ab59e59a90d0dfcf49f0c | mayatools/qt.py | mayatools/qt.py |
try:
import sip
from uitools.qt import QtCore
import maya.OpenMayaUI as apiUI
# These modules will not exist while building the docs.
except ImportError:
import os
if os.environ.get('SPHINX') != 'True':
raise
def get_maya_window():
"""Get the main Maya window as a QtGui.QMainWindow."... |
try:
from uitools.sip import wrapinstance
from uitools.qt import QtCore
import maya.OpenMayaUI as apiUI
# These modules will not exist while building the docs.
except ImportError:
import os
if os.environ.get('SPHINX') != 'True':
raise
def get_maya_window():
"""Get the main Maya windo... | Use uitools.sip instead of straight sip | Use uitools.sip instead of straight sip | Python | bsd-3-clause | westernx/mayatools,westernx/mayatools |
try:
import sip
from uitools.qt import QtCore
import maya.OpenMayaUI as apiUI
# These modules will not exist while building the docs.
except ImportError:
import os
if os.environ.get('SPHINX') != 'True':
raise
def get_maya_window():
"""Get the main Maya window as a QtGui.QMainWindow."... |
try:
from uitools.sip import wrapinstance
from uitools.qt import QtCore
import maya.OpenMayaUI as apiUI
# These modules will not exist while building the docs.
except ImportError:
import os
if os.environ.get('SPHINX') != 'True':
raise
def get_maya_window():
"""Get the main Maya windo... | <commit_before>
try:
import sip
from uitools.qt import QtCore
import maya.OpenMayaUI as apiUI
# These modules will not exist while building the docs.
except ImportError:
import os
if os.environ.get('SPHINX') != 'True':
raise
def get_maya_window():
"""Get the main Maya window as a QtGu... |
try:
from uitools.sip import wrapinstance
from uitools.qt import QtCore
import maya.OpenMayaUI as apiUI
# These modules will not exist while building the docs.
except ImportError:
import os
if os.environ.get('SPHINX') != 'True':
raise
def get_maya_window():
"""Get the main Maya windo... |
try:
import sip
from uitools.qt import QtCore
import maya.OpenMayaUI as apiUI
# These modules will not exist while building the docs.
except ImportError:
import os
if os.environ.get('SPHINX') != 'True':
raise
def get_maya_window():
"""Get the main Maya window as a QtGui.QMainWindow."... | <commit_before>
try:
import sip
from uitools.qt import QtCore
import maya.OpenMayaUI as apiUI
# These modules will not exist while building the docs.
except ImportError:
import os
if os.environ.get('SPHINX') != 'True':
raise
def get_maya_window():
"""Get the main Maya window as a QtGu... |
3d4327f6d9d71c6b396b0655de81373210417aba | apps/i4p_base/urls.py | apps/i4p_base/urls.py | #-- encoding: utf-8 --
from django.conf.urls.defaults import patterns, url
from haystack.views import search_view_factory
import views
import ajax
urlpatterns = patterns('',
url(r'^$', views.homepage, name='i4p-index'),
url(r'^homepage/ajax/slider/bestof/$', ajax.slider_bestof, name='i4p-homepage-ajax-slider... | #-- encoding: utf-8 --
from django.conf.urls.defaults import patterns, url
from haystack.views import search_view_factory
import views
import ajax
urlpatterns = patterns('',
#url(r'^$', views.homepage, name='i4p-index'),
url(r'^homepage/ajax/slider/bestof/$', ajax.slider_bestof, name='i4p-homepage-ajax-slide... | Remove explicit link to homepage view in i4p_base | Remove explicit link to homepage view in i4p_base
| Python | agpl-3.0 | ImaginationForPeople/imaginationforpeople,ImaginationForPeople/imaginationforpeople,ImaginationForPeople/imaginationforpeople,ImaginationForPeople/imaginationforpeople,ImaginationForPeople/imaginationforpeople,ImaginationForPeople/imaginationforpeople | #-- encoding: utf-8 --
from django.conf.urls.defaults import patterns, url
from haystack.views import search_view_factory
import views
import ajax
urlpatterns = patterns('',
url(r'^$', views.homepage, name='i4p-index'),
url(r'^homepage/ajax/slider/bestof/$', ajax.slider_bestof, name='i4p-homepage-ajax-slider... | #-- encoding: utf-8 --
from django.conf.urls.defaults import patterns, url
from haystack.views import search_view_factory
import views
import ajax
urlpatterns = patterns('',
#url(r'^$', views.homepage, name='i4p-index'),
url(r'^homepage/ajax/slider/bestof/$', ajax.slider_bestof, name='i4p-homepage-ajax-slide... | <commit_before>#-- encoding: utf-8 --
from django.conf.urls.defaults import patterns, url
from haystack.views import search_view_factory
import views
import ajax
urlpatterns = patterns('',
url(r'^$', views.homepage, name='i4p-index'),
url(r'^homepage/ajax/slider/bestof/$', ajax.slider_bestof, name='i4p-homep... | #-- encoding: utf-8 --
from django.conf.urls.defaults import patterns, url
from haystack.views import search_view_factory
import views
import ajax
urlpatterns = patterns('',
#url(r'^$', views.homepage, name='i4p-index'),
url(r'^homepage/ajax/slider/bestof/$', ajax.slider_bestof, name='i4p-homepage-ajax-slide... | #-- encoding: utf-8 --
from django.conf.urls.defaults import patterns, url
from haystack.views import search_view_factory
import views
import ajax
urlpatterns = patterns('',
url(r'^$', views.homepage, name='i4p-index'),
url(r'^homepage/ajax/slider/bestof/$', ajax.slider_bestof, name='i4p-homepage-ajax-slider... | <commit_before>#-- encoding: utf-8 --
from django.conf.urls.defaults import patterns, url
from haystack.views import search_view_factory
import views
import ajax
urlpatterns = patterns('',
url(r'^$', views.homepage, name='i4p-index'),
url(r'^homepage/ajax/slider/bestof/$', ajax.slider_bestof, name='i4p-homep... |
5446b0cc9335a3fe6c88158c1b864cdc1b0988d5 | onestop/stopbins.py | onestop/stopbins.py | """Stop Bins."""
import util
import errors
import registry
import entities
class StopBin(object):
def __init__(self, prefix):
self.prefix = prefix
self._stops = {}
def stops(self):
return self._stops.values()
def add_stop(self, stop):
key = stop.onestop()
# New stop
if key not i... | """Stop Bins."""
import util
import errors
import registry
import entities
class StopBin(object):
def __init__(self, prefix):
self.prefix = prefix
self._stops = {}
def stops(self):
return self._stops.values()
def add_stop(self, stop):
key = stop.onestop()
# New stop
if key not i... | Return added stop in StopBin.add_stop() | Return added stop in StopBin.add_stop()
| Python | mit | transitland/transitland-python-client,srthurman/transitland-python-client | """Stop Bins."""
import util
import errors
import registry
import entities
class StopBin(object):
def __init__(self, prefix):
self.prefix = prefix
self._stops = {}
def stops(self):
return self._stops.values()
def add_stop(self, stop):
key = stop.onestop()
# New stop
if key not i... | """Stop Bins."""
import util
import errors
import registry
import entities
class StopBin(object):
def __init__(self, prefix):
self.prefix = prefix
self._stops = {}
def stops(self):
return self._stops.values()
def add_stop(self, stop):
key = stop.onestop()
# New stop
if key not i... | <commit_before>"""Stop Bins."""
import util
import errors
import registry
import entities
class StopBin(object):
def __init__(self, prefix):
self.prefix = prefix
self._stops = {}
def stops(self):
return self._stops.values()
def add_stop(self, stop):
key = stop.onestop()
# New stop
... | """Stop Bins."""
import util
import errors
import registry
import entities
class StopBin(object):
def __init__(self, prefix):
self.prefix = prefix
self._stops = {}
def stops(self):
return self._stops.values()
def add_stop(self, stop):
key = stop.onestop()
# New stop
if key not i... | """Stop Bins."""
import util
import errors
import registry
import entities
class StopBin(object):
def __init__(self, prefix):
self.prefix = prefix
self._stops = {}
def stops(self):
return self._stops.values()
def add_stop(self, stop):
key = stop.onestop()
# New stop
if key not i... | <commit_before>"""Stop Bins."""
import util
import errors
import registry
import entities
class StopBin(object):
def __init__(self, prefix):
self.prefix = prefix
self._stops = {}
def stops(self):
return self._stops.values()
def add_stop(self, stop):
key = stop.onestop()
# New stop
... |
73877a82bf9b690827102d1a932a31af94ab78e9 | partner_event/models/res_partner.py | partner_event/models/res_partner.py | # -*- encoding: utf-8 -*-
##############################################################################
# For copyright and license notices, see __openerp__.py file in root directory
##############################################################################
from openerp import models, fields, api
class ResPartn... | # -*- encoding: utf-8 -*-
##############################################################################
# For copyright and license notices, see __openerp__.py file in root directory
##############################################################################
from openerp import models, fields, api
class ResPartn... | Revert last commit and tiggers _count_attended_registration method when one registrations.state changes | Revert last commit and tiggers _count_attended_registration method when one registrations.state changes
| Python | agpl-3.0 | open-synergy/event,open-synergy/event,Endika/event,Antiun/event | # -*- encoding: utf-8 -*-
##############################################################################
# For copyright and license notices, see __openerp__.py file in root directory
##############################################################################
from openerp import models, fields, api
class ResPartn... | # -*- encoding: utf-8 -*-
##############################################################################
# For copyright and license notices, see __openerp__.py file in root directory
##############################################################################
from openerp import models, fields, api
class ResPartn... | <commit_before># -*- encoding: utf-8 -*-
##############################################################################
# For copyright and license notices, see __openerp__.py file in root directory
##############################################################################
from openerp import models, fields, api
... | # -*- encoding: utf-8 -*-
##############################################################################
# For copyright and license notices, see __openerp__.py file in root directory
##############################################################################
from openerp import models, fields, api
class ResPartn... | # -*- encoding: utf-8 -*-
##############################################################################
# For copyright and license notices, see __openerp__.py file in root directory
##############################################################################
from openerp import models, fields, api
class ResPartn... | <commit_before># -*- encoding: utf-8 -*-
##############################################################################
# For copyright and license notices, see __openerp__.py file in root directory
##############################################################################
from openerp import models, fields, api
... |
e5d3f0f0295cb5943f7926e49da42565a7905c85 | dummy_celery_worker.py | dummy_celery_worker.py | import os
from celery import Celery
app = Celery('dummy_tasks', broker=os.environ['TEST_HADES_BROKER_URI'],
backend=os.environ['TEST_HADES_RESULT_BACKEND_URI'])
@app.task
def get_port_auth_attempts(nasipaddress, nasportid):
return ["Success!", "No success! :-(",
"Gotten: {}/{}".format(na... | import os
from datetime import datetime
from time import sleep
from celery import Celery
app = Celery('dummy_tasks', broker=os.environ['TEST_HADES_BROKER_URI'],
backend=os.environ['TEST_HADES_RESULT_BACKEND_URI'])
@app.task
def get_port_auth_attempts(nasipaddress, nasportid, limit=100):
if nasporti... | Implement correct function signature in dummy API and sleep trigger | Implement correct function signature in dummy API and sleep trigger
| Python | apache-2.0 | lukasjuhrich/pycroft,lukasjuhrich/pycroft,agdsn/pycroft,agdsn/pycroft,agdsn/pycroft,agdsn/pycroft,lukasjuhrich/pycroft,agdsn/pycroft,lukasjuhrich/pycroft | import os
from celery import Celery
app = Celery('dummy_tasks', broker=os.environ['TEST_HADES_BROKER_URI'],
backend=os.environ['TEST_HADES_RESULT_BACKEND_URI'])
@app.task
def get_port_auth_attempts(nasipaddress, nasportid):
return ["Success!", "No success! :-(",
"Gotten: {}/{}".format(na... | import os
from datetime import datetime
from time import sleep
from celery import Celery
app = Celery('dummy_tasks', broker=os.environ['TEST_HADES_BROKER_URI'],
backend=os.environ['TEST_HADES_RESULT_BACKEND_URI'])
@app.task
def get_port_auth_attempts(nasipaddress, nasportid, limit=100):
if nasporti... | <commit_before>import os
from celery import Celery
app = Celery('dummy_tasks', broker=os.environ['TEST_HADES_BROKER_URI'],
backend=os.environ['TEST_HADES_RESULT_BACKEND_URI'])
@app.task
def get_port_auth_attempts(nasipaddress, nasportid):
return ["Success!", "No success! :-(",
"Gotten: {... | import os
from datetime import datetime
from time import sleep
from celery import Celery
app = Celery('dummy_tasks', broker=os.environ['TEST_HADES_BROKER_URI'],
backend=os.environ['TEST_HADES_RESULT_BACKEND_URI'])
@app.task
def get_port_auth_attempts(nasipaddress, nasportid, limit=100):
if nasporti... | import os
from celery import Celery
app = Celery('dummy_tasks', broker=os.environ['TEST_HADES_BROKER_URI'],
backend=os.environ['TEST_HADES_RESULT_BACKEND_URI'])
@app.task
def get_port_auth_attempts(nasipaddress, nasportid):
return ["Success!", "No success! :-(",
"Gotten: {}/{}".format(na... | <commit_before>import os
from celery import Celery
app = Celery('dummy_tasks', broker=os.environ['TEST_HADES_BROKER_URI'],
backend=os.environ['TEST_HADES_RESULT_BACKEND_URI'])
@app.task
def get_port_auth_attempts(nasipaddress, nasportid):
return ["Success!", "No success! :-(",
"Gotten: {... |
ca5851c681452e20a07434b74481860722077bb0 | server/setup.py | server/setup.py | import os
from setuptools import setup, find_packages
here = os.path.abspath(os.path.dirname(__file__))
README = open(os.path.join(here, 'README.txt')).read()
version = '0.1'
requires = ['pyramid', 'pyramid_debugtoolbar']
if __name__ == '__main__':
setup(name='pings',
version=version,
descr... | import os
from setuptools import setup, find_packages
here = os.path.abspath(os.path.dirname(__file__))
README = open(os.path.join(here, 'README.txt')).read()
version = '0.1'
# Use requirements.txt for all requirements, at least for now.
requires = []
if __name__ == '__main__':
setup(name='pings',
ve... | Use requirements.txt for all requirements, at least for now. | Use requirements.txt for all requirements, at least for now.
| Python | bsd-3-clause | lisa-lab/pings,lisa-lab/pings,lisa-lab/pings,lisa-lab/pings | import os
from setuptools import setup, find_packages
here = os.path.abspath(os.path.dirname(__file__))
README = open(os.path.join(here, 'README.txt')).read()
version = '0.1'
requires = ['pyramid', 'pyramid_debugtoolbar']
if __name__ == '__main__':
setup(name='pings',
version=version,
descr... | import os
from setuptools import setup, find_packages
here = os.path.abspath(os.path.dirname(__file__))
README = open(os.path.join(here, 'README.txt')).read()
version = '0.1'
# Use requirements.txt for all requirements, at least for now.
requires = []
if __name__ == '__main__':
setup(name='pings',
ve... | <commit_before>import os
from setuptools import setup, find_packages
here = os.path.abspath(os.path.dirname(__file__))
README = open(os.path.join(here, 'README.txt')).read()
version = '0.1'
requires = ['pyramid', 'pyramid_debugtoolbar']
if __name__ == '__main__':
setup(name='pings',
version=version,
... | import os
from setuptools import setup, find_packages
here = os.path.abspath(os.path.dirname(__file__))
README = open(os.path.join(here, 'README.txt')).read()
version = '0.1'
# Use requirements.txt for all requirements, at least for now.
requires = []
if __name__ == '__main__':
setup(name='pings',
ve... | import os
from setuptools import setup, find_packages
here = os.path.abspath(os.path.dirname(__file__))
README = open(os.path.join(here, 'README.txt')).read()
version = '0.1'
requires = ['pyramid', 'pyramid_debugtoolbar']
if __name__ == '__main__':
setup(name='pings',
version=version,
descr... | <commit_before>import os
from setuptools import setup, find_packages
here = os.path.abspath(os.path.dirname(__file__))
README = open(os.path.join(here, 'README.txt')).read()
version = '0.1'
requires = ['pyramid', 'pyramid_debugtoolbar']
if __name__ == '__main__':
setup(name='pings',
version=version,
... |
c6e130682712e8534e773036ba3d87c09b91ff1c | knowledge_repo/postprocessors/format_checks.py | knowledge_repo/postprocessors/format_checks.py | from ..constants import FORMAT_CHECKS
from ..post import HEADER_OPTIONAL_FIELD_TYPES, HEADER_REQUIRED_FIELD_TYPES
from ..postprocessor import KnowledgePostProcessor
class FormatChecks(KnowledgePostProcessor):
_registry_keys = [FORMAT_CHECKS]
def process(self, kp):
headers = kp.headers
for fie... | from ..constants import FORMAT_CHECKS
from ..post import HEADER_OPTIONAL_FIELD_TYPES, HEADER_REQUIRED_FIELD_TYPES
from ..postprocessor import KnowledgePostProcessor
class FormatChecks(KnowledgePostProcessor):
_registry_keys = [FORMAT_CHECKS]
def process(self, kp):
headers = kp.headers
for fie... | Fix lint issues related to long lines | Fix lint issues related to long lines
| Python | apache-2.0 | airbnb/knowledge-repo,airbnb/knowledge-repo,airbnb/knowledge-repo,airbnb/knowledge-repo,airbnb/knowledge-repo | from ..constants import FORMAT_CHECKS
from ..post import HEADER_OPTIONAL_FIELD_TYPES, HEADER_REQUIRED_FIELD_TYPES
from ..postprocessor import KnowledgePostProcessor
class FormatChecks(KnowledgePostProcessor):
_registry_keys = [FORMAT_CHECKS]
def process(self, kp):
headers = kp.headers
for fie... | from ..constants import FORMAT_CHECKS
from ..post import HEADER_OPTIONAL_FIELD_TYPES, HEADER_REQUIRED_FIELD_TYPES
from ..postprocessor import KnowledgePostProcessor
class FormatChecks(KnowledgePostProcessor):
_registry_keys = [FORMAT_CHECKS]
def process(self, kp):
headers = kp.headers
for fie... | <commit_before>from ..constants import FORMAT_CHECKS
from ..post import HEADER_OPTIONAL_FIELD_TYPES, HEADER_REQUIRED_FIELD_TYPES
from ..postprocessor import KnowledgePostProcessor
class FormatChecks(KnowledgePostProcessor):
_registry_keys = [FORMAT_CHECKS]
def process(self, kp):
headers = kp.headers
... | from ..constants import FORMAT_CHECKS
from ..post import HEADER_OPTIONAL_FIELD_TYPES, HEADER_REQUIRED_FIELD_TYPES
from ..postprocessor import KnowledgePostProcessor
class FormatChecks(KnowledgePostProcessor):
_registry_keys = [FORMAT_CHECKS]
def process(self, kp):
headers = kp.headers
for fie... | from ..constants import FORMAT_CHECKS
from ..post import HEADER_OPTIONAL_FIELD_TYPES, HEADER_REQUIRED_FIELD_TYPES
from ..postprocessor import KnowledgePostProcessor
class FormatChecks(KnowledgePostProcessor):
_registry_keys = [FORMAT_CHECKS]
def process(self, kp):
headers = kp.headers
for fie... | <commit_before>from ..constants import FORMAT_CHECKS
from ..post import HEADER_OPTIONAL_FIELD_TYPES, HEADER_REQUIRED_FIELD_TYPES
from ..postprocessor import KnowledgePostProcessor
class FormatChecks(KnowledgePostProcessor):
_registry_keys = [FORMAT_CHECKS]
def process(self, kp):
headers = kp.headers
... |
bf264d5683c7fcab69e117f235fbe16298ac90b8 | wal_e/worker/wabs/wabs_deleter.py | wal_e/worker/wabs/wabs_deleter.py | from wal_e import retries
from wal_e.worker.base import _Deleter
class Deleter(_Deleter):
def __init__(self, wabs_conn, container):
super(Deleter, self).__init__()
self.wabs_conn = wabs_conn
self.container = container
@retries.retry()
def _delete_batch(self, page):
# Azur... | from wal_e import retries
from wal_e import log_help
from wal_e.worker.base import _Deleter
try:
# New class name in the Azure SDK sometime after v1.0.
#
# See
# https://github.com/Azure/azure-sdk-for-python/blob/master/ChangeLog.txt
from azure.common import AzureMissingResourceHttpError
except Imp... | Fix infinite retry while deleting missing resource in WABS | Fix infinite retry while deleting missing resource in WABS
| Python | bsd-3-clause | wal-e/wal-e | from wal_e import retries
from wal_e.worker.base import _Deleter
class Deleter(_Deleter):
def __init__(self, wabs_conn, container):
super(Deleter, self).__init__()
self.wabs_conn = wabs_conn
self.container = container
@retries.retry()
def _delete_batch(self, page):
# Azur... | from wal_e import retries
from wal_e import log_help
from wal_e.worker.base import _Deleter
try:
# New class name in the Azure SDK sometime after v1.0.
#
# See
# https://github.com/Azure/azure-sdk-for-python/blob/master/ChangeLog.txt
from azure.common import AzureMissingResourceHttpError
except Imp... | <commit_before>from wal_e import retries
from wal_e.worker.base import _Deleter
class Deleter(_Deleter):
def __init__(self, wabs_conn, container):
super(Deleter, self).__init__()
self.wabs_conn = wabs_conn
self.container = container
@retries.retry()
def _delete_batch(self, page):... | from wal_e import retries
from wal_e import log_help
from wal_e.worker.base import _Deleter
try:
# New class name in the Azure SDK sometime after v1.0.
#
# See
# https://github.com/Azure/azure-sdk-for-python/blob/master/ChangeLog.txt
from azure.common import AzureMissingResourceHttpError
except Imp... | from wal_e import retries
from wal_e.worker.base import _Deleter
class Deleter(_Deleter):
def __init__(self, wabs_conn, container):
super(Deleter, self).__init__()
self.wabs_conn = wabs_conn
self.container = container
@retries.retry()
def _delete_batch(self, page):
# Azur... | <commit_before>from wal_e import retries
from wal_e.worker.base import _Deleter
class Deleter(_Deleter):
def __init__(self, wabs_conn, container):
super(Deleter, self).__init__()
self.wabs_conn = wabs_conn
self.container = container
@retries.retry()
def _delete_batch(self, page):... |
62845279b46d6f4394e05e666fe459a427bdd358 | enthought/qt/QtCore.py | enthought/qt/QtCore.py | import os
qt_api = os.environ.get('QT_API', 'pyqt')
if qt_api == 'pyqt':
from PyQt4.QtCore import *
from PyQt4.QtCore import pyqtSignal as Signal
from PyQt4.Qt import QCoreApplication
from PyQt4.Qt import Qt
else:
from PySide.QtCore import *
| import os
qt_api = os.environ.get('QT_API', 'pyqt')
if qt_api == 'pyqt':
from PyQt4.QtCore import *
from PyQt4.QtCore import pyqtSignal as Signal
from PyQt4.Qt import QCoreApplication
from PyQt4.Qt import Qt
# Emulate PySide version metadata.
__version__ = QT_VERSION_STR
__version_info__... | Add PySide-style version metadata when PyQt4 is present. | Add PySide-style version metadata when PyQt4 is present.
| Python | bsd-3-clause | burnpanck/traits,burnpanck/traits | import os
qt_api = os.environ.get('QT_API', 'pyqt')
if qt_api == 'pyqt':
from PyQt4.QtCore import *
from PyQt4.QtCore import pyqtSignal as Signal
from PyQt4.Qt import QCoreApplication
from PyQt4.Qt import Qt
else:
from PySide.QtCore import *
Add PySide-style version metadata when PyQt4 is presen... | import os
qt_api = os.environ.get('QT_API', 'pyqt')
if qt_api == 'pyqt':
from PyQt4.QtCore import *
from PyQt4.QtCore import pyqtSignal as Signal
from PyQt4.Qt import QCoreApplication
from PyQt4.Qt import Qt
# Emulate PySide version metadata.
__version__ = QT_VERSION_STR
__version_info__... | <commit_before>import os
qt_api = os.environ.get('QT_API', 'pyqt')
if qt_api == 'pyqt':
from PyQt4.QtCore import *
from PyQt4.QtCore import pyqtSignal as Signal
from PyQt4.Qt import QCoreApplication
from PyQt4.Qt import Qt
else:
from PySide.QtCore import *
<commit_msg>Add PySide-style version me... | import os
qt_api = os.environ.get('QT_API', 'pyqt')
if qt_api == 'pyqt':
from PyQt4.QtCore import *
from PyQt4.QtCore import pyqtSignal as Signal
from PyQt4.Qt import QCoreApplication
from PyQt4.Qt import Qt
# Emulate PySide version metadata.
__version__ = QT_VERSION_STR
__version_info__... | import os
qt_api = os.environ.get('QT_API', 'pyqt')
if qt_api == 'pyqt':
from PyQt4.QtCore import *
from PyQt4.QtCore import pyqtSignal as Signal
from PyQt4.Qt import QCoreApplication
from PyQt4.Qt import Qt
else:
from PySide.QtCore import *
Add PySide-style version metadata when PyQt4 is presen... | <commit_before>import os
qt_api = os.environ.get('QT_API', 'pyqt')
if qt_api == 'pyqt':
from PyQt4.QtCore import *
from PyQt4.QtCore import pyqtSignal as Signal
from PyQt4.Qt import QCoreApplication
from PyQt4.Qt import Qt
else:
from PySide.QtCore import *
<commit_msg>Add PySide-style version me... |
cc87cf3967e14274b7819f5424b80bd7e491f0ce | alg_kruskal_minimum_spanning_tree.py | alg_kruskal_minimum_spanning_tree.py | from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
def kruskal():
"""Kruskal's algorithm for minimum spanning tree in weighted graph.
Time complexity for graph G(V, E): TBD.
"""
pass
def main():
pass
if __name__ == '__main__':
main()
| from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
def kruskal():
"""Kruskal's algorithm for minimum spanning tree in weighted graph.
Time complexity for graph G(V, E): TBD.
"""
pass
def main():
w_graph_d = {
'a': {'b': 1, 'd': 4, 'e': 3},
... | Add weighted graph in main() | Add weighted graph in main()
| Python | bsd-2-clause | bowen0701/algorithms_data_structures | from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
def kruskal():
"""Kruskal's algorithm for minimum spanning tree in weighted graph.
Time complexity for graph G(V, E): TBD.
"""
pass
def main():
pass
if __name__ == '__main__':
main()
Add weighted ... | from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
def kruskal():
"""Kruskal's algorithm for minimum spanning tree in weighted graph.
Time complexity for graph G(V, E): TBD.
"""
pass
def main():
w_graph_d = {
'a': {'b': 1, 'd': 4, 'e': 3},
... | <commit_before>from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
def kruskal():
"""Kruskal's algorithm for minimum spanning tree in weighted graph.
Time complexity for graph G(V, E): TBD.
"""
pass
def main():
pass
if __name__ == '__main__':
main(... | from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
def kruskal():
"""Kruskal's algorithm for minimum spanning tree in weighted graph.
Time complexity for graph G(V, E): TBD.
"""
pass
def main():
w_graph_d = {
'a': {'b': 1, 'd': 4, 'e': 3},
... | from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
def kruskal():
"""Kruskal's algorithm for minimum spanning tree in weighted graph.
Time complexity for graph G(V, E): TBD.
"""
pass
def main():
pass
if __name__ == '__main__':
main()
Add weighted ... | <commit_before>from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
def kruskal():
"""Kruskal's algorithm for minimum spanning tree in weighted graph.
Time complexity for graph G(V, E): TBD.
"""
pass
def main():
pass
if __name__ == '__main__':
main(... |
4b5f8e14db9cd157d1b3b616726b1c9fb1b3c9b5 | demos/py_simple/rotate90.py | demos/py_simple/rotate90.py | #!/usr/bin/env python
import sys
import gfxprim.core as core
import gfxprim.loaders as loaders
import gfxprim.filters as filters
def main():
if len(sys.argv) != 3:
print("USAGE: %s imput_image output_image" % sys.argv[0]);
sys.exit(1)
# Turns on debug messages
core.SetDebugLevel(10);
... | #!/usr/bin/env python
import sys
import gfxprim.core as core
import gfxprim.loaders as loaders
import gfxprim.filters as filters
def main():
if len(sys.argv) != 3:
print("USAGE: %s imput_image output_image" % sys.argv[0]);
sys.exit(1)
# Turns on debug messages
core.SetDebugLevel(10);
... | Fix python example after the API update. | py_simple: Fix python example after the API update.
| Python | lgpl-2.1 | gfxprim/gfxprim,gfxprim/gfxprim,gfxprim/gfxprim,gfxprim/gfxprim,gfxprim/gfxprim | #!/usr/bin/env python
import sys
import gfxprim.core as core
import gfxprim.loaders as loaders
import gfxprim.filters as filters
def main():
if len(sys.argv) != 3:
print("USAGE: %s imput_image output_image" % sys.argv[0]);
sys.exit(1)
# Turns on debug messages
core.SetDebugLevel(10);
... | #!/usr/bin/env python
import sys
import gfxprim.core as core
import gfxprim.loaders as loaders
import gfxprim.filters as filters
def main():
if len(sys.argv) != 3:
print("USAGE: %s imput_image output_image" % sys.argv[0]);
sys.exit(1)
# Turns on debug messages
core.SetDebugLevel(10);
... | <commit_before>#!/usr/bin/env python
import sys
import gfxprim.core as core
import gfxprim.loaders as loaders
import gfxprim.filters as filters
def main():
if len(sys.argv) != 3:
print("USAGE: %s imput_image output_image" % sys.argv[0]);
sys.exit(1)
# Turns on debug messages
core.SetDebug... | #!/usr/bin/env python
import sys
import gfxprim.core as core
import gfxprim.loaders as loaders
import gfxprim.filters as filters
def main():
if len(sys.argv) != 3:
print("USAGE: %s imput_image output_image" % sys.argv[0]);
sys.exit(1)
# Turns on debug messages
core.SetDebugLevel(10);
... | #!/usr/bin/env python
import sys
import gfxprim.core as core
import gfxprim.loaders as loaders
import gfxprim.filters as filters
def main():
if len(sys.argv) != 3:
print("USAGE: %s imput_image output_image" % sys.argv[0]);
sys.exit(1)
# Turns on debug messages
core.SetDebugLevel(10);
... | <commit_before>#!/usr/bin/env python
import sys
import gfxprim.core as core
import gfxprim.loaders as loaders
import gfxprim.filters as filters
def main():
if len(sys.argv) != 3:
print("USAGE: %s imput_image output_image" % sys.argv[0]);
sys.exit(1)
# Turns on debug messages
core.SetDebug... |
283d7299c732b80d504e971424b18996719fdf80 | dsub/_dsub_version.py | dsub/_dsub_version.py | # Copyright 2017 Google Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or a... | # Copyright 2017 Google Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or a... | Update dsub version to 0.3.7.dev0 | Update dsub version to 0.3.7.dev0
PiperOrigin-RevId: 281987296
| Python | apache-2.0 | DataBiosphere/dsub,DataBiosphere/dsub | # Copyright 2017 Google Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or a... | # Copyright 2017 Google Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or a... | <commit_before># Copyright 2017 Google Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by appl... | # Copyright 2017 Google Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or a... | # Copyright 2017 Google Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or a... | <commit_before># Copyright 2017 Google Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by appl... |
a5ae06630ef96d1093e4498e0e5437c0a7e65bfa | parse.py | parse.py | from PIL import Image
import sys
import pyocr
import pyocr.builders
tools = pyocr.get_available_tools()
if len(tools) == 0:
print("Error: No OCR tool found")
sys.exit(1)
# should be 'Tesseract (sh)'
tool = tools[0]
orig_image = Image.open('test.png')
# crop to only the section with the number of problems ... | from PIL import Image
import sys
import pyocr
import pyocr.builders
image_loc = ' '.join(sys.argv[1:])
tools = pyocr.get_available_tools()
if len(tools) == 0:
print("Error: No OCR tool found")
sys.exit(1)
# should be 'Tesseract (sh)'
tool = tools[0]
orig_image = Image.open(image_loc)
# crop to only the se... | Allow user to specify image file w argv | Allow user to specify image file w argv
| Python | bsd-2-clause | iandioch/euler-foiler | from PIL import Image
import sys
import pyocr
import pyocr.builders
tools = pyocr.get_available_tools()
if len(tools) == 0:
print("Error: No OCR tool found")
sys.exit(1)
# should be 'Tesseract (sh)'
tool = tools[0]
orig_image = Image.open('test.png')
# crop to only the section with the number of problems ... | from PIL import Image
import sys
import pyocr
import pyocr.builders
image_loc = ' '.join(sys.argv[1:])
tools = pyocr.get_available_tools()
if len(tools) == 0:
print("Error: No OCR tool found")
sys.exit(1)
# should be 'Tesseract (sh)'
tool = tools[0]
orig_image = Image.open(image_loc)
# crop to only the se... | <commit_before>from PIL import Image
import sys
import pyocr
import pyocr.builders
tools = pyocr.get_available_tools()
if len(tools) == 0:
print("Error: No OCR tool found")
sys.exit(1)
# should be 'Tesseract (sh)'
tool = tools[0]
orig_image = Image.open('test.png')
# crop to only the section with the numb... | from PIL import Image
import sys
import pyocr
import pyocr.builders
image_loc = ' '.join(sys.argv[1:])
tools = pyocr.get_available_tools()
if len(tools) == 0:
print("Error: No OCR tool found")
sys.exit(1)
# should be 'Tesseract (sh)'
tool = tools[0]
orig_image = Image.open(image_loc)
# crop to only the se... | from PIL import Image
import sys
import pyocr
import pyocr.builders
tools = pyocr.get_available_tools()
if len(tools) == 0:
print("Error: No OCR tool found")
sys.exit(1)
# should be 'Tesseract (sh)'
tool = tools[0]
orig_image = Image.open('test.png')
# crop to only the section with the number of problems ... | <commit_before>from PIL import Image
import sys
import pyocr
import pyocr.builders
tools = pyocr.get_available_tools()
if len(tools) == 0:
print("Error: No OCR tool found")
sys.exit(1)
# should be 'Tesseract (sh)'
tool = tools[0]
orig_image = Image.open('test.png')
# crop to only the section with the numb... |
b67a5daaa7efc946aebcdfdabbe201057af4aef5 | globus_sdk/version.py | globus_sdk/version.py | # single source of truth for package version,
# see https://packaging.python.org/en/latest/single_source_version/
__version__ = "0.6.0"
| # single source of truth for package version,
# see https://packaging.python.org/en/latest/single_source_version/
__version__ = "0.7.0"
| Update to v0.7.0 for release | Update to v0.7.0 for release
| Python | apache-2.0 | aaschaer/globus-sdk-python,sirosen/globus-sdk-python,globus/globus-sdk-python,globus/globus-sdk-python,globusonline/globus-sdk-python | # single source of truth for package version,
# see https://packaging.python.org/en/latest/single_source_version/
__version__ = "0.6.0"
Update to v0.7.0 for release | # single source of truth for package version,
# see https://packaging.python.org/en/latest/single_source_version/
__version__ = "0.7.0"
| <commit_before># single source of truth for package version,
# see https://packaging.python.org/en/latest/single_source_version/
__version__ = "0.6.0"
<commit_msg>Update to v0.7.0 for release<commit_after> | # single source of truth for package version,
# see https://packaging.python.org/en/latest/single_source_version/
__version__ = "0.7.0"
| # single source of truth for package version,
# see https://packaging.python.org/en/latest/single_source_version/
__version__ = "0.6.0"
Update to v0.7.0 for release# single source of truth for package version,
# see https://packaging.python.org/en/latest/single_source_version/
__version__ = "0.7.0"
| <commit_before># single source of truth for package version,
# see https://packaging.python.org/en/latest/single_source_version/
__version__ = "0.6.0"
<commit_msg>Update to v0.7.0 for release<commit_after># single source of truth for package version,
# see https://packaging.python.org/en/latest/single_source_version/
_... |
a16889f353873e3d08a24440b9aa83177ffd001f | engine.py | engine.py | #!/usr/bin/env python
import json
import sys
import os # For os.path and the like
class DictWrapper(object):
def __init__(self, d):
self.__dict__ = d
def eval_script(self):
return eval(self.script) # With self as context
d = json.load(sys.stdin)
dw = DictWrapper(d)
json.dump(dw.eval_script()... | #!/usr/bin/env python
import json
import sys
import os # For os.path and the like
class DictWrapper(object):
def __init__(self, d):
self.__dict__ = d
def eval_script(self):
return eval(self.script) # With self as context
def __getattr__(self, attr):
return None
if __name__ ... | Implement __getattr__ to handle KeyErrors | Implement __getattr__ to handle KeyErrors
| Python | mit | dleehr/py-expr-engine | #!/usr/bin/env python
import json
import sys
import os # For os.path and the like
class DictWrapper(object):
def __init__(self, d):
self.__dict__ = d
def eval_script(self):
return eval(self.script) # With self as context
d = json.load(sys.stdin)
dw = DictWrapper(d)
json.dump(dw.eval_script()... | #!/usr/bin/env python
import json
import sys
import os # For os.path and the like
class DictWrapper(object):
def __init__(self, d):
self.__dict__ = d
def eval_script(self):
return eval(self.script) # With self as context
def __getattr__(self, attr):
return None
if __name__ ... | <commit_before>#!/usr/bin/env python
import json
import sys
import os # For os.path and the like
class DictWrapper(object):
def __init__(self, d):
self.__dict__ = d
def eval_script(self):
return eval(self.script) # With self as context
d = json.load(sys.stdin)
dw = DictWrapper(d)
json.dump(d... | #!/usr/bin/env python
import json
import sys
import os # For os.path and the like
class DictWrapper(object):
def __init__(self, d):
self.__dict__ = d
def eval_script(self):
return eval(self.script) # With self as context
def __getattr__(self, attr):
return None
if __name__ ... | #!/usr/bin/env python
import json
import sys
import os # For os.path and the like
class DictWrapper(object):
def __init__(self, d):
self.__dict__ = d
def eval_script(self):
return eval(self.script) # With self as context
d = json.load(sys.stdin)
dw = DictWrapper(d)
json.dump(dw.eval_script()... | <commit_before>#!/usr/bin/env python
import json
import sys
import os # For os.path and the like
class DictWrapper(object):
def __init__(self, d):
self.__dict__ = d
def eval_script(self):
return eval(self.script) # With self as context
d = json.load(sys.stdin)
dw = DictWrapper(d)
json.dump(d... |
fc7beded3d286d831df29b8b32614b2eb56ef206 | enasearch/__main__.py | enasearch/__main__.py | #!/usr/bin/env python
import click
import ebisearch
from pprint import pprint
@click.group()
def main():
pass
@click.command('get_results', short_help='Get list of results')
def get_results():
"""Return the list of domains in EBI"""
ebisearch.get_results(verbose=True)
@click.command('get_filter_field... | #!/usr/bin/env python
import click
import ebisearch
from pprint import pprint
@click.group()
def main():
pass
@click.command('get_results', short_help='Get list of results')
def get_results():
"""Return the list of domains in EBI"""
ebisearch.get_results(verbose=True)
@click.command('get_filter_field... | Add function for get filter types | Add function for get filter types
| Python | mit | bebatut/enasearch | #!/usr/bin/env python
import click
import ebisearch
from pprint import pprint
@click.group()
def main():
pass
@click.command('get_results', short_help='Get list of results')
def get_results():
"""Return the list of domains in EBI"""
ebisearch.get_results(verbose=True)
@click.command('get_filter_field... | #!/usr/bin/env python
import click
import ebisearch
from pprint import pprint
@click.group()
def main():
pass
@click.command('get_results', short_help='Get list of results')
def get_results():
"""Return the list of domains in EBI"""
ebisearch.get_results(verbose=True)
@click.command('get_filter_field... | <commit_before>#!/usr/bin/env python
import click
import ebisearch
from pprint import pprint
@click.group()
def main():
pass
@click.command('get_results', short_help='Get list of results')
def get_results():
"""Return the list of domains in EBI"""
ebisearch.get_results(verbose=True)
@click.command('g... | #!/usr/bin/env python
import click
import ebisearch
from pprint import pprint
@click.group()
def main():
pass
@click.command('get_results', short_help='Get list of results')
def get_results():
"""Return the list of domains in EBI"""
ebisearch.get_results(verbose=True)
@click.command('get_filter_field... | #!/usr/bin/env python
import click
import ebisearch
from pprint import pprint
@click.group()
def main():
pass
@click.command('get_results', short_help='Get list of results')
def get_results():
"""Return the list of domains in EBI"""
ebisearch.get_results(verbose=True)
@click.command('get_filter_field... | <commit_before>#!/usr/bin/env python
import click
import ebisearch
from pprint import pprint
@click.group()
def main():
pass
@click.command('get_results', short_help='Get list of results')
def get_results():
"""Return the list of domains in EBI"""
ebisearch.get_results(verbose=True)
@click.command('g... |
9fcfd8e13b5c4684a1cb3890427662ded2d28c24 | examples/get_dataset.py | examples/get_dataset.py | #!/usr/bin/env python3
#
# This script is used for downloading the dataset used by the examples.
# Dataset used: UCI / Pima Indians Diabetes (in libsvm format)
import os
import urllib.request
DATASET_URL = 'http://www.csie.ntu.edu.tw/~cjlin/libsvmtools/datasets/binary/diabetes'
TARGET_PATH = os.path.dirname(os.path.... | #!/usr/bin/env python3
#
# This script is used for downloading the dataset used by the examples.
# Dataset used: Statlog / Letter (in libsvm format)
import os
import urllib.request
import random
DATASET_URL = 'http://www.csie.ntu.edu.tw/~cjlin/libsvmtools/datasets/multiclass/letter.scale'
DATASET_SIZE = 1000
TARGET_... | Change dataset used in example (letter) | Change dataset used in example (letter)
XXX: UncertaintySampling(le) weird?
| Python | bsd-2-clause | ntucllab/libact,ntucllab/libact,ntucllab/libact | #!/usr/bin/env python3
#
# This script is used for downloading the dataset used by the examples.
# Dataset used: UCI / Pima Indians Diabetes (in libsvm format)
import os
import urllib.request
DATASET_URL = 'http://www.csie.ntu.edu.tw/~cjlin/libsvmtools/datasets/binary/diabetes'
TARGET_PATH = os.path.dirname(os.path.... | #!/usr/bin/env python3
#
# This script is used for downloading the dataset used by the examples.
# Dataset used: Statlog / Letter (in libsvm format)
import os
import urllib.request
import random
DATASET_URL = 'http://www.csie.ntu.edu.tw/~cjlin/libsvmtools/datasets/multiclass/letter.scale'
DATASET_SIZE = 1000
TARGET_... | <commit_before>#!/usr/bin/env python3
#
# This script is used for downloading the dataset used by the examples.
# Dataset used: UCI / Pima Indians Diabetes (in libsvm format)
import os
import urllib.request
DATASET_URL = 'http://www.csie.ntu.edu.tw/~cjlin/libsvmtools/datasets/binary/diabetes'
TARGET_PATH = os.path.d... | #!/usr/bin/env python3
#
# This script is used for downloading the dataset used by the examples.
# Dataset used: Statlog / Letter (in libsvm format)
import os
import urllib.request
import random
DATASET_URL = 'http://www.csie.ntu.edu.tw/~cjlin/libsvmtools/datasets/multiclass/letter.scale'
DATASET_SIZE = 1000
TARGET_... | #!/usr/bin/env python3
#
# This script is used for downloading the dataset used by the examples.
# Dataset used: UCI / Pima Indians Diabetes (in libsvm format)
import os
import urllib.request
DATASET_URL = 'http://www.csie.ntu.edu.tw/~cjlin/libsvmtools/datasets/binary/diabetes'
TARGET_PATH = os.path.dirname(os.path.... | <commit_before>#!/usr/bin/env python3
#
# This script is used for downloading the dataset used by the examples.
# Dataset used: UCI / Pima Indians Diabetes (in libsvm format)
import os
import urllib.request
DATASET_URL = 'http://www.csie.ntu.edu.tw/~cjlin/libsvmtools/datasets/binary/diabetes'
TARGET_PATH = os.path.d... |
32a44354c0a5421c2b8a8ab9d63a26e36ddd6158 | sponsorship_switzerland/migrations/12.0.1.0.2/pre-migration.py | sponsorship_switzerland/migrations/12.0.1.0.2/pre-migration.py | from openupgradelib import openupgrade
@openupgrade.migrate(use_env=True)
def migrate(env, version):
if not version:
return
# Associate already created toilets fund to new xml record
covid_fund = env["product.template"].search(
[("default_code", "=", "toilet")]
)
if covid_fund:
... | from openupgradelib import openupgrade
@openupgrade.migrate(use_env=True)
def migrate(env, version):
if not version:
return
# Associate already created toilets fund to new xml record
covid_fund = env["product.template"].search(
[("default_code", "=", "coronavirus")]
)
if covid_fu... | Fix migration of covid product | Fix migration of covid product
| Python | agpl-3.0 | eicher31/compassion-switzerland,eicher31/compassion-switzerland,CompassionCH/compassion-switzerland,eicher31/compassion-switzerland,CompassionCH/compassion-switzerland,CompassionCH/compassion-switzerland | from openupgradelib import openupgrade
@openupgrade.migrate(use_env=True)
def migrate(env, version):
if not version:
return
# Associate already created toilets fund to new xml record
covid_fund = env["product.template"].search(
[("default_code", "=", "toilet")]
)
if covid_fund:
... | from openupgradelib import openupgrade
@openupgrade.migrate(use_env=True)
def migrate(env, version):
if not version:
return
# Associate already created toilets fund to new xml record
covid_fund = env["product.template"].search(
[("default_code", "=", "coronavirus")]
)
if covid_fu... | <commit_before>from openupgradelib import openupgrade
@openupgrade.migrate(use_env=True)
def migrate(env, version):
if not version:
return
# Associate already created toilets fund to new xml record
covid_fund = env["product.template"].search(
[("default_code", "=", "toilet")]
)
i... | from openupgradelib import openupgrade
@openupgrade.migrate(use_env=True)
def migrate(env, version):
if not version:
return
# Associate already created toilets fund to new xml record
covid_fund = env["product.template"].search(
[("default_code", "=", "coronavirus")]
)
if covid_fu... | from openupgradelib import openupgrade
@openupgrade.migrate(use_env=True)
def migrate(env, version):
if not version:
return
# Associate already created toilets fund to new xml record
covid_fund = env["product.template"].search(
[("default_code", "=", "toilet")]
)
if covid_fund:
... | <commit_before>from openupgradelib import openupgrade
@openupgrade.migrate(use_env=True)
def migrate(env, version):
if not version:
return
# Associate already created toilets fund to new xml record
covid_fund = env["product.template"].search(
[("default_code", "=", "toilet")]
)
i... |
8923d10fc831afe7ade5dad4e14167f3525396b6 | scripts/nipy_4dto3D.py | scripts/nipy_4dto3D.py | #!/usr/bin/env python
''' Tiny script to write 4D files in any format that we read (nifti,
analyze, MINC, at the moment, as nifti 3D files '''
import os
import sys
import nipy.io.imageformats as nii
if __name__ == '__main__':
try:
fname = sys.argv[1]
except IndexError:
raise OSError('Expecti... | #!/usr/bin/env python
''' Tiny script to write 4D files in any format that we read (nifti,
analyze, MINC, at the moment, as nifti 3D files '''
import os
import nipy.externals.argparse as argparse
import nipy.io.imageformats as nii
def main():
# create the parser
parser = argparse.ArgumentParser()
# add ... | Use argparse for 4D to 3D | Use argparse for 4D to 3D | Python | bsd-3-clause | yarikoptic/NiPy-OLD,yarikoptic/NiPy-OLD | #!/usr/bin/env python
''' Tiny script to write 4D files in any format that we read (nifti,
analyze, MINC, at the moment, as nifti 3D files '''
import os
import sys
import nipy.io.imageformats as nii
if __name__ == '__main__':
try:
fname = sys.argv[1]
except IndexError:
raise OSError('Expecti... | #!/usr/bin/env python
''' Tiny script to write 4D files in any format that we read (nifti,
analyze, MINC, at the moment, as nifti 3D files '''
import os
import nipy.externals.argparse as argparse
import nipy.io.imageformats as nii
def main():
# create the parser
parser = argparse.ArgumentParser()
# add ... | <commit_before>#!/usr/bin/env python
''' Tiny script to write 4D files in any format that we read (nifti,
analyze, MINC, at the moment, as nifti 3D files '''
import os
import sys
import nipy.io.imageformats as nii
if __name__ == '__main__':
try:
fname = sys.argv[1]
except IndexError:
raise O... | #!/usr/bin/env python
''' Tiny script to write 4D files in any format that we read (nifti,
analyze, MINC, at the moment, as nifti 3D files '''
import os
import nipy.externals.argparse as argparse
import nipy.io.imageformats as nii
def main():
# create the parser
parser = argparse.ArgumentParser()
# add ... | #!/usr/bin/env python
''' Tiny script to write 4D files in any format that we read (nifti,
analyze, MINC, at the moment, as nifti 3D files '''
import os
import sys
import nipy.io.imageformats as nii
if __name__ == '__main__':
try:
fname = sys.argv[1]
except IndexError:
raise OSError('Expecti... | <commit_before>#!/usr/bin/env python
''' Tiny script to write 4D files in any format that we read (nifti,
analyze, MINC, at the moment, as nifti 3D files '''
import os
import sys
import nipy.io.imageformats as nii
if __name__ == '__main__':
try:
fname = sys.argv[1]
except IndexError:
raise O... |
ffff9d10862391289e4fba8ac120983ac6368200 | setup.py | setup.py | from setuptools import setup
setup(
name='cmsplugin-biography',
version='0.0.1',
packages=['cmsplugin_biography', 'cmsplugin_biography.migrations', ],
install_requires=[
'django-cms',
'djangocms-text-ckeditor==1.0.9',
'easy-thumbnails==1.2',
],
author='Kevin Richardson'... | from setuptools import setup
setup(
name='cmsplugin-biography',
version='0.0.1',
packages=['cmsplugin_biography', 'cmsplugin_biography.migrations', ],
install_requires=[
'django-cms',
'djangocms-text-ckeditor==1.0.9',
'easy-thumbnails==1.2',
],
author='Kevin Richardson'... | Mark package as not zip_safe | Mark package as not zip_safe
This package needs access to its templates to function. Thus, the
zip_safe flag has been set to False to tell setuptools to not
install the package's egg as a zip file.
See http://pythonhosted.org/distribute/setuptools.html#setting-the-zip-safe-flag
for further information.
| Python | mit | kfr2/cmsplugin-biography | from setuptools import setup
setup(
name='cmsplugin-biography',
version='0.0.1',
packages=['cmsplugin_biography', 'cmsplugin_biography.migrations', ],
install_requires=[
'django-cms',
'djangocms-text-ckeditor==1.0.9',
'easy-thumbnails==1.2',
],
author='Kevin Richardson'... | from setuptools import setup
setup(
name='cmsplugin-biography',
version='0.0.1',
packages=['cmsplugin_biography', 'cmsplugin_biography.migrations', ],
install_requires=[
'django-cms',
'djangocms-text-ckeditor==1.0.9',
'easy-thumbnails==1.2',
],
author='Kevin Richardson'... | <commit_before>from setuptools import setup
setup(
name='cmsplugin-biography',
version='0.0.1',
packages=['cmsplugin_biography', 'cmsplugin_biography.migrations', ],
install_requires=[
'django-cms',
'djangocms-text-ckeditor==1.0.9',
'easy-thumbnails==1.2',
],
author='Ke... | from setuptools import setup
setup(
name='cmsplugin-biography',
version='0.0.1',
packages=['cmsplugin_biography', 'cmsplugin_biography.migrations', ],
install_requires=[
'django-cms',
'djangocms-text-ckeditor==1.0.9',
'easy-thumbnails==1.2',
],
author='Kevin Richardson'... | from setuptools import setup
setup(
name='cmsplugin-biography',
version='0.0.1',
packages=['cmsplugin_biography', 'cmsplugin_biography.migrations', ],
install_requires=[
'django-cms',
'djangocms-text-ckeditor==1.0.9',
'easy-thumbnails==1.2',
],
author='Kevin Richardson'... | <commit_before>from setuptools import setup
setup(
name='cmsplugin-biography',
version='0.0.1',
packages=['cmsplugin_biography', 'cmsplugin_biography.migrations', ],
install_requires=[
'django-cms',
'djangocms-text-ckeditor==1.0.9',
'easy-thumbnails==1.2',
],
author='Ke... |
427d3625f26b4a7f3533162e949ed941fa3fe89e | setup.py | setup.py | from setuptools import setup, find_packages
setup(
name='panoptescli',
version='1.1-pre',
url='https://github.com/zooniverse/panoptes-cli',
author='Adam McMaster',
author_email='[email protected]',
description=(
'A command-line client for Panoptes, the API behind the Zooniverse'
)... | from setuptools import setup, find_packages
setup(
name='panoptescli',
version='1.1-pre',
url='https://github.com/zooniverse/panoptes-cli',
author='Adam McMaster',
author_email='[email protected]',
description=(
'A command-line client for Panoptes, the API behind the Zooniverse'
)... | Update click requirement from <6.8,>=6.7 to >=6.7,<7.1 | Update click requirement from <6.8,>=6.7 to >=6.7,<7.1
Updates the requirements on [click](https://github.com/pallets/click) to permit the latest version.
- [Release notes](https://github.com/pallets/click/releases)
- [Changelog](https://github.com/pallets/click/blob/master/docs/changelog.rst)
- [Commits](https://gith... | Python | apache-2.0 | zooniverse/panoptes-cli | from setuptools import setup, find_packages
setup(
name='panoptescli',
version='1.1-pre',
url='https://github.com/zooniverse/panoptes-cli',
author='Adam McMaster',
author_email='[email protected]',
description=(
'A command-line client for Panoptes, the API behind the Zooniverse'
)... | from setuptools import setup, find_packages
setup(
name='panoptescli',
version='1.1-pre',
url='https://github.com/zooniverse/panoptes-cli',
author='Adam McMaster',
author_email='[email protected]',
description=(
'A command-line client for Panoptes, the API behind the Zooniverse'
)... | <commit_before>from setuptools import setup, find_packages
setup(
name='panoptescli',
version='1.1-pre',
url='https://github.com/zooniverse/panoptes-cli',
author='Adam McMaster',
author_email='[email protected]',
description=(
'A command-line client for Panoptes, the API behind the Zo... | from setuptools import setup, find_packages
setup(
name='panoptescli',
version='1.1-pre',
url='https://github.com/zooniverse/panoptes-cli',
author='Adam McMaster',
author_email='[email protected]',
description=(
'A command-line client for Panoptes, the API behind the Zooniverse'
)... | from setuptools import setup, find_packages
setup(
name='panoptescli',
version='1.1-pre',
url='https://github.com/zooniverse/panoptes-cli',
author='Adam McMaster',
author_email='[email protected]',
description=(
'A command-line client for Panoptes, the API behind the Zooniverse'
)... | <commit_before>from setuptools import setup, find_packages
setup(
name='panoptescli',
version='1.1-pre',
url='https://github.com/zooniverse/panoptes-cli',
author='Adam McMaster',
author_email='[email protected]',
description=(
'A command-line client for Panoptes, the API behind the Zo... |
ebb3ea0d72835c4acdc38ba241cf8fd4f828c5cd | setup.py | setup.py | from distutils.core import setup, Extension
import sys
ext_modules = [
Extension('classified._platform',
['src/classified._platform.c'],
extra_compile_args=[
'-DPLATFORM_%s' % (sys.platform.upper()),
'-Wunused',
]
)
]
setup(
name = 'classified',
... | from distutils.core import setup, Extension
import sys
ext_modules = [
Extension('classified._platform',
['src/classified._platform.c'],
extra_compile_args=[
'-DPLATFORM_%s' % (sys.platform.upper()),
'-Wunused',
]
)
]
setup(
name = 'classified',
... | Move probes to their own directory | Move probes to their own directory
| Python | mit | tehmaze/classified,tehmaze/classified,tehmaze/classified | from distutils.core import setup, Extension
import sys
ext_modules = [
Extension('classified._platform',
['src/classified._platform.c'],
extra_compile_args=[
'-DPLATFORM_%s' % (sys.platform.upper()),
'-Wunused',
]
)
]
setup(
name = 'classified',
... | from distutils.core import setup, Extension
import sys
ext_modules = [
Extension('classified._platform',
['src/classified._platform.c'],
extra_compile_args=[
'-DPLATFORM_%s' % (sys.platform.upper()),
'-Wunused',
]
)
]
setup(
name = 'classified',
... | <commit_before>from distutils.core import setup, Extension
import sys
ext_modules = [
Extension('classified._platform',
['src/classified._platform.c'],
extra_compile_args=[
'-DPLATFORM_%s' % (sys.platform.upper()),
'-Wunused',
]
)
]
setup(
name = '... | from distutils.core import setup, Extension
import sys
ext_modules = [
Extension('classified._platform',
['src/classified._platform.c'],
extra_compile_args=[
'-DPLATFORM_%s' % (sys.platform.upper()),
'-Wunused',
]
)
]
setup(
name = 'classified',
... | from distutils.core import setup, Extension
import sys
ext_modules = [
Extension('classified._platform',
['src/classified._platform.c'],
extra_compile_args=[
'-DPLATFORM_%s' % (sys.platform.upper()),
'-Wunused',
]
)
]
setup(
name = 'classified',
... | <commit_before>from distutils.core import setup, Extension
import sys
ext_modules = [
Extension('classified._platform',
['src/classified._platform.c'],
extra_compile_args=[
'-DPLATFORM_%s' % (sys.platform.upper()),
'-Wunused',
]
)
]
setup(
name = '... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.