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
a8f3491811bb639ebb59f79c55f461ae063b06b8
api/base/urls.py
api/base/urls.py
from django.conf import settings from django.conf.urls import include, url # from django.contrib import admin from django.conf.urls.static import static from . import views urlpatterns = [ ### API ### url(r'^$', views.root), url(r'^nodes/', include('api.nodes.urls', namespace='nodes')), url(r'^users...
from django.conf import settings from django.conf.urls import include, url, patterns # from django.contrib import admin from django.conf.urls.static import static from . import views urlpatterns = [ ### API ### url(r'^v2/', include(patterns('', url(r'^$', views.root), url(r'^nodes/', include...
Change API url prefix to 'v2'
Change API url prefix to 'v2'
Python
apache-2.0
TomBaxter/osf.io,cwisecarver/osf.io,pattisdr/osf.io,wearpants/osf.io,caseyrygt/osf.io,sbt9uc/osf.io,jmcarp/osf.io,adlius/osf.io,adlius/osf.io,GageGaskins/osf.io,dplorimer/osf,reinaH/osf.io,abought/osf.io,TomHeatwole/osf.io,petermalcolm/osf.io,hmoco/osf.io,pattisdr/osf.io,jeffreyliu3230/osf.io,zachjanicki/osf.io,billyhu...
from django.conf import settings from django.conf.urls import include, url # from django.contrib import admin from django.conf.urls.static import static from . import views urlpatterns = [ ### API ### url(r'^$', views.root), url(r'^nodes/', include('api.nodes.urls', namespace='nodes')), url(r'^users...
from django.conf import settings from django.conf.urls import include, url, patterns # from django.contrib import admin from django.conf.urls.static import static from . import views urlpatterns = [ ### API ### url(r'^v2/', include(patterns('', url(r'^$', views.root), url(r'^nodes/', include...
<commit_before>from django.conf import settings from django.conf.urls import include, url # from django.contrib import admin from django.conf.urls.static import static from . import views urlpatterns = [ ### API ### url(r'^$', views.root), url(r'^nodes/', include('api.nodes.urls', namespace='nodes')), ...
from django.conf import settings from django.conf.urls import include, url, patterns # from django.contrib import admin from django.conf.urls.static import static from . import views urlpatterns = [ ### API ### url(r'^v2/', include(patterns('', url(r'^$', views.root), url(r'^nodes/', include...
from django.conf import settings from django.conf.urls import include, url # from django.contrib import admin from django.conf.urls.static import static from . import views urlpatterns = [ ### API ### url(r'^$', views.root), url(r'^nodes/', include('api.nodes.urls', namespace='nodes')), url(r'^users...
<commit_before>from django.conf import settings from django.conf.urls import include, url # from django.contrib import admin from django.conf.urls.static import static from . import views urlpatterns = [ ### API ### url(r'^$', views.root), url(r'^nodes/', include('api.nodes.urls', namespace='nodes')), ...
fb7754f15a8f0803c5417782e87d6fe153bf6d20
migrations/versions/201503061726_573faf4ac644_added_end_date_to_full_text_index_events.py
migrations/versions/201503061726_573faf4ac644_added_end_date_to_full_text_index_events.py
"""Added end_date to full text index events Revision ID: 573faf4ac644 Revises: 342fa3076650 Create Date: 2015-03-06 17:26:54.718493 """ import sqlalchemy as sa from alembic import op # revision identifiers, used by Alembic. revision = '573faf4ac644' down_revision = '342fa3076650' def upgrade(): op.alter_colum...
"""Added end_date to full text index events Revision ID: 573faf4ac644 Revises: 342fa3076650 Create Date: 2015-03-06 17:26:54.718493 """ import sqlalchemy as sa from alembic import op # revision identifiers, used by Alembic. revision = '573faf4ac644' down_revision = '342fa3076650' def upgrade(): op.alter_colum...
Use index name matching the current naming schema
Use index name matching the current naming schema
Python
mit
OmeGak/indico,mvidalgarcia/indico,pferreir/indico,indico/indico,DirkHoffmann/indico,indico/indico,mic4ael/indico,ThiefMaster/indico,ThiefMaster/indico,mvidalgarcia/indico,mic4ael/indico,DirkHoffmann/indico,ThiefMaster/indico,OmeGak/indico,indico/indico,OmeGak/indico,DirkHoffmann/indico,mvidalgarcia/indico,DirkHoffmann/...
"""Added end_date to full text index events Revision ID: 573faf4ac644 Revises: 342fa3076650 Create Date: 2015-03-06 17:26:54.718493 """ import sqlalchemy as sa from alembic import op # revision identifiers, used by Alembic. revision = '573faf4ac644' down_revision = '342fa3076650' def upgrade(): op.alter_colum...
"""Added end_date to full text index events Revision ID: 573faf4ac644 Revises: 342fa3076650 Create Date: 2015-03-06 17:26:54.718493 """ import sqlalchemy as sa from alembic import op # revision identifiers, used by Alembic. revision = '573faf4ac644' down_revision = '342fa3076650' def upgrade(): op.alter_colum...
<commit_before>"""Added end_date to full text index events Revision ID: 573faf4ac644 Revises: 342fa3076650 Create Date: 2015-03-06 17:26:54.718493 """ import sqlalchemy as sa from alembic import op # revision identifiers, used by Alembic. revision = '573faf4ac644' down_revision = '342fa3076650' def upgrade(): ...
"""Added end_date to full text index events Revision ID: 573faf4ac644 Revises: 342fa3076650 Create Date: 2015-03-06 17:26:54.718493 """ import sqlalchemy as sa from alembic import op # revision identifiers, used by Alembic. revision = '573faf4ac644' down_revision = '342fa3076650' def upgrade(): op.alter_colum...
"""Added end_date to full text index events Revision ID: 573faf4ac644 Revises: 342fa3076650 Create Date: 2015-03-06 17:26:54.718493 """ import sqlalchemy as sa from alembic import op # revision identifiers, used by Alembic. revision = '573faf4ac644' down_revision = '342fa3076650' def upgrade(): op.alter_colum...
<commit_before>"""Added end_date to full text index events Revision ID: 573faf4ac644 Revises: 342fa3076650 Create Date: 2015-03-06 17:26:54.718493 """ import sqlalchemy as sa from alembic import op # revision identifiers, used by Alembic. revision = '573faf4ac644' down_revision = '342fa3076650' def upgrade(): ...
029a159fe3f920d59e0168af72177b343daa4256
phased/__init__.py
phased/__init__.py
from django.conf import settings def generate_secret_delimiter(): try: from hashlib import sha1 except ImportError: from sha import sha as sha1 return sha1(getattr(settings, 'SECRET_KEY', '')).hexdigest() LITERAL_DELIMITER = getattr(settings, 'LITERAL_DELIMITER', generate_secret_delimiter(...
from django.conf import settings from django.utils.hashcompat import sha_constructor def generate_secret_delimiter(): return sha_constructor(getattr(settings, 'SECRET_KEY', '')).hexdigest() LITERAL_DELIMITER = getattr(settings, 'LITERAL_DELIMITER', generate_secret_delimiter())
Make use of Django's hashcompat module.
Make use of Django's hashcompat module.
Python
bsd-3-clause
OmarIthawi/django-phased,mab2k/django-phased,mab2k/django-phased,codysoyland/django-phased,OmarIthawi/django-phased
from django.conf import settings def generate_secret_delimiter(): try: from hashlib import sha1 except ImportError: from sha import sha as sha1 return sha1(getattr(settings, 'SECRET_KEY', '')).hexdigest() LITERAL_DELIMITER = getattr(settings, 'LITERAL_DELIMITER', generate_secret_delimiter(...
from django.conf import settings from django.utils.hashcompat import sha_constructor def generate_secret_delimiter(): return sha_constructor(getattr(settings, 'SECRET_KEY', '')).hexdigest() LITERAL_DELIMITER = getattr(settings, 'LITERAL_DELIMITER', generate_secret_delimiter())
<commit_before>from django.conf import settings def generate_secret_delimiter(): try: from hashlib import sha1 except ImportError: from sha import sha as sha1 return sha1(getattr(settings, 'SECRET_KEY', '')).hexdigest() LITERAL_DELIMITER = getattr(settings, 'LITERAL_DELIMITER', generate_se...
from django.conf import settings from django.utils.hashcompat import sha_constructor def generate_secret_delimiter(): return sha_constructor(getattr(settings, 'SECRET_KEY', '')).hexdigest() LITERAL_DELIMITER = getattr(settings, 'LITERAL_DELIMITER', generate_secret_delimiter())
from django.conf import settings def generate_secret_delimiter(): try: from hashlib import sha1 except ImportError: from sha import sha as sha1 return sha1(getattr(settings, 'SECRET_KEY', '')).hexdigest() LITERAL_DELIMITER = getattr(settings, 'LITERAL_DELIMITER', generate_secret_delimiter(...
<commit_before>from django.conf import settings def generate_secret_delimiter(): try: from hashlib import sha1 except ImportError: from sha import sha as sha1 return sha1(getattr(settings, 'SECRET_KEY', '')).hexdigest() LITERAL_DELIMITER = getattr(settings, 'LITERAL_DELIMITER', generate_se...
c5a7feb3000bb3e234a3b87e8b20262eb9b94dfe
books/models.py
books/models.py
from django.contrib.auth.models import User from django.db import models from django.db.models import fields from django.utils import timezone class Transaction(models.Model): EXPENSE = 'exp' INCOME = 'inc' CATEGORY_CHOICES = ( (EXPENSE, 'expense'), (INCOME, 'income'), ) title = f...
from django.contrib.auth.models import User from django.db import models from django.db.models import fields from django.utils import timezone class Transaction(models.Model): EXPENSE = 'exp' INCOME = 'inc' CATEGORY_CHOICES = ( (EXPENSE, 'expense'), (INCOME, 'income'), ) title = f...
Create new model for debts and loans
Create new model for debts and loans
Python
mit
trimailov/finance,trimailov/finance,trimailov/finance
from django.contrib.auth.models import User from django.db import models from django.db.models import fields from django.utils import timezone class Transaction(models.Model): EXPENSE = 'exp' INCOME = 'inc' CATEGORY_CHOICES = ( (EXPENSE, 'expense'), (INCOME, 'income'), ) title = f...
from django.contrib.auth.models import User from django.db import models from django.db.models import fields from django.utils import timezone class Transaction(models.Model): EXPENSE = 'exp' INCOME = 'inc' CATEGORY_CHOICES = ( (EXPENSE, 'expense'), (INCOME, 'income'), ) title = f...
<commit_before>from django.contrib.auth.models import User from django.db import models from django.db.models import fields from django.utils import timezone class Transaction(models.Model): EXPENSE = 'exp' INCOME = 'inc' CATEGORY_CHOICES = ( (EXPENSE, 'expense'), (INCOME, 'income'), )...
from django.contrib.auth.models import User from django.db import models from django.db.models import fields from django.utils import timezone class Transaction(models.Model): EXPENSE = 'exp' INCOME = 'inc' CATEGORY_CHOICES = ( (EXPENSE, 'expense'), (INCOME, 'income'), ) title = f...
from django.contrib.auth.models import User from django.db import models from django.db.models import fields from django.utils import timezone class Transaction(models.Model): EXPENSE = 'exp' INCOME = 'inc' CATEGORY_CHOICES = ( (EXPENSE, 'expense'), (INCOME, 'income'), ) title = f...
<commit_before>from django.contrib.auth.models import User from django.db import models from django.db.models import fields from django.utils import timezone class Transaction(models.Model): EXPENSE = 'exp' INCOME = 'inc' CATEGORY_CHOICES = ( (EXPENSE, 'expense'), (INCOME, 'income'), )...
39c0dfd7821355c9d2ff2274f4dd6292e959ed87
pronto/__init__.py
pronto/__init__.py
# coding: utf-8 """ **pronto**: a Python frontend to ontologies =========================================== """ from __future__ import absolute_import __all__ = ["Ontology", "Term", "TermList", "Relationship", "Parser"] __version__='0.5.0' __author__='Martin Larralde' __author_email__ = '[email protected]...
# coding: utf-8 """ **pronto**: a Python frontend to ontologies =========================================== """ from __future__ import absolute_import __all__ = ["Ontology", "Term", "TermList", "Relationship"] __version__='0.5.0' __author__='Martin Larralde' __author_email__ = '[email protected]' try: ...
Remove Parser from __all__ (from pronto import *)
Remove Parser from __all__ (from pronto import *)
Python
mit
althonos/pronto
# coding: utf-8 """ **pronto**: a Python frontend to ontologies =========================================== """ from __future__ import absolute_import __all__ = ["Ontology", "Term", "TermList", "Relationship", "Parser"] __version__='0.5.0' __author__='Martin Larralde' __author_email__ = '[email protected]...
# coding: utf-8 """ **pronto**: a Python frontend to ontologies =========================================== """ from __future__ import absolute_import __all__ = ["Ontology", "Term", "TermList", "Relationship"] __version__='0.5.0' __author__='Martin Larralde' __author_email__ = '[email protected]' try: ...
<commit_before># coding: utf-8 """ **pronto**: a Python frontend to ontologies =========================================== """ from __future__ import absolute_import __all__ = ["Ontology", "Term", "TermList", "Relationship", "Parser"] __version__='0.5.0' __author__='Martin Larralde' __author_email__ = 'martin.larral...
# coding: utf-8 """ **pronto**: a Python frontend to ontologies =========================================== """ from __future__ import absolute_import __all__ = ["Ontology", "Term", "TermList", "Relationship"] __version__='0.5.0' __author__='Martin Larralde' __author_email__ = '[email protected]' try: ...
# coding: utf-8 """ **pronto**: a Python frontend to ontologies =========================================== """ from __future__ import absolute_import __all__ = ["Ontology", "Term", "TermList", "Relationship", "Parser"] __version__='0.5.0' __author__='Martin Larralde' __author_email__ = '[email protected]...
<commit_before># coding: utf-8 """ **pronto**: a Python frontend to ontologies =========================================== """ from __future__ import absolute_import __all__ = ["Ontology", "Term", "TermList", "Relationship", "Parser"] __version__='0.5.0' __author__='Martin Larralde' __author_email__ = 'martin.larral...
feefc687473b80adf30079e3ca23384459bb1558
protractor/test.py
protractor/test.py
# -*- coding: utf-8 -*- import os import subprocess class ProtractorTestCaseMixin(object): protractor_conf = 'protractor.conf.js' suite = None specs = None @classmethod def setUpClass(cls): super(ProtractorTestCaseMixin, cls).setUpClass() with open(os.devnull, 'wb') as f: ...
# -*- coding: utf-8 -*- import os import subprocess class ProtractorTestCaseMixin(object): protractor_conf = 'protractor.conf.js' suite = None specs = None @classmethod def setUpClass(cls): super(ProtractorTestCaseMixin, cls).setUpClass() with open(os.devnull, 'wb') as f: ...
Update to pass live server url as param to protractor
Update to pass live server url as param to protractor
Python
mit
penguin359/django-protractor,jpulec/django-protractor
# -*- coding: utf-8 -*- import os import subprocess class ProtractorTestCaseMixin(object): protractor_conf = 'protractor.conf.js' suite = None specs = None @classmethod def setUpClass(cls): super(ProtractorTestCaseMixin, cls).setUpClass() with open(os.devnull, 'wb') as f: ...
# -*- coding: utf-8 -*- import os import subprocess class ProtractorTestCaseMixin(object): protractor_conf = 'protractor.conf.js' suite = None specs = None @classmethod def setUpClass(cls): super(ProtractorTestCaseMixin, cls).setUpClass() with open(os.devnull, 'wb') as f: ...
<commit_before># -*- coding: utf-8 -*- import os import subprocess class ProtractorTestCaseMixin(object): protractor_conf = 'protractor.conf.js' suite = None specs = None @classmethod def setUpClass(cls): super(ProtractorTestCaseMixin, cls).setUpClass() with open(os.devnull, 'wb'...
# -*- coding: utf-8 -*- import os import subprocess class ProtractorTestCaseMixin(object): protractor_conf = 'protractor.conf.js' suite = None specs = None @classmethod def setUpClass(cls): super(ProtractorTestCaseMixin, cls).setUpClass() with open(os.devnull, 'wb') as f: ...
# -*- coding: utf-8 -*- import os import subprocess class ProtractorTestCaseMixin(object): protractor_conf = 'protractor.conf.js' suite = None specs = None @classmethod def setUpClass(cls): super(ProtractorTestCaseMixin, cls).setUpClass() with open(os.devnull, 'wb') as f: ...
<commit_before># -*- coding: utf-8 -*- import os import subprocess class ProtractorTestCaseMixin(object): protractor_conf = 'protractor.conf.js' suite = None specs = None @classmethod def setUpClass(cls): super(ProtractorTestCaseMixin, cls).setUpClass() with open(os.devnull, 'wb'...
e78dd9bf1b9e1d20b8df34ee3328ee08afd45676
contrib/migrateticketmodel.py
contrib/migrateticketmodel.py
#!/usr/bin/env python # # This script completely migrates a <= 0.8.x Trac environment to use the new # default ticket model introduced in Trac 0.9. # # In particular, this means that the severity field is removed (or rather # disabled by removing all possible values), and the priority values are # changed to the more...
#!/usr/bin/env python # # This script completely migrates a <= 0.8.x Trac environment to use the new # default ticket model introduced in Trac 0.9. # # In particular, this means that the severity field is removed (or rather # disabled by removing all possible values), and the priority values are # changed to the more...
Fix missing import in contrib script added in [2630].
Fix missing import in contrib script added in [2630]. git-svn-id: eda3d06fcef731589ace1b284159cead3416df9b@2631 af82e41b-90c4-0310-8c96-b1721e28e2e2
Python
bsd-3-clause
netjunki/trac-Pygit2,walty8/trac,jun66j5/trac-ja,jun66j5/trac-ja,walty8/trac,netjunki/trac-Pygit2,netjunki/trac-Pygit2,walty8/trac,jun66j5/trac-ja,jun66j5/trac-ja,walty8/trac
#!/usr/bin/env python # # This script completely migrates a <= 0.8.x Trac environment to use the new # default ticket model introduced in Trac 0.9. # # In particular, this means that the severity field is removed (or rather # disabled by removing all possible values), and the priority values are # changed to the more...
#!/usr/bin/env python # # This script completely migrates a <= 0.8.x Trac environment to use the new # default ticket model introduced in Trac 0.9. # # In particular, this means that the severity field is removed (or rather # disabled by removing all possible values), and the priority values are # changed to the more...
<commit_before>#!/usr/bin/env python # # This script completely migrates a <= 0.8.x Trac environment to use the new # default ticket model introduced in Trac 0.9. # # In particular, this means that the severity field is removed (or rather # disabled by removing all possible values), and the priority values are # chan...
#!/usr/bin/env python # # This script completely migrates a <= 0.8.x Trac environment to use the new # default ticket model introduced in Trac 0.9. # # In particular, this means that the severity field is removed (or rather # disabled by removing all possible values), and the priority values are # changed to the more...
#!/usr/bin/env python # # This script completely migrates a <= 0.8.x Trac environment to use the new # default ticket model introduced in Trac 0.9. # # In particular, this means that the severity field is removed (or rather # disabled by removing all possible values), and the priority values are # changed to the more...
<commit_before>#!/usr/bin/env python # # This script completely migrates a <= 0.8.x Trac environment to use the new # default ticket model introduced in Trac 0.9. # # In particular, this means that the severity field is removed (or rather # disabled by removing all possible values), and the priority values are # chan...
8974dc36e6ea0ab7b5ce3c78e9827d41cf1abcec
appengine_config.py
appengine_config.py
"""Configuration.""" import logging import os import re from google.appengine.ext.appstats import recording logging.info('Loading %s from %s', __name__, __file__) # Custom webapp middleware to add Appstats. def webapp_add_wsgi_middleware(app): app = recording.appstats_wsgi_middleware(app) return app # Custom A...
"""Configuration.""" import logging import os import re from google.appengine.ext.appstats import recording logging.info('Loading %s from %s', __name__, __file__) # Custom webapp middleware to add Appstats. def webapp_add_wsgi_middleware(app): app = recording.appstats_wsgi_middleware(app) return app # Custom A...
Enable the Appstats Interactive Playground.
Enable the Appstats Interactive Playground.
Python
apache-2.0
Koulio/rietveld,gco/rietveld,andyzsf/rietveld,google-code-export/rietveld,kscharding/integral-solutions-smxq,rietveld-codereview/rietveld,google-code-export/rietveld,v3ss0n/rietveld,ericmckean/rietveld,openlabs/cr.openlabs.co.in,aungzanbaw/rietveld,robfig/rietveld,Koulio/rietveld,arg0/rietveld,sajingeo/rietveld,openlab...
"""Configuration.""" import logging import os import re from google.appengine.ext.appstats import recording logging.info('Loading %s from %s', __name__, __file__) # Custom webapp middleware to add Appstats. def webapp_add_wsgi_middleware(app): app = recording.appstats_wsgi_middleware(app) return app # Custom A...
"""Configuration.""" import logging import os import re from google.appengine.ext.appstats import recording logging.info('Loading %s from %s', __name__, __file__) # Custom webapp middleware to add Appstats. def webapp_add_wsgi_middleware(app): app = recording.appstats_wsgi_middleware(app) return app # Custom A...
<commit_before>"""Configuration.""" import logging import os import re from google.appengine.ext.appstats import recording logging.info('Loading %s from %s', __name__, __file__) # Custom webapp middleware to add Appstats. def webapp_add_wsgi_middleware(app): app = recording.appstats_wsgi_middleware(app) return ...
"""Configuration.""" import logging import os import re from google.appengine.ext.appstats import recording logging.info('Loading %s from %s', __name__, __file__) # Custom webapp middleware to add Appstats. def webapp_add_wsgi_middleware(app): app = recording.appstats_wsgi_middleware(app) return app # Custom A...
"""Configuration.""" import logging import os import re from google.appengine.ext.appstats import recording logging.info('Loading %s from %s', __name__, __file__) # Custom webapp middleware to add Appstats. def webapp_add_wsgi_middleware(app): app = recording.appstats_wsgi_middleware(app) return app # Custom A...
<commit_before>"""Configuration.""" import logging import os import re from google.appengine.ext.appstats import recording logging.info('Loading %s from %s', __name__, __file__) # Custom webapp middleware to add Appstats. def webapp_add_wsgi_middleware(app): app = recording.appstats_wsgi_middleware(app) return ...
176c03e26f46bad73df39c11ea4a190baca6fe54
apps/authentication/tests.py
apps/authentication/tests.py
from django.core.urlresolvers import reverse from django.test import TestCase class HTTPGetRootTestCase(TestCase): def setUp(self): pass def test_get_root_expect_http_200(self): url = reverse('microauth_authentication:index') response = self.client.get(url) self.assertEqual(20...
from django.conf import settings from django.core.urlresolvers import reverse from django.test import TestCase from django.test.utils import override_settings class HTTPGetRootTestCase(TestCase): def setUp(self): pass def test_get_root_expect_http_200(self): pipeline_settings = settings.PIPEL...
Make test not depend on django-pipeline
Make test not depend on django-pipeline
Python
mit
microserv/microauth,microserv/microauth,microserv/microauth
from django.core.urlresolvers import reverse from django.test import TestCase class HTTPGetRootTestCase(TestCase): def setUp(self): pass def test_get_root_expect_http_200(self): url = reverse('microauth_authentication:index') response = self.client.get(url) self.assertEqual(20...
from django.conf import settings from django.core.urlresolvers import reverse from django.test import TestCase from django.test.utils import override_settings class HTTPGetRootTestCase(TestCase): def setUp(self): pass def test_get_root_expect_http_200(self): pipeline_settings = settings.PIPEL...
<commit_before>from django.core.urlresolvers import reverse from django.test import TestCase class HTTPGetRootTestCase(TestCase): def setUp(self): pass def test_get_root_expect_http_200(self): url = reverse('microauth_authentication:index') response = self.client.get(url) self...
from django.conf import settings from django.core.urlresolvers import reverse from django.test import TestCase from django.test.utils import override_settings class HTTPGetRootTestCase(TestCase): def setUp(self): pass def test_get_root_expect_http_200(self): pipeline_settings = settings.PIPEL...
from django.core.urlresolvers import reverse from django.test import TestCase class HTTPGetRootTestCase(TestCase): def setUp(self): pass def test_get_root_expect_http_200(self): url = reverse('microauth_authentication:index') response = self.client.get(url) self.assertEqual(20...
<commit_before>from django.core.urlresolvers import reverse from django.test import TestCase class HTTPGetRootTestCase(TestCase): def setUp(self): pass def test_get_root_expect_http_200(self): url = reverse('microauth_authentication:index') response = self.client.get(url) self...
4ee182b5561fcd333b7368471038e2692c8e2661
anchorhub/settings/default_settings.py
anchorhub/settings/default_settings.py
""" Defaults for all settings used by AnchorHub """ WRAPPER = '{ }' INPUT = '.' OUTPUT = 'out-anchorhub' ARGPARSER = { 'description': "anchorhub parses through Markdown files and precompiles " "links to specially formatted anchors." } ARGPARSE_INPUT = { 'help': "Path of directory tree to b...
""" Defaults for all settings used by AnchorHub """ WRAPPER = '{ }' INPUT = '.' OUTPUT = 'anchorhub-out' ARGPARSER = { 'description': "anchorhub parses through Markdown files and precompiles " "links to specially formatted anchors." } ARGPARSE_INPUT = { 'help': "Path of directory tree to b...
Make default output consistent with old version
Make default output consistent with old version I flipped the hyphen around: should be 'anchorhub-out', accidentally was 'out-anchorhub'
Python
apache-2.0
samjabrahams/anchorhub
""" Defaults for all settings used by AnchorHub """ WRAPPER = '{ }' INPUT = '.' OUTPUT = 'out-anchorhub' ARGPARSER = { 'description': "anchorhub parses through Markdown files and precompiles " "links to specially formatted anchors." } ARGPARSE_INPUT = { 'help': "Path of directory tree to b...
""" Defaults for all settings used by AnchorHub """ WRAPPER = '{ }' INPUT = '.' OUTPUT = 'anchorhub-out' ARGPARSER = { 'description': "anchorhub parses through Markdown files and precompiles " "links to specially formatted anchors." } ARGPARSE_INPUT = { 'help': "Path of directory tree to b...
<commit_before>""" Defaults for all settings used by AnchorHub """ WRAPPER = '{ }' INPUT = '.' OUTPUT = 'out-anchorhub' ARGPARSER = { 'description': "anchorhub parses through Markdown files and precompiles " "links to specially formatted anchors." } ARGPARSE_INPUT = { 'help': "Path of dire...
""" Defaults for all settings used by AnchorHub """ WRAPPER = '{ }' INPUT = '.' OUTPUT = 'anchorhub-out' ARGPARSER = { 'description': "anchorhub parses through Markdown files and precompiles " "links to specially formatted anchors." } ARGPARSE_INPUT = { 'help': "Path of directory tree to b...
""" Defaults for all settings used by AnchorHub """ WRAPPER = '{ }' INPUT = '.' OUTPUT = 'out-anchorhub' ARGPARSER = { 'description': "anchorhub parses through Markdown files and precompiles " "links to specially formatted anchors." } ARGPARSE_INPUT = { 'help': "Path of directory tree to b...
<commit_before>""" Defaults for all settings used by AnchorHub """ WRAPPER = '{ }' INPUT = '.' OUTPUT = 'out-anchorhub' ARGPARSER = { 'description': "anchorhub parses through Markdown files and precompiles " "links to specially formatted anchors." } ARGPARSE_INPUT = { 'help': "Path of dire...
4dfa90cee753f6ef937a7a75aa347ec429fa1720
cms/__init__.py
cms/__init__.py
""" A collection of Django extensions that add content-management facilities to Django projects. Developed by Dave Hall. <http://etianen.com/> """ VERSION = (1, 8, 5)
""" A collection of Django extensions that add content-management facilities to Django projects. Developed by Dave Hall. <http://etianen.com/> """ VERSION = (1, 9)
Update version number to 1.9
Update version number to 1.9
Python
bsd-3-clause
danielsamuels/cms,danielsamuels/cms,jamesfoley/cms,jamesfoley/cms,jamesfoley/cms,dan-gamble/cms,dan-gamble/cms,lewiscollard/cms,lewiscollard/cms,jamesfoley/cms,lewiscollard/cms,dan-gamble/cms,danielsamuels/cms
""" A collection of Django extensions that add content-management facilities to Django projects. Developed by Dave Hall. <http://etianen.com/> """ VERSION = (1, 8, 5) Update version number to 1.9
""" A collection of Django extensions that add content-management facilities to Django projects. Developed by Dave Hall. <http://etianen.com/> """ VERSION = (1, 9)
<commit_before>""" A collection of Django extensions that add content-management facilities to Django projects. Developed by Dave Hall. <http://etianen.com/> """ VERSION = (1, 8, 5) <commit_msg>Update version number to 1.9<commit_after>
""" A collection of Django extensions that add content-management facilities to Django projects. Developed by Dave Hall. <http://etianen.com/> """ VERSION = (1, 9)
""" A collection of Django extensions that add content-management facilities to Django projects. Developed by Dave Hall. <http://etianen.com/> """ VERSION = (1, 8, 5) Update version number to 1.9""" A collection of Django extensions that add content-management facilities to Django projects. Developed by Dave Hall. ...
<commit_before>""" A collection of Django extensions that add content-management facilities to Django projects. Developed by Dave Hall. <http://etianen.com/> """ VERSION = (1, 8, 5) <commit_msg>Update version number to 1.9<commit_after>""" A collection of Django extensions that add content-management facilities to D...
b501ee5dc2a41bf51f9f91c29501792338bf7269
automatron/backend/controller.py
automatron/backend/controller.py
from automatron.backend.plugin import PluginManager from automatron.controller.controller import IAutomatronClientActions from automatron.core.controller import BaseController class BackendController(BaseController): def __init__(self, config_file): BaseController.__init__(self, config_file) self....
from functools import partial from automatron.backend.plugin import PluginManager from automatron.controller.controller import IAutomatronClientActions from automatron.core.controller import BaseController class BackendController(BaseController): def __init__(self, config_file): BaseController.__init__(se...
Use functools.partial for client action proxy.
Use functools.partial for client action proxy.
Python
mit
automatron/automatron
from automatron.backend.plugin import PluginManager from automatron.controller.controller import IAutomatronClientActions from automatron.core.controller import BaseController class BackendController(BaseController): def __init__(self, config_file): BaseController.__init__(self, config_file) self....
from functools import partial from automatron.backend.plugin import PluginManager from automatron.controller.controller import IAutomatronClientActions from automatron.core.controller import BaseController class BackendController(BaseController): def __init__(self, config_file): BaseController.__init__(se...
<commit_before>from automatron.backend.plugin import PluginManager from automatron.controller.controller import IAutomatronClientActions from automatron.core.controller import BaseController class BackendController(BaseController): def __init__(self, config_file): BaseController.__init__(self, config_file...
from functools import partial from automatron.backend.plugin import PluginManager from automatron.controller.controller import IAutomatronClientActions from automatron.core.controller import BaseController class BackendController(BaseController): def __init__(self, config_file): BaseController.__init__(se...
from automatron.backend.plugin import PluginManager from automatron.controller.controller import IAutomatronClientActions from automatron.core.controller import BaseController class BackendController(BaseController): def __init__(self, config_file): BaseController.__init__(self, config_file) self....
<commit_before>from automatron.backend.plugin import PluginManager from automatron.controller.controller import IAutomatronClientActions from automatron.core.controller import BaseController class BackendController(BaseController): def __init__(self, config_file): BaseController.__init__(self, config_file...
7925afd27ead247a017baf7a7dff97986904055f
comics/views.py
comics/views.py
from django.views import generic from gallery.models import GalleryImage from gallery import queries from .models import Arc, Issue class IndexView(generic.ListView): model = Arc template_name = "comics/index.html" context_object_name = "arcs" class IssueView(generic.DetailView): model = Issue ...
from django.views import generic from gallery.models import GalleryImage from gallery import queries from .models import Arc, Issue class IndexView(generic.ListView): model = Arc template_name = "comics/index.html" context_object_name = "arcs" class IssueView(generic.DetailView): model = Issue ...
Make it look nicer, possibly micro seconds faster
Make it look nicer, possibly micro seconds faster
Python
mit
evanepio/dotmanca,evanepio/dotmanca,evanepio/dotmanca
from django.views import generic from gallery.models import GalleryImage from gallery import queries from .models import Arc, Issue class IndexView(generic.ListView): model = Arc template_name = "comics/index.html" context_object_name = "arcs" class IssueView(generic.DetailView): model = Issue ...
from django.views import generic from gallery.models import GalleryImage from gallery import queries from .models import Arc, Issue class IndexView(generic.ListView): model = Arc template_name = "comics/index.html" context_object_name = "arcs" class IssueView(generic.DetailView): model = Issue ...
<commit_before>from django.views import generic from gallery.models import GalleryImage from gallery import queries from .models import Arc, Issue class IndexView(generic.ListView): model = Arc template_name = "comics/index.html" context_object_name = "arcs" class IssueView(generic.DetailView): mod...
from django.views import generic from gallery.models import GalleryImage from gallery import queries from .models import Arc, Issue class IndexView(generic.ListView): model = Arc template_name = "comics/index.html" context_object_name = "arcs" class IssueView(generic.DetailView): model = Issue ...
from django.views import generic from gallery.models import GalleryImage from gallery import queries from .models import Arc, Issue class IndexView(generic.ListView): model = Arc template_name = "comics/index.html" context_object_name = "arcs" class IssueView(generic.DetailView): model = Issue ...
<commit_before>from django.views import generic from gallery.models import GalleryImage from gallery import queries from .models import Arc, Issue class IndexView(generic.ListView): model = Arc template_name = "comics/index.html" context_object_name = "arcs" class IssueView(generic.DetailView): mod...
04416cd9652a9fdc3ab58664ab4b96cbaff3f698
simuvex/s_event.py
simuvex/s_event.py
import itertools event_id_count = itertools.count() class SimEvent(object): #def __init__(self, address=None, stmt_idx=None, message=None, exception=None, traceback=None): def __init__(self, state, event_type, **kwargs): self.id = event_id_count.next() self.type = event_type self.ins_ad...
import itertools event_id_count = itertools.count() class SimEvent(object): #def __init__(self, address=None, stmt_idx=None, message=None, exception=None, traceback=None): def __init__(self, state, event_type, **kwargs): self.id = event_id_count.next() self.type = event_type self.ins_ad...
Set None instead of NoneType to SimEvent.sim_procedure to make pickle happy.
Set None instead of NoneType to SimEvent.sim_procedure to make pickle happy.
Python
bsd-2-clause
axt/angr,schieb/angr,angr/angr,tyb0807/angr,f-prettyland/angr,tyb0807/angr,chubbymaggie/angr,chubbymaggie/angr,f-prettyland/angr,angr/angr,axt/angr,tyb0807/angr,iamahuman/angr,iamahuman/angr,chubbymaggie/angr,angr/simuvex,schieb/angr,iamahuman/angr,axt/angr,angr/angr,f-prettyland/angr,schieb/angr
import itertools event_id_count = itertools.count() class SimEvent(object): #def __init__(self, address=None, stmt_idx=None, message=None, exception=None, traceback=None): def __init__(self, state, event_type, **kwargs): self.id = event_id_count.next() self.type = event_type self.ins_ad...
import itertools event_id_count = itertools.count() class SimEvent(object): #def __init__(self, address=None, stmt_idx=None, message=None, exception=None, traceback=None): def __init__(self, state, event_type, **kwargs): self.id = event_id_count.next() self.type = event_type self.ins_ad...
<commit_before>import itertools event_id_count = itertools.count() class SimEvent(object): #def __init__(self, address=None, stmt_idx=None, message=None, exception=None, traceback=None): def __init__(self, state, event_type, **kwargs): self.id = event_id_count.next() self.type = event_type ...
import itertools event_id_count = itertools.count() class SimEvent(object): #def __init__(self, address=None, stmt_idx=None, message=None, exception=None, traceback=None): def __init__(self, state, event_type, **kwargs): self.id = event_id_count.next() self.type = event_type self.ins_ad...
import itertools event_id_count = itertools.count() class SimEvent(object): #def __init__(self, address=None, stmt_idx=None, message=None, exception=None, traceback=None): def __init__(self, state, event_type, **kwargs): self.id = event_id_count.next() self.type = event_type self.ins_ad...
<commit_before>import itertools event_id_count = itertools.count() class SimEvent(object): #def __init__(self, address=None, stmt_idx=None, message=None, exception=None, traceback=None): def __init__(self, state, event_type, **kwargs): self.id = event_id_count.next() self.type = event_type ...
b1c1b28e58b59eac81954fb55570dfd389b99c0f
tests/acceptance/test_modify.py
tests/acceptance/test_modify.py
import datetime from nose.tools import assert_raises from scalymongo import Document from scalymongo.errors import ModifyFailedError from tests.acceptance.base_acceptance_test import BaseAcceptanceTest class ModifyableDocument(Document): __collection__ = __name__ __database__ = 'test' structure = { ...
import datetime from nose.tools import assert_raises from scalymongo import Document from scalymongo.errors import ModifyFailedError from tests.acceptance.base_acceptance_test import BaseAcceptanceTest class BlogPostModifyExample(Document): __collection__ = __name__ __database__ = 'test' structure = { ...
Add more comprehensive testing of `modify`
acceptance: Add more comprehensive testing of `modify`
Python
bsd-3-clause
allancaffee/scaly-mongo
import datetime from nose.tools import assert_raises from scalymongo import Document from scalymongo.errors import ModifyFailedError from tests.acceptance.base_acceptance_test import BaseAcceptanceTest class ModifyableDocument(Document): __collection__ = __name__ __database__ = 'test' structure = { ...
import datetime from nose.tools import assert_raises from scalymongo import Document from scalymongo.errors import ModifyFailedError from tests.acceptance.base_acceptance_test import BaseAcceptanceTest class BlogPostModifyExample(Document): __collection__ = __name__ __database__ = 'test' structure = { ...
<commit_before>import datetime from nose.tools import assert_raises from scalymongo import Document from scalymongo.errors import ModifyFailedError from tests.acceptance.base_acceptance_test import BaseAcceptanceTest class ModifyableDocument(Document): __collection__ = __name__ __database__ = 'test' st...
import datetime from nose.tools import assert_raises from scalymongo import Document from scalymongo.errors import ModifyFailedError from tests.acceptance.base_acceptance_test import BaseAcceptanceTest class BlogPostModifyExample(Document): __collection__ = __name__ __database__ = 'test' structure = { ...
import datetime from nose.tools import assert_raises from scalymongo import Document from scalymongo.errors import ModifyFailedError from tests.acceptance.base_acceptance_test import BaseAcceptanceTest class ModifyableDocument(Document): __collection__ = __name__ __database__ = 'test' structure = { ...
<commit_before>import datetime from nose.tools import assert_raises from scalymongo import Document from scalymongo.errors import ModifyFailedError from tests.acceptance.base_acceptance_test import BaseAcceptanceTest class ModifyableDocument(Document): __collection__ = __name__ __database__ = 'test' st...
445a150982f2119b340d95edc66940e0ec54afbd
lib/ansiblelint/rules/NoFormattingInWhenRule.py
lib/ansiblelint/rules/NoFormattingInWhenRule.py
from ansiblelint import AnsibleLintRule class NoFormattingInWhenRule(AnsibleLintRule): id = 'CINCH0001' shortdesc = 'No Jinja2 in when' description = '"when" lines should not include Jinja2 variables' tags = ['deprecated'] def _is_valid(self, when): if not isinstance(when, (str, unicode))...
from ansiblelint import AnsibleLintRule try: from types import StringTypes except ImportError: # Python3 removed types.StringTypes StringTypes = str, class NoFormattingInWhenRule(AnsibleLintRule): id = 'CINCH0001' shortdesc = 'No Jinja2 in when' description = '"when" lines should not include J...
Fix Python3 unicode test error
Fix Python3 unicode test error
Python
mit
willthames/ansible-lint,dataxu/ansible-lint,MatrixCrawler/ansible-lint
from ansiblelint import AnsibleLintRule class NoFormattingInWhenRule(AnsibleLintRule): id = 'CINCH0001' shortdesc = 'No Jinja2 in when' description = '"when" lines should not include Jinja2 variables' tags = ['deprecated'] def _is_valid(self, when): if not isinstance(when, (str, unicode))...
from ansiblelint import AnsibleLintRule try: from types import StringTypes except ImportError: # Python3 removed types.StringTypes StringTypes = str, class NoFormattingInWhenRule(AnsibleLintRule): id = 'CINCH0001' shortdesc = 'No Jinja2 in when' description = '"when" lines should not include J...
<commit_before>from ansiblelint import AnsibleLintRule class NoFormattingInWhenRule(AnsibleLintRule): id = 'CINCH0001' shortdesc = 'No Jinja2 in when' description = '"when" lines should not include Jinja2 variables' tags = ['deprecated'] def _is_valid(self, when): if not isinstance(when, ...
from ansiblelint import AnsibleLintRule try: from types import StringTypes except ImportError: # Python3 removed types.StringTypes StringTypes = str, class NoFormattingInWhenRule(AnsibleLintRule): id = 'CINCH0001' shortdesc = 'No Jinja2 in when' description = '"when" lines should not include J...
from ansiblelint import AnsibleLintRule class NoFormattingInWhenRule(AnsibleLintRule): id = 'CINCH0001' shortdesc = 'No Jinja2 in when' description = '"when" lines should not include Jinja2 variables' tags = ['deprecated'] def _is_valid(self, when): if not isinstance(when, (str, unicode))...
<commit_before>from ansiblelint import AnsibleLintRule class NoFormattingInWhenRule(AnsibleLintRule): id = 'CINCH0001' shortdesc = 'No Jinja2 in when' description = '"when" lines should not include Jinja2 variables' tags = ['deprecated'] def _is_valid(self, when): if not isinstance(when, ...
0e48b2130cc53caa9beb9a5f8ce09edbcc40f1b8
ggplotx/tests/test_geom_point.py
ggplotx/tests/test_geom_point.py
from __future__ import absolute_import, division, print_function import pandas as pd from ggplotx import ggplot, aes, geom_point def test_aesthetics(): df = pd.DataFrame({ 'a': range(5), 'b': 2, 'c': 3, 'd': 4, 'e': 5, 'f': 6, '...
from __future__ import absolute_import, division, print_function import pandas as pd from ggplotx import ggplot, aes, geom_point, theme def test_aesthetics(): df = pd.DataFrame({ 'a': range(5), 'b': 2, 'c': 3, 'd': 4, 'e': 5, 'f': 6, ...
Add space on the RHS of geom_point test
Add space on the RHS of geom_point test
Python
mit
has2k1/plotnine,has2k1/plotnine
from __future__ import absolute_import, division, print_function import pandas as pd from ggplotx import ggplot, aes, geom_point def test_aesthetics(): df = pd.DataFrame({ 'a': range(5), 'b': 2, 'c': 3, 'd': 4, 'e': 5, 'f': 6, '...
from __future__ import absolute_import, division, print_function import pandas as pd from ggplotx import ggplot, aes, geom_point, theme def test_aesthetics(): df = pd.DataFrame({ 'a': range(5), 'b': 2, 'c': 3, 'd': 4, 'e': 5, 'f': 6, ...
<commit_before>from __future__ import absolute_import, division, print_function import pandas as pd from ggplotx import ggplot, aes, geom_point def test_aesthetics(): df = pd.DataFrame({ 'a': range(5), 'b': 2, 'c': 3, 'd': 4, 'e': 5, 'f': 6...
from __future__ import absolute_import, division, print_function import pandas as pd from ggplotx import ggplot, aes, geom_point, theme def test_aesthetics(): df = pd.DataFrame({ 'a': range(5), 'b': 2, 'c': 3, 'd': 4, 'e': 5, 'f': 6, ...
from __future__ import absolute_import, division, print_function import pandas as pd from ggplotx import ggplot, aes, geom_point def test_aesthetics(): df = pd.DataFrame({ 'a': range(5), 'b': 2, 'c': 3, 'd': 4, 'e': 5, 'f': 6, '...
<commit_before>from __future__ import absolute_import, division, print_function import pandas as pd from ggplotx import ggplot, aes, geom_point def test_aesthetics(): df = pd.DataFrame({ 'a': range(5), 'b': 2, 'c': 3, 'd': 4, 'e': 5, 'f': 6...
831c3f82abe5cc148f13f631f78b3c960460bbce
gitlabform/configuration/core.py
gitlabform/configuration/core.py
import os import logging import yaml from pathlib import Path class ConfigurationCore: config_from_file = None def __init__(self, config_path=None): try: if not config_path: config_path = os.path.join(Path.home(), '.gitlabform', 'config.yml') elif config_path ...
import os import logging import yaml from pathlib import Path class ConfigurationCore: config_from_file = None def __init__(self, config_path=None): try: if not config_path: config_path = os.path.join(Path.home(), '.gitlabform', 'config.yml') elif config_path ...
Make loading config file safer
Make loading config file safer
Python
mit
egnyte/gitlabform,egnyte/gitlabform
import os import logging import yaml from pathlib import Path class ConfigurationCore: config_from_file = None def __init__(self, config_path=None): try: if not config_path: config_path = os.path.join(Path.home(), '.gitlabform', 'config.yml') elif config_path ...
import os import logging import yaml from pathlib import Path class ConfigurationCore: config_from_file = None def __init__(self, config_path=None): try: if not config_path: config_path = os.path.join(Path.home(), '.gitlabform', 'config.yml') elif config_path ...
<commit_before>import os import logging import yaml from pathlib import Path class ConfigurationCore: config_from_file = None def __init__(self, config_path=None): try: if not config_path: config_path = os.path.join(Path.home(), '.gitlabform', 'config.yml') el...
import os import logging import yaml from pathlib import Path class ConfigurationCore: config_from_file = None def __init__(self, config_path=None): try: if not config_path: config_path = os.path.join(Path.home(), '.gitlabform', 'config.yml') elif config_path ...
import os import logging import yaml from pathlib import Path class ConfigurationCore: config_from_file = None def __init__(self, config_path=None): try: if not config_path: config_path = os.path.join(Path.home(), '.gitlabform', 'config.yml') elif config_path ...
<commit_before>import os import logging import yaml from pathlib import Path class ConfigurationCore: config_from_file = None def __init__(self, config_path=None): try: if not config_path: config_path = os.path.join(Path.home(), '.gitlabform', 'config.yml') el...
9ee39df85da16503d5212a81adac316fcb00a3f6
src/features/hasWord.py
src/features/hasWord.py
from utils import preprocess_tweet def check_existence_of_words(tweet, wordlist): """ Function for the slang or curse words and acronyms features :param tweet: semi process tweet (hashtags mentions removed) :param wordlist:List of words :return: the binary vector of word in the tweet """ tw...
from utils import preprocess_tweet def check_existence_of_words(tweet, wordlist): """ Function for the slang or curse words and acronyms features :param tweet: semi process tweet (hashtags mentions removed) :param wordlist:List of words :return: the binary vector of word in the tweet """ t...
Move preprocess tweet to utils, move loading wordlist to init
Move preprocess tweet to utils, move loading wordlist to init
Python
mit
iamhuy/rumour-veracity-verification
from utils import preprocess_tweet def check_existence_of_words(tweet, wordlist): """ Function for the slang or curse words and acronyms features :param tweet: semi process tweet (hashtags mentions removed) :param wordlist:List of words :return: the binary vector of word in the tweet """ tw...
from utils import preprocess_tweet def check_existence_of_words(tweet, wordlist): """ Function for the slang or curse words and acronyms features :param tweet: semi process tweet (hashtags mentions removed) :param wordlist:List of words :return: the binary vector of word in the tweet """ t...
<commit_before>from utils import preprocess_tweet def check_existence_of_words(tweet, wordlist): """ Function for the slang or curse words and acronyms features :param tweet: semi process tweet (hashtags mentions removed) :param wordlist:List of words :return: the binary vector of word in the tweet...
from utils import preprocess_tweet def check_existence_of_words(tweet, wordlist): """ Function for the slang or curse words and acronyms features :param tweet: semi process tweet (hashtags mentions removed) :param wordlist:List of words :return: the binary vector of word in the tweet """ t...
from utils import preprocess_tweet def check_existence_of_words(tweet, wordlist): """ Function for the slang or curse words and acronyms features :param tweet: semi process tweet (hashtags mentions removed) :param wordlist:List of words :return: the binary vector of word in the tweet """ tw...
<commit_before>from utils import preprocess_tweet def check_existence_of_words(tweet, wordlist): """ Function for the slang or curse words and acronyms features :param tweet: semi process tweet (hashtags mentions removed) :param wordlist:List of words :return: the binary vector of word in the tweet...
614a996dd8227808e796a369ed0faf1f9427f780
organizer/views.py
organizer/views.py
from django.http.response import HttpResponse from .models import Tag def homepage(request): tag_list = Tag.objects.all() html_output = "<html>\n" html_output += "<head>\n" html_output += " <title>" html_output += "Don't Do This!</title>\n" html_output += "</head>\n" html_output += "<bod...
from django.http.response import HttpResponse from django.template import Context, loader from .models import Tag def homepage(request): tag_list = Tag.objects.all() template = loader.get_template( 'organizer/tag_list.html') context = Context({'tag_list': tag_list}) output = template.render(c...
Use template in homepage view.
Ch04: Use template in homepage view.
Python
bsd-2-clause
jambonrose/DjangoUnleashed-1.8,jambonrose/DjangoUnleashed-1.8
from django.http.response import HttpResponse from .models import Tag def homepage(request): tag_list = Tag.objects.all() html_output = "<html>\n" html_output += "<head>\n" html_output += " <title>" html_output += "Don't Do This!</title>\n" html_output += "</head>\n" html_output += "<bod...
from django.http.response import HttpResponse from django.template import Context, loader from .models import Tag def homepage(request): tag_list = Tag.objects.all() template = loader.get_template( 'organizer/tag_list.html') context = Context({'tag_list': tag_list}) output = template.render(c...
<commit_before>from django.http.response import HttpResponse from .models import Tag def homepage(request): tag_list = Tag.objects.all() html_output = "<html>\n" html_output += "<head>\n" html_output += " <title>" html_output += "Don't Do This!</title>\n" html_output += "</head>\n" html_...
from django.http.response import HttpResponse from django.template import Context, loader from .models import Tag def homepage(request): tag_list = Tag.objects.all() template = loader.get_template( 'organizer/tag_list.html') context = Context({'tag_list': tag_list}) output = template.render(c...
from django.http.response import HttpResponse from .models import Tag def homepage(request): tag_list = Tag.objects.all() html_output = "<html>\n" html_output += "<head>\n" html_output += " <title>" html_output += "Don't Do This!</title>\n" html_output += "</head>\n" html_output += "<bod...
<commit_before>from django.http.response import HttpResponse from .models import Tag def homepage(request): tag_list = Tag.objects.all() html_output = "<html>\n" html_output += "<head>\n" html_output += " <title>" html_output += "Don't Do This!</title>\n" html_output += "</head>\n" html_...
7a24f314c426e55735836dd2f805d9e0364dc871
tarbell/hooks.py
tarbell/hooks.py
# -*- coding: utf-8 -*- hooks = { 'newproject': [], # (site) 'generate': [], # (site, dir, extra_context) 'publish': [], # (site, s3) 'install': [], # (site, project) 'preview': [], # (site) 'server_start': [], # (site) 'server_stop': [], ...
# -*- coding: utf-8 -*- hooks = { 'newproject': [], # (site) 'generate': [], # (site, dir, extra_context) 'publish': [], # (site, s3) 'install': [], # (site, project) 'preview': [], # (site) 'server_start': [], # (site) 'server_stop': [], ...
Switch to Python 3-friendly `function.__name__`
Switch to Python 3-friendly `function.__name__`
Python
bsd-3-clause
tarbell-project/tarbell,eyeseast/tarbell,tarbell-project/tarbell,eyeseast/tarbell
# -*- coding: utf-8 -*- hooks = { 'newproject': [], # (site) 'generate': [], # (site, dir, extra_context) 'publish': [], # (site, s3) 'install': [], # (site, project) 'preview': [], # (site) 'server_start': [], # (site) 'server_stop': [], ...
# -*- coding: utf-8 -*- hooks = { 'newproject': [], # (site) 'generate': [], # (site, dir, extra_context) 'publish': [], # (site, s3) 'install': [], # (site, project) 'preview': [], # (site) 'server_start': [], # (site) 'server_stop': [], ...
<commit_before># -*- coding: utf-8 -*- hooks = { 'newproject': [], # (site) 'generate': [], # (site, dir, extra_context) 'publish': [], # (site, s3) 'install': [], # (site, project) 'preview': [], # (site) 'server_start': [], # (site) 'serve...
# -*- coding: utf-8 -*- hooks = { 'newproject': [], # (site) 'generate': [], # (site, dir, extra_context) 'publish': [], # (site, s3) 'install': [], # (site, project) 'preview': [], # (site) 'server_start': [], # (site) 'server_stop': [], ...
# -*- coding: utf-8 -*- hooks = { 'newproject': [], # (site) 'generate': [], # (site, dir, extra_context) 'publish': [], # (site, s3) 'install': [], # (site, project) 'preview': [], # (site) 'server_start': [], # (site) 'server_stop': [], ...
<commit_before># -*- coding: utf-8 -*- hooks = { 'newproject': [], # (site) 'generate': [], # (site, dir, extra_context) 'publish': [], # (site, s3) 'install': [], # (site, project) 'preview': [], # (site) 'server_start': [], # (site) 'serve...
eff279b0824b4bfb569fa82092c7ce9ac6e8c723
test/__init__.py
test/__init__.py
import sys sys.path.append('/home/blake/lazy/build/lib.linux-x86_64-3.4')
import sys sys.path.append('/home/blake/b/build/lib.linux-x86_64-3.4')
Fix manual path hack after relocate
Fix manual path hack after relocate
Python
apache-2.0
blake-sheridan/py,blake-sheridan/py
import sys sys.path.append('/home/blake/lazy/build/lib.linux-x86_64-3.4') Fix manual path hack after relocate
import sys sys.path.append('/home/blake/b/build/lib.linux-x86_64-3.4')
<commit_before>import sys sys.path.append('/home/blake/lazy/build/lib.linux-x86_64-3.4') <commit_msg>Fix manual path hack after relocate<commit_after>
import sys sys.path.append('/home/blake/b/build/lib.linux-x86_64-3.4')
import sys sys.path.append('/home/blake/lazy/build/lib.linux-x86_64-3.4') Fix manual path hack after relocateimport sys sys.path.append('/home/blake/b/build/lib.linux-x86_64-3.4')
<commit_before>import sys sys.path.append('/home/blake/lazy/build/lib.linux-x86_64-3.4') <commit_msg>Fix manual path hack after relocate<commit_after>import sys sys.path.append('/home/blake/b/build/lib.linux-x86_64-3.4')
e08395a35c37fa7f7c0311cc4c7a71537b8b4227
tests/misc/print_exception.py
tests/misc/print_exception.py
try: import uio as io except ImportError: import io import sys if hasattr(sys, 'print_exception'): print_exception = sys.print_exception else: import traceback print_exception = lambda e, f: traceback.print_exception(None, e, sys.exc_info()[2], file=f) def print_exc(e): buf = io.StringIO() ...
try: import uio as io except ImportError: import io import sys if hasattr(sys, 'print_exception'): print_exception = sys.print_exception else: import traceback print_exception = lambda e, f: traceback.print_exception(None, e, sys.exc_info()[2], file=f) def print_exc(e): buf = io.StringIO() ...
Add test for line number printing with large bytecode chunk.
tests/misc: Add test for line number printing with large bytecode chunk.
Python
mit
henriknelson/micropython,AriZuu/micropython,AriZuu/micropython,micropython/micropython-esp32,micropython/micropython-esp32,PappaPeppar/micropython,MrSurly/micropython,MrSurly/micropython-esp32,infinnovation/micropython,trezor/micropython,micropython/micropython-esp32,lowRISC/micropython,torwag/micropython,PappaPeppar/m...
try: import uio as io except ImportError: import io import sys if hasattr(sys, 'print_exception'): print_exception = sys.print_exception else: import traceback print_exception = lambda e, f: traceback.print_exception(None, e, sys.exc_info()[2], file=f) def print_exc(e): buf = io.StringIO() ...
try: import uio as io except ImportError: import io import sys if hasattr(sys, 'print_exception'): print_exception = sys.print_exception else: import traceback print_exception = lambda e, f: traceback.print_exception(None, e, sys.exc_info()[2], file=f) def print_exc(e): buf = io.StringIO() ...
<commit_before>try: import uio as io except ImportError: import io import sys if hasattr(sys, 'print_exception'): print_exception = sys.print_exception else: import traceback print_exception = lambda e, f: traceback.print_exception(None, e, sys.exc_info()[2], file=f) def print_exc(e): buf = io....
try: import uio as io except ImportError: import io import sys if hasattr(sys, 'print_exception'): print_exception = sys.print_exception else: import traceback print_exception = lambda e, f: traceback.print_exception(None, e, sys.exc_info()[2], file=f) def print_exc(e): buf = io.StringIO() ...
try: import uio as io except ImportError: import io import sys if hasattr(sys, 'print_exception'): print_exception = sys.print_exception else: import traceback print_exception = lambda e, f: traceback.print_exception(None, e, sys.exc_info()[2], file=f) def print_exc(e): buf = io.StringIO() ...
<commit_before>try: import uio as io except ImportError: import io import sys if hasattr(sys, 'print_exception'): print_exception = sys.print_exception else: import traceback print_exception = lambda e, f: traceback.print_exception(None, e, sys.exc_info()[2], file=f) def print_exc(e): buf = io....
9d0b1990b979de19939cc37cbefb86e1a0cd4e0f
test/perf/perf.py
test/perf/perf.py
import numpy as np import pylab as pl import sys import timeit from pykalman import KalmanFilter N = int(sys.argv[1]) random_state = np.random.RandomState(0) transition_matrix = [[1, 0.01], [-0.01, 1]] transition_offset = [0.0,0.0] observation_matrix = [1.0,0] observation_offset = [0.0] transition_covariance = 1e-10*n...
import numpy as np import sys import timeit from pykalman import KalmanFilter N = int(sys.argv[1]) random_state = np.random.RandomState(0) transition_matrix = [[1, 0.01], [-0.01, 1]] transition_offset = [0.0,0.0] observation_matrix = [1.0,0] observation_offset = [0.0] transition_covariance = 1e-10*np.eye(2) observatio...
Remove pylab from import statements
Remove pylab from import statements
Python
mit
wkearn/Kalman.jl,wkearn/Kalman.jl
import numpy as np import pylab as pl import sys import timeit from pykalman import KalmanFilter N = int(sys.argv[1]) random_state = np.random.RandomState(0) transition_matrix = [[1, 0.01], [-0.01, 1]] transition_offset = [0.0,0.0] observation_matrix = [1.0,0] observation_offset = [0.0] transition_covariance = 1e-10*n...
import numpy as np import sys import timeit from pykalman import KalmanFilter N = int(sys.argv[1]) random_state = np.random.RandomState(0) transition_matrix = [[1, 0.01], [-0.01, 1]] transition_offset = [0.0,0.0] observation_matrix = [1.0,0] observation_offset = [0.0] transition_covariance = 1e-10*np.eye(2) observatio...
<commit_before>import numpy as np import pylab as pl import sys import timeit from pykalman import KalmanFilter N = int(sys.argv[1]) random_state = np.random.RandomState(0) transition_matrix = [[1, 0.01], [-0.01, 1]] transition_offset = [0.0,0.0] observation_matrix = [1.0,0] observation_offset = [0.0] transition_covar...
import numpy as np import sys import timeit from pykalman import KalmanFilter N = int(sys.argv[1]) random_state = np.random.RandomState(0) transition_matrix = [[1, 0.01], [-0.01, 1]] transition_offset = [0.0,0.0] observation_matrix = [1.0,0] observation_offset = [0.0] transition_covariance = 1e-10*np.eye(2) observatio...
import numpy as np import pylab as pl import sys import timeit from pykalman import KalmanFilter N = int(sys.argv[1]) random_state = np.random.RandomState(0) transition_matrix = [[1, 0.01], [-0.01, 1]] transition_offset = [0.0,0.0] observation_matrix = [1.0,0] observation_offset = [0.0] transition_covariance = 1e-10*n...
<commit_before>import numpy as np import pylab as pl import sys import timeit from pykalman import KalmanFilter N = int(sys.argv[1]) random_state = np.random.RandomState(0) transition_matrix = [[1, 0.01], [-0.01, 1]] transition_offset = [0.0,0.0] observation_matrix = [1.0,0] observation_offset = [0.0] transition_covar...
5f4155201afa92f048f28b9cd53681a6bc7966ab
vendor/eventlet-0.9.15/eventlet/convenience.py
vendor/eventlet-0.9.15/eventlet/convenience.py
# The history of this repository has been rewritten to erase the vendor/ directory # Below is the md5sum and size of the file that was in the original commit bde0e3a3a15c9bbb8d96f4d8a370d8c7 5753
# The history of this repository has been rewritten to erase the vendor/ directory # Below is the md5sum and size of the file that was in the original commit 5b7615cc9b13cf39cfa39db53e86977a 5751
Drop eventlet bundle back to released state. Will workaround the bug we fixed there, in our own code.
Drop eventlet bundle back to released state. Will workaround the bug we fixed there, in our own code.
Python
mit
gratipay/aspen.py,gratipay/aspen.py
# The history of this repository has been rewritten to erase the vendor/ directory # Below is the md5sum and size of the file that was in the original commit bde0e3a3a15c9bbb8d96f4d8a370d8c7 5753 Drop eventlet bundle back to released state. Will workaround the bug we fixed there, in our own code.
# The history of this repository has been rewritten to erase the vendor/ directory # Below is the md5sum and size of the file that was in the original commit 5b7615cc9b13cf39cfa39db53e86977a 5751
<commit_before># The history of this repository has been rewritten to erase the vendor/ directory # Below is the md5sum and size of the file that was in the original commit bde0e3a3a15c9bbb8d96f4d8a370d8c7 5753 <commit_msg>Drop eventlet bundle back to released state. Will workaround the bug we fixed there, in our own c...
# The history of this repository has been rewritten to erase the vendor/ directory # Below is the md5sum and size of the file that was in the original commit 5b7615cc9b13cf39cfa39db53e86977a 5751
# The history of this repository has been rewritten to erase the vendor/ directory # Below is the md5sum and size of the file that was in the original commit bde0e3a3a15c9bbb8d96f4d8a370d8c7 5753 Drop eventlet bundle back to released state. Will workaround the bug we fixed there, in our own code.# The history of this r...
<commit_before># The history of this repository has been rewritten to erase the vendor/ directory # Below is the md5sum and size of the file that was in the original commit bde0e3a3a15c9bbb8d96f4d8a370d8c7 5753 <commit_msg>Drop eventlet bundle back to released state. Will workaround the bug we fixed there, in our own c...
e5b503d0e66f8422412d0cdeac4ba4f55f14e420
spectrum/object.py
spectrum/object.py
# -*- coding: utf-8 -*- class Object: """Represents a generic Spectrum object Supported Operations: +-----------+--------------------------------------+ | Operation | Description | +===========+======================================+ | x == y | Checks if t...
# -*- coding: utf-8 -*- class Object: """Represents a generic Spectrum object Supported Operations: +-----------+--------------------------------------+ | Operation | Description | +===========+======================================+ | x == y | Checks if t...
Change wording from future to present tense
Documentation: Change wording from future to present tense
Python
mit
treefroog/spectrum.py
# -*- coding: utf-8 -*- class Object: """Represents a generic Spectrum object Supported Operations: +-----------+--------------------------------------+ | Operation | Description | +===========+======================================+ | x == y | Checks if t...
# -*- coding: utf-8 -*- class Object: """Represents a generic Spectrum object Supported Operations: +-----------+--------------------------------------+ | Operation | Description | +===========+======================================+ | x == y | Checks if t...
<commit_before># -*- coding: utf-8 -*- class Object: """Represents a generic Spectrum object Supported Operations: +-----------+--------------------------------------+ | Operation | Description | +===========+======================================+ | x == y ...
# -*- coding: utf-8 -*- class Object: """Represents a generic Spectrum object Supported Operations: +-----------+--------------------------------------+ | Operation | Description | +===========+======================================+ | x == y | Checks if t...
# -*- coding: utf-8 -*- class Object: """Represents a generic Spectrum object Supported Operations: +-----------+--------------------------------------+ | Operation | Description | +===========+======================================+ | x == y | Checks if t...
<commit_before># -*- coding: utf-8 -*- class Object: """Represents a generic Spectrum object Supported Operations: +-----------+--------------------------------------+ | Operation | Description | +===========+======================================+ | x == y ...
9578081d1c6ce378687d605ba2350e08eddb6959
scipy/ndimage/segment/setup.py
scipy/ndimage/segment/setup.py
#!/usr/bin/env python def configuration(parent_package='',top_path=None): from numpy.distutils.misc_util import Configuration config = Configuration('segment', parent_package, top_path) config.add_extension('_segmenter', sources=['Segmenter_EXT.c', ...
#!/usr/bin/env python def configuration(parent_package='',top_path=None): from numpy.distutils.misc_util import Configuration config = Configuration('segment', parent_package, top_path) config.add_extension('_segmenter', sources=['Segmenter_EXT.c', ...
Add tests as data_dir to ndimage.segment
Add tests as data_dir to ndimage.segment
Python
bsd-3-clause
jamestwebber/scipy,mdhaber/scipy,ChanderG/scipy,Kamp9/scipy,Stefan-Endres/scipy,rmcgibbo/scipy,gdooper/scipy,mtrbean/scipy,petebachant/scipy,matthewalbani/scipy,fredrikw/scipy,efiring/scipy,apbard/scipy,ales-erjavec/scipy,mikebenfield/scipy,Eric89GXL/scipy,Newman101/scipy,sriki18/scipy,andyfaff/scipy,Stefan-Endres/scip...
#!/usr/bin/env python def configuration(parent_package='',top_path=None): from numpy.distutils.misc_util import Configuration config = Configuration('segment', parent_package, top_path) config.add_extension('_segmenter', sources=['Segmenter_EXT.c', ...
#!/usr/bin/env python def configuration(parent_package='',top_path=None): from numpy.distutils.misc_util import Configuration config = Configuration('segment', parent_package, top_path) config.add_extension('_segmenter', sources=['Segmenter_EXT.c', ...
<commit_before> #!/usr/bin/env python def configuration(parent_package='',top_path=None): from numpy.distutils.misc_util import Configuration config = Configuration('segment', parent_package, top_path) config.add_extension('_segmenter', sources=['Segmenter_EXT.c', ...
#!/usr/bin/env python def configuration(parent_package='',top_path=None): from numpy.distutils.misc_util import Configuration config = Configuration('segment', parent_package, top_path) config.add_extension('_segmenter', sources=['Segmenter_EXT.c', ...
#!/usr/bin/env python def configuration(parent_package='',top_path=None): from numpy.distutils.misc_util import Configuration config = Configuration('segment', parent_package, top_path) config.add_extension('_segmenter', sources=['Segmenter_EXT.c', ...
<commit_before> #!/usr/bin/env python def configuration(parent_package='',top_path=None): from numpy.distutils.misc_util import Configuration config = Configuration('segment', parent_package, top_path) config.add_extension('_segmenter', sources=['Segmenter_EXT.c', ...
c06e28dae894823c0ae5385e0f9c047ceab8561c
zombies/tests.py
zombies/tests.py
from django.test import TestCase # Create your tests here. from django.test import TestCase from models import Story class StoryMethodTests(TestCase): def test_ensure_story_is_inserted(self): story = Story(name="Zombies on Campus",visits=1,description='Zombies desciption',picture='testpic'...
from django.test import TestCase # Create your tests here. from django.test import TestCase from models import Story, StoryPoint class StoryMethodTests(TestCase): def test_ensure_story_is_inserted(self): story = Story(name="Zombies on Campus",visits=1,description='Zombies desciption',pictu...
Test case 2 for table storypoint
Test case 2 for table storypoint
Python
apache-2.0
ITLabProject2016/internet_technology_lab_project,ITLabProject2016/internet_technology_lab_project,ITLabProject2016/internet_technology_lab_project
from django.test import TestCase # Create your tests here. from django.test import TestCase from models import Story class StoryMethodTests(TestCase): def test_ensure_story_is_inserted(self): story = Story(name="Zombies on Campus",visits=1,description='Zombies desciption',picture='testpic'...
from django.test import TestCase # Create your tests here. from django.test import TestCase from models import Story, StoryPoint class StoryMethodTests(TestCase): def test_ensure_story_is_inserted(self): story = Story(name="Zombies on Campus",visits=1,description='Zombies desciption',pictu...
<commit_before>from django.test import TestCase # Create your tests here. from django.test import TestCase from models import Story class StoryMethodTests(TestCase): def test_ensure_story_is_inserted(self): story = Story(name="Zombies on Campus",visits=1,description='Zombies desciption',pi...
from django.test import TestCase # Create your tests here. from django.test import TestCase from models import Story, StoryPoint class StoryMethodTests(TestCase): def test_ensure_story_is_inserted(self): story = Story(name="Zombies on Campus",visits=1,description='Zombies desciption',pictu...
from django.test import TestCase # Create your tests here. from django.test import TestCase from models import Story class StoryMethodTests(TestCase): def test_ensure_story_is_inserted(self): story = Story(name="Zombies on Campus",visits=1,description='Zombies desciption',picture='testpic'...
<commit_before>from django.test import TestCase # Create your tests here. from django.test import TestCase from models import Story class StoryMethodTests(TestCase): def test_ensure_story_is_inserted(self): story = Story(name="Zombies on Campus",visits=1,description='Zombies desciption',pi...
2baed20067fed71987bf7582fa9c9a5e53a63cb5
python/ql/test/experimental/library-tests/frameworks/stdlib/SafeAccessCheck.py
python/ql/test/experimental/library-tests/frameworks/stdlib/SafeAccessCheck.py
s = "taintedString" if s.startswith("tainted"): # $checks=s $branch=true pass
s = "taintedString" if s.startswith("tainted"): # $checks=s $branch=true pass sw = s.startswith # $f-:checks=s $f-:branch=true if sw("safe"): pass
Test false negative from review
Python: Test false negative from review
Python
mit
github/codeql,github/codeql,github/codeql,github/codeql,github/codeql,github/codeql,github/codeql,github/codeql,github/codeql,github/codeql,github/codeql,github/codeql,github/codeql,github/codeql,github/codeql
s = "taintedString" if s.startswith("tainted"): # $checks=s $branch=true pass Python: Test false negative from review
s = "taintedString" if s.startswith("tainted"): # $checks=s $branch=true pass sw = s.startswith # $f-:checks=s $f-:branch=true if sw("safe"): pass
<commit_before>s = "taintedString" if s.startswith("tainted"): # $checks=s $branch=true pass <commit_msg>Python: Test false negative from review<commit_after>
s = "taintedString" if s.startswith("tainted"): # $checks=s $branch=true pass sw = s.startswith # $f-:checks=s $f-:branch=true if sw("safe"): pass
s = "taintedString" if s.startswith("tainted"): # $checks=s $branch=true pass Python: Test false negative from reviews = "taintedString" if s.startswith("tainted"): # $checks=s $branch=true pass sw = s.startswith # $f-:checks=s $f-:branch=true if sw("safe"): pass
<commit_before>s = "taintedString" if s.startswith("tainted"): # $checks=s $branch=true pass <commit_msg>Python: Test false negative from review<commit_after>s = "taintedString" if s.startswith("tainted"): # $checks=s $branch=true pass sw = s.startswith # $f-:checks=s $f-:branch=true if sw("safe"): pa...
46ae5bbeab37f8e2fe14607c01e385d746c2d163
pymt/components.py
pymt/components.py
from __future__ import print_function __all__ = [] import os import sys import warnings import importlib from glob import glob from .framework.bmi_bridge import bmi_factory from .babel import setup_babel_environ def import_csdms_components(): debug = os.environ.get('PYMT_DEBUG', False) setup_babel_environ(...
__all__ = [] import sys from .plugin import load_csdms_plugins for plugin in load_csdms_plugins(): __all__.append(plugin.__name__) setattr(sys.modules[__name__], plugin.__name__, plugin)
Move csdms-plugin loading to plugin module.
Move csdms-plugin loading to plugin module.
Python
mit
csdms/pymt,csdms/coupling,csdms/coupling
from __future__ import print_function __all__ = [] import os import sys import warnings import importlib from glob import glob from .framework.bmi_bridge import bmi_factory from .babel import setup_babel_environ def import_csdms_components(): debug = os.environ.get('PYMT_DEBUG', False) setup_babel_environ(...
__all__ = [] import sys from .plugin import load_csdms_plugins for plugin in load_csdms_plugins(): __all__.append(plugin.__name__) setattr(sys.modules[__name__], plugin.__name__, plugin)
<commit_before>from __future__ import print_function __all__ = [] import os import sys import warnings import importlib from glob import glob from .framework.bmi_bridge import bmi_factory from .babel import setup_babel_environ def import_csdms_components(): debug = os.environ.get('PYMT_DEBUG', False) setup...
__all__ = [] import sys from .plugin import load_csdms_plugins for plugin in load_csdms_plugins(): __all__.append(plugin.__name__) setattr(sys.modules[__name__], plugin.__name__, plugin)
from __future__ import print_function __all__ = [] import os import sys import warnings import importlib from glob import glob from .framework.bmi_bridge import bmi_factory from .babel import setup_babel_environ def import_csdms_components(): debug = os.environ.get('PYMT_DEBUG', False) setup_babel_environ(...
<commit_before>from __future__ import print_function __all__ = [] import os import sys import warnings import importlib from glob import glob from .framework.bmi_bridge import bmi_factory from .babel import setup_babel_environ def import_csdms_components(): debug = os.environ.get('PYMT_DEBUG', False) setup...
1e66aba5a2c82b09a6485842948aad49c654efb4
scripts/load_topics_to_mongodb.py
scripts/load_topics_to_mongodb.py
import os import csv from pymongo import MongoClient print('Parsing topics') topics = {} with open('topics.csv', 'rb') as csvfile: reader = csv.reader(csvfile) for line in reader: if line[0] == 1: continue topics[line[0]] = line[1:] print('Connecting to MongoDB') mongodb_client = M...
import os import sys import csv from pymongo import MongoClient print('Parsing topics') topics = {} with open(sys.argv[1], 'r') as csvfile: reader = csv.reader(csvfile) for line in reader: if line[0] == 1: continue topics[line[0]] = line[1:] print('Connecting to MongoDB') mongodb_c...
Fix script for loading topics into mongodb
Fix script for loading topics into mongodb
Python
mit
xenx/recommendation_system,xenx/recommendation_system
import os import csv from pymongo import MongoClient print('Parsing topics') topics = {} with open('topics.csv', 'rb') as csvfile: reader = csv.reader(csvfile) for line in reader: if line[0] == 1: continue topics[line[0]] = line[1:] print('Connecting to MongoDB') mongodb_client = M...
import os import sys import csv from pymongo import MongoClient print('Parsing topics') topics = {} with open(sys.argv[1], 'r') as csvfile: reader = csv.reader(csvfile) for line in reader: if line[0] == 1: continue topics[line[0]] = line[1:] print('Connecting to MongoDB') mongodb_c...
<commit_before>import os import csv from pymongo import MongoClient print('Parsing topics') topics = {} with open('topics.csv', 'rb') as csvfile: reader = csv.reader(csvfile) for line in reader: if line[0] == 1: continue topics[line[0]] = line[1:] print('Connecting to MongoDB') mon...
import os import sys import csv from pymongo import MongoClient print('Parsing topics') topics = {} with open(sys.argv[1], 'r') as csvfile: reader = csv.reader(csvfile) for line in reader: if line[0] == 1: continue topics[line[0]] = line[1:] print('Connecting to MongoDB') mongodb_c...
import os import csv from pymongo import MongoClient print('Parsing topics') topics = {} with open('topics.csv', 'rb') as csvfile: reader = csv.reader(csvfile) for line in reader: if line[0] == 1: continue topics[line[0]] = line[1:] print('Connecting to MongoDB') mongodb_client = M...
<commit_before>import os import csv from pymongo import MongoClient print('Parsing topics') topics = {} with open('topics.csv', 'rb') as csvfile: reader = csv.reader(csvfile) for line in reader: if line[0] == 1: continue topics[line[0]] = line[1:] print('Connecting to MongoDB') mon...
eefa28f06620d568eda641b08c1caa9cff9a0c96
resourcemanager.py
resourcemanager.py
# Manage resources here import animation sounds = {} images = {} animations = {} loaded_resources = False def load_resources(): """Fills the structure above with the resources for the game. """ if loaded_resources: return loaded_resources = True
# Manage resources here import pygame from pygame.locals import * import animation sounds = {} images = {} animations = {} loaded_resources = False sound_defs = { "aoe" : "aoe.wav", "big hit" : "big_hit.wav", "burstfire" : "burstfire.wav", "explosion" : "explosion.wav", "fireball" : "fireball....
Add sound definitions to resource manager
Add sound definitions to resource manager
Python
mit
vwood/pyweek2013
# Manage resources here import animation sounds = {} images = {} animations = {} loaded_resources = False def load_resources(): """Fills the structure above with the resources for the game. """ if loaded_resources: return loaded_resources = True Add sound definitions to resource manager
# Manage resources here import pygame from pygame.locals import * import animation sounds = {} images = {} animations = {} loaded_resources = False sound_defs = { "aoe" : "aoe.wav", "big hit" : "big_hit.wav", "burstfire" : "burstfire.wav", "explosion" : "explosion.wav", "fireball" : "fireball....
<commit_before># Manage resources here import animation sounds = {} images = {} animations = {} loaded_resources = False def load_resources(): """Fills the structure above with the resources for the game. """ if loaded_resources: return loaded_resources = True <commit_msg>Add sound defi...
# Manage resources here import pygame from pygame.locals import * import animation sounds = {} images = {} animations = {} loaded_resources = False sound_defs = { "aoe" : "aoe.wav", "big hit" : "big_hit.wav", "burstfire" : "burstfire.wav", "explosion" : "explosion.wav", "fireball" : "fireball....
# Manage resources here import animation sounds = {} images = {} animations = {} loaded_resources = False def load_resources(): """Fills the structure above with the resources for the game. """ if loaded_resources: return loaded_resources = True Add sound definitions to resource manager...
<commit_before># Manage resources here import animation sounds = {} images = {} animations = {} loaded_resources = False def load_resources(): """Fills the structure above with the resources for the game. """ if loaded_resources: return loaded_resources = True <commit_msg>Add sound defi...
95bc5231f88b9f24d9f7f7200fe069884138e97a
tests/__init__.py
tests/__init__.py
from test_character import * from test_data import * from test_exceptions import * from test_guild import * from test_raid import * from test_realm import * from test_regions import * from test_utils import *
Add the list of test modules to test quickly.
Add the list of test modules to test quickly. We can now start tests with: python -m unittest tests assuming the BNET_API_KEY is defined.
Python
mit
PuckCh/battlenet
Add the list of test modules to test quickly. We can now start tests with: python -m unittest tests assuming the BNET_API_KEY is defined.
from test_character import * from test_data import * from test_exceptions import * from test_guild import * from test_raid import * from test_realm import * from test_regions import * from test_utils import *
<commit_before><commit_msg>Add the list of test modules to test quickly. We can now start tests with: python -m unittest tests assuming the BNET_API_KEY is defined.<commit_after>
from test_character import * from test_data import * from test_exceptions import * from test_guild import * from test_raid import * from test_realm import * from test_regions import * from test_utils import *
Add the list of test modules to test quickly. We can now start tests with: python -m unittest tests assuming the BNET_API_KEY is defined.from test_character import * from test_data import * from test_exceptions import * from test_guild import * from test_raid import * from test_realm import * from test_regions i...
<commit_before><commit_msg>Add the list of test modules to test quickly. We can now start tests with: python -m unittest tests assuming the BNET_API_KEY is defined.<commit_after>from test_character import * from test_data import * from test_exceptions import * from test_guild import * from test_raid import * fro...
e578c90cc542d3cf825645fa9376796a1e7c31f9
lib/cache.py
lib/cache.py
import functools import logging import redis import config # Default options redis_opts = { 'host': 'localhost', 'port': 6379, 'db': 0, 'password': None } redis_conn = None cache_prefix = None def init(): global redis_conn, cache_prefix cfg = config.load() cache = cfg.cache if not...
import functools import logging import redis import config # Default options redis_opts = { 'host': 'localhost', 'port': 6379, 'db': 0, 'password': None } redis_conn = None cache_prefix = None def init(): global redis_conn, cache_prefix cfg = config.load() cache = cfg.cache if not...
Remove unneeded lru specific helper methods
Remove unneeded lru specific helper methods
Python
apache-2.0
dalvikchen/docker-registry,atyenoria/docker-registry,atyenoria/docker-registry,ewindisch/docker-registry,docker/docker-registry,ken-saka/docker-registry,wakermahmud/docker-registry,Carrotzpc/docker-registry,kireal/docker-registry,ewindisch/docker-registry,yuriyf/docker-registry,whuwxl/docker-registry,Haitianisgood/dock...
import functools import logging import redis import config # Default options redis_opts = { 'host': 'localhost', 'port': 6379, 'db': 0, 'password': None } redis_conn = None cache_prefix = None def init(): global redis_conn, cache_prefix cfg = config.load() cache = cfg.cache if not...
import functools import logging import redis import config # Default options redis_opts = { 'host': 'localhost', 'port': 6379, 'db': 0, 'password': None } redis_conn = None cache_prefix = None def init(): global redis_conn, cache_prefix cfg = config.load() cache = cfg.cache if not...
<commit_before>import functools import logging import redis import config # Default options redis_opts = { 'host': 'localhost', 'port': 6379, 'db': 0, 'password': None } redis_conn = None cache_prefix = None def init(): global redis_conn, cache_prefix cfg = config.load() cache = cfg.c...
import functools import logging import redis import config # Default options redis_opts = { 'host': 'localhost', 'port': 6379, 'db': 0, 'password': None } redis_conn = None cache_prefix = None def init(): global redis_conn, cache_prefix cfg = config.load() cache = cfg.cache if not...
import functools import logging import redis import config # Default options redis_opts = { 'host': 'localhost', 'port': 6379, 'db': 0, 'password': None } redis_conn = None cache_prefix = None def init(): global redis_conn, cache_prefix cfg = config.load() cache = cfg.cache if not...
<commit_before>import functools import logging import redis import config # Default options redis_opts = { 'host': 'localhost', 'port': 6379, 'db': 0, 'password': None } redis_conn = None cache_prefix = None def init(): global redis_conn, cache_prefix cfg = config.load() cache = cfg.c...
52bb18cf1249e3f48764a7ed4e9546439692c5cb
packages/Python/lldbsuite/test/functionalities/data-formatter/synthcapping/fooSynthProvider.py
packages/Python/lldbsuite/test/functionalities/data-formatter/synthcapping/fooSynthProvider.py
import lldb class fooSynthProvider: def __init__(self, valobj, dict): self.valobj = valobj; self.int_type = valobj.GetType().GetBasicType(lldb.eBasicTypeInt) def num_children(self): return 3; def get_child_at_index(self, index): if index == 0: child = self...
import lldb class fooSynthProvider: def __init__(self, valobj, dict): self.valobj = valobj; self.int_type = valobj.GetType().GetBasicType(lldb.eBasicTypeInt) def num_children(self): return 3; def get_child_at_index(self, index): if index == 0: child = self.valobj....
Fix TestSyntheticCapping for Python 3.
Fix TestSyntheticCapping for Python 3. In Python 3, whitespace inconsistences are errors. This synthetic provider had mixed tabs and spaces, as well as inconsistent indentation widths. This led to the file not being imported, and naturally the test failing. No functional change here, just whitespace. git-svn-id: 4...
Python
apache-2.0
llvm-mirror/lldb,apple/swift-lldb,apple/swift-lldb,llvm-mirror/lldb,apple/swift-lldb,llvm-mirror/lldb,apple/swift-lldb,apple/swift-lldb,llvm-mirror/lldb,llvm-mirror/lldb,apple/swift-lldb
import lldb class fooSynthProvider: def __init__(self, valobj, dict): self.valobj = valobj; self.int_type = valobj.GetType().GetBasicType(lldb.eBasicTypeInt) def num_children(self): return 3; def get_child_at_index(self, index): if index == 0: child = self...
import lldb class fooSynthProvider: def __init__(self, valobj, dict): self.valobj = valobj; self.int_type = valobj.GetType().GetBasicType(lldb.eBasicTypeInt) def num_children(self): return 3; def get_child_at_index(self, index): if index == 0: child = self.valobj....
<commit_before>import lldb class fooSynthProvider: def __init__(self, valobj, dict): self.valobj = valobj; self.int_type = valobj.GetType().GetBasicType(lldb.eBasicTypeInt) def num_children(self): return 3; def get_child_at_index(self, index): if index == 0: ...
import lldb class fooSynthProvider: def __init__(self, valobj, dict): self.valobj = valobj; self.int_type = valobj.GetType().GetBasicType(lldb.eBasicTypeInt) def num_children(self): return 3; def get_child_at_index(self, index): if index == 0: child = self.valobj....
import lldb class fooSynthProvider: def __init__(self, valobj, dict): self.valobj = valobj; self.int_type = valobj.GetType().GetBasicType(lldb.eBasicTypeInt) def num_children(self): return 3; def get_child_at_index(self, index): if index == 0: child = self...
<commit_before>import lldb class fooSynthProvider: def __init__(self, valobj, dict): self.valobj = valobj; self.int_type = valobj.GetType().GetBasicType(lldb.eBasicTypeInt) def num_children(self): return 3; def get_child_at_index(self, index): if index == 0: ...
e6fa443412a909bc01e2dd8d9944ff3ddba35089
numpy/_array_api/_constants.py
numpy/_array_api/_constants.py
from .. import e, inf, nan, pi
from ._array_object import ndarray from ._dtypes import float64 import numpy as np e = ndarray._new(np.array(np.e, dtype=float64)) inf = ndarray._new(np.array(np.inf, dtype=float64)) nan = ndarray._new(np.array(np.nan, dtype=float64)) pi = ndarray._new(np.array(np.pi, dtype=float64))
Make the array API constants into dimension 0 arrays
Make the array API constants into dimension 0 arrays The spec does not actually specify whether these should be dimension 0 arrays or Python floats (which they are in NumPy). However, making them dimension 0 arrays is cleaner, and ensures they also have all the methods and attributes that are implemented on the ndarra...
Python
mit
cupy/cupy,cupy/cupy,cupy/cupy,cupy/cupy
from .. import e, inf, nan, pi Make the array API constants into dimension 0 arrays The spec does not actually specify whether these should be dimension 0 arrays or Python floats (which they are in NumPy). However, making them dimension 0 arrays is cleaner, and ensures they also have all the methods and attributes tha...
from ._array_object import ndarray from ._dtypes import float64 import numpy as np e = ndarray._new(np.array(np.e, dtype=float64)) inf = ndarray._new(np.array(np.inf, dtype=float64)) nan = ndarray._new(np.array(np.nan, dtype=float64)) pi = ndarray._new(np.array(np.pi, dtype=float64))
<commit_before>from .. import e, inf, nan, pi <commit_msg>Make the array API constants into dimension 0 arrays The spec does not actually specify whether these should be dimension 0 arrays or Python floats (which they are in NumPy). However, making them dimension 0 arrays is cleaner, and ensures they also have all the...
from ._array_object import ndarray from ._dtypes import float64 import numpy as np e = ndarray._new(np.array(np.e, dtype=float64)) inf = ndarray._new(np.array(np.inf, dtype=float64)) nan = ndarray._new(np.array(np.nan, dtype=float64)) pi = ndarray._new(np.array(np.pi, dtype=float64))
from .. import e, inf, nan, pi Make the array API constants into dimension 0 arrays The spec does not actually specify whether these should be dimension 0 arrays or Python floats (which they are in NumPy). However, making them dimension 0 arrays is cleaner, and ensures they also have all the methods and attributes tha...
<commit_before>from .. import e, inf, nan, pi <commit_msg>Make the array API constants into dimension 0 arrays The spec does not actually specify whether these should be dimension 0 arrays or Python floats (which they are in NumPy). However, making them dimension 0 arrays is cleaner, and ensures they also have all the...
f012d59f163a8b8a693dc894d211f077ae015d11
Instanssi/kompomaatti/tests.py
Instanssi/kompomaatti/tests.py
from django.test import TestCase from Instanssi.kompomaatti.models import Entry VALID_YOUTUBE_URLS = [ # must handle various protocols in the video URL "http://www.youtube.com/v/asdf123456", "https://www.youtube.com/v/asdf123456/", "//www.youtube.com/v/asdf123456", "www.youtube.com/v/asdf123456", ...
from django.test import TestCase from Instanssi.kompomaatti.models import Entry VALID_YOUTUBE_URLS = [ # must handle various protocols and hostnames in the video URL "http://www.youtube.com/v/asdf123456", "https://www.youtube.com/v/asdf123456/", "//www.youtube.com/v/asdf123456", "www.youtube.com/v...
Add more test data; improve feedback on failing case
kompomaatti: Add more test data; improve feedback on failing case
Python
mit
Instanssi/Instanssi.org,Instanssi/Instanssi.org,Instanssi/Instanssi.org,Instanssi/Instanssi.org
from django.test import TestCase from Instanssi.kompomaatti.models import Entry VALID_YOUTUBE_URLS = [ # must handle various protocols in the video URL "http://www.youtube.com/v/asdf123456", "https://www.youtube.com/v/asdf123456/", "//www.youtube.com/v/asdf123456", "www.youtube.com/v/asdf123456", ...
from django.test import TestCase from Instanssi.kompomaatti.models import Entry VALID_YOUTUBE_URLS = [ # must handle various protocols and hostnames in the video URL "http://www.youtube.com/v/asdf123456", "https://www.youtube.com/v/asdf123456/", "//www.youtube.com/v/asdf123456", "www.youtube.com/v...
<commit_before>from django.test import TestCase from Instanssi.kompomaatti.models import Entry VALID_YOUTUBE_URLS = [ # must handle various protocols in the video URL "http://www.youtube.com/v/asdf123456", "https://www.youtube.com/v/asdf123456/", "//www.youtube.com/v/asdf123456", "www.youtube.com/...
from django.test import TestCase from Instanssi.kompomaatti.models import Entry VALID_YOUTUBE_URLS = [ # must handle various protocols and hostnames in the video URL "http://www.youtube.com/v/asdf123456", "https://www.youtube.com/v/asdf123456/", "//www.youtube.com/v/asdf123456", "www.youtube.com/v...
from django.test import TestCase from Instanssi.kompomaatti.models import Entry VALID_YOUTUBE_URLS = [ # must handle various protocols in the video URL "http://www.youtube.com/v/asdf123456", "https://www.youtube.com/v/asdf123456/", "//www.youtube.com/v/asdf123456", "www.youtube.com/v/asdf123456", ...
<commit_before>from django.test import TestCase from Instanssi.kompomaatti.models import Entry VALID_YOUTUBE_URLS = [ # must handle various protocols in the video URL "http://www.youtube.com/v/asdf123456", "https://www.youtube.com/v/asdf123456/", "//www.youtube.com/v/asdf123456", "www.youtube.com/...
ed5efcadb03aed8fa48ebde618317d795387d1f5
smile_base/models/mail_mail.py
smile_base/models/mail_mail.py
# -*- encoding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2011 Smile (<http://www.smile.fr>). All Rights Reserved # # This program is free software: you can redistribute it and/or modify # it under th...
# -*- encoding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2011 Smile (<http://www.smile.fr>). All Rights Reserved # # This program is free software: you can redistribute it and/or modify # it under th...
Improve warning "Email sending not enabled"
[IMP] Improve warning "Email sending not enabled"
Python
agpl-3.0
odoocn/odoo_addons,tiexinliu/odoo_addons,bmya/odoo_addons,odoocn/odoo_addons,odoocn/odoo_addons,tiexinliu/odoo_addons,tiexinliu/odoo_addons,bmya/odoo_addons,bmya/odoo_addons
# -*- encoding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2011 Smile (<http://www.smile.fr>). All Rights Reserved # # This program is free software: you can redistribute it and/or modify # it under th...
# -*- encoding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2011 Smile (<http://www.smile.fr>). All Rights Reserved # # This program is free software: you can redistribute it and/or modify # it under th...
<commit_before># -*- encoding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2011 Smile (<http://www.smile.fr>). All Rights Reserved # # This program is free software: you can redistribute it and/or modify #...
# -*- encoding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2011 Smile (<http://www.smile.fr>). All Rights Reserved # # This program is free software: you can redistribute it and/or modify # it under th...
# -*- encoding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2011 Smile (<http://www.smile.fr>). All Rights Reserved # # This program is free software: you can redistribute it and/or modify # it under th...
<commit_before># -*- encoding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2011 Smile (<http://www.smile.fr>). All Rights Reserved # # This program is free software: you can redistribute it and/or modify #...
e40915461f9c371a56a364e1de27bcea05dc1a37
satori/__init__.py
satori/__init__.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 # distrib...
# 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 # distrib...
Fix flake8 error - relative import
Fix flake8 error - relative import
Python
apache-2.0
mgeisler/satori,mgeisler/satori,lil-cain/satori,rackerlabs/satori,rackerlabs/satori,lil-cain/satori,lil-cain/satori,samstav/satori,samstav/satori,samstav/satori
# 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 # distrib...
# 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 # distrib...
<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, softw...
# 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 # distrib...
# 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 # distrib...
<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, softw...
948c9c6ffb8a34e3acf00b8190bf65504f2bfaf6
app.py
app.py
import falcon from resources.waifu_message_resource import WaifuMessageResource api = falcon.API() api.add_route('/waifu/messages', WaifuMessageResource())
import falcon from resources.user_resource import UserResource, UserAuthResource from resources.waifu_message_resource import WaifuMessageResource from resources.waifu_resource import WaifuResource api = falcon.API() api.add_route('/user', UserResource()) api.add_route('/user/auth', UserAuthResource()) api.add_route(...
Add endpoints for all resources.
Add endpoints for all resources.
Python
cc0-1.0
sketchturnerr/WaifuSim-backend,sketchturnerr/WaifuSim-backend
import falcon from resources.waifu_message_resource import WaifuMessageResource api = falcon.API() api.add_route('/waifu/messages', WaifuMessageResource()) Add endpoints for all resources.
import falcon from resources.user_resource import UserResource, UserAuthResource from resources.waifu_message_resource import WaifuMessageResource from resources.waifu_resource import WaifuResource api = falcon.API() api.add_route('/user', UserResource()) api.add_route('/user/auth', UserAuthResource()) api.add_route(...
<commit_before>import falcon from resources.waifu_message_resource import WaifuMessageResource api = falcon.API() api.add_route('/waifu/messages', WaifuMessageResource()) <commit_msg>Add endpoints for all resources.<commit_after>
import falcon from resources.user_resource import UserResource, UserAuthResource from resources.waifu_message_resource import WaifuMessageResource from resources.waifu_resource import WaifuResource api = falcon.API() api.add_route('/user', UserResource()) api.add_route('/user/auth', UserAuthResource()) api.add_route(...
import falcon from resources.waifu_message_resource import WaifuMessageResource api = falcon.API() api.add_route('/waifu/messages', WaifuMessageResource()) Add endpoints for all resources.import falcon from resources.user_resource import UserResource, UserAuthResource from resources.waifu_message_resource import Waifu...
<commit_before>import falcon from resources.waifu_message_resource import WaifuMessageResource api = falcon.API() api.add_route('/waifu/messages', WaifuMessageResource()) <commit_msg>Add endpoints for all resources.<commit_after>import falcon from resources.user_resource import UserResource, UserAuthResource from reso...
09dbb096a796f87e9b43e463d929796db7f96182
app.py
app.py
from flask import Flask, request import subprocess import uuid import os import re import json app = Flask(__name__) @app.route('/api/v1/', methods=["GET"]) def lint(): id = uuid.uuid4() filename = os.path.join("tmp", "{}.md".format(id)) with open(filename, "w+") as f: f.write(request.values['t...
from flask import Flask, request import subprocess import uuid import os import re import json app = Flask(__name__) @app.route('/v1/', methods=["GET"]) def lint(): id = uuid.uuid4() filename = os.path.join("tmp", "{}.md".format(id)) with open(filename, "w+") as f: f.write(request.values['text'...
Remove redundant 'api' from URL
Remove redundant 'api' from URL
Python
bsd-3-clause
amperser/proselint,amperser/proselint,jstewmon/proselint,amperser/proselint,jstewmon/proselint,amperser/proselint,jstewmon/proselint,amperser/proselint
from flask import Flask, request import subprocess import uuid import os import re import json app = Flask(__name__) @app.route('/api/v1/', methods=["GET"]) def lint(): id = uuid.uuid4() filename = os.path.join("tmp", "{}.md".format(id)) with open(filename, "w+") as f: f.write(request.values['t...
from flask import Flask, request import subprocess import uuid import os import re import json app = Flask(__name__) @app.route('/v1/', methods=["GET"]) def lint(): id = uuid.uuid4() filename = os.path.join("tmp", "{}.md".format(id)) with open(filename, "w+") as f: f.write(request.values['text'...
<commit_before>from flask import Flask, request import subprocess import uuid import os import re import json app = Flask(__name__) @app.route('/api/v1/', methods=["GET"]) def lint(): id = uuid.uuid4() filename = os.path.join("tmp", "{}.md".format(id)) with open(filename, "w+") as f: f.write(re...
from flask import Flask, request import subprocess import uuid import os import re import json app = Flask(__name__) @app.route('/v1/', methods=["GET"]) def lint(): id = uuid.uuid4() filename = os.path.join("tmp", "{}.md".format(id)) with open(filename, "w+") as f: f.write(request.values['text'...
from flask import Flask, request import subprocess import uuid import os import re import json app = Flask(__name__) @app.route('/api/v1/', methods=["GET"]) def lint(): id = uuid.uuid4() filename = os.path.join("tmp", "{}.md".format(id)) with open(filename, "w+") as f: f.write(request.values['t...
<commit_before>from flask import Flask, request import subprocess import uuid import os import re import json app = Flask(__name__) @app.route('/api/v1/', methods=["GET"]) def lint(): id = uuid.uuid4() filename = os.path.join("tmp", "{}.md".format(id)) with open(filename, "w+") as f: f.write(re...
bea8b07180e6e9b2c786dfe37e12e75090363a1c
run.py
run.py
import os import json default_conf = { 'reddit': { 'username': '', 'password': '', }, 'twitter': { 'consumer_key': '', 'consumer_secret': '', 'access_token': '', 'access_secret': '', }, } if __name__ == '__main__': if not os.path.isfile('config.json...
import os import json import sys default_conf = { 'reddit': { 'username': '', 'password': '', }, 'twitter': { 'consumer_key': '', 'consumer_secret': '', 'access_token': '', 'access_secret': '', }, } def write_conf(conf): config = json.dumps(conf, in...
Add twitter stuff to default config and allow easier merging of configs
Add twitter stuff to default config and allow easier merging of configs
Python
mit
r3m0t/TweetPoster,joealcorn/TweetPoster,tytek2012/TweetPoster,aperson/TweetPoster
import os import json default_conf = { 'reddit': { 'username': '', 'password': '', }, 'twitter': { 'consumer_key': '', 'consumer_secret': '', 'access_token': '', 'access_secret': '', }, } if __name__ == '__main__': if not os.path.isfile('config.json...
import os import json import sys default_conf = { 'reddit': { 'username': '', 'password': '', }, 'twitter': { 'consumer_key': '', 'consumer_secret': '', 'access_token': '', 'access_secret': '', }, } def write_conf(conf): config = json.dumps(conf, in...
<commit_before>import os import json default_conf = { 'reddit': { 'username': '', 'password': '', }, 'twitter': { 'consumer_key': '', 'consumer_secret': '', 'access_token': '', 'access_secret': '', }, } if __name__ == '__main__': if not os.path.isfi...
import os import json import sys default_conf = { 'reddit': { 'username': '', 'password': '', }, 'twitter': { 'consumer_key': '', 'consumer_secret': '', 'access_token': '', 'access_secret': '', }, } def write_conf(conf): config = json.dumps(conf, in...
import os import json default_conf = { 'reddit': { 'username': '', 'password': '', }, 'twitter': { 'consumer_key': '', 'consumer_secret': '', 'access_token': '', 'access_secret': '', }, } if __name__ == '__main__': if not os.path.isfile('config.json...
<commit_before>import os import json default_conf = { 'reddit': { 'username': '', 'password': '', }, 'twitter': { 'consumer_key': '', 'consumer_secret': '', 'access_token': '', 'access_secret': '', }, } if __name__ == '__main__': if not os.path.isfi...
9d65eaa14bc3f04ea998ed7bc43b7c71e5d232f7
v3/scripts/testing/create-8gb-metadata.py
v3/scripts/testing/create-8gb-metadata.py
#!/usr/bin/env python # -*- coding: utf8 -*- __author__ = 'eric' ''' Need to create some test data '''
#!/usr/bin/env python # -*- coding: utf8 -*- __author__ = 'eric' ''' Need to create some test data 8 gigabytes dataset '''
Test script for generating metadata
Test script for generating metadata
Python
mit
TheShellLand/pies,TheShellLand/pies
#!/usr/bin/env python # -*- coding: utf8 -*- __author__ = 'eric' ''' Need to create some test data ''' Test script for generating metadata
#!/usr/bin/env python # -*- coding: utf8 -*- __author__ = 'eric' ''' Need to create some test data 8 gigabytes dataset '''
<commit_before>#!/usr/bin/env python # -*- coding: utf8 -*- __author__ = 'eric' ''' Need to create some test data ''' <commit_msg>Test script for generating metadata<commit_after>
#!/usr/bin/env python # -*- coding: utf8 -*- __author__ = 'eric' ''' Need to create some test data 8 gigabytes dataset '''
#!/usr/bin/env python # -*- coding: utf8 -*- __author__ = 'eric' ''' Need to create some test data ''' Test script for generating metadata#!/usr/bin/env python # -*- coding: utf8 -*- __author__ = 'eric' ''' Need to create some test data 8 gigabytes dataset '''
<commit_before>#!/usr/bin/env python # -*- coding: utf8 -*- __author__ = 'eric' ''' Need to create some test data ''' <commit_msg>Test script for generating metadata<commit_after>#!/usr/bin/env python # -*- coding: utf8 -*- __author__ = 'eric' ''' Need to create some test data 8 gigabytes dataset '''
53d09ddacc92a52219a3cd18bba606840b870fcd
vumi_http_proxy/test/test_servicemaker.py
vumi_http_proxy/test/test_servicemaker.py
from vumi_http_proxy.servicemaker import Options, ProxyWorkerServiceMaker from vumi_http_proxy import http_proxy from twisted.trial import unittest class TestOptions(unittest.TestCase): def test_defaults(self): options = Options() options.parseOptions([]) self.assertEqual(options["port"], ...
from vumi_http_proxy.servicemaker import ( Options, ProxyWorkerServiceMaker, client) from vumi_http_proxy import http_proxy from twisted.trial import unittest from vumi_http_proxy.test import helpers class TestOptions(unittest.TestCase): def test_defaults(self): options = Options() options.par...
Patch out DNS resolver in makeService tests.
Patch out DNS resolver in makeService tests.
Python
bsd-3-clause
praekelt/vumi-http-proxy,praekelt/vumi-http-proxy
from vumi_http_proxy.servicemaker import Options, ProxyWorkerServiceMaker from vumi_http_proxy import http_proxy from twisted.trial import unittest class TestOptions(unittest.TestCase): def test_defaults(self): options = Options() options.parseOptions([]) self.assertEqual(options["port"], ...
from vumi_http_proxy.servicemaker import ( Options, ProxyWorkerServiceMaker, client) from vumi_http_proxy import http_proxy from twisted.trial import unittest from vumi_http_proxy.test import helpers class TestOptions(unittest.TestCase): def test_defaults(self): options = Options() options.par...
<commit_before>from vumi_http_proxy.servicemaker import Options, ProxyWorkerServiceMaker from vumi_http_proxy import http_proxy from twisted.trial import unittest class TestOptions(unittest.TestCase): def test_defaults(self): options = Options() options.parseOptions([]) self.assertEqual(op...
from vumi_http_proxy.servicemaker import ( Options, ProxyWorkerServiceMaker, client) from vumi_http_proxy import http_proxy from twisted.trial import unittest from vumi_http_proxy.test import helpers class TestOptions(unittest.TestCase): def test_defaults(self): options = Options() options.par...
from vumi_http_proxy.servicemaker import Options, ProxyWorkerServiceMaker from vumi_http_proxy import http_proxy from twisted.trial import unittest class TestOptions(unittest.TestCase): def test_defaults(self): options = Options() options.parseOptions([]) self.assertEqual(options["port"], ...
<commit_before>from vumi_http_proxy.servicemaker import Options, ProxyWorkerServiceMaker from vumi_http_proxy import http_proxy from twisted.trial import unittest class TestOptions(unittest.TestCase): def test_defaults(self): options = Options() options.parseOptions([]) self.assertEqual(op...
2cc55a25b13ac6575424ba70857a8419b796ca76
_tests/macro_testing/runner.py
_tests/macro_testing/runner.py
# -*- coding: utf-8 -*- import os, os.path import sys import unittest from macrotest import JSONSpecMacroTestCaseFactory def JSONTestCaseLoader(tests_path, recursive=False): """ Load JSON specifications for Jinja2 macro test cases from the given path and returns the resulting test classes. This fun...
# -*- coding: utf-8 -*- import os, os.path import sys import unittest from macrotest import JSONSpecMacroTestCaseFactory def JSONTestCaseLoader(tests_path, recursive=False): """ Load JSON specifications for Jinja2 macro test cases from the given path and returns the resulting test classes. This fun...
Make the paths not relative, so tests can be run from anywhere.
Make the paths not relative, so tests can be run from anywhere.
Python
cc0-1.0
imuchnik/cfgov-refresh,imuchnik/cfgov-refresh,imuchnik/cfgov-refresh,imuchnik/cfgov-refresh
# -*- coding: utf-8 -*- import os, os.path import sys import unittest from macrotest import JSONSpecMacroTestCaseFactory def JSONTestCaseLoader(tests_path, recursive=False): """ Load JSON specifications for Jinja2 macro test cases from the given path and returns the resulting test classes. This fun...
# -*- coding: utf-8 -*- import os, os.path import sys import unittest from macrotest import JSONSpecMacroTestCaseFactory def JSONTestCaseLoader(tests_path, recursive=False): """ Load JSON specifications for Jinja2 macro test cases from the given path and returns the resulting test classes. This fun...
<commit_before># -*- coding: utf-8 -*- import os, os.path import sys import unittest from macrotest import JSONSpecMacroTestCaseFactory def JSONTestCaseLoader(tests_path, recursive=False): """ Load JSON specifications for Jinja2 macro test cases from the given path and returns the resulting test classes...
# -*- coding: utf-8 -*- import os, os.path import sys import unittest from macrotest import JSONSpecMacroTestCaseFactory def JSONTestCaseLoader(tests_path, recursive=False): """ Load JSON specifications for Jinja2 macro test cases from the given path and returns the resulting test classes. This fun...
# -*- coding: utf-8 -*- import os, os.path import sys import unittest from macrotest import JSONSpecMacroTestCaseFactory def JSONTestCaseLoader(tests_path, recursive=False): """ Load JSON specifications for Jinja2 macro test cases from the given path and returns the resulting test classes. This fun...
<commit_before># -*- coding: utf-8 -*- import os, os.path import sys import unittest from macrotest import JSONSpecMacroTestCaseFactory def JSONTestCaseLoader(tests_path, recursive=False): """ Load JSON specifications for Jinja2 macro test cases from the given path and returns the resulting test classes...
2cde3dbb69077054c6422cbe96e9b996be700d29
pulldb/api/subscriptions.py
pulldb/api/subscriptions.py
import json import logging from google.appengine.api import oauth from google.appengine.ext import ndb from pulldb import users from pulldb.api.base import OauthHandler, JsonModel from pulldb.base import create_app, Route from pulldb.models.subscriptions import Subscription, subscription_context class ListSubs(Oauth...
import json import logging from google.appengine.api import oauth from google.appengine.ext import ndb from pulldb import users from pulldb.api.base import OauthHandler, JsonModel from pulldb.base import create_app, Route from pulldb.models.subscriptions import Subscription, subscription_context class ListSubs(Oauth...
Make subscription handler less oauth dependant
Make subscription handler less oauth dependant
Python
mit
xchewtoyx/pulldb
import json import logging from google.appengine.api import oauth from google.appengine.ext import ndb from pulldb import users from pulldb.api.base import OauthHandler, JsonModel from pulldb.base import create_app, Route from pulldb.models.subscriptions import Subscription, subscription_context class ListSubs(Oauth...
import json import logging from google.appengine.api import oauth from google.appengine.ext import ndb from pulldb import users from pulldb.api.base import OauthHandler, JsonModel from pulldb.base import create_app, Route from pulldb.models.subscriptions import Subscription, subscription_context class ListSubs(Oauth...
<commit_before>import json import logging from google.appengine.api import oauth from google.appengine.ext import ndb from pulldb import users from pulldb.api.base import OauthHandler, JsonModel from pulldb.base import create_app, Route from pulldb.models.subscriptions import Subscription, subscription_context class...
import json import logging from google.appengine.api import oauth from google.appengine.ext import ndb from pulldb import users from pulldb.api.base import OauthHandler, JsonModel from pulldb.base import create_app, Route from pulldb.models.subscriptions import Subscription, subscription_context class ListSubs(Oauth...
import json import logging from google.appengine.api import oauth from google.appengine.ext import ndb from pulldb import users from pulldb.api.base import OauthHandler, JsonModel from pulldb.base import create_app, Route from pulldb.models.subscriptions import Subscription, subscription_context class ListSubs(Oauth...
<commit_before>import json import logging from google.appengine.api import oauth from google.appengine.ext import ndb from pulldb import users from pulldb.api.base import OauthHandler, JsonModel from pulldb.base import create_app, Route from pulldb.models.subscriptions import Subscription, subscription_context class...
a18eb7509619914cd0565255730ed6bb40f14c9b
ovp_users/emails.py
ovp_users/emails.py
from django.core.mail import EmailMultiAlternatives from django.template import Context, Template from django.template.loader import get_template from django.conf import settings import threading class EmailThread(threading.Thread): def __init__(self, msg): self.msg = msg threading.Thread.__init__(sel...
from ovp_core.emails import BaseMail class UserMail(BaseMail): """ This class is responsible for firing emails for Users """ def sendWelcome(self, context={}): """ Sent when user registers """ return self.sendEmail('welcome', 'Welcome', context) def sendRecoveryToken(self, context): """...
Move BaseMail from ovp-users to ovp-core
Move BaseMail from ovp-users to ovp-core
Python
agpl-3.0
OpenVolunteeringPlatform/django-ovp-users,OpenVolunteeringPlatform/django-ovp-users
from django.core.mail import EmailMultiAlternatives from django.template import Context, Template from django.template.loader import get_template from django.conf import settings import threading class EmailThread(threading.Thread): def __init__(self, msg): self.msg = msg threading.Thread.__init__(sel...
from ovp_core.emails import BaseMail class UserMail(BaseMail): """ This class is responsible for firing emails for Users """ def sendWelcome(self, context={}): """ Sent when user registers """ return self.sendEmail('welcome', 'Welcome', context) def sendRecoveryToken(self, context): """...
<commit_before>from django.core.mail import EmailMultiAlternatives from django.template import Context, Template from django.template.loader import get_template from django.conf import settings import threading class EmailThread(threading.Thread): def __init__(self, msg): self.msg = msg threading.Thre...
from ovp_core.emails import BaseMail class UserMail(BaseMail): """ This class is responsible for firing emails for Users """ def sendWelcome(self, context={}): """ Sent when user registers """ return self.sendEmail('welcome', 'Welcome', context) def sendRecoveryToken(self, context): """...
from django.core.mail import EmailMultiAlternatives from django.template import Context, Template from django.template.loader import get_template from django.conf import settings import threading class EmailThread(threading.Thread): def __init__(self, msg): self.msg = msg threading.Thread.__init__(sel...
<commit_before>from django.core.mail import EmailMultiAlternatives from django.template import Context, Template from django.template.loader import get_template from django.conf import settings import threading class EmailThread(threading.Thread): def __init__(self, msg): self.msg = msg threading.Thre...
d940faee24f01d18e398da0592d88bed3908a46d
ox_herd/__init__.py
ox_herd/__init__.py
"""The ox_herd package provides a way for herding tests together (like oxen). """ VERSION = '0.6.10'
"""The ox_herd package provides a way for herding tests together (like oxen). """ VERSION = '0.6.11'
Fix bug in showing form
Fix bug in showing form
Python
bsd-2-clause
aocks/ox_herd,aocks/ox_herd,aocks/ox_herd
"""The ox_herd package provides a way for herding tests together (like oxen). """ VERSION = '0.6.10' Fix bug in showing form
"""The ox_herd package provides a way for herding tests together (like oxen). """ VERSION = '0.6.11'
<commit_before>"""The ox_herd package provides a way for herding tests together (like oxen). """ VERSION = '0.6.10' <commit_msg>Fix bug in showing form<commit_after>
"""The ox_herd package provides a way for herding tests together (like oxen). """ VERSION = '0.6.11'
"""The ox_herd package provides a way for herding tests together (like oxen). """ VERSION = '0.6.10' Fix bug in showing form"""The ox_herd package provides a way for herding tests together (like oxen). """ VERSION = '0.6.11'
<commit_before>"""The ox_herd package provides a way for herding tests together (like oxen). """ VERSION = '0.6.10' <commit_msg>Fix bug in showing form<commit_after>"""The ox_herd package provides a way for herding tests together (like oxen). """ VERSION = '0.6.11'
709d4386a308ce8c0767eab1f2174ec321ea59fd
client/main.py
client/main.py
import requests import yaml def runLoop( config ): """ Runs indefinitely. On user input (card swipe), will gather the card number, send it to the server configured, and if it has been authorized, open the relay with a GPIO call. """ while True: swipe = input() cardNumber = swipe print( 'The last input wa...
import requests import yaml def runLoop( config ): """ Runs indefinitely. On user input (card swipe), will gather the card number, send it to the server configured, and if it has been authorized, open the relay with a GPIO call. """ while True: swipe = input() cardNumber = swipe print( 'The last input wa...
Rename funciton to match corresponding HTTP request
Rename funciton to match corresponding HTTP request
Python
mit
aradler/Card-lockout,aradler/Card-lockout,aradler/Card-lockout
import requests import yaml def runLoop( config ): """ Runs indefinitely. On user input (card swipe), will gather the card number, send it to the server configured, and if it has been authorized, open the relay with a GPIO call. """ while True: swipe = input() cardNumber = swipe print( 'The last input wa...
import requests import yaml def runLoop( config ): """ Runs indefinitely. On user input (card swipe), will gather the card number, send it to the server configured, and if it has been authorized, open the relay with a GPIO call. """ while True: swipe = input() cardNumber = swipe print( 'The last input wa...
<commit_before>import requests import yaml def runLoop( config ): """ Runs indefinitely. On user input (card swipe), will gather the card number, send it to the server configured, and if it has been authorized, open the relay with a GPIO call. """ while True: swipe = input() cardNumber = swipe print( 'Th...
import requests import yaml def runLoop( config ): """ Runs indefinitely. On user input (card swipe), will gather the card number, send it to the server configured, and if it has been authorized, open the relay with a GPIO call. """ while True: swipe = input() cardNumber = swipe print( 'The last input wa...
import requests import yaml def runLoop( config ): """ Runs indefinitely. On user input (card swipe), will gather the card number, send it to the server configured, and if it has been authorized, open the relay with a GPIO call. """ while True: swipe = input() cardNumber = swipe print( 'The last input wa...
<commit_before>import requests import yaml def runLoop( config ): """ Runs indefinitely. On user input (card swipe), will gather the card number, send it to the server configured, and if it has been authorized, open the relay with a GPIO call. """ while True: swipe = input() cardNumber = swipe print( 'Th...
8960be78113ba122dbbac1ed26d82abf814bbfdf
src/lesson/main.py
src/lesson/main.py
# lesson/main.py # # This file is part of LESSON. LESSON 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, version 2 or later. # # This program is distributed in the hope that it will be useful, but WITHOUT # A...
# lesson/main.py # # This file is part of LESSON. LESSON 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, version 2 or later. # # This program is distributed in the hope that it will be useful, but WITHOUT # A...
Fix eclipse error message on mod_wsgi import
Fix eclipse error message on mod_wsgi import Signed-off-by: Jonathan Dieter <[email protected]>
Python
agpl-3.0
lesbg/lesson-backend
# lesson/main.py # # This file is part of LESSON. LESSON 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, version 2 or later. # # This program is distributed in the hope that it will be useful, but WITHOUT # A...
# lesson/main.py # # This file is part of LESSON. LESSON 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, version 2 or later. # # This program is distributed in the hope that it will be useful, but WITHOUT # A...
<commit_before># lesson/main.py # # This file is part of LESSON. LESSON 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, version 2 or later. # # This program is distributed in the hope that it will be useful, ...
# lesson/main.py # # This file is part of LESSON. LESSON 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, version 2 or later. # # This program is distributed in the hope that it will be useful, but WITHOUT # A...
# lesson/main.py # # This file is part of LESSON. LESSON 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, version 2 or later. # # This program is distributed in the hope that it will be useful, but WITHOUT # A...
<commit_before># lesson/main.py # # This file is part of LESSON. LESSON 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, version 2 or later. # # This program is distributed in the hope that it will be useful, ...
7206d68648c91790ac4fa14a3074c77c97c01636
mopidy/backends/base/__init__.py
mopidy/backends/base/__init__.py
import logging from .current_playlist import CurrentPlaylistController from .library import LibraryController, BaseLibraryProvider from .playback import PlaybackController, BasePlaybackProvider from .stored_playlists import (StoredPlaylistsController, BaseStoredPlaylistsProvider) logger = logging.getLogger('mopid...
import logging from .current_playlist import CurrentPlaylistController from .library import LibraryController, BaseLibraryProvider from .playback import PlaybackController, BasePlaybackProvider from .stored_playlists import (StoredPlaylistsController, BaseStoredPlaylistsProvider) logger = logging.getLogger('mopid...
Remove mixer from the Backend API as it is independent
Remove mixer from the Backend API as it is independent
Python
apache-2.0
adamcik/mopidy,vrs01/mopidy,pacificIT/mopidy,jmarsik/mopidy,jcass77/mopidy,glogiotatidis/mopidy,kingosticks/mopidy,ZenithDK/mopidy,rawdlite/mopidy,glogiotatidis/mopidy,ZenithDK/mopidy,tkem/mopidy,kingosticks/mopidy,jmarsik/mopidy,SuperStarPL/mopidy,bencevans/mopidy,diandiankan/mopidy,quartz55/mopidy,glogiotatidis/mopid...
import logging from .current_playlist import CurrentPlaylistController from .library import LibraryController, BaseLibraryProvider from .playback import PlaybackController, BasePlaybackProvider from .stored_playlists import (StoredPlaylistsController, BaseStoredPlaylistsProvider) logger = logging.getLogger('mopid...
import logging from .current_playlist import CurrentPlaylistController from .library import LibraryController, BaseLibraryProvider from .playback import PlaybackController, BasePlaybackProvider from .stored_playlists import (StoredPlaylistsController, BaseStoredPlaylistsProvider) logger = logging.getLogger('mopid...
<commit_before>import logging from .current_playlist import CurrentPlaylistController from .library import LibraryController, BaseLibraryProvider from .playback import PlaybackController, BasePlaybackProvider from .stored_playlists import (StoredPlaylistsController, BaseStoredPlaylistsProvider) logger = logging.g...
import logging from .current_playlist import CurrentPlaylistController from .library import LibraryController, BaseLibraryProvider from .playback import PlaybackController, BasePlaybackProvider from .stored_playlists import (StoredPlaylistsController, BaseStoredPlaylistsProvider) logger = logging.getLogger('mopid...
import logging from .current_playlist import CurrentPlaylistController from .library import LibraryController, BaseLibraryProvider from .playback import PlaybackController, BasePlaybackProvider from .stored_playlists import (StoredPlaylistsController, BaseStoredPlaylistsProvider) logger = logging.getLogger('mopid...
<commit_before>import logging from .current_playlist import CurrentPlaylistController from .library import LibraryController, BaseLibraryProvider from .playback import PlaybackController, BasePlaybackProvider from .stored_playlists import (StoredPlaylistsController, BaseStoredPlaylistsProvider) logger = logging.g...
b24af9c3e4105d7acd2e9e13545f24d5a69ae230
saleor/product/migrations/0018_auto_20161212_0725.py
saleor/product/migrations/0018_auto_20161212_0725.py
# -*- coding: utf-8 -*- # Generated by Django 1.10.3 on 2016-12-12 13:25 from __future__ import unicode_literals from django.db import migrations from django.utils.text import slugify def create_slugs(apps, schema_editor): Value = apps.get_model('product', 'AttributeChoiceValue') for value in Value.objects.a...
# -*- coding: utf-8 -*- # Generated by Django 1.10.3 on 2016-12-12 13:25 from __future__ import unicode_literals from django.db import migrations from django.utils.text import slugify def create_slugs(apps, schema_editor): Value = apps.get_model('product', 'AttributeChoiceValue') for value in Value.objects.a...
Allow to revert data migaration
Allow to revert data migaration
Python
bsd-3-clause
KenMutemi/saleor,maferelo/saleor,jreigel/saleor,KenMutemi/saleor,jreigel/saleor,itbabu/saleor,itbabu/saleor,HyperManTT/ECommerceSaleor,UITools/saleor,tfroehlich82/saleor,KenMutemi/saleor,mociepka/saleor,car3oon/saleor,tfroehlich82/saleor,HyperManTT/ECommerceSaleor,itbabu/saleor,UITools/saleor,UITools/saleor,UITools/sal...
# -*- coding: utf-8 -*- # Generated by Django 1.10.3 on 2016-12-12 13:25 from __future__ import unicode_literals from django.db import migrations from django.utils.text import slugify def create_slugs(apps, schema_editor): Value = apps.get_model('product', 'AttributeChoiceValue') for value in Value.objects.a...
# -*- coding: utf-8 -*- # Generated by Django 1.10.3 on 2016-12-12 13:25 from __future__ import unicode_literals from django.db import migrations from django.utils.text import slugify def create_slugs(apps, schema_editor): Value = apps.get_model('product', 'AttributeChoiceValue') for value in Value.objects.a...
<commit_before># -*- coding: utf-8 -*- # Generated by Django 1.10.3 on 2016-12-12 13:25 from __future__ import unicode_literals from django.db import migrations from django.utils.text import slugify def create_slugs(apps, schema_editor): Value = apps.get_model('product', 'AttributeChoiceValue') for value in ...
# -*- coding: utf-8 -*- # Generated by Django 1.10.3 on 2016-12-12 13:25 from __future__ import unicode_literals from django.db import migrations from django.utils.text import slugify def create_slugs(apps, schema_editor): Value = apps.get_model('product', 'AttributeChoiceValue') for value in Value.objects.a...
# -*- coding: utf-8 -*- # Generated by Django 1.10.3 on 2016-12-12 13:25 from __future__ import unicode_literals from django.db import migrations from django.utils.text import slugify def create_slugs(apps, schema_editor): Value = apps.get_model('product', 'AttributeChoiceValue') for value in Value.objects.a...
<commit_before># -*- coding: utf-8 -*- # Generated by Django 1.10.3 on 2016-12-12 13:25 from __future__ import unicode_literals from django.db import migrations from django.utils.text import slugify def create_slugs(apps, schema_editor): Value = apps.get_model('product', 'AttributeChoiceValue') for value in ...
9d0e9af5844772c18ca24d4012642d4518b66dfc
tests/test_judicious.py
tests/test_judicious.py
#!/usr/bin/env python # -*- coding: utf-8 -*- """Tests for `judicious` package.""" import pytest import judicious @pytest.fixture def response(): """Sample pytest fixture. See more at: http://doc.pytest.org/en/latest/fixture.html """ # import requests # return requests.get('https://github.com...
#!/usr/bin/env python # -*- coding: utf-8 -*- """Tests for `judicious` package.""" import random import pytest import judicious def test_seeding(): r1 = random.random() r2 = random.random() judicious.seed("70d911d5-6d93-3c42-f9a4-53e493a79bff") r3 = random.random() r4 = random.random() jud...
Add test of seeding PRNG
Add test of seeding PRNG
Python
mit
suchow/judicious,suchow/judicious,suchow/judicious
#!/usr/bin/env python # -*- coding: utf-8 -*- """Tests for `judicious` package.""" import pytest import judicious @pytest.fixture def response(): """Sample pytest fixture. See more at: http://doc.pytest.org/en/latest/fixture.html """ # import requests # return requests.get('https://github.com...
#!/usr/bin/env python # -*- coding: utf-8 -*- """Tests for `judicious` package.""" import random import pytest import judicious def test_seeding(): r1 = random.random() r2 = random.random() judicious.seed("70d911d5-6d93-3c42-f9a4-53e493a79bff") r3 = random.random() r4 = random.random() jud...
<commit_before>#!/usr/bin/env python # -*- coding: utf-8 -*- """Tests for `judicious` package.""" import pytest import judicious @pytest.fixture def response(): """Sample pytest fixture. See more at: http://doc.pytest.org/en/latest/fixture.html """ # import requests # return requests.get('htt...
#!/usr/bin/env python # -*- coding: utf-8 -*- """Tests for `judicious` package.""" import random import pytest import judicious def test_seeding(): r1 = random.random() r2 = random.random() judicious.seed("70d911d5-6d93-3c42-f9a4-53e493a79bff") r3 = random.random() r4 = random.random() jud...
#!/usr/bin/env python # -*- coding: utf-8 -*- """Tests for `judicious` package.""" import pytest import judicious @pytest.fixture def response(): """Sample pytest fixture. See more at: http://doc.pytest.org/en/latest/fixture.html """ # import requests # return requests.get('https://github.com...
<commit_before>#!/usr/bin/env python # -*- coding: utf-8 -*- """Tests for `judicious` package.""" import pytest import judicious @pytest.fixture def response(): """Sample pytest fixture. See more at: http://doc.pytest.org/en/latest/fixture.html """ # import requests # return requests.get('htt...
d46d908f5cfafcb6962207c45f923d3afb7f35a7
pyrobus/__init__.py
pyrobus/__init__.py
from .robot import Robot from .modules import *
import logging from .robot import Robot from .modules import * nh = logging.NullHandler() logging.getLogger(__name__).addHandler(nh)
Add null handler as default for logging.
Add null handler as default for logging.
Python
mit
pollen/pyrobus
from .robot import Robot from .modules import * Add null handler as default for logging.
import logging from .robot import Robot from .modules import * nh = logging.NullHandler() logging.getLogger(__name__).addHandler(nh)
<commit_before>from .robot import Robot from .modules import * <commit_msg>Add null handler as default for logging.<commit_after>
import logging from .robot import Robot from .modules import * nh = logging.NullHandler() logging.getLogger(__name__).addHandler(nh)
from .robot import Robot from .modules import * Add null handler as default for logging.import logging from .robot import Robot from .modules import * nh = logging.NullHandler() logging.getLogger(__name__).addHandler(nh)
<commit_before>from .robot import Robot from .modules import * <commit_msg>Add null handler as default for logging.<commit_after>import logging from .robot import Robot from .modules import * nh = logging.NullHandler() logging.getLogger(__name__).addHandler(nh)
c220c0a474a660c4c1167d42fdd0d48599b1b593
tests/test_pathutils.py
tests/test_pathutils.py
from os.path import join import sublime import sys from unittest import TestCase version = sublime.version() try: from libsass import pathutils except ImportError: from sublime_libsass.libsass import pathutils class TestPathutils(TestCase): def test_subpaths(self): path = join('/foo','bar','baz'...
from os.path import join, realpath import os import sublime import sys from unittest import TestCase from functools import wraps def subl_patch(pkg, obj=None): def subl_deco(fn): @wraps(fn) def wrap(*args): nonlocal pkg o = [] if obj != None: o +...
Make custom patch in package to test
Make custom patch in package to test
Python
mit
blitzrk/sublime_libsass,blitzrk/sublime_libsass
from os.path import join import sublime import sys from unittest import TestCase version = sublime.version() try: from libsass import pathutils except ImportError: from sublime_libsass.libsass import pathutils class TestPathutils(TestCase): def test_subpaths(self): path = join('/foo','bar','baz'...
from os.path import join, realpath import os import sublime import sys from unittest import TestCase from functools import wraps def subl_patch(pkg, obj=None): def subl_deco(fn): @wraps(fn) def wrap(*args): nonlocal pkg o = [] if obj != None: o +...
<commit_before>from os.path import join import sublime import sys from unittest import TestCase version = sublime.version() try: from libsass import pathutils except ImportError: from sublime_libsass.libsass import pathutils class TestPathutils(TestCase): def test_subpaths(self): path = join('/f...
from os.path import join, realpath import os import sublime import sys from unittest import TestCase from functools import wraps def subl_patch(pkg, obj=None): def subl_deco(fn): @wraps(fn) def wrap(*args): nonlocal pkg o = [] if obj != None: o +...
from os.path import join import sublime import sys from unittest import TestCase version = sublime.version() try: from libsass import pathutils except ImportError: from sublime_libsass.libsass import pathutils class TestPathutils(TestCase): def test_subpaths(self): path = join('/foo','bar','baz'...
<commit_before>from os.path import join import sublime import sys from unittest import TestCase version = sublime.version() try: from libsass import pathutils except ImportError: from sublime_libsass.libsass import pathutils class TestPathutils(TestCase): def test_subpaths(self): path = join('/f...
9eddd3b5c4635637faead9d7eae73efd2e324bdb
recipes/tests/test_views.py
recipes/tests/test_views.py
from django.core.urlresolvers import resolve from django.http import HttpRequest from django.template.loader import render_to_string from django.test import TestCase from recipes.views import home_page from recipes.models import Recipe class HomePageViewTest(TestCase): def test_root_url_resolves_to_home_page_view...
from django.core.urlresolvers import resolve from django.http import HttpRequest from django.template.loader import render_to_string from django.test import TestCase from recipes.views import home_page from recipes.models import Recipe class HomePageViewTest(TestCase): def test_root_url_resolves_to_home_page_view...
Use the test client to check all templates for correctness
Use the test client to check all templates for correctness
Python
agpl-3.0
XeryusTC/rotd,XeryusTC/rotd,XeryusTC/rotd
from django.core.urlresolvers import resolve from django.http import HttpRequest from django.template.loader import render_to_string from django.test import TestCase from recipes.views import home_page from recipes.models import Recipe class HomePageViewTest(TestCase): def test_root_url_resolves_to_home_page_view...
from django.core.urlresolvers import resolve from django.http import HttpRequest from django.template.loader import render_to_string from django.test import TestCase from recipes.views import home_page from recipes.models import Recipe class HomePageViewTest(TestCase): def test_root_url_resolves_to_home_page_view...
<commit_before>from django.core.urlresolvers import resolve from django.http import HttpRequest from django.template.loader import render_to_string from django.test import TestCase from recipes.views import home_page from recipes.models import Recipe class HomePageViewTest(TestCase): def test_root_url_resolves_to...
from django.core.urlresolvers import resolve from django.http import HttpRequest from django.template.loader import render_to_string from django.test import TestCase from recipes.views import home_page from recipes.models import Recipe class HomePageViewTest(TestCase): def test_root_url_resolves_to_home_page_view...
from django.core.urlresolvers import resolve from django.http import HttpRequest from django.template.loader import render_to_string from django.test import TestCase from recipes.views import home_page from recipes.models import Recipe class HomePageViewTest(TestCase): def test_root_url_resolves_to_home_page_view...
<commit_before>from django.core.urlresolvers import resolve from django.http import HttpRequest from django.template.loader import render_to_string from django.test import TestCase from recipes.views import home_page from recipes.models import Recipe class HomePageViewTest(TestCase): def test_root_url_resolves_to...
c1edc666630c03b6d85d9749e0695a9f19dd7c13
src/collectd_scripts/handle_collectd_notification.py
src/collectd_scripts/handle_collectd_notification.py
#!/usr/bin/python import sys import os import salt.client def getNotification(): notification_dict = {} isEndOfDictionary = False for line in sys.stdin: if not line.strip(): isEndOfDictionary = True continue if isEndOfDictionary: break key, value...
#!/usr/bin/python import sys import os import salt.client def getNotification(): notification_dict = {} isEndOfDictionary = False for line in sys.stdin: if not line.strip(): isEndOfDictionary = True continue if isEndOfDictionary: break key, value...
Fix in collectd event notifier script.
Skynet: Fix in collectd event notifier script. This patch adds a fix to collectd event notifier script, by providing a value the "severity" field in the event that it sends to salt-master event bus. with out that event listener in the skyring server will fail to process it. Change-Id: I20b738468c8022a25024e4327434ae6...
Python
apache-2.0
skyrings/skynet,skyrings/skynet
#!/usr/bin/python import sys import os import salt.client def getNotification(): notification_dict = {} isEndOfDictionary = False for line in sys.stdin: if not line.strip(): isEndOfDictionary = True continue if isEndOfDictionary: break key, value...
#!/usr/bin/python import sys import os import salt.client def getNotification(): notification_dict = {} isEndOfDictionary = False for line in sys.stdin: if not line.strip(): isEndOfDictionary = True continue if isEndOfDictionary: break key, value...
<commit_before>#!/usr/bin/python import sys import os import salt.client def getNotification(): notification_dict = {} isEndOfDictionary = False for line in sys.stdin: if not line.strip(): isEndOfDictionary = True continue if isEndOfDictionary: break ...
#!/usr/bin/python import sys import os import salt.client def getNotification(): notification_dict = {} isEndOfDictionary = False for line in sys.stdin: if not line.strip(): isEndOfDictionary = True continue if isEndOfDictionary: break key, value...
#!/usr/bin/python import sys import os import salt.client def getNotification(): notification_dict = {} isEndOfDictionary = False for line in sys.stdin: if not line.strip(): isEndOfDictionary = True continue if isEndOfDictionary: break key, value...
<commit_before>#!/usr/bin/python import sys import os import salt.client def getNotification(): notification_dict = {} isEndOfDictionary = False for line in sys.stdin: if not line.strip(): isEndOfDictionary = True continue if isEndOfDictionary: break ...
545812b5e31b4894c600b2b172640bea27947db8
ecmd-core/pyecmd/test_api.py
ecmd-core/pyecmd/test_api.py
from pyecmd import * with Ecmd(fapi2="ver1"): t = loopTargets("pu", ECMD_SELECTED_TARGETS_LOOP)[0] data = t.getScom(0x1234) t.putScom(0x1234, 0x10100000) # These interfaces may not be defined for some plugins # Pull them to prevent compile issues #core_id, thread_id = t.targetToSequenceId...
from pyecmd import * extensions = {} if hasattr(ecmd, "fapi2InitExtension"): extensions["fapi2"] = "ver1" with Ecmd(**extensions): t = loopTargets("pu", ECMD_SELECTED_TARGETS_LOOP)[0] data = t.getScom(0x1234) t.putScom(0x1234, 0x10100000) # These interfaces may not be defined for some plugins...
Make fapi2 test conditional on fapi2 being built into ecmd
pyecmd: Make fapi2 test conditional on fapi2 being built into ecmd
Python
apache-2.0
mklight/eCMD,mklight/eCMD,mklight/eCMD,mklight/eCMD,open-power/eCMD,open-power/eCMD,open-power/eCMD,open-power/eCMD,open-power/eCMD,mklight/eCMD
from pyecmd import * with Ecmd(fapi2="ver1"): t = loopTargets("pu", ECMD_SELECTED_TARGETS_LOOP)[0] data = t.getScom(0x1234) t.putScom(0x1234, 0x10100000) # These interfaces may not be defined for some plugins # Pull them to prevent compile issues #core_id, thread_id = t.targetToSequenceId...
from pyecmd import * extensions = {} if hasattr(ecmd, "fapi2InitExtension"): extensions["fapi2"] = "ver1" with Ecmd(**extensions): t = loopTargets("pu", ECMD_SELECTED_TARGETS_LOOP)[0] data = t.getScom(0x1234) t.putScom(0x1234, 0x10100000) # These interfaces may not be defined for some plugins...
<commit_before>from pyecmd import * with Ecmd(fapi2="ver1"): t = loopTargets("pu", ECMD_SELECTED_TARGETS_LOOP)[0] data = t.getScom(0x1234) t.putScom(0x1234, 0x10100000) # These interfaces may not be defined for some plugins # Pull them to prevent compile issues #core_id, thread_id = t.tar...
from pyecmd import * extensions = {} if hasattr(ecmd, "fapi2InitExtension"): extensions["fapi2"] = "ver1" with Ecmd(**extensions): t = loopTargets("pu", ECMD_SELECTED_TARGETS_LOOP)[0] data = t.getScom(0x1234) t.putScom(0x1234, 0x10100000) # These interfaces may not be defined for some plugins...
from pyecmd import * with Ecmd(fapi2="ver1"): t = loopTargets("pu", ECMD_SELECTED_TARGETS_LOOP)[0] data = t.getScom(0x1234) t.putScom(0x1234, 0x10100000) # These interfaces may not be defined for some plugins # Pull them to prevent compile issues #core_id, thread_id = t.targetToSequenceId...
<commit_before>from pyecmd import * with Ecmd(fapi2="ver1"): t = loopTargets("pu", ECMD_SELECTED_TARGETS_LOOP)[0] data = t.getScom(0x1234) t.putScom(0x1234, 0x10100000) # These interfaces may not be defined for some plugins # Pull them to prevent compile issues #core_id, thread_id = t.tar...
01e9df01bc17561d0f489f1647ce5e0c566372e5
flocker/provision/__init__.py
flocker/provision/__init__.py
# Copyright Hybrid Logic Ltd. See LICENSE file for details. """ Provisioning for acceptance tests. """ from ._common import PackageSource from ._install import provision from ._rackspace import rackspace_provisioner from ._aws import aws_provisioner # import digitalocean_provisioner __all__ = [ 'PackageSource',...
# Copyright Hybrid Logic Ltd. See LICENSE file for details. """ Provisioning for acceptance tests. """ from ._common import PackageSource from ._install import provision from ._rackspace import rackspace_provisioner from ._aws import aws_provisioner from ._digitalocean import digitalocean_provisioner __all__ = [ ...
Make the digitalocean provisioner public
Make the digitalocean provisioner public
Python
apache-2.0
wallnerryan/flocker-profiles,1d4Nf6/flocker,hackday-profilers/flocker,moypray/flocker,mbrukman/flocker,hackday-profilers/flocker,agonzalezro/flocker,1d4Nf6/flocker,w4ngyi/flocker,moypray/flocker,agonzalezro/flocker,mbrukman/flocker,adamtheturtle/flocker,moypray/flocker,AndyHuu/flocker,achanda/flocker,lukemarsden/flocke...
# Copyright Hybrid Logic Ltd. See LICENSE file for details. """ Provisioning for acceptance tests. """ from ._common import PackageSource from ._install import provision from ._rackspace import rackspace_provisioner from ._aws import aws_provisioner # import digitalocean_provisioner __all__ = [ 'PackageSource',...
# Copyright Hybrid Logic Ltd. See LICENSE file for details. """ Provisioning for acceptance tests. """ from ._common import PackageSource from ._install import provision from ._rackspace import rackspace_provisioner from ._aws import aws_provisioner from ._digitalocean import digitalocean_provisioner __all__ = [ ...
<commit_before># Copyright Hybrid Logic Ltd. See LICENSE file for details. """ Provisioning for acceptance tests. """ from ._common import PackageSource from ._install import provision from ._rackspace import rackspace_provisioner from ._aws import aws_provisioner # import digitalocean_provisioner __all__ = [ '...
# Copyright Hybrid Logic Ltd. See LICENSE file for details. """ Provisioning for acceptance tests. """ from ._common import PackageSource from ._install import provision from ._rackspace import rackspace_provisioner from ._aws import aws_provisioner from ._digitalocean import digitalocean_provisioner __all__ = [ ...
# Copyright Hybrid Logic Ltd. See LICENSE file for details. """ Provisioning for acceptance tests. """ from ._common import PackageSource from ._install import provision from ._rackspace import rackspace_provisioner from ._aws import aws_provisioner # import digitalocean_provisioner __all__ = [ 'PackageSource',...
<commit_before># Copyright Hybrid Logic Ltd. See LICENSE file for details. """ Provisioning for acceptance tests. """ from ._common import PackageSource from ._install import provision from ._rackspace import rackspace_provisioner from ._aws import aws_provisioner # import digitalocean_provisioner __all__ = [ '...
1ba88cf7d087c2783306854ea3fbc16c5fe17df4
wagtail/utils/compat.py
wagtail/utils/compat.py
def get_related_model(rel): # In Django 1.7 and under, the related model is accessed by doing: rel.model # This was renamed in Django 1.8 to rel.related_model. rel.model now returns # the base model. return getattr(rel, 'related_model', rel.model)
import django def get_related_model(rel): # In Django 1.7 and under, the related model is accessed by doing: rel.model # This was renamed in Django 1.8 to rel.related_model. rel.model now returns # the base model. if django.VERSION >= (1, 8): return rel.related_model else: return r...
Check Django version instead of hasattr
Check Django version instead of hasattr
Python
bsd-3-clause
mayapurmedia/wagtail,chrxr/wagtail,darith27/wagtail,mjec/wagtail,rv816/wagtail,rsalmaso/wagtail,stevenewey/wagtail,KimGlazebrook/wagtail-experiment,kurtw/wagtail,serzans/wagtail,m-sanders/wagtail,KimGlazebrook/wagtail-experiment,JoshBarr/wagtail,JoshBarr/wagtail,inonit/wagtail,kaedroho/wagtail,zerolab/wagtail,FlipperPA...
def get_related_model(rel): # In Django 1.7 and under, the related model is accessed by doing: rel.model # This was renamed in Django 1.8 to rel.related_model. rel.model now returns # the base model. return getattr(rel, 'related_model', rel.model) Check Django version instead of hasattr
import django def get_related_model(rel): # In Django 1.7 and under, the related model is accessed by doing: rel.model # This was renamed in Django 1.8 to rel.related_model. rel.model now returns # the base model. if django.VERSION >= (1, 8): return rel.related_model else: return r...
<commit_before>def get_related_model(rel): # In Django 1.7 and under, the related model is accessed by doing: rel.model # This was renamed in Django 1.8 to rel.related_model. rel.model now returns # the base model. return getattr(rel, 'related_model', rel.model) <commit_msg>Check Django version instead ...
import django def get_related_model(rel): # In Django 1.7 and under, the related model is accessed by doing: rel.model # This was renamed in Django 1.8 to rel.related_model. rel.model now returns # the base model. if django.VERSION >= (1, 8): return rel.related_model else: return r...
def get_related_model(rel): # In Django 1.7 and under, the related model is accessed by doing: rel.model # This was renamed in Django 1.8 to rel.related_model. rel.model now returns # the base model. return getattr(rel, 'related_model', rel.model) Check Django version instead of hasattrimport django d...
<commit_before>def get_related_model(rel): # In Django 1.7 and under, the related model is accessed by doing: rel.model # This was renamed in Django 1.8 to rel.related_model. rel.model now returns # the base model. return getattr(rel, 'related_model', rel.model) <commit_msg>Check Django version instead ...
feecf02f831394747cdee63892d12811f137938c
elevator/api.py
elevator/api.py
#!/usr/bin/env python # -*- coding: utf-8 -*- class Handler(object): def __init__(self, db): # Each handlers is formatted following # the pattern : [ command, # default return value, # raised error ] self.handles = { 'GET': (db.Get...
#!/usr/bin/env python # -*- coding: utf-8 -*- class Handler(object): def __init__(self, db): # Each handlers is formatted following # the pattern : [ command, # default return value, # raised error ] self.handles = { 'GET': (db.Get...
Fix : delete command call badly formatted in handler
Fix : delete command call badly formatted in handler
Python
mit
oleiade/Elevator
#!/usr/bin/env python # -*- coding: utf-8 -*- class Handler(object): def __init__(self, db): # Each handlers is formatted following # the pattern : [ command, # default return value, # raised error ] self.handles = { 'GET': (db.Get...
#!/usr/bin/env python # -*- coding: utf-8 -*- class Handler(object): def __init__(self, db): # Each handlers is formatted following # the pattern : [ command, # default return value, # raised error ] self.handles = { 'GET': (db.Get...
<commit_before>#!/usr/bin/env python # -*- coding: utf-8 -*- class Handler(object): def __init__(self, db): # Each handlers is formatted following # the pattern : [ command, # default return value, # raised error ] self.handles = { ...
#!/usr/bin/env python # -*- coding: utf-8 -*- class Handler(object): def __init__(self, db): # Each handlers is formatted following # the pattern : [ command, # default return value, # raised error ] self.handles = { 'GET': (db.Get...
#!/usr/bin/env python # -*- coding: utf-8 -*- class Handler(object): def __init__(self, db): # Each handlers is formatted following # the pattern : [ command, # default return value, # raised error ] self.handles = { 'GET': (db.Get...
<commit_before>#!/usr/bin/env python # -*- coding: utf-8 -*- class Handler(object): def __init__(self, db): # Each handlers is formatted following # the pattern : [ command, # default return value, # raised error ] self.handles = { ...
c6f2ff563c08eb43ba3f33bc9aaa2647e78701d2
fenced_code_plus/__init__.py
fenced_code_plus/__init__.py
from fenced_code_plus import FencedCodePlusExtension from fenced_code_plus import makeExtension
from __future__ import absolute_import from fenced_code_plus.fenced_code_plus import FencedCodePlusExtension from fenced_code_plus.fenced_code_plus import makeExtension
Make import compatable with python3.5
Make import compatable with python3.5
Python
bsd-3-clause
amfarrell/fenced-code-plus
from fenced_code_plus import FencedCodePlusExtension from fenced_code_plus import makeExtension Make import compatable with python3.5
from __future__ import absolute_import from fenced_code_plus.fenced_code_plus import FencedCodePlusExtension from fenced_code_plus.fenced_code_plus import makeExtension
<commit_before>from fenced_code_plus import FencedCodePlusExtension from fenced_code_plus import makeExtension <commit_msg>Make import compatable with python3.5<commit_after>
from __future__ import absolute_import from fenced_code_plus.fenced_code_plus import FencedCodePlusExtension from fenced_code_plus.fenced_code_plus import makeExtension
from fenced_code_plus import FencedCodePlusExtension from fenced_code_plus import makeExtension Make import compatable with python3.5from __future__ import absolute_import from fenced_code_plus.fenced_code_plus import FencedCodePlusExtension from fenced_code_plus.fenced_code_plus import makeExtension
<commit_before>from fenced_code_plus import FencedCodePlusExtension from fenced_code_plus import makeExtension <commit_msg>Make import compatable with python3.5<commit_after>from __future__ import absolute_import from fenced_code_plus.fenced_code_plus import FencedCodePlusExtension from fenced_code_plus.fenced_code_pl...
8b127a3d934470aa20fbff83d06ded2e37d00579
deferrable/delay.py
deferrable/delay.py
"""This may seem like a silly module right now, but we had to separate this out so that deferrable.py and its sub-modules could all import it without circular imports.""" MAXIMUM_DELAY_SECONDS = 900
"""This may seem like a silly module right now, but we had to separate this out so that deferrable.py and its sub-modules could all import it without circular imports.""" # SQS has a hard limit of 900 seconds, and Dockets # delay queues incur heavy performance penalties, # so this seems like a reasonable limit for all...
Add back some reasoning on the 900 number
Add back some reasoning on the 900 number
Python
mit
gamechanger/deferrable
"""This may seem like a silly module right now, but we had to separate this out so that deferrable.py and its sub-modules could all import it without circular imports.""" MAXIMUM_DELAY_SECONDS = 900 Add back some reasoning on the 900 number
"""This may seem like a silly module right now, but we had to separate this out so that deferrable.py and its sub-modules could all import it without circular imports.""" # SQS has a hard limit of 900 seconds, and Dockets # delay queues incur heavy performance penalties, # so this seems like a reasonable limit for all...
<commit_before>"""This may seem like a silly module right now, but we had to separate this out so that deferrable.py and its sub-modules could all import it without circular imports.""" MAXIMUM_DELAY_SECONDS = 900 <commit_msg>Add back some reasoning on the 900 number<commit_after>
"""This may seem like a silly module right now, but we had to separate this out so that deferrable.py and its sub-modules could all import it without circular imports.""" # SQS has a hard limit of 900 seconds, and Dockets # delay queues incur heavy performance penalties, # so this seems like a reasonable limit for all...
"""This may seem like a silly module right now, but we had to separate this out so that deferrable.py and its sub-modules could all import it without circular imports.""" MAXIMUM_DELAY_SECONDS = 900 Add back some reasoning on the 900 number"""This may seem like a silly module right now, but we had to separate this out...
<commit_before>"""This may seem like a silly module right now, but we had to separate this out so that deferrable.py and its sub-modules could all import it without circular imports.""" MAXIMUM_DELAY_SECONDS = 900 <commit_msg>Add back some reasoning on the 900 number<commit_after>"""This may seem like a silly module r...
e2909520e93e85286bd4393426377e48db243615
hastexo_social_auth/oauth2.py
hastexo_social_auth/oauth2.py
from social.backends.oauth import BaseOAuth2 class HastexoOAuth2(BaseOAuth2): """Hastexo OAuth2 authentication backend""" name = 'hastexo' AUTHORIZATION_URL = 'https://store.hastexo.com/o/authorize/' ACCESS_TOKEN_URL = 'https://store.hastexo.com/o/token/' ACCESS_TOKEN_METHOD = 'POST' SCOPE_SE...
from social.backends.oauth import BaseOAuth2 class HastexoOAuth2(BaseOAuth2): """Hastexo OAuth2 authentication backend""" name = 'hastexo' AUTHORIZATION_URL = 'https://store.hastexo.com/o/authorize/' ACCESS_TOKEN_URL = 'https://store.hastexo.com/o/token/' ACCESS_TOKEN_METHOD = 'POST' SCOPE_SE...
Update user details API call
Update user details API call
Python
bsd-3-clause
hastexo/python-social-auth-hastexo,arbrandes/python-social-auth-hastexo
from social.backends.oauth import BaseOAuth2 class HastexoOAuth2(BaseOAuth2): """Hastexo OAuth2 authentication backend""" name = 'hastexo' AUTHORIZATION_URL = 'https://store.hastexo.com/o/authorize/' ACCESS_TOKEN_URL = 'https://store.hastexo.com/o/token/' ACCESS_TOKEN_METHOD = 'POST' SCOPE_SE...
from social.backends.oauth import BaseOAuth2 class HastexoOAuth2(BaseOAuth2): """Hastexo OAuth2 authentication backend""" name = 'hastexo' AUTHORIZATION_URL = 'https://store.hastexo.com/o/authorize/' ACCESS_TOKEN_URL = 'https://store.hastexo.com/o/token/' ACCESS_TOKEN_METHOD = 'POST' SCOPE_SE...
<commit_before>from social.backends.oauth import BaseOAuth2 class HastexoOAuth2(BaseOAuth2): """Hastexo OAuth2 authentication backend""" name = 'hastexo' AUTHORIZATION_URL = 'https://store.hastexo.com/o/authorize/' ACCESS_TOKEN_URL = 'https://store.hastexo.com/o/token/' ACCESS_TOKEN_METHOD = 'POS...
from social.backends.oauth import BaseOAuth2 class HastexoOAuth2(BaseOAuth2): """Hastexo OAuth2 authentication backend""" name = 'hastexo' AUTHORIZATION_URL = 'https://store.hastexo.com/o/authorize/' ACCESS_TOKEN_URL = 'https://store.hastexo.com/o/token/' ACCESS_TOKEN_METHOD = 'POST' SCOPE_SE...
from social.backends.oauth import BaseOAuth2 class HastexoOAuth2(BaseOAuth2): """Hastexo OAuth2 authentication backend""" name = 'hastexo' AUTHORIZATION_URL = 'https://store.hastexo.com/o/authorize/' ACCESS_TOKEN_URL = 'https://store.hastexo.com/o/token/' ACCESS_TOKEN_METHOD = 'POST' SCOPE_SE...
<commit_before>from social.backends.oauth import BaseOAuth2 class HastexoOAuth2(BaseOAuth2): """Hastexo OAuth2 authentication backend""" name = 'hastexo' AUTHORIZATION_URL = 'https://store.hastexo.com/o/authorize/' ACCESS_TOKEN_URL = 'https://store.hastexo.com/o/token/' ACCESS_TOKEN_METHOD = 'POS...
52cb80dd92ceabd7d2efe67c0a89f76cd701283b
statirator/main.py
statirator/main.py
import os import sys def main(): # init is a special case, cause we want to add statirator.core to # INSTALLED_APPS, and have the command picked up. we'll handle it in here if 'init' in sys.argv: from django.conf import settings settings.configure(INSTALLED_APPS=('statirator.core', )) ...
import os import sys def main(): if 'test' in sys.argv: os.environ.setdefault( "DJANGO_SETTINGS_MODULE", "statirator.test_settings") else: from django.conf import settings settings.configure(INSTALLED_APPS=('statirator.core', )) from django.core import management m...
Add statirator.core for all commands except test
Add statirator.core for all commands except test
Python
mit
MeirKriheli/statirator,MeirKriheli/statirator,MeirKriheli/statirator
import os import sys def main(): # init is a special case, cause we want to add statirator.core to # INSTALLED_APPS, and have the command picked up. we'll handle it in here if 'init' in sys.argv: from django.conf import settings settings.configure(INSTALLED_APPS=('statirator.core', )) ...
import os import sys def main(): if 'test' in sys.argv: os.environ.setdefault( "DJANGO_SETTINGS_MODULE", "statirator.test_settings") else: from django.conf import settings settings.configure(INSTALLED_APPS=('statirator.core', )) from django.core import management m...
<commit_before>import os import sys def main(): # init is a special case, cause we want to add statirator.core to # INSTALLED_APPS, and have the command picked up. we'll handle it in here if 'init' in sys.argv: from django.conf import settings settings.configure(INSTALLED_APPS=('statirato...
import os import sys def main(): if 'test' in sys.argv: os.environ.setdefault( "DJANGO_SETTINGS_MODULE", "statirator.test_settings") else: from django.conf import settings settings.configure(INSTALLED_APPS=('statirator.core', )) from django.core import management m...
import os import sys def main(): # init is a special case, cause we want to add statirator.core to # INSTALLED_APPS, and have the command picked up. we'll handle it in here if 'init' in sys.argv: from django.conf import settings settings.configure(INSTALLED_APPS=('statirator.core', )) ...
<commit_before>import os import sys def main(): # init is a special case, cause we want to add statirator.core to # INSTALLED_APPS, and have the command picked up. we'll handle it in here if 'init' in sys.argv: from django.conf import settings settings.configure(INSTALLED_APPS=('statirato...
c7ec2805d1c3dde9ff3bf8caacf0bac474a1d468
cybox/utils.py
cybox/utils.py
#Common utility methods #Test if a dictionary value is not None and has a length greater than 0 def test_value(value): if value.get('value') is not None: if value.get('value') is not None and len(str(value.get('value'))) > 0: return True else: return False else: ...
"""Common utility methods""" def test_value(value): """ Test if a dictionary contains a "value" key whose value is not None and has a length greater than 0. We explicitly want to return True even if the value is False or 0, since some parts of the standards are boolean or allow a 0 value, and we w...
Clean up and document 'test_value' function.
Clean up and document 'test_value' function.
Python
bsd-3-clause
CybOXProject/python-cybox
#Common utility methods #Test if a dictionary value is not None and has a length greater than 0 def test_value(value): if value.get('value') is not None: if value.get('value') is not None and len(str(value.get('value'))) > 0: return True else: return False else: ...
"""Common utility methods""" def test_value(value): """ Test if a dictionary contains a "value" key whose value is not None and has a length greater than 0. We explicitly want to return True even if the value is False or 0, since some parts of the standards are boolean or allow a 0 value, and we w...
<commit_before>#Common utility methods #Test if a dictionary value is not None and has a length greater than 0 def test_value(value): if value.get('value') is not None: if value.get('value') is not None and len(str(value.get('value'))) > 0: return True else: return False ...
"""Common utility methods""" def test_value(value): """ Test if a dictionary contains a "value" key whose value is not None and has a length greater than 0. We explicitly want to return True even if the value is False or 0, since some parts of the standards are boolean or allow a 0 value, and we w...
#Common utility methods #Test if a dictionary value is not None and has a length greater than 0 def test_value(value): if value.get('value') is not None: if value.get('value') is not None and len(str(value.get('value'))) > 0: return True else: return False else: ...
<commit_before>#Common utility methods #Test if a dictionary value is not None and has a length greater than 0 def test_value(value): if value.get('value') is not None: if value.get('value') is not None and len(str(value.get('value'))) > 0: return True else: return False ...
1e690994c89b61f3331f6ccacff1dbc822a224a1
homedisplay/display/views.py
homedisplay/display/views.py
from django.http import HttpResponseRedirect, HttpResponse, Http404 from django.shortcuts import render_to_response from django.template import RequestContext from django.views.generic import View from homedisplay.utils import publish_ws class Wrapped(View): def get(self, request, *args, **kwargs): return ...
from django.http import HttpResponseRedirect, HttpResponse, Http404 from django.shortcuts import render_to_response from django.template import RequestContext from django.views.generic import View from homedisplay.utils import publish_ws class Wrapped(View): def get(self, request, *args, **kwargs): return ...
Use renamed frame template file
Use renamed frame template file
Python
bsd-3-clause
ojarva/home-info-display,ojarva/home-info-display,ojarva/home-info-display,ojarva/home-info-display
from django.http import HttpResponseRedirect, HttpResponse, Http404 from django.shortcuts import render_to_response from django.template import RequestContext from django.views.generic import View from homedisplay.utils import publish_ws class Wrapped(View): def get(self, request, *args, **kwargs): return ...
from django.http import HttpResponseRedirect, HttpResponse, Http404 from django.shortcuts import render_to_response from django.template import RequestContext from django.views.generic import View from homedisplay.utils import publish_ws class Wrapped(View): def get(self, request, *args, **kwargs): return ...
<commit_before>from django.http import HttpResponseRedirect, HttpResponse, Http404 from django.shortcuts import render_to_response from django.template import RequestContext from django.views.generic import View from homedisplay.utils import publish_ws class Wrapped(View): def get(self, request, *args, **kwargs): ...
from django.http import HttpResponseRedirect, HttpResponse, Http404 from django.shortcuts import render_to_response from django.template import RequestContext from django.views.generic import View from homedisplay.utils import publish_ws class Wrapped(View): def get(self, request, *args, **kwargs): return ...
from django.http import HttpResponseRedirect, HttpResponse, Http404 from django.shortcuts import render_to_response from django.template import RequestContext from django.views.generic import View from homedisplay.utils import publish_ws class Wrapped(View): def get(self, request, *args, **kwargs): return ...
<commit_before>from django.http import HttpResponseRedirect, HttpResponse, Http404 from django.shortcuts import render_to_response from django.template import RequestContext from django.views.generic import View from homedisplay.utils import publish_ws class Wrapped(View): def get(self, request, *args, **kwargs): ...
7cf32e0300735af93dfe0d90ac1e9c20adbc5cf5
tests/b009_b010.py
tests/b009_b010.py
""" Should emit: B009 - Line 17, 18, 19 B010 - Line 28, 29, 30 """ # Valid getattr usage getattr(foo, bar) getattr(foo, "bar", None) getattr(foo, "bar{foo}".format(foo="a"), None) getattr(foo, "bar{foo}".format(foo="a")) getattr(foo, bar, None) getattr(foo, "123abc") getattr(foo, "except") # Invalid usage getattr(foo...
""" Should emit: B009 - Line 17, 18, 19 B010 - Line 28, 29, 30 """ # Valid getattr usage getattr(foo, bar) getattr(foo, "bar", None) getattr(foo, "bar{foo}".format(foo="a"), None) getattr(foo, "bar{foo}".format(foo="a")) getattr(foo, bar, None) getattr(foo, "123abc") getattr(foo, "except") # Invalid usage getattr(foo...
Fix wrong call method in test (GH-179)
Fix wrong call method in test (GH-179)
Python
mit
ambv/flake8-bugbear,PyCQA/flake8-bugbear
""" Should emit: B009 - Line 17, 18, 19 B010 - Line 28, 29, 30 """ # Valid getattr usage getattr(foo, bar) getattr(foo, "bar", None) getattr(foo, "bar{foo}".format(foo="a"), None) getattr(foo, "bar{foo}".format(foo="a")) getattr(foo, bar, None) getattr(foo, "123abc") getattr(foo, "except") # Invalid usage getattr(foo...
""" Should emit: B009 - Line 17, 18, 19 B010 - Line 28, 29, 30 """ # Valid getattr usage getattr(foo, bar) getattr(foo, "bar", None) getattr(foo, "bar{foo}".format(foo="a"), None) getattr(foo, "bar{foo}".format(foo="a")) getattr(foo, bar, None) getattr(foo, "123abc") getattr(foo, "except") # Invalid usage getattr(foo...
<commit_before>""" Should emit: B009 - Line 17, 18, 19 B010 - Line 28, 29, 30 """ # Valid getattr usage getattr(foo, bar) getattr(foo, "bar", None) getattr(foo, "bar{foo}".format(foo="a"), None) getattr(foo, "bar{foo}".format(foo="a")) getattr(foo, bar, None) getattr(foo, "123abc") getattr(foo, "except") # Invalid us...
""" Should emit: B009 - Line 17, 18, 19 B010 - Line 28, 29, 30 """ # Valid getattr usage getattr(foo, bar) getattr(foo, "bar", None) getattr(foo, "bar{foo}".format(foo="a"), None) getattr(foo, "bar{foo}".format(foo="a")) getattr(foo, bar, None) getattr(foo, "123abc") getattr(foo, "except") # Invalid usage getattr(foo...
""" Should emit: B009 - Line 17, 18, 19 B010 - Line 28, 29, 30 """ # Valid getattr usage getattr(foo, bar) getattr(foo, "bar", None) getattr(foo, "bar{foo}".format(foo="a"), None) getattr(foo, "bar{foo}".format(foo="a")) getattr(foo, bar, None) getattr(foo, "123abc") getattr(foo, "except") # Invalid usage getattr(foo...
<commit_before>""" Should emit: B009 - Line 17, 18, 19 B010 - Line 28, 29, 30 """ # Valid getattr usage getattr(foo, bar) getattr(foo, "bar", None) getattr(foo, "bar{foo}".format(foo="a"), None) getattr(foo, "bar{foo}".format(foo="a")) getattr(foo, bar, None) getattr(foo, "123abc") getattr(foo, "except") # Invalid us...
3fc94b4cffcfd08b439386fb2b01aa1e12fec6d5
iati/core/tests/test_data.py
iati/core/tests/test_data.py
"""A module containing tests for the library representation of IATI data.""" import iati.core.data class TestDatasets(object): """A container for tests relating to Datasets""" pass
"""A module containing tests for the library representation of IATI data.""" import iati.core.data class TestDatasets(object): """A container for tests relating to Datasets""" def test_dataset_no_params(self): """Test Dataset creation with no parameters.""" pass def test_dataset_valid_xm...
Test stubs for dataset creation
Test stubs for dataset creation
Python
mit
IATI/iati.core,IATI/iati.core
"""A module containing tests for the library representation of IATI data.""" import iati.core.data class TestDatasets(object): """A container for tests relating to Datasets""" pass Test stubs for dataset creation
"""A module containing tests for the library representation of IATI data.""" import iati.core.data class TestDatasets(object): """A container for tests relating to Datasets""" def test_dataset_no_params(self): """Test Dataset creation with no parameters.""" pass def test_dataset_valid_xm...
<commit_before>"""A module containing tests for the library representation of IATI data.""" import iati.core.data class TestDatasets(object): """A container for tests relating to Datasets""" pass <commit_msg>Test stubs for dataset creation<commit_after>
"""A module containing tests for the library representation of IATI data.""" import iati.core.data class TestDatasets(object): """A container for tests relating to Datasets""" def test_dataset_no_params(self): """Test Dataset creation with no parameters.""" pass def test_dataset_valid_xm...
"""A module containing tests for the library representation of IATI data.""" import iati.core.data class TestDatasets(object): """A container for tests relating to Datasets""" pass Test stubs for dataset creation"""A module containing tests for the library representation of IATI data.""" import iati.core.dat...
<commit_before>"""A module containing tests for the library representation of IATI data.""" import iati.core.data class TestDatasets(object): """A container for tests relating to Datasets""" pass <commit_msg>Test stubs for dataset creation<commit_after>"""A module containing tests for the library representat...
7f3476ec37fcea4195f1a180c1515fd321d78697
tests/run_tests.py
tests/run_tests.py
#!/usr/bin/env python # -*- coding: utf-8 -*- import os import sys import nose import logging logging.disable(logging.DEBUG) # Disable debug logging when running the test suite. def start(argv=None): sys.exitfunc = lambda: sys.stderr.write('Shutting down...\n') if argv is None: argv = [ ...
#!/usr/bin/env python # -*- coding: utf-8 -*- import os import sys import nose import logging logging.disable(logging.INFO) # Disable debug logging when running the test suite. def start(argv=None): sys.exitfunc = lambda: sys.stderr.write('Shutting down...\n') if argv is None: argv = [ ...
Disable INFO messages and down when running test suite
Disable INFO messages and down when running test suite
Python
mit
inonit/django-chemtrails,inonit/django-chemtrails,inonit/django-chemtrails
#!/usr/bin/env python # -*- coding: utf-8 -*- import os import sys import nose import logging logging.disable(logging.DEBUG) # Disable debug logging when running the test suite. def start(argv=None): sys.exitfunc = lambda: sys.stderr.write('Shutting down...\n') if argv is None: argv = [ ...
#!/usr/bin/env python # -*- coding: utf-8 -*- import os import sys import nose import logging logging.disable(logging.INFO) # Disable debug logging when running the test suite. def start(argv=None): sys.exitfunc = lambda: sys.stderr.write('Shutting down...\n') if argv is None: argv = [ ...
<commit_before>#!/usr/bin/env python # -*- coding: utf-8 -*- import os import sys import nose import logging logging.disable(logging.DEBUG) # Disable debug logging when running the test suite. def start(argv=None): sys.exitfunc = lambda: sys.stderr.write('Shutting down...\n') if argv is None: argv...
#!/usr/bin/env python # -*- coding: utf-8 -*- import os import sys import nose import logging logging.disable(logging.INFO) # Disable debug logging when running the test suite. def start(argv=None): sys.exitfunc = lambda: sys.stderr.write('Shutting down...\n') if argv is None: argv = [ ...
#!/usr/bin/env python # -*- coding: utf-8 -*- import os import sys import nose import logging logging.disable(logging.DEBUG) # Disable debug logging when running the test suite. def start(argv=None): sys.exitfunc = lambda: sys.stderr.write('Shutting down...\n') if argv is None: argv = [ ...
<commit_before>#!/usr/bin/env python # -*- coding: utf-8 -*- import os import sys import nose import logging logging.disable(logging.DEBUG) # Disable debug logging when running the test suite. def start(argv=None): sys.exitfunc = lambda: sys.stderr.write('Shutting down...\n') if argv is None: argv...
da314ab34cb13c1de66b96da2eab1484639e124b
fiona/compat.py
fiona/compat.py
try: from collections import OrderedDict except ImportError: from ordereddict import OrderedDict
import collections from six.moves import UserDict try: from collections import OrderedDict except ImportError: from ordereddict import OrderedDict # Users can pass in objects that subclass a few different objects # More specifically, rasterio has a CRS() class that subclasses UserDict() # In Python 2 User...
Add a DICT_TYPES variable so we can do isinstance() checks against all the builtin dict-like objects
Add a DICT_TYPES variable so we can do isinstance() checks against all the builtin dict-like objects
Python
bsd-3-clause
Toblerity/Fiona,rbuffat/Fiona,rbuffat/Fiona,Toblerity/Fiona
try: from collections import OrderedDict except ImportError: from ordereddict import OrderedDict Add a DICT_TYPES variable so we can do isinstance() checks against all the builtin dict-like objects
import collections from six.moves import UserDict try: from collections import OrderedDict except ImportError: from ordereddict import OrderedDict # Users can pass in objects that subclass a few different objects # More specifically, rasterio has a CRS() class that subclasses UserDict() # In Python 2 User...
<commit_before>try: from collections import OrderedDict except ImportError: from ordereddict import OrderedDict <commit_msg>Add a DICT_TYPES variable so we can do isinstance() checks against all the builtin dict-like objects<commit_after>
import collections from six.moves import UserDict try: from collections import OrderedDict except ImportError: from ordereddict import OrderedDict # Users can pass in objects that subclass a few different objects # More specifically, rasterio has a CRS() class that subclasses UserDict() # In Python 2 User...
try: from collections import OrderedDict except ImportError: from ordereddict import OrderedDict Add a DICT_TYPES variable so we can do isinstance() checks against all the builtin dict-like objectsimport collections from six.moves import UserDict try: from collections import OrderedDict except ImportErr...
<commit_before>try: from collections import OrderedDict except ImportError: from ordereddict import OrderedDict <commit_msg>Add a DICT_TYPES variable so we can do isinstance() checks against all the builtin dict-like objects<commit_after>import collections from six.moves import UserDict try: from collec...
1c2a981e007b9a205db1302370dff6a6ea15bf8c
iati/versions.py
iati/versions.py
"""A module containing components that describe the IATI Standard itself (rather than the parts it is made up of).""" import re import iati.constants class Version(object): """Representation of an IATI Standard Version Number.""" def __init__(self, version_string): """Initialise a Version Number. ...
"""A module containing components that describe the IATI Standard itself (rather than the parts it is made up of).""" import re import iati.constants class Version(object): """Representation of an IATI Standard Version Number.""" def __init__(self, version_string): """Initialise a Version Number. ...
Add a comment to make some sense of a regex
Add a comment to make some sense of a regex
Python
mit
IATI/iati.core,IATI/iati.core
"""A module containing components that describe the IATI Standard itself (rather than the parts it is made up of).""" import re import iati.constants class Version(object): """Representation of an IATI Standard Version Number.""" def __init__(self, version_string): """Initialise a Version Number. ...
"""A module containing components that describe the IATI Standard itself (rather than the parts it is made up of).""" import re import iati.constants class Version(object): """Representation of an IATI Standard Version Number.""" def __init__(self, version_string): """Initialise a Version Number. ...
<commit_before>"""A module containing components that describe the IATI Standard itself (rather than the parts it is made up of).""" import re import iati.constants class Version(object): """Representation of an IATI Standard Version Number.""" def __init__(self, version_string): """Initialise a Vers...
"""A module containing components that describe the IATI Standard itself (rather than the parts it is made up of).""" import re import iati.constants class Version(object): """Representation of an IATI Standard Version Number.""" def __init__(self, version_string): """Initialise a Version Number. ...
"""A module containing components that describe the IATI Standard itself (rather than the parts it is made up of).""" import re import iati.constants class Version(object): """Representation of an IATI Standard Version Number.""" def __init__(self, version_string): """Initialise a Version Number. ...
<commit_before>"""A module containing components that describe the IATI Standard itself (rather than the parts it is made up of).""" import re import iati.constants class Version(object): """Representation of an IATI Standard Version Number.""" def __init__(self, version_string): """Initialise a Vers...
0ab048e8363a60d47ba780cb622a72343aaf65f2
tests/test_urls.py
tests/test_urls.py
# -*- coding: utf-8 -*- from django.conf.urls import include, url from django.contrib import admin from django.http.response import HttpResponse admin.autodiscover() def empty_view(request): return HttpResponse() urlpatterns = [ url(r'^home/', empty_view, name="home"), url(r'^admin/', admin.site.urls)...
# -*- coding: utf-8 -*- from django.conf.urls import include, url from django.contrib import admin from django.http.response import HttpResponse admin.autodiscover() def empty_view(request): return HttpResponse() urlpatterns = [ url(r'^home/', empty_view, name="home"), url(r'^admin/', admin.site.urls)...
Remove useless url from test urls
Remove useless url from test urls
Python
mit
pydanny/dj-stripe,kavdev/dj-stripe,dj-stripe/dj-stripe,kavdev/dj-stripe,pydanny/dj-stripe,dj-stripe/dj-stripe
# -*- coding: utf-8 -*- from django.conf.urls import include, url from django.contrib import admin from django.http.response import HttpResponse admin.autodiscover() def empty_view(request): return HttpResponse() urlpatterns = [ url(r'^home/', empty_view, name="home"), url(r'^admin/', admin.site.urls)...
# -*- coding: utf-8 -*- from django.conf.urls import include, url from django.contrib import admin from django.http.response import HttpResponse admin.autodiscover() def empty_view(request): return HttpResponse() urlpatterns = [ url(r'^home/', empty_view, name="home"), url(r'^admin/', admin.site.urls)...
<commit_before># -*- coding: utf-8 -*- from django.conf.urls import include, url from django.contrib import admin from django.http.response import HttpResponse admin.autodiscover() def empty_view(request): return HttpResponse() urlpatterns = [ url(r'^home/', empty_view, name="home"), url(r'^admin/', a...
# -*- coding: utf-8 -*- from django.conf.urls import include, url from django.contrib import admin from django.http.response import HttpResponse admin.autodiscover() def empty_view(request): return HttpResponse() urlpatterns = [ url(r'^home/', empty_view, name="home"), url(r'^admin/', admin.site.urls)...
# -*- coding: utf-8 -*- from django.conf.urls import include, url from django.contrib import admin from django.http.response import HttpResponse admin.autodiscover() def empty_view(request): return HttpResponse() urlpatterns = [ url(r'^home/', empty_view, name="home"), url(r'^admin/', admin.site.urls)...
<commit_before># -*- coding: utf-8 -*- from django.conf.urls import include, url from django.contrib import admin from django.http.response import HttpResponse admin.autodiscover() def empty_view(request): return HttpResponse() urlpatterns = [ url(r'^home/', empty_view, name="home"), url(r'^admin/', a...
305d04fc0841035bf744480261017c14ae3045b0
syntax_makefile.py
syntax_makefile.py
import wx.stc ident = "makefile" name = "Makefile" extensions = ["Makefile", "*.mk"] lexer = wx.stc.STC_LEX_MAKEFILE indent = 8 use_tabs = True stylespecs = ( (wx.stc.STC_STYLE_DEFAULT, ""), ) keywords = ""
import wx.stc ident = "makefile" name = "Makefile" extensions = ["*Makefile", "*makefile", "*.mk"] lexer = wx.stc.STC_LEX_MAKEFILE indent = 8 use_tabs = True stylespecs = ( (wx.stc.STC_STYLE_DEFAULT, ""), ) keywords = ""
Make files ending in makefile or Makefile.
Make files ending in makefile or Makefile.
Python
mit
shaurz/devo
import wx.stc ident = "makefile" name = "Makefile" extensions = ["Makefile", "*.mk"] lexer = wx.stc.STC_LEX_MAKEFILE indent = 8 use_tabs = True stylespecs = ( (wx.stc.STC_STYLE_DEFAULT, ""), ) keywords = "" Make files ending in makefile or Makefile.
import wx.stc ident = "makefile" name = "Makefile" extensions = ["*Makefile", "*makefile", "*.mk"] lexer = wx.stc.STC_LEX_MAKEFILE indent = 8 use_tabs = True stylespecs = ( (wx.stc.STC_STYLE_DEFAULT, ""), ) keywords = ""
<commit_before>import wx.stc ident = "makefile" name = "Makefile" extensions = ["Makefile", "*.mk"] lexer = wx.stc.STC_LEX_MAKEFILE indent = 8 use_tabs = True stylespecs = ( (wx.stc.STC_STYLE_DEFAULT, ""), ) keywords = "" <commit_msg>Make files ending in makefile or Makefile.<commit_after>
import wx.stc ident = "makefile" name = "Makefile" extensions = ["*Makefile", "*makefile", "*.mk"] lexer = wx.stc.STC_LEX_MAKEFILE indent = 8 use_tabs = True stylespecs = ( (wx.stc.STC_STYLE_DEFAULT, ""), ) keywords = ""
import wx.stc ident = "makefile" name = "Makefile" extensions = ["Makefile", "*.mk"] lexer = wx.stc.STC_LEX_MAKEFILE indent = 8 use_tabs = True stylespecs = ( (wx.stc.STC_STYLE_DEFAULT, ""), ) keywords = "" Make files ending in makefile or Makefile.import wx.stc ident = "makefile" name = "Makefile" extension...
<commit_before>import wx.stc ident = "makefile" name = "Makefile" extensions = ["Makefile", "*.mk"] lexer = wx.stc.STC_LEX_MAKEFILE indent = 8 use_tabs = True stylespecs = ( (wx.stc.STC_STYLE_DEFAULT, ""), ) keywords = "" <commit_msg>Make files ending in makefile or Makefile.<commit_after>import wx.stc ident...
19ac41a14875c6df2ed9ddf7b7b315ffb5c70819
tests/specs/test_yaml_file.py
tests/specs/test_yaml_file.py
import unittest try: from unittest import mock except ImportError: import mock from conda_env import env from conda_env.specs.yaml_file import YamlFileSpec class TestYAMLFile(unittest.TestCase): def test_no_environment_file(self): spec = YamlFileSpec(name=None, filename='not-a-file') self...
import unittest import random try: from unittest import mock except ImportError: import mock from conda_env import env from conda_env.specs.yaml_file import YamlFileSpec class TestYAMLFile(unittest.TestCase): def test_no_environment_file(self): spec = YamlFileSpec(name=None, filename='not-a-file'...
Add more tests to YamlFile class
Add more tests to YamlFile class
Python
bsd-3-clause
ESSS/conda-env,phobson/conda-env,conda/conda-env,asmeurer/conda-env,conda/conda-env,mikecroucher/conda-env,isaac-kit/conda-env,ESSS/conda-env,isaac-kit/conda-env,dan-blanchard/conda-env,phobson/conda-env,nicoddemus/conda-env,dan-blanchard/conda-env,asmeurer/conda-env,nicoddemus/conda-env,mikecroucher/conda-env
import unittest try: from unittest import mock except ImportError: import mock from conda_env import env from conda_env.specs.yaml_file import YamlFileSpec class TestYAMLFile(unittest.TestCase): def test_no_environment_file(self): spec = YamlFileSpec(name=None, filename='not-a-file') self...
import unittest import random try: from unittest import mock except ImportError: import mock from conda_env import env from conda_env.specs.yaml_file import YamlFileSpec class TestYAMLFile(unittest.TestCase): def test_no_environment_file(self): spec = YamlFileSpec(name=None, filename='not-a-file'...
<commit_before>import unittest try: from unittest import mock except ImportError: import mock from conda_env import env from conda_env.specs.yaml_file import YamlFileSpec class TestYAMLFile(unittest.TestCase): def test_no_environment_file(self): spec = YamlFileSpec(name=None, filename='not-a-file...
import unittest import random try: from unittest import mock except ImportError: import mock from conda_env import env from conda_env.specs.yaml_file import YamlFileSpec class TestYAMLFile(unittest.TestCase): def test_no_environment_file(self): spec = YamlFileSpec(name=None, filename='not-a-file'...
import unittest try: from unittest import mock except ImportError: import mock from conda_env import env from conda_env.specs.yaml_file import YamlFileSpec class TestYAMLFile(unittest.TestCase): def test_no_environment_file(self): spec = YamlFileSpec(name=None, filename='not-a-file') self...
<commit_before>import unittest try: from unittest import mock except ImportError: import mock from conda_env import env from conda_env.specs.yaml_file import YamlFileSpec class TestYAMLFile(unittest.TestCase): def test_no_environment_file(self): spec = YamlFileSpec(name=None, filename='not-a-file...
ecc3a9c90d20699c6f0bf18600cf9bd755b56d65
rollbar/contrib/fastapi/utils.py
rollbar/contrib/fastapi/utils.py
import logging log = logging.getLogger(__name__) class FastAPIVersionError(Exception): def __init__(self, version, reason=''): err_msg = f'FastAPI {version}+ is required' if reason: err_msg += f' {reason}' log.error(err_msg) return super().__init__(err_msg)
import functools import logging import fastapi log = logging.getLogger(__name__) class FastAPIVersionError(Exception): def __init__(self, version, reason=''): err_msg = f'FastAPI {version}+ is required' if reason: err_msg += f' {reason}' log.error(err_msg) return sup...
Add decorator to check minimum required FastAPI version
Add decorator to check minimum required FastAPI version
Python
mit
rollbar/pyrollbar
import logging log = logging.getLogger(__name__) class FastAPIVersionError(Exception): def __init__(self, version, reason=''): err_msg = f'FastAPI {version}+ is required' if reason: err_msg += f' {reason}' log.error(err_msg) return super().__init__(err_msg) Add decora...
import functools import logging import fastapi log = logging.getLogger(__name__) class FastAPIVersionError(Exception): def __init__(self, version, reason=''): err_msg = f'FastAPI {version}+ is required' if reason: err_msg += f' {reason}' log.error(err_msg) return sup...
<commit_before>import logging log = logging.getLogger(__name__) class FastAPIVersionError(Exception): def __init__(self, version, reason=''): err_msg = f'FastAPI {version}+ is required' if reason: err_msg += f' {reason}' log.error(err_msg) return super().__init__(err_...
import functools import logging import fastapi log = logging.getLogger(__name__) class FastAPIVersionError(Exception): def __init__(self, version, reason=''): err_msg = f'FastAPI {version}+ is required' if reason: err_msg += f' {reason}' log.error(err_msg) return sup...
import logging log = logging.getLogger(__name__) class FastAPIVersionError(Exception): def __init__(self, version, reason=''): err_msg = f'FastAPI {version}+ is required' if reason: err_msg += f' {reason}' log.error(err_msg) return super().__init__(err_msg) Add decora...
<commit_before>import logging log = logging.getLogger(__name__) class FastAPIVersionError(Exception): def __init__(self, version, reason=''): err_msg = f'FastAPI {version}+ is required' if reason: err_msg += f' {reason}' log.error(err_msg) return super().__init__(err_...
e895795c6461da12f4824994168893ff131c0dd9
runtests.py
runtests.py
import sys import django from django.conf import settings APP_NAME = 'impersonate' settings.configure( DEBUG=True, DATABASES={ 'default': { 'ENGINE': 'django.db.backends.sqlite3', } }, USE_TZ=True, ROOT_URLCONF='{0}.tests'.format(APP_NAME), MIDDLEWARE_CLASSES=( ...
import sys import django from django.conf import settings APP_NAME = 'impersonate' settings.configure( DEBUG=True, DATABASES={ 'default': { 'ENGINE': 'django.db.backends.sqlite3', } }, USE_TZ=True, ROOT_URLCONF='{0}.tests'.format(APP_NAME), MIDDLEWARE_CLASSES=( ...
Disable impersonation logging during testing
Disable impersonation logging during testing
Python
bsd-3-clause
Top20Talent/django-impersonate,Top20Talent/django-impersonate
import sys import django from django.conf import settings APP_NAME = 'impersonate' settings.configure( DEBUG=True, DATABASES={ 'default': { 'ENGINE': 'django.db.backends.sqlite3', } }, USE_TZ=True, ROOT_URLCONF='{0}.tests'.format(APP_NAME), MIDDLEWARE_CLASSES=( ...
import sys import django from django.conf import settings APP_NAME = 'impersonate' settings.configure( DEBUG=True, DATABASES={ 'default': { 'ENGINE': 'django.db.backends.sqlite3', } }, USE_TZ=True, ROOT_URLCONF='{0}.tests'.format(APP_NAME), MIDDLEWARE_CLASSES=( ...
<commit_before>import sys import django from django.conf import settings APP_NAME = 'impersonate' settings.configure( DEBUG=True, DATABASES={ 'default': { 'ENGINE': 'django.db.backends.sqlite3', } }, USE_TZ=True, ROOT_URLCONF='{0}.tests'.format(APP_NAME), MIDDLEWAR...
import sys import django from django.conf import settings APP_NAME = 'impersonate' settings.configure( DEBUG=True, DATABASES={ 'default': { 'ENGINE': 'django.db.backends.sqlite3', } }, USE_TZ=True, ROOT_URLCONF='{0}.tests'.format(APP_NAME), MIDDLEWARE_CLASSES=( ...
import sys import django from django.conf import settings APP_NAME = 'impersonate' settings.configure( DEBUG=True, DATABASES={ 'default': { 'ENGINE': 'django.db.backends.sqlite3', } }, USE_TZ=True, ROOT_URLCONF='{0}.tests'.format(APP_NAME), MIDDLEWARE_CLASSES=( ...
<commit_before>import sys import django from django.conf import settings APP_NAME = 'impersonate' settings.configure( DEBUG=True, DATABASES={ 'default': { 'ENGINE': 'django.db.backends.sqlite3', } }, USE_TZ=True, ROOT_URLCONF='{0}.tests'.format(APP_NAME), MIDDLEWAR...
8582126efa9907b06e9f9b183a0919feba9fb6b0
indra/literature/dart_client.py
indra/literature/dart_client.py
import logging import requests from indra.config import CONFIG_DICT logger = logging.getLogger(__name__) dart_uname = CONFIG_DICT['DART_WM_USERNAME'] dart_pwd = CONFIG_DICT['DART_WM_PASSWORD'] dart_url = 'https://indra-ingest-pipeline-rest-1.prod.dart.worldmodelers.com' \ '/dart/api/v1/readers/query' ...
import logging import requests from indra.config import get_config logger = logging.getLogger(__name__) dart_uname = get_config('DART_WM_USERNAME') dart_pwd = get_config('DART_WM_PASSWORD') dart_url = 'https://indra-ingest-pipeline-rest-1.prod.dart.worldmodelers.com' \ '/dart/api/v1/readers/query' de...
Use get_config instead of CONFIG_DICT
Use get_config instead of CONFIG_DICT
Python
bsd-2-clause
johnbachman/indra,johnbachman/belpy,johnbachman/belpy,sorgerlab/belpy,bgyori/indra,sorgerlab/belpy,johnbachman/indra,johnbachman/belpy,bgyori/indra,bgyori/indra,sorgerlab/indra,sorgerlab/indra,sorgerlab/indra,sorgerlab/belpy,johnbachman/indra
import logging import requests from indra.config import CONFIG_DICT logger = logging.getLogger(__name__) dart_uname = CONFIG_DICT['DART_WM_USERNAME'] dart_pwd = CONFIG_DICT['DART_WM_PASSWORD'] dart_url = 'https://indra-ingest-pipeline-rest-1.prod.dart.worldmodelers.com' \ '/dart/api/v1/readers/query' ...
import logging import requests from indra.config import get_config logger = logging.getLogger(__name__) dart_uname = get_config('DART_WM_USERNAME') dart_pwd = get_config('DART_WM_PASSWORD') dart_url = 'https://indra-ingest-pipeline-rest-1.prod.dart.worldmodelers.com' \ '/dart/api/v1/readers/query' de...
<commit_before>import logging import requests from indra.config import CONFIG_DICT logger = logging.getLogger(__name__) dart_uname = CONFIG_DICT['DART_WM_USERNAME'] dart_pwd = CONFIG_DICT['DART_WM_PASSWORD'] dart_url = 'https://indra-ingest-pipeline-rest-1.prod.dart.worldmodelers.com' \ '/dart/api/v1/r...
import logging import requests from indra.config import get_config logger = logging.getLogger(__name__) dart_uname = get_config('DART_WM_USERNAME') dart_pwd = get_config('DART_WM_PASSWORD') dart_url = 'https://indra-ingest-pipeline-rest-1.prod.dart.worldmodelers.com' \ '/dart/api/v1/readers/query' de...
import logging import requests from indra.config import CONFIG_DICT logger = logging.getLogger(__name__) dart_uname = CONFIG_DICT['DART_WM_USERNAME'] dart_pwd = CONFIG_DICT['DART_WM_PASSWORD'] dart_url = 'https://indra-ingest-pipeline-rest-1.prod.dart.worldmodelers.com' \ '/dart/api/v1/readers/query' ...
<commit_before>import logging import requests from indra.config import CONFIG_DICT logger = logging.getLogger(__name__) dart_uname = CONFIG_DICT['DART_WM_USERNAME'] dart_pwd = CONFIG_DICT['DART_WM_PASSWORD'] dart_url = 'https://indra-ingest-pipeline-rest-1.prod.dart.worldmodelers.com' \ '/dart/api/v1/r...
33c595574921a64bec79de5ca72a62c22d09eb94
django_todolist/todo/models.py
django_todolist/todo/models.py
from django.db import models class Todo(models.Model): """ Todo Model: name, description, created """ name = models.CharField(max_length=100, unique=True) description = models.TextField() created = models.DateTimeField() def __unicode__(self): return self.name
from django.db import models from django.utils.encoding import python_2_unicode_compatible @python_2_unicode_compatible class Todo(models.Model): """ Todo Model: name, description, created """ name = models.CharField(max_length=100, unique=True) description = models.TextField() created = model...
Add Python portability to model
Add Python portability to model
Python
bsd-3-clause
andresgz/django_todolist,andresgz/django_todolist,andresgz/django_todolist,andresgz/django_todolist
from django.db import models class Todo(models.Model): """ Todo Model: name, description, created """ name = models.CharField(max_length=100, unique=True) description = models.TextField() created = models.DateTimeField() def __unicode__(self): return self.name Add Python portabili...
from django.db import models from django.utils.encoding import python_2_unicode_compatible @python_2_unicode_compatible class Todo(models.Model): """ Todo Model: name, description, created """ name = models.CharField(max_length=100, unique=True) description = models.TextField() created = model...
<commit_before>from django.db import models class Todo(models.Model): """ Todo Model: name, description, created """ name = models.CharField(max_length=100, unique=True) description = models.TextField() created = models.DateTimeField() def __unicode__(self): return self.name <comm...
from django.db import models from django.utils.encoding import python_2_unicode_compatible @python_2_unicode_compatible class Todo(models.Model): """ Todo Model: name, description, created """ name = models.CharField(max_length=100, unique=True) description = models.TextField() created = model...
from django.db import models class Todo(models.Model): """ Todo Model: name, description, created """ name = models.CharField(max_length=100, unique=True) description = models.TextField() created = models.DateTimeField() def __unicode__(self): return self.name Add Python portabili...
<commit_before>from django.db import models class Todo(models.Model): """ Todo Model: name, description, created """ name = models.CharField(max_length=100, unique=True) description = models.TextField() created = models.DateTimeField() def __unicode__(self): return self.name <comm...
16cca2bc9aa8d5ecf6eb4d829de00905d3d15759
conveyor/store.py
conveyor/store.py
class BaseStore(object): def set(self, key, value): raise NotImplementedError def get(self, key): raise NotImplementedError class InMemoryStore(BaseStore): def __init__(self, *args, **kwargs): super(InMemoryStore, self).__init__(*args, **kwargs) self._data = {} def...
class BaseStore(object): def set(self, key, value): raise NotImplementedError def get(self, key): raise NotImplementedError class InMemoryStore(BaseStore): def __init__(self, *args, **kwargs): super(InMemoryStore, self).__init__(*args, **kwargs) self._data = {} def...
Switch redis to use the from_url method
Switch redis to use the from_url method
Python
bsd-2-clause
crateio/carrier
class BaseStore(object): def set(self, key, value): raise NotImplementedError def get(self, key): raise NotImplementedError class InMemoryStore(BaseStore): def __init__(self, *args, **kwargs): super(InMemoryStore, self).__init__(*args, **kwargs) self._data = {} def...
class BaseStore(object): def set(self, key, value): raise NotImplementedError def get(self, key): raise NotImplementedError class InMemoryStore(BaseStore): def __init__(self, *args, **kwargs): super(InMemoryStore, self).__init__(*args, **kwargs) self._data = {} def...
<commit_before>class BaseStore(object): def set(self, key, value): raise NotImplementedError def get(self, key): raise NotImplementedError class InMemoryStore(BaseStore): def __init__(self, *args, **kwargs): super(InMemoryStore, self).__init__(*args, **kwargs) self._dat...
class BaseStore(object): def set(self, key, value): raise NotImplementedError def get(self, key): raise NotImplementedError class InMemoryStore(BaseStore): def __init__(self, *args, **kwargs): super(InMemoryStore, self).__init__(*args, **kwargs) self._data = {} def...
class BaseStore(object): def set(self, key, value): raise NotImplementedError def get(self, key): raise NotImplementedError class InMemoryStore(BaseStore): def __init__(self, *args, **kwargs): super(InMemoryStore, self).__init__(*args, **kwargs) self._data = {} def...
<commit_before>class BaseStore(object): def set(self, key, value): raise NotImplementedError def get(self, key): raise NotImplementedError class InMemoryStore(BaseStore): def __init__(self, *args, **kwargs): super(InMemoryStore, self).__init__(*args, **kwargs) self._dat...
ef42117ec2bd2a275dcea5f5a2d57322bbd21faa
wafer/talks/tests/fixtures.py
wafer/talks/tests/fixtures.py
from wafer.talks.models import Talk, TalkType from wafer.tests.utils import create_user def create_talk_type(name): """Create a talk type""" return TalkType.objects.create(name=name) def create_talk(title, status, username=None, user=None, talk_type=None): if username: user = create_user(usernam...
from wafer.talks.models import Talk, TalkType from wafer.tests.utils import create_user def create_talk_type(name): """Create a talk type""" return TalkType.objects.create(name=name) def create_talk(title, status, username=None, user=None, talk_type=None): if sum((user is None, username is None)) != 1: ...
Check that user OR username is specified
Check that user OR username is specified
Python
isc
CTPUG/wafer,CTPUG/wafer,CTPUG/wafer,CTPUG/wafer
from wafer.talks.models import Talk, TalkType from wafer.tests.utils import create_user def create_talk_type(name): """Create a talk type""" return TalkType.objects.create(name=name) def create_talk(title, status, username=None, user=None, talk_type=None): if username: user = create_user(usernam...
from wafer.talks.models import Talk, TalkType from wafer.tests.utils import create_user def create_talk_type(name): """Create a talk type""" return TalkType.objects.create(name=name) def create_talk(title, status, username=None, user=None, talk_type=None): if sum((user is None, username is None)) != 1: ...
<commit_before>from wafer.talks.models import Talk, TalkType from wafer.tests.utils import create_user def create_talk_type(name): """Create a talk type""" return TalkType.objects.create(name=name) def create_talk(title, status, username=None, user=None, talk_type=None): if username: user = crea...
from wafer.talks.models import Talk, TalkType from wafer.tests.utils import create_user def create_talk_type(name): """Create a talk type""" return TalkType.objects.create(name=name) def create_talk(title, status, username=None, user=None, talk_type=None): if sum((user is None, username is None)) != 1: ...
from wafer.talks.models import Talk, TalkType from wafer.tests.utils import create_user def create_talk_type(name): """Create a talk type""" return TalkType.objects.create(name=name) def create_talk(title, status, username=None, user=None, talk_type=None): if username: user = create_user(usernam...
<commit_before>from wafer.talks.models import Talk, TalkType from wafer.tests.utils import create_user def create_talk_type(name): """Create a talk type""" return TalkType.objects.create(name=name) def create_talk(title, status, username=None, user=None, talk_type=None): if username: user = crea...
2c41a2b37df94339074fdc04ccb3ef560d2e6cac
falmer/events/filters.py
falmer/events/filters.py
from django_filters import FilterSet, CharFilter, IsoDateTimeFilter, BooleanFilter, ModelChoiceFilter from falmer.events.models import Curator from . import models class EventFilterSet(FilterSet): class Meta: model = models.Event fields = ( 'title', 'venue', 't...
from django_filters import FilterSet, CharFilter, IsoDateTimeFilter, BooleanFilter, ModelChoiceFilter from falmer.events.models import Curator from . import models class EventFilterSet(FilterSet): class Meta: model = models.Event fields = ( 'title', 'venue', 't...
Use SG slug for event filtering
Use SG slug for event filtering
Python
mit
sussexstudent/falmer,sussexstudent/falmer,sussexstudent/falmer,sussexstudent/falmer
from django_filters import FilterSet, CharFilter, IsoDateTimeFilter, BooleanFilter, ModelChoiceFilter from falmer.events.models import Curator from . import models class EventFilterSet(FilterSet): class Meta: model = models.Event fields = ( 'title', 'venue', 't...
from django_filters import FilterSet, CharFilter, IsoDateTimeFilter, BooleanFilter, ModelChoiceFilter from falmer.events.models import Curator from . import models class EventFilterSet(FilterSet): class Meta: model = models.Event fields = ( 'title', 'venue', 't...
<commit_before>from django_filters import FilterSet, CharFilter, IsoDateTimeFilter, BooleanFilter, ModelChoiceFilter from falmer.events.models import Curator from . import models class EventFilterSet(FilterSet): class Meta: model = models.Event fields = ( 'title', 'venue',...
from django_filters import FilterSet, CharFilter, IsoDateTimeFilter, BooleanFilter, ModelChoiceFilter from falmer.events.models import Curator from . import models class EventFilterSet(FilterSet): class Meta: model = models.Event fields = ( 'title', 'venue', 't...
from django_filters import FilterSet, CharFilter, IsoDateTimeFilter, BooleanFilter, ModelChoiceFilter from falmer.events.models import Curator from . import models class EventFilterSet(FilterSet): class Meta: model = models.Event fields = ( 'title', 'venue', 't...
<commit_before>from django_filters import FilterSet, CharFilter, IsoDateTimeFilter, BooleanFilter, ModelChoiceFilter from falmer.events.models import Curator from . import models class EventFilterSet(FilterSet): class Meta: model = models.Event fields = ( 'title', 'venue',...
2e4e9ab2bab2e0a4bd00e10dcf115b1f96d1c714
modules/urlparser/__init__.py
modules/urlparser/__init__.py
from modules import * import re import urllib2 import traceback try: import simplejson as json except ImportError: import json from unidecode import unidecode from twitter import Twitter from bitly import Bitly from youtube import Youtube class Urlparser(Module): """Checks incoming messages for possible...
from modules import * import re import urllib2 import traceback try: import simplejson as json except ImportError: import json from unidecode import unidecode from twitter import Twitter from bitly import Bitly from youtube import Youtube class Urlparser(Module): """Checks incoming messages for possible...
Include url message when fail to run urlparser
Include url message when fail to run urlparser
Python
mit
billyvg/piebot
from modules import * import re import urllib2 import traceback try: import simplejson as json except ImportError: import json from unidecode import unidecode from twitter import Twitter from bitly import Bitly from youtube import Youtube class Urlparser(Module): """Checks incoming messages for possible...
from modules import * import re import urllib2 import traceback try: import simplejson as json except ImportError: import json from unidecode import unidecode from twitter import Twitter from bitly import Bitly from youtube import Youtube class Urlparser(Module): """Checks incoming messages for possible...
<commit_before>from modules import * import re import urllib2 import traceback try: import simplejson as json except ImportError: import json from unidecode import unidecode from twitter import Twitter from bitly import Bitly from youtube import Youtube class Urlparser(Module): """Checks incoming messag...
from modules import * import re import urllib2 import traceback try: import simplejson as json except ImportError: import json from unidecode import unidecode from twitter import Twitter from bitly import Bitly from youtube import Youtube class Urlparser(Module): """Checks incoming messages for possible...
from modules import * import re import urllib2 import traceback try: import simplejson as json except ImportError: import json from unidecode import unidecode from twitter import Twitter from bitly import Bitly from youtube import Youtube class Urlparser(Module): """Checks incoming messages for possible...
<commit_before>from modules import * import re import urllib2 import traceback try: import simplejson as json except ImportError: import json from unidecode import unidecode from twitter import Twitter from bitly import Bitly from youtube import Youtube class Urlparser(Module): """Checks incoming messag...
a6d49059851450c7ea527941600564cb3f48cc72
flask_profiler/storage/base.py
flask_profiler/storage/base.py
class BaseStorage(object): """docstring for BaseStorage""" def __init__(self): super(BaseStorage, self).__init__() def filter(self, criteria): raise Exception("Not implemneted Error") def getSummary(self, criteria): raise Exception("Not implemneted Error") def insert(sel...
class BaseStorage(object): """docstring for BaseStorage""" def __init__(self): super(BaseStorage, self).__init__() def filter(self, criteria): raise Exception("Not implemneted Error") def getSummary(self, criteria): raise Exception("Not implemneted Error") def insert(sel...
Add tuncate method to BaseStorage class
Add tuncate method to BaseStorage class This will provide an interface for supporting any new database, there by, making the code more robust.
Python
mit
muatik/flask-profiler
class BaseStorage(object): """docstring for BaseStorage""" def __init__(self): super(BaseStorage, self).__init__() def filter(self, criteria): raise Exception("Not implemneted Error") def getSummary(self, criteria): raise Exception("Not implemneted Error") def insert(sel...
class BaseStorage(object): """docstring for BaseStorage""" def __init__(self): super(BaseStorage, self).__init__() def filter(self, criteria): raise Exception("Not implemneted Error") def getSummary(self, criteria): raise Exception("Not implemneted Error") def insert(sel...
<commit_before> class BaseStorage(object): """docstring for BaseStorage""" def __init__(self): super(BaseStorage, self).__init__() def filter(self, criteria): raise Exception("Not implemneted Error") def getSummary(self, criteria): raise Exception("Not implemneted Error") ...
class BaseStorage(object): """docstring for BaseStorage""" def __init__(self): super(BaseStorage, self).__init__() def filter(self, criteria): raise Exception("Not implemneted Error") def getSummary(self, criteria): raise Exception("Not implemneted Error") def insert(sel...
class BaseStorage(object): """docstring for BaseStorage""" def __init__(self): super(BaseStorage, self).__init__() def filter(self, criteria): raise Exception("Not implemneted Error") def getSummary(self, criteria): raise Exception("Not implemneted Error") def insert(sel...
<commit_before> class BaseStorage(object): """docstring for BaseStorage""" def __init__(self): super(BaseStorage, self).__init__() def filter(self, criteria): raise Exception("Not implemneted Error") def getSummary(self, criteria): raise Exception("Not implemneted Error") ...
d7299fd931ae62cc661b48dbc84aa161a395f1fa
fermipy/__init__.py
fermipy/__init__.py
import os __version__ = "unknown" try: from version import get_git_version __version__ = get_git_version() except Exception as message: print(message) __author__ = "Matthew Wood" PACKAGE_ROOT = os.path.abspath(os.path.dirname(__file__)) PACKAGE_DATA = os.path.join(PACKAGE_ROOT,'data') os.environ['FERMIP...
from __future__ import absolute_import, division, print_function import os __version__ = "unknown" try: from .version import get_git_version __version__ = get_git_version() except Exception as message: print(message) __author__ = "Matthew Wood" PACKAGE_ROOT = os.path.abspath(os.path.dirname(__file__)) P...
Fix version module import for Python 3
Fix version module import for Python 3
Python
bsd-3-clause
jefemagril/fermipy,jefemagril/fermipy,jefemagril/fermipy,fermiPy/fermipy
import os __version__ = "unknown" try: from version import get_git_version __version__ = get_git_version() except Exception as message: print(message) __author__ = "Matthew Wood" PACKAGE_ROOT = os.path.abspath(os.path.dirname(__file__)) PACKAGE_DATA = os.path.join(PACKAGE_ROOT,'data') os.environ['FERMIP...
from __future__ import absolute_import, division, print_function import os __version__ = "unknown" try: from .version import get_git_version __version__ = get_git_version() except Exception as message: print(message) __author__ = "Matthew Wood" PACKAGE_ROOT = os.path.abspath(os.path.dirname(__file__)) P...
<commit_before>import os __version__ = "unknown" try: from version import get_git_version __version__ = get_git_version() except Exception as message: print(message) __author__ = "Matthew Wood" PACKAGE_ROOT = os.path.abspath(os.path.dirname(__file__)) PACKAGE_DATA = os.path.join(PACKAGE_ROOT,'data') os....
from __future__ import absolute_import, division, print_function import os __version__ = "unknown" try: from .version import get_git_version __version__ = get_git_version() except Exception as message: print(message) __author__ = "Matthew Wood" PACKAGE_ROOT = os.path.abspath(os.path.dirname(__file__)) P...
import os __version__ = "unknown" try: from version import get_git_version __version__ = get_git_version() except Exception as message: print(message) __author__ = "Matthew Wood" PACKAGE_ROOT = os.path.abspath(os.path.dirname(__file__)) PACKAGE_DATA = os.path.join(PACKAGE_ROOT,'data') os.environ['FERMIP...
<commit_before>import os __version__ = "unknown" try: from version import get_git_version __version__ = get_git_version() except Exception as message: print(message) __author__ = "Matthew Wood" PACKAGE_ROOT = os.path.abspath(os.path.dirname(__file__)) PACKAGE_DATA = os.path.join(PACKAGE_ROOT,'data') os....
67795baac1f7eb10fbfc90fda5a9f54949af6c24
ckanext/tayside/helpers.py
ckanext/tayside/helpers.py
from ckan import model from ckan.plugins import toolkit def _get_action(action, context_dict, data_dict): return toolkit.get_action(action)(context_dict, data_dict) def get_groups(): # Helper used on the homepage for showing groups data_dict = { 'sort': 'package_count', 'limit': 7, ...
from ckan import model from ckan.plugins import toolkit def _get_action(action, context_dict, data_dict): return toolkit.get_action(action)(context_dict, data_dict) def get_groups(): # Helper used on the homepage for showing groups data_dict = { 'sort': 'package_count', 'all_fields': Tr...
Remove limit of 7 groups in homepage
Remove limit of 7 groups in homepage
Python
agpl-3.0
ViderumGlobal/ckanext-tayside,ViderumGlobal/ckanext-tayside,ViderumGlobal/ckanext-tayside,ViderumGlobal/ckanext-tayside
from ckan import model from ckan.plugins import toolkit def _get_action(action, context_dict, data_dict): return toolkit.get_action(action)(context_dict, data_dict) def get_groups(): # Helper used on the homepage for showing groups data_dict = { 'sort': 'package_count', 'limit': 7, ...
from ckan import model from ckan.plugins import toolkit def _get_action(action, context_dict, data_dict): return toolkit.get_action(action)(context_dict, data_dict) def get_groups(): # Helper used on the homepage for showing groups data_dict = { 'sort': 'package_count', 'all_fields': Tr...
<commit_before>from ckan import model from ckan.plugins import toolkit def _get_action(action, context_dict, data_dict): return toolkit.get_action(action)(context_dict, data_dict) def get_groups(): # Helper used on the homepage for showing groups data_dict = { 'sort': 'package_count', '...
from ckan import model from ckan.plugins import toolkit def _get_action(action, context_dict, data_dict): return toolkit.get_action(action)(context_dict, data_dict) def get_groups(): # Helper used on the homepage for showing groups data_dict = { 'sort': 'package_count', 'all_fields': Tr...
from ckan import model from ckan.plugins import toolkit def _get_action(action, context_dict, data_dict): return toolkit.get_action(action)(context_dict, data_dict) def get_groups(): # Helper used on the homepage for showing groups data_dict = { 'sort': 'package_count', 'limit': 7, ...
<commit_before>from ckan import model from ckan.plugins import toolkit def _get_action(action, context_dict, data_dict): return toolkit.get_action(action)(context_dict, data_dict) def get_groups(): # Helper used on the homepage for showing groups data_dict = { 'sort': 'package_count', '...
46009d28e2b6285722287ccbeaa8d2f9c6c47fde
ldap_dingens/default_config.py
ldap_dingens/default_config.py
from datetime import timedelta class DefaultConfiguration: DEBUG = False MAIL_SERVER = "localhost" MAIL_PORT = 25 MAIL_USER = None MAIL_PASSWORD = None MAIL_CAFILE = None INVITATION_SUBJECT = "Invitation to join the FSFW!" TOKEN_BYTES = 5 TOKEN_LIFETIME = timedelta(days=7) L...
from datetime import timedelta class DefaultConfiguration: DEBUG = False MAIL_SERVER = "localhost" MAIL_PORT = 25 MAIL_USER = None MAIL_PASSWORD = None MAIL_CAFILE = None INVITATION_SUBJECT = "Invitation to join the FSFW!" TOKEN_BYTES = 5 TOKEN_LIFETIME = timedelta(days=7) L...
Remove pointless default values from DefaultConfiguration
Remove pointless default values from DefaultConfiguration
Python
agpl-3.0
fsfw-dresden/ldap-dingens,fsfw-dresden/ldap-dingens
from datetime import timedelta class DefaultConfiguration: DEBUG = False MAIL_SERVER = "localhost" MAIL_PORT = 25 MAIL_USER = None MAIL_PASSWORD = None MAIL_CAFILE = None INVITATION_SUBJECT = "Invitation to join the FSFW!" TOKEN_BYTES = 5 TOKEN_LIFETIME = timedelta(days=7) L...
from datetime import timedelta class DefaultConfiguration: DEBUG = False MAIL_SERVER = "localhost" MAIL_PORT = 25 MAIL_USER = None MAIL_PASSWORD = None MAIL_CAFILE = None INVITATION_SUBJECT = "Invitation to join the FSFW!" TOKEN_BYTES = 5 TOKEN_LIFETIME = timedelta(days=7) L...
<commit_before>from datetime import timedelta class DefaultConfiguration: DEBUG = False MAIL_SERVER = "localhost" MAIL_PORT = 25 MAIL_USER = None MAIL_PASSWORD = None MAIL_CAFILE = None INVITATION_SUBJECT = "Invitation to join the FSFW!" TOKEN_BYTES = 5 TOKEN_LIFETIME = timedelta...
from datetime import timedelta class DefaultConfiguration: DEBUG = False MAIL_SERVER = "localhost" MAIL_PORT = 25 MAIL_USER = None MAIL_PASSWORD = None MAIL_CAFILE = None INVITATION_SUBJECT = "Invitation to join the FSFW!" TOKEN_BYTES = 5 TOKEN_LIFETIME = timedelta(days=7) L...
from datetime import timedelta class DefaultConfiguration: DEBUG = False MAIL_SERVER = "localhost" MAIL_PORT = 25 MAIL_USER = None MAIL_PASSWORD = None MAIL_CAFILE = None INVITATION_SUBJECT = "Invitation to join the FSFW!" TOKEN_BYTES = 5 TOKEN_LIFETIME = timedelta(days=7) L...
<commit_before>from datetime import timedelta class DefaultConfiguration: DEBUG = False MAIL_SERVER = "localhost" MAIL_PORT = 25 MAIL_USER = None MAIL_PASSWORD = None MAIL_CAFILE = None INVITATION_SUBJECT = "Invitation to join the FSFW!" TOKEN_BYTES = 5 TOKEN_LIFETIME = timedelta...
8fad8a4f1591fb4a7d7d1bdf932c5918197b475c
tests/client.py
tests/client.py
# -*- coding: utf-8 -*- """ Description: Client side of sanity check Author: Mike Ellis Copyright 2017 Owner """ from htmltree import * def start(): console.log("Starting") newcontent = H1("Sanity check PASS", _class='test', style=dict(color='green')) console.log(newcontent.render(0)) document.body.inne...
# -*- coding: utf-8 -*- """ Description: Client side of sanity check Uses JS functions insertAdjacentHTML, innerHTML and addEventListener. See https://developer.mozilla.org/en-US/docs/Web/API/Element/insertAdjacentHTML https://developer.mozilla.org/en-US/docs/Web/API/Element/innerHTML https://developer.mozilla....
Fix <style> rendering under Transcrypt.
Fix <style> rendering under Transcrypt. The hasattr test in renderCss() was failing when it shouldn't have. Fixed by removal. Updated tests/client.py to create and append a style element to detect problems related to Style() on the client side.
Python
mit
Michael-F-Ellis/htmltree
# -*- coding: utf-8 -*- """ Description: Client side of sanity check Author: Mike Ellis Copyright 2017 Owner """ from htmltree import * def start(): console.log("Starting") newcontent = H1("Sanity check PASS", _class='test', style=dict(color='green')) console.log(newcontent.render(0)) document.body.inne...
# -*- coding: utf-8 -*- """ Description: Client side of sanity check Uses JS functions insertAdjacentHTML, innerHTML and addEventListener. See https://developer.mozilla.org/en-US/docs/Web/API/Element/insertAdjacentHTML https://developer.mozilla.org/en-US/docs/Web/API/Element/innerHTML https://developer.mozilla....
<commit_before># -*- coding: utf-8 -*- """ Description: Client side of sanity check Author: Mike Ellis Copyright 2017 Owner """ from htmltree import * def start(): console.log("Starting") newcontent = H1("Sanity check PASS", _class='test', style=dict(color='green')) console.log(newcontent.render(0)) doc...
# -*- coding: utf-8 -*- """ Description: Client side of sanity check Uses JS functions insertAdjacentHTML, innerHTML and addEventListener. See https://developer.mozilla.org/en-US/docs/Web/API/Element/insertAdjacentHTML https://developer.mozilla.org/en-US/docs/Web/API/Element/innerHTML https://developer.mozilla....
# -*- coding: utf-8 -*- """ Description: Client side of sanity check Author: Mike Ellis Copyright 2017 Owner """ from htmltree import * def start(): console.log("Starting") newcontent = H1("Sanity check PASS", _class='test', style=dict(color='green')) console.log(newcontent.render(0)) document.body.inne...
<commit_before># -*- coding: utf-8 -*- """ Description: Client side of sanity check Author: Mike Ellis Copyright 2017 Owner """ from htmltree import * def start(): console.log("Starting") newcontent = H1("Sanity check PASS", _class='test', style=dict(color='green')) console.log(newcontent.render(0)) doc...
e91eac0c667c74062672a1a2cdb7da2a910f8cf7
InvenTree/users/serializers.py
InvenTree/users/serializers.py
from rest_framework import serializers from django.contrib.auth.models import User class UserSerializer(serializers.HyperlinkedModelSerializer): """ Serializer for a User """ class Meta: model = User fields = ('username', 'first_name', 'last_name', ...
from rest_framework import serializers from django.contrib.auth.models import User class UserSerializer(serializers.HyperlinkedModelSerializer): """ Serializer for a User """ class Meta: model = User fields = ('pk', 'username', 'first_name', ...
Include PK in user serializer
Include PK in user serializer
Python
mit
inventree/InvenTree,SchrodingersGat/InvenTree,inventree/InvenTree,inventree/InvenTree,inventree/InvenTree,SchrodingersGat/InvenTree,SchrodingersGat/InvenTree,SchrodingersGat/InvenTree
from rest_framework import serializers from django.contrib.auth.models import User class UserSerializer(serializers.HyperlinkedModelSerializer): """ Serializer for a User """ class Meta: model = User fields = ('username', 'first_name', 'last_name', ...
from rest_framework import serializers from django.contrib.auth.models import User class UserSerializer(serializers.HyperlinkedModelSerializer): """ Serializer for a User """ class Meta: model = User fields = ('pk', 'username', 'first_name', ...
<commit_before>from rest_framework import serializers from django.contrib.auth.models import User class UserSerializer(serializers.HyperlinkedModelSerializer): """ Serializer for a User """ class Meta: model = User fields = ('username', 'first_name', 'l...
from rest_framework import serializers from django.contrib.auth.models import User class UserSerializer(serializers.HyperlinkedModelSerializer): """ Serializer for a User """ class Meta: model = User fields = ('pk', 'username', 'first_name', ...
from rest_framework import serializers from django.contrib.auth.models import User class UserSerializer(serializers.HyperlinkedModelSerializer): """ Serializer for a User """ class Meta: model = User fields = ('username', 'first_name', 'last_name', ...
<commit_before>from rest_framework import serializers from django.contrib.auth.models import User class UserSerializer(serializers.HyperlinkedModelSerializer): """ Serializer for a User """ class Meta: model = User fields = ('username', 'first_name', 'l...
bf9866e2c337f024fcc02de69456a235dc7ac07c
labs/lab-6/common.py
labs/lab-6/common.py
#!/usr/bin/env python # Copyright 2014-2015 Boundary, Inc. # # 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 ...
#!/usr/bin/env python # Copyright 2014-2015 Boundary, Inc. # # 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 ...
Add application id and static method for usage
Add application id and static method for usage
Python
apache-2.0
jdgwartney/tsi-lab,jdgwartney/tsi-lab,jdgwartney/tsi-lab,jdgwartney/tsi-lab,boundary/tsi-lab,boundary/tsi-lab,boundary/tsi-lab,boundary/tsi-lab
#!/usr/bin/env python # Copyright 2014-2015 Boundary, Inc. # # 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 ...
#!/usr/bin/env python # Copyright 2014-2015 Boundary, Inc. # # 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 ...
<commit_before>#!/usr/bin/env python # Copyright 2014-2015 Boundary, Inc. # # 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...
#!/usr/bin/env python # Copyright 2014-2015 Boundary, Inc. # # 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 ...
#!/usr/bin/env python # Copyright 2014-2015 Boundary, Inc. # # 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 ...
<commit_before>#!/usr/bin/env python # Copyright 2014-2015 Boundary, Inc. # # 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...
eec24c2cff1b588b957215a867a85a148f4e71e9
tuneme/views.py
tuneme/views.py
from django.core.paginator import Paginator, EmptyPage, PageNotAnInteger from django.shortcuts import render from molo.core.models import ArticlePage from molo.commenting.models import MoloComment from wagtail.wagtailsearch.models import Query def search(request, results_per_page=10): search_query = request.GET....
from django.core.paginator import Paginator, EmptyPage, PageNotAnInteger from django.shortcuts import render from django.utils.translation import get_language_from_request from molo.core.utils import get_locale_code from molo.core.models import ArticlePage from molo.commenting.models import MoloComment from wagtail.wa...
Add multi-languages support for search
Add multi-languages support for search
Python
bsd-2-clause
praekelt/molo-tuneme,praekelt/molo-tuneme,praekelt/molo-tuneme,praekelt/molo-tuneme
from django.core.paginator import Paginator, EmptyPage, PageNotAnInteger from django.shortcuts import render from molo.core.models import ArticlePage from molo.commenting.models import MoloComment from wagtail.wagtailsearch.models import Query def search(request, results_per_page=10): search_query = request.GET....
from django.core.paginator import Paginator, EmptyPage, PageNotAnInteger from django.shortcuts import render from django.utils.translation import get_language_from_request from molo.core.utils import get_locale_code from molo.core.models import ArticlePage from molo.commenting.models import MoloComment from wagtail.wa...
<commit_before>from django.core.paginator import Paginator, EmptyPage, PageNotAnInteger from django.shortcuts import render from molo.core.models import ArticlePage from molo.commenting.models import MoloComment from wagtail.wagtailsearch.models import Query def search(request, results_per_page=10): search_query...
from django.core.paginator import Paginator, EmptyPage, PageNotAnInteger from django.shortcuts import render from django.utils.translation import get_language_from_request from molo.core.utils import get_locale_code from molo.core.models import ArticlePage from molo.commenting.models import MoloComment from wagtail.wa...
from django.core.paginator import Paginator, EmptyPage, PageNotAnInteger from django.shortcuts import render from molo.core.models import ArticlePage from molo.commenting.models import MoloComment from wagtail.wagtailsearch.models import Query def search(request, results_per_page=10): search_query = request.GET....
<commit_before>from django.core.paginator import Paginator, EmptyPage, PageNotAnInteger from django.shortcuts import render from molo.core.models import ArticlePage from molo.commenting.models import MoloComment from wagtail.wagtailsearch.models import Query def search(request, results_per_page=10): search_query...
46fc6c7f8f63ce747a30a35bb5fb33ff2d53a2c0
mackerel/host.py
mackerel/host.py
# -*- coding: utf-8 -*- """ mackerel.host ~~~~~~~~~~~~~ Mackerel client implemented by Pyton. Ported from `mackerel-client-ruby`. <https://github.com/mackerelio/mackerel-client-ruby> :copyright: (c) 2014 Hatena, All rights reserved. :copyright: (c) 2015 Shinya Ohyanagi, All rights reserve...
# -*- coding: utf-8 -*- """ mackerel.host ~~~~~~~~~~~~~ Mackerel client implemented by Pyton. Ported from `mackerel-client-ruby`. <https://github.com/mackerelio/mackerel-client-ruby> :copyright: (c) 2014 Hatena, All rights reserved. :copyright: (c) 2015 Shinya Ohyanagi, All rights reserve...
Add None if kwargs can not get.
Add None if kwargs can not get.
Python
bsd-3-clause
heavenshell/py-mackerel-client
# -*- coding: utf-8 -*- """ mackerel.host ~~~~~~~~~~~~~ Mackerel client implemented by Pyton. Ported from `mackerel-client-ruby`. <https://github.com/mackerelio/mackerel-client-ruby> :copyright: (c) 2014 Hatena, All rights reserved. :copyright: (c) 2015 Shinya Ohyanagi, All rights reserve...
# -*- coding: utf-8 -*- """ mackerel.host ~~~~~~~~~~~~~ Mackerel client implemented by Pyton. Ported from `mackerel-client-ruby`. <https://github.com/mackerelio/mackerel-client-ruby> :copyright: (c) 2014 Hatena, All rights reserved. :copyright: (c) 2015 Shinya Ohyanagi, All rights reserve...
<commit_before># -*- coding: utf-8 -*- """ mackerel.host ~~~~~~~~~~~~~ Mackerel client implemented by Pyton. Ported from `mackerel-client-ruby`. <https://github.com/mackerelio/mackerel-client-ruby> :copyright: (c) 2014 Hatena, All rights reserved. :copyright: (c) 2015 Shinya Ohyanagi, All...
# -*- coding: utf-8 -*- """ mackerel.host ~~~~~~~~~~~~~ Mackerel client implemented by Pyton. Ported from `mackerel-client-ruby`. <https://github.com/mackerelio/mackerel-client-ruby> :copyright: (c) 2014 Hatena, All rights reserved. :copyright: (c) 2015 Shinya Ohyanagi, All rights reserve...
# -*- coding: utf-8 -*- """ mackerel.host ~~~~~~~~~~~~~ Mackerel client implemented by Pyton. Ported from `mackerel-client-ruby`. <https://github.com/mackerelio/mackerel-client-ruby> :copyright: (c) 2014 Hatena, All rights reserved. :copyright: (c) 2015 Shinya Ohyanagi, All rights reserve...
<commit_before># -*- coding: utf-8 -*- """ mackerel.host ~~~~~~~~~~~~~ Mackerel client implemented by Pyton. Ported from `mackerel-client-ruby`. <https://github.com/mackerelio/mackerel-client-ruby> :copyright: (c) 2014 Hatena, All rights reserved. :copyright: (c) 2015 Shinya Ohyanagi, All...
63a893add1170c1e90cdb8eaea6c1e1c6a3a8e0a
9.py
9.py
"""Python challenge solution #9: http://www.pythonchallenge.com/pc/return/good.html""" def main(): pass if __name__ == "__main__": main()
"""Python challenge solution #9: http://www.pythonchallenge.com/pc/return/good.html""" import urllib import urllib2 from PIL import Image, ImageDraw un = 'huge' pw = 'file' url = 'http://www.pythonchallenge.com/pc/return/good.jpg' def setup_auth_handler(): password_mgr = urllib2.HTTPPasswordMgrWithDefaultRealm() ...
Add authentication handler for opening image.
Add authentication handler for opening image.
Python
mit
bm5w/pychal
"""Python challenge solution #9: http://www.pythonchallenge.com/pc/return/good.html""" def main(): pass if __name__ == "__main__": main() Add authentication handler for opening image.
"""Python challenge solution #9: http://www.pythonchallenge.com/pc/return/good.html""" import urllib import urllib2 from PIL import Image, ImageDraw un = 'huge' pw = 'file' url = 'http://www.pythonchallenge.com/pc/return/good.jpg' def setup_auth_handler(): password_mgr = urllib2.HTTPPasswordMgrWithDefaultRealm() ...
<commit_before>"""Python challenge solution #9: http://www.pythonchallenge.com/pc/return/good.html""" def main(): pass if __name__ == "__main__": main() <commit_msg>Add authentication handler for opening image.<commit_after>
"""Python challenge solution #9: http://www.pythonchallenge.com/pc/return/good.html""" import urllib import urllib2 from PIL import Image, ImageDraw un = 'huge' pw = 'file' url = 'http://www.pythonchallenge.com/pc/return/good.jpg' def setup_auth_handler(): password_mgr = urllib2.HTTPPasswordMgrWithDefaultRealm() ...
"""Python challenge solution #9: http://www.pythonchallenge.com/pc/return/good.html""" def main(): pass if __name__ == "__main__": main() Add authentication handler for opening image."""Python challenge solution #9: http://www.pythonchallenge.com/pc/return/good.html""" import urllib import urllib2 from PIL ...
<commit_before>"""Python challenge solution #9: http://www.pythonchallenge.com/pc/return/good.html""" def main(): pass if __name__ == "__main__": main() <commit_msg>Add authentication handler for opening image.<commit_after>"""Python challenge solution #9: http://www.pythonchallenge.com/pc/return/good.html"...
f3bbfd5221a3d7b3e394a70853d0a7dc1b5eeeac
knights/base.py
knights/base.py
import ast from . import parse class Template: def __init__(self, raw): self.raw = raw self.nodelist = parse.parse(raw) code = ast.Expression( body=ast.GeneratorExp( elt=ast.Call( func=ast.Name(id='str', ctx=ast.Load()), ...
import ast from . import parse class Template: def __init__(self, raw): self.raw = raw self.parser = parse.Parser(raw) self.nodelist = self.parser() code = ast.Expression( body=ast.GeneratorExp( elt=ast.Call( func=ast.Name(id='str'...
Update Template for Parser class
Update Template for Parser class
Python
mit
funkybob/knights-templater,funkybob/knights-templater
import ast from . import parse class Template: def __init__(self, raw): self.raw = raw self.nodelist = parse.parse(raw) code = ast.Expression( body=ast.GeneratorExp( elt=ast.Call( func=ast.Name(id='str', ctx=ast.Load()), ...
import ast from . import parse class Template: def __init__(self, raw): self.raw = raw self.parser = parse.Parser(raw) self.nodelist = self.parser() code = ast.Expression( body=ast.GeneratorExp( elt=ast.Call( func=ast.Name(id='str'...
<commit_before> import ast from . import parse class Template: def __init__(self, raw): self.raw = raw self.nodelist = parse.parse(raw) code = ast.Expression( body=ast.GeneratorExp( elt=ast.Call( func=ast.Name(id='str', ctx=ast.Load()), ...
import ast from . import parse class Template: def __init__(self, raw): self.raw = raw self.parser = parse.Parser(raw) self.nodelist = self.parser() code = ast.Expression( body=ast.GeneratorExp( elt=ast.Call( func=ast.Name(id='str'...
import ast from . import parse class Template: def __init__(self, raw): self.raw = raw self.nodelist = parse.parse(raw) code = ast.Expression( body=ast.GeneratorExp( elt=ast.Call( func=ast.Name(id='str', ctx=ast.Load()), ...
<commit_before> import ast from . import parse class Template: def __init__(self, raw): self.raw = raw self.nodelist = parse.parse(raw) code = ast.Expression( body=ast.GeneratorExp( elt=ast.Call( func=ast.Name(id='str', ctx=ast.Load()), ...
52d32849f4cd38ca7a0fcfc0418e9e9580dd426a
kimochiconsumer/views.py
kimochiconsumer/views.py
from pyramid.view import view_config from pyramid.httpexceptions import ( HTTPNotFound, ) @view_config(route_name='page', renderer='templates/page.mako') @view_config(route_name='page_view', renderer='templates/page.mako') def page_view(request): if 'page_id' in request.matchdict: data = request.kimoc...
from pyramid.view import view_config from pyramid.httpexceptions import ( HTTPNotFound, ) @view_config(route_name='page', renderer='templates/page.mako') @view_config(route_name='page_view', renderer='templates/page.mako') def page_view(request): if 'page_id' in request.matchdict: data = request.kimoc...
Use the gallery_image method for required information
Use the gallery_image method for required information
Python
mit
matslindh/kimochi-consumer
from pyramid.view import view_config from pyramid.httpexceptions import ( HTTPNotFound, ) @view_config(route_name='page', renderer='templates/page.mako') @view_config(route_name='page_view', renderer='templates/page.mako') def page_view(request): if 'page_id' in request.matchdict: data = request.kimoc...
from pyramid.view import view_config from pyramid.httpexceptions import ( HTTPNotFound, ) @view_config(route_name='page', renderer='templates/page.mako') @view_config(route_name='page_view', renderer='templates/page.mako') def page_view(request): if 'page_id' in request.matchdict: data = request.kimoc...
<commit_before>from pyramid.view import view_config from pyramid.httpexceptions import ( HTTPNotFound, ) @view_config(route_name='page', renderer='templates/page.mako') @view_config(route_name='page_view', renderer='templates/page.mako') def page_view(request): if 'page_id' in request.matchdict: data ...
from pyramid.view import view_config from pyramid.httpexceptions import ( HTTPNotFound, ) @view_config(route_name='page', renderer='templates/page.mako') @view_config(route_name='page_view', renderer='templates/page.mako') def page_view(request): if 'page_id' in request.matchdict: data = request.kimoc...
from pyramid.view import view_config from pyramid.httpexceptions import ( HTTPNotFound, ) @view_config(route_name='page', renderer='templates/page.mako') @view_config(route_name='page_view', renderer='templates/page.mako') def page_view(request): if 'page_id' in request.matchdict: data = request.kimoc...
<commit_before>from pyramid.view import view_config from pyramid.httpexceptions import ( HTTPNotFound, ) @view_config(route_name='page', renderer='templates/page.mako') @view_config(route_name='page_view', renderer='templates/page.mako') def page_view(request): if 'page_id' in request.matchdict: data ...
cc6ce477550152135eed5a9e35bca8144be10111
groupmestats/plotly_helpers.py
groupmestats/plotly_helpers.py
import plotly def try_saving_plotly_figure(figure, filename): try: plotly.plotly.image.save_as(figure, filename) except plotly.exceptions.PlotlyError as e: if 'The response from plotly could not be translated.'in str(e): print("Failed to save plotly figure. <home>/.plotly/.credentia...
import plotly def try_saving_plotly_figure(figure, filename): try: print("Saving plot to '%s'" % filename) plotly.plotly.image.save_as(figure, filename) except plotly.exceptions.PlotlyError as e: if 'The response from plotly could not be translated.'in str(e): print("Failed ...
Print when saving plot to file
Print when saving plot to file
Python
mit
kjteske/groupmestats,kjteske/groupmestats
import plotly def try_saving_plotly_figure(figure, filename): try: plotly.plotly.image.save_as(figure, filename) except plotly.exceptions.PlotlyError as e: if 'The response from plotly could not be translated.'in str(e): print("Failed to save plotly figure. <home>/.plotly/.credentia...
import plotly def try_saving_plotly_figure(figure, filename): try: print("Saving plot to '%s'" % filename) plotly.plotly.image.save_as(figure, filename) except plotly.exceptions.PlotlyError as e: if 'The response from plotly could not be translated.'in str(e): print("Failed ...
<commit_before>import plotly def try_saving_plotly_figure(figure, filename): try: plotly.plotly.image.save_as(figure, filename) except plotly.exceptions.PlotlyError as e: if 'The response from plotly could not be translated.'in str(e): print("Failed to save plotly figure. <home>/.pl...
import plotly def try_saving_plotly_figure(figure, filename): try: print("Saving plot to '%s'" % filename) plotly.plotly.image.save_as(figure, filename) except plotly.exceptions.PlotlyError as e: if 'The response from plotly could not be translated.'in str(e): print("Failed ...
import plotly def try_saving_plotly_figure(figure, filename): try: plotly.plotly.image.save_as(figure, filename) except plotly.exceptions.PlotlyError as e: if 'The response from plotly could not be translated.'in str(e): print("Failed to save plotly figure. <home>/.plotly/.credentia...
<commit_before>import plotly def try_saving_plotly_figure(figure, filename): try: plotly.plotly.image.save_as(figure, filename) except plotly.exceptions.PlotlyError as e: if 'The response from plotly could not be translated.'in str(e): print("Failed to save plotly figure. <home>/.pl...
e2ca99c9f3548fa0d4e46bdd3b309ebd0e658ffa
test/backend/wayland/conftest.py
test/backend/wayland/conftest.py
import contextlib import os from libqtile.backend.wayland.core import Core from test.helpers import Backend wlr_env = { "WLR_BACKENDS": "headless", "WLR_LIBINPUT_NO_DEVICES": "1", "WLR_RENDERER_ALLOW_SOFTWARE": "1", "WLR_RENDERER": "pixman", } @contextlib.contextmanager def wayland_environment(outpu...
import contextlib import os import textwrap from libqtile.backend.wayland.core import Core from test.helpers import Backend wlr_env = { "WLR_BACKENDS": "headless", "WLR_LIBINPUT_NO_DEVICES": "1", "WLR_RENDERER_ALLOW_SOFTWARE": "1", "WLR_RENDERER": "pixman", } @contextlib.contextmanager def wayland_e...
Add Wayland Backend.fake_click and Backend.get_all_windows methods
Add Wayland Backend.fake_click and Backend.get_all_windows methods These work by eval-ing in the test Qtile instance. It might be nicer to instead make these cmd_s on the `Core` if/when we expose cmd_ methods from the Core.
Python
mit
ramnes/qtile,ramnes/qtile,qtile/qtile,qtile/qtile
import contextlib import os from libqtile.backend.wayland.core import Core from test.helpers import Backend wlr_env = { "WLR_BACKENDS": "headless", "WLR_LIBINPUT_NO_DEVICES": "1", "WLR_RENDERER_ALLOW_SOFTWARE": "1", "WLR_RENDERER": "pixman", } @contextlib.contextmanager def wayland_environment(outpu...
import contextlib import os import textwrap from libqtile.backend.wayland.core import Core from test.helpers import Backend wlr_env = { "WLR_BACKENDS": "headless", "WLR_LIBINPUT_NO_DEVICES": "1", "WLR_RENDERER_ALLOW_SOFTWARE": "1", "WLR_RENDERER": "pixman", } @contextlib.contextmanager def wayland_e...
<commit_before>import contextlib import os from libqtile.backend.wayland.core import Core from test.helpers import Backend wlr_env = { "WLR_BACKENDS": "headless", "WLR_LIBINPUT_NO_DEVICES": "1", "WLR_RENDERER_ALLOW_SOFTWARE": "1", "WLR_RENDERER": "pixman", } @contextlib.contextmanager def wayland_en...
import contextlib import os import textwrap from libqtile.backend.wayland.core import Core from test.helpers import Backend wlr_env = { "WLR_BACKENDS": "headless", "WLR_LIBINPUT_NO_DEVICES": "1", "WLR_RENDERER_ALLOW_SOFTWARE": "1", "WLR_RENDERER": "pixman", } @contextlib.contextmanager def wayland_e...
import contextlib import os from libqtile.backend.wayland.core import Core from test.helpers import Backend wlr_env = { "WLR_BACKENDS": "headless", "WLR_LIBINPUT_NO_DEVICES": "1", "WLR_RENDERER_ALLOW_SOFTWARE": "1", "WLR_RENDERER": "pixman", } @contextlib.contextmanager def wayland_environment(outpu...
<commit_before>import contextlib import os from libqtile.backend.wayland.core import Core from test.helpers import Backend wlr_env = { "WLR_BACKENDS": "headless", "WLR_LIBINPUT_NO_DEVICES": "1", "WLR_RENDERER_ALLOW_SOFTWARE": "1", "WLR_RENDERER": "pixman", } @contextlib.contextmanager def wayland_en...
33c26aab9ff4e391f9dde2bfe873f86db4ce126e
opal/tests/test_user_profile.py
opal/tests/test_user_profile.py
""" Tests for opal.models.UserProfile """ from django.test import TestCase from django.contrib.auth.models import User from opal.models import UserProfile, Team class UserProfileTest(TestCase): def setUp(self): self.user = User(username='testing') self.user.save() self.profile, _ = UserP...
""" Tests for opal.models.UserProfile """ from django.contrib.auth.models import User from django.test import TestCase from mock import patch from opal.models import UserProfile, Team class UserProfileTest(TestCase): def setUp(self): self.user = User(username='testing') self.user.save() s...
Add tests for userprofile properties
Add tests for userprofile properties
Python
agpl-3.0
khchine5/opal,khchine5/opal,khchine5/opal
""" Tests for opal.models.UserProfile """ from django.test import TestCase from django.contrib.auth.models import User from opal.models import UserProfile, Team class UserProfileTest(TestCase): def setUp(self): self.user = User(username='testing') self.user.save() self.profile, _ = UserP...
""" Tests for opal.models.UserProfile """ from django.contrib.auth.models import User from django.test import TestCase from mock import patch from opal.models import UserProfile, Team class UserProfileTest(TestCase): def setUp(self): self.user = User(username='testing') self.user.save() s...
<commit_before>""" Tests for opal.models.UserProfile """ from django.test import TestCase from django.contrib.auth.models import User from opal.models import UserProfile, Team class UserProfileTest(TestCase): def setUp(self): self.user = User(username='testing') self.user.save() self.pro...
""" Tests for opal.models.UserProfile """ from django.contrib.auth.models import User from django.test import TestCase from mock import patch from opal.models import UserProfile, Team class UserProfileTest(TestCase): def setUp(self): self.user = User(username='testing') self.user.save() s...
""" Tests for opal.models.UserProfile """ from django.test import TestCase from django.contrib.auth.models import User from opal.models import UserProfile, Team class UserProfileTest(TestCase): def setUp(self): self.user = User(username='testing') self.user.save() self.profile, _ = UserP...
<commit_before>""" Tests for opal.models.UserProfile """ from django.test import TestCase from django.contrib.auth.models import User from opal.models import UserProfile, Team class UserProfileTest(TestCase): def setUp(self): self.user = User(username='testing') self.user.save() self.pro...
50fd28e67109f47893a6d38ede7f64758f3fe618
consts/auth_type.py
consts/auth_type.py
class AuthType(object): """ An auth type defines what write privileges an authenticated agent has. """ EVENT_DATA = 0 MATCH_VIDEO = 1 EVENT_TEAMS = 2 EVENT_MATCHES = 3 EVENT_RANKINGS = 4 EVENT_ALLIANCES = 5 EVENT_AWARDS = 6 type_names = { EVENT_DATA: "event data", ...
class AuthType(object): """ An auth type defines what write privileges an authenticated agent has. """ EVENT_DATA = 0 # DEPRECATED - USE FINER PERMISSIONS INSTEAD MATCH_VIDEO = 1 EVENT_TEAMS = 2 EVENT_MATCHES = 3 EVENT_RANKINGS = 4 EVENT_ALLIANCES = 5 EVENT_AWARDS = 6 type_...
Add deprecation notice for AuthType.EVENT_DATA
Add deprecation notice for AuthType.EVENT_DATA
Python
mit
tsteward/the-blue-alliance,tsteward/the-blue-alliance,bdaroz/the-blue-alliance,jaredhasenklein/the-blue-alliance,synth3tk/the-blue-alliance,bdaroz/the-blue-alliance,verycumbersome/the-blue-alliance,verycumbersome/the-blue-alliance,nwalters512/the-blue-alliance,nwalters512/the-blue-alliance,bdaroz/the-blue-alliance,the-...
class AuthType(object): """ An auth type defines what write privileges an authenticated agent has. """ EVENT_DATA = 0 MATCH_VIDEO = 1 EVENT_TEAMS = 2 EVENT_MATCHES = 3 EVENT_RANKINGS = 4 EVENT_ALLIANCES = 5 EVENT_AWARDS = 6 type_names = { EVENT_DATA: "event data", ...
class AuthType(object): """ An auth type defines what write privileges an authenticated agent has. """ EVENT_DATA = 0 # DEPRECATED - USE FINER PERMISSIONS INSTEAD MATCH_VIDEO = 1 EVENT_TEAMS = 2 EVENT_MATCHES = 3 EVENT_RANKINGS = 4 EVENT_ALLIANCES = 5 EVENT_AWARDS = 6 type_...
<commit_before>class AuthType(object): """ An auth type defines what write privileges an authenticated agent has. """ EVENT_DATA = 0 MATCH_VIDEO = 1 EVENT_TEAMS = 2 EVENT_MATCHES = 3 EVENT_RANKINGS = 4 EVENT_ALLIANCES = 5 EVENT_AWARDS = 6 type_names = { EVENT_DATA: "...
class AuthType(object): """ An auth type defines what write privileges an authenticated agent has. """ EVENT_DATA = 0 # DEPRECATED - USE FINER PERMISSIONS INSTEAD MATCH_VIDEO = 1 EVENT_TEAMS = 2 EVENT_MATCHES = 3 EVENT_RANKINGS = 4 EVENT_ALLIANCES = 5 EVENT_AWARDS = 6 type_...
class AuthType(object): """ An auth type defines what write privileges an authenticated agent has. """ EVENT_DATA = 0 MATCH_VIDEO = 1 EVENT_TEAMS = 2 EVENT_MATCHES = 3 EVENT_RANKINGS = 4 EVENT_ALLIANCES = 5 EVENT_AWARDS = 6 type_names = { EVENT_DATA: "event data", ...
<commit_before>class AuthType(object): """ An auth type defines what write privileges an authenticated agent has. """ EVENT_DATA = 0 MATCH_VIDEO = 1 EVENT_TEAMS = 2 EVENT_MATCHES = 3 EVENT_RANKINGS = 4 EVENT_ALLIANCES = 5 EVENT_AWARDS = 6 type_names = { EVENT_DATA: "...
5c40cbfcb89649738945eda02c1bfb804e2ecdae
us_ignite/mailinglist/views.py
us_ignite/mailinglist/views.py
import hashlib import mailchimp from django.contrib import messages from django.conf import settings from django.shortcuts import redirect from django.template.response import TemplateResponse from us_ignite.mailinglist.forms import EmailForm def subscribe_email(email): master = mailchimp.Mailchimp(settings.MAI...
import hashlib import logging import mailchimp from django.contrib import messages from django.conf import settings from django.shortcuts import redirect from django.template.response import TemplateResponse from us_ignite.mailinglist.forms import EmailForm logger = logging.getLogger('us_ignite.mailinglist.views') ...
Improve handling of errors during mailing list subscription.
Improve handling of errors during mailing list subscription. https://github.com/madewithbytes/us_ignite/issues/209 Any exception thrown by the mailchimp component will be handled gracefully and logged.
Python
bsd-3-clause
us-ignite/us_ignite,us-ignite/us_ignite,us-ignite/us_ignite,us-ignite/us_ignite,us-ignite/us_ignite
import hashlib import mailchimp from django.contrib import messages from django.conf import settings from django.shortcuts import redirect from django.template.response import TemplateResponse from us_ignite.mailinglist.forms import EmailForm def subscribe_email(email): master = mailchimp.Mailchimp(settings.MAI...
import hashlib import logging import mailchimp from django.contrib import messages from django.conf import settings from django.shortcuts import redirect from django.template.response import TemplateResponse from us_ignite.mailinglist.forms import EmailForm logger = logging.getLogger('us_ignite.mailinglist.views') ...
<commit_before>import hashlib import mailchimp from django.contrib import messages from django.conf import settings from django.shortcuts import redirect from django.template.response import TemplateResponse from us_ignite.mailinglist.forms import EmailForm def subscribe_email(email): master = mailchimp.Mailchi...
import hashlib import logging import mailchimp from django.contrib import messages from django.conf import settings from django.shortcuts import redirect from django.template.response import TemplateResponse from us_ignite.mailinglist.forms import EmailForm logger = logging.getLogger('us_ignite.mailinglist.views') ...
import hashlib import mailchimp from django.contrib import messages from django.conf import settings from django.shortcuts import redirect from django.template.response import TemplateResponse from us_ignite.mailinglist.forms import EmailForm def subscribe_email(email): master = mailchimp.Mailchimp(settings.MAI...
<commit_before>import hashlib import mailchimp from django.contrib import messages from django.conf import settings from django.shortcuts import redirect from django.template.response import TemplateResponse from us_ignite.mailinglist.forms import EmailForm def subscribe_email(email): master = mailchimp.Mailchi...