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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
bcb383612625d9a59f9e5b4174e44700b26bd0e5 | crosscompute/macros/security.py | crosscompute/macros/security.py | from datetime import datetime, timedelta
from invisibleroads_macros_security import make_random_string
class DictionarySafe(dict):
def __init__(self, key_length):
self.key_length = key_length
def put(self, value, time_in_seconds=None):
while True:
key = make_random_string(self.k... | from datetime import datetime, timedelta
from invisibleroads_macros_security import make_random_string
class DictionarySafe(dict):
def __init__(self, key_length):
self.key_length = key_length
def put(self, value, time_in_seconds=None):
while True:
key = make_random_string(self.k... | Support case when expiration_datetime is None | Support case when expiration_datetime is None
| Python | mit | crosscompute/crosscompute,crosscompute/crosscompute,crosscompute/crosscompute,crosscompute/crosscompute | from datetime import datetime, timedelta
from invisibleroads_macros_security import make_random_string
class DictionarySafe(dict):
def __init__(self, key_length):
self.key_length = key_length
def put(self, value, time_in_seconds=None):
while True:
key = make_random_string(self.k... | from datetime import datetime, timedelta
from invisibleroads_macros_security import make_random_string
class DictionarySafe(dict):
def __init__(self, key_length):
self.key_length = key_length
def put(self, value, time_in_seconds=None):
while True:
key = make_random_string(self.k... | <commit_before>from datetime import datetime, timedelta
from invisibleroads_macros_security import make_random_string
class DictionarySafe(dict):
def __init__(self, key_length):
self.key_length = key_length
def put(self, value, time_in_seconds=None):
while True:
key = make_rando... | from datetime import datetime, timedelta
from invisibleroads_macros_security import make_random_string
class DictionarySafe(dict):
def __init__(self, key_length):
self.key_length = key_length
def put(self, value, time_in_seconds=None):
while True:
key = make_random_string(self.k... | from datetime import datetime, timedelta
from invisibleroads_macros_security import make_random_string
class DictionarySafe(dict):
def __init__(self, key_length):
self.key_length = key_length
def put(self, value, time_in_seconds=None):
while True:
key = make_random_string(self.k... | <commit_before>from datetime import datetime, timedelta
from invisibleroads_macros_security import make_random_string
class DictionarySafe(dict):
def __init__(self, key_length):
self.key_length = key_length
def put(self, value, time_in_seconds=None):
while True:
key = make_rando... |
e868cf738f2fb994f22364fa8306045c6995a2b1 | settings.py | settings.py | RESOURCE_METHODS = ['GET', 'POST', 'DELETE']
ITEM_METHODS = ['GET', 'PATCH', 'PUT', 'DELETE']
schema = {
'name': {
'type': 'string',
'minlength': 3,
'maxlength': 50,
'required': True,
},
'date': {
'type': 'datetime',
},
'reference': {
'type': 'string'... | RESOURCE_METHODS = ['GET', 'POST', 'DELETE']
ITEM_METHODS = ['GET', 'PATCH', 'PUT', 'DELETE']
schema = {
'name': {
'type': 'string',
'minlength': 3,
'maxlength': 50,
'required': True,
},
'datetime': {
'type': 'datetime',
},
'reference': {
'type': 'str... | Change name of date to datetime | Change name of date to datetime
| Python | mit | waoliveros/historia | RESOURCE_METHODS = ['GET', 'POST', 'DELETE']
ITEM_METHODS = ['GET', 'PATCH', 'PUT', 'DELETE']
schema = {
'name': {
'type': 'string',
'minlength': 3,
'maxlength': 50,
'required': True,
},
'date': {
'type': 'datetime',
},
'reference': {
'type': 'string'... | RESOURCE_METHODS = ['GET', 'POST', 'DELETE']
ITEM_METHODS = ['GET', 'PATCH', 'PUT', 'DELETE']
schema = {
'name': {
'type': 'string',
'minlength': 3,
'maxlength': 50,
'required': True,
},
'datetime': {
'type': 'datetime',
},
'reference': {
'type': 'str... | <commit_before>RESOURCE_METHODS = ['GET', 'POST', 'DELETE']
ITEM_METHODS = ['GET', 'PATCH', 'PUT', 'DELETE']
schema = {
'name': {
'type': 'string',
'minlength': 3,
'maxlength': 50,
'required': True,
},
'date': {
'type': 'datetime',
},
'reference': {
'... | RESOURCE_METHODS = ['GET', 'POST', 'DELETE']
ITEM_METHODS = ['GET', 'PATCH', 'PUT', 'DELETE']
schema = {
'name': {
'type': 'string',
'minlength': 3,
'maxlength': 50,
'required': True,
},
'datetime': {
'type': 'datetime',
},
'reference': {
'type': 'str... | RESOURCE_METHODS = ['GET', 'POST', 'DELETE']
ITEM_METHODS = ['GET', 'PATCH', 'PUT', 'DELETE']
schema = {
'name': {
'type': 'string',
'minlength': 3,
'maxlength': 50,
'required': True,
},
'date': {
'type': 'datetime',
},
'reference': {
'type': 'string'... | <commit_before>RESOURCE_METHODS = ['GET', 'POST', 'DELETE']
ITEM_METHODS = ['GET', 'PATCH', 'PUT', 'DELETE']
schema = {
'name': {
'type': 'string',
'minlength': 3,
'maxlength': 50,
'required': True,
},
'date': {
'type': 'datetime',
},
'reference': {
'... |
4bcb7efc2c95280323995cb0de27cf6449f060b8 | external_tools/src/main/python/images/common.py | external_tools/src/main/python/images/common.py | #!/usr/bin/python
splitString='images/clean/impc/' | #!/usr/bin/python
#splitString='images/clean/impc/'
splitString='images/holding_area/impc/'
| Change to use holding_area directory | Change to use holding_area directory
| Python | apache-2.0 | mpi2/PhenotypeData,mpi2/PhenotypeData,mpi2/PhenotypeData,mpi2/PhenotypeData,mpi2/PhenotypeData,mpi2/PhenotypeData | #!/usr/bin/python
splitString='images/clean/impc/'Change to use holding_area directory | #!/usr/bin/python
#splitString='images/clean/impc/'
splitString='images/holding_area/impc/'
| <commit_before>#!/usr/bin/python
splitString='images/clean/impc/'<commit_msg>Change to use holding_area directory<commit_after> | #!/usr/bin/python
#splitString='images/clean/impc/'
splitString='images/holding_area/impc/'
| #!/usr/bin/python
splitString='images/clean/impc/'Change to use holding_area directory#!/usr/bin/python
#splitString='images/clean/impc/'
splitString='images/holding_area/impc/'
| <commit_before>#!/usr/bin/python
splitString='images/clean/impc/'<commit_msg>Change to use holding_area directory<commit_after>#!/usr/bin/python
#splitString='images/clean/impc/'
splitString='images/holding_area/impc/'
|
7db970b508c9d7ea3d659fe8b2fa5a852f16abd1 | tcconfig/_common.py | tcconfig/_common.py | # encoding: utf-8
"""
.. codeauthor:: Tsuyoshi Hombashi <[email protected]>
"""
from __future__ import absolute_import
import dataproperty
import six
from ._error import NetworkInterfaceNotFoundError
def verify_network_interface(device):
try:
import netifaces
except ImportError:
return
... | # encoding: utf-8
"""
.. codeauthor:: Tsuyoshi Hombashi <[email protected]>
"""
from __future__ import absolute_import
import dataproperty
import six
from ._error import NetworkInterfaceNotFoundError
def verify_network_interface(device):
try:
import netifaces
except ImportError:
return
... | Add special case for "anywhere" | Add special case for "anywhere"
| Python | mit | thombashi/tcconfig,thombashi/tcconfig | # encoding: utf-8
"""
.. codeauthor:: Tsuyoshi Hombashi <[email protected]>
"""
from __future__ import absolute_import
import dataproperty
import six
from ._error import NetworkInterfaceNotFoundError
def verify_network_interface(device):
try:
import netifaces
except ImportError:
return
... | # encoding: utf-8
"""
.. codeauthor:: Tsuyoshi Hombashi <[email protected]>
"""
from __future__ import absolute_import
import dataproperty
import six
from ._error import NetworkInterfaceNotFoundError
def verify_network_interface(device):
try:
import netifaces
except ImportError:
return
... | <commit_before># encoding: utf-8
"""
.. codeauthor:: Tsuyoshi Hombashi <[email protected]>
"""
from __future__ import absolute_import
import dataproperty
import six
from ._error import NetworkInterfaceNotFoundError
def verify_network_interface(device):
try:
import netifaces
except ImportError:
... | # encoding: utf-8
"""
.. codeauthor:: Tsuyoshi Hombashi <[email protected]>
"""
from __future__ import absolute_import
import dataproperty
import six
from ._error import NetworkInterfaceNotFoundError
def verify_network_interface(device):
try:
import netifaces
except ImportError:
return
... | # encoding: utf-8
"""
.. codeauthor:: Tsuyoshi Hombashi <[email protected]>
"""
from __future__ import absolute_import
import dataproperty
import six
from ._error import NetworkInterfaceNotFoundError
def verify_network_interface(device):
try:
import netifaces
except ImportError:
return
... | <commit_before># encoding: utf-8
"""
.. codeauthor:: Tsuyoshi Hombashi <[email protected]>
"""
from __future__ import absolute_import
import dataproperty
import six
from ._error import NetworkInterfaceNotFoundError
def verify_network_interface(device):
try:
import netifaces
except ImportError:
... |
384cb60a488b03ac992c3496658c299f3393b807 | tests/TestConfigFileLoading.py | tests/TestConfigFileLoading.py | import unittest
import src
import sys
from io import StringIO
class TestConfigFileLoading(unittest.TestCase):
filepath_prefix = ''
@classmethod
def setUpClass(cls):
if sys.argv[0].endswith('nosetests'):
cls.filepath_prefix = "./resources/config/"
else:
cls.filepat... | import unittest
import src
import sys
from io import StringIO
class TestConfigFileLoading(unittest.TestCase):
filepath_prefix = ''
@classmethod
def setUpClass(cls):
if sys.argv[0].endswith('nosetests'):
cls.filepath_prefix = "./resources/config/"
else:
cls.filepat... | Make test names lower case prefix | Make test names lower case prefix
| Python | bsd-3-clause | sky-uk/bslint | import unittest
import src
import sys
from io import StringIO
class TestConfigFileLoading(unittest.TestCase):
filepath_prefix = ''
@classmethod
def setUpClass(cls):
if sys.argv[0].endswith('nosetests'):
cls.filepath_prefix = "./resources/config/"
else:
cls.filepat... | import unittest
import src
import sys
from io import StringIO
class TestConfigFileLoading(unittest.TestCase):
filepath_prefix = ''
@classmethod
def setUpClass(cls):
if sys.argv[0].endswith('nosetests'):
cls.filepath_prefix = "./resources/config/"
else:
cls.filepat... | <commit_before>import unittest
import src
import sys
from io import StringIO
class TestConfigFileLoading(unittest.TestCase):
filepath_prefix = ''
@classmethod
def setUpClass(cls):
if sys.argv[0].endswith('nosetests'):
cls.filepath_prefix = "./resources/config/"
else:
... | import unittest
import src
import sys
from io import StringIO
class TestConfigFileLoading(unittest.TestCase):
filepath_prefix = ''
@classmethod
def setUpClass(cls):
if sys.argv[0].endswith('nosetests'):
cls.filepath_prefix = "./resources/config/"
else:
cls.filepat... | import unittest
import src
import sys
from io import StringIO
class TestConfigFileLoading(unittest.TestCase):
filepath_prefix = ''
@classmethod
def setUpClass(cls):
if sys.argv[0].endswith('nosetests'):
cls.filepath_prefix = "./resources/config/"
else:
cls.filepat... | <commit_before>import unittest
import src
import sys
from io import StringIO
class TestConfigFileLoading(unittest.TestCase):
filepath_prefix = ''
@classmethod
def setUpClass(cls):
if sys.argv[0].endswith('nosetests'):
cls.filepath_prefix = "./resources/config/"
else:
... |
9495a43e0797d1a089df644663900957cadc3ac0 | tests/agents_tests/test_iqn.py | tests/agents_tests/test_iqn.py | from __future__ import unicode_literals
from __future__ import print_function
from __future__ import division
from __future__ import absolute_import
from future import standard_library
from builtins import * # NOQA
standard_library.install_aliases() # NOQA
import chainer.functions as F
import chainer.links as L
imp... | from __future__ import unicode_literals
from __future__ import print_function
from __future__ import division
from __future__ import absolute_import
from future import standard_library
from builtins import * # NOQA
standard_library.install_aliases() # NOQA
import chainer.functions as F
import chainer.links as L
from... | Test multiple values of N and N_prime | Test multiple values of N and N_prime
| Python | mit | toslunar/chainerrl,toslunar/chainerrl | from __future__ import unicode_literals
from __future__ import print_function
from __future__ import division
from __future__ import absolute_import
from future import standard_library
from builtins import * # NOQA
standard_library.install_aliases() # NOQA
import chainer.functions as F
import chainer.links as L
imp... | from __future__ import unicode_literals
from __future__ import print_function
from __future__ import division
from __future__ import absolute_import
from future import standard_library
from builtins import * # NOQA
standard_library.install_aliases() # NOQA
import chainer.functions as F
import chainer.links as L
from... | <commit_before>from __future__ import unicode_literals
from __future__ import print_function
from __future__ import division
from __future__ import absolute_import
from future import standard_library
from builtins import * # NOQA
standard_library.install_aliases() # NOQA
import chainer.functions as F
import chainer.... | from __future__ import unicode_literals
from __future__ import print_function
from __future__ import division
from __future__ import absolute_import
from future import standard_library
from builtins import * # NOQA
standard_library.install_aliases() # NOQA
import chainer.functions as F
import chainer.links as L
from... | from __future__ import unicode_literals
from __future__ import print_function
from __future__ import division
from __future__ import absolute_import
from future import standard_library
from builtins import * # NOQA
standard_library.install_aliases() # NOQA
import chainer.functions as F
import chainer.links as L
imp... | <commit_before>from __future__ import unicode_literals
from __future__ import print_function
from __future__ import division
from __future__ import absolute_import
from future import standard_library
from builtins import * # NOQA
standard_library.install_aliases() # NOQA
import chainer.functions as F
import chainer.... |
7882831c7a027e778c9f14679c3a5639ca3ae29d | snipts/admin.py | snipts/admin.py | from django.contrib import admin
from snipts.models import Favorite, Snipt
class SniptAdmin(admin.ModelAdmin):
readonly_fields = ('user',)
list_display = ('title', 'slug', 'user', 'lexer', 'public', 'created', 'modified',)
search_fields = ('title', 'user__username', 'lexer', 'id',)
ordering = ('-creat... | from django.contrib import admin
from snipts.models import Favorite, Snipt
class SniptAdmin(admin.ModelAdmin):
readonly_fields = ('user',)
list_display = ('title', 'slug', 'user', 'lexer', 'public', 'created', 'modified',)
search_fields = ('title', 'user__username', 'lexer', 'id', 'key',)
ordering = (... | Allow searching keys on snipts | Allow searching keys on snipts
| Python | mit | nicksergeant/snipt,nicksergeant/snipt,nicksergeant/snipt | from django.contrib import admin
from snipts.models import Favorite, Snipt
class SniptAdmin(admin.ModelAdmin):
readonly_fields = ('user',)
list_display = ('title', 'slug', 'user', 'lexer', 'public', 'created', 'modified',)
search_fields = ('title', 'user__username', 'lexer', 'id',)
ordering = ('-creat... | from django.contrib import admin
from snipts.models import Favorite, Snipt
class SniptAdmin(admin.ModelAdmin):
readonly_fields = ('user',)
list_display = ('title', 'slug', 'user', 'lexer', 'public', 'created', 'modified',)
search_fields = ('title', 'user__username', 'lexer', 'id', 'key',)
ordering = (... | <commit_before>from django.contrib import admin
from snipts.models import Favorite, Snipt
class SniptAdmin(admin.ModelAdmin):
readonly_fields = ('user',)
list_display = ('title', 'slug', 'user', 'lexer', 'public', 'created', 'modified',)
search_fields = ('title', 'user__username', 'lexer', 'id',)
orde... | from django.contrib import admin
from snipts.models import Favorite, Snipt
class SniptAdmin(admin.ModelAdmin):
readonly_fields = ('user',)
list_display = ('title', 'slug', 'user', 'lexer', 'public', 'created', 'modified',)
search_fields = ('title', 'user__username', 'lexer', 'id', 'key',)
ordering = (... | from django.contrib import admin
from snipts.models import Favorite, Snipt
class SniptAdmin(admin.ModelAdmin):
readonly_fields = ('user',)
list_display = ('title', 'slug', 'user', 'lexer', 'public', 'created', 'modified',)
search_fields = ('title', 'user__username', 'lexer', 'id',)
ordering = ('-creat... | <commit_before>from django.contrib import admin
from snipts.models import Favorite, Snipt
class SniptAdmin(admin.ModelAdmin):
readonly_fields = ('user',)
list_display = ('title', 'slug', 'user', 'lexer', 'public', 'created', 'modified',)
search_fields = ('title', 'user__username', 'lexer', 'id',)
orde... |
eaa3d6094c92eb17f5074279a0c23ec363cddd1b | rnacentral/portal/models/secondary_structure.py | rnacentral/portal/models/secondary_structure.py | """
Copyright [2009-2017] EMBL-European Bioinformatics Institute
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 a... | """
Copyright [2009-2017] EMBL-European Bioinformatics Institute
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 a... | Use OneToOneField on SecondaryStructure model | Use OneToOneField on SecondaryStructure model
| Python | apache-2.0 | RNAcentral/rnacentral-webcode,RNAcentral/rnacentral-webcode,RNAcentral/rnacentral-webcode,RNAcentral/rnacentral-webcode | """
Copyright [2009-2017] EMBL-European Bioinformatics Institute
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 a... | """
Copyright [2009-2017] EMBL-European Bioinformatics Institute
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 a... | <commit_before>"""
Copyright [2009-2017] EMBL-European Bioinformatics Institute
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 appl... | """
Copyright [2009-2017] EMBL-European Bioinformatics Institute
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 a... | """
Copyright [2009-2017] EMBL-European Bioinformatics Institute
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 a... | <commit_before>"""
Copyright [2009-2017] EMBL-European Bioinformatics Institute
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 appl... |
f549fd217f9d838af1e6f028cdae14119da72fb4 | tests/test_api_network.py | tests/test_api_network.py | from devicehive import NetworkError
from devicehive import ApiResponseError
def test_save(test):
def handle_connect(handler):
name = test.generate_id('n-s')
description = '%s-description' % name
network = handler.api.create_network(name, description)
name = test.generate_id('n-s')... | from devicehive import NetworkError
from devicehive import ApiResponseError
def test_save(test):
def handle_connect(handler):
name = test.generate_id('n-s')
description = '%s-description' % name
network = handler.api.create_network(name, description)
name = test.generate_id('n-s')... | Add code test for test_remove function | Add code test for test_remove function
| Python | apache-2.0 | devicehive/devicehive-python | from devicehive import NetworkError
from devicehive import ApiResponseError
def test_save(test):
def handle_connect(handler):
name = test.generate_id('n-s')
description = '%s-description' % name
network = handler.api.create_network(name, description)
name = test.generate_id('n-s')... | from devicehive import NetworkError
from devicehive import ApiResponseError
def test_save(test):
def handle_connect(handler):
name = test.generate_id('n-s')
description = '%s-description' % name
network = handler.api.create_network(name, description)
name = test.generate_id('n-s')... | <commit_before>from devicehive import NetworkError
from devicehive import ApiResponseError
def test_save(test):
def handle_connect(handler):
name = test.generate_id('n-s')
description = '%s-description' % name
network = handler.api.create_network(name, description)
name = test.gen... | from devicehive import NetworkError
from devicehive import ApiResponseError
def test_save(test):
def handle_connect(handler):
name = test.generate_id('n-s')
description = '%s-description' % name
network = handler.api.create_network(name, description)
name = test.generate_id('n-s')... | from devicehive import NetworkError
from devicehive import ApiResponseError
def test_save(test):
def handle_connect(handler):
name = test.generate_id('n-s')
description = '%s-description' % name
network = handler.api.create_network(name, description)
name = test.generate_id('n-s')... | <commit_before>from devicehive import NetworkError
from devicehive import ApiResponseError
def test_save(test):
def handle_connect(handler):
name = test.generate_id('n-s')
description = '%s-description' % name
network = handler.api.create_network(name, description)
name = test.gen... |
f3931dd3eecdfa6be81273007663d4983aad5180 | tests/alembic/versions/132231d12fcd_test.py | tests/alembic/versions/132231d12fcd_test.py | """Test Migration
Revision ID: 132231d12fcd
Revises: None
Create Date: 2013-04-27 11:09:23.896698
"""
# revision identifiers, used by Alembic.
revision = '132231d12fcd'
down_revision = None
from alembic import op
import sqlalchemy as sa
def upgrade():
pass
def downgrade():
pass
| """Test Migration
Revision ID: 132231d12fcd
Revises: None
Create Date: 2013-04-27 11:09:23.896698
"""
# revision identifiers, used by Alembic.
revision = u'132231d12fcd'
down_revision = None
from alembic import op
import sqlalchemy as sa
def upgrade():
pass
def downgrade():
pass
| Fix for SQLAlchemy unicode warning | Fix for SQLAlchemy unicode warning
| Python | bsd-2-clause | hasgeek/coaster | """Test Migration
Revision ID: 132231d12fcd
Revises: None
Create Date: 2013-04-27 11:09:23.896698
"""
# revision identifiers, used by Alembic.
revision = '132231d12fcd'
down_revision = None
from alembic import op
import sqlalchemy as sa
def upgrade():
pass
def downgrade():
pass
Fix for SQLAlchemy unicod... | """Test Migration
Revision ID: 132231d12fcd
Revises: None
Create Date: 2013-04-27 11:09:23.896698
"""
# revision identifiers, used by Alembic.
revision = u'132231d12fcd'
down_revision = None
from alembic import op
import sqlalchemy as sa
def upgrade():
pass
def downgrade():
pass
| <commit_before>"""Test Migration
Revision ID: 132231d12fcd
Revises: None
Create Date: 2013-04-27 11:09:23.896698
"""
# revision identifiers, used by Alembic.
revision = '132231d12fcd'
down_revision = None
from alembic import op
import sqlalchemy as sa
def upgrade():
pass
def downgrade():
pass
<commit_ms... | """Test Migration
Revision ID: 132231d12fcd
Revises: None
Create Date: 2013-04-27 11:09:23.896698
"""
# revision identifiers, used by Alembic.
revision = u'132231d12fcd'
down_revision = None
from alembic import op
import sqlalchemy as sa
def upgrade():
pass
def downgrade():
pass
| """Test Migration
Revision ID: 132231d12fcd
Revises: None
Create Date: 2013-04-27 11:09:23.896698
"""
# revision identifiers, used by Alembic.
revision = '132231d12fcd'
down_revision = None
from alembic import op
import sqlalchemy as sa
def upgrade():
pass
def downgrade():
pass
Fix for SQLAlchemy unicod... | <commit_before>"""Test Migration
Revision ID: 132231d12fcd
Revises: None
Create Date: 2013-04-27 11:09:23.896698
"""
# revision identifiers, used by Alembic.
revision = '132231d12fcd'
down_revision = None
from alembic import op
import sqlalchemy as sa
def upgrade():
pass
def downgrade():
pass
<commit_ms... |
5743d7cfbc93b1c806e8f0a38d8000b82445810b | __init__.py | __init__.py | """
Python Bayesian hierarchical clustering (PyBHC).
Heller, K. A., & Ghahramani, Z. (2005). Bayesian Hierarchical
Clustering. Neuroscience, 6(section 2), 297-304.
doi:10.1145/1102351.1102389
"""
from bhc import bhc
from dists import NormalInverseWishart
| """
Python Bayesian hierarchical clustering (PyBHC).
Heller, K. A., & Ghahramani, Z. (2005). Bayesian Hierarchical
Clustering. Neuroscience, 6(section 2), 297-304.
doi:10.1145/1102351.1102389
"""
from bhc import bhc
from dists import NormalInverseWishart, NormalFixedCovar
from rbhc import rbhc
| Update importing of prob dists | Update importing of prob dists
Import the newly created fixed variance probability dist into
__init__.py for easier use outside of module.
| Python | bsd-3-clause | stuartsale/pyBHC | """
Python Bayesian hierarchical clustering (PyBHC).
Heller, K. A., & Ghahramani, Z. (2005). Bayesian Hierarchical
Clustering. Neuroscience, 6(section 2), 297-304.
doi:10.1145/1102351.1102389
"""
from bhc import bhc
from dists import NormalInverseWishart
Update importing of prob dists
Import the newly creat... | """
Python Bayesian hierarchical clustering (PyBHC).
Heller, K. A., & Ghahramani, Z. (2005). Bayesian Hierarchical
Clustering. Neuroscience, 6(section 2), 297-304.
doi:10.1145/1102351.1102389
"""
from bhc import bhc
from dists import NormalInverseWishart, NormalFixedCovar
from rbhc import rbhc
| <commit_before>"""
Python Bayesian hierarchical clustering (PyBHC).
Heller, K. A., & Ghahramani, Z. (2005). Bayesian Hierarchical
Clustering. Neuroscience, 6(section 2), 297-304.
doi:10.1145/1102351.1102389
"""
from bhc import bhc
from dists import NormalInverseWishart
<commit_msg>Update importing of prob di... | """
Python Bayesian hierarchical clustering (PyBHC).
Heller, K. A., & Ghahramani, Z. (2005). Bayesian Hierarchical
Clustering. Neuroscience, 6(section 2), 297-304.
doi:10.1145/1102351.1102389
"""
from bhc import bhc
from dists import NormalInverseWishart, NormalFixedCovar
from rbhc import rbhc
| """
Python Bayesian hierarchical clustering (PyBHC).
Heller, K. A., & Ghahramani, Z. (2005). Bayesian Hierarchical
Clustering. Neuroscience, 6(section 2), 297-304.
doi:10.1145/1102351.1102389
"""
from bhc import bhc
from dists import NormalInverseWishart
Update importing of prob dists
Import the newly creat... | <commit_before>"""
Python Bayesian hierarchical clustering (PyBHC).
Heller, K. A., & Ghahramani, Z. (2005). Bayesian Hierarchical
Clustering. Neuroscience, 6(section 2), 297-304.
doi:10.1145/1102351.1102389
"""
from bhc import bhc
from dists import NormalInverseWishart
<commit_msg>Update importing of prob di... |
69d3ec01ec3e9e9369b5c0425bc63cc7f2797b52 | __init__.py | __init__.py | import pyOmicron
import STS
__all__=["pyOmicron","STS"]
__version__ = 0.1
| import pyOmicron
try:
import STS
except:
import pyOmicron.STS
__all__=["pyOmicron","STS"]
__version__ = 0.1
| Fix import for python 3 | Fix import for python 3
| Python | apache-2.0 | scholi/pyOmicron | import pyOmicron
import STS
__all__=["pyOmicron","STS"]
__version__ = 0.1
Fix import for python 3 | import pyOmicron
try:
import STS
except:
import pyOmicron.STS
__all__=["pyOmicron","STS"]
__version__ = 0.1
| <commit_before>import pyOmicron
import STS
__all__=["pyOmicron","STS"]
__version__ = 0.1
<commit_msg>Fix import for python 3<commit_after> | import pyOmicron
try:
import STS
except:
import pyOmicron.STS
__all__=["pyOmicron","STS"]
__version__ = 0.1
| import pyOmicron
import STS
__all__=["pyOmicron","STS"]
__version__ = 0.1
Fix import for python 3import pyOmicron
try:
import STS
except:
import pyOmicron.STS
__all__=["pyOmicron","STS"]
__version__ = 0.1
| <commit_before>import pyOmicron
import STS
__all__=["pyOmicron","STS"]
__version__ = 0.1
<commit_msg>Fix import for python 3<commit_after>import pyOmicron
try:
import STS
except:
import pyOmicron.STS
__all__=["pyOmicron","STS"]
__version__ = 0.1
|
c1acb68ef54309584816fbf5c93e38266accb2f0 | nova/db/sqlalchemy/session.py | nova/db/sqlalchemy/session.py | # vim: tabstop=4 shiftwidth=4 softtabstop=4
# Copyright 2010 United States Government as represented by the
# Administrator of the National Aeronautics and Space Administration.
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compli... | # vim: tabstop=4 shiftwidth=4 softtabstop=4
# Copyright 2010 United States Government as represented by the
# Administrator of the National Aeronautics and Space Administration.
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compli... | Add the pool_recycle setting to enable connection pooling features for the sql engine. The setting is hard-coded to 3600 seconds (one hour) per the recommendation provided on sqlalchemy's site | Add the pool_recycle setting to enable connection pooling features for the sql engine. The setting is hard-coded to 3600 seconds (one hour) per the recommendation provided on sqlalchemy's site | Python | apache-2.0 | qwefi/nova,tanglei528/nova,houshengbo/nova_vmware_compute_driver,SUSE-Cloud/nova,gooddata/openstack-nova,gspilio/nova,TwinkleChawla/nova,felixma/nova,viggates/nova,TieWei/nova,varunarya10/nova_test_latest,Yusuke1987/openstack_template,eonpatapon/nova,ruslanloman/nova,petrutlucian94/nova_dev,fajoy/nova,gooddata/openstac... | # vim: tabstop=4 shiftwidth=4 softtabstop=4
# Copyright 2010 United States Government as represented by the
# Administrator of the National Aeronautics and Space Administration.
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compli... | # vim: tabstop=4 shiftwidth=4 softtabstop=4
# Copyright 2010 United States Government as represented by the
# Administrator of the National Aeronautics and Space Administration.
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compli... | <commit_before># vim: tabstop=4 shiftwidth=4 softtabstop=4
# Copyright 2010 United States Government as represented by the
# Administrator of the National Aeronautics and Space Administration.
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file e... | # vim: tabstop=4 shiftwidth=4 softtabstop=4
# Copyright 2010 United States Government as represented by the
# Administrator of the National Aeronautics and Space Administration.
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compli... | # vim: tabstop=4 shiftwidth=4 softtabstop=4
# Copyright 2010 United States Government as represented by the
# Administrator of the National Aeronautics and Space Administration.
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compli... | <commit_before># vim: tabstop=4 shiftwidth=4 softtabstop=4
# Copyright 2010 United States Government as represented by the
# Administrator of the National Aeronautics and Space Administration.
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file e... |
13fec51e6fa3f47d2f3669e789e9d432e092944a | celeryconfig.py | celeryconfig.py | from datetime import timedelta
from private import CELERY_BROKER_URL, CELERY_RESULT_BACKEND
BROKER_URL = CELERY_BROKER_URL
CELERY_RESULT_BACKEND = CELERY_RESULT_BACKEND
CELERY_TIMEZONE = 'UTC'
CELERY_INCLUDE = ['tasks.scraper_task']
CELERYBEAT_SCHEDULE = {
'scrape_users': {
'task': 'tasks.scraper_task.... | from datetime import timedelta
from private import CELERY_BROKER_URL, CELERY_RESULT_BACKEND
#-------------------------------------------------------------------------------
BROKER_URL = CELERY_BROKER_URL
CELERY_RESULT_BACKEND = CELERY_RESULT_BACKEND
#------------------------------------------------------... | Use json for task serialization | Use json for task serialization
| Python | mit | Trinovantes/MyAnimeList-Cover-CSS-Generator,Trinovantes/MyAnimeList-Cover-CSS-Generator | from datetime import timedelta
from private import CELERY_BROKER_URL, CELERY_RESULT_BACKEND
BROKER_URL = CELERY_BROKER_URL
CELERY_RESULT_BACKEND = CELERY_RESULT_BACKEND
CELERY_TIMEZONE = 'UTC'
CELERY_INCLUDE = ['tasks.scraper_task']
CELERYBEAT_SCHEDULE = {
'scrape_users': {
'task': 'tasks.scraper_task.... | from datetime import timedelta
from private import CELERY_BROKER_URL, CELERY_RESULT_BACKEND
#-------------------------------------------------------------------------------
BROKER_URL = CELERY_BROKER_URL
CELERY_RESULT_BACKEND = CELERY_RESULT_BACKEND
#------------------------------------------------------... | <commit_before>from datetime import timedelta
from private import CELERY_BROKER_URL, CELERY_RESULT_BACKEND
BROKER_URL = CELERY_BROKER_URL
CELERY_RESULT_BACKEND = CELERY_RESULT_BACKEND
CELERY_TIMEZONE = 'UTC'
CELERY_INCLUDE = ['tasks.scraper_task']
CELERYBEAT_SCHEDULE = {
'scrape_users': {
'task': 'task... | from datetime import timedelta
from private import CELERY_BROKER_URL, CELERY_RESULT_BACKEND
#-------------------------------------------------------------------------------
BROKER_URL = CELERY_BROKER_URL
CELERY_RESULT_BACKEND = CELERY_RESULT_BACKEND
#------------------------------------------------------... | from datetime import timedelta
from private import CELERY_BROKER_URL, CELERY_RESULT_BACKEND
BROKER_URL = CELERY_BROKER_URL
CELERY_RESULT_BACKEND = CELERY_RESULT_BACKEND
CELERY_TIMEZONE = 'UTC'
CELERY_INCLUDE = ['tasks.scraper_task']
CELERYBEAT_SCHEDULE = {
'scrape_users': {
'task': 'tasks.scraper_task.... | <commit_before>from datetime import timedelta
from private import CELERY_BROKER_URL, CELERY_RESULT_BACKEND
BROKER_URL = CELERY_BROKER_URL
CELERY_RESULT_BACKEND = CELERY_RESULT_BACKEND
CELERY_TIMEZONE = 'UTC'
CELERY_INCLUDE = ['tasks.scraper_task']
CELERYBEAT_SCHEDULE = {
'scrape_users': {
'task': 'task... |
bdeb1196025c8f982390f0f298fa8b16b1883bce | mediaman/management/commands/generate_thumbs.py | mediaman/management/commands/generate_thumbs.py | from django.core.management.base import BaseCommand
import easy_thumbnails
from mediaman.models import ArtefactRepresentation
import os
class Command(BaseCommand):
help = "Generate thumbnails for Artefact Representations"
def handle(self, *args, **options):
unbuffered = os.fdopen(self.stdout.fileno()... | from django.core.management.base import BaseCommand
import easy_thumbnails
from mediaman.models import ArtefactRepresentation
import os
#import ImageFile
from PIL import ImageFile
class Command(BaseCommand):
help = "Generate thumbnails for Artefact Representations"
def handle(self, *args, **options):
... | Update bulk image generation command | Update bulk image generation command
| Python | bsd-3-clause | uq-eresearch/uqam,uq-eresearch/uqam,uq-eresearch/uqam,uq-eresearch/uqam | from django.core.management.base import BaseCommand
import easy_thumbnails
from mediaman.models import ArtefactRepresentation
import os
class Command(BaseCommand):
help = "Generate thumbnails for Artefact Representations"
def handle(self, *args, **options):
unbuffered = os.fdopen(self.stdout.fileno()... | from django.core.management.base import BaseCommand
import easy_thumbnails
from mediaman.models import ArtefactRepresentation
import os
#import ImageFile
from PIL import ImageFile
class Command(BaseCommand):
help = "Generate thumbnails for Artefact Representations"
def handle(self, *args, **options):
... | <commit_before>from django.core.management.base import BaseCommand
import easy_thumbnails
from mediaman.models import ArtefactRepresentation
import os
class Command(BaseCommand):
help = "Generate thumbnails for Artefact Representations"
def handle(self, *args, **options):
unbuffered = os.fdopen(self.... | from django.core.management.base import BaseCommand
import easy_thumbnails
from mediaman.models import ArtefactRepresentation
import os
#import ImageFile
from PIL import ImageFile
class Command(BaseCommand):
help = "Generate thumbnails for Artefact Representations"
def handle(self, *args, **options):
... | from django.core.management.base import BaseCommand
import easy_thumbnails
from mediaman.models import ArtefactRepresentation
import os
class Command(BaseCommand):
help = "Generate thumbnails for Artefact Representations"
def handle(self, *args, **options):
unbuffered = os.fdopen(self.stdout.fileno()... | <commit_before>from django.core.management.base import BaseCommand
import easy_thumbnails
from mediaman.models import ArtefactRepresentation
import os
class Command(BaseCommand):
help = "Generate thumbnails for Artefact Representations"
def handle(self, *args, **options):
unbuffered = os.fdopen(self.... |
07ea0d8ec5c65f0fc94dc29f8b03402c571d3a42 | qipipe/interfaces/fix_dicom.py | qipipe/interfaces/fix_dicom.py | import os
from nipype.interfaces.base import (BaseInterface, BaseInterfaceInputSpec, traits,
InputMultiPath, File, Directory, TraitedSpec)
from qipipe.staging.fix_dicom import fix_dicom_headers
class FixDicomInputSpec(BaseInterfaceInputSpec):
collection = traits.Str(desc='The image collection', mandatory=True)... | import os
from nipype.interfaces.base import (BaseInterface, BaseInterfaceInputSpec, traits,
InputMultiPath, File, Directory, TraitedSpec)
from qipipe.staging.fix_dicom import fix_dicom_headers
class FixDicomInputSpec(BaseInterfaceInputSpec):
collection = traits.Str(desc='The image collection', mandatory=True)... | Fix only one file at a time. | Fix only one file at a time.
| Python | bsd-2-clause | ohsu-qin/qipipe | import os
from nipype.interfaces.base import (BaseInterface, BaseInterfaceInputSpec, traits,
InputMultiPath, File, Directory, TraitedSpec)
from qipipe.staging.fix_dicom import fix_dicom_headers
class FixDicomInputSpec(BaseInterfaceInputSpec):
collection = traits.Str(desc='The image collection', mandatory=True)... | import os
from nipype.interfaces.base import (BaseInterface, BaseInterfaceInputSpec, traits,
InputMultiPath, File, Directory, TraitedSpec)
from qipipe.staging.fix_dicom import fix_dicom_headers
class FixDicomInputSpec(BaseInterfaceInputSpec):
collection = traits.Str(desc='The image collection', mandatory=True)... | <commit_before>import os
from nipype.interfaces.base import (BaseInterface, BaseInterfaceInputSpec, traits,
InputMultiPath, File, Directory, TraitedSpec)
from qipipe.staging.fix_dicom import fix_dicom_headers
class FixDicomInputSpec(BaseInterfaceInputSpec):
collection = traits.Str(desc='The image collection', ... | import os
from nipype.interfaces.base import (BaseInterface, BaseInterfaceInputSpec, traits,
InputMultiPath, File, Directory, TraitedSpec)
from qipipe.staging.fix_dicom import fix_dicom_headers
class FixDicomInputSpec(BaseInterfaceInputSpec):
collection = traits.Str(desc='The image collection', mandatory=True)... | import os
from nipype.interfaces.base import (BaseInterface, BaseInterfaceInputSpec, traits,
InputMultiPath, File, Directory, TraitedSpec)
from qipipe.staging.fix_dicom import fix_dicom_headers
class FixDicomInputSpec(BaseInterfaceInputSpec):
collection = traits.Str(desc='The image collection', mandatory=True)... | <commit_before>import os
from nipype.interfaces.base import (BaseInterface, BaseInterfaceInputSpec, traits,
InputMultiPath, File, Directory, TraitedSpec)
from qipipe.staging.fix_dicom import fix_dicom_headers
class FixDicomInputSpec(BaseInterfaceInputSpec):
collection = traits.Str(desc='The image collection', ... |
ee8f04c2e68eddad48db3907d1d5e4ecc5daa4a4 | Functions/Conversation.py | Functions/Conversation.py | from IRCMessage import IRCMessage
from IRCResponse import IRCResponse, ResponseType
from Function import Function
from GlobalVars import *
import re
class Instantiate(Function):
Help = 'Responds to greetings and such'
def GetResponse(self, message):
if message.Type != 'PRIVMSG':
... | from IRCMessage import IRCMessage
from IRCResponse import IRCResponse, ResponseType
from Function import Function
from GlobalVars import *
import re
class Instantiate(Function):
Help = 'Responds to greetings and such'
def GetResponse(self, message):
if message.Type != 'PRIVMSG':
... | Add more greetings to the needs-multilining regex | Add more greetings to the needs-multilining regex | Python | mit | MatthewCox/PyMoronBot,Heufneutje/PyMoronBot,DesertBot/DesertBot | from IRCMessage import IRCMessage
from IRCResponse import IRCResponse, ResponseType
from Function import Function
from GlobalVars import *
import re
class Instantiate(Function):
Help = 'Responds to greetings and such'
def GetResponse(self, message):
if message.Type != 'PRIVMSG':
... | from IRCMessage import IRCMessage
from IRCResponse import IRCResponse, ResponseType
from Function import Function
from GlobalVars import *
import re
class Instantiate(Function):
Help = 'Responds to greetings and such'
def GetResponse(self, message):
if message.Type != 'PRIVMSG':
... | <commit_before>from IRCMessage import IRCMessage
from IRCResponse import IRCResponse, ResponseType
from Function import Function
from GlobalVars import *
import re
class Instantiate(Function):
Help = 'Responds to greetings and such'
def GetResponse(self, message):
if message.Type != 'PRIVM... | from IRCMessage import IRCMessage
from IRCResponse import IRCResponse, ResponseType
from Function import Function
from GlobalVars import *
import re
class Instantiate(Function):
Help = 'Responds to greetings and such'
def GetResponse(self, message):
if message.Type != 'PRIVMSG':
... | from IRCMessage import IRCMessage
from IRCResponse import IRCResponse, ResponseType
from Function import Function
from GlobalVars import *
import re
class Instantiate(Function):
Help = 'Responds to greetings and such'
def GetResponse(self, message):
if message.Type != 'PRIVMSG':
... | <commit_before>from IRCMessage import IRCMessage
from IRCResponse import IRCResponse, ResponseType
from Function import Function
from GlobalVars import *
import re
class Instantiate(Function):
Help = 'Responds to greetings and such'
def GetResponse(self, message):
if message.Type != 'PRIVM... |
8808fe8a4d3a8cf36a91fe69b2d1002eddc534a3 | py/garage/garage/startups/sql.py | py/garage/garage/startups/sql.py | """Template of DbEngineComponent."""
__all__ = [
'make_db_engine_component',
]
import logging
import garage.sql.sqlite
from garage import components
from garage.startups.logging import LoggingComponent
def make_db_engine_component(
*,
package_name,
argument_group,
argument_prefi... | __all__ = [
'make_db_engine_component',
]
import logging
import garage.sql.sqlite
from garage import components
from garage.startups.logging import LoggingComponent
def make_db_engine_component(
*, package_name,
argument_group, argument_prefix,
check_same_thread=False):
"""DbEngineCo... | Add check_same_thread argument to make_db_engine_component | Add check_same_thread argument to make_db_engine_component
| Python | mit | clchiou/garage,clchiou/garage,clchiou/garage,clchiou/garage | """Template of DbEngineComponent."""
__all__ = [
'make_db_engine_component',
]
import logging
import garage.sql.sqlite
from garage import components
from garage.startups.logging import LoggingComponent
def make_db_engine_component(
*,
package_name,
argument_group,
argument_prefi... | __all__ = [
'make_db_engine_component',
]
import logging
import garage.sql.sqlite
from garage import components
from garage.startups.logging import LoggingComponent
def make_db_engine_component(
*, package_name,
argument_group, argument_prefix,
check_same_thread=False):
"""DbEngineCo... | <commit_before>"""Template of DbEngineComponent."""
__all__ = [
'make_db_engine_component',
]
import logging
import garage.sql.sqlite
from garage import components
from garage.startups.logging import LoggingComponent
def make_db_engine_component(
*,
package_name,
argument_group,
... | __all__ = [
'make_db_engine_component',
]
import logging
import garage.sql.sqlite
from garage import components
from garage.startups.logging import LoggingComponent
def make_db_engine_component(
*, package_name,
argument_group, argument_prefix,
check_same_thread=False):
"""DbEngineCo... | """Template of DbEngineComponent."""
__all__ = [
'make_db_engine_component',
]
import logging
import garage.sql.sqlite
from garage import components
from garage.startups.logging import LoggingComponent
def make_db_engine_component(
*,
package_name,
argument_group,
argument_prefi... | <commit_before>"""Template of DbEngineComponent."""
__all__ = [
'make_db_engine_component',
]
import logging
import garage.sql.sqlite
from garage import components
from garage.startups.logging import LoggingComponent
def make_db_engine_component(
*,
package_name,
argument_group,
... |
5124e59cf6bb264da6d58043e068b63647685167 | accounts/tests.py | accounts/tests.py | """accounts app unittests
"""
from django.test import TestCase
from django.contrib.auth import get_user_model
from accounts.models import LoginToken
TEST_EMAIL = '[email protected]'
class WelcomePageTest(TestCase):
"""Tests relating to the welcome_page view.
"""
def test_uses_welcome_template(se... | """accounts app unittests
"""
from time import sleep
from django.contrib.auth import get_user_model
from django.test import TestCase
from accounts.token import LoginTokenGenerator
TEST_EMAIL = '[email protected]'
class WelcomePageTest(TestCase):
"""Tests relating to the welcome_page view.
"""
de... | Update test to not use a db model | Update test to not use a db model
| Python | mit | randomic/aniauth-tdd,randomic/aniauth-tdd | """accounts app unittests
"""
from django.test import TestCase
from django.contrib.auth import get_user_model
from accounts.models import LoginToken
TEST_EMAIL = '[email protected]'
class WelcomePageTest(TestCase):
"""Tests relating to the welcome_page view.
"""
def test_uses_welcome_template(se... | """accounts app unittests
"""
from time import sleep
from django.contrib.auth import get_user_model
from django.test import TestCase
from accounts.token import LoginTokenGenerator
TEST_EMAIL = '[email protected]'
class WelcomePageTest(TestCase):
"""Tests relating to the welcome_page view.
"""
de... | <commit_before>"""accounts app unittests
"""
from django.test import TestCase
from django.contrib.auth import get_user_model
from accounts.models import LoginToken
TEST_EMAIL = '[email protected]'
class WelcomePageTest(TestCase):
"""Tests relating to the welcome_page view.
"""
def test_uses_welc... | """accounts app unittests
"""
from time import sleep
from django.contrib.auth import get_user_model
from django.test import TestCase
from accounts.token import LoginTokenGenerator
TEST_EMAIL = '[email protected]'
class WelcomePageTest(TestCase):
"""Tests relating to the welcome_page view.
"""
de... | """accounts app unittests
"""
from django.test import TestCase
from django.contrib.auth import get_user_model
from accounts.models import LoginToken
TEST_EMAIL = '[email protected]'
class WelcomePageTest(TestCase):
"""Tests relating to the welcome_page view.
"""
def test_uses_welcome_template(se... | <commit_before>"""accounts app unittests
"""
from django.test import TestCase
from django.contrib.auth import get_user_model
from accounts.models import LoginToken
TEST_EMAIL = '[email protected]'
class WelcomePageTest(TestCase):
"""Tests relating to the welcome_page view.
"""
def test_uses_welc... |
74a5cad21fb726384ab53f2ca9b711cc8298bfb9 | accounts/tests.py | accounts/tests.py | """accounts app unittests
"""
from django.test import TestCase
class WelcomePageTest(TestCase):
def test_uses_welcome_template(self):
response = self.client.get('/')
self.assertTemplateUsed(response, 'accounts/welcome.html')
| """accounts app unittests
"""
from django.test import TestCase
class WelcomePageTest(TestCase):
"""Tests relating to the welcome_page view.
"""
def test_uses_welcome_template(self):
"""The root url should response with the welcome page template.
"""
response = self.client.get('/... | Add docstrings to unit test | Add docstrings to unit test
| Python | mit | randomic/aniauth-tdd,randomic/aniauth-tdd | """accounts app unittests
"""
from django.test import TestCase
class WelcomePageTest(TestCase):
def test_uses_welcome_template(self):
response = self.client.get('/')
self.assertTemplateUsed(response, 'accounts/welcome.html')
Add docstrings to unit test | """accounts app unittests
"""
from django.test import TestCase
class WelcomePageTest(TestCase):
"""Tests relating to the welcome_page view.
"""
def test_uses_welcome_template(self):
"""The root url should response with the welcome page template.
"""
response = self.client.get('/... | <commit_before>"""accounts app unittests
"""
from django.test import TestCase
class WelcomePageTest(TestCase):
def test_uses_welcome_template(self):
response = self.client.get('/')
self.assertTemplateUsed(response, 'accounts/welcome.html')
<commit_msg>Add docstrings to unit test<commit_after> | """accounts app unittests
"""
from django.test import TestCase
class WelcomePageTest(TestCase):
"""Tests relating to the welcome_page view.
"""
def test_uses_welcome_template(self):
"""The root url should response with the welcome page template.
"""
response = self.client.get('/... | """accounts app unittests
"""
from django.test import TestCase
class WelcomePageTest(TestCase):
def test_uses_welcome_template(self):
response = self.client.get('/')
self.assertTemplateUsed(response, 'accounts/welcome.html')
Add docstrings to unit test"""accounts app unittests
"""
from django.te... | <commit_before>"""accounts app unittests
"""
from django.test import TestCase
class WelcomePageTest(TestCase):
def test_uses_welcome_template(self):
response = self.client.get('/')
self.assertTemplateUsed(response, 'accounts/welcome.html')
<commit_msg>Add docstrings to unit test<commit_after>"""a... |
082154a93a79e854be6bf55b34c7db3e4a27173f | setup.py | setup.py | from setuptools import setup
setup(name='slacker',
version='0.3.9',
packages=['slacker'],
description='Slack API client',
author='Oktay Sancak',
author_email='[email protected]',
url='http://github.com/os/slacker/',
install_requires=['requests >= 2.2.1'],
license='h... | from setuptools import setup
setup(name='slacker',
version='0.4.0',
packages=['slacker'],
description='Slack API client',
author='Oktay Sancak',
author_email='[email protected]',
url='http://github.com/os/slacker/',
install_requires=['requests >= 2.2.1'],
license='h... | Set version number to 0.4.0. | Set version number to 0.4.0.
| Python | apache-2.0 | BetterWorks/slacker,wkentaro/slacker,olasitarska/slacker,os/slacker,wasabi0522/slacker,kashyap32/slacker,STANAPO/slacker,techartorg/slacker,hreeder/slacker,dastergon/slacker | from setuptools import setup
setup(name='slacker',
version='0.3.9',
packages=['slacker'],
description='Slack API client',
author='Oktay Sancak',
author_email='[email protected]',
url='http://github.com/os/slacker/',
install_requires=['requests >= 2.2.1'],
license='h... | from setuptools import setup
setup(name='slacker',
version='0.4.0',
packages=['slacker'],
description='Slack API client',
author='Oktay Sancak',
author_email='[email protected]',
url='http://github.com/os/slacker/',
install_requires=['requests >= 2.2.1'],
license='h... | <commit_before>from setuptools import setup
setup(name='slacker',
version='0.3.9',
packages=['slacker'],
description='Slack API client',
author='Oktay Sancak',
author_email='[email protected]',
url='http://github.com/os/slacker/',
install_requires=['requests >= 2.2.1'],
... | from setuptools import setup
setup(name='slacker',
version='0.4.0',
packages=['slacker'],
description='Slack API client',
author='Oktay Sancak',
author_email='[email protected]',
url='http://github.com/os/slacker/',
install_requires=['requests >= 2.2.1'],
license='h... | from setuptools import setup
setup(name='slacker',
version='0.3.9',
packages=['slacker'],
description='Slack API client',
author='Oktay Sancak',
author_email='[email protected]',
url='http://github.com/os/slacker/',
install_requires=['requests >= 2.2.1'],
license='h... | <commit_before>from setuptools import setup
setup(name='slacker',
version='0.3.9',
packages=['slacker'],
description='Slack API client',
author='Oktay Sancak',
author_email='[email protected]',
url='http://github.com/os/slacker/',
install_requires=['requests >= 2.2.1'],
... |
46e440168f66a5d599814d0e66771f6ce7a1ddc1 | setup.py | setup.py | try:
from setuptools import setup
from setuptools import find_packages
packages = find_packages()
except ImportError:
from distutils.core import setup
import os
packages = [x.strip('./').replace('/','.') for x in os.popen('find -name "__init__.py" | xargs -n1 dirname').read().strip().split('\n')... | try:
from setuptools import setup
from setuptools import find_packages
packages = find_packages()
except ImportError:
from distutils.core import setup
import os
packages = [x.strip('./').replace('/','.') for x in os.popen('find -name "__init__.py" | xargs -n1 dirname').read().strip().split('\n')... | Mark requirement for python 3.6 | Mark requirement for python 3.6
| Python | bsd-2-clause | angr/cle | try:
from setuptools import setup
from setuptools import find_packages
packages = find_packages()
except ImportError:
from distutils.core import setup
import os
packages = [x.strip('./').replace('/','.') for x in os.popen('find -name "__init__.py" | xargs -n1 dirname').read().strip().split('\n')... | try:
from setuptools import setup
from setuptools import find_packages
packages = find_packages()
except ImportError:
from distutils.core import setup
import os
packages = [x.strip('./').replace('/','.') for x in os.popen('find -name "__init__.py" | xargs -n1 dirname').read().strip().split('\n')... | <commit_before>try:
from setuptools import setup
from setuptools import find_packages
packages = find_packages()
except ImportError:
from distutils.core import setup
import os
packages = [x.strip('./').replace('/','.') for x in os.popen('find -name "__init__.py" | xargs -n1 dirname').read().stri... | try:
from setuptools import setup
from setuptools import find_packages
packages = find_packages()
except ImportError:
from distutils.core import setup
import os
packages = [x.strip('./').replace('/','.') for x in os.popen('find -name "__init__.py" | xargs -n1 dirname').read().strip().split('\n')... | try:
from setuptools import setup
from setuptools import find_packages
packages = find_packages()
except ImportError:
from distutils.core import setup
import os
packages = [x.strip('./').replace('/','.') for x in os.popen('find -name "__init__.py" | xargs -n1 dirname').read().strip().split('\n')... | <commit_before>try:
from setuptools import setup
from setuptools import find_packages
packages = find_packages()
except ImportError:
from distutils.core import setup
import os
packages = [x.strip('./').replace('/','.') for x in os.popen('find -name "__init__.py" | xargs -n1 dirname').read().stri... |
26f1506607a2042d508dc69f5a155ed88668d22a | setup.py | setup.py | import os
from setuptools import setup
def read(fname):
return open(os.path.join(os.path.dirname(__file__), fname)).read()
setup(
name = "ideone",
version = "0.0.1",
author = "Joe Schafer",
author_email = "[email protected]",
url = "http://github.com/jschaf",
description = "A Python binding t... | import os
from setuptools import setup
def read(fname):
return open(os.path.join(os.path.dirname(__file__), fname)).read()
setup(
name = "ideone",
version = "0.0.1",
author = "Joe Schafer",
author_email = "[email protected]",
url = "http://github.com/jschaf/ideone-api/",
description = "A Pyth... | Fix url to point to repository. | Fix url to point to repository.
| Python | bsd-3-clause | jschaf/ideone-api | import os
from setuptools import setup
def read(fname):
return open(os.path.join(os.path.dirname(__file__), fname)).read()
setup(
name = "ideone",
version = "0.0.1",
author = "Joe Schafer",
author_email = "[email protected]",
url = "http://github.com/jschaf",
description = "A Python binding t... | import os
from setuptools import setup
def read(fname):
return open(os.path.join(os.path.dirname(__file__), fname)).read()
setup(
name = "ideone",
version = "0.0.1",
author = "Joe Schafer",
author_email = "[email protected]",
url = "http://github.com/jschaf/ideone-api/",
description = "A Pyth... | <commit_before>import os
from setuptools import setup
def read(fname):
return open(os.path.join(os.path.dirname(__file__), fname)).read()
setup(
name = "ideone",
version = "0.0.1",
author = "Joe Schafer",
author_email = "[email protected]",
url = "http://github.com/jschaf",
description = "A P... | import os
from setuptools import setup
def read(fname):
return open(os.path.join(os.path.dirname(__file__), fname)).read()
setup(
name = "ideone",
version = "0.0.1",
author = "Joe Schafer",
author_email = "[email protected]",
url = "http://github.com/jschaf/ideone-api/",
description = "A Pyth... | import os
from setuptools import setup
def read(fname):
return open(os.path.join(os.path.dirname(__file__), fname)).read()
setup(
name = "ideone",
version = "0.0.1",
author = "Joe Schafer",
author_email = "[email protected]",
url = "http://github.com/jschaf",
description = "A Python binding t... | <commit_before>import os
from setuptools import setup
def read(fname):
return open(os.path.join(os.path.dirname(__file__), fname)).read()
setup(
name = "ideone",
version = "0.0.1",
author = "Joe Schafer",
author_email = "[email protected]",
url = "http://github.com/jschaf",
description = "A P... |
9e871bbce34af7d1150181af550e994ba26730e8 | setup.py | setup.py | from setuptools import setup
try:
import pypandoc
long_description = pypandoc.convert('README.md', 'rst')
except(IOError, ImportError):
long_description = open('README.md').read()
setup (
name = 'pyvault',
version = '1.4.4.2',
description = 'Python password manager',
long_description = lon... | from setuptools import setup
try:
import pypandoc
long_description = pypandoc.convert('README.md', 'rst')
except(IOError, ImportError):
long_description = open('README.md').read()
setup (
name = 'pyvault',
version = '1.4.4.3',
description = 'Python password manager',
long_description = lon... | Bump version for new build | Bump version for new build
| Python | mit | gabfl/vault | from setuptools import setup
try:
import pypandoc
long_description = pypandoc.convert('README.md', 'rst')
except(IOError, ImportError):
long_description = open('README.md').read()
setup (
name = 'pyvault',
version = '1.4.4.2',
description = 'Python password manager',
long_description = lon... | from setuptools import setup
try:
import pypandoc
long_description = pypandoc.convert('README.md', 'rst')
except(IOError, ImportError):
long_description = open('README.md').read()
setup (
name = 'pyvault',
version = '1.4.4.3',
description = 'Python password manager',
long_description = lon... | <commit_before>from setuptools import setup
try:
import pypandoc
long_description = pypandoc.convert('README.md', 'rst')
except(IOError, ImportError):
long_description = open('README.md').read()
setup (
name = 'pyvault',
version = '1.4.4.2',
description = 'Python password manager',
long_de... | from setuptools import setup
try:
import pypandoc
long_description = pypandoc.convert('README.md', 'rst')
except(IOError, ImportError):
long_description = open('README.md').read()
setup (
name = 'pyvault',
version = '1.4.4.3',
description = 'Python password manager',
long_description = lon... | from setuptools import setup
try:
import pypandoc
long_description = pypandoc.convert('README.md', 'rst')
except(IOError, ImportError):
long_description = open('README.md').read()
setup (
name = 'pyvault',
version = '1.4.4.2',
description = 'Python password manager',
long_description = lon... | <commit_before>from setuptools import setup
try:
import pypandoc
long_description = pypandoc.convert('README.md', 'rst')
except(IOError, ImportError):
long_description = open('README.md').read()
setup (
name = 'pyvault',
version = '1.4.4.2',
description = 'Python password manager',
long_de... |
3b92b81594668cdd24f24fa32a2c5d61f908d22d | setup.py | setup.py | #!/usr/bin/env python
from setuptools import setup, find_packages
from os import path
import sys
if sys.version_info < (3, 4):
sys.exit('DataJoint is only supported on Python 3.4 or higher')
here = path.abspath(path.dirname(__file__))
long_description = "A relational data framework for scientific data pipelines ... | #!/usr/bin/env python
from setuptools import setup, find_packages
from os import path
import sys
min_py_version = (3, 4)
if sys.version_info < min_py_version:
sys.exit('DataJoint is only supported on Python {}.{} or higher'.format(*min_py_version))
here = path.abspath(path.dirname(__file__))
long_description =... | Update minimum python versioning checks | Update minimum python versioning checks
| Python | lgpl-2.1 | eywalker/datajoint-python,dimitri-yatsenko/datajoint-python,datajoint/datajoint-python | #!/usr/bin/env python
from setuptools import setup, find_packages
from os import path
import sys
if sys.version_info < (3, 4):
sys.exit('DataJoint is only supported on Python 3.4 or higher')
here = path.abspath(path.dirname(__file__))
long_description = "A relational data framework for scientific data pipelines ... | #!/usr/bin/env python
from setuptools import setup, find_packages
from os import path
import sys
min_py_version = (3, 4)
if sys.version_info < min_py_version:
sys.exit('DataJoint is only supported on Python {}.{} or higher'.format(*min_py_version))
here = path.abspath(path.dirname(__file__))
long_description =... | <commit_before>#!/usr/bin/env python
from setuptools import setup, find_packages
from os import path
import sys
if sys.version_info < (3, 4):
sys.exit('DataJoint is only supported on Python 3.4 or higher')
here = path.abspath(path.dirname(__file__))
long_description = "A relational data framework for scientific ... | #!/usr/bin/env python
from setuptools import setup, find_packages
from os import path
import sys
min_py_version = (3, 4)
if sys.version_info < min_py_version:
sys.exit('DataJoint is only supported on Python {}.{} or higher'.format(*min_py_version))
here = path.abspath(path.dirname(__file__))
long_description =... | #!/usr/bin/env python
from setuptools import setup, find_packages
from os import path
import sys
if sys.version_info < (3, 4):
sys.exit('DataJoint is only supported on Python 3.4 or higher')
here = path.abspath(path.dirname(__file__))
long_description = "A relational data framework for scientific data pipelines ... | <commit_before>#!/usr/bin/env python
from setuptools import setup, find_packages
from os import path
import sys
if sys.version_info < (3, 4):
sys.exit('DataJoint is only supported on Python 3.4 or higher')
here = path.abspath(path.dirname(__file__))
long_description = "A relational data framework for scientific ... |
e3ca5971d7a1cefccb7b412fe17fa5951b5cdc58 | setup.py | setup.py | import os
from setuptools import setup
PACKAGE_VERSION = '0.3'
def version():
def version_file(mode='r'):
return open(os.path.dirname(os.path.abspath(__file__), 'version.txt'), mode)
if os.getenv('TRAVIS'):
with version_file('w') as verfile:
verfile.write('{0}.{1}'.format(PACKAG... | import os
from setuptools import setup
PACKAGE_VERSION = '0.3'
def version():
def version_file(mode='r'):
return open(os.path.join(os.path.dirname(os.path.abspath(__file__), 'version.txt')), mode)
if os.getenv('TRAVIS'):
with version_file('w') as verfile:
verfile.write('{0}.{1}'... | Fix issue with path variable | Fix issue with path variable
| Python | apache-2.0 | odin-public/osaAPI | import os
from setuptools import setup
PACKAGE_VERSION = '0.3'
def version():
def version_file(mode='r'):
return open(os.path.dirname(os.path.abspath(__file__), 'version.txt'), mode)
if os.getenv('TRAVIS'):
with version_file('w') as verfile:
verfile.write('{0}.{1}'.format(PACKAG... | import os
from setuptools import setup
PACKAGE_VERSION = '0.3'
def version():
def version_file(mode='r'):
return open(os.path.join(os.path.dirname(os.path.abspath(__file__), 'version.txt')), mode)
if os.getenv('TRAVIS'):
with version_file('w') as verfile:
verfile.write('{0}.{1}'... | <commit_before>import os
from setuptools import setup
PACKAGE_VERSION = '0.3'
def version():
def version_file(mode='r'):
return open(os.path.dirname(os.path.abspath(__file__), 'version.txt'), mode)
if os.getenv('TRAVIS'):
with version_file('w') as verfile:
verfile.write('{0}.{1}... | import os
from setuptools import setup
PACKAGE_VERSION = '0.3'
def version():
def version_file(mode='r'):
return open(os.path.join(os.path.dirname(os.path.abspath(__file__), 'version.txt')), mode)
if os.getenv('TRAVIS'):
with version_file('w') as verfile:
verfile.write('{0}.{1}'... | import os
from setuptools import setup
PACKAGE_VERSION = '0.3'
def version():
def version_file(mode='r'):
return open(os.path.dirname(os.path.abspath(__file__), 'version.txt'), mode)
if os.getenv('TRAVIS'):
with version_file('w') as verfile:
verfile.write('{0}.{1}'.format(PACKAG... | <commit_before>import os
from setuptools import setup
PACKAGE_VERSION = '0.3'
def version():
def version_file(mode='r'):
return open(os.path.dirname(os.path.abspath(__file__), 'version.txt'), mode)
if os.getenv('TRAVIS'):
with version_file('w') as verfile:
verfile.write('{0}.{1}... |
48cd23e15cad7ce6a3db916d2287df7dcd98b482 | setup.py | setup.py | #!/usr/bin/env python
# -*- encoding: utf-8 -*-
import sys
from setuptools import setup, find_packages
from setuptools.command.test import test as TestCommand
class PyTest(TestCommand):
user_options = [('pytest-args=', 'a', "Arguments to pass to py.test")]
def initialize_options(self):
TestCommand.in... | #!/usr/bin/env python
# -*- encoding: utf-8 -*-
import sys
from setuptools import setup, find_packages
from setuptools.command.test import test as TestCommand
class PyTest(TestCommand):
user_options = [('pytest-args=', 'a', "Arguments to pass to py.test")]
def initialize_options(self):
TestCommand.in... | Set the version from gocd_cli instead of gocd | Set the version from gocd_cli instead of gocd
| Python | mit | gaqzi/py-gocd-cli,gaqzi/gocd-cli | #!/usr/bin/env python
# -*- encoding: utf-8 -*-
import sys
from setuptools import setup, find_packages
from setuptools.command.test import test as TestCommand
class PyTest(TestCommand):
user_options = [('pytest-args=', 'a', "Arguments to pass to py.test")]
def initialize_options(self):
TestCommand.in... | #!/usr/bin/env python
# -*- encoding: utf-8 -*-
import sys
from setuptools import setup, find_packages
from setuptools.command.test import test as TestCommand
class PyTest(TestCommand):
user_options = [('pytest-args=', 'a', "Arguments to pass to py.test")]
def initialize_options(self):
TestCommand.in... | <commit_before>#!/usr/bin/env python
# -*- encoding: utf-8 -*-
import sys
from setuptools import setup, find_packages
from setuptools.command.test import test as TestCommand
class PyTest(TestCommand):
user_options = [('pytest-args=', 'a', "Arguments to pass to py.test")]
def initialize_options(self):
... | #!/usr/bin/env python
# -*- encoding: utf-8 -*-
import sys
from setuptools import setup, find_packages
from setuptools.command.test import test as TestCommand
class PyTest(TestCommand):
user_options = [('pytest-args=', 'a', "Arguments to pass to py.test")]
def initialize_options(self):
TestCommand.in... | #!/usr/bin/env python
# -*- encoding: utf-8 -*-
import sys
from setuptools import setup, find_packages
from setuptools.command.test import test as TestCommand
class PyTest(TestCommand):
user_options = [('pytest-args=', 'a', "Arguments to pass to py.test")]
def initialize_options(self):
TestCommand.in... | <commit_before>#!/usr/bin/env python
# -*- encoding: utf-8 -*-
import sys
from setuptools import setup, find_packages
from setuptools.command.test import test as TestCommand
class PyTest(TestCommand):
user_options = [('pytest-args=', 'a', "Arguments to pass to py.test")]
def initialize_options(self):
... |
e05a0bbe3b49c1e90aa245c52aab982ef49c8c26 | setup.py | setup.py | import sys
from setuptools import setup, find_packages
import querylist
unittest2_module = ''
if sys.version_info < (2, 7):
# spec causes python setup.py test to fail. This import fixes that for
# some reason.
import multiprocessing # noqa
# If we're still on python 2.6, we need unittest2
uni... | import sys
from setuptools import setup, find_packages
import querylist
tests_require = [
'nose>=1.3.6,<1.4',
'spec>=1.2.2,<1.3',
]
if sys.version_info < (2, 7):
# spec causes python setup.py test to fail. This import fixes that for
# some reason.
import multiprocessing # noqa
# If we're ... | Fix issue with building the wheel | Fix issue with building the wheel
The build trips on an empty string requirement, throwing:
```
$ python setup.py sdist bdist_wheel
...
ValueError: ('No requirements found', '')
```
| Python | mit | thomasw/querylist | import sys
from setuptools import setup, find_packages
import querylist
unittest2_module = ''
if sys.version_info < (2, 7):
# spec causes python setup.py test to fail. This import fixes that for
# some reason.
import multiprocessing # noqa
# If we're still on python 2.6, we need unittest2
uni... | import sys
from setuptools import setup, find_packages
import querylist
tests_require = [
'nose>=1.3.6,<1.4',
'spec>=1.2.2,<1.3',
]
if sys.version_info < (2, 7):
# spec causes python setup.py test to fail. This import fixes that for
# some reason.
import multiprocessing # noqa
# If we're ... | <commit_before>import sys
from setuptools import setup, find_packages
import querylist
unittest2_module = ''
if sys.version_info < (2, 7):
# spec causes python setup.py test to fail. This import fixes that for
# some reason.
import multiprocessing # noqa
# If we're still on python 2.6, we need un... | import sys
from setuptools import setup, find_packages
import querylist
tests_require = [
'nose>=1.3.6,<1.4',
'spec>=1.2.2,<1.3',
]
if sys.version_info < (2, 7):
# spec causes python setup.py test to fail. This import fixes that for
# some reason.
import multiprocessing # noqa
# If we're ... | import sys
from setuptools import setup, find_packages
import querylist
unittest2_module = ''
if sys.version_info < (2, 7):
# spec causes python setup.py test to fail. This import fixes that for
# some reason.
import multiprocessing # noqa
# If we're still on python 2.6, we need unittest2
uni... | <commit_before>import sys
from setuptools import setup, find_packages
import querylist
unittest2_module = ''
if sys.version_info < (2, 7):
# spec causes python setup.py test to fail. This import fixes that for
# some reason.
import multiprocessing # noqa
# If we're still on python 2.6, we need un... |
7f72ac060bef98faa09fc729707cee5d0bafbf87 | setup.py | setup.py | # -*-coding:utf-8-*-
from setuptools import setup
setup(
name="rocketchat_API",
version="1.12.0",
packages=["rocketchat_API", "rocketchat_API.APIExceptions"],
url="https://github.com/jadolg/rocketchat_API",
license="MIT",
author="Jorge Alberto Díaz Orozco",
author_email="diazorozcoj@gmail.... | # -*-coding:utf-8-*-
from setuptools import setup
setup(
name="rocketchat_API",
version="1.12.1",
packages=["rocketchat_API", "rocketchat_API.APIExceptions", "rocketchat_API.APISections"],
url="https://github.com/jadolg/rocketchat_API",
license="MIT",
author="Jorge Alberto Díaz Orozco",
au... | Add APISections to the python package | Add APISections to the python package
| Python | mit | jadolg/rocketchat_API | # -*-coding:utf-8-*-
from setuptools import setup
setup(
name="rocketchat_API",
version="1.12.0",
packages=["rocketchat_API", "rocketchat_API.APIExceptions"],
url="https://github.com/jadolg/rocketchat_API",
license="MIT",
author="Jorge Alberto Díaz Orozco",
author_email="diazorozcoj@gmail.... | # -*-coding:utf-8-*-
from setuptools import setup
setup(
name="rocketchat_API",
version="1.12.1",
packages=["rocketchat_API", "rocketchat_API.APIExceptions", "rocketchat_API.APISections"],
url="https://github.com/jadolg/rocketchat_API",
license="MIT",
author="Jorge Alberto Díaz Orozco",
au... | <commit_before># -*-coding:utf-8-*-
from setuptools import setup
setup(
name="rocketchat_API",
version="1.12.0",
packages=["rocketchat_API", "rocketchat_API.APIExceptions"],
url="https://github.com/jadolg/rocketchat_API",
license="MIT",
author="Jorge Alberto Díaz Orozco",
author_email="dia... | # -*-coding:utf-8-*-
from setuptools import setup
setup(
name="rocketchat_API",
version="1.12.1",
packages=["rocketchat_API", "rocketchat_API.APIExceptions", "rocketchat_API.APISections"],
url="https://github.com/jadolg/rocketchat_API",
license="MIT",
author="Jorge Alberto Díaz Orozco",
au... | # -*-coding:utf-8-*-
from setuptools import setup
setup(
name="rocketchat_API",
version="1.12.0",
packages=["rocketchat_API", "rocketchat_API.APIExceptions"],
url="https://github.com/jadolg/rocketchat_API",
license="MIT",
author="Jorge Alberto Díaz Orozco",
author_email="diazorozcoj@gmail.... | <commit_before># -*-coding:utf-8-*-
from setuptools import setup
setup(
name="rocketchat_API",
version="1.12.0",
packages=["rocketchat_API", "rocketchat_API.APIExceptions"],
url="https://github.com/jadolg/rocketchat_API",
license="MIT",
author="Jorge Alberto Díaz Orozco",
author_email="dia... |
268976034ad508c2ef48dec60da40dec57af824f | setup.py | setup.py | from distutils.core import setup
from distutils.extension import Extension
from Cython.Distutils import build_ext
setup(
name = "DragonCreole",
packages = ["dragoncreole"],
version = "0.1.0",
description = "Optimized parser for creole-like markup language",
author = "Zauber Paracelsus",
author_email = "admin@zau... | from distutils.core import setup
from distutils.extension import Extension
from Cython.Distutils import build_ext
setup(
name = "DragonCreole",
packages = ["dragoncreole"],
version = "0.1.0",
description = "Optimized parser for creole-like markup language",
author = "Zauber Paracelsus",
author_email = "admin@zau... | Tweak for building with cython | Tweak for building with cython
| Python | mpl-2.0 | zauberparacelsus/dragoncreole,zauberparacelsus/dragoncreole | from distutils.core import setup
from distutils.extension import Extension
from Cython.Distutils import build_ext
setup(
name = "DragonCreole",
packages = ["dragoncreole"],
version = "0.1.0",
description = "Optimized parser for creole-like markup language",
author = "Zauber Paracelsus",
author_email = "admin@zau... | from distutils.core import setup
from distutils.extension import Extension
from Cython.Distutils import build_ext
setup(
name = "DragonCreole",
packages = ["dragoncreole"],
version = "0.1.0",
description = "Optimized parser for creole-like markup language",
author = "Zauber Paracelsus",
author_email = "admin@zau... | <commit_before>from distutils.core import setup
from distutils.extension import Extension
from Cython.Distutils import build_ext
setup(
name = "DragonCreole",
packages = ["dragoncreole"],
version = "0.1.0",
description = "Optimized parser for creole-like markup language",
author = "Zauber Paracelsus",
author_ema... | from distutils.core import setup
from distutils.extension import Extension
from Cython.Distutils import build_ext
setup(
name = "DragonCreole",
packages = ["dragoncreole"],
version = "0.1.0",
description = "Optimized parser for creole-like markup language",
author = "Zauber Paracelsus",
author_email = "admin@zau... | from distutils.core import setup
from distutils.extension import Extension
from Cython.Distutils import build_ext
setup(
name = "DragonCreole",
packages = ["dragoncreole"],
version = "0.1.0",
description = "Optimized parser for creole-like markup language",
author = "Zauber Paracelsus",
author_email = "admin@zau... | <commit_before>from distutils.core import setup
from distutils.extension import Extension
from Cython.Distutils import build_ext
setup(
name = "DragonCreole",
packages = ["dragoncreole"],
version = "0.1.0",
description = "Optimized parser for creole-like markup language",
author = "Zauber Paracelsus",
author_ema... |
ef1e44cb6a815b3fc86faf4d90fba407270aa02b | setup.py | setup.py | from setuptools import setup
exec([l for l in open("flask_mwoauth/__init__.py") if l.startswith('__version__')][0])
setup(name='flask-mwoauth',
version=__version__,
description='Flask blueprint to connect to a MediaWiki OAuth server',
url='http://github.com/valhallasw/flask-mwoauth',
author='M... | from setuptools import setup
exec([l for l in open("flask_mwoauth/__init__.py")
if l.startswith('__version__')][0])
setup(name='flask-mwoauth',
version=__version__,
description='Flask blueprint to connect to a MediaWiki OAuth server',
url='http://github.com/valhallasw/flask-mwoauth',
aut... | Add requests module in the dependencies | Add requests module in the dependencies
| Python | mit | sitic/flask-mwoauth,valhallasw/flask-mwoauth,sitic/flask-mwoauth,valhallasw/flask-mwoauth | from setuptools import setup
exec([l for l in open("flask_mwoauth/__init__.py") if l.startswith('__version__')][0])
setup(name='flask-mwoauth',
version=__version__,
description='Flask blueprint to connect to a MediaWiki OAuth server',
url='http://github.com/valhallasw/flask-mwoauth',
author='M... | from setuptools import setup
exec([l for l in open("flask_mwoauth/__init__.py")
if l.startswith('__version__')][0])
setup(name='flask-mwoauth',
version=__version__,
description='Flask blueprint to connect to a MediaWiki OAuth server',
url='http://github.com/valhallasw/flask-mwoauth',
aut... | <commit_before>from setuptools import setup
exec([l for l in open("flask_mwoauth/__init__.py") if l.startswith('__version__')][0])
setup(name='flask-mwoauth',
version=__version__,
description='Flask blueprint to connect to a MediaWiki OAuth server',
url='http://github.com/valhallasw/flask-mwoauth',
... | from setuptools import setup
exec([l for l in open("flask_mwoauth/__init__.py")
if l.startswith('__version__')][0])
setup(name='flask-mwoauth',
version=__version__,
description='Flask blueprint to connect to a MediaWiki OAuth server',
url='http://github.com/valhallasw/flask-mwoauth',
aut... | from setuptools import setup
exec([l for l in open("flask_mwoauth/__init__.py") if l.startswith('__version__')][0])
setup(name='flask-mwoauth',
version=__version__,
description='Flask blueprint to connect to a MediaWiki OAuth server',
url='http://github.com/valhallasw/flask-mwoauth',
author='M... | <commit_before>from setuptools import setup
exec([l for l in open("flask_mwoauth/__init__.py") if l.startswith('__version__')][0])
setup(name='flask-mwoauth',
version=__version__,
description='Flask blueprint to connect to a MediaWiki OAuth server',
url='http://github.com/valhallasw/flask-mwoauth',
... |
8d034ca0c30166ec3972d0f8db83e00ff4f8055f | setup.py | setup.py | from distutils.core import setup
setup(name='steamfootbridge',
version='0.0.1',
packages=['steamfootbridge'],
scripts=['bin/steamfootbridge'],
)
| from setuptools import setup
setup(name='steamfootbridge',
version='0.0.1',
packages=['steamfootbridge'],
scripts=['bin/steamfootbridge'],
install_requires=[
'steamodd',
],
)
| Convert Python installation to PyPi | Convert Python installation to PyPi
This does mean python-pip or similar will need to be installed on the
system.
| Python | mit | sirnuke/steamfootbridge,sirnuke/steamfootbridge | from distutils.core import setup
setup(name='steamfootbridge',
version='0.0.1',
packages=['steamfootbridge'],
scripts=['bin/steamfootbridge'],
)
Convert Python installation to PyPi
This does mean python-pip or similar will need to be installed on the
system. | from setuptools import setup
setup(name='steamfootbridge',
version='0.0.1',
packages=['steamfootbridge'],
scripts=['bin/steamfootbridge'],
install_requires=[
'steamodd',
],
)
| <commit_before>from distutils.core import setup
setup(name='steamfootbridge',
version='0.0.1',
packages=['steamfootbridge'],
scripts=['bin/steamfootbridge'],
)
<commit_msg>Convert Python installation to PyPi
This does mean python-pip or similar will need to be installed on the
system.<commit_after> | from setuptools import setup
setup(name='steamfootbridge',
version='0.0.1',
packages=['steamfootbridge'],
scripts=['bin/steamfootbridge'],
install_requires=[
'steamodd',
],
)
| from distutils.core import setup
setup(name='steamfootbridge',
version='0.0.1',
packages=['steamfootbridge'],
scripts=['bin/steamfootbridge'],
)
Convert Python installation to PyPi
This does mean python-pip or similar will need to be installed on the
system.from setuptools import setup
setup(name='... | <commit_before>from distutils.core import setup
setup(name='steamfootbridge',
version='0.0.1',
packages=['steamfootbridge'],
scripts=['bin/steamfootbridge'],
)
<commit_msg>Convert Python installation to PyPi
This does mean python-pip or similar will need to be installed on the
system.<commit_after>f... |
259396028862e4c7b2a00e2c908be2b8ffeee991 | setup.py | setup.py | #!/usr/bin/env python
import os
import distutils.core
import sys
try:
import setuptools
except ImportError:
pass
try:
license = open('LICENSE').read()
except:
license = None
def read(fname):
return open(os.path.join(os.path.dirname(__file__), fname)).read()
def desc():
info = read('README... | #!/usr/bin/env python
import os
import distutils.core
import sys
try:
import setuptools
except ImportError:
pass
try:
license = open('LICENSE').read()
except:
license = None
def read(fname):
return open(os.path.join(os.path.dirname(__file__), fname)).read()
def desc():
info = read('README... | Add the Python version and license classifiers | Add the Python version and license classifiers
Signed-off-by: Tomas Sedovic <[email protected]>
| Python | mit | codepython/sockjs-tornado,ImaginationForPeople/sockjs-tornado,codepython/sockjs-tornado,barseghyanartur/sockjs-tornado,mrjoes/sockjs-tornado,ImaginationForPeople/sockjs-tornado,DexterInd/sockjs-tornado,codepython/sockjs-tornado,MrJoes/sockjs-tornado,DexterInd/sockjs-tornado,pjknkda/sockjs-tornado,DexterInd/sockjs-torna... | #!/usr/bin/env python
import os
import distutils.core
import sys
try:
import setuptools
except ImportError:
pass
try:
license = open('LICENSE').read()
except:
license = None
def read(fname):
return open(os.path.join(os.path.dirname(__file__), fname)).read()
def desc():
info = read('README... | #!/usr/bin/env python
import os
import distutils.core
import sys
try:
import setuptools
except ImportError:
pass
try:
license = open('LICENSE').read()
except:
license = None
def read(fname):
return open(os.path.join(os.path.dirname(__file__), fname)).read()
def desc():
info = read('README... | <commit_before>#!/usr/bin/env python
import os
import distutils.core
import sys
try:
import setuptools
except ImportError:
pass
try:
license = open('LICENSE').read()
except:
license = None
def read(fname):
return open(os.path.join(os.path.dirname(__file__), fname)).read()
def desc():
info... | #!/usr/bin/env python
import os
import distutils.core
import sys
try:
import setuptools
except ImportError:
pass
try:
license = open('LICENSE').read()
except:
license = None
def read(fname):
return open(os.path.join(os.path.dirname(__file__), fname)).read()
def desc():
info = read('README... | #!/usr/bin/env python
import os
import distutils.core
import sys
try:
import setuptools
except ImportError:
pass
try:
license = open('LICENSE').read()
except:
license = None
def read(fname):
return open(os.path.join(os.path.dirname(__file__), fname)).read()
def desc():
info = read('README... | <commit_before>#!/usr/bin/env python
import os
import distutils.core
import sys
try:
import setuptools
except ImportError:
pass
try:
license = open('LICENSE').read()
except:
license = None
def read(fname):
return open(os.path.join(os.path.dirname(__file__), fname)).read()
def desc():
info... |
9487887223be3a321c507e65210c2b651060fac3 | setup.py | setup.py | try:
from setuptools import setup
except ImportError:
from distutils.core import setup
requires = [
'requests',
'rauth'
]
setup(
name='fatsecret',
version='0.2.1',
description='Python wrapper for FatSecret REST API',
url='github.com/walexnelson/pyfatsecret',
license='MIT',
auth... | try:
from setuptools import setup
except ImportError:
from distutils.core import setup
requires = [
'requests',
'rauth'
]
setup(
name='fatsecret',
version='0.2.1',
description='Python wrapper for FatSecret REST API',
url='github.com/walexnelson/pyfatsecret',
license='MIT',
auth... | Use packaging instead of a module | Use packaging instead of a module | Python | mit | walexnelson/pyfatsecret | try:
from setuptools import setup
except ImportError:
from distutils.core import setup
requires = [
'requests',
'rauth'
]
setup(
name='fatsecret',
version='0.2.1',
description='Python wrapper for FatSecret REST API',
url='github.com/walexnelson/pyfatsecret',
license='MIT',
auth... | try:
from setuptools import setup
except ImportError:
from distutils.core import setup
requires = [
'requests',
'rauth'
]
setup(
name='fatsecret',
version='0.2.1',
description='Python wrapper for FatSecret REST API',
url='github.com/walexnelson/pyfatsecret',
license='MIT',
auth... | <commit_before>try:
from setuptools import setup
except ImportError:
from distutils.core import setup
requires = [
'requests',
'rauth'
]
setup(
name='fatsecret',
version='0.2.1',
description='Python wrapper for FatSecret REST API',
url='github.com/walexnelson/pyfatsecret',
license=... | try:
from setuptools import setup
except ImportError:
from distutils.core import setup
requires = [
'requests',
'rauth'
]
setup(
name='fatsecret',
version='0.2.1',
description='Python wrapper for FatSecret REST API',
url='github.com/walexnelson/pyfatsecret',
license='MIT',
auth... | try:
from setuptools import setup
except ImportError:
from distutils.core import setup
requires = [
'requests',
'rauth'
]
setup(
name='fatsecret',
version='0.2.1',
description='Python wrapper for FatSecret REST API',
url='github.com/walexnelson/pyfatsecret',
license='MIT',
auth... | <commit_before>try:
from setuptools import setup
except ImportError:
from distutils.core import setup
requires = [
'requests',
'rauth'
]
setup(
name='fatsecret',
version='0.2.1',
description='Python wrapper for FatSecret REST API',
url='github.com/walexnelson/pyfatsecret',
license=... |
9c9319516875875707f1d922d9dd20d9f2c1ce6e | setup.py | setup.py | from setuptools import setup
from util import __version__
setup(
name="util",
author="Olav Vahtras",
author_email="[email protected]",
version=__version__,
url="https://github.com/vahtras/util",
packages=["util"],
install_requires=["numpy", "scipy"],
)
| from setuptools import setup
from util import __version__
setup(
name="blocked-matrix-utils",
author="Olav Vahtras",
author_email="[email protected]",
version=__version__,
url="https://github.com/vahtras/util",
packages=["util"],
install_requires=["numpy", "scipy"],
)
| Change name taken in pypi | Change name taken in pypi
| Python | mit | vahtras/util | from setuptools import setup
from util import __version__
setup(
name="util",
author="Olav Vahtras",
author_email="[email protected]",
version=__version__,
url="https://github.com/vahtras/util",
packages=["util"],
install_requires=["numpy", "scipy"],
)
Change name taken in pypi | from setuptools import setup
from util import __version__
setup(
name="blocked-matrix-utils",
author="Olav Vahtras",
author_email="[email protected]",
version=__version__,
url="https://github.com/vahtras/util",
packages=["util"],
install_requires=["numpy", "scipy"],
)
| <commit_before>from setuptools import setup
from util import __version__
setup(
name="util",
author="Olav Vahtras",
author_email="[email protected]",
version=__version__,
url="https://github.com/vahtras/util",
packages=["util"],
install_requires=["numpy", "scipy"],
)
<commit_msg>Change... | from setuptools import setup
from util import __version__
setup(
name="blocked-matrix-utils",
author="Olav Vahtras",
author_email="[email protected]",
version=__version__,
url="https://github.com/vahtras/util",
packages=["util"],
install_requires=["numpy", "scipy"],
)
| from setuptools import setup
from util import __version__
setup(
name="util",
author="Olav Vahtras",
author_email="[email protected]",
version=__version__,
url="https://github.com/vahtras/util",
packages=["util"],
install_requires=["numpy", "scipy"],
)
Change name taken in pypifrom set... | <commit_before>from setuptools import setup
from util import __version__
setup(
name="util",
author="Olav Vahtras",
author_email="[email protected]",
version=__version__,
url="https://github.com/vahtras/util",
packages=["util"],
install_requires=["numpy", "scipy"],
)
<commit_msg>Change... |
f84846b223bbf903de0dd261dd2c02f7a971d929 | setup.py | setup.py | #!/usr/bin/env python
from distutils.core import setup
setup(name = 'pymoira',
version = '0.9',
description = 'Client library for MIT Moira service managment system protocol',
author = 'Victor Vasiliev',
author_email = '[email protected]',
url = 'https://github.com/vasilvv/pymoira',
... | #!/usr/bin/env python
from distutils.core import setup
setup(name = 'pymoira',
version = '0.9',
description = 'Client library for MIT Moira service managment system protocol',
author = 'Victor Vasiliev',
author_email = '[email protected]',
url = 'https://github.com/vasilvv/pymoira',
... | Fix a stupid mistake in an installer. | Fix a stupid mistake in an installer.
| Python | mit | vasilvv/pymoira | #!/usr/bin/env python
from distutils.core import setup
setup(name = 'pymoira',
version = '0.9',
description = 'Client library for MIT Moira service managment system protocol',
author = 'Victor Vasiliev',
author_email = '[email protected]',
url = 'https://github.com/vasilvv/pymoira',
... | #!/usr/bin/env python
from distutils.core import setup
setup(name = 'pymoira',
version = '0.9',
description = 'Client library for MIT Moira service managment system protocol',
author = 'Victor Vasiliev',
author_email = '[email protected]',
url = 'https://github.com/vasilvv/pymoira',
... | <commit_before>#!/usr/bin/env python
from distutils.core import setup
setup(name = 'pymoira',
version = '0.9',
description = 'Client library for MIT Moira service managment system protocol',
author = 'Victor Vasiliev',
author_email = '[email protected]',
url = 'https://github.com/vasilvv/p... | #!/usr/bin/env python
from distutils.core import setup
setup(name = 'pymoira',
version = '0.9',
description = 'Client library for MIT Moira service managment system protocol',
author = 'Victor Vasiliev',
author_email = '[email protected]',
url = 'https://github.com/vasilvv/pymoira',
... | #!/usr/bin/env python
from distutils.core import setup
setup(name = 'pymoira',
version = '0.9',
description = 'Client library for MIT Moira service managment system protocol',
author = 'Victor Vasiliev',
author_email = '[email protected]',
url = 'https://github.com/vasilvv/pymoira',
... | <commit_before>#!/usr/bin/env python
from distutils.core import setup
setup(name = 'pymoira',
version = '0.9',
description = 'Client library for MIT Moira service managment system protocol',
author = 'Victor Vasiliev',
author_email = '[email protected]',
url = 'https://github.com/vasilvv/p... |
1f03b2945b4e52ce22a3b9e6143d02d3bd9aef99 | overtime_calculator/tests/auth_test.py | overtime_calculator/tests/auth_test.py | import shutil
import pytest
import hug
from overtime_calculator.src import api
from overtime_calculator.src.auth import get_user_folder
def test_register():
user_name = 'test1'
response = hug.test.post(
api,
'/register',
{'username': user_name, 'password': user_name},
)
asser... | import shutil
import pytest
import hug
from overtime_calculator.src import api
from overtime_calculator.src.auth import get_user_folder
EXISTING_USER = 'test1'
UNREGISTERED_USER = 'test2'
def test_registration_of_new_user():
response = hug.test.post(
api,
'/register',
{'username': EXIST... | Add test for already registered user | Feature: Add test for already registered user
| Python | mit | x10an14/overtime-calculator | import shutil
import pytest
import hug
from overtime_calculator.src import api
from overtime_calculator.src.auth import get_user_folder
def test_register():
user_name = 'test1'
response = hug.test.post(
api,
'/register',
{'username': user_name, 'password': user_name},
)
asser... | import shutil
import pytest
import hug
from overtime_calculator.src import api
from overtime_calculator.src.auth import get_user_folder
EXISTING_USER = 'test1'
UNREGISTERED_USER = 'test2'
def test_registration_of_new_user():
response = hug.test.post(
api,
'/register',
{'username': EXIST... | <commit_before>import shutil
import pytest
import hug
from overtime_calculator.src import api
from overtime_calculator.src.auth import get_user_folder
def test_register():
user_name = 'test1'
response = hug.test.post(
api,
'/register',
{'username': user_name, 'password': user_name},
... | import shutil
import pytest
import hug
from overtime_calculator.src import api
from overtime_calculator.src.auth import get_user_folder
EXISTING_USER = 'test1'
UNREGISTERED_USER = 'test2'
def test_registration_of_new_user():
response = hug.test.post(
api,
'/register',
{'username': EXIST... | import shutil
import pytest
import hug
from overtime_calculator.src import api
from overtime_calculator.src.auth import get_user_folder
def test_register():
user_name = 'test1'
response = hug.test.post(
api,
'/register',
{'username': user_name, 'password': user_name},
)
asser... | <commit_before>import shutil
import pytest
import hug
from overtime_calculator.src import api
from overtime_calculator.src.auth import get_user_folder
def test_register():
user_name = 'test1'
response = hug.test.post(
api,
'/register',
{'username': user_name, 'password': user_name},
... |
77ee44b0af8a80babf0a88ddd4f53f2f4ad10d2d | tests/test_event.py | tests/test_event.py | import unittest
from evesp.event import Event
class TestEvent(unittest.TestCase):
def setUp(self):
self.evt = Event(foo='bar')
def test_event_creation(self):
self.assertEqual(self.evt.foo, 'bar')
self.assertRaises(AttributeError, getattr, self.evt, 'non_existing')
def test_event_... | import unittest
from evesp.event import Event
class TestEvent(unittest.TestCase):
def setUp(self):
self.evt = Event(foo='bar')
def test_event_creation(self):
self.assertEqual(self.evt.foo, 'bar')
def test_non_existing_event(self):
self.assertRaises(AttributeError, getattr, self.e... | Split one test into two tests | Split one test into two tests
| Python | apache-2.0 | BlackLight/evesp | import unittest
from evesp.event import Event
class TestEvent(unittest.TestCase):
def setUp(self):
self.evt = Event(foo='bar')
def test_event_creation(self):
self.assertEqual(self.evt.foo, 'bar')
self.assertRaises(AttributeError, getattr, self.evt, 'non_existing')
def test_event_... | import unittest
from evesp.event import Event
class TestEvent(unittest.TestCase):
def setUp(self):
self.evt = Event(foo='bar')
def test_event_creation(self):
self.assertEqual(self.evt.foo, 'bar')
def test_non_existing_event(self):
self.assertRaises(AttributeError, getattr, self.e... | <commit_before>import unittest
from evesp.event import Event
class TestEvent(unittest.TestCase):
def setUp(self):
self.evt = Event(foo='bar')
def test_event_creation(self):
self.assertEqual(self.evt.foo, 'bar')
self.assertRaises(AttributeError, getattr, self.evt, 'non_existing')
... | import unittest
from evesp.event import Event
class TestEvent(unittest.TestCase):
def setUp(self):
self.evt = Event(foo='bar')
def test_event_creation(self):
self.assertEqual(self.evt.foo, 'bar')
def test_non_existing_event(self):
self.assertRaises(AttributeError, getattr, self.e... | import unittest
from evesp.event import Event
class TestEvent(unittest.TestCase):
def setUp(self):
self.evt = Event(foo='bar')
def test_event_creation(self):
self.assertEqual(self.evt.foo, 'bar')
self.assertRaises(AttributeError, getattr, self.evt, 'non_existing')
def test_event_... | <commit_before>import unittest
from evesp.event import Event
class TestEvent(unittest.TestCase):
def setUp(self):
self.evt = Event(foo='bar')
def test_event_creation(self):
self.assertEqual(self.evt.foo, 'bar')
self.assertRaises(AttributeError, getattr, self.evt, 'non_existing')
... |
a27b03a89af6442dc8e1be3d310a8fc046a98ed4 | foampy/tests.py | foampy/tests.py | """
Tests for foamPy.
"""
from .core import *
from .dictionaries import *
from .types import *
from .foil import *
| """Tests for foamPy."""
from .core import *
from .dictionaries import *
from .types import *
from .foil import *
def test_load_all_torque_drag():
"""Test the `load_all_torque_drag` function."""
t, torque, drag = load_all_torque_drag(casedir="test")
assert t.max() == 4.0
| Add test for loading all torque and drag data | Add test for loading all torque and drag data
| Python | mit | petebachant/foamPy,petebachant/foamPy,petebachant/foamPy | """
Tests for foamPy.
"""
from .core import *
from .dictionaries import *
from .types import *
from .foil import *
Add test for loading all torque and drag data | """Tests for foamPy."""
from .core import *
from .dictionaries import *
from .types import *
from .foil import *
def test_load_all_torque_drag():
"""Test the `load_all_torque_drag` function."""
t, torque, drag = load_all_torque_drag(casedir="test")
assert t.max() == 4.0
| <commit_before>"""
Tests for foamPy.
"""
from .core import *
from .dictionaries import *
from .types import *
from .foil import *
<commit_msg>Add test for loading all torque and drag data<commit_after> | """Tests for foamPy."""
from .core import *
from .dictionaries import *
from .types import *
from .foil import *
def test_load_all_torque_drag():
"""Test the `load_all_torque_drag` function."""
t, torque, drag = load_all_torque_drag(casedir="test")
assert t.max() == 4.0
| """
Tests for foamPy.
"""
from .core import *
from .dictionaries import *
from .types import *
from .foil import *
Add test for loading all torque and drag data"""Tests for foamPy."""
from .core import *
from .dictionaries import *
from .types import *
from .foil import *
def test_load_all_torque_drag():
"""Tes... | <commit_before>"""
Tests for foamPy.
"""
from .core import *
from .dictionaries import *
from .types import *
from .foil import *
<commit_msg>Add test for loading all torque and drag data<commit_after>"""Tests for foamPy."""
from .core import *
from .dictionaries import *
from .types import *
from .foil import *
de... |
f2d91d2c296e3662a1b656f0fdf5191665ff363b | skimage/transform/__init__.py | skimage/transform/__init__.py | from .hough_transform import *
from .radon_transform import *
from .finite_radon_transform import *
from .integral import *
from ._geometric import (warp, warp_coords, estimate_transform,
SimilarityTransform, AffineTransform,
ProjectiveTransform, PolynomialTransform,
... | from .hough_transform import *
from .radon_transform import *
from .finite_radon_transform import *
from .integral import *
from ._geometric import (warp, warp_coords, estimate_transform,
SimilarityTransform, AffineTransform,
ProjectiveTransform, PolynomialTransform,
... | Remove deprecated import of hompgraphy | Remove deprecated import of hompgraphy
| Python | bsd-3-clause | youprofit/scikit-image,almarklein/scikit-image,keflavich/scikit-image,pratapvardhan/scikit-image,vighneshbirodkar/scikit-image,almarklein/scikit-image,almarklein/scikit-image,chriscrosscutler/scikit-image,ajaybhat/scikit-image,SamHames/scikit-image,oew1v07/scikit-image,vighneshbirodkar/scikit-image,youprofit/scikit-ima... | from .hough_transform import *
from .radon_transform import *
from .finite_radon_transform import *
from .integral import *
from ._geometric import (warp, warp_coords, estimate_transform,
SimilarityTransform, AffineTransform,
ProjectiveTransform, PolynomialTransform,
... | from .hough_transform import *
from .radon_transform import *
from .finite_radon_transform import *
from .integral import *
from ._geometric import (warp, warp_coords, estimate_transform,
SimilarityTransform, AffineTransform,
ProjectiveTransform, PolynomialTransform,
... | <commit_before>from .hough_transform import *
from .radon_transform import *
from .finite_radon_transform import *
from .integral import *
from ._geometric import (warp, warp_coords, estimate_transform,
SimilarityTransform, AffineTransform,
ProjectiveTransform, Polynomi... | from .hough_transform import *
from .radon_transform import *
from .finite_radon_transform import *
from .integral import *
from ._geometric import (warp, warp_coords, estimate_transform,
SimilarityTransform, AffineTransform,
ProjectiveTransform, PolynomialTransform,
... | from .hough_transform import *
from .radon_transform import *
from .finite_radon_transform import *
from .integral import *
from ._geometric import (warp, warp_coords, estimate_transform,
SimilarityTransform, AffineTransform,
ProjectiveTransform, PolynomialTransform,
... | <commit_before>from .hough_transform import *
from .radon_transform import *
from .finite_radon_transform import *
from .integral import *
from ._geometric import (warp, warp_coords, estimate_transform,
SimilarityTransform, AffineTransform,
ProjectiveTransform, Polynomi... |
589534c52ceff1d4aabb8d72b779359ce2032827 | tests/integration/integration/runner.py | tests/integration/integration/runner.py | import os
import subprocess
def load_variables_from_env(prefix="XII_INTEGRATION_"):
length = len(prefix)
vars = {}
for var in filter(lambda x: x.startswith(prefix), os.environ):
vars[var[length:]] = os.environ[var]
return vars
def run_xii(deffile, cmd, variables={}, gargs=None, cargs=None)... | import os
import subprocess
def load_variables_from_env(prefix="XII_INTEGRATION_"):
length = len(prefix)
vars = {}
for var in filter(lambda x: x.startswith(prefix), os.environ):
vars[var[length:]] = os.environ[var]
return vars
def run_xii(deffile, cmd, variables={}, gargs=None, cargs=None)... | Make cargs and gargs truly optional | Make cargs and gargs truly optional
| Python | apache-2.0 | xii/xii,xii/xii | import os
import subprocess
def load_variables_from_env(prefix="XII_INTEGRATION_"):
length = len(prefix)
vars = {}
for var in filter(lambda x: x.startswith(prefix), os.environ):
vars[var[length:]] = os.environ[var]
return vars
def run_xii(deffile, cmd, variables={}, gargs=None, cargs=None)... | import os
import subprocess
def load_variables_from_env(prefix="XII_INTEGRATION_"):
length = len(prefix)
vars = {}
for var in filter(lambda x: x.startswith(prefix), os.environ):
vars[var[length:]] = os.environ[var]
return vars
def run_xii(deffile, cmd, variables={}, gargs=None, cargs=None)... | <commit_before>import os
import subprocess
def load_variables_from_env(prefix="XII_INTEGRATION_"):
length = len(prefix)
vars = {}
for var in filter(lambda x: x.startswith(prefix), os.environ):
vars[var[length:]] = os.environ[var]
return vars
def run_xii(deffile, cmd, variables={}, gargs=No... | import os
import subprocess
def load_variables_from_env(prefix="XII_INTEGRATION_"):
length = len(prefix)
vars = {}
for var in filter(lambda x: x.startswith(prefix), os.environ):
vars[var[length:]] = os.environ[var]
return vars
def run_xii(deffile, cmd, variables={}, gargs=None, cargs=None)... | import os
import subprocess
def load_variables_from_env(prefix="XII_INTEGRATION_"):
length = len(prefix)
vars = {}
for var in filter(lambda x: x.startswith(prefix), os.environ):
vars[var[length:]] = os.environ[var]
return vars
def run_xii(deffile, cmd, variables={}, gargs=None, cargs=None)... | <commit_before>import os
import subprocess
def load_variables_from_env(prefix="XII_INTEGRATION_"):
length = len(prefix)
vars = {}
for var in filter(lambda x: x.startswith(prefix), os.environ):
vars[var[length:]] = os.environ[var]
return vars
def run_xii(deffile, cmd, variables={}, gargs=No... |
705e9ee8ebe1a1c590ccbec8eed9d18abbf8e914 | tests/similarity/test_new_similarity.py | tests/similarity/test_new_similarity.py | import unittest
from similarity.nw_similarity import NWAlgorithm
class Test(unittest.TestCase):
def setUp(self):
pass
def tearDown(self):
pass
def test_nw_algorithm(self):
t = NWAlgorithm('abcdefghij', 'dgj')
t.print_matrix()
(a, b) = t.alignments()
prin... | import unittest
from similarity.nw_similarity import NWAlgorithm
class Test(unittest.TestCase):
def setUp(self):
pass
def tearDown(self):
pass
def test_nw_algorithm(self):
t = NWAlgorithm('abcdefghij', 'dgj')
t.print_matrix()
(a, b) = t.alignments()
prin... | Fix incorrect import reference to nw_similarity | Fix incorrect import reference to nw_similarity
| Python | mit | dpazel/tryinggithub | import unittest
from similarity.nw_similarity import NWAlgorithm
class Test(unittest.TestCase):
def setUp(self):
pass
def tearDown(self):
pass
def test_nw_algorithm(self):
t = NWAlgorithm('abcdefghij', 'dgj')
t.print_matrix()
(a, b) = t.alignments()
prin... | import unittest
from similarity.nw_similarity import NWAlgorithm
class Test(unittest.TestCase):
def setUp(self):
pass
def tearDown(self):
pass
def test_nw_algorithm(self):
t = NWAlgorithm('abcdefghij', 'dgj')
t.print_matrix()
(a, b) = t.alignments()
prin... | <commit_before>import unittest
from similarity.nw_similarity import NWAlgorithm
class Test(unittest.TestCase):
def setUp(self):
pass
def tearDown(self):
pass
def test_nw_algorithm(self):
t = NWAlgorithm('abcdefghij', 'dgj')
t.print_matrix()
(a, b) = t.alignments... | import unittest
from similarity.nw_similarity import NWAlgorithm
class Test(unittest.TestCase):
def setUp(self):
pass
def tearDown(self):
pass
def test_nw_algorithm(self):
t = NWAlgorithm('abcdefghij', 'dgj')
t.print_matrix()
(a, b) = t.alignments()
prin... | import unittest
from similarity.nw_similarity import NWAlgorithm
class Test(unittest.TestCase):
def setUp(self):
pass
def tearDown(self):
pass
def test_nw_algorithm(self):
t = NWAlgorithm('abcdefghij', 'dgj')
t.print_matrix()
(a, b) = t.alignments()
prin... | <commit_before>import unittest
from similarity.nw_similarity import NWAlgorithm
class Test(unittest.TestCase):
def setUp(self):
pass
def tearDown(self):
pass
def test_nw_algorithm(self):
t = NWAlgorithm('abcdefghij', 'dgj')
t.print_matrix()
(a, b) = t.alignments... |
b36f89088ab1270054140a3d3020960f23c9790b | aldryn_blog/cms_toolbar.py | aldryn_blog/cms_toolbar.py | # -*- coding: utf-8 -*-
from django.core.urlresolvers import reverse
from django.utils.translation import ugettext_lazy as _
from cms.toolbar_pool import toolbar_pool
from cms.toolbar_base import CMSToolbar
from aldryn_blog import request_post_identifier
@toolbar_pool.register
class BlogToolbar(CMSToolbar):
def... | # -*- coding: utf-8 -*-
from django.core.urlresolvers import reverse
from django.utils.translation import ugettext_lazy as _
from cms.toolbar_pool import toolbar_pool
from cms.toolbar_base import CMSToolbar
from aldryn_blog import request_post_identifier
@toolbar_pool.register
class BlogToolbar(CMSToolbar):
def... | Remove '?_popup' from toolbar urls | Remove '?_popup' from toolbar urls
| Python | bsd-3-clause | aldryn/aldryn-blog,aldryn/aldryn-blog | # -*- coding: utf-8 -*-
from django.core.urlresolvers import reverse
from django.utils.translation import ugettext_lazy as _
from cms.toolbar_pool import toolbar_pool
from cms.toolbar_base import CMSToolbar
from aldryn_blog import request_post_identifier
@toolbar_pool.register
class BlogToolbar(CMSToolbar):
def... | # -*- coding: utf-8 -*-
from django.core.urlresolvers import reverse
from django.utils.translation import ugettext_lazy as _
from cms.toolbar_pool import toolbar_pool
from cms.toolbar_base import CMSToolbar
from aldryn_blog import request_post_identifier
@toolbar_pool.register
class BlogToolbar(CMSToolbar):
def... | <commit_before># -*- coding: utf-8 -*-
from django.core.urlresolvers import reverse
from django.utils.translation import ugettext_lazy as _
from cms.toolbar_pool import toolbar_pool
from cms.toolbar_base import CMSToolbar
from aldryn_blog import request_post_identifier
@toolbar_pool.register
class BlogToolbar(CMSTo... | # -*- coding: utf-8 -*-
from django.core.urlresolvers import reverse
from django.utils.translation import ugettext_lazy as _
from cms.toolbar_pool import toolbar_pool
from cms.toolbar_base import CMSToolbar
from aldryn_blog import request_post_identifier
@toolbar_pool.register
class BlogToolbar(CMSToolbar):
def... | # -*- coding: utf-8 -*-
from django.core.urlresolvers import reverse
from django.utils.translation import ugettext_lazy as _
from cms.toolbar_pool import toolbar_pool
from cms.toolbar_base import CMSToolbar
from aldryn_blog import request_post_identifier
@toolbar_pool.register
class BlogToolbar(CMSToolbar):
def... | <commit_before># -*- coding: utf-8 -*-
from django.core.urlresolvers import reverse
from django.utils.translation import ugettext_lazy as _
from cms.toolbar_pool import toolbar_pool
from cms.toolbar_base import CMSToolbar
from aldryn_blog import request_post_identifier
@toolbar_pool.register
class BlogToolbar(CMSTo... |
33dd6ab01cea7a2a83d3d9d0c7682f716cbcb8b2 | molecule/default/tests/test_default.py | molecule/default/tests/test_default.py | import os
import testinfra.utils.ansible_runner
testinfra_hosts = testinfra.utils.ansible_runner.AnsibleRunner(
os.environ['MOLECULE_INVENTORY_FILE']).get_hosts('all')
def test_hosts_file(host):
f = host.file('/etc/hosts')
assert f.exists
assert f.user == 'root'
assert f.group == 'root'
def te... | import os
import testinfra.utils.ansible_runner
testinfra_hosts = testinfra.utils.ansible_runner.AnsibleRunner(
os.environ['MOLECULE_INVENTORY_FILE']).get_hosts('all')
def test_hosts_file(host):
"""Basic checks on the host."""
f = host.file('/etc/hosts')
assert f.exists
assert f.user == 'root'
... | Fix lint errors in tests | Fix lint errors in tests
| Python | apache-2.0 | brucellino/cvmfs-client-2.2,brucellino/cvmfs-client-2.2,AAROC/cvmfs-client-2.2,AAROC/cvmfs-client-2.2 | import os
import testinfra.utils.ansible_runner
testinfra_hosts = testinfra.utils.ansible_runner.AnsibleRunner(
os.environ['MOLECULE_INVENTORY_FILE']).get_hosts('all')
def test_hosts_file(host):
f = host.file('/etc/hosts')
assert f.exists
assert f.user == 'root'
assert f.group == 'root'
def te... | import os
import testinfra.utils.ansible_runner
testinfra_hosts = testinfra.utils.ansible_runner.AnsibleRunner(
os.environ['MOLECULE_INVENTORY_FILE']).get_hosts('all')
def test_hosts_file(host):
"""Basic checks on the host."""
f = host.file('/etc/hosts')
assert f.exists
assert f.user == 'root'
... | <commit_before>import os
import testinfra.utils.ansible_runner
testinfra_hosts = testinfra.utils.ansible_runner.AnsibleRunner(
os.environ['MOLECULE_INVENTORY_FILE']).get_hosts('all')
def test_hosts_file(host):
f = host.file('/etc/hosts')
assert f.exists
assert f.user == 'root'
assert f.group ==... | import os
import testinfra.utils.ansible_runner
testinfra_hosts = testinfra.utils.ansible_runner.AnsibleRunner(
os.environ['MOLECULE_INVENTORY_FILE']).get_hosts('all')
def test_hosts_file(host):
"""Basic checks on the host."""
f = host.file('/etc/hosts')
assert f.exists
assert f.user == 'root'
... | import os
import testinfra.utils.ansible_runner
testinfra_hosts = testinfra.utils.ansible_runner.AnsibleRunner(
os.environ['MOLECULE_INVENTORY_FILE']).get_hosts('all')
def test_hosts_file(host):
f = host.file('/etc/hosts')
assert f.exists
assert f.user == 'root'
assert f.group == 'root'
def te... | <commit_before>import os
import testinfra.utils.ansible_runner
testinfra_hosts = testinfra.utils.ansible_runner.AnsibleRunner(
os.environ['MOLECULE_INVENTORY_FILE']).get_hosts('all')
def test_hosts_file(host):
f = host.file('/etc/hosts')
assert f.exists
assert f.user == 'root'
assert f.group ==... |
7930f968830efd40e1fb200ef331f0c4d955db65 | api/base.py | api/base.py | from django.contrib.auth.models import User
from tastypie.resources import ModelResource
from tastypie import fields
from tastypie.authentication import BasicAuthentication
from tastypie.authorization import DjangoAuthorization, Authorization
from tastypie.constants import ALL, ALL_WITH_RELATIONS
from builds.models im... | from django.contrib.auth.models import User
from tastypie.resources import ModelResource
from tastypie import fields
from tastypie.authentication import BasicAuthentication
from tastypie.authorization import DjangoAuthorization, Authorization
from tastypie.constants import ALL, ALL_WITH_RELATIONS
from builds.models im... | Make API read-only and publically available. | Make API read-only and publically available.
| Python | mit | d0ugal/readthedocs.org,atsuyim/readthedocs.org,clarkperkins/readthedocs.org,soulshake/readthedocs.org,agjohnson/readthedocs.org,SteveViss/readthedocs.org,jerel/readthedocs.org,raven47git/readthedocs.org,rtfd/readthedocs.org,johncosta/private-readthedocs.org,ojii/readthedocs.org,Carreau/readthedocs.org,sid-kap/readthedo... | from django.contrib.auth.models import User
from tastypie.resources import ModelResource
from tastypie import fields
from tastypie.authentication import BasicAuthentication
from tastypie.authorization import DjangoAuthorization, Authorization
from tastypie.constants import ALL, ALL_WITH_RELATIONS
from builds.models im... | from django.contrib.auth.models import User
from tastypie.resources import ModelResource
from tastypie import fields
from tastypie.authentication import BasicAuthentication
from tastypie.authorization import DjangoAuthorization, Authorization
from tastypie.constants import ALL, ALL_WITH_RELATIONS
from builds.models im... | <commit_before>from django.contrib.auth.models import User
from tastypie.resources import ModelResource
from tastypie import fields
from tastypie.authentication import BasicAuthentication
from tastypie.authorization import DjangoAuthorization, Authorization
from tastypie.constants import ALL, ALL_WITH_RELATIONS
from b... | from django.contrib.auth.models import User
from tastypie.resources import ModelResource
from tastypie import fields
from tastypie.authentication import BasicAuthentication
from tastypie.authorization import DjangoAuthorization, Authorization
from tastypie.constants import ALL, ALL_WITH_RELATIONS
from builds.models im... | from django.contrib.auth.models import User
from tastypie.resources import ModelResource
from tastypie import fields
from tastypie.authentication import BasicAuthentication
from tastypie.authorization import DjangoAuthorization, Authorization
from tastypie.constants import ALL, ALL_WITH_RELATIONS
from builds.models im... | <commit_before>from django.contrib.auth.models import User
from tastypie.resources import ModelResource
from tastypie import fields
from tastypie.authentication import BasicAuthentication
from tastypie.authorization import DjangoAuthorization, Authorization
from tastypie.constants import ALL, ALL_WITH_RELATIONS
from b... |
12e044741e15534aad26238b50126d3b68f8a87d | tools/php2python.py | tools/php2python.py | #!/usr/bin/env python
# php2python.py - Converts PHP to Python using codegen.py
# Usage: php2python.py < input.php > output.py
import sys
sys.path.append('..')
from phply.phpparse import parser
from phply import pythonast
from ast import Module
from unparse import Unparser
input = sys.stdin
output = sys.stdout
bo... | #!/usr/bin/env python
# php2python.py - Converts PHP to Python using unparse.py
# Usage: php2python.py < input.php > output.py
import sys
sys.path.append('..')
from phply.phpparse import parser
from phply import pythonast
from ast import Module
from unparse import Unparser
input = sys.stdin
output = sys.stdout
bo... | Update comment to reflect switch to unparse.py | Update comment to reflect switch to unparse.py
| Python | bsd-3-clause | LocutusOfBorg/phply,andresriancho/phply,t-ashula/phply | #!/usr/bin/env python
# php2python.py - Converts PHP to Python using codegen.py
# Usage: php2python.py < input.php > output.py
import sys
sys.path.append('..')
from phply.phpparse import parser
from phply import pythonast
from ast import Module
from unparse import Unparser
input = sys.stdin
output = sys.stdout
bo... | #!/usr/bin/env python
# php2python.py - Converts PHP to Python using unparse.py
# Usage: php2python.py < input.php > output.py
import sys
sys.path.append('..')
from phply.phpparse import parser
from phply import pythonast
from ast import Module
from unparse import Unparser
input = sys.stdin
output = sys.stdout
bo... | <commit_before>#!/usr/bin/env python
# php2python.py - Converts PHP to Python using codegen.py
# Usage: php2python.py < input.php > output.py
import sys
sys.path.append('..')
from phply.phpparse import parser
from phply import pythonast
from ast import Module
from unparse import Unparser
input = sys.stdin
output =... | #!/usr/bin/env python
# php2python.py - Converts PHP to Python using unparse.py
# Usage: php2python.py < input.php > output.py
import sys
sys.path.append('..')
from phply.phpparse import parser
from phply import pythonast
from ast import Module
from unparse import Unparser
input = sys.stdin
output = sys.stdout
bo... | #!/usr/bin/env python
# php2python.py - Converts PHP to Python using codegen.py
# Usage: php2python.py < input.php > output.py
import sys
sys.path.append('..')
from phply.phpparse import parser
from phply import pythonast
from ast import Module
from unparse import Unparser
input = sys.stdin
output = sys.stdout
bo... | <commit_before>#!/usr/bin/env python
# php2python.py - Converts PHP to Python using codegen.py
# Usage: php2python.py < input.php > output.py
import sys
sys.path.append('..')
from phply.phpparse import parser
from phply import pythonast
from ast import Module
from unparse import Unparser
input = sys.stdin
output =... |
bd193b0fdb7fec412aed24ad8f4c6353372d634f | polling_stations/apps/data_collection/management/commands/import_westberks.py | polling_stations/apps/data_collection/management/commands/import_westberks.py | """
Import Wokingham Polling stations
"""
from data_collection.management.commands import BaseShpImporter, import_polling_station_shapefiles
class Command(BaseShpImporter):
"""
Imports the Polling Station data from Wokingham Council
"""
council_id = 'E06000037'
districts_name = 'polling_distri... | """
Import Wokingham Polling stations
"""
from data_collection.management.commands import BaseShpShpImporter
class Command(BaseShpShpImporter):
"""
Imports the Polling Station data from Wokingham Council
"""
council_id = 'E06000037'
districts_name = 'polling_districts'
stations_name = 'po... | Refactor West Berks to use new BaseShpShpImporter | Refactor West Berks to use new BaseShpShpImporter
| Python | bsd-3-clause | chris48s/UK-Polling-Stations,DemocracyClub/UK-Polling-Stations,andylolz/UK-Polling-Stations,andylolz/UK-Polling-Stations,chris48s/UK-Polling-Stations,DemocracyClub/UK-Polling-Stations,chris48s/UK-Polling-Stations,andylolz/UK-Polling-Stations,DemocracyClub/UK-Polling-Stations | """
Import Wokingham Polling stations
"""
from data_collection.management.commands import BaseShpImporter, import_polling_station_shapefiles
class Command(BaseShpImporter):
"""
Imports the Polling Station data from Wokingham Council
"""
council_id = 'E06000037'
districts_name = 'polling_distri... | """
Import Wokingham Polling stations
"""
from data_collection.management.commands import BaseShpShpImporter
class Command(BaseShpShpImporter):
"""
Imports the Polling Station data from Wokingham Council
"""
council_id = 'E06000037'
districts_name = 'polling_districts'
stations_name = 'po... | <commit_before>"""
Import Wokingham Polling stations
"""
from data_collection.management.commands import BaseShpImporter, import_polling_station_shapefiles
class Command(BaseShpImporter):
"""
Imports the Polling Station data from Wokingham Council
"""
council_id = 'E06000037'
districts_name = ... | """
Import Wokingham Polling stations
"""
from data_collection.management.commands import BaseShpShpImporter
class Command(BaseShpShpImporter):
"""
Imports the Polling Station data from Wokingham Council
"""
council_id = 'E06000037'
districts_name = 'polling_districts'
stations_name = 'po... | """
Import Wokingham Polling stations
"""
from data_collection.management.commands import BaseShpImporter, import_polling_station_shapefiles
class Command(BaseShpImporter):
"""
Imports the Polling Station data from Wokingham Council
"""
council_id = 'E06000037'
districts_name = 'polling_distri... | <commit_before>"""
Import Wokingham Polling stations
"""
from data_collection.management.commands import BaseShpImporter, import_polling_station_shapefiles
class Command(BaseShpImporter):
"""
Imports the Polling Station data from Wokingham Council
"""
council_id = 'E06000037'
districts_name = ... |
a08483b5fc55556b46c08e988ac297b1dffaed48 | app/utils/utilities.py | app/utils/utilities.py | from re import search
from flask import g
from flask_restplus import abort
from flask_httpauth import HTTPBasicAuth
from app.models.user import User
from instance.config import Config
auth = HTTPBasicAuth()
def validate_email(email):
''' Method to check that a valid email is provided '''
email_re = r"(^[a-zA-Z0... | from re import search
from flask import g, request
from flask_httpauth import HTTPTokenAuth
from app.models.user import User
auth = HTTPTokenAuth(scheme='Token')
def validate_email(email):
''' Method to check that a valid email is provided '''
email_re = r"(^[a-zA-Z0-9_.+-]+@[a-zA-Z0-9-]+\.[a-zA-Z0-9-.]+$)"
... | Implement HTTPTokenAuth Store user data in global | Implement HTTPTokenAuth
Store user data in global
| Python | mit | Elbertbiggs360/buckelist-api | from re import search
from flask import g
from flask_restplus import abort
from flask_httpauth import HTTPBasicAuth
from app.models.user import User
from instance.config import Config
auth = HTTPBasicAuth()
def validate_email(email):
''' Method to check that a valid email is provided '''
email_re = r"(^[a-zA-Z0... | from re import search
from flask import g, request
from flask_httpauth import HTTPTokenAuth
from app.models.user import User
auth = HTTPTokenAuth(scheme='Token')
def validate_email(email):
''' Method to check that a valid email is provided '''
email_re = r"(^[a-zA-Z0-9_.+-]+@[a-zA-Z0-9-]+\.[a-zA-Z0-9-.]+$)"
... | <commit_before>from re import search
from flask import g
from flask_restplus import abort
from flask_httpauth import HTTPBasicAuth
from app.models.user import User
from instance.config import Config
auth = HTTPBasicAuth()
def validate_email(email):
''' Method to check that a valid email is provided '''
email_re... | from re import search
from flask import g, request
from flask_httpauth import HTTPTokenAuth
from app.models.user import User
auth = HTTPTokenAuth(scheme='Token')
def validate_email(email):
''' Method to check that a valid email is provided '''
email_re = r"(^[a-zA-Z0-9_.+-]+@[a-zA-Z0-9-]+\.[a-zA-Z0-9-.]+$)"
... | from re import search
from flask import g
from flask_restplus import abort
from flask_httpauth import HTTPBasicAuth
from app.models.user import User
from instance.config import Config
auth = HTTPBasicAuth()
def validate_email(email):
''' Method to check that a valid email is provided '''
email_re = r"(^[a-zA-Z0... | <commit_before>from re import search
from flask import g
from flask_restplus import abort
from flask_httpauth import HTTPBasicAuth
from app.models.user import User
from instance.config import Config
auth = HTTPBasicAuth()
def validate_email(email):
''' Method to check that a valid email is provided '''
email_re... |
e2e494c30b2305b736423ce903103c3b7a459270 | app/template/rest.py | app/template/rest.py | from flask import Blueprint
from flask import (jsonify)
from sqlalchemy.exc import DataError
from sqlalchemy.orm.exc import NoResultFound
from app.dao.templates_dao import get_model_templates
from app.schemas import (template_schema, templates_schema)
template = Blueprint('template', __name__)
# I am going to keep ... | from flask import Blueprint
from flask import (jsonify)
from sqlalchemy.exc import DataError
from sqlalchemy.orm.exc import NoResultFound
from app.dao.templates_dao import get_model_templates
from app.schemas import (template_schema, templates_schema)
template = Blueprint('template', __name__)
# I am going to keep ... | Remove trailing slash from template url | Remove trailing slash from template url
| Python | mit | alphagov/notifications-api,alphagov/notifications-api | from flask import Blueprint
from flask import (jsonify)
from sqlalchemy.exc import DataError
from sqlalchemy.orm.exc import NoResultFound
from app.dao.templates_dao import get_model_templates
from app.schemas import (template_schema, templates_schema)
template = Blueprint('template', __name__)
# I am going to keep ... | from flask import Blueprint
from flask import (jsonify)
from sqlalchemy.exc import DataError
from sqlalchemy.orm.exc import NoResultFound
from app.dao.templates_dao import get_model_templates
from app.schemas import (template_schema, templates_schema)
template = Blueprint('template', __name__)
# I am going to keep ... | <commit_before>from flask import Blueprint
from flask import (jsonify)
from sqlalchemy.exc import DataError
from sqlalchemy.orm.exc import NoResultFound
from app.dao.templates_dao import get_model_templates
from app.schemas import (template_schema, templates_schema)
template = Blueprint('template', __name__)
# I am... | from flask import Blueprint
from flask import (jsonify)
from sqlalchemy.exc import DataError
from sqlalchemy.orm.exc import NoResultFound
from app.dao.templates_dao import get_model_templates
from app.schemas import (template_schema, templates_schema)
template = Blueprint('template', __name__)
# I am going to keep ... | from flask import Blueprint
from flask import (jsonify)
from sqlalchemy.exc import DataError
from sqlalchemy.orm.exc import NoResultFound
from app.dao.templates_dao import get_model_templates
from app.schemas import (template_schema, templates_schema)
template = Blueprint('template', __name__)
# I am going to keep ... | <commit_before>from flask import Blueprint
from flask import (jsonify)
from sqlalchemy.exc import DataError
from sqlalchemy.orm.exc import NoResultFound
from app.dao.templates_dao import get_model_templates
from app.schemas import (template_schema, templates_schema)
template = Blueprint('template', __name__)
# I am... |
d267b3a52e28b31f4a9d5d99f4ae0742b0f8cca7 | admin/meetings/urls.py | admin/meetings/urls.py | from __future__ import absolute_import
from django.conf.urls import url
from admin.meetings import views
urlpatterns = [
url(r'^$', views.MeetingListView.as_view(), name='list'),
url(r'^create/$', views.MeetingCreateFormView.as_view(), name='create'),
url(r'^(?P<endpoint>[a-zA-Z0-9]+)/$', views.MeetingFo... | from __future__ import absolute_import
from django.conf.urls import url
from admin.meetings import views
urlpatterns = [
url(r'^$', views.MeetingListView.as_view(), name='list'),
url(r'^create/$', views.MeetingCreateFormView.as_view(), name='create'),
url(r'^(?P<endpoint>[a-zA-Z0-9_]+)/$', views.MeetingF... | Allow underscores in meeting endpoints | Allow underscores in meeting endpoints
See https://www.flowdock.com/app/cos/osf-dev/threads/oX7kE29lhFd8quQWt-hbFpyVriH
| Python | apache-2.0 | caseyrollins/osf.io,binoculars/osf.io,chennan47/osf.io,CenterForOpenScience/osf.io,mfraezz/osf.io,cslzchen/osf.io,TomBaxter/osf.io,HalcyonChimera/osf.io,brianjgeiger/osf.io,caneruguz/osf.io,chrisseto/osf.io,chennan47/osf.io,cslzchen/osf.io,chrisseto/osf.io,mfraezz/osf.io,aaxelb/osf.io,binoculars/osf.io,felliott/osf.io,... | from __future__ import absolute_import
from django.conf.urls import url
from admin.meetings import views
urlpatterns = [
url(r'^$', views.MeetingListView.as_view(), name='list'),
url(r'^create/$', views.MeetingCreateFormView.as_view(), name='create'),
url(r'^(?P<endpoint>[a-zA-Z0-9]+)/$', views.MeetingFo... | from __future__ import absolute_import
from django.conf.urls import url
from admin.meetings import views
urlpatterns = [
url(r'^$', views.MeetingListView.as_view(), name='list'),
url(r'^create/$', views.MeetingCreateFormView.as_view(), name='create'),
url(r'^(?P<endpoint>[a-zA-Z0-9_]+)/$', views.MeetingF... | <commit_before>from __future__ import absolute_import
from django.conf.urls import url
from admin.meetings import views
urlpatterns = [
url(r'^$', views.MeetingListView.as_view(), name='list'),
url(r'^create/$', views.MeetingCreateFormView.as_view(), name='create'),
url(r'^(?P<endpoint>[a-zA-Z0-9]+)/$', ... | from __future__ import absolute_import
from django.conf.urls import url
from admin.meetings import views
urlpatterns = [
url(r'^$', views.MeetingListView.as_view(), name='list'),
url(r'^create/$', views.MeetingCreateFormView.as_view(), name='create'),
url(r'^(?P<endpoint>[a-zA-Z0-9_]+)/$', views.MeetingF... | from __future__ import absolute_import
from django.conf.urls import url
from admin.meetings import views
urlpatterns = [
url(r'^$', views.MeetingListView.as_view(), name='list'),
url(r'^create/$', views.MeetingCreateFormView.as_view(), name='create'),
url(r'^(?P<endpoint>[a-zA-Z0-9]+)/$', views.MeetingFo... | <commit_before>from __future__ import absolute_import
from django.conf.urls import url
from admin.meetings import views
urlpatterns = [
url(r'^$', views.MeetingListView.as_view(), name='list'),
url(r'^create/$', views.MeetingCreateFormView.as_view(), name='create'),
url(r'^(?P<endpoint>[a-zA-Z0-9]+)/$', ... |
463e0ab2a77734cf6787d9cb788a57e7dd53ff06 | games/admin.py | games/admin.py | from django.contrib import admin
from .models import Game, Framework, Release, Asset
class GameAdmin(admin.ModelAdmin):
pass
class FrameworkAdmin(admin.ModelAdmin):
pass
class ReleaseAdmin(admin.ModelAdmin):
pass
class AssetAdmin(admin.ModelAdmin):
list_display = ['__unicode__', 'release']
ad... | from django.contrib import admin
from .models import Game, Framework, Release, Asset
class GameAdmin(admin.ModelAdmin):
list_display = ['name', 'uuid', 'owner', 'framework', 'public']
class FrameworkAdmin(admin.ModelAdmin):
pass
class ReleaseAdmin(admin.ModelAdmin):
pass
class AssetAdmin(admin.Mode... | Add fields to the game display in Admin | Add fields to the game display in Admin
| Python | mit | stackmachine/bearweb,stackmachine/bearweb,stackmachine/bearweb,stackmachine/bearweb,stackmachine/bearweb,stackmachine/bearweb | from django.contrib import admin
from .models import Game, Framework, Release, Asset
class GameAdmin(admin.ModelAdmin):
pass
class FrameworkAdmin(admin.ModelAdmin):
pass
class ReleaseAdmin(admin.ModelAdmin):
pass
class AssetAdmin(admin.ModelAdmin):
list_display = ['__unicode__', 'release']
ad... | from django.contrib import admin
from .models import Game, Framework, Release, Asset
class GameAdmin(admin.ModelAdmin):
list_display = ['name', 'uuid', 'owner', 'framework', 'public']
class FrameworkAdmin(admin.ModelAdmin):
pass
class ReleaseAdmin(admin.ModelAdmin):
pass
class AssetAdmin(admin.Mode... | <commit_before>from django.contrib import admin
from .models import Game, Framework, Release, Asset
class GameAdmin(admin.ModelAdmin):
pass
class FrameworkAdmin(admin.ModelAdmin):
pass
class ReleaseAdmin(admin.ModelAdmin):
pass
class AssetAdmin(admin.ModelAdmin):
list_display = ['__unicode__', ... | from django.contrib import admin
from .models import Game, Framework, Release, Asset
class GameAdmin(admin.ModelAdmin):
list_display = ['name', 'uuid', 'owner', 'framework', 'public']
class FrameworkAdmin(admin.ModelAdmin):
pass
class ReleaseAdmin(admin.ModelAdmin):
pass
class AssetAdmin(admin.Mode... | from django.contrib import admin
from .models import Game, Framework, Release, Asset
class GameAdmin(admin.ModelAdmin):
pass
class FrameworkAdmin(admin.ModelAdmin):
pass
class ReleaseAdmin(admin.ModelAdmin):
pass
class AssetAdmin(admin.ModelAdmin):
list_display = ['__unicode__', 'release']
ad... | <commit_before>from django.contrib import admin
from .models import Game, Framework, Release, Asset
class GameAdmin(admin.ModelAdmin):
pass
class FrameworkAdmin(admin.ModelAdmin):
pass
class ReleaseAdmin(admin.ModelAdmin):
pass
class AssetAdmin(admin.ModelAdmin):
list_display = ['__unicode__', ... |
0a336447546442ab5d48716223713135a4812adf | get_problem.py | get_problem.py | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
import sys
from bs4 import BeautifulSoup
from requests import get, codes
def match_soup_class(target, mode='class'):
def do_match(tag):
classes = tag.get(mode, [])
return all(c in classes for c in target)
return do_match
def main():
if len(... | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
import sys
from bs4 import BeautifulSoup
from requests import get, codes
def match_soup_class(target, mode='class'):
def do_match(tag):
classes = tag.get(mode, [])
return all(c in classes for c in target)
return do_match
def main():
if len(... | ADD comment for python file | ADD comment for python file
| Python | mit | byung-u/ProjectEuler | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
import sys
from bs4 import BeautifulSoup
from requests import get, codes
def match_soup_class(target, mode='class'):
def do_match(tag):
classes = tag.get(mode, [])
return all(c in classes for c in target)
return do_match
def main():
if len(... | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
import sys
from bs4 import BeautifulSoup
from requests import get, codes
def match_soup_class(target, mode='class'):
def do_match(tag):
classes = tag.get(mode, [])
return all(c in classes for c in target)
return do_match
def main():
if len(... | <commit_before>#!/usr/bin/env python3
# -*- coding: utf-8 -*-
import sys
from bs4 import BeautifulSoup
from requests import get, codes
def match_soup_class(target, mode='class'):
def do_match(tag):
classes = tag.get(mode, [])
return all(c in classes for c in target)
return do_match
def main... | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
import sys
from bs4 import BeautifulSoup
from requests import get, codes
def match_soup_class(target, mode='class'):
def do_match(tag):
classes = tag.get(mode, [])
return all(c in classes for c in target)
return do_match
def main():
if len(... | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
import sys
from bs4 import BeautifulSoup
from requests import get, codes
def match_soup_class(target, mode='class'):
def do_match(tag):
classes = tag.get(mode, [])
return all(c in classes for c in target)
return do_match
def main():
if len(... | <commit_before>#!/usr/bin/env python3
# -*- coding: utf-8 -*-
import sys
from bs4 import BeautifulSoup
from requests import get, codes
def match_soup_class(target, mode='class'):
def do_match(tag):
classes = tag.get(mode, [])
return all(c in classes for c in target)
return do_match
def main... |
42b4837570fd936c5a7593026fc4868c38d4b09d | base/management/commands/revision_count.py | base/management/commands/revision_count.py | # -*- encoding: utf-8 -*-
from django.core.management.base import BaseCommand
from django.apps import apps
# from reversion import revisions as reversion
from reversion.models import Version
from reversion.errors import RegistrationError
class Command(BaseCommand):
help = "Count reversion records for each mode... | # -*- encoding: utf-8 -*-
from django.core.management.base import BaseCommand
from django.apps import apps
# from reversion import revisions as reversion
from reversion.models import Version
from reversion.errors import RegistrationError
class Command(BaseCommand):
help = "Count reversion records for each mode... | Add titles to columns and use write instead of print | Add titles to columns and use write instead of print
| Python | apache-2.0 | pkimber/base,pkimber/base,pkimber/base,pkimber/base | # -*- encoding: utf-8 -*-
from django.core.management.base import BaseCommand
from django.apps import apps
# from reversion import revisions as reversion
from reversion.models import Version
from reversion.errors import RegistrationError
class Command(BaseCommand):
help = "Count reversion records for each mode... | # -*- encoding: utf-8 -*-
from django.core.management.base import BaseCommand
from django.apps import apps
# from reversion import revisions as reversion
from reversion.models import Version
from reversion.errors import RegistrationError
class Command(BaseCommand):
help = "Count reversion records for each mode... | <commit_before># -*- encoding: utf-8 -*-
from django.core.management.base import BaseCommand
from django.apps import apps
# from reversion import revisions as reversion
from reversion.models import Version
from reversion.errors import RegistrationError
class Command(BaseCommand):
help = "Count reversion record... | # -*- encoding: utf-8 -*-
from django.core.management.base import BaseCommand
from django.apps import apps
# from reversion import revisions as reversion
from reversion.models import Version
from reversion.errors import RegistrationError
class Command(BaseCommand):
help = "Count reversion records for each mode... | # -*- encoding: utf-8 -*-
from django.core.management.base import BaseCommand
from django.apps import apps
# from reversion import revisions as reversion
from reversion.models import Version
from reversion.errors import RegistrationError
class Command(BaseCommand):
help = "Count reversion records for each mode... | <commit_before># -*- encoding: utf-8 -*-
from django.core.management.base import BaseCommand
from django.apps import apps
# from reversion import revisions as reversion
from reversion.models import Version
from reversion.errors import RegistrationError
class Command(BaseCommand):
help = "Count reversion record... |
c0a7bc2aa1b174af74a9f606c358a66f77f98ca9 | src/foremast/utils/get_vpc_id.py | src/foremast/utils/get_vpc_id.py | """Get VPC ID."""
import logging
import requests
from ..consts import API_URL
from ..exceptions import SpinnakerVPCIDNotFound, SpinnakerVPCNotFound
LOG = logging.getLogger(__name__)
def get_vpc_id(account, region):
"""Get vpc id.
Args:
account (str): AWS account name.
region (str): Region ... | """Get VPC ID."""
import logging
import requests
from ..consts import API_URL
from ..exceptions import SpinnakerVPCIDNotFound, SpinnakerVPCNotFound
LOG = logging.getLogger(__name__)
def get_vpc_id(account, region):
"""Get vpc id.
Args:
account (str): AWS account name.
region (str): Region ... | Use more concise error message for VPCs | fix: Use more concise error message for VPCs
See also: PSOBAT-1197
| Python | apache-2.0 | gogoair/foremast,gogoair/foremast | """Get VPC ID."""
import logging
import requests
from ..consts import API_URL
from ..exceptions import SpinnakerVPCIDNotFound, SpinnakerVPCNotFound
LOG = logging.getLogger(__name__)
def get_vpc_id(account, region):
"""Get vpc id.
Args:
account (str): AWS account name.
region (str): Region ... | """Get VPC ID."""
import logging
import requests
from ..consts import API_URL
from ..exceptions import SpinnakerVPCIDNotFound, SpinnakerVPCNotFound
LOG = logging.getLogger(__name__)
def get_vpc_id(account, region):
"""Get vpc id.
Args:
account (str): AWS account name.
region (str): Region ... | <commit_before>"""Get VPC ID."""
import logging
import requests
from ..consts import API_URL
from ..exceptions import SpinnakerVPCIDNotFound, SpinnakerVPCNotFound
LOG = logging.getLogger(__name__)
def get_vpc_id(account, region):
"""Get vpc id.
Args:
account (str): AWS account name.
region... | """Get VPC ID."""
import logging
import requests
from ..consts import API_URL
from ..exceptions import SpinnakerVPCIDNotFound, SpinnakerVPCNotFound
LOG = logging.getLogger(__name__)
def get_vpc_id(account, region):
"""Get vpc id.
Args:
account (str): AWS account name.
region (str): Region ... | """Get VPC ID."""
import logging
import requests
from ..consts import API_URL
from ..exceptions import SpinnakerVPCIDNotFound, SpinnakerVPCNotFound
LOG = logging.getLogger(__name__)
def get_vpc_id(account, region):
"""Get vpc id.
Args:
account (str): AWS account name.
region (str): Region ... | <commit_before>"""Get VPC ID."""
import logging
import requests
from ..consts import API_URL
from ..exceptions import SpinnakerVPCIDNotFound, SpinnakerVPCNotFound
LOG = logging.getLogger(__name__)
def get_vpc_id(account, region):
"""Get vpc id.
Args:
account (str): AWS account name.
region... |
9eaba3b531d26a61ada7aabd45bc76e68d2375ec | pyoracc/atf/atffile.py | pyoracc/atf/atffile.py | from .atflex import AtfLexer
from .atfyacc import AtfParser
from mako.template import Template
class AtfFile(object):
template = Template("${text.serialize()}")
def __init__(self, content):
self.content = content
if content[-1] != '\n':
content += "\n"
lexer = AtfLexer().... | from .atflex import AtfLexer
from .atfyacc import AtfParser
from mako.template import Template
class AtfFile(object):
template = Template("${text.serialize()}")
def __init__(self, content):
self.content = content
if content[-1] != '\n':
content += "\n"
lexer = AtfLexer().... | Add skip invalid to debug | Add skip invalid to debug
| Python | mit | UCL/pyoracc | from .atflex import AtfLexer
from .atfyacc import AtfParser
from mako.template import Template
class AtfFile(object):
template = Template("${text.serialize()}")
def __init__(self, content):
self.content = content
if content[-1] != '\n':
content += "\n"
lexer = AtfLexer().... | from .atflex import AtfLexer
from .atfyacc import AtfParser
from mako.template import Template
class AtfFile(object):
template = Template("${text.serialize()}")
def __init__(self, content):
self.content = content
if content[-1] != '\n':
content += "\n"
lexer = AtfLexer().... | <commit_before>from .atflex import AtfLexer
from .atfyacc import AtfParser
from mako.template import Template
class AtfFile(object):
template = Template("${text.serialize()}")
def __init__(self, content):
self.content = content
if content[-1] != '\n':
content += "\n"
lexe... | from .atflex import AtfLexer
from .atfyacc import AtfParser
from mako.template import Template
class AtfFile(object):
template = Template("${text.serialize()}")
def __init__(self, content):
self.content = content
if content[-1] != '\n':
content += "\n"
lexer = AtfLexer().... | from .atflex import AtfLexer
from .atfyacc import AtfParser
from mako.template import Template
class AtfFile(object):
template = Template("${text.serialize()}")
def __init__(self, content):
self.content = content
if content[-1] != '\n':
content += "\n"
lexer = AtfLexer().... | <commit_before>from .atflex import AtfLexer
from .atfyacc import AtfParser
from mako.template import Template
class AtfFile(object):
template = Template("${text.serialize()}")
def __init__(self, content):
self.content = content
if content[-1] != '\n':
content += "\n"
lexe... |
8b7aa0a540c7927b53adf6368e9cb8476816d941 | asciibooth/statuses.py | asciibooth/statuses.py | # encoding: UTF-8
import random
from . import config
def sampler(source):
def reshuffle():
copy = list(source)
random.shuffle(copy)
return copy
stack = reshuffle()
lastitem = ''
while True:
try:
item = stack.pop()
if item == lastitem:
... | # encoding: UTF-8
import random
from . import config
def sampler(source):
def reshuffle():
copy = list(source)
random.shuffle(copy)
return copy
stack = reshuffle()
lastitem = ''
while True:
try:
item = stack.pop()
if item == lastitem:
... | Add configuration options for randomness | Add configuration options for randomness
| Python | cc0-1.0 | jnv/asciibooth,jnv/asciibooth | # encoding: UTF-8
import random
from . import config
def sampler(source):
def reshuffle():
copy = list(source)
random.shuffle(copy)
return copy
stack = reshuffle()
lastitem = ''
while True:
try:
item = stack.pop()
if item == lastitem:
... | # encoding: UTF-8
import random
from . import config
def sampler(source):
def reshuffle():
copy = list(source)
random.shuffle(copy)
return copy
stack = reshuffle()
lastitem = ''
while True:
try:
item = stack.pop()
if item == lastitem:
... | <commit_before># encoding: UTF-8
import random
from . import config
def sampler(source):
def reshuffle():
copy = list(source)
random.shuffle(copy)
return copy
stack = reshuffle()
lastitem = ''
while True:
try:
item = stack.pop()
if item == lasti... | # encoding: UTF-8
import random
from . import config
def sampler(source):
def reshuffle():
copy = list(source)
random.shuffle(copy)
return copy
stack = reshuffle()
lastitem = ''
while True:
try:
item = stack.pop()
if item == lastitem:
... | # encoding: UTF-8
import random
from . import config
def sampler(source):
def reshuffle():
copy = list(source)
random.shuffle(copy)
return copy
stack = reshuffle()
lastitem = ''
while True:
try:
item = stack.pop()
if item == lastitem:
... | <commit_before># encoding: UTF-8
import random
from . import config
def sampler(source):
def reshuffle():
copy = list(source)
random.shuffle(copy)
return copy
stack = reshuffle()
lastitem = ''
while True:
try:
item = stack.pop()
if item == lasti... |
0d023a51283d477e4b3d02059361b003a91134e0 | jaspyx/scope.py | jaspyx/scope.py | class Scope(object):
tmp_index = 0
def __init__(self, parent=None):
self.parent = parent
self.prefix = []
self.declarations = {}
self.globals = set()
self.inherited = True
def prefixed(self, name):
return '.'.join(self.prefix + [name])
def declare(self,... | class Scope(object):
def __init__(self, parent=None):
self.parent = parent
self.prefix = []
self.declarations = {}
self.globals = set()
self.inherited = True
def prefixed(self, name):
return '.'.join(self.prefix + [name])
def declare(self, name, var=True):
... | Remove temp var allocation code. | Remove temp var allocation code.
| Python | mit | ztane/jaspyx,iksteen/jaspyx | class Scope(object):
tmp_index = 0
def __init__(self, parent=None):
self.parent = parent
self.prefix = []
self.declarations = {}
self.globals = set()
self.inherited = True
def prefixed(self, name):
return '.'.join(self.prefix + [name])
def declare(self,... | class Scope(object):
def __init__(self, parent=None):
self.parent = parent
self.prefix = []
self.declarations = {}
self.globals = set()
self.inherited = True
def prefixed(self, name):
return '.'.join(self.prefix + [name])
def declare(self, name, var=True):
... | <commit_before>class Scope(object):
tmp_index = 0
def __init__(self, parent=None):
self.parent = parent
self.prefix = []
self.declarations = {}
self.globals = set()
self.inherited = True
def prefixed(self, name):
return '.'.join(self.prefix + [name])
de... | class Scope(object):
def __init__(self, parent=None):
self.parent = parent
self.prefix = []
self.declarations = {}
self.globals = set()
self.inherited = True
def prefixed(self, name):
return '.'.join(self.prefix + [name])
def declare(self, name, var=True):
... | class Scope(object):
tmp_index = 0
def __init__(self, parent=None):
self.parent = parent
self.prefix = []
self.declarations = {}
self.globals = set()
self.inherited = True
def prefixed(self, name):
return '.'.join(self.prefix + [name])
def declare(self,... | <commit_before>class Scope(object):
tmp_index = 0
def __init__(self, parent=None):
self.parent = parent
self.prefix = []
self.declarations = {}
self.globals = set()
self.inherited = True
def prefixed(self, name):
return '.'.join(self.prefix + [name])
de... |
4524b88eef8a46d40c4d353c3561401ac3689878 | bookmarks/urls.py | bookmarks/urls.py | from django.conf.urls import patterns, url
# for voting
from voting.views import vote_on_object
from bookmarks.models import Bookmark
urlpatterns = patterns('',
url(r'^$', 'bookmarks.views.bookmarks', name="all_bookmarks"),
url(r'^your_bookmarks/$', 'bookmarks.views.your_bookmarks', name="your_bookmarks"),
... | from django.conf.urls import patterns, url
from django.views.decorators.csrf import csrf_exempt
# for voting
from voting.views import vote_on_object
from bookmarks.models import Bookmark
urlpatterns = patterns('',
url(r'^$', 'bookmarks.views.bookmarks', name="all_bookmarks"),
url(r'^your_bookmarks/$', 'bookma... | Disable csrf checks for voting | Disable csrf checks for voting
| Python | mit | incuna/incuna-bookmarks,incuna/incuna-bookmarks | from django.conf.urls import patterns, url
# for voting
from voting.views import vote_on_object
from bookmarks.models import Bookmark
urlpatterns = patterns('',
url(r'^$', 'bookmarks.views.bookmarks', name="all_bookmarks"),
url(r'^your_bookmarks/$', 'bookmarks.views.your_bookmarks', name="your_bookmarks"),
... | from django.conf.urls import patterns, url
from django.views.decorators.csrf import csrf_exempt
# for voting
from voting.views import vote_on_object
from bookmarks.models import Bookmark
urlpatterns = patterns('',
url(r'^$', 'bookmarks.views.bookmarks', name="all_bookmarks"),
url(r'^your_bookmarks/$', 'bookma... | <commit_before>from django.conf.urls import patterns, url
# for voting
from voting.views import vote_on_object
from bookmarks.models import Bookmark
urlpatterns = patterns('',
url(r'^$', 'bookmarks.views.bookmarks', name="all_bookmarks"),
url(r'^your_bookmarks/$', 'bookmarks.views.your_bookmarks', name="your_... | from django.conf.urls import patterns, url
from django.views.decorators.csrf import csrf_exempt
# for voting
from voting.views import vote_on_object
from bookmarks.models import Bookmark
urlpatterns = patterns('',
url(r'^$', 'bookmarks.views.bookmarks', name="all_bookmarks"),
url(r'^your_bookmarks/$', 'bookma... | from django.conf.urls import patterns, url
# for voting
from voting.views import vote_on_object
from bookmarks.models import Bookmark
urlpatterns = patterns('',
url(r'^$', 'bookmarks.views.bookmarks', name="all_bookmarks"),
url(r'^your_bookmarks/$', 'bookmarks.views.your_bookmarks', name="your_bookmarks"),
... | <commit_before>from django.conf.urls import patterns, url
# for voting
from voting.views import vote_on_object
from bookmarks.models import Bookmark
urlpatterns = patterns('',
url(r'^$', 'bookmarks.views.bookmarks', name="all_bookmarks"),
url(r'^your_bookmarks/$', 'bookmarks.views.your_bookmarks', name="your_... |
c2b0f66d5760d61444b4909e40c45993780cd473 | examples/champion.py | examples/champion.py | import cassiopeia as cass
from cassiopeia.core import Champion
def test_cass():
#annie = Champion(name="Annie", region="NA")
annie = Champion(name="Annie")
print(annie.name)
print(annie.title)
print(annie.title)
for spell in annie.spells:
print(spell.name, spell.keywords)
print(ann... | import cassiopeia as cass
from cassiopeia.core import Champion
def test_cass():
#annie = Champion(name="Annie", region="NA")
annie = Champion(name="Annie")
print(annie.name)
print(annie.title)
print(annie.title)
for spell in annie.spells:
print(spell.name, spell.keywords)
print(ann... | Remove `return`, get Ziggs instead of Renekton, since we're saving as Ziggs | Remove `return`, get Ziggs instead of Renekton, since we're saving as Ziggs
| Python | mit | robrua/cassiopeia,meraki-analytics/cassiopeia,10se1ucgo/cassiopeia | import cassiopeia as cass
from cassiopeia.core import Champion
def test_cass():
#annie = Champion(name="Annie", region="NA")
annie = Champion(name="Annie")
print(annie.name)
print(annie.title)
print(annie.title)
for spell in annie.spells:
print(spell.name, spell.keywords)
print(ann... | import cassiopeia as cass
from cassiopeia.core import Champion
def test_cass():
#annie = Champion(name="Annie", region="NA")
annie = Champion(name="Annie")
print(annie.name)
print(annie.title)
print(annie.title)
for spell in annie.spells:
print(spell.name, spell.keywords)
print(ann... | <commit_before>import cassiopeia as cass
from cassiopeia.core import Champion
def test_cass():
#annie = Champion(name="Annie", region="NA")
annie = Champion(name="Annie")
print(annie.name)
print(annie.title)
print(annie.title)
for spell in annie.spells:
print(spell.name, spell.keywords)... | import cassiopeia as cass
from cassiopeia.core import Champion
def test_cass():
#annie = Champion(name="Annie", region="NA")
annie = Champion(name="Annie")
print(annie.name)
print(annie.title)
print(annie.title)
for spell in annie.spells:
print(spell.name, spell.keywords)
print(ann... | import cassiopeia as cass
from cassiopeia.core import Champion
def test_cass():
#annie = Champion(name="Annie", region="NA")
annie = Champion(name="Annie")
print(annie.name)
print(annie.title)
print(annie.title)
for spell in annie.spells:
print(spell.name, spell.keywords)
print(ann... | <commit_before>import cassiopeia as cass
from cassiopeia.core import Champion
def test_cass():
#annie = Champion(name="Annie", region="NA")
annie = Champion(name="Annie")
print(annie.name)
print(annie.title)
print(annie.title)
for spell in annie.spells:
print(spell.name, spell.keywords)... |
f22eff612427dc5f530858bb47326d69b48aa68a | darchan/urls.py | darchan/urls.py | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.conf.urls import patterns, url
urlpatterns = patterns(
'darchan.views',
url(r'^view_matrix/$', 'v_view_last_matrix', name='view_last_matrix'),
url(r'^view_matrix/(?P<builder_id>\d+)/(?P<depth>\d+)/$', 'v_view_matrix',
name=... | # -*- coding: utf-8 -*-
# from __future__ import unicode_literals
from django.conf.urls import url
from darchan import views
urlpatterns = [
url(r'^view_matrix/$',
views.v_view_last_matrix, name='view_last_matrix'),
url(r'^view_matrix/(?P<builder_id>\d+)/(?P<depth>\d+)/$',
views.v_view_matrix, ... | Update support to Django 1.9 | Update support to Django 1.9
| Python | mpl-2.0 | Pawamoy/django-archan,Pawamoy/django-archan,Pawamoy/django-archan | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.conf.urls import patterns, url
urlpatterns = patterns(
'darchan.views',
url(r'^view_matrix/$', 'v_view_last_matrix', name='view_last_matrix'),
url(r'^view_matrix/(?P<builder_id>\d+)/(?P<depth>\d+)/$', 'v_view_matrix',
name=... | # -*- coding: utf-8 -*-
# from __future__ import unicode_literals
from django.conf.urls import url
from darchan import views
urlpatterns = [
url(r'^view_matrix/$',
views.v_view_last_matrix, name='view_last_matrix'),
url(r'^view_matrix/(?P<builder_id>\d+)/(?P<depth>\d+)/$',
views.v_view_matrix, ... | <commit_before># -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.conf.urls import patterns, url
urlpatterns = patterns(
'darchan.views',
url(r'^view_matrix/$', 'v_view_last_matrix', name='view_last_matrix'),
url(r'^view_matrix/(?P<builder_id>\d+)/(?P<depth>\d+)/$', 'v_view_matrix'... | # -*- coding: utf-8 -*-
# from __future__ import unicode_literals
from django.conf.urls import url
from darchan import views
urlpatterns = [
url(r'^view_matrix/$',
views.v_view_last_matrix, name='view_last_matrix'),
url(r'^view_matrix/(?P<builder_id>\d+)/(?P<depth>\d+)/$',
views.v_view_matrix, ... | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.conf.urls import patterns, url
urlpatterns = patterns(
'darchan.views',
url(r'^view_matrix/$', 'v_view_last_matrix', name='view_last_matrix'),
url(r'^view_matrix/(?P<builder_id>\d+)/(?P<depth>\d+)/$', 'v_view_matrix',
name=... | <commit_before># -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.conf.urls import patterns, url
urlpatterns = patterns(
'darchan.views',
url(r'^view_matrix/$', 'v_view_last_matrix', name='view_last_matrix'),
url(r'^view_matrix/(?P<builder_id>\d+)/(?P<depth>\d+)/$', 'v_view_matrix'... |
7e2d6cfa6b6a536d1df6e2d2d523a4bb4094f5eb | src/poliastro/plotting/misc.py | src/poliastro/plotting/misc.py | from poliastro.bodies import (
Earth,
Jupiter,
Mars,
Mercury,
Neptune,
Saturn,
Uranus,
Venus,
)
from poliastro.plotting.core import OrbitPlotter2D, OrbitPlotter3D
from poliastro.twobody import Orbit
def plot_solar_system(outer=True, epoch=None, use_3d=False):
"""
Plots the whol... | from typing import Union
from poliastro.bodies import (
Earth,
Jupiter,
Mars,
Mercury,
Neptune,
Saturn,
Uranus,
Venus,
)
from poliastro.plotting.core import OrbitPlotter2D, OrbitPlotter3D
from poliastro.twobody import Orbit
def plot_solar_system(outer=True, epoch=None, use_3d=False):
... | Set frame only when using 2D | Set frame only when using 2D
| Python | mit | Juanlu001/poliastro,Juanlu001/poliastro,Juanlu001/poliastro,poliastro/poliastro | from poliastro.bodies import (
Earth,
Jupiter,
Mars,
Mercury,
Neptune,
Saturn,
Uranus,
Venus,
)
from poliastro.plotting.core import OrbitPlotter2D, OrbitPlotter3D
from poliastro.twobody import Orbit
def plot_solar_system(outer=True, epoch=None, use_3d=False):
"""
Plots the whol... | from typing import Union
from poliastro.bodies import (
Earth,
Jupiter,
Mars,
Mercury,
Neptune,
Saturn,
Uranus,
Venus,
)
from poliastro.plotting.core import OrbitPlotter2D, OrbitPlotter3D
from poliastro.twobody import Orbit
def plot_solar_system(outer=True, epoch=None, use_3d=False):
... | <commit_before>from poliastro.bodies import (
Earth,
Jupiter,
Mars,
Mercury,
Neptune,
Saturn,
Uranus,
Venus,
)
from poliastro.plotting.core import OrbitPlotter2D, OrbitPlotter3D
from poliastro.twobody import Orbit
def plot_solar_system(outer=True, epoch=None, use_3d=False):
"""
... | from typing import Union
from poliastro.bodies import (
Earth,
Jupiter,
Mars,
Mercury,
Neptune,
Saturn,
Uranus,
Venus,
)
from poliastro.plotting.core import OrbitPlotter2D, OrbitPlotter3D
from poliastro.twobody import Orbit
def plot_solar_system(outer=True, epoch=None, use_3d=False):
... | from poliastro.bodies import (
Earth,
Jupiter,
Mars,
Mercury,
Neptune,
Saturn,
Uranus,
Venus,
)
from poliastro.plotting.core import OrbitPlotter2D, OrbitPlotter3D
from poliastro.twobody import Orbit
def plot_solar_system(outer=True, epoch=None, use_3d=False):
"""
Plots the whol... | <commit_before>from poliastro.bodies import (
Earth,
Jupiter,
Mars,
Mercury,
Neptune,
Saturn,
Uranus,
Venus,
)
from poliastro.plotting.core import OrbitPlotter2D, OrbitPlotter3D
from poliastro.twobody import Orbit
def plot_solar_system(outer=True, epoch=None, use_3d=False):
"""
... |
40347e45646aa57c9181cb289dfa88a3b3eb3396 | experiment/models.py | experiment/models.py | from django.db import models
from experiment_session.models import ExperimentSession
from django.core.validators import MinValueValidator
class Experiment(models.Model):
LIGHTOFF_FIXED = 'fixed'
LIGHTOFF_WAITING = 'waiting'
_LIGHTOFF_CHOICES = (
(LIGHTOFF_FIXED, 'Fixed'),
(LIGHTOFF_WAITING... | from django.db import models
from experiment_session.models import ExperimentSession
from django.core.validators import MinValueValidator
class Experiment(models.Model):
LIGHTOFF_FIXED = 'fixed'
LIGHTOFF_WAITING = 'waiting'
_LIGHTOFF_CHOICES = (
(LIGHTOFF_FIXED, 'Fixed'),
(LIGHTOFF_WAITING... | Allow empty strings as instructions | Allow empty strings as instructions
| Python | mit | piotrb5e3/1023alternative-backend | from django.db import models
from experiment_session.models import ExperimentSession
from django.core.validators import MinValueValidator
class Experiment(models.Model):
LIGHTOFF_FIXED = 'fixed'
LIGHTOFF_WAITING = 'waiting'
_LIGHTOFF_CHOICES = (
(LIGHTOFF_FIXED, 'Fixed'),
(LIGHTOFF_WAITING... | from django.db import models
from experiment_session.models import ExperimentSession
from django.core.validators import MinValueValidator
class Experiment(models.Model):
LIGHTOFF_FIXED = 'fixed'
LIGHTOFF_WAITING = 'waiting'
_LIGHTOFF_CHOICES = (
(LIGHTOFF_FIXED, 'Fixed'),
(LIGHTOFF_WAITING... | <commit_before>from django.db import models
from experiment_session.models import ExperimentSession
from django.core.validators import MinValueValidator
class Experiment(models.Model):
LIGHTOFF_FIXED = 'fixed'
LIGHTOFF_WAITING = 'waiting'
_LIGHTOFF_CHOICES = (
(LIGHTOFF_FIXED, 'Fixed'),
(L... | from django.db import models
from experiment_session.models import ExperimentSession
from django.core.validators import MinValueValidator
class Experiment(models.Model):
LIGHTOFF_FIXED = 'fixed'
LIGHTOFF_WAITING = 'waiting'
_LIGHTOFF_CHOICES = (
(LIGHTOFF_FIXED, 'Fixed'),
(LIGHTOFF_WAITING... | from django.db import models
from experiment_session.models import ExperimentSession
from django.core.validators import MinValueValidator
class Experiment(models.Model):
LIGHTOFF_FIXED = 'fixed'
LIGHTOFF_WAITING = 'waiting'
_LIGHTOFF_CHOICES = (
(LIGHTOFF_FIXED, 'Fixed'),
(LIGHTOFF_WAITING... | <commit_before>from django.db import models
from experiment_session.models import ExperimentSession
from django.core.validators import MinValueValidator
class Experiment(models.Model):
LIGHTOFF_FIXED = 'fixed'
LIGHTOFF_WAITING = 'waiting'
_LIGHTOFF_CHOICES = (
(LIGHTOFF_FIXED, 'Fixed'),
(L... |
04944ccd83e924fed6b351a6073d837a5ce639e9 | sevenbridges/models/compound/price_breakdown.py | sevenbridges/models/compound/price_breakdown.py | import six
from sevenbridges.meta.resource import Resource
from sevenbridges.meta.fields import StringField
class Breakdown(Resource):
"""
Breakdown resource contains price breakdown by storage and computation.
"""
storage = StringField(read_only=True)
computation = StringField(read_only=True)
... | import six
from sevenbridges.meta.resource import Resource
from sevenbridges.meta.fields import StringField
class Breakdown(Resource):
"""
Breakdown resource contains price breakdown by storage and computation.
"""
storage = StringField(read_only=True)
computation = StringField(read_only=True)
... | Add data_transfer to price breakdown | Add data_transfer to price breakdown
| Python | apache-2.0 | sbg/sevenbridges-python | import six
from sevenbridges.meta.resource import Resource
from sevenbridges.meta.fields import StringField
class Breakdown(Resource):
"""
Breakdown resource contains price breakdown by storage and computation.
"""
storage = StringField(read_only=True)
computation = StringField(read_only=True)
... | import six
from sevenbridges.meta.resource import Resource
from sevenbridges.meta.fields import StringField
class Breakdown(Resource):
"""
Breakdown resource contains price breakdown by storage and computation.
"""
storage = StringField(read_only=True)
computation = StringField(read_only=True)
... | <commit_before>import six
from sevenbridges.meta.resource import Resource
from sevenbridges.meta.fields import StringField
class Breakdown(Resource):
"""
Breakdown resource contains price breakdown by storage and computation.
"""
storage = StringField(read_only=True)
computation = StringField(rea... | import six
from sevenbridges.meta.resource import Resource
from sevenbridges.meta.fields import StringField
class Breakdown(Resource):
"""
Breakdown resource contains price breakdown by storage and computation.
"""
storage = StringField(read_only=True)
computation = StringField(read_only=True)
... | import six
from sevenbridges.meta.resource import Resource
from sevenbridges.meta.fields import StringField
class Breakdown(Resource):
"""
Breakdown resource contains price breakdown by storage and computation.
"""
storage = StringField(read_only=True)
computation = StringField(read_only=True)
... | <commit_before>import six
from sevenbridges.meta.resource import Resource
from sevenbridges.meta.fields import StringField
class Breakdown(Resource):
"""
Breakdown resource contains price breakdown by storage and computation.
"""
storage = StringField(read_only=True)
computation = StringField(rea... |
4257910deffdb624c0c8faf325933fb5e775d9e6 | furious/_pkg_meta.py | furious/_pkg_meta.py | version_info = (1, 4, 0)
version = '.'.join(map(str, version_info))
| version_info = (1, 5, 0)
version = '.'.join(map(str, version_info))
| Update the version to 1.5.0 to prepare for next release | Update the version to 1.5.0 to prepare for next release
Update the _pkg_meta version to 1.5.0 to prepare for the next release.
| Python | apache-2.0 | andreleblanc-wf/furious,Workiva/furious,andreleblanc-wf/furious,Workiva/furious,beaulyddon-wf/furious,beaulyddon-wf/furious | version_info = (1, 4, 0)
version = '.'.join(map(str, version_info))
Update the version to 1.5.0 to prepare for next release
Update the _pkg_meta version to 1.5.0 to prepare for the next release. | version_info = (1, 5, 0)
version = '.'.join(map(str, version_info))
| <commit_before>version_info = (1, 4, 0)
version = '.'.join(map(str, version_info))
<commit_msg>Update the version to 1.5.0 to prepare for next release
Update the _pkg_meta version to 1.5.0 to prepare for the next release.<commit_after> | version_info = (1, 5, 0)
version = '.'.join(map(str, version_info))
| version_info = (1, 4, 0)
version = '.'.join(map(str, version_info))
Update the version to 1.5.0 to prepare for next release
Update the _pkg_meta version to 1.5.0 to prepare for the next release.version_info = (1, 5, 0)
version = '.'.join(map(str, version_info))
| <commit_before>version_info = (1, 4, 0)
version = '.'.join(map(str, version_info))
<commit_msg>Update the version to 1.5.0 to prepare for next release
Update the _pkg_meta version to 1.5.0 to prepare for the next release.<commit_after>version_info = (1, 5, 0)
version = '.'.join(map(str, version_info))
|
9b0d5796c1e48a3bf294971dc129499876936a36 | send2trash/plat_osx.py | send2trash/plat_osx.py | # Copyright 2017 Virgil Dupras
# This software is licensed under the "BSD" License as described in the "LICENSE" file,
# which should be included with this package. The terms are also available at
# http://www.hardcoded.net/licenses/bsd_license
from platform import mac_ver
from sys import version_info
# If macOS is ... | # Copyright 2017 Virgil Dupras
# This software is licensed under the "BSD" License as described in the "LICENSE" file,
# which should be included with this package. The terms are also available at
# http://www.hardcoded.net/licenses/bsd_license
from platform import mac_ver
from sys import version_info
# NOTE: versio... | Change conditional for macos pyobjc usage | Change conditional for macos pyobjc usage
macOS 11.x will occasionally identify as 10.16, since there was no real
reason to prevent on all supported platforms allow.
| Python | bsd-3-clause | hsoft/send2trash | # Copyright 2017 Virgil Dupras
# This software is licensed under the "BSD" License as described in the "LICENSE" file,
# which should be included with this package. The terms are also available at
# http://www.hardcoded.net/licenses/bsd_license
from platform import mac_ver
from sys import version_info
# If macOS is ... | # Copyright 2017 Virgil Dupras
# This software is licensed under the "BSD" License as described in the "LICENSE" file,
# which should be included with this package. The terms are also available at
# http://www.hardcoded.net/licenses/bsd_license
from platform import mac_ver
from sys import version_info
# NOTE: versio... | <commit_before># Copyright 2017 Virgil Dupras
# This software is licensed under the "BSD" License as described in the "LICENSE" file,
# which should be included with this package. The terms are also available at
# http://www.hardcoded.net/licenses/bsd_license
from platform import mac_ver
from sys import version_info
... | # Copyright 2017 Virgil Dupras
# This software is licensed under the "BSD" License as described in the "LICENSE" file,
# which should be included with this package. The terms are also available at
# http://www.hardcoded.net/licenses/bsd_license
from platform import mac_ver
from sys import version_info
# NOTE: versio... | # Copyright 2017 Virgil Dupras
# This software is licensed under the "BSD" License as described in the "LICENSE" file,
# which should be included with this package. The terms are also available at
# http://www.hardcoded.net/licenses/bsd_license
from platform import mac_ver
from sys import version_info
# If macOS is ... | <commit_before># Copyright 2017 Virgil Dupras
# This software is licensed under the "BSD" License as described in the "LICENSE" file,
# which should be included with this package. The terms are also available at
# http://www.hardcoded.net/licenses/bsd_license
from platform import mac_ver
from sys import version_info
... |
965ff5b8fb83891a04c1601ceb3dc11f255dcb53 | web/__init__.py | web/__init__.py | import os
from flask import Flask
__version__ = '0.1.5'
def create_app(name=__name__):
app = Flask(name)
app.config['SQLALCHEMY_DATABASE_URI'] = os.environ['DB_URI']
from web.main import main_module
from web.news import news_module
app.register_blueprint(main_module, url_prefix='/')
app.r... | import os
from flask import Flask
__version__ = '0.1.5'
def create_app(name=__name__):
app = Flask(name)
from web.main import main_module
app.register_blueprint(main_module, url_prefix='/')
return app
app = create_app()
if __name__ == '__main__':
host = os.environ.get('HOST', '0.0.0.0')
... | Remove all traces of the news module | Remove all traces of the news module
| Python | bsd-3-clause | suminb/tldr-web,suminb/tldr-web,suminb/tldr-web | import os
from flask import Flask
__version__ = '0.1.5'
def create_app(name=__name__):
app = Flask(name)
app.config['SQLALCHEMY_DATABASE_URI'] = os.environ['DB_URI']
from web.main import main_module
from web.news import news_module
app.register_blueprint(main_module, url_prefix='/')
app.r... | import os
from flask import Flask
__version__ = '0.1.5'
def create_app(name=__name__):
app = Flask(name)
from web.main import main_module
app.register_blueprint(main_module, url_prefix='/')
return app
app = create_app()
if __name__ == '__main__':
host = os.environ.get('HOST', '0.0.0.0')
... | <commit_before>import os
from flask import Flask
__version__ = '0.1.5'
def create_app(name=__name__):
app = Flask(name)
app.config['SQLALCHEMY_DATABASE_URI'] = os.environ['DB_URI']
from web.main import main_module
from web.news import news_module
app.register_blueprint(main_module, url_prefix... | import os
from flask import Flask
__version__ = '0.1.5'
def create_app(name=__name__):
app = Flask(name)
from web.main import main_module
app.register_blueprint(main_module, url_prefix='/')
return app
app = create_app()
if __name__ == '__main__':
host = os.environ.get('HOST', '0.0.0.0')
... | import os
from flask import Flask
__version__ = '0.1.5'
def create_app(name=__name__):
app = Flask(name)
app.config['SQLALCHEMY_DATABASE_URI'] = os.environ['DB_URI']
from web.main import main_module
from web.news import news_module
app.register_blueprint(main_module, url_prefix='/')
app.r... | <commit_before>import os
from flask import Flask
__version__ = '0.1.5'
def create_app(name=__name__):
app = Flask(name)
app.config['SQLALCHEMY_DATABASE_URI'] = os.environ['DB_URI']
from web.main import main_module
from web.news import news_module
app.register_blueprint(main_module, url_prefix... |
c09b468583c97d7831478119614b231be0d24afa | scripts/generate_input_syntax.py | scripts/generate_input_syntax.py | #!/usr/bin/env python
import sys, os
# get the location of this script
app_path = os.path.abspath(os.path.dirname(sys.argv[0]))
# this script is actually in the scripts subdirectory, so go up a level
app_path += '/..'
# Set the name of the application here and moose directory relative to the application
app_name = 'f... | #!/usr/bin/env python
import sys, os
# get the location of this script
app_path = os.path.abspath(os.path.dirname(sys.argv[0]))
# Set the name of the application here and moose directory relative to the application
app_name = 'falcon'
MOOSE_DIR = os.path.abspath(os.path.join(app_path, '..', '..' 'moose'))
FRAMEWORK_... | Update scripts to reflect new MOOSE_DIR definition | Update scripts to reflect new MOOSE_DIR definition
r25009
| Python | lgpl-2.1 | idaholab/falcon,aeslaughter/falcon,idaholab/falcon,aeslaughter/falcon,idaholab/falcon,idaholab/falcon,aeslaughter/falcon | #!/usr/bin/env python
import sys, os
# get the location of this script
app_path = os.path.abspath(os.path.dirname(sys.argv[0]))
# this script is actually in the scripts subdirectory, so go up a level
app_path += '/..'
# Set the name of the application here and moose directory relative to the application
app_name = 'f... | #!/usr/bin/env python
import sys, os
# get the location of this script
app_path = os.path.abspath(os.path.dirname(sys.argv[0]))
# Set the name of the application here and moose directory relative to the application
app_name = 'falcon'
MOOSE_DIR = os.path.abspath(os.path.join(app_path, '..', '..' 'moose'))
FRAMEWORK_... | <commit_before>#!/usr/bin/env python
import sys, os
# get the location of this script
app_path = os.path.abspath(os.path.dirname(sys.argv[0]))
# this script is actually in the scripts subdirectory, so go up a level
app_path += '/..'
# Set the name of the application here and moose directory relative to the applicatio... | #!/usr/bin/env python
import sys, os
# get the location of this script
app_path = os.path.abspath(os.path.dirname(sys.argv[0]))
# Set the name of the application here and moose directory relative to the application
app_name = 'falcon'
MOOSE_DIR = os.path.abspath(os.path.join(app_path, '..', '..' 'moose'))
FRAMEWORK_... | #!/usr/bin/env python
import sys, os
# get the location of this script
app_path = os.path.abspath(os.path.dirname(sys.argv[0]))
# this script is actually in the scripts subdirectory, so go up a level
app_path += '/..'
# Set the name of the application here and moose directory relative to the application
app_name = 'f... | <commit_before>#!/usr/bin/env python
import sys, os
# get the location of this script
app_path = os.path.abspath(os.path.dirname(sys.argv[0]))
# this script is actually in the scripts subdirectory, so go up a level
app_path += '/..'
# Set the name of the application here and moose directory relative to the applicatio... |
6dbd72af13f017d9b1681da49f60aaf69f0a9e41 | tests/transformer_test_case.py | tests/transformer_test_case.py | class TransformerTestCase(object):
def get_pattern_for_spec(self, patterns, spec):
for pattern in patterns:
if pattern.search(spec):
return pattern
| from spec2scl import settings
from spec2scl import specfile
class TransformerTestCase(object):
def make_prep(self, spec):
# just create one of settings.RUNTIME_SECTIONS, so that we can test all the matching
return '%prep\n' + spec
def get_pattern_for_spec(self, handler, spec_text):
spe... | Improve our custom test case | Improve our custom test case
- create a make_prep method that allows quick creation of prep section from anything for good testing of custom transformers (that usually don't transform header section)
- improve get_pattern_for_spec with section checking
| Python | mit | mbooth101/spec2scl,sclorg/spec2scl | class TransformerTestCase(object):
def get_pattern_for_spec(self, patterns, spec):
for pattern in patterns:
if pattern.search(spec):
return pattern
Improve our custom test case
- create a make_prep method that allows quick creation of prep section from anything for good testing... | from spec2scl import settings
from spec2scl import specfile
class TransformerTestCase(object):
def make_prep(self, spec):
# just create one of settings.RUNTIME_SECTIONS, so that we can test all the matching
return '%prep\n' + spec
def get_pattern_for_spec(self, handler, spec_text):
spe... | <commit_before>class TransformerTestCase(object):
def get_pattern_for_spec(self, patterns, spec):
for pattern in patterns:
if pattern.search(spec):
return pattern
<commit_msg>Improve our custom test case
- create a make_prep method that allows quick creation of prep section fro... | from spec2scl import settings
from spec2scl import specfile
class TransformerTestCase(object):
def make_prep(self, spec):
# just create one of settings.RUNTIME_SECTIONS, so that we can test all the matching
return '%prep\n' + spec
def get_pattern_for_spec(self, handler, spec_text):
spe... | class TransformerTestCase(object):
def get_pattern_for_spec(self, patterns, spec):
for pattern in patterns:
if pattern.search(spec):
return pattern
Improve our custom test case
- create a make_prep method that allows quick creation of prep section from anything for good testing... | <commit_before>class TransformerTestCase(object):
def get_pattern_for_spec(self, patterns, spec):
for pattern in patterns:
if pattern.search(spec):
return pattern
<commit_msg>Improve our custom test case
- create a make_prep method that allows quick creation of prep section fro... |
4de9bee656041c9cfcd91ec61d294460f6427d77 | lib/database.py | lib/database.py |
class Database:
def __init__(self, db):
self.db = db
self.cursor = db.cursor()
def disconnect(self):
self.cursor.close()
self.db.close()
def query(self, sql):
self.cursor.execute(sql)
return self.cursor.fetchall()
def insert(self, sql):
self.cu... | import pymysql
class Database:
def __init__(self, db):
self.db = db
self.cursor = db.cursor()
def disconnect(self):
self.cursor.close()
self.db.close()
def query(self, sql):
try:
self.cursor.execute(sql)
return self.cursor.fetchall()
... | Reconnect if the connection times out. | Reconnect if the connection times out.
| Python | mit | aquaticpond/pyqodbc |
class Database:
def __init__(self, db):
self.db = db
self.cursor = db.cursor()
def disconnect(self):
self.cursor.close()
self.db.close()
def query(self, sql):
self.cursor.execute(sql)
return self.cursor.fetchall()
def insert(self, sql):
self.cu... | import pymysql
class Database:
def __init__(self, db):
self.db = db
self.cursor = db.cursor()
def disconnect(self):
self.cursor.close()
self.db.close()
def query(self, sql):
try:
self.cursor.execute(sql)
return self.cursor.fetchall()
... | <commit_before>
class Database:
def __init__(self, db):
self.db = db
self.cursor = db.cursor()
def disconnect(self):
self.cursor.close()
self.db.close()
def query(self, sql):
self.cursor.execute(sql)
return self.cursor.fetchall()
def insert(self, sql):
... | import pymysql
class Database:
def __init__(self, db):
self.db = db
self.cursor = db.cursor()
def disconnect(self):
self.cursor.close()
self.db.close()
def query(self, sql):
try:
self.cursor.execute(sql)
return self.cursor.fetchall()
... |
class Database:
def __init__(self, db):
self.db = db
self.cursor = db.cursor()
def disconnect(self):
self.cursor.close()
self.db.close()
def query(self, sql):
self.cursor.execute(sql)
return self.cursor.fetchall()
def insert(self, sql):
self.cu... | <commit_before>
class Database:
def __init__(self, db):
self.db = db
self.cursor = db.cursor()
def disconnect(self):
self.cursor.close()
self.db.close()
def query(self, sql):
self.cursor.execute(sql)
return self.cursor.fetchall()
def insert(self, sql):
... |
8657f7aef8944eae718cabaaa7dfd25d2ec95960 | conditions/__init__.py | conditions/__init__.py | from .conditions import *
from .exceptions import *
from .fields import *
from .lists import *
from .types import *
| from .conditions import Condition, CompareCondition
from .exceptions import UndefinedConditionError, InvalidConditionError
from .fields import ConditionsWidget, ConditionsFormField, ConditionsField
from .lists import CondList, CondAllList, CondAnyList, eval_conditions
from .types import conditions_from_module
__all__... | Replace star imports with explicit imports | PEP8: Replace star imports with explicit imports
| Python | isc | RevolutionTech/django-conditions,RevolutionTech/django-conditions,RevolutionTech/django-conditions | from .conditions import *
from .exceptions import *
from .fields import *
from .lists import *
from .types import *
PEP8: Replace star imports with explicit imports | from .conditions import Condition, CompareCondition
from .exceptions import UndefinedConditionError, InvalidConditionError
from .fields import ConditionsWidget, ConditionsFormField, ConditionsField
from .lists import CondList, CondAllList, CondAnyList, eval_conditions
from .types import conditions_from_module
__all__... | <commit_before>from .conditions import *
from .exceptions import *
from .fields import *
from .lists import *
from .types import *
<commit_msg>PEP8: Replace star imports with explicit imports<commit_after> | from .conditions import Condition, CompareCondition
from .exceptions import UndefinedConditionError, InvalidConditionError
from .fields import ConditionsWidget, ConditionsFormField, ConditionsField
from .lists import CondList, CondAllList, CondAnyList, eval_conditions
from .types import conditions_from_module
__all__... | from .conditions import *
from .exceptions import *
from .fields import *
from .lists import *
from .types import *
PEP8: Replace star imports with explicit importsfrom .conditions import Condition, CompareCondition
from .exceptions import UndefinedConditionError, InvalidConditionError
from .fields import ConditionsWid... | <commit_before>from .conditions import *
from .exceptions import *
from .fields import *
from .lists import *
from .types import *
<commit_msg>PEP8: Replace star imports with explicit imports<commit_after>from .conditions import Condition, CompareCondition
from .exceptions import UndefinedConditionError, InvalidConditi... |
7d79e6f0404b04ababaca3d8c50b1e682fd64222 | chainer/initializer.py | chainer/initializer.py | import typing as tp # NOQA
from chainer import types # NOQA
from chainer import utils
class Initializer(object):
"""Initializes array.
It initializes the given array.
Attributes:
dtype: Data type specifier. It is for type check in ``__call__``
function.
"""
def __init__(... | import typing as tp # NOQA
from chainer import types # NOQA
from chainer import utils
class Initializer(object):
"""Initializes array.
It initializes the given array.
Attributes:
dtype: Data type specifier. It is for type check in ``__call__``
function.
"""
def __init__(... | Fix error messages in get_fans | Fix error messages in get_fans
| Python | mit | niboshi/chainer,tkerola/chainer,niboshi/chainer,keisuke-umezawa/chainer,okuta/chainer,chainer/chainer,wkentaro/chainer,niboshi/chainer,okuta/chainer,okuta/chainer,wkentaro/chainer,pfnet/chainer,okuta/chainer,hvy/chainer,wkentaro/chainer,keisuke-umezawa/chainer,keisuke-umezawa/chainer,keisuke-umezawa/chainer,chainer/cha... | import typing as tp # NOQA
from chainer import types # NOQA
from chainer import utils
class Initializer(object):
"""Initializes array.
It initializes the given array.
Attributes:
dtype: Data type specifier. It is for type check in ``__call__``
function.
"""
def __init__(... | import typing as tp # NOQA
from chainer import types # NOQA
from chainer import utils
class Initializer(object):
"""Initializes array.
It initializes the given array.
Attributes:
dtype: Data type specifier. It is for type check in ``__call__``
function.
"""
def __init__(... | <commit_before>import typing as tp # NOQA
from chainer import types # NOQA
from chainer import utils
class Initializer(object):
"""Initializes array.
It initializes the given array.
Attributes:
dtype: Data type specifier. It is for type check in ``__call__``
function.
"""
... | import typing as tp # NOQA
from chainer import types # NOQA
from chainer import utils
class Initializer(object):
"""Initializes array.
It initializes the given array.
Attributes:
dtype: Data type specifier. It is for type check in ``__call__``
function.
"""
def __init__(... | import typing as tp # NOQA
from chainer import types # NOQA
from chainer import utils
class Initializer(object):
"""Initializes array.
It initializes the given array.
Attributes:
dtype: Data type specifier. It is for type check in ``__call__``
function.
"""
def __init__(... | <commit_before>import typing as tp # NOQA
from chainer import types # NOQA
from chainer import utils
class Initializer(object):
"""Initializes array.
It initializes the given array.
Attributes:
dtype: Data type specifier. It is for type check in ``__call__``
function.
"""
... |
302d9797b7ccb46e7b9575513c0a2c5461e156a5 | yvs/set_pref.py | yvs/set_pref.py | # yvs.set_pref
# coding=utf-8
from __future__ import unicode_literals
import json
import sys
import yvs.shared as shared
# Parse pref set data from the given JSON string
def parse_pref_set_data_str(pref_set_data_str):
pref_set_data = json.loads(
pref_set_data_str)['alfredworkflow']['variables']
re... | # yvs.set_pref
# coding=utf-8
from __future__ import unicode_literals
import json
import sys
import yvs.shared as shared
# Parse pref set data from the given JSON string
def parse_pref_set_data_str(pref_set_data_str):
pref_set_data = json.loads(
pref_set_data_str)['alfredworkflow']['variables']
re... | Switch to tuple for pref set data key list | Switch to tuple for pref set data key list
| Python | mit | caleb531/youversion-suggest,caleb531/youversion-suggest | # yvs.set_pref
# coding=utf-8
from __future__ import unicode_literals
import json
import sys
import yvs.shared as shared
# Parse pref set data from the given JSON string
def parse_pref_set_data_str(pref_set_data_str):
pref_set_data = json.loads(
pref_set_data_str)['alfredworkflow']['variables']
re... | # yvs.set_pref
# coding=utf-8
from __future__ import unicode_literals
import json
import sys
import yvs.shared as shared
# Parse pref set data from the given JSON string
def parse_pref_set_data_str(pref_set_data_str):
pref_set_data = json.loads(
pref_set_data_str)['alfredworkflow']['variables']
re... | <commit_before># yvs.set_pref
# coding=utf-8
from __future__ import unicode_literals
import json
import sys
import yvs.shared as shared
# Parse pref set data from the given JSON string
def parse_pref_set_data_str(pref_set_data_str):
pref_set_data = json.loads(
pref_set_data_str)['alfredworkflow']['var... | # yvs.set_pref
# coding=utf-8
from __future__ import unicode_literals
import json
import sys
import yvs.shared as shared
# Parse pref set data from the given JSON string
def parse_pref_set_data_str(pref_set_data_str):
pref_set_data = json.loads(
pref_set_data_str)['alfredworkflow']['variables']
re... | # yvs.set_pref
# coding=utf-8
from __future__ import unicode_literals
import json
import sys
import yvs.shared as shared
# Parse pref set data from the given JSON string
def parse_pref_set_data_str(pref_set_data_str):
pref_set_data = json.loads(
pref_set_data_str)['alfredworkflow']['variables']
re... | <commit_before># yvs.set_pref
# coding=utf-8
from __future__ import unicode_literals
import json
import sys
import yvs.shared as shared
# Parse pref set data from the given JSON string
def parse_pref_set_data_str(pref_set_data_str):
pref_set_data = json.loads(
pref_set_data_str)['alfredworkflow']['var... |
3786d778f583f96cb4dce37a175d2c460a020724 | cnxauthoring/events.py | cnxauthoring/events.py | # -*- coding: utf-8 -*-
# ###
# Copyright (c) 2013, Rice University
# This software is subject to the provisions of the GNU Affero General
# Public License version 3 (AGPLv3).
# See LICENCE.txt for details.
# ###
from pyramid.events import NewRequest
def add_cors_headers(request, response):
settings = request.reg... | # -*- coding: utf-8 -*-
# ###
# Copyright (c) 2013, Rice University
# This software is subject to the provisions of the GNU Affero General
# Public License version 3 (AGPLv3).
# See LICENCE.txt for details.
# ###
from pyramid.events import NewRequest
def add_cors_headers(request, response):
settings = request.reg... | Fix Access-Control-Allow-Origin to return the request origin | Fix Access-Control-Allow-Origin to return the request origin
request.host is the host part of the request url. For example, if
webview is trying to access http://localhost:8080/users/profile,
request. It's the Origin field in the headers that we should be
matching.
| Python | agpl-3.0 | Connexions/cnx-authoring | # -*- coding: utf-8 -*-
# ###
# Copyright (c) 2013, Rice University
# This software is subject to the provisions of the GNU Affero General
# Public License version 3 (AGPLv3).
# See LICENCE.txt for details.
# ###
from pyramid.events import NewRequest
def add_cors_headers(request, response):
settings = request.reg... | # -*- coding: utf-8 -*-
# ###
# Copyright (c) 2013, Rice University
# This software is subject to the provisions of the GNU Affero General
# Public License version 3 (AGPLv3).
# See LICENCE.txt for details.
# ###
from pyramid.events import NewRequest
def add_cors_headers(request, response):
settings = request.reg... | <commit_before># -*- coding: utf-8 -*-
# ###
# Copyright (c) 2013, Rice University
# This software is subject to the provisions of the GNU Affero General
# Public License version 3 (AGPLv3).
# See LICENCE.txt for details.
# ###
from pyramid.events import NewRequest
def add_cors_headers(request, response):
setting... | # -*- coding: utf-8 -*-
# ###
# Copyright (c) 2013, Rice University
# This software is subject to the provisions of the GNU Affero General
# Public License version 3 (AGPLv3).
# See LICENCE.txt for details.
# ###
from pyramid.events import NewRequest
def add_cors_headers(request, response):
settings = request.reg... | # -*- coding: utf-8 -*-
# ###
# Copyright (c) 2013, Rice University
# This software is subject to the provisions of the GNU Affero General
# Public License version 3 (AGPLv3).
# See LICENCE.txt for details.
# ###
from pyramid.events import NewRequest
def add_cors_headers(request, response):
settings = request.reg... | <commit_before># -*- coding: utf-8 -*-
# ###
# Copyright (c) 2013, Rice University
# This software is subject to the provisions of the GNU Affero General
# Public License version 3 (AGPLv3).
# See LICENCE.txt for details.
# ###
from pyramid.events import NewRequest
def add_cors_headers(request, response):
setting... |
7699c2922e6ac1c75b152028df53ea44ee55db11 | lib/version.py | lib/version.py | ELECTRUM_VERSION = "1.9.3" # version of the client package
PROTOCOL_VERSION = '0.6' # protocol version requested
SEED_VERSION = 6 # bump this every time the seed generation is modified
SEED_PREFIX = '01' # the hash of the mnemonic seed must begin with this
TRANSLATION_ID = 4183 # version o... | ELECTRUM_VERSION = "1.9.3" # version of the client package
PROTOCOL_VERSION = '0.6' # protocol version requested
SEED_VERSION = 6 # bump this every time the seed generation is modified
SEED_PREFIX = '01' # the hash of the mnemonic seed must begin with this
TRANSLATION_ID = 4190 # version o... | Add all missing French translation strings Wikia revision: 4190 | Add all missing French translation strings
Wikia revision: 4190
| Python | mit | dabura667/electrum,protonn/Electrum-Cash,procrasti/electrum,dashpay/electrum-dash,pknight007/electrum-vtc,neocogent/electrum,pooler/electrum-ltc,cryptapus/electrum,protonn/Electrum-Cash,dabura667/electrum,romanz/electrum,cryptapus/electrum-myr,dashpay/electrum-dash,fyookball/electrum,argentumproject/electrum-arg,lbryio... | ELECTRUM_VERSION = "1.9.3" # version of the client package
PROTOCOL_VERSION = '0.6' # protocol version requested
SEED_VERSION = 6 # bump this every time the seed generation is modified
SEED_PREFIX = '01' # the hash of the mnemonic seed must begin with this
TRANSLATION_ID = 4183 # version o... | ELECTRUM_VERSION = "1.9.3" # version of the client package
PROTOCOL_VERSION = '0.6' # protocol version requested
SEED_VERSION = 6 # bump this every time the seed generation is modified
SEED_PREFIX = '01' # the hash of the mnemonic seed must begin with this
TRANSLATION_ID = 4190 # version o... | <commit_before>ELECTRUM_VERSION = "1.9.3" # version of the client package
PROTOCOL_VERSION = '0.6' # protocol version requested
SEED_VERSION = 6 # bump this every time the seed generation is modified
SEED_PREFIX = '01' # the hash of the mnemonic seed must begin with this
TRANSLATION_ID = 4183 ... | ELECTRUM_VERSION = "1.9.3" # version of the client package
PROTOCOL_VERSION = '0.6' # protocol version requested
SEED_VERSION = 6 # bump this every time the seed generation is modified
SEED_PREFIX = '01' # the hash of the mnemonic seed must begin with this
TRANSLATION_ID = 4190 # version o... | ELECTRUM_VERSION = "1.9.3" # version of the client package
PROTOCOL_VERSION = '0.6' # protocol version requested
SEED_VERSION = 6 # bump this every time the seed generation is modified
SEED_PREFIX = '01' # the hash of the mnemonic seed must begin with this
TRANSLATION_ID = 4183 # version o... | <commit_before>ELECTRUM_VERSION = "1.9.3" # version of the client package
PROTOCOL_VERSION = '0.6' # protocol version requested
SEED_VERSION = 6 # bump this every time the seed generation is modified
SEED_PREFIX = '01' # the hash of the mnemonic seed must begin with this
TRANSLATION_ID = 4183 ... |
a4b0830b7336694dacc822077c2ce6901be4929b | widgy/contrib/widgy_mezzanine/search_indexes.py | widgy/contrib/widgy_mezzanine/search_indexes.py | from haystack import indexes
from widgy.contrib.widgy_mezzanine import get_widgypage_model
from widgy.templatetags.widgy_tags import render_root
from widgy.utils import html_to_plaintext
from .signals import widgypage_pre_index
WidgyPage = get_widgypage_model()
class PageIndex(indexes.SearchIndex, indexes.Indexabl... | from haystack import indexes
from widgy.contrib.widgy_mezzanine import get_widgypage_model
from widgy.templatetags.widgy_tags import render_root
from widgy.utils import html_to_plaintext
from .signals import widgypage_pre_index
WidgyPage = get_widgypage_model()
class PageIndex(indexes.SearchIndex, indexes.Indexabl... | Index the URL of the WidgyPage. | Index the URL of the WidgyPage.
This way, you don't have to fetch the page object when you want to put a
link in the search results.
| Python | apache-2.0 | j00bar/django-widgy,j00bar/django-widgy,j00bar/django-widgy | from haystack import indexes
from widgy.contrib.widgy_mezzanine import get_widgypage_model
from widgy.templatetags.widgy_tags import render_root
from widgy.utils import html_to_plaintext
from .signals import widgypage_pre_index
WidgyPage = get_widgypage_model()
class PageIndex(indexes.SearchIndex, indexes.Indexabl... | from haystack import indexes
from widgy.contrib.widgy_mezzanine import get_widgypage_model
from widgy.templatetags.widgy_tags import render_root
from widgy.utils import html_to_plaintext
from .signals import widgypage_pre_index
WidgyPage = get_widgypage_model()
class PageIndex(indexes.SearchIndex, indexes.Indexabl... | <commit_before>from haystack import indexes
from widgy.contrib.widgy_mezzanine import get_widgypage_model
from widgy.templatetags.widgy_tags import render_root
from widgy.utils import html_to_plaintext
from .signals import widgypage_pre_index
WidgyPage = get_widgypage_model()
class PageIndex(indexes.SearchIndex, i... | from haystack import indexes
from widgy.contrib.widgy_mezzanine import get_widgypage_model
from widgy.templatetags.widgy_tags import render_root
from widgy.utils import html_to_plaintext
from .signals import widgypage_pre_index
WidgyPage = get_widgypage_model()
class PageIndex(indexes.SearchIndex, indexes.Indexabl... | from haystack import indexes
from widgy.contrib.widgy_mezzanine import get_widgypage_model
from widgy.templatetags.widgy_tags import render_root
from widgy.utils import html_to_plaintext
from .signals import widgypage_pre_index
WidgyPage = get_widgypage_model()
class PageIndex(indexes.SearchIndex, indexes.Indexabl... | <commit_before>from haystack import indexes
from widgy.contrib.widgy_mezzanine import get_widgypage_model
from widgy.templatetags.widgy_tags import render_root
from widgy.utils import html_to_plaintext
from .signals import widgypage_pre_index
WidgyPage = get_widgypage_model()
class PageIndex(indexes.SearchIndex, i... |
46741fdbda00a8b1574dfdf0689c8a26454d28f6 | actions/cloudbolt_plugins/aws/poll_for_init_complete.py | actions/cloudbolt_plugins/aws/poll_for_init_complete.py | import sys
import time
from infrastructure.models import Server
from jobs.models import Job
TIMEOUT = 600
def is_reachable(server):
"""
:type server: Server
"""
instance_id = server.ec2serverinfo.instance_id
ec2_region = server.ec2serverinfo.ec2_region
rh = server.resource_handler.cast()
... | import time
from jobs.models import Job
TIMEOUT = 600
def is_reachable(server):
instance_id = server.ec2serverinfo.instance_id
ec2_region = server.ec2serverinfo.ec2_region
rh = server.resource_handler.cast()
rh.connect_ec2(ec2_region)
wc = rh.resource_technology.work_class
instance = wc.ge... | Clean up poll for init complete script | Clean up poll for init complete script
| Python | apache-2.0 | CloudBoltSoftware/cloudbolt-forge,CloudBoltSoftware/cloudbolt-forge,CloudBoltSoftware/cloudbolt-forge,CloudBoltSoftware/cloudbolt-forge | import sys
import time
from infrastructure.models import Server
from jobs.models import Job
TIMEOUT = 600
def is_reachable(server):
"""
:type server: Server
"""
instance_id = server.ec2serverinfo.instance_id
ec2_region = server.ec2serverinfo.ec2_region
rh = server.resource_handler.cast()
... | import time
from jobs.models import Job
TIMEOUT = 600
def is_reachable(server):
instance_id = server.ec2serverinfo.instance_id
ec2_region = server.ec2serverinfo.ec2_region
rh = server.resource_handler.cast()
rh.connect_ec2(ec2_region)
wc = rh.resource_technology.work_class
instance = wc.ge... | <commit_before>import sys
import time
from infrastructure.models import Server
from jobs.models import Job
TIMEOUT = 600
def is_reachable(server):
"""
:type server: Server
"""
instance_id = server.ec2serverinfo.instance_id
ec2_region = server.ec2serverinfo.ec2_region
rh = server.resource_ha... | import time
from jobs.models import Job
TIMEOUT = 600
def is_reachable(server):
instance_id = server.ec2serverinfo.instance_id
ec2_region = server.ec2serverinfo.ec2_region
rh = server.resource_handler.cast()
rh.connect_ec2(ec2_region)
wc = rh.resource_technology.work_class
instance = wc.ge... | import sys
import time
from infrastructure.models import Server
from jobs.models import Job
TIMEOUT = 600
def is_reachable(server):
"""
:type server: Server
"""
instance_id = server.ec2serverinfo.instance_id
ec2_region = server.ec2serverinfo.ec2_region
rh = server.resource_handler.cast()
... | <commit_before>import sys
import time
from infrastructure.models import Server
from jobs.models import Job
TIMEOUT = 600
def is_reachable(server):
"""
:type server: Server
"""
instance_id = server.ec2serverinfo.instance_id
ec2_region = server.ec2serverinfo.ec2_region
rh = server.resource_ha... |
fd77039104175a4b5702b46b21a2fa223676ddf4 | bowser/Database.py | bowser/Database.py | import json
import redis
class Database(object):
def __init__(self):
self.redis = redis.StrictRedis(host='redis', port=6379, db=0)
def set_data_of_server_channel(self, server, channel, data):
self.redis.hmset(server, {channel: json.dumps(data)})
def fetch_data_of_server_channel(self, ser... | import json
import redis
class Database(object):
def __init__(self):
self.redis = redis.StrictRedis(host='redis', port=6379, db=0)
def set_data_of_server_channel(self, server, channel, data):
self.redis.hmset(server, {channel: json.dumps(data)})
def fetch_data_of_server_channel(self, ser... | Raise KeyErrors for missing data in redis | fix: Raise KeyErrors for missing data in redis
| Python | mit | kevinkjt2000/discord-minecraft-server-status | import json
import redis
class Database(object):
def __init__(self):
self.redis = redis.StrictRedis(host='redis', port=6379, db=0)
def set_data_of_server_channel(self, server, channel, data):
self.redis.hmset(server, {channel: json.dumps(data)})
def fetch_data_of_server_channel(self, ser... | import json
import redis
class Database(object):
def __init__(self):
self.redis = redis.StrictRedis(host='redis', port=6379, db=0)
def set_data_of_server_channel(self, server, channel, data):
self.redis.hmset(server, {channel: json.dumps(data)})
def fetch_data_of_server_channel(self, ser... | <commit_before>import json
import redis
class Database(object):
def __init__(self):
self.redis = redis.StrictRedis(host='redis', port=6379, db=0)
def set_data_of_server_channel(self, server, channel, data):
self.redis.hmset(server, {channel: json.dumps(data)})
def fetch_data_of_server_ch... | import json
import redis
class Database(object):
def __init__(self):
self.redis = redis.StrictRedis(host='redis', port=6379, db=0)
def set_data_of_server_channel(self, server, channel, data):
self.redis.hmset(server, {channel: json.dumps(data)})
def fetch_data_of_server_channel(self, ser... | import json
import redis
class Database(object):
def __init__(self):
self.redis = redis.StrictRedis(host='redis', port=6379, db=0)
def set_data_of_server_channel(self, server, channel, data):
self.redis.hmset(server, {channel: json.dumps(data)})
def fetch_data_of_server_channel(self, ser... | <commit_before>import json
import redis
class Database(object):
def __init__(self):
self.redis = redis.StrictRedis(host='redis', port=6379, db=0)
def set_data_of_server_channel(self, server, channel, data):
self.redis.hmset(server, {channel: json.dumps(data)})
def fetch_data_of_server_ch... |
3f166b110d4e8623966ca29c71445973da4876f9 | armstrong/hatband/forms.py | armstrong/hatband/forms.py | from django import forms
from django.db import models
from . import widgets
RICH_TEXT_DBFIELD_OVERRIDES = {
models.TextField: {'widget': widgets.RichTextWidget},
}
class BackboneFormMixin(object):
class Media:
js = (
'hatband/js/jquery-1.6.2.min.js',
'hatband/js/under... | from django import forms
from django.conf import settings
from django.db import models
from . import widgets
RICH_TEXT_DBFIELD_OVERRIDES = {
models.TextField: {'widget': widgets.RichTextWidget},
}
class BackboneFormMixin(object):
if getattr(settings, "ARMSTRONG_ADMIN_PROVIDE_STATIC", True):
class Me... | Make it possible to turn off admin JS | Make it possible to turn off admin JS
| Python | apache-2.0 | armstrong/armstrong.hatband,armstrong/armstrong.hatband,texastribune/armstrong.hatband,armstrong/armstrong.hatband,texastribune/armstrong.hatband,texastribune/armstrong.hatband | from django import forms
from django.db import models
from . import widgets
RICH_TEXT_DBFIELD_OVERRIDES = {
models.TextField: {'widget': widgets.RichTextWidget},
}
class BackboneFormMixin(object):
class Media:
js = (
'hatband/js/jquery-1.6.2.min.js',
'hatband/js/under... | from django import forms
from django.conf import settings
from django.db import models
from . import widgets
RICH_TEXT_DBFIELD_OVERRIDES = {
models.TextField: {'widget': widgets.RichTextWidget},
}
class BackboneFormMixin(object):
if getattr(settings, "ARMSTRONG_ADMIN_PROVIDE_STATIC", True):
class Me... | <commit_before>from django import forms
from django.db import models
from . import widgets
RICH_TEXT_DBFIELD_OVERRIDES = {
models.TextField: {'widget': widgets.RichTextWidget},
}
class BackboneFormMixin(object):
class Media:
js = (
'hatband/js/jquery-1.6.2.min.js',
'h... | from django import forms
from django.conf import settings
from django.db import models
from . import widgets
RICH_TEXT_DBFIELD_OVERRIDES = {
models.TextField: {'widget': widgets.RichTextWidget},
}
class BackboneFormMixin(object):
if getattr(settings, "ARMSTRONG_ADMIN_PROVIDE_STATIC", True):
class Me... | from django import forms
from django.db import models
from . import widgets
RICH_TEXT_DBFIELD_OVERRIDES = {
models.TextField: {'widget': widgets.RichTextWidget},
}
class BackboneFormMixin(object):
class Media:
js = (
'hatband/js/jquery-1.6.2.min.js',
'hatband/js/under... | <commit_before>from django import forms
from django.db import models
from . import widgets
RICH_TEXT_DBFIELD_OVERRIDES = {
models.TextField: {'widget': widgets.RichTextWidget},
}
class BackboneFormMixin(object):
class Media:
js = (
'hatband/js/jquery-1.6.2.min.js',
'h... |
e369824a1bd337e9245d010b93734832af4e0376 | cetacean/response.py | cetacean/response.py | #!/usr/bin/env python
# encoding: utf-8
import json
import re
from .resource import Resource
class Response(Resource):
"""Represents an HTTP response that is hopefully a HAL document."""
def __init__(self, response):
"""Pass it a Requests response object.
:response: A response object from ... | #!/usr/bin/env python
# encoding: utf-8
import json
import re
from .resource import Resource
class Response(Resource):
"""Represents an HTTP response that is hopefully a HAL document."""
_hal_regex = re.compile(r"application/hal\+json")
def __init__(self, response):
"""Pass it a Requests respo... | Move _hal_regex to class scope. | Move _hal_regex to class scope.
| Python | mit | nanorepublica/cetacean-python,benhamill/cetacean-python | #!/usr/bin/env python
# encoding: utf-8
import json
import re
from .resource import Resource
class Response(Resource):
"""Represents an HTTP response that is hopefully a HAL document."""
def __init__(self, response):
"""Pass it a Requests response object.
:response: A response object from ... | #!/usr/bin/env python
# encoding: utf-8
import json
import re
from .resource import Resource
class Response(Resource):
"""Represents an HTTP response that is hopefully a HAL document."""
_hal_regex = re.compile(r"application/hal\+json")
def __init__(self, response):
"""Pass it a Requests respo... | <commit_before>#!/usr/bin/env python
# encoding: utf-8
import json
import re
from .resource import Resource
class Response(Resource):
"""Represents an HTTP response that is hopefully a HAL document."""
def __init__(self, response):
"""Pass it a Requests response object.
:response: A respon... | #!/usr/bin/env python
# encoding: utf-8
import json
import re
from .resource import Resource
class Response(Resource):
"""Represents an HTTP response that is hopefully a HAL document."""
_hal_regex = re.compile(r"application/hal\+json")
def __init__(self, response):
"""Pass it a Requests respo... | #!/usr/bin/env python
# encoding: utf-8
import json
import re
from .resource import Resource
class Response(Resource):
"""Represents an HTTP response that is hopefully a HAL document."""
def __init__(self, response):
"""Pass it a Requests response object.
:response: A response object from ... | <commit_before>#!/usr/bin/env python
# encoding: utf-8
import json
import re
from .resource import Resource
class Response(Resource):
"""Represents an HTTP response that is hopefully a HAL document."""
def __init__(self, response):
"""Pass it a Requests response object.
:response: A respon... |
46db910f9b9a150b785ea3b36a9e4f73db326d78 | loader.py | loader.py | from etl import get_local_handles, ingest_feeds, CSV_ETL_CLASSES
from local import LocalConfig
from interface import Marcotti
if __name__ == "__main__":
settings = LocalConfig()
marcotti = Marcotti(settings)
with marcotti.create_session() as sess:
for entity, etl_class in CSV_ETL_CLASSES:
... | import os
import logging
from etl import get_local_handles, ingest_feeds, CSV_ETL_CLASSES
from local import LocalConfig
from interface import Marcotti
LOG_FORMAT = logging.Formatter('%(asctime)s - %(name)s - %(levelname)s: %(message)s')
ch = logging.FileHandler(os.path.join(LocalConfig().LOG_DIR, 'marcotti.log'))
ch... | Add logging messages to data ingestion tool | Add logging messages to data ingestion tool
| Python | mit | soccermetrics/marcotti-mls | from etl import get_local_handles, ingest_feeds, CSV_ETL_CLASSES
from local import LocalConfig
from interface import Marcotti
if __name__ == "__main__":
settings = LocalConfig()
marcotti = Marcotti(settings)
with marcotti.create_session() as sess:
for entity, etl_class in CSV_ETL_CLASSES:
... | import os
import logging
from etl import get_local_handles, ingest_feeds, CSV_ETL_CLASSES
from local import LocalConfig
from interface import Marcotti
LOG_FORMAT = logging.Formatter('%(asctime)s - %(name)s - %(levelname)s: %(message)s')
ch = logging.FileHandler(os.path.join(LocalConfig().LOG_DIR, 'marcotti.log'))
ch... | <commit_before>from etl import get_local_handles, ingest_feeds, CSV_ETL_CLASSES
from local import LocalConfig
from interface import Marcotti
if __name__ == "__main__":
settings = LocalConfig()
marcotti = Marcotti(settings)
with marcotti.create_session() as sess:
for entity, etl_class in CSV_ETL_CL... | import os
import logging
from etl import get_local_handles, ingest_feeds, CSV_ETL_CLASSES
from local import LocalConfig
from interface import Marcotti
LOG_FORMAT = logging.Formatter('%(asctime)s - %(name)s - %(levelname)s: %(message)s')
ch = logging.FileHandler(os.path.join(LocalConfig().LOG_DIR, 'marcotti.log'))
ch... | from etl import get_local_handles, ingest_feeds, CSV_ETL_CLASSES
from local import LocalConfig
from interface import Marcotti
if __name__ == "__main__":
settings = LocalConfig()
marcotti = Marcotti(settings)
with marcotti.create_session() as sess:
for entity, etl_class in CSV_ETL_CLASSES:
... | <commit_before>from etl import get_local_handles, ingest_feeds, CSV_ETL_CLASSES
from local import LocalConfig
from interface import Marcotti
if __name__ == "__main__":
settings = LocalConfig()
marcotti = Marcotti(settings)
with marcotti.create_session() as sess:
for entity, etl_class in CSV_ETL_CL... |
dfc6b2d2d8cda75349dfab33d9639b5ea24cc520 | contentcuration/contentcuration/ricecooker_versions.py | contentcuration/contentcuration/ricecooker_versions.py | import xmlrpclib
from socket import gaierror
VERSION_OK = "0.5.13"
try:
pypi = xmlrpclib.ServerProxy('https://pypi.python.org/pypi')
VERSION_OK = pypi.package_releases('ricecooker')[0]
except gaierror:
pass
VERSION_OK_MESSAGE = "Ricecooker v{} is up-to-date."
VERSION_SOFT_WARNING = "0.5.6"
VERSION_SOFT_W... | import xmlrpclib
from socket import gaierror, error
VERSION_OK = "0.6.0"
try:
pypi = xmlrpclib.ServerProxy('https://pypi.python.org/pypi')
VERSION_OK = pypi.package_releases('ricecooker')[0]
except (gaierror, error):
pass
VERSION_OK_MESSAGE = "Ricecooker v{} is up-to-date."
VERSION_SOFT_WARNING = "0.5.6"... | Add error handling to reduce dependency on pypi | Add error handling to reduce dependency on pypi
| Python | mit | DXCanas/content-curation,DXCanas/content-curation,jayoshih/content-curation,jayoshih/content-curation,jayoshih/content-curation,jayoshih/content-curation,fle-internal/content-curation,fle-internal/content-curation,fle-internal/content-curation,fle-internal/content-curation,DXCanas/content-curation,DXCanas/content-curat... | import xmlrpclib
from socket import gaierror
VERSION_OK = "0.5.13"
try:
pypi = xmlrpclib.ServerProxy('https://pypi.python.org/pypi')
VERSION_OK = pypi.package_releases('ricecooker')[0]
except gaierror:
pass
VERSION_OK_MESSAGE = "Ricecooker v{} is up-to-date."
VERSION_SOFT_WARNING = "0.5.6"
VERSION_SOFT_W... | import xmlrpclib
from socket import gaierror, error
VERSION_OK = "0.6.0"
try:
pypi = xmlrpclib.ServerProxy('https://pypi.python.org/pypi')
VERSION_OK = pypi.package_releases('ricecooker')[0]
except (gaierror, error):
pass
VERSION_OK_MESSAGE = "Ricecooker v{} is up-to-date."
VERSION_SOFT_WARNING = "0.5.6"... | <commit_before>import xmlrpclib
from socket import gaierror
VERSION_OK = "0.5.13"
try:
pypi = xmlrpclib.ServerProxy('https://pypi.python.org/pypi')
VERSION_OK = pypi.package_releases('ricecooker')[0]
except gaierror:
pass
VERSION_OK_MESSAGE = "Ricecooker v{} is up-to-date."
VERSION_SOFT_WARNING = "0.5.6"... | import xmlrpclib
from socket import gaierror, error
VERSION_OK = "0.6.0"
try:
pypi = xmlrpclib.ServerProxy('https://pypi.python.org/pypi')
VERSION_OK = pypi.package_releases('ricecooker')[0]
except (gaierror, error):
pass
VERSION_OK_MESSAGE = "Ricecooker v{} is up-to-date."
VERSION_SOFT_WARNING = "0.5.6"... | import xmlrpclib
from socket import gaierror
VERSION_OK = "0.5.13"
try:
pypi = xmlrpclib.ServerProxy('https://pypi.python.org/pypi')
VERSION_OK = pypi.package_releases('ricecooker')[0]
except gaierror:
pass
VERSION_OK_MESSAGE = "Ricecooker v{} is up-to-date."
VERSION_SOFT_WARNING = "0.5.6"
VERSION_SOFT_W... | <commit_before>import xmlrpclib
from socket import gaierror
VERSION_OK = "0.5.13"
try:
pypi = xmlrpclib.ServerProxy('https://pypi.python.org/pypi')
VERSION_OK = pypi.package_releases('ricecooker')[0]
except gaierror:
pass
VERSION_OK_MESSAGE = "Ricecooker v{} is up-to-date."
VERSION_SOFT_WARNING = "0.5.6"... |
6a83ff3a2d1aca0a3663a36ca9502d3d86ea2a93 | pirx/base.py | pirx/base.py | class Settings(object):
def __init__(self):
self._settings = {}
def __setattr__(self, name, value):
if name.startswith('_'):
super(Settings, self).__setattr__(name, value)
else:
self._settings[name] = value
def write(self):
for name, value in self._s... | import collections
class Settings(object):
def __init__(self):
self._settings = collections.OrderedDict()
def __setattr__(self, name, value):
if name.startswith('_'):
super(Settings, self).__setattr__(name, value)
else:
self._settings[name] = value
def wri... | Store settings with the OrderedDict | Store settings with the OrderedDict
| Python | mit | piotrekw/pirx | class Settings(object):
def __init__(self):
self._settings = {}
def __setattr__(self, name, value):
if name.startswith('_'):
super(Settings, self).__setattr__(name, value)
else:
self._settings[name] = value
def write(self):
for name, value in self._s... | import collections
class Settings(object):
def __init__(self):
self._settings = collections.OrderedDict()
def __setattr__(self, name, value):
if name.startswith('_'):
super(Settings, self).__setattr__(name, value)
else:
self._settings[name] = value
def wri... | <commit_before>class Settings(object):
def __init__(self):
self._settings = {}
def __setattr__(self, name, value):
if name.startswith('_'):
super(Settings, self).__setattr__(name, value)
else:
self._settings[name] = value
def write(self):
for name, v... | import collections
class Settings(object):
def __init__(self):
self._settings = collections.OrderedDict()
def __setattr__(self, name, value):
if name.startswith('_'):
super(Settings, self).__setattr__(name, value)
else:
self._settings[name] = value
def wri... | class Settings(object):
def __init__(self):
self._settings = {}
def __setattr__(self, name, value):
if name.startswith('_'):
super(Settings, self).__setattr__(name, value)
else:
self._settings[name] = value
def write(self):
for name, value in self._s... | <commit_before>class Settings(object):
def __init__(self):
self._settings = {}
def __setattr__(self, name, value):
if name.startswith('_'):
super(Settings, self).__setattr__(name, value)
else:
self._settings[name] = value
def write(self):
for name, v... |
3188b77e07bc060cfdd3db8eadbf0fbe1e34b72e | orlo/config.py | orlo/config.py | from __future__ import print_function
import ConfigParser
__author__ = 'alforbes'
config = ConfigParser.ConfigParser()
config.add_section('main')
config.set('main', 'debug_mode', 'false')
config.set('main', 'propagate_exceptions', 'true')
config.set('main', 'time_format', '%Y-%m-%dT%H:%M:%SZ')
config.set('main', 'tim... | from __future__ import print_function
import ConfigParser
__author__ = 'alforbes'
config = ConfigParser.ConfigParser()
config.add_section('main')
config.set('main', 'debug_mode', 'false')
config.set('main', 'propagate_exceptions', 'true')
config.set('main', 'time_format', '%Y-%m-%dT%H:%M:%SZ')
config.set('main', 'tim... | Use relative path for deployer.rb | Use relative path for deployer.rb
| Python | mit | eBayClassifiedsGroup/orlo,al4/sponge,al4/orlo,al4/sponge,al4/sponge,eBayClassifiedsGroup/orlo,eBayClassifiedsGroup/sponge,eBayClassifiedsGroup/sponge,eBayClassifiedsGroup/sponge,al4/orlo | from __future__ import print_function
import ConfigParser
__author__ = 'alforbes'
config = ConfigParser.ConfigParser()
config.add_section('main')
config.set('main', 'debug_mode', 'false')
config.set('main', 'propagate_exceptions', 'true')
config.set('main', 'time_format', '%Y-%m-%dT%H:%M:%SZ')
config.set('main', 'tim... | from __future__ import print_function
import ConfigParser
__author__ = 'alforbes'
config = ConfigParser.ConfigParser()
config.add_section('main')
config.set('main', 'debug_mode', 'false')
config.set('main', 'propagate_exceptions', 'true')
config.set('main', 'time_format', '%Y-%m-%dT%H:%M:%SZ')
config.set('main', 'tim... | <commit_before>from __future__ import print_function
import ConfigParser
__author__ = 'alforbes'
config = ConfigParser.ConfigParser()
config.add_section('main')
config.set('main', 'debug_mode', 'false')
config.set('main', 'propagate_exceptions', 'true')
config.set('main', 'time_format', '%Y-%m-%dT%H:%M:%SZ')
config.s... | from __future__ import print_function
import ConfigParser
__author__ = 'alforbes'
config = ConfigParser.ConfigParser()
config.add_section('main')
config.set('main', 'debug_mode', 'false')
config.set('main', 'propagate_exceptions', 'true')
config.set('main', 'time_format', '%Y-%m-%dT%H:%M:%SZ')
config.set('main', 'tim... | from __future__ import print_function
import ConfigParser
__author__ = 'alforbes'
config = ConfigParser.ConfigParser()
config.add_section('main')
config.set('main', 'debug_mode', 'false')
config.set('main', 'propagate_exceptions', 'true')
config.set('main', 'time_format', '%Y-%m-%dT%H:%M:%SZ')
config.set('main', 'tim... | <commit_before>from __future__ import print_function
import ConfigParser
__author__ = 'alforbes'
config = ConfigParser.ConfigParser()
config.add_section('main')
config.set('main', 'debug_mode', 'false')
config.set('main', 'propagate_exceptions', 'true')
config.set('main', 'time_format', '%Y-%m-%dT%H:%M:%SZ')
config.s... |
6cfc9de7fe8fd048a75845a69bdeefc7c742bae4 | oneall/django_oneall/management/commands/emaillogin.py | oneall/django_oneall/management/commands/emaillogin.py | # -*- coding: utf-8 -*-
from django.core.management.base import BaseCommand
from django.core.urlresolvers import reverse
from ...auth import EmailTokenAuthBackend
class Command(BaseCommand):
help = "E-mail login without sending the actual e-mail."
def add_arguments(self, parser):
parser.add_argument... | # -*- coding: utf-8 -*-
from django.core.mail import EmailMessage
from django.core.management.base import BaseCommand
from django.core.urlresolvers import reverse
from ...auth import EmailTokenAuthBackend
class Command(BaseCommand):
help = "Issues an e-mail login token."
def add_arguments(self, parser):
... | Add the possibility of testing SMTP from the command-line. | Add the possibility of testing SMTP from the command-line.
| Python | mit | leandigo/django-oneall,ckot/django-oneall,leandigo/django-oneall,ckot/django-oneall | # -*- coding: utf-8 -*-
from django.core.management.base import BaseCommand
from django.core.urlresolvers import reverse
from ...auth import EmailTokenAuthBackend
class Command(BaseCommand):
help = "E-mail login without sending the actual e-mail."
def add_arguments(self, parser):
parser.add_argument... | # -*- coding: utf-8 -*-
from django.core.mail import EmailMessage
from django.core.management.base import BaseCommand
from django.core.urlresolvers import reverse
from ...auth import EmailTokenAuthBackend
class Command(BaseCommand):
help = "Issues an e-mail login token."
def add_arguments(self, parser):
... | <commit_before># -*- coding: utf-8 -*-
from django.core.management.base import BaseCommand
from django.core.urlresolvers import reverse
from ...auth import EmailTokenAuthBackend
class Command(BaseCommand):
help = "E-mail login without sending the actual e-mail."
def add_arguments(self, parser):
pars... | # -*- coding: utf-8 -*-
from django.core.mail import EmailMessage
from django.core.management.base import BaseCommand
from django.core.urlresolvers import reverse
from ...auth import EmailTokenAuthBackend
class Command(BaseCommand):
help = "Issues an e-mail login token."
def add_arguments(self, parser):
... | # -*- coding: utf-8 -*-
from django.core.management.base import BaseCommand
from django.core.urlresolvers import reverse
from ...auth import EmailTokenAuthBackend
class Command(BaseCommand):
help = "E-mail login without sending the actual e-mail."
def add_arguments(self, parser):
parser.add_argument... | <commit_before># -*- coding: utf-8 -*-
from django.core.management.base import BaseCommand
from django.core.urlresolvers import reverse
from ...auth import EmailTokenAuthBackend
class Command(BaseCommand):
help = "E-mail login without sending the actual e-mail."
def add_arguments(self, parser):
pars... |
7a936665eff8a6a8f6889334ad2238cbfcded18b | member.py | member.py | import requests
from credentials import label_id
from gmailauth import refresh
access_token = refresh()
headers = {'Authorization': ('Bearer ' + access_token)}
def list_messages(headers):
params = {'labelIds': label_id, 'q': 'newer_than:3d'}
r = requests.get('https://www.googleapis.com/gmail/v1/users... | import requests
from base64 import urlsafe_b64decode
from credentials import label_id, url1, url2
from gmailauth import refresh
# access_token = refresh()
headers = {'Authorization': ('Bearer ' + access_token)}
def list_messages(headers):
params = {'labelIds': label_id, 'q': 'newer_than:2d'}
r = requ... | Return the order details URL from email body. | Return the order details URL from email body.
There is currently no Agile API method that will return the order
details for an activity so the URL from the email must be used in
conjunction with a web scraper to get the relevant details.
| Python | mit | deadlyraptor/reels | import requests
from credentials import label_id
from gmailauth import refresh
access_token = refresh()
headers = {'Authorization': ('Bearer ' + access_token)}
def list_messages(headers):
params = {'labelIds': label_id, 'q': 'newer_than:3d'}
r = requests.get('https://www.googleapis.com/gmail/v1/users... | import requests
from base64 import urlsafe_b64decode
from credentials import label_id, url1, url2
from gmailauth import refresh
# access_token = refresh()
headers = {'Authorization': ('Bearer ' + access_token)}
def list_messages(headers):
params = {'labelIds': label_id, 'q': 'newer_than:2d'}
r = requ... | <commit_before>import requests
from credentials import label_id
from gmailauth import refresh
access_token = refresh()
headers = {'Authorization': ('Bearer ' + access_token)}
def list_messages(headers):
params = {'labelIds': label_id, 'q': 'newer_than:3d'}
r = requests.get('https://www.googleapis.com... | import requests
from base64 import urlsafe_b64decode
from credentials import label_id, url1, url2
from gmailauth import refresh
# access_token = refresh()
headers = {'Authorization': ('Bearer ' + access_token)}
def list_messages(headers):
params = {'labelIds': label_id, 'q': 'newer_than:2d'}
r = requ... | import requests
from credentials import label_id
from gmailauth import refresh
access_token = refresh()
headers = {'Authorization': ('Bearer ' + access_token)}
def list_messages(headers):
params = {'labelIds': label_id, 'q': 'newer_than:3d'}
r = requests.get('https://www.googleapis.com/gmail/v1/users... | <commit_before>import requests
from credentials import label_id
from gmailauth import refresh
access_token = refresh()
headers = {'Authorization': ('Bearer ' + access_token)}
def list_messages(headers):
params = {'labelIds': label_id, 'q': 'newer_than:3d'}
r = requests.get('https://www.googleapis.com... |
2cf6318c18620064898cdf5e940a3fc732d976f8 | src/lighter/hipchat.py | src/lighter/hipchat.py | import logging, urllib2
from lighter.util import merge, build_request
class HipChat(object):
def __init__(self, url, token):
self._url = url or 'https://api.hipchat.com'
self._token = token
self_rooms = []
self._sender = 'Lighter'
self._message_attribs = {
'from'... | import logging, urllib2
from lighter.util import merge, build_request
class HipChat(object):
def __init__(self, url, token):
self._url = url or 'https://api.hipchat.com'
self._token = token
self_rooms = []
self._sender = 'Lighter'
self._message_attribs = {
'color... | Remove extra label for user | Remove extra label for user
| Python | mit | meltwater/lighter,meltwater/lighter | import logging, urllib2
from lighter.util import merge, build_request
class HipChat(object):
def __init__(self, url, token):
self._url = url or 'https://api.hipchat.com'
self._token = token
self_rooms = []
self._sender = 'Lighter'
self._message_attribs = {
'from'... | import logging, urllib2
from lighter.util import merge, build_request
class HipChat(object):
def __init__(self, url, token):
self._url = url or 'https://api.hipchat.com'
self._token = token
self_rooms = []
self._sender = 'Lighter'
self._message_attribs = {
'color... | <commit_before>import logging, urllib2
from lighter.util import merge, build_request
class HipChat(object):
def __init__(self, url, token):
self._url = url or 'https://api.hipchat.com'
self._token = token
self_rooms = []
self._sender = 'Lighter'
self._message_attribs = {
... | import logging, urllib2
from lighter.util import merge, build_request
class HipChat(object):
def __init__(self, url, token):
self._url = url or 'https://api.hipchat.com'
self._token = token
self_rooms = []
self._sender = 'Lighter'
self._message_attribs = {
'color... | import logging, urllib2
from lighter.util import merge, build_request
class HipChat(object):
def __init__(self, url, token):
self._url = url or 'https://api.hipchat.com'
self._token = token
self_rooms = []
self._sender = 'Lighter'
self._message_attribs = {
'from'... | <commit_before>import logging, urllib2
from lighter.util import merge, build_request
class HipChat(object):
def __init__(self, url, token):
self._url = url or 'https://api.hipchat.com'
self._token = token
self_rooms = []
self._sender = 'Lighter'
self._message_attribs = {
... |
ed11fa0ebc365b8a7b0f31c8b09bf23b891e44b6 | discover_tests.py | discover_tests.py | """
Simple auto test discovery.
From http://stackoverflow.com/a/17004409
"""
import os
import sys
import unittest
def additional_tests():
setup_file = sys.modules['__main__'].__file__
setup_dir = os.path.abspath(os.path.dirname(setup_file))
return unittest.defaultTestLoader.discover(setup_dir)
| """
Simple auto test discovery.
From http://stackoverflow.com/a/17004409
"""
import os
import sys
import unittest
if not hasattr(unittest.defaultTestLoader, 'discover'):
import unittest2 as unittest
def additional_tests():
setup_file = sys.modules['__main__'].__file__
setup_dir = os.path.abspath(os.path.... | Allow test discovery on Py26 with unittest2 | Allow test discovery on Py26 with unittest2
| Python | mit | QuLogic/python-future,michaelpacer/python-future,PythonCharmers/python-future,QuLogic/python-future,krischer/python-future,PythonCharmers/python-future,krischer/python-future,michaelpacer/python-future | """
Simple auto test discovery.
From http://stackoverflow.com/a/17004409
"""
import os
import sys
import unittest
def additional_tests():
setup_file = sys.modules['__main__'].__file__
setup_dir = os.path.abspath(os.path.dirname(setup_file))
return unittest.defaultTestLoader.discover(setup_dir)
Allow test ... | """
Simple auto test discovery.
From http://stackoverflow.com/a/17004409
"""
import os
import sys
import unittest
if not hasattr(unittest.defaultTestLoader, 'discover'):
import unittest2 as unittest
def additional_tests():
setup_file = sys.modules['__main__'].__file__
setup_dir = os.path.abspath(os.path.... | <commit_before>"""
Simple auto test discovery.
From http://stackoverflow.com/a/17004409
"""
import os
import sys
import unittest
def additional_tests():
setup_file = sys.modules['__main__'].__file__
setup_dir = os.path.abspath(os.path.dirname(setup_file))
return unittest.defaultTestLoader.discover(setup_d... | """
Simple auto test discovery.
From http://stackoverflow.com/a/17004409
"""
import os
import sys
import unittest
if not hasattr(unittest.defaultTestLoader, 'discover'):
import unittest2 as unittest
def additional_tests():
setup_file = sys.modules['__main__'].__file__
setup_dir = os.path.abspath(os.path.... | """
Simple auto test discovery.
From http://stackoverflow.com/a/17004409
"""
import os
import sys
import unittest
def additional_tests():
setup_file = sys.modules['__main__'].__file__
setup_dir = os.path.abspath(os.path.dirname(setup_file))
return unittest.defaultTestLoader.discover(setup_dir)
Allow test ... | <commit_before>"""
Simple auto test discovery.
From http://stackoverflow.com/a/17004409
"""
import os
import sys
import unittest
def additional_tests():
setup_file = sys.modules['__main__'].__file__
setup_dir = os.path.abspath(os.path.dirname(setup_file))
return unittest.defaultTestLoader.discover(setup_d... |
63f04662f5ca22443ab6080f559ac898302cf103 | tests/integration/conftest.py | tests/integration/conftest.py | def pytest_collection_modifyitems(session, config, items):
# Ensure that all tests with require a redeploy are run after
# tests that don't need a redeploy.
final_list = []
on_redeploy_tests = []
for item in items:
if item.get_marker('on_redeploy') is not None:
on_redeploy_tests.... | DEPLOY_TEST_BASENAME = 'test_features.py'
def pytest_collection_modifyitems(session, config, items):
# Ensure that all tests with require a redeploy are run after
# tests that don't need a redeploy.
start, end = _get_start_end_index(DEPLOY_TEST_BASENAME, items)
marked = []
unmarked = []
for it... | Reorder redeploy tests within a single module | Reorder redeploy tests within a single module
The original code for on_redeploy was making the
assumption that there was only one integration test file.
When test_package.py was added, the tests always failed
because the redeploy tests were run *after* the package tests
which messed with the module scope fixtures.
No... | Python | apache-2.0 | awslabs/chalice | def pytest_collection_modifyitems(session, config, items):
# Ensure that all tests with require a redeploy are run after
# tests that don't need a redeploy.
final_list = []
on_redeploy_tests = []
for item in items:
if item.get_marker('on_redeploy') is not None:
on_redeploy_tests.... | DEPLOY_TEST_BASENAME = 'test_features.py'
def pytest_collection_modifyitems(session, config, items):
# Ensure that all tests with require a redeploy are run after
# tests that don't need a redeploy.
start, end = _get_start_end_index(DEPLOY_TEST_BASENAME, items)
marked = []
unmarked = []
for it... | <commit_before>def pytest_collection_modifyitems(session, config, items):
# Ensure that all tests with require a redeploy are run after
# tests that don't need a redeploy.
final_list = []
on_redeploy_tests = []
for item in items:
if item.get_marker('on_redeploy') is not None:
on_... | DEPLOY_TEST_BASENAME = 'test_features.py'
def pytest_collection_modifyitems(session, config, items):
# Ensure that all tests with require a redeploy are run after
# tests that don't need a redeploy.
start, end = _get_start_end_index(DEPLOY_TEST_BASENAME, items)
marked = []
unmarked = []
for it... | def pytest_collection_modifyitems(session, config, items):
# Ensure that all tests with require a redeploy are run after
# tests that don't need a redeploy.
final_list = []
on_redeploy_tests = []
for item in items:
if item.get_marker('on_redeploy') is not None:
on_redeploy_tests.... | <commit_before>def pytest_collection_modifyitems(session, config, items):
# Ensure that all tests with require a redeploy are run after
# tests that don't need a redeploy.
final_list = []
on_redeploy_tests = []
for item in items:
if item.get_marker('on_redeploy') is not None:
on_... |
859a82df7804f181ffc12052a4af59ab52a44560 | test/goldstandard/benchmark_confirm.py | test/goldstandard/benchmark_confirm.py | import sqlite3 as sql
import os
import sys
import logging
import benchmark
# bmVerify(['final_r7', 'final_r8'], filepath="/home/ysun/disambig/newcode/all/", outdir = "/home/ayu/results_v2/")
# Text Files
txt_file = 'benchmark_errors.txt'
opened_file = open(txt_file, 'U')
log_file = 'benchmark_results.log'
#... | import sqlite3 as sql
import os
import sys
import logging
import benchmark
# bmVerify(['final_r7', 'final_r8'], filepath="/home/ysun/disambig/newcode/all/", outdir = "/home/ayu/results_v2/")
# Text Files
txt_file = 'benchmark_errors.txt'
opened_file = open(txt_file, 'U')
log_file = 'benchmark_results.log'
#... | Set up reading lines from file, print count for testing purposes | Set up reading lines from file, print count for testing purposes
| Python | bsd-2-clause | yngcan/patentprocessor,nikken1/patentprocessor,funginstitute/patentprocessor,nikken1/patentprocessor,yngcan/patentprocessor,yngcan/patentprocessor,funginstitute/patentprocessor,funginstitute/patentprocessor,nikken1/patentprocessor | import sqlite3 as sql
import os
import sys
import logging
import benchmark
# bmVerify(['final_r7', 'final_r8'], filepath="/home/ysun/disambig/newcode/all/", outdir = "/home/ayu/results_v2/")
# Text Files
txt_file = 'benchmark_errors.txt'
opened_file = open(txt_file, 'U')
log_file = 'benchmark_results.log'
#... | import sqlite3 as sql
import os
import sys
import logging
import benchmark
# bmVerify(['final_r7', 'final_r8'], filepath="/home/ysun/disambig/newcode/all/", outdir = "/home/ayu/results_v2/")
# Text Files
txt_file = 'benchmark_errors.txt'
opened_file = open(txt_file, 'U')
log_file = 'benchmark_results.log'
#... | <commit_before>import sqlite3 as sql
import os
import sys
import logging
import benchmark
# bmVerify(['final_r7', 'final_r8'], filepath="/home/ysun/disambig/newcode/all/", outdir = "/home/ayu/results_v2/")
# Text Files
txt_file = 'benchmark_errors.txt'
opened_file = open(txt_file, 'U')
log_file = 'benchmark_... | import sqlite3 as sql
import os
import sys
import logging
import benchmark
# bmVerify(['final_r7', 'final_r8'], filepath="/home/ysun/disambig/newcode/all/", outdir = "/home/ayu/results_v2/")
# Text Files
txt_file = 'benchmark_errors.txt'
opened_file = open(txt_file, 'U')
log_file = 'benchmark_results.log'
#... | import sqlite3 as sql
import os
import sys
import logging
import benchmark
# bmVerify(['final_r7', 'final_r8'], filepath="/home/ysun/disambig/newcode/all/", outdir = "/home/ayu/results_v2/")
# Text Files
txt_file = 'benchmark_errors.txt'
opened_file = open(txt_file, 'U')
log_file = 'benchmark_results.log'
#... | <commit_before>import sqlite3 as sql
import os
import sys
import logging
import benchmark
# bmVerify(['final_r7', 'final_r8'], filepath="/home/ysun/disambig/newcode/all/", outdir = "/home/ayu/results_v2/")
# Text Files
txt_file = 'benchmark_errors.txt'
opened_file = open(txt_file, 'U')
log_file = 'benchmark_... |
7a0c0e6ed56e847b7b6300c1a0b4a427f26b296d | app/PRESUBMIT.py | app/PRESUBMIT.py | #!/usr/bin/python
# Copyright (c) 2009 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""Makes sure that the app/ code is cpplint clean."""
INCLUDE_CPP_FILES_ONLY = (
r'.*\.cc$', r'.*\.h$'
)
EXCLUDE = (
# Autogener... | #!/usr/bin/python
# Copyright (c) 2009 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""Makes sure that the app/ code is cpplint clean."""
INCLUDE_CPP_FILES_ONLY = (
r'.*\.cc$', r'.*\.h$'
)
EXCLUDE = (
# Autogener... | Make all changes to app/ run on all trybot platforms, not just the big three. Anyone who's changing a header here may break the chromeos build. | Make all changes to app/ run on all trybot platforms, not just the big three.
Anyone who's changing a header here may break the chromeos build.
BUG=none
TEST=none
Review URL: http://codereview.chromium.org/2838027
git-svn-id: dd90618784b6a4b323ea0c23a071cb1c9e6f2ac7@51000 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
| Python | bsd-3-clause | wistoch/meego-app-browser,wistoch/meego-app-browser,wistoch/meego-app-browser,wistoch/meego-app-browser,wistoch/meego-app-browser,wistoch/meego-app-browser,wistoch/meego-app-browser,wistoch/meego-app-browser,wistoch/meego-app-browser,wistoch/meego-app-browser | #!/usr/bin/python
# Copyright (c) 2009 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""Makes sure that the app/ code is cpplint clean."""
INCLUDE_CPP_FILES_ONLY = (
r'.*\.cc$', r'.*\.h$'
)
EXCLUDE = (
# Autogener... | #!/usr/bin/python
# Copyright (c) 2009 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""Makes sure that the app/ code is cpplint clean."""
INCLUDE_CPP_FILES_ONLY = (
r'.*\.cc$', r'.*\.h$'
)
EXCLUDE = (
# Autogener... | <commit_before>#!/usr/bin/python
# Copyright (c) 2009 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""Makes sure that the app/ code is cpplint clean."""
INCLUDE_CPP_FILES_ONLY = (
r'.*\.cc$', r'.*\.h$'
)
EXCLUDE = ... | #!/usr/bin/python
# Copyright (c) 2009 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""Makes sure that the app/ code is cpplint clean."""
INCLUDE_CPP_FILES_ONLY = (
r'.*\.cc$', r'.*\.h$'
)
EXCLUDE = (
# Autogener... | #!/usr/bin/python
# Copyright (c) 2009 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""Makes sure that the app/ code is cpplint clean."""
INCLUDE_CPP_FILES_ONLY = (
r'.*\.cc$', r'.*\.h$'
)
EXCLUDE = (
# Autogener... | <commit_before>#!/usr/bin/python
# Copyright (c) 2009 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""Makes sure that the app/ code is cpplint clean."""
INCLUDE_CPP_FILES_ONLY = (
r'.*\.cc$', r'.*\.h$'
)
EXCLUDE = ... |
d42314b323aa0f8c764d72a5ebebc0e7d5ac88f3 | nova/api/openstack/compute/schemas/v3/create_backup.py | nova/api/openstack/compute/schemas/v3/create_backup.py | # Copyright 2014 NEC 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 required ... | # Copyright 2014 NEC 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 required ... | Remove param check for backup type on v2.1 API | Remove param check for backup type on v2.1 API
The backup type is only used by glance, so nova check it make
no sense; currently we have daily and weekly as only valid param
but someone may add 'monthly' as param. nova should allow it
and delegate the error. This patch removes check on v2.1 API.
Change-Id: I59bbc0f58... | Python | apache-2.0 | devendermishrajio/nova,affo/nova,projectcalico/calico-nova,whitepages/nova,klmitch/nova,jianghuaw/nova,cernops/nova,Stavitsky/nova,fnordahl/nova,blueboxgroup/nova,CEG-FYP-OpenStack/scheduler,Francis-Liu/animated-broccoli,j-carpentier/nova,joker946/nova,hanlind/nova,rajalokan/nova,zhimin711/nova,silenceli/nova,ruslanlom... | # Copyright 2014 NEC 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 required ... | # Copyright 2014 NEC 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 required ... | <commit_before># Copyright 2014 NEC 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
#
# U... | # Copyright 2014 NEC 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 required ... | # Copyright 2014 NEC 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 required ... | <commit_before># Copyright 2014 NEC 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
#
# U... |
720c6dbf9831b2b2ff701d0ca88303189583b9c4 | opps/api/__init__.py | opps/api/__init__.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from django.http import HttpResponse
from django.contrib.auth import authenticate
from piston.handler import BaseHandler as Handler
from opps.api.models import ApiKey
class BaseHandler(Handler):
def read(self, request):
base = self.model.objects
if ... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from django.http import HttpResponse
from django.contrib.auth import authenticate
from piston.handler import BaseHandler as Handler
from opps.api.models import ApiKey
class BaseHandler(Handler):
def read(self, request):
base = self.model.objects
if ... | Add method appendModel on api BaseHandler | Add method appendModel on api BaseHandler
| Python | mit | YACOWS/opps,opps/opps,jeanmask/opps,opps/opps,williamroot/opps,YACOWS/opps,williamroot/opps,opps/opps,YACOWS/opps,williamroot/opps,williamroot/opps,YACOWS/opps,opps/opps,jeanmask/opps,jeanmask/opps,jeanmask/opps | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from django.http import HttpResponse
from django.contrib.auth import authenticate
from piston.handler import BaseHandler as Handler
from opps.api.models import ApiKey
class BaseHandler(Handler):
def read(self, request):
base = self.model.objects
if ... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from django.http import HttpResponse
from django.contrib.auth import authenticate
from piston.handler import BaseHandler as Handler
from opps.api.models import ApiKey
class BaseHandler(Handler):
def read(self, request):
base = self.model.objects
if ... | <commit_before>#!/usr/bin/env python
# -*- coding: utf-8 -*-
from django.http import HttpResponse
from django.contrib.auth import authenticate
from piston.handler import BaseHandler as Handler
from opps.api.models import ApiKey
class BaseHandler(Handler):
def read(self, request):
base = self.model.obje... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from django.http import HttpResponse
from django.contrib.auth import authenticate
from piston.handler import BaseHandler as Handler
from opps.api.models import ApiKey
class BaseHandler(Handler):
def read(self, request):
base = self.model.objects
if ... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from django.http import HttpResponse
from django.contrib.auth import authenticate
from piston.handler import BaseHandler as Handler
from opps.api.models import ApiKey
class BaseHandler(Handler):
def read(self, request):
base = self.model.objects
if ... | <commit_before>#!/usr/bin/env python
# -*- coding: utf-8 -*-
from django.http import HttpResponse
from django.contrib.auth import authenticate
from piston.handler import BaseHandler as Handler
from opps.api.models import ApiKey
class BaseHandler(Handler):
def read(self, request):
base = self.model.obje... |
09c3e765075b7207ca09116330496cf56472d099 | talks/settings_test.py | talks/settings_test.py | from talks.settings import *
INSTALLED_APPS += ('django_nose',)
TEST_RUNNER = 'django_nose.NoseTestSuiteRunner'
DEBUG = True
RAVEN_CONFIG = {}
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.sqlite3',
'NAME': ':memory:',
}
}
AUTHENTICATION_BACKENDS = (
'django.contrib.auth.backe... | from talks.settings import *
INSTALLED_APPS += ('django_nose',)
TEST_RUNNER = 'django_nose.NoseTestSuiteRunner'
DEBUG = True
RAVEN_CONFIG = {}
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.sqlite3',
'NAME': ':memory:',
}
}
AUTHENTICATION_BACKENDS = (
'django.contrib.auth.backe... | Fix the tests by mocking the response | Fix the tests by mocking the response
| Python | apache-2.0 | ox-it/talks.ox,ox-it/talks.ox,ox-it/talks.ox | from talks.settings import *
INSTALLED_APPS += ('django_nose',)
TEST_RUNNER = 'django_nose.NoseTestSuiteRunner'
DEBUG = True
RAVEN_CONFIG = {}
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.sqlite3',
'NAME': ':memory:',
}
}
AUTHENTICATION_BACKENDS = (
'django.contrib.auth.backe... | from talks.settings import *
INSTALLED_APPS += ('django_nose',)
TEST_RUNNER = 'django_nose.NoseTestSuiteRunner'
DEBUG = True
RAVEN_CONFIG = {}
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.sqlite3',
'NAME': ':memory:',
}
}
AUTHENTICATION_BACKENDS = (
'django.contrib.auth.backe... | <commit_before>from talks.settings import *
INSTALLED_APPS += ('django_nose',)
TEST_RUNNER = 'django_nose.NoseTestSuiteRunner'
DEBUG = True
RAVEN_CONFIG = {}
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.sqlite3',
'NAME': ':memory:',
}
}
AUTHENTICATION_BACKENDS = (
'django.con... | from talks.settings import *
INSTALLED_APPS += ('django_nose',)
TEST_RUNNER = 'django_nose.NoseTestSuiteRunner'
DEBUG = True
RAVEN_CONFIG = {}
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.sqlite3',
'NAME': ':memory:',
}
}
AUTHENTICATION_BACKENDS = (
'django.contrib.auth.backe... | from talks.settings import *
INSTALLED_APPS += ('django_nose',)
TEST_RUNNER = 'django_nose.NoseTestSuiteRunner'
DEBUG = True
RAVEN_CONFIG = {}
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.sqlite3',
'NAME': ':memory:',
}
}
AUTHENTICATION_BACKENDS = (
'django.contrib.auth.backe... | <commit_before>from talks.settings import *
INSTALLED_APPS += ('django_nose',)
TEST_RUNNER = 'django_nose.NoseTestSuiteRunner'
DEBUG = True
RAVEN_CONFIG = {}
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.sqlite3',
'NAME': ':memory:',
}
}
AUTHENTICATION_BACKENDS = (
'django.con... |
54c4e434276b242de56529e63bb6c5c61d891412 | indico/modules/events/surveys/tasks.py | indico/modules/events/surveys/tasks.py | # This file is part of Indico.
# Copyright (C) 2002 - 2015 European Organization for Nuclear Research (CERN).
#
# Indico is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License as
# published by the Free Software Foundation; either version 3 of the
# License, or (a... | # This file is part of Indico.
# Copyright (C) 2002 - 2015 European Organization for Nuclear Research (CERN).
#
# Indico is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License as
# published by the Free Software Foundation; either version 3 of the
# License, or (a... | Use safer condition for survey start notification | Use safer condition for survey start notification
| Python | mit | mvidalgarcia/indico,ThiefMaster/indico,pferreir/indico,indico/indico,mic4ael/indico,DirkHoffmann/indico,ThiefMaster/indico,indico/indico,ThiefMaster/indico,indico/indico,mic4ael/indico,indico/indico,OmeGak/indico,OmeGak/indico,pferreir/indico,DirkHoffmann/indico,mic4ael/indico,DirkHoffmann/indico,OmeGak/indico,DirkHoff... | # This file is part of Indico.
# Copyright (C) 2002 - 2015 European Organization for Nuclear Research (CERN).
#
# Indico is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License as
# published by the Free Software Foundation; either version 3 of the
# License, or (a... | # This file is part of Indico.
# Copyright (C) 2002 - 2015 European Organization for Nuclear Research (CERN).
#
# Indico is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License as
# published by the Free Software Foundation; either version 3 of the
# License, or (a... | <commit_before># This file is part of Indico.
# Copyright (C) 2002 - 2015 European Organization for Nuclear Research (CERN).
#
# Indico is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License as
# published by the Free Software Foundation; either version 3 of the
#... | # This file is part of Indico.
# Copyright (C) 2002 - 2015 European Organization for Nuclear Research (CERN).
#
# Indico is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License as
# published by the Free Software Foundation; either version 3 of the
# License, or (a... | # This file is part of Indico.
# Copyright (C) 2002 - 2015 European Organization for Nuclear Research (CERN).
#
# Indico is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License as
# published by the Free Software Foundation; either version 3 of the
# License, or (a... | <commit_before># This file is part of Indico.
# Copyright (C) 2002 - 2015 European Organization for Nuclear Research (CERN).
#
# Indico is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License as
# published by the Free Software Foundation; either version 3 of the
#... |
fff234587be9b63270b345345f607df381031bdc | opendebates/tests/test_context_processors.py | opendebates/tests/test_context_processors.py | import urlparse
from django.test import TestCase, override_settings
from mock import patch, Mock
from opendebates.context_processors import global_vars
from opendebates.tests.factories import SubmissionFactory
class NumberOfVotesTest(TestCase):
def test_number_of_votes(self):
mock_request = Mock()
... | import urlparse
from django.test import TestCase, override_settings
from mock import patch, Mock
from opendebates.context_processors import global_vars
from opendebates.tests.factories import SubmissionFactory
class NumberOfVotesTest(TestCase):
def test_number_of_votes(self):
mock_request = Mock()
... | Fix test_email_url() after changes to email templating for sharing emails | Fix test_email_url() after changes to email templating for sharing emails
| Python | apache-2.0 | caktus/django-opendebates,caktus/django-opendebates,caktus/django-opendebates,ejucovy/django-opendebates,ejucovy/django-opendebates,ejucovy/django-opendebates,caktus/django-opendebates,ejucovy/django-opendebates | import urlparse
from django.test import TestCase, override_settings
from mock import patch, Mock
from opendebates.context_processors import global_vars
from opendebates.tests.factories import SubmissionFactory
class NumberOfVotesTest(TestCase):
def test_number_of_votes(self):
mock_request = Mock()
... | import urlparse
from django.test import TestCase, override_settings
from mock import patch, Mock
from opendebates.context_processors import global_vars
from opendebates.tests.factories import SubmissionFactory
class NumberOfVotesTest(TestCase):
def test_number_of_votes(self):
mock_request = Mock()
... | <commit_before>import urlparse
from django.test import TestCase, override_settings
from mock import patch, Mock
from opendebates.context_processors import global_vars
from opendebates.tests.factories import SubmissionFactory
class NumberOfVotesTest(TestCase):
def test_number_of_votes(self):
mock_request... | import urlparse
from django.test import TestCase, override_settings
from mock import patch, Mock
from opendebates.context_processors import global_vars
from opendebates.tests.factories import SubmissionFactory
class NumberOfVotesTest(TestCase):
def test_number_of_votes(self):
mock_request = Mock()
... | import urlparse
from django.test import TestCase, override_settings
from mock import patch, Mock
from opendebates.context_processors import global_vars
from opendebates.tests.factories import SubmissionFactory
class NumberOfVotesTest(TestCase):
def test_number_of_votes(self):
mock_request = Mock()
... | <commit_before>import urlparse
from django.test import TestCase, override_settings
from mock import patch, Mock
from opendebates.context_processors import global_vars
from opendebates.tests.factories import SubmissionFactory
class NumberOfVotesTest(TestCase):
def test_number_of_votes(self):
mock_request... |
d0461fa033bdca4fffeff718219f8b71123449d7 | pskb_website/models/__init__.py | pskb_website/models/__init__.py | """
Public model API
"""
from .article import search_for_article
from .article import get_available_articles
from .article import read_article
from .article import save_article
from .article import delete_article
from .article import branch_article
from .article import branch_or_save_article
from .article import get_a... | """
Public model API
"""
from .article import search_for_article
from .article import get_available_articles
from .article import read_article
from .article import save_article
from .article import delete_article
from .article import branch_article
from .article import branch_or_save_article
from .article import get_a... | Remove some functions from exported model API that are not used outside model layer | Remove some functions from exported model API that are not used outside model layer
- Just some refactoring to trim down the number of things exported that aren't
necessary at this time.
| Python | agpl-3.0 | paulocheque/guides-cms,pluralsight/guides-cms,pluralsight/guides-cms,paulocheque/guides-cms,paulocheque/guides-cms,pluralsight/guides-cms | """
Public model API
"""
from .article import search_for_article
from .article import get_available_articles
from .article import read_article
from .article import save_article
from .article import delete_article
from .article import branch_article
from .article import branch_or_save_article
from .article import get_a... | """
Public model API
"""
from .article import search_for_article
from .article import get_available_articles
from .article import read_article
from .article import save_article
from .article import delete_article
from .article import branch_article
from .article import branch_or_save_article
from .article import get_a... | <commit_before>"""
Public model API
"""
from .article import search_for_article
from .article import get_available_articles
from .article import read_article
from .article import save_article
from .article import delete_article
from .article import branch_article
from .article import branch_or_save_article
from .artic... | """
Public model API
"""
from .article import search_for_article
from .article import get_available_articles
from .article import read_article
from .article import save_article
from .article import delete_article
from .article import branch_article
from .article import branch_or_save_article
from .article import get_a... | """
Public model API
"""
from .article import search_for_article
from .article import get_available_articles
from .article import read_article
from .article import save_article
from .article import delete_article
from .article import branch_article
from .article import branch_or_save_article
from .article import get_a... | <commit_before>"""
Public model API
"""
from .article import search_for_article
from .article import get_available_articles
from .article import read_article
from .article import save_article
from .article import delete_article
from .article import branch_article
from .article import branch_or_save_article
from .artic... |
3a4ed7370455467240647a15a236c18012e9a5f1 | Problem054/Python/solution_1.py | Problem054/Python/solution_1.py | from collections import Counter
hands = [line.split(' ') for line in open('p054_poker.txt')]
values = {'2': 2, '3': 3, '4': 4, '5': 5, '6': 6, '7': 7, '8': 8, '9': 9, 'T': 10, 'J': 11, 'Q': 12, 'K': 13, 'A': 14}
straights = [(v, v - 1, v - 2, v - 3, v - 4) for v in range(14, 5, -1)]
ranks = [(1, 1, 1, 1, 1), (2, 1, 1... | from collections import Counter
hands = [line.split(' ') for line in open('p054_poker.txt')]
values = {'2': 2, '3': 3, '4': 4, '5': 5, '6': 6, '7': 7, '8': 8, '9': 9, 'T': 10, 'J': 11, 'Q': 12, 'K': 13, 'A': 14}
straights = [(v, v - 1, v - 2, v - 3, v - 4) for v in range(14, 5, -1)]
ranks = [(1, 1, 1, 1, 1), (2, 1, 1... | Make it compatible with Python 3.5+ | Make it compatible with Python 3.5+
Remove unnecessary usage of f-strings. | Python | mit | DestructHub/ProjectEuler,DestructHub/ProjectEuler,DestructHub/ProjectEuler,DestructHub/ProjectEuler,DestructHub/ProjectEuler,DestructHub/ProjectEuler,DestructHub/ProjectEuler,DestructHub/ProjectEuler,DestructHub/ProjectEuler,DestructHub/ProjectEuler,DestructHub/ProjectEuler,DestructHub/ProjectEuler,DestructHub/ProjectE... | from collections import Counter
hands = [line.split(' ') for line in open('p054_poker.txt')]
values = {'2': 2, '3': 3, '4': 4, '5': 5, '6': 6, '7': 7, '8': 8, '9': 9, 'T': 10, 'J': 11, 'Q': 12, 'K': 13, 'A': 14}
straights = [(v, v - 1, v - 2, v - 3, v - 4) for v in range(14, 5, -1)]
ranks = [(1, 1, 1, 1, 1), (2, 1, 1... | from collections import Counter
hands = [line.split(' ') for line in open('p054_poker.txt')]
values = {'2': 2, '3': 3, '4': 4, '5': 5, '6': 6, '7': 7, '8': 8, '9': 9, 'T': 10, 'J': 11, 'Q': 12, 'K': 13, 'A': 14}
straights = [(v, v - 1, v - 2, v - 3, v - 4) for v in range(14, 5, -1)]
ranks = [(1, 1, 1, 1, 1), (2, 1, 1... | <commit_before>from collections import Counter
hands = [line.split(' ') for line in open('p054_poker.txt')]
values = {'2': 2, '3': 3, '4': 4, '5': 5, '6': 6, '7': 7, '8': 8, '9': 9, 'T': 10, 'J': 11, 'Q': 12, 'K': 13, 'A': 14}
straights = [(v, v - 1, v - 2, v - 3, v - 4) for v in range(14, 5, -1)]
ranks = [(1, 1, 1, ... | from collections import Counter
hands = [line.split(' ') for line in open('p054_poker.txt')]
values = {'2': 2, '3': 3, '4': 4, '5': 5, '6': 6, '7': 7, '8': 8, '9': 9, 'T': 10, 'J': 11, 'Q': 12, 'K': 13, 'A': 14}
straights = [(v, v - 1, v - 2, v - 3, v - 4) for v in range(14, 5, -1)]
ranks = [(1, 1, 1, 1, 1), (2, 1, 1... | from collections import Counter
hands = [line.split(' ') for line in open('p054_poker.txt')]
values = {'2': 2, '3': 3, '4': 4, '5': 5, '6': 6, '7': 7, '8': 8, '9': 9, 'T': 10, 'J': 11, 'Q': 12, 'K': 13, 'A': 14}
straights = [(v, v - 1, v - 2, v - 3, v - 4) for v in range(14, 5, -1)]
ranks = [(1, 1, 1, 1, 1), (2, 1, 1... | <commit_before>from collections import Counter
hands = [line.split(' ') for line in open('p054_poker.txt')]
values = {'2': 2, '3': 3, '4': 4, '5': 5, '6': 6, '7': 7, '8': 8, '9': 9, 'T': 10, 'J': 11, 'Q': 12, 'K': 13, 'A': 14}
straights = [(v, v - 1, v - 2, v - 3, v - 4) for v in range(14, 5, -1)]
ranks = [(1, 1, 1, ... |
02ef7f864c437e92fd8f2734d8325cca843e6341 | test_loading.py | test_loading.py | import random
from dmp import dmp
users = ["adam", "ben", "chris", "denis", "eric"]
file_types = ["fastq", "fasta", "bam", "bed", "hdf5", "tsv", "wig", "pdb"]
data_types = ['RNA-seq', 'MNase-Seq', 'ChIP-seq', 'WGBS', 'HiC']
compressed = [None, 'gzip', 'zip']
da = dmp(test=True)
for i in xrange(10):
u = random.c... | import random
from dmp import dmp
users = ["adam", "ben", "chris", "denis", "eric"]
file_types = ["fastq", "fasta", "bam", "bed", "hdf5", "tsv", "wig", "pdb"]
data_types = ['RNA-seq', 'MNase-Seq', 'ChIP-seq', 'WGBS', 'HiC']
compressed = [None, 'gzip', 'zip']
da = dmp(test=False)
for i in xrange(10):
u = random.... | Use the provided mongo db rather than mongomock | Use the provided mongo db rather than mongomock
| Python | apache-2.0 | Multiscale-Genomics/mg-dm-api,Multiscale-Genomics/mg-dm-api | import random
from dmp import dmp
users = ["adam", "ben", "chris", "denis", "eric"]
file_types = ["fastq", "fasta", "bam", "bed", "hdf5", "tsv", "wig", "pdb"]
data_types = ['RNA-seq', 'MNase-Seq', 'ChIP-seq', 'WGBS', 'HiC']
compressed = [None, 'gzip', 'zip']
da = dmp(test=True)
for i in xrange(10):
u = random.c... | import random
from dmp import dmp
users = ["adam", "ben", "chris", "denis", "eric"]
file_types = ["fastq", "fasta", "bam", "bed", "hdf5", "tsv", "wig", "pdb"]
data_types = ['RNA-seq', 'MNase-Seq', 'ChIP-seq', 'WGBS', 'HiC']
compressed = [None, 'gzip', 'zip']
da = dmp(test=False)
for i in xrange(10):
u = random.... | <commit_before>import random
from dmp import dmp
users = ["adam", "ben", "chris", "denis", "eric"]
file_types = ["fastq", "fasta", "bam", "bed", "hdf5", "tsv", "wig", "pdb"]
data_types = ['RNA-seq', 'MNase-Seq', 'ChIP-seq', 'WGBS', 'HiC']
compressed = [None, 'gzip', 'zip']
da = dmp(test=True)
for i in xrange(10):
... | import random
from dmp import dmp
users = ["adam", "ben", "chris", "denis", "eric"]
file_types = ["fastq", "fasta", "bam", "bed", "hdf5", "tsv", "wig", "pdb"]
data_types = ['RNA-seq', 'MNase-Seq', 'ChIP-seq', 'WGBS', 'HiC']
compressed = [None, 'gzip', 'zip']
da = dmp(test=False)
for i in xrange(10):
u = random.... | import random
from dmp import dmp
users = ["adam", "ben", "chris", "denis", "eric"]
file_types = ["fastq", "fasta", "bam", "bed", "hdf5", "tsv", "wig", "pdb"]
data_types = ['RNA-seq', 'MNase-Seq', 'ChIP-seq', 'WGBS', 'HiC']
compressed = [None, 'gzip', 'zip']
da = dmp(test=True)
for i in xrange(10):
u = random.c... | <commit_before>import random
from dmp import dmp
users = ["adam", "ben", "chris", "denis", "eric"]
file_types = ["fastq", "fasta", "bam", "bed", "hdf5", "tsv", "wig", "pdb"]
data_types = ['RNA-seq', 'MNase-Seq', 'ChIP-seq', 'WGBS', 'HiC']
compressed = [None, 'gzip', 'zip']
da = dmp(test=True)
for i in xrange(10):
... |
77d264bd25e0556eb3680b845de22b62d2ebd3e6 | bouncer/embed_detector.py | bouncer/embed_detector.py | import fnmatch
import re
from urllib.parse import urlparse
# Hardcoded URL patterns where client is assumed to be embedded.
#
# Only the hostname and path are included in the pattern. The path must be
# specified; use "example.com/*" to match all URLs on a particular domain.
#
# Patterns are shell-style wildcards ('*'... | import fnmatch
import re
from urllib.parse import urlparse
# Hardcoded URL patterns where client is assumed to be embedded.
#
# Only the hostname and path are included in the pattern. The path must be
# specified; use "example.com/*" to match all URLs on a particular domain.
#
# Patterns are shell-style wildcards ('*'... | Add APA websites to URL patterns where client is known to be embedded. | Add APA websites to URL patterns where client is known to be embedded.
URL patterns provided by Kadidra McCloud at APA.
Fixes https://github.com/hypothesis/product-backlog/issues/814
| Python | bsd-2-clause | hypothesis/bouncer,hypothesis/bouncer,hypothesis/bouncer | import fnmatch
import re
from urllib.parse import urlparse
# Hardcoded URL patterns where client is assumed to be embedded.
#
# Only the hostname and path are included in the pattern. The path must be
# specified; use "example.com/*" to match all URLs on a particular domain.
#
# Patterns are shell-style wildcards ('*'... | import fnmatch
import re
from urllib.parse import urlparse
# Hardcoded URL patterns where client is assumed to be embedded.
#
# Only the hostname and path are included in the pattern. The path must be
# specified; use "example.com/*" to match all URLs on a particular domain.
#
# Patterns are shell-style wildcards ('*'... | <commit_before>import fnmatch
import re
from urllib.parse import urlparse
# Hardcoded URL patterns where client is assumed to be embedded.
#
# Only the hostname and path are included in the pattern. The path must be
# specified; use "example.com/*" to match all URLs on a particular domain.
#
# Patterns are shell-style... | import fnmatch
import re
from urllib.parse import urlparse
# Hardcoded URL patterns where client is assumed to be embedded.
#
# Only the hostname and path are included in the pattern. The path must be
# specified; use "example.com/*" to match all URLs on a particular domain.
#
# Patterns are shell-style wildcards ('*'... | import fnmatch
import re
from urllib.parse import urlparse
# Hardcoded URL patterns where client is assumed to be embedded.
#
# Only the hostname and path are included in the pattern. The path must be
# specified; use "example.com/*" to match all URLs on a particular domain.
#
# Patterns are shell-style wildcards ('*'... | <commit_before>import fnmatch
import re
from urllib.parse import urlparse
# Hardcoded URL patterns where client is assumed to be embedded.
#
# Only the hostname and path are included in the pattern. The path must be
# specified; use "example.com/*" to match all URLs on a particular domain.
#
# Patterns are shell-style... |
ab035185e2c2023280c29aa5239deac820ec873d | openprescribing/openprescribing/settings/e2etest.py | openprescribing/openprescribing/settings/e2etest.py | from __future__ import absolute_import
from .test import *
DATABASES = {
"default": {
"ENGINE": "django.contrib.gis.db.backends.postgis",
"NAME": utils.get_env_setting("E2E_DB_NAME"),
"USER": utils.get_env_setting("DB_USER"),
"PASSWORD": utils.get_env_setting("DB_PASS"),
"HO... | from __future__ import absolute_import
from .test import *
DATABASES = {
"default": {
"ENGINE": "django.contrib.gis.db.backends.postgis",
"NAME": utils.get_env_setting("E2E_DB_NAME"),
"USER": utils.get_env_setting("DB_USER"),
"PASSWORD": utils.get_env_setting("DB_PASS"),
"HO... | Use real measure definitions in e2e tests | Use real measure definitions in e2e tests | Python | mit | ebmdatalab/openprescribing,annapowellsmith/openpresc,ebmdatalab/openprescribing,annapowellsmith/openpresc,ebmdatalab/openprescribing,ebmdatalab/openprescribing,annapowellsmith/openpresc,annapowellsmith/openpresc | from __future__ import absolute_import
from .test import *
DATABASES = {
"default": {
"ENGINE": "django.contrib.gis.db.backends.postgis",
"NAME": utils.get_env_setting("E2E_DB_NAME"),
"USER": utils.get_env_setting("DB_USER"),
"PASSWORD": utils.get_env_setting("DB_PASS"),
"HO... | from __future__ import absolute_import
from .test import *
DATABASES = {
"default": {
"ENGINE": "django.contrib.gis.db.backends.postgis",
"NAME": utils.get_env_setting("E2E_DB_NAME"),
"USER": utils.get_env_setting("DB_USER"),
"PASSWORD": utils.get_env_setting("DB_PASS"),
"HO... | <commit_before>from __future__ import absolute_import
from .test import *
DATABASES = {
"default": {
"ENGINE": "django.contrib.gis.db.backends.postgis",
"NAME": utils.get_env_setting("E2E_DB_NAME"),
"USER": utils.get_env_setting("DB_USER"),
"PASSWORD": utils.get_env_setting("DB_PASS... | from __future__ import absolute_import
from .test import *
DATABASES = {
"default": {
"ENGINE": "django.contrib.gis.db.backends.postgis",
"NAME": utils.get_env_setting("E2E_DB_NAME"),
"USER": utils.get_env_setting("DB_USER"),
"PASSWORD": utils.get_env_setting("DB_PASS"),
"HO... | from __future__ import absolute_import
from .test import *
DATABASES = {
"default": {
"ENGINE": "django.contrib.gis.db.backends.postgis",
"NAME": utils.get_env_setting("E2E_DB_NAME"),
"USER": utils.get_env_setting("DB_USER"),
"PASSWORD": utils.get_env_setting("DB_PASS"),
"HO... | <commit_before>from __future__ import absolute_import
from .test import *
DATABASES = {
"default": {
"ENGINE": "django.contrib.gis.db.backends.postgis",
"NAME": utils.get_env_setting("E2E_DB_NAME"),
"USER": utils.get_env_setting("DB_USER"),
"PASSWORD": utils.get_env_setting("DB_PASS... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.