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
37b16cea115419d1353cf1213698fc4a0d229fa7
warehouse/helpers.py
warehouse/helpers.py
# Copyright 2013 Donald Stufft # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, so...
# Copyright 2013 Donald Stufft # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, so...
Make it possible to force an external url with the url_for helper
Make it possible to force an external url with the url_for helper
Python
apache-2.0
robhudson/warehouse,mattrobenolt/warehouse,techtonik/warehouse,mattrobenolt/warehouse,robhudson/warehouse,techtonik/warehouse,mattrobenolt/warehouse
# Copyright 2013 Donald Stufft # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, so...
# Copyright 2013 Donald Stufft # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, so...
<commit_before># Copyright 2013 Donald Stufft # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to...
# Copyright 2013 Donald Stufft # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, so...
# Copyright 2013 Donald Stufft # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, so...
<commit_before># Copyright 2013 Donald Stufft # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to...
27e2cc73f43c5ca8eedee52009652b6195e76198
tests/py/test_notifications.py
tests/py/test_notifications.py
from gratipay.testing import Harness class TestNotifications(Harness): def test_add_single_notification(self): alice = self.make_participant('alice') alice.add_notification('abcd') assert alice.notifications == ["abcd"] def test_add_multiple_notifications(self): alice = self.ma...
from gratipay.testing import Harness class TestNotifications(Harness): def test_add_single_notification(self): alice = self.make_participant('alice') alice.add_notification('abcd') assert alice.notifications == ["abcd"] def test_add_multiple_notifications(self): alice = self.ma...
Add a test for the blog announcement
Add a test for the blog announcement
Python
mit
gratipay/gratipay.com,gratipay/gratipay.com,gratipay/gratipay.com,gratipay/gratipay.com
from gratipay.testing import Harness class TestNotifications(Harness): def test_add_single_notification(self): alice = self.make_participant('alice') alice.add_notification('abcd') assert alice.notifications == ["abcd"] def test_add_multiple_notifications(self): alice = self.ma...
from gratipay.testing import Harness class TestNotifications(Harness): def test_add_single_notification(self): alice = self.make_participant('alice') alice.add_notification('abcd') assert alice.notifications == ["abcd"] def test_add_multiple_notifications(self): alice = self.ma...
<commit_before>from gratipay.testing import Harness class TestNotifications(Harness): def test_add_single_notification(self): alice = self.make_participant('alice') alice.add_notification('abcd') assert alice.notifications == ["abcd"] def test_add_multiple_notifications(self): ...
from gratipay.testing import Harness class TestNotifications(Harness): def test_add_single_notification(self): alice = self.make_participant('alice') alice.add_notification('abcd') assert alice.notifications == ["abcd"] def test_add_multiple_notifications(self): alice = self.ma...
from gratipay.testing import Harness class TestNotifications(Harness): def test_add_single_notification(self): alice = self.make_participant('alice') alice.add_notification('abcd') assert alice.notifications == ["abcd"] def test_add_multiple_notifications(self): alice = self.ma...
<commit_before>from gratipay.testing import Harness class TestNotifications(Harness): def test_add_single_notification(self): alice = self.make_participant('alice') alice.add_notification('abcd') assert alice.notifications == ["abcd"] def test_add_multiple_notifications(self): ...
e9467251acfdbceb26c158636d3befe4428ed88b
coda/coda_replication/factories.py
coda/coda_replication/factories.py
""" Coda Replication Model factories for test fixtures. """ from datetime import datetime import factory from factory import fuzzy from . import models class QueueEntryFactory(factory.django.DjangoModelFactory): ark = factory.Sequence(lambda n: 'ark:/00001/id{0}'.format(n)) bytes = fuzzy.FuzzyInteger(100000...
""" Coda Replication Model factories for test fixtures. """ from datetime import datetime import factory from factory import fuzzy from . import models class QueueEntryFactory(factory.django.DjangoModelFactory): ark = factory.Sequence(lambda n: 'ark:/00001/id{0}'.format(n)) bytes = fuzzy.FuzzyInteger(100000...
Update dates passed in python3
Update dates passed in python3
Python
bsd-3-clause
unt-libraries/coda,unt-libraries/coda,unt-libraries/coda,unt-libraries/coda
""" Coda Replication Model factories for test fixtures. """ from datetime import datetime import factory from factory import fuzzy from . import models class QueueEntryFactory(factory.django.DjangoModelFactory): ark = factory.Sequence(lambda n: 'ark:/00001/id{0}'.format(n)) bytes = fuzzy.FuzzyInteger(100000...
""" Coda Replication Model factories for test fixtures. """ from datetime import datetime import factory from factory import fuzzy from . import models class QueueEntryFactory(factory.django.DjangoModelFactory): ark = factory.Sequence(lambda n: 'ark:/00001/id{0}'.format(n)) bytes = fuzzy.FuzzyInteger(100000...
<commit_before>""" Coda Replication Model factories for test fixtures. """ from datetime import datetime import factory from factory import fuzzy from . import models class QueueEntryFactory(factory.django.DjangoModelFactory): ark = factory.Sequence(lambda n: 'ark:/00001/id{0}'.format(n)) bytes = fuzzy.Fuzz...
""" Coda Replication Model factories for test fixtures. """ from datetime import datetime import factory from factory import fuzzy from . import models class QueueEntryFactory(factory.django.DjangoModelFactory): ark = factory.Sequence(lambda n: 'ark:/00001/id{0}'.format(n)) bytes = fuzzy.FuzzyInteger(100000...
""" Coda Replication Model factories for test fixtures. """ from datetime import datetime import factory from factory import fuzzy from . import models class QueueEntryFactory(factory.django.DjangoModelFactory): ark = factory.Sequence(lambda n: 'ark:/00001/id{0}'.format(n)) bytes = fuzzy.FuzzyInteger(100000...
<commit_before>""" Coda Replication Model factories for test fixtures. """ from datetime import datetime import factory from factory import fuzzy from . import models class QueueEntryFactory(factory.django.DjangoModelFactory): ark = factory.Sequence(lambda n: 'ark:/00001/id{0}'.format(n)) bytes = fuzzy.Fuzz...
b72bea3f6970a095864ec564008f5542dc88eeca
tests/test_vector2_equality.py
tests/test_vector2_equality.py
from hypothesis import assume, given from ppb_vector import Vector2 from utils import vectors @given(x=vectors()) def test_equal_self(x: Vector2): assert x == x @given(x=vectors()) def test_non_zero_equal(x: Vector2): assume(x != (0, 0)) assert x != 1.1 * x assert x != -x @given(x=vectors(), y=vectors()) de...
from hypothesis import assume, given from ppb_vector import Vector2 from utils import vectors, vector_likes @given(x=vectors()) def test_equal_self(x: Vector2): assert x == x @given(x=vectors(), y=vectors()) def test_equal_symmetric(x: Vector2, y): assert (x == y) == (y == x) for y_like in vector_likes(y): ...
Test symmetry of equality, even with vector-likes
tests/equality: Test symmetry of equality, even with vector-likes
Python
artistic-2.0
ppb/ppb-vector,ppb/ppb-vector
from hypothesis import assume, given from ppb_vector import Vector2 from utils import vectors @given(x=vectors()) def test_equal_self(x: Vector2): assert x == x @given(x=vectors()) def test_non_zero_equal(x: Vector2): assume(x != (0, 0)) assert x != 1.1 * x assert x != -x @given(x=vectors(), y=vectors()) de...
from hypothesis import assume, given from ppb_vector import Vector2 from utils import vectors, vector_likes @given(x=vectors()) def test_equal_self(x: Vector2): assert x == x @given(x=vectors(), y=vectors()) def test_equal_symmetric(x: Vector2, y): assert (x == y) == (y == x) for y_like in vector_likes(y): ...
<commit_before>from hypothesis import assume, given from ppb_vector import Vector2 from utils import vectors @given(x=vectors()) def test_equal_self(x: Vector2): assert x == x @given(x=vectors()) def test_non_zero_equal(x: Vector2): assume(x != (0, 0)) assert x != 1.1 * x assert x != -x @given(x=vectors(), ...
from hypothesis import assume, given from ppb_vector import Vector2 from utils import vectors, vector_likes @given(x=vectors()) def test_equal_self(x: Vector2): assert x == x @given(x=vectors(), y=vectors()) def test_equal_symmetric(x: Vector2, y): assert (x == y) == (y == x) for y_like in vector_likes(y): ...
from hypothesis import assume, given from ppb_vector import Vector2 from utils import vectors @given(x=vectors()) def test_equal_self(x: Vector2): assert x == x @given(x=vectors()) def test_non_zero_equal(x: Vector2): assume(x != (0, 0)) assert x != 1.1 * x assert x != -x @given(x=vectors(), y=vectors()) de...
<commit_before>from hypothesis import assume, given from ppb_vector import Vector2 from utils import vectors @given(x=vectors()) def test_equal_self(x: Vector2): assert x == x @given(x=vectors()) def test_non_zero_equal(x: Vector2): assume(x != (0, 0)) assert x != 1.1 * x assert x != -x @given(x=vectors(), ...
b5fe71191bc7c39996d526132720a22c3967b1cf
canopus/schema/core.py
canopus/schema/core.py
from marshmallow import Schema, fields from ..models.core import Post class PostSchema(Schema): id = fields.Integer() title = fields.String() body = fields.String() is_published = fields.Boolean() def make_object(self, data): return Post(**data)
from marshmallow import Schema, fields, post_load from ..models import Post class PostSchema(Schema): __model__ = Post id = fields.Integer() title = fields.String() body = fields.String() is_published = fields.Boolean() class Meta: ordered = True @post_load def make_object(...
Fix post schema for latest marshmallow release
Fix post schema for latest marshmallow release
Python
mit
josuemontano/pyramid-angularjs-starter,josuemontano/pyramid-angularjs-starter,josuemontano/pyramid-angularjs-starter,josuemontano/API-platform,josuemontano/api-starter,josuemontano/API-platform,josuemontano/api-starter,josuemontano/api-starter,josuemontano/API-platform,josuemontano/API-platform
from marshmallow import Schema, fields from ..models.core import Post class PostSchema(Schema): id = fields.Integer() title = fields.String() body = fields.String() is_published = fields.Boolean() def make_object(self, data): return Post(**data) Fix post schema for latest marshmallow rel...
from marshmallow import Schema, fields, post_load from ..models import Post class PostSchema(Schema): __model__ = Post id = fields.Integer() title = fields.String() body = fields.String() is_published = fields.Boolean() class Meta: ordered = True @post_load def make_object(...
<commit_before>from marshmallow import Schema, fields from ..models.core import Post class PostSchema(Schema): id = fields.Integer() title = fields.String() body = fields.String() is_published = fields.Boolean() def make_object(self, data): return Post(**data) <commit_msg>Fix post schema...
from marshmallow import Schema, fields, post_load from ..models import Post class PostSchema(Schema): __model__ = Post id = fields.Integer() title = fields.String() body = fields.String() is_published = fields.Boolean() class Meta: ordered = True @post_load def make_object(...
from marshmallow import Schema, fields from ..models.core import Post class PostSchema(Schema): id = fields.Integer() title = fields.String() body = fields.String() is_published = fields.Boolean() def make_object(self, data): return Post(**data) Fix post schema for latest marshmallow rel...
<commit_before>from marshmallow import Schema, fields from ..models.core import Post class PostSchema(Schema): id = fields.Integer() title = fields.String() body = fields.String() is_published = fields.Boolean() def make_object(self, data): return Post(**data) <commit_msg>Fix post schema...
b3028843fc9f799d3fe1f52fbd64bb843dcd6f75
picaxe/urls.py
picaxe/urls.py
from django.conf.urls import patterns, include, url from django.contrib import admin from django.contrib.sites.models import Site urlpatterns = patterns('', # Examples: # url(r'^$', 'picaxe.views.home', name='home'), # url(r'^blog/', include('blog.urls')), url(r'^admin/', include(admin.site.urls)), ...
from django.conf.urls import patterns, include, url from django.contrib import admin from django.contrib.sites.models import Site urlpatterns = patterns('', # Examples: # url(r'^$', 'picaxe.views.home', name='home'), # url(r'^blog/', include('blog.urls')), url(r'^admin/', include(admin.site.urls)), ...
Use photologue as default url
Use photologue as default url
Python
mit
TuinfeesT/PicAxe
from django.conf.urls import patterns, include, url from django.contrib import admin from django.contrib.sites.models import Site urlpatterns = patterns('', # Examples: # url(r'^$', 'picaxe.views.home', name='home'), # url(r'^blog/', include('blog.urls')), url(r'^admin/', include(admin.site.urls)), ...
from django.conf.urls import patterns, include, url from django.contrib import admin from django.contrib.sites.models import Site urlpatterns = patterns('', # Examples: # url(r'^$', 'picaxe.views.home', name='home'), # url(r'^blog/', include('blog.urls')), url(r'^admin/', include(admin.site.urls)), ...
<commit_before>from django.conf.urls import patterns, include, url from django.contrib import admin from django.contrib.sites.models import Site urlpatterns = patterns('', # Examples: # url(r'^$', 'picaxe.views.home', name='home'), # url(r'^blog/', include('blog.urls')), url(r'^admin/', include(admin....
from django.conf.urls import patterns, include, url from django.contrib import admin from django.contrib.sites.models import Site urlpatterns = patterns('', # Examples: # url(r'^$', 'picaxe.views.home', name='home'), # url(r'^blog/', include('blog.urls')), url(r'^admin/', include(admin.site.urls)), ...
from django.conf.urls import patterns, include, url from django.contrib import admin from django.contrib.sites.models import Site urlpatterns = patterns('', # Examples: # url(r'^$', 'picaxe.views.home', name='home'), # url(r'^blog/', include('blog.urls')), url(r'^admin/', include(admin.site.urls)), ...
<commit_before>from django.conf.urls import patterns, include, url from django.contrib import admin from django.contrib.sites.models import Site urlpatterns = patterns('', # Examples: # url(r'^$', 'picaxe.views.home', name='home'), # url(r'^blog/', include('blog.urls')), url(r'^admin/', include(admin....
6963c7c9651d6770c742c50f5fd0fbee68b4f66f
tests/test_rover_init.py
tests/test_rover_init.py
def test_rover_init_with_default_parameters(): from rover import Rover rover = Rover() assert rover.x == 0 assert rover.y == 0 assert rover.direction == 'N' def test_rover_init_with_custom_paramaters(): from rover import Rover rover = Rover(3, 7, 'W') assert rover.x == 3 assert rove...
def test_rover_init_with_default_parameters(): from rover import Rover rover = Rover() assert rover.x == 0 assert rover.y == 0 assert rover.direction == 'N' def test_rover_init_with_custom_parameters(): from rover import Rover rover = Rover(3, 7, 'W') assert rover.x == 3 assert rove...
Fix test naming spelling errors
Fix test naming spelling errors
Python
mit
authentik8/rover
def test_rover_init_with_default_parameters(): from rover import Rover rover = Rover() assert rover.x == 0 assert rover.y == 0 assert rover.direction == 'N' def test_rover_init_with_custom_paramaters(): from rover import Rover rover = Rover(3, 7, 'W') assert rover.x == 3 assert rove...
def test_rover_init_with_default_parameters(): from rover import Rover rover = Rover() assert rover.x == 0 assert rover.y == 0 assert rover.direction == 'N' def test_rover_init_with_custom_parameters(): from rover import Rover rover = Rover(3, 7, 'W') assert rover.x == 3 assert rove...
<commit_before>def test_rover_init_with_default_parameters(): from rover import Rover rover = Rover() assert rover.x == 0 assert rover.y == 0 assert rover.direction == 'N' def test_rover_init_with_custom_paramaters(): from rover import Rover rover = Rover(3, 7, 'W') assert rover.x == 3 ...
def test_rover_init_with_default_parameters(): from rover import Rover rover = Rover() assert rover.x == 0 assert rover.y == 0 assert rover.direction == 'N' def test_rover_init_with_custom_parameters(): from rover import Rover rover = Rover(3, 7, 'W') assert rover.x == 3 assert rove...
def test_rover_init_with_default_parameters(): from rover import Rover rover = Rover() assert rover.x == 0 assert rover.y == 0 assert rover.direction == 'N' def test_rover_init_with_custom_paramaters(): from rover import Rover rover = Rover(3, 7, 'W') assert rover.x == 3 assert rove...
<commit_before>def test_rover_init_with_default_parameters(): from rover import Rover rover = Rover() assert rover.x == 0 assert rover.y == 0 assert rover.direction == 'N' def test_rover_init_with_custom_paramaters(): from rover import Rover rover = Rover(3, 7, 'W') assert rover.x == 3 ...
ac2b01e9177d04a6446b770639745010770cb317
nuage_neutron/plugins/nuage_ml2/nuage_subnet_ext_driver.py
nuage_neutron/plugins/nuage_ml2/nuage_subnet_ext_driver.py
# Copyright 2015 Intel Corporation. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless requir...
# Copyright 2015 Intel Corporation. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless requir...
Add 'vsd_managed' to the GET subnet response for ML2
Add 'vsd_managed' to the GET subnet response for ML2 This commit looks up the related nuage_subnet_l2dom_mapping in the database and uses the nuage_managed_subnet field to fill in 'vsd_managed'. False by default. Change-Id: I68957fe3754dc9f1ccf2b6a2b09a762fccd17a89 Closes-Bug: OPENSTACK-1504
Python
apache-2.0
nuagenetworks/nuage-openstack-neutron,naveensan1/nuage-openstack-neutron,naveensan1/nuage-openstack-neutron,nuagenetworks/nuage-openstack-neutron
# Copyright 2015 Intel Corporation. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless requir...
# Copyright 2015 Intel Corporation. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless requir...
<commit_before># Copyright 2015 Intel Corporation. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # ...
# Copyright 2015 Intel Corporation. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless requir...
# Copyright 2015 Intel Corporation. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless requir...
<commit_before># Copyright 2015 Intel Corporation. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # ...
4ee689a4825a93cf6b0116b6b7343028c96b5cfb
bernard/discord_notifier.py
bernard/discord_notifier.py
"""A logging handler that emits to a Discord webhook.""" import requests from logging import Handler class DiscordHandler(Handler): """A logging handler that emits to a Discord webhook.""" def __init__(self, webhook, *args, **kwargs): """Initialize the DiscordHandler class.""" super().__init_...
"""A logging handler that emits to a Discord webhook.""" import requests from logging import Handler class DiscordHandler(Handler): """A logging handler that emits to a Discord webhook.""" def __init__(self, webhook, *args, **kwargs): """Initialize the DiscordHandler class.""" super().__init_...
Fix bare 'except' in DiscordHandler
Fix bare 'except' in DiscordHandler
Python
mit
leviroth/bernard
"""A logging handler that emits to a Discord webhook.""" import requests from logging import Handler class DiscordHandler(Handler): """A logging handler that emits to a Discord webhook.""" def __init__(self, webhook, *args, **kwargs): """Initialize the DiscordHandler class.""" super().__init_...
"""A logging handler that emits to a Discord webhook.""" import requests from logging import Handler class DiscordHandler(Handler): """A logging handler that emits to a Discord webhook.""" def __init__(self, webhook, *args, **kwargs): """Initialize the DiscordHandler class.""" super().__init_...
<commit_before>"""A logging handler that emits to a Discord webhook.""" import requests from logging import Handler class DiscordHandler(Handler): """A logging handler that emits to a Discord webhook.""" def __init__(self, webhook, *args, **kwargs): """Initialize the DiscordHandler class.""" ...
"""A logging handler that emits to a Discord webhook.""" import requests from logging import Handler class DiscordHandler(Handler): """A logging handler that emits to a Discord webhook.""" def __init__(self, webhook, *args, **kwargs): """Initialize the DiscordHandler class.""" super().__init_...
"""A logging handler that emits to a Discord webhook.""" import requests from logging import Handler class DiscordHandler(Handler): """A logging handler that emits to a Discord webhook.""" def __init__(self, webhook, *args, **kwargs): """Initialize the DiscordHandler class.""" super().__init_...
<commit_before>"""A logging handler that emits to a Discord webhook.""" import requests from logging import Handler class DiscordHandler(Handler): """A logging handler that emits to a Discord webhook.""" def __init__(self, webhook, *args, **kwargs): """Initialize the DiscordHandler class.""" ...
1683cb41b5ffee4d48e8ec700382ad40e8370520
astrobin/tests/test_auth.py
astrobin/tests/test_auth.py
# Django from django.contrib.auth.models import User from django.test import TestCase class LoginTest(TestCase): def setUp(self): self.user = User.objects.create_user( 'test', 'test@test.com', 'password') def tearDown(self): self.user.delete() def test_login_view(self): ...
# Django from django.contrib.auth.models import User from django.core.urlresolvers import reverse from django.test import TestCase class LoginTest(TestCase): def setUp(self): self.user = User.objects.create_user( 'test', 'test@test.com', 'password') def tearDown(self): self.user.de...
Add test to check that password reset view loads fine
Add test to check that password reset view loads fine
Python
agpl-3.0
astrobin/astrobin,astrobin/astrobin,astrobin/astrobin,astrobin/astrobin
# Django from django.contrib.auth.models import User from django.test import TestCase class LoginTest(TestCase): def setUp(self): self.user = User.objects.create_user( 'test', 'test@test.com', 'password') def tearDown(self): self.user.delete() def test_login_view(self): ...
# Django from django.contrib.auth.models import User from django.core.urlresolvers import reverse from django.test import TestCase class LoginTest(TestCase): def setUp(self): self.user = User.objects.create_user( 'test', 'test@test.com', 'password') def tearDown(self): self.user.de...
<commit_before># Django from django.contrib.auth.models import User from django.test import TestCase class LoginTest(TestCase): def setUp(self): self.user = User.objects.create_user( 'test', 'test@test.com', 'password') def tearDown(self): self.user.delete() def test_login_vie...
# Django from django.contrib.auth.models import User from django.core.urlresolvers import reverse from django.test import TestCase class LoginTest(TestCase): def setUp(self): self.user = User.objects.create_user( 'test', 'test@test.com', 'password') def tearDown(self): self.user.de...
# Django from django.contrib.auth.models import User from django.test import TestCase class LoginTest(TestCase): def setUp(self): self.user = User.objects.create_user( 'test', 'test@test.com', 'password') def tearDown(self): self.user.delete() def test_login_view(self): ...
<commit_before># Django from django.contrib.auth.models import User from django.test import TestCase class LoginTest(TestCase): def setUp(self): self.user = User.objects.create_user( 'test', 'test@test.com', 'password') def tearDown(self): self.user.delete() def test_login_vie...
99fbf97643bdfd42b1dc8890a7cfeccc61ae973f
moderator/moderate/auth.py
moderator/moderate/auth.py
from mozilla_django_oidc.auth import OIDCAuthenticationBackend from moderator.moderate.mozillians import is_vouched, BadStatusCodeError class ModeratorAuthBackend(OIDCAuthenticationBackend): def create_user(self, email, **kwargs): try: data = is_vouched(email) except BadStatusCodeErro...
from mozilla_django_oidc.auth import OIDCAuthenticationBackend from moderator.moderate.mozillians import is_vouched, BadStatusCodeError class ModeratorAuthBackend(OIDCAuthenticationBackend): def create_user(self, claims, **kwargs): try: data = is_vouched(claims.get('email')) except Ba...
Fix claims handling on create_user
Fix claims handling on create_user
Python
agpl-3.0
akatsoulas/mozmoderator,mozilla/mozmoderator,johngian/mozmoderator,mozilla/mozmoderator,akatsoulas/mozmoderator,akatsoulas/mozmoderator,johngian/mozmoderator,johngian/mozmoderator,mozilla/mozmoderator,johngian/mozmoderator
from mozilla_django_oidc.auth import OIDCAuthenticationBackend from moderator.moderate.mozillians import is_vouched, BadStatusCodeError class ModeratorAuthBackend(OIDCAuthenticationBackend): def create_user(self, email, **kwargs): try: data = is_vouched(email) except BadStatusCodeErro...
from mozilla_django_oidc.auth import OIDCAuthenticationBackend from moderator.moderate.mozillians import is_vouched, BadStatusCodeError class ModeratorAuthBackend(OIDCAuthenticationBackend): def create_user(self, claims, **kwargs): try: data = is_vouched(claims.get('email')) except Ba...
<commit_before>from mozilla_django_oidc.auth import OIDCAuthenticationBackend from moderator.moderate.mozillians import is_vouched, BadStatusCodeError class ModeratorAuthBackend(OIDCAuthenticationBackend): def create_user(self, email, **kwargs): try: data = is_vouched(email) except Ba...
from mozilla_django_oidc.auth import OIDCAuthenticationBackend from moderator.moderate.mozillians import is_vouched, BadStatusCodeError class ModeratorAuthBackend(OIDCAuthenticationBackend): def create_user(self, claims, **kwargs): try: data = is_vouched(claims.get('email')) except Ba...
from mozilla_django_oidc.auth import OIDCAuthenticationBackend from moderator.moderate.mozillians import is_vouched, BadStatusCodeError class ModeratorAuthBackend(OIDCAuthenticationBackend): def create_user(self, email, **kwargs): try: data = is_vouched(email) except BadStatusCodeErro...
<commit_before>from mozilla_django_oidc.auth import OIDCAuthenticationBackend from moderator.moderate.mozillians import is_vouched, BadStatusCodeError class ModeratorAuthBackend(OIDCAuthenticationBackend): def create_user(self, email, **kwargs): try: data = is_vouched(email) except Ba...
c72d9060142fe1de1e2201fc355f2ee95f5354c7
src/waldur_mastermind/invoices/migrations/0023_invoice_current_cost.py
src/waldur_mastermind/invoices/migrations/0023_invoice_current_cost.py
# -*- coding: utf-8 -*- # Generated by Django 1.11.7 on 2018-06-19 08:47 from __future__ import unicode_literals from django.db import migrations, models def migrate_data(apps, schema_editor): Invoice = apps.get_model('invoices', 'Invoice') for invoice in Invoice.objects.all(): invoice.update_curren...
# -*- coding: utf-8 -*- # Generated by Django 1.11.7 on 2018-06-19 08:47 from __future__ import unicode_literals from django.db import migrations, models def migrate_data(apps, schema_editor): from waldur_mastermind.invoices.models import Invoice for invoice in Invoice.objects.all(): invoice.update_...
Fix database migration for invoices application.
Fix database migration for invoices application.
Python
mit
opennode/waldur-mastermind,opennode/waldur-mastermind,opennode/waldur-mastermind,opennode/nodeconductor-assembly-waldur,opennode/waldur-mastermind,opennode/nodeconductor-assembly-waldur,opennode/nodeconductor-assembly-waldur
# -*- coding: utf-8 -*- # Generated by Django 1.11.7 on 2018-06-19 08:47 from __future__ import unicode_literals from django.db import migrations, models def migrate_data(apps, schema_editor): Invoice = apps.get_model('invoices', 'Invoice') for invoice in Invoice.objects.all(): invoice.update_curren...
# -*- coding: utf-8 -*- # Generated by Django 1.11.7 on 2018-06-19 08:47 from __future__ import unicode_literals from django.db import migrations, models def migrate_data(apps, schema_editor): from waldur_mastermind.invoices.models import Invoice for invoice in Invoice.objects.all(): invoice.update_...
<commit_before># -*- coding: utf-8 -*- # Generated by Django 1.11.7 on 2018-06-19 08:47 from __future__ import unicode_literals from django.db import migrations, models def migrate_data(apps, schema_editor): Invoice = apps.get_model('invoices', 'Invoice') for invoice in Invoice.objects.all(): invoic...
# -*- coding: utf-8 -*- # Generated by Django 1.11.7 on 2018-06-19 08:47 from __future__ import unicode_literals from django.db import migrations, models def migrate_data(apps, schema_editor): from waldur_mastermind.invoices.models import Invoice for invoice in Invoice.objects.all(): invoice.update_...
# -*- coding: utf-8 -*- # Generated by Django 1.11.7 on 2018-06-19 08:47 from __future__ import unicode_literals from django.db import migrations, models def migrate_data(apps, schema_editor): Invoice = apps.get_model('invoices', 'Invoice') for invoice in Invoice.objects.all(): invoice.update_curren...
<commit_before># -*- coding: utf-8 -*- # Generated by Django 1.11.7 on 2018-06-19 08:47 from __future__ import unicode_literals from django.db import migrations, models def migrate_data(apps, schema_editor): Invoice = apps.get_model('invoices', 'Invoice') for invoice in Invoice.objects.all(): invoic...
d4154f7cde83f3f48ff70bb7abe110e03679ff9d
aiohttp_json_api/helpers.py
aiohttp_json_api/helpers.py
""" Helpers ======= """ import inspect from collections import Mapping, Iterable def is_generator(obj): """Return True if ``obj`` is a generator """ return inspect.isgeneratorfunction(obj) or inspect.isgenerator(obj) def is_iterable_but_not_string(obj): """Return True if ``obj`` is an iterable objec...
""" Helpers ======= """ import inspect from collections import Mapping, Iterable def is_generator(obj): """Return True if ``obj`` is a generator """ return inspect.isgeneratorfunction(obj) or inspect.isgenerator(obj) def is_iterable_but_not_string(obj): """Return True if ``obj`` is an iterable objec...
Add helper to check instance and subclass
Add helper to check instance and subclass
Python
mit
vovanbo/aiohttp_json_api
""" Helpers ======= """ import inspect from collections import Mapping, Iterable def is_generator(obj): """Return True if ``obj`` is a generator """ return inspect.isgeneratorfunction(obj) or inspect.isgenerator(obj) def is_iterable_but_not_string(obj): """Return True if ``obj`` is an iterable objec...
""" Helpers ======= """ import inspect from collections import Mapping, Iterable def is_generator(obj): """Return True if ``obj`` is a generator """ return inspect.isgeneratorfunction(obj) or inspect.isgenerator(obj) def is_iterable_but_not_string(obj): """Return True if ``obj`` is an iterable objec...
<commit_before>""" Helpers ======= """ import inspect from collections import Mapping, Iterable def is_generator(obj): """Return True if ``obj`` is a generator """ return inspect.isgeneratorfunction(obj) or inspect.isgenerator(obj) def is_iterable_but_not_string(obj): """Return True if ``obj`` is an...
""" Helpers ======= """ import inspect from collections import Mapping, Iterable def is_generator(obj): """Return True if ``obj`` is a generator """ return inspect.isgeneratorfunction(obj) or inspect.isgenerator(obj) def is_iterable_but_not_string(obj): """Return True if ``obj`` is an iterable objec...
""" Helpers ======= """ import inspect from collections import Mapping, Iterable def is_generator(obj): """Return True if ``obj`` is a generator """ return inspect.isgeneratorfunction(obj) or inspect.isgenerator(obj) def is_iterable_but_not_string(obj): """Return True if ``obj`` is an iterable objec...
<commit_before>""" Helpers ======= """ import inspect from collections import Mapping, Iterable def is_generator(obj): """Return True if ``obj`` is a generator """ return inspect.isgeneratorfunction(obj) or inspect.isgenerator(obj) def is_iterable_but_not_string(obj): """Return True if ``obj`` is an...
677d2d4f422f9b05746fa80d63492de4ae9aced4
tests/test_examples.py
tests/test_examples.py
import pytest import examples.basic_usage import examples.basic_usage_manual import examples.dataset import examples.variant_ts_difficulties import examples.variants def test_dataset(unihan_options): examples.dataset.run() def test_variants(unihan_options): examples.variants.run(unihan_options=unihan_optio...
import importlib import importlib.util import sys import types import pytest def load_script(example: str) -> types.ModuleType: file_path = f"examples/{example}.py" module_name = "run" spec = importlib.util.spec_from_file_location(module_name, file_path) assert spec is not None module = importli...
Rework for handling of examples/
refactor(tests): Rework for handling of examples/
Python
mit
cihai/cihai,cihai/cihai
import pytest import examples.basic_usage import examples.basic_usage_manual import examples.dataset import examples.variant_ts_difficulties import examples.variants def test_dataset(unihan_options): examples.dataset.run() def test_variants(unihan_options): examples.variants.run(unihan_options=unihan_optio...
import importlib import importlib.util import sys import types import pytest def load_script(example: str) -> types.ModuleType: file_path = f"examples/{example}.py" module_name = "run" spec = importlib.util.spec_from_file_location(module_name, file_path) assert spec is not None module = importli...
<commit_before>import pytest import examples.basic_usage import examples.basic_usage_manual import examples.dataset import examples.variant_ts_difficulties import examples.variants def test_dataset(unihan_options): examples.dataset.run() def test_variants(unihan_options): examples.variants.run(unihan_optio...
import importlib import importlib.util import sys import types import pytest def load_script(example: str) -> types.ModuleType: file_path = f"examples/{example}.py" module_name = "run" spec = importlib.util.spec_from_file_location(module_name, file_path) assert spec is not None module = importli...
import pytest import examples.basic_usage import examples.basic_usage_manual import examples.dataset import examples.variant_ts_difficulties import examples.variants def test_dataset(unihan_options): examples.dataset.run() def test_variants(unihan_options): examples.variants.run(unihan_options=unihan_optio...
<commit_before>import pytest import examples.basic_usage import examples.basic_usage_manual import examples.dataset import examples.variant_ts_difficulties import examples.variants def test_dataset(unihan_options): examples.dataset.run() def test_variants(unihan_options): examples.variants.run(unihan_optio...
983df9ceaebb42ca31b131f437362193070eb1db
paasta_tools/clusterman.py
paasta_tools/clusterman.py
import staticconf CLUSTERMAN_YAML_FILE_PATH = '/nail/srv/configs/clusterman.yaml' CLUSTERMAN_METRICS_YAML_FILE_PATH = '/nail/srv/configs/clusterman_metrics.yaml' def get_clusterman_metrics(): try: import clusterman_metrics clusterman_yaml = CLUSTERMAN_YAML_FILE_PATH staticconf.YamlConfigu...
import staticconf CLUSTERMAN_YAML_FILE_PATH = '/nail/srv/configs/clusterman.yaml' CLUSTERMAN_METRICS_YAML_FILE_PATH = '/nail/srv/configs/clusterman_metrics.yaml' def get_clusterman_metrics(): try: import clusterman_metrics clusterman_yaml = CLUSTERMAN_YAML_FILE_PATH staticconf.YamlConfigu...
Fix regression in manpages build
Fix regression in manpages build
Python
apache-2.0
Yelp/paasta,Yelp/paasta
import staticconf CLUSTERMAN_YAML_FILE_PATH = '/nail/srv/configs/clusterman.yaml' CLUSTERMAN_METRICS_YAML_FILE_PATH = '/nail/srv/configs/clusterman_metrics.yaml' def get_clusterman_metrics(): try: import clusterman_metrics clusterman_yaml = CLUSTERMAN_YAML_FILE_PATH staticconf.YamlConfigu...
import staticconf CLUSTERMAN_YAML_FILE_PATH = '/nail/srv/configs/clusterman.yaml' CLUSTERMAN_METRICS_YAML_FILE_PATH = '/nail/srv/configs/clusterman_metrics.yaml' def get_clusterman_metrics(): try: import clusterman_metrics clusterman_yaml = CLUSTERMAN_YAML_FILE_PATH staticconf.YamlConfigu...
<commit_before>import staticconf CLUSTERMAN_YAML_FILE_PATH = '/nail/srv/configs/clusterman.yaml' CLUSTERMAN_METRICS_YAML_FILE_PATH = '/nail/srv/configs/clusterman_metrics.yaml' def get_clusterman_metrics(): try: import clusterman_metrics clusterman_yaml = CLUSTERMAN_YAML_FILE_PATH staticc...
import staticconf CLUSTERMAN_YAML_FILE_PATH = '/nail/srv/configs/clusterman.yaml' CLUSTERMAN_METRICS_YAML_FILE_PATH = '/nail/srv/configs/clusterman_metrics.yaml' def get_clusterman_metrics(): try: import clusterman_metrics clusterman_yaml = CLUSTERMAN_YAML_FILE_PATH staticconf.YamlConfigu...
import staticconf CLUSTERMAN_YAML_FILE_PATH = '/nail/srv/configs/clusterman.yaml' CLUSTERMAN_METRICS_YAML_FILE_PATH = '/nail/srv/configs/clusterman_metrics.yaml' def get_clusterman_metrics(): try: import clusterman_metrics clusterman_yaml = CLUSTERMAN_YAML_FILE_PATH staticconf.YamlConfigu...
<commit_before>import staticconf CLUSTERMAN_YAML_FILE_PATH = '/nail/srv/configs/clusterman.yaml' CLUSTERMAN_METRICS_YAML_FILE_PATH = '/nail/srv/configs/clusterman_metrics.yaml' def get_clusterman_metrics(): try: import clusterman_metrics clusterman_yaml = CLUSTERMAN_YAML_FILE_PATH staticc...
bf5ec5a459dc9dbe38a6806b513616aa769134a2
amqpy/tests/test_version.py
amqpy/tests/test_version.py
import re def get_field(doc: str, name: str): match = re.search(':{}: (.*)$'.format(name), doc, re.IGNORECASE | re.MULTILINE) if match: return match.group(1).strip() class TestVersion: def test_version_is_consistent(self): from .. import VERSION with open('README.rst') as f: ...
import re def get_field(doc: str, name: str): match = re.search(':{}: (.*)$'.format(name), doc, re.IGNORECASE | re.MULTILINE) if match: return match.group(1).strip() class TestVersion: def test_version_is_consistent(self): from .. import VERSION with open('README.rst') as f: ...
Use `map` to test version
Use `map` to test version
Python
mit
veegee/amqpy,gst/amqpy
import re def get_field(doc: str, name: str): match = re.search(':{}: (.*)$'.format(name), doc, re.IGNORECASE | re.MULTILINE) if match: return match.group(1).strip() class TestVersion: def test_version_is_consistent(self): from .. import VERSION with open('README.rst') as f: ...
import re def get_field(doc: str, name: str): match = re.search(':{}: (.*)$'.format(name), doc, re.IGNORECASE | re.MULTILINE) if match: return match.group(1).strip() class TestVersion: def test_version_is_consistent(self): from .. import VERSION with open('README.rst') as f: ...
<commit_before>import re def get_field(doc: str, name: str): match = re.search(':{}: (.*)$'.format(name), doc, re.IGNORECASE | re.MULTILINE) if match: return match.group(1).strip() class TestVersion: def test_version_is_consistent(self): from .. import VERSION with open('README....
import re def get_field(doc: str, name: str): match = re.search(':{}: (.*)$'.format(name), doc, re.IGNORECASE | re.MULTILINE) if match: return match.group(1).strip() class TestVersion: def test_version_is_consistent(self): from .. import VERSION with open('README.rst') as f: ...
import re def get_field(doc: str, name: str): match = re.search(':{}: (.*)$'.format(name), doc, re.IGNORECASE | re.MULTILINE) if match: return match.group(1).strip() class TestVersion: def test_version_is_consistent(self): from .. import VERSION with open('README.rst') as f: ...
<commit_before>import re def get_field(doc: str, name: str): match = re.search(':{}: (.*)$'.format(name), doc, re.IGNORECASE | re.MULTILINE) if match: return match.group(1).strip() class TestVersion: def test_version_is_consistent(self): from .. import VERSION with open('README....
5fd25b11eac4725ca7da879082d9334481fa59b8
python/default_crab_config.py
python/default_crab_config.py
__author__ = 'sbrochet' def create_config(is_mc): """ Create a default CRAB configuration suitable to run the framework :return: """ from CRABClient.UserUtilities import config, getUsernameFromSiteDB config = config() config.General.workArea = 'tasks' config.General.transferOutputs = ...
__author__ = 'sbrochet' def create_config(is_mc): """ Create a default CRAB configuration suitable to run the framework :return: """ from CRABClient.UserUtilities import config, getUsernameFromSiteDB config = config() config.General.workArea = 'tasks' config.General.transferOutputs = ...
Send `external` folder with crab jobs
Send `external` folder with crab jobs
Python
mit
cp3-llbb/GridIn,cp3-llbb/GridIn
__author__ = 'sbrochet' def create_config(is_mc): """ Create a default CRAB configuration suitable to run the framework :return: """ from CRABClient.UserUtilities import config, getUsernameFromSiteDB config = config() config.General.workArea = 'tasks' config.General.transferOutputs = ...
__author__ = 'sbrochet' def create_config(is_mc): """ Create a default CRAB configuration suitable to run the framework :return: """ from CRABClient.UserUtilities import config, getUsernameFromSiteDB config = config() config.General.workArea = 'tasks' config.General.transferOutputs = ...
<commit_before>__author__ = 'sbrochet' def create_config(is_mc): """ Create a default CRAB configuration suitable to run the framework :return: """ from CRABClient.UserUtilities import config, getUsernameFromSiteDB config = config() config.General.workArea = 'tasks' config.General.tra...
__author__ = 'sbrochet' def create_config(is_mc): """ Create a default CRAB configuration suitable to run the framework :return: """ from CRABClient.UserUtilities import config, getUsernameFromSiteDB config = config() config.General.workArea = 'tasks' config.General.transferOutputs = ...
__author__ = 'sbrochet' def create_config(is_mc): """ Create a default CRAB configuration suitable to run the framework :return: """ from CRABClient.UserUtilities import config, getUsernameFromSiteDB config = config() config.General.workArea = 'tasks' config.General.transferOutputs = ...
<commit_before>__author__ = 'sbrochet' def create_config(is_mc): """ Create a default CRAB configuration suitable to run the framework :return: """ from CRABClient.UserUtilities import config, getUsernameFromSiteDB config = config() config.General.workArea = 'tasks' config.General.tra...
5a889dee78335d3c7d758c1df16d774160049b12
djangoprojects/django_rest_framework/tutorial/snippets/views.py
djangoprojects/django_rest_framework/tutorial/snippets/views.py
from snippets.models import Snippet from snippets.serializers import SnippetSerializer from rest_framework import generics from rest_framework import permissions from django.contrib.auth.models import User from snippets.serializers import UserSerializer from snippets.permissions import IsOwnerOrReadOnly class UserLis...
from snippets.models import Snippet from snippets.serializers import SnippetSerializer from rest_framework import generics from rest_framework import permissions from django.contrib.auth.models import User from snippets.serializers import UserSerializer from snippets.permissions import IsOwnerOrReadOnly from rest_frame...
Add an api view for the API root
Add an api view for the API root not plugged yet
Python
unlicense
bertrandvidal/stuff,bertrandvidal/stuff,bertrandvidal/stuff,bertrandvidal/stuff
from snippets.models import Snippet from snippets.serializers import SnippetSerializer from rest_framework import generics from rest_framework import permissions from django.contrib.auth.models import User from snippets.serializers import UserSerializer from snippets.permissions import IsOwnerOrReadOnly class UserLis...
from snippets.models import Snippet from snippets.serializers import SnippetSerializer from rest_framework import generics from rest_framework import permissions from django.contrib.auth.models import User from snippets.serializers import UserSerializer from snippets.permissions import IsOwnerOrReadOnly from rest_frame...
<commit_before>from snippets.models import Snippet from snippets.serializers import SnippetSerializer from rest_framework import generics from rest_framework import permissions from django.contrib.auth.models import User from snippets.serializers import UserSerializer from snippets.permissions import IsOwnerOrReadOnly ...
from snippets.models import Snippet from snippets.serializers import SnippetSerializer from rest_framework import generics from rest_framework import permissions from django.contrib.auth.models import User from snippets.serializers import UserSerializer from snippets.permissions import IsOwnerOrReadOnly from rest_frame...
from snippets.models import Snippet from snippets.serializers import SnippetSerializer from rest_framework import generics from rest_framework import permissions from django.contrib.auth.models import User from snippets.serializers import UserSerializer from snippets.permissions import IsOwnerOrReadOnly class UserLis...
<commit_before>from snippets.models import Snippet from snippets.serializers import SnippetSerializer from rest_framework import generics from rest_framework import permissions from django.contrib.auth.models import User from snippets.serializers import UserSerializer from snippets.permissions import IsOwnerOrReadOnly ...
35d4bc796f27bdf5aea7c3dea83c581260a4669a
tests/testapp/testapp/blog/__init__.py
tests/testapp/testapp/blog/__init__.py
def includeme(config): config.add_route('test.new.routes', '/test/new/routes/{param:[a-z]+}') config.add_route('blog.page', '/page/{page_slug}')
def includeme(config): config.add_route('test.new.routes', '/test/new/routes/{param:[a-z]{1,}}') config.add_route('blog.page', '/page/{page_slug}')
Use patterns with explicit length
Use patterns with explicit length
Python
mit
avanov/Rhetoric,avanov/Rhetoric
def includeme(config): config.add_route('test.new.routes', '/test/new/routes/{param:[a-z]+}') config.add_route('blog.page', '/page/{page_slug}') Use patterns with explicit length
def includeme(config): config.add_route('test.new.routes', '/test/new/routes/{param:[a-z]{1,}}') config.add_route('blog.page', '/page/{page_slug}')
<commit_before>def includeme(config): config.add_route('test.new.routes', '/test/new/routes/{param:[a-z]+}') config.add_route('blog.page', '/page/{page_slug}') <commit_msg>Use patterns with explicit length<commit_after>
def includeme(config): config.add_route('test.new.routes', '/test/new/routes/{param:[a-z]{1,}}') config.add_route('blog.page', '/page/{page_slug}')
def includeme(config): config.add_route('test.new.routes', '/test/new/routes/{param:[a-z]+}') config.add_route('blog.page', '/page/{page_slug}') Use patterns with explicit lengthdef includeme(config): config.add_route('test.new.routes', '/test/new/routes/{param:[a-z]{1,}}') config.add_route('blog.page'...
<commit_before>def includeme(config): config.add_route('test.new.routes', '/test/new/routes/{param:[a-z]+}') config.add_route('blog.page', '/page/{page_slug}') <commit_msg>Use patterns with explicit length<commit_after>def includeme(config): config.add_route('test.new.routes', '/test/new/routes/{param:[a-z...
3f5149841163ab3e79fbd69990e53791281ec4a6
opps/articles/templatetags/article_tags.py
opps/articles/templatetags/article_tags.py
# -*- coding: utf-8 -*- from django import template from django.conf import settings from django.utils import timezone from opps.articles.models import ArticleBox register = template.Library() @register.simple_tag def get_articlebox(slug, channel_slug=None, template_name=None): if channel_slug: slug = s...
# -*- coding: utf-8 -*- from django import template from django.conf import settings from django.utils import timezone from opps.articles.models import ArticleBox register = template.Library() @register.simple_tag def get_articlebox(slug, channel_slug=None, template_name=None): if channel_slug: slug = s...
Add validate published on templatetag get all articlebox
Add validate published on templatetag get all articlebox
Python
mit
jeanmask/opps,opps/opps,jeanmask/opps,jeanmask/opps,williamroot/opps,YACOWS/opps,YACOWS/opps,opps/opps,opps/opps,opps/opps,jeanmask/opps,YACOWS/opps,williamroot/opps,YACOWS/opps,williamroot/opps,williamroot/opps
# -*- coding: utf-8 -*- from django import template from django.conf import settings from django.utils import timezone from opps.articles.models import ArticleBox register = template.Library() @register.simple_tag def get_articlebox(slug, channel_slug=None, template_name=None): if channel_slug: slug = s...
# -*- coding: utf-8 -*- from django import template from django.conf import settings from django.utils import timezone from opps.articles.models import ArticleBox register = template.Library() @register.simple_tag def get_articlebox(slug, channel_slug=None, template_name=None): if channel_slug: slug = s...
<commit_before># -*- coding: utf-8 -*- from django import template from django.conf import settings from django.utils import timezone from opps.articles.models import ArticleBox register = template.Library() @register.simple_tag def get_articlebox(slug, channel_slug=None, template_name=None): if channel_slug: ...
# -*- coding: utf-8 -*- from django import template from django.conf import settings from django.utils import timezone from opps.articles.models import ArticleBox register = template.Library() @register.simple_tag def get_articlebox(slug, channel_slug=None, template_name=None): if channel_slug: slug = s...
# -*- coding: utf-8 -*- from django import template from django.conf import settings from django.utils import timezone from opps.articles.models import ArticleBox register = template.Library() @register.simple_tag def get_articlebox(slug, channel_slug=None, template_name=None): if channel_slug: slug = s...
<commit_before># -*- coding: utf-8 -*- from django import template from django.conf import settings from django.utils import timezone from opps.articles.models import ArticleBox register = template.Library() @register.simple_tag def get_articlebox(slug, channel_slug=None, template_name=None): if channel_slug: ...
54cb7685550c1c5238bb2f519306e4b5db5fc9f0
webapp-django/challenges/views.py
webapp-django/challenges/views.py
from django.core.files.storage import FileSystemStorage from django.shortcuts import render, redirect from django.http import HttpResponse from .models import Challenge # from .forms import DocumentForm def download(req): response = HttpResponse(content_type='application/zip') response['Content-Disposition']...
from django.http import HttpResponse from django.shortcuts import render from .models import Challenge def download(req): response = HttpResponse(content_type='application/zip') response['Content-Disposition'] = 'attachment; filename=myfile.zip' return response def index(request): challenges = Chal...
Comment out some useless code in challenges
Comment out some useless code in challenges
Python
mit
super1337/Super1337-CTF,super1337/Super1337-CTF,super1337/Super1337-CTF
from django.core.files.storage import FileSystemStorage from django.shortcuts import render, redirect from django.http import HttpResponse from .models import Challenge # from .forms import DocumentForm def download(req): response = HttpResponse(content_type='application/zip') response['Content-Disposition']...
from django.http import HttpResponse from django.shortcuts import render from .models import Challenge def download(req): response = HttpResponse(content_type='application/zip') response['Content-Disposition'] = 'attachment; filename=myfile.zip' return response def index(request): challenges = Chal...
<commit_before>from django.core.files.storage import FileSystemStorage from django.shortcuts import render, redirect from django.http import HttpResponse from .models import Challenge # from .forms import DocumentForm def download(req): response = HttpResponse(content_type='application/zip') response['Conten...
from django.http import HttpResponse from django.shortcuts import render from .models import Challenge def download(req): response = HttpResponse(content_type='application/zip') response['Content-Disposition'] = 'attachment; filename=myfile.zip' return response def index(request): challenges = Chal...
from django.core.files.storage import FileSystemStorage from django.shortcuts import render, redirect from django.http import HttpResponse from .models import Challenge # from .forms import DocumentForm def download(req): response = HttpResponse(content_type='application/zip') response['Content-Disposition']...
<commit_before>from django.core.files.storage import FileSystemStorage from django.shortcuts import render, redirect from django.http import HttpResponse from .models import Challenge # from .forms import DocumentForm def download(req): response = HttpResponse(content_type='application/zip') response['Conten...
57e04bdafd571c0b8ce2c1706fb170629dea2840
salt/grains/minion_process.py
salt/grains/minion_process.py
# -*- coding: utf-8 -*- ''' Set grains describing the minion process. ''' from __future__ import absolute_import, print_function, unicode_literals import os # Import salt libs import salt.utils.platform try: import pwd except ImportError: import getpass pwd = None try: import grp except ImportError...
# -*- coding: utf-8 -*- ''' Set grains describing the minion process. ''' from __future__ import absolute_import, print_function, unicode_literals import os # Import salt libs import salt.utils.platform try: import pwd except ImportError: import getpass pwd = None try: import grp except ImportError...
Fix gid not found bug
Fix gid not found bug
Python
apache-2.0
saltstack/salt,saltstack/salt,saltstack/salt,saltstack/salt,saltstack/salt
# -*- coding: utf-8 -*- ''' Set grains describing the minion process. ''' from __future__ import absolute_import, print_function, unicode_literals import os # Import salt libs import salt.utils.platform try: import pwd except ImportError: import getpass pwd = None try: import grp except ImportError...
# -*- coding: utf-8 -*- ''' Set grains describing the minion process. ''' from __future__ import absolute_import, print_function, unicode_literals import os # Import salt libs import salt.utils.platform try: import pwd except ImportError: import getpass pwd = None try: import grp except ImportError...
<commit_before># -*- coding: utf-8 -*- ''' Set grains describing the minion process. ''' from __future__ import absolute_import, print_function, unicode_literals import os # Import salt libs import salt.utils.platform try: import pwd except ImportError: import getpass pwd = None try: import grp exc...
# -*- coding: utf-8 -*- ''' Set grains describing the minion process. ''' from __future__ import absolute_import, print_function, unicode_literals import os # Import salt libs import salt.utils.platform try: import pwd except ImportError: import getpass pwd = None try: import grp except ImportError...
# -*- coding: utf-8 -*- ''' Set grains describing the minion process. ''' from __future__ import absolute_import, print_function, unicode_literals import os # Import salt libs import salt.utils.platform try: import pwd except ImportError: import getpass pwd = None try: import grp except ImportError...
<commit_before># -*- coding: utf-8 -*- ''' Set grains describing the minion process. ''' from __future__ import absolute_import, print_function, unicode_literals import os # Import salt libs import salt.utils.platform try: import pwd except ImportError: import getpass pwd = None try: import grp exc...
e5b1eeab4486d2182396a7f8e64d0a05207a3f5f
bom_data_parser/__init__.py
bom_data_parser/__init__.py
from climate_data_online import read_climate_data_online_csv from acorn_sat import read_acorn_sat_csv from hrs import read_hrs_csv from observations_json import read_obs_json
from bom_data_parser.acorn_sat import read_acorn_sat_csv from bom_data_parser.climate_data_online import read_climate_data_online_csv from bom_data_parser.hrs import read_hrs_csv from bom_data_parser.observations_json import read_obs_json
Fix up imports in package.
Fix up imports in package.
Python
bsd-3-clause
amacd31/bom_data_parser,amacd31/bom_data_parser
from climate_data_online import read_climate_data_online_csv from acorn_sat import read_acorn_sat_csv from hrs import read_hrs_csv from observations_json import read_obs_json Fix up imports in package.
from bom_data_parser.acorn_sat import read_acorn_sat_csv from bom_data_parser.climate_data_online import read_climate_data_online_csv from bom_data_parser.hrs import read_hrs_csv from bom_data_parser.observations_json import read_obs_json
<commit_before>from climate_data_online import read_climate_data_online_csv from acorn_sat import read_acorn_sat_csv from hrs import read_hrs_csv from observations_json import read_obs_json <commit_msg>Fix up imports in package.<commit_after>
from bom_data_parser.acorn_sat import read_acorn_sat_csv from bom_data_parser.climate_data_online import read_climate_data_online_csv from bom_data_parser.hrs import read_hrs_csv from bom_data_parser.observations_json import read_obs_json
from climate_data_online import read_climate_data_online_csv from acorn_sat import read_acorn_sat_csv from hrs import read_hrs_csv from observations_json import read_obs_json Fix up imports in package.from bom_data_parser.acorn_sat import read_acorn_sat_csv from bom_data_parser.climate_data_online import read_climate_d...
<commit_before>from climate_data_online import read_climate_data_online_csv from acorn_sat import read_acorn_sat_csv from hrs import read_hrs_csv from observations_json import read_obs_json <commit_msg>Fix up imports in package.<commit_after>from bom_data_parser.acorn_sat import read_acorn_sat_csv from bom_data_parser....
dfdac5764236ce9301e7997443b6de4a7a4b4473
scripts/convert_gml_to_csv.py
scripts/convert_gml_to_csv.py
import sys import os sys.path.append(os.path.abspath(os.path.curdir)) from converter import gml_to_node_edge_list if __name__ == '__main__': in_file = sys.argv[1] res = gml_to_node_edge_list(in_file, routing=True)
import sys import os sys.path.append(os.path.abspath(os.path.curdir)) from converter import gml_to_node_edge_list if __name__ == '__main__': in_file = sys.argv[1] outfile = sys.argv[2] if len(sys.argv) > 2 else None res = gml_to_node_edge_list(in_file, outfile=outfile, routing=True)
Add outfile option to conversion script
Add outfile option to conversion script
Python
mit
gaberosser/geo-network
import sys import os sys.path.append(os.path.abspath(os.path.curdir)) from converter import gml_to_node_edge_list if __name__ == '__main__': in_file = sys.argv[1] res = gml_to_node_edge_list(in_file, routing=True) Add outfile option to conversion script
import sys import os sys.path.append(os.path.abspath(os.path.curdir)) from converter import gml_to_node_edge_list if __name__ == '__main__': in_file = sys.argv[1] outfile = sys.argv[2] if len(sys.argv) > 2 else None res = gml_to_node_edge_list(in_file, outfile=outfile, routing=True)
<commit_before>import sys import os sys.path.append(os.path.abspath(os.path.curdir)) from converter import gml_to_node_edge_list if __name__ == '__main__': in_file = sys.argv[1] res = gml_to_node_edge_list(in_file, routing=True) <commit_msg>Add outfile option to conversion script<commit_after>
import sys import os sys.path.append(os.path.abspath(os.path.curdir)) from converter import gml_to_node_edge_list if __name__ == '__main__': in_file = sys.argv[1] outfile = sys.argv[2] if len(sys.argv) > 2 else None res = gml_to_node_edge_list(in_file, outfile=outfile, routing=True)
import sys import os sys.path.append(os.path.abspath(os.path.curdir)) from converter import gml_to_node_edge_list if __name__ == '__main__': in_file = sys.argv[1] res = gml_to_node_edge_list(in_file, routing=True) Add outfile option to conversion scriptimport sys import os sys.path.append(os.path.abspath(os....
<commit_before>import sys import os sys.path.append(os.path.abspath(os.path.curdir)) from converter import gml_to_node_edge_list if __name__ == '__main__': in_file = sys.argv[1] res = gml_to_node_edge_list(in_file, routing=True) <commit_msg>Add outfile option to conversion script<commit_after>import sys impo...
1fef8dbb26aec9b0f3f174e09789461714e55ac5
snmpy/disk_utilization.py
snmpy/disk_utilization.py
import os, time, subprocess import logging as log class disk_utilization: def __init__(self, conf): os.environ['LC_TIME'] = 'POSIX' self.devs = ['dev%s-%s' % tuple(line.split()[0:2]) for line in open('/proc/diskstats')] def len(self): return len(self.devs) def key(self, idx): ...
import os import time import snmpy import subprocess import logging as log class disk_utilization(snmpy.plugin): def __init__(self, conf, script=False): snmpy.plugin.__init__(self, conf, script) def key(self, idx): return 'string', self.data[idx - 1] def val(self, idx): ts = time....
Convert to use the base class and update for new plugin path.
Convert to use the base class and update for new plugin path.
Python
mit
mk23/snmpy,mk23/snmpy
import os, time, subprocess import logging as log class disk_utilization: def __init__(self, conf): os.environ['LC_TIME'] = 'POSIX' self.devs = ['dev%s-%s' % tuple(line.split()[0:2]) for line in open('/proc/diskstats')] def len(self): return len(self.devs) def key(self, idx): ...
import os import time import snmpy import subprocess import logging as log class disk_utilization(snmpy.plugin): def __init__(self, conf, script=False): snmpy.plugin.__init__(self, conf, script) def key(self, idx): return 'string', self.data[idx - 1] def val(self, idx): ts = time....
<commit_before>import os, time, subprocess import logging as log class disk_utilization: def __init__(self, conf): os.environ['LC_TIME'] = 'POSIX' self.devs = ['dev%s-%s' % tuple(line.split()[0:2]) for line in open('/proc/diskstats')] def len(self): return len(self.devs) def key(s...
import os import time import snmpy import subprocess import logging as log class disk_utilization(snmpy.plugin): def __init__(self, conf, script=False): snmpy.plugin.__init__(self, conf, script) def key(self, idx): return 'string', self.data[idx - 1] def val(self, idx): ts = time....
import os, time, subprocess import logging as log class disk_utilization: def __init__(self, conf): os.environ['LC_TIME'] = 'POSIX' self.devs = ['dev%s-%s' % tuple(line.split()[0:2]) for line in open('/proc/diskstats')] def len(self): return len(self.devs) def key(self, idx): ...
<commit_before>import os, time, subprocess import logging as log class disk_utilization: def __init__(self, conf): os.environ['LC_TIME'] = 'POSIX' self.devs = ['dev%s-%s' % tuple(line.split()[0:2]) for line in open('/proc/diskstats')] def len(self): return len(self.devs) def key(s...
2f34d442157f86af4fd75c48ea2cf568fbef34f6
migrations/versions/223041bb858b_message_contact_association.py
migrations/versions/223041bb858b_message_contact_association.py
"""message contact association Revision ID: 223041bb858b Revises: 2c9f3a06de09 Create Date: 2014-04-28 23:52:05.449401 """ # revision identifiers, used by Alembic. revision = '223041bb858b' down_revision = '2c9f3a06de09' # Yes, this is a terrible hack. But tools/rerank_contacts.py already contains a # script to pro...
"""message contact association Revision ID: 223041bb858b Revises: 2c9f3a06de09 Create Date: 2014-04-28 23:52:05.449401 """ # revision identifiers, used by Alembic. revision = '223041bb858b' down_revision = '2c9f3a06de09' from alembic import op import sqlalchemy as sa def upgrade(): op.create_table( '...
Rearrange imports in previous migration.
Rearrange imports in previous migration. According to mg bad things can happen if you try to do stuff outside of a migration's upgrade() function.
Python
agpl-3.0
wakermahmud/sync-engine,nylas/sync-engine,PriviPK/privipk-sync-engine,PriviPK/privipk-sync-engine,EthanBlackburn/sync-engine,rmasters/inbox,jobscore/sync-engine,closeio/nylas,Eagles2F/sync-engine,ErinCall/sync-engine,Eagles2F/sync-engine,wakermahmud/sync-engine,closeio/nylas,Eagles2F/sync-engine,wakermahmud/sync-engine...
"""message contact association Revision ID: 223041bb858b Revises: 2c9f3a06de09 Create Date: 2014-04-28 23:52:05.449401 """ # revision identifiers, used by Alembic. revision = '223041bb858b' down_revision = '2c9f3a06de09' # Yes, this is a terrible hack. But tools/rerank_contacts.py already contains a # script to pro...
"""message contact association Revision ID: 223041bb858b Revises: 2c9f3a06de09 Create Date: 2014-04-28 23:52:05.449401 """ # revision identifiers, used by Alembic. revision = '223041bb858b' down_revision = '2c9f3a06de09' from alembic import op import sqlalchemy as sa def upgrade(): op.create_table( '...
<commit_before>"""message contact association Revision ID: 223041bb858b Revises: 2c9f3a06de09 Create Date: 2014-04-28 23:52:05.449401 """ # revision identifiers, used by Alembic. revision = '223041bb858b' down_revision = '2c9f3a06de09' # Yes, this is a terrible hack. But tools/rerank_contacts.py already contains a ...
"""message contact association Revision ID: 223041bb858b Revises: 2c9f3a06de09 Create Date: 2014-04-28 23:52:05.449401 """ # revision identifiers, used by Alembic. revision = '223041bb858b' down_revision = '2c9f3a06de09' from alembic import op import sqlalchemy as sa def upgrade(): op.create_table( '...
"""message contact association Revision ID: 223041bb858b Revises: 2c9f3a06de09 Create Date: 2014-04-28 23:52:05.449401 """ # revision identifiers, used by Alembic. revision = '223041bb858b' down_revision = '2c9f3a06de09' # Yes, this is a terrible hack. But tools/rerank_contacts.py already contains a # script to pro...
<commit_before>"""message contact association Revision ID: 223041bb858b Revises: 2c9f3a06de09 Create Date: 2014-04-28 23:52:05.449401 """ # revision identifiers, used by Alembic. revision = '223041bb858b' down_revision = '2c9f3a06de09' # Yes, this is a terrible hack. But tools/rerank_contacts.py already contains a ...
47eac4ef8acca10023f2f43dd3fea0e0abbc1202
apps/organizations/admin.py
apps/organizations/admin.py
from apps.organizations.models import Organization, OrganizationAddress from django.contrib import admin class OrganizationAddressAdmin(admin.StackedInline): model = OrganizationAddress extra = 1 class OrganizationAdmin(admin.ModelAdmin): inlines = (OrganizationAddressAdmin,) admin.site.register(Organ...
from django.contrib import admin from apps.organizations.models import ( Organization, OrganizationAddress, OrganizationMember ) class OrganizationAddressAdmin(admin.StackedInline): model = OrganizationAddress extra = 1 class OrganizationAdmin(admin.ModelAdmin): inlines = (OrganizationAddressAdmin,...
Add Admin page for OrganizationMember.
Add Admin page for OrganizationMember.
Python
bsd-3-clause
onepercentclub/onepercentclub-site,onepercentclub/onepercentclub-site,onepercentclub/onepercentclub-site,onepercentclub/onepercentclub-site,onepercentclub/onepercentclub-site
from apps.organizations.models import Organization, OrganizationAddress from django.contrib import admin class OrganizationAddressAdmin(admin.StackedInline): model = OrganizationAddress extra = 1 class OrganizationAdmin(admin.ModelAdmin): inlines = (OrganizationAddressAdmin,) admin.site.register(Organ...
from django.contrib import admin from apps.organizations.models import ( Organization, OrganizationAddress, OrganizationMember ) class OrganizationAddressAdmin(admin.StackedInline): model = OrganizationAddress extra = 1 class OrganizationAdmin(admin.ModelAdmin): inlines = (OrganizationAddressAdmin,...
<commit_before>from apps.organizations.models import Organization, OrganizationAddress from django.contrib import admin class OrganizationAddressAdmin(admin.StackedInline): model = OrganizationAddress extra = 1 class OrganizationAdmin(admin.ModelAdmin): inlines = (OrganizationAddressAdmin,) admin.site...
from django.contrib import admin from apps.organizations.models import ( Organization, OrganizationAddress, OrganizationMember ) class OrganizationAddressAdmin(admin.StackedInline): model = OrganizationAddress extra = 1 class OrganizationAdmin(admin.ModelAdmin): inlines = (OrganizationAddressAdmin,...
from apps.organizations.models import Organization, OrganizationAddress from django.contrib import admin class OrganizationAddressAdmin(admin.StackedInline): model = OrganizationAddress extra = 1 class OrganizationAdmin(admin.ModelAdmin): inlines = (OrganizationAddressAdmin,) admin.site.register(Organ...
<commit_before>from apps.organizations.models import Organization, OrganizationAddress from django.contrib import admin class OrganizationAddressAdmin(admin.StackedInline): model = OrganizationAddress extra = 1 class OrganizationAdmin(admin.ModelAdmin): inlines = (OrganizationAddressAdmin,) admin.site...
48e04ae85c563ab6af03773535ebeed748d33572
flynn/__init__.py
flynn/__init__.py
# coding: utf-8 import flynn.decoder import flynn.encoder def dump(obj, fp): return flynn.encoder.encode(fp, obj) def dumps(obj): return flynn.encoder.encode_str(obj) def load(s): return flynn.decoder.decode(s) def loads(s): return flynn.decoder.decode(s)
# coding: utf-8 import flynn.decoder import flynn.encoder def dump(obj, fp): return flynn.encoder.encode(fp, obj) def dumps(obj): return flynn.encoder.encode_str(obj) def dumph(obj): return "".join(hex(n)[2:].rjust(2, "0") for n in dumps(obj)) def load(s): return flynn.decoder.decode(s) def loads(s): return ...
Implement dumph to generate input for cbor.me
Implement dumph to generate input for cbor.me
Python
mit
fritz0705/flynn
# coding: utf-8 import flynn.decoder import flynn.encoder def dump(obj, fp): return flynn.encoder.encode(fp, obj) def dumps(obj): return flynn.encoder.encode_str(obj) def load(s): return flynn.decoder.decode(s) def loads(s): return flynn.decoder.decode(s) Implement dumph to generate input for cbor.me
# coding: utf-8 import flynn.decoder import flynn.encoder def dump(obj, fp): return flynn.encoder.encode(fp, obj) def dumps(obj): return flynn.encoder.encode_str(obj) def dumph(obj): return "".join(hex(n)[2:].rjust(2, "0") for n in dumps(obj)) def load(s): return flynn.decoder.decode(s) def loads(s): return ...
<commit_before># coding: utf-8 import flynn.decoder import flynn.encoder def dump(obj, fp): return flynn.encoder.encode(fp, obj) def dumps(obj): return flynn.encoder.encode_str(obj) def load(s): return flynn.decoder.decode(s) def loads(s): return flynn.decoder.decode(s) <commit_msg>Implement dumph to generate...
# coding: utf-8 import flynn.decoder import flynn.encoder def dump(obj, fp): return flynn.encoder.encode(fp, obj) def dumps(obj): return flynn.encoder.encode_str(obj) def dumph(obj): return "".join(hex(n)[2:].rjust(2, "0") for n in dumps(obj)) def load(s): return flynn.decoder.decode(s) def loads(s): return ...
# coding: utf-8 import flynn.decoder import flynn.encoder def dump(obj, fp): return flynn.encoder.encode(fp, obj) def dumps(obj): return flynn.encoder.encode_str(obj) def load(s): return flynn.decoder.decode(s) def loads(s): return flynn.decoder.decode(s) Implement dumph to generate input for cbor.me# coding:...
<commit_before># coding: utf-8 import flynn.decoder import flynn.encoder def dump(obj, fp): return flynn.encoder.encode(fp, obj) def dumps(obj): return flynn.encoder.encode_str(obj) def load(s): return flynn.decoder.decode(s) def loads(s): return flynn.decoder.decode(s) <commit_msg>Implement dumph to generate...
e1e7152ae23ce5f4e8219254581e3a3c13960149
linter.py
linter.py
# # linter.py # Linter for SublimeLinter3, a code checking framework for Sublime Text 3 # # Copyright (c) 2014 CorvisaCloud, LLC # # License: MIT # """This module exports the Luacheck plugin class.""" from SublimeLinter.lint import Linter class Luacheck(Linter): """Provides an interface to luacheck.""" sy...
# # linter.py # Linter for SublimeLinter3, a code checking framework for Sublime Text 3 # # Copyright (c) 2014 CorvisaCloud, LLC # # License: MIT # """This module exports the Luacheck plugin class.""" from SublimeLinter.lint import Linter class Luacheck(Linter): """Provides an interface to luacheck.""" syn...
Fix a pydocstyle warning in .travis.yml
Fix a pydocstyle warning in .travis.yml
Python
mit
SublimeLinter/SublimeLinter-luacheck
# # linter.py # Linter for SublimeLinter3, a code checking framework for Sublime Text 3 # # Copyright (c) 2014 CorvisaCloud, LLC # # License: MIT # """This module exports the Luacheck plugin class.""" from SublimeLinter.lint import Linter class Luacheck(Linter): """Provides an interface to luacheck.""" sy...
# # linter.py # Linter for SublimeLinter3, a code checking framework for Sublime Text 3 # # Copyright (c) 2014 CorvisaCloud, LLC # # License: MIT # """This module exports the Luacheck plugin class.""" from SublimeLinter.lint import Linter class Luacheck(Linter): """Provides an interface to luacheck.""" syn...
<commit_before># # linter.py # Linter for SublimeLinter3, a code checking framework for Sublime Text 3 # # Copyright (c) 2014 CorvisaCloud, LLC # # License: MIT # """This module exports the Luacheck plugin class.""" from SublimeLinter.lint import Linter class Luacheck(Linter): """Provides an interface to luach...
# # linter.py # Linter for SublimeLinter3, a code checking framework for Sublime Text 3 # # Copyright (c) 2014 CorvisaCloud, LLC # # License: MIT # """This module exports the Luacheck plugin class.""" from SublimeLinter.lint import Linter class Luacheck(Linter): """Provides an interface to luacheck.""" syn...
# # linter.py # Linter for SublimeLinter3, a code checking framework for Sublime Text 3 # # Copyright (c) 2014 CorvisaCloud, LLC # # License: MIT # """This module exports the Luacheck plugin class.""" from SublimeLinter.lint import Linter class Luacheck(Linter): """Provides an interface to luacheck.""" sy...
<commit_before># # linter.py # Linter for SublimeLinter3, a code checking framework for Sublime Text 3 # # Copyright (c) 2014 CorvisaCloud, LLC # # License: MIT # """This module exports the Luacheck plugin class.""" from SublimeLinter.lint import Linter class Luacheck(Linter): """Provides an interface to luach...
130b6d47e95c2e538cd5842f6f2f2a88fd9bf9dd
djangocms_forms/cms_app.py
djangocms_forms/cms_app.py
from __future__ import unicode_literals from django.utils.translation import ugettext_lazy as _ from cms.app_base import CMSApp from cms.apphook_pool import apphook_pool class DjangoCMSFormsApphook(CMSApp): name = _('Django CMS Forms') urls = ['djangocms_forms.urls'] apphook_pool.register(DjangoCMSFormsApp...
from __future__ import unicode_literals from django.utils.translation import ugettext_lazy as _ from cms.app_base import CMSApp from cms.apphook_pool import apphook_pool class DjangoCMSFormsApphook(CMSApp): name = _('Forms') urls = ['djangocms_forms.urls'] apphook_pool.register(DjangoCMSFormsApphook)
Rename `CMSApp` to Forms — make it consistent to Django verbose app name.
Rename `CMSApp` to Forms — make it consistent to Django verbose app name.
Python
bsd-3-clause
mishbahr/djangocms-forms,mishbahr/djangocms-forms,mishbahr/djangocms-forms
from __future__ import unicode_literals from django.utils.translation import ugettext_lazy as _ from cms.app_base import CMSApp from cms.apphook_pool import apphook_pool class DjangoCMSFormsApphook(CMSApp): name = _('Django CMS Forms') urls = ['djangocms_forms.urls'] apphook_pool.register(DjangoCMSFormsApp...
from __future__ import unicode_literals from django.utils.translation import ugettext_lazy as _ from cms.app_base import CMSApp from cms.apphook_pool import apphook_pool class DjangoCMSFormsApphook(CMSApp): name = _('Forms') urls = ['djangocms_forms.urls'] apphook_pool.register(DjangoCMSFormsApphook)
<commit_before>from __future__ import unicode_literals from django.utils.translation import ugettext_lazy as _ from cms.app_base import CMSApp from cms.apphook_pool import apphook_pool class DjangoCMSFormsApphook(CMSApp): name = _('Django CMS Forms') urls = ['djangocms_forms.urls'] apphook_pool.register(Dj...
from __future__ import unicode_literals from django.utils.translation import ugettext_lazy as _ from cms.app_base import CMSApp from cms.apphook_pool import apphook_pool class DjangoCMSFormsApphook(CMSApp): name = _('Forms') urls = ['djangocms_forms.urls'] apphook_pool.register(DjangoCMSFormsApphook)
from __future__ import unicode_literals from django.utils.translation import ugettext_lazy as _ from cms.app_base import CMSApp from cms.apphook_pool import apphook_pool class DjangoCMSFormsApphook(CMSApp): name = _('Django CMS Forms') urls = ['djangocms_forms.urls'] apphook_pool.register(DjangoCMSFormsApp...
<commit_before>from __future__ import unicode_literals from django.utils.translation import ugettext_lazy as _ from cms.app_base import CMSApp from cms.apphook_pool import apphook_pool class DjangoCMSFormsApphook(CMSApp): name = _('Django CMS Forms') urls = ['djangocms_forms.urls'] apphook_pool.register(Dj...
0aa5540cef1e3137147cd379eaffc98208b78595
copy-labels.py
copy-labels.py
#!/usr/bin/env python """Copy tags from one repo to others.""" from __future__ import print_function import json import requests import yaml from helpers import paginated_get LABELS_URL = "https://api.github.com/repos/{owner_repo}/labels" def get_labels(owner_repo): url = LABELS_URL.format(owner_repo=owner_r...
#!/usr/bin/env python """Copy tags from one repo to others.""" from __future__ import print_function import json import requests import yaml from helpers import paginated_get LABELS_URL = "https://api.github.com/repos/{owner_repo}/labels" def get_labels(owner_repo): url = LABELS_URL.format(owner_repo=owner_r...
Make copying labels less verbose when things are fine.:
Make copying labels less verbose when things are fine.:
Python
apache-2.0
edx/repo-tools,edx/repo-tools
#!/usr/bin/env python """Copy tags from one repo to others.""" from __future__ import print_function import json import requests import yaml from helpers import paginated_get LABELS_URL = "https://api.github.com/repos/{owner_repo}/labels" def get_labels(owner_repo): url = LABELS_URL.format(owner_repo=owner_r...
#!/usr/bin/env python """Copy tags from one repo to others.""" from __future__ import print_function import json import requests import yaml from helpers import paginated_get LABELS_URL = "https://api.github.com/repos/{owner_repo}/labels" def get_labels(owner_repo): url = LABELS_URL.format(owner_repo=owner_r...
<commit_before>#!/usr/bin/env python """Copy tags from one repo to others.""" from __future__ import print_function import json import requests import yaml from helpers import paginated_get LABELS_URL = "https://api.github.com/repos/{owner_repo}/labels" def get_labels(owner_repo): url = LABELS_URL.format(own...
#!/usr/bin/env python """Copy tags from one repo to others.""" from __future__ import print_function import json import requests import yaml from helpers import paginated_get LABELS_URL = "https://api.github.com/repos/{owner_repo}/labels" def get_labels(owner_repo): url = LABELS_URL.format(owner_repo=owner_r...
#!/usr/bin/env python """Copy tags from one repo to others.""" from __future__ import print_function import json import requests import yaml from helpers import paginated_get LABELS_URL = "https://api.github.com/repos/{owner_repo}/labels" def get_labels(owner_repo): url = LABELS_URL.format(owner_repo=owner_r...
<commit_before>#!/usr/bin/env python """Copy tags from one repo to others.""" from __future__ import print_function import json import requests import yaml from helpers import paginated_get LABELS_URL = "https://api.github.com/repos/{owner_repo}/labels" def get_labels(owner_repo): url = LABELS_URL.format(own...
110c362e3e8436700707c2306d115b3b2476a79d
core/models.py
core/models.py
from os import makedirs from os.path import join, exists from urllib import urlretrieve from django.conf import settings from social_auth.signals import socialauth_registered def create_profile(sender, user, response, details, **kwargs): try: # twitter photo_url = response["profile_image_url"] ...
from os import makedirs from os.path import join, exists from urllib import urlretrieve from django.conf import settings from django.contrib.auth.models import User from django.db import models from django.db.models.signals import post_save from django.dispatch import receiver from social_auth.signals import socialau...
Add initial account balance for users.
Add initial account balance for users.
Python
bsd-2-clause
stephenmcd/gamblor,stephenmcd/gamblor
from os import makedirs from os.path import join, exists from urllib import urlretrieve from django.conf import settings from social_auth.signals import socialauth_registered def create_profile(sender, user, response, details, **kwargs): try: # twitter photo_url = response["profile_image_url"] ...
from os import makedirs from os.path import join, exists from urllib import urlretrieve from django.conf import settings from django.contrib.auth.models import User from django.db import models from django.db.models.signals import post_save from django.dispatch import receiver from social_auth.signals import socialau...
<commit_before> from os import makedirs from os.path import join, exists from urllib import urlretrieve from django.conf import settings from social_auth.signals import socialauth_registered def create_profile(sender, user, response, details, **kwargs): try: # twitter photo_url = response["profil...
from os import makedirs from os.path import join, exists from urllib import urlretrieve from django.conf import settings from django.contrib.auth.models import User from django.db import models from django.db.models.signals import post_save from django.dispatch import receiver from social_auth.signals import socialau...
from os import makedirs from os.path import join, exists from urllib import urlretrieve from django.conf import settings from social_auth.signals import socialauth_registered def create_profile(sender, user, response, details, **kwargs): try: # twitter photo_url = response["profile_image_url"] ...
<commit_before> from os import makedirs from os.path import join, exists from urllib import urlretrieve from django.conf import settings from social_auth.signals import socialauth_registered def create_profile(sender, user, response, details, **kwargs): try: # twitter photo_url = response["profil...
6be57a38751e42c9544e29168db05cba611acbb1
payments/management/commands/init_plans.py
payments/management/commands/init_plans.py
import decimal from django.conf import settings from django.core.management.base import BaseCommand import stripe class Command(BaseCommand): help = "Make sure your Stripe account has the plans" def handle(self, *args, **options): stripe.api_key = settings.STRIPE_SECRET_KEY for plan in set...
import decimal from django.conf import settings from django.core.management.base import BaseCommand import stripe class Command(BaseCommand): help = "Make sure your Stripe account has the plans" def handle(self, *args, **options): stripe.api_key = settings.STRIPE_SECRET_KEY for plan in set...
Add trial period days option to initial plans.
Add trial period days option to initial plans.
Python
mit
aibon/django-stripe-payments,grue/django-stripe-payments,jawed123/django-stripe-payments,grue/django-stripe-payments,wahuneke/django-stripe-payments,boxysean/django-stripe-payments,jamespacileo/django-stripe-payments,boxysean/django-stripe-payments,pinax/django-stripe-payments,ZeevG/django-stripe-payments,jawed123/djan...
import decimal from django.conf import settings from django.core.management.base import BaseCommand import stripe class Command(BaseCommand): help = "Make sure your Stripe account has the plans" def handle(self, *args, **options): stripe.api_key = settings.STRIPE_SECRET_KEY for plan in set...
import decimal from django.conf import settings from django.core.management.base import BaseCommand import stripe class Command(BaseCommand): help = "Make sure your Stripe account has the plans" def handle(self, *args, **options): stripe.api_key = settings.STRIPE_SECRET_KEY for plan in set...
<commit_before>import decimal from django.conf import settings from django.core.management.base import BaseCommand import stripe class Command(BaseCommand): help = "Make sure your Stripe account has the plans" def handle(self, *args, **options): stripe.api_key = settings.STRIPE_SECRET_KEY ...
import decimal from django.conf import settings from django.core.management.base import BaseCommand import stripe class Command(BaseCommand): help = "Make sure your Stripe account has the plans" def handle(self, *args, **options): stripe.api_key = settings.STRIPE_SECRET_KEY for plan in set...
import decimal from django.conf import settings from django.core.management.base import BaseCommand import stripe class Command(BaseCommand): help = "Make sure your Stripe account has the plans" def handle(self, *args, **options): stripe.api_key = settings.STRIPE_SECRET_KEY for plan in set...
<commit_before>import decimal from django.conf import settings from django.core.management.base import BaseCommand import stripe class Command(BaseCommand): help = "Make sure your Stripe account has the plans" def handle(self, *args, **options): stripe.api_key = settings.STRIPE_SECRET_KEY ...
2768f7ac50a7b91d984f0f872b647e647d768e93
IPython/lib/tests/test_security.py
IPython/lib/tests/test_security.py
from IPython.lib import passwd from IPython.lib.security import passwd_check, salt_len import nose.tools as nt def test_passwd_structure(): p = passwd('passphrase') algorithm, salt, hashed = p.split(':') nt.assert_equal(algorithm, 'sha1') nt.assert_equal(len(salt), salt_len) nt.assert_equal(len(has...
# coding: utf-8 from IPython.lib import passwd from IPython.lib.security import passwd_check, salt_len import nose.tools as nt def test_passwd_structure(): p = passwd('passphrase') algorithm, salt, hashed = p.split(':') nt.assert_equal(algorithm, 'sha1') nt.assert_equal(len(salt), salt_len) nt.asse...
Add failing (on Py 2) test for passwd_check with unicode arguments
Add failing (on Py 2) test for passwd_check with unicode arguments
Python
bsd-3-clause
ipython/ipython,ipython/ipython
from IPython.lib import passwd from IPython.lib.security import passwd_check, salt_len import nose.tools as nt def test_passwd_structure(): p = passwd('passphrase') algorithm, salt, hashed = p.split(':') nt.assert_equal(algorithm, 'sha1') nt.assert_equal(len(salt), salt_len) nt.assert_equal(len(has...
# coding: utf-8 from IPython.lib import passwd from IPython.lib.security import passwd_check, salt_len import nose.tools as nt def test_passwd_structure(): p = passwd('passphrase') algorithm, salt, hashed = p.split(':') nt.assert_equal(algorithm, 'sha1') nt.assert_equal(len(salt), salt_len) nt.asse...
<commit_before>from IPython.lib import passwd from IPython.lib.security import passwd_check, salt_len import nose.tools as nt def test_passwd_structure(): p = passwd('passphrase') algorithm, salt, hashed = p.split(':') nt.assert_equal(algorithm, 'sha1') nt.assert_equal(len(salt), salt_len) nt.asser...
# coding: utf-8 from IPython.lib import passwd from IPython.lib.security import passwd_check, salt_len import nose.tools as nt def test_passwd_structure(): p = passwd('passphrase') algorithm, salt, hashed = p.split(':') nt.assert_equal(algorithm, 'sha1') nt.assert_equal(len(salt), salt_len) nt.asse...
from IPython.lib import passwd from IPython.lib.security import passwd_check, salt_len import nose.tools as nt def test_passwd_structure(): p = passwd('passphrase') algorithm, salt, hashed = p.split(':') nt.assert_equal(algorithm, 'sha1') nt.assert_equal(len(salt), salt_len) nt.assert_equal(len(has...
<commit_before>from IPython.lib import passwd from IPython.lib.security import passwd_check, salt_len import nose.tools as nt def test_passwd_structure(): p = passwd('passphrase') algorithm, salt, hashed = p.split(':') nt.assert_equal(algorithm, 'sha1') nt.assert_equal(len(salt), salt_len) nt.asser...
090180470c031967f11870b7a101e1f619a17072
src/ggrc_basic_permissions/roles/ProgramAuditReader.py
src/ggrc_basic_permissions/roles/ProgramAuditReader.py
# Copyright (C) 2017 Google Inc. # Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file> scope = "AuditImplied" description = """ A user with the ProgramReader role for a private program will also have this role in the audit context for any audit created for that program. """ permissions =...
# Copyright (C) 2017 Google Inc. # Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file> scope = "AuditImplied" description = """ A user with the ProgramReader role for a private program will also have this role in the audit context for any audit created for that program. """ permissions =...
Add support for reading snapshots for program audit reader
Add support for reading snapshots for program audit reader
Python
apache-2.0
VinnieJohns/ggrc-core,VinnieJohns/ggrc-core,AleksNeStu/ggrc-core,AleksNeStu/ggrc-core,selahssea/ggrc-core,plamut/ggrc-core,AleksNeStu/ggrc-core,VinnieJohns/ggrc-core,VinnieJohns/ggrc-core,AleksNeStu/ggrc-core,plamut/ggrc-core,selahssea/ggrc-core,plamut/ggrc-core,plamut/ggrc-core,selahssea/ggrc-core,selahssea/ggrc-core
# Copyright (C) 2017 Google Inc. # Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file> scope = "AuditImplied" description = """ A user with the ProgramReader role for a private program will also have this role in the audit context for any audit created for that program. """ permissions =...
# Copyright (C) 2017 Google Inc. # Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file> scope = "AuditImplied" description = """ A user with the ProgramReader role for a private program will also have this role in the audit context for any audit created for that program. """ permissions =...
<commit_before># Copyright (C) 2017 Google Inc. # Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file> scope = "AuditImplied" description = """ A user with the ProgramReader role for a private program will also have this role in the audit context for any audit created for that program. ""...
# Copyright (C) 2017 Google Inc. # Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file> scope = "AuditImplied" description = """ A user with the ProgramReader role for a private program will also have this role in the audit context for any audit created for that program. """ permissions =...
# Copyright (C) 2017 Google Inc. # Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file> scope = "AuditImplied" description = """ A user with the ProgramReader role for a private program will also have this role in the audit context for any audit created for that program. """ permissions =...
<commit_before># Copyright (C) 2017 Google Inc. # Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file> scope = "AuditImplied" description = """ A user with the ProgramReader role for a private program will also have this role in the audit context for any audit created for that program. ""...
7618cedbc057b2359f5bc9a1b2479c8287b2d64d
desertbot/datastore.py
desertbot/datastore.py
import json import os class DataStore(object): def __init__(self, storagePath="desertbot_data.json"): self.storagePath = storagePath self.data = {} self.load() def load(self): if not os.path.exists(self.storagePath): self.save() return with open...
import json import os class DataStore(object): def __init__(self, storagePath="desertbot_data.json"): self.storagePath = storagePath self.data = {} self.load() def load(self): if not os.path.exists(self.storagePath): self.save() return with open...
Add setitem and contains to DataStore
Add setitem and contains to DataStore Adding new things to the DataStore now actually works >_>
Python
mit
DesertBot/DesertBot
import json import os class DataStore(object): def __init__(self, storagePath="desertbot_data.json"): self.storagePath = storagePath self.data = {} self.load() def load(self): if not os.path.exists(self.storagePath): self.save() return with open...
import json import os class DataStore(object): def __init__(self, storagePath="desertbot_data.json"): self.storagePath = storagePath self.data = {} self.load() def load(self): if not os.path.exists(self.storagePath): self.save() return with open...
<commit_before>import json import os class DataStore(object): def __init__(self, storagePath="desertbot_data.json"): self.storagePath = storagePath self.data = {} self.load() def load(self): if not os.path.exists(self.storagePath): self.save() return ...
import json import os class DataStore(object): def __init__(self, storagePath="desertbot_data.json"): self.storagePath = storagePath self.data = {} self.load() def load(self): if not os.path.exists(self.storagePath): self.save() return with open...
import json import os class DataStore(object): def __init__(self, storagePath="desertbot_data.json"): self.storagePath = storagePath self.data = {} self.load() def load(self): if not os.path.exists(self.storagePath): self.save() return with open...
<commit_before>import json import os class DataStore(object): def __init__(self, storagePath="desertbot_data.json"): self.storagePath = storagePath self.data = {} self.load() def load(self): if not os.path.exists(self.storagePath): self.save() return ...
a7e627e60b67f74e1799a272436d58e2eb925e82
inventory_control/database/components.py
inventory_control/database/components.py
""" So this is where all the SQL commands for the Component Stuff exists """ CREATE_SQL = """ CREATE TABLE components ( id INT PRIMARY KEY AUTO_INCREMENT, sku TEXT, type INT, status INT ); CREATE TABLE component_type ( id INT PRIMARY KEY AUTO_INCREMENT, type TEXT ); """ SELECT_ALL_COMPONENTS ...
Move all SQL commands to one set of files
Move all SQL commands to one set of files
Python
mit
worldcomputerxchange/inventory-control,codeforsanjose/inventory-control
""" So this is where all the SQL commands for the Component Stuff exists """ CREATE_SQL = """ CREATE TABLE components ( id INT PRIMARY KEY AUTO_INCREMENT, sku TEXT, type INT, status INT ); CREATE TABLE component_type ( id INT PRIMARY KEY AUTO_INCREMENT, type TEXT ); """ SELECT_ALL_COMPONENTS ...
<commit_before>""" So this is where all the SQL commands for the Component Stuff exists """ CREATE_SQL = """ CREATE TABLE components ( id INT PRIMARY KEY AUTO_INCREMENT, sku TEXT, type INT, status INT ); CREATE TABLE component_type ( id INT PRIMARY KEY AUTO_INCREMENT, type TEXT ); """ SELECT_...
""" So this is where all the SQL commands for the Component Stuff exists """ CREATE_SQL = """ CREATE TABLE components ( id INT PRIMARY KEY AUTO_INCREMENT, sku TEXT, type INT, status INT ); CREATE TABLE component_type ( id INT PRIMARY KEY AUTO_INCREMENT, type TEXT ); """ SELECT_ALL_COMPONENTS ...
<commit_before>""" So this is where all the SQL commands for the Component Stuff exists """ CREATE_SQL = """ CREATE TABLE components ( id INT PRIMARY KEY AUTO_INCREMENT, sku TEXT, type INT, status INT ); CREATE TABLE component_type ( id INT PRIMARY KEY AUTO_INCREMENT, type TEXT ); """ SELECT_...
1475ae4f18094e047d0b110fe6526f044defa058
manage.py
manage.py
#!/usr/bin/env python import os import sys import dotenv dotenv.read_dotenv() if __name__ == "__main__": os.environ.setdefault("DJANGO_SETTINGS_MODULE", "opencanada.settings") from django.core.management import execute_from_command_line execute_from_command_line(sys.argv)
#!/usr/bin/env python import os import sys import warnings import dotenv with warnings.catch_warnings(): warnings.simplefilter("ignore") dotenv.read_dotenv() if __name__ == "__main__": os.environ.setdefault("DJANGO_SETTINGS_MODULE", "opencanada.settings") from django.core.management import execute_f...
Disable the warning about .env files not being present.
Disable the warning about .env files not being present.
Python
mit
OpenCanada/website,OpenCanada/website,OpenCanada/website,OpenCanada/website
#!/usr/bin/env python import os import sys import dotenv dotenv.read_dotenv() if __name__ == "__main__": os.environ.setdefault("DJANGO_SETTINGS_MODULE", "opencanada.settings") from django.core.management import execute_from_command_line execute_from_command_line(sys.argv) Disable the warning about .env...
#!/usr/bin/env python import os import sys import warnings import dotenv with warnings.catch_warnings(): warnings.simplefilter("ignore") dotenv.read_dotenv() if __name__ == "__main__": os.environ.setdefault("DJANGO_SETTINGS_MODULE", "opencanada.settings") from django.core.management import execute_f...
<commit_before>#!/usr/bin/env python import os import sys import dotenv dotenv.read_dotenv() if __name__ == "__main__": os.environ.setdefault("DJANGO_SETTINGS_MODULE", "opencanada.settings") from django.core.management import execute_from_command_line execute_from_command_line(sys.argv) <commit_msg>Dis...
#!/usr/bin/env python import os import sys import warnings import dotenv with warnings.catch_warnings(): warnings.simplefilter("ignore") dotenv.read_dotenv() if __name__ == "__main__": os.environ.setdefault("DJANGO_SETTINGS_MODULE", "opencanada.settings") from django.core.management import execute_f...
#!/usr/bin/env python import os import sys import dotenv dotenv.read_dotenv() if __name__ == "__main__": os.environ.setdefault("DJANGO_SETTINGS_MODULE", "opencanada.settings") from django.core.management import execute_from_command_line execute_from_command_line(sys.argv) Disable the warning about .env...
<commit_before>#!/usr/bin/env python import os import sys import dotenv dotenv.read_dotenv() if __name__ == "__main__": os.environ.setdefault("DJANGO_SETTINGS_MODULE", "opencanada.settings") from django.core.management import execute_from_command_line execute_from_command_line(sys.argv) <commit_msg>Dis...
b3bde3bf3eecaf20c7fb8ed2bcf34992a5158965
fabric_rundeck/__main__.py
fabric_rundeck/__main__.py
# # Author:: Noah Kantrowitz <noah@coderanger.net> # # Copyright 2014, Noah Kantrowitz # # 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 # # Unles...
# # Author:: Noah Kantrowitz <noah@coderanger.net> # # Copyright 2014, Noah Kantrowitz # # 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 # # Unles...
Allow passing in a path to a fabfile.
Allow passing in a path to a fabfile.
Python
apache-2.0
coderanger/fabric-rundeck
# # Author:: Noah Kantrowitz <noah@coderanger.net> # # Copyright 2014, Noah Kantrowitz # # 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 # # Unles...
# # Author:: Noah Kantrowitz <noah@coderanger.net> # # Copyright 2014, Noah Kantrowitz # # 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 # # Unles...
<commit_before># # Author:: Noah Kantrowitz <noah@coderanger.net> # # Copyright 2014, Noah Kantrowitz # # 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/LICENS...
# # Author:: Noah Kantrowitz <noah@coderanger.net> # # Copyright 2014, Noah Kantrowitz # # 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 # # Unles...
# # Author:: Noah Kantrowitz <noah@coderanger.net> # # Copyright 2014, Noah Kantrowitz # # 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 # # Unles...
<commit_before># # Author:: Noah Kantrowitz <noah@coderanger.net> # # Copyright 2014, Noah Kantrowitz # # 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/LICENS...
76f697cad3e5dcaeb91c10e6c5f21db23ed8e407
helpdesk/tasks.py
helpdesk/tasks.py
from celery import task from .email import process_email @task() def helpdesk_process_email(): process_email()
from celery.decorators import task from .email import process_email @task() def helpdesk_process_email(): process_email()
Fix import of celery decorator "task".
Fix import of celery decorator "task".
Python
bsd-3-clause
django-helpdesk/django-helpdesk,gwasser/django-helpdesk,rossp/django-helpdesk,rossp/django-helpdesk,rossp/django-helpdesk,rossp/django-helpdesk,gwasser/django-helpdesk,gwasser/django-helpdesk,django-helpdesk/django-helpdesk,django-helpdesk/django-helpdesk,gwasser/django-helpdesk,django-helpdesk/django-helpdesk
from celery import task from .email import process_email @task() def helpdesk_process_email(): process_email() Fix import of celery decorator "task".
from celery.decorators import task from .email import process_email @task() def helpdesk_process_email(): process_email()
<commit_before>from celery import task from .email import process_email @task() def helpdesk_process_email(): process_email() <commit_msg>Fix import of celery decorator "task".<commit_after>
from celery.decorators import task from .email import process_email @task() def helpdesk_process_email(): process_email()
from celery import task from .email import process_email @task() def helpdesk_process_email(): process_email() Fix import of celery decorator "task".from celery.decorators import task from .email import process_email @task() def helpdesk_process_email(): process_email()
<commit_before>from celery import task from .email import process_email @task() def helpdesk_process_email(): process_email() <commit_msg>Fix import of celery decorator "task".<commit_after>from celery.decorators import task from .email import process_email @task() def helpdesk_process_email(): process_em...
ac2e251f165c4d8a11fe65bbfbf1562ea2020e97
docs/dummy-settings.py
docs/dummy-settings.py
DATABASES = { "default": { "NAME": ":memory:", "ENGINE": "django.db.backends.sqlite3", } }
DATABASES = { "default": { "NAME": ":memory:", "ENGINE": "django.db.backends.sqlite3", } } SECRET_KEY = "NOT SECRET"
Fix the exception about the missing secret key when generating docs.
Fix the exception about the missing secret key when generating docs.
Python
bsd-3-clause
littleweaver/django-daguerre,mislavcimpersak/django-daguerre,Styria-Digital/django-daguerre,littleweaver/django-daguerre,mislavcimpersak/django-daguerre,Styria-Digital/django-daguerre
DATABASES = { "default": { "NAME": ":memory:", "ENGINE": "django.db.backends.sqlite3", } }Fix the exception about the missing secret key when generating docs.
DATABASES = { "default": { "NAME": ":memory:", "ENGINE": "django.db.backends.sqlite3", } } SECRET_KEY = "NOT SECRET"
<commit_before>DATABASES = { "default": { "NAME": ":memory:", "ENGINE": "django.db.backends.sqlite3", } }<commit_msg>Fix the exception about the missing secret key when generating docs.<commit_after>
DATABASES = { "default": { "NAME": ":memory:", "ENGINE": "django.db.backends.sqlite3", } } SECRET_KEY = "NOT SECRET"
DATABASES = { "default": { "NAME": ":memory:", "ENGINE": "django.db.backends.sqlite3", } }Fix the exception about the missing secret key when generating docs.DATABASES = { "default": { "NAME": ":memory:", "ENGINE": "django.db.backends.sqlite3", } } SECRET_KEY = "NOT SECRET"
<commit_before>DATABASES = { "default": { "NAME": ":memory:", "ENGINE": "django.db.backends.sqlite3", } }<commit_msg>Fix the exception about the missing secret key when generating docs.<commit_after>DATABASES = { "default": { "NAME": ":memory:", "ENGINE": "django.db.backends.sqlite3", } } SECRET_KEY = "NOT...
2d0a5f56acf9035f883849e780fe36f7534a4251
TWLight/ezproxy/urls.py
TWLight/ezproxy/urls.py
from django.conf.urls import url from django.contrib.auth.decorators import login_required from . import views urlpatterns = [ url(r'^u/(?P<url>http[s]?://(?:[a-zA-Z]|[0-9]|[$-_@.&+]|[!*\(\),]|(?:%[0-9a-fA-F][0-9a-fA-F]))+)$', login_required(views.EZProxyAuth.as_view()), name='ezproxy_auth_u' ...
from django.conf.urls import url from django.contrib.auth.decorators import login_required from . import views urlpatterns = [ url(r'^u/(?P<url>http[s]?://(?:[a-zA-Z]|[0-9]|[$-_@.&+]|[!*\(\),]|(?:%[0-9a-fA-F][0-9a-fA-F]))+)$', login_required(views.EZProxyAuth.as_view()), name='ezproxy_auth_u' ...
Use a more precise pattern to id ^R ezproxy url tokens.
Use a more precise pattern to id ^R ezproxy url tokens.
Python
mit
WikipediaLibrary/TWLight,WikipediaLibrary/TWLight,WikipediaLibrary/TWLight,WikipediaLibrary/TWLight,WikipediaLibrary/TWLight
from django.conf.urls import url from django.contrib.auth.decorators import login_required from . import views urlpatterns = [ url(r'^u/(?P<url>http[s]?://(?:[a-zA-Z]|[0-9]|[$-_@.&+]|[!*\(\),]|(?:%[0-9a-fA-F][0-9a-fA-F]))+)$', login_required(views.EZProxyAuth.as_view()), name='ezproxy_auth_u' ...
from django.conf.urls import url from django.contrib.auth.decorators import login_required from . import views urlpatterns = [ url(r'^u/(?P<url>http[s]?://(?:[a-zA-Z]|[0-9]|[$-_@.&+]|[!*\(\),]|(?:%[0-9a-fA-F][0-9a-fA-F]))+)$', login_required(views.EZProxyAuth.as_view()), name='ezproxy_auth_u' ...
<commit_before>from django.conf.urls import url from django.contrib.auth.decorators import login_required from . import views urlpatterns = [ url(r'^u/(?P<url>http[s]?://(?:[a-zA-Z]|[0-9]|[$-_@.&+]|[!*\(\),]|(?:%[0-9a-fA-F][0-9a-fA-F]))+)$', login_required(views.EZProxyAuth.as_view()), name='ezpro...
from django.conf.urls import url from django.contrib.auth.decorators import login_required from . import views urlpatterns = [ url(r'^u/(?P<url>http[s]?://(?:[a-zA-Z]|[0-9]|[$-_@.&+]|[!*\(\),]|(?:%[0-9a-fA-F][0-9a-fA-F]))+)$', login_required(views.EZProxyAuth.as_view()), name='ezproxy_auth_u' ...
from django.conf.urls import url from django.contrib.auth.decorators import login_required from . import views urlpatterns = [ url(r'^u/(?P<url>http[s]?://(?:[a-zA-Z]|[0-9]|[$-_@.&+]|[!*\(\),]|(?:%[0-9a-fA-F][0-9a-fA-F]))+)$', login_required(views.EZProxyAuth.as_view()), name='ezproxy_auth_u' ...
<commit_before>from django.conf.urls import url from django.contrib.auth.decorators import login_required from . import views urlpatterns = [ url(r'^u/(?P<url>http[s]?://(?:[a-zA-Z]|[0-9]|[$-_@.&+]|[!*\(\),]|(?:%[0-9a-fA-F][0-9a-fA-F]))+)$', login_required(views.EZProxyAuth.as_view()), name='ezpro...
bef9fb7f778666e602bfc5b27a65888f7459d0f9
blog/forms.py
blog/forms.py
from .models import BlogPost, BlogComment from django.forms import ModelForm class BlogPostForm(ModelForm): class Meta: model = BlogPost exclude = ('user',) def save(self, user, commit=True): post = super(BlogPostForm, self).save(commit=False) post.user = user if commi...
from .models import BlogPost, BlogComment from django.forms import ModelForm class BlogPostForm(ModelForm): class Meta: model = BlogPost exclude = ('user',) def save(self, user, commit=True): post = super(BlogPostForm, self).save(commit=False) post.user = user if commi...
Add a custom save() method to CommentForm
Add a custom save() method to CommentForm
Python
mit
andreagrandi/bloggato,andreagrandi/bloggato
from .models import BlogPost, BlogComment from django.forms import ModelForm class BlogPostForm(ModelForm): class Meta: model = BlogPost exclude = ('user',) def save(self, user, commit=True): post = super(BlogPostForm, self).save(commit=False) post.user = user if commi...
from .models import BlogPost, BlogComment from django.forms import ModelForm class BlogPostForm(ModelForm): class Meta: model = BlogPost exclude = ('user',) def save(self, user, commit=True): post = super(BlogPostForm, self).save(commit=False) post.user = user if commi...
<commit_before>from .models import BlogPost, BlogComment from django.forms import ModelForm class BlogPostForm(ModelForm): class Meta: model = BlogPost exclude = ('user',) def save(self, user, commit=True): post = super(BlogPostForm, self).save(commit=False) post.user = user ...
from .models import BlogPost, BlogComment from django.forms import ModelForm class BlogPostForm(ModelForm): class Meta: model = BlogPost exclude = ('user',) def save(self, user, commit=True): post = super(BlogPostForm, self).save(commit=False) post.user = user if commi...
from .models import BlogPost, BlogComment from django.forms import ModelForm class BlogPostForm(ModelForm): class Meta: model = BlogPost exclude = ('user',) def save(self, user, commit=True): post = super(BlogPostForm, self).save(commit=False) post.user = user if commi...
<commit_before>from .models import BlogPost, BlogComment from django.forms import ModelForm class BlogPostForm(ModelForm): class Meta: model = BlogPost exclude = ('user',) def save(self, user, commit=True): post = super(BlogPostForm, self).save(commit=False) post.user = user ...
34072121b9fc6d1b0ec740cb3d22034971ef0141
comics/search/urls.py
comics/search/urls.py
from django.conf.urls.defaults import * urlpatterns = patterns('', (r'^', include('haystack.urls')), )
from django.conf.urls.defaults import * from haystack.views import SearchView from haystack.forms import SearchForm urlpatterns = patterns('', url(r'^$', SearchView(form_class=SearchForm), name='haystack_search'), )
Convert to simpler search form
Convert to simpler search form
Python
agpl-3.0
datagutten/comics,klette/comics,jodal/comics,datagutten/comics,jodal/comics,klette/comics,jodal/comics,datagutten/comics,datagutten/comics,jodal/comics,klette/comics
from django.conf.urls.defaults import * urlpatterns = patterns('', (r'^', include('haystack.urls')), ) Convert to simpler search form
from django.conf.urls.defaults import * from haystack.views import SearchView from haystack.forms import SearchForm urlpatterns = patterns('', url(r'^$', SearchView(form_class=SearchForm), name='haystack_search'), )
<commit_before>from django.conf.urls.defaults import * urlpatterns = patterns('', (r'^', include('haystack.urls')), ) <commit_msg>Convert to simpler search form<commit_after>
from django.conf.urls.defaults import * from haystack.views import SearchView from haystack.forms import SearchForm urlpatterns = patterns('', url(r'^$', SearchView(form_class=SearchForm), name='haystack_search'), )
from django.conf.urls.defaults import * urlpatterns = patterns('', (r'^', include('haystack.urls')), ) Convert to simpler search formfrom django.conf.urls.defaults import * from haystack.views import SearchView from haystack.forms import SearchForm urlpatterns = patterns('', url(r'^$', SearchView(form_class=S...
<commit_before>from django.conf.urls.defaults import * urlpatterns = patterns('', (r'^', include('haystack.urls')), ) <commit_msg>Convert to simpler search form<commit_after>from django.conf.urls.defaults import * from haystack.views import SearchView from haystack.forms import SearchForm urlpatterns = patterns('...
09fe8731e733081fff2595b04db63b93d0f4b91b
spider.py
spider.py
from scrapy.contrib.spiders import CrawlSpider, Rule from scrapy.contrib.linkextractors.sgml import SgmlLinkExtractor from scrapy.selector import Selector from dataset import DatasetItem class DatasetSpider(CrawlSpider): name = 'dataset' allowed_domains = ['data.gc.ca/data/en'] start_urls = ['http://data....
from scrapy.contrib.spiders import CrawlSpider, Rule from scrapy.contrib.linkextractors.sgml import SgmlLinkExtractor from scrapy.selector import Selector from dataset import DatasetItem class DatasetSpider(CrawlSpider): name = 'dataset' allowed_domains = ['data.gc.ca/data/en'] start_urls = ['http://data....
Add url assignment to each crawled dataset item
Add url assignment to each crawled dataset item
Python
mit
MaxLikelihood/CODE
from scrapy.contrib.spiders import CrawlSpider, Rule from scrapy.contrib.linkextractors.sgml import SgmlLinkExtractor from scrapy.selector import Selector from dataset import DatasetItem class DatasetSpider(CrawlSpider): name = 'dataset' allowed_domains = ['data.gc.ca/data/en'] start_urls = ['http://data....
from scrapy.contrib.spiders import CrawlSpider, Rule from scrapy.contrib.linkextractors.sgml import SgmlLinkExtractor from scrapy.selector import Selector from dataset import DatasetItem class DatasetSpider(CrawlSpider): name = 'dataset' allowed_domains = ['data.gc.ca/data/en'] start_urls = ['http://data....
<commit_before>from scrapy.contrib.spiders import CrawlSpider, Rule from scrapy.contrib.linkextractors.sgml import SgmlLinkExtractor from scrapy.selector import Selector from dataset import DatasetItem class DatasetSpider(CrawlSpider): name = 'dataset' allowed_domains = ['data.gc.ca/data/en'] start_urls =...
from scrapy.contrib.spiders import CrawlSpider, Rule from scrapy.contrib.linkextractors.sgml import SgmlLinkExtractor from scrapy.selector import Selector from dataset import DatasetItem class DatasetSpider(CrawlSpider): name = 'dataset' allowed_domains = ['data.gc.ca/data/en'] start_urls = ['http://data....
from scrapy.contrib.spiders import CrawlSpider, Rule from scrapy.contrib.linkextractors.sgml import SgmlLinkExtractor from scrapy.selector import Selector from dataset import DatasetItem class DatasetSpider(CrawlSpider): name = 'dataset' allowed_domains = ['data.gc.ca/data/en'] start_urls = ['http://data....
<commit_before>from scrapy.contrib.spiders import CrawlSpider, Rule from scrapy.contrib.linkextractors.sgml import SgmlLinkExtractor from scrapy.selector import Selector from dataset import DatasetItem class DatasetSpider(CrawlSpider): name = 'dataset' allowed_domains = ['data.gc.ca/data/en'] start_urls =...
94e6443a3eeb1bf76121ab2030a90c5631f32ff8
landscapesim/serializers/regions.py
landscapesim/serializers/regions.py
import json from rest_framework import serializers from django.core.urlresolvers import reverse from landscapesim.models import Region class ReportingUnitSerializer(serializers.Serializer): type = serializers.SerializerMethodField() properties = serializers.SerializerMethodField() geometry = serializers...
import json from rest_framework import serializers from django.core.urlresolvers import reverse from landscapesim.models import Region class ReportingUnitSerializer(serializers.Serializer): type = serializers.SerializerMethodField() properties = serializers.SerializerMethodField() geometry = serializers...
Allow data to be returned on the same request.
Allow data to be returned on the same request.
Python
bsd-3-clause
consbio/landscapesim,consbio/landscapesim,consbio/landscapesim
import json from rest_framework import serializers from django.core.urlresolvers import reverse from landscapesim.models import Region class ReportingUnitSerializer(serializers.Serializer): type = serializers.SerializerMethodField() properties = serializers.SerializerMethodField() geometry = serializers...
import json from rest_framework import serializers from django.core.urlresolvers import reverse from landscapesim.models import Region class ReportingUnitSerializer(serializers.Serializer): type = serializers.SerializerMethodField() properties = serializers.SerializerMethodField() geometry = serializers...
<commit_before>import json from rest_framework import serializers from django.core.urlresolvers import reverse from landscapesim.models import Region class ReportingUnitSerializer(serializers.Serializer): type = serializers.SerializerMethodField() properties = serializers.SerializerMethodField() geometr...
import json from rest_framework import serializers from django.core.urlresolvers import reverse from landscapesim.models import Region class ReportingUnitSerializer(serializers.Serializer): type = serializers.SerializerMethodField() properties = serializers.SerializerMethodField() geometry = serializers...
import json from rest_framework import serializers from django.core.urlresolvers import reverse from landscapesim.models import Region class ReportingUnitSerializer(serializers.Serializer): type = serializers.SerializerMethodField() properties = serializers.SerializerMethodField() geometry = serializers...
<commit_before>import json from rest_framework import serializers from django.core.urlresolvers import reverse from landscapesim.models import Region class ReportingUnitSerializer(serializers.Serializer): type = serializers.SerializerMethodField() properties = serializers.SerializerMethodField() geometr...
856f2328ccae97286b621c736716b37967027be8
tests/views.py
tests/views.py
# coding: utf-8 from __future__ import absolute_import, unicode_literals from django.contrib.auth.models import User from django.http import HttpResponse, HttpResponseRedirect from django.template.response import TemplateResponse from django.shortcuts import render from django.views.decorators.cache import cache_page...
# coding: utf-8 from __future__ import absolute_import, unicode_literals from django.contrib.auth.models import User from django.http import HttpResponse, HttpResponseRedirect from django.shortcuts import render from django.template.response import TemplateResponse from django.views.decorators.cache import cache_page...
Fix an imports ordering problem
Fix an imports ordering problem
Python
bsd-3-clause
tim-schilling/django-debug-toolbar,spookylukey/django-debug-toolbar,tim-schilling/django-debug-toolbar,django-debug-toolbar/django-debug-toolbar,tim-schilling/django-debug-toolbar,spookylukey/django-debug-toolbar,spookylukey/django-debug-toolbar,jazzband/django-debug-toolbar,django-debug-toolbar/django-debug-toolbar,dj...
# coding: utf-8 from __future__ import absolute_import, unicode_literals from django.contrib.auth.models import User from django.http import HttpResponse, HttpResponseRedirect from django.template.response import TemplateResponse from django.shortcuts import render from django.views.decorators.cache import cache_page...
# coding: utf-8 from __future__ import absolute_import, unicode_literals from django.contrib.auth.models import User from django.http import HttpResponse, HttpResponseRedirect from django.shortcuts import render from django.template.response import TemplateResponse from django.views.decorators.cache import cache_page...
<commit_before># coding: utf-8 from __future__ import absolute_import, unicode_literals from django.contrib.auth.models import User from django.http import HttpResponse, HttpResponseRedirect from django.template.response import TemplateResponse from django.shortcuts import render from django.views.decorators.cache im...
# coding: utf-8 from __future__ import absolute_import, unicode_literals from django.contrib.auth.models import User from django.http import HttpResponse, HttpResponseRedirect from django.shortcuts import render from django.template.response import TemplateResponse from django.views.decorators.cache import cache_page...
# coding: utf-8 from __future__ import absolute_import, unicode_literals from django.contrib.auth.models import User from django.http import HttpResponse, HttpResponseRedirect from django.template.response import TemplateResponse from django.shortcuts import render from django.views.decorators.cache import cache_page...
<commit_before># coding: utf-8 from __future__ import absolute_import, unicode_literals from django.contrib.auth.models import User from django.http import HttpResponse, HttpResponseRedirect from django.template.response import TemplateResponse from django.shortcuts import render from django.views.decorators.cache im...
f930fc7a23ff1337260a24b54c7b3d2b3d08f0d4
src/survey_stats/state.py
src/survey_stats/state.py
from survey_stats.datasets import SurveyDataset from survey_stats import log lgr = log.getLogger(__name__) dset = {} def initialize(dbc, cache, init_des, use_feather, init_svy, init_soc): lgr.info('was summoned into being, loading up some data', dbc=dbc, cache=cache, use_feather=use_feather) dset['brfss'] =...
from survey_stats.datasets import SurveyDataset from survey_stats import log lgr = log.getLogger(__name__) dset = {} def initialize(dbc, cache, init_des, use_feather, init_svy, init_soc): lgr.info('was summoned into being, loading up some data', dbc=dbc, cache=cache, use_feather=use_feather) dset['brfss'] =...
Check if brfss data for years 2000 to 2010 available
Check if brfss data for years 2000 to 2010 available
Python
bsd-2-clause
semanticbits/survey_stats,semanticbits/survey_stats
from survey_stats.datasets import SurveyDataset from survey_stats import log lgr = log.getLogger(__name__) dset = {} def initialize(dbc, cache, init_des, use_feather, init_svy, init_soc): lgr.info('was summoned into being, loading up some data', dbc=dbc, cache=cache, use_feather=use_feather) dset['brfss'] =...
from survey_stats.datasets import SurveyDataset from survey_stats import log lgr = log.getLogger(__name__) dset = {} def initialize(dbc, cache, init_des, use_feather, init_svy, init_soc): lgr.info('was summoned into being, loading up some data', dbc=dbc, cache=cache, use_feather=use_feather) dset['brfss'] =...
<commit_before>from survey_stats.datasets import SurveyDataset from survey_stats import log lgr = log.getLogger(__name__) dset = {} def initialize(dbc, cache, init_des, use_feather, init_svy, init_soc): lgr.info('was summoned into being, loading up some data', dbc=dbc, cache=cache, use_feather=use_feather) ...
from survey_stats.datasets import SurveyDataset from survey_stats import log lgr = log.getLogger(__name__) dset = {} def initialize(dbc, cache, init_des, use_feather, init_svy, init_soc): lgr.info('was summoned into being, loading up some data', dbc=dbc, cache=cache, use_feather=use_feather) dset['brfss'] =...
from survey_stats.datasets import SurveyDataset from survey_stats import log lgr = log.getLogger(__name__) dset = {} def initialize(dbc, cache, init_des, use_feather, init_svy, init_soc): lgr.info('was summoned into being, loading up some data', dbc=dbc, cache=cache, use_feather=use_feather) dset['brfss'] =...
<commit_before>from survey_stats.datasets import SurveyDataset from survey_stats import log lgr = log.getLogger(__name__) dset = {} def initialize(dbc, cache, init_des, use_feather, init_svy, init_soc): lgr.info('was summoned into being, loading up some data', dbc=dbc, cache=cache, use_feather=use_feather) ...
f2066b0f3fd90583d8b80bb8b09b8168b9d29628
kiva/__init__.py
kiva/__init__.py
#------------------------------------------------------------------------------ # Copyright (c) 2005, Enthought, Inc. # some parts copyright 2002 by Space Telescope Science Institute # All rights reserved. # # This software is provided without warranty under the terms of the BSD # license included in enthought/LICENSE....
#------------------------------------------------------------------------------ # Copyright (c) 2005, Enthought, Inc. # some parts copyright 2002 by Space Telescope Science Institute # All rights reserved. # # This software is provided without warranty under the terms of the BSD # license included in enthought/LICENSE....
Remove the explicit .relative import since the * import does not work with Python 2.5
BUG: Remove the explicit .relative import since the * import does not work with Python 2.5
Python
bsd-3-clause
tommy-u/enable,tommy-u/enable,tommy-u/enable,tommy-u/enable
#------------------------------------------------------------------------------ # Copyright (c) 2005, Enthought, Inc. # some parts copyright 2002 by Space Telescope Science Institute # All rights reserved. # # This software is provided without warranty under the terms of the BSD # license included in enthought/LICENSE....
#------------------------------------------------------------------------------ # Copyright (c) 2005, Enthought, Inc. # some parts copyright 2002 by Space Telescope Science Institute # All rights reserved. # # This software is provided without warranty under the terms of the BSD # license included in enthought/LICENSE....
<commit_before>#------------------------------------------------------------------------------ # Copyright (c) 2005, Enthought, Inc. # some parts copyright 2002 by Space Telescope Science Institute # All rights reserved. # # This software is provided without warranty under the terms of the BSD # license included in ent...
#------------------------------------------------------------------------------ # Copyright (c) 2005, Enthought, Inc. # some parts copyright 2002 by Space Telescope Science Institute # All rights reserved. # # This software is provided without warranty under the terms of the BSD # license included in enthought/LICENSE....
#------------------------------------------------------------------------------ # Copyright (c) 2005, Enthought, Inc. # some parts copyright 2002 by Space Telescope Science Institute # All rights reserved. # # This software is provided without warranty under the terms of the BSD # license included in enthought/LICENSE....
<commit_before>#------------------------------------------------------------------------------ # Copyright (c) 2005, Enthought, Inc. # some parts copyright 2002 by Space Telescope Science Institute # All rights reserved. # # This software is provided without warranty under the terms of the BSD # license included in ent...
5b342d7a2eacea955c851158c8e0e6e33216e780
webcal.py
webcal.py
import webapp2 from google.appengine.api import urlfetch from google.appengine.ext import vendor vendor.add('lib') import icalendar class MainPage(webapp2.RequestHandler): def get(self): result = urlfetch.fetch( 'http://www.arsenal.com/_scripts/ical.ics?tid=1006&sid=123') calendar = icalendar.Cale...
import logging import webapp2 from google.appengine.api import urlfetch from google.appengine.ext import vendor vendor.add('lib') import icalendar class CalendarFilterPage(webapp2.RequestHandler): def get(self): calendar_url = self.request.get('url') result = urlfetch.fetch(calendar_url) # http://www....
Make filtering & url generic
Make filtering & url generic
Python
mit
hatstand/webcal-filter
import webapp2 from google.appengine.api import urlfetch from google.appengine.ext import vendor vendor.add('lib') import icalendar class MainPage(webapp2.RequestHandler): def get(self): result = urlfetch.fetch( 'http://www.arsenal.com/_scripts/ical.ics?tid=1006&sid=123') calendar = icalendar.Cale...
import logging import webapp2 from google.appengine.api import urlfetch from google.appengine.ext import vendor vendor.add('lib') import icalendar class CalendarFilterPage(webapp2.RequestHandler): def get(self): calendar_url = self.request.get('url') result = urlfetch.fetch(calendar_url) # http://www....
<commit_before>import webapp2 from google.appengine.api import urlfetch from google.appengine.ext import vendor vendor.add('lib') import icalendar class MainPage(webapp2.RequestHandler): def get(self): result = urlfetch.fetch( 'http://www.arsenal.com/_scripts/ical.ics?tid=1006&sid=123') calendar =...
import logging import webapp2 from google.appengine.api import urlfetch from google.appengine.ext import vendor vendor.add('lib') import icalendar class CalendarFilterPage(webapp2.RequestHandler): def get(self): calendar_url = self.request.get('url') result = urlfetch.fetch(calendar_url) # http://www....
import webapp2 from google.appengine.api import urlfetch from google.appengine.ext import vendor vendor.add('lib') import icalendar class MainPage(webapp2.RequestHandler): def get(self): result = urlfetch.fetch( 'http://www.arsenal.com/_scripts/ical.ics?tid=1006&sid=123') calendar = icalendar.Cale...
<commit_before>import webapp2 from google.appengine.api import urlfetch from google.appengine.ext import vendor vendor.add('lib') import icalendar class MainPage(webapp2.RequestHandler): def get(self): result = urlfetch.fetch( 'http://www.arsenal.com/_scripts/ical.ics?tid=1006&sid=123') calendar =...
6b98fb9a8f3e78d5ee0c73707cd253fc94e4756e
src/ggrc/models/exceptions.py
src/ggrc/models/exceptions.py
# Copyright (C) 2013 Google Inc., authors, and contributors <see AUTHORS file> # Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file> # Created By: vraj@reciprocitylabs.com # Maintained By: vraj@reciprocitylabs.com import re from sqlalchemy.exc import IntegrityError def translate_message(excep...
# Copyright (C) 2013 Google Inc., authors, and contributors <see AUTHORS file> # Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file> # Created By: vraj@reciprocitylabs.com # Maintained By: vraj@reciprocitylabs.com import re from sqlalchemy.exc import IntegrityError def translate_message(excep...
Fix exception pattern matching for internal unicode strings
Fix exception pattern matching for internal unicode strings
Python
apache-2.0
josthkko/ggrc-core,kr41/ggrc-core,uskudnik/ggrc-core,vladan-m/ggrc-core,vladan-m/ggrc-core,hyperNURb/ggrc-core,andrei-karalionak/ggrc-core,selahssea/ggrc-core,prasannav7/ggrc-core,hasanalom/ggrc-core,edofic/ggrc-core,edofic/ggrc-core,josthkko/ggrc-core,AleksNeStu/ggrc-core,andrei-karalionak/ggrc-core,NejcZupec/ggrc-cor...
# Copyright (C) 2013 Google Inc., authors, and contributors <see AUTHORS file> # Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file> # Created By: vraj@reciprocitylabs.com # Maintained By: vraj@reciprocitylabs.com import re from sqlalchemy.exc import IntegrityError def translate_message(excep...
# Copyright (C) 2013 Google Inc., authors, and contributors <see AUTHORS file> # Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file> # Created By: vraj@reciprocitylabs.com # Maintained By: vraj@reciprocitylabs.com import re from sqlalchemy.exc import IntegrityError def translate_message(excep...
<commit_before># Copyright (C) 2013 Google Inc., authors, and contributors <see AUTHORS file> # Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file> # Created By: vraj@reciprocitylabs.com # Maintained By: vraj@reciprocitylabs.com import re from sqlalchemy.exc import IntegrityError def translat...
# Copyright (C) 2013 Google Inc., authors, and contributors <see AUTHORS file> # Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file> # Created By: vraj@reciprocitylabs.com # Maintained By: vraj@reciprocitylabs.com import re from sqlalchemy.exc import IntegrityError def translate_message(excep...
# Copyright (C) 2013 Google Inc., authors, and contributors <see AUTHORS file> # Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file> # Created By: vraj@reciprocitylabs.com # Maintained By: vraj@reciprocitylabs.com import re from sqlalchemy.exc import IntegrityError def translate_message(excep...
<commit_before># Copyright (C) 2013 Google Inc., authors, and contributors <see AUTHORS file> # Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file> # Created By: vraj@reciprocitylabs.com # Maintained By: vraj@reciprocitylabs.com import re from sqlalchemy.exc import IntegrityError def translat...
e2438124fc8a645508b22b3713984cdb1288927d
utils/mongo.py
utils/mongo.py
import logging from pymongo import MongoClient from pymongo.errors import DuplicateKeyError from pymongo.errors import OperationFailure class MongoInterface: def __init__(self): self._logger = logging.getLogger('spud') self.client = MongoClient() self.db = self.client.spud self._co...
import logging from pymongo import MongoClient, database, collection # from pymongo.errors import DuplicateKeyError # from pymongo.errors import OperationFailure class MongoInterface: def __init__(self): self._logger = logging.getLogger('spud') self.db = database.Database(MongoClient(), 'spud') ...
Make MongoInterface more of an interface
Make MongoInterface more of an interface
Python
mit
spudmind/undertheinfluence,spudmind/undertheinfluence,spudmind/undertheinfluence
import logging from pymongo import MongoClient from pymongo.errors import DuplicateKeyError from pymongo.errors import OperationFailure class MongoInterface: def __init__(self): self._logger = logging.getLogger('spud') self.client = MongoClient() self.db = self.client.spud self._co...
import logging from pymongo import MongoClient, database, collection # from pymongo.errors import DuplicateKeyError # from pymongo.errors import OperationFailure class MongoInterface: def __init__(self): self._logger = logging.getLogger('spud') self.db = database.Database(MongoClient(), 'spud') ...
<commit_before>import logging from pymongo import MongoClient from pymongo.errors import DuplicateKeyError from pymongo.errors import OperationFailure class MongoInterface: def __init__(self): self._logger = logging.getLogger('spud') self.client = MongoClient() self.db = self.client.spud ...
import logging from pymongo import MongoClient, database, collection # from pymongo.errors import DuplicateKeyError # from pymongo.errors import OperationFailure class MongoInterface: def __init__(self): self._logger = logging.getLogger('spud') self.db = database.Database(MongoClient(), 'spud') ...
import logging from pymongo import MongoClient from pymongo.errors import DuplicateKeyError from pymongo.errors import OperationFailure class MongoInterface: def __init__(self): self._logger = logging.getLogger('spud') self.client = MongoClient() self.db = self.client.spud self._co...
<commit_before>import logging from pymongo import MongoClient from pymongo.errors import DuplicateKeyError from pymongo.errors import OperationFailure class MongoInterface: def __init__(self): self._logger = logging.getLogger('spud') self.client = MongoClient() self.db = self.client.spud ...
2518beaf87feb39d03164d30feff37b6dea2c2ef
tests/integration/states/test_renderers.py
tests/integration/states/test_renderers.py
# coding: utf-8 ''' Integration tests for renderer functions ''' # Import Python Libs from __future__ import absolute_import, unicode_literals, print_function # Import Salt Testing libs from tests.support.case import ModuleCase class TestJinjaRenderer(ModuleCase): ''' Validate that ordering works correctly ...
# coding: utf-8 ''' Integration tests for renderer functions ''' # Import Python Libs from __future__ import absolute_import, unicode_literals, print_function # Import Salt Testing libs from tests.support.case import ModuleCase from tests.support.helpers import flaky class TestJinjaRenderer(ModuleCase): ''' ...
Mark renderer test as flaky for mac tests
Mark renderer test as flaky for mac tests
Python
apache-2.0
saltstack/salt,saltstack/salt,saltstack/salt,saltstack/salt,saltstack/salt
# coding: utf-8 ''' Integration tests for renderer functions ''' # Import Python Libs from __future__ import absolute_import, unicode_literals, print_function # Import Salt Testing libs from tests.support.case import ModuleCase class TestJinjaRenderer(ModuleCase): ''' Validate that ordering works correctly ...
# coding: utf-8 ''' Integration tests for renderer functions ''' # Import Python Libs from __future__ import absolute_import, unicode_literals, print_function # Import Salt Testing libs from tests.support.case import ModuleCase from tests.support.helpers import flaky class TestJinjaRenderer(ModuleCase): ''' ...
<commit_before># coding: utf-8 ''' Integration tests for renderer functions ''' # Import Python Libs from __future__ import absolute_import, unicode_literals, print_function # Import Salt Testing libs from tests.support.case import ModuleCase class TestJinjaRenderer(ModuleCase): ''' Validate that ordering w...
# coding: utf-8 ''' Integration tests for renderer functions ''' # Import Python Libs from __future__ import absolute_import, unicode_literals, print_function # Import Salt Testing libs from tests.support.case import ModuleCase from tests.support.helpers import flaky class TestJinjaRenderer(ModuleCase): ''' ...
# coding: utf-8 ''' Integration tests for renderer functions ''' # Import Python Libs from __future__ import absolute_import, unicode_literals, print_function # Import Salt Testing libs from tests.support.case import ModuleCase class TestJinjaRenderer(ModuleCase): ''' Validate that ordering works correctly ...
<commit_before># coding: utf-8 ''' Integration tests for renderer functions ''' # Import Python Libs from __future__ import absolute_import, unicode_literals, print_function # Import Salt Testing libs from tests.support.case import ModuleCase class TestJinjaRenderer(ModuleCase): ''' Validate that ordering w...
eac9585634be34bdd1fabd65c6f22eb66134b6b4
datastage/web/user/views.py
datastage/web/user/views.py
from django_conneg.views import HTMLView from django.contrib.auth.forms.PasswordChangeForm class IndexView(HTMLView): def get(self, request): return self.render(request, {}, 'user/index') class PasswordView(HTMLView): def get(self, request):
from django_conneg.views import HTMLView #from django.contrib.auth.forms.PasswordChangeForm class IndexView(HTMLView): def get(self, request): return self.render(request, {}, 'user/index') class PasswordView(HTMLView): def get(self, request): pass
Fix syntax, even if not functionality.
Fix syntax, even if not functionality.
Python
mit
dataflow/DataStage,dataflow/DataStage,dataflow/DataStage
from django_conneg.views import HTMLView from django.contrib.auth.forms.PasswordChangeForm class IndexView(HTMLView): def get(self, request): return self.render(request, {}, 'user/index') class PasswordView(HTMLView): def get(self, request):Fix syntax, even if not functionality.
from django_conneg.views import HTMLView #from django.contrib.auth.forms.PasswordChangeForm class IndexView(HTMLView): def get(self, request): return self.render(request, {}, 'user/index') class PasswordView(HTMLView): def get(self, request): pass
<commit_before>from django_conneg.views import HTMLView from django.contrib.auth.forms.PasswordChangeForm class IndexView(HTMLView): def get(self, request): return self.render(request, {}, 'user/index') class PasswordView(HTMLView): def get(self, request):<commit_msg>Fix syntax, even if not functiona...
from django_conneg.views import HTMLView #from django.contrib.auth.forms.PasswordChangeForm class IndexView(HTMLView): def get(self, request): return self.render(request, {}, 'user/index') class PasswordView(HTMLView): def get(self, request): pass
from django_conneg.views import HTMLView from django.contrib.auth.forms.PasswordChangeForm class IndexView(HTMLView): def get(self, request): return self.render(request, {}, 'user/index') class PasswordView(HTMLView): def get(self, request):Fix syntax, even if not functionality.from django_conneg.vie...
<commit_before>from django_conneg.views import HTMLView from django.contrib.auth.forms.PasswordChangeForm class IndexView(HTMLView): def get(self, request): return self.render(request, {}, 'user/index') class PasswordView(HTMLView): def get(self, request):<commit_msg>Fix syntax, even if not functiona...
e95deac720589eaf81dbb54cadcef9a3459f7d02
youtube/downloader.py
youtube/downloader.py
import os from youtube_dl import YoutubeDL from youtube_dl import MaxDownloadsReached def download(url, audio_only): """Downloads the youtube video from the url Args: url: The youtube URL pointing to the video to download. audio_only: True if we only want to download the best audio. Retu...
import os from youtube_dl import YoutubeDL from youtube_dl import MaxDownloadsReached def download(url, audio_only): """Downloads the youtube video from the url Args: url: The youtube URL pointing to the video to download. audio_only: True if we only want to download the best audio. Retu...
Add comment explaining why use choose bestaudio for audio downloads.
Add comment explaining why use choose bestaudio for audio downloads.
Python
mit
tpcstld/youtube,tpcstld/youtube,tpcstld/youtube
import os from youtube_dl import YoutubeDL from youtube_dl import MaxDownloadsReached def download(url, audio_only): """Downloads the youtube video from the url Args: url: The youtube URL pointing to the video to download. audio_only: True if we only want to download the best audio. Retu...
import os from youtube_dl import YoutubeDL from youtube_dl import MaxDownloadsReached def download(url, audio_only): """Downloads the youtube video from the url Args: url: The youtube URL pointing to the video to download. audio_only: True if we only want to download the best audio. Retu...
<commit_before>import os from youtube_dl import YoutubeDL from youtube_dl import MaxDownloadsReached def download(url, audio_only): """Downloads the youtube video from the url Args: url: The youtube URL pointing to the video to download. audio_only: True if we only want to download the best a...
import os from youtube_dl import YoutubeDL from youtube_dl import MaxDownloadsReached def download(url, audio_only): """Downloads the youtube video from the url Args: url: The youtube URL pointing to the video to download. audio_only: True if we only want to download the best audio. Retu...
import os from youtube_dl import YoutubeDL from youtube_dl import MaxDownloadsReached def download(url, audio_only): """Downloads the youtube video from the url Args: url: The youtube URL pointing to the video to download. audio_only: True if we only want to download the best audio. Retu...
<commit_before>import os from youtube_dl import YoutubeDL from youtube_dl import MaxDownloadsReached def download(url, audio_only): """Downloads the youtube video from the url Args: url: The youtube URL pointing to the video to download. audio_only: True if we only want to download the best a...
3fa7cd977d250629f0ee619b1e5088872bcb051a
activities/runkeeper/signals.py
activities/runkeeper/signals.py
from django.db.models.signals import post_save from django.dispatch import receiver from data_import.signal_helpers import task_signal from social.apps.django_app.default.models import UserSocialAuth from .models import DataFile @receiver(post_save, sender=UserSocialAuth) def post_save_cb(sender, instance, created,...
from django.db.models.signals import post_save from django.dispatch import receiver from data_import.signal_helpers import task_signal from social.apps.django_app.default.models import UserSocialAuth from .models import DataFile @receiver(post_save, sender=UserSocialAuth) def post_save_cb(sender, instance, created,...
Fix timing issue in signal
Fix timing issue in signal
Python
mit
OpenHumans/open-humans,OpenHumans/open-humans,PersonalGenomesOrg/open-humans,PersonalGenomesOrg/open-humans,PersonalGenomesOrg/open-humans,OpenHumans/open-humans,PersonalGenomesOrg/open-humans,OpenHumans/open-humans
from django.db.models.signals import post_save from django.dispatch import receiver from data_import.signal_helpers import task_signal from social.apps.django_app.default.models import UserSocialAuth from .models import DataFile @receiver(post_save, sender=UserSocialAuth) def post_save_cb(sender, instance, created,...
from django.db.models.signals import post_save from django.dispatch import receiver from data_import.signal_helpers import task_signal from social.apps.django_app.default.models import UserSocialAuth from .models import DataFile @receiver(post_save, sender=UserSocialAuth) def post_save_cb(sender, instance, created,...
<commit_before>from django.db.models.signals import post_save from django.dispatch import receiver from data_import.signal_helpers import task_signal from social.apps.django_app.default.models import UserSocialAuth from .models import DataFile @receiver(post_save, sender=UserSocialAuth) def post_save_cb(sender, ins...
from django.db.models.signals import post_save from django.dispatch import receiver from data_import.signal_helpers import task_signal from social.apps.django_app.default.models import UserSocialAuth from .models import DataFile @receiver(post_save, sender=UserSocialAuth) def post_save_cb(sender, instance, created,...
from django.db.models.signals import post_save from django.dispatch import receiver from data_import.signal_helpers import task_signal from social.apps.django_app.default.models import UserSocialAuth from .models import DataFile @receiver(post_save, sender=UserSocialAuth) def post_save_cb(sender, instance, created,...
<commit_before>from django.db.models.signals import post_save from django.dispatch import receiver from data_import.signal_helpers import task_signal from social.apps.django_app.default.models import UserSocialAuth from .models import DataFile @receiver(post_save, sender=UserSocialAuth) def post_save_cb(sender, ins...
e2d565bb283f2425005a93c0dd3abc9a422520d7
nodeconductor/iaas/cost_tracking.py
nodeconductor/iaas/cost_tracking.py
import logging import calendar import datetime from nodeconductor.cost_tracking import CostTrackingStrategy from nodeconductor.iaas.models import Instance from nodeconductor.structure import ServiceBackendError logger = logging.getLogger(__name__) class IaaSCostTracking(CostTrackingStrategy): @classmethod ...
import logging import calendar import datetime from nodeconductor.cost_tracking import CostTrackingStrategy from nodeconductor.iaas.models import Instance from nodeconductor.structure import ServiceBackendError logger = logging.getLogger(__name__) class IaaSCostTracking(CostTrackingStrategy): @classmethod ...
Fix killbill cost estimate logic
Fix killbill cost estimate logic - NC-738
Python
mit
opennode/nodeconductor,opennode/nodeconductor,opennode/nodeconductor
import logging import calendar import datetime from nodeconductor.cost_tracking import CostTrackingStrategy from nodeconductor.iaas.models import Instance from nodeconductor.structure import ServiceBackendError logger = logging.getLogger(__name__) class IaaSCostTracking(CostTrackingStrategy): @classmethod ...
import logging import calendar import datetime from nodeconductor.cost_tracking import CostTrackingStrategy from nodeconductor.iaas.models import Instance from nodeconductor.structure import ServiceBackendError logger = logging.getLogger(__name__) class IaaSCostTracking(CostTrackingStrategy): @classmethod ...
<commit_before>import logging import calendar import datetime from nodeconductor.cost_tracking import CostTrackingStrategy from nodeconductor.iaas.models import Instance from nodeconductor.structure import ServiceBackendError logger = logging.getLogger(__name__) class IaaSCostTracking(CostTrackingStrategy): @...
import logging import calendar import datetime from nodeconductor.cost_tracking import CostTrackingStrategy from nodeconductor.iaas.models import Instance from nodeconductor.structure import ServiceBackendError logger = logging.getLogger(__name__) class IaaSCostTracking(CostTrackingStrategy): @classmethod ...
import logging import calendar import datetime from nodeconductor.cost_tracking import CostTrackingStrategy from nodeconductor.iaas.models import Instance from nodeconductor.structure import ServiceBackendError logger = logging.getLogger(__name__) class IaaSCostTracking(CostTrackingStrategy): @classmethod ...
<commit_before>import logging import calendar import datetime from nodeconductor.cost_tracking import CostTrackingStrategy from nodeconductor.iaas.models import Instance from nodeconductor.structure import ServiceBackendError logger = logging.getLogger(__name__) class IaaSCostTracking(CostTrackingStrategy): @...
8f2c8f6e9dec950e0ddd46f563b65f64424cadd1
erpnext/accounts/doctype/sales_invoice/sales_invoice_dashboard.py
erpnext/accounts/doctype/sales_invoice/sales_invoice_dashboard.py
from frappe import _ def get_data(): return { 'fieldname': 'sales_invoice', 'non_standard_fieldnames': { 'Delivery Note': 'against_sales_invoice', 'Journal Entry': 'reference_name', 'Payment Entry': 'reference_name', 'Payment Request': 'reference_name', 'Sales Invoice': 'return_against' }, 'int...
from frappe import _ def get_data(): return { 'fieldname': 'sales_invoice', 'non_standard_fieldnames': { 'Delivery Note': 'against_sales_invoice', 'Journal Entry': 'reference_name', 'Payment Entry': 'reference_name', 'Payment Request': 'reference_name', 'Sales Invoice': 'return_against' }, 'int...
Revert sales invoice dn link issue
Revert sales invoice dn link issue
Python
agpl-3.0
gsnbng/erpnext,gsnbng/erpnext,Aptitudetech/ERPNext,geekroot/erpnext,indictranstech/erpnext,indictranstech/erpnext,indictranstech/erpnext,gsnbng/erpnext,gsnbng/erpnext,geekroot/erpnext,indictranstech/erpnext,geekroot/erpnext,geekroot/erpnext
from frappe import _ def get_data(): return { 'fieldname': 'sales_invoice', 'non_standard_fieldnames': { 'Delivery Note': 'against_sales_invoice', 'Journal Entry': 'reference_name', 'Payment Entry': 'reference_name', 'Payment Request': 'reference_name', 'Sales Invoice': 'return_against' }, 'int...
from frappe import _ def get_data(): return { 'fieldname': 'sales_invoice', 'non_standard_fieldnames': { 'Delivery Note': 'against_sales_invoice', 'Journal Entry': 'reference_name', 'Payment Entry': 'reference_name', 'Payment Request': 'reference_name', 'Sales Invoice': 'return_against' }, 'int...
<commit_before>from frappe import _ def get_data(): return { 'fieldname': 'sales_invoice', 'non_standard_fieldnames': { 'Delivery Note': 'against_sales_invoice', 'Journal Entry': 'reference_name', 'Payment Entry': 'reference_name', 'Payment Request': 'reference_name', 'Sales Invoice': 'return_again...
from frappe import _ def get_data(): return { 'fieldname': 'sales_invoice', 'non_standard_fieldnames': { 'Delivery Note': 'against_sales_invoice', 'Journal Entry': 'reference_name', 'Payment Entry': 'reference_name', 'Payment Request': 'reference_name', 'Sales Invoice': 'return_against' }, 'int...
from frappe import _ def get_data(): return { 'fieldname': 'sales_invoice', 'non_standard_fieldnames': { 'Delivery Note': 'against_sales_invoice', 'Journal Entry': 'reference_name', 'Payment Entry': 'reference_name', 'Payment Request': 'reference_name', 'Sales Invoice': 'return_against' }, 'int...
<commit_before>from frappe import _ def get_data(): return { 'fieldname': 'sales_invoice', 'non_standard_fieldnames': { 'Delivery Note': 'against_sales_invoice', 'Journal Entry': 'reference_name', 'Payment Entry': 'reference_name', 'Payment Request': 'reference_name', 'Sales Invoice': 'return_again...
93cefdc2c309ed0b81fe4ec7d49c0c8bead783a9
lib/path_utils.py
lib/path_utils.py
"""Originally from funfactory (funfactory/path_utils.py) on a380a54""" import os from os.path import abspath, dirname def path(*a): return os.path.join(ROOT, *a) def import_mod_by_name(target): # stolen from mock :) components = target.split('.') import_path = components.pop(0) thing = __import...
"""Originally from funfactory (funfactory/path_utils.py) on a380a54""" import os from os.path import abspath, dirname def path(*a): return os.path.join(ROOT, *a) def import_mod_by_name(target): # stolen from mock :) components = target.split('.') import_path = components.pop(0) thing = __import...
Use __file__ instead of __name__
Use __file__ instead of __name__
Python
bsd-3-clause
akeym/cyder,zeeman/cyder,murrown/cyder,murrown/cyder,OSU-Net/cyder,drkitty/cyder,OSU-Net/cyder,akeym/cyder,akeym/cyder,OSU-Net/cyder,akeym/cyder,drkitty/cyder,murrown/cyder,drkitty/cyder,zeeman/cyder,OSU-Net/cyder,zeeman/cyder,murrown/cyder,drkitty/cyder,zeeman/cyder
"""Originally from funfactory (funfactory/path_utils.py) on a380a54""" import os from os.path import abspath, dirname def path(*a): return os.path.join(ROOT, *a) def import_mod_by_name(target): # stolen from mock :) components = target.split('.') import_path = components.pop(0) thing = __import...
"""Originally from funfactory (funfactory/path_utils.py) on a380a54""" import os from os.path import abspath, dirname def path(*a): return os.path.join(ROOT, *a) def import_mod_by_name(target): # stolen from mock :) components = target.split('.') import_path = components.pop(0) thing = __import...
<commit_before>"""Originally from funfactory (funfactory/path_utils.py) on a380a54""" import os from os.path import abspath, dirname def path(*a): return os.path.join(ROOT, *a) def import_mod_by_name(target): # stolen from mock :) components = target.split('.') import_path = components.pop(0) t...
"""Originally from funfactory (funfactory/path_utils.py) on a380a54""" import os from os.path import abspath, dirname def path(*a): return os.path.join(ROOT, *a) def import_mod_by_name(target): # stolen from mock :) components = target.split('.') import_path = components.pop(0) thing = __import...
"""Originally from funfactory (funfactory/path_utils.py) on a380a54""" import os from os.path import abspath, dirname def path(*a): return os.path.join(ROOT, *a) def import_mod_by_name(target): # stolen from mock :) components = target.split('.') import_path = components.pop(0) thing = __import...
<commit_before>"""Originally from funfactory (funfactory/path_utils.py) on a380a54""" import os from os.path import abspath, dirname def path(*a): return os.path.join(ROOT, *a) def import_mod_by_name(target): # stolen from mock :) components = target.split('.') import_path = components.pop(0) t...
a6e3543650654a91abd0fa2af2064811debb47bd
ac_mediator/celery.py
ac_mediator/celery.py
from __future__ import absolute_import, unicode_literals import os from celery import Celery from django.core import management from celery.schedules import crontab # set the default Django settings module for the 'celery' program. os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'ac_mediator.settings') app = Celery(...
from __future__ import absolute_import, unicode_literals import os from celery import Celery from django.core import management from celery.schedules import crontab # set the default Django settings module for the 'celery' program. os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'ac_mediator.settings') app = Celery(...
Fix wrong 'renew_access_tokens' periodic task schedule
Fix wrong 'renew_access_tokens' periodic task schedule
Python
apache-2.0
AudioCommons/ac-mediator,AudioCommons/ac-mediator,AudioCommons/ac-mediator
from __future__ import absolute_import, unicode_literals import os from celery import Celery from django.core import management from celery.schedules import crontab # set the default Django settings module for the 'celery' program. os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'ac_mediator.settings') app = Celery(...
from __future__ import absolute_import, unicode_literals import os from celery import Celery from django.core import management from celery.schedules import crontab # set the default Django settings module for the 'celery' program. os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'ac_mediator.settings') app = Celery(...
<commit_before>from __future__ import absolute_import, unicode_literals import os from celery import Celery from django.core import management from celery.schedules import crontab # set the default Django settings module for the 'celery' program. os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'ac_mediator.settings')...
from __future__ import absolute_import, unicode_literals import os from celery import Celery from django.core import management from celery.schedules import crontab # set the default Django settings module for the 'celery' program. os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'ac_mediator.settings') app = Celery(...
from __future__ import absolute_import, unicode_literals import os from celery import Celery from django.core import management from celery.schedules import crontab # set the default Django settings module for the 'celery' program. os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'ac_mediator.settings') app = Celery(...
<commit_before>from __future__ import absolute_import, unicode_literals import os from celery import Celery from django.core import management from celery.schedules import crontab # set the default Django settings module for the 'celery' program. os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'ac_mediator.settings')...
be6ede95d37717a65bd02969e8340afd2354dcdc
tests/basics/gen_yield_from_throw.py
tests/basics/gen_yield_from_throw.py
def gen(): try: yield 1 except ValueError as e: print("got ValueError from upstream!", repr(e.args)) yield "str1" raise TypeError def gen2(): print((yield from gen())) g = gen2() print(next(g)) print(g.throw(ValueError)) try: print(next(g)) except TypeError: print("got Type...
def gen(): try: yield 1 except ValueError as e: print("got ValueError from upstream!", repr(e.args)) yield "str1" raise TypeError def gen2(): print((yield from gen())) g = gen2() print(next(g)) print(g.throw(ValueError)) try: print(next(g)) except TypeError: print("got Type...
Add test for throw into yield-from with normal return.
tests/basics: Add test for throw into yield-from with normal return. This test was found by missing coverage of a branch in py/nativeglue.c.
Python
mit
pfalcon/micropython,pfalcon/micropython,pfalcon/micropython,pfalcon/micropython,pfalcon/micropython
def gen(): try: yield 1 except ValueError as e: print("got ValueError from upstream!", repr(e.args)) yield "str1" raise TypeError def gen2(): print((yield from gen())) g = gen2() print(next(g)) print(g.throw(ValueError)) try: print(next(g)) except TypeError: print("got Type...
def gen(): try: yield 1 except ValueError as e: print("got ValueError from upstream!", repr(e.args)) yield "str1" raise TypeError def gen2(): print((yield from gen())) g = gen2() print(next(g)) print(g.throw(ValueError)) try: print(next(g)) except TypeError: print("got Type...
<commit_before>def gen(): try: yield 1 except ValueError as e: print("got ValueError from upstream!", repr(e.args)) yield "str1" raise TypeError def gen2(): print((yield from gen())) g = gen2() print(next(g)) print(g.throw(ValueError)) try: print(next(g)) except TypeError: ...
def gen(): try: yield 1 except ValueError as e: print("got ValueError from upstream!", repr(e.args)) yield "str1" raise TypeError def gen2(): print((yield from gen())) g = gen2() print(next(g)) print(g.throw(ValueError)) try: print(next(g)) except TypeError: print("got Type...
def gen(): try: yield 1 except ValueError as e: print("got ValueError from upstream!", repr(e.args)) yield "str1" raise TypeError def gen2(): print((yield from gen())) g = gen2() print(next(g)) print(g.throw(ValueError)) try: print(next(g)) except TypeError: print("got Type...
<commit_before>def gen(): try: yield 1 except ValueError as e: print("got ValueError from upstream!", repr(e.args)) yield "str1" raise TypeError def gen2(): print((yield from gen())) g = gen2() print(next(g)) print(g.throw(ValueError)) try: print(next(g)) except TypeError: ...
648daddbc75ee18201cc441dcf3ec34238e4479d
astropy/coordinates/__init__.py
astropy/coordinates/__init__.py
# Licensed under a 3-clause BSD style license - see LICENSE.rst """ This subpackage contains classes and functions for celestial coordinates of astronomical objects. It also contains a framework for conversions between coordinate systems. """ from .errors import * from .angles import * from .baseframe import * from ....
# Licensed under a 3-clause BSD style license - see LICENSE.rst """ This subpackage contains classes and functions for celestial coordinates of astronomical objects. It also contains a framework for conversions between coordinate systems. """ from .errors import * from .angles import * from .baseframe import * from ....
Remove "experimental" state of ecliptic frames
Remove "experimental" state of ecliptic frames
Python
bsd-3-clause
lpsinger/astropy,saimn/astropy,dhomeier/astropy,saimn/astropy,astropy/astropy,MSeifert04/astropy,larrybradley/astropy,dhomeier/astropy,MSeifert04/astropy,mhvk/astropy,lpsinger/astropy,pllim/astropy,saimn/astropy,astropy/astropy,MSeifert04/astropy,bsipocz/astropy,larrybradley/astropy,bsipocz/astropy,StuartLittlefair/ast...
# Licensed under a 3-clause BSD style license - see LICENSE.rst """ This subpackage contains classes and functions for celestial coordinates of astronomical objects. It also contains a framework for conversions between coordinate systems. """ from .errors import * from .angles import * from .baseframe import * from ....
# Licensed under a 3-clause BSD style license - see LICENSE.rst """ This subpackage contains classes and functions for celestial coordinates of astronomical objects. It also contains a framework for conversions between coordinate systems. """ from .errors import * from .angles import * from .baseframe import * from ....
<commit_before># Licensed under a 3-clause BSD style license - see LICENSE.rst """ This subpackage contains classes and functions for celestial coordinates of astronomical objects. It also contains a framework for conversions between coordinate systems. """ from .errors import * from .angles import * from .baseframe ...
# Licensed under a 3-clause BSD style license - see LICENSE.rst """ This subpackage contains classes and functions for celestial coordinates of astronomical objects. It also contains a framework for conversions between coordinate systems. """ from .errors import * from .angles import * from .baseframe import * from ....
# Licensed under a 3-clause BSD style license - see LICENSE.rst """ This subpackage contains classes and functions for celestial coordinates of astronomical objects. It also contains a framework for conversions between coordinate systems. """ from .errors import * from .angles import * from .baseframe import * from ....
<commit_before># Licensed under a 3-clause BSD style license - see LICENSE.rst """ This subpackage contains classes and functions for celestial coordinates of astronomical objects. It also contains a framework for conversions between coordinate systems. """ from .errors import * from .angles import * from .baseframe ...
7980c2e38d388ec78fd94ee13272934988dfa0f7
swingtime/__init__.py
swingtime/__init__.py
from django.apps import AppConfig VERSION = (0, 3, 0, 'beta', 0) def get_version(): version = '%s.%s' % (VERSION[0], VERSION[1]) if VERSION[2]: version = '%s.%s' % (version, VERSION[2]) if VERSION[3:] == ('alpha', 0): version = '%s pre-alpha' % version else: version = '%s %s'...
# -*- coding: utf-8 -*- from django.apps import AppConfig VERSION = (0, 3, 0, 'beta', 0) def get_version(): version = '%s.%s' % (VERSION[0], VERSION[1]) if VERSION[2]: version = '%s.%s' % (version, VERSION[2]) if VERSION[3:] == ('alpha', 0): version = '%s pre-alpha' % version else: ...
Make calendar config show up at bottom of main admin
Make calendar config show up at bottom of main admin
Python
mit
thrive-refugee/thrive-refugee,thrive-refugee/thrive-refugee,thrive-refugee/thrive-refugee
from django.apps import AppConfig VERSION = (0, 3, 0, 'beta', 0) def get_version(): version = '%s.%s' % (VERSION[0], VERSION[1]) if VERSION[2]: version = '%s.%s' % (version, VERSION[2]) if VERSION[3:] == ('alpha', 0): version = '%s pre-alpha' % version else: version = '%s %s'...
# -*- coding: utf-8 -*- from django.apps import AppConfig VERSION = (0, 3, 0, 'beta', 0) def get_version(): version = '%s.%s' % (VERSION[0], VERSION[1]) if VERSION[2]: version = '%s.%s' % (version, VERSION[2]) if VERSION[3:] == ('alpha', 0): version = '%s pre-alpha' % version else: ...
<commit_before>from django.apps import AppConfig VERSION = (0, 3, 0, 'beta', 0) def get_version(): version = '%s.%s' % (VERSION[0], VERSION[1]) if VERSION[2]: version = '%s.%s' % (version, VERSION[2]) if VERSION[3:] == ('alpha', 0): version = '%s pre-alpha' % version else: ve...
# -*- coding: utf-8 -*- from django.apps import AppConfig VERSION = (0, 3, 0, 'beta', 0) def get_version(): version = '%s.%s' % (VERSION[0], VERSION[1]) if VERSION[2]: version = '%s.%s' % (version, VERSION[2]) if VERSION[3:] == ('alpha', 0): version = '%s pre-alpha' % version else: ...
from django.apps import AppConfig VERSION = (0, 3, 0, 'beta', 0) def get_version(): version = '%s.%s' % (VERSION[0], VERSION[1]) if VERSION[2]: version = '%s.%s' % (version, VERSION[2]) if VERSION[3:] == ('alpha', 0): version = '%s pre-alpha' % version else: version = '%s %s'...
<commit_before>from django.apps import AppConfig VERSION = (0, 3, 0, 'beta', 0) def get_version(): version = '%s.%s' % (VERSION[0], VERSION[1]) if VERSION[2]: version = '%s.%s' % (version, VERSION[2]) if VERSION[3:] == ('alpha', 0): version = '%s pre-alpha' % version else: ve...
993bab40e4df323c671c99eec63d366028818a36
rosie/chamber_of_deputies/tests/test_election_expenses_classifier.py
rosie/chamber_of_deputies/tests/test_election_expenses_classifier.py
from unittest import TestCase import numpy as np import pandas as pd from rosie.chamber_of_deputies.classifiers import ElectionExpensesClassifier class TestElectionExpensesClassifier(TestCase): def setUp(self): self.dataset = pd.read_csv('rosie/chamber_of_deputies/tests/fixtures/election_expenses_class...
from unittest import TestCase import numpy as np import pandas as pd from rosie.chamber_of_deputies.classifiers import ElectionExpensesClassifier class TestElectionExpensesClassifier(TestCase): def setUp(self): self.dataset = pd.read_csv('rosie/chamber_of_deputies/tests/fixtures/election_expenses_class...
Remove a Rails accent of use subject in favor of Zen of Python: explicit is better than implicit and readbility counts
Remove a Rails accent of use subject in favor of Zen of Python: explicit is better than implicit and readbility counts
Python
mit
marcusrehm/serenata-de-amor,marcusrehm/serenata-de-amor,datasciencebr/serenata-de-amor,marcusrehm/serenata-de-amor,marcusrehm/serenata-de-amor,datasciencebr/rosie,datasciencebr/serenata-de-amor
from unittest import TestCase import numpy as np import pandas as pd from rosie.chamber_of_deputies.classifiers import ElectionExpensesClassifier class TestElectionExpensesClassifier(TestCase): def setUp(self): self.dataset = pd.read_csv('rosie/chamber_of_deputies/tests/fixtures/election_expenses_class...
from unittest import TestCase import numpy as np import pandas as pd from rosie.chamber_of_deputies.classifiers import ElectionExpensesClassifier class TestElectionExpensesClassifier(TestCase): def setUp(self): self.dataset = pd.read_csv('rosie/chamber_of_deputies/tests/fixtures/election_expenses_class...
<commit_before>from unittest import TestCase import numpy as np import pandas as pd from rosie.chamber_of_deputies.classifiers import ElectionExpensesClassifier class TestElectionExpensesClassifier(TestCase): def setUp(self): self.dataset = pd.read_csv('rosie/chamber_of_deputies/tests/fixtures/election...
from unittest import TestCase import numpy as np import pandas as pd from rosie.chamber_of_deputies.classifiers import ElectionExpensesClassifier class TestElectionExpensesClassifier(TestCase): def setUp(self): self.dataset = pd.read_csv('rosie/chamber_of_deputies/tests/fixtures/election_expenses_class...
from unittest import TestCase import numpy as np import pandas as pd from rosie.chamber_of_deputies.classifiers import ElectionExpensesClassifier class TestElectionExpensesClassifier(TestCase): def setUp(self): self.dataset = pd.read_csv('rosie/chamber_of_deputies/tests/fixtures/election_expenses_class...
<commit_before>from unittest import TestCase import numpy as np import pandas as pd from rosie.chamber_of_deputies.classifiers import ElectionExpensesClassifier class TestElectionExpensesClassifier(TestCase): def setUp(self): self.dataset = pd.read_csv('rosie/chamber_of_deputies/tests/fixtures/election...
1b7767dbc4fbaf69a6bf83a3989d5e672e0c7488
django_countries/filters.py
django_countries/filters.py
from django.contrib import admin from django.utils.translation import ugettext_lazy as _ class CountryFilter(admin.SimpleListFilter): """ A country filter for Django admin that only returns a list of countries related to the model. """ title = _('Country') parameter_name = 'country' def lookup...
from django.contrib import admin from django.utils.encoding import force_text from django.utils.translation import ugettext as _ class CountryFilter(admin.FieldListFilter): """ A country filter for Django admin that only returns a list of countries related to the model. """ title = _('Country') ...
Change the admin filter to a FieldListFilter
Change the admin filter to a FieldListFilter
Python
mit
schinckel/django-countries,SmileyChris/django-countries,pimlie/django-countries
from django.contrib import admin from django.utils.translation import ugettext_lazy as _ class CountryFilter(admin.SimpleListFilter): """ A country filter for Django admin that only returns a list of countries related to the model. """ title = _('Country') parameter_name = 'country' def lookup...
from django.contrib import admin from django.utils.encoding import force_text from django.utils.translation import ugettext as _ class CountryFilter(admin.FieldListFilter): """ A country filter for Django admin that only returns a list of countries related to the model. """ title = _('Country') ...
<commit_before>from django.contrib import admin from django.utils.translation import ugettext_lazy as _ class CountryFilter(admin.SimpleListFilter): """ A country filter for Django admin that only returns a list of countries related to the model. """ title = _('Country') parameter_name = 'country' ...
from django.contrib import admin from django.utils.encoding import force_text from django.utils.translation import ugettext as _ class CountryFilter(admin.FieldListFilter): """ A country filter for Django admin that only returns a list of countries related to the model. """ title = _('Country') ...
from django.contrib import admin from django.utils.translation import ugettext_lazy as _ class CountryFilter(admin.SimpleListFilter): """ A country filter for Django admin that only returns a list of countries related to the model. """ title = _('Country') parameter_name = 'country' def lookup...
<commit_before>from django.contrib import admin from django.utils.translation import ugettext_lazy as _ class CountryFilter(admin.SimpleListFilter): """ A country filter for Django admin that only returns a list of countries related to the model. """ title = _('Country') parameter_name = 'country' ...
78b45c06c8c52cf713de2dc1d7b1d3dc8e3c031e
test_addons/test_cases.py
test_addons/test_cases.py
# inbuild python imports # inbuilt django imports from django.test import LiveServerTestCase # third party imports # inter-app imports # local imports import mixins from mixins import SimpleTestCase class MongoTestCase(mixins.MongoTestMixin, SimpleTestCase): """ TestCase that creates a mongo collection and c...
# inbuild python imports # inbuilt django imports from django.test import LiveServerTestCase # third party imports # inter-app imports # local imports from . import mixins from .mixins import SimpleTestCase class MongoTestCase(mixins.MongoTestMixin, SimpleTestCase): """ TestCase that creates a mongo collecti...
Use relative imports again to support python 3
Use relative imports again to support python 3
Python
mit
hspandher/django-test-addons
# inbuild python imports # inbuilt django imports from django.test import LiveServerTestCase # third party imports # inter-app imports # local imports import mixins from mixins import SimpleTestCase class MongoTestCase(mixins.MongoTestMixin, SimpleTestCase): """ TestCase that creates a mongo collection and c...
# inbuild python imports # inbuilt django imports from django.test import LiveServerTestCase # third party imports # inter-app imports # local imports from . import mixins from .mixins import SimpleTestCase class MongoTestCase(mixins.MongoTestMixin, SimpleTestCase): """ TestCase that creates a mongo collecti...
<commit_before># inbuild python imports # inbuilt django imports from django.test import LiveServerTestCase # third party imports # inter-app imports # local imports import mixins from mixins import SimpleTestCase class MongoTestCase(mixins.MongoTestMixin, SimpleTestCase): """ TestCase that creates a mongo c...
# inbuild python imports # inbuilt django imports from django.test import LiveServerTestCase # third party imports # inter-app imports # local imports from . import mixins from .mixins import SimpleTestCase class MongoTestCase(mixins.MongoTestMixin, SimpleTestCase): """ TestCase that creates a mongo collecti...
# inbuild python imports # inbuilt django imports from django.test import LiveServerTestCase # third party imports # inter-app imports # local imports import mixins from mixins import SimpleTestCase class MongoTestCase(mixins.MongoTestMixin, SimpleTestCase): """ TestCase that creates a mongo collection and c...
<commit_before># inbuild python imports # inbuilt django imports from django.test import LiveServerTestCase # third party imports # inter-app imports # local imports import mixins from mixins import SimpleTestCase class MongoTestCase(mixins.MongoTestMixin, SimpleTestCase): """ TestCase that creates a mongo c...
b992f8ca9d7e4269592dd4fe8129a7afe92634a7
libraries/exception.py
libraries/exception.py
class OkupyException(Exception): def __init__(self, value): self.value = value def __str__(self): return repr(self.value)
from django.contrib.sites.models import Site class OkupyException(Exception): ''' Custon exception class ''' def __init__(self, value): self.value = value def __str__(self): return repr(self.value) def log_extra_data(request = None, form = None): ''' Extra data needed by t...
Add a log_extra_data function, which returns a dictionary needed by the logging formatter Add comments in the lib
Add a log_extra_data function, which returns a dictionary needed by the logging formatter Add comments in the lib
Python
agpl-3.0
dastergon/identity.gentoo.org,dastergon/identity.gentoo.org,gentoo/identity.gentoo.org,gentoo/identity.gentoo.org
class OkupyException(Exception): def __init__(self, value): self.value = value def __str__(self): return repr(self.value) Add a log_extra_data function, which returns a dictionary needed by the logging formatter Add comments in the lib
from django.contrib.sites.models import Site class OkupyException(Exception): ''' Custon exception class ''' def __init__(self, value): self.value = value def __str__(self): return repr(self.value) def log_extra_data(request = None, form = None): ''' Extra data needed by t...
<commit_before>class OkupyException(Exception): def __init__(self, value): self.value = value def __str__(self): return repr(self.value) <commit_msg>Add a log_extra_data function, which returns a dictionary needed by the logging formatter Add comments in the lib<commit_after>
from django.contrib.sites.models import Site class OkupyException(Exception): ''' Custon exception class ''' def __init__(self, value): self.value = value def __str__(self): return repr(self.value) def log_extra_data(request = None, form = None): ''' Extra data needed by t...
class OkupyException(Exception): def __init__(self, value): self.value = value def __str__(self): return repr(self.value) Add a log_extra_data function, which returns a dictionary needed by the logging formatter Add comments in the libfrom django.contrib.sites.models import Site class OkupyException(Exception):...
<commit_before>class OkupyException(Exception): def __init__(self, value): self.value = value def __str__(self): return repr(self.value) <commit_msg>Add a log_extra_data function, which returns a dictionary needed by the logging formatter Add comments in the lib<commit_after>from django.contrib.sites.models impor...
06dd6fb991a9f68eea99d5943498688daa0b09c2
tests/test_interaction.py
tests/test_interaction.py
import numpy.testing as npt import pandas as pd import pandas.util.testing as pdt import pytest from .. import interaction as inter @pytest.fixture def choosers(): return pd.DataFrame( {'var1': range(5, 10), 'thing_id': ['a', 'c', 'e', 'g', 'i']}) @pytest.fixture def alternatives(): return...
import numpy.testing as npt import pandas as pd import pandas.util.testing as pdt import pytest from .. import interaction as inter @pytest.fixture def choosers(): return pd.DataFrame( {'var1': range(5, 10), 'thing_id': ['a', 'c', 'e', 'g', 'i']}) @pytest.fixture def alternatives(): return...
Return DCM probabilities as MultiIndexed Series
Return DCM probabilities as MultiIndexed Series Instead of separately returning probabilities and alternatives information this groups them all together. The probabilities have a MultiIndex with chooser IDs on the outside and alternative IDs on the inside.
Python
bsd-3-clause
UDST/choicemodels,UDST/choicemodels
import numpy.testing as npt import pandas as pd import pandas.util.testing as pdt import pytest from .. import interaction as inter @pytest.fixture def choosers(): return pd.DataFrame( {'var1': range(5, 10), 'thing_id': ['a', 'c', 'e', 'g', 'i']}) @pytest.fixture def alternatives(): return...
import numpy.testing as npt import pandas as pd import pandas.util.testing as pdt import pytest from .. import interaction as inter @pytest.fixture def choosers(): return pd.DataFrame( {'var1': range(5, 10), 'thing_id': ['a', 'c', 'e', 'g', 'i']}) @pytest.fixture def alternatives(): return...
<commit_before>import numpy.testing as npt import pandas as pd import pandas.util.testing as pdt import pytest from .. import interaction as inter @pytest.fixture def choosers(): return pd.DataFrame( {'var1': range(5, 10), 'thing_id': ['a', 'c', 'e', 'g', 'i']}) @pytest.fixture def alternative...
import numpy.testing as npt import pandas as pd import pandas.util.testing as pdt import pytest from .. import interaction as inter @pytest.fixture def choosers(): return pd.DataFrame( {'var1': range(5, 10), 'thing_id': ['a', 'c', 'e', 'g', 'i']}) @pytest.fixture def alternatives(): return...
import numpy.testing as npt import pandas as pd import pandas.util.testing as pdt import pytest from .. import interaction as inter @pytest.fixture def choosers(): return pd.DataFrame( {'var1': range(5, 10), 'thing_id': ['a', 'c', 'e', 'g', 'i']}) @pytest.fixture def alternatives(): return...
<commit_before>import numpy.testing as npt import pandas as pd import pandas.util.testing as pdt import pytest from .. import interaction as inter @pytest.fixture def choosers(): return pd.DataFrame( {'var1': range(5, 10), 'thing_id': ['a', 'c', 'e', 'g', 'i']}) @pytest.fixture def alternative...
bf84fc3eb941d3d2e370fd95d42e4dd838515bfc
tests/unit/config_test.py
tests/unit/config_test.py
# -*- coding: utf-8 -*- import os import unittest from testfixtures import TempDirectory from saltshaker.config import load_config from saltshaker.exceptions import ConfigurationError class TestConfig(unittest.TestCase): def setUp(self): self.tmp_dir = TempDirectory() def tearDown(self): se...
# -*- coding: utf-8 -*- import os import unittest from testfixtures import TempDirectory from saltshaker.config import load_config from saltshaker.exceptions import ConfigurationError class TestConfig(unittest.TestCase): def setUp(self): self.tmp_dir = TempDirectory() def tearDown(self): se...
Add b option to string
Add b option to string
Python
mit
diegotoral/SaltShaker,diegotoral/SaltShaker
# -*- coding: utf-8 -*- import os import unittest from testfixtures import TempDirectory from saltshaker.config import load_config from saltshaker.exceptions import ConfigurationError class TestConfig(unittest.TestCase): def setUp(self): self.tmp_dir = TempDirectory() def tearDown(self): se...
# -*- coding: utf-8 -*- import os import unittest from testfixtures import TempDirectory from saltshaker.config import load_config from saltshaker.exceptions import ConfigurationError class TestConfig(unittest.TestCase): def setUp(self): self.tmp_dir = TempDirectory() def tearDown(self): se...
<commit_before># -*- coding: utf-8 -*- import os import unittest from testfixtures import TempDirectory from saltshaker.config import load_config from saltshaker.exceptions import ConfigurationError class TestConfig(unittest.TestCase): def setUp(self): self.tmp_dir = TempDirectory() def tearDown(se...
# -*- coding: utf-8 -*- import os import unittest from testfixtures import TempDirectory from saltshaker.config import load_config from saltshaker.exceptions import ConfigurationError class TestConfig(unittest.TestCase): def setUp(self): self.tmp_dir = TempDirectory() def tearDown(self): se...
# -*- coding: utf-8 -*- import os import unittest from testfixtures import TempDirectory from saltshaker.config import load_config from saltshaker.exceptions import ConfigurationError class TestConfig(unittest.TestCase): def setUp(self): self.tmp_dir = TempDirectory() def tearDown(self): se...
<commit_before># -*- coding: utf-8 -*- import os import unittest from testfixtures import TempDirectory from saltshaker.config import load_config from saltshaker.exceptions import ConfigurationError class TestConfig(unittest.TestCase): def setUp(self): self.tmp_dir = TempDirectory() def tearDown(se...
d5a3b6e1eb37883a16c7e98d2a1b7c98d8d67051
layout/tests.py
layout/tests.py
from django.core.urlresolvers import resolve from django.test import TestCase from layout.views import home class HomePageTest(TestCase): def test_root_url_resolves_to_home_page(self): found = resolve('/') self.assertEqual(found.func, home)
from django.core.urlresolvers import resolve from django.http import HttpRequest from django.template.loader import render_to_string from django.test import TestCase from layout.views import home class HomePageTest(TestCase): def test_root_url_resolves_to_home_page(self): found = resolve('/') se...
Add test for home page html content
Add test for home page html content
Python
mit
jvanbrug/scout,jvanbrug/scout
from django.core.urlresolvers import resolve from django.test import TestCase from layout.views import home class HomePageTest(TestCase): def test_root_url_resolves_to_home_page(self): found = resolve('/') self.assertEqual(found.func, home) Add test for home page html content
from django.core.urlresolvers import resolve from django.http import HttpRequest from django.template.loader import render_to_string from django.test import TestCase from layout.views import home class HomePageTest(TestCase): def test_root_url_resolves_to_home_page(self): found = resolve('/') se...
<commit_before>from django.core.urlresolvers import resolve from django.test import TestCase from layout.views import home class HomePageTest(TestCase): def test_root_url_resolves_to_home_page(self): found = resolve('/') self.assertEqual(found.func, home) <commit_msg>Add test for home page html ...
from django.core.urlresolvers import resolve from django.http import HttpRequest from django.template.loader import render_to_string from django.test import TestCase from layout.views import home class HomePageTest(TestCase): def test_root_url_resolves_to_home_page(self): found = resolve('/') se...
from django.core.urlresolvers import resolve from django.test import TestCase from layout.views import home class HomePageTest(TestCase): def test_root_url_resolves_to_home_page(self): found = resolve('/') self.assertEqual(found.func, home) Add test for home page html contentfrom django.core.url...
<commit_before>from django.core.urlresolvers import resolve from django.test import TestCase from layout.views import home class HomePageTest(TestCase): def test_root_url_resolves_to_home_page(self): found = resolve('/') self.assertEqual(found.func, home) <commit_msg>Add test for home page html ...
9866b33ad5ba011c911346bae701973a5878f59e
blaze/compute/hdfstore.py
blaze/compute/hdfstore.py
from __future__ import absolute_import, division, print_function from .core import pre_compute from ..expr import Expr, Field from ..dispatch import dispatch from odo import into, chunks import pandas as pd @dispatch(Expr, pd.io.pytables.AppendableFrameTable) def pre_compute(expr, data, **kwargs): return into(chu...
from __future__ import absolute_import, division, print_function from collections import namedtuple from .core import pre_compute from ..expr import Expr, Field from ..dispatch import dispatch from odo import into, chunks import pandas as pd @dispatch(Expr, pd.io.pytables.AppendableFrameTable) def pre_compute(exp...
Move namedtuple to the top of the file
Move namedtuple to the top of the file
Python
bsd-3-clause
ContinuumIO/blaze,cowlicks/blaze,ChinaQuants/blaze,dwillmer/blaze,cpcloud/blaze,maxalbert/blaze,ContinuumIO/blaze,cowlicks/blaze,ChinaQuants/blaze,caseyclements/blaze,LiaoPan/blaze,xlhtc007/blaze,jcrist/blaze,dwillmer/blaze,nkhuyu/blaze,jcrist/blaze,LiaoPan/blaze,cpcloud/blaze,nkhuyu/blaze,maxalbert/blaze,caseyclements...
from __future__ import absolute_import, division, print_function from .core import pre_compute from ..expr import Expr, Field from ..dispatch import dispatch from odo import into, chunks import pandas as pd @dispatch(Expr, pd.io.pytables.AppendableFrameTable) def pre_compute(expr, data, **kwargs): return into(chu...
from __future__ import absolute_import, division, print_function from collections import namedtuple from .core import pre_compute from ..expr import Expr, Field from ..dispatch import dispatch from odo import into, chunks import pandas as pd @dispatch(Expr, pd.io.pytables.AppendableFrameTable) def pre_compute(exp...
<commit_before>from __future__ import absolute_import, division, print_function from .core import pre_compute from ..expr import Expr, Field from ..dispatch import dispatch from odo import into, chunks import pandas as pd @dispatch(Expr, pd.io.pytables.AppendableFrameTable) def pre_compute(expr, data, **kwargs): ...
from __future__ import absolute_import, division, print_function from collections import namedtuple from .core import pre_compute from ..expr import Expr, Field from ..dispatch import dispatch from odo import into, chunks import pandas as pd @dispatch(Expr, pd.io.pytables.AppendableFrameTable) def pre_compute(exp...
from __future__ import absolute_import, division, print_function from .core import pre_compute from ..expr import Expr, Field from ..dispatch import dispatch from odo import into, chunks import pandas as pd @dispatch(Expr, pd.io.pytables.AppendableFrameTable) def pre_compute(expr, data, **kwargs): return into(chu...
<commit_before>from __future__ import absolute_import, division, print_function from .core import pre_compute from ..expr import Expr, Field from ..dispatch import dispatch from odo import into, chunks import pandas as pd @dispatch(Expr, pd.io.pytables.AppendableFrameTable) def pre_compute(expr, data, **kwargs): ...
7ea7545cb0d9924fd0d7f3c658e2545a41ae11f0
arcutils/test/base.py
arcutils/test/base.py
import json import django.test from .user import UserMixin class Client(django.test.Client): def patch_json(self, path, data=None, **kwargs): return self.patch(path, **self._json_kwargs(data, kwargs)) def post_json(self, path, data=None, **kwargs): return self.post(path, **self._json_kwarg...
import json import django.test from .user import UserMixin class Client(django.test.Client): def patch_json(self, path, data=None, **kwargs): return self.patch(path, **self._json_kwargs(data, kwargs)) def post_json(self, path, data=None, **kwargs): return self.post(path, **self._json_kwarg...
Revert "Add patch_json method to our test Client"
Revert "Add patch_json method to our test Client" This reverts commit deef2f98deeeaf51bd9ddda4c5a200d082e16522. Somehow, I missed that this method was already there and added it again. I'm going to blame it on burnout.
Python
mit
wylee/django-arcutils,wylee/django-arcutils,PSU-OIT-ARC/django-arcutils,PSU-OIT-ARC/django-arcutils
import json import django.test from .user import UserMixin class Client(django.test.Client): def patch_json(self, path, data=None, **kwargs): return self.patch(path, **self._json_kwargs(data, kwargs)) def post_json(self, path, data=None, **kwargs): return self.post(path, **self._json_kwarg...
import json import django.test from .user import UserMixin class Client(django.test.Client): def patch_json(self, path, data=None, **kwargs): return self.patch(path, **self._json_kwargs(data, kwargs)) def post_json(self, path, data=None, **kwargs): return self.post(path, **self._json_kwarg...
<commit_before>import json import django.test from .user import UserMixin class Client(django.test.Client): def patch_json(self, path, data=None, **kwargs): return self.patch(path, **self._json_kwargs(data, kwargs)) def post_json(self, path, data=None, **kwargs): return self.post(path, **s...
import json import django.test from .user import UserMixin class Client(django.test.Client): def patch_json(self, path, data=None, **kwargs): return self.patch(path, **self._json_kwargs(data, kwargs)) def post_json(self, path, data=None, **kwargs): return self.post(path, **self._json_kwarg...
import json import django.test from .user import UserMixin class Client(django.test.Client): def patch_json(self, path, data=None, **kwargs): return self.patch(path, **self._json_kwargs(data, kwargs)) def post_json(self, path, data=None, **kwargs): return self.post(path, **self._json_kwarg...
<commit_before>import json import django.test from .user import UserMixin class Client(django.test.Client): def patch_json(self, path, data=None, **kwargs): return self.patch(path, **self._json_kwargs(data, kwargs)) def post_json(self, path, data=None, **kwargs): return self.post(path, **s...
98682412dccf2a5e38f0f701dbfe452e4e87a8aa
wagtail/admin/urls/password_reset.py
wagtail/admin/urls/password_reset.py
from django.urls import path, re_path from wagtail.admin.views import account urlpatterns = [ path( '', account.PasswordResetView.as_view(), name='wagtailadmin_password_reset' ), path( 'done/', account.PasswordResetDoneView.as_view(), name='wagtailadmin_password_reset_done' ), re_p...
from django.urls import path from wagtail.admin.views import account urlpatterns = [ path( '', account.PasswordResetView.as_view(), name='wagtailadmin_password_reset' ), path( 'done/', account.PasswordResetDoneView.as_view(), name='wagtailadmin_password_reset_done' ), path( ...
Use new-style URL paths for password reset views
Use new-style URL paths for password reset views This matches what Django has done in the corresponding views: https://github.com/django/django/blob/5d4b9c1cab03f0d057f0c7751862df0302c65cf9/django/contrib/auth/urls.py and prevents it from breaking on Django 3.1 (because the token is now longer than the 13+20 chars all...
Python
bsd-3-clause
torchbox/wagtail,kaedroho/wagtail,thenewguy/wagtail,zerolab/wagtail,torchbox/wagtail,thenewguy/wagtail,gasman/wagtail,wagtail/wagtail,gasman/wagtail,FlipperPA/wagtail,takeflight/wagtail,takeflight/wagtail,rsalmaso/wagtail,jnns/wagtail,wagtail/wagtail,gasman/wagtail,mixxorz/wagtail,takeflight/wagtail,jnns/wagtail,rsalma...
from django.urls import path, re_path from wagtail.admin.views import account urlpatterns = [ path( '', account.PasswordResetView.as_view(), name='wagtailadmin_password_reset' ), path( 'done/', account.PasswordResetDoneView.as_view(), name='wagtailadmin_password_reset_done' ), re_p...
from django.urls import path from wagtail.admin.views import account urlpatterns = [ path( '', account.PasswordResetView.as_view(), name='wagtailadmin_password_reset' ), path( 'done/', account.PasswordResetDoneView.as_view(), name='wagtailadmin_password_reset_done' ), path( ...
<commit_before>from django.urls import path, re_path from wagtail.admin.views import account urlpatterns = [ path( '', account.PasswordResetView.as_view(), name='wagtailadmin_password_reset' ), path( 'done/', account.PasswordResetDoneView.as_view(), name='wagtailadmin_password_reset_done' ...
from django.urls import path from wagtail.admin.views import account urlpatterns = [ path( '', account.PasswordResetView.as_view(), name='wagtailadmin_password_reset' ), path( 'done/', account.PasswordResetDoneView.as_view(), name='wagtailadmin_password_reset_done' ), path( ...
from django.urls import path, re_path from wagtail.admin.views import account urlpatterns = [ path( '', account.PasswordResetView.as_view(), name='wagtailadmin_password_reset' ), path( 'done/', account.PasswordResetDoneView.as_view(), name='wagtailadmin_password_reset_done' ), re_p...
<commit_before>from django.urls import path, re_path from wagtail.admin.views import account urlpatterns = [ path( '', account.PasswordResetView.as_view(), name='wagtailadmin_password_reset' ), path( 'done/', account.PasswordResetDoneView.as_view(), name='wagtailadmin_password_reset_done' ...
b7c967ad0f45cc1144a8713c6513bae5bca89242
LiSE/LiSE/test_proxy.py
LiSE/LiSE/test_proxy.py
from LiSE.proxy import EngineProcessManager import allegedb.test class ProxyTest(allegedb.test.AllegedTest): def setUp(self): self.manager = EngineProcessManager() self.engine = self.manager.start('sqlite:///:memory:') self.graphmakers = (self.engine.new_character,) def tearDown(self)...
from LiSE.proxy import EngineProcessManager import allegedb.test class ProxyTest(allegedb.test.AllegedTest): def setUp(self): self.manager = EngineProcessManager() self.engine = self.manager.start('sqlite:///:memory:') self.graphmakers = (self.engine.new_character,) def tearDown(self)...
Delete BranchLineageTest, which assumes bidirectional graphs exist
Delete BranchLineageTest, which assumes bidirectional graphs exist
Python
agpl-3.0
LogicalDash/LiSE,LogicalDash/LiSE
from LiSE.proxy import EngineProcessManager import allegedb.test class ProxyTest(allegedb.test.AllegedTest): def setUp(self): self.manager = EngineProcessManager() self.engine = self.manager.start('sqlite:///:memory:') self.graphmakers = (self.engine.new_character,) def tearDown(self)...
from LiSE.proxy import EngineProcessManager import allegedb.test class ProxyTest(allegedb.test.AllegedTest): def setUp(self): self.manager = EngineProcessManager() self.engine = self.manager.start('sqlite:///:memory:') self.graphmakers = (self.engine.new_character,) def tearDown(self)...
<commit_before>from LiSE.proxy import EngineProcessManager import allegedb.test class ProxyTest(allegedb.test.AllegedTest): def setUp(self): self.manager = EngineProcessManager() self.engine = self.manager.start('sqlite:///:memory:') self.graphmakers = (self.engine.new_character,) def...
from LiSE.proxy import EngineProcessManager import allegedb.test class ProxyTest(allegedb.test.AllegedTest): def setUp(self): self.manager = EngineProcessManager() self.engine = self.manager.start('sqlite:///:memory:') self.graphmakers = (self.engine.new_character,) def tearDown(self)...
from LiSE.proxy import EngineProcessManager import allegedb.test class ProxyTest(allegedb.test.AllegedTest): def setUp(self): self.manager = EngineProcessManager() self.engine = self.manager.start('sqlite:///:memory:') self.graphmakers = (self.engine.new_character,) def tearDown(self)...
<commit_before>from LiSE.proxy import EngineProcessManager import allegedb.test class ProxyTest(allegedb.test.AllegedTest): def setUp(self): self.manager = EngineProcessManager() self.engine = self.manager.start('sqlite:///:memory:') self.graphmakers = (self.engine.new_character,) def...
3b9f6e41014859eecc9d6ef01ec10fed40775861
medical_prescription_us/tests/test_medical_prescription_order_line.py
medical_prescription_us/tests/test_medical_prescription_order_line.py
# -*- coding: utf-8 -*- # Copyright 2016 LasLabs Inc. # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). from openerp.tests.common import TransactionCase from openerp.exceptions import ValidationError class TestMedicalPrescriptionOrderLine(TransactionCase): def setUp(self): super(TestM...
# -*- coding: utf-8 -*- # Copyright 2016 LasLabs Inc. # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). from odoo.tests.common import TransactionCase from odoo.exceptions import ValidationError class TestMedicalPrescriptionOrderLine(TransactionCase): def setUp(self): super(TestMedical...
Upgrade test namespace * Change openerp namespace to odoo in test imports
[MIG] medical_prescription_us: Upgrade test namespace * Change openerp namespace to odoo in test imports
Python
agpl-3.0
laslabs/vertical-medical,laslabs/vertical-medical
# -*- coding: utf-8 -*- # Copyright 2016 LasLabs Inc. # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). from openerp.tests.common import TransactionCase from openerp.exceptions import ValidationError class TestMedicalPrescriptionOrderLine(TransactionCase): def setUp(self): super(TestM...
# -*- coding: utf-8 -*- # Copyright 2016 LasLabs Inc. # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). from odoo.tests.common import TransactionCase from odoo.exceptions import ValidationError class TestMedicalPrescriptionOrderLine(TransactionCase): def setUp(self): super(TestMedical...
<commit_before># -*- coding: utf-8 -*- # Copyright 2016 LasLabs Inc. # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). from openerp.tests.common import TransactionCase from openerp.exceptions import ValidationError class TestMedicalPrescriptionOrderLine(TransactionCase): def setUp(self): ...
# -*- coding: utf-8 -*- # Copyright 2016 LasLabs Inc. # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). from odoo.tests.common import TransactionCase from odoo.exceptions import ValidationError class TestMedicalPrescriptionOrderLine(TransactionCase): def setUp(self): super(TestMedical...
# -*- coding: utf-8 -*- # Copyright 2016 LasLabs Inc. # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). from openerp.tests.common import TransactionCase from openerp.exceptions import ValidationError class TestMedicalPrescriptionOrderLine(TransactionCase): def setUp(self): super(TestM...
<commit_before># -*- coding: utf-8 -*- # Copyright 2016 LasLabs Inc. # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). from openerp.tests.common import TransactionCase from openerp.exceptions import ValidationError class TestMedicalPrescriptionOrderLine(TransactionCase): def setUp(self): ...
d5a1bfbff18cf129550c2c423beb8db9302c0736
tests/redisdl_test.py
tests/redisdl_test.py
import redisdl import unittest import json import os.path class RedisdlTest(unittest.TestCase): def test_roundtrip(self): path = os.path.join(os.path.dirname(__file__), 'fixtures', 'dump.json') with open(path) as f: dump = f.read() redisdl.loads(dump) redump = redisdl....
import redisdl import unittest import json import os.path class RedisdlTest(unittest.TestCase): def setUp(self): import redis self.r = redis.Redis() for key in self.r.keys('*'): self.r.delete(key) def test_roundtrip(self): path = os.path.join(os.path.dirname(__file_...
Clear redis data store before running tests
Clear redis data store before running tests
Python
bsd-2-clause
hyunchel/redis-dump-load,p/redis-dump-load,hyunchel/redis-dump-load,p/redis-dump-load
import redisdl import unittest import json import os.path class RedisdlTest(unittest.TestCase): def test_roundtrip(self): path = os.path.join(os.path.dirname(__file__), 'fixtures', 'dump.json') with open(path) as f: dump = f.read() redisdl.loads(dump) redump = redisdl....
import redisdl import unittest import json import os.path class RedisdlTest(unittest.TestCase): def setUp(self): import redis self.r = redis.Redis() for key in self.r.keys('*'): self.r.delete(key) def test_roundtrip(self): path = os.path.join(os.path.dirname(__file_...
<commit_before>import redisdl import unittest import json import os.path class RedisdlTest(unittest.TestCase): def test_roundtrip(self): path = os.path.join(os.path.dirname(__file__), 'fixtures', 'dump.json') with open(path) as f: dump = f.read() redisdl.loads(dump) re...
import redisdl import unittest import json import os.path class RedisdlTest(unittest.TestCase): def setUp(self): import redis self.r = redis.Redis() for key in self.r.keys('*'): self.r.delete(key) def test_roundtrip(self): path = os.path.join(os.path.dirname(__file_...
import redisdl import unittest import json import os.path class RedisdlTest(unittest.TestCase): def test_roundtrip(self): path = os.path.join(os.path.dirname(__file__), 'fixtures', 'dump.json') with open(path) as f: dump = f.read() redisdl.loads(dump) redump = redisdl....
<commit_before>import redisdl import unittest import json import os.path class RedisdlTest(unittest.TestCase): def test_roundtrip(self): path = os.path.join(os.path.dirname(__file__), 'fixtures', 'dump.json') with open(path) as f: dump = f.read() redisdl.loads(dump) re...
0549a85f83bb4fb95aff3c4fc8d8a699c7e73fa9
chainer/utils/argument.py
chainer/utils/argument.py
def check_unexpected_kwargs(kwargs, **unexpected): for key, message in unexpected.items(): if key in kwargs: raise ValueError(message) def parse_kwargs(kwargs, *name_and_values): values = [kwargs.pop(name, default_value) for name, default_value in name_and_values] if kwar...
import inspect def check_unexpected_kwargs(kwargs, **unexpected): for key, message in unexpected.items(): if key in kwargs: raise ValueError(message) def parse_kwargs(kwargs, *name_and_values): values = [kwargs.pop(name, default_value) for name, default_value in name_and_va...
Put `import inspect` at the top of the file
Put `import inspect` at the top of the file
Python
mit
keisuke-umezawa/chainer,niboshi/chainer,wkentaro/chainer,chainer/chainer,rezoo/chainer,keisuke-umezawa/chainer,hvy/chainer,keisuke-umezawa/chainer,okuta/chainer,ktnyt/chainer,jnishi/chainer,niboshi/chainer,pfnet/chainer,keisuke-umezawa/chainer,anaruse/chainer,hvy/chainer,okuta/chainer,chainer/chainer,hvy/chainer,nibosh...
def check_unexpected_kwargs(kwargs, **unexpected): for key, message in unexpected.items(): if key in kwargs: raise ValueError(message) def parse_kwargs(kwargs, *name_and_values): values = [kwargs.pop(name, default_value) for name, default_value in name_and_values] if kwar...
import inspect def check_unexpected_kwargs(kwargs, **unexpected): for key, message in unexpected.items(): if key in kwargs: raise ValueError(message) def parse_kwargs(kwargs, *name_and_values): values = [kwargs.pop(name, default_value) for name, default_value in name_and_va...
<commit_before>def check_unexpected_kwargs(kwargs, **unexpected): for key, message in unexpected.items(): if key in kwargs: raise ValueError(message) def parse_kwargs(kwargs, *name_and_values): values = [kwargs.pop(name, default_value) for name, default_value in name_and_valu...
import inspect def check_unexpected_kwargs(kwargs, **unexpected): for key, message in unexpected.items(): if key in kwargs: raise ValueError(message) def parse_kwargs(kwargs, *name_and_values): values = [kwargs.pop(name, default_value) for name, default_value in name_and_va...
def check_unexpected_kwargs(kwargs, **unexpected): for key, message in unexpected.items(): if key in kwargs: raise ValueError(message) def parse_kwargs(kwargs, *name_and_values): values = [kwargs.pop(name, default_value) for name, default_value in name_and_values] if kwar...
<commit_before>def check_unexpected_kwargs(kwargs, **unexpected): for key, message in unexpected.items(): if key in kwargs: raise ValueError(message) def parse_kwargs(kwargs, *name_and_values): values = [kwargs.pop(name, default_value) for name, default_value in name_and_valu...
50072e2e2fa2f650dd1899b14aaaecb2dfe909ef
tests/test_plugins.py
tests/test_plugins.py
# -*- coding:utf-8 -*- import os from sigal.gallery import Gallery from sigal import init_plugins CURRENT_DIR = os.path.dirname(__file__) def test_plugins(settings, tmpdir): settings['destination'] = str(tmpdir) if "sigal.plugins.nomedia" not in settings["plugins"]: settings['plugins'] += ["sigal....
# -*- coding:utf-8 -*- import blinker import os from sigal.gallery import Gallery from sigal import init_plugins, signals CURRENT_DIR = os.path.dirname(__file__) def test_plugins(settings, tmpdir): settings['destination'] = str(tmpdir) if "sigal.plugins.nomedia" not in settings["plugins"]: setting...
Clear signals after testing plugins
Clear signals after testing plugins
Python
mit
xouillet/sigal,t-animal/sigal,xouillet/sigal,saimn/sigal,xouillet/sigal,jasuarez/sigal,t-animal/sigal,t-animal/sigal,jasuarez/sigal,saimn/sigal,jasuarez/sigal,saimn/sigal
# -*- coding:utf-8 -*- import os from sigal.gallery import Gallery from sigal import init_plugins CURRENT_DIR = os.path.dirname(__file__) def test_plugins(settings, tmpdir): settings['destination'] = str(tmpdir) if "sigal.plugins.nomedia" not in settings["plugins"]: settings['plugins'] += ["sigal....
# -*- coding:utf-8 -*- import blinker import os from sigal.gallery import Gallery from sigal import init_plugins, signals CURRENT_DIR = os.path.dirname(__file__) def test_plugins(settings, tmpdir): settings['destination'] = str(tmpdir) if "sigal.plugins.nomedia" not in settings["plugins"]: setting...
<commit_before># -*- coding:utf-8 -*- import os from sigal.gallery import Gallery from sigal import init_plugins CURRENT_DIR = os.path.dirname(__file__) def test_plugins(settings, tmpdir): settings['destination'] = str(tmpdir) if "sigal.plugins.nomedia" not in settings["plugins"]: settings['plugin...
# -*- coding:utf-8 -*- import blinker import os from sigal.gallery import Gallery from sigal import init_plugins, signals CURRENT_DIR = os.path.dirname(__file__) def test_plugins(settings, tmpdir): settings['destination'] = str(tmpdir) if "sigal.plugins.nomedia" not in settings["plugins"]: setting...
# -*- coding:utf-8 -*- import os from sigal.gallery import Gallery from sigal import init_plugins CURRENT_DIR = os.path.dirname(__file__) def test_plugins(settings, tmpdir): settings['destination'] = str(tmpdir) if "sigal.plugins.nomedia" not in settings["plugins"]: settings['plugins'] += ["sigal....
<commit_before># -*- coding:utf-8 -*- import os from sigal.gallery import Gallery from sigal import init_plugins CURRENT_DIR = os.path.dirname(__file__) def test_plugins(settings, tmpdir): settings['destination'] = str(tmpdir) if "sigal.plugins.nomedia" not in settings["plugins"]: settings['plugin...
2a3e0b57f8f18404d5949abfd14cea8f51bfad13
tests/test_queries.py
tests/test_queries.py
from unittest import TestCase class MongoAdapterTestCase(TestCase): def setUp(self): from chatterbot.storage.mongodb import Query self.query = Query() def test_statement_text_equals(self): query = self.query.statement_text_equals('Testing in progress') self.assertIn('text', ...
from unittest import TestCase class MongoAdapterTestCase(TestCase): def setUp(self): from chatterbot.storage.mongodb import Query self.query = Query() def test_statement_text_equals(self): query = self.query.statement_text_equals('Testing in progress') self.assertIn('text', ...
Remove test cases for query methods being removed.
Remove test cases for query methods being removed.
Python
bsd-3-clause
gunthercox/ChatterBot,vkosuri/ChatterBot
from unittest import TestCase class MongoAdapterTestCase(TestCase): def setUp(self): from chatterbot.storage.mongodb import Query self.query = Query() def test_statement_text_equals(self): query = self.query.statement_text_equals('Testing in progress') self.assertIn('text', ...
from unittest import TestCase class MongoAdapterTestCase(TestCase): def setUp(self): from chatterbot.storage.mongodb import Query self.query = Query() def test_statement_text_equals(self): query = self.query.statement_text_equals('Testing in progress') self.assertIn('text', ...
<commit_before>from unittest import TestCase class MongoAdapterTestCase(TestCase): def setUp(self): from chatterbot.storage.mongodb import Query self.query = Query() def test_statement_text_equals(self): query = self.query.statement_text_equals('Testing in progress') self.as...
from unittest import TestCase class MongoAdapterTestCase(TestCase): def setUp(self): from chatterbot.storage.mongodb import Query self.query = Query() def test_statement_text_equals(self): query = self.query.statement_text_equals('Testing in progress') self.assertIn('text', ...
from unittest import TestCase class MongoAdapterTestCase(TestCase): def setUp(self): from chatterbot.storage.mongodb import Query self.query = Query() def test_statement_text_equals(self): query = self.query.statement_text_equals('Testing in progress') self.assertIn('text', ...
<commit_before>from unittest import TestCase class MongoAdapterTestCase(TestCase): def setUp(self): from chatterbot.storage.mongodb import Query self.query = Query() def test_statement_text_equals(self): query = self.query.statement_text_equals('Testing in progress') self.as...
f10d2865a8f858f05e72709655d15923ea706bb3
unitTestUtils/parseXML.py
unitTestUtils/parseXML.py
#!/usr/bin/python # -*- coding: utf-8 -*- from __future__ import print_function from xml.etree.ElementTree import ParseError import xml.etree.ElementTree as ET import glob import sys def eprint(*args, **kwargs): print(*args, file=sys.stderr, **kwargs) def parse(): for infile in glob.glob('*.xml'): tr...
#!/usr/bin/python # -*- coding: utf-8 -*- from __future__ import print_function from xml.etree.ElementTree import ParseError import xml.etree.ElementTree as ET import glob import sys def eprint(*args, **kwargs): print(*args, file=sys.stderr, **kwargs) def parse(): for infile in glob.glob('*.xml'): tr...
Add more verbose error to reporte on Travis parserXML.py
Add more verbose error to reporte on Travis parserXML.py
Python
apache-2.0
alexkernphysiker/j-pet-framework,alexkernphysiker/j-pet-framework,alexkernphysiker/j-pet-framework,JPETTomography/j-pet-framework,JPETTomography/j-pet-framework,alexkernphysiker/j-pet-framework,JPETTomography/j-pet-framework,alexkernphysiker/j-pet-framework
#!/usr/bin/python # -*- coding: utf-8 -*- from __future__ import print_function from xml.etree.ElementTree import ParseError import xml.etree.ElementTree as ET import glob import sys def eprint(*args, **kwargs): print(*args, file=sys.stderr, **kwargs) def parse(): for infile in glob.glob('*.xml'): tr...
#!/usr/bin/python # -*- coding: utf-8 -*- from __future__ import print_function from xml.etree.ElementTree import ParseError import xml.etree.ElementTree as ET import glob import sys def eprint(*args, **kwargs): print(*args, file=sys.stderr, **kwargs) def parse(): for infile in glob.glob('*.xml'): tr...
<commit_before>#!/usr/bin/python # -*- coding: utf-8 -*- from __future__ import print_function from xml.etree.ElementTree import ParseError import xml.etree.ElementTree as ET import glob import sys def eprint(*args, **kwargs): print(*args, file=sys.stderr, **kwargs) def parse(): for infile in glob.glob('*.xm...
#!/usr/bin/python # -*- coding: utf-8 -*- from __future__ import print_function from xml.etree.ElementTree import ParseError import xml.etree.ElementTree as ET import glob import sys def eprint(*args, **kwargs): print(*args, file=sys.stderr, **kwargs) def parse(): for infile in glob.glob('*.xml'): tr...
#!/usr/bin/python # -*- coding: utf-8 -*- from __future__ import print_function from xml.etree.ElementTree import ParseError import xml.etree.ElementTree as ET import glob import sys def eprint(*args, **kwargs): print(*args, file=sys.stderr, **kwargs) def parse(): for infile in glob.glob('*.xml'): tr...
<commit_before>#!/usr/bin/python # -*- coding: utf-8 -*- from __future__ import print_function from xml.etree.ElementTree import ParseError import xml.etree.ElementTree as ET import glob import sys def eprint(*args, **kwargs): print(*args, file=sys.stderr, **kwargs) def parse(): for infile in glob.glob('*.xm...
47ce2347b05bb13af6c6430c24341e5892b22ffa
spacy/tests/regression/test_issue1506.py
spacy/tests/regression/test_issue1506.py
# coding: utf8 from __future__ import unicode_literals import gc from ...lang.en import English def test_issue1506(): nlp = English() def string_generator(): for _ in range(10001): yield "It's sentence produced by that bug." yield "Oh snap." for _ in range(10001): ...
# coding: utf8 from __future__ import unicode_literals import gc from ...lang.en import English def test_issue1506(): nlp = English() def string_generator(): for _ in range(10001): yield "It's sentence produced by that bug." yield "Oh snap." for _ in range(10001): ...
Create test that fails when actual cleanup caused
Create test that fails when actual cleanup caused
Python
mit
explosion/spaCy,spacy-io/spaCy,spacy-io/spaCy,explosion/spaCy,aikramer2/spaCy,aikramer2/spaCy,honnibal/spaCy,aikramer2/spaCy,honnibal/spaCy,spacy-io/spaCy,honnibal/spaCy,aikramer2/spaCy,explosion/spaCy,spacy-io/spaCy,spacy-io/spaCy,recognai/spaCy,explosion/spaCy,honnibal/spaCy,recognai/spaCy,recognai/spaCy,recognai/spa...
# coding: utf8 from __future__ import unicode_literals import gc from ...lang.en import English def test_issue1506(): nlp = English() def string_generator(): for _ in range(10001): yield "It's sentence produced by that bug." yield "Oh snap." for _ in range(10001): ...
# coding: utf8 from __future__ import unicode_literals import gc from ...lang.en import English def test_issue1506(): nlp = English() def string_generator(): for _ in range(10001): yield "It's sentence produced by that bug." yield "Oh snap." for _ in range(10001): ...
<commit_before># coding: utf8 from __future__ import unicode_literals import gc from ...lang.en import English def test_issue1506(): nlp = English() def string_generator(): for _ in range(10001): yield "It's sentence produced by that bug." yield "Oh snap." for _ in ran...
# coding: utf8 from __future__ import unicode_literals import gc from ...lang.en import English def test_issue1506(): nlp = English() def string_generator(): for _ in range(10001): yield "It's sentence produced by that bug." yield "Oh snap." for _ in range(10001): ...
# coding: utf8 from __future__ import unicode_literals import gc from ...lang.en import English def test_issue1506(): nlp = English() def string_generator(): for _ in range(10001): yield "It's sentence produced by that bug." yield "Oh snap." for _ in range(10001): ...
<commit_before># coding: utf8 from __future__ import unicode_literals import gc from ...lang.en import English def test_issue1506(): nlp = English() def string_generator(): for _ in range(10001): yield "It's sentence produced by that bug." yield "Oh snap." for _ in ran...
7a070f0b7873d96b2cb5e4c54fb34b3c38d45afb
genome_designer/main/data_util.py
genome_designer/main/data_util.py
""" Common methods for getting data from the backend. These methods are intended to be used by both views.py, which should define only pages, and xhr_handlers.py, which are intended to respond to AJAX requests. """ from main.model_views import CastVariantView from main.model_views import MeltedVariantView from varian...
""" Common methods for getting data from the backend. These methods are intended to be used by both views.py, which should define only pages, and xhr_handlers.py, which are intended to respond to AJAX requests. """ from main.model_views import CastVariantView from main.model_views import MeltedVariantView from varian...
Fix bug from last commit.
Fix bug from last commit.
Python
mit
churchlab/millstone,woodymit/millstone,churchlab/millstone,woodymit/millstone,woodymit/millstone,churchlab/millstone,woodymit/millstone_accidental_source,woodymit/millstone_accidental_source,woodymit/millstone_accidental_source,woodymit/millstone,churchlab/millstone,woodymit/millstone_accidental_source
""" Common methods for getting data from the backend. These methods are intended to be used by both views.py, which should define only pages, and xhr_handlers.py, which are intended to respond to AJAX requests. """ from main.model_views import CastVariantView from main.model_views import MeltedVariantView from varian...
""" Common methods for getting data from the backend. These methods are intended to be used by both views.py, which should define only pages, and xhr_handlers.py, which are intended to respond to AJAX requests. """ from main.model_views import CastVariantView from main.model_views import MeltedVariantView from varian...
<commit_before>""" Common methods for getting data from the backend. These methods are intended to be used by both views.py, which should define only pages, and xhr_handlers.py, which are intended to respond to AJAX requests. """ from main.model_views import CastVariantView from main.model_views import MeltedVariantV...
""" Common methods for getting data from the backend. These methods are intended to be used by both views.py, which should define only pages, and xhr_handlers.py, which are intended to respond to AJAX requests. """ from main.model_views import CastVariantView from main.model_views import MeltedVariantView from varian...
""" Common methods for getting data from the backend. These methods are intended to be used by both views.py, which should define only pages, and xhr_handlers.py, which are intended to respond to AJAX requests. """ from main.model_views import CastVariantView from main.model_views import MeltedVariantView from varian...
<commit_before>""" Common methods for getting data from the backend. These methods are intended to be used by both views.py, which should define only pages, and xhr_handlers.py, which are intended to respond to AJAX requests. """ from main.model_views import CastVariantView from main.model_views import MeltedVariantV...
e6c43333c3939247534ddee4c419dcdcff5eda5f
spyder_terminal/server/rest/term_rest.py
spyder_terminal/server/rest/term_rest.py
# -*- coding: iso-8859-15 -*- """Main HTTP routes request handlers.""" import tornado.web import tornado.escape from os import getcwd class MainHandler(tornado.web.RequestHandler): """Handles creation of new terminals.""" @tornado.gen.coroutine def post(self): """POST verb: Create a new termina...
# -*- coding: iso-8859-15 -*- """Main HTTP routes request handlers.""" import tornado.web import tornado.escape from os import getcwd class MainHandler(tornado.web.RequestHandler): """Handles creation of new terminals.""" @tornado.gen.coroutine def post(self): """POST verb: Create a new termina...
Change default terminal resize arguments
Change default terminal resize arguments
Python
mit
andfoy/spyder-terminal,spyder-ide/spyder-terminal,spyder-ide/spyder-terminal,andfoy/spyder-terminal,andfoy/spyder-terminal,spyder-ide/spyder-terminal,spyder-ide/spyder-terminal
# -*- coding: iso-8859-15 -*- """Main HTTP routes request handlers.""" import tornado.web import tornado.escape from os import getcwd class MainHandler(tornado.web.RequestHandler): """Handles creation of new terminals.""" @tornado.gen.coroutine def post(self): """POST verb: Create a new termina...
# -*- coding: iso-8859-15 -*- """Main HTTP routes request handlers.""" import tornado.web import tornado.escape from os import getcwd class MainHandler(tornado.web.RequestHandler): """Handles creation of new terminals.""" @tornado.gen.coroutine def post(self): """POST verb: Create a new termina...
<commit_before># -*- coding: iso-8859-15 -*- """Main HTTP routes request handlers.""" import tornado.web import tornado.escape from os import getcwd class MainHandler(tornado.web.RequestHandler): """Handles creation of new terminals.""" @tornado.gen.coroutine def post(self): """POST verb: Creat...
# -*- coding: iso-8859-15 -*- """Main HTTP routes request handlers.""" import tornado.web import tornado.escape from os import getcwd class MainHandler(tornado.web.RequestHandler): """Handles creation of new terminals.""" @tornado.gen.coroutine def post(self): """POST verb: Create a new termina...
# -*- coding: iso-8859-15 -*- """Main HTTP routes request handlers.""" import tornado.web import tornado.escape from os import getcwd class MainHandler(tornado.web.RequestHandler): """Handles creation of new terminals.""" @tornado.gen.coroutine def post(self): """POST verb: Create a new termina...
<commit_before># -*- coding: iso-8859-15 -*- """Main HTTP routes request handlers.""" import tornado.web import tornado.escape from os import getcwd class MainHandler(tornado.web.RequestHandler): """Handles creation of new terminals.""" @tornado.gen.coroutine def post(self): """POST verb: Creat...
00ef4db967b00c5cef5c72d5266327bbd9db5909
ibmcnx/test/loadFunction.py
ibmcnx/test/loadFunction.py
import sys from java.lang import String from java.util import HashSet from java.util import HashMap import java import lotusConnectionsCommonAdmin globdict = globals() def loadFilesService(): global globdict exec open("filesAdmin.py").read()
import sys from java.lang import String from java.util import HashSet from java.util import HashMap import java import lotusConnectionsCommonAdmin globdict = globals() locdict = locals() def loadFilesService(): global globdict global locdict execfile("filesAdmin.py",globdict,locdict)
Customize scripts to work with menu
Customize scripts to work with menu
Python
apache-2.0
stoeps13/ibmcnx2,stoeps13/ibmcnx2
import sys from java.lang import String from java.util import HashSet from java.util import HashMap import java import lotusConnectionsCommonAdmin globdict = globals() def loadFilesService(): global globdict exec open("filesAdmin.py").read() Customize scripts to work with menu
import sys from java.lang import String from java.util import HashSet from java.util import HashMap import java import lotusConnectionsCommonAdmin globdict = globals() locdict = locals() def loadFilesService(): global globdict global locdict execfile("filesAdmin.py",globdict,locdict)
<commit_before> import sys from java.lang import String from java.util import HashSet from java.util import HashMap import java import lotusConnectionsCommonAdmin globdict = globals() def loadFilesService(): global globdict exec open("filesAdmin.py").read() <commit_msg>Customize scripts to work with menu<comm...
import sys from java.lang import String from java.util import HashSet from java.util import HashMap import java import lotusConnectionsCommonAdmin globdict = globals() locdict = locals() def loadFilesService(): global globdict global locdict execfile("filesAdmin.py",globdict,locdict)
import sys from java.lang import String from java.util import HashSet from java.util import HashMap import java import lotusConnectionsCommonAdmin globdict = globals() def loadFilesService(): global globdict exec open("filesAdmin.py").read() Customize scripts to work with menu import sys from java.lang impor...
<commit_before> import sys from java.lang import String from java.util import HashSet from java.util import HashMap import java import lotusConnectionsCommonAdmin globdict = globals() def loadFilesService(): global globdict exec open("filesAdmin.py").read() <commit_msg>Customize scripts to work with menu<comm...
2e9472e4989985ebdb770c193856a02616a3d8e4
plugoo/assets.py
plugoo/assets.py
class Asset: """ This is an ooni-probe asset. It is a python iterator object, allowing it to be efficiently looped. To create your own custom asset your should subclass this and override the next_asset method and the len method for computing the length of the asset. """ def __init__(self...
class Asset: """ This is an ooni-probe asset. It is a python iterator object, allowing it to be efficiently looped. To create your own custom asset your should subclass this and override the next_asset method and the len method for computing the length of the asset. """ def __init__(self...
Add a method for line by line asset parsing
Add a method for line by line asset parsing
Python
bsd-2-clause
0xPoly/ooni-probe,juga0/ooni-probe,kdmurray91/ooni-probe,hackerberry/ooni-probe,lordappsec/ooni-probe,0xPoly/ooni-probe,Karthikeyan-kkk/ooni-probe,kdmurray91/ooni-probe,juga0/ooni-probe,juga0/ooni-probe,lordappsec/ooni-probe,juga0/ooni-probe,0xPoly/ooni-probe,0xPoly/ooni-probe,Karthikeyan-kkk/ooni-probe,lordappsec/ooni...
class Asset: """ This is an ooni-probe asset. It is a python iterator object, allowing it to be efficiently looped. To create your own custom asset your should subclass this and override the next_asset method and the len method for computing the length of the asset. """ def __init__(self...
class Asset: """ This is an ooni-probe asset. It is a python iterator object, allowing it to be efficiently looped. To create your own custom asset your should subclass this and override the next_asset method and the len method for computing the length of the asset. """ def __init__(self...
<commit_before>class Asset: """ This is an ooni-probe asset. It is a python iterator object, allowing it to be efficiently looped. To create your own custom asset your should subclass this and override the next_asset method and the len method for computing the length of the asset. """ de...
class Asset: """ This is an ooni-probe asset. It is a python iterator object, allowing it to be efficiently looped. To create your own custom asset your should subclass this and override the next_asset method and the len method for computing the length of the asset. """ def __init__(self...
class Asset: """ This is an ooni-probe asset. It is a python iterator object, allowing it to be efficiently looped. To create your own custom asset your should subclass this and override the next_asset method and the len method for computing the length of the asset. """ def __init__(self...
<commit_before>class Asset: """ This is an ooni-probe asset. It is a python iterator object, allowing it to be efficiently looped. To create your own custom asset your should subclass this and override the next_asset method and the len method for computing the length of the asset. """ de...
f0a1a75e6596f16b6e708c06a6c450d9acba2299
faas/puzzleboard-pop/puzzleboard_pop.py
faas/puzzleboard-pop/puzzleboard_pop.py
import json from datetime import datetime import requests from .model.puzzleboard import pop_puzzleboard class HuntwordsPuzzleBoardPopCommand(object): '''Command class that processes puzzleboard-pop message''' def run(self, jreq): '''Command that processes puzzleboard-pop message''' req = ...
import json import logging import sys from datetime import datetime import requests from .model.puzzleboard import pop_puzzleboard class HuntwordsPuzzleBoardPopCommand(object): '''Command class that processes puzzleboard-pop message''' def __init__(self): logging.basicConfig(stream=sys.stderr) ...
Add logging as a test
Add logging as a test
Python
mit
klmcwhirter/huntwords,klmcwhirter/huntwords,klmcwhirter/huntwords,klmcwhirter/huntwords
import json from datetime import datetime import requests from .model.puzzleboard import pop_puzzleboard class HuntwordsPuzzleBoardPopCommand(object): '''Command class that processes puzzleboard-pop message''' def run(self, jreq): '''Command that processes puzzleboard-pop message''' req = ...
import json import logging import sys from datetime import datetime import requests from .model.puzzleboard import pop_puzzleboard class HuntwordsPuzzleBoardPopCommand(object): '''Command class that processes puzzleboard-pop message''' def __init__(self): logging.basicConfig(stream=sys.stderr) ...
<commit_before>import json from datetime import datetime import requests from .model.puzzleboard import pop_puzzleboard class HuntwordsPuzzleBoardPopCommand(object): '''Command class that processes puzzleboard-pop message''' def run(self, jreq): '''Command that processes puzzleboard-pop message''' ...
import json import logging import sys from datetime import datetime import requests from .model.puzzleboard import pop_puzzleboard class HuntwordsPuzzleBoardPopCommand(object): '''Command class that processes puzzleboard-pop message''' def __init__(self): logging.basicConfig(stream=sys.stderr) ...
import json from datetime import datetime import requests from .model.puzzleboard import pop_puzzleboard class HuntwordsPuzzleBoardPopCommand(object): '''Command class that processes puzzleboard-pop message''' def run(self, jreq): '''Command that processes puzzleboard-pop message''' req = ...
<commit_before>import json from datetime import datetime import requests from .model.puzzleboard import pop_puzzleboard class HuntwordsPuzzleBoardPopCommand(object): '''Command class that processes puzzleboard-pop message''' def run(self, jreq): '''Command that processes puzzleboard-pop message''' ...
d6940b3ff80190f87bf7d5336b9c54dc160da12a
helpers/team_manipulator.py
helpers/team_manipulator.py
from helpers.ndb_manipulator_base import NdbManipulatorBase class TeamManipulator(NdbManipulatorBase): """ Handle Team database writes. """ @classmethod def updateMerge(self, new_team, old_team): """ Given an "old" and a "new" Team object, replace the fields in the "old...
from helpers.manipulator_base import ManipulatorBase class TeamManipulator(ManipulatorBase): """ Handle Team database writes. """ @classmethod def updateMerge(self, new_team, old_team): """ Given an "old" and a "new" Team object, replace the fields in the "old" team tha...
Remove references to NdbManipulatorBase, which never really happened.
Remove references to NdbManipulatorBase, which never really happened.
Python
mit
1fish2/the-blue-alliance,synth3tk/the-blue-alliance,bvisness/the-blue-alliance,bdaroz/the-blue-alliance,verycumbersome/the-blue-alliance,nwalters512/the-blue-alliance,synth3tk/the-blue-alliance,synth3tk/the-blue-alliance,phil-lopreiato/the-blue-alliance,the-blue-alliance/the-blue-alliance,the-blue-alliance/the-blue-all...
from helpers.ndb_manipulator_base import NdbManipulatorBase class TeamManipulator(NdbManipulatorBase): """ Handle Team database writes. """ @classmethod def updateMerge(self, new_team, old_team): """ Given an "old" and a "new" Team object, replace the fields in the "old...
from helpers.manipulator_base import ManipulatorBase class TeamManipulator(ManipulatorBase): """ Handle Team database writes. """ @classmethod def updateMerge(self, new_team, old_team): """ Given an "old" and a "new" Team object, replace the fields in the "old" team tha...
<commit_before>from helpers.ndb_manipulator_base import NdbManipulatorBase class TeamManipulator(NdbManipulatorBase): """ Handle Team database writes. """ @classmethod def updateMerge(self, new_team, old_team): """ Given an "old" and a "new" Team object, replace the fields in t...
from helpers.manipulator_base import ManipulatorBase class TeamManipulator(ManipulatorBase): """ Handle Team database writes. """ @classmethod def updateMerge(self, new_team, old_team): """ Given an "old" and a "new" Team object, replace the fields in the "old" team tha...
from helpers.ndb_manipulator_base import NdbManipulatorBase class TeamManipulator(NdbManipulatorBase): """ Handle Team database writes. """ @classmethod def updateMerge(self, new_team, old_team): """ Given an "old" and a "new" Team object, replace the fields in the "old...
<commit_before>from helpers.ndb_manipulator_base import NdbManipulatorBase class TeamManipulator(NdbManipulatorBase): """ Handle Team database writes. """ @classmethod def updateMerge(self, new_team, old_team): """ Given an "old" and a "new" Team object, replace the fields in t...
917feadfff4d38fe9b28e9451eb2def1438789fd
Mscthesis/IO/model_report.py
Mscthesis/IO/model_report.py
""" Module used to group the functions and utils to built a report from a model application. """ from Mscthesis.Plotting.net_plotting import plot_net_distribution,\ plot_heat_net from os.path import exists, join from os import makedirs def create_model_report(net, sectors, dirname, reportname): "Creation of...
""" Module used to group the functions and utils to built a report from a model application. """ from Mscthesis.Plotting.net_plotting import plot_net_distribution,\ plot_heat_net from os.path import exists, join from os import makedirs def create_model_report(net, sectors, dirname, reportname): "Creation of...
Debug bad creation of folders.
Debug bad creation of folders.
Python
mit
tgquintela/Mscthesis
""" Module used to group the functions and utils to built a report from a model application. """ from Mscthesis.Plotting.net_plotting import plot_net_distribution,\ plot_heat_net from os.path import exists, join from os import makedirs def create_model_report(net, sectors, dirname, reportname): "Creation of...
""" Module used to group the functions and utils to built a report from a model application. """ from Mscthesis.Plotting.net_plotting import plot_net_distribution,\ plot_heat_net from os.path import exists, join from os import makedirs def create_model_report(net, sectors, dirname, reportname): "Creation of...
<commit_before> """ Module used to group the functions and utils to built a report from a model application. """ from Mscthesis.Plotting.net_plotting import plot_net_distribution,\ plot_heat_net from os.path import exists, join from os import makedirs def create_model_report(net, sectors, dirname, reportname): ...
""" Module used to group the functions and utils to built a report from a model application. """ from Mscthesis.Plotting.net_plotting import plot_net_distribution,\ plot_heat_net from os.path import exists, join from os import makedirs def create_model_report(net, sectors, dirname, reportname): "Creation of...
""" Module used to group the functions and utils to built a report from a model application. """ from Mscthesis.Plotting.net_plotting import plot_net_distribution,\ plot_heat_net from os.path import exists, join from os import makedirs def create_model_report(net, sectors, dirname, reportname): "Creation of...
<commit_before> """ Module used to group the functions and utils to built a report from a model application. """ from Mscthesis.Plotting.net_plotting import plot_net_distribution,\ plot_heat_net from os.path import exists, join from os import makedirs def create_model_report(net, sectors, dirname, reportname): ...
da514177b10eb510a2e17cc1fbce7c76946fe25e
OctoPrintOutputController.py
OctoPrintOutputController.py
# Copyright (c) 2020 Aldo Hoeben / fieldOfView # OctoPrintPlugin is released under the terms of the AGPLv3 or higher. from cura.PrinterOutput.GenericOutputController import GenericOutputController class OctoPrintOutputController(GenericOutputController): def __init__(self, output_device: "PrinterOutputDevice") ->...
# Copyright (c) 2020 Aldo Hoeben / fieldOfView # OctoPrintPlugin is released under the terms of the AGPLv3 or higher. from cura.PrinterOutput.GenericOutputController import GenericOutputController class OctoPrintOutputController(GenericOutputController): def __init__(self, output_device: "PrinterOutputDevice") ->...
Fix jogging with Y or Z axes inverted
Fix jogging with Y or Z axes inverted
Python
agpl-3.0
fieldOfView/OctoPrintPlugin
# Copyright (c) 2020 Aldo Hoeben / fieldOfView # OctoPrintPlugin is released under the terms of the AGPLv3 or higher. from cura.PrinterOutput.GenericOutputController import GenericOutputController class OctoPrintOutputController(GenericOutputController): def __init__(self, output_device: "PrinterOutputDevice") ->...
# Copyright (c) 2020 Aldo Hoeben / fieldOfView # OctoPrintPlugin is released under the terms of the AGPLv3 or higher. from cura.PrinterOutput.GenericOutputController import GenericOutputController class OctoPrintOutputController(GenericOutputController): def __init__(self, output_device: "PrinterOutputDevice") ->...
<commit_before># Copyright (c) 2020 Aldo Hoeben / fieldOfView # OctoPrintPlugin is released under the terms of the AGPLv3 or higher. from cura.PrinterOutput.GenericOutputController import GenericOutputController class OctoPrintOutputController(GenericOutputController): def __init__(self, output_device: "PrinterOu...
# Copyright (c) 2020 Aldo Hoeben / fieldOfView # OctoPrintPlugin is released under the terms of the AGPLv3 or higher. from cura.PrinterOutput.GenericOutputController import GenericOutputController class OctoPrintOutputController(GenericOutputController): def __init__(self, output_device: "PrinterOutputDevice") ->...
# Copyright (c) 2020 Aldo Hoeben / fieldOfView # OctoPrintPlugin is released under the terms of the AGPLv3 or higher. from cura.PrinterOutput.GenericOutputController import GenericOutputController class OctoPrintOutputController(GenericOutputController): def __init__(self, output_device: "PrinterOutputDevice") ->...
<commit_before># Copyright (c) 2020 Aldo Hoeben / fieldOfView # OctoPrintPlugin is released under the terms of the AGPLv3 or higher. from cura.PrinterOutput.GenericOutputController import GenericOutputController class OctoPrintOutputController(GenericOutputController): def __init__(self, output_device: "PrinterOu...
51357755abe17adede5bbf7ccb3ba94c4ea701a9
src/libmv/multiview/panography_coeffs.py
src/libmv/multiview/panography_coeffs.py
import sympy f2, a12, a1, a2, b12, b1, b2 = sympy.symbols('f2 a12 a1 a2 b12 b1 b2') # Equation 12 from the brown paper; see panography.h equation_12 = ((a12 + f2)**2 * (b1 + f2) * (b2 + f2) - (b12 + f2)**2 * (a1 + f2) * (a2 + f2)) d = equation_12.as_poly(f2).as_dict() print ' // Coefficients in asce...
# Minimal Solutions for Panoramic Stitching. M. Brown, R. Hartley and D. Nister. # International Conference on Computer Vision and Pattern Recognition # (CVPR2007). Minneapolis, June 2007. import sympy f2, a12, a1, a2, b12, b1, b2 = sympy.symbols('f2 a12 a1 a2 b12 b1 b2') # Equation 12 from the brown paper; see pan...
Add xcas source code to obtain panography shared Focal polynomial solver.
Add xcas source code to obtain panography shared Focal polynomial solver.
Python
mit
petertsoi/libmv,libmv/libmv,SoylentGraham/libmv,libmv/libmv,SoylentGraham/libmv,rgkoo/libmv-blender,Nazg-Gul/libmv,Nazg-Gul/libmv,petertsoi/libmv,SoylentGraham/libmv,keir/libmv,keir/libmv,SoylentGraham/libmv,keir/libmv,rgkoo/libmv-blender,Nazg-Gul/libmv,libmv/libmv,rgkoo/libmv-blender,rgkoo/libmv-blender,Nazg-Gul/libmv...
import sympy f2, a12, a1, a2, b12, b1, b2 = sympy.symbols('f2 a12 a1 a2 b12 b1 b2') # Equation 12 from the brown paper; see panography.h equation_12 = ((a12 + f2)**2 * (b1 + f2) * (b2 + f2) - (b12 + f2)**2 * (a1 + f2) * (a2 + f2)) d = equation_12.as_poly(f2).as_dict() print ' // Coefficients in asce...
# Minimal Solutions for Panoramic Stitching. M. Brown, R. Hartley and D. Nister. # International Conference on Computer Vision and Pattern Recognition # (CVPR2007). Minneapolis, June 2007. import sympy f2, a12, a1, a2, b12, b1, b2 = sympy.symbols('f2 a12 a1 a2 b12 b1 b2') # Equation 12 from the brown paper; see pan...
<commit_before>import sympy f2, a12, a1, a2, b12, b1, b2 = sympy.symbols('f2 a12 a1 a2 b12 b1 b2') # Equation 12 from the brown paper; see panography.h equation_12 = ((a12 + f2)**2 * (b1 + f2) * (b2 + f2) - (b12 + f2)**2 * (a1 + f2) * (a2 + f2)) d = equation_12.as_poly(f2).as_dict() print ' // Coeff...
# Minimal Solutions for Panoramic Stitching. M. Brown, R. Hartley and D. Nister. # International Conference on Computer Vision and Pattern Recognition # (CVPR2007). Minneapolis, June 2007. import sympy f2, a12, a1, a2, b12, b1, b2 = sympy.symbols('f2 a12 a1 a2 b12 b1 b2') # Equation 12 from the brown paper; see pan...
import sympy f2, a12, a1, a2, b12, b1, b2 = sympy.symbols('f2 a12 a1 a2 b12 b1 b2') # Equation 12 from the brown paper; see panography.h equation_12 = ((a12 + f2)**2 * (b1 + f2) * (b2 + f2) - (b12 + f2)**2 * (a1 + f2) * (a2 + f2)) d = equation_12.as_poly(f2).as_dict() print ' // Coefficients in asce...
<commit_before>import sympy f2, a12, a1, a2, b12, b1, b2 = sympy.symbols('f2 a12 a1 a2 b12 b1 b2') # Equation 12 from the brown paper; see panography.h equation_12 = ((a12 + f2)**2 * (b1 + f2) * (b2 + f2) - (b12 + f2)**2 * (a1 + f2) * (a2 + f2)) d = equation_12.as_poly(f2).as_dict() print ' // Coeff...
4c9eeb2584408cd15803e1a6d980d4a73d49e73c
Software/Python/grove_sound_sensor.py
Software/Python/grove_sound_sensor.py
# GrovePi + Sound Sensor + LED # http://www.seeedstudio.com/wiki/Grove_-_Sound_Sensor # http://www.seeedstudio.com/wiki/Grove_-_LED_Socket_Kit import time import grovepi # Connect the Sound Sensor to analog port A0 sound_sensor = 0 # Connect the LED to digital port D5 led = 5 grovepi.pinMode(sound_sensor,"INPUT") g...
# GrovePi + Sound Sensor + LED # http://www.seeedstudio.com/wiki/Grove_-_Sound_Sensor # http://www.seeedstudio.com/wiki/Grove_-_LED_Socket_Kit import time import grovepi # Connect the Sound Sensor to analog port A0 sound_sensor = 0 # Connect the LED to digital port D5 led = 5 grovepi.pinMode(sound_sensor,"INPUT") g...
Fix typo on sound sensor example
Fix typo on sound sensor example
Python
mit
NeuroRoboticTech/Jetduino,penoud/GrovePi,stwolny/GrovePi,rpedersen/GrovePi,nerginer/GrovePi,nerginer/GrovePi,nerginer/GrovePi,NeuroRoboticTech/Jetduino,NeuroRoboticTech/Jetduino,stwolny/GrovePi,NeuroRoboticTech/Jetduino,rpedersen/GrovePi,karan259/GrovePi,stwolny/GrovePi,rpedersen/GrovePi,rpedersen/GrovePi,stwolny/Grove...
# GrovePi + Sound Sensor + LED # http://www.seeedstudio.com/wiki/Grove_-_Sound_Sensor # http://www.seeedstudio.com/wiki/Grove_-_LED_Socket_Kit import time import grovepi # Connect the Sound Sensor to analog port A0 sound_sensor = 0 # Connect the LED to digital port D5 led = 5 grovepi.pinMode(sound_sensor,"INPUT") g...
# GrovePi + Sound Sensor + LED # http://www.seeedstudio.com/wiki/Grove_-_Sound_Sensor # http://www.seeedstudio.com/wiki/Grove_-_LED_Socket_Kit import time import grovepi # Connect the Sound Sensor to analog port A0 sound_sensor = 0 # Connect the LED to digital port D5 led = 5 grovepi.pinMode(sound_sensor,"INPUT") g...
<commit_before># GrovePi + Sound Sensor + LED # http://www.seeedstudio.com/wiki/Grove_-_Sound_Sensor # http://www.seeedstudio.com/wiki/Grove_-_LED_Socket_Kit import time import grovepi # Connect the Sound Sensor to analog port A0 sound_sensor = 0 # Connect the LED to digital port D5 led = 5 grovepi.pinMode(sound_se...
# GrovePi + Sound Sensor + LED # http://www.seeedstudio.com/wiki/Grove_-_Sound_Sensor # http://www.seeedstudio.com/wiki/Grove_-_LED_Socket_Kit import time import grovepi # Connect the Sound Sensor to analog port A0 sound_sensor = 0 # Connect the LED to digital port D5 led = 5 grovepi.pinMode(sound_sensor,"INPUT") g...
# GrovePi + Sound Sensor + LED # http://www.seeedstudio.com/wiki/Grove_-_Sound_Sensor # http://www.seeedstudio.com/wiki/Grove_-_LED_Socket_Kit import time import grovepi # Connect the Sound Sensor to analog port A0 sound_sensor = 0 # Connect the LED to digital port D5 led = 5 grovepi.pinMode(sound_sensor,"INPUT") g...
<commit_before># GrovePi + Sound Sensor + LED # http://www.seeedstudio.com/wiki/Grove_-_Sound_Sensor # http://www.seeedstudio.com/wiki/Grove_-_LED_Socket_Kit import time import grovepi # Connect the Sound Sensor to analog port A0 sound_sensor = 0 # Connect the LED to digital port D5 led = 5 grovepi.pinMode(sound_se...
7f7d2a1ec73d3baee2373eef8de1eab93efc4ea9
ibmcnx/doc/Documentation.py
ibmcnx/doc/Documentation.py
###### # Create a file (html or markdown) with the output of # - JVMHeap # - LogFiles # - Ports # - Variables # # Author: Christoph Stoettner # Mail: christoph.stoettner@stoeps.de # Documentation: http://scripting101.stoeps.de # # Version: 2.0 # Date: 2014-06-08 ...
###### # Create a file (html or markdown) with the output of # - JVMHeap # - LogFiles # - Ports # - Variables # # Author: Christoph Stoettner # Mail: christoph.stoettner@stoeps.de # Documentation: http://scripting101.stoeps.de # # Version: 2.0 # Date: 2014-06-08 ...
Create script to save documentation to a file
4: Create script to save documentation to a file Task-Url: http://github.com/stoeps13/ibmcnx2/issues/issue/4
Python
apache-2.0
stoeps13/ibmcnx2,stoeps13/ibmcnx2
###### # Create a file (html or markdown) with the output of # - JVMHeap # - LogFiles # - Ports # - Variables # # Author: Christoph Stoettner # Mail: christoph.stoettner@stoeps.de # Documentation: http://scripting101.stoeps.de # # Version: 2.0 # Date: 2014-06-08 ...
###### # Create a file (html or markdown) with the output of # - JVMHeap # - LogFiles # - Ports # - Variables # # Author: Christoph Stoettner # Mail: christoph.stoettner@stoeps.de # Documentation: http://scripting101.stoeps.de # # Version: 2.0 # Date: 2014-06-08 ...
<commit_before>###### # Create a file (html or markdown) with the output of # - JVMHeap # - LogFiles # - Ports # - Variables # # Author: Christoph Stoettner # Mail: christoph.stoettner@stoeps.de # Documentation: http://scripting101.stoeps.de # # Version: 2.0 # Date: ...
###### # Create a file (html or markdown) with the output of # - JVMHeap # - LogFiles # - Ports # - Variables # # Author: Christoph Stoettner # Mail: christoph.stoettner@stoeps.de # Documentation: http://scripting101.stoeps.de # # Version: 2.0 # Date: 2014-06-08 ...
###### # Create a file (html or markdown) with the output of # - JVMHeap # - LogFiles # - Ports # - Variables # # Author: Christoph Stoettner # Mail: christoph.stoettner@stoeps.de # Documentation: http://scripting101.stoeps.de # # Version: 2.0 # Date: 2014-06-08 ...
<commit_before>###### # Create a file (html or markdown) with the output of # - JVMHeap # - LogFiles # - Ports # - Variables # # Author: Christoph Stoettner # Mail: christoph.stoettner@stoeps.de # Documentation: http://scripting101.stoeps.de # # Version: 2.0 # Date: ...
3fb0f567dcaf69e4fa9872702ffbfa8ab0e69eaf
lib/utilities/key_exists.py
lib/utilities/key_exists.py
def key_exists(search_key, inputed_dict): ''' Given a search key which is dot notated return wether or not that key exists in a dictionary ''' num_levels = search_key.split(".") if len(num_levels) == 0: return False current_pointer = inputed_dict for updated_key in num_levels: ...
def key_exists(search_key, inputed_dict): ''' Given a search key which is dot notated return wether or not that key exists in a dictionary ''' num_levels = search_key.split(".") if len(num_levels) == 0: return False current_pointer = inputed_dict for updated_key in num_levels: ...
Add more error handling to key exists
Add more error handling to key exists
Python
mpl-2.0
mpurzynski/MozDef,mozilla/MozDef,jeffbryner/MozDef,mozilla/MozDef,jeffbryner/MozDef,Phrozyn/MozDef,gdestuynder/MozDef,jeffbryner/MozDef,Phrozyn/MozDef,Phrozyn/MozDef,mpurzynski/MozDef,Phrozyn/MozDef,mpurzynski/MozDef,mozilla/MozDef,mozilla/MozDef,gdestuynder/MozDef,gdestuynder/MozDef,gdestuynder/MozDef,mpurzynski/MozDe...
def key_exists(search_key, inputed_dict): ''' Given a search key which is dot notated return wether or not that key exists in a dictionary ''' num_levels = search_key.split(".") if len(num_levels) == 0: return False current_pointer = inputed_dict for updated_key in num_levels: ...
def key_exists(search_key, inputed_dict): ''' Given a search key which is dot notated return wether or not that key exists in a dictionary ''' num_levels = search_key.split(".") if len(num_levels) == 0: return False current_pointer = inputed_dict for updated_key in num_levels: ...
<commit_before> def key_exists(search_key, inputed_dict): ''' Given a search key which is dot notated return wether or not that key exists in a dictionary ''' num_levels = search_key.split(".") if len(num_levels) == 0: return False current_pointer = inputed_dict for updated_key i...
def key_exists(search_key, inputed_dict): ''' Given a search key which is dot notated return wether or not that key exists in a dictionary ''' num_levels = search_key.split(".") if len(num_levels) == 0: return False current_pointer = inputed_dict for updated_key in num_levels: ...
def key_exists(search_key, inputed_dict): ''' Given a search key which is dot notated return wether or not that key exists in a dictionary ''' num_levels = search_key.split(".") if len(num_levels) == 0: return False current_pointer = inputed_dict for updated_key in num_levels: ...
<commit_before> def key_exists(search_key, inputed_dict): ''' Given a search key which is dot notated return wether or not that key exists in a dictionary ''' num_levels = search_key.split(".") if len(num_levels) == 0: return False current_pointer = inputed_dict for updated_key i...
a3ab513306614393f901e4991886ba93b6ed26a3
cardboard/frontend/testing.py
cardboard/frontend/testing.py
""" A frontend for use when testing. """ import contextlib from twisted.python import log from zope.interface import implements from cardboard.frontend import FrontendMixin, IFrontend def mock_selector(name): selections = [()] @contextlib.contextmanager def will_return(*selection): selection...
""" A frontend for use when testing. """ import contextlib from twisted.python import log from zope.interface import implements from cardboard.frontend import FrontendMixin, IFrontend def mock_selector(name): selections = [()] @contextlib.contextmanager def will_return(*selection): selection...
Make TestingFrontend not blow up from info and move select to TestingSelector.
Make TestingFrontend not blow up from info and move select to TestingSelector.
Python
mit
Julian/cardboard,Julian/cardboard
""" A frontend for use when testing. """ import contextlib from twisted.python import log from zope.interface import implements from cardboard.frontend import FrontendMixin, IFrontend def mock_selector(name): selections = [()] @contextlib.contextmanager def will_return(*selection): selection...
""" A frontend for use when testing. """ import contextlib from twisted.python import log from zope.interface import implements from cardboard.frontend import FrontendMixin, IFrontend def mock_selector(name): selections = [()] @contextlib.contextmanager def will_return(*selection): selection...
<commit_before>""" A frontend for use when testing. """ import contextlib from twisted.python import log from zope.interface import implements from cardboard.frontend import FrontendMixin, IFrontend def mock_selector(name): selections = [()] @contextlib.contextmanager def will_return(*selection): ...
""" A frontend for use when testing. """ import contextlib from twisted.python import log from zope.interface import implements from cardboard.frontend import FrontendMixin, IFrontend def mock_selector(name): selections = [()] @contextlib.contextmanager def will_return(*selection): selection...
""" A frontend for use when testing. """ import contextlib from twisted.python import log from zope.interface import implements from cardboard.frontend import FrontendMixin, IFrontend def mock_selector(name): selections = [()] @contextlib.contextmanager def will_return(*selection): selection...
<commit_before>""" A frontend for use when testing. """ import contextlib from twisted.python import log from zope.interface import implements from cardboard.frontend import FrontendMixin, IFrontend def mock_selector(name): selections = [()] @contextlib.contextmanager def will_return(*selection): ...
b56c5ca12f9806ecedc531e1f00ec1d7f2162b46
src-django/authentication/urls.py
src-django/authentication/urls.py
from django.conf.urls import url from views import login, logout, signup urlpatterns = [ url(r'^login', login), url(r'^logout', logout), url(r'^signup', signup), ]
from django.conf.urls import url from views import login, logout, signup, confirm_email urlpatterns = [ url(r'^login', login), url(r'^logout', logout), url(r'^signup', signup), url(r'^confirm_email/(?P<key>\w+)', confirm_email), ]
Add an endpoint for email confirmation
Add an endpoint for email confirmation
Python
bsd-3-clause
SanaMobile/sana.protocol_builder,SanaMobile/sana.protocol_builder,SanaMobile/sana.protocol_builder,SanaMobile/sana.protocol_builder,SanaMobile/sana.protocol_builder
from django.conf.urls import url from views import login, logout, signup urlpatterns = [ url(r'^login', login), url(r'^logout', logout), url(r'^signup', signup), ] Add an endpoint for email confirmation
from django.conf.urls import url from views import login, logout, signup, confirm_email urlpatterns = [ url(r'^login', login), url(r'^logout', logout), url(r'^signup', signup), url(r'^confirm_email/(?P<key>\w+)', confirm_email), ]
<commit_before>from django.conf.urls import url from views import login, logout, signup urlpatterns = [ url(r'^login', login), url(r'^logout', logout), url(r'^signup', signup), ] <commit_msg>Add an endpoint for email confirmation<commit_after>
from django.conf.urls import url from views import login, logout, signup, confirm_email urlpatterns = [ url(r'^login', login), url(r'^logout', logout), url(r'^signup', signup), url(r'^confirm_email/(?P<key>\w+)', confirm_email), ]
from django.conf.urls import url from views import login, logout, signup urlpatterns = [ url(r'^login', login), url(r'^logout', logout), url(r'^signup', signup), ] Add an endpoint for email confirmationfrom django.conf.urls import url from views import login, logout, signup, confirm_email urlpatterns ...
<commit_before>from django.conf.urls import url from views import login, logout, signup urlpatterns = [ url(r'^login', login), url(r'^logout', logout), url(r'^signup', signup), ] <commit_msg>Add an endpoint for email confirmation<commit_after>from django.conf.urls import url from views import login, log...
2f71ee89ab4f268518dc772af5755cca35976c4b
winthrop/annotation/models.py
winthrop/annotation/models.py
from django.db import models from annotator_store.models import BaseAnnotation from djiffy.models import IfPage from winthrop.people.models import Person # NOTE: needs to be different name than Annotation due to reverse rel issues... class Annotation(BaseAnnotation): # NOTE: do we want to associate explicitly wit...
from urllib.parse import urlparse from django.db import models from django.urls import resolve, Resolver404 from annotator_store.models import BaseAnnotation from djiffy.models import IfPage from winthrop.people.models import Person class Annotation(BaseAnnotation): # NOTE: do we want to associate explicitly with...
Add canvas lookup by url to associate annotations with iiif canvas uri
Add canvas lookup by url to associate annotations with iiif canvas uri
Python
apache-2.0
Princeton-CDH/winthrop-django,Princeton-CDH/winthrop-django,Princeton-CDH/winthrop-django
from django.db import models from annotator_store.models import BaseAnnotation from djiffy.models import IfPage from winthrop.people.models import Person # NOTE: needs to be different name than Annotation due to reverse rel issues... class Annotation(BaseAnnotation): # NOTE: do we want to associate explicitly wit...
from urllib.parse import urlparse from django.db import models from django.urls import resolve, Resolver404 from annotator_store.models import BaseAnnotation from djiffy.models import IfPage from winthrop.people.models import Person class Annotation(BaseAnnotation): # NOTE: do we want to associate explicitly with...
<commit_before>from django.db import models from annotator_store.models import BaseAnnotation from djiffy.models import IfPage from winthrop.people.models import Person # NOTE: needs to be different name than Annotation due to reverse rel issues... class Annotation(BaseAnnotation): # NOTE: do we want to associate...
from urllib.parse import urlparse from django.db import models from django.urls import resolve, Resolver404 from annotator_store.models import BaseAnnotation from djiffy.models import IfPage from winthrop.people.models import Person class Annotation(BaseAnnotation): # NOTE: do we want to associate explicitly with...
from django.db import models from annotator_store.models import BaseAnnotation from djiffy.models import IfPage from winthrop.people.models import Person # NOTE: needs to be different name than Annotation due to reverse rel issues... class Annotation(BaseAnnotation): # NOTE: do we want to associate explicitly wit...
<commit_before>from django.db import models from annotator_store.models import BaseAnnotation from djiffy.models import IfPage from winthrop.people.models import Person # NOTE: needs to be different name than Annotation due to reverse rel issues... class Annotation(BaseAnnotation): # NOTE: do we want to associate...
ff4c5d14d849db72f3af92bc87ccfc6626ef8744
reporting/job.py
reporting/job.py
#!/usr/bin/env python3 from dateutil import parser class Job: def __init__(self, category, id, status, start_timestamp, finish_timestamp, duration): self.tool_id = category.tool self.type_id = category.context self.id = id self.status_bit = int(status) self.start_timestamp ...
#!/usr/bin/env python3 from dateutil import parser class Job: def __init__(self, category, id, status, start_timestamp, finish_timestamp, duration = None): self.tool_id = category.tool self.type_id = category.context self.id = id self.status_bit = int(status) self.start_tim...
Make duration optional to create a Job
Make duration optional to create a Job
Python
mit
luigiberrettini/build-deploy-stats
#!/usr/bin/env python3 from dateutil import parser class Job: def __init__(self, category, id, status, start_timestamp, finish_timestamp, duration): self.tool_id = category.tool self.type_id = category.context self.id = id self.status_bit = int(status) self.start_timestamp ...
#!/usr/bin/env python3 from dateutil import parser class Job: def __init__(self, category, id, status, start_timestamp, finish_timestamp, duration = None): self.tool_id = category.tool self.type_id = category.context self.id = id self.status_bit = int(status) self.start_tim...
<commit_before>#!/usr/bin/env python3 from dateutil import parser class Job: def __init__(self, category, id, status, start_timestamp, finish_timestamp, duration): self.tool_id = category.tool self.type_id = category.context self.id = id self.status_bit = int(status) self.s...
#!/usr/bin/env python3 from dateutil import parser class Job: def __init__(self, category, id, status, start_timestamp, finish_timestamp, duration = None): self.tool_id = category.tool self.type_id = category.context self.id = id self.status_bit = int(status) self.start_tim...
#!/usr/bin/env python3 from dateutil import parser class Job: def __init__(self, category, id, status, start_timestamp, finish_timestamp, duration): self.tool_id = category.tool self.type_id = category.context self.id = id self.status_bit = int(status) self.start_timestamp ...
<commit_before>#!/usr/bin/env python3 from dateutil import parser class Job: def __init__(self, category, id, status, start_timestamp, finish_timestamp, duration): self.tool_id = category.tool self.type_id = category.context self.id = id self.status_bit = int(status) self.s...
c162514291428f26dc78d08393455ff33fe12f12
requests_test.py
requests_test.py
import requests from requests.auth import HTTPBasicAuth import secret parameters = 'teamstats' response = requests.get('https://www.mysportsfeeds.com/api/feed/pull/nfl/2016-2017-regular/playoff_team_standings.json?teamstats', auth=HTTPBasicAuth(secret.msf_username, secret.msf_pw)) print(respo...
import requests from requests.auth import HTTPBasicAuth import secret parameters = 'teamstats' response = requests.get('https://www.mysportsfeeds.com/api/feed/pull/nfl/2016-2017-regular/playoff_team_standings.json?teamstats', auth=HTTPBasicAuth(secret.msf_username, secret.msf_pw)) print(respo...
Clean up file and remove notes now that parameters in API feed are working
Clean up file and remove notes now that parameters in API feed are working
Python
mit
prcutler/nflpool,prcutler/nflpool
import requests from requests.auth import HTTPBasicAuth import secret parameters = 'teamstats' response = requests.get('https://www.mysportsfeeds.com/api/feed/pull/nfl/2016-2017-regular/playoff_team_standings.json?teamstats', auth=HTTPBasicAuth(secret.msf_username, secret.msf_pw)) print(respo...
import requests from requests.auth import HTTPBasicAuth import secret parameters = 'teamstats' response = requests.get('https://www.mysportsfeeds.com/api/feed/pull/nfl/2016-2017-regular/playoff_team_standings.json?teamstats', auth=HTTPBasicAuth(secret.msf_username, secret.msf_pw)) print(respo...
<commit_before>import requests from requests.auth import HTTPBasicAuth import secret parameters = 'teamstats' response = requests.get('https://www.mysportsfeeds.com/api/feed/pull/nfl/2016-2017-regular/playoff_team_standings.json?teamstats', auth=HTTPBasicAuth(secret.msf_username, secret.msf_pw...
import requests from requests.auth import HTTPBasicAuth import secret parameters = 'teamstats' response = requests.get('https://www.mysportsfeeds.com/api/feed/pull/nfl/2016-2017-regular/playoff_team_standings.json?teamstats', auth=HTTPBasicAuth(secret.msf_username, secret.msf_pw)) print(respo...
import requests from requests.auth import HTTPBasicAuth import secret parameters = 'teamstats' response = requests.get('https://www.mysportsfeeds.com/api/feed/pull/nfl/2016-2017-regular/playoff_team_standings.json?teamstats', auth=HTTPBasicAuth(secret.msf_username, secret.msf_pw)) print(respo...
<commit_before>import requests from requests.auth import HTTPBasicAuth import secret parameters = 'teamstats' response = requests.get('https://www.mysportsfeeds.com/api/feed/pull/nfl/2016-2017-regular/playoff_team_standings.json?teamstats', auth=HTTPBasicAuth(secret.msf_username, secret.msf_pw...
0ff15389ef24862f4f1b5b8923d6ca057018ae1a
polling_stations/apps/pollingstations/migrations/0010_auto_20160417_1416.py
polling_stations/apps/pollingstations/migrations/0010_auto_20160417_1416.py
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('pollingstations', '0006_residentialaddress_slug'), ] operations = [ migrations.AlterUniqueTogether( name='pollin...
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('pollingstations', '0009_customfinder'), ] operations = [ migrations.AlterUniqueTogether( name='pollingdistrict',...
Edit migration so it depends on 0009_customfinder
Edit migration so it depends on 0009_customfinder Ensure the migrations will apply correctly without conflcit once merged Merging this branch is now blocked on PR #240
Python
bsd-3-clause
DemocracyClub/UK-Polling-Stations,andylolz/UK-Polling-Stations,chris48s/UK-Polling-Stations,andylolz/UK-Polling-Stations,chris48s/UK-Polling-Stations,DemocracyClub/UK-Polling-Stations,andylolz/UK-Polling-Stations,DemocracyClub/UK-Polling-Stations,chris48s/UK-Polling-Stations
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('pollingstations', '0006_residentialaddress_slug'), ] operations = [ migrations.AlterUniqueTogether( name='pollin...
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('pollingstations', '0009_customfinder'), ] operations = [ migrations.AlterUniqueTogether( name='pollingdistrict',...
<commit_before># -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('pollingstations', '0006_residentialaddress_slug'), ] operations = [ migrations.AlterUniqueTogether( ...
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('pollingstations', '0009_customfinder'), ] operations = [ migrations.AlterUniqueTogether( name='pollingdistrict',...
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('pollingstations', '0006_residentialaddress_slug'), ] operations = [ migrations.AlterUniqueTogether( name='pollin...
<commit_before># -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('pollingstations', '0006_residentialaddress_slug'), ] operations = [ migrations.AlterUniqueTogether( ...
b39bf8ba3fc3d2037a293db7d5856d02ac047a31
nbt/__init__.py
nbt/__init__.py
from nbt import * VERSION = (1, 1) def _get_version(): return ".".join(VERSION)
__all__ = ["chunk", "region", "nbt"] from . import * VERSION = (1, 1) def _get_version(): return ".".join(VERSION)
Use relative import (required for Python 3, supported in 2.6 or higher)
Use relative import (required for Python 3, supported in 2.6 or higher)
Python
mit
macfreek/NBT,twoolie/NBT,fwaggle/NBT,devmario/NBT,cburschka/NBT
from nbt import * VERSION = (1, 1) def _get_version(): return ".".join(VERSION)Use relative import (required for Python 3, supported in 2.6 or higher)
__all__ = ["chunk", "region", "nbt"] from . import * VERSION = (1, 1) def _get_version(): return ".".join(VERSION)
<commit_before>from nbt import * VERSION = (1, 1) def _get_version(): return ".".join(VERSION)<commit_msg>Use relative import (required for Python 3, supported in 2.6 or higher)<commit_after>
__all__ = ["chunk", "region", "nbt"] from . import * VERSION = (1, 1) def _get_version(): return ".".join(VERSION)
from nbt import * VERSION = (1, 1) def _get_version(): return ".".join(VERSION)Use relative import (required for Python 3, supported in 2.6 or higher)__all__ = ["chunk", "region", "nbt"] from . import * VERSION = (1, 1) def _get_version(): return ".".join(VERSION)
<commit_before>from nbt import * VERSION = (1, 1) def _get_version(): return ".".join(VERSION)<commit_msg>Use relative import (required for Python 3, supported in 2.6 or higher)<commit_after>__all__ = ["chunk", "region", "nbt"] from . import * VERSION = (1, 1) def _get_version(): return ".".join(VERSION)