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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
e4e930587e6ad145dbdbf1f742b942d63bf645a2 | wandb/git_repo.py | wandb/git_repo.py | from git import Repo, exc
import os
class GitRepo(object):
def __init__(self, root=None, remote="origin", lazy=True):
self.remote_name = remote
self.root = root
self._repo = None
if not lazy:
self.repo
@property
def repo(self):
if self._repo is None:
... | from git import Repo, exc
import os
class GitRepo(object):
def __init__(self, root=None, remote="origin", lazy=True):
self.remote_name = remote
self.root = root
self._repo = None
if not lazy:
self.repo
@property
def repo(self):
if self._repo is None:
... | Handle no git user configured | Handle no git user configured
| Python | mit | wandb/client,wandb/client,wandb/client | from git import Repo, exc
import os
class GitRepo(object):
def __init__(self, root=None, remote="origin", lazy=True):
self.remote_name = remote
self.root = root
self._repo = None
if not lazy:
self.repo
@property
def repo(self):
if self._repo is None:
... | from git import Repo, exc
import os
class GitRepo(object):
def __init__(self, root=None, remote="origin", lazy=True):
self.remote_name = remote
self.root = root
self._repo = None
if not lazy:
self.repo
@property
def repo(self):
if self._repo is None:
... | <commit_before>from git import Repo, exc
import os
class GitRepo(object):
def __init__(self, root=None, remote="origin", lazy=True):
self.remote_name = remote
self.root = root
self._repo = None
if not lazy:
self.repo
@property
def repo(self):
if self._re... | from git import Repo, exc
import os
class GitRepo(object):
def __init__(self, root=None, remote="origin", lazy=True):
self.remote_name = remote
self.root = root
self._repo = None
if not lazy:
self.repo
@property
def repo(self):
if self._repo is None:
... | from git import Repo, exc
import os
class GitRepo(object):
def __init__(self, root=None, remote="origin", lazy=True):
self.remote_name = remote
self.root = root
self._repo = None
if not lazy:
self.repo
@property
def repo(self):
if self._repo is None:
... | <commit_before>from git import Repo, exc
import os
class GitRepo(object):
def __init__(self, root=None, remote="origin", lazy=True):
self.remote_name = remote
self.root = root
self._repo = None
if not lazy:
self.repo
@property
def repo(self):
if self._re... |
cc46e4d251c479563318c93f419fead373fa0c12 | bugsnag/tornado/__init__.py | bugsnag/tornado/__init__.py | from tornado.web import RequestHandler
import bugsnag
class BugsnagRequestHandler(RequestHandler):
def _handle_request_exception(self, e):
# Set the request info
bugsnag.configure_request(
user_id = self.request.remote_ip,
context = "%s %s" % (self.request.method, self.reque... | from tornado.web import RequestHandler
import bugsnag
class BugsnagRequestHandler(RequestHandler):
def _handle_request_exception(self, e):
# Set the request info
bugsnag.configure_request(
user_id = self.request.remote_ip,
context = "%s %s" % (self.request.method, self.reque... | Remove cookie support from tornado until it works in all situations | Remove cookie support from tornado until it works in all situations
| Python | mit | bugsnag/bugsnag-python,overplumbum/bugsnag-python,bugsnag/bugsnag-python,overplumbum/bugsnag-python | from tornado.web import RequestHandler
import bugsnag
class BugsnagRequestHandler(RequestHandler):
def _handle_request_exception(self, e):
# Set the request info
bugsnag.configure_request(
user_id = self.request.remote_ip,
context = "%s %s" % (self.request.method, self.reque... | from tornado.web import RequestHandler
import bugsnag
class BugsnagRequestHandler(RequestHandler):
def _handle_request_exception(self, e):
# Set the request info
bugsnag.configure_request(
user_id = self.request.remote_ip,
context = "%s %s" % (self.request.method, self.reque... | <commit_before>from tornado.web import RequestHandler
import bugsnag
class BugsnagRequestHandler(RequestHandler):
def _handle_request_exception(self, e):
# Set the request info
bugsnag.configure_request(
user_id = self.request.remote_ip,
context = "%s %s" % (self.request.met... | from tornado.web import RequestHandler
import bugsnag
class BugsnagRequestHandler(RequestHandler):
def _handle_request_exception(self, e):
# Set the request info
bugsnag.configure_request(
user_id = self.request.remote_ip,
context = "%s %s" % (self.request.method, self.reque... | from tornado.web import RequestHandler
import bugsnag
class BugsnagRequestHandler(RequestHandler):
def _handle_request_exception(self, e):
# Set the request info
bugsnag.configure_request(
user_id = self.request.remote_ip,
context = "%s %s" % (self.request.method, self.reque... | <commit_before>from tornado.web import RequestHandler
import bugsnag
class BugsnagRequestHandler(RequestHandler):
def _handle_request_exception(self, e):
# Set the request info
bugsnag.configure_request(
user_id = self.request.remote_ip,
context = "%s %s" % (self.request.met... |
187e55c8ad204c3a6196794aba1b59fd0fa62b00 | instance/config.py | instance/config.py | import os
class Config(object):
"""Parent configuration class"""
DEBUG = False
CSRF_ENABLED = True
# ALT: <variable> = os.getenv('<env_var_name>')
SECRET = 'HeathLEDGERwasTHEBESTidc'
# database with host configuration removed. Defaults to machine localhost
SQLALCHEMY_DATABASE_URI = "postgr... | import os
class Config(object):
"""Parent configuration class"""
DEBUG = False
CSRF_ENABLED = True
# ALT: <variable> = os.getenv('<env_var_name>')
__SECRET = 'HeathLEDGERwasTHEBESTidc'
# database with host configuration removed. Defaults to machine localhost
__DB_NAME = "postgresql://bruce... | Modify Config file Pick DB_NAME, TOKEN_DURATION and SECRET from the environment Use the hard coded details as backup in case not in the environment | Modify Config file
Pick DB_NAME, TOKEN_DURATION and SECRET from the environment
Use the hard coded details as backup in case not in the environment
| Python | mit | Elbertbiggs360/buckelist-api | import os
class Config(object):
"""Parent configuration class"""
DEBUG = False
CSRF_ENABLED = True
# ALT: <variable> = os.getenv('<env_var_name>')
SECRET = 'HeathLEDGERwasTHEBESTidc'
# database with host configuration removed. Defaults to machine localhost
SQLALCHEMY_DATABASE_URI = "postgr... | import os
class Config(object):
"""Parent configuration class"""
DEBUG = False
CSRF_ENABLED = True
# ALT: <variable> = os.getenv('<env_var_name>')
__SECRET = 'HeathLEDGERwasTHEBESTidc'
# database with host configuration removed. Defaults to machine localhost
__DB_NAME = "postgresql://bruce... | <commit_before>import os
class Config(object):
"""Parent configuration class"""
DEBUG = False
CSRF_ENABLED = True
# ALT: <variable> = os.getenv('<env_var_name>')
SECRET = 'HeathLEDGERwasTHEBESTidc'
# database with host configuration removed. Defaults to machine localhost
SQLALCHEMY_DATABAS... | import os
class Config(object):
"""Parent configuration class"""
DEBUG = False
CSRF_ENABLED = True
# ALT: <variable> = os.getenv('<env_var_name>')
__SECRET = 'HeathLEDGERwasTHEBESTidc'
# database with host configuration removed. Defaults to machine localhost
__DB_NAME = "postgresql://bruce... | import os
class Config(object):
"""Parent configuration class"""
DEBUG = False
CSRF_ENABLED = True
# ALT: <variable> = os.getenv('<env_var_name>')
SECRET = 'HeathLEDGERwasTHEBESTidc'
# database with host configuration removed. Defaults to machine localhost
SQLALCHEMY_DATABASE_URI = "postgr... | <commit_before>import os
class Config(object):
"""Parent configuration class"""
DEBUG = False
CSRF_ENABLED = True
# ALT: <variable> = os.getenv('<env_var_name>')
SECRET = 'HeathLEDGERwasTHEBESTidc'
# database with host configuration removed. Defaults to machine localhost
SQLALCHEMY_DATABAS... |
494884ae3510c0cf23704cb772ad4a024040a9c7 | bitHopper/Website/Worker_Page.py | bitHopper/Website/Worker_Page.py | from bitHopper.Website import app, flask
import btcnet_info
import bitHopper.Configuration.Workers
import logging
@app.route("/worker", methods=['POST', 'GET'])
def worker():
#Check if this is a form submission
handle_worker_post(flask.request.form)
#Get a list of currently configured workers
... | from bitHopper.Website import app, flask
import btcnet_info
import bitHopper.Configuration.Workers
import logging
@app.route("/worker", methods=['POST', 'GET'])
def worker():
#Check if this is a form submission
handle_worker_post(flask.request.form)
#Get a list of currently configured workers
... | Update the ignoring error message | Update the ignoring error message
| Python | mit | c00w/bitHopper,c00w/bitHopper | from bitHopper.Website import app, flask
import btcnet_info
import bitHopper.Configuration.Workers
import logging
@app.route("/worker", methods=['POST', 'GET'])
def worker():
#Check if this is a form submission
handle_worker_post(flask.request.form)
#Get a list of currently configured workers
... | from bitHopper.Website import app, flask
import btcnet_info
import bitHopper.Configuration.Workers
import logging
@app.route("/worker", methods=['POST', 'GET'])
def worker():
#Check if this is a form submission
handle_worker_post(flask.request.form)
#Get a list of currently configured workers
... | <commit_before>from bitHopper.Website import app, flask
import btcnet_info
import bitHopper.Configuration.Workers
import logging
@app.route("/worker", methods=['POST', 'GET'])
def worker():
#Check if this is a form submission
handle_worker_post(flask.request.form)
#Get a list of currently configu... | from bitHopper.Website import app, flask
import btcnet_info
import bitHopper.Configuration.Workers
import logging
@app.route("/worker", methods=['POST', 'GET'])
def worker():
#Check if this is a form submission
handle_worker_post(flask.request.form)
#Get a list of currently configured workers
... | from bitHopper.Website import app, flask
import btcnet_info
import bitHopper.Configuration.Workers
import logging
@app.route("/worker", methods=['POST', 'GET'])
def worker():
#Check if this is a form submission
handle_worker_post(flask.request.form)
#Get a list of currently configured workers
... | <commit_before>from bitHopper.Website import app, flask
import btcnet_info
import bitHopper.Configuration.Workers
import logging
@app.route("/worker", methods=['POST', 'GET'])
def worker():
#Check if this is a form submission
handle_worker_post(flask.request.form)
#Get a list of currently configu... |
194748bfbc67741275fd36eb2eaafbde55caeabb | django_emarsys/management/commands/emarsys_sync_events.py | django_emarsys/management/commands/emarsys_sync_events.py | # -*- coding: utf-8 -*-
from django.core.management import BaseCommand
from ...event import sync_events
class Command(BaseCommand):
def handle(self, *args, **options):
num_new_events, num_updated_ids, num_deleted_ids, \
unsynced_event_names = sync_events()
print("{} new events, {} ev... | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.core.management import BaseCommand
from ...event import sync_events
class Command(BaseCommand):
def handle(self, *args, **options):
num_new_events, num_updated_ids, num_deleted_ids, \
unsynced_event_names = sync_eve... | Fix issue with management command log output and non ascii event names | Fix issue with management command log output and non ascii event names
| Python | mit | machtfit/django-emarsys,machtfit/django-emarsys | # -*- coding: utf-8 -*-
from django.core.management import BaseCommand
from ...event import sync_events
class Command(BaseCommand):
def handle(self, *args, **options):
num_new_events, num_updated_ids, num_deleted_ids, \
unsynced_event_names = sync_events()
print("{} new events, {} ev... | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.core.management import BaseCommand
from ...event import sync_events
class Command(BaseCommand):
def handle(self, *args, **options):
num_new_events, num_updated_ids, num_deleted_ids, \
unsynced_event_names = sync_eve... | <commit_before># -*- coding: utf-8 -*-
from django.core.management import BaseCommand
from ...event import sync_events
class Command(BaseCommand):
def handle(self, *args, **options):
num_new_events, num_updated_ids, num_deleted_ids, \
unsynced_event_names = sync_events()
print("{} ne... | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.core.management import BaseCommand
from ...event import sync_events
class Command(BaseCommand):
def handle(self, *args, **options):
num_new_events, num_updated_ids, num_deleted_ids, \
unsynced_event_names = sync_eve... | # -*- coding: utf-8 -*-
from django.core.management import BaseCommand
from ...event import sync_events
class Command(BaseCommand):
def handle(self, *args, **options):
num_new_events, num_updated_ids, num_deleted_ids, \
unsynced_event_names = sync_events()
print("{} new events, {} ev... | <commit_before># -*- coding: utf-8 -*-
from django.core.management import BaseCommand
from ...event import sync_events
class Command(BaseCommand):
def handle(self, *args, **options):
num_new_events, num_updated_ids, num_deleted_ids, \
unsynced_event_names = sync_events()
print("{} ne... |
a2abc6342162c9158551b810f4d666d6d13dcd15 | client/python/plot_request_times.py | client/python/plot_request_times.py | import requests
r = requests.get('http://localhost:8081/monitor_results/1')
print(r.json())
for monitoring_data in r.json():
print 'URL: ' + monitoring_data['urlToMonitor']['url']
| import requests
from plotly.offline import plot
import plotly.graph_objs as go
r = requests.get('http://localhost:8081/monitor_results/1')
print(r.json())
# build traces for plotting from monitoring data
request_times = list()
timestamps = list()
timestamp = 0
url = r.json()[0]['urlToMonitor']['url']
for monitoring_d... | Add prototype for plotting client | Add prototype for plotting client
| Python | mit | gernd/simple-site-mon | import requests
r = requests.get('http://localhost:8081/monitor_results/1')
print(r.json())
for monitoring_data in r.json():
print 'URL: ' + monitoring_data['urlToMonitor']['url']
Add prototype for plotting client | import requests
from plotly.offline import plot
import plotly.graph_objs as go
r = requests.get('http://localhost:8081/monitor_results/1')
print(r.json())
# build traces for plotting from monitoring data
request_times = list()
timestamps = list()
timestamp = 0
url = r.json()[0]['urlToMonitor']['url']
for monitoring_d... | <commit_before>import requests
r = requests.get('http://localhost:8081/monitor_results/1')
print(r.json())
for monitoring_data in r.json():
print 'URL: ' + monitoring_data['urlToMonitor']['url']
<commit_msg>Add prototype for plotting client<commit_after> | import requests
from plotly.offline import plot
import plotly.graph_objs as go
r = requests.get('http://localhost:8081/monitor_results/1')
print(r.json())
# build traces for plotting from monitoring data
request_times = list()
timestamps = list()
timestamp = 0
url = r.json()[0]['urlToMonitor']['url']
for monitoring_d... | import requests
r = requests.get('http://localhost:8081/monitor_results/1')
print(r.json())
for monitoring_data in r.json():
print 'URL: ' + monitoring_data['urlToMonitor']['url']
Add prototype for plotting clientimport requests
from plotly.offline import plot
import plotly.graph_objs as go
r = requests.get('htt... | <commit_before>import requests
r = requests.get('http://localhost:8081/monitor_results/1')
print(r.json())
for monitoring_data in r.json():
print 'URL: ' + monitoring_data['urlToMonitor']['url']
<commit_msg>Add prototype for plotting client<commit_after>import requests
from plotly.offline import plot
import plotl... |
cc2f0900b02891e0ab23133778065a6f6768cd5c | setup.py | setup.py | from distutils.core import setup
setup(
name = 'furs_fiscal',
packages = ['furs_fiscal'],
version = '0.1.0',
description = 'Python library for simplified communication with FURS (Financna uprava Republike Slovenije).',
author = 'Boris Savic',
author_email = '[email protected]',
url = 'https://github.com/b... | from distutils.core import setup
setup(
name = 'furs_fiscal',
packages = ['furs_fiscal'],
version = '0.1.3',
description = 'Python library for simplified communication with FURS (Financna uprava Republike Slovenije).',
author = 'Boris Savic',
author_email = '[email protected]',
url = 'https://github.com/b... | Add test_certificate.pem to the release | Add test_certificate.pem to the release
| Python | mit | boris-savic/python-furs-fiscal | from distutils.core import setup
setup(
name = 'furs_fiscal',
packages = ['furs_fiscal'],
version = '0.1.0',
description = 'Python library for simplified communication with FURS (Financna uprava Republike Slovenije).',
author = 'Boris Savic',
author_email = '[email protected]',
url = 'https://github.com/b... | from distutils.core import setup
setup(
name = 'furs_fiscal',
packages = ['furs_fiscal'],
version = '0.1.3',
description = 'Python library for simplified communication with FURS (Financna uprava Republike Slovenije).',
author = 'Boris Savic',
author_email = '[email protected]',
url = 'https://github.com/b... | <commit_before>from distutils.core import setup
setup(
name = 'furs_fiscal',
packages = ['furs_fiscal'],
version = '0.1.0',
description = 'Python library for simplified communication with FURS (Financna uprava Republike Slovenije).',
author = 'Boris Savic',
author_email = '[email protected]',
url = 'https... | from distutils.core import setup
setup(
name = 'furs_fiscal',
packages = ['furs_fiscal'],
version = '0.1.3',
description = 'Python library for simplified communication with FURS (Financna uprava Republike Slovenije).',
author = 'Boris Savic',
author_email = '[email protected]',
url = 'https://github.com/b... | from distutils.core import setup
setup(
name = 'furs_fiscal',
packages = ['furs_fiscal'],
version = '0.1.0',
description = 'Python library for simplified communication with FURS (Financna uprava Republike Slovenije).',
author = 'Boris Savic',
author_email = '[email protected]',
url = 'https://github.com/b... | <commit_before>from distutils.core import setup
setup(
name = 'furs_fiscal',
packages = ['furs_fiscal'],
version = '0.1.0',
description = 'Python library for simplified communication with FURS (Financna uprava Republike Slovenije).',
author = 'Boris Savic',
author_email = '[email protected]',
url = 'https... |
5ea25bc6c72e5c934e56a90c44f8019ad176bb27 | comet/utility/test/test_spawn.py | comet/utility/test/test_spawn.py | import sys
from twisted.trial import unittest
from twisted.python import failure
from ..spawn import SpawnCommand
class DummyEvent(object):
text = ""
class SpawnCommandProtocolTestCase(unittest.TestCase):
def test_good_process(self):
spawn = SpawnCommand(sys.executable)
d = spawn(DummyEvent(... | import sys
from twisted.trial import unittest
from twisted.python import failure
from twisted.python import util
from ..spawn import SpawnCommand
class DummyEvent(object):
def __init__(self, text=None):
self.text = text
class SpawnCommandProtocolTestCase(unittest.TestCase):
def test_good_process(sel... | Test that spawned process actually writes data | Test that spawned process actually writes data
| Python | bsd-2-clause | jdswinbank/Comet,jdswinbank/Comet | import sys
from twisted.trial import unittest
from twisted.python import failure
from ..spawn import SpawnCommand
class DummyEvent(object):
text = ""
class SpawnCommandProtocolTestCase(unittest.TestCase):
def test_good_process(self):
spawn = SpawnCommand(sys.executable)
d = spawn(DummyEvent(... | import sys
from twisted.trial import unittest
from twisted.python import failure
from twisted.python import util
from ..spawn import SpawnCommand
class DummyEvent(object):
def __init__(self, text=None):
self.text = text
class SpawnCommandProtocolTestCase(unittest.TestCase):
def test_good_process(sel... | <commit_before>import sys
from twisted.trial import unittest
from twisted.python import failure
from ..spawn import SpawnCommand
class DummyEvent(object):
text = ""
class SpawnCommandProtocolTestCase(unittest.TestCase):
def test_good_process(self):
spawn = SpawnCommand(sys.executable)
d = sp... | import sys
from twisted.trial import unittest
from twisted.python import failure
from twisted.python import util
from ..spawn import SpawnCommand
class DummyEvent(object):
def __init__(self, text=None):
self.text = text
class SpawnCommandProtocolTestCase(unittest.TestCase):
def test_good_process(sel... | import sys
from twisted.trial import unittest
from twisted.python import failure
from ..spawn import SpawnCommand
class DummyEvent(object):
text = ""
class SpawnCommandProtocolTestCase(unittest.TestCase):
def test_good_process(self):
spawn = SpawnCommand(sys.executable)
d = spawn(DummyEvent(... | <commit_before>import sys
from twisted.trial import unittest
from twisted.python import failure
from ..spawn import SpawnCommand
class DummyEvent(object):
text = ""
class SpawnCommandProtocolTestCase(unittest.TestCase):
def test_good_process(self):
spawn = SpawnCommand(sys.executable)
d = sp... |
078f00ae743c2e16df76653090298ba56b277caf | pegasus/metrics/__init__.py | pegasus/metrics/__init__.py | import sys
import logging
def init_logging():
logFormat = "%(asctime)s %(levelname)s %(filename)s:%(lineno)s %(message)s"
logFormatter = logging.Formatter(fmt=logFormat)
logHandler = logging.StreamHandler(stream=sys.stderr)
logHandler.setFormatter(logFormatter)
log = logging.getLogger(__name__)
... | import sys
import logging
def init_logging():
logFormat = "%(asctime)s %(levelname)s %(filename)s:%(lineno)s %(message)s"
logFormatter = logging.Formatter(fmt=logFormat)
logHandler = logging.StreamHandler()
logHandler.setFormatter(logFormatter)
log = logging.getLogger(__name__)
log.addHandler(l... | Use default argument for StreamHandler (which is what want, sys.stderr) because they changed the name of the keyword argument in 2.7 | Use default argument for StreamHandler (which is what want, sys.stderr) because they changed the name of the keyword argument in 2.7
| Python | apache-2.0 | pegasus-isi/pegasus-metrics,pegasus-isi/pegasus-metrics,pegasus-isi/pegasus-metrics | import sys
import logging
def init_logging():
logFormat = "%(asctime)s %(levelname)s %(filename)s:%(lineno)s %(message)s"
logFormatter = logging.Formatter(fmt=logFormat)
logHandler = logging.StreamHandler(stream=sys.stderr)
logHandler.setFormatter(logFormatter)
log = logging.getLogger(__name__)
... | import sys
import logging
def init_logging():
logFormat = "%(asctime)s %(levelname)s %(filename)s:%(lineno)s %(message)s"
logFormatter = logging.Formatter(fmt=logFormat)
logHandler = logging.StreamHandler()
logHandler.setFormatter(logFormatter)
log = logging.getLogger(__name__)
log.addHandler(l... | <commit_before>import sys
import logging
def init_logging():
logFormat = "%(asctime)s %(levelname)s %(filename)s:%(lineno)s %(message)s"
logFormatter = logging.Formatter(fmt=logFormat)
logHandler = logging.StreamHandler(stream=sys.stderr)
logHandler.setFormatter(logFormatter)
log = logging.getLogge... | import sys
import logging
def init_logging():
logFormat = "%(asctime)s %(levelname)s %(filename)s:%(lineno)s %(message)s"
logFormatter = logging.Formatter(fmt=logFormat)
logHandler = logging.StreamHandler()
logHandler.setFormatter(logFormatter)
log = logging.getLogger(__name__)
log.addHandler(l... | import sys
import logging
def init_logging():
logFormat = "%(asctime)s %(levelname)s %(filename)s:%(lineno)s %(message)s"
logFormatter = logging.Formatter(fmt=logFormat)
logHandler = logging.StreamHandler(stream=sys.stderr)
logHandler.setFormatter(logFormatter)
log = logging.getLogger(__name__)
... | <commit_before>import sys
import logging
def init_logging():
logFormat = "%(asctime)s %(levelname)s %(filename)s:%(lineno)s %(message)s"
logFormatter = logging.Formatter(fmt=logFormat)
logHandler = logging.StreamHandler(stream=sys.stderr)
logHandler.setFormatter(logFormatter)
log = logging.getLogge... |
2d52b37e8ed868099f5e808402b6c966987589e5 | nn-patterns/utils/tests/networks/__init__.py | nn-patterns/utils/tests/networks/__init__.py | # Begin: Python 2/3 compatibility header small
# Get Python 3 functionality:
from __future__ import\
absolute_import, print_function, division, unicode_literals
from future.utils import raise_with_traceback, raise_from
# catch exception with: except Exception as e
from builtins import range, map, zip, filter
from i... | # Begin: Python 2/3 compatibility header small
# Get Python 3 functionality:
from __future__ import\
absolute_import, print_function, division, unicode_literals
from future.utils import raise_with_traceback, raise_from
# catch exception with: except Exception as e
from builtins import range, map, zip, filter
from i... | Add filter to customize which networks to test. | Add filter to customize which networks to test.
| Python | mit | pikinder/nn-patterns | # Begin: Python 2/3 compatibility header small
# Get Python 3 functionality:
from __future__ import\
absolute_import, print_function, division, unicode_literals
from future.utils import raise_with_traceback, raise_from
# catch exception with: except Exception as e
from builtins import range, map, zip, filter
from i... | # Begin: Python 2/3 compatibility header small
# Get Python 3 functionality:
from __future__ import\
absolute_import, print_function, division, unicode_literals
from future.utils import raise_with_traceback, raise_from
# catch exception with: except Exception as e
from builtins import range, map, zip, filter
from i... | <commit_before># Begin: Python 2/3 compatibility header small
# Get Python 3 functionality:
from __future__ import\
absolute_import, print_function, division, unicode_literals
from future.utils import raise_with_traceback, raise_from
# catch exception with: except Exception as e
from builtins import range, map, zip... | # Begin: Python 2/3 compatibility header small
# Get Python 3 functionality:
from __future__ import\
absolute_import, print_function, division, unicode_literals
from future.utils import raise_with_traceback, raise_from
# catch exception with: except Exception as e
from builtins import range, map, zip, filter
from i... | # Begin: Python 2/3 compatibility header small
# Get Python 3 functionality:
from __future__ import\
absolute_import, print_function, division, unicode_literals
from future.utils import raise_with_traceback, raise_from
# catch exception with: except Exception as e
from builtins import range, map, zip, filter
from i... | <commit_before># Begin: Python 2/3 compatibility header small
# Get Python 3 functionality:
from __future__ import\
absolute_import, print_function, division, unicode_literals
from future.utils import raise_with_traceback, raise_from
# catch exception with: except Exception as e
from builtins import range, map, zip... |
2cc9f1781691865222acb90fb8bbd5e721cc2549 | csunplugged/utils/errors/InvalidYAMLFileError.py | csunplugged/utils/errors/InvalidYAMLFileError.py | """Custom error for invalid yaml file."""
from .Error import Error
ERROR_MESSAGE = """
Invalid YAML file (.yaml)
Options:
- Does the file match the expected layout?
- Does the file contain at least one key:value pair?
- Is the syntax correct? (are you missing a colon somewhere?)
"""
class InvalidYAMLFileErro... | """Custom error for invalid yaml file."""
from .Error import Error
ERROR_MESSAGE = """
Invalid YAML file (.yaml).
Options:
- Does the file match the expected layout?
- Does the file contain at least one key:value pair?
- Is the syntax correct? (are you missing a colon somewhere?)
"""
class InvalidYAMLFileErr... | Fix typo in error message | Fix typo in error message
| Python | mit | uccser/cs-unplugged,uccser/cs-unplugged,uccser/cs-unplugged,uccser/cs-unplugged | """Custom error for invalid yaml file."""
from .Error import Error
ERROR_MESSAGE = """
Invalid YAML file (.yaml)
Options:
- Does the file match the expected layout?
- Does the file contain at least one key:value pair?
- Is the syntax correct? (are you missing a colon somewhere?)
"""
class InvalidYAMLFileErro... | """Custom error for invalid yaml file."""
from .Error import Error
ERROR_MESSAGE = """
Invalid YAML file (.yaml).
Options:
- Does the file match the expected layout?
- Does the file contain at least one key:value pair?
- Is the syntax correct? (are you missing a colon somewhere?)
"""
class InvalidYAMLFileErr... | <commit_before>"""Custom error for invalid yaml file."""
from .Error import Error
ERROR_MESSAGE = """
Invalid YAML file (.yaml)
Options:
- Does the file match the expected layout?
- Does the file contain at least one key:value pair?
- Is the syntax correct? (are you missing a colon somewhere?)
"""
class Inva... | """Custom error for invalid yaml file."""
from .Error import Error
ERROR_MESSAGE = """
Invalid YAML file (.yaml).
Options:
- Does the file match the expected layout?
- Does the file contain at least one key:value pair?
- Is the syntax correct? (are you missing a colon somewhere?)
"""
class InvalidYAMLFileErr... | """Custom error for invalid yaml file."""
from .Error import Error
ERROR_MESSAGE = """
Invalid YAML file (.yaml)
Options:
- Does the file match the expected layout?
- Does the file contain at least one key:value pair?
- Is the syntax correct? (are you missing a colon somewhere?)
"""
class InvalidYAMLFileErro... | <commit_before>"""Custom error for invalid yaml file."""
from .Error import Error
ERROR_MESSAGE = """
Invalid YAML file (.yaml)
Options:
- Does the file match the expected layout?
- Does the file contain at least one key:value pair?
- Is the syntax correct? (are you missing a colon somewhere?)
"""
class Inva... |
cb39de495da5256e6e44773036f78d704f0d563d | tapioca_instagram/tapioca_instagram.py | tapioca_instagram/tapioca_instagram.py | # coding: utf-8
from tapioca import (JSONAdapterMixin, TapiocaAdapter,
generate_wrapper_from_adapter)
from .resource_mapping import RESOURCE_MAPPING
class InstagramClientAdapter(JSONAdapterMixin, TapiocaAdapter):
api_root = 'https://api.instagram.com/v1/'
resource_mapping = RESOURCE_MAP... | # coding: utf-8
from tapioca import (JSONAdapterMixin, TapiocaAdapter,
generate_wrapper_from_adapter)
from .resource_mapping import RESOURCE_MAPPING
class InstagramClientAdapter(JSONAdapterMixin, TapiocaAdapter):
api_root = 'https://api.instagram.com/v1/'
resource_mapping = RESOURCE_MAP... | Fix KeyError exception when called with no parameters | Fix KeyError exception when called with no parameters
| Python | mit | vintasoftware/tapioca-instagram | # coding: utf-8
from tapioca import (JSONAdapterMixin, TapiocaAdapter,
generate_wrapper_from_adapter)
from .resource_mapping import RESOURCE_MAPPING
class InstagramClientAdapter(JSONAdapterMixin, TapiocaAdapter):
api_root = 'https://api.instagram.com/v1/'
resource_mapping = RESOURCE_MAP... | # coding: utf-8
from tapioca import (JSONAdapterMixin, TapiocaAdapter,
generate_wrapper_from_adapter)
from .resource_mapping import RESOURCE_MAPPING
class InstagramClientAdapter(JSONAdapterMixin, TapiocaAdapter):
api_root = 'https://api.instagram.com/v1/'
resource_mapping = RESOURCE_MAP... | <commit_before># coding: utf-8
from tapioca import (JSONAdapterMixin, TapiocaAdapter,
generate_wrapper_from_adapter)
from .resource_mapping import RESOURCE_MAPPING
class InstagramClientAdapter(JSONAdapterMixin, TapiocaAdapter):
api_root = 'https://api.instagram.com/v1/'
resource_mapping... | # coding: utf-8
from tapioca import (JSONAdapterMixin, TapiocaAdapter,
generate_wrapper_from_adapter)
from .resource_mapping import RESOURCE_MAPPING
class InstagramClientAdapter(JSONAdapterMixin, TapiocaAdapter):
api_root = 'https://api.instagram.com/v1/'
resource_mapping = RESOURCE_MAP... | # coding: utf-8
from tapioca import (JSONAdapterMixin, TapiocaAdapter,
generate_wrapper_from_adapter)
from .resource_mapping import RESOURCE_MAPPING
class InstagramClientAdapter(JSONAdapterMixin, TapiocaAdapter):
api_root = 'https://api.instagram.com/v1/'
resource_mapping = RESOURCE_MAP... | <commit_before># coding: utf-8
from tapioca import (JSONAdapterMixin, TapiocaAdapter,
generate_wrapper_from_adapter)
from .resource_mapping import RESOURCE_MAPPING
class InstagramClientAdapter(JSONAdapterMixin, TapiocaAdapter):
api_root = 'https://api.instagram.com/v1/'
resource_mapping... |
93ed6f7db7060893214571bf5ec8a633fffa48ab | python/completers/cpp/clang_helpers.py | python/completers/cpp/clang_helpers.py | #!/usr/bin/env python
#
# Copyright (C) 2011, 2012 Strahinja Val Markovic <[email protected]>
#
# This file is part of YouCompleteMe.
#
# YouCompleteMe 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 ve... | #!/usr/bin/env python
#
# Copyright (C) 2011, 2012 Strahinja Val Markovic <[email protected]>
#
# This file is part of YouCompleteMe.
#
# YouCompleteMe 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 ve... | Fix bug with removing flag after "-c" | Fix bug with removing flag after "-c"
-c does not take an argument. Why did I think it did?
| Python | mit | nikmartin/dotfiles | #!/usr/bin/env python
#
# Copyright (C) 2011, 2012 Strahinja Val Markovic <[email protected]>
#
# This file is part of YouCompleteMe.
#
# YouCompleteMe 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 ve... | #!/usr/bin/env python
#
# Copyright (C) 2011, 2012 Strahinja Val Markovic <[email protected]>
#
# This file is part of YouCompleteMe.
#
# YouCompleteMe 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 ve... | <commit_before>#!/usr/bin/env python
#
# Copyright (C) 2011, 2012 Strahinja Val Markovic <[email protected]>
#
# This file is part of YouCompleteMe.
#
# YouCompleteMe 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 Founda... | #!/usr/bin/env python
#
# Copyright (C) 2011, 2012 Strahinja Val Markovic <[email protected]>
#
# This file is part of YouCompleteMe.
#
# YouCompleteMe 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 ve... | #!/usr/bin/env python
#
# Copyright (C) 2011, 2012 Strahinja Val Markovic <[email protected]>
#
# This file is part of YouCompleteMe.
#
# YouCompleteMe 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 ve... | <commit_before>#!/usr/bin/env python
#
# Copyright (C) 2011, 2012 Strahinja Val Markovic <[email protected]>
#
# This file is part of YouCompleteMe.
#
# YouCompleteMe 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 Founda... |
c7fb70585b0c488d523a4ff173e3b0675029e90b | cmsplugin_filer_link/cms_plugins.py | cmsplugin_filer_link/cms_plugins.py | from __future__ import unicode_literals
from cms.plugin_base import CMSPluginBase
from cms.plugin_pool import plugin_pool
from django.utils.translation import ugettext as _
from django.conf import settings
from .models import FilerLinkPlugin
class FilerLinkPlugin(CMSPluginBase):
module = 'Filer'
model = File... | from __future__ import unicode_literals
from cms.plugin_base import CMSPluginBase
from cms.plugin_pool import plugin_pool
from django.utils.translation import ugettext as _
from django.conf import settings
from .models import FilerLinkPlugin
class FilerLinkPlugin(CMSPluginBase):
module = 'Filer'
model = File... | Revert "Add "page_link" to "raw_id_fields" to prevent the run of "decompress"" | Revert "Add "page_link" to "raw_id_fields" to prevent the run of "decompress""
This reverts commit 4a85ecaaae1452e74acc485d032f00e8bedace47.
| Python | bsd-3-clause | yvess/cmsplugin-filer,divio/cmsplugin-filer,alsoicode/cmsplugin-filer,creimers/cmsplugin-filer,jschneier/cmsplugin-filer,stefanfoulis/cmsplugin-filer,brightinteractive/cmsplugin-filer,nephila/cmsplugin-filer,creimers/cmsplugin-filer,jschneier/cmsplugin-filer,brightinteractive/cmsplugin-filer,skirsdeda/cmsplugin-filer,d... | from __future__ import unicode_literals
from cms.plugin_base import CMSPluginBase
from cms.plugin_pool import plugin_pool
from django.utils.translation import ugettext as _
from django.conf import settings
from .models import FilerLinkPlugin
class FilerLinkPlugin(CMSPluginBase):
module = 'Filer'
model = File... | from __future__ import unicode_literals
from cms.plugin_base import CMSPluginBase
from cms.plugin_pool import plugin_pool
from django.utils.translation import ugettext as _
from django.conf import settings
from .models import FilerLinkPlugin
class FilerLinkPlugin(CMSPluginBase):
module = 'Filer'
model = File... | <commit_before>from __future__ import unicode_literals
from cms.plugin_base import CMSPluginBase
from cms.plugin_pool import plugin_pool
from django.utils.translation import ugettext as _
from django.conf import settings
from .models import FilerLinkPlugin
class FilerLinkPlugin(CMSPluginBase):
module = 'Filer'
... | from __future__ import unicode_literals
from cms.plugin_base import CMSPluginBase
from cms.plugin_pool import plugin_pool
from django.utils.translation import ugettext as _
from django.conf import settings
from .models import FilerLinkPlugin
class FilerLinkPlugin(CMSPluginBase):
module = 'Filer'
model = File... | from __future__ import unicode_literals
from cms.plugin_base import CMSPluginBase
from cms.plugin_pool import plugin_pool
from django.utils.translation import ugettext as _
from django.conf import settings
from .models import FilerLinkPlugin
class FilerLinkPlugin(CMSPluginBase):
module = 'Filer'
model = File... | <commit_before>from __future__ import unicode_literals
from cms.plugin_base import CMSPluginBase
from cms.plugin_pool import plugin_pool
from django.utils.translation import ugettext as _
from django.conf import settings
from .models import FilerLinkPlugin
class FilerLinkPlugin(CMSPluginBase):
module = 'Filer'
... |
dafa014fa5c4788affd2712b68ef5bee56b5e600 | engine/game.py | engine/game.py | from .gobject import GObject
from . import signals
class Game(GObject):
def __init__(self):
self.maps = {}
self.player = None
def run(self):
pass
def handle_signals(self):
signals.handle_signals(self)
@staticmethod
def reg_signal(*args):
signals.reg_signal... | from .gobject import GObject
from . import signals
import time
class Game(GObject):
def __init__(self):
self.maps = {}
self.player = None
def run(self):
while True:
self.handle_signals()
time.sleep(0.3)
def handle_signals(self):
signals.handle_signa... | Handle signals with default interface | Handle signals with default interface
| Python | bsd-3-clause | entwanne/NAGM | from .gobject import GObject
from . import signals
class Game(GObject):
def __init__(self):
self.maps = {}
self.player = None
def run(self):
pass
def handle_signals(self):
signals.handle_signals(self)
@staticmethod
def reg_signal(*args):
signals.reg_signal... | from .gobject import GObject
from . import signals
import time
class Game(GObject):
def __init__(self):
self.maps = {}
self.player = None
def run(self):
while True:
self.handle_signals()
time.sleep(0.3)
def handle_signals(self):
signals.handle_signa... | <commit_before>from .gobject import GObject
from . import signals
class Game(GObject):
def __init__(self):
self.maps = {}
self.player = None
def run(self):
pass
def handle_signals(self):
signals.handle_signals(self)
@staticmethod
def reg_signal(*args):
sig... | from .gobject import GObject
from . import signals
import time
class Game(GObject):
def __init__(self):
self.maps = {}
self.player = None
def run(self):
while True:
self.handle_signals()
time.sleep(0.3)
def handle_signals(self):
signals.handle_signa... | from .gobject import GObject
from . import signals
class Game(GObject):
def __init__(self):
self.maps = {}
self.player = None
def run(self):
pass
def handle_signals(self):
signals.handle_signals(self)
@staticmethod
def reg_signal(*args):
signals.reg_signal... | <commit_before>from .gobject import GObject
from . import signals
class Game(GObject):
def __init__(self):
self.maps = {}
self.player = None
def run(self):
pass
def handle_signals(self):
signals.handle_signals(self)
@staticmethod
def reg_signal(*args):
sig... |
9858837add5105f2f4e78abe84930c4e164071b9 | examples/me.py | examples/me.py | from buffer.api import API
from buffer.user import User
token = '1/714ebdb617705ef9491a81fb21c1da42'
api = API(client_id='51cc6dd5f882a8ba18000055', client_secret='83b019d154cae4d2c734d813b33e5e53')
r = api.get('user.json?')
print r.content
#user = User(api=api)
| from buffer.api import API
from buffer.user import User
token = '1/714ebdb617705ef9491a81fb21c1da42'
api = API(client_id='51cc6dd5f882a8ba18000055', client_secret='83b019d154cae4d2c734d813b33e5e53', access_token=token)
user = User(api=api)
print user.id
| Create first examples that used the actual API | Create first examples that used the actual API
| Python | mit | vtemian/buffpy,bufferapp/buffer-python | from buffer.api import API
from buffer.user import User
token = '1/714ebdb617705ef9491a81fb21c1da42'
api = API(client_id='51cc6dd5f882a8ba18000055', client_secret='83b019d154cae4d2c734d813b33e5e53')
r = api.get('user.json?')
print r.content
#user = User(api=api)
Create first examples that used the actual API | from buffer.api import API
from buffer.user import User
token = '1/714ebdb617705ef9491a81fb21c1da42'
api = API(client_id='51cc6dd5f882a8ba18000055', client_secret='83b019d154cae4d2c734d813b33e5e53', access_token=token)
user = User(api=api)
print user.id
| <commit_before>from buffer.api import API
from buffer.user import User
token = '1/714ebdb617705ef9491a81fb21c1da42'
api = API(client_id='51cc6dd5f882a8ba18000055', client_secret='83b019d154cae4d2c734d813b33e5e53')
r = api.get('user.json?')
print r.content
#user = User(api=api)
<commit_msg>Create first examples that ... | from buffer.api import API
from buffer.user import User
token = '1/714ebdb617705ef9491a81fb21c1da42'
api = API(client_id='51cc6dd5f882a8ba18000055', client_secret='83b019d154cae4d2c734d813b33e5e53', access_token=token)
user = User(api=api)
print user.id
| from buffer.api import API
from buffer.user import User
token = '1/714ebdb617705ef9491a81fb21c1da42'
api = API(client_id='51cc6dd5f882a8ba18000055', client_secret='83b019d154cae4d2c734d813b33e5e53')
r = api.get('user.json?')
print r.content
#user = User(api=api)
Create first examples that used the actual APIfrom buf... | <commit_before>from buffer.api import API
from buffer.user import User
token = '1/714ebdb617705ef9491a81fb21c1da42'
api = API(client_id='51cc6dd5f882a8ba18000055', client_secret='83b019d154cae4d2c734d813b33e5e53')
r = api.get('user.json?')
print r.content
#user = User(api=api)
<commit_msg>Create first examples that ... |
30e10449205763363fe8663765645796b0dc8fd5 | IPython/nbconvert/preprocessors/clearoutput.py | IPython/nbconvert/preprocessors/clearoutput.py | """Module containing a preprocessor that removes the outputs from code cells"""
# Copyright (c) IPython Development Team.
# Distributed under the terms of the Modified BSD License.
#-----------------------------------------------------------------------------
# Imports
#-----------------------------------------------... | """Module containing a preprocessor that removes the outputs from code cells"""
# Copyright (c) IPython Development Team.
# Distributed under the terms of the Modified BSD License.
#-----------------------------------------------------------------------------
# Imports
#-----------------------------------------------... | Use cell.prompt_number rather than cell['prompt_number'] | Use cell.prompt_number rather than cell['prompt_number']
| Python | bsd-3-clause | ipython/ipython,ipython/ipython | """Module containing a preprocessor that removes the outputs from code cells"""
# Copyright (c) IPython Development Team.
# Distributed under the terms of the Modified BSD License.
#-----------------------------------------------------------------------------
# Imports
#-----------------------------------------------... | """Module containing a preprocessor that removes the outputs from code cells"""
# Copyright (c) IPython Development Team.
# Distributed under the terms of the Modified BSD License.
#-----------------------------------------------------------------------------
# Imports
#-----------------------------------------------... | <commit_before>"""Module containing a preprocessor that removes the outputs from code cells"""
# Copyright (c) IPython Development Team.
# Distributed under the terms of the Modified BSD License.
#-----------------------------------------------------------------------------
# Imports
#--------------------------------... | """Module containing a preprocessor that removes the outputs from code cells"""
# Copyright (c) IPython Development Team.
# Distributed under the terms of the Modified BSD License.
#-----------------------------------------------------------------------------
# Imports
#-----------------------------------------------... | """Module containing a preprocessor that removes the outputs from code cells"""
# Copyright (c) IPython Development Team.
# Distributed under the terms of the Modified BSD License.
#-----------------------------------------------------------------------------
# Imports
#-----------------------------------------------... | <commit_before>"""Module containing a preprocessor that removes the outputs from code cells"""
# Copyright (c) IPython Development Team.
# Distributed under the terms of the Modified BSD License.
#-----------------------------------------------------------------------------
# Imports
#--------------------------------... |
dac3c4f163c694b9b083247e72189996e5e2125c | just/json_.py | just/json_.py | import json
def read(fn):
if fn.endswith(".jsonl"):
raise TypeError("JSON Newline format can only be read by iread")
with open(fn) as f:
return json.load(f)
def append(obj, fn):
with open(fn, "a+") as f:
f.write(json.dumps(obj) + "\n")
def write(obj, fn):
with open(fn, "w")... | import json
def read(fn):
if fn.endswith(".jsonl"):
raise TypeError("JSON Newline format can only be read by iread")
with open(fn) as f:
return json.load(f)
def append(obj, fn):
with open(fn, "a+") as f:
f.write(json.dumps(obj) + "\n")
def write(obj, fn):
with open(fn, "w")... | Add detailed error message to jsonl parsing | Add detailed error message to jsonl parsing | Python | agpl-3.0 | kootenpv/just | import json
def read(fn):
if fn.endswith(".jsonl"):
raise TypeError("JSON Newline format can only be read by iread")
with open(fn) as f:
return json.load(f)
def append(obj, fn):
with open(fn, "a+") as f:
f.write(json.dumps(obj) + "\n")
def write(obj, fn):
with open(fn, "w")... | import json
def read(fn):
if fn.endswith(".jsonl"):
raise TypeError("JSON Newline format can only be read by iread")
with open(fn) as f:
return json.load(f)
def append(obj, fn):
with open(fn, "a+") as f:
f.write(json.dumps(obj) + "\n")
def write(obj, fn):
with open(fn, "w")... | <commit_before>import json
def read(fn):
if fn.endswith(".jsonl"):
raise TypeError("JSON Newline format can only be read by iread")
with open(fn) as f:
return json.load(f)
def append(obj, fn):
with open(fn, "a+") as f:
f.write(json.dumps(obj) + "\n")
def write(obj, fn):
wit... | import json
def read(fn):
if fn.endswith(".jsonl"):
raise TypeError("JSON Newline format can only be read by iread")
with open(fn) as f:
return json.load(f)
def append(obj, fn):
with open(fn, "a+") as f:
f.write(json.dumps(obj) + "\n")
def write(obj, fn):
with open(fn, "w")... | import json
def read(fn):
if fn.endswith(".jsonl"):
raise TypeError("JSON Newline format can only be read by iread")
with open(fn) as f:
return json.load(f)
def append(obj, fn):
with open(fn, "a+") as f:
f.write(json.dumps(obj) + "\n")
def write(obj, fn):
with open(fn, "w")... | <commit_before>import json
def read(fn):
if fn.endswith(".jsonl"):
raise TypeError("JSON Newline format can only be read by iread")
with open(fn) as f:
return json.load(f)
def append(obj, fn):
with open(fn, "a+") as f:
f.write(json.dumps(obj) + "\n")
def write(obj, fn):
wit... |
60cbe21d95cc6e079979022a505dcc2099bd30c1 | cla_public/libs/call_centre_availability.py | cla_public/libs/call_centre_availability.py | import datetime
from flask.ext.babel import lazy_gettext as _
def time_choice(time):
display_format = "%I:%M %p"
end = time + datetime.timedelta(minutes=30)
display_string = time.strftime(display_format).lstrip("0") + " - " + end.strftime(display_format).lstrip("0")
return time.strftime("%H%M"), displ... | import datetime
from cla_public.libs.utils import get_locale
from flask.ext.babel import lazy_gettext as _
def time_choice(time):
display_format = "%I:%M %p"
end = time + datetime.timedelta(minutes=30)
display_string = time.strftime(display_format).lstrip("0") + " - " + end.strftime(display_format).lstrip... | Add welsh days ordinal suffix | Add welsh days ordinal suffix
| Python | mit | ministryofjustice/cla_public,ministryofjustice/cla_public,ministryofjustice/cla_public,ministryofjustice/cla_public | import datetime
from flask.ext.babel import lazy_gettext as _
def time_choice(time):
display_format = "%I:%M %p"
end = time + datetime.timedelta(minutes=30)
display_string = time.strftime(display_format).lstrip("0") + " - " + end.strftime(display_format).lstrip("0")
return time.strftime("%H%M"), displ... | import datetime
from cla_public.libs.utils import get_locale
from flask.ext.babel import lazy_gettext as _
def time_choice(time):
display_format = "%I:%M %p"
end = time + datetime.timedelta(minutes=30)
display_string = time.strftime(display_format).lstrip("0") + " - " + end.strftime(display_format).lstrip... | <commit_before>import datetime
from flask.ext.babel import lazy_gettext as _
def time_choice(time):
display_format = "%I:%M %p"
end = time + datetime.timedelta(minutes=30)
display_string = time.strftime(display_format).lstrip("0") + " - " + end.strftime(display_format).lstrip("0")
return time.strftime... | import datetime
from cla_public.libs.utils import get_locale
from flask.ext.babel import lazy_gettext as _
def time_choice(time):
display_format = "%I:%M %p"
end = time + datetime.timedelta(minutes=30)
display_string = time.strftime(display_format).lstrip("0") + " - " + end.strftime(display_format).lstrip... | import datetime
from flask.ext.babel import lazy_gettext as _
def time_choice(time):
display_format = "%I:%M %p"
end = time + datetime.timedelta(minutes=30)
display_string = time.strftime(display_format).lstrip("0") + " - " + end.strftime(display_format).lstrip("0")
return time.strftime("%H%M"), displ... | <commit_before>import datetime
from flask.ext.babel import lazy_gettext as _
def time_choice(time):
display_format = "%I:%M %p"
end = time + datetime.timedelta(minutes=30)
display_string = time.strftime(display_format).lstrip("0") + " - " + end.strftime(display_format).lstrip("0")
return time.strftime... |
c33bbe44708ccf60f4a0cf759b3f38b739b7fb5d | PartyUPLambda/purge.py | PartyUPLambda/purge.py | """
Scan through the Samples table for oldish entries and remove them.
"""
import json
import boto3
import time
import decimal
from boto3.dynamodb.conditions import Key, Attr
def purge_item(item, batch):
response = batch.delete_item(
Key={
'event' : item['event'],
'id': item['id']
... | """
Scan through the Samples table for oldish entries and remove them.
"""
import logging
import json
import boto3
import time
import decimal
from boto3.dynamodb.conditions import Key, Attr
logger = logging.getLogger()
logger.setLevel(logging.ERROR)
def purge_item(item, batch):
response = batch.delete_item(
... | Add error logging to aid tracking down future issues. | Add error logging to aid tracking down future issues.
| Python | mit | SandcastleApps/partyup,SandcastleApps/partyup,SandcastleApps/partyup | """
Scan through the Samples table for oldish entries and remove them.
"""
import json
import boto3
import time
import decimal
from boto3.dynamodb.conditions import Key, Attr
def purge_item(item, batch):
response = batch.delete_item(
Key={
'event' : item['event'],
'id': item['id']
... | """
Scan through the Samples table for oldish entries and remove them.
"""
import logging
import json
import boto3
import time
import decimal
from boto3.dynamodb.conditions import Key, Attr
logger = logging.getLogger()
logger.setLevel(logging.ERROR)
def purge_item(item, batch):
response = batch.delete_item(
... | <commit_before>"""
Scan through the Samples table for oldish entries and remove them.
"""
import json
import boto3
import time
import decimal
from boto3.dynamodb.conditions import Key, Attr
def purge_item(item, batch):
response = batch.delete_item(
Key={
'event' : item['event'],
'i... | """
Scan through the Samples table for oldish entries and remove them.
"""
import logging
import json
import boto3
import time
import decimal
from boto3.dynamodb.conditions import Key, Attr
logger = logging.getLogger()
logger.setLevel(logging.ERROR)
def purge_item(item, batch):
response = batch.delete_item(
... | """
Scan through the Samples table for oldish entries and remove them.
"""
import json
import boto3
import time
import decimal
from boto3.dynamodb.conditions import Key, Attr
def purge_item(item, batch):
response = batch.delete_item(
Key={
'event' : item['event'],
'id': item['id']
... | <commit_before>"""
Scan through the Samples table for oldish entries and remove them.
"""
import json
import boto3
import time
import decimal
from boto3.dynamodb.conditions import Key, Attr
def purge_item(item, batch):
response = batch.delete_item(
Key={
'event' : item['event'],
'i... |
3f750865762e7751ce0cbd4a171d68e9d1d5a8a6 | contrib/tempest/tempest/cli/manilaclient.py | contrib/tempest/tempest/cli/manilaclient.py | # Copyright 2014 Mirantis Inc.
# 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... | # Copyright 2014 Mirantis Inc.
# 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... | Fix tempest compatibility for cli tests | Fix tempest compatibility for cli tests
Commit https://github.com/openstack/tempest/commit/2474f41f made changes to
tempest project that are inconsistent with our plugin.
Make our plugin use latest changes to keep compatibility.
Change-Id: I08d28b40fdd9ad54a0bcce30647d796943332116
| Python | apache-2.0 | bswartz/manila,jcsp/manila,bswartz/manila,weiting-chen/manila,sajuptpm/manila,openstack/manila,NetApp/manila,redhat-openstack/manila,sajuptpm/manila,vponomaryov/manila,weiting-chen/manila,NetApp/manila,jcsp/manila,vponomaryov/manila,redhat-openstack/manila,openstack/manila,scality/manila,scality/manila | # Copyright 2014 Mirantis Inc.
# 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... | # Copyright 2014 Mirantis Inc.
# 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... | <commit_before># Copyright 2014 Mirantis Inc.
# 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
#
# Unl... | # Copyright 2014 Mirantis Inc.
# 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... | # Copyright 2014 Mirantis Inc.
# 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... | <commit_before># Copyright 2014 Mirantis Inc.
# 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
#
# Unl... |
0a9aed9427b0b36d71a2e8fee74db74690727b15 | hardware/gpio/LEDblink_gpiozero.py | hardware/gpio/LEDblink_gpiozero.py | from gpiozero import LED
import time
# GPIO 24 ... LED ... 470 ohm resistor ... GND
led = LED(24)
try:
led.blink()
time.sleep(20)
except KeyboardInterrupt:
led.off()
| from gpiozero import LED
import time
# GPIO 24 ... LED ... 470 ohm resistor ... GND
led = LED(24)
try:
led.blink()
time.sleep(20)
except KeyboardInterrupt:
led.off()
print "done"
| Print message on completion, to aid debugging | Print message on completion, to aid debugging | Python | mit | claremacrae/raspi_code,claremacrae/raspi_code,claremacrae/raspi_code | from gpiozero import LED
import time
# GPIO 24 ... LED ... 470 ohm resistor ... GND
led = LED(24)
try:
led.blink()
time.sleep(20)
except KeyboardInterrupt:
led.off()
Print message on completion, to aid debugging | from gpiozero import LED
import time
# GPIO 24 ... LED ... 470 ohm resistor ... GND
led = LED(24)
try:
led.blink()
time.sleep(20)
except KeyboardInterrupt:
led.off()
print "done"
| <commit_before>from gpiozero import LED
import time
# GPIO 24 ... LED ... 470 ohm resistor ... GND
led = LED(24)
try:
led.blink()
time.sleep(20)
except KeyboardInterrupt:
led.off()
<commit_msg>Print message on completion, to aid debugging<commit_after> | from gpiozero import LED
import time
# GPIO 24 ... LED ... 470 ohm resistor ... GND
led = LED(24)
try:
led.blink()
time.sleep(20)
except KeyboardInterrupt:
led.off()
print "done"
| from gpiozero import LED
import time
# GPIO 24 ... LED ... 470 ohm resistor ... GND
led = LED(24)
try:
led.blink()
time.sleep(20)
except KeyboardInterrupt:
led.off()
Print message on completion, to aid debuggingfrom gpiozero import LED
import time
# GPIO 24 ... LED ... 470 ohm resistor ... GND
led = LE... | <commit_before>from gpiozero import LED
import time
# GPIO 24 ... LED ... 470 ohm resistor ... GND
led = LED(24)
try:
led.blink()
time.sleep(20)
except KeyboardInterrupt:
led.off()
<commit_msg>Print message on completion, to aid debugging<commit_after>from gpiozero import LED
import time
# GPIO 24 ... L... |
f375fc031640c24dd7761283b931b402d8366421 | django_compat_patcher/patcher.py | django_compat_patcher/patcher.py | from __future__ import absolute_import, print_function, unicode_literals
from . import fixers, utilities, deprecation, registry
# TODO make it idempotent with registry of applied fixes, just log if double applications of same fixers !!!!!
def patch(settings=None):
"""Patches the Django package with relevant fix... | from __future__ import absolute_import, print_function, unicode_literals
from . import fixers, utilities, deprecation, registry
__APPLIED_FIXERS = set()
def patch(settings=None):
"""Patches the Django package with relevant fixers.
A settings dict/objects can be provided, to REPLACE lookups in Django set... | Add __APPLIED_FIXERS set to make sure we are idempotent | Add __APPLIED_FIXERS set to make sure we are idempotent
| Python | mit | pakal/django-compat-patcher,pakal/django-compat-patcher | from __future__ import absolute_import, print_function, unicode_literals
from . import fixers, utilities, deprecation, registry
# TODO make it idempotent with registry of applied fixes, just log if double applications of same fixers !!!!!
def patch(settings=None):
"""Patches the Django package with relevant fix... | from __future__ import absolute_import, print_function, unicode_literals
from . import fixers, utilities, deprecation, registry
__APPLIED_FIXERS = set()
def patch(settings=None):
"""Patches the Django package with relevant fixers.
A settings dict/objects can be provided, to REPLACE lookups in Django set... | <commit_before>from __future__ import absolute_import, print_function, unicode_literals
from . import fixers, utilities, deprecation, registry
# TODO make it idempotent with registry of applied fixes, just log if double applications of same fixers !!!!!
def patch(settings=None):
"""Patches the Django package wi... | from __future__ import absolute_import, print_function, unicode_literals
from . import fixers, utilities, deprecation, registry
__APPLIED_FIXERS = set()
def patch(settings=None):
"""Patches the Django package with relevant fixers.
A settings dict/objects can be provided, to REPLACE lookups in Django set... | from __future__ import absolute_import, print_function, unicode_literals
from . import fixers, utilities, deprecation, registry
# TODO make it idempotent with registry of applied fixes, just log if double applications of same fixers !!!!!
def patch(settings=None):
"""Patches the Django package with relevant fix... | <commit_before>from __future__ import absolute_import, print_function, unicode_literals
from . import fixers, utilities, deprecation, registry
# TODO make it idempotent with registry of applied fixes, just log if double applications of same fixers !!!!!
def patch(settings=None):
"""Patches the Django package wi... |
e87017a724b274ad3289f4af674ae88bf8f21b8a | devbin/benchmark_proc_get_all.py | devbin/benchmark_proc_get_all.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""Benchmark listing all processes
Usage:
benchmark_proc_get_all.py
"""
import os
MYDIR = os.path.dirname(os.path.abspath(__file__))
import sys
sys.path.insert(0, os.path.join(MYDIR, ".."))
import time
from px import px_process
LAPS=20
def main():
t0 = time.ti... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""Benchmark listing all processes
Usage:
benchmark_proc_get_all.py
"""
import os
MYDIR = os.path.dirname(os.path.abspath(__file__))
import sys
sys.path.insert(0, os.path.join(MYDIR, ".."))
import time
from px import px_process
LAPS=20
def main():
t0 = time.ti... | Use ms rather than s for process getting benchmark | Use ms rather than s for process getting benchmark
| Python | mit | walles/px,walles/px | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""Benchmark listing all processes
Usage:
benchmark_proc_get_all.py
"""
import os
MYDIR = os.path.dirname(os.path.abspath(__file__))
import sys
sys.path.insert(0, os.path.join(MYDIR, ".."))
import time
from px import px_process
LAPS=20
def main():
t0 = time.ti... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""Benchmark listing all processes
Usage:
benchmark_proc_get_all.py
"""
import os
MYDIR = os.path.dirname(os.path.abspath(__file__))
import sys
sys.path.insert(0, os.path.join(MYDIR, ".."))
import time
from px import px_process
LAPS=20
def main():
t0 = time.ti... | <commit_before>#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""Benchmark listing all processes
Usage:
benchmark_proc_get_all.py
"""
import os
MYDIR = os.path.dirname(os.path.abspath(__file__))
import sys
sys.path.insert(0, os.path.join(MYDIR, ".."))
import time
from px import px_process
LAPS=20
def main():
... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""Benchmark listing all processes
Usage:
benchmark_proc_get_all.py
"""
import os
MYDIR = os.path.dirname(os.path.abspath(__file__))
import sys
sys.path.insert(0, os.path.join(MYDIR, ".."))
import time
from px import px_process
LAPS=20
def main():
t0 = time.ti... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""Benchmark listing all processes
Usage:
benchmark_proc_get_all.py
"""
import os
MYDIR = os.path.dirname(os.path.abspath(__file__))
import sys
sys.path.insert(0, os.path.join(MYDIR, ".."))
import time
from px import px_process
LAPS=20
def main():
t0 = time.ti... | <commit_before>#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""Benchmark listing all processes
Usage:
benchmark_proc_get_all.py
"""
import os
MYDIR = os.path.dirname(os.path.abspath(__file__))
import sys
sys.path.insert(0, os.path.join(MYDIR, ".."))
import time
from px import px_process
LAPS=20
def main():
... |
b49844f2c6da136d4b4c350b2b176e5f4cbdcd88 | reversebinary.py | reversebinary.py | #!/bin/python
"""
reversebinary puzzle for Spotify.com
v1
Jose Antonio Navarrete
You can find me at [email protected]
Follow me on twitter @joseanavarrete
"""
import unittest
MAX_VALUE = 1000000000
def reverse_binary(n):
"""
Receives an integer (n), converts it to its reverse binary
"""
... | #!/bin/python
"""
reversebinary puzzle for Spotify.com
v1
Jose Antonio Navarrete
You can find me at [email protected]
Follow me on twitter @joseanavarrete
"""
import unittest
MAX_VALUE = 1000000000
def reverse_binary(n):
"""
Receives an integer (n), converts it to its reverse binary
"""
... | Add breakline to better reading | Add breakline to better reading
| Python | mit | josenava/spotify_puzzle | #!/bin/python
"""
reversebinary puzzle for Spotify.com
v1
Jose Antonio Navarrete
You can find me at [email protected]
Follow me on twitter @joseanavarrete
"""
import unittest
MAX_VALUE = 1000000000
def reverse_binary(n):
"""
Receives an integer (n), converts it to its reverse binary
"""
... | #!/bin/python
"""
reversebinary puzzle for Spotify.com
v1
Jose Antonio Navarrete
You can find me at [email protected]
Follow me on twitter @joseanavarrete
"""
import unittest
MAX_VALUE = 1000000000
def reverse_binary(n):
"""
Receives an integer (n), converts it to its reverse binary
"""
... | <commit_before>#!/bin/python
"""
reversebinary puzzle for Spotify.com
v1
Jose Antonio Navarrete
You can find me at [email protected]
Follow me on twitter @joseanavarrete
"""
import unittest
MAX_VALUE = 1000000000
def reverse_binary(n):
"""
Receives an integer (n), converts it to its reverse bi... | #!/bin/python
"""
reversebinary puzzle for Spotify.com
v1
Jose Antonio Navarrete
You can find me at [email protected]
Follow me on twitter @joseanavarrete
"""
import unittest
MAX_VALUE = 1000000000
def reverse_binary(n):
"""
Receives an integer (n), converts it to its reverse binary
"""
... | #!/bin/python
"""
reversebinary puzzle for Spotify.com
v1
Jose Antonio Navarrete
You can find me at [email protected]
Follow me on twitter @joseanavarrete
"""
import unittest
MAX_VALUE = 1000000000
def reverse_binary(n):
"""
Receives an integer (n), converts it to its reverse binary
"""
... | <commit_before>#!/bin/python
"""
reversebinary puzzle for Spotify.com
v1
Jose Antonio Navarrete
You can find me at [email protected]
Follow me on twitter @joseanavarrete
"""
import unittest
MAX_VALUE = 1000000000
def reverse_binary(n):
"""
Receives an integer (n), converts it to its reverse bi... |
4f35af8502b8d091cd88ab61c0aca343918ac9f1 | ec2api/cmd/__init__.py | ec2api/cmd/__init__.py | # Copyright 2014
# The Cloudscaling Group, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to... | Enable greenthreading for ec2api services | Enable greenthreading for ec2api services
Since ec2api and metadata services based on greenthreading, it have to
be initialized properly. This patch initializes it for cmd modules,
which allows to debug services from IDE.
Change-Id: Ic7ae69fbf5b58cfa4df822cd5d42f7c2cf45d848
| Python | apache-2.0 | openstack/ec2-api,stackforge/ec2-api,hayderimran7/ec2-api,stackforge/ec2-api,hayderimran7/ec2-api,openstack/ec2-api | Enable greenthreading for ec2api services
Since ec2api and metadata services based on greenthreading, it have to
be initialized properly. This patch initializes it for cmd modules,
which allows to debug services from IDE.
Change-Id: Ic7ae69fbf5b58cfa4df822cd5d42f7c2cf45d848 | # Copyright 2014
# The Cloudscaling Group, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to... | <commit_before><commit_msg>Enable greenthreading for ec2api services
Since ec2api and metadata services based on greenthreading, it have to
be initialized properly. This patch initializes it for cmd modules,
which allows to debug services from IDE.
Change-Id: Ic7ae69fbf5b58cfa4df822cd5d42f7c2cf45d848<commit_after> | # Copyright 2014
# The Cloudscaling Group, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to... | Enable greenthreading for ec2api services
Since ec2api and metadata services based on greenthreading, it have to
be initialized properly. This patch initializes it for cmd modules,
which allows to debug services from IDE.
Change-Id: Ic7ae69fbf5b58cfa4df822cd5d42f7c2cf45d848# Copyright 2014
# The Cloudscaling Group, I... | <commit_before><commit_msg>Enable greenthreading for ec2api services
Since ec2api and metadata services based on greenthreading, it have to
be initialized properly. This patch initializes it for cmd modules,
which allows to debug services from IDE.
Change-Id: Ic7ae69fbf5b58cfa4df822cd5d42f7c2cf45d848<commit_after># C... | |
92cb843c1b6ada9b63038ed1ce22f83ee6146aff | jazzy/scope.py | jazzy/scope.py | import uuid
class Scope:
def __init__(self):
self.pc = 0;
self.variables = {}
self.lvalue = self
self.rvalue = self
self.stack = [1,2,3]
self.name = uuid.uuid1()
def GetVar(self, name):
if name in self.variables:
return self.variables[name]
... | import uuid
class Scope:
def __init__(self):
self.pc = 0;
self.variables = {}
self.lvalue = self
self.rvalue = self
self.stack = [1,2,3]
self.name = uuid.uuid1()
def GetVar(self, name):
if name in self.variables:
return self.variables[name]
... | Add functions to get/set variables addresses | Add functions to get/set variables addresses
Since some of the jaz commands depend on the address of an variable,
made function to obtain it.
| Python | mit | joewashear007/jazzy | import uuid
class Scope:
def __init__(self):
self.pc = 0;
self.variables = {}
self.lvalue = self
self.rvalue = self
self.stack = [1,2,3]
self.name = uuid.uuid1()
def GetVar(self, name):
if name in self.variables:
return self.variables[name]
... | import uuid
class Scope:
def __init__(self):
self.pc = 0;
self.variables = {}
self.lvalue = self
self.rvalue = self
self.stack = [1,2,3]
self.name = uuid.uuid1()
def GetVar(self, name):
if name in self.variables:
return self.variables[name]
... | <commit_before>import uuid
class Scope:
def __init__(self):
self.pc = 0;
self.variables = {}
self.lvalue = self
self.rvalue = self
self.stack = [1,2,3]
self.name = uuid.uuid1()
def GetVar(self, name):
if name in self.variables:
return self.var... | import uuid
class Scope:
def __init__(self):
self.pc = 0;
self.variables = {}
self.lvalue = self
self.rvalue = self
self.stack = [1,2,3]
self.name = uuid.uuid1()
def GetVar(self, name):
if name in self.variables:
return self.variables[name]
... | import uuid
class Scope:
def __init__(self):
self.pc = 0;
self.variables = {}
self.lvalue = self
self.rvalue = self
self.stack = [1,2,3]
self.name = uuid.uuid1()
def GetVar(self, name):
if name in self.variables:
return self.variables[name]
... | <commit_before>import uuid
class Scope:
def __init__(self):
self.pc = 0;
self.variables = {}
self.lvalue = self
self.rvalue = self
self.stack = [1,2,3]
self.name = uuid.uuid1()
def GetVar(self, name):
if name in self.variables:
return self.var... |
cab8fc7ae9c7e162d555c107ed415f18782512e7 | dsub/_dsub_version.py | dsub/_dsub_version.py | # Copyright 2017 Google Inc. 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 applicable law or a... | # Copyright 2017 Google Inc. 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 applicable law or a... | Update dsub version to 0.4.5 | Update dsub version to 0.4.5
PiperOrigin-RevId: 393155372
| Python | apache-2.0 | DataBiosphere/dsub,DataBiosphere/dsub | # Copyright 2017 Google Inc. 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 applicable law or a... | # Copyright 2017 Google Inc. 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 applicable law or a... | <commit_before># Copyright 2017 Google Inc. 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 appl... | # Copyright 2017 Google Inc. 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 applicable law or a... | # Copyright 2017 Google Inc. 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 applicable law or a... | <commit_before># Copyright 2017 Google Inc. 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 appl... |
c407c067495d76ebed7c36ef005861c80fdcfdce | textx/__init__.py | textx/__init__.py | __version__ = "1.6.dev"
| from textx.metamodel import metamodel_from_file, metamodel_from_str # noqa
from textx.langapi import get_language, iter_languages # noqa
__version__ = "1.6.dev"
| Make metamodel factory methods and lang API available in textx package. | Make metamodel factory methods and lang API available in textx package.
| Python | mit | igordejanovic/textX,igordejanovic/textX,igordejanovic/textX | __version__ = "1.6.dev"
Make metamodel factory methods and lang API available in textx package. | from textx.metamodel import metamodel_from_file, metamodel_from_str # noqa
from textx.langapi import get_language, iter_languages # noqa
__version__ = "1.6.dev"
| <commit_before>__version__ = "1.6.dev"
<commit_msg>Make metamodel factory methods and lang API available in textx package.<commit_after> | from textx.metamodel import metamodel_from_file, metamodel_from_str # noqa
from textx.langapi import get_language, iter_languages # noqa
__version__ = "1.6.dev"
| __version__ = "1.6.dev"
Make metamodel factory methods and lang API available in textx package.from textx.metamodel import metamodel_from_file, metamodel_from_str # noqa
from textx.langapi import get_language, iter_languages # noqa
__version__ = "1.6.dev"
| <commit_before>__version__ = "1.6.dev"
<commit_msg>Make metamodel factory methods and lang API available in textx package.<commit_after>from textx.metamodel import metamodel_from_file, metamodel_from_str # noqa
from textx.langapi import get_language, iter_languages # noqa
__version__ = "1.6.dev"
|
0e044d1ad8b6fb2b0ac2126bb0fccfa05de9da14 | file_transfer/datamover/__init__.py | file_transfer/datamover/__init__.py |
from .connectors import (GithubConnector, S3Connector,
FTPConnector, LocalConnector)
from .transporters import (BaltradToS3, LocalToS3)
from .s3enram import S3EnramHandler
from .utils import (parse_filename, extract_month_updates,
parse_coverage_month, coverage_to_csv)
|
from .connectors import (GithubConnector, S3Connector,
FTPConnector, LocalConnector)
from .transporters import (BaltradToS3, LocalToS3)
from .s3enram import S3EnramHandler
from .utils import (parse_filename, extract_month_updates,
parse_coverage_month, coverage_to_csv,
... | Add csv handling to module | Add csv handling to module
| Python | mit | enram/data-repository,enram/data-repository,enram/data-repository,enram/infrastructure,enram/data-repository,enram/infrastructure |
from .connectors import (GithubConnector, S3Connector,
FTPConnector, LocalConnector)
from .transporters import (BaltradToS3, LocalToS3)
from .s3enram import S3EnramHandler
from .utils import (parse_filename, extract_month_updates,
parse_coverage_month, coverage_to_csv)
Add ... |
from .connectors import (GithubConnector, S3Connector,
FTPConnector, LocalConnector)
from .transporters import (BaltradToS3, LocalToS3)
from .s3enram import S3EnramHandler
from .utils import (parse_filename, extract_month_updates,
parse_coverage_month, coverage_to_csv,
... | <commit_before>
from .connectors import (GithubConnector, S3Connector,
FTPConnector, LocalConnector)
from .transporters import (BaltradToS3, LocalToS3)
from .s3enram import S3EnramHandler
from .utils import (parse_filename, extract_month_updates,
parse_coverage_month, covera... |
from .connectors import (GithubConnector, S3Connector,
FTPConnector, LocalConnector)
from .transporters import (BaltradToS3, LocalToS3)
from .s3enram import S3EnramHandler
from .utils import (parse_filename, extract_month_updates,
parse_coverage_month, coverage_to_csv,
... |
from .connectors import (GithubConnector, S3Connector,
FTPConnector, LocalConnector)
from .transporters import (BaltradToS3, LocalToS3)
from .s3enram import S3EnramHandler
from .utils import (parse_filename, extract_month_updates,
parse_coverage_month, coverage_to_csv)
Add ... | <commit_before>
from .connectors import (GithubConnector, S3Connector,
FTPConnector, LocalConnector)
from .transporters import (BaltradToS3, LocalToS3)
from .s3enram import S3EnramHandler
from .utils import (parse_filename, extract_month_updates,
parse_coverage_month, covera... |
abc1d2095f18f6c7ff129f3b8bf9eae2d7a6239a | skimage/io/tests/test_io.py | skimage/io/tests/test_io.py | import os
from numpy.testing import *
import numpy as np
import skimage.io as io
from skimage import data_dir
def test_stack_basic():
x = np.arange(12).reshape(3, 4)
io.push(x)
assert_array_equal(io.pop(), x)
@raises(ValueError)
def test_stack_non_array():
io.push([[1, 2, 3]])
def test_imread_u... | import os
from numpy.testing import *
import numpy as np
import skimage.io as io
from skimage import data_dir
def test_stack_basic():
x = np.arange(12).reshape(3, 4)
io.push(x)
assert_array_equal(io.pop(), x)
@raises(ValueError)
def test_stack_non_array():
io.push([[1, 2, 3]])
def test_imread_u... | Fix file URI in test (2nd attempt) | BUG: Fix file URI in test (2nd attempt)
| Python | bsd-3-clause | WarrenWeckesser/scikits-image,SamHames/scikit-image,chintak/scikit-image,chintak/scikit-image,juliusbierk/scikit-image,oew1v07/scikit-image,blink1073/scikit-image,bsipocz/scikit-image,bennlich/scikit-image,youprofit/scikit-image,dpshelio/scikit-image,newville/scikit-image,dpshelio/scikit-image,GaZ3ll3/scikit-image,ofgu... | import os
from numpy.testing import *
import numpy as np
import skimage.io as io
from skimage import data_dir
def test_stack_basic():
x = np.arange(12).reshape(3, 4)
io.push(x)
assert_array_equal(io.pop(), x)
@raises(ValueError)
def test_stack_non_array():
io.push([[1, 2, 3]])
def test_imread_u... | import os
from numpy.testing import *
import numpy as np
import skimage.io as io
from skimage import data_dir
def test_stack_basic():
x = np.arange(12).reshape(3, 4)
io.push(x)
assert_array_equal(io.pop(), x)
@raises(ValueError)
def test_stack_non_array():
io.push([[1, 2, 3]])
def test_imread_u... | <commit_before>import os
from numpy.testing import *
import numpy as np
import skimage.io as io
from skimage import data_dir
def test_stack_basic():
x = np.arange(12).reshape(3, 4)
io.push(x)
assert_array_equal(io.pop(), x)
@raises(ValueError)
def test_stack_non_array():
io.push([[1, 2, 3]])
de... | import os
from numpy.testing import *
import numpy as np
import skimage.io as io
from skimage import data_dir
def test_stack_basic():
x = np.arange(12).reshape(3, 4)
io.push(x)
assert_array_equal(io.pop(), x)
@raises(ValueError)
def test_stack_non_array():
io.push([[1, 2, 3]])
def test_imread_u... | import os
from numpy.testing import *
import numpy as np
import skimage.io as io
from skimage import data_dir
def test_stack_basic():
x = np.arange(12).reshape(3, 4)
io.push(x)
assert_array_equal(io.pop(), x)
@raises(ValueError)
def test_stack_non_array():
io.push([[1, 2, 3]])
def test_imread_u... | <commit_before>import os
from numpy.testing import *
import numpy as np
import skimage.io as io
from skimage import data_dir
def test_stack_basic():
x = np.arange(12).reshape(3, 4)
io.push(x)
assert_array_equal(io.pop(), x)
@raises(ValueError)
def test_stack_non_array():
io.push([[1, 2, 3]])
de... |
f87cbadbbcfc9d67aa3e5d0662236c18f23ba63b | DataBase.py | DataBase.py |
''' Copyright 2015 RTeam (Edgar Kaziahmedov, Klim Kireev, Artem Yashuhin)
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 2015 OneRTeam (Edgar Kaziahmedov, Klim Kireev, Artem Yashuhin)
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
Un... | Use source file with license 2 | Use source file with license 2
| Python | apache-2.0 | proffK/CourseManager |
''' Copyright 2015 RTeam (Edgar Kaziahmedov, Klim Kireev, Artem Yashuhin)
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 2015 OneRTeam (Edgar Kaziahmedov, Klim Kireev, Artem Yashuhin)
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
Un... | <commit_before>
''' Copyright 2015 RTeam (Edgar Kaziahmedov, Klim Kireev, Artem Yashuhin)
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.... |
'''
Copyright 2015 OneRTeam (Edgar Kaziahmedov, Klim Kireev, Artem Yashuhin)
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
Un... |
''' Copyright 2015 RTeam (Edgar Kaziahmedov, Klim Kireev, Artem Yashuhin)
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... | <commit_before>
''' Copyright 2015 RTeam (Edgar Kaziahmedov, Klim Kireev, Artem Yashuhin)
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.... |
847ffbfaeb2c7ade9a6c74efad18cdc283b46fe7 | fedorasummerofhardware/models.py | fedorasummerofhardware/models.py | from datetime import datetime
from sqlalchemy import Column, DateTime, Integer, Text, Boolean, Date
from sqlalchemy.ext.declarative import declarative_base
from sqlalchemy.orm import scoped_session, sessionmaker
DBSession = scoped_session(sessionmaker())
Base = declarative_base()
class Application(Base):
__tablen... | from datetime import datetime
from sqlalchemy import Column, DateTime, Integer, Text, Boolean, Date
from sqlalchemy.ext.declarative import declarative_base
from sqlalchemy.orm import scoped_session, sessionmaker
DBSession = scoped_session(sessionmaker())
Base = declarative_base()
class Application(Base):
__tablen... | Fix the phone Column type | Fix the phone Column type
| Python | agpl-3.0 | fedora-infra/fedora-openhw2012,fedora-infra/fedora-openhw2012,fedora-infra/fedora-openhw2012 | from datetime import datetime
from sqlalchemy import Column, DateTime, Integer, Text, Boolean, Date
from sqlalchemy.ext.declarative import declarative_base
from sqlalchemy.orm import scoped_session, sessionmaker
DBSession = scoped_session(sessionmaker())
Base = declarative_base()
class Application(Base):
__tablen... | from datetime import datetime
from sqlalchemy import Column, DateTime, Integer, Text, Boolean, Date
from sqlalchemy.ext.declarative import declarative_base
from sqlalchemy.orm import scoped_session, sessionmaker
DBSession = scoped_session(sessionmaker())
Base = declarative_base()
class Application(Base):
__tablen... | <commit_before>from datetime import datetime
from sqlalchemy import Column, DateTime, Integer, Text, Boolean, Date
from sqlalchemy.ext.declarative import declarative_base
from sqlalchemy.orm import scoped_session, sessionmaker
DBSession = scoped_session(sessionmaker())
Base = declarative_base()
class Application(Base... | from datetime import datetime
from sqlalchemy import Column, DateTime, Integer, Text, Boolean, Date
from sqlalchemy.ext.declarative import declarative_base
from sqlalchemy.orm import scoped_session, sessionmaker
DBSession = scoped_session(sessionmaker())
Base = declarative_base()
class Application(Base):
__tablen... | from datetime import datetime
from sqlalchemy import Column, DateTime, Integer, Text, Boolean, Date
from sqlalchemy.ext.declarative import declarative_base
from sqlalchemy.orm import scoped_session, sessionmaker
DBSession = scoped_session(sessionmaker())
Base = declarative_base()
class Application(Base):
__tablen... | <commit_before>from datetime import datetime
from sqlalchemy import Column, DateTime, Integer, Text, Boolean, Date
from sqlalchemy.ext.declarative import declarative_base
from sqlalchemy.orm import scoped_session, sessionmaker
DBSession = scoped_session(sessionmaker())
Base = declarative_base()
class Application(Base... |
4e699d94c84f1123f36a331926ca77af3f86b474 | tensorflow/python/profiler/traceme.py | tensorflow/python/profiler/traceme.py | # Copyright 2019 The TensorFlow 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 applica... | # Copyright 2019 The TensorFlow 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 applica... | Remove tf_export from TraceMe Python API. | Remove tf_export from TraceMe Python API.
PiperOrigin-RevId: 262247599
| Python | apache-2.0 | cxxgtxy/tensorflow,karllessard/tensorflow,jhseu/tensorflow,tensorflow/tensorflow,jhseu/tensorflow,yongtang/tensorflow,renyi533/tensorflow,petewarden/tensorflow,renyi533/tensorflow,freedomtan/tensorflow,renyi533/tensorflow,tensorflow/tensorflow-pywrap_tf_optimizer,tensorflow/tensorflow-experimental_link_static_libraries... | # Copyright 2019 The TensorFlow 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 applica... | # Copyright 2019 The TensorFlow 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 applica... | <commit_before># Copyright 2019 The TensorFlow 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 requ... | # Copyright 2019 The TensorFlow 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 applica... | # Copyright 2019 The TensorFlow 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 applica... | <commit_before># Copyright 2019 The TensorFlow 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 requ... |
759f6a2e4ced9ce9beeda01e638f109d946050b1 | server/migrations/0006_auto_20150811_0811.py | server/migrations/0006_auto_20150811_0811.py | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
class Migration(migrations.Migration):
dependencies = [
('server', '0005_auto_20150717_1827'),
]
operations = [
migrations.AddField(
model_name='machine',
nam... | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.shortcuts import get_object_or_404
from django.db import models, migrations
def add_initial_date(apps, schema_editor):
Machine = apps.get_model("server", "Machine")
for machine in Machine.objects.all():
if not machine.first_che... | Add in the first checkin date if it doesn't exist | Add in the first checkin date if it doesn't exist
| Python | apache-2.0 | sheagcraig/sal,salopensource/sal,salopensource/sal,macjustice/sal,chasetb/sal,salopensource/sal,sheagcraig/sal,erikng/sal,macjustice/sal,erikng/sal,chasetb/sal,chasetb/sal,erikng/sal,macjustice/sal,macjustice/sal,sheagcraig/sal,erikng/sal,sheagcraig/sal,chasetb/sal,salopensource/sal | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
class Migration(migrations.Migration):
dependencies = [
('server', '0005_auto_20150717_1827'),
]
operations = [
migrations.AddField(
model_name='machine',
nam... | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.shortcuts import get_object_or_404
from django.db import models, migrations
def add_initial_date(apps, schema_editor):
Machine = apps.get_model("server", "Machine")
for machine in Machine.objects.all():
if not machine.first_che... | <commit_before># -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
class Migration(migrations.Migration):
dependencies = [
('server', '0005_auto_20150717_1827'),
]
operations = [
migrations.AddField(
model_name='machine',
... | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.shortcuts import get_object_or_404
from django.db import models, migrations
def add_initial_date(apps, schema_editor):
Machine = apps.get_model("server", "Machine")
for machine in Machine.objects.all():
if not machine.first_che... | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
class Migration(migrations.Migration):
dependencies = [
('server', '0005_auto_20150717_1827'),
]
operations = [
migrations.AddField(
model_name='machine',
nam... | <commit_before># -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
class Migration(migrations.Migration):
dependencies = [
('server', '0005_auto_20150717_1827'),
]
operations = [
migrations.AddField(
model_name='machine',
... |
343d0bcdeb6981ca90673de342eb6064ca62c24e | pip_deploy.py | pip_deploy.py | import subprocess
subprocess.call('python setup.py sdist')
subprocess.call('python setup.py sdist bdist_wheel upload')
| import subprocess
subprocess.call('python setup.py sdist')
subprocess.call('python setup.py bdist_wheel --universal')
subprocess.call('twine upload dist/*')
| Update pip deploy script to use twine | Update pip deploy script to use twine
| Python | mit | partrita/Gooey,chriskiehl/Gooey,codingsnippets/Gooey | import subprocess
subprocess.call('python setup.py sdist')
subprocess.call('python setup.py sdist bdist_wheel upload')
Update pip deploy script to use twine | import subprocess
subprocess.call('python setup.py sdist')
subprocess.call('python setup.py bdist_wheel --universal')
subprocess.call('twine upload dist/*')
| <commit_before>import subprocess
subprocess.call('python setup.py sdist')
subprocess.call('python setup.py sdist bdist_wheel upload')
<commit_msg>Update pip deploy script to use twine<commit_after> | import subprocess
subprocess.call('python setup.py sdist')
subprocess.call('python setup.py bdist_wheel --universal')
subprocess.call('twine upload dist/*')
| import subprocess
subprocess.call('python setup.py sdist')
subprocess.call('python setup.py sdist bdist_wheel upload')
Update pip deploy script to use twineimport subprocess
subprocess.call('python setup.py sdist')
subprocess.call('python setup.py bdist_wheel --universal')
subprocess.call('twine upload dist/*... | <commit_before>import subprocess
subprocess.call('python setup.py sdist')
subprocess.call('python setup.py sdist bdist_wheel upload')
<commit_msg>Update pip deploy script to use twine<commit_after>import subprocess
subprocess.call('python setup.py sdist')
subprocess.call('python setup.py bdist_wheel --universa... |
b916e8dbb08b6c4ebb2ff37e8515a41f05261f5b | scripts/setup.py | scripts/setup.py | import setuptools
from imgtool import imgtool_version
setuptools.setup(
name="imgtool",
version=imgtool_version,
author="The MCUboot commiters",
description=("MCUboot's image signing and key management"),
license="Apache Software License",
url="http://github.com/JuulLabs-OSS/mcuboot",
packa... | import setuptools
from imgtool import imgtool_version
setuptools.setup(
name="imgtool",
version=imgtool_version,
author="The MCUboot commiters",
author_email="None",
description=("MCUboot's image signing and key management"),
license="Apache Software License",
url="http://github.com/JuulLab... | Fix author_email UNKNOWN in pip show | Fix author_email UNKNOWN in pip show
Signed-off-by: Fabio Utzig <[email protected]>
| Python | apache-2.0 | utzig/mcuboot,utzig/mcuboot,ATmobica/mcuboot,runtimeco/mcuboot,runtimeco/mcuboot,runtimeco/mcuboot,runtimeco/mcuboot,tamban01/mcuboot,ATmobica/mcuboot,utzig/mcuboot,utzig/mcuboot,tamban01/mcuboot,tamban01/mcuboot,ATmobica/mcuboot,ATmobica/mcuboot,ATmobica/mcuboot,runtimeco/mcuboot,tamban01/mcuboot,tamban01/mcuboot,utzi... | import setuptools
from imgtool import imgtool_version
setuptools.setup(
name="imgtool",
version=imgtool_version,
author="The MCUboot commiters",
description=("MCUboot's image signing and key management"),
license="Apache Software License",
url="http://github.com/JuulLabs-OSS/mcuboot",
packa... | import setuptools
from imgtool import imgtool_version
setuptools.setup(
name="imgtool",
version=imgtool_version,
author="The MCUboot commiters",
author_email="None",
description=("MCUboot's image signing and key management"),
license="Apache Software License",
url="http://github.com/JuulLab... | <commit_before>import setuptools
from imgtool import imgtool_version
setuptools.setup(
name="imgtool",
version=imgtool_version,
author="The MCUboot commiters",
description=("MCUboot's image signing and key management"),
license="Apache Software License",
url="http://github.com/JuulLabs-OSS/mcub... | import setuptools
from imgtool import imgtool_version
setuptools.setup(
name="imgtool",
version=imgtool_version,
author="The MCUboot commiters",
author_email="None",
description=("MCUboot's image signing and key management"),
license="Apache Software License",
url="http://github.com/JuulLab... | import setuptools
from imgtool import imgtool_version
setuptools.setup(
name="imgtool",
version=imgtool_version,
author="The MCUboot commiters",
description=("MCUboot's image signing and key management"),
license="Apache Software License",
url="http://github.com/JuulLabs-OSS/mcuboot",
packa... | <commit_before>import setuptools
from imgtool import imgtool_version
setuptools.setup(
name="imgtool",
version=imgtool_version,
author="The MCUboot commiters",
description=("MCUboot's image signing and key management"),
license="Apache Software License",
url="http://github.com/JuulLabs-OSS/mcub... |
9ee03ea335b438cf1005a2295360310456e27bad | repos/urls.py | repos/urls.py | from django.conf.urls import include, url
from django.contrib import admin
from django.contrib.auth import views
from django.http import HttpResponseRedirect
urlpatterns = [
url(r'^$', lambda u: HttpResponseRedirect('/repo')),
url(r'^controller/logout/$', views.logout, {'next_page': '/repo/home/'}),
url(r'^co... | from django.conf.urls import include, url
from django.contrib import admin
from django.contrib.auth import views
from django.http import HttpResponseRedirect
urlpatterns = [
url(r'^$', lambda u: HttpResponseRedirect('/reg')),
url(r'^controller/logout/$', views.logout, {'next_page': '/repo/home/'}),
url(r'^con... | Switch home page to reg/home | Switch home page to reg/home
| Python | mit | giantas/elibrary,giantas/elibrary,giantas/elibrary | from django.conf.urls import include, url
from django.contrib import admin
from django.contrib.auth import views
from django.http import HttpResponseRedirect
urlpatterns = [
url(r'^$', lambda u: HttpResponseRedirect('/repo')),
url(r'^controller/logout/$', views.logout, {'next_page': '/repo/home/'}),
url(r'^co... | from django.conf.urls import include, url
from django.contrib import admin
from django.contrib.auth import views
from django.http import HttpResponseRedirect
urlpatterns = [
url(r'^$', lambda u: HttpResponseRedirect('/reg')),
url(r'^controller/logout/$', views.logout, {'next_page': '/repo/home/'}),
url(r'^con... | <commit_before>from django.conf.urls import include, url
from django.contrib import admin
from django.contrib.auth import views
from django.http import HttpResponseRedirect
urlpatterns = [
url(r'^$', lambda u: HttpResponseRedirect('/repo')),
url(r'^controller/logout/$', views.logout, {'next_page': '/repo/home/'})... | from django.conf.urls import include, url
from django.contrib import admin
from django.contrib.auth import views
from django.http import HttpResponseRedirect
urlpatterns = [
url(r'^$', lambda u: HttpResponseRedirect('/reg')),
url(r'^controller/logout/$', views.logout, {'next_page': '/repo/home/'}),
url(r'^con... | from django.conf.urls import include, url
from django.contrib import admin
from django.contrib.auth import views
from django.http import HttpResponseRedirect
urlpatterns = [
url(r'^$', lambda u: HttpResponseRedirect('/repo')),
url(r'^controller/logout/$', views.logout, {'next_page': '/repo/home/'}),
url(r'^co... | <commit_before>from django.conf.urls import include, url
from django.contrib import admin
from django.contrib.auth import views
from django.http import HttpResponseRedirect
urlpatterns = [
url(r'^$', lambda u: HttpResponseRedirect('/repo')),
url(r'^controller/logout/$', views.logout, {'next_page': '/repo/home/'})... |
7a98cd1c58985da9230ba5861731b6f252d2c611 | source/update.py | source/update.py | """updates subreddit css with compiled sass"""
import time
import sass
import praw
def css() -> str:
"""compiles sass and returns css"""
return sass.compile(filename="index.scss", output_style="compressed")
def uid() -> str:
"""return date and time"""
return "Subreddit upload on {}".format(time.str... | """updates subreddit css with compiled sass"""
import os
import time
from typing import List, Dict, Any, Tuple
import praw
import sass
WebhookResponse = Dict[str, Any] # pylint: disable=C0103
def css() -> str:
"""compiles sass and returns css"""
return sass.compile(filename="index.scss", output_style="compr... | Check for changed files from webhook | Check for changed files from webhook
Prevents uploading everything, only the changed assets
| Python | mit | neoliberal/css-updater | """updates subreddit css with compiled sass"""
import time
import sass
import praw
def css() -> str:
"""compiles sass and returns css"""
return sass.compile(filename="index.scss", output_style="compressed")
def uid() -> str:
"""return date and time"""
return "Subreddit upload on {}".format(time.str... | """updates subreddit css with compiled sass"""
import os
import time
from typing import List, Dict, Any, Tuple
import praw
import sass
WebhookResponse = Dict[str, Any] # pylint: disable=C0103
def css() -> str:
"""compiles sass and returns css"""
return sass.compile(filename="index.scss", output_style="compr... | <commit_before>"""updates subreddit css with compiled sass"""
import time
import sass
import praw
def css() -> str:
"""compiles sass and returns css"""
return sass.compile(filename="index.scss", output_style="compressed")
def uid() -> str:
"""return date and time"""
return "Subreddit upload on {}".... | """updates subreddit css with compiled sass"""
import os
import time
from typing import List, Dict, Any, Tuple
import praw
import sass
WebhookResponse = Dict[str, Any] # pylint: disable=C0103
def css() -> str:
"""compiles sass and returns css"""
return sass.compile(filename="index.scss", output_style="compr... | """updates subreddit css with compiled sass"""
import time
import sass
import praw
def css() -> str:
"""compiles sass and returns css"""
return sass.compile(filename="index.scss", output_style="compressed")
def uid() -> str:
"""return date and time"""
return "Subreddit upload on {}".format(time.str... | <commit_before>"""updates subreddit css with compiled sass"""
import time
import sass
import praw
def css() -> str:
"""compiles sass and returns css"""
return sass.compile(filename="index.scss", output_style="compressed")
def uid() -> str:
"""return date and time"""
return "Subreddit upload on {}".... |
e6b5c93a8c23fcea84768a8b50708ef7ef78dcd8 | functionaltests/api/base.py | functionaltests/api/base.py | # -*- coding: utf-8 -*-
#
# Copyright 2013 - Noorul Islam K M
#
# 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 applic... | # -*- coding: utf-8 -*-
#
# Copyright 2013 - Noorul Islam K M
#
# 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 applic... | Fix functionaltests (imported tempest code has changed) | Fix functionaltests (imported tempest code has changed)
get_auth_provider now takes an argument.
Change-Id: I4a80ef3fdf2914854268459cf1080a46922e93d5
| Python | apache-2.0 | gilbertpilz/solum,ed-/solum,ed-/solum,gilbertpilz/solum,openstack/solum,devdattakulkarni/test-solum,gilbertpilz/solum,stackforge/solum,openstack/solum,ed-/solum,stackforge/solum,devdattakulkarni/test-solum,ed-/solum,gilbertpilz/solum | # -*- coding: utf-8 -*-
#
# Copyright 2013 - Noorul Islam K M
#
# 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 applic... | # -*- coding: utf-8 -*-
#
# Copyright 2013 - Noorul Islam K M
#
# 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 applic... | <commit_before># -*- coding: utf-8 -*-
#
# Copyright 2013 - Noorul Islam K M
#
# 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 - Noorul Islam K M
#
# 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 applic... | # -*- coding: utf-8 -*-
#
# Copyright 2013 - Noorul Islam K M
#
# 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 applic... | <commit_before># -*- coding: utf-8 -*-
#
# Copyright 2013 - Noorul Islam K M
#
# 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... |
32994f27d1644415e8cd4a22f1b47d4938d3620c | fulfil_client/oauth.py | fulfil_client/oauth.py | from requests_oauthlib import OAuth2Session
class Session(OAuth2Session):
client_id = None
client_secret = None
def __init__(self, subdomain, **kwargs):
client_id = self.client_id
client_secret = self.client_secret
self.fulfil_subdomain = subdomain
if not (client_id and c... | from requests_oauthlib import OAuth2Session
class Session(OAuth2Session):
client_id = None
client_secret = None
def __init__(self, subdomain, **kwargs):
client_id = self.client_id
client_secret = self.client_secret
self.fulfil_subdomain = subdomain
if not (client_id and c... | Add provision to pass extra args in auth url | Add provision to pass extra args in auth url
| Python | isc | fulfilio/fulfil-python-api,sharoonthomas/fulfil-python-api | from requests_oauthlib import OAuth2Session
class Session(OAuth2Session):
client_id = None
client_secret = None
def __init__(self, subdomain, **kwargs):
client_id = self.client_id
client_secret = self.client_secret
self.fulfil_subdomain = subdomain
if not (client_id and c... | from requests_oauthlib import OAuth2Session
class Session(OAuth2Session):
client_id = None
client_secret = None
def __init__(self, subdomain, **kwargs):
client_id = self.client_id
client_secret = self.client_secret
self.fulfil_subdomain = subdomain
if not (client_id and c... | <commit_before>from requests_oauthlib import OAuth2Session
class Session(OAuth2Session):
client_id = None
client_secret = None
def __init__(self, subdomain, **kwargs):
client_id = self.client_id
client_secret = self.client_secret
self.fulfil_subdomain = subdomain
if not (... | from requests_oauthlib import OAuth2Session
class Session(OAuth2Session):
client_id = None
client_secret = None
def __init__(self, subdomain, **kwargs):
client_id = self.client_id
client_secret = self.client_secret
self.fulfil_subdomain = subdomain
if not (client_id and c... | from requests_oauthlib import OAuth2Session
class Session(OAuth2Session):
client_id = None
client_secret = None
def __init__(self, subdomain, **kwargs):
client_id = self.client_id
client_secret = self.client_secret
self.fulfil_subdomain = subdomain
if not (client_id and c... | <commit_before>from requests_oauthlib import OAuth2Session
class Session(OAuth2Session):
client_id = None
client_secret = None
def __init__(self, subdomain, **kwargs):
client_id = self.client_id
client_secret = self.client_secret
self.fulfil_subdomain = subdomain
if not (... |
c7d5a39fd21c2d5c9c5f8a2b88b5e09c98e9e776 | ovp_users/emails.py | ovp_users/emails.py | from ovp_core.emails import BaseMail
class UserMail(BaseMail):
"""
This class is responsible for firing emails for Users
"""
def __init__(self, user, async_mail=None):
super(UserMail, self).__init__(user.email, async_mail)
def sendWelcome(self, context={}):
"""
Sent when user registers
"""
... | from ovp_core.emails import BaseMail
class UserMail(BaseMail):
"""
This class is responsible for firing emails for Users
"""
def __init__(self, user, async_mail=None):
super(UserMail, self).__init__(user.email, async_mail)
def sendWelcome(self, context={}):
"""
Sent when user registers
"""
... | Revert "pass 'user_email' on sendRecoveryToken's context" | Revert "pass 'user_email' on sendRecoveryToken's context"
This info is already sent as 'email' on context. This reverts commit a366c2ed02cd7dda54607fe5e6a317603d442b47.
| Python | agpl-3.0 | OpenVolunteeringPlatform/django-ovp-users,OpenVolunteeringPlatform/django-ovp-users | from ovp_core.emails import BaseMail
class UserMail(BaseMail):
"""
This class is responsible for firing emails for Users
"""
def __init__(self, user, async_mail=None):
super(UserMail, self).__init__(user.email, async_mail)
def sendWelcome(self, context={}):
"""
Sent when user registers
"""
... | from ovp_core.emails import BaseMail
class UserMail(BaseMail):
"""
This class is responsible for firing emails for Users
"""
def __init__(self, user, async_mail=None):
super(UserMail, self).__init__(user.email, async_mail)
def sendWelcome(self, context={}):
"""
Sent when user registers
"""
... | <commit_before>from ovp_core.emails import BaseMail
class UserMail(BaseMail):
"""
This class is responsible for firing emails for Users
"""
def __init__(self, user, async_mail=None):
super(UserMail, self).__init__(user.email, async_mail)
def sendWelcome(self, context={}):
"""
Sent when user regi... | from ovp_core.emails import BaseMail
class UserMail(BaseMail):
"""
This class is responsible for firing emails for Users
"""
def __init__(self, user, async_mail=None):
super(UserMail, self).__init__(user.email, async_mail)
def sendWelcome(self, context={}):
"""
Sent when user registers
"""
... | from ovp_core.emails import BaseMail
class UserMail(BaseMail):
"""
This class is responsible for firing emails for Users
"""
def __init__(self, user, async_mail=None):
super(UserMail, self).__init__(user.email, async_mail)
def sendWelcome(self, context={}):
"""
Sent when user registers
"""
... | <commit_before>from ovp_core.emails import BaseMail
class UserMail(BaseMail):
"""
This class is responsible for firing emails for Users
"""
def __init__(self, user, async_mail=None):
super(UserMail, self).__init__(user.email, async_mail)
def sendWelcome(self, context={}):
"""
Sent when user regi... |
387ca6153d0f584f3caf27add6cf01d1da081fc3 | plasmapy/physics/__init__.py | plasmapy/physics/__init__.py | # 'physics' is a tentative name for this subpackage. Another
# possibility is 'plasma'. The organization is to be decided by v0.1.
from .parameters import Alfven_speed, ion_sound_speed, thermal_speed, kappa_thermal_speed, gyrofrequency, gyroradius, plasma_frequency, Debye_length, Debye_number, inertial_length, magne... | # 'physics' is a tentative name for this subpackage. Another
# possibility is 'plasma'. The organization is to be decided by v0.1.
from .parameters import Alfven_speed, ion_sound_speed, thermal_speed, kappa_thermal_speed, gyrofrequency, gyroradius, plasma_frequency, Debye_length, Debye_number, inertial_length, magne... | Add classical_transport to init file | Add classical_transport to init file
| Python | bsd-3-clause | StanczakDominik/PlasmaPy | # 'physics' is a tentative name for this subpackage. Another
# possibility is 'plasma'. The organization is to be decided by v0.1.
from .parameters import Alfven_speed, ion_sound_speed, thermal_speed, kappa_thermal_speed, gyrofrequency, gyroradius, plasma_frequency, Debye_length, Debye_number, inertial_length, magne... | # 'physics' is a tentative name for this subpackage. Another
# possibility is 'plasma'. The organization is to be decided by v0.1.
from .parameters import Alfven_speed, ion_sound_speed, thermal_speed, kappa_thermal_speed, gyrofrequency, gyroradius, plasma_frequency, Debye_length, Debye_number, inertial_length, magne... | <commit_before># 'physics' is a tentative name for this subpackage. Another
# possibility is 'plasma'. The organization is to be decided by v0.1.
from .parameters import Alfven_speed, ion_sound_speed, thermal_speed, kappa_thermal_speed, gyrofrequency, gyroradius, plasma_frequency, Debye_length, Debye_number, inertia... | # 'physics' is a tentative name for this subpackage. Another
# possibility is 'plasma'. The organization is to be decided by v0.1.
from .parameters import Alfven_speed, ion_sound_speed, thermal_speed, kappa_thermal_speed, gyrofrequency, gyroradius, plasma_frequency, Debye_length, Debye_number, inertial_length, magne... | # 'physics' is a tentative name for this subpackage. Another
# possibility is 'plasma'. The organization is to be decided by v0.1.
from .parameters import Alfven_speed, ion_sound_speed, thermal_speed, kappa_thermal_speed, gyrofrequency, gyroradius, plasma_frequency, Debye_length, Debye_number, inertial_length, magne... | <commit_before># 'physics' is a tentative name for this subpackage. Another
# possibility is 'plasma'. The organization is to be decided by v0.1.
from .parameters import Alfven_speed, ion_sound_speed, thermal_speed, kappa_thermal_speed, gyrofrequency, gyroradius, plasma_frequency, Debye_length, Debye_number, inertia... |
2d45775e3823cf5a27df92350cbc89963aecc84c | gym/envs/tests/test_registration.py | gym/envs/tests/test_registration.py | # -*- coding: utf-8 -*-
from gym import error, envs
from gym.envs import registration
from gym.envs.classic_control import cartpole
def test_make():
env = envs.make('CartPole-v0')
assert env.spec.id == 'CartPole-v0'
assert isinstance(env, cartpole.CartPoleEnv)
def test_make_deprecated():
try:
... | # -*- coding: utf-8 -*-
from gym import error, envs
from gym.envs import registration
from gym.envs.classic_control import cartpole
def test_make():
env = envs.make('CartPole-v0')
assert env.spec.id == 'CartPole-v0'
assert isinstance(env, cartpole.CartPoleEnv)
def test_make_deprecated():
try:
... | Fix broken registration test to handle new DeprecatedEnv error | Fix broken registration test to handle new DeprecatedEnv error
| Python | mit | d1hotpep/openai_gym,d1hotpep/openai_gym,dianchen96/gym,machinaut/gym,Farama-Foundation/Gymnasium,machinaut/gym,dianchen96/gym,Farama-Foundation/Gymnasium | # -*- coding: utf-8 -*-
from gym import error, envs
from gym.envs import registration
from gym.envs.classic_control import cartpole
def test_make():
env = envs.make('CartPole-v0')
assert env.spec.id == 'CartPole-v0'
assert isinstance(env, cartpole.CartPoleEnv)
def test_make_deprecated():
try:
... | # -*- coding: utf-8 -*-
from gym import error, envs
from gym.envs import registration
from gym.envs.classic_control import cartpole
def test_make():
env = envs.make('CartPole-v0')
assert env.spec.id == 'CartPole-v0'
assert isinstance(env, cartpole.CartPoleEnv)
def test_make_deprecated():
try:
... | <commit_before># -*- coding: utf-8 -*-
from gym import error, envs
from gym.envs import registration
from gym.envs.classic_control import cartpole
def test_make():
env = envs.make('CartPole-v0')
assert env.spec.id == 'CartPole-v0'
assert isinstance(env, cartpole.CartPoleEnv)
def test_make_deprecated():
... | # -*- coding: utf-8 -*-
from gym import error, envs
from gym.envs import registration
from gym.envs.classic_control import cartpole
def test_make():
env = envs.make('CartPole-v0')
assert env.spec.id == 'CartPole-v0'
assert isinstance(env, cartpole.CartPoleEnv)
def test_make_deprecated():
try:
... | # -*- coding: utf-8 -*-
from gym import error, envs
from gym.envs import registration
from gym.envs.classic_control import cartpole
def test_make():
env = envs.make('CartPole-v0')
assert env.spec.id == 'CartPole-v0'
assert isinstance(env, cartpole.CartPoleEnv)
def test_make_deprecated():
try:
... | <commit_before># -*- coding: utf-8 -*-
from gym import error, envs
from gym.envs import registration
from gym.envs.classic_control import cartpole
def test_make():
env = envs.make('CartPole-v0')
assert env.spec.id == 'CartPole-v0'
assert isinstance(env, cartpole.CartPoleEnv)
def test_make_deprecated():
... |
7599f60a0e64f1d1d076695af67a212be751a89b | tests/rules_tests/grammarManipulation_tests/InactiveRulesTest.py | tests/rules_tests/grammarManipulation_tests/InactiveRulesTest.py | #!/usr/bin/env python
"""
:Author Patrik Valkovic
:Created 23.06.2017 16:39
:Licence GNUv3
Part of grammpy
"""
from unittest import main, TestCase
from grammpy import Grammar, Nonterminal, Rule as _R
from ..grammar import *
class InactiveRulesTest(TestCase):
def __init__(self, *args):
super().__init__(*... | #!/usr/bin/env python
"""
:Author Patrik Valkovic
:Created 23.06.2017 16:39
:Licence GNUv3
Part of grammpy
"""
from unittest import main, TestCase
from grammpy import Grammar, Nonterminal, Rule as _R
from ..grammar import *
class InactiveRulesTest(TestCase):
def __init__(self, *args):
super().__init__(*... | Add test when rule with inactive is passed | Add test when rule with inactive is passed
| Python | mit | PatrikValkovic/grammpy | #!/usr/bin/env python
"""
:Author Patrik Valkovic
:Created 23.06.2017 16:39
:Licence GNUv3
Part of grammpy
"""
from unittest import main, TestCase
from grammpy import Grammar, Nonterminal, Rule as _R
from ..grammar import *
class InactiveRulesTest(TestCase):
def __init__(self, *args):
super().__init__(*... | #!/usr/bin/env python
"""
:Author Patrik Valkovic
:Created 23.06.2017 16:39
:Licence GNUv3
Part of grammpy
"""
from unittest import main, TestCase
from grammpy import Grammar, Nonterminal, Rule as _R
from ..grammar import *
class InactiveRulesTest(TestCase):
def __init__(self, *args):
super().__init__(*... | <commit_before>#!/usr/bin/env python
"""
:Author Patrik Valkovic
:Created 23.06.2017 16:39
:Licence GNUv3
Part of grammpy
"""
from unittest import main, TestCase
from grammpy import Grammar, Nonterminal, Rule as _R
from ..grammar import *
class InactiveRulesTest(TestCase):
def __init__(self, *args):
sup... | #!/usr/bin/env python
"""
:Author Patrik Valkovic
:Created 23.06.2017 16:39
:Licence GNUv3
Part of grammpy
"""
from unittest import main, TestCase
from grammpy import Grammar, Nonterminal, Rule as _R
from ..grammar import *
class InactiveRulesTest(TestCase):
def __init__(self, *args):
super().__init__(*... | #!/usr/bin/env python
"""
:Author Patrik Valkovic
:Created 23.06.2017 16:39
:Licence GNUv3
Part of grammpy
"""
from unittest import main, TestCase
from grammpy import Grammar, Nonterminal, Rule as _R
from ..grammar import *
class InactiveRulesTest(TestCase):
def __init__(self, *args):
super().__init__(*... | <commit_before>#!/usr/bin/env python
"""
:Author Patrik Valkovic
:Created 23.06.2017 16:39
:Licence GNUv3
Part of grammpy
"""
from unittest import main, TestCase
from grammpy import Grammar, Nonterminal, Rule as _R
from ..grammar import *
class InactiveRulesTest(TestCase):
def __init__(self, *args):
sup... |
1370018ac3f96a5a04d119afa95d482a7504119e | IPython/utils/dir2.py | IPython/utils/dir2.py | # encoding: utf-8
"""A fancy version of Python's builtin :func:`dir` function.
"""
#-----------------------------------------------------------------------------
# Copyright (C) 2008-2011 The IPython Development Team
#
# Distributed under the terms of the BSD License. The full license is in
# the file COPYING, di... | # encoding: utf-8
"""A fancy version of Python's builtin :func:`dir` function.
"""
#-----------------------------------------------------------------------------
# Copyright (C) 2008-2011 The IPython Development Team
#
# Distributed under the terms of the BSD License. The full license is in
# the file COPYING, di... | Remove mention of Traits (removed in e1ced0b3) | Remove mention of Traits (removed in e1ced0b3)
| Python | bsd-3-clause | ipython/ipython,ipython/ipython | # encoding: utf-8
"""A fancy version of Python's builtin :func:`dir` function.
"""
#-----------------------------------------------------------------------------
# Copyright (C) 2008-2011 The IPython Development Team
#
# Distributed under the terms of the BSD License. The full license is in
# the file COPYING, di... | # encoding: utf-8
"""A fancy version of Python's builtin :func:`dir` function.
"""
#-----------------------------------------------------------------------------
# Copyright (C) 2008-2011 The IPython Development Team
#
# Distributed under the terms of the BSD License. The full license is in
# the file COPYING, di... | <commit_before># encoding: utf-8
"""A fancy version of Python's builtin :func:`dir` function.
"""
#-----------------------------------------------------------------------------
# Copyright (C) 2008-2011 The IPython Development Team
#
# Distributed under the terms of the BSD License. The full license is in
# the f... | # encoding: utf-8
"""A fancy version of Python's builtin :func:`dir` function.
"""
#-----------------------------------------------------------------------------
# Copyright (C) 2008-2011 The IPython Development Team
#
# Distributed under the terms of the BSD License. The full license is in
# the file COPYING, di... | # encoding: utf-8
"""A fancy version of Python's builtin :func:`dir` function.
"""
#-----------------------------------------------------------------------------
# Copyright (C) 2008-2011 The IPython Development Team
#
# Distributed under the terms of the BSD License. The full license is in
# the file COPYING, di... | <commit_before># encoding: utf-8
"""A fancy version of Python's builtin :func:`dir` function.
"""
#-----------------------------------------------------------------------------
# Copyright (C) 2008-2011 The IPython Development Team
#
# Distributed under the terms of the BSD License. The full license is in
# the f... |
38a2a2d6a1e8307e1e0ed58769df7b77d2ef9355 | loom/tasks.py | loom/tasks.py | from fabric.api import *
import subprocess
__all__ = ['ssh', 'all', 'uptime', 'upgrade', 'restart']
@task
def all():
"""
Select all hosts
"""
env.hosts = []
for hosts in env.roledefs.values():
env.hosts.extend(hosts)
# remove dupes
env.hosts = list(set(env.hosts))
@task
def uptime... | from fabric.api import *
import subprocess
__all__ = ['ssh', 'all', 'uptime', 'upgrade', 'restart']
@task
def all():
"""
Select all hosts
"""
env.hosts = []
for hosts in env.roledefs.values():
env.hosts.extend(hosts)
# remove dupes
env.hosts = list(set(env.hosts))
@task
def uptime... | Remove "-y" flag from apt-get upgrade | Remove "-y" flag from apt-get upgrade
| Python | bsd-3-clause | nithinphilips/loom,bfirsh/loom,nithinphilips/loom,bfirsh/loom | from fabric.api import *
import subprocess
__all__ = ['ssh', 'all', 'uptime', 'upgrade', 'restart']
@task
def all():
"""
Select all hosts
"""
env.hosts = []
for hosts in env.roledefs.values():
env.hosts.extend(hosts)
# remove dupes
env.hosts = list(set(env.hosts))
@task
def uptime... | from fabric.api import *
import subprocess
__all__ = ['ssh', 'all', 'uptime', 'upgrade', 'restart']
@task
def all():
"""
Select all hosts
"""
env.hosts = []
for hosts in env.roledefs.values():
env.hosts.extend(hosts)
# remove dupes
env.hosts = list(set(env.hosts))
@task
def uptime... | <commit_before>from fabric.api import *
import subprocess
__all__ = ['ssh', 'all', 'uptime', 'upgrade', 'restart']
@task
def all():
"""
Select all hosts
"""
env.hosts = []
for hosts in env.roledefs.values():
env.hosts.extend(hosts)
# remove dupes
env.hosts = list(set(env.hosts))
@... | from fabric.api import *
import subprocess
__all__ = ['ssh', 'all', 'uptime', 'upgrade', 'restart']
@task
def all():
"""
Select all hosts
"""
env.hosts = []
for hosts in env.roledefs.values():
env.hosts.extend(hosts)
# remove dupes
env.hosts = list(set(env.hosts))
@task
def uptime... | from fabric.api import *
import subprocess
__all__ = ['ssh', 'all', 'uptime', 'upgrade', 'restart']
@task
def all():
"""
Select all hosts
"""
env.hosts = []
for hosts in env.roledefs.values():
env.hosts.extend(hosts)
# remove dupes
env.hosts = list(set(env.hosts))
@task
def uptime... | <commit_before>from fabric.api import *
import subprocess
__all__ = ['ssh', 'all', 'uptime', 'upgrade', 'restart']
@task
def all():
"""
Select all hosts
"""
env.hosts = []
for hosts in env.roledefs.values():
env.hosts.extend(hosts)
# remove dupes
env.hosts = list(set(env.hosts))
@... |
e9541dbd1959b7a2ad1ee9145d3168c5898fe204 | python/generate_sorl_xml.py | python/generate_sorl_xml.py | #!/usr/bin/env python3
import sys
from message import Message
from persistence import Persistence
from const import XML_FILE_EXTENSION
message = Persistence.get_message_from_file(sys.argv[1])
if (message is not None):
Persistence.message_to_solr_xml(message, sys.argv[2] + message.identifier + XML_FILE_EXTENSION... | #!/usr/bin/env python3
import sys
from document import Document
from persistence import Persistence
from const import XML_FILE_EXTENSION
document = Persistence.get_document_from_file(sys.argv[1])
if (document is not None):
Persistence.document_to_solr_xml(document, sys.argv[2] + document.identifier + XML_FILE_E... | Fix wrong naming in generate...py | Fix wrong naming in generate...py
Signed-off-by: Fabio Benigno <[email protected]>
| Python | apache-2.0 | fpbfabio/newsgroups1000s,fpbfabio/dblp_data_processing | #!/usr/bin/env python3
import sys
from message import Message
from persistence import Persistence
from const import XML_FILE_EXTENSION
message = Persistence.get_message_from_file(sys.argv[1])
if (message is not None):
Persistence.message_to_solr_xml(message, sys.argv[2] + message.identifier + XML_FILE_EXTENSION... | #!/usr/bin/env python3
import sys
from document import Document
from persistence import Persistence
from const import XML_FILE_EXTENSION
document = Persistence.get_document_from_file(sys.argv[1])
if (document is not None):
Persistence.document_to_solr_xml(document, sys.argv[2] + document.identifier + XML_FILE_E... | <commit_before>#!/usr/bin/env python3
import sys
from message import Message
from persistence import Persistence
from const import XML_FILE_EXTENSION
message = Persistence.get_message_from_file(sys.argv[1])
if (message is not None):
Persistence.message_to_solr_xml(message, sys.argv[2] + message.identifier + XML... | #!/usr/bin/env python3
import sys
from document import Document
from persistence import Persistence
from const import XML_FILE_EXTENSION
document = Persistence.get_document_from_file(sys.argv[1])
if (document is not None):
Persistence.document_to_solr_xml(document, sys.argv[2] + document.identifier + XML_FILE_E... | #!/usr/bin/env python3
import sys
from message import Message
from persistence import Persistence
from const import XML_FILE_EXTENSION
message = Persistence.get_message_from_file(sys.argv[1])
if (message is not None):
Persistence.message_to_solr_xml(message, sys.argv[2] + message.identifier + XML_FILE_EXTENSION... | <commit_before>#!/usr/bin/env python3
import sys
from message import Message
from persistence import Persistence
from const import XML_FILE_EXTENSION
message = Persistence.get_message_from_file(sys.argv[1])
if (message is not None):
Persistence.message_to_solr_xml(message, sys.argv[2] + message.identifier + XML... |
76afe0ef2f45ff7ff62dd5ea4d1217ce794770ba | us_ignite/snippets/management/commands/snippets_load_fixtures.py | us_ignite/snippets/management/commands/snippets_load_fixtures.py | from django.core.management.base import BaseCommand
from us_ignite.snippets.models import Snippet
FIXTURES = [
{
'slug': 'home-box',
'name': 'UP NEXT: LOREM IPSUM',
'body': '',
'url_text': 'GET INVOLVED',
'url': '',
},
{
'slug': 'featured',
'name': ... | from django.core.management.base import BaseCommand
from us_ignite.snippets.models import Snippet
FIXTURES = [
{
'slug': 'home-box',
'name': 'UP NEXT: LOREM IPSUM',
'body': '',
'url_text': 'GET INVOLVED',
'url': '',
},
{
'slug': 'featured',
'name': ... | Load initial fixture for the welcome email. | Load initial fixture for the welcome email.
https://github.com/madewithbytes/us_ignite/issues/172
| Python | bsd-3-clause | us-ignite/us_ignite,us-ignite/us_ignite,us-ignite/us_ignite,us-ignite/us_ignite,us-ignite/us_ignite | from django.core.management.base import BaseCommand
from us_ignite.snippets.models import Snippet
FIXTURES = [
{
'slug': 'home-box',
'name': 'UP NEXT: LOREM IPSUM',
'body': '',
'url_text': 'GET INVOLVED',
'url': '',
},
{
'slug': 'featured',
'name': ... | from django.core.management.base import BaseCommand
from us_ignite.snippets.models import Snippet
FIXTURES = [
{
'slug': 'home-box',
'name': 'UP NEXT: LOREM IPSUM',
'body': '',
'url_text': 'GET INVOLVED',
'url': '',
},
{
'slug': 'featured',
'name': ... | <commit_before>from django.core.management.base import BaseCommand
from us_ignite.snippets.models import Snippet
FIXTURES = [
{
'slug': 'home-box',
'name': 'UP NEXT: LOREM IPSUM',
'body': '',
'url_text': 'GET INVOLVED',
'url': '',
},
{
'slug': 'featured',
... | from django.core.management.base import BaseCommand
from us_ignite.snippets.models import Snippet
FIXTURES = [
{
'slug': 'home-box',
'name': 'UP NEXT: LOREM IPSUM',
'body': '',
'url_text': 'GET INVOLVED',
'url': '',
},
{
'slug': 'featured',
'name': ... | from django.core.management.base import BaseCommand
from us_ignite.snippets.models import Snippet
FIXTURES = [
{
'slug': 'home-box',
'name': 'UP NEXT: LOREM IPSUM',
'body': '',
'url_text': 'GET INVOLVED',
'url': '',
},
{
'slug': 'featured',
'name': ... | <commit_before>from django.core.management.base import BaseCommand
from us_ignite.snippets.models import Snippet
FIXTURES = [
{
'slug': 'home-box',
'name': 'UP NEXT: LOREM IPSUM',
'body': '',
'url_text': 'GET INVOLVED',
'url': '',
},
{
'slug': 'featured',
... |
b8386212826701131e3c5aaaadef726df97f6646 | api/serializers.py | api/serializers.py | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.contrib.auth.models import User
from rest_framework import serializers
from core.models import Timesheet, Task, Entry
class UserSerializer(serializers.HyperlinkedModelSerializer):
class Meta:
model = User
fields = ('id'... | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.contrib.auth.models import User
from rest_framework import serializers
from core.models import Timesheet, Task, Entry
class UserSerializer(serializers.HyperlinkedModelSerializer):
class Meta:
model = User
fields = ('id'... | Add complete field to task and timesheet api | Add complete field to task and timesheet api
| Python | bsd-2-clause | Leahelisabeth/timestrap,overshard/timestrap,cdubz/timestrap,Leahelisabeth/timestrap,overshard/timestrap,muhleder/timestrap,Leahelisabeth/timestrap,cdubz/timestrap,overshard/timestrap,muhleder/timestrap,cdubz/timestrap,muhleder/timestrap,Leahelisabeth/timestrap | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.contrib.auth.models import User
from rest_framework import serializers
from core.models import Timesheet, Task, Entry
class UserSerializer(serializers.HyperlinkedModelSerializer):
class Meta:
model = User
fields = ('id'... | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.contrib.auth.models import User
from rest_framework import serializers
from core.models import Timesheet, Task, Entry
class UserSerializer(serializers.HyperlinkedModelSerializer):
class Meta:
model = User
fields = ('id'... | <commit_before># -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.contrib.auth.models import User
from rest_framework import serializers
from core.models import Timesheet, Task, Entry
class UserSerializer(serializers.HyperlinkedModelSerializer):
class Meta:
model = User
... | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.contrib.auth.models import User
from rest_framework import serializers
from core.models import Timesheet, Task, Entry
class UserSerializer(serializers.HyperlinkedModelSerializer):
class Meta:
model = User
fields = ('id'... | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.contrib.auth.models import User
from rest_framework import serializers
from core.models import Timesheet, Task, Entry
class UserSerializer(serializers.HyperlinkedModelSerializer):
class Meta:
model = User
fields = ('id'... | <commit_before># -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.contrib.auth.models import User
from rest_framework import serializers
from core.models import Timesheet, Task, Entry
class UserSerializer(serializers.HyperlinkedModelSerializer):
class Meta:
model = User
... |
ffb42ba8e9b0a5d7a269ee9d13a5347f4ffee563 | mama_cas/tests/test_callbacks.py | mama_cas/tests/test_callbacks.py | from django.test import TestCase
from .factories import UserFactory
from mama_cas.callbacks import user_model_attributes
from mama_cas.callbacks import user_name_attributes
class CallbacksTests(TestCase):
url = 'http://www.example.com/'
def setUp(self):
self.user = UserFactory()
def test_user_n... | from django.test import TestCase
from .factories import UserFactory
from mama_cas.callbacks import user_model_attributes
from mama_cas.callbacks import user_name_attributes
class CallbacksTests(TestCase):
def setUp(self):
self.user = UserFactory()
def test_user_name_attributes(self):
"""
... | Test short_name for user name attributes callback | Test short_name for user name attributes callback
| Python | bsd-3-clause | jbittel/django-mama-cas,orbitvu/django-mama-cas,orbitvu/django-mama-cas,jbittel/django-mama-cas | from django.test import TestCase
from .factories import UserFactory
from mama_cas.callbacks import user_model_attributes
from mama_cas.callbacks import user_name_attributes
class CallbacksTests(TestCase):
url = 'http://www.example.com/'
def setUp(self):
self.user = UserFactory()
def test_user_n... | from django.test import TestCase
from .factories import UserFactory
from mama_cas.callbacks import user_model_attributes
from mama_cas.callbacks import user_name_attributes
class CallbacksTests(TestCase):
def setUp(self):
self.user = UserFactory()
def test_user_name_attributes(self):
"""
... | <commit_before>from django.test import TestCase
from .factories import UserFactory
from mama_cas.callbacks import user_model_attributes
from mama_cas.callbacks import user_name_attributes
class CallbacksTests(TestCase):
url = 'http://www.example.com/'
def setUp(self):
self.user = UserFactory()
... | from django.test import TestCase
from .factories import UserFactory
from mama_cas.callbacks import user_model_attributes
from mama_cas.callbacks import user_name_attributes
class CallbacksTests(TestCase):
def setUp(self):
self.user = UserFactory()
def test_user_name_attributes(self):
"""
... | from django.test import TestCase
from .factories import UserFactory
from mama_cas.callbacks import user_model_attributes
from mama_cas.callbacks import user_name_attributes
class CallbacksTests(TestCase):
url = 'http://www.example.com/'
def setUp(self):
self.user = UserFactory()
def test_user_n... | <commit_before>from django.test import TestCase
from .factories import UserFactory
from mama_cas.callbacks import user_model_attributes
from mama_cas.callbacks import user_name_attributes
class CallbacksTests(TestCase):
url = 'http://www.example.com/'
def setUp(self):
self.user = UserFactory()
... |
8c0d1acf6ea41adc3743a4e190eaf777188282c0 | nova/policies/floating_ip_pools.py | nova/policies/floating_ip_pools.py | # Copyright 2016 Cloudbase Solutions Srl
# 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 r... | # Copyright 2016 Cloudbase Solutions Srl
# 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 r... | Introduce scope_types in FIP pools | Introduce scope_types in FIP pools
Appropriate scope_type for nova case:
- https://specs.openstack.org/openstack/nova-specs/specs/ussuri/approved/policy-defaults-refresh.html#scope
This commit introduce scope_type for FIP pools policies
as 'system' and 'project'
Partial implement blueprint policy-defaults-refresh-de... | Python | apache-2.0 | mahak/nova,mahak/nova,klmitch/nova,openstack/nova,klmitch/nova,openstack/nova,mahak/nova,klmitch/nova,openstack/nova,klmitch/nova | # Copyright 2016 Cloudbase Solutions Srl
# 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 r... | # Copyright 2016 Cloudbase Solutions Srl
# 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 r... | <commit_before># Copyright 2016 Cloudbase Solutions Srl
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
... | # Copyright 2016 Cloudbase Solutions Srl
# 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 r... | # Copyright 2016 Cloudbase Solutions Srl
# 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 r... | <commit_before># Copyright 2016 Cloudbase Solutions Srl
# 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
... |
67c6ecff4d5c65cd5b919bb1316f188bc6ab1098 | tests/python_tests/test_core_device.py | tests/python_tests/test_core_device.py | import pytest
import xchainer
def test_device():
device = xchainer.get_current_device()
xchainer.set_current_device('cpu')
assert str(xchainer.get_current_device()) == '<Device cpu>'
xchainer.set_current_device('cuda')
assert str(xchainer.get_current_device()) == '<Device cuda>'
with pytes... | import pytest
import xchainer
def test_device():
cpu1 = xchainer.Device('cpu')
cpu2 = xchainer.Device('cpu')
cuda = xchainer.Device('cuda')
assert cpu1 == cpu2
assert not (cpu1 != cpu2)
assert not (cpu1 == cuda)
assert cpu1 != cuda
with pytest.raises(xchainer.DeviceError):
xc... | Add tests for python device | Add tests for python device
| Python | mit | okuta/chainer,keisuke-umezawa/chainer,chainer/chainer,ktnyt/chainer,ktnyt/chainer,ktnyt/chainer,wkentaro/chainer,hvy/chainer,jnishi/chainer,okuta/chainer,hvy/chainer,pfnet/chainer,niboshi/chainer,niboshi/chainer,wkentaro/chainer,hvy/chainer,tkerola/chainer,jnishi/chainer,niboshi/chainer,jnishi/chainer,keisuke-umezawa/c... | import pytest
import xchainer
def test_device():
device = xchainer.get_current_device()
xchainer.set_current_device('cpu')
assert str(xchainer.get_current_device()) == '<Device cpu>'
xchainer.set_current_device('cuda')
assert str(xchainer.get_current_device()) == '<Device cuda>'
with pytes... | import pytest
import xchainer
def test_device():
cpu1 = xchainer.Device('cpu')
cpu2 = xchainer.Device('cpu')
cuda = xchainer.Device('cuda')
assert cpu1 == cpu2
assert not (cpu1 != cpu2)
assert not (cpu1 == cuda)
assert cpu1 != cuda
with pytest.raises(xchainer.DeviceError):
xc... | <commit_before>import pytest
import xchainer
def test_device():
device = xchainer.get_current_device()
xchainer.set_current_device('cpu')
assert str(xchainer.get_current_device()) == '<Device cpu>'
xchainer.set_current_device('cuda')
assert str(xchainer.get_current_device()) == '<Device cuda>'
... | import pytest
import xchainer
def test_device():
cpu1 = xchainer.Device('cpu')
cpu2 = xchainer.Device('cpu')
cuda = xchainer.Device('cuda')
assert cpu1 == cpu2
assert not (cpu1 != cpu2)
assert not (cpu1 == cuda)
assert cpu1 != cuda
with pytest.raises(xchainer.DeviceError):
xc... | import pytest
import xchainer
def test_device():
device = xchainer.get_current_device()
xchainer.set_current_device('cpu')
assert str(xchainer.get_current_device()) == '<Device cpu>'
xchainer.set_current_device('cuda')
assert str(xchainer.get_current_device()) == '<Device cuda>'
with pytes... | <commit_before>import pytest
import xchainer
def test_device():
device = xchainer.get_current_device()
xchainer.set_current_device('cpu')
assert str(xchainer.get_current_device()) == '<Device cpu>'
xchainer.set_current_device('cuda')
assert str(xchainer.get_current_device()) == '<Device cuda>'
... |
6dea14c3b8d0d607fa5d9e4adbbd8d07d41cd272 | procurement_purchase_no_grouping/__manifest__.py | procurement_purchase_no_grouping/__manifest__.py | # Copyright 2015 AvanzOsc (http://www.avanzosc.es)
# Copyright 2015-2017 Tecnativa - Pedro M. Baeza
# Copyright 2018 Tecnativa - Carlos Dauden
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl)
{
"name": "Procurement Purchase No Grouping",
"version": "13.0.1.0.1",
"author": "AvanzOSC," "Tecnati... | # Copyright 2015 AvanzOsc (http://www.avanzosc.es)
# Copyright 2015-2017 Tecnativa - Pedro M. Baeza
# Copyright 2018 Tecnativa - Carlos Dauden
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl)
{
"name": "Procurement Purchase No Grouping",
"version": "13.0.1.0.1",
"author": "AvanzOSC, Tecnativa... | Delete empty " " spaces in same string line | [FIX] Delete empty " " spaces in same string line
| Python | agpl-3.0 | OCA/purchase-workflow,OCA/purchase-workflow | # Copyright 2015 AvanzOsc (http://www.avanzosc.es)
# Copyright 2015-2017 Tecnativa - Pedro M. Baeza
# Copyright 2018 Tecnativa - Carlos Dauden
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl)
{
"name": "Procurement Purchase No Grouping",
"version": "13.0.1.0.1",
"author": "AvanzOSC," "Tecnati... | # Copyright 2015 AvanzOsc (http://www.avanzosc.es)
# Copyright 2015-2017 Tecnativa - Pedro M. Baeza
# Copyright 2018 Tecnativa - Carlos Dauden
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl)
{
"name": "Procurement Purchase No Grouping",
"version": "13.0.1.0.1",
"author": "AvanzOSC, Tecnativa... | <commit_before># Copyright 2015 AvanzOsc (http://www.avanzosc.es)
# Copyright 2015-2017 Tecnativa - Pedro M. Baeza
# Copyright 2018 Tecnativa - Carlos Dauden
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl)
{
"name": "Procurement Purchase No Grouping",
"version": "13.0.1.0.1",
"author": "Avan... | # Copyright 2015 AvanzOsc (http://www.avanzosc.es)
# Copyright 2015-2017 Tecnativa - Pedro M. Baeza
# Copyright 2018 Tecnativa - Carlos Dauden
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl)
{
"name": "Procurement Purchase No Grouping",
"version": "13.0.1.0.1",
"author": "AvanzOSC, Tecnativa... | # Copyright 2015 AvanzOsc (http://www.avanzosc.es)
# Copyright 2015-2017 Tecnativa - Pedro M. Baeza
# Copyright 2018 Tecnativa - Carlos Dauden
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl)
{
"name": "Procurement Purchase No Grouping",
"version": "13.0.1.0.1",
"author": "AvanzOSC," "Tecnati... | <commit_before># Copyright 2015 AvanzOsc (http://www.avanzosc.es)
# Copyright 2015-2017 Tecnativa - Pedro M. Baeza
# Copyright 2018 Tecnativa - Carlos Dauden
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl)
{
"name": "Procurement Purchase No Grouping",
"version": "13.0.1.0.1",
"author": "Avan... |
3c798673cfb5f7e63e2aebb300ba7cc92c72fa8a | aggregator/base.py | aggregator/base.py | from abc import ABCMeta, abstractmethod
import requests
from bs4 import BeautifulSoup
def make_soup(url):
response = requests.get(url)
soup = BeautifulSoup(response.text, 'html.parser')
return soup
class Aggregator(metaclass=ABCMeta):
base_url = ''
@abstractmethod
def extract(self):
pass
@abstractm... | import collections
from abc import ABCMeta, abstractmethod
import requests
from bs4 import BeautifulSoup
Article = collections.namedtuple('Article', ['source', 'title', 'url', 'author',
'date_published'])
def make_soup(url):
response = requests.get(url)
soup = BeautifulSoup(response.text, 'html.par... | Define new abstract methods and namedtuple | Define new abstract methods and namedtuple
| Python | apache-2.0 | footynews/fn_backend | from abc import ABCMeta, abstractmethod
import requests
from bs4 import BeautifulSoup
def make_soup(url):
response = requests.get(url)
soup = BeautifulSoup(response.text, 'html.parser')
return soup
class Aggregator(metaclass=ABCMeta):
base_url = ''
@abstractmethod
def extract(self):
pass
@abstractm... | import collections
from abc import ABCMeta, abstractmethod
import requests
from bs4 import BeautifulSoup
Article = collections.namedtuple('Article', ['source', 'title', 'url', 'author',
'date_published'])
def make_soup(url):
response = requests.get(url)
soup = BeautifulSoup(response.text, 'html.par... | <commit_before>from abc import ABCMeta, abstractmethod
import requests
from bs4 import BeautifulSoup
def make_soup(url):
response = requests.get(url)
soup = BeautifulSoup(response.text, 'html.parser')
return soup
class Aggregator(metaclass=ABCMeta):
base_url = ''
@abstractmethod
def extract(self):
pa... | import collections
from abc import ABCMeta, abstractmethod
import requests
from bs4 import BeautifulSoup
Article = collections.namedtuple('Article', ['source', 'title', 'url', 'author',
'date_published'])
def make_soup(url):
response = requests.get(url)
soup = BeautifulSoup(response.text, 'html.par... | from abc import ABCMeta, abstractmethod
import requests
from bs4 import BeautifulSoup
def make_soup(url):
response = requests.get(url)
soup = BeautifulSoup(response.text, 'html.parser')
return soup
class Aggregator(metaclass=ABCMeta):
base_url = ''
@abstractmethod
def extract(self):
pass
@abstractm... | <commit_before>from abc import ABCMeta, abstractmethod
import requests
from bs4 import BeautifulSoup
def make_soup(url):
response = requests.get(url)
soup = BeautifulSoup(response.text, 'html.parser')
return soup
class Aggregator(metaclass=ABCMeta):
base_url = ''
@abstractmethod
def extract(self):
pa... |
9da3f2a835fa2aaba5d91ffe31b3fcaf8d83a4c9 | snake/main.py | snake/main.py | import os
import sys
from snake.core import Snake
SNAKEFILE_LOADED = False
def abort(msg):
print >> sys.stderr, "Error: %s" % msg
sys.exit(1)
def load_snakefile(path, fail_silently=False):
global SNAKEFILE_LOADED
if not SNAKEFILE_LOADED:
sys.path.insert(0, path)
try:
r... | import imp
import os
import sys
from snake.core import Snake
def abort(msg):
print >> sys.stderr, "Error: %s" % msg
sys.exit(1)
def get_ascending_paths(path):
paths = []
while True:
paths.append(path)
path, tail = os.path.split(path)
if not tail:
break
return ... | Improve the way snakefile loading works | Improve the way snakefile loading works
| Python | bsd-2-clause | yumike/snake | import os
import sys
from snake.core import Snake
SNAKEFILE_LOADED = False
def abort(msg):
print >> sys.stderr, "Error: %s" % msg
sys.exit(1)
def load_snakefile(path, fail_silently=False):
global SNAKEFILE_LOADED
if not SNAKEFILE_LOADED:
sys.path.insert(0, path)
try:
r... | import imp
import os
import sys
from snake.core import Snake
def abort(msg):
print >> sys.stderr, "Error: %s" % msg
sys.exit(1)
def get_ascending_paths(path):
paths = []
while True:
paths.append(path)
path, tail = os.path.split(path)
if not tail:
break
return ... | <commit_before>import os
import sys
from snake.core import Snake
SNAKEFILE_LOADED = False
def abort(msg):
print >> sys.stderr, "Error: %s" % msg
sys.exit(1)
def load_snakefile(path, fail_silently=False):
global SNAKEFILE_LOADED
if not SNAKEFILE_LOADED:
sys.path.insert(0, path)
try... | import imp
import os
import sys
from snake.core import Snake
def abort(msg):
print >> sys.stderr, "Error: %s" % msg
sys.exit(1)
def get_ascending_paths(path):
paths = []
while True:
paths.append(path)
path, tail = os.path.split(path)
if not tail:
break
return ... | import os
import sys
from snake.core import Snake
SNAKEFILE_LOADED = False
def abort(msg):
print >> sys.stderr, "Error: %s" % msg
sys.exit(1)
def load_snakefile(path, fail_silently=False):
global SNAKEFILE_LOADED
if not SNAKEFILE_LOADED:
sys.path.insert(0, path)
try:
r... | <commit_before>import os
import sys
from snake.core import Snake
SNAKEFILE_LOADED = False
def abort(msg):
print >> sys.stderr, "Error: %s" % msg
sys.exit(1)
def load_snakefile(path, fail_silently=False):
global SNAKEFILE_LOADED
if not SNAKEFILE_LOADED:
sys.path.insert(0, path)
try... |
b2239ab0329f129da21f3ab82eaf9543b95fc01b | pal/services/joke_service.py | pal/services/joke_service.py | import re
from pal.services.service import Service
from pal.services.service import wrap_response
class JokeService(Service):
_JOKES = {
'open the pod bay doors pal':
"I'm sorry, Jeff, I'm afraid I can't do that.",
'laws of robotics':
"1. A robot may not injure a human bei... | import re
from pal.services.service import Service
from pal.services.service import wrap_response
class JokeService(Service):
_JOKES = {
'pod bay doors':
"I'm sorry Jeff, I'm afraid I can't do that.",
'laws of robotics':
"1. A robot may not injure a human being or, through... | Add Waldo joke and simplify HAL joke | Add Waldo joke and simplify HAL joke
| Python | bsd-3-clause | Machyne/pal,Machyne/pal,Machyne/pal,Machyne/pal | import re
from pal.services.service import Service
from pal.services.service import wrap_response
class JokeService(Service):
_JOKES = {
'open the pod bay doors pal':
"I'm sorry, Jeff, I'm afraid I can't do that.",
'laws of robotics':
"1. A robot may not injure a human bei... | import re
from pal.services.service import Service
from pal.services.service import wrap_response
class JokeService(Service):
_JOKES = {
'pod bay doors':
"I'm sorry Jeff, I'm afraid I can't do that.",
'laws of robotics':
"1. A robot may not injure a human being or, through... | <commit_before>import re
from pal.services.service import Service
from pal.services.service import wrap_response
class JokeService(Service):
_JOKES = {
'open the pod bay doors pal':
"I'm sorry, Jeff, I'm afraid I can't do that.",
'laws of robotics':
"1. A robot may not inj... | import re
from pal.services.service import Service
from pal.services.service import wrap_response
class JokeService(Service):
_JOKES = {
'pod bay doors':
"I'm sorry Jeff, I'm afraid I can't do that.",
'laws of robotics':
"1. A robot may not injure a human being or, through... | import re
from pal.services.service import Service
from pal.services.service import wrap_response
class JokeService(Service):
_JOKES = {
'open the pod bay doors pal':
"I'm sorry, Jeff, I'm afraid I can't do that.",
'laws of robotics':
"1. A robot may not injure a human bei... | <commit_before>import re
from pal.services.service import Service
from pal.services.service import wrap_response
class JokeService(Service):
_JOKES = {
'open the pod bay doors pal':
"I'm sorry, Jeff, I'm afraid I can't do that.",
'laws of robotics':
"1. A robot may not inj... |
c046d7915c08221e4a84a01edf3ca08a27a931a8 | opps/api/urls.py | opps/api/urls.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from django.conf.urls import patterns, url
from piston.resource import Resource
from opps.containers.api import ContainerHandler, ContainerBoxHandler
container = Resource(handler=ContainerHandler)
containerbox = Resource(handler=ContainerBoxHandler)
urlpatterns = patte... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from django.conf.urls import patterns, url
from piston.resource import Resource
from opps.containers.api import ContainerHandler, ContainerBoxHandler
container = Resource(handler=ContainerHandler)
containerbox = Resource(handler=ContainerBoxHandler)
urlpatterns = patte... | Set emitter format json in api | Set emitter format json in api
| Python | mit | williamroot/opps,jeanmask/opps,williamroot/opps,opps/opps,jeanmask/opps,williamroot/opps,williamroot/opps,opps/opps,YACOWS/opps,YACOWS/opps,jeanmask/opps,opps/opps,YACOWS/opps,YACOWS/opps,jeanmask/opps,opps/opps | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from django.conf.urls import patterns, url
from piston.resource import Resource
from opps.containers.api import ContainerHandler, ContainerBoxHandler
container = Resource(handler=ContainerHandler)
containerbox = Resource(handler=ContainerBoxHandler)
urlpatterns = patte... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from django.conf.urls import patterns, url
from piston.resource import Resource
from opps.containers.api import ContainerHandler, ContainerBoxHandler
container = Resource(handler=ContainerHandler)
containerbox = Resource(handler=ContainerBoxHandler)
urlpatterns = patte... | <commit_before>#!/usr/bin/env python
# -*- coding: utf-8 -*-
from django.conf.urls import patterns, url
from piston.resource import Resource
from opps.containers.api import ContainerHandler, ContainerBoxHandler
container = Resource(handler=ContainerHandler)
containerbox = Resource(handler=ContainerBoxHandler)
urlp... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from django.conf.urls import patterns, url
from piston.resource import Resource
from opps.containers.api import ContainerHandler, ContainerBoxHandler
container = Resource(handler=ContainerHandler)
containerbox = Resource(handler=ContainerBoxHandler)
urlpatterns = patte... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from django.conf.urls import patterns, url
from piston.resource import Resource
from opps.containers.api import ContainerHandler, ContainerBoxHandler
container = Resource(handler=ContainerHandler)
containerbox = Resource(handler=ContainerBoxHandler)
urlpatterns = patte... | <commit_before>#!/usr/bin/env python
# -*- coding: utf-8 -*-
from django.conf.urls import patterns, url
from piston.resource import Resource
from opps.containers.api import ContainerHandler, ContainerBoxHandler
container = Resource(handler=ContainerHandler)
containerbox = Resource(handler=ContainerBoxHandler)
urlp... |
a18339c0d5ed9bbfcfc7b763d31a18c117a38069 | bed/record.py | bed/record.py | from __future__ import division
import time
import serial
import csv
from datetime import datetime as dt
DEBUG = True
def timestamp():
ts = dt.now()
return time.mktime(ts.timetuple())+(ts.microsecond/1e6)
bufsize = 1 if DEBUG else -1
with open('rec.csv', 'wa', bufsize) as f:
writer = csv.writer(f)
w... | from __future__ import division
import time
import serial
import csv
from datetime import datetime as dt
DEBUG = True
def timestamp():
ts = dt.now()
return time.mktime(ts.timetuple())+(ts.microsecond/1e6)
bufsize = 1 if DEBUG else -1
with open('db/rec.csv', 'wa', bufsize) as f:
writer = csv.writer(f)
... | Fix path to data file | Fix path to data file
| Python | mit | wonkoderverstaendige/telemetry,wonkoderverstaendige/telemetry,wonkoderverstaendige/telemetry | from __future__ import division
import time
import serial
import csv
from datetime import datetime as dt
DEBUG = True
def timestamp():
ts = dt.now()
return time.mktime(ts.timetuple())+(ts.microsecond/1e6)
bufsize = 1 if DEBUG else -1
with open('rec.csv', 'wa', bufsize) as f:
writer = csv.writer(f)
w... | from __future__ import division
import time
import serial
import csv
from datetime import datetime as dt
DEBUG = True
def timestamp():
ts = dt.now()
return time.mktime(ts.timetuple())+(ts.microsecond/1e6)
bufsize = 1 if DEBUG else -1
with open('db/rec.csv', 'wa', bufsize) as f:
writer = csv.writer(f)
... | <commit_before>from __future__ import division
import time
import serial
import csv
from datetime import datetime as dt
DEBUG = True
def timestamp():
ts = dt.now()
return time.mktime(ts.timetuple())+(ts.microsecond/1e6)
bufsize = 1 if DEBUG else -1
with open('rec.csv', 'wa', bufsize) as f:
writer = csv.... | from __future__ import division
import time
import serial
import csv
from datetime import datetime as dt
DEBUG = True
def timestamp():
ts = dt.now()
return time.mktime(ts.timetuple())+(ts.microsecond/1e6)
bufsize = 1 if DEBUG else -1
with open('db/rec.csv', 'wa', bufsize) as f:
writer = csv.writer(f)
... | from __future__ import division
import time
import serial
import csv
from datetime import datetime as dt
DEBUG = True
def timestamp():
ts = dt.now()
return time.mktime(ts.timetuple())+(ts.microsecond/1e6)
bufsize = 1 if DEBUG else -1
with open('rec.csv', 'wa', bufsize) as f:
writer = csv.writer(f)
w... | <commit_before>from __future__ import division
import time
import serial
import csv
from datetime import datetime as dt
DEBUG = True
def timestamp():
ts = dt.now()
return time.mktime(ts.timetuple())+(ts.microsecond/1e6)
bufsize = 1 if DEBUG else -1
with open('rec.csv', 'wa', bufsize) as f:
writer = csv.... |
5b2a63706d2f9d2853ba1f6ad8d1cf80f8c07676 | tohu/__init__.py | tohu/__init__.py | from .v4.base import *
from .v4.primitive_generators import *
from .v4.derived_generators import *
from .v4.dispatch_generators import *
from .v4.custom_generator import CustomGenerator
from .v4.logging import logger
from .v4.utils import print_generated_sequence
from .v4 import base
from .v4 import primitive_generator... | from distutils.version import StrictVersion
from platform import python_version
min_supported_python_version = '3.6'
if StrictVersion(python_version()) < StrictVersion(min_supported_python_version):
error_msg = (
"Tohu requires Python {min_supported_python_version} or greater to run "
"(currently ... | Check Python version at startup | Check Python version at startup
| Python | mit | maxalbert/tohu | from .v4.base import *
from .v4.primitive_generators import *
from .v4.derived_generators import *
from .v4.dispatch_generators import *
from .v4.custom_generator import CustomGenerator
from .v4.logging import logger
from .v4.utils import print_generated_sequence
from .v4 import base
from .v4 import primitive_generator... | from distutils.version import StrictVersion
from platform import python_version
min_supported_python_version = '3.6'
if StrictVersion(python_version()) < StrictVersion(min_supported_python_version):
error_msg = (
"Tohu requires Python {min_supported_python_version} or greater to run "
"(currently ... | <commit_before>from .v4.base import *
from .v4.primitive_generators import *
from .v4.derived_generators import *
from .v4.dispatch_generators import *
from .v4.custom_generator import CustomGenerator
from .v4.logging import logger
from .v4.utils import print_generated_sequence
from .v4 import base
from .v4 import prim... | from distutils.version import StrictVersion
from platform import python_version
min_supported_python_version = '3.6'
if StrictVersion(python_version()) < StrictVersion(min_supported_python_version):
error_msg = (
"Tohu requires Python {min_supported_python_version} or greater to run "
"(currently ... | from .v4.base import *
from .v4.primitive_generators import *
from .v4.derived_generators import *
from .v4.dispatch_generators import *
from .v4.custom_generator import CustomGenerator
from .v4.logging import logger
from .v4.utils import print_generated_sequence
from .v4 import base
from .v4 import primitive_generator... | <commit_before>from .v4.base import *
from .v4.primitive_generators import *
from .v4.derived_generators import *
from .v4.dispatch_generators import *
from .v4.custom_generator import CustomGenerator
from .v4.logging import logger
from .v4.utils import print_generated_sequence
from .v4 import base
from .v4 import prim... |
3bf41213abc7ddd8421e11c2149b536c255c13eb | pixpack/utils.py | pixpack/utils.py | #!/usr/bin/env python3
# utility.py
# PixPack Photo Organiser
# It contains some useful functions to increase user experience
import locale
import os
def sys_trans_var():
# check system language
sys_loc = locale.getlocale()
sys_lang = sys_loc[0] # system default language
if sys_lang == 'en_EN' or sys... | #!/usr/bin/env python3
# utility.py
# PixPack Photo Organiser
# It contains some useful functions to increase user experience
import locale
import os
def sys_trans_var():
# check system language
sys_loc = locale.getlocale()
sys_lang = sys_loc[0] # system default language
if sys_lang == 'en_EN' or sys... | Store the duplicated items separately in related folder | Store the duplicated items separately in related folder
| Python | mit | OrhanOdabasi/PixPack,OrhanOdabasi/PixPack | #!/usr/bin/env python3
# utility.py
# PixPack Photo Organiser
# It contains some useful functions to increase user experience
import locale
import os
def sys_trans_var():
# check system language
sys_loc = locale.getlocale()
sys_lang = sys_loc[0] # system default language
if sys_lang == 'en_EN' or sys... | #!/usr/bin/env python3
# utility.py
# PixPack Photo Organiser
# It contains some useful functions to increase user experience
import locale
import os
def sys_trans_var():
# check system language
sys_loc = locale.getlocale()
sys_lang = sys_loc[0] # system default language
if sys_lang == 'en_EN' or sys... | <commit_before>#!/usr/bin/env python3
# utility.py
# PixPack Photo Organiser
# It contains some useful functions to increase user experience
import locale
import os
def sys_trans_var():
# check system language
sys_loc = locale.getlocale()
sys_lang = sys_loc[0] # system default language
if sys_lang ==... | #!/usr/bin/env python3
# utility.py
# PixPack Photo Organiser
# It contains some useful functions to increase user experience
import locale
import os
def sys_trans_var():
# check system language
sys_loc = locale.getlocale()
sys_lang = sys_loc[0] # system default language
if sys_lang == 'en_EN' or sys... | #!/usr/bin/env python3
# utility.py
# PixPack Photo Organiser
# It contains some useful functions to increase user experience
import locale
import os
def sys_trans_var():
# check system language
sys_loc = locale.getlocale()
sys_lang = sys_loc[0] # system default language
if sys_lang == 'en_EN' or sys... | <commit_before>#!/usr/bin/env python3
# utility.py
# PixPack Photo Organiser
# It contains some useful functions to increase user experience
import locale
import os
def sys_trans_var():
# check system language
sys_loc = locale.getlocale()
sys_lang = sys_loc[0] # system default language
if sys_lang ==... |
b99f0839a8c9ce88127634f507605d065c22e5a7 | kafka/kafkaConsumer.py | kafka/kafkaConsumer.py | #!/usr/bin/env python
import threading, logging, time
from kafka import KafkaConsumer
class Consumer(threading.Thread):
daemon = True
def run(self):
#consumer = KafkaConsumer(bootstrap_servers='10.100.198.220:9092',
consumer = KafkaConsumer(bootstrap_servers='10.0.2.15:9092',
... | #!/usr/bin/env python
import threading, logging, time
from kafka import KafkaConsumer
class Consumer(threading.Thread):
daemon = True
def run(self):
consumer = KafkaConsumer(bootstrap_servers='10.100.198.220:9092',
#consumer = KafkaConsumer(bootstrap_servers='10.0.2.15:9092',
... | Update IP address of kafka consumer | Update IP address of kafka consumer
| Python | apache-2.0 | opencord/voltha,opencord/voltha,opencord/voltha,opencord/voltha,opencord/voltha | #!/usr/bin/env python
import threading, logging, time
from kafka import KafkaConsumer
class Consumer(threading.Thread):
daemon = True
def run(self):
#consumer = KafkaConsumer(bootstrap_servers='10.100.198.220:9092',
consumer = KafkaConsumer(bootstrap_servers='10.0.2.15:9092',
... | #!/usr/bin/env python
import threading, logging, time
from kafka import KafkaConsumer
class Consumer(threading.Thread):
daemon = True
def run(self):
consumer = KafkaConsumer(bootstrap_servers='10.100.198.220:9092',
#consumer = KafkaConsumer(bootstrap_servers='10.0.2.15:9092',
... | <commit_before>#!/usr/bin/env python
import threading, logging, time
from kafka import KafkaConsumer
class Consumer(threading.Thread):
daemon = True
def run(self):
#consumer = KafkaConsumer(bootstrap_servers='10.100.198.220:9092',
consumer = KafkaConsumer(bootstrap_servers='10.0.2.15:9092',
... | #!/usr/bin/env python
import threading, logging, time
from kafka import KafkaConsumer
class Consumer(threading.Thread):
daemon = True
def run(self):
consumer = KafkaConsumer(bootstrap_servers='10.100.198.220:9092',
#consumer = KafkaConsumer(bootstrap_servers='10.0.2.15:9092',
... | #!/usr/bin/env python
import threading, logging, time
from kafka import KafkaConsumer
class Consumer(threading.Thread):
daemon = True
def run(self):
#consumer = KafkaConsumer(bootstrap_servers='10.100.198.220:9092',
consumer = KafkaConsumer(bootstrap_servers='10.0.2.15:9092',
... | <commit_before>#!/usr/bin/env python
import threading, logging, time
from kafka import KafkaConsumer
class Consumer(threading.Thread):
daemon = True
def run(self):
#consumer = KafkaConsumer(bootstrap_servers='10.100.198.220:9092',
consumer = KafkaConsumer(bootstrap_servers='10.0.2.15:9092',
... |
956f4d02036aa20fa594ee7d369573496525d15e | src/server.py | src/server.py | from flow import Flow
import logging
from . import settings
LOG = logging.getLogger("flowbot.server")
class Server(object):
"""A connection to Flow."""
def __init__(self):
"""Initialize a flow server instance."""
self.flow = Flow()
self._start_server()
self._setup_account()... | from flow import Flow
import logging
from . import settings
LOG = logging.getLogger("flowbot.server")
class Server(object):
"""A connection to Flow."""
def __init__(self):
"""Initialize a flow server instance."""
self.flow = Flow()
self._start_server()
self._setup_account()... | Remove create device step (not needed?) | Remove create device step (not needed?)
| Python | mpl-2.0 | SpiderOak/flowbot | from flow import Flow
import logging
from . import settings
LOG = logging.getLogger("flowbot.server")
class Server(object):
"""A connection to Flow."""
def __init__(self):
"""Initialize a flow server instance."""
self.flow = Flow()
self._start_server()
self._setup_account()... | from flow import Flow
import logging
from . import settings
LOG = logging.getLogger("flowbot.server")
class Server(object):
"""A connection to Flow."""
def __init__(self):
"""Initialize a flow server instance."""
self.flow = Flow()
self._start_server()
self._setup_account()... | <commit_before>from flow import Flow
import logging
from . import settings
LOG = logging.getLogger("flowbot.server")
class Server(object):
"""A connection to Flow."""
def __init__(self):
"""Initialize a flow server instance."""
self.flow = Flow()
self._start_server()
self._... | from flow import Flow
import logging
from . import settings
LOG = logging.getLogger("flowbot.server")
class Server(object):
"""A connection to Flow."""
def __init__(self):
"""Initialize a flow server instance."""
self.flow = Flow()
self._start_server()
self._setup_account()... | from flow import Flow
import logging
from . import settings
LOG = logging.getLogger("flowbot.server")
class Server(object):
"""A connection to Flow."""
def __init__(self):
"""Initialize a flow server instance."""
self.flow = Flow()
self._start_server()
self._setup_account()... | <commit_before>from flow import Flow
import logging
from . import settings
LOG = logging.getLogger("flowbot.server")
class Server(object):
"""A connection to Flow."""
def __init__(self):
"""Initialize a flow server instance."""
self.flow = Flow()
self._start_server()
self._... |
dcb62a352b7473779f1cc907c920c9b42ee9ceac | django_extensions/management/commands/print_settings.py | django_extensions/management/commands/print_settings.py | from django.core.management.base import BaseCommand
from django.conf import settings
class Command(BaseCommand):
help = "Print the active Django settings."
def handle(self, *args, **options):
for key in dir(settings):
if key.startswith('__'):
continue
value = ... | """
print_settings
==============
Django command similar to 'diffsettings' but shows all active Django settings.
"""
from django.core.management.base import NoArgsCommand
from django.conf import settings
from optparse import make_option
class Command(NoArgsCommand):
"""print_settings command"""
help = "Pri... | Make output format configurable (simple, pprint, json, yaml) | Make output format configurable (simple, pprint, json, yaml)
$ pylint django-extensions/django_extensions/management/commands/print_settings.py | grep rated
No config file found, using default configuration
Your code has been rated at 10.00/10 (previous run: 10.00/10)
| Python | mit | lamby/django-extensions,barseghyanartur/django-extensions,dpetzold/django-extensions,jpadilla/django-extensions,Moulde/django-extensions,marctc/django-extensions,levic/django-extensions,kevgathuku/django-extensions,bionikspoon/django-extensions,atchariya/django-extensions,maroux/django-extensions,frewsxcv/django-extens... | from django.core.management.base import BaseCommand
from django.conf import settings
class Command(BaseCommand):
help = "Print the active Django settings."
def handle(self, *args, **options):
for key in dir(settings):
if key.startswith('__'):
continue
value = ... | """
print_settings
==============
Django command similar to 'diffsettings' but shows all active Django settings.
"""
from django.core.management.base import NoArgsCommand
from django.conf import settings
from optparse import make_option
class Command(NoArgsCommand):
"""print_settings command"""
help = "Pri... | <commit_before>from django.core.management.base import BaseCommand
from django.conf import settings
class Command(BaseCommand):
help = "Print the active Django settings."
def handle(self, *args, **options):
for key in dir(settings):
if key.startswith('__'):
continue
... | """
print_settings
==============
Django command similar to 'diffsettings' but shows all active Django settings.
"""
from django.core.management.base import NoArgsCommand
from django.conf import settings
from optparse import make_option
class Command(NoArgsCommand):
"""print_settings command"""
help = "Pri... | from django.core.management.base import BaseCommand
from django.conf import settings
class Command(BaseCommand):
help = "Print the active Django settings."
def handle(self, *args, **options):
for key in dir(settings):
if key.startswith('__'):
continue
value = ... | <commit_before>from django.core.management.base import BaseCommand
from django.conf import settings
class Command(BaseCommand):
help = "Print the active Django settings."
def handle(self, *args, **options):
for key in dir(settings):
if key.startswith('__'):
continue
... |
a1ec7fbf4bb00d2a24dfba0acf6baf18d1b016ee | froide/comments/forms.py | froide/comments/forms.py | from django import forms
from django.utils.translation import gettext_lazy as _
from django_comments.forms import (
CommentForm as DjangoCommentForm,
COMMENT_MAX_LENGTH
)
class CommentForm(DjangoCommentForm):
name = forms.CharField(
label=_('Name'),
required=True,
help_text=_('You... | from django import forms
from django.utils.translation import gettext_lazy as _
from django_comments.forms import (
CommentForm as DjangoCommentForm,
COMMENT_MAX_LENGTH
)
class CommentForm(DjangoCommentForm):
name = forms.CharField(
label=_('Name'),
required=True,
max_length=50,
... | Add max length to comment field | Add max length to comment field | Python | mit | fin/froide,fin/froide,stefanw/froide,fin/froide,stefanw/froide,stefanw/froide,fin/froide,stefanw/froide,stefanw/froide | from django import forms
from django.utils.translation import gettext_lazy as _
from django_comments.forms import (
CommentForm as DjangoCommentForm,
COMMENT_MAX_LENGTH
)
class CommentForm(DjangoCommentForm):
name = forms.CharField(
label=_('Name'),
required=True,
help_text=_('You... | from django import forms
from django.utils.translation import gettext_lazy as _
from django_comments.forms import (
CommentForm as DjangoCommentForm,
COMMENT_MAX_LENGTH
)
class CommentForm(DjangoCommentForm):
name = forms.CharField(
label=_('Name'),
required=True,
max_length=50,
... | <commit_before>from django import forms
from django.utils.translation import gettext_lazy as _
from django_comments.forms import (
CommentForm as DjangoCommentForm,
COMMENT_MAX_LENGTH
)
class CommentForm(DjangoCommentForm):
name = forms.CharField(
label=_('Name'),
required=True,
h... | from django import forms
from django.utils.translation import gettext_lazy as _
from django_comments.forms import (
CommentForm as DjangoCommentForm,
COMMENT_MAX_LENGTH
)
class CommentForm(DjangoCommentForm):
name = forms.CharField(
label=_('Name'),
required=True,
max_length=50,
... | from django import forms
from django.utils.translation import gettext_lazy as _
from django_comments.forms import (
CommentForm as DjangoCommentForm,
COMMENT_MAX_LENGTH
)
class CommentForm(DjangoCommentForm):
name = forms.CharField(
label=_('Name'),
required=True,
help_text=_('You... | <commit_before>from django import forms
from django.utils.translation import gettext_lazy as _
from django_comments.forms import (
CommentForm as DjangoCommentForm,
COMMENT_MAX_LENGTH
)
class CommentForm(DjangoCommentForm):
name = forms.CharField(
label=_('Name'),
required=True,
h... |
06458ef8dd3db840c37127a6a4c0c41ed2ffe6f4 | pybossa/sentinel/__init__.py | pybossa/sentinel/__init__.py | from redis import sentinel, StrictRedis
class Sentinel(object):
def __init__(self, app=None):
self.app = app
self.master = StrictRedis()
self.slave = self.master
if app is not None: # pragma: no cover
self.init_app(app)
def init_app(self, app):
self.connec... | from redis import sentinel, StrictRedis
class Sentinel(object):
def __init__(self, app=None):
self.app = app
self.master = StrictRedis()
self.slave = self.master
if app is not None: # pragma: no cover
self.init_app(app)
def init_app(self, app):
self.connec... | Add retry on timeout option to sentinel connection | Add retry on timeout option to sentinel connection
| Python | agpl-3.0 | geotagx/pybossa,inteligencia-coletiva-lsd/pybossa,jean/pybossa,geotagx/pybossa,OpenNewsLabs/pybossa,PyBossa/pybossa,OpenNewsLabs/pybossa,jean/pybossa,PyBossa/pybossa,Scifabric/pybossa,inteligencia-coletiva-lsd/pybossa,Scifabric/pybossa | from redis import sentinel, StrictRedis
class Sentinel(object):
def __init__(self, app=None):
self.app = app
self.master = StrictRedis()
self.slave = self.master
if app is not None: # pragma: no cover
self.init_app(app)
def init_app(self, app):
self.connec... | from redis import sentinel, StrictRedis
class Sentinel(object):
def __init__(self, app=None):
self.app = app
self.master = StrictRedis()
self.slave = self.master
if app is not None: # pragma: no cover
self.init_app(app)
def init_app(self, app):
self.connec... | <commit_before>from redis import sentinel, StrictRedis
class Sentinel(object):
def __init__(self, app=None):
self.app = app
self.master = StrictRedis()
self.slave = self.master
if app is not None: # pragma: no cover
self.init_app(app)
def init_app(self, app):
... | from redis import sentinel, StrictRedis
class Sentinel(object):
def __init__(self, app=None):
self.app = app
self.master = StrictRedis()
self.slave = self.master
if app is not None: # pragma: no cover
self.init_app(app)
def init_app(self, app):
self.connec... | from redis import sentinel, StrictRedis
class Sentinel(object):
def __init__(self, app=None):
self.app = app
self.master = StrictRedis()
self.slave = self.master
if app is not None: # pragma: no cover
self.init_app(app)
def init_app(self, app):
self.connec... | <commit_before>from redis import sentinel, StrictRedis
class Sentinel(object):
def __init__(self, app=None):
self.app = app
self.master = StrictRedis()
self.slave = self.master
if app is not None: # pragma: no cover
self.init_app(app)
def init_app(self, app):
... |
ec92c0cedb6da3180284273926ccfe05ac334729 | snippets/base/middleware.py | snippets/base/middleware.py | from django.core.urlresolvers import resolve
from snippets.base.views import fetch_snippets
class FetchSnippetsMiddleware(object):
"""
If the incoming request is for the fetch_snippets view, execute the view
and return it before other middleware can run.
fetch_snippets is a very very basic view that... | from django.core.urlresolvers import resolve
from snippets.base.views import fetch_snippets
class FetchSnippetsMiddleware(object):
"""
If the incoming request is for the fetch_snippets view, execute the view
and return it before other middleware can run.
fetch_snippets is a very very basic view that... | Disable New Relic's apdex metric on non-fetch_snippets views. | Disable New Relic's apdex metric on non-fetch_snippets views.
New Relic doesn't allow us to set different thresholds for different
pages across the site, so in order to get valuable metrics on the main
view for snippets, fetch_snippets, we need to disable apdex for the
admin interface and public snippets views, which ... | Python | mpl-2.0 | akatsoulas/snippets-service,schalkneethling/snippets-service,mozilla/snippets-service,mozilla/snippets-service,mozilla/snippets-service,mozmar/snippets-service,schalkneethling/snippets-service,Osmose/snippets-service,bensternthal/snippets-service,akatsoulas/snippets-service,mozmar/snippets-service,glogiotatidis/snippet... | from django.core.urlresolvers import resolve
from snippets.base.views import fetch_snippets
class FetchSnippetsMiddleware(object):
"""
If the incoming request is for the fetch_snippets view, execute the view
and return it before other middleware can run.
fetch_snippets is a very very basic view that... | from django.core.urlresolvers import resolve
from snippets.base.views import fetch_snippets
class FetchSnippetsMiddleware(object):
"""
If the incoming request is for the fetch_snippets view, execute the view
and return it before other middleware can run.
fetch_snippets is a very very basic view that... | <commit_before>from django.core.urlresolvers import resolve
from snippets.base.views import fetch_snippets
class FetchSnippetsMiddleware(object):
"""
If the incoming request is for the fetch_snippets view, execute the view
and return it before other middleware can run.
fetch_snippets is a very very ... | from django.core.urlresolvers import resolve
from snippets.base.views import fetch_snippets
class FetchSnippetsMiddleware(object):
"""
If the incoming request is for the fetch_snippets view, execute the view
and return it before other middleware can run.
fetch_snippets is a very very basic view that... | from django.core.urlresolvers import resolve
from snippets.base.views import fetch_snippets
class FetchSnippetsMiddleware(object):
"""
If the incoming request is for the fetch_snippets view, execute the view
and return it before other middleware can run.
fetch_snippets is a very very basic view that... | <commit_before>from django.core.urlresolvers import resolve
from snippets.base.views import fetch_snippets
class FetchSnippetsMiddleware(object):
"""
If the incoming request is for the fetch_snippets view, execute the view
and return it before other middleware can run.
fetch_snippets is a very very ... |
439f0326cc71cf19e41137745aedeec391727207 | src/sentry/web/frontend/organization_api_keys.py | src/sentry/web/frontend/organization_api_keys.py | from __future__ import absolute_import
from django.core.urlresolvers import reverse
from django.http import HttpResponseRedirect
from sentry.models import ApiKey, OrganizationMemberType
from sentry.web.frontend.base import OrganizationView
class OrganizationApiKeysView(OrganizationView):
required_access = Organ... | from __future__ import absolute_import
from django.core.urlresolvers import reverse
from django.http import HttpResponseRedirect
from operator import or_
from sentry.models import ApiKey, OrganizationMemberType
from sentry.web.frontend.base import OrganizationView
DEFAULT_SCOPES = [
'project:read',
'event:re... | Set default scopes to read | Set default scopes to read
| Python | bsd-3-clause | pauloschilling/sentry,llonchj/sentry,JamesMura/sentry,hongliang5623/sentry,gg7/sentry,gencer/sentry,BuildingLink/sentry,llonchj/sentry,ifduyue/sentry,kevinastone/sentry,drcapulet/sentry,BayanGroup/sentry,Kryz/sentry,1tush/sentry,kevinlondon/sentry,beeftornado/sentry,beeftornado/sentry,felixbuenemann/sentry,JamesMura/se... | from __future__ import absolute_import
from django.core.urlresolvers import reverse
from django.http import HttpResponseRedirect
from sentry.models import ApiKey, OrganizationMemberType
from sentry.web.frontend.base import OrganizationView
class OrganizationApiKeysView(OrganizationView):
required_access = Organ... | from __future__ import absolute_import
from django.core.urlresolvers import reverse
from django.http import HttpResponseRedirect
from operator import or_
from sentry.models import ApiKey, OrganizationMemberType
from sentry.web.frontend.base import OrganizationView
DEFAULT_SCOPES = [
'project:read',
'event:re... | <commit_before>from __future__ import absolute_import
from django.core.urlresolvers import reverse
from django.http import HttpResponseRedirect
from sentry.models import ApiKey, OrganizationMemberType
from sentry.web.frontend.base import OrganizationView
class OrganizationApiKeysView(OrganizationView):
required... | from __future__ import absolute_import
from django.core.urlresolvers import reverse
from django.http import HttpResponseRedirect
from operator import or_
from sentry.models import ApiKey, OrganizationMemberType
from sentry.web.frontend.base import OrganizationView
DEFAULT_SCOPES = [
'project:read',
'event:re... | from __future__ import absolute_import
from django.core.urlresolvers import reverse
from django.http import HttpResponseRedirect
from sentry.models import ApiKey, OrganizationMemberType
from sentry.web.frontend.base import OrganizationView
class OrganizationApiKeysView(OrganizationView):
required_access = Organ... | <commit_before>from __future__ import absolute_import
from django.core.urlresolvers import reverse
from django.http import HttpResponseRedirect
from sentry.models import ApiKey, OrganizationMemberType
from sentry.web.frontend.base import OrganizationView
class OrganizationApiKeysView(OrganizationView):
required... |
f8bb6849aaf82ed74a37d12eaa14d111a85e5e50 | lms/djangoapps/philu_overrides/migrations/0001_initial.py | lms/djangoapps/philu_overrides/migrations/0001_initial.py | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations, connection
#TODO: find a more better way of handling history of builtin packages
class Migration(migrations.Migration):
dependencies = [
('enterprise', '0009_auto_20161130_1651'),
]
def add_history_c... | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations, connection
#TODO: find a more better way of handling history of builtin packages
class Migration(migrations.Migration):
dependencies = [
('enterprise', '0009_auto_20161130_1651'),
]
def add_history_c... | Add history columns `start_date` and `end_date` to edx builtin packages | Add history columns `start_date` and `end_date` to edx builtin packages
| Python | agpl-3.0 | philanthropy-u/edx-platform,philanthropy-u/edx-platform,philanthropy-u/edx-platform,philanthropy-u/edx-platform | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations, connection
#TODO: find a more better way of handling history of builtin packages
class Migration(migrations.Migration):
dependencies = [
('enterprise', '0009_auto_20161130_1651'),
]
def add_history_c... | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations, connection
#TODO: find a more better way of handling history of builtin packages
class Migration(migrations.Migration):
dependencies = [
('enterprise', '0009_auto_20161130_1651'),
]
def add_history_c... | <commit_before># -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations, connection
#TODO: find a more better way of handling history of builtin packages
class Migration(migrations.Migration):
dependencies = [
('enterprise', '0009_auto_20161130_1651'),
]
de... | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations, connection
#TODO: find a more better way of handling history of builtin packages
class Migration(migrations.Migration):
dependencies = [
('enterprise', '0009_auto_20161130_1651'),
]
def add_history_c... | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations, connection
#TODO: find a more better way of handling history of builtin packages
class Migration(migrations.Migration):
dependencies = [
('enterprise', '0009_auto_20161130_1651'),
]
def add_history_c... | <commit_before># -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations, connection
#TODO: find a more better way of handling history of builtin packages
class Migration(migrations.Migration):
dependencies = [
('enterprise', '0009_auto_20161130_1651'),
]
de... |
b9a25c0bf991c0579a9c9f1ed371251337173214 | namestand/patterns.py | namestand/patterns.py | import re
non_alphanumeric = re.compile(r"[^0-9a-z]+", re.I)
non_namey = re.compile(r"[^\w\-' ]+", re.UNICODE)
comma_suffix = re.compile(r", *(JR|SR|I+|IV|VI*)\b")
last_first = re.compile(r"([^,]*), +([^,]*)")
starts_with_num = re.compile(r"^(\d)")
name_cruft = re.compile(r"\b(MR|MS|MRS|ESQ|SIR|HON)\b")
company_... | import re
non_alphanumeric = re.compile(r"[^0-9a-z]+", re.I)
non_namey = re.compile(r"[^\w\-' ]+", re.UNICODE)
comma_suffix = re.compile(r", *(JR|SR|I+|IV|VI*)\b")
last_first = re.compile(r"([^,]*), +([^,]*)")
starts_with_num = re.compile(r"^(\d)")
name_cruft = re.compile(r"\b(MR|MS|MRS|ESQ|SIR|HON)\b")
company_... | Add "LLP" to company cruft | Add "LLP" to company cruft
| Python | mit | BuzzFeedNews/namestand | import re
non_alphanumeric = re.compile(r"[^0-9a-z]+", re.I)
non_namey = re.compile(r"[^\w\-' ]+", re.UNICODE)
comma_suffix = re.compile(r", *(JR|SR|I+|IV|VI*)\b")
last_first = re.compile(r"([^,]*), +([^,]*)")
starts_with_num = re.compile(r"^(\d)")
name_cruft = re.compile(r"\b(MR|MS|MRS|ESQ|SIR|HON)\b")
company_... | import re
non_alphanumeric = re.compile(r"[^0-9a-z]+", re.I)
non_namey = re.compile(r"[^\w\-' ]+", re.UNICODE)
comma_suffix = re.compile(r", *(JR|SR|I+|IV|VI*)\b")
last_first = re.compile(r"([^,]*), +([^,]*)")
starts_with_num = re.compile(r"^(\d)")
name_cruft = re.compile(r"\b(MR|MS|MRS|ESQ|SIR|HON)\b")
company_... | <commit_before>import re
non_alphanumeric = re.compile(r"[^0-9a-z]+", re.I)
non_namey = re.compile(r"[^\w\-' ]+", re.UNICODE)
comma_suffix = re.compile(r", *(JR|SR|I+|IV|VI*)\b")
last_first = re.compile(r"([^,]*), +([^,]*)")
starts_with_num = re.compile(r"^(\d)")
name_cruft = re.compile(r"\b(MR|MS|MRS|ESQ|SIR|HON... | import re
non_alphanumeric = re.compile(r"[^0-9a-z]+", re.I)
non_namey = re.compile(r"[^\w\-' ]+", re.UNICODE)
comma_suffix = re.compile(r", *(JR|SR|I+|IV|VI*)\b")
last_first = re.compile(r"([^,]*), +([^,]*)")
starts_with_num = re.compile(r"^(\d)")
name_cruft = re.compile(r"\b(MR|MS|MRS|ESQ|SIR|HON)\b")
company_... | import re
non_alphanumeric = re.compile(r"[^0-9a-z]+", re.I)
non_namey = re.compile(r"[^\w\-' ]+", re.UNICODE)
comma_suffix = re.compile(r", *(JR|SR|I+|IV|VI*)\b")
last_first = re.compile(r"([^,]*), +([^,]*)")
starts_with_num = re.compile(r"^(\d)")
name_cruft = re.compile(r"\b(MR|MS|MRS|ESQ|SIR|HON)\b")
company_... | <commit_before>import re
non_alphanumeric = re.compile(r"[^0-9a-z]+", re.I)
non_namey = re.compile(r"[^\w\-' ]+", re.UNICODE)
comma_suffix = re.compile(r", *(JR|SR|I+|IV|VI*)\b")
last_first = re.compile(r"([^,]*), +([^,]*)")
starts_with_num = re.compile(r"^(\d)")
name_cruft = re.compile(r"\b(MR|MS|MRS|ESQ|SIR|HON... |
2c26434b7dcd71530d453989372b8d67d90ad3c7 | rwt/scripts.py | rwt/scripts.py | import sys
import tokenize
def run(cmdline):
"""
Execute the script as if it had been invoked naturally.
"""
namespace = dict()
filename = cmdline[0]
namespace['__file__'] = filename
namespace['__name__'] = '__main__'
sys.argv[:] = cmdline
open_ = getattr(tokenize, 'open', open)
script = open_(filename).re... | import sys
import ast
import tokenize
def read_deps(script, var_name='__requires__'):
"""
Given a script path, read the dependencies from the
indicated variable (default __requires__). Does not
execute the script, so expects the var_name to be
assigned a static list of strings.
"""
with open(script) as stream:... | Add routine for loading deps from a script. | Add routine for loading deps from a script.
| Python | mit | jaraco/rwt | import sys
import tokenize
def run(cmdline):
"""
Execute the script as if it had been invoked naturally.
"""
namespace = dict()
filename = cmdline[0]
namespace['__file__'] = filename
namespace['__name__'] = '__main__'
sys.argv[:] = cmdline
open_ = getattr(tokenize, 'open', open)
script = open_(filename).re... | import sys
import ast
import tokenize
def read_deps(script, var_name='__requires__'):
"""
Given a script path, read the dependencies from the
indicated variable (default __requires__). Does not
execute the script, so expects the var_name to be
assigned a static list of strings.
"""
with open(script) as stream:... | <commit_before>import sys
import tokenize
def run(cmdline):
"""
Execute the script as if it had been invoked naturally.
"""
namespace = dict()
filename = cmdline[0]
namespace['__file__'] = filename
namespace['__name__'] = '__main__'
sys.argv[:] = cmdline
open_ = getattr(tokenize, 'open', open)
script = ope... | import sys
import ast
import tokenize
def read_deps(script, var_name='__requires__'):
"""
Given a script path, read the dependencies from the
indicated variable (default __requires__). Does not
execute the script, so expects the var_name to be
assigned a static list of strings.
"""
with open(script) as stream:... | import sys
import tokenize
def run(cmdline):
"""
Execute the script as if it had been invoked naturally.
"""
namespace = dict()
filename = cmdline[0]
namespace['__file__'] = filename
namespace['__name__'] = '__main__'
sys.argv[:] = cmdline
open_ = getattr(tokenize, 'open', open)
script = open_(filename).re... | <commit_before>import sys
import tokenize
def run(cmdline):
"""
Execute the script as if it had been invoked naturally.
"""
namespace = dict()
filename = cmdline[0]
namespace['__file__'] = filename
namespace['__name__'] = '__main__'
sys.argv[:] = cmdline
open_ = getattr(tokenize, 'open', open)
script = ope... |
dec97fd68509cabfd53dcf588952b3b25d3e0e17 | normandy/base/urls.py | normandy/base/urls.py | from django.conf.urls import include, url
from normandy.base import views
from normandy.base.api import views as api_views
from normandy.base.api.routers import MixedViewRouter
# API Router
router = MixedViewRouter()
router.register("user", api_views.UserViewSet)
router.register("group", api_views.GroupViewSet)
ur... | from django.conf.urls import include, url
from normandy.base import views
from normandy.base.api import views as api_views
from normandy.base.api.routers import MixedViewRouter
# API Router
router = MixedViewRouter()
router.register("user", api_views.UserViewSet)
router.register("group", api_views.GroupViewSet)
ur... | Make service info available on v3 API | Make service info available on v3 API
| Python | mpl-2.0 | mozilla/normandy,mozilla/normandy,mozilla/normandy,mozilla/normandy | from django.conf.urls import include, url
from normandy.base import views
from normandy.base.api import views as api_views
from normandy.base.api.routers import MixedViewRouter
# API Router
router = MixedViewRouter()
router.register("user", api_views.UserViewSet)
router.register("group", api_views.GroupViewSet)
ur... | from django.conf.urls import include, url
from normandy.base import views
from normandy.base.api import views as api_views
from normandy.base.api.routers import MixedViewRouter
# API Router
router = MixedViewRouter()
router.register("user", api_views.UserViewSet)
router.register("group", api_views.GroupViewSet)
ur... | <commit_before>from django.conf.urls import include, url
from normandy.base import views
from normandy.base.api import views as api_views
from normandy.base.api.routers import MixedViewRouter
# API Router
router = MixedViewRouter()
router.register("user", api_views.UserViewSet)
router.register("group", api_views.Gro... | from django.conf.urls import include, url
from normandy.base import views
from normandy.base.api import views as api_views
from normandy.base.api.routers import MixedViewRouter
# API Router
router = MixedViewRouter()
router.register("user", api_views.UserViewSet)
router.register("group", api_views.GroupViewSet)
ur... | from django.conf.urls import include, url
from normandy.base import views
from normandy.base.api import views as api_views
from normandy.base.api.routers import MixedViewRouter
# API Router
router = MixedViewRouter()
router.register("user", api_views.UserViewSet)
router.register("group", api_views.GroupViewSet)
ur... | <commit_before>from django.conf.urls import include, url
from normandy.base import views
from normandy.base.api import views as api_views
from normandy.base.api.routers import MixedViewRouter
# API Router
router = MixedViewRouter()
router.register("user", api_views.UserViewSet)
router.register("group", api_views.Gro... |
767b9867a1e28063fae33ea46478372818b5a129 | cla_backend/apps/core/views.py | cla_backend/apps/core/views.py | from django.views import defaults
from sentry_sdk import capture_message, push_scope
def page_not_found(request, *args, **kwargs):
with push_scope() as scope:
scope.set_tag("type", "404")
scope.set_extra("path", request.path)
capture_message("Page not found", level="error")
return de... | from django.views import defaults
from sentry_sdk import capture_message, push_scope
def page_not_found(request, *args, **kwargs):
with push_scope() as scope:
scope.set_tag("path", request.path)
for i, part in enumerate(request.path.strip("/").split("/")):
scope.set_tag("path_{}".forma... | Tag sentry event with each part of path | Tag sentry event with each part of path
| Python | mit | ministryofjustice/cla_backend,ministryofjustice/cla_backend,ministryofjustice/cla_backend,ministryofjustice/cla_backend | from django.views import defaults
from sentry_sdk import capture_message, push_scope
def page_not_found(request, *args, **kwargs):
with push_scope() as scope:
scope.set_tag("type", "404")
scope.set_extra("path", request.path)
capture_message("Page not found", level="error")
return de... | from django.views import defaults
from sentry_sdk import capture_message, push_scope
def page_not_found(request, *args, **kwargs):
with push_scope() as scope:
scope.set_tag("path", request.path)
for i, part in enumerate(request.path.strip("/").split("/")):
scope.set_tag("path_{}".forma... | <commit_before>from django.views import defaults
from sentry_sdk import capture_message, push_scope
def page_not_found(request, *args, **kwargs):
with push_scope() as scope:
scope.set_tag("type", "404")
scope.set_extra("path", request.path)
capture_message("Page not found", level="error")... | from django.views import defaults
from sentry_sdk import capture_message, push_scope
def page_not_found(request, *args, **kwargs):
with push_scope() as scope:
scope.set_tag("path", request.path)
for i, part in enumerate(request.path.strip("/").split("/")):
scope.set_tag("path_{}".forma... | from django.views import defaults
from sentry_sdk import capture_message, push_scope
def page_not_found(request, *args, **kwargs):
with push_scope() as scope:
scope.set_tag("type", "404")
scope.set_extra("path", request.path)
capture_message("Page not found", level="error")
return de... | <commit_before>from django.views import defaults
from sentry_sdk import capture_message, push_scope
def page_not_found(request, *args, **kwargs):
with push_scope() as scope:
scope.set_tag("type", "404")
scope.set_extra("path", request.path)
capture_message("Page not found", level="error")... |
e08c7352fc5de7e098e434bfc1f2df4384c3405a | tests/base.py | tests/base.py | import unittest
import glob
import os
import mmstats
class MmstatsTestCase(unittest.TestCase):
def setUp(self):
super(MmstatsTestCase, self).setUp()
self.path = mmstats.DEFAULT_PATH
# Clean out stale mmstats files
for fn in glob.glob(os.path.join(self.path, 'test*.mmstats')):
... | import unittest
import glob
import os
import mmstats
class MmstatsTestCase(unittest.TestCase):
@property
def files(self):
return glob.glob(os.path.join(self.path, 'test*.mmstats'))
def setUp(self):
super(MmstatsTestCase, self).setUp()
self.path = mmstats.DEFAULT_PATH
# ... | Refactor test harness file discovery | Refactor test harness file discovery
| Python | bsd-3-clause | schmichael/mmstats,schmichael/mmstats,schmichael/mmstats,schmichael/mmstats | import unittest
import glob
import os
import mmstats
class MmstatsTestCase(unittest.TestCase):
def setUp(self):
super(MmstatsTestCase, self).setUp()
self.path = mmstats.DEFAULT_PATH
# Clean out stale mmstats files
for fn in glob.glob(os.path.join(self.path, 'test*.mmstats')):
... | import unittest
import glob
import os
import mmstats
class MmstatsTestCase(unittest.TestCase):
@property
def files(self):
return glob.glob(os.path.join(self.path, 'test*.mmstats'))
def setUp(self):
super(MmstatsTestCase, self).setUp()
self.path = mmstats.DEFAULT_PATH
# ... | <commit_before>import unittest
import glob
import os
import mmstats
class MmstatsTestCase(unittest.TestCase):
def setUp(self):
super(MmstatsTestCase, self).setUp()
self.path = mmstats.DEFAULT_PATH
# Clean out stale mmstats files
for fn in glob.glob(os.path.join(self.path, 'test*... | import unittest
import glob
import os
import mmstats
class MmstatsTestCase(unittest.TestCase):
@property
def files(self):
return glob.glob(os.path.join(self.path, 'test*.mmstats'))
def setUp(self):
super(MmstatsTestCase, self).setUp()
self.path = mmstats.DEFAULT_PATH
# ... | import unittest
import glob
import os
import mmstats
class MmstatsTestCase(unittest.TestCase):
def setUp(self):
super(MmstatsTestCase, self).setUp()
self.path = mmstats.DEFAULT_PATH
# Clean out stale mmstats files
for fn in glob.glob(os.path.join(self.path, 'test*.mmstats')):
... | <commit_before>import unittest
import glob
import os
import mmstats
class MmstatsTestCase(unittest.TestCase):
def setUp(self):
super(MmstatsTestCase, self).setUp()
self.path = mmstats.DEFAULT_PATH
# Clean out stale mmstats files
for fn in glob.glob(os.path.join(self.path, 'test*... |
35b08e6e7e60a440fe33b7120843766b9f2592c6 | tests/urls.py | tests/urls.py | from django.conf.urls import include, url
from django.contrib import admin
from . import views
urlpatterns = [
url(r'^admin/', include(admin.site.urls)),
url('foo/', views.MyView.as_view(), name='class-view'),
url('bar/', views.MyAPIView.as_view(), name='api-view'),
url('', views.my_view, name='funct... | from django.conf.urls import include, url
from django.contrib import admin
from . import views
from incuna_test_utils.compat import DJANGO_LT_17
if DJANGO_LT_17:
admin.autodiscover()
urlpatterns = [
url(r'^admin/', include(admin.site.urls)),
url('foo/', views.MyView.as_view(), name='class-view'),
u... | Add compatibility with django < 1.7 | Add compatibility with django < 1.7
| Python | bsd-2-clause | incuna/incuna-test-utils,incuna/incuna-test-utils | from django.conf.urls import include, url
from django.contrib import admin
from . import views
urlpatterns = [
url(r'^admin/', include(admin.site.urls)),
url('foo/', views.MyView.as_view(), name='class-view'),
url('bar/', views.MyAPIView.as_view(), name='api-view'),
url('', views.my_view, name='funct... | from django.conf.urls import include, url
from django.contrib import admin
from . import views
from incuna_test_utils.compat import DJANGO_LT_17
if DJANGO_LT_17:
admin.autodiscover()
urlpatterns = [
url(r'^admin/', include(admin.site.urls)),
url('foo/', views.MyView.as_view(), name='class-view'),
u... | <commit_before>from django.conf.urls import include, url
from django.contrib import admin
from . import views
urlpatterns = [
url(r'^admin/', include(admin.site.urls)),
url('foo/', views.MyView.as_view(), name='class-view'),
url('bar/', views.MyAPIView.as_view(), name='api-view'),
url('', views.my_vi... | from django.conf.urls import include, url
from django.contrib import admin
from . import views
from incuna_test_utils.compat import DJANGO_LT_17
if DJANGO_LT_17:
admin.autodiscover()
urlpatterns = [
url(r'^admin/', include(admin.site.urls)),
url('foo/', views.MyView.as_view(), name='class-view'),
u... | from django.conf.urls import include, url
from django.contrib import admin
from . import views
urlpatterns = [
url(r'^admin/', include(admin.site.urls)),
url('foo/', views.MyView.as_view(), name='class-view'),
url('bar/', views.MyAPIView.as_view(), name='api-view'),
url('', views.my_view, name='funct... | <commit_before>from django.conf.urls import include, url
from django.contrib import admin
from . import views
urlpatterns = [
url(r'^admin/', include(admin.site.urls)),
url('foo/', views.MyView.as_view(), name='class-view'),
url('bar/', views.MyAPIView.as_view(), name='api-view'),
url('', views.my_vi... |
c0de670c5b8b78280ee588ee31a75cf8b3f44799 | lms/djangoapps/commerce/migrations/0001_data__add_ecommerce_service_user.py | lms/djangoapps/commerce/migrations/0001_data__add_ecommerce_service_user.py | # -*- coding: utf-8 -*-
from django.conf import settings
from django.contrib.auth import get_user_model
from django.contrib.auth.models import User
from django.db import migrations, models
USERNAME = settings.ECOMMERCE_SERVICE_WORKER_USERNAME
EMAIL = USERNAME + '@fake.email'
def forwards(apps, schema_editor):
"... | # -*- coding: utf-8 -*-
from django.conf import settings
from django.contrib.auth import get_user_model
from django.contrib.auth.models import User
from django.db import migrations, models
USERNAME = settings.ECOMMERCE_SERVICE_WORKER_USERNAME
EMAIL = USERNAME + '@fake.email'
def forwards(apps, schema_editor):
"... | Fix sandboax builds, because of signal chains, UserProfile table must be predent before adding a User | Fix sandboax builds, because of signal chains, UserProfile table must be predent before adding a User
| Python | agpl-3.0 | arbrandes/edx-platform,eduNEXT/edx-platform,stvstnfrd/edx-platform,stvstnfrd/edx-platform,EDUlib/edx-platform,arbrandes/edx-platform,angelapper/edx-platform,arbrandes/edx-platform,eduNEXT/edunext-platform,EDUlib/edx-platform,stvstnfrd/edx-platform,edx/edx-platform,EDUlib/edx-platform,edx/edx-platform,stvstnfrd/edx-plat... | # -*- coding: utf-8 -*-
from django.conf import settings
from django.contrib.auth import get_user_model
from django.contrib.auth.models import User
from django.db import migrations, models
USERNAME = settings.ECOMMERCE_SERVICE_WORKER_USERNAME
EMAIL = USERNAME + '@fake.email'
def forwards(apps, schema_editor):
"... | # -*- coding: utf-8 -*-
from django.conf import settings
from django.contrib.auth import get_user_model
from django.contrib.auth.models import User
from django.db import migrations, models
USERNAME = settings.ECOMMERCE_SERVICE_WORKER_USERNAME
EMAIL = USERNAME + '@fake.email'
def forwards(apps, schema_editor):
"... | <commit_before># -*- coding: utf-8 -*-
from django.conf import settings
from django.contrib.auth import get_user_model
from django.contrib.auth.models import User
from django.db import migrations, models
USERNAME = settings.ECOMMERCE_SERVICE_WORKER_USERNAME
EMAIL = USERNAME + '@fake.email'
def forwards(apps, schema... | # -*- coding: utf-8 -*-
from django.conf import settings
from django.contrib.auth import get_user_model
from django.contrib.auth.models import User
from django.db import migrations, models
USERNAME = settings.ECOMMERCE_SERVICE_WORKER_USERNAME
EMAIL = USERNAME + '@fake.email'
def forwards(apps, schema_editor):
"... | # -*- coding: utf-8 -*-
from django.conf import settings
from django.contrib.auth import get_user_model
from django.contrib.auth.models import User
from django.db import migrations, models
USERNAME = settings.ECOMMERCE_SERVICE_WORKER_USERNAME
EMAIL = USERNAME + '@fake.email'
def forwards(apps, schema_editor):
"... | <commit_before># -*- coding: utf-8 -*-
from django.conf import settings
from django.contrib.auth import get_user_model
from django.contrib.auth.models import User
from django.db import migrations, models
USERNAME = settings.ECOMMERCE_SERVICE_WORKER_USERNAME
EMAIL = USERNAME + '@fake.email'
def forwards(apps, schema... |
47ddf999dd7ef8cd7600710ad6ad7611dd55a218 | bin/testNetwork.py | bin/testNetwork.py | #!/usr/bin/python3
import subprocess
import os
from time import sleep
env = {}
HOME = os.environ.get("HOME", "/root")
scannerConf = open(HOME+"/scanner.conf", "rt")
while True:
in_line = scannerConf.readline()
if not in_line:
break
in_line = in_line[:-1]
key, value = in_line.split("=")
env... | #!/usr/bin/python3
import subprocess
import os
from time import sleep
env = {}
HOME = os.environ.get("HOME", "/root")
scannerConf = open(HOME+"/scanner.conf", "rt")
while True:
in_line = scannerConf.readline()
if not in_line:
break
in_line = in_line[:-1]
key, value = in_line.split("=")
env... | Change the config dictionary key validation | Change the config dictionary key validation
| Python | apache-2.0 | starksm64/NativeRaspberryPiBeaconParser,starksm64/NativeRaspberryPiBeaconParser,starksm64/NativeRaspberryPiBeaconParser,starksm64/NativeRaspberryPiBeaconParser,starksm64/NativeRaspberryPiBeaconParser | #!/usr/bin/python3
import subprocess
import os
from time import sleep
env = {}
HOME = os.environ.get("HOME", "/root")
scannerConf = open(HOME+"/scanner.conf", "rt")
while True:
in_line = scannerConf.readline()
if not in_line:
break
in_line = in_line[:-1]
key, value = in_line.split("=")
env... | #!/usr/bin/python3
import subprocess
import os
from time import sleep
env = {}
HOME = os.environ.get("HOME", "/root")
scannerConf = open(HOME+"/scanner.conf", "rt")
while True:
in_line = scannerConf.readline()
if not in_line:
break
in_line = in_line[:-1]
key, value = in_line.split("=")
env... | <commit_before>#!/usr/bin/python3
import subprocess
import os
from time import sleep
env = {}
HOME = os.environ.get("HOME", "/root")
scannerConf = open(HOME+"/scanner.conf", "rt")
while True:
in_line = scannerConf.readline()
if not in_line:
break
in_line = in_line[:-1]
key, value = in_line.spl... | #!/usr/bin/python3
import subprocess
import os
from time import sleep
env = {}
HOME = os.environ.get("HOME", "/root")
scannerConf = open(HOME+"/scanner.conf", "rt")
while True:
in_line = scannerConf.readline()
if not in_line:
break
in_line = in_line[:-1]
key, value = in_line.split("=")
env... | #!/usr/bin/python3
import subprocess
import os
from time import sleep
env = {}
HOME = os.environ.get("HOME", "/root")
scannerConf = open(HOME+"/scanner.conf", "rt")
while True:
in_line = scannerConf.readline()
if not in_line:
break
in_line = in_line[:-1]
key, value = in_line.split("=")
env... | <commit_before>#!/usr/bin/python3
import subprocess
import os
from time import sleep
env = {}
HOME = os.environ.get("HOME", "/root")
scannerConf = open(HOME+"/scanner.conf", "rt")
while True:
in_line = scannerConf.readline()
if not in_line:
break
in_line = in_line[:-1]
key, value = in_line.spl... |
22e16ba6e2bf7135933895162744424e89ca514d | article/tests/article_admin_tests.py | article/tests/article_admin_tests.py | from django.contrib.auth.models import User
from django.test import TestCase, override_settings, Client
from django.test import RequestFactory
from mock import MagicMock
from wagtail.wagtailsearch.backends.elasticsearch import Elasticsearch
from django.db import DataError, IntegrityError
from django.core.exceptions imp... | from django.contrib.auth.models import User
from django.test import TestCase, override_settings, Client
from django.test import RequestFactory
from mock import MagicMock
from wagtail.wagtailsearch.backends.elasticsearch import Elasticsearch
from django.db import DataError, IntegrityError
from django.core.exceptions imp... | Fix test for storing article without any content | Fix test for storing article without any content
| Python | bsd-3-clause | PARINetwork/pari,PARINetwork/pari,PARINetwork/pari,PARINetwork/pari | from django.contrib.auth.models import User
from django.test import TestCase, override_settings, Client
from django.test import RequestFactory
from mock import MagicMock
from wagtail.wagtailsearch.backends.elasticsearch import Elasticsearch
from django.db import DataError, IntegrityError
from django.core.exceptions imp... | from django.contrib.auth.models import User
from django.test import TestCase, override_settings, Client
from django.test import RequestFactory
from mock import MagicMock
from wagtail.wagtailsearch.backends.elasticsearch import Elasticsearch
from django.db import DataError, IntegrityError
from django.core.exceptions imp... | <commit_before>from django.contrib.auth.models import User
from django.test import TestCase, override_settings, Client
from django.test import RequestFactory
from mock import MagicMock
from wagtail.wagtailsearch.backends.elasticsearch import Elasticsearch
from django.db import DataError, IntegrityError
from django.core... | from django.contrib.auth.models import User
from django.test import TestCase, override_settings, Client
from django.test import RequestFactory
from mock import MagicMock
from wagtail.wagtailsearch.backends.elasticsearch import Elasticsearch
from django.db import DataError, IntegrityError
from django.core.exceptions imp... | from django.contrib.auth.models import User
from django.test import TestCase, override_settings, Client
from django.test import RequestFactory
from mock import MagicMock
from wagtail.wagtailsearch.backends.elasticsearch import Elasticsearch
from django.db import DataError, IntegrityError
from django.core.exceptions imp... | <commit_before>from django.contrib.auth.models import User
from django.test import TestCase, override_settings, Client
from django.test import RequestFactory
from mock import MagicMock
from wagtail.wagtailsearch.backends.elasticsearch import Elasticsearch
from django.db import DataError, IntegrityError
from django.core... |
d12be3446cad8b3fa3ae9a1860b3bd6ed20a1d9e | cass-prototype/reddit/api/serializers.py | cass-prototype/reddit/api/serializers.py | from reddit.models import Blog
from rest_framework import serializers
class BlogSerializer(serializers.Serializer):
blog_id = serializers.UUIDField()
created_at = serializers.DateTimeField()
user = serializers.CharField()
description = serializers.CharField()
def create(self, validated_data):
... | from reddit.models import Blog
from rest_framework import serializers
class BlogSerializer(serializers.Serializer):
blog_id = serializers.UUIDField()
created_at = serializers.DateTimeField()
user = serializers.CharField()
description = serializers.CharField()
def create(self, validated_data):
... | Fix to API Update to allow PATCH | Fix to API Update to allow PATCH
| Python | mit | WilliamQLiu/django-cassandra-prototype,WilliamQLiu/django-cassandra-prototype | from reddit.models import Blog
from rest_framework import serializers
class BlogSerializer(serializers.Serializer):
blog_id = serializers.UUIDField()
created_at = serializers.DateTimeField()
user = serializers.CharField()
description = serializers.CharField()
def create(self, validated_data):
... | from reddit.models import Blog
from rest_framework import serializers
class BlogSerializer(serializers.Serializer):
blog_id = serializers.UUIDField()
created_at = serializers.DateTimeField()
user = serializers.CharField()
description = serializers.CharField()
def create(self, validated_data):
... | <commit_before>from reddit.models import Blog
from rest_framework import serializers
class BlogSerializer(serializers.Serializer):
blog_id = serializers.UUIDField()
created_at = serializers.DateTimeField()
user = serializers.CharField()
description = serializers.CharField()
def create(self, vali... | from reddit.models import Blog
from rest_framework import serializers
class BlogSerializer(serializers.Serializer):
blog_id = serializers.UUIDField()
created_at = serializers.DateTimeField()
user = serializers.CharField()
description = serializers.CharField()
def create(self, validated_data):
... | from reddit.models import Blog
from rest_framework import serializers
class BlogSerializer(serializers.Serializer):
blog_id = serializers.UUIDField()
created_at = serializers.DateTimeField()
user = serializers.CharField()
description = serializers.CharField()
def create(self, validated_data):
... | <commit_before>from reddit.models import Blog
from rest_framework import serializers
class BlogSerializer(serializers.Serializer):
blog_id = serializers.UUIDField()
created_at = serializers.DateTimeField()
user = serializers.CharField()
description = serializers.CharField()
def create(self, vali... |
bbd98c7da097d4962d371cd5ff75d9f67a0e3fd1 | renderMenu.py | renderMenu.py | #!/usr/bin/env python
import json, os, requests
from awsauth import S3Auth
from datetime import datetime
from pytz import timezone
from flask import Flask, render_template, url_for
app = Flask(__name__)
@app.route("/")
def renderMenu():
nowWaterloo = datetime.now(timezone('America/Toronto'))
currentDatetime = nowWa... | #!/usr/bin/env python
import json, os, requests
from awsauth import S3Auth
from datetime import datetime
from pytz import timezone
from flask import Flask, render_template, url_for
app = Flask(__name__)
@app.route("/")
def renderMenu():
nowWaterloo = datetime.now(timezone('America/Toronto'))
currentDatetime = nowWa... | Switch from development to actual data. | Switch from development to actual data.
| Python | mit | alykhank/FoodMenu,alykhank/FoodMenu,alykhank/FoodMenu | #!/usr/bin/env python
import json, os, requests
from awsauth import S3Auth
from datetime import datetime
from pytz import timezone
from flask import Flask, render_template, url_for
app = Flask(__name__)
@app.route("/")
def renderMenu():
nowWaterloo = datetime.now(timezone('America/Toronto'))
currentDatetime = nowWa... | #!/usr/bin/env python
import json, os, requests
from awsauth import S3Auth
from datetime import datetime
from pytz import timezone
from flask import Flask, render_template, url_for
app = Flask(__name__)
@app.route("/")
def renderMenu():
nowWaterloo = datetime.now(timezone('America/Toronto'))
currentDatetime = nowWa... | <commit_before>#!/usr/bin/env python
import json, os, requests
from awsauth import S3Auth
from datetime import datetime
from pytz import timezone
from flask import Flask, render_template, url_for
app = Flask(__name__)
@app.route("/")
def renderMenu():
nowWaterloo = datetime.now(timezone('America/Toronto'))
currentD... | #!/usr/bin/env python
import json, os, requests
from awsauth import S3Auth
from datetime import datetime
from pytz import timezone
from flask import Flask, render_template, url_for
app = Flask(__name__)
@app.route("/")
def renderMenu():
nowWaterloo = datetime.now(timezone('America/Toronto'))
currentDatetime = nowWa... | #!/usr/bin/env python
import json, os, requests
from awsauth import S3Auth
from datetime import datetime
from pytz import timezone
from flask import Flask, render_template, url_for
app = Flask(__name__)
@app.route("/")
def renderMenu():
nowWaterloo = datetime.now(timezone('America/Toronto'))
currentDatetime = nowWa... | <commit_before>#!/usr/bin/env python
import json, os, requests
from awsauth import S3Auth
from datetime import datetime
from pytz import timezone
from flask import Flask, render_template, url_for
app = Flask(__name__)
@app.route("/")
def renderMenu():
nowWaterloo = datetime.now(timezone('America/Toronto'))
currentD... |
9b7f23e02d0f35b27a5a0f1aad47c363b59d48e3 | configuration/configuration.py | configuration/configuration.py | from ConfigParser import ConfigParser
from environment import ENV
import sys
import os
import re
def get_config(environment):
config_dir = "%s/%s" % (re.sub('configuration\.(py|pyc)', '', os.path.abspath(__file__)), environment)
config_files = os.listdir(config_dir)
config_files = ["%s/%s" % (config_dir, f... | from ConfigParser import ConfigParser
from environment import ENV
import sys
import os
import re
def get_config(environment):
config_dir = "%s/%s" % (re.sub('configuration\.(pyc|py)', '', os.path.abspath(__file__)), environment)
config_files = os.listdir(config_dir)
config_files = ["%s/%s" % (config_dir, f... | Fix to the order of py and pyc in the regex | Fix to the order of py and pyc in the regex
| Python | agpl-3.0 | ushahidi/swiftgate,ushahidi/swiftgate | from ConfigParser import ConfigParser
from environment import ENV
import sys
import os
import re
def get_config(environment):
config_dir = "%s/%s" % (re.sub('configuration\.(py|pyc)', '', os.path.abspath(__file__)), environment)
config_files = os.listdir(config_dir)
config_files = ["%s/%s" % (config_dir, f... | from ConfigParser import ConfigParser
from environment import ENV
import sys
import os
import re
def get_config(environment):
config_dir = "%s/%s" % (re.sub('configuration\.(pyc|py)', '', os.path.abspath(__file__)), environment)
config_files = os.listdir(config_dir)
config_files = ["%s/%s" % (config_dir, f... | <commit_before>from ConfigParser import ConfigParser
from environment import ENV
import sys
import os
import re
def get_config(environment):
config_dir = "%s/%s" % (re.sub('configuration\.(py|pyc)', '', os.path.abspath(__file__)), environment)
config_files = os.listdir(config_dir)
config_files = ["%s/%s" %... | from ConfigParser import ConfigParser
from environment import ENV
import sys
import os
import re
def get_config(environment):
config_dir = "%s/%s" % (re.sub('configuration\.(pyc|py)', '', os.path.abspath(__file__)), environment)
config_files = os.listdir(config_dir)
config_files = ["%s/%s" % (config_dir, f... | from ConfigParser import ConfigParser
from environment import ENV
import sys
import os
import re
def get_config(environment):
config_dir = "%s/%s" % (re.sub('configuration\.(py|pyc)', '', os.path.abspath(__file__)), environment)
config_files = os.listdir(config_dir)
config_files = ["%s/%s" % (config_dir, f... | <commit_before>from ConfigParser import ConfigParser
from environment import ENV
import sys
import os
import re
def get_config(environment):
config_dir = "%s/%s" % (re.sub('configuration\.(py|pyc)', '', os.path.abspath(__file__)), environment)
config_files = os.listdir(config_dir)
config_files = ["%s/%s" %... |
d8e0c07363069e664dcb6071bc84e8ecc0706739 | plugins/join_on_invite/plugin.py | plugins/join_on_invite/plugin.py | class InviteJoinPlugin(object):
"""Simple plugin that joins a channel if an invite is given."""
callback_id = None
"""ID generated when callback was added for the irc.invite event"""
def __init__(self, cardinal):
"""Register our callback and save the callback ID"""
self.callback_id = c... | from cardinal.decorators import event
class InviteJoinPlugin(object):
"""Simple plugin that joins a channel if an invite is given."""
@event('irc.invite')
def join_channel(self, cardinal, user, channel):
"""Callback for irc.invite that joins a channel"""
cardinal.join(channel)
def setup... | Use join_on_invite as @event decorator example | Use join_on_invite as @event decorator example
| Python | mit | JohnMaguire/Cardinal,BiohZn/Cardinal | class InviteJoinPlugin(object):
"""Simple plugin that joins a channel if an invite is given."""
callback_id = None
"""ID generated when callback was added for the irc.invite event"""
def __init__(self, cardinal):
"""Register our callback and save the callback ID"""
self.callback_id = c... | from cardinal.decorators import event
class InviteJoinPlugin(object):
"""Simple plugin that joins a channel if an invite is given."""
@event('irc.invite')
def join_channel(self, cardinal, user, channel):
"""Callback for irc.invite that joins a channel"""
cardinal.join(channel)
def setup... | <commit_before>class InviteJoinPlugin(object):
"""Simple plugin that joins a channel if an invite is given."""
callback_id = None
"""ID generated when callback was added for the irc.invite event"""
def __init__(self, cardinal):
"""Register our callback and save the callback ID"""
self.... | from cardinal.decorators import event
class InviteJoinPlugin(object):
"""Simple plugin that joins a channel if an invite is given."""
@event('irc.invite')
def join_channel(self, cardinal, user, channel):
"""Callback for irc.invite that joins a channel"""
cardinal.join(channel)
def setup... | class InviteJoinPlugin(object):
"""Simple plugin that joins a channel if an invite is given."""
callback_id = None
"""ID generated when callback was added for the irc.invite event"""
def __init__(self, cardinal):
"""Register our callback and save the callback ID"""
self.callback_id = c... | <commit_before>class InviteJoinPlugin(object):
"""Simple plugin that joins a channel if an invite is given."""
callback_id = None
"""ID generated when callback was added for the irc.invite event"""
def __init__(self, cardinal):
"""Register our callback and save the callback ID"""
self.... |
efdb4f57f3fe18f3c9a16df0adb735f13cd7c567 | vigir_synthesis_manager/src/vigir_synthesis_manager/ltl_compilation_client.py | vigir_synthesis_manager/src/vigir_synthesis_manager/ltl_compilation_client.py | #!/usr/bin/env python
import rospy
from vigir_synthesis_msgs.srv import LTLCompilation
# from vigir_synthesis_msgs.msg import LTLSpecification, BSErrorCodes
def ltl_compilation_client(system, goals, initial_conditions, custom_ltl = None):
'''Client'''
rospy.wait_for_service('ltl_compilation')
try:
... | #!/usr/bin/env python
import rospy
from vigir_synthesis_msgs.srv import LTLCompilation
# from vigir_synthesis_msgs.msg import LTLSpecification, BSErrorCodes
def ltl_compilation_client(system, goals, initial_conditions, custom_ltl = None):
'''Client'''
rospy.wait_for_service('ltl_compilation')
try:
... | Remove prints from LTL compilation client | [vigir_synthesis_manager] Remove prints from LTL compilation client
| Python | bsd-3-clause | team-vigir/vigir_behavior_synthesis,team-vigir/vigir_behavior_synthesis | #!/usr/bin/env python
import rospy
from vigir_synthesis_msgs.srv import LTLCompilation
# from vigir_synthesis_msgs.msg import LTLSpecification, BSErrorCodes
def ltl_compilation_client(system, goals, initial_conditions, custom_ltl = None):
'''Client'''
rospy.wait_for_service('ltl_compilation')
try:
... | #!/usr/bin/env python
import rospy
from vigir_synthesis_msgs.srv import LTLCompilation
# from vigir_synthesis_msgs.msg import LTLSpecification, BSErrorCodes
def ltl_compilation_client(system, goals, initial_conditions, custom_ltl = None):
'''Client'''
rospy.wait_for_service('ltl_compilation')
try:
... | <commit_before>#!/usr/bin/env python
import rospy
from vigir_synthesis_msgs.srv import LTLCompilation
# from vigir_synthesis_msgs.msg import LTLSpecification, BSErrorCodes
def ltl_compilation_client(system, goals, initial_conditions, custom_ltl = None):
'''Client'''
rospy.wait_for_service('ltl_compilation')... | #!/usr/bin/env python
import rospy
from vigir_synthesis_msgs.srv import LTLCompilation
# from vigir_synthesis_msgs.msg import LTLSpecification, BSErrorCodes
def ltl_compilation_client(system, goals, initial_conditions, custom_ltl = None):
'''Client'''
rospy.wait_for_service('ltl_compilation')
try:
... | #!/usr/bin/env python
import rospy
from vigir_synthesis_msgs.srv import LTLCompilation
# from vigir_synthesis_msgs.msg import LTLSpecification, BSErrorCodes
def ltl_compilation_client(system, goals, initial_conditions, custom_ltl = None):
'''Client'''
rospy.wait_for_service('ltl_compilation')
try:
... | <commit_before>#!/usr/bin/env python
import rospy
from vigir_synthesis_msgs.srv import LTLCompilation
# from vigir_synthesis_msgs.msg import LTLSpecification, BSErrorCodes
def ltl_compilation_client(system, goals, initial_conditions, custom_ltl = None):
'''Client'''
rospy.wait_for_service('ltl_compilation')... |
bc32e0aadfe2d83d8acb2f219f2fb6bf5f5bb150 | ehriportal/portal/management/commands/geocode_addresses.py | ehriportal/portal/management/commands/geocode_addresses.py | """Geocode Contact objects."""
import sys
from geopy import geocoders
from django.core.management.base import BaseCommand, CommandError
from portal import models
class Command(BaseCommand):
"""Set lat/long fields on contacts with a street address,
currently just using Google's geocoder."""
def handle(... | """Geocode Contact objects."""
import sys
import time
from geopy import geocoders
from django.core.management.base import BaseCommand, CommandError
from portal import models
class Command(BaseCommand):
"""Set lat/long fields on contacts with a street address,
currently just using Google's geocoder."""
... | Fix logging, add a sleep to molify Google's rate limit. | Fix logging, add a sleep to molify Google's rate limit.
| Python | mit | mikesname/ehri-collections,mikesname/ehri-collections,mikesname/ehri-collections | """Geocode Contact objects."""
import sys
from geopy import geocoders
from django.core.management.base import BaseCommand, CommandError
from portal import models
class Command(BaseCommand):
"""Set lat/long fields on contacts with a street address,
currently just using Google's geocoder."""
def handle(... | """Geocode Contact objects."""
import sys
import time
from geopy import geocoders
from django.core.management.base import BaseCommand, CommandError
from portal import models
class Command(BaseCommand):
"""Set lat/long fields on contacts with a street address,
currently just using Google's geocoder."""
... | <commit_before>"""Geocode Contact objects."""
import sys
from geopy import geocoders
from django.core.management.base import BaseCommand, CommandError
from portal import models
class Command(BaseCommand):
"""Set lat/long fields on contacts with a street address,
currently just using Google's geocoder."""
... | """Geocode Contact objects."""
import sys
import time
from geopy import geocoders
from django.core.management.base import BaseCommand, CommandError
from portal import models
class Command(BaseCommand):
"""Set lat/long fields on contacts with a street address,
currently just using Google's geocoder."""
... | """Geocode Contact objects."""
import sys
from geopy import geocoders
from django.core.management.base import BaseCommand, CommandError
from portal import models
class Command(BaseCommand):
"""Set lat/long fields on contacts with a street address,
currently just using Google's geocoder."""
def handle(... | <commit_before>"""Geocode Contact objects."""
import sys
from geopy import geocoders
from django.core.management.base import BaseCommand, CommandError
from portal import models
class Command(BaseCommand):
"""Set lat/long fields on contacts with a street address,
currently just using Google's geocoder."""
... |
082076cce996593c9959fc0743f13b62d2e4842b | chared/__init__.py | chared/__init__.py | # Copyright (c) 2011 Vit Suchomel and Jan Pomikalek
# All rights reserved.
#
# This software is licensed as described in the file COPYING, which
# you should have received as part of this distribution.
try:
__version__ = 'v' + __import__('pkg_resources').get_distribution('chared').version
except:
__version__ =... | # Copyright (c) 2011 Vit Suchomel and Jan Pomikalek
# All rights reserved.
#
# This software is licensed as described in the file COPYING, which
# you should have received as part of this distribution.
try:
__version__ = 'v' + __import__('pkg_resources').get_distribution('chared').version
except:
import re
... | Make sure the version is displayed as r<revision number> if the information about the package version is not available. | Make sure the version is displayed as r<revision number> if the information about the package version is not available. | Python | bsd-2-clause | gilesbrown/chared,xmichelf/chared | # Copyright (c) 2011 Vit Suchomel and Jan Pomikalek
# All rights reserved.
#
# This software is licensed as described in the file COPYING, which
# you should have received as part of this distribution.
try:
__version__ = 'v' + __import__('pkg_resources').get_distribution('chared').version
except:
__version__ =... | # Copyright (c) 2011 Vit Suchomel and Jan Pomikalek
# All rights reserved.
#
# This software is licensed as described in the file COPYING, which
# you should have received as part of this distribution.
try:
__version__ = 'v' + __import__('pkg_resources').get_distribution('chared').version
except:
import re
... | <commit_before># Copyright (c) 2011 Vit Suchomel and Jan Pomikalek
# All rights reserved.
#
# This software is licensed as described in the file COPYING, which
# you should have received as part of this distribution.
try:
__version__ = 'v' + __import__('pkg_resources').get_distribution('chared').version
except:
... | # Copyright (c) 2011 Vit Suchomel and Jan Pomikalek
# All rights reserved.
#
# This software is licensed as described in the file COPYING, which
# you should have received as part of this distribution.
try:
__version__ = 'v' + __import__('pkg_resources').get_distribution('chared').version
except:
import re
... | # Copyright (c) 2011 Vit Suchomel and Jan Pomikalek
# All rights reserved.
#
# This software is licensed as described in the file COPYING, which
# you should have received as part of this distribution.
try:
__version__ = 'v' + __import__('pkg_resources').get_distribution('chared').version
except:
__version__ =... | <commit_before># Copyright (c) 2011 Vit Suchomel and Jan Pomikalek
# All rights reserved.
#
# This software is licensed as described in the file COPYING, which
# you should have received as part of this distribution.
try:
__version__ = 'v' + __import__('pkg_resources').get_distribution('chared').version
except:
... |
2db4fda62c2eec2d5424448fcd57bedd91ad2e64 | test_support/test_fdbsql.py | test_support/test_fdbsql.py | DATABASES = {
'default': {
'ENGINE': 'django_fdbsql',
'NAME': 'django_default',
'OPTIONS': {
'supports_sequence_reset': True,
'use_sequence_reset_function': True,
},
},
'other': {
'ENGINE': 'django_fdbsql',
'NAME': 'django_other',
}... | # https://docs.djangoproject.com/en/1.7/internals/contributing/writing-code/unit-tests/#using-another-settings-module
DATABASES = {
'default': {
'ENGINE': 'django_fdbsql',
'NAME': 'django_default',
'OPTIONS': {
'supports_sequence_reset': True,
'use_sequence_reset_func... | Use sqlite3 for 'other' database test config | Use sqlite3 for 'other' database test config
| Python | mit | freyley/sql-layer-adapter-django | DATABASES = {
'default': {
'ENGINE': 'django_fdbsql',
'NAME': 'django_default',
'OPTIONS': {
'supports_sequence_reset': True,
'use_sequence_reset_function': True,
},
},
'other': {
'ENGINE': 'django_fdbsql',
'NAME': 'django_other',
}... | # https://docs.djangoproject.com/en/1.7/internals/contributing/writing-code/unit-tests/#using-another-settings-module
DATABASES = {
'default': {
'ENGINE': 'django_fdbsql',
'NAME': 'django_default',
'OPTIONS': {
'supports_sequence_reset': True,
'use_sequence_reset_func... | <commit_before>DATABASES = {
'default': {
'ENGINE': 'django_fdbsql',
'NAME': 'django_default',
'OPTIONS': {
'supports_sequence_reset': True,
'use_sequence_reset_function': True,
},
},
'other': {
'ENGINE': 'django_fdbsql',
'NAME': 'djang... | # https://docs.djangoproject.com/en/1.7/internals/contributing/writing-code/unit-tests/#using-another-settings-module
DATABASES = {
'default': {
'ENGINE': 'django_fdbsql',
'NAME': 'django_default',
'OPTIONS': {
'supports_sequence_reset': True,
'use_sequence_reset_func... | DATABASES = {
'default': {
'ENGINE': 'django_fdbsql',
'NAME': 'django_default',
'OPTIONS': {
'supports_sequence_reset': True,
'use_sequence_reset_function': True,
},
},
'other': {
'ENGINE': 'django_fdbsql',
'NAME': 'django_other',
}... | <commit_before>DATABASES = {
'default': {
'ENGINE': 'django_fdbsql',
'NAME': 'django_default',
'OPTIONS': {
'supports_sequence_reset': True,
'use_sequence_reset_function': True,
},
},
'other': {
'ENGINE': 'django_fdbsql',
'NAME': 'djang... |
d63463d8dc8acb4445b01fcebeeb6a20ea1d7b9b | tests/unit/test_template.py | tests/unit/test_template.py | import json
import pytest
from path import Path
from formica import cli
@pytest.fixture
def logger(mocker):
return mocker.patch('formica.cli.logger')
def test_template_calls_template(tmpdir, logger):
with Path(tmpdir):
with open('test.template.json', 'w') as f:
f.write('{"Description": ... | import json
import yaml
import pytest
from path import Path
from formica import cli
@pytest.fixture
def logger(mocker):
return mocker.patch('formica.cli.logger')
def test_template_calls_template(tmpdir, logger):
with Path(tmpdir):
with open('test.template.json', 'w') as f:
f.write('{"De... | Test yaml argument for template command | Test yaml argument for template command
| Python | mit | flomotlik/formica | import json
import pytest
from path import Path
from formica import cli
@pytest.fixture
def logger(mocker):
return mocker.patch('formica.cli.logger')
def test_template_calls_template(tmpdir, logger):
with Path(tmpdir):
with open('test.template.json', 'w') as f:
f.write('{"Description": ... | import json
import yaml
import pytest
from path import Path
from formica import cli
@pytest.fixture
def logger(mocker):
return mocker.patch('formica.cli.logger')
def test_template_calls_template(tmpdir, logger):
with Path(tmpdir):
with open('test.template.json', 'w') as f:
f.write('{"De... | <commit_before>import json
import pytest
from path import Path
from formica import cli
@pytest.fixture
def logger(mocker):
return mocker.patch('formica.cli.logger')
def test_template_calls_template(tmpdir, logger):
with Path(tmpdir):
with open('test.template.json', 'w') as f:
f.write('{... | import json
import yaml
import pytest
from path import Path
from formica import cli
@pytest.fixture
def logger(mocker):
return mocker.patch('formica.cli.logger')
def test_template_calls_template(tmpdir, logger):
with Path(tmpdir):
with open('test.template.json', 'w') as f:
f.write('{"De... | import json
import pytest
from path import Path
from formica import cli
@pytest.fixture
def logger(mocker):
return mocker.patch('formica.cli.logger')
def test_template_calls_template(tmpdir, logger):
with Path(tmpdir):
with open('test.template.json', 'w') as f:
f.write('{"Description": ... | <commit_before>import json
import pytest
from path import Path
from formica import cli
@pytest.fixture
def logger(mocker):
return mocker.patch('formica.cli.logger')
def test_template_calls_template(tmpdir, logger):
with Path(tmpdir):
with open('test.template.json', 'w') as f:
f.write('{... |
1de93393e402d1387e7d1c8057c6010c12a21848 | tests/window/window_util.py | tests/window/window_util.py | #!/usr/bin/python
# $Id:$
from pyglet.gl import *
def draw_client_border(window):
glClearColor(0, 0, 0, 1)
glClear(GL_COLOR_BUFFER_BIT)
glMatrixMode(GL_PROJECTION)
glLoadIdentity()
glOrtho(0, window.width, 0, window.height, -1, 1)
glMatrixMode(GL_MODELVIEW)
glLoadIdentity()... | #!/usr/bin/python
# $Id:$
from pyglet.gl import *
def draw_client_border(window):
glClearColor(0, 0, 0, 1)
glClear(GL_COLOR_BUFFER_BIT)
glMatrixMode(GL_PROJECTION)
glLoadIdentity()
glOrtho(0, window.width, 0, window.height, -1, 1)
glMatrixMode(GL_MODELVIEW)
glLoadIdentity()... | Fix window test border _again_ (more fixed). | Fix window test border _again_ (more fixed).
| Python | bsd-3-clause | shaileshgoogler/pyglet,mpasternak/pyglet-fix-issue-518-522,mpasternak/pyglet-fix-issue-518-522,odyaka341/pyglet,cledio66/pyglet,kmonsoor/pyglet,Alwnikrotikz/pyglet,gdkar/pyglet,Alwnikrotikz/pyglet,mpasternak/pyglet-fix-issue-552,arifgursel/pyglet,Alwnikrotikz/pyglet,google-code-export/pyglet,gdkar/pyglet,cledio66/pygle... | #!/usr/bin/python
# $Id:$
from pyglet.gl import *
def draw_client_border(window):
glClearColor(0, 0, 0, 1)
glClear(GL_COLOR_BUFFER_BIT)
glMatrixMode(GL_PROJECTION)
glLoadIdentity()
glOrtho(0, window.width, 0, window.height, -1, 1)
glMatrixMode(GL_MODELVIEW)
glLoadIdentity()... | #!/usr/bin/python
# $Id:$
from pyglet.gl import *
def draw_client_border(window):
glClearColor(0, 0, 0, 1)
glClear(GL_COLOR_BUFFER_BIT)
glMatrixMode(GL_PROJECTION)
glLoadIdentity()
glOrtho(0, window.width, 0, window.height, -1, 1)
glMatrixMode(GL_MODELVIEW)
glLoadIdentity()... | <commit_before>#!/usr/bin/python
# $Id:$
from pyglet.gl import *
def draw_client_border(window):
glClearColor(0, 0, 0, 1)
glClear(GL_COLOR_BUFFER_BIT)
glMatrixMode(GL_PROJECTION)
glLoadIdentity()
glOrtho(0, window.width, 0, window.height, -1, 1)
glMatrixMode(GL_MODELVIEW)
g... | #!/usr/bin/python
# $Id:$
from pyglet.gl import *
def draw_client_border(window):
glClearColor(0, 0, 0, 1)
glClear(GL_COLOR_BUFFER_BIT)
glMatrixMode(GL_PROJECTION)
glLoadIdentity()
glOrtho(0, window.width, 0, window.height, -1, 1)
glMatrixMode(GL_MODELVIEW)
glLoadIdentity()... | #!/usr/bin/python
# $Id:$
from pyglet.gl import *
def draw_client_border(window):
glClearColor(0, 0, 0, 1)
glClear(GL_COLOR_BUFFER_BIT)
glMatrixMode(GL_PROJECTION)
glLoadIdentity()
glOrtho(0, window.width, 0, window.height, -1, 1)
glMatrixMode(GL_MODELVIEW)
glLoadIdentity()... | <commit_before>#!/usr/bin/python
# $Id:$
from pyglet.gl import *
def draw_client_border(window):
glClearColor(0, 0, 0, 1)
glClear(GL_COLOR_BUFFER_BIT)
glMatrixMode(GL_PROJECTION)
glLoadIdentity()
glOrtho(0, window.width, 0, window.height, -1, 1)
glMatrixMode(GL_MODELVIEW)
g... |
cd71740daaf4f1f770b7d6959e2865ed50b76bd7 | tilequeue/query/__init__.py | tilequeue/query/__init__.py | import tilequeue.query.postgres
make_db_data_fetcher = postgres.make_db_data_fetcher
| import tilequeue.query.postgres
make_db_data_fetcher = tilequeue.query.postgres.make_db_data_fetcher
| Fix error identified by flake8. | Fix error identified by flake8.
| Python | mit | mapzen/tilequeue,tilezen/tilequeue | import tilequeue.query.postgres
make_db_data_fetcher = postgres.make_db_data_fetcher
Fix error identified by flake8. | import tilequeue.query.postgres
make_db_data_fetcher = tilequeue.query.postgres.make_db_data_fetcher
| <commit_before>import tilequeue.query.postgres
make_db_data_fetcher = postgres.make_db_data_fetcher
<commit_msg>Fix error identified by flake8.<commit_after> | import tilequeue.query.postgres
make_db_data_fetcher = tilequeue.query.postgres.make_db_data_fetcher
| import tilequeue.query.postgres
make_db_data_fetcher = postgres.make_db_data_fetcher
Fix error identified by flake8.import tilequeue.query.postgres
make_db_data_fetcher = tilequeue.query.postgres.make_db_data_fetcher
| <commit_before>import tilequeue.query.postgres
make_db_data_fetcher = postgres.make_db_data_fetcher
<commit_msg>Fix error identified by flake8.<commit_after>import tilequeue.query.postgres
make_db_data_fetcher = tilequeue.query.postgres.make_db_data_fetcher
|
0e6646de573dc04360634828cdb3b7da8cc31d2b | cobe/instatrace.py | cobe/instatrace.py | # Copyright (C) 2010 Peter Teichman
import math
import time
def singleton(cls):
instances = {}
def getinstance():
if cls not in instances:
instances[cls] = cls()
return instances[cls]
return getinstance
@singleton
class Instatrace:
def __init__(self):
self._fd = No... | # Copyright (C) 2010 Peter Teichman
import math
import time
def singleton(cls):
instances = {}
def getinstance():
if cls not in instances:
instances[cls] = cls()
return instances[cls]
return getinstance
@singleton
class Instatrace:
def __init__(self):
self._fd = No... | Allow Instatrace().init(None) to disable tracing at runtime | Allow Instatrace().init(None) to disable tracing at runtime
| Python | mit | meska/cobe,pteichman/cobe,DarkMio/cobe,wodim/cobe-ng,LeMagnesium/cobe,tiagochiavericosta/cobe,wodim/cobe-ng,DarkMio/cobe,LeMagnesium/cobe,meska/cobe,tiagochiavericosta/cobe,pteichman/cobe | # Copyright (C) 2010 Peter Teichman
import math
import time
def singleton(cls):
instances = {}
def getinstance():
if cls not in instances:
instances[cls] = cls()
return instances[cls]
return getinstance
@singleton
class Instatrace:
def __init__(self):
self._fd = No... | # Copyright (C) 2010 Peter Teichman
import math
import time
def singleton(cls):
instances = {}
def getinstance():
if cls not in instances:
instances[cls] = cls()
return instances[cls]
return getinstance
@singleton
class Instatrace:
def __init__(self):
self._fd = No... | <commit_before># Copyright (C) 2010 Peter Teichman
import math
import time
def singleton(cls):
instances = {}
def getinstance():
if cls not in instances:
instances[cls] = cls()
return instances[cls]
return getinstance
@singleton
class Instatrace:
def __init__(self):
... | # Copyright (C) 2010 Peter Teichman
import math
import time
def singleton(cls):
instances = {}
def getinstance():
if cls not in instances:
instances[cls] = cls()
return instances[cls]
return getinstance
@singleton
class Instatrace:
def __init__(self):
self._fd = No... | # Copyright (C) 2010 Peter Teichman
import math
import time
def singleton(cls):
instances = {}
def getinstance():
if cls not in instances:
instances[cls] = cls()
return instances[cls]
return getinstance
@singleton
class Instatrace:
def __init__(self):
self._fd = No... | <commit_before># Copyright (C) 2010 Peter Teichman
import math
import time
def singleton(cls):
instances = {}
def getinstance():
if cls not in instances:
instances[cls] = cls()
return instances[cls]
return getinstance
@singleton
class Instatrace:
def __init__(self):
... |
3d2f9087e62006f8a5f19476ae23324a4cfa7793 | regex.py | regex.py | import re
import sys
f = open ('/var/local/meTypesetTests/tests/testOutput/'+sys.argv[1] +'/nlm/out.xml', "r")
print ("open operation complete")
fd = f.read()
s = ''
fd =
pattern = re.compile(r'(?:(&#\d*|>))(.*?)(?=(&#\d*|<))')
for e in re.findall(pattern, fd):
s += ' '
s += e[1]
s = re.sub('-', ' ', s)
s = re.sub... | import re
import sys
f = open ('/var/local/meTypesetTests/tests/testOutput/'+sys.argv[1] +'/nlm/out.xml', "r")
print ("open operation complete")
fd = f.read()
s = ''
fd = re.sub(r'\<.*?\>\;', ' ', fd)
pattern = re.compile(r'(?:(&#\d*|>))(.*?)(?=(&#\d*|<))')
for e in re.findall(pattern, fd):
s += ' '
s += e[1]
... | Update of work over prior couple weeks. | Update of work over prior couple weeks.
| Python | mit | jnicolls/meTypeset-Test,jnicolls/Joseph | import re
import sys
f = open ('/var/local/meTypesetTests/tests/testOutput/'+sys.argv[1] +'/nlm/out.xml', "r")
print ("open operation complete")
fd = f.read()
s = ''
fd =
pattern = re.compile(r'(?:(&#\d*|>))(.*?)(?=(&#\d*|<))')
for e in re.findall(pattern, fd):
s += ' '
s += e[1]
s = re.sub('-', ' ', s)
s = re.sub... | import re
import sys
f = open ('/var/local/meTypesetTests/tests/testOutput/'+sys.argv[1] +'/nlm/out.xml', "r")
print ("open operation complete")
fd = f.read()
s = ''
fd = re.sub(r'\<.*?\>\;', ' ', fd)
pattern = re.compile(r'(?:(&#\d*|>))(.*?)(?=(&#\d*|<))')
for e in re.findall(pattern, fd):
s += ' '
s += e[1]
... | <commit_before>import re
import sys
f = open ('/var/local/meTypesetTests/tests/testOutput/'+sys.argv[1] +'/nlm/out.xml', "r")
print ("open operation complete")
fd = f.read()
s = ''
fd =
pattern = re.compile(r'(?:(&#\d*|>))(.*?)(?=(&#\d*|<))')
for e in re.findall(pattern, fd):
s += ' '
s += e[1]
s = re.sub('-', ' '... | import re
import sys
f = open ('/var/local/meTypesetTests/tests/testOutput/'+sys.argv[1] +'/nlm/out.xml', "r")
print ("open operation complete")
fd = f.read()
s = ''
fd = re.sub(r'\<.*?\>\;', ' ', fd)
pattern = re.compile(r'(?:(&#\d*|>))(.*?)(?=(&#\d*|<))')
for e in re.findall(pattern, fd):
s += ' '
s += e[1]
... | import re
import sys
f = open ('/var/local/meTypesetTests/tests/testOutput/'+sys.argv[1] +'/nlm/out.xml', "r")
print ("open operation complete")
fd = f.read()
s = ''
fd =
pattern = re.compile(r'(?:(&#\d*|>))(.*?)(?=(&#\d*|<))')
for e in re.findall(pattern, fd):
s += ' '
s += e[1]
s = re.sub('-', ' ', s)
s = re.sub... | <commit_before>import re
import sys
f = open ('/var/local/meTypesetTests/tests/testOutput/'+sys.argv[1] +'/nlm/out.xml', "r")
print ("open operation complete")
fd = f.read()
s = ''
fd =
pattern = re.compile(r'(?:(&#\d*|>))(.*?)(?=(&#\d*|<))')
for e in re.findall(pattern, fd):
s += ' '
s += e[1]
s = re.sub('-', ' '... |
0946379d23131aeec07dc29bebd4e57d95298d00 | recipes/sos-notebook/run_test.py | recipes/sos-notebook/run_test.py | # Test that sos kernel is installed
import jupyter_client
try:
jupyter_client.kernelspec.get_kernel_spec('sos')
except jupyter_client.kernelspec.NoSuchKernel:
print('sos kernel was not installed')
print('The following kernels are installed:')
print('jupyter_client.kernelspec.find_kernel_specs()')
... | # Test that sos kernel is installed
import jupyter_client
try:
jupyter_client.kernelspec.get_kernel_spec('sos')
except jupyter_client.kernelspec.NoSuchKernel:
print('sos kernel was not installed')
print('The following kernels are installed:')
print('jupyter_client.kernelspec.find_kernel_specs()')
... | Use longer TIMEOUT defined in sos_notebook.test_utils. | Use longer TIMEOUT defined in sos_notebook.test_utils.
| Python | bsd-3-clause | SylvainCorlay/staged-recipes,synapticarbors/staged-recipes,jochym/staged-recipes,mcs07/staged-recipes,ceholden/staged-recipes,igortg/staged-recipes,goanpeca/staged-recipes,johanneskoester/staged-recipes,isuruf/staged-recipes,scopatz/staged-recipes,chrisburr/staged-recipes,petrushy/staged-recipes,asmeurer/staged-recipes... | # Test that sos kernel is installed
import jupyter_client
try:
jupyter_client.kernelspec.get_kernel_spec('sos')
except jupyter_client.kernelspec.NoSuchKernel:
print('sos kernel was not installed')
print('The following kernels are installed:')
print('jupyter_client.kernelspec.find_kernel_specs()')
... | # Test that sos kernel is installed
import jupyter_client
try:
jupyter_client.kernelspec.get_kernel_spec('sos')
except jupyter_client.kernelspec.NoSuchKernel:
print('sos kernel was not installed')
print('The following kernels are installed:')
print('jupyter_client.kernelspec.find_kernel_specs()')
... | <commit_before># Test that sos kernel is installed
import jupyter_client
try:
jupyter_client.kernelspec.get_kernel_spec('sos')
except jupyter_client.kernelspec.NoSuchKernel:
print('sos kernel was not installed')
print('The following kernels are installed:')
print('jupyter_client.kernelspec.find_kernel... | # Test that sos kernel is installed
import jupyter_client
try:
jupyter_client.kernelspec.get_kernel_spec('sos')
except jupyter_client.kernelspec.NoSuchKernel:
print('sos kernel was not installed')
print('The following kernels are installed:')
print('jupyter_client.kernelspec.find_kernel_specs()')
... | # Test that sos kernel is installed
import jupyter_client
try:
jupyter_client.kernelspec.get_kernel_spec('sos')
except jupyter_client.kernelspec.NoSuchKernel:
print('sos kernel was not installed')
print('The following kernels are installed:')
print('jupyter_client.kernelspec.find_kernel_specs()')
... | <commit_before># Test that sos kernel is installed
import jupyter_client
try:
jupyter_client.kernelspec.get_kernel_spec('sos')
except jupyter_client.kernelspec.NoSuchKernel:
print('sos kernel was not installed')
print('The following kernels are installed:')
print('jupyter_client.kernelspec.find_kernel... |
c54ea6322177f8665173ae0faa2d34d37a70dea6 | setup.py | setup.py | from distutils.core import setup
import skyfield # safe, because __init__.py contains no import statements
setup(
name='skyfield',
version=skyfield.__version__,
description=skyfield.__doc__.split('\n', 1)[0],
long_description=open('README.rst', 'rb').read().decode('utf-8'),
license='MIT',
auth... | from distutils.core import setup
import skyfield # safe, because __init__.py contains no import statements
setup(
name='skyfield',
version=skyfield.__version__,
description=skyfield.__doc__.split('\n', 1)[0],
long_description=open('README.rst', 'rb').read().decode('utf-8'),
license='MIT',
auth... | Add pytz as a test requirement | Add pytz as a test requirement
| Python | mit | skyfielders/python-skyfield,skyfielders/python-skyfield | from distutils.core import setup
import skyfield # safe, because __init__.py contains no import statements
setup(
name='skyfield',
version=skyfield.__version__,
description=skyfield.__doc__.split('\n', 1)[0],
long_description=open('README.rst', 'rb').read().decode('utf-8'),
license='MIT',
auth... | from distutils.core import setup
import skyfield # safe, because __init__.py contains no import statements
setup(
name='skyfield',
version=skyfield.__version__,
description=skyfield.__doc__.split('\n', 1)[0],
long_description=open('README.rst', 'rb').read().decode('utf-8'),
license='MIT',
auth... | <commit_before>from distutils.core import setup
import skyfield # safe, because __init__.py contains no import statements
setup(
name='skyfield',
version=skyfield.__version__,
description=skyfield.__doc__.split('\n', 1)[0],
long_description=open('README.rst', 'rb').read().decode('utf-8'),
license=... | from distutils.core import setup
import skyfield # safe, because __init__.py contains no import statements
setup(
name='skyfield',
version=skyfield.__version__,
description=skyfield.__doc__.split('\n', 1)[0],
long_description=open('README.rst', 'rb').read().decode('utf-8'),
license='MIT',
auth... | from distutils.core import setup
import skyfield # safe, because __init__.py contains no import statements
setup(
name='skyfield',
version=skyfield.__version__,
description=skyfield.__doc__.split('\n', 1)[0],
long_description=open('README.rst', 'rb').read().decode('utf-8'),
license='MIT',
auth... | <commit_before>from distutils.core import setup
import skyfield # safe, because __init__.py contains no import statements
setup(
name='skyfield',
version=skyfield.__version__,
description=skyfield.__doc__.split('\n', 1)[0],
long_description=open('README.rst', 'rb').read().decode('utf-8'),
license=... |
3581c3c71bdf3ff84961df4b328f0bfc2adf0bc7 | apps/provider/urls.py | apps/provider/urls.py | from __future__ import absolute_import
from __future__ import unicode_literals
from django.conf.urls import patterns, include, url
from .views import *
urlpatterns = patterns('',
url(r'^pjson/push$', pjson_provider_push, name="pjson_provider_push"),
url(r'^fhir/practitioner/push$', fhir_practitioner_push, ... | from __future__ import absolute_import
from __future__ import unicode_literals
from django.conf.urls import patterns, include, url
from .views import *
urlpatterns = patterns('',
url(r'^pjson/push$', pjson_provider_push, name="pjson_provider_push"),
url(r'^fhir/practitioner/push$', fhir_practitioner_push, ... | Add url for update vs. push for pract and org | Add url for update vs. push for pract and org
| Python | apache-2.0 | TransparentHealth/hhs_oauth_client,TransparentHealth/hhs_oauth_client,TransparentHealth/hhs_oauth_client,TransparentHealth/hhs_oauth_client | from __future__ import absolute_import
from __future__ import unicode_literals
from django.conf.urls import patterns, include, url
from .views import *
urlpatterns = patterns('',
url(r'^pjson/push$', pjson_provider_push, name="pjson_provider_push"),
url(r'^fhir/practitioner/push$', fhir_practitioner_push, ... | from __future__ import absolute_import
from __future__ import unicode_literals
from django.conf.urls import patterns, include, url
from .views import *
urlpatterns = patterns('',
url(r'^pjson/push$', pjson_provider_push, name="pjson_provider_push"),
url(r'^fhir/practitioner/push$', fhir_practitioner_push, ... | <commit_before>from __future__ import absolute_import
from __future__ import unicode_literals
from django.conf.urls import patterns, include, url
from .views import *
urlpatterns = patterns('',
url(r'^pjson/push$', pjson_provider_push, name="pjson_provider_push"),
url(r'^fhir/practitioner/push$', fhir_prac... | from __future__ import absolute_import
from __future__ import unicode_literals
from django.conf.urls import patterns, include, url
from .views import *
urlpatterns = patterns('',
url(r'^pjson/push$', pjson_provider_push, name="pjson_provider_push"),
url(r'^fhir/practitioner/push$', fhir_practitioner_push, ... | from __future__ import absolute_import
from __future__ import unicode_literals
from django.conf.urls import patterns, include, url
from .views import *
urlpatterns = patterns('',
url(r'^pjson/push$', pjson_provider_push, name="pjson_provider_push"),
url(r'^fhir/practitioner/push$', fhir_practitioner_push, ... | <commit_before>from __future__ import absolute_import
from __future__ import unicode_literals
from django.conf.urls import patterns, include, url
from .views import *
urlpatterns = patterns('',
url(r'^pjson/push$', pjson_provider_push, name="pjson_provider_push"),
url(r'^fhir/practitioner/push$', fhir_prac... |
148866c1c2b18afcc6da5c55632d20bfdec4004a | setup.py | setup.py | #!/usr/bin/env python
"""
A light wrapper for Cybersource SOAP Toolkit API
"""
from setuptools import setup
import pycybersource
setup(
name='pycybersource',
version=pycybersource.__version__,
description='A light wrapper for Cybersource SOAP Toolkit API',
author='Eric Bartels',
author_email='ebart... | #!/usr/bin/env python
"""
A light wrapper for Cybersource SOAP Toolkit API
"""
from setuptools import setup
setup(
name='pycybersource',
version='0.1.2alpha',
description='A light wrapper for Cybersource SOAP Toolkit API',
author='Eric Bartels',
author_email='[email protected]',
url='',
pa... | Fix for installing with PIP | Fix for installing with PIP | Python | bsd-3-clause | SideStudios/pycybersource | #!/usr/bin/env python
"""
A light wrapper for Cybersource SOAP Toolkit API
"""
from setuptools import setup
import pycybersource
setup(
name='pycybersource',
version=pycybersource.__version__,
description='A light wrapper for Cybersource SOAP Toolkit API',
author='Eric Bartels',
author_email='ebart... | #!/usr/bin/env python
"""
A light wrapper for Cybersource SOAP Toolkit API
"""
from setuptools import setup
setup(
name='pycybersource',
version='0.1.2alpha',
description='A light wrapper for Cybersource SOAP Toolkit API',
author='Eric Bartels',
author_email='[email protected]',
url='',
pa... | <commit_before>#!/usr/bin/env python
"""
A light wrapper for Cybersource SOAP Toolkit API
"""
from setuptools import setup
import pycybersource
setup(
name='pycybersource',
version=pycybersource.__version__,
description='A light wrapper for Cybersource SOAP Toolkit API',
author='Eric Bartels',
auth... | #!/usr/bin/env python
"""
A light wrapper for Cybersource SOAP Toolkit API
"""
from setuptools import setup
setup(
name='pycybersource',
version='0.1.2alpha',
description='A light wrapper for Cybersource SOAP Toolkit API',
author='Eric Bartels',
author_email='[email protected]',
url='',
pa... | #!/usr/bin/env python
"""
A light wrapper for Cybersource SOAP Toolkit API
"""
from setuptools import setup
import pycybersource
setup(
name='pycybersource',
version=pycybersource.__version__,
description='A light wrapper for Cybersource SOAP Toolkit API',
author='Eric Bartels',
author_email='ebart... | <commit_before>#!/usr/bin/env python
"""
A light wrapper for Cybersource SOAP Toolkit API
"""
from setuptools import setup
import pycybersource
setup(
name='pycybersource',
version=pycybersource.__version__,
description='A light wrapper for Cybersource SOAP Toolkit API',
author='Eric Bartels',
auth... |
f13f80db99ed43479336b116e38512e3566e4623 | setup.py | setup.py | import subprocess
import sys
from setuptools import Command, setup
class RunTests(Command):
user_options = []
def initialize_options(self):
pass
def finalize_options(self):
pass
def run(self):
errno = subprocess.call([sys.executable, '-m', 'unittest', 'parserutils.tests.tes... | import subprocess
import sys
from setuptools import Command, setup
class RunTests(Command):
user_options = []
def initialize_options(self):
pass
def finalize_options(self):
pass
def run(self):
errno = subprocess.call([sys.executable, '-m', 'unittest', 'parserutils.tests.tes... | Enable markdown for PyPI README | Enable markdown for PyPI README | Python | bsd-3-clause | consbio/parserutils | import subprocess
import sys
from setuptools import Command, setup
class RunTests(Command):
user_options = []
def initialize_options(self):
pass
def finalize_options(self):
pass
def run(self):
errno = subprocess.call([sys.executable, '-m', 'unittest', 'parserutils.tests.tes... | import subprocess
import sys
from setuptools import Command, setup
class RunTests(Command):
user_options = []
def initialize_options(self):
pass
def finalize_options(self):
pass
def run(self):
errno = subprocess.call([sys.executable, '-m', 'unittest', 'parserutils.tests.tes... | <commit_before>import subprocess
import sys
from setuptools import Command, setup
class RunTests(Command):
user_options = []
def initialize_options(self):
pass
def finalize_options(self):
pass
def run(self):
errno = subprocess.call([sys.executable, '-m', 'unittest', 'parser... | import subprocess
import sys
from setuptools import Command, setup
class RunTests(Command):
user_options = []
def initialize_options(self):
pass
def finalize_options(self):
pass
def run(self):
errno = subprocess.call([sys.executable, '-m', 'unittest', 'parserutils.tests.tes... | import subprocess
import sys
from setuptools import Command, setup
class RunTests(Command):
user_options = []
def initialize_options(self):
pass
def finalize_options(self):
pass
def run(self):
errno = subprocess.call([sys.executable, '-m', 'unittest', 'parserutils.tests.tes... | <commit_before>import subprocess
import sys
from setuptools import Command, setup
class RunTests(Command):
user_options = []
def initialize_options(self):
pass
def finalize_options(self):
pass
def run(self):
errno = subprocess.call([sys.executable, '-m', 'unittest', 'parser... |
b7da1cac55665b71678abbda144c9f589e6c8b11 | setup.py | setup.py | #!/usr/bin/env python
from setuptools import setup, find_packages
version = '1.3'
long_desc = """
nose-perfdump is a Nose plugin that collects per-test performance metrics into an
SQLite3 database and reports the slowest tests, test files, and total time
spent in tests. It is designed to make profiling tests to im... | #!/usr/bin/env python
from setuptools import setup, find_packages
version = '1.3'
long_desc = """
nose-perfdump is a Nose plugin that collects per-test performance metrics into an
SQLite3 database and reports the slowest tests, test files, and total time
spent in tests. It is designed to make profiling tests to im... | Add Additional Dependencies To Setup | Add Additional Dependencies To Setup
| Python | bsd-3-clause | etscrivner/nose-perfdump | #!/usr/bin/env python
from setuptools import setup, find_packages
version = '1.3'
long_desc = """
nose-perfdump is a Nose plugin that collects per-test performance metrics into an
SQLite3 database and reports the slowest tests, test files, and total time
spent in tests. It is designed to make profiling tests to im... | #!/usr/bin/env python
from setuptools import setup, find_packages
version = '1.3'
long_desc = """
nose-perfdump is a Nose plugin that collects per-test performance metrics into an
SQLite3 database and reports the slowest tests, test files, and total time
spent in tests. It is designed to make profiling tests to im... | <commit_before>#!/usr/bin/env python
from setuptools import setup, find_packages
version = '1.3'
long_desc = """
nose-perfdump is a Nose plugin that collects per-test performance metrics into an
SQLite3 database and reports the slowest tests, test files, and total time
spent in tests. It is designed to make profil... | #!/usr/bin/env python
from setuptools import setup, find_packages
version = '1.3'
long_desc = """
nose-perfdump is a Nose plugin that collects per-test performance metrics into an
SQLite3 database and reports the slowest tests, test files, and total time
spent in tests. It is designed to make profiling tests to im... | #!/usr/bin/env python
from setuptools import setup, find_packages
version = '1.3'
long_desc = """
nose-perfdump is a Nose plugin that collects per-test performance metrics into an
SQLite3 database and reports the slowest tests, test files, and total time
spent in tests. It is designed to make profiling tests to im... | <commit_before>#!/usr/bin/env python
from setuptools import setup, find_packages
version = '1.3'
long_desc = """
nose-perfdump is a Nose plugin that collects per-test performance metrics into an
SQLite3 database and reports the slowest tests, test files, and total time
spent in tests. It is designed to make profil... |
d04d3ac7eefce9d37e2c62d68a856fafd41d3877 | setup.py | setup.py | from setuptools import setup
setup(
name='djangorestframework-httpsignature',
version='0.2.1',
url='https://github.com/etoccalino/django-rest-framework-httpsignature',
license='LICENSE.txt',
description='HTTP Signature support for Django REST framework',
long_description=open('README.rst').re... | from setuptools import setup
setup(
name='djangorestframework-httpsignature',
version='0.2.1',
url='https://github.com/etoccalino/django-rest-framework-httpsignature',
license='LICENSE.txt',
description='HTTP Signature support for Django REST framework',
long_description=open('README.rst').re... | Remove duplicate dependency specifications from install_requires | Remove duplicate dependency specifications from install_requires | Python | mit | pombredanne/django-rest-framework-httpsignature,etoccalino/django-rest-framework-httpsignature,etoccalino/django-rest-framework-httpsignature,pombredanne/django-rest-framework-httpsignature | from setuptools import setup
setup(
name='djangorestframework-httpsignature',
version='0.2.1',
url='https://github.com/etoccalino/django-rest-framework-httpsignature',
license='LICENSE.txt',
description='HTTP Signature support for Django REST framework',
long_description=open('README.rst').re... | from setuptools import setup
setup(
name='djangorestframework-httpsignature',
version='0.2.1',
url='https://github.com/etoccalino/django-rest-framework-httpsignature',
license='LICENSE.txt',
description='HTTP Signature support for Django REST framework',
long_description=open('README.rst').re... | <commit_before>from setuptools import setup
setup(
name='djangorestframework-httpsignature',
version='0.2.1',
url='https://github.com/etoccalino/django-rest-framework-httpsignature',
license='LICENSE.txt',
description='HTTP Signature support for Django REST framework',
long_description=open('... | from setuptools import setup
setup(
name='djangorestframework-httpsignature',
version='0.2.1',
url='https://github.com/etoccalino/django-rest-framework-httpsignature',
license='LICENSE.txt',
description='HTTP Signature support for Django REST framework',
long_description=open('README.rst').re... | from setuptools import setup
setup(
name='djangorestframework-httpsignature',
version='0.2.1',
url='https://github.com/etoccalino/django-rest-framework-httpsignature',
license='LICENSE.txt',
description='HTTP Signature support for Django REST framework',
long_description=open('README.rst').re... | <commit_before>from setuptools import setup
setup(
name='djangorestframework-httpsignature',
version='0.2.1',
url='https://github.com/etoccalino/django-rest-framework-httpsignature',
license='LICENSE.txt',
description='HTTP Signature support for Django REST framework',
long_description=open('... |
13e1fc4ca4ed80f24b6b1532d162197af8df55f2 | setup.py | setup.py | import os
from setuptools import setup, find_packages
def read(fname):
return open(os.path.join(os.path.dirname(__file__), fname)).read()
setup(
name='pyaavso',
version=__import__('pyaavso').__version__,
description='A Python library for working with AAVSO data.',
long_description=read('README.rst... | import os
from setuptools import setup, find_packages
def read(fname):
return open(os.path.join(os.path.dirname(__file__), fname)).read()
setup(
name='pyaavso',
version=__import__('pyaavso').__version__,
description='A Python library for working with AAVSO data.',
long_description=read('README.rst... | Mark compatibility with Python 3.6 | Mark compatibility with Python 3.6
| Python | mit | zsiciarz/pyaavso | import os
from setuptools import setup, find_packages
def read(fname):
return open(os.path.join(os.path.dirname(__file__), fname)).read()
setup(
name='pyaavso',
version=__import__('pyaavso').__version__,
description='A Python library for working with AAVSO data.',
long_description=read('README.rst... | import os
from setuptools import setup, find_packages
def read(fname):
return open(os.path.join(os.path.dirname(__file__), fname)).read()
setup(
name='pyaavso',
version=__import__('pyaavso').__version__,
description='A Python library for working with AAVSO data.',
long_description=read('README.rst... | <commit_before>import os
from setuptools import setup, find_packages
def read(fname):
return open(os.path.join(os.path.dirname(__file__), fname)).read()
setup(
name='pyaavso',
version=__import__('pyaavso').__version__,
description='A Python library for working with AAVSO data.',
long_description=r... | import os
from setuptools import setup, find_packages
def read(fname):
return open(os.path.join(os.path.dirname(__file__), fname)).read()
setup(
name='pyaavso',
version=__import__('pyaavso').__version__,
description='A Python library for working with AAVSO data.',
long_description=read('README.rst... | import os
from setuptools import setup, find_packages
def read(fname):
return open(os.path.join(os.path.dirname(__file__), fname)).read()
setup(
name='pyaavso',
version=__import__('pyaavso').__version__,
description='A Python library for working with AAVSO data.',
long_description=read('README.rst... | <commit_before>import os
from setuptools import setup, find_packages
def read(fname):
return open(os.path.join(os.path.dirname(__file__), fname)).read()
setup(
name='pyaavso',
version=__import__('pyaavso').__version__,
description='A Python library for working with AAVSO data.',
long_description=r... |
8da94ee88cf4bf768e16e21ad8b3626970692e27 | setup.py | setup.py | # -*- coding: utf-8 -*-
import os
from setuptools import setup
def read(fname):
try:
return open(os.path.join(os.path.dirname(__file__), fname)).read()
except:
return ''
setup(
name='todoist-python',
version='7.0.11',
packages=['todoist', 'todoist.managers'],
author='Doist Team... | # -*- coding: utf-8 -*-
import os
from setuptools import setup
def read(fname):
try:
return open(os.path.join(os.path.dirname(__file__), fname)).read()
except:
return ''
setup(
name='todoist-python',
version='7.0.12',
packages=['todoist', 'todoist.managers'],
author='Doist Team... | Update the PyPI version to 7.0.12. | Update the PyPI version to 7.0.12.
| Python | mit | Doist/todoist-python | # -*- coding: utf-8 -*-
import os
from setuptools import setup
def read(fname):
try:
return open(os.path.join(os.path.dirname(__file__), fname)).read()
except:
return ''
setup(
name='todoist-python',
version='7.0.11',
packages=['todoist', 'todoist.managers'],
author='Doist Team... | # -*- coding: utf-8 -*-
import os
from setuptools import setup
def read(fname):
try:
return open(os.path.join(os.path.dirname(__file__), fname)).read()
except:
return ''
setup(
name='todoist-python',
version='7.0.12',
packages=['todoist', 'todoist.managers'],
author='Doist Team... | <commit_before># -*- coding: utf-8 -*-
import os
from setuptools import setup
def read(fname):
try:
return open(os.path.join(os.path.dirname(__file__), fname)).read()
except:
return ''
setup(
name='todoist-python',
version='7.0.11',
packages=['todoist', 'todoist.managers'],
aut... | # -*- coding: utf-8 -*-
import os
from setuptools import setup
def read(fname):
try:
return open(os.path.join(os.path.dirname(__file__), fname)).read()
except:
return ''
setup(
name='todoist-python',
version='7.0.12',
packages=['todoist', 'todoist.managers'],
author='Doist Team... | # -*- coding: utf-8 -*-
import os
from setuptools import setup
def read(fname):
try:
return open(os.path.join(os.path.dirname(__file__), fname)).read()
except:
return ''
setup(
name='todoist-python',
version='7.0.11',
packages=['todoist', 'todoist.managers'],
author='Doist Team... | <commit_before># -*- coding: utf-8 -*-
import os
from setuptools import setup
def read(fname):
try:
return open(os.path.join(os.path.dirname(__file__), fname)).read()
except:
return ''
setup(
name='todoist-python',
version='7.0.11',
packages=['todoist', 'todoist.managers'],
aut... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.