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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
8c950b364cc22d800cfac7af347b6bed3d012d6b | pyseeta/config.py | pyseeta/config.py |
import os
import sys
config = {
'win32': {
'detector': 'seeta_fd_lib.dll',
'aligner': 'seeta_fa_lib.dll',
'identifier': 'seeta_fi_lib.dll'
},
'darwin': {
'detector': 'libseeta_fd_lib.dylib',
'aligner': 'libseeta_fa_lib.dylib',
'identifier': 'libseeta_fi_lib.... |
import os
import sys
config = {
'win32': {
'detector': 'seeta_fd_lib.dll',
'aligner': 'seeta_fa_lib.dll',
'identifier': 'seeta_fi_lib.dll'
},
'darwin': {
'detector': 'libseeta_fd_lib.dylib',
'aligner': 'libseeta_fa_lib.dylib',
'identifier': 'libseeta_fi_lib.... | Fix crash when Ubuntu 16.04 x64 Python 2.7.12 (default, Nov 19 2016, 06:48:10) sys.platform return 'linux2' | Fix crash
when Ubuntu 16.04 x64 Python 2.7.12 (default, Nov 19 2016, 06:48:10) sys.platform return 'linux2'
| Python | mit | TuXiaokang/pyseeta |
import os
import sys
config = {
'win32': {
'detector': 'seeta_fd_lib.dll',
'aligner': 'seeta_fa_lib.dll',
'identifier': 'seeta_fi_lib.dll'
},
'darwin': {
'detector': 'libseeta_fd_lib.dylib',
'aligner': 'libseeta_fa_lib.dylib',
'identifier': 'libseeta_fi_lib.... |
import os
import sys
config = {
'win32': {
'detector': 'seeta_fd_lib.dll',
'aligner': 'seeta_fa_lib.dll',
'identifier': 'seeta_fi_lib.dll'
},
'darwin': {
'detector': 'libseeta_fd_lib.dylib',
'aligner': 'libseeta_fa_lib.dylib',
'identifier': 'libseeta_fi_lib.... | <commit_before>
import os
import sys
config = {
'win32': {
'detector': 'seeta_fd_lib.dll',
'aligner': 'seeta_fa_lib.dll',
'identifier': 'seeta_fi_lib.dll'
},
'darwin': {
'detector': 'libseeta_fd_lib.dylib',
'aligner': 'libseeta_fa_lib.dylib',
'identifier': 'l... |
import os
import sys
config = {
'win32': {
'detector': 'seeta_fd_lib.dll',
'aligner': 'seeta_fa_lib.dll',
'identifier': 'seeta_fi_lib.dll'
},
'darwin': {
'detector': 'libseeta_fd_lib.dylib',
'aligner': 'libseeta_fa_lib.dylib',
'identifier': 'libseeta_fi_lib.... |
import os
import sys
config = {
'win32': {
'detector': 'seeta_fd_lib.dll',
'aligner': 'seeta_fa_lib.dll',
'identifier': 'seeta_fi_lib.dll'
},
'darwin': {
'detector': 'libseeta_fd_lib.dylib',
'aligner': 'libseeta_fa_lib.dylib',
'identifier': 'libseeta_fi_lib.... | <commit_before>
import os
import sys
config = {
'win32': {
'detector': 'seeta_fd_lib.dll',
'aligner': 'seeta_fa_lib.dll',
'identifier': 'seeta_fi_lib.dll'
},
'darwin': {
'detector': 'libseeta_fd_lib.dylib',
'aligner': 'libseeta_fa_lib.dylib',
'identifier': 'l... |
21a4c6c5cdf3461ef2bd6048a7399044e8b1a0e8 | spyder_unittest/backend/pytestworker.py | spyder_unittest/backend/pytestworker.py | # -*- coding: utf-8 -*-
#
# Copyright © 2017 Spyder Project Contributors
# Licensed under the terms of the MIT License
# (see LICENSE.txt for details)
"""
Script for running py.test tests.
This script is meant to be run in a separate process by a PyTestRunner.
It runs tests via the py.test framework and prints the res... | # -*- coding: utf-8 -*-
#
# Copyright © 2017 Spyder Project Contributors
# Licensed under the terms of the MIT License
# (see LICENSE.txt for details)
"""
Script for running py.test tests.
This script is meant to be run in a separate process by a PyTestRunner.
It runs tests via the py.test framework and prints the res... | Add py.test plugin which prints out test names as they are collected | Add py.test plugin which prints out test names as they are collected
| Python | mit | jitseniesen/spyder-unittest | # -*- coding: utf-8 -*-
#
# Copyright © 2017 Spyder Project Contributors
# Licensed under the terms of the MIT License
# (see LICENSE.txt for details)
"""
Script for running py.test tests.
This script is meant to be run in a separate process by a PyTestRunner.
It runs tests via the py.test framework and prints the res... | # -*- coding: utf-8 -*-
#
# Copyright © 2017 Spyder Project Contributors
# Licensed under the terms of the MIT License
# (see LICENSE.txt for details)
"""
Script for running py.test tests.
This script is meant to be run in a separate process by a PyTestRunner.
It runs tests via the py.test framework and prints the res... | <commit_before># -*- coding: utf-8 -*-
#
# Copyright © 2017 Spyder Project Contributors
# Licensed under the terms of the MIT License
# (see LICENSE.txt for details)
"""
Script for running py.test tests.
This script is meant to be run in a separate process by a PyTestRunner.
It runs tests via the py.test framework and... | # -*- coding: utf-8 -*-
#
# Copyright © 2017 Spyder Project Contributors
# Licensed under the terms of the MIT License
# (see LICENSE.txt for details)
"""
Script for running py.test tests.
This script is meant to be run in a separate process by a PyTestRunner.
It runs tests via the py.test framework and prints the res... | # -*- coding: utf-8 -*-
#
# Copyright © 2017 Spyder Project Contributors
# Licensed under the terms of the MIT License
# (see LICENSE.txt for details)
"""
Script for running py.test tests.
This script is meant to be run in a separate process by a PyTestRunner.
It runs tests via the py.test framework and prints the res... | <commit_before># -*- coding: utf-8 -*-
#
# Copyright © 2017 Spyder Project Contributors
# Licensed under the terms of the MIT License
# (see LICENSE.txt for details)
"""
Script for running py.test tests.
This script is meant to be run in a separate process by a PyTestRunner.
It runs tests via the py.test framework and... |
2fdc5943bc6f23c6d56d6bb86e6a5bf33338237e | digikey/admin.py | digikey/admin.py | from django.contrib import admin
from digikey.models import Components, Orders, Order_Details, Groups
class ComponentInline(admin.TabularInline):
model = Order_Details
extra = 1
class OrderInline(admin.TabularInline):
model = Orders
extra = 1
fieldsets = [
('Payment information', {... | from django.contrib import admin
from digikey.models import Components, Orders, Order_Details, Groups
class ComponentInline(admin.TabularInline):
model = Order_Details
extra = 1
class OrderInline(admin.TabularInline):
model = Orders
extra = 1
fieldsets = [
('Payment information', {... | Add Filter option for order amd order group | Add Filter option for order amd order group
| Python | mit | sonicyang/chiphub,sonicyang/chiphub,sonicyang/chiphub | from django.contrib import admin
from digikey.models import Components, Orders, Order_Details, Groups
class ComponentInline(admin.TabularInline):
model = Order_Details
extra = 1
class OrderInline(admin.TabularInline):
model = Orders
extra = 1
fieldsets = [
('Payment information', {... | from django.contrib import admin
from digikey.models import Components, Orders, Order_Details, Groups
class ComponentInline(admin.TabularInline):
model = Order_Details
extra = 1
class OrderInline(admin.TabularInline):
model = Orders
extra = 1
fieldsets = [
('Payment information', {... | <commit_before>from django.contrib import admin
from digikey.models import Components, Orders, Order_Details, Groups
class ComponentInline(admin.TabularInline):
model = Order_Details
extra = 1
class OrderInline(admin.TabularInline):
model = Orders
extra = 1
fieldsets = [
('Payment ... | from django.contrib import admin
from digikey.models import Components, Orders, Order_Details, Groups
class ComponentInline(admin.TabularInline):
model = Order_Details
extra = 1
class OrderInline(admin.TabularInline):
model = Orders
extra = 1
fieldsets = [
('Payment information', {... | from django.contrib import admin
from digikey.models import Components, Orders, Order_Details, Groups
class ComponentInline(admin.TabularInline):
model = Order_Details
extra = 1
class OrderInline(admin.TabularInline):
model = Orders
extra = 1
fieldsets = [
('Payment information', {... | <commit_before>from django.contrib import admin
from digikey.models import Components, Orders, Order_Details, Groups
class ComponentInline(admin.TabularInline):
model = Order_Details
extra = 1
class OrderInline(admin.TabularInline):
model = Orders
extra = 1
fieldsets = [
('Payment ... |
de2568dd1feec001098574e28848ca0ef8bca475 | search/sorting.py | search/sorting.py |
def sort_by_popularity(items):
return sorted(items, key=lambda product: product.popularity, reverse=True)
|
def sort_by_property(prop):
def _sort_by_property(items):
return sorted(items,
key=lambda item: getattr(item, prop),
reverse=True)
return _sort_by_property
sort_by_popularity = sort_by_property('popularity')
| Redefine sort function to a generic one. Some overhead but can use for any property | Redefine sort function to a generic one. Some overhead but can use for
any property | Python | mit | vanng822/geosearch,vanng822/geosearch,vanng822/geosearch |
def sort_by_popularity(items):
return sorted(items, key=lambda product: product.popularity, reverse=True)
Redefine sort function to a generic one. Some overhead but can use for
any property |
def sort_by_property(prop):
def _sort_by_property(items):
return sorted(items,
key=lambda item: getattr(item, prop),
reverse=True)
return _sort_by_property
sort_by_popularity = sort_by_property('popularity')
| <commit_before>
def sort_by_popularity(items):
return sorted(items, key=lambda product: product.popularity, reverse=True)
<commit_msg>Redefine sort function to a generic one. Some overhead but can use for
any property<commit_after> |
def sort_by_property(prop):
def _sort_by_property(items):
return sorted(items,
key=lambda item: getattr(item, prop),
reverse=True)
return _sort_by_property
sort_by_popularity = sort_by_property('popularity')
|
def sort_by_popularity(items):
return sorted(items, key=lambda product: product.popularity, reverse=True)
Redefine sort function to a generic one. Some overhead but can use for
any property
def sort_by_property(prop):
def _sort_by_property(items):
return sorted(items,
key=lambda ... | <commit_before>
def sort_by_popularity(items):
return sorted(items, key=lambda product: product.popularity, reverse=True)
<commit_msg>Redefine sort function to a generic one. Some overhead but can use for
any property<commit_after>
def sort_by_property(prop):
def _sort_by_property(items):
return sorted... |
729de81f7d76b50d1d6810bc23fab45c60020091 | hel/utils/tests/__init__.py | hel/utils/tests/__init__.py | # -*- coding: utf-8 -*-
# http://stackoverflow.com/a/8866661
def are_equal(a, b):
unmatched = list(b)
for element in a:
try:
unmatched.remove(element)
except ValueError:
return False
return not unmatched
| # -*- coding: utf-8 -*-
# http://stackoverflow.com/a/8866661
def are_equal(a, b):
unmatched = list(b)
for element in a:
try:
unmatched.remove(element)
except ValueError:
return False
return not unmatched
| Add blank lines the PEP0008 check missed so much | Add blank lines the PEP0008 check missed so much
| Python | mit | hel-repo/hel,MoonlightOwl/hel,MoonlightOwl/hel,hel-repo/hel,MoonlightOwl/hel | # -*- coding: utf-8 -*-
# http://stackoverflow.com/a/8866661
def are_equal(a, b):
unmatched = list(b)
for element in a:
try:
unmatched.remove(element)
except ValueError:
return False
return not unmatched
Add blank lines the PEP0008 check missed so much | # -*- coding: utf-8 -*-
# http://stackoverflow.com/a/8866661
def are_equal(a, b):
unmatched = list(b)
for element in a:
try:
unmatched.remove(element)
except ValueError:
return False
return not unmatched
| <commit_before># -*- coding: utf-8 -*-
# http://stackoverflow.com/a/8866661
def are_equal(a, b):
unmatched = list(b)
for element in a:
try:
unmatched.remove(element)
except ValueError:
return False
return not unmatched
<commit_msg>Add blank lines the PEP0008 check mis... | # -*- coding: utf-8 -*-
# http://stackoverflow.com/a/8866661
def are_equal(a, b):
unmatched = list(b)
for element in a:
try:
unmatched.remove(element)
except ValueError:
return False
return not unmatched
| # -*- coding: utf-8 -*-
# http://stackoverflow.com/a/8866661
def are_equal(a, b):
unmatched = list(b)
for element in a:
try:
unmatched.remove(element)
except ValueError:
return False
return not unmatched
Add blank lines the PEP0008 check missed so much# -*- coding: ut... | <commit_before># -*- coding: utf-8 -*-
# http://stackoverflow.com/a/8866661
def are_equal(a, b):
unmatched = list(b)
for element in a:
try:
unmatched.remove(element)
except ValueError:
return False
return not unmatched
<commit_msg>Add blank lines the PEP0008 check mis... |
05001e4a60d7fe0babf8f66ba9a5cecd2ffc4e85 | geotrek/trekking/templatetags/trekking_tags.py | geotrek/trekking/templatetags/trekking_tags.py | from datetime import datetime, timedelta
from django import template
from django.conf import settings
from django.utils.translation import ugettext_lazy as _
register = template.Library()
@register.filter
def duration(value):
""" Returns a duration in hours to a human readable version (minutes, days, ...)
... | from datetime import datetime, timedelta
from django import template
from django.conf import settings
from django.utils.translation import ugettext_lazy as _
register = template.Library()
@register.filter
def duration(value):
""" Returns a duration in hours to a human readable version (minutes, days, ...)
... | Fix pretty duration for null value | Fix pretty duration for null value
| Python | bsd-2-clause | mabhub/Geotrek,mabhub/Geotrek,makinacorpus/Geotrek,makinacorpus/Geotrek,GeotrekCE/Geotrek-admin,Anaethelion/Geotrek,Anaethelion/Geotrek,GeotrekCE/Geotrek-admin,johan--/Geotrek,Anaethelion/Geotrek,mabhub/Geotrek,mabhub/Geotrek,johan--/Geotrek,GeotrekCE/Geotrek-admin,makinacorpus/Geotrek,johan--/Geotrek,makinacorpus/Geot... | from datetime import datetime, timedelta
from django import template
from django.conf import settings
from django.utils.translation import ugettext_lazy as _
register = template.Library()
@register.filter
def duration(value):
""" Returns a duration in hours to a human readable version (minutes, days, ...)
... | from datetime import datetime, timedelta
from django import template
from django.conf import settings
from django.utils.translation import ugettext_lazy as _
register = template.Library()
@register.filter
def duration(value):
""" Returns a duration in hours to a human readable version (minutes, days, ...)
... | <commit_before>from datetime import datetime, timedelta
from django import template
from django.conf import settings
from django.utils.translation import ugettext_lazy as _
register = template.Library()
@register.filter
def duration(value):
""" Returns a duration in hours to a human readable version (minutes, ... | from datetime import datetime, timedelta
from django import template
from django.conf import settings
from django.utils.translation import ugettext_lazy as _
register = template.Library()
@register.filter
def duration(value):
""" Returns a duration in hours to a human readable version (minutes, days, ...)
... | from datetime import datetime, timedelta
from django import template
from django.conf import settings
from django.utils.translation import ugettext_lazy as _
register = template.Library()
@register.filter
def duration(value):
""" Returns a duration in hours to a human readable version (minutes, days, ...)
... | <commit_before>from datetime import datetime, timedelta
from django import template
from django.conf import settings
from django.utils.translation import ugettext_lazy as _
register = template.Library()
@register.filter
def duration(value):
""" Returns a duration in hours to a human readable version (minutes, ... |
d5817c04a57d8c593335450b0613fd683fdf5aec | pycalphad/__init__.py | pycalphad/__init__.py | #first import dill, which populates itself into pickle's dispatch
import dill
import pickle
# save the MethodDescriptorType from dill
MethodDescriptorType = type(type.__dict__['mro'])
if pickle.__dict__.get('_Pickler', None):
MethodDescriptorWrapper = pickle._Pickler.dispatch[MethodDescriptorType]
else:
MethodD... | # This unfortunate monkey patch is necessary to make Py27, Py33 and Py34 work
# Source: http://stackoverflow.com/questions/34124270/pickling-method-descriptor-objects-in-python
# first import dill, which populates itself into pickle's dispatch
import dill
import pickle
# save the MethodDescriptorType from dill
MethodD... | Add source of pickle hack | DOC: Add source of pickle hack
| Python | mit | tkphd/pycalphad,tkphd/pycalphad,tkphd/pycalphad | #first import dill, which populates itself into pickle's dispatch
import dill
import pickle
# save the MethodDescriptorType from dill
MethodDescriptorType = type(type.__dict__['mro'])
if pickle.__dict__.get('_Pickler', None):
MethodDescriptorWrapper = pickle._Pickler.dispatch[MethodDescriptorType]
else:
MethodD... | # This unfortunate monkey patch is necessary to make Py27, Py33 and Py34 work
# Source: http://stackoverflow.com/questions/34124270/pickling-method-descriptor-objects-in-python
# first import dill, which populates itself into pickle's dispatch
import dill
import pickle
# save the MethodDescriptorType from dill
MethodD... | <commit_before>#first import dill, which populates itself into pickle's dispatch
import dill
import pickle
# save the MethodDescriptorType from dill
MethodDescriptorType = type(type.__dict__['mro'])
if pickle.__dict__.get('_Pickler', None):
MethodDescriptorWrapper = pickle._Pickler.dispatch[MethodDescriptorType]
el... | # This unfortunate monkey patch is necessary to make Py27, Py33 and Py34 work
# Source: http://stackoverflow.com/questions/34124270/pickling-method-descriptor-objects-in-python
# first import dill, which populates itself into pickle's dispatch
import dill
import pickle
# save the MethodDescriptorType from dill
MethodD... | #first import dill, which populates itself into pickle's dispatch
import dill
import pickle
# save the MethodDescriptorType from dill
MethodDescriptorType = type(type.__dict__['mro'])
if pickle.__dict__.get('_Pickler', None):
MethodDescriptorWrapper = pickle._Pickler.dispatch[MethodDescriptorType]
else:
MethodD... | <commit_before>#first import dill, which populates itself into pickle's dispatch
import dill
import pickle
# save the MethodDescriptorType from dill
MethodDescriptorType = type(type.__dict__['mro'])
if pickle.__dict__.get('_Pickler', None):
MethodDescriptorWrapper = pickle._Pickler.dispatch[MethodDescriptorType]
el... |
acec33cacd117b437dc417b1934c839ebec5d07a | compute_pi.py | compute_pi.py | """Compute pi."""
from decimal import Decimal, getcontext
import argparse
import itertools
class ComputePi:
"""Compute pi to a specific precision using multiple algorithms."""
@staticmethod
def BBP(precision):
"""Compute pi using the Bailey–Borwein–Plouffe formula."""
getcontext().prec = ... | """Compute pi."""
from decimal import Decimal, getcontext
import argparse
import itertools
class ComputePi:
"""Compute pi to a specific precision using multiple algorithms."""
@staticmethod
def BBP(precision):
"""Compute pi using the Bailey-Borwein-Plouffe formula."""
getcontext().prec = ... | Remove non-ascii-chars in BBP name | Remove non-ascii-chars in BBP name
| Python | mit | jakobkogler/pi_memorize | """Compute pi."""
from decimal import Decimal, getcontext
import argparse
import itertools
class ComputePi:
"""Compute pi to a specific precision using multiple algorithms."""
@staticmethod
def BBP(precision):
"""Compute pi using the Bailey–Borwein–Plouffe formula."""
getcontext().prec = ... | """Compute pi."""
from decimal import Decimal, getcontext
import argparse
import itertools
class ComputePi:
"""Compute pi to a specific precision using multiple algorithms."""
@staticmethod
def BBP(precision):
"""Compute pi using the Bailey-Borwein-Plouffe formula."""
getcontext().prec = ... | <commit_before>"""Compute pi."""
from decimal import Decimal, getcontext
import argparse
import itertools
class ComputePi:
"""Compute pi to a specific precision using multiple algorithms."""
@staticmethod
def BBP(precision):
"""Compute pi using the Bailey–Borwein–Plouffe formula."""
getco... | """Compute pi."""
from decimal import Decimal, getcontext
import argparse
import itertools
class ComputePi:
"""Compute pi to a specific precision using multiple algorithms."""
@staticmethod
def BBP(precision):
"""Compute pi using the Bailey-Borwein-Plouffe formula."""
getcontext().prec = ... | """Compute pi."""
from decimal import Decimal, getcontext
import argparse
import itertools
class ComputePi:
"""Compute pi to a specific precision using multiple algorithms."""
@staticmethod
def BBP(precision):
"""Compute pi using the Bailey–Borwein–Plouffe formula."""
getcontext().prec = ... | <commit_before>"""Compute pi."""
from decimal import Decimal, getcontext
import argparse
import itertools
class ComputePi:
"""Compute pi to a specific precision using multiple algorithms."""
@staticmethod
def BBP(precision):
"""Compute pi using the Bailey–Borwein–Plouffe formula."""
getco... |
27a33628310cbd68632f0e8b514de731a033f8e6 | IPython/utils/tests/test_shimmodule.py | IPython/utils/tests/test_shimmodule.py | import sys
import warnings
from IPython.utils.shimmodule import ShimWarning
def test_shim_warning():
sys.modules.pop('IPython.config', None)
with warnings.catch_warnings(record=True) as w:
warnings.simplefilter("always")
import IPython.config
assert len(w) == 1
assert issubclass(w[-1]... | import pytest
import sys
from IPython.utils.shimmodule import ShimWarning
def test_shim_warning():
sys.modules.pop('IPython.config', None)
with pytest.warns(ShimWarning):
import IPython.config
| Make test_shim_warning not fail on unrelated warnings | Make test_shim_warning not fail on unrelated warnings
| Python | bsd-3-clause | ipython/ipython,ipython/ipython | import sys
import warnings
from IPython.utils.shimmodule import ShimWarning
def test_shim_warning():
sys.modules.pop('IPython.config', None)
with warnings.catch_warnings(record=True) as w:
warnings.simplefilter("always")
import IPython.config
assert len(w) == 1
assert issubclass(w[-1]... | import pytest
import sys
from IPython.utils.shimmodule import ShimWarning
def test_shim_warning():
sys.modules.pop('IPython.config', None)
with pytest.warns(ShimWarning):
import IPython.config
| <commit_before>import sys
import warnings
from IPython.utils.shimmodule import ShimWarning
def test_shim_warning():
sys.modules.pop('IPython.config', None)
with warnings.catch_warnings(record=True) as w:
warnings.simplefilter("always")
import IPython.config
assert len(w) == 1
assert i... | import pytest
import sys
from IPython.utils.shimmodule import ShimWarning
def test_shim_warning():
sys.modules.pop('IPython.config', None)
with pytest.warns(ShimWarning):
import IPython.config
| import sys
import warnings
from IPython.utils.shimmodule import ShimWarning
def test_shim_warning():
sys.modules.pop('IPython.config', None)
with warnings.catch_warnings(record=True) as w:
warnings.simplefilter("always")
import IPython.config
assert len(w) == 1
assert issubclass(w[-1]... | <commit_before>import sys
import warnings
from IPython.utils.shimmodule import ShimWarning
def test_shim_warning():
sys.modules.pop('IPython.config', None)
with warnings.catch_warnings(record=True) as w:
warnings.simplefilter("always")
import IPython.config
assert len(w) == 1
assert i... |
ab1cb4b9a0bae34e0f573602b7d45a4a9e5c79a5 | alexBot/cogs/fun.py | alexBot/cogs/fun.py | import logging
import re
from ..tools import Cog
from ..tools import get_guild_config
log = logging.getLogger(__name__)
ayygen = re.compile('[aA][yY][Yy][yY]*')
class Fun(Cog):
"""contains the on message for ayy"""
async def on_message(self, message):
if self.bot.location == 'laptop' or message.guil... | import logging
import re
from ..tools import Cog
from ..tools import get_guild_config
log = logging.getLogger(__name__)
ayygen = re.compile('[aA][yY][Yy][yY]*')
class Fun(Cog):
@commands.command()
async def cat(self, ctx):
cat = await get_json(self.bot.session, 'http://random.cat/meow')
ret ... | Revert "remove dog and cat commands( see random.cat/help.html for some background on this)" | Revert "remove dog and cat commands( see random.cat/help.html for some background on this)"
This reverts commit 2195ec2a3eea800201dc177fa674b39a440d4ac2.
| Python | mit | mralext20/alex-bot | import logging
import re
from ..tools import Cog
from ..tools import get_guild_config
log = logging.getLogger(__name__)
ayygen = re.compile('[aA][yY][Yy][yY]*')
class Fun(Cog):
"""contains the on message for ayy"""
async def on_message(self, message):
if self.bot.location == 'laptop' or message.guil... | import logging
import re
from ..tools import Cog
from ..tools import get_guild_config
log = logging.getLogger(__name__)
ayygen = re.compile('[aA][yY][Yy][yY]*')
class Fun(Cog):
@commands.command()
async def cat(self, ctx):
cat = await get_json(self.bot.session, 'http://random.cat/meow')
ret ... | <commit_before>import logging
import re
from ..tools import Cog
from ..tools import get_guild_config
log = logging.getLogger(__name__)
ayygen = re.compile('[aA][yY][Yy][yY]*')
class Fun(Cog):
"""contains the on message for ayy"""
async def on_message(self, message):
if self.bot.location == 'laptop' ... | import logging
import re
from ..tools import Cog
from ..tools import get_guild_config
log = logging.getLogger(__name__)
ayygen = re.compile('[aA][yY][Yy][yY]*')
class Fun(Cog):
@commands.command()
async def cat(self, ctx):
cat = await get_json(self.bot.session, 'http://random.cat/meow')
ret ... | import logging
import re
from ..tools import Cog
from ..tools import get_guild_config
log = logging.getLogger(__name__)
ayygen = re.compile('[aA][yY][Yy][yY]*')
class Fun(Cog):
"""contains the on message for ayy"""
async def on_message(self, message):
if self.bot.location == 'laptop' or message.guil... | <commit_before>import logging
import re
from ..tools import Cog
from ..tools import get_guild_config
log = logging.getLogger(__name__)
ayygen = re.compile('[aA][yY][Yy][yY]*')
class Fun(Cog):
"""contains the on message for ayy"""
async def on_message(self, message):
if self.bot.location == 'laptop' ... |
8c01b3536026d56abb42daaf9d300e53e7c6dc18 | detox/main.py | detox/main.py | import sys
import py
import detox
from detox.proc import Detox
def parse(args):
from tox.session import prepare
return prepare(args)
def main(args=None):
if args is None:
args = sys.argv[1:]
config = parse(args)
#now = py.std.time.time()
detox = Detox(config)
detox.startloopreport(... | import sys
import py
import detox
from detox.proc import Detox
def parse(args):
from tox.session import prepare
return prepare(args)
def main(args=None):
if args is None:
args = sys.argv[1:]
config = parse(args)
#now = py.std.time.time()
detox = Detox(config)
detox.startloopreport(... | Raise system code on exit from `python -m detox` | Raise system code on exit from `python -m detox` | Python | mit | tox-dev/detox | import sys
import py
import detox
from detox.proc import Detox
def parse(args):
from tox.session import prepare
return prepare(args)
def main(args=None):
if args is None:
args = sys.argv[1:]
config = parse(args)
#now = py.std.time.time()
detox = Detox(config)
detox.startloopreport(... | import sys
import py
import detox
from detox.proc import Detox
def parse(args):
from tox.session import prepare
return prepare(args)
def main(args=None):
if args is None:
args = sys.argv[1:]
config = parse(args)
#now = py.std.time.time()
detox = Detox(config)
detox.startloopreport(... | <commit_before>import sys
import py
import detox
from detox.proc import Detox
def parse(args):
from tox.session import prepare
return prepare(args)
def main(args=None):
if args is None:
args = sys.argv[1:]
config = parse(args)
#now = py.std.time.time()
detox = Detox(config)
detox.s... | import sys
import py
import detox
from detox.proc import Detox
def parse(args):
from tox.session import prepare
return prepare(args)
def main(args=None):
if args is None:
args = sys.argv[1:]
config = parse(args)
#now = py.std.time.time()
detox = Detox(config)
detox.startloopreport(... | import sys
import py
import detox
from detox.proc import Detox
def parse(args):
from tox.session import prepare
return prepare(args)
def main(args=None):
if args is None:
args = sys.argv[1:]
config = parse(args)
#now = py.std.time.time()
detox = Detox(config)
detox.startloopreport(... | <commit_before>import sys
import py
import detox
from detox.proc import Detox
def parse(args):
from tox.session import prepare
return prepare(args)
def main(args=None):
if args is None:
args = sys.argv[1:]
config = parse(args)
#now = py.std.time.time()
detox = Detox(config)
detox.s... |
97b7ba9d4d6bf948435ce58dd21b60d78d75fd29 | lib-dynload/lzo/__init__.py | lib-dynload/lzo/__init__.py | import sys
import os
p1, p2 = sys.version_info[:2]
curpath = os.path.abspath( sys.argv[0] )
if os.path.islink(curpath):
curpath = os.readlink(curpath)
currentdir = os.path.dirname( curpath )
build_dir = os.path.abspath( os.path.join(currentdir, "lib-dynload", "lzo", "build") )
if not os.path.isdir(build_dir):
... | import sys
import os
p1, p2 = sys.version_info[:2]
curpath = os.path.abspath( sys.argv[0] )
if os.path.islink(curpath):
curpath = os.readlink(curpath)
currentdir = os.path.dirname( curpath )
build_dir = os.path.abspath( os.path.join(currentdir, "lib-dynload", "lzo", "build") )
if not os.path.isdir(build_dir):
... | Adjust maximum block size for lzo | Adjust maximum block size for lzo
| Python | mit | sergey-dryabzhinsky/dedupsqlfs,sergey-dryabzhinsky/dedupsqlfs,sergey-dryabzhinsky/dedupsqlfs,sergey-dryabzhinsky/dedupsqlfs | import sys
import os
p1, p2 = sys.version_info[:2]
curpath = os.path.abspath( sys.argv[0] )
if os.path.islink(curpath):
curpath = os.readlink(curpath)
currentdir = os.path.dirname( curpath )
build_dir = os.path.abspath( os.path.join(currentdir, "lib-dynload", "lzo", "build") )
if not os.path.isdir(build_dir):
... | import sys
import os
p1, p2 = sys.version_info[:2]
curpath = os.path.abspath( sys.argv[0] )
if os.path.islink(curpath):
curpath = os.readlink(curpath)
currentdir = os.path.dirname( curpath )
build_dir = os.path.abspath( os.path.join(currentdir, "lib-dynload", "lzo", "build") )
if not os.path.isdir(build_dir):
... | <commit_before>import sys
import os
p1, p2 = sys.version_info[:2]
curpath = os.path.abspath( sys.argv[0] )
if os.path.islink(curpath):
curpath = os.readlink(curpath)
currentdir = os.path.dirname( curpath )
build_dir = os.path.abspath( os.path.join(currentdir, "lib-dynload", "lzo", "build") )
if not os.path.isdir... | import sys
import os
p1, p2 = sys.version_info[:2]
curpath = os.path.abspath( sys.argv[0] )
if os.path.islink(curpath):
curpath = os.readlink(curpath)
currentdir = os.path.dirname( curpath )
build_dir = os.path.abspath( os.path.join(currentdir, "lib-dynload", "lzo", "build") )
if not os.path.isdir(build_dir):
... | import sys
import os
p1, p2 = sys.version_info[:2]
curpath = os.path.abspath( sys.argv[0] )
if os.path.islink(curpath):
curpath = os.readlink(curpath)
currentdir = os.path.dirname( curpath )
build_dir = os.path.abspath( os.path.join(currentdir, "lib-dynload", "lzo", "build") )
if not os.path.isdir(build_dir):
... | <commit_before>import sys
import os
p1, p2 = sys.version_info[:2]
curpath = os.path.abspath( sys.argv[0] )
if os.path.islink(curpath):
curpath = os.readlink(curpath)
currentdir = os.path.dirname( curpath )
build_dir = os.path.abspath( os.path.join(currentdir, "lib-dynload", "lzo", "build") )
if not os.path.isdir... |
6a8f5bcc6dd42e125f7219d7d692c3af610c38c3 | masters/master.client.polymer/polymer_repos.py | masters/master.client.polymer/polymer_repos.py | # Copyright (c) 2013 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.
REPOS = (
'polymer',
'platform',
'CustomElements',
'mdv',
'PointerGestures',
'ShadowDOM',
'HTMLImports',
)
| # Copyright (c) 2013 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.
REPOS = (
'polymer',
'platform',
'CustomElements',
'mdv',
'PointerGestures',
'PointerEvents',
'ShadowDOM',
'HTMLImports',
)
| Add PointerEvents repo to master.client.polymer. | Add PointerEvents repo to master.client.polymer.
[email protected]
BUG=chromium:237914
Review URL: https://codereview.chromium.org/15783003
git-svn-id: 239fca9b83025a0b6f823aeeca02ba5be3d9fd76@201643 0039d316-1c4b-4281-b951-d872f2087c98
| Python | bsd-3-clause | eunchong/build,eunchong/build,eunchong/build,eunchong/build | # Copyright (c) 2013 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.
REPOS = (
'polymer',
'platform',
'CustomElements',
'mdv',
'PointerGestures',
'ShadowDOM',
'HTMLImports',
)
Add PointerEvents repo to maste... | # Copyright (c) 2013 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.
REPOS = (
'polymer',
'platform',
'CustomElements',
'mdv',
'PointerGestures',
'PointerEvents',
'ShadowDOM',
'HTMLImports',
)
| <commit_before># Copyright (c) 2013 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.
REPOS = (
'polymer',
'platform',
'CustomElements',
'mdv',
'PointerGestures',
'ShadowDOM',
'HTMLImports',
)
<commit_msg>Add ... | # Copyright (c) 2013 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.
REPOS = (
'polymer',
'platform',
'CustomElements',
'mdv',
'PointerGestures',
'PointerEvents',
'ShadowDOM',
'HTMLImports',
)
| # Copyright (c) 2013 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.
REPOS = (
'polymer',
'platform',
'CustomElements',
'mdv',
'PointerGestures',
'ShadowDOM',
'HTMLImports',
)
Add PointerEvents repo to maste... | <commit_before># Copyright (c) 2013 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.
REPOS = (
'polymer',
'platform',
'CustomElements',
'mdv',
'PointerGestures',
'ShadowDOM',
'HTMLImports',
)
<commit_msg>Add ... |
99b0cc6ec783076b7d7db3bb15d6268c2781a234 | ircstat/ircstat.py | ircstat/ircstat.py | # Copyright 2013 John Reese
# Licensed under the MIT license
VERSION = '0.1.0'
from collections import Counter, OrderedDict
from .ent import Message
from .log import logger
from .parser import LogParser
from .plugins import load_plugins
log = logger(__name__)
def do_everything(input_paths, output_path, config):
... | # Copyright 2013 John Reese
# Licensed under the MIT license
VERSION = '0.1.0'
from collections import Counter, OrderedDict
from .ent import Message
from .log import logger
from .parser import LogParser
from .plugins import load_plugins
log = logger(__name__)
def do_everything(input_paths, output_path, config):
... | Call into plugins from do_everything() | Call into plugins from do_everything()
| Python | mit | jreese/ircstat,jreese/ircstat | # Copyright 2013 John Reese
# Licensed under the MIT license
VERSION = '0.1.0'
from collections import Counter, OrderedDict
from .ent import Message
from .log import logger
from .parser import LogParser
from .plugins import load_plugins
log = logger(__name__)
def do_everything(input_paths, output_path, config):
... | # Copyright 2013 John Reese
# Licensed under the MIT license
VERSION = '0.1.0'
from collections import Counter, OrderedDict
from .ent import Message
from .log import logger
from .parser import LogParser
from .plugins import load_plugins
log = logger(__name__)
def do_everything(input_paths, output_path, config):
... | <commit_before># Copyright 2013 John Reese
# Licensed under the MIT license
VERSION = '0.1.0'
from collections import Counter, OrderedDict
from .ent import Message
from .log import logger
from .parser import LogParser
from .plugins import load_plugins
log = logger(__name__)
def do_everything(input_paths, output_pa... | # Copyright 2013 John Reese
# Licensed under the MIT license
VERSION = '0.1.0'
from collections import Counter, OrderedDict
from .ent import Message
from .log import logger
from .parser import LogParser
from .plugins import load_plugins
log = logger(__name__)
def do_everything(input_paths, output_path, config):
... | # Copyright 2013 John Reese
# Licensed under the MIT license
VERSION = '0.1.0'
from collections import Counter, OrderedDict
from .ent import Message
from .log import logger
from .parser import LogParser
from .plugins import load_plugins
log = logger(__name__)
def do_everything(input_paths, output_path, config):
... | <commit_before># Copyright 2013 John Reese
# Licensed under the MIT license
VERSION = '0.1.0'
from collections import Counter, OrderedDict
from .ent import Message
from .log import logger
from .parser import LogParser
from .plugins import load_plugins
log = logger(__name__)
def do_everything(input_paths, output_pa... |
f0a309b01f5c655774bd8da91090a11d7cf83095 | handover_api/urls.py | handover_api/urls.py | from django.conf.urls import url, include
from rest_framework import routers
from handover_api import views
router = routers.DefaultRouter()
router.register(r'handovers', views.HandoverViewSet, 'handover')
router.register(r'drafts', views.DraftViewSet, 'draft')
router.register(r'users', views.UserViewSet, 'user')
url... | from django.conf.urls import url, include
from rest_framework import routers
from handover_api import views
router = routers.DefaultRouter()
router.register(r'handovers', views.HandoverViewSet, 'handover')
router.register(r'drafts', views.DraftViewSet, 'draft')
router.register(r'users', views.UserViewSet, 'dukedsuser'... | Change users route name to dukedsuser | Change users route name to dukedsuser
| Python | mit | Duke-GCB/DukeDSHandoverService,Duke-GCB/DukeDSHandoverService,Duke-GCB/DukeDSHandoverService | from django.conf.urls import url, include
from rest_framework import routers
from handover_api import views
router = routers.DefaultRouter()
router.register(r'handovers', views.HandoverViewSet, 'handover')
router.register(r'drafts', views.DraftViewSet, 'draft')
router.register(r'users', views.UserViewSet, 'user')
url... | from django.conf.urls import url, include
from rest_framework import routers
from handover_api import views
router = routers.DefaultRouter()
router.register(r'handovers', views.HandoverViewSet, 'handover')
router.register(r'drafts', views.DraftViewSet, 'draft')
router.register(r'users', views.UserViewSet, 'dukedsuser'... | <commit_before>from django.conf.urls import url, include
from rest_framework import routers
from handover_api import views
router = routers.DefaultRouter()
router.register(r'handovers', views.HandoverViewSet, 'handover')
router.register(r'drafts', views.DraftViewSet, 'draft')
router.register(r'users', views.UserViewSe... | from django.conf.urls import url, include
from rest_framework import routers
from handover_api import views
router = routers.DefaultRouter()
router.register(r'handovers', views.HandoverViewSet, 'handover')
router.register(r'drafts', views.DraftViewSet, 'draft')
router.register(r'users', views.UserViewSet, 'dukedsuser'... | from django.conf.urls import url, include
from rest_framework import routers
from handover_api import views
router = routers.DefaultRouter()
router.register(r'handovers', views.HandoverViewSet, 'handover')
router.register(r'drafts', views.DraftViewSet, 'draft')
router.register(r'users', views.UserViewSet, 'user')
url... | <commit_before>from django.conf.urls import url, include
from rest_framework import routers
from handover_api import views
router = routers.DefaultRouter()
router.register(r'handovers', views.HandoverViewSet, 'handover')
router.register(r'drafts', views.DraftViewSet, 'draft')
router.register(r'users', views.UserViewSe... |
a47f8ce5166b6b95b55136c2fd104e5c7b5dbf7a | swaggery/keywords.py | swaggery/keywords.py | '''A utility module to import all boilerplate Swaggery keywords into a module.
Usage:
from swaggery.keywords import *
'''
from .api import Api, Resource, operations
from .utils import Ptypes
from .logger import log
from .flowcontrol import Respond
from .models import (
Model,
Void,
Integer,
Float,... | '''A utility module to import all boilerplate Swaggery keywords into a module.
Usage:
from swaggery.keywords import *
'''
from .api import Api, Resource, operations
from .utils import Ptypes
from .logger import log
from .flowcontrol import Respond
from .models import (
Model,
Void,
Integer,
Float,... | Add newline to end of file | Add newline to end of file
| Python | agpl-3.0 | quasipedia/swaggery,quasipedia/swaggery | '''A utility module to import all boilerplate Swaggery keywords into a module.
Usage:
from swaggery.keywords import *
'''
from .api import Api, Resource, operations
from .utils import Ptypes
from .logger import log
from .flowcontrol import Respond
from .models import (
Model,
Void,
Integer,
Float,... | '''A utility module to import all boilerplate Swaggery keywords into a module.
Usage:
from swaggery.keywords import *
'''
from .api import Api, Resource, operations
from .utils import Ptypes
from .logger import log
from .flowcontrol import Respond
from .models import (
Model,
Void,
Integer,
Float,... | <commit_before>'''A utility module to import all boilerplate Swaggery keywords into a module.
Usage:
from swaggery.keywords import *
'''
from .api import Api, Resource, operations
from .utils import Ptypes
from .logger import log
from .flowcontrol import Respond
from .models import (
Model,
Void,
Inte... | '''A utility module to import all boilerplate Swaggery keywords into a module.
Usage:
from swaggery.keywords import *
'''
from .api import Api, Resource, operations
from .utils import Ptypes
from .logger import log
from .flowcontrol import Respond
from .models import (
Model,
Void,
Integer,
Float,... | '''A utility module to import all boilerplate Swaggery keywords into a module.
Usage:
from swaggery.keywords import *
'''
from .api import Api, Resource, operations
from .utils import Ptypes
from .logger import log
from .flowcontrol import Respond
from .models import (
Model,
Void,
Integer,
Float,... | <commit_before>'''A utility module to import all boilerplate Swaggery keywords into a module.
Usage:
from swaggery.keywords import *
'''
from .api import Api, Resource, operations
from .utils import Ptypes
from .logger import log
from .flowcontrol import Respond
from .models import (
Model,
Void,
Inte... |
a86565e6bf841c376191e8936883455267cf85b9 | groundstation/transfer/request_handlers/listallchannels.py | groundstation/transfer/request_handlers/listallchannels.py | import groundstation.proto.channel_list_pb2
from groundstation import logger
log = logger.getLogger(__name__)
def handle_listallchannels(self):
log.info("Handling LISTALLCHANNELS")
payload = self.station.channels()
log.info("Sending %i object descriptions" % (len(payload)))
chunk = groundstation.prot... | import groundstation.proto.channel_list_pb2
from groundstation import logger
log = logger.getLogger(__name__)
def handle_listallchannels(self):
log.info("Handling LISTALLCHANNELS")
payload = self.station.channels()
log.info("Sending %i channel descriptions" % (len(payload)))
chunk = groundstation.pro... | Fix another misleading log message | Fix another misleading log message
| Python | mit | richo/groundstation,richo/groundstation,richo/groundstation,richo/groundstation,richo/groundstation | import groundstation.proto.channel_list_pb2
from groundstation import logger
log = logger.getLogger(__name__)
def handle_listallchannels(self):
log.info("Handling LISTALLCHANNELS")
payload = self.station.channels()
log.info("Sending %i object descriptions" % (len(payload)))
chunk = groundstation.prot... | import groundstation.proto.channel_list_pb2
from groundstation import logger
log = logger.getLogger(__name__)
def handle_listallchannels(self):
log.info("Handling LISTALLCHANNELS")
payload = self.station.channels()
log.info("Sending %i channel descriptions" % (len(payload)))
chunk = groundstation.pro... | <commit_before>import groundstation.proto.channel_list_pb2
from groundstation import logger
log = logger.getLogger(__name__)
def handle_listallchannels(self):
log.info("Handling LISTALLCHANNELS")
payload = self.station.channels()
log.info("Sending %i object descriptions" % (len(payload)))
chunk = gro... | import groundstation.proto.channel_list_pb2
from groundstation import logger
log = logger.getLogger(__name__)
def handle_listallchannels(self):
log.info("Handling LISTALLCHANNELS")
payload = self.station.channels()
log.info("Sending %i channel descriptions" % (len(payload)))
chunk = groundstation.pro... | import groundstation.proto.channel_list_pb2
from groundstation import logger
log = logger.getLogger(__name__)
def handle_listallchannels(self):
log.info("Handling LISTALLCHANNELS")
payload = self.station.channels()
log.info("Sending %i object descriptions" % (len(payload)))
chunk = groundstation.prot... | <commit_before>import groundstation.proto.channel_list_pb2
from groundstation import logger
log = logger.getLogger(__name__)
def handle_listallchannels(self):
log.info("Handling LISTALLCHANNELS")
payload = self.station.channels()
log.info("Sending %i object descriptions" % (len(payload)))
chunk = gro... |
d74ded300b9f40ecca883b4940eb67ed9cb04b18 | Rasp/weight_sensor/weight_sensor.py | Rasp/weight_sensor/weight_sensor.py | import RPi.GPIO as GPIO
import time
class WeightSensor:
""" Class that get the weight from a HX711
this module is based on the HX711 datasheet
Not test yet
"""
def __init__(self, SCK, DT):
self.SCK = SCK
self.DT = DT
GPIO.setmode(GPIO.BCM)
GPIO.setup(self.SCK, GPI... | import RPi.GPIO as GPIO
import time
class WeightSensor:
""" Class that get the weight from a HX711
this module is based on the HX711 datasheet
"""
def __init__(self, SCK, DT):
self.SCK = SCK
self.DT = DT
GPIO.setmode(GPIO.BCM)
GPIO.setup(self.SCK, GPIO.OUT) # SCK comm... | Change the DT call, now the coding is working | Change the DT call, now the coding is working
| Python | mit | CarlosPena00/Mobbi,CarlosPena00/Mobbi | import RPi.GPIO as GPIO
import time
class WeightSensor:
""" Class that get the weight from a HX711
this module is based on the HX711 datasheet
Not test yet
"""
def __init__(self, SCK, DT):
self.SCK = SCK
self.DT = DT
GPIO.setmode(GPIO.BCM)
GPIO.setup(self.SCK, GPI... | import RPi.GPIO as GPIO
import time
class WeightSensor:
""" Class that get the weight from a HX711
this module is based on the HX711 datasheet
"""
def __init__(self, SCK, DT):
self.SCK = SCK
self.DT = DT
GPIO.setmode(GPIO.BCM)
GPIO.setup(self.SCK, GPIO.OUT) # SCK comm... | <commit_before>import RPi.GPIO as GPIO
import time
class WeightSensor:
""" Class that get the weight from a HX711
this module is based on the HX711 datasheet
Not test yet
"""
def __init__(self, SCK, DT):
self.SCK = SCK
self.DT = DT
GPIO.setmode(GPIO.BCM)
GPIO.setu... | import RPi.GPIO as GPIO
import time
class WeightSensor:
""" Class that get the weight from a HX711
this module is based on the HX711 datasheet
"""
def __init__(self, SCK, DT):
self.SCK = SCK
self.DT = DT
GPIO.setmode(GPIO.BCM)
GPIO.setup(self.SCK, GPIO.OUT) # SCK comm... | import RPi.GPIO as GPIO
import time
class WeightSensor:
""" Class that get the weight from a HX711
this module is based on the HX711 datasheet
Not test yet
"""
def __init__(self, SCK, DT):
self.SCK = SCK
self.DT = DT
GPIO.setmode(GPIO.BCM)
GPIO.setup(self.SCK, GPI... | <commit_before>import RPi.GPIO as GPIO
import time
class WeightSensor:
""" Class that get the weight from a HX711
this module is based on the HX711 datasheet
Not test yet
"""
def __init__(self, SCK, DT):
self.SCK = SCK
self.DT = DT
GPIO.setmode(GPIO.BCM)
GPIO.setu... |
327413aa982dec1c56691ea0017298a2ae7af2c1 | integration_tests/hello_world/__init__.py | integration_tests/hello_world/__init__.py | integration_test = True
name = 'HelloWorldTest'
package = 'helloworld'
can_crash = True
can_shutdown = True
| integration_test = True
name = 'HelloWorldTest'
package = 'helloworld'
can_crash = True
can_shutdown = True
def check_state(state):
assert('Hello World!' in state.console)
assert('not in console' in state.console)
| Add an integration test that deliberately fails | Add an integration test that deliberately fails
| Python | bsd-2-clause | unigornel/unigornel,unigornel/unigornel | integration_test = True
name = 'HelloWorldTest'
package = 'helloworld'
can_crash = True
can_shutdown = True
Add an integration test that deliberately fails | integration_test = True
name = 'HelloWorldTest'
package = 'helloworld'
can_crash = True
can_shutdown = True
def check_state(state):
assert('Hello World!' in state.console)
assert('not in console' in state.console)
| <commit_before>integration_test = True
name = 'HelloWorldTest'
package = 'helloworld'
can_crash = True
can_shutdown = True
<commit_msg>Add an integration test that deliberately fails<commit_after> | integration_test = True
name = 'HelloWorldTest'
package = 'helloworld'
can_crash = True
can_shutdown = True
def check_state(state):
assert('Hello World!' in state.console)
assert('not in console' in state.console)
| integration_test = True
name = 'HelloWorldTest'
package = 'helloworld'
can_crash = True
can_shutdown = True
Add an integration test that deliberately failsintegration_test = True
name = 'HelloWorldTest'
package = 'helloworld'
can_crash = True
can_shutdown = True
def check_state(state):
assert('Hello World!' in s... | <commit_before>integration_test = True
name = 'HelloWorldTest'
package = 'helloworld'
can_crash = True
can_shutdown = True
<commit_msg>Add an integration test that deliberately fails<commit_after>integration_test = True
name = 'HelloWorldTest'
package = 'helloworld'
can_crash = True
can_shutdown = True
def check_sta... |
096f9e86755a6967d732986c51ae00855551cf4d | project_name/urls.py | project_name/urls.py | from django.conf import settings
from django.conf.urls import include, url # noqa
from django.contrib import admin
from django.views.generic import TemplateView
import django_js_reverse.views
urlpatterns = [
url(r'^admin/', admin.site.urls),
url(r'^jsreverse/$', django_js_reverse.views.urls_js, name='js_rev... | from django.conf.urls import include, url # noqa
from django.contrib import admin
from django.views.generic import TemplateView
import django_js_reverse.views
urlpatterns = [
url(r'^admin/', admin.site.urls),
url(r'^jsreverse/$', django_js_reverse.views.urls_js, name='js_reverse'),
url(r'^$', TemplateV... | Remove usage from debug toolbar | Remove usage from debug toolbar
| Python | mit | vintasoftware/django-react-boilerplate,vintasoftware/django-react-boilerplate,vintasoftware/django-react-boilerplate,vintasoftware/django-react-boilerplate | from django.conf import settings
from django.conf.urls import include, url # noqa
from django.contrib import admin
from django.views.generic import TemplateView
import django_js_reverse.views
urlpatterns = [
url(r'^admin/', admin.site.urls),
url(r'^jsreverse/$', django_js_reverse.views.urls_js, name='js_rev... | from django.conf.urls import include, url # noqa
from django.contrib import admin
from django.views.generic import TemplateView
import django_js_reverse.views
urlpatterns = [
url(r'^admin/', admin.site.urls),
url(r'^jsreverse/$', django_js_reverse.views.urls_js, name='js_reverse'),
url(r'^$', TemplateV... | <commit_before>from django.conf import settings
from django.conf.urls import include, url # noqa
from django.contrib import admin
from django.views.generic import TemplateView
import django_js_reverse.views
urlpatterns = [
url(r'^admin/', admin.site.urls),
url(r'^jsreverse/$', django_js_reverse.views.urls_j... | from django.conf.urls import include, url # noqa
from django.contrib import admin
from django.views.generic import TemplateView
import django_js_reverse.views
urlpatterns = [
url(r'^admin/', admin.site.urls),
url(r'^jsreverse/$', django_js_reverse.views.urls_js, name='js_reverse'),
url(r'^$', TemplateV... | from django.conf import settings
from django.conf.urls import include, url # noqa
from django.contrib import admin
from django.views.generic import TemplateView
import django_js_reverse.views
urlpatterns = [
url(r'^admin/', admin.site.urls),
url(r'^jsreverse/$', django_js_reverse.views.urls_js, name='js_rev... | <commit_before>from django.conf import settings
from django.conf.urls import include, url # noqa
from django.contrib import admin
from django.views.generic import TemplateView
import django_js_reverse.views
urlpatterns = [
url(r'^admin/', admin.site.urls),
url(r'^jsreverse/$', django_js_reverse.views.urls_j... |
728e235ace11f5d1dd798e438ea65bde8a41bd6e | yacs/settings/development.py | yacs/settings/development.py | from yacs.settings.base import settings
__all__ = ['settings']
with settings as s:
s.DEBUG = True
s.MIDDLEWARE_CLASSES += (
'devserver.middleware.DevServerMiddleware',
)
@s.lazy_eval
def debug_install_apps(s):
if s.DEBUG:
s.INSTALLED_APPS += (
'django_... | from yacs.settings.base import settings
__all__ = ['settings']
with settings as s:
s.DEBUG = True
s.MIDDLEWARE_CLASSES += (
'devserver.middleware.DevServerMiddleware',
)
@s.lazy_eval
def debug_install_apps(s):
if s.DEBUG:
s.INSTALLED_APPS += (
'django_... | Revert "Revert "corrected database settings merge again"" | Revert "Revert "corrected database settings merge again""
This reverts commit e7766ce068eabea30c81ba699c77ed2fe488d69d.
| Python | mit | jeffh/YACS,jeffh/YACS,JGrippo/YACS,jeffh/YACS,jeffh/YACS,JGrippo/YACS,JGrippo/YACS,JGrippo/YACS | from yacs.settings.base import settings
__all__ = ['settings']
with settings as s:
s.DEBUG = True
s.MIDDLEWARE_CLASSES += (
'devserver.middleware.DevServerMiddleware',
)
@s.lazy_eval
def debug_install_apps(s):
if s.DEBUG:
s.INSTALLED_APPS += (
'django_... | from yacs.settings.base import settings
__all__ = ['settings']
with settings as s:
s.DEBUG = True
s.MIDDLEWARE_CLASSES += (
'devserver.middleware.DevServerMiddleware',
)
@s.lazy_eval
def debug_install_apps(s):
if s.DEBUG:
s.INSTALLED_APPS += (
'django_... | <commit_before>from yacs.settings.base import settings
__all__ = ['settings']
with settings as s:
s.DEBUG = True
s.MIDDLEWARE_CLASSES += (
'devserver.middleware.DevServerMiddleware',
)
@s.lazy_eval
def debug_install_apps(s):
if s.DEBUG:
s.INSTALLED_APPS += (
... | from yacs.settings.base import settings
__all__ = ['settings']
with settings as s:
s.DEBUG = True
s.MIDDLEWARE_CLASSES += (
'devserver.middleware.DevServerMiddleware',
)
@s.lazy_eval
def debug_install_apps(s):
if s.DEBUG:
s.INSTALLED_APPS += (
'django_... | from yacs.settings.base import settings
__all__ = ['settings']
with settings as s:
s.DEBUG = True
s.MIDDLEWARE_CLASSES += (
'devserver.middleware.DevServerMiddleware',
)
@s.lazy_eval
def debug_install_apps(s):
if s.DEBUG:
s.INSTALLED_APPS += (
'django_... | <commit_before>from yacs.settings.base import settings
__all__ = ['settings']
with settings as s:
s.DEBUG = True
s.MIDDLEWARE_CLASSES += (
'devserver.middleware.DevServerMiddleware',
)
@s.lazy_eval
def debug_install_apps(s):
if s.DEBUG:
s.INSTALLED_APPS += (
... |
a2e64a15a1f792308764507d8068f4e109837405 | feature_extraction/util/cleanup.py | feature_extraction/util/cleanup.py | import numpy as np
import scipy as sp
def cell_boundary_mask(image):
"""
Identifies the clipping boundary of a cell image.
Returns this as a mask, where True corresponds to "inside the cell".
This is done by finding a mask that is True where image != 0
(as the clipped area will be perfectly zero).
Imperfections... | Add a function to identify the boundary of a preclipped cell | Add a function to identify the boundary of a preclipped cell
| Python | apache-2.0 | widoptimization-willett/feature-extraction | Add a function to identify the boundary of a preclipped cell | import numpy as np
import scipy as sp
def cell_boundary_mask(image):
"""
Identifies the clipping boundary of a cell image.
Returns this as a mask, where True corresponds to "inside the cell".
This is done by finding a mask that is True where image != 0
(as the clipped area will be perfectly zero).
Imperfections... | <commit_before><commit_msg>Add a function to identify the boundary of a preclipped cell<commit_after> | import numpy as np
import scipy as sp
def cell_boundary_mask(image):
"""
Identifies the clipping boundary of a cell image.
Returns this as a mask, where True corresponds to "inside the cell".
This is done by finding a mask that is True where image != 0
(as the clipped area will be perfectly zero).
Imperfections... | Add a function to identify the boundary of a preclipped cellimport numpy as np
import scipy as sp
def cell_boundary_mask(image):
"""
Identifies the clipping boundary of a cell image.
Returns this as a mask, where True corresponds to "inside the cell".
This is done by finding a mask that is True where image != 0
... | <commit_before><commit_msg>Add a function to identify the boundary of a preclipped cell<commit_after>import numpy as np
import scipy as sp
def cell_boundary_mask(image):
"""
Identifies the clipping boundary of a cell image.
Returns this as a mask, where True corresponds to "inside the cell".
This is done by findi... | |
74d7c55ab6584daef444923c888e6905d8c9ccf1 | expense/admin.py | expense/admin.py | from django.contrib import admin
from expense.models import ExpenseNote
class ExpenseNoteAdmin(admin.ModelAdmin):
list_display = ['date', 'save_in_ledger', 'details', 'contact', 'credit_account', 'debit_account', 'amount']
list_filter = ['date', 'save_in_ledger']
readonly_fields = ['amount']
fields =... | from django.contrib import admin
from expense.models import ExpenseNote
class ExpenseNoteAdmin(admin.ModelAdmin):
list_display = ['date', 'save_in_ledger', 'details', 'contact', 'credit_account', 'debit_account', 'amount']
list_filter = ['date', 'save_in_ledger']
fields = ('date', 'contact', 'number', 'd... | Allow editing amount field in expensenote | Allow editing amount field in expensenote
| Python | mpl-2.0 | jackbravo/condorest-django,jackbravo/condorest-django,jackbravo/condorest-django | from django.contrib import admin
from expense.models import ExpenseNote
class ExpenseNoteAdmin(admin.ModelAdmin):
list_display = ['date', 'save_in_ledger', 'details', 'contact', 'credit_account', 'debit_account', 'amount']
list_filter = ['date', 'save_in_ledger']
readonly_fields = ['amount']
fields =... | from django.contrib import admin
from expense.models import ExpenseNote
class ExpenseNoteAdmin(admin.ModelAdmin):
list_display = ['date', 'save_in_ledger', 'details', 'contact', 'credit_account', 'debit_account', 'amount']
list_filter = ['date', 'save_in_ledger']
fields = ('date', 'contact', 'number', 'd... | <commit_before>from django.contrib import admin
from expense.models import ExpenseNote
class ExpenseNoteAdmin(admin.ModelAdmin):
list_display = ['date', 'save_in_ledger', 'details', 'contact', 'credit_account', 'debit_account', 'amount']
list_filter = ['date', 'save_in_ledger']
readonly_fields = ['amount... | from django.contrib import admin
from expense.models import ExpenseNote
class ExpenseNoteAdmin(admin.ModelAdmin):
list_display = ['date', 'save_in_ledger', 'details', 'contact', 'credit_account', 'debit_account', 'amount']
list_filter = ['date', 'save_in_ledger']
fields = ('date', 'contact', 'number', 'd... | from django.contrib import admin
from expense.models import ExpenseNote
class ExpenseNoteAdmin(admin.ModelAdmin):
list_display = ['date', 'save_in_ledger', 'details', 'contact', 'credit_account', 'debit_account', 'amount']
list_filter = ['date', 'save_in_ledger']
readonly_fields = ['amount']
fields =... | <commit_before>from django.contrib import admin
from expense.models import ExpenseNote
class ExpenseNoteAdmin(admin.ModelAdmin):
list_display = ['date', 'save_in_ledger', 'details', 'contact', 'credit_account', 'debit_account', 'amount']
list_filter = ['date', 'save_in_ledger']
readonly_fields = ['amount... |
b2cb55a58f744bed6b860568d4af1782846b178f | tests/examples/data_solutions/dp-foundation/test_plan.py | tests/examples/data_solutions/dp-foundation/test_plan.py | # Copyright 2022 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, ... | # Copyright 2022 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, ... | Fix test, for real? :-) | Fix test, for real? :-)
| Python | apache-2.0 | GoogleCloudPlatform/cloud-foundation-fabric,GoogleCloudPlatform/cloud-foundation-fabric,GoogleCloudPlatform/cloud-foundation-fabric,GoogleCloudPlatform/cloud-foundation-fabric | # Copyright 2022 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, ... | # Copyright 2022 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, ... | <commit_before># Copyright 2022 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed ... | # Copyright 2022 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, ... | # Copyright 2022 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, ... | <commit_before># Copyright 2022 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed ... |
3ef77edcbf4b3268399f439b89f15ef087bd06bb | chamber/utils/logging.py | chamber/utils/logging.py | import json
import logging
import platform
from django.core.serializers.json import DjangoJSONEncoder
from django.http import UnreadablePostError
def skip_unreadable_post(record):
if record.exc_info:
exc_type, exc_value = record.exc_info[:2]
if isinstance(exc_value, UnreadablePostError):
... | import json
import logging
import platform
from django.core.serializers.json import DjangoJSONEncoder
from django.http import UnreadablePostError
def skip_unreadable_post(record):
if record.exc_info:
exc_type, exc_value = record.exc_info[:2]
if isinstance(exc_value, UnreadablePostError):
... | Set default value for json.dumps | Set default value for json.dumps
Use default value when type cannot be serialized.
| Python | bsd-3-clause | druids/django-chamber | import json
import logging
import platform
from django.core.serializers.json import DjangoJSONEncoder
from django.http import UnreadablePostError
def skip_unreadable_post(record):
if record.exc_info:
exc_type, exc_value = record.exc_info[:2]
if isinstance(exc_value, UnreadablePostError):
... | import json
import logging
import platform
from django.core.serializers.json import DjangoJSONEncoder
from django.http import UnreadablePostError
def skip_unreadable_post(record):
if record.exc_info:
exc_type, exc_value = record.exc_info[:2]
if isinstance(exc_value, UnreadablePostError):
... | <commit_before>import json
import logging
import platform
from django.core.serializers.json import DjangoJSONEncoder
from django.http import UnreadablePostError
def skip_unreadable_post(record):
if record.exc_info:
exc_type, exc_value = record.exc_info[:2]
if isinstance(exc_value, UnreadablePostE... | import json
import logging
import platform
from django.core.serializers.json import DjangoJSONEncoder
from django.http import UnreadablePostError
def skip_unreadable_post(record):
if record.exc_info:
exc_type, exc_value = record.exc_info[:2]
if isinstance(exc_value, UnreadablePostError):
... | import json
import logging
import platform
from django.core.serializers.json import DjangoJSONEncoder
from django.http import UnreadablePostError
def skip_unreadable_post(record):
if record.exc_info:
exc_type, exc_value = record.exc_info[:2]
if isinstance(exc_value, UnreadablePostError):
... | <commit_before>import json
import logging
import platform
from django.core.serializers.json import DjangoJSONEncoder
from django.http import UnreadablePostError
def skip_unreadable_post(record):
if record.exc_info:
exc_type, exc_value = record.exc_info[:2]
if isinstance(exc_value, UnreadablePostE... |
af3f0b520a868832f708e7692736005e6aee9c4b | core/admin.py | core/admin.py | from django.contrib import admin
from .models import FileUpload
class FileUploadAdmin(admin.ModelAdmin):
readonly_fields = ['owner']
def get_fields(self, request, obj=None):
if request.user.is_superuser:
return ['file', 'url_name', 'owner']
else:
return ['file', 'url_... | from django.contrib import admin
from .models import FileUpload
class FileUploadAdmin(admin.ModelAdmin):
def get_changeform_initial_data(self, request):
return {'owner': request.user}
def get_fields(self, request, obj=None):
if request.user.is_superuser:
return ['file', 'url_name... | Make owner visible to superusers | Make owner visible to superusers
| Python | mit | swarmer/files,swarmer/files | from django.contrib import admin
from .models import FileUpload
class FileUploadAdmin(admin.ModelAdmin):
readonly_fields = ['owner']
def get_fields(self, request, obj=None):
if request.user.is_superuser:
return ['file', 'url_name', 'owner']
else:
return ['file', 'url_... | from django.contrib import admin
from .models import FileUpload
class FileUploadAdmin(admin.ModelAdmin):
def get_changeform_initial_data(self, request):
return {'owner': request.user}
def get_fields(self, request, obj=None):
if request.user.is_superuser:
return ['file', 'url_name... | <commit_before>from django.contrib import admin
from .models import FileUpload
class FileUploadAdmin(admin.ModelAdmin):
readonly_fields = ['owner']
def get_fields(self, request, obj=None):
if request.user.is_superuser:
return ['file', 'url_name', 'owner']
else:
return... | from django.contrib import admin
from .models import FileUpload
class FileUploadAdmin(admin.ModelAdmin):
def get_changeform_initial_data(self, request):
return {'owner': request.user}
def get_fields(self, request, obj=None):
if request.user.is_superuser:
return ['file', 'url_name... | from django.contrib import admin
from .models import FileUpload
class FileUploadAdmin(admin.ModelAdmin):
readonly_fields = ['owner']
def get_fields(self, request, obj=None):
if request.user.is_superuser:
return ['file', 'url_name', 'owner']
else:
return ['file', 'url_... | <commit_before>from django.contrib import admin
from .models import FileUpload
class FileUploadAdmin(admin.ModelAdmin):
readonly_fields = ['owner']
def get_fields(self, request, obj=None):
if request.user.is_superuser:
return ['file', 'url_name', 'owner']
else:
return... |
fac8f1af6bd3eb46fe2a26689b0d85f358934f7a | network_checker/url_access_checker/cli.py | network_checker/url_access_checker/cli.py | # Copyright 2015 Mirantis, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or ... | # Copyright 2015 Mirantis, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or ... | Add EDITOR variable in urlaccesschecker | Add EDITOR variable in urlaccesschecker
This variable required by cmd2 library to work.
Without - it fails on bootstrap with traceback:
File "/usr/lib/python2.6/site-packages/cmd2.py", line 424, in Cmd
if subprocess.Popen(['which', editor])
Change-Id: I061f88b65d7bc7181752cd076da4067df2f84131
Related-Bug: 1439686
| Python | apache-2.0 | prmtl/fuel-web,SmartInfrastructures/fuel-web-dev,eayunstack/fuel-web,SmartInfrastructures/fuel-web-dev,nebril/fuel-web,huntxu/fuel-web,prmtl/fuel-web,eayunstack/fuel-web,stackforge/fuel-web,SmartInfrastructures/fuel-web-dev,eayunstack/fuel-web,eayunstack/fuel-web,SmartInfrastructures/fuel-web-dev,nebril/fuel-web,SmartI... | # Copyright 2015 Mirantis, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or ... | # Copyright 2015 Mirantis, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or ... | <commit_before># Copyright 2015 Mirantis, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by app... | # Copyright 2015 Mirantis, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or ... | # Copyright 2015 Mirantis, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or ... | <commit_before># Copyright 2015 Mirantis, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by app... |
6a7a553dd51abbd6ade2e448bae0e4e2a8036f23 | generate-data.py | generate-data.py | #!/usr/bin/env python
import random
from nott_params import *
num_samples = int(gridDim[0] * gridDim[1] * 10)
def generate_data(numx, numy):
data = ['0' for i in range(numx * numy)]
stimulus = (random.randint(0, numx - 1), random.randint(0, numy - 1))
data[stimulus[1] * numx + stimulus[0]] = '1'
retu... | #!/usr/bin/env python
import random
from nott_params import *
num_samples = int(gridDim[0] * gridDim[1] * 10)
def generate_data(numx, numy):
ldata = ['0' for i in range(numx * numy)]
rdata = ['0' for i in range(numx * numy)]
stimulus = (random.randint(0, numx - 1), random.randint(0, numy - 1))
ldata[... | Add separate left and right eye data generation | Add separate left and right eye data generation
| Python | mit | jeffames-cs/nnot | #!/usr/bin/env python
import random
from nott_params import *
num_samples = int(gridDim[0] * gridDim[1] * 10)
def generate_data(numx, numy):
data = ['0' for i in range(numx * numy)]
stimulus = (random.randint(0, numx - 1), random.randint(0, numy - 1))
data[stimulus[1] * numx + stimulus[0]] = '1'
retu... | #!/usr/bin/env python
import random
from nott_params import *
num_samples = int(gridDim[0] * gridDim[1] * 10)
def generate_data(numx, numy):
ldata = ['0' for i in range(numx * numy)]
rdata = ['0' for i in range(numx * numy)]
stimulus = (random.randint(0, numx - 1), random.randint(0, numy - 1))
ldata[... | <commit_before>#!/usr/bin/env python
import random
from nott_params import *
num_samples = int(gridDim[0] * gridDim[1] * 10)
def generate_data(numx, numy):
data = ['0' for i in range(numx * numy)]
stimulus = (random.randint(0, numx - 1), random.randint(0, numy - 1))
data[stimulus[1] * numx + stimulus[0]]... | #!/usr/bin/env python
import random
from nott_params import *
num_samples = int(gridDim[0] * gridDim[1] * 10)
def generate_data(numx, numy):
ldata = ['0' for i in range(numx * numy)]
rdata = ['0' for i in range(numx * numy)]
stimulus = (random.randint(0, numx - 1), random.randint(0, numy - 1))
ldata[... | #!/usr/bin/env python
import random
from nott_params import *
num_samples = int(gridDim[0] * gridDim[1] * 10)
def generate_data(numx, numy):
data = ['0' for i in range(numx * numy)]
stimulus = (random.randint(0, numx - 1), random.randint(0, numy - 1))
data[stimulus[1] * numx + stimulus[0]] = '1'
retu... | <commit_before>#!/usr/bin/env python
import random
from nott_params import *
num_samples = int(gridDim[0] * gridDim[1] * 10)
def generate_data(numx, numy):
data = ['0' for i in range(numx * numy)]
stimulus = (random.randint(0, numx - 1), random.randint(0, numy - 1))
data[stimulus[1] * numx + stimulus[0]]... |
b8848917db13e374238f052f701b2f11e7ab8d36 | tests/config_test.py | tests/config_test.py | ### Going to fill this out in a subsequent PR
| import os
import tempfile
from unittest import TestCase
from dusty import constants, config
class TestConfig(TestCase):
def setUp(self):
self.temp_config_path = tempfile.mkstemp()[1]
self.old_config_path = constants.CONFIG_PATH
constants.CONFIG_PATH = self.temp_config_path
self.te... | Add some tests for the config module | Add some tests for the config module
| Python | mit | gamechanger/dusty,gamechanger/dusty,gamechanger/dusty,gamechanger/dusty,gamechanger/dusty | ### Going to fill this out in a subsequent PR
Add some tests for the config module | import os
import tempfile
from unittest import TestCase
from dusty import constants, config
class TestConfig(TestCase):
def setUp(self):
self.temp_config_path = tempfile.mkstemp()[1]
self.old_config_path = constants.CONFIG_PATH
constants.CONFIG_PATH = self.temp_config_path
self.te... | <commit_before>### Going to fill this out in a subsequent PR
<commit_msg>Add some tests for the config module<commit_after> | import os
import tempfile
from unittest import TestCase
from dusty import constants, config
class TestConfig(TestCase):
def setUp(self):
self.temp_config_path = tempfile.mkstemp()[1]
self.old_config_path = constants.CONFIG_PATH
constants.CONFIG_PATH = self.temp_config_path
self.te... | ### Going to fill this out in a subsequent PR
Add some tests for the config moduleimport os
import tempfile
from unittest import TestCase
from dusty import constants, config
class TestConfig(TestCase):
def setUp(self):
self.temp_config_path = tempfile.mkstemp()[1]
self.old_config_path = constants... | <commit_before>### Going to fill this out in a subsequent PR
<commit_msg>Add some tests for the config module<commit_after>import os
import tempfile
from unittest import TestCase
from dusty import constants, config
class TestConfig(TestCase):
def setUp(self):
self.temp_config_path = tempfile.mkstemp()[1]... |
7635f6dd4a208982f68617c5aeec36fbc6d69dc9 | tests/test_compat.py | tests/test_compat.py | from unittest import TestCase
from ddt import ddt, data
from aioresponses.compat import (
_vanilla_merge_url_params, _yarl_merge_url_params
)
@ddt
class CompatTestCase(TestCase):
use_default_loop = False
def setUp(self):
self.url = 'http://example.com/api?foo=bar#fragment'
@data(
_... | from unittest import TestCase
from ddt import ddt, data
from aioresponses.compat import (
_vanilla_merge_url_params, _yarl_merge_url_params, URL
)
@ddt
class CompatTestCase(TestCase):
use_default_loop = False
def setUp(self):
self.url = 'http://example.com/api?foo=bar#fragment'
self.yarn_... | Fix tests when yarn is not available | Fix tests when yarn is not available
| Python | mit | pnuckowski/aioresponses | from unittest import TestCase
from ddt import ddt, data
from aioresponses.compat import (
_vanilla_merge_url_params, _yarl_merge_url_params
)
@ddt
class CompatTestCase(TestCase):
use_default_loop = False
def setUp(self):
self.url = 'http://example.com/api?foo=bar#fragment'
@data(
_... | from unittest import TestCase
from ddt import ddt, data
from aioresponses.compat import (
_vanilla_merge_url_params, _yarl_merge_url_params, URL
)
@ddt
class CompatTestCase(TestCase):
use_default_loop = False
def setUp(self):
self.url = 'http://example.com/api?foo=bar#fragment'
self.yarn_... | <commit_before>from unittest import TestCase
from ddt import ddt, data
from aioresponses.compat import (
_vanilla_merge_url_params, _yarl_merge_url_params
)
@ddt
class CompatTestCase(TestCase):
use_default_loop = False
def setUp(self):
self.url = 'http://example.com/api?foo=bar#fragment'
@... | from unittest import TestCase
from ddt import ddt, data
from aioresponses.compat import (
_vanilla_merge_url_params, _yarl_merge_url_params, URL
)
@ddt
class CompatTestCase(TestCase):
use_default_loop = False
def setUp(self):
self.url = 'http://example.com/api?foo=bar#fragment'
self.yarn_... | from unittest import TestCase
from ddt import ddt, data
from aioresponses.compat import (
_vanilla_merge_url_params, _yarl_merge_url_params
)
@ddt
class CompatTestCase(TestCase):
use_default_loop = False
def setUp(self):
self.url = 'http://example.com/api?foo=bar#fragment'
@data(
_... | <commit_before>from unittest import TestCase
from ddt import ddt, data
from aioresponses.compat import (
_vanilla_merge_url_params, _yarl_merge_url_params
)
@ddt
class CompatTestCase(TestCase):
use_default_loop = False
def setUp(self):
self.url = 'http://example.com/api?foo=bar#fragment'
@... |
a9b9fe86806fe573a520c6416146b666cf429742 | trac/upgrades/db11.py | trac/upgrades/db11.py | import os.path
import shutil
sql = """
-- Remove empty values from the milestone list
DELETE FROM milestone WHERE COALESCE(name,'')='';
-- Add a description column to the version table, and remove unnamed versions
CREATE TEMP TABLE version_old AS SELECT * FROM version;
DROP TABLE version;
CREATE TABLE version (
... | import os.path
import shutil
sql = """
-- Remove empty values from the milestone list
DELETE FROM milestone WHERE COALESCE(name,'')='';
-- Add a description column to the version table, and remove unnamed versions
CREATE TEMP TABLE version_old AS SELECT * FROM version;
DROP TABLE version;
CREATE TABLE version (
... | Fix typo in upgrade script | Fix typo in upgrade script
git-svn-id: eda3d06fcef731589ace1b284159cead3416df9b@1647 af82e41b-90c4-0310-8c96-b1721e28e2e2
| Python | bsd-3-clause | jun66j5/trac-ja,netjunki/trac-Pygit2,jun66j5/trac-ja,walty8/trac,netjunki/trac-Pygit2,jun66j5/trac-ja,walty8/trac,netjunki/trac-Pygit2,jun66j5/trac-ja,walty8/trac,walty8/trac | import os.path
import shutil
sql = """
-- Remove empty values from the milestone list
DELETE FROM milestone WHERE COALESCE(name,'')='';
-- Add a description column to the version table, and remove unnamed versions
CREATE TEMP TABLE version_old AS SELECT * FROM version;
DROP TABLE version;
CREATE TABLE version (
... | import os.path
import shutil
sql = """
-- Remove empty values from the milestone list
DELETE FROM milestone WHERE COALESCE(name,'')='';
-- Add a description column to the version table, and remove unnamed versions
CREATE TEMP TABLE version_old AS SELECT * FROM version;
DROP TABLE version;
CREATE TABLE version (
... | <commit_before>import os.path
import shutil
sql = """
-- Remove empty values from the milestone list
DELETE FROM milestone WHERE COALESCE(name,'')='';
-- Add a description column to the version table, and remove unnamed versions
CREATE TEMP TABLE version_old AS SELECT * FROM version;
DROP TABLE version;
CREATE TABLE ... | import os.path
import shutil
sql = """
-- Remove empty values from the milestone list
DELETE FROM milestone WHERE COALESCE(name,'')='';
-- Add a description column to the version table, and remove unnamed versions
CREATE TEMP TABLE version_old AS SELECT * FROM version;
DROP TABLE version;
CREATE TABLE version (
... | import os.path
import shutil
sql = """
-- Remove empty values from the milestone list
DELETE FROM milestone WHERE COALESCE(name,'')='';
-- Add a description column to the version table, and remove unnamed versions
CREATE TEMP TABLE version_old AS SELECT * FROM version;
DROP TABLE version;
CREATE TABLE version (
... | <commit_before>import os.path
import shutil
sql = """
-- Remove empty values from the milestone list
DELETE FROM milestone WHERE COALESCE(name,'')='';
-- Add a description column to the version table, and remove unnamed versions
CREATE TEMP TABLE version_old AS SELECT * FROM version;
DROP TABLE version;
CREATE TABLE ... |
b65c733949b02531b14e7eb7868d275deff4c192 | tests/test_trivia.py | tests/test_trivia.py |
import unittest
from units.trivia import check_answer
class TestCheckAnswer(unittest.TestCase):
def test_correct_answer(self):
self.assertTrue(check_answer("correct", "correct"))
def test_incorrect_answer(self):
self.assertFalse(check_answer("correct", "incorrect"))
def test_parenthes... |
import unittest
from units.trivia import check_answer
class TestCheckAnswer(unittest.TestCase):
def test_correct_answer(self):
self.assertTrue(check_answer("correct", "correct"))
def test_incorrect_answer(self):
self.assertFalse(check_answer("correct", "incorrect"))
def test_parenthes... | Test trivia answer with wrong encoding | [Tests] Test trivia answer with wrong encoding
| Python | mit | Harmon758/Harmonbot,Harmon758/Harmonbot |
import unittest
from units.trivia import check_answer
class TestCheckAnswer(unittest.TestCase):
def test_correct_answer(self):
self.assertTrue(check_answer("correct", "correct"))
def test_incorrect_answer(self):
self.assertFalse(check_answer("correct", "incorrect"))
def test_parenthes... |
import unittest
from units.trivia import check_answer
class TestCheckAnswer(unittest.TestCase):
def test_correct_answer(self):
self.assertTrue(check_answer("correct", "correct"))
def test_incorrect_answer(self):
self.assertFalse(check_answer("correct", "incorrect"))
def test_parenthes... | <commit_before>
import unittest
from units.trivia import check_answer
class TestCheckAnswer(unittest.TestCase):
def test_correct_answer(self):
self.assertTrue(check_answer("correct", "correct"))
def test_incorrect_answer(self):
self.assertFalse(check_answer("correct", "incorrect"))
def... |
import unittest
from units.trivia import check_answer
class TestCheckAnswer(unittest.TestCase):
def test_correct_answer(self):
self.assertTrue(check_answer("correct", "correct"))
def test_incorrect_answer(self):
self.assertFalse(check_answer("correct", "incorrect"))
def test_parenthes... |
import unittest
from units.trivia import check_answer
class TestCheckAnswer(unittest.TestCase):
def test_correct_answer(self):
self.assertTrue(check_answer("correct", "correct"))
def test_incorrect_answer(self):
self.assertFalse(check_answer("correct", "incorrect"))
def test_parenthes... | <commit_before>
import unittest
from units.trivia import check_answer
class TestCheckAnswer(unittest.TestCase):
def test_correct_answer(self):
self.assertTrue(check_answer("correct", "correct"))
def test_incorrect_answer(self):
self.assertFalse(check_answer("correct", "incorrect"))
def... |
cd084fced40beb429474fabf33dff675e9ccb522 | syncplay/__init__.py | syncplay/__init__.py | version = '1.6.7'
revision = ''
milestone = 'Yoitsu'
release_number = '94'
projectURL = 'https://syncplay.pl/'
| version = '1.6.8'
revision = ' development'
milestone = 'Yoitsu'
release_number = '95'
projectURL = 'https://syncplay.pl/'
| Mark as 1.6.8 dev (build 95) | Mark as 1.6.8 dev (build 95)
| Python | apache-2.0 | alby128/syncplay,alby128/syncplay,Syncplay/syncplay,Syncplay/syncplay | version = '1.6.7'
revision = ''
milestone = 'Yoitsu'
release_number = '94'
projectURL = 'https://syncplay.pl/'
Mark as 1.6.8 dev (build 95) | version = '1.6.8'
revision = ' development'
milestone = 'Yoitsu'
release_number = '95'
projectURL = 'https://syncplay.pl/'
| <commit_before>version = '1.6.7'
revision = ''
milestone = 'Yoitsu'
release_number = '94'
projectURL = 'https://syncplay.pl/'
<commit_msg>Mark as 1.6.8 dev (build 95)<commit_after> | version = '1.6.8'
revision = ' development'
milestone = 'Yoitsu'
release_number = '95'
projectURL = 'https://syncplay.pl/'
| version = '1.6.7'
revision = ''
milestone = 'Yoitsu'
release_number = '94'
projectURL = 'https://syncplay.pl/'
Mark as 1.6.8 dev (build 95)version = '1.6.8'
revision = ' development'
milestone = 'Yoitsu'
release_number = '95'
projectURL = 'https://syncplay.pl/'
| <commit_before>version = '1.6.7'
revision = ''
milestone = 'Yoitsu'
release_number = '94'
projectURL = 'https://syncplay.pl/'
<commit_msg>Mark as 1.6.8 dev (build 95)<commit_after>version = '1.6.8'
revision = ' development'
milestone = 'Yoitsu'
release_number = '95'
projectURL = 'https://syncplay.pl/'
|
547e2cbddd26f2e158fbbdab8ae22605cbd270c9 | joby/items.py | joby/items.py | # -*- coding: utf-8 -*-
# Define here the models for your scraped items
#
# See documentation in:
# http://doc.scrapy.org/en/latest/topics/items.html
from scrapy import Item, Field
class JobItem(Item):
website_url = Field()
website_language = Field()
publication_date = Field()
posting_id = Field()... | # -*- coding: utf-8 -*-
# Define here the models for your scraped items
#
# See documentation in:
# http://doc.scrapy.org/en/latest/topics/items.html
from scrapy import Item, Field
from scrapy.loader import Identity, ItemLoader
from scrapy.loader.processors import TakeFirst
class JobItem(Item):
website_url = F... | Add JobItemLoader and DataScienceJobsItemLoader class. | Add JobItemLoader and DataScienceJobsItemLoader class.
| Python | mit | cyberbikepunk/job-spiders | # -*- coding: utf-8 -*-
# Define here the models for your scraped items
#
# See documentation in:
# http://doc.scrapy.org/en/latest/topics/items.html
from scrapy import Item, Field
class JobItem(Item):
website_url = Field()
website_language = Field()
publication_date = Field()
posting_id = Field()... | # -*- coding: utf-8 -*-
# Define here the models for your scraped items
#
# See documentation in:
# http://doc.scrapy.org/en/latest/topics/items.html
from scrapy import Item, Field
from scrapy.loader import Identity, ItemLoader
from scrapy.loader.processors import TakeFirst
class JobItem(Item):
website_url = F... | <commit_before># -*- coding: utf-8 -*-
# Define here the models for your scraped items
#
# See documentation in:
# http://doc.scrapy.org/en/latest/topics/items.html
from scrapy import Item, Field
class JobItem(Item):
website_url = Field()
website_language = Field()
publication_date = Field()
posti... | # -*- coding: utf-8 -*-
# Define here the models for your scraped items
#
# See documentation in:
# http://doc.scrapy.org/en/latest/topics/items.html
from scrapy import Item, Field
from scrapy.loader import Identity, ItemLoader
from scrapy.loader.processors import TakeFirst
class JobItem(Item):
website_url = F... | # -*- coding: utf-8 -*-
# Define here the models for your scraped items
#
# See documentation in:
# http://doc.scrapy.org/en/latest/topics/items.html
from scrapy import Item, Field
class JobItem(Item):
website_url = Field()
website_language = Field()
publication_date = Field()
posting_id = Field()... | <commit_before># -*- coding: utf-8 -*-
# Define here the models for your scraped items
#
# See documentation in:
# http://doc.scrapy.org/en/latest/topics/items.html
from scrapy import Item, Field
class JobItem(Item):
website_url = Field()
website_language = Field()
publication_date = Field()
posti... |
49891ea015c082443b2c709650d125a649e36187 | poolwatcher/poolWatcher.py | poolwatcher/poolWatcher.py | #
# Description:
# This is the main of the poolWatcher
#
# Arguments: (eventually)
# $1 = poll period (in seconds)
# $2 = advertize rate (every $2 loops)
# $3 = glidein submit_dir
#
# Author:
# Igor Sfiligoi (Feb 13th 2007)
#
import os
import os.path
import sys
import traceback
import time
sys.path.append(".... | #
# Description:
# This is the main of the poolWatcher
#
# Arguments: (eventually)
# $1 = poll period (in seconds)
# $2 = advertize rate (every $2 loops)
# $3 = glidein submit_dir
#
# Author:
# Igor Sfiligoi (Feb 13th 2007)
#
import os
import os.path
import sys
import traceback
import time
sys.path.append(".... | Add distinction between claimed and unclaimed | Add distinction between claimed and unclaimed
| Python | bsd-3-clause | holzman/glideinwms-old,bbockelm/glideinWMS,bbockelm/glideinWMS,bbockelm/glideinWMS,holzman/glideinwms-old,bbockelm/glideinWMS,holzman/glideinwms-old | #
# Description:
# This is the main of the poolWatcher
#
# Arguments: (eventually)
# $1 = poll period (in seconds)
# $2 = advertize rate (every $2 loops)
# $3 = glidein submit_dir
#
# Author:
# Igor Sfiligoi (Feb 13th 2007)
#
import os
import os.path
import sys
import traceback
import time
sys.path.append(".... | #
# Description:
# This is the main of the poolWatcher
#
# Arguments: (eventually)
# $1 = poll period (in seconds)
# $2 = advertize rate (every $2 loops)
# $3 = glidein submit_dir
#
# Author:
# Igor Sfiligoi (Feb 13th 2007)
#
import os
import os.path
import sys
import traceback
import time
sys.path.append(".... | <commit_before>#
# Description:
# This is the main of the poolWatcher
#
# Arguments: (eventually)
# $1 = poll period (in seconds)
# $2 = advertize rate (every $2 loops)
# $3 = glidein submit_dir
#
# Author:
# Igor Sfiligoi (Feb 13th 2007)
#
import os
import os.path
import sys
import traceback
import time
sys... | #
# Description:
# This is the main of the poolWatcher
#
# Arguments: (eventually)
# $1 = poll period (in seconds)
# $2 = advertize rate (every $2 loops)
# $3 = glidein submit_dir
#
# Author:
# Igor Sfiligoi (Feb 13th 2007)
#
import os
import os.path
import sys
import traceback
import time
sys.path.append(".... | #
# Description:
# This is the main of the poolWatcher
#
# Arguments: (eventually)
# $1 = poll period (in seconds)
# $2 = advertize rate (every $2 loops)
# $3 = glidein submit_dir
#
# Author:
# Igor Sfiligoi (Feb 13th 2007)
#
import os
import os.path
import sys
import traceback
import time
sys.path.append(".... | <commit_before>#
# Description:
# This is the main of the poolWatcher
#
# Arguments: (eventually)
# $1 = poll period (in seconds)
# $2 = advertize rate (every $2 loops)
# $3 = glidein submit_dir
#
# Author:
# Igor Sfiligoi (Feb 13th 2007)
#
import os
import os.path
import sys
import traceback
import time
sys... |
d18b8806bd0ec6b677268b91c135eee84e1d48a4 | dthm4kaiako/config/__init__.py | dthm4kaiako/config/__init__.py | """Configuration for Django system."""
__version__ = "0.17.3"
__version_info__ = tuple(
[
int(num) if num.isdigit() else num
for num in __version__.replace("-", ".", 1).split(".")
]
)
| """Configuration for Django system."""
__version__ = "0.17.4"
__version_info__ = tuple(
[
int(num) if num.isdigit() else num
for num in __version__.replace("-", ".", 1).split(".")
]
)
| Increment version number to 0.17.4 | Increment version number to 0.17.4
| Python | mit | uccser/cs4teachers,uccser/cs4teachers,uccser/cs4teachers,uccser/cs4teachers | """Configuration for Django system."""
__version__ = "0.17.3"
__version_info__ = tuple(
[
int(num) if num.isdigit() else num
for num in __version__.replace("-", ".", 1).split(".")
]
)
Increment version number to 0.17.4 | """Configuration for Django system."""
__version__ = "0.17.4"
__version_info__ = tuple(
[
int(num) if num.isdigit() else num
for num in __version__.replace("-", ".", 1).split(".")
]
)
| <commit_before>"""Configuration for Django system."""
__version__ = "0.17.3"
__version_info__ = tuple(
[
int(num) if num.isdigit() else num
for num in __version__.replace("-", ".", 1).split(".")
]
)
<commit_msg>Increment version number to 0.17.4<commit_after> | """Configuration for Django system."""
__version__ = "0.17.4"
__version_info__ = tuple(
[
int(num) if num.isdigit() else num
for num in __version__.replace("-", ".", 1).split(".")
]
)
| """Configuration for Django system."""
__version__ = "0.17.3"
__version_info__ = tuple(
[
int(num) if num.isdigit() else num
for num in __version__.replace("-", ".", 1).split(".")
]
)
Increment version number to 0.17.4"""Configuration for Django system."""
__version__ = "0.17.4"
__version_info... | <commit_before>"""Configuration for Django system."""
__version__ = "0.17.3"
__version_info__ = tuple(
[
int(num) if num.isdigit() else num
for num in __version__.replace("-", ".", 1).split(".")
]
)
<commit_msg>Increment version number to 0.17.4<commit_after>"""Configuration for Django system."... |
7c4f239928dce777b40574febdd9aabe3f4ada02 | mopidy_spotify/playlists.py | mopidy_spotify/playlists.py | from __future__ import unicode_literals
import logging
from mopidy import backend, models
import spotify
from mopidy_spotify import translator
logger = logging.getLogger(__name__)
class SpotifyPlaylistsProvider(backend.PlaylistsProvider):
def __init__(self, backend):
self._backend = backend
de... | from __future__ import unicode_literals
import logging
from mopidy import backend
import spotify
from mopidy_spotify import translator
logger = logging.getLogger(__name__)
class SpotifyPlaylistsProvider(backend.PlaylistsProvider):
def __init__(self, backend):
self._backend = backend
def create... | Use to_playlist in the playlist provider | Use to_playlist in the playlist provider
| Python | apache-2.0 | jodal/mopidy-spotify,kingosticks/mopidy-spotify,mopidy/mopidy-spotify | from __future__ import unicode_literals
import logging
from mopidy import backend, models
import spotify
from mopidy_spotify import translator
logger = logging.getLogger(__name__)
class SpotifyPlaylistsProvider(backend.PlaylistsProvider):
def __init__(self, backend):
self._backend = backend
de... | from __future__ import unicode_literals
import logging
from mopidy import backend
import spotify
from mopidy_spotify import translator
logger = logging.getLogger(__name__)
class SpotifyPlaylistsProvider(backend.PlaylistsProvider):
def __init__(self, backend):
self._backend = backend
def create... | <commit_before>from __future__ import unicode_literals
import logging
from mopidy import backend, models
import spotify
from mopidy_spotify import translator
logger = logging.getLogger(__name__)
class SpotifyPlaylistsProvider(backend.PlaylistsProvider):
def __init__(self, backend):
self._backend = ... | from __future__ import unicode_literals
import logging
from mopidy import backend
import spotify
from mopidy_spotify import translator
logger = logging.getLogger(__name__)
class SpotifyPlaylistsProvider(backend.PlaylistsProvider):
def __init__(self, backend):
self._backend = backend
def create... | from __future__ import unicode_literals
import logging
from mopidy import backend, models
import spotify
from mopidy_spotify import translator
logger = logging.getLogger(__name__)
class SpotifyPlaylistsProvider(backend.PlaylistsProvider):
def __init__(self, backend):
self._backend = backend
de... | <commit_before>from __future__ import unicode_literals
import logging
from mopidy import backend, models
import spotify
from mopidy_spotify import translator
logger = logging.getLogger(__name__)
class SpotifyPlaylistsProvider(backend.PlaylistsProvider):
def __init__(self, backend):
self._backend = ... |
c8e1c9720a29d0efa719467774e12ccf06a7989b | tests/test_frog.py | tests/test_frog.py | import csv
from io import StringIO
import logging
from nose.tools import assert_equal
from unittest import SkipTest
from nlpipe.modules.frog import FrogLemmatizer
from tests.tools import check_status
def test_process():
"""
Test Frog lemmatizing
Make sure a frog server is listening at port 9000, e.g.:
... | import csv
from io import StringIO
import logging
from nose.tools import assert_equal
from unittest import SkipTest
from nlpipe.modules.frog import FrogLemmatizer
from tests.tools import check_status
def test_process():
"""
Test Frog lemmatizing
Make sure a frog server is listening at port 9000, e.g.:
... | Add test for frog csv format | Add test for frog csv format
| Python | mit | vanatteveldt/nlpipe,vanatteveldt/nlpipe,vanatteveldt/nlpipe | import csv
from io import StringIO
import logging
from nose.tools import assert_equal
from unittest import SkipTest
from nlpipe.modules.frog import FrogLemmatizer
from tests.tools import check_status
def test_process():
"""
Test Frog lemmatizing
Make sure a frog server is listening at port 9000, e.g.:
... | import csv
from io import StringIO
import logging
from nose.tools import assert_equal
from unittest import SkipTest
from nlpipe.modules.frog import FrogLemmatizer
from tests.tools import check_status
def test_process():
"""
Test Frog lemmatizing
Make sure a frog server is listening at port 9000, e.g.:
... | <commit_before>import csv
from io import StringIO
import logging
from nose.tools import assert_equal
from unittest import SkipTest
from nlpipe.modules.frog import FrogLemmatizer
from tests.tools import check_status
def test_process():
"""
Test Frog lemmatizing
Make sure a frog server is listening at port ... | import csv
from io import StringIO
import logging
from nose.tools import assert_equal
from unittest import SkipTest
from nlpipe.modules.frog import FrogLemmatizer
from tests.tools import check_status
def test_process():
"""
Test Frog lemmatizing
Make sure a frog server is listening at port 9000, e.g.:
... | import csv
from io import StringIO
import logging
from nose.tools import assert_equal
from unittest import SkipTest
from nlpipe.modules.frog import FrogLemmatizer
from tests.tools import check_status
def test_process():
"""
Test Frog lemmatizing
Make sure a frog server is listening at port 9000, e.g.:
... | <commit_before>import csv
from io import StringIO
import logging
from nose.tools import assert_equal
from unittest import SkipTest
from nlpipe.modules.frog import FrogLemmatizer
from tests.tools import check_status
def test_process():
"""
Test Frog lemmatizing
Make sure a frog server is listening at port ... |
a736a7573745af7d72e4297dbfe8799ed472217a | bookmarks/models.py | bookmarks/models.py | from sqlalchemy import Column, Integer, String, Text, ForeignKey
from sqlalchemy.dialects.mysql import BIGINT
from sqlalchemy.orm import relationship
from bookmarks.database import Base
class User(Base):
__tablename__ = 'user'
id = Column(Integer, primary_key=True)
username = Column(String(50), unique=Tru... | from sqlalchemy import Column, Integer, BigInteger, String, Text, ForeignKey
from sqlalchemy.orm import relationship
from bookmarks.database import Base
class User(Base):
__tablename__ = 'user'
id = Column(Integer, primary_key=True)
username = Column(String(50), unique=True, nullable=False)
name = Col... | Use sqlalchemy BigInteger instead of mysql BIGINT | Use sqlalchemy BigInteger instead of mysql BIGINT
| Python | apache-2.0 | byanofsky/bookmarks,byanofsky/bookmarks,byanofsky/bookmarks | from sqlalchemy import Column, Integer, String, Text, ForeignKey
from sqlalchemy.dialects.mysql import BIGINT
from sqlalchemy.orm import relationship
from bookmarks.database import Base
class User(Base):
__tablename__ = 'user'
id = Column(Integer, primary_key=True)
username = Column(String(50), unique=Tru... | from sqlalchemy import Column, Integer, BigInteger, String, Text, ForeignKey
from sqlalchemy.orm import relationship
from bookmarks.database import Base
class User(Base):
__tablename__ = 'user'
id = Column(Integer, primary_key=True)
username = Column(String(50), unique=True, nullable=False)
name = Col... | <commit_before>from sqlalchemy import Column, Integer, String, Text, ForeignKey
from sqlalchemy.dialects.mysql import BIGINT
from sqlalchemy.orm import relationship
from bookmarks.database import Base
class User(Base):
__tablename__ = 'user'
id = Column(Integer, primary_key=True)
username = Column(String(... | from sqlalchemy import Column, Integer, BigInteger, String, Text, ForeignKey
from sqlalchemy.orm import relationship
from bookmarks.database import Base
class User(Base):
__tablename__ = 'user'
id = Column(Integer, primary_key=True)
username = Column(String(50), unique=True, nullable=False)
name = Col... | from sqlalchemy import Column, Integer, String, Text, ForeignKey
from sqlalchemy.dialects.mysql import BIGINT
from sqlalchemy.orm import relationship
from bookmarks.database import Base
class User(Base):
__tablename__ = 'user'
id = Column(Integer, primary_key=True)
username = Column(String(50), unique=Tru... | <commit_before>from sqlalchemy import Column, Integer, String, Text, ForeignKey
from sqlalchemy.dialects.mysql import BIGINT
from sqlalchemy.orm import relationship
from bookmarks.database import Base
class User(Base):
__tablename__ = 'user'
id = Column(Integer, primary_key=True)
username = Column(String(... |
b25deb2029a103548e56d7dc1fda61124b6e47d6 | meteorflux/config.py | meteorflux/config.py | """Configuration constants."""
import os
PACKAGEDIR = os.path.dirname(os.path.abspath(__file__))
HOSTNAME = os.uname()[1]
if HOSTNAME == 'ec.geert.io' or HOSTNAME == 'imo.geert.io' or HOSTNAME == 'meteorflux.io':
DEBUG = True
DBINFO = 'host=/var/run/postgresql dbname=flux_kca user=postgres'
TMPDIR = '/var... | """Configuration constants."""
import os
PACKAGEDIR = os.path.dirname(os.path.abspath(__file__))
HOSTNAME = os.uname()[1]
if HOSTNAME == 'ec.geert.io' or HOSTNAME == 'imo.geert.io' or HOSTNAME == 'meteorflux.io':
DEBUG = True
DBINFO = 'host=/var/run/postgresql dbname=fluxdb user=postgres'
TMPDIR = '/var/w... | Set database name to fluxdb | Set database name to fluxdb
| Python | mit | barentsen/meteor-flux,barentsen/meteor-flux,barentsen/meteor-flux,barentsen/meteor-flux | """Configuration constants."""
import os
PACKAGEDIR = os.path.dirname(os.path.abspath(__file__))
HOSTNAME = os.uname()[1]
if HOSTNAME == 'ec.geert.io' or HOSTNAME == 'imo.geert.io' or HOSTNAME == 'meteorflux.io':
DEBUG = True
DBINFO = 'host=/var/run/postgresql dbname=flux_kca user=postgres'
TMPDIR = '/var... | """Configuration constants."""
import os
PACKAGEDIR = os.path.dirname(os.path.abspath(__file__))
HOSTNAME = os.uname()[1]
if HOSTNAME == 'ec.geert.io' or HOSTNAME == 'imo.geert.io' or HOSTNAME == 'meteorflux.io':
DEBUG = True
DBINFO = 'host=/var/run/postgresql dbname=fluxdb user=postgres'
TMPDIR = '/var/w... | <commit_before>"""Configuration constants."""
import os
PACKAGEDIR = os.path.dirname(os.path.abspath(__file__))
HOSTNAME = os.uname()[1]
if HOSTNAME == 'ec.geert.io' or HOSTNAME == 'imo.geert.io' or HOSTNAME == 'meteorflux.io':
DEBUG = True
DBINFO = 'host=/var/run/postgresql dbname=flux_kca user=postgres'
... | """Configuration constants."""
import os
PACKAGEDIR = os.path.dirname(os.path.abspath(__file__))
HOSTNAME = os.uname()[1]
if HOSTNAME == 'ec.geert.io' or HOSTNAME == 'imo.geert.io' or HOSTNAME == 'meteorflux.io':
DEBUG = True
DBINFO = 'host=/var/run/postgresql dbname=fluxdb user=postgres'
TMPDIR = '/var/w... | """Configuration constants."""
import os
PACKAGEDIR = os.path.dirname(os.path.abspath(__file__))
HOSTNAME = os.uname()[1]
if HOSTNAME == 'ec.geert.io' or HOSTNAME == 'imo.geert.io' or HOSTNAME == 'meteorflux.io':
DEBUG = True
DBINFO = 'host=/var/run/postgresql dbname=flux_kca user=postgres'
TMPDIR = '/var... | <commit_before>"""Configuration constants."""
import os
PACKAGEDIR = os.path.dirname(os.path.abspath(__file__))
HOSTNAME = os.uname()[1]
if HOSTNAME == 'ec.geert.io' or HOSTNAME == 'imo.geert.io' or HOSTNAME == 'meteorflux.io':
DEBUG = True
DBINFO = 'host=/var/run/postgresql dbname=flux_kca user=postgres'
... |
e97fabb025e66671edbe4446efa966d853f1d6df | tools/utils.py | tools/utils.py | #!/usr/bin/env python
''' This script provides utils for python scripts in cameo.
'''
import os
import sys
import subprocess
def TryAddDepotToolsToPythonPath():
depot_tools = FindDepotToolsInPath()
if depot_tools:
sys.path.append(depot_tools)
def FindDepotToolsInPath():
paths = os.getenv('PATH').split(os.... | #!/usr/bin/env python
''' This script provides utils for python scripts in cameo.
'''
import os
import sys
import subprocess
def TryAddDepotToolsToPythonPath():
depot_tools = FindDepotToolsInPath()
if depot_tools:
sys.path.append(depot_tools)
python_path = os.environ.get('PYTHONPATH')
if python_path:... | Add depot_tools to PYTHONPATH for pylint | Add depot_tools to PYTHONPATH for pylint
Otherwise, pylint will fail on trybot.
| Python | bsd-3-clause | weiyirong/crosswalk-1,qjia7/crosswalk,baleboy/crosswalk,pozdnyakov/crosswalk,rakuco/crosswalk,jpike88/crosswalk,baleboy/crosswalk,baleboy/crosswalk,huningxin/crosswalk,jpike88/crosswalk,myroot/crosswalk,Pluto-tv/crosswalk,Pluto-tv/crosswalk,jondong/crosswalk,DonnaWuDongxia/crosswalk,ZhengXinCN/crosswalk,tomatell/crossw... | #!/usr/bin/env python
''' This script provides utils for python scripts in cameo.
'''
import os
import sys
import subprocess
def TryAddDepotToolsToPythonPath():
depot_tools = FindDepotToolsInPath()
if depot_tools:
sys.path.append(depot_tools)
def FindDepotToolsInPath():
paths = os.getenv('PATH').split(os.... | #!/usr/bin/env python
''' This script provides utils for python scripts in cameo.
'''
import os
import sys
import subprocess
def TryAddDepotToolsToPythonPath():
depot_tools = FindDepotToolsInPath()
if depot_tools:
sys.path.append(depot_tools)
python_path = os.environ.get('PYTHONPATH')
if python_path:... | <commit_before>#!/usr/bin/env python
''' This script provides utils for python scripts in cameo.
'''
import os
import sys
import subprocess
def TryAddDepotToolsToPythonPath():
depot_tools = FindDepotToolsInPath()
if depot_tools:
sys.path.append(depot_tools)
def FindDepotToolsInPath():
paths = os.getenv('P... | #!/usr/bin/env python
''' This script provides utils for python scripts in cameo.
'''
import os
import sys
import subprocess
def TryAddDepotToolsToPythonPath():
depot_tools = FindDepotToolsInPath()
if depot_tools:
sys.path.append(depot_tools)
python_path = os.environ.get('PYTHONPATH')
if python_path:... | #!/usr/bin/env python
''' This script provides utils for python scripts in cameo.
'''
import os
import sys
import subprocess
def TryAddDepotToolsToPythonPath():
depot_tools = FindDepotToolsInPath()
if depot_tools:
sys.path.append(depot_tools)
def FindDepotToolsInPath():
paths = os.getenv('PATH').split(os.... | <commit_before>#!/usr/bin/env python
''' This script provides utils for python scripts in cameo.
'''
import os
import sys
import subprocess
def TryAddDepotToolsToPythonPath():
depot_tools = FindDepotToolsInPath()
if depot_tools:
sys.path.append(depot_tools)
def FindDepotToolsInPath():
paths = os.getenv('P... |
ec784672ec59274e4bb4c227935439d6c0b31155 | numatuned/virsh.py | numatuned/virsh.py | import glob
import subprocess
from .read import read
class Virsh:
"""Class can be used to execute virsh commands for a given domain"""
domain = ""
def __init__(self, domain):
self.domain = domain
@staticmethod
def get_domain_list():
pid_files = glob.glob('/var/run/libvirt/qemu/*.p... | import glob
import subprocess
from .read import read
class Virsh:
"""Class can be used to execute virsh commands for a given domain"""
domain = ""
def __init__(self, domain):
self.domain = domain
@staticmethod
def get_domain_list():
pid_files = glob.glob('/var/run/libvirt/qemu/*.p... | Use numatune but use mode preferred | Use numatune but use mode preferred
| Python | mit | dionbosschieter/numatuned,dionbosschieter/numatuned | import glob
import subprocess
from .read import read
class Virsh:
"""Class can be used to execute virsh commands for a given domain"""
domain = ""
def __init__(self, domain):
self.domain = domain
@staticmethod
def get_domain_list():
pid_files = glob.glob('/var/run/libvirt/qemu/*.p... | import glob
import subprocess
from .read import read
class Virsh:
"""Class can be used to execute virsh commands for a given domain"""
domain = ""
def __init__(self, domain):
self.domain = domain
@staticmethod
def get_domain_list():
pid_files = glob.glob('/var/run/libvirt/qemu/*.p... | <commit_before>import glob
import subprocess
from .read import read
class Virsh:
"""Class can be used to execute virsh commands for a given domain"""
domain = ""
def __init__(self, domain):
self.domain = domain
@staticmethod
def get_domain_list():
pid_files = glob.glob('/var/run/l... | import glob
import subprocess
from .read import read
class Virsh:
"""Class can be used to execute virsh commands for a given domain"""
domain = ""
def __init__(self, domain):
self.domain = domain
@staticmethod
def get_domain_list():
pid_files = glob.glob('/var/run/libvirt/qemu/*.p... | import glob
import subprocess
from .read import read
class Virsh:
"""Class can be used to execute virsh commands for a given domain"""
domain = ""
def __init__(self, domain):
self.domain = domain
@staticmethod
def get_domain_list():
pid_files = glob.glob('/var/run/libvirt/qemu/*.p... | <commit_before>import glob
import subprocess
from .read import read
class Virsh:
"""Class can be used to execute virsh commands for a given domain"""
domain = ""
def __init__(self, domain):
self.domain = domain
@staticmethod
def get_domain_list():
pid_files = glob.glob('/var/run/l... |
c06d4ddc54bbe4b10dd0722f5a76d9cb7550da53 | tests/test_config.py | tests/test_config.py | from pytest import fixture
from oshino.config import Config, RiemannConfig
@fixture
def base_config():
return Config({"riemann": {"host": "localhost",
"port": 5555
},
"interval": 5
})
def test_base_config_get_ri... | from pytest import fixture
from oshino.config import Config, RiemannConfig
@fixture
def base_config():
return Config({"riemann": {"host": "localhost",
"port": 5555
},
"interval": 5
})
@fixture
def incomplete_con... | Test case when there's no riemann config | Test case when there's no riemann config
| Python | mit | CodersOfTheNight/oshino | from pytest import fixture
from oshino.config import Config, RiemannConfig
@fixture
def base_config():
return Config({"riemann": {"host": "localhost",
"port": 5555
},
"interval": 5
})
def test_base_config_get_ri... | from pytest import fixture
from oshino.config import Config, RiemannConfig
@fixture
def base_config():
return Config({"riemann": {"host": "localhost",
"port": 5555
},
"interval": 5
})
@fixture
def incomplete_con... | <commit_before>from pytest import fixture
from oshino.config import Config, RiemannConfig
@fixture
def base_config():
return Config({"riemann": {"host": "localhost",
"port": 5555
},
"interval": 5
})
def test_bas... | from pytest import fixture
from oshino.config import Config, RiemannConfig
@fixture
def base_config():
return Config({"riemann": {"host": "localhost",
"port": 5555
},
"interval": 5
})
@fixture
def incomplete_con... | from pytest import fixture
from oshino.config import Config, RiemannConfig
@fixture
def base_config():
return Config({"riemann": {"host": "localhost",
"port": 5555
},
"interval": 5
})
def test_base_config_get_ri... | <commit_before>from pytest import fixture
from oshino.config import Config, RiemannConfig
@fixture
def base_config():
return Config({"riemann": {"host": "localhost",
"port": 5555
},
"interval": 5
})
def test_bas... |
28bb18bae725af7c7af434c809dc2e32f8a3fcd6 | ticketus/ui/views.py | ticketus/ui/views.py | from django.shortcuts import get_object_or_404, render, redirect
from django.views.decorators.http import require_POST
from ticketus.core.models import *
from ticketus.core.forms import CommentForm
def ticket_list(request, template='ui/ticket_list.html'):
tickets = Ticket.objects.all()
context = {'tickets': t... | from django.shortcuts import get_object_or_404, render, redirect
from django.views.decorators.http import require_POST
from ticketus.core.models import *
from ticketus.core.forms import CommentForm
def ticket_list(request, template='ui/ticket_list.html'):
tickets = Ticket.objects.all()
context = {'tickets': t... | Set commenter to logged in user, not ticket requestor | Set commenter to logged in user, not ticket requestor
| Python | bsd-2-clause | sjkingo/ticketus,sjkingo/ticketus,sjkingo/ticketus,sjkingo/ticketus | from django.shortcuts import get_object_or_404, render, redirect
from django.views.decorators.http import require_POST
from ticketus.core.models import *
from ticketus.core.forms import CommentForm
def ticket_list(request, template='ui/ticket_list.html'):
tickets = Ticket.objects.all()
context = {'tickets': t... | from django.shortcuts import get_object_or_404, render, redirect
from django.views.decorators.http import require_POST
from ticketus.core.models import *
from ticketus.core.forms import CommentForm
def ticket_list(request, template='ui/ticket_list.html'):
tickets = Ticket.objects.all()
context = {'tickets': t... | <commit_before>from django.shortcuts import get_object_or_404, render, redirect
from django.views.decorators.http import require_POST
from ticketus.core.models import *
from ticketus.core.forms import CommentForm
def ticket_list(request, template='ui/ticket_list.html'):
tickets = Ticket.objects.all()
context ... | from django.shortcuts import get_object_or_404, render, redirect
from django.views.decorators.http import require_POST
from ticketus.core.models import *
from ticketus.core.forms import CommentForm
def ticket_list(request, template='ui/ticket_list.html'):
tickets = Ticket.objects.all()
context = {'tickets': t... | from django.shortcuts import get_object_or_404, render, redirect
from django.views.decorators.http import require_POST
from ticketus.core.models import *
from ticketus.core.forms import CommentForm
def ticket_list(request, template='ui/ticket_list.html'):
tickets = Ticket.objects.all()
context = {'tickets': t... | <commit_before>from django.shortcuts import get_object_or_404, render, redirect
from django.views.decorators.http import require_POST
from ticketus.core.models import *
from ticketus.core.forms import CommentForm
def ticket_list(request, template='ui/ticket_list.html'):
tickets = Ticket.objects.all()
context ... |
33ce8c19469b703b73727bd759b9655124919ae5 | script/coroutines.py | script/coroutines.py |
# -*- coding: ascii -*-
# A generator-based coroutine framework.
import select
def run(routines):
while routines:
for r in routines:
try:
result = r.next()
except StopIteration:
routines.remove(r)
|
# -*- coding: ascii -*-
# A generator-based coroutine framework.
import select
class Executor:
def __init__(self):
self.routines = {}
def add(self, routine):
self.routines[routine] = True
def _remove(self, routine):
self.routines.pop(routine, None)
def __call__(self):
... | Convert coroutine executor to OOP | [Scripts] Convert coroutine executor to OOP
| Python | mit | CylonicRaider/Instant,CylonicRaider/Instant,CylonicRaider/Instant,CylonicRaider/Instant,CylonicRaider/Instant |
# -*- coding: ascii -*-
# A generator-based coroutine framework.
import select
def run(routines):
while routines:
for r in routines:
try:
result = r.next()
except StopIteration:
routines.remove(r)
[Scripts] Convert coroutine executor to OOP |
# -*- coding: ascii -*-
# A generator-based coroutine framework.
import select
class Executor:
def __init__(self):
self.routines = {}
def add(self, routine):
self.routines[routine] = True
def _remove(self, routine):
self.routines.pop(routine, None)
def __call__(self):
... | <commit_before>
# -*- coding: ascii -*-
# A generator-based coroutine framework.
import select
def run(routines):
while routines:
for r in routines:
try:
result = r.next()
except StopIteration:
routines.remove(r)
<commit_msg>[Scripts] Convert corout... |
# -*- coding: ascii -*-
# A generator-based coroutine framework.
import select
class Executor:
def __init__(self):
self.routines = {}
def add(self, routine):
self.routines[routine] = True
def _remove(self, routine):
self.routines.pop(routine, None)
def __call__(self):
... |
# -*- coding: ascii -*-
# A generator-based coroutine framework.
import select
def run(routines):
while routines:
for r in routines:
try:
result = r.next()
except StopIteration:
routines.remove(r)
[Scripts] Convert coroutine executor to OOP
# -*- c... | <commit_before>
# -*- coding: ascii -*-
# A generator-based coroutine framework.
import select
def run(routines):
while routines:
for r in routines:
try:
result = r.next()
except StopIteration:
routines.remove(r)
<commit_msg>[Scripts] Convert corout... |
29bf7ef7de9e0a5c66876b126f4df7ef279e30b6 | mediacloud/mediawords/db/exceptions/handler.py | mediacloud/mediawords/db/exceptions/handler.py | class McDatabaseHandlerException(Exception):
"""Database handler exception."""
pass
class McConnectException(McDatabaseHandlerException):
"""__connect() exception."""
pass
class McSchemaIsUpToDateException(McDatabaseHandlerException):
"""schema_is_up_to_date() exception."""
pass
class McQu... | class McDatabaseHandlerException(Exception):
"""Database handler exception."""
pass
class McConnectException(McDatabaseHandlerException):
"""__connect() exception."""
pass
class McSchemaIsUpToDateException(McDatabaseHandlerException):
"""schema_is_up_to_date() exception."""
pass
class McQu... | Revert "Add exception to be thrown by select()" | Revert "Add exception to be thrown by select()"
This reverts commit 1009bd3b5e5941aff2f7b3852494ee19f085dcce.
| Python | agpl-3.0 | berkmancenter/mediacloud,berkmancenter/mediacloud,berkmancenter/mediacloud,berkmancenter/mediacloud,berkmancenter/mediacloud | class McDatabaseHandlerException(Exception):
"""Database handler exception."""
pass
class McConnectException(McDatabaseHandlerException):
"""__connect() exception."""
pass
class McSchemaIsUpToDateException(McDatabaseHandlerException):
"""schema_is_up_to_date() exception."""
pass
class McQu... | class McDatabaseHandlerException(Exception):
"""Database handler exception."""
pass
class McConnectException(McDatabaseHandlerException):
"""__connect() exception."""
pass
class McSchemaIsUpToDateException(McDatabaseHandlerException):
"""schema_is_up_to_date() exception."""
pass
class McQu... | <commit_before>class McDatabaseHandlerException(Exception):
"""Database handler exception."""
pass
class McConnectException(McDatabaseHandlerException):
"""__connect() exception."""
pass
class McSchemaIsUpToDateException(McDatabaseHandlerException):
"""schema_is_up_to_date() exception."""
pa... | class McDatabaseHandlerException(Exception):
"""Database handler exception."""
pass
class McConnectException(McDatabaseHandlerException):
"""__connect() exception."""
pass
class McSchemaIsUpToDateException(McDatabaseHandlerException):
"""schema_is_up_to_date() exception."""
pass
class McQu... | class McDatabaseHandlerException(Exception):
"""Database handler exception."""
pass
class McConnectException(McDatabaseHandlerException):
"""__connect() exception."""
pass
class McSchemaIsUpToDateException(McDatabaseHandlerException):
"""schema_is_up_to_date() exception."""
pass
class McQu... | <commit_before>class McDatabaseHandlerException(Exception):
"""Database handler exception."""
pass
class McConnectException(McDatabaseHandlerException):
"""__connect() exception."""
pass
class McSchemaIsUpToDateException(McDatabaseHandlerException):
"""schema_is_up_to_date() exception."""
pa... |
874d6f568a1367cbaad077648202f3328cd2eb8f | modules/Metadata/entropy.py | modules/Metadata/entropy.py | # This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
from __future__ import division, absolute_import, with_statement, print_function, unicode_literals
from collections impor... | # This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
from __future__ import division, absolute_import, with_statement, print_function, unicode_literals
from collections impor... | Add conf arg to check function | Add conf arg to check function | Python | mpl-2.0 | jmlong1027/multiscanner,awest1339/multiscanner,awest1339/multiscanner,awest1339/multiscanner,MITRECND/multiscanner,MITRECND/multiscanner,jmlong1027/multiscanner,awest1339/multiscanner,jmlong1027/multiscanner,jmlong1027/multiscanner,mitre/multiscanner,mitre/multiscanner,mitre/multiscanner | # This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
from __future__ import division, absolute_import, with_statement, print_function, unicode_literals
from collections impor... | # This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
from __future__ import division, absolute_import, with_statement, print_function, unicode_literals
from collections impor... | <commit_before># This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
from __future__ import division, absolute_import, with_statement, print_function, unicode_literals
from co... | # This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
from __future__ import division, absolute_import, with_statement, print_function, unicode_literals
from collections impor... | # This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
from __future__ import division, absolute_import, with_statement, print_function, unicode_literals
from collections impor... | <commit_before># This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
from __future__ import division, absolute_import, with_statement, print_function, unicode_literals
from co... |
ae31e3dcb5e4e2f7a7d6d12b92621c1750eb6a0e | dask_distance/_utils.py | dask_distance/_utils.py | import dask
import dask.array
import dask_distance._compat
def _bool_cmp_mtx_cnt(u, v):
u = dask_distance._compat._asarray(u)
v = dask_distance._compat._asarray(v)
u_1 = u.astype(bool)
v_1 = v.astype(bool)
u_0 = ~u_1
v_0 = ~v_1
uv_11 = u_1 & v_1
uv_10 = u_1 & v_0
uv_01 = u_0 & v... | Create a comparison matrix for 2 1-D bool arrays | Create a comparison matrix for 2 1-D bool arrays
Simply count the number of combinations of true and false between the
two 1-D arrays and sum them together. The result is then stacked into a
2-D array where the indices match the particular combination of true and
false seen in each 1-D bool array in order.
| Python | bsd-3-clause | jakirkham/dask-distance | Create a comparison matrix for 2 1-D bool arrays
Simply count the number of combinations of true and false between the
two 1-D arrays and sum them together. The result is then stacked into a
2-D array where the indices match the particular combination of true and
false seen in each 1-D bool array in order. | import dask
import dask.array
import dask_distance._compat
def _bool_cmp_mtx_cnt(u, v):
u = dask_distance._compat._asarray(u)
v = dask_distance._compat._asarray(v)
u_1 = u.astype(bool)
v_1 = v.astype(bool)
u_0 = ~u_1
v_0 = ~v_1
uv_11 = u_1 & v_1
uv_10 = u_1 & v_0
uv_01 = u_0 & v... | <commit_before><commit_msg>Create a comparison matrix for 2 1-D bool arrays
Simply count the number of combinations of true and false between the
two 1-D arrays and sum them together. The result is then stacked into a
2-D array where the indices match the particular combination of true and
false seen in each 1-D bool ... | import dask
import dask.array
import dask_distance._compat
def _bool_cmp_mtx_cnt(u, v):
u = dask_distance._compat._asarray(u)
v = dask_distance._compat._asarray(v)
u_1 = u.astype(bool)
v_1 = v.astype(bool)
u_0 = ~u_1
v_0 = ~v_1
uv_11 = u_1 & v_1
uv_10 = u_1 & v_0
uv_01 = u_0 & v... | Create a comparison matrix for 2 1-D bool arrays
Simply count the number of combinations of true and false between the
two 1-D arrays and sum them together. The result is then stacked into a
2-D array where the indices match the particular combination of true and
false seen in each 1-D bool array in order.import dask
... | <commit_before><commit_msg>Create a comparison matrix for 2 1-D bool arrays
Simply count the number of combinations of true and false between the
two 1-D arrays and sum them together. The result is then stacked into a
2-D array where the indices match the particular combination of true and
false seen in each 1-D bool ... | |
f0257d91a27f7ccf04d72d1196e78e401a2c6f4e | trac/web/__init__.py | trac/web/__init__.py | # With mod_python we'll have to delay importing trac.web.api until
# modpython_frontend.handler() has been called since the
# PYTHON_EGG_CACHE variable is set from there
#
# TODO: Remove this once the Genshi zip_safe issue has been resolved.
import os
from pkg_resources import get_distribution
if not os.path.isdir(get_... | # Workaround for http://bugs.python.org/issue6763 and
# http://bugs.python.org/issue5853 thread issues
import mimetypes
mimetypes.init()
# With mod_python we'll have to delay importing trac.web.api until
# modpython_frontend.handler() has been called since the
# PYTHON_EGG_CACHE variable is set from there
#
# TODO: Re... | Fix race condition during `mimetypes` initialization. | Fix race condition during `mimetypes` initialization.
Initial patch from Steven R. Loomis.
Closes #8629.
git-svn-id: f68c6b3b1dcd5d00a2560c384475aaef3bc99487@9740 af82e41b-90c4-0310-8c96-b1721e28e2e2
| Python | bsd-3-clause | moreati/trac-gitsvn,moreati/trac-gitsvn,exocad/exotrac,exocad/exotrac,moreati/trac-gitsvn,dafrito/trac-mirror,exocad/exotrac,exocad/exotrac,dafrito/trac-mirror,moreati/trac-gitsvn,dafrito/trac-mirror,dafrito/trac-mirror | # With mod_python we'll have to delay importing trac.web.api until
# modpython_frontend.handler() has been called since the
# PYTHON_EGG_CACHE variable is set from there
#
# TODO: Remove this once the Genshi zip_safe issue has been resolved.
import os
from pkg_resources import get_distribution
if not os.path.isdir(get_... | # Workaround for http://bugs.python.org/issue6763 and
# http://bugs.python.org/issue5853 thread issues
import mimetypes
mimetypes.init()
# With mod_python we'll have to delay importing trac.web.api until
# modpython_frontend.handler() has been called since the
# PYTHON_EGG_CACHE variable is set from there
#
# TODO: Re... | <commit_before># With mod_python we'll have to delay importing trac.web.api until
# modpython_frontend.handler() has been called since the
# PYTHON_EGG_CACHE variable is set from there
#
# TODO: Remove this once the Genshi zip_safe issue has been resolved.
import os
from pkg_resources import get_distribution
if not os.... | # Workaround for http://bugs.python.org/issue6763 and
# http://bugs.python.org/issue5853 thread issues
import mimetypes
mimetypes.init()
# With mod_python we'll have to delay importing trac.web.api until
# modpython_frontend.handler() has been called since the
# PYTHON_EGG_CACHE variable is set from there
#
# TODO: Re... | # With mod_python we'll have to delay importing trac.web.api until
# modpython_frontend.handler() has been called since the
# PYTHON_EGG_CACHE variable is set from there
#
# TODO: Remove this once the Genshi zip_safe issue has been resolved.
import os
from pkg_resources import get_distribution
if not os.path.isdir(get_... | <commit_before># With mod_python we'll have to delay importing trac.web.api until
# modpython_frontend.handler() has been called since the
# PYTHON_EGG_CACHE variable is set from there
#
# TODO: Remove this once the Genshi zip_safe issue has been resolved.
import os
from pkg_resources import get_distribution
if not os.... |
067a02fc5d4a432f4dc7f10cdc098b9ebdad9ccd | extract_options.py | extract_options.py | from pymongo import MongoClient
def main():
client = MongoClient()
db = client.cityhotspots
db.drop_collection('dineroptions')
diners_collection = db.diners
doc = {}
diner_options_collection = db.dineroptions
doc['categories'] = diners_collection.distinct('category')
doc['cuisines'] =... | from pymongo import MongoClient
def main():
client = MongoClient()
db = client.cityhotspots
db.drop_collection('dineroptions')
diners_collection = db.diners
doc = {}
diner_options_collection = db.dineroptions
doc['categories'] = diners_collection.distinct('category')
doc['categories']... | Add 'All' option to lists | Add 'All' option to lists
| Python | mit | earlwlkr/POICrawler | from pymongo import MongoClient
def main():
client = MongoClient()
db = client.cityhotspots
db.drop_collection('dineroptions')
diners_collection = db.diners
doc = {}
diner_options_collection = db.dineroptions
doc['categories'] = diners_collection.distinct('category')
doc['cuisines'] =... | from pymongo import MongoClient
def main():
client = MongoClient()
db = client.cityhotspots
db.drop_collection('dineroptions')
diners_collection = db.diners
doc = {}
diner_options_collection = db.dineroptions
doc['categories'] = diners_collection.distinct('category')
doc['categories']... | <commit_before>from pymongo import MongoClient
def main():
client = MongoClient()
db = client.cityhotspots
db.drop_collection('dineroptions')
diners_collection = db.diners
doc = {}
diner_options_collection = db.dineroptions
doc['categories'] = diners_collection.distinct('category')
do... | from pymongo import MongoClient
def main():
client = MongoClient()
db = client.cityhotspots
db.drop_collection('dineroptions')
diners_collection = db.diners
doc = {}
diner_options_collection = db.dineroptions
doc['categories'] = diners_collection.distinct('category')
doc['categories']... | from pymongo import MongoClient
def main():
client = MongoClient()
db = client.cityhotspots
db.drop_collection('dineroptions')
diners_collection = db.diners
doc = {}
diner_options_collection = db.dineroptions
doc['categories'] = diners_collection.distinct('category')
doc['cuisines'] =... | <commit_before>from pymongo import MongoClient
def main():
client = MongoClient()
db = client.cityhotspots
db.drop_collection('dineroptions')
diners_collection = db.diners
doc = {}
diner_options_collection = db.dineroptions
doc['categories'] = diners_collection.distinct('category')
do... |
370da8d3e7d879a9bdebcf594df6604905422d67 | application/cases/service.py | application/cases/service.py | import requests
import logging
from flask import current_app
from requests.auth import HTTPBasicAuth
logging.basicConfig(level=logging.INFO)
logger = logging.getLogger(__name__)
logger.addHandler(logging.StreamHandler())
def get_cases(queue):
url = current_app.config['CASES_URL'] + "/cases/queue/" + queue
lo... | import requests
import logging
from flask import current_app
from requests.auth import HTTPBasicAuth
logging.basicConfig(level=logging.INFO)
logger = logging.getLogger(__name__)
logger.addHandler(logging.StreamHandler())
def get_cases(queue):
url = current_app.config['CASES_URL'] + "/cases/queued/" + queue
l... | Change endpoint to show cases | Change endpoint to show cases
| Python | mit | LandRegistry/casework-frontend-alpha,LandRegistry/casework-frontend-alpha,LandRegistry/casework-frontend-alpha,LandRegistry/casework-frontend-alpha | import requests
import logging
from flask import current_app
from requests.auth import HTTPBasicAuth
logging.basicConfig(level=logging.INFO)
logger = logging.getLogger(__name__)
logger.addHandler(logging.StreamHandler())
def get_cases(queue):
url = current_app.config['CASES_URL'] + "/cases/queue/" + queue
lo... | import requests
import logging
from flask import current_app
from requests.auth import HTTPBasicAuth
logging.basicConfig(level=logging.INFO)
logger = logging.getLogger(__name__)
logger.addHandler(logging.StreamHandler())
def get_cases(queue):
url = current_app.config['CASES_URL'] + "/cases/queued/" + queue
l... | <commit_before>import requests
import logging
from flask import current_app
from requests.auth import HTTPBasicAuth
logging.basicConfig(level=logging.INFO)
logger = logging.getLogger(__name__)
logger.addHandler(logging.StreamHandler())
def get_cases(queue):
url = current_app.config['CASES_URL'] + "/cases/queue/"... | import requests
import logging
from flask import current_app
from requests.auth import HTTPBasicAuth
logging.basicConfig(level=logging.INFO)
logger = logging.getLogger(__name__)
logger.addHandler(logging.StreamHandler())
def get_cases(queue):
url = current_app.config['CASES_URL'] + "/cases/queued/" + queue
l... | import requests
import logging
from flask import current_app
from requests.auth import HTTPBasicAuth
logging.basicConfig(level=logging.INFO)
logger = logging.getLogger(__name__)
logger.addHandler(logging.StreamHandler())
def get_cases(queue):
url = current_app.config['CASES_URL'] + "/cases/queue/" + queue
lo... | <commit_before>import requests
import logging
from flask import current_app
from requests.auth import HTTPBasicAuth
logging.basicConfig(level=logging.INFO)
logger = logging.getLogger(__name__)
logger.addHandler(logging.StreamHandler())
def get_cases(queue):
url = current_app.config['CASES_URL'] + "/cases/queue/"... |
8f5f342679b7f70562423346b310437ce75ad18a | doc/ext/nova_autodoc.py | doc/ext/nova_autodoc.py | import os
from nova import utils
def setup(app):
rootdir = os.path.abspath(app.srcdir + '/..')
print "**Autodocumenting from %s" % rootdir
rv = utils.execute('cd %s && ./generate_autodoc_index.sh' % rootdir)
print rv[0]
| import gettext
import os
gettext.install('nova')
from nova import utils
def setup(app):
rootdir = os.path.abspath(app.srcdir + '/..')
print "**Autodocumenting from %s" % rootdir
rv = utils.execute('cd %s && ./generate_autodoc_index.sh' % rootdir)
print rv[0]
| Fix doc building endpoint for gettext. | Fix doc building endpoint for gettext. | Python | apache-2.0 | n0ano/gantt,n0ano/gantt | import os
from nova import utils
def setup(app):
rootdir = os.path.abspath(app.srcdir + '/..')
print "**Autodocumenting from %s" % rootdir
rv = utils.execute('cd %s && ./generate_autodoc_index.sh' % rootdir)
print rv[0]
Fix doc building endpoint for gettext. | import gettext
import os
gettext.install('nova')
from nova import utils
def setup(app):
rootdir = os.path.abspath(app.srcdir + '/..')
print "**Autodocumenting from %s" % rootdir
rv = utils.execute('cd %s && ./generate_autodoc_index.sh' % rootdir)
print rv[0]
| <commit_before>import os
from nova import utils
def setup(app):
rootdir = os.path.abspath(app.srcdir + '/..')
print "**Autodocumenting from %s" % rootdir
rv = utils.execute('cd %s && ./generate_autodoc_index.sh' % rootdir)
print rv[0]
<commit_msg>Fix doc building endpoint for gettext.<commit_after> | import gettext
import os
gettext.install('nova')
from nova import utils
def setup(app):
rootdir = os.path.abspath(app.srcdir + '/..')
print "**Autodocumenting from %s" % rootdir
rv = utils.execute('cd %s && ./generate_autodoc_index.sh' % rootdir)
print rv[0]
| import os
from nova import utils
def setup(app):
rootdir = os.path.abspath(app.srcdir + '/..')
print "**Autodocumenting from %s" % rootdir
rv = utils.execute('cd %s && ./generate_autodoc_index.sh' % rootdir)
print rv[0]
Fix doc building endpoint for gettext.import gettext
import os
gettext.install('n... | <commit_before>import os
from nova import utils
def setup(app):
rootdir = os.path.abspath(app.srcdir + '/..')
print "**Autodocumenting from %s" % rootdir
rv = utils.execute('cd %s && ./generate_autodoc_index.sh' % rootdir)
print rv[0]
<commit_msg>Fix doc building endpoint for gettext.<commit_after>imp... |
e1c8b1c5174df9b55c0d77dad7289dac7ea1b9e2 | builder/__init__.py | builder/__init__.py | # The default stack user name and password...
#
# Someday make this better?
DEF_USER, DEF_PW = ('stack', 'stack')
| from builder.roles import Roles
# The default stack user name and password...
#
# Someday make this better?
DEF_USER, DEF_PW = ('stack', 'stack')
DEF_SETTINGS = {
# We can't seem to alter this one more than once,
# so just leave it as is... todo fix this and make it so that
# we reset it...
'DATABASE_... | Move various useful constants to this file | Move various useful constants to this file
| Python | apache-2.0 | harlowja/multi-devstack,harlowja/multi-devstack | # The default stack user name and password...
#
# Someday make this better?
DEF_USER, DEF_PW = ('stack', 'stack')
Move various useful constants to this file | from builder.roles import Roles
# The default stack user name and password...
#
# Someday make this better?
DEF_USER, DEF_PW = ('stack', 'stack')
DEF_SETTINGS = {
# We can't seem to alter this one more than once,
# so just leave it as is... todo fix this and make it so that
# we reset it...
'DATABASE_... | <commit_before># The default stack user name and password...
#
# Someday make this better?
DEF_USER, DEF_PW = ('stack', 'stack')
<commit_msg>Move various useful constants to this file<commit_after> | from builder.roles import Roles
# The default stack user name and password...
#
# Someday make this better?
DEF_USER, DEF_PW = ('stack', 'stack')
DEF_SETTINGS = {
# We can't seem to alter this one more than once,
# so just leave it as is... todo fix this and make it so that
# we reset it...
'DATABASE_... | # The default stack user name and password...
#
# Someday make this better?
DEF_USER, DEF_PW = ('stack', 'stack')
Move various useful constants to this filefrom builder.roles import Roles
# The default stack user name and password...
#
# Someday make this better?
DEF_USER, DEF_PW = ('stack', 'stack')
DEF_SETTINGS = {... | <commit_before># The default stack user name and password...
#
# Someday make this better?
DEF_USER, DEF_PW = ('stack', 'stack')
<commit_msg>Move various useful constants to this file<commit_after>from builder.roles import Roles
# The default stack user name and password...
#
# Someday make this better?
DEF_USER, DEF_... |
552d1c02a46d70de92f4af4c77ce60f87d8811cc | mp3-formatter/rename_mp3.py | mp3-formatter/rename_mp3.py | #!/usr/bin/python3
import ID3
import os
import sys
mp3_extension = ".mp3"
names = ["final_name_1", "final_name_2", "final_name_3"]
files_all = os.listdir('.')
files = []
for f in files_all:
# Prune directories
if not os.path.isfile(f):
continue
# Prune non-MP3 files
filename, extension = o... | #!/usr/bin/python3
import ID3
import os
import sys
def read_tracklist():
tracklist = []
for line in sys.stdin:
tracklist.append(line)
return tracklist
tracklist = read_tracklist()
mp3_extension = ".mp3"
files_all = os.listdir('.')
files = []
for f in files_all:
# Prune directories
if n... | Replace hardcoded names with tracklist | MP3: Replace hardcoded names with tracklist
| Python | mit | jleung51/scripts,jleung51/scripts,jleung51/scripts | #!/usr/bin/python3
import ID3
import os
import sys
mp3_extension = ".mp3"
names = ["final_name_1", "final_name_2", "final_name_3"]
files_all = os.listdir('.')
files = []
for f in files_all:
# Prune directories
if not os.path.isfile(f):
continue
# Prune non-MP3 files
filename, extension = o... | #!/usr/bin/python3
import ID3
import os
import sys
def read_tracklist():
tracklist = []
for line in sys.stdin:
tracklist.append(line)
return tracklist
tracklist = read_tracklist()
mp3_extension = ".mp3"
files_all = os.listdir('.')
files = []
for f in files_all:
# Prune directories
if n... | <commit_before>#!/usr/bin/python3
import ID3
import os
import sys
mp3_extension = ".mp3"
names = ["final_name_1", "final_name_2", "final_name_3"]
files_all = os.listdir('.')
files = []
for f in files_all:
# Prune directories
if not os.path.isfile(f):
continue
# Prune non-MP3 files
filename... | #!/usr/bin/python3
import ID3
import os
import sys
def read_tracklist():
tracklist = []
for line in sys.stdin:
tracklist.append(line)
return tracklist
tracklist = read_tracklist()
mp3_extension = ".mp3"
files_all = os.listdir('.')
files = []
for f in files_all:
# Prune directories
if n... | #!/usr/bin/python3
import ID3
import os
import sys
mp3_extension = ".mp3"
names = ["final_name_1", "final_name_2", "final_name_3"]
files_all = os.listdir('.')
files = []
for f in files_all:
# Prune directories
if not os.path.isfile(f):
continue
# Prune non-MP3 files
filename, extension = o... | <commit_before>#!/usr/bin/python3
import ID3
import os
import sys
mp3_extension = ".mp3"
names = ["final_name_1", "final_name_2", "final_name_3"]
files_all = os.listdir('.')
files = []
for f in files_all:
# Prune directories
if not os.path.isfile(f):
continue
# Prune non-MP3 files
filename... |
fb3db1196a48199bc388f97f451098a530822ca7 | ecs/models.py | ecs/models.py | """Entity, Component, and System classes."""
from __future__ import print_function
from abc import ABCMeta, abstractmethod
class Entity(object):
"""Encapsulation of a GUID to use in the entity database."""
def __init__(self, guid):
""":param guid: globally unique identifier
:type guid: :class... | """Entity, Component, and System classes."""
from __future__ import print_function
from abc import ABCMeta, abstractmethod
class Entity(object):
"""Encapsulation of a GUID to use in the entity database."""
def __init__(self, guid):
""":param guid: globally unique identifier
:type guid: :class... | Remove unnecessary model docstrings, add repr. | Remove unnecessary model docstrings, add repr.
| Python | mit | seanfisk/ecs,seanfisk/ecs | """Entity, Component, and System classes."""
from __future__ import print_function
from abc import ABCMeta, abstractmethod
class Entity(object):
"""Encapsulation of a GUID to use in the entity database."""
def __init__(self, guid):
""":param guid: globally unique identifier
:type guid: :class... | """Entity, Component, and System classes."""
from __future__ import print_function
from abc import ABCMeta, abstractmethod
class Entity(object):
"""Encapsulation of a GUID to use in the entity database."""
def __init__(self, guid):
""":param guid: globally unique identifier
:type guid: :class... | <commit_before>"""Entity, Component, and System classes."""
from __future__ import print_function
from abc import ABCMeta, abstractmethod
class Entity(object):
"""Encapsulation of a GUID to use in the entity database."""
def __init__(self, guid):
""":param guid: globally unique identifier
:ty... | """Entity, Component, and System classes."""
from __future__ import print_function
from abc import ABCMeta, abstractmethod
class Entity(object):
"""Encapsulation of a GUID to use in the entity database."""
def __init__(self, guid):
""":param guid: globally unique identifier
:type guid: :class... | """Entity, Component, and System classes."""
from __future__ import print_function
from abc import ABCMeta, abstractmethod
class Entity(object):
"""Encapsulation of a GUID to use in the entity database."""
def __init__(self, guid):
""":param guid: globally unique identifier
:type guid: :class... | <commit_before>"""Entity, Component, and System classes."""
from __future__ import print_function
from abc import ABCMeta, abstractmethod
class Entity(object):
"""Encapsulation of a GUID to use in the entity database."""
def __init__(self, guid):
""":param guid: globally unique identifier
:ty... |
1803aad79b8adfe3df1de7f7a4facee0c79f1d57 | test/__init__.py | test/__init__.py | """
MongoAlchemy tests package.
There's a bunch of tests here, man.
"""
from util import get_session
def setup():
"""
Destroy the whole damn database before running tests! WOO!
We would do this afterwards, but sometimes you might need to do a
post-mortem on the state of the database.
"""
... | Create test.setup() to tear down the database before starting tests. | Create test.setup() to tear down the database before starting tests.
| Python | mit | shakefu/MongoAlchemy,shakefu/MongoAlchemy,shakefu/MongoAlchemy | Create test.setup() to tear down the database before starting tests. | """
MongoAlchemy tests package.
There's a bunch of tests here, man.
"""
from util import get_session
def setup():
"""
Destroy the whole damn database before running tests! WOO!
We would do this afterwards, but sometimes you might need to do a
post-mortem on the state of the database.
"""
... | <commit_before><commit_msg>Create test.setup() to tear down the database before starting tests.<commit_after> | """
MongoAlchemy tests package.
There's a bunch of tests here, man.
"""
from util import get_session
def setup():
"""
Destroy the whole damn database before running tests! WOO!
We would do this afterwards, but sometimes you might need to do a
post-mortem on the state of the database.
"""
... | Create test.setup() to tear down the database before starting tests."""
MongoAlchemy tests package.
There's a bunch of tests here, man.
"""
from util import get_session
def setup():
"""
Destroy the whole damn database before running tests! WOO!
We would do this afterwards, but sometimes you might need... | <commit_before><commit_msg>Create test.setup() to tear down the database before starting tests.<commit_after>"""
MongoAlchemy tests package.
There's a bunch of tests here, man.
"""
from util import get_session
def setup():
"""
Destroy the whole damn database before running tests! WOO!
We would do this... | |
761d74c25fc54cba0c160380d17ab0ca14838dc9 | helpers/suggestions/match_suggestion_accepter.py | helpers/suggestions/match_suggestion_accepter.py | from helpers.match_manipulator import MatchManipulator
from models.match import Match
class MatchSuggestionAccepter(object):
"""
Handle accepting Match suggestions.
"""
@classmethod
def accept_suggestions(self, suggestions):
matches = map(lambda match_future: match_future.get_result(),... | from helpers.match_manipulator import MatchManipulator
from models.match import Match
class MatchSuggestionAccepter(object):
"""
Handle accepting Match suggestions.
"""
@classmethod
def accept_suggestions(self, suggestions):
if (len(suggestions) < 1):
return None
m... | Fix problem when not accepting any suggestions. | Fix problem when not accepting any suggestions.
| Python | mit | the-blue-alliance/the-blue-alliance,josephbisch/the-blue-alliance,josephbisch/the-blue-alliance,the-blue-alliance/the-blue-alliance,nwalters512/the-blue-alliance,tsteward/the-blue-alliance,nwalters512/the-blue-alliance,bdaroz/the-blue-alliance,bdaroz/the-blue-alliance,synth3tk/the-blue-alliance,verycumbersome/the-blue-... | from helpers.match_manipulator import MatchManipulator
from models.match import Match
class MatchSuggestionAccepter(object):
"""
Handle accepting Match suggestions.
"""
@classmethod
def accept_suggestions(self, suggestions):
matches = map(lambda match_future: match_future.get_result(),... | from helpers.match_manipulator import MatchManipulator
from models.match import Match
class MatchSuggestionAccepter(object):
"""
Handle accepting Match suggestions.
"""
@classmethod
def accept_suggestions(self, suggestions):
if (len(suggestions) < 1):
return None
m... | <commit_before>from helpers.match_manipulator import MatchManipulator
from models.match import Match
class MatchSuggestionAccepter(object):
"""
Handle accepting Match suggestions.
"""
@classmethod
def accept_suggestions(self, suggestions):
matches = map(lambda match_future: match_futur... | from helpers.match_manipulator import MatchManipulator
from models.match import Match
class MatchSuggestionAccepter(object):
"""
Handle accepting Match suggestions.
"""
@classmethod
def accept_suggestions(self, suggestions):
if (len(suggestions) < 1):
return None
m... | from helpers.match_manipulator import MatchManipulator
from models.match import Match
class MatchSuggestionAccepter(object):
"""
Handle accepting Match suggestions.
"""
@classmethod
def accept_suggestions(self, suggestions):
matches = map(lambda match_future: match_future.get_result(),... | <commit_before>from helpers.match_manipulator import MatchManipulator
from models.match import Match
class MatchSuggestionAccepter(object):
"""
Handle accepting Match suggestions.
"""
@classmethod
def accept_suggestions(self, suggestions):
matches = map(lambda match_future: match_futur... |
e513e41dd10df009a3db7641774db1acba60a301 | tensormate/graph/__init__.py | tensormate/graph/__init__.py | from tensormate.graph.base import *
from tensormate.graph.data_pipeline import *
| from tensormate.graph.base import *
from tensormate.graph.data_pipeline import *
from tensormate.graph.image_graph import *
| Add an access from graph | Add an access from graph
| Python | apache-2.0 | songgc/tensormate | from tensormate.graph.base import *
from tensormate.graph.data_pipeline import *
Add an access from graph | from tensormate.graph.base import *
from tensormate.graph.data_pipeline import *
from tensormate.graph.image_graph import *
| <commit_before>from tensormate.graph.base import *
from tensormate.graph.data_pipeline import *
<commit_msg>Add an access from graph<commit_after> | from tensormate.graph.base import *
from tensormate.graph.data_pipeline import *
from tensormate.graph.image_graph import *
| from tensormate.graph.base import *
from tensormate.graph.data_pipeline import *
Add an access from graphfrom tensormate.graph.base import *
from tensormate.graph.data_pipeline import *
from tensormate.graph.image_graph import *
| <commit_before>from tensormate.graph.base import *
from tensormate.graph.data_pipeline import *
<commit_msg>Add an access from graph<commit_after>from tensormate.graph.base import *
from tensormate.graph.data_pipeline import *
from tensormate.graph.image_graph import *
|
ab342b6a90c34abbfc49c72a9f72251d238589b3 | git_helper.py | git_helper.py | import os
def git_file_path(view, git_path):
if not git_path:
return False
full_file_path = view.file_name()
git_path_to_file = full_file_path.replace(git_path,'')
if git_path_to_file[0] == "/":
git_path_to_file = git_path_to_file[1:]
return git_path_to_file
def git_root(directory):
if os.... | import os
def git_file_path(view, git_path):
if not git_path:
return False
full_file_path = os.path.realpath(view.file_name())
git_path_to_file = full_file_path.replace(git_path,'')
if git_path_to_file[0] == "/":
git_path_to_file = git_path_to_file[1:]
return git_path_to_file
def git_root(direct... | Resolve symbolic links for filename in Sublime view - without this all files available through symlinks are considered as new to git | Resolve symbolic links for filename in Sublime view - without this all files available through symlinks are considered as new to git
| Python | mit | robfrawley/sublime-git-gutter,jisaacks/GitGutter,robfrawley/sublime-git-gutter,akpersad/GitGutter,ariofrio/VcsGutter,natecavanaugh/GitGutter,biodamasceno/GitGutter,tushortz/GitGutter,michaelhogg/GitGutter,bradsokol/VcsGutter,tushortz/GitGutter,michaelhogg/GitGutter,natecavanaugh/GitGutter,akpersad/GitGutter,robfrawley/... | import os
def git_file_path(view, git_path):
if not git_path:
return False
full_file_path = view.file_name()
git_path_to_file = full_file_path.replace(git_path,'')
if git_path_to_file[0] == "/":
git_path_to_file = git_path_to_file[1:]
return git_path_to_file
def git_root(directory):
if os.... | import os
def git_file_path(view, git_path):
if not git_path:
return False
full_file_path = os.path.realpath(view.file_name())
git_path_to_file = full_file_path.replace(git_path,'')
if git_path_to_file[0] == "/":
git_path_to_file = git_path_to_file[1:]
return git_path_to_file
def git_root(direct... | <commit_before>import os
def git_file_path(view, git_path):
if not git_path:
return False
full_file_path = view.file_name()
git_path_to_file = full_file_path.replace(git_path,'')
if git_path_to_file[0] == "/":
git_path_to_file = git_path_to_file[1:]
return git_path_to_file
def git_root(direc... | import os
def git_file_path(view, git_path):
if not git_path:
return False
full_file_path = os.path.realpath(view.file_name())
git_path_to_file = full_file_path.replace(git_path,'')
if git_path_to_file[0] == "/":
git_path_to_file = git_path_to_file[1:]
return git_path_to_file
def git_root(direct... | import os
def git_file_path(view, git_path):
if not git_path:
return False
full_file_path = view.file_name()
git_path_to_file = full_file_path.replace(git_path,'')
if git_path_to_file[0] == "/":
git_path_to_file = git_path_to_file[1:]
return git_path_to_file
def git_root(directory):
if os.... | <commit_before>import os
def git_file_path(view, git_path):
if not git_path:
return False
full_file_path = view.file_name()
git_path_to_file = full_file_path.replace(git_path,'')
if git_path_to_file[0] == "/":
git_path_to_file = git_path_to_file[1:]
return git_path_to_file
def git_root(direc... |
7b8fc55b9c27b3001709b65b373b37394a9b332e | capstone/player/monte_carlo.py | capstone/player/monte_carlo.py | import random
from collections import defaultdict, Counter
from . import Player
from ..util import utility
class MonteCarlo(Player):
name = 'MonteCarlo'
def __init__(self, n_sims=100):
self.n_sims = n_sims
def __repr__(self):
return type(self).name
def __str__(self):
re... | import random
from collections import defaultdict, Counter
from . import Player
from ..util import utility
class MonteCarlo(Player):
name = 'MonteCarlo'
def __init__(self, n_sims=1000):
self.n_sims = n_sims
def __repr__(self):
return type(self).name
def __str__(self):
r... | Increase default MonteCarlo n_sims from 100 to 1000 | Increase default MonteCarlo n_sims from 100 to 1000
| Python | mit | davidrobles/mlnd-capstone-code | import random
from collections import defaultdict, Counter
from . import Player
from ..util import utility
class MonteCarlo(Player):
name = 'MonteCarlo'
def __init__(self, n_sims=100):
self.n_sims = n_sims
def __repr__(self):
return type(self).name
def __str__(self):
re... | import random
from collections import defaultdict, Counter
from . import Player
from ..util import utility
class MonteCarlo(Player):
name = 'MonteCarlo'
def __init__(self, n_sims=1000):
self.n_sims = n_sims
def __repr__(self):
return type(self).name
def __str__(self):
r... | <commit_before>import random
from collections import defaultdict, Counter
from . import Player
from ..util import utility
class MonteCarlo(Player):
name = 'MonteCarlo'
def __init__(self, n_sims=100):
self.n_sims = n_sims
def __repr__(self):
return type(self).name
def __str__(se... | import random
from collections import defaultdict, Counter
from . import Player
from ..util import utility
class MonteCarlo(Player):
name = 'MonteCarlo'
def __init__(self, n_sims=1000):
self.n_sims = n_sims
def __repr__(self):
return type(self).name
def __str__(self):
r... | import random
from collections import defaultdict, Counter
from . import Player
from ..util import utility
class MonteCarlo(Player):
name = 'MonteCarlo'
def __init__(self, n_sims=100):
self.n_sims = n_sims
def __repr__(self):
return type(self).name
def __str__(self):
re... | <commit_before>import random
from collections import defaultdict, Counter
from . import Player
from ..util import utility
class MonteCarlo(Player):
name = 'MonteCarlo'
def __init__(self, n_sims=100):
self.n_sims = n_sims
def __repr__(self):
return type(self).name
def __str__(se... |
5d5e9ff082eb6f277270045618812c4b2c49daab | 31-trinity/tf-31.py | 31-trinity/tf-31.py | #!/usr/bin/env python
import sys, re, operator, collections
#
# Model
#
class WordFrequenciesModel:
""" Models the data. In this case, we're only interested
in words and their frequencies as an end result """
freqs = {}
def __init__(self, path_to_file):
stopwords = set(open('../stop_words.txt... | #!/usr/bin/env python
import sys, re, operator, collections
class WordFrequenciesModel:
""" Models the data. In this case, we're only interested
in words and their frequencies as an end result """
freqs = {}
def __init__(self, path_to_file):
self.update(path_to_file)
def update(self, path... | Make the mvc example interactive | Make the mvc example interactive
| Python | mit | alex-quiterio/exercises-in-programming-style,alex-quiterio/exercises-in-programming-style,alex-quiterio/exercises-in-programming-style,alex-quiterio/exercises-in-programming-style,alex-quiterio/exercises-in-programming-style | #!/usr/bin/env python
import sys, re, operator, collections
#
# Model
#
class WordFrequenciesModel:
""" Models the data. In this case, we're only interested
in words and their frequencies as an end result """
freqs = {}
def __init__(self, path_to_file):
stopwords = set(open('../stop_words.txt... | #!/usr/bin/env python
import sys, re, operator, collections
class WordFrequenciesModel:
""" Models the data. In this case, we're only interested
in words and their frequencies as an end result """
freqs = {}
def __init__(self, path_to_file):
self.update(path_to_file)
def update(self, path... | <commit_before>#!/usr/bin/env python
import sys, re, operator, collections
#
# Model
#
class WordFrequenciesModel:
""" Models the data. In this case, we're only interested
in words and their frequencies as an end result """
freqs = {}
def __init__(self, path_to_file):
stopwords = set(open('..... | #!/usr/bin/env python
import sys, re, operator, collections
class WordFrequenciesModel:
""" Models the data. In this case, we're only interested
in words and their frequencies as an end result """
freqs = {}
def __init__(self, path_to_file):
self.update(path_to_file)
def update(self, path... | #!/usr/bin/env python
import sys, re, operator, collections
#
# Model
#
class WordFrequenciesModel:
""" Models the data. In this case, we're only interested
in words and their frequencies as an end result """
freqs = {}
def __init__(self, path_to_file):
stopwords = set(open('../stop_words.txt... | <commit_before>#!/usr/bin/env python
import sys, re, operator, collections
#
# Model
#
class WordFrequenciesModel:
""" Models the data. In this case, we're only interested
in words and their frequencies as an end result """
freqs = {}
def __init__(self, path_to_file):
stopwords = set(open('..... |
78e6aa845fac79d8b0d015840897db1fef5f06d0 | polygon2geojson.py | polygon2geojson.py | import argparse
import os
import fiona
from shapely.geometry import Polygon, mapping
def remove_file(file_name):
try:
os.remove(file_name)
except OSError:
pass
def read_polygon(polygon_filename):
with open(polygon_filename) as f:
return f.readlines()
def clean_poylgon(polygon_d... | import argparse
import os
import fiona
from shapely.geometry import Polygon, mapping
def remove_file(file_name):
try:
os.remove(file_name)
except OSError:
pass
def read_polygon(polygon_filename):
with open(polygon_filename) as f:
return f.readlines()
def clean_poylgon(polygon_d... | Use output name from input name | Use output name from input name
| Python | unlicense | ustroetz/polygon2osm | import argparse
import os
import fiona
from shapely.geometry import Polygon, mapping
def remove_file(file_name):
try:
os.remove(file_name)
except OSError:
pass
def read_polygon(polygon_filename):
with open(polygon_filename) as f:
return f.readlines()
def clean_poylgon(polygon_d... | import argparse
import os
import fiona
from shapely.geometry import Polygon, mapping
def remove_file(file_name):
try:
os.remove(file_name)
except OSError:
pass
def read_polygon(polygon_filename):
with open(polygon_filename) as f:
return f.readlines()
def clean_poylgon(polygon_d... | <commit_before>import argparse
import os
import fiona
from shapely.geometry import Polygon, mapping
def remove_file(file_name):
try:
os.remove(file_name)
except OSError:
pass
def read_polygon(polygon_filename):
with open(polygon_filename) as f:
return f.readlines()
def clean_po... | import argparse
import os
import fiona
from shapely.geometry import Polygon, mapping
def remove_file(file_name):
try:
os.remove(file_name)
except OSError:
pass
def read_polygon(polygon_filename):
with open(polygon_filename) as f:
return f.readlines()
def clean_poylgon(polygon_d... | import argparse
import os
import fiona
from shapely.geometry import Polygon, mapping
def remove_file(file_name):
try:
os.remove(file_name)
except OSError:
pass
def read_polygon(polygon_filename):
with open(polygon_filename) as f:
return f.readlines()
def clean_poylgon(polygon_d... | <commit_before>import argparse
import os
import fiona
from shapely.geometry import Polygon, mapping
def remove_file(file_name):
try:
os.remove(file_name)
except OSError:
pass
def read_polygon(polygon_filename):
with open(polygon_filename) as f:
return f.readlines()
def clean_po... |
2b7da7ba1ae2eac069762c221c279aa9f204775d | praw/exceptions.py | praw/exceptions.py | """PRAW exception classes.
Includes two main exceptions: :class:`.APIException` for when something goes
wrong on the server side, and :class:`.ClientException` when something goes
wrong on the client side. Both of these classes extend :class:`.PRAWException`.
"""
class PRAWException(Exception):
"""The base PRAW... | """PRAW exception classes.
Includes two main exceptions: :class:`.APIException` for when something goes
wrong on the server side, and :class:`.ClientException` when something goes
wrong on the client side. Both of these classes extend :class:`.PRAWException`.
"""
class PRAWException(Exception):
"""The base PRAW... | Fix a few Sphinx typos | Fix a few Sphinx typos
* `.. note:` -> `.. note::` to prevent the `note` from being interpreted as a comment, which wouldn't show up when the docs are rendered.
* Double backticks for the code bits.
* Correct typo ("atribute" -> "attribute").
* Sphinx doesn't like characters immediately after the backticks, so add ... | Python | bsd-2-clause | gschizas/praw,praw-dev/praw,13steinj/praw,leviroth/praw,gschizas/praw,praw-dev/praw,13steinj/praw,leviroth/praw | """PRAW exception classes.
Includes two main exceptions: :class:`.APIException` for when something goes
wrong on the server side, and :class:`.ClientException` when something goes
wrong on the client side. Both of these classes extend :class:`.PRAWException`.
"""
class PRAWException(Exception):
"""The base PRAW... | """PRAW exception classes.
Includes two main exceptions: :class:`.APIException` for when something goes
wrong on the server side, and :class:`.ClientException` when something goes
wrong on the client side. Both of these classes extend :class:`.PRAWException`.
"""
class PRAWException(Exception):
"""The base PRAW... | <commit_before>"""PRAW exception classes.
Includes two main exceptions: :class:`.APIException` for when something goes
wrong on the server side, and :class:`.ClientException` when something goes
wrong on the client side. Both of these classes extend :class:`.PRAWException`.
"""
class PRAWException(Exception):
"... | """PRAW exception classes.
Includes two main exceptions: :class:`.APIException` for when something goes
wrong on the server side, and :class:`.ClientException` when something goes
wrong on the client side. Both of these classes extend :class:`.PRAWException`.
"""
class PRAWException(Exception):
"""The base PRAW... | """PRAW exception classes.
Includes two main exceptions: :class:`.APIException` for when something goes
wrong on the server side, and :class:`.ClientException` when something goes
wrong on the client side. Both of these classes extend :class:`.PRAWException`.
"""
class PRAWException(Exception):
"""The base PRAW... | <commit_before>"""PRAW exception classes.
Includes two main exceptions: :class:`.APIException` for when something goes
wrong on the server side, and :class:`.ClientException` when something goes
wrong on the client side. Both of these classes extend :class:`.PRAWException`.
"""
class PRAWException(Exception):
"... |
c19b161442484e1ad58ac5bb1abc074be9e5ac7f | test/testproject/settings.py | test/testproject/settings.py | import os
DEBUG = True
DATABASE_ENGINE = 'sqlite3'
DATABASE_NAME = os.path.join(os.path.dirname(__file__), 'test.db')
ROOT_URLCONF = 'testproject.urls'
TEMPLATE_DIRS = (
os.path.join(os.path.dirname(__file__), 'templates'),
)
INSTALLED_APPS = (
'django.contrib.auth',
'django.contrib.sessions',
'dja... |
import os
DEBUG = True
# Django 1.2 up
DATABASE_ENGINE = 'django.db.backends.sqlite3'
DATABASE_NAME = os.path.join(os.path.dirname(__file__), 'test.db')
# Django 1.1 and 1.0
DATABASES = {
'default': {
'ENGINE': DATABASE_ENGINE,
'NAME': DATABASE_NAME
}
}
ROOT_URLCONF = 'testproject.urls'
T... | Fix deprecation warning when running tests with Django 1.3. | Fix deprecation warning when running tests with Django 1.3.
| Python | bsd-3-clause | mila/django-urldecorators,mila/django-urldecorators | import os
DEBUG = True
DATABASE_ENGINE = 'sqlite3'
DATABASE_NAME = os.path.join(os.path.dirname(__file__), 'test.db')
ROOT_URLCONF = 'testproject.urls'
TEMPLATE_DIRS = (
os.path.join(os.path.dirname(__file__), 'templates'),
)
INSTALLED_APPS = (
'django.contrib.auth',
'django.contrib.sessions',
'dja... |
import os
DEBUG = True
# Django 1.2 up
DATABASE_ENGINE = 'django.db.backends.sqlite3'
DATABASE_NAME = os.path.join(os.path.dirname(__file__), 'test.db')
# Django 1.1 and 1.0
DATABASES = {
'default': {
'ENGINE': DATABASE_ENGINE,
'NAME': DATABASE_NAME
}
}
ROOT_URLCONF = 'testproject.urls'
T... | <commit_before>import os
DEBUG = True
DATABASE_ENGINE = 'sqlite3'
DATABASE_NAME = os.path.join(os.path.dirname(__file__), 'test.db')
ROOT_URLCONF = 'testproject.urls'
TEMPLATE_DIRS = (
os.path.join(os.path.dirname(__file__), 'templates'),
)
INSTALLED_APPS = (
'django.contrib.auth',
'django.contrib.sess... |
import os
DEBUG = True
# Django 1.2 up
DATABASE_ENGINE = 'django.db.backends.sqlite3'
DATABASE_NAME = os.path.join(os.path.dirname(__file__), 'test.db')
# Django 1.1 and 1.0
DATABASES = {
'default': {
'ENGINE': DATABASE_ENGINE,
'NAME': DATABASE_NAME
}
}
ROOT_URLCONF = 'testproject.urls'
T... | import os
DEBUG = True
DATABASE_ENGINE = 'sqlite3'
DATABASE_NAME = os.path.join(os.path.dirname(__file__), 'test.db')
ROOT_URLCONF = 'testproject.urls'
TEMPLATE_DIRS = (
os.path.join(os.path.dirname(__file__), 'templates'),
)
INSTALLED_APPS = (
'django.contrib.auth',
'django.contrib.sessions',
'dja... | <commit_before>import os
DEBUG = True
DATABASE_ENGINE = 'sqlite3'
DATABASE_NAME = os.path.join(os.path.dirname(__file__), 'test.db')
ROOT_URLCONF = 'testproject.urls'
TEMPLATE_DIRS = (
os.path.join(os.path.dirname(__file__), 'templates'),
)
INSTALLED_APPS = (
'django.contrib.auth',
'django.contrib.sess... |
1897daadd1ea435b381c37f845545fad4becc578 | censusreporter/config/prod/settings.py | censusreporter/config/prod/settings.py | from censusreporter.config.base.settings import *
import os
DEBUG = False
ROOT_URLCONF = 'censusreporter.config.prod.urls'
WSGI_APPLICATION = "censusreporter.config.prod.wsgi.application"
ALLOWED_HOSTS = ['*']
CACHES = {
'default': {
'BACKEND': 'redis_cache.RedisCache',
'LOCATION': os.environ.get... | from censusreporter.config.base.settings import *
import os
DEBUG = False
ROOT_URLCONF = 'censusreporter.config.prod.urls'
WSGI_APPLICATION = "censusreporter.config.prod.wsgi.application"
ALLOWED_HOSTS = ['*']
CACHES = {
'default': {
'BACKEND': 'redis_cache.RedisCache',
'LOCATION': os.environ.get... | Use the same Redis DB as census-api to make stats collection easier | Use the same Redis DB as census-api to make stats collection easier
| Python | mit | censusreporter/censusreporter,censusreporter/censusreporter,censusreporter/censusreporter,censusreporter/censusreporter | from censusreporter.config.base.settings import *
import os
DEBUG = False
ROOT_URLCONF = 'censusreporter.config.prod.urls'
WSGI_APPLICATION = "censusreporter.config.prod.wsgi.application"
ALLOWED_HOSTS = ['*']
CACHES = {
'default': {
'BACKEND': 'redis_cache.RedisCache',
'LOCATION': os.environ.get... | from censusreporter.config.base.settings import *
import os
DEBUG = False
ROOT_URLCONF = 'censusreporter.config.prod.urls'
WSGI_APPLICATION = "censusreporter.config.prod.wsgi.application"
ALLOWED_HOSTS = ['*']
CACHES = {
'default': {
'BACKEND': 'redis_cache.RedisCache',
'LOCATION': os.environ.get... | <commit_before>from censusreporter.config.base.settings import *
import os
DEBUG = False
ROOT_URLCONF = 'censusreporter.config.prod.urls'
WSGI_APPLICATION = "censusreporter.config.prod.wsgi.application"
ALLOWED_HOSTS = ['*']
CACHES = {
'default': {
'BACKEND': 'redis_cache.RedisCache',
'LOCATION':... | from censusreporter.config.base.settings import *
import os
DEBUG = False
ROOT_URLCONF = 'censusreporter.config.prod.urls'
WSGI_APPLICATION = "censusreporter.config.prod.wsgi.application"
ALLOWED_HOSTS = ['*']
CACHES = {
'default': {
'BACKEND': 'redis_cache.RedisCache',
'LOCATION': os.environ.get... | from censusreporter.config.base.settings import *
import os
DEBUG = False
ROOT_URLCONF = 'censusreporter.config.prod.urls'
WSGI_APPLICATION = "censusreporter.config.prod.wsgi.application"
ALLOWED_HOSTS = ['*']
CACHES = {
'default': {
'BACKEND': 'redis_cache.RedisCache',
'LOCATION': os.environ.get... | <commit_before>from censusreporter.config.base.settings import *
import os
DEBUG = False
ROOT_URLCONF = 'censusreporter.config.prod.urls'
WSGI_APPLICATION = "censusreporter.config.prod.wsgi.application"
ALLOWED_HOSTS = ['*']
CACHES = {
'default': {
'BACKEND': 'redis_cache.RedisCache',
'LOCATION':... |
ca1b92118d0c432484b3ac7f59924a1a65a59e17 | irco/utils.py | irco/utils.py | import os
import glob
from irco import parser, tabular
def get_file_list(sources):
for source in sources:
if os.path.isdir(source):
for path in glob.glob(os.path.join(source, '*.txt')):
yield path
elif os.path.isfile(source):
yield source
def get_dataset(... | import os
from irco import parser, tabular
def get_file_list(sources):
for source in sources:
if os.path.isdir(source):
for path in sorted(os.listdir(source)):
_, ext = os.path.splitext(path)
if ext not in ('.txt', '.csv', '.tsv'):
continue
... | Support recursive import of CSV and TSV files as well as TXT ones. | Support recursive import of CSV and TSV files as well as TXT ones.
| Python | mit | GaretJax/irco,GaretJax/irco,GaretJax/irco,GaretJax/irco | import os
import glob
from irco import parser, tabular
def get_file_list(sources):
for source in sources:
if os.path.isdir(source):
for path in glob.glob(os.path.join(source, '*.txt')):
yield path
elif os.path.isfile(source):
yield source
def get_dataset(... | import os
from irco import parser, tabular
def get_file_list(sources):
for source in sources:
if os.path.isdir(source):
for path in sorted(os.listdir(source)):
_, ext = os.path.splitext(path)
if ext not in ('.txt', '.csv', '.tsv'):
continue
... | <commit_before>import os
import glob
from irco import parser, tabular
def get_file_list(sources):
for source in sources:
if os.path.isdir(source):
for path in glob.glob(os.path.join(source, '*.txt')):
yield path
elif os.path.isfile(source):
yield source
d... | import os
from irco import parser, tabular
def get_file_list(sources):
for source in sources:
if os.path.isdir(source):
for path in sorted(os.listdir(source)):
_, ext = os.path.splitext(path)
if ext not in ('.txt', '.csv', '.tsv'):
continue
... | import os
import glob
from irco import parser, tabular
def get_file_list(sources):
for source in sources:
if os.path.isdir(source):
for path in glob.glob(os.path.join(source, '*.txt')):
yield path
elif os.path.isfile(source):
yield source
def get_dataset(... | <commit_before>import os
import glob
from irco import parser, tabular
def get_file_list(sources):
for source in sources:
if os.path.isdir(source):
for path in glob.glob(os.path.join(source, '*.txt')):
yield path
elif os.path.isfile(source):
yield source
d... |
bc6392560ea87c74d6c6a94812b6caba7d6c2954 | django_elect/settings.py | django_elect/settings.py | from django.conf import settings
"""
A string that corresponds to the path to the model that should be used for
the Election.allowed_voters and Vote.account foreign keys. This is mainly for
sites that extend the User model via inheritance, as detailed at
http://scottbarnham.com/blog/2008/08/21/extending-the-django-us... | from django.conf import settings
"""
A string that corresponds to the path to the model that should be used for
the Election.allowed_voters and Vote.account foreign keys. This is mainly for
sites that extend the User model via inheritance, as detailed at
http://scottbarnham.com/blog/2008/08/21/extending-the-django-us... | Change DJANGO_ELECT_USER_MODEL to default to AUTH_USER_MODEL | Change DJANGO_ELECT_USER_MODEL to default to AUTH_USER_MODEL
| Python | bsd-3-clause | MasonM/django-elect,MasonM/django-elect,MasonM/django-elect | from django.conf import settings
"""
A string that corresponds to the path to the model that should be used for
the Election.allowed_voters and Vote.account foreign keys. This is mainly for
sites that extend the User model via inheritance, as detailed at
http://scottbarnham.com/blog/2008/08/21/extending-the-django-us... | from django.conf import settings
"""
A string that corresponds to the path to the model that should be used for
the Election.allowed_voters and Vote.account foreign keys. This is mainly for
sites that extend the User model via inheritance, as detailed at
http://scottbarnham.com/blog/2008/08/21/extending-the-django-us... | <commit_before>from django.conf import settings
"""
A string that corresponds to the path to the model that should be used for
the Election.allowed_voters and Vote.account foreign keys. This is mainly for
sites that extend the User model via inheritance, as detailed at
http://scottbarnham.com/blog/2008/08/21/extendin... | from django.conf import settings
"""
A string that corresponds to the path to the model that should be used for
the Election.allowed_voters and Vote.account foreign keys. This is mainly for
sites that extend the User model via inheritance, as detailed at
http://scottbarnham.com/blog/2008/08/21/extending-the-django-us... | from django.conf import settings
"""
A string that corresponds to the path to the model that should be used for
the Election.allowed_voters and Vote.account foreign keys. This is mainly for
sites that extend the User model via inheritance, as detailed at
http://scottbarnham.com/blog/2008/08/21/extending-the-django-us... | <commit_before>from django.conf import settings
"""
A string that corresponds to the path to the model that should be used for
the Election.allowed_voters and Vote.account foreign keys. This is mainly for
sites that extend the User model via inheritance, as detailed at
http://scottbarnham.com/blog/2008/08/21/extendin... |
dcaf7b95264c0d8678bc36e47a14fa6f15175e40 | pylearn2/tests/test_dbm_metrics.py | pylearn2/tests/test_dbm_metrics.py | """
Test dbm_metrics script
"""
from pylearn2.scripts.dbm import dbm_metrics
from pylearn2.datasets.mnist import MNIST
def test_ais():
"""
Test ais computation
"""
w_list = [None]
b_list = []
# Add parameters import
trainset = MNIST(which_set='train')
testset = MNIST(which_set='test')... | """
Test dbm_metrics script
"""
from pylearn2.scripts.dbm import dbm_metrics
from pylearn2.datasets.mnist import MNIST
def test_ais():
"""
Test ais computation by comparing the output of estimate_likelihood to
Russ's code's output for the same parameters.
"""
w_list = [None]
b_list = []
# ... | Add more info to test_ais docstring | Add more info to test_ais docstring
| Python | bsd-3-clause | woozzu/pylearn2,JesseLivezey/plankton,fulmicoton/pylearn2,caidongyun/pylearn2,sandeepkbhat/pylearn2,cosmoharrigan/pylearn2,mkraemer67/pylearn2,ddboline/pylearn2,kastnerkyle/pylearn2,pkainz/pylearn2,lisa-lab/pylearn2,hantek/pylearn2,bartvm/pylearn2,mclaughlin6464/pylearn2,aalmah/pylearn2,fishcorn/pylearn2,fyffyt/pylearn... | """
Test dbm_metrics script
"""
from pylearn2.scripts.dbm import dbm_metrics
from pylearn2.datasets.mnist import MNIST
def test_ais():
"""
Test ais computation
"""
w_list = [None]
b_list = []
# Add parameters import
trainset = MNIST(which_set='train')
testset = MNIST(which_set='test')... | """
Test dbm_metrics script
"""
from pylearn2.scripts.dbm import dbm_metrics
from pylearn2.datasets.mnist import MNIST
def test_ais():
"""
Test ais computation by comparing the output of estimate_likelihood to
Russ's code's output for the same parameters.
"""
w_list = [None]
b_list = []
# ... | <commit_before>"""
Test dbm_metrics script
"""
from pylearn2.scripts.dbm import dbm_metrics
from pylearn2.datasets.mnist import MNIST
def test_ais():
"""
Test ais computation
"""
w_list = [None]
b_list = []
# Add parameters import
trainset = MNIST(which_set='train')
testset = MNIST(wh... | """
Test dbm_metrics script
"""
from pylearn2.scripts.dbm import dbm_metrics
from pylearn2.datasets.mnist import MNIST
def test_ais():
"""
Test ais computation by comparing the output of estimate_likelihood to
Russ's code's output for the same parameters.
"""
w_list = [None]
b_list = []
# ... | """
Test dbm_metrics script
"""
from pylearn2.scripts.dbm import dbm_metrics
from pylearn2.datasets.mnist import MNIST
def test_ais():
"""
Test ais computation
"""
w_list = [None]
b_list = []
# Add parameters import
trainset = MNIST(which_set='train')
testset = MNIST(which_set='test')... | <commit_before>"""
Test dbm_metrics script
"""
from pylearn2.scripts.dbm import dbm_metrics
from pylearn2.datasets.mnist import MNIST
def test_ais():
"""
Test ais computation
"""
w_list = [None]
b_list = []
# Add parameters import
trainset = MNIST(which_set='train')
testset = MNIST(wh... |
3225c14ed1c3d09a68d6cde8af6d83d54a6f5f76 | simple_history/__init__.py | simple_history/__init__.py | from __future__ import unicode_literals
__version__ = '1.5.1'
def register(
model, app=None, manager_name='history', records_class=None,
**records_config):
"""
Create historical model for `model` and attach history manager to `model`.
Keyword arguments:
app -- App to install historic... | from __future__ import unicode_literals
__version__ = '1.5.1'
def register(
model, app=None, manager_name='history', records_class=None,
**records_config):
"""
Create historical model for `model` and attach history manager to `model`.
Keyword arguments:
app -- App to install historic... | Change style of setting records_class default | Change style of setting records_class default
| Python | bsd-3-clause | emergence/django-simple-history,luzfcb/django-simple-history,treyhunner/django-simple-history,pombredanne/django-simple-history,pombredanne/django-simple-history,treyhunner/django-simple-history,emergence/django-simple-history,luzfcb/django-simple-history | from __future__ import unicode_literals
__version__ = '1.5.1'
def register(
model, app=None, manager_name='history', records_class=None,
**records_config):
"""
Create historical model for `model` and attach history manager to `model`.
Keyword arguments:
app -- App to install historic... | from __future__ import unicode_literals
__version__ = '1.5.1'
def register(
model, app=None, manager_name='history', records_class=None,
**records_config):
"""
Create historical model for `model` and attach history manager to `model`.
Keyword arguments:
app -- App to install historic... | <commit_before>from __future__ import unicode_literals
__version__ = '1.5.1'
def register(
model, app=None, manager_name='history', records_class=None,
**records_config):
"""
Create historical model for `model` and attach history manager to `model`.
Keyword arguments:
app -- App to i... | from __future__ import unicode_literals
__version__ = '1.5.1'
def register(
model, app=None, manager_name='history', records_class=None,
**records_config):
"""
Create historical model for `model` and attach history manager to `model`.
Keyword arguments:
app -- App to install historic... | from __future__ import unicode_literals
__version__ = '1.5.1'
def register(
model, app=None, manager_name='history', records_class=None,
**records_config):
"""
Create historical model for `model` and attach history manager to `model`.
Keyword arguments:
app -- App to install historic... | <commit_before>from __future__ import unicode_literals
__version__ = '1.5.1'
def register(
model, app=None, manager_name='history', records_class=None,
**records_config):
"""
Create historical model for `model` and attach history manager to `model`.
Keyword arguments:
app -- App to i... |
e7bbfb94aed0109ccf1609333b8990f21e5f561c | pyhpeimc/__init__.py | pyhpeimc/__init__.py | #!/usr/bin/python3
'''Copyright 2015 Hewlett Packard Enterprise Development LP
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 applica... | #!/usr/bin/env python
# -*- coding: <encoding-name> -*-
'''
Copyright 2015 Hewlett Packard Enterprise Development LP
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/... | Fix in groups.py for get_custom_views function. | Fix in groups.py for get_custom_views function.
| Python | apache-2.0 | HPNetworking/HP-Intelligent-Management-Center,netmanchris/PYHPEIMC,HPENetworking/PYHPEIMC | #!/usr/bin/python3
'''Copyright 2015 Hewlett Packard Enterprise Development LP
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 applica... | #!/usr/bin/env python
# -*- coding: <encoding-name> -*-
'''
Copyright 2015 Hewlett Packard Enterprise Development LP
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/... | <commit_before>#!/usr/bin/python3
'''Copyright 2015 Hewlett Packard Enterprise Development LP
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 requ... | #!/usr/bin/env python
# -*- coding: <encoding-name> -*-
'''
Copyright 2015 Hewlett Packard Enterprise Development LP
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/... | #!/usr/bin/python3
'''Copyright 2015 Hewlett Packard Enterprise Development LP
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 applica... | <commit_before>#!/usr/bin/python3
'''Copyright 2015 Hewlett Packard Enterprise Development LP
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 requ... |
522edf619f1bebf855f24da6f84c90b10f866745 | slack_to_habitica/views.py | slack_to_habitica/views.py | import os
import json
import requests
from django.http import HttpResponse
from django.views.decorators.csrf import csrf_exempt
@csrf_exempt
def process_slack_message(request):
send_message(
request.POST.get('user_name'),
request.POST.get('text'))
return HttpResponse()
def send... | import os
import json
import requests
from django.http import HttpResponse
from django.views.decorators.csrf import csrf_exempt
@csrf_exempt
def process_slack_message(request):
send_message(
request.POST.get('user_name'),
request.POST.get('text'))
return HttpResponse()
def send... | Use square brackets instead of angle brackets in messages, as the latter are getting stripped out | Use square brackets instead of angle brackets in messages, as the latter are getting stripped out
| Python | mit | niteshpatel/habitica-slack | import os
import json
import requests
from django.http import HttpResponse
from django.views.decorators.csrf import csrf_exempt
@csrf_exempt
def process_slack_message(request):
send_message(
request.POST.get('user_name'),
request.POST.get('text'))
return HttpResponse()
def send... | import os
import json
import requests
from django.http import HttpResponse
from django.views.decorators.csrf import csrf_exempt
@csrf_exempt
def process_slack_message(request):
send_message(
request.POST.get('user_name'),
request.POST.get('text'))
return HttpResponse()
def send... | <commit_before>import os
import json
import requests
from django.http import HttpResponse
from django.views.decorators.csrf import csrf_exempt
@csrf_exempt
def process_slack_message(request):
send_message(
request.POST.get('user_name'),
request.POST.get('text'))
return HttpResponse(... | import os
import json
import requests
from django.http import HttpResponse
from django.views.decorators.csrf import csrf_exempt
@csrf_exempt
def process_slack_message(request):
send_message(
request.POST.get('user_name'),
request.POST.get('text'))
return HttpResponse()
def send... | import os
import json
import requests
from django.http import HttpResponse
from django.views.decorators.csrf import csrf_exempt
@csrf_exempt
def process_slack_message(request):
send_message(
request.POST.get('user_name'),
request.POST.get('text'))
return HttpResponse()
def send... | <commit_before>import os
import json
import requests
from django.http import HttpResponse
from django.views.decorators.csrf import csrf_exempt
@csrf_exempt
def process_slack_message(request):
send_message(
request.POST.get('user_name'),
request.POST.get('text'))
return HttpResponse(... |
783f59a41cde3c887968920251aa34b6a59c941b | source/cytoplasm/errors.py | source/cytoplasm/errors.py | class ControllerError(StandardError): pass
class InterpreterError(StandardError): pass
| class CytoplasmError(Exception): pass
class ControllerError(CytoplasmError): pass
class InterpreterError(CytoplasmError): pass
| Use Exception instead of StandardError | Use Exception instead of StandardError
Python 3 doesn't have StandardError...
| Python | mit | startling/cytoplasm | class ControllerError(StandardError): pass
class InterpreterError(StandardError): pass
Use Exception instead of StandardError
Python 3 doesn't have StandardError... | class CytoplasmError(Exception): pass
class ControllerError(CytoplasmError): pass
class InterpreterError(CytoplasmError): pass
| <commit_before>class ControllerError(StandardError): pass
class InterpreterError(StandardError): pass
<commit_msg>Use Exception instead of StandardError
Python 3 doesn't have StandardError...<commit_after> | class CytoplasmError(Exception): pass
class ControllerError(CytoplasmError): pass
class InterpreterError(CytoplasmError): pass
| class ControllerError(StandardError): pass
class InterpreterError(StandardError): pass
Use Exception instead of StandardError
Python 3 doesn't have StandardError...class CytoplasmError(Exception): pass
class ControllerError(CytoplasmError): pass
class InterpreterError(CytoplasmError): pass
| <commit_before>class ControllerError(StandardError): pass
class InterpreterError(StandardError): pass
<commit_msg>Use Exception instead of StandardError
Python 3 doesn't have StandardError...<commit_after>class CytoplasmError(Exception): pass
class ControllerError(CytoplasmError): pass
class InterpreterError(Cytoplasm... |
f1af343bf48843c8298ef6f07227402be1f4e511 | angr/engines/soot/values/thisref.py | angr/engines/soot/values/thisref.py |
from .base import SimSootValue
from .local import SimSootValue_Local
class SimSootValue_ThisRef(SimSootValue):
__slots__ = [ 'id', 'type', 'heap_alloc_id' ]
def __init__(self, heap_alloc_id, type_):
self.id = self._create_unique_id(heap_alloc_id, type_)
self.heap_alloc_id = heap_alloc_id
... |
from .base import SimSootValue
from .local import SimSootValue_Local
class SimSootValue_ThisRef(SimSootValue):
__slots__ = [ 'id', 'type', 'heap_alloc_id' ]
def __init__(self, heap_alloc_id, type_):
self.id = self._create_unique_id(heap_alloc_id, type_)
self.heap_alloc_id = heap_alloc_id
... | Fix naming of 'this' reference | Fix naming of 'this' reference
| Python | bsd-2-clause | schieb/angr,schieb/angr,angr/angr,angr/angr,iamahuman/angr,iamahuman/angr,schieb/angr,angr/angr,iamahuman/angr |
from .base import SimSootValue
from .local import SimSootValue_Local
class SimSootValue_ThisRef(SimSootValue):
__slots__ = [ 'id', 'type', 'heap_alloc_id' ]
def __init__(self, heap_alloc_id, type_):
self.id = self._create_unique_id(heap_alloc_id, type_)
self.heap_alloc_id = heap_alloc_id
... |
from .base import SimSootValue
from .local import SimSootValue_Local
class SimSootValue_ThisRef(SimSootValue):
__slots__ = [ 'id', 'type', 'heap_alloc_id' ]
def __init__(self, heap_alloc_id, type_):
self.id = self._create_unique_id(heap_alloc_id, type_)
self.heap_alloc_id = heap_alloc_id
... | <commit_before>
from .base import SimSootValue
from .local import SimSootValue_Local
class SimSootValue_ThisRef(SimSootValue):
__slots__ = [ 'id', 'type', 'heap_alloc_id' ]
def __init__(self, heap_alloc_id, type_):
self.id = self._create_unique_id(heap_alloc_id, type_)
self.heap_alloc_id = he... |
from .base import SimSootValue
from .local import SimSootValue_Local
class SimSootValue_ThisRef(SimSootValue):
__slots__ = [ 'id', 'type', 'heap_alloc_id' ]
def __init__(self, heap_alloc_id, type_):
self.id = self._create_unique_id(heap_alloc_id, type_)
self.heap_alloc_id = heap_alloc_id
... |
from .base import SimSootValue
from .local import SimSootValue_Local
class SimSootValue_ThisRef(SimSootValue):
__slots__ = [ 'id', 'type', 'heap_alloc_id' ]
def __init__(self, heap_alloc_id, type_):
self.id = self._create_unique_id(heap_alloc_id, type_)
self.heap_alloc_id = heap_alloc_id
... | <commit_before>
from .base import SimSootValue
from .local import SimSootValue_Local
class SimSootValue_ThisRef(SimSootValue):
__slots__ = [ 'id', 'type', 'heap_alloc_id' ]
def __init__(self, heap_alloc_id, type_):
self.id = self._create_unique_id(heap_alloc_id, type_)
self.heap_alloc_id = he... |
0c753e644068439376493e4b23a1060d742770ae | tests/__main__.py | tests/__main__.py | import unittest
if __name__ == '__main__':
all_tests = unittest.TestLoader().discover('./', pattern='*_tests.py')
unittest.TextTestRunner().run(all_tests)
| import sys
import unittest
if __name__ == '__main__':
all_tests = unittest.TestLoader().discover('./', pattern='*_tests.py')
ret = unittest.TextTestRunner().run(all_tests).wasSuccessful()
sys.exit(ret)
| Fix an issue when unit tests always return 0 status. | Fix an issue when unit tests always return 0 status.
| Python | mit | sergeymironov0001/twitch-chat-bot | import unittest
if __name__ == '__main__':
all_tests = unittest.TestLoader().discover('./', pattern='*_tests.py')
unittest.TextTestRunner().run(all_tests)
Fix an issue when unit tests always return 0 status. | import sys
import unittest
if __name__ == '__main__':
all_tests = unittest.TestLoader().discover('./', pattern='*_tests.py')
ret = unittest.TextTestRunner().run(all_tests).wasSuccessful()
sys.exit(ret)
| <commit_before>import unittest
if __name__ == '__main__':
all_tests = unittest.TestLoader().discover('./', pattern='*_tests.py')
unittest.TextTestRunner().run(all_tests)
<commit_msg>Fix an issue when unit tests always return 0 status.<commit_after> | import sys
import unittest
if __name__ == '__main__':
all_tests = unittest.TestLoader().discover('./', pattern='*_tests.py')
ret = unittest.TextTestRunner().run(all_tests).wasSuccessful()
sys.exit(ret)
| import unittest
if __name__ == '__main__':
all_tests = unittest.TestLoader().discover('./', pattern='*_tests.py')
unittest.TextTestRunner().run(all_tests)
Fix an issue when unit tests always return 0 status.import sys
import unittest
if __name__ == '__main__':
all_tests = unittest.TestLoader().discover('.... | <commit_before>import unittest
if __name__ == '__main__':
all_tests = unittest.TestLoader().discover('./', pattern='*_tests.py')
unittest.TextTestRunner().run(all_tests)
<commit_msg>Fix an issue when unit tests always return 0 status.<commit_after>import sys
import unittest
if __name__ == '__main__':
all_... |
966c22d4bae270a14176ae1c7b9887eb55743612 | tests/conftest.py | tests/conftest.py | import datetime
import odin.datetimeutil
ARE_YOU_EXPERIENCED = datetime.date(1967, 5, 12)
MWT = odin.datetimeutil.FixedTimezone(-6, 'Mountain War Time')
BOOM = datetime.datetime(1945, 7, 16, 5, 29, 45, 0, MWT)
| import os
import sys
import datetime
import odin.datetimeutil
HERE = os.path.abspath(os.path.dirname(__file__))
SRC = os.path.normpath(os.path.join(HERE, "..", "src"))
sys.path.insert(0, SRC)
ARE_YOU_EXPERIENCED = datetime.date(1967, 5, 12)
MWT = odin.datetimeutil.FixedTimezone(-6, "Mountain War Time")
BOOM = datetim... | Update tests to find source path | Update tests to find source path
| Python | bsd-3-clause | python-odin/odin | import datetime
import odin.datetimeutil
ARE_YOU_EXPERIENCED = datetime.date(1967, 5, 12)
MWT = odin.datetimeutil.FixedTimezone(-6, 'Mountain War Time')
BOOM = datetime.datetime(1945, 7, 16, 5, 29, 45, 0, MWT)
Update tests to find source path | import os
import sys
import datetime
import odin.datetimeutil
HERE = os.path.abspath(os.path.dirname(__file__))
SRC = os.path.normpath(os.path.join(HERE, "..", "src"))
sys.path.insert(0, SRC)
ARE_YOU_EXPERIENCED = datetime.date(1967, 5, 12)
MWT = odin.datetimeutil.FixedTimezone(-6, "Mountain War Time")
BOOM = datetim... | <commit_before>import datetime
import odin.datetimeutil
ARE_YOU_EXPERIENCED = datetime.date(1967, 5, 12)
MWT = odin.datetimeutil.FixedTimezone(-6, 'Mountain War Time')
BOOM = datetime.datetime(1945, 7, 16, 5, 29, 45, 0, MWT)
<commit_msg>Update tests to find source path<commit_after> | import os
import sys
import datetime
import odin.datetimeutil
HERE = os.path.abspath(os.path.dirname(__file__))
SRC = os.path.normpath(os.path.join(HERE, "..", "src"))
sys.path.insert(0, SRC)
ARE_YOU_EXPERIENCED = datetime.date(1967, 5, 12)
MWT = odin.datetimeutil.FixedTimezone(-6, "Mountain War Time")
BOOM = datetim... | import datetime
import odin.datetimeutil
ARE_YOU_EXPERIENCED = datetime.date(1967, 5, 12)
MWT = odin.datetimeutil.FixedTimezone(-6, 'Mountain War Time')
BOOM = datetime.datetime(1945, 7, 16, 5, 29, 45, 0, MWT)
Update tests to find source pathimport os
import sys
import datetime
import odin.datetimeutil
HERE = os.path... | <commit_before>import datetime
import odin.datetimeutil
ARE_YOU_EXPERIENCED = datetime.date(1967, 5, 12)
MWT = odin.datetimeutil.FixedTimezone(-6, 'Mountain War Time')
BOOM = datetime.datetime(1945, 7, 16, 5, 29, 45, 0, MWT)
<commit_msg>Update tests to find source path<commit_after>import os
import sys
import datetime... |
59120e42b73c5ff064301d1c9e2d5667903d0642 | tests/settings.py | tests/settings.py | from django import VERSION
DEBUG = True
USE_TZ = True
# SECURITY WARNING: keep the secret key used in production secret!
SECRET_KEY = "something-not-secret"
DATABASES = {
"default": {
"ENGINE": "django.db.backends.sqlite3",
"NAME": ":memory:",
}
}
ROOT_URLCONF = "tests.urls"
INSTALLED_APPS ... | DEBUG = True
USE_TZ = True
# SECURITY WARNING: keep the secret key used in production secret!
SECRET_KEY = "something-not-secret"
DATABASES = {
"default": {
"ENGINE": "django.db.backends.sqlite3",
"NAME": ":memory:",
}
}
ROOT_URLCONF = "tests.urls"
INSTALLED_APPS = [
"django.contrib.auth... | Drop a special case for Django <1.10 | Drop a special case for Django <1.10
| Python | bsd-3-clause | founders4schools/django-donations,founders4schools/django-donations | from django import VERSION
DEBUG = True
USE_TZ = True
# SECURITY WARNING: keep the secret key used in production secret!
SECRET_KEY = "something-not-secret"
DATABASES = {
"default": {
"ENGINE": "django.db.backends.sqlite3",
"NAME": ":memory:",
}
}
ROOT_URLCONF = "tests.urls"
INSTALLED_APPS ... | DEBUG = True
USE_TZ = True
# SECURITY WARNING: keep the secret key used in production secret!
SECRET_KEY = "something-not-secret"
DATABASES = {
"default": {
"ENGINE": "django.db.backends.sqlite3",
"NAME": ":memory:",
}
}
ROOT_URLCONF = "tests.urls"
INSTALLED_APPS = [
"django.contrib.auth... | <commit_before>from django import VERSION
DEBUG = True
USE_TZ = True
# SECURITY WARNING: keep the secret key used in production secret!
SECRET_KEY = "something-not-secret"
DATABASES = {
"default": {
"ENGINE": "django.db.backends.sqlite3",
"NAME": ":memory:",
}
}
ROOT_URLCONF = "tests.urls"
... | DEBUG = True
USE_TZ = True
# SECURITY WARNING: keep the secret key used in production secret!
SECRET_KEY = "something-not-secret"
DATABASES = {
"default": {
"ENGINE": "django.db.backends.sqlite3",
"NAME": ":memory:",
}
}
ROOT_URLCONF = "tests.urls"
INSTALLED_APPS = [
"django.contrib.auth... | from django import VERSION
DEBUG = True
USE_TZ = True
# SECURITY WARNING: keep the secret key used in production secret!
SECRET_KEY = "something-not-secret"
DATABASES = {
"default": {
"ENGINE": "django.db.backends.sqlite3",
"NAME": ":memory:",
}
}
ROOT_URLCONF = "tests.urls"
INSTALLED_APPS ... | <commit_before>from django import VERSION
DEBUG = True
USE_TZ = True
# SECURITY WARNING: keep the secret key used in production secret!
SECRET_KEY = "something-not-secret"
DATABASES = {
"default": {
"ENGINE": "django.db.backends.sqlite3",
"NAME": ":memory:",
}
}
ROOT_URLCONF = "tests.urls"
... |
37e569bed66e18e0ae80222f2988277023e19916 | tests/test_cli.py | tests/test_cli.py | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
import mock
import pytest
import pypi_cli as pypi
@pytest.mark.usefixtures('mock_api')
class TestStat:
def test_missing_package_arg(self, runner):
result = runner.invoke(pypi.cli, ['stat'])
assert result.exit_code > 0
def test_w... | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
import mock
import pytest
import pypi_cli as pypi
@pytest.mark.usefixtures('mock_api')
class TestStat:
def test_missing_package_arg(self, runner):
result = runner.invoke(pypi.cli, ['stat'])
assert result.exit_code > 0
def test_w... | Add test for inputting package URL | Add test for inputting package URL
| Python | mit | pombredanne/pypi-cli,sloria/pypi-cli,mindw/pypi-cli | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
import mock
import pytest
import pypi_cli as pypi
@pytest.mark.usefixtures('mock_api')
class TestStat:
def test_missing_package_arg(self, runner):
result = runner.invoke(pypi.cli, ['stat'])
assert result.exit_code > 0
def test_w... | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
import mock
import pytest
import pypi_cli as pypi
@pytest.mark.usefixtures('mock_api')
class TestStat:
def test_missing_package_arg(self, runner):
result = runner.invoke(pypi.cli, ['stat'])
assert result.exit_code > 0
def test_w... | <commit_before># -*- coding: utf-8 -*-
from __future__ import unicode_literals
import mock
import pytest
import pypi_cli as pypi
@pytest.mark.usefixtures('mock_api')
class TestStat:
def test_missing_package_arg(self, runner):
result = runner.invoke(pypi.cli, ['stat'])
assert result.exit_code > 0
... | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
import mock
import pytest
import pypi_cli as pypi
@pytest.mark.usefixtures('mock_api')
class TestStat:
def test_missing_package_arg(self, runner):
result = runner.invoke(pypi.cli, ['stat'])
assert result.exit_code > 0
def test_w... | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
import mock
import pytest
import pypi_cli as pypi
@pytest.mark.usefixtures('mock_api')
class TestStat:
def test_missing_package_arg(self, runner):
result = runner.invoke(pypi.cli, ['stat'])
assert result.exit_code > 0
def test_w... | <commit_before># -*- coding: utf-8 -*-
from __future__ import unicode_literals
import mock
import pytest
import pypi_cli as pypi
@pytest.mark.usefixtures('mock_api')
class TestStat:
def test_missing_package_arg(self, runner):
result = runner.invoke(pypi.cli, ['stat'])
assert result.exit_code > 0
... |
6c211bce96eaca17de770b82aab8dac07ff0c2fd | src/dictsdiff/cli.py | src/dictsdiff/cli.py | """
Compare multiple similar dictionary data in JSON/YAML/Pickle files.
"""
from __future__ import print_function
import sys
def dictsdiff_cli(files):
import pandas
from .loader import diff_files, diff_ndjson
if files:
dd = diff_files(files)
else:
dd = diff_ndjson(sys.stdin)
wi... | """
Compare multiple similar dictionary data in JSON/YAML/Pickle files.
"""
from __future__ import print_function
import sys
try:
from shutil import get_terminal_size
except ImportError:
def get_terminal_size():
from subprocess import check_output
out = check_output(['stty', 'size'], universa... | Set display.width based on terminal size | Set display.width based on terminal size
| Python | bsd-2-clause | tkf/dictsdiff | """
Compare multiple similar dictionary data in JSON/YAML/Pickle files.
"""
from __future__ import print_function
import sys
def dictsdiff_cli(files):
import pandas
from .loader import diff_files, diff_ndjson
if files:
dd = diff_files(files)
else:
dd = diff_ndjson(sys.stdin)
wi... | """
Compare multiple similar dictionary data in JSON/YAML/Pickle files.
"""
from __future__ import print_function
import sys
try:
from shutil import get_terminal_size
except ImportError:
def get_terminal_size():
from subprocess import check_output
out = check_output(['stty', 'size'], universa... | <commit_before>"""
Compare multiple similar dictionary data in JSON/YAML/Pickle files.
"""
from __future__ import print_function
import sys
def dictsdiff_cli(files):
import pandas
from .loader import diff_files, diff_ndjson
if files:
dd = diff_files(files)
else:
dd = diff_ndjson(sys... | """
Compare multiple similar dictionary data in JSON/YAML/Pickle files.
"""
from __future__ import print_function
import sys
try:
from shutil import get_terminal_size
except ImportError:
def get_terminal_size():
from subprocess import check_output
out = check_output(['stty', 'size'], universa... | """
Compare multiple similar dictionary data in JSON/YAML/Pickle files.
"""
from __future__ import print_function
import sys
def dictsdiff_cli(files):
import pandas
from .loader import diff_files, diff_ndjson
if files:
dd = diff_files(files)
else:
dd = diff_ndjson(sys.stdin)
wi... | <commit_before>"""
Compare multiple similar dictionary data in JSON/YAML/Pickle files.
"""
from __future__ import print_function
import sys
def dictsdiff_cli(files):
import pandas
from .loader import diff_files, diff_ndjson
if files:
dd = diff_files(files)
else:
dd = diff_ndjson(sys... |
10bbc402a46e2832f8e62359fd2d86b7ebf7fd84 | cloudbot/symfony.py | cloudbot/symfony.py | from util import hook
from elasticutils import S
@hook.command
@hook.command('sf')
def symfony(inp):
search = S().indexes('doc-index').doctypes('doc-section-type')
# cant fit more than 3 links into 1 irs message
results = search.query(tags__match=inp, title__match=inp, content__match=inp, should=True)[:3]... | from util import hook
import elasticutils
from elasticutils import S
@hook.command
@hook.command('sf')
def symfony(inp):
if not elasticutils.get_es().indices.exists('doc-index'):
return "Index currently unavailable. Try again in a bit."
search = S().indexes('doc-index').doctypes('doc-section-type')
... | Check if the index is available before calling the query. | Check if the index is available before calling the query.
| Python | mit | mitom/symfony-doc-bot,mitom/symfony-doc-bot | from util import hook
from elasticutils import S
@hook.command
@hook.command('sf')
def symfony(inp):
search = S().indexes('doc-index').doctypes('doc-section-type')
# cant fit more than 3 links into 1 irs message
results = search.query(tags__match=inp, title__match=inp, content__match=inp, should=True)[:3]... | from util import hook
import elasticutils
from elasticutils import S
@hook.command
@hook.command('sf')
def symfony(inp):
if not elasticutils.get_es().indices.exists('doc-index'):
return "Index currently unavailable. Try again in a bit."
search = S().indexes('doc-index').doctypes('doc-section-type')
... | <commit_before>from util import hook
from elasticutils import S
@hook.command
@hook.command('sf')
def symfony(inp):
search = S().indexes('doc-index').doctypes('doc-section-type')
# cant fit more than 3 links into 1 irs message
results = search.query(tags__match=inp, title__match=inp, content__match=inp, s... | from util import hook
import elasticutils
from elasticutils import S
@hook.command
@hook.command('sf')
def symfony(inp):
if not elasticutils.get_es().indices.exists('doc-index'):
return "Index currently unavailable. Try again in a bit."
search = S().indexes('doc-index').doctypes('doc-section-type')
... | from util import hook
from elasticutils import S
@hook.command
@hook.command('sf')
def symfony(inp):
search = S().indexes('doc-index').doctypes('doc-section-type')
# cant fit more than 3 links into 1 irs message
results = search.query(tags__match=inp, title__match=inp, content__match=inp, should=True)[:3]... | <commit_before>from util import hook
from elasticutils import S
@hook.command
@hook.command('sf')
def symfony(inp):
search = S().indexes('doc-index').doctypes('doc-section-type')
# cant fit more than 3 links into 1 irs message
results = search.query(tags__match=inp, title__match=inp, content__match=inp, s... |
f48554bcc5ac1161314592cb43ba65701d387289 | tests/test_check_endpoint.py | tests/test_check_endpoint.py | import pytest
def test_get_connection():
assert False
def test_verify_hostname_with_valid_hostname():
assert False
def test_verify_hostname_with_valid_altname():
assert False
def test_verify_hostname_with_invalid_hostname():
assert False
def test_expiring_certificate_with_good_cert():
assert Fa... | import pytest
# We're going to fake a connection for purposes of testing.
# So far all we use is getpeercert method, so that's all we need to fake
class fake_connection(object):
def __init__(self):
pass
def getpeercert(self):
cert_details = {'notAfter': 'Dec 31 00:00:00 2015 GMT',
... | Add fake connection class, PEP8 changes | Add fake connection class, PEP8 changes
Also had a bad assert in there
| Python | mit | twirrim/checkendpoint | import pytest
def test_get_connection():
assert False
def test_verify_hostname_with_valid_hostname():
assert False
def test_verify_hostname_with_valid_altname():
assert False
def test_verify_hostname_with_invalid_hostname():
assert False
def test_expiring_certificate_with_good_cert():
assert Fa... | import pytest
# We're going to fake a connection for purposes of testing.
# So far all we use is getpeercert method, so that's all we need to fake
class fake_connection(object):
def __init__(self):
pass
def getpeercert(self):
cert_details = {'notAfter': 'Dec 31 00:00:00 2015 GMT',
... | <commit_before>import pytest
def test_get_connection():
assert False
def test_verify_hostname_with_valid_hostname():
assert False
def test_verify_hostname_with_valid_altname():
assert False
def test_verify_hostname_with_invalid_hostname():
assert False
def test_expiring_certificate_with_good_cert()... | import pytest
# We're going to fake a connection for purposes of testing.
# So far all we use is getpeercert method, so that's all we need to fake
class fake_connection(object):
def __init__(self):
pass
def getpeercert(self):
cert_details = {'notAfter': 'Dec 31 00:00:00 2015 GMT',
... | import pytest
def test_get_connection():
assert False
def test_verify_hostname_with_valid_hostname():
assert False
def test_verify_hostname_with_valid_altname():
assert False
def test_verify_hostname_with_invalid_hostname():
assert False
def test_expiring_certificate_with_good_cert():
assert Fa... | <commit_before>import pytest
def test_get_connection():
assert False
def test_verify_hostname_with_valid_hostname():
assert False
def test_verify_hostname_with_valid_altname():
assert False
def test_verify_hostname_with_invalid_hostname():
assert False
def test_expiring_certificate_with_good_cert()... |
4c07583ff5bd3e4e7d542b085807c4547328f1e8 | settings/travis.py | settings/travis.py | from defaults import *
DEBUG=False
DATABASES = {
'default': {
#'ENGINE': 'django.db.backends.postgresql_psycopg2',
'ENGINE': 'django.contrib.gis.db.backends.postgis',
# 'ENGINE': 'django.db.backends.sqlite3',
'NAME': 'atlas_travis',
'USER': 'postgres',
'PASSWORD': ''... | from defaults import *
DEBUG=False
SECRET_KEY='+9*_1$hry$2r5#723%_a@uju&-skn)^042r+d_eupq*az8o^(w'
DATABASES = {
'default': {
#'ENGINE': 'django.db.backends.postgresql_psycopg2',
'ENGINE': 'django.contrib.gis.db.backends.postgis',
# 'ENGINE': 'django.db.backends.sqlite3',
'NAME': '... | Add SECRET_KEY to Travis CI settings | Add SECRET_KEY to Travis CI settings
``settings.SECRET_KEY`` is required in Django 1.5
Addresses #660
| Python | mit | denverfoundation/storybase,denverfoundation/storybase,denverfoundation/storybase,denverfoundation/storybase | from defaults import *
DEBUG=False
DATABASES = {
'default': {
#'ENGINE': 'django.db.backends.postgresql_psycopg2',
'ENGINE': 'django.contrib.gis.db.backends.postgis',
# 'ENGINE': 'django.db.backends.sqlite3',
'NAME': 'atlas_travis',
'USER': 'postgres',
'PASSWORD': ''... | from defaults import *
DEBUG=False
SECRET_KEY='+9*_1$hry$2r5#723%_a@uju&-skn)^042r+d_eupq*az8o^(w'
DATABASES = {
'default': {
#'ENGINE': 'django.db.backends.postgresql_psycopg2',
'ENGINE': 'django.contrib.gis.db.backends.postgis',
# 'ENGINE': 'django.db.backends.sqlite3',
'NAME': '... | <commit_before>from defaults import *
DEBUG=False
DATABASES = {
'default': {
#'ENGINE': 'django.db.backends.postgresql_psycopg2',
'ENGINE': 'django.contrib.gis.db.backends.postgis',
# 'ENGINE': 'django.db.backends.sqlite3',
'NAME': 'atlas_travis',
'USER': 'postgres',
... | from defaults import *
DEBUG=False
SECRET_KEY='+9*_1$hry$2r5#723%_a@uju&-skn)^042r+d_eupq*az8o^(w'
DATABASES = {
'default': {
#'ENGINE': 'django.db.backends.postgresql_psycopg2',
'ENGINE': 'django.contrib.gis.db.backends.postgis',
# 'ENGINE': 'django.db.backends.sqlite3',
'NAME': '... | from defaults import *
DEBUG=False
DATABASES = {
'default': {
#'ENGINE': 'django.db.backends.postgresql_psycopg2',
'ENGINE': 'django.contrib.gis.db.backends.postgis',
# 'ENGINE': 'django.db.backends.sqlite3',
'NAME': 'atlas_travis',
'USER': 'postgres',
'PASSWORD': ''... | <commit_before>from defaults import *
DEBUG=False
DATABASES = {
'default': {
#'ENGINE': 'django.db.backends.postgresql_psycopg2',
'ENGINE': 'django.contrib.gis.db.backends.postgis',
# 'ENGINE': 'django.db.backends.sqlite3',
'NAME': 'atlas_travis',
'USER': 'postgres',
... |
d7025f92a240284d130ce455b6975ede42d0228e | chalice/cli/filewatch/eventbased.py | chalice/cli/filewatch/eventbased.py | import threading # noqa
from typing import Callable, Optional # noqa
import watchdog.observers
from watchdog.events import FileSystemEventHandler
from watchdog.events import FileSystemEvent # noqa
from chalice.cli.filewatch import FileWatcher, WorkerProcess
class WatchdogWorkerProcess(WorkerProcess):
"""Work... | import threading # noqa
from typing import Callable, Optional # noqa
import watchdog.observers # pylint: disable=import-error
from watchdog import events # pylint: disable=import-error
from chalice.cli.filewatch import FileWatcher, WorkerProcess
class WatchdogWorkerProcess(WorkerProcess):
"""Worker that run... | Make prcheck pass without needing cond deps | Make prcheck pass without needing cond deps
| Python | apache-2.0 | awslabs/chalice | import threading # noqa
from typing import Callable, Optional # noqa
import watchdog.observers
from watchdog.events import FileSystemEventHandler
from watchdog.events import FileSystemEvent # noqa
from chalice.cli.filewatch import FileWatcher, WorkerProcess
class WatchdogWorkerProcess(WorkerProcess):
"""Work... | import threading # noqa
from typing import Callable, Optional # noqa
import watchdog.observers # pylint: disable=import-error
from watchdog import events # pylint: disable=import-error
from chalice.cli.filewatch import FileWatcher, WorkerProcess
class WatchdogWorkerProcess(WorkerProcess):
"""Worker that run... | <commit_before>import threading # noqa
from typing import Callable, Optional # noqa
import watchdog.observers
from watchdog.events import FileSystemEventHandler
from watchdog.events import FileSystemEvent # noqa
from chalice.cli.filewatch import FileWatcher, WorkerProcess
class WatchdogWorkerProcess(WorkerProces... | import threading # noqa
from typing import Callable, Optional # noqa
import watchdog.observers # pylint: disable=import-error
from watchdog import events # pylint: disable=import-error
from chalice.cli.filewatch import FileWatcher, WorkerProcess
class WatchdogWorkerProcess(WorkerProcess):
"""Worker that run... | import threading # noqa
from typing import Callable, Optional # noqa
import watchdog.observers
from watchdog.events import FileSystemEventHandler
from watchdog.events import FileSystemEvent # noqa
from chalice.cli.filewatch import FileWatcher, WorkerProcess
class WatchdogWorkerProcess(WorkerProcess):
"""Work... | <commit_before>import threading # noqa
from typing import Callable, Optional # noqa
import watchdog.observers
from watchdog.events import FileSystemEventHandler
from watchdog.events import FileSystemEvent # noqa
from chalice.cli.filewatch import FileWatcher, WorkerProcess
class WatchdogWorkerProcess(WorkerProces... |
1d302213b76cac74afaf71eb799ece022883877f | trakt/__init__.py | trakt/__init__.py | from trakt.core.errors import ERRORS
from trakt.core.exceptions import RequestError, ClientError, ServerError
from trakt.client import TraktClient
from trakt.helpers import has_attribute
from trakt.version import __version__
from six import add_metaclass
__all__ = [
'Trakt',
'RequestError',
'ClientError'... | from trakt.core.errors import ERRORS
from trakt.core.exceptions import RequestError, ClientError, ServerError
from trakt.client import TraktClient
from trakt.helpers import has_attribute
from trakt.version import __version__ # NOQA
from six import add_metaclass
__all__ = [
'Trakt',
'RequestError',
'Clie... | Disable flake8 warning on `__version__` import | Disable flake8 warning on `__version__` import
| Python | mit | fuzeman/trakt.py | from trakt.core.errors import ERRORS
from trakt.core.exceptions import RequestError, ClientError, ServerError
from trakt.client import TraktClient
from trakt.helpers import has_attribute
from trakt.version import __version__
from six import add_metaclass
__all__ = [
'Trakt',
'RequestError',
'ClientError'... | from trakt.core.errors import ERRORS
from trakt.core.exceptions import RequestError, ClientError, ServerError
from trakt.client import TraktClient
from trakt.helpers import has_attribute
from trakt.version import __version__ # NOQA
from six import add_metaclass
__all__ = [
'Trakt',
'RequestError',
'Clie... | <commit_before>from trakt.core.errors import ERRORS
from trakt.core.exceptions import RequestError, ClientError, ServerError
from trakt.client import TraktClient
from trakt.helpers import has_attribute
from trakt.version import __version__
from six import add_metaclass
__all__ = [
'Trakt',
'RequestError',
... | from trakt.core.errors import ERRORS
from trakt.core.exceptions import RequestError, ClientError, ServerError
from trakt.client import TraktClient
from trakt.helpers import has_attribute
from trakt.version import __version__ # NOQA
from six import add_metaclass
__all__ = [
'Trakt',
'RequestError',
'Clie... | from trakt.core.errors import ERRORS
from trakt.core.exceptions import RequestError, ClientError, ServerError
from trakt.client import TraktClient
from trakt.helpers import has_attribute
from trakt.version import __version__
from six import add_metaclass
__all__ = [
'Trakt',
'RequestError',
'ClientError'... | <commit_before>from trakt.core.errors import ERRORS
from trakt.core.exceptions import RequestError, ClientError, ServerError
from trakt.client import TraktClient
from trakt.helpers import has_attribute
from trakt.version import __version__
from six import add_metaclass
__all__ = [
'Trakt',
'RequestError',
... |
08bb24ad80db72457c87533288b97942cc178dd6 | src/kanboard/urls.py | src/kanboard/urls.py | import os
from django.conf.urls.defaults import patterns, url
import kanboard
urlpatterns = patterns('kanboard.views',
url(r'^board/(?P<board_slug>[\w-]+)/$', 'board'),
url(r'^board/(?P<board_slug>[\w-]+)/update/$', 'update'),
)
# Serve static content
static_root = os.path.join(os.path.dirname(kanboard.__file__... | from django.conf.urls.defaults import patterns, url
urlpatterns = patterns('kanboard.views',
url(r'^board/(?P<board_slug>[\w-]+)/$', 'board'),
url(r'^board/(?P<board_slug>[\w-]+)/update/$', 'update'),
)
| Remove static file serving (using django-staticfiles instead is recommended) | Remove static file serving (using django-staticfiles instead is recommended)
| Python | bsd-3-clause | zellyn/django-kanboard,zellyn/django-kanboard | import os
from django.conf.urls.defaults import patterns, url
import kanboard
urlpatterns = patterns('kanboard.views',
url(r'^board/(?P<board_slug>[\w-]+)/$', 'board'),
url(r'^board/(?P<board_slug>[\w-]+)/update/$', 'update'),
)
# Serve static content
static_root = os.path.join(os.path.dirname(kanboard.__file__... | from django.conf.urls.defaults import patterns, url
urlpatterns = patterns('kanboard.views',
url(r'^board/(?P<board_slug>[\w-]+)/$', 'board'),
url(r'^board/(?P<board_slug>[\w-]+)/update/$', 'update'),
)
| <commit_before>import os
from django.conf.urls.defaults import patterns, url
import kanboard
urlpatterns = patterns('kanboard.views',
url(r'^board/(?P<board_slug>[\w-]+)/$', 'board'),
url(r'^board/(?P<board_slug>[\w-]+)/update/$', 'update'),
)
# Serve static content
static_root = os.path.join(os.path.dirname(ka... | from django.conf.urls.defaults import patterns, url
urlpatterns = patterns('kanboard.views',
url(r'^board/(?P<board_slug>[\w-]+)/$', 'board'),
url(r'^board/(?P<board_slug>[\w-]+)/update/$', 'update'),
)
| import os
from django.conf.urls.defaults import patterns, url
import kanboard
urlpatterns = patterns('kanboard.views',
url(r'^board/(?P<board_slug>[\w-]+)/$', 'board'),
url(r'^board/(?P<board_slug>[\w-]+)/update/$', 'update'),
)
# Serve static content
static_root = os.path.join(os.path.dirname(kanboard.__file__... | <commit_before>import os
from django.conf.urls.defaults import patterns, url
import kanboard
urlpatterns = patterns('kanboard.views',
url(r'^board/(?P<board_slug>[\w-]+)/$', 'board'),
url(r'^board/(?P<board_slug>[\w-]+)/update/$', 'update'),
)
# Serve static content
static_root = os.path.join(os.path.dirname(ka... |
d63d6070576bf22d60bf9684e417163201814353 | webapp/worker.py | webapp/worker.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""Run a worker for the job queue."""
import os
import sys
from redis import StrictRedis
from rq import Connection, Queue, Worker
from bootstrap.util import app_context
if __name__ == '__main__':
config_name = os.environ.get('ENVIRONMENT')
if config_name is No... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""Run a worker for the job queue."""
import sys
from redis import StrictRedis
from rq import Connection, Queue, Worker
from bootstrap.util import app_context, get_config_name_from_env
if __name__ == '__main__':
try:
config_name = get_config_name_from_env(... | Use bootstrap utility to retrieve the configuration name from the environment. | Use bootstrap utility to retrieve the configuration name from the environment.
| Python | bsd-3-clause | m-ober/byceps,m-ober/byceps,homeworkprod/byceps,homeworkprod/byceps,homeworkprod/byceps,m-ober/byceps | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""Run a worker for the job queue."""
import os
import sys
from redis import StrictRedis
from rq import Connection, Queue, Worker
from bootstrap.util import app_context
if __name__ == '__main__':
config_name = os.environ.get('ENVIRONMENT')
if config_name is No... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""Run a worker for the job queue."""
import sys
from redis import StrictRedis
from rq import Connection, Queue, Worker
from bootstrap.util import app_context, get_config_name_from_env
if __name__ == '__main__':
try:
config_name = get_config_name_from_env(... | <commit_before>#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""Run a worker for the job queue."""
import os
import sys
from redis import StrictRedis
from rq import Connection, Queue, Worker
from bootstrap.util import app_context
if __name__ == '__main__':
config_name = os.environ.get('ENVIRONMENT')
if co... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""Run a worker for the job queue."""
import sys
from redis import StrictRedis
from rq import Connection, Queue, Worker
from bootstrap.util import app_context, get_config_name_from_env
if __name__ == '__main__':
try:
config_name = get_config_name_from_env(... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""Run a worker for the job queue."""
import os
import sys
from redis import StrictRedis
from rq import Connection, Queue, Worker
from bootstrap.util import app_context
if __name__ == '__main__':
config_name = os.environ.get('ENVIRONMENT')
if config_name is No... | <commit_before>#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""Run a worker for the job queue."""
import os
import sys
from redis import StrictRedis
from rq import Connection, Queue, Worker
from bootstrap.util import app_context
if __name__ == '__main__':
config_name = os.environ.get('ENVIRONMENT')
if co... |
dec2222cde98b395aac303af4e005937f4085b89 | src/ggrc_workflows/migrations/versions/20140804203436_32221e9f330c_remove_prohibitive_foreign_key_.py | src/ggrc_workflows/migrations/versions/20140804203436_32221e9f330c_remove_prohibitive_foreign_key_.py |
"""Remove prohibitive foreign key constraints
Revision ID: 32221e9f330c
Revises: 235b7b9989be
Create Date: 2014-08-04 20:34:36.697866
"""
# revision identifiers, used by Alembic.
revision = '32221e9f330c'
down_revision = '235b7b9989be'
from alembic import op
import sqlalchemy as sa
def upgrade():
op.drop_con... |
"""Remove prohibitive foreign key constraints
Revision ID: 32221e9f330c
Revises: 235b7b9989be
Create Date: 2014-08-04 20:34:36.697866
"""
# revision identifiers, used by Alembic.
revision = '32221e9f330c'
down_revision = '235b7b9989be'
from alembic import op
import sqlalchemy as sa
def upgrade():
op.drop_con... | Remove uniqueness constraints on Workflow and TaskGroup | Remove uniqueness constraints on Workflow and TaskGroup
* Titles need not be unique anymore
| Python | apache-2.0 | vladan-m/ggrc-core,hyperNURb/ggrc-core,NejcZupec/ggrc-core,prasannav7/ggrc-core,plamut/ggrc-core,AleksNeStu/ggrc-core,hyperNURb/ggrc-core,vladan-m/ggrc-core,plamut/ggrc-core,hasanalom/ggrc-core,prasannav7/ggrc-core,jmakov/ggrc-core,VinnieJohns/ggrc-core,vladan-m/ggrc-core,prasannav7/ggrc-core,plamut/ggrc-core,NejcZupec... |
"""Remove prohibitive foreign key constraints
Revision ID: 32221e9f330c
Revises: 235b7b9989be
Create Date: 2014-08-04 20:34:36.697866
"""
# revision identifiers, used by Alembic.
revision = '32221e9f330c'
down_revision = '235b7b9989be'
from alembic import op
import sqlalchemy as sa
def upgrade():
op.drop_con... |
"""Remove prohibitive foreign key constraints
Revision ID: 32221e9f330c
Revises: 235b7b9989be
Create Date: 2014-08-04 20:34:36.697866
"""
# revision identifiers, used by Alembic.
revision = '32221e9f330c'
down_revision = '235b7b9989be'
from alembic import op
import sqlalchemy as sa
def upgrade():
op.drop_con... | <commit_before>
"""Remove prohibitive foreign key constraints
Revision ID: 32221e9f330c
Revises: 235b7b9989be
Create Date: 2014-08-04 20:34:36.697866
"""
# revision identifiers, used by Alembic.
revision = '32221e9f330c'
down_revision = '235b7b9989be'
from alembic import op
import sqlalchemy as sa
def upgrade():
... |
"""Remove prohibitive foreign key constraints
Revision ID: 32221e9f330c
Revises: 235b7b9989be
Create Date: 2014-08-04 20:34:36.697866
"""
# revision identifiers, used by Alembic.
revision = '32221e9f330c'
down_revision = '235b7b9989be'
from alembic import op
import sqlalchemy as sa
def upgrade():
op.drop_con... |
"""Remove prohibitive foreign key constraints
Revision ID: 32221e9f330c
Revises: 235b7b9989be
Create Date: 2014-08-04 20:34:36.697866
"""
# revision identifiers, used by Alembic.
revision = '32221e9f330c'
down_revision = '235b7b9989be'
from alembic import op
import sqlalchemy as sa
def upgrade():
op.drop_con... | <commit_before>
"""Remove prohibitive foreign key constraints
Revision ID: 32221e9f330c
Revises: 235b7b9989be
Create Date: 2014-08-04 20:34:36.697866
"""
# revision identifiers, used by Alembic.
revision = '32221e9f330c'
down_revision = '235b7b9989be'
from alembic import op
import sqlalchemy as sa
def upgrade():
... |
a462cca21e8c6456927727cead09f006e63fed16 | src/ggrc/models/section.py | src/ggrc/models/section.py |
# Copyright (C) 2013 Google Inc., authors, and contributors <see AUTHORS file>
# Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file>
# Created By:
# Maintained By:
from ggrc import db
from .associationproxy import association_proxy
from .mixins import BusinessObject, Hierarchical
class Secti... |
# Copyright (C) 2013 Google Inc., authors, and contributors <see AUTHORS file>
# Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file>
# Created By:
# Maintained By:
from ggrc import db
from .associationproxy import association_proxy
from .mixins import BusinessObject, Hierarchical
class Secti... | Add eager-loaded links for Section | Add eager-loaded links for Section
| Python | apache-2.0 | hamyuan/ggrc-self-test,j0gurt/ggrc-core,vladan-m/ggrc-core,ankit-collective/ggrc-core,selahssea/ggrc-core,VinnieJohns/ggrc-core,vladan-m/ggrc-core,hyperNURb/ggrc-core,andrei-karalionak/ggrc-core,AleksNeStu/ggrc-core,hyperNURb/ggrc-core,2947721120/sagacious-capsicum,plamut/ggrc-core,kr41/ggrc-core,vladan-m/ggrc-core,edo... |
# Copyright (C) 2013 Google Inc., authors, and contributors <see AUTHORS file>
# Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file>
# Created By:
# Maintained By:
from ggrc import db
from .associationproxy import association_proxy
from .mixins import BusinessObject, Hierarchical
class Secti... |
# Copyright (C) 2013 Google Inc., authors, and contributors <see AUTHORS file>
# Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file>
# Created By:
# Maintained By:
from ggrc import db
from .associationproxy import association_proxy
from .mixins import BusinessObject, Hierarchical
class Secti... | <commit_before>
# Copyright (C) 2013 Google Inc., authors, and contributors <see AUTHORS file>
# Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file>
# Created By:
# Maintained By:
from ggrc import db
from .associationproxy import association_proxy
from .mixins import BusinessObject, Hierarchic... |
# Copyright (C) 2013 Google Inc., authors, and contributors <see AUTHORS file>
# Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file>
# Created By:
# Maintained By:
from ggrc import db
from .associationproxy import association_proxy
from .mixins import BusinessObject, Hierarchical
class Secti... |
# Copyright (C) 2013 Google Inc., authors, and contributors <see AUTHORS file>
# Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file>
# Created By:
# Maintained By:
from ggrc import db
from .associationproxy import association_proxy
from .mixins import BusinessObject, Hierarchical
class Secti... | <commit_before>
# Copyright (C) 2013 Google Inc., authors, and contributors <see AUTHORS file>
# Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file>
# Created By:
# Maintained By:
from ggrc import db
from .associationproxy import association_proxy
from .mixins import BusinessObject, Hierarchic... |
8f1d28a5e7f698bf177412eef92529eb5b360301 | keeper/logutils.py | keeper/logutils.py | """Logging helpers and utilities."""
import uuid
from functools import wraps
from timeit import default_timer as timer
from typing import Any, Callable, TypeVar
import structlog
from flask import make_response, request
__all__ = ["log_route"]
F = TypeVar("F", bound=Callable[..., Any])
def log_route() -> Callable[... | """Logging helpers and utilities."""
import uuid
from functools import wraps
from timeit import default_timer as timer
from typing import Any, Callable, TypeVar
import structlog
from flask import make_response, request
__all__ = ["log_route"]
F = TypeVar("F", bound=Callable[..., Any])
def log_route() -> Callable[... | Include an event with the response log message | Include an event with the response log message
This is now required by structlog
| Python | mit | lsst-sqre/ltd-keeper,lsst-sqre/ltd-keeper | """Logging helpers and utilities."""
import uuid
from functools import wraps
from timeit import default_timer as timer
from typing import Any, Callable, TypeVar
import structlog
from flask import make_response, request
__all__ = ["log_route"]
F = TypeVar("F", bound=Callable[..., Any])
def log_route() -> Callable[... | """Logging helpers and utilities."""
import uuid
from functools import wraps
from timeit import default_timer as timer
from typing import Any, Callable, TypeVar
import structlog
from flask import make_response, request
__all__ = ["log_route"]
F = TypeVar("F", bound=Callable[..., Any])
def log_route() -> Callable[... | <commit_before>"""Logging helpers and utilities."""
import uuid
from functools import wraps
from timeit import default_timer as timer
from typing import Any, Callable, TypeVar
import structlog
from flask import make_response, request
__all__ = ["log_route"]
F = TypeVar("F", bound=Callable[..., Any])
def log_route... | """Logging helpers and utilities."""
import uuid
from functools import wraps
from timeit import default_timer as timer
from typing import Any, Callable, TypeVar
import structlog
from flask import make_response, request
__all__ = ["log_route"]
F = TypeVar("F", bound=Callable[..., Any])
def log_route() -> Callable[... | """Logging helpers and utilities."""
import uuid
from functools import wraps
from timeit import default_timer as timer
from typing import Any, Callable, TypeVar
import structlog
from flask import make_response, request
__all__ = ["log_route"]
F = TypeVar("F", bound=Callable[..., Any])
def log_route() -> Callable[... | <commit_before>"""Logging helpers and utilities."""
import uuid
from functools import wraps
from timeit import default_timer as timer
from typing import Any, Callable, TypeVar
import structlog
from flask import make_response, request
__all__ = ["log_route"]
F = TypeVar("F", bound=Callable[..., Any])
def log_route... |
41efafdd229c549636d8feda458c914653d96d4d | setup.py | setup.py | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from setuptools import setup, find_packages
from os.path import dirname, join
def main():
base_dir = dirname(__file__)
setup(
name='genty',
version='0.0.1',
description='Allows you to run a test with multiple data sets',
... | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from setuptools import setup, find_packages
from os.path import dirname, join
def main():
base_dir = dirname(__file__)
setup(
name='genty',
version='0.0.1',
description='Allows you to run a test with multiple data sets',
... | Add box.text namespace. Also switch to [email protected] for email addr. | Add box.text namespace. Also switch to [email protected] for email addr.
Fixes #7
| Python | apache-2.0 | box/genty,box/genty | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from setuptools import setup, find_packages
from os.path import dirname, join
def main():
base_dir = dirname(__file__)
setup(
name='genty',
version='0.0.1',
description='Allows you to run a test with multiple data sets',
... | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from setuptools import setup, find_packages
from os.path import dirname, join
def main():
base_dir = dirname(__file__)
setup(
name='genty',
version='0.0.1',
description='Allows you to run a test with multiple data sets',
... | <commit_before># -*- coding: utf-8 -*-
from __future__ import unicode_literals
from setuptools import setup, find_packages
from os.path import dirname, join
def main():
base_dir = dirname(__file__)
setup(
name='genty',
version='0.0.1',
description='Allows you to run a test with multip... | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from setuptools import setup, find_packages
from os.path import dirname, join
def main():
base_dir = dirname(__file__)
setup(
name='genty',
version='0.0.1',
description='Allows you to run a test with multiple data sets',
... | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from setuptools import setup, find_packages
from os.path import dirname, join
def main():
base_dir = dirname(__file__)
setup(
name='genty',
version='0.0.1',
description='Allows you to run a test with multiple data sets',
... | <commit_before># -*- coding: utf-8 -*-
from __future__ import unicode_literals
from setuptools import setup, find_packages
from os.path import dirname, join
def main():
base_dir = dirname(__file__)
setup(
name='genty',
version='0.0.1',
description='Allows you to run a test with multip... |
1a46149806a66d7f493cf104913ebebde7e6ba5d | chatterbot/adapters/io/tts.py | chatterbot/adapters/io/tts.py | from chatterbot.adapters.io import IOAdapter
from chatterbot.utils.read_input import input_function
import os
import platform
import subprocess
class MacOSXTTS(IOAdapter):
def process_input(self):
"""
Read the user's input from the terminal.
"""
user_input = input_function()
... | from chatterbot.adapters.io import IOAdapter
from chatterbot.utils.read_input import input_function
import os
import platform
import subprocess
class MacOSXTTS(IOAdapter):
def process_input(self):
"""
Read the user's input from the terminal.
"""
user_input = input_function()
... | Make sure only Mac computers use the MacOSXTTS io adapter | Make sure only Mac computers use the MacOSXTTS io adapter
| Python | bsd-3-clause | Gustavo6046/ChatterBot,maclogan/VirtualPenPal,Reinaesaya/OUIRL-ChatBot,vkosuri/ChatterBot,gunthercox/ChatterBot,davizucon/ChatterBot,Reinaesaya/OUIRL-ChatBot,DarkmatterVale/ChatterBot | from chatterbot.adapters.io import IOAdapter
from chatterbot.utils.read_input import input_function
import os
import platform
import subprocess
class MacOSXTTS(IOAdapter):
def process_input(self):
"""
Read the user's input from the terminal.
"""
user_input = input_function()
... | from chatterbot.adapters.io import IOAdapter
from chatterbot.utils.read_input import input_function
import os
import platform
import subprocess
class MacOSXTTS(IOAdapter):
def process_input(self):
"""
Read the user's input from the terminal.
"""
user_input = input_function()
... | <commit_before>from chatterbot.adapters.io import IOAdapter
from chatterbot.utils.read_input import input_function
import os
import platform
import subprocess
class MacOSXTTS(IOAdapter):
def process_input(self):
"""
Read the user's input from the terminal.
"""
user_input = input_... | from chatterbot.adapters.io import IOAdapter
from chatterbot.utils.read_input import input_function
import os
import platform
import subprocess
class MacOSXTTS(IOAdapter):
def process_input(self):
"""
Read the user's input from the terminal.
"""
user_input = input_function()
... | from chatterbot.adapters.io import IOAdapter
from chatterbot.utils.read_input import input_function
import os
import platform
import subprocess
class MacOSXTTS(IOAdapter):
def process_input(self):
"""
Read the user's input from the terminal.
"""
user_input = input_function()
... | <commit_before>from chatterbot.adapters.io import IOAdapter
from chatterbot.utils.read_input import input_function
import os
import platform
import subprocess
class MacOSXTTS(IOAdapter):
def process_input(self):
"""
Read the user's input from the terminal.
"""
user_input = input_... |
11d3075ba9d1881526ce90d01ae3b3d5728740fa | setup.py | setup.py | #!/usr/bin/env python3
from distutils.core import setup
setup(
name='dg',
version='HEAD',
description='A programming language for the CPython VM',
author='pyos',
author_email='[email protected]',
url='https://github.com/pyos/dg.git',
packages=['dg'],
package_dir={'dg': '.'},
pack... | #!/usr/bin/env python3
from distutils.core import setup
setup(
name='dg',
version='HEAD',
description='A programming language for the CPython VM',
author='pyos',
author_email='[email protected]',
url='https://github.com/pyos/dg.git',
packages=['dg'],
package_dir={'dg': '.'},
pack... | Install stuff from /addon, too. | Install stuff from /addon, too. | Python | mit | pyos/dg | #!/usr/bin/env python3
from distutils.core import setup
setup(
name='dg',
version='HEAD',
description='A programming language for the CPython VM',
author='pyos',
author_email='[email protected]',
url='https://github.com/pyos/dg.git',
packages=['dg'],
package_dir={'dg': '.'},
pack... | #!/usr/bin/env python3
from distutils.core import setup
setup(
name='dg',
version='HEAD',
description='A programming language for the CPython VM',
author='pyos',
author_email='[email protected]',
url='https://github.com/pyos/dg.git',
packages=['dg'],
package_dir={'dg': '.'},
pack... | <commit_before>#!/usr/bin/env python3
from distutils.core import setup
setup(
name='dg',
version='HEAD',
description='A programming language for the CPython VM',
author='pyos',
author_email='[email protected]',
url='https://github.com/pyos/dg.git',
packages=['dg'],
package_dir={'dg':... | #!/usr/bin/env python3
from distutils.core import setup
setup(
name='dg',
version='HEAD',
description='A programming language for the CPython VM',
author='pyos',
author_email='[email protected]',
url='https://github.com/pyos/dg.git',
packages=['dg'],
package_dir={'dg': '.'},
pack... | #!/usr/bin/env python3
from distutils.core import setup
setup(
name='dg',
version='HEAD',
description='A programming language for the CPython VM',
author='pyos',
author_email='[email protected]',
url='https://github.com/pyos/dg.git',
packages=['dg'],
package_dir={'dg': '.'},
pack... | <commit_before>#!/usr/bin/env python3
from distutils.core import setup
setup(
name='dg',
version='HEAD',
description='A programming language for the CPython VM',
author='pyos',
author_email='[email protected]',
url='https://github.com/pyos/dg.git',
packages=['dg'],
package_dir={'dg':... |
4e66b44075cf8274204f5e6678d7ba6e57aadddf | setup.py | setup.py | from setuptools import setup, find_packages
setup(name='syse',
version='1.0',
description='A syntactic sentence extraction program.',
url='https://github.com/NathanWycoff/SySE',
author='Nathan Wycoff',
author_email='[email protected]',
packages=['syse'],
license = 'MIT',
install_... | from setuptools import setup, find_packages
setup(name='syse',
version='1.0',
description='A syntactic sentence extraction program.',
url='https://github.com/NathanWycoff/SySE',
author='Nathan Wycoff',
author_email='[email protected]',
packages=['syse'],
license = 'MIT',
install_... | Change is the Law of Life (6) | Change is the Law of Life (6)
| Python | mit | NathanWycoff/SySE | from setuptools import setup, find_packages
setup(name='syse',
version='1.0',
description='A syntactic sentence extraction program.',
url='https://github.com/NathanWycoff/SySE',
author='Nathan Wycoff',
author_email='[email protected]',
packages=['syse'],
license = 'MIT',
install_... | from setuptools import setup, find_packages
setup(name='syse',
version='1.0',
description='A syntactic sentence extraction program.',
url='https://github.com/NathanWycoff/SySE',
author='Nathan Wycoff',
author_email='[email protected]',
packages=['syse'],
license = 'MIT',
install_... | <commit_before>from setuptools import setup, find_packages
setup(name='syse',
version='1.0',
description='A syntactic sentence extraction program.',
url='https://github.com/NathanWycoff/SySE',
author='Nathan Wycoff',
author_email='[email protected]',
packages=['syse'],
license = 'MIT... | from setuptools import setup, find_packages
setup(name='syse',
version='1.0',
description='A syntactic sentence extraction program.',
url='https://github.com/NathanWycoff/SySE',
author='Nathan Wycoff',
author_email='[email protected]',
packages=['syse'],
license = 'MIT',
install_... | from setuptools import setup, find_packages
setup(name='syse',
version='1.0',
description='A syntactic sentence extraction program.',
url='https://github.com/NathanWycoff/SySE',
author='Nathan Wycoff',
author_email='[email protected]',
packages=['syse'],
license = 'MIT',
install_... | <commit_before>from setuptools import setup, find_packages
setup(name='syse',
version='1.0',
description='A syntactic sentence extraction program.',
url='https://github.com/NathanWycoff/SySE',
author='Nathan Wycoff',
author_email='[email protected]',
packages=['syse'],
license = 'MIT... |
96421cfe9711c77fb27a028d8e942bffd3059dd3 | project/api/urls.py | project/api/urls.py | from project.api.views import ChannelViewSet, MessageViewSet, UserViewSet
from django.conf.urls import url, include
from rest_framework.authtoken import views
from rest_framework.routers import DefaultRouter
from rest_framework.schemas import get_schema_view
from rest_framework.authtoken import views
schema_view = ge... | from project.api.views import ChannelViewSet, MessageViewSet, UserViewSet
from django.conf.urls import url, include
from rest_framework.authtoken import views
from rest_framework.routers import DefaultRouter
from rest_framework.schemas import get_schema_view
from rest_framework.authtoken import views
schema_view = ge... | Fix regex for registration url | Fix regex for registration url
| Python | mit | djstein/messages-grailed | from project.api.views import ChannelViewSet, MessageViewSet, UserViewSet
from django.conf.urls import url, include
from rest_framework.authtoken import views
from rest_framework.routers import DefaultRouter
from rest_framework.schemas import get_schema_view
from rest_framework.authtoken import views
schema_view = ge... | from project.api.views import ChannelViewSet, MessageViewSet, UserViewSet
from django.conf.urls import url, include
from rest_framework.authtoken import views
from rest_framework.routers import DefaultRouter
from rest_framework.schemas import get_schema_view
from rest_framework.authtoken import views
schema_view = ge... | <commit_before>from project.api.views import ChannelViewSet, MessageViewSet, UserViewSet
from django.conf.urls import url, include
from rest_framework.authtoken import views
from rest_framework.routers import DefaultRouter
from rest_framework.schemas import get_schema_view
from rest_framework.authtoken import views
s... | from project.api.views import ChannelViewSet, MessageViewSet, UserViewSet
from django.conf.urls import url, include
from rest_framework.authtoken import views
from rest_framework.routers import DefaultRouter
from rest_framework.schemas import get_schema_view
from rest_framework.authtoken import views
schema_view = ge... | from project.api.views import ChannelViewSet, MessageViewSet, UserViewSet
from django.conf.urls import url, include
from rest_framework.authtoken import views
from rest_framework.routers import DefaultRouter
from rest_framework.schemas import get_schema_view
from rest_framework.authtoken import views
schema_view = ge... | <commit_before>from project.api.views import ChannelViewSet, MessageViewSet, UserViewSet
from django.conf.urls import url, include
from rest_framework.authtoken import views
from rest_framework.routers import DefaultRouter
from rest_framework.schemas import get_schema_view
from rest_framework.authtoken import views
s... |
0df7044bf2c697fe87ea82e4e82ae8895c7fa4a6 | wsme/restjson.py | wsme/restjson.py | import base64
from wsme.rest import RestProtocol
from wsme.controller import register_protocol
import wsme.types
try:
import simplejson as json
except ImportError:
import json
def prepare_encode(value, datatype):
if datatype in wsme.types.pod_types:
return value
if wsme.types.isstructured(da... | import base64
import datetime
from simplegeneric import generic
from wsme.rest import RestProtocol
from wsme.controller import register_protocol
import wsme.types
try:
import simplejson as json
except ImportError:
import json
@generic
def tojson(datatype, value):
if wsme.types.isstructured(datatype):
... | Use generic to prepare the json output so that non-structured custom types can be added | Use generic to prepare the json output so that non-structured custom types can be added
| Python | mit | stackforge/wsme | import base64
from wsme.rest import RestProtocol
from wsme.controller import register_protocol
import wsme.types
try:
import simplejson as json
except ImportError:
import json
def prepare_encode(value, datatype):
if datatype in wsme.types.pod_types:
return value
if wsme.types.isstructured(da... | import base64
import datetime
from simplegeneric import generic
from wsme.rest import RestProtocol
from wsme.controller import register_protocol
import wsme.types
try:
import simplejson as json
except ImportError:
import json
@generic
def tojson(datatype, value):
if wsme.types.isstructured(datatype):
... | <commit_before>import base64
from wsme.rest import RestProtocol
from wsme.controller import register_protocol
import wsme.types
try:
import simplejson as json
except ImportError:
import json
def prepare_encode(value, datatype):
if datatype in wsme.types.pod_types:
return value
if wsme.types.... | import base64
import datetime
from simplegeneric import generic
from wsme.rest import RestProtocol
from wsme.controller import register_protocol
import wsme.types
try:
import simplejson as json
except ImportError:
import json
@generic
def tojson(datatype, value):
if wsme.types.isstructured(datatype):
... | import base64
from wsme.rest import RestProtocol
from wsme.controller import register_protocol
import wsme.types
try:
import simplejson as json
except ImportError:
import json
def prepare_encode(value, datatype):
if datatype in wsme.types.pod_types:
return value
if wsme.types.isstructured(da... | <commit_before>import base64
from wsme.rest import RestProtocol
from wsme.controller import register_protocol
import wsme.types
try:
import simplejson as json
except ImportError:
import json
def prepare_encode(value, datatype):
if datatype in wsme.types.pod_types:
return value
if wsme.types.... |
026621ae88fc545de32d47d92d34af5049e48704 | setup.py | setup.py | #! /usr/bin/env python
# coding: utf-8
from setuptools import find_packages, setup
setup(name='egoio',
author='NEXT ENERGY, Reiner Lemoine Institut gGmbH, ZNES',
author_email='[email protected]',
description='ego input/output repository',
version='0.4.5',
url='https://github.... | #! /usr/bin/env python
# coding: utf-8
from setuptools import find_packages, setup
setup(name='egoio',
author='NEXT ENERGY, Reiner Lemoine Institut gGmbH, ZNES',
author_email='[email protected]',
description='ego input/output repository',
version='0.4.5',
url='https://github.... | Remove upper bound for packages | Remove upper bound for packages
oedialect requires sqlalchemy >= 1.2.0 which would make it incompatible with ego.io for no reason | Python | agpl-3.0 | openego/ego.io,openego/ego.io | #! /usr/bin/env python
# coding: utf-8
from setuptools import find_packages, setup
setup(name='egoio',
author='NEXT ENERGY, Reiner Lemoine Institut gGmbH, ZNES',
author_email='[email protected]',
description='ego input/output repository',
version='0.4.5',
url='https://github.... | #! /usr/bin/env python
# coding: utf-8
from setuptools import find_packages, setup
setup(name='egoio',
author='NEXT ENERGY, Reiner Lemoine Institut gGmbH, ZNES',
author_email='[email protected]',
description='ego input/output repository',
version='0.4.5',
url='https://github.... | <commit_before>#! /usr/bin/env python
# coding: utf-8
from setuptools import find_packages, setup
setup(name='egoio',
author='NEXT ENERGY, Reiner Lemoine Institut gGmbH, ZNES',
author_email='[email protected]',
description='ego input/output repository',
version='0.4.5',
url='... | #! /usr/bin/env python
# coding: utf-8
from setuptools import find_packages, setup
setup(name='egoio',
author='NEXT ENERGY, Reiner Lemoine Institut gGmbH, ZNES',
author_email='[email protected]',
description='ego input/output repository',
version='0.4.5',
url='https://github.... | #! /usr/bin/env python
# coding: utf-8
from setuptools import find_packages, setup
setup(name='egoio',
author='NEXT ENERGY, Reiner Lemoine Institut gGmbH, ZNES',
author_email='[email protected]',
description='ego input/output repository',
version='0.4.5',
url='https://github.... | <commit_before>#! /usr/bin/env python
# coding: utf-8
from setuptools import find_packages, setup
setup(name='egoio',
author='NEXT ENERGY, Reiner Lemoine Institut gGmbH, ZNES',
author_email='[email protected]',
description='ego input/output repository',
version='0.4.5',
url='... |
6e6a5cfb39ae3f6ee9d0cfb30a6a33be06839bfa | setup.py | setup.py | #!/usr/bin/env python
from distutils.core import setup, Extension
setup(
name='mapcode',
ext_modules=[Extension('mapcode',
sources=['mapcodemodule.c', 'mapcodelib/mapcoder.c'],
include_dirs=['mapcodelib']
)],
version='0.3',... | #!/usr/bin/env python
from distutils.core import setup, Extension
setup(
name='mapcode',
ext_modules=[Extension('mapcode',
sources=['mapcodemodule.c', 'mapcodelib/mapcoder.c'],
include_dirs=['mapcodelib']
)],
# version numb... | Update module version and tag as v0.4 | Update module version and tag as v0.4
| Python | apache-2.0 | mapcode-foundation/mapcode-python,mapcode-foundation/mapcode-python | #!/usr/bin/env python
from distutils.core import setup, Extension
setup(
name='mapcode',
ext_modules=[Extension('mapcode',
sources=['mapcodemodule.c', 'mapcodelib/mapcoder.c'],
include_dirs=['mapcodelib']
)],
version='0.3',... | #!/usr/bin/env python
from distutils.core import setup, Extension
setup(
name='mapcode',
ext_modules=[Extension('mapcode',
sources=['mapcodemodule.c', 'mapcodelib/mapcoder.c'],
include_dirs=['mapcodelib']
)],
# version numb... | <commit_before>#!/usr/bin/env python
from distutils.core import setup, Extension
setup(
name='mapcode',
ext_modules=[Extension('mapcode',
sources=['mapcodemodule.c', 'mapcodelib/mapcoder.c'],
include_dirs=['mapcodelib']
)],
... | #!/usr/bin/env python
from distutils.core import setup, Extension
setup(
name='mapcode',
ext_modules=[Extension('mapcode',
sources=['mapcodemodule.c', 'mapcodelib/mapcoder.c'],
include_dirs=['mapcodelib']
)],
# version numb... | #!/usr/bin/env python
from distutils.core import setup, Extension
setup(
name='mapcode',
ext_modules=[Extension('mapcode',
sources=['mapcodemodule.c', 'mapcodelib/mapcoder.c'],
include_dirs=['mapcodelib']
)],
version='0.3',... | <commit_before>#!/usr/bin/env python
from distutils.core import setup, Extension
setup(
name='mapcode',
ext_modules=[Extension('mapcode',
sources=['mapcodemodule.c', 'mapcodelib/mapcoder.c'],
include_dirs=['mapcodelib']
)],
... |
7891cf254bb98b65503675a20ed6b013385328cf | setup.py | setup.py | # coding=utf-8
import setuptools
def package_data_dirs(source, sub_folders):
import os
dirs = []
for d in sub_folders:
for dirname, _, files in os.walk(os.path.join(source, d)):
dirname = os.path.relpath(dirname, source)
for f in files:
dirs.append(os.path.join(dirname, f))
return dirs
def params():... | # coding=utf-8
import setuptools
def package_data_dirs(source, sub_folders):
import os
dirs = []
for d in sub_folders:
for dirname, _, files in os.walk(os.path.join(source, d)):
dirname = os.path.relpath(dirname, source)
for f in files:
dirs.append(os.path.join(dirname, f))
return dirs
def params():... | Copy paste error leading to static and template folders not being properly installed along side the package | Copy paste error leading to static and template folders not being properly installed along side the package
| Python | agpl-3.0 | OctoPrint/OctoPrint-Netconnectd,mrbeam/OctoPrint-Netconnectd,mrbeam/OctoPrint-Netconnectd,OctoPrint/OctoPrint-Netconnectd,mrbeam/OctoPrint-Netconnectd | # coding=utf-8
import setuptools
def package_data_dirs(source, sub_folders):
import os
dirs = []
for d in sub_folders:
for dirname, _, files in os.walk(os.path.join(source, d)):
dirname = os.path.relpath(dirname, source)
for f in files:
dirs.append(os.path.join(dirname, f))
return dirs
def params():... | # coding=utf-8
import setuptools
def package_data_dirs(source, sub_folders):
import os
dirs = []
for d in sub_folders:
for dirname, _, files in os.walk(os.path.join(source, d)):
dirname = os.path.relpath(dirname, source)
for f in files:
dirs.append(os.path.join(dirname, f))
return dirs
def params():... | <commit_before># coding=utf-8
import setuptools
def package_data_dirs(source, sub_folders):
import os
dirs = []
for d in sub_folders:
for dirname, _, files in os.walk(os.path.join(source, d)):
dirname = os.path.relpath(dirname, source)
for f in files:
dirs.append(os.path.join(dirname, f))
return dirs... | # coding=utf-8
import setuptools
def package_data_dirs(source, sub_folders):
import os
dirs = []
for d in sub_folders:
for dirname, _, files in os.walk(os.path.join(source, d)):
dirname = os.path.relpath(dirname, source)
for f in files:
dirs.append(os.path.join(dirname, f))
return dirs
def params():... | # coding=utf-8
import setuptools
def package_data_dirs(source, sub_folders):
import os
dirs = []
for d in sub_folders:
for dirname, _, files in os.walk(os.path.join(source, d)):
dirname = os.path.relpath(dirname, source)
for f in files:
dirs.append(os.path.join(dirname, f))
return dirs
def params():... | <commit_before># coding=utf-8
import setuptools
def package_data_dirs(source, sub_folders):
import os
dirs = []
for d in sub_folders:
for dirname, _, files in os.walk(os.path.join(source, d)):
dirname = os.path.relpath(dirname, source)
for f in files:
dirs.append(os.path.join(dirname, f))
return dirs... |
afb40cdfc52a68947433cb732aa6124d6a90f2df | snippet/example/python/project/project/main.py | snippet/example/python/project/project/main.py | #!/usr/bin/python
# encoding: utf8
from __future__ import absolute_import, print_function, unicode_literals
import eventlet
from oslo_config import cfg
from oslo_log import log
# from {PROJECT}.db import api
CONF = cfg.CONF
__VERSION__ = "0.1"
def main(project="example"):
log.register_options(CONF)
# log.... | #!/usr/bin/python
# encoding: utf8
from __future__ import absolute_import, print_function, unicode_literals
import eventlet
from oslo_config import cfg
from oslo_log import log
# from {PROJECT}.db import api
CONF = cfg.CONF
__VERSION__ = "0.1"
project_opts = [
cfg.StrOpt("logging_config_file", default="",
... | Modify the logging configuration in Python Example | Modify the logging configuration in Python Example
| Python | mit | xgfone/snippet,xgfone/snippet,xgfone/snippet,xgfone/snippet,xgfone/snippet,xgfone/snippet,xgfone/snippet | #!/usr/bin/python
# encoding: utf8
from __future__ import absolute_import, print_function, unicode_literals
import eventlet
from oslo_config import cfg
from oslo_log import log
# from {PROJECT}.db import api
CONF = cfg.CONF
__VERSION__ = "0.1"
def main(project="example"):
log.register_options(CONF)
# log.... | #!/usr/bin/python
# encoding: utf8
from __future__ import absolute_import, print_function, unicode_literals
import eventlet
from oslo_config import cfg
from oslo_log import log
# from {PROJECT}.db import api
CONF = cfg.CONF
__VERSION__ = "0.1"
project_opts = [
cfg.StrOpt("logging_config_file", default="",
... | <commit_before>#!/usr/bin/python
# encoding: utf8
from __future__ import absolute_import, print_function, unicode_literals
import eventlet
from oslo_config import cfg
from oslo_log import log
# from {PROJECT}.db import api
CONF = cfg.CONF
__VERSION__ = "0.1"
def main(project="example"):
log.register_options(C... | #!/usr/bin/python
# encoding: utf8
from __future__ import absolute_import, print_function, unicode_literals
import eventlet
from oslo_config import cfg
from oslo_log import log
# from {PROJECT}.db import api
CONF = cfg.CONF
__VERSION__ = "0.1"
project_opts = [
cfg.StrOpt("logging_config_file", default="",
... | #!/usr/bin/python
# encoding: utf8
from __future__ import absolute_import, print_function, unicode_literals
import eventlet
from oslo_config import cfg
from oslo_log import log
# from {PROJECT}.db import api
CONF = cfg.CONF
__VERSION__ = "0.1"
def main(project="example"):
log.register_options(CONF)
# log.... | <commit_before>#!/usr/bin/python
# encoding: utf8
from __future__ import absolute_import, print_function, unicode_literals
import eventlet
from oslo_config import cfg
from oslo_log import log
# from {PROJECT}.db import api
CONF = cfg.CONF
__VERSION__ = "0.1"
def main(project="example"):
log.register_options(C... |
101e4832b8fa9fa9da0b447c4c52fb3bd0e3c6a9 | ratechecker/migrations/0002_remove_fee_loader.py | ratechecker/migrations/0002_remove_fee_loader.py | # -*- coding: utf-8 -*-
# Generated by Django 1.11.22 on 2019-10-31 16:33
from __future__ import unicode_literals
from django.db import migrations, OperationalError, ProgrammingError
def fix_fee_product_index(apps, schema_editor):
try:
schema_editor.execute(
'DROP INDEX idx_16977_product_id;'
... | # -*- coding: utf-8 -*-
# Generated by Django 1.11.22 on 2019-10-31 16:33
from __future__ import unicode_literals
from django.db import migrations, OperationalError, ProgrammingError
def fix_fee_product_index(apps, schema_editor):
try:
schema_editor.execute(
'ALTER TABLE IF EXISTS cfpb.rateche... | Remove DROP INDEX from fix_fee_product_index | Remove DROP INDEX from fix_fee_product_index
| Python | cc0-1.0 | cfpb/owning-a-home-api | # -*- coding: utf-8 -*-
# Generated by Django 1.11.22 on 2019-10-31 16:33
from __future__ import unicode_literals
from django.db import migrations, OperationalError, ProgrammingError
def fix_fee_product_index(apps, schema_editor):
try:
schema_editor.execute(
'DROP INDEX idx_16977_product_id;'
... | # -*- coding: utf-8 -*-
# Generated by Django 1.11.22 on 2019-10-31 16:33
from __future__ import unicode_literals
from django.db import migrations, OperationalError, ProgrammingError
def fix_fee_product_index(apps, schema_editor):
try:
schema_editor.execute(
'ALTER TABLE IF EXISTS cfpb.rateche... | <commit_before># -*- coding: utf-8 -*-
# Generated by Django 1.11.22 on 2019-10-31 16:33
from __future__ import unicode_literals
from django.db import migrations, OperationalError, ProgrammingError
def fix_fee_product_index(apps, schema_editor):
try:
schema_editor.execute(
'DROP INDEX idx_1697... | # -*- coding: utf-8 -*-
# Generated by Django 1.11.22 on 2019-10-31 16:33
from __future__ import unicode_literals
from django.db import migrations, OperationalError, ProgrammingError
def fix_fee_product_index(apps, schema_editor):
try:
schema_editor.execute(
'ALTER TABLE IF EXISTS cfpb.rateche... | # -*- coding: utf-8 -*-
# Generated by Django 1.11.22 on 2019-10-31 16:33
from __future__ import unicode_literals
from django.db import migrations, OperationalError, ProgrammingError
def fix_fee_product_index(apps, schema_editor):
try:
schema_editor.execute(
'DROP INDEX idx_16977_product_id;'
... | <commit_before># -*- coding: utf-8 -*-
# Generated by Django 1.11.22 on 2019-10-31 16:33
from __future__ import unicode_literals
from django.db import migrations, OperationalError, ProgrammingError
def fix_fee_product_index(apps, schema_editor):
try:
schema_editor.execute(
'DROP INDEX idx_1697... |
5eebd015d8a3d7c562f49df7adf31712ecea8ef0 | scripts/scrape-ecdc-list.py | scripts/scrape-ecdc-list.py | #!/usr/bin/env python
import requests
import lxml.html
import pandas as pd
import sys
URL = "http://ecdc.europa.eu/en/healthtopics/zika_virus_infection/zika-outbreak/Pages/Zika-countries-with-transmission.aspx"
columns_old = [
"country",
"affected_past_nine_months",
"affected_past_two_months"
]
columns_n... | #!/usr/bin/env python
import requests
import lxml.html
import pandas as pd
import sys
URL = "http://ecdc.europa.eu/en/healthtopics/zika_virus_infection/zika-outbreak/Pages/Zika-countries-with-transmission.aspx"
columns_old = [
"country",
"affected_past_nine_months",
"affected_past_two_months"
]
columns_n... | Tweak ECDC scraper to strip whitespace | Tweak ECDC scraper to strip whitespace
| Python | mit | BuzzFeedNews/zika-data | #!/usr/bin/env python
import requests
import lxml.html
import pandas as pd
import sys
URL = "http://ecdc.europa.eu/en/healthtopics/zika_virus_infection/zika-outbreak/Pages/Zika-countries-with-transmission.aspx"
columns_old = [
"country",
"affected_past_nine_months",
"affected_past_two_months"
]
columns_n... | #!/usr/bin/env python
import requests
import lxml.html
import pandas as pd
import sys
URL = "http://ecdc.europa.eu/en/healthtopics/zika_virus_infection/zika-outbreak/Pages/Zika-countries-with-transmission.aspx"
columns_old = [
"country",
"affected_past_nine_months",
"affected_past_two_months"
]
columns_n... | <commit_before>#!/usr/bin/env python
import requests
import lxml.html
import pandas as pd
import sys
URL = "http://ecdc.europa.eu/en/healthtopics/zika_virus_infection/zika-outbreak/Pages/Zika-countries-with-transmission.aspx"
columns_old = [
"country",
"affected_past_nine_months",
"affected_past_two_month... | #!/usr/bin/env python
import requests
import lxml.html
import pandas as pd
import sys
URL = "http://ecdc.europa.eu/en/healthtopics/zika_virus_infection/zika-outbreak/Pages/Zika-countries-with-transmission.aspx"
columns_old = [
"country",
"affected_past_nine_months",
"affected_past_two_months"
]
columns_n... | #!/usr/bin/env python
import requests
import lxml.html
import pandas as pd
import sys
URL = "http://ecdc.europa.eu/en/healthtopics/zika_virus_infection/zika-outbreak/Pages/Zika-countries-with-transmission.aspx"
columns_old = [
"country",
"affected_past_nine_months",
"affected_past_two_months"
]
columns_n... | <commit_before>#!/usr/bin/env python
import requests
import lxml.html
import pandas as pd
import sys
URL = "http://ecdc.europa.eu/en/healthtopics/zika_virus_infection/zika-outbreak/Pages/Zika-countries-with-transmission.aspx"
columns_old = [
"country",
"affected_past_nine_months",
"affected_past_two_month... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.