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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
5edb070308e2597047f82ecb44cb84b314b488c9 | qotr/handlers/base.py | qotr/handlers/base.py | import logging
from fnmatch import fnmatch
from tornado import web
from qotr.config import config
L = logging.getLogger(__name__)
ALLOWED_ORIGINS = [o.strip() for o in config.allowed_origin.split(',')]
def set_cors_headers(handler):
'''
Given a handler, set the CORS headers on it.
'''
origin = hand... | import logging
from fnmatch import fnmatch
from tornado import web
from qotr.config import config
L = logging.getLogger(__name__)
ALLOWED_ORIGINS = [o.strip() for o in config.allowed_origin.split(',')]
def set_cors_headers(handler):
'''
Given a handler, set the CORS headers on it.
'''
origin = hand... | Use blank string instead of None as default origin | Use blank string instead of None as default origin
Signed-off-by: Rohan Jain <f3a935f2cb7c3d75d1446a19169b923809d6e623@gmail.com>
| Python | agpl-3.0 | crodjer/qotr,sbuss/qotr,crodjer/qotr,sbuss/qotr,rmoorman/qotr,curtiszimmerman/qotr,curtiszimmerman/qotr,sbuss/qotr,rmoorman/qotr,crodjer/qotr,sbuss/qotr,curtiszimmerman/qotr,rmoorman/qotr,crodjer/qotr,curtiszimmerman/qotr,rmoorman/qotr | import logging
from fnmatch import fnmatch
from tornado import web
from qotr.config import config
L = logging.getLogger(__name__)
ALLOWED_ORIGINS = [o.strip() for o in config.allowed_origin.split(',')]
def set_cors_headers(handler):
'''
Given a handler, set the CORS headers on it.
'''
origin = hand... | import logging
from fnmatch import fnmatch
from tornado import web
from qotr.config import config
L = logging.getLogger(__name__)
ALLOWED_ORIGINS = [o.strip() for o in config.allowed_origin.split(',')]
def set_cors_headers(handler):
'''
Given a handler, set the CORS headers on it.
'''
origin = hand... | <commit_before>import logging
from fnmatch import fnmatch
from tornado import web
from qotr.config import config
L = logging.getLogger(__name__)
ALLOWED_ORIGINS = [o.strip() for o in config.allowed_origin.split(',')]
def set_cors_headers(handler):
'''
Given a handler, set the CORS headers on it.
'''
... | import logging
from fnmatch import fnmatch
from tornado import web
from qotr.config import config
L = logging.getLogger(__name__)
ALLOWED_ORIGINS = [o.strip() for o in config.allowed_origin.split(',')]
def set_cors_headers(handler):
'''
Given a handler, set the CORS headers on it.
'''
origin = hand... | import logging
from fnmatch import fnmatch
from tornado import web
from qotr.config import config
L = logging.getLogger(__name__)
ALLOWED_ORIGINS = [o.strip() for o in config.allowed_origin.split(',')]
def set_cors_headers(handler):
'''
Given a handler, set the CORS headers on it.
'''
origin = hand... | <commit_before>import logging
from fnmatch import fnmatch
from tornado import web
from qotr.config import config
L = logging.getLogger(__name__)
ALLOWED_ORIGINS = [o.strip() for o in config.allowed_origin.split(',')]
def set_cors_headers(handler):
'''
Given a handler, set the CORS headers on it.
'''
... |
0adadcb3f04e2ecb98b5ca5de1afba2ba7208d23 | spacy/tests/parser/test_beam_parse.py | spacy/tests/parser/test_beam_parse.py | import spacy
import pytest
@pytest.mark.models
def test_beam_parse():
nlp = spacy.load('en_core_web_sm')
doc = nlp(u'Australia is a country', disable=['ner'])
ents = nlp.entity(doc, beam_width=2)
print(ents)
| # coding: utf8
from __future__ import unicode_literals
import pytest
@pytest.mark.models('en')
def test_beam_parse(EN):
doc = EN(u'Australia is a country', disable=['ner'])
ents = EN.entity(doc, beam_width=2)
print(ents)
| Fix beam parse model test | Fix beam parse model test
| Python | mit | aikramer2/spaCy,spacy-io/spaCy,recognai/spaCy,recognai/spaCy,explosion/spaCy,recognai/spaCy,explosion/spaCy,spacy-io/spaCy,recognai/spaCy,explosion/spaCy,spacy-io/spaCy,spacy-io/spaCy,aikramer2/spaCy,explosion/spaCy,spacy-io/spaCy,aikramer2/spaCy,spacy-io/spaCy,honnibal/spaCy,explosion/spaCy,honnibal/spaCy,aikramer2/sp... | import spacy
import pytest
@pytest.mark.models
def test_beam_parse():
nlp = spacy.load('en_core_web_sm')
doc = nlp(u'Australia is a country', disable=['ner'])
ents = nlp.entity(doc, beam_width=2)
print(ents)
Fix beam parse model test | # coding: utf8
from __future__ import unicode_literals
import pytest
@pytest.mark.models('en')
def test_beam_parse(EN):
doc = EN(u'Australia is a country', disable=['ner'])
ents = EN.entity(doc, beam_width=2)
print(ents)
| <commit_before>import spacy
import pytest
@pytest.mark.models
def test_beam_parse():
nlp = spacy.load('en_core_web_sm')
doc = nlp(u'Australia is a country', disable=['ner'])
ents = nlp.entity(doc, beam_width=2)
print(ents)
<commit_msg>Fix beam parse model test<commit_after> | # coding: utf8
from __future__ import unicode_literals
import pytest
@pytest.mark.models('en')
def test_beam_parse(EN):
doc = EN(u'Australia is a country', disable=['ner'])
ents = EN.entity(doc, beam_width=2)
print(ents)
| import spacy
import pytest
@pytest.mark.models
def test_beam_parse():
nlp = spacy.load('en_core_web_sm')
doc = nlp(u'Australia is a country', disable=['ner'])
ents = nlp.entity(doc, beam_width=2)
print(ents)
Fix beam parse model test# coding: utf8
from __future__ import unicode_literals
import pytest... | <commit_before>import spacy
import pytest
@pytest.mark.models
def test_beam_parse():
nlp = spacy.load('en_core_web_sm')
doc = nlp(u'Australia is a country', disable=['ner'])
ents = nlp.entity(doc, beam_width=2)
print(ents)
<commit_msg>Fix beam parse model test<commit_after># coding: utf8
from __future... |
1f2deb95ba543bf05dd78f1df2e9ee6d17a2c4c3 | buffer/tests/test_profiles_manager.py | buffer/tests/test_profiles_manager.py | import json
from nose.tools import eq_, raises
from mock import MagicMock, patch
from buffer.managers.profiles import Profiles
from buffer.models.profile import PATHS
mocked_response = {
'name': 'me',
'service': 'twiter',
'id': 1
}
def test_profiles_manager_all_method():
'''
Test basic profiles retrievi... | import json
from nose.tools import eq_, raises
from mock import MagicMock, patch
from buffer.managers.profiles import Profiles
from buffer.models.profile import Profile, PATHS
mocked_response = {
'name': 'me',
'service': 'twiter',
'id': 1
}
def test_profiles_manager_all_method():
'''
Test basic profiles... | Test profiles manager filterting method | Test profiles manager filterting method
| Python | mit | vtemian/buffpy,bufferapp/buffer-python | import json
from nose.tools import eq_, raises
from mock import MagicMock, patch
from buffer.managers.profiles import Profiles
from buffer.models.profile import PATHS
mocked_response = {
'name': 'me',
'service': 'twiter',
'id': 1
}
def test_profiles_manager_all_method():
'''
Test basic profiles retrievi... | import json
from nose.tools import eq_, raises
from mock import MagicMock, patch
from buffer.managers.profiles import Profiles
from buffer.models.profile import Profile, PATHS
mocked_response = {
'name': 'me',
'service': 'twiter',
'id': 1
}
def test_profiles_manager_all_method():
'''
Test basic profiles... | <commit_before>import json
from nose.tools import eq_, raises
from mock import MagicMock, patch
from buffer.managers.profiles import Profiles
from buffer.models.profile import PATHS
mocked_response = {
'name': 'me',
'service': 'twiter',
'id': 1
}
def test_profiles_manager_all_method():
'''
Test basic pr... | import json
from nose.tools import eq_, raises
from mock import MagicMock, patch
from buffer.managers.profiles import Profiles
from buffer.models.profile import Profile, PATHS
mocked_response = {
'name': 'me',
'service': 'twiter',
'id': 1
}
def test_profiles_manager_all_method():
'''
Test basic profiles... | import json
from nose.tools import eq_, raises
from mock import MagicMock, patch
from buffer.managers.profiles import Profiles
from buffer.models.profile import PATHS
mocked_response = {
'name': 'me',
'service': 'twiter',
'id': 1
}
def test_profiles_manager_all_method():
'''
Test basic profiles retrievi... | <commit_before>import json
from nose.tools import eq_, raises
from mock import MagicMock, patch
from buffer.managers.profiles import Profiles
from buffer.models.profile import PATHS
mocked_response = {
'name': 'me',
'service': 'twiter',
'id': 1
}
def test_profiles_manager_all_method():
'''
Test basic pr... |
7469a750a7303b346a91376ae16dc42b69208c18 | pm/utils/filesystem.py | pm/utils/filesystem.py | """ Filesystem utilities
"""
import contextlib
import os
RUN_RE = '\d{6}_[a-zA-Z\d]+_\d{4}_[AB][A-Z\d]{9}'
@contextlib.contextmanager
def chdir(new_dir):
"""Context manager to temporarily change to a new directory.
"""
cur_dir = os.getcwd()
# This is weird behavior. I'm removing and and we'll see if a... | """ Filesystem utilities
"""
import contextlib
import os
RUN_RE = '\d{6}_[a-zA-Z\d\-]+_\d{4}_[AB][A-Z\d]{9}'
@contextlib.contextmanager
def chdir(new_dir):
"""Context manager to temporarily change to a new directory.
"""
cur_dir = os.getcwd()
# This is weird behavior. I'm removing and and we'll see if... | Support for X-Ten machine IDs | Support for X-Ten machine IDs
| Python | mit | SciLifeLab/TACA,SciLifeLab/TACA,kate-v-stepanova/TACA,senthil10/TACA,b97pla/TACA,guillermo-carrasco/TACA,kate-v-stepanova/TACA,SciLifeLab/TACA,senthil10/TACA,vezzi/TACA,b97pla/TACA,guillermo-carrasco/TACA,vezzi/TACA | """ Filesystem utilities
"""
import contextlib
import os
RUN_RE = '\d{6}_[a-zA-Z\d]+_\d{4}_[AB][A-Z\d]{9}'
@contextlib.contextmanager
def chdir(new_dir):
"""Context manager to temporarily change to a new directory.
"""
cur_dir = os.getcwd()
# This is weird behavior. I'm removing and and we'll see if a... | """ Filesystem utilities
"""
import contextlib
import os
RUN_RE = '\d{6}_[a-zA-Z\d\-]+_\d{4}_[AB][A-Z\d]{9}'
@contextlib.contextmanager
def chdir(new_dir):
"""Context manager to temporarily change to a new directory.
"""
cur_dir = os.getcwd()
# This is weird behavior. I'm removing and and we'll see if... | <commit_before>""" Filesystem utilities
"""
import contextlib
import os
RUN_RE = '\d{6}_[a-zA-Z\d]+_\d{4}_[AB][A-Z\d]{9}'
@contextlib.contextmanager
def chdir(new_dir):
"""Context manager to temporarily change to a new directory.
"""
cur_dir = os.getcwd()
# This is weird behavior. I'm removing and and... | """ Filesystem utilities
"""
import contextlib
import os
RUN_RE = '\d{6}_[a-zA-Z\d\-]+_\d{4}_[AB][A-Z\d]{9}'
@contextlib.contextmanager
def chdir(new_dir):
"""Context manager to temporarily change to a new directory.
"""
cur_dir = os.getcwd()
# This is weird behavior. I'm removing and and we'll see if... | """ Filesystem utilities
"""
import contextlib
import os
RUN_RE = '\d{6}_[a-zA-Z\d]+_\d{4}_[AB][A-Z\d]{9}'
@contextlib.contextmanager
def chdir(new_dir):
"""Context manager to temporarily change to a new directory.
"""
cur_dir = os.getcwd()
# This is weird behavior. I'm removing and and we'll see if a... | <commit_before>""" Filesystem utilities
"""
import contextlib
import os
RUN_RE = '\d{6}_[a-zA-Z\d]+_\d{4}_[AB][A-Z\d]{9}'
@contextlib.contextmanager
def chdir(new_dir):
"""Context manager to temporarily change to a new directory.
"""
cur_dir = os.getcwd()
# This is weird behavior. I'm removing and and... |
8d3931fd5effabf9c5d56cb03ae15630ae984963 | postalcodes_mexico/cli.py | postalcodes_mexico/cli.py | # -*- coding: utf-8 -*-
"""Console script for postalcodes_mexico."""
import sys
import click
@click.command()
def main(args=None):
"""Console script for postalcodes_mexico."""
click.echo("Replace this message by putting your code into "
"postalcodes_mexico.cli.main")
click.echo("See click ... | # -*- coding: utf-8 -*-
"""Console script for postalcodes_mexico."""
import sys
import click
from postalcodes_mexico import postalcodes_mexico
@click.command()
@click.argument('postalcode', type=str)
def main(postalcode):
"""Console script for postalcodes_mexico."""
places = postalcodes_mexico.places(postal... | Create simple CLI for the `places` function | Create simple CLI for the `places` function
| Python | mit | FlowFX/postalcodes_mexico | # -*- coding: utf-8 -*-
"""Console script for postalcodes_mexico."""
import sys
import click
@click.command()
def main(args=None):
"""Console script for postalcodes_mexico."""
click.echo("Replace this message by putting your code into "
"postalcodes_mexico.cli.main")
click.echo("See click ... | # -*- coding: utf-8 -*-
"""Console script for postalcodes_mexico."""
import sys
import click
from postalcodes_mexico import postalcodes_mexico
@click.command()
@click.argument('postalcode', type=str)
def main(postalcode):
"""Console script for postalcodes_mexico."""
places = postalcodes_mexico.places(postal... | <commit_before># -*- coding: utf-8 -*-
"""Console script for postalcodes_mexico."""
import sys
import click
@click.command()
def main(args=None):
"""Console script for postalcodes_mexico."""
click.echo("Replace this message by putting your code into "
"postalcodes_mexico.cli.main")
click.e... | # -*- coding: utf-8 -*-
"""Console script for postalcodes_mexico."""
import sys
import click
from postalcodes_mexico import postalcodes_mexico
@click.command()
@click.argument('postalcode', type=str)
def main(postalcode):
"""Console script for postalcodes_mexico."""
places = postalcodes_mexico.places(postal... | # -*- coding: utf-8 -*-
"""Console script for postalcodes_mexico."""
import sys
import click
@click.command()
def main(args=None):
"""Console script for postalcodes_mexico."""
click.echo("Replace this message by putting your code into "
"postalcodes_mexico.cli.main")
click.echo("See click ... | <commit_before># -*- coding: utf-8 -*-
"""Console script for postalcodes_mexico."""
import sys
import click
@click.command()
def main(args=None):
"""Console script for postalcodes_mexico."""
click.echo("Replace this message by putting your code into "
"postalcodes_mexico.cli.main")
click.e... |
006b645315190eb532ede9c36c77a7fbc4c27237 | quotations/apps/api/v1.py | quotations/apps/api/v1.py | from tastypie.authorization import DjangoAuthorization
from tastypie import fields
from tastypie.resources import ModelResource, ALL_WITH_RELATIONS
from quotations.apps.quotations import models as quotations_models
from quotations.libs.auth import MethodAuthentication
from quotations.libs.serializers import Serializer
... | from tastypie.authorization import DjangoAuthorization
from tastypie import fields
from tastypie.resources import ModelResource, ALL_WITH_RELATIONS
from quotations.apps.quotations import models as quotations_models
from quotations.libs.auth import MethodAuthentication
from quotations.libs.serializers import Serializer
... | Allow retrieval of a random quote | Allow retrieval of a random quote
| Python | mit | jessamynsmith/socialjusticebingo,jessamynsmith/underquoted,jessamynsmith/socialjusticebingo,jessamynsmith/underquoted,jessamynsmith/underquoted,jessamynsmith/socialjusticebingo,jessamynsmith/underquoted | from tastypie.authorization import DjangoAuthorization
from tastypie import fields
from tastypie.resources import ModelResource, ALL_WITH_RELATIONS
from quotations.apps.quotations import models as quotations_models
from quotations.libs.auth import MethodAuthentication
from quotations.libs.serializers import Serializer
... | from tastypie.authorization import DjangoAuthorization
from tastypie import fields
from tastypie.resources import ModelResource, ALL_WITH_RELATIONS
from quotations.apps.quotations import models as quotations_models
from quotations.libs.auth import MethodAuthentication
from quotations.libs.serializers import Serializer
... | <commit_before>from tastypie.authorization import DjangoAuthorization
from tastypie import fields
from tastypie.resources import ModelResource, ALL_WITH_RELATIONS
from quotations.apps.quotations import models as quotations_models
from quotations.libs.auth import MethodAuthentication
from quotations.libs.serializers imp... | from tastypie.authorization import DjangoAuthorization
from tastypie import fields
from tastypie.resources import ModelResource, ALL_WITH_RELATIONS
from quotations.apps.quotations import models as quotations_models
from quotations.libs.auth import MethodAuthentication
from quotations.libs.serializers import Serializer
... | from tastypie.authorization import DjangoAuthorization
from tastypie import fields
from tastypie.resources import ModelResource, ALL_WITH_RELATIONS
from quotations.apps.quotations import models as quotations_models
from quotations.libs.auth import MethodAuthentication
from quotations.libs.serializers import Serializer
... | <commit_before>from tastypie.authorization import DjangoAuthorization
from tastypie import fields
from tastypie.resources import ModelResource, ALL_WITH_RELATIONS
from quotations.apps.quotations import models as quotations_models
from quotations.libs.auth import MethodAuthentication
from quotations.libs.serializers imp... |
8be6b576007f89fad50ea1dfacad46614c0a97c5 | apps/domain/src/main/core/exceptions.py | apps/domain/src/main/core/exceptions.py | """Specific PyGrid exceptions."""
class PyGridError(Exception):
def __init__(self, message):
super().__init__(message)
class AuthorizationError(PyGridError):
def __init__(self, message=""):
if not message:
message = "User is not authorized for this operation!"
super().__i... | """Specific PyGrid exceptions."""
class PyGridError(Exception):
def __init__(self, message):
super().__init__(message)
class AuthorizationError(PyGridError):
def __init__(self, message=""):
if not message:
message = "User is not authorized for this operation!"
super().__i... | ADD new exception -> EnvironmentNotFound! | ADD new exception -> EnvironmentNotFound!
| Python | apache-2.0 | OpenMined/PySyft,OpenMined/PySyft,OpenMined/PySyft,OpenMined/PySyft | """Specific PyGrid exceptions."""
class PyGridError(Exception):
def __init__(self, message):
super().__init__(message)
class AuthorizationError(PyGridError):
def __init__(self, message=""):
if not message:
message = "User is not authorized for this operation!"
super().__i... | """Specific PyGrid exceptions."""
class PyGridError(Exception):
def __init__(self, message):
super().__init__(message)
class AuthorizationError(PyGridError):
def __init__(self, message=""):
if not message:
message = "User is not authorized for this operation!"
super().__i... | <commit_before>"""Specific PyGrid exceptions."""
class PyGridError(Exception):
def __init__(self, message):
super().__init__(message)
class AuthorizationError(PyGridError):
def __init__(self, message=""):
if not message:
message = "User is not authorized for this operation!"
... | """Specific PyGrid exceptions."""
class PyGridError(Exception):
def __init__(self, message):
super().__init__(message)
class AuthorizationError(PyGridError):
def __init__(self, message=""):
if not message:
message = "User is not authorized for this operation!"
super().__i... | """Specific PyGrid exceptions."""
class PyGridError(Exception):
def __init__(self, message):
super().__init__(message)
class AuthorizationError(PyGridError):
def __init__(self, message=""):
if not message:
message = "User is not authorized for this operation!"
super().__i... | <commit_before>"""Specific PyGrid exceptions."""
class PyGridError(Exception):
def __init__(self, message):
super().__init__(message)
class AuthorizationError(PyGridError):
def __init__(self, message=""):
if not message:
message = "User is not authorized for this operation!"
... |
8c65f7e2e075bae468401a1eee799251c1d928df | raspberry_pi/config.py | raspberry_pi/config.py | #!/usr/bin/env python2
'''
More complex configuration, to run in addition to 'config.sh'.
'''
if raw_input('Set USB sound card as default ? [y][N]') in 'y', 'Y', 'yes':
original = open('/etc/modprobe.d/alsa-base.conf').read()
modified = original.replace('options snd-usb-audio index=-2', 'options snd-usb-a... | #!/usr/bin/env python2
'''
More complex configuration, to run in addition to 'config.sh'.
'''
if raw_input('Set USB sound card as default ? [y][N]') in 'y', 'Y', 'yes':
original = open('/etc/modprobe.d/alsa-base.conf').read()
modified = original.replace('options snd-usb-audio index=-2', 'options snd-usb-a... | Fix for Delay warnings when using USB audio (untested) | Fix for Delay warnings when using USB audio (untested) | Python | agpl-3.0 | oksome/Home,oksome/Home,oksome/Home | #!/usr/bin/env python2
'''
More complex configuration, to run in addition to 'config.sh'.
'''
if raw_input('Set USB sound card as default ? [y][N]') in 'y', 'Y', 'yes':
original = open('/etc/modprobe.d/alsa-base.conf').read()
modified = original.replace('options snd-usb-audio index=-2', 'options snd-usb-a... | #!/usr/bin/env python2
'''
More complex configuration, to run in addition to 'config.sh'.
'''
if raw_input('Set USB sound card as default ? [y][N]') in 'y', 'Y', 'yes':
original = open('/etc/modprobe.d/alsa-base.conf').read()
modified = original.replace('options snd-usb-audio index=-2', 'options snd-usb-a... | <commit_before>#!/usr/bin/env python2
'''
More complex configuration, to run in addition to 'config.sh'.
'''
if raw_input('Set USB sound card as default ? [y][N]') in 'y', 'Y', 'yes':
original = open('/etc/modprobe.d/alsa-base.conf').read()
modified = original.replace('options snd-usb-audio index=-2', 'op... | #!/usr/bin/env python2
'''
More complex configuration, to run in addition to 'config.sh'.
'''
if raw_input('Set USB sound card as default ? [y][N]') in 'y', 'Y', 'yes':
original = open('/etc/modprobe.d/alsa-base.conf').read()
modified = original.replace('options snd-usb-audio index=-2', 'options snd-usb-a... | #!/usr/bin/env python2
'''
More complex configuration, to run in addition to 'config.sh'.
'''
if raw_input('Set USB sound card as default ? [y][N]') in 'y', 'Y', 'yes':
original = open('/etc/modprobe.d/alsa-base.conf').read()
modified = original.replace('options snd-usb-audio index=-2', 'options snd-usb-a... | <commit_before>#!/usr/bin/env python2
'''
More complex configuration, to run in addition to 'config.sh'.
'''
if raw_input('Set USB sound card as default ? [y][N]') in 'y', 'Y', 'yes':
original = open('/etc/modprobe.d/alsa-base.conf').read()
modified = original.replace('options snd-usb-audio index=-2', 'op... |
e0b82cf9ed24870cb313328e5539acc5fe7f6508 | stock_awesome/levels/chock_a_block.py | stock_awesome/levels/chock_a_block.py | import time
from stock_awesome.obj import market
def main():
"""
Algorithm: Wait for an ask, then send a fill or kill for the quantity of the ask at the ask
price.
"""
m = market.StockAPI('WEB29978261', 'NOWUEX', 'BBCM')
#collection of orders placed
orders = {}
filled = 0
upper... | import time
from stock_awesome.obj import market
def main():
"""
Algorithm: Wait for an ask, then send a fill or kill for the quantity of the ask at the ask
price.
"""
m = market.StockAPI('RAJ40214463', 'SSMCEX', 'IPSO')
#collection of orders placed
orders = {}
filled = 0
upper... | Add some (inefective) score maximizing attempts | Add some (inefective) score maximizing attempts
| Python | mit | ForeverWintr/stock_awesome | import time
from stock_awesome.obj import market
def main():
"""
Algorithm: Wait for an ask, then send a fill or kill for the quantity of the ask at the ask
price.
"""
m = market.StockAPI('WEB29978261', 'NOWUEX', 'BBCM')
#collection of orders placed
orders = {}
filled = 0
upper... | import time
from stock_awesome.obj import market
def main():
"""
Algorithm: Wait for an ask, then send a fill or kill for the quantity of the ask at the ask
price.
"""
m = market.StockAPI('RAJ40214463', 'SSMCEX', 'IPSO')
#collection of orders placed
orders = {}
filled = 0
upper... | <commit_before>import time
from stock_awesome.obj import market
def main():
"""
Algorithm: Wait for an ask, then send a fill or kill for the quantity of the ask at the ask
price.
"""
m = market.StockAPI('WEB29978261', 'NOWUEX', 'BBCM')
#collection of orders placed
orders = {}
filled... | import time
from stock_awesome.obj import market
def main():
"""
Algorithm: Wait for an ask, then send a fill or kill for the quantity of the ask at the ask
price.
"""
m = market.StockAPI('RAJ40214463', 'SSMCEX', 'IPSO')
#collection of orders placed
orders = {}
filled = 0
upper... | import time
from stock_awesome.obj import market
def main():
"""
Algorithm: Wait for an ask, then send a fill or kill for the quantity of the ask at the ask
price.
"""
m = market.StockAPI('WEB29978261', 'NOWUEX', 'BBCM')
#collection of orders placed
orders = {}
filled = 0
upper... | <commit_before>import time
from stock_awesome.obj import market
def main():
"""
Algorithm: Wait for an ask, then send a fill or kill for the quantity of the ask at the ask
price.
"""
m = market.StockAPI('WEB29978261', 'NOWUEX', 'BBCM')
#collection of orders placed
orders = {}
filled... |
89193a6571dd74501533160b409cad8835c51625 | gcframe/tests/urls.py | gcframe/tests/urls.py | # -*- coding: utf-8 -*-
""" Simple urls for use in testing the gcframe app. """
from __future__ import unicode_literals
# The defaults module is deprecated in Django 1.5, but necessary to
# support Django 1.3. drop ``.defaults`` when dropping 1.3 support.
from django.conf.urls.defaults import patterns, url
from .vi... | # -*- coding: utf-8 -*-
""" Simple urls for use in testing the gcframe app. """
from __future__ import unicode_literals
try:
from django.conf.urls import patterns, url
except ImportError: # Django 1.3
from django.conf.urls.defaults import patterns, url
from .views import normal, framed, exempt
urlpattern... | Handle a Django deprecation properly. | Handle a Django deprecation properly.
Should have done this in commit cb4eae7b7.
| Python | bsd-3-clause | benspaulding/django-gcframe | # -*- coding: utf-8 -*-
""" Simple urls for use in testing the gcframe app. """
from __future__ import unicode_literals
# The defaults module is deprecated in Django 1.5, but necessary to
# support Django 1.3. drop ``.defaults`` when dropping 1.3 support.
from django.conf.urls.defaults import patterns, url
from .vi... | # -*- coding: utf-8 -*-
""" Simple urls for use in testing the gcframe app. """
from __future__ import unicode_literals
try:
from django.conf.urls import patterns, url
except ImportError: # Django 1.3
from django.conf.urls.defaults import patterns, url
from .views import normal, framed, exempt
urlpattern... | <commit_before># -*- coding: utf-8 -*-
""" Simple urls for use in testing the gcframe app. """
from __future__ import unicode_literals
# The defaults module is deprecated in Django 1.5, but necessary to
# support Django 1.3. drop ``.defaults`` when dropping 1.3 support.
from django.conf.urls.defaults import patterns... | # -*- coding: utf-8 -*-
""" Simple urls for use in testing the gcframe app. """
from __future__ import unicode_literals
try:
from django.conf.urls import patterns, url
except ImportError: # Django 1.3
from django.conf.urls.defaults import patterns, url
from .views import normal, framed, exempt
urlpattern... | # -*- coding: utf-8 -*-
""" Simple urls for use in testing the gcframe app. """
from __future__ import unicode_literals
# The defaults module is deprecated in Django 1.5, but necessary to
# support Django 1.3. drop ``.defaults`` when dropping 1.3 support.
from django.conf.urls.defaults import patterns, url
from .vi... | <commit_before># -*- coding: utf-8 -*-
""" Simple urls for use in testing the gcframe app. """
from __future__ import unicode_literals
# The defaults module is deprecated in Django 1.5, but necessary to
# support Django 1.3. drop ``.defaults`` when dropping 1.3 support.
from django.conf.urls.defaults import patterns... |
242b3bfe70d90044d2496cbc8109cd703b3bccab | greengraph/command.py | greengraph/command.py | from argparse import ArgumentParser
from matplotlib import pyplot as plt
from graph import Greengraph
def process():
parser = ArgumentParser(
description="Produce graph of green land between two locations")
parser.add_argument("--start", required=True,
help="The starting locatio... | from argparse import ArgumentParser
from matplotlib import pyplot as plt
from graph import Greengraph
def process():
parser = ArgumentParser(
description="Produce graph quantifying the amount of green land between two locations")
parser.add_argument("--start", required=True,
he... | Make steps and out arguments optional and add defaults | Make steps and out arguments optional and add defaults
| Python | mit | MikeVasmer/GreenGraphCoursework | from argparse import ArgumentParser
from matplotlib import pyplot as plt
from graph import Greengraph
def process():
parser = ArgumentParser(
description="Produce graph of green land between two locations")
parser.add_argument("--start", required=True,
help="The starting locatio... | from argparse import ArgumentParser
from matplotlib import pyplot as plt
from graph import Greengraph
def process():
parser = ArgumentParser(
description="Produce graph quantifying the amount of green land between two locations")
parser.add_argument("--start", required=True,
he... | <commit_before>from argparse import ArgumentParser
from matplotlib import pyplot as plt
from graph import Greengraph
def process():
parser = ArgumentParser(
description="Produce graph of green land between two locations")
parser.add_argument("--start", required=True,
help="The s... | from argparse import ArgumentParser
from matplotlib import pyplot as plt
from graph import Greengraph
def process():
parser = ArgumentParser(
description="Produce graph quantifying the amount of green land between two locations")
parser.add_argument("--start", required=True,
he... | from argparse import ArgumentParser
from matplotlib import pyplot as plt
from graph import Greengraph
def process():
parser = ArgumentParser(
description="Produce graph of green land between two locations")
parser.add_argument("--start", required=True,
help="The starting locatio... | <commit_before>from argparse import ArgumentParser
from matplotlib import pyplot as plt
from graph import Greengraph
def process():
parser = ArgumentParser(
description="Produce graph of green land between two locations")
parser.add_argument("--start", required=True,
help="The s... |
6bfb23294c2cc445479f4c8098b8e62647cf01bd | test/test_notification_integration.py | test/test_notification_integration.py | import os
import select
import groundstation.fs_watcher as fs_watcher
from groundstation.peer_socket import PeerSocket
from integration_fixture import StationIntegrationFixture, \
TestListener, \
TestClient
class StationFSWatcherIntegration(StationInteg... | import os
import select
import groundstation.fs_watcher as fs_watcher
from groundstation.peer_socket import PeerSocket
from groundstation.utils import path2id
from integration_fixture import StationIntegrationFixture, \
TestListener, \
TestClient
class... | Validate that we can translate a NEWOBJECT into a FETCHOBJECT | Validate that we can translate a NEWOBJECT into a FETCHOBJECT
| Python | mit | richo/groundstation,richo/groundstation,richo/groundstation,richo/groundstation,richo/groundstation | import os
import select
import groundstation.fs_watcher as fs_watcher
from groundstation.peer_socket import PeerSocket
from integration_fixture import StationIntegrationFixture, \
TestListener, \
TestClient
class StationFSWatcherIntegration(StationInteg... | import os
import select
import groundstation.fs_watcher as fs_watcher
from groundstation.peer_socket import PeerSocket
from groundstation.utils import path2id
from integration_fixture import StationIntegrationFixture, \
TestListener, \
TestClient
class... | <commit_before>import os
import select
import groundstation.fs_watcher as fs_watcher
from groundstation.peer_socket import PeerSocket
from integration_fixture import StationIntegrationFixture, \
TestListener, \
TestClient
class StationFSWatcherIntegrati... | import os
import select
import groundstation.fs_watcher as fs_watcher
from groundstation.peer_socket import PeerSocket
from groundstation.utils import path2id
from integration_fixture import StationIntegrationFixture, \
TestListener, \
TestClient
class... | import os
import select
import groundstation.fs_watcher as fs_watcher
from groundstation.peer_socket import PeerSocket
from integration_fixture import StationIntegrationFixture, \
TestListener, \
TestClient
class StationFSWatcherIntegration(StationInteg... | <commit_before>import os
import select
import groundstation.fs_watcher as fs_watcher
from groundstation.peer_socket import PeerSocket
from integration_fixture import StationIntegrationFixture, \
TestListener, \
TestClient
class StationFSWatcherIntegrati... |
d6e87778c82eecc07b73a91d50cc2d9034a4428c | judicious/__init__.py | judicious/__init__.py | # -*- coding: utf-8 -*-
"""Top-level package for judicious."""
__author__ = """Jordan W. Suchow"""
__email__ = 'jwsuchow@gmail.com'
__version__ = '0.1.0'
from judicious import (
BASE_URL,
register,
)
__all__ = (
"BASE_URL",
"register",
)
| # -*- coding: utf-8 -*-
"""Top-level package for judicious."""
__author__ = """Jordan W. Suchow"""
__email__ = 'jwsuchow@gmail.com'
__version__ = '0.1.0'
from .judicious import (
BASE_URL,
register,
)
__all__ = (
"BASE_URL",
"register",
)
| Fix imports for Python 2 & 3 compatibility | Fix imports for Python 2 & 3 compatibility
| Python | mit | suchow/judicious,suchow/judicious,suchow/judicious | # -*- coding: utf-8 -*-
"""Top-level package for judicious."""
__author__ = """Jordan W. Suchow"""
__email__ = 'jwsuchow@gmail.com'
__version__ = '0.1.0'
from judicious import (
BASE_URL,
register,
)
__all__ = (
"BASE_URL",
"register",
)
Fix imports for Python 2 & 3 compatibility | # -*- coding: utf-8 -*-
"""Top-level package for judicious."""
__author__ = """Jordan W. Suchow"""
__email__ = 'jwsuchow@gmail.com'
__version__ = '0.1.0'
from .judicious import (
BASE_URL,
register,
)
__all__ = (
"BASE_URL",
"register",
)
| <commit_before># -*- coding: utf-8 -*-
"""Top-level package for judicious."""
__author__ = """Jordan W. Suchow"""
__email__ = 'jwsuchow@gmail.com'
__version__ = '0.1.0'
from judicious import (
BASE_URL,
register,
)
__all__ = (
"BASE_URL",
"register",
)
<commit_msg>Fix imports for Python 2 & 3 compat... | # -*- coding: utf-8 -*-
"""Top-level package for judicious."""
__author__ = """Jordan W. Suchow"""
__email__ = 'jwsuchow@gmail.com'
__version__ = '0.1.0'
from .judicious import (
BASE_URL,
register,
)
__all__ = (
"BASE_URL",
"register",
)
| # -*- coding: utf-8 -*-
"""Top-level package for judicious."""
__author__ = """Jordan W. Suchow"""
__email__ = 'jwsuchow@gmail.com'
__version__ = '0.1.0'
from judicious import (
BASE_URL,
register,
)
__all__ = (
"BASE_URL",
"register",
)
Fix imports for Python 2 & 3 compatibility# -*- coding: utf-8 ... | <commit_before># -*- coding: utf-8 -*-
"""Top-level package for judicious."""
__author__ = """Jordan W. Suchow"""
__email__ = 'jwsuchow@gmail.com'
__version__ = '0.1.0'
from judicious import (
BASE_URL,
register,
)
__all__ = (
"BASE_URL",
"register",
)
<commit_msg>Fix imports for Python 2 & 3 compat... |
6fe5a416ed229e7ec8efab9d6b3dac43f16515b6 | corehq/apps/domain/__init__.py | corehq/apps/domain/__init__.py | from corehq.preindex import ExtraPreindexPlugin
from django.conf import settings
ExtraPreindexPlugin.register('domain', __file__, (
settings.NEW_USERS_GROUPS_DB, settings.NEW_FIXTURES_DB, 'meta'))
| from corehq.preindex import ExtraPreindexPlugin
from django.conf import settings
ExtraPreindexPlugin.register('domain', __file__, (
settings.NEW_DOMAINS_DB,
settings.NEW_USERS_GROUPS_DB,
settings.NEW_FIXTURES_DB,
'meta',
))
| Add the new domains db | Add the new domains db
| Python | bsd-3-clause | dimagi/commcare-hq,dimagi/commcare-hq,qedsoftware/commcare-hq,dimagi/commcare-hq,qedsoftware/commcare-hq,qedsoftware/commcare-hq,qedsoftware/commcare-hq,dimagi/commcare-hq,qedsoftware/commcare-hq,dimagi/commcare-hq | from corehq.preindex import ExtraPreindexPlugin
from django.conf import settings
ExtraPreindexPlugin.register('domain', __file__, (
settings.NEW_USERS_GROUPS_DB, settings.NEW_FIXTURES_DB, 'meta'))
Add the new domains db | from corehq.preindex import ExtraPreindexPlugin
from django.conf import settings
ExtraPreindexPlugin.register('domain', __file__, (
settings.NEW_DOMAINS_DB,
settings.NEW_USERS_GROUPS_DB,
settings.NEW_FIXTURES_DB,
'meta',
))
| <commit_before>from corehq.preindex import ExtraPreindexPlugin
from django.conf import settings
ExtraPreindexPlugin.register('domain', __file__, (
settings.NEW_USERS_GROUPS_DB, settings.NEW_FIXTURES_DB, 'meta'))
<commit_msg>Add the new domains db<commit_after> | from corehq.preindex import ExtraPreindexPlugin
from django.conf import settings
ExtraPreindexPlugin.register('domain', __file__, (
settings.NEW_DOMAINS_DB,
settings.NEW_USERS_GROUPS_DB,
settings.NEW_FIXTURES_DB,
'meta',
))
| from corehq.preindex import ExtraPreindexPlugin
from django.conf import settings
ExtraPreindexPlugin.register('domain', __file__, (
settings.NEW_USERS_GROUPS_DB, settings.NEW_FIXTURES_DB, 'meta'))
Add the new domains dbfrom corehq.preindex import ExtraPreindexPlugin
from django.conf import settings
ExtraPreindexP... | <commit_before>from corehq.preindex import ExtraPreindexPlugin
from django.conf import settings
ExtraPreindexPlugin.register('domain', __file__, (
settings.NEW_USERS_GROUPS_DB, settings.NEW_FIXTURES_DB, 'meta'))
<commit_msg>Add the new domains db<commit_after>from corehq.preindex import ExtraPreindexPlugin
from dj... |
1de53534c48d1eecc7fea5d2040977afd97dacb2 | vispy/visuals/graphs/layouts/__init__.py | vispy/visuals/graphs/layouts/__init__.py | import inspect
from .random import random
from .circular import circular
from .force_directed import fruchterman_reingold
_layout_map = {
'random': random,
'circular': circular,
'force_directed': fruchterman_reingold,
'spring_layout': fruchterman_reingold
}
AVAILABLE_LAYOUTS = _layout_map.keys()
d... | import inspect
from .random import random
from .circular import circular
from .force_directed import fruchterman_reingold
_layout_map = {
'random': random,
'circular': circular,
'force_directed': fruchterman_reingold,
'spring_layout': fruchterman_reingold
}
AVAILABLE_LAYOUTS = tuple(_layout_map.keys... | Make sure AVAILABLE_LAYOUTS is a tuple | Make sure AVAILABLE_LAYOUTS is a tuple
The .keys() function is a generator in Python 3.
| Python | bsd-3-clause | ghisvail/vispy,drufat/vispy,drufat/vispy,Eric89GXL/vispy,ghisvail/vispy,michaelaye/vispy,Eric89GXL/vispy,drufat/vispy,michaelaye/vispy,ghisvail/vispy,Eric89GXL/vispy,michaelaye/vispy | import inspect
from .random import random
from .circular import circular
from .force_directed import fruchterman_reingold
_layout_map = {
'random': random,
'circular': circular,
'force_directed': fruchterman_reingold,
'spring_layout': fruchterman_reingold
}
AVAILABLE_LAYOUTS = _layout_map.keys()
d... | import inspect
from .random import random
from .circular import circular
from .force_directed import fruchterman_reingold
_layout_map = {
'random': random,
'circular': circular,
'force_directed': fruchterman_reingold,
'spring_layout': fruchterman_reingold
}
AVAILABLE_LAYOUTS = tuple(_layout_map.keys... | <commit_before>import inspect
from .random import random
from .circular import circular
from .force_directed import fruchterman_reingold
_layout_map = {
'random': random,
'circular': circular,
'force_directed': fruchterman_reingold,
'spring_layout': fruchterman_reingold
}
AVAILABLE_LAYOUTS = _layout... | import inspect
from .random import random
from .circular import circular
from .force_directed import fruchterman_reingold
_layout_map = {
'random': random,
'circular': circular,
'force_directed': fruchterman_reingold,
'spring_layout': fruchterman_reingold
}
AVAILABLE_LAYOUTS = tuple(_layout_map.keys... | import inspect
from .random import random
from .circular import circular
from .force_directed import fruchterman_reingold
_layout_map = {
'random': random,
'circular': circular,
'force_directed': fruchterman_reingold,
'spring_layout': fruchterman_reingold
}
AVAILABLE_LAYOUTS = _layout_map.keys()
d... | <commit_before>import inspect
from .random import random
from .circular import circular
from .force_directed import fruchterman_reingold
_layout_map = {
'random': random,
'circular': circular,
'force_directed': fruchterman_reingold,
'spring_layout': fruchterman_reingold
}
AVAILABLE_LAYOUTS = _layout... |
e12432b0c97d1ddebf16df821fe6c77bb8b6a66b | wagtail/wagtailsites/wagtail_hooks.py | wagtail/wagtailsites/wagtail_hooks.py | from django.conf.urls import include, url
from django.core import urlresolvers
from django.utils.translation import ugettext_lazy as _
from wagtail.wagtailcore import hooks
from wagtail.wagtailadmin.menu import MenuItem
from wagtail.wagtailsites import urls
def register_admin_urls():
return [
url(r'^sit... | from django.conf.urls import include, url
from django.core import urlresolvers
from django.utils.translation import ugettext_lazy as _
from wagtail.wagtailcore import hooks
from wagtail.wagtailadmin.menu import MenuItem
from wagtail.wagtailsites import urls
@hooks.register('register_admin_urls')
def register_admin_... | Move Sites to the settings menu (and use decorator syntax for hooks) | Move Sites to the settings menu (and use decorator syntax for hooks)
| Python | bsd-3-clause | mixxorz/wagtail,wagtail/wagtail,KimGlazebrook/wagtail-experiment,gasman/wagtail,mayapurmedia/wagtail,kaedroho/wagtail,jnns/wagtail,serzans/wagtail,hanpama/wagtail,iho/wagtail,marctc/wagtail,kurtw/wagtail,nilnvoid/wagtail,nrsimha/wagtail,gasman/wagtail,jorge-marques/wagtail,Toshakins/wagtail,rsalmaso/wagtail,takeflight/... | from django.conf.urls import include, url
from django.core import urlresolvers
from django.utils.translation import ugettext_lazy as _
from wagtail.wagtailcore import hooks
from wagtail.wagtailadmin.menu import MenuItem
from wagtail.wagtailsites import urls
def register_admin_urls():
return [
url(r'^sit... | from django.conf.urls import include, url
from django.core import urlresolvers
from django.utils.translation import ugettext_lazy as _
from wagtail.wagtailcore import hooks
from wagtail.wagtailadmin.menu import MenuItem
from wagtail.wagtailsites import urls
@hooks.register('register_admin_urls')
def register_admin_... | <commit_before>from django.conf.urls import include, url
from django.core import urlresolvers
from django.utils.translation import ugettext_lazy as _
from wagtail.wagtailcore import hooks
from wagtail.wagtailadmin.menu import MenuItem
from wagtail.wagtailsites import urls
def register_admin_urls():
return [
... | from django.conf.urls import include, url
from django.core import urlresolvers
from django.utils.translation import ugettext_lazy as _
from wagtail.wagtailcore import hooks
from wagtail.wagtailadmin.menu import MenuItem
from wagtail.wagtailsites import urls
@hooks.register('register_admin_urls')
def register_admin_... | from django.conf.urls import include, url
from django.core import urlresolvers
from django.utils.translation import ugettext_lazy as _
from wagtail.wagtailcore import hooks
from wagtail.wagtailadmin.menu import MenuItem
from wagtail.wagtailsites import urls
def register_admin_urls():
return [
url(r'^sit... | <commit_before>from django.conf.urls import include, url
from django.core import urlresolvers
from django.utils.translation import ugettext_lazy as _
from wagtail.wagtailcore import hooks
from wagtail.wagtailadmin.menu import MenuItem
from wagtail.wagtailsites import urls
def register_admin_urls():
return [
... |
a3004d2de9c15b9d7efebb98ea6533a1a6e07062 | nhlstats/__init__.py | nhlstats/__init__.py |
import logging
from version import __version__
logger = logging.getLogger(__name__)
logger.debug('Loading %s ver %s' % (__name__, __version__))
# Actions represents the available textual items that can be passed to main
# to drive dispatch. These should be all lower case, no spaces or underscores.
actions = [
... |
import logging
from version import __version__
logger = logging.getLogger(__name__)
logger.debug('Loading %s ver %s' % (__name__, __version__))
# Actions represents the available textual items that can be passed to main
# to drive dispatch. These should be all lower case, no spaces or underscores.
actions = [
... | Improve dispatch of actions in main | Improve dispatch of actions in main
| Python | mit | fancystats/nhlstats |
import logging
from version import __version__
logger = logging.getLogger(__name__)
logger.debug('Loading %s ver %s' % (__name__, __version__))
# Actions represents the available textual items that can be passed to main
# to drive dispatch. These should be all lower case, no spaces or underscores.
actions = [
... |
import logging
from version import __version__
logger = logging.getLogger(__name__)
logger.debug('Loading %s ver %s' % (__name__, __version__))
# Actions represents the available textual items that can be passed to main
# to drive dispatch. These should be all lower case, no spaces or underscores.
actions = [
... | <commit_before>
import logging
from version import __version__
logger = logging.getLogger(__name__)
logger.debug('Loading %s ver %s' % (__name__, __version__))
# Actions represents the available textual items that can be passed to main
# to drive dispatch. These should be all lower case, no spaces or underscores.
a... |
import logging
from version import __version__
logger = logging.getLogger(__name__)
logger.debug('Loading %s ver %s' % (__name__, __version__))
# Actions represents the available textual items that can be passed to main
# to drive dispatch. These should be all lower case, no spaces or underscores.
actions = [
... |
import logging
from version import __version__
logger = logging.getLogger(__name__)
logger.debug('Loading %s ver %s' % (__name__, __version__))
# Actions represents the available textual items that can be passed to main
# to drive dispatch. These should be all lower case, no spaces or underscores.
actions = [
... | <commit_before>
import logging
from version import __version__
logger = logging.getLogger(__name__)
logger.debug('Loading %s ver %s' % (__name__, __version__))
# Actions represents the available textual items that can be passed to main
# to drive dispatch. These should be all lower case, no spaces or underscores.
a... |
6689858b2364a668b362a5f00d4c86e57141dc37 | numba/cuda/models.py | numba/cuda/models.py | from llvmlite import ir
from numba.core.datamodel.registry import register_default
from numba.core.extending import register_model, models
from numba.core import types
from numba.cuda.types import Dim3, GridGroup, CUDADispatcher
@register_model(Dim3)
class Dim3Model(models.StructModel):
def __init__(self, dmm, f... | from llvmlite import ir
from numba.core.datamodel.registry import register_default
from numba.core.extending import register_model, models
from numba.core import types
from numba.cuda.types import Dim3, GridGroup, CUDADispatcher
@register_model(Dim3)
class Dim3Model(models.StructModel):
def __init__(self, dmm, f... | Reorder FloatModel checks in ascending order | CUDA: Reorder FloatModel checks in ascending order
| Python | bsd-2-clause | cpcloud/numba,numba/numba,numba/numba,seibert/numba,cpcloud/numba,cpcloud/numba,seibert/numba,seibert/numba,cpcloud/numba,numba/numba,IntelLabs/numba,numba/numba,IntelLabs/numba,cpcloud/numba,seibert/numba,IntelLabs/numba,IntelLabs/numba,seibert/numba,IntelLabs/numba,numba/numba | from llvmlite import ir
from numba.core.datamodel.registry import register_default
from numba.core.extending import register_model, models
from numba.core import types
from numba.cuda.types import Dim3, GridGroup, CUDADispatcher
@register_model(Dim3)
class Dim3Model(models.StructModel):
def __init__(self, dmm, f... | from llvmlite import ir
from numba.core.datamodel.registry import register_default
from numba.core.extending import register_model, models
from numba.core import types
from numba.cuda.types import Dim3, GridGroup, CUDADispatcher
@register_model(Dim3)
class Dim3Model(models.StructModel):
def __init__(self, dmm, f... | <commit_before>from llvmlite import ir
from numba.core.datamodel.registry import register_default
from numba.core.extending import register_model, models
from numba.core import types
from numba.cuda.types import Dim3, GridGroup, CUDADispatcher
@register_model(Dim3)
class Dim3Model(models.StructModel):
def __init... | from llvmlite import ir
from numba.core.datamodel.registry import register_default
from numba.core.extending import register_model, models
from numba.core import types
from numba.cuda.types import Dim3, GridGroup, CUDADispatcher
@register_model(Dim3)
class Dim3Model(models.StructModel):
def __init__(self, dmm, f... | from llvmlite import ir
from numba.core.datamodel.registry import register_default
from numba.core.extending import register_model, models
from numba.core import types
from numba.cuda.types import Dim3, GridGroup, CUDADispatcher
@register_model(Dim3)
class Dim3Model(models.StructModel):
def __init__(self, dmm, f... | <commit_before>from llvmlite import ir
from numba.core.datamodel.registry import register_default
from numba.core.extending import register_model, models
from numba.core import types
from numba.cuda.types import Dim3, GridGroup, CUDADispatcher
@register_model(Dim3)
class Dim3Model(models.StructModel):
def __init... |
4a650922ee97b9cb54b203cab9709d511487d9ff | silver/tests/factories.py | silver/tests/factories.py | """Factories for the silver app."""
# import factory
# from .. import models
| import factory
from silver.models import Provider
class ProviderFactory(factory.django.DjangoModelFactory):
class Meta:
model = Provider
| Add factory for the Provider model | Add factory for the Provider model
| Python | apache-2.0 | PressLabs/silver,PressLabs/silver,PressLabs/silver | """Factories for the silver app."""
# import factory
# from .. import models
Add factory for the Provider model | import factory
from silver.models import Provider
class ProviderFactory(factory.django.DjangoModelFactory):
class Meta:
model = Provider
| <commit_before>"""Factories for the silver app."""
# import factory
# from .. import models
<commit_msg>Add factory for the Provider model<commit_after> | import factory
from silver.models import Provider
class ProviderFactory(factory.django.DjangoModelFactory):
class Meta:
model = Provider
| """Factories for the silver app."""
# import factory
# from .. import models
Add factory for the Provider modelimport factory
from silver.models import Provider
class ProviderFactory(factory.django.DjangoModelFactory):
class Meta:
model = Provider
| <commit_before>"""Factories for the silver app."""
# import factory
# from .. import models
<commit_msg>Add factory for the Provider model<commit_after>import factory
from silver.models import Provider
class ProviderFactory(factory.django.DjangoModelFactory):
class Meta:
model = Provider
|
9a51358871f04e2a5552621b6ac2c9dbe1ee8345 | main.py | main.py | #!/usr/bin/env python
from pysnap import Snapchat
import secrets
s = Snapchat()
s.login(secrets.USERNAME, secrets.PASSWORD)
friends_to_add = [friend['name'] for friend in s.get_updates()['added_friends'] if friend['type'] == 1]
for friend in friends_to_add:
s.add_friend(friend)
snaps = [snap['id'] for snap in s... | !/usr/bin/env python
from pysnap import Snapchat
import secrets
s = Snapchat()
s.login(secrets.USERNAME, secrets.PASSWORD)
friends_to_add = [friend['name'] for friend in s.get_updates()['added_friends'] if friend['type'] == 1]
for friend in friends_to_add:
s.add_friend(friend)
snaps = [snap['id'] for snap in s.... | Save temporary pictures to local directory | Save temporary pictures to local directory
| Python | mit | jollex/SnapchatBot | #!/usr/bin/env python
from pysnap import Snapchat
import secrets
s = Snapchat()
s.login(secrets.USERNAME, secrets.PASSWORD)
friends_to_add = [friend['name'] for friend in s.get_updates()['added_friends'] if friend['type'] == 1]
for friend in friends_to_add:
s.add_friend(friend)
snaps = [snap['id'] for snap in s... | !/usr/bin/env python
from pysnap import Snapchat
import secrets
s = Snapchat()
s.login(secrets.USERNAME, secrets.PASSWORD)
friends_to_add = [friend['name'] for friend in s.get_updates()['added_friends'] if friend['type'] == 1]
for friend in friends_to_add:
s.add_friend(friend)
snaps = [snap['id'] for snap in s.... | <commit_before>#!/usr/bin/env python
from pysnap import Snapchat
import secrets
s = Snapchat()
s.login(secrets.USERNAME, secrets.PASSWORD)
friends_to_add = [friend['name'] for friend in s.get_updates()['added_friends'] if friend['type'] == 1]
for friend in friends_to_add:
s.add_friend(friend)
snaps = [snap['id'... | !/usr/bin/env python
from pysnap import Snapchat
import secrets
s = Snapchat()
s.login(secrets.USERNAME, secrets.PASSWORD)
friends_to_add = [friend['name'] for friend in s.get_updates()['added_friends'] if friend['type'] == 1]
for friend in friends_to_add:
s.add_friend(friend)
snaps = [snap['id'] for snap in s.... | #!/usr/bin/env python
from pysnap import Snapchat
import secrets
s = Snapchat()
s.login(secrets.USERNAME, secrets.PASSWORD)
friends_to_add = [friend['name'] for friend in s.get_updates()['added_friends'] if friend['type'] == 1]
for friend in friends_to_add:
s.add_friend(friend)
snaps = [snap['id'] for snap in s... | <commit_before>#!/usr/bin/env python
from pysnap import Snapchat
import secrets
s = Snapchat()
s.login(secrets.USERNAME, secrets.PASSWORD)
friends_to_add = [friend['name'] for friend in s.get_updates()['added_friends'] if friend['type'] == 1]
for friend in friends_to_add:
s.add_friend(friend)
snaps = [snap['id'... |
565861256c9cf0f41217df13c4244315b4ebd74d | slybot/slybot/settings.py | slybot/slybot/settings.py | SPIDER_MANAGER_CLASS = 'slybot.spidermanager.SlybotSpiderManager'
EXTENSIONS = {'slybot.closespider.SlybotCloseSpider': 1}
ITEM_PIPELINES = ['slybot.dupefilter.DupeFilterPipeline']
SPIDER_MIDDLEWARES = {'slybot.spiderlets.SpiderletsMiddleware': 999} # as close as possible to spider output
SLYDUPEFILTER_ENABLED = True
P... | SPIDER_MANAGER_CLASS = 'slybot.spidermanager.SlybotSpiderManager'
EXTENSIONS = {'slybot.closespider.SlybotCloseSpider': 1}
ITEM_PIPELINES = {'slybot.dupefilter.DupeFilterPipeline': 1}
SPIDER_MIDDLEWARES = {'slybot.spiderlets.SpiderletsMiddleware': 999} # as close as possible to spider output
SLYDUPEFILTER_ENABLED = Tru... | Remove deprecation warning by using new style item pipeline definition | Remove deprecation warning by using new style item pipeline definition
| Python | bsd-3-clause | verylasttry/portia,amikey/portia,pombredanne/portia,chennqqi/portia,NoisyText/portia,NoisyText/portia,hmilywb/portia,flip111/portia,NoisyText/portia,nju520/portia,asa1253/portia,NicoloPernigo/portia,amikey/portia,CENDARI/portia,naveenvprakash/portia,PrasannaVenkadesh/portia,CENDARI/portia,lodow/portia-proxy,nju520/port... | SPIDER_MANAGER_CLASS = 'slybot.spidermanager.SlybotSpiderManager'
EXTENSIONS = {'slybot.closespider.SlybotCloseSpider': 1}
ITEM_PIPELINES = ['slybot.dupefilter.DupeFilterPipeline']
SPIDER_MIDDLEWARES = {'slybot.spiderlets.SpiderletsMiddleware': 999} # as close as possible to spider output
SLYDUPEFILTER_ENABLED = True
P... | SPIDER_MANAGER_CLASS = 'slybot.spidermanager.SlybotSpiderManager'
EXTENSIONS = {'slybot.closespider.SlybotCloseSpider': 1}
ITEM_PIPELINES = {'slybot.dupefilter.DupeFilterPipeline': 1}
SPIDER_MIDDLEWARES = {'slybot.spiderlets.SpiderletsMiddleware': 999} # as close as possible to spider output
SLYDUPEFILTER_ENABLED = Tru... | <commit_before>SPIDER_MANAGER_CLASS = 'slybot.spidermanager.SlybotSpiderManager'
EXTENSIONS = {'slybot.closespider.SlybotCloseSpider': 1}
ITEM_PIPELINES = ['slybot.dupefilter.DupeFilterPipeline']
SPIDER_MIDDLEWARES = {'slybot.spiderlets.SpiderletsMiddleware': 999} # as close as possible to spider output
SLYDUPEFILTER_E... | SPIDER_MANAGER_CLASS = 'slybot.spidermanager.SlybotSpiderManager'
EXTENSIONS = {'slybot.closespider.SlybotCloseSpider': 1}
ITEM_PIPELINES = {'slybot.dupefilter.DupeFilterPipeline': 1}
SPIDER_MIDDLEWARES = {'slybot.spiderlets.SpiderletsMiddleware': 999} # as close as possible to spider output
SLYDUPEFILTER_ENABLED = Tru... | SPIDER_MANAGER_CLASS = 'slybot.spidermanager.SlybotSpiderManager'
EXTENSIONS = {'slybot.closespider.SlybotCloseSpider': 1}
ITEM_PIPELINES = ['slybot.dupefilter.DupeFilterPipeline']
SPIDER_MIDDLEWARES = {'slybot.spiderlets.SpiderletsMiddleware': 999} # as close as possible to spider output
SLYDUPEFILTER_ENABLED = True
P... | <commit_before>SPIDER_MANAGER_CLASS = 'slybot.spidermanager.SlybotSpiderManager'
EXTENSIONS = {'slybot.closespider.SlybotCloseSpider': 1}
ITEM_PIPELINES = ['slybot.dupefilter.DupeFilterPipeline']
SPIDER_MIDDLEWARES = {'slybot.spiderlets.SpiderletsMiddleware': 999} # as close as possible to spider output
SLYDUPEFILTER_E... |
d0a907872749f1bb54d6e8e160ea170059289623 | source/custom/combo.py | source/custom/combo.py | # -*- coding: utf-8 -*-
## \package custom.combo
# MIT licensing
# See: LICENSE.txt
import wx
from wx.combo import OwnerDrawnComboBox
class ComboBox(OwnerDrawnComboBox):
def __init__(self, parent, win_id, value=wx.EmptyString, pos=wx.DefaultPosition,
size=wx.DefaultSize, choices=[], style=0, valid... | # -*- coding: utf-8 -*-
## \package custom.combo
# MIT licensing
# See: LICENSE.txt
import wx
from wx.combo import OwnerDrawnComboBox
class ComboBox(OwnerDrawnComboBox):
def __init__(self, parent, win_id=wx.ID_ANY, value=wx.EmptyString, pos=wx.DefaultPosition,
size=wx.DefaultSize, choices=[], styl... | Set ComboBox class default ID to wx.ID_ANY | Set ComboBox class default ID to wx.ID_ANY | Python | mit | AntumDeluge/desktop_recorder,AntumDeluge/desktop_recorder | # -*- coding: utf-8 -*-
## \package custom.combo
# MIT licensing
# See: LICENSE.txt
import wx
from wx.combo import OwnerDrawnComboBox
class ComboBox(OwnerDrawnComboBox):
def __init__(self, parent, win_id, value=wx.EmptyString, pos=wx.DefaultPosition,
size=wx.DefaultSize, choices=[], style=0, valid... | # -*- coding: utf-8 -*-
## \package custom.combo
# MIT licensing
# See: LICENSE.txt
import wx
from wx.combo import OwnerDrawnComboBox
class ComboBox(OwnerDrawnComboBox):
def __init__(self, parent, win_id=wx.ID_ANY, value=wx.EmptyString, pos=wx.DefaultPosition,
size=wx.DefaultSize, choices=[], styl... | <commit_before># -*- coding: utf-8 -*-
## \package custom.combo
# MIT licensing
# See: LICENSE.txt
import wx
from wx.combo import OwnerDrawnComboBox
class ComboBox(OwnerDrawnComboBox):
def __init__(self, parent, win_id, value=wx.EmptyString, pos=wx.DefaultPosition,
size=wx.DefaultSize, choices=[],... | # -*- coding: utf-8 -*-
## \package custom.combo
# MIT licensing
# See: LICENSE.txt
import wx
from wx.combo import OwnerDrawnComboBox
class ComboBox(OwnerDrawnComboBox):
def __init__(self, parent, win_id=wx.ID_ANY, value=wx.EmptyString, pos=wx.DefaultPosition,
size=wx.DefaultSize, choices=[], styl... | # -*- coding: utf-8 -*-
## \package custom.combo
# MIT licensing
# See: LICENSE.txt
import wx
from wx.combo import OwnerDrawnComboBox
class ComboBox(OwnerDrawnComboBox):
def __init__(self, parent, win_id, value=wx.EmptyString, pos=wx.DefaultPosition,
size=wx.DefaultSize, choices=[], style=0, valid... | <commit_before># -*- coding: utf-8 -*-
## \package custom.combo
# MIT licensing
# See: LICENSE.txt
import wx
from wx.combo import OwnerDrawnComboBox
class ComboBox(OwnerDrawnComboBox):
def __init__(self, parent, win_id, value=wx.EmptyString, pos=wx.DefaultPosition,
size=wx.DefaultSize, choices=[],... |
2560ca287e81cbefb6037e5688bfa4ef74d85149 | clock.py | clock.py | from __future__ import print_function
from apscheduler.schedulers.blocking import BlockingScheduler
import logging
import subprocess
logging.basicConfig()
scheduler = BlockingScheduler()
@scheduler.scheduled_job('interval', minutes=1)
def timed_job_min1():
print("Run notifier")
subprocess.run(
"notif... | from __future__ import print_function
from apscheduler.schedulers.blocking import BlockingScheduler
import logging
import subprocess
logging.basicConfig()
scheduler = BlockingScheduler()
@scheduler.scheduled_job('interval', minutes=1)
def timed_job_min1():
print("Run notifier")
subprocess.check_call(
... | Change call method for Python2.7 | Change call method for Python2.7
| Python | mit | oinume/lekcije,oinume/dmm-eikaiwa-fft,oinume/lekcije,oinume/dmm-eikaiwa-fft,oinume/lekcije,oinume/dmm-eikaiwa-fft,oinume/lekcije,oinume/lekcije,oinume/lekcije,oinume/dmm-eikaiwa-fft | from __future__ import print_function
from apscheduler.schedulers.blocking import BlockingScheduler
import logging
import subprocess
logging.basicConfig()
scheduler = BlockingScheduler()
@scheduler.scheduled_job('interval', minutes=1)
def timed_job_min1():
print("Run notifier")
subprocess.run(
"notif... | from __future__ import print_function
from apscheduler.schedulers.blocking import BlockingScheduler
import logging
import subprocess
logging.basicConfig()
scheduler = BlockingScheduler()
@scheduler.scheduled_job('interval', minutes=1)
def timed_job_min1():
print("Run notifier")
subprocess.check_call(
... | <commit_before>from __future__ import print_function
from apscheduler.schedulers.blocking import BlockingScheduler
import logging
import subprocess
logging.basicConfig()
scheduler = BlockingScheduler()
@scheduler.scheduled_job('interval', minutes=1)
def timed_job_min1():
print("Run notifier")
subprocess.run(... | from __future__ import print_function
from apscheduler.schedulers.blocking import BlockingScheduler
import logging
import subprocess
logging.basicConfig()
scheduler = BlockingScheduler()
@scheduler.scheduled_job('interval', minutes=1)
def timed_job_min1():
print("Run notifier")
subprocess.check_call(
... | from __future__ import print_function
from apscheduler.schedulers.blocking import BlockingScheduler
import logging
import subprocess
logging.basicConfig()
scheduler = BlockingScheduler()
@scheduler.scheduled_job('interval', minutes=1)
def timed_job_min1():
print("Run notifier")
subprocess.run(
"notif... | <commit_before>from __future__ import print_function
from apscheduler.schedulers.blocking import BlockingScheduler
import logging
import subprocess
logging.basicConfig()
scheduler = BlockingScheduler()
@scheduler.scheduled_job('interval', minutes=1)
def timed_job_min1():
print("Run notifier")
subprocess.run(... |
6bb9a4ed50ad879c56cdeae0dedb49bba6780780 | matchers/volunteer.py | matchers/volunteer.py | import random
from base import BaseMatcher
class VolunteerMatcher(BaseMatcher):
dev_text = "volunteer someone"
all_text = "volunteer a dev"
dev_candidates = ['Steve', 'Arthur', 'Honza', 'Fernando', 'Nick']
all_candidates = dev_candidates + ['Craig', 'Evan']
def respond(self, message, user=None):
... | import random
from base import BaseMatcher
class VolunteerMatcher(BaseMatcher):
dev_text = "volunteer someone"
all_text = "volunteer a dev"
dev_candidates = ['sjl', 'arthurdebert', 'honza', 'fernandotakai', 'nicksergeant']
all_candidates = dev_candidates + ['cz', 'ehazlett']
def respond(self, mes... | Use IRC Nicks instead of real names. | Use IRC Nicks instead of real names.
| Python | bsd-2-clause | honza/nigel | import random
from base import BaseMatcher
class VolunteerMatcher(BaseMatcher):
dev_text = "volunteer someone"
all_text = "volunteer a dev"
dev_candidates = ['Steve', 'Arthur', 'Honza', 'Fernando', 'Nick']
all_candidates = dev_candidates + ['Craig', 'Evan']
def respond(self, message, user=None):
... | import random
from base import BaseMatcher
class VolunteerMatcher(BaseMatcher):
dev_text = "volunteer someone"
all_text = "volunteer a dev"
dev_candidates = ['sjl', 'arthurdebert', 'honza', 'fernandotakai', 'nicksergeant']
all_candidates = dev_candidates + ['cz', 'ehazlett']
def respond(self, mes... | <commit_before>import random
from base import BaseMatcher
class VolunteerMatcher(BaseMatcher):
dev_text = "volunteer someone"
all_text = "volunteer a dev"
dev_candidates = ['Steve', 'Arthur', 'Honza', 'Fernando', 'Nick']
all_candidates = dev_candidates + ['Craig', 'Evan']
def respond(self, messag... | import random
from base import BaseMatcher
class VolunteerMatcher(BaseMatcher):
dev_text = "volunteer someone"
all_text = "volunteer a dev"
dev_candidates = ['sjl', 'arthurdebert', 'honza', 'fernandotakai', 'nicksergeant']
all_candidates = dev_candidates + ['cz', 'ehazlett']
def respond(self, mes... | import random
from base import BaseMatcher
class VolunteerMatcher(BaseMatcher):
dev_text = "volunteer someone"
all_text = "volunteer a dev"
dev_candidates = ['Steve', 'Arthur', 'Honza', 'Fernando', 'Nick']
all_candidates = dev_candidates + ['Craig', 'Evan']
def respond(self, message, user=None):
... | <commit_before>import random
from base import BaseMatcher
class VolunteerMatcher(BaseMatcher):
dev_text = "volunteer someone"
all_text = "volunteer a dev"
dev_candidates = ['Steve', 'Arthur', 'Honza', 'Fernando', 'Nick']
all_candidates = dev_candidates + ['Craig', 'Evan']
def respond(self, messag... |
b24083b0991157a1e0d8a533fc1cac3aa2e4523c | similarities/utils.py | similarities/utils.py | import echonest
from artists.models import Artist
from echonest.models import SimilarResponse
from users.models import User
from .models import (GeneralArtist, UserSimilarity, Similarity,
update_similarities)
def add_new_similarities(artist, force_update=False):
similarities = []
response... | from django.db.models import Q
import echonest
from artists.models import Artist
from echonest.models import SimilarResponse
from users.models import User
from .models import (GeneralArtist, UserSimilarity, Similarity,
update_similarities)
def add_new_similarities(artist, force_update=False):
... | Order similar artist results properly | Order similar artist results properly
| Python | bsd-3-clause | FreeMusicNinja/api.freemusic.ninja | import echonest
from artists.models import Artist
from echonest.models import SimilarResponse
from users.models import User
from .models import (GeneralArtist, UserSimilarity, Similarity,
update_similarities)
def add_new_similarities(artist, force_update=False):
similarities = []
response... | from django.db.models import Q
import echonest
from artists.models import Artist
from echonest.models import SimilarResponse
from users.models import User
from .models import (GeneralArtist, UserSimilarity, Similarity,
update_similarities)
def add_new_similarities(artist, force_update=False):
... | <commit_before>import echonest
from artists.models import Artist
from echonest.models import SimilarResponse
from users.models import User
from .models import (GeneralArtist, UserSimilarity, Similarity,
update_similarities)
def add_new_similarities(artist, force_update=False):
similarities = ... | from django.db.models import Q
import echonest
from artists.models import Artist
from echonest.models import SimilarResponse
from users.models import User
from .models import (GeneralArtist, UserSimilarity, Similarity,
update_similarities)
def add_new_similarities(artist, force_update=False):
... | import echonest
from artists.models import Artist
from echonest.models import SimilarResponse
from users.models import User
from .models import (GeneralArtist, UserSimilarity, Similarity,
update_similarities)
def add_new_similarities(artist, force_update=False):
similarities = []
response... | <commit_before>import echonest
from artists.models import Artist
from echonest.models import SimilarResponse
from users.models import User
from .models import (GeneralArtist, UserSimilarity, Similarity,
update_similarities)
def add_new_similarities(artist, force_update=False):
similarities = ... |
5cac0d8b336cb8efe7d819d47abf46ccadea7b29 | generic_utils/templatetags.py | generic_utils/templatetags.py | from django import template
class InvalidParamsError(template.TemplateSyntaxError):
''' Custom exception class to distinguish usual TemplateSyntaxErrors
and validation errors for templatetags introduced by ``validate_params``
function'''
pass
def validate_params(bits, arguments_count, keyword... | from django import template
class InvalidParamsError(template.TemplateSyntaxError):
''' Custom exception class to distinguish usual TemplateSyntaxErrors
and validation errors for templatetags introduced by ``validate_params``
function'''
pass
def validate_params(bits, arguments_count, keyword... | Fix typo/bug in validate_params function | Fix typo/bug in validate_params function
| Python | mit | kmike/django-generic-images,kmike/django-generic-images,kmike/django-generic-images | from django import template
class InvalidParamsError(template.TemplateSyntaxError):
''' Custom exception class to distinguish usual TemplateSyntaxErrors
and validation errors for templatetags introduced by ``validate_params``
function'''
pass
def validate_params(bits, arguments_count, keyword... | from django import template
class InvalidParamsError(template.TemplateSyntaxError):
''' Custom exception class to distinguish usual TemplateSyntaxErrors
and validation errors for templatetags introduced by ``validate_params``
function'''
pass
def validate_params(bits, arguments_count, keyword... | <commit_before>from django import template
class InvalidParamsError(template.TemplateSyntaxError):
''' Custom exception class to distinguish usual TemplateSyntaxErrors
and validation errors for templatetags introduced by ``validate_params``
function'''
pass
def validate_params(bits, arguments... | from django import template
class InvalidParamsError(template.TemplateSyntaxError):
''' Custom exception class to distinguish usual TemplateSyntaxErrors
and validation errors for templatetags introduced by ``validate_params``
function'''
pass
def validate_params(bits, arguments_count, keyword... | from django import template
class InvalidParamsError(template.TemplateSyntaxError):
''' Custom exception class to distinguish usual TemplateSyntaxErrors
and validation errors for templatetags introduced by ``validate_params``
function'''
pass
def validate_params(bits, arguments_count, keyword... | <commit_before>from django import template
class InvalidParamsError(template.TemplateSyntaxError):
''' Custom exception class to distinguish usual TemplateSyntaxErrors
and validation errors for templatetags introduced by ``validate_params``
function'''
pass
def validate_params(bits, arguments... |
7016b7bb026e0fe557ca06efa81dace9999e526d | hubbot/Modules/Healthcheck.py | hubbot/Modules/Healthcheck.py | from twisted.internet import reactor, protocol
from hubbot.moduleinterface import ModuleInterface
class Echo(protocol.Protocol):
"""This is just about the simplest possible protocol"""
def dataReceived(self, data):
"""As soon as any data is received, write it back."""
self.transport.write(da... | from twisted.protocols import basic
from twisted.internet import protocol, reactor
from hubbot.moduleinterface import ModuleInterface
class HealthcheckProtocol(basic.LineReceiver):
def lineReceived(self, line):
response_body = "All is well. Ish."
self.sendLine("HTTP/1.0 200 OK".encode("UTF-8"))
... | Write a slightly less dumb protocol? | Write a slightly less dumb protocol?
| Python | mit | HubbeKing/Hubbot_Twisted | from twisted.internet import reactor, protocol
from hubbot.moduleinterface import ModuleInterface
class Echo(protocol.Protocol):
"""This is just about the simplest possible protocol"""
def dataReceived(self, data):
"""As soon as any data is received, write it back."""
self.transport.write(da... | from twisted.protocols import basic
from twisted.internet import protocol, reactor
from hubbot.moduleinterface import ModuleInterface
class HealthcheckProtocol(basic.LineReceiver):
def lineReceived(self, line):
response_body = "All is well. Ish."
self.sendLine("HTTP/1.0 200 OK".encode("UTF-8"))
... | <commit_before>from twisted.internet import reactor, protocol
from hubbot.moduleinterface import ModuleInterface
class Echo(protocol.Protocol):
"""This is just about the simplest possible protocol"""
def dataReceived(self, data):
"""As soon as any data is received, write it back."""
self.tra... | from twisted.protocols import basic
from twisted.internet import protocol, reactor
from hubbot.moduleinterface import ModuleInterface
class HealthcheckProtocol(basic.LineReceiver):
def lineReceived(self, line):
response_body = "All is well. Ish."
self.sendLine("HTTP/1.0 200 OK".encode("UTF-8"))
... | from twisted.internet import reactor, protocol
from hubbot.moduleinterface import ModuleInterface
class Echo(protocol.Protocol):
"""This is just about the simplest possible protocol"""
def dataReceived(self, data):
"""As soon as any data is received, write it back."""
self.transport.write(da... | <commit_before>from twisted.internet import reactor, protocol
from hubbot.moduleinterface import ModuleInterface
class Echo(protocol.Protocol):
"""This is just about the simplest possible protocol"""
def dataReceived(self, data):
"""As soon as any data is received, write it back."""
self.tra... |
1704e66caa06524d9b595c312d3a5f5d93683261 | app/models/cnes_bed.py | app/models/cnes_bed.py | from sqlalchemy import Column, Integer, String, func
from app import db
class CnesBed(db.Model):
__tablename__ = 'cnes_bed'
year = Column(Integer, primary_key=True)
region = Column(String(1), primary_key=True)
mesoregion = Column(String(4), primary_key=True)
microregion = Colum... | from sqlalchemy import Column, Integer, String, func
from app import db
class CnesBed(db.Model):
__tablename__ = 'cnes_bed'
year = Column(Integer, primary_key=True)
region = Column(String(1), primary_key=True)
mesoregion = Column(String(4), primary_key=True)
microregion = Colum... | Add bed_type to cnes_establishment model | Add bed_type to cnes_establishment model
| Python | mit | DataViva/dataviva-api,daniel1409/dataviva-api | from sqlalchemy import Column, Integer, String, func
from app import db
class CnesBed(db.Model):
__tablename__ = 'cnes_bed'
year = Column(Integer, primary_key=True)
region = Column(String(1), primary_key=True)
mesoregion = Column(String(4), primary_key=True)
microregion = Colum... | from sqlalchemy import Column, Integer, String, func
from app import db
class CnesBed(db.Model):
__tablename__ = 'cnes_bed'
year = Column(Integer, primary_key=True)
region = Column(String(1), primary_key=True)
mesoregion = Column(String(4), primary_key=True)
microregion = Colum... | <commit_before>from sqlalchemy import Column, Integer, String, func
from app import db
class CnesBed(db.Model):
__tablename__ = 'cnes_bed'
year = Column(Integer, primary_key=True)
region = Column(String(1), primary_key=True)
mesoregion = Column(String(4), primary_key=True)
micror... | from sqlalchemy import Column, Integer, String, func
from app import db
class CnesBed(db.Model):
__tablename__ = 'cnes_bed'
year = Column(Integer, primary_key=True)
region = Column(String(1), primary_key=True)
mesoregion = Column(String(4), primary_key=True)
microregion = Colum... | from sqlalchemy import Column, Integer, String, func
from app import db
class CnesBed(db.Model):
__tablename__ = 'cnes_bed'
year = Column(Integer, primary_key=True)
region = Column(String(1), primary_key=True)
mesoregion = Column(String(4), primary_key=True)
microregion = Colum... | <commit_before>from sqlalchemy import Column, Integer, String, func
from app import db
class CnesBed(db.Model):
__tablename__ = 'cnes_bed'
year = Column(Integer, primary_key=True)
region = Column(String(1), primary_key=True)
mesoregion = Column(String(4), primary_key=True)
micror... |
0eaff91695eefcf289e31d8ca93d19ab5bbd392d | katana/expr.py | katana/expr.py | import re
class Expr(object):
def __init__(self, name, regex):
self.name = name
self.regex = regex
def on_match(self, string):
return [self.name, string]
def callback(self, _, string):
return self.on_match(string)
class Scanner(object):
def __init__(self, exprs):
... | import re
class Expr(object):
def __init__(self, name, regex):
self.name = name
self.regex = regex
def __iter__(self):
yield self.regex
yield lambda _, token: self.on_match(token)
def on_match(self, string):
return [self.name, string]
class Scanner(object):
... | Refactor Expr object to be more self contained | Refactor Expr object to be more self contained
| Python | mit | eugene-eeo/katana | import re
class Expr(object):
def __init__(self, name, regex):
self.name = name
self.regex = regex
def on_match(self, string):
return [self.name, string]
def callback(self, _, string):
return self.on_match(string)
class Scanner(object):
def __init__(self, exprs):
... | import re
class Expr(object):
def __init__(self, name, regex):
self.name = name
self.regex = regex
def __iter__(self):
yield self.regex
yield lambda _, token: self.on_match(token)
def on_match(self, string):
return [self.name, string]
class Scanner(object):
... | <commit_before>import re
class Expr(object):
def __init__(self, name, regex):
self.name = name
self.regex = regex
def on_match(self, string):
return [self.name, string]
def callback(self, _, string):
return self.on_match(string)
class Scanner(object):
def __init__(s... | import re
class Expr(object):
def __init__(self, name, regex):
self.name = name
self.regex = regex
def __iter__(self):
yield self.regex
yield lambda _, token: self.on_match(token)
def on_match(self, string):
return [self.name, string]
class Scanner(object):
... | import re
class Expr(object):
def __init__(self, name, regex):
self.name = name
self.regex = regex
def on_match(self, string):
return [self.name, string]
def callback(self, _, string):
return self.on_match(string)
class Scanner(object):
def __init__(self, exprs):
... | <commit_before>import re
class Expr(object):
def __init__(self, name, regex):
self.name = name
self.regex = regex
def on_match(self, string):
return [self.name, string]
def callback(self, _, string):
return self.on_match(string)
class Scanner(object):
def __init__(s... |
7a427df2157948b5afb5ca3a1d22df72e51f7a89 | ckanext/syndicate/tests/test_plugin.py | ckanext/syndicate/tests/test_plugin.py | from mock import patch
import unittest
import ckan.model as model
from ckan.model.domain_object import DomainObjectOperation
from ckanext.syndicate.plugin import SyndicatePlugin
class TestPlugin(unittest.TestCase):
def test_notify_syndicates_task(self):
entity = model.Package()
entity.extras = ... | Add test for notify dataset/create | Add test for notify dataset/create
| Python | agpl-3.0 | aptivate/ckanext-syndicate,aptivate/ckanext-syndicate,sorki/ckanext-redmine-autoissues,sorki/ckanext-redmine-autoissues | Add test for notify dataset/create | from mock import patch
import unittest
import ckan.model as model
from ckan.model.domain_object import DomainObjectOperation
from ckanext.syndicate.plugin import SyndicatePlugin
class TestPlugin(unittest.TestCase):
def test_notify_syndicates_task(self):
entity = model.Package()
entity.extras = ... | <commit_before><commit_msg>Add test for notify dataset/create<commit_after> | from mock import patch
import unittest
import ckan.model as model
from ckan.model.domain_object import DomainObjectOperation
from ckanext.syndicate.plugin import SyndicatePlugin
class TestPlugin(unittest.TestCase):
def test_notify_syndicates_task(self):
entity = model.Package()
entity.extras = ... | Add test for notify dataset/createfrom mock import patch
import unittest
import ckan.model as model
from ckan.model.domain_object import DomainObjectOperation
from ckanext.syndicate.plugin import SyndicatePlugin
class TestPlugin(unittest.TestCase):
def test_notify_syndicates_task(self):
entity = model.... | <commit_before><commit_msg>Add test for notify dataset/create<commit_after>from mock import patch
import unittest
import ckan.model as model
from ckan.model.domain_object import DomainObjectOperation
from ckanext.syndicate.plugin import SyndicatePlugin
class TestPlugin(unittest.TestCase):
def test_notify_syndi... | |
ce2e5b0dc3ddafe931a902cb7aa24c3adbc246b7 | fireplace/cards/wog/neutral_legendary.py | fireplace/cards/wog/neutral_legendary.py | from ..utils import *
##
# Minions
| from ..utils import *
##
# Minions
class OG_122:
"Mukla, Tyrant of the Vale"
play = Give(CONTROLLER, "EX1_014t") * 2
class OG_318:
"Hogger, Doom of Elwynn"
events = SELF_DAMAGE.on(Summon(CONTROLLER, "OG_318t"))
class OG_338:
"Nat, the Darkfisher"
events = BeginTurn(OPPONENT).on(COINFLIP & Draw(OPPONENT))
| Implement corrupted Mukla, Hogger and Nat | Implement corrupted Mukla, Hogger and Nat
| Python | agpl-3.0 | beheh/fireplace,NightKev/fireplace,jleclanche/fireplace | from ..utils import *
##
# Minions
Implement corrupted Mukla, Hogger and Nat | from ..utils import *
##
# Minions
class OG_122:
"Mukla, Tyrant of the Vale"
play = Give(CONTROLLER, "EX1_014t") * 2
class OG_318:
"Hogger, Doom of Elwynn"
events = SELF_DAMAGE.on(Summon(CONTROLLER, "OG_318t"))
class OG_338:
"Nat, the Darkfisher"
events = BeginTurn(OPPONENT).on(COINFLIP & Draw(OPPONENT))
| <commit_before>from ..utils import *
##
# Minions
<commit_msg>Implement corrupted Mukla, Hogger and Nat<commit_after> | from ..utils import *
##
# Minions
class OG_122:
"Mukla, Tyrant of the Vale"
play = Give(CONTROLLER, "EX1_014t") * 2
class OG_318:
"Hogger, Doom of Elwynn"
events = SELF_DAMAGE.on(Summon(CONTROLLER, "OG_318t"))
class OG_338:
"Nat, the Darkfisher"
events = BeginTurn(OPPONENT).on(COINFLIP & Draw(OPPONENT))
| from ..utils import *
##
# Minions
Implement corrupted Mukla, Hogger and Natfrom ..utils import *
##
# Minions
class OG_122:
"Mukla, Tyrant of the Vale"
play = Give(CONTROLLER, "EX1_014t") * 2
class OG_318:
"Hogger, Doom of Elwynn"
events = SELF_DAMAGE.on(Summon(CONTROLLER, "OG_318t"))
class OG_338:
"Nat,... | <commit_before>from ..utils import *
##
# Minions
<commit_msg>Implement corrupted Mukla, Hogger and Nat<commit_after>from ..utils import *
##
# Minions
class OG_122:
"Mukla, Tyrant of the Vale"
play = Give(CONTROLLER, "EX1_014t") * 2
class OG_318:
"Hogger, Doom of Elwynn"
events = SELF_DAMAGE.on(Summon(CONTR... |
5ed9e43ec451aca9bdca4391bd35934e5fe4aea3 | huts/management/commands/dumphutsjson.py | huts/management/commands/dumphutsjson.py | from django.core.management.base import BaseCommand
from huts.utils import export
class Command(BaseCommand):
args = ''
help = 'Dumps the huts, agencies, and regions in the json api format.'
def handle(self, *args, **options):
print(export.db_as_json().encode('utf-8'))
| from optparse import make_option
from django.core.management.base import BaseCommand
from huts.utils import export
class Command(BaseCommand):
option_list = BaseCommand.option_list + (
make_option(
'--file',
help='Write to file instead of stdout'
),
)
help = 'Dumps... | Update command to take file argument | Update command to take file argument
| Python | mit | dylanfprice/hutmap,dylanfprice/hutmap,dylanfprice/hutmap,muescha/hutmap,muescha/hutmap,dylanfprice/hutmap,muescha/hutmap,muescha/hutmap | from django.core.management.base import BaseCommand
from huts.utils import export
class Command(BaseCommand):
args = ''
help = 'Dumps the huts, agencies, and regions in the json api format.'
def handle(self, *args, **options):
print(export.db_as_json().encode('utf-8'))
Update command to take file ... | from optparse import make_option
from django.core.management.base import BaseCommand
from huts.utils import export
class Command(BaseCommand):
option_list = BaseCommand.option_list + (
make_option(
'--file',
help='Write to file instead of stdout'
),
)
help = 'Dumps... | <commit_before>from django.core.management.base import BaseCommand
from huts.utils import export
class Command(BaseCommand):
args = ''
help = 'Dumps the huts, agencies, and regions in the json api format.'
def handle(self, *args, **options):
print(export.db_as_json().encode('utf-8'))
<commit_msg>U... | from optparse import make_option
from django.core.management.base import BaseCommand
from huts.utils import export
class Command(BaseCommand):
option_list = BaseCommand.option_list + (
make_option(
'--file',
help='Write to file instead of stdout'
),
)
help = 'Dumps... | from django.core.management.base import BaseCommand
from huts.utils import export
class Command(BaseCommand):
args = ''
help = 'Dumps the huts, agencies, and regions in the json api format.'
def handle(self, *args, **options):
print(export.db_as_json().encode('utf-8'))
Update command to take file ... | <commit_before>from django.core.management.base import BaseCommand
from huts.utils import export
class Command(BaseCommand):
args = ''
help = 'Dumps the huts, agencies, and regions in the json api format.'
def handle(self, *args, **options):
print(export.db_as_json().encode('utf-8'))
<commit_msg>U... |
f79644e88d64d387ea653a19fef0c2aa0772195f | swaggertester.py | swaggertester.py | import logging
import hypothesis
from client import SwaggerClient
from templates import APITemplate
from strategies import hypothesize_parameters
log = logging.getLogger(__name__)
def validate_schema(schema_path):
client = SwaggerClient(schema_path)
api_template = APITemplate(client)
log.debug("Expand... | import logging
import hypothesis
from client import SwaggerClient
from templates import APITemplate
from strategies import hypothesize_parameters
log = logging.getLogger(__name__)
def validate_schema(schema_path):
client = SwaggerClient(schema_path)
api_template = APITemplate(client)
log.debug("Expand... | Validate returned content-type is application/json | Validate returned content-type is application/json
| Python | mit | olipratt/swagger-conformance | import logging
import hypothesis
from client import SwaggerClient
from templates import APITemplate
from strategies import hypothesize_parameters
log = logging.getLogger(__name__)
def validate_schema(schema_path):
client = SwaggerClient(schema_path)
api_template = APITemplate(client)
log.debug("Expand... | import logging
import hypothesis
from client import SwaggerClient
from templates import APITemplate
from strategies import hypothesize_parameters
log = logging.getLogger(__name__)
def validate_schema(schema_path):
client = SwaggerClient(schema_path)
api_template = APITemplate(client)
log.debug("Expand... | <commit_before>import logging
import hypothesis
from client import SwaggerClient
from templates import APITemplate
from strategies import hypothesize_parameters
log = logging.getLogger(__name__)
def validate_schema(schema_path):
client = SwaggerClient(schema_path)
api_template = APITemplate(client)
lo... | import logging
import hypothesis
from client import SwaggerClient
from templates import APITemplate
from strategies import hypothesize_parameters
log = logging.getLogger(__name__)
def validate_schema(schema_path):
client = SwaggerClient(schema_path)
api_template = APITemplate(client)
log.debug("Expand... | import logging
import hypothesis
from client import SwaggerClient
from templates import APITemplate
from strategies import hypothesize_parameters
log = logging.getLogger(__name__)
def validate_schema(schema_path):
client = SwaggerClient(schema_path)
api_template = APITemplate(client)
log.debug("Expand... | <commit_before>import logging
import hypothesis
from client import SwaggerClient
from templates import APITemplate
from strategies import hypothesize_parameters
log = logging.getLogger(__name__)
def validate_schema(schema_path):
client = SwaggerClient(schema_path)
api_template = APITemplate(client)
lo... |
a9bc2a097516b36580946518978c1448df4ded6d | apt/get.py | apt/get.py | import os
import subprocess
def install(*packages):
env = os.environ.copy()
env['DEBIAN_FRONTEND'] = "noninteractive"
subprocess.call(['sudo', '-E', 'apt-get', '-y', 'install'] + packages, env=env)
def update():
env = os.environ.copy()
env['DEBIAN_FRONTEND'] = "noninteractive"
subprocess.c... | import os
import subprocess
def install(*packages):
env = os.environ.copy()
env['DEBIAN_FRONTEND'] = "noninteractive"
subprocess.call(['sudo', '-E', 'apt-get', '-y', 'install'] + list(packages), env=env)
def update():
env = os.environ.copy()
env['DEBIAN_FRONTEND'] = "noninteractive"
subpro... | Convert tuple to list for concatination | Convert tuple to list for concatination
| Python | mit | hatchery/genepool,hatchery/Genepool2 | import os
import subprocess
def install(*packages):
env = os.environ.copy()
env['DEBIAN_FRONTEND'] = "noninteractive"
subprocess.call(['sudo', '-E', 'apt-get', '-y', 'install'] + packages, env=env)
def update():
env = os.environ.copy()
env['DEBIAN_FRONTEND'] = "noninteractive"
subprocess.c... | import os
import subprocess
def install(*packages):
env = os.environ.copy()
env['DEBIAN_FRONTEND'] = "noninteractive"
subprocess.call(['sudo', '-E', 'apt-get', '-y', 'install'] + list(packages), env=env)
def update():
env = os.environ.copy()
env['DEBIAN_FRONTEND'] = "noninteractive"
subpro... | <commit_before>import os
import subprocess
def install(*packages):
env = os.environ.copy()
env['DEBIAN_FRONTEND'] = "noninteractive"
subprocess.call(['sudo', '-E', 'apt-get', '-y', 'install'] + packages, env=env)
def update():
env = os.environ.copy()
env['DEBIAN_FRONTEND'] = "noninteractive"
... | import os
import subprocess
def install(*packages):
env = os.environ.copy()
env['DEBIAN_FRONTEND'] = "noninteractive"
subprocess.call(['sudo', '-E', 'apt-get', '-y', 'install'] + list(packages), env=env)
def update():
env = os.environ.copy()
env['DEBIAN_FRONTEND'] = "noninteractive"
subpro... | import os
import subprocess
def install(*packages):
env = os.environ.copy()
env['DEBIAN_FRONTEND'] = "noninteractive"
subprocess.call(['sudo', '-E', 'apt-get', '-y', 'install'] + packages, env=env)
def update():
env = os.environ.copy()
env['DEBIAN_FRONTEND'] = "noninteractive"
subprocess.c... | <commit_before>import os
import subprocess
def install(*packages):
env = os.environ.copy()
env['DEBIAN_FRONTEND'] = "noninteractive"
subprocess.call(['sudo', '-E', 'apt-get', '-y', 'install'] + packages, env=env)
def update():
env = os.environ.copy()
env['DEBIAN_FRONTEND'] = "noninteractive"
... |
509d1af832ac31d2b6334b82c59c44eb00c0e434 | salt/grains/extra.py | salt/grains/extra.py | # -*- coding: utf-8 -*-
from __future__ import absolute_import
# Import python libs
import os
# Import third party libs
import yaml
import logging
# Import salt libs
import salt.utils
log = logging.getLogger(__name__)
def shell():
'''
Return the default shell to use on this system
'''
# Provides:... | # -*- coding: utf-8 -*-
from __future__ import absolute_import
# Import python libs
import os
# Import third party libs
import yaml
import logging
# Import salt libs
import salt.utils
__proxyenabled__ = ['*']
log = logging.getLogger(__name__)
def shell():
'''
Return the default shell to use on this syste... | Allow proxy minions to load static grains | Allow proxy minions to load static grains
Add the `__proxyenabled__` global var so the extra grains are loaded.
Inside the `config` function of the extra grains check if the minion
is a proxy, then try loading from <conf_file>/proxy.d/<proxy id>/grains.
| Python | apache-2.0 | saltstack/salt,saltstack/salt,saltstack/salt,saltstack/salt,saltstack/salt | # -*- coding: utf-8 -*-
from __future__ import absolute_import
# Import python libs
import os
# Import third party libs
import yaml
import logging
# Import salt libs
import salt.utils
log = logging.getLogger(__name__)
def shell():
'''
Return the default shell to use on this system
'''
# Provides:... | # -*- coding: utf-8 -*-
from __future__ import absolute_import
# Import python libs
import os
# Import third party libs
import yaml
import logging
# Import salt libs
import salt.utils
__proxyenabled__ = ['*']
log = logging.getLogger(__name__)
def shell():
'''
Return the default shell to use on this syste... | <commit_before># -*- coding: utf-8 -*-
from __future__ import absolute_import
# Import python libs
import os
# Import third party libs
import yaml
import logging
# Import salt libs
import salt.utils
log = logging.getLogger(__name__)
def shell():
'''
Return the default shell to use on this system
'''
... | # -*- coding: utf-8 -*-
from __future__ import absolute_import
# Import python libs
import os
# Import third party libs
import yaml
import logging
# Import salt libs
import salt.utils
__proxyenabled__ = ['*']
log = logging.getLogger(__name__)
def shell():
'''
Return the default shell to use on this syste... | # -*- coding: utf-8 -*-
from __future__ import absolute_import
# Import python libs
import os
# Import third party libs
import yaml
import logging
# Import salt libs
import salt.utils
log = logging.getLogger(__name__)
def shell():
'''
Return the default shell to use on this system
'''
# Provides:... | <commit_before># -*- coding: utf-8 -*-
from __future__ import absolute_import
# Import python libs
import os
# Import third party libs
import yaml
import logging
# Import salt libs
import salt.utils
log = logging.getLogger(__name__)
def shell():
'''
Return the default shell to use on this system
'''
... |
4f9db35566332778853e993f7791116d66c49dd4 | grako/rendering.py | grako/rendering.py | # -*- coding: utf-8 -*-
from __future__ import print_function, division, absolute_import, unicode_literals
import itertools
from .util import trim
def render(item, **fields):
""" Render the given item
"""
if item is None:
return ''
elif isinstance(item, Renderer):
return item.render(**f... | # -*- coding: utf-8 -*-
from __future__ import print_function, division, absolute_import, unicode_literals
import itertools
from .util import trim
def render(item, **fields):
""" Render the given item
"""
if item is None:
return ''
elif isinstance(item, Renderer):
return item.render(**f... | Allow render_fields to override the default template. | Allow render_fields to override the default template.
| Python | bsd-2-clause | swayf/grako,swayf/grako | # -*- coding: utf-8 -*-
from __future__ import print_function, division, absolute_import, unicode_literals
import itertools
from .util import trim
def render(item, **fields):
""" Render the given item
"""
if item is None:
return ''
elif isinstance(item, Renderer):
return item.render(**f... | # -*- coding: utf-8 -*-
from __future__ import print_function, division, absolute_import, unicode_literals
import itertools
from .util import trim
def render(item, **fields):
""" Render the given item
"""
if item is None:
return ''
elif isinstance(item, Renderer):
return item.render(**f... | <commit_before># -*- coding: utf-8 -*-
from __future__ import print_function, division, absolute_import, unicode_literals
import itertools
from .util import trim
def render(item, **fields):
""" Render the given item
"""
if item is None:
return ''
elif isinstance(item, Renderer):
return ... | # -*- coding: utf-8 -*-
from __future__ import print_function, division, absolute_import, unicode_literals
import itertools
from .util import trim
def render(item, **fields):
""" Render the given item
"""
if item is None:
return ''
elif isinstance(item, Renderer):
return item.render(**f... | # -*- coding: utf-8 -*-
from __future__ import print_function, division, absolute_import, unicode_literals
import itertools
from .util import trim
def render(item, **fields):
""" Render the given item
"""
if item is None:
return ''
elif isinstance(item, Renderer):
return item.render(**f... | <commit_before># -*- coding: utf-8 -*-
from __future__ import print_function, division, absolute_import, unicode_literals
import itertools
from .util import trim
def render(item, **fields):
""" Render the given item
"""
if item is None:
return ''
elif isinstance(item, Renderer):
return ... |
2d3e52567d7d361428ce93d02cc42ecaddacab6c | tests/test_commands.py | tests/test_commands.py | # -*- coding: utf-8 -*-
from couchapp import commands
from couchapp.errors import AppError
from mock import Mock, patch
from nose.tools import raises
@patch('couchapp.commands.document')
def test_init_dest(mock_doc):
commands.init(None, None, '/tmp/mk')
mock_doc.assert_called_once_with('/tmp/mk', create=Tru... | # -*- coding: utf-8 -*-
from couchapp import commands
from couchapp.errors import AppError
from mock import Mock, patch
from nose.tools import raises
@patch('couchapp.commands.document')
def test_init_dest(mock_doc):
commands.init(None, None, '/tmp/mk')
mock_doc.assert_called_once_with('/tmp/mk', create=Tru... | Test cases for push with export flag | Test cases for push with export flag
| Python | apache-2.0 | couchapp/couchapp,h4ki/couchapp,couchapp/couchapp,couchapp/couchapp,h4ki/couchapp,h4ki/couchapp,couchapp/couchapp,h4ki/couchapp | # -*- coding: utf-8 -*-
from couchapp import commands
from couchapp.errors import AppError
from mock import Mock, patch
from nose.tools import raises
@patch('couchapp.commands.document')
def test_init_dest(mock_doc):
commands.init(None, None, '/tmp/mk')
mock_doc.assert_called_once_with('/tmp/mk', create=Tru... | # -*- coding: utf-8 -*-
from couchapp import commands
from couchapp.errors import AppError
from mock import Mock, patch
from nose.tools import raises
@patch('couchapp.commands.document')
def test_init_dest(mock_doc):
commands.init(None, None, '/tmp/mk')
mock_doc.assert_called_once_with('/tmp/mk', create=Tru... | <commit_before># -*- coding: utf-8 -*-
from couchapp import commands
from couchapp.errors import AppError
from mock import Mock, patch
from nose.tools import raises
@patch('couchapp.commands.document')
def test_init_dest(mock_doc):
commands.init(None, None, '/tmp/mk')
mock_doc.assert_called_once_with('/tmp/... | # -*- coding: utf-8 -*-
from couchapp import commands
from couchapp.errors import AppError
from mock import Mock, patch
from nose.tools import raises
@patch('couchapp.commands.document')
def test_init_dest(mock_doc):
commands.init(None, None, '/tmp/mk')
mock_doc.assert_called_once_with('/tmp/mk', create=Tru... | # -*- coding: utf-8 -*-
from couchapp import commands
from couchapp.errors import AppError
from mock import Mock, patch
from nose.tools import raises
@patch('couchapp.commands.document')
def test_init_dest(mock_doc):
commands.init(None, None, '/tmp/mk')
mock_doc.assert_called_once_with('/tmp/mk', create=Tru... | <commit_before># -*- coding: utf-8 -*-
from couchapp import commands
from couchapp.errors import AppError
from mock import Mock, patch
from nose.tools import raises
@patch('couchapp.commands.document')
def test_init_dest(mock_doc):
commands.init(None, None, '/tmp/mk')
mock_doc.assert_called_once_with('/tmp/... |
5356aee78495dd7846cec6625b3980ba93be86e6 | tests/test_settings.py | tests/test_settings.py | from __future__ import unicode_literals
from os.path import dirname
MIU_TEST_ROOT = dirname(__file__)
INSTALLED_APPS = [
"django.contrib.auth",
"django.contrib.contenttypes",
"markitup",
"tests",
"tests.test_migration",
]
DATABASES = {
"default": {
"ENGINE": "django.db.backends.sqlit... | from __future__ import unicode_literals
from os.path import dirname, abspath, join
BASE_DIR = dirname(abspath(__file__))
INSTALLED_APPS = [
"django.contrib.auth",
"django.contrib.contenttypes",
"markitup",
"tests",
"tests.test_migration",
]
DATABASES = {
"default": {
"ENGINE": "djang... | Configure TEMPLATES in test settings. | Configure TEMPLATES in test settings.
| Python | bsd-3-clause | zsiciarz/django-markitup,zsiciarz/django-markitup,carljm/django-markitup,zsiciarz/django-markitup,carljm/django-markitup,carljm/django-markitup | from __future__ import unicode_literals
from os.path import dirname
MIU_TEST_ROOT = dirname(__file__)
INSTALLED_APPS = [
"django.contrib.auth",
"django.contrib.contenttypes",
"markitup",
"tests",
"tests.test_migration",
]
DATABASES = {
"default": {
"ENGINE": "django.db.backends.sqlit... | from __future__ import unicode_literals
from os.path import dirname, abspath, join
BASE_DIR = dirname(abspath(__file__))
INSTALLED_APPS = [
"django.contrib.auth",
"django.contrib.contenttypes",
"markitup",
"tests",
"tests.test_migration",
]
DATABASES = {
"default": {
"ENGINE": "djang... | <commit_before>from __future__ import unicode_literals
from os.path import dirname
MIU_TEST_ROOT = dirname(__file__)
INSTALLED_APPS = [
"django.contrib.auth",
"django.contrib.contenttypes",
"markitup",
"tests",
"tests.test_migration",
]
DATABASES = {
"default": {
"ENGINE": "django.db... | from __future__ import unicode_literals
from os.path import dirname, abspath, join
BASE_DIR = dirname(abspath(__file__))
INSTALLED_APPS = [
"django.contrib.auth",
"django.contrib.contenttypes",
"markitup",
"tests",
"tests.test_migration",
]
DATABASES = {
"default": {
"ENGINE": "djang... | from __future__ import unicode_literals
from os.path import dirname
MIU_TEST_ROOT = dirname(__file__)
INSTALLED_APPS = [
"django.contrib.auth",
"django.contrib.contenttypes",
"markitup",
"tests",
"tests.test_migration",
]
DATABASES = {
"default": {
"ENGINE": "django.db.backends.sqlit... | <commit_before>from __future__ import unicode_literals
from os.path import dirname
MIU_TEST_ROOT = dirname(__file__)
INSTALLED_APPS = [
"django.contrib.auth",
"django.contrib.contenttypes",
"markitup",
"tests",
"tests.test_migration",
]
DATABASES = {
"default": {
"ENGINE": "django.db... |
9dc253b79d885ca205b557f88fca6fa35bd8fe21 | tests/test_selector.py | tests/test_selector.py | from contextlib import contextmanager
from scell import Selector
from pytest import raises, fixture
def test_select(selector):
res = list(selector.select())
assert res
for event in res:
assert event.ready
def test_select_empty():
sel = Selector()
assert list(sel.select()) == []
def tes... | from contextlib import contextmanager
from scell import Selector
from pytest import raises, fixture
def test_select(selector):
res = list(selector.select())
assert res
for event in res:
assert event.ready
def test_select_empty():
sel = Selector()
assert list(sel.select()) == []
def tes... | Make Selector.scope test more rigorous | Make Selector.scope test more rigorous
| Python | mit | eugene-eeo/scell | from contextlib import contextmanager
from scell import Selector
from pytest import raises, fixture
def test_select(selector):
res = list(selector.select())
assert res
for event in res:
assert event.ready
def test_select_empty():
sel = Selector()
assert list(sel.select()) == []
def tes... | from contextlib import contextmanager
from scell import Selector
from pytest import raises, fixture
def test_select(selector):
res = list(selector.select())
assert res
for event in res:
assert event.ready
def test_select_empty():
sel = Selector()
assert list(sel.select()) == []
def tes... | <commit_before>from contextlib import contextmanager
from scell import Selector
from pytest import raises, fixture
def test_select(selector):
res = list(selector.select())
assert res
for event in res:
assert event.ready
def test_select_empty():
sel = Selector()
assert list(sel.select()) ... | from contextlib import contextmanager
from scell import Selector
from pytest import raises, fixture
def test_select(selector):
res = list(selector.select())
assert res
for event in res:
assert event.ready
def test_select_empty():
sel = Selector()
assert list(sel.select()) == []
def tes... | from contextlib import contextmanager
from scell import Selector
from pytest import raises, fixture
def test_select(selector):
res = list(selector.select())
assert res
for event in res:
assert event.ready
def test_select_empty():
sel = Selector()
assert list(sel.select()) == []
def tes... | <commit_before>from contextlib import contextmanager
from scell import Selector
from pytest import raises, fixture
def test_select(selector):
res = list(selector.select())
assert res
for event in res:
assert event.ready
def test_select_empty():
sel = Selector()
assert list(sel.select()) ... |
7520e1285af36292def45f892808841e78cc4a2b | bloop/index.py | bloop/index.py | missing = object()
class GlobalSecondaryIndex(object):
def __init__(self, hash_key=None, range_key=None,
write_units=1, read_units=1, name=missing):
self._model_name = None
self._backing_name = name
self.write_units = write_units
self.read_units = read_units
... | class Index(object):
def __init__(self, write_units=1, read_units=1, name=None, range_key=None):
self._model_name = None
self._dynamo_name = name
self.write_units = write_units
self.read_units = read_units
self.range_key = range_key
@property
def model_name(self):
... | Refactor GSI, LSI to use base Index class | Refactor GSI, LSI to use base Index class
| Python | mit | numberoverzero/bloop,numberoverzero/bloop | missing = object()
class GlobalSecondaryIndex(object):
def __init__(self, hash_key=None, range_key=None,
write_units=1, read_units=1, name=missing):
self._model_name = None
self._backing_name = name
self.write_units = write_units
self.read_units = read_units
... | class Index(object):
def __init__(self, write_units=1, read_units=1, name=None, range_key=None):
self._model_name = None
self._dynamo_name = name
self.write_units = write_units
self.read_units = read_units
self.range_key = range_key
@property
def model_name(self):
... | <commit_before>missing = object()
class GlobalSecondaryIndex(object):
def __init__(self, hash_key=None, range_key=None,
write_units=1, read_units=1, name=missing):
self._model_name = None
self._backing_name = name
self.write_units = write_units
self.read_units = r... | class Index(object):
def __init__(self, write_units=1, read_units=1, name=None, range_key=None):
self._model_name = None
self._dynamo_name = name
self.write_units = write_units
self.read_units = read_units
self.range_key = range_key
@property
def model_name(self):
... | missing = object()
class GlobalSecondaryIndex(object):
def __init__(self, hash_key=None, range_key=None,
write_units=1, read_units=1, name=missing):
self._model_name = None
self._backing_name = name
self.write_units = write_units
self.read_units = read_units
... | <commit_before>missing = object()
class GlobalSecondaryIndex(object):
def __init__(self, hash_key=None, range_key=None,
write_units=1, read_units=1, name=missing):
self._model_name = None
self._backing_name = name
self.write_units = write_units
self.read_units = r... |
db4ccce9e418a1227532bde8834ca682bc873609 | system/t04_mirror/show.py | system/t04_mirror/show.py | from lib import BaseTest
class ShowMirror1Test(BaseTest):
"""
show mirror: regular mirror
"""
fixtureCmds = ["aptly mirror create mirror1 http://mirror.yandex.ru/debian/ wheezy"]
runCmd = "aptly mirror show mirror1"
class ShowMirror2Test(BaseTest):
"""
show mirror: missing mirror
"""... | from lib import BaseTest
import re
class ShowMirror1Test(BaseTest):
"""
show mirror: regular mirror
"""
fixtureCmds = ["aptly mirror create mirror1 http://mirror.yandex.ru/debian/ wheezy"]
runCmd = "aptly mirror show mirror1"
class ShowMirror2Test(BaseTest):
"""
show mirror: missing mirr... | Remove updated at while comparing. | Remove updated at while comparing.
| Python | mit | gearmover/aptly,bsundsrud/aptly,adfinis-forks/aptly,vincentbernat/aptly,gdbdzgd/aptly,ceocoder/aptly,adfinis-forks/aptly,seaninspace/aptly,neolynx/aptly,scalp42/aptly,gdbdzgd/aptly,sobczyk/aptly,neolynx/aptly,scalp42/aptly,aptly-dev/aptly,seaninspace/aptly,aptly-dev/aptly,bsundsrud/aptly,gdbdzgd/aptly,bankonme/aptly,ad... | from lib import BaseTest
class ShowMirror1Test(BaseTest):
"""
show mirror: regular mirror
"""
fixtureCmds = ["aptly mirror create mirror1 http://mirror.yandex.ru/debian/ wheezy"]
runCmd = "aptly mirror show mirror1"
class ShowMirror2Test(BaseTest):
"""
show mirror: missing mirror
"""... | from lib import BaseTest
import re
class ShowMirror1Test(BaseTest):
"""
show mirror: regular mirror
"""
fixtureCmds = ["aptly mirror create mirror1 http://mirror.yandex.ru/debian/ wheezy"]
runCmd = "aptly mirror show mirror1"
class ShowMirror2Test(BaseTest):
"""
show mirror: missing mirr... | <commit_before>from lib import BaseTest
class ShowMirror1Test(BaseTest):
"""
show mirror: regular mirror
"""
fixtureCmds = ["aptly mirror create mirror1 http://mirror.yandex.ru/debian/ wheezy"]
runCmd = "aptly mirror show mirror1"
class ShowMirror2Test(BaseTest):
"""
show mirror: missing... | from lib import BaseTest
import re
class ShowMirror1Test(BaseTest):
"""
show mirror: regular mirror
"""
fixtureCmds = ["aptly mirror create mirror1 http://mirror.yandex.ru/debian/ wheezy"]
runCmd = "aptly mirror show mirror1"
class ShowMirror2Test(BaseTest):
"""
show mirror: missing mirr... | from lib import BaseTest
class ShowMirror1Test(BaseTest):
"""
show mirror: regular mirror
"""
fixtureCmds = ["aptly mirror create mirror1 http://mirror.yandex.ru/debian/ wheezy"]
runCmd = "aptly mirror show mirror1"
class ShowMirror2Test(BaseTest):
"""
show mirror: missing mirror
"""... | <commit_before>from lib import BaseTest
class ShowMirror1Test(BaseTest):
"""
show mirror: regular mirror
"""
fixtureCmds = ["aptly mirror create mirror1 http://mirror.yandex.ru/debian/ wheezy"]
runCmd = "aptly mirror show mirror1"
class ShowMirror2Test(BaseTest):
"""
show mirror: missing... |
1e8c094c0f806b624a41447446676c1f2ac3590d | tools/debug_adapter.py | tools/debug_adapter.py | #!/usr/bin/python
import sys
if 'darwin' in sys.platform:
sys.path.append('/Applications/Xcode.app/Contents/SharedFrameworks/LLDB.framework/Resources/Python')
sys.path.append('.')
import adapter
adapter.main.run_tcp_server()
| #!/usr/bin/python
import sys
import subprocess
import string
out = subprocess.check_output(['lldb', '-P'])
sys.path.append(string.strip(out))
sys.path.append('.')
import adapter
adapter.main.run_tcp_server()
| Fix adapter debugging on Linux. | Fix adapter debugging on Linux.
| Python | mit | vadimcn/vscode-lldb,vadimcn/vscode-lldb,vadimcn/vscode-lldb,vadimcn/vscode-lldb,vadimcn/vscode-lldb,vadimcn/vscode-lldb,vadimcn/vscode-lldb | #!/usr/bin/python
import sys
if 'darwin' in sys.platform:
sys.path.append('/Applications/Xcode.app/Contents/SharedFrameworks/LLDB.framework/Resources/Python')
sys.path.append('.')
import adapter
adapter.main.run_tcp_server()
Fix adapter debugging on Linux. | #!/usr/bin/python
import sys
import subprocess
import string
out = subprocess.check_output(['lldb', '-P'])
sys.path.append(string.strip(out))
sys.path.append('.')
import adapter
adapter.main.run_tcp_server()
| <commit_before>#!/usr/bin/python
import sys
if 'darwin' in sys.platform:
sys.path.append('/Applications/Xcode.app/Contents/SharedFrameworks/LLDB.framework/Resources/Python')
sys.path.append('.')
import adapter
adapter.main.run_tcp_server()
<commit_msg>Fix adapter debugging on Linux.<commit_after> | #!/usr/bin/python
import sys
import subprocess
import string
out = subprocess.check_output(['lldb', '-P'])
sys.path.append(string.strip(out))
sys.path.append('.')
import adapter
adapter.main.run_tcp_server()
| #!/usr/bin/python
import sys
if 'darwin' in sys.platform:
sys.path.append('/Applications/Xcode.app/Contents/SharedFrameworks/LLDB.framework/Resources/Python')
sys.path.append('.')
import adapter
adapter.main.run_tcp_server()
Fix adapter debugging on Linux.#!/usr/bin/python
import sys
import subprocess
import strin... | <commit_before>#!/usr/bin/python
import sys
if 'darwin' in sys.platform:
sys.path.append('/Applications/Xcode.app/Contents/SharedFrameworks/LLDB.framework/Resources/Python')
sys.path.append('.')
import adapter
adapter.main.run_tcp_server()
<commit_msg>Fix adapter debugging on Linux.<commit_after>#!/usr/bin/python
... |
b757a5e24fa8018647827b8194c985881df872d5 | scipy/signal/setup.py | scipy/signal/setup.py | #!/usr/bin/env python
def configuration(parent_package='',top_path=None):
from numpy.distutils.misc_util import Configuration
config = Configuration('signal', parent_package, top_path)
config.add_data_dir('tests')
config.add_extension('sigtools',
sources=['sigtoolsmodule.c',... | #!/usr/bin/env python
def configuration(parent_package='',top_path=None):
from numpy.distutils.misc_util import Configuration
config = Configuration('signal', parent_package, top_path)
config.add_data_dir('tests')
config.add_extension('sigtools',
sources=['sigtoolsmodule.c',... | Add newsig.c as a dependency to sigtools module. | Add newsig.c as a dependency to sigtools module.
| Python | bsd-3-clause | andyfaff/scipy,sauliusl/scipy,newemailjdm/scipy,jor-/scipy,mikebenfield/scipy,jsilter/scipy,mortada/scipy,josephcslater/scipy,jjhelmus/scipy,trankmichael/scipy,larsmans/scipy,jamestwebber/scipy,jonycgn/scipy,haudren/scipy,petebachant/scipy,endolith/scipy,vigna/scipy,e-q/scipy,raoulbq/scipy,aeklant/scipy,fredrikw/scipy,... | #!/usr/bin/env python
def configuration(parent_package='',top_path=None):
from numpy.distutils.misc_util import Configuration
config = Configuration('signal', parent_package, top_path)
config.add_data_dir('tests')
config.add_extension('sigtools',
sources=['sigtoolsmodule.c',... | #!/usr/bin/env python
def configuration(parent_package='',top_path=None):
from numpy.distutils.misc_util import Configuration
config = Configuration('signal', parent_package, top_path)
config.add_data_dir('tests')
config.add_extension('sigtools',
sources=['sigtoolsmodule.c',... | <commit_before>#!/usr/bin/env python
def configuration(parent_package='',top_path=None):
from numpy.distutils.misc_util import Configuration
config = Configuration('signal', parent_package, top_path)
config.add_data_dir('tests')
config.add_extension('sigtools',
sources=['sig... | #!/usr/bin/env python
def configuration(parent_package='',top_path=None):
from numpy.distutils.misc_util import Configuration
config = Configuration('signal', parent_package, top_path)
config.add_data_dir('tests')
config.add_extension('sigtools',
sources=['sigtoolsmodule.c',... | #!/usr/bin/env python
def configuration(parent_package='',top_path=None):
from numpy.distutils.misc_util import Configuration
config = Configuration('signal', parent_package, top_path)
config.add_data_dir('tests')
config.add_extension('sigtools',
sources=['sigtoolsmodule.c',... | <commit_before>#!/usr/bin/env python
def configuration(parent_package='',top_path=None):
from numpy.distutils.misc_util import Configuration
config = Configuration('signal', parent_package, top_path)
config.add_data_dir('tests')
config.add_extension('sigtools',
sources=['sig... |
73e8864e745ca75c2ea327b53244c9f2f4183e1a | lambda_function.py | lambda_function.py | #!/usr/bin/env python2
from StringIO import StringIO
import boto3
from dmr_marc_users_cs750 import (
get_users, get_groups,
write_contacts_csv,
write_contacts_xlsx
)
def s3_contacts(contacts, bucket, key):
s3 = boto3.client('s3')
o = StringIO()
if key.endswith('.csv'):
t = 'tex... | #!/usr/bin/env python2
from StringIO import StringIO
import boto3
from dmr_marc_users_cs750 import (
get_users, get_groups,
write_contacts_csv,
write_contacts_xlsx,
)
from dmrx_most_heard_n0gsg import (
get_users as get_most_heard,
write_n0gsg_csv,
)
def s3_contacts(contacts, bucket, key... | Add N0GSG DMRX MostHeard to AWS Lambda function | Add N0GSG DMRX MostHeard to AWS Lambda function
| Python | apache-2.0 | ajorg/DMR_contacts | #!/usr/bin/env python2
from StringIO import StringIO
import boto3
from dmr_marc_users_cs750 import (
get_users, get_groups,
write_contacts_csv,
write_contacts_xlsx
)
def s3_contacts(contacts, bucket, key):
s3 = boto3.client('s3')
o = StringIO()
if key.endswith('.csv'):
t = 'tex... | #!/usr/bin/env python2
from StringIO import StringIO
import boto3
from dmr_marc_users_cs750 import (
get_users, get_groups,
write_contacts_csv,
write_contacts_xlsx,
)
from dmrx_most_heard_n0gsg import (
get_users as get_most_heard,
write_n0gsg_csv,
)
def s3_contacts(contacts, bucket, key... | <commit_before>#!/usr/bin/env python2
from StringIO import StringIO
import boto3
from dmr_marc_users_cs750 import (
get_users, get_groups,
write_contacts_csv,
write_contacts_xlsx
)
def s3_contacts(contacts, bucket, key):
s3 = boto3.client('s3')
o = StringIO()
if key.endswith('.csv'):
... | #!/usr/bin/env python2
from StringIO import StringIO
import boto3
from dmr_marc_users_cs750 import (
get_users, get_groups,
write_contacts_csv,
write_contacts_xlsx,
)
from dmrx_most_heard_n0gsg import (
get_users as get_most_heard,
write_n0gsg_csv,
)
def s3_contacts(contacts, bucket, key... | #!/usr/bin/env python2
from StringIO import StringIO
import boto3
from dmr_marc_users_cs750 import (
get_users, get_groups,
write_contacts_csv,
write_contacts_xlsx
)
def s3_contacts(contacts, bucket, key):
s3 = boto3.client('s3')
o = StringIO()
if key.endswith('.csv'):
t = 'tex... | <commit_before>#!/usr/bin/env python2
from StringIO import StringIO
import boto3
from dmr_marc_users_cs750 import (
get_users, get_groups,
write_contacts_csv,
write_contacts_xlsx
)
def s3_contacts(contacts, bucket, key):
s3 = boto3.client('s3')
o = StringIO()
if key.endswith('.csv'):
... |
6dfb0c1ea4fb3d12d14a07d0e831eb32f3b2f340 | yaml_argparse.py | yaml_argparse.py | import argparse
import yaml
def parse_arguments_based_on_yaml(yaml_file):
with open(yaml_file) as f:
yaml_data = yaml.load(f)
# to start with, support only a single parameter
key = list(yaml_data.keys())[0]
value = yaml_data[key]
parser = argparse.ArgumentParser()
parser.add_argument... | import argparse
import yaml
def parse_arguments_based_on_yaml(yaml_file):
with open(yaml_file) as f:
yaml_data = yaml.load(f)
parser = argparse.ArgumentParser()
for key, value in yaml_data.items():
parser.add_argument("-{}".format(key), default=value)
args = parser.parse_args()
r... | Implement creating arguments for multiple strings | Implement creating arguments for multiple strings
| Python | mit | krasch/yaml_argparse,krasch/quickargs | import argparse
import yaml
def parse_arguments_based_on_yaml(yaml_file):
with open(yaml_file) as f:
yaml_data = yaml.load(f)
# to start with, support only a single parameter
key = list(yaml_data.keys())[0]
value = yaml_data[key]
parser = argparse.ArgumentParser()
parser.add_argument... | import argparse
import yaml
def parse_arguments_based_on_yaml(yaml_file):
with open(yaml_file) as f:
yaml_data = yaml.load(f)
parser = argparse.ArgumentParser()
for key, value in yaml_data.items():
parser.add_argument("-{}".format(key), default=value)
args = parser.parse_args()
r... | <commit_before>import argparse
import yaml
def parse_arguments_based_on_yaml(yaml_file):
with open(yaml_file) as f:
yaml_data = yaml.load(f)
# to start with, support only a single parameter
key = list(yaml_data.keys())[0]
value = yaml_data[key]
parser = argparse.ArgumentParser()
pars... | import argparse
import yaml
def parse_arguments_based_on_yaml(yaml_file):
with open(yaml_file) as f:
yaml_data = yaml.load(f)
parser = argparse.ArgumentParser()
for key, value in yaml_data.items():
parser.add_argument("-{}".format(key), default=value)
args = parser.parse_args()
r... | import argparse
import yaml
def parse_arguments_based_on_yaml(yaml_file):
with open(yaml_file) as f:
yaml_data = yaml.load(f)
# to start with, support only a single parameter
key = list(yaml_data.keys())[0]
value = yaml_data[key]
parser = argparse.ArgumentParser()
parser.add_argument... | <commit_before>import argparse
import yaml
def parse_arguments_based_on_yaml(yaml_file):
with open(yaml_file) as f:
yaml_data = yaml.load(f)
# to start with, support only a single parameter
key = list(yaml_data.keys())[0]
value = yaml_data[key]
parser = argparse.ArgumentParser()
pars... |
806e3b4f92fdc72a83cac18d338d7293673f9650 | yolk/__init__.py | yolk/__init__.py | """yolk
Author: Rob Cakebread <cakebread at gmail>
License : BSD
"""
__version__ = '0.6.1'
| """yolk
Author: Rob Cakebread <cakebread at gmail>
License : BSD
"""
__version__ = '0.6.2'
| Increment patch version to 0.6.2 | Increment patch version to 0.6.2
| Python | bsd-3-clause | myint/yolk,myint/yolk | """yolk
Author: Rob Cakebread <cakebread at gmail>
License : BSD
"""
__version__ = '0.6.1'
Increment patch version to 0.6.2 | """yolk
Author: Rob Cakebread <cakebread at gmail>
License : BSD
"""
__version__ = '0.6.2'
| <commit_before>"""yolk
Author: Rob Cakebread <cakebread at gmail>
License : BSD
"""
__version__ = '0.6.1'
<commit_msg>Increment patch version to 0.6.2<commit_after> | """yolk
Author: Rob Cakebread <cakebread at gmail>
License : BSD
"""
__version__ = '0.6.2'
| """yolk
Author: Rob Cakebread <cakebread at gmail>
License : BSD
"""
__version__ = '0.6.1'
Increment patch version to 0.6.2"""yolk
Author: Rob Cakebread <cakebread at gmail>
License : BSD
"""
__version__ = '0.6.2'
| <commit_before>"""yolk
Author: Rob Cakebread <cakebread at gmail>
License : BSD
"""
__version__ = '0.6.1'
<commit_msg>Increment patch version to 0.6.2<commit_after>"""yolk
Author: Rob Cakebread <cakebread at gmail>
License : BSD
"""
__version__ = '0.6.2'
|
fbcdd58775be1b6a72e1d1415f62a7bfade3dbd1 | pages/views.py | pages/views.py | from django.http import Http404
from django.shortcuts import get_object_or_404
from django.contrib.sites.models import SITE_CACHE
from pages import settings
from pages.models import Page, Content
from pages.utils import auto_render, get_language_from_request
def details(request, page_id=None, slug=None,
temp... | from django.http import Http404
from django.shortcuts import get_object_or_404
from django.contrib.sites.models import SITE_CACHE
from pages import settings
from pages.models import Page, Content
from pages.utils import auto_render, get_language_from_request
def details(request, page_id=None, slug=None,
temp... | Add documentation to the default view | Add documentation to the default view
git-svn-id: 54fea250f97f2a4e12c6f7a610b8f07cb4c107b4@292 439a9e5f-3f3e-0410-bc46-71226ad0111b
| Python | bsd-3-clause | remik/django-page-cms,akaihola/django-page-cms,oliciv/django-page-cms,akaihola/django-page-cms,akaihola/django-page-cms,remik/django-page-cms,oliciv/django-page-cms,batiste/django-page-cms,pombredanne/django-page-cms-1,pombredanne/django-page-cms-1,remik/django-page-cms,pombredanne/django-page-cms-1,batiste/django-page... | from django.http import Http404
from django.shortcuts import get_object_or_404
from django.contrib.sites.models import SITE_CACHE
from pages import settings
from pages.models import Page, Content
from pages.utils import auto_render, get_language_from_request
def details(request, page_id=None, slug=None,
temp... | from django.http import Http404
from django.shortcuts import get_object_or_404
from django.contrib.sites.models import SITE_CACHE
from pages import settings
from pages.models import Page, Content
from pages.utils import auto_render, get_language_from_request
def details(request, page_id=None, slug=None,
temp... | <commit_before>from django.http import Http404
from django.shortcuts import get_object_or_404
from django.contrib.sites.models import SITE_CACHE
from pages import settings
from pages.models import Page, Content
from pages.utils import auto_render, get_language_from_request
def details(request, page_id=None, slug=None... | from django.http import Http404
from django.shortcuts import get_object_or_404
from django.contrib.sites.models import SITE_CACHE
from pages import settings
from pages.models import Page, Content
from pages.utils import auto_render, get_language_from_request
def details(request, page_id=None, slug=None,
temp... | from django.http import Http404
from django.shortcuts import get_object_or_404
from django.contrib.sites.models import SITE_CACHE
from pages import settings
from pages.models import Page, Content
from pages.utils import auto_render, get_language_from_request
def details(request, page_id=None, slug=None,
temp... | <commit_before>from django.http import Http404
from django.shortcuts import get_object_or_404
from django.contrib.sites.models import SITE_CACHE
from pages import settings
from pages.models import Page, Content
from pages.utils import auto_render, get_language_from_request
def details(request, page_id=None, slug=None... |
eae4b06bd798eab3a46bdd5b7452411bb7fb02e1 | dashcam.py | dashcam.py | # dashcam.py
# A Raspberry Pi powered, GPS enabled, 3D printed bicycle dashcam
# By Matthew Timmons-Brown, The Raspberry Pi Guy
import pygame
import picamera
import os
os.putenv('SDL_VIDEODRIVER', 'fbcon')
os.putenv('SDL_FBDEV' , '/dev/fb1')
os.putenv('SDL_MOUSEDRV' , 'TSLIB')
os.putenv('SDL_MOUSEDEV' , '/de... | # dashcam.py
# A Raspberry Pi powered, GPS enabled, 3D printed bicycle dashcam
# By Matthew Timmons-Brown, The Raspberry Pi Guy
import pygame
import picamera
import os
import sys
import io
os.putenv('SDL_VIDEODRIVER', 'fbcon')
os.putenv('SDL_FBDEV' , '/dev/fb1')
os.putenv('SDL_MOUSEDRV' , 'TSLIB')
os.putenv('S... | Update dascham with pygame GO button load | Update dascham with pygame GO button load
| Python | mit | the-raspberry-pi-guy/bike_dashcam,the-raspberry-pi-guy/bike_dashcam | # dashcam.py
# A Raspberry Pi powered, GPS enabled, 3D printed bicycle dashcam
# By Matthew Timmons-Brown, The Raspberry Pi Guy
import pygame
import picamera
import os
os.putenv('SDL_VIDEODRIVER', 'fbcon')
os.putenv('SDL_FBDEV' , '/dev/fb1')
os.putenv('SDL_MOUSEDRV' , 'TSLIB')
os.putenv('SDL_MOUSEDEV' , '/de... | # dashcam.py
# A Raspberry Pi powered, GPS enabled, 3D printed bicycle dashcam
# By Matthew Timmons-Brown, The Raspberry Pi Guy
import pygame
import picamera
import os
import sys
import io
os.putenv('SDL_VIDEODRIVER', 'fbcon')
os.putenv('SDL_FBDEV' , '/dev/fb1')
os.putenv('SDL_MOUSEDRV' , 'TSLIB')
os.putenv('S... | <commit_before># dashcam.py
# A Raspberry Pi powered, GPS enabled, 3D printed bicycle dashcam
# By Matthew Timmons-Brown, The Raspberry Pi Guy
import pygame
import picamera
import os
os.putenv('SDL_VIDEODRIVER', 'fbcon')
os.putenv('SDL_FBDEV' , '/dev/fb1')
os.putenv('SDL_MOUSEDRV' , 'TSLIB')
os.putenv('SDL_MOU... | # dashcam.py
# A Raspberry Pi powered, GPS enabled, 3D printed bicycle dashcam
# By Matthew Timmons-Brown, The Raspberry Pi Guy
import pygame
import picamera
import os
import sys
import io
os.putenv('SDL_VIDEODRIVER', 'fbcon')
os.putenv('SDL_FBDEV' , '/dev/fb1')
os.putenv('SDL_MOUSEDRV' , 'TSLIB')
os.putenv('S... | # dashcam.py
# A Raspberry Pi powered, GPS enabled, 3D printed bicycle dashcam
# By Matthew Timmons-Brown, The Raspberry Pi Guy
import pygame
import picamera
import os
os.putenv('SDL_VIDEODRIVER', 'fbcon')
os.putenv('SDL_FBDEV' , '/dev/fb1')
os.putenv('SDL_MOUSEDRV' , 'TSLIB')
os.putenv('SDL_MOUSEDEV' , '/de... | <commit_before># dashcam.py
# A Raspberry Pi powered, GPS enabled, 3D printed bicycle dashcam
# By Matthew Timmons-Brown, The Raspberry Pi Guy
import pygame
import picamera
import os
os.putenv('SDL_VIDEODRIVER', 'fbcon')
os.putenv('SDL_FBDEV' , '/dev/fb1')
os.putenv('SDL_MOUSEDRV' , 'TSLIB')
os.putenv('SDL_MOU... |
b35d4292e50e8a8dc56635bddeac5a1fc42a5d19 | tveebot_tracker/source.py | tveebot_tracker/source.py | from abc import ABC, abstractmethod
class TVShowNotFound(Exception):
""" Raised when a reference does not match any TV Show available """
class EpisodeSource(ABC):
"""
Abstract base class to define the interface for and episode source.
An episode source is used by the tracker to obtain episode file... | from abc import ABC, abstractmethod
class TVShowNotFound(Exception):
""" Raised when a reference does not match any TV Show available """
class EpisodeSource(ABC):
"""
Abstract base class to define the interface for and episode source.
An episode source is used by the tracker to obtain episode file... | Rename Source's get_episodes_for() method to fetch() | Rename Source's get_episodes_for() method to fetch()
| Python | mit | tveebot/tracker | from abc import ABC, abstractmethod
class TVShowNotFound(Exception):
""" Raised when a reference does not match any TV Show available """
class EpisodeSource(ABC):
"""
Abstract base class to define the interface for and episode source.
An episode source is used by the tracker to obtain episode file... | from abc import ABC, abstractmethod
class TVShowNotFound(Exception):
""" Raised when a reference does not match any TV Show available """
class EpisodeSource(ABC):
"""
Abstract base class to define the interface for and episode source.
An episode source is used by the tracker to obtain episode file... | <commit_before>from abc import ABC, abstractmethod
class TVShowNotFound(Exception):
""" Raised when a reference does not match any TV Show available """
class EpisodeSource(ABC):
"""
Abstract base class to define the interface for and episode source.
An episode source is used by the tracker to obta... | from abc import ABC, abstractmethod
class TVShowNotFound(Exception):
""" Raised when a reference does not match any TV Show available """
class EpisodeSource(ABC):
"""
Abstract base class to define the interface for and episode source.
An episode source is used by the tracker to obtain episode file... | from abc import ABC, abstractmethod
class TVShowNotFound(Exception):
""" Raised when a reference does not match any TV Show available """
class EpisodeSource(ABC):
"""
Abstract base class to define the interface for and episode source.
An episode source is used by the tracker to obtain episode file... | <commit_before>from abc import ABC, abstractmethod
class TVShowNotFound(Exception):
""" Raised when a reference does not match any TV Show available """
class EpisodeSource(ABC):
"""
Abstract base class to define the interface for and episode source.
An episode source is used by the tracker to obta... |
c7601ed4144b12717f536f2fc2fc0ddb5745ec27 | opentaxii/auth/sqldb/models.py | opentaxii/auth/sqldb/models.py | import hmac
import bcrypt
from sqlalchemy.schema import Column
from sqlalchemy.types import Integer, String
from sqlalchemy.ext.declarative import declarative_base
__all__ = ['Base', 'Account']
Base = declarative_base()
MAX_STR_LEN = 256
class Account(Base):
__tablename__ = 'accounts'
id = Column(Integ... | import bcrypt
from sqlalchemy.schema import Column
from sqlalchemy.types import Integer, String
from sqlalchemy.ext.declarative import declarative_base
from werkzeug.security import safe_str_cmp
__all__ = ['Base', 'Account']
Base = declarative_base()
MAX_STR_LEN = 256
class Account(Base):
__tablename__ = 'a... | Use Werkzeug's safe_str_cmp() instead of hmac.compare_digest() | Use Werkzeug's safe_str_cmp() instead of hmac.compare_digest()
Werkzeug will use the latter on Python >2.7.7, and provides a fallback
for older Python versions.
| Python | bsd-3-clause | EclecticIQ/OpenTAXII,Intelworks/OpenTAXII,EclecticIQ/OpenTAXII,Intelworks/OpenTAXII | import hmac
import bcrypt
from sqlalchemy.schema import Column
from sqlalchemy.types import Integer, String
from sqlalchemy.ext.declarative import declarative_base
__all__ = ['Base', 'Account']
Base = declarative_base()
MAX_STR_LEN = 256
class Account(Base):
__tablename__ = 'accounts'
id = Column(Integ... | import bcrypt
from sqlalchemy.schema import Column
from sqlalchemy.types import Integer, String
from sqlalchemy.ext.declarative import declarative_base
from werkzeug.security import safe_str_cmp
__all__ = ['Base', 'Account']
Base = declarative_base()
MAX_STR_LEN = 256
class Account(Base):
__tablename__ = 'a... | <commit_before>import hmac
import bcrypt
from sqlalchemy.schema import Column
from sqlalchemy.types import Integer, String
from sqlalchemy.ext.declarative import declarative_base
__all__ = ['Base', 'Account']
Base = declarative_base()
MAX_STR_LEN = 256
class Account(Base):
__tablename__ = 'accounts'
id... | import bcrypt
from sqlalchemy.schema import Column
from sqlalchemy.types import Integer, String
from sqlalchemy.ext.declarative import declarative_base
from werkzeug.security import safe_str_cmp
__all__ = ['Base', 'Account']
Base = declarative_base()
MAX_STR_LEN = 256
class Account(Base):
__tablename__ = 'a... | import hmac
import bcrypt
from sqlalchemy.schema import Column
from sqlalchemy.types import Integer, String
from sqlalchemy.ext.declarative import declarative_base
__all__ = ['Base', 'Account']
Base = declarative_base()
MAX_STR_LEN = 256
class Account(Base):
__tablename__ = 'accounts'
id = Column(Integ... | <commit_before>import hmac
import bcrypt
from sqlalchemy.schema import Column
from sqlalchemy.types import Integer, String
from sqlalchemy.ext.declarative import declarative_base
__all__ = ['Base', 'Account']
Base = declarative_base()
MAX_STR_LEN = 256
class Account(Base):
__tablename__ = 'accounts'
id... |
21bff1460ae71c1664ab3fbccd678bc5be0b8dd3 | pirate_add_shift_recurrence.py | pirate_add_shift_recurrence.py | #!/usr/bin/python
import sys
import os
from tasklib import TaskWarrior
time_attributes = ('wait', 'scheduled')
def is_new_local_recurrence_child_task(task):
# Do not affect tasks not spun by recurrence
if not task['parent']:
return False
# Newly created recurrence tasks actually have
# modif... | #!/usr/bin/python
import sys
import os
from tasklib import TaskWarrior
time_attributes = ('wait', 'scheduled', 'until')
def is_new_local_recurrence_child_task(task):
# Do not affect tasks not spun by recurrence
if not task['parent']:
return False
# Newly created recurrence tasks actually have
... | Add "until" attribute to list handled by hook | Add "until" attribute to list handled by hook
TaskWarrior 2.5.1 (and possibly earlier versions) does not shift the
"until" attribute appropriately during recurrence. This hook provides a
workaround for that.
Fixes [#6](https://github.com/tbabej/task.shift-recurrence/issues/6).
| Python | mit | tbabej/task.shift-recurrence | #!/usr/bin/python
import sys
import os
from tasklib import TaskWarrior
time_attributes = ('wait', 'scheduled')
def is_new_local_recurrence_child_task(task):
# Do not affect tasks not spun by recurrence
if not task['parent']:
return False
# Newly created recurrence tasks actually have
# modif... | #!/usr/bin/python
import sys
import os
from tasklib import TaskWarrior
time_attributes = ('wait', 'scheduled', 'until')
def is_new_local_recurrence_child_task(task):
# Do not affect tasks not spun by recurrence
if not task['parent']:
return False
# Newly created recurrence tasks actually have
... | <commit_before>#!/usr/bin/python
import sys
import os
from tasklib import TaskWarrior
time_attributes = ('wait', 'scheduled')
def is_new_local_recurrence_child_task(task):
# Do not affect tasks not spun by recurrence
if not task['parent']:
return False
# Newly created recurrence tasks actually h... | #!/usr/bin/python
import sys
import os
from tasklib import TaskWarrior
time_attributes = ('wait', 'scheduled', 'until')
def is_new_local_recurrence_child_task(task):
# Do not affect tasks not spun by recurrence
if not task['parent']:
return False
# Newly created recurrence tasks actually have
... | #!/usr/bin/python
import sys
import os
from tasklib import TaskWarrior
time_attributes = ('wait', 'scheduled')
def is_new_local_recurrence_child_task(task):
# Do not affect tasks not spun by recurrence
if not task['parent']:
return False
# Newly created recurrence tasks actually have
# modif... | <commit_before>#!/usr/bin/python
import sys
import os
from tasklib import TaskWarrior
time_attributes = ('wait', 'scheduled')
def is_new_local_recurrence_child_task(task):
# Do not affect tasks not spun by recurrence
if not task['parent']:
return False
# Newly created recurrence tasks actually h... |
0a51f23417034e6cdada4ac01e3d3dcf8026f822 | xbob/blitz/__init__.py | xbob/blitz/__init__.py | #!/usr/bin/env python
# vim: set fileencoding=utf-8 :
# Andre Anjos <andre.anjos@idiap.ch>
# Fri 20 Sep 14:45:01 2013
"""Blitz++ Array bindings for Python"""
from ._library import array, as_blitz, __version__, __api_version__, versions
def get_include():
"""Returns the directory containing the C/C++ API include di... | #!/usr/bin/env python
# vim: set fileencoding=utf-8 :
# Andre Anjos <andre.anjos@idiap.ch>
# Fri 20 Sep 14:45:01 2013
"""Blitz++ Array bindings for Python"""
from ._library import array, as_blitz, __version__, __api_version__, versions
def get_include():
"""Returns the directory containing the C/C++ API include di... | Fix python3 compatibility issues with doc fix | Fix python3 compatibility issues with doc fix
| Python | bsd-3-clause | tiagofrepereira2012/bob.blitz,tiagofrepereira2012/bob.blitz,tiagofrepereira2012/bob.blitz | #!/usr/bin/env python
# vim: set fileencoding=utf-8 :
# Andre Anjos <andre.anjos@idiap.ch>
# Fri 20 Sep 14:45:01 2013
"""Blitz++ Array bindings for Python"""
from ._library import array, as_blitz, __version__, __api_version__, versions
def get_include():
"""Returns the directory containing the C/C++ API include di... | #!/usr/bin/env python
# vim: set fileencoding=utf-8 :
# Andre Anjos <andre.anjos@idiap.ch>
# Fri 20 Sep 14:45:01 2013
"""Blitz++ Array bindings for Python"""
from ._library import array, as_blitz, __version__, __api_version__, versions
def get_include():
"""Returns the directory containing the C/C++ API include di... | <commit_before>#!/usr/bin/env python
# vim: set fileencoding=utf-8 :
# Andre Anjos <andre.anjos@idiap.ch>
# Fri 20 Sep 14:45:01 2013
"""Blitz++ Array bindings for Python"""
from ._library import array, as_blitz, __version__, __api_version__, versions
def get_include():
"""Returns the directory containing the C/C++... | #!/usr/bin/env python
# vim: set fileencoding=utf-8 :
# Andre Anjos <andre.anjos@idiap.ch>
# Fri 20 Sep 14:45:01 2013
"""Blitz++ Array bindings for Python"""
from ._library import array, as_blitz, __version__, __api_version__, versions
def get_include():
"""Returns the directory containing the C/C++ API include di... | #!/usr/bin/env python
# vim: set fileencoding=utf-8 :
# Andre Anjos <andre.anjos@idiap.ch>
# Fri 20 Sep 14:45:01 2013
"""Blitz++ Array bindings for Python"""
from ._library import array, as_blitz, __version__, __api_version__, versions
def get_include():
"""Returns the directory containing the C/C++ API include di... | <commit_before>#!/usr/bin/env python
# vim: set fileencoding=utf-8 :
# Andre Anjos <andre.anjos@idiap.ch>
# Fri 20 Sep 14:45:01 2013
"""Blitz++ Array bindings for Python"""
from ._library import array, as_blitz, __version__, __api_version__, versions
def get_include():
"""Returns the directory containing the C/C++... |
30c21806dcc347326d6ac51be2adac9ff637f241 | day20/part1.py | day20/part1.py | ranges = []
for line in open('input.txt', 'r'):
ranges.append(tuple(map(int, line.split('-'))))
ranges.sort()
lowest = 0
for l, r in ranges:
if l <= lowest <= r:
lowest = r + 1
print(lowest)
input()
| ranges = []
for line in open('input.txt', 'r'):
ranges.append(tuple(map(int, line.split('-'))))
ranges.sort()
lowest = 0
for l, r in ranges:
if l > lowest:
break
if lowest <= r:
lowest = r + 1
print(lowest)
input()
| Break the loop at the first gap | Break the loop at the first gap
| Python | unlicense | ultramega/adventofcode2016 | ranges = []
for line in open('input.txt', 'r'):
ranges.append(tuple(map(int, line.split('-'))))
ranges.sort()
lowest = 0
for l, r in ranges:
if l <= lowest <= r:
lowest = r + 1
print(lowest)
input()
Break the loop at the first gap | ranges = []
for line in open('input.txt', 'r'):
ranges.append(tuple(map(int, line.split('-'))))
ranges.sort()
lowest = 0
for l, r in ranges:
if l > lowest:
break
if lowest <= r:
lowest = r + 1
print(lowest)
input()
| <commit_before>ranges = []
for line in open('input.txt', 'r'):
ranges.append(tuple(map(int, line.split('-'))))
ranges.sort()
lowest = 0
for l, r in ranges:
if l <= lowest <= r:
lowest = r + 1
print(lowest)
input()
<commit_msg>Break the loop at the first gap<commit_after> | ranges = []
for line in open('input.txt', 'r'):
ranges.append(tuple(map(int, line.split('-'))))
ranges.sort()
lowest = 0
for l, r in ranges:
if l > lowest:
break
if lowest <= r:
lowest = r + 1
print(lowest)
input()
| ranges = []
for line in open('input.txt', 'r'):
ranges.append(tuple(map(int, line.split('-'))))
ranges.sort()
lowest = 0
for l, r in ranges:
if l <= lowest <= r:
lowest = r + 1
print(lowest)
input()
Break the loop at the first gapranges = []
for line in open('input.txt', 'r'):
ranges.append(tuple(... | <commit_before>ranges = []
for line in open('input.txt', 'r'):
ranges.append(tuple(map(int, line.split('-'))))
ranges.sort()
lowest = 0
for l, r in ranges:
if l <= lowest <= r:
lowest = r + 1
print(lowest)
input()
<commit_msg>Break the loop at the first gap<commit_after>ranges = []
for line in open('i... |
4a75df6e253401cbed7b31e1882211946f02093a | src/ggrc/__init__.py | src/ggrc/__init__.py |
# Copyright (C) 2016 Google Inc., authors, and contributors
# Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file>
from .bootstrap import db, logger
| # Copyright (C) 2016 Google Inc., authors, and contributors
# Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file>
from ggrc.bootstrap import db
__all__ = [
db
]
| Remove logger from ggrc init | Remove logger from ggrc init
The logger from ggrc init is never used and should be removed.
| Python | apache-2.0 | selahssea/ggrc-core,NejcZupec/ggrc-core,plamut/ggrc-core,plamut/ggrc-core,j0gurt/ggrc-core,NejcZupec/ggrc-core,j0gurt/ggrc-core,NejcZupec/ggrc-core,AleksNeStu/ggrc-core,VinnieJohns/ggrc-core,VinnieJohns/ggrc-core,josthkko/ggrc-core,josthkko/ggrc-core,selahssea/ggrc-core,NejcZupec/ggrc-core,kr41/ggrc-core,j0gurt/ggrc-co... |
# Copyright (C) 2016 Google Inc., authors, and contributors
# Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file>
from .bootstrap import db, logger
Remove logger from ggrc init
The logger from ggrc init is never used and should be removed. | # Copyright (C) 2016 Google Inc., authors, and contributors
# Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file>
from ggrc.bootstrap import db
__all__ = [
db
]
| <commit_before>
# Copyright (C) 2016 Google Inc., authors, and contributors
# Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file>
from .bootstrap import db, logger
<commit_msg>Remove logger from ggrc init
The logger from ggrc init is never used and should be removed.<commit_after> | # Copyright (C) 2016 Google Inc., authors, and contributors
# Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file>
from ggrc.bootstrap import db
__all__ = [
db
]
|
# Copyright (C) 2016 Google Inc., authors, and contributors
# Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file>
from .bootstrap import db, logger
Remove logger from ggrc init
The logger from ggrc init is never used and should be removed.# Copyright (C) 2016 Google Inc., authors, and contri... | <commit_before>
# Copyright (C) 2016 Google Inc., authors, and contributors
# Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file>
from .bootstrap import db, logger
<commit_msg>Remove logger from ggrc init
The logger from ggrc init is never used and should be removed.<commit_after># Copyright ... |
3885fcbb31393f936bc58842dc06bdc9ffe55151 | fabfile.py | fabfile.py | #!/usr/bin/env python
from fabric.api import env, run, sudo, task
from fabric.context_managers import cd, prefix
env.use_ssh_config = True
home = '~/jarvis2'
@task
def pull_code():
with cd(home):
run('git pull --rebase')
@task
def update_dependencies():
with prefix('workon jarvis2'):
run('... | #!/usr/bin/env python
from fabric.api import env, run, sudo, task
from fabric.context_managers import cd, prefix
from fabric.contrib.project import rsync_project
env.use_ssh_config = True
home = '~/jarvis2'
@task
def pull_code():
with cd(home):
run('git pull --rebase')
@task
def push_code():
rsync... | Add task for pushing code with rsync | Add task for pushing code with rsync
| Python | mit | Foxboron/Frank,mpolden/jarvis2,martinp/jarvis2,Foxboron/Frank,mpolden/jarvis2,mpolden/jarvis2,martinp/jarvis2,Foxboron/Frank,martinp/jarvis2 | #!/usr/bin/env python
from fabric.api import env, run, sudo, task
from fabric.context_managers import cd, prefix
env.use_ssh_config = True
home = '~/jarvis2'
@task
def pull_code():
with cd(home):
run('git pull --rebase')
@task
def update_dependencies():
with prefix('workon jarvis2'):
run('... | #!/usr/bin/env python
from fabric.api import env, run, sudo, task
from fabric.context_managers import cd, prefix
from fabric.contrib.project import rsync_project
env.use_ssh_config = True
home = '~/jarvis2'
@task
def pull_code():
with cd(home):
run('git pull --rebase')
@task
def push_code():
rsync... | <commit_before>#!/usr/bin/env python
from fabric.api import env, run, sudo, task
from fabric.context_managers import cd, prefix
env.use_ssh_config = True
home = '~/jarvis2'
@task
def pull_code():
with cd(home):
run('git pull --rebase')
@task
def update_dependencies():
with prefix('workon jarvis2')... | #!/usr/bin/env python
from fabric.api import env, run, sudo, task
from fabric.context_managers import cd, prefix
from fabric.contrib.project import rsync_project
env.use_ssh_config = True
home = '~/jarvis2'
@task
def pull_code():
with cd(home):
run('git pull --rebase')
@task
def push_code():
rsync... | #!/usr/bin/env python
from fabric.api import env, run, sudo, task
from fabric.context_managers import cd, prefix
env.use_ssh_config = True
home = '~/jarvis2'
@task
def pull_code():
with cd(home):
run('git pull --rebase')
@task
def update_dependencies():
with prefix('workon jarvis2'):
run('... | <commit_before>#!/usr/bin/env python
from fabric.api import env, run, sudo, task
from fabric.context_managers import cd, prefix
env.use_ssh_config = True
home = '~/jarvis2'
@task
def pull_code():
with cd(home):
run('git pull --rebase')
@task
def update_dependencies():
with prefix('workon jarvis2')... |
8af0f327b0f9b975f9fc05e41aff2f99bb26abce | people/serializers.py | people/serializers.py | from django.contrib.gis import serializers
from rest_framework import serializers
from people.models import Customer
from people.models import InternalUser
class CustomerSerializer(serializers.ModelSerializer):
phone_number = serializers.IntegerField()
def validate_phone_number(self, val):
if len(st... | from django.contrib.gis import serializers
from rest_framework import serializers
from people.models import Customer
from people.models import InternalUser
class CustomerSerializer(serializers.ModelSerializer):
phone_number = serializers.IntegerField()
def validate_phone_number(self, val):
if len(st... | Fix the phone number thing | Fix the phone number thing
| Python | apache-2.0 | rameshgopalakrishnan/v_excel_inventory,rameshgopalakrishnan/v_excel_inventory,rameshgopalakrishnan/v_excel_inventory | from django.contrib.gis import serializers
from rest_framework import serializers
from people.models import Customer
from people.models import InternalUser
class CustomerSerializer(serializers.ModelSerializer):
phone_number = serializers.IntegerField()
def validate_phone_number(self, val):
if len(st... | from django.contrib.gis import serializers
from rest_framework import serializers
from people.models import Customer
from people.models import InternalUser
class CustomerSerializer(serializers.ModelSerializer):
phone_number = serializers.IntegerField()
def validate_phone_number(self, val):
if len(st... | <commit_before>from django.contrib.gis import serializers
from rest_framework import serializers
from people.models import Customer
from people.models import InternalUser
class CustomerSerializer(serializers.ModelSerializer):
phone_number = serializers.IntegerField()
def validate_phone_number(self, val):
... | from django.contrib.gis import serializers
from rest_framework import serializers
from people.models import Customer
from people.models import InternalUser
class CustomerSerializer(serializers.ModelSerializer):
phone_number = serializers.IntegerField()
def validate_phone_number(self, val):
if len(st... | from django.contrib.gis import serializers
from rest_framework import serializers
from people.models import Customer
from people.models import InternalUser
class CustomerSerializer(serializers.ModelSerializer):
phone_number = serializers.IntegerField()
def validate_phone_number(self, val):
if len(st... | <commit_before>from django.contrib.gis import serializers
from rest_framework import serializers
from people.models import Customer
from people.models import InternalUser
class CustomerSerializer(serializers.ModelSerializer):
phone_number = serializers.IntegerField()
def validate_phone_number(self, val):
... |
5e1daf36d604ee1898e8486458013e63010d6888 | opps/api/models.py | opps/api/models.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import uuid
import hmac
from django.db import models
from django.conf import settings
from django.contrib.auth import get_user_model
try:
from hashlib import sha1
except ImportError:
import sha
sha1 = sha.sha
User = get_user_model()
class ApiKey(models.Mod... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import uuid
import hmac
from django.db import models
from django.conf import settings
from django.utils.translation import ugettext_lazy as _
from django.contrib.auth import get_user_model
try:
from hashlib import sha1
except ImportError:
import sha
sha1 = sha... | Add missing translations on API model | Add missing translations on API model
| Python | mit | YACOWS/opps,YACOWS/opps,williamroot/opps,opps/opps,jeanmask/opps,williamroot/opps,williamroot/opps,YACOWS/opps,opps/opps,jeanmask/opps,opps/opps,opps/opps,jeanmask/opps,YACOWS/opps,jeanmask/opps,williamroot/opps | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import uuid
import hmac
from django.db import models
from django.conf import settings
from django.contrib.auth import get_user_model
try:
from hashlib import sha1
except ImportError:
import sha
sha1 = sha.sha
User = get_user_model()
class ApiKey(models.Mod... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import uuid
import hmac
from django.db import models
from django.conf import settings
from django.utils.translation import ugettext_lazy as _
from django.contrib.auth import get_user_model
try:
from hashlib import sha1
except ImportError:
import sha
sha1 = sha... | <commit_before>#!/usr/bin/env python
# -*- coding: utf-8 -*-
import uuid
import hmac
from django.db import models
from django.conf import settings
from django.contrib.auth import get_user_model
try:
from hashlib import sha1
except ImportError:
import sha
sha1 = sha.sha
User = get_user_model()
class Ap... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import uuid
import hmac
from django.db import models
from django.conf import settings
from django.utils.translation import ugettext_lazy as _
from django.contrib.auth import get_user_model
try:
from hashlib import sha1
except ImportError:
import sha
sha1 = sha... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import uuid
import hmac
from django.db import models
from django.conf import settings
from django.contrib.auth import get_user_model
try:
from hashlib import sha1
except ImportError:
import sha
sha1 = sha.sha
User = get_user_model()
class ApiKey(models.Mod... | <commit_before>#!/usr/bin/env python
# -*- coding: utf-8 -*-
import uuid
import hmac
from django.db import models
from django.conf import settings
from django.contrib.auth import get_user_model
try:
from hashlib import sha1
except ImportError:
import sha
sha1 = sha.sha
User = get_user_model()
class Ap... |
e5deebe61fdf5e1a186673a252743ebdabe4c0e5 | publishconf.py | publishconf.py | #!/usr/bin/env python
# -*- coding: utf-8 -*- #
from __future__ import unicode_literals
# This file is only used if you use `make publish` or
# explicitly specify it as your config file.
import os
import sys
sys.path.append(os.curdir)
from pelicanconf import *
SITEURL = 'https://pappasam.github.io'
RELATIVE_URLS = F... | #!/usr/bin/env python
# -*- coding: utf-8 -*- #
from __future__ import unicode_literals
import os
import sys
sys.path.append(os.curdir)
from pelicanconf import *
SITEURL = 'https://pappasam.github.io'
RELATIVE_URLS = False
FEED_ALL_ATOM = 'feeds/all.atom.xml'
CATEGORY_FEED_ATOM = 'feeds/%s.atom.xml'
DELETE_OUTPUT_D... | Add Disqus and Google Analytics to web site | Add Disqus and Google Analytics to web site
| Python | mit | pappasam/pappasam.github.io,pappasam/pappasam.github.io | #!/usr/bin/env python
# -*- coding: utf-8 -*- #
from __future__ import unicode_literals
# This file is only used if you use `make publish` or
# explicitly specify it as your config file.
import os
import sys
sys.path.append(os.curdir)
from pelicanconf import *
SITEURL = 'https://pappasam.github.io'
RELATIVE_URLS = F... | #!/usr/bin/env python
# -*- coding: utf-8 -*- #
from __future__ import unicode_literals
import os
import sys
sys.path.append(os.curdir)
from pelicanconf import *
SITEURL = 'https://pappasam.github.io'
RELATIVE_URLS = False
FEED_ALL_ATOM = 'feeds/all.atom.xml'
CATEGORY_FEED_ATOM = 'feeds/%s.atom.xml'
DELETE_OUTPUT_D... | <commit_before>#!/usr/bin/env python
# -*- coding: utf-8 -*- #
from __future__ import unicode_literals
# This file is only used if you use `make publish` or
# explicitly specify it as your config file.
import os
import sys
sys.path.append(os.curdir)
from pelicanconf import *
SITEURL = 'https://pappasam.github.io'
RE... | #!/usr/bin/env python
# -*- coding: utf-8 -*- #
from __future__ import unicode_literals
import os
import sys
sys.path.append(os.curdir)
from pelicanconf import *
SITEURL = 'https://pappasam.github.io'
RELATIVE_URLS = False
FEED_ALL_ATOM = 'feeds/all.atom.xml'
CATEGORY_FEED_ATOM = 'feeds/%s.atom.xml'
DELETE_OUTPUT_D... | #!/usr/bin/env python
# -*- coding: utf-8 -*- #
from __future__ import unicode_literals
# This file is only used if you use `make publish` or
# explicitly specify it as your config file.
import os
import sys
sys.path.append(os.curdir)
from pelicanconf import *
SITEURL = 'https://pappasam.github.io'
RELATIVE_URLS = F... | <commit_before>#!/usr/bin/env python
# -*- coding: utf-8 -*- #
from __future__ import unicode_literals
# This file is only used if you use `make publish` or
# explicitly specify it as your config file.
import os
import sys
sys.path.append(os.curdir)
from pelicanconf import *
SITEURL = 'https://pappasam.github.io'
RE... |
decb1699fe036c55d33c7d3b77a834cf8c3ee785 | RPLCD/__init__.py | RPLCD/__init__.py | from .common import Alignment, CursorMode, ShiftMode, BacklightMode
from .contextmanagers import cursor, cleared
| import warnings
from .common import Alignment, CursorMode, ShiftMode, BacklightMode
from .contextmanagers import cursor, cleared
from .gpio import CharLCD as GpioCharLCD
class CharLCD(GpioCharLCD):
def __init__(self, *args, **kwargs):
warnings.warn("Using RPLCD.CharLCD directly is deprecated. " +
... | Add backwards compatible CharLCD wrapper | Add backwards compatible CharLCD wrapper
| Python | mit | GoranLundberg/RPLCD,thijstriemstra/RPLCD,dbrgn/RPLCD,paulenuta/RPLCD | from .common import Alignment, CursorMode, ShiftMode, BacklightMode
from .contextmanagers import cursor, cleared
Add backwards compatible CharLCD wrapper | import warnings
from .common import Alignment, CursorMode, ShiftMode, BacklightMode
from .contextmanagers import cursor, cleared
from .gpio import CharLCD as GpioCharLCD
class CharLCD(GpioCharLCD):
def __init__(self, *args, **kwargs):
warnings.warn("Using RPLCD.CharLCD directly is deprecated. " +
... | <commit_before>from .common import Alignment, CursorMode, ShiftMode, BacklightMode
from .contextmanagers import cursor, cleared
<commit_msg>Add backwards compatible CharLCD wrapper<commit_after> | import warnings
from .common import Alignment, CursorMode, ShiftMode, BacklightMode
from .contextmanagers import cursor, cleared
from .gpio import CharLCD as GpioCharLCD
class CharLCD(GpioCharLCD):
def __init__(self, *args, **kwargs):
warnings.warn("Using RPLCD.CharLCD directly is deprecated. " +
... | from .common import Alignment, CursorMode, ShiftMode, BacklightMode
from .contextmanagers import cursor, cleared
Add backwards compatible CharLCD wrapperimport warnings
from .common import Alignment, CursorMode, ShiftMode, BacklightMode
from .contextmanagers import cursor, cleared
from .gpio import CharLCD as GpioChar... | <commit_before>from .common import Alignment, CursorMode, ShiftMode, BacklightMode
from .contextmanagers import cursor, cleared
<commit_msg>Add backwards compatible CharLCD wrapper<commit_after>import warnings
from .common import Alignment, CursorMode, ShiftMode, BacklightMode
from .contextmanagers import cursor, clea... |
d3675b777dc95f296f26bdd9b8b05311ceac6ba5 | cyder/core/system/migrations/0006_rename_table_from_system_key_value_to_system_kv.py | cyder/core/system/migrations/0006_rename_table_from_system_key_value_to_system_kv.py | # -*- coding: utf-8 -*-
from south.db import db
from south.v2 import SchemaMigration
class Migration(SchemaMigration):
def forwards(self, orm):
db.rename_table('system_key_value', 'system_kv')
def backwards(self, orm):
db.rename_table('system_kv', 'system_key_value')
| # -*- coding: utf-8 -*-
import datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
def forwards(self, orm):
db.rename_table('system_key_value', 'system_kv')
def backwards(self, orm):
db.rename_table('system_kv',... | Add ORM freeze thing to SystemKeyValue migration | Add ORM freeze thing to SystemKeyValue migration
| Python | bsd-3-clause | akeym/cyder,murrown/cyder,zeeman/cyder,akeym/cyder,OSU-Net/cyder,murrown/cyder,OSU-Net/cyder,OSU-Net/cyder,zeeman/cyder,akeym/cyder,murrown/cyder,zeeman/cyder,drkitty/cyder,zeeman/cyder,drkitty/cyder,akeym/cyder,drkitty/cyder,murrown/cyder,drkitty/cyder,OSU-Net/cyder | # -*- coding: utf-8 -*-
from south.db import db
from south.v2 import SchemaMigration
class Migration(SchemaMigration):
def forwards(self, orm):
db.rename_table('system_key_value', 'system_kv')
def backwards(self, orm):
db.rename_table('system_kv', 'system_key_value')
Add ORM freeze thing to ... | # -*- coding: utf-8 -*-
import datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
def forwards(self, orm):
db.rename_table('system_key_value', 'system_kv')
def backwards(self, orm):
db.rename_table('system_kv',... | <commit_before># -*- coding: utf-8 -*-
from south.db import db
from south.v2 import SchemaMigration
class Migration(SchemaMigration):
def forwards(self, orm):
db.rename_table('system_key_value', 'system_kv')
def backwards(self, orm):
db.rename_table('system_kv', 'system_key_value')
<commit_m... | # -*- coding: utf-8 -*-
import datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
def forwards(self, orm):
db.rename_table('system_key_value', 'system_kv')
def backwards(self, orm):
db.rename_table('system_kv',... | # -*- coding: utf-8 -*-
from south.db import db
from south.v2 import SchemaMigration
class Migration(SchemaMigration):
def forwards(self, orm):
db.rename_table('system_key_value', 'system_kv')
def backwards(self, orm):
db.rename_table('system_kv', 'system_key_value')
Add ORM freeze thing to ... | <commit_before># -*- coding: utf-8 -*-
from south.db import db
from south.v2 import SchemaMigration
class Migration(SchemaMigration):
def forwards(self, orm):
db.rename_table('system_key_value', 'system_kv')
def backwards(self, orm):
db.rename_table('system_kv', 'system_key_value')
<commit_m... |
5e2111a5ccc0bcbe7b9af4fec09b9b46eb03ebd3 | GenNowPlayingMovieID.py | GenNowPlayingMovieID.py | #!/usr/bin/python
#coding: utf-8
import requests
import re
if __name__=="__main__":
page = requests.get('https://movie.douban.com/nowplaying/beijing/')
content=page.text.encode("utf-8")
pattern=re.compile(r'(?<=id=")\d+(?="\n)')
result=pattern.findall(content)
for iterm in result:
print iterm
| #!/usr/bin/python
#coding: utf-8
import requests
import re
import time
from time import gmtime, strftime
class GenNowPlayingID(object):
"""docstring for ClassName"""
def __init__(self):
#super(ClassName, self).__init__()
# self.arg = arg
pass
def GenNowPlayingIdList(self):
page = requests.get('https://movi... | Write the nowplaying movie id to file | Write the nowplaying movie id to file
| Python | apache-2.0 | ModernKings/MKMovieCenter,ModernKings/MKMovieCenter,ModernKings/MKMovieCenter | #!/usr/bin/python
#coding: utf-8
import requests
import re
if __name__=="__main__":
page = requests.get('https://movie.douban.com/nowplaying/beijing/')
content=page.text.encode("utf-8")
pattern=re.compile(r'(?<=id=")\d+(?="\n)')
result=pattern.findall(content)
for iterm in result:
print iterm
Write the nowpl... | #!/usr/bin/python
#coding: utf-8
import requests
import re
import time
from time import gmtime, strftime
class GenNowPlayingID(object):
"""docstring for ClassName"""
def __init__(self):
#super(ClassName, self).__init__()
# self.arg = arg
pass
def GenNowPlayingIdList(self):
page = requests.get('https://movi... | <commit_before>#!/usr/bin/python
#coding: utf-8
import requests
import re
if __name__=="__main__":
page = requests.get('https://movie.douban.com/nowplaying/beijing/')
content=page.text.encode("utf-8")
pattern=re.compile(r'(?<=id=")\d+(?="\n)')
result=pattern.findall(content)
for iterm in result:
print iterm
... | #!/usr/bin/python
#coding: utf-8
import requests
import re
import time
from time import gmtime, strftime
class GenNowPlayingID(object):
"""docstring for ClassName"""
def __init__(self):
#super(ClassName, self).__init__()
# self.arg = arg
pass
def GenNowPlayingIdList(self):
page = requests.get('https://movi... | #!/usr/bin/python
#coding: utf-8
import requests
import re
if __name__=="__main__":
page = requests.get('https://movie.douban.com/nowplaying/beijing/')
content=page.text.encode("utf-8")
pattern=re.compile(r'(?<=id=")\d+(?="\n)')
result=pattern.findall(content)
for iterm in result:
print iterm
Write the nowpl... | <commit_before>#!/usr/bin/python
#coding: utf-8
import requests
import re
if __name__=="__main__":
page = requests.get('https://movie.douban.com/nowplaying/beijing/')
content=page.text.encode("utf-8")
pattern=re.compile(r'(?<=id=")\d+(?="\n)')
result=pattern.findall(content)
for iterm in result:
print iterm
... |
442f0df33b91fced038e2c497e6c03e0f82f55b2 | qtpy/QtTest.py | qtpy/QtTest.py | # -*- coding: utf-8 -*-
#
# Copyright © 2014-2015 Colin Duquesnoy
# Copyright © 2009- The Spyder Developmet Team
#
# Licensed under the terms of the MIT License
# (see LICENSE.txt for details)
"""
Provides QtTest and functions
.. warning:: PySide is not supported here, that's why there is not unit tests
running wi... | # -*- coding: utf-8 -*-
#
# Copyright © 2014-2015 Colin Duquesnoy
# Copyright © 2009- The Spyder Developmet Team
#
# Licensed under the terms of the MIT License
# (see LICENSE.txt for details)
"""
Provides QtTest and functions
"""
from qtpy import PYQT5, PYQT4, PYSIDE, PythonQtError
if PYQT5:
from PyQt5.QtTest ... | Add support for QTest with PySide | Add support for QTest with PySide | Python | mit | spyder-ide/qtpy,davvid/qtpy,goanpeca/qtpy,davvid/qtpy,goanpeca/qtpy | # -*- coding: utf-8 -*-
#
# Copyright © 2014-2015 Colin Duquesnoy
# Copyright © 2009- The Spyder Developmet Team
#
# Licensed under the terms of the MIT License
# (see LICENSE.txt for details)
"""
Provides QtTest and functions
.. warning:: PySide is not supported here, that's why there is not unit tests
running wi... | # -*- coding: utf-8 -*-
#
# Copyright © 2014-2015 Colin Duquesnoy
# Copyright © 2009- The Spyder Developmet Team
#
# Licensed under the terms of the MIT License
# (see LICENSE.txt for details)
"""
Provides QtTest and functions
"""
from qtpy import PYQT5, PYQT4, PYSIDE, PythonQtError
if PYQT5:
from PyQt5.QtTest ... | <commit_before># -*- coding: utf-8 -*-
#
# Copyright © 2014-2015 Colin Duquesnoy
# Copyright © 2009- The Spyder Developmet Team
#
# Licensed under the terms of the MIT License
# (see LICENSE.txt for details)
"""
Provides QtTest and functions
.. warning:: PySide is not supported here, that's why there is not unit tests... | # -*- coding: utf-8 -*-
#
# Copyright © 2014-2015 Colin Duquesnoy
# Copyright © 2009- The Spyder Developmet Team
#
# Licensed under the terms of the MIT License
# (see LICENSE.txt for details)
"""
Provides QtTest and functions
"""
from qtpy import PYQT5, PYQT4, PYSIDE, PythonQtError
if PYQT5:
from PyQt5.QtTest ... | # -*- coding: utf-8 -*-
#
# Copyright © 2014-2015 Colin Duquesnoy
# Copyright © 2009- The Spyder Developmet Team
#
# Licensed under the terms of the MIT License
# (see LICENSE.txt for details)
"""
Provides QtTest and functions
.. warning:: PySide is not supported here, that's why there is not unit tests
running wi... | <commit_before># -*- coding: utf-8 -*-
#
# Copyright © 2014-2015 Colin Duquesnoy
# Copyright © 2009- The Spyder Developmet Team
#
# Licensed under the terms of the MIT License
# (see LICENSE.txt for details)
"""
Provides QtTest and functions
.. warning:: PySide is not supported here, that's why there is not unit tests... |
3b4ec8893fe40f811716a893f11858f7bbf2ec80 | utils/get_message.py | utils/get_message.py | import amqp
from contextlib import closing
def __get_channel(connection):
return connection.channel()
def __declare_queue(channel, queue):
channel.queue_declare(queue=queue, durable=True, auto_delete=False)
def __get_message_from_queue(channel, queue):
return channel.basic_get(queue=queue)
def get_mess... | import amqp
from contextlib import closing
def __get_channel(connection):
return connection.channel()
def __get_message_from_queue(channel, queue):
return channel.basic_get(queue=queue)
def get_message(queue):
""" Get the first message from a queue.
The first message from a queue is retrieved. If t... | Revert "Revert "Remove queue declaration (EAFP)"" | Revert "Revert "Remove queue declaration (EAFP)""
This reverts commit 2dd5a5b422d8c1598672ea9470aee655eca3c49d.
| Python | mit | jdgillespie91/trackerSpend,jdgillespie91/trackerSpend | import amqp
from contextlib import closing
def __get_channel(connection):
return connection.channel()
def __declare_queue(channel, queue):
channel.queue_declare(queue=queue, durable=True, auto_delete=False)
def __get_message_from_queue(channel, queue):
return channel.basic_get(queue=queue)
def get_mess... | import amqp
from contextlib import closing
def __get_channel(connection):
return connection.channel()
def __get_message_from_queue(channel, queue):
return channel.basic_get(queue=queue)
def get_message(queue):
""" Get the first message from a queue.
The first message from a queue is retrieved. If t... | <commit_before>import amqp
from contextlib import closing
def __get_channel(connection):
return connection.channel()
def __declare_queue(channel, queue):
channel.queue_declare(queue=queue, durable=True, auto_delete=False)
def __get_message_from_queue(channel, queue):
return channel.basic_get(queue=queue... | import amqp
from contextlib import closing
def __get_channel(connection):
return connection.channel()
def __get_message_from_queue(channel, queue):
return channel.basic_get(queue=queue)
def get_message(queue):
""" Get the first message from a queue.
The first message from a queue is retrieved. If t... | import amqp
from contextlib import closing
def __get_channel(connection):
return connection.channel()
def __declare_queue(channel, queue):
channel.queue_declare(queue=queue, durable=True, auto_delete=False)
def __get_message_from_queue(channel, queue):
return channel.basic_get(queue=queue)
def get_mess... | <commit_before>import amqp
from contextlib import closing
def __get_channel(connection):
return connection.channel()
def __declare_queue(channel, queue):
channel.queue_declare(queue=queue, durable=True, auto_delete=False)
def __get_message_from_queue(channel, queue):
return channel.basic_get(queue=queue... |
3a0cf1f6114d6c80909f90fe122b026908200b0a | IPython/nbconvert/exporters/markdown.py | IPython/nbconvert/exporters/markdown.py | """Markdown Exporter class"""
#-----------------------------------------------------------------------------
# Copyright (c) 2013, the IPython Development Team.
#
# Distributed under the terms of the Modified BSD License.
#
# The full license is in the file COPYING.txt, distributed with this software.
#---------------... | """Markdown Exporter class"""
#-----------------------------------------------------------------------------
# Copyright (c) 2013, the IPython Development Team.
#
# Distributed under the terms of the Modified BSD License.
#
# The full license is in the file COPYING.txt, distributed with this software.
#---------------... | Revert "Removed Javascript from Markdown by adding display priority to def config." | Revert "Removed Javascript from Markdown by adding display priority to def config."
This reverts commit 58e05f9625c60f8deba9ddf1c74dba73e8ea7dd1.
| Python | bsd-3-clause | ipython/ipython,ipython/ipython | """Markdown Exporter class"""
#-----------------------------------------------------------------------------
# Copyright (c) 2013, the IPython Development Team.
#
# Distributed under the terms of the Modified BSD License.
#
# The full license is in the file COPYING.txt, distributed with this software.
#---------------... | """Markdown Exporter class"""
#-----------------------------------------------------------------------------
# Copyright (c) 2013, the IPython Development Team.
#
# Distributed under the terms of the Modified BSD License.
#
# The full license is in the file COPYING.txt, distributed with this software.
#---------------... | <commit_before>"""Markdown Exporter class"""
#-----------------------------------------------------------------------------
# Copyright (c) 2013, the IPython Development Team.
#
# Distributed under the terms of the Modified BSD License.
#
# The full license is in the file COPYING.txt, distributed with this software.
#... | """Markdown Exporter class"""
#-----------------------------------------------------------------------------
# Copyright (c) 2013, the IPython Development Team.
#
# Distributed under the terms of the Modified BSD License.
#
# The full license is in the file COPYING.txt, distributed with this software.
#---------------... | """Markdown Exporter class"""
#-----------------------------------------------------------------------------
# Copyright (c) 2013, the IPython Development Team.
#
# Distributed under the terms of the Modified BSD License.
#
# The full license is in the file COPYING.txt, distributed with this software.
#---------------... | <commit_before>"""Markdown Exporter class"""
#-----------------------------------------------------------------------------
# Copyright (c) 2013, the IPython Development Team.
#
# Distributed under the terms of the Modified BSD License.
#
# The full license is in the file COPYING.txt, distributed with this software.
#... |
b922273cb4786e72dbf018b33100814e2a462ebe | examples/list_stats.py | examples/list_stats.py | import sys
import os
import operator
sys.path.insert(1, os.path.abspath('..'))
from wsinfo import Info
cnt = 0
max_cnt = 100
servers = {}
with open("urls.txt", "r") as f:
for url in f.readlines():
url = url[:-1]
try:
w = Info(url)
if w.server != "":
if not w... | # -*- coding: utf-8 -*-
import sys
import os
import operator
sys.path.insert(1, os.path.abspath('..'))
from wsinfo import Info
cnt = 0
max_cnt = 100
servers = {}
with open("urls.txt", "r") as f:
for url in f.readlines():
url = url[:-1]
try:
w = Info(url)
if w.server != "":... | Add encoding line for Python 3 | Fix: Add encoding line for Python 3
| Python | mit | linusg/wsinfo | import sys
import os
import operator
sys.path.insert(1, os.path.abspath('..'))
from wsinfo import Info
cnt = 0
max_cnt = 100
servers = {}
with open("urls.txt", "r") as f:
for url in f.readlines():
url = url[:-1]
try:
w = Info(url)
if w.server != "":
if not w... | # -*- coding: utf-8 -*-
import sys
import os
import operator
sys.path.insert(1, os.path.abspath('..'))
from wsinfo import Info
cnt = 0
max_cnt = 100
servers = {}
with open("urls.txt", "r") as f:
for url in f.readlines():
url = url[:-1]
try:
w = Info(url)
if w.server != "":... | <commit_before>import sys
import os
import operator
sys.path.insert(1, os.path.abspath('..'))
from wsinfo import Info
cnt = 0
max_cnt = 100
servers = {}
with open("urls.txt", "r") as f:
for url in f.readlines():
url = url[:-1]
try:
w = Info(url)
if w.server != "":
... | # -*- coding: utf-8 -*-
import sys
import os
import operator
sys.path.insert(1, os.path.abspath('..'))
from wsinfo import Info
cnt = 0
max_cnt = 100
servers = {}
with open("urls.txt", "r") as f:
for url in f.readlines():
url = url[:-1]
try:
w = Info(url)
if w.server != "":... | import sys
import os
import operator
sys.path.insert(1, os.path.abspath('..'))
from wsinfo import Info
cnt = 0
max_cnt = 100
servers = {}
with open("urls.txt", "r") as f:
for url in f.readlines():
url = url[:-1]
try:
w = Info(url)
if w.server != "":
if not w... | <commit_before>import sys
import os
import operator
sys.path.insert(1, os.path.abspath('..'))
from wsinfo import Info
cnt = 0
max_cnt = 100
servers = {}
with open("urls.txt", "r") as f:
for url in f.readlines():
url = url[:-1]
try:
w = Info(url)
if w.server != "":
... |
23c53752412e0aa8b2d253efbc7f983560748f3d | examples/test-index.py | examples/test-index.py | import unittest
import saliweb.test
# Import the modfoo frontend with mocks
modfoo = saliweb.test.import_mocked_frontend("modfoo", __file__,
'../../frontend')
class Tests(saliweb.test.TestCase):
def test_index(self):
"""Test index page"""
c = modfoo.a... | import unittest
import saliweb.test
# Import the modfoo frontend with mocks
modfoo = saliweb.test.import_mocked_frontend("modfoo", __file__,
'../../frontend')
class Tests(saliweb.test.TestCase):
def test_index(self):
"""Test index page"""
c = modfoo.a... | Use bytes to check Flask response | Use bytes to check Flask response
The Flask response is a byte (not Unicode)
string, so we should explicitly compare it
to a bytes constant so the test works in
both Python 2 and Python 3.
| Python | lgpl-2.1 | salilab/saliweb,salilab/saliweb,salilab/saliweb,salilab/saliweb,salilab/saliweb | import unittest
import saliweb.test
# Import the modfoo frontend with mocks
modfoo = saliweb.test.import_mocked_frontend("modfoo", __file__,
'../../frontend')
class Tests(saliweb.test.TestCase):
def test_index(self):
"""Test index page"""
c = modfoo.a... | import unittest
import saliweb.test
# Import the modfoo frontend with mocks
modfoo = saliweb.test.import_mocked_frontend("modfoo", __file__,
'../../frontend')
class Tests(saliweb.test.TestCase):
def test_index(self):
"""Test index page"""
c = modfoo.a... | <commit_before>import unittest
import saliweb.test
# Import the modfoo frontend with mocks
modfoo = saliweb.test.import_mocked_frontend("modfoo", __file__,
'../../frontend')
class Tests(saliweb.test.TestCase):
def test_index(self):
"""Test index page"""
... | import unittest
import saliweb.test
# Import the modfoo frontend with mocks
modfoo = saliweb.test.import_mocked_frontend("modfoo", __file__,
'../../frontend')
class Tests(saliweb.test.TestCase):
def test_index(self):
"""Test index page"""
c = modfoo.a... | import unittest
import saliweb.test
# Import the modfoo frontend with mocks
modfoo = saliweb.test.import_mocked_frontend("modfoo", __file__,
'../../frontend')
class Tests(saliweb.test.TestCase):
def test_index(self):
"""Test index page"""
c = modfoo.a... | <commit_before>import unittest
import saliweb.test
# Import the modfoo frontend with mocks
modfoo = saliweb.test.import_mocked_frontend("modfoo", __file__,
'../../frontend')
class Tests(saliweb.test.TestCase):
def test_index(self):
"""Test index page"""
... |
a8cefc5330909150b9ad2ee04d08b8fff8a51108 | disposable_email_checker/forms.py | disposable_email_checker/forms.py | # -*- coding: utf-8 -*-
from django import forms
from django.core import validators
from .validators import validate_disposable_email
class DisposableEmailField(forms.CharField):
default_validators = [validators.validate_email, validate_disposable_email]
| # -*- coding: utf-8 -*-
from django import forms
from django.core import validators
from .validators import validate_disposable_email
class DisposableEmailField(forms.EmailField):
default_validators = [validators.validate_email, validate_disposable_email]
| Update form field to EmailField not CharField | Update form field to EmailField not CharField
| Python | bsd-3-clause | aaronbassett/DisposableEmailChecker | # -*- coding: utf-8 -*-
from django import forms
from django.core import validators
from .validators import validate_disposable_email
class DisposableEmailField(forms.CharField):
default_validators = [validators.validate_email, validate_disposable_email]
Update form field to EmailField not CharField | # -*- coding: utf-8 -*-
from django import forms
from django.core import validators
from .validators import validate_disposable_email
class DisposableEmailField(forms.EmailField):
default_validators = [validators.validate_email, validate_disposable_email]
| <commit_before># -*- coding: utf-8 -*-
from django import forms
from django.core import validators
from .validators import validate_disposable_email
class DisposableEmailField(forms.CharField):
default_validators = [validators.validate_email, validate_disposable_email]
<commit_msg>Update form field to EmailField... | # -*- coding: utf-8 -*-
from django import forms
from django.core import validators
from .validators import validate_disposable_email
class DisposableEmailField(forms.EmailField):
default_validators = [validators.validate_email, validate_disposable_email]
| # -*- coding: utf-8 -*-
from django import forms
from django.core import validators
from .validators import validate_disposable_email
class DisposableEmailField(forms.CharField):
default_validators = [validators.validate_email, validate_disposable_email]
Update form field to EmailField not CharField# -*- coding:... | <commit_before># -*- coding: utf-8 -*-
from django import forms
from django.core import validators
from .validators import validate_disposable_email
class DisposableEmailField(forms.CharField):
default_validators = [validators.validate_email, validate_disposable_email]
<commit_msg>Update form field to EmailField... |
9657f6f428134a47bfbb41f889305dff355551d8 | fablab-businessplan.py | fablab-businessplan.py | # -*- encoding: utf-8 -*-
#
# Author: Massimo Menichinelli
# Homepage: http://www.openp2pdesign.org
# License: MIT
#
import xlsxwriter
workbook = xlsxwriter.Workbook('FabLab-BusinessPlan.xlsx')
worksheet = workbook.add_worksheet()
worksheet.write('A1', 'Hello world')
workbook.close() | # -*- encoding: utf-8 -*-
#
# Author: Massimo Menichinelli
# Homepage: http://www.openp2pdesign.org
# License: MIT
#
import xlsxwriter
# Create the file
workbook = xlsxwriter.Workbook('FabLab-BusinessPlan.xlsx')
# Create the worksheets
expenses = workbook.add_worksheet('Expenses')
activities = workbook.add_worksheet... | Add first structure of the script | Add first structure of the script
| Python | mit | openp2pdesign/FabLab-BusinessPlan | # -*- encoding: utf-8 -*-
#
# Author: Massimo Menichinelli
# Homepage: http://www.openp2pdesign.org
# License: MIT
#
import xlsxwriter
workbook = xlsxwriter.Workbook('FabLab-BusinessPlan.xlsx')
worksheet = workbook.add_worksheet()
worksheet.write('A1', 'Hello world')
workbook.close()Add first structure of the scrip... | # -*- encoding: utf-8 -*-
#
# Author: Massimo Menichinelli
# Homepage: http://www.openp2pdesign.org
# License: MIT
#
import xlsxwriter
# Create the file
workbook = xlsxwriter.Workbook('FabLab-BusinessPlan.xlsx')
# Create the worksheets
expenses = workbook.add_worksheet('Expenses')
activities = workbook.add_worksheet... | <commit_before># -*- encoding: utf-8 -*-
#
# Author: Massimo Menichinelli
# Homepage: http://www.openp2pdesign.org
# License: MIT
#
import xlsxwriter
workbook = xlsxwriter.Workbook('FabLab-BusinessPlan.xlsx')
worksheet = workbook.add_worksheet()
worksheet.write('A1', 'Hello world')
workbook.close()<commit_msg>Add f... | # -*- encoding: utf-8 -*-
#
# Author: Massimo Menichinelli
# Homepage: http://www.openp2pdesign.org
# License: MIT
#
import xlsxwriter
# Create the file
workbook = xlsxwriter.Workbook('FabLab-BusinessPlan.xlsx')
# Create the worksheets
expenses = workbook.add_worksheet('Expenses')
activities = workbook.add_worksheet... | # -*- encoding: utf-8 -*-
#
# Author: Massimo Menichinelli
# Homepage: http://www.openp2pdesign.org
# License: MIT
#
import xlsxwriter
workbook = xlsxwriter.Workbook('FabLab-BusinessPlan.xlsx')
worksheet = workbook.add_worksheet()
worksheet.write('A1', 'Hello world')
workbook.close()Add first structure of the scrip... | <commit_before># -*- encoding: utf-8 -*-
#
# Author: Massimo Menichinelli
# Homepage: http://www.openp2pdesign.org
# License: MIT
#
import xlsxwriter
workbook = xlsxwriter.Workbook('FabLab-BusinessPlan.xlsx')
worksheet = workbook.add_worksheet()
worksheet.write('A1', 'Hello world')
workbook.close()<commit_msg>Add f... |
8c34cc43d23e0d97c531e1aa5d2339693db554e0 | projects/projectdl.py | projects/projectdl.py | #!/usr/bin/python3
from bs4 import BeautifulSoup
import requests
r = requests.get("https://projects.archlinux.org/")
soup = BeautifulSoup(r.text)
repos = soup.select(".sublevel-repo a")
repo_names = []
for repo in repos:
repo_name = repo.string
if repo_name[-4:] == ".git":
repo_name = repo_name[:-4]
... | #!/usr/bin/python3
from bs4 import BeautifulSoup
import requests
import simplediff
from pprint import pprint
r = requests.get("https://projects.archlinux.org/")
soup = BeautifulSoup(r.text)
repos = soup.select(".sublevel-repo a")
with open("projects.txt", mode = "r", encoding = "utf-8") as projects_file:
cur_rep... | Update project downloader to do diffs before overwriting | Update project downloader to do diffs before overwriting
| Python | unlicense | djmattyg007/archlinux,djmattyg007/archlinux | #!/usr/bin/python3
from bs4 import BeautifulSoup
import requests
r = requests.get("https://projects.archlinux.org/")
soup = BeautifulSoup(r.text)
repos = soup.select(".sublevel-repo a")
repo_names = []
for repo in repos:
repo_name = repo.string
if repo_name[-4:] == ".git":
repo_name = repo_name[:-4]
... | #!/usr/bin/python3
from bs4 import BeautifulSoup
import requests
import simplediff
from pprint import pprint
r = requests.get("https://projects.archlinux.org/")
soup = BeautifulSoup(r.text)
repos = soup.select(".sublevel-repo a")
with open("projects.txt", mode = "r", encoding = "utf-8") as projects_file:
cur_rep... | <commit_before>#!/usr/bin/python3
from bs4 import BeautifulSoup
import requests
r = requests.get("https://projects.archlinux.org/")
soup = BeautifulSoup(r.text)
repos = soup.select(".sublevel-repo a")
repo_names = []
for repo in repos:
repo_name = repo.string
if repo_name[-4:] == ".git":
repo_name = ... | #!/usr/bin/python3
from bs4 import BeautifulSoup
import requests
import simplediff
from pprint import pprint
r = requests.get("https://projects.archlinux.org/")
soup = BeautifulSoup(r.text)
repos = soup.select(".sublevel-repo a")
with open("projects.txt", mode = "r", encoding = "utf-8") as projects_file:
cur_rep... | #!/usr/bin/python3
from bs4 import BeautifulSoup
import requests
r = requests.get("https://projects.archlinux.org/")
soup = BeautifulSoup(r.text)
repos = soup.select(".sublevel-repo a")
repo_names = []
for repo in repos:
repo_name = repo.string
if repo_name[-4:] == ".git":
repo_name = repo_name[:-4]
... | <commit_before>#!/usr/bin/python3
from bs4 import BeautifulSoup
import requests
r = requests.get("https://projects.archlinux.org/")
soup = BeautifulSoup(r.text)
repos = soup.select(".sublevel-repo a")
repo_names = []
for repo in repos:
repo_name = repo.string
if repo_name[-4:] == ".git":
repo_name = ... |
14e98bc2038f50f38244550a1fa7ec3f836ed5f3 | http/online_checker.py | http/online_checker.py | import http.client
def __is_online(domain, sub_path, response_status, response_reason):
conn = http.client.HTTPSConnection(domain, timeout=1)
conn.request("HEAD", sub_path)
response = conn.getresponse()
conn.close()
return (response.status == response_status) and (response.reason == response_reas... | """
This module handles every related to online checking.
We need to request several information from various providers.
We could just try to request them, but instead
you can ping them first and check if they are even reachable.
This does not mean, that do not need to handle a failure on their part
(e.g. if the serve... | Add docstring to online checker | Add docstring to online checker
| Python | mit | thatsIch/sublime-rainmeter | import http.client
def __is_online(domain, sub_path, response_status, response_reason):
conn = http.client.HTTPSConnection(domain, timeout=1)
conn.request("HEAD", sub_path)
response = conn.getresponse()
conn.close()
return (response.status == response_status) and (response.reason == response_reas... | """
This module handles every related to online checking.
We need to request several information from various providers.
We could just try to request them, but instead
you can ping them first and check if they are even reachable.
This does not mean, that do not need to handle a failure on their part
(e.g. if the serve... | <commit_before>import http.client
def __is_online(domain, sub_path, response_status, response_reason):
conn = http.client.HTTPSConnection(domain, timeout=1)
conn.request("HEAD", sub_path)
response = conn.getresponse()
conn.close()
return (response.status == response_status) and (response.reason =... | """
This module handles every related to online checking.
We need to request several information from various providers.
We could just try to request them, but instead
you can ping them first and check if they are even reachable.
This does not mean, that do not need to handle a failure on their part
(e.g. if the serve... | import http.client
def __is_online(domain, sub_path, response_status, response_reason):
conn = http.client.HTTPSConnection(domain, timeout=1)
conn.request("HEAD", sub_path)
response = conn.getresponse()
conn.close()
return (response.status == response_status) and (response.reason == response_reas... | <commit_before>import http.client
def __is_online(domain, sub_path, response_status, response_reason):
conn = http.client.HTTPSConnection(domain, timeout=1)
conn.request("HEAD", sub_path)
response = conn.getresponse()
conn.close()
return (response.status == response_status) and (response.reason =... |
72e3e1177dc23b4f3d358294d68b58c01d7c5931 | stevedore/__init__.py | stevedore/__init__.py | # flake8: noqa
__all__ = [
'ExtensionManager',
'EnabledExtensionManager',
'NamedExtensionManager',
'HookManager',
'DriverManager',
]
from .extension import ExtensionManager
from .enabled import EnabledExtensionManager
from .named import NamedExtensionManager
from .hook import HookManager
from .dri... | # flake8: noqa
__all__ = [
'ExtensionManager',
'EnabledExtensionManager',
'NamedExtensionManager',
'HookManager',
'DriverManager',
]
from .extension import ExtensionManager
from .enabled import EnabledExtensionManager
from .named import NamedExtensionManager
from .hook import HookManager
from .dri... | Remove work around for NullHandler | Remove work around for NullHandler
logging module added NullHandler in Python 2.7, we have
dropped Python 2.6 support now, so don't need the work around
any more.
Change-Id: Ib6fdbc2f92cd66f4846243221e696f1b1fa712df
| Python | apache-2.0 | openstack/stevedore | # flake8: noqa
__all__ = [
'ExtensionManager',
'EnabledExtensionManager',
'NamedExtensionManager',
'HookManager',
'DriverManager',
]
from .extension import ExtensionManager
from .enabled import EnabledExtensionManager
from .named import NamedExtensionManager
from .hook import HookManager
from .dri... | # flake8: noqa
__all__ = [
'ExtensionManager',
'EnabledExtensionManager',
'NamedExtensionManager',
'HookManager',
'DriverManager',
]
from .extension import ExtensionManager
from .enabled import EnabledExtensionManager
from .named import NamedExtensionManager
from .hook import HookManager
from .dri... | <commit_before># flake8: noqa
__all__ = [
'ExtensionManager',
'EnabledExtensionManager',
'NamedExtensionManager',
'HookManager',
'DriverManager',
]
from .extension import ExtensionManager
from .enabled import EnabledExtensionManager
from .named import NamedExtensionManager
from .hook import HookMa... | # flake8: noqa
__all__ = [
'ExtensionManager',
'EnabledExtensionManager',
'NamedExtensionManager',
'HookManager',
'DriverManager',
]
from .extension import ExtensionManager
from .enabled import EnabledExtensionManager
from .named import NamedExtensionManager
from .hook import HookManager
from .dri... | # flake8: noqa
__all__ = [
'ExtensionManager',
'EnabledExtensionManager',
'NamedExtensionManager',
'HookManager',
'DriverManager',
]
from .extension import ExtensionManager
from .enabled import EnabledExtensionManager
from .named import NamedExtensionManager
from .hook import HookManager
from .dri... | <commit_before># flake8: noqa
__all__ = [
'ExtensionManager',
'EnabledExtensionManager',
'NamedExtensionManager',
'HookManager',
'DriverManager',
]
from .extension import ExtensionManager
from .enabled import EnabledExtensionManager
from .named import NamedExtensionManager
from .hook import HookMa... |
bda756847e31e97eb8363f48bed67035a3f46d67 | settings/travis.py | settings/travis.py | from defaults import *
DATABASES = {
'default': {
#'ENGINE': 'django.db.backends.postgresql_psycopg2',
'ENGINE': 'django.contrib.gis.db.backends.postgis',
# 'ENGINE': 'django.db.backends.sqlite3',
'NAME': 'atlas_test',
'USER': 'postgres',
'PASSWORD': '',
'HOST... | from defaults import *
DATABASES = {
'default': {
#'ENGINE': 'django.db.backends.postgresql_psycopg2',
'ENGINE': 'django.contrib.gis.db.backends.postgis',
# 'ENGINE': 'django.db.backends.sqlite3',
'NAME': 'atlas_test',
'USER': 'postgres',
'PASSWORD': '',
'HOST... | Use Solr for testing with Travis CI | Use Solr for testing with Travis CI
| Python | mit | denverfoundation/storybase,denverfoundation/storybase,denverfoundation/storybase,denverfoundation/storybase | from defaults import *
DATABASES = {
'default': {
#'ENGINE': 'django.db.backends.postgresql_psycopg2',
'ENGINE': 'django.contrib.gis.db.backends.postgis',
# 'ENGINE': 'django.db.backends.sqlite3',
'NAME': 'atlas_test',
'USER': 'postgres',
'PASSWORD': '',
'HOST... | from defaults import *
DATABASES = {
'default': {
#'ENGINE': 'django.db.backends.postgresql_psycopg2',
'ENGINE': 'django.contrib.gis.db.backends.postgis',
# 'ENGINE': 'django.db.backends.sqlite3',
'NAME': 'atlas_test',
'USER': 'postgres',
'PASSWORD': '',
'HOST... | <commit_before>from defaults import *
DATABASES = {
'default': {
#'ENGINE': 'django.db.backends.postgresql_psycopg2',
'ENGINE': 'django.contrib.gis.db.backends.postgis',
# 'ENGINE': 'django.db.backends.sqlite3',
'NAME': 'atlas_test',
'USER': 'postgres',
'PASSWORD': ''... | from defaults import *
DATABASES = {
'default': {
#'ENGINE': 'django.db.backends.postgresql_psycopg2',
'ENGINE': 'django.contrib.gis.db.backends.postgis',
# 'ENGINE': 'django.db.backends.sqlite3',
'NAME': 'atlas_test',
'USER': 'postgres',
'PASSWORD': '',
'HOST... | from defaults import *
DATABASES = {
'default': {
#'ENGINE': 'django.db.backends.postgresql_psycopg2',
'ENGINE': 'django.contrib.gis.db.backends.postgis',
# 'ENGINE': 'django.db.backends.sqlite3',
'NAME': 'atlas_test',
'USER': 'postgres',
'PASSWORD': '',
'HOST... | <commit_before>from defaults import *
DATABASES = {
'default': {
#'ENGINE': 'django.db.backends.postgresql_psycopg2',
'ENGINE': 'django.contrib.gis.db.backends.postgis',
# 'ENGINE': 'django.db.backends.sqlite3',
'NAME': 'atlas_test',
'USER': 'postgres',
'PASSWORD': ''... |
ca4d1454bd68715098001f9815af5325d157e786 | geodj/youtube.py | geodj/youtube.py | from gdata.youtube.service import YouTubeService, YouTubeVideoQuery
from django.utils.encoding import smart_str
import re
class YoutubeMusic:
def __init__(self):
self.service = YouTubeService()
def search(self, artist):
query = YouTubeVideoQuery()
query.vq = artist
query.orderb... | from gdata.youtube.service import YouTubeService, YouTubeVideoQuery
from django.utils.encoding import smart_str
import re
class YoutubeMusic:
def __init__(self):
self.service = YouTubeService()
def search(self, artist):
query = YouTubeVideoQuery()
query.vq = artist
query.orderb... | Fix view count cutoff for YT | Fix view count cutoff for YT
| Python | mit | 6/GeoDJ,6/GeoDJ | from gdata.youtube.service import YouTubeService, YouTubeVideoQuery
from django.utils.encoding import smart_str
import re
class YoutubeMusic:
def __init__(self):
self.service = YouTubeService()
def search(self, artist):
query = YouTubeVideoQuery()
query.vq = artist
query.orderb... | from gdata.youtube.service import YouTubeService, YouTubeVideoQuery
from django.utils.encoding import smart_str
import re
class YoutubeMusic:
def __init__(self):
self.service = YouTubeService()
def search(self, artist):
query = YouTubeVideoQuery()
query.vq = artist
query.orderb... | <commit_before>from gdata.youtube.service import YouTubeService, YouTubeVideoQuery
from django.utils.encoding import smart_str
import re
class YoutubeMusic:
def __init__(self):
self.service = YouTubeService()
def search(self, artist):
query = YouTubeVideoQuery()
query.vq = artist
... | from gdata.youtube.service import YouTubeService, YouTubeVideoQuery
from django.utils.encoding import smart_str
import re
class YoutubeMusic:
def __init__(self):
self.service = YouTubeService()
def search(self, artist):
query = YouTubeVideoQuery()
query.vq = artist
query.orderb... | from gdata.youtube.service import YouTubeService, YouTubeVideoQuery
from django.utils.encoding import smart_str
import re
class YoutubeMusic:
def __init__(self):
self.service = YouTubeService()
def search(self, artist):
query = YouTubeVideoQuery()
query.vq = artist
query.orderb... | <commit_before>from gdata.youtube.service import YouTubeService, YouTubeVideoQuery
from django.utils.encoding import smart_str
import re
class YoutubeMusic:
def __init__(self):
self.service = YouTubeService()
def search(self, artist):
query = YouTubeVideoQuery()
query.vq = artist
... |
080e4336675ea29b28b63698e5a0e77e91d54a2b | exercises/acronym/acronym_test.py | exercises/acronym/acronym_test.py | import unittest
from acronym import abbreviate
# test cases adapted from `x-common//canonical-data.json` @ version: 1.0.0
class AcronymTest(unittest.TestCase):
def test_basic(self):
self.assertEqual(abbreviate('Portable Network Graphics'), 'PNG')
def test_lowercase_words(self):
self.assertE... | import unittest
from acronym import abbreviate
# test cases adapted from `x-common//canonical-data.json` @ version: 1.1.0
class AcronymTest(unittest.TestCase):
def test_basic(self):
self.assertEqual(abbreviate('Portable Network Graphics'), 'PNG')
def test_lowercase_words(self):
self.assertE... | Remove test with mixed-case word | acronym: Remove test with mixed-case word
see: https://github.com/exercism/x-common/pull/788
| Python | mit | jmluy/xpython,smalley/python,exercism/xpython,exercism/python,smalley/python,jmluy/xpython,pheanex/xpython,pheanex/xpython,exercism/xpython,behrtam/xpython,exercism/python,N-Parsons/exercism-python,N-Parsons/exercism-python,mweb/python,mweb/python,behrtam/xpython | import unittest
from acronym import abbreviate
# test cases adapted from `x-common//canonical-data.json` @ version: 1.0.0
class AcronymTest(unittest.TestCase):
def test_basic(self):
self.assertEqual(abbreviate('Portable Network Graphics'), 'PNG')
def test_lowercase_words(self):
self.assertE... | import unittest
from acronym import abbreviate
# test cases adapted from `x-common//canonical-data.json` @ version: 1.1.0
class AcronymTest(unittest.TestCase):
def test_basic(self):
self.assertEqual(abbreviate('Portable Network Graphics'), 'PNG')
def test_lowercase_words(self):
self.assertE... | <commit_before>import unittest
from acronym import abbreviate
# test cases adapted from `x-common//canonical-data.json` @ version: 1.0.0
class AcronymTest(unittest.TestCase):
def test_basic(self):
self.assertEqual(abbreviate('Portable Network Graphics'), 'PNG')
def test_lowercase_words(self):
... | import unittest
from acronym import abbreviate
# test cases adapted from `x-common//canonical-data.json` @ version: 1.1.0
class AcronymTest(unittest.TestCase):
def test_basic(self):
self.assertEqual(abbreviate('Portable Network Graphics'), 'PNG')
def test_lowercase_words(self):
self.assertE... | import unittest
from acronym import abbreviate
# test cases adapted from `x-common//canonical-data.json` @ version: 1.0.0
class AcronymTest(unittest.TestCase):
def test_basic(self):
self.assertEqual(abbreviate('Portable Network Graphics'), 'PNG')
def test_lowercase_words(self):
self.assertE... | <commit_before>import unittest
from acronym import abbreviate
# test cases adapted from `x-common//canonical-data.json` @ version: 1.0.0
class AcronymTest(unittest.TestCase):
def test_basic(self):
self.assertEqual(abbreviate('Portable Network Graphics'), 'PNG')
def test_lowercase_words(self):
... |
21783b68abeb8085b96f6b49fceaac079d23a341 | heufybot/modules/commands/join.py | heufybot/modules/commands/join.py | from twisted.plugin import IPlugin
from heufybot.moduleinterface import IBotModule
from heufybot.modules.commandinterface import BotCommand
from zope.interface import implements
class JoinCommand(BotCommand):
implements(IPlugin, IBotModule)
name = "Join"
def triggers(self):
return ["join"]
... | from twisted.plugin import IPlugin
from heufybot.moduleinterface import IBotModule
from heufybot.modules.commandinterface import BotCommand
from zope.interface import implements
class JoinCommand(BotCommand):
implements(IPlugin, IBotModule)
name = "Join"
def triggers(self):
return ["join"]
... | Check the parameters for the Join command correctly | Check the parameters for the Join command correctly | Python | mit | Heufneutje/PyHeufyBot,Heufneutje/PyHeufyBot | from twisted.plugin import IPlugin
from heufybot.moduleinterface import IBotModule
from heufybot.modules.commandinterface import BotCommand
from zope.interface import implements
class JoinCommand(BotCommand):
implements(IPlugin, IBotModule)
name = "Join"
def triggers(self):
return ["join"]
... | from twisted.plugin import IPlugin
from heufybot.moduleinterface import IBotModule
from heufybot.modules.commandinterface import BotCommand
from zope.interface import implements
class JoinCommand(BotCommand):
implements(IPlugin, IBotModule)
name = "Join"
def triggers(self):
return ["join"]
... | <commit_before>from twisted.plugin import IPlugin
from heufybot.moduleinterface import IBotModule
from heufybot.modules.commandinterface import BotCommand
from zope.interface import implements
class JoinCommand(BotCommand):
implements(IPlugin, IBotModule)
name = "Join"
def triggers(self):
return... | from twisted.plugin import IPlugin
from heufybot.moduleinterface import IBotModule
from heufybot.modules.commandinterface import BotCommand
from zope.interface import implements
class JoinCommand(BotCommand):
implements(IPlugin, IBotModule)
name = "Join"
def triggers(self):
return ["join"]
... | from twisted.plugin import IPlugin
from heufybot.moduleinterface import IBotModule
from heufybot.modules.commandinterface import BotCommand
from zope.interface import implements
class JoinCommand(BotCommand):
implements(IPlugin, IBotModule)
name = "Join"
def triggers(self):
return ["join"]
... | <commit_before>from twisted.plugin import IPlugin
from heufybot.moduleinterface import IBotModule
from heufybot.modules.commandinterface import BotCommand
from zope.interface import implements
class JoinCommand(BotCommand):
implements(IPlugin, IBotModule)
name = "Join"
def triggers(self):
return... |
932748b11bce94076f2e2d5637d4e8db8d4d1dbf | tcelery/__init__.py | tcelery/__init__.py | from __future__ import absolute_import
import celery
from tornado import ioloop
from .connection import ConnectionPool
from .producer import NonBlockingTaskProducer
from .result import AsyncResult
VERSION = (0, 3, 3)
__version__ = '.'.join(map(str, VERSION))
def setup_nonblocking_producer(celery_app=None, io_loop... | from __future__ import absolute_import
import celery
from tornado import ioloop
from .connection import ConnectionPool
from .producer import NonBlockingTaskProducer
from .result import AsyncResult
VERSION = (0, 3, 4)
__version__ = '.'.join(map(str, VERSION)) + '-dev'
def setup_nonblocking_producer(celery_app=None... | Mark master as development version | Mark master as development version
| Python | bsd-3-clause | qudos-com/tornado-celery,sangwonl/tornado-celery,mher/tornado-celery,shnjp/tornado-celery | from __future__ import absolute_import
import celery
from tornado import ioloop
from .connection import ConnectionPool
from .producer import NonBlockingTaskProducer
from .result import AsyncResult
VERSION = (0, 3, 3)
__version__ = '.'.join(map(str, VERSION))
def setup_nonblocking_producer(celery_app=None, io_loop... | from __future__ import absolute_import
import celery
from tornado import ioloop
from .connection import ConnectionPool
from .producer import NonBlockingTaskProducer
from .result import AsyncResult
VERSION = (0, 3, 4)
__version__ = '.'.join(map(str, VERSION)) + '-dev'
def setup_nonblocking_producer(celery_app=None... | <commit_before>from __future__ import absolute_import
import celery
from tornado import ioloop
from .connection import ConnectionPool
from .producer import NonBlockingTaskProducer
from .result import AsyncResult
VERSION = (0, 3, 3)
__version__ = '.'.join(map(str, VERSION))
def setup_nonblocking_producer(celery_ap... | from __future__ import absolute_import
import celery
from tornado import ioloop
from .connection import ConnectionPool
from .producer import NonBlockingTaskProducer
from .result import AsyncResult
VERSION = (0, 3, 4)
__version__ = '.'.join(map(str, VERSION)) + '-dev'
def setup_nonblocking_producer(celery_app=None... | from __future__ import absolute_import
import celery
from tornado import ioloop
from .connection import ConnectionPool
from .producer import NonBlockingTaskProducer
from .result import AsyncResult
VERSION = (0, 3, 3)
__version__ = '.'.join(map(str, VERSION))
def setup_nonblocking_producer(celery_app=None, io_loop... | <commit_before>from __future__ import absolute_import
import celery
from tornado import ioloop
from .connection import ConnectionPool
from .producer import NonBlockingTaskProducer
from .result import AsyncResult
VERSION = (0, 3, 3)
__version__ = '.'.join(map(str, VERSION))
def setup_nonblocking_producer(celery_ap... |
786f40b8bd93fa975819de5ae633361e09e1ff72 | emission_events/emission_events/settings/production.py | emission_events/emission_events/settings/production.py | #######################
# PRODUCTION SETTINGS #
#######################
from os import environ
from django.core.exceptions import ImproperlyConfigured
from .base import *
DEBUG = False
def get_env_setting(setting):
""" Get the environment setting or return exception """
try:
return environ[setting... | #######################
# PRODUCTION SETTINGS #
#######################
from os import environ
from django.core.exceptions import ImproperlyConfigured
from .base import *
DEBUG = False
def get_env_setting(setting):
""" Get the environment setting or return exception """
try:
return environ[setting... | Fix the things that are broken | Fix the things that are broken
| Python | mit | texastribune/emissions-database,texastribune/emissions-database,texastribune/emissions-database,texastribune/emissions-database | #######################
# PRODUCTION SETTINGS #
#######################
from os import environ
from django.core.exceptions import ImproperlyConfigured
from .base import *
DEBUG = False
def get_env_setting(setting):
""" Get the environment setting or return exception """
try:
return environ[setting... | #######################
# PRODUCTION SETTINGS #
#######################
from os import environ
from django.core.exceptions import ImproperlyConfigured
from .base import *
DEBUG = False
def get_env_setting(setting):
""" Get the environment setting or return exception """
try:
return environ[setting... | <commit_before>#######################
# PRODUCTION SETTINGS #
#######################
from os import environ
from django.core.exceptions import ImproperlyConfigured
from .base import *
DEBUG = False
def get_env_setting(setting):
""" Get the environment setting or return exception """
try:
return ... | #######################
# PRODUCTION SETTINGS #
#######################
from os import environ
from django.core.exceptions import ImproperlyConfigured
from .base import *
DEBUG = False
def get_env_setting(setting):
""" Get the environment setting or return exception """
try:
return environ[setting... | #######################
# PRODUCTION SETTINGS #
#######################
from os import environ
from django.core.exceptions import ImproperlyConfigured
from .base import *
DEBUG = False
def get_env_setting(setting):
""" Get the environment setting or return exception """
try:
return environ[setting... | <commit_before>#######################
# PRODUCTION SETTINGS #
#######################
from os import environ
from django.core.exceptions import ImproperlyConfigured
from .base import *
DEBUG = False
def get_env_setting(setting):
""" Get the environment setting or return exception """
try:
return ... |
b3e0d640ff4b7dbc5c30dc9ebb69578acfe02f07 | jose/__init__.py | jose/__init__.py |
__version__ = "0.3.0"
__author__ = 'Michael Davis'
__license__ = 'MIT'
__copyright__ = 'Copyright 2015 Michael Davis'
from .exceptions import JOSEError
from .exceptions import JWSError
from .exceptions import ExpiredSignatureError
from .exceptions import JWTError
|
__version__ = "0.4.0"
__author__ = 'Michael Davis'
__license__ = 'MIT'
__copyright__ = 'Copyright 2015 Michael Davis'
from .exceptions import JOSEError
from .exceptions import JWSError
from .exceptions import ExpiredSignatureError
from .exceptions import JWTError
| Validate sub and jti claims | Validate sub and jti claims
| Python | mit | mpdavis/python-jose |
__version__ = "0.3.0"
__author__ = 'Michael Davis'
__license__ = 'MIT'
__copyright__ = 'Copyright 2015 Michael Davis'
from .exceptions import JOSEError
from .exceptions import JWSError
from .exceptions import ExpiredSignatureError
from .exceptions import JWTError
Validate sub and jti claims |
__version__ = "0.4.0"
__author__ = 'Michael Davis'
__license__ = 'MIT'
__copyright__ = 'Copyright 2015 Michael Davis'
from .exceptions import JOSEError
from .exceptions import JWSError
from .exceptions import ExpiredSignatureError
from .exceptions import JWTError
| <commit_before>
__version__ = "0.3.0"
__author__ = 'Michael Davis'
__license__ = 'MIT'
__copyright__ = 'Copyright 2015 Michael Davis'
from .exceptions import JOSEError
from .exceptions import JWSError
from .exceptions import ExpiredSignatureError
from .exceptions import JWTError
<commit_msg>Validate sub and jti claim... |
__version__ = "0.4.0"
__author__ = 'Michael Davis'
__license__ = 'MIT'
__copyright__ = 'Copyright 2015 Michael Davis'
from .exceptions import JOSEError
from .exceptions import JWSError
from .exceptions import ExpiredSignatureError
from .exceptions import JWTError
|
__version__ = "0.3.0"
__author__ = 'Michael Davis'
__license__ = 'MIT'
__copyright__ = 'Copyright 2015 Michael Davis'
from .exceptions import JOSEError
from .exceptions import JWSError
from .exceptions import ExpiredSignatureError
from .exceptions import JWTError
Validate sub and jti claims
__version__ = "0.4.0"
__a... | <commit_before>
__version__ = "0.3.0"
__author__ = 'Michael Davis'
__license__ = 'MIT'
__copyright__ = 'Copyright 2015 Michael Davis'
from .exceptions import JOSEError
from .exceptions import JWSError
from .exceptions import ExpiredSignatureError
from .exceptions import JWTError
<commit_msg>Validate sub and jti claim... |
f429707e0a5a97d741ac9c118646c9d171a5830d | kiwi/ui/pixbufutils.py | kiwi/ui/pixbufutils.py | #
# Kiwi: a Framework and Enhanced Widgets for Python
#
# Copyright (C) 2012 Async Open Source
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2.1 of the License, or (a... | #
# Kiwi: a Framework and Enhanced Widgets for Python
#
# Copyright (C) 2012 Async Open Source
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2.1 of the License, or (a... | Add width and height to pixbuf_from_string() and scale the image if any of them are set | Add width and height to pixbuf_from_string() and scale the image if any of them are set | Python | lgpl-2.1 | stoq/kiwi | #
# Kiwi: a Framework and Enhanced Widgets for Python
#
# Copyright (C) 2012 Async Open Source
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2.1 of the License, or (a... | #
# Kiwi: a Framework and Enhanced Widgets for Python
#
# Copyright (C) 2012 Async Open Source
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2.1 of the License, or (a... | <commit_before>#
# Kiwi: a Framework and Enhanced Widgets for Python
#
# Copyright (C) 2012 Async Open Source
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2.1 of the... | #
# Kiwi: a Framework and Enhanced Widgets for Python
#
# Copyright (C) 2012 Async Open Source
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2.1 of the License, or (a... | #
# Kiwi: a Framework and Enhanced Widgets for Python
#
# Copyright (C) 2012 Async Open Source
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2.1 of the License, or (a... | <commit_before>#
# Kiwi: a Framework and Enhanced Widgets for Python
#
# Copyright (C) 2012 Async Open Source
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2.1 of the... |
84b907ad78f03d614e8af14578c21e1228ab723d | top.py | top.py | """
Hacker News Top:
-Get top stories from Hacker News' official API
-Record all users who comment on those stories
Author: Rylan Santinon
"""
from api_connector import *
from csv_io import *
def main():
conn = ApiConnector()
csvio = CsvIo()
article_list = conn.get_top()
stories = []
for i in article_... | """
Hacker News Top:
-Get top stories from Hacker News' official API
-Record all users who comment on those stories
Author: Rylan Santinon
"""
from api_connector import *
from csv_io import *
def main():
conn = ApiConnector()
csvio = CsvIo()
article_list = conn.get_top()
stories = []
for i in article_... | Use common object for csvio calls | Use common object for csvio calls
| Python | apache-2.0 | rylans/hackernews-top,davande/hackernews-top | """
Hacker News Top:
-Get top stories from Hacker News' official API
-Record all users who comment on those stories
Author: Rylan Santinon
"""
from api_connector import *
from csv_io import *
def main():
conn = ApiConnector()
csvio = CsvIo()
article_list = conn.get_top()
stories = []
for i in article_... | """
Hacker News Top:
-Get top stories from Hacker News' official API
-Record all users who comment on those stories
Author: Rylan Santinon
"""
from api_connector import *
from csv_io import *
def main():
conn = ApiConnector()
csvio = CsvIo()
article_list = conn.get_top()
stories = []
for i in article_... | <commit_before>"""
Hacker News Top:
-Get top stories from Hacker News' official API
-Record all users who comment on those stories
Author: Rylan Santinon
"""
from api_connector import *
from csv_io import *
def main():
conn = ApiConnector()
csvio = CsvIo()
article_list = conn.get_top()
stories = []
fo... | """
Hacker News Top:
-Get top stories from Hacker News' official API
-Record all users who comment on those stories
Author: Rylan Santinon
"""
from api_connector import *
from csv_io import *
def main():
conn = ApiConnector()
csvio = CsvIo()
article_list = conn.get_top()
stories = []
for i in article_... | """
Hacker News Top:
-Get top stories from Hacker News' official API
-Record all users who comment on those stories
Author: Rylan Santinon
"""
from api_connector import *
from csv_io import *
def main():
conn = ApiConnector()
csvio = CsvIo()
article_list = conn.get_top()
stories = []
for i in article_... | <commit_before>"""
Hacker News Top:
-Get top stories from Hacker News' official API
-Record all users who comment on those stories
Author: Rylan Santinon
"""
from api_connector import *
from csv_io import *
def main():
conn = ApiConnector()
csvio = CsvIo()
article_list = conn.get_top()
stories = []
fo... |
193781255bca1a8748945a467e6d7736f4d460cb | jp2_online/settings/production.py | jp2_online/settings/production.py | # -*- coding: utf-8 -*-
from .base import *
# SECURITY WARNING: don't run with debug turned on in production!
DEBUG = False
ALLOWED_HOSTS = ['YOUR_DOMAIN(S)_GO_HERE']
CORS_ORIGIN_WHITELIST = ('ALLOWED_DOMAINS')
STATIC_ROOT = os.path.join(BASE_DIR, "../static/") | # -*- coding: utf-8 -*-
from .base import *
# SECURITY WARNING: don't run with debug turned on in production!
DEBUG = False
ALLOWED_HOSTS = ['138.197.197.47']
CORS_ORIGIN_WHITELIST = ('ALLOWED_DOMAINS')
STATIC_ROOT = os.path.join(BASE_DIR, "../static/") | Change allowed hosts to include server ip | Change allowed hosts to include server ip
| Python | mit | erikiado/jp2_online,erikiado/jp2_online,erikiado/jp2_online | # -*- coding: utf-8 -*-
from .base import *
# SECURITY WARNING: don't run with debug turned on in production!
DEBUG = False
ALLOWED_HOSTS = ['YOUR_DOMAIN(S)_GO_HERE']
CORS_ORIGIN_WHITELIST = ('ALLOWED_DOMAINS')
STATIC_ROOT = os.path.join(BASE_DIR, "../static/")Change allowed hosts to include server ip | # -*- coding: utf-8 -*-
from .base import *
# SECURITY WARNING: don't run with debug turned on in production!
DEBUG = False
ALLOWED_HOSTS = ['138.197.197.47']
CORS_ORIGIN_WHITELIST = ('ALLOWED_DOMAINS')
STATIC_ROOT = os.path.join(BASE_DIR, "../static/") | <commit_before># -*- coding: utf-8 -*-
from .base import *
# SECURITY WARNING: don't run with debug turned on in production!
DEBUG = False
ALLOWED_HOSTS = ['YOUR_DOMAIN(S)_GO_HERE']
CORS_ORIGIN_WHITELIST = ('ALLOWED_DOMAINS')
STATIC_ROOT = os.path.join(BASE_DIR, "../static/")<commit_msg>Change allowed hosts to incl... | # -*- coding: utf-8 -*-
from .base import *
# SECURITY WARNING: don't run with debug turned on in production!
DEBUG = False
ALLOWED_HOSTS = ['138.197.197.47']
CORS_ORIGIN_WHITELIST = ('ALLOWED_DOMAINS')
STATIC_ROOT = os.path.join(BASE_DIR, "../static/") | # -*- coding: utf-8 -*-
from .base import *
# SECURITY WARNING: don't run with debug turned on in production!
DEBUG = False
ALLOWED_HOSTS = ['YOUR_DOMAIN(S)_GO_HERE']
CORS_ORIGIN_WHITELIST = ('ALLOWED_DOMAINS')
STATIC_ROOT = os.path.join(BASE_DIR, "../static/")Change allowed hosts to include server ip# -*- coding: ... | <commit_before># -*- coding: utf-8 -*-
from .base import *
# SECURITY WARNING: don't run with debug turned on in production!
DEBUG = False
ALLOWED_HOSTS = ['YOUR_DOMAIN(S)_GO_HERE']
CORS_ORIGIN_WHITELIST = ('ALLOWED_DOMAINS')
STATIC_ROOT = os.path.join(BASE_DIR, "../static/")<commit_msg>Change allowed hosts to incl... |
124489e979ed9d913b97ff688ce65d678579e638 | morse_modem.py | morse_modem.py | import cProfile
from demodulate.cfg import *
from demodulate.detect_tone import *
from demodulate.element_resolve import *
from gen_test import *
if __name__ == "__main__":
#gen_test_data()
data = gen_test_data()
#print len(data)/SAMPLE_FREQ
#cProfile.run('detect_tone(data)')
#print detect_tone(data)
element_r... | import cProfile
from demodulate.cfg import *
from demodulate.detect_tone import *
from demodulate.element_resolve import *
from gen_tone import *
import random
if __name__ == "__main__":
WPM = random.uniform(2,20)
pattern = [1,0,1,1,1,0,0,0,0,0,0,0] # morse code 'A'
#gen_test_data()
data = gen_tone(pattern)
#p... | Add tone generation arguments to gen_tone | Add tone generation arguments to gen_tone
| Python | mit | nickodell/morse-code | import cProfile
from demodulate.cfg import *
from demodulate.detect_tone import *
from demodulate.element_resolve import *
from gen_test import *
if __name__ == "__main__":
#gen_test_data()
data = gen_test_data()
#print len(data)/SAMPLE_FREQ
#cProfile.run('detect_tone(data)')
#print detect_tone(data)
element_r... | import cProfile
from demodulate.cfg import *
from demodulate.detect_tone import *
from demodulate.element_resolve import *
from gen_tone import *
import random
if __name__ == "__main__":
WPM = random.uniform(2,20)
pattern = [1,0,1,1,1,0,0,0,0,0,0,0] # morse code 'A'
#gen_test_data()
data = gen_tone(pattern)
#p... | <commit_before>import cProfile
from demodulate.cfg import *
from demodulate.detect_tone import *
from demodulate.element_resolve import *
from gen_test import *
if __name__ == "__main__":
#gen_test_data()
data = gen_test_data()
#print len(data)/SAMPLE_FREQ
#cProfile.run('detect_tone(data)')
#print detect_tone(d... | import cProfile
from demodulate.cfg import *
from demodulate.detect_tone import *
from demodulate.element_resolve import *
from gen_tone import *
import random
if __name__ == "__main__":
WPM = random.uniform(2,20)
pattern = [1,0,1,1,1,0,0,0,0,0,0,0] # morse code 'A'
#gen_test_data()
data = gen_tone(pattern)
#p... | import cProfile
from demodulate.cfg import *
from demodulate.detect_tone import *
from demodulate.element_resolve import *
from gen_test import *
if __name__ == "__main__":
#gen_test_data()
data = gen_test_data()
#print len(data)/SAMPLE_FREQ
#cProfile.run('detect_tone(data)')
#print detect_tone(data)
element_r... | <commit_before>import cProfile
from demodulate.cfg import *
from demodulate.detect_tone import *
from demodulate.element_resolve import *
from gen_test import *
if __name__ == "__main__":
#gen_test_data()
data = gen_test_data()
#print len(data)/SAMPLE_FREQ
#cProfile.run('detect_tone(data)')
#print detect_tone(d... |
f39f7d64ba8ca8051b24407811239f960cc6f561 | lib/collect/backend.py | lib/collect/backend.py | import lib.collect.config as config
if config.BACKEND == 'dynamodb':
import lib.collect.backends.dymamodb as api
else:
import lib.collect.backends.localfs as api
| import lib.collect.config as config
try:
if config.BACKEND == 'dynamodb':
import lib.collect.backends.dymamodb as api
else:
import lib.collect.backends.localfs as api
except AttributeError:
import lib.collect.backends.localfs as api
| Fix bug in module selection. | Fix bug in module selection.
| Python | mit | ic/mark0 | import lib.collect.config as config
if config.BACKEND == 'dynamodb':
import lib.collect.backends.dymamodb as api
else:
import lib.collect.backends.localfs as api
Fix bug in module selection. | import lib.collect.config as config
try:
if config.BACKEND == 'dynamodb':
import lib.collect.backends.dymamodb as api
else:
import lib.collect.backends.localfs as api
except AttributeError:
import lib.collect.backends.localfs as api
| <commit_before>import lib.collect.config as config
if config.BACKEND == 'dynamodb':
import lib.collect.backends.dymamodb as api
else:
import lib.collect.backends.localfs as api
<commit_msg>Fix bug in module selection.<commit_after> | import lib.collect.config as config
try:
if config.BACKEND == 'dynamodb':
import lib.collect.backends.dymamodb as api
else:
import lib.collect.backends.localfs as api
except AttributeError:
import lib.collect.backends.localfs as api
| import lib.collect.config as config
if config.BACKEND == 'dynamodb':
import lib.collect.backends.dymamodb as api
else:
import lib.collect.backends.localfs as api
Fix bug in module selection.import lib.collect.config as config
try:
if config.BACKEND == 'dynamodb':
import lib.collect.backends.dymamo... | <commit_before>import lib.collect.config as config
if config.BACKEND == 'dynamodb':
import lib.collect.backends.dymamodb as api
else:
import lib.collect.backends.localfs as api
<commit_msg>Fix bug in module selection.<commit_after>import lib.collect.config as config
try:
if config.BACKEND == 'dynamodb':
... |
47cedcd514f7c569c1637acc331890bb49aedd90 | thumbor/app.py | thumbor/app.py | #!/usr/bin/python
# -*- coding: utf-8 -*-
# thumbor imaging service
# https://github.com/globocom/thumbor/wiki
# Licensed under the MIT license:
# http://www.opensource.org/licenses/mit-license
# Copyright (c) 2011 globo.com timehome@corp.globo.com
import tornado.web
import tornado.ioloop
from thumbor.handlers.healt... | #!/usr/bin/python
# -*- coding: utf-8 -*-
# thumbor imaging service
# https://github.com/globocom/thumbor/wiki
# Licensed under the MIT license:
# http://www.opensource.org/licenses/mit-license
# Copyright (c) 2011 globo.com timehome@corp.globo.com
import tornado.web
import tornado.ioloop
from thumbor.handlers.healt... | Disable REST Upload by default | Disable REST Upload by default
| Python | mit | fanhero/thumbor,fanhero/thumbor,fanhero/thumbor,fanhero/thumbor | #!/usr/bin/python
# -*- coding: utf-8 -*-
# thumbor imaging service
# https://github.com/globocom/thumbor/wiki
# Licensed under the MIT license:
# http://www.opensource.org/licenses/mit-license
# Copyright (c) 2011 globo.com timehome@corp.globo.com
import tornado.web
import tornado.ioloop
from thumbor.handlers.healt... | #!/usr/bin/python
# -*- coding: utf-8 -*-
# thumbor imaging service
# https://github.com/globocom/thumbor/wiki
# Licensed under the MIT license:
# http://www.opensource.org/licenses/mit-license
# Copyright (c) 2011 globo.com timehome@corp.globo.com
import tornado.web
import tornado.ioloop
from thumbor.handlers.healt... | <commit_before>#!/usr/bin/python
# -*- coding: utf-8 -*-
# thumbor imaging service
# https://github.com/globocom/thumbor/wiki
# Licensed under the MIT license:
# http://www.opensource.org/licenses/mit-license
# Copyright (c) 2011 globo.com timehome@corp.globo.com
import tornado.web
import tornado.ioloop
from thumbor... | #!/usr/bin/python
# -*- coding: utf-8 -*-
# thumbor imaging service
# https://github.com/globocom/thumbor/wiki
# Licensed under the MIT license:
# http://www.opensource.org/licenses/mit-license
# Copyright (c) 2011 globo.com timehome@corp.globo.com
import tornado.web
import tornado.ioloop
from thumbor.handlers.healt... | #!/usr/bin/python
# -*- coding: utf-8 -*-
# thumbor imaging service
# https://github.com/globocom/thumbor/wiki
# Licensed under the MIT license:
# http://www.opensource.org/licenses/mit-license
# Copyright (c) 2011 globo.com timehome@corp.globo.com
import tornado.web
import tornado.ioloop
from thumbor.handlers.healt... | <commit_before>#!/usr/bin/python
# -*- coding: utf-8 -*-
# thumbor imaging service
# https://github.com/globocom/thumbor/wiki
# Licensed under the MIT license:
# http://www.opensource.org/licenses/mit-license
# Copyright (c) 2011 globo.com timehome@corp.globo.com
import tornado.web
import tornado.ioloop
from thumbor... |
0be201e5f00d0a0327c2878d9d944952157ccaef | units/games.py | units/games.py |
import random
def eightball():
return random.choice(("It is certain", "It is decidedly so", "Without a doubt", "Yes, definitely",
"You may rely on it", "As I see it, yes", "Most likely", "Outlook good", "Yes",
"Signs point to yes", "Reply hazy try again", "Ask again later", "Better not tell you now",... |
import random
def eightball():
return random.choice(("It is certain", "It is decidedly so", "Without a doubt", "Yes, definitely",
"You may rely on it", "As I see it, yes", "Most likely", "Outlook good", "Yes",
"Signs point to yes", "Reply hazy; try again", "Ask again later", "Better not tell you now"... | Fix eightball method response grammar | Fix eightball method response grammar
| Python | mit | Harmon758/Harmonbot,Harmon758/Harmonbot |
import random
def eightball():
return random.choice(("It is certain", "It is decidedly so", "Without a doubt", "Yes, definitely",
"You may rely on it", "As I see it, yes", "Most likely", "Outlook good", "Yes",
"Signs point to yes", "Reply hazy try again", "Ask again later", "Better not tell you now",... |
import random
def eightball():
return random.choice(("It is certain", "It is decidedly so", "Without a doubt", "Yes, definitely",
"You may rely on it", "As I see it, yes", "Most likely", "Outlook good", "Yes",
"Signs point to yes", "Reply hazy; try again", "Ask again later", "Better not tell you now"... | <commit_before>
import random
def eightball():
return random.choice(("It is certain", "It is decidedly so", "Without a doubt", "Yes, definitely",
"You may rely on it", "As I see it, yes", "Most likely", "Outlook good", "Yes",
"Signs point to yes", "Reply hazy try again", "Ask again later", "Better not... |
import random
def eightball():
return random.choice(("It is certain", "It is decidedly so", "Without a doubt", "Yes, definitely",
"You may rely on it", "As I see it, yes", "Most likely", "Outlook good", "Yes",
"Signs point to yes", "Reply hazy; try again", "Ask again later", "Better not tell you now"... |
import random
def eightball():
return random.choice(("It is certain", "It is decidedly so", "Without a doubt", "Yes, definitely",
"You may rely on it", "As I see it, yes", "Most likely", "Outlook good", "Yes",
"Signs point to yes", "Reply hazy try again", "Ask again later", "Better not tell you now",... | <commit_before>
import random
def eightball():
return random.choice(("It is certain", "It is decidedly so", "Without a doubt", "Yes, definitely",
"You may rely on it", "As I see it, yes", "Most likely", "Outlook good", "Yes",
"Signs point to yes", "Reply hazy try again", "Ask again later", "Better not... |
f6bff4e5360ba2c0379c129a111d333ee718c1d3 | datafeeds/usfirst_event_teams_parser.py | datafeeds/usfirst_event_teams_parser.py | import re
from BeautifulSoup import BeautifulSoup
from datafeeds.parser_base import ParserBase
class UsfirstEventTeamsParser(ParserBase):
@classmethod
def parse(self, html):
"""
Find what Teams are attending an Event, and return their team_numbers.
"""
teamRe = re.compile(r'... | import re
from BeautifulSoup import BeautifulSoup
from datafeeds.parser_base import ParserBase
class UsfirstEventTeamsParser(ParserBase):
@classmethod
def parse(self, html):
"""
Find what Teams are attending an Event, and return their team_numbers.
"""
teamRe = re.compile(r'... | Fix event teams parser for new format | Fix event teams parser for new format
| Python | mit | the-blue-alliance/the-blue-alliance,jaredhasenklein/the-blue-alliance,nwalters512/the-blue-alliance,nwalters512/the-blue-alliance,bdaroz/the-blue-alliance,1fish2/the-blue-alliance,synth3tk/the-blue-alliance,jaredhasenklein/the-blue-alliance,bdaroz/the-blue-alliance,nwalters512/the-blue-alliance,tsteward/the-blue-allian... | import re
from BeautifulSoup import BeautifulSoup
from datafeeds.parser_base import ParserBase
class UsfirstEventTeamsParser(ParserBase):
@classmethod
def parse(self, html):
"""
Find what Teams are attending an Event, and return their team_numbers.
"""
teamRe = re.compile(r'... | import re
from BeautifulSoup import BeautifulSoup
from datafeeds.parser_base import ParserBase
class UsfirstEventTeamsParser(ParserBase):
@classmethod
def parse(self, html):
"""
Find what Teams are attending an Event, and return their team_numbers.
"""
teamRe = re.compile(r'... | <commit_before>import re
from BeautifulSoup import BeautifulSoup
from datafeeds.parser_base import ParserBase
class UsfirstEventTeamsParser(ParserBase):
@classmethod
def parse(self, html):
"""
Find what Teams are attending an Event, and return their team_numbers.
"""
teamRe ... | import re
from BeautifulSoup import BeautifulSoup
from datafeeds.parser_base import ParserBase
class UsfirstEventTeamsParser(ParserBase):
@classmethod
def parse(self, html):
"""
Find what Teams are attending an Event, and return their team_numbers.
"""
teamRe = re.compile(r'... | import re
from BeautifulSoup import BeautifulSoup
from datafeeds.parser_base import ParserBase
class UsfirstEventTeamsParser(ParserBase):
@classmethod
def parse(self, html):
"""
Find what Teams are attending an Event, and return their team_numbers.
"""
teamRe = re.compile(r'... | <commit_before>import re
from BeautifulSoup import BeautifulSoup
from datafeeds.parser_base import ParserBase
class UsfirstEventTeamsParser(ParserBase):
@classmethod
def parse(self, html):
"""
Find what Teams are attending an Event, and return their team_numbers.
"""
teamRe ... |
b80726a5a36480b4146fc4df89ad96a738aa2091 | waitress/settings/__init__.py | waitress/settings/__init__.py | import os
if os.getenv('OPENSHIFT_REPO_DIR'):
from .staging import *
elif os.getenv('TRAVIS_CI'):
from .testing import *
else:
from .development import * | import os
if os.getenv('OPENSHIFT_REPO_DIR'):
from .staging import *
elif os.getenv('TRAVIS_CI'):
from .testing import *
elif os.getenv('HEROKU'):
from .production import *
else:
from .development import * | Use production settings in Heroku | [fix] Use production settings in Heroku
| Python | mit | waitress-andela/waitress,andela-osule/waitress,andela-osule/waitress,andela-osule/waitress,waitress-andela/waitress,waitress-andela/waitress | import os
if os.getenv('OPENSHIFT_REPO_DIR'):
from .staging import *
elif os.getenv('TRAVIS_CI'):
from .testing import *
else:
from .development import *[fix] Use production settings in Heroku | import os
if os.getenv('OPENSHIFT_REPO_DIR'):
from .staging import *
elif os.getenv('TRAVIS_CI'):
from .testing import *
elif os.getenv('HEROKU'):
from .production import *
else:
from .development import * | <commit_before>import os
if os.getenv('OPENSHIFT_REPO_DIR'):
from .staging import *
elif os.getenv('TRAVIS_CI'):
from .testing import *
else:
from .development import *<commit_msg>[fix] Use production settings in Heroku<commit_after> | import os
if os.getenv('OPENSHIFT_REPO_DIR'):
from .staging import *
elif os.getenv('TRAVIS_CI'):
from .testing import *
elif os.getenv('HEROKU'):
from .production import *
else:
from .development import * | import os
if os.getenv('OPENSHIFT_REPO_DIR'):
from .staging import *
elif os.getenv('TRAVIS_CI'):
from .testing import *
else:
from .development import *[fix] Use production settings in Herokuimport os
if os.getenv('OPENSHIFT_REPO_DIR'):
from .staging import *
elif os.getenv('TRAVIS_CI'):
from .te... | <commit_before>import os
if os.getenv('OPENSHIFT_REPO_DIR'):
from .staging import *
elif os.getenv('TRAVIS_CI'):
from .testing import *
else:
from .development import *<commit_msg>[fix] Use production settings in Heroku<commit_after>import os
if os.getenv('OPENSHIFT_REPO_DIR'):
from .staging import *
... |
814684225140231de25dc7ee616c6bfa73b312ee | addons/hr/__terp__.py | addons/hr/__terp__.py | {
"name" : "Human Resources",
"version" : "1.0",
"author" : "Tiny",
"category" : "Generic Modules/Human Resources",
"website" : "http://tinyerp.com/module_hr.html",
"description": """
Module for human resource management. You can manage:
* Employees and hierarchies
* Work hours sheets
* Attendances and sign i... | {
"name" : "Human Resources",
"version" : "1.0",
"author" : "Tiny",
"category" : "Generic Modules/Human Resources",
"website" : "http://tinyerp.com/module_hr.html",
"description": """
Module for human resource management. You can manage:
* Employees and hierarchies
* Work hours sheets
* Attendances and sign i... | Add hr_security.xml file entry in update_xml section | Add hr_security.xml file entry in update_xml section
bzr revid: mga@tinyerp.com-d69c221f3647e67487af7bd1c349e27cdbbbe857 | Python | agpl-3.0 | VielSoft/odoo,naousse/odoo,tarzan0820/odoo,BT-ojossen/odoo,leoliujie/odoo,Danisan/odoo-1,ehirt/odoo,odooindia/odoo,ThinkOpen-Solutions/odoo,bakhtout/odoo-educ,ingadhoc/odoo,naousse/odoo,datenbetrieb/odoo,charbeljc/OCB,sysadminmatmoz/OCB,cysnake4713/odoo,arthru/OpenUpgrade,bwrsandman/OpenUpgrade,ovnicraft/odoo,sysadminm... | {
"name" : "Human Resources",
"version" : "1.0",
"author" : "Tiny",
"category" : "Generic Modules/Human Resources",
"website" : "http://tinyerp.com/module_hr.html",
"description": """
Module for human resource management. You can manage:
* Employees and hierarchies
* Work hours sheets
* Attendances and sign i... | {
"name" : "Human Resources",
"version" : "1.0",
"author" : "Tiny",
"category" : "Generic Modules/Human Resources",
"website" : "http://tinyerp.com/module_hr.html",
"description": """
Module for human resource management. You can manage:
* Employees and hierarchies
* Work hours sheets
* Attendances and sign i... | <commit_before>{
"name" : "Human Resources",
"version" : "1.0",
"author" : "Tiny",
"category" : "Generic Modules/Human Resources",
"website" : "http://tinyerp.com/module_hr.html",
"description": """
Module for human resource management. You can manage:
* Employees and hierarchies
* Work hours sheets
* Attenda... | {
"name" : "Human Resources",
"version" : "1.0",
"author" : "Tiny",
"category" : "Generic Modules/Human Resources",
"website" : "http://tinyerp.com/module_hr.html",
"description": """
Module for human resource management. You can manage:
* Employees and hierarchies
* Work hours sheets
* Attendances and sign i... | {
"name" : "Human Resources",
"version" : "1.0",
"author" : "Tiny",
"category" : "Generic Modules/Human Resources",
"website" : "http://tinyerp.com/module_hr.html",
"description": """
Module for human resource management. You can manage:
* Employees and hierarchies
* Work hours sheets
* Attendances and sign i... | <commit_before>{
"name" : "Human Resources",
"version" : "1.0",
"author" : "Tiny",
"category" : "Generic Modules/Human Resources",
"website" : "http://tinyerp.com/module_hr.html",
"description": """
Module for human resource management. You can manage:
* Employees and hierarchies
* Work hours sheets
* Attenda... |
164a80ce3bcffad0e233426830c712cddd2f750b | thefederation/apps.py | thefederation/apps.py | import datetime
import sys
import django_rq
from django.apps import AppConfig
class TheFederationConfig(AppConfig):
name = "thefederation"
verbose_name = "The Federation"
def ready(self):
# Only register tasks if RQ Scheduler process
if "rqscheduler" not in sys.argv:
return
... | import datetime
import sys
import django_rq
from django.apps import AppConfig
class TheFederationConfig(AppConfig):
name = "thefederation"
verbose_name = "The Federation"
def ready(self):
# Only register tasks if RQ Scheduler process
if "rqscheduler" not in sys.argv:
return
... | Increase timeout of clean_duplicate_nodes job | Increase timeout of clean_duplicate_nodes job
| Python | agpl-3.0 | jaywink/diaspora-hub,jaywink/diaspora-hub,jaywink/the-federation.info,jaywink/diaspora-hub,jaywink/the-federation.info,jaywink/the-federation.info | import datetime
import sys
import django_rq
from django.apps import AppConfig
class TheFederationConfig(AppConfig):
name = "thefederation"
verbose_name = "The Federation"
def ready(self):
# Only register tasks if RQ Scheduler process
if "rqscheduler" not in sys.argv:
return
... | import datetime
import sys
import django_rq
from django.apps import AppConfig
class TheFederationConfig(AppConfig):
name = "thefederation"
verbose_name = "The Federation"
def ready(self):
# Only register tasks if RQ Scheduler process
if "rqscheduler" not in sys.argv:
return
... | <commit_before>import datetime
import sys
import django_rq
from django.apps import AppConfig
class TheFederationConfig(AppConfig):
name = "thefederation"
verbose_name = "The Federation"
def ready(self):
# Only register tasks if RQ Scheduler process
if "rqscheduler" not in sys.argv:
... | import datetime
import sys
import django_rq
from django.apps import AppConfig
class TheFederationConfig(AppConfig):
name = "thefederation"
verbose_name = "The Federation"
def ready(self):
# Only register tasks if RQ Scheduler process
if "rqscheduler" not in sys.argv:
return
... | import datetime
import sys
import django_rq
from django.apps import AppConfig
class TheFederationConfig(AppConfig):
name = "thefederation"
verbose_name = "The Federation"
def ready(self):
# Only register tasks if RQ Scheduler process
if "rqscheduler" not in sys.argv:
return
... | <commit_before>import datetime
import sys
import django_rq
from django.apps import AppConfig
class TheFederationConfig(AppConfig):
name = "thefederation"
verbose_name = "The Federation"
def ready(self):
# Only register tasks if RQ Scheduler process
if "rqscheduler" not in sys.argv:
... |
fd5ebe9ae938cdf0d586bf3177730619b8b2025a | django_auto_filter/filter_for_models.py | django_auto_filter/filter_for_models.py | from django.conf.urls import patterns, url
from django.contrib.auth.decorators import login_required
from django_auto_filter.views_django_auto_filter_new import DjangoAutoFilterNew
from djangoautoconf.model_utils.model_attr_utils import model_enumerator
from ufs_tools.string_tools import class_name_to_low_case
def a... | from django.conf.urls import patterns, url
from django.contrib.auth.decorators import login_required
from django_auto_filter.views_django_auto_filter_new import DjangoAutoFilterNew
from djangoautoconf.model_utils.model_attr_utils import model_enumerator
from ufs_tools.string_tools import class_name_to_low_case
def a... | Fix attribute from model_class to model issue. | Fix attribute from model_class to model issue.
| Python | bsd-3-clause | weijia/django-auto-filter,weijia/django-auto-filter,weijia/django-auto-filter | from django.conf.urls import patterns, url
from django.contrib.auth.decorators import login_required
from django_auto_filter.views_django_auto_filter_new import DjangoAutoFilterNew
from djangoautoconf.model_utils.model_attr_utils import model_enumerator
from ufs_tools.string_tools import class_name_to_low_case
def a... | from django.conf.urls import patterns, url
from django.contrib.auth.decorators import login_required
from django_auto_filter.views_django_auto_filter_new import DjangoAutoFilterNew
from djangoautoconf.model_utils.model_attr_utils import model_enumerator
from ufs_tools.string_tools import class_name_to_low_case
def a... | <commit_before>from django.conf.urls import patterns, url
from django.contrib.auth.decorators import login_required
from django_auto_filter.views_django_auto_filter_new import DjangoAutoFilterNew
from djangoautoconf.model_utils.model_attr_utils import model_enumerator
from ufs_tools.string_tools import class_name_to_l... | from django.conf.urls import patterns, url
from django.contrib.auth.decorators import login_required
from django_auto_filter.views_django_auto_filter_new import DjangoAutoFilterNew
from djangoautoconf.model_utils.model_attr_utils import model_enumerator
from ufs_tools.string_tools import class_name_to_low_case
def a... | from django.conf.urls import patterns, url
from django.contrib.auth.decorators import login_required
from django_auto_filter.views_django_auto_filter_new import DjangoAutoFilterNew
from djangoautoconf.model_utils.model_attr_utils import model_enumerator
from ufs_tools.string_tools import class_name_to_low_case
def a... | <commit_before>from django.conf.urls import patterns, url
from django.contrib.auth.decorators import login_required
from django_auto_filter.views_django_auto_filter_new import DjangoAutoFilterNew
from djangoautoconf.model_utils.model_attr_utils import model_enumerator
from ufs_tools.string_tools import class_name_to_l... |
0cdfabf24c01920617535205dfcdba7a187b4d32 | doc/_ext/saltdocs.py | doc/_ext/saltdocs.py | def setup(app):
"""Additions and customizations to Sphinx that are useful for documenting
the Salt project.
"""
app.add_crossref_type(directivename="conf_master", rolename="conf_master",
indextemplate="pair: %s; conf/master")
app.add_crossref_type(directivename="conf_minion", rolename="... | def setup(app):
"""Additions and customizations to Sphinx that are useful for documenting
the Salt project.
"""
app.add_crossref_type(directivename="conf_master", rolename="conf_master",
indextemplate="pair: %s; conf/master")
app.add_crossref_type(directivename="conf_minion", rolename="... | Allow the `conf-log` role to link to the logging documentation. | Allow the `conf-log` role to link to the logging documentation.
| Python | apache-2.0 | saltstack/salt,saltstack/salt,saltstack/salt,saltstack/salt,saltstack/salt | def setup(app):
"""Additions and customizations to Sphinx that are useful for documenting
the Salt project.
"""
app.add_crossref_type(directivename="conf_master", rolename="conf_master",
indextemplate="pair: %s; conf/master")
app.add_crossref_type(directivename="conf_minion", rolename="... | def setup(app):
"""Additions and customizations to Sphinx that are useful for documenting
the Salt project.
"""
app.add_crossref_type(directivename="conf_master", rolename="conf_master",
indextemplate="pair: %s; conf/master")
app.add_crossref_type(directivename="conf_minion", rolename="... | <commit_before>def setup(app):
"""Additions and customizations to Sphinx that are useful for documenting
the Salt project.
"""
app.add_crossref_type(directivename="conf_master", rolename="conf_master",
indextemplate="pair: %s; conf/master")
app.add_crossref_type(directivename="conf_mini... | def setup(app):
"""Additions and customizations to Sphinx that are useful for documenting
the Salt project.
"""
app.add_crossref_type(directivename="conf_master", rolename="conf_master",
indextemplate="pair: %s; conf/master")
app.add_crossref_type(directivename="conf_minion", rolename="... | def setup(app):
"""Additions and customizations to Sphinx that are useful for documenting
the Salt project.
"""
app.add_crossref_type(directivename="conf_master", rolename="conf_master",
indextemplate="pair: %s; conf/master")
app.add_crossref_type(directivename="conf_minion", rolename="... | <commit_before>def setup(app):
"""Additions and customizations to Sphinx that are useful for documenting
the Salt project.
"""
app.add_crossref_type(directivename="conf_master", rolename="conf_master",
indextemplate="pair: %s; conf/master")
app.add_crossref_type(directivename="conf_mini... |
db2d0b2f7277f21ce2f500dc0cc4837258fdd200 | traceview/__init__.py | traceview/__init__.py | # -*- coding: utf-8 -*-
"""
TraceView API library
:copyright: (c) 2014 by Daniel Riti.
:license: MIT, see LICENSE for more details.
"""
__title__ = 'traceview'
__version__ = '0.1.0'
__author__ = 'Daniel Riti'
__license__ = 'MIT'
from .request import Request
import resources
class TraceView(object):
""" Prov... | # -*- coding: utf-8 -*-
"""
TraceView API library
:copyright: (c) 2014 by Daniel Riti.
:license: MIT, see LICENSE for more details.
"""
__title__ = 'traceview'
__version__ = '0.1.0'
__author__ = 'Daniel Riti'
__license__ = 'MIT'
from .request import Request
import resources
class TraceView(object):
""" Prov... | Add layers object attribute to TraceView. | Add layers object attribute to TraceView.
| Python | mit | danriti/python-traceview | # -*- coding: utf-8 -*-
"""
TraceView API library
:copyright: (c) 2014 by Daniel Riti.
:license: MIT, see LICENSE for more details.
"""
__title__ = 'traceview'
__version__ = '0.1.0'
__author__ = 'Daniel Riti'
__license__ = 'MIT'
from .request import Request
import resources
class TraceView(object):
""" Prov... | # -*- coding: utf-8 -*-
"""
TraceView API library
:copyright: (c) 2014 by Daniel Riti.
:license: MIT, see LICENSE for more details.
"""
__title__ = 'traceview'
__version__ = '0.1.0'
__author__ = 'Daniel Riti'
__license__ = 'MIT'
from .request import Request
import resources
class TraceView(object):
""" Prov... | <commit_before># -*- coding: utf-8 -*-
"""
TraceView API library
:copyright: (c) 2014 by Daniel Riti.
:license: MIT, see LICENSE for more details.
"""
__title__ = 'traceview'
__version__ = '0.1.0'
__author__ = 'Daniel Riti'
__license__ = 'MIT'
from .request import Request
import resources
class TraceView(object... | # -*- coding: utf-8 -*-
"""
TraceView API library
:copyright: (c) 2014 by Daniel Riti.
:license: MIT, see LICENSE for more details.
"""
__title__ = 'traceview'
__version__ = '0.1.0'
__author__ = 'Daniel Riti'
__license__ = 'MIT'
from .request import Request
import resources
class TraceView(object):
""" Prov... | # -*- coding: utf-8 -*-
"""
TraceView API library
:copyright: (c) 2014 by Daniel Riti.
:license: MIT, see LICENSE for more details.
"""
__title__ = 'traceview'
__version__ = '0.1.0'
__author__ = 'Daniel Riti'
__license__ = 'MIT'
from .request import Request
import resources
class TraceView(object):
""" Prov... | <commit_before># -*- coding: utf-8 -*-
"""
TraceView API library
:copyright: (c) 2014 by Daniel Riti.
:license: MIT, see LICENSE for more details.
"""
__title__ = 'traceview'
__version__ = '0.1.0'
__author__ = 'Daniel Riti'
__license__ = 'MIT'
from .request import Request
import resources
class TraceView(object... |
45cebb2ecd7b30bf33064701967e8690632b0c77 | plugins/media.py | plugins/media.py | import plugintypes
import tgl
class MediaPlugin(plugintypes.TelegramPlugin):
"""
Upload media files to chat when linked.
"""
patterns = [
"(https?://[\w\-\_\.\?\:\/\+\=\&]+\.(gif|mp4|pdf|pdf|ogg|zip|mp3|rar|wmv|doc|avi))",
]
usage = [
"Automatically detects urls.",
]
d... | import plugintypes
import tgl
class MediaPlugin(plugintypes.TelegramPlugin):
"""
Upload media files to chat when linked.
"""
patterns = [
"(https?://[\w\-\_\.\?\:\/\+\=\&]+\.(gif|mp4|pdf|pdf|ogg|zip|mp3|rar|wmv|doc|avi))v?",
]
usage = [
"Automatically detects urls.",
]
... | Stop grabbing gif versions of gifv's posted. | Stop grabbing gif versions of gifv's posted.
| Python | mit | datamachine/telex,Thom7/telex,Thom7/telex,datamachine/telex | import plugintypes
import tgl
class MediaPlugin(plugintypes.TelegramPlugin):
"""
Upload media files to chat when linked.
"""
patterns = [
"(https?://[\w\-\_\.\?\:\/\+\=\&]+\.(gif|mp4|pdf|pdf|ogg|zip|mp3|rar|wmv|doc|avi))",
]
usage = [
"Automatically detects urls.",
]
d... | import plugintypes
import tgl
class MediaPlugin(plugintypes.TelegramPlugin):
"""
Upload media files to chat when linked.
"""
patterns = [
"(https?://[\w\-\_\.\?\:\/\+\=\&]+\.(gif|mp4|pdf|pdf|ogg|zip|mp3|rar|wmv|doc|avi))v?",
]
usage = [
"Automatically detects urls.",
]
... | <commit_before>import plugintypes
import tgl
class MediaPlugin(plugintypes.TelegramPlugin):
"""
Upload media files to chat when linked.
"""
patterns = [
"(https?://[\w\-\_\.\?\:\/\+\=\&]+\.(gif|mp4|pdf|pdf|ogg|zip|mp3|rar|wmv|doc|avi))",
]
usage = [
"Automatically detects urls.... | import plugintypes
import tgl
class MediaPlugin(plugintypes.TelegramPlugin):
"""
Upload media files to chat when linked.
"""
patterns = [
"(https?://[\w\-\_\.\?\:\/\+\=\&]+\.(gif|mp4|pdf|pdf|ogg|zip|mp3|rar|wmv|doc|avi))v?",
]
usage = [
"Automatically detects urls.",
]
... | import plugintypes
import tgl
class MediaPlugin(plugintypes.TelegramPlugin):
"""
Upload media files to chat when linked.
"""
patterns = [
"(https?://[\w\-\_\.\?\:\/\+\=\&]+\.(gif|mp4|pdf|pdf|ogg|zip|mp3|rar|wmv|doc|avi))",
]
usage = [
"Automatically detects urls.",
]
d... | <commit_before>import plugintypes
import tgl
class MediaPlugin(plugintypes.TelegramPlugin):
"""
Upload media files to chat when linked.
"""
patterns = [
"(https?://[\w\-\_\.\?\:\/\+\=\&]+\.(gif|mp4|pdf|pdf|ogg|zip|mp3|rar|wmv|doc|avi))",
]
usage = [
"Automatically detects urls.... |
bf8d9fa8d309a1e1252acdcb8a6cfe785a27c859 | automata/automaton.py | automata/automaton.py | #!/usr/bin/env python3
import abc
class Automaton(metaclass=abc.ABCMeta):
def __init__(self, states, symbols, transitions, initial_state,
final_states):
"""initialize a complete finite automaton"""
self.states = states
self.symbols = symbols
self.transitions = tr... | #!/usr/bin/env python3
import abc
class Automaton(metaclass=abc.ABCMeta):
"""an abstract base class for finite automata"""
def __init__(self, states, symbols, transitions, initial_state,
final_states):
"""initialize a complete finite automaton"""
self.states = states
... | Add docstrings to Automaton base class | Add docstrings to Automaton base class
| Python | mit | caleb531/automata | #!/usr/bin/env python3
import abc
class Automaton(metaclass=abc.ABCMeta):
def __init__(self, states, symbols, transitions, initial_state,
final_states):
"""initialize a complete finite automaton"""
self.states = states
self.symbols = symbols
self.transitions = tr... | #!/usr/bin/env python3
import abc
class Automaton(metaclass=abc.ABCMeta):
"""an abstract base class for finite automata"""
def __init__(self, states, symbols, transitions, initial_state,
final_states):
"""initialize a complete finite automaton"""
self.states = states
... | <commit_before>#!/usr/bin/env python3
import abc
class Automaton(metaclass=abc.ABCMeta):
def __init__(self, states, symbols, transitions, initial_state,
final_states):
"""initialize a complete finite automaton"""
self.states = states
self.symbols = symbols
self.t... | #!/usr/bin/env python3
import abc
class Automaton(metaclass=abc.ABCMeta):
"""an abstract base class for finite automata"""
def __init__(self, states, symbols, transitions, initial_state,
final_states):
"""initialize a complete finite automaton"""
self.states = states
... | #!/usr/bin/env python3
import abc
class Automaton(metaclass=abc.ABCMeta):
def __init__(self, states, symbols, transitions, initial_state,
final_states):
"""initialize a complete finite automaton"""
self.states = states
self.symbols = symbols
self.transitions = tr... | <commit_before>#!/usr/bin/env python3
import abc
class Automaton(metaclass=abc.ABCMeta):
def __init__(self, states, symbols, transitions, initial_state,
final_states):
"""initialize a complete finite automaton"""
self.states = states
self.symbols = symbols
self.t... |
f4bf48ef24a6d3fcb15c0c86da0cfb48f1533f68 | ctypeslib/test/stdio.py | ctypeslib/test/stdio.py | import os
from ctypeslib.dynamic_module import include
from ctypes import *
if os.name == "nt":
_libc = CDLL("msvcrt")
else:
_libc = CDLL(None)
include("""\
#include <stdio.h>
#ifdef _MSC_VER
# include <fcntl.h>
#else
# include <sys/fcntl.h>
#endif
""",
persist=False)
| import os
from ctypeslib.dynamic_module import include
from ctypes import *
if os.name == "nt":
_libc = CDLL("msvcrt")
else:
_libc = CDLL(None)
_gen_basename = include("""\
#include <stdio.h>
#ifdef _MSC_VER
# include <fcntl.h>
#else
# include <sys/fcntl.h>
#endif
/* Silly comment */
""",
persist=... | Store the basename of the generated files, to allow the unittests to clean up in the tearDown method. | Store the basename of the generated files, to allow the unittests to
clean up in the tearDown method.
git-svn-id: ac2c3632cb6543e7ab5fafd132c7fe15057a1882@52710 6015fed2-1504-0410-9fe1-9d1591cc4771
| Python | mit | luzfcb/ctypeslib,luzfcb/ctypeslib,luzfcb/ctypeslib,trolldbois/ctypeslib,trolldbois/ctypeslib,trolldbois/ctypeslib | import os
from ctypeslib.dynamic_module import include
from ctypes import *
if os.name == "nt":
_libc = CDLL("msvcrt")
else:
_libc = CDLL(None)
include("""\
#include <stdio.h>
#ifdef _MSC_VER
# include <fcntl.h>
#else
# include <sys/fcntl.h>
#endif
""",
persist=False)
Store the basename of the gene... | import os
from ctypeslib.dynamic_module import include
from ctypes import *
if os.name == "nt":
_libc = CDLL("msvcrt")
else:
_libc = CDLL(None)
_gen_basename = include("""\
#include <stdio.h>
#ifdef _MSC_VER
# include <fcntl.h>
#else
# include <sys/fcntl.h>
#endif
/* Silly comment */
""",
persist=... | <commit_before>import os
from ctypeslib.dynamic_module import include
from ctypes import *
if os.name == "nt":
_libc = CDLL("msvcrt")
else:
_libc = CDLL(None)
include("""\
#include <stdio.h>
#ifdef _MSC_VER
# include <fcntl.h>
#else
# include <sys/fcntl.h>
#endif
""",
persist=False)
<commit_msg>Sto... | import os
from ctypeslib.dynamic_module import include
from ctypes import *
if os.name == "nt":
_libc = CDLL("msvcrt")
else:
_libc = CDLL(None)
_gen_basename = include("""\
#include <stdio.h>
#ifdef _MSC_VER
# include <fcntl.h>
#else
# include <sys/fcntl.h>
#endif
/* Silly comment */
""",
persist=... | import os
from ctypeslib.dynamic_module import include
from ctypes import *
if os.name == "nt":
_libc = CDLL("msvcrt")
else:
_libc = CDLL(None)
include("""\
#include <stdio.h>
#ifdef _MSC_VER
# include <fcntl.h>
#else
# include <sys/fcntl.h>
#endif
""",
persist=False)
Store the basename of the gene... | <commit_before>import os
from ctypeslib.dynamic_module import include
from ctypes import *
if os.name == "nt":
_libc = CDLL("msvcrt")
else:
_libc = CDLL(None)
include("""\
#include <stdio.h>
#ifdef _MSC_VER
# include <fcntl.h>
#else
# include <sys/fcntl.h>
#endif
""",
persist=False)
<commit_msg>Sto... |
c0bebbfe9247e367382008d35e98de894038d7f4 | grazer/run.py | grazer/run.py | import click
import logging
from dotenv import load_dotenv, find_dotenv
from grazer.config import Config
from grazer.core import crawler
logger = logging.getLogger("Verata")
@click.command()
@click.option("--env", default=find_dotenv())
@click.option("--config")
@click.option("--log_level", default="INFO")
@click.o... | import click
import logging
from dotenv import load_dotenv, find_dotenv
from grazer.config import Config
from grazer.core import crawler
logger = logging.getLogger("Verata")
@click.command()
@click.option("--env", default=find_dotenv(), help="Environment file")
@click.option("--config", help="Configuration file")
@... | Make CLI params a bit clearer | Make CLI params a bit clearer
| Python | mit | CodersOfTheNight/verata | import click
import logging
from dotenv import load_dotenv, find_dotenv
from grazer.config import Config
from grazer.core import crawler
logger = logging.getLogger("Verata")
@click.command()
@click.option("--env", default=find_dotenv())
@click.option("--config")
@click.option("--log_level", default="INFO")
@click.o... | import click
import logging
from dotenv import load_dotenv, find_dotenv
from grazer.config import Config
from grazer.core import crawler
logger = logging.getLogger("Verata")
@click.command()
@click.option("--env", default=find_dotenv(), help="Environment file")
@click.option("--config", help="Configuration file")
@... | <commit_before>import click
import logging
from dotenv import load_dotenv, find_dotenv
from grazer.config import Config
from grazer.core import crawler
logger = logging.getLogger("Verata")
@click.command()
@click.option("--env", default=find_dotenv())
@click.option("--config")
@click.option("--log_level", default="... | import click
import logging
from dotenv import load_dotenv, find_dotenv
from grazer.config import Config
from grazer.core import crawler
logger = logging.getLogger("Verata")
@click.command()
@click.option("--env", default=find_dotenv(), help="Environment file")
@click.option("--config", help="Configuration file")
@... | import click
import logging
from dotenv import load_dotenv, find_dotenv
from grazer.config import Config
from grazer.core import crawler
logger = logging.getLogger("Verata")
@click.command()
@click.option("--env", default=find_dotenv())
@click.option("--config")
@click.option("--log_level", default="INFO")
@click.o... | <commit_before>import click
import logging
from dotenv import load_dotenv, find_dotenv
from grazer.config import Config
from grazer.core import crawler
logger = logging.getLogger("Verata")
@click.command()
@click.option("--env", default=find_dotenv())
@click.option("--config")
@click.option("--log_level", default="... |
0e522a5cb9e2967de2a6f03badbe62e1c9c201a9 | motobot/core_plugins/network_handlers.py | motobot/core_plugins/network_handlers.py | from motobot import hook
from time import sleep
@hook('PING')
def handle_ping(bot, message):
""" Handle the server's pings. """
bot.send('PONG :' + message.params[-1])
@hook('NOTICE')
def handle_notice(bot, message):
""" Use the notice message to identify and register to the server. """
if not bot.i... | from motobot import hook
from time import sleep
@hook('PING')
def handle_ping(bot, message):
""" Handle the server's pings. """
bot.send('PONG :' + message.params[-1])
@hook('439')
def handle_notice(bot, message):
""" Use the notice message to identify and register to the server. """
if not bot.iden... | Change connect command to 439 | Change connect command to 439
| Python | mit | Motoko11/MotoBot | from motobot import hook
from time import sleep
@hook('PING')
def handle_ping(bot, message):
""" Handle the server's pings. """
bot.send('PONG :' + message.params[-1])
@hook('NOTICE')
def handle_notice(bot, message):
""" Use the notice message to identify and register to the server. """
if not bot.i... | from motobot import hook
from time import sleep
@hook('PING')
def handle_ping(bot, message):
""" Handle the server's pings. """
bot.send('PONG :' + message.params[-1])
@hook('439')
def handle_notice(bot, message):
""" Use the notice message to identify and register to the server. """
if not bot.iden... | <commit_before>from motobot import hook
from time import sleep
@hook('PING')
def handle_ping(bot, message):
""" Handle the server's pings. """
bot.send('PONG :' + message.params[-1])
@hook('NOTICE')
def handle_notice(bot, message):
""" Use the notice message to identify and register to the server. """
... | from motobot import hook
from time import sleep
@hook('PING')
def handle_ping(bot, message):
""" Handle the server's pings. """
bot.send('PONG :' + message.params[-1])
@hook('439')
def handle_notice(bot, message):
""" Use the notice message to identify and register to the server. """
if not bot.iden... | from motobot import hook
from time import sleep
@hook('PING')
def handle_ping(bot, message):
""" Handle the server's pings. """
bot.send('PONG :' + message.params[-1])
@hook('NOTICE')
def handle_notice(bot, message):
""" Use the notice message to identify and register to the server. """
if not bot.i... | <commit_before>from motobot import hook
from time import sleep
@hook('PING')
def handle_ping(bot, message):
""" Handle the server's pings. """
bot.send('PONG :' + message.params[-1])
@hook('NOTICE')
def handle_notice(bot, message):
""" Use the notice message to identify and register to the server. """
... |
31544a73171c484ee57452d937f0ce040c2963be | wmtsproxy/setup.py | wmtsproxy/setup.py | #!/usr/bin/env python
from setuptools import setup, find_packages
setup(name='wmtsproxy',
version='0.1.2',
description='WMTSProxy makes WMS/WMTS layers available as WMTS',
author='Omniscale GmbH & Co. KG',
author_email='support@omniscale.de',
packages=find_packages(),
license='Apac... | #!/usr/bin/env python
from setuptools import setup, find_packages
setup(name='wmtsproxy',
version='0.2.0',
description='WMTSProxy makes WMS/WMTS layers available as WMTS',
author='Omniscale GmbH & Co. KG',
author_email='support@omniscale.de',
packages=find_packages(),
license='Apac... | Update new version following semver | Update new version following semver
| Python | apache-2.0 | CartoDB/wmtsproxy,CartoDB/wmtsproxy | #!/usr/bin/env python
from setuptools import setup, find_packages
setup(name='wmtsproxy',
version='0.1.2',
description='WMTSProxy makes WMS/WMTS layers available as WMTS',
author='Omniscale GmbH & Co. KG',
author_email='support@omniscale.de',
packages=find_packages(),
license='Apac... | #!/usr/bin/env python
from setuptools import setup, find_packages
setup(name='wmtsproxy',
version='0.2.0',
description='WMTSProxy makes WMS/WMTS layers available as WMTS',
author='Omniscale GmbH & Co. KG',
author_email='support@omniscale.de',
packages=find_packages(),
license='Apac... | <commit_before>#!/usr/bin/env python
from setuptools import setup, find_packages
setup(name='wmtsproxy',
version='0.1.2',
description='WMTSProxy makes WMS/WMTS layers available as WMTS',
author='Omniscale GmbH & Co. KG',
author_email='support@omniscale.de',
packages=find_packages(),
... | #!/usr/bin/env python
from setuptools import setup, find_packages
setup(name='wmtsproxy',
version='0.2.0',
description='WMTSProxy makes WMS/WMTS layers available as WMTS',
author='Omniscale GmbH & Co. KG',
author_email='support@omniscale.de',
packages=find_packages(),
license='Apac... | #!/usr/bin/env python
from setuptools import setup, find_packages
setup(name='wmtsproxy',
version='0.1.2',
description='WMTSProxy makes WMS/WMTS layers available as WMTS',
author='Omniscale GmbH & Co. KG',
author_email='support@omniscale.de',
packages=find_packages(),
license='Apac... | <commit_before>#!/usr/bin/env python
from setuptools import setup, find_packages
setup(name='wmtsproxy',
version='0.1.2',
description='WMTSProxy makes WMS/WMTS layers available as WMTS',
author='Omniscale GmbH & Co. KG',
author_email='support@omniscale.de',
packages=find_packages(),
... |
7f62587e099b9ef59731b6387030431b09f663f9 | bot_chucky/helpers.py | bot_chucky/helpers.py | """ Helper classes """
import facebook
import requests as r
class FacebookData:
def __init__(self, token):
"""
:param token: Facebook Page token
:param _api: Instance of the GraphAPI object
"""
self.token = token
self._api = facebook.GraphAPI(self.token)
def g... | """ Helper classes """
import facebook
import requests as r
class FacebookData:
def __init__(self, token):
"""
:param token: Facebook Page token
:param _api: Instance of the GraphAPI object
"""
self.token = token
self._api = facebook.GraphAPI(self.token)
def g... | Add StackOverFlowData, not completed yet | Add StackOverFlowData, not completed yet
| Python | mit | MichaelYusko/Bot-Chucky | """ Helper classes """
import facebook
import requests as r
class FacebookData:
def __init__(self, token):
"""
:param token: Facebook Page token
:param _api: Instance of the GraphAPI object
"""
self.token = token
self._api = facebook.GraphAPI(self.token)
def g... | """ Helper classes """
import facebook
import requests as r
class FacebookData:
def __init__(self, token):
"""
:param token: Facebook Page token
:param _api: Instance of the GraphAPI object
"""
self.token = token
self._api = facebook.GraphAPI(self.token)
def g... | <commit_before>""" Helper classes """
import facebook
import requests as r
class FacebookData:
def __init__(self, token):
"""
:param token: Facebook Page token
:param _api: Instance of the GraphAPI object
"""
self.token = token
self._api = facebook.GraphAPI(self.to... | """ Helper classes """
import facebook
import requests as r
class FacebookData:
def __init__(self, token):
"""
:param token: Facebook Page token
:param _api: Instance of the GraphAPI object
"""
self.token = token
self._api = facebook.GraphAPI(self.token)
def g... | """ Helper classes """
import facebook
import requests as r
class FacebookData:
def __init__(self, token):
"""
:param token: Facebook Page token
:param _api: Instance of the GraphAPI object
"""
self.token = token
self._api = facebook.GraphAPI(self.token)
def g... | <commit_before>""" Helper classes """
import facebook
import requests as r
class FacebookData:
def __init__(self, token):
"""
:param token: Facebook Page token
:param _api: Instance of the GraphAPI object
"""
self.token = token
self._api = facebook.GraphAPI(self.to... |
a45942894ace282883da3afa10f6739d30943764 | dewbrick/majesticapi.py | dewbrick/majesticapi.py | import argparse
import json
import os
import requests
BASE_URL = "https://api.majestic.com/api/json"
BASE_PARAMS = {'app_api_key': os.environ.get('THEAPIKEY')}
def get(cmd, params):
querydict = {'cmd': cmd}
querydict.update(BASE_PARAMS)
querydict.update(params)
response = requests.get(BASE_URL, para... | import argparse
import json
import os
import requests
BASE_URL = "https://api.majestic.com/api/json"
BASE_PARAMS = {'app_api_key': os.environ.get('THEAPIKEY')}
def get(cmd, params):
querydict = {'cmd': cmd}
querydict.update(BASE_PARAMS)
querydict.update(params)
response = requests.get(BASE_URL, para... | Handle multiple sites in single request. | Handle multiple sites in single request.
| Python | apache-2.0 | ohmygourd/dewbrick,ohmygourd/dewbrick,ohmygourd/dewbrick | import argparse
import json
import os
import requests
BASE_URL = "https://api.majestic.com/api/json"
BASE_PARAMS = {'app_api_key': os.environ.get('THEAPIKEY')}
def get(cmd, params):
querydict = {'cmd': cmd}
querydict.update(BASE_PARAMS)
querydict.update(params)
response = requests.get(BASE_URL, para... | import argparse
import json
import os
import requests
BASE_URL = "https://api.majestic.com/api/json"
BASE_PARAMS = {'app_api_key': os.environ.get('THEAPIKEY')}
def get(cmd, params):
querydict = {'cmd': cmd}
querydict.update(BASE_PARAMS)
querydict.update(params)
response = requests.get(BASE_URL, para... | <commit_before>import argparse
import json
import os
import requests
BASE_URL = "https://api.majestic.com/api/json"
BASE_PARAMS = {'app_api_key': os.environ.get('THEAPIKEY')}
def get(cmd, params):
querydict = {'cmd': cmd}
querydict.update(BASE_PARAMS)
querydict.update(params)
response = requests.get... | import argparse
import json
import os
import requests
BASE_URL = "https://api.majestic.com/api/json"
BASE_PARAMS = {'app_api_key': os.environ.get('THEAPIKEY')}
def get(cmd, params):
querydict = {'cmd': cmd}
querydict.update(BASE_PARAMS)
querydict.update(params)
response = requests.get(BASE_URL, para... | import argparse
import json
import os
import requests
BASE_URL = "https://api.majestic.com/api/json"
BASE_PARAMS = {'app_api_key': os.environ.get('THEAPIKEY')}
def get(cmd, params):
querydict = {'cmd': cmd}
querydict.update(BASE_PARAMS)
querydict.update(params)
response = requests.get(BASE_URL, para... | <commit_before>import argparse
import json
import os
import requests
BASE_URL = "https://api.majestic.com/api/json"
BASE_PARAMS = {'app_api_key': os.environ.get('THEAPIKEY')}
def get(cmd, params):
querydict = {'cmd': cmd}
querydict.update(BASE_PARAMS)
querydict.update(params)
response = requests.get... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.