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
766b2165cf17506c4c28f858915929511df5c5ba
nutsurv/dashboard/serializers.py
nutsurv/dashboard/serializers.py
from rest_framework import serializers from django.contrib.auth.models import User from .models import Alert, HouseholdSurveyJSON, TeamMember class UserSerializer(serializers.HyperlinkedModelSerializer): class Meta: model = User fields = [ 'url', 'username', 'email'] class SimpleUserSerializer...
from rest_framework import serializers from django.contrib.auth.models import User from .models import Alert, HouseholdSurveyJSON, TeamMember class UserSerializer(serializers.HyperlinkedModelSerializer): class Meta: model = User fields = [ 'url', 'username', 'email'] class SimpleUserSerializer...
Fix lookup in survey view
Fix lookup in survey view
Python
agpl-3.0
johanneswilm/eha-nutsurv-django,eHealthAfrica/nutsurv,johanneswilm/eha-nutsurv-django,johanneswilm/eha-nutsurv-django,eHealthAfrica/nutsurv,eHealthAfrica/nutsurv
from rest_framework import serializers from django.contrib.auth.models import User from .models import Alert, HouseholdSurveyJSON, TeamMember class UserSerializer(serializers.HyperlinkedModelSerializer): class Meta: model = User fields = [ 'url', 'username', 'email'] class SimpleUserSerializer...
from rest_framework import serializers from django.contrib.auth.models import User from .models import Alert, HouseholdSurveyJSON, TeamMember class UserSerializer(serializers.HyperlinkedModelSerializer): class Meta: model = User fields = [ 'url', 'username', 'email'] class SimpleUserSerializer...
<commit_before>from rest_framework import serializers from django.contrib.auth.models import User from .models import Alert, HouseholdSurveyJSON, TeamMember class UserSerializer(serializers.HyperlinkedModelSerializer): class Meta: model = User fields = [ 'url', 'username', 'email'] class Simpl...
from rest_framework import serializers from django.contrib.auth.models import User from .models import Alert, HouseholdSurveyJSON, TeamMember class UserSerializer(serializers.HyperlinkedModelSerializer): class Meta: model = User fields = [ 'url', 'username', 'email'] class SimpleUserSerializer...
from rest_framework import serializers from django.contrib.auth.models import User from .models import Alert, HouseholdSurveyJSON, TeamMember class UserSerializer(serializers.HyperlinkedModelSerializer): class Meta: model = User fields = [ 'url', 'username', 'email'] class SimpleUserSerializer...
<commit_before>from rest_framework import serializers from django.contrib.auth.models import User from .models import Alert, HouseholdSurveyJSON, TeamMember class UserSerializer(serializers.HyperlinkedModelSerializer): class Meta: model = User fields = [ 'url', 'username', 'email'] class Simpl...
6696451b7c7a9b2de5b624b47159efae8fcf06b7
opwen_email_server/api/lokole.py
opwen_email_server/api/lokole.py
def upload(upload_info): """ :type upload_info: dict """ client_id = upload_info['client_id'] resource_id = upload_info['resource_id'] resource_type = upload_info['resource_type'] raise NotImplementedError def download(client_id): """ :type client_id: str :rtype dict """...
def upload(upload_info): """ :type upload_info: dict """ client_id = upload_info['client_id'] # noqa: F841 resource_id = upload_info['resource_id'] # noqa: F841 resource_type = upload_info['resource_type'] # noqa: F841 raise NotImplementedError def download(client_id): # noqa: F841 ...
Disable linter in in-progress code
Disable linter in in-progress code
Python
apache-2.0
ascoderu/opwen-cloudserver,ascoderu/opwen-cloudserver
def upload(upload_info): """ :type upload_info: dict """ client_id = upload_info['client_id'] resource_id = upload_info['resource_id'] resource_type = upload_info['resource_type'] raise NotImplementedError def download(client_id): """ :type client_id: str :rtype dict """...
def upload(upload_info): """ :type upload_info: dict """ client_id = upload_info['client_id'] # noqa: F841 resource_id = upload_info['resource_id'] # noqa: F841 resource_type = upload_info['resource_type'] # noqa: F841 raise NotImplementedError def download(client_id): # noqa: F841 ...
<commit_before>def upload(upload_info): """ :type upload_info: dict """ client_id = upload_info['client_id'] resource_id = upload_info['resource_id'] resource_type = upload_info['resource_type'] raise NotImplementedError def download(client_id): """ :type client_id: str :rtyp...
def upload(upload_info): """ :type upload_info: dict """ client_id = upload_info['client_id'] # noqa: F841 resource_id = upload_info['resource_id'] # noqa: F841 resource_type = upload_info['resource_type'] # noqa: F841 raise NotImplementedError def download(client_id): # noqa: F841 ...
def upload(upload_info): """ :type upload_info: dict """ client_id = upload_info['client_id'] resource_id = upload_info['resource_id'] resource_type = upload_info['resource_type'] raise NotImplementedError def download(client_id): """ :type client_id: str :rtype dict """...
<commit_before>def upload(upload_info): """ :type upload_info: dict """ client_id = upload_info['client_id'] resource_id = upload_info['resource_id'] resource_type = upload_info['resource_type'] raise NotImplementedError def download(client_id): """ :type client_id: str :rtyp...
199caafc817e4e007b2eedd307cb7bff06c029c6
imagersite/imager_images/tests.py
imagersite/imager_images/tests.py
from __future__ import unicode_literals from django.contrib.auth.models import User from django.test import TestCase import factory from faker import Faker from imager_profile.models import ImagerProfile from .models import Album, Photo # Create your tests here.
from __future__ import unicode_literals from django.contrib.auth.models import User from django.test import TestCase import factory from faker import Faker from imager_profile.models import ImagerProfile from .models import Album, Pho # Create your tests here. fake = Faker() class UserFactory(factory.Factory): ...
Add a UserFactory for images test
Add a UserFactory for images test
Python
mit
jesseklein406/django-imager,jesseklein406/django-imager,jesseklein406/django-imager
from __future__ import unicode_literals from django.contrib.auth.models import User from django.test import TestCase import factory from faker import Faker from imager_profile.models import ImagerProfile from .models import Album, Photo # Create your tests here. Add a UserFactory for images test
from __future__ import unicode_literals from django.contrib.auth.models import User from django.test import TestCase import factory from faker import Faker from imager_profile.models import ImagerProfile from .models import Album, Pho # Create your tests here. fake = Faker() class UserFactory(factory.Factory): ...
<commit_before>from __future__ import unicode_literals from django.contrib.auth.models import User from django.test import TestCase import factory from faker import Faker from imager_profile.models import ImagerProfile from .models import Album, Photo # Create your tests here. <commit_msg>Add a UserFactory for images...
from __future__ import unicode_literals from django.contrib.auth.models import User from django.test import TestCase import factory from faker import Faker from imager_profile.models import ImagerProfile from .models import Album, Pho # Create your tests here. fake = Faker() class UserFactory(factory.Factory): ...
from __future__ import unicode_literals from django.contrib.auth.models import User from django.test import TestCase import factory from faker import Faker from imager_profile.models import ImagerProfile from .models import Album, Photo # Create your tests here. Add a UserFactory for images testfrom __future__ import...
<commit_before>from __future__ import unicode_literals from django.contrib.auth.models import User from django.test import TestCase import factory from faker import Faker from imager_profile.models import ImagerProfile from .models import Album, Photo # Create your tests here. <commit_msg>Add a UserFactory for images...
de42731ab97a7d4272c44cc750891906aa5b4417
buildlet/runner/ipythonparallel.py
buildlet/runner/ipythonparallel.py
""" Task runner using IPython parallel interface. See `The IPython task interface`_ and `IPython Documentation`_ in `IPython Documentation`_. .. _The IPython task interface: http://ipython.org/ipython-doc/dev/parallel/parallel_task.html .. _DAG Dependencies: http://ipython.org/ipython-doc/dev/parallel/dag_depe...
""" Task runner using IPython parallel interface. See `The IPython task interface`_ and `IPython Documentation`_ in `IPython Documentation`_. .. _The IPython task interface: http://ipython.org/ipython-doc/dev/parallel/parallel_task.html .. _DAG Dependencies: http://ipython.org/ipython-doc/dev/parallel/dag_depe...
Raise error if any in IPythonParallelRunner.wait_tasks
Raise error if any in IPythonParallelRunner.wait_tasks
Python
bsd-3-clause
tkf/buildlet
""" Task runner using IPython parallel interface. See `The IPython task interface`_ and `IPython Documentation`_ in `IPython Documentation`_. .. _The IPython task interface: http://ipython.org/ipython-doc/dev/parallel/parallel_task.html .. _DAG Dependencies: http://ipython.org/ipython-doc/dev/parallel/dag_depe...
""" Task runner using IPython parallel interface. See `The IPython task interface`_ and `IPython Documentation`_ in `IPython Documentation`_. .. _The IPython task interface: http://ipython.org/ipython-doc/dev/parallel/parallel_task.html .. _DAG Dependencies: http://ipython.org/ipython-doc/dev/parallel/dag_depe...
<commit_before>""" Task runner using IPython parallel interface. See `The IPython task interface`_ and `IPython Documentation`_ in `IPython Documentation`_. .. _The IPython task interface: http://ipython.org/ipython-doc/dev/parallel/parallel_task.html .. _DAG Dependencies: http://ipython.org/ipython-doc/dev/pa...
""" Task runner using IPython parallel interface. See `The IPython task interface`_ and `IPython Documentation`_ in `IPython Documentation`_. .. _The IPython task interface: http://ipython.org/ipython-doc/dev/parallel/parallel_task.html .. _DAG Dependencies: http://ipython.org/ipython-doc/dev/parallel/dag_depe...
""" Task runner using IPython parallel interface. See `The IPython task interface`_ and `IPython Documentation`_ in `IPython Documentation`_. .. _The IPython task interface: http://ipython.org/ipython-doc/dev/parallel/parallel_task.html .. _DAG Dependencies: http://ipython.org/ipython-doc/dev/parallel/dag_depe...
<commit_before>""" Task runner using IPython parallel interface. See `The IPython task interface`_ and `IPython Documentation`_ in `IPython Documentation`_. .. _The IPython task interface: http://ipython.org/ipython-doc/dev/parallel/parallel_task.html .. _DAG Dependencies: http://ipython.org/ipython-doc/dev/pa...
b198dd91082dd5ae2fdddb7f7bd6ef05c35ba4f4
jdleden/local_settings_example.py
jdleden/local_settings_example.py
LDAP_NAME = 'ldap://' LDAP_PASSWORD = '' LDAP_DN = 'cn=writeuser,ou=sysUsers,dc=jd,dc=nl' SECRET_KEY = '' DATABASES = { "default": { # Add "postgresql_psycopg2", "mysql", "sqlite3" or "oracle". "ENGINE": "django.db.backends.sqlite3", # DB name or path to database file if using sqlite3. ...
DATABASES = { "default": { # Add "postgresql_psycopg2", "mysql", "sqlite3" or "oracle". "ENGINE": "django.db.backends.sqlite3", # DB name or path to database file if using sqlite3. "NAME": "dev.db", # Not used with sqlite3. "USER": "", # Not used with sqlite3...
Add Janeus settings to local_settings example
Add Janeus settings to local_settings example
Python
mit
jonge-democraten/jdleden,jonge-democraten/jdleden
LDAP_NAME = 'ldap://' LDAP_PASSWORD = '' LDAP_DN = 'cn=writeuser,ou=sysUsers,dc=jd,dc=nl' SECRET_KEY = '' DATABASES = { "default": { # Add "postgresql_psycopg2", "mysql", "sqlite3" or "oracle". "ENGINE": "django.db.backends.sqlite3", # DB name or path to database file if using sqlite3. ...
DATABASES = { "default": { # Add "postgresql_psycopg2", "mysql", "sqlite3" or "oracle". "ENGINE": "django.db.backends.sqlite3", # DB name or path to database file if using sqlite3. "NAME": "dev.db", # Not used with sqlite3. "USER": "", # Not used with sqlite3...
<commit_before> LDAP_NAME = 'ldap://' LDAP_PASSWORD = '' LDAP_DN = 'cn=writeuser,ou=sysUsers,dc=jd,dc=nl' SECRET_KEY = '' DATABASES = { "default": { # Add "postgresql_psycopg2", "mysql", "sqlite3" or "oracle". "ENGINE": "django.db.backends.sqlite3", # DB name or path to database file if us...
DATABASES = { "default": { # Add "postgresql_psycopg2", "mysql", "sqlite3" or "oracle". "ENGINE": "django.db.backends.sqlite3", # DB name or path to database file if using sqlite3. "NAME": "dev.db", # Not used with sqlite3. "USER": "", # Not used with sqlite3...
LDAP_NAME = 'ldap://' LDAP_PASSWORD = '' LDAP_DN = 'cn=writeuser,ou=sysUsers,dc=jd,dc=nl' SECRET_KEY = '' DATABASES = { "default": { # Add "postgresql_psycopg2", "mysql", "sqlite3" or "oracle". "ENGINE": "django.db.backends.sqlite3", # DB name or path to database file if using sqlite3. ...
<commit_before> LDAP_NAME = 'ldap://' LDAP_PASSWORD = '' LDAP_DN = 'cn=writeuser,ou=sysUsers,dc=jd,dc=nl' SECRET_KEY = '' DATABASES = { "default": { # Add "postgresql_psycopg2", "mysql", "sqlite3" or "oracle". "ENGINE": "django.db.backends.sqlite3", # DB name or path to database file if us...
9e406380196a51a2502878a641ea90a11d6a19c3
comrade/core/context_processors.py
comrade/core/context_processors.py
from django.conf import settings from django.contrib.sites.models import Site from settings import DeploymentType def default(request): context = {} context['DEPLOYMENT'] = settings.DEPLOYMENT context['current_site'] = Site.objects.get_current() if settings.DEPLOYMENT != DeploymentType.PRODUCTION: ...
from django.conf import settings from django.contrib.sites.models import Site from settings import DeploymentType def default(request): context = {} context['DEPLOYMENT'] = settings.DEPLOYMENT context['current_site'] = Site.objects.get_current() if settings.DEPLOYMENT != DeploymentType.PRODUCTION: ...
Add a context processor that adds the UserProfile to each context.
Add a context processor that adds the UserProfile to each context.
Python
mit
bueda/django-comrade
from django.conf import settings from django.contrib.sites.models import Site from settings import DeploymentType def default(request): context = {} context['DEPLOYMENT'] = settings.DEPLOYMENT context['current_site'] = Site.objects.get_current() if settings.DEPLOYMENT != DeploymentType.PRODUCTION: ...
from django.conf import settings from django.contrib.sites.models import Site from settings import DeploymentType def default(request): context = {} context['DEPLOYMENT'] = settings.DEPLOYMENT context['current_site'] = Site.objects.get_current() if settings.DEPLOYMENT != DeploymentType.PRODUCTION: ...
<commit_before>from django.conf import settings from django.contrib.sites.models import Site from settings import DeploymentType def default(request): context = {} context['DEPLOYMENT'] = settings.DEPLOYMENT context['current_site'] = Site.objects.get_current() if settings.DEPLOYMENT != DeploymentType.P...
from django.conf import settings from django.contrib.sites.models import Site from settings import DeploymentType def default(request): context = {} context['DEPLOYMENT'] = settings.DEPLOYMENT context['current_site'] = Site.objects.get_current() if settings.DEPLOYMENT != DeploymentType.PRODUCTION: ...
from django.conf import settings from django.contrib.sites.models import Site from settings import DeploymentType def default(request): context = {} context['DEPLOYMENT'] = settings.DEPLOYMENT context['current_site'] = Site.objects.get_current() if settings.DEPLOYMENT != DeploymentType.PRODUCTION: ...
<commit_before>from django.conf import settings from django.contrib.sites.models import Site from settings import DeploymentType def default(request): context = {} context['DEPLOYMENT'] = settings.DEPLOYMENT context['current_site'] = Site.objects.get_current() if settings.DEPLOYMENT != DeploymentType.P...
2a71b48fb3ff2ec720ace74e30a83102c31863dc
labonneboite/common/email_util.py
labonneboite/common/email_util.py
# coding: utf8 import json import logging from labonneboite.conf import settings logger = logging.getLogger('main') class MailNoSendException(Exception): pass class EmailClient(object): to = settings.FORM_EMAIL from_email = settings.ADMIN_EMAIL subject = 'nouveau message entreprise LBB' class M...
# coding: utf8 import json import logging from urllib.error import HTTPError from labonneboite.conf import settings logger = logging.getLogger('main') class MailNoSendException(Exception): pass class EmailClient(object): to = settings.FORM_EMAIL from_email = settings.ADMIN_EMAIL subject = 'nouvea...
Handle HttpError when sending email
Handle HttpError when sending email
Python
agpl-3.0
StartupsPoleEmploi/labonneboite,StartupsPoleEmploi/labonneboite,StartupsPoleEmploi/labonneboite,StartupsPoleEmploi/labonneboite
# coding: utf8 import json import logging from labonneboite.conf import settings logger = logging.getLogger('main') class MailNoSendException(Exception): pass class EmailClient(object): to = settings.FORM_EMAIL from_email = settings.ADMIN_EMAIL subject = 'nouveau message entreprise LBB' class M...
# coding: utf8 import json import logging from urllib.error import HTTPError from labonneboite.conf import settings logger = logging.getLogger('main') class MailNoSendException(Exception): pass class EmailClient(object): to = settings.FORM_EMAIL from_email = settings.ADMIN_EMAIL subject = 'nouvea...
<commit_before># coding: utf8 import json import logging from labonneboite.conf import settings logger = logging.getLogger('main') class MailNoSendException(Exception): pass class EmailClient(object): to = settings.FORM_EMAIL from_email = settings.ADMIN_EMAIL subject = 'nouveau message entreprise...
# coding: utf8 import json import logging from urllib.error import HTTPError from labonneboite.conf import settings logger = logging.getLogger('main') class MailNoSendException(Exception): pass class EmailClient(object): to = settings.FORM_EMAIL from_email = settings.ADMIN_EMAIL subject = 'nouvea...
# coding: utf8 import json import logging from labonneboite.conf import settings logger = logging.getLogger('main') class MailNoSendException(Exception): pass class EmailClient(object): to = settings.FORM_EMAIL from_email = settings.ADMIN_EMAIL subject = 'nouveau message entreprise LBB' class M...
<commit_before># coding: utf8 import json import logging from labonneboite.conf import settings logger = logging.getLogger('main') class MailNoSendException(Exception): pass class EmailClient(object): to = settings.FORM_EMAIL from_email = settings.ADMIN_EMAIL subject = 'nouveau message entreprise...
60352e8a3c41ec804ac1bd6b9f3af4bf611edc0b
profiles/views.py
profiles/views.py
from django.conf import settings from django.contrib.auth.decorators import login_required from django.contrib.sites.models import Site from django.core.urlresolvers import reverse from django.views.generic import FormView, TemplateView from django.utils.datastructures import MultiValueDictKeyError from incuna.utils im...
from django.conf import settings from django.contrib.auth.decorators import login_required from django.contrib.sites.models import Site from django.core.urlresolvers import reverse from django.utils.datastructures import MultiValueDictKeyError from django.views.generic import TemplateView, UpdateView from incuna.utils ...
Use an update view instead of form view
Use an update view instead of form view
Python
bsd-2-clause
incuna/django-extensible-profiles
from django.conf import settings from django.contrib.auth.decorators import login_required from django.contrib.sites.models import Site from django.core.urlresolvers import reverse from django.views.generic import FormView, TemplateView from django.utils.datastructures import MultiValueDictKeyError from incuna.utils im...
from django.conf import settings from django.contrib.auth.decorators import login_required from django.contrib.sites.models import Site from django.core.urlresolvers import reverse from django.utils.datastructures import MultiValueDictKeyError from django.views.generic import TemplateView, UpdateView from incuna.utils ...
<commit_before>from django.conf import settings from django.contrib.auth.decorators import login_required from django.contrib.sites.models import Site from django.core.urlresolvers import reverse from django.views.generic import FormView, TemplateView from django.utils.datastructures import MultiValueDictKeyError from ...
from django.conf import settings from django.contrib.auth.decorators import login_required from django.contrib.sites.models import Site from django.core.urlresolvers import reverse from django.utils.datastructures import MultiValueDictKeyError from django.views.generic import TemplateView, UpdateView from incuna.utils ...
from django.conf import settings from django.contrib.auth.decorators import login_required from django.contrib.sites.models import Site from django.core.urlresolvers import reverse from django.views.generic import FormView, TemplateView from django.utils.datastructures import MultiValueDictKeyError from incuna.utils im...
<commit_before>from django.conf import settings from django.contrib.auth.decorators import login_required from django.contrib.sites.models import Site from django.core.urlresolvers import reverse from django.views.generic import FormView, TemplateView from django.utils.datastructures import MultiValueDictKeyError from ...
89e749f88be822af2f6292a90211fb90fe95479a
ckanext/ckanext-apicatalog_routes/ckanext/apicatalog_routes/tests/test_plugin.py
ckanext/ckanext-apicatalog_routes/ckanext/apicatalog_routes/tests/test_plugin.py
"""Tests for plugin.py.""" import pytest from ckan.tests import factories import ckan.tests.helpers as helpers from ckan.plugins.toolkit import NotAuthorized @pytest.mark.ckan_config('ckan.plugins', 'apicatalog_routes') @pytest.mark.usefixtures('clean_db', 'with_plugins', 'with_request_context') class TestApicatalogR...
"""Tests for plugin.py.""" import pytest from ckan.tests import factories import ckan.tests.helpers as helpers from ckan.plugins.toolkit import NotAuthorized @pytest.mark.ckan_config('ckan.plugins', 'apicatalog_routes') @pytest.mark.usefixtures('clean_db', 'with_plugins', 'with_request_context') class TestApicatalog...
Use id instead of name
Use id instead of name
Python
mit
vrk-kpa/api-catalog,vrk-kpa/api-catalog,vrk-kpa/api-catalog,vrk-kpa/api-catalog
"""Tests for plugin.py.""" import pytest from ckan.tests import factories import ckan.tests.helpers as helpers from ckan.plugins.toolkit import NotAuthorized @pytest.mark.ckan_config('ckan.plugins', 'apicatalog_routes') @pytest.mark.usefixtures('clean_db', 'with_plugins', 'with_request_context') class TestApicatalogR...
"""Tests for plugin.py.""" import pytest from ckan.tests import factories import ckan.tests.helpers as helpers from ckan.plugins.toolkit import NotAuthorized @pytest.mark.ckan_config('ckan.plugins', 'apicatalog_routes') @pytest.mark.usefixtures('clean_db', 'with_plugins', 'with_request_context') class TestApicatalog...
<commit_before>"""Tests for plugin.py.""" import pytest from ckan.tests import factories import ckan.tests.helpers as helpers from ckan.plugins.toolkit import NotAuthorized @pytest.mark.ckan_config('ckan.plugins', 'apicatalog_routes') @pytest.mark.usefixtures('clean_db', 'with_plugins', 'with_request_context') class ...
"""Tests for plugin.py.""" import pytest from ckan.tests import factories import ckan.tests.helpers as helpers from ckan.plugins.toolkit import NotAuthorized @pytest.mark.ckan_config('ckan.plugins', 'apicatalog_routes') @pytest.mark.usefixtures('clean_db', 'with_plugins', 'with_request_context') class TestApicatalog...
"""Tests for plugin.py.""" import pytest from ckan.tests import factories import ckan.tests.helpers as helpers from ckan.plugins.toolkit import NotAuthorized @pytest.mark.ckan_config('ckan.plugins', 'apicatalog_routes') @pytest.mark.usefixtures('clean_db', 'with_plugins', 'with_request_context') class TestApicatalogR...
<commit_before>"""Tests for plugin.py.""" import pytest from ckan.tests import factories import ckan.tests.helpers as helpers from ckan.plugins.toolkit import NotAuthorized @pytest.mark.ckan_config('ckan.plugins', 'apicatalog_routes') @pytest.mark.usefixtures('clean_db', 'with_plugins', 'with_request_context') class ...
b89716c4e7ba69c36a04bca00da20cfa8bb6a5e7
ideascube/conf/idb_col_llavedelsaber.py
ideascube/conf/idb_col_llavedelsaber.py
"""Configuration for Llave Del Saber, Colombia""" from .idb import * # noqa LANGUAGE_CODE = 'es' DOMAIN = 'bibliotecamovil.lan' ALLOWED_HOSTS = ['.bibliotecamovil.lan', 'localhost']
"""Configuration for Llave Del Saber, Colombia""" from .idb import * # noqa LANGUAGE_CODE = 'es' DOMAIN = 'bibliotecamovil.lan' ALLOWED_HOSTS = ['.bibliotecamovil.lan', 'localhost'] USER_FORM_FIELDS = USER_FORM_FIELDS + ( (_('Personal informations'), ['extra']), ) USER_EXTRA_FIELD_LABEL = 'Etnicidad'
Add a custom 'extra' field to idb_col_llavadelsaber
Add a custom 'extra' field to idb_col_llavadelsaber
Python
agpl-3.0
ideascube/ideascube,ideascube/ideascube,ideascube/ideascube,ideascube/ideascube
"""Configuration for Llave Del Saber, Colombia""" from .idb import * # noqa LANGUAGE_CODE = 'es' DOMAIN = 'bibliotecamovil.lan' ALLOWED_HOSTS = ['.bibliotecamovil.lan', 'localhost'] Add a custom 'extra' field to idb_col_llavadelsaber
"""Configuration for Llave Del Saber, Colombia""" from .idb import * # noqa LANGUAGE_CODE = 'es' DOMAIN = 'bibliotecamovil.lan' ALLOWED_HOSTS = ['.bibliotecamovil.lan', 'localhost'] USER_FORM_FIELDS = USER_FORM_FIELDS + ( (_('Personal informations'), ['extra']), ) USER_EXTRA_FIELD_LABEL = 'Etnicidad'
<commit_before>"""Configuration for Llave Del Saber, Colombia""" from .idb import * # noqa LANGUAGE_CODE = 'es' DOMAIN = 'bibliotecamovil.lan' ALLOWED_HOSTS = ['.bibliotecamovil.lan', 'localhost'] <commit_msg>Add a custom 'extra' field to idb_col_llavadelsaber<commit_after>
"""Configuration for Llave Del Saber, Colombia""" from .idb import * # noqa LANGUAGE_CODE = 'es' DOMAIN = 'bibliotecamovil.lan' ALLOWED_HOSTS = ['.bibliotecamovil.lan', 'localhost'] USER_FORM_FIELDS = USER_FORM_FIELDS + ( (_('Personal informations'), ['extra']), ) USER_EXTRA_FIELD_LABEL = 'Etnicidad'
"""Configuration for Llave Del Saber, Colombia""" from .idb import * # noqa LANGUAGE_CODE = 'es' DOMAIN = 'bibliotecamovil.lan' ALLOWED_HOSTS = ['.bibliotecamovil.lan', 'localhost'] Add a custom 'extra' field to idb_col_llavadelsaber"""Configuration for Llave Del Saber, Colombia""" from .idb import * # noqa LANGUAG...
<commit_before>"""Configuration for Llave Del Saber, Colombia""" from .idb import * # noqa LANGUAGE_CODE = 'es' DOMAIN = 'bibliotecamovil.lan' ALLOWED_HOSTS = ['.bibliotecamovil.lan', 'localhost'] <commit_msg>Add a custom 'extra' field to idb_col_llavadelsaber<commit_after>"""Configuration for Llave Del Saber, Colomb...
220df047067ee1be995cfad7db4a192093c3ac9b
SNParray/Create_SQLtable_From_DesignVCF.py
SNParray/Create_SQLtable_From_DesignVCF.py
#!/usr/bin/python import vcf import os from optparse import OptionParser parser = OptionParser() parser.add_option("--vcf", dest="vcf_file", help="Path to VCF to convert", default=False) #parser.add_option("--conf", dest="config_file", help="Path to DataBase config file", default=False) (options, args) = pa...
#!/usr/bin/python import vcf import os from optparse import OptionParser parser = OptionParser() parser.add_option("--vcf", dest="vcf_file", help="Path to VCF to convert", default="") #parser.add_option("--conf", dest="config_file", help="Path to DataBase config file", default=False) (options, args) = parse...
Fix the assumption that options.vcf_file is a string.
Fix the assumption that options.vcf_file is a string.
Python
mit
CuppenResearch/Genetics,jdeligt/Genetics,jdeligt/Genetics,jdeligt/Genetics,CuppenResearch/Genetics,CuppenResearch/Genetics
#!/usr/bin/python import vcf import os from optparse import OptionParser parser = OptionParser() parser.add_option("--vcf", dest="vcf_file", help="Path to VCF to convert", default=False) #parser.add_option("--conf", dest="config_file", help="Path to DataBase config file", default=False) (options, args) = pa...
#!/usr/bin/python import vcf import os from optparse import OptionParser parser = OptionParser() parser.add_option("--vcf", dest="vcf_file", help="Path to VCF to convert", default="") #parser.add_option("--conf", dest="config_file", help="Path to DataBase config file", default=False) (options, args) = parse...
<commit_before>#!/usr/bin/python import vcf import os from optparse import OptionParser parser = OptionParser() parser.add_option("--vcf", dest="vcf_file", help="Path to VCF to convert", default=False) #parser.add_option("--conf", dest="config_file", help="Path to DataBase config file", default=False) (opti...
#!/usr/bin/python import vcf import os from optparse import OptionParser parser = OptionParser() parser.add_option("--vcf", dest="vcf_file", help="Path to VCF to convert", default="") #parser.add_option("--conf", dest="config_file", help="Path to DataBase config file", default=False) (options, args) = parse...
#!/usr/bin/python import vcf import os from optparse import OptionParser parser = OptionParser() parser.add_option("--vcf", dest="vcf_file", help="Path to VCF to convert", default=False) #parser.add_option("--conf", dest="config_file", help="Path to DataBase config file", default=False) (options, args) = pa...
<commit_before>#!/usr/bin/python import vcf import os from optparse import OptionParser parser = OptionParser() parser.add_option("--vcf", dest="vcf_file", help="Path to VCF to convert", default=False) #parser.add_option("--conf", dest="config_file", help="Path to DataBase config file", default=False) (opti...
263e31a5d87b8134a25df97eee06f1fe9c1e94bc
django_countries/release.py
django_countries/release.py
""" This file provides zest.releaser entrypoints using when releasing new django-countries versions. """ import os from txclib.commands import cmd_pull from txclib.utils import find_dot_tx from txclib.log import logger from zest.releaser.utils import ask, execute_command from django.core.management import call_command...
""" This file provides zest.releaser entrypoints using when releasing new django-countries versions. """ import os import re import shutil from txclib.commands import cmd_pull from txclib.utils import find_dot_tx from txclib.log import logger from zest.releaser.utils import ask, execute_command from django.core.manage...
Fix locale paths when pulling from transifex
Fix locale paths when pulling from transifex
Python
mit
SmileyChris/django-countries
""" This file provides zest.releaser entrypoints using when releasing new django-countries versions. """ import os from txclib.commands import cmd_pull from txclib.utils import find_dot_tx from txclib.log import logger from zest.releaser.utils import ask, execute_command from django.core.management import call_command...
""" This file provides zest.releaser entrypoints using when releasing new django-countries versions. """ import os import re import shutil from txclib.commands import cmd_pull from txclib.utils import find_dot_tx from txclib.log import logger from zest.releaser.utils import ask, execute_command from django.core.manage...
<commit_before>""" This file provides zest.releaser entrypoints using when releasing new django-countries versions. """ import os from txclib.commands import cmd_pull from txclib.utils import find_dot_tx from txclib.log import logger from zest.releaser.utils import ask, execute_command from django.core.management impo...
""" This file provides zest.releaser entrypoints using when releasing new django-countries versions. """ import os import re import shutil from txclib.commands import cmd_pull from txclib.utils import find_dot_tx from txclib.log import logger from zest.releaser.utils import ask, execute_command from django.core.manage...
""" This file provides zest.releaser entrypoints using when releasing new django-countries versions. """ import os from txclib.commands import cmd_pull from txclib.utils import find_dot_tx from txclib.log import logger from zest.releaser.utils import ask, execute_command from django.core.management import call_command...
<commit_before>""" This file provides zest.releaser entrypoints using when releasing new django-countries versions. """ import os from txclib.commands import cmd_pull from txclib.utils import find_dot_tx from txclib.log import logger from zest.releaser.utils import ask, execute_command from django.core.management impo...
6448691ed77be2fd74761e056eeb5f16a881fd54
test_settings.py
test_settings.py
from foundry.settings import * # We cannot use ssqlite or spatialite because it cannot handle the 'distinct' # in admin.py. DATABASES = { 'default': { 'ENGINE': 'django.contrib.gis.db.backends.postgis', 'NAME': 'competition', 'USER': 'test', 'PASSWORD': '', 'HOST': '', ...
from foundry.settings import * DATABASES = { 'default': { 'ENGINE': 'django.contrib.gis.db.backends.postgis', 'NAME': 'competition', 'USER': 'test', 'PASSWORD': '', 'HOST': '', 'PORT': '', } } # Need this last line until django-setuptest is improved.
Adjust test settings to be in line with jmbo-skeleton
Adjust test settings to be in line with jmbo-skeleton
Python
bsd-3-clause
praekelt/jmbo-competition,praekelt/jmbo-competition
from foundry.settings import * # We cannot use ssqlite or spatialite because it cannot handle the 'distinct' # in admin.py. DATABASES = { 'default': { 'ENGINE': 'django.contrib.gis.db.backends.postgis', 'NAME': 'competition', 'USER': 'test', 'PASSWORD': '', 'HOST': '', ...
from foundry.settings import * DATABASES = { 'default': { 'ENGINE': 'django.contrib.gis.db.backends.postgis', 'NAME': 'competition', 'USER': 'test', 'PASSWORD': '', 'HOST': '', 'PORT': '', } } # Need this last line until django-setuptest is improved.
<commit_before>from foundry.settings import * # We cannot use ssqlite or spatialite because it cannot handle the 'distinct' # in admin.py. DATABASES = { 'default': { 'ENGINE': 'django.contrib.gis.db.backends.postgis', 'NAME': 'competition', 'USER': 'test', 'PASSWORD': '', '...
from foundry.settings import * DATABASES = { 'default': { 'ENGINE': 'django.contrib.gis.db.backends.postgis', 'NAME': 'competition', 'USER': 'test', 'PASSWORD': '', 'HOST': '', 'PORT': '', } } # Need this last line until django-setuptest is improved.
from foundry.settings import * # We cannot use ssqlite or spatialite because it cannot handle the 'distinct' # in admin.py. DATABASES = { 'default': { 'ENGINE': 'django.contrib.gis.db.backends.postgis', 'NAME': 'competition', 'USER': 'test', 'PASSWORD': '', 'HOST': '', ...
<commit_before>from foundry.settings import * # We cannot use ssqlite or spatialite because it cannot handle the 'distinct' # in admin.py. DATABASES = { 'default': { 'ENGINE': 'django.contrib.gis.db.backends.postgis', 'NAME': 'competition', 'USER': 'test', 'PASSWORD': '', '...
66a1fb19aadfcf90d5627b36755d700291cef4b4
py/desisurvey/test/test_rules.py
py/desisurvey/test/test_rules.py
import unittest import numpy as np import desisurvey.tiles from desisurvey.test.base import Tester from desisurvey.rules import Rules class TestRules(Tester): def test_rules(self): rules = Rules() tiles = desisurvey.tiles.get_tiles() completed = np.ones(tiles.ntiles, bool) rules...
import unittest import numpy as np import desisurvey.tiles from desisurvey.test.base import Tester from desisurvey.rules import Rules class TestRules(Tester): def test_rules(self): rules = Rules('rules-layers.yaml') tiles = desisurvey.tiles.get_tiles() completed = np.ones(tiles.ntiles, ...
Use simpler rules file for testing with tiles subset
Use simpler rules file for testing with tiles subset
Python
bsd-3-clause
desihub/desisurvey,desihub/desisurvey
import unittest import numpy as np import desisurvey.tiles from desisurvey.test.base import Tester from desisurvey.rules import Rules class TestRules(Tester): def test_rules(self): rules = Rules() tiles = desisurvey.tiles.get_tiles() completed = np.ones(tiles.ntiles, bool) rules...
import unittest import numpy as np import desisurvey.tiles from desisurvey.test.base import Tester from desisurvey.rules import Rules class TestRules(Tester): def test_rules(self): rules = Rules('rules-layers.yaml') tiles = desisurvey.tiles.get_tiles() completed = np.ones(tiles.ntiles, ...
<commit_before>import unittest import numpy as np import desisurvey.tiles from desisurvey.test.base import Tester from desisurvey.rules import Rules class TestRules(Tester): def test_rules(self): rules = Rules() tiles = desisurvey.tiles.get_tiles() completed = np.ones(tiles.ntiles, bool...
import unittest import numpy as np import desisurvey.tiles from desisurvey.test.base import Tester from desisurvey.rules import Rules class TestRules(Tester): def test_rules(self): rules = Rules('rules-layers.yaml') tiles = desisurvey.tiles.get_tiles() completed = np.ones(tiles.ntiles, ...
import unittest import numpy as np import desisurvey.tiles from desisurvey.test.base import Tester from desisurvey.rules import Rules class TestRules(Tester): def test_rules(self): rules = Rules() tiles = desisurvey.tiles.get_tiles() completed = np.ones(tiles.ntiles, bool) rules...
<commit_before>import unittest import numpy as np import desisurvey.tiles from desisurvey.test.base import Tester from desisurvey.rules import Rules class TestRules(Tester): def test_rules(self): rules = Rules() tiles = desisurvey.tiles.get_tiles() completed = np.ones(tiles.ntiles, bool...
6471e9422b654a9e96c4f51cfbd65e06bc9e0400
app/access_control.py
app/access_control.py
from functools import wraps from flask import flash, redirect, url_for, session from app import views def login_required(f): @wraps(f) def decorated_function(*args, **kwargs): if 'logged_in' in session: return f(*args, **kwargs) else: flash("Please login to continue.", "...
from functools import wraps from flask import flash, redirect, url_for, session from app import views def login_required(f): @wraps(f) def decorated_function(*args, **kwargs): if 'logged_in' in session: return f(*args, **kwargs) else: flash("Please login to continue.", "...
Fix typo in for_guest function.
Fix typo in for_guest function. `**kwrags**` should be `**kwargs**`
Python
mit
alchermd/flask-todo-app,alchermd/flask-todo-app
from functools import wraps from flask import flash, redirect, url_for, session from app import views def login_required(f): @wraps(f) def decorated_function(*args, **kwargs): if 'logged_in' in session: return f(*args, **kwargs) else: flash("Please login to continue.", "...
from functools import wraps from flask import flash, redirect, url_for, session from app import views def login_required(f): @wraps(f) def decorated_function(*args, **kwargs): if 'logged_in' in session: return f(*args, **kwargs) else: flash("Please login to continue.", "...
<commit_before>from functools import wraps from flask import flash, redirect, url_for, session from app import views def login_required(f): @wraps(f) def decorated_function(*args, **kwargs): if 'logged_in' in session: return f(*args, **kwargs) else: flash("Please login t...
from functools import wraps from flask import flash, redirect, url_for, session from app import views def login_required(f): @wraps(f) def decorated_function(*args, **kwargs): if 'logged_in' in session: return f(*args, **kwargs) else: flash("Please login to continue.", "...
from functools import wraps from flask import flash, redirect, url_for, session from app import views def login_required(f): @wraps(f) def decorated_function(*args, **kwargs): if 'logged_in' in session: return f(*args, **kwargs) else: flash("Please login to continue.", "...
<commit_before>from functools import wraps from flask import flash, redirect, url_for, session from app import views def login_required(f): @wraps(f) def decorated_function(*args, **kwargs): if 'logged_in' in session: return f(*args, **kwargs) else: flash("Please login t...
2dfe0b180e31026e30e8a0ba6a59310e1fbad289
opbeat_pyramid/__init__.py
opbeat_pyramid/__init__.py
__VERSION__ = '1.0.8' import pyramid.tweens def includeme(config, module_name='opbeat_pyramid'): """ Extensibility function for using this module with any Pyramid app. """ config.scan(module_name) config.add_tween( 'opbeat_pyramid.subscribers.opbeat_tween_factory', over=[ p...
__VERSION__ = '1.0.8' def includeme(config, module_name='opbeat_pyramid'): """ Extensibility function for using this module with any Pyramid app. """ config.scan(module_name) # TODO: Is there a decorator for this? config.add_tween( 'opbeat_pyramid.subscribers.opbeat_tween_factory', o...
Use strings to allow setup.py to import this.
Use strings to allow setup.py to import this. This should never import depencencies, or else setup.py will fail when getting the version because the dependencies don't exist yet.
Python
mit
monokrome/opbeat_pyramid,britco/opbeat_pyramid
__VERSION__ = '1.0.8' import pyramid.tweens def includeme(config, module_name='opbeat_pyramid'): """ Extensibility function for using this module with any Pyramid app. """ config.scan(module_name) config.add_tween( 'opbeat_pyramid.subscribers.opbeat_tween_factory', over=[ p...
__VERSION__ = '1.0.8' def includeme(config, module_name='opbeat_pyramid'): """ Extensibility function for using this module with any Pyramid app. """ config.scan(module_name) # TODO: Is there a decorator for this? config.add_tween( 'opbeat_pyramid.subscribers.opbeat_tween_factory', o...
<commit_before>__VERSION__ = '1.0.8' import pyramid.tweens def includeme(config, module_name='opbeat_pyramid'): """ Extensibility function for using this module with any Pyramid app. """ config.scan(module_name) config.add_tween( 'opbeat_pyramid.subscribers.opbeat_tween_factory', over=...
__VERSION__ = '1.0.8' def includeme(config, module_name='opbeat_pyramid'): """ Extensibility function for using this module with any Pyramid app. """ config.scan(module_name) # TODO: Is there a decorator for this? config.add_tween( 'opbeat_pyramid.subscribers.opbeat_tween_factory', o...
__VERSION__ = '1.0.8' import pyramid.tweens def includeme(config, module_name='opbeat_pyramid'): """ Extensibility function for using this module with any Pyramid app. """ config.scan(module_name) config.add_tween( 'opbeat_pyramid.subscribers.opbeat_tween_factory', over=[ p...
<commit_before>__VERSION__ = '1.0.8' import pyramid.tweens def includeme(config, module_name='opbeat_pyramid'): """ Extensibility function for using this module with any Pyramid app. """ config.scan(module_name) config.add_tween( 'opbeat_pyramid.subscribers.opbeat_tween_factory', over=...
44dce5edc73199ffb0c151280cfe9e75acb73c5e
polling/tests/factories.py
polling/tests/factories.py
from datetime import datetime import factory from polling.models import State from polling.models import CANDIDATE_NONE class StateFactory(factory.DjangoModelFactory): class Meta: model = State name = factory.Sequence(lambda n: "state-%d" % n) updated = factory.LazyFunction(datetime.now) ab...
from datetime import datetime import us import factory from polling.models import State from polling.models import CANDIDATE_NONE class StateFactory(factory.DjangoModelFactory): class Meta: model = State name = factory.Sequence(lambda n: us.STATES[n]) updated = factory.LazyFunction(datetime.now...
Use real states in StateFactory
Use real states in StateFactory
Python
mit
sbuss/voteswap,sbuss/voteswap,sbuss/voteswap,sbuss/voteswap
from datetime import datetime import factory from polling.models import State from polling.models import CANDIDATE_NONE class StateFactory(factory.DjangoModelFactory): class Meta: model = State name = factory.Sequence(lambda n: "state-%d" % n) updated = factory.LazyFunction(datetime.now) ab...
from datetime import datetime import us import factory from polling.models import State from polling.models import CANDIDATE_NONE class StateFactory(factory.DjangoModelFactory): class Meta: model = State name = factory.Sequence(lambda n: us.STATES[n]) updated = factory.LazyFunction(datetime.now...
<commit_before>from datetime import datetime import factory from polling.models import State from polling.models import CANDIDATE_NONE class StateFactory(factory.DjangoModelFactory): class Meta: model = State name = factory.Sequence(lambda n: "state-%d" % n) updated = factory.LazyFunction(datet...
from datetime import datetime import us import factory from polling.models import State from polling.models import CANDIDATE_NONE class StateFactory(factory.DjangoModelFactory): class Meta: model = State name = factory.Sequence(lambda n: us.STATES[n]) updated = factory.LazyFunction(datetime.now...
from datetime import datetime import factory from polling.models import State from polling.models import CANDIDATE_NONE class StateFactory(factory.DjangoModelFactory): class Meta: model = State name = factory.Sequence(lambda n: "state-%d" % n) updated = factory.LazyFunction(datetime.now) ab...
<commit_before>from datetime import datetime import factory from polling.models import State from polling.models import CANDIDATE_NONE class StateFactory(factory.DjangoModelFactory): class Meta: model = State name = factory.Sequence(lambda n: "state-%d" % n) updated = factory.LazyFunction(datet...
57015bec555ca2a3f2e5893158d00f2dd2ca441c
errs.py
errs.py
import sys class ConfigError(Exception): def __init__(self, message): self.message = message sys.stdout.write("\nERROR: " + str(message) + "\n\n") class ParseError(Exception): def __init__(self, message): self.message = message sys.stdout.write("\nERROR: " + st...
import sys class GenericException(Exception): def __init__(self, message): self.message = message sys.stdout.write("\nERROR: " + str(message) + "\n\n") class ConfigError(GenericException): pass class ParseError(GenericException): pass
Make errors a bit easier to copy
Make errors a bit easier to copy
Python
agpl-3.0
OpenTechStrategies/anvil
import sys class ConfigError(Exception): def __init__(self, message): self.message = message sys.stdout.write("\nERROR: " + str(message) + "\n\n") class ParseError(Exception): def __init__(self, message): self.message = message sys.stdout.write("\nERROR: " + st...
import sys class GenericException(Exception): def __init__(self, message): self.message = message sys.stdout.write("\nERROR: " + str(message) + "\n\n") class ConfigError(GenericException): pass class ParseError(GenericException): pass
<commit_before>import sys class ConfigError(Exception): def __init__(self, message): self.message = message sys.stdout.write("\nERROR: " + str(message) + "\n\n") class ParseError(Exception): def __init__(self, message): self.message = message sys.stdout.write("...
import sys class GenericException(Exception): def __init__(self, message): self.message = message sys.stdout.write("\nERROR: " + str(message) + "\n\n") class ConfigError(GenericException): pass class ParseError(GenericException): pass
import sys class ConfigError(Exception): def __init__(self, message): self.message = message sys.stdout.write("\nERROR: " + str(message) + "\n\n") class ParseError(Exception): def __init__(self, message): self.message = message sys.stdout.write("\nERROR: " + st...
<commit_before>import sys class ConfigError(Exception): def __init__(self, message): self.message = message sys.stdout.write("\nERROR: " + str(message) + "\n\n") class ParseError(Exception): def __init__(self, message): self.message = message sys.stdout.write("...
5d8228f44c8aa6fa8d07b3a4b6cb662ccb764bd2
cv/urls.py
cv/urls.py
"""cv URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/1.9/topics/http/urls/ Examples: Function views 1. Add an import: from my_app import views 2. Add a URL to urlpatterns: url(r'^$', views.home, name='home') Class-based vi...
"""cv URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/1.9/topics/http/urls/ Examples: Function views 1. Add an import: from my_app import views 2. Add a URL to urlpatterns: url(r'^$', views.home, name='home') Class-based vi...
Fix url pattern for main
Fix url pattern for main
Python
mit
cthtuf/django-cv,cthtuf/django-cv,cthtuf/django-cv
"""cv URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/1.9/topics/http/urls/ Examples: Function views 1. Add an import: from my_app import views 2. Add a URL to urlpatterns: url(r'^$', views.home, name='home') Class-based vi...
"""cv URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/1.9/topics/http/urls/ Examples: Function views 1. Add an import: from my_app import views 2. Add a URL to urlpatterns: url(r'^$', views.home, name='home') Class-based vi...
<commit_before>"""cv URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/1.9/topics/http/urls/ Examples: Function views 1. Add an import: from my_app import views 2. Add a URL to urlpatterns: url(r'^$', views.home, name='home')...
"""cv URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/1.9/topics/http/urls/ Examples: Function views 1. Add an import: from my_app import views 2. Add a URL to urlpatterns: url(r'^$', views.home, name='home') Class-based vi...
"""cv URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/1.9/topics/http/urls/ Examples: Function views 1. Add an import: from my_app import views 2. Add a URL to urlpatterns: url(r'^$', views.home, name='home') Class-based vi...
<commit_before>"""cv URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/1.9/topics/http/urls/ Examples: Function views 1. Add an import: from my_app import views 2. Add a URL to urlpatterns: url(r'^$', views.home, name='home')...
7e14b99bd26b804805afb9f52dbdaf1b4d6e5a5c
fsspec/implementations/tests/test_memory.py
fsspec/implementations/tests/test_memory.py
import pytest import sys def test_1(m): m.touch("/somefile") # NB: is found with or without initial / m.touch("afiles/and/anothers") files = m.find("") if "somefile" in files: assert files == ["afiles/and/anothers", "somefile"] else: assert files == ["/somefile", "afiles/and/anoth...
import pytest import sys def test_1(m): m.touch("/somefile") # NB: is found with or without initial / m.touch("afiles/and/anothers") files = m.find("") if "somefile" in files: assert files == ["afiles/and/anothers", "somefile"] else: assert files == ["/somefile", "afiles/and/anoth...
Fix ordering issue in test
Fix ordering issue in test
Python
bsd-3-clause
fsspec/filesystem_spec,fsspec/filesystem_spec,intake/filesystem_spec
import pytest import sys def test_1(m): m.touch("/somefile") # NB: is found with or without initial / m.touch("afiles/and/anothers") files = m.find("") if "somefile" in files: assert files == ["afiles/and/anothers", "somefile"] else: assert files == ["/somefile", "afiles/and/anoth...
import pytest import sys def test_1(m): m.touch("/somefile") # NB: is found with or without initial / m.touch("afiles/and/anothers") files = m.find("") if "somefile" in files: assert files == ["afiles/and/anothers", "somefile"] else: assert files == ["/somefile", "afiles/and/anoth...
<commit_before>import pytest import sys def test_1(m): m.touch("/somefile") # NB: is found with or without initial / m.touch("afiles/and/anothers") files = m.find("") if "somefile" in files: assert files == ["afiles/and/anothers", "somefile"] else: assert files == ["/somefile", "a...
import pytest import sys def test_1(m): m.touch("/somefile") # NB: is found with or without initial / m.touch("afiles/and/anothers") files = m.find("") if "somefile" in files: assert files == ["afiles/and/anothers", "somefile"] else: assert files == ["/somefile", "afiles/and/anoth...
import pytest import sys def test_1(m): m.touch("/somefile") # NB: is found with or without initial / m.touch("afiles/and/anothers") files = m.find("") if "somefile" in files: assert files == ["afiles/and/anothers", "somefile"] else: assert files == ["/somefile", "afiles/and/anoth...
<commit_before>import pytest import sys def test_1(m): m.touch("/somefile") # NB: is found with or without initial / m.touch("afiles/and/anothers") files = m.find("") if "somefile" in files: assert files == ["afiles/and/anothers", "somefile"] else: assert files == ["/somefile", "a...
0f9884e884751aab6be342f68d917afafa61ea54
marten/__init__.py
marten/__init__.py
"""Stupid simple Python configuration management""" from __future__ import absolute_import import os as _os __version__ = '0.5.1' # Attempt to auto-load a default configuration from files in <cwd>/.marten/ based on the MARTEN_ENV env variable # MARTEN_ENV defaults to 'default' _marten_dir = _os.path.join(_os.getc...
"""Stupid simple Python configuration management""" from __future__ import absolute_import import os as _os __version__ = '0.5.2' # Attempt to auto-load a default configuration from files in <cwd>/.marten/ based on the MARTEN_ENV env variable # MARTEN_ENV defaults to 'default' _marten_dir = _os.path.join(_os.getc...
Handle ImportError at package root
Handle ImportError at package root
Python
mit
nick-allen/marten
"""Stupid simple Python configuration management""" from __future__ import absolute_import import os as _os __version__ = '0.5.1' # Attempt to auto-load a default configuration from files in <cwd>/.marten/ based on the MARTEN_ENV env variable # MARTEN_ENV defaults to 'default' _marten_dir = _os.path.join(_os.getc...
"""Stupid simple Python configuration management""" from __future__ import absolute_import import os as _os __version__ = '0.5.2' # Attempt to auto-load a default configuration from files in <cwd>/.marten/ based on the MARTEN_ENV env variable # MARTEN_ENV defaults to 'default' _marten_dir = _os.path.join(_os.getc...
<commit_before>"""Stupid simple Python configuration management""" from __future__ import absolute_import import os as _os __version__ = '0.5.1' # Attempt to auto-load a default configuration from files in <cwd>/.marten/ based on the MARTEN_ENV env variable # MARTEN_ENV defaults to 'default' _marten_dir = _os.pat...
"""Stupid simple Python configuration management""" from __future__ import absolute_import import os as _os __version__ = '0.5.2' # Attempt to auto-load a default configuration from files in <cwd>/.marten/ based on the MARTEN_ENV env variable # MARTEN_ENV defaults to 'default' _marten_dir = _os.path.join(_os.getc...
"""Stupid simple Python configuration management""" from __future__ import absolute_import import os as _os __version__ = '0.5.1' # Attempt to auto-load a default configuration from files in <cwd>/.marten/ based on the MARTEN_ENV env variable # MARTEN_ENV defaults to 'default' _marten_dir = _os.path.join(_os.getc...
<commit_before>"""Stupid simple Python configuration management""" from __future__ import absolute_import import os as _os __version__ = '0.5.1' # Attempt to auto-load a default configuration from files in <cwd>/.marten/ based on the MARTEN_ENV env variable # MARTEN_ENV defaults to 'default' _marten_dir = _os.pat...
25d909d95fe4a065d91eec49f4c3e0fa810233e5
DownloadData/download_data.py
DownloadData/download_data.py
import ocpaccess.download ocpaccess.download.get_data( token = "kasthuri11", zoom = 1, x_start = 0, x_stop = 10752, y_start = 0, y_stop = 13312, z_start = 1, z_stop = 1850, location =...
import ocpaccess.download """ Two sets of tokens are supplied below -- `common` and `full`. common The most common data download.) full LARGE FILE WARNING For the compressed data, visit [our website]. """ # Common common = ['kasthuri11', 'kat11vesicles', 'kat11segments', 'k...
Add script to download by 'set'
Add script to download by 'set'
Python
apache-2.0
openconnectome/kasthuri2015,neurodata/kasthuri2015,openconnectome/kasthuri2015,openconnectome/Kasthuri-et-al-2014,neurodata/kasthuri2015,openconnectome/Kasthuri-et-al-2014,openconnectome/Kasthuri-et-al-2014,neurodata/kasthuri2015,openconnectome/kasthuri2015
import ocpaccess.download ocpaccess.download.get_data( token = "kasthuri11", zoom = 1, x_start = 0, x_stop = 10752, y_start = 0, y_stop = 13312, z_start = 1, z_stop = 1850, location =...
import ocpaccess.download """ Two sets of tokens are supplied below -- `common` and `full`. common The most common data download.) full LARGE FILE WARNING For the compressed data, visit [our website]. """ # Common common = ['kasthuri11', 'kat11vesicles', 'kat11segments', 'k...
<commit_before>import ocpaccess.download ocpaccess.download.get_data( token = "kasthuri11", zoom = 1, x_start = 0, x_stop = 10752, y_start = 0, y_stop = 13312, z_start = 1, z_stop = 1850, ...
import ocpaccess.download """ Two sets of tokens are supplied below -- `common` and `full`. common The most common data download.) full LARGE FILE WARNING For the compressed data, visit [our website]. """ # Common common = ['kasthuri11', 'kat11vesicles', 'kat11segments', 'k...
import ocpaccess.download ocpaccess.download.get_data( token = "kasthuri11", zoom = 1, x_start = 0, x_stop = 10752, y_start = 0, y_stop = 13312, z_start = 1, z_stop = 1850, location =...
<commit_before>import ocpaccess.download ocpaccess.download.get_data( token = "kasthuri11", zoom = 1, x_start = 0, x_stop = 10752, y_start = 0, y_stop = 13312, z_start = 1, z_stop = 1850, ...
01b25dd0df59ba7a309a25433abc09f86d5d5096
app/main/messaging.py
app/main/messaging.py
from flask import request, session from . import main import twilio.twiml @main.route("/report_incident", methods=['GET', 'POST']) def handle_message(): step = session.get('step', 0) message = request.values.get('Body') # noqa resp = twilio.twiml.Response() if step is 0: resp.message("Welco...
from flask import request, session from . import main import twilio.twiml @main.route("/report_incident", methods=['GET', 'POST']) def handle_message(): message = request.values.get('Body') # noqa resp = twilio.twiml.Response() if message.lower().contains('report'): step = session.get('step', 0) ...
Add scret key for sessioning
Add scret key for sessioning
Python
mit
hack4impact/clean-air-council,hack4impact/clean-air-council,hack4impact/clean-air-council
from flask import request, session from . import main import twilio.twiml @main.route("/report_incident", methods=['GET', 'POST']) def handle_message(): step = session.get('step', 0) message = request.values.get('Body') # noqa resp = twilio.twiml.Response() if step is 0: resp.message("Welco...
from flask import request, session from . import main import twilio.twiml @main.route("/report_incident", methods=['GET', 'POST']) def handle_message(): message = request.values.get('Body') # noqa resp = twilio.twiml.Response() if message.lower().contains('report'): step = session.get('step', 0) ...
<commit_before>from flask import request, session from . import main import twilio.twiml @main.route("/report_incident", methods=['GET', 'POST']) def handle_message(): step = session.get('step', 0) message = request.values.get('Body') # noqa resp = twilio.twiml.Response() if step is 0: resp...
from flask import request, session from . import main import twilio.twiml @main.route("/report_incident", methods=['GET', 'POST']) def handle_message(): message = request.values.get('Body') # noqa resp = twilio.twiml.Response() if message.lower().contains('report'): step = session.get('step', 0) ...
from flask import request, session from . import main import twilio.twiml @main.route("/report_incident", methods=['GET', 'POST']) def handle_message(): step = session.get('step', 0) message = request.values.get('Body') # noqa resp = twilio.twiml.Response() if step is 0: resp.message("Welco...
<commit_before>from flask import request, session from . import main import twilio.twiml @main.route("/report_incident", methods=['GET', 'POST']) def handle_message(): step = session.get('step', 0) message = request.values.get('Body') # noqa resp = twilio.twiml.Response() if step is 0: resp...
db5f4d9325d1f1c67160c925b83e8a4574d4cb9a
portal/factories/celery.py
portal/factories/celery.py
from __future__ import absolute_import from celery import Celery __celery = None def create_celery(app): global __celery if __celery: return __celery celery = Celery( app.import_name, broker=app.config['CELERY_BROKER_URL'] ) celery.conf.update(app.config) TaskBase = c...
from __future__ import absolute_import from celery import Celery from ..extensions import db __celery = None def create_celery(app): global __celery if __celery: return __celery celery = Celery( app.import_name, broker=app.config['CELERY_BROKER_URL'] ) celery.conf.update...
Remove DB session after task
Remove DB session after task
Python
bsd-3-clause
uwcirg/true_nth_usa_portal,uwcirg/true_nth_usa_portal,uwcirg/true_nth_usa_portal,uwcirg/true_nth_usa_portal
from __future__ import absolute_import from celery import Celery __celery = None def create_celery(app): global __celery if __celery: return __celery celery = Celery( app.import_name, broker=app.config['CELERY_BROKER_URL'] ) celery.conf.update(app.config) TaskBase = c...
from __future__ import absolute_import from celery import Celery from ..extensions import db __celery = None def create_celery(app): global __celery if __celery: return __celery celery = Celery( app.import_name, broker=app.config['CELERY_BROKER_URL'] ) celery.conf.update...
<commit_before>from __future__ import absolute_import from celery import Celery __celery = None def create_celery(app): global __celery if __celery: return __celery celery = Celery( app.import_name, broker=app.config['CELERY_BROKER_URL'] ) celery.conf.update(app.config) ...
from __future__ import absolute_import from celery import Celery from ..extensions import db __celery = None def create_celery(app): global __celery if __celery: return __celery celery = Celery( app.import_name, broker=app.config['CELERY_BROKER_URL'] ) celery.conf.update...
from __future__ import absolute_import from celery import Celery __celery = None def create_celery(app): global __celery if __celery: return __celery celery = Celery( app.import_name, broker=app.config['CELERY_BROKER_URL'] ) celery.conf.update(app.config) TaskBase = c...
<commit_before>from __future__ import absolute_import from celery import Celery __celery = None def create_celery(app): global __celery if __celery: return __celery celery = Celery( app.import_name, broker=app.config['CELERY_BROKER_URL'] ) celery.conf.update(app.config) ...
eb796cc0473ee1c3805e172e5f8035ef16f89c76
micromanager/resources/base.py
micromanager/resources/base.py
from abc import ABCMeta, abstractmethod from googleapiclienthelpers.discovery import build_subresource class ResourceBase(metaclass=ABCMeta): @abstractmethod def get(self): pass @abstractmethod def update(self): pass class GoogleAPIResourceBase(ResourceBase, metaclass=ABCMeta): ...
from abc import ABCMeta, abstractmethod from googleapiclienthelpers.discovery import build_subresource class ResourceBase(metaclass=ABCMeta): @abstractmethod def get(self): pass @abstractmethod def update(self): pass class GoogleAPIResourceBase(ResourceBase, metaclass=ABCMeta): ...
Add a 'type()' function to resources for policy engines to lookup policies
Add a 'type()' function to resources for policy engines to lookup policies
Python
apache-2.0
forseti-security/resource-policy-evaluation-library
from abc import ABCMeta, abstractmethod from googleapiclienthelpers.discovery import build_subresource class ResourceBase(metaclass=ABCMeta): @abstractmethod def get(self): pass @abstractmethod def update(self): pass class GoogleAPIResourceBase(ResourceBase, metaclass=ABCMeta): ...
from abc import ABCMeta, abstractmethod from googleapiclienthelpers.discovery import build_subresource class ResourceBase(metaclass=ABCMeta): @abstractmethod def get(self): pass @abstractmethod def update(self): pass class GoogleAPIResourceBase(ResourceBase, metaclass=ABCMeta): ...
<commit_before>from abc import ABCMeta, abstractmethod from googleapiclienthelpers.discovery import build_subresource class ResourceBase(metaclass=ABCMeta): @abstractmethod def get(self): pass @abstractmethod def update(self): pass class GoogleAPIResourceBase(ResourceBase, metaclas...
from abc import ABCMeta, abstractmethod from googleapiclienthelpers.discovery import build_subresource class ResourceBase(metaclass=ABCMeta): @abstractmethod def get(self): pass @abstractmethod def update(self): pass class GoogleAPIResourceBase(ResourceBase, metaclass=ABCMeta): ...
from abc import ABCMeta, abstractmethod from googleapiclienthelpers.discovery import build_subresource class ResourceBase(metaclass=ABCMeta): @abstractmethod def get(self): pass @abstractmethod def update(self): pass class GoogleAPIResourceBase(ResourceBase, metaclass=ABCMeta): ...
<commit_before>from abc import ABCMeta, abstractmethod from googleapiclienthelpers.discovery import build_subresource class ResourceBase(metaclass=ABCMeta): @abstractmethod def get(self): pass @abstractmethod def update(self): pass class GoogleAPIResourceBase(ResourceBase, metaclas...
4de06bbbda30adb1b91ba0e35986761de4a0ed46
cluster/management/commands/update_jobs.py
cluster/management/commands/update_jobs.py
import logging from django.core.management.base import BaseCommand from django.contrib.auth import get_user_model from cluster.utils import get_jobs logger = logging.getLogger(__name__) class Command(BaseCommand): args = '' help = 'Update Job data from clusters' def handle(self, *args, **options): ...
import logging from django.core.management.base import BaseCommand from django.contrib.auth import get_user_model from cluster.utils import get_jobs logger = logging.getLogger(__name__) class Command(BaseCommand): args = '' help = 'Update Job data from clusters' def handle(self, *args, **options): ...
Fix typo where get_user_model() was used rather than the user
Fix typo where get_user_model() was used rather than the user
Python
mit
crcollins/chemtools-webapp,crcollins/chemtools-webapp,crcollins/chemtools-webapp,crcollins/chemtools-webapp,crcollins/chemtools-webapp
import logging from django.core.management.base import BaseCommand from django.contrib.auth import get_user_model from cluster.utils import get_jobs logger = logging.getLogger(__name__) class Command(BaseCommand): args = '' help = 'Update Job data from clusters' def handle(self, *args, **options): ...
import logging from django.core.management.base import BaseCommand from django.contrib.auth import get_user_model from cluster.utils import get_jobs logger = logging.getLogger(__name__) class Command(BaseCommand): args = '' help = 'Update Job data from clusters' def handle(self, *args, **options): ...
<commit_before>import logging from django.core.management.base import BaseCommand from django.contrib.auth import get_user_model from cluster.utils import get_jobs logger = logging.getLogger(__name__) class Command(BaseCommand): args = '' help = 'Update Job data from clusters' def handle(self, *args,...
import logging from django.core.management.base import BaseCommand from django.contrib.auth import get_user_model from cluster.utils import get_jobs logger = logging.getLogger(__name__) class Command(BaseCommand): args = '' help = 'Update Job data from clusters' def handle(self, *args, **options): ...
import logging from django.core.management.base import BaseCommand from django.contrib.auth import get_user_model from cluster.utils import get_jobs logger = logging.getLogger(__name__) class Command(BaseCommand): args = '' help = 'Update Job data from clusters' def handle(self, *args, **options): ...
<commit_before>import logging from django.core.management.base import BaseCommand from django.contrib.auth import get_user_model from cluster.utils import get_jobs logger = logging.getLogger(__name__) class Command(BaseCommand): args = '' help = 'Update Job data from clusters' def handle(self, *args,...
df3ccf1b848ab3829f16ff0486c677763e5b383b
lc034_find_first_and_last_position_of_element_in_sorted_array.py
lc034_find_first_and_last_position_of_element_in_sorted_array.py
"""Leetcode 34. Find First and Last Position of Element in Sorted Array Medium Given an array of integers nums sorted in ascending order, find the starting and ending position of a given target value. Your algorithm's runtime complexity must be in the order of O(log n). If the target is not found in the array, retu...
"""Leetcode 34. Find First and Last Position of Element in Sorted Array Medium Given an array of integers nums sorted in ascending order, find the starting and ending position of a given target value. Your algorithm's runtime complexity must be in the order of O(log n). If the target is not found in the array, retu...
Complete sol by 2 binary searches
Complete sol by 2 binary searches
Python
bsd-2-clause
bowen0701/algorithms_data_structures
"""Leetcode 34. Find First and Last Position of Element in Sorted Array Medium Given an array of integers nums sorted in ascending order, find the starting and ending position of a given target value. Your algorithm's runtime complexity must be in the order of O(log n). If the target is not found in the array, retu...
"""Leetcode 34. Find First and Last Position of Element in Sorted Array Medium Given an array of integers nums sorted in ascending order, find the starting and ending position of a given target value. Your algorithm's runtime complexity must be in the order of O(log n). If the target is not found in the array, retu...
<commit_before>"""Leetcode 34. Find First and Last Position of Element in Sorted Array Medium Given an array of integers nums sorted in ascending order, find the starting and ending position of a given target value. Your algorithm's runtime complexity must be in the order of O(log n). If the target is not found in ...
"""Leetcode 34. Find First and Last Position of Element in Sorted Array Medium Given an array of integers nums sorted in ascending order, find the starting and ending position of a given target value. Your algorithm's runtime complexity must be in the order of O(log n). If the target is not found in the array, retu...
"""Leetcode 34. Find First and Last Position of Element in Sorted Array Medium Given an array of integers nums sorted in ascending order, find the starting and ending position of a given target value. Your algorithm's runtime complexity must be in the order of O(log n). If the target is not found in the array, retu...
<commit_before>"""Leetcode 34. Find First and Last Position of Element in Sorted Array Medium Given an array of integers nums sorted in ascending order, find the starting and ending position of a given target value. Your algorithm's runtime complexity must be in the order of O(log n). If the target is not found in ...
b98aff1d853b5a92f25dad55571d81623f524d95
cozyfuse/interface/app_modified.py
cozyfuse/interface/app_modified.py
#!/usr/bin/env python # -*- coding: UTF-8 -*- import wx import gettext from CozyFrame import CozyFrame, TaskBarIcon if __name__ == "__main__": gettext.install("app") # replace with the appropriate catalog name app = wx.PySimpleApp(0) wx.InitAllImageHandlers() cozy_frame = CozyFrame(None, wx.ID_ANY, "...
#!/usr/bin/env python # -*- coding: UTF-8 -*- import wx import gettext from CozyFrame import CozyFrame, TaskBarIcon if __name__ == "__main__": gettext.install("app") # replace with the appropriate catalog name app = wx.PySimpleApp(0) wx.InitAllImageHandlers() cozy_frame = CozyFrame(None, wx.ID_ANY, "...
Integrate tray icon in the app
[ref] Integrate tray icon in the app
Python
bsd-3-clause
cozy-labs/cozy-fuse
#!/usr/bin/env python # -*- coding: UTF-8 -*- import wx import gettext from CozyFrame import CozyFrame, TaskBarIcon if __name__ == "__main__": gettext.install("app") # replace with the appropriate catalog name app = wx.PySimpleApp(0) wx.InitAllImageHandlers() cozy_frame = CozyFrame(None, wx.ID_ANY, "...
#!/usr/bin/env python # -*- coding: UTF-8 -*- import wx import gettext from CozyFrame import CozyFrame, TaskBarIcon if __name__ == "__main__": gettext.install("app") # replace with the appropriate catalog name app = wx.PySimpleApp(0) wx.InitAllImageHandlers() cozy_frame = CozyFrame(None, wx.ID_ANY, "...
<commit_before>#!/usr/bin/env python # -*- coding: UTF-8 -*- import wx import gettext from CozyFrame import CozyFrame, TaskBarIcon if __name__ == "__main__": gettext.install("app") # replace with the appropriate catalog name app = wx.PySimpleApp(0) wx.InitAllImageHandlers() cozy_frame = CozyFrame(Non...
#!/usr/bin/env python # -*- coding: UTF-8 -*- import wx import gettext from CozyFrame import CozyFrame, TaskBarIcon if __name__ == "__main__": gettext.install("app") # replace with the appropriate catalog name app = wx.PySimpleApp(0) wx.InitAllImageHandlers() cozy_frame = CozyFrame(None, wx.ID_ANY, "...
#!/usr/bin/env python # -*- coding: UTF-8 -*- import wx import gettext from CozyFrame import CozyFrame, TaskBarIcon if __name__ == "__main__": gettext.install("app") # replace with the appropriate catalog name app = wx.PySimpleApp(0) wx.InitAllImageHandlers() cozy_frame = CozyFrame(None, wx.ID_ANY, "...
<commit_before>#!/usr/bin/env python # -*- coding: UTF-8 -*- import wx import gettext from CozyFrame import CozyFrame, TaskBarIcon if __name__ == "__main__": gettext.install("app") # replace with the appropriate catalog name app = wx.PySimpleApp(0) wx.InitAllImageHandlers() cozy_frame = CozyFrame(Non...
8c9f1c7722f1e35c440ba3540153e2cfe8ad9187
scikits/learn/tests/test_base.py
scikits/learn/tests/test_base.py
from nose.tools import assert_true, assert_false, assert_equal from ..base import BaseEstimator class MyEstimator(BaseEstimator): def __init__(self, l1=0): self.l1 = l1 def test_renew(): """Tests that BaseEstimator._new() creates a correct deep copy. We create an estimator, make a copy of its or...
from nose.tools import assert_true, assert_false, assert_equal from ..base import BaseEstimator class MyEstimator(BaseEstimator): def __init__(self, l1=0): self.l1 = l1 def test_reinit(): """Tests that BaseEstimator._new() creates a correct deep copy. We create an estimator, make a copy of its o...
Change test name for the _reinit() method.
Change test name for the _reinit() method.
Python
bsd-3-clause
massmutual/scikit-learn,tosolveit/scikit-learn,idlead/scikit-learn,russel1237/scikit-learn,manhhomienbienthuy/scikit-learn,ChanChiChoi/scikit-learn,Barmaley-exe/scikit-learn,equialgo/scikit-learn,maheshakya/scikit-learn,PatrickChrist/scikit-learn,liyu1990/sklearn,ahoyosid/scikit-learn,huobaowangxi/scikit-learn,kashif/s...
from nose.tools import assert_true, assert_false, assert_equal from ..base import BaseEstimator class MyEstimator(BaseEstimator): def __init__(self, l1=0): self.l1 = l1 def test_renew(): """Tests that BaseEstimator._new() creates a correct deep copy. We create an estimator, make a copy of its or...
from nose.tools import assert_true, assert_false, assert_equal from ..base import BaseEstimator class MyEstimator(BaseEstimator): def __init__(self, l1=0): self.l1 = l1 def test_reinit(): """Tests that BaseEstimator._new() creates a correct deep copy. We create an estimator, make a copy of its o...
<commit_before>from nose.tools import assert_true, assert_false, assert_equal from ..base import BaseEstimator class MyEstimator(BaseEstimator): def __init__(self, l1=0): self.l1 = l1 def test_renew(): """Tests that BaseEstimator._new() creates a correct deep copy. We create an estimator, make a...
from nose.tools import assert_true, assert_false, assert_equal from ..base import BaseEstimator class MyEstimator(BaseEstimator): def __init__(self, l1=0): self.l1 = l1 def test_reinit(): """Tests that BaseEstimator._new() creates a correct deep copy. We create an estimator, make a copy of its o...
from nose.tools import assert_true, assert_false, assert_equal from ..base import BaseEstimator class MyEstimator(BaseEstimator): def __init__(self, l1=0): self.l1 = l1 def test_renew(): """Tests that BaseEstimator._new() creates a correct deep copy. We create an estimator, make a copy of its or...
<commit_before>from nose.tools import assert_true, assert_false, assert_equal from ..base import BaseEstimator class MyEstimator(BaseEstimator): def __init__(self, l1=0): self.l1 = l1 def test_renew(): """Tests that BaseEstimator._new() creates a correct deep copy. We create an estimator, make a...
bcec4724dc434218f7b2bce0aaabf391f86847b6
ocradmin/core/decorators.py
ocradmin/core/decorators.py
# Miscellaneos functions relating the projects app import os from datetime import datetime from django.http import HttpResponseRedirect from django.utils.http import urlquote from django.conf import settings def project_required(func): """ Decorator function for other actions that require a project to be ...
# Miscellaneos functions relating the projects app import os from datetime import datetime from django.http import HttpResponseRedirect from django.utils.http import urlquote from django.conf import settings def project_required(func): """ Decorator function for other actions that require a project to be ...
Add plugins to the domains which handle temp files
Add plugins to the domains which handle temp files
Python
apache-2.0
vitorio/ocropodium,vitorio/ocropodium,vitorio/ocropodium,vitorio/ocropodium
# Miscellaneos functions relating the projects app import os from datetime import datetime from django.http import HttpResponseRedirect from django.utils.http import urlquote from django.conf import settings def project_required(func): """ Decorator function for other actions that require a project to be ...
# Miscellaneos functions relating the projects app import os from datetime import datetime from django.http import HttpResponseRedirect from django.utils.http import urlquote from django.conf import settings def project_required(func): """ Decorator function for other actions that require a project to be ...
<commit_before># Miscellaneos functions relating the projects app import os from datetime import datetime from django.http import HttpResponseRedirect from django.utils.http import urlquote from django.conf import settings def project_required(func): """ Decorator function for other actions that require a...
# Miscellaneos functions relating the projects app import os from datetime import datetime from django.http import HttpResponseRedirect from django.utils.http import urlquote from django.conf import settings def project_required(func): """ Decorator function for other actions that require a project to be ...
# Miscellaneos functions relating the projects app import os from datetime import datetime from django.http import HttpResponseRedirect from django.utils.http import urlquote from django.conf import settings def project_required(func): """ Decorator function for other actions that require a project to be ...
<commit_before># Miscellaneos functions relating the projects app import os from datetime import datetime from django.http import HttpResponseRedirect from django.utils.http import urlquote from django.conf import settings def project_required(func): """ Decorator function for other actions that require a...
dde17a556103120ffbdf3dc08b822da2a781ff7e
myproject/myproject/project_settings.py
myproject/myproject/project_settings.py
# Project Settings - Settings that don't exist in settings.py that you want to # add (e.g. USE_THOUSAND_SEPARATOR, GRAPPELLI_ADMIN_TITLE, CELERYBEAT_SCHEDULER, # CELERYD_PREFETCH_MULTIPLIER, etc.) #USE_THOUSAND_SEPARATOR = True #GRAPPELLI_ADMIN_TITLE = '' #import djcelery #djcelery.setup_loader() #CELERYBEAT_SCHEDUL...
# Project Settings - Settings that don't exist in settings.py that you want to # add (e.g. USE_THOUSAND_SEPARATOR, GRAPPELLI_ADMIN_TITLE, CELERYBEAT_SCHEDULER, # CELERYD_PREFETCH_MULTIPLIER, etc.) #USE_THOUSAND_SEPARATOR = True #GRAPPELLI_ADMIN_TITLE = '' #import djcelery #djcelery.setup_loader() #CELERYBEAT_SCHEDUL...
Use production settings by default; Display settings version in use
Use production settings by default; Display settings version in use
Python
unlicense
django-settings/django-settings
# Project Settings - Settings that don't exist in settings.py that you want to # add (e.g. USE_THOUSAND_SEPARATOR, GRAPPELLI_ADMIN_TITLE, CELERYBEAT_SCHEDULER, # CELERYD_PREFETCH_MULTIPLIER, etc.) #USE_THOUSAND_SEPARATOR = True #GRAPPELLI_ADMIN_TITLE = '' #import djcelery #djcelery.setup_loader() #CELERYBEAT_SCHEDUL...
# Project Settings - Settings that don't exist in settings.py that you want to # add (e.g. USE_THOUSAND_SEPARATOR, GRAPPELLI_ADMIN_TITLE, CELERYBEAT_SCHEDULER, # CELERYD_PREFETCH_MULTIPLIER, etc.) #USE_THOUSAND_SEPARATOR = True #GRAPPELLI_ADMIN_TITLE = '' #import djcelery #djcelery.setup_loader() #CELERYBEAT_SCHEDUL...
<commit_before># Project Settings - Settings that don't exist in settings.py that you want to # add (e.g. USE_THOUSAND_SEPARATOR, GRAPPELLI_ADMIN_TITLE, CELERYBEAT_SCHEDULER, # CELERYD_PREFETCH_MULTIPLIER, etc.) #USE_THOUSAND_SEPARATOR = True #GRAPPELLI_ADMIN_TITLE = '' #import djcelery #djcelery.setup_loader() #CEL...
# Project Settings - Settings that don't exist in settings.py that you want to # add (e.g. USE_THOUSAND_SEPARATOR, GRAPPELLI_ADMIN_TITLE, CELERYBEAT_SCHEDULER, # CELERYD_PREFETCH_MULTIPLIER, etc.) #USE_THOUSAND_SEPARATOR = True #GRAPPELLI_ADMIN_TITLE = '' #import djcelery #djcelery.setup_loader() #CELERYBEAT_SCHEDUL...
# Project Settings - Settings that don't exist in settings.py that you want to # add (e.g. USE_THOUSAND_SEPARATOR, GRAPPELLI_ADMIN_TITLE, CELERYBEAT_SCHEDULER, # CELERYD_PREFETCH_MULTIPLIER, etc.) #USE_THOUSAND_SEPARATOR = True #GRAPPELLI_ADMIN_TITLE = '' #import djcelery #djcelery.setup_loader() #CELERYBEAT_SCHEDUL...
<commit_before># Project Settings - Settings that don't exist in settings.py that you want to # add (e.g. USE_THOUSAND_SEPARATOR, GRAPPELLI_ADMIN_TITLE, CELERYBEAT_SCHEDULER, # CELERYD_PREFETCH_MULTIPLIER, etc.) #USE_THOUSAND_SEPARATOR = True #GRAPPELLI_ADMIN_TITLE = '' #import djcelery #djcelery.setup_loader() #CEL...
c321a8fea477608172ac9f0421b8b3318ff6d388
carbonitex/carbonitex.py
carbonitex/carbonitex.py
import asyncio from urllib.request import urlopen from jshbot import configurations from jshbot.exceptions import BotException from jshbot.utilities import future __version__ = '0.1.0' EXCEPTION = 'Carbonitex Data Pusher' uses_configuration = True def get_commands(): return [] async def bot_on_ready_boot(bot...
import asyncio from urllib.request import urlopen from jshbot import configurations from jshbot.exceptions import BotException from jshbot.utilities import future __version__ = '0.1.1' EXCEPTION = 'Carbonitex Data Pusher' uses_configuration = True def get_commands(): return [] async def bot_on_ready_boot(bot...
Adjust for multiple bot instances
Adjust for multiple bot instances
Python
mit
jkchen2/JshBot-plugins
import asyncio from urllib.request import urlopen from jshbot import configurations from jshbot.exceptions import BotException from jshbot.utilities import future __version__ = '0.1.0' EXCEPTION = 'Carbonitex Data Pusher' uses_configuration = True def get_commands(): return [] async def bot_on_ready_boot(bot...
import asyncio from urllib.request import urlopen from jshbot import configurations from jshbot.exceptions import BotException from jshbot.utilities import future __version__ = '0.1.1' EXCEPTION = 'Carbonitex Data Pusher' uses_configuration = True def get_commands(): return [] async def bot_on_ready_boot(bot...
<commit_before>import asyncio from urllib.request import urlopen from jshbot import configurations from jshbot.exceptions import BotException from jshbot.utilities import future __version__ = '0.1.0' EXCEPTION = 'Carbonitex Data Pusher' uses_configuration = True def get_commands(): return [] async def bot_on...
import asyncio from urllib.request import urlopen from jshbot import configurations from jshbot.exceptions import BotException from jshbot.utilities import future __version__ = '0.1.1' EXCEPTION = 'Carbonitex Data Pusher' uses_configuration = True def get_commands(): return [] async def bot_on_ready_boot(bot...
import asyncio from urllib.request import urlopen from jshbot import configurations from jshbot.exceptions import BotException from jshbot.utilities import future __version__ = '0.1.0' EXCEPTION = 'Carbonitex Data Pusher' uses_configuration = True def get_commands(): return [] async def bot_on_ready_boot(bot...
<commit_before>import asyncio from urllib.request import urlopen from jshbot import configurations from jshbot.exceptions import BotException from jshbot.utilities import future __version__ = '0.1.0' EXCEPTION = 'Carbonitex Data Pusher' uses_configuration = True def get_commands(): return [] async def bot_on...
8994c346bcd319e97e93b9eb66707df1016d28e9
nilmtk/__init__.py
nilmtk/__init__.py
# re-enable deprecation warnings import warnings warnings.simplefilter('default') from nilmtk import * from nilmtk.version import version as __version__ from nilmtk.timeframe import TimeFrame from nilmtk.elecmeter import ElecMeter from nilmtk.datastore import DataStore, HDFDataStore, CSVDataStore, Key from nilmtk.mete...
# re-enable deprecation warnings import warnings warnings.simplefilter('default') from nilmtk import * from nilmtk.version import version as __version__ from nilmtk.timeframe import TimeFrame from nilmtk.elecmeter import ElecMeter from nilmtk.datastore import DataStore, HDFDataStore, CSVDataStore, Key from nilmtk.mete...
Make sure all .h5 files are closed before trying to remove them while testing
Make sure all .h5 files are closed before trying to remove them while testing
Python
apache-2.0
nilmtk/nilmtk,nilmtk/nilmtk
# re-enable deprecation warnings import warnings warnings.simplefilter('default') from nilmtk import * from nilmtk.version import version as __version__ from nilmtk.timeframe import TimeFrame from nilmtk.elecmeter import ElecMeter from nilmtk.datastore import DataStore, HDFDataStore, CSVDataStore, Key from nilmtk.mete...
# re-enable deprecation warnings import warnings warnings.simplefilter('default') from nilmtk import * from nilmtk.version import version as __version__ from nilmtk.timeframe import TimeFrame from nilmtk.elecmeter import ElecMeter from nilmtk.datastore import DataStore, HDFDataStore, CSVDataStore, Key from nilmtk.mete...
<commit_before># re-enable deprecation warnings import warnings warnings.simplefilter('default') from nilmtk import * from nilmtk.version import version as __version__ from nilmtk.timeframe import TimeFrame from nilmtk.elecmeter import ElecMeter from nilmtk.datastore import DataStore, HDFDataStore, CSVDataStore, Key f...
# re-enable deprecation warnings import warnings warnings.simplefilter('default') from nilmtk import * from nilmtk.version import version as __version__ from nilmtk.timeframe import TimeFrame from nilmtk.elecmeter import ElecMeter from nilmtk.datastore import DataStore, HDFDataStore, CSVDataStore, Key from nilmtk.mete...
# re-enable deprecation warnings import warnings warnings.simplefilter('default') from nilmtk import * from nilmtk.version import version as __version__ from nilmtk.timeframe import TimeFrame from nilmtk.elecmeter import ElecMeter from nilmtk.datastore import DataStore, HDFDataStore, CSVDataStore, Key from nilmtk.mete...
<commit_before># re-enable deprecation warnings import warnings warnings.simplefilter('default') from nilmtk import * from nilmtk.version import version as __version__ from nilmtk.timeframe import TimeFrame from nilmtk.elecmeter import ElecMeter from nilmtk.datastore import DataStore, HDFDataStore, CSVDataStore, Key f...
9509389f871a20465740494dd32a8d581572dd63
grammpy/Rule.py
grammpy/Rule.py
#!/usr/bin/env python """ :Author Patrik Valkovic :Created 23.06.2017 16:39 :Licence GNUv3 Part of grammpy """ from .Constants import EPSILON class Rule: #TODO rules -> rule -> left/right -> rules right = [EPSILON] left = [EPSILON] rule = ([EPSILON], [EPSILON]) rules = [([EPSILON], [EPSILON])] ...
#!/usr/bin/env python """ :Author Patrik Valkovic :Created 23.06.2017 16:39 :Licence GNUv3 Part of grammpy """ from .Constants import EPSILON class Rule: #TODO rules -> rule -> left/right -> fromSymbol/toSymbol -> rules fromSymbol = EPSILON toSymbol = EPSILON right = [EPSILON] left = [EPSILON] ...
Add fromSymbol and toSymbol to rule
Add fromSymbol and toSymbol to rule
Python
mit
PatrikValkovic/grammpy
#!/usr/bin/env python """ :Author Patrik Valkovic :Created 23.06.2017 16:39 :Licence GNUv3 Part of grammpy """ from .Constants import EPSILON class Rule: #TODO rules -> rule -> left/right -> rules right = [EPSILON] left = [EPSILON] rule = ([EPSILON], [EPSILON]) rules = [([EPSILON], [EPSILON])] ...
#!/usr/bin/env python """ :Author Patrik Valkovic :Created 23.06.2017 16:39 :Licence GNUv3 Part of grammpy """ from .Constants import EPSILON class Rule: #TODO rules -> rule -> left/right -> fromSymbol/toSymbol -> rules fromSymbol = EPSILON toSymbol = EPSILON right = [EPSILON] left = [EPSILON] ...
<commit_before>#!/usr/bin/env python """ :Author Patrik Valkovic :Created 23.06.2017 16:39 :Licence GNUv3 Part of grammpy """ from .Constants import EPSILON class Rule: #TODO rules -> rule -> left/right -> rules right = [EPSILON] left = [EPSILON] rule = ([EPSILON], [EPSILON]) rules = [([EPSILON]...
#!/usr/bin/env python """ :Author Patrik Valkovic :Created 23.06.2017 16:39 :Licence GNUv3 Part of grammpy """ from .Constants import EPSILON class Rule: #TODO rules -> rule -> left/right -> fromSymbol/toSymbol -> rules fromSymbol = EPSILON toSymbol = EPSILON right = [EPSILON] left = [EPSILON] ...
#!/usr/bin/env python """ :Author Patrik Valkovic :Created 23.06.2017 16:39 :Licence GNUv3 Part of grammpy """ from .Constants import EPSILON class Rule: #TODO rules -> rule -> left/right -> rules right = [EPSILON] left = [EPSILON] rule = ([EPSILON], [EPSILON]) rules = [([EPSILON], [EPSILON])] ...
<commit_before>#!/usr/bin/env python """ :Author Patrik Valkovic :Created 23.06.2017 16:39 :Licence GNUv3 Part of grammpy """ from .Constants import EPSILON class Rule: #TODO rules -> rule -> left/right -> rules right = [EPSILON] left = [EPSILON] rule = ([EPSILON], [EPSILON]) rules = [([EPSILON]...
1cc892fd521ae33b1d492004411db3f1392295c4
enhydris/telemetry/tasks.py
enhydris/telemetry/tasks.py
from django.core.cache import cache from celery.utils.log import get_task_logger from enhydris.celery import app from enhydris.telemetry.models import Telemetry FETCH_TIMEOUT = 300 LOCK_TIMEOUT = FETCH_TIMEOUT + 60 logger = get_task_logger(__name__) @app.task def fetch_all_telemetry_data(): for telemetry in T...
from django.core.cache import cache from celery.utils.log import get_task_logger from enhydris.celery import app from enhydris.telemetry.models import Telemetry FETCH_TIMEOUT = 300 LOCK_TIMEOUT = FETCH_TIMEOUT + 60 logger = get_task_logger(__name__) @app.task def fetch_all_telemetry_data(): for telemetry in T...
Fix error in telemetry task
Fix error in telemetry task A condition had been changed to always match for debugging purposes, and was accidentally committed that way.
Python
agpl-3.0
openmeteo/enhydris,openmeteo/enhydris,openmeteo/enhydris,aptiko/enhydris,aptiko/enhydris,aptiko/enhydris
from django.core.cache import cache from celery.utils.log import get_task_logger from enhydris.celery import app from enhydris.telemetry.models import Telemetry FETCH_TIMEOUT = 300 LOCK_TIMEOUT = FETCH_TIMEOUT + 60 logger = get_task_logger(__name__) @app.task def fetch_all_telemetry_data(): for telemetry in T...
from django.core.cache import cache from celery.utils.log import get_task_logger from enhydris.celery import app from enhydris.telemetry.models import Telemetry FETCH_TIMEOUT = 300 LOCK_TIMEOUT = FETCH_TIMEOUT + 60 logger = get_task_logger(__name__) @app.task def fetch_all_telemetry_data(): for telemetry in T...
<commit_before>from django.core.cache import cache from celery.utils.log import get_task_logger from enhydris.celery import app from enhydris.telemetry.models import Telemetry FETCH_TIMEOUT = 300 LOCK_TIMEOUT = FETCH_TIMEOUT + 60 logger = get_task_logger(__name__) @app.task def fetch_all_telemetry_data(): for...
from django.core.cache import cache from celery.utils.log import get_task_logger from enhydris.celery import app from enhydris.telemetry.models import Telemetry FETCH_TIMEOUT = 300 LOCK_TIMEOUT = FETCH_TIMEOUT + 60 logger = get_task_logger(__name__) @app.task def fetch_all_telemetry_data(): for telemetry in T...
from django.core.cache import cache from celery.utils.log import get_task_logger from enhydris.celery import app from enhydris.telemetry.models import Telemetry FETCH_TIMEOUT = 300 LOCK_TIMEOUT = FETCH_TIMEOUT + 60 logger = get_task_logger(__name__) @app.task def fetch_all_telemetry_data(): for telemetry in T...
<commit_before>from django.core.cache import cache from celery.utils.log import get_task_logger from enhydris.celery import app from enhydris.telemetry.models import Telemetry FETCH_TIMEOUT = 300 LOCK_TIMEOUT = FETCH_TIMEOUT + 60 logger = get_task_logger(__name__) @app.task def fetch_all_telemetry_data(): for...
b8764f6045bbc1067806405ca2fba9c1622f997b
gweetr/utils.py
gweetr/utils.py
"""utils.py""" import random from pyechonest import config as echonest_config from pyechonest import song as echonest_song import rfc3987 from gweetr import app from gweetr.exceptions import GweetrError echonest_config.ECHO_NEST_API_KEY = app.config['ECHO_NEST_API_KEY'] def fetch_track(track_params): """ ...
"""utils.py""" import random from pyechonest import config as echonest_config from pyechonest import song as echonest_song import rfc3987 from gweetr import app from gweetr.exceptions import GweetrError echonest_config.ECHO_NEST_API_KEY = app.config['ECHO_NEST_API_KEY'] def fetch_track(track_params): """ ...
Remove unnecessary if true/else false
Remove unnecessary if true/else false
Python
mit
jbarbuto/gweetr
"""utils.py""" import random from pyechonest import config as echonest_config from pyechonest import song as echonest_song import rfc3987 from gweetr import app from gweetr.exceptions import GweetrError echonest_config.ECHO_NEST_API_KEY = app.config['ECHO_NEST_API_KEY'] def fetch_track(track_params): """ ...
"""utils.py""" import random from pyechonest import config as echonest_config from pyechonest import song as echonest_song import rfc3987 from gweetr import app from gweetr.exceptions import GweetrError echonest_config.ECHO_NEST_API_KEY = app.config['ECHO_NEST_API_KEY'] def fetch_track(track_params): """ ...
<commit_before>"""utils.py""" import random from pyechonest import config as echonest_config from pyechonest import song as echonest_song import rfc3987 from gweetr import app from gweetr.exceptions import GweetrError echonest_config.ECHO_NEST_API_KEY = app.config['ECHO_NEST_API_KEY'] def fetch_track(track_params...
"""utils.py""" import random from pyechonest import config as echonest_config from pyechonest import song as echonest_song import rfc3987 from gweetr import app from gweetr.exceptions import GweetrError echonest_config.ECHO_NEST_API_KEY = app.config['ECHO_NEST_API_KEY'] def fetch_track(track_params): """ ...
"""utils.py""" import random from pyechonest import config as echonest_config from pyechonest import song as echonest_song import rfc3987 from gweetr import app from gweetr.exceptions import GweetrError echonest_config.ECHO_NEST_API_KEY = app.config['ECHO_NEST_API_KEY'] def fetch_track(track_params): """ ...
<commit_before>"""utils.py""" import random from pyechonest import config as echonest_config from pyechonest import song as echonest_song import rfc3987 from gweetr import app from gweetr.exceptions import GweetrError echonest_config.ECHO_NEST_API_KEY = app.config['ECHO_NEST_API_KEY'] def fetch_track(track_params...
284cfbb4297d1d91c8c82e0f9a159a1614510ace
example.py
example.py
#!/usr/bin/env python from confman import ConfigSource options = \ { 'tags': ['desktop'], 'hostname': 'test', } from sys import argv from os import path samples_path = path.join(path.dirname(argv[0]), 'samples') c = ConfigSource(samples_path, "/tmp/dotfiles-test", None, options) c.analyze() c.check() c.sync(...
#!/usr/bin/env python from confman import ConfigSource options = \ { 'tags': ['desktop'], 'hostname': 'test', } from os import path samples_path = path.join(path.dirname(__file__), 'samples') c = ConfigSource(samples_path, "/tmp/dotfiles-test", None, options) c.analyze() c.check() c.sync() print from pprint...
Use __file__ instead of argv[0]
Use __file__ instead of argv[0]
Python
mit
laurentb/confman
#!/usr/bin/env python from confman import ConfigSource options = \ { 'tags': ['desktop'], 'hostname': 'test', } from sys import argv from os import path samples_path = path.join(path.dirname(argv[0]), 'samples') c = ConfigSource(samples_path, "/tmp/dotfiles-test", None, options) c.analyze() c.check() c.sync(...
#!/usr/bin/env python from confman import ConfigSource options = \ { 'tags': ['desktop'], 'hostname': 'test', } from os import path samples_path = path.join(path.dirname(__file__), 'samples') c = ConfigSource(samples_path, "/tmp/dotfiles-test", None, options) c.analyze() c.check() c.sync() print from pprint...
<commit_before>#!/usr/bin/env python from confman import ConfigSource options = \ { 'tags': ['desktop'], 'hostname': 'test', } from sys import argv from os import path samples_path = path.join(path.dirname(argv[0]), 'samples') c = ConfigSource(samples_path, "/tmp/dotfiles-test", None, options) c.analyze() c....
#!/usr/bin/env python from confman import ConfigSource options = \ { 'tags': ['desktop'], 'hostname': 'test', } from os import path samples_path = path.join(path.dirname(__file__), 'samples') c = ConfigSource(samples_path, "/tmp/dotfiles-test", None, options) c.analyze() c.check() c.sync() print from pprint...
#!/usr/bin/env python from confman import ConfigSource options = \ { 'tags': ['desktop'], 'hostname': 'test', } from sys import argv from os import path samples_path = path.join(path.dirname(argv[0]), 'samples') c = ConfigSource(samples_path, "/tmp/dotfiles-test", None, options) c.analyze() c.check() c.sync(...
<commit_before>#!/usr/bin/env python from confman import ConfigSource options = \ { 'tags': ['desktop'], 'hostname': 'test', } from sys import argv from os import path samples_path = path.join(path.dirname(argv[0]), 'samples') c = ConfigSource(samples_path, "/tmp/dotfiles-test", None, options) c.analyze() c....
4ade33843cb53362ef3eeea7bf7762d3e3edfa9f
sandbox/sandbox/urls.py
sandbox/sandbox/urls.py
from django.contrib import admin from django.conf import settings from django.conf.urls import patterns, include, url from oscar.app import shop from oscar_mws.dashboard.app import application as mws_app admin.autodiscover() urlpatterns = patterns( '', url(r'^admin/', include(admin.site.urls)), url(r'^d...
from django.contrib import admin from django.conf import settings from django.conf.urls import patterns, include, url from oscar.app import shop from oscar_mws.dashboard.app import application as mws_app admin.autodiscover() urlpatterns = patterns( '', url(r'^admin/', include(admin.site.urls)), # i18n U...
Add translation URLs as required by Oscar
Add translation URLs as required by Oscar Fixes #5.
Python
bsd-3-clause
django-oscar/django-oscar-mws,django-oscar/django-oscar-mws
from django.contrib import admin from django.conf import settings from django.conf.urls import patterns, include, url from oscar.app import shop from oscar_mws.dashboard.app import application as mws_app admin.autodiscover() urlpatterns = patterns( '', url(r'^admin/', include(admin.site.urls)), url(r'^d...
from django.contrib import admin from django.conf import settings from django.conf.urls import patterns, include, url from oscar.app import shop from oscar_mws.dashboard.app import application as mws_app admin.autodiscover() urlpatterns = patterns( '', url(r'^admin/', include(admin.site.urls)), # i18n U...
<commit_before>from django.contrib import admin from django.conf import settings from django.conf.urls import patterns, include, url from oscar.app import shop from oscar_mws.dashboard.app import application as mws_app admin.autodiscover() urlpatterns = patterns( '', url(r'^admin/', include(admin.site.urls)...
from django.contrib import admin from django.conf import settings from django.conf.urls import patterns, include, url from oscar.app import shop from oscar_mws.dashboard.app import application as mws_app admin.autodiscover() urlpatterns = patterns( '', url(r'^admin/', include(admin.site.urls)), # i18n U...
from django.contrib import admin from django.conf import settings from django.conf.urls import patterns, include, url from oscar.app import shop from oscar_mws.dashboard.app import application as mws_app admin.autodiscover() urlpatterns = patterns( '', url(r'^admin/', include(admin.site.urls)), url(r'^d...
<commit_before>from django.contrib import admin from django.conf import settings from django.conf.urls import patterns, include, url from oscar.app import shop from oscar_mws.dashboard.app import application as mws_app admin.autodiscover() urlpatterns = patterns( '', url(r'^admin/', include(admin.site.urls)...
7f51f153f0fd1fd1dde06808879911897686f819
cities/Sample_City.py
cities/Sample_City.py
from bs4 import BeautifulSoup import json import datetime import pytz # The URL for the page where the parking lots are listed data_url = "http://example.com" # Name of the city, just in case it contains umlauts which this filename shouldn't city_name = "Sample City" # Name of this file (without '.py'), sorry for ne...
from bs4 import BeautifulSoup import datetime import pytz from geodata import GeoData # The URL for the page where the parking lots are listed data_url = "http://example.com" # Name of the city, just in case it contains umlauts which this filename shouldn't city_name = "Sample City" # Name of this file (without '.py...
Clean up sample city file
Clean up sample city file
Python
mit
offenesdresden/ParkAPI,Mic92/ParkAPI,offenesdresden/ParkAPI,Mic92/ParkAPI
from bs4 import BeautifulSoup import json import datetime import pytz # The URL for the page where the parking lots are listed data_url = "http://example.com" # Name of the city, just in case it contains umlauts which this filename shouldn't city_name = "Sample City" # Name of this file (without '.py'), sorry for ne...
from bs4 import BeautifulSoup import datetime import pytz from geodata import GeoData # The URL for the page where the parking lots are listed data_url = "http://example.com" # Name of the city, just in case it contains umlauts which this filename shouldn't city_name = "Sample City" # Name of this file (without '.py...
<commit_before>from bs4 import BeautifulSoup import json import datetime import pytz # The URL for the page where the parking lots are listed data_url = "http://example.com" # Name of the city, just in case it contains umlauts which this filename shouldn't city_name = "Sample City" # Name of this file (without '.py'...
from bs4 import BeautifulSoup import datetime import pytz from geodata import GeoData # The URL for the page where the parking lots are listed data_url = "http://example.com" # Name of the city, just in case it contains umlauts which this filename shouldn't city_name = "Sample City" # Name of this file (without '.py...
from bs4 import BeautifulSoup import json import datetime import pytz # The URL for the page where the parking lots are listed data_url = "http://example.com" # Name of the city, just in case it contains umlauts which this filename shouldn't city_name = "Sample City" # Name of this file (without '.py'), sorry for ne...
<commit_before>from bs4 import BeautifulSoup import json import datetime import pytz # The URL for the page where the parking lots are listed data_url = "http://example.com" # Name of the city, just in case it contains umlauts which this filename shouldn't city_name = "Sample City" # Name of this file (without '.py'...
07e9b55784f856c0175b4fbfeeceeb387abf7ad5
red_green_bar2.py
red_green_bar2.py
#!/usr/bin/env python2 ''' Given: 1. status code: (0 - OK, other value - BAD) 2. terminal window width shows red/green bar to visualize return code of previous command ''' import sys if len(sys.argv) >= 2: value = int(sys.argv[1]) cols_limit = int(sys.argv[2]) esc = chr(27) if value: col_cha...
#!/usr/bin/env python2 ''' Given: 1. status code: (0 - OK, other value - BAD) 2. terminal window width shows red/green bar to visualize return code of previous command ''' import sys if len(sys.argv) >= 2: value = int(sys.argv[1]) if value: col_char = '1' else: col_char = '2' cols_li...
Prepare for y (yellow) first argument
Prepare for y (yellow) first argument
Python
mit
kwadrat/rgb_tdd
#!/usr/bin/env python2 ''' Given: 1. status code: (0 - OK, other value - BAD) 2. terminal window width shows red/green bar to visualize return code of previous command ''' import sys if len(sys.argv) >= 2: value = int(sys.argv[1]) cols_limit = int(sys.argv[2]) esc = chr(27) if value: col_cha...
#!/usr/bin/env python2 ''' Given: 1. status code: (0 - OK, other value - BAD) 2. terminal window width shows red/green bar to visualize return code of previous command ''' import sys if len(sys.argv) >= 2: value = int(sys.argv[1]) if value: col_char = '1' else: col_char = '2' cols_li...
<commit_before>#!/usr/bin/env python2 ''' Given: 1. status code: (0 - OK, other value - BAD) 2. terminal window width shows red/green bar to visualize return code of previous command ''' import sys if len(sys.argv) >= 2: value = int(sys.argv[1]) cols_limit = int(sys.argv[2]) esc = chr(27) if value: ...
#!/usr/bin/env python2 ''' Given: 1. status code: (0 - OK, other value - BAD) 2. terminal window width shows red/green bar to visualize return code of previous command ''' import sys if len(sys.argv) >= 2: value = int(sys.argv[1]) if value: col_char = '1' else: col_char = '2' cols_li...
#!/usr/bin/env python2 ''' Given: 1. status code: (0 - OK, other value - BAD) 2. terminal window width shows red/green bar to visualize return code of previous command ''' import sys if len(sys.argv) >= 2: value = int(sys.argv[1]) cols_limit = int(sys.argv[2]) esc = chr(27) if value: col_cha...
<commit_before>#!/usr/bin/env python2 ''' Given: 1. status code: (0 - OK, other value - BAD) 2. terminal window width shows red/green bar to visualize return code of previous command ''' import sys if len(sys.argv) >= 2: value = int(sys.argv[1]) cols_limit = int(sys.argv[2]) esc = chr(27) if value: ...
084eb32734731ee23e33e7360ec9f92e1e533f01
__init__.py
__init__.py
from spinsys import constructors from spinsys import exceptions from spinsys import half from spinsys import hamiltonians from spinsys import quantities from spinsys import state_generators from spinsys import tests from spinsys import utils __all__ = [ "constructors", "exceptions", "half", "hamiltonia...
from spinsys import constructors from spinsys import exceptions from spinsys import half from spinsys import hamiltonians from spinsys import quantities from spinsys import state_generators from spinsys import tests from spinsys import utils import shutil import numpy __all__ = [ "constructors", "exceptions", ...
Set better defaults for numpy's print function
Set better defaults for numpy's print function
Python
bsd-3-clause
macthecadillac/spinsys
from spinsys import constructors from spinsys import exceptions from spinsys import half from spinsys import hamiltonians from spinsys import quantities from spinsys import state_generators from spinsys import tests from spinsys import utils __all__ = [ "constructors", "exceptions", "half", "hamiltonia...
from spinsys import constructors from spinsys import exceptions from spinsys import half from spinsys import hamiltonians from spinsys import quantities from spinsys import state_generators from spinsys import tests from spinsys import utils import shutil import numpy __all__ = [ "constructors", "exceptions", ...
<commit_before>from spinsys import constructors from spinsys import exceptions from spinsys import half from spinsys import hamiltonians from spinsys import quantities from spinsys import state_generators from spinsys import tests from spinsys import utils __all__ = [ "constructors", "exceptions", "half", ...
from spinsys import constructors from spinsys import exceptions from spinsys import half from spinsys import hamiltonians from spinsys import quantities from spinsys import state_generators from spinsys import tests from spinsys import utils import shutil import numpy __all__ = [ "constructors", "exceptions", ...
from spinsys import constructors from spinsys import exceptions from spinsys import half from spinsys import hamiltonians from spinsys import quantities from spinsys import state_generators from spinsys import tests from spinsys import utils __all__ = [ "constructors", "exceptions", "half", "hamiltonia...
<commit_before>from spinsys import constructors from spinsys import exceptions from spinsys import half from spinsys import hamiltonians from spinsys import quantities from spinsys import state_generators from spinsys import tests from spinsys import utils __all__ = [ "constructors", "exceptions", "half", ...
98506d6ba1d1e7c8d3cf62d97f7c3f2f23bc4841
chainer/training/extensions/value_observation.py
chainer/training/extensions/value_observation.py
from chainer.training import extension def observe_value(observation_key, target_func): """Returns a trainer extension to continuously record a value. Args: observation_key (str): Key of observation to record. target_func (function): Function that returns the value to record. It m...
from chainer.training import extension def observe_value(observation_key, target_func): """Returns a trainer extension to continuously record a value. Args: observation_key (str): Key of observation to record. target_func (function): Function that returns the value to record. It m...
Document observe_value and observe_lr trigger interval
Document observe_value and observe_lr trigger interval
Python
mit
hvy/chainer,niboshi/chainer,okuta/chainer,hvy/chainer,keisuke-umezawa/chainer,chainer/chainer,chainer/chainer,niboshi/chainer,niboshi/chainer,wkentaro/chainer,keisuke-umezawa/chainer,pfnet/chainer,chainer/chainer,okuta/chainer,hvy/chainer,niboshi/chainer,wkentaro/chainer,wkentaro/chainer,okuta/chainer,wkentaro/chainer,...
from chainer.training import extension def observe_value(observation_key, target_func): """Returns a trainer extension to continuously record a value. Args: observation_key (str): Key of observation to record. target_func (function): Function that returns the value to record. It m...
from chainer.training import extension def observe_value(observation_key, target_func): """Returns a trainer extension to continuously record a value. Args: observation_key (str): Key of observation to record. target_func (function): Function that returns the value to record. It m...
<commit_before>from chainer.training import extension def observe_value(observation_key, target_func): """Returns a trainer extension to continuously record a value. Args: observation_key (str): Key of observation to record. target_func (function): Function that returns the value to record. ...
from chainer.training import extension def observe_value(observation_key, target_func): """Returns a trainer extension to continuously record a value. Args: observation_key (str): Key of observation to record. target_func (function): Function that returns the value to record. It m...
from chainer.training import extension def observe_value(observation_key, target_func): """Returns a trainer extension to continuously record a value. Args: observation_key (str): Key of observation to record. target_func (function): Function that returns the value to record. It m...
<commit_before>from chainer.training import extension def observe_value(observation_key, target_func): """Returns a trainer extension to continuously record a value. Args: observation_key (str): Key of observation to record. target_func (function): Function that returns the value to record. ...
3a5a6db3b869841cf5c55eed2f5ec877a443a571
chrome/test/functional/chromeos_html_terminal.py
chrome/test/functional/chromeos_html_terminal.py
#!/usr/bin/env python # Copyright (c) 2012 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. import os import pyauto_functional # must be imported before pyauto import pyauto class ChromeosHTMLTerminalTest(pyauto.PyUITes...
#!/usr/bin/env python # Copyright (c) 2012 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. import os import pyauto_functional # must be imported before pyauto import pyauto class ChromeosHTMLTerminalTest(pyauto.PyUITes...
Add uninstall HTML Terminal extension
Add uninstall HTML Terminal extension BUG= TEST=This is a test to uninstall HTML terminal extension Review URL: https://chromiumcodereview.appspot.com/10332227 git-svn-id: de016e52bd170d2d4f2344f9bf92d50478b649e0@137790 0039d316-1c4b-4281-b951-d872f2087c98
Python
bsd-3-clause
hgl888/chromium-crosswalk,markYoungH/chromium.src,hujiajie/pa-chromium,hujiajie/pa-chromium,TheTypoMaster/chromium-crosswalk,zcbenz/cefode-chromium,Chilledheart/chromium,timopulkkinen/BubbleFish,dushu1203/chromium.src,junmin-zhu/chromium-rivertrail,Pluto-tv/chromium-crosswalk,zcbenz/cefode-chromium,crosswalk-project/ch...
#!/usr/bin/env python # Copyright (c) 2012 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. import os import pyauto_functional # must be imported before pyauto import pyauto class ChromeosHTMLTerminalTest(pyauto.PyUITes...
#!/usr/bin/env python # Copyright (c) 2012 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. import os import pyauto_functional # must be imported before pyauto import pyauto class ChromeosHTMLTerminalTest(pyauto.PyUITes...
<commit_before>#!/usr/bin/env python # Copyright (c) 2012 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. import os import pyauto_functional # must be imported before pyauto import pyauto class ChromeosHTMLTerminalTest...
#!/usr/bin/env python # Copyright (c) 2012 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. import os import pyauto_functional # must be imported before pyauto import pyauto class ChromeosHTMLTerminalTest(pyauto.PyUITes...
#!/usr/bin/env python # Copyright (c) 2012 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. import os import pyauto_functional # must be imported before pyauto import pyauto class ChromeosHTMLTerminalTest(pyauto.PyUITes...
<commit_before>#!/usr/bin/env python # Copyright (c) 2012 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. import os import pyauto_functional # must be imported before pyauto import pyauto class ChromeosHTMLTerminalTest...
e1703021a467b38d61e59da5aff5e7280b021ade
TutsPy/tut.py
TutsPy/tut.py
import re import requests from bs4 import BeautifulSoup from utils import download_file import os SUBJECT = 'seo' INDEX_ENDPOINT = 'http://www.tutorialspoint.com/%s/index.htm' DOWNLOAD_ENDPOINT = 'http://www.tutorialspoint.com/%s/pdf/%s.pdf' def get_all_chapters(): r = requests.get(INDEX_ENDPOINT%SUBJECT) soup = ...
import re import requests from bs4 import BeautifulSoup from utils import download_file import os SUBJECT = 'seo' INDEX_ENDPOINT = 'http://www.tutorialspoint.com/%s/index.htm' DOWNLOAD_ENDPOINT = 'http://www.tutorialspoint.com/%s/pdf/%s.pdf' def get_all_chapters(): r = requests.get(INDEX_ENDPOINT%SUBJECT) soup = ...
Add check of command line program execution
Add check of command line program execution
Python
mit
voidabhi/python-scripts,voidabhi/python-scripts,voidabhi/python-scripts,voidabhi/python-scripts,voidabhi/python-scripts
import re import requests from bs4 import BeautifulSoup from utils import download_file import os SUBJECT = 'seo' INDEX_ENDPOINT = 'http://www.tutorialspoint.com/%s/index.htm' DOWNLOAD_ENDPOINT = 'http://www.tutorialspoint.com/%s/pdf/%s.pdf' def get_all_chapters(): r = requests.get(INDEX_ENDPOINT%SUBJECT) soup = ...
import re import requests from bs4 import BeautifulSoup from utils import download_file import os SUBJECT = 'seo' INDEX_ENDPOINT = 'http://www.tutorialspoint.com/%s/index.htm' DOWNLOAD_ENDPOINT = 'http://www.tutorialspoint.com/%s/pdf/%s.pdf' def get_all_chapters(): r = requests.get(INDEX_ENDPOINT%SUBJECT) soup = ...
<commit_before> import re import requests from bs4 import BeautifulSoup from utils import download_file import os SUBJECT = 'seo' INDEX_ENDPOINT = 'http://www.tutorialspoint.com/%s/index.htm' DOWNLOAD_ENDPOINT = 'http://www.tutorialspoint.com/%s/pdf/%s.pdf' def get_all_chapters(): r = requests.get(INDEX_ENDPOINT%SU...
import re import requests from bs4 import BeautifulSoup from utils import download_file import os SUBJECT = 'seo' INDEX_ENDPOINT = 'http://www.tutorialspoint.com/%s/index.htm' DOWNLOAD_ENDPOINT = 'http://www.tutorialspoint.com/%s/pdf/%s.pdf' def get_all_chapters(): r = requests.get(INDEX_ENDPOINT%SUBJECT) soup = ...
import re import requests from bs4 import BeautifulSoup from utils import download_file import os SUBJECT = 'seo' INDEX_ENDPOINT = 'http://www.tutorialspoint.com/%s/index.htm' DOWNLOAD_ENDPOINT = 'http://www.tutorialspoint.com/%s/pdf/%s.pdf' def get_all_chapters(): r = requests.get(INDEX_ENDPOINT%SUBJECT) soup = ...
<commit_before> import re import requests from bs4 import BeautifulSoup from utils import download_file import os SUBJECT = 'seo' INDEX_ENDPOINT = 'http://www.tutorialspoint.com/%s/index.htm' DOWNLOAD_ENDPOINT = 'http://www.tutorialspoint.com/%s/pdf/%s.pdf' def get_all_chapters(): r = requests.get(INDEX_ENDPOINT%SU...
feab28c495c8ade1ef6b9f658df9a7cde1d63936
httpobs/website/monitoring.py
httpobs/website/monitoring.py
from flask import abort, Blueprint, jsonify from httpobs import SOURCE_URL, VERSION from httpobs.conf import BROKER_URL from httpobs.database import get_cursor import kombu monitoring_api = Blueprint('monitoring-api', __name__) @monitoring_api.route('/__heartbeat__') def heartbeat(): # TODO: check celery statu...
from flask import abort, Blueprint, jsonify from httpobs import SOURCE_URL, VERSION from httpobs.database import get_cursor monitoring_api = Blueprint('monitoring-api', __name__) @monitoring_api.route('/__heartbeat__') def heartbeat(): # TODO: check celery status try: # Check the database w...
Fix flake8 error in travis
Fix flake8 error in travis
Python
mpl-2.0
mozilla/http-observatory,mozilla/http-observatory,mozilla/http-observatory,april/http-observatory,april/http-observatory,april/http-observatory
from flask import abort, Blueprint, jsonify from httpobs import SOURCE_URL, VERSION from httpobs.conf import BROKER_URL from httpobs.database import get_cursor import kombu monitoring_api = Blueprint('monitoring-api', __name__) @monitoring_api.route('/__heartbeat__') def heartbeat(): # TODO: check celery statu...
from flask import abort, Blueprint, jsonify from httpobs import SOURCE_URL, VERSION from httpobs.database import get_cursor monitoring_api = Blueprint('monitoring-api', __name__) @monitoring_api.route('/__heartbeat__') def heartbeat(): # TODO: check celery status try: # Check the database w...
<commit_before>from flask import abort, Blueprint, jsonify from httpobs import SOURCE_URL, VERSION from httpobs.conf import BROKER_URL from httpobs.database import get_cursor import kombu monitoring_api = Blueprint('monitoring-api', __name__) @monitoring_api.route('/__heartbeat__') def heartbeat(): # TODO: che...
from flask import abort, Blueprint, jsonify from httpobs import SOURCE_URL, VERSION from httpobs.database import get_cursor monitoring_api = Blueprint('monitoring-api', __name__) @monitoring_api.route('/__heartbeat__') def heartbeat(): # TODO: check celery status try: # Check the database w...
from flask import abort, Blueprint, jsonify from httpobs import SOURCE_URL, VERSION from httpobs.conf import BROKER_URL from httpobs.database import get_cursor import kombu monitoring_api = Blueprint('monitoring-api', __name__) @monitoring_api.route('/__heartbeat__') def heartbeat(): # TODO: check celery statu...
<commit_before>from flask import abort, Blueprint, jsonify from httpobs import SOURCE_URL, VERSION from httpobs.conf import BROKER_URL from httpobs.database import get_cursor import kombu monitoring_api = Blueprint('monitoring-api', __name__) @monitoring_api.route('/__heartbeat__') def heartbeat(): # TODO: che...
4026b8e352229c6f640d428640cd08919ba440e6
dodo_commands/extra/webdev_commands/django-manage.py
dodo_commands/extra/webdev_commands/django-manage.py
"""Run a django-manage command.""" import argparse from dodo_commands.extra.standard_commands import DodoCommand from dodo_commands.util import remove_trailing_dashes class Command(DodoCommand): # noqa decorators = ['docker'] def add_arguments_imp(self, parser): # noqa parser.add_argument( ...
"""Run a django-manage command.""" import argparse from dodo_commands.extra.standard_commands import DodoCommand from dodo_commands.framework.util import remove_trailing_dashes class Command(DodoCommand): # noqa decorators = ['docker'] def add_arguments_imp(self, parser): # noqa parser.add_argument...
Fix remaining broken import of remove_trailing_dashes
Fix remaining broken import of remove_trailing_dashes
Python
mit
mnieber/dodo_commands
"""Run a django-manage command.""" import argparse from dodo_commands.extra.standard_commands import DodoCommand from dodo_commands.util import remove_trailing_dashes class Command(DodoCommand): # noqa decorators = ['docker'] def add_arguments_imp(self, parser): # noqa parser.add_argument( ...
"""Run a django-manage command.""" import argparse from dodo_commands.extra.standard_commands import DodoCommand from dodo_commands.framework.util import remove_trailing_dashes class Command(DodoCommand): # noqa decorators = ['docker'] def add_arguments_imp(self, parser): # noqa parser.add_argument...
<commit_before>"""Run a django-manage command.""" import argparse from dodo_commands.extra.standard_commands import DodoCommand from dodo_commands.util import remove_trailing_dashes class Command(DodoCommand): # noqa decorators = ['docker'] def add_arguments_imp(self, parser): # noqa parser.add_arg...
"""Run a django-manage command.""" import argparse from dodo_commands.extra.standard_commands import DodoCommand from dodo_commands.framework.util import remove_trailing_dashes class Command(DodoCommand): # noqa decorators = ['docker'] def add_arguments_imp(self, parser): # noqa parser.add_argument...
"""Run a django-manage command.""" import argparse from dodo_commands.extra.standard_commands import DodoCommand from dodo_commands.util import remove_trailing_dashes class Command(DodoCommand): # noqa decorators = ['docker'] def add_arguments_imp(self, parser): # noqa parser.add_argument( ...
<commit_before>"""Run a django-manage command.""" import argparse from dodo_commands.extra.standard_commands import DodoCommand from dodo_commands.util import remove_trailing_dashes class Command(DodoCommand): # noqa decorators = ['docker'] def add_arguments_imp(self, parser): # noqa parser.add_arg...
3c68bae8da0767b01cddec34d88012ca0ea1d6ba
booksforcha/booksforcha.py
booksforcha/booksforcha.py
# -*- coding: utf-8 -*- import schedule from feed import load_feed from twitter import send_queued_tweet import time import os RSS_FEED_LIST = os.environ['RSS_FEED_LIST'] def parse_feed_list(s): parsed = s.split(',') if parsed == ['']: return [] else: return parsed def main(): rs...
# -*- coding: utf-8 -*- import schedule from feed import load_feed from twitter import send_queued_tweet import time import os RSS_FEED_LIST = os.environ['RSS_FEED_LIST'] def parse_feed_list(s): parsed = s.split(',') if parsed == ['']: return [] else: return parsed def main(): rs...
Adjust when to load data.
Adjust when to load data.
Python
mit
ChattanoogaPublicLibrary/booksforcha
# -*- coding: utf-8 -*- import schedule from feed import load_feed from twitter import send_queued_tweet import time import os RSS_FEED_LIST = os.environ['RSS_FEED_LIST'] def parse_feed_list(s): parsed = s.split(',') if parsed == ['']: return [] else: return parsed def main(): rs...
# -*- coding: utf-8 -*- import schedule from feed import load_feed from twitter import send_queued_tweet import time import os RSS_FEED_LIST = os.environ['RSS_FEED_LIST'] def parse_feed_list(s): parsed = s.split(',') if parsed == ['']: return [] else: return parsed def main(): rs...
<commit_before># -*- coding: utf-8 -*- import schedule from feed import load_feed from twitter import send_queued_tweet import time import os RSS_FEED_LIST = os.environ['RSS_FEED_LIST'] def parse_feed_list(s): parsed = s.split(',') if parsed == ['']: return [] else: return parsed def...
# -*- coding: utf-8 -*- import schedule from feed import load_feed from twitter import send_queued_tweet import time import os RSS_FEED_LIST = os.environ['RSS_FEED_LIST'] def parse_feed_list(s): parsed = s.split(',') if parsed == ['']: return [] else: return parsed def main(): rs...
# -*- coding: utf-8 -*- import schedule from feed import load_feed from twitter import send_queued_tweet import time import os RSS_FEED_LIST = os.environ['RSS_FEED_LIST'] def parse_feed_list(s): parsed = s.split(',') if parsed == ['']: return [] else: return parsed def main(): rs...
<commit_before># -*- coding: utf-8 -*- import schedule from feed import load_feed from twitter import send_queued_tweet import time import os RSS_FEED_LIST = os.environ['RSS_FEED_LIST'] def parse_feed_list(s): parsed = s.split(',') if parsed == ['']: return [] else: return parsed def...
81d6119f452afa0f69db4a7ab1f37906469d3b64
annotator/model/__init__.py
annotator/model/__init__.py
from .annotation import Annotation from .consumer import Consumer from .user import User
__all__ = ['Annotation', 'Consumer', 'User'] from .annotation import Annotation from .consumer import Consumer from .user import User
Make annotator.model 'import *' friendly
Make annotator.model 'import *' friendly
Python
mit
ningyifan/annotator-store,nobita-isc/annotator-store,happybelly/annotator-store,nobita-isc/annotator-store,nobita-isc/annotator-store,nobita-isc/annotator-store,openannotation/annotator-store
from .annotation import Annotation from .consumer import Consumer from .user import User Make annotator.model 'import *' friendly
__all__ = ['Annotation', 'Consumer', 'User'] from .annotation import Annotation from .consumer import Consumer from .user import User
<commit_before>from .annotation import Annotation from .consumer import Consumer from .user import User <commit_msg>Make annotator.model 'import *' friendly<commit_after>
__all__ = ['Annotation', 'Consumer', 'User'] from .annotation import Annotation from .consumer import Consumer from .user import User
from .annotation import Annotation from .consumer import Consumer from .user import User Make annotator.model 'import *' friendly__all__ = ['Annotation', 'Consumer', 'User'] from .annotation import Annotation from .consumer import Consumer from .user import User
<commit_before>from .annotation import Annotation from .consumer import Consumer from .user import User <commit_msg>Make annotator.model 'import *' friendly<commit_after>__all__ = ['Annotation', 'Consumer', 'User'] from .annotation import Annotation from .consumer import Consumer from .user import User
a925c19b85fcd3a2b6d08d253d3c8d1ef3c7b02f
core/migrations/0008_auto_20151029_0953.py
core/migrations/0008_auto_20151029_0953.py
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations from django.contrib.contenttypes.management import update_all_contenttypes def add_impersonate_permission(apps, schema_editor): update_all_contenttypes() # Fixes tests ContentType = apps.get_model('conte...
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations from django.contrib.contenttypes.management import update_all_contenttypes def add_impersonate_permission(apps, schema_editor): update_all_contenttypes() # Fixes tests ContentType = apps.get_model('conte...
Update latest migration to use the database provided to the migrate management command
Update latest migration to use the database provided to the migrate management command
Python
agpl-3.0
tic-ull/portal-del-investigador,tic-ull/portal-del-investigador,tic-ull/portal-del-investigador,tic-ull/portal-del-investigador
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations from django.contrib.contenttypes.management import update_all_contenttypes def add_impersonate_permission(apps, schema_editor): update_all_contenttypes() # Fixes tests ContentType = apps.get_model('conte...
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations from django.contrib.contenttypes.management import update_all_contenttypes def add_impersonate_permission(apps, schema_editor): update_all_contenttypes() # Fixes tests ContentType = apps.get_model('conte...
<commit_before># -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations from django.contrib.contenttypes.management import update_all_contenttypes def add_impersonate_permission(apps, schema_editor): update_all_contenttypes() # Fixes tests ContentType = apps.g...
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations from django.contrib.contenttypes.management import update_all_contenttypes def add_impersonate_permission(apps, schema_editor): update_all_contenttypes() # Fixes tests ContentType = apps.get_model('conte...
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations from django.contrib.contenttypes.management import update_all_contenttypes def add_impersonate_permission(apps, schema_editor): update_all_contenttypes() # Fixes tests ContentType = apps.get_model('conte...
<commit_before># -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations from django.contrib.contenttypes.management import update_all_contenttypes def add_impersonate_permission(apps, schema_editor): update_all_contenttypes() # Fixes tests ContentType = apps.g...
d74f7d2384d48115ea58737332e4636ba9fdd4aa
ini_tools/get_ini_fields.py
ini_tools/get_ini_fields.py
""" collect information about fields and values in ini file usage run script with file name in directory with unpacked stats. Script will collect data from all files with name. You can specify path as second argument. python get_ini_fields.py body.ini python get_ini_fields.py body.ini "C:/games/warzone2100" """ i...
""" collect information about fields and values in ini file usage run script with file name in directory with unpacked stats. Script will collect data from all files with name. You can specify path as second argument. python get_ini_fields.py body.ini python get_ini_fields.py body.ini "C:/games/warzone2100" """ i...
Update collect ini script. Now it shows if field is required.
Update collect ini script. Now it shows if field is required.
Python
cc0-1.0
haoNoQ/wztools2100,haoNoQ/wztools2100,haoNoQ/wztools2100
""" collect information about fields and values in ini file usage run script with file name in directory with unpacked stats. Script will collect data from all files with name. You can specify path as second argument. python get_ini_fields.py body.ini python get_ini_fields.py body.ini "C:/games/warzone2100" """ i...
""" collect information about fields and values in ini file usage run script with file name in directory with unpacked stats. Script will collect data from all files with name. You can specify path as second argument. python get_ini_fields.py body.ini python get_ini_fields.py body.ini "C:/games/warzone2100" """ i...
<commit_before>""" collect information about fields and values in ini file usage run script with file name in directory with unpacked stats. Script will collect data from all files with name. You can specify path as second argument. python get_ini_fields.py body.ini python get_ini_fields.py body.ini "C:/games/warz...
""" collect information about fields and values in ini file usage run script with file name in directory with unpacked stats. Script will collect data from all files with name. You can specify path as second argument. python get_ini_fields.py body.ini python get_ini_fields.py body.ini "C:/games/warzone2100" """ i...
""" collect information about fields and values in ini file usage run script with file name in directory with unpacked stats. Script will collect data from all files with name. You can specify path as second argument. python get_ini_fields.py body.ini python get_ini_fields.py body.ini "C:/games/warzone2100" """ i...
<commit_before>""" collect information about fields and values in ini file usage run script with file name in directory with unpacked stats. Script will collect data from all files with name. You can specify path as second argument. python get_ini_fields.py body.ini python get_ini_fields.py body.ini "C:/games/warz...
733ea52d5374c4c5d5c10f1a04e3300fd6f4695c
features/steps/interactive.py
features/steps/interactive.py
import time, pexpect, re import nose.tools as nt import subprocess as spr PROMPT = "root@\w+:[^\r]+" ENTER = "\n" def type(process, input_): process.send(input_.encode()) process.expect(PROMPT) # Remove the typed input from the returned standard out return re.sub(re.escape(input_.strip()), '', proce...
import time, pexpect, re PROMPT = "root@\w+:[^\r]+" UP_ARROW = "\x1b[A" def type(process, input_): process.send(input_.encode()) process.expect(PROMPT) # Remove the typed input from the returned standard out return re.sub(re.escape(input_.strip()), '', process.before).strip() @when(u'I run the inter...
Allow tty process longer time to spawn in feature tests
Allow tty process longer time to spawn in feature tests
Python
mit
michaelbarton/command-line-interface,bioboxes/command-line-interface,michaelbarton/command-line-interface,bioboxes/command-line-interface,pbelmann/command-line-interface,pbelmann/command-line-interface
import time, pexpect, re import nose.tools as nt import subprocess as spr PROMPT = "root@\w+:[^\r]+" ENTER = "\n" def type(process, input_): process.send(input_.encode()) process.expect(PROMPT) # Remove the typed input from the returned standard out return re.sub(re.escape(input_.strip()), '', proce...
import time, pexpect, re PROMPT = "root@\w+:[^\r]+" UP_ARROW = "\x1b[A" def type(process, input_): process.send(input_.encode()) process.expect(PROMPT) # Remove the typed input from the returned standard out return re.sub(re.escape(input_.strip()), '', process.before).strip() @when(u'I run the inter...
<commit_before>import time, pexpect, re import nose.tools as nt import subprocess as spr PROMPT = "root@\w+:[^\r]+" ENTER = "\n" def type(process, input_): process.send(input_.encode()) process.expect(PROMPT) # Remove the typed input from the returned standard out return re.sub(re.escape(input_.stri...
import time, pexpect, re PROMPT = "root@\w+:[^\r]+" UP_ARROW = "\x1b[A" def type(process, input_): process.send(input_.encode()) process.expect(PROMPT) # Remove the typed input from the returned standard out return re.sub(re.escape(input_.strip()), '', process.before).strip() @when(u'I run the inter...
import time, pexpect, re import nose.tools as nt import subprocess as spr PROMPT = "root@\w+:[^\r]+" ENTER = "\n" def type(process, input_): process.send(input_.encode()) process.expect(PROMPT) # Remove the typed input from the returned standard out return re.sub(re.escape(input_.strip()), '', proce...
<commit_before>import time, pexpect, re import nose.tools as nt import subprocess as spr PROMPT = "root@\w+:[^\r]+" ENTER = "\n" def type(process, input_): process.send(input_.encode()) process.expect(PROMPT) # Remove the typed input from the returned standard out return re.sub(re.escape(input_.stri...
e5799aae4ea73509b183cd40e8f9c629e2e445a1
lektor_embed_x.py
lektor_embed_x.py
# -*- coding: utf-8 -*- """ lektor-embed-x ~~~~~~~~~~~~~~ Simply embed rich contents from popular sites in Lektor-generated pages :copyright: (c) 2016 by Khaled Monsoor :license: The MIT License """ from embedx import OnlineContent from lektor.pluginsystem import Plugin from markupsafe import Marku...
# -*- coding: utf-8 -*- """ lektor-embed-x ~~~~~~~~~~~~~~ Simply embed rich contents from popular sites in Lektor-generated pages :copyright: (c) 2016 by Khaled Monsoor :license: The MIT License """ from embedx import OnlineContent from lektor.pluginsystem import Plugin from markupsafe import Marku...
Return a Markup object when the host is not supported
Return a Markup object when the host is not supported This might be an issue with the Markdown parser used by lektor (mistune), but when a Markup() object is returned, then regular links must also be marked as Markup() or they won't be escaped.
Python
mit
kmonsoor/lektor-embed-x
# -*- coding: utf-8 -*- """ lektor-embed-x ~~~~~~~~~~~~~~ Simply embed rich contents from popular sites in Lektor-generated pages :copyright: (c) 2016 by Khaled Monsoor :license: The MIT License """ from embedx import OnlineContent from lektor.pluginsystem import Plugin from markupsafe import Marku...
# -*- coding: utf-8 -*- """ lektor-embed-x ~~~~~~~~~~~~~~ Simply embed rich contents from popular sites in Lektor-generated pages :copyright: (c) 2016 by Khaled Monsoor :license: The MIT License """ from embedx import OnlineContent from lektor.pluginsystem import Plugin from markupsafe import Marku...
<commit_before># -*- coding: utf-8 -*- """ lektor-embed-x ~~~~~~~~~~~~~~ Simply embed rich contents from popular sites in Lektor-generated pages :copyright: (c) 2016 by Khaled Monsoor :license: The MIT License """ from embedx import OnlineContent from lektor.pluginsystem import Plugin from markupsa...
# -*- coding: utf-8 -*- """ lektor-embed-x ~~~~~~~~~~~~~~ Simply embed rich contents from popular sites in Lektor-generated pages :copyright: (c) 2016 by Khaled Monsoor :license: The MIT License """ from embedx import OnlineContent from lektor.pluginsystem import Plugin from markupsafe import Marku...
# -*- coding: utf-8 -*- """ lektor-embed-x ~~~~~~~~~~~~~~ Simply embed rich contents from popular sites in Lektor-generated pages :copyright: (c) 2016 by Khaled Monsoor :license: The MIT License """ from embedx import OnlineContent from lektor.pluginsystem import Plugin from markupsafe import Marku...
<commit_before># -*- coding: utf-8 -*- """ lektor-embed-x ~~~~~~~~~~~~~~ Simply embed rich contents from popular sites in Lektor-generated pages :copyright: (c) 2016 by Khaled Monsoor :license: The MIT License """ from embedx import OnlineContent from lektor.pluginsystem import Plugin from markupsa...
b71adef99d0facef9572b3a7fc60a34bc3036888
blanc_basic_news/news/templatetags/news_tags.py
blanc_basic_news/news/templatetags/news_tags.py
from django import template from django.utils import timezone from blanc_basic_news.news import get_post_model from blanc_basic_news.news.models import Category register = template.Library() @register.assignment_tag def get_news_categories(): return Category.objects.all() @register.assignment_tag def get_news_...
from django import template from django.utils import timezone from blanc_basic_news.news import get_post_model from blanc_basic_news.news.models import Category register = template.Library() @register.assignment_tag def get_news_categories(): return Category.objects.all() @register.assignment_tag def get_news_...
Use date_url for .dates(), as Django 1.6 doesn't like DateTimeField here
Use date_url for .dates(), as Django 1.6 doesn't like DateTimeField here
Python
bsd-3-clause
blancltd/blanc-basic-news
from django import template from django.utils import timezone from blanc_basic_news.news import get_post_model from blanc_basic_news.news.models import Category register = template.Library() @register.assignment_tag def get_news_categories(): return Category.objects.all() @register.assignment_tag def get_news_...
from django import template from django.utils import timezone from blanc_basic_news.news import get_post_model from blanc_basic_news.news.models import Category register = template.Library() @register.assignment_tag def get_news_categories(): return Category.objects.all() @register.assignment_tag def get_news_...
<commit_before>from django import template from django.utils import timezone from blanc_basic_news.news import get_post_model from blanc_basic_news.news.models import Category register = template.Library() @register.assignment_tag def get_news_categories(): return Category.objects.all() @register.assignment_ta...
from django import template from django.utils import timezone from blanc_basic_news.news import get_post_model from blanc_basic_news.news.models import Category register = template.Library() @register.assignment_tag def get_news_categories(): return Category.objects.all() @register.assignment_tag def get_news_...
from django import template from django.utils import timezone from blanc_basic_news.news import get_post_model from blanc_basic_news.news.models import Category register = template.Library() @register.assignment_tag def get_news_categories(): return Category.objects.all() @register.assignment_tag def get_news_...
<commit_before>from django import template from django.utils import timezone from blanc_basic_news.news import get_post_model from blanc_basic_news.news.models import Category register = template.Library() @register.assignment_tag def get_news_categories(): return Category.objects.all() @register.assignment_ta...
ba8560e4fc51afc6985d78cc131d46f07fe3260c
pyximport/test/test_reload.py
pyximport/test/test_reload.py
from __future__ import absolute_import, print_function import time, os, sys from . import test_pyximport if 1: from distutils import sysconfig try: sysconfig.set_python_build() except AttributeError: pass import pyxbuild print(pyxbuild.distutils.sysconfig == sysconfig) def test(...
from __future__ import absolute_import, print_function import time, os, sys from . import test_pyximport if 1: from distutils import sysconfig try: sysconfig.set_python_build() except AttributeError: pass import pyxbuild print(pyxbuild.distutils.sysconfig == sysconfig) def test(...
Fix bad indentation in a pyximport test
Fix bad indentation in a pyximport test The indentation was inadvertently broken when expanding tabs in e908c0b9262008014d0698732acb5de48dbbf950. Fixes: $ python pyximport/test/test_reload.py File "pyximport/test/test_reload.py", line 23 assert hello.x == 1 ^ IndentationError: unexpecte...
Python
apache-2.0
scoder/cython,ChristopherHogan/cython,cython/cython,scoder/cython,ChristopherHogan/cython,cython/cython,scoder/cython,da-woods/cython,da-woods/cython,da-woods/cython,scoder/cython,cython/cython,da-woods/cython,ChristopherHogan/cython,cython/cython
from __future__ import absolute_import, print_function import time, os, sys from . import test_pyximport if 1: from distutils import sysconfig try: sysconfig.set_python_build() except AttributeError: pass import pyxbuild print(pyxbuild.distutils.sysconfig == sysconfig) def test(...
from __future__ import absolute_import, print_function import time, os, sys from . import test_pyximport if 1: from distutils import sysconfig try: sysconfig.set_python_build() except AttributeError: pass import pyxbuild print(pyxbuild.distutils.sysconfig == sysconfig) def test(...
<commit_before>from __future__ import absolute_import, print_function import time, os, sys from . import test_pyximport if 1: from distutils import sysconfig try: sysconfig.set_python_build() except AttributeError: pass import pyxbuild print(pyxbuild.distutils.sysconfig == sysconf...
from __future__ import absolute_import, print_function import time, os, sys from . import test_pyximport if 1: from distutils import sysconfig try: sysconfig.set_python_build() except AttributeError: pass import pyxbuild print(pyxbuild.distutils.sysconfig == sysconfig) def test(...
from __future__ import absolute_import, print_function import time, os, sys from . import test_pyximport if 1: from distutils import sysconfig try: sysconfig.set_python_build() except AttributeError: pass import pyxbuild print(pyxbuild.distutils.sysconfig == sysconfig) def test(...
<commit_before>from __future__ import absolute_import, print_function import time, os, sys from . import test_pyximport if 1: from distutils import sysconfig try: sysconfig.set_python_build() except AttributeError: pass import pyxbuild print(pyxbuild.distutils.sysconfig == sysconf...
5a79acaccab59e50788cd2da31a93f2f1b69ca53
codeforces/div3/579/C/C.py
codeforces/div3/579/C/C.py
from math import gcd, sqrt, ceil n = int(input()) a = list(map(int, input().split())) a = list(set(a)) divisor = a[0] for ai in a[1:]: divisor = gcd(divisor, ai) result = 1 # 1 is always a divisor limit = ceil(sqrt(divisor)) + 1 primes = [2] + list(range(3, limit, 2)) for prime_factor in primes: power =...
from math import gcd, sqrt, ceil n = int(input()) a = list(map(int, input().split())) a = list(set(a)) divisor = a[0] for ai in a[1:]: divisor = gcd(divisor, ai) result = 1 # 1 is always a divisor limit = divisor // 2 + 1 primes = [2] + list(range(3, limit, 2)) for prime_factor in primes: if prime_facto...
Fix WA 10: remove limit heuristics
Fix WA 10: remove limit heuristics - in CF Div 3 579C Signed-off-by: Karel Ha <[email protected]>
Python
mit
mathemage/CompetitiveProgramming,mathemage/CompetitiveProgramming,mathemage/CompetitiveProgramming,mathemage/CompetitiveProgramming,mathemage/CompetitiveProgramming,mathemage/CompetitiveProgramming
from math import gcd, sqrt, ceil n = int(input()) a = list(map(int, input().split())) a = list(set(a)) divisor = a[0] for ai in a[1:]: divisor = gcd(divisor, ai) result = 1 # 1 is always a divisor limit = ceil(sqrt(divisor)) + 1 primes = [2] + list(range(3, limit, 2)) for prime_factor in primes: power =...
from math import gcd, sqrt, ceil n = int(input()) a = list(map(int, input().split())) a = list(set(a)) divisor = a[0] for ai in a[1:]: divisor = gcd(divisor, ai) result = 1 # 1 is always a divisor limit = divisor // 2 + 1 primes = [2] + list(range(3, limit, 2)) for prime_factor in primes: if prime_facto...
<commit_before>from math import gcd, sqrt, ceil n = int(input()) a = list(map(int, input().split())) a = list(set(a)) divisor = a[0] for ai in a[1:]: divisor = gcd(divisor, ai) result = 1 # 1 is always a divisor limit = ceil(sqrt(divisor)) + 1 primes = [2] + list(range(3, limit, 2)) for prime_factor in prim...
from math import gcd, sqrt, ceil n = int(input()) a = list(map(int, input().split())) a = list(set(a)) divisor = a[0] for ai in a[1:]: divisor = gcd(divisor, ai) result = 1 # 1 is always a divisor limit = divisor // 2 + 1 primes = [2] + list(range(3, limit, 2)) for prime_factor in primes: if prime_facto...
from math import gcd, sqrt, ceil n = int(input()) a = list(map(int, input().split())) a = list(set(a)) divisor = a[0] for ai in a[1:]: divisor = gcd(divisor, ai) result = 1 # 1 is always a divisor limit = ceil(sqrt(divisor)) + 1 primes = [2] + list(range(3, limit, 2)) for prime_factor in primes: power =...
<commit_before>from math import gcd, sqrt, ceil n = int(input()) a = list(map(int, input().split())) a = list(set(a)) divisor = a[0] for ai in a[1:]: divisor = gcd(divisor, ai) result = 1 # 1 is always a divisor limit = ceil(sqrt(divisor)) + 1 primes = [2] + list(range(3, limit, 2)) for prime_factor in prim...
3dd22e9c88a0b02655481ef3ca0f5376b8aae1b5
spacy/tests/regression/test_issue834.py
spacy/tests/regression/test_issue834.py
# coding: utf-8 from __future__ import unicode_literals from io import StringIO word2vec_str = """, -0.046107 -0.035951 -0.560418 de -0.648927 -0.400976 -0.527124 . 0.113685 0.439990 -0.634510   -1.499184 -0.184280 -0.598371""" def test_issue834(en_vocab): f = StringIO(word2vec_str) vector_length = en_vocab...
# coding: utf-8 from __future__ import unicode_literals from io import StringIO import pytest word2vec_str = """, -0.046107 -0.035951 -0.560418 de -0.648927 -0.400976 -0.527124 . 0.113685 0.439990 -0.634510   -1.499184 -0.184280 -0.598371""" @pytest.mark.xfail def test_issue834(en_vocab): f = StringIO(word2vec_...
Mark vectors test as xfail (temporary)
Mark vectors test as xfail (temporary)
Python
mit
oroszgy/spaCy.hu,oroszgy/spaCy.hu,recognai/spaCy,Gregory-Howard/spaCy,aikramer2/spaCy,spacy-io/spaCy,Gregory-Howard/spaCy,oroszgy/spaCy.hu,raphael0202/spaCy,raphael0202/spaCy,aikramer2/spaCy,spacy-io/spaCy,honnibal/spaCy,raphael0202/spaCy,aikramer2/spaCy,aikramer2/spaCy,banglakit/spaCy,recognai/spaCy,honnibal/spaCy,Gre...
# coding: utf-8 from __future__ import unicode_literals from io import StringIO word2vec_str = """, -0.046107 -0.035951 -0.560418 de -0.648927 -0.400976 -0.527124 . 0.113685 0.439990 -0.634510   -1.499184 -0.184280 -0.598371""" def test_issue834(en_vocab): f = StringIO(word2vec_str) vector_length = en_vocab...
# coding: utf-8 from __future__ import unicode_literals from io import StringIO import pytest word2vec_str = """, -0.046107 -0.035951 -0.560418 de -0.648927 -0.400976 -0.527124 . 0.113685 0.439990 -0.634510   -1.499184 -0.184280 -0.598371""" @pytest.mark.xfail def test_issue834(en_vocab): f = StringIO(word2vec_...
<commit_before># coding: utf-8 from __future__ import unicode_literals from io import StringIO word2vec_str = """, -0.046107 -0.035951 -0.560418 de -0.648927 -0.400976 -0.527124 . 0.113685 0.439990 -0.634510   -1.499184 -0.184280 -0.598371""" def test_issue834(en_vocab): f = StringIO(word2vec_str) vector_le...
# coding: utf-8 from __future__ import unicode_literals from io import StringIO import pytest word2vec_str = """, -0.046107 -0.035951 -0.560418 de -0.648927 -0.400976 -0.527124 . 0.113685 0.439990 -0.634510   -1.499184 -0.184280 -0.598371""" @pytest.mark.xfail def test_issue834(en_vocab): f = StringIO(word2vec_...
# coding: utf-8 from __future__ import unicode_literals from io import StringIO word2vec_str = """, -0.046107 -0.035951 -0.560418 de -0.648927 -0.400976 -0.527124 . 0.113685 0.439990 -0.634510   -1.499184 -0.184280 -0.598371""" def test_issue834(en_vocab): f = StringIO(word2vec_str) vector_length = en_vocab...
<commit_before># coding: utf-8 from __future__ import unicode_literals from io import StringIO word2vec_str = """, -0.046107 -0.035951 -0.560418 de -0.648927 -0.400976 -0.527124 . 0.113685 0.439990 -0.634510   -1.499184 -0.184280 -0.598371""" def test_issue834(en_vocab): f = StringIO(word2vec_str) vector_le...
7a4f4d2456c5ed0609efe7777d2b9e22854ac449
social_django/compat.py
social_django/compat.py
# coding=utf-8 import six import django from django.db import models if django.VERSION >= (2, 0): from django.urls import reverse else: from django.core.urlresolvers import reverse if django.VERSION >= (1, 10): from django.utils.deprecation import MiddlewareMixin else: MiddlewareMixin = object def g...
# coding=utf-8 import six import django from django.db import models if django.VERSION >= (2, 0): from django.urls import reverse else: from django.core.urlresolvers import reverse if django.VERSION >= (1, 10): from django.utils.deprecation import MiddlewareMixin else: MiddlewareMixin = object def g...
Fix getting model of foreign key field.
Fix getting model of foreign key field.
Python
bsd-3-clause
python-social-auth/social-app-django,python-social-auth/social-app-django,python-social-auth/social-app-django
# coding=utf-8 import six import django from django.db import models if django.VERSION >= (2, 0): from django.urls import reverse else: from django.core.urlresolvers import reverse if django.VERSION >= (1, 10): from django.utils.deprecation import MiddlewareMixin else: MiddlewareMixin = object def g...
# coding=utf-8 import six import django from django.db import models if django.VERSION >= (2, 0): from django.urls import reverse else: from django.core.urlresolvers import reverse if django.VERSION >= (1, 10): from django.utils.deprecation import MiddlewareMixin else: MiddlewareMixin = object def g...
<commit_before># coding=utf-8 import six import django from django.db import models if django.VERSION >= (2, 0): from django.urls import reverse else: from django.core.urlresolvers import reverse if django.VERSION >= (1, 10): from django.utils.deprecation import MiddlewareMixin else: MiddlewareMixin =...
# coding=utf-8 import six import django from django.db import models if django.VERSION >= (2, 0): from django.urls import reverse else: from django.core.urlresolvers import reverse if django.VERSION >= (1, 10): from django.utils.deprecation import MiddlewareMixin else: MiddlewareMixin = object def g...
# coding=utf-8 import six import django from django.db import models if django.VERSION >= (2, 0): from django.urls import reverse else: from django.core.urlresolvers import reverse if django.VERSION >= (1, 10): from django.utils.deprecation import MiddlewareMixin else: MiddlewareMixin = object def g...
<commit_before># coding=utf-8 import six import django from django.db import models if django.VERSION >= (2, 0): from django.urls import reverse else: from django.core.urlresolvers import reverse if django.VERSION >= (1, 10): from django.utils.deprecation import MiddlewareMixin else: MiddlewareMixin =...
54a6031c54c8b64eeeed7a28f7836f886022bdd0
main.py
main.py
from evaluate_user import evaluate_user def main(): user_id = "" while user_id != 'exit': user_id = raw_input("Enter user id: ") if user_id != 'exit' and evaluate_user(user_id) == 1: print("Cannot evaluate user.\n") if __name__ == "__main__": main()
from evaluate_user import evaluate_user from Tkinter import * from ScrolledText import ScrolledText from ttk import Frame, Button, Label, Style import re class EvaluatorWindow(Frame): def __init__(self, parent): Frame.__init__(self, parent) self.parent = parent self.parent.title("Twitte...
Replace line endings with whitespace instead of deleting them.
Replace line endings with whitespace instead of deleting them.
Python
apache-2.0
ngrudzinski/sentiment_analysis_437
from evaluate_user import evaluate_user def main(): user_id = "" while user_id != 'exit': user_id = raw_input("Enter user id: ") if user_id != 'exit' and evaluate_user(user_id) == 1: print("Cannot evaluate user.\n") if __name__ == "__main__": main()Replace line endings with whi...
from evaluate_user import evaluate_user from Tkinter import * from ScrolledText import ScrolledText from ttk import Frame, Button, Label, Style import re class EvaluatorWindow(Frame): def __init__(self, parent): Frame.__init__(self, parent) self.parent = parent self.parent.title("Twitte...
<commit_before>from evaluate_user import evaluate_user def main(): user_id = "" while user_id != 'exit': user_id = raw_input("Enter user id: ") if user_id != 'exit' and evaluate_user(user_id) == 1: print("Cannot evaluate user.\n") if __name__ == "__main__": main()<commit_msg>Re...
from evaluate_user import evaluate_user from Tkinter import * from ScrolledText import ScrolledText from ttk import Frame, Button, Label, Style import re class EvaluatorWindow(Frame): def __init__(self, parent): Frame.__init__(self, parent) self.parent = parent self.parent.title("Twitte...
from evaluate_user import evaluate_user def main(): user_id = "" while user_id != 'exit': user_id = raw_input("Enter user id: ") if user_id != 'exit' and evaluate_user(user_id) == 1: print("Cannot evaluate user.\n") if __name__ == "__main__": main()Replace line endings with whi...
<commit_before>from evaluate_user import evaluate_user def main(): user_id = "" while user_id != 'exit': user_id = raw_input("Enter user id: ") if user_id != 'exit' and evaluate_user(user_id) == 1: print("Cannot evaluate user.\n") if __name__ == "__main__": main()<commit_msg>Re...
1b5e68192302a3a234820e4c8908a689ece7c3ae
sphinx_epytext/__init__.py
sphinx_epytext/__init__.py
# -*- coding: utf-8 -*- # Copyright 2014 John Vandenberg # Licensed under the MIT License, see LICENSE file for details. """Sphinx epytext support.""" from sphinx_epytext.process_docstring import process_docstring def setup(app): """Sphinx extension setup function. When the extension is loaded, Sphinx impo...
# -*- coding: utf-8 -*- # Copyright 2014-5 John Vandenberg # Licensed under the MIT License, see LICENSE file for details. """Sphinx epytext support.""" from sphinx.application import Sphinx from sphinx_epytext.process_docstring import process_docstring def setup(app): """Sphinx extension setup function. ...
Move imports to top of module
Move imports to top of module
Python
mit
jayvdb/sphinx-epytext
# -*- coding: utf-8 -*- # Copyright 2014 John Vandenberg # Licensed under the MIT License, see LICENSE file for details. """Sphinx epytext support.""" from sphinx_epytext.process_docstring import process_docstring def setup(app): """Sphinx extension setup function. When the extension is loaded, Sphinx impo...
# -*- coding: utf-8 -*- # Copyright 2014-5 John Vandenberg # Licensed under the MIT License, see LICENSE file for details. """Sphinx epytext support.""" from sphinx.application import Sphinx from sphinx_epytext.process_docstring import process_docstring def setup(app): """Sphinx extension setup function. ...
<commit_before># -*- coding: utf-8 -*- # Copyright 2014 John Vandenberg # Licensed under the MIT License, see LICENSE file for details. """Sphinx epytext support.""" from sphinx_epytext.process_docstring import process_docstring def setup(app): """Sphinx extension setup function. When the extension is load...
# -*- coding: utf-8 -*- # Copyright 2014-5 John Vandenberg # Licensed under the MIT License, see LICENSE file for details. """Sphinx epytext support.""" from sphinx.application import Sphinx from sphinx_epytext.process_docstring import process_docstring def setup(app): """Sphinx extension setup function. ...
# -*- coding: utf-8 -*- # Copyright 2014 John Vandenberg # Licensed under the MIT License, see LICENSE file for details. """Sphinx epytext support.""" from sphinx_epytext.process_docstring import process_docstring def setup(app): """Sphinx extension setup function. When the extension is loaded, Sphinx impo...
<commit_before># -*- coding: utf-8 -*- # Copyright 2014 John Vandenberg # Licensed under the MIT License, see LICENSE file for details. """Sphinx epytext support.""" from sphinx_epytext.process_docstring import process_docstring def setup(app): """Sphinx extension setup function. When the extension is load...
fdc1c82533ca541d6e666f2834b86fa9d7cb9969
bin/update/deploy_dev_base.py
bin/update/deploy_dev_base.py
import logging from commander.deploy import task from deploy_base import * # noqa log = logging.getLogger(__name__) @task def database(ctx): with ctx.lcd(settings.SRC_DIR): # only ever run this one on demo and dev. ctx.local("python2.6 manage.py bedrock_truncate_database --yes-i-am-sure") ...
import logging from commander.deploy import task from deploy_base import * # noqa log = logging.getLogger(__name__) @task def database(ctx): with ctx.lcd(settings.SRC_DIR): # only ever run this one on demo and dev. ctx.local("python2.6 manage.py bedrock_truncate_database --yes-i-am-sure") ...
Call rnasync after truncating db on dev deploy
Call rnasync after truncating db on dev deploy
Python
mpl-2.0
ckprice/bedrock,gerv/bedrock,CSCI-462-01-2017/bedrock,ericawright/bedrock,pmclanahan/bedrock,bensternthal/bedrock,pascalchevrel/bedrock,ckprice/bedrock,kyoshino/bedrock,schalkneethling/bedrock,CSCI-462-01-2017/bedrock,pmclanahan/bedrock,amjadm61/bedrock,Jobava/bedrock,mermi/bedrock,alexgibson/bedrock,ckprice/bedrock,gl...
import logging from commander.deploy import task from deploy_base import * # noqa log = logging.getLogger(__name__) @task def database(ctx): with ctx.lcd(settings.SRC_DIR): # only ever run this one on demo and dev. ctx.local("python2.6 manage.py bedrock_truncate_database --yes-i-am-sure") ...
import logging from commander.deploy import task from deploy_base import * # noqa log = logging.getLogger(__name__) @task def database(ctx): with ctx.lcd(settings.SRC_DIR): # only ever run this one on demo and dev. ctx.local("python2.6 manage.py bedrock_truncate_database --yes-i-am-sure") ...
<commit_before>import logging from commander.deploy import task from deploy_base import * # noqa log = logging.getLogger(__name__) @task def database(ctx): with ctx.lcd(settings.SRC_DIR): # only ever run this one on demo and dev. ctx.local("python2.6 manage.py bedrock_truncate_database --yes-...
import logging from commander.deploy import task from deploy_base import * # noqa log = logging.getLogger(__name__) @task def database(ctx): with ctx.lcd(settings.SRC_DIR): # only ever run this one on demo and dev. ctx.local("python2.6 manage.py bedrock_truncate_database --yes-i-am-sure") ...
import logging from commander.deploy import task from deploy_base import * # noqa log = logging.getLogger(__name__) @task def database(ctx): with ctx.lcd(settings.SRC_DIR): # only ever run this one on demo and dev. ctx.local("python2.6 manage.py bedrock_truncate_database --yes-i-am-sure") ...
<commit_before>import logging from commander.deploy import task from deploy_base import * # noqa log = logging.getLogger(__name__) @task def database(ctx): with ctx.lcd(settings.SRC_DIR): # only ever run this one on demo and dev. ctx.local("python2.6 manage.py bedrock_truncate_database --yes-...
cba07745953e4b5c2c66c1698841b5f081e5da9d
greenmine/settings/__init__.py
greenmine/settings/__init__.py
# -*- coding: utf-8 -*- from __future__ import absolute_import import os try: print "Trying import local.py settings..." from .local import * except ImportError: print "Trying import development.py settings..." from .development import *
# -*- coding: utf-8 -*- from __future__ import ( absolute_import, print_function ) import os, sys try: print("Trying import local.py settings...", file=sys.stderr) from .local import * except ImportError: print("Trying import development.py settings...", file=sys.stderr) from .development impor...
Send more print message to sys.stderr
Smallfix: Send more print message to sys.stderr
Python
agpl-3.0
joshisa/taiga-back,WALR/taiga-back,jeffdwyatt/taiga-back,bdang2012/taiga-back-casting,CMLL/taiga-back,astronaut1712/taiga-back,bdang2012/taiga-back-casting,joshisa/taiga-back,dycodedev/taiga-back,Zaneh-/bearded-tribble-back,CoolCloud/taiga-back,Rademade/taiga-back,gam-phon/taiga-back,bdang2012/taiga-back-casting,19kest...
# -*- coding: utf-8 -*- from __future__ import absolute_import import os try: print "Trying import local.py settings..." from .local import * except ImportError: print "Trying import development.py settings..." from .development import * Smallfix: Send more print message to sys.stderr
# -*- coding: utf-8 -*- from __future__ import ( absolute_import, print_function ) import os, sys try: print("Trying import local.py settings...", file=sys.stderr) from .local import * except ImportError: print("Trying import development.py settings...", file=sys.stderr) from .development impor...
<commit_before># -*- coding: utf-8 -*- from __future__ import absolute_import import os try: print "Trying import local.py settings..." from .local import * except ImportError: print "Trying import development.py settings..." from .development import * <commit_msg>Smallfix: Send more print message to ...
# -*- coding: utf-8 -*- from __future__ import ( absolute_import, print_function ) import os, sys try: print("Trying import local.py settings...", file=sys.stderr) from .local import * except ImportError: print("Trying import development.py settings...", file=sys.stderr) from .development impor...
# -*- coding: utf-8 -*- from __future__ import absolute_import import os try: print "Trying import local.py settings..." from .local import * except ImportError: print "Trying import development.py settings..." from .development import * Smallfix: Send more print message to sys.stderr# -*- coding: utf...
<commit_before># -*- coding: utf-8 -*- from __future__ import absolute_import import os try: print "Trying import local.py settings..." from .local import * except ImportError: print "Trying import development.py settings..." from .development import * <commit_msg>Smallfix: Send more print message to ...
d28cb95d7033b34e34661700dc8a1aafd6a61bc8
src/db/schema.py
src/db/schema.py
import logging from datetime import datetime import sqlalchemy as sql from sqlalchemy import Table, Column, Integer, String, DateTime, Text, ForeignKey from sqlalchemy import orm from sqlalchemy.ext.declarative import declarative_base import db Base = declarative_base() Base.metadata.bind = db.engine class Round(Ba...
import logging from datetime import datetime import sqlalchemy as sql from sqlalchemy import Table, Column, Integer, String, DateTime, Text, ForeignKey from sqlalchemy import orm from sqlalchemy.ext.declarative import declarative_base import db Base = declarative_base() Base.metadata.bind = db.engine class Round(Ba...
Allow round_id for submissions to be calculated dynamically
Allow round_id for submissions to be calculated dynamically
Python
apache-2.0
pascalc/narrative-roulette,pascalc/narrative-roulette
import logging from datetime import datetime import sqlalchemy as sql from sqlalchemy import Table, Column, Integer, String, DateTime, Text, ForeignKey from sqlalchemy import orm from sqlalchemy.ext.declarative import declarative_base import db Base = declarative_base() Base.metadata.bind = db.engine class Round(Ba...
import logging from datetime import datetime import sqlalchemy as sql from sqlalchemy import Table, Column, Integer, String, DateTime, Text, ForeignKey from sqlalchemy import orm from sqlalchemy.ext.declarative import declarative_base import db Base = declarative_base() Base.metadata.bind = db.engine class Round(Ba...
<commit_before>import logging from datetime import datetime import sqlalchemy as sql from sqlalchemy import Table, Column, Integer, String, DateTime, Text, ForeignKey from sqlalchemy import orm from sqlalchemy.ext.declarative import declarative_base import db Base = declarative_base() Base.metadata.bind = db.engine ...
import logging from datetime import datetime import sqlalchemy as sql from sqlalchemy import Table, Column, Integer, String, DateTime, Text, ForeignKey from sqlalchemy import orm from sqlalchemy.ext.declarative import declarative_base import db Base = declarative_base() Base.metadata.bind = db.engine class Round(Ba...
import logging from datetime import datetime import sqlalchemy as sql from sqlalchemy import Table, Column, Integer, String, DateTime, Text, ForeignKey from sqlalchemy import orm from sqlalchemy.ext.declarative import declarative_base import db Base = declarative_base() Base.metadata.bind = db.engine class Round(Ba...
<commit_before>import logging from datetime import datetime import sqlalchemy as sql from sqlalchemy import Table, Column, Integer, String, DateTime, Text, ForeignKey from sqlalchemy import orm from sqlalchemy.ext.declarative import declarative_base import db Base = declarative_base() Base.metadata.bind = db.engine ...
028cf52b2d09c6cd1ca8c0e1e779cd5d8ff3ca3a
tests/test_ubuntupkg.py
tests/test_ubuntupkg.py
# MIT licensed # Copyright (c) 2017 Felix Yan <[email protected]>, et al. import pytest pytestmark = pytest.mark.asyncio async def test_ubuntupkg(get_version): assert await get_version("sigrok-firmware-fx2lafw", {"ubuntupkg": None}) == "0.1.3-1" async def test_ubuntupkg_strip_release(get_version): as...
# MIT licensed # Copyright (c) 2017 Felix Yan <[email protected]>, et al. from flaky import flaky import pytest pytestmark = pytest.mark.asyncio @flaky async def test_ubuntupkg(get_version): assert await get_version("sigrok-firmware-fx2lafw", {"ubuntupkg": None}) == "0.1.3-1" @flaky async def test_ubuntu...
Mark ubuntupkg tests as flaky
Mark ubuntupkg tests as flaky
Python
mit
lilydjwg/nvchecker
# MIT licensed # Copyright (c) 2017 Felix Yan <[email protected]>, et al. import pytest pytestmark = pytest.mark.asyncio async def test_ubuntupkg(get_version): assert await get_version("sigrok-firmware-fx2lafw", {"ubuntupkg": None}) == "0.1.3-1" async def test_ubuntupkg_strip_release(get_version): as...
# MIT licensed # Copyright (c) 2017 Felix Yan <[email protected]>, et al. from flaky import flaky import pytest pytestmark = pytest.mark.asyncio @flaky async def test_ubuntupkg(get_version): assert await get_version("sigrok-firmware-fx2lafw", {"ubuntupkg": None}) == "0.1.3-1" @flaky async def test_ubuntu...
<commit_before># MIT licensed # Copyright (c) 2017 Felix Yan <[email protected]>, et al. import pytest pytestmark = pytest.mark.asyncio async def test_ubuntupkg(get_version): assert await get_version("sigrok-firmware-fx2lafw", {"ubuntupkg": None}) == "0.1.3-1" async def test_ubuntupkg_strip_release(get_v...
# MIT licensed # Copyright (c) 2017 Felix Yan <[email protected]>, et al. from flaky import flaky import pytest pytestmark = pytest.mark.asyncio @flaky async def test_ubuntupkg(get_version): assert await get_version("sigrok-firmware-fx2lafw", {"ubuntupkg": None}) == "0.1.3-1" @flaky async def test_ubuntu...
# MIT licensed # Copyright (c) 2017 Felix Yan <[email protected]>, et al. import pytest pytestmark = pytest.mark.asyncio async def test_ubuntupkg(get_version): assert await get_version("sigrok-firmware-fx2lafw", {"ubuntupkg": None}) == "0.1.3-1" async def test_ubuntupkg_strip_release(get_version): as...
<commit_before># MIT licensed # Copyright (c) 2017 Felix Yan <[email protected]>, et al. import pytest pytestmark = pytest.mark.asyncio async def test_ubuntupkg(get_version): assert await get_version("sigrok-firmware-fx2lafw", {"ubuntupkg": None}) == "0.1.3-1" async def test_ubuntupkg_strip_release(get_v...
3401b0147f19839323b06b0838e6fdbd5c125649
opps/core/models/published.py
opps/core/models/published.py
#!/usr/bin/env python from django.db import models from django.utils.translation import ugettext_lazy as _ from datetime import datetime class PublisherMnager(models.Manager): def all_published(self): return super(PublisherMnager, self).get_query_set().filter( date_available__lte=datetim...
#!/usr/bin/env python from django.db import models from django.utils.translation import ugettext_lazy as _ from datetime import datetime class PublisherMnager(models.Manager): def all_published(self): return super(PublisherMnager, self).get_query_set().filter( date_available__lte=datetim...
Change class name Publisher to Published on models
Change class name Publisher to Published on models
Python
mit
jeanmask/opps,jeanmask/opps,opps/opps,YACOWS/opps,jeanmask/opps,jeanmask/opps,opps/opps,opps/opps,YACOWS/opps,williamroot/opps,williamroot/opps,williamroot/opps,YACOWS/opps,williamroot/opps,opps/opps,YACOWS/opps
#!/usr/bin/env python from django.db import models from django.utils.translation import ugettext_lazy as _ from datetime import datetime class PublisherMnager(models.Manager): def all_published(self): return super(PublisherMnager, self).get_query_set().filter( date_available__lte=datetim...
#!/usr/bin/env python from django.db import models from django.utils.translation import ugettext_lazy as _ from datetime import datetime class PublisherMnager(models.Manager): def all_published(self): return super(PublisherMnager, self).get_query_set().filter( date_available__lte=datetim...
<commit_before>#!/usr/bin/env python from django.db import models from django.utils.translation import ugettext_lazy as _ from datetime import datetime class PublisherMnager(models.Manager): def all_published(self): return super(PublisherMnager, self).get_query_set().filter( date_availab...
#!/usr/bin/env python from django.db import models from django.utils.translation import ugettext_lazy as _ from datetime import datetime class PublisherMnager(models.Manager): def all_published(self): return super(PublisherMnager, self).get_query_set().filter( date_available__lte=datetim...
#!/usr/bin/env python from django.db import models from django.utils.translation import ugettext_lazy as _ from datetime import datetime class PublisherMnager(models.Manager): def all_published(self): return super(PublisherMnager, self).get_query_set().filter( date_available__lte=datetim...
<commit_before>#!/usr/bin/env python from django.db import models from django.utils.translation import ugettext_lazy as _ from datetime import datetime class PublisherMnager(models.Manager): def all_published(self): return super(PublisherMnager, self).get_query_set().filter( date_availab...
67f39d1b51014b06877b93ba32a18a1f53cd231c
mama_cas/urls.py
mama_cas/urls.py
""" URLconf for CAS server URIs as described in the CAS protocol. """ from django.conf.urls import patterns from django.conf.urls import url from django.views.decorators.cache import never_cache from mama_cas.views import login from mama_cas.views import logout from mama_cas.views import validate from mama_cas.views ...
""" URLconf for CAS server URIs as described in the CAS protocol. """ from django.conf.urls import patterns from django.conf.urls import url from django.views.decorators.cache import never_cache from mama_cas.views import login from mama_cas.views import logout from mama_cas.views import validate from mama_cas.views ...
Remove prefix from URL paths
Remove prefix from URL paths This path information should be set by the including project.
Python
bsd-3-clause
harlov/django-mama-cas,harlov/django-mama-cas,forcityplatform/django-mama-cas,orbitvu/django-mama-cas,forcityplatform/django-mama-cas,jbittel/django-mama-cas,orbitvu/django-mama-cas,jbittel/django-mama-cas
""" URLconf for CAS server URIs as described in the CAS protocol. """ from django.conf.urls import patterns from django.conf.urls import url from django.views.decorators.cache import never_cache from mama_cas.views import login from mama_cas.views import logout from mama_cas.views import validate from mama_cas.views ...
""" URLconf for CAS server URIs as described in the CAS protocol. """ from django.conf.urls import patterns from django.conf.urls import url from django.views.decorators.cache import never_cache from mama_cas.views import login from mama_cas.views import logout from mama_cas.views import validate from mama_cas.views ...
<commit_before>""" URLconf for CAS server URIs as described in the CAS protocol. """ from django.conf.urls import patterns from django.conf.urls import url from django.views.decorators.cache import never_cache from mama_cas.views import login from mama_cas.views import logout from mama_cas.views import validate from ...
""" URLconf for CAS server URIs as described in the CAS protocol. """ from django.conf.urls import patterns from django.conf.urls import url from django.views.decorators.cache import never_cache from mama_cas.views import login from mama_cas.views import logout from mama_cas.views import validate from mama_cas.views ...
""" URLconf for CAS server URIs as described in the CAS protocol. """ from django.conf.urls import patterns from django.conf.urls import url from django.views.decorators.cache import never_cache from mama_cas.views import login from mama_cas.views import logout from mama_cas.views import validate from mama_cas.views ...
<commit_before>""" URLconf for CAS server URIs as described in the CAS protocol. """ from django.conf.urls import patterns from django.conf.urls import url from django.views.decorators.cache import never_cache from mama_cas.views import login from mama_cas.views import logout from mama_cas.views import validate from ...
b379c60e59584c931cc441fd1d64a9049d1c2b55
src/formatter.py
src/formatter.py
import json from collections import OrderedDict from .command import Command from .settings import FormatterSettings class Formatter(): def __init__(self, name, command='', args=''): self.__name = name self.__command = command.split(' ') if command else [] self.__args = args.split(' ') if ...
import json from collections import OrderedDict from .command import Command from .settings import FormatterSettings class Formatter(): def __init__(self, name, command=None, args=None, formatter=None): self.__name = name self.__format = formatter self.__settings = FormatterSettings(name.l...
Allow format function to be provided to Formatter constructor
Allow format function to be provided to Formatter constructor
Python
mit
Rypac/sublime-format
import json from collections import OrderedDict from .command import Command from .settings import FormatterSettings class Formatter(): def __init__(self, name, command='', args=''): self.__name = name self.__command = command.split(' ') if command else [] self.__args = args.split(' ') if ...
import json from collections import OrderedDict from .command import Command from .settings import FormatterSettings class Formatter(): def __init__(self, name, command=None, args=None, formatter=None): self.__name = name self.__format = formatter self.__settings = FormatterSettings(name.l...
<commit_before>import json from collections import OrderedDict from .command import Command from .settings import FormatterSettings class Formatter(): def __init__(self, name, command='', args=''): self.__name = name self.__command = command.split(' ') if command else [] self.__args = args...
import json from collections import OrderedDict from .command import Command from .settings import FormatterSettings class Formatter(): def __init__(self, name, command=None, args=None, formatter=None): self.__name = name self.__format = formatter self.__settings = FormatterSettings(name.l...
import json from collections import OrderedDict from .command import Command from .settings import FormatterSettings class Formatter(): def __init__(self, name, command='', args=''): self.__name = name self.__command = command.split(' ') if command else [] self.__args = args.split(' ') if ...
<commit_before>import json from collections import OrderedDict from .command import Command from .settings import FormatterSettings class Formatter(): def __init__(self, name, command='', args=''): self.__name = name self.__command = command.split(' ') if command else [] self.__args = args...
bd577d23c5cdee1ae2d5c76a712a0519265ee13d
src/event_manager/views.py
src/event_manager/views.py
from django.shortcuts import render from event_manager.models import Suggestion, Event from django.contrib.auth.decorators import login_required def home(request): return render(request, 'login2.html', {}) #FIXME: Remove comment when login works #@login_required def my_suggestions(request): #FIXME: Need to only sel...
from django.shortcuts import render from event_manager.models import Suggestion, Event from django.contrib.auth.decorators import login_required def home(request): return render(request, 'login2.html', {}) #FIXME: Remove comment when login works #@login_required def my_suggestions(request): #FIXME: Need to only sel...
Switch from raw dict to context dict
Switch from raw dict to context dict
Python
agpl-3.0
DavidJFelix/hatchit,DavidJFelix/hatchit,DavidJFelix/hatchit
from django.shortcuts import render from event_manager.models import Suggestion, Event from django.contrib.auth.decorators import login_required def home(request): return render(request, 'login2.html', {}) #FIXME: Remove comment when login works #@login_required def my_suggestions(request): #FIXME: Need to only sel...
from django.shortcuts import render from event_manager.models import Suggestion, Event from django.contrib.auth.decorators import login_required def home(request): return render(request, 'login2.html', {}) #FIXME: Remove comment when login works #@login_required def my_suggestions(request): #FIXME: Need to only sel...
<commit_before>from django.shortcuts import render from event_manager.models import Suggestion, Event from django.contrib.auth.decorators import login_required def home(request): return render(request, 'login2.html', {}) #FIXME: Remove comment when login works #@login_required def my_suggestions(request): #FIXME: N...
from django.shortcuts import render from event_manager.models import Suggestion, Event from django.contrib.auth.decorators import login_required def home(request): return render(request, 'login2.html', {}) #FIXME: Remove comment when login works #@login_required def my_suggestions(request): #FIXME: Need to only sel...
from django.shortcuts import render from event_manager.models import Suggestion, Event from django.contrib.auth.decorators import login_required def home(request): return render(request, 'login2.html', {}) #FIXME: Remove comment when login works #@login_required def my_suggestions(request): #FIXME: Need to only sel...
<commit_before>from django.shortcuts import render from event_manager.models import Suggestion, Event from django.contrib.auth.decorators import login_required def home(request): return render(request, 'login2.html', {}) #FIXME: Remove comment when login works #@login_required def my_suggestions(request): #FIXME: N...
1ae797e18286fd781797689a567f9d23ab3179d1
modules/tools.py
modules/tools.py
inf = infinity = float('inf') class Timer: def __init__(self, duration, *callbacks): self.duration = duration self.callbacks = list(callbacks) self.elapsed = 0 self.expired = False self.paused = False def register(self, callback): self.callbacks.append(callbac...
inf = infinity = float('inf') class Timer: def __init__(self, duration, *callbacks): self.duration = duration self.callbacks = list(callbacks) self.elapsed = 0 self.expired = False self.paused = False def update(self, time): if self.expired: return...
Add a restart() method to Timer.
Add a restart() method to Timer.
Python
mit
kxgames/kxg
inf = infinity = float('inf') class Timer: def __init__(self, duration, *callbacks): self.duration = duration self.callbacks = list(callbacks) self.elapsed = 0 self.expired = False self.paused = False def register(self, callback): self.callbacks.append(callbac...
inf = infinity = float('inf') class Timer: def __init__(self, duration, *callbacks): self.duration = duration self.callbacks = list(callbacks) self.elapsed = 0 self.expired = False self.paused = False def update(self, time): if self.expired: return...
<commit_before>inf = infinity = float('inf') class Timer: def __init__(self, duration, *callbacks): self.duration = duration self.callbacks = list(callbacks) self.elapsed = 0 self.expired = False self.paused = False def register(self, callback): self.callbacks...
inf = infinity = float('inf') class Timer: def __init__(self, duration, *callbacks): self.duration = duration self.callbacks = list(callbacks) self.elapsed = 0 self.expired = False self.paused = False def update(self, time): if self.expired: return...
inf = infinity = float('inf') class Timer: def __init__(self, duration, *callbacks): self.duration = duration self.callbacks = list(callbacks) self.elapsed = 0 self.expired = False self.paused = False def register(self, callback): self.callbacks.append(callbac...
<commit_before>inf = infinity = float('inf') class Timer: def __init__(self, duration, *callbacks): self.duration = duration self.callbacks = list(callbacks) self.elapsed = 0 self.expired = False self.paused = False def register(self, callback): self.callbacks...
5cdc5755b1a687c9b34bfd575163ac367816f12a
migrations/versions/3961ccb5d884_increase_artifact_name_length.py
migrations/versions/3961ccb5d884_increase_artifact_name_length.py
"""increase artifact name length Revision ID: 3961ccb5d884 Revises: 1b229c83511d Create Date: 2015-11-05 15:34:28.189700 """ # revision identifiers, used by Alembic. revision = '3961ccb5d884' down_revision = '1b229c83511d' from alembic import op import sqlalchemy as sa def upgrade(): op.alter_column('artifact...
"""increase artifact name length Revision ID: 3961ccb5d884 Revises: 1b229c83511d Create Date: 2015-11-05 15:34:28.189700 """ # revision identifiers, used by Alembic. revision = '3961ccb5d884' down_revision = '1b229c83511d' from alembic import op import sqlalchemy as sa def upgrade(): op.alter_column('artifact...
Fix extend artifact name migration script.
Fix extend artifact name migration script. Test Plan: ran migration locally and checked table schema Reviewers: anupc, kylec Reviewed By: kylec Subscribers: changesbot Differential Revision: https://tails.corp.dropbox.com/D151824
Python
apache-2.0
dropbox/changes,dropbox/changes,dropbox/changes,dropbox/changes
"""increase artifact name length Revision ID: 3961ccb5d884 Revises: 1b229c83511d Create Date: 2015-11-05 15:34:28.189700 """ # revision identifiers, used by Alembic. revision = '3961ccb5d884' down_revision = '1b229c83511d' from alembic import op import sqlalchemy as sa def upgrade(): op.alter_column('artifact...
"""increase artifact name length Revision ID: 3961ccb5d884 Revises: 1b229c83511d Create Date: 2015-11-05 15:34:28.189700 """ # revision identifiers, used by Alembic. revision = '3961ccb5d884' down_revision = '1b229c83511d' from alembic import op import sqlalchemy as sa def upgrade(): op.alter_column('artifact...
<commit_before>"""increase artifact name length Revision ID: 3961ccb5d884 Revises: 1b229c83511d Create Date: 2015-11-05 15:34:28.189700 """ # revision identifiers, used by Alembic. revision = '3961ccb5d884' down_revision = '1b229c83511d' from alembic import op import sqlalchemy as sa def upgrade(): op.alter_c...
"""increase artifact name length Revision ID: 3961ccb5d884 Revises: 1b229c83511d Create Date: 2015-11-05 15:34:28.189700 """ # revision identifiers, used by Alembic. revision = '3961ccb5d884' down_revision = '1b229c83511d' from alembic import op import sqlalchemy as sa def upgrade(): op.alter_column('artifact...
"""increase artifact name length Revision ID: 3961ccb5d884 Revises: 1b229c83511d Create Date: 2015-11-05 15:34:28.189700 """ # revision identifiers, used by Alembic. revision = '3961ccb5d884' down_revision = '1b229c83511d' from alembic import op import sqlalchemy as sa def upgrade(): op.alter_column('artifact...
<commit_before>"""increase artifact name length Revision ID: 3961ccb5d884 Revises: 1b229c83511d Create Date: 2015-11-05 15:34:28.189700 """ # revision identifiers, used by Alembic. revision = '3961ccb5d884' down_revision = '1b229c83511d' from alembic import op import sqlalchemy as sa def upgrade(): op.alter_c...
223f248a1d1791b1a098876317905f4930330487
salesforce/backend/__init__.py
salesforce/backend/__init__.py
# django-salesforce # # by Phil Christensen # (c) 2012-2013 Freelancers Union (http://www.freelancersunion.org) # See LICENSE.md for details # """ Database backend for the Salesforce API. """ import socket from django.conf import settings import logging log = logging.getLogger(__name__) sf_alias = getattr(settings, ...
# django-salesforce # # by Phil Christensen # (c) 2012-2013 Freelancers Union (http://www.freelancersunion.org) # See LICENSE.md for details # """ Database backend for the Salesforce API. No code in this directory is used with standard databases, even if a standard database is used for running some application tests ...
Comment about the directory structure
Comment about the directory structure
Python
mit
django-salesforce/django-salesforce,chromakey/django-salesforce,django-salesforce/django-salesforce,philchristensen/django-salesforce,chromakey/django-salesforce,philchristensen/django-salesforce,chromakey/django-salesforce,hynekcer/django-salesforce,philchristensen/django-salesforce,hynekcer/django-salesforce,hynekcer...
# django-salesforce # # by Phil Christensen # (c) 2012-2013 Freelancers Union (http://www.freelancersunion.org) # See LICENSE.md for details # """ Database backend for the Salesforce API. """ import socket from django.conf import settings import logging log = logging.getLogger(__name__) sf_alias = getattr(settings, ...
# django-salesforce # # by Phil Christensen # (c) 2012-2013 Freelancers Union (http://www.freelancersunion.org) # See LICENSE.md for details # """ Database backend for the Salesforce API. No code in this directory is used with standard databases, even if a standard database is used for running some application tests ...
<commit_before># django-salesforce # # by Phil Christensen # (c) 2012-2013 Freelancers Union (http://www.freelancersunion.org) # See LICENSE.md for details # """ Database backend for the Salesforce API. """ import socket from django.conf import settings import logging log = logging.getLogger(__name__) sf_alias = get...
# django-salesforce # # by Phil Christensen # (c) 2012-2013 Freelancers Union (http://www.freelancersunion.org) # See LICENSE.md for details # """ Database backend for the Salesforce API. No code in this directory is used with standard databases, even if a standard database is used for running some application tests ...
# django-salesforce # # by Phil Christensen # (c) 2012-2013 Freelancers Union (http://www.freelancersunion.org) # See LICENSE.md for details # """ Database backend for the Salesforce API. """ import socket from django.conf import settings import logging log = logging.getLogger(__name__) sf_alias = getattr(settings, ...
<commit_before># django-salesforce # # by Phil Christensen # (c) 2012-2013 Freelancers Union (http://www.freelancersunion.org) # See LICENSE.md for details # """ Database backend for the Salesforce API. """ import socket from django.conf import settings import logging log = logging.getLogger(__name__) sf_alias = get...
b23ed2d6d74c4604e9bb7b55faf121661ee9f785
statePointsGen.py
statePointsGen.py
# Thermo State Solver # Solves for state parameters at various points in a simple thermodynamic model # Developed by Neal DeBuhr import csv import argparse import itertools
# Thermo State Solver # Solves for state parameters at various points in a simple thermodynamic model # Developed by Neal DeBuhr import csv import argparse import itertools import string numPoints=int(input('Number of points in analysis:')) num2alpha = dict(zip(range(1, 27), string.ascii_uppercase)) outRow=[''] outR...
Develop program for points file generation
Develop program for points file generation
Python
mit
ndebuhr/thermo-state-solver,ndebuhr/thermo-state-solver
# Thermo State Solver # Solves for state parameters at various points in a simple thermodynamic model # Developed by Neal DeBuhr import csv import argparse import itertools Develop program for points file generation
# Thermo State Solver # Solves for state parameters at various points in a simple thermodynamic model # Developed by Neal DeBuhr import csv import argparse import itertools import string numPoints=int(input('Number of points in analysis:')) num2alpha = dict(zip(range(1, 27), string.ascii_uppercase)) outRow=[''] outR...
<commit_before># Thermo State Solver # Solves for state parameters at various points in a simple thermodynamic model # Developed by Neal DeBuhr import csv import argparse import itertools <commit_msg>Develop program for points file generation<commit_after>
# Thermo State Solver # Solves for state parameters at various points in a simple thermodynamic model # Developed by Neal DeBuhr import csv import argparse import itertools import string numPoints=int(input('Number of points in analysis:')) num2alpha = dict(zip(range(1, 27), string.ascii_uppercase)) outRow=[''] outR...
# Thermo State Solver # Solves for state parameters at various points in a simple thermodynamic model # Developed by Neal DeBuhr import csv import argparse import itertools Develop program for points file generation# Thermo State Solver # Solves for state parameters at various points in a simple thermodynamic model ...
<commit_before># Thermo State Solver # Solves for state parameters at various points in a simple thermodynamic model # Developed by Neal DeBuhr import csv import argparse import itertools <commit_msg>Develop program for points file generation<commit_after># Thermo State Solver # Solves for state parameters at various...
cccdb3b914b1466a34a4b3d0a1b47b880e21168b
pml/__init__.py
pml/__init__.py
SP = 'setpoint' RB = 'readback' ENG = 'machine' PHY = 'physics'
SP = 'setpoint' RB = 'readback' ENG = 'engineering' PHY = 'physics'
Change variable name for consistency
Change variable name for consistency
Python
apache-2.0
willrogers/pml,willrogers/pml
SP = 'setpoint' RB = 'readback' ENG = 'machine' PHY = 'physics' Change variable name for consistency
SP = 'setpoint' RB = 'readback' ENG = 'engineering' PHY = 'physics'
<commit_before>SP = 'setpoint' RB = 'readback' ENG = 'machine' PHY = 'physics' <commit_msg>Change variable name for consistency<commit_after>
SP = 'setpoint' RB = 'readback' ENG = 'engineering' PHY = 'physics'
SP = 'setpoint' RB = 'readback' ENG = 'machine' PHY = 'physics' Change variable name for consistencySP = 'setpoint' RB = 'readback' ENG = 'engineering' PHY = 'physics'
<commit_before>SP = 'setpoint' RB = 'readback' ENG = 'machine' PHY = 'physics' <commit_msg>Change variable name for consistency<commit_after>SP = 'setpoint' RB = 'readback' ENG = 'engineering' PHY = 'physics'
f3b9cca8571acd1815534c5eb409f2ef166f897c
crispy/main.py
crispy/main.py
# coding: utf-8 ################################################################### # Copyright (c) 2016-2020 European Synchrotron Radiation Facility # # # # Author: Marius Retegan # # ...
# coding: utf-8 ################################################################### # Copyright (c) 2016-2020 European Synchrotron Radiation Facility # # # # Author: Marius Retegan # # ...
Set up loggers after the configuration file is loaded
Set up loggers after the configuration file is loaded
Python
mit
mretegan/crispy,mretegan/crispy
# coding: utf-8 ################################################################### # Copyright (c) 2016-2020 European Synchrotron Radiation Facility # # # # Author: Marius Retegan # # ...
# coding: utf-8 ################################################################### # Copyright (c) 2016-2020 European Synchrotron Radiation Facility # # # # Author: Marius Retegan # # ...
<commit_before># coding: utf-8 ################################################################### # Copyright (c) 2016-2020 European Synchrotron Radiation Facility # # # # Author: Marius Retegan # # ...
# coding: utf-8 ################################################################### # Copyright (c) 2016-2020 European Synchrotron Radiation Facility # # # # Author: Marius Retegan # # ...
# coding: utf-8 ################################################################### # Copyright (c) 2016-2020 European Synchrotron Radiation Facility # # # # Author: Marius Retegan # # ...
<commit_before># coding: utf-8 ################################################################### # Copyright (c) 2016-2020 European Synchrotron Radiation Facility # # # # Author: Marius Retegan # # ...
ef003a3ebf14545927d055a0deda7e1982e90e53
scripts/capnp_test_pycapnp.py
scripts/capnp_test_pycapnp.py
#!/usr/bin/env python import capnp import os capnp.add_import_hook([os.getcwd(), "/usr/local/include/"]) # change this to be auto-detected? import test_capnp import sys def decode(name): print getattr(test_capnp, name)._short_str() def encode(name): val = getattr(test_capnp, name) class_name = name[0].u...
#!/usr/bin/env python from __future__ import print_function import capnp import os capnp.add_import_hook([os.getcwd(), "/usr/local/include/"]) # change this to be auto-detected? import test_capnp import sys def decode(name): class_name = name[0].upper() + name[1:] print(getattr(test_capnp, class_name).from_b...
Fix decode test to actually decode message from stdin
Fix decode test to actually decode message from stdin
Python
bsd-2-clause
tempbottle/pycapnp,tempbottle/pycapnp,SymbiFlow/pycapnp,jparyani/pycapnp,SymbiFlow/pycapnp,SymbiFlow/pycapnp,rcrowder/pycapnp,jparyani/pycapnp,jparyani/pycapnp,rcrowder/pycapnp,SymbiFlow/pycapnp,jparyani/pycapnp,tempbottle/pycapnp,rcrowder/pycapnp,rcrowder/pycapnp,tempbottle/pycapnp
#!/usr/bin/env python import capnp import os capnp.add_import_hook([os.getcwd(), "/usr/local/include/"]) # change this to be auto-detected? import test_capnp import sys def decode(name): print getattr(test_capnp, name)._short_str() def encode(name): val = getattr(test_capnp, name) class_name = name[0].u...
#!/usr/bin/env python from __future__ import print_function import capnp import os capnp.add_import_hook([os.getcwd(), "/usr/local/include/"]) # change this to be auto-detected? import test_capnp import sys def decode(name): class_name = name[0].upper() + name[1:] print(getattr(test_capnp, class_name).from_b...
<commit_before>#!/usr/bin/env python import capnp import os capnp.add_import_hook([os.getcwd(), "/usr/local/include/"]) # change this to be auto-detected? import test_capnp import sys def decode(name): print getattr(test_capnp, name)._short_str() def encode(name): val = getattr(test_capnp, name) class_n...
#!/usr/bin/env python from __future__ import print_function import capnp import os capnp.add_import_hook([os.getcwd(), "/usr/local/include/"]) # change this to be auto-detected? import test_capnp import sys def decode(name): class_name = name[0].upper() + name[1:] print(getattr(test_capnp, class_name).from_b...
#!/usr/bin/env python import capnp import os capnp.add_import_hook([os.getcwd(), "/usr/local/include/"]) # change this to be auto-detected? import test_capnp import sys def decode(name): print getattr(test_capnp, name)._short_str() def encode(name): val = getattr(test_capnp, name) class_name = name[0].u...
<commit_before>#!/usr/bin/env python import capnp import os capnp.add_import_hook([os.getcwd(), "/usr/local/include/"]) # change this to be auto-detected? import test_capnp import sys def decode(name): print getattr(test_capnp, name)._short_str() def encode(name): val = getattr(test_capnp, name) class_n...
52e9390d88062e9442b18a7793e6696a36f5b9c3
testinfra/functional/test_tor_interfaces.py
testinfra/functional/test_tor_interfaces.py
import os import re import pytest sdvars = pytest.securedrop_test_vars @pytest.mark.xfail @pytest.mark.parametrize('site', sdvars.tor_url_files) @pytest.mark.skipif(os.environ.get('FPF_CI', 'false') == "false", reason="Can only assure Tor is configured in CI atm") def test_www(Command, site): ...
import os import re import pytest sdvars = pytest.securedrop_test_vars @pytest.mark.parametrize('site', sdvars.tor_url_files) @pytest.mark.skipif(os.environ.get('FPF_CI', 'false') == "false", reason="Can only assure Tor is configured in CI atm") def test_www(Command, site): """ Ensure tor...
Remove XFAIL on functional tor test
Remove XFAIL on functional tor test
Python
agpl-3.0
conorsch/securedrop,ehartsuyker/securedrop,garrettr/securedrop,ehartsuyker/securedrop,conorsch/securedrop,heartsucker/securedrop,garrettr/securedrop,ehartsuyker/securedrop,ehartsuyker/securedrop,conorsch/securedrop,ehartsuyker/securedrop,heartsucker/securedrop,conorsch/securedrop,heartsucker/securedrop,ehartsuyker/secu...
import os import re import pytest sdvars = pytest.securedrop_test_vars @pytest.mark.xfail @pytest.mark.parametrize('site', sdvars.tor_url_files) @pytest.mark.skipif(os.environ.get('FPF_CI', 'false') == "false", reason="Can only assure Tor is configured in CI atm") def test_www(Command, site): ...
import os import re import pytest sdvars = pytest.securedrop_test_vars @pytest.mark.parametrize('site', sdvars.tor_url_files) @pytest.mark.skipif(os.environ.get('FPF_CI', 'false') == "false", reason="Can only assure Tor is configured in CI atm") def test_www(Command, site): """ Ensure tor...
<commit_before>import os import re import pytest sdvars = pytest.securedrop_test_vars @pytest.mark.xfail @pytest.mark.parametrize('site', sdvars.tor_url_files) @pytest.mark.skipif(os.environ.get('FPF_CI', 'false') == "false", reason="Can only assure Tor is configured in CI atm") def test_www(Comm...
import os import re import pytest sdvars = pytest.securedrop_test_vars @pytest.mark.parametrize('site', sdvars.tor_url_files) @pytest.mark.skipif(os.environ.get('FPF_CI', 'false') == "false", reason="Can only assure Tor is configured in CI atm") def test_www(Command, site): """ Ensure tor...
import os import re import pytest sdvars = pytest.securedrop_test_vars @pytest.mark.xfail @pytest.mark.parametrize('site', sdvars.tor_url_files) @pytest.mark.skipif(os.environ.get('FPF_CI', 'false') == "false", reason="Can only assure Tor is configured in CI atm") def test_www(Command, site): ...
<commit_before>import os import re import pytest sdvars = pytest.securedrop_test_vars @pytest.mark.xfail @pytest.mark.parametrize('site', sdvars.tor_url_files) @pytest.mark.skipif(os.environ.get('FPF_CI', 'false') == "false", reason="Can only assure Tor is configured in CI atm") def test_www(Comm...
aee49d59b76400389ffa768950b479094059e385
linguist/tests/translations.py
linguist/tests/translations.py
# -*- coding: utf-8 -*_ from django.db import models from ..base import ModelTranslationBase from ..mixins import ModelMixin, ManagerMixin class FooManager(ManagerMixin, models.Manager): pass class BarManager(ManagerMixin, models.Manager): pass class FooModel(ModelMixin, models.Model): title = models...
# -*- coding: utf-8 -*_ from django.db import models from ..base import ModelTranslationBase from ..mixins import ModelMixin, ManagerMixin class FooManager(ManagerMixin, models.Manager): pass class BarManager(ManagerMixin, models.Manager): pass class FooModel(ModelMixin, models.Model): title = models...
Update test models for new metaclass support.
Update test models for new metaclass support.
Python
mit
ulule/django-linguist
# -*- coding: utf-8 -*_ from django.db import models from ..base import ModelTranslationBase from ..mixins import ModelMixin, ManagerMixin class FooManager(ManagerMixin, models.Manager): pass class BarManager(ManagerMixin, models.Manager): pass class FooModel(ModelMixin, models.Model): title = models...
# -*- coding: utf-8 -*_ from django.db import models from ..base import ModelTranslationBase from ..mixins import ModelMixin, ManagerMixin class FooManager(ManagerMixin, models.Manager): pass class BarManager(ManagerMixin, models.Manager): pass class FooModel(ModelMixin, models.Model): title = models...
<commit_before># -*- coding: utf-8 -*_ from django.db import models from ..base import ModelTranslationBase from ..mixins import ModelMixin, ManagerMixin class FooManager(ManagerMixin, models.Manager): pass class BarManager(ManagerMixin, models.Manager): pass class FooModel(ModelMixin, models.Model): ...
# -*- coding: utf-8 -*_ from django.db import models from ..base import ModelTranslationBase from ..mixins import ModelMixin, ManagerMixin class FooManager(ManagerMixin, models.Manager): pass class BarManager(ManagerMixin, models.Manager): pass class FooModel(ModelMixin, models.Model): title = models...
# -*- coding: utf-8 -*_ from django.db import models from ..base import ModelTranslationBase from ..mixins import ModelMixin, ManagerMixin class FooManager(ManagerMixin, models.Manager): pass class BarManager(ManagerMixin, models.Manager): pass class FooModel(ModelMixin, models.Model): title = models...
<commit_before># -*- coding: utf-8 -*_ from django.db import models from ..base import ModelTranslationBase from ..mixins import ModelMixin, ManagerMixin class FooManager(ManagerMixin, models.Manager): pass class BarManager(ManagerMixin, models.Manager): pass class FooModel(ModelMixin, models.Model): ...
786bc416ca00c7021f5881e459d2634e8fcd8458
src/vdb/src/_vdb/common.py
src/vdb/src/_vdb/common.py
# Copyright (c) 2005-2016 Stefanos Harhalakis <[email protected]> # Copyright (c) 2016-2022 Google LLC # # 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 ...
# Copyright (c) 2005-2016 Stefanos Harhalakis <[email protected]> # Copyright (c) 2016-2022 Google LLC # # 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 ...
Add ipaddress.IPv[46]Network to the supported types
Add ipaddress.IPv[46]Network to the supported types
Python
apache-2.0
sharhalakis/vdns
# Copyright (c) 2005-2016 Stefanos Harhalakis <[email protected]> # Copyright (c) 2016-2022 Google LLC # # 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 ...
# Copyright (c) 2005-2016 Stefanos Harhalakis <[email protected]> # Copyright (c) 2016-2022 Google LLC # # 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 ...
<commit_before># Copyright (c) 2005-2016 Stefanos Harhalakis <[email protected]> # Copyright (c) 2016-2022 Google LLC # # 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/licens...
# Copyright (c) 2005-2016 Stefanos Harhalakis <[email protected]> # Copyright (c) 2016-2022 Google LLC # # 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 ...
# Copyright (c) 2005-2016 Stefanos Harhalakis <[email protected]> # Copyright (c) 2016-2022 Google LLC # # 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 ...
<commit_before># Copyright (c) 2005-2016 Stefanos Harhalakis <[email protected]> # Copyright (c) 2016-2022 Google LLC # # 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/licens...
decc454dfb50258eaab4635379b1c18470246f62
indico/modules/events/views.py
indico/modules/events/views.py
# This file is part of Indico. # Copyright (C) 2002 - 2016 European Organization for Nuclear Research (CERN). # # Indico is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License as # published by the Free Software Foundation; either version 3 of the # License, or (a...
# This file is part of Indico. # Copyright (C) 2002 - 2016 European Organization for Nuclear Research (CERN). # # Indico is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License as # published by the Free Software Foundation; either version 3 of the # License, or (a...
Fix highlighting of "External ID Types" menu entry
Fix highlighting of "External ID Types" menu entry
Python
mit
ThiefMaster/indico,pferreir/indico,mic4ael/indico,ThiefMaster/indico,DirkHoffmann/indico,ThiefMaster/indico,OmeGak/indico,mic4ael/indico,indico/indico,DirkHoffmann/indico,mvidalgarcia/indico,mvidalgarcia/indico,pferreir/indico,OmeGak/indico,OmeGak/indico,mic4ael/indico,mic4ael/indico,indico/indico,DirkHoffmann/indico,i...
# This file is part of Indico. # Copyright (C) 2002 - 2016 European Organization for Nuclear Research (CERN). # # Indico is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License as # published by the Free Software Foundation; either version 3 of the # License, or (a...
# This file is part of Indico. # Copyright (C) 2002 - 2016 European Organization for Nuclear Research (CERN). # # Indico is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License as # published by the Free Software Foundation; either version 3 of the # License, or (a...
<commit_before># This file is part of Indico. # Copyright (C) 2002 - 2016 European Organization for Nuclear Research (CERN). # # Indico is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License as # published by the Free Software Foundation; either version 3 of the #...
# This file is part of Indico. # Copyright (C) 2002 - 2016 European Organization for Nuclear Research (CERN). # # Indico is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License as # published by the Free Software Foundation; either version 3 of the # License, or (a...
# This file is part of Indico. # Copyright (C) 2002 - 2016 European Organization for Nuclear Research (CERN). # # Indico is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License as # published by the Free Software Foundation; either version 3 of the # License, or (a...
<commit_before># This file is part of Indico. # Copyright (C) 2002 - 2016 European Organization for Nuclear Research (CERN). # # Indico is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License as # published by the Free Software Foundation; either version 3 of the #...
e579b04beb2f3c4fbe3e27d386919f3c8af888e5
retrieveData.py
retrieveData.py
#!/usr/bin/env python import json, os, requests from awsauth import S3Auth key = os.environ.get('UWOPENDATA_APIKEY') ACCESS_KEY = os.environ.get('AWS_ACCESS_KEY_ID') SECRET_KEY = os.environ.get('AWS_SECRET_ACCESS_KEY') def getData(service): payload = {'key': key, 'service': service} r = requests.get('http://api.uwa...
#!/usr/bin/env python import json, os, requests from awsauth import S3Auth key = os.environ.get('UWOPENDATA_APIKEY') ACCESS_KEY = os.environ.get('AWS_ACCESS_KEY_ID') SECRET_KEY = os.environ.get('AWS_SECRET_ACCESS_KEY') def getData(service): payload = {'key': key, 'service': service} r = requests.get('http://api.uwa...
Disable updating serviceInfo when retrieving daily data.
Disable updating serviceInfo when retrieving daily data.
Python
mit
alykhank/FoodMenu,alykhank/FoodMenu,alykhank/FoodMenu
#!/usr/bin/env python import json, os, requests from awsauth import S3Auth key = os.environ.get('UWOPENDATA_APIKEY') ACCESS_KEY = os.environ.get('AWS_ACCESS_KEY_ID') SECRET_KEY = os.environ.get('AWS_SECRET_ACCESS_KEY') def getData(service): payload = {'key': key, 'service': service} r = requests.get('http://api.uwa...
#!/usr/bin/env python import json, os, requests from awsauth import S3Auth key = os.environ.get('UWOPENDATA_APIKEY') ACCESS_KEY = os.environ.get('AWS_ACCESS_KEY_ID') SECRET_KEY = os.environ.get('AWS_SECRET_ACCESS_KEY') def getData(service): payload = {'key': key, 'service': service} r = requests.get('http://api.uwa...
<commit_before>#!/usr/bin/env python import json, os, requests from awsauth import S3Auth key = os.environ.get('UWOPENDATA_APIKEY') ACCESS_KEY = os.environ.get('AWS_ACCESS_KEY_ID') SECRET_KEY = os.environ.get('AWS_SECRET_ACCESS_KEY') def getData(service): payload = {'key': key, 'service': service} r = requests.get(...
#!/usr/bin/env python import json, os, requests from awsauth import S3Auth key = os.environ.get('UWOPENDATA_APIKEY') ACCESS_KEY = os.environ.get('AWS_ACCESS_KEY_ID') SECRET_KEY = os.environ.get('AWS_SECRET_ACCESS_KEY') def getData(service): payload = {'key': key, 'service': service} r = requests.get('http://api.uwa...
#!/usr/bin/env python import json, os, requests from awsauth import S3Auth key = os.environ.get('UWOPENDATA_APIKEY') ACCESS_KEY = os.environ.get('AWS_ACCESS_KEY_ID') SECRET_KEY = os.environ.get('AWS_SECRET_ACCESS_KEY') def getData(service): payload = {'key': key, 'service': service} r = requests.get('http://api.uwa...
<commit_before>#!/usr/bin/env python import json, os, requests from awsauth import S3Auth key = os.environ.get('UWOPENDATA_APIKEY') ACCESS_KEY = os.environ.get('AWS_ACCESS_KEY_ID') SECRET_KEY = os.environ.get('AWS_SECRET_ACCESS_KEY') def getData(service): payload = {'key': key, 'service': service} r = requests.get(...
6d3180ffd84e126ee4441a367a48a750d270892e
sumy/document/_sentence.py
sumy/document/_sentence.py
# -*- coding: utf8 -*- from __future__ import absolute_import from __future__ import division, print_function, unicode_literals from itertools import chain from .._compat import to_unicode, to_string, unicode_compatible @unicode_compatible class Sentence(object): __slots__ = ("_words", "_is_heading",) def ...
# -*- coding: utf8 -*- from __future__ import absolute_import from __future__ import division, print_function, unicode_literals import re from itertools import chain from .._compat import to_unicode, to_string, unicode_compatible _WORD_PATTERN = re.compile(r"^[^\W_]+$", re.UNICODE) @unicode_compatible class Sent...
Return only alphabetic words from sentence
Return only alphabetic words from sentence
Python
apache-2.0
miso-belica/sumy,miso-belica/sumy
# -*- coding: utf8 -*- from __future__ import absolute_import from __future__ import division, print_function, unicode_literals from itertools import chain from .._compat import to_unicode, to_string, unicode_compatible @unicode_compatible class Sentence(object): __slots__ = ("_words", "_is_heading",) def ...
# -*- coding: utf8 -*- from __future__ import absolute_import from __future__ import division, print_function, unicode_literals import re from itertools import chain from .._compat import to_unicode, to_string, unicode_compatible _WORD_PATTERN = re.compile(r"^[^\W_]+$", re.UNICODE) @unicode_compatible class Sent...
<commit_before># -*- coding: utf8 -*- from __future__ import absolute_import from __future__ import division, print_function, unicode_literals from itertools import chain from .._compat import to_unicode, to_string, unicode_compatible @unicode_compatible class Sentence(object): __slots__ = ("_words", "_is_headi...
# -*- coding: utf8 -*- from __future__ import absolute_import from __future__ import division, print_function, unicode_literals import re from itertools import chain from .._compat import to_unicode, to_string, unicode_compatible _WORD_PATTERN = re.compile(r"^[^\W_]+$", re.UNICODE) @unicode_compatible class Sent...
# -*- coding: utf8 -*- from __future__ import absolute_import from __future__ import division, print_function, unicode_literals from itertools import chain from .._compat import to_unicode, to_string, unicode_compatible @unicode_compatible class Sentence(object): __slots__ = ("_words", "_is_heading",) def ...
<commit_before># -*- coding: utf8 -*- from __future__ import absolute_import from __future__ import division, print_function, unicode_literals from itertools import chain from .._compat import to_unicode, to_string, unicode_compatible @unicode_compatible class Sentence(object): __slots__ = ("_words", "_is_headi...
503924f054f6f81eb08eda9884e5e4adc4df1609
cupcake/smush/plot.py
cupcake/smush/plot.py
""" User-facing interface for plotting all dimensionality reduction algorithms """ def smushplot(data, smusher='PCA', x=1, y=2, n_components=2, marker='o', marker_order=None, text=False, text_order=None, linewidth=1, linewidth_order=None, edgecolor='k', edgecolor_order=None, s...
""" User-facing interface for plotting all dimensionality reduction algorithms """ def smushplot(data, smusher='PCA', x=1, y=2, n_components=2, marker='o', marker_order=None, text=False, text_order=None, linewidth=1, linewidth_order=None, edgecolor='k', edgecolor_order=None, s...
Add x, y and n_components to docstring
Add x, y and n_components to docstring
Python
bsd-3-clause
olgabot/cupcake
""" User-facing interface for plotting all dimensionality reduction algorithms """ def smushplot(data, smusher='PCA', x=1, y=2, n_components=2, marker='o', marker_order=None, text=False, text_order=None, linewidth=1, linewidth_order=None, edgecolor='k', edgecolor_order=None, s...
""" User-facing interface for plotting all dimensionality reduction algorithms """ def smushplot(data, smusher='PCA', x=1, y=2, n_components=2, marker='o', marker_order=None, text=False, text_order=None, linewidth=1, linewidth_order=None, edgecolor='k', edgecolor_order=None, s...
<commit_before>""" User-facing interface for plotting all dimensionality reduction algorithms """ def smushplot(data, smusher='PCA', x=1, y=2, n_components=2, marker='o', marker_order=None, text=False, text_order=None, linewidth=1, linewidth_order=None, edgecolor='k', edgecolor_order=None, ...
""" User-facing interface for plotting all dimensionality reduction algorithms """ def smushplot(data, smusher='PCA', x=1, y=2, n_components=2, marker='o', marker_order=None, text=False, text_order=None, linewidth=1, linewidth_order=None, edgecolor='k', edgecolor_order=None, s...
""" User-facing interface for plotting all dimensionality reduction algorithms """ def smushplot(data, smusher='PCA', x=1, y=2, n_components=2, marker='o', marker_order=None, text=False, text_order=None, linewidth=1, linewidth_order=None, edgecolor='k', edgecolor_order=None, s...
<commit_before>""" User-facing interface for plotting all dimensionality reduction algorithms """ def smushplot(data, smusher='PCA', x=1, y=2, n_components=2, marker='o', marker_order=None, text=False, text_order=None, linewidth=1, linewidth_order=None, edgecolor='k', edgecolor_order=None, ...
a81c5bf24ab0271c60ed1db97d93c7d2e5ec6234
cutplanner/planner.py
cutplanner/planner.py
import collections # simple structure to keep track of a specific piece Piece = collections.namedtuple('Piece', 'id, length') class Planner(object): def __init__(self, sizes, needed, loss=0.25): self.stock = [] self.stock_sizes = sorted(sizes) self.pieces_needed = needed self.cut_...
import collections # simple structure to keep track of a specific piece Piece = collections.namedtuple('Piece', 'id, length') class Planner(object): def __init__(self, sizes, needed, loss=0.25): self.stock = [] self.stock_sizes = sorted(sizes) self.pieces_needed = needed self.cut_...
Make largest stock a property
Make largest stock a property
Python
mit
alanc10n/py-cutplanner
import collections # simple structure to keep track of a specific piece Piece = collections.namedtuple('Piece', 'id, length') class Planner(object): def __init__(self, sizes, needed, loss=0.25): self.stock = [] self.stock_sizes = sorted(sizes) self.pieces_needed = needed self.cut_...
import collections # simple structure to keep track of a specific piece Piece = collections.namedtuple('Piece', 'id, length') class Planner(object): def __init__(self, sizes, needed, loss=0.25): self.stock = [] self.stock_sizes = sorted(sizes) self.pieces_needed = needed self.cut_...
<commit_before>import collections # simple structure to keep track of a specific piece Piece = collections.namedtuple('Piece', 'id, length') class Planner(object): def __init__(self, sizes, needed, loss=0.25): self.stock = [] self.stock_sizes = sorted(sizes) self.pieces_needed = needed ...
import collections # simple structure to keep track of a specific piece Piece = collections.namedtuple('Piece', 'id, length') class Planner(object): def __init__(self, sizes, needed, loss=0.25): self.stock = [] self.stock_sizes = sorted(sizes) self.pieces_needed = needed self.cut_...
import collections # simple structure to keep track of a specific piece Piece = collections.namedtuple('Piece', 'id, length') class Planner(object): def __init__(self, sizes, needed, loss=0.25): self.stock = [] self.stock_sizes = sorted(sizes) self.pieces_needed = needed self.cut_...
<commit_before>import collections # simple structure to keep track of a specific piece Piece = collections.namedtuple('Piece', 'id, length') class Planner(object): def __init__(self, sizes, needed, loss=0.25): self.stock = [] self.stock_sizes = sorted(sizes) self.pieces_needed = needed ...
75d7441f90e077eeeb955e4eb0c514a1736a88fb
tohu/v3/utils.py
tohu/v3/utils.py
__all__ = ['identity', 'print_generated_sequence'] def identity(x): """ Helper function which returns its argument unchanged. That is, `identity(x)` returns `x` for any input `x`. """ return x def print_generated_sequence(gen, num, *, sep=", ", seed=None): """ Helper function which print...
from collections import namedtuple __all__ = ['identity', 'print_generated_sequence'] def identity(x): """ Helper function which returns its argument unchanged. That is, `identity(x)` returns `x` for any input `x`. """ return x def print_generated_sequence(gen, num, *, sep=", ", seed=None): ...
Add helper function to produce some dummy tuples (for testing and debugging)
Add helper function to produce some dummy tuples (for testing and debugging)
Python
mit
maxalbert/tohu
__all__ = ['identity', 'print_generated_sequence'] def identity(x): """ Helper function which returns its argument unchanged. That is, `identity(x)` returns `x` for any input `x`. """ return x def print_generated_sequence(gen, num, *, sep=", ", seed=None): """ Helper function which print...
from collections import namedtuple __all__ = ['identity', 'print_generated_sequence'] def identity(x): """ Helper function which returns its argument unchanged. That is, `identity(x)` returns `x` for any input `x`. """ return x def print_generated_sequence(gen, num, *, sep=", ", seed=None): ...
<commit_before>__all__ = ['identity', 'print_generated_sequence'] def identity(x): """ Helper function which returns its argument unchanged. That is, `identity(x)` returns `x` for any input `x`. """ return x def print_generated_sequence(gen, num, *, sep=", ", seed=None): """ Helper funct...
from collections import namedtuple __all__ = ['identity', 'print_generated_sequence'] def identity(x): """ Helper function which returns its argument unchanged. That is, `identity(x)` returns `x` for any input `x`. """ return x def print_generated_sequence(gen, num, *, sep=", ", seed=None): ...
__all__ = ['identity', 'print_generated_sequence'] def identity(x): """ Helper function which returns its argument unchanged. That is, `identity(x)` returns `x` for any input `x`. """ return x def print_generated_sequence(gen, num, *, sep=", ", seed=None): """ Helper function which print...
<commit_before>__all__ = ['identity', 'print_generated_sequence'] def identity(x): """ Helper function which returns its argument unchanged. That is, `identity(x)` returns `x` for any input `x`. """ return x def print_generated_sequence(gen, num, *, sep=", ", seed=None): """ Helper funct...
1b252224b67ea7e9a9f9ac3e1a66b4170bdedef4
django_lightweight_queue/management/commands/queue_runner.py
django_lightweight_queue/management/commands/queue_runner.py
import logging from optparse import make_option from django.core.management.base import NoArgsCommand from ...utils import get_backend class Command(NoArgsCommand): option_list = NoArgsCommand.option_list + ( make_option('--pidfile', action='store', dest='pidfile', default=None, help="Fork a...
import logging from optparse import make_option from django.core.management.base import NoArgsCommand from ...utils import get_backend, get_middleware class Command(NoArgsCommand): option_list = NoArgsCommand.option_list + ( make_option('--pidfile', action='store', dest='pidfile', default=None, ...
Load middleware before we fork.
Load middleware before we fork. Signed-off-by: Chris Lamb <[email protected]>
Python
bsd-3-clause
lamby/django-lightweight-queue,thread/django-lightweight-queue,thread/django-lightweight-queue,prophile/django-lightweight-queue,prophile/django-lightweight-queue
import logging from optparse import make_option from django.core.management.base import NoArgsCommand from ...utils import get_backend class Command(NoArgsCommand): option_list = NoArgsCommand.option_list + ( make_option('--pidfile', action='store', dest='pidfile', default=None, help="Fork a...
import logging from optparse import make_option from django.core.management.base import NoArgsCommand from ...utils import get_backend, get_middleware class Command(NoArgsCommand): option_list = NoArgsCommand.option_list + ( make_option('--pidfile', action='store', dest='pidfile', default=None, ...
<commit_before>import logging from optparse import make_option from django.core.management.base import NoArgsCommand from ...utils import get_backend class Command(NoArgsCommand): option_list = NoArgsCommand.option_list + ( make_option('--pidfile', action='store', dest='pidfile', default=None, ...
import logging from optparse import make_option from django.core.management.base import NoArgsCommand from ...utils import get_backend, get_middleware class Command(NoArgsCommand): option_list = NoArgsCommand.option_list + ( make_option('--pidfile', action='store', dest='pidfile', default=None, ...
import logging from optparse import make_option from django.core.management.base import NoArgsCommand from ...utils import get_backend class Command(NoArgsCommand): option_list = NoArgsCommand.option_list + ( make_option('--pidfile', action='store', dest='pidfile', default=None, help="Fork a...
<commit_before>import logging from optparse import make_option from django.core.management.base import NoArgsCommand from ...utils import get_backend class Command(NoArgsCommand): option_list = NoArgsCommand.option_list + ( make_option('--pidfile', action='store', dest='pidfile', default=None, ...
9e0ab4bfcd9e22447e66bb87f2ed849ffcd0c57a
shutter/service.py
shutter/service.py
class Shutter(object): def setup_database(self, pool): self.__dbpool = pool def snapshots(self, url): def _get_snapshot_urls(txn, url): txn.execute("""SELECT s.file_path FROM shutter.urls u ,shutter.snapshots s ...
class Shutter(object): def setup_database(self, pool): self.__dbpool = pool def snapshots(self, url): def _get_snapshot_urls(txn, url): txn.execute("""SELECT s.file_path FROM shutter.urls u ,shutter.snapshots s ...
Remove additional nesting from Shutter.snapshots results
Remove additional nesting from Shutter.snapshots results In order to remove the bug we flatten the return value of txn.fetchall(). After the change rerunning the tests confirms that the service is behaving accordingly to our expectations.
Python
bsd-3-clause
mulander/shutter
class Shutter(object): def setup_database(self, pool): self.__dbpool = pool def snapshots(self, url): def _get_snapshot_urls(txn, url): txn.execute("""SELECT s.file_path FROM shutter.urls u ,shutter.snapshots s ...
class Shutter(object): def setup_database(self, pool): self.__dbpool = pool def snapshots(self, url): def _get_snapshot_urls(txn, url): txn.execute("""SELECT s.file_path FROM shutter.urls u ,shutter.snapshots s ...
<commit_before>class Shutter(object): def setup_database(self, pool): self.__dbpool = pool def snapshots(self, url): def _get_snapshot_urls(txn, url): txn.execute("""SELECT s.file_path FROM shutter.urls u ,shutter.snapshot...
class Shutter(object): def setup_database(self, pool): self.__dbpool = pool def snapshots(self, url): def _get_snapshot_urls(txn, url): txn.execute("""SELECT s.file_path FROM shutter.urls u ,shutter.snapshots s ...
class Shutter(object): def setup_database(self, pool): self.__dbpool = pool def snapshots(self, url): def _get_snapshot_urls(txn, url): txn.execute("""SELECT s.file_path FROM shutter.urls u ,shutter.snapshots s ...
<commit_before>class Shutter(object): def setup_database(self, pool): self.__dbpool = pool def snapshots(self, url): def _get_snapshot_urls(txn, url): txn.execute("""SELECT s.file_path FROM shutter.urls u ,shutter.snapshot...
2a8a39ef8ca1e8bca7c1e36783d1e0bc0a43df26
todo/__init__.py
todo/__init__.py
"""django todo""" __version__ = '1.4.dev' __author__ = 'Scot Hacker' __email__ = '[email protected]' __url__ = 'https://github.com/shacker/django-todo' __license__ = 'BSD License'
"""django todo""" __version__ = '1.4' __author__ = 'Scot Hacker' __email__ = '[email protected]' __url__ = 'https://github.com/shacker/django-todo' __license__ = 'BSD License'
Fix version number to upload to PyPI
Fix version number to upload to PyPI
Python
bsd-3-clause
carlosedb/django-todo,shacker/django-todo,jwiltshire/django-todo,carlosedb/django-todo,shacker/django-todo,carlosedb/django-todo,jwiltshire/django-todo,jwiltshire/django-todo,shacker/django-todo
"""django todo""" __version__ = '1.4.dev' __author__ = 'Scot Hacker' __email__ = '[email protected]' __url__ = 'https://github.com/shacker/django-todo' __license__ = 'BSD License' Fix version number to upload to PyPI
"""django todo""" __version__ = '1.4' __author__ = 'Scot Hacker' __email__ = '[email protected]' __url__ = 'https://github.com/shacker/django-todo' __license__ = 'BSD License'
<commit_before>"""django todo""" __version__ = '1.4.dev' __author__ = 'Scot Hacker' __email__ = '[email protected]' __url__ = 'https://github.com/shacker/django-todo' __license__ = 'BSD License' <commit_msg>Fix version number to upload to PyPI<commit_after>
"""django todo""" __version__ = '1.4' __author__ = 'Scot Hacker' __email__ = '[email protected]' __url__ = 'https://github.com/shacker/django-todo' __license__ = 'BSD License'
"""django todo""" __version__ = '1.4.dev' __author__ = 'Scot Hacker' __email__ = '[email protected]' __url__ = 'https://github.com/shacker/django-todo' __license__ = 'BSD License' Fix version number to upload to PyPI"""django todo""" __version__ = '1.4' __author__ = 'Scot Hacker' __email__ = '[email protected]...
<commit_before>"""django todo""" __version__ = '1.4.dev' __author__ = 'Scot Hacker' __email__ = '[email protected]' __url__ = 'https://github.com/shacker/django-todo' __license__ = 'BSD License' <commit_msg>Fix version number to upload to PyPI<commit_after>"""django todo""" __version__ = '1.4' __author__ = 'Scot...
a1cd2c326f9dba608ee3c6ce82dd425e93e8265d
python/xchainer/__init__.py
python/xchainer/__init__.py
from xchainer._core import * # NOQA _global_context = Context() _global_context.get_backend('native') set_global_default_context(_global_context)
from xchainer._core import * # NOQA _global_context = Context() set_global_default_context(_global_context) set_default_device('native')
Set the default device to native in Python binding
Set the default device to native in Python binding
Python
mit
ktnyt/chainer,hvy/chainer,hvy/chainer,pfnet/chainer,chainer/chainer,ktnyt/chainer,jnishi/chainer,okuta/chainer,hvy/chainer,ktnyt/chainer,keisuke-umezawa/chainer,keisuke-umezawa/chainer,wkentaro/chainer,ktnyt/chainer,niboshi/chainer,keisuke-umezawa/chainer,okuta/chainer,okuta/chainer,hvy/chainer,tkerola/chainer,chainer/...
from xchainer._core import * # NOQA _global_context = Context() _global_context.get_backend('native') set_global_default_context(_global_context) Set the default device to native in Python binding
from xchainer._core import * # NOQA _global_context = Context() set_global_default_context(_global_context) set_default_device('native')
<commit_before>from xchainer._core import * # NOQA _global_context = Context() _global_context.get_backend('native') set_global_default_context(_global_context) <commit_msg>Set the default device to native in Python binding<commit_after>
from xchainer._core import * # NOQA _global_context = Context() set_global_default_context(_global_context) set_default_device('native')
from xchainer._core import * # NOQA _global_context = Context() _global_context.get_backend('native') set_global_default_context(_global_context) Set the default device to native in Python bindingfrom xchainer._core import * # NOQA _global_context = Context() set_global_default_context(_global_context) set_default_...
<commit_before>from xchainer._core import * # NOQA _global_context = Context() _global_context.get_backend('native') set_global_default_context(_global_context) <commit_msg>Set the default device to native in Python binding<commit_after>from xchainer._core import * # NOQA _global_context = Context() set_global_defa...
99dd45582cba9f54a5cc9042812d255fe57b1222
oauthclientbridge/__init__.py
oauthclientbridge/__init__.py
# flake8: noqa from flask import Flask from werkzeug.contrib.fixers import ProxyFix __version__ = '1.0.1' app = Flask(__name__) app.config.from_object('oauthclientbridge.default_settings') app.config.from_envvar('OAUTH_SETTINGS', silent=True) if app.config['OAUTH_NUM_PROXIES']: wrapper = ProxyFix(app.wsgi_app,...
# flake8: noqa from flask import Flask try: from werkzeug.middleware.proxy_fix import ProxyFix except ImportError: from werkzeug.contrib.fixers import ProxyFix __version__ = '1.0.1' app = Flask(__name__) app.config.from_object('oauthclientbridge.default_settings') app.config.from_envvar('OAUTH_SETTINGS', si...
Support new location of ProxyFix helper
Support new location of ProxyFix helper
Python
apache-2.0
adamcik/oauthclientbridge
# flake8: noqa from flask import Flask from werkzeug.contrib.fixers import ProxyFix __version__ = '1.0.1' app = Flask(__name__) app.config.from_object('oauthclientbridge.default_settings') app.config.from_envvar('OAUTH_SETTINGS', silent=True) if app.config['OAUTH_NUM_PROXIES']: wrapper = ProxyFix(app.wsgi_app,...
# flake8: noqa from flask import Flask try: from werkzeug.middleware.proxy_fix import ProxyFix except ImportError: from werkzeug.contrib.fixers import ProxyFix __version__ = '1.0.1' app = Flask(__name__) app.config.from_object('oauthclientbridge.default_settings') app.config.from_envvar('OAUTH_SETTINGS', si...
<commit_before># flake8: noqa from flask import Flask from werkzeug.contrib.fixers import ProxyFix __version__ = '1.0.1' app = Flask(__name__) app.config.from_object('oauthclientbridge.default_settings') app.config.from_envvar('OAUTH_SETTINGS', silent=True) if app.config['OAUTH_NUM_PROXIES']: wrapper = ProxyFi...
# flake8: noqa from flask import Flask try: from werkzeug.middleware.proxy_fix import ProxyFix except ImportError: from werkzeug.contrib.fixers import ProxyFix __version__ = '1.0.1' app = Flask(__name__) app.config.from_object('oauthclientbridge.default_settings') app.config.from_envvar('OAUTH_SETTINGS', si...
# flake8: noqa from flask import Flask from werkzeug.contrib.fixers import ProxyFix __version__ = '1.0.1' app = Flask(__name__) app.config.from_object('oauthclientbridge.default_settings') app.config.from_envvar('OAUTH_SETTINGS', silent=True) if app.config['OAUTH_NUM_PROXIES']: wrapper = ProxyFix(app.wsgi_app,...
<commit_before># flake8: noqa from flask import Flask from werkzeug.contrib.fixers import ProxyFix __version__ = '1.0.1' app = Flask(__name__) app.config.from_object('oauthclientbridge.default_settings') app.config.from_envvar('OAUTH_SETTINGS', silent=True) if app.config['OAUTH_NUM_PROXIES']: wrapper = ProxyFi...
d48e59f4b1174529a4d2eca8731472a5bf371621
simpleseo/templatetags/seo.py
simpleseo/templatetags/seo.py
from django.template import Library from django.utils.translation import get_language from simpleseo import settings from simpleseo.models import SeoMetadata register = Library() @register.filter def single_quotes(description): return description.replace('\"', '\'') @register.inclusion_tag('simpleseo/metadata...
from django.forms.models import model_to_dict from django.template import Library from django.utils.translation import get_language from simpleseo import settings from simpleseo.models import SeoMetadata register = Library() @register.filter def single_quotes(description): return description.replace('\"', '\'')...
Allow to set default value in template
Allow to set default value in template
Python
bsd-3-clause
Glamping-Hub/django-painless-seo,Glamping-Hub/django-painless-seo,AMongeMoreno/django-painless-seo,AMongeMoreno/django-painless-seo
from django.template import Library from django.utils.translation import get_language from simpleseo import settings from simpleseo.models import SeoMetadata register = Library() @register.filter def single_quotes(description): return description.replace('\"', '\'') @register.inclusion_tag('simpleseo/metadata...
from django.forms.models import model_to_dict from django.template import Library from django.utils.translation import get_language from simpleseo import settings from simpleseo.models import SeoMetadata register = Library() @register.filter def single_quotes(description): return description.replace('\"', '\'')...
<commit_before>from django.template import Library from django.utils.translation import get_language from simpleseo import settings from simpleseo.models import SeoMetadata register = Library() @register.filter def single_quotes(description): return description.replace('\"', '\'') @register.inclusion_tag('sim...
from django.forms.models import model_to_dict from django.template import Library from django.utils.translation import get_language from simpleseo import settings from simpleseo.models import SeoMetadata register = Library() @register.filter def single_quotes(description): return description.replace('\"', '\'')...
from django.template import Library from django.utils.translation import get_language from simpleseo import settings from simpleseo.models import SeoMetadata register = Library() @register.filter def single_quotes(description): return description.replace('\"', '\'') @register.inclusion_tag('simpleseo/metadata...
<commit_before>from django.template import Library from django.utils.translation import get_language from simpleseo import settings from simpleseo.models import SeoMetadata register = Library() @register.filter def single_quotes(description): return description.replace('\"', '\'') @register.inclusion_tag('sim...
91122afafa9fb5872f905dde391ce5b587d5d70a
frappe/patches/v8_0/install_new_build_system_requirements.py
frappe/patches/v8_0/install_new_build_system_requirements.py
import subprocess def execute(): subprocess.call([ 'npm', 'install', 'babel-core', 'chokidar', 'babel-preset-es2015', 'babel-preset-es2016', 'babel-preset-es2017', 'babel-preset-babili' ])
from subprocess import Popen, call, PIPE def execute(): # update nodejs version if brew exists p = Popen(['which', 'brew'], stdout=PIPE, stderr=PIPE) output, err = p.communicate() if output: subprocess.call(['brew', 'upgrade', 'node']) else: print 'Please update your NodeJS version'...
Update build system requirements patch
Update build system requirements patch
Python
mit
mhbu50/frappe,ESS-LLP/frappe,tmimori/frappe,frappe/frappe,mhbu50/frappe,ESS-LLP/frappe,mbauskar/frappe,bcornwellmott/frappe,bohlian/frappe,adityahase/frappe,tmimori/frappe,paurosello/frappe,almeidapaulopt/frappe,RicardoJohann/frappe,paurosello/frappe,ESS-LLP/frappe,mhbu50/frappe,bohlian/frappe,chdecultot/frappe,frappe/...
import subprocess def execute(): subprocess.call([ 'npm', 'install', 'babel-core', 'chokidar', 'babel-preset-es2015', 'babel-preset-es2016', 'babel-preset-es2017', 'babel-preset-babili' ])Update build system requirements patch
from subprocess import Popen, call, PIPE def execute(): # update nodejs version if brew exists p = Popen(['which', 'brew'], stdout=PIPE, stderr=PIPE) output, err = p.communicate() if output: subprocess.call(['brew', 'upgrade', 'node']) else: print 'Please update your NodeJS version'...
<commit_before>import subprocess def execute(): subprocess.call([ 'npm', 'install', 'babel-core', 'chokidar', 'babel-preset-es2015', 'babel-preset-es2016', 'babel-preset-es2017', 'babel-preset-babili' ])<commit_msg>Update build system requirements patch<c...
from subprocess import Popen, call, PIPE def execute(): # update nodejs version if brew exists p = Popen(['which', 'brew'], stdout=PIPE, stderr=PIPE) output, err = p.communicate() if output: subprocess.call(['brew', 'upgrade', 'node']) else: print 'Please update your NodeJS version'...
import subprocess def execute(): subprocess.call([ 'npm', 'install', 'babel-core', 'chokidar', 'babel-preset-es2015', 'babel-preset-es2016', 'babel-preset-es2017', 'babel-preset-babili' ])Update build system requirements patchfrom subprocess import Popen,...
<commit_before>import subprocess def execute(): subprocess.call([ 'npm', 'install', 'babel-core', 'chokidar', 'babel-preset-es2015', 'babel-preset-es2016', 'babel-preset-es2017', 'babel-preset-babili' ])<commit_msg>Update build system requirements patch<c...
bd540e3a0bcc13c6c50c1d72f1982084ab5cb87e
django_enumfield/fields.py
django_enumfield/fields.py
from django.db import models class EnumField(models.Field): __metaclass__ = models.SubfieldBase def __init__(self, enumeration, *args, **kwargs): self.enumeration = enumeration kwargs.setdefault('choices', enumeration.get_choices()) super(EnumField, self).__init__(*args, **kwargs) ...
from django.db import models class EnumField(models.Field): __metaclass__ = models.SubfieldBase def __init__(self, enumeration, *args, **kwargs): self.enumeration = enumeration kwargs.setdefault('choices', enumeration.get_choices()) super(EnumField, self).__init__(*args, **kwargs) ...
Allow string arguments (as slugs) when saving/updating EnumFields
Allow string arguments (as slugs) when saving/updating EnumFields This fixes issues where: MyModel.objects.update(my_enum_field='slug') would result in SQL like: UPDATE app_mymodel SET my_enum_field = 'slug' .. instead of what that's slug's integer value is. Signed-off-by: Chris Lamb <711c73f64afdce07b7e38039...
Python
bsd-3-clause
playfire/django-enumfield
from django.db import models class EnumField(models.Field): __metaclass__ = models.SubfieldBase def __init__(self, enumeration, *args, **kwargs): self.enumeration = enumeration kwargs.setdefault('choices', enumeration.get_choices()) super(EnumField, self).__init__(*args, **kwargs) ...
from django.db import models class EnumField(models.Field): __metaclass__ = models.SubfieldBase def __init__(self, enumeration, *args, **kwargs): self.enumeration = enumeration kwargs.setdefault('choices', enumeration.get_choices()) super(EnumField, self).__init__(*args, **kwargs) ...
<commit_before>from django.db import models class EnumField(models.Field): __metaclass__ = models.SubfieldBase def __init__(self, enumeration, *args, **kwargs): self.enumeration = enumeration kwargs.setdefault('choices', enumeration.get_choices()) super(EnumField, self).__init__(*args...
from django.db import models class EnumField(models.Field): __metaclass__ = models.SubfieldBase def __init__(self, enumeration, *args, **kwargs): self.enumeration = enumeration kwargs.setdefault('choices', enumeration.get_choices()) super(EnumField, self).__init__(*args, **kwargs) ...
from django.db import models class EnumField(models.Field): __metaclass__ = models.SubfieldBase def __init__(self, enumeration, *args, **kwargs): self.enumeration = enumeration kwargs.setdefault('choices', enumeration.get_choices()) super(EnumField, self).__init__(*args, **kwargs) ...
<commit_before>from django.db import models class EnumField(models.Field): __metaclass__ = models.SubfieldBase def __init__(self, enumeration, *args, **kwargs): self.enumeration = enumeration kwargs.setdefault('choices', enumeration.get_choices()) super(EnumField, self).__init__(*args...
1f90629a0ccea80ef59ca865b80edd2486d31e68
tests/conftest.py
tests/conftest.py
# -*- coding: utf-8 -*- import flask import pytest import webtest import marshmallow as ma class Bunch(object): def __init__(self, **kwargs): self.__dict__.update(**kwargs) def items(self): return self.__dict__.items() @pytest.fixture def app(): return flask.Flask(__name__) @pytest.f...
# -*- coding: utf-8 -*- import flask import pytest import webtest import marshmallow as ma class Bunch(object): def __init__(self, **kwargs): self.__dict__.update(**kwargs) def items(self): return self.__dict__.items() @pytest.fixture def app(): app_ = flask.Flask(__name__) app_.d...
Use debug mode in tests
Use debug mode in tests
Python
mit
jmcarp/flask-apispec,jmcarp/flask-smore,jmcarp/flask-apispec,jmcarp/flask-smore
# -*- coding: utf-8 -*- import flask import pytest import webtest import marshmallow as ma class Bunch(object): def __init__(self, **kwargs): self.__dict__.update(**kwargs) def items(self): return self.__dict__.items() @pytest.fixture def app(): return flask.Flask(__name__) @pytest.f...
# -*- coding: utf-8 -*- import flask import pytest import webtest import marshmallow as ma class Bunch(object): def __init__(self, **kwargs): self.__dict__.update(**kwargs) def items(self): return self.__dict__.items() @pytest.fixture def app(): app_ = flask.Flask(__name__) app_.d...
<commit_before># -*- coding: utf-8 -*- import flask import pytest import webtest import marshmallow as ma class Bunch(object): def __init__(self, **kwargs): self.__dict__.update(**kwargs) def items(self): return self.__dict__.items() @pytest.fixture def app(): return flask.Flask(__nam...
# -*- coding: utf-8 -*- import flask import pytest import webtest import marshmallow as ma class Bunch(object): def __init__(self, **kwargs): self.__dict__.update(**kwargs) def items(self): return self.__dict__.items() @pytest.fixture def app(): app_ = flask.Flask(__name__) app_.d...
# -*- coding: utf-8 -*- import flask import pytest import webtest import marshmallow as ma class Bunch(object): def __init__(self, **kwargs): self.__dict__.update(**kwargs) def items(self): return self.__dict__.items() @pytest.fixture def app(): return flask.Flask(__name__) @pytest.f...
<commit_before># -*- coding: utf-8 -*- import flask import pytest import webtest import marshmallow as ma class Bunch(object): def __init__(self, **kwargs): self.__dict__.update(**kwargs) def items(self): return self.__dict__.items() @pytest.fixture def app(): return flask.Flask(__nam...
e4dfb192d9984973888354ae73f2edc8486a9843
tests/conftest.py
tests/conftest.py
#!/usr/bin/env python # -*- coding: utf-8 -*- # Part of the masterfile package: https://github.com/njvack/masterfile # Copyright (c) 2018 Board of Regents of the University of Wisconsin System # Written by Nate Vack <[email protected]> at the Center for Healthy Minds # at the University of Wisconsin-Madison. # Released ...
#!/usr/bin/env python # -*- coding: utf-8 -*- # Part of the masterfile package: https://github.com/njvack/masterfile # Copyright (c) 2018 Board of Regents of the University of Wisconsin System # Written by Nate Vack <[email protected]> at the Center for Healthy Minds # at the University of Wisconsin-Madison. # Released ...
Add () to fixture definitions
Add () to fixture definitions
Python
mit
njvack/masterfile
#!/usr/bin/env python # -*- coding: utf-8 -*- # Part of the masterfile package: https://github.com/njvack/masterfile # Copyright (c) 2018 Board of Regents of the University of Wisconsin System # Written by Nate Vack <[email protected]> at the Center for Healthy Minds # at the University of Wisconsin-Madison. # Released ...
#!/usr/bin/env python # -*- coding: utf-8 -*- # Part of the masterfile package: https://github.com/njvack/masterfile # Copyright (c) 2018 Board of Regents of the University of Wisconsin System # Written by Nate Vack <[email protected]> at the Center for Healthy Minds # at the University of Wisconsin-Madison. # Released ...
<commit_before>#!/usr/bin/env python # -*- coding: utf-8 -*- # Part of the masterfile package: https://github.com/njvack/masterfile # Copyright (c) 2018 Board of Regents of the University of Wisconsin System # Written by Nate Vack <[email protected]> at the Center for Healthy Minds # at the University of Wisconsin-Madis...
#!/usr/bin/env python # -*- coding: utf-8 -*- # Part of the masterfile package: https://github.com/njvack/masterfile # Copyright (c) 2018 Board of Regents of the University of Wisconsin System # Written by Nate Vack <[email protected]> at the Center for Healthy Minds # at the University of Wisconsin-Madison. # Released ...
#!/usr/bin/env python # -*- coding: utf-8 -*- # Part of the masterfile package: https://github.com/njvack/masterfile # Copyright (c) 2018 Board of Regents of the University of Wisconsin System # Written by Nate Vack <[email protected]> at the Center for Healthy Minds # at the University of Wisconsin-Madison. # Released ...
<commit_before>#!/usr/bin/env python # -*- coding: utf-8 -*- # Part of the masterfile package: https://github.com/njvack/masterfile # Copyright (c) 2018 Board of Regents of the University of Wisconsin System # Written by Nate Vack <[email protected]> at the Center for Healthy Minds # at the University of Wisconsin-Madis...
f829ed54e4eddce15b9da01d0d669a4242c86360
tests/test_db.py
tests/test_db.py
import pytest try: import cPickle as pickle except ImportError: import pickle from .models import Post pytestmark = pytest.mark.django_db @pytest.mark.django_db @pytest.fixture def post(): return Post.objects.create(title='Pickling') def test_equal(post): restored = pickle.loads(pickle.dumps(post...
import pytest try: import cPickle as pickle except ImportError: import pickle from .models import Post pytestmark = pytest.mark.django_db @pytest.mark.django_db @pytest.fixture def post(): return Post.objects.create(title='Pickling') def test_equal(post): restored = pickle.loads(pickle.dumps(post...
Fix tests for Python 2.7
Fix tests for Python 2.7
Python
bsd-3-clause
Suor/django-pickling
import pytest try: import cPickle as pickle except ImportError: import pickle from .models import Post pytestmark = pytest.mark.django_db @pytest.mark.django_db @pytest.fixture def post(): return Post.objects.create(title='Pickling') def test_equal(post): restored = pickle.loads(pickle.dumps(post...
import pytest try: import cPickle as pickle except ImportError: import pickle from .models import Post pytestmark = pytest.mark.django_db @pytest.mark.django_db @pytest.fixture def post(): return Post.objects.create(title='Pickling') def test_equal(post): restored = pickle.loads(pickle.dumps(post...
<commit_before>import pytest try: import cPickle as pickle except ImportError: import pickle from .models import Post pytestmark = pytest.mark.django_db @pytest.mark.django_db @pytest.fixture def post(): return Post.objects.create(title='Pickling') def test_equal(post): restored = pickle.loads(pi...
import pytest try: import cPickle as pickle except ImportError: import pickle from .models import Post pytestmark = pytest.mark.django_db @pytest.mark.django_db @pytest.fixture def post(): return Post.objects.create(title='Pickling') def test_equal(post): restored = pickle.loads(pickle.dumps(post...
import pytest try: import cPickle as pickle except ImportError: import pickle from .models import Post pytestmark = pytest.mark.django_db @pytest.mark.django_db @pytest.fixture def post(): return Post.objects.create(title='Pickling') def test_equal(post): restored = pickle.loads(pickle.dumps(post...
<commit_before>import pytest try: import cPickle as pickle except ImportError: import pickle from .models import Post pytestmark = pytest.mark.django_db @pytest.mark.django_db @pytest.fixture def post(): return Post.objects.create(title='Pickling') def test_equal(post): restored = pickle.loads(pi...
aba661dccae7ef43bdb43d9909b9e84b632bb7a4
qipipe/helpers/file_helper.py
qipipe/helpers/file_helper.py
import os class FileIterator(object): """ This FileIterator iterates over the paths contained in one or more directories. """ def __init__(self, *paths): """ @param paths: the file or directory paths. """ self._paths = paths def __iter__(self): return se...
import os class FileIterator(object): """ This FileIterator iterates over the paths contained in one or more directories. """ def __init__(self, *paths): """ @param paths: the file or directory paths. """ self._paths = paths def __iter__(self): return se...
Rename paths variable to fnames.
Rename paths variable to fnames.
Python
bsd-2-clause
ohsu-qin/qipipe
import os class FileIterator(object): """ This FileIterator iterates over the paths contained in one or more directories. """ def __init__(self, *paths): """ @param paths: the file or directory paths. """ self._paths = paths def __iter__(self): return se...
import os class FileIterator(object): """ This FileIterator iterates over the paths contained in one or more directories. """ def __init__(self, *paths): """ @param paths: the file or directory paths. """ self._paths = paths def __iter__(self): return se...
<commit_before>import os class FileIterator(object): """ This FileIterator iterates over the paths contained in one or more directories. """ def __init__(self, *paths): """ @param paths: the file or directory paths. """ self._paths = paths def __iter__(self): ...
import os class FileIterator(object): """ This FileIterator iterates over the paths contained in one or more directories. """ def __init__(self, *paths): """ @param paths: the file or directory paths. """ self._paths = paths def __iter__(self): return se...
import os class FileIterator(object): """ This FileIterator iterates over the paths contained in one or more directories. """ def __init__(self, *paths): """ @param paths: the file or directory paths. """ self._paths = paths def __iter__(self): return se...
<commit_before>import os class FileIterator(object): """ This FileIterator iterates over the paths contained in one or more directories. """ def __init__(self, *paths): """ @param paths: the file or directory paths. """ self._paths = paths def __iter__(self): ...
ea3e327bb602689e136479ce41f568aa2ee47cf4
databot/utils/html.py
databot/utils/html.py
import bs4 import cgi def get_content(data, errors='strict'): headers = {k.lower(): v for k, v in data.get('headers', {}).items()} content_type_header = headers.get('content-type', '') content_type, params = cgi.parse_header(content_type_header) if content_type.lower() in ('text/html', 'text/xml'): ...
import bs4 import cgi def get_page_encoding(soup, default_encoding=None): for meta in soup.select('head > meta[http-equiv="Content-Type"]'): content_type, params = cgi.parse_header(meta['content']) if 'charset' in params: return params['charset'] return default_encoding def get_c...
Improve detection of page encoding
Improve detection of page encoding
Python
agpl-3.0
sirex/databot,sirex/databot
import bs4 import cgi def get_content(data, errors='strict'): headers = {k.lower(): v for k, v in data.get('headers', {}).items()} content_type_header = headers.get('content-type', '') content_type, params = cgi.parse_header(content_type_header) if content_type.lower() in ('text/html', 'text/xml'): ...
import bs4 import cgi def get_page_encoding(soup, default_encoding=None): for meta in soup.select('head > meta[http-equiv="Content-Type"]'): content_type, params = cgi.parse_header(meta['content']) if 'charset' in params: return params['charset'] return default_encoding def get_c...
<commit_before>import bs4 import cgi def get_content(data, errors='strict'): headers = {k.lower(): v for k, v in data.get('headers', {}).items()} content_type_header = headers.get('content-type', '') content_type, params = cgi.parse_header(content_type_header) if content_type.lower() in ('text/html', ...
import bs4 import cgi def get_page_encoding(soup, default_encoding=None): for meta in soup.select('head > meta[http-equiv="Content-Type"]'): content_type, params = cgi.parse_header(meta['content']) if 'charset' in params: return params['charset'] return default_encoding def get_c...
import bs4 import cgi def get_content(data, errors='strict'): headers = {k.lower(): v for k, v in data.get('headers', {}).items()} content_type_header = headers.get('content-type', '') content_type, params = cgi.parse_header(content_type_header) if content_type.lower() in ('text/html', 'text/xml'): ...
<commit_before>import bs4 import cgi def get_content(data, errors='strict'): headers = {k.lower(): v for k, v in data.get('headers', {}).items()} content_type_header = headers.get('content-type', '') content_type, params = cgi.parse_header(content_type_header) if content_type.lower() in ('text/html', ...
52884380ce9a6dc79e44e3ce81b7e9757de6fb04
tests/integration/test_impersonation.py
tests/integration/test_impersonation.py
import pytest from tenable_io.api.users import UserCreateRequest from tests.base import BaseTest from tests.config import TenableIOTestConfig class TestImpersonation(BaseTest): @pytest.fixture(scope='class') def user(self, app, client): user_id = client.users_api.create(UserCreateRequest( ...
import pytest from tenable_io.api.users import UserCreateRequest from tests.base import BaseTest from tests.config import TenableIOTestConfig class TestImpersonation(BaseTest): @pytest.fixture(scope='class') def user(self, app, client): user_id = client.users_api.create(UserCreateRequest( ...
Update password in unit test to comply with password rules
Update password in unit test to comply with password rules
Python
mit
tenable/Tenable.io-SDK-for-Python
import pytest from tenable_io.api.users import UserCreateRequest from tests.base import BaseTest from tests.config import TenableIOTestConfig class TestImpersonation(BaseTest): @pytest.fixture(scope='class') def user(self, app, client): user_id = client.users_api.create(UserCreateRequest( ...
import pytest from tenable_io.api.users import UserCreateRequest from tests.base import BaseTest from tests.config import TenableIOTestConfig class TestImpersonation(BaseTest): @pytest.fixture(scope='class') def user(self, app, client): user_id = client.users_api.create(UserCreateRequest( ...
<commit_before>import pytest from tenable_io.api.users import UserCreateRequest from tests.base import BaseTest from tests.config import TenableIOTestConfig class TestImpersonation(BaseTest): @pytest.fixture(scope='class') def user(self, app, client): user_id = client.users_api.create(UserCreateReq...
import pytest from tenable_io.api.users import UserCreateRequest from tests.base import BaseTest from tests.config import TenableIOTestConfig class TestImpersonation(BaseTest): @pytest.fixture(scope='class') def user(self, app, client): user_id = client.users_api.create(UserCreateRequest( ...
import pytest from tenable_io.api.users import UserCreateRequest from tests.base import BaseTest from tests.config import TenableIOTestConfig class TestImpersonation(BaseTest): @pytest.fixture(scope='class') def user(self, app, client): user_id = client.users_api.create(UserCreateRequest( ...
<commit_before>import pytest from tenable_io.api.users import UserCreateRequest from tests.base import BaseTest from tests.config import TenableIOTestConfig class TestImpersonation(BaseTest): @pytest.fixture(scope='class') def user(self, app, client): user_id = client.users_api.create(UserCreateReq...
8f330d4d07ed548a9cab348895124f5f5d92a6e8
dask_ndmeasure/_test_utils.py
dask_ndmeasure/_test_utils.py
# -*- coding: utf-8 -*- from __future__ import absolute_import import dask.array.utils def _assert_eq_nan(a, b, **kwargs): a = a.copy() b = b.copy() a_nan = (a != a) b_nan = (b != b) a[a_nan] = 0 b[b_nan] = 0 dask.array.utils.assert_eq(a_nan, b_nan, **kwargs) dask.array.utils.asse...
# -*- coding: utf-8 -*- from __future__ import absolute_import import dask.array.utils def _assert_eq_nan(a, b, **kwargs): a = a.copy() b = b.copy() a = a[...] b = b[...] a_nan = (a != a) b_nan = (b != b) a[a_nan] = 0 b[b_nan] = 0 dask.array.utils.assert_eq(a_nan, b_nan, **kw...
Handle scalar values in _assert_eq_nan
Handle scalar values in _assert_eq_nan Add some special handling in `_assert_eq_nan` to handle having scalar values passed in. Basically ensure that everything provided is an array. This is a no-op for arrays, but converts scalars into 0-D arrays. By doing this, we are able to use the same `nan` handling code. Also co...
Python
bsd-3-clause
dask-image/dask-ndmeasure
# -*- coding: utf-8 -*- from __future__ import absolute_import import dask.array.utils def _assert_eq_nan(a, b, **kwargs): a = a.copy() b = b.copy() a_nan = (a != a) b_nan = (b != b) a[a_nan] = 0 b[b_nan] = 0 dask.array.utils.assert_eq(a_nan, b_nan, **kwargs) dask.array.utils.asse...
# -*- coding: utf-8 -*- from __future__ import absolute_import import dask.array.utils def _assert_eq_nan(a, b, **kwargs): a = a.copy() b = b.copy() a = a[...] b = b[...] a_nan = (a != a) b_nan = (b != b) a[a_nan] = 0 b[b_nan] = 0 dask.array.utils.assert_eq(a_nan, b_nan, **kw...
<commit_before># -*- coding: utf-8 -*- from __future__ import absolute_import import dask.array.utils def _assert_eq_nan(a, b, **kwargs): a = a.copy() b = b.copy() a_nan = (a != a) b_nan = (b != b) a[a_nan] = 0 b[b_nan] = 0 dask.array.utils.assert_eq(a_nan, b_nan, **kwargs) dask.a...
# -*- coding: utf-8 -*- from __future__ import absolute_import import dask.array.utils def _assert_eq_nan(a, b, **kwargs): a = a.copy() b = b.copy() a = a[...] b = b[...] a_nan = (a != a) b_nan = (b != b) a[a_nan] = 0 b[b_nan] = 0 dask.array.utils.assert_eq(a_nan, b_nan, **kw...
# -*- coding: utf-8 -*- from __future__ import absolute_import import dask.array.utils def _assert_eq_nan(a, b, **kwargs): a = a.copy() b = b.copy() a_nan = (a != a) b_nan = (b != b) a[a_nan] = 0 b[b_nan] = 0 dask.array.utils.assert_eq(a_nan, b_nan, **kwargs) dask.array.utils.asse...
<commit_before># -*- coding: utf-8 -*- from __future__ import absolute_import import dask.array.utils def _assert_eq_nan(a, b, **kwargs): a = a.copy() b = b.copy() a_nan = (a != a) b_nan = (b != b) a[a_nan] = 0 b[b_nan] = 0 dask.array.utils.assert_eq(a_nan, b_nan, **kwargs) dask.a...
892bc14cc087c47909778a178772d0895d2fb599
docker/chemml/src/run.py
docker/chemml/src/run.py
import json from chemml.models.keras.trained import OrganicLorentzLorenz from openbabel import OBMol, OBConversion def ob_convert_str(str_data, in_format, out_format): mol = OBMol() conv = OBConversion() conv.SetInFormat(in_format) conv.SetOutFormat(out_format) conv.ReadString(mol, str_data) ...
import json from chemml.models.keras.trained import OrganicLorentzLorenz from openbabel import OBMol, OBConversion def ob_convert_str(str_data, in_format, out_format): mol = OBMol() conv = OBConversion() conv.SetInFormat(in_format) conv.SetOutFormat(out_format) conv.ReadString(mol, str_data) ...
Change structure of the output properties
Change structure of the output properties
Python
bsd-3-clause
OpenChemistry/mongochemdeploy,OpenChemistry/mongochemdeploy
import json from chemml.models.keras.trained import OrganicLorentzLorenz from openbabel import OBMol, OBConversion def ob_convert_str(str_data, in_format, out_format): mol = OBMol() conv = OBConversion() conv.SetInFormat(in_format) conv.SetOutFormat(out_format) conv.ReadString(mol, str_data) ...
import json from chemml.models.keras.trained import OrganicLorentzLorenz from openbabel import OBMol, OBConversion def ob_convert_str(str_data, in_format, out_format): mol = OBMol() conv = OBConversion() conv.SetInFormat(in_format) conv.SetOutFormat(out_format) conv.ReadString(mol, str_data) ...
<commit_before>import json from chemml.models.keras.trained import OrganicLorentzLorenz from openbabel import OBMol, OBConversion def ob_convert_str(str_data, in_format, out_format): mol = OBMol() conv = OBConversion() conv.SetInFormat(in_format) conv.SetOutFormat(out_format) conv.ReadString(mol, ...
import json from chemml.models.keras.trained import OrganicLorentzLorenz from openbabel import OBMol, OBConversion def ob_convert_str(str_data, in_format, out_format): mol = OBMol() conv = OBConversion() conv.SetInFormat(in_format) conv.SetOutFormat(out_format) conv.ReadString(mol, str_data) ...
import json from chemml.models.keras.trained import OrganicLorentzLorenz from openbabel import OBMol, OBConversion def ob_convert_str(str_data, in_format, out_format): mol = OBMol() conv = OBConversion() conv.SetInFormat(in_format) conv.SetOutFormat(out_format) conv.ReadString(mol, str_data) ...
<commit_before>import json from chemml.models.keras.trained import OrganicLorentzLorenz from openbabel import OBMol, OBConversion def ob_convert_str(str_data, in_format, out_format): mol = OBMol() conv = OBConversion() conv.SetInFormat(in_format) conv.SetOutFormat(out_format) conv.ReadString(mol, ...
5b0f7412f88400e61a05e694d4883389d812f3d2
tests/runtests.py
tests/runtests.py
#!/usr/bin/env python import os import sys from unittest import defaultTestLoader, TextTestRunner, TestSuite TESTS = ('form', 'fields', 'validators', 'widgets', 'webob_wrapper', 'translations', 'ext_csrf', 'ext_i18n') def make_suite(prefix='', extra=()): tests = TESTS + extra test_names = list(prefix + x for ...
#!/usr/bin/env python import os import sys from unittest import defaultTestLoader, TextTestRunner, TestSuite TESTS = ('form', 'fields', 'validators', 'widgets', 'webob_wrapper', 'translations', 'ext_csrf', 'ext_i18n') def make_suite(prefix='', extra=()): tests = TESTS + extra test_names = list(prefix + x for ...
Add back in running of extra tests
Add back in running of extra tests
Python
bsd-3-clause
maxcountryman/wtforms
#!/usr/bin/env python import os import sys from unittest import defaultTestLoader, TextTestRunner, TestSuite TESTS = ('form', 'fields', 'validators', 'widgets', 'webob_wrapper', 'translations', 'ext_csrf', 'ext_i18n') def make_suite(prefix='', extra=()): tests = TESTS + extra test_names = list(prefix + x for ...
#!/usr/bin/env python import os import sys from unittest import defaultTestLoader, TextTestRunner, TestSuite TESTS = ('form', 'fields', 'validators', 'widgets', 'webob_wrapper', 'translations', 'ext_csrf', 'ext_i18n') def make_suite(prefix='', extra=()): tests = TESTS + extra test_names = list(prefix + x for ...
<commit_before>#!/usr/bin/env python import os import sys from unittest import defaultTestLoader, TextTestRunner, TestSuite TESTS = ('form', 'fields', 'validators', 'widgets', 'webob_wrapper', 'translations', 'ext_csrf', 'ext_i18n') def make_suite(prefix='', extra=()): tests = TESTS + extra test_names = list(...
#!/usr/bin/env python import os import sys from unittest import defaultTestLoader, TextTestRunner, TestSuite TESTS = ('form', 'fields', 'validators', 'widgets', 'webob_wrapper', 'translations', 'ext_csrf', 'ext_i18n') def make_suite(prefix='', extra=()): tests = TESTS + extra test_names = list(prefix + x for ...
#!/usr/bin/env python import os import sys from unittest import defaultTestLoader, TextTestRunner, TestSuite TESTS = ('form', 'fields', 'validators', 'widgets', 'webob_wrapper', 'translations', 'ext_csrf', 'ext_i18n') def make_suite(prefix='', extra=()): tests = TESTS + extra test_names = list(prefix + x for ...
<commit_before>#!/usr/bin/env python import os import sys from unittest import defaultTestLoader, TextTestRunner, TestSuite TESTS = ('form', 'fields', 'validators', 'widgets', 'webob_wrapper', 'translations', 'ext_csrf', 'ext_i18n') def make_suite(prefix='', extra=()): tests = TESTS + extra test_names = list(...