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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
45bbd9c64fb19d22a04b19c3bc61081e38e154a3 | mail_corpus.py | mail_corpus.py | import sys
import mailbox
import mail_parser
import nltk
import itertools
try:
import cPickle as pickle
except ImportError:
import pickle
def main():
"""Extract the texts of emails from a specified mailbox and
from a specified set of senders and write corpus.txt.
Usage: python mail_corpus.py outpu... | import sys
import mailbox
import mail_parser
import nltk
import itertools
try:
import cPickle as pickle
except ImportError:
import pickle
def main():
"""Extract the texts of emails from a specified mailbox and
from a specified set of senders and write corpus.txt.
Usage: python mail_corpus.py mboxf... | Switch back to always write corpus.txt | Switch back to always write corpus.txt
| Python | mit | RawPlutonium/BaymaxKE | import sys
import mailbox
import mail_parser
import nltk
import itertools
try:
import cPickle as pickle
except ImportError:
import pickle
def main():
"""Extract the texts of emails from a specified mailbox and
from a specified set of senders and write corpus.txt.
Usage: python mail_corpus.py outpu... | import sys
import mailbox
import mail_parser
import nltk
import itertools
try:
import cPickle as pickle
except ImportError:
import pickle
def main():
"""Extract the texts of emails from a specified mailbox and
from a specified set of senders and write corpus.txt.
Usage: python mail_corpus.py mboxf... | <commit_before>import sys
import mailbox
import mail_parser
import nltk
import itertools
try:
import cPickle as pickle
except ImportError:
import pickle
def main():
"""Extract the texts of emails from a specified mailbox and
from a specified set of senders and write corpus.txt.
Usage: python mail_... | import sys
import mailbox
import mail_parser
import nltk
import itertools
try:
import cPickle as pickle
except ImportError:
import pickle
def main():
"""Extract the texts of emails from a specified mailbox and
from a specified set of senders and write corpus.txt.
Usage: python mail_corpus.py mboxf... | import sys
import mailbox
import mail_parser
import nltk
import itertools
try:
import cPickle as pickle
except ImportError:
import pickle
def main():
"""Extract the texts of emails from a specified mailbox and
from a specified set of senders and write corpus.txt.
Usage: python mail_corpus.py outpu... | <commit_before>import sys
import mailbox
import mail_parser
import nltk
import itertools
try:
import cPickle as pickle
except ImportError:
import pickle
def main():
"""Extract the texts of emails from a specified mailbox and
from a specified set of senders and write corpus.txt.
Usage: python mail_... |
458f402c1aafdccfeba287933b05baaa2bae3eb3 | model/oauth.py | model/oauth.py | # -*- encoding:utf8 -*-
import os
from oauth2client.client import OAuth2WebServerFlow
class OAuth:
def __init__(self):
pass
def get_flow(self):
scope = 'https://www.googleapis.com/auth/drive'
try:
client_id = os.environ['GOOGLE_CLIENT_ID']
client_secret = os... | # -*- encoding:utf8 -*-
import os
from oauth2client.client import OAuth2WebServerFlow
class OAuth:
def __init__(self):
pass
def get_flow(self):
scope = 'https://www.googleapis.com/auth/drive'
try:
client_id = os.environ['GOOGLE_CLIENT_ID']
client_secret = os... | Fix GoogleDrive OAuth callback URL in OAuth module. | Fix GoogleDrive OAuth callback URL in OAuth module.
| Python | mit | supistar/Botnyan | # -*- encoding:utf8 -*-
import os
from oauth2client.client import OAuth2WebServerFlow
class OAuth:
def __init__(self):
pass
def get_flow(self):
scope = 'https://www.googleapis.com/auth/drive'
try:
client_id = os.environ['GOOGLE_CLIENT_ID']
client_secret = os... | # -*- encoding:utf8 -*-
import os
from oauth2client.client import OAuth2WebServerFlow
class OAuth:
def __init__(self):
pass
def get_flow(self):
scope = 'https://www.googleapis.com/auth/drive'
try:
client_id = os.environ['GOOGLE_CLIENT_ID']
client_secret = os... | <commit_before># -*- encoding:utf8 -*-
import os
from oauth2client.client import OAuth2WebServerFlow
class OAuth:
def __init__(self):
pass
def get_flow(self):
scope = 'https://www.googleapis.com/auth/drive'
try:
client_id = os.environ['GOOGLE_CLIENT_ID']
cli... | # -*- encoding:utf8 -*-
import os
from oauth2client.client import OAuth2WebServerFlow
class OAuth:
def __init__(self):
pass
def get_flow(self):
scope = 'https://www.googleapis.com/auth/drive'
try:
client_id = os.environ['GOOGLE_CLIENT_ID']
client_secret = os... | # -*- encoding:utf8 -*-
import os
from oauth2client.client import OAuth2WebServerFlow
class OAuth:
def __init__(self):
pass
def get_flow(self):
scope = 'https://www.googleapis.com/auth/drive'
try:
client_id = os.environ['GOOGLE_CLIENT_ID']
client_secret = os... | <commit_before># -*- encoding:utf8 -*-
import os
from oauth2client.client import OAuth2WebServerFlow
class OAuth:
def __init__(self):
pass
def get_flow(self):
scope = 'https://www.googleapis.com/auth/drive'
try:
client_id = os.environ['GOOGLE_CLIENT_ID']
cli... |
8eb9360e575d57b2414468c8ec6c895baf239d63 | mwikiircbot.py | mwikiircbot.py | import ircbotframe
import sys
class Handler:
def __init__(self, host, port=6667, name="MediaWiki", description="MediaWiki recent changes bot", channels=[]):
self.channels = channels
self.bot = ircbotframe.ircBot(host, port, name, description)
self.bot.bind("376", self.endMOTD)
self.... | import ircbotframe
import sys
class Handler:
def __init__(self, host, port=6667, name="MediaWiki", description="MediaWiki recent changes bot", channels=[]):
self.channels = channels
self.bot = ircbotframe.ircBot(host, port, name, description)
self.bot.bind("376", self.endMOTD)
self.... | Remove unnecessary conditional in argument parsing | Remove unnecessary conditional in argument parsing | Python | mit | fenhl/mwikiircbot | import ircbotframe
import sys
class Handler:
def __init__(self, host, port=6667, name="MediaWiki", description="MediaWiki recent changes bot", channels=[]):
self.channels = channels
self.bot = ircbotframe.ircBot(host, port, name, description)
self.bot.bind("376", self.endMOTD)
self.... | import ircbotframe
import sys
class Handler:
def __init__(self, host, port=6667, name="MediaWiki", description="MediaWiki recent changes bot", channels=[]):
self.channels = channels
self.bot = ircbotframe.ircBot(host, port, name, description)
self.bot.bind("376", self.endMOTD)
self.... | <commit_before>import ircbotframe
import sys
class Handler:
def __init__(self, host, port=6667, name="MediaWiki", description="MediaWiki recent changes bot", channels=[]):
self.channels = channels
self.bot = ircbotframe.ircBot(host, port, name, description)
self.bot.bind("376", self.endMOTD... | import ircbotframe
import sys
class Handler:
def __init__(self, host, port=6667, name="MediaWiki", description="MediaWiki recent changes bot", channels=[]):
self.channels = channels
self.bot = ircbotframe.ircBot(host, port, name, description)
self.bot.bind("376", self.endMOTD)
self.... | import ircbotframe
import sys
class Handler:
def __init__(self, host, port=6667, name="MediaWiki", description="MediaWiki recent changes bot", channels=[]):
self.channels = channels
self.bot = ircbotframe.ircBot(host, port, name, description)
self.bot.bind("376", self.endMOTD)
self.... | <commit_before>import ircbotframe
import sys
class Handler:
def __init__(self, host, port=6667, name="MediaWiki", description="MediaWiki recent changes bot", channels=[]):
self.channels = channels
self.bot = ircbotframe.ircBot(host, port, name, description)
self.bot.bind("376", self.endMOTD... |
3fd7c331273f9fadacae1fcb0ff51b9817b009e3 | telethon/network/connection/tcpfull.py | telethon/network/connection/tcpfull.py | import struct
from zlib import crc32
from .connection import Connection
from ...errors import InvalidChecksumError
class ConnectionTcpFull(Connection):
"""
Default Telegram mode. Sends 12 additional bytes and
needs to calculate the CRC value of the packet itself.
"""
def __init__(self, ip, port, ... | import struct
from zlib import crc32
from .connection import Connection
from ...errors import InvalidChecksumError
class ConnectionTcpFull(Connection):
"""
Default Telegram mode. Sends 12 additional bytes and
needs to calculate the CRC value of the packet itself.
"""
def __init__(self, ip, port, ... | Fix automatic reconnect (e.g. on bad auth key) | Fix automatic reconnect (e.g. on bad auth key)
This took more time than it should have to debug.
| Python | mit | LonamiWebs/Telethon,expectocode/Telethon,LonamiWebs/Telethon,LonamiWebs/Telethon,LonamiWebs/Telethon | import struct
from zlib import crc32
from .connection import Connection
from ...errors import InvalidChecksumError
class ConnectionTcpFull(Connection):
"""
Default Telegram mode. Sends 12 additional bytes and
needs to calculate the CRC value of the packet itself.
"""
def __init__(self, ip, port, ... | import struct
from zlib import crc32
from .connection import Connection
from ...errors import InvalidChecksumError
class ConnectionTcpFull(Connection):
"""
Default Telegram mode. Sends 12 additional bytes and
needs to calculate the CRC value of the packet itself.
"""
def __init__(self, ip, port, ... | <commit_before>import struct
from zlib import crc32
from .connection import Connection
from ...errors import InvalidChecksumError
class ConnectionTcpFull(Connection):
"""
Default Telegram mode. Sends 12 additional bytes and
needs to calculate the CRC value of the packet itself.
"""
def __init__(s... | import struct
from zlib import crc32
from .connection import Connection
from ...errors import InvalidChecksumError
class ConnectionTcpFull(Connection):
"""
Default Telegram mode. Sends 12 additional bytes and
needs to calculate the CRC value of the packet itself.
"""
def __init__(self, ip, port, ... | import struct
from zlib import crc32
from .connection import Connection
from ...errors import InvalidChecksumError
class ConnectionTcpFull(Connection):
"""
Default Telegram mode. Sends 12 additional bytes and
needs to calculate the CRC value of the packet itself.
"""
def __init__(self, ip, port, ... | <commit_before>import struct
from zlib import crc32
from .connection import Connection
from ...errors import InvalidChecksumError
class ConnectionTcpFull(Connection):
"""
Default Telegram mode. Sends 12 additional bytes and
needs to calculate the CRC value of the packet itself.
"""
def __init__(s... |
7435d508ae95c69dcb596e74f62bfb030011201f | tests/general/test_required_folders.py | tests/general/test_required_folders.py | """ Test that the All Mail folder is enabled for Gmail. """
import pytest
from inbox.auth.gmail import GmailAuthHandler
from inbox.basicauth import GmailSettingError
from inbox.crispin import GmailCrispinClient
class AccountStub(object):
id = 0
email_address = 'bob@bob.com'
access_token = None
imap_e... | """ Test that the All Mail folder is enabled for Gmail. """
import pytest
from inbox.auth.gmail import GmailAuthHandler
from inbox.basicauth import GmailSettingError
from inbox.crispin import GmailCrispinClient
class AccountStub(object):
id = 0
email_address = 'bob@bob.com'
access_token = None
imap_e... | Update mock Account in tests. | Update mock Account in tests.
| Python | agpl-3.0 | jobscore/sync-engine,jobscore/sync-engine,nylas/sync-engine,closeio/nylas,jobscore/sync-engine,nylas/sync-engine,closeio/nylas,jobscore/sync-engine,closeio/nylas,nylas/sync-engine,nylas/sync-engine,closeio/nylas | """ Test that the All Mail folder is enabled for Gmail. """
import pytest
from inbox.auth.gmail import GmailAuthHandler
from inbox.basicauth import GmailSettingError
from inbox.crispin import GmailCrispinClient
class AccountStub(object):
id = 0
email_address = 'bob@bob.com'
access_token = None
imap_e... | """ Test that the All Mail folder is enabled for Gmail. """
import pytest
from inbox.auth.gmail import GmailAuthHandler
from inbox.basicauth import GmailSettingError
from inbox.crispin import GmailCrispinClient
class AccountStub(object):
id = 0
email_address = 'bob@bob.com'
access_token = None
imap_e... | <commit_before>""" Test that the All Mail folder is enabled for Gmail. """
import pytest
from inbox.auth.gmail import GmailAuthHandler
from inbox.basicauth import GmailSettingError
from inbox.crispin import GmailCrispinClient
class AccountStub(object):
id = 0
email_address = 'bob@bob.com'
access_token = ... | """ Test that the All Mail folder is enabled for Gmail. """
import pytest
from inbox.auth.gmail import GmailAuthHandler
from inbox.basicauth import GmailSettingError
from inbox.crispin import GmailCrispinClient
class AccountStub(object):
id = 0
email_address = 'bob@bob.com'
access_token = None
imap_e... | """ Test that the All Mail folder is enabled for Gmail. """
import pytest
from inbox.auth.gmail import GmailAuthHandler
from inbox.basicauth import GmailSettingError
from inbox.crispin import GmailCrispinClient
class AccountStub(object):
id = 0
email_address = 'bob@bob.com'
access_token = None
imap_e... | <commit_before>""" Test that the All Mail folder is enabled for Gmail. """
import pytest
from inbox.auth.gmail import GmailAuthHandler
from inbox.basicauth import GmailSettingError
from inbox.crispin import GmailCrispinClient
class AccountStub(object):
id = 0
email_address = 'bob@bob.com'
access_token = ... |
d72882dfa24e1dfd8d1b85103cbc5388e4af3266 | api/base/exceptions.py | api/base/exceptions.py |
from rest_framework import status
from rest_framework.exceptions import APIException
def json_api_exception_handler(exc, context):
""" Custom exception handler that returns errors object as an array """
# Import inside method to avoid errors when the OSF is loaded without Django
from rest_framework.view... |
from rest_framework import status
from rest_framework.exceptions import APIException
def json_api_exception_handler(exc, context):
""" Custom exception handler that returns errors object as an array """
# Import inside method to avoid errors when the OSF is loaded without Django
from rest_framework.view... | Handle case for error formatting where errors are a list of dictionaries (as you would see in bulk create). | Handle case for error formatting where errors are a list of dictionaries (as you would see in bulk create).
| Python | apache-2.0 | jnayak1/osf.io,caneruguz/osf.io,HalcyonChimera/osf.io,abought/osf.io,SSJohns/osf.io,alexschiller/osf.io,brianjgeiger/osf.io,baylee-d/osf.io,GageGaskins/osf.io,cwisecarver/osf.io,TomHeatwole/osf.io,baylee-d/osf.io,felliott/osf.io,caseyrygt/osf.io,asanfilippo7/osf.io,Johnetordoff/osf.io,samchrisinger/osf.io,cslzchen/osf.... |
from rest_framework import status
from rest_framework.exceptions import APIException
def json_api_exception_handler(exc, context):
""" Custom exception handler that returns errors object as an array """
# Import inside method to avoid errors when the OSF is loaded without Django
from rest_framework.view... |
from rest_framework import status
from rest_framework.exceptions import APIException
def json_api_exception_handler(exc, context):
""" Custom exception handler that returns errors object as an array """
# Import inside method to avoid errors when the OSF is loaded without Django
from rest_framework.view... | <commit_before>
from rest_framework import status
from rest_framework.exceptions import APIException
def json_api_exception_handler(exc, context):
""" Custom exception handler that returns errors object as an array """
# Import inside method to avoid errors when the OSF is loaded without Django
from rest... |
from rest_framework import status
from rest_framework.exceptions import APIException
def json_api_exception_handler(exc, context):
""" Custom exception handler that returns errors object as an array """
# Import inside method to avoid errors when the OSF is loaded without Django
from rest_framework.view... |
from rest_framework import status
from rest_framework.exceptions import APIException
def json_api_exception_handler(exc, context):
""" Custom exception handler that returns errors object as an array """
# Import inside method to avoid errors when the OSF is loaded without Django
from rest_framework.view... | <commit_before>
from rest_framework import status
from rest_framework.exceptions import APIException
def json_api_exception_handler(exc, context):
""" Custom exception handler that returns errors object as an array """
# Import inside method to avoid errors when the OSF is loaded without Django
from rest... |
5c52fca74c061bad6625fb93ce920eccdf4741de | tabpy-server/setup.py | tabpy-server/setup.py | import versioneer
try:
from setuptools import setup
except ImportError as err:
print("Missing Python module requirement: setuptools.")
raise err
setup(
name='tabpy-server',
version=versioneer.get_version(),
description='Web server Tableau uses to run Python scripts.',
url='https://github.c... | import versioneer
try:
from setuptools import setup
except ImportError as err:
print("Missing Python module requirement: setuptools.")
raise err
setup(
name='tabpy-server',
version=versioneer.get_version(),
description='Web server Tableau uses to run Python scripts.',
url='https://github.c... | Address TODO comments in code | Address TODO comments in code
| Python | mit | tableau/TabPy,tableau/TabPy,tableau/TabPy | import versioneer
try:
from setuptools import setup
except ImportError as err:
print("Missing Python module requirement: setuptools.")
raise err
setup(
name='tabpy-server',
version=versioneer.get_version(),
description='Web server Tableau uses to run Python scripts.',
url='https://github.c... | import versioneer
try:
from setuptools import setup
except ImportError as err:
print("Missing Python module requirement: setuptools.")
raise err
setup(
name='tabpy-server',
version=versioneer.get_version(),
description='Web server Tableau uses to run Python scripts.',
url='https://github.c... | <commit_before>import versioneer
try:
from setuptools import setup
except ImportError as err:
print("Missing Python module requirement: setuptools.")
raise err
setup(
name='tabpy-server',
version=versioneer.get_version(),
description='Web server Tableau uses to run Python scripts.',
url='h... | import versioneer
try:
from setuptools import setup
except ImportError as err:
print("Missing Python module requirement: setuptools.")
raise err
setup(
name='tabpy-server',
version=versioneer.get_version(),
description='Web server Tableau uses to run Python scripts.',
url='https://github.c... | import versioneer
try:
from setuptools import setup
except ImportError as err:
print("Missing Python module requirement: setuptools.")
raise err
setup(
name='tabpy-server',
version=versioneer.get_version(),
description='Web server Tableau uses to run Python scripts.',
url='https://github.c... | <commit_before>import versioneer
try:
from setuptools import setup
except ImportError as err:
print("Missing Python module requirement: setuptools.")
raise err
setup(
name='tabpy-server',
version=versioneer.get_version(),
description='Web server Tableau uses to run Python scripts.',
url='h... |
79d7ba8e3b590bc4ecdc4ae2b8808f14093902d0 | pikos/logging.py | pikos/logging.py | from __future__ import absolute_import
import inspect
import os
import sys
import psutil
from collections import namedtuple
from functools import wraps
from pikos.abstract_monitors import AbstractMonitor
__all__ = [
'FunctionLogger',
'FunctionRecord',
]
FunctionRecord = namedtuple('FunctionRecord',
... | from __future__ import absolute_import
import inspect
from collections import namedtuple
from pikos._profile_functions import ProfileFunctions
from pikos._trace_functions import TraceFunctions
__all__ = [
'FunctionLogger',
'FunctionRecord',
]
FunctionRecord = namedtuple('FunctionRecord',
... | Make the FunctionLogger a context manager | Make the FunctionLogger a context manager
| Python | bsd-3-clause | enthought/pikos,enthought/pikos,enthought/pikos | from __future__ import absolute_import
import inspect
import os
import sys
import psutil
from collections import namedtuple
from functools import wraps
from pikos.abstract_monitors import AbstractMonitor
__all__ = [
'FunctionLogger',
'FunctionRecord',
]
FunctionRecord = namedtuple('FunctionRecord',
... | from __future__ import absolute_import
import inspect
from collections import namedtuple
from pikos._profile_functions import ProfileFunctions
from pikos._trace_functions import TraceFunctions
__all__ = [
'FunctionLogger',
'FunctionRecord',
]
FunctionRecord = namedtuple('FunctionRecord',
... | <commit_before>from __future__ import absolute_import
import inspect
import os
import sys
import psutil
from collections import namedtuple
from functools import wraps
from pikos.abstract_monitors import AbstractMonitor
__all__ = [
'FunctionLogger',
'FunctionRecord',
]
FunctionRecord = namedtuple('FunctionRec... | from __future__ import absolute_import
import inspect
from collections import namedtuple
from pikos._profile_functions import ProfileFunctions
from pikos._trace_functions import TraceFunctions
__all__ = [
'FunctionLogger',
'FunctionRecord',
]
FunctionRecord = namedtuple('FunctionRecord',
... | from __future__ import absolute_import
import inspect
import os
import sys
import psutil
from collections import namedtuple
from functools import wraps
from pikos.abstract_monitors import AbstractMonitor
__all__ = [
'FunctionLogger',
'FunctionRecord',
]
FunctionRecord = namedtuple('FunctionRecord',
... | <commit_before>from __future__ import absolute_import
import inspect
import os
import sys
import psutil
from collections import namedtuple
from functools import wraps
from pikos.abstract_monitors import AbstractMonitor
__all__ = [
'FunctionLogger',
'FunctionRecord',
]
FunctionRecord = namedtuple('FunctionRec... |
f2e0136fe617ff3948b47daa7c35102076deb671 | peering/api/urls.py | peering/api/urls.py | from rest_framework import routers
from . import views
class PeeringRootView(routers.APIRootView):
"""
Peering API root view
"""
def get_view_name(self):
return "Peering"
router = routers.DefaultRouter()
router.APIRootView = PeeringRootView
router.register(r"_choices", views.PeeringFieldC... | from rest_framework import routers
from . import views
class PeeringRootView(routers.APIRootView):
"""
Peering API root view
"""
def get_view_name(self):
return "Peering"
router = routers.DefaultRouter()
router.APIRootView = PeeringRootView
router.register(r"_choices", views.PeeringFieldC... | Fix typo in API URLs. | Fix typo in API URLs.
| Python | apache-2.0 | respawner/peering-manager,respawner/peering-manager,respawner/peering-manager,respawner/peering-manager | from rest_framework import routers
from . import views
class PeeringRootView(routers.APIRootView):
"""
Peering API root view
"""
def get_view_name(self):
return "Peering"
router = routers.DefaultRouter()
router.APIRootView = PeeringRootView
router.register(r"_choices", views.PeeringFieldC... | from rest_framework import routers
from . import views
class PeeringRootView(routers.APIRootView):
"""
Peering API root view
"""
def get_view_name(self):
return "Peering"
router = routers.DefaultRouter()
router.APIRootView = PeeringRootView
router.register(r"_choices", views.PeeringFieldC... | <commit_before>from rest_framework import routers
from . import views
class PeeringRootView(routers.APIRootView):
"""
Peering API root view
"""
def get_view_name(self):
return "Peering"
router = routers.DefaultRouter()
router.APIRootView = PeeringRootView
router.register(r"_choices", view... | from rest_framework import routers
from . import views
class PeeringRootView(routers.APIRootView):
"""
Peering API root view
"""
def get_view_name(self):
return "Peering"
router = routers.DefaultRouter()
router.APIRootView = PeeringRootView
router.register(r"_choices", views.PeeringFieldC... | from rest_framework import routers
from . import views
class PeeringRootView(routers.APIRootView):
"""
Peering API root view
"""
def get_view_name(self):
return "Peering"
router = routers.DefaultRouter()
router.APIRootView = PeeringRootView
router.register(r"_choices", views.PeeringFieldC... | <commit_before>from rest_framework import routers
from . import views
class PeeringRootView(routers.APIRootView):
"""
Peering API root view
"""
def get_view_name(self):
return "Peering"
router = routers.DefaultRouter()
router.APIRootView = PeeringRootView
router.register(r"_choices", view... |
b9654ffbbd1c2057d1ff377a0190b115f568d080 | knights/defaulttags.py | knights/defaulttags.py | from .library import Library
import datetime
register = Library()
@register.tag(name='now')
def now(parser, token):
args, kwargs = parser.parse_args(token)
def _now(context):
a, k = parser.resolve_args(context, args, kwargs)
val = datetime.datetime.now()
return val.strftime(a[0])
... | from .library import Library
from .parse import BasicNode
import datetime
register = Library()
@register.tag(name='now')
class NowNode(BasicNode):
def render(self, fmt):
val = datetime.datetime.now()
return val.strftime(fmt)
| Rewrite 'now' tag to use BasicNode | Rewrite 'now' tag to use BasicNode
| Python | mit | funkybob/knights-templater,funkybob/knights-templater | from .library import Library
import datetime
register = Library()
@register.tag(name='now')
def now(parser, token):
args, kwargs = parser.parse_args(token)
def _now(context):
a, k = parser.resolve_args(context, args, kwargs)
val = datetime.datetime.now()
return val.strftime(a[0])
... | from .library import Library
from .parse import BasicNode
import datetime
register = Library()
@register.tag(name='now')
class NowNode(BasicNode):
def render(self, fmt):
val = datetime.datetime.now()
return val.strftime(fmt)
| <commit_before>from .library import Library
import datetime
register = Library()
@register.tag(name='now')
def now(parser, token):
args, kwargs = parser.parse_args(token)
def _now(context):
a, k = parser.resolve_args(context, args, kwargs)
val = datetime.datetime.now()
return val.s... | from .library import Library
from .parse import BasicNode
import datetime
register = Library()
@register.tag(name='now')
class NowNode(BasicNode):
def render(self, fmt):
val = datetime.datetime.now()
return val.strftime(fmt)
| from .library import Library
import datetime
register = Library()
@register.tag(name='now')
def now(parser, token):
args, kwargs = parser.parse_args(token)
def _now(context):
a, k = parser.resolve_args(context, args, kwargs)
val = datetime.datetime.now()
return val.strftime(a[0])
... | <commit_before>from .library import Library
import datetime
register = Library()
@register.tag(name='now')
def now(parser, token):
args, kwargs = parser.parse_args(token)
def _now(context):
a, k = parser.resolve_args(context, args, kwargs)
val = datetime.datetime.now()
return val.s... |
d610e03ef113d37d516bd9432bd3f43f3d443563 | tests/test_commands.py | tests/test_commands.py | import os
from subprocess import call
import unittest
from testpath.commands import *
class CommandsTests(unittest.TestCase):
def test_assert_calls(self):
initial_path = os.environ['PATH']
with assert_calls('foobar'):
call(['foobar'])
with self.assertR... | import os
from subprocess import call
import unittest
from testpath.commands import *
class CommandsTests(unittest.TestCase):
def test_assert_calls(self):
initial_path = os.environ['PATH']
with assert_calls('foobar'):
call(['foobar'])
with self.assertR... | Add failing test for gh-5 | Add failing test for gh-5
| Python | bsd-3-clause | jupyter/testpath | import os
from subprocess import call
import unittest
from testpath.commands import *
class CommandsTests(unittest.TestCase):
def test_assert_calls(self):
initial_path = os.environ['PATH']
with assert_calls('foobar'):
call(['foobar'])
with self.assertR... | import os
from subprocess import call
import unittest
from testpath.commands import *
class CommandsTests(unittest.TestCase):
def test_assert_calls(self):
initial_path = os.environ['PATH']
with assert_calls('foobar'):
call(['foobar'])
with self.assertR... | <commit_before>import os
from subprocess import call
import unittest
from testpath.commands import *
class CommandsTests(unittest.TestCase):
def test_assert_calls(self):
initial_path = os.environ['PATH']
with assert_calls('foobar'):
call(['foobar'])
wi... | import os
from subprocess import call
import unittest
from testpath.commands import *
class CommandsTests(unittest.TestCase):
def test_assert_calls(self):
initial_path = os.environ['PATH']
with assert_calls('foobar'):
call(['foobar'])
with self.assertR... | import os
from subprocess import call
import unittest
from testpath.commands import *
class CommandsTests(unittest.TestCase):
def test_assert_calls(self):
initial_path = os.environ['PATH']
with assert_calls('foobar'):
call(['foobar'])
with self.assertR... | <commit_before>import os
from subprocess import call
import unittest
from testpath.commands import *
class CommandsTests(unittest.TestCase):
def test_assert_calls(self):
initial_path = os.environ['PATH']
with assert_calls('foobar'):
call(['foobar'])
wi... |
ae2b253289191b41b602f6d31865b2f8806b6eb3 | scikits/image/__init__.py | scikits/image/__init__.py | """Image Processing SciKit (Toolbox for SciPy)"""
import os.path as _osp
data_dir = _osp.join(_osp.dirname(__file__), 'data')
from version import version as __version__
def _setup_test():
import functools
basedir = _osp.dirname(_osp.join(__file__, '../'))
args = ['', '--exe', '-w', '%s' % basedir]
... | """Image Processing SciKit (Toolbox for SciPy)"""
import os.path as _osp
data_dir = _osp.abspath(_osp.join(_osp.dirname(__file__), 'data'))
from version import version as __version__
def _setup_test():
import functools
basedir = _osp.dirname(_osp.join(__file__, '../'))
args = ['', '--exe', '-w', '%s' ... | Use absolute path for scikits.image.data_dir. | Use absolute path for scikits.image.data_dir.
| Python | bsd-3-clause | WarrenWeckesser/scikits-image,blink1073/scikit-image,Britefury/scikit-image,michaelpacer/scikit-image,GaelVaroquaux/scikits.image,ajaybhat/scikit-image,SamHames/scikit-image,ofgulban/scikit-image,emmanuelle/scikits.image,almarklein/scikit-image,chintak/scikit-image,robintw/scikit-image,oew1v07/scikit-image,ofgulban/sci... | """Image Processing SciKit (Toolbox for SciPy)"""
import os.path as _osp
data_dir = _osp.join(_osp.dirname(__file__), 'data')
from version import version as __version__
def _setup_test():
import functools
basedir = _osp.dirname(_osp.join(__file__, '../'))
args = ['', '--exe', '-w', '%s' % basedir]
... | """Image Processing SciKit (Toolbox for SciPy)"""
import os.path as _osp
data_dir = _osp.abspath(_osp.join(_osp.dirname(__file__), 'data'))
from version import version as __version__
def _setup_test():
import functools
basedir = _osp.dirname(_osp.join(__file__, '../'))
args = ['', '--exe', '-w', '%s' ... | <commit_before>"""Image Processing SciKit (Toolbox for SciPy)"""
import os.path as _osp
data_dir = _osp.join(_osp.dirname(__file__), 'data')
from version import version as __version__
def _setup_test():
import functools
basedir = _osp.dirname(_osp.join(__file__, '../'))
args = ['', '--exe', '-w', '%s'... | """Image Processing SciKit (Toolbox for SciPy)"""
import os.path as _osp
data_dir = _osp.abspath(_osp.join(_osp.dirname(__file__), 'data'))
from version import version as __version__
def _setup_test():
import functools
basedir = _osp.dirname(_osp.join(__file__, '../'))
args = ['', '--exe', '-w', '%s' ... | """Image Processing SciKit (Toolbox for SciPy)"""
import os.path as _osp
data_dir = _osp.join(_osp.dirname(__file__), 'data')
from version import version as __version__
def _setup_test():
import functools
basedir = _osp.dirname(_osp.join(__file__, '../'))
args = ['', '--exe', '-w', '%s' % basedir]
... | <commit_before>"""Image Processing SciKit (Toolbox for SciPy)"""
import os.path as _osp
data_dir = _osp.join(_osp.dirname(__file__), 'data')
from version import version as __version__
def _setup_test():
import functools
basedir = _osp.dirname(_osp.join(__file__, '../'))
args = ['', '--exe', '-w', '%s'... |
7a8c29ddabb31c16e908552fb0dd8558a4700b41 | tests/test_fields.py | tests/test_fields.py | import moarjson as json
class User(object):
def __init__(self, first_name, last_name):
self.first_name = first_name
self.last_name = last_name
def full_name(self):
return '{} {}'.format(self.first_name, self.last_name)
json.register_with_fields(User, ('first_name', 'last_name', 'fu... | import moarjson as json
class User(object):
def __init__(self, first_name, last_name):
self.first_name = first_name
self.last_name = last_name
def full_name(self):
return '{0} {1}'.format(self.first_name, self.last_name)
json.register_with_fields(User, ('first_name', 'last_name', '... | Make test compatible with Python 2.6 | Make test compatible with Python 2.6
| Python | mit | bulv1ne/moarjson,bulv1ne/moarjson | import moarjson as json
class User(object):
def __init__(self, first_name, last_name):
self.first_name = first_name
self.last_name = last_name
def full_name(self):
return '{} {}'.format(self.first_name, self.last_name)
json.register_with_fields(User, ('first_name', 'last_name', 'fu... | import moarjson as json
class User(object):
def __init__(self, first_name, last_name):
self.first_name = first_name
self.last_name = last_name
def full_name(self):
return '{0} {1}'.format(self.first_name, self.last_name)
json.register_with_fields(User, ('first_name', 'last_name', '... | <commit_before>import moarjson as json
class User(object):
def __init__(self, first_name, last_name):
self.first_name = first_name
self.last_name = last_name
def full_name(self):
return '{} {}'.format(self.first_name, self.last_name)
json.register_with_fields(User, ('first_name', '... | import moarjson as json
class User(object):
def __init__(self, first_name, last_name):
self.first_name = first_name
self.last_name = last_name
def full_name(self):
return '{0} {1}'.format(self.first_name, self.last_name)
json.register_with_fields(User, ('first_name', 'last_name', '... | import moarjson as json
class User(object):
def __init__(self, first_name, last_name):
self.first_name = first_name
self.last_name = last_name
def full_name(self):
return '{} {}'.format(self.first_name, self.last_name)
json.register_with_fields(User, ('first_name', 'last_name', 'fu... | <commit_before>import moarjson as json
class User(object):
def __init__(self, first_name, last_name):
self.first_name = first_name
self.last_name = last_name
def full_name(self):
return '{} {}'.format(self.first_name, self.last_name)
json.register_with_fields(User, ('first_name', '... |
1977ab5bd97feb114dedd1619c89413f109f0480 | tests/validate_test.py | tests/validate_test.py | from pytest import raises
from nirum.validate import (validate_boxed_type, validate_record_type,
validate_union_type)
def test_validate_boxed_type():
assert validate_boxed_type(3.14, float)
with raises(TypeError):
validate_boxed_type('hello', float)
def test_validate_rec... | from pytest import raises
from nirum.validate import (validate_boxed_type, validate_record_type,
validate_union_type)
def test_validate_boxed_type():
assert validate_boxed_type(3.14, float)
with raises(TypeError):
validate_boxed_type('hello', float)
def test_validate_rec... | Remove assert in error-rasing test | Remove assert in error-rasing test
| Python | mit | spoqa/nirum-python,spoqa/nirum-python | from pytest import raises
from nirum.validate import (validate_boxed_type, validate_record_type,
validate_union_type)
def test_validate_boxed_type():
assert validate_boxed_type(3.14, float)
with raises(TypeError):
validate_boxed_type('hello', float)
def test_validate_rec... | from pytest import raises
from nirum.validate import (validate_boxed_type, validate_record_type,
validate_union_type)
def test_validate_boxed_type():
assert validate_boxed_type(3.14, float)
with raises(TypeError):
validate_boxed_type('hello', float)
def test_validate_rec... | <commit_before>from pytest import raises
from nirum.validate import (validate_boxed_type, validate_record_type,
validate_union_type)
def test_validate_boxed_type():
assert validate_boxed_type(3.14, float)
with raises(TypeError):
validate_boxed_type('hello', float)
def te... | from pytest import raises
from nirum.validate import (validate_boxed_type, validate_record_type,
validate_union_type)
def test_validate_boxed_type():
assert validate_boxed_type(3.14, float)
with raises(TypeError):
validate_boxed_type('hello', float)
def test_validate_rec... | from pytest import raises
from nirum.validate import (validate_boxed_type, validate_record_type,
validate_union_type)
def test_validate_boxed_type():
assert validate_boxed_type(3.14, float)
with raises(TypeError):
validate_boxed_type('hello', float)
def test_validate_rec... | <commit_before>from pytest import raises
from nirum.validate import (validate_boxed_type, validate_record_type,
validate_union_type)
def test_validate_boxed_type():
assert validate_boxed_type(3.14, float)
with raises(TypeError):
validate_boxed_type('hello', float)
def te... |
8c116adaf0f571a4843173951880bd77bef702bb | django_enumfield/fields.py | django_enumfield/fields.py | from django.db import models
class EnumField(models.Field):
__metaclass__ = models.SubfieldBase
def __init__(self, enumeration, *args, **kwargs):
self.enumeration = enumeration
kwargs.setdefault('choices', enumeration.get_choices())
super(EnumField, self).__init__(*args, **kwargs)
... | from django.db import models
class EnumField(models.Field):
__metaclass__ = models.SubfieldBase
def __init__(self, enumeration, *args, **kwargs):
self.enumeration = enumeration
kwargs.setdefault('choices', enumeration.get_choices())
super(EnumField, self).__init__(*args, **kwargs)
... | Correct path in South triple definition. | Correct path in South triple definition.
| Python | bsd-3-clause | playfire/django-enumfield | from django.db import models
class EnumField(models.Field):
__metaclass__ = models.SubfieldBase
def __init__(self, enumeration, *args, **kwargs):
self.enumeration = enumeration
kwargs.setdefault('choices', enumeration.get_choices())
super(EnumField, self).__init__(*args, **kwargs)
... | from django.db import models
class EnumField(models.Field):
__metaclass__ = models.SubfieldBase
def __init__(self, enumeration, *args, **kwargs):
self.enumeration = enumeration
kwargs.setdefault('choices', enumeration.get_choices())
super(EnumField, self).__init__(*args, **kwargs)
... | <commit_before>from django.db import models
class EnumField(models.Field):
__metaclass__ = models.SubfieldBase
def __init__(self, enumeration, *args, **kwargs):
self.enumeration = enumeration
kwargs.setdefault('choices', enumeration.get_choices())
super(EnumField, self).__init__(*args... | from django.db import models
class EnumField(models.Field):
__metaclass__ = models.SubfieldBase
def __init__(self, enumeration, *args, **kwargs):
self.enumeration = enumeration
kwargs.setdefault('choices', enumeration.get_choices())
super(EnumField, self).__init__(*args, **kwargs)
... | from django.db import models
class EnumField(models.Field):
__metaclass__ = models.SubfieldBase
def __init__(self, enumeration, *args, **kwargs):
self.enumeration = enumeration
kwargs.setdefault('choices', enumeration.get_choices())
super(EnumField, self).__init__(*args, **kwargs)
... | <commit_before>from django.db import models
class EnumField(models.Field):
__metaclass__ = models.SubfieldBase
def __init__(self, enumeration, *args, **kwargs):
self.enumeration = enumeration
kwargs.setdefault('choices', enumeration.get_choices())
super(EnumField, self).__init__(*args... |
b912c1a508640c7c351ed1d945bfeebdaa995332 | djcelery/management/commands/celeryd.py | djcelery/management/commands/celeryd.py | """
Start the celery daemon from the Django management command.
"""
from __future__ import absolute_import, unicode_literals
from celery.bin import worker
from djcelery.app import app
from djcelery.management.base import CeleryCommand
worker = worker.worker(app=app)
class Command(CeleryCommand):
"""Run the c... | """
Start the celery daemon from the Django management command.
"""
from __future__ import absolute_import, unicode_literals
from celery.bin import worker
from djcelery.app import app
from djcelery.management.base import CeleryCommand
worker = worker.worker(app=app)
class Command(CeleryCommand):
"""Run the c... | Add requested call to check_args. | Add requested call to check_args.
| Python | bsd-3-clause | Amanit/django-celery,digimarc/django-celery,iris-edu-int/django-celery,axiom-data-science/django-celery,celery/django-celery,CloudNcodeInc/django-celery,Amanit/django-celery,axiom-data-science/django-celery,georgewhewell/django-celery,CloudNcodeInc/django-celery,iris-edu-int/django-celery,digimarc/django-celery,celery/... | """
Start the celery daemon from the Django management command.
"""
from __future__ import absolute_import, unicode_literals
from celery.bin import worker
from djcelery.app import app
from djcelery.management.base import CeleryCommand
worker = worker.worker(app=app)
class Command(CeleryCommand):
"""Run the c... | """
Start the celery daemon from the Django management command.
"""
from __future__ import absolute_import, unicode_literals
from celery.bin import worker
from djcelery.app import app
from djcelery.management.base import CeleryCommand
worker = worker.worker(app=app)
class Command(CeleryCommand):
"""Run the c... | <commit_before>"""
Start the celery daemon from the Django management command.
"""
from __future__ import absolute_import, unicode_literals
from celery.bin import worker
from djcelery.app import app
from djcelery.management.base import CeleryCommand
worker = worker.worker(app=app)
class Command(CeleryCommand):
... | """
Start the celery daemon from the Django management command.
"""
from __future__ import absolute_import, unicode_literals
from celery.bin import worker
from djcelery.app import app
from djcelery.management.base import CeleryCommand
worker = worker.worker(app=app)
class Command(CeleryCommand):
"""Run the c... | """
Start the celery daemon from the Django management command.
"""
from __future__ import absolute_import, unicode_literals
from celery.bin import worker
from djcelery.app import app
from djcelery.management.base import CeleryCommand
worker = worker.worker(app=app)
class Command(CeleryCommand):
"""Run the c... | <commit_before>"""
Start the celery daemon from the Django management command.
"""
from __future__ import absolute_import, unicode_literals
from celery.bin import worker
from djcelery.app import app
from djcelery.management.base import CeleryCommand
worker = worker.worker(app=app)
class Command(CeleryCommand):
... |
635a51c1ee8f5608de03351008f0d5aa9a116660 | opps/images/templatetags/images_tags.py | opps/images/templatetags/images_tags.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from django import template
from ..generate import image_url as url
register = template.Library()
@register.simple_tag
def image_url(image_url, **kwargs):
return url(image_url=image_url, **kwargs)
@register.simple_tag
def image_obj(image, **kwargs):
new = {}
... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from django import template
from ..generate import image_url as url
register = template.Library()
@register.simple_tag
def image_url(image_url, **kwargs):
return url(image_url=image_url, **kwargs)
@register.simple_tag
def image_obj(image, **kwargs):
new = {}
... | Fix has no attribute on templatetags image_obj | Fix has no attribute on templatetags image_obj
| Python | mit | jeanmask/opps,williamroot/opps,YACOWS/opps,opps/opps,opps/opps,YACOWS/opps,jeanmask/opps,jeanmask/opps,williamroot/opps,jeanmask/opps,YACOWS/opps,opps/opps,williamroot/opps,YACOWS/opps,opps/opps,williamroot/opps | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from django import template
from ..generate import image_url as url
register = template.Library()
@register.simple_tag
def image_url(image_url, **kwargs):
return url(image_url=image_url, **kwargs)
@register.simple_tag
def image_obj(image, **kwargs):
new = {}
... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from django import template
from ..generate import image_url as url
register = template.Library()
@register.simple_tag
def image_url(image_url, **kwargs):
return url(image_url=image_url, **kwargs)
@register.simple_tag
def image_obj(image, **kwargs):
new = {}
... | <commit_before>#!/usr/bin/env python
# -*- coding: utf-8 -*-
from django import template
from ..generate import image_url as url
register = template.Library()
@register.simple_tag
def image_url(image_url, **kwargs):
return url(image_url=image_url, **kwargs)
@register.simple_tag
def image_obj(image, **kwargs):... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from django import template
from ..generate import image_url as url
register = template.Library()
@register.simple_tag
def image_url(image_url, **kwargs):
return url(image_url=image_url, **kwargs)
@register.simple_tag
def image_obj(image, **kwargs):
new = {}
... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from django import template
from ..generate import image_url as url
register = template.Library()
@register.simple_tag
def image_url(image_url, **kwargs):
return url(image_url=image_url, **kwargs)
@register.simple_tag
def image_obj(image, **kwargs):
new = {}
... | <commit_before>#!/usr/bin/env python
# -*- coding: utf-8 -*-
from django import template
from ..generate import image_url as url
register = template.Library()
@register.simple_tag
def image_url(image_url, **kwargs):
return url(image_url=image_url, **kwargs)
@register.simple_tag
def image_obj(image, **kwargs):... |
a1c4c7f8d07ba12494b55f988853d0804e657f9a | opps/images/templatetags/images_tags.py | opps/images/templatetags/images_tags.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from django import template
from ..generate import image_url as url
register = template.Library()
@register.simple_tag
def image_url(image_url, **kwargs):
return url(image_url=image_url, **kwargs)
@register.simple_tag
def image_obj(image, **kwargs):
new = {}
... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from django import template
from ..generate import image_url as url
register = template.Library()
@register.simple_tag
def image_url(image_url, **kwargs):
return url(image_url=image_url, **kwargs)
@register.simple_tag
def image_obj(image, **kwargs):
new = {}
... | Add image crop on templatetags image_obj | Add image crop on templatetags image_obj
| Python | mit | jeanmask/opps,YACOWS/opps,opps/opps,williamroot/opps,opps/opps,williamroot/opps,opps/opps,williamroot/opps,YACOWS/opps,opps/opps,jeanmask/opps,YACOWS/opps,YACOWS/opps,williamroot/opps,jeanmask/opps,jeanmask/opps | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from django import template
from ..generate import image_url as url
register = template.Library()
@register.simple_tag
def image_url(image_url, **kwargs):
return url(image_url=image_url, **kwargs)
@register.simple_tag
def image_obj(image, **kwargs):
new = {}
... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from django import template
from ..generate import image_url as url
register = template.Library()
@register.simple_tag
def image_url(image_url, **kwargs):
return url(image_url=image_url, **kwargs)
@register.simple_tag
def image_obj(image, **kwargs):
new = {}
... | <commit_before>#!/usr/bin/env python
# -*- coding: utf-8 -*-
from django import template
from ..generate import image_url as url
register = template.Library()
@register.simple_tag
def image_url(image_url, **kwargs):
return url(image_url=image_url, **kwargs)
@register.simple_tag
def image_obj(image, **kwargs):... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from django import template
from ..generate import image_url as url
register = template.Library()
@register.simple_tag
def image_url(image_url, **kwargs):
return url(image_url=image_url, **kwargs)
@register.simple_tag
def image_obj(image, **kwargs):
new = {}
... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from django import template
from ..generate import image_url as url
register = template.Library()
@register.simple_tag
def image_url(image_url, **kwargs):
return url(image_url=image_url, **kwargs)
@register.simple_tag
def image_obj(image, **kwargs):
new = {}
... | <commit_before>#!/usr/bin/env python
# -*- coding: utf-8 -*-
from django import template
from ..generate import image_url as url
register = template.Library()
@register.simple_tag
def image_url(image_url, **kwargs):
return url(image_url=image_url, **kwargs)
@register.simple_tag
def image_obj(image, **kwargs):... |
dabb67601fd977b2f3e97a601a76ec8dd576fa77 | drivnal/remote_snapshot.py | drivnal/remote_snapshot.py | from constants import *
from core_snapshot import CoreSnapshot
import logging
logger = logging.getLogger(APP_NAME)
class RemoteSnapshot(CoreSnapshot):
def _get_path(self):
dir_name = str(self.id)
if self.state != COMPLETE:
dir_name = '%s.%s' % (dir_name, self.state)
return '%s@... | from constants import *
from core_snapshot import CoreSnapshot
import logging
logger = logging.getLogger(APP_NAME)
class RemoteSnapshot(CoreSnapshot):
def _get_path(self):
dir_name = str(self.id)
if self.state != COMPLETE:
dir_name = '%s.%s' % (dir_name, self.state)
return '%s@... | Add get log path to remote snapshot | Add get log path to remote snapshot
| Python | agpl-3.0 | drivnal/drivnal,drivnal/drivnal,drivnal/drivnal | from constants import *
from core_snapshot import CoreSnapshot
import logging
logger = logging.getLogger(APP_NAME)
class RemoteSnapshot(CoreSnapshot):
def _get_path(self):
dir_name = str(self.id)
if self.state != COMPLETE:
dir_name = '%s.%s' % (dir_name, self.state)
return '%s@... | from constants import *
from core_snapshot import CoreSnapshot
import logging
logger = logging.getLogger(APP_NAME)
class RemoteSnapshot(CoreSnapshot):
def _get_path(self):
dir_name = str(self.id)
if self.state != COMPLETE:
dir_name = '%s.%s' % (dir_name, self.state)
return '%s@... | <commit_before>from constants import *
from core_snapshot import CoreSnapshot
import logging
logger = logging.getLogger(APP_NAME)
class RemoteSnapshot(CoreSnapshot):
def _get_path(self):
dir_name = str(self.id)
if self.state != COMPLETE:
dir_name = '%s.%s' % (dir_name, self.state)
... | from constants import *
from core_snapshot import CoreSnapshot
import logging
logger = logging.getLogger(APP_NAME)
class RemoteSnapshot(CoreSnapshot):
def _get_path(self):
dir_name = str(self.id)
if self.state != COMPLETE:
dir_name = '%s.%s' % (dir_name, self.state)
return '%s@... | from constants import *
from core_snapshot import CoreSnapshot
import logging
logger = logging.getLogger(APP_NAME)
class RemoteSnapshot(CoreSnapshot):
def _get_path(self):
dir_name = str(self.id)
if self.state != COMPLETE:
dir_name = '%s.%s' % (dir_name, self.state)
return '%s@... | <commit_before>from constants import *
from core_snapshot import CoreSnapshot
import logging
logger = logging.getLogger(APP_NAME)
class RemoteSnapshot(CoreSnapshot):
def _get_path(self):
dir_name = str(self.id)
if self.state != COMPLETE:
dir_name = '%s.%s' % (dir_name, self.state)
... |
58e2059c37d7464e7ab7a1681ea8f465e9378940 | ukpostcode/__init__.py | ukpostcode/__init__.py | # coding: utf-8
# Copyright 2013 Alan Justino da Silva, Oscar Vilaplana, et. al.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless req... | # coding: utf-8
# Copyright 2013 Alan Justino da Silva, Oscar Vilaplana, et. al.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless req... | Prepare to code the validator | Prepare to code the validator
| Python | apache-2.0 | alanjds/pyukpostcode | # coding: utf-8
# Copyright 2013 Alan Justino da Silva, Oscar Vilaplana, et. al.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless req... | # coding: utf-8
# Copyright 2013 Alan Justino da Silva, Oscar Vilaplana, et. al.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless req... | <commit_before># coding: utf-8
# Copyright 2013 Alan Justino da Silva, Oscar Vilaplana, et. al.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0... | # coding: utf-8
# Copyright 2013 Alan Justino da Silva, Oscar Vilaplana, et. al.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless req... | # coding: utf-8
# Copyright 2013 Alan Justino da Silva, Oscar Vilaplana, et. al.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless req... | <commit_before># coding: utf-8
# Copyright 2013 Alan Justino da Silva, Oscar Vilaplana, et. al.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0... |
ce90af15b912080c15abcb6c3ea0b4b135dd43bb | Scraper.py | Scraper.py | from Database import Database
from Nyaa import Nyaa, NyaaEntry
import getopt
import os
import sys
script_dir = os.path.dirname(os.path.realpath(__file__))
nt = Nyaa()
db = Database(script_dir)
arguments = sys.argv[1:]
optlist, args = getopt.getopt(arguments, '', ['start='])
if len(optlist) > 0:
for opt, arg in optli... | from Database import Database
from Nyaa import Nyaa, NyaaEntry
import getopt
import os
import sys
script_dir = os.path.dirname(os.path.realpath(__file__))
nt = Nyaa()
db = Database(script_dir)
arguments = sys.argv[1:]
optlist, args = getopt.getopt(arguments, '', ['start='])
if len(optlist) > 0:
for opt, arg in optli... | Fix scraper skipping an entry at start. | Fix scraper skipping an entry at start.
| Python | mit | Hamuko/nyaamagnet | from Database import Database
from Nyaa import Nyaa, NyaaEntry
import getopt
import os
import sys
script_dir = os.path.dirname(os.path.realpath(__file__))
nt = Nyaa()
db = Database(script_dir)
arguments = sys.argv[1:]
optlist, args = getopt.getopt(arguments, '', ['start='])
if len(optlist) > 0:
for opt, arg in optli... | from Database import Database
from Nyaa import Nyaa, NyaaEntry
import getopt
import os
import sys
script_dir = os.path.dirname(os.path.realpath(__file__))
nt = Nyaa()
db = Database(script_dir)
arguments = sys.argv[1:]
optlist, args = getopt.getopt(arguments, '', ['start='])
if len(optlist) > 0:
for opt, arg in optli... | <commit_before>from Database import Database
from Nyaa import Nyaa, NyaaEntry
import getopt
import os
import sys
script_dir = os.path.dirname(os.path.realpath(__file__))
nt = Nyaa()
db = Database(script_dir)
arguments = sys.argv[1:]
optlist, args = getopt.getopt(arguments, '', ['start='])
if len(optlist) > 0:
for op... | from Database import Database
from Nyaa import Nyaa, NyaaEntry
import getopt
import os
import sys
script_dir = os.path.dirname(os.path.realpath(__file__))
nt = Nyaa()
db = Database(script_dir)
arguments = sys.argv[1:]
optlist, args = getopt.getopt(arguments, '', ['start='])
if len(optlist) > 0:
for opt, arg in optli... | from Database import Database
from Nyaa import Nyaa, NyaaEntry
import getopt
import os
import sys
script_dir = os.path.dirname(os.path.realpath(__file__))
nt = Nyaa()
db = Database(script_dir)
arguments = sys.argv[1:]
optlist, args = getopt.getopt(arguments, '', ['start='])
if len(optlist) > 0:
for opt, arg in optli... | <commit_before>from Database import Database
from Nyaa import Nyaa, NyaaEntry
import getopt
import os
import sys
script_dir = os.path.dirname(os.path.realpath(__file__))
nt = Nyaa()
db = Database(script_dir)
arguments = sys.argv[1:]
optlist, args = getopt.getopt(arguments, '', ['start='])
if len(optlist) > 0:
for op... |
e7438009afe5d0372fa1c89c2d3407234662521b | src/compiler/nir/nir_builder_opcodes_h.py | src/compiler/nir/nir_builder_opcodes_h.py | #! /usr/bin/env python
template = """\
/* Copyright (C) 2015 Broadcom
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
* to deal in the Software without restriction, including without limitation
* the rights to... | #! /usr/bin/env python
template = """\
/* Copyright (C) 2015 Broadcom
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
* to deal in the Software without restriction, including without limitation
* the rights to... | Remove spurious ; after nir_builder functions. | nir: Remove spurious ; after nir_builder functions.
Makes -pedantic happy.
Reviewed-by: Connor Abbott <71178acffcc112b21e5858656e5751f5e4aa9364@gmail.com>
| Python | mit | metora/MesaGLSLCompiler,metora/MesaGLSLCompiler,metora/MesaGLSLCompiler | #! /usr/bin/env python
template = """\
/* Copyright (C) 2015 Broadcom
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
* to deal in the Software without restriction, including without limitation
* the rights to... | #! /usr/bin/env python
template = """\
/* Copyright (C) 2015 Broadcom
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
* to deal in the Software without restriction, including without limitation
* the rights to... | <commit_before>#! /usr/bin/env python
template = """\
/* Copyright (C) 2015 Broadcom
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
* to deal in the Software without restriction, including without limitation
... | #! /usr/bin/env python
template = """\
/* Copyright (C) 2015 Broadcom
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
* to deal in the Software without restriction, including without limitation
* the rights to... | #! /usr/bin/env python
template = """\
/* Copyright (C) 2015 Broadcom
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
* to deal in the Software without restriction, including without limitation
* the rights to... | <commit_before>#! /usr/bin/env python
template = """\
/* Copyright (C) 2015 Broadcom
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
* to deal in the Software without restriction, including without limitation
... |
f0cb99f5e986c11164c98eeea38ce54e91748833 | tests/grammar_unified_tests.py | tests/grammar_unified_tests.py | from unittest import TestCase
from regparser.grammar.unified import *
class GrammarCommonTests(TestCase):
def test_depth1_p(self):
text = '(c)(2)(ii)(A)(<E T="03">2</E>)'
result = depth1_p.parseString(text)
self.assertEqual('c', result.p1)
self.assertEqual('2', result.p2)
... | # -*- coding: utf-8 -*-
from unittest import TestCase
from regparser.grammar.unified import *
class GrammarCommonTests(TestCase):
def test_depth1_p(self):
text = '(c)(2)(ii)(A)(<E T="03">2</E>)'
result = depth1_p.parseString(text)
self.assertEqual('c', result.p1)
self.assertEqual... | Add tests for marker_comment from ascott1/appendix-ref | Add tests for marker_comment from ascott1/appendix-ref
Conflicts:
tests/grammar_unified_tests.py
| Python | cc0-1.0 | tadhg-ohiggins/regulations-parser,eregs/regulations-parser,tadhg-ohiggins/regulations-parser,eregs/regulations-parser,cmc333333/regulations-parser,cmc333333/regulations-parser | from unittest import TestCase
from regparser.grammar.unified import *
class GrammarCommonTests(TestCase):
def test_depth1_p(self):
text = '(c)(2)(ii)(A)(<E T="03">2</E>)'
result = depth1_p.parseString(text)
self.assertEqual('c', result.p1)
self.assertEqual('2', result.p2)
... | # -*- coding: utf-8 -*-
from unittest import TestCase
from regparser.grammar.unified import *
class GrammarCommonTests(TestCase):
def test_depth1_p(self):
text = '(c)(2)(ii)(A)(<E T="03">2</E>)'
result = depth1_p.parseString(text)
self.assertEqual('c', result.p1)
self.assertEqual... | <commit_before>from unittest import TestCase
from regparser.grammar.unified import *
class GrammarCommonTests(TestCase):
def test_depth1_p(self):
text = '(c)(2)(ii)(A)(<E T="03">2</E>)'
result = depth1_p.parseString(text)
self.assertEqual('c', result.p1)
self.assertEqual('2', res... | # -*- coding: utf-8 -*-
from unittest import TestCase
from regparser.grammar.unified import *
class GrammarCommonTests(TestCase):
def test_depth1_p(self):
text = '(c)(2)(ii)(A)(<E T="03">2</E>)'
result = depth1_p.parseString(text)
self.assertEqual('c', result.p1)
self.assertEqual... | from unittest import TestCase
from regparser.grammar.unified import *
class GrammarCommonTests(TestCase):
def test_depth1_p(self):
text = '(c)(2)(ii)(A)(<E T="03">2</E>)'
result = depth1_p.parseString(text)
self.assertEqual('c', result.p1)
self.assertEqual('2', result.p2)
... | <commit_before>from unittest import TestCase
from regparser.grammar.unified import *
class GrammarCommonTests(TestCase):
def test_depth1_p(self):
text = '(c)(2)(ii)(A)(<E T="03">2</E>)'
result = depth1_p.parseString(text)
self.assertEqual('c', result.p1)
self.assertEqual('2', res... |
81adecffdf4d9cafa86b7bc9862ce580327c4b6c | mongo_pool/__init__.py | mongo_pool/__init__.py | from mongo_pool import MongoPool
from pkg_resources import get_distribution, DistributionNotFound
import os.path
__all__ = ['mongo_pool']
try:
_dist = get_distribution('mongo-pool')
if not __file__.startswith(os.path.join(_dist.location, 'mongo_pool')):
# not installed, but there is another version th... | from .mongo_pool import MongoPool
from pkg_resources import get_distribution, DistributionNotFound
import os.path
__all__ = ['mongo_pool']
try:
_dist = get_distribution('mongo-pool')
if not __file__.startswith(os.path.join(_dist.location, 'mongo_pool')):
# not installed, but there is another version t... | Update relative import to work with python 3.6. ANL-10319 | Update relative import to work with python 3.6. ANL-10319
| Python | apache-2.0 | uberVU/mongo-pool,uberVU/mongo-pool | from mongo_pool import MongoPool
from pkg_resources import get_distribution, DistributionNotFound
import os.path
__all__ = ['mongo_pool']
try:
_dist = get_distribution('mongo-pool')
if not __file__.startswith(os.path.join(_dist.location, 'mongo_pool')):
# not installed, but there is another version th... | from .mongo_pool import MongoPool
from pkg_resources import get_distribution, DistributionNotFound
import os.path
__all__ = ['mongo_pool']
try:
_dist = get_distribution('mongo-pool')
if not __file__.startswith(os.path.join(_dist.location, 'mongo_pool')):
# not installed, but there is another version t... | <commit_before>from mongo_pool import MongoPool
from pkg_resources import get_distribution, DistributionNotFound
import os.path
__all__ = ['mongo_pool']
try:
_dist = get_distribution('mongo-pool')
if not __file__.startswith(os.path.join(_dist.location, 'mongo_pool')):
# not installed, but there is ano... | from .mongo_pool import MongoPool
from pkg_resources import get_distribution, DistributionNotFound
import os.path
__all__ = ['mongo_pool']
try:
_dist = get_distribution('mongo-pool')
if not __file__.startswith(os.path.join(_dist.location, 'mongo_pool')):
# not installed, but there is another version t... | from mongo_pool import MongoPool
from pkg_resources import get_distribution, DistributionNotFound
import os.path
__all__ = ['mongo_pool']
try:
_dist = get_distribution('mongo-pool')
if not __file__.startswith(os.path.join(_dist.location, 'mongo_pool')):
# not installed, but there is another version th... | <commit_before>from mongo_pool import MongoPool
from pkg_resources import get_distribution, DistributionNotFound
import os.path
__all__ = ['mongo_pool']
try:
_dist = get_distribution('mongo-pool')
if not __file__.startswith(os.path.join(_dist.location, 'mongo_pool')):
# not installed, but there is ano... |
4c95c238cd198779b7019a72b412ce20ddf865bd | alg_gcd.py | alg_gcd.py | from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
def gcd(m, n):
"""Greatest Common Divisor (GCD) by Euclid's Algorithm.
Time complexity: O(m%n).
Space complexity: O(1).
"""
while n != 0:
m, n = n, m % n
return m
def main():... | from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
def gcd_recur(m, n):
"""Greatest Common Divisor (GCD) by Euclid's Algorithm.
Time complexity: O(m%n).
Space complexity: O(m%n).
"""
if n == 0:
return m
return gcd_recur(n, m % ... | Complete gcd recur sol w/ time/space complexity | Complete gcd recur sol w/ time/space complexity
| Python | bsd-2-clause | bowen0701/algorithms_data_structures | from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
def gcd(m, n):
"""Greatest Common Divisor (GCD) by Euclid's Algorithm.
Time complexity: O(m%n).
Space complexity: O(1).
"""
while n != 0:
m, n = n, m % n
return m
def main():... | from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
def gcd_recur(m, n):
"""Greatest Common Divisor (GCD) by Euclid's Algorithm.
Time complexity: O(m%n).
Space complexity: O(m%n).
"""
if n == 0:
return m
return gcd_recur(n, m % ... | <commit_before>from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
def gcd(m, n):
"""Greatest Common Divisor (GCD) by Euclid's Algorithm.
Time complexity: O(m%n).
Space complexity: O(1).
"""
while n != 0:
m, n = n, m % n
return ... | from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
def gcd_recur(m, n):
"""Greatest Common Divisor (GCD) by Euclid's Algorithm.
Time complexity: O(m%n).
Space complexity: O(m%n).
"""
if n == 0:
return m
return gcd_recur(n, m % ... | from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
def gcd(m, n):
"""Greatest Common Divisor (GCD) by Euclid's Algorithm.
Time complexity: O(m%n).
Space complexity: O(1).
"""
while n != 0:
m, n = n, m % n
return m
def main():... | <commit_before>from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
def gcd(m, n):
"""Greatest Common Divisor (GCD) by Euclid's Algorithm.
Time complexity: O(m%n).
Space complexity: O(1).
"""
while n != 0:
m, n = n, m % n
return ... |
3290d532f3dd9c1e24921c4b80aeb6e860bc86a8 | spock/plugins/__init__.py | spock/plugins/__init__.py | from spock.plugins.core import auth, event, net, ticker, timer
from spock.plugins.helpers import clientinfo, entities, interact, inventory,\
keepalive, movement, physics, respawn, start, world
from spock.plugins.base import PluginBase # noqa
core_plugins = [
('auth', auth.AuthPlugin),
('event', event.Ev... | from spock.plugins.core import auth, event, net, ticker, timer
from spock.plugins.helpers import chat, clientinfo, entities, interact, \
inventory, keepalive, movement, physics, respawn, start, world
from spock.plugins.base import PluginBase # noqa
core_plugins = [
('auth', auth.AuthPlugin),
('event', ev... | Fix removal of chat plugin | Fix removal of chat plugin
| Python | mit | nickelpro/SpockBot,MrSwiss/SpockBot,Gjum/SpockBot,SpockBotMC/SpockBot,gamingrobot/SpockBot,luken/SpockBot | from spock.plugins.core import auth, event, net, ticker, timer
from spock.plugins.helpers import clientinfo, entities, interact, inventory,\
keepalive, movement, physics, respawn, start, world
from spock.plugins.base import PluginBase # noqa
core_plugins = [
('auth', auth.AuthPlugin),
('event', event.Ev... | from spock.plugins.core import auth, event, net, ticker, timer
from spock.plugins.helpers import chat, clientinfo, entities, interact, \
inventory, keepalive, movement, physics, respawn, start, world
from spock.plugins.base import PluginBase # noqa
core_plugins = [
('auth', auth.AuthPlugin),
('event', ev... | <commit_before>from spock.plugins.core import auth, event, net, ticker, timer
from spock.plugins.helpers import clientinfo, entities, interact, inventory,\
keepalive, movement, physics, respawn, start, world
from spock.plugins.base import PluginBase # noqa
core_plugins = [
('auth', auth.AuthPlugin),
('e... | from spock.plugins.core import auth, event, net, ticker, timer
from spock.plugins.helpers import chat, clientinfo, entities, interact, \
inventory, keepalive, movement, physics, respawn, start, world
from spock.plugins.base import PluginBase # noqa
core_plugins = [
('auth', auth.AuthPlugin),
('event', ev... | from spock.plugins.core import auth, event, net, ticker, timer
from spock.plugins.helpers import clientinfo, entities, interact, inventory,\
keepalive, movement, physics, respawn, start, world
from spock.plugins.base import PluginBase # noqa
core_plugins = [
('auth', auth.AuthPlugin),
('event', event.Ev... | <commit_before>from spock.plugins.core import auth, event, net, ticker, timer
from spock.plugins.helpers import clientinfo, entities, interact, inventory,\
keepalive, movement, physics, respawn, start, world
from spock.plugins.base import PluginBase # noqa
core_plugins = [
('auth', auth.AuthPlugin),
('e... |
80a3efa11f8f2913d3ce90668b4e9c7eaa5ada9c | fabfile.py | fabfile.py | from armstrong.dev.tasks import *
settings = {
'DEBUG': True,
'INTERNAL_IPS': ('127.0.0.1', ),
'INSTALLED_APPS': (
'django.contrib.admin',
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.sites',
'armstrong.cor... | from armstrong.dev.tasks import *
settings = {
'DEBUG': True,
'INTERNAL_IPS': ('127.0.0.1', ),
'INSTALLED_APPS': (
'django.contrib.admin',
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.sites',
'armstrong.cor... | Fix testing in Django 1.6 by using the old test runner. | Fix testing in Django 1.6 by using the old test runner.
| Python | apache-2.0 | armstrong/armstrong.core.arm_layout,armstrong/armstrong.core.arm_layout | from armstrong.dev.tasks import *
settings = {
'DEBUG': True,
'INTERNAL_IPS': ('127.0.0.1', ),
'INSTALLED_APPS': (
'django.contrib.admin',
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.sites',
'armstrong.cor... | from armstrong.dev.tasks import *
settings = {
'DEBUG': True,
'INTERNAL_IPS': ('127.0.0.1', ),
'INSTALLED_APPS': (
'django.contrib.admin',
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.sites',
'armstrong.cor... | <commit_before>from armstrong.dev.tasks import *
settings = {
'DEBUG': True,
'INTERNAL_IPS': ('127.0.0.1', ),
'INSTALLED_APPS': (
'django.contrib.admin',
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.sites',
... | from armstrong.dev.tasks import *
settings = {
'DEBUG': True,
'INTERNAL_IPS': ('127.0.0.1', ),
'INSTALLED_APPS': (
'django.contrib.admin',
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.sites',
'armstrong.cor... | from armstrong.dev.tasks import *
settings = {
'DEBUG': True,
'INTERNAL_IPS': ('127.0.0.1', ),
'INSTALLED_APPS': (
'django.contrib.admin',
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.sites',
'armstrong.cor... | <commit_before>from armstrong.dev.tasks import *
settings = {
'DEBUG': True,
'INTERNAL_IPS': ('127.0.0.1', ),
'INSTALLED_APPS': (
'django.contrib.admin',
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.sites',
... |
9135bd99f5668adeb7d8bfbd4e317f58f640e6f5 | tests/test_strings.py | tests/test_strings.py | """Tests for string searches"""
from nose.tools import eq_
from dxr.testing import SingleFileTestCase, MINIMAL_MAIN
class StringTests(SingleFileTestCase):
source = """
void main_idea() {
}
""" + MINIMAL_MAIN
def test_negated_phrase(self):
"""Make sure a negated phrase search... | """Tests for string searches"""
from nose import SkipTest
from nose.tools import eq_
from dxr.testing import SingleFileTestCase, MINIMAL_MAIN
class StringTests(SingleFileTestCase):
source = """
void main_idea() {
}
""" + MINIMAL_MAIN
def test_negated_phrase(self):
"""Make su... | Add a skipped failing test for the result-repetition bug. | Add a skipped failing test for the result-repetition bug.
| Python | mit | pombredanne/dxr,srenatus/dxr,gartung/dxr,nrc/dxr,gartung/dxr,kleintom/dxr,srenatus/dxr,srenatus/dxr,srenatus/dxr,bozzmob/dxr,jbradberry/dxr,KiemVM/Mozilla--dxr,jbradberry/dxr,jbradberry/dxr,jay-z007/dxr,kleintom/dxr,nrc/dxr,bozzmob/dxr,jbradberry/dxr,gartung/dxr,nrc/dxr,gartung/dxr,bozzmob/dxr,kleintom/dxr,pelmers/dxr,... | """Tests for string searches"""
from nose.tools import eq_
from dxr.testing import SingleFileTestCase, MINIMAL_MAIN
class StringTests(SingleFileTestCase):
source = """
void main_idea() {
}
""" + MINIMAL_MAIN
def test_negated_phrase(self):
"""Make sure a negated phrase search... | """Tests for string searches"""
from nose import SkipTest
from nose.tools import eq_
from dxr.testing import SingleFileTestCase, MINIMAL_MAIN
class StringTests(SingleFileTestCase):
source = """
void main_idea() {
}
""" + MINIMAL_MAIN
def test_negated_phrase(self):
"""Make su... | <commit_before>"""Tests for string searches"""
from nose.tools import eq_
from dxr.testing import SingleFileTestCase, MINIMAL_MAIN
class StringTests(SingleFileTestCase):
source = """
void main_idea() {
}
""" + MINIMAL_MAIN
def test_negated_phrase(self):
"""Make sure a negate... | """Tests for string searches"""
from nose import SkipTest
from nose.tools import eq_
from dxr.testing import SingleFileTestCase, MINIMAL_MAIN
class StringTests(SingleFileTestCase):
source = """
void main_idea() {
}
""" + MINIMAL_MAIN
def test_negated_phrase(self):
"""Make su... | """Tests for string searches"""
from nose.tools import eq_
from dxr.testing import SingleFileTestCase, MINIMAL_MAIN
class StringTests(SingleFileTestCase):
source = """
void main_idea() {
}
""" + MINIMAL_MAIN
def test_negated_phrase(self):
"""Make sure a negated phrase search... | <commit_before>"""Tests for string searches"""
from nose.tools import eq_
from dxr.testing import SingleFileTestCase, MINIMAL_MAIN
class StringTests(SingleFileTestCase):
source = """
void main_idea() {
}
""" + MINIMAL_MAIN
def test_negated_phrase(self):
"""Make sure a negate... |
1f09af5b3b785133dce83cd5a00fde7f69fdf410 | apps/config/powerline.symlink/segments/custom.py | apps/config/powerline.symlink/segments/custom.py | from powerline.segments.common import bat, sys
def system_load(pl, num_avgs=3):
return sys.system_load(pl)[:num_avgs]
def battery(pl, max_percent=101):
if bat._get_capacity(pl) < max_percent:
return bat.battery(pl)
return []
| from powerline.segments.common import bat, sys
def system_load(pl, num_avgs=3):
return sys.system_load(pl)[:num_avgs]
def battery(pl, max_percent=101):
capacity, ac_powered = bat._get_battery_status(pl)
if capacity < max_percent:
return bat.battery(pl)
return []
| Update powerline battery wrapper for new API | Update powerline battery wrapper for new API
| Python | mit | tchajed/dotfiles-osx,tchajed/dotfiles-osx,tchajed/dotfiles-osx | from powerline.segments.common import bat, sys
def system_load(pl, num_avgs=3):
return sys.system_load(pl)[:num_avgs]
def battery(pl, max_percent=101):
if bat._get_capacity(pl) < max_percent:
return bat.battery(pl)
return []
Update powerline battery wrapper for new API | from powerline.segments.common import bat, sys
def system_load(pl, num_avgs=3):
return sys.system_load(pl)[:num_avgs]
def battery(pl, max_percent=101):
capacity, ac_powered = bat._get_battery_status(pl)
if capacity < max_percent:
return bat.battery(pl)
return []
| <commit_before>from powerline.segments.common import bat, sys
def system_load(pl, num_avgs=3):
return sys.system_load(pl)[:num_avgs]
def battery(pl, max_percent=101):
if bat._get_capacity(pl) < max_percent:
return bat.battery(pl)
return []
<commit_msg>Update powerline battery wrapper for new API<c... | from powerline.segments.common import bat, sys
def system_load(pl, num_avgs=3):
return sys.system_load(pl)[:num_avgs]
def battery(pl, max_percent=101):
capacity, ac_powered = bat._get_battery_status(pl)
if capacity < max_percent:
return bat.battery(pl)
return []
| from powerline.segments.common import bat, sys
def system_load(pl, num_avgs=3):
return sys.system_load(pl)[:num_avgs]
def battery(pl, max_percent=101):
if bat._get_capacity(pl) < max_percent:
return bat.battery(pl)
return []
Update powerline battery wrapper for new APIfrom powerline.segments.commo... | <commit_before>from powerline.segments.common import bat, sys
def system_load(pl, num_avgs=3):
return sys.system_load(pl)[:num_avgs]
def battery(pl, max_percent=101):
if bat._get_capacity(pl) < max_percent:
return bat.battery(pl)
return []
<commit_msg>Update powerline battery wrapper for new API<c... |
a3d58cc1feeca734898098920e5c7195632d408b | atompos/atompos/middleware/logging_middleware.py | atompos/atompos/middleware/logging_middleware.py | from time import time
from logging import getLogger
# From: https://djangosnippets.org/snippets/1866/
def sizify(value):
"""
Simple kb/mb/gb size snippet
"""
#value = ing(value)
if value < 512:
ext = 'B'
elif value < 512000:
value = value / 1024.0
ext = 'kB'
elif val... | from time import time
from logging import getLogger
# From: https://djangosnippets.org/snippets/1866/
def sizify(value):
"""
Simple kb/mb/gb size snippet
"""
#value = ing(value)
if value < 512:
ext = 'B'
elif value < 512000:
value = value / 1024.0
ext = 'kB'
elif val... | Fix for request timer not always working. | Fix for request timer not always working.
| Python | mit | jimivdw/OAPoC,bertrand-caron/OAPoC,bertrand-caron/OAPoC | from time import time
from logging import getLogger
# From: https://djangosnippets.org/snippets/1866/
def sizify(value):
"""
Simple kb/mb/gb size snippet
"""
#value = ing(value)
if value < 512:
ext = 'B'
elif value < 512000:
value = value / 1024.0
ext = 'kB'
elif val... | from time import time
from logging import getLogger
# From: https://djangosnippets.org/snippets/1866/
def sizify(value):
"""
Simple kb/mb/gb size snippet
"""
#value = ing(value)
if value < 512:
ext = 'B'
elif value < 512000:
value = value / 1024.0
ext = 'kB'
elif val... | <commit_before>from time import time
from logging import getLogger
# From: https://djangosnippets.org/snippets/1866/
def sizify(value):
"""
Simple kb/mb/gb size snippet
"""
#value = ing(value)
if value < 512:
ext = 'B'
elif value < 512000:
value = value / 1024.0
ext = 'k... | from time import time
from logging import getLogger
# From: https://djangosnippets.org/snippets/1866/
def sizify(value):
"""
Simple kb/mb/gb size snippet
"""
#value = ing(value)
if value < 512:
ext = 'B'
elif value < 512000:
value = value / 1024.0
ext = 'kB'
elif val... | from time import time
from logging import getLogger
# From: https://djangosnippets.org/snippets/1866/
def sizify(value):
"""
Simple kb/mb/gb size snippet
"""
#value = ing(value)
if value < 512:
ext = 'B'
elif value < 512000:
value = value / 1024.0
ext = 'kB'
elif val... | <commit_before>from time import time
from logging import getLogger
# From: https://djangosnippets.org/snippets/1866/
def sizify(value):
"""
Simple kb/mb/gb size snippet
"""
#value = ing(value)
if value < 512:
ext = 'B'
elif value < 512000:
value = value / 1024.0
ext = 'k... |
b4bdd8e20b82f8016030037712094f257af9221f | cinder/db/sqlalchemy/migrate_repo/versions/006_snapshots_add_provider_location.py | cinder/db/sqlalchemy/migrate_repo/versions/006_snapshots_add_provider_location.py | # vim: tabstop=4 shiftwidth=4 softtabstop=4
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable... | # vim: tabstop=4 shiftwidth=4 softtabstop=4
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable... | Fix provider_location column add for PSQL | Fix provider_location column add for PSQL
Migration 006 (commit 690cae58e6bbac5758ea2f7b60774c797d28fba5)
didn't work properly for postgres,
this patch corrects the upgrade by ensuring the execute
is performed and the value is initialized to None.
Since we haven't released a milestone etc with this migration in the
c... | Python | apache-2.0 | nexusriot/cinder,github-borat/cinder,mahak/cinder,CloudServer/cinder,eharney/cinder,spring-week-topos/cinder-week,blueboxgroup/cinder,potsmaster/cinder,julianwang/cinder,github-borat/cinder,Datera/cinder,j-griffith/cinder,cloudbau/cinder,cloudbase/cinder,redhat-openstack/cinder,NeCTAR-RC/cinder,rakeshmi/cinder,abusse/c... | # vim: tabstop=4 shiftwidth=4 softtabstop=4
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable... | # vim: tabstop=4 shiftwidth=4 softtabstop=4
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable... | <commit_before># vim: tabstop=4 shiftwidth=4 softtabstop=4
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless require... | # vim: tabstop=4 shiftwidth=4 softtabstop=4
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable... | # vim: tabstop=4 shiftwidth=4 softtabstop=4
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable... | <commit_before># vim: tabstop=4 shiftwidth=4 softtabstop=4
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless require... |
af479a26689619d070f82560286f5a399b661098 | thecut/forms/utils.py | thecut/forms/utils.py | # -*- coding: utf-8 -*-
from __future__ import absolute_import, unicode_literals
def add_css_class(widget, css_class):
css_classes = widget.attrs.get('class', '').split()
if not css_class in css_classes:
css_classes.append(css_class)
widget.attrs.update({'class': ' '.join(css_classes)})
return... | # -*- coding: utf-8 -*-
from __future__ import absolute_import, unicode_literals
def add_css_class(widget, css_class):
css_classes = widget.attrs.get('class', '').split()
if css_class not in css_classes:
css_classes.append(css_class)
widget.attrs.update({'class': ' '.join(css_classes)})
return... | Make if statement flake8 compliant | Make if statement flake8 compliant
| Python | apache-2.0 | thecut/thecut-forms,thecut/thecut-forms | # -*- coding: utf-8 -*-
from __future__ import absolute_import, unicode_literals
def add_css_class(widget, css_class):
css_classes = widget.attrs.get('class', '').split()
if not css_class in css_classes:
css_classes.append(css_class)
widget.attrs.update({'class': ' '.join(css_classes)})
return... | # -*- coding: utf-8 -*-
from __future__ import absolute_import, unicode_literals
def add_css_class(widget, css_class):
css_classes = widget.attrs.get('class', '').split()
if css_class not in css_classes:
css_classes.append(css_class)
widget.attrs.update({'class': ' '.join(css_classes)})
return... | <commit_before># -*- coding: utf-8 -*-
from __future__ import absolute_import, unicode_literals
def add_css_class(widget, css_class):
css_classes = widget.attrs.get('class', '').split()
if not css_class in css_classes:
css_classes.append(css_class)
widget.attrs.update({'class': ' '.join(css_classe... | # -*- coding: utf-8 -*-
from __future__ import absolute_import, unicode_literals
def add_css_class(widget, css_class):
css_classes = widget.attrs.get('class', '').split()
if css_class not in css_classes:
css_classes.append(css_class)
widget.attrs.update({'class': ' '.join(css_classes)})
return... | # -*- coding: utf-8 -*-
from __future__ import absolute_import, unicode_literals
def add_css_class(widget, css_class):
css_classes = widget.attrs.get('class', '').split()
if not css_class in css_classes:
css_classes.append(css_class)
widget.attrs.update({'class': ' '.join(css_classes)})
return... | <commit_before># -*- coding: utf-8 -*-
from __future__ import absolute_import, unicode_literals
def add_css_class(widget, css_class):
css_classes = widget.attrs.get('class', '').split()
if not css_class in css_classes:
css_classes.append(css_class)
widget.attrs.update({'class': ' '.join(css_classe... |
fec6e5f05dfc9c6e5e7768de0cde246124aab072 | pysellus/stock_integrations/terminal.py | pysellus/stock_integrations/terminal.py | import pprint
from pysellus.interfaces import AbstractIntegration
class TerminalIntegration(AbstractIntegration):
def on_next(self, message):
print('Assert error: in {test_name} -> {1}'.format(
message['test_name'],
message['expect_function']
))
print('Got:')
... | import pprint
from pysellus.interfaces import AbstractIntegration
class TerminalIntegration(AbstractIntegration):
def on_next(self, message):
print('Assert error: in {0} -> {1}'.format(
message['test_name'],
message['expect_function']
))
print('Got:')
pprin... | Fix KeyError on Terminal integration | Fix KeyError on Terminal integration
| Python | mit | angelsanz/pysellus,cgvarela/pysellus,ergl/pysellus,Pysellus/pysellus | import pprint
from pysellus.interfaces import AbstractIntegration
class TerminalIntegration(AbstractIntegration):
def on_next(self, message):
print('Assert error: in {test_name} -> {1}'.format(
message['test_name'],
message['expect_function']
))
print('Got:')
... | import pprint
from pysellus.interfaces import AbstractIntegration
class TerminalIntegration(AbstractIntegration):
def on_next(self, message):
print('Assert error: in {0} -> {1}'.format(
message['test_name'],
message['expect_function']
))
print('Got:')
pprin... | <commit_before>import pprint
from pysellus.interfaces import AbstractIntegration
class TerminalIntegration(AbstractIntegration):
def on_next(self, message):
print('Assert error: in {test_name} -> {1}'.format(
message['test_name'],
message['expect_function']
))
prin... | import pprint
from pysellus.interfaces import AbstractIntegration
class TerminalIntegration(AbstractIntegration):
def on_next(self, message):
print('Assert error: in {0} -> {1}'.format(
message['test_name'],
message['expect_function']
))
print('Got:')
pprin... | import pprint
from pysellus.interfaces import AbstractIntegration
class TerminalIntegration(AbstractIntegration):
def on_next(self, message):
print('Assert error: in {test_name} -> {1}'.format(
message['test_name'],
message['expect_function']
))
print('Got:')
... | <commit_before>import pprint
from pysellus.interfaces import AbstractIntegration
class TerminalIntegration(AbstractIntegration):
def on_next(self, message):
print('Assert error: in {test_name} -> {1}'.format(
message['test_name'],
message['expect_function']
))
prin... |
8866de1785cc6961d2111f1e0f55b781a7de660d | _markerlib/__init__.py | _markerlib/__init__.py | """Used by pkg_resources to interpret PEP 345 environment markers."""
from _markerlib.markers import default_environment, compile, interpret, as_function
| """Used by pkg_resources to interpret PEP 345 environment markers."""
from _markerlib.markers import default_environment, compile, interpret
| Remove missing import (since b62968cd2666) | Remove missing import (since b62968cd2666)
--HG--
branch : distribute
extra : rebase_source : d1190f895d794dfcb838f7eb40a60ab07b8b309e
| Python | mit | pypa/setuptools,pypa/setuptools,pypa/setuptools | """Used by pkg_resources to interpret PEP 345 environment markers."""
from _markerlib.markers import default_environment, compile, interpret, as_function
Remove missing import (since b62968cd2666)
--HG--
branch : distribute
extra : rebase_source : d1190f895d794dfcb838f7eb40a60ab07b8b309e | """Used by pkg_resources to interpret PEP 345 environment markers."""
from _markerlib.markers import default_environment, compile, interpret
| <commit_before>"""Used by pkg_resources to interpret PEP 345 environment markers."""
from _markerlib.markers import default_environment, compile, interpret, as_function
<commit_msg>Remove missing import (since b62968cd2666)
--HG--
branch : distribute
extra : rebase_source : d1190f895d794dfcb838f7eb40a60ab07b8b309e<com... | """Used by pkg_resources to interpret PEP 345 environment markers."""
from _markerlib.markers import default_environment, compile, interpret
| """Used by pkg_resources to interpret PEP 345 environment markers."""
from _markerlib.markers import default_environment, compile, interpret, as_function
Remove missing import (since b62968cd2666)
--HG--
branch : distribute
extra : rebase_source : d1190f895d794dfcb838f7eb40a60ab07b8b309e"""Used by pkg_resources to int... | <commit_before>"""Used by pkg_resources to interpret PEP 345 environment markers."""
from _markerlib.markers import default_environment, compile, interpret, as_function
<commit_msg>Remove missing import (since b62968cd2666)
--HG--
branch : distribute
extra : rebase_source : d1190f895d794dfcb838f7eb40a60ab07b8b309e<com... |
c45c86fb573bff8fc4c6470f5dfc83e27c638aa4 | base/ajax.py | base/ajax.py | import json
from django.contrib.auth import get_user_model
from dajaxice.decorators import dajaxice_register
@dajaxice_register(method="GET")
def getuser(request, query):
User = get_user_model()
qs = User.objects.filter(username__icontains=query) |\
User.objects.filter(first_name__icontains=query) |\... | import json
from django.contrib.auth import get_user_model
from dajaxice.decorators import dajaxice_register
@dajaxice_register(method="GET")
def getuser(request, query):
User = get_user_model()
qs = User.objects.filter(username__icontains=query) |\
User.objects.filter(first_name__icontains=query) |\... | Exclude self and anonymous from message recipients in autocomplete. | Exclude self and anonymous from message recipients in autocomplete.
| Python | bsd-3-clause | ugoertz/django-familio,ugoertz/django-familio,ugoertz/django-familio,ugoertz/django-familio | import json
from django.contrib.auth import get_user_model
from dajaxice.decorators import dajaxice_register
@dajaxice_register(method="GET")
def getuser(request, query):
User = get_user_model()
qs = User.objects.filter(username__icontains=query) |\
User.objects.filter(first_name__icontains=query) |\... | import json
from django.contrib.auth import get_user_model
from dajaxice.decorators import dajaxice_register
@dajaxice_register(method="GET")
def getuser(request, query):
User = get_user_model()
qs = User.objects.filter(username__icontains=query) |\
User.objects.filter(first_name__icontains=query) |\... | <commit_before>import json
from django.contrib.auth import get_user_model
from dajaxice.decorators import dajaxice_register
@dajaxice_register(method="GET")
def getuser(request, query):
User = get_user_model()
qs = User.objects.filter(username__icontains=query) |\
User.objects.filter(first_name__icon... | import json
from django.contrib.auth import get_user_model
from dajaxice.decorators import dajaxice_register
@dajaxice_register(method="GET")
def getuser(request, query):
User = get_user_model()
qs = User.objects.filter(username__icontains=query) |\
User.objects.filter(first_name__icontains=query) |\... | import json
from django.contrib.auth import get_user_model
from dajaxice.decorators import dajaxice_register
@dajaxice_register(method="GET")
def getuser(request, query):
User = get_user_model()
qs = User.objects.filter(username__icontains=query) |\
User.objects.filter(first_name__icontains=query) |\... | <commit_before>import json
from django.contrib.auth import get_user_model
from dajaxice.decorators import dajaxice_register
@dajaxice_register(method="GET")
def getuser(request, query):
User = get_user_model()
qs = User.objects.filter(username__icontains=query) |\
User.objects.filter(first_name__icon... |
baf81686e7d7d681b3e5354f0ddaafc83b91a20c | examples/pypi.py | examples/pypi.py | #!/usr/bin/env python
# Search PyPI, the Python Package Index, and retrieve latest mechanize tarball.
# This is just to demonstrate mechanize: You should use easy_install to do
# this, not this silly script.
import sys
import os
import urlparse
import mechanize
def download_mechanize():
browser = mechanize.Br... | #!/usr/bin/env python
# Search PyPI, the Python Package Index, and retrieve latest mechanize tarball.
# This is just to demonstrate mechanize: You should use easy_install to do
# this, not this silly script.
import sys
import os
import urlparse
import mechanize
def download_mechanize():
browser = mechanize.Br... | Fix a Python 2.4 incompatibility | Fix a Python 2.4 incompatibility
| Python | bsd-3-clause | python-mechanize/mechanize,python-mechanize/mechanize | #!/usr/bin/env python
# Search PyPI, the Python Package Index, and retrieve latest mechanize tarball.
# This is just to demonstrate mechanize: You should use easy_install to do
# this, not this silly script.
import sys
import os
import urlparse
import mechanize
def download_mechanize():
browser = mechanize.Br... | #!/usr/bin/env python
# Search PyPI, the Python Package Index, and retrieve latest mechanize tarball.
# This is just to demonstrate mechanize: You should use easy_install to do
# this, not this silly script.
import sys
import os
import urlparse
import mechanize
def download_mechanize():
browser = mechanize.Br... | <commit_before>#!/usr/bin/env python
# Search PyPI, the Python Package Index, and retrieve latest mechanize tarball.
# This is just to demonstrate mechanize: You should use easy_install to do
# this, not this silly script.
import sys
import os
import urlparse
import mechanize
def download_mechanize():
browser... | #!/usr/bin/env python
# Search PyPI, the Python Package Index, and retrieve latest mechanize tarball.
# This is just to demonstrate mechanize: You should use easy_install to do
# this, not this silly script.
import sys
import os
import urlparse
import mechanize
def download_mechanize():
browser = mechanize.Br... | #!/usr/bin/env python
# Search PyPI, the Python Package Index, and retrieve latest mechanize tarball.
# This is just to demonstrate mechanize: You should use easy_install to do
# this, not this silly script.
import sys
import os
import urlparse
import mechanize
def download_mechanize():
browser = mechanize.Br... | <commit_before>#!/usr/bin/env python
# Search PyPI, the Python Package Index, and retrieve latest mechanize tarball.
# This is just to demonstrate mechanize: You should use easy_install to do
# this, not this silly script.
import sys
import os
import urlparse
import mechanize
def download_mechanize():
browser... |
47e21119621f211b0cac47972f5ad7ca92ffd950 | flaskext/urls.py | flaskext/urls.py | # -*- coding: utf-8 -*-
"""
flaskext.urls
~~~~~~~~~~~~~
A collection of URL-related functions for Flask applications.
:copyright: (c) 2010 by Steve Losh.
:license: MIT, see LICENSE for more details.
"""
| # -*- coding: utf-8 -*-
"""
flaskext.urls
~~~~~~~~~~~~~
A collection of URL-related functions for Flask applications.
:copyright: (c) 2010 by Steve Losh.
:license: MIT, see LICENSE for more details.
"""
from flask import url_for
from werkzeug.routing import BuildError
def permalink(function):
... | Add the actual functionality, lol. | Add the actual functionality, lol.
| Python | mit | sjl/flask-urls,sjl/flask-urls | # -*- coding: utf-8 -*-
"""
flaskext.urls
~~~~~~~~~~~~~
A collection of URL-related functions for Flask applications.
:copyright: (c) 2010 by Steve Losh.
:license: MIT, see LICENSE for more details.
"""
Add the actual functionality, lol. | # -*- coding: utf-8 -*-
"""
flaskext.urls
~~~~~~~~~~~~~
A collection of URL-related functions for Flask applications.
:copyright: (c) 2010 by Steve Losh.
:license: MIT, see LICENSE for more details.
"""
from flask import url_for
from werkzeug.routing import BuildError
def permalink(function):
... | <commit_before># -*- coding: utf-8 -*-
"""
flaskext.urls
~~~~~~~~~~~~~
A collection of URL-related functions for Flask applications.
:copyright: (c) 2010 by Steve Losh.
:license: MIT, see LICENSE for more details.
"""
<commit_msg>Add the actual functionality, lol.<commit_after> | # -*- coding: utf-8 -*-
"""
flaskext.urls
~~~~~~~~~~~~~
A collection of URL-related functions for Flask applications.
:copyright: (c) 2010 by Steve Losh.
:license: MIT, see LICENSE for more details.
"""
from flask import url_for
from werkzeug.routing import BuildError
def permalink(function):
... | # -*- coding: utf-8 -*-
"""
flaskext.urls
~~~~~~~~~~~~~
A collection of URL-related functions for Flask applications.
:copyright: (c) 2010 by Steve Losh.
:license: MIT, see LICENSE for more details.
"""
Add the actual functionality, lol.# -*- coding: utf-8 -*-
"""
flaskext.urls
~~~~~~~~~~~... | <commit_before># -*- coding: utf-8 -*-
"""
flaskext.urls
~~~~~~~~~~~~~
A collection of URL-related functions for Flask applications.
:copyright: (c) 2010 by Steve Losh.
:license: MIT, see LICENSE for more details.
"""
<commit_msg>Add the actual functionality, lol.<commit_after># -*- coding: utf-8 ... |
a24b2b303c1cd5e9f43353d55cc6b9d07b37b7f4 | ephemeral-cluster.py | ephemeral-cluster.py | #!/usr/bin/env python
import subprocess
import sys
import uuid
usage = """\
Run a command using a temporary docker-compose cluster, removing all containers \
and images after command completion (regardless of success or failure.)
Generally, this would be used with the ``run`` command to provide a clean room \
testin... | #!/usr/bin/env python
import subprocess
import sys
import uuid
usage = """\
Run a command using a temporary docker-compose cluster, removing all containers \
and associated volumes after command completion (regardless of success or \
failure.)
Generally, this would be used with the ``run`` command to provide a clean... | Fix forwarding ephemeral cluster exit code. | Fix forwarding ephemeral cluster exit code.
Summary: Also improves logging a little bit.
Test Plan:
$ python ephemeral-cluster.py run --rm --entrypoint=bash pgshovel -c "exit 10"
$ test $? -eq 10
Reviewers: jeff, tail
Reviewed By: tail
Differential Revision: http://phabricator.local.disqus.net/D19564
| Python | apache-2.0 | fuziontech/pgshovel,disqus/pgshovel,fuziontech/pgshovel,fuziontech/pgshovel,disqus/pgshovel | #!/usr/bin/env python
import subprocess
import sys
import uuid
usage = """\
Run a command using a temporary docker-compose cluster, removing all containers \
and images after command completion (regardless of success or failure.)
Generally, this would be used with the ``run`` command to provide a clean room \
testin... | #!/usr/bin/env python
import subprocess
import sys
import uuid
usage = """\
Run a command using a temporary docker-compose cluster, removing all containers \
and associated volumes after command completion (regardless of success or \
failure.)
Generally, this would be used with the ``run`` command to provide a clean... | <commit_before>#!/usr/bin/env python
import subprocess
import sys
import uuid
usage = """\
Run a command using a temporary docker-compose cluster, removing all containers \
and images after command completion (regardless of success or failure.)
Generally, this would be used with the ``run`` command to provide a clea... | #!/usr/bin/env python
import subprocess
import sys
import uuid
usage = """\
Run a command using a temporary docker-compose cluster, removing all containers \
and associated volumes after command completion (regardless of success or \
failure.)
Generally, this would be used with the ``run`` command to provide a clean... | #!/usr/bin/env python
import subprocess
import sys
import uuid
usage = """\
Run a command using a temporary docker-compose cluster, removing all containers \
and images after command completion (regardless of success or failure.)
Generally, this would be used with the ``run`` command to provide a clean room \
testin... | <commit_before>#!/usr/bin/env python
import subprocess
import sys
import uuid
usage = """\
Run a command using a temporary docker-compose cluster, removing all containers \
and images after command completion (regardless of success or failure.)
Generally, this would be used with the ``run`` command to provide a clea... |
ded80de3c276b57cd36d94ab393937289f772a25 | django_prometheus/db/backends/postgresql/base.py | django_prometheus/db/backends/postgresql/base.py | import django
import psycopg2.extensions
from django_prometheus.db.common import DatabaseWrapperMixin, \
ExportingCursorWrapper
if django.VERSION >= (1, 9):
from django.db.backends.postgresql import base
else:
from django.db.backends.postgresql_psycopg2 import base
class DatabaseFeatures(base.DatabaseFe... | import django
import psycopg2.extensions
from django_prometheus.db.common import DatabaseWrapperMixin, \
ExportingCursorWrapper
if django.VERSION >= (1, 9):
from django.db.backends.postgresql import base
else:
from django.db.backends.postgresql_psycopg2 import base
class DatabaseFeatures(base.DatabaseFe... | Fix backwards compatibility for postgresql backend on Django 1.10 and earlier | Fix backwards compatibility for postgresql backend on Django 1.10 and earlier
| Python | apache-2.0 | korfuri/django-prometheus,obytes/django-prometheus,korfuri/django-prometheus,obytes/django-prometheus | import django
import psycopg2.extensions
from django_prometheus.db.common import DatabaseWrapperMixin, \
ExportingCursorWrapper
if django.VERSION >= (1, 9):
from django.db.backends.postgresql import base
else:
from django.db.backends.postgresql_psycopg2 import base
class DatabaseFeatures(base.DatabaseFe... | import django
import psycopg2.extensions
from django_prometheus.db.common import DatabaseWrapperMixin, \
ExportingCursorWrapper
if django.VERSION >= (1, 9):
from django.db.backends.postgresql import base
else:
from django.db.backends.postgresql_psycopg2 import base
class DatabaseFeatures(base.DatabaseFe... | <commit_before>import django
import psycopg2.extensions
from django_prometheus.db.common import DatabaseWrapperMixin, \
ExportingCursorWrapper
if django.VERSION >= (1, 9):
from django.db.backends.postgresql import base
else:
from django.db.backends.postgresql_psycopg2 import base
class DatabaseFeatures(... | import django
import psycopg2.extensions
from django_prometheus.db.common import DatabaseWrapperMixin, \
ExportingCursorWrapper
if django.VERSION >= (1, 9):
from django.db.backends.postgresql import base
else:
from django.db.backends.postgresql_psycopg2 import base
class DatabaseFeatures(base.DatabaseFe... | import django
import psycopg2.extensions
from django_prometheus.db.common import DatabaseWrapperMixin, \
ExportingCursorWrapper
if django.VERSION >= (1, 9):
from django.db.backends.postgresql import base
else:
from django.db.backends.postgresql_psycopg2 import base
class DatabaseFeatures(base.DatabaseFe... | <commit_before>import django
import psycopg2.extensions
from django_prometheus.db.common import DatabaseWrapperMixin, \
ExportingCursorWrapper
if django.VERSION >= (1, 9):
from django.db.backends.postgresql import base
else:
from django.db.backends.postgresql_psycopg2 import base
class DatabaseFeatures(... |
128506f0e21bff78ab3612602b17eb13658e837d | utils/clear_redis.py | utils/clear_redis.py | """Utility for clearing all keys out of redis -- do not use in production!"""
import sys
from optparse import OptionParser
import redis
def option_parser():
parser = OptionParser()
parser.add_option("-d", "--db",
type="int", dest="db", default=1,
help="Redis DB to... | """Utility for clearing all keys out of redis -- do not use in production!"""
import sys
from optparse import OptionParser
import redis
def option_parser():
parser = OptionParser()
parser.add_option("-d", "--db",
type="int", dest="db", default=1,
help="Redis DB to... | Print which DB will be cleared. | Print which DB will be cleared.
| Python | bsd-3-clause | vishwaprakashmishra/xmatrix,TouK/vumi,vishwaprakashmishra/xmatrix,harrissoerja/vumi,harrissoerja/vumi,TouK/vumi,TouK/vumi,harrissoerja/vumi,vishwaprakashmishra/xmatrix | """Utility for clearing all keys out of redis -- do not use in production!"""
import sys
from optparse import OptionParser
import redis
def option_parser():
parser = OptionParser()
parser.add_option("-d", "--db",
type="int", dest="db", default=1,
help="Redis DB to... | """Utility for clearing all keys out of redis -- do not use in production!"""
import sys
from optparse import OptionParser
import redis
def option_parser():
parser = OptionParser()
parser.add_option("-d", "--db",
type="int", dest="db", default=1,
help="Redis DB to... | <commit_before>"""Utility for clearing all keys out of redis -- do not use in production!"""
import sys
from optparse import OptionParser
import redis
def option_parser():
parser = OptionParser()
parser.add_option("-d", "--db",
type="int", dest="db", default=1,
he... | """Utility for clearing all keys out of redis -- do not use in production!"""
import sys
from optparse import OptionParser
import redis
def option_parser():
parser = OptionParser()
parser.add_option("-d", "--db",
type="int", dest="db", default=1,
help="Redis DB to... | """Utility for clearing all keys out of redis -- do not use in production!"""
import sys
from optparse import OptionParser
import redis
def option_parser():
parser = OptionParser()
parser.add_option("-d", "--db",
type="int", dest="db", default=1,
help="Redis DB to... | <commit_before>"""Utility for clearing all keys out of redis -- do not use in production!"""
import sys
from optparse import OptionParser
import redis
def option_parser():
parser = OptionParser()
parser.add_option("-d", "--db",
type="int", dest="db", default=1,
he... |
068b7f8886af9c468f20b41efd76817bfc237f69 | serrano/__init__.py | serrano/__init__.py | __version_info__ = {
'major': 2,
'minor': 0,
'micro': 19,
'releaselevel': 'beta',
'serial': 1
}
def get_version(short=False):
assert __version_info__['releaselevel'] in ('alpha', 'beta', 'final')
vers = ["%(major)i.%(minor)i" % __version_info__, ]
if __version_info__['micro']:
v... | __version_info__ = {
'major': 2,
'minor': 1,
'micro': 0,
'releaselevel': 'beta',
'serial': 1
}
def get_version(short=False):
assert __version_info__['releaselevel'] in ('alpha', 'beta', 'final')
vers = ["%(major)i.%(minor)i" % __version_info__, ]
if __version_info__['micro']:
ve... | Update branch to version 2.1.0 beta | Update branch to version 2.1.0 beta
| Python | bsd-2-clause | chop-dbhi/serrano,rv816/serrano_night,rv816/serrano_night,chop-dbhi/serrano | __version_info__ = {
'major': 2,
'minor': 0,
'micro': 19,
'releaselevel': 'beta',
'serial': 1
}
def get_version(short=False):
assert __version_info__['releaselevel'] in ('alpha', 'beta', 'final')
vers = ["%(major)i.%(minor)i" % __version_info__, ]
if __version_info__['micro']:
v... | __version_info__ = {
'major': 2,
'minor': 1,
'micro': 0,
'releaselevel': 'beta',
'serial': 1
}
def get_version(short=False):
assert __version_info__['releaselevel'] in ('alpha', 'beta', 'final')
vers = ["%(major)i.%(minor)i" % __version_info__, ]
if __version_info__['micro']:
ve... | <commit_before>__version_info__ = {
'major': 2,
'minor': 0,
'micro': 19,
'releaselevel': 'beta',
'serial': 1
}
def get_version(short=False):
assert __version_info__['releaselevel'] in ('alpha', 'beta', 'final')
vers = ["%(major)i.%(minor)i" % __version_info__, ]
if __version_info__['mic... | __version_info__ = {
'major': 2,
'minor': 1,
'micro': 0,
'releaselevel': 'beta',
'serial': 1
}
def get_version(short=False):
assert __version_info__['releaselevel'] in ('alpha', 'beta', 'final')
vers = ["%(major)i.%(minor)i" % __version_info__, ]
if __version_info__['micro']:
ve... | __version_info__ = {
'major': 2,
'minor': 0,
'micro': 19,
'releaselevel': 'beta',
'serial': 1
}
def get_version(short=False):
assert __version_info__['releaselevel'] in ('alpha', 'beta', 'final')
vers = ["%(major)i.%(minor)i" % __version_info__, ]
if __version_info__['micro']:
v... | <commit_before>__version_info__ = {
'major': 2,
'minor': 0,
'micro': 19,
'releaselevel': 'beta',
'serial': 1
}
def get_version(short=False):
assert __version_info__['releaselevel'] in ('alpha', 'beta', 'final')
vers = ["%(major)i.%(minor)i" % __version_info__, ]
if __version_info__['mic... |
4bc9d1b51cd735c366edce81cd4e36e2eca904c7 | worker/models/spotify_artist.py | worker/models/spotify_artist.py | from spotify_item import SpotifyItem
class Artist(SpotifyItem):
def __init__(self, **entries):
super(Artist, self).__init__(**entries)
def __repr__(self):
return '<Artist: {0}>'.format(self.name)
| from spotify_item import SpotifyItem
from pyechonest import config
from pyechonest import artist
from worker.config import ECHO_NEST_API_KEY
config.ECHO_NEST_API_KEY = ECHO_NEST_API_KEY
class Artist(SpotifyItem):
def __init__(self, **entries):
super(Artist, self).__init__(**entries)
self.echone... | Add echo nest to artist model | Add echo nest to artist model
| Python | mit | projectweekend/song-feed-worker | from spotify_item import SpotifyItem
class Artist(SpotifyItem):
def __init__(self, **entries):
super(Artist, self).__init__(**entries)
def __repr__(self):
return '<Artist: {0}>'.format(self.name)
Add echo nest to artist model | from spotify_item import SpotifyItem
from pyechonest import config
from pyechonest import artist
from worker.config import ECHO_NEST_API_KEY
config.ECHO_NEST_API_KEY = ECHO_NEST_API_KEY
class Artist(SpotifyItem):
def __init__(self, **entries):
super(Artist, self).__init__(**entries)
self.echone... | <commit_before>from spotify_item import SpotifyItem
class Artist(SpotifyItem):
def __init__(self, **entries):
super(Artist, self).__init__(**entries)
def __repr__(self):
return '<Artist: {0}>'.format(self.name)
<commit_msg>Add echo nest to artist model<commit_after> | from spotify_item import SpotifyItem
from pyechonest import config
from pyechonest import artist
from worker.config import ECHO_NEST_API_KEY
config.ECHO_NEST_API_KEY = ECHO_NEST_API_KEY
class Artist(SpotifyItem):
def __init__(self, **entries):
super(Artist, self).__init__(**entries)
self.echone... | from spotify_item import SpotifyItem
class Artist(SpotifyItem):
def __init__(self, **entries):
super(Artist, self).__init__(**entries)
def __repr__(self):
return '<Artist: {0}>'.format(self.name)
Add echo nest to artist modelfrom spotify_item import SpotifyItem
from pyechonest import config
... | <commit_before>from spotify_item import SpotifyItem
class Artist(SpotifyItem):
def __init__(self, **entries):
super(Artist, self).__init__(**entries)
def __repr__(self):
return '<Artist: {0}>'.format(self.name)
<commit_msg>Add echo nest to artist model<commit_after>from spotify_item import S... |
9a04a0506f9ebc0d4cca5fa7a77d4b86f88ffea4 | src/tests/test_PolicyIterationModified.py | src/tests/test_PolicyIterationModified.py | # -*- coding: utf-8 -*-
"""
Created on Wed Sep 11 13:33:16 2013
@author: steve
"""
from nose.tools import assert_equal
import numpy as np
import scipy.sparse as sp
from mdptoolbox import mdp
from utils import BaseTestMDP, assert_sequence_almost_equal
class TestPolicyIterationModified(BaseTestMDP):
def test_sma... | # -*- coding: utf-8 -*-
"""
Created on Wed Sep 11 13:33:16 2013
@author: steve
"""
from nose.tools import assert_equal
import numpy as np
import scipy.sparse as sp
from mdptoolbox import mdp
from .utils import BaseTestMDP, assert_sequence_almost_equal
class TestPolicyIterationModified(BaseTestMDP):
def test_sm... | Use Python 3 .import syntax | [tests] Use Python 3 .import syntax
| Python | bsd-3-clause | silgon/pymdptoolbox,yasserglez/pymdptoolbox,silgon/pymdptoolbox,sawcordwell/pymdptoolbox,McCabeJM/pymdptoolbox,sawcordwell/pymdptoolbox,McCabeJM/pymdptoolbox,yasserglez/pymdptoolbox | # -*- coding: utf-8 -*-
"""
Created on Wed Sep 11 13:33:16 2013
@author: steve
"""
from nose.tools import assert_equal
import numpy as np
import scipy.sparse as sp
from mdptoolbox import mdp
from utils import BaseTestMDP, assert_sequence_almost_equal
class TestPolicyIterationModified(BaseTestMDP):
def test_sma... | # -*- coding: utf-8 -*-
"""
Created on Wed Sep 11 13:33:16 2013
@author: steve
"""
from nose.tools import assert_equal
import numpy as np
import scipy.sparse as sp
from mdptoolbox import mdp
from .utils import BaseTestMDP, assert_sequence_almost_equal
class TestPolicyIterationModified(BaseTestMDP):
def test_sm... | <commit_before># -*- coding: utf-8 -*-
"""
Created on Wed Sep 11 13:33:16 2013
@author: steve
"""
from nose.tools import assert_equal
import numpy as np
import scipy.sparse as sp
from mdptoolbox import mdp
from utils import BaseTestMDP, assert_sequence_almost_equal
class TestPolicyIterationModified(BaseTestMDP):
... | # -*- coding: utf-8 -*-
"""
Created on Wed Sep 11 13:33:16 2013
@author: steve
"""
from nose.tools import assert_equal
import numpy as np
import scipy.sparse as sp
from mdptoolbox import mdp
from .utils import BaseTestMDP, assert_sequence_almost_equal
class TestPolicyIterationModified(BaseTestMDP):
def test_sm... | # -*- coding: utf-8 -*-
"""
Created on Wed Sep 11 13:33:16 2013
@author: steve
"""
from nose.tools import assert_equal
import numpy as np
import scipy.sparse as sp
from mdptoolbox import mdp
from utils import BaseTestMDP, assert_sequence_almost_equal
class TestPolicyIterationModified(BaseTestMDP):
def test_sma... | <commit_before># -*- coding: utf-8 -*-
"""
Created on Wed Sep 11 13:33:16 2013
@author: steve
"""
from nose.tools import assert_equal
import numpy as np
import scipy.sparse as sp
from mdptoolbox import mdp
from utils import BaseTestMDP, assert_sequence_almost_equal
class TestPolicyIterationModified(BaseTestMDP):
... |
964125fd5871179c51ea24af0a3767ce88431c26 | modules/bibharvest/lib/oai_repository_config.py | modules/bibharvest/lib/oai_repository_config.py | ## $Id$
##
## This file is part of CDS Invenio.
## Copyright (C) 2002, 2003, 2004, 2005, 2006 CERN.
##
## CDS Invenio is free software; you can redistribute it and/or
## modify it under the terms of the GNU General Public License as
## published by the Free Software Foundation; either version 2 of the
## License, or (a... | ## $Id$
##
## This file is part of CDS Invenio.
## Copyright (C) 2002, 2003, 2004, 2005, 2006 CERN.
##
## CDS Invenio is free software; you can redistribute it and/or
## modify it under the terms of the GNU General Public License as
## published by the Free Software Foundation; either version 2 of the
## License, or (a... | Disable W0611 warning, as the imported config variables are exposed to the business logic from here. | Disable W0611 warning, as the imported config variables are exposed to
the business logic from here.
| Python | mit | tiborsimko/invenio,inveniosoftware/invenio,tiborsimko/invenio,inveniosoftware/invenio | ## $Id$
##
## This file is part of CDS Invenio.
## Copyright (C) 2002, 2003, 2004, 2005, 2006 CERN.
##
## CDS Invenio is free software; you can redistribute it and/or
## modify it under the terms of the GNU General Public License as
## published by the Free Software Foundation; either version 2 of the
## License, or (a... | ## $Id$
##
## This file is part of CDS Invenio.
## Copyright (C) 2002, 2003, 2004, 2005, 2006 CERN.
##
## CDS Invenio is free software; you can redistribute it and/or
## modify it under the terms of the GNU General Public License as
## published by the Free Software Foundation; either version 2 of the
## License, or (a... | <commit_before>## $Id$
##
## This file is part of CDS Invenio.
## Copyright (C) 2002, 2003, 2004, 2005, 2006 CERN.
##
## CDS Invenio is free software; you can redistribute it and/or
## modify it under the terms of the GNU General Public License as
## published by the Free Software Foundation; either version 2 of the
##... | ## $Id$
##
## This file is part of CDS Invenio.
## Copyright (C) 2002, 2003, 2004, 2005, 2006 CERN.
##
## CDS Invenio is free software; you can redistribute it and/or
## modify it under the terms of the GNU General Public License as
## published by the Free Software Foundation; either version 2 of the
## License, or (a... | ## $Id$
##
## This file is part of CDS Invenio.
## Copyright (C) 2002, 2003, 2004, 2005, 2006 CERN.
##
## CDS Invenio is free software; you can redistribute it and/or
## modify it under the terms of the GNU General Public License as
## published by the Free Software Foundation; either version 2 of the
## License, or (a... | <commit_before>## $Id$
##
## This file is part of CDS Invenio.
## Copyright (C) 2002, 2003, 2004, 2005, 2006 CERN.
##
## CDS Invenio is free software; you can redistribute it and/or
## modify it under the terms of the GNU General Public License as
## published by the Free Software Foundation; either version 2 of the
##... |
e4798424b22a38cfca519e5e792644ae7757a4f5 | api/base/pagination.py | api/base/pagination.py | from collections import OrderedDict
from rest_framework import pagination
from rest_framework.response import Response
from rest_framework.utils.urls import (
replace_query_param, remove_query_param
)
class JSONAPIPagination(pagination.PageNumberPagination):
"""Custom paginator that formats responses in a JSO... | from collections import OrderedDict
from rest_framework import pagination
from rest_framework.response import Response
from rest_framework.utils.urls import (
replace_query_param, remove_query_param
)
class JSONAPIPagination(pagination.PageNumberPagination):
"""Custom paginator that formats responses in a JSO... | Allow client to customize page size using page[size] query param | Allow client to customize page size using page[size] query param
| Python | apache-2.0 | samchrisinger/osf.io,fabianvf/osf.io,erinspace/osf.io,lyndsysimon/osf.io,samanehsan/osf.io,brandonPurvis/osf.io,billyhunt/osf.io,baylee-d/osf.io,billyhunt/osf.io,erinspace/osf.io,ZobairAlijan/osf.io,mfraezz/osf.io,adlius/osf.io,brandonPurvis/osf.io,HalcyonChimera/osf.io,GageGaskins/osf.io,jnayak1/osf.io,jinluyuan/osf.i... | from collections import OrderedDict
from rest_framework import pagination
from rest_framework.response import Response
from rest_framework.utils.urls import (
replace_query_param, remove_query_param
)
class JSONAPIPagination(pagination.PageNumberPagination):
"""Custom paginator that formats responses in a JSO... | from collections import OrderedDict
from rest_framework import pagination
from rest_framework.response import Response
from rest_framework.utils.urls import (
replace_query_param, remove_query_param
)
class JSONAPIPagination(pagination.PageNumberPagination):
"""Custom paginator that formats responses in a JSO... | <commit_before>from collections import OrderedDict
from rest_framework import pagination
from rest_framework.response import Response
from rest_framework.utils.urls import (
replace_query_param, remove_query_param
)
class JSONAPIPagination(pagination.PageNumberPagination):
"""Custom paginator that formats res... | from collections import OrderedDict
from rest_framework import pagination
from rest_framework.response import Response
from rest_framework.utils.urls import (
replace_query_param, remove_query_param
)
class JSONAPIPagination(pagination.PageNumberPagination):
"""Custom paginator that formats responses in a JSO... | from collections import OrderedDict
from rest_framework import pagination
from rest_framework.response import Response
from rest_framework.utils.urls import (
replace_query_param, remove_query_param
)
class JSONAPIPagination(pagination.PageNumberPagination):
"""Custom paginator that formats responses in a JSO... | <commit_before>from collections import OrderedDict
from rest_framework import pagination
from rest_framework.response import Response
from rest_framework.utils.urls import (
replace_query_param, remove_query_param
)
class JSONAPIPagination(pagination.PageNumberPagination):
"""Custom paginator that formats res... |
e284c0e512edd18ed0ef1259fd4606d630699f3a | wtl/wtgithub/models.py | wtl/wtgithub/models.py | from __future__ import unicode_literals
from django.utils.encoding import python_2_unicode_compatible
from django.utils.translation import ugettext_lazy as _
from django.db import models
@python_2_unicode_compatible
class Repository(models.Model):
"""
Repository
Represents github repository. Name, descr... | from __future__ import unicode_literals
from django.utils.encoding import python_2_unicode_compatible
from django.utils.translation import ugettext_lazy as _
from django.db import models
@python_2_unicode_compatible
class Repository(models.Model):
"""
Repository
Represents github repository. Name, descr... | Add missing `__str__` to `Repository` model | Add missing `__str__` to `Repository` model
Can't use `@python_2_unicode_compatible` without defining `__str__`.
| Python | mit | elegion/djangodash2013,elegion/djangodash2013 | from __future__ import unicode_literals
from django.utils.encoding import python_2_unicode_compatible
from django.utils.translation import ugettext_lazy as _
from django.db import models
@python_2_unicode_compatible
class Repository(models.Model):
"""
Repository
Represents github repository. Name, descr... | from __future__ import unicode_literals
from django.utils.encoding import python_2_unicode_compatible
from django.utils.translation import ugettext_lazy as _
from django.db import models
@python_2_unicode_compatible
class Repository(models.Model):
"""
Repository
Represents github repository. Name, descr... | <commit_before>from __future__ import unicode_literals
from django.utils.encoding import python_2_unicode_compatible
from django.utils.translation import ugettext_lazy as _
from django.db import models
@python_2_unicode_compatible
class Repository(models.Model):
"""
Repository
Represents github reposito... | from __future__ import unicode_literals
from django.utils.encoding import python_2_unicode_compatible
from django.utils.translation import ugettext_lazy as _
from django.db import models
@python_2_unicode_compatible
class Repository(models.Model):
"""
Repository
Represents github repository. Name, descr... | from __future__ import unicode_literals
from django.utils.encoding import python_2_unicode_compatible
from django.utils.translation import ugettext_lazy as _
from django.db import models
@python_2_unicode_compatible
class Repository(models.Model):
"""
Repository
Represents github repository. Name, descr... | <commit_before>from __future__ import unicode_literals
from django.utils.encoding import python_2_unicode_compatible
from django.utils.translation import ugettext_lazy as _
from django.db import models
@python_2_unicode_compatible
class Repository(models.Model):
"""
Repository
Represents github reposito... |
fd0479742afd994bfb241415f7db9c0c971a09b3 | conanfile.py | conanfile.py | from conans import ConanFile
from conans.tools import download, unzip
import os
VERSION = "0.0.2"
class ClangTidyTargetCMakeConan(ConanFile):
name = "clang-tidy-target-cmake"
version = os.environ.get("CONAN_VERSION_OVERRIDE", VERSION)
generators = "cmake"
requires = ("cmake-include-guard/master@smspi... | from conans import ConanFile
from conans.tools import download, unzip
import os
VERSION = "0.0.2"
class ClangTidyTargetCMakeConan(ConanFile):
name = "clang-tidy-target-cmake"
version = os.environ.get("CONAN_VERSION_OVERRIDE", VERSION)
generators = "cmake"
requires = ("cmake-include-guard/master@smspi... | Copy find modules to root of module path | conan: Copy find modules to root of module path
| Python | mit | polysquare/clang-tidy-target-cmake,polysquare/clang-tidy-target-cmake | from conans import ConanFile
from conans.tools import download, unzip
import os
VERSION = "0.0.2"
class ClangTidyTargetCMakeConan(ConanFile):
name = "clang-tidy-target-cmake"
version = os.environ.get("CONAN_VERSION_OVERRIDE", VERSION)
generators = "cmake"
requires = ("cmake-include-guard/master@smspi... | from conans import ConanFile
from conans.tools import download, unzip
import os
VERSION = "0.0.2"
class ClangTidyTargetCMakeConan(ConanFile):
name = "clang-tidy-target-cmake"
version = os.environ.get("CONAN_VERSION_OVERRIDE", VERSION)
generators = "cmake"
requires = ("cmake-include-guard/master@smspi... | <commit_before>from conans import ConanFile
from conans.tools import download, unzip
import os
VERSION = "0.0.2"
class ClangTidyTargetCMakeConan(ConanFile):
name = "clang-tidy-target-cmake"
version = os.environ.get("CONAN_VERSION_OVERRIDE", VERSION)
generators = "cmake"
requires = ("cmake-include-gua... | from conans import ConanFile
from conans.tools import download, unzip
import os
VERSION = "0.0.2"
class ClangTidyTargetCMakeConan(ConanFile):
name = "clang-tidy-target-cmake"
version = os.environ.get("CONAN_VERSION_OVERRIDE", VERSION)
generators = "cmake"
requires = ("cmake-include-guard/master@smspi... | from conans import ConanFile
from conans.tools import download, unzip
import os
VERSION = "0.0.2"
class ClangTidyTargetCMakeConan(ConanFile):
name = "clang-tidy-target-cmake"
version = os.environ.get("CONAN_VERSION_OVERRIDE", VERSION)
generators = "cmake"
requires = ("cmake-include-guard/master@smspi... | <commit_before>from conans import ConanFile
from conans.tools import download, unzip
import os
VERSION = "0.0.2"
class ClangTidyTargetCMakeConan(ConanFile):
name = "clang-tidy-target-cmake"
version = os.environ.get("CONAN_VERSION_OVERRIDE", VERSION)
generators = "cmake"
requires = ("cmake-include-gua... |
ce71f3bd66ad5b532e43791cca0ef811680000de | constants.py | constants.py | import os
from pathlib import Path
from string import Template
from dotenv import load_dotenv
load_dotenv() # helps with local dev
TEMPLATE_PATH = Path.cwd() / "email.md"
STARMINDER_COUNT = int(os.getenv("STARMINDER_COUNT"))
STARMINDER_RECIPIENT = os.getenv("STARMINDER_RECIPIENT")
STARMINDER_SUBJECT = Template("... | import os
from pathlib import Path
from string import Template
from dotenv import load_dotenv
load_dotenv() # helps with local dev
TEMPLATE_PATH = Path.cwd() / "email.md"
STARMINDER_COUNT = int(os.getenv("STARMINDER_COUNT"))
STARMINDER_RECIPIENT = os.getenv("STARMINDER_RECIPIENT")
STARMINDER_SUBJECT = Template("... | Rename GH token env var | Rename GH token env var
GitHub disallows user set GITHUB_ prefixed ones.
| Python | mit | nkantar/Starminder | import os
from pathlib import Path
from string import Template
from dotenv import load_dotenv
load_dotenv() # helps with local dev
TEMPLATE_PATH = Path.cwd() / "email.md"
STARMINDER_COUNT = int(os.getenv("STARMINDER_COUNT"))
STARMINDER_RECIPIENT = os.getenv("STARMINDER_RECIPIENT")
STARMINDER_SUBJECT = Template("... | import os
from pathlib import Path
from string import Template
from dotenv import load_dotenv
load_dotenv() # helps with local dev
TEMPLATE_PATH = Path.cwd() / "email.md"
STARMINDER_COUNT = int(os.getenv("STARMINDER_COUNT"))
STARMINDER_RECIPIENT = os.getenv("STARMINDER_RECIPIENT")
STARMINDER_SUBJECT = Template("... | <commit_before>import os
from pathlib import Path
from string import Template
from dotenv import load_dotenv
load_dotenv() # helps with local dev
TEMPLATE_PATH = Path.cwd() / "email.md"
STARMINDER_COUNT = int(os.getenv("STARMINDER_COUNT"))
STARMINDER_RECIPIENT = os.getenv("STARMINDER_RECIPIENT")
STARMINDER_SUBJE... | import os
from pathlib import Path
from string import Template
from dotenv import load_dotenv
load_dotenv() # helps with local dev
TEMPLATE_PATH = Path.cwd() / "email.md"
STARMINDER_COUNT = int(os.getenv("STARMINDER_COUNT"))
STARMINDER_RECIPIENT = os.getenv("STARMINDER_RECIPIENT")
STARMINDER_SUBJECT = Template("... | import os
from pathlib import Path
from string import Template
from dotenv import load_dotenv
load_dotenv() # helps with local dev
TEMPLATE_PATH = Path.cwd() / "email.md"
STARMINDER_COUNT = int(os.getenv("STARMINDER_COUNT"))
STARMINDER_RECIPIENT = os.getenv("STARMINDER_RECIPIENT")
STARMINDER_SUBJECT = Template("... | <commit_before>import os
from pathlib import Path
from string import Template
from dotenv import load_dotenv
load_dotenv() # helps with local dev
TEMPLATE_PATH = Path.cwd() / "email.md"
STARMINDER_COUNT = int(os.getenv("STARMINDER_COUNT"))
STARMINDER_RECIPIENT = os.getenv("STARMINDER_RECIPIENT")
STARMINDER_SUBJE... |
a9a26ddff2e0d033854621e13b19693561f9fe5f | tests/drawing/demo_change_artist_group.py | tests/drawing/demo_change_artist_group.py | #!/usr/bin/env python3
"""An orange rectangle should be displayed on top of a green one. When you
click with the mouse, the green rectangle should move on top. When you release
the mouse, the orange rectangle should move back to the top."""
import pyglet
import glooey
import vecrec
from glooey.drawing import gree... | #!/usr/bin/env python3
"""An orange rectangle should be displayed on top of a green one. When you
click with the mouse, the green rectangle should move on top. When you release
the mouse, the orange rectangle should move back to the top."""
import pyglet
import glooey
import vecrec
from glooey.drawing import gree... | Make the test a bit more verbose. | Make the test a bit more verbose.
| Python | mit | kxgames/glooey,kxgames/glooey | #!/usr/bin/env python3
"""An orange rectangle should be displayed on top of a green one. When you
click with the mouse, the green rectangle should move on top. When you release
the mouse, the orange rectangle should move back to the top."""
import pyglet
import glooey
import vecrec
from glooey.drawing import gree... | #!/usr/bin/env python3
"""An orange rectangle should be displayed on top of a green one. When you
click with the mouse, the green rectangle should move on top. When you release
the mouse, the orange rectangle should move back to the top."""
import pyglet
import glooey
import vecrec
from glooey.drawing import gree... | <commit_before>#!/usr/bin/env python3
"""An orange rectangle should be displayed on top of a green one. When you
click with the mouse, the green rectangle should move on top. When you release
the mouse, the orange rectangle should move back to the top."""
import pyglet
import glooey
import vecrec
from glooey.draw... | #!/usr/bin/env python3
"""An orange rectangle should be displayed on top of a green one. When you
click with the mouse, the green rectangle should move on top. When you release
the mouse, the orange rectangle should move back to the top."""
import pyglet
import glooey
import vecrec
from glooey.drawing import gree... | #!/usr/bin/env python3
"""An orange rectangle should be displayed on top of a green one. When you
click with the mouse, the green rectangle should move on top. When you release
the mouse, the orange rectangle should move back to the top."""
import pyglet
import glooey
import vecrec
from glooey.drawing import gree... | <commit_before>#!/usr/bin/env python3
"""An orange rectangle should be displayed on top of a green one. When you
click with the mouse, the green rectangle should move on top. When you release
the mouse, the orange rectangle should move back to the top."""
import pyglet
import glooey
import vecrec
from glooey.draw... |
7437382d966d39c4de21d2686bd8f31a23e5c47b | IPython/html/texteditor/handlers.py | IPython/html/texteditor/handlers.py | #encoding: utf-8
"""Tornado handlers for the terminal emulator."""
# Copyright (c) IPython Development Team.
# Distributed under the terms of the Modified BSD License.
from tornado import web
from ..base.handlers import IPythonHandler, path_regex
from ..utils import url_escape
class EditorHandler(IPythonHandler):
... | #encoding: utf-8
"""Tornado handlers for the terminal emulator."""
# Copyright (c) IPython Development Team.
# Distributed under the terms of the Modified BSD License.
from tornado import web
from ..base.handlers import IPythonHandler, path_regex
from ..utils import url_escape
class EditorHandler(IPythonHandler):
... | Set page title for editor | Set page title for editor
| Python | bsd-3-clause | ipython/ipython,ipython/ipython | #encoding: utf-8
"""Tornado handlers for the terminal emulator."""
# Copyright (c) IPython Development Team.
# Distributed under the terms of the Modified BSD License.
from tornado import web
from ..base.handlers import IPythonHandler, path_regex
from ..utils import url_escape
class EditorHandler(IPythonHandler):
... | #encoding: utf-8
"""Tornado handlers for the terminal emulator."""
# Copyright (c) IPython Development Team.
# Distributed under the terms of the Modified BSD License.
from tornado import web
from ..base.handlers import IPythonHandler, path_regex
from ..utils import url_escape
class EditorHandler(IPythonHandler):
... | <commit_before>#encoding: utf-8
"""Tornado handlers for the terminal emulator."""
# Copyright (c) IPython Development Team.
# Distributed under the terms of the Modified BSD License.
from tornado import web
from ..base.handlers import IPythonHandler, path_regex
from ..utils import url_escape
class EditorHandler(IPyt... | #encoding: utf-8
"""Tornado handlers for the terminal emulator."""
# Copyright (c) IPython Development Team.
# Distributed under the terms of the Modified BSD License.
from tornado import web
from ..base.handlers import IPythonHandler, path_regex
from ..utils import url_escape
class EditorHandler(IPythonHandler):
... | #encoding: utf-8
"""Tornado handlers for the terminal emulator."""
# Copyright (c) IPython Development Team.
# Distributed under the terms of the Modified BSD License.
from tornado import web
from ..base.handlers import IPythonHandler, path_regex
from ..utils import url_escape
class EditorHandler(IPythonHandler):
... | <commit_before>#encoding: utf-8
"""Tornado handlers for the terminal emulator."""
# Copyright (c) IPython Development Team.
# Distributed under the terms of the Modified BSD License.
from tornado import web
from ..base.handlers import IPythonHandler, path_regex
from ..utils import url_escape
class EditorHandler(IPyt... |
ecee83e5cbc66c631fce5278bc2533eb2f711afe | crust/api.py | crust/api.py | from . import requests
class Api(object):
resources = {}
def __init__(self, session=None, *args, **kwargs):
super(Api, self).__init__(*args, **kwargs)
if session is None:
session = requests.session()
self.session = session
def __getattr__(self, name):
if na... | import json
import posixpath
from . import requests
from . import six
from .exceptions import ResponseError
class Api(object):
resources = {}
def __init__(self, session=None, *args, **kwargs):
super(Api, self).__init__(*args, **kwargs)
if session is None:
session = requests.ses... | Make the Api class the key focal point to accessing the API | Make the Api class the key focal point to accessing the API
| Python | bsd-2-clause | dstufft/crust | from . import requests
class Api(object):
resources = {}
def __init__(self, session=None, *args, **kwargs):
super(Api, self).__init__(*args, **kwargs)
if session is None:
session = requests.session()
self.session = session
def __getattr__(self, name):
if na... | import json
import posixpath
from . import requests
from . import six
from .exceptions import ResponseError
class Api(object):
resources = {}
def __init__(self, session=None, *args, **kwargs):
super(Api, self).__init__(*args, **kwargs)
if session is None:
session = requests.ses... | <commit_before>from . import requests
class Api(object):
resources = {}
def __init__(self, session=None, *args, **kwargs):
super(Api, self).__init__(*args, **kwargs)
if session is None:
session = requests.session()
self.session = session
def __getattr__(self, name)... | import json
import posixpath
from . import requests
from . import six
from .exceptions import ResponseError
class Api(object):
resources = {}
def __init__(self, session=None, *args, **kwargs):
super(Api, self).__init__(*args, **kwargs)
if session is None:
session = requests.ses... | from . import requests
class Api(object):
resources = {}
def __init__(self, session=None, *args, **kwargs):
super(Api, self).__init__(*args, **kwargs)
if session is None:
session = requests.session()
self.session = session
def __getattr__(self, name):
if na... | <commit_before>from . import requests
class Api(object):
resources = {}
def __init__(self, session=None, *args, **kwargs):
super(Api, self).__init__(*args, **kwargs)
if session is None:
session = requests.session()
self.session = session
def __getattr__(self, name)... |
bd75d4548edfde2bebff116f33bfb66be6c982e2 | warthog/transport.py | warthog/transport.py | # -*- coding: utf-8 -*-
"""
"""
from __future__ import print_function, division
import ssl
import warnings
import requests
from requests.adapters import HTTPAdapter
from requests.packages.urllib3.poolmanager import PoolManager
from requests.packages.urllib3.exceptions import InsecureRequestWarning
def get_trans... | # -*- coding: utf-8 -*-
"""
"""
from __future__ import print_function, division
import ssl
import warnings
import requests
from requests.adapters import HTTPAdapter
from requests.packages.urllib3.poolmanager import PoolManager
from requests.packages.urllib3.exceptions import InsecureRequestWarning
def get_trans... | Change the name of the verify/no-verify param | Change the name of the verify/no-verify param
| Python | mit | smarter-travel-media/warthog | # -*- coding: utf-8 -*-
"""
"""
from __future__ import print_function, division
import ssl
import warnings
import requests
from requests.adapters import HTTPAdapter
from requests.packages.urllib3.poolmanager import PoolManager
from requests.packages.urllib3.exceptions import InsecureRequestWarning
def get_trans... | # -*- coding: utf-8 -*-
"""
"""
from __future__ import print_function, division
import ssl
import warnings
import requests
from requests.adapters import HTTPAdapter
from requests.packages.urllib3.poolmanager import PoolManager
from requests.packages.urllib3.exceptions import InsecureRequestWarning
def get_trans... | <commit_before># -*- coding: utf-8 -*-
"""
"""
from __future__ import print_function, division
import ssl
import warnings
import requests
from requests.adapters import HTTPAdapter
from requests.packages.urllib3.poolmanager import PoolManager
from requests.packages.urllib3.exceptions import InsecureRequestWarning
... | # -*- coding: utf-8 -*-
"""
"""
from __future__ import print_function, division
import ssl
import warnings
import requests
from requests.adapters import HTTPAdapter
from requests.packages.urllib3.poolmanager import PoolManager
from requests.packages.urllib3.exceptions import InsecureRequestWarning
def get_trans... | # -*- coding: utf-8 -*-
"""
"""
from __future__ import print_function, division
import ssl
import warnings
import requests
from requests.adapters import HTTPAdapter
from requests.packages.urllib3.poolmanager import PoolManager
from requests.packages.urllib3.exceptions import InsecureRequestWarning
def get_trans... | <commit_before># -*- coding: utf-8 -*-
"""
"""
from __future__ import print_function, division
import ssl
import warnings
import requests
from requests.adapters import HTTPAdapter
from requests.packages.urllib3.poolmanager import PoolManager
from requests.packages.urllib3.exceptions import InsecureRequestWarning
... |
f232e433e6d4ad4f7c54a6d119c27a04743acee8 | graphene/types/argument.py | graphene/types/argument.py | from collections import OrderedDict
from itertools import chain
from ..utils.orderedtype import OrderedType
from .structures import NonNull
class Argument(OrderedType):
def __init__(self, type, default_value=None, description=None, name=None, required=False, _creation_counter=None):
super(Argument, self... | from collections import OrderedDict
from itertools import chain
from ..utils.orderedtype import OrderedType
from .structures import NonNull
class Argument(OrderedType):
def __init__(self, type, default_value=None, description=None, name=None, required=False, _creation_counter=None):
super(Argument, self... | Make assertion message use same var as test | Make assertion message use same var as test
Ensure that the assertion message correctly shows the value used by
the assertion test.
| Python | mit | sjhewitt/graphene,sjhewitt/graphene,Globegitter/graphene,Globegitter/graphene,graphql-python/graphene,graphql-python/graphene | from collections import OrderedDict
from itertools import chain
from ..utils.orderedtype import OrderedType
from .structures import NonNull
class Argument(OrderedType):
def __init__(self, type, default_value=None, description=None, name=None, required=False, _creation_counter=None):
super(Argument, self... | from collections import OrderedDict
from itertools import chain
from ..utils.orderedtype import OrderedType
from .structures import NonNull
class Argument(OrderedType):
def __init__(self, type, default_value=None, description=None, name=None, required=False, _creation_counter=None):
super(Argument, self... | <commit_before>from collections import OrderedDict
from itertools import chain
from ..utils.orderedtype import OrderedType
from .structures import NonNull
class Argument(OrderedType):
def __init__(self, type, default_value=None, description=None, name=None, required=False, _creation_counter=None):
super... | from collections import OrderedDict
from itertools import chain
from ..utils.orderedtype import OrderedType
from .structures import NonNull
class Argument(OrderedType):
def __init__(self, type, default_value=None, description=None, name=None, required=False, _creation_counter=None):
super(Argument, self... | from collections import OrderedDict
from itertools import chain
from ..utils.orderedtype import OrderedType
from .structures import NonNull
class Argument(OrderedType):
def __init__(self, type, default_value=None, description=None, name=None, required=False, _creation_counter=None):
super(Argument, self... | <commit_before>from collections import OrderedDict
from itertools import chain
from ..utils.orderedtype import OrderedType
from .structures import NonNull
class Argument(OrderedType):
def __init__(self, type, default_value=None, description=None, name=None, required=False, _creation_counter=None):
super... |
d75cd0e1a8894f86877f455abd8f281f0d3a246a | flake8diff/vcs/hg.py | flake8diff/vcs/hg.py | from __future__ import unicode_literals, print_function
import logging
import subprocess
from ..utils import _execute
from .base import VCSBase
logger = logging.getLogger(__name__)
class HgVCS(VCSBase):
"""
Mercurial support implementation
"""
name = 'hg'
def get_vcs(self):
"""
... | from __future__ import unicode_literals, print_function
import logging
import subprocess
from ..utils import _execute
from .base import VCSBase
logger = logging.getLogger(__name__)
class HgVCS(VCSBase):
"""
Mercurial support implementation
"""
name = 'hg'
def get_vcs(self):
"""
... | Add changed_files support to mercurial | Add changed_files support to mercurial
| Python | mit | dealertrack/flake8-diff,miki725/flake8-diff | from __future__ import unicode_literals, print_function
import logging
import subprocess
from ..utils import _execute
from .base import VCSBase
logger = logging.getLogger(__name__)
class HgVCS(VCSBase):
"""
Mercurial support implementation
"""
name = 'hg'
def get_vcs(self):
"""
... | from __future__ import unicode_literals, print_function
import logging
import subprocess
from ..utils import _execute
from .base import VCSBase
logger = logging.getLogger(__name__)
class HgVCS(VCSBase):
"""
Mercurial support implementation
"""
name = 'hg'
def get_vcs(self):
"""
... | <commit_before>from __future__ import unicode_literals, print_function
import logging
import subprocess
from ..utils import _execute
from .base import VCSBase
logger = logging.getLogger(__name__)
class HgVCS(VCSBase):
"""
Mercurial support implementation
"""
name = 'hg'
def get_vcs(self):
... | from __future__ import unicode_literals, print_function
import logging
import subprocess
from ..utils import _execute
from .base import VCSBase
logger = logging.getLogger(__name__)
class HgVCS(VCSBase):
"""
Mercurial support implementation
"""
name = 'hg'
def get_vcs(self):
"""
... | from __future__ import unicode_literals, print_function
import logging
import subprocess
from ..utils import _execute
from .base import VCSBase
logger = logging.getLogger(__name__)
class HgVCS(VCSBase):
"""
Mercurial support implementation
"""
name = 'hg'
def get_vcs(self):
"""
... | <commit_before>from __future__ import unicode_literals, print_function
import logging
import subprocess
from ..utils import _execute
from .base import VCSBase
logger = logging.getLogger(__name__)
class HgVCS(VCSBase):
"""
Mercurial support implementation
"""
name = 'hg'
def get_vcs(self):
... |
68af617bf9f69ea6a35fc2d57c35853867f03c88 | web/ext/contentment.py | web/ext/contentment.py | # encoding: utf-8
from marrow.package.host import PluginManager
def indent(context, lines, padding='\t'):
return padding + ('\n' + padding).join(lines.split('\n'))
class ContentmentExtension:
needs = ('template', )
def __call__(self, context, app):
def protected_inner(environ, start_response=None):
try:
... | # encoding: utf-8
from marrow.package.host import PluginManager
def indent(context, lines, padding='\t'):
return padding + ('\n' + padding).join(lines.split('\n'))
class ContentmentExtension:
needs = ('template', )
def __call__(self, context, app):
def protected_inner(environ, start_response=None):
try:
... | Mark pudb post_mortem as debug-only, and optional. | Mark pudb post_mortem as debug-only, and optional.
| Python | mit | marrow/contentment,marrow/contentment | # encoding: utf-8
from marrow.package.host import PluginManager
def indent(context, lines, padding='\t'):
return padding + ('\n' + padding).join(lines.split('\n'))
class ContentmentExtension:
needs = ('template', )
def __call__(self, context, app):
def protected_inner(environ, start_response=None):
try:
... | # encoding: utf-8
from marrow.package.host import PluginManager
def indent(context, lines, padding='\t'):
return padding + ('\n' + padding).join(lines.split('\n'))
class ContentmentExtension:
needs = ('template', )
def __call__(self, context, app):
def protected_inner(environ, start_response=None):
try:
... | <commit_before># encoding: utf-8
from marrow.package.host import PluginManager
def indent(context, lines, padding='\t'):
return padding + ('\n' + padding).join(lines.split('\n'))
class ContentmentExtension:
needs = ('template', )
def __call__(self, context, app):
def protected_inner(environ, start_response=... | # encoding: utf-8
from marrow.package.host import PluginManager
def indent(context, lines, padding='\t'):
return padding + ('\n' + padding).join(lines.split('\n'))
class ContentmentExtension:
needs = ('template', )
def __call__(self, context, app):
def protected_inner(environ, start_response=None):
try:
... | # encoding: utf-8
from marrow.package.host import PluginManager
def indent(context, lines, padding='\t'):
return padding + ('\n' + padding).join(lines.split('\n'))
class ContentmentExtension:
needs = ('template', )
def __call__(self, context, app):
def protected_inner(environ, start_response=None):
try:
... | <commit_before># encoding: utf-8
from marrow.package.host import PluginManager
def indent(context, lines, padding='\t'):
return padding + ('\n' + padding).join(lines.split('\n'))
class ContentmentExtension:
needs = ('template', )
def __call__(self, context, app):
def protected_inner(environ, start_response=... |
f7f5bc45f6c3e86e9ea77be7a9be16d86465e3b3 | perfkitbenchmarker/linux_packages/mysqlclient56.py | perfkitbenchmarker/linux_packages/mysqlclient56.py | # Copyright 2014 PerfKitBenchmarker Authors. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by appli... | # Copyright 2014 PerfKitBenchmarker Authors. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by appli... | Install mysqlclient from HTTPs repo. | Install mysqlclient from HTTPs repo.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=263786009
| Python | apache-2.0 | GoogleCloudPlatform/PerfKitBenchmarker,GoogleCloudPlatform/PerfKitBenchmarker,GoogleCloudPlatform/PerfKitBenchmarker,GoogleCloudPlatform/PerfKitBenchmarker | # Copyright 2014 PerfKitBenchmarker Authors. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by appli... | # Copyright 2014 PerfKitBenchmarker Authors. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by appli... | <commit_before># Copyright 2014 PerfKitBenchmarker Authors. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless re... | # Copyright 2014 PerfKitBenchmarker Authors. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by appli... | # Copyright 2014 PerfKitBenchmarker Authors. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by appli... | <commit_before># Copyright 2014 PerfKitBenchmarker Authors. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless re... |
6ba0614a3a2c18307f86f5a6c6f119a2b2587697 | docs/conf.py | docs/conf.py | # pyinfra
# File: docs/conf.py
# Desc: minimal Sphinx config
from datetime import date, datetime
from better import better_theme_path
from pyinfra import __version__
_today = date.today()
copyright = f'{datetime.strftime(_today, "%Y")}, Nick Barrett'
extensions = [
# Official
'sphinx.ext.autodoc',
'sp... | # pyinfra
# File: docs/conf.py
# Desc: minimal Sphinx config
from datetime import date, datetime
from better import better_theme_path
from pyinfra import __version__
_today = date.today()
copyright = '{0}, Nick Barrett'.format(datetime.strftime(_today, '%Y'))
extensions = [
# Official
'sphinx.ext.autodoc'... | Use old style string formatting to appease readthedocs aging 3.5 interpreter. | Use old style string formatting to appease readthedocs aging 3.5 interpreter.
| Python | mit | Fizzadar/pyinfra,Fizzadar/pyinfra | # pyinfra
# File: docs/conf.py
# Desc: minimal Sphinx config
from datetime import date, datetime
from better import better_theme_path
from pyinfra import __version__
_today = date.today()
copyright = f'{datetime.strftime(_today, "%Y")}, Nick Barrett'
extensions = [
# Official
'sphinx.ext.autodoc',
'sp... | # pyinfra
# File: docs/conf.py
# Desc: minimal Sphinx config
from datetime import date, datetime
from better import better_theme_path
from pyinfra import __version__
_today = date.today()
copyright = '{0}, Nick Barrett'.format(datetime.strftime(_today, '%Y'))
extensions = [
# Official
'sphinx.ext.autodoc'... | <commit_before># pyinfra
# File: docs/conf.py
# Desc: minimal Sphinx config
from datetime import date, datetime
from better import better_theme_path
from pyinfra import __version__
_today = date.today()
copyright = f'{datetime.strftime(_today, "%Y")}, Nick Barrett'
extensions = [
# Official
'sphinx.ext.au... | # pyinfra
# File: docs/conf.py
# Desc: minimal Sphinx config
from datetime import date, datetime
from better import better_theme_path
from pyinfra import __version__
_today = date.today()
copyright = '{0}, Nick Barrett'.format(datetime.strftime(_today, '%Y'))
extensions = [
# Official
'sphinx.ext.autodoc'... | # pyinfra
# File: docs/conf.py
# Desc: minimal Sphinx config
from datetime import date, datetime
from better import better_theme_path
from pyinfra import __version__
_today = date.today()
copyright = f'{datetime.strftime(_today, "%Y")}, Nick Barrett'
extensions = [
# Official
'sphinx.ext.autodoc',
'sp... | <commit_before># pyinfra
# File: docs/conf.py
# Desc: minimal Sphinx config
from datetime import date, datetime
from better import better_theme_path
from pyinfra import __version__
_today = date.today()
copyright = f'{datetime.strftime(_today, "%Y")}, Nick Barrett'
extensions = [
# Official
'sphinx.ext.au... |
7228761d42276b1b009ca698aab9a901ee9d4d48 | src/appleseed.python/studio/helpers.py | src/appleseed.python/studio/helpers.py | import appleseed as asr
import appleseed.studio as studio
from appleseed.textureconverter import *
import sys
import logging
logging.basicConfig(level=logging.INFO, stream=sys.stdout)
def get_textures(container):
assert isinstance(container, asr.BaseGroup)
textures = list(container.textures())
assemblie... | import appleseed as asr
import appleseed.studio as studio
from appleseed.textureconverter import *
import sys
import logging
logging.basicConfig(level=logging.INFO, stream=sys.stdout)
def get_textures(container):
assert isinstance(container, asr.BaseGroup)
textures = list(container.textures())
assemblie... | Convert only disk_texture_2d textures with extension other than tx | Convert only disk_texture_2d textures with extension other than tx
| Python | mit | luisbarrancos/appleseed,est77/appleseed,pjessesco/appleseed,glebmish/appleseed,glebmish/appleseed,luisbarrancos/appleseed,glebmish/appleseed,Biart95/appleseed,dictoon/appleseed,dictoon/appleseed,luisbarrancos/appleseed,Biart95/appleseed,appleseedhq/appleseed,pjessesco/appleseed,Biart95/appleseed,pjessesco/appleseed,Ver... | import appleseed as asr
import appleseed.studio as studio
from appleseed.textureconverter import *
import sys
import logging
logging.basicConfig(level=logging.INFO, stream=sys.stdout)
def get_textures(container):
assert isinstance(container, asr.BaseGroup)
textures = list(container.textures())
assemblie... | import appleseed as asr
import appleseed.studio as studio
from appleseed.textureconverter import *
import sys
import logging
logging.basicConfig(level=logging.INFO, stream=sys.stdout)
def get_textures(container):
assert isinstance(container, asr.BaseGroup)
textures = list(container.textures())
assemblie... | <commit_before>import appleseed as asr
import appleseed.studio as studio
from appleseed.textureconverter import *
import sys
import logging
logging.basicConfig(level=logging.INFO, stream=sys.stdout)
def get_textures(container):
assert isinstance(container, asr.BaseGroup)
textures = list(container.textures())... | import appleseed as asr
import appleseed.studio as studio
from appleseed.textureconverter import *
import sys
import logging
logging.basicConfig(level=logging.INFO, stream=sys.stdout)
def get_textures(container):
assert isinstance(container, asr.BaseGroup)
textures = list(container.textures())
assemblie... | import appleseed as asr
import appleseed.studio as studio
from appleseed.textureconverter import *
import sys
import logging
logging.basicConfig(level=logging.INFO, stream=sys.stdout)
def get_textures(container):
assert isinstance(container, asr.BaseGroup)
textures = list(container.textures())
assemblie... | <commit_before>import appleseed as asr
import appleseed.studio as studio
from appleseed.textureconverter import *
import sys
import logging
logging.basicConfig(level=logging.INFO, stream=sys.stdout)
def get_textures(container):
assert isinstance(container, asr.BaseGroup)
textures = list(container.textures())... |
f769360dbb6da83fc8bf9c244c04b3d2f7c49ffa | lab/runnerctl.py | lab/runnerctl.py | """
pytest runner control plugin
"""
import pytest
def pytest_runtest_makereport(item, call):
if 'setup_test' in item.keywords and call.excinfo:
if not call.excinfo.errisinstance(pytest.skip.Exception):
pytest.halt('A setup test has failed, aborting...')
class Halt(object):
def __init__(... | """
pytest runner control plugin
"""
import pytest
import string
def pytest_runtest_makereport(item, call):
if 'setup_test' in item.keywords and call.excinfo:
if not call.excinfo.errisinstance(pytest.skip.Exception):
pytest.halt('A setup test has failed, aborting...')
class Halt(object):
... | Move some fixtures into better places | Move some fixtures into better places
Move datadir into the sipsecmon plugin and testname into
lab.runnerctl.
| Python | mpl-2.0 | sangoma/pytestlab | """
pytest runner control plugin
"""
import pytest
def pytest_runtest_makereport(item, call):
if 'setup_test' in item.keywords and call.excinfo:
if not call.excinfo.errisinstance(pytest.skip.Exception):
pytest.halt('A setup test has failed, aborting...')
class Halt(object):
def __init__(... | """
pytest runner control plugin
"""
import pytest
import string
def pytest_runtest_makereport(item, call):
if 'setup_test' in item.keywords and call.excinfo:
if not call.excinfo.errisinstance(pytest.skip.Exception):
pytest.halt('A setup test has failed, aborting...')
class Halt(object):
... | <commit_before>"""
pytest runner control plugin
"""
import pytest
def pytest_runtest_makereport(item, call):
if 'setup_test' in item.keywords and call.excinfo:
if not call.excinfo.errisinstance(pytest.skip.Exception):
pytest.halt('A setup test has failed, aborting...')
class Halt(object):
... | """
pytest runner control plugin
"""
import pytest
import string
def pytest_runtest_makereport(item, call):
if 'setup_test' in item.keywords and call.excinfo:
if not call.excinfo.errisinstance(pytest.skip.Exception):
pytest.halt('A setup test has failed, aborting...')
class Halt(object):
... | """
pytest runner control plugin
"""
import pytest
def pytest_runtest_makereport(item, call):
if 'setup_test' in item.keywords and call.excinfo:
if not call.excinfo.errisinstance(pytest.skip.Exception):
pytest.halt('A setup test has failed, aborting...')
class Halt(object):
def __init__(... | <commit_before>"""
pytest runner control plugin
"""
import pytest
def pytest_runtest_makereport(item, call):
if 'setup_test' in item.keywords and call.excinfo:
if not call.excinfo.errisinstance(pytest.skip.Exception):
pytest.halt('A setup test has failed, aborting...')
class Halt(object):
... |
9173a91ed6fc234c4a7b9dbf1d2e8f853d977a86 | mail_restrict_follower_selection/__manifest__.py | mail_restrict_follower_selection/__manifest__.py | # Copyright (C) 2015 Therp BV <http://therp.nl>
# Copyright (C) 2017 Komit <http://www.komit-consulting.com>
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
{
"name": "Restrict follower selection",
"version": "13.0.1.0.2",
"author": "Therp BV,Creu Blanca,Odoo Community Association (OCA)",
... | # Copyright (C) 2015 Therp BV <http://therp.nl>
# Copyright (C) 2017 Komit <http://www.komit-consulting.com>
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
{
"name": "Restrict follower selection",
"version": "13.0.1.0.2",
"author": "Therp BV,Creu Blanca,Odoo Community Association (OCA)",
... | Apply pre-commit changes: Resolve conflicts | [IMP] Apply pre-commit changes: Resolve conflicts
| Python | agpl-3.0 | OCA/social,OCA/social,OCA/social | # Copyright (C) 2015 Therp BV <http://therp.nl>
# Copyright (C) 2017 Komit <http://www.komit-consulting.com>
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
{
"name": "Restrict follower selection",
"version": "13.0.1.0.2",
"author": "Therp BV,Creu Blanca,Odoo Community Association (OCA)",
... | # Copyright (C) 2015 Therp BV <http://therp.nl>
# Copyright (C) 2017 Komit <http://www.komit-consulting.com>
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
{
"name": "Restrict follower selection",
"version": "13.0.1.0.2",
"author": "Therp BV,Creu Blanca,Odoo Community Association (OCA)",
... | <commit_before># Copyright (C) 2015 Therp BV <http://therp.nl>
# Copyright (C) 2017 Komit <http://www.komit-consulting.com>
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
{
"name": "Restrict follower selection",
"version": "13.0.1.0.2",
"author": "Therp BV,Creu Blanca,Odoo Community Assoc... | # Copyright (C) 2015 Therp BV <http://therp.nl>
# Copyright (C) 2017 Komit <http://www.komit-consulting.com>
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
{
"name": "Restrict follower selection",
"version": "13.0.1.0.2",
"author": "Therp BV,Creu Blanca,Odoo Community Association (OCA)",
... | # Copyright (C) 2015 Therp BV <http://therp.nl>
# Copyright (C) 2017 Komit <http://www.komit-consulting.com>
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
{
"name": "Restrict follower selection",
"version": "13.0.1.0.2",
"author": "Therp BV,Creu Blanca,Odoo Community Association (OCA)",
... | <commit_before># Copyright (C) 2015 Therp BV <http://therp.nl>
# Copyright (C) 2017 Komit <http://www.komit-consulting.com>
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
{
"name": "Restrict follower selection",
"version": "13.0.1.0.2",
"author": "Therp BV,Creu Blanca,Odoo Community Assoc... |
328e65e2c134363a1407c42a44ae9043f701874e | tests/commands/load/test_load_cnv_report_cmd.py | tests/commands/load/test_load_cnv_report_cmd.py | # -*- coding: utf-8 -*-
import os
from scout.demo import cnv_report_path
from scout.commands import cli
def test_load_cnv_report(mock_app, case_obj):
"""Testing the load delivery report cli command"""
# Make sure the path to delivery report is a valid path
assert os.path.isfile(cnv_report_path)
run... | # -*- coding: utf-8 -*-
import os
from scout.demo import cnv_report_path
from scout.commands import cli
def test_load_cnv_report(mock_app, case_obj):
"""Testing the load delivery report cli command"""
# Make sure the path to delivery report is a valid path
assert os.path.isfile(cnv_report_path)
run... | Update test to avoid pipeline fail | Update test to avoid pipeline fail
| Python | bsd-3-clause | Clinical-Genomics/scout,Clinical-Genomics/scout,Clinical-Genomics/scout | # -*- coding: utf-8 -*-
import os
from scout.demo import cnv_report_path
from scout.commands import cli
def test_load_cnv_report(mock_app, case_obj):
"""Testing the load delivery report cli command"""
# Make sure the path to delivery report is a valid path
assert os.path.isfile(cnv_report_path)
run... | # -*- coding: utf-8 -*-
import os
from scout.demo import cnv_report_path
from scout.commands import cli
def test_load_cnv_report(mock_app, case_obj):
"""Testing the load delivery report cli command"""
# Make sure the path to delivery report is a valid path
assert os.path.isfile(cnv_report_path)
run... | <commit_before># -*- coding: utf-8 -*-
import os
from scout.demo import cnv_report_path
from scout.commands import cli
def test_load_cnv_report(mock_app, case_obj):
"""Testing the load delivery report cli command"""
# Make sure the path to delivery report is a valid path
assert os.path.isfile(cnv_report... | # -*- coding: utf-8 -*-
import os
from scout.demo import cnv_report_path
from scout.commands import cli
def test_load_cnv_report(mock_app, case_obj):
"""Testing the load delivery report cli command"""
# Make sure the path to delivery report is a valid path
assert os.path.isfile(cnv_report_path)
run... | # -*- coding: utf-8 -*-
import os
from scout.demo import cnv_report_path
from scout.commands import cli
def test_load_cnv_report(mock_app, case_obj):
"""Testing the load delivery report cli command"""
# Make sure the path to delivery report is a valid path
assert os.path.isfile(cnv_report_path)
run... | <commit_before># -*- coding: utf-8 -*-
import os
from scout.demo import cnv_report_path
from scout.commands import cli
def test_load_cnv_report(mock_app, case_obj):
"""Testing the load delivery report cli command"""
# Make sure the path to delivery report is a valid path
assert os.path.isfile(cnv_report... |
8e4833c50b46d8b2f9604fcddcbd5258565ce185 | examples/multiple_devices_with_watcher.py | examples/multiple_devices_with_watcher.py | """
An example showing how to use the Watcher to track multiple devices in one
process.
"""
from ninja.api import NinjaAPI, Watcher
from ninja.devices import TemperatureSensor
from datetime import datetime
# Set up the NinjaAPI and Device wrappers:
# Access token from https://a.ninja.is/you#apiTab
api... | """
An example showing how to use the Watcher to track multiple devices in one
process.
"""
from ninja.api import NinjaAPI, Watcher
from ninja.devices import TemperatureSensor, HumiditySensor
from datetime import datetime
# Set up the NinjaAPI and Device wrappers:
# Access token from https://a.ninja.i... | Update Watcher example to use HumiditySensor instead of second TemperatureSensor | Update Watcher example to use HumiditySensor instead of second TemperatureSensor | Python | unlicense | alecperkins/py-ninja | """
An example showing how to use the Watcher to track multiple devices in one
process.
"""
from ninja.api import NinjaAPI, Watcher
from ninja.devices import TemperatureSensor
from datetime import datetime
# Set up the NinjaAPI and Device wrappers:
# Access token from https://a.ninja.is/you#apiTab
api... | """
An example showing how to use the Watcher to track multiple devices in one
process.
"""
from ninja.api import NinjaAPI, Watcher
from ninja.devices import TemperatureSensor, HumiditySensor
from datetime import datetime
# Set up the NinjaAPI and Device wrappers:
# Access token from https://a.ninja.i... | <commit_before>"""
An example showing how to use the Watcher to track multiple devices in one
process.
"""
from ninja.api import NinjaAPI, Watcher
from ninja.devices import TemperatureSensor
from datetime import datetime
# Set up the NinjaAPI and Device wrappers:
# Access token from https://a.ninja.is... | """
An example showing how to use the Watcher to track multiple devices in one
process.
"""
from ninja.api import NinjaAPI, Watcher
from ninja.devices import TemperatureSensor, HumiditySensor
from datetime import datetime
# Set up the NinjaAPI and Device wrappers:
# Access token from https://a.ninja.i... | """
An example showing how to use the Watcher to track multiple devices in one
process.
"""
from ninja.api import NinjaAPI, Watcher
from ninja.devices import TemperatureSensor
from datetime import datetime
# Set up the NinjaAPI and Device wrappers:
# Access token from https://a.ninja.is/you#apiTab
api... | <commit_before>"""
An example showing how to use the Watcher to track multiple devices in one
process.
"""
from ninja.api import NinjaAPI, Watcher
from ninja.devices import TemperatureSensor
from datetime import datetime
# Set up the NinjaAPI and Device wrappers:
# Access token from https://a.ninja.is... |
acbdb030430df2af7d0e884ea7a2851e99b42944 | barbican/model/migration/alembic_migrations/versions/d2780d5aa510_change_url_length.py | barbican/model/migration/alembic_migrations/versions/d2780d5aa510_change_url_length.py | """change_url_length
Revision ID: d2780d5aa510
Revises: dce488646127
Create Date: 2016-03-11 09:39:32.593231
"""
# revision identifiers, used by Alembic.
revision = 'd2780d5aa510'
down_revision = 'dce488646127'
from alembic import op
import sqlalchemy as sa
def upgrade():
op.alter_column(
'ContainerCo... | """change_url_length
Revision ID: d2780d5aa510
Revises: dce488646127
Create Date: 2016-03-11 09:39:32.593231
"""
# revision identifiers, used by Alembic.
revision = 'd2780d5aa510'
down_revision = 'dce488646127'
from alembic import op
import sqlalchemy as sa
def upgrade():
op.alter_column(
'container_c... | Change Table name to correct name | Change Table name to correct name
The table name is currently wrong in this version and needs to
be changed to the correct name. It is preventing the database
migration script from running correctly.
Closes-Bug: #1562091
Change-Id: I9be88a4385ab58b37be5842aaaefd8353a2f6f76
(cherry picked from commit 2ecc676dd2521c727... | Python | apache-2.0 | openstack/barbican,openstack/barbican | """change_url_length
Revision ID: d2780d5aa510
Revises: dce488646127
Create Date: 2016-03-11 09:39:32.593231
"""
# revision identifiers, used by Alembic.
revision = 'd2780d5aa510'
down_revision = 'dce488646127'
from alembic import op
import sqlalchemy as sa
def upgrade():
op.alter_column(
'ContainerCo... | """change_url_length
Revision ID: d2780d5aa510
Revises: dce488646127
Create Date: 2016-03-11 09:39:32.593231
"""
# revision identifiers, used by Alembic.
revision = 'd2780d5aa510'
down_revision = 'dce488646127'
from alembic import op
import sqlalchemy as sa
def upgrade():
op.alter_column(
'container_c... | <commit_before>"""change_url_length
Revision ID: d2780d5aa510
Revises: dce488646127
Create Date: 2016-03-11 09:39:32.593231
"""
# revision identifiers, used by Alembic.
revision = 'd2780d5aa510'
down_revision = 'dce488646127'
from alembic import op
import sqlalchemy as sa
def upgrade():
op.alter_column(
... | """change_url_length
Revision ID: d2780d5aa510
Revises: dce488646127
Create Date: 2016-03-11 09:39:32.593231
"""
# revision identifiers, used by Alembic.
revision = 'd2780d5aa510'
down_revision = 'dce488646127'
from alembic import op
import sqlalchemy as sa
def upgrade():
op.alter_column(
'container_c... | """change_url_length
Revision ID: d2780d5aa510
Revises: dce488646127
Create Date: 2016-03-11 09:39:32.593231
"""
# revision identifiers, used by Alembic.
revision = 'd2780d5aa510'
down_revision = 'dce488646127'
from alembic import op
import sqlalchemy as sa
def upgrade():
op.alter_column(
'ContainerCo... | <commit_before>"""change_url_length
Revision ID: d2780d5aa510
Revises: dce488646127
Create Date: 2016-03-11 09:39:32.593231
"""
# revision identifiers, used by Alembic.
revision = 'd2780d5aa510'
down_revision = 'dce488646127'
from alembic import op
import sqlalchemy as sa
def upgrade():
op.alter_column(
... |
ff9a8cb1f68785cc16c99fe26dd96e9fa01c325e | src/hunter/const.py | src/hunter/const.py | import site
import sys
from distutils.sysconfig import get_python_lib
SITE_PACKAGES_PATHS = set(site.getsitepackages())
SITE_PACKAGES_PATHS.add(site.getusersitepackages())
SITE_PACKAGES_PATHS.add(get_python_lib())
SITE_PACKAGES_PATHS = tuple(SITE_PACKAGES_PATHS)
SYS_PREFIX_PATHS = set((
sys.prefix,
sys.exec_... | import site
import sys
from distutils.sysconfig import get_python_lib
SITE_PACKAGES_PATHS = set()
if hasattr(site, 'getsitepackages'):
SITE_PACKAGES_PATHS.update(site.getsitepackages())
if hasattr(site, 'getusersitepackages'):
SITE_PACKAGES_PATHS.add(site.getusersitepackages())
SITE_PACKAGES_PATHS.add(get_pyt... | Add checks in case site.py is broken (eg: virtualenv). | Add checks in case site.py is broken (eg: virtualenv).
| Python | bsd-2-clause | ionelmc/python-hunter | import site
import sys
from distutils.sysconfig import get_python_lib
SITE_PACKAGES_PATHS = set(site.getsitepackages())
SITE_PACKAGES_PATHS.add(site.getusersitepackages())
SITE_PACKAGES_PATHS.add(get_python_lib())
SITE_PACKAGES_PATHS = tuple(SITE_PACKAGES_PATHS)
SYS_PREFIX_PATHS = set((
sys.prefix,
sys.exec_... | import site
import sys
from distutils.sysconfig import get_python_lib
SITE_PACKAGES_PATHS = set()
if hasattr(site, 'getsitepackages'):
SITE_PACKAGES_PATHS.update(site.getsitepackages())
if hasattr(site, 'getusersitepackages'):
SITE_PACKAGES_PATHS.add(site.getusersitepackages())
SITE_PACKAGES_PATHS.add(get_pyt... | <commit_before>import site
import sys
from distutils.sysconfig import get_python_lib
SITE_PACKAGES_PATHS = set(site.getsitepackages())
SITE_PACKAGES_PATHS.add(site.getusersitepackages())
SITE_PACKAGES_PATHS.add(get_python_lib())
SITE_PACKAGES_PATHS = tuple(SITE_PACKAGES_PATHS)
SYS_PREFIX_PATHS = set((
sys.prefix... | import site
import sys
from distutils.sysconfig import get_python_lib
SITE_PACKAGES_PATHS = set()
if hasattr(site, 'getsitepackages'):
SITE_PACKAGES_PATHS.update(site.getsitepackages())
if hasattr(site, 'getusersitepackages'):
SITE_PACKAGES_PATHS.add(site.getusersitepackages())
SITE_PACKAGES_PATHS.add(get_pyt... | import site
import sys
from distutils.sysconfig import get_python_lib
SITE_PACKAGES_PATHS = set(site.getsitepackages())
SITE_PACKAGES_PATHS.add(site.getusersitepackages())
SITE_PACKAGES_PATHS.add(get_python_lib())
SITE_PACKAGES_PATHS = tuple(SITE_PACKAGES_PATHS)
SYS_PREFIX_PATHS = set((
sys.prefix,
sys.exec_... | <commit_before>import site
import sys
from distutils.sysconfig import get_python_lib
SITE_PACKAGES_PATHS = set(site.getsitepackages())
SITE_PACKAGES_PATHS.add(site.getusersitepackages())
SITE_PACKAGES_PATHS.add(get_python_lib())
SITE_PACKAGES_PATHS = tuple(SITE_PACKAGES_PATHS)
SYS_PREFIX_PATHS = set((
sys.prefix... |
338435f7b1a10f749266138a0fbe610fa065a422 | clients.py | clients.py | # -*- coding: utf-8 -*-
from helpers import HTTPEventHandler
import looping
import buffer_event
class StatusClient(HTTPEventHandler):
def __init__(self, server, sock, address, request_parser):
HTTPEventHandler.__init__(self, server, sock, address, request_parser,
204, b'... | # -*- coding: utf-8 -*-
from helpers import HTTPEventHandler
import looping
import buffer_event
class StatusClient(HTTPEventHandler):
def __init__(self, server, sock, address, request_parser):
HTTPEventHandler.__init__(self, server, sock, address, request_parser,
204, b'... | Remove commented out debug print lines | Remove commented out debug print lines
| Python | agpl-3.0 | noirbee/savate,noirbee/savate | # -*- coding: utf-8 -*-
from helpers import HTTPEventHandler
import looping
import buffer_event
class StatusClient(HTTPEventHandler):
def __init__(self, server, sock, address, request_parser):
HTTPEventHandler.__init__(self, server, sock, address, request_parser,
204, b'... | # -*- coding: utf-8 -*-
from helpers import HTTPEventHandler
import looping
import buffer_event
class StatusClient(HTTPEventHandler):
def __init__(self, server, sock, address, request_parser):
HTTPEventHandler.__init__(self, server, sock, address, request_parser,
204, b'... | <commit_before># -*- coding: utf-8 -*-
from helpers import HTTPEventHandler
import looping
import buffer_event
class StatusClient(HTTPEventHandler):
def __init__(self, server, sock, address, request_parser):
HTTPEventHandler.__init__(self, server, sock, address, request_parser,
... | # -*- coding: utf-8 -*-
from helpers import HTTPEventHandler
import looping
import buffer_event
class StatusClient(HTTPEventHandler):
def __init__(self, server, sock, address, request_parser):
HTTPEventHandler.__init__(self, server, sock, address, request_parser,
204, b'... | # -*- coding: utf-8 -*-
from helpers import HTTPEventHandler
import looping
import buffer_event
class StatusClient(HTTPEventHandler):
def __init__(self, server, sock, address, request_parser):
HTTPEventHandler.__init__(self, server, sock, address, request_parser,
204, b'... | <commit_before># -*- coding: utf-8 -*-
from helpers import HTTPEventHandler
import looping
import buffer_event
class StatusClient(HTTPEventHandler):
def __init__(self, server, sock, address, request_parser):
HTTPEventHandler.__init__(self, server, sock, address, request_parser,
... |
5776e16a93f804bbdb34bdcac5128ecac25f6e88 | micall/core/filter_quality.py | micall/core/filter_quality.py | #! /usr/bin/env python
import argparse
import csv
import itertools
import logging
import math
import os
import miseq_logging
BAD_ERROR_RATE = 7.5
def parseArgs():
parser = argparse.ArgumentParser(
description='Post-processing of short-read alignments.')
parser.add_argument('quality_csv',
... | #! /usr/bin/env python
import argparse
import csv
import itertools
import logging
import math
import os
import miseq_logging
BAD_ERROR_RATE = 7.5
def parseArgs():
parser = argparse.ArgumentParser(
description='Post-processing of short-read alignments.')
parser.add_argument('quality_csv',
... | Fix a bunch of PEP8 warnings. | Fix a bunch of PEP8 warnings. | Python | agpl-3.0 | cfe-lab/MiCall,cfe-lab/MiCall,cfe-lab/MiCall | #! /usr/bin/env python
import argparse
import csv
import itertools
import logging
import math
import os
import miseq_logging
BAD_ERROR_RATE = 7.5
def parseArgs():
parser = argparse.ArgumentParser(
description='Post-processing of short-read alignments.')
parser.add_argument('quality_csv',
... | #! /usr/bin/env python
import argparse
import csv
import itertools
import logging
import math
import os
import miseq_logging
BAD_ERROR_RATE = 7.5
def parseArgs():
parser = argparse.ArgumentParser(
description='Post-processing of short-read alignments.')
parser.add_argument('quality_csv',
... | <commit_before>#! /usr/bin/env python
import argparse
import csv
import itertools
import logging
import math
import os
import miseq_logging
BAD_ERROR_RATE = 7.5
def parseArgs():
parser = argparse.ArgumentParser(
description='Post-processing of short-read alignments.')
parser.add_argument('quali... | #! /usr/bin/env python
import argparse
import csv
import itertools
import logging
import math
import os
import miseq_logging
BAD_ERROR_RATE = 7.5
def parseArgs():
parser = argparse.ArgumentParser(
description='Post-processing of short-read alignments.')
parser.add_argument('quality_csv',
... | #! /usr/bin/env python
import argparse
import csv
import itertools
import logging
import math
import os
import miseq_logging
BAD_ERROR_RATE = 7.5
def parseArgs():
parser = argparse.ArgumentParser(
description='Post-processing of short-read alignments.')
parser.add_argument('quality_csv',
... | <commit_before>#! /usr/bin/env python
import argparse
import csv
import itertools
import logging
import math
import os
import miseq_logging
BAD_ERROR_RATE = 7.5
def parseArgs():
parser = argparse.ArgumentParser(
description='Post-processing of short-read alignments.')
parser.add_argument('quali... |
ef29e2dd9426d42312de6969b927b5315f3df115 | src/redmill/catalog.py | src/redmill/catalog.py | # This file is part of Redmill.
#
# Redmill is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# Redmill is distributed in the ho... | # This file is part of Redmill.
#
# Redmill is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# Redmill is distributed in the ho... | Save images instead of paths in Catalog. | Save images instead of paths in Catalog.
| Python | agpl-3.0 | lamyj/redmill,lamyj/redmill,lamyj/redmill | # This file is part of Redmill.
#
# Redmill is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# Redmill is distributed in the ho... | # This file is part of Redmill.
#
# Redmill is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# Redmill is distributed in the ho... | <commit_before># This file is part of Redmill.
#
# Redmill is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# Redmill is distri... | # This file is part of Redmill.
#
# Redmill is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# Redmill is distributed in the ho... | # This file is part of Redmill.
#
# Redmill is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# Redmill is distributed in the ho... | <commit_before># This file is part of Redmill.
#
# Redmill is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# Redmill is distri... |
1d11f8d123709626ba3e41b7697a1511c034ab55 | timeser.py | timeser.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from goristock import goristock
a = goristock(8261)
for i in range(3):
a.display(3,6,9)
a.raw_data.pop()
a.data_date.pop()
a.stock_range.pop()
a.stock_vol.pop()
a.display(3,6,9)
| #!/usr/bin/env python
# -*- coding: utf-8 -*-
from goristock import goristock
a = goristock(2201)
while len(a.raw_data) > 19:
a.raw_data.pop()
a.data_date.pop()
a.stock_range.pop()
a.stock_vol.pop()
if a.MAC(3) == '↑' and a.MAC(6) == '↑' and a.MAC(18) == '↑':
#if a.MAO(3,6)[0][1][-1] < 0 and a.MAO(3,6)[1]... | Add time serial test, buy or sell point. | Add time serial test, buy or sell point.
| Python | mit | toomore/goristock | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from goristock import goristock
a = goristock(8261)
for i in range(3):
a.display(3,6,9)
a.raw_data.pop()
a.data_date.pop()
a.stock_range.pop()
a.stock_vol.pop()
a.display(3,6,9)
Add time serial test, buy or sell point. | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from goristock import goristock
a = goristock(2201)
while len(a.raw_data) > 19:
a.raw_data.pop()
a.data_date.pop()
a.stock_range.pop()
a.stock_vol.pop()
if a.MAC(3) == '↑' and a.MAC(6) == '↑' and a.MAC(18) == '↑':
#if a.MAO(3,6)[0][1][-1] < 0 and a.MAO(3,6)[1]... | <commit_before>#!/usr/bin/env python
# -*- coding: utf-8 -*-
from goristock import goristock
a = goristock(8261)
for i in range(3):
a.display(3,6,9)
a.raw_data.pop()
a.data_date.pop()
a.stock_range.pop()
a.stock_vol.pop()
a.display(3,6,9)
<commit_msg>Add time serial test, buy or sell point.<commit_after> | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from goristock import goristock
a = goristock(2201)
while len(a.raw_data) > 19:
a.raw_data.pop()
a.data_date.pop()
a.stock_range.pop()
a.stock_vol.pop()
if a.MAC(3) == '↑' and a.MAC(6) == '↑' and a.MAC(18) == '↑':
#if a.MAO(3,6)[0][1][-1] < 0 and a.MAO(3,6)[1]... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from goristock import goristock
a = goristock(8261)
for i in range(3):
a.display(3,6,9)
a.raw_data.pop()
a.data_date.pop()
a.stock_range.pop()
a.stock_vol.pop()
a.display(3,6,9)
Add time serial test, buy or sell point.#!/usr/bin/env python
# -*- coding: utf-8 -*... | <commit_before>#!/usr/bin/env python
# -*- coding: utf-8 -*-
from goristock import goristock
a = goristock(8261)
for i in range(3):
a.display(3,6,9)
a.raw_data.pop()
a.data_date.pop()
a.stock_range.pop()
a.stock_vol.pop()
a.display(3,6,9)
<commit_msg>Add time serial test, buy or sell point.<commit_after>#!/... |
4bf7c8f1522b433cbe7b9b9312a51942a9ea75c1 | pytac/__init__.py | pytac/__init__.py | """Pytac: Python Toolkit for Accelerator Controls."""
# PV types
SP = 'setpoint'
RB = 'readback'
# Unit systems
ENG = 'engineering'
PHYS = 'physics'
# Model types.
SIM = 'simulation'
LIVE = 'live'
| """Pytac: Python Toolkit for Accelerator Controls."""
# PV types
SP = 'setpoint'
RB = 'readback'
# Unit systems
ENG = 'engineering'
PHYS = 'physics'
# Model types.
SIM = 'simulation'
LIVE = 'live'
from . import device, element, lattice, load_csv, lattice, utils
| Add modules to pytac namespace. | Add modules to pytac namespace.
| Python | apache-2.0 | willrogers/pytac,willrogers/pytac | """Pytac: Python Toolkit for Accelerator Controls."""
# PV types
SP = 'setpoint'
RB = 'readback'
# Unit systems
ENG = 'engineering'
PHYS = 'physics'
# Model types.
SIM = 'simulation'
LIVE = 'live'
Add modules to pytac namespace. | """Pytac: Python Toolkit for Accelerator Controls."""
# PV types
SP = 'setpoint'
RB = 'readback'
# Unit systems
ENG = 'engineering'
PHYS = 'physics'
# Model types.
SIM = 'simulation'
LIVE = 'live'
from . import device, element, lattice, load_csv, lattice, utils
| <commit_before>"""Pytac: Python Toolkit for Accelerator Controls."""
# PV types
SP = 'setpoint'
RB = 'readback'
# Unit systems
ENG = 'engineering'
PHYS = 'physics'
# Model types.
SIM = 'simulation'
LIVE = 'live'
<commit_msg>Add modules to pytac namespace.<commit_after> | """Pytac: Python Toolkit for Accelerator Controls."""
# PV types
SP = 'setpoint'
RB = 'readback'
# Unit systems
ENG = 'engineering'
PHYS = 'physics'
# Model types.
SIM = 'simulation'
LIVE = 'live'
from . import device, element, lattice, load_csv, lattice, utils
| """Pytac: Python Toolkit for Accelerator Controls."""
# PV types
SP = 'setpoint'
RB = 'readback'
# Unit systems
ENG = 'engineering'
PHYS = 'physics'
# Model types.
SIM = 'simulation'
LIVE = 'live'
Add modules to pytac namespace."""Pytac: Python Toolkit for Accelerator Controls."""
# PV types
SP = 'setpoint'
RB = 'rea... | <commit_before>"""Pytac: Python Toolkit for Accelerator Controls."""
# PV types
SP = 'setpoint'
RB = 'readback'
# Unit systems
ENG = 'engineering'
PHYS = 'physics'
# Model types.
SIM = 'simulation'
LIVE = 'live'
<commit_msg>Add modules to pytac namespace.<commit_after>"""Pytac: Python Toolkit for Accelerator Controls.... |
30044f8272557dbd367eab3dbe7c1ba1076484e9 | readux/pages/models.py | readux/pages/models.py | from django.db import models
# Create your models here.
from django.utils.translation import ugettext_lazy as _
from feincms.module.page.models import Page
from feincms.content.richtext.models import RichTextContent
from feincms.content.medialibrary.models import MediaFileContent
# Page.register_extensions('datepub... | from django.db import models
# Create your models here.
from django.utils.translation import ugettext_lazy as _
from feincms.module.page.models import Page
from feincms.content.richtext.models import RichTextContent
from feincms.content.medialibrary.models import MediaFileContent
from feincms.content.video.models im... | Enable video content for cms pages | Enable video content for cms pages
[#110289088]
| Python | apache-2.0 | emory-libraries/readux,emory-libraries/readux,emory-libraries/readux | from django.db import models
# Create your models here.
from django.utils.translation import ugettext_lazy as _
from feincms.module.page.models import Page
from feincms.content.richtext.models import RichTextContent
from feincms.content.medialibrary.models import MediaFileContent
# Page.register_extensions('datepub... | from django.db import models
# Create your models here.
from django.utils.translation import ugettext_lazy as _
from feincms.module.page.models import Page
from feincms.content.richtext.models import RichTextContent
from feincms.content.medialibrary.models import MediaFileContent
from feincms.content.video.models im... | <commit_before>from django.db import models
# Create your models here.
from django.utils.translation import ugettext_lazy as _
from feincms.module.page.models import Page
from feincms.content.richtext.models import RichTextContent
from feincms.content.medialibrary.models import MediaFileContent
# Page.register_exte... | from django.db import models
# Create your models here.
from django.utils.translation import ugettext_lazy as _
from feincms.module.page.models import Page
from feincms.content.richtext.models import RichTextContent
from feincms.content.medialibrary.models import MediaFileContent
from feincms.content.video.models im... | from django.db import models
# Create your models here.
from django.utils.translation import ugettext_lazy as _
from feincms.module.page.models import Page
from feincms.content.richtext.models import RichTextContent
from feincms.content.medialibrary.models import MediaFileContent
# Page.register_extensions('datepub... | <commit_before>from django.db import models
# Create your models here.
from django.utils.translation import ugettext_lazy as _
from feincms.module.page.models import Page
from feincms.content.richtext.models import RichTextContent
from feincms.content.medialibrary.models import MediaFileContent
# Page.register_exte... |
2c7baf580631fc5a78b59560f65b5283b74f347b | tests/functional/test_download_l10n.py | tests/functional/test_download_l10n.py | # This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
from bs4 import BeautifulSoup
import pytest
import requests
def pytest_generate_tests(metafunc):
if 'not headless'... | # This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
from bs4 import BeautifulSoup
import pytest
import requests
def pytest_generate_tests(metafunc):
if 'not headless'... | Add /firefox/nightly/all/ to download link tests | Add /firefox/nightly/all/ to download link tests
| Python | mpl-2.0 | mozilla/bedrock,alexgibson/bedrock,mkmelin/bedrock,TheoChevalier/bedrock,sgarrity/bedrock,pascalchevrel/bedrock,CSCI-462-01-2017/bedrock,CSCI-462-01-2017/bedrock,schalkneethling/bedrock,flodolo/bedrock,schalkneethling/bedrock,flodolo/bedrock,sylvestre/bedrock,pascalchevrel/bedrock,sylvestre/bedrock,gerv/bedrock,craigco... | # This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
from bs4 import BeautifulSoup
import pytest
import requests
def pytest_generate_tests(metafunc):
if 'not headless'... | # This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
from bs4 import BeautifulSoup
import pytest
import requests
def pytest_generate_tests(metafunc):
if 'not headless'... | <commit_before># This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
from bs4 import BeautifulSoup
import pytest
import requests
def pytest_generate_tests(metafunc):
if... | # This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
from bs4 import BeautifulSoup
import pytest
import requests
def pytest_generate_tests(metafunc):
if 'not headless'... | # This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
from bs4 import BeautifulSoup
import pytest
import requests
def pytest_generate_tests(metafunc):
if 'not headless'... | <commit_before># This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
from bs4 import BeautifulSoup
import pytest
import requests
def pytest_generate_tests(metafunc):
if... |
e31a0d76236c27cfae733335bd13528e67f15fa4 | version.py | version.py | major = 0
minor=0
patch=0
branch="dev"
timestamp=1376425015.74 | major = 0
minor=0
patch=10
branch="master"
timestamp=1376502388.26 | Tag commit for v0.0.10-master generated by gitmake.py | Tag commit for v0.0.10-master generated by gitmake.py
| Python | mit | ryansturmer/gitmake | major = 0
minor=0
patch=0
branch="dev"
timestamp=1376425015.74Tag commit for v0.0.10-master generated by gitmake.py | major = 0
minor=0
patch=10
branch="master"
timestamp=1376502388.26 | <commit_before>major = 0
minor=0
patch=0
branch="dev"
timestamp=1376425015.74<commit_msg>Tag commit for v0.0.10-master generated by gitmake.py<commit_after> | major = 0
minor=0
patch=10
branch="master"
timestamp=1376502388.26 | major = 0
minor=0
patch=0
branch="dev"
timestamp=1376425015.74Tag commit for v0.0.10-master generated by gitmake.pymajor = 0
minor=0
patch=10
branch="master"
timestamp=1376502388.26 | <commit_before>major = 0
minor=0
patch=0
branch="dev"
timestamp=1376425015.74<commit_msg>Tag commit for v0.0.10-master generated by gitmake.py<commit_after>major = 0
minor=0
patch=10
branch="master"
timestamp=1376502388.26 |
99e4557eabf1434708d21d79b75994ce0827c440 | test/test_app.py | test/test_app.py | # -*- coding: utf-8 -*-
import json
import app
WORK_END_TASK = 73847457
def test():
body = {
"event_name": "item:completed",
"event_data": {
"id": 85570464,
"content": u'TINA テスト',
"labels": [652234],
"project_id": 156051149
}
}
wi... | # -*- coding: utf-8 -*-
import json
import app
WORK_BEGIN_TASK = 72824136
WORK_END_TASK = 73847457
def test():
body = {
"event_name": "item:completed",
"event_data": {
"id": WORK_END_TASK,
"content": u'TINA テスト',
"labels": [652234],
"project_id": 1... | Add special task id to test source | Add special task id to test source
| Python | mit | tadashi-aikawa/tina | # -*- coding: utf-8 -*-
import json
import app
WORK_END_TASK = 73847457
def test():
body = {
"event_name": "item:completed",
"event_data": {
"id": 85570464,
"content": u'TINA テスト',
"labels": [652234],
"project_id": 156051149
}
}
wi... | # -*- coding: utf-8 -*-
import json
import app
WORK_BEGIN_TASK = 72824136
WORK_END_TASK = 73847457
def test():
body = {
"event_name": "item:completed",
"event_data": {
"id": WORK_END_TASK,
"content": u'TINA テスト',
"labels": [652234],
"project_id": 1... | <commit_before># -*- coding: utf-8 -*-
import json
import app
WORK_END_TASK = 73847457
def test():
body = {
"event_name": "item:completed",
"event_data": {
"id": 85570464,
"content": u'TINA テスト',
"labels": [652234],
"project_id": 156051149
... | # -*- coding: utf-8 -*-
import json
import app
WORK_BEGIN_TASK = 72824136
WORK_END_TASK = 73847457
def test():
body = {
"event_name": "item:completed",
"event_data": {
"id": WORK_END_TASK,
"content": u'TINA テスト',
"labels": [652234],
"project_id": 1... | # -*- coding: utf-8 -*-
import json
import app
WORK_END_TASK = 73847457
def test():
body = {
"event_name": "item:completed",
"event_data": {
"id": 85570464,
"content": u'TINA テスト',
"labels": [652234],
"project_id": 156051149
}
}
wi... | <commit_before># -*- coding: utf-8 -*-
import json
import app
WORK_END_TASK = 73847457
def test():
body = {
"event_name": "item:completed",
"event_data": {
"id": 85570464,
"content": u'TINA テスト',
"labels": [652234],
"project_id": 156051149
... |
7ecc832999e825f48c10fdcf3430321eda1bcfcc | fabfile.py | fabfile.py | from fabric.api import execute, local, settings, task
@task
def preprocess_header():
local('cpp -nostdinc spotify/api.h > spotify/api.processed.h || true')
@task
def test():
local('nosetests')
@task
def autotest():
while True:
local('clear')
with settings(warn_only=True):
e... | from fabric.api import execute, local, settings, task
@task
def preprocess_header():
local('cpp -nostdinc spotify/api.h > spotify/api.processed.h || true')
@task
def docs():
local('make -C docs/ html')
@task
def autodocs():
auto(docs)
@task
def test():
local('nosetests')
@task
def autotest():
... | Add docs and autodocs tasks | fab: Add docs and autodocs tasks
| Python | apache-2.0 | felix1m/pyspotify,kotamat/pyspotify,felix1m/pyspotify,jodal/pyspotify,kotamat/pyspotify,jodal/pyspotify,felix1m/pyspotify,kotamat/pyspotify,jodal/pyspotify,mopidy/pyspotify,mopidy/pyspotify | from fabric.api import execute, local, settings, task
@task
def preprocess_header():
local('cpp -nostdinc spotify/api.h > spotify/api.processed.h || true')
@task
def test():
local('nosetests')
@task
def autotest():
while True:
local('clear')
with settings(warn_only=True):
e... | from fabric.api import execute, local, settings, task
@task
def preprocess_header():
local('cpp -nostdinc spotify/api.h > spotify/api.processed.h || true')
@task
def docs():
local('make -C docs/ html')
@task
def autodocs():
auto(docs)
@task
def test():
local('nosetests')
@task
def autotest():
... | <commit_before>from fabric.api import execute, local, settings, task
@task
def preprocess_header():
local('cpp -nostdinc spotify/api.h > spotify/api.processed.h || true')
@task
def test():
local('nosetests')
@task
def autotest():
while True:
local('clear')
with settings(warn_only=True)... | from fabric.api import execute, local, settings, task
@task
def preprocess_header():
local('cpp -nostdinc spotify/api.h > spotify/api.processed.h || true')
@task
def docs():
local('make -C docs/ html')
@task
def autodocs():
auto(docs)
@task
def test():
local('nosetests')
@task
def autotest():
... | from fabric.api import execute, local, settings, task
@task
def preprocess_header():
local('cpp -nostdinc spotify/api.h > spotify/api.processed.h || true')
@task
def test():
local('nosetests')
@task
def autotest():
while True:
local('clear')
with settings(warn_only=True):
e... | <commit_before>from fabric.api import execute, local, settings, task
@task
def preprocess_header():
local('cpp -nostdinc spotify/api.h > spotify/api.processed.h || true')
@task
def test():
local('nosetests')
@task
def autotest():
while True:
local('clear')
with settings(warn_only=True)... |
bd7f9e79ff4a30b2103874d0e5ceba8657b7f6ce | flocker/provision/test/test_ssh_monkeypatch.py | flocker/provision/test/test_ssh_monkeypatch.py | # Copyright Hybrid Logic Ltd. See LICENSE file for details.
"""
Tests for ``flocker.provision._ssh._monkeypatch``.
"""
from twisted.trial.unittest import SynchronousTestCase as TestCase
from .._ssh._monkeypatch import _patch_7672_needed, patch_7672_applied
class Twisted7672Tests(TestCase):
""""
Tests for `... | # Copyright Hybrid Logic Ltd. See LICENSE file for details.
"""
Tests for ``flocker.provision._ssh._monkeypatch``.
"""
from twisted.trial.unittest import SynchronousTestCase as TestCase
from .._ssh._monkeypatch import _patch_7672_needed, patch_7672_applied
class Twisted7672Tests(TestCase):
""""
Tests for `... | Fix monkey patch test condition. | Fix monkey patch test condition.
| Python | apache-2.0 | mbrukman/flocker,achanda/flocker,mbrukman/flocker,mbrukman/flocker,AndyHuu/flocker,moypray/flocker,agonzalezro/flocker,1d4Nf6/flocker,agonzalezro/flocker,Azulinho/flocker,hackday-profilers/flocker,adamtheturtle/flocker,1d4Nf6/flocker,AndyHuu/flocker,AndyHuu/flocker,moypray/flocker,w4ngyi/flocker,w4ngyi/flocker,adamthet... | # Copyright Hybrid Logic Ltd. See LICENSE file for details.
"""
Tests for ``flocker.provision._ssh._monkeypatch``.
"""
from twisted.trial.unittest import SynchronousTestCase as TestCase
from .._ssh._monkeypatch import _patch_7672_needed, patch_7672_applied
class Twisted7672Tests(TestCase):
""""
Tests for `... | # Copyright Hybrid Logic Ltd. See LICENSE file for details.
"""
Tests for ``flocker.provision._ssh._monkeypatch``.
"""
from twisted.trial.unittest import SynchronousTestCase as TestCase
from .._ssh._monkeypatch import _patch_7672_needed, patch_7672_applied
class Twisted7672Tests(TestCase):
""""
Tests for `... | <commit_before># Copyright Hybrid Logic Ltd. See LICENSE file for details.
"""
Tests for ``flocker.provision._ssh._monkeypatch``.
"""
from twisted.trial.unittest import SynchronousTestCase as TestCase
from .._ssh._monkeypatch import _patch_7672_needed, patch_7672_applied
class Twisted7672Tests(TestCase):
""""
... | # Copyright Hybrid Logic Ltd. See LICENSE file for details.
"""
Tests for ``flocker.provision._ssh._monkeypatch``.
"""
from twisted.trial.unittest import SynchronousTestCase as TestCase
from .._ssh._monkeypatch import _patch_7672_needed, patch_7672_applied
class Twisted7672Tests(TestCase):
""""
Tests for `... | # Copyright Hybrid Logic Ltd. See LICENSE file for details.
"""
Tests for ``flocker.provision._ssh._monkeypatch``.
"""
from twisted.trial.unittest import SynchronousTestCase as TestCase
from .._ssh._monkeypatch import _patch_7672_needed, patch_7672_applied
class Twisted7672Tests(TestCase):
""""
Tests for `... | <commit_before># Copyright Hybrid Logic Ltd. See LICENSE file for details.
"""
Tests for ``flocker.provision._ssh._monkeypatch``.
"""
from twisted.trial.unittest import SynchronousTestCase as TestCase
from .._ssh._monkeypatch import _patch_7672_needed, patch_7672_applied
class Twisted7672Tests(TestCase):
""""
... |
350e8bdcb9c6f3eace7839e5dc7270bfeb51e50f | tests/grafana_dashboards/test_config.py | tests/grafana_dashboards/test_config.py | # -*- coding: utf-8 -*-
# Copyright 2015 grafana-dashboard-builder contributors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless requi... | # -*- coding: utf-8 -*-
# Copyright 2015 grafana-dashboard-builder contributors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless requi... | Add more tests for Config | Add more tests for Config
| Python | apache-2.0 | jakubplichta/grafana-dashboard-builder | # -*- coding: utf-8 -*-
# Copyright 2015 grafana-dashboard-builder contributors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless requi... | # -*- coding: utf-8 -*-
# Copyright 2015 grafana-dashboard-builder contributors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless requi... | <commit_before># -*- coding: utf-8 -*-
# Copyright 2015 grafana-dashboard-builder contributors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#... | # -*- coding: utf-8 -*-
# Copyright 2015 grafana-dashboard-builder contributors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless requi... | # -*- coding: utf-8 -*-
# Copyright 2015 grafana-dashboard-builder contributors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless requi... | <commit_before># -*- coding: utf-8 -*-
# Copyright 2015 grafana-dashboard-builder contributors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#... |
00e84b51f22f78f0243cd7b7212e70447fd5b552 | store/tests/test_forms.py | store/tests/test_forms.py | from django.test import TestCase
from store.forms import ReviewForm
from store.models import Review
from .factories import *
class ReviewFormTest(TestCase):
def test_form_validation_for_blank_items(self):
p1 = ProductFactory.create()
form = ReviewForm(
data={'name':'', 'text': '', '... | from django.test import TestCase
from store.forms import ReviewForm
from store.models import Review
from .factories import *
class ReviewFormTest(TestCase):
def test_form_validation_for_blank_items(self):
p1 = ProductFactory.create()
form = ReviewForm(
data={'name':'', 'text': '', '... | Test that an empty name field doesn't raise errors | Test that an empty name field doesn't raise errors
| Python | bsd-3-clause | andela-kndungu/compshop,andela-kndungu/compshop,andela-kndungu/compshop,kevgathuku/compshop,kevgathuku/compshop,andela-kndungu/compshop,kevgathuku/compshop,kevgathuku/compshop | from django.test import TestCase
from store.forms import ReviewForm
from store.models import Review
from .factories import *
class ReviewFormTest(TestCase):
def test_form_validation_for_blank_items(self):
p1 = ProductFactory.create()
form = ReviewForm(
data={'name':'', 'text': '', '... | from django.test import TestCase
from store.forms import ReviewForm
from store.models import Review
from .factories import *
class ReviewFormTest(TestCase):
def test_form_validation_for_blank_items(self):
p1 = ProductFactory.create()
form = ReviewForm(
data={'name':'', 'text': '', '... | <commit_before>from django.test import TestCase
from store.forms import ReviewForm
from store.models import Review
from .factories import *
class ReviewFormTest(TestCase):
def test_form_validation_for_blank_items(self):
p1 = ProductFactory.create()
form = ReviewForm(
data={'name':''... | from django.test import TestCase
from store.forms import ReviewForm
from store.models import Review
from .factories import *
class ReviewFormTest(TestCase):
def test_form_validation_for_blank_items(self):
p1 = ProductFactory.create()
form = ReviewForm(
data={'name':'', 'text': '', '... | from django.test import TestCase
from store.forms import ReviewForm
from store.models import Review
from .factories import *
class ReviewFormTest(TestCase):
def test_form_validation_for_blank_items(self):
p1 = ProductFactory.create()
form = ReviewForm(
data={'name':'', 'text': '', '... | <commit_before>from django.test import TestCase
from store.forms import ReviewForm
from store.models import Review
from .factories import *
class ReviewFormTest(TestCase):
def test_form_validation_for_blank_items(self):
p1 = ProductFactory.create()
form = ReviewForm(
data={'name':''... |
327bbdde964f8af0625313922be91665a75d7268 | fabfile.py | fabfile.py | from fabric import api
def raspberry_pi(name):
api.env.hosts = ["{0}.local".format(name)]
api.env.user = 'pi'
def deploy():
api.require('hosts', provided_by=[raspberry_pi])
with api.settings(warn_only=True):
api.sudo('service sensor-rpc stop')
with api.cd('~/Pi-Sensor-RPC-Service'):
api.run('git pull ori... | from StringIO import StringIO
from fabric import api
from fabric.operations import prompt, put
UPSTART_TEMPLATE = """
description "Pi-Sensor-RPC-Service"
start on runlevel [2345]
stop on runlevel [06]
respawn
respawn limit 10 5
env LOGGLY_TOKEN={loggly_token}
env LOGGLY_SUBDOMAIN={loggly_domain}
env SERIAL_ADDRESS=... | Add install task to fab file | Add install task to fab file
| Python | mit | projectweekend/Pi-Sensor-RPC-Service | from fabric import api
def raspberry_pi(name):
api.env.hosts = ["{0}.local".format(name)]
api.env.user = 'pi'
def deploy():
api.require('hosts', provided_by=[raspberry_pi])
with api.settings(warn_only=True):
api.sudo('service sensor-rpc stop')
with api.cd('~/Pi-Sensor-RPC-Service'):
api.run('git pull ori... | from StringIO import StringIO
from fabric import api
from fabric.operations import prompt, put
UPSTART_TEMPLATE = """
description "Pi-Sensor-RPC-Service"
start on runlevel [2345]
stop on runlevel [06]
respawn
respawn limit 10 5
env LOGGLY_TOKEN={loggly_token}
env LOGGLY_SUBDOMAIN={loggly_domain}
env SERIAL_ADDRESS=... | <commit_before>from fabric import api
def raspberry_pi(name):
api.env.hosts = ["{0}.local".format(name)]
api.env.user = 'pi'
def deploy():
api.require('hosts', provided_by=[raspberry_pi])
with api.settings(warn_only=True):
api.sudo('service sensor-rpc stop')
with api.cd('~/Pi-Sensor-RPC-Service'):
api.ru... | from StringIO import StringIO
from fabric import api
from fabric.operations import prompt, put
UPSTART_TEMPLATE = """
description "Pi-Sensor-RPC-Service"
start on runlevel [2345]
stop on runlevel [06]
respawn
respawn limit 10 5
env LOGGLY_TOKEN={loggly_token}
env LOGGLY_SUBDOMAIN={loggly_domain}
env SERIAL_ADDRESS=... | from fabric import api
def raspberry_pi(name):
api.env.hosts = ["{0}.local".format(name)]
api.env.user = 'pi'
def deploy():
api.require('hosts', provided_by=[raspberry_pi])
with api.settings(warn_only=True):
api.sudo('service sensor-rpc stop')
with api.cd('~/Pi-Sensor-RPC-Service'):
api.run('git pull ori... | <commit_before>from fabric import api
def raspberry_pi(name):
api.env.hosts = ["{0}.local".format(name)]
api.env.user = 'pi'
def deploy():
api.require('hosts', provided_by=[raspberry_pi])
with api.settings(warn_only=True):
api.sudo('service sensor-rpc stop')
with api.cd('~/Pi-Sensor-RPC-Service'):
api.ru... |
71afe1acbdd7ee265983397e237b514482f04f73 | src/neuralNetwork.py | src/neuralNetwork.py | import numpy as np
def initializeNetwork(layerSizes = [1,2,3,4,1]):
l = len(layerSizes)
parameters = {}
for i in range(1,l):
parameters['W'+str(i)] = np.random.randn(layerSizes[i],layerSizes[i-1])*0.1
parameters['b'+str(i)] = np.empty((i,1))
return parameters
def forwardProp(X, paramet... | Add foward propagation and network initialization functions | Add foward propagation and network initialization functions
| Python | mit | YuelongLi/Deep-Learning |
Add foward propagation and network initialization functions | import numpy as np
def initializeNetwork(layerSizes = [1,2,3,4,1]):
l = len(layerSizes)
parameters = {}
for i in range(1,l):
parameters['W'+str(i)] = np.random.randn(layerSizes[i],layerSizes[i-1])*0.1
parameters['b'+str(i)] = np.empty((i,1))
return parameters
def forwardProp(X, paramet... | <commit_before>
<commit_msg>Add foward propagation and network initialization functions<commit_after> | import numpy as np
def initializeNetwork(layerSizes = [1,2,3,4,1]):
l = len(layerSizes)
parameters = {}
for i in range(1,l):
parameters['W'+str(i)] = np.random.randn(layerSizes[i],layerSizes[i-1])*0.1
parameters['b'+str(i)] = np.empty((i,1))
return parameters
def forwardProp(X, paramet... |
Add foward propagation and network initialization functionsimport numpy as np
def initializeNetwork(layerSizes = [1,2,3,4,1]):
l = len(layerSizes)
parameters = {}
for i in range(1,l):
parameters['W'+str(i)] = np.random.randn(layerSizes[i],layerSizes[i-1])*0.1
parameters['b'+str(i)] = np.em... | <commit_before>
<commit_msg>Add foward propagation and network initialization functions<commit_after>import numpy as np
def initializeNetwork(layerSizes = [1,2,3,4,1]):
l = len(layerSizes)
parameters = {}
for i in range(1,l):
parameters['W'+str(i)] = np.random.randn(layerSizes[i],layerSizes[i-1])*0... | |
97efe99ae964e8f4e866d961282257e6f4293fd8 | synapse/config/workers.py | synapse/config/workers.py | # -*- coding: utf-8 -*-
# Copyright 2016 matrix.org
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or... | # -*- coding: utf-8 -*-
# Copyright 2016 matrix.org
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or... | Make worker listener config backwards compat | Make worker listener config backwards compat
| Python | apache-2.0 | matrix-org/synapse,matrix-org/synapse,matrix-org/synapse,TribeMedia/synapse,TribeMedia/synapse,TribeMedia/synapse,matrix-org/synapse,matrix-org/synapse,matrix-org/synapse,TribeMedia/synapse,TribeMedia/synapse | # -*- coding: utf-8 -*-
# Copyright 2016 matrix.org
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or... | # -*- coding: utf-8 -*-
# Copyright 2016 matrix.org
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or... | <commit_before># -*- coding: utf-8 -*-
# Copyright 2016 matrix.org
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by ap... | # -*- coding: utf-8 -*-
# Copyright 2016 matrix.org
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or... | # -*- coding: utf-8 -*-
# Copyright 2016 matrix.org
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or... | <commit_before># -*- coding: utf-8 -*-
# Copyright 2016 matrix.org
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by ap... |
a440ea14d1dabb18aae7d8c7e0b6433dd57866f8 | overlay/Label.py | overlay/Label.py | from SVGGenerator import SVGGenerator
class Label(SVGGenerator):
def __init__(self, x, y, text):
SVGGenerator.__init__(self, './label.svg.mustache')
self.x = x
self.y = y
self.text = text
self.alignment = "start"
self.font_size = 12
self.color = "rgb(64,64,6... | from SVGGenerator import SVGGenerator
class Label(SVGGenerator):
def __init__(self, x, y, text):
SVGGenerator.__init__(self, './label.svg.mustache')
self.x = x
self.y = y
self.text = text
self.alignment = "start"
self.font_size = 14
self.color = "rgb(0,0,0)"... | Set default label color to black | Set default label color to black
| Python | mit | gizmo-cda/g2x,thelonious/g2x,gizmo-cda/g2x,gizmo-cda/g2x,gizmo-cda/g2x,thelonious/g2x | from SVGGenerator import SVGGenerator
class Label(SVGGenerator):
def __init__(self, x, y, text):
SVGGenerator.__init__(self, './label.svg.mustache')
self.x = x
self.y = y
self.text = text
self.alignment = "start"
self.font_size = 12
self.color = "rgb(64,64,6... | from SVGGenerator import SVGGenerator
class Label(SVGGenerator):
def __init__(self, x, y, text):
SVGGenerator.__init__(self, './label.svg.mustache')
self.x = x
self.y = y
self.text = text
self.alignment = "start"
self.font_size = 14
self.color = "rgb(0,0,0)"... | <commit_before>from SVGGenerator import SVGGenerator
class Label(SVGGenerator):
def __init__(self, x, y, text):
SVGGenerator.__init__(self, './label.svg.mustache')
self.x = x
self.y = y
self.text = text
self.alignment = "start"
self.font_size = 12
self.color... | from SVGGenerator import SVGGenerator
class Label(SVGGenerator):
def __init__(self, x, y, text):
SVGGenerator.__init__(self, './label.svg.mustache')
self.x = x
self.y = y
self.text = text
self.alignment = "start"
self.font_size = 14
self.color = "rgb(0,0,0)"... | from SVGGenerator import SVGGenerator
class Label(SVGGenerator):
def __init__(self, x, y, text):
SVGGenerator.__init__(self, './label.svg.mustache')
self.x = x
self.y = y
self.text = text
self.alignment = "start"
self.font_size = 12
self.color = "rgb(64,64,6... | <commit_before>from SVGGenerator import SVGGenerator
class Label(SVGGenerator):
def __init__(self, x, y, text):
SVGGenerator.__init__(self, './label.svg.mustache')
self.x = x
self.y = y
self.text = text
self.alignment = "start"
self.font_size = 12
self.color... |
582811074db86be964648dc9457855db3549a2b5 | data_structures/Disjoint_Set_Union/Python/dsu.py | data_structures/Disjoint_Set_Union/Python/dsu.py |
parent=[]
size=[]
def initialize(n):
for i in range(0,n+1):
parent.append(i)
size.append(1)
def find(x):
if parent[x] == x:
return x
else:
return find(parent[x])
def join(a,b):
p_a = find(a)
p_b = find(b)
if p_a != p_b:
if size[p_a] < size[p_b]:
parent[p_a] = p_b
size[p_b] += size[p_a]
els... |
parent=[]
size=[]
def initialize(n):
for i in range(0,n+1):
parent.append(i)
size.append(1)
def find(x):
if parent[x] == x:
return x
else:
return find(parent[x])
def join(a,b):
p_a = find(a)
p_b = find(b)
if p_a != p_b:
if size[p_a] < size[p_b]:
parent[p_a] = p_b
size[p_b] += size[p_a]
els... | Test for DSU on Python | Test for DSU on Python
| Python | cc0-1.0 | ZoranPandovski/al-go-rithms,ZoranPandovski/al-go-rithms,ZoranPandovski/al-go-rithms,ZoranPandovski/al-go-rithms,ZoranPandovski/al-go-rithms,ZoranPandovski/al-go-rithms,ZoranPandovski/al-go-rithms,ZoranPandovski/al-go-rithms,ZoranPandovski/al-go-rithms,ZoranPandovski/al-go-rithms,ZoranPandovski/al-go-rithms,ZoranPandovs... |
parent=[]
size=[]
def initialize(n):
for i in range(0,n+1):
parent.append(i)
size.append(1)
def find(x):
if parent[x] == x:
return x
else:
return find(parent[x])
def join(a,b):
p_a = find(a)
p_b = find(b)
if p_a != p_b:
if size[p_a] < size[p_b]:
parent[p_a] = p_b
size[p_b] += size[p_a]
els... |
parent=[]
size=[]
def initialize(n):
for i in range(0,n+1):
parent.append(i)
size.append(1)
def find(x):
if parent[x] == x:
return x
else:
return find(parent[x])
def join(a,b):
p_a = find(a)
p_b = find(b)
if p_a != p_b:
if size[p_a] < size[p_b]:
parent[p_a] = p_b
size[p_b] += size[p_a]
els... | <commit_before>
parent=[]
size=[]
def initialize(n):
for i in range(0,n+1):
parent.append(i)
size.append(1)
def find(x):
if parent[x] == x:
return x
else:
return find(parent[x])
def join(a,b):
p_a = find(a)
p_b = find(b)
if p_a != p_b:
if size[p_a] < size[p_b]:
parent[p_a] = p_b
size[p_b] += ... |
parent=[]
size=[]
def initialize(n):
for i in range(0,n+1):
parent.append(i)
size.append(1)
def find(x):
if parent[x] == x:
return x
else:
return find(parent[x])
def join(a,b):
p_a = find(a)
p_b = find(b)
if p_a != p_b:
if size[p_a] < size[p_b]:
parent[p_a] = p_b
size[p_b] += size[p_a]
els... |
parent=[]
size=[]
def initialize(n):
for i in range(0,n+1):
parent.append(i)
size.append(1)
def find(x):
if parent[x] == x:
return x
else:
return find(parent[x])
def join(a,b):
p_a = find(a)
p_b = find(b)
if p_a != p_b:
if size[p_a] < size[p_b]:
parent[p_a] = p_b
size[p_b] += size[p_a]
els... | <commit_before>
parent=[]
size=[]
def initialize(n):
for i in range(0,n+1):
parent.append(i)
size.append(1)
def find(x):
if parent[x] == x:
return x
else:
return find(parent[x])
def join(a,b):
p_a = find(a)
p_b = find(b)
if p_a != p_b:
if size[p_a] < size[p_b]:
parent[p_a] = p_b
size[p_b] += ... |
049a01d148c757a17e9804a2b1e42c918e29b094 | tests/basics/for_break.py | tests/basics/for_break.py | # Testcase for break in a for [within bunch of other code]
# https://github.com/micropython/micropython/issues/635
def foo():
seq = [1, 2, 3]
v = 100
i = 5
while i > 0:
print(i)
for a in seq:
if a == 2:
break
i -= 1
foo()
| # Testcase for break in a for [within bunch of other code]
# https://github.com/micropython/micropython/issues/635
def foo():
seq = [1, 2, 3]
v = 100
i = 5
while i > 0:
print(i)
for a in seq:
if a == 2:
break
i -= 1
foo()
# break from within nested ... | Add another test for break-from-for-loop. | tests: Add another test for break-from-for-loop.
| Python | mit | neilh10/micropython,galenhz/micropython,heisewangluo/micropython,heisewangluo/micropython,ruffy91/micropython,mgyenik/micropython,ericsnowcurrently/micropython,cnoviello/micropython,lbattraw/micropython,lbattraw/micropython,hosaka/micropython,EcmaXp/micropython,alex-march/micropython,Timmenem/micropython,cwyark/micropy... | # Testcase for break in a for [within bunch of other code]
# https://github.com/micropython/micropython/issues/635
def foo():
seq = [1, 2, 3]
v = 100
i = 5
while i > 0:
print(i)
for a in seq:
if a == 2:
break
i -= 1
foo()
tests: Add another test for ... | # Testcase for break in a for [within bunch of other code]
# https://github.com/micropython/micropython/issues/635
def foo():
seq = [1, 2, 3]
v = 100
i = 5
while i > 0:
print(i)
for a in seq:
if a == 2:
break
i -= 1
foo()
# break from within nested ... | <commit_before># Testcase for break in a for [within bunch of other code]
# https://github.com/micropython/micropython/issues/635
def foo():
seq = [1, 2, 3]
v = 100
i = 5
while i > 0:
print(i)
for a in seq:
if a == 2:
break
i -= 1
foo()
<commit_msg>t... | # Testcase for break in a for [within bunch of other code]
# https://github.com/micropython/micropython/issues/635
def foo():
seq = [1, 2, 3]
v = 100
i = 5
while i > 0:
print(i)
for a in seq:
if a == 2:
break
i -= 1
foo()
# break from within nested ... | # Testcase for break in a for [within bunch of other code]
# https://github.com/micropython/micropython/issues/635
def foo():
seq = [1, 2, 3]
v = 100
i = 5
while i > 0:
print(i)
for a in seq:
if a == 2:
break
i -= 1
foo()
tests: Add another test for ... | <commit_before># Testcase for break in a for [within bunch of other code]
# https://github.com/micropython/micropython/issues/635
def foo():
seq = [1, 2, 3]
v = 100
i = 5
while i > 0:
print(i)
for a in seq:
if a == 2:
break
i -= 1
foo()
<commit_msg>t... |
9a8f27fb6b3cec373d841b0973ee59f2ddd0b875 | fabfile.py | fabfile.py | from fabric.api import env, local, cd, run
env.use_ssh_config = True
env.hosts = ['root@skylines']
def deploy(branch='master', force=False):
push(branch, force)
restart()
def push(branch='master', force=False):
cmd = 'git push %s:/opt/skylines/src/ %s:master' % (env.host_string, branch)
if force:
... | from fabric.api import env, local, cd, run, settings, sudo
env.use_ssh_config = True
env.hosts = ['root@skylines']
def deploy(branch='master', force=False):
push(branch, force)
restart()
def push(branch='master', force=False):
cmd = 'git push %s:/opt/skylines/src/ %s:master' % (env.host_string, branch)... | Use sudo() function for db migration call | fabric: Use sudo() function for db migration call
| Python | agpl-3.0 | RBE-Avionik/skylines,shadowoneau/skylines,RBE-Avionik/skylines,Harry-R/skylines,Turbo87/skylines,Harry-R/skylines,skylines-project/skylines,TobiasLohner/SkyLines,shadowoneau/skylines,RBE-Avionik/skylines,kerel-fs/skylines,kerel-fs/skylines,snip/skylines,skylines-project/skylines,shadowoneau/skylines,Harry-R/skylines,sh... | from fabric.api import env, local, cd, run
env.use_ssh_config = True
env.hosts = ['root@skylines']
def deploy(branch='master', force=False):
push(branch, force)
restart()
def push(branch='master', force=False):
cmd = 'git push %s:/opt/skylines/src/ %s:master' % (env.host_string, branch)
if force:
... | from fabric.api import env, local, cd, run, settings, sudo
env.use_ssh_config = True
env.hosts = ['root@skylines']
def deploy(branch='master', force=False):
push(branch, force)
restart()
def push(branch='master', force=False):
cmd = 'git push %s:/opt/skylines/src/ %s:master' % (env.host_string, branch)... | <commit_before>from fabric.api import env, local, cd, run
env.use_ssh_config = True
env.hosts = ['root@skylines']
def deploy(branch='master', force=False):
push(branch, force)
restart()
def push(branch='master', force=False):
cmd = 'git push %s:/opt/skylines/src/ %s:master' % (env.host_string, branch)
... | from fabric.api import env, local, cd, run, settings, sudo
env.use_ssh_config = True
env.hosts = ['root@skylines']
def deploy(branch='master', force=False):
push(branch, force)
restart()
def push(branch='master', force=False):
cmd = 'git push %s:/opt/skylines/src/ %s:master' % (env.host_string, branch)... | from fabric.api import env, local, cd, run
env.use_ssh_config = True
env.hosts = ['root@skylines']
def deploy(branch='master', force=False):
push(branch, force)
restart()
def push(branch='master', force=False):
cmd = 'git push %s:/opt/skylines/src/ %s:master' % (env.host_string, branch)
if force:
... | <commit_before>from fabric.api import env, local, cd, run
env.use_ssh_config = True
env.hosts = ['root@skylines']
def deploy(branch='master', force=False):
push(branch, force)
restart()
def push(branch='master', force=False):
cmd = 'git push %s:/opt/skylines/src/ %s:master' % (env.host_string, branch)
... |
63d250d89dca72d91ad4470ba2af22b326d15454 | app/utils.py | app/utils.py | import traceback
import sys
import logging
# always print stuff on the screen:
logging.basicConfig(level=logging.INFO)
def log_exception(func):
def wrapper(*args, **kwargs):
try:
return func(*args, **kwargs)
except:
logging.info("Exception raised")
etype, value,... | import traceback
import sys
import logging
# always print stuff on the screen:
logging.basicConfig(level=logging.INFO)
def log_exception(func):
def wrapper(*args, **kwargs):
try:
return func(*args, **kwargs)
except:
logging.info("Exception raised")
etype, value,... | Use repr() instead of str() for printing | Use repr() instead of str() for printing
| Python | bsd-3-clause | kaichogami/sympy_gamma,kaichogami/sympy_gamma,iScienceLuvr/sympy_gamma,iScienceLuvr/sympy_gamma,debugger22/sympy_gamma,debugger22/sympy_gamma,bolshoibooze/sympy_gamma,github4ry/sympy_gamma,bolshoibooze/sympy_gamma,kaichogami/sympy_gamma,iScienceLuvr/sympy_gamma,github4ry/sympy_gamma,bolshoibooze/sympy_gamma,github4ry/s... | import traceback
import sys
import logging
# always print stuff on the screen:
logging.basicConfig(level=logging.INFO)
def log_exception(func):
def wrapper(*args, **kwargs):
try:
return func(*args, **kwargs)
except:
logging.info("Exception raised")
etype, value,... | import traceback
import sys
import logging
# always print stuff on the screen:
logging.basicConfig(level=logging.INFO)
def log_exception(func):
def wrapper(*args, **kwargs):
try:
return func(*args, **kwargs)
except:
logging.info("Exception raised")
etype, value,... | <commit_before>import traceback
import sys
import logging
# always print stuff on the screen:
logging.basicConfig(level=logging.INFO)
def log_exception(func):
def wrapper(*args, **kwargs):
try:
return func(*args, **kwargs)
except:
logging.info("Exception raised")
... | import traceback
import sys
import logging
# always print stuff on the screen:
logging.basicConfig(level=logging.INFO)
def log_exception(func):
def wrapper(*args, **kwargs):
try:
return func(*args, **kwargs)
except:
logging.info("Exception raised")
etype, value,... | import traceback
import sys
import logging
# always print stuff on the screen:
logging.basicConfig(level=logging.INFO)
def log_exception(func):
def wrapper(*args, **kwargs):
try:
return func(*args, **kwargs)
except:
logging.info("Exception raised")
etype, value,... | <commit_before>import traceback
import sys
import logging
# always print stuff on the screen:
logging.basicConfig(level=logging.INFO)
def log_exception(func):
def wrapper(*args, **kwargs):
try:
return func(*args, **kwargs)
except:
logging.info("Exception raised")
... |
1f863b45e6e3fd5491a59d3d522ddd7ca5a5bfbd | ibutton.py | ibutton.py | import serial
class iButton(object):
def __init__(self, ibutton_address, rfid_address, debug=False):
# self.ibutton_serial = serial.Serial(ibutton_address)
self.rfid_serial = serial.Serial(rfid_address)
self.debug = debug
def read(self):
if self.debug:
with open("i... | import serial
class iButton(object):
def __init__(self, ibutton_address, rfid_address, debug=False):
# self.ibutton_serial = serial.Serial(ibutton_address)
self.rfid_serial = serial.Serial(rfid_address)
self.debug = debug
def read(self):
if self.debug:
with open("i... | Fix RDID reading code to ignore leading space | Fix RDID reading code to ignore leading space
| Python | mit | stevenmirabito/DrinkTouchClient-2.0,harlanhaskins/DrinkTouchClient-2.0 | import serial
class iButton(object):
def __init__(self, ibutton_address, rfid_address, debug=False):
# self.ibutton_serial = serial.Serial(ibutton_address)
self.rfid_serial = serial.Serial(rfid_address)
self.debug = debug
def read(self):
if self.debug:
with open("i... | import serial
class iButton(object):
def __init__(self, ibutton_address, rfid_address, debug=False):
# self.ibutton_serial = serial.Serial(ibutton_address)
self.rfid_serial = serial.Serial(rfid_address)
self.debug = debug
def read(self):
if self.debug:
with open("i... | <commit_before>import serial
class iButton(object):
def __init__(self, ibutton_address, rfid_address, debug=False):
# self.ibutton_serial = serial.Serial(ibutton_address)
self.rfid_serial = serial.Serial(rfid_address)
self.debug = debug
def read(self):
if self.debug:
... | import serial
class iButton(object):
def __init__(self, ibutton_address, rfid_address, debug=False):
# self.ibutton_serial = serial.Serial(ibutton_address)
self.rfid_serial = serial.Serial(rfid_address)
self.debug = debug
def read(self):
if self.debug:
with open("i... | import serial
class iButton(object):
def __init__(self, ibutton_address, rfid_address, debug=False):
# self.ibutton_serial = serial.Serial(ibutton_address)
self.rfid_serial = serial.Serial(rfid_address)
self.debug = debug
def read(self):
if self.debug:
with open("i... | <commit_before>import serial
class iButton(object):
def __init__(self, ibutton_address, rfid_address, debug=False):
# self.ibutton_serial = serial.Serial(ibutton_address)
self.rfid_serial = serial.Serial(rfid_address)
self.debug = debug
def read(self):
if self.debug:
... |
c3881c1146d5dbe77a332698ac7c292c68c5a420 | app.py | app.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import datetime
import requests
from flask import Flask, render_template, request
app = Flask(__name__)
@app.route('/')
def index():
session = requests.Session()
session.headers.update({'User-Agent': 'Mozilla/5.0 (X11; Ubuntu; Linux \
... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import datetime
import requests
from flask import Flask, render_template, request
app = Flask(__name__)
@app.route('/')
def index():
session = requests.Session()
session.headers.update({'User-Agent': 'Mozilla/5.0 (X11; Ubuntu; Linux \
... | Remove the dumplicate top stories | Remove the dumplicate top stories
| Python | mit | lord63/zhihudaily,lord63/zhihudaily,lord63/zhihudaily | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import datetime
import requests
from flask import Flask, render_template, request
app = Flask(__name__)
@app.route('/')
def index():
session = requests.Session()
session.headers.update({'User-Agent': 'Mozilla/5.0 (X11; Ubuntu; Linux \
... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import datetime
import requests
from flask import Flask, render_template, request
app = Flask(__name__)
@app.route('/')
def index():
session = requests.Session()
session.headers.update({'User-Agent': 'Mozilla/5.0 (X11; Ubuntu; Linux \
... | <commit_before>#!/usr/bin/env python
# -*- coding: utf-8 -*-
import datetime
import requests
from flask import Flask, render_template, request
app = Flask(__name__)
@app.route('/')
def index():
session = requests.Session()
session.headers.update({'User-Agent': 'Mozilla/5.0 (X11; Ubuntu; Linux \
... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import datetime
import requests
from flask import Flask, render_template, request
app = Flask(__name__)
@app.route('/')
def index():
session = requests.Session()
session.headers.update({'User-Agent': 'Mozilla/5.0 (X11; Ubuntu; Linux \
... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import datetime
import requests
from flask import Flask, render_template, request
app = Flask(__name__)
@app.route('/')
def index():
session = requests.Session()
session.headers.update({'User-Agent': 'Mozilla/5.0 (X11; Ubuntu; Linux \
... | <commit_before>#!/usr/bin/env python
# -*- coding: utf-8 -*-
import datetime
import requests
from flask import Flask, render_template, request
app = Flask(__name__)
@app.route('/')
def index():
session = requests.Session()
session.headers.update({'User-Agent': 'Mozilla/5.0 (X11; Ubuntu; Linux \
... |
2036e978a22cf980a6bc28a8e7276886fa8857e8 | activeusers/__init__.py | activeusers/__init__.py |
VERSION = (0, 1, 1)
def get_version():
"Returns the version as a human-format string."
return '.'.join([str(i) for i in VERSION])
|
VERSION = (0, 1, 2)
def get_version():
"Returns the version as a human-format string."
return '.'.join([str(i) for i in VERSION])
| Increment version to 0.1.2 to fix pip not updating to edge | Increment version to 0.1.2 to fix pip not updating to edge
| Python | mit | asavoy/django-activeusers,arteria/django-activeusers |
VERSION = (0, 1, 1)
def get_version():
"Returns the version as a human-format string."
return '.'.join([str(i) for i in VERSION])
Increment version to 0.1.2 to fix pip not updating to edge |
VERSION = (0, 1, 2)
def get_version():
"Returns the version as a human-format string."
return '.'.join([str(i) for i in VERSION])
| <commit_before>
VERSION = (0, 1, 1)
def get_version():
"Returns the version as a human-format string."
return '.'.join([str(i) for i in VERSION])
<commit_msg>Increment version to 0.1.2 to fix pip not updating to edge<commit_after> |
VERSION = (0, 1, 2)
def get_version():
"Returns the version as a human-format string."
return '.'.join([str(i) for i in VERSION])
|
VERSION = (0, 1, 1)
def get_version():
"Returns the version as a human-format string."
return '.'.join([str(i) for i in VERSION])
Increment version to 0.1.2 to fix pip not updating to edge
VERSION = (0, 1, 2)
def get_version():
"Returns the version as a human-format string."
return '.'.join([str(i) ... | <commit_before>
VERSION = (0, 1, 1)
def get_version():
"Returns the version as a human-format string."
return '.'.join([str(i) for i in VERSION])
<commit_msg>Increment version to 0.1.2 to fix pip not updating to edge<commit_after>
VERSION = (0, 1, 2)
def get_version():
"Returns the version as a human-for... |
989abdc718973551bbb3565859d75ea0408776d0 | example_project/example_project/urls.py | example_project/example_project/urls.py | from django.conf import settings
from django.conf.urls import include, url
from django.contrib import admin
from django.views.static import serve
urlpatterns = [
# Examples:
# url(r'^$', 'example_project.views.home', name='home'),
# url(r'^blog/', include('blog.urls')),
url(r"^admin/", include(admin.si... | from django.conf import settings
from django.conf.urls import include, url
from django.contrib import admin
from django.views.static import serve
urlpatterns = [
# Examples:
# url(r'^$', 'example_project.views.home', name='home'),
# url(r'^blog/', include('blog.urls')),
url(r"^admin/", admin.site.urls)... | Fix URLconf for example project. | Fix URLconf for example project.
| Python | mit | zsiciarz/django-pgallery,zsiciarz/django-pgallery | from django.conf import settings
from django.conf.urls import include, url
from django.contrib import admin
from django.views.static import serve
urlpatterns = [
# Examples:
# url(r'^$', 'example_project.views.home', name='home'),
# url(r'^blog/', include('blog.urls')),
url(r"^admin/", include(admin.si... | from django.conf import settings
from django.conf.urls import include, url
from django.contrib import admin
from django.views.static import serve
urlpatterns = [
# Examples:
# url(r'^$', 'example_project.views.home', name='home'),
# url(r'^blog/', include('blog.urls')),
url(r"^admin/", admin.site.urls)... | <commit_before>from django.conf import settings
from django.conf.urls import include, url
from django.contrib import admin
from django.views.static import serve
urlpatterns = [
# Examples:
# url(r'^$', 'example_project.views.home', name='home'),
# url(r'^blog/', include('blog.urls')),
url(r"^admin/", i... | from django.conf import settings
from django.conf.urls import include, url
from django.contrib import admin
from django.views.static import serve
urlpatterns = [
# Examples:
# url(r'^$', 'example_project.views.home', name='home'),
# url(r'^blog/', include('blog.urls')),
url(r"^admin/", admin.site.urls)... | from django.conf import settings
from django.conf.urls import include, url
from django.contrib import admin
from django.views.static import serve
urlpatterns = [
# Examples:
# url(r'^$', 'example_project.views.home', name='home'),
# url(r'^blog/', include('blog.urls')),
url(r"^admin/", include(admin.si... | <commit_before>from django.conf import settings
from django.conf.urls import include, url
from django.contrib import admin
from django.views.static import serve
urlpatterns = [
# Examples:
# url(r'^$', 'example_project.views.home', name='home'),
# url(r'^blog/', include('blog.urls')),
url(r"^admin/", i... |
cd9b2e375587fdf0bc6b2d61a983ca40e6680218 | osf/migrations/0139_rename_aspredicted_schema.py | osf/migrations/0139_rename_aspredicted_schema.py | # -*- coding: utf-8 -*-
# Generated by Django 1.11.15 on 2018-10-16 20:22
from __future__ import unicode_literals
from django.db import migrations
from osf.models import RegistrationSchema
OLD_NAME = 'AsPredicted Preregistration'
NEW_NAME = 'Preregistration Template from AsPredicted.org'
def rename_schema(from_name,... | # -*- coding: utf-8 -*-
# Generated by Django 1.11.15 on 2018-10-16 20:22
from __future__ import unicode_literals
from django.db import migrations
OLD_NAME = 'AsPredicted Preregistration'
NEW_NAME = 'Preregistration Template from AsPredicted.org'
def rename_schema(model, from_name, to_name):
try:
schema ... | Migrate with model from app state - Not from app code | Migrate with model from app state
- Not from app code
| Python | apache-2.0 | adlius/osf.io,mattclark/osf.io,cslzchen/osf.io,pattisdr/osf.io,brianjgeiger/osf.io,adlius/osf.io,CenterForOpenScience/osf.io,mattclark/osf.io,aaxelb/osf.io,brianjgeiger/osf.io,felliott/osf.io,pattisdr/osf.io,mfraezz/osf.io,adlius/osf.io,baylee-d/osf.io,CenterForOpenScience/osf.io,felliott/osf.io,Johnetordoff/osf.io,bay... | # -*- coding: utf-8 -*-
# Generated by Django 1.11.15 on 2018-10-16 20:22
from __future__ import unicode_literals
from django.db import migrations
from osf.models import RegistrationSchema
OLD_NAME = 'AsPredicted Preregistration'
NEW_NAME = 'Preregistration Template from AsPredicted.org'
def rename_schema(from_name,... | # -*- coding: utf-8 -*-
# Generated by Django 1.11.15 on 2018-10-16 20:22
from __future__ import unicode_literals
from django.db import migrations
OLD_NAME = 'AsPredicted Preregistration'
NEW_NAME = 'Preregistration Template from AsPredicted.org'
def rename_schema(model, from_name, to_name):
try:
schema ... | <commit_before># -*- coding: utf-8 -*-
# Generated by Django 1.11.15 on 2018-10-16 20:22
from __future__ import unicode_literals
from django.db import migrations
from osf.models import RegistrationSchema
OLD_NAME = 'AsPredicted Preregistration'
NEW_NAME = 'Preregistration Template from AsPredicted.org'
def rename_sc... | # -*- coding: utf-8 -*-
# Generated by Django 1.11.15 on 2018-10-16 20:22
from __future__ import unicode_literals
from django.db import migrations
OLD_NAME = 'AsPredicted Preregistration'
NEW_NAME = 'Preregistration Template from AsPredicted.org'
def rename_schema(model, from_name, to_name):
try:
schema ... | # -*- coding: utf-8 -*-
# Generated by Django 1.11.15 on 2018-10-16 20:22
from __future__ import unicode_literals
from django.db import migrations
from osf.models import RegistrationSchema
OLD_NAME = 'AsPredicted Preregistration'
NEW_NAME = 'Preregistration Template from AsPredicted.org'
def rename_schema(from_name,... | <commit_before># -*- coding: utf-8 -*-
# Generated by Django 1.11.15 on 2018-10-16 20:22
from __future__ import unicode_literals
from django.db import migrations
from osf.models import RegistrationSchema
OLD_NAME = 'AsPredicted Preregistration'
NEW_NAME = 'Preregistration Template from AsPredicted.org'
def rename_sc... |
a6e14ac538a40fd98db16a98938acfb6a811dc06 | fabfile.py | fabfile.py | from fabric.api import (
cd,
env,
put,
sudo,
task
)
PRODUCTION_IP = ''
PROJECT_DIRECTORY = '/home/ubuntu/ztm/'
COMPOSE_FILE = 'compose-production.yml'
@task
def production():
env.run = sudo
env.hosts = [
'ubuntu@' + PRODUCTION_IP + ':22',
]
def create_project_directory():
... | from fabric.api import (
cd,
env,
put,
run,
sudo,
task
)
PRODUCTION_IP = '54.154.235.243'
PROJECT_DIRECTORY = '/home/ubuntu/ztm/'
COMPOSE_FILE = 'compose-production.yml'
@task
def production():
env.run = sudo
env.hosts = [
'ubuntu@' + PRODUCTION_IP + ':22',
]
def create... | Fix production ID and run command without sudo | Fix production ID and run command without sudo
| Python | mit | prontotools/zendesk-tickets-machine,prontotools/zendesk-tickets-machine,prontotools/zendesk-tickets-machine,prontotools/zendesk-tickets-machine | from fabric.api import (
cd,
env,
put,
sudo,
task
)
PRODUCTION_IP = ''
PROJECT_DIRECTORY = '/home/ubuntu/ztm/'
COMPOSE_FILE = 'compose-production.yml'
@task
def production():
env.run = sudo
env.hosts = [
'ubuntu@' + PRODUCTION_IP + ':22',
]
def create_project_directory():
... | from fabric.api import (
cd,
env,
put,
run,
sudo,
task
)
PRODUCTION_IP = '54.154.235.243'
PROJECT_DIRECTORY = '/home/ubuntu/ztm/'
COMPOSE_FILE = 'compose-production.yml'
@task
def production():
env.run = sudo
env.hosts = [
'ubuntu@' + PRODUCTION_IP + ':22',
]
def create... | <commit_before>from fabric.api import (
cd,
env,
put,
sudo,
task
)
PRODUCTION_IP = ''
PROJECT_DIRECTORY = '/home/ubuntu/ztm/'
COMPOSE_FILE = 'compose-production.yml'
@task
def production():
env.run = sudo
env.hosts = [
'ubuntu@' + PRODUCTION_IP + ':22',
]
def create_project... | from fabric.api import (
cd,
env,
put,
run,
sudo,
task
)
PRODUCTION_IP = '54.154.235.243'
PROJECT_DIRECTORY = '/home/ubuntu/ztm/'
COMPOSE_FILE = 'compose-production.yml'
@task
def production():
env.run = sudo
env.hosts = [
'ubuntu@' + PRODUCTION_IP + ':22',
]
def create... | from fabric.api import (
cd,
env,
put,
sudo,
task
)
PRODUCTION_IP = ''
PROJECT_DIRECTORY = '/home/ubuntu/ztm/'
COMPOSE_FILE = 'compose-production.yml'
@task
def production():
env.run = sudo
env.hosts = [
'ubuntu@' + PRODUCTION_IP + ':22',
]
def create_project_directory():
... | <commit_before>from fabric.api import (
cd,
env,
put,
sudo,
task
)
PRODUCTION_IP = ''
PROJECT_DIRECTORY = '/home/ubuntu/ztm/'
COMPOSE_FILE = 'compose-production.yml'
@task
def production():
env.run = sudo
env.hosts = [
'ubuntu@' + PRODUCTION_IP + ':22',
]
def create_project... |
82bd8ced41e2aa4a5f0ca9384c902f7e36fd1005 | fabfile.py | fabfile.py | import os
from fabric.api import task, run, local, sudo, cd, env
env.hosts = [
os.environ['TWWEB_HOST'],
]
def virtualenv(command, user=None):
run('source /var/www/envs/twweb/bin/activate && ' + command)
@task
def deploy():
local('git push origin development')
local('git checkout master')
loc... | import os
from fabric.api import task, run, local, sudo, cd, env
env.hosts = [
os.environ['TWWEB_HOST'],
]
def virtualenv(command, user=None):
run('source /var/www/envs/twweb/bin/activate && ' + command)
@task
def deploy():
local('git push origin development')
local('git checkout master')
loc... | Update deployment process to use frozen requirements. | Update deployment process to use frozen requirements.
| Python | agpl-3.0 | coddingtonbear/inthe.am,coddingtonbear/inthe.am,coddingtonbear/inthe.am,coddingtonbear/inthe.am,coddingtonbear/inthe.am | import os
from fabric.api import task, run, local, sudo, cd, env
env.hosts = [
os.environ['TWWEB_HOST'],
]
def virtualenv(command, user=None):
run('source /var/www/envs/twweb/bin/activate && ' + command)
@task
def deploy():
local('git push origin development')
local('git checkout master')
loc... | import os
from fabric.api import task, run, local, sudo, cd, env
env.hosts = [
os.environ['TWWEB_HOST'],
]
def virtualenv(command, user=None):
run('source /var/www/envs/twweb/bin/activate && ' + command)
@task
def deploy():
local('git push origin development')
local('git checkout master')
loc... | <commit_before>import os
from fabric.api import task, run, local, sudo, cd, env
env.hosts = [
os.environ['TWWEB_HOST'],
]
def virtualenv(command, user=None):
run('source /var/www/envs/twweb/bin/activate && ' + command)
@task
def deploy():
local('git push origin development')
local('git checkout m... | import os
from fabric.api import task, run, local, sudo, cd, env
env.hosts = [
os.environ['TWWEB_HOST'],
]
def virtualenv(command, user=None):
run('source /var/www/envs/twweb/bin/activate && ' + command)
@task
def deploy():
local('git push origin development')
local('git checkout master')
loc... | import os
from fabric.api import task, run, local, sudo, cd, env
env.hosts = [
os.environ['TWWEB_HOST'],
]
def virtualenv(command, user=None):
run('source /var/www/envs/twweb/bin/activate && ' + command)
@task
def deploy():
local('git push origin development')
local('git checkout master')
loc... | <commit_before>import os
from fabric.api import task, run, local, sudo, cd, env
env.hosts = [
os.environ['TWWEB_HOST'],
]
def virtualenv(command, user=None):
run('source /var/www/envs/twweb/bin/activate && ' + command)
@task
def deploy():
local('git push origin development')
local('git checkout m... |
f5143ccb206e5b077f0a80c88555e57064b6acab | fabfile.py | fabfile.py | from fabric.api import *
env.hosts = [
'192.168.1.144'
]
env.user = 'pi'
def prepare_raspberry_pi():
pass
def remote_pull():
with cd('virtualenvs/queen/queen'):
run('git pull')
def deploy():
local('git commit -a')
local('git push origin')
remote_pull()
| from fabric.api import *
env.hosts = [
'192.168.1.144'
]
env.user = 'pi'
def prepare_raspberry_pi():
pass
def remote_pull():
with cd('virtualenvs/queen/queen'):
run('git pull')
def commit():
local('git commit -a')
def push():
local('git push origin')
def deploy():
commit()
push()
remote_pull()
| Add fab commands to push and pull | Add fab commands to push and pull
| Python | mit | kalail/queen,kalail/queen | from fabric.api import *
env.hosts = [
'192.168.1.144'
]
env.user = 'pi'
def prepare_raspberry_pi():
pass
def remote_pull():
with cd('virtualenvs/queen/queen'):
run('git pull')
def deploy():
local('git commit -a')
local('git push origin')
remote_pull()
Add fab commands to push and pull | from fabric.api import *
env.hosts = [
'192.168.1.144'
]
env.user = 'pi'
def prepare_raspberry_pi():
pass
def remote_pull():
with cd('virtualenvs/queen/queen'):
run('git pull')
def commit():
local('git commit -a')
def push():
local('git push origin')
def deploy():
commit()
push()
remote_pull()
| <commit_before>from fabric.api import *
env.hosts = [
'192.168.1.144'
]
env.user = 'pi'
def prepare_raspberry_pi():
pass
def remote_pull():
with cd('virtualenvs/queen/queen'):
run('git pull')
def deploy():
local('git commit -a')
local('git push origin')
remote_pull()
<commit_msg>Add fab commands to push a... | from fabric.api import *
env.hosts = [
'192.168.1.144'
]
env.user = 'pi'
def prepare_raspberry_pi():
pass
def remote_pull():
with cd('virtualenvs/queen/queen'):
run('git pull')
def commit():
local('git commit -a')
def push():
local('git push origin')
def deploy():
commit()
push()
remote_pull()
| from fabric.api import *
env.hosts = [
'192.168.1.144'
]
env.user = 'pi'
def prepare_raspberry_pi():
pass
def remote_pull():
with cd('virtualenvs/queen/queen'):
run('git pull')
def deploy():
local('git commit -a')
local('git push origin')
remote_pull()
Add fab commands to push and pullfrom fabric.api impo... | <commit_before>from fabric.api import *
env.hosts = [
'192.168.1.144'
]
env.user = 'pi'
def prepare_raspberry_pi():
pass
def remote_pull():
with cd('virtualenvs/queen/queen'):
run('git pull')
def deploy():
local('git commit -a')
local('git push origin')
remote_pull()
<commit_msg>Add fab commands to push a... |
d8db2744d45e4478b8a2c9a5f0fa76cda33c9964 | opbeat/instrumentation/packages/jinja2.py | opbeat/instrumentation/packages/jinja2.py | from opbeat.instrumentation.packages.base import AbstractInstrumentedModule
class Jinja2Instrumentation(AbstractInstrumentedModule):
name = 'pylibmc'
instrument_list = [
("jinja2", "Template.render"),
]
def call(self, module, method, wrapped, instance, args, kwargs):
signature = inst... | from opbeat.instrumentation.packages.base import AbstractInstrumentedModule
class Jinja2Instrumentation(AbstractInstrumentedModule):
name = 'jinja2'
instrument_list = [
("jinja2", "Template.render"),
]
def call(self, module, method, wrapped, instance, args, kwargs):
signature = insta... | Use the correct "name" for Jinja2 instrumentation. | Use the correct "name" for Jinja2 instrumentation.
| Python | bsd-3-clause | ticosax/opbeat_python,beniwohli/apm-agent-python,dirtycoder/opbeat_python,beniwohli/apm-agent-python,patrys/opbeat_python,beniwohli/apm-agent-python,ticosax/opbeat_python,dirtycoder/opbeat_python,ticosax/opbeat_python,patrys/opbeat_python,tarkatronic/opbeat_python,tarkatronic/opbeat_python,patrys/opbeat_python,daikeren... | from opbeat.instrumentation.packages.base import AbstractInstrumentedModule
class Jinja2Instrumentation(AbstractInstrumentedModule):
name = 'pylibmc'
instrument_list = [
("jinja2", "Template.render"),
]
def call(self, module, method, wrapped, instance, args, kwargs):
signature = inst... | from opbeat.instrumentation.packages.base import AbstractInstrumentedModule
class Jinja2Instrumentation(AbstractInstrumentedModule):
name = 'jinja2'
instrument_list = [
("jinja2", "Template.render"),
]
def call(self, module, method, wrapped, instance, args, kwargs):
signature = insta... | <commit_before>from opbeat.instrumentation.packages.base import AbstractInstrumentedModule
class Jinja2Instrumentation(AbstractInstrumentedModule):
name = 'pylibmc'
instrument_list = [
("jinja2", "Template.render"),
]
def call(self, module, method, wrapped, instance, args, kwargs):
s... | from opbeat.instrumentation.packages.base import AbstractInstrumentedModule
class Jinja2Instrumentation(AbstractInstrumentedModule):
name = 'jinja2'
instrument_list = [
("jinja2", "Template.render"),
]
def call(self, module, method, wrapped, instance, args, kwargs):
signature = insta... | from opbeat.instrumentation.packages.base import AbstractInstrumentedModule
class Jinja2Instrumentation(AbstractInstrumentedModule):
name = 'pylibmc'
instrument_list = [
("jinja2", "Template.render"),
]
def call(self, module, method, wrapped, instance, args, kwargs):
signature = inst... | <commit_before>from opbeat.instrumentation.packages.base import AbstractInstrumentedModule
class Jinja2Instrumentation(AbstractInstrumentedModule):
name = 'pylibmc'
instrument_list = [
("jinja2", "Template.render"),
]
def call(self, module, method, wrapped, instance, args, kwargs):
s... |
8b3132f9aec26d71498a153a29ea8d2049f07da6 | studygroups/admin.py | studygroups/admin.py | from django.contrib import admin
# Register your models here.
from studygroups.models import Course, StudyGroup, StudyGroupSignup, Application
class CourseAdmin(admin.ModelAdmin):
pass
class StudyGroupSignupInline(admin.TabularInline):
model = StudyGroupSignup
class StudyGroupAdmin(admin.ModelAdmin):
in... | from django.contrib import admin
# Register your models here.
from studygroups.models import Course, StudyGroup, StudyGroupSignup, Application
class StudyGroupSignupInline(admin.TabularInline):
model = StudyGroupSignup
class ApplicationInline(admin.TabularInline):
model = Application.study_groups.through
... | Add applications to study groups | Add applications to study groups
| Python | mit | p2pu/learning-circles,p2pu/learning-circles,p2pu/learning-circles,p2pu/learning-circles | from django.contrib import admin
# Register your models here.
from studygroups.models import Course, StudyGroup, StudyGroupSignup, Application
class CourseAdmin(admin.ModelAdmin):
pass
class StudyGroupSignupInline(admin.TabularInline):
model = StudyGroupSignup
class StudyGroupAdmin(admin.ModelAdmin):
in... | from django.contrib import admin
# Register your models here.
from studygroups.models import Course, StudyGroup, StudyGroupSignup, Application
class StudyGroupSignupInline(admin.TabularInline):
model = StudyGroupSignup
class ApplicationInline(admin.TabularInline):
model = Application.study_groups.through
... | <commit_before>from django.contrib import admin
# Register your models here.
from studygroups.models import Course, StudyGroup, StudyGroupSignup, Application
class CourseAdmin(admin.ModelAdmin):
pass
class StudyGroupSignupInline(admin.TabularInline):
model = StudyGroupSignup
class StudyGroupAdmin(admin.Mode... | from django.contrib import admin
# Register your models here.
from studygroups.models import Course, StudyGroup, StudyGroupSignup, Application
class StudyGroupSignupInline(admin.TabularInline):
model = StudyGroupSignup
class ApplicationInline(admin.TabularInline):
model = Application.study_groups.through
... | from django.contrib import admin
# Register your models here.
from studygroups.models import Course, StudyGroup, StudyGroupSignup, Application
class CourseAdmin(admin.ModelAdmin):
pass
class StudyGroupSignupInline(admin.TabularInline):
model = StudyGroupSignup
class StudyGroupAdmin(admin.ModelAdmin):
in... | <commit_before>from django.contrib import admin
# Register your models here.
from studygroups.models import Course, StudyGroup, StudyGroupSignup, Application
class CourseAdmin(admin.ModelAdmin):
pass
class StudyGroupSignupInline(admin.TabularInline):
model = StudyGroupSignup
class StudyGroupAdmin(admin.Mode... |
42e17593dd9fdbeac02f2b71beebae3b1a7f94c8 | openhatch-issues/openhatch-issues.py | openhatch-issues/openhatch-issues.py | # -*- coding: utf-8 -*-
from github3 import login
mytoken = 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'
gh = login('xxxxx', token=mytoken)
user = gh.user()
print(user.name)
print(user.login)
print(user.followers)
for f in gh.iter_followers():
print(str(f))
print(gh.zen())
| # -*- coding: utf-8 -*-
from github3 import login
mytoken = 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'
gh = login('xxxxx', token=mytoken)
user = gh.user()
print(user.name)
print(user.login)
print(user.followers)
for f in gh.iter_followers():
print(str(f))
print(gh.zen())
issue = gh.issue('openhatch', 'oh-main... | Add hack experiment for issues and labels | Add hack experiment for issues and labels
| Python | bsd-3-clause | willingc/openhatch-issues,willingc/openhatch-issues | # -*- coding: utf-8 -*-
from github3 import login
mytoken = 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'
gh = login('xxxxx', token=mytoken)
user = gh.user()
print(user.name)
print(user.login)
print(user.followers)
for f in gh.iter_followers():
print(str(f))
print(gh.zen())
Add hack experiment for issues and labe... | # -*- coding: utf-8 -*-
from github3 import login
mytoken = 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'
gh = login('xxxxx', token=mytoken)
user = gh.user()
print(user.name)
print(user.login)
print(user.followers)
for f in gh.iter_followers():
print(str(f))
print(gh.zen())
issue = gh.issue('openhatch', 'oh-main... | <commit_before># -*- coding: utf-8 -*-
from github3 import login
mytoken = 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'
gh = login('xxxxx', token=mytoken)
user = gh.user()
print(user.name)
print(user.login)
print(user.followers)
for f in gh.iter_followers():
print(str(f))
print(gh.zen())
<commit_msg>Add hack exp... | # -*- coding: utf-8 -*-
from github3 import login
mytoken = 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'
gh = login('xxxxx', token=mytoken)
user = gh.user()
print(user.name)
print(user.login)
print(user.followers)
for f in gh.iter_followers():
print(str(f))
print(gh.zen())
issue = gh.issue('openhatch', 'oh-main... | # -*- coding: utf-8 -*-
from github3 import login
mytoken = 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'
gh = login('xxxxx', token=mytoken)
user = gh.user()
print(user.name)
print(user.login)
print(user.followers)
for f in gh.iter_followers():
print(str(f))
print(gh.zen())
Add hack experiment for issues and labe... | <commit_before># -*- coding: utf-8 -*-
from github3 import login
mytoken = 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'
gh = login('xxxxx', token=mytoken)
user = gh.user()
print(user.name)
print(user.login)
print(user.followers)
for f in gh.iter_followers():
print(str(f))
print(gh.zen())
<commit_msg>Add hack exp... |
daf29f52c01d83619585a1f2fa2e6f03a397e1cc | tests/test_utils.py | tests/test_utils.py | # coding: utf-8
from __future__ import absolute_import
from __future__ import unicode_literals
import io
import os
import unittest
import tempfile
try:
from unittest import mock
except ImportError:
import mock
from fs.archive import _utils
class TestUtils(unittest.TestCase):
@unittest.skipUnless(os.na... | # coding: utf-8
from __future__ import absolute_import
from __future__ import unicode_literals
import io
import os
import unittest
import tempfile
try:
from unittest import mock
except ImportError:
import mock
from fs.archive import _utils
class TestUtils(unittest.TestCase):
@unittest.skipUnless(os.na... | Fix test_writable_stream failing in Python 3.3 and 3.4 | Fix test_writable_stream failing in Python 3.3 and 3.4
| Python | mit | althonos/fs.archive | # coding: utf-8
from __future__ import absolute_import
from __future__ import unicode_literals
import io
import os
import unittest
import tempfile
try:
from unittest import mock
except ImportError:
import mock
from fs.archive import _utils
class TestUtils(unittest.TestCase):
@unittest.skipUnless(os.na... | # coding: utf-8
from __future__ import absolute_import
from __future__ import unicode_literals
import io
import os
import unittest
import tempfile
try:
from unittest import mock
except ImportError:
import mock
from fs.archive import _utils
class TestUtils(unittest.TestCase):
@unittest.skipUnless(os.na... | <commit_before># coding: utf-8
from __future__ import absolute_import
from __future__ import unicode_literals
import io
import os
import unittest
import tempfile
try:
from unittest import mock
except ImportError:
import mock
from fs.archive import _utils
class TestUtils(unittest.TestCase):
@unittest.s... | # coding: utf-8
from __future__ import absolute_import
from __future__ import unicode_literals
import io
import os
import unittest
import tempfile
try:
from unittest import mock
except ImportError:
import mock
from fs.archive import _utils
class TestUtils(unittest.TestCase):
@unittest.skipUnless(os.na... | # coding: utf-8
from __future__ import absolute_import
from __future__ import unicode_literals
import io
import os
import unittest
import tempfile
try:
from unittest import mock
except ImportError:
import mock
from fs.archive import _utils
class TestUtils(unittest.TestCase):
@unittest.skipUnless(os.na... | <commit_before># coding: utf-8
from __future__ import absolute_import
from __future__ import unicode_literals
import io
import os
import unittest
import tempfile
try:
from unittest import mock
except ImportError:
import mock
from fs.archive import _utils
class TestUtils(unittest.TestCase):
@unittest.s... |
3a5dc4332e7f13119563e2190e6ef7d66b464054 | tests/test_utils.py | tests/test_utils.py | """
Tests for the NURBS-Python package
Released under The MIT License. See LICENSE file for details.
Copyright (c) 2018 Onur Rauf Bingol
Tests geomdl.utilities module. Requires "pytest" to run.
"""
from geomdl import utilities
def test_autogen_knotvector():
degree = 4
num_ctrlpts = 12
aut... | """
Tests for the NURBS-Python package
Released under The MIT License. See LICENSE file for details.
Copyright (c) 2018 Onur Rauf Bingol
Tests geomdl.utilities module. Requires "pytest" to run.
"""
from geomdl import utilities
def test_autogen_knot_vector():
degree = 4
num_ctrlpts = 12
au... | Add knot vector normalization test | Add knot vector normalization test
| Python | mit | orbingol/NURBS-Python,orbingol/NURBS-Python | """
Tests for the NURBS-Python package
Released under The MIT License. See LICENSE file for details.
Copyright (c) 2018 Onur Rauf Bingol
Tests geomdl.utilities module. Requires "pytest" to run.
"""
from geomdl import utilities
def test_autogen_knotvector():
degree = 4
num_ctrlpts = 12
aut... | """
Tests for the NURBS-Python package
Released under The MIT License. See LICENSE file for details.
Copyright (c) 2018 Onur Rauf Bingol
Tests geomdl.utilities module. Requires "pytest" to run.
"""
from geomdl import utilities
def test_autogen_knot_vector():
degree = 4
num_ctrlpts = 12
au... | <commit_before>"""
Tests for the NURBS-Python package
Released under The MIT License. See LICENSE file for details.
Copyright (c) 2018 Onur Rauf Bingol
Tests geomdl.utilities module. Requires "pytest" to run.
"""
from geomdl import utilities
def test_autogen_knotvector():
degree = 4
num_ctrlp... | """
Tests for the NURBS-Python package
Released under The MIT License. See LICENSE file for details.
Copyright (c) 2018 Onur Rauf Bingol
Tests geomdl.utilities module. Requires "pytest" to run.
"""
from geomdl import utilities
def test_autogen_knot_vector():
degree = 4
num_ctrlpts = 12
au... | """
Tests for the NURBS-Python package
Released under The MIT License. See LICENSE file for details.
Copyright (c) 2018 Onur Rauf Bingol
Tests geomdl.utilities module. Requires "pytest" to run.
"""
from geomdl import utilities
def test_autogen_knotvector():
degree = 4
num_ctrlpts = 12
aut... | <commit_before>"""
Tests for the NURBS-Python package
Released under The MIT License. See LICENSE file for details.
Copyright (c) 2018 Onur Rauf Bingol
Tests geomdl.utilities module. Requires "pytest" to run.
"""
from geomdl import utilities
def test_autogen_knotvector():
degree = 4
num_ctrlp... |
d18f595b771ce68730cc5fea099f57dda6690157 | piecewise/piecewise/bigquery.py | piecewise/piecewise/bigquery.py | import httplib2
from apiclient.discovery import build
from oauth2client.client import flow_from_clientsecrets
from oauth2client.file import Storage
from oauth2client import tools
import os
PROJECT_NUMBER = '422648324111'
PARENT_PATH = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
SECRETS_FILE = os.path.... | import httplib2
from apiclient.discovery import build
from oauth2client.client import flow_from_clientsecrets
from oauth2client.file import Storage
from oauth2client import tools
import os
PROJECT_NUMBER = '233384409938'
PARENT_PATH = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
SECRETS_FILE = os.path.... | Use M-Lab project number for BigQuery access. | Use M-Lab project number for BigQuery access.
| Python | apache-2.0 | opentechinstitute/piecewise,critzo/piecewise,critzo/piecewise,opentechinstitute/piecewise,opentechinstitute/piecewise,opentechinstitute/piecewise,critzo/piecewise,critzo/piecewise | import httplib2
from apiclient.discovery import build
from oauth2client.client import flow_from_clientsecrets
from oauth2client.file import Storage
from oauth2client import tools
import os
PROJECT_NUMBER = '422648324111'
PARENT_PATH = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
SECRETS_FILE = os.path.... | import httplib2
from apiclient.discovery import build
from oauth2client.client import flow_from_clientsecrets
from oauth2client.file import Storage
from oauth2client import tools
import os
PROJECT_NUMBER = '233384409938'
PARENT_PATH = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
SECRETS_FILE = os.path.... | <commit_before>import httplib2
from apiclient.discovery import build
from oauth2client.client import flow_from_clientsecrets
from oauth2client.file import Storage
from oauth2client import tools
import os
PROJECT_NUMBER = '422648324111'
PARENT_PATH = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
SECRETS_... | import httplib2
from apiclient.discovery import build
from oauth2client.client import flow_from_clientsecrets
from oauth2client.file import Storage
from oauth2client import tools
import os
PROJECT_NUMBER = '233384409938'
PARENT_PATH = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
SECRETS_FILE = os.path.... | import httplib2
from apiclient.discovery import build
from oauth2client.client import flow_from_clientsecrets
from oauth2client.file import Storage
from oauth2client import tools
import os
PROJECT_NUMBER = '422648324111'
PARENT_PATH = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
SECRETS_FILE = os.path.... | <commit_before>import httplib2
from apiclient.discovery import build
from oauth2client.client import flow_from_clientsecrets
from oauth2client.file import Storage
from oauth2client import tools
import os
PROJECT_NUMBER = '422648324111'
PARENT_PATH = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
SECRETS_... |
d0613f3e77b87ad8df92730e5aa50aebf651ccc6 | tests/test_plotting.py | tests/test_plotting.py | import unittest
import numpy as np
from numpy import pi
import matplotlib.pyplot as plt
from robot_arm import RobotArm
from plotting import path_figure
class TestPlotting(unittest.TestCase):
def setUp(self):
lengths = (3, 2, 2,)
destinations = (
(5, 4, 6, 4, 5),
(0, 2, 0.5,... | import unittest
import numpy as np
from plotting import path_figure
from fixtures import robot_arm1
class TestPlotting(unittest.TestCase):
def setUp(self):
self.robot_arm = robot_arm1
n = len(self.robot_arm.lengths)
s = len(self.robot_arm.destinations[0])
total_joints = n * s
... | Use fixture for robot_arm test | Use fixture for robot_arm test
| Python | mit | JakobGM/robotarm-optimization | import unittest
import numpy as np
from numpy import pi
import matplotlib.pyplot as plt
from robot_arm import RobotArm
from plotting import path_figure
class TestPlotting(unittest.TestCase):
def setUp(self):
lengths = (3, 2, 2,)
destinations = (
(5, 4, 6, 4, 5),
(0, 2, 0.5,... | import unittest
import numpy as np
from plotting import path_figure
from fixtures import robot_arm1
class TestPlotting(unittest.TestCase):
def setUp(self):
self.robot_arm = robot_arm1
n = len(self.robot_arm.lengths)
s = len(self.robot_arm.destinations[0])
total_joints = n * s
... | <commit_before>import unittest
import numpy as np
from numpy import pi
import matplotlib.pyplot as plt
from robot_arm import RobotArm
from plotting import path_figure
class TestPlotting(unittest.TestCase):
def setUp(self):
lengths = (3, 2, 2,)
destinations = (
(5, 4, 6, 4, 5),
... | import unittest
import numpy as np
from plotting import path_figure
from fixtures import robot_arm1
class TestPlotting(unittest.TestCase):
def setUp(self):
self.robot_arm = robot_arm1
n = len(self.robot_arm.lengths)
s = len(self.robot_arm.destinations[0])
total_joints = n * s
... | import unittest
import numpy as np
from numpy import pi
import matplotlib.pyplot as plt
from robot_arm import RobotArm
from plotting import path_figure
class TestPlotting(unittest.TestCase):
def setUp(self):
lengths = (3, 2, 2,)
destinations = (
(5, 4, 6, 4, 5),
(0, 2, 0.5,... | <commit_before>import unittest
import numpy as np
from numpy import pi
import matplotlib.pyplot as plt
from robot_arm import RobotArm
from plotting import path_figure
class TestPlotting(unittest.TestCase):
def setUp(self):
lengths = (3, 2, 2,)
destinations = (
(5, 4, 6, 4, 5),
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.