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
e97a1ed2015db2eb2d5fe6abe15af6d9020c16d9
mbuild/tests/test_box.py
mbuild/tests/test_box.py
import pytest import numpy as np import mbuild as mb from mbuild.tests.base_test import BaseTest class TestBox(BaseTest): def test_init_lengths(self): box = mb.Box(lengths=np.ones(3)) assert np.array_equal(box.lengths, np.ones(3)) assert np.array_equal(box.mins, np.zeros(3)) asser...
import pytest import numpy as np import mbuild as mb from mbuild.tests.base_test import BaseTest class TestBox(BaseTest): def test_init_lengths(self): box = mb.Box(lengths=np.ones(3)) assert np.array_equal(box.lengths, np.ones(3)) assert np.array_equal(box.mins, np.zeros(3)) asser...
Remove box tests for non-existant functionality
Remove box tests for non-existant functionality
Python
mit
ctk3b/mbuild,iModels/mbuild,iModels/mbuild,ctk3b/mbuild,tcmoore3/mbuild,tcmoore3/mbuild,summeraz/mbuild,summeraz/mbuild
import pytest import numpy as np import mbuild as mb from mbuild.tests.base_test import BaseTest class TestBox(BaseTest): def test_init_lengths(self): box = mb.Box(lengths=np.ones(3)) assert np.array_equal(box.lengths, np.ones(3)) assert np.array_equal(box.mins, np.zeros(3)) asser...
import pytest import numpy as np import mbuild as mb from mbuild.tests.base_test import BaseTest class TestBox(BaseTest): def test_init_lengths(self): box = mb.Box(lengths=np.ones(3)) assert np.array_equal(box.lengths, np.ones(3)) assert np.array_equal(box.mins, np.zeros(3)) asser...
<commit_before>import pytest import numpy as np import mbuild as mb from mbuild.tests.base_test import BaseTest class TestBox(BaseTest): def test_init_lengths(self): box = mb.Box(lengths=np.ones(3)) assert np.array_equal(box.lengths, np.ones(3)) assert np.array_equal(box.mins, np.zeros(3)...
import pytest import numpy as np import mbuild as mb from mbuild.tests.base_test import BaseTest class TestBox(BaseTest): def test_init_lengths(self): box = mb.Box(lengths=np.ones(3)) assert np.array_equal(box.lengths, np.ones(3)) assert np.array_equal(box.mins, np.zeros(3)) asser...
import pytest import numpy as np import mbuild as mb from mbuild.tests.base_test import BaseTest class TestBox(BaseTest): def test_init_lengths(self): box = mb.Box(lengths=np.ones(3)) assert np.array_equal(box.lengths, np.ones(3)) assert np.array_equal(box.mins, np.zeros(3)) asser...
<commit_before>import pytest import numpy as np import mbuild as mb from mbuild.tests.base_test import BaseTest class TestBox(BaseTest): def test_init_lengths(self): box = mb.Box(lengths=np.ones(3)) assert np.array_equal(box.lengths, np.ones(3)) assert np.array_equal(box.mins, np.zeros(3)...
c63a4b469fae66668214da3b963c03cead99d16d
real_estate_agency/real_estate_agency/views.py
real_estate_agency/real_estate_agency/views.py
from django.shortcuts import render, render_to_response from django.template import RequestContext from new_buildings.models import Builder, ResidentalComplex, NewApartment from new_buildings.forms import SearchForm from feedback.models import Feedback def corporation_benefit_plan(request): return render(request...
from django.shortcuts import render, render_to_response from django.template import RequestContext from new_buildings.models import Builder, ResidentalComplex, NewApartment from new_buildings.forms import SearchForm from feedback.models import Feedback def corporation_benefit_plan(request): return render(request...
Add pupular RC objects to index view.
Add pupular RC objects to index view. Earlier they was at context processor.
Python
mit
Dybov/real_estate_agency,Dybov/real_estate_agency,Dybov/real_estate_agency
from django.shortcuts import render, render_to_response from django.template import RequestContext from new_buildings.models import Builder, ResidentalComplex, NewApartment from new_buildings.forms import SearchForm from feedback.models import Feedback def corporation_benefit_plan(request): return render(request...
from django.shortcuts import render, render_to_response from django.template import RequestContext from new_buildings.models import Builder, ResidentalComplex, NewApartment from new_buildings.forms import SearchForm from feedback.models import Feedback def corporation_benefit_plan(request): return render(request...
<commit_before>from django.shortcuts import render, render_to_response from django.template import RequestContext from new_buildings.models import Builder, ResidentalComplex, NewApartment from new_buildings.forms import SearchForm from feedback.models import Feedback def corporation_benefit_plan(request): return...
from django.shortcuts import render, render_to_response from django.template import RequestContext from new_buildings.models import Builder, ResidentalComplex, NewApartment from new_buildings.forms import SearchForm from feedback.models import Feedback def corporation_benefit_plan(request): return render(request...
from django.shortcuts import render, render_to_response from django.template import RequestContext from new_buildings.models import Builder, ResidentalComplex, NewApartment from new_buildings.forms import SearchForm from feedback.models import Feedback def corporation_benefit_plan(request): return render(request...
<commit_before>from django.shortcuts import render, render_to_response from django.template import RequestContext from new_buildings.models import Builder, ResidentalComplex, NewApartment from new_buildings.forms import SearchForm from feedback.models import Feedback def corporation_benefit_plan(request): return...
84341e0d5f0f1b902c2a334f40cddb29e10a1f16
mozillians/users/cron.py
mozillians/users/cron.py
from django.conf import settings import cronjobs from celery.task.sets import TaskSet from elasticutils.contrib.django import get_es from mozillians.users.tasks import index_objects from mozillians.users.models import UserProfile, UserProfileMappingType @cronjobs.register def index_all_profiles(): # Get an es ...
from django.conf import settings import cronjobs from celery.task.sets import TaskSet from celeryutils import chunked from elasticutils.contrib.django import get_es from mozillians.users.tasks import index_objects from mozillians.users.models import UserProfile, UserProfileMappingType @cronjobs.register def index_...
Index profiles in chunks and not altogether.
Index profiles in chunks and not altogether.
Python
bsd-3-clause
johngian/mozillians,akatsoulas/mozillians,akarki15/mozillians,johngian/mozillians,hoosteeno/mozillians,mozilla/mozillians,chirilo/mozillians,hoosteeno/mozillians,safwanrahman/mozillians,fxa90id/mozillians,fxa90id/mozillians,fxa90id/mozillians,fxa90id/mozillians,johngian/mozillians,akatsoulas/mozillians,anistark/mozilli...
from django.conf import settings import cronjobs from celery.task.sets import TaskSet from elasticutils.contrib.django import get_es from mozillians.users.tasks import index_objects from mozillians.users.models import UserProfile, UserProfileMappingType @cronjobs.register def index_all_profiles(): # Get an es ...
from django.conf import settings import cronjobs from celery.task.sets import TaskSet from celeryutils import chunked from elasticutils.contrib.django import get_es from mozillians.users.tasks import index_objects from mozillians.users.models import UserProfile, UserProfileMappingType @cronjobs.register def index_...
<commit_before>from django.conf import settings import cronjobs from celery.task.sets import TaskSet from elasticutils.contrib.django import get_es from mozillians.users.tasks import index_objects from mozillians.users.models import UserProfile, UserProfileMappingType @cronjobs.register def index_all_profiles(): ...
from django.conf import settings import cronjobs from celery.task.sets import TaskSet from celeryutils import chunked from elasticutils.contrib.django import get_es from mozillians.users.tasks import index_objects from mozillians.users.models import UserProfile, UserProfileMappingType @cronjobs.register def index_...
from django.conf import settings import cronjobs from celery.task.sets import TaskSet from elasticutils.contrib.django import get_es from mozillians.users.tasks import index_objects from mozillians.users.models import UserProfile, UserProfileMappingType @cronjobs.register def index_all_profiles(): # Get an es ...
<commit_before>from django.conf import settings import cronjobs from celery.task.sets import TaskSet from elasticutils.contrib.django import get_es from mozillians.users.tasks import index_objects from mozillians.users.models import UserProfile, UserProfileMappingType @cronjobs.register def index_all_profiles(): ...
657f72c2aae5bd83efff3520fa642d66ad172822
tests/test_commands.py
tests/test_commands.py
import django from django.core.management import call_command from django.test import TestCase from bananas.management.commands import show_urls class CommandTests(TestCase): def test_show_urls(self): urls = show_urls.collect_urls() if django.VERSION < (1, 9): n_urls = 23 + 8 ...
import django from django.core.management import call_command from django.test import TestCase from bananas.management.commands import show_urls class CommandTests(TestCase): def test_show_urls(self): urls = show_urls.collect_urls() admin_api_url_count = 0 if django.VERSION >= (1, 10): ...
Fix test_show_urls without admin api urls
Fix test_show_urls without admin api urls
Python
mit
5monkeys/django-bananas,5monkeys/django-bananas,5monkeys/django-bananas
import django from django.core.management import call_command from django.test import TestCase from bananas.management.commands import show_urls class CommandTests(TestCase): def test_show_urls(self): urls = show_urls.collect_urls() if django.VERSION < (1, 9): n_urls = 23 + 8 ...
import django from django.core.management import call_command from django.test import TestCase from bananas.management.commands import show_urls class CommandTests(TestCase): def test_show_urls(self): urls = show_urls.collect_urls() admin_api_url_count = 0 if django.VERSION >= (1, 10): ...
<commit_before>import django from django.core.management import call_command from django.test import TestCase from bananas.management.commands import show_urls class CommandTests(TestCase): def test_show_urls(self): urls = show_urls.collect_urls() if django.VERSION < (1, 9): n_urls =...
import django from django.core.management import call_command from django.test import TestCase from bananas.management.commands import show_urls class CommandTests(TestCase): def test_show_urls(self): urls = show_urls.collect_urls() admin_api_url_count = 0 if django.VERSION >= (1, 10): ...
import django from django.core.management import call_command from django.test import TestCase from bananas.management.commands import show_urls class CommandTests(TestCase): def test_show_urls(self): urls = show_urls.collect_urls() if django.VERSION < (1, 9): n_urls = 23 + 8 ...
<commit_before>import django from django.core.management import call_command from django.test import TestCase from bananas.management.commands import show_urls class CommandTests(TestCase): def test_show_urls(self): urls = show_urls.collect_urls() if django.VERSION < (1, 9): n_urls =...
9b18e4833a3550d424aa18fddbf5373d142ce3f1
dddp/apps.py
dddp/apps.py
"""Django DDP app config.""" from __future__ import print_function from django.apps import AppConfig from django.conf import settings, ImproperlyConfigured from django.db import DatabaseError from django.db.models import signals from dddp import autodiscover from dddp.models import Connection class DjangoDDPConfig...
"""Django DDP app config.""" from __future__ import print_function from django.apps import AppConfig from django.conf import settings, ImproperlyConfigured from dddp import autodiscover class DjangoDDPConfig(AppConfig): """Django app config for django-ddp.""" api = None name = 'dddp' verbose_name...
Remove unused imports from AppConfig module.
Remove unused imports from AppConfig module.
Python
mit
commoncode/django-ddp,commoncode/django-ddp,commoncode/django-ddp,django-ddp/django-ddp,commoncode/django-ddp,django-ddp/django-ddp,django-ddp/django-ddp,django-ddp/django-ddp
"""Django DDP app config.""" from __future__ import print_function from django.apps import AppConfig from django.conf import settings, ImproperlyConfigured from django.db import DatabaseError from django.db.models import signals from dddp import autodiscover from dddp.models import Connection class DjangoDDPConfig...
"""Django DDP app config.""" from __future__ import print_function from django.apps import AppConfig from django.conf import settings, ImproperlyConfigured from dddp import autodiscover class DjangoDDPConfig(AppConfig): """Django app config for django-ddp.""" api = None name = 'dddp' verbose_name...
<commit_before>"""Django DDP app config.""" from __future__ import print_function from django.apps import AppConfig from django.conf import settings, ImproperlyConfigured from django.db import DatabaseError from django.db.models import signals from dddp import autodiscover from dddp.models import Connection class ...
"""Django DDP app config.""" from __future__ import print_function from django.apps import AppConfig from django.conf import settings, ImproperlyConfigured from dddp import autodiscover class DjangoDDPConfig(AppConfig): """Django app config for django-ddp.""" api = None name = 'dddp' verbose_name...
"""Django DDP app config.""" from __future__ import print_function from django.apps import AppConfig from django.conf import settings, ImproperlyConfigured from django.db import DatabaseError from django.db.models import signals from dddp import autodiscover from dddp.models import Connection class DjangoDDPConfig...
<commit_before>"""Django DDP app config.""" from __future__ import print_function from django.apps import AppConfig from django.conf import settings, ImproperlyConfigured from django.db import DatabaseError from django.db.models import signals from dddp import autodiscover from dddp.models import Connection class ...
b54dc115710416b92161fa0f69b4928cdef07997
oauth2_provider/forms.py
oauth2_provider/forms.py
from django import forms from .models import get_application_model class AllowForm(forms.Form): allow = forms.BooleanField(required=False) redirect_uri = forms.CharField(widget=forms.HiddenInput()) scope = forms.CharField(required=False, widget=forms.HiddenInput()) client_id = forms.CharField(widget=...
from django import forms from .models import get_application_model class AllowForm(forms.Form): allow = forms.BooleanField(required=False) redirect_uri = forms.CharField(widget=forms.HiddenInput()) scope = forms.CharField(required=False, widget=forms.HiddenInput()) client_id = forms.CharField(widget=...
Remove name field from form
Remove name field from form
Python
bsd-2-clause
vmalavolta/django-oauth-toolkit,vmalavolta/django-oauth-toolkit
from django import forms from .models import get_application_model class AllowForm(forms.Form): allow = forms.BooleanField(required=False) redirect_uri = forms.CharField(widget=forms.HiddenInput()) scope = forms.CharField(required=False, widget=forms.HiddenInput()) client_id = forms.CharField(widget=...
from django import forms from .models import get_application_model class AllowForm(forms.Form): allow = forms.BooleanField(required=False) redirect_uri = forms.CharField(widget=forms.HiddenInput()) scope = forms.CharField(required=False, widget=forms.HiddenInput()) client_id = forms.CharField(widget=...
<commit_before>from django import forms from .models import get_application_model class AllowForm(forms.Form): allow = forms.BooleanField(required=False) redirect_uri = forms.CharField(widget=forms.HiddenInput()) scope = forms.CharField(required=False, widget=forms.HiddenInput()) client_id = forms.Ch...
from django import forms from .models import get_application_model class AllowForm(forms.Form): allow = forms.BooleanField(required=False) redirect_uri = forms.CharField(widget=forms.HiddenInput()) scope = forms.CharField(required=False, widget=forms.HiddenInput()) client_id = forms.CharField(widget=...
from django import forms from .models import get_application_model class AllowForm(forms.Form): allow = forms.BooleanField(required=False) redirect_uri = forms.CharField(widget=forms.HiddenInput()) scope = forms.CharField(required=False, widget=forms.HiddenInput()) client_id = forms.CharField(widget=...
<commit_before>from django import forms from .models import get_application_model class AllowForm(forms.Form): allow = forms.BooleanField(required=False) redirect_uri = forms.CharField(widget=forms.HiddenInput()) scope = forms.CharField(required=False, widget=forms.HiddenInput()) client_id = forms.Ch...
8ae9da1cf93d45cadcfd3c3857542ce9cabdff64
filer/__init__.py
filer/__init__.py
#-*- coding: utf-8 -*- # version string following pep-0396 and pep-0386 __version__ = '0.9pbs.4' # pragma: nocover
#-*- coding: utf-8 -*- # version string following pep-0396 and pep-0386 __version__ = '0.9pbs.5' # pragma: nocover
Bump version as instructed by bamboo
Bump version as instructed by bamboo
Python
bsd-3-clause
pbs/django-filer,pbs/django-filer,pbs/django-filer,pbs/django-filer,pbs/django-filer
#-*- coding: utf-8 -*- # version string following pep-0396 and pep-0386 __version__ = '0.9pbs.4' # pragma: nocover Bump version as instructed by bamboo
#-*- coding: utf-8 -*- # version string following pep-0396 and pep-0386 __version__ = '0.9pbs.5' # pragma: nocover
<commit_before>#-*- coding: utf-8 -*- # version string following pep-0396 and pep-0386 __version__ = '0.9pbs.4' # pragma: nocover <commit_msg>Bump version as instructed by bamboo<commit_after>
#-*- coding: utf-8 -*- # version string following pep-0396 and pep-0386 __version__ = '0.9pbs.5' # pragma: nocover
#-*- coding: utf-8 -*- # version string following pep-0396 and pep-0386 __version__ = '0.9pbs.4' # pragma: nocover Bump version as instructed by bamboo#-*- coding: utf-8 -*- # version string following pep-0396 and pep-0386 __version__ = '0.9pbs.5' # pragma: nocover
<commit_before>#-*- coding: utf-8 -*- # version string following pep-0396 and pep-0386 __version__ = '0.9pbs.4' # pragma: nocover <commit_msg>Bump version as instructed by bamboo<commit_after>#-*- coding: utf-8 -*- # version string following pep-0396 and pep-0386 __version__ = '0.9pbs.5' # pragma: nocover
ac5a339f73cb80b54b0298a02bce41c27c25b9ae
authentication/forms.py
authentication/forms.py
from django import forms as newform from django.forms import ModelForm from people.models import Beneficiary, Donor from django.contrib.auth.models import User from django.utils.translation import ugettext_lazy as _ # from django.core.urlresolvers import reverse # from crispy_forms.helper import FormHelper # from cris...
from django import forms as newform class LoginForm(newform.Form): username = newform.CharField() password = newform.CharField(widget=newform.PasswordInput)
Remove unused and commented parts
Remove unused and commented parts
Python
bsd-3-clause
agiliq/fundraiser,agiliq/fundraiser,febinstephen/django-fundrasiser-app,agiliq/fundraiser,febinstephen/django-fundrasiser-app,febinstephen/django-fundrasiser-app
from django import forms as newform from django.forms import ModelForm from people.models import Beneficiary, Donor from django.contrib.auth.models import User from django.utils.translation import ugettext_lazy as _ # from django.core.urlresolvers import reverse # from crispy_forms.helper import FormHelper # from cris...
from django import forms as newform class LoginForm(newform.Form): username = newform.CharField() password = newform.CharField(widget=newform.PasswordInput)
<commit_before>from django import forms as newform from django.forms import ModelForm from people.models import Beneficiary, Donor from django.contrib.auth.models import User from django.utils.translation import ugettext_lazy as _ # from django.core.urlresolvers import reverse # from crispy_forms.helper import FormHel...
from django import forms as newform class LoginForm(newform.Form): username = newform.CharField() password = newform.CharField(widget=newform.PasswordInput)
from django import forms as newform from django.forms import ModelForm from people.models import Beneficiary, Donor from django.contrib.auth.models import User from django.utils.translation import ugettext_lazy as _ # from django.core.urlresolvers import reverse # from crispy_forms.helper import FormHelper # from cris...
<commit_before>from django import forms as newform from django.forms import ModelForm from people.models import Beneficiary, Donor from django.contrib.auth.models import User from django.utils.translation import ugettext_lazy as _ # from django.core.urlresolvers import reverse # from crispy_forms.helper import FormHel...
25273e699b2b901eec53656dbcdc437e4a4cdc11
backend/breach/tests.py
backend/breach/tests.py
from django.test import TestCase from breach.models import SampleSet, Victim, Target, Round from breach.analyzer import decide_next_world_state class AnalyzerTestCase(TestCase): def setUp(self): target = Target.objects.create( endpoint='http://di.uoa.gr/', prefix='test', ...
from django.test import TestCase from breach.models import SampleSet, Victim, Target, Round from breach.analyzer import decide_next_world_state class RuptureTestCase(TestCase): def setUp(self): target = Target.objects.create( endpoint='http://di.uoa.gr/', prefix='test', ...
Create base test case class for rupture
Create base test case class for rupture
Python
mit
dimkarakostas/rupture,esarafianou/rupture,dimriou/rupture,dimkarakostas/rupture,esarafianou/rupture,esarafianou/rupture,dionyziz/rupture,dimkarakostas/rupture,dionyziz/rupture,dimriou/rupture,dionyziz/rupture,dimriou/rupture,esarafianou/rupture,dimkarakostas/rupture,dionyziz/rupture,dimriou/rupture,dimriou/rupture,dion...
from django.test import TestCase from breach.models import SampleSet, Victim, Target, Round from breach.analyzer import decide_next_world_state class AnalyzerTestCase(TestCase): def setUp(self): target = Target.objects.create( endpoint='http://di.uoa.gr/', prefix='test', ...
from django.test import TestCase from breach.models import SampleSet, Victim, Target, Round from breach.analyzer import decide_next_world_state class RuptureTestCase(TestCase): def setUp(self): target = Target.objects.create( endpoint='http://di.uoa.gr/', prefix='test', ...
<commit_before>from django.test import TestCase from breach.models import SampleSet, Victim, Target, Round from breach.analyzer import decide_next_world_state class AnalyzerTestCase(TestCase): def setUp(self): target = Target.objects.create( endpoint='http://di.uoa.gr/', prefix='te...
from django.test import TestCase from breach.models import SampleSet, Victim, Target, Round from breach.analyzer import decide_next_world_state class RuptureTestCase(TestCase): def setUp(self): target = Target.objects.create( endpoint='http://di.uoa.gr/', prefix='test', ...
from django.test import TestCase from breach.models import SampleSet, Victim, Target, Round from breach.analyzer import decide_next_world_state class AnalyzerTestCase(TestCase): def setUp(self): target = Target.objects.create( endpoint='http://di.uoa.gr/', prefix='test', ...
<commit_before>from django.test import TestCase from breach.models import SampleSet, Victim, Target, Round from breach.analyzer import decide_next_world_state class AnalyzerTestCase(TestCase): def setUp(self): target = Target.objects.create( endpoint='http://di.uoa.gr/', prefix='te...
a28a29af31b1ea604ed97544b2d84a39c9ba3e7b
automation/src/rabird/automation/selenium/webelement.py
automation/src/rabird/automation/selenium/webelement.py
#--IMPORT_ALL_FROM_FUTURE--# ''' @date 2014-11-16 @author Hong-she Liang <starofrainnight@gmail.com> ''' # Import the global selenium unit, not our selenium . global_selenium = __import__('selenium') import types import time def set_attribute(self, name, value): value = value.replace(r"'", r"\'") ...
#--IMPORT_ALL_FROM_FUTURE--# ''' @date 2014-11-16 @author Hong-she Liang <starofrainnight@gmail.com> ''' # Import the global selenium unit, not our selenium . global_selenium = __import__('selenium') import types import time def set_attribute(self, name, value): value = value.replace(r"'", r"\'") ...
Use javascript to force focus on an element, because the action chains seems take no effect!
Use javascript to force focus on an element, because the action chains seems take no effect!
Python
apache-2.0
starofrainnight/rabird.core,starofrainnight/rabird.auto
#--IMPORT_ALL_FROM_FUTURE--# ''' @date 2014-11-16 @author Hong-she Liang <starofrainnight@gmail.com> ''' # Import the global selenium unit, not our selenium . global_selenium = __import__('selenium') import types import time def set_attribute(self, name, value): value = value.replace(r"'", r"\'") ...
#--IMPORT_ALL_FROM_FUTURE--# ''' @date 2014-11-16 @author Hong-she Liang <starofrainnight@gmail.com> ''' # Import the global selenium unit, not our selenium . global_selenium = __import__('selenium') import types import time def set_attribute(self, name, value): value = value.replace(r"'", r"\'") ...
<commit_before> #--IMPORT_ALL_FROM_FUTURE--# ''' @date 2014-11-16 @author Hong-she Liang <starofrainnight@gmail.com> ''' # Import the global selenium unit, not our selenium . global_selenium = __import__('selenium') import types import time def set_attribute(self, name, value): value = value.replac...
#--IMPORT_ALL_FROM_FUTURE--# ''' @date 2014-11-16 @author Hong-she Liang <starofrainnight@gmail.com> ''' # Import the global selenium unit, not our selenium . global_selenium = __import__('selenium') import types import time def set_attribute(self, name, value): value = value.replace(r"'", r"\'") ...
#--IMPORT_ALL_FROM_FUTURE--# ''' @date 2014-11-16 @author Hong-she Liang <starofrainnight@gmail.com> ''' # Import the global selenium unit, not our selenium . global_selenium = __import__('selenium') import types import time def set_attribute(self, name, value): value = value.replace(r"'", r"\'") ...
<commit_before> #--IMPORT_ALL_FROM_FUTURE--# ''' @date 2014-11-16 @author Hong-she Liang <starofrainnight@gmail.com> ''' # Import the global selenium unit, not our selenium . global_selenium = __import__('selenium') import types import time def set_attribute(self, name, value): value = value.replac...
730b5acb9c715a0b7e2f70d4ee3d26cd2a8a03ca
wordcloud/views.py
wordcloud/views.py
import json import os from django.conf import settings from django.http import HttpResponse from django.views.decorators.cache import cache_page from .wordcloud import popular_words @cache_page(60*60*4) def wordcloud(request, max_entries=30): """ Return tag cloud JSON results""" cache_path = settings.WORDCL...
import json import os from django.conf import settings from django.http import HttpResponse from django.views.decorators.cache import cache_page from .wordcloud import popular_words @cache_page(60*60*4) def wordcloud(request, max_entries=30): """ Return tag cloud JSON results""" cache_path = settings.WORDCL...
Fix a deprecation warning; content_type replaces mimetype
Fix a deprecation warning; content_type replaces mimetype
Python
agpl-3.0
geoffkilpin/pombola,mysociety/pombola,mysociety/pombola,geoffkilpin/pombola,geoffkilpin/pombola,geoffkilpin/pombola,mysociety/pombola,mysociety/pombola,geoffkilpin/pombola,mysociety/pombola,mysociety/pombola,geoffkilpin/pombola
import json import os from django.conf import settings from django.http import HttpResponse from django.views.decorators.cache import cache_page from .wordcloud import popular_words @cache_page(60*60*4) def wordcloud(request, max_entries=30): """ Return tag cloud JSON results""" cache_path = settings.WORDCL...
import json import os from django.conf import settings from django.http import HttpResponse from django.views.decorators.cache import cache_page from .wordcloud import popular_words @cache_page(60*60*4) def wordcloud(request, max_entries=30): """ Return tag cloud JSON results""" cache_path = settings.WORDCL...
<commit_before>import json import os from django.conf import settings from django.http import HttpResponse from django.views.decorators.cache import cache_page from .wordcloud import popular_words @cache_page(60*60*4) def wordcloud(request, max_entries=30): """ Return tag cloud JSON results""" cache_path = ...
import json import os from django.conf import settings from django.http import HttpResponse from django.views.decorators.cache import cache_page from .wordcloud import popular_words @cache_page(60*60*4) def wordcloud(request, max_entries=30): """ Return tag cloud JSON results""" cache_path = settings.WORDCL...
import json import os from django.conf import settings from django.http import HttpResponse from django.views.decorators.cache import cache_page from .wordcloud import popular_words @cache_page(60*60*4) def wordcloud(request, max_entries=30): """ Return tag cloud JSON results""" cache_path = settings.WORDCL...
<commit_before>import json import os from django.conf import settings from django.http import HttpResponse from django.views.decorators.cache import cache_page from .wordcloud import popular_words @cache_page(60*60*4) def wordcloud(request, max_entries=30): """ Return tag cloud JSON results""" cache_path = ...
7e6af723e15a785b403010de4b44b49fce924e91
social_auth/backends/pipeline/misc.py
social_auth/backends/pipeline/misc.py
from social_auth.backends import PIPELINE from social_auth.utils import setting PIPELINE_ENTRY = 'social_auth.backends.pipeline.misc.save_status_to_session' def save_status_to_session(request, auth, *args, **kwargs): """Saves current social-auth status to session.""" next_entry = setting('SOCIAL_AUTH_PIPELI...
from social_auth.backends import PIPELINE from social_auth.utils import setting PIPELINE_ENTRY = 'social_auth.backends.pipeline.misc.save_status_to_session' def tuple_index(t, e): for (i, te) in enumerate(t): if te == e: return i return None def save_status_to_session(request, auth, *arg...
Add own tuple_index function to stay compatible with python 2.5
Add own tuple_index function to stay compatible with python 2.5
Python
bsd-3-clause
WW-Digital/django-social-auth,duoduo369/django-social-auth,limdauto/django-social-auth,vuchau/django-social-auth,gustavoam/django-social-auth,1st/django-social-auth,vxvinh1511/django-social-auth,VishvajitP/django-social-auth,MjAbuz/django-social-auth,sk7/django-social-auth,getsentry/django-social-auth,omab/django-socia...
from social_auth.backends import PIPELINE from social_auth.utils import setting PIPELINE_ENTRY = 'social_auth.backends.pipeline.misc.save_status_to_session' def save_status_to_session(request, auth, *args, **kwargs): """Saves current social-auth status to session.""" next_entry = setting('SOCIAL_AUTH_PIPELI...
from social_auth.backends import PIPELINE from social_auth.utils import setting PIPELINE_ENTRY = 'social_auth.backends.pipeline.misc.save_status_to_session' def tuple_index(t, e): for (i, te) in enumerate(t): if te == e: return i return None def save_status_to_session(request, auth, *arg...
<commit_before>from social_auth.backends import PIPELINE from social_auth.utils import setting PIPELINE_ENTRY = 'social_auth.backends.pipeline.misc.save_status_to_session' def save_status_to_session(request, auth, *args, **kwargs): """Saves current social-auth status to session.""" next_entry = setting('SOC...
from social_auth.backends import PIPELINE from social_auth.utils import setting PIPELINE_ENTRY = 'social_auth.backends.pipeline.misc.save_status_to_session' def tuple_index(t, e): for (i, te) in enumerate(t): if te == e: return i return None def save_status_to_session(request, auth, *arg...
from social_auth.backends import PIPELINE from social_auth.utils import setting PIPELINE_ENTRY = 'social_auth.backends.pipeline.misc.save_status_to_session' def save_status_to_session(request, auth, *args, **kwargs): """Saves current social-auth status to session.""" next_entry = setting('SOCIAL_AUTH_PIPELI...
<commit_before>from social_auth.backends import PIPELINE from social_auth.utils import setting PIPELINE_ENTRY = 'social_auth.backends.pipeline.misc.save_status_to_session' def save_status_to_session(request, auth, *args, **kwargs): """Saves current social-auth status to session.""" next_entry = setting('SOC...
1f83364822a1c80dc26f58d3908006a7f643e7c9
json_protocol.py
json_protocol.py
# -*- coding: iso-8859-1 -*- from twisted.protocols.basic import Int32StringReceiver import json import apps class JSONProtocol(Int32StringReceiver): app = apps.LoginApp def connectionMade(self): self.app = self.__class__.app(self) def connectionLost(self, reason): self.app.disconnect(r...
# -*- coding: iso-8859-1 -*- from twisted.protocols.basic import Int32StringReceiver import json import apps class JSONProtocol(Int32StringReceiver): app = apps.LoginApp def connectionMade(self): self.app = self.__class__.app(self) def connectionLost(self, reason): self.app.disconnect(r...
Change parse errors to standard format.
Change parse errors to standard format.
Python
bsd-3-clause
siggame/server
# -*- coding: iso-8859-1 -*- from twisted.protocols.basic import Int32StringReceiver import json import apps class JSONProtocol(Int32StringReceiver): app = apps.LoginApp def connectionMade(self): self.app = self.__class__.app(self) def connectionLost(self, reason): self.app.disconnect(r...
# -*- coding: iso-8859-1 -*- from twisted.protocols.basic import Int32StringReceiver import json import apps class JSONProtocol(Int32StringReceiver): app = apps.LoginApp def connectionMade(self): self.app = self.__class__.app(self) def connectionLost(self, reason): self.app.disconnect(r...
<commit_before># -*- coding: iso-8859-1 -*- from twisted.protocols.basic import Int32StringReceiver import json import apps class JSONProtocol(Int32StringReceiver): app = apps.LoginApp def connectionMade(self): self.app = self.__class__.app(self) def connectionLost(self, reason): self.a...
# -*- coding: iso-8859-1 -*- from twisted.protocols.basic import Int32StringReceiver import json import apps class JSONProtocol(Int32StringReceiver): app = apps.LoginApp def connectionMade(self): self.app = self.__class__.app(self) def connectionLost(self, reason): self.app.disconnect(r...
# -*- coding: iso-8859-1 -*- from twisted.protocols.basic import Int32StringReceiver import json import apps class JSONProtocol(Int32StringReceiver): app = apps.LoginApp def connectionMade(self): self.app = self.__class__.app(self) def connectionLost(self, reason): self.app.disconnect(r...
<commit_before># -*- coding: iso-8859-1 -*- from twisted.protocols.basic import Int32StringReceiver import json import apps class JSONProtocol(Int32StringReceiver): app = apps.LoginApp def connectionMade(self): self.app = self.__class__.app(self) def connectionLost(self, reason): self.a...
877f7fe856c640ee7cafa41226622d18eee39257
update-database/update-latest-from-so.py
update-database/update-latest-from-so.py
import pymongo import stackexchange import time so = stackexchange.Site(stackexchange.StackOverflow, "WNe2LOp*hdsbD5U7kp0bhg((") so.be_inclusive() connection = pymongo.Connection() db = connection.stack_doc posts = db.posts up_to_date = False while not up_to_date: last_in_database = posts.find_one(sort=[("last...
import pymongo import stackexchange import time so = stackexchange.Site(stackexchange.StackOverflow) so.be_inclusive() connection = pymongo.Connection() db = connection.stack_doc posts = db.posts up_to_date = False while not up_to_date: last_in_database = posts.find_one(sort=[("last_activity", pymongo.DESCENDI...
Remove API key (it's for the wrong API version)
Remove API key (it's for the wrong API version)
Python
bsd-3-clause
alnorth/stackdoc,alnorth/stackdoc,alnorth/stackdoc
import pymongo import stackexchange import time so = stackexchange.Site(stackexchange.StackOverflow, "WNe2LOp*hdsbD5U7kp0bhg((") so.be_inclusive() connection = pymongo.Connection() db = connection.stack_doc posts = db.posts up_to_date = False while not up_to_date: last_in_database = posts.find_one(sort=[("last...
import pymongo import stackexchange import time so = stackexchange.Site(stackexchange.StackOverflow) so.be_inclusive() connection = pymongo.Connection() db = connection.stack_doc posts = db.posts up_to_date = False while not up_to_date: last_in_database = posts.find_one(sort=[("last_activity", pymongo.DESCENDI...
<commit_before>import pymongo import stackexchange import time so = stackexchange.Site(stackexchange.StackOverflow, "WNe2LOp*hdsbD5U7kp0bhg((") so.be_inclusive() connection = pymongo.Connection() db = connection.stack_doc posts = db.posts up_to_date = False while not up_to_date: last_in_database = posts.find_o...
import pymongo import stackexchange import time so = stackexchange.Site(stackexchange.StackOverflow) so.be_inclusive() connection = pymongo.Connection() db = connection.stack_doc posts = db.posts up_to_date = False while not up_to_date: last_in_database = posts.find_one(sort=[("last_activity", pymongo.DESCENDI...
import pymongo import stackexchange import time so = stackexchange.Site(stackexchange.StackOverflow, "WNe2LOp*hdsbD5U7kp0bhg((") so.be_inclusive() connection = pymongo.Connection() db = connection.stack_doc posts = db.posts up_to_date = False while not up_to_date: last_in_database = posts.find_one(sort=[("last...
<commit_before>import pymongo import stackexchange import time so = stackexchange.Site(stackexchange.StackOverflow, "WNe2LOp*hdsbD5U7kp0bhg((") so.be_inclusive() connection = pymongo.Connection() db = connection.stack_doc posts = db.posts up_to_date = False while not up_to_date: last_in_database = posts.find_o...
346d6e38e84a5addc5173a331dbc0cc6fa39e754
corehq/apps/domain/management/commands/fill_last_modified_date.py
corehq/apps/domain/management/commands/fill_last_modified_date.py
from django.core.management.base import BaseCommand from corehq.apps.domain.models import Domain from dimagi.utils.couch.database import iter_docs class Command(BaseCommand): def _get_domains_without_last_modified_date(self): docs = iter_docs(Domain.get_db(), [ domain['id'] for d...
from django.core.management.base import BaseCommand from corehq.apps.domain.models import Domain from dimagi.utils.couch.database import iter_docs class Command(BaseCommand): def _get_domains_without_last_modified_date(self): docs = iter_docs(Domain.get_db(), [ domain['id'] for d...
Include domains which have last_modified equal to None
Include domains which have last_modified equal to None
Python
bsd-3-clause
qedsoftware/commcare-hq,dimagi/commcare-hq,qedsoftware/commcare-hq,qedsoftware/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq,qedsoftware/commcare-hq,dimagi/commcare-hq,qedsoftware/commcare-hq,dimagi/commcare-hq
from django.core.management.base import BaseCommand from corehq.apps.domain.models import Domain from dimagi.utils.couch.database import iter_docs class Command(BaseCommand): def _get_domains_without_last_modified_date(self): docs = iter_docs(Domain.get_db(), [ domain['id'] for d...
from django.core.management.base import BaseCommand from corehq.apps.domain.models import Domain from dimagi.utils.couch.database import iter_docs class Command(BaseCommand): def _get_domains_without_last_modified_date(self): docs = iter_docs(Domain.get_db(), [ domain['id'] for d...
<commit_before>from django.core.management.base import BaseCommand from corehq.apps.domain.models import Domain from dimagi.utils.couch.database import iter_docs class Command(BaseCommand): def _get_domains_without_last_modified_date(self): docs = iter_docs(Domain.get_db(), [ domain['id'] ...
from django.core.management.base import BaseCommand from corehq.apps.domain.models import Domain from dimagi.utils.couch.database import iter_docs class Command(BaseCommand): def _get_domains_without_last_modified_date(self): docs = iter_docs(Domain.get_db(), [ domain['id'] for d...
from django.core.management.base import BaseCommand from corehq.apps.domain.models import Domain from dimagi.utils.couch.database import iter_docs class Command(BaseCommand): def _get_domains_without_last_modified_date(self): docs = iter_docs(Domain.get_db(), [ domain['id'] for d...
<commit_before>from django.core.management.base import BaseCommand from corehq.apps.domain.models import Domain from dimagi.utils.couch.database import iter_docs class Command(BaseCommand): def _get_domains_without_last_modified_date(self): docs = iter_docs(Domain.get_db(), [ domain['id'] ...
6f18d3a00e776cf972f814fbf6ce50ec4b7cf85e
eblog/managers.py
eblog/managers.py
""" Managers of ``blog`` application. """ from django.db import models class CategoryOnlineManager(models.Manager): """ Manager that manages online ``Category`` objects. """ def get_query_set(self): from blog.models import Entry entry_status = Entry.STATUS_ONLINE return super(...
""" Managers of ``blog`` application. """ from django.db import models class CategoryOnlineManager(models.Manager): """ Manager that manages online ``Category`` objects. """ def get_queryset(self): from blog.models import Entry entry_status = Entry.STATUS_ONLINE return super(C...
Change the method get_query_set() to get_queryset() as required by django 1.7
Change the method get_query_set() to get_queryset() as required by django 1.7
Python
bsd-3-clause
pandamasta/django-eblog
""" Managers of ``blog`` application. """ from django.db import models class CategoryOnlineManager(models.Manager): """ Manager that manages online ``Category`` objects. """ def get_query_set(self): from blog.models import Entry entry_status = Entry.STATUS_ONLINE return super(...
""" Managers of ``blog`` application. """ from django.db import models class CategoryOnlineManager(models.Manager): """ Manager that manages online ``Category`` objects. """ def get_queryset(self): from blog.models import Entry entry_status = Entry.STATUS_ONLINE return super(C...
<commit_before>""" Managers of ``blog`` application. """ from django.db import models class CategoryOnlineManager(models.Manager): """ Manager that manages online ``Category`` objects. """ def get_query_set(self): from blog.models import Entry entry_status = Entry.STATUS_ONLINE ...
""" Managers of ``blog`` application. """ from django.db import models class CategoryOnlineManager(models.Manager): """ Manager that manages online ``Category`` objects. """ def get_queryset(self): from blog.models import Entry entry_status = Entry.STATUS_ONLINE return super(C...
""" Managers of ``blog`` application. """ from django.db import models class CategoryOnlineManager(models.Manager): """ Manager that manages online ``Category`` objects. """ def get_query_set(self): from blog.models import Entry entry_status = Entry.STATUS_ONLINE return super(...
<commit_before>""" Managers of ``blog`` application. """ from django.db import models class CategoryOnlineManager(models.Manager): """ Manager that manages online ``Category`` objects. """ def get_query_set(self): from blog.models import Entry entry_status = Entry.STATUS_ONLINE ...
0293170e0e8d309e4b2c37e3a07f64d4447b244f
pylearn2/costs/tests/test_lp_norm_cost.py
pylearn2/costs/tests/test_lp_norm_cost.py
""" Test LpNorm cost """ import numpy import theano from theano import tensor as T from nose.tools import raises def test_shared_variables(): ''' LpNorm should handle shared variables. ''' assert False def test_symbolic_expressions_of_shared_variables(): ''' LpNorm should handle symbolic exp...
""" Test LpNorm cost """ import os from nose.tools import raises from pylearn2.models.mlp import Linear from pylearn2.models.mlp import Softmax from pylearn2.models.mlp import MLP from pylearn2.costs.cost import LpNorm from pylearn2.datasets.cifar10 import CIFAR10 from pylearn2.training_algorithms.sgd import SGD from p...
Add more code to LpNorm unit tests
Add more code to LpNorm unit tests
Python
bsd-3-clause
caidongyun/pylearn2,mclaughlin6464/pylearn2,kose-y/pylearn2,chrish42/pylearn,sandeepkbhat/pylearn2,junbochen/pylearn2,fishcorn/pylearn2,w1kke/pylearn2,Refefer/pylearn2,hyqneuron/pylearn2-maxsom,chrish42/pylearn,daemonmaker/pylearn2,fulmicoton/pylearn2,hyqneuron/pylearn2-maxsom,fyffyt/pylearn2,TNick/pylearn2,hantek/pyle...
""" Test LpNorm cost """ import numpy import theano from theano import tensor as T from nose.tools import raises def test_shared_variables(): ''' LpNorm should handle shared variables. ''' assert False def test_symbolic_expressions_of_shared_variables(): ''' LpNorm should handle symbolic exp...
""" Test LpNorm cost """ import os from nose.tools import raises from pylearn2.models.mlp import Linear from pylearn2.models.mlp import Softmax from pylearn2.models.mlp import MLP from pylearn2.costs.cost import LpNorm from pylearn2.datasets.cifar10 import CIFAR10 from pylearn2.training_algorithms.sgd import SGD from p...
<commit_before>""" Test LpNorm cost """ import numpy import theano from theano import tensor as T from nose.tools import raises def test_shared_variables(): ''' LpNorm should handle shared variables. ''' assert False def test_symbolic_expressions_of_shared_variables(): ''' LpNorm should hand...
""" Test LpNorm cost """ import os from nose.tools import raises from pylearn2.models.mlp import Linear from pylearn2.models.mlp import Softmax from pylearn2.models.mlp import MLP from pylearn2.costs.cost import LpNorm from pylearn2.datasets.cifar10 import CIFAR10 from pylearn2.training_algorithms.sgd import SGD from p...
""" Test LpNorm cost """ import numpy import theano from theano import tensor as T from nose.tools import raises def test_shared_variables(): ''' LpNorm should handle shared variables. ''' assert False def test_symbolic_expressions_of_shared_variables(): ''' LpNorm should handle symbolic exp...
<commit_before>""" Test LpNorm cost """ import numpy import theano from theano import tensor as T from nose.tools import raises def test_shared_variables(): ''' LpNorm should handle shared variables. ''' assert False def test_symbolic_expressions_of_shared_variables(): ''' LpNorm should hand...
4cc45954ba71af6b81c930a99f05e8a6cf8b48f6
update-database/stackdoc/questionimport.py
update-database/stackdoc/questionimport.py
def import_question(posts, namespaces, id, title, body, tags, last_activity_date, last_updated_date, score, answer_count, has_accepted_answer): namespaces_for_post = {} for name, n in namespaces.items(): namespace_tags = n.get_tags() if not(namespace_tags) or any(map(lambda x: x in tags, namesp...
def import_question(posts, namespaces, id, title, body, tags, last_activity_date, last_updated_date, score, answer_count, has_accepted_answer): namespaces_for_post = {} for name, n in namespaces.items(): namespace_tags = n.get_tags() if not(namespace_tags) or any(map(lambda x: x in tags, namesp...
Rewrite inserting function. It can be a lot simpler now we know we're always dealing with up-to-date data.
Rewrite inserting function. It can be a lot simpler now we know we're always dealing with up-to-date data.
Python
bsd-3-clause
alnorth/stackdoc,alnorth/stackdoc,alnorth/stackdoc
def import_question(posts, namespaces, id, title, body, tags, last_activity_date, last_updated_date, score, answer_count, has_accepted_answer): namespaces_for_post = {} for name, n in namespaces.items(): namespace_tags = n.get_tags() if not(namespace_tags) or any(map(lambda x: x in tags, namesp...
def import_question(posts, namespaces, id, title, body, tags, last_activity_date, last_updated_date, score, answer_count, has_accepted_answer): namespaces_for_post = {} for name, n in namespaces.items(): namespace_tags = n.get_tags() if not(namespace_tags) or any(map(lambda x: x in tags, namesp...
<commit_before> def import_question(posts, namespaces, id, title, body, tags, last_activity_date, last_updated_date, score, answer_count, has_accepted_answer): namespaces_for_post = {} for name, n in namespaces.items(): namespace_tags = n.get_tags() if not(namespace_tags) or any(map(lambda x: x ...
def import_question(posts, namespaces, id, title, body, tags, last_activity_date, last_updated_date, score, answer_count, has_accepted_answer): namespaces_for_post = {} for name, n in namespaces.items(): namespace_tags = n.get_tags() if not(namespace_tags) or any(map(lambda x: x in tags, namesp...
def import_question(posts, namespaces, id, title, body, tags, last_activity_date, last_updated_date, score, answer_count, has_accepted_answer): namespaces_for_post = {} for name, n in namespaces.items(): namespace_tags = n.get_tags() if not(namespace_tags) or any(map(lambda x: x in tags, namesp...
<commit_before> def import_question(posts, namespaces, id, title, body, tags, last_activity_date, last_updated_date, score, answer_count, has_accepted_answer): namespaces_for_post = {} for name, n in namespaces.items(): namespace_tags = n.get_tags() if not(namespace_tags) or any(map(lambda x: x ...
a13e13d0fef4a342c5a419365b9ac7053eddafb3
loader/helpers/lib/forgeFixes.py
loader/helpers/lib/forgeFixes.py
import os import fileinput def modify(path, build): config = os.path.join(path, 'config/forge.cfg') replacements = { 'removeErroringEntities=false': 'removeErroringEntities=true', 'removeErroringTileEntities=false': 'removeErroringTileEntities=true' } if not os.path.isfile(config): ...
import os import fileinput import requests import zipfile import distutils.dir_util import tempfile patchfiles = 'gdn/static/cache/forgepatch01' def patchForge(path): if not os.path.exists(patchfiles): print 'Downloading forgepatch' r = requests.get('http://s3.amazonaws.com/SpaceZips/forgepatch.z...
Add forge libraries to patch helper
Add forge libraries to patch helper
Python
mpl-2.0
MCProHosting/SpaceGDN,XereoNet/SpaceGDN,MCProHosting/SpaceGDN,XereoNet/SpaceGDN,MCProHosting/SpaceGDN,XereoNet/SpaceGDN
import os import fileinput def modify(path, build): config = os.path.join(path, 'config/forge.cfg') replacements = { 'removeErroringEntities=false': 'removeErroringEntities=true', 'removeErroringTileEntities=false': 'removeErroringTileEntities=true' } if not os.path.isfile(config): ...
import os import fileinput import requests import zipfile import distutils.dir_util import tempfile patchfiles = 'gdn/static/cache/forgepatch01' def patchForge(path): if not os.path.exists(patchfiles): print 'Downloading forgepatch' r = requests.get('http://s3.amazonaws.com/SpaceZips/forgepatch.z...
<commit_before>import os import fileinput def modify(path, build): config = os.path.join(path, 'config/forge.cfg') replacements = { 'removeErroringEntities=false': 'removeErroringEntities=true', 'removeErroringTileEntities=false': 'removeErroringTileEntities=true' } if not os.path.isfi...
import os import fileinput import requests import zipfile import distutils.dir_util import tempfile patchfiles = 'gdn/static/cache/forgepatch01' def patchForge(path): if not os.path.exists(patchfiles): print 'Downloading forgepatch' r = requests.get('http://s3.amazonaws.com/SpaceZips/forgepatch.z...
import os import fileinput def modify(path, build): config = os.path.join(path, 'config/forge.cfg') replacements = { 'removeErroringEntities=false': 'removeErroringEntities=true', 'removeErroringTileEntities=false': 'removeErroringTileEntities=true' } if not os.path.isfile(config): ...
<commit_before>import os import fileinput def modify(path, build): config = os.path.join(path, 'config/forge.cfg') replacements = { 'removeErroringEntities=false': 'removeErroringEntities=true', 'removeErroringTileEntities=false': 'removeErroringTileEntities=true' } if not os.path.isfi...
90bc53c743095fd3a6a848aa2447b6ae6ab1a98f
tg/release.py
tg/release.py
"""TurboGears project related information""" version = "2.0a1" description = "Next generation TurboGears built on Pylons" long_description=""" TurboGears brings together a variety of best of breed python tools to create an easy to install, easy to use web megaframework. It provides and integrated and well tested set...
"""TurboGears project related information""" version = "2.0a1" description = "Next generation TurboGears built on Pylons" long_description=""" TurboGears brings together a variety of best of breed python tools to create an easy to install, easy to use web megaframework. It provides and integrated and well tested set o...
Convert description in setup.py to rest format for better display in Cheeseshop
Convert description in setup.py to rest format for better display in Cheeseshop --HG-- extra : convert_revision : svn%3A77541ad4-5f01-0410-9ede-a1b63cd9a898/trunk%403340
Python
mit
lucius-feng/tg2,lucius-feng/tg2
"""TurboGears project related information""" version = "2.0a1" description = "Next generation TurboGears built on Pylons" long_description=""" TurboGears brings together a variety of best of breed python tools to create an easy to install, easy to use web megaframework. It provides and integrated and well tested set...
"""TurboGears project related information""" version = "2.0a1" description = "Next generation TurboGears built on Pylons" long_description=""" TurboGears brings together a variety of best of breed python tools to create an easy to install, easy to use web megaframework. It provides and integrated and well tested set o...
<commit_before>"""TurboGears project related information""" version = "2.0a1" description = "Next generation TurboGears built on Pylons" long_description=""" TurboGears brings together a variety of best of breed python tools to create an easy to install, easy to use web megaframework. It provides and integrated and ...
"""TurboGears project related information""" version = "2.0a1" description = "Next generation TurboGears built on Pylons" long_description=""" TurboGears brings together a variety of best of breed python tools to create an easy to install, easy to use web megaframework. It provides and integrated and well tested set o...
"""TurboGears project related information""" version = "2.0a1" description = "Next generation TurboGears built on Pylons" long_description=""" TurboGears brings together a variety of best of breed python tools to create an easy to install, easy to use web megaframework. It provides and integrated and well tested set...
<commit_before>"""TurboGears project related information""" version = "2.0a1" description = "Next generation TurboGears built on Pylons" long_description=""" TurboGears brings together a variety of best of breed python tools to create an easy to install, easy to use web megaframework. It provides and integrated and ...
a8a7f6ecbe1abd4fcb6dad8e6c635c3ef38ab40f
scoring_engine/engine/execute_command.py
scoring_engine/engine/execute_command.py
from scoring_engine.celery_app import celery_app from celery.exceptions import SoftTimeLimitExceeded import subprocess from scoring_engine.logger import logger @celery_app.task(name='execute_command', soft_time_limit=30) def execute_command(job): output = "" # Disable duplicate celery log messages if log...
from scoring_engine.celery_app import celery_app from celery.exceptions import SoftTimeLimitExceeded import subprocess from scoring_engine.logger import logger @celery_app.task(name='execute_command', acks_late=True, reject_on_worker_lost=True, soft_time_limit=30) def execute_command(job): output = "" # Disa...
Modify worker to requeue jobs if worker is killed
Modify worker to requeue jobs if worker is killed
Python
mit
pwnbus/scoring_engine,pwnbus/scoring_engine,pwnbus/scoring_engine,pwnbus/scoring_engine
from scoring_engine.celery_app import celery_app from celery.exceptions import SoftTimeLimitExceeded import subprocess from scoring_engine.logger import logger @celery_app.task(name='execute_command', soft_time_limit=30) def execute_command(job): output = "" # Disable duplicate celery log messages if log...
from scoring_engine.celery_app import celery_app from celery.exceptions import SoftTimeLimitExceeded import subprocess from scoring_engine.logger import logger @celery_app.task(name='execute_command', acks_late=True, reject_on_worker_lost=True, soft_time_limit=30) def execute_command(job): output = "" # Disa...
<commit_before>from scoring_engine.celery_app import celery_app from celery.exceptions import SoftTimeLimitExceeded import subprocess from scoring_engine.logger import logger @celery_app.task(name='execute_command', soft_time_limit=30) def execute_command(job): output = "" # Disable duplicate celery log mess...
from scoring_engine.celery_app import celery_app from celery.exceptions import SoftTimeLimitExceeded import subprocess from scoring_engine.logger import logger @celery_app.task(name='execute_command', acks_late=True, reject_on_worker_lost=True, soft_time_limit=30) def execute_command(job): output = "" # Disa...
from scoring_engine.celery_app import celery_app from celery.exceptions import SoftTimeLimitExceeded import subprocess from scoring_engine.logger import logger @celery_app.task(name='execute_command', soft_time_limit=30) def execute_command(job): output = "" # Disable duplicate celery log messages if log...
<commit_before>from scoring_engine.celery_app import celery_app from celery.exceptions import SoftTimeLimitExceeded import subprocess from scoring_engine.logger import logger @celery_app.task(name='execute_command', soft_time_limit=30) def execute_command(job): output = "" # Disable duplicate celery log mess...
08fa37d71cf8f1d5d83227349b49da142f9781da
markdo/markdo.py
markdo/markdo.py
#!/usr/bin/env python from appkit.api.v0_2_8 import App from flask import render_template, request import os import sys import codecs app = App(__name__) try: file_name = sys.argv[1] if not os.path.exists(file_name): open(file_name, 'w').close() except: file_name = None app.file_name = file_name...
#!/usr/bin/env python from appkit.api.v0_2_8 import App from flask import render_template, request import os import sys import codecs app = App(__name__) try: file_name = sys.argv[1] if not os.path.exists(file_name): open(file_name, 'w').close() except: file_name = None app.file_name = file_name...
Fix utf-8 encoding error when saving the file.
Fix utf-8 encoding error when saving the file.
Python
mit
nitipit/markdo,nitipit/markdo,nitipit/markdo
#!/usr/bin/env python from appkit.api.v0_2_8 import App from flask import render_template, request import os import sys import codecs app = App(__name__) try: file_name = sys.argv[1] if not os.path.exists(file_name): open(file_name, 'w').close() except: file_name = None app.file_name = file_name...
#!/usr/bin/env python from appkit.api.v0_2_8 import App from flask import render_template, request import os import sys import codecs app = App(__name__) try: file_name = sys.argv[1] if not os.path.exists(file_name): open(file_name, 'w').close() except: file_name = None app.file_name = file_name...
<commit_before>#!/usr/bin/env python from appkit.api.v0_2_8 import App from flask import render_template, request import os import sys import codecs app = App(__name__) try: file_name = sys.argv[1] if not os.path.exists(file_name): open(file_name, 'w').close() except: file_name = None app.file_n...
#!/usr/bin/env python from appkit.api.v0_2_8 import App from flask import render_template, request import os import sys import codecs app = App(__name__) try: file_name = sys.argv[1] if not os.path.exists(file_name): open(file_name, 'w').close() except: file_name = None app.file_name = file_name...
#!/usr/bin/env python from appkit.api.v0_2_8 import App from flask import render_template, request import os import sys import codecs app = App(__name__) try: file_name = sys.argv[1] if not os.path.exists(file_name): open(file_name, 'w').close() except: file_name = None app.file_name = file_name...
<commit_before>#!/usr/bin/env python from appkit.api.v0_2_8 import App from flask import render_template, request import os import sys import codecs app = App(__name__) try: file_name = sys.argv[1] if not os.path.exists(file_name): open(file_name, 'w').close() except: file_name = None app.file_n...
71b42d288b68b2bac07f8e423429971e68a7ffd5
database_files/migrations/0001_initial.py
database_files/migrations/0001_initial.py
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations import django.utils.timezone class Migration(migrations.Migration): dependencies = [ ] operations = [ migrations.CreateModel( name='File', fields=[ ('...
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations import django.utils.timezone class Migration(migrations.Migration): dependencies = [ ] operations = [ migrations.CreateModel( name='File', fields=[ ('...
Make Django 1.7 migrations compatible with Python3
Make Django 1.7 migrations compatible with Python3
Python
bsd-3-clause
rhunwicks/django-database-files
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations import django.utils.timezone class Migration(migrations.Migration): dependencies = [ ] operations = [ migrations.CreateModel( name='File', fields=[ ('...
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations import django.utils.timezone class Migration(migrations.Migration): dependencies = [ ] operations = [ migrations.CreateModel( name='File', fields=[ ('...
<commit_before># -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations import django.utils.timezone class Migration(migrations.Migration): dependencies = [ ] operations = [ migrations.CreateModel( name='File', fields=[ ...
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations import django.utils.timezone class Migration(migrations.Migration): dependencies = [ ] operations = [ migrations.CreateModel( name='File', fields=[ ('...
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations import django.utils.timezone class Migration(migrations.Migration): dependencies = [ ] operations = [ migrations.CreateModel( name='File', fields=[ ('...
<commit_before># -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations import django.utils.timezone class Migration(migrations.Migration): dependencies = [ ] operations = [ migrations.CreateModel( name='File', fields=[ ...
1af3111e4f2422c1d6484c237700013386d4638d
minutes/forms.py
minutes/forms.py
from django.forms import ModelForm, Textarea, ChoiceField from django.urls import reverse_lazy from .models import Meeting, Folder MD_INPUT = { 'class': 'markdown-input', 'data-endpoint': reverse_lazy('utilities:preview_safe') } def sorted_folders(): return sorted([(x.pk, str(x)) for x in Folder.objects...
from django.forms import ModelForm, Textarea, ChoiceField from django.utils.functional import lazy from .models import Meeting, Folder MD_INPUT = { 'class': 'markdown-input' } def sorted_folders(): return sorted([(x.pk, str(x)) for x in Folder.objects.all()], key=lambda x: x[1]) class MeetingForm(ModelFor...
Revert "Allow admin preview in minutes as well"
Revert "Allow admin preview in minutes as well" This reverts commit f4806655
Python
isc
ashbc/tgrsite,ashbc/tgrsite,ashbc/tgrsite
from django.forms import ModelForm, Textarea, ChoiceField from django.urls import reverse_lazy from .models import Meeting, Folder MD_INPUT = { 'class': 'markdown-input', 'data-endpoint': reverse_lazy('utilities:preview_safe') } def sorted_folders(): return sorted([(x.pk, str(x)) for x in Folder.objects...
from django.forms import ModelForm, Textarea, ChoiceField from django.utils.functional import lazy from .models import Meeting, Folder MD_INPUT = { 'class': 'markdown-input' } def sorted_folders(): return sorted([(x.pk, str(x)) for x in Folder.objects.all()], key=lambda x: x[1]) class MeetingForm(ModelFor...
<commit_before>from django.forms import ModelForm, Textarea, ChoiceField from django.urls import reverse_lazy from .models import Meeting, Folder MD_INPUT = { 'class': 'markdown-input', 'data-endpoint': reverse_lazy('utilities:preview_safe') } def sorted_folders(): return sorted([(x.pk, str(x)) for x in...
from django.forms import ModelForm, Textarea, ChoiceField from django.utils.functional import lazy from .models import Meeting, Folder MD_INPUT = { 'class': 'markdown-input' } def sorted_folders(): return sorted([(x.pk, str(x)) for x in Folder.objects.all()], key=lambda x: x[1]) class MeetingForm(ModelFor...
from django.forms import ModelForm, Textarea, ChoiceField from django.urls import reverse_lazy from .models import Meeting, Folder MD_INPUT = { 'class': 'markdown-input', 'data-endpoint': reverse_lazy('utilities:preview_safe') } def sorted_folders(): return sorted([(x.pk, str(x)) for x in Folder.objects...
<commit_before>from django.forms import ModelForm, Textarea, ChoiceField from django.urls import reverse_lazy from .models import Meeting, Folder MD_INPUT = { 'class': 'markdown-input', 'data-endpoint': reverse_lazy('utilities:preview_safe') } def sorted_folders(): return sorted([(x.pk, str(x)) for x in...
dd9030413af99e05fe935a2dafb9a6012b09b248
modules/karma.py
modules/karma.py
import discord from modules.botModule import BotModule class Karma(BotModule): name = 'karma' description = 'Monitors messages for reactions and adds karma accordingly.' help_text = 'This module has no callable functions' trigger_string = '!reddit' module_db = 'karma.json' ...
import discord from modules.botModule import BotModule class Karma(BotModule): name = 'karma' description = 'Monitors messages for reactions and adds karma accordingly.' help_text = 'This module has no callable functions' trigger_string = '!reddit' module_db = 'karma.json' ...
Fix where db name should be used in db operations (name conflict!)
Fix where db name should be used in db operations (name conflict!)
Python
mit
suclearnub/scubot
import discord from modules.botModule import BotModule class Karma(BotModule): name = 'karma' description = 'Monitors messages for reactions and adds karma accordingly.' help_text = 'This module has no callable functions' trigger_string = '!reddit' module_db = 'karma.json' ...
import discord from modules.botModule import BotModule class Karma(BotModule): name = 'karma' description = 'Monitors messages for reactions and adds karma accordingly.' help_text = 'This module has no callable functions' trigger_string = '!reddit' module_db = 'karma.json' ...
<commit_before>import discord from modules.botModule import BotModule class Karma(BotModule): name = 'karma' description = 'Monitors messages for reactions and adds karma accordingly.' help_text = 'This module has no callable functions' trigger_string = '!reddit' module_db =...
import discord from modules.botModule import BotModule class Karma(BotModule): name = 'karma' description = 'Monitors messages for reactions and adds karma accordingly.' help_text = 'This module has no callable functions' trigger_string = '!reddit' module_db = 'karma.json' ...
import discord from modules.botModule import BotModule class Karma(BotModule): name = 'karma' description = 'Monitors messages for reactions and adds karma accordingly.' help_text = 'This module has no callable functions' trigger_string = '!reddit' module_db = 'karma.json' ...
<commit_before>import discord from modules.botModule import BotModule class Karma(BotModule): name = 'karma' description = 'Monitors messages for reactions and adds karma accordingly.' help_text = 'This module has no callable functions' trigger_string = '!reddit' module_db =...
20e293b49438a2428eee21bdc07799328a69ec48
dadd/worker/handlers.py
dadd/worker/handlers.py
import json import socket import requests from flask import request, jsonify from dadd.worker import app from dadd.worker.proc import ChildProcess @app.route('/run/', methods=['POST']) def run_process(): proc = ChildProcess(request.json) proc.run() return jsonify(proc.info()) @app.route('/register/',...
import os import json import socket import requests from flask import request, jsonify, Response, abort from dadd.worker import app from dadd.worker.proc import ChildProcess @app.route('/run/', methods=['POST']) def run_process(): proc = ChildProcess(request.json) proc.run() return jsonify(proc.info())...
Allow setting the HOSTNAME reported to the master via an env var; Stub and endpoint for tailing the log of a process assuming you know the path.
Allow setting the HOSTNAME reported to the master via an env var; Stub and endpoint for tailing the log of a process assuming you know the path. I'd like to get this log processing a bit more automatic but I need to spend more time in Dadd's API.
Python
bsd-3-clause
ionrock/dadd,ionrock/dadd,ionrock/dadd,ionrock/dadd
import json import socket import requests from flask import request, jsonify from dadd.worker import app from dadd.worker.proc import ChildProcess @app.route('/run/', methods=['POST']) def run_process(): proc = ChildProcess(request.json) proc.run() return jsonify(proc.info()) @app.route('/register/',...
import os import json import socket import requests from flask import request, jsonify, Response, abort from dadd.worker import app from dadd.worker.proc import ChildProcess @app.route('/run/', methods=['POST']) def run_process(): proc = ChildProcess(request.json) proc.run() return jsonify(proc.info())...
<commit_before>import json import socket import requests from flask import request, jsonify from dadd.worker import app from dadd.worker.proc import ChildProcess @app.route('/run/', methods=['POST']) def run_process(): proc = ChildProcess(request.json) proc.run() return jsonify(proc.info()) @app.rout...
import os import json import socket import requests from flask import request, jsonify, Response, abort from dadd.worker import app from dadd.worker.proc import ChildProcess @app.route('/run/', methods=['POST']) def run_process(): proc = ChildProcess(request.json) proc.run() return jsonify(proc.info())...
import json import socket import requests from flask import request, jsonify from dadd.worker import app from dadd.worker.proc import ChildProcess @app.route('/run/', methods=['POST']) def run_process(): proc = ChildProcess(request.json) proc.run() return jsonify(proc.info()) @app.route('/register/',...
<commit_before>import json import socket import requests from flask import request, jsonify from dadd.worker import app from dadd.worker.proc import ChildProcess @app.route('/run/', methods=['POST']) def run_process(): proc = ChildProcess(request.json) proc.run() return jsonify(proc.info()) @app.rout...
c74c38bb615d048eb26634c048a833ddc2da7d62
jcppy/__init__.py
jcppy/__init__.py
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # Copyright (c) 2017 Stanislav Ivochkin <isn@extrn.org> # License: MIT (see LICENSE for details) from jcppy._version import __version__, __revision__ from jcppy.header import header from jcppy.source import source
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # Copyright (c) 2017 Stanislav Ivochkin <isn@extrn.org> # License: MIT (see LICENSE for details) try: from jcppy._version import __version__, __revision__ except ImportError: __version__ = 'latest' __revision__ = 'latest' __hash__ = 'unknown' from jcppy.he...
Work around missing jcppy._version for local development
Work around missing jcppy._version for local development
Python
mit
isn-/jcppy,isn-/jcppy
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # Copyright (c) 2017 Stanislav Ivochkin <isn@extrn.org> # License: MIT (see LICENSE for details) from jcppy._version import __version__, __revision__ from jcppy.header import header from jcppy.source import source Work around missing jcppy._version for local development
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # Copyright (c) 2017 Stanislav Ivochkin <isn@extrn.org> # License: MIT (see LICENSE for details) try: from jcppy._version import __version__, __revision__ except ImportError: __version__ = 'latest' __revision__ = 'latest' __hash__ = 'unknown' from jcppy.he...
<commit_before>#!/usr/bin/env python3 # -*- coding: utf-8 -*- # Copyright (c) 2017 Stanislav Ivochkin <isn@extrn.org> # License: MIT (see LICENSE for details) from jcppy._version import __version__, __revision__ from jcppy.header import header from jcppy.source import source <commit_msg>Work around missing jcppy._vers...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # Copyright (c) 2017 Stanislav Ivochkin <isn@extrn.org> # License: MIT (see LICENSE for details) try: from jcppy._version import __version__, __revision__ except ImportError: __version__ = 'latest' __revision__ = 'latest' __hash__ = 'unknown' from jcppy.he...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # Copyright (c) 2017 Stanislav Ivochkin <isn@extrn.org> # License: MIT (see LICENSE for details) from jcppy._version import __version__, __revision__ from jcppy.header import header from jcppy.source import source Work around missing jcppy._version for local development#!...
<commit_before>#!/usr/bin/env python3 # -*- coding: utf-8 -*- # Copyright (c) 2017 Stanislav Ivochkin <isn@extrn.org> # License: MIT (see LICENSE for details) from jcppy._version import __version__, __revision__ from jcppy.header import header from jcppy.source import source <commit_msg>Work around missing jcppy._vers...
1379b3031e63330d03c85b0d1d22ce11c84bf5e9
telemetry/telemetry/core/browser_info.py
telemetry/telemetry/core/browser_info.py
# Copyright 2014 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. _check_webgl_supported_script = """ (function () { var c = document.createElement('canvas'); var gl = c.getContext('webgl'); if (gl == null) { gl =...
# Copyright 2014 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. _check_webgl_supported_script = """ (function () { var c = document.createElement('canvas'); var gl = c.getContext('webgl'); if (gl == null) { gl =...
Add a fling-driven variant of SimpleMobileSites
Add a fling-driven variant of SimpleMobileSites Create a basic pageset that uses the newly supported fling interaction, paralleling the existing SimpleMobileSites pageset that uses smooth scrolling. This should allow basic comparisons between touch scrolling and fling performance. More stressful fling-related pages wi...
Python
bsd-3-clause
benschmaus/catapult,SummerLW/Perf-Insight-Report,catapult-project/catapult,benschmaus/catapult,catapult-project/catapult-csm,catapult-project/catapult,catapult-project/catapult-csm,sahiljain/catapult,sahiljain/catapult,catapult-project/catapult-csm,sahiljain/catapult,SummerLW/Perf-Insight-Report,sahiljain/catapult,Summ...
# Copyright 2014 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. _check_webgl_supported_script = """ (function () { var c = document.createElement('canvas'); var gl = c.getContext('webgl'); if (gl == null) { gl =...
# Copyright 2014 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. _check_webgl_supported_script = """ (function () { var c = document.createElement('canvas'); var gl = c.getContext('webgl'); if (gl == null) { gl =...
<commit_before># Copyright 2014 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. _check_webgl_supported_script = """ (function () { var c = document.createElement('canvas'); var gl = c.getContext('webgl'); if (gl == n...
# Copyright 2014 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. _check_webgl_supported_script = """ (function () { var c = document.createElement('canvas'); var gl = c.getContext('webgl'); if (gl == null) { gl =...
# Copyright 2014 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. _check_webgl_supported_script = """ (function () { var c = document.createElement('canvas'); var gl = c.getContext('webgl'); if (gl == null) { gl =...
<commit_before># Copyright 2014 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. _check_webgl_supported_script = """ (function () { var c = document.createElement('canvas'); var gl = c.getContext('webgl'); if (gl == n...
2594433a32e03af15ca67002f2eb76227dd1f8c1
binstar_client/utils/notebook/__init__.py
binstar_client/utils/notebook/__init__.py
import os from binstar_client import errors from uploader import * def parse(handle): """ Handle can take the form of: notebook path/to/notebook[.ipynb] project:notebook[.ipynb] :param handle: String :return: (project, notebook) :raises: NotebookNotFound """ if ':'...
import os from binstar_client import errors from .uploader import * def parse(handle): """ Handle can take the form of: notebook path/to/notebook[.ipynb] project:notebook[.ipynb] :param handle: String :return: (project, notebook) :raises: NotebookNotFound """ if ':...
Fix relative import (compatible with p3
Fix relative import (compatible with p3
Python
bsd-3-clause
Anaconda-Platform/anaconda-client,Anaconda-Platform/anaconda-client,Anaconda-Platform/anaconda-client
import os from binstar_client import errors from uploader import * def parse(handle): """ Handle can take the form of: notebook path/to/notebook[.ipynb] project:notebook[.ipynb] :param handle: String :return: (project, notebook) :raises: NotebookNotFound """ if ':'...
import os from binstar_client import errors from .uploader import * def parse(handle): """ Handle can take the form of: notebook path/to/notebook[.ipynb] project:notebook[.ipynb] :param handle: String :return: (project, notebook) :raises: NotebookNotFound """ if ':...
<commit_before>import os from binstar_client import errors from uploader import * def parse(handle): """ Handle can take the form of: notebook path/to/notebook[.ipynb] project:notebook[.ipynb] :param handle: String :return: (project, notebook) :raises: NotebookNotFound ...
import os from binstar_client import errors from .uploader import * def parse(handle): """ Handle can take the form of: notebook path/to/notebook[.ipynb] project:notebook[.ipynb] :param handle: String :return: (project, notebook) :raises: NotebookNotFound """ if ':...
import os from binstar_client import errors from uploader import * def parse(handle): """ Handle can take the form of: notebook path/to/notebook[.ipynb] project:notebook[.ipynb] :param handle: String :return: (project, notebook) :raises: NotebookNotFound """ if ':'...
<commit_before>import os from binstar_client import errors from uploader import * def parse(handle): """ Handle can take the form of: notebook path/to/notebook[.ipynb] project:notebook[.ipynb] :param handle: String :return: (project, notebook) :raises: NotebookNotFound ...
810ae97b3b38a91c8ae3f87aca8479533a1784dd
{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/config/urls.py
{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/config/urls.py
import django.views.static from django.conf import settings from django.conf.urls import include, url from django.contrib import admin from django.contrib.staticfiles.urls import staticfiles_urlpatterns from django.views.generic import TemplateView admin.autodiscover() urlpatterns = [ url(r'^$', TemplateView.as_v...
import django.views.static from django.conf import settings from django.urls import include, path from django.contrib import admin from django.contrib.staticfiles.urls import staticfiles_urlpatterns from django.views.generic import TemplateView admin.autodiscover() urlpatterns = [ path('', TemplateView.as_view(te...
Use `path` helper for URLConf
Use `path` helper for URLConf
Python
mit
r0x73/django-template,r0x73/django-template,r0x73/django-template
import django.views.static from django.conf import settings from django.conf.urls import include, url from django.contrib import admin from django.contrib.staticfiles.urls import staticfiles_urlpatterns from django.views.generic import TemplateView admin.autodiscover() urlpatterns = [ url(r'^$', TemplateView.as_v...
import django.views.static from django.conf import settings from django.urls import include, path from django.contrib import admin from django.contrib.staticfiles.urls import staticfiles_urlpatterns from django.views.generic import TemplateView admin.autodiscover() urlpatterns = [ path('', TemplateView.as_view(te...
<commit_before>import django.views.static from django.conf import settings from django.conf.urls import include, url from django.contrib import admin from django.contrib.staticfiles.urls import staticfiles_urlpatterns from django.views.generic import TemplateView admin.autodiscover() urlpatterns = [ url(r'^$', Te...
import django.views.static from django.conf import settings from django.urls import include, path from django.contrib import admin from django.contrib.staticfiles.urls import staticfiles_urlpatterns from django.views.generic import TemplateView admin.autodiscover() urlpatterns = [ path('', TemplateView.as_view(te...
import django.views.static from django.conf import settings from django.conf.urls import include, url from django.contrib import admin from django.contrib.staticfiles.urls import staticfiles_urlpatterns from django.views.generic import TemplateView admin.autodiscover() urlpatterns = [ url(r'^$', TemplateView.as_v...
<commit_before>import django.views.static from django.conf import settings from django.conf.urls import include, url from django.contrib import admin from django.contrib.staticfiles.urls import staticfiles_urlpatterns from django.views.generic import TemplateView admin.autodiscover() urlpatterns = [ url(r'^$', Te...
f54db5d4e132fe1c227fe5bf1f7079772433429d
yunity/models/utils.py
yunity/models/utils.py
from django.db.models import Model, CharField, Field class MaxLengthCharField(CharField): def __init__(self, *args, **kwargs): kwargs['max_length'] = 255 super().__init__(*args, **kwargs) class BaseModel(Model): class Meta: abstract = True def _get_explicit_field_names(self): ...
from django.db.models import Model, CharField, Field class MaxLengthCharField(CharField): def __init__(self, *args, **kwargs): kwargs['max_length'] = 255 super().__init__(*args, **kwargs) class BaseModel(Model): class Meta: abstract = True def _get_explicit_field_names(self): ...
Add columns and values to repr
Add columns and values to repr
Python
agpl-3.0
yunity/yunity-core,yunity/foodsaving-backend,yunity/yunity-core,yunity/foodsaving-backend,yunity/foodsaving-backend
from django.db.models import Model, CharField, Field class MaxLengthCharField(CharField): def __init__(self, *args, **kwargs): kwargs['max_length'] = 255 super().__init__(*args, **kwargs) class BaseModel(Model): class Meta: abstract = True def _get_explicit_field_names(self): ...
from django.db.models import Model, CharField, Field class MaxLengthCharField(CharField): def __init__(self, *args, **kwargs): kwargs['max_length'] = 255 super().__init__(*args, **kwargs) class BaseModel(Model): class Meta: abstract = True def _get_explicit_field_names(self): ...
<commit_before>from django.db.models import Model, CharField, Field class MaxLengthCharField(CharField): def __init__(self, *args, **kwargs): kwargs['max_length'] = 255 super().__init__(*args, **kwargs) class BaseModel(Model): class Meta: abstract = True def _get_explicit_field_...
from django.db.models import Model, CharField, Field class MaxLengthCharField(CharField): def __init__(self, *args, **kwargs): kwargs['max_length'] = 255 super().__init__(*args, **kwargs) class BaseModel(Model): class Meta: abstract = True def _get_explicit_field_names(self): ...
from django.db.models import Model, CharField, Field class MaxLengthCharField(CharField): def __init__(self, *args, **kwargs): kwargs['max_length'] = 255 super().__init__(*args, **kwargs) class BaseModel(Model): class Meta: abstract = True def _get_explicit_field_names(self): ...
<commit_before>from django.db.models import Model, CharField, Field class MaxLengthCharField(CharField): def __init__(self, *args, **kwargs): kwargs['max_length'] = 255 super().__init__(*args, **kwargs) class BaseModel(Model): class Meta: abstract = True def _get_explicit_field_...
b2bc77023ed3e19f6f7483645e2a11952c061de0
tests/registryd/test_registry_startup.py
tests/registryd/test_registry_startup.py
PROPERTIES_IFACE = 'org.freedesktop.DBus.Properties' ACCESSIBLE_IFACE = 'org.a11y.atspi.Accessible' def test_accessible_iface_properties(registry, session_manager): val = registry.Get(ACCESSIBLE_IFACE, 'Name', dbus_interface=PROPERTIES_IFACE) assert str(val) == 'main'
PROPERTIES_IFACE = 'org.freedesktop.DBus.Properties' ACCESSIBLE_IFACE = 'org.a11y.atspi.Accessible' def get_property(proxy, iface_name, prop_name): return proxy.Get(iface_name, prop_name, dbus_interface=PROPERTIES_IFACE) def test_accessible_iface_properties(registry, session_manager): values = [ ('Nam...
Test the Description property of the registry's root
Test the Description property of the registry's root
Python
lgpl-2.1
GNOME/at-spi2-core,GNOME/at-spi2-core,GNOME/at-spi2-core
PROPERTIES_IFACE = 'org.freedesktop.DBus.Properties' ACCESSIBLE_IFACE = 'org.a11y.atspi.Accessible' def test_accessible_iface_properties(registry, session_manager): val = registry.Get(ACCESSIBLE_IFACE, 'Name', dbus_interface=PROPERTIES_IFACE) assert str(val) == 'main' Test the Description property of the regis...
PROPERTIES_IFACE = 'org.freedesktop.DBus.Properties' ACCESSIBLE_IFACE = 'org.a11y.atspi.Accessible' def get_property(proxy, iface_name, prop_name): return proxy.Get(iface_name, prop_name, dbus_interface=PROPERTIES_IFACE) def test_accessible_iface_properties(registry, session_manager): values = [ ('Nam...
<commit_before>PROPERTIES_IFACE = 'org.freedesktop.DBus.Properties' ACCESSIBLE_IFACE = 'org.a11y.atspi.Accessible' def test_accessible_iface_properties(registry, session_manager): val = registry.Get(ACCESSIBLE_IFACE, 'Name', dbus_interface=PROPERTIES_IFACE) assert str(val) == 'main' <commit_msg>Test the Descri...
PROPERTIES_IFACE = 'org.freedesktop.DBus.Properties' ACCESSIBLE_IFACE = 'org.a11y.atspi.Accessible' def get_property(proxy, iface_name, prop_name): return proxy.Get(iface_name, prop_name, dbus_interface=PROPERTIES_IFACE) def test_accessible_iface_properties(registry, session_manager): values = [ ('Nam...
PROPERTIES_IFACE = 'org.freedesktop.DBus.Properties' ACCESSIBLE_IFACE = 'org.a11y.atspi.Accessible' def test_accessible_iface_properties(registry, session_manager): val = registry.Get(ACCESSIBLE_IFACE, 'Name', dbus_interface=PROPERTIES_IFACE) assert str(val) == 'main' Test the Description property of the regis...
<commit_before>PROPERTIES_IFACE = 'org.freedesktop.DBus.Properties' ACCESSIBLE_IFACE = 'org.a11y.atspi.Accessible' def test_accessible_iface_properties(registry, session_manager): val = registry.Get(ACCESSIBLE_IFACE, 'Name', dbus_interface=PROPERTIES_IFACE) assert str(val) == 'main' <commit_msg>Test the Descri...
9231612c0631c784dc7188822b47a4bde38db488
uni_form/templatetags/uni_form_field.py
uni_form/templatetags/uni_form_field.py
from django import template register = template.Library() class_converter = { "textinput":"textinput textInput", "fileinput":"fileinput fileUpload", "passwordinput":"passwordinput textInput" } @register.filter def is_checkbox(field): return field.field.widget.__class__.__name__.lower() == "checkboxin...
from django import template register = template.Library() class_converter = { "textinput":"textinput textInput", "fileinput":"fileinput fileUpload", "passwordinput":"textinput textInput", >>>>>>> f85af74... Convert css class of PasswordInput widget:uni_form/templatetags/uni_form_field.py } @register.filt...
Convert css class of PasswordInput widget
Convert css class of PasswordInput widget
Python
mit
maraujop/django-crispy-forms,jtyoung/django-crispy-forms,ngenovictor/django-crispy-forms,saydulk/django-crispy-forms,carltongibson/django-crispy-forms,treyhunner/django-crispy-forms,dessibelle/django-crispy-forms,Stranger6667/django-crispy-forms,iris-edu-int/django-crispy-forms,spectras/django-crispy-forms,HungryCloud/...
from django import template register = template.Library() class_converter = { "textinput":"textinput textInput", "fileinput":"fileinput fileUpload", "passwordinput":"passwordinput textInput" } @register.filter def is_checkbox(field): return field.field.widget.__class__.__name__.lower() == "checkboxin...
from django import template register = template.Library() class_converter = { "textinput":"textinput textInput", "fileinput":"fileinput fileUpload", "passwordinput":"textinput textInput", >>>>>>> f85af74... Convert css class of PasswordInput widget:uni_form/templatetags/uni_form_field.py } @register.filt...
<commit_before>from django import template register = template.Library() class_converter = { "textinput":"textinput textInput", "fileinput":"fileinput fileUpload", "passwordinput":"passwordinput textInput" } @register.filter def is_checkbox(field): return field.field.widget.__class__.__name__.lower()...
from django import template register = template.Library() class_converter = { "textinput":"textinput textInput", "fileinput":"fileinput fileUpload", "passwordinput":"textinput textInput", >>>>>>> f85af74... Convert css class of PasswordInput widget:uni_form/templatetags/uni_form_field.py } @register.filt...
from django import template register = template.Library() class_converter = { "textinput":"textinput textInput", "fileinput":"fileinput fileUpload", "passwordinput":"passwordinput textInput" } @register.filter def is_checkbox(field): return field.field.widget.__class__.__name__.lower() == "checkboxin...
<commit_before>from django import template register = template.Library() class_converter = { "textinput":"textinput textInput", "fileinput":"fileinput fileUpload", "passwordinput":"passwordinput textInput" } @register.filter def is_checkbox(field): return field.field.widget.__class__.__name__.lower()...
efb1057b122664ee8e1ab0a06259988aa9f50092
experiments/management/commands/update_experiment_reports.py
experiments/management/commands/update_experiment_reports.py
import logging l=logging.getLogger(__name__) from django.conf import settings from django.core.management.base import BaseCommand, CommandError from experiments.reports import (EngagementReportGenerator, ConversionReportGenerator) class Command(BaseCommand): help = ('update_exper...
import logging l=logging.getLogger(__name__) from django.conf import settings from django.core.management.base import BaseCommand, CommandError from experiments.reports import (EngagementReportGenerator, ConversionReportGenerator) class Command(BaseCommand): help = ('update_exper...
Fix typos in exception messages and use less specific exception in management commands.
Fix typos in exception messages and use less specific exception in management commands.
Python
bsd-3-clause
e-loue/django-lean,MontmereLimited/django-lean,MontmereLimited/django-lean,uhuramedia/django-lean,MontmereLimited/django-lean,uhuramedia/django-lean,e-loue/django-lean,uhuramedia/django-lean
import logging l=logging.getLogger(__name__) from django.conf import settings from django.core.management.base import BaseCommand, CommandError from experiments.reports import (EngagementReportGenerator, ConversionReportGenerator) class Command(BaseCommand): help = ('update_exper...
import logging l=logging.getLogger(__name__) from django.conf import settings from django.core.management.base import BaseCommand, CommandError from experiments.reports import (EngagementReportGenerator, ConversionReportGenerator) class Command(BaseCommand): help = ('update_exper...
<commit_before>import logging l=logging.getLogger(__name__) from django.conf import settings from django.core.management.base import BaseCommand, CommandError from experiments.reports import (EngagementReportGenerator, ConversionReportGenerator) class Command(BaseCommand): help =...
import logging l=logging.getLogger(__name__) from django.conf import settings from django.core.management.base import BaseCommand, CommandError from experiments.reports import (EngagementReportGenerator, ConversionReportGenerator) class Command(BaseCommand): help = ('update_exper...
import logging l=logging.getLogger(__name__) from django.conf import settings from django.core.management.base import BaseCommand, CommandError from experiments.reports import (EngagementReportGenerator, ConversionReportGenerator) class Command(BaseCommand): help = ('update_exper...
<commit_before>import logging l=logging.getLogger(__name__) from django.conf import settings from django.core.management.base import BaseCommand, CommandError from experiments.reports import (EngagementReportGenerator, ConversionReportGenerator) class Command(BaseCommand): help =...
a1e6da688cc41f0dc4a22e546d076358bd626990
billjobs/tests/tests_export_account_email.py
billjobs/tests/tests_export_account_email.py
from django.test import TestCase from django.contrib.admin.sites import AdminSite from billjobs.admin import UserAdmin class EmailExportTestCase(TestCase): """ Tests for email account export """ def test_method_is_avaible(self): """ Test admin can select the action in dropdown list """ self.as...
from django.test import TestCase from django.contrib.admin.sites import AdminSite from billjobs.admin import UserAdmin class EmailExportTestCase(TestCase): """ Tests for email account export """ def test_method_is_avaible(self): """ Test admin can select the action in dropdown list """ self.as...
Test modelAdmin actions is present
Test modelAdmin actions is present
Python
mit
ioO/billjobs
from django.test import TestCase from django.contrib.admin.sites import AdminSite from billjobs.admin import UserAdmin class EmailExportTestCase(TestCase): """ Tests for email account export """ def test_method_is_avaible(self): """ Test admin can select the action in dropdown list """ self.as...
from django.test import TestCase from django.contrib.admin.sites import AdminSite from billjobs.admin import UserAdmin class EmailExportTestCase(TestCase): """ Tests for email account export """ def test_method_is_avaible(self): """ Test admin can select the action in dropdown list """ self.as...
<commit_before>from django.test import TestCase from django.contrib.admin.sites import AdminSite from billjobs.admin import UserAdmin class EmailExportTestCase(TestCase): """ Tests for email account export """ def test_method_is_avaible(self): """ Test admin can select the action in dropdown list """ ...
from django.test import TestCase from django.contrib.admin.sites import AdminSite from billjobs.admin import UserAdmin class EmailExportTestCase(TestCase): """ Tests for email account export """ def test_method_is_avaible(self): """ Test admin can select the action in dropdown list """ self.as...
from django.test import TestCase from django.contrib.admin.sites import AdminSite from billjobs.admin import UserAdmin class EmailExportTestCase(TestCase): """ Tests for email account export """ def test_method_is_avaible(self): """ Test admin can select the action in dropdown list """ self.as...
<commit_before>from django.test import TestCase from django.contrib.admin.sites import AdminSite from billjobs.admin import UserAdmin class EmailExportTestCase(TestCase): """ Tests for email account export """ def test_method_is_avaible(self): """ Test admin can select the action in dropdown list """ ...
055fa862e09c1a7c215e26034ad9da5998d90d0f
wafer/sponsors/templatetags/sponsors.py
wafer/sponsors/templatetags/sponsors.py
from django import template from wafer.sponsors.models import Sponsor, SponsorshipPackage register = template.Library() @register.inclusion_tag('wafer.sponsors/sponsors_block.html') def sponsors(): return { 'sponsors': Sponsor.objects.all().order_by('packages'), 'packages': SponsorshipPackage.ob...
from django import template from wafer.sponsors.models import Sponsor, SponsorshipPackage register = template.Library() @register.inclusion_tag('wafer.sponsors/sponsors_block.html') def sponsors(): return { 'sponsors': Sponsor.objects.all().order_by('packages'), 'packages': SponsorshipPackage.ob...
Add template tag to look up sponsor images
Add template tag to look up sponsor images
Python
isc
CTPUG/wafer,CTPUG/wafer,CTPUG/wafer,CTPUG/wafer
from django import template from wafer.sponsors.models import Sponsor, SponsorshipPackage register = template.Library() @register.inclusion_tag('wafer.sponsors/sponsors_block.html') def sponsors(): return { 'sponsors': Sponsor.objects.all().order_by('packages'), 'packages': SponsorshipPackage.ob...
from django import template from wafer.sponsors.models import Sponsor, SponsorshipPackage register = template.Library() @register.inclusion_tag('wafer.sponsors/sponsors_block.html') def sponsors(): return { 'sponsors': Sponsor.objects.all().order_by('packages'), 'packages': SponsorshipPackage.ob...
<commit_before>from django import template from wafer.sponsors.models import Sponsor, SponsorshipPackage register = template.Library() @register.inclusion_tag('wafer.sponsors/sponsors_block.html') def sponsors(): return { 'sponsors': Sponsor.objects.all().order_by('packages'), 'packages': Sponso...
from django import template from wafer.sponsors.models import Sponsor, SponsorshipPackage register = template.Library() @register.inclusion_tag('wafer.sponsors/sponsors_block.html') def sponsors(): return { 'sponsors': Sponsor.objects.all().order_by('packages'), 'packages': SponsorshipPackage.ob...
from django import template from wafer.sponsors.models import Sponsor, SponsorshipPackage register = template.Library() @register.inclusion_tag('wafer.sponsors/sponsors_block.html') def sponsors(): return { 'sponsors': Sponsor.objects.all().order_by('packages'), 'packages': SponsorshipPackage.ob...
<commit_before>from django import template from wafer.sponsors.models import Sponsor, SponsorshipPackage register = template.Library() @register.inclusion_tag('wafer.sponsors/sponsors_block.html') def sponsors(): return { 'sponsors': Sponsor.objects.all().order_by('packages'), 'packages': Sponso...
a703c68738385319b714b94ada39f847568b9d36
django_evolution/utils.py
django_evolution/utils.py
from django_evolution.db import evolver def write_sql(sql): "Output a list of SQL statements, unrolling parameters as required" for statement in sql: if isinstance(statement, tuple): print unicode(statement[0] % tuple(evolver.quote_sql_param(s) for s in statement[1])) else: ...
from django_evolution.db import evolver def write_sql(sql): "Output a list of SQL statements, unrolling parameters as required" for statement in sql: if isinstance(statement, tuple): print unicode(statement[0] % tuple(evolver.quote_sql_param(s) for s in statement[1])) else: ...
Revert a debugging change that slipped in.
Revert a debugging change that slipped in.
Python
bsd-3-clause
beanbaginc/django-evolution
from django_evolution.db import evolver def write_sql(sql): "Output a list of SQL statements, unrolling parameters as required" for statement in sql: if isinstance(statement, tuple): print unicode(statement[0] % tuple(evolver.quote_sql_param(s) for s in statement[1])) else: ...
from django_evolution.db import evolver def write_sql(sql): "Output a list of SQL statements, unrolling parameters as required" for statement in sql: if isinstance(statement, tuple): print unicode(statement[0] % tuple(evolver.quote_sql_param(s) for s in statement[1])) else: ...
<commit_before>from django_evolution.db import evolver def write_sql(sql): "Output a list of SQL statements, unrolling parameters as required" for statement in sql: if isinstance(statement, tuple): print unicode(statement[0] % tuple(evolver.quote_sql_param(s) for s in statement[1])) ...
from django_evolution.db import evolver def write_sql(sql): "Output a list of SQL statements, unrolling parameters as required" for statement in sql: if isinstance(statement, tuple): print unicode(statement[0] % tuple(evolver.quote_sql_param(s) for s in statement[1])) else: ...
from django_evolution.db import evolver def write_sql(sql): "Output a list of SQL statements, unrolling parameters as required" for statement in sql: if isinstance(statement, tuple): print unicode(statement[0] % tuple(evolver.quote_sql_param(s) for s in statement[1])) else: ...
<commit_before>from django_evolution.db import evolver def write_sql(sql): "Output a list of SQL statements, unrolling parameters as required" for statement in sql: if isinstance(statement, tuple): print unicode(statement[0] % tuple(evolver.quote_sql_param(s) for s in statement[1])) ...
384e2fd9ae794e182dfdf4072d2689cff5f5d91d
log4django/routers.py
log4django/routers.py
from .settings import CONNECTION_NAME class Log4DjangoRouter(object): def db_for_read(self, model, **hints): if model._meta.app_label == 'log4django': return CONNECTION_NAME return None def db_for_write(self, model, **hints): if model._meta.app_label == 'log4django': ...
from .settings import CONNECTION_NAME class Log4DjangoRouter(object): def db_for_read(self, model, **hints): if model._meta.app_label == 'log4django': return CONNECTION_NAME return None def db_for_write(self, model, **hints): if model._meta.app_label == 'log4django': ...
Fix syncdb in database router
Fix syncdb in database router
Python
bsd-3-clause
CodeScaleInc/log4django,CodeScaleInc/log4django,CodeScaleInc/log4django
from .settings import CONNECTION_NAME class Log4DjangoRouter(object): def db_for_read(self, model, **hints): if model._meta.app_label == 'log4django': return CONNECTION_NAME return None def db_for_write(self, model, **hints): if model._meta.app_label == 'log4django': ...
from .settings import CONNECTION_NAME class Log4DjangoRouter(object): def db_for_read(self, model, **hints): if model._meta.app_label == 'log4django': return CONNECTION_NAME return None def db_for_write(self, model, **hints): if model._meta.app_label == 'log4django': ...
<commit_before>from .settings import CONNECTION_NAME class Log4DjangoRouter(object): def db_for_read(self, model, **hints): if model._meta.app_label == 'log4django': return CONNECTION_NAME return None def db_for_write(self, model, **hints): if model._meta.app_label == 'log...
from .settings import CONNECTION_NAME class Log4DjangoRouter(object): def db_for_read(self, model, **hints): if model._meta.app_label == 'log4django': return CONNECTION_NAME return None def db_for_write(self, model, **hints): if model._meta.app_label == 'log4django': ...
from .settings import CONNECTION_NAME class Log4DjangoRouter(object): def db_for_read(self, model, **hints): if model._meta.app_label == 'log4django': return CONNECTION_NAME return None def db_for_write(self, model, **hints): if model._meta.app_label == 'log4django': ...
<commit_before>from .settings import CONNECTION_NAME class Log4DjangoRouter(object): def db_for_read(self, model, **hints): if model._meta.app_label == 'log4django': return CONNECTION_NAME return None def db_for_write(self, model, **hints): if model._meta.app_label == 'log...
97c6ea1cbbbe142b1005fb741ba1a0205a45189a
basket/news/tests/test_middleware.py
basket/news/tests/test_middleware.py
from basket.news.middleware import is_ip_address def test_is_ip_address(): assert is_ip_address('1.2.3.4') assert is_ip_address('192.168.1.1') assert not is_ip_address('basket.mozilla.org') assert not is_ip_address('42.basket.mozilla.org')
from django.test import RequestFactory, override_settings from mock import Mock from basket.news.middleware import EnforceHostnameMiddleware, is_ip_address def test_is_ip_address(): assert is_ip_address('1.2.3.4') assert is_ip_address('192.168.1.1') assert not is_ip_address('basket.mozilla.org') ass...
Add tests for enforce hostname middleware
Add tests for enforce hostname middleware
Python
mpl-2.0
glogiotatidis/basket,glogiotatidis/basket,glogiotatidis/basket
from basket.news.middleware import is_ip_address def test_is_ip_address(): assert is_ip_address('1.2.3.4') assert is_ip_address('192.168.1.1') assert not is_ip_address('basket.mozilla.org') assert not is_ip_address('42.basket.mozilla.org') Add tests for enforce hostname middleware
from django.test import RequestFactory, override_settings from mock import Mock from basket.news.middleware import EnforceHostnameMiddleware, is_ip_address def test_is_ip_address(): assert is_ip_address('1.2.3.4') assert is_ip_address('192.168.1.1') assert not is_ip_address('basket.mozilla.org') ass...
<commit_before>from basket.news.middleware import is_ip_address def test_is_ip_address(): assert is_ip_address('1.2.3.4') assert is_ip_address('192.168.1.1') assert not is_ip_address('basket.mozilla.org') assert not is_ip_address('42.basket.mozilla.org') <commit_msg>Add tests for enforce hostname midd...
from django.test import RequestFactory, override_settings from mock import Mock from basket.news.middleware import EnforceHostnameMiddleware, is_ip_address def test_is_ip_address(): assert is_ip_address('1.2.3.4') assert is_ip_address('192.168.1.1') assert not is_ip_address('basket.mozilla.org') ass...
from basket.news.middleware import is_ip_address def test_is_ip_address(): assert is_ip_address('1.2.3.4') assert is_ip_address('192.168.1.1') assert not is_ip_address('basket.mozilla.org') assert not is_ip_address('42.basket.mozilla.org') Add tests for enforce hostname middlewarefrom django.test impo...
<commit_before>from basket.news.middleware import is_ip_address def test_is_ip_address(): assert is_ip_address('1.2.3.4') assert is_ip_address('192.168.1.1') assert not is_ip_address('basket.mozilla.org') assert not is_ip_address('42.basket.mozilla.org') <commit_msg>Add tests for enforce hostname midd...
df01d83a35c59ee2295b358d8eceeb842adb568d
listings/admin.py
listings/admin.py
from django.contrib import admin from .models import Region, City, GatheringCenter, Resource admin.site.register(Region) admin.site.register(City) class PublishMixin(object): actions = ('publish', 'unpublish') def publish(self, request, queryset): queryset.update(published=True) def unpublish(...
from django.contrib import admin from .models import Region, City, GatheringCenter, Resource admin.site.register(Region) admin.site.register(City) class PublishMixin(object): actions = ('publish', 'unpublish') def publish(self, request, queryset): queryset.update(published=True) def unpublish(...
Order by create, don't filter
Order by create, don't filter
Python
apache-2.0
pony-revolution/helpothers,pony-revolution/helpothers,pony-revolution/helpothers
from django.contrib import admin from .models import Region, City, GatheringCenter, Resource admin.site.register(Region) admin.site.register(City) class PublishMixin(object): actions = ('publish', 'unpublish') def publish(self, request, queryset): queryset.update(published=True) def unpublish(...
from django.contrib import admin from .models import Region, City, GatheringCenter, Resource admin.site.register(Region) admin.site.register(City) class PublishMixin(object): actions = ('publish', 'unpublish') def publish(self, request, queryset): queryset.update(published=True) def unpublish(...
<commit_before>from django.contrib import admin from .models import Region, City, GatheringCenter, Resource admin.site.register(Region) admin.site.register(City) class PublishMixin(object): actions = ('publish', 'unpublish') def publish(self, request, queryset): queryset.update(published=True) ...
from django.contrib import admin from .models import Region, City, GatheringCenter, Resource admin.site.register(Region) admin.site.register(City) class PublishMixin(object): actions = ('publish', 'unpublish') def publish(self, request, queryset): queryset.update(published=True) def unpublish(...
from django.contrib import admin from .models import Region, City, GatheringCenter, Resource admin.site.register(Region) admin.site.register(City) class PublishMixin(object): actions = ('publish', 'unpublish') def publish(self, request, queryset): queryset.update(published=True) def unpublish(...
<commit_before>from django.contrib import admin from .models import Region, City, GatheringCenter, Resource admin.site.register(Region) admin.site.register(City) class PublishMixin(object): actions = ('publish', 'unpublish') def publish(self, request, queryset): queryset.update(published=True) ...
6758a6f3f62441d21747d1faedb45fc059dc37dc
models/product.py
models/product.py
from sqlalchemy import Column, ForeignKey, Integer, String from sqlalchemy.orm import relationship from models.base import Base from models.user import User from models.store import Store class Product(Base): __tablename__ = "product" __table_args__ = {'sqlite_autoincrement': True} id = Column(Integer, primary_ke...
from sqlalchemy import Column, ForeignKey, Integer, String from sqlalchemy.orm import relationship from models.base import Base from models.user import User from models.store import Store class Product(Base): __tablename__ = "product" __table_args__ = {'sqlite_autoincrement': True} id = Column(Integer, primary_ke...
Correct the character limit for descriptions
bug: Correct the character limit for descriptions
Python
mit
caasted/aws-flask-catalog-app,caasted/aws-flask-catalog-app
from sqlalchemy import Column, ForeignKey, Integer, String from sqlalchemy.orm import relationship from models.base import Base from models.user import User from models.store import Store class Product(Base): __tablename__ = "product" __table_args__ = {'sqlite_autoincrement': True} id = Column(Integer, primary_ke...
from sqlalchemy import Column, ForeignKey, Integer, String from sqlalchemy.orm import relationship from models.base import Base from models.user import User from models.store import Store class Product(Base): __tablename__ = "product" __table_args__ = {'sqlite_autoincrement': True} id = Column(Integer, primary_ke...
<commit_before>from sqlalchemy import Column, ForeignKey, Integer, String from sqlalchemy.orm import relationship from models.base import Base from models.user import User from models.store import Store class Product(Base): __tablename__ = "product" __table_args__ = {'sqlite_autoincrement': True} id = Column(Inte...
from sqlalchemy import Column, ForeignKey, Integer, String from sqlalchemy.orm import relationship from models.base import Base from models.user import User from models.store import Store class Product(Base): __tablename__ = "product" __table_args__ = {'sqlite_autoincrement': True} id = Column(Integer, primary_ke...
from sqlalchemy import Column, ForeignKey, Integer, String from sqlalchemy.orm import relationship from models.base import Base from models.user import User from models.store import Store class Product(Base): __tablename__ = "product" __table_args__ = {'sqlite_autoincrement': True} id = Column(Integer, primary_ke...
<commit_before>from sqlalchemy import Column, ForeignKey, Integer, String from sqlalchemy.orm import relationship from models.base import Base from models.user import User from models.store import Store class Product(Base): __tablename__ = "product" __table_args__ = {'sqlite_autoincrement': True} id = Column(Inte...
19ce87dd98c65338a35a4f81c3210745d330fc4c
data/tests/test_data.py
data/tests/test_data.py
from __future__ import absolute_import, division, print_function import os, sys, tempfile sys.path.append("data/") import data try: from urllib.request import urlopen except ImportError: from urllib2 import urlopen def test_check_hashes(): with tempfile.NamedTemporaryFile() as temp: temp.write(b'...
from __future__ import absolute_import, division, print_function import os, sys, tempfile from data import data try: from urllib.request import urlopen except ImportError: from urllib2 import urlopen def test_check_hashes(): with tempfile.NamedTemporaryFile() as temp: temp.write(b'Some data') ...
Fix build exitting from make coverage
Fix build exitting from make coverage
Python
bsd-3-clause
berkeley-stat159/project-delta
from __future__ import absolute_import, division, print_function import os, sys, tempfile sys.path.append("data/") import data try: from urllib.request import urlopen except ImportError: from urllib2 import urlopen def test_check_hashes(): with tempfile.NamedTemporaryFile() as temp: temp.write(b'...
from __future__ import absolute_import, division, print_function import os, sys, tempfile from data import data try: from urllib.request import urlopen except ImportError: from urllib2 import urlopen def test_check_hashes(): with tempfile.NamedTemporaryFile() as temp: temp.write(b'Some data') ...
<commit_before>from __future__ import absolute_import, division, print_function import os, sys, tempfile sys.path.append("data/") import data try: from urllib.request import urlopen except ImportError: from urllib2 import urlopen def test_check_hashes(): with tempfile.NamedTemporaryFile() as temp: ...
from __future__ import absolute_import, division, print_function import os, sys, tempfile from data import data try: from urllib.request import urlopen except ImportError: from urllib2 import urlopen def test_check_hashes(): with tempfile.NamedTemporaryFile() as temp: temp.write(b'Some data') ...
from __future__ import absolute_import, division, print_function import os, sys, tempfile sys.path.append("data/") import data try: from urllib.request import urlopen except ImportError: from urllib2 import urlopen def test_check_hashes(): with tempfile.NamedTemporaryFile() as temp: temp.write(b'...
<commit_before>from __future__ import absolute_import, division, print_function import os, sys, tempfile sys.path.append("data/") import data try: from urllib.request import urlopen except ImportError: from urllib2 import urlopen def test_check_hashes(): with tempfile.NamedTemporaryFile() as temp: ...
d13896e05922d6d57e552719963e6918cef981d0
democracylab/logging.py
democracylab/logging.py
import copy import logging import traceback def dump(obj): for attr in dir(obj): print("obj.%s = %r" % (attr, getattr(obj, attr))) def dump_request_summary(request): user = request.user.username if request.user.is_authenticated() else '' url = request.path method = request.method body = ...
import copy import logging import traceback def dump(obj): for attr in dir(obj): print("obj.%s = %r" % (attr, getattr(obj, attr))) def dump_request_summary(request): user = request.user.username if request.user.is_authenticated() else '' url = request.path method = request.method body = ...
Fix django logger issue when error has no attached request object
Fix django logger issue when error has no attached request object
Python
mit
DemocracyLab/CivicTechExchange,DemocracyLab/CivicTechExchange,DemocracyLab/CivicTechExchange,DemocracyLab/CivicTechExchange
import copy import logging import traceback def dump(obj): for attr in dir(obj): print("obj.%s = %r" % (attr, getattr(obj, attr))) def dump_request_summary(request): user = request.user.username if request.user.is_authenticated() else '' url = request.path method = request.method body = ...
import copy import logging import traceback def dump(obj): for attr in dir(obj): print("obj.%s = %r" % (attr, getattr(obj, attr))) def dump_request_summary(request): user = request.user.username if request.user.is_authenticated() else '' url = request.path method = request.method body = ...
<commit_before>import copy import logging import traceback def dump(obj): for attr in dir(obj): print("obj.%s = %r" % (attr, getattr(obj, attr))) def dump_request_summary(request): user = request.user.username if request.user.is_authenticated() else '' url = request.path method = request.met...
import copy import logging import traceback def dump(obj): for attr in dir(obj): print("obj.%s = %r" % (attr, getattr(obj, attr))) def dump_request_summary(request): user = request.user.username if request.user.is_authenticated() else '' url = request.path method = request.method body = ...
import copy import logging import traceback def dump(obj): for attr in dir(obj): print("obj.%s = %r" % (attr, getattr(obj, attr))) def dump_request_summary(request): user = request.user.username if request.user.is_authenticated() else '' url = request.path method = request.method body = ...
<commit_before>import copy import logging import traceback def dump(obj): for attr in dir(obj): print("obj.%s = %r" % (attr, getattr(obj, attr))) def dump_request_summary(request): user = request.user.username if request.user.is_authenticated() else '' url = request.path method = request.met...
cdef62151437e9bf1187b955ad212d9d32e007e3
django_olcc/olcc/api.py
django_olcc/olcc/api.py
from tastypie.resources import ModelResource from olcc.models import Product, ProductPrice, Store class ProductResource(ModelResource): class Meta: queryset = Product.objects.all() resource_name = 'product' class ProductPriceResource(ModelResource): class Meta: queryset = ProductPrice....
from tastypie import fields from tastypie.resources import ModelResource, ALL from olcc.models import Product, ProductPrice, Store class ProductResource(ModelResource): class Meta: queryset = Product.objects.all() resource_name = 'product' allowed_methods = ['get'] filtering = { ...
Tweak the tastypie resource configuration.
Tweak the tastypie resource configuration.
Python
mit
twaddington/django-olcc,twaddington/django-olcc,twaddington/django-olcc
from tastypie.resources import ModelResource from olcc.models import Product, ProductPrice, Store class ProductResource(ModelResource): class Meta: queryset = Product.objects.all() resource_name = 'product' class ProductPriceResource(ModelResource): class Meta: queryset = ProductPrice....
from tastypie import fields from tastypie.resources import ModelResource, ALL from olcc.models import Product, ProductPrice, Store class ProductResource(ModelResource): class Meta: queryset = Product.objects.all() resource_name = 'product' allowed_methods = ['get'] filtering = { ...
<commit_before>from tastypie.resources import ModelResource from olcc.models import Product, ProductPrice, Store class ProductResource(ModelResource): class Meta: queryset = Product.objects.all() resource_name = 'product' class ProductPriceResource(ModelResource): class Meta: queryset ...
from tastypie import fields from tastypie.resources import ModelResource, ALL from olcc.models import Product, ProductPrice, Store class ProductResource(ModelResource): class Meta: queryset = Product.objects.all() resource_name = 'product' allowed_methods = ['get'] filtering = { ...
from tastypie.resources import ModelResource from olcc.models import Product, ProductPrice, Store class ProductResource(ModelResource): class Meta: queryset = Product.objects.all() resource_name = 'product' class ProductPriceResource(ModelResource): class Meta: queryset = ProductPrice....
<commit_before>from tastypie.resources import ModelResource from olcc.models import Product, ProductPrice, Store class ProductResource(ModelResource): class Meta: queryset = Product.objects.all() resource_name = 'product' class ProductPriceResource(ModelResource): class Meta: queryset ...
c3a6554ce24781a3eaa9229f9609a09e4e018069
lcd_restful/__main__.py
lcd_restful/__main__.py
#!/usr/bin/env python import sys from getopt import getopt, GetoptError from .api import Server from .fake import FakeLcdApi USAGE = """\ Usage %s [-h|--help] \t-h or --help\tThis help message """ def get_args(args): try: opts, args = getopt(args[1:], 'hf', ['help', 'fake']) except GetoptError as e...
#!/usr/bin/env python import sys from getopt import getopt, GetoptError from .api import Server from .lcd import Lcd USAGE = """\ Usage %s [-h|--help] [-f|--fake] \t-h or --help\tThis help message \t-f or --fake\tIf on RPi, use FakeHw """ def get_args(args): arg0 = args[0] try: opts, args = getopt(...
Update main Lcd import and init, and fix help msg
Update main Lcd import and init, and fix help msg
Python
mit
rfarley3/lcd-restful,rfarley3/lcd-restful
#!/usr/bin/env python import sys from getopt import getopt, GetoptError from .api import Server from .fake import FakeLcdApi USAGE = """\ Usage %s [-h|--help] \t-h or --help\tThis help message """ def get_args(args): try: opts, args = getopt(args[1:], 'hf', ['help', 'fake']) except GetoptError as e...
#!/usr/bin/env python import sys from getopt import getopt, GetoptError from .api import Server from .lcd import Lcd USAGE = """\ Usage %s [-h|--help] [-f|--fake] \t-h or --help\tThis help message \t-f or --fake\tIf on RPi, use FakeHw """ def get_args(args): arg0 = args[0] try: opts, args = getopt(...
<commit_before>#!/usr/bin/env python import sys from getopt import getopt, GetoptError from .api import Server from .fake import FakeLcdApi USAGE = """\ Usage %s [-h|--help] \t-h or --help\tThis help message """ def get_args(args): try: opts, args = getopt(args[1:], 'hf', ['help', 'fake']) except G...
#!/usr/bin/env python import sys from getopt import getopt, GetoptError from .api import Server from .lcd import Lcd USAGE = """\ Usage %s [-h|--help] [-f|--fake] \t-h or --help\tThis help message \t-f or --fake\tIf on RPi, use FakeHw """ def get_args(args): arg0 = args[0] try: opts, args = getopt(...
#!/usr/bin/env python import sys from getopt import getopt, GetoptError from .api import Server from .fake import FakeLcdApi USAGE = """\ Usage %s [-h|--help] \t-h or --help\tThis help message """ def get_args(args): try: opts, args = getopt(args[1:], 'hf', ['help', 'fake']) except GetoptError as e...
<commit_before>#!/usr/bin/env python import sys from getopt import getopt, GetoptError from .api import Server from .fake import FakeLcdApi USAGE = """\ Usage %s [-h|--help] \t-h or --help\tThis help message """ def get_args(args): try: opts, args = getopt(args[1:], 'hf', ['help', 'fake']) except G...
172175811e6532d23586e54c5b48032e52745f35
fjord/api_auth/migrations/0001_initial.py
fjord/api_auth/migrations/0001_initial.py
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ] operations = [ migrations.CreateModel( name='Token', fields=[ ('token', models.CharField(hel...
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ] operations = [ migrations.CreateModel( name='Token', fields=[ ('token', models.CharField(hel...
Update help_text in api_auth initial migration
Update help_text in api_auth initial migration I'm updating the help_text in the original migration rather than creating a new migration that doesn't affect the db, but does do a bunch of SQL stuff in the migration.
Python
bsd-3-clause
hoosteeno/fjord,staranjeet/fjord,rlr/fjord,mozilla/fjord,lgp171188/fjord,rlr/fjord,rlr/fjord,Ritsyy/fjord,mozilla/fjord,Ritsyy/fjord,staranjeet/fjord,staranjeet/fjord,staranjeet/fjord,lgp171188/fjord,lgp171188/fjord,mozilla/fjord,hoosteeno/fjord,hoosteeno/fjord,Ritsyy/fjord,lgp171188/fjord,mozilla/fjord,rlr/fjord,hoost...
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ] operations = [ migrations.CreateModel( name='Token', fields=[ ('token', models.CharField(hel...
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ] operations = [ migrations.CreateModel( name='Token', fields=[ ('token', models.CharField(hel...
<commit_before># -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ] operations = [ migrations.CreateModel( name='Token', fields=[ ('token', model...
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ] operations = [ migrations.CreateModel( name='Token', fields=[ ('token', models.CharField(hel...
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ] operations = [ migrations.CreateModel( name='Token', fields=[ ('token', models.CharField(hel...
<commit_before># -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ] operations = [ migrations.CreateModel( name='Token', fields=[ ('token', model...
596a29505351ec0e497cbe114a6e4d57d7cbada6
backoff/__init__.py
backoff/__init__.py
# coding:utf-8 """ Function decoration for backoff and retry This module provides function decorators which can be used to wrap a function such that it will be retried until some condition is met. It is meant to be of use when accessing unreliable resources with the potential for intermittent failures i.e. network res...
# coding:utf-8 """ Function decoration for backoff and retry This module provides function decorators which can be used to wrap a function such that it will be retried until some condition is met. It is meant to be of use when accessing unreliable resources with the potential for intermittent failures i.e. network res...
Use importlib.metadata to set __version__
Use importlib.metadata to set __version__ This way we don't have to remember to update the version in two places every release. The version will only need to be set in pyproject.toml
Python
mit
litl/backoff
# coding:utf-8 """ Function decoration for backoff and retry This module provides function decorators which can be used to wrap a function such that it will be retried until some condition is met. It is meant to be of use when accessing unreliable resources with the potential for intermittent failures i.e. network res...
# coding:utf-8 """ Function decoration for backoff and retry This module provides function decorators which can be used to wrap a function such that it will be retried until some condition is met. It is meant to be of use when accessing unreliable resources with the potential for intermittent failures i.e. network res...
<commit_before># coding:utf-8 """ Function decoration for backoff and retry This module provides function decorators which can be used to wrap a function such that it will be retried until some condition is met. It is meant to be of use when accessing unreliable resources with the potential for intermittent failures i...
# coding:utf-8 """ Function decoration for backoff and retry This module provides function decorators which can be used to wrap a function such that it will be retried until some condition is met. It is meant to be of use when accessing unreliable resources with the potential for intermittent failures i.e. network res...
# coding:utf-8 """ Function decoration for backoff and retry This module provides function decorators which can be used to wrap a function such that it will be retried until some condition is met. It is meant to be of use when accessing unreliable resources with the potential for intermittent failures i.e. network res...
<commit_before># coding:utf-8 """ Function decoration for backoff and retry This module provides function decorators which can be used to wrap a function such that it will be retried until some condition is met. It is meant to be of use when accessing unreliable resources with the potential for intermittent failures i...
2c8dafec701d80ddd9a3d1855a14a8eef0c44790
tests/modules/contrib/test_network_traffic.py
tests/modules/contrib/test_network_traffic.py
import pytest pytest.importorskip("psutil") pytest.importorskip("netifaces") def test_load_module(): __import__("modules.contrib.network_traffic")
import pytest from unittest import TestCase, mock import core.config import core.widget import modules.contrib.network_traffic from types import SimpleNamespace pytest.importorskip("psutil") pytest.importorskip("netifaces") def io_counters_mock(recv, sent): return { 'lo': SimpleNamespace( by...
Add Network Traffic module tests
Add Network Traffic module tests
Python
mit
tobi-wan-kenobi/bumblebee-status,tobi-wan-kenobi/bumblebee-status
import pytest pytest.importorskip("psutil") pytest.importorskip("netifaces") def test_load_module(): __import__("modules.contrib.network_traffic") Add Network Traffic module tests
import pytest from unittest import TestCase, mock import core.config import core.widget import modules.contrib.network_traffic from types import SimpleNamespace pytest.importorskip("psutil") pytest.importorskip("netifaces") def io_counters_mock(recv, sent): return { 'lo': SimpleNamespace( by...
<commit_before>import pytest pytest.importorskip("psutil") pytest.importorskip("netifaces") def test_load_module(): __import__("modules.contrib.network_traffic") <commit_msg>Add Network Traffic module tests<commit_after>
import pytest from unittest import TestCase, mock import core.config import core.widget import modules.contrib.network_traffic from types import SimpleNamespace pytest.importorskip("psutil") pytest.importorskip("netifaces") def io_counters_mock(recv, sent): return { 'lo': SimpleNamespace( by...
import pytest pytest.importorskip("psutil") pytest.importorskip("netifaces") def test_load_module(): __import__("modules.contrib.network_traffic") Add Network Traffic module testsimport pytest from unittest import TestCase, mock import core.config import core.widget import modules.contrib.network_traffic from...
<commit_before>import pytest pytest.importorskip("psutil") pytest.importorskip("netifaces") def test_load_module(): __import__("modules.contrib.network_traffic") <commit_msg>Add Network Traffic module tests<commit_after>import pytest from unittest import TestCase, mock import core.config import core.widget imp...
7c494c9216247d4480f2b293947b75947b1fcb01
readme_renderer/__main__.py
readme_renderer/__main__.py
from __future__ import absolute_import, print_function from readme_renderer.rst import render import sys if len(sys.argv) == 2: with open(sys.argv[1]) as fp: out = render(fp.read(), stream=sys.stderr) if out is not None: print(out) else: sys.exit(1) else: print(...
from __future__ import absolute_import, print_function import argparse from readme_renderer.rst import render import sys if __name__ == '__main__': parser = argparse.ArgumentParser( description="Renders a .rst README to HTML", ) parser.add_argument('input', help="Input README file") parser.add...
Use `if __name__` and argparse
Use `if __name__` and argparse
Python
apache-2.0
pypa/readme_renderer,pypa/readme
from __future__ import absolute_import, print_function from readme_renderer.rst import render import sys if len(sys.argv) == 2: with open(sys.argv[1]) as fp: out = render(fp.read(), stream=sys.stderr) if out is not None: print(out) else: sys.exit(1) else: print(...
from __future__ import absolute_import, print_function import argparse from readme_renderer.rst import render import sys if __name__ == '__main__': parser = argparse.ArgumentParser( description="Renders a .rst README to HTML", ) parser.add_argument('input', help="Input README file") parser.add...
<commit_before>from __future__ import absolute_import, print_function from readme_renderer.rst import render import sys if len(sys.argv) == 2: with open(sys.argv[1]) as fp: out = render(fp.read(), stream=sys.stderr) if out is not None: print(out) else: sys.exit(1) e...
from __future__ import absolute_import, print_function import argparse from readme_renderer.rst import render import sys if __name__ == '__main__': parser = argparse.ArgumentParser( description="Renders a .rst README to HTML", ) parser.add_argument('input', help="Input README file") parser.add...
from __future__ import absolute_import, print_function from readme_renderer.rst import render import sys if len(sys.argv) == 2: with open(sys.argv[1]) as fp: out = render(fp.read(), stream=sys.stderr) if out is not None: print(out) else: sys.exit(1) else: print(...
<commit_before>from __future__ import absolute_import, print_function from readme_renderer.rst import render import sys if len(sys.argv) == 2: with open(sys.argv[1]) as fp: out = render(fp.read(), stream=sys.stderr) if out is not None: print(out) else: sys.exit(1) e...
4a8292f2c01323743cc41cbff4c9dfe0e4203f25
comics/accounts/models.py
comics/accounts/models.py
import uuid from django.contrib.auth.models import User from django.db import models from django.dispatch import receiver @receiver(models.signals.post_save, sender=User) def create_user_profile(sender, instance, created, **kwargs): UserProfile.objects.get_or_create(user=instance) class UserProfile(models.Mode...
import uuid from django.contrib.auth.models import User from django.db import models from django.dispatch import receiver @receiver(models.signals.post_save, sender=User) def create_user_profile(sender, instance, created, **kwargs): if created: UserProfile.objects.create(user=instance) class UserProfile...
Remove conditional sql-select on new user creation
Remove conditional sql-select on new user creation Only create a user profile if a new user is actually created.
Python
agpl-3.0
datagutten/comics,datagutten/comics,jodal/comics,jodal/comics,datagutten/comics,datagutten/comics,jodal/comics,jodal/comics
import uuid from django.contrib.auth.models import User from django.db import models from django.dispatch import receiver @receiver(models.signals.post_save, sender=User) def create_user_profile(sender, instance, created, **kwargs): UserProfile.objects.get_or_create(user=instance) class UserProfile(models.Mode...
import uuid from django.contrib.auth.models import User from django.db import models from django.dispatch import receiver @receiver(models.signals.post_save, sender=User) def create_user_profile(sender, instance, created, **kwargs): if created: UserProfile.objects.create(user=instance) class UserProfile...
<commit_before>import uuid from django.contrib.auth.models import User from django.db import models from django.dispatch import receiver @receiver(models.signals.post_save, sender=User) def create_user_profile(sender, instance, created, **kwargs): UserProfile.objects.get_or_create(user=instance) class UserProf...
import uuid from django.contrib.auth.models import User from django.db import models from django.dispatch import receiver @receiver(models.signals.post_save, sender=User) def create_user_profile(sender, instance, created, **kwargs): if created: UserProfile.objects.create(user=instance) class UserProfile...
import uuid from django.contrib.auth.models import User from django.db import models from django.dispatch import receiver @receiver(models.signals.post_save, sender=User) def create_user_profile(sender, instance, created, **kwargs): UserProfile.objects.get_or_create(user=instance) class UserProfile(models.Mode...
<commit_before>import uuid from django.contrib.auth.models import User from django.db import models from django.dispatch import receiver @receiver(models.signals.post_save, sender=User) def create_user_profile(sender, instance, created, **kwargs): UserProfile.objects.get_or_create(user=instance) class UserProf...
7443217044931466618e4ed8065b03dd7c08b05d
integration-test/990-add-art-galleries.py
integration-test/990-add-art-galleries.py
# http://www.openstreetmap.org/node/2026996113 assert_has_feature( 16, 10485, 25328, 'pois', { 'id': 2026996113, 'kind': 'gallery', 'min_zoom': 17 }) # http://www.openstreetmap.org/way/31510288 assert_has_feature( 15, 16371, 10895, 'pois', { 'id': 31510288, 'kind': 'gallery' })
# http://www.openstreetmap.org/node/2026996113 assert_has_feature( 16, 10485, 25328, 'pois', { 'id': 2026996113, 'kind': 'gallery', 'min_zoom': 17 }) # https://www.openstreetmap.org/way/83488820 assert_has_feature( 15, 16370, 10894, 'pois', { 'id': 83488820, 'kind': 'gallery' })
Update tests to deal with changeset 41943013, in which the Royal Academy of Arts was changed to a museum.
Update tests to deal with changeset 41943013, in which the Royal Academy of Arts was changed to a museum.
Python
mit
mapzen/vector-datasource,mapzen/vector-datasource,mapzen/vector-datasource
# http://www.openstreetmap.org/node/2026996113 assert_has_feature( 16, 10485, 25328, 'pois', { 'id': 2026996113, 'kind': 'gallery', 'min_zoom': 17 }) # http://www.openstreetmap.org/way/31510288 assert_has_feature( 15, 16371, 10895, 'pois', { 'id': 31510288, 'kind': 'gallery' }) Update tests to deal wit...
# http://www.openstreetmap.org/node/2026996113 assert_has_feature( 16, 10485, 25328, 'pois', { 'id': 2026996113, 'kind': 'gallery', 'min_zoom': 17 }) # https://www.openstreetmap.org/way/83488820 assert_has_feature( 15, 16370, 10894, 'pois', { 'id': 83488820, 'kind': 'gallery' })
<commit_before># http://www.openstreetmap.org/node/2026996113 assert_has_feature( 16, 10485, 25328, 'pois', { 'id': 2026996113, 'kind': 'gallery', 'min_zoom': 17 }) # http://www.openstreetmap.org/way/31510288 assert_has_feature( 15, 16371, 10895, 'pois', { 'id': 31510288, 'kind': 'gallery' }) <commit_m...
# http://www.openstreetmap.org/node/2026996113 assert_has_feature( 16, 10485, 25328, 'pois', { 'id': 2026996113, 'kind': 'gallery', 'min_zoom': 17 }) # https://www.openstreetmap.org/way/83488820 assert_has_feature( 15, 16370, 10894, 'pois', { 'id': 83488820, 'kind': 'gallery' })
# http://www.openstreetmap.org/node/2026996113 assert_has_feature( 16, 10485, 25328, 'pois', { 'id': 2026996113, 'kind': 'gallery', 'min_zoom': 17 }) # http://www.openstreetmap.org/way/31510288 assert_has_feature( 15, 16371, 10895, 'pois', { 'id': 31510288, 'kind': 'gallery' }) Update tests to deal wit...
<commit_before># http://www.openstreetmap.org/node/2026996113 assert_has_feature( 16, 10485, 25328, 'pois', { 'id': 2026996113, 'kind': 'gallery', 'min_zoom': 17 }) # http://www.openstreetmap.org/way/31510288 assert_has_feature( 15, 16371, 10895, 'pois', { 'id': 31510288, 'kind': 'gallery' }) <commit_m...
46f2b508eb5f4350a06bdf832c7481ad8d8aab33
node/multi_var.py
node/multi_var.py
from nodes import Node class MultiVar(Node): char = "'" args = 0 results = None contents = -1 def __init__(self, node_1: Node.NodeSingle, node_2: Node.NodeSingle): self.node_1 = node_1 self.node_2 = node_2 self.args = max([node_1.args, node_2.args]) def pr...
from nodes import Node class MultiVar(Node): char = "'" args = 0 results = None contents = -1 def __init__(self, node_1: Node.NodeSingle, node_2: Node.NodeSingle): self.node_1 = node_1 self.node_2 = node_2 def prepare(self, stack): self.node_1.prepare(stac...
Fix multivar for nodes with variable length stacks
Fix multivar for nodes with variable length stacks
Python
mit
muddyfish/PYKE,muddyfish/PYKE
from nodes import Node class MultiVar(Node): char = "'" args = 0 results = None contents = -1 def __init__(self, node_1: Node.NodeSingle, node_2: Node.NodeSingle): self.node_1 = node_1 self.node_2 = node_2 self.args = max([node_1.args, node_2.args]) def pr...
from nodes import Node class MultiVar(Node): char = "'" args = 0 results = None contents = -1 def __init__(self, node_1: Node.NodeSingle, node_2: Node.NodeSingle): self.node_1 = node_1 self.node_2 = node_2 def prepare(self, stack): self.node_1.prepare(stac...
<commit_before> from nodes import Node class MultiVar(Node): char = "'" args = 0 results = None contents = -1 def __init__(self, node_1: Node.NodeSingle, node_2: Node.NodeSingle): self.node_1 = node_1 self.node_2 = node_2 self.args = max([node_1.args, node_2.args]) ...
from nodes import Node class MultiVar(Node): char = "'" args = 0 results = None contents = -1 def __init__(self, node_1: Node.NodeSingle, node_2: Node.NodeSingle): self.node_1 = node_1 self.node_2 = node_2 def prepare(self, stack): self.node_1.prepare(stac...
from nodes import Node class MultiVar(Node): char = "'" args = 0 results = None contents = -1 def __init__(self, node_1: Node.NodeSingle, node_2: Node.NodeSingle): self.node_1 = node_1 self.node_2 = node_2 self.args = max([node_1.args, node_2.args]) def pr...
<commit_before> from nodes import Node class MultiVar(Node): char = "'" args = 0 results = None contents = -1 def __init__(self, node_1: Node.NodeSingle, node_2: Node.NodeSingle): self.node_1 = node_1 self.node_2 = node_2 self.args = max([node_1.args, node_2.args]) ...
b5bf3a92309dac40deefbaea555e4d96aa6bca62
jesusmtnez/python/kata/tests/test_game.py
jesusmtnez/python/kata/tests/test_game.py
import unittest from game import Game class BowlingGameTest(unittest.TestCase): def setUp(self): self.g = Game() def tearDown(self): self.g = None def test_gutter_game(self): for i in range(20): self.g.roll(0); self.assertEqual(0, self.g.score()) def tes...
import unittest from game import Game class BowlingGameTest(unittest.TestCase): def setUp(self): self.g = Game() def tearDown(self): self.g = None def _roll_many(self, n, pins): "Roll 'n' times a roll of 'pins' pins" for i in range(n): self.g.roll(pins) d...
Refactor for code to roll many times
[Python] Refactor for code to roll many times
Python
mit
JesusMtnez/devexperto-challenge,JesusMtnez/devexperto-challenge
import unittest from game import Game class BowlingGameTest(unittest.TestCase): def setUp(self): self.g = Game() def tearDown(self): self.g = None def test_gutter_game(self): for i in range(20): self.g.roll(0); self.assertEqual(0, self.g.score()) def tes...
import unittest from game import Game class BowlingGameTest(unittest.TestCase): def setUp(self): self.g = Game() def tearDown(self): self.g = None def _roll_many(self, n, pins): "Roll 'n' times a roll of 'pins' pins" for i in range(n): self.g.roll(pins) d...
<commit_before>import unittest from game import Game class BowlingGameTest(unittest.TestCase): def setUp(self): self.g = Game() def tearDown(self): self.g = None def test_gutter_game(self): for i in range(20): self.g.roll(0); self.assertEqual(0, self.g.score(...
import unittest from game import Game class BowlingGameTest(unittest.TestCase): def setUp(self): self.g = Game() def tearDown(self): self.g = None def _roll_many(self, n, pins): "Roll 'n' times a roll of 'pins' pins" for i in range(n): self.g.roll(pins) d...
import unittest from game import Game class BowlingGameTest(unittest.TestCase): def setUp(self): self.g = Game() def tearDown(self): self.g = None def test_gutter_game(self): for i in range(20): self.g.roll(0); self.assertEqual(0, self.g.score()) def tes...
<commit_before>import unittest from game import Game class BowlingGameTest(unittest.TestCase): def setUp(self): self.g = Game() def tearDown(self): self.g = None def test_gutter_game(self): for i in range(20): self.g.roll(0); self.assertEqual(0, self.g.score(...
17bfdbfdf56e01a1bda24dab4b2ac35f871cb4c1
bmibuilder/build.py
bmibuilder/build.py
#! /usr/bin/env python from .writers.c import CWriter def main(): import argparse parser = argparse.ArgumentParser() parser.add_argument('file', type=argparse.FileType('r'), help='YAML file') parser.add_argument('--language', choices=('c', ), default='c', help='BMI language') ...
#! /usr/bin/env python import os from distutils.dir_util import mkpath from jinja2 import Environment, FileSystemLoader import yaml from .writers.c import CWriter YAML_TEMPLATE = """ name: <str> language: c grids: - id: <int> type: <str> rank: <int> time: units: <str> start: <float> end...
Use new jinja templating system.
Use new jinja templating system.
Python
mit
bmi-forum/bmi-builder,bmi-forum/bmi-builder,bmi-forum/bmi-builder
#! /usr/bin/env python from .writers.c import CWriter def main(): import argparse parser = argparse.ArgumentParser() parser.add_argument('file', type=argparse.FileType('r'), help='YAML file') parser.add_argument('--language', choices=('c', ), default='c', help='BMI language') ...
#! /usr/bin/env python import os from distutils.dir_util import mkpath from jinja2 import Environment, FileSystemLoader import yaml from .writers.c import CWriter YAML_TEMPLATE = """ name: <str> language: c grids: - id: <int> type: <str> rank: <int> time: units: <str> start: <float> end...
<commit_before>#! /usr/bin/env python from .writers.c import CWriter def main(): import argparse parser = argparse.ArgumentParser() parser.add_argument('file', type=argparse.FileType('r'), help='YAML file') parser.add_argument('--language', choices=('c', ), default='c', help='...
#! /usr/bin/env python import os from distutils.dir_util import mkpath from jinja2 import Environment, FileSystemLoader import yaml from .writers.c import CWriter YAML_TEMPLATE = """ name: <str> language: c grids: - id: <int> type: <str> rank: <int> time: units: <str> start: <float> end...
#! /usr/bin/env python from .writers.c import CWriter def main(): import argparse parser = argparse.ArgumentParser() parser.add_argument('file', type=argparse.FileType('r'), help='YAML file') parser.add_argument('--language', choices=('c', ), default='c', help='BMI language') ...
<commit_before>#! /usr/bin/env python from .writers.c import CWriter def main(): import argparse parser = argparse.ArgumentParser() parser.add_argument('file', type=argparse.FileType('r'), help='YAML file') parser.add_argument('--language', choices=('c', ), default='c', help='...
d2643bb7c4eba543da0067eb4bf82539d222845c
Lesson01_Variables/MilestonesSOLUTION.py
Lesson01_Variables/MilestonesSOLUTION.py
birth_year = raw_input("What is the birth year for the milestones?") # raw_input always gives strings, so convert to int birth_year = int(birth_year) # Calculate milestone years driving_year = birth_year + 16 drinking_year = birth_year + 21 president_year = birth_year + 35 print "You are able to drive in " + driving_...
birth_year = raw_input("What is the birth year for the milestones?") # raw_input always gives strings, so convert to int birth_year = int(birth_year) # Calculate milestone years driving_year = birth_year + 16 drinking_year = birth_year + 21 president_year = birth_year + 35 print "You are able to drive in " + str(driv...
Convert int to string for printing
Convert int to string for printing
Python
mit
WomensCodingCircle/CodingCirclePython
birth_year = raw_input("What is the birth year for the milestones?") # raw_input always gives strings, so convert to int birth_year = int(birth_year) # Calculate milestone years driving_year = birth_year + 16 drinking_year = birth_year + 21 president_year = birth_year + 35 print "You are able to drive in " + driving_...
birth_year = raw_input("What is the birth year for the milestones?") # raw_input always gives strings, so convert to int birth_year = int(birth_year) # Calculate milestone years driving_year = birth_year + 16 drinking_year = birth_year + 21 president_year = birth_year + 35 print "You are able to drive in " + str(driv...
<commit_before>birth_year = raw_input("What is the birth year for the milestones?") # raw_input always gives strings, so convert to int birth_year = int(birth_year) # Calculate milestone years driving_year = birth_year + 16 drinking_year = birth_year + 21 president_year = birth_year + 35 print "You are able to drive ...
birth_year = raw_input("What is the birth year for the milestones?") # raw_input always gives strings, so convert to int birth_year = int(birth_year) # Calculate milestone years driving_year = birth_year + 16 drinking_year = birth_year + 21 president_year = birth_year + 35 print "You are able to drive in " + str(driv...
birth_year = raw_input("What is the birth year for the milestones?") # raw_input always gives strings, so convert to int birth_year = int(birth_year) # Calculate milestone years driving_year = birth_year + 16 drinking_year = birth_year + 21 president_year = birth_year + 35 print "You are able to drive in " + driving_...
<commit_before>birth_year = raw_input("What is the birth year for the milestones?") # raw_input always gives strings, so convert to int birth_year = int(birth_year) # Calculate milestone years driving_year = birth_year + 16 drinking_year = birth_year + 21 president_year = birth_year + 35 print "You are able to drive ...
a4598c9454a2011b6aeff4a3759d8d2fb5a8ece3
xclib/tests/51_online_postfix_failure_test.py
xclib/tests/51_online_postfix_failure_test.py
# Second half of the postfix_io tests. # If the authentication host is unreachable, postfix # should have a 400 error returned. This tests for it. # This test also works if the local machine is offline, # nevertheless, it sends packets to the network, therefore # is considered an online test import sys import unittest ...
# Second half of the postfix_io tests. # If the authentication host is unreachable, postfix # should have a 400 error returned. This tests for it. # This test also works if the local machine is offline, # nevertheless, it sends packets to the network, therefore # is considered an online test import sys import unittest ...
Use in-memory db for all tests
Use in-memory db for all tests
Python
mit
jsxc/xmpp-cloud-auth,jsxc/xmpp-cloud-auth,jsxc/xmpp-cloud-auth,jsxc/xmpp-cloud-auth
# Second half of the postfix_io tests. # If the authentication host is unreachable, postfix # should have a 400 error returned. This tests for it. # This test also works if the local machine is offline, # nevertheless, it sends packets to the network, therefore # is considered an online test import sys import unittest ...
# Second half of the postfix_io tests. # If the authentication host is unreachable, postfix # should have a 400 error returned. This tests for it. # This test also works if the local machine is offline, # nevertheless, it sends packets to the network, therefore # is considered an online test import sys import unittest ...
<commit_before># Second half of the postfix_io tests. # If the authentication host is unreachable, postfix # should have a 400 error returned. This tests for it. # This test also works if the local machine is offline, # nevertheless, it sends packets to the network, therefore # is considered an online test import sys i...
# Second half of the postfix_io tests. # If the authentication host is unreachable, postfix # should have a 400 error returned. This tests for it. # This test also works if the local machine is offline, # nevertheless, it sends packets to the network, therefore # is considered an online test import sys import unittest ...
# Second half of the postfix_io tests. # If the authentication host is unreachable, postfix # should have a 400 error returned. This tests for it. # This test also works if the local machine is offline, # nevertheless, it sends packets to the network, therefore # is considered an online test import sys import unittest ...
<commit_before># Second half of the postfix_io tests. # If the authentication host is unreachable, postfix # should have a 400 error returned. This tests for it. # This test also works if the local machine is offline, # nevertheless, it sends packets to the network, therefore # is considered an online test import sys i...
5c000543ce943619ea89b2443395a2ee10c49ee0
solutions/beecrowd/1010/1010.py
solutions/beecrowd/1010/1010.py
import sys s = 0.0 for line in sys.stdin: a, b, c = line.split() a, b, c = int(a), int(b), float(c) s += c * b print(f'VALOR A PAGAR: R$ {s:.2f}')
import sys s = 0.0 for line in sys.stdin: _, b, c = line.split() b, c = int(b), float(c) s += c * b print(f'VALOR A PAGAR: R$ {s:.2f}')
Refactor python version of Simple Calculate
Refactor python version of Simple Calculate
Python
mit
deniscostadsc/playground,deniscostadsc/playground,deniscostadsc/playground,deniscostadsc/playground,deniscostadsc/playground,deniscostadsc/playground,deniscostadsc/playground,deniscostadsc/playground,deniscostadsc/playground,deniscostadsc/playground,deniscostadsc/playground,deniscostadsc/playground,deniscostadsc/playgr...
import sys s = 0.0 for line in sys.stdin: a, b, c = line.split() a, b, c = int(a), int(b), float(c) s += c * b print(f'VALOR A PAGAR: R$ {s:.2f}') Refactor python version of Simple Calculate
import sys s = 0.0 for line in sys.stdin: _, b, c = line.split() b, c = int(b), float(c) s += c * b print(f'VALOR A PAGAR: R$ {s:.2f}')
<commit_before>import sys s = 0.0 for line in sys.stdin: a, b, c = line.split() a, b, c = int(a), int(b), float(c) s += c * b print(f'VALOR A PAGAR: R$ {s:.2f}') <commit_msg>Refactor python version of Simple Calculate<commit_after>
import sys s = 0.0 for line in sys.stdin: _, b, c = line.split() b, c = int(b), float(c) s += c * b print(f'VALOR A PAGAR: R$ {s:.2f}')
import sys s = 0.0 for line in sys.stdin: a, b, c = line.split() a, b, c = int(a), int(b), float(c) s += c * b print(f'VALOR A PAGAR: R$ {s:.2f}') Refactor python version of Simple Calculateimport sys s = 0.0 for line in sys.stdin: _, b, c = line.split() b, c = int(b), float(c) s += c * b ...
<commit_before>import sys s = 0.0 for line in sys.stdin: a, b, c = line.split() a, b, c = int(a), int(b), float(c) s += c * b print(f'VALOR A PAGAR: R$ {s:.2f}') <commit_msg>Refactor python version of Simple Calculate<commit_after>import sys s = 0.0 for line in sys.stdin: _, b, c = line.split() ...
fc5614c040cccff6411c87ad6cc191f7ec0b6971
SoftLayer/CLI/account/bandwidth_pools.py
SoftLayer/CLI/account/bandwidth_pools.py
"""Displays information about the accounts bandwidth pools""" # :license: MIT, see LICENSE for more details. import click from SoftLayer.CLI import environment from SoftLayer.CLI import formatting from SoftLayer.managers.account import AccountManager as AccountManager from SoftLayer import utils @click.command() @en...
"""Displays information about the accounts bandwidth pools""" # :license: MIT, see LICENSE for more details. import click from SoftLayer.CLI import environment from SoftLayer.CLI import formatting from SoftLayer.managers.account import AccountManager as AccountManager from SoftLayer import utils @click.command() @en...
Add id in the result in the command bandwidth-pools
Add id in the result in the command bandwidth-pools
Python
mit
softlayer/softlayer-python,allmightyspiff/softlayer-python
"""Displays information about the accounts bandwidth pools""" # :license: MIT, see LICENSE for more details. import click from SoftLayer.CLI import environment from SoftLayer.CLI import formatting from SoftLayer.managers.account import AccountManager as AccountManager from SoftLayer import utils @click.command() @en...
"""Displays information about the accounts bandwidth pools""" # :license: MIT, see LICENSE for more details. import click from SoftLayer.CLI import environment from SoftLayer.CLI import formatting from SoftLayer.managers.account import AccountManager as AccountManager from SoftLayer import utils @click.command() @en...
<commit_before>"""Displays information about the accounts bandwidth pools""" # :license: MIT, see LICENSE for more details. import click from SoftLayer.CLI import environment from SoftLayer.CLI import formatting from SoftLayer.managers.account import AccountManager as AccountManager from SoftLayer import utils @clic...
"""Displays information about the accounts bandwidth pools""" # :license: MIT, see LICENSE for more details. import click from SoftLayer.CLI import environment from SoftLayer.CLI import formatting from SoftLayer.managers.account import AccountManager as AccountManager from SoftLayer import utils @click.command() @en...
"""Displays information about the accounts bandwidth pools""" # :license: MIT, see LICENSE for more details. import click from SoftLayer.CLI import environment from SoftLayer.CLI import formatting from SoftLayer.managers.account import AccountManager as AccountManager from SoftLayer import utils @click.command() @en...
<commit_before>"""Displays information about the accounts bandwidth pools""" # :license: MIT, see LICENSE for more details. import click from SoftLayer.CLI import environment from SoftLayer.CLI import formatting from SoftLayer.managers.account import AccountManager as AccountManager from SoftLayer import utils @clic...
3f27e1997c94bcdac23e5cb478e7d2b9c6dc1f37
astropy/io/misc/asdf/__init__.py
astropy/io/misc/asdf/__init__.py
# Licensed under a 3-clause BSD style license - see LICENSE.rst # -*- coding: utf-8 -*- """ The **asdf** subpackage contains code that is used to serialize astropy types so that they can be represented and stored using the Advanced Scientific Data Format (ASDF). This subpackage defines classes, referred to as **tags**,...
# Licensed under a 3-clause BSD style license - see LICENSE.rst # -*- coding: utf-8 -*- """ The **asdf** subpackage contains code that is used to serialize astropy types so that they can be represented and stored using the Advanced Scientific Data Format (ASDF). This subpackage defines classes, referred to as **tags**,...
Put try/except around ASDF import in init file
Put try/except around ASDF import in init file
Python
bsd-3-clause
astropy/astropy,lpsinger/astropy,mhvk/astropy,MSeifert04/astropy,stargaser/astropy,saimn/astropy,stargaser/astropy,larrybradley/astropy,pllim/astropy,aleksandr-bakanov/astropy,dhomeier/astropy,astropy/astropy,stargaser/astropy,pllim/astropy,aleksandr-bakanov/astropy,astropy/astropy,saimn/astropy,larrybradley/astropy,dh...
# Licensed under a 3-clause BSD style license - see LICENSE.rst # -*- coding: utf-8 -*- """ The **asdf** subpackage contains code that is used to serialize astropy types so that they can be represented and stored using the Advanced Scientific Data Format (ASDF). This subpackage defines classes, referred to as **tags**,...
# Licensed under a 3-clause BSD style license - see LICENSE.rst # -*- coding: utf-8 -*- """ The **asdf** subpackage contains code that is used to serialize astropy types so that they can be represented and stored using the Advanced Scientific Data Format (ASDF). This subpackage defines classes, referred to as **tags**,...
<commit_before># Licensed under a 3-clause BSD style license - see LICENSE.rst # -*- coding: utf-8 -*- """ The **asdf** subpackage contains code that is used to serialize astropy types so that they can be represented and stored using the Advanced Scientific Data Format (ASDF). This subpackage defines classes, referred ...
# Licensed under a 3-clause BSD style license - see LICENSE.rst # -*- coding: utf-8 -*- """ The **asdf** subpackage contains code that is used to serialize astropy types so that they can be represented and stored using the Advanced Scientific Data Format (ASDF). This subpackage defines classes, referred to as **tags**,...
# Licensed under a 3-clause BSD style license - see LICENSE.rst # -*- coding: utf-8 -*- """ The **asdf** subpackage contains code that is used to serialize astropy types so that they can be represented and stored using the Advanced Scientific Data Format (ASDF). This subpackage defines classes, referred to as **tags**,...
<commit_before># Licensed under a 3-clause BSD style license - see LICENSE.rst # -*- coding: utf-8 -*- """ The **asdf** subpackage contains code that is used to serialize astropy types so that they can be represented and stored using the Advanced Scientific Data Format (ASDF). This subpackage defines classes, referred ...
ed1172cc12654cdf0d221281cd56c51992b4c4af
knotdirectory/knotdirectory/knots/forms.py
knotdirectory/knotdirectory/knots/forms.py
from django import forms from django.forms.models import inlineformset_factory from .models import Knot, Link class KnotForm(forms.ModelForm): class Meta: model = Knot fields = ['name', 'photo', 'other_names', 'creator_name', 'notes', 'tags'] class InlineLinkForm(forms.ModelForm): class Met...
from django import forms from django.forms.models import inlineformset_factory from django.utils import six from .models import Knot, Link def edit_string_for_tags(tags): """ Convert list of Tags into comma-separated list. We can't use the one built into django-taggit, because select2 freaks out abo...
Set up form to use special widget for tags
Set up form to use special widget for tags
Python
mit
althalus/knotcrafters,althalus/knotcrafters,althalus/knotcrafters
from django import forms from django.forms.models import inlineformset_factory from .models import Knot, Link class KnotForm(forms.ModelForm): class Meta: model = Knot fields = ['name', 'photo', 'other_names', 'creator_name', 'notes', 'tags'] class InlineLinkForm(forms.ModelForm): class Met...
from django import forms from django.forms.models import inlineformset_factory from django.utils import six from .models import Knot, Link def edit_string_for_tags(tags): """ Convert list of Tags into comma-separated list. We can't use the one built into django-taggit, because select2 freaks out abo...
<commit_before>from django import forms from django.forms.models import inlineformset_factory from .models import Knot, Link class KnotForm(forms.ModelForm): class Meta: model = Knot fields = ['name', 'photo', 'other_names', 'creator_name', 'notes', 'tags'] class InlineLinkForm(forms.ModelForm)...
from django import forms from django.forms.models import inlineformset_factory from django.utils import six from .models import Knot, Link def edit_string_for_tags(tags): """ Convert list of Tags into comma-separated list. We can't use the one built into django-taggit, because select2 freaks out abo...
from django import forms from django.forms.models import inlineformset_factory from .models import Knot, Link class KnotForm(forms.ModelForm): class Meta: model = Knot fields = ['name', 'photo', 'other_names', 'creator_name', 'notes', 'tags'] class InlineLinkForm(forms.ModelForm): class Met...
<commit_before>from django import forms from django.forms.models import inlineformset_factory from .models import Knot, Link class KnotForm(forms.ModelForm): class Meta: model = Knot fields = ['name', 'photo', 'other_names', 'creator_name', 'notes', 'tags'] class InlineLinkForm(forms.ModelForm)...
8a10c1f0036f681a1b6f499ac03e86b96bb88700
fancypages/__init__.py
fancypages/__init__.py
import os __version__ = (0, 1, 1, 'alpha', 1) def get_fancypages_paths(path): """ Get absolute paths for *path* relative to the project root """ return [os.path.join(os.path.dirname(os.path.abspath(__file__)), path)] def get_required_apps(): return [ 'django_extensions', # used for imag...
import os __version__ = (0, 3, 0, 'alpha', 1) def get_fancypages_paths(path): """ Get absolute paths for *path* relative to the project root """ return [os.path.join(os.path.dirname(os.path.abspath(__file__)), path)] def get_required_apps(): return [ 'django_extensions', # used for imag...
Bump new dev version to 0.3.0
Bump new dev version to 0.3.0
Python
bsd-3-clause
socradev/django-fancypages,tangentlabs/django-fancypages,socradev/django-fancypages,tangentlabs/django-fancypages,socradev/django-fancypages,tangentlabs/django-fancypages
import os __version__ = (0, 1, 1, 'alpha', 1) def get_fancypages_paths(path): """ Get absolute paths for *path* relative to the project root """ return [os.path.join(os.path.dirname(os.path.abspath(__file__)), path)] def get_required_apps(): return [ 'django_extensions', # used for imag...
import os __version__ = (0, 3, 0, 'alpha', 1) def get_fancypages_paths(path): """ Get absolute paths for *path* relative to the project root """ return [os.path.join(os.path.dirname(os.path.abspath(__file__)), path)] def get_required_apps(): return [ 'django_extensions', # used for imag...
<commit_before>import os __version__ = (0, 1, 1, 'alpha', 1) def get_fancypages_paths(path): """ Get absolute paths for *path* relative to the project root """ return [os.path.join(os.path.dirname(os.path.abspath(__file__)), path)] def get_required_apps(): return [ 'django_extensions', ...
import os __version__ = (0, 3, 0, 'alpha', 1) def get_fancypages_paths(path): """ Get absolute paths for *path* relative to the project root """ return [os.path.join(os.path.dirname(os.path.abspath(__file__)), path)] def get_required_apps(): return [ 'django_extensions', # used for imag...
import os __version__ = (0, 1, 1, 'alpha', 1) def get_fancypages_paths(path): """ Get absolute paths for *path* relative to the project root """ return [os.path.join(os.path.dirname(os.path.abspath(__file__)), path)] def get_required_apps(): return [ 'django_extensions', # used for imag...
<commit_before>import os __version__ = (0, 1, 1, 'alpha', 1) def get_fancypages_paths(path): """ Get absolute paths for *path* relative to the project root """ return [os.path.join(os.path.dirname(os.path.abspath(__file__)), path)] def get_required_apps(): return [ 'django_extensions', ...
d19fd61e746ab4afcb534df6be933716e154b715
memopol/search/templatetags/search_tags.py
memopol/search/templatetags/search_tags.py
from django.core.urlresolvers import reverse from django.template.defaultfilters import urlencode from django import template from dynamiq.utils import get_advanced_search_formset_class from ..forms import MEPSearchForm, MEPSearchAdvancedFormset register = template.Library() @register.simple_tag def simple_search_...
from django.core.urlresolvers import reverse from django.template.defaultfilters import urlencode from django import template from dynamiq.utils import get_advanced_search_formset_class from ..forms import MEPSearchForm, MEPSearchAdvancedFormset register = template.Library() @register.simple_tag def simple_search_...
Make possible to define a sort in simple_search_shortcut tt
[enh] Make possible to define a sort in simple_search_shortcut tt
Python
agpl-3.0
yohanboniface/memopol-core,yohanboniface/memopol-core,yohanboniface/memopol-core
from django.core.urlresolvers import reverse from django.template.defaultfilters import urlencode from django import template from dynamiq.utils import get_advanced_search_formset_class from ..forms import MEPSearchForm, MEPSearchAdvancedFormset register = template.Library() @register.simple_tag def simple_search_...
from django.core.urlresolvers import reverse from django.template.defaultfilters import urlencode from django import template from dynamiq.utils import get_advanced_search_formset_class from ..forms import MEPSearchForm, MEPSearchAdvancedFormset register = template.Library() @register.simple_tag def simple_search_...
<commit_before>from django.core.urlresolvers import reverse from django.template.defaultfilters import urlencode from django import template from dynamiq.utils import get_advanced_search_formset_class from ..forms import MEPSearchForm, MEPSearchAdvancedFormset register = template.Library() @register.simple_tag def...
from django.core.urlresolvers import reverse from django.template.defaultfilters import urlencode from django import template from dynamiq.utils import get_advanced_search_formset_class from ..forms import MEPSearchForm, MEPSearchAdvancedFormset register = template.Library() @register.simple_tag def simple_search_...
from django.core.urlresolvers import reverse from django.template.defaultfilters import urlencode from django import template from dynamiq.utils import get_advanced_search_formset_class from ..forms import MEPSearchForm, MEPSearchAdvancedFormset register = template.Library() @register.simple_tag def simple_search_...
<commit_before>from django.core.urlresolvers import reverse from django.template.defaultfilters import urlencode from django import template from dynamiq.utils import get_advanced_search_formset_class from ..forms import MEPSearchForm, MEPSearchAdvancedFormset register = template.Library() @register.simple_tag def...
7c3c9e2ab7be0d91b4edc3d15d50cc1245941e47
logicaldelete/models.py
logicaldelete/models.py
from django.db import models try: from django.utils import timezone except ImportError: from datetime import datetime as timezonefrom logicaldelete import managers class Model(models.Model): """ This base model provides date fields and functionality to enable logical delete functionality in deriv...
from django.db import models from logicaldelete import managers try: from django.utils import timezone except ImportError: from datetime import datetime as timezone class Model(models.Model): """ This base model provides date fields and functionality to enable logical delete functionality in der...
Fix issue with manager (error w cut and paste)
Fix issue with manager (error w cut and paste)
Python
bsd-3-clause
angvp/django-logical-delete,angvp/django-logical-delete
from django.db import models try: from django.utils import timezone except ImportError: from datetime import datetime as timezonefrom logicaldelete import managers class Model(models.Model): """ This base model provides date fields and functionality to enable logical delete functionality in deriv...
from django.db import models from logicaldelete import managers try: from django.utils import timezone except ImportError: from datetime import datetime as timezone class Model(models.Model): """ This base model provides date fields and functionality to enable logical delete functionality in der...
<commit_before>from django.db import models try: from django.utils import timezone except ImportError: from datetime import datetime as timezonefrom logicaldelete import managers class Model(models.Model): """ This base model provides date fields and functionality to enable logical delete functio...
from django.db import models from logicaldelete import managers try: from django.utils import timezone except ImportError: from datetime import datetime as timezone class Model(models.Model): """ This base model provides date fields and functionality to enable logical delete functionality in der...
from django.db import models try: from django.utils import timezone except ImportError: from datetime import datetime as timezonefrom logicaldelete import managers class Model(models.Model): """ This base model provides date fields and functionality to enable logical delete functionality in deriv...
<commit_before>from django.db import models try: from django.utils import timezone except ImportError: from datetime import datetime as timezonefrom logicaldelete import managers class Model(models.Model): """ This base model provides date fields and functionality to enable logical delete functio...
30a982448b4f0baa2abe02ea0d9ef0d4d21c8414
Main.py
Main.py
from App import App #try: app = App() app.run() #except: # print('')
from App import App try: app = App() app.run() except KeyboardInterrupt: print('')
Add try except for keyboard interrupts
Add try except for keyboard interrupts
Python
mit
Rookfighter/TextAdventure
from App import App #try: app = App() app.run() #except: # print('')Add try except for keyboard interrupts
from App import App try: app = App() app.run() except KeyboardInterrupt: print('')
<commit_before>from App import App #try: app = App() app.run() #except: # print('')<commit_msg>Add try except for keyboard interrupts<commit_after>
from App import App try: app = App() app.run() except KeyboardInterrupt: print('')
from App import App #try: app = App() app.run() #except: # print('')Add try except for keyboard interruptsfrom App import App try: app = App() app.run() except KeyboardInterrupt: print('')
<commit_before>from App import App #try: app = App() app.run() #except: # print('')<commit_msg>Add try except for keyboard interrupts<commit_after>from App import App try: app = App() app.run() except KeyboardInterrupt: print('')
7f9f98cedb4693e0b5a4c7297d16757224a4e71e
axes/checks.py
axes/checks.py
from django.core.checks import Error, Tags, register from axes.conf import settings class Messages: CACHE_INVALID = 'invalid cache configuration for settings.AXES_CACHE' class Hints: CACHE_INVALID = ( 'django-axes does not work properly with LocMemCache as the cache backend' ' please add e....
from django.core.checks import Error, Tags, register from axes.conf import settings class Messages: CACHE_INVALID = 'invalid cache configuration for settings.AXES_CACHE' class Hints: CACHE_INVALID = ( 'django-axes does not work properly with LocMemCache as the cache backend' ' please add e....
Fix invalid error code format for Axes
Fix invalid error code format for Axes Signed-off-by: Aleksi Häkli <44cb6a94c0d20644d531e2be44779b52833cdcd2@iki.fi>
Python
mit
django-pci/django-axes,jazzband/django-axes
from django.core.checks import Error, Tags, register from axes.conf import settings class Messages: CACHE_INVALID = 'invalid cache configuration for settings.AXES_CACHE' class Hints: CACHE_INVALID = ( 'django-axes does not work properly with LocMemCache as the cache backend' ' please add e....
from django.core.checks import Error, Tags, register from axes.conf import settings class Messages: CACHE_INVALID = 'invalid cache configuration for settings.AXES_CACHE' class Hints: CACHE_INVALID = ( 'django-axes does not work properly with LocMemCache as the cache backend' ' please add e....
<commit_before>from django.core.checks import Error, Tags, register from axes.conf import settings class Messages: CACHE_INVALID = 'invalid cache configuration for settings.AXES_CACHE' class Hints: CACHE_INVALID = ( 'django-axes does not work properly with LocMemCache as the cache backend' ...
from django.core.checks import Error, Tags, register from axes.conf import settings class Messages: CACHE_INVALID = 'invalid cache configuration for settings.AXES_CACHE' class Hints: CACHE_INVALID = ( 'django-axes does not work properly with LocMemCache as the cache backend' ' please add e....
from django.core.checks import Error, Tags, register from axes.conf import settings class Messages: CACHE_INVALID = 'invalid cache configuration for settings.AXES_CACHE' class Hints: CACHE_INVALID = ( 'django-axes does not work properly with LocMemCache as the cache backend' ' please add e....
<commit_before>from django.core.checks import Error, Tags, register from axes.conf import settings class Messages: CACHE_INVALID = 'invalid cache configuration for settings.AXES_CACHE' class Hints: CACHE_INVALID = ( 'django-axes does not work properly with LocMemCache as the cache backend' ...
d8369ebff8f4622fe83308e7e65c7120a00e5768
github/events/watch.py
github/events/watch.py
from data_types.hook import Hook from data_types.repository import Repository from data_types.user import User from .base import EventBase class EventWatch(EventBase): def __init__(self, sdk): super(EventWatch, self).__init__(sdk) self.hook = None self.repository = None self.sende...
from data_types.hook import Hook from data_types.repository import Repository from data_types.user import User from .base import EventBase class EventWatch(EventBase): def __init__(self, sdk): super(EventWatch, self).__init__(sdk) self.hook = None self.repository = None self.sende...
Add non-breaking space and fix error
Add non-breaking space and fix error
Python
mit
codex-bot/github
from data_types.hook import Hook from data_types.repository import Repository from data_types.user import User from .base import EventBase class EventWatch(EventBase): def __init__(self, sdk): super(EventWatch, self).__init__(sdk) self.hook = None self.repository = None self.sende...
from data_types.hook import Hook from data_types.repository import Repository from data_types.user import User from .base import EventBase class EventWatch(EventBase): def __init__(self, sdk): super(EventWatch, self).__init__(sdk) self.hook = None self.repository = None self.sende...
<commit_before>from data_types.hook import Hook from data_types.repository import Repository from data_types.user import User from .base import EventBase class EventWatch(EventBase): def __init__(self, sdk): super(EventWatch, self).__init__(sdk) self.hook = None self.repository = None ...
from data_types.hook import Hook from data_types.repository import Repository from data_types.user import User from .base import EventBase class EventWatch(EventBase): def __init__(self, sdk): super(EventWatch, self).__init__(sdk) self.hook = None self.repository = None self.sende...
from data_types.hook import Hook from data_types.repository import Repository from data_types.user import User from .base import EventBase class EventWatch(EventBase): def __init__(self, sdk): super(EventWatch, self).__init__(sdk) self.hook = None self.repository = None self.sende...
<commit_before>from data_types.hook import Hook from data_types.repository import Repository from data_types.user import User from .base import EventBase class EventWatch(EventBase): def __init__(self, sdk): super(EventWatch, self).__init__(sdk) self.hook = None self.repository = None ...
9f44c09dcb3ce3bd0bec591597e892d4037936f9
main.py
main.py
import os import json import sys from pprint import pprint def loadJSON(fInput): with open(fInput) as f: return json.load(f) return None if __name__ == '__main__': filePath = 'data/example.json' data = loadJSON(filePath) # check if the data is loaded correctly if data is None: ...
import os import json import sys from pprint import pprint def loadJSON(fInput): with open(fInput) as f: return json.load(f) return None if __name__ == '__main__': filePath = 'data/example.json' data = loadJSON(filePath) # check if the data is loaded correctly if data is None: ...
Add functions to generate python numpy datastructure and write it into generated python file.
Add functions to generate python numpy datastructure and write it into generated python file.
Python
apache-2.0
kilikkuo/kernel-mapper,PyOCL/kernel-mapper
import os import json import sys from pprint import pprint def loadJSON(fInput): with open(fInput) as f: return json.load(f) return None if __name__ == '__main__': filePath = 'data/example.json' data = loadJSON(filePath) # check if the data is loaded correctly if data is None: ...
import os import json import sys from pprint import pprint def loadJSON(fInput): with open(fInput) as f: return json.load(f) return None if __name__ == '__main__': filePath = 'data/example.json' data = loadJSON(filePath) # check if the data is loaded correctly if data is None: ...
<commit_before>import os import json import sys from pprint import pprint def loadJSON(fInput): with open(fInput) as f: return json.load(f) return None if __name__ == '__main__': filePath = 'data/example.json' data = loadJSON(filePath) # check if the data is loaded correctly if data is...
import os import json import sys from pprint import pprint def loadJSON(fInput): with open(fInput) as f: return json.load(f) return None if __name__ == '__main__': filePath = 'data/example.json' data = loadJSON(filePath) # check if the data is loaded correctly if data is None: ...
import os import json import sys from pprint import pprint def loadJSON(fInput): with open(fInput) as f: return json.load(f) return None if __name__ == '__main__': filePath = 'data/example.json' data = loadJSON(filePath) # check if the data is loaded correctly if data is None: ...
<commit_before>import os import json import sys from pprint import pprint def loadJSON(fInput): with open(fInput) as f: return json.load(f) return None if __name__ == '__main__': filePath = 'data/example.json' data = loadJSON(filePath) # check if the data is loaded correctly if data is...
3f178359b8649b6b92900ae790e894971405b720
main.py
main.py
from src import create from src import count from src import thefile from src import execute def main(x, y, file): #Create it seats = create.new_2d(x, y) #Count it counted_start = count.count_array(x, y, seats) print(counted_start) #Get the commands commands = thefile.get_cmmds(file) ...
from src import create from src import count from src import thefile from src import execute def main(x, y, file): #Create it seats = create.new_2d(x, y) #Count it counted_start = count.count_array(x, y, seats) print(counted_start) #Get the commands commands = thefile.get_cmmds(file) ...
CLEAN TEMPLATE Clean up the project template further still
CLEAN TEMPLATE Clean up the project template further still
Python
bsd-2-clause
kevindiltinero/seass3
from src import create from src import count from src import thefile from src import execute def main(x, y, file): #Create it seats = create.new_2d(x, y) #Count it counted_start = count.count_array(x, y, seats) print(counted_start) #Get the commands commands = thefile.get_cmmds(file) ...
from src import create from src import count from src import thefile from src import execute def main(x, y, file): #Create it seats = create.new_2d(x, y) #Count it counted_start = count.count_array(x, y, seats) print(counted_start) #Get the commands commands = thefile.get_cmmds(file) ...
<commit_before>from src import create from src import count from src import thefile from src import execute def main(x, y, file): #Create it seats = create.new_2d(x, y) #Count it counted_start = count.count_array(x, y, seats) print(counted_start) #Get the commands commands = thefile.get...
from src import create from src import count from src import thefile from src import execute def main(x, y, file): #Create it seats = create.new_2d(x, y) #Count it counted_start = count.count_array(x, y, seats) print(counted_start) #Get the commands commands = thefile.get_cmmds(file) ...
from src import create from src import count from src import thefile from src import execute def main(x, y, file): #Create it seats = create.new_2d(x, y) #Count it counted_start = count.count_array(x, y, seats) print(counted_start) #Get the commands commands = thefile.get_cmmds(file) ...
<commit_before>from src import create from src import count from src import thefile from src import execute def main(x, y, file): #Create it seats = create.new_2d(x, y) #Count it counted_start = count.count_array(x, y, seats) print(counted_start) #Get the commands commands = thefile.get...
c83dcddd7451d53214cf02f9ad72e280970a2dc8
hydromet/catchments.py
hydromet/catchments.py
import os import numpy as np from catchment_cutter import get_grid_cells def create_grids(catchments, in_directory, out_directory, grid_file): """ Create grid files for the supplied catchments. :param catchments: List of catchment IDs. :type catchments: Array(string) :param in_dir...
import os import numpy as np from catchment_tools import get_grid_cells def create_grids(catchments, in_directory, out_directory, grid_file): """ Create grid files for the supplied catchments. :param catchments: List of catchment IDs. :type catchments: Array(string) :param in_dire...
Use updated catchment tools import
Use updated catchment tools import
Python
bsd-3-clause
amacd31/hydromet-toolkit,amacd31/hydromet-toolkit
import os import numpy as np from catchment_cutter import get_grid_cells def create_grids(catchments, in_directory, out_directory, grid_file): """ Create grid files for the supplied catchments. :param catchments: List of catchment IDs. :type catchments: Array(string) :param in_dir...
import os import numpy as np from catchment_tools import get_grid_cells def create_grids(catchments, in_directory, out_directory, grid_file): """ Create grid files for the supplied catchments. :param catchments: List of catchment IDs. :type catchments: Array(string) :param in_dire...
<commit_before>import os import numpy as np from catchment_cutter import get_grid_cells def create_grids(catchments, in_directory, out_directory, grid_file): """ Create grid files for the supplied catchments. :param catchments: List of catchment IDs. :type catchments: Array(string) ...
import os import numpy as np from catchment_tools import get_grid_cells def create_grids(catchments, in_directory, out_directory, grid_file): """ Create grid files for the supplied catchments. :param catchments: List of catchment IDs. :type catchments: Array(string) :param in_dire...
import os import numpy as np from catchment_cutter import get_grid_cells def create_grids(catchments, in_directory, out_directory, grid_file): """ Create grid files for the supplied catchments. :param catchments: List of catchment IDs. :type catchments: Array(string) :param in_dir...
<commit_before>import os import numpy as np from catchment_cutter import get_grid_cells def create_grids(catchments, in_directory, out_directory, grid_file): """ Create grid files for the supplied catchments. :param catchments: List of catchment IDs. :type catchments: Array(string) ...
a7386ca8a26a7a1cb14c6a802d284c2b87114f3d
condor-copasi-daemon/condor-copasi-daemon.py
condor-copasi-daemon/condor-copasi-daemon.py
#!/usr/bin/env python #Script adapted from example by Sander Marechal, released into public domain #Taken from http://www.jejik.com/articles/2007/02/a_simple_unix_linux_daemon_in_python/ import sys, time from daemon import Daemon from web_frontend import settings class MyDaemon(Daemon): def run(self): w...
#!/usr/bin/env python #Script adapted from example by Sander Marechal, released into public domain #Taken from http://www.jejik.com/articles/2007/02/a_simple_unix_linux_daemon_in_python/ import sys, time from daemon import Daemon from web_frontend import settings class MyDaemon(Daemon): def run(self): w...
Remove print statements from daemon
Remove print statements from daemon
Python
artistic-2.0
Nucleoos/condor-copasi,copasi/condor-copasi,copasi/condor-copasi,Nucleoos/condor-copasi
#!/usr/bin/env python #Script adapted from example by Sander Marechal, released into public domain #Taken from http://www.jejik.com/articles/2007/02/a_simple_unix_linux_daemon_in_python/ import sys, time from daemon import Daemon from web_frontend import settings class MyDaemon(Daemon): def run(self): w...
#!/usr/bin/env python #Script adapted from example by Sander Marechal, released into public domain #Taken from http://www.jejik.com/articles/2007/02/a_simple_unix_linux_daemon_in_python/ import sys, time from daemon import Daemon from web_frontend import settings class MyDaemon(Daemon): def run(self): w...
<commit_before>#!/usr/bin/env python #Script adapted from example by Sander Marechal, released into public domain #Taken from http://www.jejik.com/articles/2007/02/a_simple_unix_linux_daemon_in_python/ import sys, time from daemon import Daemon from web_frontend import settings class MyDaemon(Daemon): def run(s...
#!/usr/bin/env python #Script adapted from example by Sander Marechal, released into public domain #Taken from http://www.jejik.com/articles/2007/02/a_simple_unix_linux_daemon_in_python/ import sys, time from daemon import Daemon from web_frontend import settings class MyDaemon(Daemon): def run(self): w...
#!/usr/bin/env python #Script adapted from example by Sander Marechal, released into public domain #Taken from http://www.jejik.com/articles/2007/02/a_simple_unix_linux_daemon_in_python/ import sys, time from daemon import Daemon from web_frontend import settings class MyDaemon(Daemon): def run(self): w...
<commit_before>#!/usr/bin/env python #Script adapted from example by Sander Marechal, released into public domain #Taken from http://www.jejik.com/articles/2007/02/a_simple_unix_linux_daemon_in_python/ import sys, time from daemon import Daemon from web_frontend import settings class MyDaemon(Daemon): def run(s...
5586ea0d038365b38b2e2d1fa68ae2c77569146c
conjureup/controllers/vspheresetup/common.py
conjureup/controllers/vspheresetup/common.py
from conjureup import controllers from conjureup.app_config import app class BaseVSphereSetupController: def __init__(self): # Assign current datacenter app.provider.login() for dc in app.provider.client.get_datacenters(): if dc.name == app.provider.region: self...
from conjureup import controllers from conjureup.app_config import app class BaseVSphereSetupController: def __init__(self): # Assign current datacenter app.provider.login() for dc in app.provider.get_datacenters(): if dc.name == app.provider.region: self.datace...
Fix attribute error in vsphere controller
Fix attribute error in vsphere controller Signed-off-by: Adam Stokes <49c255c1d074742f60d19fdba5e2aa5a34add567@users.noreply.github.com>
Python
mit
Ubuntu-Solutions-Engineering/conjure,conjure-up/conjure-up,ubuntu/conjure-up,Ubuntu-Solutions-Engineering/conjure,ubuntu/conjure-up,conjure-up/conjure-up
from conjureup import controllers from conjureup.app_config import app class BaseVSphereSetupController: def __init__(self): # Assign current datacenter app.provider.login() for dc in app.provider.client.get_datacenters(): if dc.name == app.provider.region: self...
from conjureup import controllers from conjureup.app_config import app class BaseVSphereSetupController: def __init__(self): # Assign current datacenter app.provider.login() for dc in app.provider.get_datacenters(): if dc.name == app.provider.region: self.datace...
<commit_before>from conjureup import controllers from conjureup.app_config import app class BaseVSphereSetupController: def __init__(self): # Assign current datacenter app.provider.login() for dc in app.provider.client.get_datacenters(): if dc.name == app.provider.region: ...
from conjureup import controllers from conjureup.app_config import app class BaseVSphereSetupController: def __init__(self): # Assign current datacenter app.provider.login() for dc in app.provider.get_datacenters(): if dc.name == app.provider.region: self.datace...
from conjureup import controllers from conjureup.app_config import app class BaseVSphereSetupController: def __init__(self): # Assign current datacenter app.provider.login() for dc in app.provider.client.get_datacenters(): if dc.name == app.provider.region: self...
<commit_before>from conjureup import controllers from conjureup.app_config import app class BaseVSphereSetupController: def __init__(self): # Assign current datacenter app.provider.login() for dc in app.provider.client.get_datacenters(): if dc.name == app.provider.region: ...
8a947bda06142ba60cac08aee380e723398e5150
music_essentials/chord.py
music_essentials/chord.py
class Chord(object): # TODO: doctring def __init__(self, root_note): # TODO: doctring # TODO: validation self.notes = [root_note] def root(self): # TODO: doctring return self.notes[0]
class Chord(object): # TODO: doctring def __init__(self, root_note): # TODO: doctring # TODO: validation self.notes = [root_note] def root(self): # TODO: doctring # TODO: tests return self.notes[0] def add_note(self, new_note): # TODO: docstr...
Add ability to add notes to a Chord.
Add ability to add notes to a Chord. Signed-off-by: Charlotte Pierce <351429ca27f6e4bff2dbb77adb5046c88cd12fae@malformed-bits.com>
Python
mit
charlottepierce/music_essentials
class Chord(object): # TODO: doctring def __init__(self, root_note): # TODO: doctring # TODO: validation self.notes = [root_note] def root(self): # TODO: doctring return self.notes[0]Add ability to add notes to a Chord. Signed-off-by: Charlotte Pierce <351429ca2...
class Chord(object): # TODO: doctring def __init__(self, root_note): # TODO: doctring # TODO: validation self.notes = [root_note] def root(self): # TODO: doctring # TODO: tests return self.notes[0] def add_note(self, new_note): # TODO: docstr...
<commit_before>class Chord(object): # TODO: doctring def __init__(self, root_note): # TODO: doctring # TODO: validation self.notes = [root_note] def root(self): # TODO: doctring return self.notes[0]<commit_msg>Add ability to add notes to a Chord. Signed-off-by: ...
class Chord(object): # TODO: doctring def __init__(self, root_note): # TODO: doctring # TODO: validation self.notes = [root_note] def root(self): # TODO: doctring # TODO: tests return self.notes[0] def add_note(self, new_note): # TODO: docstr...
class Chord(object): # TODO: doctring def __init__(self, root_note): # TODO: doctring # TODO: validation self.notes = [root_note] def root(self): # TODO: doctring return self.notes[0]Add ability to add notes to a Chord. Signed-off-by: Charlotte Pierce <351429ca2...
<commit_before>class Chord(object): # TODO: doctring def __init__(self, root_note): # TODO: doctring # TODO: validation self.notes = [root_note] def root(self): # TODO: doctring return self.notes[0]<commit_msg>Add ability to add notes to a Chord. Signed-off-by: ...
56ee5ac8225ffb7320c2b640160d0860dba3dee6
prompt_toolkit/contrib/validators/base.py
prompt_toolkit/contrib/validators/base.py
from __future__ import unicode_literals from prompt_toolkit.validation import Validator, ValidationError from six import string_types class SentenceValidator(Validator): """ Validate input only when it appears in this list of sentences. :param sentences: List of sentences. :param ignore_case: If True...
from __future__ import unicode_literals from prompt_toolkit.validation import Validator, ValidationError from six import string_types class SentenceValidator(Validator): """ Validate input only when it appears in this list of sentences. :param sentences: List of sentences. :param ignore_case: If True...
Remove set comprehension to support python 2.6
Remove set comprehension to support python 2.6
Python
bsd-3-clause
melund/python-prompt-toolkit,jonathanslenders/python-prompt-toolkit
from __future__ import unicode_literals from prompt_toolkit.validation import Validator, ValidationError from six import string_types class SentenceValidator(Validator): """ Validate input only when it appears in this list of sentences. :param sentences: List of sentences. :param ignore_case: If True...
from __future__ import unicode_literals from prompt_toolkit.validation import Validator, ValidationError from six import string_types class SentenceValidator(Validator): """ Validate input only when it appears in this list of sentences. :param sentences: List of sentences. :param ignore_case: If True...
<commit_before>from __future__ import unicode_literals from prompt_toolkit.validation import Validator, ValidationError from six import string_types class SentenceValidator(Validator): """ Validate input only when it appears in this list of sentences. :param sentences: List of sentences. :param ignor...
from __future__ import unicode_literals from prompt_toolkit.validation import Validator, ValidationError from six import string_types class SentenceValidator(Validator): """ Validate input only when it appears in this list of sentences. :param sentences: List of sentences. :param ignore_case: If True...
from __future__ import unicode_literals from prompt_toolkit.validation import Validator, ValidationError from six import string_types class SentenceValidator(Validator): """ Validate input only when it appears in this list of sentences. :param sentences: List of sentences. :param ignore_case: If True...
<commit_before>from __future__ import unicode_literals from prompt_toolkit.validation import Validator, ValidationError from six import string_types class SentenceValidator(Validator): """ Validate input only when it appears in this list of sentences. :param sentences: List of sentences. :param ignor...
758ca0f2308f2545a76f90a0f30c180c87ce3674
transport_tester.py
transport_tester.py
from gevent import monkey monkey.patch_all() # noqa import sys import time from ethereum import slogging from raiden.network.transport import UDPTransport from raiden.network.sockfactory import socket_factory class DummyProtocol(object): def __init__(self): self.raiden = None def receive(self, da...
""" Usage: transport_tester.py [--port=<port>] [<target_ip_optional_port>] Options: -p --port=<port> Number to use [default: 8885]. """ from gevent import monkey monkey.patch_all() # noqa import time from docopt import docopt from ethereum import slogging from raiden.network.transport impo...
Allow more complex targetting in script test
Allow more complex targetting in script test
Python
mit
charles-cooper/raiden,charles-cooper/raiden,tomashaber/raiden,tomashaber/raiden,hackaugusto/raiden,tomashaber/raiden,tomashaber/raiden,tomashaber/raiden,hackaugusto/raiden
from gevent import monkey monkey.patch_all() # noqa import sys import time from ethereum import slogging from raiden.network.transport import UDPTransport from raiden.network.sockfactory import socket_factory class DummyProtocol(object): def __init__(self): self.raiden = None def receive(self, da...
""" Usage: transport_tester.py [--port=<port>] [<target_ip_optional_port>] Options: -p --port=<port> Number to use [default: 8885]. """ from gevent import monkey monkey.patch_all() # noqa import time from docopt import docopt from ethereum import slogging from raiden.network.transport impo...
<commit_before>from gevent import monkey monkey.patch_all() # noqa import sys import time from ethereum import slogging from raiden.network.transport import UDPTransport from raiden.network.sockfactory import socket_factory class DummyProtocol(object): def __init__(self): self.raiden = None def r...
""" Usage: transport_tester.py [--port=<port>] [<target_ip_optional_port>] Options: -p --port=<port> Number to use [default: 8885]. """ from gevent import monkey monkey.patch_all() # noqa import time from docopt import docopt from ethereum import slogging from raiden.network.transport impo...
from gevent import monkey monkey.patch_all() # noqa import sys import time from ethereum import slogging from raiden.network.transport import UDPTransport from raiden.network.sockfactory import socket_factory class DummyProtocol(object): def __init__(self): self.raiden = None def receive(self, da...
<commit_before>from gevent import monkey monkey.patch_all() # noqa import sys import time from ethereum import slogging from raiden.network.transport import UDPTransport from raiden.network.sockfactory import socket_factory class DummyProtocol(object): def __init__(self): self.raiden = None def r...
c073bc3290bbe33ede95a23354062b48b68ca23f
kbcstorage/__init__.py
kbcstorage/__init__.py
from pkg_resources import get_distribution, DistributionNotFound try: __version__ = get_distribution('kbcstorage').version except DistributionNotFound: # package is not installed pass
from pkg_resources import get_distribution, DistributionNotFound try: release = get_distribution('kbcstorage').version __version__ = '.'.join(release.split('.')[:2]) except DistributionNotFound: # package is not installed pass
Make package version string major.minor only
Make package version string major.minor only
Python
mit
Ogaday/sapi-python-client,Ogaday/sapi-python-client
from pkg_resources import get_distribution, DistributionNotFound try: __version__ = get_distribution('kbcstorage').version except DistributionNotFound: # package is not installed pass Make package version string major.minor only
from pkg_resources import get_distribution, DistributionNotFound try: release = get_distribution('kbcstorage').version __version__ = '.'.join(release.split('.')[:2]) except DistributionNotFound: # package is not installed pass
<commit_before>from pkg_resources import get_distribution, DistributionNotFound try: __version__ = get_distribution('kbcstorage').version except DistributionNotFound: # package is not installed pass <commit_msg>Make package version string major.minor only<commit_after>
from pkg_resources import get_distribution, DistributionNotFound try: release = get_distribution('kbcstorage').version __version__ = '.'.join(release.split('.')[:2]) except DistributionNotFound: # package is not installed pass
from pkg_resources import get_distribution, DistributionNotFound try: __version__ = get_distribution('kbcstorage').version except DistributionNotFound: # package is not installed pass Make package version string major.minor onlyfrom pkg_resources import get_distribution, DistributionNotFound try: releas...
<commit_before>from pkg_resources import get_distribution, DistributionNotFound try: __version__ = get_distribution('kbcstorage').version except DistributionNotFound: # package is not installed pass <commit_msg>Make package version string major.minor only<commit_after>from pkg_resources import get_distribut...
eb2f720d53ea4ff3450e78a30e1cdb53cd3357bb
tests/render/texture/runtest.py
tests/render/texture/runtest.py
#!/usr/bin/env python3 # # Copyright 2011-2015 Jeff Bush # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable l...
#!/usr/bin/env python3 # # Copyright 2011-2015 Jeff Bush # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable l...
Fix failing test caused by new toolchain
Fix failing test caused by new toolchain The challenge with floating point values in tests is that the value can change slightly based on the order of operations, which can legally be affected by optimizations. The results aren't visible (often just 1 ULP), but the tests validate exact bit patterns. This test would b...
Python
apache-2.0
jbush001/NyuziProcessor,jbush001/NyuziProcessor,jbush001/NyuziProcessor,jbush001/NyuziProcessor,jbush001/NyuziProcessor,jbush001/NyuziProcessor
#!/usr/bin/env python3 # # Copyright 2011-2015 Jeff Bush # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable l...
#!/usr/bin/env python3 # # Copyright 2011-2015 Jeff Bush # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable l...
<commit_before>#!/usr/bin/env python3 # # Copyright 2011-2015 Jeff Bush # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required ...
#!/usr/bin/env python3 # # Copyright 2011-2015 Jeff Bush # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable l...
#!/usr/bin/env python3 # # Copyright 2011-2015 Jeff Bush # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable l...
<commit_before>#!/usr/bin/env python3 # # Copyright 2011-2015 Jeff Bush # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required ...
a04f3d167011e6d0e50d6a088f5877769fbedaa2
testfixtures/shop_order.py
testfixtures/shop_order.py
""" testfixtures.shop_order ~~~~~~~~~~~~~~~~~~~~~~~ :Copyright: 2006-2018 Jochen Kupperschmidt :License: Modified BSD, see LICENSE for details. """ from byceps.services.shop.order.models.order import Order from byceps.services.shop.order.models.orderer import Orderer from byceps.services.shop.order import service fro...
""" testfixtures.shop_order ~~~~~~~~~~~~~~~~~~~~~~~ :Copyright: 2006-2018 Jochen Kupperschmidt :License: Modified BSD, see LICENSE for details. """ from byceps.services.shop.order.models.order import Order from byceps.services.shop.order.models.orderer import Orderer from byceps.services.shop.order.transfer.models im...
Remove unused test fixture `create_order_item`
Remove unused test fixture `create_order_item`
Python
bsd-3-clause
homeworkprod/byceps,m-ober/byceps,homeworkprod/byceps,homeworkprod/byceps,m-ober/byceps,m-ober/byceps
""" testfixtures.shop_order ~~~~~~~~~~~~~~~~~~~~~~~ :Copyright: 2006-2018 Jochen Kupperschmidt :License: Modified BSD, see LICENSE for details. """ from byceps.services.shop.order.models.order import Order from byceps.services.shop.order.models.orderer import Orderer from byceps.services.shop.order import service fro...
""" testfixtures.shop_order ~~~~~~~~~~~~~~~~~~~~~~~ :Copyright: 2006-2018 Jochen Kupperschmidt :License: Modified BSD, see LICENSE for details. """ from byceps.services.shop.order.models.order import Order from byceps.services.shop.order.models.orderer import Orderer from byceps.services.shop.order.transfer.models im...
<commit_before>""" testfixtures.shop_order ~~~~~~~~~~~~~~~~~~~~~~~ :Copyright: 2006-2018 Jochen Kupperschmidt :License: Modified BSD, see LICENSE for details. """ from byceps.services.shop.order.models.order import Order from byceps.services.shop.order.models.orderer import Orderer from byceps.services.shop.order imp...
""" testfixtures.shop_order ~~~~~~~~~~~~~~~~~~~~~~~ :Copyright: 2006-2018 Jochen Kupperschmidt :License: Modified BSD, see LICENSE for details. """ from byceps.services.shop.order.models.order import Order from byceps.services.shop.order.models.orderer import Orderer from byceps.services.shop.order.transfer.models im...
""" testfixtures.shop_order ~~~~~~~~~~~~~~~~~~~~~~~ :Copyright: 2006-2018 Jochen Kupperschmidt :License: Modified BSD, see LICENSE for details. """ from byceps.services.shop.order.models.order import Order from byceps.services.shop.order.models.orderer import Orderer from byceps.services.shop.order import service fro...
<commit_before>""" testfixtures.shop_order ~~~~~~~~~~~~~~~~~~~~~~~ :Copyright: 2006-2018 Jochen Kupperschmidt :License: Modified BSD, see LICENSE for details. """ from byceps.services.shop.order.models.order import Order from byceps.services.shop.order.models.orderer import Orderer from byceps.services.shop.order imp...
0cad0060afcc5936541b3739ff03c06b8a773ec8
tests/templatetags/test_tags.py
tests/templatetags/test_tags.py
from django import template from lazy_tags.decorators import lazy_tag register = template.Library() @register.simple_tag def test(): return '<p>hello world</p>' @register.simple_tag @lazy_tag def test_decorator(): return 'Success!' @register.simple_tag @lazy_tag def test_simple_dec_args(arg, kwarg=None...
from django import template from django.utils.safestring import mark_safe from lazy_tags.decorators import lazy_tag register = template.Library() @register.simple_tag def test(): return mark_safe('<p>hello world</p>') @register.simple_tag @lazy_tag def test_decorator(): return 'Success!' @register.simp...
Fix test on Django 1.9
Fix test on Django 1.9
Python
mit
grantmcconnaughey/django-lazy-tags,grantmcconnaughey/django-lazy-tags
from django import template from lazy_tags.decorators import lazy_tag register = template.Library() @register.simple_tag def test(): return '<p>hello world</p>' @register.simple_tag @lazy_tag def test_decorator(): return 'Success!' @register.simple_tag @lazy_tag def test_simple_dec_args(arg, kwarg=None...
from django import template from django.utils.safestring import mark_safe from lazy_tags.decorators import lazy_tag register = template.Library() @register.simple_tag def test(): return mark_safe('<p>hello world</p>') @register.simple_tag @lazy_tag def test_decorator(): return 'Success!' @register.simp...
<commit_before>from django import template from lazy_tags.decorators import lazy_tag register = template.Library() @register.simple_tag def test(): return '<p>hello world</p>' @register.simple_tag @lazy_tag def test_decorator(): return 'Success!' @register.simple_tag @lazy_tag def test_simple_dec_args(...
from django import template from django.utils.safestring import mark_safe from lazy_tags.decorators import lazy_tag register = template.Library() @register.simple_tag def test(): return mark_safe('<p>hello world</p>') @register.simple_tag @lazy_tag def test_decorator(): return 'Success!' @register.simp...
from django import template from lazy_tags.decorators import lazy_tag register = template.Library() @register.simple_tag def test(): return '<p>hello world</p>' @register.simple_tag @lazy_tag def test_decorator(): return 'Success!' @register.simple_tag @lazy_tag def test_simple_dec_args(arg, kwarg=None...
<commit_before>from django import template from lazy_tags.decorators import lazy_tag register = template.Library() @register.simple_tag def test(): return '<p>hello world</p>' @register.simple_tag @lazy_tag def test_decorator(): return 'Success!' @register.simple_tag @lazy_tag def test_simple_dec_args(...
3b71f6600d437a4e5f167315683e7f0137cd3788
tilenol/xcb/keysymparse.py
tilenol/xcb/keysymparse.py
import os import re keysym_re = re.compile(r"^#define\s+(XF86)?XK_(\w+)\s+(\S+)") class Keysyms(object): __slots__ = ('name_to_code', 'code_to_name', '__dict__') def __init__(self): self.name_to_code = {} self.code_to_name = {} def add_from_file(self, filename): with open(filena...
import os import re import logging log = logging.getLogger(__name__) keysym_re = re.compile( r"^#define\s+(XF86)?XK_(\w+)\s+" r"(?:(0x[a-fA-F0-9]+)|_EVDEV\((0x[0-9a-fA-F]+)\))" ) class Keysyms(object): __slots__ = ('name_to_code', 'code_to_name', '__dict__') def __init__(self): self.name_to_...
Fix support of fresh keysym file
Fix support of fresh keysym file
Python
mit
tailhook/tilenol,tailhook/tilenol
import os import re keysym_re = re.compile(r"^#define\s+(XF86)?XK_(\w+)\s+(\S+)") class Keysyms(object): __slots__ = ('name_to_code', 'code_to_name', '__dict__') def __init__(self): self.name_to_code = {} self.code_to_name = {} def add_from_file(self, filename): with open(filena...
import os import re import logging log = logging.getLogger(__name__) keysym_re = re.compile( r"^#define\s+(XF86)?XK_(\w+)\s+" r"(?:(0x[a-fA-F0-9]+)|_EVDEV\((0x[0-9a-fA-F]+)\))" ) class Keysyms(object): __slots__ = ('name_to_code', 'code_to_name', '__dict__') def __init__(self): self.name_to_...
<commit_before>import os import re keysym_re = re.compile(r"^#define\s+(XF86)?XK_(\w+)\s+(\S+)") class Keysyms(object): __slots__ = ('name_to_code', 'code_to_name', '__dict__') def __init__(self): self.name_to_code = {} self.code_to_name = {} def add_from_file(self, filename): w...
import os import re import logging log = logging.getLogger(__name__) keysym_re = re.compile( r"^#define\s+(XF86)?XK_(\w+)\s+" r"(?:(0x[a-fA-F0-9]+)|_EVDEV\((0x[0-9a-fA-F]+)\))" ) class Keysyms(object): __slots__ = ('name_to_code', 'code_to_name', '__dict__') def __init__(self): self.name_to_...
import os import re keysym_re = re.compile(r"^#define\s+(XF86)?XK_(\w+)\s+(\S+)") class Keysyms(object): __slots__ = ('name_to_code', 'code_to_name', '__dict__') def __init__(self): self.name_to_code = {} self.code_to_name = {} def add_from_file(self, filename): with open(filena...
<commit_before>import os import re keysym_re = re.compile(r"^#define\s+(XF86)?XK_(\w+)\s+(\S+)") class Keysyms(object): __slots__ = ('name_to_code', 'code_to_name', '__dict__') def __init__(self): self.name_to_code = {} self.code_to_name = {} def add_from_file(self, filename): w...
0a718ccee8301f28e86791e06159e6ed8a2674b4
twobuntu/articles/forms.py
twobuntu/articles/forms.py
from django import forms from twobuntu.articles.models import Article, ScheduledArticle class EditorForm(forms.ModelForm): """ Form for entering or editing articles. """ class Meta: model = Article fields = ('category', 'title', 'body') class ScheduledArticleForm(forms.ModelForm): ...
from django import forms from twobuntu.articles.models import Article, ScheduledArticle class EditorForm(forms.ModelForm): """ Form for entering or editing articles. """ # The <textarea> needs this set so that the form can validate on the client # side without any content (due to ACE editor) ...
Fix error submitting article caused by extra HTML attribute.
Fix error submitting article caused by extra HTML attribute.
Python
apache-2.0
2buntu/2buntu-blog,2buntu/2buntu-blog,2buntu/2buntu-blog
from django import forms from twobuntu.articles.models import Article, ScheduledArticle class EditorForm(forms.ModelForm): """ Form for entering or editing articles. """ class Meta: model = Article fields = ('category', 'title', 'body') class ScheduledArticleForm(forms.ModelForm): ...
from django import forms from twobuntu.articles.models import Article, ScheduledArticle class EditorForm(forms.ModelForm): """ Form for entering or editing articles. """ # The <textarea> needs this set so that the form can validate on the client # side without any content (due to ACE editor) ...
<commit_before>from django import forms from twobuntu.articles.models import Article, ScheduledArticle class EditorForm(forms.ModelForm): """ Form for entering or editing articles. """ class Meta: model = Article fields = ('category', 'title', 'body') class ScheduledArticleForm(for...
from django import forms from twobuntu.articles.models import Article, ScheduledArticle class EditorForm(forms.ModelForm): """ Form for entering or editing articles. """ # The <textarea> needs this set so that the form can validate on the client # side without any content (due to ACE editor) ...
from django import forms from twobuntu.articles.models import Article, ScheduledArticle class EditorForm(forms.ModelForm): """ Form for entering or editing articles. """ class Meta: model = Article fields = ('category', 'title', 'body') class ScheduledArticleForm(forms.ModelForm): ...
<commit_before>from django import forms from twobuntu.articles.models import Article, ScheduledArticle class EditorForm(forms.ModelForm): """ Form for entering or editing articles. """ class Meta: model = Article fields = ('category', 'title', 'body') class ScheduledArticleForm(for...
56448179cb1e93670c478f45258a261ec972385d
weathergenerator.py
weathergenerator.py
class WeatherType: def __init__(self, weathers, temperature_range, temperature_night_offset, wind_range, humidity_range): self.__weathers = weathers self.__min_temp_day, self.__max_temp_day = \ tuple(temperature_range) self.__min_temp_night, self.__max_temp_night ...
class WeatherType: def __init__(self, weathers, temperature_range, temperature_night_offset, wind_range, humidity_range): self.__weathers = weathers self.__min_temp_day, self.__max_temp_day = \ tuple(temperature_range) self.__min_temp_night, self.__max_temp_night ...
Add some draft weather types
Add some draft weather types temperature_night_offset should possibly be the range so difference between night and day is not always the same.
Python
mit
foxpy/random-weather-bot,foxpy/random-weather-bot
class WeatherType: def __init__(self, weathers, temperature_range, temperature_night_offset, wind_range, humidity_range): self.__weathers = weathers self.__min_temp_day, self.__max_temp_day = \ tuple(temperature_range) self.__min_temp_night, self.__max_temp_night ...
class WeatherType: def __init__(self, weathers, temperature_range, temperature_night_offset, wind_range, humidity_range): self.__weathers = weathers self.__min_temp_day, self.__max_temp_day = \ tuple(temperature_range) self.__min_temp_night, self.__max_temp_night ...
<commit_before>class WeatherType: def __init__(self, weathers, temperature_range, temperature_night_offset, wind_range, humidity_range): self.__weathers = weathers self.__min_temp_day, self.__max_temp_day = \ tuple(temperature_range) self.__min_temp_night, self.__...
class WeatherType: def __init__(self, weathers, temperature_range, temperature_night_offset, wind_range, humidity_range): self.__weathers = weathers self.__min_temp_day, self.__max_temp_day = \ tuple(temperature_range) self.__min_temp_night, self.__max_temp_night ...
class WeatherType: def __init__(self, weathers, temperature_range, temperature_night_offset, wind_range, humidity_range): self.__weathers = weathers self.__min_temp_day, self.__max_temp_day = \ tuple(temperature_range) self.__min_temp_night, self.__max_temp_night ...
<commit_before>class WeatherType: def __init__(self, weathers, temperature_range, temperature_night_offset, wind_range, humidity_range): self.__weathers = weathers self.__min_temp_day, self.__max_temp_day = \ tuple(temperature_range) self.__min_temp_night, self.__...
e12a4504da0b40ad66e116aa9a0373d1abc6d160
mongo_test/handlers.py
mongo_test/handlers.py
import subprocess import commands import re import signal import os import logging _logger = logging.getLogger(__name__) TARGET_DIR='test/target' PORT='27018' def startup(): _logger.info("about to start mongod") p = subprocess.Popen([commands.getoutput('which mongod'), '--port', PORT, '--fork...
import subprocess import commands import signal import os import logging _logger = logging.getLogger(__name__) TARGET_DIR='test/target' PORT='27018' def startup(mongo_path): _logger.info("about to start mongod") path = mongo_path or commands.getoutput('which mongod') p = subprocess.Popen([path, '...
Allow the option of specifying a path in startup
Allow the option of specifying a path in startup
Python
mit
idbentley/MongoTest
import subprocess import commands import re import signal import os import logging _logger = logging.getLogger(__name__) TARGET_DIR='test/target' PORT='27018' def startup(): _logger.info("about to start mongod") p = subprocess.Popen([commands.getoutput('which mongod'), '--port', PORT, '--fork...
import subprocess import commands import signal import os import logging _logger = logging.getLogger(__name__) TARGET_DIR='test/target' PORT='27018' def startup(mongo_path): _logger.info("about to start mongod") path = mongo_path or commands.getoutput('which mongod') p = subprocess.Popen([path, '...
<commit_before>import subprocess import commands import re import signal import os import logging _logger = logging.getLogger(__name__) TARGET_DIR='test/target' PORT='27018' def startup(): _logger.info("about to start mongod") p = subprocess.Popen([commands.getoutput('which mongod'), '--port', PORT, ...
import subprocess import commands import signal import os import logging _logger = logging.getLogger(__name__) TARGET_DIR='test/target' PORT='27018' def startup(mongo_path): _logger.info("about to start mongod") path = mongo_path or commands.getoutput('which mongod') p = subprocess.Popen([path, '...
import subprocess import commands import re import signal import os import logging _logger = logging.getLogger(__name__) TARGET_DIR='test/target' PORT='27018' def startup(): _logger.info("about to start mongod") p = subprocess.Popen([commands.getoutput('which mongod'), '--port', PORT, '--fork...
<commit_before>import subprocess import commands import re import signal import os import logging _logger = logging.getLogger(__name__) TARGET_DIR='test/target' PORT='27018' def startup(): _logger.info("about to start mongod") p = subprocess.Popen([commands.getoutput('which mongod'), '--port', PORT, ...
cf8b49edfc38a98b4f6beba66bedcc13298eb114
yunity/utils/tests/mock.py
yunity/utils/tests/mock.py
from factory import DjangoModelFactory, CREATE_STRATEGY, LazyAttribute, post_generation, SubFactory from yunity.models import Category from yunity.utils.tests.fake import faker class Mock(DjangoModelFactory): class Meta: strategy = CREATE_STRATEGY model = None abstract = True class Mock...
from factory import DjangoModelFactory, CREATE_STRATEGY, LazyAttribute, post_generation, SubFactory from yunity.models import Category from yunity.utils.tests.fake import faker class Mock(DjangoModelFactory): class Meta: strategy = CREATE_STRATEGY model = None abstract = True class Mock...
Rename some variables to try to explain magic
Rename some variables to try to explain magic
Python
agpl-3.0
yunity/foodsaving-backend,yunity/yunity-core,yunity/foodsaving-backend,yunity/foodsaving-backend,yunity/yunity-core
from factory import DjangoModelFactory, CREATE_STRATEGY, LazyAttribute, post_generation, SubFactory from yunity.models import Category from yunity.utils.tests.fake import faker class Mock(DjangoModelFactory): class Meta: strategy = CREATE_STRATEGY model = None abstract = True class Mock...
from factory import DjangoModelFactory, CREATE_STRATEGY, LazyAttribute, post_generation, SubFactory from yunity.models import Category from yunity.utils.tests.fake import faker class Mock(DjangoModelFactory): class Meta: strategy = CREATE_STRATEGY model = None abstract = True class Mock...
<commit_before>from factory import DjangoModelFactory, CREATE_STRATEGY, LazyAttribute, post_generation, SubFactory from yunity.models import Category from yunity.utils.tests.fake import faker class Mock(DjangoModelFactory): class Meta: strategy = CREATE_STRATEGY model = None abstract = Tr...
from factory import DjangoModelFactory, CREATE_STRATEGY, LazyAttribute, post_generation, SubFactory from yunity.models import Category from yunity.utils.tests.fake import faker class Mock(DjangoModelFactory): class Meta: strategy = CREATE_STRATEGY model = None abstract = True class Mock...
from factory import DjangoModelFactory, CREATE_STRATEGY, LazyAttribute, post_generation, SubFactory from yunity.models import Category from yunity.utils.tests.fake import faker class Mock(DjangoModelFactory): class Meta: strategy = CREATE_STRATEGY model = None abstract = True class Mock...
<commit_before>from factory import DjangoModelFactory, CREATE_STRATEGY, LazyAttribute, post_generation, SubFactory from yunity.models import Category from yunity.utils.tests.fake import faker class Mock(DjangoModelFactory): class Meta: strategy = CREATE_STRATEGY model = None abstract = Tr...
bc9f4d4e5022f4219727e9085164982f9efb005e
editor/views/generic.py
editor/views/generic.py
import git import os from django.conf import settings from django.http import HttpResponseRedirect from django.shortcuts import render class SaveContentMixin(): """Save exam or question content to a git repository and to a database.""" # object = None # request = None # template_name = None ...
import git import os from django.conf import settings from django.http import HttpResponseRedirect from django.shortcuts import render class SaveContentMixin(): """Save exam or question content to a git repository and to a database.""" # object = None # request = None # template_name = None ...
Set the git author name and e-mail
Set the git author name and e-mail
Python
apache-2.0
numbas/editor,numbas/editor,numbas/editor
import git import os from django.conf import settings from django.http import HttpResponseRedirect from django.shortcuts import render class SaveContentMixin(): """Save exam or question content to a git repository and to a database.""" # object = None # request = None # template_name = None ...
import git import os from django.conf import settings from django.http import HttpResponseRedirect from django.shortcuts import render class SaveContentMixin(): """Save exam or question content to a git repository and to a database.""" # object = None # request = None # template_name = None ...
<commit_before>import git import os from django.conf import settings from django.http import HttpResponseRedirect from django.shortcuts import render class SaveContentMixin(): """Save exam or question content to a git repository and to a database.""" # object = None # request = None # template_...
import git import os from django.conf import settings from django.http import HttpResponseRedirect from django.shortcuts import render class SaveContentMixin(): """Save exam or question content to a git repository and to a database.""" # object = None # request = None # template_name = None ...
import git import os from django.conf import settings from django.http import HttpResponseRedirect from django.shortcuts import render class SaveContentMixin(): """Save exam or question content to a git repository and to a database.""" # object = None # request = None # template_name = None ...
<commit_before>import git import os from django.conf import settings from django.http import HttpResponseRedirect from django.shortcuts import render class SaveContentMixin(): """Save exam or question content to a git repository and to a database.""" # object = None # request = None # template_...
7b8ba30efc8853ab19dfd95a97f56c8329ddfb4b
newsParser/__init__.py
newsParser/__init__.py
#!/usr/bin/env python # -*- coding: utf-8 -*- # @Author: balicanta # @Date: 2014-11-01 21:02:00 # @Last Modified by: balicanta # @Last Modified time: 2014-11-01 21:02:00
#!/usr/bin/env python # -*- coding: utf-8 -*- # @Author: balicanta # @Date: 2014-11-01 21:02:00 # @Last Modified by: balicanta # @Last Modified time: 2014-11-05 22:19:01 from NewsParser import NewsParser
Add initi for beautiful API
Add initi for beautiful API
Python
mit
Lab-317/NewsParser
#!/usr/bin/env python # -*- coding: utf-8 -*- # @Author: balicanta # @Date: 2014-11-01 21:02:00 # @Last Modified by: balicanta # @Last Modified time: 2014-11-01 21:02:00 Add initi for beautiful API
#!/usr/bin/env python # -*- coding: utf-8 -*- # @Author: balicanta # @Date: 2014-11-01 21:02:00 # @Last Modified by: balicanta # @Last Modified time: 2014-11-05 22:19:01 from NewsParser import NewsParser
<commit_before>#!/usr/bin/env python # -*- coding: utf-8 -*- # @Author: balicanta # @Date: 2014-11-01 21:02:00 # @Last Modified by: balicanta # @Last Modified time: 2014-11-01 21:02:00 <commit_msg>Add initi for beautiful API<commit_after>
#!/usr/bin/env python # -*- coding: utf-8 -*- # @Author: balicanta # @Date: 2014-11-01 21:02:00 # @Last Modified by: balicanta # @Last Modified time: 2014-11-05 22:19:01 from NewsParser import NewsParser
#!/usr/bin/env python # -*- coding: utf-8 -*- # @Author: balicanta # @Date: 2014-11-01 21:02:00 # @Last Modified by: balicanta # @Last Modified time: 2014-11-01 21:02:00 Add initi for beautiful API#!/usr/bin/env python # -*- coding: utf-8 -*- # @Author: balicanta # @Date: 2014-11-01 21:02:00 # @Last Modified by: ...
<commit_before>#!/usr/bin/env python # -*- coding: utf-8 -*- # @Author: balicanta # @Date: 2014-11-01 21:02:00 # @Last Modified by: balicanta # @Last Modified time: 2014-11-01 21:02:00 <commit_msg>Add initi for beautiful API<commit_after>#!/usr/bin/env python # -*- coding: utf-8 -*- # @Author: balicanta # @Date: ...
e15484bc57b47513545b2be423f24d4dd0312590
comics/management/commands/generatesecretkey.py
comics/management/commands/generatesecretkey.py
from __future__ import unicode_literals import os, re import tenma from django.conf import settings from django.core import management from django.utils.crypto import get_random_string from shutil import copyfile, move BASE_DIR = os.path.dirname(tenma.__file__) class Command(management.BaseCommand): help = 'Genera...
from __future__ import unicode_literals import os, re import tenma from django.conf import settings from django.core import management from django.utils.crypto import get_random_string from shutil import copyfile, move BASE_DIR = os.path.dirname(tenma.__file__) class Command(management.BaseCommand): help = 'Genera...
Fix some characters messing up the SECRET_KEY
Fix some characters messing up the SECRET_KEY
Python
mit
Tenma-Server/Tenma,hmhrex/Tenma,Tenma-Server/Tenma,hmhrex/Tenma,Tenma-Server/Tenma,hmhrex/Tenma
from __future__ import unicode_literals import os, re import tenma from django.conf import settings from django.core import management from django.utils.crypto import get_random_string from shutil import copyfile, move BASE_DIR = os.path.dirname(tenma.__file__) class Command(management.BaseCommand): help = 'Genera...
from __future__ import unicode_literals import os, re import tenma from django.conf import settings from django.core import management from django.utils.crypto import get_random_string from shutil import copyfile, move BASE_DIR = os.path.dirname(tenma.__file__) class Command(management.BaseCommand): help = 'Genera...
<commit_before>from __future__ import unicode_literals import os, re import tenma from django.conf import settings from django.core import management from django.utils.crypto import get_random_string from shutil import copyfile, move BASE_DIR = os.path.dirname(tenma.__file__) class Command(management.BaseCommand): ...
from __future__ import unicode_literals import os, re import tenma from django.conf import settings from django.core import management from django.utils.crypto import get_random_string from shutil import copyfile, move BASE_DIR = os.path.dirname(tenma.__file__) class Command(management.BaseCommand): help = 'Genera...
from __future__ import unicode_literals import os, re import tenma from django.conf import settings from django.core import management from django.utils.crypto import get_random_string from shutil import copyfile, move BASE_DIR = os.path.dirname(tenma.__file__) class Command(management.BaseCommand): help = 'Genera...
<commit_before>from __future__ import unicode_literals import os, re import tenma from django.conf import settings from django.core import management from django.utils.crypto import get_random_string from shutil import copyfile, move BASE_DIR = os.path.dirname(tenma.__file__) class Command(management.BaseCommand): ...
e3c7322b0efe10041ba9c38963b9e9f188d9a54a
pkit/slot/decorators.py
pkit/slot/decorators.py
import functools from pkit.slot import get_slot_pool def acquire(pool_name): """Actor's method decorator to auto-acquire a slot before execution""" def decorator(method): @functools.wraps(method) def wrapper(self, *args, **kwargs): slots_pool = get_slot_pool(pool_name) ...
import functools from pkit.slot import get_slot_pool def acquire(pool_name): """Actor's method decorator to auto-acquire a slot before execution""" def decorator(method): @functools.wraps(method) def wrapper(self, *args, **kwargs): slots_pool = get_slot_pool(pool_name) ...
Fix slot release on method exception
Fix slot release on method exception
Python
mit
botify-labs/process-kit
import functools from pkit.slot import get_slot_pool def acquire(pool_name): """Actor's method decorator to auto-acquire a slot before execution""" def decorator(method): @functools.wraps(method) def wrapper(self, *args, **kwargs): slots_pool = get_slot_pool(pool_name) ...
import functools from pkit.slot import get_slot_pool def acquire(pool_name): """Actor's method decorator to auto-acquire a slot before execution""" def decorator(method): @functools.wraps(method) def wrapper(self, *args, **kwargs): slots_pool = get_slot_pool(pool_name) ...
<commit_before>import functools from pkit.slot import get_slot_pool def acquire(pool_name): """Actor's method decorator to auto-acquire a slot before execution""" def decorator(method): @functools.wraps(method) def wrapper(self, *args, **kwargs): slots_pool = get_slot_pool(pool_na...
import functools from pkit.slot import get_slot_pool def acquire(pool_name): """Actor's method decorator to auto-acquire a slot before execution""" def decorator(method): @functools.wraps(method) def wrapper(self, *args, **kwargs): slots_pool = get_slot_pool(pool_name) ...
import functools from pkit.slot import get_slot_pool def acquire(pool_name): """Actor's method decorator to auto-acquire a slot before execution""" def decorator(method): @functools.wraps(method) def wrapper(self, *args, **kwargs): slots_pool = get_slot_pool(pool_name) ...
<commit_before>import functools from pkit.slot import get_slot_pool def acquire(pool_name): """Actor's method decorator to auto-acquire a slot before execution""" def decorator(method): @functools.wraps(method) def wrapper(self, *args, **kwargs): slots_pool = get_slot_pool(pool_na...
e567b70608d25a4f3e0e189ea51edb2c4f0aa2be
cronos/libraries/log.py
cronos/libraries/log.py
# -*- coding: utf-8 -*- from django.conf import settings from django.core.mail import send_mail import logging #import traceback def cronos_debug(msg, logfile): ''' To be deprecated, along with the import logging and settings ''' logging.basicConfig(level = logging.DEBUG, format = '%(asctime)s: %(mess...
# -*- coding: utf-8 -*- from django.conf import settings from django.core.mail import send_mail def mail_cronos_admin(title, message): ''' Wrapper function of send_mail ''' try: send_mail(title, message, 'notification@cronos.teilar.gr', [settings.ADMIN[0][1]]) except: pass class C...
Remove cronos_debug, un-hardcode the mail address in mail_cronos_admin
Remove cronos_debug, un-hardcode the mail address in mail_cronos_admin
Python
agpl-3.0
LinuxTeam-teilar/cronos.teilar.gr,LinuxTeam-teilar/cronos.teilar.gr,LinuxTeam-teilar/cronos.teilar.gr
# -*- coding: utf-8 -*- from django.conf import settings from django.core.mail import send_mail import logging #import traceback def cronos_debug(msg, logfile): ''' To be deprecated, along with the import logging and settings ''' logging.basicConfig(level = logging.DEBUG, format = '%(asctime)s: %(mess...
# -*- coding: utf-8 -*- from django.conf import settings from django.core.mail import send_mail def mail_cronos_admin(title, message): ''' Wrapper function of send_mail ''' try: send_mail(title, message, 'notification@cronos.teilar.gr', [settings.ADMIN[0][1]]) except: pass class C...
<commit_before># -*- coding: utf-8 -*- from django.conf import settings from django.core.mail import send_mail import logging #import traceback def cronos_debug(msg, logfile): ''' To be deprecated, along with the import logging and settings ''' logging.basicConfig(level = logging.DEBUG, format = '%(as...
# -*- coding: utf-8 -*- from django.conf import settings from django.core.mail import send_mail def mail_cronos_admin(title, message): ''' Wrapper function of send_mail ''' try: send_mail(title, message, 'notification@cronos.teilar.gr', [settings.ADMIN[0][1]]) except: pass class C...
# -*- coding: utf-8 -*- from django.conf import settings from django.core.mail import send_mail import logging #import traceback def cronos_debug(msg, logfile): ''' To be deprecated, along with the import logging and settings ''' logging.basicConfig(level = logging.DEBUG, format = '%(asctime)s: %(mess...
<commit_before># -*- coding: utf-8 -*- from django.conf import settings from django.core.mail import send_mail import logging #import traceback def cronos_debug(msg, logfile): ''' To be deprecated, along with the import logging and settings ''' logging.basicConfig(level = logging.DEBUG, format = '%(as...
06d0f52608f79f675847e903577e20be03189041
django_any/forms.py
django_any/forms.py
# -*- coding: utf-8 -*- """ Django forms data generators """ from django import forms from django_any import xunit class FormFieldDataFactory(object): def __init__(self): self.registry = {} def register(self, field_type, impl=None): def _wrapper(func): self.registry[field_type] = ...
# -*- coding: utf-8 -*- """ Django forms data generators """ from django import forms from django_any import xunit class FormFieldDataFactory(object): """ Registry storage for form field data functions Works like one parameter multimethod """ def __init__(self): self.registry = {} de...
Fix some pylint found errors and warnings
Fix some pylint found errors and warnings
Python
mit
kmmbvnr/django-any,abakar/django-whatever,abakar/django-whatever
# -*- coding: utf-8 -*- """ Django forms data generators """ from django import forms from django_any import xunit class FormFieldDataFactory(object): def __init__(self): self.registry = {} def register(self, field_type, impl=None): def _wrapper(func): self.registry[field_type] = ...
# -*- coding: utf-8 -*- """ Django forms data generators """ from django import forms from django_any import xunit class FormFieldDataFactory(object): """ Registry storage for form field data functions Works like one parameter multimethod """ def __init__(self): self.registry = {} de...
<commit_before># -*- coding: utf-8 -*- """ Django forms data generators """ from django import forms from django_any import xunit class FormFieldDataFactory(object): def __init__(self): self.registry = {} def register(self, field_type, impl=None): def _wrapper(func): self.registry...
# -*- coding: utf-8 -*- """ Django forms data generators """ from django import forms from django_any import xunit class FormFieldDataFactory(object): """ Registry storage for form field data functions Works like one parameter multimethod """ def __init__(self): self.registry = {} de...
# -*- coding: utf-8 -*- """ Django forms data generators """ from django import forms from django_any import xunit class FormFieldDataFactory(object): def __init__(self): self.registry = {} def register(self, field_type, impl=None): def _wrapper(func): self.registry[field_type] = ...
<commit_before># -*- coding: utf-8 -*- """ Django forms data generators """ from django import forms from django_any import xunit class FormFieldDataFactory(object): def __init__(self): self.registry = {} def register(self, field_type, impl=None): def _wrapper(func): self.registry...
6dcbc85b59bd9cc7eed381c7ef0efeb2f78620cf
comics/comics/whomp.py
comics/comics/whomp.py
import re from comics.aggregator.crawler import CrawlerBase, CrawlerImage from comics.core.comic_data import ComicDataBase class ComicData(ComicDataBase): name = "Whomp!" language = "en" url = "http://www.whompcomic.com/" start_date = "2010-06-14" rights = "Ronnie Filyaw" class Crawler(CrawlerB...
from comics.aggregator.crawler import CrawlerBase, CrawlerImage from comics.core.comic_data import ComicDataBase class ComicData(ComicDataBase): name = "Whomp!" language = "en" url = "http://www.whompcomic.com/" start_date = "2010-06-14" rights = "Ronnie Filyaw" class Crawler(CrawlerBase): h...
Rewrite crawler for "Whomp!" after feed change
Rewrite crawler for "Whomp!" after feed change
Python
agpl-3.0
datagutten/comics,jodal/comics,datagutten/comics,datagutten/comics,datagutten/comics,jodal/comics,jodal/comics,jodal/comics
import re from comics.aggregator.crawler import CrawlerBase, CrawlerImage from comics.core.comic_data import ComicDataBase class ComicData(ComicDataBase): name = "Whomp!" language = "en" url = "http://www.whompcomic.com/" start_date = "2010-06-14" rights = "Ronnie Filyaw" class Crawler(CrawlerB...
from comics.aggregator.crawler import CrawlerBase, CrawlerImage from comics.core.comic_data import ComicDataBase class ComicData(ComicDataBase): name = "Whomp!" language = "en" url = "http://www.whompcomic.com/" start_date = "2010-06-14" rights = "Ronnie Filyaw" class Crawler(CrawlerBase): h...
<commit_before>import re from comics.aggregator.crawler import CrawlerBase, CrawlerImage from comics.core.comic_data import ComicDataBase class ComicData(ComicDataBase): name = "Whomp!" language = "en" url = "http://www.whompcomic.com/" start_date = "2010-06-14" rights = "Ronnie Filyaw" class C...
from comics.aggregator.crawler import CrawlerBase, CrawlerImage from comics.core.comic_data import ComicDataBase class ComicData(ComicDataBase): name = "Whomp!" language = "en" url = "http://www.whompcomic.com/" start_date = "2010-06-14" rights = "Ronnie Filyaw" class Crawler(CrawlerBase): h...
import re from comics.aggregator.crawler import CrawlerBase, CrawlerImage from comics.core.comic_data import ComicDataBase class ComicData(ComicDataBase): name = "Whomp!" language = "en" url = "http://www.whompcomic.com/" start_date = "2010-06-14" rights = "Ronnie Filyaw" class Crawler(CrawlerB...
<commit_before>import re from comics.aggregator.crawler import CrawlerBase, CrawlerImage from comics.core.comic_data import ComicDataBase class ComicData(ComicDataBase): name = "Whomp!" language = "en" url = "http://www.whompcomic.com/" start_date = "2010-06-14" rights = "Ronnie Filyaw" class C...
1224e7e2f12b455ffa1f8c102b30012d63716cae
flask_bracket/errors.py
flask_bracket/errors.py
"""API errors.""" from werkzeug.exceptions import HTTPException class Error(Exception): status = 500 error = "internal server error" def __init__(self, error=None, status=None): """Create an API error with the given error and status code.""" self.status = status or self.__class__.status ...
"""API errors.""" from werkzeug.exceptions import HTTPException class Error(Exception): status = 500 error = "internal server error" def __init__(self, error=None, status=None): """Create an API error with the given error and status code.""" self.status = status or self.__class__.status ...
Remove redundant status code from error response body.
Remove redundant status code from error response body.
Python
bsd-3-clause
JsonChiu/flask-bracket
"""API errors.""" from werkzeug.exceptions import HTTPException class Error(Exception): status = 500 error = "internal server error" def __init__(self, error=None, status=None): """Create an API error with the given error and status code.""" self.status = status or self.__class__.status ...
"""API errors.""" from werkzeug.exceptions import HTTPException class Error(Exception): status = 500 error = "internal server error" def __init__(self, error=None, status=None): """Create an API error with the given error and status code.""" self.status = status or self.__class__.status ...
<commit_before>"""API errors.""" from werkzeug.exceptions import HTTPException class Error(Exception): status = 500 error = "internal server error" def __init__(self, error=None, status=None): """Create an API error with the given error and status code.""" self.status = status or self.__c...
"""API errors.""" from werkzeug.exceptions import HTTPException class Error(Exception): status = 500 error = "internal server error" def __init__(self, error=None, status=None): """Create an API error with the given error and status code.""" self.status = status or self.__class__.status ...
"""API errors.""" from werkzeug.exceptions import HTTPException class Error(Exception): status = 500 error = "internal server error" def __init__(self, error=None, status=None): """Create an API error with the given error and status code.""" self.status = status or self.__class__.status ...
<commit_before>"""API errors.""" from werkzeug.exceptions import HTTPException class Error(Exception): status = 500 error = "internal server error" def __init__(self, error=None, status=None): """Create an API error with the given error and status code.""" self.status = status or self.__c...
4029da285fff38524cd30212475868ccda457df6
pylibscrypt/__init__.py
pylibscrypt/__init__.py
'Scrypt for Python' __version__ = '1.1.0' # First, try loading libscrypt _done = False try: from pylibscrypt import * except ImportError: pass else: _done = True # If that didn't work, try the scrypt module if not _done: try: from pyscrypt import * except ImportError: pass els...
"""Scrypt for Python""" __version__ = '1.2.0-git' # First, try loading libscrypt _done = False try: from pylibscrypt import * except ImportError: pass else: _done = True # If that didn't work, try the scrypt module if not _done: try: from pyscrypt import * except ImportError: pass...
Increment version number for git master
Increment version number for git master
Python
isc
jvarho/pylibscrypt,jvarho/pylibscrypt
'Scrypt for Python' __version__ = '1.1.0' # First, try loading libscrypt _done = False try: from pylibscrypt import * except ImportError: pass else: _done = True # If that didn't work, try the scrypt module if not _done: try: from pyscrypt import * except ImportError: pass els...
"""Scrypt for Python""" __version__ = '1.2.0-git' # First, try loading libscrypt _done = False try: from pylibscrypt import * except ImportError: pass else: _done = True # If that didn't work, try the scrypt module if not _done: try: from pyscrypt import * except ImportError: pass...
<commit_before>'Scrypt for Python' __version__ = '1.1.0' # First, try loading libscrypt _done = False try: from pylibscrypt import * except ImportError: pass else: _done = True # If that didn't work, try the scrypt module if not _done: try: from pyscrypt import * except ImportError: ...
"""Scrypt for Python""" __version__ = '1.2.0-git' # First, try loading libscrypt _done = False try: from pylibscrypt import * except ImportError: pass else: _done = True # If that didn't work, try the scrypt module if not _done: try: from pyscrypt import * except ImportError: pass...
'Scrypt for Python' __version__ = '1.1.0' # First, try loading libscrypt _done = False try: from pylibscrypt import * except ImportError: pass else: _done = True # If that didn't work, try the scrypt module if not _done: try: from pyscrypt import * except ImportError: pass els...
<commit_before>'Scrypt for Python' __version__ = '1.1.0' # First, try loading libscrypt _done = False try: from pylibscrypt import * except ImportError: pass else: _done = True # If that didn't work, try the scrypt module if not _done: try: from pyscrypt import * except ImportError: ...
111dc7a749e783af2bd9bb391520cf5b8f846027
test/python_api/disassemble-raw-data/TestDisassembleRawData.py
test/python_api/disassemble-raw-data/TestDisassembleRawData.py
""" Use lldb Python API to disassemble raw machine code bytes """ import os, time import re import unittest2 import lldb, lldbutil from lldbtest import * class DisassembleRawDataTestCase(TestBase): mydir = TestBase.compute_mydir(__file__) @python_api_test def test_disassemble_raw_data(self): """...
""" Use lldb Python API to disassemble raw machine code bytes """ import os, time import re import unittest2 import lldb, lldbutil from lldbtest import * class DisassembleRawDataTestCase(TestBase): mydir = TestBase.compute_mydir(__file__) @python_api_test def test_disassemble_raw_data(self): """...
Fix the test to disassemble as if at address zero, not at an invalid address. The default SBAddress constructor sets the offset to 0xffffffffffffffff and the section to NULL.
Fix the test to disassemble as if at address zero, not at an invalid address. The default SBAddress constructor sets the offset to 0xffffffffffffffff and the section to NULL. This was causing problems on clang 602 branches that use MemoryObjects to as the container for opcode bytes instead of a plain array of bytes. S...
Python
apache-2.0
apple/swift-lldb,apple/swift-lldb,llvm-mirror/lldb,llvm-mirror/lldb,apple/swift-lldb,apple/swift-lldb,llvm-mirror/lldb,llvm-mirror/lldb,apple/swift-lldb,llvm-mirror/lldb,apple/swift-lldb
""" Use lldb Python API to disassemble raw machine code bytes """ import os, time import re import unittest2 import lldb, lldbutil from lldbtest import * class DisassembleRawDataTestCase(TestBase): mydir = TestBase.compute_mydir(__file__) @python_api_test def test_disassemble_raw_data(self): """...
""" Use lldb Python API to disassemble raw machine code bytes """ import os, time import re import unittest2 import lldb, lldbutil from lldbtest import * class DisassembleRawDataTestCase(TestBase): mydir = TestBase.compute_mydir(__file__) @python_api_test def test_disassemble_raw_data(self): """...
<commit_before>""" Use lldb Python API to disassemble raw machine code bytes """ import os, time import re import unittest2 import lldb, lldbutil from lldbtest import * class DisassembleRawDataTestCase(TestBase): mydir = TestBase.compute_mydir(__file__) @python_api_test def test_disassemble_raw_data(sel...
""" Use lldb Python API to disassemble raw machine code bytes """ import os, time import re import unittest2 import lldb, lldbutil from lldbtest import * class DisassembleRawDataTestCase(TestBase): mydir = TestBase.compute_mydir(__file__) @python_api_test def test_disassemble_raw_data(self): """...
""" Use lldb Python API to disassemble raw machine code bytes """ import os, time import re import unittest2 import lldb, lldbutil from lldbtest import * class DisassembleRawDataTestCase(TestBase): mydir = TestBase.compute_mydir(__file__) @python_api_test def test_disassemble_raw_data(self): """...
<commit_before>""" Use lldb Python API to disassemble raw machine code bytes """ import os, time import re import unittest2 import lldb, lldbutil from lldbtest import * class DisassembleRawDataTestCase(TestBase): mydir = TestBase.compute_mydir(__file__) @python_api_test def test_disassemble_raw_data(sel...
ef0a411af84a70f1176fde320a974d213ca96f4d
field_required_res_partner/__openerp__.py
field_required_res_partner/__openerp__.py
# -*- coding: utf-8 -*- # © <YEAR(S)> <AUTHOR(S)> # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). { "name": "Field(s) Required Res Partner", "summary": "Customers and Suppliers Field Required", "version": "9.0.1.0.0", "category": "", "website": "https://odoo-community.org/", ...
# -*- coding: utf-8 -*- # © <YEAR(S)> <AUTHOR(S)> # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). { "name": "Field Required in Partners", "summary": "Customers and Suppliers Field Required", "version": "9.0.1.0.0", "category": "", "website": "https://odoo-community.org/", "a...
Change the name of module in the manifest
[FIX] Change the name of module in the manifest
Python
agpl-3.0
Gebesa-Dev/Addons-gebesa
# -*- coding: utf-8 -*- # © <YEAR(S)> <AUTHOR(S)> # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). { "name": "Field(s) Required Res Partner", "summary": "Customers and Suppliers Field Required", "version": "9.0.1.0.0", "category": "", "website": "https://odoo-community.org/", ...
# -*- coding: utf-8 -*- # © <YEAR(S)> <AUTHOR(S)> # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). { "name": "Field Required in Partners", "summary": "Customers and Suppliers Field Required", "version": "9.0.1.0.0", "category": "", "website": "https://odoo-community.org/", "a...
<commit_before># -*- coding: utf-8 -*- # © <YEAR(S)> <AUTHOR(S)> # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). { "name": "Field(s) Required Res Partner", "summary": "Customers and Suppliers Field Required", "version": "9.0.1.0.0", "category": "", "website": "https://odoo-commu...
# -*- coding: utf-8 -*- # © <YEAR(S)> <AUTHOR(S)> # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). { "name": "Field Required in Partners", "summary": "Customers and Suppliers Field Required", "version": "9.0.1.0.0", "category": "", "website": "https://odoo-community.org/", "a...
# -*- coding: utf-8 -*- # © <YEAR(S)> <AUTHOR(S)> # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). { "name": "Field(s) Required Res Partner", "summary": "Customers and Suppliers Field Required", "version": "9.0.1.0.0", "category": "", "website": "https://odoo-community.org/", ...
<commit_before># -*- coding: utf-8 -*- # © <YEAR(S)> <AUTHOR(S)> # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). { "name": "Field(s) Required Res Partner", "summary": "Customers and Suppliers Field Required", "version": "9.0.1.0.0", "category": "", "website": "https://odoo-commu...
efc9013bff8251fc910ecb70d546a8508ed0f7ec
tests/race_deleting_keys_test.py
tests/race_deleting_keys_test.py
import time as _time import subprocess import sys import redisdl import unittest import json import os.path from . import util from . import big_data class RaceDeletingKeysTest(unittest.TestCase): def setUp(self): import redis self.r = redis.Redis() for key in self.r.keys('*'): ...
import nose.plugins.attrib import time as _time import subprocess import sys import redisdl import unittest import json import os.path from . import util from . import big_data @nose.plugins.attrib.attr('slow') class RaceDeletingKeysTest(unittest.TestCase): def setUp(self): import redis self.r = re...
Mark test slow via nose attrib plugin
Mark test slow via nose attrib plugin
Python
bsd-2-clause
p/redis-dump-load,hyunchel/redis-dump-load,hyunchel/redis-dump-load,p/redis-dump-load
import time as _time import subprocess import sys import redisdl import unittest import json import os.path from . import util from . import big_data class RaceDeletingKeysTest(unittest.TestCase): def setUp(self): import redis self.r = redis.Redis() for key in self.r.keys('*'): ...
import nose.plugins.attrib import time as _time import subprocess import sys import redisdl import unittest import json import os.path from . import util from . import big_data @nose.plugins.attrib.attr('slow') class RaceDeletingKeysTest(unittest.TestCase): def setUp(self): import redis self.r = re...
<commit_before>import time as _time import subprocess import sys import redisdl import unittest import json import os.path from . import util from . import big_data class RaceDeletingKeysTest(unittest.TestCase): def setUp(self): import redis self.r = redis.Redis() for key in self.r.keys('*'...
import nose.plugins.attrib import time as _time import subprocess import sys import redisdl import unittest import json import os.path from . import util from . import big_data @nose.plugins.attrib.attr('slow') class RaceDeletingKeysTest(unittest.TestCase): def setUp(self): import redis self.r = re...
import time as _time import subprocess import sys import redisdl import unittest import json import os.path from . import util from . import big_data class RaceDeletingKeysTest(unittest.TestCase): def setUp(self): import redis self.r = redis.Redis() for key in self.r.keys('*'): ...
<commit_before>import time as _time import subprocess import sys import redisdl import unittest import json import os.path from . import util from . import big_data class RaceDeletingKeysTest(unittest.TestCase): def setUp(self): import redis self.r = redis.Redis() for key in self.r.keys('*'...
ac7e966e22c9919ef3b3235ee2c69ee30d83c41f
test.py
test.py
import subprocess import unittest class CompareErrorMessages(unittest.TestCase): def test_missing_file_return_code_the_same_as_ls(self): args = ['./lss.sh', 'foo'] ret = subprocess.call(args) args2 = ['ls', 'foo'] ret2 = subprocess.call(args2) self.assertEqual(ret == 0, ret2...
import subprocess import unittest class CompareErrorMessages(unittest.TestCase): def test_missing_file_return_code_the_same_as_ls(self): args = ['./lss.sh', 'foo'] ret = subprocess.call(args) args2 = ['ls', 'foo'] ret2 = subprocess.call(args2) self.assertEqual(ret == 0, ret2...
Move retrieving output into method.
Move retrieving output into method.
Python
bsd-3-clause
jwg4/les,jwg4/les
import subprocess import unittest class CompareErrorMessages(unittest.TestCase): def test_missing_file_return_code_the_same_as_ls(self): args = ['./lss.sh', 'foo'] ret = subprocess.call(args) args2 = ['ls', 'foo'] ret2 = subprocess.call(args2) self.assertEqual(ret == 0, ret2...
import subprocess import unittest class CompareErrorMessages(unittest.TestCase): def test_missing_file_return_code_the_same_as_ls(self): args = ['./lss.sh', 'foo'] ret = subprocess.call(args) args2 = ['ls', 'foo'] ret2 = subprocess.call(args2) self.assertEqual(ret == 0, ret2...
<commit_before>import subprocess import unittest class CompareErrorMessages(unittest.TestCase): def test_missing_file_return_code_the_same_as_ls(self): args = ['./lss.sh', 'foo'] ret = subprocess.call(args) args2 = ['ls', 'foo'] ret2 = subprocess.call(args2) self.assertEqual...
import subprocess import unittest class CompareErrorMessages(unittest.TestCase): def test_missing_file_return_code_the_same_as_ls(self): args = ['./lss.sh', 'foo'] ret = subprocess.call(args) args2 = ['ls', 'foo'] ret2 = subprocess.call(args2) self.assertEqual(ret == 0, ret2...
import subprocess import unittest class CompareErrorMessages(unittest.TestCase): def test_missing_file_return_code_the_same_as_ls(self): args = ['./lss.sh', 'foo'] ret = subprocess.call(args) args2 = ['ls', 'foo'] ret2 = subprocess.call(args2) self.assertEqual(ret == 0, ret2...
<commit_before>import subprocess import unittest class CompareErrorMessages(unittest.TestCase): def test_missing_file_return_code_the_same_as_ls(self): args = ['./lss.sh', 'foo'] ret = subprocess.call(args) args2 = ['ls', 'foo'] ret2 = subprocess.call(args2) self.assertEqual...
d73492a62e5ddc1eb85f4b17a6a0e6ce88410070
infosystem/scheduler.py
infosystem/scheduler.py
from apscheduler.schedulers.background import BackgroundScheduler class Scheduler(BackgroundScheduler): def __init__(self): super().__init__() self.start() def schedule(self, callback, **kwargs): self.add_job(callback, 'cron', **kwargs)
from apscheduler.schedulers.background import BackgroundScheduler class Scheduler(BackgroundScheduler): def __init__(self): super().__init__() self.start() def schedule(self, callback, **kwargs): self.add_job(callback, 'cron', **kwargs) def hourly(self, callback, minute=0): ...
Add hourly, daily, weelky and monthly sched helpers
Add hourly, daily, weelky and monthly sched helpers
Python
apache-2.0
samueldmq/infosystem
from apscheduler.schedulers.background import BackgroundScheduler class Scheduler(BackgroundScheduler): def __init__(self): super().__init__() self.start() def schedule(self, callback, **kwargs): self.add_job(callback, 'cron', **kwargs) Add hourly, daily, weelky and monthly sched hel...
from apscheduler.schedulers.background import BackgroundScheduler class Scheduler(BackgroundScheduler): def __init__(self): super().__init__() self.start() def schedule(self, callback, **kwargs): self.add_job(callback, 'cron', **kwargs) def hourly(self, callback, minute=0): ...
<commit_before>from apscheduler.schedulers.background import BackgroundScheduler class Scheduler(BackgroundScheduler): def __init__(self): super().__init__() self.start() def schedule(self, callback, **kwargs): self.add_job(callback, 'cron', **kwargs) <commit_msg>Add hourly, daily, w...
from apscheduler.schedulers.background import BackgroundScheduler class Scheduler(BackgroundScheduler): def __init__(self): super().__init__() self.start() def schedule(self, callback, **kwargs): self.add_job(callback, 'cron', **kwargs) def hourly(self, callback, minute=0): ...
from apscheduler.schedulers.background import BackgroundScheduler class Scheduler(BackgroundScheduler): def __init__(self): super().__init__() self.start() def schedule(self, callback, **kwargs): self.add_job(callback, 'cron', **kwargs) Add hourly, daily, weelky and monthly sched hel...
<commit_before>from apscheduler.schedulers.background import BackgroundScheduler class Scheduler(BackgroundScheduler): def __init__(self): super().__init__() self.start() def schedule(self, callback, **kwargs): self.add_job(callback, 'cron', **kwargs) <commit_msg>Add hourly, daily, w...
3edff34538855e6916c8185fe271c6574a76fb08
tx_salaries/utils/transformer.py
tx_salaries/utils/transformer.py
import hashlib from StringIO import StringIO from csvkit import convert from csvkit.unicsv import UnicodeCSVReader from django.core import exceptions from .transformers import TRANSFORMERS def convert_to_csv_reader(filename, sheet=None): format = convert.guess_format(filename) f = open(filename, "rb") i...
import hashlib from StringIO import StringIO from csvkit import convert from csvkit.unicsv import UnicodeCSVReader from django.core import exceptions from .transformers import TRANSFORMERS def convert_to_csv_reader(filename, sheet=None): format = convert.guess_format(filename) f = open(filename, "rb") c...
Refactor to change the workflow
Refactor to change the workflow This is functionally the same code, but this reads a little better (to me). I've also added a code comment to explain what's going on here since it does seem so weird.
Python
apache-2.0
texastribune/tx_salaries,texastribune/tx_salaries
import hashlib from StringIO import StringIO from csvkit import convert from csvkit.unicsv import UnicodeCSVReader from django.core import exceptions from .transformers import TRANSFORMERS def convert_to_csv_reader(filename, sheet=None): format = convert.guess_format(filename) f = open(filename, "rb") i...
import hashlib from StringIO import StringIO from csvkit import convert from csvkit.unicsv import UnicodeCSVReader from django.core import exceptions from .transformers import TRANSFORMERS def convert_to_csv_reader(filename, sheet=None): format = convert.guess_format(filename) f = open(filename, "rb") c...
<commit_before>import hashlib from StringIO import StringIO from csvkit import convert from csvkit.unicsv import UnicodeCSVReader from django.core import exceptions from .transformers import TRANSFORMERS def convert_to_csv_reader(filename, sheet=None): format = convert.guess_format(filename) f = open(filena...
import hashlib from StringIO import StringIO from csvkit import convert from csvkit.unicsv import UnicodeCSVReader from django.core import exceptions from .transformers import TRANSFORMERS def convert_to_csv_reader(filename, sheet=None): format = convert.guess_format(filename) f = open(filename, "rb") c...
import hashlib from StringIO import StringIO from csvkit import convert from csvkit.unicsv import UnicodeCSVReader from django.core import exceptions from .transformers import TRANSFORMERS def convert_to_csv_reader(filename, sheet=None): format = convert.guess_format(filename) f = open(filename, "rb") i...
<commit_before>import hashlib from StringIO import StringIO from csvkit import convert from csvkit.unicsv import UnicodeCSVReader from django.core import exceptions from .transformers import TRANSFORMERS def convert_to_csv_reader(filename, sheet=None): format = convert.guess_format(filename) f = open(filena...
86a357e9a954348aa59626a37d61fdb43c143142
src/constants.py
src/constants.py
#!/usr/bin/env python TRAJECTORY = 'squared' CONTROLLER = 'pid' # control constants K_X = 0.90 K_Y = 0.90 K_THETA = 0.90 # PID control constants K_P_V = 0.2 K_I_V = 1.905 K_D_V = 0.00 K_P_W = 0.45 K_I_W = 1.25 K_D_W = 0.000 if TRAJECTORY == 'linear': SIMULATION_TIME_IN_SECONDS = 60.0 MAX_V = 0.075 MAX_...
#!/usr/bin/env python TRAJECTORY = 'linear' CONTROLLER = 'pid' # control constants K_X = 0.90 K_Y = 0.90 K_THETA = 0.90 # PID control constants K_P_V = 0.2 K_I_V = 1.905 K_D_V = 0.00 K_P_W = 0.45 K_I_W = 1.25 K_D_W = 0.000 if TRAJECTORY == 'linear': SIMULATION_TIME_IN_SECONDS = 60.0 MAX_V = 0.075 MAX_W...
Create constant to store path for results
Create constant to store path for results
Python
mit
bit0001/trajectory_tracking,bit0001/trajectory_tracking
#!/usr/bin/env python TRAJECTORY = 'squared' CONTROLLER = 'pid' # control constants K_X = 0.90 K_Y = 0.90 K_THETA = 0.90 # PID control constants K_P_V = 0.2 K_I_V = 1.905 K_D_V = 0.00 K_P_W = 0.45 K_I_W = 1.25 K_D_W = 0.000 if TRAJECTORY == 'linear': SIMULATION_TIME_IN_SECONDS = 60.0 MAX_V = 0.075 MAX_...
#!/usr/bin/env python TRAJECTORY = 'linear' CONTROLLER = 'pid' # control constants K_X = 0.90 K_Y = 0.90 K_THETA = 0.90 # PID control constants K_P_V = 0.2 K_I_V = 1.905 K_D_V = 0.00 K_P_W = 0.45 K_I_W = 1.25 K_D_W = 0.000 if TRAJECTORY == 'linear': SIMULATION_TIME_IN_SECONDS = 60.0 MAX_V = 0.075 MAX_W...
<commit_before>#!/usr/bin/env python TRAJECTORY = 'squared' CONTROLLER = 'pid' # control constants K_X = 0.90 K_Y = 0.90 K_THETA = 0.90 # PID control constants K_P_V = 0.2 K_I_V = 1.905 K_D_V = 0.00 K_P_W = 0.45 K_I_W = 1.25 K_D_W = 0.000 if TRAJECTORY == 'linear': SIMULATION_TIME_IN_SECONDS = 60.0 MAX_V =...
#!/usr/bin/env python TRAJECTORY = 'linear' CONTROLLER = 'pid' # control constants K_X = 0.90 K_Y = 0.90 K_THETA = 0.90 # PID control constants K_P_V = 0.2 K_I_V = 1.905 K_D_V = 0.00 K_P_W = 0.45 K_I_W = 1.25 K_D_W = 0.000 if TRAJECTORY == 'linear': SIMULATION_TIME_IN_SECONDS = 60.0 MAX_V = 0.075 MAX_W...
#!/usr/bin/env python TRAJECTORY = 'squared' CONTROLLER = 'pid' # control constants K_X = 0.90 K_Y = 0.90 K_THETA = 0.90 # PID control constants K_P_V = 0.2 K_I_V = 1.905 K_D_V = 0.00 K_P_W = 0.45 K_I_W = 1.25 K_D_W = 0.000 if TRAJECTORY == 'linear': SIMULATION_TIME_IN_SECONDS = 60.0 MAX_V = 0.075 MAX_...
<commit_before>#!/usr/bin/env python TRAJECTORY = 'squared' CONTROLLER = 'pid' # control constants K_X = 0.90 K_Y = 0.90 K_THETA = 0.90 # PID control constants K_P_V = 0.2 K_I_V = 1.905 K_D_V = 0.00 K_P_W = 0.45 K_I_W = 1.25 K_D_W = 0.000 if TRAJECTORY == 'linear': SIMULATION_TIME_IN_SECONDS = 60.0 MAX_V =...
6477768e3040ed43fb10072730b84c29bef1e949
continuate/__init__.py
continuate/__init__.py
# -*- coding: utf-8 -*- import importlib __all__ = ["linalg", "single_parameter"] for m in __all__: importlib.import_module("continuate." + m)
# -*- coding: utf-8 -*- import importlib import os.path as op from glob import glob __all__ = [op.basename(f)[:-3] for f in glob(op.join(op.dirname(__file__), "*.py")) if op.basename(f) != "__init__.py"] for m in __all__: importlib.import_module("continuate." + m)
Change manual listing of submodules to automatic
Change manual listing of submodules to automatic
Python
mit
termoshtt/continuate
# -*- coding: utf-8 -*- import importlib __all__ = ["linalg", "single_parameter"] for m in __all__: importlib.import_module("continuate." + m) Change manual listing of submodules to automatic
# -*- coding: utf-8 -*- import importlib import os.path as op from glob import glob __all__ = [op.basename(f)[:-3] for f in glob(op.join(op.dirname(__file__), "*.py")) if op.basename(f) != "__init__.py"] for m in __all__: importlib.import_module("continuate." + m)
<commit_before># -*- coding: utf-8 -*- import importlib __all__ = ["linalg", "single_parameter"] for m in __all__: importlib.import_module("continuate." + m) <commit_msg>Change manual listing of submodules to automatic<commit_after>
# -*- coding: utf-8 -*- import importlib import os.path as op from glob import glob __all__ = [op.basename(f)[:-3] for f in glob(op.join(op.dirname(__file__), "*.py")) if op.basename(f) != "__init__.py"] for m in __all__: importlib.import_module("continuate." + m)
# -*- coding: utf-8 -*- import importlib __all__ = ["linalg", "single_parameter"] for m in __all__: importlib.import_module("continuate." + m) Change manual listing of submodules to automatic# -*- coding: utf-8 -*- import importlib import os.path as op from glob import glob __all__ = [op.basename(f)[:-3] ...
<commit_before># -*- coding: utf-8 -*- import importlib __all__ = ["linalg", "single_parameter"] for m in __all__: importlib.import_module("continuate." + m) <commit_msg>Change manual listing of submodules to automatic<commit_after># -*- coding: utf-8 -*- import importlib import os.path as op from glob import g...