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
4932279ce1b43162c8c37cabd4e62e0620f4e3ce
python/marvin/core/exceptions.py
python/marvin/core/exceptions.py
#!/usr/bin/env python # encoding: utf-8 """ exceptions.py Licensed under a 3-clause BSD license. Revision history: 13 Feb 2016 J. Sánchez-Gallego Initial version """ from __future__ import division from __future__ import print_function __all__ = ['MarvinError', 'MarvinUserWarning', 'MarvinSkippedTestWa...
#!/usr/bin/env python # encoding: utf-8 """ exceptions.py Licensed under a 3-clause BSD license. Revision history: 13 Feb 2016 J. Sánchez-Gallego Initial version """ from __future__ import division from __future__ import print_function __all__ = ['MarvinError', 'MarvinUserWarning', 'MarvinSkippedTestWa...
Fix another occurence of same typo
Fix another occurence of same typo
Python
bsd-3-clause
albireox/marvin,bretthandrews/marvin,albireox/marvin,sdss/marvin,albireox/marvin,sdss/marvin,sdss/marvin,albireox/marvin,bretthandrews/marvin,bretthandrews/marvin,bretthandrews/marvin,sdss/marvin
#!/usr/bin/env python # encoding: utf-8 """ exceptions.py Licensed under a 3-clause BSD license. Revision history: 13 Feb 2016 J. Sánchez-Gallego Initial version """ from __future__ import division from __future__ import print_function __all__ = ['MarvinError', 'MarvinUserWarning', 'MarvinSkippedTestWa...
#!/usr/bin/env python # encoding: utf-8 """ exceptions.py Licensed under a 3-clause BSD license. Revision history: 13 Feb 2016 J. Sánchez-Gallego Initial version """ from __future__ import division from __future__ import print_function __all__ = ['MarvinError', 'MarvinUserWarning', 'MarvinSkippedTestWa...
<commit_before>#!/usr/bin/env python # encoding: utf-8 """ exceptions.py Licensed under a 3-clause BSD license. Revision history: 13 Feb 2016 J. Sánchez-Gallego Initial version """ from __future__ import division from __future__ import print_function __all__ = ['MarvinError', 'MarvinUserWarning', 'Marv...
#!/usr/bin/env python # encoding: utf-8 """ exceptions.py Licensed under a 3-clause BSD license. Revision history: 13 Feb 2016 J. Sánchez-Gallego Initial version """ from __future__ import division from __future__ import print_function __all__ = ['MarvinError', 'MarvinUserWarning', 'MarvinSkippedTestWa...
#!/usr/bin/env python # encoding: utf-8 """ exceptions.py Licensed under a 3-clause BSD license. Revision history: 13 Feb 2016 J. Sánchez-Gallego Initial version """ from __future__ import division from __future__ import print_function __all__ = ['MarvinError', 'MarvinUserWarning', 'MarvinSkippedTestWa...
<commit_before>#!/usr/bin/env python # encoding: utf-8 """ exceptions.py Licensed under a 3-clause BSD license. Revision history: 13 Feb 2016 J. Sánchez-Gallego Initial version """ from __future__ import division from __future__ import print_function __all__ = ['MarvinError', 'MarvinUserWarning', 'Marv...
4db9c0139b42cdaf7c22ac2032b5edfec9394ce4
mopidy/frontends/mpd/protocol/connection.py
mopidy/frontends/mpd/protocol/connection.py
from mopidy import settings from mopidy.frontends.mpd.protocol import handle_pattern from mopidy.frontends.mpd.exceptions import MpdPasswordError @handle_pattern(r'^close$') def close(context): """ *musicpd.org, connection section:* ``close`` Closes the connection to MPD. """ context....
from mopidy import settings from mopidy.frontends.mpd.protocol import handle_pattern from mopidy.frontends.mpd.exceptions import MpdPasswordError @handle_pattern(r'^close$') def close(context): """ *musicpd.org, connection section:* ``close`` Closes the connection to MPD. """ context....
Update TODO for MPD command 'kill'
Update TODO for MPD command 'kill'
Python
apache-2.0
dbrgn/mopidy,diandiankan/mopidy,rawdlite/mopidy,adamcik/mopidy,vrs01/mopidy,tkem/mopidy,ali/mopidy,ZenithDK/mopidy,vrs01/mopidy,pacificIT/mopidy,hkariti/mopidy,kingosticks/mopidy,bacontext/mopidy,glogiotatidis/mopidy,jodal/mopidy,kingosticks/mopidy,swak/mopidy,quartz55/mopidy,quartz55/mopidy,mopidy/mopidy,swak/mopidy,Z...
from mopidy import settings from mopidy.frontends.mpd.protocol import handle_pattern from mopidy.frontends.mpd.exceptions import MpdPasswordError @handle_pattern(r'^close$') def close(context): """ *musicpd.org, connection section:* ``close`` Closes the connection to MPD. """ context....
from mopidy import settings from mopidy.frontends.mpd.protocol import handle_pattern from mopidy.frontends.mpd.exceptions import MpdPasswordError @handle_pattern(r'^close$') def close(context): """ *musicpd.org, connection section:* ``close`` Closes the connection to MPD. """ context....
<commit_before>from mopidy import settings from mopidy.frontends.mpd.protocol import handle_pattern from mopidy.frontends.mpd.exceptions import MpdPasswordError @handle_pattern(r'^close$') def close(context): """ *musicpd.org, connection section:* ``close`` Closes the connection to MPD. "...
from mopidy import settings from mopidy.frontends.mpd.protocol import handle_pattern from mopidy.frontends.mpd.exceptions import MpdPasswordError @handle_pattern(r'^close$') def close(context): """ *musicpd.org, connection section:* ``close`` Closes the connection to MPD. """ context....
from mopidy import settings from mopidy.frontends.mpd.protocol import handle_pattern from mopidy.frontends.mpd.exceptions import MpdPasswordError @handle_pattern(r'^close$') def close(context): """ *musicpd.org, connection section:* ``close`` Closes the connection to MPD. """ context....
<commit_before>from mopidy import settings from mopidy.frontends.mpd.protocol import handle_pattern from mopidy.frontends.mpd.exceptions import MpdPasswordError @handle_pattern(r'^close$') def close(context): """ *musicpd.org, connection section:* ``close`` Closes the connection to MPD. "...
e8fb50e265d62086fa2501f55e7763e49b775440
scripts/generate-s3-post-url-data.py
scripts/generate-s3-post-url-data.py
#!/usr/bin/env python """ This script will create a presigned url and fields for POSTING to an s3 bucket. This allows someone without permissions on the bucket to upload a file. This script must be run by an entity with the right permissions on the bucket. The url will expire after 600 seconds. Usage: scripts/genera...
#!/usr/bin/env python """ This script will create a presigned url and fields for POSTING to an s3 bucket. This allows someone without permissions on the bucket to upload a file. This script must be run by an entity with the right permissions on the bucket. The url will expire after 600 seconds. Usage: scripts/genera...
Apply bucket-owner-read acl to uploaded db dumps
Apply bucket-owner-read acl to uploaded db dumps As per https://docs.aws.amazon.com/AmazonS3/latest/dev/crr-troubleshoot.html > By default, the bucket owner does not have any permissions on the objects created by <another> account. And the replication configuration replicates only the objects for which the bucket own...
Python
mit
alphagov/digitalmarketplace-aws,alphagov/digitalmarketplace-aws,alphagov/digitalmarketplace-aws
#!/usr/bin/env python """ This script will create a presigned url and fields for POSTING to an s3 bucket. This allows someone without permissions on the bucket to upload a file. This script must be run by an entity with the right permissions on the bucket. The url will expire after 600 seconds. Usage: scripts/genera...
#!/usr/bin/env python """ This script will create a presigned url and fields for POSTING to an s3 bucket. This allows someone without permissions on the bucket to upload a file. This script must be run by an entity with the right permissions on the bucket. The url will expire after 600 seconds. Usage: scripts/genera...
<commit_before>#!/usr/bin/env python """ This script will create a presigned url and fields for POSTING to an s3 bucket. This allows someone without permissions on the bucket to upload a file. This script must be run by an entity with the right permissions on the bucket. The url will expire after 600 seconds. Usage:...
#!/usr/bin/env python """ This script will create a presigned url and fields for POSTING to an s3 bucket. This allows someone without permissions on the bucket to upload a file. This script must be run by an entity with the right permissions on the bucket. The url will expire after 600 seconds. Usage: scripts/genera...
#!/usr/bin/env python """ This script will create a presigned url and fields for POSTING to an s3 bucket. This allows someone without permissions on the bucket to upload a file. This script must be run by an entity with the right permissions on the bucket. The url will expire after 600 seconds. Usage: scripts/genera...
<commit_before>#!/usr/bin/env python """ This script will create a presigned url and fields for POSTING to an s3 bucket. This allows someone without permissions on the bucket to upload a file. This script must be run by an entity with the right permissions on the bucket. The url will expire after 600 seconds. Usage:...
5d57c43ba7a01dc0f94ab41e4014484d1b78c1cb
django_polymorphic_auth/admin.py
django_polymorphic_auth/admin.py
from django.conf import settings from django.contrib import admin from django_polymorphic_auth.models import User from django_polymorphic_auth.usertypes.email.models import EmailUser from django_polymorphic_auth.usertypes.username.models import UsernameUser from polymorphic.admin import \ PolymorphicParentModelAdmi...
from django.conf import settings from django.contrib import admin from django.contrib.auth.forms import UserChangeForm from django_polymorphic_auth.models import User from django_polymorphic_auth.usertypes.email.models import EmailUser from django_polymorphic_auth.usertypes.username.models import UsernameUser from poly...
Integrate `UserChangeForm` so we get nice password fields.
Integrate `UserChangeForm` so we get nice password fields.
Python
mit
whembed197923/django-polymorphic-auth,ixc/django-polymorphic-auth
from django.conf import settings from django.contrib import admin from django_polymorphic_auth.models import User from django_polymorphic_auth.usertypes.email.models import EmailUser from django_polymorphic_auth.usertypes.username.models import UsernameUser from polymorphic.admin import \ PolymorphicParentModelAdmi...
from django.conf import settings from django.contrib import admin from django.contrib.auth.forms import UserChangeForm from django_polymorphic_auth.models import User from django_polymorphic_auth.usertypes.email.models import EmailUser from django_polymorphic_auth.usertypes.username.models import UsernameUser from poly...
<commit_before>from django.conf import settings from django.contrib import admin from django_polymorphic_auth.models import User from django_polymorphic_auth.usertypes.email.models import EmailUser from django_polymorphic_auth.usertypes.username.models import UsernameUser from polymorphic.admin import \ Polymorphic...
from django.conf import settings from django.contrib import admin from django.contrib.auth.forms import UserChangeForm from django_polymorphic_auth.models import User from django_polymorphic_auth.usertypes.email.models import EmailUser from django_polymorphic_auth.usertypes.username.models import UsernameUser from poly...
from django.conf import settings from django.contrib import admin from django_polymorphic_auth.models import User from django_polymorphic_auth.usertypes.email.models import EmailUser from django_polymorphic_auth.usertypes.username.models import UsernameUser from polymorphic.admin import \ PolymorphicParentModelAdmi...
<commit_before>from django.conf import settings from django.contrib import admin from django_polymorphic_auth.models import User from django_polymorphic_auth.usertypes.email.models import EmailUser from django_polymorphic_auth.usertypes.username.models import UsernameUser from polymorphic.admin import \ Polymorphic...
998da5c8d68dff5ad612847a2d16fb6464e30bc2
semillas_backend/users/models.py
semillas_backend/users/models.py
# -*- coding: utf-8 -*- from __future__ import unicode_literals, absolute_import from django.contrib.auth.models import AbstractUser from django.core.urlresolvers import reverse from django.db import models from django.utils.encoding import python_2_unicode_compatible from django.utils.translation import ugettext_lazy...
# -*- coding: utf-8 -*- from __future__ import unicode_literals, absolute_import from django.contrib.auth.models import AbstractUser from django.core.urlresolvers import reverse from django.db import models from django.utils.encoding import python_2_unicode_compatible from django.utils.translation import ugettext_lazy...
Test for uploading files to /media/ folder in S3
Test for uploading files to /media/ folder in S3
Python
mit
Semillas/semillas_platform,Semillas/semillas_backend,Semillas/semillas_platform,Semillas/semillas_backend,Semillas/semillas_backend,Semillas/semillas_platform,Semillas/semillas_backend,Semillas/semillas_platform
# -*- coding: utf-8 -*- from __future__ import unicode_literals, absolute_import from django.contrib.auth.models import AbstractUser from django.core.urlresolvers import reverse from django.db import models from django.utils.encoding import python_2_unicode_compatible from django.utils.translation import ugettext_lazy...
# -*- coding: utf-8 -*- from __future__ import unicode_literals, absolute_import from django.contrib.auth.models import AbstractUser from django.core.urlresolvers import reverse from django.db import models from django.utils.encoding import python_2_unicode_compatible from django.utils.translation import ugettext_lazy...
<commit_before># -*- coding: utf-8 -*- from __future__ import unicode_literals, absolute_import from django.contrib.auth.models import AbstractUser from django.core.urlresolvers import reverse from django.db import models from django.utils.encoding import python_2_unicode_compatible from django.utils.translation impor...
# -*- coding: utf-8 -*- from __future__ import unicode_literals, absolute_import from django.contrib.auth.models import AbstractUser from django.core.urlresolvers import reverse from django.db import models from django.utils.encoding import python_2_unicode_compatible from django.utils.translation import ugettext_lazy...
# -*- coding: utf-8 -*- from __future__ import unicode_literals, absolute_import from django.contrib.auth.models import AbstractUser from django.core.urlresolvers import reverse from django.db import models from django.utils.encoding import python_2_unicode_compatible from django.utils.translation import ugettext_lazy...
<commit_before># -*- coding: utf-8 -*- from __future__ import unicode_literals, absolute_import from django.contrib.auth.models import AbstractUser from django.core.urlresolvers import reverse from django.db import models from django.utils.encoding import python_2_unicode_compatible from django.utils.translation impor...
bcf7d7eb689ec4e926a659bce3bf8301c23bd7e0
test/utu_test.py
test/utu_test.py
import utu import unittest def run_test(test): runner = unittest.runner.TextTestRunner() loader = unittest.loader.defaultTestLoader test = loader.loadTestsFromTestCase(test) runner.run(test) class UtuTest(unittest.TestCase): def test_sanity(self): # XXX should work out why I cannot use an ...
import utu import unittest def invoke(test): runner = unittest.runner.TextTestRunner() loader = unittest.loader.defaultTestLoader test = loader.loadTestsFromTestCase(test) runner.run(test) class UtuTest(unittest.TestCase): def test_sanity(self): # XXX should work out why I cannot use an or...
Rename run_test to invoke to avoid confusing nosetests
Rename run_test to invoke to avoid confusing nosetests
Python
bsd-2-clause
p/utu
import utu import unittest def run_test(test): runner = unittest.runner.TextTestRunner() loader = unittest.loader.defaultTestLoader test = loader.loadTestsFromTestCase(test) runner.run(test) class UtuTest(unittest.TestCase): def test_sanity(self): # XXX should work out why I cannot use an ...
import utu import unittest def invoke(test): runner = unittest.runner.TextTestRunner() loader = unittest.loader.defaultTestLoader test = loader.loadTestsFromTestCase(test) runner.run(test) class UtuTest(unittest.TestCase): def test_sanity(self): # XXX should work out why I cannot use an or...
<commit_before>import utu import unittest def run_test(test): runner = unittest.runner.TextTestRunner() loader = unittest.loader.defaultTestLoader test = loader.loadTestsFromTestCase(test) runner.run(test) class UtuTest(unittest.TestCase): def test_sanity(self): # XXX should work out why I...
import utu import unittest def invoke(test): runner = unittest.runner.TextTestRunner() loader = unittest.loader.defaultTestLoader test = loader.loadTestsFromTestCase(test) runner.run(test) class UtuTest(unittest.TestCase): def test_sanity(self): # XXX should work out why I cannot use an or...
import utu import unittest def run_test(test): runner = unittest.runner.TextTestRunner() loader = unittest.loader.defaultTestLoader test = loader.loadTestsFromTestCase(test) runner.run(test) class UtuTest(unittest.TestCase): def test_sanity(self): # XXX should work out why I cannot use an ...
<commit_before>import utu import unittest def run_test(test): runner = unittest.runner.TextTestRunner() loader = unittest.loader.defaultTestLoader test = loader.loadTestsFromTestCase(test) runner.run(test) class UtuTest(unittest.TestCase): def test_sanity(self): # XXX should work out why I...
be093e7df91ca68e4e9c73e37d18042cc5029b87
bootstrap/conf/salt/state/run-tracking-db/scripts/import_sample_data.py
bootstrap/conf/salt/state/run-tracking-db/scripts/import_sample_data.py
import pandas as pd import sys df = pd.read_csv(sys.argv[1]) df.columns = [c.lower() for c in df.columns] from sqlalchemy import create_engine engine = create_engine('postgresql://postgresql.service.consul:5432/germline_genotype_tracking') try: df.to_sql("pcawg_samples", engine) except ValueError as e: if s...
import pandas as pd import sys df = pd.read_csv(sys.argv[1]) df.columns = [c.lower() for c in df.columns] from sqlalchemy import create_engine engine = create_engine('postgresql://pcawg_admin:pcawg@postgresql.service.consul:5432/germline_genotype_tracking') try: df.to_sql("pcawg_samples", engine) except ValueEr...
Add DB credentials to sqlalchemy connection.
Add DB credentials to sqlalchemy connection.
Python
mit
llevar/germline-regenotyper,llevar/germline-regenotyper
import pandas as pd import sys df = pd.read_csv(sys.argv[1]) df.columns = [c.lower() for c in df.columns] from sqlalchemy import create_engine engine = create_engine('postgresql://postgresql.service.consul:5432/germline_genotype_tracking') try: df.to_sql("pcawg_samples", engine) except ValueError as e: if s...
import pandas as pd import sys df = pd.read_csv(sys.argv[1]) df.columns = [c.lower() for c in df.columns] from sqlalchemy import create_engine engine = create_engine('postgresql://pcawg_admin:pcawg@postgresql.service.consul:5432/germline_genotype_tracking') try: df.to_sql("pcawg_samples", engine) except ValueEr...
<commit_before>import pandas as pd import sys df = pd.read_csv(sys.argv[1]) df.columns = [c.lower() for c in df.columns] from sqlalchemy import create_engine engine = create_engine('postgresql://postgresql.service.consul:5432/germline_genotype_tracking') try: df.to_sql("pcawg_samples", engine) except ValueError...
import pandas as pd import sys df = pd.read_csv(sys.argv[1]) df.columns = [c.lower() for c in df.columns] from sqlalchemy import create_engine engine = create_engine('postgresql://pcawg_admin:pcawg@postgresql.service.consul:5432/germline_genotype_tracking') try: df.to_sql("pcawg_samples", engine) except ValueEr...
import pandas as pd import sys df = pd.read_csv(sys.argv[1]) df.columns = [c.lower() for c in df.columns] from sqlalchemy import create_engine engine = create_engine('postgresql://postgresql.service.consul:5432/germline_genotype_tracking') try: df.to_sql("pcawg_samples", engine) except ValueError as e: if s...
<commit_before>import pandas as pd import sys df = pd.read_csv(sys.argv[1]) df.columns = [c.lower() for c in df.columns] from sqlalchemy import create_engine engine = create_engine('postgresql://postgresql.service.consul:5432/germline_genotype_tracking') try: df.to_sql("pcawg_samples", engine) except ValueError...
6194e5b9cb1a07f96e1844155863fe622f11bb91
ella/newman/context_processors.py
ella/newman/context_processors.py
from django.conf import settings def newman_media(request): """ Inject NEWMAN_MEDIA_URL to template. Use NEWMAN_MEDIA_PREFIX value from settings, if not available, use MEDIA_URL + 'newman_media/' combination """ uri = getattr(settings, 'NEWMAN_MEDIA_URL', None) if not uri: uri = getattr...
from django.conf import settings def newman_media(request): """ Inject NEWMAN_MEDIA_URL to template. Use NEWMAN_MEDIA_PREFIX value from settings, if not available, use MEDIA_URL + 'newman_media/' combination """ uri = getattr(settings, 'NEWMAN_MEDIA_PREFIX', None) if not uri: uri = geta...
Make code consistent with comments
Make code consistent with comments
Python
bsd-3-clause
WhiskeyMedia/ella,petrlosa/ella,whalerock/ella,MichalMaM/ella,whalerock/ella,ella/ella,whalerock/ella,petrlosa/ella,MichalMaM/ella,WhiskeyMedia/ella
from django.conf import settings def newman_media(request): """ Inject NEWMAN_MEDIA_URL to template. Use NEWMAN_MEDIA_PREFIX value from settings, if not available, use MEDIA_URL + 'newman_media/' combination """ uri = getattr(settings, 'NEWMAN_MEDIA_URL', None) if not uri: uri = getattr...
from django.conf import settings def newman_media(request): """ Inject NEWMAN_MEDIA_URL to template. Use NEWMAN_MEDIA_PREFIX value from settings, if not available, use MEDIA_URL + 'newman_media/' combination """ uri = getattr(settings, 'NEWMAN_MEDIA_PREFIX', None) if not uri: uri = geta...
<commit_before>from django.conf import settings def newman_media(request): """ Inject NEWMAN_MEDIA_URL to template. Use NEWMAN_MEDIA_PREFIX value from settings, if not available, use MEDIA_URL + 'newman_media/' combination """ uri = getattr(settings, 'NEWMAN_MEDIA_URL', None) if not uri: ...
from django.conf import settings def newman_media(request): """ Inject NEWMAN_MEDIA_URL to template. Use NEWMAN_MEDIA_PREFIX value from settings, if not available, use MEDIA_URL + 'newman_media/' combination """ uri = getattr(settings, 'NEWMAN_MEDIA_PREFIX', None) if not uri: uri = geta...
from django.conf import settings def newman_media(request): """ Inject NEWMAN_MEDIA_URL to template. Use NEWMAN_MEDIA_PREFIX value from settings, if not available, use MEDIA_URL + 'newman_media/' combination """ uri = getattr(settings, 'NEWMAN_MEDIA_URL', None) if not uri: uri = getattr...
<commit_before>from django.conf import settings def newman_media(request): """ Inject NEWMAN_MEDIA_URL to template. Use NEWMAN_MEDIA_PREFIX value from settings, if not available, use MEDIA_URL + 'newman_media/' combination """ uri = getattr(settings, 'NEWMAN_MEDIA_URL', None) if not uri: ...
4f183ee9c24814cdb136f39effb9d932058650d5
generate_resume.py
generate_resume.py
import argparse import jinja2 import os import types import yaml from debug.debug import dprint def load_templates(template_dir=os.path.join(os.getcwd(), 'template')): loader = jinja2.FileSystemLoader(template_dir) environment = jinja2.environment.Environment(loader=loader) return environment if __name__...
import argparse import jinja2 import os import yaml from debug.debug import dprint def load_templates(template_dir=os.path.join(os.getcwd(), 'template')): loader = jinja2.FileSystemLoader(template_dir) environment = jinja2.environment.Environment(loader=loader) return environment if __name__ == "__main__...
Remove a ton of metaclass complexity
Remove a ton of metaclass complexity If I'd read the jinja2 documentation, I'd have seen that dotted notation is equivalent to subscript notation, which means metaclasses and generated classes aren't necessary. At all. Note-to-self for the future: RTFM.
Python
mit
sjbarag/poorly-named-resume-generator,sjbarag/poorly-named-resume-generator
import argparse import jinja2 import os import types import yaml from debug.debug import dprint def load_templates(template_dir=os.path.join(os.getcwd(), 'template')): loader = jinja2.FileSystemLoader(template_dir) environment = jinja2.environment.Environment(loader=loader) return environment if __name__...
import argparse import jinja2 import os import yaml from debug.debug import dprint def load_templates(template_dir=os.path.join(os.getcwd(), 'template')): loader = jinja2.FileSystemLoader(template_dir) environment = jinja2.environment.Environment(loader=loader) return environment if __name__ == "__main__...
<commit_before>import argparse import jinja2 import os import types import yaml from debug.debug import dprint def load_templates(template_dir=os.path.join(os.getcwd(), 'template')): loader = jinja2.FileSystemLoader(template_dir) environment = jinja2.environment.Environment(loader=loader) return environme...
import argparse import jinja2 import os import yaml from debug.debug import dprint def load_templates(template_dir=os.path.join(os.getcwd(), 'template')): loader = jinja2.FileSystemLoader(template_dir) environment = jinja2.environment.Environment(loader=loader) return environment if __name__ == "__main__...
import argparse import jinja2 import os import types import yaml from debug.debug import dprint def load_templates(template_dir=os.path.join(os.getcwd(), 'template')): loader = jinja2.FileSystemLoader(template_dir) environment = jinja2.environment.Environment(loader=loader) return environment if __name__...
<commit_before>import argparse import jinja2 import os import types import yaml from debug.debug import dprint def load_templates(template_dir=os.path.join(os.getcwd(), 'template')): loader = jinja2.FileSystemLoader(template_dir) environment = jinja2.environment.Environment(loader=loader) return environme...
f313c9c476f6ae441f65567552ed835e96c62cb3
avocado/tests/settings.py
avocado/tests/settings.py
DATABASES = { 'default': { 'ENGINE': 'django.db.backends.sqlite3', } } MODELTREES = { 'default': { 'model': 'tests.Employee' } } INSTALLED_APPS = ( 'avocado', 'avocado.meta', 'avocado.tests', ) COVERAGE_MODULES = ( 'avocado.meta.formatters', 'avocado.meta.exporters...
DATABASES = { 'default': { 'ENGINE': 'django.db.backends.sqlite3', } } MODELTREES = { 'default': { 'model': 'tests.Employee' } } INSTALLED_APPS = ( 'avocado', 'avocado.meta', 'avocado.tests', ) COVERAGE_MODULES = ( 'avocado.meta.formatters', 'avocado.meta.exporters...
Add json exporter module to modules coveraged
Add json exporter module to modules coveraged
Python
bsd-2-clause
murphyke/avocado,murphyke/avocado,murphyke/avocado,murphyke/avocado
DATABASES = { 'default': { 'ENGINE': 'django.db.backends.sqlite3', } } MODELTREES = { 'default': { 'model': 'tests.Employee' } } INSTALLED_APPS = ( 'avocado', 'avocado.meta', 'avocado.tests', ) COVERAGE_MODULES = ( 'avocado.meta.formatters', 'avocado.meta.exporters...
DATABASES = { 'default': { 'ENGINE': 'django.db.backends.sqlite3', } } MODELTREES = { 'default': { 'model': 'tests.Employee' } } INSTALLED_APPS = ( 'avocado', 'avocado.meta', 'avocado.tests', ) COVERAGE_MODULES = ( 'avocado.meta.formatters', 'avocado.meta.exporters...
<commit_before>DATABASES = { 'default': { 'ENGINE': 'django.db.backends.sqlite3', } } MODELTREES = { 'default': { 'model': 'tests.Employee' } } INSTALLED_APPS = ( 'avocado', 'avocado.meta', 'avocado.tests', ) COVERAGE_MODULES = ( 'avocado.meta.formatters', 'avocado...
DATABASES = { 'default': { 'ENGINE': 'django.db.backends.sqlite3', } } MODELTREES = { 'default': { 'model': 'tests.Employee' } } INSTALLED_APPS = ( 'avocado', 'avocado.meta', 'avocado.tests', ) COVERAGE_MODULES = ( 'avocado.meta.formatters', 'avocado.meta.exporters...
DATABASES = { 'default': { 'ENGINE': 'django.db.backends.sqlite3', } } MODELTREES = { 'default': { 'model': 'tests.Employee' } } INSTALLED_APPS = ( 'avocado', 'avocado.meta', 'avocado.tests', ) COVERAGE_MODULES = ( 'avocado.meta.formatters', 'avocado.meta.exporters...
<commit_before>DATABASES = { 'default': { 'ENGINE': 'django.db.backends.sqlite3', } } MODELTREES = { 'default': { 'model': 'tests.Employee' } } INSTALLED_APPS = ( 'avocado', 'avocado.meta', 'avocado.tests', ) COVERAGE_MODULES = ( 'avocado.meta.formatters', 'avocado...
51b362ab66ed8a1a793dc9995a6f06067230085b
geomdl/__init__.py
geomdl/__init__.py
""" This package contains native Python implementations of several `The NURBS Book <http://www.springer.com/gp/book/9783642973857>`_ algorithms for generating B-spline / NURBS curves and surfaces. It also provides a data structure for storing elements required for evaluation these curves and surfaces. Please follow the...
""" This package contains native Python implementations of several `The NURBS Book <http://www.springer.com/gp/book/9783642973857>`_ algorithms for generating B-spline / NURBS curves and surfaces. It also provides a data structure for storing elements required for evaluation these curves and surfaces. Please follow the...
Disable import * as it seems to cause some unnecessary trouble
Disable import * as it seems to cause some unnecessary trouble
Python
mit
orbingol/NURBS-Python,orbingol/NURBS-Python
""" This package contains native Python implementations of several `The NURBS Book <http://www.springer.com/gp/book/9783642973857>`_ algorithms for generating B-spline / NURBS curves and surfaces. It also provides a data structure for storing elements required for evaluation these curves and surfaces. Please follow the...
""" This package contains native Python implementations of several `The NURBS Book <http://www.springer.com/gp/book/9783642973857>`_ algorithms for generating B-spline / NURBS curves and surfaces. It also provides a data structure for storing elements required for evaluation these curves and surfaces. Please follow the...
<commit_before>""" This package contains native Python implementations of several `The NURBS Book <http://www.springer.com/gp/book/9783642973857>`_ algorithms for generating B-spline / NURBS curves and surfaces. It also provides a data structure for storing elements required for evaluation these curves and surfaces. Pl...
""" This package contains native Python implementations of several `The NURBS Book <http://www.springer.com/gp/book/9783642973857>`_ algorithms for generating B-spline / NURBS curves and surfaces. It also provides a data structure for storing elements required for evaluation these curves and surfaces. Please follow the...
""" This package contains native Python implementations of several `The NURBS Book <http://www.springer.com/gp/book/9783642973857>`_ algorithms for generating B-spline / NURBS curves and surfaces. It also provides a data structure for storing elements required for evaluation these curves and surfaces. Please follow the...
<commit_before>""" This package contains native Python implementations of several `The NURBS Book <http://www.springer.com/gp/book/9783642973857>`_ algorithms for generating B-spline / NURBS curves and surfaces. It also provides a data structure for storing elements required for evaluation these curves and surfaces. Pl...
e71f23f0bef4307831b240ee162bd9e2cf84e212
hoomd/pytest/dummy.py
hoomd/pytest/dummy.py
from hoomd.triggers import Trigger from hoomd.meta import _Operation, _TriggeredOperation class DummySimulation: def __init__(self): self.state = DummyState() self.operations = DummyOperations() self._cpp_sys = DummySystem() class DummySystem: def __init__(self): self.dummy_l...
from hoomd.triggers import Trigger from hoomd.meta import _Operation, _TriggeredOperation class DummySimulation: def __init__(self): self.state = DummyState() self.operations = DummyOperations() self._cpp_sys = DummySystem() class DummySystem: def __init__(self): self.dummy_l...
Include attach method in DummyOperation
Include attach method in DummyOperation
Python
bsd-3-clause
joaander/hoomd-blue,joaander/hoomd-blue,joaander/hoomd-blue,joaander/hoomd-blue,joaander/hoomd-blue,joaander/hoomd-blue
from hoomd.triggers import Trigger from hoomd.meta import _Operation, _TriggeredOperation class DummySimulation: def __init__(self): self.state = DummyState() self.operations = DummyOperations() self._cpp_sys = DummySystem() class DummySystem: def __init__(self): self.dummy_l...
from hoomd.triggers import Trigger from hoomd.meta import _Operation, _TriggeredOperation class DummySimulation: def __init__(self): self.state = DummyState() self.operations = DummyOperations() self._cpp_sys = DummySystem() class DummySystem: def __init__(self): self.dummy_l...
<commit_before>from hoomd.triggers import Trigger from hoomd.meta import _Operation, _TriggeredOperation class DummySimulation: def __init__(self): self.state = DummyState() self.operations = DummyOperations() self._cpp_sys = DummySystem() class DummySystem: def __init__(self): ...
from hoomd.triggers import Trigger from hoomd.meta import _Operation, _TriggeredOperation class DummySimulation: def __init__(self): self.state = DummyState() self.operations = DummyOperations() self._cpp_sys = DummySystem() class DummySystem: def __init__(self): self.dummy_l...
from hoomd.triggers import Trigger from hoomd.meta import _Operation, _TriggeredOperation class DummySimulation: def __init__(self): self.state = DummyState() self.operations = DummyOperations() self._cpp_sys = DummySystem() class DummySystem: def __init__(self): self.dummy_l...
<commit_before>from hoomd.triggers import Trigger from hoomd.meta import _Operation, _TriggeredOperation class DummySimulation: def __init__(self): self.state = DummyState() self.operations = DummyOperations() self._cpp_sys = DummySystem() class DummySystem: def __init__(self): ...
c5ae3a8708023039b877a47bcfedec6997ec1583
geokey_wegovnow/conversions.py
geokey_wegovnow/conversions.py
"""Methods for converting data between systems or formats.""" def make_cm_url(url): """Turns a Geokey url into a Community Maps url.""" protocol, address = url.split('//') address_parts = address.split('/') new_address_parts = [] for i, part in enumerate(address_parts): if part == 'api': ...
"""Methods for converting data between systems or formats.""" def make_cm_url(url): """Turns a Geokey url into a Community Maps url.""" protocol, address = url.split('//') address_parts = address.split('/') new_address_parts = [] for i, part in enumerate(address_parts): if part == 'api': ...
Fix get_link_title for non-string keys and values. Include heading and main as possible titles.
Fix get_link_title for non-string keys and values. Include heading and main as possible titles.
Python
mit
ExCiteS/geokey-wegovnow,ExCiteS/geokey-wegovnow
"""Methods for converting data between systems or formats.""" def make_cm_url(url): """Turns a Geokey url into a Community Maps url.""" protocol, address = url.split('//') address_parts = address.split('/') new_address_parts = [] for i, part in enumerate(address_parts): if part == 'api': ...
"""Methods for converting data between systems or formats.""" def make_cm_url(url): """Turns a Geokey url into a Community Maps url.""" protocol, address = url.split('//') address_parts = address.split('/') new_address_parts = [] for i, part in enumerate(address_parts): if part == 'api': ...
<commit_before>"""Methods for converting data between systems or formats.""" def make_cm_url(url): """Turns a Geokey url into a Community Maps url.""" protocol, address = url.split('//') address_parts = address.split('/') new_address_parts = [] for i, part in enumerate(address_parts): if p...
"""Methods for converting data between systems or formats.""" def make_cm_url(url): """Turns a Geokey url into a Community Maps url.""" protocol, address = url.split('//') address_parts = address.split('/') new_address_parts = [] for i, part in enumerate(address_parts): if part == 'api': ...
"""Methods for converting data between systems or formats.""" def make_cm_url(url): """Turns a Geokey url into a Community Maps url.""" protocol, address = url.split('//') address_parts = address.split('/') new_address_parts = [] for i, part in enumerate(address_parts): if part == 'api': ...
<commit_before>"""Methods for converting data between systems or formats.""" def make_cm_url(url): """Turns a Geokey url into a Community Maps url.""" protocol, address = url.split('//') address_parts = address.split('/') new_address_parts = [] for i, part in enumerate(address_parts): if p...
892b1f04ba6f6dde0953c061409fb4eb05935634
bot/action/internationalization.py
bot/action/internationalization.py
import gettext from bot.action.core.action import IntermediateAction LOCALE_DIR = "locales" TRANSLATION_DOMAIN = "telegram-bot" DEFAULT_LANGUAGE = "en" class InternationalizationAction(IntermediateAction): def __init__(self): super().__init__() self.cached_translations = {} self.default...
import gettext from bot.action.core.action import IntermediateAction LOCALE_DIR = "locales" TRANSLATION_DOMAIN = "telegram-bot" DEFAULT_LANGUAGE = "en" CACHED_TRANSLATIONS = {} class InternationalizationAction(IntermediateAction): def __init__(self): super().__init__() self.default_translation...
Make CACHED_TRANSLATIONS global, fix get_value typo
Make CACHED_TRANSLATIONS global, fix get_value typo
Python
agpl-3.0
alvarogzp/telegram-bot,alvarogzp/telegram-bot
import gettext from bot.action.core.action import IntermediateAction LOCALE_DIR = "locales" TRANSLATION_DOMAIN = "telegram-bot" DEFAULT_LANGUAGE = "en" class InternationalizationAction(IntermediateAction): def __init__(self): super().__init__() self.cached_translations = {} self.default...
import gettext from bot.action.core.action import IntermediateAction LOCALE_DIR = "locales" TRANSLATION_DOMAIN = "telegram-bot" DEFAULT_LANGUAGE = "en" CACHED_TRANSLATIONS = {} class InternationalizationAction(IntermediateAction): def __init__(self): super().__init__() self.default_translation...
<commit_before>import gettext from bot.action.core.action import IntermediateAction LOCALE_DIR = "locales" TRANSLATION_DOMAIN = "telegram-bot" DEFAULT_LANGUAGE = "en" class InternationalizationAction(IntermediateAction): def __init__(self): super().__init__() self.cached_translations = {} ...
import gettext from bot.action.core.action import IntermediateAction LOCALE_DIR = "locales" TRANSLATION_DOMAIN = "telegram-bot" DEFAULT_LANGUAGE = "en" CACHED_TRANSLATIONS = {} class InternationalizationAction(IntermediateAction): def __init__(self): super().__init__() self.default_translation...
import gettext from bot.action.core.action import IntermediateAction LOCALE_DIR = "locales" TRANSLATION_DOMAIN = "telegram-bot" DEFAULT_LANGUAGE = "en" class InternationalizationAction(IntermediateAction): def __init__(self): super().__init__() self.cached_translations = {} self.default...
<commit_before>import gettext from bot.action.core.action import IntermediateAction LOCALE_DIR = "locales" TRANSLATION_DOMAIN = "telegram-bot" DEFAULT_LANGUAGE = "en" class InternationalizationAction(IntermediateAction): def __init__(self): super().__init__() self.cached_translations = {} ...
62549a211ff41e2b84a9b085e784649efc76c5d9
apps/domain/tests/conftest.py
apps/domain/tests/conftest.py
import pytest import sys, os myPath = os.path.dirname(os.path.abspath(__file__)) sys.path.append(myPath + "/../src/") from app import create_app @pytest.fixture(scope="function", autouse=True) def app(): return create_app() @pytest.fixture def client(app): return app.test_client()
import pytest import sys, os myPath = os.path.dirname(os.path.abspath(__file__)) sys.path.append(myPath + "/../src/") from app import create_app @pytest.fixture(scope="function", autouse=True) def app(): db_path = "sqlite:///databasenetwork.db" return create_app(test_config={"SQLALCHEMY_DATABASE_URI": db_pa...
Update unit test app() fixture
Update unit test app() fixture
Python
apache-2.0
OpenMined/PySyft,OpenMined/PySyft,OpenMined/PySyft,OpenMined/PySyft
import pytest import sys, os myPath = os.path.dirname(os.path.abspath(__file__)) sys.path.append(myPath + "/../src/") from app import create_app @pytest.fixture(scope="function", autouse=True) def app(): return create_app() @pytest.fixture def client(app): return app.test_client() Update unit test app() ...
import pytest import sys, os myPath = os.path.dirname(os.path.abspath(__file__)) sys.path.append(myPath + "/../src/") from app import create_app @pytest.fixture(scope="function", autouse=True) def app(): db_path = "sqlite:///databasenetwork.db" return create_app(test_config={"SQLALCHEMY_DATABASE_URI": db_pa...
<commit_before>import pytest import sys, os myPath = os.path.dirname(os.path.abspath(__file__)) sys.path.append(myPath + "/../src/") from app import create_app @pytest.fixture(scope="function", autouse=True) def app(): return create_app() @pytest.fixture def client(app): return app.test_client() <commit_m...
import pytest import sys, os myPath = os.path.dirname(os.path.abspath(__file__)) sys.path.append(myPath + "/../src/") from app import create_app @pytest.fixture(scope="function", autouse=True) def app(): db_path = "sqlite:///databasenetwork.db" return create_app(test_config={"SQLALCHEMY_DATABASE_URI": db_pa...
import pytest import sys, os myPath = os.path.dirname(os.path.abspath(__file__)) sys.path.append(myPath + "/../src/") from app import create_app @pytest.fixture(scope="function", autouse=True) def app(): return create_app() @pytest.fixture def client(app): return app.test_client() Update unit test app() ...
<commit_before>import pytest import sys, os myPath = os.path.dirname(os.path.abspath(__file__)) sys.path.append(myPath + "/../src/") from app import create_app @pytest.fixture(scope="function", autouse=True) def app(): return create_app() @pytest.fixture def client(app): return app.test_client() <commit_m...
7f53f8da79a41591498b73356770ff1cf417adf4
byceps/services/country/service.py
byceps/services/country/service.py
""" byceps.services.country.service ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :Copyright: 2006-2021 Jochen Kupperschmidt :License: Revised BSD (see `LICENSE` file for details) """ from __future__ import annotations import codecs from dataclasses import dataclass import json from flask import current_app @dataclass(frozen=Tr...
""" byceps.services.country.service ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :Copyright: 2006-2021 Jochen Kupperschmidt :License: Revised BSD (see `LICENSE` file for details) """ from __future__ import annotations from dataclasses import dataclass import json from flask import current_app @dataclass(frozen=True) class Coun...
Remove unnecessary codec reader, fixes type issue
Remove unnecessary codec reader, fixes type issue
Python
bsd-3-clause
homeworkprod/byceps,homeworkprod/byceps,homeworkprod/byceps
""" byceps.services.country.service ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :Copyright: 2006-2021 Jochen Kupperschmidt :License: Revised BSD (see `LICENSE` file for details) """ from __future__ import annotations import codecs from dataclasses import dataclass import json from flask import current_app @dataclass(frozen=Tr...
""" byceps.services.country.service ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :Copyright: 2006-2021 Jochen Kupperschmidt :License: Revised BSD (see `LICENSE` file for details) """ from __future__ import annotations from dataclasses import dataclass import json from flask import current_app @dataclass(frozen=True) class Coun...
<commit_before>""" byceps.services.country.service ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :Copyright: 2006-2021 Jochen Kupperschmidt :License: Revised BSD (see `LICENSE` file for details) """ from __future__ import annotations import codecs from dataclasses import dataclass import json from flask import current_app @data...
""" byceps.services.country.service ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :Copyright: 2006-2021 Jochen Kupperschmidt :License: Revised BSD (see `LICENSE` file for details) """ from __future__ import annotations from dataclasses import dataclass import json from flask import current_app @dataclass(frozen=True) class Coun...
""" byceps.services.country.service ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :Copyright: 2006-2021 Jochen Kupperschmidt :License: Revised BSD (see `LICENSE` file for details) """ from __future__ import annotations import codecs from dataclasses import dataclass import json from flask import current_app @dataclass(frozen=Tr...
<commit_before>""" byceps.services.country.service ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :Copyright: 2006-2021 Jochen Kupperschmidt :License: Revised BSD (see `LICENSE` file for details) """ from __future__ import annotations import codecs from dataclasses import dataclass import json from flask import current_app @data...
6b49db80a4508c3cba7f410db8ed3f23b5234e3b
src/behavior/features/terrain.py
src/behavior/features/terrain.py
from lettuce import * import requests import json tenantList = [ "511", "615", "634", "515" ] def initialize(): with open("properties.json") as config_file: world.config = json.load(config_file) @before.each_scenario def cleanContext(feature): for tenant in tenantList: url = world.config['targetUrl'] + ...
from lettuce import * import requests import json import os tenantList = [ "511", "615", "634", "515" ] def initialize(): if os.getenv("LETTUCE_CONFIG"): filename = os.getenv("LETTUCE_CONFIG") else: filename = "properties.json" with open(filename) as config_file: world.config = json.load(config_fi...
ADD Name of the configuration file in a environment variable
ADD Name of the configuration file in a environment variable
Python
apache-2.0
telefonicaid/fiware-keypass,telefonicaid/fiware-keypass,telefonicaid/fiware-keypass
from lettuce import * import requests import json tenantList = [ "511", "615", "634", "515" ] def initialize(): with open("properties.json") as config_file: world.config = json.load(config_file) @before.each_scenario def cleanContext(feature): for tenant in tenantList: url = world.config['targetUrl'] + ...
from lettuce import * import requests import json import os tenantList = [ "511", "615", "634", "515" ] def initialize(): if os.getenv("LETTUCE_CONFIG"): filename = os.getenv("LETTUCE_CONFIG") else: filename = "properties.json" with open(filename) as config_file: world.config = json.load(config_fi...
<commit_before>from lettuce import * import requests import json tenantList = [ "511", "615", "634", "515" ] def initialize(): with open("properties.json") as config_file: world.config = json.load(config_file) @before.each_scenario def cleanContext(feature): for tenant in tenantList: url = world.config[...
from lettuce import * import requests import json import os tenantList = [ "511", "615", "634", "515" ] def initialize(): if os.getenv("LETTUCE_CONFIG"): filename = os.getenv("LETTUCE_CONFIG") else: filename = "properties.json" with open(filename) as config_file: world.config = json.load(config_fi...
from lettuce import * import requests import json tenantList = [ "511", "615", "634", "515" ] def initialize(): with open("properties.json") as config_file: world.config = json.load(config_file) @before.each_scenario def cleanContext(feature): for tenant in tenantList: url = world.config['targetUrl'] + ...
<commit_before>from lettuce import * import requests import json tenantList = [ "511", "615", "634", "515" ] def initialize(): with open("properties.json") as config_file: world.config = json.load(config_file) @before.each_scenario def cleanContext(feature): for tenant in tenantList: url = world.config[...
b9e2ee470308231f4ea4d23297f7b07fab711dba
django_lightweight_queue/task.py
django_lightweight_queue/task.py
from .job import Job from .utils import get_backend from . import app_settings class task(object): def __init__(self, queue='default'): self.queue = queue app_settings.WORKERS.setdefault(self.queue, 1) def __call__(self, fn): return TaskWrapper(fn, self.queue) class TaskWrapper(obje...
from .job import Job from .utils import get_backend from . import app_settings class task(object): def __init__(self, queue='default', timeout=None): self.queue = queue self.timeout = timeout app_settings.WORKERS.setdefault(self.queue, 1) def __call__(self, fn): return TaskWr...
Store a timeout value on the TaskWrapper, defaulting to no timeout.
Store a timeout value on the TaskWrapper, defaulting to no timeout. Signed-off-by: Chris Lamb <711c73f64afdce07b7e38039a96d2224209e9a6c@thread.com>
Python
bsd-3-clause
lamby/django-lightweight-queue,prophile/django-lightweight-queue,thread/django-lightweight-queue,thread/django-lightweight-queue,prophile/django-lightweight-queue
from .job import Job from .utils import get_backend from . import app_settings class task(object): def __init__(self, queue='default'): self.queue = queue app_settings.WORKERS.setdefault(self.queue, 1) def __call__(self, fn): return TaskWrapper(fn, self.queue) class TaskWrapper(obje...
from .job import Job from .utils import get_backend from . import app_settings class task(object): def __init__(self, queue='default', timeout=None): self.queue = queue self.timeout = timeout app_settings.WORKERS.setdefault(self.queue, 1) def __call__(self, fn): return TaskWr...
<commit_before>from .job import Job from .utils import get_backend from . import app_settings class task(object): def __init__(self, queue='default'): self.queue = queue app_settings.WORKERS.setdefault(self.queue, 1) def __call__(self, fn): return TaskWrapper(fn, self.queue) class T...
from .job import Job from .utils import get_backend from . import app_settings class task(object): def __init__(self, queue='default', timeout=None): self.queue = queue self.timeout = timeout app_settings.WORKERS.setdefault(self.queue, 1) def __call__(self, fn): return TaskWr...
from .job import Job from .utils import get_backend from . import app_settings class task(object): def __init__(self, queue='default'): self.queue = queue app_settings.WORKERS.setdefault(self.queue, 1) def __call__(self, fn): return TaskWrapper(fn, self.queue) class TaskWrapper(obje...
<commit_before>from .job import Job from .utils import get_backend from . import app_settings class task(object): def __init__(self, queue='default'): self.queue = queue app_settings.WORKERS.setdefault(self.queue, 1) def __call__(self, fn): return TaskWrapper(fn, self.queue) class T...
6bbcff384acf4ca5cb22aa80dc4032e3832817b2
wsgi/flaskapp.py
wsgi/flaskapp.py
import json import os import ieeebot from flask import Flask, request, abort from storage import Storage app = Flask(__name__) app.config['PROPAGATE_EXCEPTIONS'] = True ieeebot.logger.debug(ieeebot.TOKEN) ieeebot.logger.debug(ieeebot.DATABASE_FILE) @app.route('/ieeetestbot', methods=['POST']) def hello(): upda...
import json import os import ieeebot from flask import Flask, request, abort from storage import Storage app = Flask(__name__) app.config['PROPAGATE_EXCEPTIONS'] = True ieeebot.logger.debug(ieeebot.TOKEN) ieeebot.logger.debug(ieeebot.DATABASE_FILE) @app.route('/webhook/<token>', methods=['POST']) def hello(token=N...
Use a dynamic url to secure webhook
Use a dynamic url to secure webhook
Python
agpl-3.0
ieeeugrsb/IEEEbot
import json import os import ieeebot from flask import Flask, request, abort from storage import Storage app = Flask(__name__) app.config['PROPAGATE_EXCEPTIONS'] = True ieeebot.logger.debug(ieeebot.TOKEN) ieeebot.logger.debug(ieeebot.DATABASE_FILE) @app.route('/ieeetestbot', methods=['POST']) def hello(): upda...
import json import os import ieeebot from flask import Flask, request, abort from storage import Storage app = Flask(__name__) app.config['PROPAGATE_EXCEPTIONS'] = True ieeebot.logger.debug(ieeebot.TOKEN) ieeebot.logger.debug(ieeebot.DATABASE_FILE) @app.route('/webhook/<token>', methods=['POST']) def hello(token=N...
<commit_before>import json import os import ieeebot from flask import Flask, request, abort from storage import Storage app = Flask(__name__) app.config['PROPAGATE_EXCEPTIONS'] = True ieeebot.logger.debug(ieeebot.TOKEN) ieeebot.logger.debug(ieeebot.DATABASE_FILE) @app.route('/ieeetestbot', methods=['POST']) def he...
import json import os import ieeebot from flask import Flask, request, abort from storage import Storage app = Flask(__name__) app.config['PROPAGATE_EXCEPTIONS'] = True ieeebot.logger.debug(ieeebot.TOKEN) ieeebot.logger.debug(ieeebot.DATABASE_FILE) @app.route('/webhook/<token>', methods=['POST']) def hello(token=N...
import json import os import ieeebot from flask import Flask, request, abort from storage import Storage app = Flask(__name__) app.config['PROPAGATE_EXCEPTIONS'] = True ieeebot.logger.debug(ieeebot.TOKEN) ieeebot.logger.debug(ieeebot.DATABASE_FILE) @app.route('/ieeetestbot', methods=['POST']) def hello(): upda...
<commit_before>import json import os import ieeebot from flask import Flask, request, abort from storage import Storage app = Flask(__name__) app.config['PROPAGATE_EXCEPTIONS'] = True ieeebot.logger.debug(ieeebot.TOKEN) ieeebot.logger.debug(ieeebot.DATABASE_FILE) @app.route('/ieeetestbot', methods=['POST']) def he...
cd3b92d75c331de13a25693822cac57dc82d8e81
mla_game/apps/transcript/management/commands/fake_game_one_gameplay.py
mla_game/apps/transcript/management/commands/fake_game_one_gameplay.py
import random from django.core.management.base import BaseCommand from django.contrib.auth.models import User from ...models import ( Transcript, TranscriptPhraseVote ) from ...tasks import update_transcript_stats class Command(BaseCommand): help = 'Creates random votes for 5 phrases in a random transcript'...
import random from django.core.management.base import BaseCommand from django.contrib.auth.models import User from ...models import ( Transcript, TranscriptPhraseVote ) from ...tasks import update_transcript_stats class Command(BaseCommand): help = 'Creates random votes for 5 phrases in a random transcript'...
Use a smaller set of users in fake game two gameplay
Use a smaller set of users in fake game two gameplay
Python
mit
WGBH/FixIt,WGBH/FixIt,WGBH/FixIt
import random from django.core.management.base import BaseCommand from django.contrib.auth.models import User from ...models import ( Transcript, TranscriptPhraseVote ) from ...tasks import update_transcript_stats class Command(BaseCommand): help = 'Creates random votes for 5 phrases in a random transcript'...
import random from django.core.management.base import BaseCommand from django.contrib.auth.models import User from ...models import ( Transcript, TranscriptPhraseVote ) from ...tasks import update_transcript_stats class Command(BaseCommand): help = 'Creates random votes for 5 phrases in a random transcript'...
<commit_before>import random from django.core.management.base import BaseCommand from django.contrib.auth.models import User from ...models import ( Transcript, TranscriptPhraseVote ) from ...tasks import update_transcript_stats class Command(BaseCommand): help = 'Creates random votes for 5 phrases in a ran...
import random from django.core.management.base import BaseCommand from django.contrib.auth.models import User from ...models import ( Transcript, TranscriptPhraseVote ) from ...tasks import update_transcript_stats class Command(BaseCommand): help = 'Creates random votes for 5 phrases in a random transcript'...
import random from django.core.management.base import BaseCommand from django.contrib.auth.models import User from ...models import ( Transcript, TranscriptPhraseVote ) from ...tasks import update_transcript_stats class Command(BaseCommand): help = 'Creates random votes for 5 phrases in a random transcript'...
<commit_before>import random from django.core.management.base import BaseCommand from django.contrib.auth.models import User from ...models import ( Transcript, TranscriptPhraseVote ) from ...tasks import update_transcript_stats class Command(BaseCommand): help = 'Creates random votes for 5 phrases in a ran...
b850d8ef9ef2453445c14f4c78a058fe51211983
trac/upgrades/db11.py
trac/upgrades/db11.py
import os.path import shutil sql = """ -- Remove empty values from the milestone list DELETE FROM milestone WHERE COALESCE(name,'')=''; -- Add a description column to the version table, and remove unnamed versions CREATE TEMP TABLE version_old AS SELECT * FROM version; DROP TABLE version; CREATE TABLE version ( ...
import os.path import shutil sql = """ -- Remove empty values from the milestone list DELETE FROM milestone WHERE COALESCE(name,'')=''; -- Add a description column to the version table, and remove unnamed versions CREATE TEMP TABLE version_old AS SELECT * FROM version; DROP TABLE version; CREATE TABLE version ( ...
Fix typo in upgrade script
Fix typo in upgrade script
Python
bsd-3-clause
pkdevbox/trac,pkdevbox/trac,pkdevbox/trac,pkdevbox/trac
import os.path import shutil sql = """ -- Remove empty values from the milestone list DELETE FROM milestone WHERE COALESCE(name,'')=''; -- Add a description column to the version table, and remove unnamed versions CREATE TEMP TABLE version_old AS SELECT * FROM version; DROP TABLE version; CREATE TABLE version ( ...
import os.path import shutil sql = """ -- Remove empty values from the milestone list DELETE FROM milestone WHERE COALESCE(name,'')=''; -- Add a description column to the version table, and remove unnamed versions CREATE TEMP TABLE version_old AS SELECT * FROM version; DROP TABLE version; CREATE TABLE version ( ...
<commit_before>import os.path import shutil sql = """ -- Remove empty values from the milestone list DELETE FROM milestone WHERE COALESCE(name,'')=''; -- Add a description column to the version table, and remove unnamed versions CREATE TEMP TABLE version_old AS SELECT * FROM version; DROP TABLE version; CREATE TABLE ...
import os.path import shutil sql = """ -- Remove empty values from the milestone list DELETE FROM milestone WHERE COALESCE(name,'')=''; -- Add a description column to the version table, and remove unnamed versions CREATE TEMP TABLE version_old AS SELECT * FROM version; DROP TABLE version; CREATE TABLE version ( ...
import os.path import shutil sql = """ -- Remove empty values from the milestone list DELETE FROM milestone WHERE COALESCE(name,'')=''; -- Add a description column to the version table, and remove unnamed versions CREATE TEMP TABLE version_old AS SELECT * FROM version; DROP TABLE version; CREATE TABLE version ( ...
<commit_before>import os.path import shutil sql = """ -- Remove empty values from the milestone list DELETE FROM milestone WHERE COALESCE(name,'')=''; -- Add a description column to the version table, and remove unnamed versions CREATE TEMP TABLE version_old AS SELECT * FROM version; DROP TABLE version; CREATE TABLE ...
1b0fbe54406f22017bd5f40cee52333f31807272
hardware/sense_hat/marble_maze.py
hardware/sense_hat/marble_maze.py
# based on https://www.raspberrypi.org/learning/sense-hat-marble-maze/worksheet/ from sense_hat import SenseHat import time sense = SenseHat() sense.clear() time.sleep(0.5) r = (255, 0, 0 ) b = (0,0,0) maze = [[r,r,r,r,r,r,r,r], [r,b,b,b,b,b,b,r], [r,r,r,b,r,b,b,r], [r,b,r,b,r,r,r,r], ...
# based on https://www.raspberrypi.org/learning/sense-hat-marble-maze/worksheet/ from sense_hat import SenseHat import time sense = SenseHat() sense.clear() time.sleep(0.5) r = (255, 0, 0 ) b = (0,0,0) w = (255, 255, 255 ) x = 1 y = 1 maze = [[r,r,r,r,r,r,r,r], [r,b,b,b,b,b,b,r], [r,r,r,b,r,b,b,r]...
Add static white marble to sense hat maze
Add static white marble to sense hat maze
Python
mit
claremacrae/raspi_code,claremacrae/raspi_code,claremacrae/raspi_code
# based on https://www.raspberrypi.org/learning/sense-hat-marble-maze/worksheet/ from sense_hat import SenseHat import time sense = SenseHat() sense.clear() time.sleep(0.5) r = (255, 0, 0 ) b = (0,0,0) maze = [[r,r,r,r,r,r,r,r], [r,b,b,b,b,b,b,r], [r,r,r,b,r,b,b,r], [r,b,r,b,r,r,r,r], ...
# based on https://www.raspberrypi.org/learning/sense-hat-marble-maze/worksheet/ from sense_hat import SenseHat import time sense = SenseHat() sense.clear() time.sleep(0.5) r = (255, 0, 0 ) b = (0,0,0) w = (255, 255, 255 ) x = 1 y = 1 maze = [[r,r,r,r,r,r,r,r], [r,b,b,b,b,b,b,r], [r,r,r,b,r,b,b,r]...
<commit_before># based on https://www.raspberrypi.org/learning/sense-hat-marble-maze/worksheet/ from sense_hat import SenseHat import time sense = SenseHat() sense.clear() time.sleep(0.5) r = (255, 0, 0 ) b = (0,0,0) maze = [[r,r,r,r,r,r,r,r], [r,b,b,b,b,b,b,r], [r,r,r,b,r,b,b,r], [r,b,r,b,...
# based on https://www.raspberrypi.org/learning/sense-hat-marble-maze/worksheet/ from sense_hat import SenseHat import time sense = SenseHat() sense.clear() time.sleep(0.5) r = (255, 0, 0 ) b = (0,0,0) w = (255, 255, 255 ) x = 1 y = 1 maze = [[r,r,r,r,r,r,r,r], [r,b,b,b,b,b,b,r], [r,r,r,b,r,b,b,r]...
# based on https://www.raspberrypi.org/learning/sense-hat-marble-maze/worksheet/ from sense_hat import SenseHat import time sense = SenseHat() sense.clear() time.sleep(0.5) r = (255, 0, 0 ) b = (0,0,0) maze = [[r,r,r,r,r,r,r,r], [r,b,b,b,b,b,b,r], [r,r,r,b,r,b,b,r], [r,b,r,b,r,r,r,r], ...
<commit_before># based on https://www.raspberrypi.org/learning/sense-hat-marble-maze/worksheet/ from sense_hat import SenseHat import time sense = SenseHat() sense.clear() time.sleep(0.5) r = (255, 0, 0 ) b = (0,0,0) maze = [[r,r,r,r,r,r,r,r], [r,b,b,b,b,b,b,r], [r,r,r,b,r,b,b,r], [r,b,r,b,...
3d98b426b3eb9b1ddc42e4726f7b0c99c2e488e3
scripts/generate_setup_builtin_functions.py
scripts/generate_setup_builtin_functions.py
# Copyright 2008 Paul Hodge import os, string def run(functionsDirectory, outputFilename): print "dir is: " +functionsDirectory files = os.listdir(functionsDirectory) functionNames = [] for file in files: if file.endswith('.cpp'): function_name = os.path.split(file)[1][:-4] ...
# Copyright 2008 Paul Hodge import os, string def run(functionsDirectory, outputFilename): print "dir is: " +functionsDirectory files = os.listdir(functionsDirectory) functionNames = [] for file in files: if file.endswith('.cpp'): function_name = os.path.split(file)[1][:-4] ...
Enforce consistent results for generated code
Enforce consistent results for generated code
Python
mit
andyfischer/circa,andyfischer/circa,andyfischer/circa,andyfischer/circa
# Copyright 2008 Paul Hodge import os, string def run(functionsDirectory, outputFilename): print "dir is: " +functionsDirectory files = os.listdir(functionsDirectory) functionNames = [] for file in files: if file.endswith('.cpp'): function_name = os.path.split(file)[1][:-4] ...
# Copyright 2008 Paul Hodge import os, string def run(functionsDirectory, outputFilename): print "dir is: " +functionsDirectory files = os.listdir(functionsDirectory) functionNames = [] for file in files: if file.endswith('.cpp'): function_name = os.path.split(file)[1][:-4] ...
<commit_before># Copyright 2008 Paul Hodge import os, string def run(functionsDirectory, outputFilename): print "dir is: " +functionsDirectory files = os.listdir(functionsDirectory) functionNames = [] for file in files: if file.endswith('.cpp'): function_name = os.path.split(file...
# Copyright 2008 Paul Hodge import os, string def run(functionsDirectory, outputFilename): print "dir is: " +functionsDirectory files = os.listdir(functionsDirectory) functionNames = [] for file in files: if file.endswith('.cpp'): function_name = os.path.split(file)[1][:-4] ...
# Copyright 2008 Paul Hodge import os, string def run(functionsDirectory, outputFilename): print "dir is: " +functionsDirectory files = os.listdir(functionsDirectory) functionNames = [] for file in files: if file.endswith('.cpp'): function_name = os.path.split(file)[1][:-4] ...
<commit_before># Copyright 2008 Paul Hodge import os, string def run(functionsDirectory, outputFilename): print "dir is: " +functionsDirectory files = os.listdir(functionsDirectory) functionNames = [] for file in files: if file.endswith('.cpp'): function_name = os.path.split(file...
b89b6a3d609c29ed544e2ab6b0995932b475ef96
admin/common_auth/forms.py
admin/common_auth/forms.py
from __future__ import absolute_import from django import forms from django.contrib.auth.models import Group from osf.models import AdminProfile class LoginForm(forms.Form): email = forms.CharField(label=u'Email', required=True) password = forms.CharField( label=u'Password', widget=forms.Pas...
from __future__ import absolute_import from django import forms from django.contrib.auth.models import Group from osf.models import AdminProfile class LoginForm(forms.Form): email = forms.CharField(label=u'Email', required=True) password = forms.CharField( label=u'Password', widget=forms.Pas...
Exclude collection groups from ADM UI
Exclude collection groups from ADM UI
Python
apache-2.0
Johnetordoff/osf.io,adlius/osf.io,adlius/osf.io,aaxelb/osf.io,Johnetordoff/osf.io,erinspace/osf.io,mfraezz/osf.io,CenterForOpenScience/osf.io,CenterForOpenScience/osf.io,brianjgeiger/osf.io,pattisdr/osf.io,mfraezz/osf.io,baylee-d/osf.io,cslzchen/osf.io,mattclark/osf.io,HalcyonChimera/osf.io,cslzchen/osf.io,mattclark/os...
from __future__ import absolute_import from django import forms from django.contrib.auth.models import Group from osf.models import AdminProfile class LoginForm(forms.Form): email = forms.CharField(label=u'Email', required=True) password = forms.CharField( label=u'Password', widget=forms.Pas...
from __future__ import absolute_import from django import forms from django.contrib.auth.models import Group from osf.models import AdminProfile class LoginForm(forms.Form): email = forms.CharField(label=u'Email', required=True) password = forms.CharField( label=u'Password', widget=forms.Pas...
<commit_before>from __future__ import absolute_import from django import forms from django.contrib.auth.models import Group from osf.models import AdminProfile class LoginForm(forms.Form): email = forms.CharField(label=u'Email', required=True) password = forms.CharField( label=u'Password', w...
from __future__ import absolute_import from django import forms from django.contrib.auth.models import Group from osf.models import AdminProfile class LoginForm(forms.Form): email = forms.CharField(label=u'Email', required=True) password = forms.CharField( label=u'Password', widget=forms.Pas...
from __future__ import absolute_import from django import forms from django.contrib.auth.models import Group from osf.models import AdminProfile class LoginForm(forms.Form): email = forms.CharField(label=u'Email', required=True) password = forms.CharField( label=u'Password', widget=forms.Pas...
<commit_before>from __future__ import absolute_import from django import forms from django.contrib.auth.models import Group from osf.models import AdminProfile class LoginForm(forms.Form): email = forms.CharField(label=u'Email', required=True) password = forms.CharField( label=u'Password', w...
505e6ee2643dc9179565db5aad9bdddaea849b86
shipyard/rules/third-party/haproxy/build.py
shipyard/rules/third-party/haproxy/build.py
from foreman import define_parameter from templates import pods (define_parameter('image-version') .with_doc('HAProxy image version.') .with_default('1.8.9')) @pods.app_specifier def haproxy_app(_): return pods.App( name='haproxy', exec=[ '/usr/local/sbin/haproxy', '-f...
from foreman import define_parameter from templates import pods (define_parameter('image-version') .with_doc('HAProxy image version.') .with_default('2.0.3')) @pods.app_specifier def haproxy_app(_): return pods.App( name='haproxy', exec=[ '/usr/local/sbin/haproxy', '-f...
Upgrade HAProxy to version 2.0.3
Upgrade HAProxy to version 2.0.3
Python
mit
clchiou/garage,clchiou/garage,clchiou/garage,clchiou/garage
from foreman import define_parameter from templates import pods (define_parameter('image-version') .with_doc('HAProxy image version.') .with_default('1.8.9')) @pods.app_specifier def haproxy_app(_): return pods.App( name='haproxy', exec=[ '/usr/local/sbin/haproxy', '-f...
from foreman import define_parameter from templates import pods (define_parameter('image-version') .with_doc('HAProxy image version.') .with_default('2.0.3')) @pods.app_specifier def haproxy_app(_): return pods.App( name='haproxy', exec=[ '/usr/local/sbin/haproxy', '-f...
<commit_before>from foreman import define_parameter from templates import pods (define_parameter('image-version') .with_doc('HAProxy image version.') .with_default('1.8.9')) @pods.app_specifier def haproxy_app(_): return pods.App( name='haproxy', exec=[ '/usr/local/sbin/haproxy', ...
from foreman import define_parameter from templates import pods (define_parameter('image-version') .with_doc('HAProxy image version.') .with_default('2.0.3')) @pods.app_specifier def haproxy_app(_): return pods.App( name='haproxy', exec=[ '/usr/local/sbin/haproxy', '-f...
from foreman import define_parameter from templates import pods (define_parameter('image-version') .with_doc('HAProxy image version.') .with_default('1.8.9')) @pods.app_specifier def haproxy_app(_): return pods.App( name='haproxy', exec=[ '/usr/local/sbin/haproxy', '-f...
<commit_before>from foreman import define_parameter from templates import pods (define_parameter('image-version') .with_doc('HAProxy image version.') .with_default('1.8.9')) @pods.app_specifier def haproxy_app(_): return pods.App( name='haproxy', exec=[ '/usr/local/sbin/haproxy', ...
20d355c52a73e38ae421aa3e4227c2c60d6ae2ff
ckanext/inventory/logic/schema.py
ckanext/inventory/logic/schema.py
from ckan.lib.navl.validators import ignore_empty, not_empty from ckan.logic.validators import ( name_validator, boolean_validator, is_positive_integer, isodate, group_id_exists) def default_inventory_entry_schema(): schema = { 'id': [unicode, ignore_empty], 'title': [unicode, not_empty], ...
from ckan.lib.navl.validators import ignore_empty, not_empty from ckan.logic.validators import ( name_validator, boolean_validator, natural_number_validator, isodate, group_id_exists) def default_inventory_entry_schema(): schema = { 'id': [unicode, ignore_empty], 'title': [unicode, not_emp...
Allow zeros for recurring interval
Allow zeros for recurring interval
Python
apache-2.0
govro/ckanext-inventory,govro/ckanext-inventory,govro/ckanext-inventory,govro/ckanext-inventory
from ckan.lib.navl.validators import ignore_empty, not_empty from ckan.logic.validators import ( name_validator, boolean_validator, is_positive_integer, isodate, group_id_exists) def default_inventory_entry_schema(): schema = { 'id': [unicode, ignore_empty], 'title': [unicode, not_empty], ...
from ckan.lib.navl.validators import ignore_empty, not_empty from ckan.logic.validators import ( name_validator, boolean_validator, natural_number_validator, isodate, group_id_exists) def default_inventory_entry_schema(): schema = { 'id': [unicode, ignore_empty], 'title': [unicode, not_emp...
<commit_before>from ckan.lib.navl.validators import ignore_empty, not_empty from ckan.logic.validators import ( name_validator, boolean_validator, is_positive_integer, isodate, group_id_exists) def default_inventory_entry_schema(): schema = { 'id': [unicode, ignore_empty], 'title': [unicod...
from ckan.lib.navl.validators import ignore_empty, not_empty from ckan.logic.validators import ( name_validator, boolean_validator, natural_number_validator, isodate, group_id_exists) def default_inventory_entry_schema(): schema = { 'id': [unicode, ignore_empty], 'title': [unicode, not_emp...
from ckan.lib.navl.validators import ignore_empty, not_empty from ckan.logic.validators import ( name_validator, boolean_validator, is_positive_integer, isodate, group_id_exists) def default_inventory_entry_schema(): schema = { 'id': [unicode, ignore_empty], 'title': [unicode, not_empty], ...
<commit_before>from ckan.lib.navl.validators import ignore_empty, not_empty from ckan.logic.validators import ( name_validator, boolean_validator, is_positive_integer, isodate, group_id_exists) def default_inventory_entry_schema(): schema = { 'id': [unicode, ignore_empty], 'title': [unicod...
133a085f40f1536d5ebb26e912d15fa3bddcc82c
manager.py
manager.py
from cement.core.foundation import CementApp import command import util.config util.config.Configuration() class Manager(CementApp): class Meta: label = 'QLDS-Manager' handlers = [ command.default.ManagerBaseController, command.setup.SetupController ] with Manage...
from cement.core.foundation import CementApp import command import util.config class Manager(CementApp): class Meta: label = 'QLDS-Manager' handlers = command.commands with Manager() as app: app.run()
Use handlers defined in command package
Use handlers defined in command package
Python
mit
rzeka/QLDS-Manager
from cement.core.foundation import CementApp import command import util.config util.config.Configuration() class Manager(CementApp): class Meta: label = 'QLDS-Manager' handlers = [ command.default.ManagerBaseController, command.setup.SetupController ] with Manage...
from cement.core.foundation import CementApp import command import util.config class Manager(CementApp): class Meta: label = 'QLDS-Manager' handlers = command.commands with Manager() as app: app.run()
<commit_before>from cement.core.foundation import CementApp import command import util.config util.config.Configuration() class Manager(CementApp): class Meta: label = 'QLDS-Manager' handlers = [ command.default.ManagerBaseController, command.setup.SetupController ...
from cement.core.foundation import CementApp import command import util.config class Manager(CementApp): class Meta: label = 'QLDS-Manager' handlers = command.commands with Manager() as app: app.run()
from cement.core.foundation import CementApp import command import util.config util.config.Configuration() class Manager(CementApp): class Meta: label = 'QLDS-Manager' handlers = [ command.default.ManagerBaseController, command.setup.SetupController ] with Manage...
<commit_before>from cement.core.foundation import CementApp import command import util.config util.config.Configuration() class Manager(CementApp): class Meta: label = 'QLDS-Manager' handlers = [ command.default.ManagerBaseController, command.setup.SetupController ...
a8515cf56837ef3f32ea53003f88275a47c4d249
src/pipeline.py
src/pipeline.py
import os import fnmatch import re import subprocess import sys import json import imp import time class pipeline(object): def __init__(self): self.name = '' self.taskId = '' self.taskPath = '' self.scriptPath = '' self.inputPath = '' self.outputPath = '' se...
import os import fnmatch import re import subprocess import sys import json import imp import time from pprint import pprint class pipeline(object): def __init__(self): self.name = '' self.taskId = '' self.taskPath = '' self.scriptPath = '' self.inputPath = '' self....
Change the way to import package dynamically
Change the way to import package dynamically
Python
mit
s4553711/HiScript
import os import fnmatch import re import subprocess import sys import json import imp import time class pipeline(object): def __init__(self): self.name = '' self.taskId = '' self.taskPath = '' self.scriptPath = '' self.inputPath = '' self.outputPath = '' se...
import os import fnmatch import re import subprocess import sys import json import imp import time from pprint import pprint class pipeline(object): def __init__(self): self.name = '' self.taskId = '' self.taskPath = '' self.scriptPath = '' self.inputPath = '' self....
<commit_before> import os import fnmatch import re import subprocess import sys import json import imp import time class pipeline(object): def __init__(self): self.name = '' self.taskId = '' self.taskPath = '' self.scriptPath = '' self.inputPath = '' self.outputPath ...
import os import fnmatch import re import subprocess import sys import json import imp import time from pprint import pprint class pipeline(object): def __init__(self): self.name = '' self.taskId = '' self.taskPath = '' self.scriptPath = '' self.inputPath = '' self....
import os import fnmatch import re import subprocess import sys import json import imp import time class pipeline(object): def __init__(self): self.name = '' self.taskId = '' self.taskPath = '' self.scriptPath = '' self.inputPath = '' self.outputPath = '' se...
<commit_before> import os import fnmatch import re import subprocess import sys import json import imp import time class pipeline(object): def __init__(self): self.name = '' self.taskId = '' self.taskPath = '' self.scriptPath = '' self.inputPath = '' self.outputPath ...
86cd447a9d724489ed3c23157d411fa4a9208b30
changes/jobs/cleanup_tasks.py
changes/jobs/cleanup_tasks.py
from __future__ import absolute_import from datetime import datetime, timedelta from changes.config import queue from changes.constants import Status from changes.models import Task from changes.queue.task import TrackedTask, tracked_task CHECK_TIME = timedelta(minutes=5) @tracked_task def cleanup_tasks(): """...
from __future__ import absolute_import from datetime import datetime, timedelta from changes.config import queue from changes.constants import Status from changes.models import Task from changes.queue.task import TrackedTask, tracked_task CHECK_TIME = timedelta(minutes=60) @tracked_task def cleanup_tasks(): ""...
Increase task check time to 1h
Increase task check time to 1h
Python
apache-2.0
wfxiang08/changes,bowlofstew/changes,wfxiang08/changes,dropbox/changes,bowlofstew/changes,wfxiang08/changes,dropbox/changes,dropbox/changes,wfxiang08/changes,bowlofstew/changes,bowlofstew/changes,dropbox/changes
from __future__ import absolute_import from datetime import datetime, timedelta from changes.config import queue from changes.constants import Status from changes.models import Task from changes.queue.task import TrackedTask, tracked_task CHECK_TIME = timedelta(minutes=5) @tracked_task def cleanup_tasks(): """...
from __future__ import absolute_import from datetime import datetime, timedelta from changes.config import queue from changes.constants import Status from changes.models import Task from changes.queue.task import TrackedTask, tracked_task CHECK_TIME = timedelta(minutes=60) @tracked_task def cleanup_tasks(): ""...
<commit_before>from __future__ import absolute_import from datetime import datetime, timedelta from changes.config import queue from changes.constants import Status from changes.models import Task from changes.queue.task import TrackedTask, tracked_task CHECK_TIME = timedelta(minutes=5) @tracked_task def cleanup_t...
from __future__ import absolute_import from datetime import datetime, timedelta from changes.config import queue from changes.constants import Status from changes.models import Task from changes.queue.task import TrackedTask, tracked_task CHECK_TIME = timedelta(minutes=60) @tracked_task def cleanup_tasks(): ""...
from __future__ import absolute_import from datetime import datetime, timedelta from changes.config import queue from changes.constants import Status from changes.models import Task from changes.queue.task import TrackedTask, tracked_task CHECK_TIME = timedelta(minutes=5) @tracked_task def cleanup_tasks(): """...
<commit_before>from __future__ import absolute_import from datetime import datetime, timedelta from changes.config import queue from changes.constants import Status from changes.models import Task from changes.queue.task import TrackedTask, tracked_task CHECK_TIME = timedelta(minutes=5) @tracked_task def cleanup_t...
1172bb29cca80486fffcfda0dea61a12f643a2e9
start_server.py
start_server.py
#!/usr/bin/env python3 # tsuserver3, an Attorney Online server # # Copyright (C) 2016 argoneus <argoneuscze@gmail.com> # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the ...
#!/usr/bin/env python3 # tsuserver3, an Attorney Online server # # Copyright (C) 2016 argoneus <argoneuscze@gmail.com> # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the ...
Install PyYAML automatically before starting server
Install PyYAML automatically before starting server
Python
agpl-3.0
Attorney-Online-Engineering-Task-Force/tsuserver3,Mariomagistr/tsuserver3
#!/usr/bin/env python3 # tsuserver3, an Attorney Online server # # Copyright (C) 2016 argoneus <argoneuscze@gmail.com> # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the ...
#!/usr/bin/env python3 # tsuserver3, an Attorney Online server # # Copyright (C) 2016 argoneus <argoneuscze@gmail.com> # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the ...
<commit_before>#!/usr/bin/env python3 # tsuserver3, an Attorney Online server # # Copyright (C) 2016 argoneus <argoneuscze@gmail.com> # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either ve...
#!/usr/bin/env python3 # tsuserver3, an Attorney Online server # # Copyright (C) 2016 argoneus <argoneuscze@gmail.com> # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the ...
#!/usr/bin/env python3 # tsuserver3, an Attorney Online server # # Copyright (C) 2016 argoneus <argoneuscze@gmail.com> # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the ...
<commit_before>#!/usr/bin/env python3 # tsuserver3, an Attorney Online server # # Copyright (C) 2016 argoneus <argoneuscze@gmail.com> # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either ve...
c42393a99435278f577b508e204bdfe1a9a6ff68
testproject/tablib_test/tests.py
testproject/tablib_test/tests.py
from django.test import TestCase from django_tablib import ModelDataset, Field from .models import TestModel class DjangoTablibTestCase(TestCase): def test_declarative_fields(self): class TestModelDataset(ModelDataset): field1 = Field() field2 = Field(attribute='field1') ...
from django.test import TestCase from django_tablib import ModelDataset, Field from .models import TestModel class DjangoTablibTestCase(TestCase): def setUp(self): TestModel.objects.create(field1='value') def test_declarative_fields(self): class TestModelDataset(ModelDataset): f...
Test that declarative fields actually work.
Test that declarative fields actually work.
Python
mit
ebrelsford/django-tablib,joshourisman/django-tablib,ebrelsford/django-tablib,joshourisman/django-tablib
from django.test import TestCase from django_tablib import ModelDataset, Field from .models import TestModel class DjangoTablibTestCase(TestCase): def test_declarative_fields(self): class TestModelDataset(ModelDataset): field1 = Field() field2 = Field(attribute='field1') ...
from django.test import TestCase from django_tablib import ModelDataset, Field from .models import TestModel class DjangoTablibTestCase(TestCase): def setUp(self): TestModel.objects.create(field1='value') def test_declarative_fields(self): class TestModelDataset(ModelDataset): f...
<commit_before>from django.test import TestCase from django_tablib import ModelDataset, Field from .models import TestModel class DjangoTablibTestCase(TestCase): def test_declarative_fields(self): class TestModelDataset(ModelDataset): field1 = Field() field2 = Field(attribute='fi...
from django.test import TestCase from django_tablib import ModelDataset, Field from .models import TestModel class DjangoTablibTestCase(TestCase): def setUp(self): TestModel.objects.create(field1='value') def test_declarative_fields(self): class TestModelDataset(ModelDataset): f...
from django.test import TestCase from django_tablib import ModelDataset, Field from .models import TestModel class DjangoTablibTestCase(TestCase): def test_declarative_fields(self): class TestModelDataset(ModelDataset): field1 = Field() field2 = Field(attribute='field1') ...
<commit_before>from django.test import TestCase from django_tablib import ModelDataset, Field from .models import TestModel class DjangoTablibTestCase(TestCase): def test_declarative_fields(self): class TestModelDataset(ModelDataset): field1 = Field() field2 = Field(attribute='fi...
3c60fd42d7ce84b0f90d80d6e04b46c8affb5ff5
maedchenbund/views.py
maedchenbund/views.py
from django.shortcuts import render from .models import Document def documents(request): docs = Document.objects.all().order_by("title") return render(request, 'home.html', {'documents': docs})
from django.contrib.auth.decorators import login_required from django.shortcuts import render from .models import Document @login_required def documents(request): docs = Document.objects.all().order_by("title") return render(request, 'home.html', {'documents': docs})
Add required login to maedchenbund
Add required login to maedchenbund
Python
mit
n2o/dpb,n2o/dpb,n2o/dpb,n2o/dpb,n2o/dpb,n2o/dpb,n2o/dpb,n2o/dpb
from django.shortcuts import render from .models import Document def documents(request): docs = Document.objects.all().order_by("title") return render(request, 'home.html', {'documents': docs}) Add required login to maedchenbund
from django.contrib.auth.decorators import login_required from django.shortcuts import render from .models import Document @login_required def documents(request): docs = Document.objects.all().order_by("title") return render(request, 'home.html', {'documents': docs})
<commit_before>from django.shortcuts import render from .models import Document def documents(request): docs = Document.objects.all().order_by("title") return render(request, 'home.html', {'documents': docs}) <commit_msg>Add required login to maedchenbund<commit_after>
from django.contrib.auth.decorators import login_required from django.shortcuts import render from .models import Document @login_required def documents(request): docs = Document.objects.all().order_by("title") return render(request, 'home.html', {'documents': docs})
from django.shortcuts import render from .models import Document def documents(request): docs = Document.objects.all().order_by("title") return render(request, 'home.html', {'documents': docs}) Add required login to maedchenbundfrom django.contrib.auth.decorators import login_required from django.shortcuts i...
<commit_before>from django.shortcuts import render from .models import Document def documents(request): docs = Document.objects.all().order_by("title") return render(request, 'home.html', {'documents': docs}) <commit_msg>Add required login to maedchenbund<commit_after>from django.contrib.auth.decorators impo...
5bbef2ebbe959dd2dcfc53272305fa249acfa17d
functional/tests/test_examples.py
functional/tests/test_examples.py
# 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 agreed to in writing, software # d...
# 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 agreed to in writing, software # d...
Revert "Skip functional tests until they are fixed"
Revert "Skip functional tests until they are fixed" This reverts commit 3946bf0e0186c8c2897f432029bad7873b6d03a0. Change-Id: Ic21137b208991c9ce738e5bf3ad5e6965b69e166
Python
apache-2.0
dtroyer/python-openstackclient,openstack/python-openstackclient,redhat-openstack/python-openstackclient,redhat-openstack/python-openstackclient,BjoernT/python-openstackclient,BjoernT/python-openstackclient,openstack/python-openstackclient,dtroyer/python-openstackclient
# 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 agreed to in writing, software # d...
# 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 agreed to in writing, software # d...
<commit_before># 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 agreed to in writing, ...
# 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 agreed to in writing, software # d...
# 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 agreed to in writing, software # d...
<commit_before># 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 agreed to in writing, ...
e68dcc13d6152b15f2b7c5c151e03437d9cda314
lib/python/mod_python/__init__.py
lib/python/mod_python/__init__.py
# # Copyright 2004 Apache Software Foundation # # 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 applicabl...
# # Copyright 2004 Apache Software Foundation # # 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 applicabl...
Fix for MODPYTHON-55 : added a version attribute to the mod_python package.
Fix for MODPYTHON-55 : added a version attribute to the mod_python package.
Python
apache-2.0
Distrotech/mod_python,Distrotech/mod_python,Distrotech/mod_python
# # Copyright 2004 Apache Software Foundation # # 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 applicabl...
# # Copyright 2004 Apache Software Foundation # # 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 applicabl...
<commit_before> # # Copyright 2004 Apache Software Foundation # # 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 requir...
# # Copyright 2004 Apache Software Foundation # # 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 applicabl...
# # Copyright 2004 Apache Software Foundation # # 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 applicabl...
<commit_before> # # Copyright 2004 Apache Software Foundation # # 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 requir...
37f6d1a693134785dbfb2cb50b4b6e562be83f1e
collection_registry_client.py
collection_registry_client.py
import json import sys, os sys.path.insert(0, os.path.abspath('./python-tastypie-client')) import tastypie_client url_root = "http://vorol-dev.cdlib.org/" path_collection_registry = "collection_registry/api/v1" url_api = url_root+path_collection_registry entrypoint_entrypoint_key = "list_entrypoint" entrypoint_sch...
import sys, os sys.path.insert(0, os.path.abspath('./python-tastypie-client')) import tastypie_client url_root = "http://vorol-dev.cdlib.org/" path_collection_registry = "collection_registry/api/v1" url_api = url_root+path_collection_registry entrypoint_entrypoint_key = "list_entrypoint" entrypoint_schema_key = "sc...
Remove json import, not needed yet
Remove json import, not needed yet
Python
bsd-3-clause
mredar/ucldc_collection_registry_client
import json import sys, os sys.path.insert(0, os.path.abspath('./python-tastypie-client')) import tastypie_client url_root = "http://vorol-dev.cdlib.org/" path_collection_registry = "collection_registry/api/v1" url_api = url_root+path_collection_registry entrypoint_entrypoint_key = "list_entrypoint" entrypoint_sch...
import sys, os sys.path.insert(0, os.path.abspath('./python-tastypie-client')) import tastypie_client url_root = "http://vorol-dev.cdlib.org/" path_collection_registry = "collection_registry/api/v1" url_api = url_root+path_collection_registry entrypoint_entrypoint_key = "list_entrypoint" entrypoint_schema_key = "sc...
<commit_before>import json import sys, os sys.path.insert(0, os.path.abspath('./python-tastypie-client')) import tastypie_client url_root = "http://vorol-dev.cdlib.org/" path_collection_registry = "collection_registry/api/v1" url_api = url_root+path_collection_registry entrypoint_entrypoint_key = "list_entrypoint"...
import sys, os sys.path.insert(0, os.path.abspath('./python-tastypie-client')) import tastypie_client url_root = "http://vorol-dev.cdlib.org/" path_collection_registry = "collection_registry/api/v1" url_api = url_root+path_collection_registry entrypoint_entrypoint_key = "list_entrypoint" entrypoint_schema_key = "sc...
import json import sys, os sys.path.insert(0, os.path.abspath('./python-tastypie-client')) import tastypie_client url_root = "http://vorol-dev.cdlib.org/" path_collection_registry = "collection_registry/api/v1" url_api = url_root+path_collection_registry entrypoint_entrypoint_key = "list_entrypoint" entrypoint_sch...
<commit_before>import json import sys, os sys.path.insert(0, os.path.abspath('./python-tastypie-client')) import tastypie_client url_root = "http://vorol-dev.cdlib.org/" path_collection_registry = "collection_registry/api/v1" url_api = url_root+path_collection_registry entrypoint_entrypoint_key = "list_entrypoint"...
230d7745f2f1bbc5099e1288ab482c92262e4126
examples/ndbc/buoy_type_request.py
examples/ndbc/buoy_type_request.py
# Copyright (c) 2018 Siphon Contributors. # Distributed under the terms of the BSD 3-Clause License. # SPDX-License-Identifier: BSD-3-Clause """ NDBC Buoy Data Request (of any type) ==================================== The NDBC keeps a 40-day recent rolling file for each buoy. This examples shows how to access the oth...
# Copyright (c) 2018 Siphon Contributors. # Distributed under the terms of the BSD 3-Clause License. # SPDX-License-Identifier: BSD-3-Clause """ NDBC Buoy Data Request (of any type) ==================================== The NDBC keeps a 40-day recent rolling file for each buoy. This examples shows how to access the oth...
Update NDBC example for removed buoy
MNT: Update NDBC example for removed buoy
Python
bsd-3-clause
Unidata/siphon
# Copyright (c) 2018 Siphon Contributors. # Distributed under the terms of the BSD 3-Clause License. # SPDX-License-Identifier: BSD-3-Clause """ NDBC Buoy Data Request (of any type) ==================================== The NDBC keeps a 40-day recent rolling file for each buoy. This examples shows how to access the oth...
# Copyright (c) 2018 Siphon Contributors. # Distributed under the terms of the BSD 3-Clause License. # SPDX-License-Identifier: BSD-3-Clause """ NDBC Buoy Data Request (of any type) ==================================== The NDBC keeps a 40-day recent rolling file for each buoy. This examples shows how to access the oth...
<commit_before># Copyright (c) 2018 Siphon Contributors. # Distributed under the terms of the BSD 3-Clause License. # SPDX-License-Identifier: BSD-3-Clause """ NDBC Buoy Data Request (of any type) ==================================== The NDBC keeps a 40-day recent rolling file for each buoy. This examples shows how to...
# Copyright (c) 2018 Siphon Contributors. # Distributed under the terms of the BSD 3-Clause License. # SPDX-License-Identifier: BSD-3-Clause """ NDBC Buoy Data Request (of any type) ==================================== The NDBC keeps a 40-day recent rolling file for each buoy. This examples shows how to access the oth...
# Copyright (c) 2018 Siphon Contributors. # Distributed under the terms of the BSD 3-Clause License. # SPDX-License-Identifier: BSD-3-Clause """ NDBC Buoy Data Request (of any type) ==================================== The NDBC keeps a 40-day recent rolling file for each buoy. This examples shows how to access the oth...
<commit_before># Copyright (c) 2018 Siphon Contributors. # Distributed under the terms of the BSD 3-Clause License. # SPDX-License-Identifier: BSD-3-Clause """ NDBC Buoy Data Request (of any type) ==================================== The NDBC keeps a 40-day recent rolling file for each buoy. This examples shows how to...
9ce2faa950086f95f5a9c1f3e4f22e0a52622d8f
luminoso_api/wrappers/account.py
luminoso_api/wrappers/account.py
from .base import BaseWrapper from .database import Database from ..constants import URL_BASE class Account(BaseWrapper): """An object encapsulating a billing account on Luminoso's servers""" def __init__(self, acct_name, session): """Construct a wrapper around a particular account name NOT...
from .base import BaseWrapper from .database import Database from ..constants import URL_BASE class Account(BaseWrapper): """An object encapsulating a billing account on Luminoso's servers""" def __init__(self, acct_name, session): """Construct a wrapper around a particular account name NOT...
Adjust Account.databases() to new return format
Adjust Account.databases() to new return format
Python
mit
LuminosoInsight/luminoso-api-client-python
from .base import BaseWrapper from .database import Database from ..constants import URL_BASE class Account(BaseWrapper): """An object encapsulating a billing account on Luminoso's servers""" def __init__(self, acct_name, session): """Construct a wrapper around a particular account name NOT...
from .base import BaseWrapper from .database import Database from ..constants import URL_BASE class Account(BaseWrapper): """An object encapsulating a billing account on Luminoso's servers""" def __init__(self, acct_name, session): """Construct a wrapper around a particular account name NOT...
<commit_before> from .base import BaseWrapper from .database import Database from ..constants import URL_BASE class Account(BaseWrapper): """An object encapsulating a billing account on Luminoso's servers""" def __init__(self, acct_name, session): """Construct a wrapper around a particular account name...
from .base import BaseWrapper from .database import Database from ..constants import URL_BASE class Account(BaseWrapper): """An object encapsulating a billing account on Luminoso's servers""" def __init__(self, acct_name, session): """Construct a wrapper around a particular account name NOT...
from .base import BaseWrapper from .database import Database from ..constants import URL_BASE class Account(BaseWrapper): """An object encapsulating a billing account on Luminoso's servers""" def __init__(self, acct_name, session): """Construct a wrapper around a particular account name NOT...
<commit_before> from .base import BaseWrapper from .database import Database from ..constants import URL_BASE class Account(BaseWrapper): """An object encapsulating a billing account on Luminoso's servers""" def __init__(self, acct_name, session): """Construct a wrapper around a particular account name...
ce889047cd06714c1da86daf787583e84a59956a
api/azure.py
api/azure.py
import os from azure.storage import * def store(image, entity, entity_id): blob_service = BlobService(account_name='shnergledata', account_key=os.environ['BLOB_KEY']) myblob = image.read() name = '/' + entity + '/' + entity_id blob_service.put_blob('images', name, myblo...
import os from azure.storage import BlobService def store(image, entity, entity_id): blob_service = BlobService(account_name='shnergledata', account_key=os.environ['BLOB_KEY']) myblob = image.read() name = '/' + entity + '/' + entity_id blob_service.put_blob('images', n...
Revert "The same thing, but their way haha"
Revert "The same thing, but their way haha" This reverts commit ab12f6cc4593e81bc426a54e8aebc1671ac34e2a.
Python
mit
shnergle/ShnergleServer
import os from azure.storage import * def store(image, entity, entity_id): blob_service = BlobService(account_name='shnergledata', account_key=os.environ['BLOB_KEY']) myblob = image.read() name = '/' + entity + '/' + entity_id blob_service.put_blob('images', name, myblo...
import os from azure.storage import BlobService def store(image, entity, entity_id): blob_service = BlobService(account_name='shnergledata', account_key=os.environ['BLOB_KEY']) myblob = image.read() name = '/' + entity + '/' + entity_id blob_service.put_blob('images', n...
<commit_before>import os from azure.storage import * def store(image, entity, entity_id): blob_service = BlobService(account_name='shnergledata', account_key=os.environ['BLOB_KEY']) myblob = image.read() name = '/' + entity + '/' + entity_id blob_service.put_blob('image...
import os from azure.storage import BlobService def store(image, entity, entity_id): blob_service = BlobService(account_name='shnergledata', account_key=os.environ['BLOB_KEY']) myblob = image.read() name = '/' + entity + '/' + entity_id blob_service.put_blob('images', n...
import os from azure.storage import * def store(image, entity, entity_id): blob_service = BlobService(account_name='shnergledata', account_key=os.environ['BLOB_KEY']) myblob = image.read() name = '/' + entity + '/' + entity_id blob_service.put_blob('images', name, myblo...
<commit_before>import os from azure.storage import * def store(image, entity, entity_id): blob_service = BlobService(account_name='shnergledata', account_key=os.environ['BLOB_KEY']) myblob = image.read() name = '/' + entity + '/' + entity_id blob_service.put_blob('image...
8898f23a429112cd80e6a2c8321b0de44aeaee7e
blanc_basic_pages/forms.py
blanc_basic_pages/forms.py
from django import forms from django.conf import settings from mptt.forms import MPTTAdminForm from .models import Page TEMPLATE_CHOICES = getattr(settings, 'PAGE_TEMPLATES', ( ('', 'Default'), )) class PageAdminForm(MPTTAdminForm): class Meta: model = Page exclude = () def __init__(s...
from django import forms from django.conf import settings from mptt.forms import MPTTAdminForm from .models import Page TEMPLATE_CHOICES = getattr(settings, 'PAGE_TEMPLATES', ( ('', 'Default'), )) class PageAdminForm(MPTTAdminForm): class Meta: model = Page exclude = () widgets = {...
Use custom widget for template choices instead
Use custom widget for template choices instead A bit more Djangonic than tweaking self.fields
Python
bsd-3-clause
blancltd/blanc-basic-pages
from django import forms from django.conf import settings from mptt.forms import MPTTAdminForm from .models import Page TEMPLATE_CHOICES = getattr(settings, 'PAGE_TEMPLATES', ( ('', 'Default'), )) class PageAdminForm(MPTTAdminForm): class Meta: model = Page exclude = () def __init__(s...
from django import forms from django.conf import settings from mptt.forms import MPTTAdminForm from .models import Page TEMPLATE_CHOICES = getattr(settings, 'PAGE_TEMPLATES', ( ('', 'Default'), )) class PageAdminForm(MPTTAdminForm): class Meta: model = Page exclude = () widgets = {...
<commit_before>from django import forms from django.conf import settings from mptt.forms import MPTTAdminForm from .models import Page TEMPLATE_CHOICES = getattr(settings, 'PAGE_TEMPLATES', ( ('', 'Default'), )) class PageAdminForm(MPTTAdminForm): class Meta: model = Page exclude = () ...
from django import forms from django.conf import settings from mptt.forms import MPTTAdminForm from .models import Page TEMPLATE_CHOICES = getattr(settings, 'PAGE_TEMPLATES', ( ('', 'Default'), )) class PageAdminForm(MPTTAdminForm): class Meta: model = Page exclude = () widgets = {...
from django import forms from django.conf import settings from mptt.forms import MPTTAdminForm from .models import Page TEMPLATE_CHOICES = getattr(settings, 'PAGE_TEMPLATES', ( ('', 'Default'), )) class PageAdminForm(MPTTAdminForm): class Meta: model = Page exclude = () def __init__(s...
<commit_before>from django import forms from django.conf import settings from mptt.forms import MPTTAdminForm from .models import Page TEMPLATE_CHOICES = getattr(settings, 'PAGE_TEMPLATES', ( ('', 'Default'), )) class PageAdminForm(MPTTAdminForm): class Meta: model = Page exclude = () ...
408297aed41966b22d8486c559716b33bc2e2984
bitbots_body_behavior/src/bitbots_body_behavior/decisions/ball_close.py
bitbots_body_behavior/src/bitbots_body_behavior/decisions/ball_close.py
from dynamic_stack_decider.abstract_decision_element import AbstractDecisionElement class BallClose(AbstractDecisionElement): def __init__(self, blackboard, dsd, parameters=None): super(BallClose, self).__init__(blackboard, dsd, parameters) self.ball_close_distance = parameters.get("distance", sel...
import math from dynamic_stack_decider.abstract_decision_element import AbstractDecisionElement class BallClose(AbstractDecisionElement): def __init__(self, blackboard, dsd, parameters=None): super(BallClose, self).__init__(blackboard, dsd, parameters) self.ball_close_distance = parameters.get("di...
Add angles to ball close decision
Add angles to ball close decision
Python
bsd-3-clause
bit-bots/bitbots_behaviour
from dynamic_stack_decider.abstract_decision_element import AbstractDecisionElement class BallClose(AbstractDecisionElement): def __init__(self, blackboard, dsd, parameters=None): super(BallClose, self).__init__(blackboard, dsd, parameters) self.ball_close_distance = parameters.get("distance", sel...
import math from dynamic_stack_decider.abstract_decision_element import AbstractDecisionElement class BallClose(AbstractDecisionElement): def __init__(self, blackboard, dsd, parameters=None): super(BallClose, self).__init__(blackboard, dsd, parameters) self.ball_close_distance = parameters.get("di...
<commit_before>from dynamic_stack_decider.abstract_decision_element import AbstractDecisionElement class BallClose(AbstractDecisionElement): def __init__(self, blackboard, dsd, parameters=None): super(BallClose, self).__init__(blackboard, dsd, parameters) self.ball_close_distance = parameters.get(...
import math from dynamic_stack_decider.abstract_decision_element import AbstractDecisionElement class BallClose(AbstractDecisionElement): def __init__(self, blackboard, dsd, parameters=None): super(BallClose, self).__init__(blackboard, dsd, parameters) self.ball_close_distance = parameters.get("di...
from dynamic_stack_decider.abstract_decision_element import AbstractDecisionElement class BallClose(AbstractDecisionElement): def __init__(self, blackboard, dsd, parameters=None): super(BallClose, self).__init__(blackboard, dsd, parameters) self.ball_close_distance = parameters.get("distance", sel...
<commit_before>from dynamic_stack_decider.abstract_decision_element import AbstractDecisionElement class BallClose(AbstractDecisionElement): def __init__(self, blackboard, dsd, parameters=None): super(BallClose, self).__init__(blackboard, dsd, parameters) self.ball_close_distance = parameters.get(...
c24dc7db961b03c947a98454fc3e8655c5f938ff
functional_tests/test_all_users.py
functional_tests/test_all_users.py
from datetime import date from django.core.urlresolvers import reverse from django.contrib.staticfiles.testing import StaticLiveServerTestCase from django.utils import formats from selenium import webdriver class HomeNewVisitorTest(StaticLiveServerTestCase): def setUp(self): self.browser = webdriver.Fire...
from datetime import date from django.core.urlresolvers import reverse from django.contrib.staticfiles.testing import StaticLiveServerTestCase from django.utils import formats from selenium import webdriver class HomeNewVisitorTest(StaticLiveServerTestCase): def setUp(self): self.browser = webdriver.Fire...
Fix css and heading test also removed localization test as no longer required
Fix css and heading test also removed localization test as no longer required
Python
mit
iAmMrinal0/django_moviealert,iAmMrinal0/django_moviealert,iAmMrinal0/django_moviealert
from datetime import date from django.core.urlresolvers import reverse from django.contrib.staticfiles.testing import StaticLiveServerTestCase from django.utils import formats from selenium import webdriver class HomeNewVisitorTest(StaticLiveServerTestCase): def setUp(self): self.browser = webdriver.Fire...
from datetime import date from django.core.urlresolvers import reverse from django.contrib.staticfiles.testing import StaticLiveServerTestCase from django.utils import formats from selenium import webdriver class HomeNewVisitorTest(StaticLiveServerTestCase): def setUp(self): self.browser = webdriver.Fire...
<commit_before>from datetime import date from django.core.urlresolvers import reverse from django.contrib.staticfiles.testing import StaticLiveServerTestCase from django.utils import formats from selenium import webdriver class HomeNewVisitorTest(StaticLiveServerTestCase): def setUp(self): self.browser =...
from datetime import date from django.core.urlresolvers import reverse from django.contrib.staticfiles.testing import StaticLiveServerTestCase from django.utils import formats from selenium import webdriver class HomeNewVisitorTest(StaticLiveServerTestCase): def setUp(self): self.browser = webdriver.Fire...
from datetime import date from django.core.urlresolvers import reverse from django.contrib.staticfiles.testing import StaticLiveServerTestCase from django.utils import formats from selenium import webdriver class HomeNewVisitorTest(StaticLiveServerTestCase): def setUp(self): self.browser = webdriver.Fire...
<commit_before>from datetime import date from django.core.urlresolvers import reverse from django.contrib.staticfiles.testing import StaticLiveServerTestCase from django.utils import formats from selenium import webdriver class HomeNewVisitorTest(StaticLiveServerTestCase): def setUp(self): self.browser =...
de6a32e4b9a94103c923188894da6455ca14956c
TopTenView.py
TopTenView.py
# coding: utf-8 # ui.View subclass for the top ten iTunes songs. # Pull requests gladly accepted. import feedparser, requests, ui url = 'https://itunes.apple.com/us/rss/topsongs/limit=10/xml' def get_image_urls(itunes_url): for entry in feedparser.parse(itunes_url).entries: yield entry['summary'].partit...
# coding: utf-8 # ui.View subclass for the top ten iTunes songs. # Pull requests gladly accepted. import feedparser, requests, ui url = 'https://itunes.apple.com/us/rss/topsongs/limit=10/xml' def get_image_urls(itunes_url): for entry in feedparser.parse(itunes_url).entries: yield entry['summary'].partit...
Move to buttons & remove hardcoding of image size
Move to buttons & remove hardcoding of image size
Python
apache-2.0
cclauss/Pythonista_ui
# coding: utf-8 # ui.View subclass for the top ten iTunes songs. # Pull requests gladly accepted. import feedparser, requests, ui url = 'https://itunes.apple.com/us/rss/topsongs/limit=10/xml' def get_image_urls(itunes_url): for entry in feedparser.parse(itunes_url).entries: yield entry['summary'].partit...
# coding: utf-8 # ui.View subclass for the top ten iTunes songs. # Pull requests gladly accepted. import feedparser, requests, ui url = 'https://itunes.apple.com/us/rss/topsongs/limit=10/xml' def get_image_urls(itunes_url): for entry in feedparser.parse(itunes_url).entries: yield entry['summary'].partit...
<commit_before># coding: utf-8 # ui.View subclass for the top ten iTunes songs. # Pull requests gladly accepted. import feedparser, requests, ui url = 'https://itunes.apple.com/us/rss/topsongs/limit=10/xml' def get_image_urls(itunes_url): for entry in feedparser.parse(itunes_url).entries: yield entry['s...
# coding: utf-8 # ui.View subclass for the top ten iTunes songs. # Pull requests gladly accepted. import feedparser, requests, ui url = 'https://itunes.apple.com/us/rss/topsongs/limit=10/xml' def get_image_urls(itunes_url): for entry in feedparser.parse(itunes_url).entries: yield entry['summary'].partit...
# coding: utf-8 # ui.View subclass for the top ten iTunes songs. # Pull requests gladly accepted. import feedparser, requests, ui url = 'https://itunes.apple.com/us/rss/topsongs/limit=10/xml' def get_image_urls(itunes_url): for entry in feedparser.parse(itunes_url).entries: yield entry['summary'].partit...
<commit_before># coding: utf-8 # ui.View subclass for the top ten iTunes songs. # Pull requests gladly accepted. import feedparser, requests, ui url = 'https://itunes.apple.com/us/rss/topsongs/limit=10/xml' def get_image_urls(itunes_url): for entry in feedparser.parse(itunes_url).entries: yield entry['s...
ceeb64c9e46a74f95178be88566fba3d7f080fa1
mica/stats/tests/test_acq_stats.py
mica/stats/tests/test_acq_stats.py
from .. import acq_stats def test_calc_stats(): acq_stats.calc_stats(17210)
import tempfile import os from .. import acq_stats def test_calc_stats(): acq_stats.calc_stats(17210) def test_make_acq_stats(): """ Save the acq stats for one obsid into a newly-created table """ # Get a temporary file, but then delete it, because _save_acq_stats will only # make a new tab...
Add a test that makes a new acq stats database
Add a test that makes a new acq stats database
Python
bsd-3-clause
sot/mica,sot/mica
from .. import acq_stats def test_calc_stats(): acq_stats.calc_stats(17210) Add a test that makes a new acq stats database
import tempfile import os from .. import acq_stats def test_calc_stats(): acq_stats.calc_stats(17210) def test_make_acq_stats(): """ Save the acq stats for one obsid into a newly-created table """ # Get a temporary file, but then delete it, because _save_acq_stats will only # make a new tab...
<commit_before>from .. import acq_stats def test_calc_stats(): acq_stats.calc_stats(17210) <commit_msg>Add a test that makes a new acq stats database<commit_after>
import tempfile import os from .. import acq_stats def test_calc_stats(): acq_stats.calc_stats(17210) def test_make_acq_stats(): """ Save the acq stats for one obsid into a newly-created table """ # Get a temporary file, but then delete it, because _save_acq_stats will only # make a new tab...
from .. import acq_stats def test_calc_stats(): acq_stats.calc_stats(17210) Add a test that makes a new acq stats databaseimport tempfile import os from .. import acq_stats def test_calc_stats(): acq_stats.calc_stats(17210) def test_make_acq_stats(): """ Save the acq stats for one obsid into a ne...
<commit_before>from .. import acq_stats def test_calc_stats(): acq_stats.calc_stats(17210) <commit_msg>Add a test that makes a new acq stats database<commit_after>import tempfile import os from .. import acq_stats def test_calc_stats(): acq_stats.calc_stats(17210) def test_make_acq_stats(): """ S...
dd0d047829e65e613e4d2e9ccd9a6411fa9e301f
test.py
test.py
from interruptingcow import timeout import time while True: # simulate waiting for laser A print("Waiting for laser A") time.sleep(2) print("laser A tripped") try: with timeout(.25, exception=RuntimeError): # perform a potentially very slow operation print("Wait for ...
from interruptingcow import timeout import time # def bTripped(): # +1 to DB # continue while True: # simulate waiting for laser A print("Waiting for laser A") time.sleep(2) print("laser A tripped") # Real code would be: # laserA.wait_for_dark() try: with timeout(.25, excep...
Add real code in comments.
Add real code in comments.
Python
apache-2.0
pjcoleman73/UVaLibRoomCount
from interruptingcow import timeout import time while True: # simulate waiting for laser A print("Waiting for laser A") time.sleep(2) print("laser A tripped") try: with timeout(.25, exception=RuntimeError): # perform a potentially very slow operation print("Wait for ...
from interruptingcow import timeout import time # def bTripped(): # +1 to DB # continue while True: # simulate waiting for laser A print("Waiting for laser A") time.sleep(2) print("laser A tripped") # Real code would be: # laserA.wait_for_dark() try: with timeout(.25, excep...
<commit_before>from interruptingcow import timeout import time while True: # simulate waiting for laser A print("Waiting for laser A") time.sleep(2) print("laser A tripped") try: with timeout(.25, exception=RuntimeError): # perform a potentially very slow operation p...
from interruptingcow import timeout import time # def bTripped(): # +1 to DB # continue while True: # simulate waiting for laser A print("Waiting for laser A") time.sleep(2) print("laser A tripped") # Real code would be: # laserA.wait_for_dark() try: with timeout(.25, excep...
from interruptingcow import timeout import time while True: # simulate waiting for laser A print("Waiting for laser A") time.sleep(2) print("laser A tripped") try: with timeout(.25, exception=RuntimeError): # perform a potentially very slow operation print("Wait for ...
<commit_before>from interruptingcow import timeout import time while True: # simulate waiting for laser A print("Waiting for laser A") time.sleep(2) print("laser A tripped") try: with timeout(.25, exception=RuntimeError): # perform a potentially very slow operation p...
8c8307ff5313b1f6c69d976853f763daf2aece0c
test.py
test.py
""" Functions to call the api and test it """ import sys import fenix api = fenix.FenixAPISingleton() print('Testing Fenix API SDK Python') auth_url = api.get_authentication_url() print(auth_url) api.set_code(sys.argv[1]) print('Access token: ' + api.get_access_token()) print('Refresh token: ' + api.get_refresh_token...
""" Functions to call the api and test it """ import sys import fenix api = fenix.FenixAPISingleton() print('Testing Fenix API SDK Python') auth_url = api.get_authentication_url() print(api.get_space('2465311230082')) print(auth_url) api.set_code(sys.argv[1]) print('Access token: ' + api.get_access_token()) print('Re...
Test now calls a public endpoint first
Test now calls a public endpoint first
Python
mit
samfcmc/fenixedu-python-sdk
""" Functions to call the api and test it """ import sys import fenix api = fenix.FenixAPISingleton() print('Testing Fenix API SDK Python') auth_url = api.get_authentication_url() print(auth_url) api.set_code(sys.argv[1]) print('Access token: ' + api.get_access_token()) print('Refresh token: ' + api.get_refresh_token...
""" Functions to call the api and test it """ import sys import fenix api = fenix.FenixAPISingleton() print('Testing Fenix API SDK Python') auth_url = api.get_authentication_url() print(api.get_space('2465311230082')) print(auth_url) api.set_code(sys.argv[1]) print('Access token: ' + api.get_access_token()) print('Re...
<commit_before>""" Functions to call the api and test it """ import sys import fenix api = fenix.FenixAPISingleton() print('Testing Fenix API SDK Python') auth_url = api.get_authentication_url() print(auth_url) api.set_code(sys.argv[1]) print('Access token: ' + api.get_access_token()) print('Refresh token: ' + api.ge...
""" Functions to call the api and test it """ import sys import fenix api = fenix.FenixAPISingleton() print('Testing Fenix API SDK Python') auth_url = api.get_authentication_url() print(api.get_space('2465311230082')) print(auth_url) api.set_code(sys.argv[1]) print('Access token: ' + api.get_access_token()) print('Re...
""" Functions to call the api and test it """ import sys import fenix api = fenix.FenixAPISingleton() print('Testing Fenix API SDK Python') auth_url = api.get_authentication_url() print(auth_url) api.set_code(sys.argv[1]) print('Access token: ' + api.get_access_token()) print('Refresh token: ' + api.get_refresh_token...
<commit_before>""" Functions to call the api and test it """ import sys import fenix api = fenix.FenixAPISingleton() print('Testing Fenix API SDK Python') auth_url = api.get_authentication_url() print(auth_url) api.set_code(sys.argv[1]) print('Access token: ' + api.get_access_token()) print('Refresh token: ' + api.ge...
f74d57f4a05fa56b8668e371159affe37f4c38c3
opentreemap/otm_comments/models.py
opentreemap/otm_comments/models.py
# -*- coding: utf-8 -*- from __future__ import print_function from __future__ import unicode_literals from __future__ import division from threadedcomments.models import ThreadedComment from django.contrib.gis.db import models from treemap.instance import Instance class EnhancedThreadedComment(ThreadedComment): ...
# -*- coding: utf-8 -*- from __future__ import print_function from __future__ import unicode_literals from __future__ import division from threadedcomments.models import ThreadedComment from django.contrib.gis.db import models class EnhancedThreadedComment(ThreadedComment): """ This class wraps the Threade...
Fix circular dependency problem with django apps
Fix circular dependency problem with django apps It looks like translation is importing *all other* django apps in the project when it is used from treemap. This means that it will load apps that depend on treemap when it is not finished import treemap. So while it appears that treemap/otm1_migrator/otm_comments have ...
Python
agpl-3.0
recklessromeo/otm-core,clever-crow-consulting/otm-core,maurizi/otm-core,recklessromeo/otm-core,maurizi/otm-core,RickMohr/otm-core,RickMohr/otm-core,recklessromeo/otm-core,RickMohr/otm-core,maurizi/otm-core,clever-crow-consulting/otm-core,recklessromeo/otm-core,RickMohr/otm-core,clever-crow-consulting/otm-core,maurizi/o...
# -*- coding: utf-8 -*- from __future__ import print_function from __future__ import unicode_literals from __future__ import division from threadedcomments.models import ThreadedComment from django.contrib.gis.db import models from treemap.instance import Instance class EnhancedThreadedComment(ThreadedComment): ...
# -*- coding: utf-8 -*- from __future__ import print_function from __future__ import unicode_literals from __future__ import division from threadedcomments.models import ThreadedComment from django.contrib.gis.db import models class EnhancedThreadedComment(ThreadedComment): """ This class wraps the Threade...
<commit_before># -*- coding: utf-8 -*- from __future__ import print_function from __future__ import unicode_literals from __future__ import division from threadedcomments.models import ThreadedComment from django.contrib.gis.db import models from treemap.instance import Instance class EnhancedThreadedComment(Thre...
# -*- coding: utf-8 -*- from __future__ import print_function from __future__ import unicode_literals from __future__ import division from threadedcomments.models import ThreadedComment from django.contrib.gis.db import models class EnhancedThreadedComment(ThreadedComment): """ This class wraps the Threade...
# -*- coding: utf-8 -*- from __future__ import print_function from __future__ import unicode_literals from __future__ import division from threadedcomments.models import ThreadedComment from django.contrib.gis.db import models from treemap.instance import Instance class EnhancedThreadedComment(ThreadedComment): ...
<commit_before># -*- coding: utf-8 -*- from __future__ import print_function from __future__ import unicode_literals from __future__ import division from threadedcomments.models import ThreadedComment from django.contrib.gis.db import models from treemap.instance import Instance class EnhancedThreadedComment(Thre...
905e9e7744d8d5d84978a913b2e641a9c4337912
Do_not_deploy/query_outgoing_queue.py
Do_not_deploy/query_outgoing_queue.py
from kombu import Connection, Exchange, Queue from flask import Flask import os app = Flask(__name__) app.config.from_object(os.environ.get('SETTINGS')) @app.route("/getnextqueuemessage") #Gets the next message from target queue. Returns the signed JSON. def get_last_queue_message(): #: By default messages sent ...
from kombu import Connection, Exchange, Queue from flask import Flask import os app = Flask(__name__) app.config.from_object(os.environ.get('SETTINGS')) @app.route("/getnextqueuemessage") #Gets the next message from target queue. Returns the signed JSON. def get_last_queue_message(): #: By default messages sent ...
Return 404 if no message so we can poll from cucumber tests
Return 404 if no message so we can poll from cucumber tests
Python
mit
LandRegistry/register-publisher,LandRegistry/register-publisher
from kombu import Connection, Exchange, Queue from flask import Flask import os app = Flask(__name__) app.config.from_object(os.environ.get('SETTINGS')) @app.route("/getnextqueuemessage") #Gets the next message from target queue. Returns the signed JSON. def get_last_queue_message(): #: By default messages sent ...
from kombu import Connection, Exchange, Queue from flask import Flask import os app = Flask(__name__) app.config.from_object(os.environ.get('SETTINGS')) @app.route("/getnextqueuemessage") #Gets the next message from target queue. Returns the signed JSON. def get_last_queue_message(): #: By default messages sent ...
<commit_before>from kombu import Connection, Exchange, Queue from flask import Flask import os app = Flask(__name__) app.config.from_object(os.environ.get('SETTINGS')) @app.route("/getnextqueuemessage") #Gets the next message from target queue. Returns the signed JSON. def get_last_queue_message(): #: By default...
from kombu import Connection, Exchange, Queue from flask import Flask import os app = Flask(__name__) app.config.from_object(os.environ.get('SETTINGS')) @app.route("/getnextqueuemessage") #Gets the next message from target queue. Returns the signed JSON. def get_last_queue_message(): #: By default messages sent ...
from kombu import Connection, Exchange, Queue from flask import Flask import os app = Flask(__name__) app.config.from_object(os.environ.get('SETTINGS')) @app.route("/getnextqueuemessage") #Gets the next message from target queue. Returns the signed JSON. def get_last_queue_message(): #: By default messages sent ...
<commit_before>from kombu import Connection, Exchange, Queue from flask import Flask import os app = Flask(__name__) app.config.from_object(os.environ.get('SETTINGS')) @app.route("/getnextqueuemessage") #Gets the next message from target queue. Returns the signed JSON. def get_last_queue_message(): #: By default...
e3c660cc4b5e72af3f6155c2426555247a4699b5
tests/test_ultrametric.py
tests/test_ultrametric.py
from viridis import tree from six.moves import range def test_split(): t = tree.Ultrametric(list(range(6))) t.merge(0, 1, 0.1) t.merge(6, 2, 0.2) t.merge(3, 4, 0.3) t.merge(8, 5, 0.4) t.merge(7, 8, 0.5) t.split(0, 2) assert t.node[9]['num_leaves'] == 3 t.split(0, 4) # nothing to do ...
from viridis import tree from six.moves import range import pytest @pytest.fixture def base_tree(): t = tree.Ultrametric(list(range(6))) t.merge(0, 1, 0.1) t.merge(6, 2, 0.2) t.merge(3, 4, 0.3) t.merge(8, 5, 0.4) t.merge(7, 8, 0.5) return t def test_split(base_tree): t = base_tree ...
Update test to use pytest fixture
Update test to use pytest fixture
Python
mit
jni/viridis
from viridis import tree from six.moves import range def test_split(): t = tree.Ultrametric(list(range(6))) t.merge(0, 1, 0.1) t.merge(6, 2, 0.2) t.merge(3, 4, 0.3) t.merge(8, 5, 0.4) t.merge(7, 8, 0.5) t.split(0, 2) assert t.node[9]['num_leaves'] == 3 t.split(0, 4) # nothing to do ...
from viridis import tree from six.moves import range import pytest @pytest.fixture def base_tree(): t = tree.Ultrametric(list(range(6))) t.merge(0, 1, 0.1) t.merge(6, 2, 0.2) t.merge(3, 4, 0.3) t.merge(8, 5, 0.4) t.merge(7, 8, 0.5) return t def test_split(base_tree): t = base_tree ...
<commit_before>from viridis import tree from six.moves import range def test_split(): t = tree.Ultrametric(list(range(6))) t.merge(0, 1, 0.1) t.merge(6, 2, 0.2) t.merge(3, 4, 0.3) t.merge(8, 5, 0.4) t.merge(7, 8, 0.5) t.split(0, 2) assert t.node[9]['num_leaves'] == 3 t.split(0, 4) #...
from viridis import tree from six.moves import range import pytest @pytest.fixture def base_tree(): t = tree.Ultrametric(list(range(6))) t.merge(0, 1, 0.1) t.merge(6, 2, 0.2) t.merge(3, 4, 0.3) t.merge(8, 5, 0.4) t.merge(7, 8, 0.5) return t def test_split(base_tree): t = base_tree ...
from viridis import tree from six.moves import range def test_split(): t = tree.Ultrametric(list(range(6))) t.merge(0, 1, 0.1) t.merge(6, 2, 0.2) t.merge(3, 4, 0.3) t.merge(8, 5, 0.4) t.merge(7, 8, 0.5) t.split(0, 2) assert t.node[9]['num_leaves'] == 3 t.split(0, 4) # nothing to do ...
<commit_before>from viridis import tree from six.moves import range def test_split(): t = tree.Ultrametric(list(range(6))) t.merge(0, 1, 0.1) t.merge(6, 2, 0.2) t.merge(3, 4, 0.3) t.merge(8, 5, 0.4) t.merge(7, 8, 0.5) t.split(0, 2) assert t.node[9]['num_leaves'] == 3 t.split(0, 4) #...
7aa68e0f7c553a964725ddf63c8de44eff3b3f10
lib/log_processor.py
lib/log_processor.py
import re import snmpy class log_processor(snmpy.plugin): def create(self): for k, v in sorted(self.conf['objects'].items()): extra = { 'count': re.compile(v['count']), 'reset': re.compile(v['reset']) if 'reset' in v else None, 'start': int(v['sta...
import re import snmpy class log_processor(snmpy.plugin): def create(self): for k, v in sorted(self.conf['objects'].items()): extra = { 'count': re.compile(v['count']), 'reset': re.compile(v['reset']) if 'reset' in v else None, 'start': int(v['...
Add reset on rotation support in log processor.
Add reset on rotation support in log processor.
Python
mit
mk23/snmpy,mk23/snmpy
import re import snmpy class log_processor(snmpy.plugin): def create(self): for k, v in sorted(self.conf['objects'].items()): extra = { 'count': re.compile(v['count']), 'reset': re.compile(v['reset']) if 'reset' in v else None, 'start': int(v['sta...
import re import snmpy class log_processor(snmpy.plugin): def create(self): for k, v in sorted(self.conf['objects'].items()): extra = { 'count': re.compile(v['count']), 'reset': re.compile(v['reset']) if 'reset' in v else None, 'start': int(v['...
<commit_before>import re import snmpy class log_processor(snmpy.plugin): def create(self): for k, v in sorted(self.conf['objects'].items()): extra = { 'count': re.compile(v['count']), 'reset': re.compile(v['reset']) if 'reset' in v else None, 'sta...
import re import snmpy class log_processor(snmpy.plugin): def create(self): for k, v in sorted(self.conf['objects'].items()): extra = { 'count': re.compile(v['count']), 'reset': re.compile(v['reset']) if 'reset' in v else None, 'start': int(v['...
import re import snmpy class log_processor(snmpy.plugin): def create(self): for k, v in sorted(self.conf['objects'].items()): extra = { 'count': re.compile(v['count']), 'reset': re.compile(v['reset']) if 'reset' in v else None, 'start': int(v['sta...
<commit_before>import re import snmpy class log_processor(snmpy.plugin): def create(self): for k, v in sorted(self.conf['objects'].items()): extra = { 'count': re.compile(v['count']), 'reset': re.compile(v['reset']) if 'reset' in v else None, 'sta...
d0edc9ef44555b35d9ae0d84e9b109b0d5705bdf
callisto_core/tests/reporting/test_pdf.py
callisto_core/tests/reporting/test_pdf.py
from io import BytesIO import PyPDF2 from wizard_builder import view_helpers as wizard_builer_helpers from .. import test_base from ...reporting import report_delivery # TODO: generate mock_report_data in wizard builder mock_report_data = [ {'food options': ['vegetables', 'apples: red']}, {'do androids drea...
from io import BytesIO import PyPDF2 from .. import test_base from ...reporting import report_delivery # TODO: generate mock_report_data in wizard builder mock_report_data = [ {'food options': ['vegetables', 'apples: red']}, {'eat it now???': ['catte']}, {'do androids dream of electric sheep?': ['awdad']...
Revert "test not answered text present in report"
Revert "test not answered text present in report" This reverts commit 7e6caad91969bafdaefa0fc60fdfe25a8d8d8ab2.
Python
agpl-3.0
project-callisto/callisto-core,project-callisto/callisto-core,SexualHealthInnovations/callisto-core,SexualHealthInnovations/callisto-core
from io import BytesIO import PyPDF2 from wizard_builder import view_helpers as wizard_builer_helpers from .. import test_base from ...reporting import report_delivery # TODO: generate mock_report_data in wizard builder mock_report_data = [ {'food options': ['vegetables', 'apples: red']}, {'do androids drea...
from io import BytesIO import PyPDF2 from .. import test_base from ...reporting import report_delivery # TODO: generate mock_report_data in wizard builder mock_report_data = [ {'food options': ['vegetables', 'apples: red']}, {'eat it now???': ['catte']}, {'do androids dream of electric sheep?': ['awdad']...
<commit_before>from io import BytesIO import PyPDF2 from wizard_builder import view_helpers as wizard_builer_helpers from .. import test_base from ...reporting import report_delivery # TODO: generate mock_report_data in wizard builder mock_report_data = [ {'food options': ['vegetables', 'apples: red']}, {'d...
from io import BytesIO import PyPDF2 from .. import test_base from ...reporting import report_delivery # TODO: generate mock_report_data in wizard builder mock_report_data = [ {'food options': ['vegetables', 'apples: red']}, {'eat it now???': ['catte']}, {'do androids dream of electric sheep?': ['awdad']...
from io import BytesIO import PyPDF2 from wizard_builder import view_helpers as wizard_builer_helpers from .. import test_base from ...reporting import report_delivery # TODO: generate mock_report_data in wizard builder mock_report_data = [ {'food options': ['vegetables', 'apples: red']}, {'do androids drea...
<commit_before>from io import BytesIO import PyPDF2 from wizard_builder import view_helpers as wizard_builer_helpers from .. import test_base from ...reporting import report_delivery # TODO: generate mock_report_data in wizard builder mock_report_data = [ {'food options': ['vegetables', 'apples: red']}, {'d...
af5ff98f150158e4f2e0bd2281229a6248a8fb52
cdc/models.py
cdc/models.py
from django.db import models from django.contrib.auth.models import User class SiteUser(models.Model): def __str__(self): return self.user.username # Using a OneToOneField so we can add the extra 'company' parameter to the user # without extending or replacing Django's User model user = models.OneToOneFiel...
from django.db import models from django.contrib.auth.models import User class SiteUser(models.Model): def __str__(self): return self.company + " | " + self.user.username # Using a OneToOneField so we can add the extra 'company' parameter to the user # without extending or replacing Django's User model use...
Change siteuser string for clarity
Change siteuser string for clarity
Python
mit
mgerst/cdc2-2015-www,ISEAGE-ISU/cdc2-2015-www,mg1065/cdc2-2015-www,mgerst/cdc2-2015-www,keaneokelley/Crippling-Debt-Corporation,keaneokelley/Crippling-Debt-Corporation,ISEAGE-ISU/cdc2-2015-www,mg1065/cdc2-2015-www
from django.db import models from django.contrib.auth.models import User class SiteUser(models.Model): def __str__(self): return self.user.username # Using a OneToOneField so we can add the extra 'company' parameter to the user # without extending or replacing Django's User model user = models.OneToOneFiel...
from django.db import models from django.contrib.auth.models import User class SiteUser(models.Model): def __str__(self): return self.company + " | " + self.user.username # Using a OneToOneField so we can add the extra 'company' parameter to the user # without extending or replacing Django's User model use...
<commit_before>from django.db import models from django.contrib.auth.models import User class SiteUser(models.Model): def __str__(self): return self.user.username # Using a OneToOneField so we can add the extra 'company' parameter to the user # without extending or replacing Django's User model user = mode...
from django.db import models from django.contrib.auth.models import User class SiteUser(models.Model): def __str__(self): return self.company + " | " + self.user.username # Using a OneToOneField so we can add the extra 'company' parameter to the user # without extending or replacing Django's User model use...
from django.db import models from django.contrib.auth.models import User class SiteUser(models.Model): def __str__(self): return self.user.username # Using a OneToOneField so we can add the extra 'company' parameter to the user # without extending or replacing Django's User model user = models.OneToOneFiel...
<commit_before>from django.db import models from django.contrib.auth.models import User class SiteUser(models.Model): def __str__(self): return self.user.username # Using a OneToOneField so we can add the extra 'company' parameter to the user # without extending or replacing Django's User model user = mode...
782a4b028c45d3cc37e6679ccc3d482f0518b4b7
txircd/modules/cmode_t.py
txircd/modules/cmode_t.py
from twisted.words.protocols import irc from txircd.modbase import Mode class TopiclockMode(Mode): def checkPermission(self, user, cmd, data): if cmd != "TOPIC": return data if "topic" not in data: return data targetChannel = data["targetchan"] if "t" in targetChannel.mode and not user.hasAccess(self.ir...
from twisted.words.protocols import irc from txircd.modbase import Mode class TopiclockMode(Mode): def checkPermission(self, user, cmd, data): if cmd != "TOPIC": return data if "topic" not in data: return data targetChannel = data["targetchan"] if "t" in targetChannel.mode and not user.hasAccess(targetC...
Fix the order of parameters to hasAccess, which broke all topic changing when +t was set
Fix the order of parameters to hasAccess, which broke all topic changing when +t was set
Python
bsd-3-clause
ElementalAlchemist/txircd,Heufneutje/txircd,DesertBus/txircd
from twisted.words.protocols import irc from txircd.modbase import Mode class TopiclockMode(Mode): def checkPermission(self, user, cmd, data): if cmd != "TOPIC": return data if "topic" not in data: return data targetChannel = data["targetchan"] if "t" in targetChannel.mode and not user.hasAccess(self.ir...
from twisted.words.protocols import irc from txircd.modbase import Mode class TopiclockMode(Mode): def checkPermission(self, user, cmd, data): if cmd != "TOPIC": return data if "topic" not in data: return data targetChannel = data["targetchan"] if "t" in targetChannel.mode and not user.hasAccess(targetC...
<commit_before>from twisted.words.protocols import irc from txircd.modbase import Mode class TopiclockMode(Mode): def checkPermission(self, user, cmd, data): if cmd != "TOPIC": return data if "topic" not in data: return data targetChannel = data["targetchan"] if "t" in targetChannel.mode and not user.ha...
from twisted.words.protocols import irc from txircd.modbase import Mode class TopiclockMode(Mode): def checkPermission(self, user, cmd, data): if cmd != "TOPIC": return data if "topic" not in data: return data targetChannel = data["targetchan"] if "t" in targetChannel.mode and not user.hasAccess(targetC...
from twisted.words.protocols import irc from txircd.modbase import Mode class TopiclockMode(Mode): def checkPermission(self, user, cmd, data): if cmd != "TOPIC": return data if "topic" not in data: return data targetChannel = data["targetchan"] if "t" in targetChannel.mode and not user.hasAccess(self.ir...
<commit_before>from twisted.words.protocols import irc from txircd.modbase import Mode class TopiclockMode(Mode): def checkPermission(self, user, cmd, data): if cmd != "TOPIC": return data if "topic" not in data: return data targetChannel = data["targetchan"] if "t" in targetChannel.mode and not user.ha...
8ad7b5546e0afd25b55411851feee61e5377a71d
PrinterApplication.py
PrinterApplication.py
from Cura.Wx.WxApplication import WxApplication class PrinterApplication(WxApplication): def __init__(self): super(PrinterApplication, self).__init__() def run(self): super(PrinterApplication, self).run()
from Cura.Wx.WxApplication import WxApplication from Cura.Wx.MainWindow import MainWindow class PrinterApplication(WxApplication): def __init__(self): super(PrinterApplication, self).__init__() def run(self): window = MainWindow("Cura Printer") window.Show() super(Print...
Add a MainWindow class to Wx and use it in printer and scanner
Add a MainWindow class to Wx and use it in printer and scanner
Python
agpl-3.0
quillford/Cura,Curahelper/Cura,senttech/Cura,bq/Ultimaker-Cura,fxtentacle/Cura,hmflash/Cura,fieldOfView/Cura,derekhe/Cura,lo0ol/Ultimaker-Cura,totalretribution/Cura,DeskboxBrazil/Cura,totalretribution/Cura,derekhe/Cura,DeskboxBrazil/Cura,quillford/Cura,ynotstartups/Wanhao,hmflash/Cura,Curahelper/Cura,ad1217/Cura,fxtent...
from Cura.Wx.WxApplication import WxApplication class PrinterApplication(WxApplication): def __init__(self): super(PrinterApplication, self).__init__() def run(self): super(PrinterApplication, self).run() Add a MainWindow class to Wx and use it in printer and scanner
from Cura.Wx.WxApplication import WxApplication from Cura.Wx.MainWindow import MainWindow class PrinterApplication(WxApplication): def __init__(self): super(PrinterApplication, self).__init__() def run(self): window = MainWindow("Cura Printer") window.Show() super(Print...
<commit_before>from Cura.Wx.WxApplication import WxApplication class PrinterApplication(WxApplication): def __init__(self): super(PrinterApplication, self).__init__() def run(self): super(PrinterApplication, self).run() <commit_msg>Add a MainWindow class to Wx and use it in printer and...
from Cura.Wx.WxApplication import WxApplication from Cura.Wx.MainWindow import MainWindow class PrinterApplication(WxApplication): def __init__(self): super(PrinterApplication, self).__init__() def run(self): window = MainWindow("Cura Printer") window.Show() super(Print...
from Cura.Wx.WxApplication import WxApplication class PrinterApplication(WxApplication): def __init__(self): super(PrinterApplication, self).__init__() def run(self): super(PrinterApplication, self).run() Add a MainWindow class to Wx and use it in printer and scannerfrom Cura.Wx.WxAppl...
<commit_before>from Cura.Wx.WxApplication import WxApplication class PrinterApplication(WxApplication): def __init__(self): super(PrinterApplication, self).__init__() def run(self): super(PrinterApplication, self).run() <commit_msg>Add a MainWindow class to Wx and use it in printer and...
5d5c944533d70c0c9c3385f3417b06d3d3060594
MROCPdjangoForm/ocpipeline/mrpaths.py
MROCPdjangoForm/ocpipeline/mrpaths.py
# # Code to load project paths # import os, sys MR_BASE_PATH = os.path.abspath(os.path.join(os.path.dirname(__file__), "/Users/dmhembere44/MR-connectome" )) MR_CMAPPER_PATH = os.path.join(MR_BASE_PATH, "cmapper" ) MR_MRCAP_PATH = os.path.join(MR_BASE_PATH, "mrcap" ) sys.path += [ MR_BASE_PATH, MR_CMAPPER_PATH, MR_MR...
# # Code to load project paths # import os, sys MR_BASE_PATH = os.path.abspath(os.path.join(os.path.dirname(__file__), "../.." )) MR_CMAPPER_PATH = os.path.join(MR_BASE_PATH, "cmapper" ) MR_MRCAP_PATH = os.path.join(MR_BASE_PATH, "mrcap" ) sys.path += [ MR_BASE_PATH, MR_CMAPPER_PATH, MR_MRCAP_PATH ]
Change to path, made relative
Change to path, made relative Former-commit-id: f00bf782fad3f6ddc6d2c97a23ff4f087ad3a22f
Python
apache-2.0
openconnectome/m2g,openconnectome/m2g,neurodata/ndgrutedb,openconnectome/m2g,neurodata/ndgrutedb,openconnectome/m2g,neurodata/ndgrutedb,neurodata/ndmg,openconnectome/m2g,neurodata/ndgrutedb,neurodata/ndgrutedb,neurodata/ndgrutedb,openconnectome/m2g,openconnectome/m2g,neurodata/ndgrutedb,neurodata/ndgrutedb,openconnecto...
# # Code to load project paths # import os, sys MR_BASE_PATH = os.path.abspath(os.path.join(os.path.dirname(__file__), "/Users/dmhembere44/MR-connectome" )) MR_CMAPPER_PATH = os.path.join(MR_BASE_PATH, "cmapper" ) MR_MRCAP_PATH = os.path.join(MR_BASE_PATH, "mrcap" ) sys.path += [ MR_BASE_PATH, MR_CMAPPER_PATH, MR_MR...
# # Code to load project paths # import os, sys MR_BASE_PATH = os.path.abspath(os.path.join(os.path.dirname(__file__), "../.." )) MR_CMAPPER_PATH = os.path.join(MR_BASE_PATH, "cmapper" ) MR_MRCAP_PATH = os.path.join(MR_BASE_PATH, "mrcap" ) sys.path += [ MR_BASE_PATH, MR_CMAPPER_PATH, MR_MRCAP_PATH ]
<commit_before># # Code to load project paths # import os, sys MR_BASE_PATH = os.path.abspath(os.path.join(os.path.dirname(__file__), "/Users/dmhembere44/MR-connectome" )) MR_CMAPPER_PATH = os.path.join(MR_BASE_PATH, "cmapper" ) MR_MRCAP_PATH = os.path.join(MR_BASE_PATH, "mrcap" ) sys.path += [ MR_BASE_PATH, MR_CMAP...
# # Code to load project paths # import os, sys MR_BASE_PATH = os.path.abspath(os.path.join(os.path.dirname(__file__), "../.." )) MR_CMAPPER_PATH = os.path.join(MR_BASE_PATH, "cmapper" ) MR_MRCAP_PATH = os.path.join(MR_BASE_PATH, "mrcap" ) sys.path += [ MR_BASE_PATH, MR_CMAPPER_PATH, MR_MRCAP_PATH ]
# # Code to load project paths # import os, sys MR_BASE_PATH = os.path.abspath(os.path.join(os.path.dirname(__file__), "/Users/dmhembere44/MR-connectome" )) MR_CMAPPER_PATH = os.path.join(MR_BASE_PATH, "cmapper" ) MR_MRCAP_PATH = os.path.join(MR_BASE_PATH, "mrcap" ) sys.path += [ MR_BASE_PATH, MR_CMAPPER_PATH, MR_MR...
<commit_before># # Code to load project paths # import os, sys MR_BASE_PATH = os.path.abspath(os.path.join(os.path.dirname(__file__), "/Users/dmhembere44/MR-connectome" )) MR_CMAPPER_PATH = os.path.join(MR_BASE_PATH, "cmapper" ) MR_MRCAP_PATH = os.path.join(MR_BASE_PATH, "mrcap" ) sys.path += [ MR_BASE_PATH, MR_CMAP...
91519c542b2fac085dc6b785a41d2fbdba91386c
business_requirement_deliverable_report/__openerp__.py
business_requirement_deliverable_report/__openerp__.py
# -*- coding: utf-8 -*- # © 2016 Elico Corp (https://www.elico-corp.com). # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). { 'name': 'Business Requirement Document Printout', 'summary': 'Print the Business Requirement Document for your customers', 'version': '8.0.5.0.1', 'category': ...
# -*- coding: utf-8 -*- # © 2016 Elico Corp (https://www.elico-corp.com). # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). { 'name': 'Business Requirement Document Printout', 'summary': 'Print the Business Requirement Document for your customers', 'version': '8.0.5.0.1', 'category': ...
Fix manifest: add OCA in the authors
Fix manifest: add OCA in the authors Added OCA in the authors
Python
agpl-3.0
YogeshMahera-SerpentCS/business-requirement,sudhir-serpentcs/business-requirement
# -*- coding: utf-8 -*- # © 2016 Elico Corp (https://www.elico-corp.com). # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). { 'name': 'Business Requirement Document Printout', 'summary': 'Print the Business Requirement Document for your customers', 'version': '8.0.5.0.1', 'category': ...
# -*- coding: utf-8 -*- # © 2016 Elico Corp (https://www.elico-corp.com). # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). { 'name': 'Business Requirement Document Printout', 'summary': 'Print the Business Requirement Document for your customers', 'version': '8.0.5.0.1', 'category': ...
<commit_before># -*- coding: utf-8 -*- # © 2016 Elico Corp (https://www.elico-corp.com). # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). { 'name': 'Business Requirement Document Printout', 'summary': 'Print the Business Requirement Document for your customers', 'version': '8.0.5.0.1', ...
# -*- coding: utf-8 -*- # © 2016 Elico Corp (https://www.elico-corp.com). # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). { 'name': 'Business Requirement Document Printout', 'summary': 'Print the Business Requirement Document for your customers', 'version': '8.0.5.0.1', 'category': ...
# -*- coding: utf-8 -*- # © 2016 Elico Corp (https://www.elico-corp.com). # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). { 'name': 'Business Requirement Document Printout', 'summary': 'Print the Business Requirement Document for your customers', 'version': '8.0.5.0.1', 'category': ...
<commit_before># -*- coding: utf-8 -*- # © 2016 Elico Corp (https://www.elico-corp.com). # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). { 'name': 'Business Requirement Document Printout', 'summary': 'Print the Business Requirement Document for your customers', 'version': '8.0.5.0.1', ...
23501afd09b13d1e5f33bdd60614fd9ac7210108
oratioignoreparser.py
oratioignoreparser.py
import os import re class OratioIgnoreParser(): def __init__(self): self.ignored_paths = ["oratiomodule.tar.gz"] def load(self, oratio_ignore_path): with open(oratio_ignore_path, "r") as f: self.ignored_paths.extend([line.strip() for line in f]) def should_be_ignored(self, fi...
import os import re class OratioIgnoreParser(): def __init__(self): self.ignored_paths = ["oratiomodule.tar.gz"] def load(self, oratio_ignore_path): with open(oratio_ignore_path, "r") as f: self.ignored_paths.extend([line.strip() for line in f]) def extend_list(self, ignored_...
Add extend_list method to OratioIgnoreParser
Add extend_list method to OratioIgnoreParser To make oratioignoreparser.py easily testable using unit tests.
Python
mit
oratio-io/oratio-cli,oratio-io/oratio-cli
import os import re class OratioIgnoreParser(): def __init__(self): self.ignored_paths = ["oratiomodule.tar.gz"] def load(self, oratio_ignore_path): with open(oratio_ignore_path, "r") as f: self.ignored_paths.extend([line.strip() for line in f]) def should_be_ignored(self, fi...
import os import re class OratioIgnoreParser(): def __init__(self): self.ignored_paths = ["oratiomodule.tar.gz"] def load(self, oratio_ignore_path): with open(oratio_ignore_path, "r") as f: self.ignored_paths.extend([line.strip() for line in f]) def extend_list(self, ignored_...
<commit_before>import os import re class OratioIgnoreParser(): def __init__(self): self.ignored_paths = ["oratiomodule.tar.gz"] def load(self, oratio_ignore_path): with open(oratio_ignore_path, "r") as f: self.ignored_paths.extend([line.strip() for line in f]) def should_be_i...
import os import re class OratioIgnoreParser(): def __init__(self): self.ignored_paths = ["oratiomodule.tar.gz"] def load(self, oratio_ignore_path): with open(oratio_ignore_path, "r") as f: self.ignored_paths.extend([line.strip() for line in f]) def extend_list(self, ignored_...
import os import re class OratioIgnoreParser(): def __init__(self): self.ignored_paths = ["oratiomodule.tar.gz"] def load(self, oratio_ignore_path): with open(oratio_ignore_path, "r") as f: self.ignored_paths.extend([line.strip() for line in f]) def should_be_ignored(self, fi...
<commit_before>import os import re class OratioIgnoreParser(): def __init__(self): self.ignored_paths = ["oratiomodule.tar.gz"] def load(self, oratio_ignore_path): with open(oratio_ignore_path, "r") as f: self.ignored_paths.extend([line.strip() for line in f]) def should_be_i...
efa5156a15d2fd945c406792065b3386aa61107e
package_deb_replace_version.py
package_deb_replace_version.py
import sys def split(string, splitters): final = [string] for x in splitters: for i,s in enumerate(final): if x in s and x != s: left, right = s.split(x, 1) final[i] = left final.insert(i + 1, x) final.insert(i + 2, right) return final fullversion = sys.argv[1] path = f"btsoot_{fullversion}/DE...
import sys fullversion = sys.argv[1] path = f"btsoot_{fullversion}/DEBIAN/control" version = fullversion[1:] version = version[1] control_content = f"""Package: btsoot Version: {version} Section: base Priority: optional Architecture: i386 Depends: build-essential Maintainer: Paul Kramme <pjkramme@gmail.com> Descriptio...
Remove unecessary code Add first charakter remover
Remove unecessary code Add first charakter remover
Python
bsd-3-clause
paulkramme/btsoot
import sys def split(string, splitters): final = [string] for x in splitters: for i,s in enumerate(final): if x in s and x != s: left, right = s.split(x, 1) final[i] = left final.insert(i + 1, x) final.insert(i + 2, right) return final fullversion = sys.argv[1] path = f"btsoot_{fullversion}/DE...
import sys fullversion = sys.argv[1] path = f"btsoot_{fullversion}/DEBIAN/control" version = fullversion[1:] version = version[1] control_content = f"""Package: btsoot Version: {version} Section: base Priority: optional Architecture: i386 Depends: build-essential Maintainer: Paul Kramme <pjkramme@gmail.com> Descriptio...
<commit_before>import sys def split(string, splitters): final = [string] for x in splitters: for i,s in enumerate(final): if x in s and x != s: left, right = s.split(x, 1) final[i] = left final.insert(i + 1, x) final.insert(i + 2, right) return final fullversion = sys.argv[1] path = f"btsoot_{...
import sys fullversion = sys.argv[1] path = f"btsoot_{fullversion}/DEBIAN/control" version = fullversion[1:] version = version[1] control_content = f"""Package: btsoot Version: {version} Section: base Priority: optional Architecture: i386 Depends: build-essential Maintainer: Paul Kramme <pjkramme@gmail.com> Descriptio...
import sys def split(string, splitters): final = [string] for x in splitters: for i,s in enumerate(final): if x in s and x != s: left, right = s.split(x, 1) final[i] = left final.insert(i + 1, x) final.insert(i + 2, right) return final fullversion = sys.argv[1] path = f"btsoot_{fullversion}/DE...
<commit_before>import sys def split(string, splitters): final = [string] for x in splitters: for i,s in enumerate(final): if x in s and x != s: left, right = s.split(x, 1) final[i] = left final.insert(i + 1, x) final.insert(i + 2, right) return final fullversion = sys.argv[1] path = f"btsoot_{...
874ed1f0d97794b56907cffef047d178696591a4
tensorflow_datasets/testing/nyu_depth_v2.py
tensorflow_datasets/testing/nyu_depth_v2.py
import os import h5py import numpy as np ref = h5py.File( os.path.expanduser( "~/tensorflow_datasets/downloads/extracted/TAR_GZ.datasets.lids.mit.edu_fastdept_nyudepthBjtXYu6zBBYUv0ByLqXPgFy4ygUuVvPRxjz9Ip5_97M.tar.gz/nyudepthv2/val/official/00001.h5" ), "r", ) rgb = ref["rgb"][:] depth = ref["de...
import os import h5py import numpy as np ref = h5py.File( os.path.expanduser( "~/tensorflow_datasets/downloads/extracted/TAR_GZ.datasets.lids.mit.edu_fastdept_nyudepthBjtXYu6zBBYUv0ByLqXPgFy4ygUuVvPRxjz9Ip5_97M.tar.gz/nyudepthv2/val/official/00001.h5" ), "r", ) rgb = ref["rgb"][:] depth = ref["de...
Format with two spaces instead of four
Format with two spaces instead of four
Python
apache-2.0
tensorflow/datasets,tensorflow/datasets,tensorflow/datasets,tensorflow/datasets,tensorflow/datasets
import os import h5py import numpy as np ref = h5py.File( os.path.expanduser( "~/tensorflow_datasets/downloads/extracted/TAR_GZ.datasets.lids.mit.edu_fastdept_nyudepthBjtXYu6zBBYUv0ByLqXPgFy4ygUuVvPRxjz9Ip5_97M.tar.gz/nyudepthv2/val/official/00001.h5" ), "r", ) rgb = ref["rgb"][:] depth = ref["de...
import os import h5py import numpy as np ref = h5py.File( os.path.expanduser( "~/tensorflow_datasets/downloads/extracted/TAR_GZ.datasets.lids.mit.edu_fastdept_nyudepthBjtXYu6zBBYUv0ByLqXPgFy4ygUuVvPRxjz9Ip5_97M.tar.gz/nyudepthv2/val/official/00001.h5" ), "r", ) rgb = ref["rgb"][:] depth = ref["de...
<commit_before>import os import h5py import numpy as np ref = h5py.File( os.path.expanduser( "~/tensorflow_datasets/downloads/extracted/TAR_GZ.datasets.lids.mit.edu_fastdept_nyudepthBjtXYu6zBBYUv0ByLqXPgFy4ygUuVvPRxjz9Ip5_97M.tar.gz/nyudepthv2/val/official/00001.h5" ), "r", ) rgb = ref["rgb"][:] ...
import os import h5py import numpy as np ref = h5py.File( os.path.expanduser( "~/tensorflow_datasets/downloads/extracted/TAR_GZ.datasets.lids.mit.edu_fastdept_nyudepthBjtXYu6zBBYUv0ByLqXPgFy4ygUuVvPRxjz9Ip5_97M.tar.gz/nyudepthv2/val/official/00001.h5" ), "r", ) rgb = ref["rgb"][:] depth = ref["de...
import os import h5py import numpy as np ref = h5py.File( os.path.expanduser( "~/tensorflow_datasets/downloads/extracted/TAR_GZ.datasets.lids.mit.edu_fastdept_nyudepthBjtXYu6zBBYUv0ByLqXPgFy4ygUuVvPRxjz9Ip5_97M.tar.gz/nyudepthv2/val/official/00001.h5" ), "r", ) rgb = ref["rgb"][:] depth = ref["de...
<commit_before>import os import h5py import numpy as np ref = h5py.File( os.path.expanduser( "~/tensorflow_datasets/downloads/extracted/TAR_GZ.datasets.lids.mit.edu_fastdept_nyudepthBjtXYu6zBBYUv0ByLqXPgFy4ygUuVvPRxjz9Ip5_97M.tar.gz/nyudepthv2/val/official/00001.h5" ), "r", ) rgb = ref["rgb"][:] ...
1ce899d118b3d46a816c0fc5f2f1a6f0ca9670ed
addons/resource/models/res_company.py
addons/resource/models/res_company.py
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from odoo import api, fields, models, _ class ResCompany(models.Model): _inherit = 'res.company' resource_calendar_ids = fields.One2many( 'resource.calendar', 'company_id', 'Working Hours') resourc...
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from odoo import api, fields, models, _ class ResCompany(models.Model): _inherit = 'res.company' resource_calendar_ids = fields.One2many( 'resource.calendar', 'company_id', 'Working Hours') resourc...
Set company_id on a resource.calendar on company creation
[IMP] resource: Set company_id on a resource.calendar on company creation Purpose ======= Currently, when creating a company, the resource calendar is created if not specified. This lead to duplicated data. In Manufacturing > Configuration > Working Time, two same working time demo data('Standard 40 Hours/Week') Sp...
Python
agpl-3.0
ygol/odoo,ygol/odoo,ygol/odoo,ygol/odoo,ygol/odoo,ygol/odoo,ygol/odoo
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from odoo import api, fields, models, _ class ResCompany(models.Model): _inherit = 'res.company' resource_calendar_ids = fields.One2many( 'resource.calendar', 'company_id', 'Working Hours') resourc...
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from odoo import api, fields, models, _ class ResCompany(models.Model): _inherit = 'res.company' resource_calendar_ids = fields.One2many( 'resource.calendar', 'company_id', 'Working Hours') resourc...
<commit_before># -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from odoo import api, fields, models, _ class ResCompany(models.Model): _inherit = 'res.company' resource_calendar_ids = fields.One2many( 'resource.calendar', 'company_id', 'Working Hour...
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from odoo import api, fields, models, _ class ResCompany(models.Model): _inherit = 'res.company' resource_calendar_ids = fields.One2many( 'resource.calendar', 'company_id', 'Working Hours') resourc...
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from odoo import api, fields, models, _ class ResCompany(models.Model): _inherit = 'res.company' resource_calendar_ids = fields.One2many( 'resource.calendar', 'company_id', 'Working Hours') resourc...
<commit_before># -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from odoo import api, fields, models, _ class ResCompany(models.Model): _inherit = 'res.company' resource_calendar_ids = fields.One2many( 'resource.calendar', 'company_id', 'Working Hour...
d3d9d5a7f23bfd95ecfb6c9609c2c0d4be503ae7
branches/extracting_oxford/molly/molly/providers/apps/search/application_search.py
branches/extracting_oxford/molly/molly/providers/apps/search/application_search.py
import logging from molly.apps.search.providers import BaseSearchProvider from molly.conf import applications logger = logging.getLogger('molly.providers.apps.search.application_search') class ApplicationSearchProvider(BaseSearchProvider): def __init__(self, application_names=None): self.application_nam...
import logging from molly.apps.search.providers import BaseSearchProvider from molly.conf import applications logger = logging.getLogger('molly.providers.apps.search.application_search') class ApplicationSearchProvider(BaseSearchProvider): def __init__(self, local_names=None): self.local_names = local_n...
Update ApplicationSearchProvider to reflect conf.settings.Application changes.
Update ApplicationSearchProvider to reflect conf.settings.Application changes.
Python
apache-2.0
mollyproject/mollyproject,mollyproject/mollyproject,mollyproject/mollyproject
import logging from molly.apps.search.providers import BaseSearchProvider from molly.conf import applications logger = logging.getLogger('molly.providers.apps.search.application_search') class ApplicationSearchProvider(BaseSearchProvider): def __init__(self, application_names=None): self.application_nam...
import logging from molly.apps.search.providers import BaseSearchProvider from molly.conf import applications logger = logging.getLogger('molly.providers.apps.search.application_search') class ApplicationSearchProvider(BaseSearchProvider): def __init__(self, local_names=None): self.local_names = local_n...
<commit_before>import logging from molly.apps.search.providers import BaseSearchProvider from molly.conf import applications logger = logging.getLogger('molly.providers.apps.search.application_search') class ApplicationSearchProvider(BaseSearchProvider): def __init__(self, application_names=None): self....
import logging from molly.apps.search.providers import BaseSearchProvider from molly.conf import applications logger = logging.getLogger('molly.providers.apps.search.application_search') class ApplicationSearchProvider(BaseSearchProvider): def __init__(self, local_names=None): self.local_names = local_n...
import logging from molly.apps.search.providers import BaseSearchProvider from molly.conf import applications logger = logging.getLogger('molly.providers.apps.search.application_search') class ApplicationSearchProvider(BaseSearchProvider): def __init__(self, application_names=None): self.application_nam...
<commit_before>import logging from molly.apps.search.providers import BaseSearchProvider from molly.conf import applications logger = logging.getLogger('molly.providers.apps.search.application_search') class ApplicationSearchProvider(BaseSearchProvider): def __init__(self, application_names=None): self....
8b6eee19707a981fddfa2114be3d90353e049b33
examples/undocumented/python/converter_stochasticproximityembedding.py
examples/undocumented/python/converter_stochasticproximityembedding.py
#!/usr/bin/env python data = '../data/fm_train_real.dat' parameter_list = [[data, 20]] def converter_stochasticproximityembedding (data_fname, k): try: from shogun import RealFeatures,StochasticProximityEmbedding, SPE_GLOBAL, SPE_LOCAL, CSVFile features = RealFeatures(CSVFile(data_fname)) converter = Stochast...
#!/usr/bin/env python data = '../data/fm_train_real.dat' parameter_list = [[data, 20]] def converter_stochasticproximityembedding (data_fname, k): try: from shogun import RealFeatures,StochasticProximityEmbedding, SPE_GLOBAL, SPE_LOCAL, CSVFile features = RealFeatures(CSVFile(data_fname)) converter = Stochast...
Use transform instead of embed
Use transform instead of embed
Python
bsd-3-clause
karlnapf/shogun,lisitsyn/shogun,karlnapf/shogun,geektoni/shogun,geektoni/shogun,besser82/shogun,sorig/shogun,sorig/shogun,lisitsyn/shogun,besser82/shogun,lambday/shogun,geektoni/shogun,sorig/shogun,lambday/shogun,lambday/shogun,lambday/shogun,besser82/shogun,geektoni/shogun,lisitsyn/shogun,lisitsyn/shogun,geektoni/shog...
#!/usr/bin/env python data = '../data/fm_train_real.dat' parameter_list = [[data, 20]] def converter_stochasticproximityembedding (data_fname, k): try: from shogun import RealFeatures,StochasticProximityEmbedding, SPE_GLOBAL, SPE_LOCAL, CSVFile features = RealFeatures(CSVFile(data_fname)) converter = Stochast...
#!/usr/bin/env python data = '../data/fm_train_real.dat' parameter_list = [[data, 20]] def converter_stochasticproximityembedding (data_fname, k): try: from shogun import RealFeatures,StochasticProximityEmbedding, SPE_GLOBAL, SPE_LOCAL, CSVFile features = RealFeatures(CSVFile(data_fname)) converter = Stochast...
<commit_before>#!/usr/bin/env python data = '../data/fm_train_real.dat' parameter_list = [[data, 20]] def converter_stochasticproximityembedding (data_fname, k): try: from shogun import RealFeatures,StochasticProximityEmbedding, SPE_GLOBAL, SPE_LOCAL, CSVFile features = RealFeatures(CSVFile(data_fname)) conve...
#!/usr/bin/env python data = '../data/fm_train_real.dat' parameter_list = [[data, 20]] def converter_stochasticproximityembedding (data_fname, k): try: from shogun import RealFeatures,StochasticProximityEmbedding, SPE_GLOBAL, SPE_LOCAL, CSVFile features = RealFeatures(CSVFile(data_fname)) converter = Stochast...
#!/usr/bin/env python data = '../data/fm_train_real.dat' parameter_list = [[data, 20]] def converter_stochasticproximityembedding (data_fname, k): try: from shogun import RealFeatures,StochasticProximityEmbedding, SPE_GLOBAL, SPE_LOCAL, CSVFile features = RealFeatures(CSVFile(data_fname)) converter = Stochast...
<commit_before>#!/usr/bin/env python data = '../data/fm_train_real.dat' parameter_list = [[data, 20]] def converter_stochasticproximityembedding (data_fname, k): try: from shogun import RealFeatures,StochasticProximityEmbedding, SPE_GLOBAL, SPE_LOCAL, CSVFile features = RealFeatures(CSVFile(data_fname)) conve...
b7d5767df23aa9b0dcc5c32d83387a622bf9e9e0
webapp/thing.py
webapp/thing.py
#!/usr/bin/env python import RPi.GPIO as GPIO LED_PIN = 23 SWITCH_PIN = 24 # new style class class PiThing(object): """Raspberry Pi Internet 'Thing'.""" def __init__(self): # use BCM numbering scheme when using Adafruit pi cobbler. Don't use board scheme. GPIO.setmode(GPIO.BCM) ...
#!/usr/bin/env python import RPi.GPIO as GPIO LED_PIN = 23 SWITCH_PIN = 24 # new style class class PiThing(object): """Raspberry Pi Internet 'Thing'.""" def __init__(self): # use BCM numbering scheme when using Adafruit pi cobbler. Don't use board scheme. GPIO.setmode(GPIO.BCM) ...
Fix gpio to uppercase GPIO
Fix gpio to uppercase GPIO
Python
mit
beepscore/pi_thing,beepscore/pi_thing,beepscore/pi_thing
#!/usr/bin/env python import RPi.GPIO as GPIO LED_PIN = 23 SWITCH_PIN = 24 # new style class class PiThing(object): """Raspberry Pi Internet 'Thing'.""" def __init__(self): # use BCM numbering scheme when using Adafruit pi cobbler. Don't use board scheme. GPIO.setmode(GPIO.BCM) ...
#!/usr/bin/env python import RPi.GPIO as GPIO LED_PIN = 23 SWITCH_PIN = 24 # new style class class PiThing(object): """Raspberry Pi Internet 'Thing'.""" def __init__(self): # use BCM numbering scheme when using Adafruit pi cobbler. Don't use board scheme. GPIO.setmode(GPIO.BCM) ...
<commit_before>#!/usr/bin/env python import RPi.GPIO as GPIO LED_PIN = 23 SWITCH_PIN = 24 # new style class class PiThing(object): """Raspberry Pi Internet 'Thing'.""" def __init__(self): # use BCM numbering scheme when using Adafruit pi cobbler. Don't use board scheme. GPIO.setmode(GPI...
#!/usr/bin/env python import RPi.GPIO as GPIO LED_PIN = 23 SWITCH_PIN = 24 # new style class class PiThing(object): """Raspberry Pi Internet 'Thing'.""" def __init__(self): # use BCM numbering scheme when using Adafruit pi cobbler. Don't use board scheme. GPIO.setmode(GPIO.BCM) ...
#!/usr/bin/env python import RPi.GPIO as GPIO LED_PIN = 23 SWITCH_PIN = 24 # new style class class PiThing(object): """Raspberry Pi Internet 'Thing'.""" def __init__(self): # use BCM numbering scheme when using Adafruit pi cobbler. Don't use board scheme. GPIO.setmode(GPIO.BCM) ...
<commit_before>#!/usr/bin/env python import RPi.GPIO as GPIO LED_PIN = 23 SWITCH_PIN = 24 # new style class class PiThing(object): """Raspberry Pi Internet 'Thing'.""" def __init__(self): # use BCM numbering scheme when using Adafruit pi cobbler. Don't use board scheme. GPIO.setmode(GPI...
49749403321d16f14ecf0f6f95d5511e5429d7a2
actstream/__init__.py
actstream/__init__.py
try: from actstream.signals import action except: pass import django __version__ = '1.4.0' __author__ = 'Asif Saif Uddin, Justin Quick <justquick@gmail.com>' if django.VERSION < (3, 2): default_app_config = 'actstream.apps.ActstreamConfig'
try: from actstream.signals import action except: pass import django __version__ = '1.4.0' __author__ = 'Asif Saif Uddin, Justin Quick <justquick@gmail.com>' if django.VERSION >= (3, 2): # The declaration is only needed for older Django versions pass else: default_app_config = 'actstream.apps.Act...
Fix django app config default
Fix django app config default
Python
bsd-3-clause
justquick/django-activity-stream,pombredanne/django-activity-stream,pombredanne/django-activity-stream,justquick/django-activity-stream
try: from actstream.signals import action except: pass import django __version__ = '1.4.0' __author__ = 'Asif Saif Uddin, Justin Quick <justquick@gmail.com>' if django.VERSION < (3, 2): default_app_config = 'actstream.apps.ActstreamConfig' Fix django app config default
try: from actstream.signals import action except: pass import django __version__ = '1.4.0' __author__ = 'Asif Saif Uddin, Justin Quick <justquick@gmail.com>' if django.VERSION >= (3, 2): # The declaration is only needed for older Django versions pass else: default_app_config = 'actstream.apps.Act...
<commit_before>try: from actstream.signals import action except: pass import django __version__ = '1.4.0' __author__ = 'Asif Saif Uddin, Justin Quick <justquick@gmail.com>' if django.VERSION < (3, 2): default_app_config = 'actstream.apps.ActstreamConfig' <commit_msg>Fix django app config default<commit_a...
try: from actstream.signals import action except: pass import django __version__ = '1.4.0' __author__ = 'Asif Saif Uddin, Justin Quick <justquick@gmail.com>' if django.VERSION >= (3, 2): # The declaration is only needed for older Django versions pass else: default_app_config = 'actstream.apps.Act...
try: from actstream.signals import action except: pass import django __version__ = '1.4.0' __author__ = 'Asif Saif Uddin, Justin Quick <justquick@gmail.com>' if django.VERSION < (3, 2): default_app_config = 'actstream.apps.ActstreamConfig' Fix django app config defaulttry: from actstream.signals impo...
<commit_before>try: from actstream.signals import action except: pass import django __version__ = '1.4.0' __author__ = 'Asif Saif Uddin, Justin Quick <justquick@gmail.com>' if django.VERSION < (3, 2): default_app_config = 'actstream.apps.ActstreamConfig' <commit_msg>Fix django app config default<commit_a...
edc773bfd5d25a42fa2759631500fc4861557e57
fireplace/cards/tgt/priest.py
fireplace/cards/tgt/priest.py
from ..utils import * ## # Minions # Holy Champion class AT_011: events = Heal().on(Buff(SELF, "AT_011e")) # Spawn of Shadows class AT_012: inspire = Hit(ALL_HEROES, 4) ## # Spells # Power Word: Glory class AT_013: play = Buff(TARGET, "AT_013e") class AT_013e: events = Attack(OWNER).on(Heal(FRIENDLY_HERO, ...
from ..utils import * ## # Minions # Holy Champion class AT_011: events = Heal().on(Buff(SELF, "AT_011e")) # Spawn of Shadows class AT_012: inspire = Hit(ALL_HEROES, 4) # Shadowfiend class AT_014: events = Draw(CONTROLLER).on(Buff(Draw.Args.CARD, "AT_014e")) # Wyrmrest Agent class AT_116: play = HOLDING_DR...
Implement more TGT Priest cards
Implement more TGT Priest cards
Python
agpl-3.0
oftc-ftw/fireplace,beheh/fireplace,smallnamespace/fireplace,Meerkov/fireplace,Ragowit/fireplace,smallnamespace/fireplace,oftc-ftw/fireplace,amw2104/fireplace,liujimj/fireplace,NightKev/fireplace,jleclanche/fireplace,Ragowit/fireplace,amw2104/fireplace,liujimj/fireplace,Meerkov/fireplace
from ..utils import * ## # Minions # Holy Champion class AT_011: events = Heal().on(Buff(SELF, "AT_011e")) # Spawn of Shadows class AT_012: inspire = Hit(ALL_HEROES, 4) ## # Spells # Power Word: Glory class AT_013: play = Buff(TARGET, "AT_013e") class AT_013e: events = Attack(OWNER).on(Heal(FRIENDLY_HERO, ...
from ..utils import * ## # Minions # Holy Champion class AT_011: events = Heal().on(Buff(SELF, "AT_011e")) # Spawn of Shadows class AT_012: inspire = Hit(ALL_HEROES, 4) # Shadowfiend class AT_014: events = Draw(CONTROLLER).on(Buff(Draw.Args.CARD, "AT_014e")) # Wyrmrest Agent class AT_116: play = HOLDING_DR...
<commit_before>from ..utils import * ## # Minions # Holy Champion class AT_011: events = Heal().on(Buff(SELF, "AT_011e")) # Spawn of Shadows class AT_012: inspire = Hit(ALL_HEROES, 4) ## # Spells # Power Word: Glory class AT_013: play = Buff(TARGET, "AT_013e") class AT_013e: events = Attack(OWNER).on(Heal(...
from ..utils import * ## # Minions # Holy Champion class AT_011: events = Heal().on(Buff(SELF, "AT_011e")) # Spawn of Shadows class AT_012: inspire = Hit(ALL_HEROES, 4) # Shadowfiend class AT_014: events = Draw(CONTROLLER).on(Buff(Draw.Args.CARD, "AT_014e")) # Wyrmrest Agent class AT_116: play = HOLDING_DR...
from ..utils import * ## # Minions # Holy Champion class AT_011: events = Heal().on(Buff(SELF, "AT_011e")) # Spawn of Shadows class AT_012: inspire = Hit(ALL_HEROES, 4) ## # Spells # Power Word: Glory class AT_013: play = Buff(TARGET, "AT_013e") class AT_013e: events = Attack(OWNER).on(Heal(FRIENDLY_HERO, ...
<commit_before>from ..utils import * ## # Minions # Holy Champion class AT_011: events = Heal().on(Buff(SELF, "AT_011e")) # Spawn of Shadows class AT_012: inspire = Hit(ALL_HEROES, 4) ## # Spells # Power Word: Glory class AT_013: play = Buff(TARGET, "AT_013e") class AT_013e: events = Attack(OWNER).on(Heal(...
10dea74d7f7946e9bab8c99b489793708845183c
fireplace/cards/wog/hunter.py
fireplace/cards/wog/hunter.py
from ..utils import * ## # Minions class OG_179: "Fiery Bat" deathrattle = Hit(RANDOM_ENEMY_CHARACTER, 1) class OG_292: "Forlorn Stalker" play = Buff(FRIENDLY_HAND + MINION + DEATHRATTLE, "OG_292e") OG_292e = buff(+1, +1)
from ..utils import * ## # Minions class OG_179: "Fiery Bat" deathrattle = Hit(RANDOM_ENEMY_CHARACTER, 1) class OG_292: "Forlorn Stalker" play = Buff(FRIENDLY_HAND + MINION + DEATHRATTLE, "OG_292e") OG_292e = buff(+1, +1) ## # Spells class OG_045: "Infest" play = Buff(FRIENDLY_MINIONS, "OG_045a") class ...
Implement Infest, On the Hunt, Call of the Wild
Implement Infest, On the Hunt, Call of the Wild
Python
agpl-3.0
jleclanche/fireplace,beheh/fireplace,NightKev/fireplace
from ..utils import * ## # Minions class OG_179: "Fiery Bat" deathrattle = Hit(RANDOM_ENEMY_CHARACTER, 1) class OG_292: "Forlorn Stalker" play = Buff(FRIENDLY_HAND + MINION + DEATHRATTLE, "OG_292e") OG_292e = buff(+1, +1) Implement Infest, On the Hunt, Call of the Wild
from ..utils import * ## # Minions class OG_179: "Fiery Bat" deathrattle = Hit(RANDOM_ENEMY_CHARACTER, 1) class OG_292: "Forlorn Stalker" play = Buff(FRIENDLY_HAND + MINION + DEATHRATTLE, "OG_292e") OG_292e = buff(+1, +1) ## # Spells class OG_045: "Infest" play = Buff(FRIENDLY_MINIONS, "OG_045a") class ...
<commit_before>from ..utils import * ## # Minions class OG_179: "Fiery Bat" deathrattle = Hit(RANDOM_ENEMY_CHARACTER, 1) class OG_292: "Forlorn Stalker" play = Buff(FRIENDLY_HAND + MINION + DEATHRATTLE, "OG_292e") OG_292e = buff(+1, +1) <commit_msg>Implement Infest, On the Hunt, Call of the Wild<commit_after>
from ..utils import * ## # Minions class OG_179: "Fiery Bat" deathrattle = Hit(RANDOM_ENEMY_CHARACTER, 1) class OG_292: "Forlorn Stalker" play = Buff(FRIENDLY_HAND + MINION + DEATHRATTLE, "OG_292e") OG_292e = buff(+1, +1) ## # Spells class OG_045: "Infest" play = Buff(FRIENDLY_MINIONS, "OG_045a") class ...
from ..utils import * ## # Minions class OG_179: "Fiery Bat" deathrattle = Hit(RANDOM_ENEMY_CHARACTER, 1) class OG_292: "Forlorn Stalker" play = Buff(FRIENDLY_HAND + MINION + DEATHRATTLE, "OG_292e") OG_292e = buff(+1, +1) Implement Infest, On the Hunt, Call of the Wildfrom ..utils import * ## # Minions cla...
<commit_before>from ..utils import * ## # Minions class OG_179: "Fiery Bat" deathrattle = Hit(RANDOM_ENEMY_CHARACTER, 1) class OG_292: "Forlorn Stalker" play = Buff(FRIENDLY_HAND + MINION + DEATHRATTLE, "OG_292e") OG_292e = buff(+1, +1) <commit_msg>Implement Infest, On the Hunt, Call of the Wild<commit_after>...
df52bf506fdb6754d51c2320108bcd832a0dfc02
django_twilio_sms/admin.py
django_twilio_sms/admin.py
from django.contrib import admin from .models import * class MessageAdmin(admin.ModelAdmin): list_display = ('to_phone_number', 'from_phone_number', 'status', 'date_sent') list_display_links = list_display list_filter = ('status', 'date_sent') date_hierarchy = 'date_sent' ordering = ('-date_sent',...
from django.contrib import admin from .models import * class MessageAdmin(admin.ModelAdmin): list_display = ('to_phone_number', 'from_phone_number', 'status', 'direction', 'date_sent') list_display_links = list_display list_filter = ('status', 'direction', 'date_sent') date_hierarchy = 'date_sent' ...
Add direction to Message listing
Add direction to Message listing
Python
bsd-3-clause
cfc603/django-twilio-sms-models
from django.contrib import admin from .models import * class MessageAdmin(admin.ModelAdmin): list_display = ('to_phone_number', 'from_phone_number', 'status', 'date_sent') list_display_links = list_display list_filter = ('status', 'date_sent') date_hierarchy = 'date_sent' ordering = ('-date_sent',...
from django.contrib import admin from .models import * class MessageAdmin(admin.ModelAdmin): list_display = ('to_phone_number', 'from_phone_number', 'status', 'direction', 'date_sent') list_display_links = list_display list_filter = ('status', 'direction', 'date_sent') date_hierarchy = 'date_sent' ...
<commit_before>from django.contrib import admin from .models import * class MessageAdmin(admin.ModelAdmin): list_display = ('to_phone_number', 'from_phone_number', 'status', 'date_sent') list_display_links = list_display list_filter = ('status', 'date_sent') date_hierarchy = 'date_sent' ordering =...
from django.contrib import admin from .models import * class MessageAdmin(admin.ModelAdmin): list_display = ('to_phone_number', 'from_phone_number', 'status', 'direction', 'date_sent') list_display_links = list_display list_filter = ('status', 'direction', 'date_sent') date_hierarchy = 'date_sent' ...
from django.contrib import admin from .models import * class MessageAdmin(admin.ModelAdmin): list_display = ('to_phone_number', 'from_phone_number', 'status', 'date_sent') list_display_links = list_display list_filter = ('status', 'date_sent') date_hierarchy = 'date_sent' ordering = ('-date_sent',...
<commit_before>from django.contrib import admin from .models import * class MessageAdmin(admin.ModelAdmin): list_display = ('to_phone_number', 'from_phone_number', 'status', 'date_sent') list_display_links = list_display list_filter = ('status', 'date_sent') date_hierarchy = 'date_sent' ordering =...
9ef1c87ec752df3fb32cfe8ee94216e5eb3326fe
alg_quick_sort.py
alg_quick_sort.py
from __future__ import absolute_import from __future__ import print_function from __future__ import division def quick_sort(a_list): """Quick sort algortihm with list comprehension recursion.""" if len(a_list) <= 1: return a_list pivot_value = a_list[len(a_list) // 2] left_list = [x for x in a...
from __future__ import absolute_import from __future__ import print_function from __future__ import division def quick_sort(a_list): """Quick sort algortihm with list comprehension recursion. Time complexity: O(n*logn). """ if len(a_list) <= 1: return a_list pivot_value = a_list[len(a...
Add to doc string: time complexity
Add to doc string: time complexity
Python
bsd-2-clause
bowen0701/algorithms_data_structures
from __future__ import absolute_import from __future__ import print_function from __future__ import division def quick_sort(a_list): """Quick sort algortihm with list comprehension recursion.""" if len(a_list) <= 1: return a_list pivot_value = a_list[len(a_list) // 2] left_list = [x for x in a...
from __future__ import absolute_import from __future__ import print_function from __future__ import division def quick_sort(a_list): """Quick sort algortihm with list comprehension recursion. Time complexity: O(n*logn). """ if len(a_list) <= 1: return a_list pivot_value = a_list[len(a...
<commit_before>from __future__ import absolute_import from __future__ import print_function from __future__ import division def quick_sort(a_list): """Quick sort algortihm with list comprehension recursion.""" if len(a_list) <= 1: return a_list pivot_value = a_list[len(a_list) // 2] left_list ...
from __future__ import absolute_import from __future__ import print_function from __future__ import division def quick_sort(a_list): """Quick sort algortihm with list comprehension recursion. Time complexity: O(n*logn). """ if len(a_list) <= 1: return a_list pivot_value = a_list[len(a...
from __future__ import absolute_import from __future__ import print_function from __future__ import division def quick_sort(a_list): """Quick sort algortihm with list comprehension recursion.""" if len(a_list) <= 1: return a_list pivot_value = a_list[len(a_list) // 2] left_list = [x for x in a...
<commit_before>from __future__ import absolute_import from __future__ import print_function from __future__ import division def quick_sort(a_list): """Quick sort algortihm with list comprehension recursion.""" if len(a_list) <= 1: return a_list pivot_value = a_list[len(a_list) // 2] left_list ...
a71b60363a39414eac712210086ce51abeed41d0
api/feedback/admin.py
api/feedback/admin.py
from django import forms from django.contrib import admin from feedback.models import Feedback class FeedbackAdminForm(forms.ModelForm): class Meta: model = Feedback fields = '__all__' widgets = { 'comments': forms.Textarea(attrs={'cols': 80, 'rows': 5}), 'user_age...
from django import forms from django.contrib import admin from feedback.models import Feedback class FeedbackAdminForm(forms.ModelForm): class Meta: model = Feedback fields = '__all__' widgets = { 'comments': forms.Textarea(attrs={'cols': 80, 'rows': 5}), 'user_age...
Order feedback by most recent
Order feedback by most recent
Python
apache-2.0
prattl/teamfinder,prattl/teamfinder,prattl/teamfinder,prattl/teamfinder
from django import forms from django.contrib import admin from feedback.models import Feedback class FeedbackAdminForm(forms.ModelForm): class Meta: model = Feedback fields = '__all__' widgets = { 'comments': forms.Textarea(attrs={'cols': 80, 'rows': 5}), 'user_age...
from django import forms from django.contrib import admin from feedback.models import Feedback class FeedbackAdminForm(forms.ModelForm): class Meta: model = Feedback fields = '__all__' widgets = { 'comments': forms.Textarea(attrs={'cols': 80, 'rows': 5}), 'user_age...
<commit_before>from django import forms from django.contrib import admin from feedback.models import Feedback class FeedbackAdminForm(forms.ModelForm): class Meta: model = Feedback fields = '__all__' widgets = { 'comments': forms.Textarea(attrs={'cols': 80, 'rows': 5}), ...
from django import forms from django.contrib import admin from feedback.models import Feedback class FeedbackAdminForm(forms.ModelForm): class Meta: model = Feedback fields = '__all__' widgets = { 'comments': forms.Textarea(attrs={'cols': 80, 'rows': 5}), 'user_age...
from django import forms from django.contrib import admin from feedback.models import Feedback class FeedbackAdminForm(forms.ModelForm): class Meta: model = Feedback fields = '__all__' widgets = { 'comments': forms.Textarea(attrs={'cols': 80, 'rows': 5}), 'user_age...
<commit_before>from django import forms from django.contrib import admin from feedback.models import Feedback class FeedbackAdminForm(forms.ModelForm): class Meta: model = Feedback fields = '__all__' widgets = { 'comments': forms.Textarea(attrs={'cols': 80, 'rows': 5}), ...
90a024186928d98dfbd3db29d02d5eeba4a55415
sql/src/test/BugTracker-2009/Tests/create_on_ro_db_crash.SF-2830238.py
sql/src/test/BugTracker-2009/Tests/create_on_ro_db_crash.SF-2830238.py
import sys import os import time try: import subprocess except ImportError: # use private copy for old Python versions import MonetDBtesting.subprocess26 as subprocess def server(): s = subprocess.Popen("%s --dbinit='include sql;' --set gdk_readonly=yes" % os.getenv('MSERVER'), ...
import sys import os import time try: import subprocess except ImportError: # use private copy for old Python versions import MonetDBtesting.subprocess26 as subprocess def server(): s = subprocess.Popen('%s "--dbinit=include sql;" --set gdk_readonly=yes' % os.getenv('MSERVER'), ...
Use double quotes to quote command arguments. The Windows command parser doesn't recognize single quotes.
Use double quotes to quote command arguments. The Windows command parser doesn't recognize single quotes.
Python
mpl-2.0
zyzyis/monetdb,zyzyis/monetdb,zyzyis/monetdb,zyzyis/monetdb,zyzyis/monetdb,zyzyis/monetdb,zyzyis/monetdb,zyzyis/monetdb,zyzyis/monetdb,zyzyis/monetdb
import sys import os import time try: import subprocess except ImportError: # use private copy for old Python versions import MonetDBtesting.subprocess26 as subprocess def server(): s = subprocess.Popen("%s --dbinit='include sql;' --set gdk_readonly=yes" % os.getenv('MSERVER'), ...
import sys import os import time try: import subprocess except ImportError: # use private copy for old Python versions import MonetDBtesting.subprocess26 as subprocess def server(): s = subprocess.Popen('%s "--dbinit=include sql;" --set gdk_readonly=yes' % os.getenv('MSERVER'), ...
<commit_before>import sys import os import time try: import subprocess except ImportError: # use private copy for old Python versions import MonetDBtesting.subprocess26 as subprocess def server(): s = subprocess.Popen("%s --dbinit='include sql;' --set gdk_readonly=yes" % os.getenv('MSERVER'), ...
import sys import os import time try: import subprocess except ImportError: # use private copy for old Python versions import MonetDBtesting.subprocess26 as subprocess def server(): s = subprocess.Popen('%s "--dbinit=include sql;" --set gdk_readonly=yes' % os.getenv('MSERVER'), ...
import sys import os import time try: import subprocess except ImportError: # use private copy for old Python versions import MonetDBtesting.subprocess26 as subprocess def server(): s = subprocess.Popen("%s --dbinit='include sql;' --set gdk_readonly=yes" % os.getenv('MSERVER'), ...
<commit_before>import sys import os import time try: import subprocess except ImportError: # use private copy for old Python versions import MonetDBtesting.subprocess26 as subprocess def server(): s = subprocess.Popen("%s --dbinit='include sql;' --set gdk_readonly=yes" % os.getenv('MSERVER'), ...
13f857978378df38a4d52cc92aec750c3804f069
build.py
build.py
# OSU SPS Website Build Script def loadFile( src, prefx ): out = "" for line in open( src, 'r' ): out += prefx + line return out def outputFile( name, content ): file = open( name, 'w' ) file.write( content ) file.close() out_folder = "output/" src_folder = "src/" includes_folder ...
# OSU SPS Website Build Script import os def loadFile( src, prefx ): out = "" for line in open( src, 'r' ): out += prefx + line return out def outputFile( name, content ): file = open( name, 'w' ) file.write( content ) file.close() out_folder = "output/" src_folder = "src/" inclu...
Remove need for static pages
Remove need for static pages
Python
mit
GeekLogan/OSU-SPS-Website,GeekLogan/OSU-SPS-Website
# OSU SPS Website Build Script def loadFile( src, prefx ): out = "" for line in open( src, 'r' ): out += prefx + line return out def outputFile( name, content ): file = open( name, 'w' ) file.write( content ) file.close() out_folder = "output/" src_folder = "src/" includes_folder ...
# OSU SPS Website Build Script import os def loadFile( src, prefx ): out = "" for line in open( src, 'r' ): out += prefx + line return out def outputFile( name, content ): file = open( name, 'w' ) file.write( content ) file.close() out_folder = "output/" src_folder = "src/" inclu...
<commit_before># OSU SPS Website Build Script def loadFile( src, prefx ): out = "" for line in open( src, 'r' ): out += prefx + line return out def outputFile( name, content ): file = open( name, 'w' ) file.write( content ) file.close() out_folder = "output/" src_folder = "src/" i...
# OSU SPS Website Build Script import os def loadFile( src, prefx ): out = "" for line in open( src, 'r' ): out += prefx + line return out def outputFile( name, content ): file = open( name, 'w' ) file.write( content ) file.close() out_folder = "output/" src_folder = "src/" inclu...
# OSU SPS Website Build Script def loadFile( src, prefx ): out = "" for line in open( src, 'r' ): out += prefx + line return out def outputFile( name, content ): file = open( name, 'w' ) file.write( content ) file.close() out_folder = "output/" src_folder = "src/" includes_folder ...
<commit_before># OSU SPS Website Build Script def loadFile( src, prefx ): out = "" for line in open( src, 'r' ): out += prefx + line return out def outputFile( name, content ): file = open( name, 'w' ) file.write( content ) file.close() out_folder = "output/" src_folder = "src/" i...
f34c230c93ea8c87a77c29dc1bf86aa450e87749
build.py
build.py
#!/usr/bin/env python3 import glob import time import re def readfile(fn): with open(fn, 'Ur', encoding='utf8') as f: return f.read() def loaderString(var): fn = var.group(1) return readfile(fn).replace('\n', '\\n').replace('\'', '\\\'') def loaderRaw(var): fn = var.group(1) return readf...
#!/usr/bin/env python import glob import time import re import io def readfile(fn): with io.open(fn, 'Ur', encoding='utf8') as f: return f.read() def loaderString(var): fn = var.group(1) return readfile(fn).replace('\n', '\\n').replace('\'', '\\\'') def loaderRaw(var): fn = var.group(1) ...
Use io.open to support python 2.x _and_ python 3
Use io.open to support python 2.x _and_ python 3
Python
isc
SpamapS/ingress-intel-total-conversion,fkloft/ingress-intel-total-conversion,Galfinite/ingress-intel-total-conversion,jonatkins/ingress-intel-total-conversion,meyerdg/ingress-intel-total-conversion,pleasantone/ingress-intel-total-conversion,MarkTraceur/ingress-intel-total-conversion,nikolawannabe/ingress-intel-total-co...
#!/usr/bin/env python3 import glob import time import re def readfile(fn): with open(fn, 'Ur', encoding='utf8') as f: return f.read() def loaderString(var): fn = var.group(1) return readfile(fn).replace('\n', '\\n').replace('\'', '\\\'') def loaderRaw(var): fn = var.group(1) return readf...
#!/usr/bin/env python import glob import time import re import io def readfile(fn): with io.open(fn, 'Ur', encoding='utf8') as f: return f.read() def loaderString(var): fn = var.group(1) return readfile(fn).replace('\n', '\\n').replace('\'', '\\\'') def loaderRaw(var): fn = var.group(1) ...
<commit_before>#!/usr/bin/env python3 import glob import time import re def readfile(fn): with open(fn, 'Ur', encoding='utf8') as f: return f.read() def loaderString(var): fn = var.group(1) return readfile(fn).replace('\n', '\\n').replace('\'', '\\\'') def loaderRaw(var): fn = var.group(1) ...
#!/usr/bin/env python import glob import time import re import io def readfile(fn): with io.open(fn, 'Ur', encoding='utf8') as f: return f.read() def loaderString(var): fn = var.group(1) return readfile(fn).replace('\n', '\\n').replace('\'', '\\\'') def loaderRaw(var): fn = var.group(1) ...
#!/usr/bin/env python3 import glob import time import re def readfile(fn): with open(fn, 'Ur', encoding='utf8') as f: return f.read() def loaderString(var): fn = var.group(1) return readfile(fn).replace('\n', '\\n').replace('\'', '\\\'') def loaderRaw(var): fn = var.group(1) return readf...
<commit_before>#!/usr/bin/env python3 import glob import time import re def readfile(fn): with open(fn, 'Ur', encoding='utf8') as f: return f.read() def loaderString(var): fn = var.group(1) return readfile(fn).replace('\n', '\\n').replace('\'', '\\\'') def loaderRaw(var): fn = var.group(1) ...
037fcccebae10f608f5a2711fbbc659411d6879b
okdataset/context.py
okdataset/context.py
""" DataSet context """ class DsContext(object): def __init__(self, config="okdataset.yml"): self.workers = 8
import yaml import os """ DataSet context """ class Context(object): def __init__(self, config=os.path.dirname(os.path.realpath(__file__)) + "/../okdataset.yml"): self.workers = 8 self.config = yaml.load(open(config).read())
Put yaml config in Context.
Put yaml config in Context.
Python
mit
anthonyserious/okdataset,anthonyserious/okdataset
""" DataSet context """ class DsContext(object): def __init__(self, config="okdataset.yml"): self.workers = 8 Put yaml config in Context.
import yaml import os """ DataSet context """ class Context(object): def __init__(self, config=os.path.dirname(os.path.realpath(__file__)) + "/../okdataset.yml"): self.workers = 8 self.config = yaml.load(open(config).read())
<commit_before>""" DataSet context """ class DsContext(object): def __init__(self, config="okdataset.yml"): self.workers = 8 <commit_msg>Put yaml config in Context.<commit_after>
import yaml import os """ DataSet context """ class Context(object): def __init__(self, config=os.path.dirname(os.path.realpath(__file__)) + "/../okdataset.yml"): self.workers = 8 self.config = yaml.load(open(config).read())
""" DataSet context """ class DsContext(object): def __init__(self, config="okdataset.yml"): self.workers = 8 Put yaml config in Context.import yaml import os """ DataSet context """ class Context(object): def __init__(self, config=os.path.dirname(os.path.realpath(__file__)) + "/../okdataset.yml"): ...
<commit_before>""" DataSet context """ class DsContext(object): def __init__(self, config="okdataset.yml"): self.workers = 8 <commit_msg>Put yaml config in Context.<commit_after>import yaml import os """ DataSet context """ class Context(object): def __init__(self, config=os.path.dirname(os.path.realpa...
1697d267633f981b7a6e1a14b5e5b9b05f3b8179
imagersite/imager_images/tests.py
imagersite/imager_images/tests.py
from __future__ import unicode_literals from django.contrib.auth.models import User from django.test import TestCase import factory from faker import Faker from imager_profile.models import ImagerProfile from .models import Album, Photo # Create your tests here. fake = Faker() class UserFactory(factory.django.Djang...
from __future__ import unicode_literals from django.contrib.auth.models import User from django.test import TestCase import factory from faker import Faker from .models import Album, Photo # Create your tests here. fake = Faker() class UserFactory(factory.django.DjangoModelFactory): """Create a fake user.""" ...
Fix user, album factories; add setup for photo test case
Fix user, album factories; add setup for photo test case
Python
mit
jesseklein406/django-imager,jesseklein406/django-imager,jesseklein406/django-imager
from __future__ import unicode_literals from django.contrib.auth.models import User from django.test import TestCase import factory from faker import Faker from imager_profile.models import ImagerProfile from .models import Album, Photo # Create your tests here. fake = Faker() class UserFactory(factory.django.Djang...
from __future__ import unicode_literals from django.contrib.auth.models import User from django.test import TestCase import factory from faker import Faker from .models import Album, Photo # Create your tests here. fake = Faker() class UserFactory(factory.django.DjangoModelFactory): """Create a fake user.""" ...
<commit_before>from __future__ import unicode_literals from django.contrib.auth.models import User from django.test import TestCase import factory from faker import Faker from imager_profile.models import ImagerProfile from .models import Album, Photo # Create your tests here. fake = Faker() class UserFactory(facto...
from __future__ import unicode_literals from django.contrib.auth.models import User from django.test import TestCase import factory from faker import Faker from .models import Album, Photo # Create your tests here. fake = Faker() class UserFactory(factory.django.DjangoModelFactory): """Create a fake user.""" ...
from __future__ import unicode_literals from django.contrib.auth.models import User from django.test import TestCase import factory from faker import Faker from imager_profile.models import ImagerProfile from .models import Album, Photo # Create your tests here. fake = Faker() class UserFactory(factory.django.Djang...
<commit_before>from __future__ import unicode_literals from django.contrib.auth.models import User from django.test import TestCase import factory from faker import Faker from imager_profile.models import ImagerProfile from .models import Album, Photo # Create your tests here. fake = Faker() class UserFactory(facto...
9b3f9b69efef93e5c56a0452ccff2e6195663c6b
imboclient/header/authenticate.py
imboclient/header/authenticate.py
import hmac, hashlib class Authenticate: def __init__(self, public_key, private_key, method, url, timestamp): self._public_key = public_key self._private_key = private_key self.method = method self.url = url self.timestamp = timestamp def _generate_auth_hash(self): ...
import hmac import hashlib class Authenticate: def __init__(self, public_key, private_key, method, url, timestamp): self._public_key = public_key self._private_key = private_key self.method = method self.url = url self.timestamp = timestamp def _generate_auth_hash(sel...
Clean up PEP8 inconsistencies in header classes
Clean up PEP8 inconsistencies in header classes
Python
mit
imbo/imboclient-python,imbo/imboclient-python,imbo/imboclient-python
import hmac, hashlib class Authenticate: def __init__(self, public_key, private_key, method, url, timestamp): self._public_key = public_key self._private_key = private_key self.method = method self.url = url self.timestamp = timestamp def _generate_auth_hash(self): ...
import hmac import hashlib class Authenticate: def __init__(self, public_key, private_key, method, url, timestamp): self._public_key = public_key self._private_key = private_key self.method = method self.url = url self.timestamp = timestamp def _generate_auth_hash(sel...
<commit_before>import hmac, hashlib class Authenticate: def __init__(self, public_key, private_key, method, url, timestamp): self._public_key = public_key self._private_key = private_key self.method = method self.url = url self.timestamp = timestamp def _generate_auth_...
import hmac import hashlib class Authenticate: def __init__(self, public_key, private_key, method, url, timestamp): self._public_key = public_key self._private_key = private_key self.method = method self.url = url self.timestamp = timestamp def _generate_auth_hash(sel...
import hmac, hashlib class Authenticate: def __init__(self, public_key, private_key, method, url, timestamp): self._public_key = public_key self._private_key = private_key self.method = method self.url = url self.timestamp = timestamp def _generate_auth_hash(self): ...
<commit_before>import hmac, hashlib class Authenticate: def __init__(self, public_key, private_key, method, url, timestamp): self._public_key = public_key self._private_key = private_key self.method = method self.url = url self.timestamp = timestamp def _generate_auth_...
9537cb765776135bc6d2777b6f4f931724edea7f
project_name/project_name/urls.py
project_name/project_name/urls.py
from django.conf.urls import include, url from django.conf.urls.static import static from django.views.generic import TemplateView from django.contrib import admin from django.conf import settings import views admin.autodiscover() urlpatterns = [ url(r'^$', TemplateView.as_view(template_name='{{project_name}}/ba...
from django.conf.urls import include, url from django.conf.urls.static import static from django.views.generic import TemplateView from django.contrib import admin from django.conf import settings import views import django.contrib.auth.views.login admin.autodiscover() urlpatterns = [ url(r'^$', TemplateView.as_...
Include django.contrib.auth.views.login in django 1.10 way
Include django.contrib.auth.views.login in django 1.10 way
Python
mit
tom-henderson/django-template,tom-henderson/django-template
from django.conf.urls import include, url from django.conf.urls.static import static from django.views.generic import TemplateView from django.contrib import admin from django.conf import settings import views admin.autodiscover() urlpatterns = [ url(r'^$', TemplateView.as_view(template_name='{{project_name}}/ba...
from django.conf.urls import include, url from django.conf.urls.static import static from django.views.generic import TemplateView from django.contrib import admin from django.conf import settings import views import django.contrib.auth.views.login admin.autodiscover() urlpatterns = [ url(r'^$', TemplateView.as_...
<commit_before>from django.conf.urls import include, url from django.conf.urls.static import static from django.views.generic import TemplateView from django.contrib import admin from django.conf import settings import views admin.autodiscover() urlpatterns = [ url(r'^$', TemplateView.as_view(template_name='{{pr...
from django.conf.urls import include, url from django.conf.urls.static import static from django.views.generic import TemplateView from django.contrib import admin from django.conf import settings import views import django.contrib.auth.views.login admin.autodiscover() urlpatterns = [ url(r'^$', TemplateView.as_...
from django.conf.urls import include, url from django.conf.urls.static import static from django.views.generic import TemplateView from django.contrib import admin from django.conf import settings import views admin.autodiscover() urlpatterns = [ url(r'^$', TemplateView.as_view(template_name='{{project_name}}/ba...
<commit_before>from django.conf.urls import include, url from django.conf.urls.static import static from django.views.generic import TemplateView from django.contrib import admin from django.conf import settings import views admin.autodiscover() urlpatterns = [ url(r'^$', TemplateView.as_view(template_name='{{pr...
a0a4ba94cc76d5c4395d869fe5ea70caae14fa36
pyroSAR/tests/test_snap_exe.py
pyroSAR/tests/test_snap_exe.py
import pytest from contextlib import contextmanager from pyroSAR._dev_config import ExamineExe from pyroSAR.snap.auxil import ExamineSnap @contextmanager def not_raises(ExpectedException): try: yield except ExpectedException: raise AssertionError( "Did raise exception {0} when it s...
from contextlib import contextmanager import pytest from pyroSAR._dev_config import ExamineExe from pyroSAR.snap.auxil import ExamineSnap @contextmanager def not_raises(ExpectedException): try: yield except ExpectedException: raise AssertionError( "Did raise exception {0} when i...
Add unit test to determine if the classes ExamineExe and ExamineSnap will work properly.
Add unit test to determine if the classes ExamineExe and ExamineSnap will work properly.
Python
mit
johntruckenbrodt/pyroSAR,johntruckenbrodt/pyroSAR
import pytest from contextlib import contextmanager from pyroSAR._dev_config import ExamineExe from pyroSAR.snap.auxil import ExamineSnap @contextmanager def not_raises(ExpectedException): try: yield except ExpectedException: raise AssertionError( "Did raise exception {0} when it s...
from contextlib import contextmanager import pytest from pyroSAR._dev_config import ExamineExe from pyroSAR.snap.auxil import ExamineSnap @contextmanager def not_raises(ExpectedException): try: yield except ExpectedException: raise AssertionError( "Did raise exception {0} when i...
<commit_before>import pytest from contextlib import contextmanager from pyroSAR._dev_config import ExamineExe from pyroSAR.snap.auxil import ExamineSnap @contextmanager def not_raises(ExpectedException): try: yield except ExpectedException: raise AssertionError( "Did raise exceptio...
from contextlib import contextmanager import pytest from pyroSAR._dev_config import ExamineExe from pyroSAR.snap.auxil import ExamineSnap @contextmanager def not_raises(ExpectedException): try: yield except ExpectedException: raise AssertionError( "Did raise exception {0} when i...
import pytest from contextlib import contextmanager from pyroSAR._dev_config import ExamineExe from pyroSAR.snap.auxil import ExamineSnap @contextmanager def not_raises(ExpectedException): try: yield except ExpectedException: raise AssertionError( "Did raise exception {0} when it s...
<commit_before>import pytest from contextlib import contextmanager from pyroSAR._dev_config import ExamineExe from pyroSAR.snap.auxil import ExamineSnap @contextmanager def not_raises(ExpectedException): try: yield except ExpectedException: raise AssertionError( "Did raise exceptio...
584bfedf9c71bad0715b9d167c3e90ec588d5110
pydarkstar/scrubbing/scrubber.py
pydarkstar/scrubbing/scrubber.py
from ..darkobject import DarkObject from bs4 import BeautifulSoup import requests import logging import time class Scrubber(DarkObject): def __init__(self): super(Scrubber, self).__init__() def scrub(self): """ Get item metadata. """ return {} # noinspection PyBro...
from ..darkobject import DarkObject from bs4 import BeautifulSoup import requests import logging import time import bs4 class Scrubber(DarkObject): def __init__(self): super(Scrubber, self).__init__() def scrub(self): """ Get item metadata. """ return {} # noinspe...
Add try accept block for bs4 features
Add try accept block for bs4 features
Python
mit
AdamGagorik/pydarkstar
from ..darkobject import DarkObject from bs4 import BeautifulSoup import requests import logging import time class Scrubber(DarkObject): def __init__(self): super(Scrubber, self).__init__() def scrub(self): """ Get item metadata. """ return {} # noinspection PyBro...
from ..darkobject import DarkObject from bs4 import BeautifulSoup import requests import logging import time import bs4 class Scrubber(DarkObject): def __init__(self): super(Scrubber, self).__init__() def scrub(self): """ Get item metadata. """ return {} # noinspe...
<commit_before>from ..darkobject import DarkObject from bs4 import BeautifulSoup import requests import logging import time class Scrubber(DarkObject): def __init__(self): super(Scrubber, self).__init__() def scrub(self): """ Get item metadata. """ return {} # noi...
from ..darkobject import DarkObject from bs4 import BeautifulSoup import requests import logging import time import bs4 class Scrubber(DarkObject): def __init__(self): super(Scrubber, self).__init__() def scrub(self): """ Get item metadata. """ return {} # noinspe...
from ..darkobject import DarkObject from bs4 import BeautifulSoup import requests import logging import time class Scrubber(DarkObject): def __init__(self): super(Scrubber, self).__init__() def scrub(self): """ Get item metadata. """ return {} # noinspection PyBro...
<commit_before>from ..darkobject import DarkObject from bs4 import BeautifulSoup import requests import logging import time class Scrubber(DarkObject): def __init__(self): super(Scrubber, self).__init__() def scrub(self): """ Get item metadata. """ return {} # noi...
3bceae5afd3158e98e76dd0e228efc4d1396a433
marvin/__init__.py
marvin/__init__.py
""" marvin ~~~~~~ This is the main entry point to marvin, the API endpoints for streamr. """ # pylint: disable=invalid-name from flask import Flask from flask.ext.sqlalchemy import SQLAlchemy from flask.ext.restful import Api from os import path db = SQLAlchemy() api = Api() def create_app(config_file=...
""" marvin ~~~~~~ This is the main entry point to marvin, the API endpoints for streamr. """ # pylint: disable=invalid-name from flask import Flask, make_response from flask.ext.sqlalchemy import SQLAlchemy from flask.ext.restful import Api from os import path import ujson db = SQLAlchemy() api = Api()...
Use ujson for encoding responses.
Use ujson for encoding responses.
Python
mit
streamr/marvin,streamr/marvin,streamr/marvin
""" marvin ~~~~~~ This is the main entry point to marvin, the API endpoints for streamr. """ # pylint: disable=invalid-name from flask import Flask from flask.ext.sqlalchemy import SQLAlchemy from flask.ext.restful import Api from os import path db = SQLAlchemy() api = Api() def create_app(config_file=...
""" marvin ~~~~~~ This is the main entry point to marvin, the API endpoints for streamr. """ # pylint: disable=invalid-name from flask import Flask, make_response from flask.ext.sqlalchemy import SQLAlchemy from flask.ext.restful import Api from os import path import ujson db = SQLAlchemy() api = Api()...
<commit_before>""" marvin ~~~~~~ This is the main entry point to marvin, the API endpoints for streamr. """ # pylint: disable=invalid-name from flask import Flask from flask.ext.sqlalchemy import SQLAlchemy from flask.ext.restful import Api from os import path db = SQLAlchemy() api = Api() def create_a...
""" marvin ~~~~~~ This is the main entry point to marvin, the API endpoints for streamr. """ # pylint: disable=invalid-name from flask import Flask, make_response from flask.ext.sqlalchemy import SQLAlchemy from flask.ext.restful import Api from os import path import ujson db = SQLAlchemy() api = Api()...
""" marvin ~~~~~~ This is the main entry point to marvin, the API endpoints for streamr. """ # pylint: disable=invalid-name from flask import Flask from flask.ext.sqlalchemy import SQLAlchemy from flask.ext.restful import Api from os import path db = SQLAlchemy() api = Api() def create_app(config_file=...
<commit_before>""" marvin ~~~~~~ This is the main entry point to marvin, the API endpoints for streamr. """ # pylint: disable=invalid-name from flask import Flask from flask.ext.sqlalchemy import SQLAlchemy from flask.ext.restful import Api from os import path db = SQLAlchemy() api = Api() def create_a...
e096343aaaa916232633543d57431b7f3022215a
awscfncli/__main__.py
awscfncli/__main__.py
# -*- encoding: utf-8 -*- __author__ = 'kotaimen' __date__ = '28-Feb-2018' """Main cli entry point, called when awscfncli is run as a package, imported in setuptools intergration. cli package stucture: Click main entry: cli/main.py Command groups: cli/group_named/__init__.py ...
# -*- encoding: utf-8 -*- __author__ = 'kotaimen' __date__ = '28-Feb-2018' """Main cli entry point, called when awscfncli is run as a package, imported in setuptools intergration. cli package stucture: Click main entry: cli/main.py Command groups: cli/group_named/__init__.py ...
Add click automatic environment variable prefix.
Add click automatic environment variable prefix.
Python
mit
Kotaimen/awscfncli,Kotaimen/awscfncli
# -*- encoding: utf-8 -*- __author__ = 'kotaimen' __date__ = '28-Feb-2018' """Main cli entry point, called when awscfncli is run as a package, imported in setuptools intergration. cli package stucture: Click main entry: cli/main.py Command groups: cli/group_named/__init__.py ...
# -*- encoding: utf-8 -*- __author__ = 'kotaimen' __date__ = '28-Feb-2018' """Main cli entry point, called when awscfncli is run as a package, imported in setuptools intergration. cli package stucture: Click main entry: cli/main.py Command groups: cli/group_named/__init__.py ...
<commit_before># -*- encoding: utf-8 -*- __author__ = 'kotaimen' __date__ = '28-Feb-2018' """Main cli entry point, called when awscfncli is run as a package, imported in setuptools intergration. cli package stucture: Click main entry: cli/main.py Command groups: cli/group_named/__in...
# -*- encoding: utf-8 -*- __author__ = 'kotaimen' __date__ = '28-Feb-2018' """Main cli entry point, called when awscfncli is run as a package, imported in setuptools intergration. cli package stucture: Click main entry: cli/main.py Command groups: cli/group_named/__init__.py ...
# -*- encoding: utf-8 -*- __author__ = 'kotaimen' __date__ = '28-Feb-2018' """Main cli entry point, called when awscfncli is run as a package, imported in setuptools intergration. cli package stucture: Click main entry: cli/main.py Command groups: cli/group_named/__init__.py ...
<commit_before># -*- encoding: utf-8 -*- __author__ = 'kotaimen' __date__ = '28-Feb-2018' """Main cli entry point, called when awscfncli is run as a package, imported in setuptools intergration. cli package stucture: Click main entry: cli/main.py Command groups: cli/group_named/__in...
9684af3ecb0fd26deef87e2509a5de892a62e5f1
cloudsizzle/studyplanner/courselist/views.py
cloudsizzle/studyplanner/courselist/views.py
# Create your views here. from django.shortcuts import render_to_response from studyplanner.courselist.models import Course from studyplanner.courselist.models import Faculty from studyplanner.courselist.models import Department def list_courses(request, faculty, department): department = Department.objects.get(sl...
# Create your views here. from django.shortcuts import render_to_response from studyplanner.courselist.models import Course from studyplanner.courselist.models import Faculty from studyplanner.courselist.models import Department def list_courses(request, faculty, department): department = Department.objects.get(sl...
Add user object to template context.
Add user object to template context.
Python
mit
jpvanhal/cloudsizzle,jpvanhal/cloudsizzle
# Create your views here. from django.shortcuts import render_to_response from studyplanner.courselist.models import Course from studyplanner.courselist.models import Faculty from studyplanner.courselist.models import Department def list_courses(request, faculty, department): department = Department.objects.get(sl...
# Create your views here. from django.shortcuts import render_to_response from studyplanner.courselist.models import Course from studyplanner.courselist.models import Faculty from studyplanner.courselist.models import Department def list_courses(request, faculty, department): department = Department.objects.get(sl...
<commit_before># Create your views here. from django.shortcuts import render_to_response from studyplanner.courselist.models import Course from studyplanner.courselist.models import Faculty from studyplanner.courselist.models import Department def list_courses(request, faculty, department): department = Department...
# Create your views here. from django.shortcuts import render_to_response from studyplanner.courselist.models import Course from studyplanner.courselist.models import Faculty from studyplanner.courselist.models import Department def list_courses(request, faculty, department): department = Department.objects.get(sl...
# Create your views here. from django.shortcuts import render_to_response from studyplanner.courselist.models import Course from studyplanner.courselist.models import Faculty from studyplanner.courselist.models import Department def list_courses(request, faculty, department): department = Department.objects.get(sl...
<commit_before># Create your views here. from django.shortcuts import render_to_response from studyplanner.courselist.models import Course from studyplanner.courselist.models import Faculty from studyplanner.courselist.models import Department def list_courses(request, faculty, department): department = Department...
c6c189ffe13f88d7310291c785ffe363f6c04423
trayapp.py
trayapp.py
# Github Tray App import rumps import config import contribs class GithubTrayApp(rumps.App): def __init__(self): super(GithubTrayApp, self).__init__('Github') self.count = rumps.MenuItem('commits') self.username = config.get_username() self.menu = [ self.count, ...
# Github Tray App import rumps import config import contribs class GithubTrayApp(rumps.App): def __init__(self): super(GithubTrayApp, self).__init__('Github') self.count = rumps.MenuItem('commits') self.username = config.get_username() self.menu = [ self.count, ...
Update in the update function
Update in the update function
Python
mit
chrisfosterelli/commitwatch
# Github Tray App import rumps import config import contribs class GithubTrayApp(rumps.App): def __init__(self): super(GithubTrayApp, self).__init__('Github') self.count = rumps.MenuItem('commits') self.username = config.get_username() self.menu = [ self.count, ...
# Github Tray App import rumps import config import contribs class GithubTrayApp(rumps.App): def __init__(self): super(GithubTrayApp, self).__init__('Github') self.count = rumps.MenuItem('commits') self.username = config.get_username() self.menu = [ self.count, ...
<commit_before> # Github Tray App import rumps import config import contribs class GithubTrayApp(rumps.App): def __init__(self): super(GithubTrayApp, self).__init__('Github') self.count = rumps.MenuItem('commits') self.username = config.get_username() self.menu = [ se...
# Github Tray App import rumps import config import contribs class GithubTrayApp(rumps.App): def __init__(self): super(GithubTrayApp, self).__init__('Github') self.count = rumps.MenuItem('commits') self.username = config.get_username() self.menu = [ self.count, ...
# Github Tray App import rumps import config import contribs class GithubTrayApp(rumps.App): def __init__(self): super(GithubTrayApp, self).__init__('Github') self.count = rumps.MenuItem('commits') self.username = config.get_username() self.menu = [ self.count, ...
<commit_before> # Github Tray App import rumps import config import contribs class GithubTrayApp(rumps.App): def __init__(self): super(GithubTrayApp, self).__init__('Github') self.count = rumps.MenuItem('commits') self.username = config.get_username() self.menu = [ se...
63e31d0594f3813a6d49191d94c4ec7ce6b66e3b
metatlas/tests/test_loader.py
metatlas/tests/test_loader.py
from __future__ import print_function import tables from metatlas.mzml_loader import mzml_to_hdf, get_test_data def test_loader(): path = get_test_data() out_file = 'test_loader.h5' mzml_to_hdf(path, out_file_name=out_file) fid = tables.open_file(out_file) table = fid.root.spectra assert t...
from __future__ import print_function import tables from metatlas.mzml_loader import mzml_to_hdf, get_test_data def test_loader(): path = get_test_data() out_file = 'test_loader.h5' mzml_to_hdf(path, out_file_name=out_file) fid = tables.open_file(out_file) table = fid.root.spectra assert t...
Fix the query test now that the hdf file order is fixed
Fix the query test now that the hdf file order is fixed
Python
bsd-3-clause
metabolite-atlas/metatlas,metabolite-atlas/metatlas,metabolite-atlas/metatlas,aitatanit/metatlas,aitatanit/metatlas,biorack/metatlas,aitatanit/metatlas,biorack/metatlas
from __future__ import print_function import tables from metatlas.mzml_loader import mzml_to_hdf, get_test_data def test_loader(): path = get_test_data() out_file = 'test_loader.h5' mzml_to_hdf(path, out_file_name=out_file) fid = tables.open_file(out_file) table = fid.root.spectra assert t...
from __future__ import print_function import tables from metatlas.mzml_loader import mzml_to_hdf, get_test_data def test_loader(): path = get_test_data() out_file = 'test_loader.h5' mzml_to_hdf(path, out_file_name=out_file) fid = tables.open_file(out_file) table = fid.root.spectra assert t...
<commit_before>from __future__ import print_function import tables from metatlas.mzml_loader import mzml_to_hdf, get_test_data def test_loader(): path = get_test_data() out_file = 'test_loader.h5' mzml_to_hdf(path, out_file_name=out_file) fid = tables.open_file(out_file) table = fid.root.spectr...
from __future__ import print_function import tables from metatlas.mzml_loader import mzml_to_hdf, get_test_data def test_loader(): path = get_test_data() out_file = 'test_loader.h5' mzml_to_hdf(path, out_file_name=out_file) fid = tables.open_file(out_file) table = fid.root.spectra assert t...
from __future__ import print_function import tables from metatlas.mzml_loader import mzml_to_hdf, get_test_data def test_loader(): path = get_test_data() out_file = 'test_loader.h5' mzml_to_hdf(path, out_file_name=out_file) fid = tables.open_file(out_file) table = fid.root.spectra assert t...
<commit_before>from __future__ import print_function import tables from metatlas.mzml_loader import mzml_to_hdf, get_test_data def test_loader(): path = get_test_data() out_file = 'test_loader.h5' mzml_to_hdf(path, out_file_name=out_file) fid = tables.open_file(out_file) table = fid.root.spectr...
89c97e1923ff481d82d7c6474874633a346ded1d
sigmapiweb/apps/UserInfo/admin.py
sigmapiweb/apps/UserInfo/admin.py
""" Admin config for UserInfo app. """ from django.contrib import admin from common.utils import register_model_admins from .models import PledgeClass, UserInfo class UserInfoAdmin(admin.ModelAdmin): """ Class to represent the user info for an Admin """ search_fields = ['user__first_name', 'user__las...
""" Admin config for UserInfo app. """ from django.contrib import admin from common.utils import register_model_admins from .models import PledgeClass, UserInfo class UserInfoAdmin(admin.ModelAdmin): """ Class to represent the user info for an Admin """ search_fields = ['user__first_name', 'user__las...
Fix quality violation in UserInfo
Fix quality violation in UserInfo
Python
mit
sigmapi-gammaiota/sigmapi-web,sigmapi-gammaiota/sigmapi-web,sigmapi-gammaiota/sigmapi-web,sigmapi-gammaiota/sigmapi-web
""" Admin config for UserInfo app. """ from django.contrib import admin from common.utils import register_model_admins from .models import PledgeClass, UserInfo class UserInfoAdmin(admin.ModelAdmin): """ Class to represent the user info for an Admin """ search_fields = ['user__first_name', 'user__las...
""" Admin config for UserInfo app. """ from django.contrib import admin from common.utils import register_model_admins from .models import PledgeClass, UserInfo class UserInfoAdmin(admin.ModelAdmin): """ Class to represent the user info for an Admin """ search_fields = ['user__first_name', 'user__las...
<commit_before>""" Admin config for UserInfo app. """ from django.contrib import admin from common.utils import register_model_admins from .models import PledgeClass, UserInfo class UserInfoAdmin(admin.ModelAdmin): """ Class to represent the user info for an Admin """ search_fields = ['user__first_na...
""" Admin config for UserInfo app. """ from django.contrib import admin from common.utils import register_model_admins from .models import PledgeClass, UserInfo class UserInfoAdmin(admin.ModelAdmin): """ Class to represent the user info for an Admin """ search_fields = ['user__first_name', 'user__las...
""" Admin config for UserInfo app. """ from django.contrib import admin from common.utils import register_model_admins from .models import PledgeClass, UserInfo class UserInfoAdmin(admin.ModelAdmin): """ Class to represent the user info for an Admin """ search_fields = ['user__first_name', 'user__las...
<commit_before>""" Admin config for UserInfo app. """ from django.contrib import admin from common.utils import register_model_admins from .models import PledgeClass, UserInfo class UserInfoAdmin(admin.ModelAdmin): """ Class to represent the user info for an Admin """ search_fields = ['user__first_na...
fc67921095b85fc021482417415d935e8de55525
chatexchange6/_logging26backport.py
chatexchange6/_logging26backport.py
import logging from logging import * class Logger26(logging.getLoggerClass()): def getChild(self, suffix): """ (copied from module "logging" for Python 3.4) Get a logger which is a descendant to this one. This is a convenience method, such that logging.getLogger('abc')....
import logging from logging import * class Logger(logging.Logger): def getChild(self, suffix): """ (copied from module "logging" for Python 3.4) Get a logger which is a descendant to this one. This is a convenience method, such that logging.getLogger('abc').getChild('de...
Implement backport of logging package for 2.6
Implement backport of logging package for 2.6 debugging 3
Python
apache-2.0
Charcoal-SE/ChatExchange,Charcoal-SE/ChatExchange,ByteCommander/ChatExchange6,ByteCommander/ChatExchange6
import logging from logging import * class Logger26(logging.getLoggerClass()): def getChild(self, suffix): """ (copied from module "logging" for Python 3.4) Get a logger which is a descendant to this one. This is a convenience method, such that logging.getLogger('abc')....
import logging from logging import * class Logger(logging.Logger): def getChild(self, suffix): """ (copied from module "logging" for Python 3.4) Get a logger which is a descendant to this one. This is a convenience method, such that logging.getLogger('abc').getChild('de...
<commit_before>import logging from logging import * class Logger26(logging.getLoggerClass()): def getChild(self, suffix): """ (copied from module "logging" for Python 3.4) Get a logger which is a descendant to this one. This is a convenience method, such that logging.ge...
import logging from logging import * class Logger(logging.Logger): def getChild(self, suffix): """ (copied from module "logging" for Python 3.4) Get a logger which is a descendant to this one. This is a convenience method, such that logging.getLogger('abc').getChild('de...
import logging from logging import * class Logger26(logging.getLoggerClass()): def getChild(self, suffix): """ (copied from module "logging" for Python 3.4) Get a logger which is a descendant to this one. This is a convenience method, such that logging.getLogger('abc')....
<commit_before>import logging from logging import * class Logger26(logging.getLoggerClass()): def getChild(self, suffix): """ (copied from module "logging" for Python 3.4) Get a logger which is a descendant to this one. This is a convenience method, such that logging.ge...
19ee49c57fd17f14efffd946019734f1cb4ed18e
pipes/s3/__main__.py
pipes/s3/__main__.py
"""Add application.properties to Application's S3 Bucket directory.""" import logging import argparse from .create_archaius import init_properties LOG = logging.getLogger(__name__) def main(): """Create application.properties for a given application.""" logging.basicConfig() parser = argparse.ArgumentPar...
"""Add application.properties to Application's S3 Bucket directory.""" import logging import argparse from .create_archaius import init_properties LOG = logging.getLogger(__name__) def main(): """Create application.properties for a given application.""" logging.basicConfig() parser = argparse.ArgumentPar...
Add build as a possible environment option
Add build as a possible environment option
Python
apache-2.0
gogoair/foremast,gogoair/foremast
"""Add application.properties to Application's S3 Bucket directory.""" import logging import argparse from .create_archaius import init_properties LOG = logging.getLogger(__name__) def main(): """Create application.properties for a given application.""" logging.basicConfig() parser = argparse.ArgumentPar...
"""Add application.properties to Application's S3 Bucket directory.""" import logging import argparse from .create_archaius import init_properties LOG = logging.getLogger(__name__) def main(): """Create application.properties for a given application.""" logging.basicConfig() parser = argparse.ArgumentPar...
<commit_before>"""Add application.properties to Application's S3 Bucket directory.""" import logging import argparse from .create_archaius import init_properties LOG = logging.getLogger(__name__) def main(): """Create application.properties for a given application.""" logging.basicConfig() parser = argpa...
"""Add application.properties to Application's S3 Bucket directory.""" import logging import argparse from .create_archaius import init_properties LOG = logging.getLogger(__name__) def main(): """Create application.properties for a given application.""" logging.basicConfig() parser = argparse.ArgumentPar...
"""Add application.properties to Application's S3 Bucket directory.""" import logging import argparse from .create_archaius import init_properties LOG = logging.getLogger(__name__) def main(): """Create application.properties for a given application.""" logging.basicConfig() parser = argparse.ArgumentPar...
<commit_before>"""Add application.properties to Application's S3 Bucket directory.""" import logging import argparse from .create_archaius import init_properties LOG = logging.getLogger(__name__) def main(): """Create application.properties for a given application.""" logging.basicConfig() parser = argpa...
c7b7f3709fc958a2c694858c65a379cfcd54f72b
myflaskapp/tests/test_unit.py
myflaskapp/tests/test_unit.py
import unittest import requests class SmokeTest(unittest.TestCase): def test_maths(self): self.assertEquals(6, 2 + 4) def test_home_page_is_about_todo_lists(self): request = requests.get('http://localhost:5000') self.assertTrue( request.content.startswith(bytes('\n\n<!doct...
import unittest import requests class SmokeTest(unittest.TestCase): def test_maths(self): self.assertEquals(6, 2 + 4) def test_home_page_is_about_todo_lists(self): request = requests.get('http://localhost:5000') self.assertTrue( request.content.startswith(b'\n\n<!doctype h...
Use less verbose byte string syntax
Use less verbose byte string syntax
Python
mit
terryjbates/test-driven-development-with-python,terryjbates/test-driven-development-with-python,terryjbates/test-driven-development-with-python,terryjbates/test-driven-development-with-python,terryjbates/test-driven-development-with-python
import unittest import requests class SmokeTest(unittest.TestCase): def test_maths(self): self.assertEquals(6, 2 + 4) def test_home_page_is_about_todo_lists(self): request = requests.get('http://localhost:5000') self.assertTrue( request.content.startswith(bytes('\n\n<!doct...
import unittest import requests class SmokeTest(unittest.TestCase): def test_maths(self): self.assertEquals(6, 2 + 4) def test_home_page_is_about_todo_lists(self): request = requests.get('http://localhost:5000') self.assertTrue( request.content.startswith(b'\n\n<!doctype h...
<commit_before>import unittest import requests class SmokeTest(unittest.TestCase): def test_maths(self): self.assertEquals(6, 2 + 4) def test_home_page_is_about_todo_lists(self): request = requests.get('http://localhost:5000') self.assertTrue( request.content.startswith(by...
import unittest import requests class SmokeTest(unittest.TestCase): def test_maths(self): self.assertEquals(6, 2 + 4) def test_home_page_is_about_todo_lists(self): request = requests.get('http://localhost:5000') self.assertTrue( request.content.startswith(b'\n\n<!doctype h...
import unittest import requests class SmokeTest(unittest.TestCase): def test_maths(self): self.assertEquals(6, 2 + 4) def test_home_page_is_about_todo_lists(self): request = requests.get('http://localhost:5000') self.assertTrue( request.content.startswith(bytes('\n\n<!doct...
<commit_before>import unittest import requests class SmokeTest(unittest.TestCase): def test_maths(self): self.assertEquals(6, 2 + 4) def test_home_page_is_about_todo_lists(self): request = requests.get('http://localhost:5000') self.assertTrue( request.content.startswith(by...
1a2527afdc5cb9c948ac74a9925d90709d6150cc
seleniumbase/fixtures/constants.py
seleniumbase/fixtures/constants.py
""" This class containts some frequently-used constants """ class Environment: QA = "qa" STAGING = "staging" PRODUCTION = "production" MASTER = "master" LOCAL = "local" TEST = "test" class Files: DOWNLOADS_FOLDER = "downloaded_files" ARCHIVED_DOWNLOADS_FOLDER = "archived_files" cla...
""" This class containts some frequently-used constants """ class Environment: QA = "qa" STAGING = "staging" PRODUCTION = "production" MASTER = "master" LOCAL = "local" TEST = "test" class Files: DOWNLOADS_FOLDER = "downloaded_files" ARCHIVED_DOWNLOADS_FOLDER = "archived_files" cla...
Remove "htmlunit" from browser options
Remove "htmlunit" from browser options
Python
mit
mdmintz/SeleniumBase,mdmintz/seleniumspot,seleniumbase/SeleniumBase,seleniumbase/SeleniumBase,seleniumbase/SeleniumBase,seleniumbase/SeleniumBase,mdmintz/seleniumspot,mdmintz/SeleniumBase,mdmintz/SeleniumBase,mdmintz/SeleniumBase
""" This class containts some frequently-used constants """ class Environment: QA = "qa" STAGING = "staging" PRODUCTION = "production" MASTER = "master" LOCAL = "local" TEST = "test" class Files: DOWNLOADS_FOLDER = "downloaded_files" ARCHIVED_DOWNLOADS_FOLDER = "archived_files" cla...
""" This class containts some frequently-used constants """ class Environment: QA = "qa" STAGING = "staging" PRODUCTION = "production" MASTER = "master" LOCAL = "local" TEST = "test" class Files: DOWNLOADS_FOLDER = "downloaded_files" ARCHIVED_DOWNLOADS_FOLDER = "archived_files" cla...
<commit_before>""" This class containts some frequently-used constants """ class Environment: QA = "qa" STAGING = "staging" PRODUCTION = "production" MASTER = "master" LOCAL = "local" TEST = "test" class Files: DOWNLOADS_FOLDER = "downloaded_files" ARCHIVED_DOWNLOADS_FOLDER = "archiv...
""" This class containts some frequently-used constants """ class Environment: QA = "qa" STAGING = "staging" PRODUCTION = "production" MASTER = "master" LOCAL = "local" TEST = "test" class Files: DOWNLOADS_FOLDER = "downloaded_files" ARCHIVED_DOWNLOADS_FOLDER = "archived_files" cla...
""" This class containts some frequently-used constants """ class Environment: QA = "qa" STAGING = "staging" PRODUCTION = "production" MASTER = "master" LOCAL = "local" TEST = "test" class Files: DOWNLOADS_FOLDER = "downloaded_files" ARCHIVED_DOWNLOADS_FOLDER = "archived_files" cla...
<commit_before>""" This class containts some frequently-used constants """ class Environment: QA = "qa" STAGING = "staging" PRODUCTION = "production" MASTER = "master" LOCAL = "local" TEST = "test" class Files: DOWNLOADS_FOLDER = "downloaded_files" ARCHIVED_DOWNLOADS_FOLDER = "archiv...
6ca85774de9532676b784646ecad3ef62b09ed5e
scripts/settings/fieldnames.py
scripts/settings/fieldnames.py
# Hexagons HexID = 'HexID' # ProviderServiceAreas ServiceClass = 'ServiceClass' ProvName = 'ProvName' #Providers Colloquial = 'Colloquial' Code = 'Code' URL = 'URL' #Utilities PROVIDER = 'PROVIDER' WEBLINK = 'WEBLINK' #Roads CARTOCODE = 'CARTOCODE' FULLNAME = 'FULLNAME' #Drive Times ToBreak = 'ToBreak' Name = 'Nam...
# Hexagons HexID = 'HexID' # ProviderServiceAreas ServiceClass = 'ServiceClass' ProvName = 'ProvName' #Providers Colloquial = 'Colloquial' Code = 'Code' URL = 'URL' #Utilities PROVIDER = 'PROVIDER' WEBLINK = 'WEBLINK' #Roads CARTOCODE = 'CARTOCODE' FULLNAME = 'HWYNAME' #Drive Times ToBreak = 'ToBreak' Name = 'Name...
Use HWYNAME for road names in report
Use HWYNAME for road names in report Related to #36
Python
mit
agrc/bb-econ,agrc/bb-econ,agrc/bb-econ
# Hexagons HexID = 'HexID' # ProviderServiceAreas ServiceClass = 'ServiceClass' ProvName = 'ProvName' #Providers Colloquial = 'Colloquial' Code = 'Code' URL = 'URL' #Utilities PROVIDER = 'PROVIDER' WEBLINK = 'WEBLINK' #Roads CARTOCODE = 'CARTOCODE' FULLNAME = 'FULLNAME' #Drive Times ToBreak = 'ToBreak' Name = 'Nam...
# Hexagons HexID = 'HexID' # ProviderServiceAreas ServiceClass = 'ServiceClass' ProvName = 'ProvName' #Providers Colloquial = 'Colloquial' Code = 'Code' URL = 'URL' #Utilities PROVIDER = 'PROVIDER' WEBLINK = 'WEBLINK' #Roads CARTOCODE = 'CARTOCODE' FULLNAME = 'HWYNAME' #Drive Times ToBreak = 'ToBreak' Name = 'Name...
<commit_before># Hexagons HexID = 'HexID' # ProviderServiceAreas ServiceClass = 'ServiceClass' ProvName = 'ProvName' #Providers Colloquial = 'Colloquial' Code = 'Code' URL = 'URL' #Utilities PROVIDER = 'PROVIDER' WEBLINK = 'WEBLINK' #Roads CARTOCODE = 'CARTOCODE' FULLNAME = 'FULLNAME' #Drive Times ToBreak = 'ToBre...
# Hexagons HexID = 'HexID' # ProviderServiceAreas ServiceClass = 'ServiceClass' ProvName = 'ProvName' #Providers Colloquial = 'Colloquial' Code = 'Code' URL = 'URL' #Utilities PROVIDER = 'PROVIDER' WEBLINK = 'WEBLINK' #Roads CARTOCODE = 'CARTOCODE' FULLNAME = 'HWYNAME' #Drive Times ToBreak = 'ToBreak' Name = 'Name...
# Hexagons HexID = 'HexID' # ProviderServiceAreas ServiceClass = 'ServiceClass' ProvName = 'ProvName' #Providers Colloquial = 'Colloquial' Code = 'Code' URL = 'URL' #Utilities PROVIDER = 'PROVIDER' WEBLINK = 'WEBLINK' #Roads CARTOCODE = 'CARTOCODE' FULLNAME = 'FULLNAME' #Drive Times ToBreak = 'ToBreak' Name = 'Nam...
<commit_before># Hexagons HexID = 'HexID' # ProviderServiceAreas ServiceClass = 'ServiceClass' ProvName = 'ProvName' #Providers Colloquial = 'Colloquial' Code = 'Code' URL = 'URL' #Utilities PROVIDER = 'PROVIDER' WEBLINK = 'WEBLINK' #Roads CARTOCODE = 'CARTOCODE' FULLNAME = 'FULLNAME' #Drive Times ToBreak = 'ToBre...
020c13f3b39d495d50704317fe12ee4a4e735bb4
kylin/_injector.py
kylin/_injector.py
from functools import wraps from typing import Callable from ._scope import Scope class Injector(Callable): """ class decorator to inject dependencies into a callable decorated function """ def __init__(self, dependencies: dict, fun: Callable): self.dependencies = dependencies se...
from functools import wraps from typing import Callable from ._scope import Scope class Injector(Callable): """ class decorator to inject dependencies into a callable decorated function """ def __init__(self, dependencies: dict, fun: Callable): self.dependencies = dependencies se...
Fix bug of self injection into injector function
Fix bug of self injection into injector function
Python
mit
WatanukiRasadar/kylin
from functools import wraps from typing import Callable from ._scope import Scope class Injector(Callable): """ class decorator to inject dependencies into a callable decorated function """ def __init__(self, dependencies: dict, fun: Callable): self.dependencies = dependencies se...
from functools import wraps from typing import Callable from ._scope import Scope class Injector(Callable): """ class decorator to inject dependencies into a callable decorated function """ def __init__(self, dependencies: dict, fun: Callable): self.dependencies = dependencies se...
<commit_before>from functools import wraps from typing import Callable from ._scope import Scope class Injector(Callable): """ class decorator to inject dependencies into a callable decorated function """ def __init__(self, dependencies: dict, fun: Callable): self.dependencies = dependen...
from functools import wraps from typing import Callable from ._scope import Scope class Injector(Callable): """ class decorator to inject dependencies into a callable decorated function """ def __init__(self, dependencies: dict, fun: Callable): self.dependencies = dependencies se...
from functools import wraps from typing import Callable from ._scope import Scope class Injector(Callable): """ class decorator to inject dependencies into a callable decorated function """ def __init__(self, dependencies: dict, fun: Callable): self.dependencies = dependencies se...
<commit_before>from functools import wraps from typing import Callable from ._scope import Scope class Injector(Callable): """ class decorator to inject dependencies into a callable decorated function """ def __init__(self, dependencies: dict, fun: Callable): self.dependencies = dependen...
291da4afa9f359dc4cfda6a683afdcead39d557b
simiki/conf_templates/fabfile.py
simiki/conf_templates/fabfile.py
#!/usr/bin/env python # -*- coding: utf-8 -*- from __future__ import absolute_import import os import os.path from fabric.api import env, local, run from fabric.colors import blue import fabric.contrib.project as project # Remote host and username env.hosts = [] env.user = "" env.colorize_errors = True # Local outp...
#!/usr/bin/env python # -*- coding: utf-8 -*- from __future__ import absolute_import import os import os.path from sys import exit from fabric.api import env, local, run from fabric.colors import blue, red import fabric.contrib.project as project # Remote host and username env.hosts = [] env.user = "" env.colorize_e...
Fix serious problem using rsync
Fix serious problem using rsync If env.remote_output not set, use rsync --delete option will empty the whole remote system, this is a very serious problem!
Python
mit
tankywoo/simiki,tankywoo/simiki,9p0le/simiki,9p0le/simiki,9p0le/simiki,zhaochunqi/simiki,tankywoo/simiki,zhaochunqi/simiki,zhaochunqi/simiki
#!/usr/bin/env python # -*- coding: utf-8 -*- from __future__ import absolute_import import os import os.path from fabric.api import env, local, run from fabric.colors import blue import fabric.contrib.project as project # Remote host and username env.hosts = [] env.user = "" env.colorize_errors = True # Local outp...
#!/usr/bin/env python # -*- coding: utf-8 -*- from __future__ import absolute_import import os import os.path from sys import exit from fabric.api import env, local, run from fabric.colors import blue, red import fabric.contrib.project as project # Remote host and username env.hosts = [] env.user = "" env.colorize_e...
<commit_before>#!/usr/bin/env python # -*- coding: utf-8 -*- from __future__ import absolute_import import os import os.path from fabric.api import env, local, run from fabric.colors import blue import fabric.contrib.project as project # Remote host and username env.hosts = [] env.user = "" env.colorize_errors = Tru...
#!/usr/bin/env python # -*- coding: utf-8 -*- from __future__ import absolute_import import os import os.path from sys import exit from fabric.api import env, local, run from fabric.colors import blue, red import fabric.contrib.project as project # Remote host and username env.hosts = [] env.user = "" env.colorize_e...
#!/usr/bin/env python # -*- coding: utf-8 -*- from __future__ import absolute_import import os import os.path from fabric.api import env, local, run from fabric.colors import blue import fabric.contrib.project as project # Remote host and username env.hosts = [] env.user = "" env.colorize_errors = True # Local outp...
<commit_before>#!/usr/bin/env python # -*- coding: utf-8 -*- from __future__ import absolute_import import os import os.path from fabric.api import env, local, run from fabric.colors import blue import fabric.contrib.project as project # Remote host and username env.hosts = [] env.user = "" env.colorize_errors = Tru...
bcabd0e0766e1d8f93c86ac8102e71bec446ef20
ynr/apps/sopn_parsing/management/commands/sopn_tooling_write_baseline.py
ynr/apps/sopn_parsing/management/commands/sopn_tooling_write_baseline.py
import json import os from candidates.models import Ballot from bulk_adding.models import RawPeople from django.core.management.base import BaseCommand class Command(BaseCommand): """This command uses the ballots endpoint to loop over each ballot and store each sopn pdf (uploaded_file) locally""" def ad...
import json import os from django.db.models import Q from candidates.models import Ballot from bulk_adding.models import RawPeople from django.core.management.base import BaseCommand class Command(BaseCommand): """ Creates a JSON file to represent ballots that have an Officialdocument. Only include ball...
Update which objects are used to write baseline file
Update which objects are used to write baseline file
Python
agpl-3.0
DemocracyClub/yournextrepresentative,DemocracyClub/yournextrepresentative,DemocracyClub/yournextrepresentative
import json import os from candidates.models import Ballot from bulk_adding.models import RawPeople from django.core.management.base import BaseCommand class Command(BaseCommand): """This command uses the ballots endpoint to loop over each ballot and store each sopn pdf (uploaded_file) locally""" def ad...
import json import os from django.db.models import Q from candidates.models import Ballot from bulk_adding.models import RawPeople from django.core.management.base import BaseCommand class Command(BaseCommand): """ Creates a JSON file to represent ballots that have an Officialdocument. Only include ball...
<commit_before>import json import os from candidates.models import Ballot from bulk_adding.models import RawPeople from django.core.management.base import BaseCommand class Command(BaseCommand): """This command uses the ballots endpoint to loop over each ballot and store each sopn pdf (uploaded_file) locally...
import json import os from django.db.models import Q from candidates.models import Ballot from bulk_adding.models import RawPeople from django.core.management.base import BaseCommand class Command(BaseCommand): """ Creates a JSON file to represent ballots that have an Officialdocument. Only include ball...
import json import os from candidates.models import Ballot from bulk_adding.models import RawPeople from django.core.management.base import BaseCommand class Command(BaseCommand): """This command uses the ballots endpoint to loop over each ballot and store each sopn pdf (uploaded_file) locally""" def ad...
<commit_before>import json import os from candidates.models import Ballot from bulk_adding.models import RawPeople from django.core.management.base import BaseCommand class Command(BaseCommand): """This command uses the ballots endpoint to loop over each ballot and store each sopn pdf (uploaded_file) locally...
92bbddc2901c5720042fcadbbceaa68642e7cf3d
{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/users/tests/test_tasks.py
{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/users/tests/test_tasks.py
import pytest from celery.result import EagerResult from {{ cookiecutter.project_slug }}.users.tasks import get_users_count from {{ cookiecutter.project_slug }}.users.tests.factories import UserFactory @pytest.mark.django_db def test_user_count(settings): """A basic test to execute the get_users_count Celery tas...
import pytest from celery.result import EagerResult from {{ cookiecutter.project_slug }}.users.tasks import get_users_count from {{ cookiecutter.project_slug }}.users.tests.factories import UserFactory pytestmark = pytest.mark.django_db def test_user_count(settings): """A basic test to execute the get_users_cou...
Change style for pytest marker
Change style for pytest marker Update pytest.mark.django_db to be more consistent with rest of the project
Python
bsd-3-clause
luzfcb/cookiecutter-django,pydanny/cookiecutter-django,trungdong/cookiecutter-django,ryankanno/cookiecutter-django,luzfcb/cookiecutter-django,pydanny/cookiecutter-django,luzfcb/cookiecutter-django,trungdong/cookiecutter-django,luzfcb/cookiecutter-django,ryankanno/cookiecutter-django,trungdong/cookiecutter-django,pydann...
import pytest from celery.result import EagerResult from {{ cookiecutter.project_slug }}.users.tasks import get_users_count from {{ cookiecutter.project_slug }}.users.tests.factories import UserFactory @pytest.mark.django_db def test_user_count(settings): """A basic test to execute the get_users_count Celery tas...
import pytest from celery.result import EagerResult from {{ cookiecutter.project_slug }}.users.tasks import get_users_count from {{ cookiecutter.project_slug }}.users.tests.factories import UserFactory pytestmark = pytest.mark.django_db def test_user_count(settings): """A basic test to execute the get_users_cou...
<commit_before>import pytest from celery.result import EagerResult from {{ cookiecutter.project_slug }}.users.tasks import get_users_count from {{ cookiecutter.project_slug }}.users.tests.factories import UserFactory @pytest.mark.django_db def test_user_count(settings): """A basic test to execute the get_users_c...
import pytest from celery.result import EagerResult from {{ cookiecutter.project_slug }}.users.tasks import get_users_count from {{ cookiecutter.project_slug }}.users.tests.factories import UserFactory pytestmark = pytest.mark.django_db def test_user_count(settings): """A basic test to execute the get_users_cou...
import pytest from celery.result import EagerResult from {{ cookiecutter.project_slug }}.users.tasks import get_users_count from {{ cookiecutter.project_slug }}.users.tests.factories import UserFactory @pytest.mark.django_db def test_user_count(settings): """A basic test to execute the get_users_count Celery tas...
<commit_before>import pytest from celery.result import EagerResult from {{ cookiecutter.project_slug }}.users.tasks import get_users_count from {{ cookiecutter.project_slug }}.users.tests.factories import UserFactory @pytest.mark.django_db def test_user_count(settings): """A basic test to execute the get_users_c...
01551a1985064f319600732197afeb93cb64a377
locust/__init__.py
locust/__init__.py
from .user.sequential_taskset import SequentialTaskSet from .user.task import task, TaskSet from .user.users import HttpUser, User from .user.wait_time import between, constant, constant_pacing from .event import Events events = Events() __version__ = "1.0b1"
from .user.sequential_taskset import SequentialTaskSet from .user import wait_time from .user.task import task, TaskSet from .user.users import HttpUser, User from .user.wait_time import between, constant, constant_pacing from .event import Events events = Events() __version__ = "1.0b1"
Add wait_time to locust python package namespace (to not break `from locust.wait_time import ...` imports)
Add wait_time to locust python package namespace (to not break `from locust.wait_time import ...` imports)
Python
mit
mbeacom/locust,locustio/locust,mbeacom/locust,locustio/locust,locustio/locust,mbeacom/locust,mbeacom/locust,locustio/locust
from .user.sequential_taskset import SequentialTaskSet from .user.task import task, TaskSet from .user.users import HttpUser, User from .user.wait_time import between, constant, constant_pacing from .event import Events events = Events() __version__ = "1.0b1" Add wait_time to locust python package namespace (to not b...
from .user.sequential_taskset import SequentialTaskSet from .user import wait_time from .user.task import task, TaskSet from .user.users import HttpUser, User from .user.wait_time import between, constant, constant_pacing from .event import Events events = Events() __version__ = "1.0b1"
<commit_before>from .user.sequential_taskset import SequentialTaskSet from .user.task import task, TaskSet from .user.users import HttpUser, User from .user.wait_time import between, constant, constant_pacing from .event import Events events = Events() __version__ = "1.0b1" <commit_msg>Add wait_time to locust python ...
from .user.sequential_taskset import SequentialTaskSet from .user import wait_time from .user.task import task, TaskSet from .user.users import HttpUser, User from .user.wait_time import between, constant, constant_pacing from .event import Events events = Events() __version__ = "1.0b1"
from .user.sequential_taskset import SequentialTaskSet from .user.task import task, TaskSet from .user.users import HttpUser, User from .user.wait_time import between, constant, constant_pacing from .event import Events events = Events() __version__ = "1.0b1" Add wait_time to locust python package namespace (to not b...
<commit_before>from .user.sequential_taskset import SequentialTaskSet from .user.task import task, TaskSet from .user.users import HttpUser, User from .user.wait_time import between, constant, constant_pacing from .event import Events events = Events() __version__ = "1.0b1" <commit_msg>Add wait_time to locust python ...
14462f42c8e187411e5875686ce8869bbd9b1fb7
spectator/core/imagegenerators.py
spectator/core/imagegenerators.py
from imagekit import ImageSpec, register from imagekit.processors import ResizeToFit from spectator.core import app_settings class Thumbnail(ImageSpec): "Base class" format = "JPEG" options = {"quality": 60} class ListThumbnail(Thumbnail): "For displaying in lists of Publications, Events, etc." ...
from imagekit import ImageSpec, register from imagekit.processors import ResizeToFit from spectator.core import app_settings class Thumbnail(ImageSpec): "Base class" format = "JPEG" options = {"quality": 80} class ListThumbnail(Thumbnail): "For displaying in lists of Publications, Events, etc." ...
Increase thumbnail quality to 80 from 60
Increase thumbnail quality to 80 from 60 Some of them were looking pretty compressed.
Python
mit
philgyford/django-spectator,philgyford/django-spectator,philgyford/django-spectator
from imagekit import ImageSpec, register from imagekit.processors import ResizeToFit from spectator.core import app_settings class Thumbnail(ImageSpec): "Base class" format = "JPEG" options = {"quality": 60} class ListThumbnail(Thumbnail): "For displaying in lists of Publications, Events, etc." ...
from imagekit import ImageSpec, register from imagekit.processors import ResizeToFit from spectator.core import app_settings class Thumbnail(ImageSpec): "Base class" format = "JPEG" options = {"quality": 80} class ListThumbnail(Thumbnail): "For displaying in lists of Publications, Events, etc." ...
<commit_before>from imagekit import ImageSpec, register from imagekit.processors import ResizeToFit from spectator.core import app_settings class Thumbnail(ImageSpec): "Base class" format = "JPEG" options = {"quality": 60} class ListThumbnail(Thumbnail): "For displaying in lists of Publications, Ev...
from imagekit import ImageSpec, register from imagekit.processors import ResizeToFit from spectator.core import app_settings class Thumbnail(ImageSpec): "Base class" format = "JPEG" options = {"quality": 80} class ListThumbnail(Thumbnail): "For displaying in lists of Publications, Events, etc." ...
from imagekit import ImageSpec, register from imagekit.processors import ResizeToFit from spectator.core import app_settings class Thumbnail(ImageSpec): "Base class" format = "JPEG" options = {"quality": 60} class ListThumbnail(Thumbnail): "For displaying in lists of Publications, Events, etc." ...
<commit_before>from imagekit import ImageSpec, register from imagekit.processors import ResizeToFit from spectator.core import app_settings class Thumbnail(ImageSpec): "Base class" format = "JPEG" options = {"quality": 60} class ListThumbnail(Thumbnail): "For displaying in lists of Publications, Ev...
48be00323c57b6a61455d2591970e1380da8055c
libcloud/dns/providers.py
libcloud/dns/providers.py
# Licensed to the Apache Software Foundation (ASF) under one or more # contributor license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright ownership. # The ASF licenses this file to You under the Apache License, Version 2.0 # (the "License"); you may not use ...
# Licensed to the Apache Software Foundation (ASF) under one or more # contributor license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright ownership. # The ASF licenses this file to You under the Apache License, Version 2.0 # (the "License"); you may not use ...
Remove route54 provider because the driver is not finished yet.
Remove route54 provider because the driver is not finished yet. git-svn-id: 9ad005ce451fa0ce30ad6352b03eb45b36893355@1340889 13f79535-47bb-0310-9956-ffa450edef68
Python
apache-2.0
sergiorua/libcloud,Cloud-Elasticity-Services/as-libcloud,Cloud-Elasticity-Services/as-libcloud,mbrukman/libcloud,iPlantCollaborativeOpenSource/libcloud,sfriesel/libcloud,ByteInternet/libcloud,curoverse/libcloud,cryptickp/libcloud,schaubl/libcloud,t-tran/libcloud,carletes/libcloud,MrBasset/libcloud,ninefold/libcloud,jim...
# Licensed to the Apache Software Foundation (ASF) under one or more # contributor license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright ownership. # The ASF licenses this file to You under the Apache License, Version 2.0 # (the "License"); you may not use ...
# Licensed to the Apache Software Foundation (ASF) under one or more # contributor license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright ownership. # The ASF licenses this file to You under the Apache License, Version 2.0 # (the "License"); you may not use ...
<commit_before># Licensed to the Apache Software Foundation (ASF) under one or more # contributor license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright ownership. # The ASF licenses this file to You under the Apache License, Version 2.0 # (the "License"); y...
# Licensed to the Apache Software Foundation (ASF) under one or more # contributor license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright ownership. # The ASF licenses this file to You under the Apache License, Version 2.0 # (the "License"); you may not use ...
# Licensed to the Apache Software Foundation (ASF) under one or more # contributor license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright ownership. # The ASF licenses this file to You under the Apache License, Version 2.0 # (the "License"); you may not use ...
<commit_before># Licensed to the Apache Software Foundation (ASF) under one or more # contributor license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright ownership. # The ASF licenses this file to You under the Apache License, Version 2.0 # (the "License"); y...
bd8fdf1dccc3660be3b8e020a637f94d21dc2b3a
gaphas/tests/test_state.py
gaphas/tests/test_state.py
from builtins import object import unittest from gaphas.state import reversible_pair, observed, _reverse class SList(object): def __init__(self): self.l = list() def add(self, node, before=None): if before: self.l.insert(self.l.index(before), node) else: self.l.append(node) add = o...
from builtins import object import unittest from gaphas.state import reversible_pair, observed, _reverse class SList(object): def __init__(self): self.l = list() def add(self, node, before=None): if before: self.l.insert(self.l.index(before), node) else: self.l.append(node) add = o...
Fix function object has no attribute __func__
Fix function object has no attribute __func__ Signed-off-by: Dan Yeaw <2591e5f46f28d303f9dc027d475a5c60d8dea17a@yeaw.me>
Python
lgpl-2.1
amolenaar/gaphas
from builtins import object import unittest from gaphas.state import reversible_pair, observed, _reverse class SList(object): def __init__(self): self.l = list() def add(self, node, before=None): if before: self.l.insert(self.l.index(before), node) else: self.l.append(node) add = o...
from builtins import object import unittest from gaphas.state import reversible_pair, observed, _reverse class SList(object): def __init__(self): self.l = list() def add(self, node, before=None): if before: self.l.insert(self.l.index(before), node) else: self.l.append(node) add = o...
<commit_before>from builtins import object import unittest from gaphas.state import reversible_pair, observed, _reverse class SList(object): def __init__(self): self.l = list() def add(self, node, before=None): if before: self.l.insert(self.l.index(before), node) else: self.l.append(no...
from builtins import object import unittest from gaphas.state import reversible_pair, observed, _reverse class SList(object): def __init__(self): self.l = list() def add(self, node, before=None): if before: self.l.insert(self.l.index(before), node) else: self.l.append(node) add = o...
from builtins import object import unittest from gaphas.state import reversible_pair, observed, _reverse class SList(object): def __init__(self): self.l = list() def add(self, node, before=None): if before: self.l.insert(self.l.index(before), node) else: self.l.append(node) add = o...
<commit_before>from builtins import object import unittest from gaphas.state import reversible_pair, observed, _reverse class SList(object): def __init__(self): self.l = list() def add(self, node, before=None): if before: self.l.insert(self.l.index(before), node) else: self.l.append(no...
7cad00f02c2f86cbeb23755f47f9bf1d45be2f8e
logperfu.py
logperfu.py
import threading import fresenius import readline import time import sys prompt = '> ' port = sys.argv[1] fresbase = fresenius.FreseniusComm(port = port) logfile = open('seringues.log', 'w') def printrx(): while not logfile.closed: origin, msg = fresbase.recvq.get() logfile.write("{};{}\n".forma...
import threading import fresenius import readline import time import sys from decimal import Decimal prompt = '> ' port = sys.argv[1] fresbase = fresenius.FreseniusComm(port = port) logfile = open('seringues.log', 'w') def printrx(): while not logfile.closed: origin, msg = fresbase.recvq.get() l...
Use decimal in the logger to get the most accurate time info
Use decimal in the logger to get the most accurate time info
Python
isc
jaj42/infupy
import threading import fresenius import readline import time import sys prompt = '> ' port = sys.argv[1] fresbase = fresenius.FreseniusComm(port = port) logfile = open('seringues.log', 'w') def printrx(): while not logfile.closed: origin, msg = fresbase.recvq.get() logfile.write("{};{}\n".forma...
import threading import fresenius import readline import time import sys from decimal import Decimal prompt = '> ' port = sys.argv[1] fresbase = fresenius.FreseniusComm(port = port) logfile = open('seringues.log', 'w') def printrx(): while not logfile.closed: origin, msg = fresbase.recvq.get() l...
<commit_before>import threading import fresenius import readline import time import sys prompt = '> ' port = sys.argv[1] fresbase = fresenius.FreseniusComm(port = port) logfile = open('seringues.log', 'w') def printrx(): while not logfile.closed: origin, msg = fresbase.recvq.get() logfile.write(...
import threading import fresenius import readline import time import sys from decimal import Decimal prompt = '> ' port = sys.argv[1] fresbase = fresenius.FreseniusComm(port = port) logfile = open('seringues.log', 'w') def printrx(): while not logfile.closed: origin, msg = fresbase.recvq.get() l...
import threading import fresenius import readline import time import sys prompt = '> ' port = sys.argv[1] fresbase = fresenius.FreseniusComm(port = port) logfile = open('seringues.log', 'w') def printrx(): while not logfile.closed: origin, msg = fresbase.recvq.get() logfile.write("{};{}\n".forma...
<commit_before>import threading import fresenius import readline import time import sys prompt = '> ' port = sys.argv[1] fresbase = fresenius.FreseniusComm(port = port) logfile = open('seringues.log', 'w') def printrx(): while not logfile.closed: origin, msg = fresbase.recvq.get() logfile.write(...
b66fc000a2d1328f557fb2c563f99b4748bf88b1
py101/boilerplate/__init__.py
py101/boilerplate/__init__.py
"""" Boilerplate Adventure Author: Ignacio Avas (iavas@sophilabs.com) """ import codecs import io import sys import unittest from story.adventures import AdventureVerificationError, BaseAdventure from story.translation import gettext as _ class TestOutput(unittest.TestCase): """Variables Adventure test""" de...
"""" Boilerplate Adventure Author: Ignacio Avas (iavas@sophilabs.com) """ import codecs import io import sys import unittest from story.adventures import AdventureVerificationError, BaseAdventure from story.translation import gettext as _ class TestOutput(unittest.TestCase): """Variables Adventure test""" de...
Comment out some boilerplate code, to prevent failures
Comment out some boilerplate code, to prevent failures
Python
mit
sophilabs/py101
"""" Boilerplate Adventure Author: Ignacio Avas (iavas@sophilabs.com) """ import codecs import io import sys import unittest from story.adventures import AdventureVerificationError, BaseAdventure from story.translation import gettext as _ class TestOutput(unittest.TestCase): """Variables Adventure test""" de...
"""" Boilerplate Adventure Author: Ignacio Avas (iavas@sophilabs.com) """ import codecs import io import sys import unittest from story.adventures import AdventureVerificationError, BaseAdventure from story.translation import gettext as _ class TestOutput(unittest.TestCase): """Variables Adventure test""" de...
<commit_before>"""" Boilerplate Adventure Author: Ignacio Avas (iavas@sophilabs.com) """ import codecs import io import sys import unittest from story.adventures import AdventureVerificationError, BaseAdventure from story.translation import gettext as _ class TestOutput(unittest.TestCase): """Variables Adventure...
"""" Boilerplate Adventure Author: Ignacio Avas (iavas@sophilabs.com) """ import codecs import io import sys import unittest from story.adventures import AdventureVerificationError, BaseAdventure from story.translation import gettext as _ class TestOutput(unittest.TestCase): """Variables Adventure test""" de...
"""" Boilerplate Adventure Author: Ignacio Avas (iavas@sophilabs.com) """ import codecs import io import sys import unittest from story.adventures import AdventureVerificationError, BaseAdventure from story.translation import gettext as _ class TestOutput(unittest.TestCase): """Variables Adventure test""" de...
<commit_before>"""" Boilerplate Adventure Author: Ignacio Avas (iavas@sophilabs.com) """ import codecs import io import sys import unittest from story.adventures import AdventureVerificationError, BaseAdventure from story.translation import gettext as _ class TestOutput(unittest.TestCase): """Variables Adventure...
b2ebc5878f7113756970ef52ae8e0db4cc6e5cf2
marbaloo_mako/__init__.py
marbaloo_mako/__init__.py
import cherrypy from mako.lookup import TemplateLookup class Tool(cherrypy.Tool): _lookups = {} def __init__(self): cherrypy.Tool.__init__(self, 'before_handler', self.callable, priority=20) def callable(self, filenam...
import cherrypy from mako.lookup import TemplateLookup class Tool(cherrypy.Tool): _lookups = {} def __init__(self): cherrypy.Tool.__init__(self, 'before_handler', self.callable, priority=40) def callable(self, filenam...
Increase tool priority, to keep space between cherrypy builtin tools like `json_out`.
Increase tool priority, to keep space between cherrypy builtin tools like `json_out`.
Python
mit
marbaloo/marbaloo_mako
import cherrypy from mako.lookup import TemplateLookup class Tool(cherrypy.Tool): _lookups = {} def __init__(self): cherrypy.Tool.__init__(self, 'before_handler', self.callable, priority=20) def callable(self, filenam...
import cherrypy from mako.lookup import TemplateLookup class Tool(cherrypy.Tool): _lookups = {} def __init__(self): cherrypy.Tool.__init__(self, 'before_handler', self.callable, priority=40) def callable(self, filenam...
<commit_before>import cherrypy from mako.lookup import TemplateLookup class Tool(cherrypy.Tool): _lookups = {} def __init__(self): cherrypy.Tool.__init__(self, 'before_handler', self.callable, priority=20) def callable(self, ...
import cherrypy from mako.lookup import TemplateLookup class Tool(cherrypy.Tool): _lookups = {} def __init__(self): cherrypy.Tool.__init__(self, 'before_handler', self.callable, priority=40) def callable(self, filenam...
import cherrypy from mako.lookup import TemplateLookup class Tool(cherrypy.Tool): _lookups = {} def __init__(self): cherrypy.Tool.__init__(self, 'before_handler', self.callable, priority=20) def callable(self, filenam...
<commit_before>import cherrypy from mako.lookup import TemplateLookup class Tool(cherrypy.Tool): _lookups = {} def __init__(self): cherrypy.Tool.__init__(self, 'before_handler', self.callable, priority=20) def callable(self, ...
f3299b3108c8fab7015541e9d9b1ef220a488f87
onitu/escalator/server/__main__.py
onitu/escalator/server/__main__.py
import zmq from .databases import Databases from .worker import Worker context = zmq.Context() back_uri = 'inproc://workers' proxy = zmq.devices.ThreadDevice( device_type=zmq.QUEUE, in_type=zmq.DEALER, out_type=zmq.ROUTER ) proxy.bind_out('tcp://*:4224') proxy.bind_in(back_uri) proxy.start() databases = Databa...
import argparse import zmq from .databases import Databases from .worker import Worker parser = argparse.ArgumentParser("escalator") parser.add_argument( '--bind', default='tcp://*:4224', help="Address to bind escalator server" ) args = parser.parse_args() context = zmq.Context() back_uri = 'inproc://work...
Use command-line argument to bind server address
Use command-line argument to bind server address
Python
mit
onitu/onitu,onitu/onitu,onitu/onitu
import zmq from .databases import Databases from .worker import Worker context = zmq.Context() back_uri = 'inproc://workers' proxy = zmq.devices.ThreadDevice( device_type=zmq.QUEUE, in_type=zmq.DEALER, out_type=zmq.ROUTER ) proxy.bind_out('tcp://*:4224') proxy.bind_in(back_uri) proxy.start() databases = Databa...
import argparse import zmq from .databases import Databases from .worker import Worker parser = argparse.ArgumentParser("escalator") parser.add_argument( '--bind', default='tcp://*:4224', help="Address to bind escalator server" ) args = parser.parse_args() context = zmq.Context() back_uri = 'inproc://work...
<commit_before>import zmq from .databases import Databases from .worker import Worker context = zmq.Context() back_uri = 'inproc://workers' proxy = zmq.devices.ThreadDevice( device_type=zmq.QUEUE, in_type=zmq.DEALER, out_type=zmq.ROUTER ) proxy.bind_out('tcp://*:4224') proxy.bind_in(back_uri) proxy.start() dat...
import argparse import zmq from .databases import Databases from .worker import Worker parser = argparse.ArgumentParser("escalator") parser.add_argument( '--bind', default='tcp://*:4224', help="Address to bind escalator server" ) args = parser.parse_args() context = zmq.Context() back_uri = 'inproc://work...
import zmq from .databases import Databases from .worker import Worker context = zmq.Context() back_uri = 'inproc://workers' proxy = zmq.devices.ThreadDevice( device_type=zmq.QUEUE, in_type=zmq.DEALER, out_type=zmq.ROUTER ) proxy.bind_out('tcp://*:4224') proxy.bind_in(back_uri) proxy.start() databases = Databa...
<commit_before>import zmq from .databases import Databases from .worker import Worker context = zmq.Context() back_uri = 'inproc://workers' proxy = zmq.devices.ThreadDevice( device_type=zmq.QUEUE, in_type=zmq.DEALER, out_type=zmq.ROUTER ) proxy.bind_out('tcp://*:4224') proxy.bind_in(back_uri) proxy.start() dat...