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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
9810935ce1e9b871659148630742bda888c71408 | py/capnp/setup.py | py/capnp/setup.py | from setuptools import setup
from setuptools.extension import Extension
import buildtools
# You might also need to set PKG_CONFIG_PATH=/path/to/lib/pkgconfig if
# your capnp is installed in a non-default location
CAPNP = buildtools.read_pkg_config(['capnp'])
setup(
name = 'capnp',
packages = [
'cap... | from setuptools import setup
from setuptools.extension import Extension
import buildtools
# You might also need to set PKG_CONFIG_PATH=/path/to/lib/pkgconfig if
# your capnp is installed in a non-default location
CAPNP = buildtools.read_pkg_config(['capnp'])
setup(
name = 'capnp',
packages = [
'cap... | Fix py/capnp build for python 3.7 | Fix py/capnp build for python 3.7
| Python | mit | clchiou/garage,clchiou/garage,clchiou/garage,clchiou/garage | from setuptools import setup
from setuptools.extension import Extension
import buildtools
# You might also need to set PKG_CONFIG_PATH=/path/to/lib/pkgconfig if
# your capnp is installed in a non-default location
CAPNP = buildtools.read_pkg_config(['capnp'])
setup(
name = 'capnp',
packages = [
'cap... | from setuptools import setup
from setuptools.extension import Extension
import buildtools
# You might also need to set PKG_CONFIG_PATH=/path/to/lib/pkgconfig if
# your capnp is installed in a non-default location
CAPNP = buildtools.read_pkg_config(['capnp'])
setup(
name = 'capnp',
packages = [
'cap... | <commit_before>from setuptools import setup
from setuptools.extension import Extension
import buildtools
# You might also need to set PKG_CONFIG_PATH=/path/to/lib/pkgconfig if
# your capnp is installed in a non-default location
CAPNP = buildtools.read_pkg_config(['capnp'])
setup(
name = 'capnp',
packages =... | from setuptools import setup
from setuptools.extension import Extension
import buildtools
# You might also need to set PKG_CONFIG_PATH=/path/to/lib/pkgconfig if
# your capnp is installed in a non-default location
CAPNP = buildtools.read_pkg_config(['capnp'])
setup(
name = 'capnp',
packages = [
'cap... | from setuptools import setup
from setuptools.extension import Extension
import buildtools
# You might also need to set PKG_CONFIG_PATH=/path/to/lib/pkgconfig if
# your capnp is installed in a non-default location
CAPNP = buildtools.read_pkg_config(['capnp'])
setup(
name = 'capnp',
packages = [
'cap... | <commit_before>from setuptools import setup
from setuptools.extension import Extension
import buildtools
# You might also need to set PKG_CONFIG_PATH=/path/to/lib/pkgconfig if
# your capnp is installed in a non-default location
CAPNP = buildtools.read_pkg_config(['capnp'])
setup(
name = 'capnp',
packages =... |
fb0fa15ce9618aac58f45fee0ecda852f3b00ed6 | testdoc/tests/test_finder.py | testdoc/tests/test_finder.py | import unittest
from testdoc.finder import find_tests
class MockFinder(object):
def __init__(self):
self.log = []
def got_module(self, module):
self.log.append(('module', module))
def got_test_class(self, klass):
self.log.append(('class', klass))
def got_test(self, method):... | import unittest
from testdoc.finder import find_tests
class MockCollector(object):
def __init__(self):
self.log = []
def got_module(self, module):
self.log.append(('module', module))
def got_test_class(self, klass):
self.log.append(('class', klass))
def got_test(self, metho... | Document finder tests better and use better terminology (the thing that collects found objects isn't a finder, it's a collector) | Document finder tests better and use better terminology (the thing that
collects found objects isn't a finder, it's a collector)
| Python | mit | testing-cabal/testdoc | import unittest
from testdoc.finder import find_tests
class MockFinder(object):
def __init__(self):
self.log = []
def got_module(self, module):
self.log.append(('module', module))
def got_test_class(self, klass):
self.log.append(('class', klass))
def got_test(self, method):... | import unittest
from testdoc.finder import find_tests
class MockCollector(object):
def __init__(self):
self.log = []
def got_module(self, module):
self.log.append(('module', module))
def got_test_class(self, klass):
self.log.append(('class', klass))
def got_test(self, metho... | <commit_before>import unittest
from testdoc.finder import find_tests
class MockFinder(object):
def __init__(self):
self.log = []
def got_module(self, module):
self.log.append(('module', module))
def got_test_class(self, klass):
self.log.append(('class', klass))
def got_test... | import unittest
from testdoc.finder import find_tests
class MockCollector(object):
def __init__(self):
self.log = []
def got_module(self, module):
self.log.append(('module', module))
def got_test_class(self, klass):
self.log.append(('class', klass))
def got_test(self, metho... | import unittest
from testdoc.finder import find_tests
class MockFinder(object):
def __init__(self):
self.log = []
def got_module(self, module):
self.log.append(('module', module))
def got_test_class(self, klass):
self.log.append(('class', klass))
def got_test(self, method):... | <commit_before>import unittest
from testdoc.finder import find_tests
class MockFinder(object):
def __init__(self):
self.log = []
def got_module(self, module):
self.log.append(('module', module))
def got_test_class(self, klass):
self.log.append(('class', klass))
def got_test... |
1e6aeb9c7b07313a9efe7cb0e1380f4f2219c7dc | tests/utils.py | tests/utils.py | import os
from carrot.connection import BrokerConnection
AMQP_HOST = os.environ.get('AMQP_HOST', "localhost")
AMQP_PORT = os.environ.get('AMQP_PORT', 5672)
AMQP_VHOST = os.environ.get('AMQP_VHOST', "/")
AMQP_USER = os.environ.get('AMQP_USER', "guest")
AMQP_PASSWORD = os.environ.get('AMQP_PASSWORD', "guest")
STOMP_H... | import os
from carrot.connection import BrokerConnection
AMQP_HOST = os.environ.get('AMQP_HOST', "localhost")
AMQP_PORT = os.environ.get('AMQP_PORT', 5672)
AMQP_VHOST = os.environ.get('AMQP_VHOST', "/")
AMQP_USER = os.environ.get('AMQP_USER', "guest")
AMQP_PASSWORD = os.environ.get('AMQP_PASSWORD', "guest")
STOMP_H... | Add test configuration vars: STOMP_HOST + STOMP_PORT | Add test configuration vars: STOMP_HOST + STOMP_PORT
| Python | bsd-3-clause | ask/carrot,ask/carrot | import os
from carrot.connection import BrokerConnection
AMQP_HOST = os.environ.get('AMQP_HOST', "localhost")
AMQP_PORT = os.environ.get('AMQP_PORT', 5672)
AMQP_VHOST = os.environ.get('AMQP_VHOST', "/")
AMQP_USER = os.environ.get('AMQP_USER', "guest")
AMQP_PASSWORD = os.environ.get('AMQP_PASSWORD', "guest")
STOMP_H... | import os
from carrot.connection import BrokerConnection
AMQP_HOST = os.environ.get('AMQP_HOST', "localhost")
AMQP_PORT = os.environ.get('AMQP_PORT', 5672)
AMQP_VHOST = os.environ.get('AMQP_VHOST', "/")
AMQP_USER = os.environ.get('AMQP_USER', "guest")
AMQP_PASSWORD = os.environ.get('AMQP_PASSWORD', "guest")
STOMP_H... | <commit_before>import os
from carrot.connection import BrokerConnection
AMQP_HOST = os.environ.get('AMQP_HOST', "localhost")
AMQP_PORT = os.environ.get('AMQP_PORT', 5672)
AMQP_VHOST = os.environ.get('AMQP_VHOST', "/")
AMQP_USER = os.environ.get('AMQP_USER', "guest")
AMQP_PASSWORD = os.environ.get('AMQP_PASSWORD', "g... | import os
from carrot.connection import BrokerConnection
AMQP_HOST = os.environ.get('AMQP_HOST', "localhost")
AMQP_PORT = os.environ.get('AMQP_PORT', 5672)
AMQP_VHOST = os.environ.get('AMQP_VHOST', "/")
AMQP_USER = os.environ.get('AMQP_USER', "guest")
AMQP_PASSWORD = os.environ.get('AMQP_PASSWORD', "guest")
STOMP_H... | import os
from carrot.connection import BrokerConnection
AMQP_HOST = os.environ.get('AMQP_HOST', "localhost")
AMQP_PORT = os.environ.get('AMQP_PORT', 5672)
AMQP_VHOST = os.environ.get('AMQP_VHOST', "/")
AMQP_USER = os.environ.get('AMQP_USER', "guest")
AMQP_PASSWORD = os.environ.get('AMQP_PASSWORD', "guest")
STOMP_H... | <commit_before>import os
from carrot.connection import BrokerConnection
AMQP_HOST = os.environ.get('AMQP_HOST', "localhost")
AMQP_PORT = os.environ.get('AMQP_PORT', 5672)
AMQP_VHOST = os.environ.get('AMQP_VHOST', "/")
AMQP_USER = os.environ.get('AMQP_USER', "guest")
AMQP_PASSWORD = os.environ.get('AMQP_PASSWORD', "g... |
77fbacc85450e77ada5ac2c9c5ecc581ea2b480c | src/artgraph/plugins/infobox.py | src/artgraph/plugins/infobox.py | from artgraph.plugins.plugin import Plugin
class InfoboxPlugin(Plugin):
def __init__(self, node):
self._node = node
def get_nodes(self):
from artgraph.node import Node, NodeTypes
from artgraph.relationship import AssociatedActRelationship
wikicode = self.get_wi... | from artgraph.plugins.plugin import Plugin
class InfoboxPlugin(Plugin):
def __init__(self, node):
self._node = node
def get_nodes(self):
from artgraph.node import Node, NodeTypes
from artgraph.relationship import AssociatedActRelationship
wikicode = self.get_wi... | Use string as node title instead of wikicode | Use string as node title instead of wikicode | Python | mit | dMaggot/ArtistGraph | from artgraph.plugins.plugin import Plugin
class InfoboxPlugin(Plugin):
def __init__(self, node):
self._node = node
def get_nodes(self):
from artgraph.node import Node, NodeTypes
from artgraph.relationship import AssociatedActRelationship
wikicode = self.get_wi... | from artgraph.plugins.plugin import Plugin
class InfoboxPlugin(Plugin):
def __init__(self, node):
self._node = node
def get_nodes(self):
from artgraph.node import Node, NodeTypes
from artgraph.relationship import AssociatedActRelationship
wikicode = self.get_wi... | <commit_before>from artgraph.plugins.plugin import Plugin
class InfoboxPlugin(Plugin):
def __init__(self, node):
self._node = node
def get_nodes(self):
from artgraph.node import Node, NodeTypes
from artgraph.relationship import AssociatedActRelationship
wikicod... | from artgraph.plugins.plugin import Plugin
class InfoboxPlugin(Plugin):
def __init__(self, node):
self._node = node
def get_nodes(self):
from artgraph.node import Node, NodeTypes
from artgraph.relationship import AssociatedActRelationship
wikicode = self.get_wi... | from artgraph.plugins.plugin import Plugin
class InfoboxPlugin(Plugin):
def __init__(self, node):
self._node = node
def get_nodes(self):
from artgraph.node import Node, NodeTypes
from artgraph.relationship import AssociatedActRelationship
wikicode = self.get_wi... | <commit_before>from artgraph.plugins.plugin import Plugin
class InfoboxPlugin(Plugin):
def __init__(self, node):
self._node = node
def get_nodes(self):
from artgraph.node import Node, NodeTypes
from artgraph.relationship import AssociatedActRelationship
wikicod... |
1159939ebd193eef809d5d0f27fcb9ef60b7e283 | src/auspex/instruments/utils.py | src/auspex/instruments/utils.py | from . import bbn
import auspex.config
from auspex.log import logger
from QGL import *
ChannelLibrary()
def pulse_marker(marker_name, length = 100e-9):
""" Utility to generate a square pulse on a APS2 marker. Used for instance to switch a signal between spectrum analyzer and input line
marker_name as defined i... | from . import bbn
import auspex.config
from auspex.log import logger
def pulse_marker(marker_name, length = 100e-9):
""" Utility to generate a square pulse on a APS2 marker. Used for instance to switch a signal between spectrum analyzer and input line
marker_name as defined in measure.yaml """
from QGL im... | Move QGL import inside function | Move QGL import inside function
A channel library is not always available
| Python | apache-2.0 | BBN-Q/Auspex,BBN-Q/Auspex,BBN-Q/Auspex,BBN-Q/Auspex | from . import bbn
import auspex.config
from auspex.log import logger
from QGL import *
ChannelLibrary()
def pulse_marker(marker_name, length = 100e-9):
""" Utility to generate a square pulse on a APS2 marker. Used for instance to switch a signal between spectrum analyzer and input line
marker_name as defined i... | from . import bbn
import auspex.config
from auspex.log import logger
def pulse_marker(marker_name, length = 100e-9):
""" Utility to generate a square pulse on a APS2 marker. Used for instance to switch a signal between spectrum analyzer and input line
marker_name as defined in measure.yaml """
from QGL im... | <commit_before>from . import bbn
import auspex.config
from auspex.log import logger
from QGL import *
ChannelLibrary()
def pulse_marker(marker_name, length = 100e-9):
""" Utility to generate a square pulse on a APS2 marker. Used for instance to switch a signal between spectrum analyzer and input line
marker_na... | from . import bbn
import auspex.config
from auspex.log import logger
def pulse_marker(marker_name, length = 100e-9):
""" Utility to generate a square pulse on a APS2 marker. Used for instance to switch a signal between spectrum analyzer and input line
marker_name as defined in measure.yaml """
from QGL im... | from . import bbn
import auspex.config
from auspex.log import logger
from QGL import *
ChannelLibrary()
def pulse_marker(marker_name, length = 100e-9):
""" Utility to generate a square pulse on a APS2 marker. Used for instance to switch a signal between spectrum analyzer and input line
marker_name as defined i... | <commit_before>from . import bbn
import auspex.config
from auspex.log import logger
from QGL import *
ChannelLibrary()
def pulse_marker(marker_name, length = 100e-9):
""" Utility to generate a square pulse on a APS2 marker. Used for instance to switch a signal between spectrum analyzer and input line
marker_na... |
8dcab3b18b603e520f12c3fd5a873a08f32d4a9a | nnsave_app/urls.py | nnsave_app/urls.py | from django.conf.urls import url
from . import views
urlpatterns = [
url(r'^$', views.index, name='index'),
url(r'^location$',views.location, name='location'),
]
| from django.conf.urls import url
from . import views
urlpatterns = [
url(r'^$', views.index, name='index'),
url(r'^locations/?(?P<id>[0-9]+)?$',views.location, name='location'),
]
| Add id parameter to URL | Add id parameter to URL
| Python | mit | legonigel/nnsave_backend,legonigel/nnsave_backend,legonigel/nnsave_backend,legonigel/nnsave_backend | from django.conf.urls import url
from . import views
urlpatterns = [
url(r'^$', views.index, name='index'),
url(r'^location$',views.location, name='location'),
]
Add id parameter to URL | from django.conf.urls import url
from . import views
urlpatterns = [
url(r'^$', views.index, name='index'),
url(r'^locations/?(?P<id>[0-9]+)?$',views.location, name='location'),
]
| <commit_before>from django.conf.urls import url
from . import views
urlpatterns = [
url(r'^$', views.index, name='index'),
url(r'^location$',views.location, name='location'),
]
<commit_msg>Add id parameter to URL<commit_after> | from django.conf.urls import url
from . import views
urlpatterns = [
url(r'^$', views.index, name='index'),
url(r'^locations/?(?P<id>[0-9]+)?$',views.location, name='location'),
]
| from django.conf.urls import url
from . import views
urlpatterns = [
url(r'^$', views.index, name='index'),
url(r'^location$',views.location, name='location'),
]
Add id parameter to URLfrom django.conf.urls import url
from . import views
urlpatterns = [
url(r'^$', views.index, name='index'),
url(r'^... | <commit_before>from django.conf.urls import url
from . import views
urlpatterns = [
url(r'^$', views.index, name='index'),
url(r'^location$',views.location, name='location'),
]
<commit_msg>Add id parameter to URL<commit_after>from django.conf.urls import url
from . import views
urlpatterns = [
url(r'^$'... |
17b9749f2a36499c74effc27ec442a4bb957e877 | typescript/commands/build.py | typescript/commands/build.py | import sublime_plugin
from ..libs.global_vars import *
from ..libs import cli
class TypescriptBuildCommand(sublime_plugin.WindowCommand):
def run(self):
if get_node_path() is None:
print("Cannot found node. Build cancelled.")
return
file_name = self.window.active_view().f... | import sublime_plugin
from ..libs.global_vars import *
from ..libs import cli
class TypescriptBuildCommand(sublime_plugin.WindowCommand):
def run(self):
if get_node_path() is None:
print("Cannot found node. Build cancelled.")
return
file_name = self.window.active_view().f... | Remove shell requirement to avoid escaping | Remove shell requirement to avoid escaping
| Python | apache-2.0 | fongandrew/TypeScript-Sublime-JSX-Plugin,Microsoft/TypeScript-Sublime-Plugin,fongandrew/TypeScript-Sublime-JSX-Plugin,zhengbli/TypeScript-Sublime-Plugin,kungfusheep/TypeScript-Sublime-Plugin,RyanCavanaugh/TypeScript-Sublime-Plugin,zhengbli/TypeScript-Sublime-Plugin,kungfusheep/TypeScript-Sublime-Plugin,RyanCavanaugh/Ty... | import sublime_plugin
from ..libs.global_vars import *
from ..libs import cli
class TypescriptBuildCommand(sublime_plugin.WindowCommand):
def run(self):
if get_node_path() is None:
print("Cannot found node. Build cancelled.")
return
file_name = self.window.active_view().f... | import sublime_plugin
from ..libs.global_vars import *
from ..libs import cli
class TypescriptBuildCommand(sublime_plugin.WindowCommand):
def run(self):
if get_node_path() is None:
print("Cannot found node. Build cancelled.")
return
file_name = self.window.active_view().f... | <commit_before>import sublime_plugin
from ..libs.global_vars import *
from ..libs import cli
class TypescriptBuildCommand(sublime_plugin.WindowCommand):
def run(self):
if get_node_path() is None:
print("Cannot found node. Build cancelled.")
return
file_name = self.window.... | import sublime_plugin
from ..libs.global_vars import *
from ..libs import cli
class TypescriptBuildCommand(sublime_plugin.WindowCommand):
def run(self):
if get_node_path() is None:
print("Cannot found node. Build cancelled.")
return
file_name = self.window.active_view().f... | import sublime_plugin
from ..libs.global_vars import *
from ..libs import cli
class TypescriptBuildCommand(sublime_plugin.WindowCommand):
def run(self):
if get_node_path() is None:
print("Cannot found node. Build cancelled.")
return
file_name = self.window.active_view().f... | <commit_before>import sublime_plugin
from ..libs.global_vars import *
from ..libs import cli
class TypescriptBuildCommand(sublime_plugin.WindowCommand):
def run(self):
if get_node_path() is None:
print("Cannot found node. Build cancelled.")
return
file_name = self.window.... |
a14fcec19471bffcb1dcbad1d0cff7100d0ef6bc | web/blueprints/host/forms.py | web/blueprints/host/forms.py | from wtforms.validators import DataRequired, Optional
from web.blueprints.facilities.forms import SelectRoomForm
from web.form.fields.core import TextField, QuerySelectField, \
SelectMultipleField
from web.form.fields.custom import UserIDField, MacField
from flask_wtf import FlaskForm as Form
from web.form.fields... | from wtforms.validators import DataRequired, Optional
from web.blueprints.facilities.forms import SelectRoomForm
from web.form.fields.core import TextField, QuerySelectField, \
SelectMultipleField
from web.form.fields.custom import UserIDField, MacField
from flask_wtf import FlaskForm as Form
from web.form.fields... | Make interface name optional and remove unicode prefixes | Make interface name optional and remove unicode prefixes
| Python | apache-2.0 | agdsn/pycroft,agdsn/pycroft,agdsn/pycroft,agdsn/pycroft,agdsn/pycroft | from wtforms.validators import DataRequired, Optional
from web.blueprints.facilities.forms import SelectRoomForm
from web.form.fields.core import TextField, QuerySelectField, \
SelectMultipleField
from web.form.fields.custom import UserIDField, MacField
from flask_wtf import FlaskForm as Form
from web.form.fields... | from wtforms.validators import DataRequired, Optional
from web.blueprints.facilities.forms import SelectRoomForm
from web.form.fields.core import TextField, QuerySelectField, \
SelectMultipleField
from web.form.fields.custom import UserIDField, MacField
from flask_wtf import FlaskForm as Form
from web.form.fields... | <commit_before>from wtforms.validators import DataRequired, Optional
from web.blueprints.facilities.forms import SelectRoomForm
from web.form.fields.core import TextField, QuerySelectField, \
SelectMultipleField
from web.form.fields.custom import UserIDField, MacField
from flask_wtf import FlaskForm as Form
from ... | from wtforms.validators import DataRequired, Optional
from web.blueprints.facilities.forms import SelectRoomForm
from web.form.fields.core import TextField, QuerySelectField, \
SelectMultipleField
from web.form.fields.custom import UserIDField, MacField
from flask_wtf import FlaskForm as Form
from web.form.fields... | from wtforms.validators import DataRequired, Optional
from web.blueprints.facilities.forms import SelectRoomForm
from web.form.fields.core import TextField, QuerySelectField, \
SelectMultipleField
from web.form.fields.custom import UserIDField, MacField
from flask_wtf import FlaskForm as Form
from web.form.fields... | <commit_before>from wtforms.validators import DataRequired, Optional
from web.blueprints.facilities.forms import SelectRoomForm
from web.form.fields.core import TextField, QuerySelectField, \
SelectMultipleField
from web.form.fields.custom import UserIDField, MacField
from flask_wtf import FlaskForm as Form
from ... |
75b4df9437ca277709e9b61fbb9aa5c20d96820e | wallace/app.py | wallace/app.py | from flask import Flask
import experiments
import db
app = Flask(__name__)
session = db.init_db(drop_all=True)
@app.route('/')
def index():
return 'Index page'
@app.route('/demo2')
def start():
experiment = experiments.Demo2(session)
experiment.add_and_trigger_sources() # Add any sources
proc... | from flask import Flask
import experiments
import db
app = Flask(__name__)
session = db.init_db(drop_all=True)
@app.route('/')
def index():
return 'Index page'
@app.route('/demo2')
def start():
experiment = experiments.Demo2(session)
experiment.add_and_trigger_sources() # Add any sources
proc... | Put Flask in debug mode | Put Flask in debug mode
| Python | mit | jcpeterson/Dallinger,suchow/Wallace,Dallinger/Dallinger,Dallinger/Dallinger,jcpeterson/Dallinger,Dallinger/Dallinger,jcpeterson/Dallinger,Dallinger/Dallinger,berkeley-cocosci/Wallace,berkeley-cocosci/Wallace,Dallinger/Dallinger,suchow/Wallace,jcpeterson/Dallinger,suchow/Wallace,jcpeterson/Dallinger,berkeley-cocosci/Wal... | from flask import Flask
import experiments
import db
app = Flask(__name__)
session = db.init_db(drop_all=True)
@app.route('/')
def index():
return 'Index page'
@app.route('/demo2')
def start():
experiment = experiments.Demo2(session)
experiment.add_and_trigger_sources() # Add any sources
proc... | from flask import Flask
import experiments
import db
app = Flask(__name__)
session = db.init_db(drop_all=True)
@app.route('/')
def index():
return 'Index page'
@app.route('/demo2')
def start():
experiment = experiments.Demo2(session)
experiment.add_and_trigger_sources() # Add any sources
proc... | <commit_before>from flask import Flask
import experiments
import db
app = Flask(__name__)
session = db.init_db(drop_all=True)
@app.route('/')
def index():
return 'Index page'
@app.route('/demo2')
def start():
experiment = experiments.Demo2(session)
experiment.add_and_trigger_sources() # Add any s... | from flask import Flask
import experiments
import db
app = Flask(__name__)
session = db.init_db(drop_all=True)
@app.route('/')
def index():
return 'Index page'
@app.route('/demo2')
def start():
experiment = experiments.Demo2(session)
experiment.add_and_trigger_sources() # Add any sources
proc... | from flask import Flask
import experiments
import db
app = Flask(__name__)
session = db.init_db(drop_all=True)
@app.route('/')
def index():
return 'Index page'
@app.route('/demo2')
def start():
experiment = experiments.Demo2(session)
experiment.add_and_trigger_sources() # Add any sources
proc... | <commit_before>from flask import Flask
import experiments
import db
app = Flask(__name__)
session = db.init_db(drop_all=True)
@app.route('/')
def index():
return 'Index page'
@app.route('/demo2')
def start():
experiment = experiments.Demo2(session)
experiment.add_and_trigger_sources() # Add any s... |
2f18718f2650c3f5a34748588839899d09cac588 | tests/fields/test_strings.py | tests/fields/test_strings.py | import steel
import unittest
class BytesTests(unittest.TestCase):
def test_encode(self):
field = steel.Bytes(size=3)
self.assertEqual(field.encode(b'abc'), b'abc')
def test_decode(self):
field = steel.Bytes(size=3)
self.assertEqual(field.decode(b'abc'), b'abc')
| import steel
import unittest
class BytesTests(unittest.TestCase):
def test_encode(self):
field = steel.Bytes(size=3)
self.assertEqual(field.encode(b'abc'), b'abc')
def test_decode(self):
field = steel.Bytes(size=3)
self.assertEqual(field.decode(b'abc'), b'ac')
| Break a test to see if Travis picks it up | Break a test to see if Travis picks it up
| Python | bsd-3-clause | gulopine/steel-experiment | import steel
import unittest
class BytesTests(unittest.TestCase):
def test_encode(self):
field = steel.Bytes(size=3)
self.assertEqual(field.encode(b'abc'), b'abc')
def test_decode(self):
field = steel.Bytes(size=3)
self.assertEqual(field.decode(b'abc'), b'abc')
Break a test t... | import steel
import unittest
class BytesTests(unittest.TestCase):
def test_encode(self):
field = steel.Bytes(size=3)
self.assertEqual(field.encode(b'abc'), b'abc')
def test_decode(self):
field = steel.Bytes(size=3)
self.assertEqual(field.decode(b'abc'), b'ac')
| <commit_before>import steel
import unittest
class BytesTests(unittest.TestCase):
def test_encode(self):
field = steel.Bytes(size=3)
self.assertEqual(field.encode(b'abc'), b'abc')
def test_decode(self):
field = steel.Bytes(size=3)
self.assertEqual(field.decode(b'abc'), b'abc')
... | import steel
import unittest
class BytesTests(unittest.TestCase):
def test_encode(self):
field = steel.Bytes(size=3)
self.assertEqual(field.encode(b'abc'), b'abc')
def test_decode(self):
field = steel.Bytes(size=3)
self.assertEqual(field.decode(b'abc'), b'ac')
| import steel
import unittest
class BytesTests(unittest.TestCase):
def test_encode(self):
field = steel.Bytes(size=3)
self.assertEqual(field.encode(b'abc'), b'abc')
def test_decode(self):
field = steel.Bytes(size=3)
self.assertEqual(field.decode(b'abc'), b'abc')
Break a test t... | <commit_before>import steel
import unittest
class BytesTests(unittest.TestCase):
def test_encode(self):
field = steel.Bytes(size=3)
self.assertEqual(field.encode(b'abc'), b'abc')
def test_decode(self):
field = steel.Bytes(size=3)
self.assertEqual(field.decode(b'abc'), b'abc')
... |
e7766ce068eabea30c81ba699c77ed2fe488d69d | yacs/settings/development.py | yacs/settings/development.py | from yacs.settings.base import settings
__all__ = ['settings']
with settings as s:
s.DEBUG = True
s.MIDDLEWARE_CLASSES += (
'devserver.middleware.DevServerMiddleware',
)
@s.lazy_eval
def debug_install_apps(s):
if s.DEBUG:
s.INSTALLED_APPS += (
'django_... | from yacs.settings.base import settings
__all__ = ['settings']
with settings as s:
s.DEBUG = True
s.MIDDLEWARE_CLASSES += (
'devserver.middleware.DevServerMiddleware',
)
@s.lazy_eval
def debug_install_apps(s):
if s.DEBUG:
s.INSTALLED_APPS += (
'django_... | Revert "corrected database settings merge again" | Revert "corrected database settings merge again"
This reverts commit 8d04d1c731aaed33c586993002f5e713c3fa1408.
| Python | mit | JGrippo/YACS,jeffh/YACS,jeffh/YACS,JGrippo/YACS,jeffh/YACS,JGrippo/YACS,JGrippo/YACS,jeffh/YACS | from yacs.settings.base import settings
__all__ = ['settings']
with settings as s:
s.DEBUG = True
s.MIDDLEWARE_CLASSES += (
'devserver.middleware.DevServerMiddleware',
)
@s.lazy_eval
def debug_install_apps(s):
if s.DEBUG:
s.INSTALLED_APPS += (
'django_... | from yacs.settings.base import settings
__all__ = ['settings']
with settings as s:
s.DEBUG = True
s.MIDDLEWARE_CLASSES += (
'devserver.middleware.DevServerMiddleware',
)
@s.lazy_eval
def debug_install_apps(s):
if s.DEBUG:
s.INSTALLED_APPS += (
'django_... | <commit_before>from yacs.settings.base import settings
__all__ = ['settings']
with settings as s:
s.DEBUG = True
s.MIDDLEWARE_CLASSES += (
'devserver.middleware.DevServerMiddleware',
)
@s.lazy_eval
def debug_install_apps(s):
if s.DEBUG:
s.INSTALLED_APPS += (
... | from yacs.settings.base import settings
__all__ = ['settings']
with settings as s:
s.DEBUG = True
s.MIDDLEWARE_CLASSES += (
'devserver.middleware.DevServerMiddleware',
)
@s.lazy_eval
def debug_install_apps(s):
if s.DEBUG:
s.INSTALLED_APPS += (
'django_... | from yacs.settings.base import settings
__all__ = ['settings']
with settings as s:
s.DEBUG = True
s.MIDDLEWARE_CLASSES += (
'devserver.middleware.DevServerMiddleware',
)
@s.lazy_eval
def debug_install_apps(s):
if s.DEBUG:
s.INSTALLED_APPS += (
'django_... | <commit_before>from yacs.settings.base import settings
__all__ = ['settings']
with settings as s:
s.DEBUG = True
s.MIDDLEWARE_CLASSES += (
'devserver.middleware.DevServerMiddleware',
)
@s.lazy_eval
def debug_install_apps(s):
if s.DEBUG:
s.INSTALLED_APPS += (
... |
1e3f60518402835336c16017b5ba172dc0ef6087 | opps/core/admin.py | opps/core/admin.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from django.contrib import admin
from django.utils import timezone
from django.conf import settings
from django.contrib.sites.models import Site
from django.contrib.auth import get_user_model
class PublishableAdmin(admin.ModelAdmin):
"""
Overrides standard admin.M... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from django.contrib import admin
from django.utils import timezone
from django.conf import settings
from django.contrib.sites.models import Site
from django.contrib.auth import get_user_model
class PublishableAdmin(admin.ModelAdmin):
"""
Overrides standard admin.M... | Remove prin on save_model PublishableAdmin | Remove prin on save_model PublishableAdmin
| Python | mit | jeanmask/opps,YACOWS/opps,opps/opps,YACOWS/opps,YACOWS/opps,williamroot/opps,williamroot/opps,opps/opps,williamroot/opps,jeanmask/opps,jeanmask/opps,opps/opps,jeanmask/opps,YACOWS/opps,opps/opps,williamroot/opps | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from django.contrib import admin
from django.utils import timezone
from django.conf import settings
from django.contrib.sites.models import Site
from django.contrib.auth import get_user_model
class PublishableAdmin(admin.ModelAdmin):
"""
Overrides standard admin.M... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from django.contrib import admin
from django.utils import timezone
from django.conf import settings
from django.contrib.sites.models import Site
from django.contrib.auth import get_user_model
class PublishableAdmin(admin.ModelAdmin):
"""
Overrides standard admin.M... | <commit_before>#!/usr/bin/env python
# -*- coding: utf-8 -*-
from django.contrib import admin
from django.utils import timezone
from django.conf import settings
from django.contrib.sites.models import Site
from django.contrib.auth import get_user_model
class PublishableAdmin(admin.ModelAdmin):
"""
Overrides s... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from django.contrib import admin
from django.utils import timezone
from django.conf import settings
from django.contrib.sites.models import Site
from django.contrib.auth import get_user_model
class PublishableAdmin(admin.ModelAdmin):
"""
Overrides standard admin.M... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from django.contrib import admin
from django.utils import timezone
from django.conf import settings
from django.contrib.sites.models import Site
from django.contrib.auth import get_user_model
class PublishableAdmin(admin.ModelAdmin):
"""
Overrides standard admin.M... | <commit_before>#!/usr/bin/env python
# -*- coding: utf-8 -*-
from django.contrib import admin
from django.utils import timezone
from django.conf import settings
from django.contrib.sites.models import Site
from django.contrib.auth import get_user_model
class PublishableAdmin(admin.ModelAdmin):
"""
Overrides s... |
da01999b6adcb79955a416ce3b3de50769adfe34 | opps/core/utils.py | opps/core/utils.py | # coding: utf-8
from django.db.models import get_models, get_app
def get_app_model(appname, suffix=""):
app_label = appname.split('.')[-1]
models = [model for model in get_models(get_app(app_label))
if (model.__name__.endswith(suffix) or not suffix)
and model._meta.app_label == ap... | # coding: utf-8
from django.db.models import get_models, get_app
from django.template import loader, TemplateDoesNotExist
def get_app_model(appname, suffix=""):
app_label = appname.split('.')[-1]
models = [model for model in get_models(get_app(app_label))
if (model.__name__.endswith(suffix) or ... | Add new module, get template path return absolut file path | Add new module, get template path
return absolut file path
| Python | mit | opps/opps,jeanmask/opps,YACOWS/opps,YACOWS/opps,YACOWS/opps,opps/opps,YACOWS/opps,williamroot/opps,jeanmask/opps,williamroot/opps,opps/opps,jeanmask/opps,williamroot/opps,opps/opps,jeanmask/opps,williamroot/opps | # coding: utf-8
from django.db.models import get_models, get_app
def get_app_model(appname, suffix=""):
app_label = appname.split('.')[-1]
models = [model for model in get_models(get_app(app_label))
if (model.__name__.endswith(suffix) or not suffix)
and model._meta.app_label == ap... | # coding: utf-8
from django.db.models import get_models, get_app
from django.template import loader, TemplateDoesNotExist
def get_app_model(appname, suffix=""):
app_label = appname.split('.')[-1]
models = [model for model in get_models(get_app(app_label))
if (model.__name__.endswith(suffix) or ... | <commit_before># coding: utf-8
from django.db.models import get_models, get_app
def get_app_model(appname, suffix=""):
app_label = appname.split('.')[-1]
models = [model for model in get_models(get_app(app_label))
if (model.__name__.endswith(suffix) or not suffix)
and model._meta.... | # coding: utf-8
from django.db.models import get_models, get_app
from django.template import loader, TemplateDoesNotExist
def get_app_model(appname, suffix=""):
app_label = appname.split('.')[-1]
models = [model for model in get_models(get_app(app_label))
if (model.__name__.endswith(suffix) or ... | # coding: utf-8
from django.db.models import get_models, get_app
def get_app_model(appname, suffix=""):
app_label = appname.split('.')[-1]
models = [model for model in get_models(get_app(app_label))
if (model.__name__.endswith(suffix) or not suffix)
and model._meta.app_label == ap... | <commit_before># coding: utf-8
from django.db.models import get_models, get_app
def get_app_model(appname, suffix=""):
app_label = appname.split('.')[-1]
models = [model for model in get_models(get_app(app_label))
if (model.__name__.endswith(suffix) or not suffix)
and model._meta.... |
379be172944f8ae0111842e199470effd4afdaf5 | rest/authUtils.py | rest/authUtils.py | # Author: Braedy Kuzma
from rest_framework import authentication
from rest_framework import exceptions
from ipware.ip import get_ip
from .models import RemoteNode
class nodeToNodeBasicAuth(authentication.BaseAuthentication):
def authenticate(self, request):
"""
This is an authentication backend fo... | # Author: Braedy Kuzma
import base64
from rest_framework import authentication
from rest_framework import exceptions
from ipware.ip import get_ip
from .models import RemoteNode
def createBasicAuthToken(username, password):
"""
This creates an HTTP Basic Auth token from a username and password.
"""
# ... | Add basic auth create and parse utils. | Add basic auth create and parse utils.
| Python | apache-2.0 | CMPUT404W17T06/CMPUT404-project,CMPUT404W17T06/CMPUT404-project,CMPUT404W17T06/CMPUT404-project | # Author: Braedy Kuzma
from rest_framework import authentication
from rest_framework import exceptions
from ipware.ip import get_ip
from .models import RemoteNode
class nodeToNodeBasicAuth(authentication.BaseAuthentication):
def authenticate(self, request):
"""
This is an authentication backend fo... | # Author: Braedy Kuzma
import base64
from rest_framework import authentication
from rest_framework import exceptions
from ipware.ip import get_ip
from .models import RemoteNode
def createBasicAuthToken(username, password):
"""
This creates an HTTP Basic Auth token from a username and password.
"""
# ... | <commit_before># Author: Braedy Kuzma
from rest_framework import authentication
from rest_framework import exceptions
from ipware.ip import get_ip
from .models import RemoteNode
class nodeToNodeBasicAuth(authentication.BaseAuthentication):
def authenticate(self, request):
"""
This is an authentica... | # Author: Braedy Kuzma
import base64
from rest_framework import authentication
from rest_framework import exceptions
from ipware.ip import get_ip
from .models import RemoteNode
def createBasicAuthToken(username, password):
"""
This creates an HTTP Basic Auth token from a username and password.
"""
# ... | # Author: Braedy Kuzma
from rest_framework import authentication
from rest_framework import exceptions
from ipware.ip import get_ip
from .models import RemoteNode
class nodeToNodeBasicAuth(authentication.BaseAuthentication):
def authenticate(self, request):
"""
This is an authentication backend fo... | <commit_before># Author: Braedy Kuzma
from rest_framework import authentication
from rest_framework import exceptions
from ipware.ip import get_ip
from .models import RemoteNode
class nodeToNodeBasicAuth(authentication.BaseAuthentication):
def authenticate(self, request):
"""
This is an authentica... |
a312348380a495c99c1be8adca331e2eec2d1720 | topo/tests/__init__.py | topo/tests/__init__.py | """
Unit tests for Topographica
$Id$
"""
__version__='$Revision$'
### JABALERT!
###
### Should change this to be like topo/patterns/__init__.py, i.e.
### to automatically discover the test files. That way new tests
### can be just dropped in.
import unittest, os
import testboundingregion
import testdummy
import tes... | """
Unit tests for Topographica
$Id$
"""
__version__='$Revision$'
### JABALERT!
###
### Should change this to be like topo/patterns/__init__.py, i.e.
### to automatically discover the test files. That way new tests
### can be just dropped in.
import unittest, os
import testboundingregion
import testdummy
import tes... | Test of optimized output functions runs automatically. | Test of optimized output functions runs automatically.
| Python | bsd-3-clause | ioam/svn-history,ioam/svn-history,ioam/svn-history,ioam/svn-history,ioam/svn-history | """
Unit tests for Topographica
$Id$
"""
__version__='$Revision$'
### JABALERT!
###
### Should change this to be like topo/patterns/__init__.py, i.e.
### to automatically discover the test files. That way new tests
### can be just dropped in.
import unittest, os
import testboundingregion
import testdummy
import tes... | """
Unit tests for Topographica
$Id$
"""
__version__='$Revision$'
### JABALERT!
###
### Should change this to be like topo/patterns/__init__.py, i.e.
### to automatically discover the test files. That way new tests
### can be just dropped in.
import unittest, os
import testboundingregion
import testdummy
import tes... | <commit_before>"""
Unit tests for Topographica
$Id$
"""
__version__='$Revision$'
### JABALERT!
###
### Should change this to be like topo/patterns/__init__.py, i.e.
### to automatically discover the test files. That way new tests
### can be just dropped in.
import unittest, os
import testboundingregion
import testd... | """
Unit tests for Topographica
$Id$
"""
__version__='$Revision$'
### JABALERT!
###
### Should change this to be like topo/patterns/__init__.py, i.e.
### to automatically discover the test files. That way new tests
### can be just dropped in.
import unittest, os
import testboundingregion
import testdummy
import tes... | """
Unit tests for Topographica
$Id$
"""
__version__='$Revision$'
### JABALERT!
###
### Should change this to be like topo/patterns/__init__.py, i.e.
### to automatically discover the test files. That way new tests
### can be just dropped in.
import unittest, os
import testboundingregion
import testdummy
import tes... | <commit_before>"""
Unit tests for Topographica
$Id$
"""
__version__='$Revision$'
### JABALERT!
###
### Should change this to be like topo/patterns/__init__.py, i.e.
### to automatically discover the test files. That way new tests
### can be just dropped in.
import unittest, os
import testboundingregion
import testd... |
80448aa6664d13dd58ed42c06248ca4532431aab | dakota_utils/convert.py | dakota_utils/convert.py | #! /usr/bin/env python
#
# Dakota utility programs for converting output.
#
# Mark Piper ([email protected])
import shutil
from subprocess import check_call, CalledProcessError
from dakota_utils.read import get_names
def has_interface_column(tab_file):
'''
Returns True if the tabular output file has th... | #! /usr/bin/env python
#
# Dakota utility programs for converting output.
#
# Mark Piper ([email protected])
import shutil
from subprocess import check_call, CalledProcessError
from .read import get_names
def has_interface_column(tab_file):
'''
Returns True if the tabular output file has the v6.1 'inte... | Use a relative import to get the read module | Use a relative import to get the read module
| Python | mit | mdpiper/dakota-experiments,mdpiper/dakota-experiments,mcflugen/dakota-experiments,mdpiper/dakota-experiments,mcflugen/dakota-experiments | #! /usr/bin/env python
#
# Dakota utility programs for converting output.
#
# Mark Piper ([email protected])
import shutil
from subprocess import check_call, CalledProcessError
from dakota_utils.read import get_names
def has_interface_column(tab_file):
'''
Returns True if the tabular output file has th... | #! /usr/bin/env python
#
# Dakota utility programs for converting output.
#
# Mark Piper ([email protected])
import shutil
from subprocess import check_call, CalledProcessError
from .read import get_names
def has_interface_column(tab_file):
'''
Returns True if the tabular output file has the v6.1 'inte... | <commit_before>#! /usr/bin/env python
#
# Dakota utility programs for converting output.
#
# Mark Piper ([email protected])
import shutil
from subprocess import check_call, CalledProcessError
from dakota_utils.read import get_names
def has_interface_column(tab_file):
'''
Returns True if the tabular out... | #! /usr/bin/env python
#
# Dakota utility programs for converting output.
#
# Mark Piper ([email protected])
import shutil
from subprocess import check_call, CalledProcessError
from .read import get_names
def has_interface_column(tab_file):
'''
Returns True if the tabular output file has the v6.1 'inte... | #! /usr/bin/env python
#
# Dakota utility programs for converting output.
#
# Mark Piper ([email protected])
import shutil
from subprocess import check_call, CalledProcessError
from dakota_utils.read import get_names
def has_interface_column(tab_file):
'''
Returns True if the tabular output file has th... | <commit_before>#! /usr/bin/env python
#
# Dakota utility programs for converting output.
#
# Mark Piper ([email protected])
import shutil
from subprocess import check_call, CalledProcessError
from dakota_utils.read import get_names
def has_interface_column(tab_file):
'''
Returns True if the tabular out... |
36f7cd5c57de123bbbd88d63fd6f47a8c54a41ec | contactmps/urls.py | contactmps/urls.py | from django.conf.urls import patterns, include, url
from django.contrib import admin
urlpatterns = patterns('',
url(r'^$', 'contactmps.views.home', name='home'),
url(r'^embed.html$', 'contactmps.views.embed', name='embed-info'),
url(r'^campaign/noconfidence/$', 'contactmps.views.create_mail', name='noconf... | from django.conf.urls import patterns, include, url
from django.contrib import admin
urlpatterns = patterns('',
url(r'^$', 'contactmps.views.home', name='home'),
url(r'^embed.html$', 'contactmps.views.embed', name='embed-info'),
url(r'^campaign/noconfidence/$', 'contactmps.views.create_mail', name='noconf... | Add slash after email detail url for ADD_SLASHES https fail | Add slash after email detail url for ADD_SLASHES https fail
| Python | mit | OpenUpSA/contact-mps,OpenUpSA/contact-mps,OpenUpSA/contact-mps,OpenUpSA/contact-mps | from django.conf.urls import patterns, include, url
from django.contrib import admin
urlpatterns = patterns('',
url(r'^$', 'contactmps.views.home', name='home'),
url(r'^embed.html$', 'contactmps.views.embed', name='embed-info'),
url(r'^campaign/noconfidence/$', 'contactmps.views.create_mail', name='noconf... | from django.conf.urls import patterns, include, url
from django.contrib import admin
urlpatterns = patterns('',
url(r'^$', 'contactmps.views.home', name='home'),
url(r'^embed.html$', 'contactmps.views.embed', name='embed-info'),
url(r'^campaign/noconfidence/$', 'contactmps.views.create_mail', name='noconf... | <commit_before>from django.conf.urls import patterns, include, url
from django.contrib import admin
urlpatterns = patterns('',
url(r'^$', 'contactmps.views.home', name='home'),
url(r'^embed.html$', 'contactmps.views.embed', name='embed-info'),
url(r'^campaign/noconfidence/$', 'contactmps.views.create_mail... | from django.conf.urls import patterns, include, url
from django.contrib import admin
urlpatterns = patterns('',
url(r'^$', 'contactmps.views.home', name='home'),
url(r'^embed.html$', 'contactmps.views.embed', name='embed-info'),
url(r'^campaign/noconfidence/$', 'contactmps.views.create_mail', name='noconf... | from django.conf.urls import patterns, include, url
from django.contrib import admin
urlpatterns = patterns('',
url(r'^$', 'contactmps.views.home', name='home'),
url(r'^embed.html$', 'contactmps.views.embed', name='embed-info'),
url(r'^campaign/noconfidence/$', 'contactmps.views.create_mail', name='noconf... | <commit_before>from django.conf.urls import patterns, include, url
from django.contrib import admin
urlpatterns = patterns('',
url(r'^$', 'contactmps.views.home', name='home'),
url(r'^embed.html$', 'contactmps.views.embed', name='embed-info'),
url(r'^campaign/noconfidence/$', 'contactmps.views.create_mail... |
2a763b32b4794e97d1ea7bf22ec39c1eeb559804 | pycroft/model/alembic/versions/fb8d553a7268_add_account_pattern.py | pycroft/model/alembic/versions/fb8d553a7268_add_account_pattern.py | """add account_pattern
Revision ID: fb8d553a7268
Revises: 28e56bf6f62c
Create Date: 2021-04-26 22:16:41.772282
"""
from alembic import op
import sqlalchemy as sa
import pycroft
# revision identifiers, used by Alembic.
revision = 'fb8d553a7268'
down_revision = '28e56bf6f62c'
branch_labels = None
depends_on = None
... | """add account_pattern
Revision ID: fb8d553a7268
Revises: 28e56bf6f62c
Create Date: 2021-04-26 22:16:41.772282
"""
from alembic import op
import sqlalchemy as sa
import pycroft
# revision identifiers, used by Alembic.
revision = 'fb8d553a7268'
down_revision = '0b69e80a9388'
branch_labels = None
depends_on = None
... | Rebase most recent alembic change onto HEAD | Rebase most recent alembic change onto HEAD
| Python | apache-2.0 | agdsn/pycroft,agdsn/pycroft,agdsn/pycroft,agdsn/pycroft,agdsn/pycroft | """add account_pattern
Revision ID: fb8d553a7268
Revises: 28e56bf6f62c
Create Date: 2021-04-26 22:16:41.772282
"""
from alembic import op
import sqlalchemy as sa
import pycroft
# revision identifiers, used by Alembic.
revision = 'fb8d553a7268'
down_revision = '28e56bf6f62c'
branch_labels = None
depends_on = None
... | """add account_pattern
Revision ID: fb8d553a7268
Revises: 28e56bf6f62c
Create Date: 2021-04-26 22:16:41.772282
"""
from alembic import op
import sqlalchemy as sa
import pycroft
# revision identifiers, used by Alembic.
revision = 'fb8d553a7268'
down_revision = '0b69e80a9388'
branch_labels = None
depends_on = None
... | <commit_before>"""add account_pattern
Revision ID: fb8d553a7268
Revises: 28e56bf6f62c
Create Date: 2021-04-26 22:16:41.772282
"""
from alembic import op
import sqlalchemy as sa
import pycroft
# revision identifiers, used by Alembic.
revision = 'fb8d553a7268'
down_revision = '28e56bf6f62c'
branch_labels = None
depen... | """add account_pattern
Revision ID: fb8d553a7268
Revises: 28e56bf6f62c
Create Date: 2021-04-26 22:16:41.772282
"""
from alembic import op
import sqlalchemy as sa
import pycroft
# revision identifiers, used by Alembic.
revision = 'fb8d553a7268'
down_revision = '0b69e80a9388'
branch_labels = None
depends_on = None
... | """add account_pattern
Revision ID: fb8d553a7268
Revises: 28e56bf6f62c
Create Date: 2021-04-26 22:16:41.772282
"""
from alembic import op
import sqlalchemy as sa
import pycroft
# revision identifiers, used by Alembic.
revision = 'fb8d553a7268'
down_revision = '28e56bf6f62c'
branch_labels = None
depends_on = None
... | <commit_before>"""add account_pattern
Revision ID: fb8d553a7268
Revises: 28e56bf6f62c
Create Date: 2021-04-26 22:16:41.772282
"""
from alembic import op
import sqlalchemy as sa
import pycroft
# revision identifiers, used by Alembic.
revision = 'fb8d553a7268'
down_revision = '28e56bf6f62c'
branch_labels = None
depen... |
dbb9792871d9b1d8f1678dbafeed760098547a28 | pdf_parser/pdf_types/compound_types.py | pdf_parser/pdf_types/compound_types.py | from .common import PdfType
class PdfArray(PdfType, list):
def __init__(self, *args, **kwargs):
PdfType.__init__(self)
list.__init__(self, *args, **kwargs)
class PdfDict(PdfType, dict):
def __init__(self, *args, **kwargs):
PdfType.__init__(self)
dict.__init__(self, *args, **kwa... | from .common import PdfType
class PdfArray(PdfType, list):
def __init__(self, *args, **kwargs):
PdfType.__init__(self)
list.__init__(self, *args, **kwargs)
class PdfDict(PdfType, dict):
def __init__(self, *args, **kwargs):
PdfType.__init__(self)
dict.__init__(self, *args, **kwa... | Add read-only attribute style access to PdfDict elements with object parsing. | Add read-only attribute style access to PdfDict elements with object parsing.
| Python | mit | ajmarks/gymnast,ajmarks/gymnast | from .common import PdfType
class PdfArray(PdfType, list):
def __init__(self, *args, **kwargs):
PdfType.__init__(self)
list.__init__(self, *args, **kwargs)
class PdfDict(PdfType, dict):
def __init__(self, *args, **kwargs):
PdfType.__init__(self)
dict.__init__(self, *args, **kwa... | from .common import PdfType
class PdfArray(PdfType, list):
def __init__(self, *args, **kwargs):
PdfType.__init__(self)
list.__init__(self, *args, **kwargs)
class PdfDict(PdfType, dict):
def __init__(self, *args, **kwargs):
PdfType.__init__(self)
dict.__init__(self, *args, **kwa... | <commit_before>from .common import PdfType
class PdfArray(PdfType, list):
def __init__(self, *args, **kwargs):
PdfType.__init__(self)
list.__init__(self, *args, **kwargs)
class PdfDict(PdfType, dict):
def __init__(self, *args, **kwargs):
PdfType.__init__(self)
dict.__init__(sel... | from .common import PdfType
class PdfArray(PdfType, list):
def __init__(self, *args, **kwargs):
PdfType.__init__(self)
list.__init__(self, *args, **kwargs)
class PdfDict(PdfType, dict):
def __init__(self, *args, **kwargs):
PdfType.__init__(self)
dict.__init__(self, *args, **kwa... | from .common import PdfType
class PdfArray(PdfType, list):
def __init__(self, *args, **kwargs):
PdfType.__init__(self)
list.__init__(self, *args, **kwargs)
class PdfDict(PdfType, dict):
def __init__(self, *args, **kwargs):
PdfType.__init__(self)
dict.__init__(self, *args, **kwa... | <commit_before>from .common import PdfType
class PdfArray(PdfType, list):
def __init__(self, *args, **kwargs):
PdfType.__init__(self)
list.__init__(self, *args, **kwargs)
class PdfDict(PdfType, dict):
def __init__(self, *args, **kwargs):
PdfType.__init__(self)
dict.__init__(sel... |
8de9c51eedaadc68cc64ca7f5763b48a6448dca3 | main.py | main.py | from dogbot.bot import bot
from dogbot.web import app
from mongoengine import connect
from config import config
import getopt
import sys
import threading
from importlib import reload
reload(threading)
def bot_main():
print("QQBot is running...")
try:
bot.start()
except KeyboardInterrupt:
p... | from dogbot.bot import bot
from dogbot.web import app
from mongoengine import connect
from config import config
import getopt
import sys
import threading
from importlib import reload
reload(threading)
def bot_main():
print("QQBot is running...")
try:
bot.start()
except KeyboardInterrupt:
p... | Edit host from 127.0.0.1 -> 0.0.0.0 | Edit host from 127.0.0.1 -> 0.0.0.0
| Python | apache-2.0 | moondropx/dogbot,moondropx/dogbot | from dogbot.bot import bot
from dogbot.web import app
from mongoengine import connect
from config import config
import getopt
import sys
import threading
from importlib import reload
reload(threading)
def bot_main():
print("QQBot is running...")
try:
bot.start()
except KeyboardInterrupt:
p... | from dogbot.bot import bot
from dogbot.web import app
from mongoengine import connect
from config import config
import getopt
import sys
import threading
from importlib import reload
reload(threading)
def bot_main():
print("QQBot is running...")
try:
bot.start()
except KeyboardInterrupt:
p... | <commit_before>from dogbot.bot import bot
from dogbot.web import app
from mongoengine import connect
from config import config
import getopt
import sys
import threading
from importlib import reload
reload(threading)
def bot_main():
print("QQBot is running...")
try:
bot.start()
except KeyboardInter... | from dogbot.bot import bot
from dogbot.web import app
from mongoengine import connect
from config import config
import getopt
import sys
import threading
from importlib import reload
reload(threading)
def bot_main():
print("QQBot is running...")
try:
bot.start()
except KeyboardInterrupt:
p... | from dogbot.bot import bot
from dogbot.web import app
from mongoengine import connect
from config import config
import getopt
import sys
import threading
from importlib import reload
reload(threading)
def bot_main():
print("QQBot is running...")
try:
bot.start()
except KeyboardInterrupt:
p... | <commit_before>from dogbot.bot import bot
from dogbot.web import app
from mongoengine import connect
from config import config
import getopt
import sys
import threading
from importlib import reload
reload(threading)
def bot_main():
print("QQBot is running...")
try:
bot.start()
except KeyboardInter... |
d8502569f0e4c562294415242f096eefdf361ca0 | pyonep/__init__.py | pyonep/__init__.py | __version__ = '0.12.4'
| """An API library with Python bindings for Exosite One Platform APIs."""
__version__ = '0.12.4'
from .onep import OnepV1, DeferredRequests
from .provision import Provision
| Add docstring and imports to package. | Add docstring and imports to package.
| Python | bsd-3-clause | gavinsunde/pyonep,exosite-labs/pyonep,asolz/pyonep,asolz/pyonep,gavinsunde/pyonep,exosite-labs/pyonep | __version__ = '0.12.4'
Add docstring and imports to package. | """An API library with Python bindings for Exosite One Platform APIs."""
__version__ = '0.12.4'
from .onep import OnepV1, DeferredRequests
from .provision import Provision
| <commit_before>__version__ = '0.12.4'
<commit_msg>Add docstring and imports to package.<commit_after> | """An API library with Python bindings for Exosite One Platform APIs."""
__version__ = '0.12.4'
from .onep import OnepV1, DeferredRequests
from .provision import Provision
| __version__ = '0.12.4'
Add docstring and imports to package."""An API library with Python bindings for Exosite One Platform APIs."""
__version__ = '0.12.4'
from .onep import OnepV1, DeferredRequests
from .provision import Provision
| <commit_before>__version__ = '0.12.4'
<commit_msg>Add docstring and imports to package.<commit_after>"""An API library with Python bindings for Exosite One Platform APIs."""
__version__ = '0.12.4'
from .onep import OnepV1, DeferredRequests
from .provision import Provision
|
0be63749c039e16aa1fcc64cfd8227b50829254e | pyvisa/__init__.py | pyvisa/__init__.py | # -*- coding: utf-8 -*-
"""
pyvisa
~~~~~~
Python wrapper of National Instrument (NI) Virtual Instruments Software
Architecture library (VISA).
This file is part of PyVISA.
:copyright: (c) 2014 by the PyVISA authors.
:license: MIT, see COPYING for more details.
"""
from __future__ import ... | # -*- coding: utf-8 -*-
"""
pyvisa
~~~~~~
Python wrapper of National Instrument (NI) Virtual Instruments Software
Architecture library (VISA).
This file is part of PyVISA.
:copyright: (c) 2014 by the PyVISA authors.
:license: MIT, see COPYING for more details.
"""
from __future__ import ... | Load legacy visa_library taking user settings into account | Load legacy visa_library taking user settings into account
See #7
| Python | mit | pyvisa/pyvisa,rubund/debian-pyvisa,MatthieuDartiailh/pyvisa,hgrecco/pyvisa | # -*- coding: utf-8 -*-
"""
pyvisa
~~~~~~
Python wrapper of National Instrument (NI) Virtual Instruments Software
Architecture library (VISA).
This file is part of PyVISA.
:copyright: (c) 2014 by the PyVISA authors.
:license: MIT, see COPYING for more details.
"""
from __future__ import ... | # -*- coding: utf-8 -*-
"""
pyvisa
~~~~~~
Python wrapper of National Instrument (NI) Virtual Instruments Software
Architecture library (VISA).
This file is part of PyVISA.
:copyright: (c) 2014 by the PyVISA authors.
:license: MIT, see COPYING for more details.
"""
from __future__ import ... | <commit_before># -*- coding: utf-8 -*-
"""
pyvisa
~~~~~~
Python wrapper of National Instrument (NI) Virtual Instruments Software
Architecture library (VISA).
This file is part of PyVISA.
:copyright: (c) 2014 by the PyVISA authors.
:license: MIT, see COPYING for more details.
"""
from __f... | # -*- coding: utf-8 -*-
"""
pyvisa
~~~~~~
Python wrapper of National Instrument (NI) Virtual Instruments Software
Architecture library (VISA).
This file is part of PyVISA.
:copyright: (c) 2014 by the PyVISA authors.
:license: MIT, see COPYING for more details.
"""
from __future__ import ... | # -*- coding: utf-8 -*-
"""
pyvisa
~~~~~~
Python wrapper of National Instrument (NI) Virtual Instruments Software
Architecture library (VISA).
This file is part of PyVISA.
:copyright: (c) 2014 by the PyVISA authors.
:license: MIT, see COPYING for more details.
"""
from __future__ import ... | <commit_before># -*- coding: utf-8 -*-
"""
pyvisa
~~~~~~
Python wrapper of National Instrument (NI) Virtual Instruments Software
Architecture library (VISA).
This file is part of PyVISA.
:copyright: (c) 2014 by the PyVISA authors.
:license: MIT, see COPYING for more details.
"""
from __f... |
7b8fe4aa426a8de24b5fc1a496b7b1eba92e7756 | pywind/__init__.py | pywind/__init__.py | """ pywind module.
For more information visit https://github.com/zathras777/pywind
"""
__version__ = '1.0.3'
| """ pywind module.
For more information visit https://github.com/zathras777/pywind
"""
__version__ = '1.0.4'
| Move to next version number. | Move to next version number.
| Python | unlicense | zathras777/pywind,zathras777/pywind | """ pywind module.
For more information visit https://github.com/zathras777/pywind
"""
__version__ = '1.0.3'
Move to next version number. | """ pywind module.
For more information visit https://github.com/zathras777/pywind
"""
__version__ = '1.0.4'
| <commit_before>""" pywind module.
For more information visit https://github.com/zathras777/pywind
"""
__version__ = '1.0.3'
<commit_msg>Move to next version number.<commit_after> | """ pywind module.
For more information visit https://github.com/zathras777/pywind
"""
__version__ = '1.0.4'
| """ pywind module.
For more information visit https://github.com/zathras777/pywind
"""
__version__ = '1.0.3'
Move to next version number.""" pywind module.
For more information visit https://github.com/zathras777/pywind
"""
__version__ = '1.0.4'
| <commit_before>""" pywind module.
For more information visit https://github.com/zathras777/pywind
"""
__version__ = '1.0.3'
<commit_msg>Move to next version number.<commit_after>""" pywind module.
For more information visit https://github.com/zathras777/pywind
"""
__version__ = '1.0.4'
|
fb8cfa8eb7d088ebe11075bff42bea54c97e9c18 | hermes/views.py | hermes/views.py | from django.views.generic import ListView, DetailView
from .models import Post
class PostListView(ListView):
context_object_name = 'posts'
model = Post
template_name = 'hermes/post_list.html'
def get_queryset(self):
return self.model.objects.order_by('created_on')
class CategoryPostLis... | from django.views.generic import ListView, DetailView
from .models import Post
class PostListView(ListView):
context_object_name = 'posts'
model = Post
template_name = 'hermes/post_list.html'
def get_queryset(self):
return self.model.objects.order_by('created_on')
class CategoryPostLis... | Add slug variable to pass in the URL | Add slug variable to pass in the URL | Python | mit | emilian/django-hermes | from django.views.generic import ListView, DetailView
from .models import Post
class PostListView(ListView):
context_object_name = 'posts'
model = Post
template_name = 'hermes/post_list.html'
def get_queryset(self):
return self.model.objects.order_by('created_on')
class CategoryPostLis... | from django.views.generic import ListView, DetailView
from .models import Post
class PostListView(ListView):
context_object_name = 'posts'
model = Post
template_name = 'hermes/post_list.html'
def get_queryset(self):
return self.model.objects.order_by('created_on')
class CategoryPostLis... | <commit_before>from django.views.generic import ListView, DetailView
from .models import Post
class PostListView(ListView):
context_object_name = 'posts'
model = Post
template_name = 'hermes/post_list.html'
def get_queryset(self):
return self.model.objects.order_by('created_on')
class ... | from django.views.generic import ListView, DetailView
from .models import Post
class PostListView(ListView):
context_object_name = 'posts'
model = Post
template_name = 'hermes/post_list.html'
def get_queryset(self):
return self.model.objects.order_by('created_on')
class CategoryPostLis... | from django.views.generic import ListView, DetailView
from .models import Post
class PostListView(ListView):
context_object_name = 'posts'
model = Post
template_name = 'hermes/post_list.html'
def get_queryset(self):
return self.model.objects.order_by('created_on')
class CategoryPostLis... | <commit_before>from django.views.generic import ListView, DetailView
from .models import Post
class PostListView(ListView):
context_object_name = 'posts'
model = Post
template_name = 'hermes/post_list.html'
def get_queryset(self):
return self.model.objects.order_by('created_on')
class ... |
51c9413eb1375ff191e03d38933a772923fa55cf | app/__init__.py | app/__init__.py | from flask import Flask
from flask.ext.bootstrap import Bootstrap
from config import config
bootstrap = Bootstrap()
def create_app(config_name):
application = Flask(__name__)
application.config['DEBUG'] = True
application.config.from_object(config[config_name])
config[config_name].init_app(applicat... | from flask import Flask
from flask.ext.bootstrap import Bootstrap
from config import config
from .main import main as main_blueprint
def create_app(config_name):
application = Flask(__name__,
static_folder='static/',
static_url_path=config[config_name].STATIC_URL_... | Add /supplier prefix to main blueprint and static URLs | Add /supplier prefix to main blueprint and static URLs
| Python | mit | alphagov/digitalmarketplace-supplier-frontend,mtekel/digitalmarketplace-supplier-frontend,mtekel/digitalmarketplace-supplier-frontend,mtekel/digitalmarketplace-supplier-frontend,alphagov/digitalmarketplace-supplier-frontend,alphagov/digitalmarketplace-supplier-frontend,mtekel/digitalmarketplace-supplier-frontend,alphag... | from flask import Flask
from flask.ext.bootstrap import Bootstrap
from config import config
bootstrap = Bootstrap()
def create_app(config_name):
application = Flask(__name__)
application.config['DEBUG'] = True
application.config.from_object(config[config_name])
config[config_name].init_app(applicat... | from flask import Flask
from flask.ext.bootstrap import Bootstrap
from config import config
from .main import main as main_blueprint
def create_app(config_name):
application = Flask(__name__,
static_folder='static/',
static_url_path=config[config_name].STATIC_URL_... | <commit_before>from flask import Flask
from flask.ext.bootstrap import Bootstrap
from config import config
bootstrap = Bootstrap()
def create_app(config_name):
application = Flask(__name__)
application.config['DEBUG'] = True
application.config.from_object(config[config_name])
config[config_name].in... | from flask import Flask
from flask.ext.bootstrap import Bootstrap
from config import config
from .main import main as main_blueprint
def create_app(config_name):
application = Flask(__name__,
static_folder='static/',
static_url_path=config[config_name].STATIC_URL_... | from flask import Flask
from flask.ext.bootstrap import Bootstrap
from config import config
bootstrap = Bootstrap()
def create_app(config_name):
application = Flask(__name__)
application.config['DEBUG'] = True
application.config.from_object(config[config_name])
config[config_name].init_app(applicat... | <commit_before>from flask import Flask
from flask.ext.bootstrap import Bootstrap
from config import config
bootstrap = Bootstrap()
def create_app(config_name):
application = Flask(__name__)
application.config['DEBUG'] = True
application.config.from_object(config[config_name])
config[config_name].in... |
6e9159b66cd791561a24bd935aaaab2a4ea6a6af | sgapi/__init__.py | sgapi/__init__.py | from .core import Shotgun, ShotgunError
# For API compatibility
Fault = ShotgunError
| from .core import Shotgun, ShotgunError, TransportError
# For API compatibility
Fault = ShotgunError
| Add TransportError to top-level package | Add TransportError to top-level package
| Python | bsd-3-clause | westernx/sgapi | from .core import Shotgun, ShotgunError
# For API compatibility
Fault = ShotgunError
Add TransportError to top-level package | from .core import Shotgun, ShotgunError, TransportError
# For API compatibility
Fault = ShotgunError
| <commit_before>from .core import Shotgun, ShotgunError
# For API compatibility
Fault = ShotgunError
<commit_msg>Add TransportError to top-level package<commit_after> | from .core import Shotgun, ShotgunError, TransportError
# For API compatibility
Fault = ShotgunError
| from .core import Shotgun, ShotgunError
# For API compatibility
Fault = ShotgunError
Add TransportError to top-level packagefrom .core import Shotgun, ShotgunError, TransportError
# For API compatibility
Fault = ShotgunError
| <commit_before>from .core import Shotgun, ShotgunError
# For API compatibility
Fault = ShotgunError
<commit_msg>Add TransportError to top-level package<commit_after>from .core import Shotgun, ShotgunError, TransportError
# For API compatibility
Fault = ShotgunError
|
a90411116617096c73ba6d188322613a1b529a62 | books/CrackingCodesWithPython/Chapter20/vigenereDictionaryHacker.py | books/CrackingCodesWithPython/Chapter20/vigenereDictionaryHacker.py | # Vigenère Cipher Dictionary Hacker
# https://www.nostarch.com/crackingcodes/ (BSD Licensed)
import detectEnglish, vigenereCipher, pyperclip
def main():
ciphertext = """Tzx isnz eccjxkg nfq lol mys bbqq I lxcz."""
hackedMessage = hackVigenereDictionary(ciphertext)
if hackedMessage != None:
print... | # Vigenère Cipher Dictionary Hacker
# https://www.nostarch.com/crackingcodes/ (BSD Licensed)
import detectEnglish, vigenereCipher, pyperclip
def main():
ciphertext = """Tzx isnz eccjxkg nfq lol mys bbqq I lxcz."""
hackedMessage = hackVigenereDictionary(ciphertext)
if not hackedMessage:
print('Co... | Update vigenereDicitonaryHacker: simplified comparison with None | Update vigenereDicitonaryHacker: simplified comparison with None
| Python | mit | JoseALermaIII/python-tutorials,JoseALermaIII/python-tutorials | # Vigenère Cipher Dictionary Hacker
# https://www.nostarch.com/crackingcodes/ (BSD Licensed)
import detectEnglish, vigenereCipher, pyperclip
def main():
ciphertext = """Tzx isnz eccjxkg nfq lol mys bbqq I lxcz."""
hackedMessage = hackVigenereDictionary(ciphertext)
if hackedMessage != None:
print... | # Vigenère Cipher Dictionary Hacker
# https://www.nostarch.com/crackingcodes/ (BSD Licensed)
import detectEnglish, vigenereCipher, pyperclip
def main():
ciphertext = """Tzx isnz eccjxkg nfq lol mys bbqq I lxcz."""
hackedMessage = hackVigenereDictionary(ciphertext)
if not hackedMessage:
print('Co... | <commit_before># Vigenère Cipher Dictionary Hacker
# https://www.nostarch.com/crackingcodes/ (BSD Licensed)
import detectEnglish, vigenereCipher, pyperclip
def main():
ciphertext = """Tzx isnz eccjxkg nfq lol mys bbqq I lxcz."""
hackedMessage = hackVigenereDictionary(ciphertext)
if hackedMessage != None... | # Vigenère Cipher Dictionary Hacker
# https://www.nostarch.com/crackingcodes/ (BSD Licensed)
import detectEnglish, vigenereCipher, pyperclip
def main():
ciphertext = """Tzx isnz eccjxkg nfq lol mys bbqq I lxcz."""
hackedMessage = hackVigenereDictionary(ciphertext)
if not hackedMessage:
print('Co... | # Vigenère Cipher Dictionary Hacker
# https://www.nostarch.com/crackingcodes/ (BSD Licensed)
import detectEnglish, vigenereCipher, pyperclip
def main():
ciphertext = """Tzx isnz eccjxkg nfq lol mys bbqq I lxcz."""
hackedMessage = hackVigenereDictionary(ciphertext)
if hackedMessage != None:
print... | <commit_before># Vigenère Cipher Dictionary Hacker
# https://www.nostarch.com/crackingcodes/ (BSD Licensed)
import detectEnglish, vigenereCipher, pyperclip
def main():
ciphertext = """Tzx isnz eccjxkg nfq lol mys bbqq I lxcz."""
hackedMessage = hackVigenereDictionary(ciphertext)
if hackedMessage != None... |
c69974ffabc0855db153b7f5a4af6105fae698f9 | docassemble_base/docassemble/base/pdfa.py | docassemble_base/docassemble/base/pdfa.py | import tempfile
import subprocess
import shutil
from docassemble.base.error import DAError
#from docassemble.base.logger import logmessage
def pdf_to_pdfa(filename):
outfile = tempfile.NamedTemporaryFile(suffix=".pdf", delete=False)
directory = tempfile.mkdtemp()
commands = ['gs', '-dPDFA', '-dBATCH', '-dN... | import tempfile
import subprocess
import shutil
from docassemble.base.error import DAError
#from docassemble.base.logger import logmessage
def pdf_to_pdfa(filename):
outfile = tempfile.NamedTemporaryFile(suffix=".pdf", delete=False)
directory = tempfile.mkdtemp()
commands = ['gs', '-dPDFA', '-dBATCH', '-dN... | Make ghostscript handle PDF/A colorspace correctly | Make ghostscript handle PDF/A colorspace correctly
Previously, if you tried to verify files generated by pdf_to_pdfa in a
verifier (like https://tools.pdfforge.org/validate-pdfa), you would get
errors relating to the lack of OutputIntent (6.2.3). The info in
https://stackoverflow.com/a/56459053/11416267 and
https://ww... | Python | mit | jhpyle/docassemble,jhpyle/docassemble,jhpyle/docassemble,jhpyle/docassemble,jhpyle/docassemble | import tempfile
import subprocess
import shutil
from docassemble.base.error import DAError
#from docassemble.base.logger import logmessage
def pdf_to_pdfa(filename):
outfile = tempfile.NamedTemporaryFile(suffix=".pdf", delete=False)
directory = tempfile.mkdtemp()
commands = ['gs', '-dPDFA', '-dBATCH', '-dN... | import tempfile
import subprocess
import shutil
from docassemble.base.error import DAError
#from docassemble.base.logger import logmessage
def pdf_to_pdfa(filename):
outfile = tempfile.NamedTemporaryFile(suffix=".pdf", delete=False)
directory = tempfile.mkdtemp()
commands = ['gs', '-dPDFA', '-dBATCH', '-dN... | <commit_before>import tempfile
import subprocess
import shutil
from docassemble.base.error import DAError
#from docassemble.base.logger import logmessage
def pdf_to_pdfa(filename):
outfile = tempfile.NamedTemporaryFile(suffix=".pdf", delete=False)
directory = tempfile.mkdtemp()
commands = ['gs', '-dPDFA', ... | import tempfile
import subprocess
import shutil
from docassemble.base.error import DAError
#from docassemble.base.logger import logmessage
def pdf_to_pdfa(filename):
outfile = tempfile.NamedTemporaryFile(suffix=".pdf", delete=False)
directory = tempfile.mkdtemp()
commands = ['gs', '-dPDFA', '-dBATCH', '-dN... | import tempfile
import subprocess
import shutil
from docassemble.base.error import DAError
#from docassemble.base.logger import logmessage
def pdf_to_pdfa(filename):
outfile = tempfile.NamedTemporaryFile(suffix=".pdf", delete=False)
directory = tempfile.mkdtemp()
commands = ['gs', '-dPDFA', '-dBATCH', '-dN... | <commit_before>import tempfile
import subprocess
import shutil
from docassemble.base.error import DAError
#from docassemble.base.logger import logmessage
def pdf_to_pdfa(filename):
outfile = tempfile.NamedTemporaryFile(suffix=".pdf", delete=False)
directory = tempfile.mkdtemp()
commands = ['gs', '-dPDFA', ... |
884e7254bffcef4e5d3733b26f6eb0ea34b11da6 | core/project/Project.py | core/project/Project.py | """
Project
:Authors:
Berend Klein Haneveld
"""
class Project(object):
"""
Project holds the basic information of a project for RegistrationShop
"""
def __init__(self, title=None, fixedData=None, movingData=None, isReference=None):
super(Project, self).__init__()
self.title = title
self.fixedData = fixe... | """
Project
:Authors:
Berend Klein Haneveld
"""
class Project(object):
"""
Project holds the basic information of a project for RegistrationShop
"""
def __init__(self, title=None, fixedData=None, movingData=None, isReference=None):
super(Project, self).__init__()
self.title = title
self.fixedData = fixe... | Add transformations property to projects. | Add transformations property to projects.
| Python | mit | berendkleinhaneveld/Registrationshop,berendkleinhaneveld/Registrationshop | """
Project
:Authors:
Berend Klein Haneveld
"""
class Project(object):
"""
Project holds the basic information of a project for RegistrationShop
"""
def __init__(self, title=None, fixedData=None, movingData=None, isReference=None):
super(Project, self).__init__()
self.title = title
self.fixedData = fixe... | """
Project
:Authors:
Berend Klein Haneveld
"""
class Project(object):
"""
Project holds the basic information of a project for RegistrationShop
"""
def __init__(self, title=None, fixedData=None, movingData=None, isReference=None):
super(Project, self).__init__()
self.title = title
self.fixedData = fixe... | <commit_before>"""
Project
:Authors:
Berend Klein Haneveld
"""
class Project(object):
"""
Project holds the basic information of a project for RegistrationShop
"""
def __init__(self, title=None, fixedData=None, movingData=None, isReference=None):
super(Project, self).__init__()
self.title = title
self.f... | """
Project
:Authors:
Berend Klein Haneveld
"""
class Project(object):
"""
Project holds the basic information of a project for RegistrationShop
"""
def __init__(self, title=None, fixedData=None, movingData=None, isReference=None):
super(Project, self).__init__()
self.title = title
self.fixedData = fixe... | """
Project
:Authors:
Berend Klein Haneveld
"""
class Project(object):
"""
Project holds the basic information of a project for RegistrationShop
"""
def __init__(self, title=None, fixedData=None, movingData=None, isReference=None):
super(Project, self).__init__()
self.title = title
self.fixedData = fixe... | <commit_before>"""
Project
:Authors:
Berend Klein Haneveld
"""
class Project(object):
"""
Project holds the basic information of a project for RegistrationShop
"""
def __init__(self, title=None, fixedData=None, movingData=None, isReference=None):
super(Project, self).__init__()
self.title = title
self.f... |
e68e03fe5e858e9c5c65788d2d1126b8bf37772b | subversion/bindings/swig/python/tests/run_all.py | subversion/bindings/swig/python/tests/run_all.py | import sys, os
bindir = os.path.dirname(sys.argv[0])
sys.path[0:0] = [ os.getcwd(), "%s/.libs" % os.getcwd(), \
"%s/.." % bindir, "%s/../.libs" % bindir ]
import unittest
import pool
import trac.versioncontrol.tests
# Run all tests
def suite():
"""Run all tests"""
suite = unittest.TestSuite()
... | import sys, os
bindir = os.path.dirname(sys.argv[0])
sys.path[0:0] = [ os.getcwd(), "%s/.libs" % os.getcwd(), \
"%s/.." % bindir, "%s/../.libs" % bindir ]
# OSes without RPATH support are going to have to do things here to make
# the correct shared libraries be found.
if sys.platform == 'cygwin':
i... | Make the Python bindings testsuite be able to find the needed shared libraries on Cygwin. Needed to compensate for Windows' complete lack of library RPATHs. | Make the Python bindings testsuite be able to find the needed shared libraries
on Cygwin. Needed to compensate for Windows' complete lack of library RPATHs.
* subversion/bindings/swig/python/tests/run_all.py: On Cygwin, manipulate $PATH
so that the relevant shared libraries are found.
git-svn-id: f8a4e5e023278da... | Python | apache-2.0 | wbond/subversion,YueLinHo/Subversion,YueLinHo/Subversion,YueLinHo/Subversion,wbond/subversion,wbond/subversion,YueLinHo/Subversion,wbond/subversion,wbond/subversion,YueLinHo/Subversion,YueLinHo/Subversion,wbond/subversion,wbond/subversion,YueLinHo/Subversion,YueLinHo/Subversion | import sys, os
bindir = os.path.dirname(sys.argv[0])
sys.path[0:0] = [ os.getcwd(), "%s/.libs" % os.getcwd(), \
"%s/.." % bindir, "%s/../.libs" % bindir ]
import unittest
import pool
import trac.versioncontrol.tests
# Run all tests
def suite():
"""Run all tests"""
suite = unittest.TestSuite()
... | import sys, os
bindir = os.path.dirname(sys.argv[0])
sys.path[0:0] = [ os.getcwd(), "%s/.libs" % os.getcwd(), \
"%s/.." % bindir, "%s/../.libs" % bindir ]
# OSes without RPATH support are going to have to do things here to make
# the correct shared libraries be found.
if sys.platform == 'cygwin':
i... | <commit_before>import sys, os
bindir = os.path.dirname(sys.argv[0])
sys.path[0:0] = [ os.getcwd(), "%s/.libs" % os.getcwd(), \
"%s/.." % bindir, "%s/../.libs" % bindir ]
import unittest
import pool
import trac.versioncontrol.tests
# Run all tests
def suite():
"""Run all tests"""
suite = unittest... | import sys, os
bindir = os.path.dirname(sys.argv[0])
sys.path[0:0] = [ os.getcwd(), "%s/.libs" % os.getcwd(), \
"%s/.." % bindir, "%s/../.libs" % bindir ]
# OSes without RPATH support are going to have to do things here to make
# the correct shared libraries be found.
if sys.platform == 'cygwin':
i... | import sys, os
bindir = os.path.dirname(sys.argv[0])
sys.path[0:0] = [ os.getcwd(), "%s/.libs" % os.getcwd(), \
"%s/.." % bindir, "%s/../.libs" % bindir ]
import unittest
import pool
import trac.versioncontrol.tests
# Run all tests
def suite():
"""Run all tests"""
suite = unittest.TestSuite()
... | <commit_before>import sys, os
bindir = os.path.dirname(sys.argv[0])
sys.path[0:0] = [ os.getcwd(), "%s/.libs" % os.getcwd(), \
"%s/.." % bindir, "%s/../.libs" % bindir ]
import unittest
import pool
import trac.versioncontrol.tests
# Run all tests
def suite():
"""Run all tests"""
suite = unittest... |
3b5f1749a8065bb9241d6a8ed77c047a05b3f6e2 | bcbio/distributed/sge.py | bcbio/distributed/sge.py | """Commandline interaction with SGE cluster schedulers.
"""
import re
import subprocess
_jobid_pat = re.compile('Your job (?P<jobid>\d+) \("')
def submit_job(scheduler_args, command):
"""Submit a job to the scheduler, returning the supplied job ID.
"""
cl = ["qsub", "-cwd", "-b", "y", "-j", "y"] + schedul... | """Commandline interaction with SGE cluster schedulers.
"""
import re
import time
import subprocess
_jobid_pat = re.compile('Your job (?P<jobid>\d+) \("')
def submit_job(scheduler_args, command):
"""Submit a job to the scheduler, returning the supplied job ID.
"""
cl = ["qsub", "-cwd", "-b", "y", "-j", "y... | Handle temporary errors returned from SGE qstat | Handle temporary errors returned from SGE qstat
| Python | mit | biocyberman/bcbio-nextgen,Cyberbio-Lab/bcbio-nextgen,mjafin/bcbio-nextgen,chapmanb/bcbio-nextgen,lpantano/bcbio-nextgen,fw1121/bcbio-nextgen,brainstorm/bcbio-nextgen,fw1121/bcbio-nextgen,elkingtonmcb/bcbio-nextgen,verdurin/bcbio-nextgen,mjafin/bcbio-nextgen,vladsaveliev/bcbio-nextgen,SciLifeLab/bcbio-nextgen,SciLifeLab... | """Commandline interaction with SGE cluster schedulers.
"""
import re
import subprocess
_jobid_pat = re.compile('Your job (?P<jobid>\d+) \("')
def submit_job(scheduler_args, command):
"""Submit a job to the scheduler, returning the supplied job ID.
"""
cl = ["qsub", "-cwd", "-b", "y", "-j", "y"] + schedul... | """Commandline interaction with SGE cluster schedulers.
"""
import re
import time
import subprocess
_jobid_pat = re.compile('Your job (?P<jobid>\d+) \("')
def submit_job(scheduler_args, command):
"""Submit a job to the scheduler, returning the supplied job ID.
"""
cl = ["qsub", "-cwd", "-b", "y", "-j", "y... | <commit_before>"""Commandline interaction with SGE cluster schedulers.
"""
import re
import subprocess
_jobid_pat = re.compile('Your job (?P<jobid>\d+) \("')
def submit_job(scheduler_args, command):
"""Submit a job to the scheduler, returning the supplied job ID.
"""
cl = ["qsub", "-cwd", "-b", "y", "-j",... | """Commandline interaction with SGE cluster schedulers.
"""
import re
import time
import subprocess
_jobid_pat = re.compile('Your job (?P<jobid>\d+) \("')
def submit_job(scheduler_args, command):
"""Submit a job to the scheduler, returning the supplied job ID.
"""
cl = ["qsub", "-cwd", "-b", "y", "-j", "y... | """Commandline interaction with SGE cluster schedulers.
"""
import re
import subprocess
_jobid_pat = re.compile('Your job (?P<jobid>\d+) \("')
def submit_job(scheduler_args, command):
"""Submit a job to the scheduler, returning the supplied job ID.
"""
cl = ["qsub", "-cwd", "-b", "y", "-j", "y"] + schedul... | <commit_before>"""Commandline interaction with SGE cluster schedulers.
"""
import re
import subprocess
_jobid_pat = re.compile('Your job (?P<jobid>\d+) \("')
def submit_job(scheduler_args, command):
"""Submit a job to the scheduler, returning the supplied job ID.
"""
cl = ["qsub", "-cwd", "-b", "y", "-j",... |
6b07646f085de7f5eae2c0695584bce48f812b44 | save_na_results.py | save_na_results.py | #!/usr/bin/python
import os
import sys
def save_na_results(folder_path=None):
"""Move the results of a Neighborhood Algorithm run to a folder with metadata.
This will copy all files with extensions of:
npy, txt, eps, png and dat
to the specified folder_path.
For now there is nothing stor... | #!/usr/bin/python
import os
import sys
def save_na_results(folder_path=None):
"""Move the results of a Neighborhood Algorithm run to a folder with metadata.
This will copy all files with extensions of:
npy, txt, eps, png and dat
to the specified folder_path.
For now there is nothing stor... | Save svg files, eps are not used anymore because they don't hand transparency. | Save svg files, eps are not used anymore because they don't hand transparency.
| Python | bsd-2-clause | cosmolab/cosmogenic | #!/usr/bin/python
import os
import sys
def save_na_results(folder_path=None):
"""Move the results of a Neighborhood Algorithm run to a folder with metadata.
This will copy all files with extensions of:
npy, txt, eps, png and dat
to the specified folder_path.
For now there is nothing stor... | #!/usr/bin/python
import os
import sys
def save_na_results(folder_path=None):
"""Move the results of a Neighborhood Algorithm run to a folder with metadata.
This will copy all files with extensions of:
npy, txt, eps, png and dat
to the specified folder_path.
For now there is nothing stor... | <commit_before>#!/usr/bin/python
import os
import sys
def save_na_results(folder_path=None):
"""Move the results of a Neighborhood Algorithm run to a folder with metadata.
This will copy all files with extensions of:
npy, txt, eps, png and dat
to the specified folder_path.
For now there ... | #!/usr/bin/python
import os
import sys
def save_na_results(folder_path=None):
"""Move the results of a Neighborhood Algorithm run to a folder with metadata.
This will copy all files with extensions of:
npy, txt, eps, png and dat
to the specified folder_path.
For now there is nothing stor... | #!/usr/bin/python
import os
import sys
def save_na_results(folder_path=None):
"""Move the results of a Neighborhood Algorithm run to a folder with metadata.
This will copy all files with extensions of:
npy, txt, eps, png and dat
to the specified folder_path.
For now there is nothing stor... | <commit_before>#!/usr/bin/python
import os
import sys
def save_na_results(folder_path=None):
"""Move the results of a Neighborhood Algorithm run to a folder with metadata.
This will copy all files with extensions of:
npy, txt, eps, png and dat
to the specified folder_path.
For now there ... |
a391b9d990c01cdf036bc92dd6bafc03bdd69b63 | instructions.py | instructions.py | class Instruction:
def __init__(self,prev):
self.prev = prev
if prev:
self.prev.next = self
self.partner = None
self.next = None
def execute(self, node):
return (self.next, node)
class LBracket(Instruction):
symbol = "["
def execute(self, node):
return (self.next, node)
class RBr... | import sys
class Instruction:
def __init__(self,prev):
self.prev = prev
if prev:
self.prev.next = self
self.partner = None
self.next = None
def execute(self, node):
return (self.next, node)
class LBracket(Instruction):
symbol = "["
def execute(self, node):
return (self.next, node... | Write directly to standard out instead of 'print' | Write directly to standard out instead of 'print'
| Python | mit | Detry322/brainfuck-interpreter | class Instruction:
def __init__(self,prev):
self.prev = prev
if prev:
self.prev.next = self
self.partner = None
self.next = None
def execute(self, node):
return (self.next, node)
class LBracket(Instruction):
symbol = "["
def execute(self, node):
return (self.next, node)
class RBr... | import sys
class Instruction:
def __init__(self,prev):
self.prev = prev
if prev:
self.prev.next = self
self.partner = None
self.next = None
def execute(self, node):
return (self.next, node)
class LBracket(Instruction):
symbol = "["
def execute(self, node):
return (self.next, node... | <commit_before>class Instruction:
def __init__(self,prev):
self.prev = prev
if prev:
self.prev.next = self
self.partner = None
self.next = None
def execute(self, node):
return (self.next, node)
class LBracket(Instruction):
symbol = "["
def execute(self, node):
return (self.next, n... | import sys
class Instruction:
def __init__(self,prev):
self.prev = prev
if prev:
self.prev.next = self
self.partner = None
self.next = None
def execute(self, node):
return (self.next, node)
class LBracket(Instruction):
symbol = "["
def execute(self, node):
return (self.next, node... | class Instruction:
def __init__(self,prev):
self.prev = prev
if prev:
self.prev.next = self
self.partner = None
self.next = None
def execute(self, node):
return (self.next, node)
class LBracket(Instruction):
symbol = "["
def execute(self, node):
return (self.next, node)
class RBr... | <commit_before>class Instruction:
def __init__(self,prev):
self.prev = prev
if prev:
self.prev.next = self
self.partner = None
self.next = None
def execute(self, node):
return (self.next, node)
class LBracket(Instruction):
symbol = "["
def execute(self, node):
return (self.next, n... |
5d63de144891c0672e67741ada93351f6aa8b20e | controllers/main.py | controllers/main.py | # -*- coding: utf-8 -*-
import openerp
from ..helpers.usbscale.scale import Scale
from ..helpers.usbscale.scale_manager import ScaleManager
from ..helpers.usbscale.tests import mocks
class ScaleController(openerp.addons.web.http.Controller):
_cp_path = '/scale_proxy'
def __init__(self, *args, **kwargs):
... | # -*- coding: utf-8 -*-
import openerp
from ..helpers.usbscale.scale import Scale
from ..helpers.usbscale.scale_manager import ScaleManager
from ..helpers.usbscale.tests import mocks
class ScaleController(openerp.addons.web.http.Controller):
_cp_path = '/scale_proxy'
def __init__(self, *args, **kwargs):
... | Allow calls to 'weigh' to run forever when 'max_attempts' is set to 'inf'. | Allow calls to 'weigh' to run forever when 'max_attempts' is set to 'inf'.
| Python | agpl-3.0 | ryepdx/scale_proxy,ryepdx/scale_proxy | # -*- coding: utf-8 -*-
import openerp
from ..helpers.usbscale.scale import Scale
from ..helpers.usbscale.scale_manager import ScaleManager
from ..helpers.usbscale.tests import mocks
class ScaleController(openerp.addons.web.http.Controller):
_cp_path = '/scale_proxy'
def __init__(self, *args, **kwargs):
... | # -*- coding: utf-8 -*-
import openerp
from ..helpers.usbscale.scale import Scale
from ..helpers.usbscale.scale_manager import ScaleManager
from ..helpers.usbscale.tests import mocks
class ScaleController(openerp.addons.web.http.Controller):
_cp_path = '/scale_proxy'
def __init__(self, *args, **kwargs):
... | <commit_before># -*- coding: utf-8 -*-
import openerp
from ..helpers.usbscale.scale import Scale
from ..helpers.usbscale.scale_manager import ScaleManager
from ..helpers.usbscale.tests import mocks
class ScaleController(openerp.addons.web.http.Controller):
_cp_path = '/scale_proxy'
def __init__(self, *args, *... | # -*- coding: utf-8 -*-
import openerp
from ..helpers.usbscale.scale import Scale
from ..helpers.usbscale.scale_manager import ScaleManager
from ..helpers.usbscale.tests import mocks
class ScaleController(openerp.addons.web.http.Controller):
_cp_path = '/scale_proxy'
def __init__(self, *args, **kwargs):
... | # -*- coding: utf-8 -*-
import openerp
from ..helpers.usbscale.scale import Scale
from ..helpers.usbscale.scale_manager import ScaleManager
from ..helpers.usbscale.tests import mocks
class ScaleController(openerp.addons.web.http.Controller):
_cp_path = '/scale_proxy'
def __init__(self, *args, **kwargs):
... | <commit_before># -*- coding: utf-8 -*-
import openerp
from ..helpers.usbscale.scale import Scale
from ..helpers.usbscale.scale_manager import ScaleManager
from ..helpers.usbscale.tests import mocks
class ScaleController(openerp.addons.web.http.Controller):
_cp_path = '/scale_proxy'
def __init__(self, *args, *... |
78eaa907ea986c12716b27fc6a4533d83242b97a | bci/__init__.py | bci/__init__.py | from fakebci import FakeBCI | import os
import sys
import platform
import shutil
import inspect
#
#def machine():
# """Return type of machine."""
# if os.name == 'nt' and sys.version_info[:2] < (2,7):
# return os.environ.get("PROCESSOR_ARCHITEW6432",
# os.environ.get('PROCESSOR_ARCHITECTURE', ''))
# else:
# re... | Make some changes to the bci package file. | Make some changes to the bci package file.
| Python | bsd-3-clause | NeuralProsthesisLab/unlock,NeuralProsthesisLab/unlock,NeuralProsthesisLab/unlock,NeuralProsthesisLab/unlock,NeuralProsthesisLab/unlock,NeuralProsthesisLab/unlock,NeuralProsthesisLab/unlock | from fakebci import FakeBCIMake some changes to the bci package file. | import os
import sys
import platform
import shutil
import inspect
#
#def machine():
# """Return type of machine."""
# if os.name == 'nt' and sys.version_info[:2] < (2,7):
# return os.environ.get("PROCESSOR_ARCHITEW6432",
# os.environ.get('PROCESSOR_ARCHITECTURE', ''))
# else:
# re... | <commit_before>from fakebci import FakeBCI<commit_msg>Make some changes to the bci package file.<commit_after> | import os
import sys
import platform
import shutil
import inspect
#
#def machine():
# """Return type of machine."""
# if os.name == 'nt' and sys.version_info[:2] < (2,7):
# return os.environ.get("PROCESSOR_ARCHITEW6432",
# os.environ.get('PROCESSOR_ARCHITECTURE', ''))
# else:
# re... | from fakebci import FakeBCIMake some changes to the bci package file.import os
import sys
import platform
import shutil
import inspect
#
#def machine():
# """Return type of machine."""
# if os.name == 'nt' and sys.version_info[:2] < (2,7):
# return os.environ.get("PROCESSOR_ARCHITEW6432",
# ... | <commit_before>from fakebci import FakeBCI<commit_msg>Make some changes to the bci package file.<commit_after>import os
import sys
import platform
import shutil
import inspect
#
#def machine():
# """Return type of machine."""
# if os.name == 'nt' and sys.version_info[:2] < (2,7):
# return os.environ.get("... |
6c41a0529cac96e1057890a38456b396fcb0b7f2 | skcode/__init__.py | skcode/__init__.py | """
PySkCode, Python implementation of a full-featured BBCode syntax parser library.
"""
# Package information
__author__ = "Fabien Batteix (@skywodd)"
__copyright__ = "Copyright 2016, TamiaLab"
__credits__ = ["Fabien Batteix", "TamiaLab"]
__license__ = "GPLv3"
__version__ = "1.0.7"
__maintainer__ = "Fabien Batteix"
_... | """
PySkCode, a Python implementation of a full-featured BBCode syntax parser library.
"""
# Package information
__author__ = "Fabien Batteix (@skywodd)"
__copyright__ = "Copyright 2016, TamiaLab"
__credits__ = ["Fabien Batteix", "TamiaLab"]
__license__ = "GPLv3"
__version__ = "2.0.0"
__maintainer__ = "Fabien Batteix"... | Upgrade to 2.0.0 (big refactoring done, tests TODO) | Upgrade to 2.0.0 (big refactoring done, tests TODO)
| Python | agpl-3.0 | TamiaLab/PySkCode | """
PySkCode, Python implementation of a full-featured BBCode syntax parser library.
"""
# Package information
__author__ = "Fabien Batteix (@skywodd)"
__copyright__ = "Copyright 2016, TamiaLab"
__credits__ = ["Fabien Batteix", "TamiaLab"]
__license__ = "GPLv3"
__version__ = "1.0.7"
__maintainer__ = "Fabien Batteix"
_... | """
PySkCode, a Python implementation of a full-featured BBCode syntax parser library.
"""
# Package information
__author__ = "Fabien Batteix (@skywodd)"
__copyright__ = "Copyright 2016, TamiaLab"
__credits__ = ["Fabien Batteix", "TamiaLab"]
__license__ = "GPLv3"
__version__ = "2.0.0"
__maintainer__ = "Fabien Batteix"... | <commit_before>"""
PySkCode, Python implementation of a full-featured BBCode syntax parser library.
"""
# Package information
__author__ = "Fabien Batteix (@skywodd)"
__copyright__ = "Copyright 2016, TamiaLab"
__credits__ = ["Fabien Batteix", "TamiaLab"]
__license__ = "GPLv3"
__version__ = "1.0.7"
__maintainer__ = "Fa... | """
PySkCode, a Python implementation of a full-featured BBCode syntax parser library.
"""
# Package information
__author__ = "Fabien Batteix (@skywodd)"
__copyright__ = "Copyright 2016, TamiaLab"
__credits__ = ["Fabien Batteix", "TamiaLab"]
__license__ = "GPLv3"
__version__ = "2.0.0"
__maintainer__ = "Fabien Batteix"... | """
PySkCode, Python implementation of a full-featured BBCode syntax parser library.
"""
# Package information
__author__ = "Fabien Batteix (@skywodd)"
__copyright__ = "Copyright 2016, TamiaLab"
__credits__ = ["Fabien Batteix", "TamiaLab"]
__license__ = "GPLv3"
__version__ = "1.0.7"
__maintainer__ = "Fabien Batteix"
_... | <commit_before>"""
PySkCode, Python implementation of a full-featured BBCode syntax parser library.
"""
# Package information
__author__ = "Fabien Batteix (@skywodd)"
__copyright__ = "Copyright 2016, TamiaLab"
__credits__ = ["Fabien Batteix", "TamiaLab"]
__license__ = "GPLv3"
__version__ = "1.0.7"
__maintainer__ = "Fa... |
06959c1db979f401d852c37e4ea88a96c14ebcf7 | rnacentral/sequence_search/settings.py | rnacentral/sequence_search/settings.py | """
Copyright [2009-2019] EMBL-European Bioinformatics Institute
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or a... | """
Copyright [2009-2019] EMBL-European Bioinformatics Institute
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or a... | Use search.rnacentral.org as the sequence search endpoint | Use search.rnacentral.org as the sequence search endpoint | Python | apache-2.0 | RNAcentral/rnacentral-webcode,RNAcentral/rnacentral-webcode,RNAcentral/rnacentral-webcode,RNAcentral/rnacentral-webcode | """
Copyright [2009-2019] EMBL-European Bioinformatics Institute
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or a... | """
Copyright [2009-2019] EMBL-European Bioinformatics Institute
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or a... | <commit_before>"""
Copyright [2009-2019] EMBL-European Bioinformatics Institute
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by appl... | """
Copyright [2009-2019] EMBL-European Bioinformatics Institute
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or a... | """
Copyright [2009-2019] EMBL-European Bioinformatics Institute
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or a... | <commit_before>"""
Copyright [2009-2019] EMBL-European Bioinformatics Institute
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by appl... |
f2d8a622a492009eb3c44221dd322b1e12e62e6e | apps/groups/cron.py | apps/groups/cron.py | from django.db.models import Count
import commonware.log
import cronjobs
from groups.models import AUTO_COMPLETE_COUNT, Group
log = commonware.log.getLogger('m.cron')
@cronjobs.register
def assign_autocomplete_to_groups():
"""Hourly job to assign autocomplete status to popular Mozillian groups."""
# Only ... | from django.db.models import Count
import commonware.log
import cronjobs
from groups.models import AUTO_COMPLETE_COUNT, Group
log = commonware.log.getLogger('m.cron')
@cronjobs.register
def assign_autocomplete_to_groups():
"""Hourly job to assign autocomplete status to popular Mozillian groups."""
# Only ... | Fix @jsocol's nit; less verbose boolean assignment | Fix @jsocol's nit; less verbose boolean assignment
| Python | bsd-3-clause | akarki15/mozillians,mozilla/mozillians,justinpotts/mozillians,hoosteeno/mozillians,mozilla/mozillians,chirilo/mozillians,fxa90id/mozillians,akatsoulas/mozillians,johngian/mozillians,anistark/mozillians,safwanrahman/mozillians,glogiotatidis/mozillians-new,glogiotatidis/mozillians-new,anistark/mozillians,hoosteeno/mozill... | from django.db.models import Count
import commonware.log
import cronjobs
from groups.models import AUTO_COMPLETE_COUNT, Group
log = commonware.log.getLogger('m.cron')
@cronjobs.register
def assign_autocomplete_to_groups():
"""Hourly job to assign autocomplete status to popular Mozillian groups."""
# Only ... | from django.db.models import Count
import commonware.log
import cronjobs
from groups.models import AUTO_COMPLETE_COUNT, Group
log = commonware.log.getLogger('m.cron')
@cronjobs.register
def assign_autocomplete_to_groups():
"""Hourly job to assign autocomplete status to popular Mozillian groups."""
# Only ... | <commit_before>from django.db.models import Count
import commonware.log
import cronjobs
from groups.models import AUTO_COMPLETE_COUNT, Group
log = commonware.log.getLogger('m.cron')
@cronjobs.register
def assign_autocomplete_to_groups():
"""Hourly job to assign autocomplete status to popular Mozillian groups.... | from django.db.models import Count
import commonware.log
import cronjobs
from groups.models import AUTO_COMPLETE_COUNT, Group
log = commonware.log.getLogger('m.cron')
@cronjobs.register
def assign_autocomplete_to_groups():
"""Hourly job to assign autocomplete status to popular Mozillian groups."""
# Only ... | from django.db.models import Count
import commonware.log
import cronjobs
from groups.models import AUTO_COMPLETE_COUNT, Group
log = commonware.log.getLogger('m.cron')
@cronjobs.register
def assign_autocomplete_to_groups():
"""Hourly job to assign autocomplete status to popular Mozillian groups."""
# Only ... | <commit_before>from django.db.models import Count
import commonware.log
import cronjobs
from groups.models import AUTO_COMPLETE_COUNT, Group
log = commonware.log.getLogger('m.cron')
@cronjobs.register
def assign_autocomplete_to_groups():
"""Hourly job to assign autocomplete status to popular Mozillian groups.... |
0e7939b0027cbc203505c636bc732d860b81e78d | sort/merge_sort/python/merge_sort.py | sort/merge_sort/python/merge_sort.py | def merge(left, right):
"""Merge sort merging function."""
left_index, right_index = 0, 0
result = []
while left_index < len(left) and right_index < len(right):
if left[left_index] < right[right_index]:
result.append(left[left_index])
left_index += 1
els... | def merge(left, right):
"""Merge sort merging function."""
left_index, right_index = 0, 0
result = []
while left_index < len(left) and right_index < len(right):
if left[left_index] < right[right_index]:
result.append(left[left_index])
left_index += 1
els... | Add test for merge sort | Add test for merge sort
| Python | cc0-1.0 | manikTharaka/al-go-rithms,ZoranPandovski/al-go-rithms,ZoranPandovski/al-go-rithms,EUNIX-TRIX/al-go-rithms,ZoranPandovski/al-go-rithms,arijitkar98/al-go-rithms,Cnidarias/al-go-rithms,EUNIX-TRIX/al-go-rithms,arijitkar98/al-go-rithms,manikTharaka/al-go-rithms,manikTharaka/al-go-rithms,Cnidarias/al-go-rithms,ZoranPandovski... | def merge(left, right):
"""Merge sort merging function."""
left_index, right_index = 0, 0
result = []
while left_index < len(left) and right_index < len(right):
if left[left_index] < right[right_index]:
result.append(left[left_index])
left_index += 1
els... | def merge(left, right):
"""Merge sort merging function."""
left_index, right_index = 0, 0
result = []
while left_index < len(left) and right_index < len(right):
if left[left_index] < right[right_index]:
result.append(left[left_index])
left_index += 1
els... | <commit_before>def merge(left, right):
"""Merge sort merging function."""
left_index, right_index = 0, 0
result = []
while left_index < len(left) and right_index < len(right):
if left[left_index] < right[right_index]:
result.append(left[left_index])
left_index +=... | def merge(left, right):
"""Merge sort merging function."""
left_index, right_index = 0, 0
result = []
while left_index < len(left) and right_index < len(right):
if left[left_index] < right[right_index]:
result.append(left[left_index])
left_index += 1
els... | def merge(left, right):
"""Merge sort merging function."""
left_index, right_index = 0, 0
result = []
while left_index < len(left) and right_index < len(right):
if left[left_index] < right[right_index]:
result.append(left[left_index])
left_index += 1
els... | <commit_before>def merge(left, right):
"""Merge sort merging function."""
left_index, right_index = 0, 0
result = []
while left_index < len(left) and right_index < len(right):
if left[left_index] < right[right_index]:
result.append(left[left_index])
left_index +=... |
33aa691298ed5c306c3b32965b38c287e65e174a | tests/functional/driver/test_driver_del.py | tests/functional/driver/test_driver_del.py | import pytest
from tests.utils.targetdriver import TargetDriver, if_feature
from tests.utils.testdriver import TestDriver
def get_services():
return TargetDriver('rep1'), TestDriver('rep2')
@pytest.fixture(autouse=True)
def _(module_launcher_launch):
pass
@if_feature.del_file_from_onitu
def test_driver_d... | import pytest
from tests.utils.targetdriver import TargetDriver, if_feature
from tests.utils.testdriver import TestDriver
from tests.utils.loop import CounterLoop
def get_services():
return TargetDriver('rep1'), TestDriver('rep2')
@pytest.fixture(autouse=True)
def _(module_launcher_launch):
pass
@if_feat... | Add test for detection of deleted files on launch | Add test for detection of deleted files on launch
| Python | mit | onitu/onitu,onitu/onitu,onitu/onitu | import pytest
from tests.utils.targetdriver import TargetDriver, if_feature
from tests.utils.testdriver import TestDriver
def get_services():
return TargetDriver('rep1'), TestDriver('rep2')
@pytest.fixture(autouse=True)
def _(module_launcher_launch):
pass
@if_feature.del_file_from_onitu
def test_driver_d... | import pytest
from tests.utils.targetdriver import TargetDriver, if_feature
from tests.utils.testdriver import TestDriver
from tests.utils.loop import CounterLoop
def get_services():
return TargetDriver('rep1'), TestDriver('rep2')
@pytest.fixture(autouse=True)
def _(module_launcher_launch):
pass
@if_feat... | <commit_before>import pytest
from tests.utils.targetdriver import TargetDriver, if_feature
from tests.utils.testdriver import TestDriver
def get_services():
return TargetDriver('rep1'), TestDriver('rep2')
@pytest.fixture(autouse=True)
def _(module_launcher_launch):
pass
@if_feature.del_file_from_onitu
de... | import pytest
from tests.utils.targetdriver import TargetDriver, if_feature
from tests.utils.testdriver import TestDriver
from tests.utils.loop import CounterLoop
def get_services():
return TargetDriver('rep1'), TestDriver('rep2')
@pytest.fixture(autouse=True)
def _(module_launcher_launch):
pass
@if_feat... | import pytest
from tests.utils.targetdriver import TargetDriver, if_feature
from tests.utils.testdriver import TestDriver
def get_services():
return TargetDriver('rep1'), TestDriver('rep2')
@pytest.fixture(autouse=True)
def _(module_launcher_launch):
pass
@if_feature.del_file_from_onitu
def test_driver_d... | <commit_before>import pytest
from tests.utils.targetdriver import TargetDriver, if_feature
from tests.utils.testdriver import TestDriver
def get_services():
return TargetDriver('rep1'), TestDriver('rep2')
@pytest.fixture(autouse=True)
def _(module_launcher_launch):
pass
@if_feature.del_file_from_onitu
de... |
f5ad5a7cf1d33fdf0c709c0fece5bc712df6ec50 | avocado/__init__.py | avocado/__init__.py | __version_info__ = {
'major': 2,
'minor': 0,
'micro': 25,
'releaselevel': 'beta',
'serial': 1
}
def get_version(short=False):
assert __version_info__['releaselevel'] in ('alpha', 'beta', 'final')
vers = ["%(major)i.%(minor)i" % __version_info__, ]
if __version_info__['micro']:
v... | __version_info__ = {
'major': 2,
'minor': 1,
'micro': 0,
'releaselevel': 'beta',
'serial': 1
}
def get_version(short=False):
assert __version_info__['releaselevel'] in ('alpha', 'beta', 'final')
vers = ["%(major)i.%(minor)i" % __version_info__, ]
if __version_info__['micro']:
ve... | Update branch to version 2.1.0 beta | Update branch to version 2.1.0 beta
| Python | bsd-2-clause | murphyke/avocado,murphyke/avocado,murphyke/avocado,murphyke/avocado | __version_info__ = {
'major': 2,
'minor': 0,
'micro': 25,
'releaselevel': 'beta',
'serial': 1
}
def get_version(short=False):
assert __version_info__['releaselevel'] in ('alpha', 'beta', 'final')
vers = ["%(major)i.%(minor)i" % __version_info__, ]
if __version_info__['micro']:
v... | __version_info__ = {
'major': 2,
'minor': 1,
'micro': 0,
'releaselevel': 'beta',
'serial': 1
}
def get_version(short=False):
assert __version_info__['releaselevel'] in ('alpha', 'beta', 'final')
vers = ["%(major)i.%(minor)i" % __version_info__, ]
if __version_info__['micro']:
ve... | <commit_before>__version_info__ = {
'major': 2,
'minor': 0,
'micro': 25,
'releaselevel': 'beta',
'serial': 1
}
def get_version(short=False):
assert __version_info__['releaselevel'] in ('alpha', 'beta', 'final')
vers = ["%(major)i.%(minor)i" % __version_info__, ]
if __version_info__['mic... | __version_info__ = {
'major': 2,
'minor': 1,
'micro': 0,
'releaselevel': 'beta',
'serial': 1
}
def get_version(short=False):
assert __version_info__['releaselevel'] in ('alpha', 'beta', 'final')
vers = ["%(major)i.%(minor)i" % __version_info__, ]
if __version_info__['micro']:
ve... | __version_info__ = {
'major': 2,
'minor': 0,
'micro': 25,
'releaselevel': 'beta',
'serial': 1
}
def get_version(short=False):
assert __version_info__['releaselevel'] in ('alpha', 'beta', 'final')
vers = ["%(major)i.%(minor)i" % __version_info__, ]
if __version_info__['micro']:
v... | <commit_before>__version_info__ = {
'major': 2,
'minor': 0,
'micro': 25,
'releaselevel': 'beta',
'serial': 1
}
def get_version(short=False):
assert __version_info__['releaselevel'] in ('alpha', 'beta', 'final')
vers = ["%(major)i.%(minor)i" % __version_info__, ]
if __version_info__['mic... |
b1f173fdbfb60e26a3923c7b024bc3e65e5abf80 | selvbetjening/scheckin/now/urls.py | selvbetjening/scheckin/now/urls.py | from django.conf.urls import *
import views
urlpatterns = patterns('',
url(r'^(?P<event_id>[0-9]+)/$', views.checkin),
)
| from django.conf.urls import *
from django.conf import settings
from django.core.urlresolvers import reverse
from django.utils.translation import ugettext as _
from selvbetjening.sadmin.base.nav import RemoteSPage
import views
urlpatterns = patterns('',
url(r'^(?P<event_id>[0-9]+)/$', views.checkin, name='now_ch... | Add links to easy check-in in sadmin | Add links to easy check-in in sadmin
| Python | mit | animekita/selvbetjening,animekita/selvbetjening,animekita/selvbetjening,animekita/selvbetjening | from django.conf.urls import *
import views
urlpatterns = patterns('',
url(r'^(?P<event_id>[0-9]+)/$', views.checkin),
)
Add links to easy check-in in sadmin | from django.conf.urls import *
from django.conf import settings
from django.core.urlresolvers import reverse
from django.utils.translation import ugettext as _
from selvbetjening.sadmin.base.nav import RemoteSPage
import views
urlpatterns = patterns('',
url(r'^(?P<event_id>[0-9]+)/$', views.checkin, name='now_ch... | <commit_before>from django.conf.urls import *
import views
urlpatterns = patterns('',
url(r'^(?P<event_id>[0-9]+)/$', views.checkin),
)
<commit_msg>Add links to easy check-in in sadmin<commit_after> | from django.conf.urls import *
from django.conf import settings
from django.core.urlresolvers import reverse
from django.utils.translation import ugettext as _
from selvbetjening.sadmin.base.nav import RemoteSPage
import views
urlpatterns = patterns('',
url(r'^(?P<event_id>[0-9]+)/$', views.checkin, name='now_ch... | from django.conf.urls import *
import views
urlpatterns = patterns('',
url(r'^(?P<event_id>[0-9]+)/$', views.checkin),
)
Add links to easy check-in in sadminfrom django.conf.urls import *
from django.conf import settings
from django.core.urlresolvers import reverse
from django.utils.translation import ugettext as... | <commit_before>from django.conf.urls import *
import views
urlpatterns = patterns('',
url(r'^(?P<event_id>[0-9]+)/$', views.checkin),
)
<commit_msg>Add links to easy check-in in sadmin<commit_after>from django.conf.urls import *
from django.conf import settings
from django.core.urlresolvers import reverse
from dj... |
8ae5079a2963a356a6073a245305fff98fcc7461 | dbaas/logical/tasks.py | dbaas/logical/tasks.py | from logical.models import Database
from dbaas.celery import app
from util.decorators import only_one
@app.task
@only_one(key="purgequarantinekey", timeout=20)
def purge_quarantine():
Database.purge_quarantine()
return
| from logical.models import Database
from system.models import Configuration
from datetime import date, timedelta
from dbaas.celery import app
from util.decorators import only_one
from util.providers import destroy_infra
from simple_audit.models import AuditRequest
from notification.models import TaskHistory
from accoun... | Change purge quarantine to deal with cloudstack databases | Change purge quarantine to deal with cloudstack databases
| Python | bsd-3-clause | globocom/database-as-a-service,globocom/database-as-a-service,globocom/database-as-a-service,globocom/database-as-a-service | from logical.models import Database
from dbaas.celery import app
from util.decorators import only_one
@app.task
@only_one(key="purgequarantinekey", timeout=20)
def purge_quarantine():
Database.purge_quarantine()
return
Change purge quarantine to deal with cloudstack databases | from logical.models import Database
from system.models import Configuration
from datetime import date, timedelta
from dbaas.celery import app
from util.decorators import only_one
from util.providers import destroy_infra
from simple_audit.models import AuditRequest
from notification.models import TaskHistory
from accoun... | <commit_before>from logical.models import Database
from dbaas.celery import app
from util.decorators import only_one
@app.task
@only_one(key="purgequarantinekey", timeout=20)
def purge_quarantine():
Database.purge_quarantine()
return
<commit_msg>Change purge quarantine to deal with cloudstack databases<commi... | from logical.models import Database
from system.models import Configuration
from datetime import date, timedelta
from dbaas.celery import app
from util.decorators import only_one
from util.providers import destroy_infra
from simple_audit.models import AuditRequest
from notification.models import TaskHistory
from accoun... | from logical.models import Database
from dbaas.celery import app
from util.decorators import only_one
@app.task
@only_one(key="purgequarantinekey", timeout=20)
def purge_quarantine():
Database.purge_quarantine()
return
Change purge quarantine to deal with cloudstack databasesfrom logical.models import Databa... | <commit_before>from logical.models import Database
from dbaas.celery import app
from util.decorators import only_one
@app.task
@only_one(key="purgequarantinekey", timeout=20)
def purge_quarantine():
Database.purge_quarantine()
return
<commit_msg>Change purge quarantine to deal with cloudstack databases<commi... |
10f7b7db3b7912c74ca0320ac70da425bd2718ed | scripts/fabfile.py | scripts/fabfile.py | from fabric import task
CODE_DIR = '~/django-projects/test-osale/foodbank-campaign/src'
# for FreeBSD compatibility
SHELL = '/bin/sh -c'
@task
def deploy(c):
c.shell = SHELL
with c.cd(CODE_DIR):
pull_changes(c)
with c.prefix('. ../venv/bin/activate'):
update_dependencies(c)
... | from fabric import task
CODE_DIR = '~/django-projects/test-osale/foodbank-campaign/src'
# for FreeBSD compatibility
SHELL = '/bin/sh -c'
@task
def deploy(c):
c.shell = SHELL
with c.cd(CODE_DIR):
pull_changes(c)
with c.prefix('. ../venv/bin/activate'):
update_dependencies(c)
... | Add --upgrade to pip install in Fabfile | Add --upgrade to pip install in Fabfile
| Python | mit | mrts/foodbank-campaign,mrts/foodbank-campaign,mrts/foodbank-campaign,mrts/foodbank-campaign | from fabric import task
CODE_DIR = '~/django-projects/test-osale/foodbank-campaign/src'
# for FreeBSD compatibility
SHELL = '/bin/sh -c'
@task
def deploy(c):
c.shell = SHELL
with c.cd(CODE_DIR):
pull_changes(c)
with c.prefix('. ../venv/bin/activate'):
update_dependencies(c)
... | from fabric import task
CODE_DIR = '~/django-projects/test-osale/foodbank-campaign/src'
# for FreeBSD compatibility
SHELL = '/bin/sh -c'
@task
def deploy(c):
c.shell = SHELL
with c.cd(CODE_DIR):
pull_changes(c)
with c.prefix('. ../venv/bin/activate'):
update_dependencies(c)
... | <commit_before>from fabric import task
CODE_DIR = '~/django-projects/test-osale/foodbank-campaign/src'
# for FreeBSD compatibility
SHELL = '/bin/sh -c'
@task
def deploy(c):
c.shell = SHELL
with c.cd(CODE_DIR):
pull_changes(c)
with c.prefix('. ../venv/bin/activate'):
update_depende... | from fabric import task
CODE_DIR = '~/django-projects/test-osale/foodbank-campaign/src'
# for FreeBSD compatibility
SHELL = '/bin/sh -c'
@task
def deploy(c):
c.shell = SHELL
with c.cd(CODE_DIR):
pull_changes(c)
with c.prefix('. ../venv/bin/activate'):
update_dependencies(c)
... | from fabric import task
CODE_DIR = '~/django-projects/test-osale/foodbank-campaign/src'
# for FreeBSD compatibility
SHELL = '/bin/sh -c'
@task
def deploy(c):
c.shell = SHELL
with c.cd(CODE_DIR):
pull_changes(c)
with c.prefix('. ../venv/bin/activate'):
update_dependencies(c)
... | <commit_before>from fabric import task
CODE_DIR = '~/django-projects/test-osale/foodbank-campaign/src'
# for FreeBSD compatibility
SHELL = '/bin/sh -c'
@task
def deploy(c):
c.shell = SHELL
with c.cd(CODE_DIR):
pull_changes(c)
with c.prefix('. ../venv/bin/activate'):
update_depende... |
d40ba3bcceb1dcc7338b689194cd7214d7b2d5ff | syncano_cli/execute/commands.py | syncano_cli/execute/commands.py | # -*- coding: utf-8 -*-
from __future__ import print_function
import json
import sys
from ConfigParser import NoOptionError
import click
from syncano_cli import LOG
from .connection import create_connection
@click.group()
def top_execute():
pass
@top_execute.command()
@click.option('--config', help=u'Account... | # -*- coding: utf-8 -*-
from __future__ import print_function
import json
import sys
from ConfigParser import NoOptionError
import click
from syncano.exceptions import SyncanoDoesNotExist
from syncano_cli import LOG
from .connection import create_connection
@click.group()
def top_execute():
pass
@top_execute... | Refactor the code: add error handling of invalid or empty parameters, improve output format. | Refactor the code: add error handling of invalid or empty parameters, improve output format.
| Python | mit | Syncano/syncano-cli,Syncano/syncano-cli,Syncano/syncano-cli | # -*- coding: utf-8 -*-
from __future__ import print_function
import json
import sys
from ConfigParser import NoOptionError
import click
from syncano_cli import LOG
from .connection import create_connection
@click.group()
def top_execute():
pass
@top_execute.command()
@click.option('--config', help=u'Account... | # -*- coding: utf-8 -*-
from __future__ import print_function
import json
import sys
from ConfigParser import NoOptionError
import click
from syncano.exceptions import SyncanoDoesNotExist
from syncano_cli import LOG
from .connection import create_connection
@click.group()
def top_execute():
pass
@top_execute... | <commit_before># -*- coding: utf-8 -*-
from __future__ import print_function
import json
import sys
from ConfigParser import NoOptionError
import click
from syncano_cli import LOG
from .connection import create_connection
@click.group()
def top_execute():
pass
@top_execute.command()
@click.option('--config',... | # -*- coding: utf-8 -*-
from __future__ import print_function
import json
import sys
from ConfigParser import NoOptionError
import click
from syncano.exceptions import SyncanoDoesNotExist
from syncano_cli import LOG
from .connection import create_connection
@click.group()
def top_execute():
pass
@top_execute... | # -*- coding: utf-8 -*-
from __future__ import print_function
import json
import sys
from ConfigParser import NoOptionError
import click
from syncano_cli import LOG
from .connection import create_connection
@click.group()
def top_execute():
pass
@top_execute.command()
@click.option('--config', help=u'Account... | <commit_before># -*- coding: utf-8 -*-
from __future__ import print_function
import json
import sys
from ConfigParser import NoOptionError
import click
from syncano_cli import LOG
from .connection import create_connection
@click.group()
def top_execute():
pass
@top_execute.command()
@click.option('--config',... |
5f89ad72905947ac47c3246a15fae99c15571435 | django/signups/tests.py | django/signups/tests.py | """
This file demonstrates writing tests using the unittest module. These will pass
when you run "manage.py test".
Replace this with more appropriate tests for your application.
"""
from django.test import TestCase
from django.test.client import Client
from signups.models import User
from splinter_demo.test_runner im... | from django.test import TestCase
from django.test.client import Client
from signups.models import User
from splinter_demo.test_runner import BROWSER
class TestSignup(TestCase):
def visit(self, path):
BROWSER.visit('http://localhost:65432' + path)
def test_sign_up(self):
Client().post('/', {'e... | Remove a bit of django boilerplate | Remove a bit of django boilerplate
| Python | mit | ErinCall/splinter_demo,ErinCall/splinter_demo | """
This file demonstrates writing tests using the unittest module. These will pass
when you run "manage.py test".
Replace this with more appropriate tests for your application.
"""
from django.test import TestCase
from django.test.client import Client
from signups.models import User
from splinter_demo.test_runner im... | from django.test import TestCase
from django.test.client import Client
from signups.models import User
from splinter_demo.test_runner import BROWSER
class TestSignup(TestCase):
def visit(self, path):
BROWSER.visit('http://localhost:65432' + path)
def test_sign_up(self):
Client().post('/', {'e... | <commit_before>"""
This file demonstrates writing tests using the unittest module. These will pass
when you run "manage.py test".
Replace this with more appropriate tests for your application.
"""
from django.test import TestCase
from django.test.client import Client
from signups.models import User
from splinter_demo... | from django.test import TestCase
from django.test.client import Client
from signups.models import User
from splinter_demo.test_runner import BROWSER
class TestSignup(TestCase):
def visit(self, path):
BROWSER.visit('http://localhost:65432' + path)
def test_sign_up(self):
Client().post('/', {'e... | """
This file demonstrates writing tests using the unittest module. These will pass
when you run "manage.py test".
Replace this with more appropriate tests for your application.
"""
from django.test import TestCase
from django.test.client import Client
from signups.models import User
from splinter_demo.test_runner im... | <commit_before>"""
This file demonstrates writing tests using the unittest module. These will pass
when you run "manage.py test".
Replace this with more appropriate tests for your application.
"""
from django.test import TestCase
from django.test.client import Client
from signups.models import User
from splinter_demo... |
bb85df8a9a8cecaf6f3db276347aa8f5f9b39d0c | bot/game/api/api_data.py | bot/game/api/api_data.py | import codecs
import json
from tools.cipher import salted_digest
DATA_ENCODING = "utf-8"
TRANSPORT_ENCODING = "base64"
DUMMY_ENCODING = "ascii"
DATA_DIGEST_SEPARATOR = "-"
def encode(data):
dumped_data = json.dumps(data)
encoded_dumped_data = dumped_data.encode(DATA_ENCODING)
encoded = codecs.encode(e... | import codecs
import json
from tools.cipher import salted_digest
DATA_ENCODING = "utf-8"
TRANSPORT_ENCODING = "base64"
DUMMY_ENCODING = "ascii"
DATA_DIGEST_SEPARATOR = "-"
def encode(data):
dumped_data = json.dumps(data)
encoded_dumped_data = dumped_data.encode(DATA_ENCODING)
encoded = _transport_enco... | Remove newlines from exported url_data | Remove newlines from exported url_data
| Python | apache-2.0 | alvarogzp/telegram-games,alvarogzp/telegram-games,alvarogzp/telegram-games,alvarogzp/telegram-games | import codecs
import json
from tools.cipher import salted_digest
DATA_ENCODING = "utf-8"
TRANSPORT_ENCODING = "base64"
DUMMY_ENCODING = "ascii"
DATA_DIGEST_SEPARATOR = "-"
def encode(data):
dumped_data = json.dumps(data)
encoded_dumped_data = dumped_data.encode(DATA_ENCODING)
encoded = codecs.encode(e... | import codecs
import json
from tools.cipher import salted_digest
DATA_ENCODING = "utf-8"
TRANSPORT_ENCODING = "base64"
DUMMY_ENCODING = "ascii"
DATA_DIGEST_SEPARATOR = "-"
def encode(data):
dumped_data = json.dumps(data)
encoded_dumped_data = dumped_data.encode(DATA_ENCODING)
encoded = _transport_enco... | <commit_before>import codecs
import json
from tools.cipher import salted_digest
DATA_ENCODING = "utf-8"
TRANSPORT_ENCODING = "base64"
DUMMY_ENCODING = "ascii"
DATA_DIGEST_SEPARATOR = "-"
def encode(data):
dumped_data = json.dumps(data)
encoded_dumped_data = dumped_data.encode(DATA_ENCODING)
encoded = ... | import codecs
import json
from tools.cipher import salted_digest
DATA_ENCODING = "utf-8"
TRANSPORT_ENCODING = "base64"
DUMMY_ENCODING = "ascii"
DATA_DIGEST_SEPARATOR = "-"
def encode(data):
dumped_data = json.dumps(data)
encoded_dumped_data = dumped_data.encode(DATA_ENCODING)
encoded = _transport_enco... | import codecs
import json
from tools.cipher import salted_digest
DATA_ENCODING = "utf-8"
TRANSPORT_ENCODING = "base64"
DUMMY_ENCODING = "ascii"
DATA_DIGEST_SEPARATOR = "-"
def encode(data):
dumped_data = json.dumps(data)
encoded_dumped_data = dumped_data.encode(DATA_ENCODING)
encoded = codecs.encode(e... | <commit_before>import codecs
import json
from tools.cipher import salted_digest
DATA_ENCODING = "utf-8"
TRANSPORT_ENCODING = "base64"
DUMMY_ENCODING = "ascii"
DATA_DIGEST_SEPARATOR = "-"
def encode(data):
dumped_data = json.dumps(data)
encoded_dumped_data = dumped_data.encode(DATA_ENCODING)
encoded = ... |
4b6b5effc744583eb0227d14d0c5e324c50cf074 | tests/integration/test_proxy.py | tests/integration/test_proxy.py | # -*- coding: utf-8 -*-
'''Test using a proxy.'''
# External imports
import multiprocessing
import pytest
from six.moves import socketserver, SimpleHTTPServer
from six.moves.urllib.request import urlopen
# Internal imports
import vcr
# Conditional imports
requests = pytest.importorskip("requests")
class Proxy(Sim... | # -*- coding: utf-8 -*-
'''Test using a proxy.'''
# External imports
import multiprocessing
import pytest
from six.moves import socketserver, SimpleHTTPServer
from six.moves.urllib.request import urlopen
# Internal imports
import vcr
# Conditional imports
requests = pytest.importorskip("requests")
class Proxy(Sim... | Add headers in proxy server response | Add headers in proxy server response
| Python | mit | kevin1024/vcrpy,kevin1024/vcrpy,graingert/vcrpy,graingert/vcrpy | # -*- coding: utf-8 -*-
'''Test using a proxy.'''
# External imports
import multiprocessing
import pytest
from six.moves import socketserver, SimpleHTTPServer
from six.moves.urllib.request import urlopen
# Internal imports
import vcr
# Conditional imports
requests = pytest.importorskip("requests")
class Proxy(Sim... | # -*- coding: utf-8 -*-
'''Test using a proxy.'''
# External imports
import multiprocessing
import pytest
from six.moves import socketserver, SimpleHTTPServer
from six.moves.urllib.request import urlopen
# Internal imports
import vcr
# Conditional imports
requests = pytest.importorskip("requests")
class Proxy(Sim... | <commit_before># -*- coding: utf-8 -*-
'''Test using a proxy.'''
# External imports
import multiprocessing
import pytest
from six.moves import socketserver, SimpleHTTPServer
from six.moves.urllib.request import urlopen
# Internal imports
import vcr
# Conditional imports
requests = pytest.importorskip("requests")
... | # -*- coding: utf-8 -*-
'''Test using a proxy.'''
# External imports
import multiprocessing
import pytest
from six.moves import socketserver, SimpleHTTPServer
from six.moves.urllib.request import urlopen
# Internal imports
import vcr
# Conditional imports
requests = pytest.importorskip("requests")
class Proxy(Sim... | # -*- coding: utf-8 -*-
'''Test using a proxy.'''
# External imports
import multiprocessing
import pytest
from six.moves import socketserver, SimpleHTTPServer
from six.moves.urllib.request import urlopen
# Internal imports
import vcr
# Conditional imports
requests = pytest.importorskip("requests")
class Proxy(Sim... | <commit_before># -*- coding: utf-8 -*-
'''Test using a proxy.'''
# External imports
import multiprocessing
import pytest
from six.moves import socketserver, SimpleHTTPServer
from six.moves.urllib.request import urlopen
# Internal imports
import vcr
# Conditional imports
requests = pytest.importorskip("requests")
... |
2cc26cd92bd2c2fc6300021bc4b7a0a219cf97cd | tests/mep/genetics/test_gene.py | tests/mep/genetics/test_gene.py | import unittest
from mep.genetics.gene import VariableGene
import numpy as np
class TestVariableGene(unittest.TestCase):
"""
Tests for the variable gene.
"""
def test_basic_constant(self):
"""
Simple check of a constant gene with just 1 gene in the chromosome.
"""
# co... | Test of the constant variable. | Test of the constant variable.
| Python | mit | paulfjacobs/py-mep,paulfjacobs/py-mep | Test of the constant variable. | import unittest
from mep.genetics.gene import VariableGene
import numpy as np
class TestVariableGene(unittest.TestCase):
"""
Tests for the variable gene.
"""
def test_basic_constant(self):
"""
Simple check of a constant gene with just 1 gene in the chromosome.
"""
# co... | <commit_before><commit_msg>Test of the constant variable.<commit_after> | import unittest
from mep.genetics.gene import VariableGene
import numpy as np
class TestVariableGene(unittest.TestCase):
"""
Tests for the variable gene.
"""
def test_basic_constant(self):
"""
Simple check of a constant gene with just 1 gene in the chromosome.
"""
# co... | Test of the constant variable.import unittest
from mep.genetics.gene import VariableGene
import numpy as np
class TestVariableGene(unittest.TestCase):
"""
Tests for the variable gene.
"""
def test_basic_constant(self):
"""
Simple check of a constant gene with just 1 gene in the chromo... | <commit_before><commit_msg>Test of the constant variable.<commit_after>import unittest
from mep.genetics.gene import VariableGene
import numpy as np
class TestVariableGene(unittest.TestCase):
"""
Tests for the variable gene.
"""
def test_basic_constant(self):
"""
Simple check of a con... | |
e9ad33a12dcb3f678c2aa7a8bcc0339dcb88bd5b | tests/unit/test_authenticate.py | tests/unit/test_authenticate.py | """Test the DigitalOcean backed ACME DNS Authentication Class."""
from acmednsauth.authenticate import Authenticate
from mock import call
import pytest
@pytest.fixture()
def create_environment(api_key, domain, fqdn, auth_token):
return {
'DO_API_KEY': api_key,
'DO_DOMAIN': domain,
'CERTBO... | """Test the DigitalOcean backed ACME DNS Authentication Class."""
from acmednsauth.authenticate import Authenticate
from mock import call
import pytest
@pytest.fixture()
def create_environment(api_key, domain, fqdn, auth_token):
return {
'DO_API_KEY': api_key,
'DO_DOMAIN': domain,
'CERTBO... | Reword Test Names for Clarity | Reword Test Names for Clarity
I didn't like how the test names were sounding. Hopefully this is
better.
| Python | apache-2.0 | Jitsusama/lets-do-dns | """Test the DigitalOcean backed ACME DNS Authentication Class."""
from acmednsauth.authenticate import Authenticate
from mock import call
import pytest
@pytest.fixture()
def create_environment(api_key, domain, fqdn, auth_token):
return {
'DO_API_KEY': api_key,
'DO_DOMAIN': domain,
'CERTBO... | """Test the DigitalOcean backed ACME DNS Authentication Class."""
from acmednsauth.authenticate import Authenticate
from mock import call
import pytest
@pytest.fixture()
def create_environment(api_key, domain, fqdn, auth_token):
return {
'DO_API_KEY': api_key,
'DO_DOMAIN': domain,
'CERTBO... | <commit_before>"""Test the DigitalOcean backed ACME DNS Authentication Class."""
from acmednsauth.authenticate import Authenticate
from mock import call
import pytest
@pytest.fixture()
def create_environment(api_key, domain, fqdn, auth_token):
return {
'DO_API_KEY': api_key,
'DO_DOMAIN': domain,
... | """Test the DigitalOcean backed ACME DNS Authentication Class."""
from acmednsauth.authenticate import Authenticate
from mock import call
import pytest
@pytest.fixture()
def create_environment(api_key, domain, fqdn, auth_token):
return {
'DO_API_KEY': api_key,
'DO_DOMAIN': domain,
'CERTBO... | """Test the DigitalOcean backed ACME DNS Authentication Class."""
from acmednsauth.authenticate import Authenticate
from mock import call
import pytest
@pytest.fixture()
def create_environment(api_key, domain, fqdn, auth_token):
return {
'DO_API_KEY': api_key,
'DO_DOMAIN': domain,
'CERTBO... | <commit_before>"""Test the DigitalOcean backed ACME DNS Authentication Class."""
from acmednsauth.authenticate import Authenticate
from mock import call
import pytest
@pytest.fixture()
def create_environment(api_key, domain, fqdn, auth_token):
return {
'DO_API_KEY': api_key,
'DO_DOMAIN': domain,
... |
e75b79fb5dd614d117289acdab758c5c86b89e35 | update-database/stackdoc/questionimport.py | update-database/stackdoc/questionimport.py |
def import_question(posts, namespaces, upsert, id, title, body, tags, last_activity_date, last_updated_date, score, answers, has_accepted_answer):
namespaces_for_post = {}
for name, n in namespaces.items():
namespace_tags = n.get_tags()
if not(namespace_tags) or any(map(lambda x: x in tags, nam... |
def import_question(posts, namespaces, upsert, id, title, body, tags, last_activity_date, last_updated_date, score, answers, has_accepted_answer):
namespaces_for_post = {}
for name, n in namespaces.items():
namespace_tags = n.get_tags()
if not(namespace_tags) or any(map(lambda x: x in tags, nam... | Include answer count in stored data. | Include answer count in stored data.
| Python | bsd-3-clause | alnorth/stackdoc,alnorth/stackdoc,alnorth/stackdoc |
def import_question(posts, namespaces, upsert, id, title, body, tags, last_activity_date, last_updated_date, score, answers, has_accepted_answer):
namespaces_for_post = {}
for name, n in namespaces.items():
namespace_tags = n.get_tags()
if not(namespace_tags) or any(map(lambda x: x in tags, nam... |
def import_question(posts, namespaces, upsert, id, title, body, tags, last_activity_date, last_updated_date, score, answers, has_accepted_answer):
namespaces_for_post = {}
for name, n in namespaces.items():
namespace_tags = n.get_tags()
if not(namespace_tags) or any(map(lambda x: x in tags, nam... | <commit_before>
def import_question(posts, namespaces, upsert, id, title, body, tags, last_activity_date, last_updated_date, score, answers, has_accepted_answer):
namespaces_for_post = {}
for name, n in namespaces.items():
namespace_tags = n.get_tags()
if not(namespace_tags) or any(map(lambda x:... |
def import_question(posts, namespaces, upsert, id, title, body, tags, last_activity_date, last_updated_date, score, answers, has_accepted_answer):
namespaces_for_post = {}
for name, n in namespaces.items():
namespace_tags = n.get_tags()
if not(namespace_tags) or any(map(lambda x: x in tags, nam... |
def import_question(posts, namespaces, upsert, id, title, body, tags, last_activity_date, last_updated_date, score, answers, has_accepted_answer):
namespaces_for_post = {}
for name, n in namespaces.items():
namespace_tags = n.get_tags()
if not(namespace_tags) or any(map(lambda x: x in tags, nam... | <commit_before>
def import_question(posts, namespaces, upsert, id, title, body, tags, last_activity_date, last_updated_date, score, answers, has_accepted_answer):
namespaces_for_post = {}
for name, n in namespaces.items():
namespace_tags = n.get_tags()
if not(namespace_tags) or any(map(lambda x:... |
bd4812a1ef93c51bedbc92e8064b3457b5d88992 | tests/test_slice.py | tests/test_slice.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# (c) 2015-2018, ETH Zurich, Institut fuer Theoretische Physik
# Author: Dominik Gresch <[email protected]>
import pytest
import numpy as np
from parameters import T_VALUES, KPT
@pytest.mark.parametrize('slice_idx', [(0, 1), [1, 0], (0, ), (1, )])
@pytest.mark.parametrize... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# (c) 2015-2018, ETH Zurich, Institut fuer Theoretische Physik
# Author: Dominik Gresch <[email protected]>
"""Tests for the model slicing functionality."""
import pytest
import numpy as np
from parameters import T_VALUES, KPT
@pytest.mark.parametrize('slice_idx', [(0, 1)... | Fix pre-commit for slicing method. | Fix pre-commit for slicing method.
| Python | apache-2.0 | Z2PackDev/TBmodels,Z2PackDev/TBmodels | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# (c) 2015-2018, ETH Zurich, Institut fuer Theoretische Physik
# Author: Dominik Gresch <[email protected]>
import pytest
import numpy as np
from parameters import T_VALUES, KPT
@pytest.mark.parametrize('slice_idx', [(0, 1), [1, 0], (0, ), (1, )])
@pytest.mark.parametrize... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# (c) 2015-2018, ETH Zurich, Institut fuer Theoretische Physik
# Author: Dominik Gresch <[email protected]>
"""Tests for the model slicing functionality."""
import pytest
import numpy as np
from parameters import T_VALUES, KPT
@pytest.mark.parametrize('slice_idx', [(0, 1)... | <commit_before>#!/usr/bin/env python
# -*- coding: utf-8 -*-
# (c) 2015-2018, ETH Zurich, Institut fuer Theoretische Physik
# Author: Dominik Gresch <[email protected]>
import pytest
import numpy as np
from parameters import T_VALUES, KPT
@pytest.mark.parametrize('slice_idx', [(0, 1), [1, 0], (0, ), (1, )])
@pytest.m... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# (c) 2015-2018, ETH Zurich, Institut fuer Theoretische Physik
# Author: Dominik Gresch <[email protected]>
"""Tests for the model slicing functionality."""
import pytest
import numpy as np
from parameters import T_VALUES, KPT
@pytest.mark.parametrize('slice_idx', [(0, 1)... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# (c) 2015-2018, ETH Zurich, Institut fuer Theoretische Physik
# Author: Dominik Gresch <[email protected]>
import pytest
import numpy as np
from parameters import T_VALUES, KPT
@pytest.mark.parametrize('slice_idx', [(0, 1), [1, 0], (0, ), (1, )])
@pytest.mark.parametrize... | <commit_before>#!/usr/bin/env python
# -*- coding: utf-8 -*-
# (c) 2015-2018, ETH Zurich, Institut fuer Theoretische Physik
# Author: Dominik Gresch <[email protected]>
import pytest
import numpy as np
from parameters import T_VALUES, KPT
@pytest.mark.parametrize('slice_idx', [(0, 1), [1, 0], (0, ), (1, )])
@pytest.m... |
d07e1c020185fb118b628674234c4a1ebcc11836 | binder/config.py | binder/config.py | c.ServerProxy.servers = {
'lab-dev': {
'command': [
'jupyter',
'lab',
'--no-browser',
'--dev-mode',
'--port={port}',
'--NotebookApp.token=""',
]
}
}
c.NotebookApp.default_url = '/lab-dev'
| c.ServerProxy.servers = {
'lab-dev': {
'command': [
'jupyter',
'lab',
'--no-browser',
'--dev-mode',
'--port={port}',
'--NotebookApp.token=""',
'--NotebookApp.base_url={base_url}/lab-dev'
]
}
}
c.NotebookApp.defa... | Set base_url for dev version of lab | Set base_url for dev version of lab | Python | bsd-3-clause | jupyter/jupyterlab,jupyter/jupyterlab,jupyter/jupyterlab,jupyter/jupyterlab,jupyter/jupyterlab | c.ServerProxy.servers = {
'lab-dev': {
'command': [
'jupyter',
'lab',
'--no-browser',
'--dev-mode',
'--port={port}',
'--NotebookApp.token=""',
]
}
}
c.NotebookApp.default_url = '/lab-dev'
Set base_url for dev version of lab | c.ServerProxy.servers = {
'lab-dev': {
'command': [
'jupyter',
'lab',
'--no-browser',
'--dev-mode',
'--port={port}',
'--NotebookApp.token=""',
'--NotebookApp.base_url={base_url}/lab-dev'
]
}
}
c.NotebookApp.defa... | <commit_before>c.ServerProxy.servers = {
'lab-dev': {
'command': [
'jupyter',
'lab',
'--no-browser',
'--dev-mode',
'--port={port}',
'--NotebookApp.token=""',
]
}
}
c.NotebookApp.default_url = '/lab-dev'
<commit_msg>Set base... | c.ServerProxy.servers = {
'lab-dev': {
'command': [
'jupyter',
'lab',
'--no-browser',
'--dev-mode',
'--port={port}',
'--NotebookApp.token=""',
'--NotebookApp.base_url={base_url}/lab-dev'
]
}
}
c.NotebookApp.defa... | c.ServerProxy.servers = {
'lab-dev': {
'command': [
'jupyter',
'lab',
'--no-browser',
'--dev-mode',
'--port={port}',
'--NotebookApp.token=""',
]
}
}
c.NotebookApp.default_url = '/lab-dev'
Set base_url for dev version of lab... | <commit_before>c.ServerProxy.servers = {
'lab-dev': {
'command': [
'jupyter',
'lab',
'--no-browser',
'--dev-mode',
'--port={port}',
'--NotebookApp.token=""',
]
}
}
c.NotebookApp.default_url = '/lab-dev'
<commit_msg>Set base... |
ffc4d6db188b9ad8ece655c8221f2e5a34e7c66b | main.py | main.py | """
pyMonitor first Version
Written By :Ahmed Alkabir
"""
#!/usr/bin/python3
import main_ui as Ui
import sys
# Main Thread of Program
def main():
app = Ui.QtWidgets.QApplication(sys.argv)
main_window = Ui.QtWidgets.QMainWindow()
ui = Ui.Ui_window(main_window)
main_window.show()
sys.exit... | """
pyMonitor first Version
Written By :Ahmed Alkabir
"""
#!/usr/bin/python3
import main_ui as Ui
import sys
# Main Thread of Program
def main():
if float(sys.version[:3]) >= 3.3:
app = Ui.QtWidgets.QApplication(sys.argv)
main_window = Ui.QtWidgets.QMainWindow()
ui = Ui.Ui_windo... | Check Verison of Python Interpreter | Check Verison of Python Interpreter
| Python | mit | ahmedalkabir/pyMonitor | """
pyMonitor first Version
Written By :Ahmed Alkabir
"""
#!/usr/bin/python3
import main_ui as Ui
import sys
# Main Thread of Program
def main():
app = Ui.QtWidgets.QApplication(sys.argv)
main_window = Ui.QtWidgets.QMainWindow()
ui = Ui.Ui_window(main_window)
main_window.show()
sys.exit... | """
pyMonitor first Version
Written By :Ahmed Alkabir
"""
#!/usr/bin/python3
import main_ui as Ui
import sys
# Main Thread of Program
def main():
if float(sys.version[:3]) >= 3.3:
app = Ui.QtWidgets.QApplication(sys.argv)
main_window = Ui.QtWidgets.QMainWindow()
ui = Ui.Ui_windo... | <commit_before>"""
pyMonitor first Version
Written By :Ahmed Alkabir
"""
#!/usr/bin/python3
import main_ui as Ui
import sys
# Main Thread of Program
def main():
app = Ui.QtWidgets.QApplication(sys.argv)
main_window = Ui.QtWidgets.QMainWindow()
ui = Ui.Ui_window(main_window)
main_window.show... | """
pyMonitor first Version
Written By :Ahmed Alkabir
"""
#!/usr/bin/python3
import main_ui as Ui
import sys
# Main Thread of Program
def main():
if float(sys.version[:3]) >= 3.3:
app = Ui.QtWidgets.QApplication(sys.argv)
main_window = Ui.QtWidgets.QMainWindow()
ui = Ui.Ui_windo... | """
pyMonitor first Version
Written By :Ahmed Alkabir
"""
#!/usr/bin/python3
import main_ui as Ui
import sys
# Main Thread of Program
def main():
app = Ui.QtWidgets.QApplication(sys.argv)
main_window = Ui.QtWidgets.QMainWindow()
ui = Ui.Ui_window(main_window)
main_window.show()
sys.exit... | <commit_before>"""
pyMonitor first Version
Written By :Ahmed Alkabir
"""
#!/usr/bin/python3
import main_ui as Ui
import sys
# Main Thread of Program
def main():
app = Ui.QtWidgets.QApplication(sys.argv)
main_window = Ui.QtWidgets.QMainWindow()
ui = Ui.Ui_window(main_window)
main_window.show... |
2abb0ff8d8f57ca1ae05e0abfc17bdcbbc758e19 | main.py | main.py | #!/usr/bin/env python
import phiface
sc = phiface.Context()
yloc = 30
for weight in [1, 3, 6, 10]:
xloc = 30
A = phiface.AGlyph(x=xloc, y=yloc)
xloc += A.width() + 40
E = phiface.EGlyph(x=xloc, y=yloc)
xloc += E.width() + 20
I = phiface.IGlyph(x=xloc, y=yloc)
xloc += I.width() + 20
... | #!/usr/bin/env python
import phiface
sc = phiface.Context()
yloc = 30
for weight in [1, 3, 6, 10]:
xloc = 30
A = phiface.AGlyph(x=xloc, y=yloc)
xloc += A.width() + 40
E = phiface.EGlyph(x=xloc, y=yloc)
xloc += E.width() + 20
I = phiface.IGlyph(x=xloc, y=yloc)
xloc += I.width() + 20
... | Change weight rendering based on capHeight | Change weight rendering based on capHeight
| Python | bsd-2-clause | hortont424/phiface | #!/usr/bin/env python
import phiface
sc = phiface.Context()
yloc = 30
for weight in [1, 3, 6, 10]:
xloc = 30
A = phiface.AGlyph(x=xloc, y=yloc)
xloc += A.width() + 40
E = phiface.EGlyph(x=xloc, y=yloc)
xloc += E.width() + 20
I = phiface.IGlyph(x=xloc, y=yloc)
xloc += I.width() + 20
... | #!/usr/bin/env python
import phiface
sc = phiface.Context()
yloc = 30
for weight in [1, 3, 6, 10]:
xloc = 30
A = phiface.AGlyph(x=xloc, y=yloc)
xloc += A.width() + 40
E = phiface.EGlyph(x=xloc, y=yloc)
xloc += E.width() + 20
I = phiface.IGlyph(x=xloc, y=yloc)
xloc += I.width() + 20
... | <commit_before>#!/usr/bin/env python
import phiface
sc = phiface.Context()
yloc = 30
for weight in [1, 3, 6, 10]:
xloc = 30
A = phiface.AGlyph(x=xloc, y=yloc)
xloc += A.width() + 40
E = phiface.EGlyph(x=xloc, y=yloc)
xloc += E.width() + 20
I = phiface.IGlyph(x=xloc, y=yloc)
xloc += I.... | #!/usr/bin/env python
import phiface
sc = phiface.Context()
yloc = 30
for weight in [1, 3, 6, 10]:
xloc = 30
A = phiface.AGlyph(x=xloc, y=yloc)
xloc += A.width() + 40
E = phiface.EGlyph(x=xloc, y=yloc)
xloc += E.width() + 20
I = phiface.IGlyph(x=xloc, y=yloc)
xloc += I.width() + 20
... | #!/usr/bin/env python
import phiface
sc = phiface.Context()
yloc = 30
for weight in [1, 3, 6, 10]:
xloc = 30
A = phiface.AGlyph(x=xloc, y=yloc)
xloc += A.width() + 40
E = phiface.EGlyph(x=xloc, y=yloc)
xloc += E.width() + 20
I = phiface.IGlyph(x=xloc, y=yloc)
xloc += I.width() + 20
... | <commit_before>#!/usr/bin/env python
import phiface
sc = phiface.Context()
yloc = 30
for weight in [1, 3, 6, 10]:
xloc = 30
A = phiface.AGlyph(x=xloc, y=yloc)
xloc += A.width() + 40
E = phiface.EGlyph(x=xloc, y=yloc)
xloc += E.width() + 20
I = phiface.IGlyph(x=xloc, y=yloc)
xloc += I.... |
36c4e01f5bfb6ba00bd018f5bca4e8652a63ca8d | main.py | main.py | #!/usr/bin/env python3
"""TODO:
* more flexible sorting options
* use -o to specify output file
* check more explicitly for errors in JSON files
"""
import json, sys
if len(sys.argv) > 1:
inFn = sys.argv[1]
with open(inFn, 'r') as f:
try:
defs = json.load(f)
except:
sys.exit('{} has a... | #!/usr/bin/env python3
"""TODO:
* more flexible sorting options
* use -o to specify output file
"""
import json, sys
if len(sys.argv) > 1:
inFn = sys.argv[1]
with open(inFn, 'r') as f:
try:
defs = json.load(f)
except ValueError as e:
sys.exit('ValueError in {}: {}'.format(inFn, e))
so... | Print more explicit error reports for input file parsing | Print more explicit error reports for input file parsing
| Python | mit | JoshuaBrockschmidt/dictbuilder | #!/usr/bin/env python3
"""TODO:
* more flexible sorting options
* use -o to specify output file
* check more explicitly for errors in JSON files
"""
import json, sys
if len(sys.argv) > 1:
inFn = sys.argv[1]
with open(inFn, 'r') as f:
try:
defs = json.load(f)
except:
sys.exit('{} has a... | #!/usr/bin/env python3
"""TODO:
* more flexible sorting options
* use -o to specify output file
"""
import json, sys
if len(sys.argv) > 1:
inFn = sys.argv[1]
with open(inFn, 'r') as f:
try:
defs = json.load(f)
except ValueError as e:
sys.exit('ValueError in {}: {}'.format(inFn, e))
so... | <commit_before>#!/usr/bin/env python3
"""TODO:
* more flexible sorting options
* use -o to specify output file
* check more explicitly for errors in JSON files
"""
import json, sys
if len(sys.argv) > 1:
inFn = sys.argv[1]
with open(inFn, 'r') as f:
try:
defs = json.load(f)
except:
sys... | #!/usr/bin/env python3
"""TODO:
* more flexible sorting options
* use -o to specify output file
"""
import json, sys
if len(sys.argv) > 1:
inFn = sys.argv[1]
with open(inFn, 'r') as f:
try:
defs = json.load(f)
except ValueError as e:
sys.exit('ValueError in {}: {}'.format(inFn, e))
so... | #!/usr/bin/env python3
"""TODO:
* more flexible sorting options
* use -o to specify output file
* check more explicitly for errors in JSON files
"""
import json, sys
if len(sys.argv) > 1:
inFn = sys.argv[1]
with open(inFn, 'r') as f:
try:
defs = json.load(f)
except:
sys.exit('{} has a... | <commit_before>#!/usr/bin/env python3
"""TODO:
* more flexible sorting options
* use -o to specify output file
* check more explicitly for errors in JSON files
"""
import json, sys
if len(sys.argv) > 1:
inFn = sys.argv[1]
with open(inFn, 'r') as f:
try:
defs = json.load(f)
except:
sys... |
82bfc3ad8c39ffe51677eecbdc5c6904ae1ade41 | main.py | main.py | from common.bounty import *
from common.peers import *
from common import settings
def main():
settings.setup()
print "settings are:"
print settings.config
if __name__ == "__main__":
main()
| from common.bounty import *
from common.peers import *
from common import settings
def main():
settings.setup()
print "settings are:"
print settings.config
if settings.config.get('server') is not True:
initializePeerConnections()
else:
listen()
if __name__ == "__main__":
ma... | Add primitive server option for easier debugging | Add primitive server option for easier debugging | Python | mit | gappleto97/Senior-Project | from common.bounty import *
from common.peers import *
from common import settings
def main():
settings.setup()
print "settings are:"
print settings.config
if __name__ == "__main__":
main()
Add primitive server option for easier debugging | from common.bounty import *
from common.peers import *
from common import settings
def main():
settings.setup()
print "settings are:"
print settings.config
if settings.config.get('server') is not True:
initializePeerConnections()
else:
listen()
if __name__ == "__main__":
ma... | <commit_before>from common.bounty import *
from common.peers import *
from common import settings
def main():
settings.setup()
print "settings are:"
print settings.config
if __name__ == "__main__":
main()
<commit_msg>Add primitive server option for easier debugging<commit_after> | from common.bounty import *
from common.peers import *
from common import settings
def main():
settings.setup()
print "settings are:"
print settings.config
if settings.config.get('server') is not True:
initializePeerConnections()
else:
listen()
if __name__ == "__main__":
ma... | from common.bounty import *
from common.peers import *
from common import settings
def main():
settings.setup()
print "settings are:"
print settings.config
if __name__ == "__main__":
main()
Add primitive server option for easier debuggingfrom common.bounty import *
from common.peers import *
from ... | <commit_before>from common.bounty import *
from common.peers import *
from common import settings
def main():
settings.setup()
print "settings are:"
print settings.config
if __name__ == "__main__":
main()
<commit_msg>Add primitive server option for easier debugging<commit_after>from common.bounty ... |
2aae7b1718bfc21267922f7fe09dcf47be69582b | blueprints/aws_rds_instance/delete_aws_rds_instance.py | blueprints/aws_rds_instance/delete_aws_rds_instance.py | import json
import boto3
from infrastructure.models import Environment
def run(job, logger=None, **kwargs):
service = job.service_set.first()
env_id = service.attributes.get(field__name__startswith='aws_environment').value
env = Environment.objects.get(id=env_id)
rh = env.resource_handler.cast()
... | import json
import boto3
from infrastructure.models import Environment
def run(job, logger=None, **kwargs):
service = job.service_set.first()
# The Environment ID and RDS Instance data dict were stored as attributes on
# this service by a build action.
env_id_cfv = service.attributes.get(field__name... | Use code consistent with other RDS actions | Use code consistent with other RDS actions
[#144244831]
| Python | apache-2.0 | CloudBoltSoftware/cloudbolt-forge,CloudBoltSoftware/cloudbolt-forge,CloudBoltSoftware/cloudbolt-forge,CloudBoltSoftware/cloudbolt-forge | import json
import boto3
from infrastructure.models import Environment
def run(job, logger=None, **kwargs):
service = job.service_set.first()
env_id = service.attributes.get(field__name__startswith='aws_environment').value
env = Environment.objects.get(id=env_id)
rh = env.resource_handler.cast()
... | import json
import boto3
from infrastructure.models import Environment
def run(job, logger=None, **kwargs):
service = job.service_set.first()
# The Environment ID and RDS Instance data dict were stored as attributes on
# this service by a build action.
env_id_cfv = service.attributes.get(field__name... | <commit_before>import json
import boto3
from infrastructure.models import Environment
def run(job, logger=None, **kwargs):
service = job.service_set.first()
env_id = service.attributes.get(field__name__startswith='aws_environment').value
env = Environment.objects.get(id=env_id)
rh = env.resource_hand... | import json
import boto3
from infrastructure.models import Environment
def run(job, logger=None, **kwargs):
service = job.service_set.first()
# The Environment ID and RDS Instance data dict were stored as attributes on
# this service by a build action.
env_id_cfv = service.attributes.get(field__name... | import json
import boto3
from infrastructure.models import Environment
def run(job, logger=None, **kwargs):
service = job.service_set.first()
env_id = service.attributes.get(field__name__startswith='aws_environment').value
env = Environment.objects.get(id=env_id)
rh = env.resource_handler.cast()
... | <commit_before>import json
import boto3
from infrastructure.models import Environment
def run(job, logger=None, **kwargs):
service = job.service_set.first()
env_id = service.attributes.get(field__name__startswith='aws_environment').value
env = Environment.objects.get(id=env_id)
rh = env.resource_hand... |
1c0ea1a102ed91342ce0d609733426b8a07cd67d | easy_thumbnails/tests/apps.py | easy_thumbnails/tests/apps.py | from django.apps import AppConfig
class EasyThumbnailsTestConfig(AppConfig):
name = 'easy_thumbnails.tests'
label = 'easy_thumbnails_tests'
| try:
from django.apps import AppConfig
except ImportError:
# Early Django versions import everything in test, avoid the failure due to
# AppConfig only existing in 1.7+
AppConfig = object
class EasyThumbnailsTestConfig(AppConfig):
name = 'easy_thumbnails.tests'
label = 'easy_thumbnails_tests'
| Fix an import error for old django versions | Fix an import error for old django versions
Fixes #371
| Python | bsd-3-clause | SmileyChris/easy-thumbnails | from django.apps import AppConfig
class EasyThumbnailsTestConfig(AppConfig):
name = 'easy_thumbnails.tests'
label = 'easy_thumbnails_tests'
Fix an import error for old django versions
Fixes #371 | try:
from django.apps import AppConfig
except ImportError:
# Early Django versions import everything in test, avoid the failure due to
# AppConfig only existing in 1.7+
AppConfig = object
class EasyThumbnailsTestConfig(AppConfig):
name = 'easy_thumbnails.tests'
label = 'easy_thumbnails_tests'
| <commit_before>from django.apps import AppConfig
class EasyThumbnailsTestConfig(AppConfig):
name = 'easy_thumbnails.tests'
label = 'easy_thumbnails_tests'
<commit_msg>Fix an import error for old django versions
Fixes #371<commit_after> | try:
from django.apps import AppConfig
except ImportError:
# Early Django versions import everything in test, avoid the failure due to
# AppConfig only existing in 1.7+
AppConfig = object
class EasyThumbnailsTestConfig(AppConfig):
name = 'easy_thumbnails.tests'
label = 'easy_thumbnails_tests'
| from django.apps import AppConfig
class EasyThumbnailsTestConfig(AppConfig):
name = 'easy_thumbnails.tests'
label = 'easy_thumbnails_tests'
Fix an import error for old django versions
Fixes #371try:
from django.apps import AppConfig
except ImportError:
# Early Django versions import everything in tes... | <commit_before>from django.apps import AppConfig
class EasyThumbnailsTestConfig(AppConfig):
name = 'easy_thumbnails.tests'
label = 'easy_thumbnails_tests'
<commit_msg>Fix an import error for old django versions
Fixes #371<commit_after>try:
from django.apps import AppConfig
except ImportError:
# Early... |
6e7923413bb0729a288c36f10e22ad7a777bf538 | supercell/testing.py | supercell/testing.py | # vim: set fileencoding=utf-8 :
#
# Copyright (c) 2014 Daniel Truemper <truemped at googlemail.com>
#
# 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/LICENS... | # vim: set fileencoding=utf-8 :
#
# Copyright (c) 2014 Daniel Truemper <truemped at googlemail.com>
#
# 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/LICENS... | Add pytest to mocked sys.argv | Add pytest to mocked sys.argv
If you want to use this for integration tests, the ARGV variable only
has to contain the arguments. The first argument usually is the script
name and is not read by tornado at all.
| Python | apache-2.0 | truemped/supercell,truemped/supercell | # vim: set fileencoding=utf-8 :
#
# Copyright (c) 2014 Daniel Truemper <truemped at googlemail.com>
#
# 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/LICENS... | # vim: set fileencoding=utf-8 :
#
# Copyright (c) 2014 Daniel Truemper <truemped at googlemail.com>
#
# 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/LICENS... | <commit_before># vim: set fileencoding=utf-8 :
#
# Copyright (c) 2014 Daniel Truemper <truemped at googlemail.com>
#
# 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/... | # vim: set fileencoding=utf-8 :
#
# Copyright (c) 2014 Daniel Truemper <truemped at googlemail.com>
#
# 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/LICENS... | # vim: set fileencoding=utf-8 :
#
# Copyright (c) 2014 Daniel Truemper <truemped at googlemail.com>
#
# 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/LICENS... | <commit_before># vim: set fileencoding=utf-8 :
#
# Copyright (c) 2014 Daniel Truemper <truemped at googlemail.com>
#
# 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/... |
a6dc99096870b186aafe85e9777b7c29de488a51 | forum/models.py | forum/models.py | from django.db import models
class Thread(models.Model):
"""Model for representing threads."""
title = models.TextField()
views = models.PositiveIntegerField(default=0)
sticky = models.BooleanField()
closed = models.BooleanField()
| from django.db import models
import django.contrib.auth.models as auth
class User(auth.User):
"""Model for representing users.
It has few fields that aren't in the standard authentication user
table, and are needed for the forum to work, like footers.
"""
display_name = models.CharField(max_length... | Create user class for forums. | Create user class for forums.
Forums need to store information users that is usually not stored.
This currently stores only display name, althrough it can store more
in the future.
| Python | mit | xfix/NextBoard | from django.db import models
class Thread(models.Model):
"""Model for representing threads."""
title = models.TextField()
views = models.PositiveIntegerField(default=0)
sticky = models.BooleanField()
closed = models.BooleanField()
Create user class for forums.
Forums need to store information user... | from django.db import models
import django.contrib.auth.models as auth
class User(auth.User):
"""Model for representing users.
It has few fields that aren't in the standard authentication user
table, and are needed for the forum to work, like footers.
"""
display_name = models.CharField(max_length... | <commit_before>from django.db import models
class Thread(models.Model):
"""Model for representing threads."""
title = models.TextField()
views = models.PositiveIntegerField(default=0)
sticky = models.BooleanField()
closed = models.BooleanField()
<commit_msg>Create user class for forums.
Forums nee... | from django.db import models
import django.contrib.auth.models as auth
class User(auth.User):
"""Model for representing users.
It has few fields that aren't in the standard authentication user
table, and are needed for the forum to work, like footers.
"""
display_name = models.CharField(max_length... | from django.db import models
class Thread(models.Model):
"""Model for representing threads."""
title = models.TextField()
views = models.PositiveIntegerField(default=0)
sticky = models.BooleanField()
closed = models.BooleanField()
Create user class for forums.
Forums need to store information user... | <commit_before>from django.db import models
class Thread(models.Model):
"""Model for representing threads."""
title = models.TextField()
views = models.PositiveIntegerField(default=0)
sticky = models.BooleanField()
closed = models.BooleanField()
<commit_msg>Create user class for forums.
Forums nee... |
8ce6aa788573aa10758375d58881f03ff438db16 | machete/base.py | machete/base.py | from datetime import datetime
from thunderdome.connection import setup
import thunderdome
setup(["localhost"], "machete")
class BaseVertex(thunderdome.Vertex):
created_at = thunderdome.DateTime(default=datetime.now)
class BaseEdge(thunderdome.Edge):
created_at = thunderdome.DateTime(default=datetime.now)
... | from datetime import datetime
from thunderdome.connection import setup
import thunderdome
setup(["localhost"], "machete")
class BaseVertex(thunderdome.Vertex):
created_at = thunderdome.DateTime(default=datetime.now)
def __repr__(self):
return "<{}:{}>".format(self.__class__.__name__, self.vid)
clas... | Add __repr__ To BaseVertex and BaseEdge | Add __repr__ To BaseVertex and BaseEdge
| Python | bsd-3-clause | rustyrazorblade/machete,rustyrazorblade/machete,rustyrazorblade/machete | from datetime import datetime
from thunderdome.connection import setup
import thunderdome
setup(["localhost"], "machete")
class BaseVertex(thunderdome.Vertex):
created_at = thunderdome.DateTime(default=datetime.now)
class BaseEdge(thunderdome.Edge):
created_at = thunderdome.DateTime(default=datetime.now)
... | from datetime import datetime
from thunderdome.connection import setup
import thunderdome
setup(["localhost"], "machete")
class BaseVertex(thunderdome.Vertex):
created_at = thunderdome.DateTime(default=datetime.now)
def __repr__(self):
return "<{}:{}>".format(self.__class__.__name__, self.vid)
clas... | <commit_before>from datetime import datetime
from thunderdome.connection import setup
import thunderdome
setup(["localhost"], "machete")
class BaseVertex(thunderdome.Vertex):
created_at = thunderdome.DateTime(default=datetime.now)
class BaseEdge(thunderdome.Edge):
created_at = thunderdome.DateTime(default=d... | from datetime import datetime
from thunderdome.connection import setup
import thunderdome
setup(["localhost"], "machete")
class BaseVertex(thunderdome.Vertex):
created_at = thunderdome.DateTime(default=datetime.now)
def __repr__(self):
return "<{}:{}>".format(self.__class__.__name__, self.vid)
clas... | from datetime import datetime
from thunderdome.connection import setup
import thunderdome
setup(["localhost"], "machete")
class BaseVertex(thunderdome.Vertex):
created_at = thunderdome.DateTime(default=datetime.now)
class BaseEdge(thunderdome.Edge):
created_at = thunderdome.DateTime(default=datetime.now)
... | <commit_before>from datetime import datetime
from thunderdome.connection import setup
import thunderdome
setup(["localhost"], "machete")
class BaseVertex(thunderdome.Vertex):
created_at = thunderdome.DateTime(default=datetime.now)
class BaseEdge(thunderdome.Edge):
created_at = thunderdome.DateTime(default=d... |
384c4ebb1712837b0610f90b6973520e7bbedca1 | studies/helpers.py | studies/helpers.py | from django.core.mail.message import EmailMultiAlternatives
from django.template.loader import get_template
from project.settings import EMAIL_FROM_ADDRESS, BASE_URL
# TODO: celery taskify
def send_mail(template_name, subject, to_addresses, cc=None, bcc=None, **context):
"""
Helper for sending templated emai... | from django.core.mail.message import EmailMultiAlternatives
from django.template.loader import get_template
from project.settings import EMAIL_FROM_ADDRESS, BASE_URL
# TODO: celery taskify
def send_mail(template_name, subject, to_addresses, cc=None, bcc=None, custom_message=None, from_email=None, **context):
"""... | Modify send_mail method to pass in more parameters, specifying text instead of template, and from_email. | Modify send_mail method to pass in more parameters, specifying text instead of template, and from_email.
| Python | apache-2.0 | pattisdr/lookit-api,pattisdr/lookit-api,CenterForOpenScience/lookit-api,CenterForOpenScience/lookit-api,pattisdr/lookit-api,CenterForOpenScience/lookit-api | from django.core.mail.message import EmailMultiAlternatives
from django.template.loader import get_template
from project.settings import EMAIL_FROM_ADDRESS, BASE_URL
# TODO: celery taskify
def send_mail(template_name, subject, to_addresses, cc=None, bcc=None, **context):
"""
Helper for sending templated emai... | from django.core.mail.message import EmailMultiAlternatives
from django.template.loader import get_template
from project.settings import EMAIL_FROM_ADDRESS, BASE_URL
# TODO: celery taskify
def send_mail(template_name, subject, to_addresses, cc=None, bcc=None, custom_message=None, from_email=None, **context):
"""... | <commit_before>from django.core.mail.message import EmailMultiAlternatives
from django.template.loader import get_template
from project.settings import EMAIL_FROM_ADDRESS, BASE_URL
# TODO: celery taskify
def send_mail(template_name, subject, to_addresses, cc=None, bcc=None, **context):
"""
Helper for sending... | from django.core.mail.message import EmailMultiAlternatives
from django.template.loader import get_template
from project.settings import EMAIL_FROM_ADDRESS, BASE_URL
# TODO: celery taskify
def send_mail(template_name, subject, to_addresses, cc=None, bcc=None, custom_message=None, from_email=None, **context):
"""... | from django.core.mail.message import EmailMultiAlternatives
from django.template.loader import get_template
from project.settings import EMAIL_FROM_ADDRESS, BASE_URL
# TODO: celery taskify
def send_mail(template_name, subject, to_addresses, cc=None, bcc=None, **context):
"""
Helper for sending templated emai... | <commit_before>from django.core.mail.message import EmailMultiAlternatives
from django.template.loader import get_template
from project.settings import EMAIL_FROM_ADDRESS, BASE_URL
# TODO: celery taskify
def send_mail(template_name, subject, to_addresses, cc=None, bcc=None, **context):
"""
Helper for sending... |
ccbceb486dd4775ec6dfe3764e522a869860703b | examples/rbd_fast/rbd_fast.py | examples/rbd_fast/rbd_fast.py | import sys
sys.path.append('../..')
from SALib.analyze import rbd_fast
from SALib.sample import latin
from SALib.test_functions import Ishigami
from SALib.util import read_param_file
# Read the parameter range file and generate samples
problem = read_param_file('../../src/SALib/test_functions/params/Ishigami... | import sys
sys.path.append('../..')
from SALib.analyze import rbd_fast
from SALib.sample import latin
from SALib.test_functions import Ishigami
from SALib.util import read_param_file
# Read the parameter range file and generate samples
problem = read_param_file('../../src/SALib/test_functions/params/Ishigami... | Fix incorrect description of returned dict entries | Fix incorrect description of returned dict entries
| Python | mit | jdherman/SALib,SALib/SALib,jdherman/SALib | import sys
sys.path.append('../..')
from SALib.analyze import rbd_fast
from SALib.sample import latin
from SALib.test_functions import Ishigami
from SALib.util import read_param_file
# Read the parameter range file and generate samples
problem = read_param_file('../../src/SALib/test_functions/params/Ishigami... | import sys
sys.path.append('../..')
from SALib.analyze import rbd_fast
from SALib.sample import latin
from SALib.test_functions import Ishigami
from SALib.util import read_param_file
# Read the parameter range file and generate samples
problem = read_param_file('../../src/SALib/test_functions/params/Ishigami... | <commit_before>import sys
sys.path.append('../..')
from SALib.analyze import rbd_fast
from SALib.sample import latin
from SALib.test_functions import Ishigami
from SALib.util import read_param_file
# Read the parameter range file and generate samples
problem = read_param_file('../../src/SALib/test_functions/... | import sys
sys.path.append('../..')
from SALib.analyze import rbd_fast
from SALib.sample import latin
from SALib.test_functions import Ishigami
from SALib.util import read_param_file
# Read the parameter range file and generate samples
problem = read_param_file('../../src/SALib/test_functions/params/Ishigami... | import sys
sys.path.append('../..')
from SALib.analyze import rbd_fast
from SALib.sample import latin
from SALib.test_functions import Ishigami
from SALib.util import read_param_file
# Read the parameter range file and generate samples
problem = read_param_file('../../src/SALib/test_functions/params/Ishigami... | <commit_before>import sys
sys.path.append('../..')
from SALib.analyze import rbd_fast
from SALib.sample import latin
from SALib.test_functions import Ishigami
from SALib.util import read_param_file
# Read the parameter range file and generate samples
problem = read_param_file('../../src/SALib/test_functions/... |
4af812f9189a7bd29b9aea274eeed5cbd277dbcb | examples/widgets/actionbar.py | examples/widgets/actionbar.py | from kivy.base import runTouchApp
from kivy.lang import Builder
runTouchApp(Builder.load_string('''
ActionBar:
pos_hint: {'top':1}
ActionView:
use_separator: True
ActionPrevious:
title: 'Action Bar'
with_previous: False
ActionOverflow:
ActionButton:
... | from kivy.base import runTouchApp
from kivy.lang import Builder
runTouchApp(Builder.load_string('''
ActionBar:
pos_hint: {'top':1}
ActionView:
use_separator: True
ActionPrevious:
title: 'Action Bar'
with_previous: False
ActionOverflow:
ActionButton:
... | Remove overlapping caption in ActionBar example | Remove overlapping caption in ActionBar example
| Python | mit | LogicalDash/kivy,LogicalDash/kivy,Cheaterman/kivy,Cheaterman/kivy,inclement/kivy,kivy/kivy,rnixx/kivy,bionoid/kivy,akshayaurora/kivy,bionoid/kivy,Cheaterman/kivy,LogicalDash/kivy,kivy/kivy,LogicalDash/kivy,matham/kivy,inclement/kivy,akshayaurora/kivy,inclement/kivy,matham/kivy,kivy/kivy,bionoid/kivy,akshayaurora/kivy,C... | from kivy.base import runTouchApp
from kivy.lang import Builder
runTouchApp(Builder.load_string('''
ActionBar:
pos_hint: {'top':1}
ActionView:
use_separator: True
ActionPrevious:
title: 'Action Bar'
with_previous: False
ActionOverflow:
ActionButton:
... | from kivy.base import runTouchApp
from kivy.lang import Builder
runTouchApp(Builder.load_string('''
ActionBar:
pos_hint: {'top':1}
ActionView:
use_separator: True
ActionPrevious:
title: 'Action Bar'
with_previous: False
ActionOverflow:
ActionButton:
... | <commit_before>from kivy.base import runTouchApp
from kivy.lang import Builder
runTouchApp(Builder.load_string('''
ActionBar:
pos_hint: {'top':1}
ActionView:
use_separator: True
ActionPrevious:
title: 'Action Bar'
with_previous: False
ActionOverflow:
Acti... | from kivy.base import runTouchApp
from kivy.lang import Builder
runTouchApp(Builder.load_string('''
ActionBar:
pos_hint: {'top':1}
ActionView:
use_separator: True
ActionPrevious:
title: 'Action Bar'
with_previous: False
ActionOverflow:
ActionButton:
... | from kivy.base import runTouchApp
from kivy.lang import Builder
runTouchApp(Builder.load_string('''
ActionBar:
pos_hint: {'top':1}
ActionView:
use_separator: True
ActionPrevious:
title: 'Action Bar'
with_previous: False
ActionOverflow:
ActionButton:
... | <commit_before>from kivy.base import runTouchApp
from kivy.lang import Builder
runTouchApp(Builder.load_string('''
ActionBar:
pos_hint: {'top':1}
ActionView:
use_separator: True
ActionPrevious:
title: 'Action Bar'
with_previous: False
ActionOverflow:
Acti... |
8d73c71a0c9b8d4a226b90b9310562b490296038 | gen/CSiBE-v2.1.1/preprocessed-source-compiler.py | gen/CSiBE-v2.1.1/preprocessed-source-compiler.py | #!/usr/bin/env python
import argparse
import os
import subprocess
if __name__ == "__main__":
# Use wrappers for compilers (native)
c_compiler_name = "gcc"
if "CC" in os.environ:
c_compiler_name = os.environ["CC"]
preprocessed_sources = ""
if "CSIBE_PREPROCESSED_SOURCES" in os.environ:
... | #!/usr/bin/env python
import argparse
import os
import subprocess
if __name__ == "__main__":
# Use wrappers for compilers (native)
c_compiler_name = "gcc"
if "CC" in os.environ:
c_compiler_name = os.environ["CC"]
preprocessed_sources = ""
if "CSIBE_PREPROCESSED_SOURCES" in os.environ:
... | Add requested CSiBE flags to the compilation of preprocessed files | Add requested CSiBE flags to the compilation of preprocessed files
| Python | bsd-3-clause | szeged/csibe,bgabor666/csibe,bgabor666/csibe,szeged/csibe,szeged/csibe,szeged/csibe,bgabor666/csibe,bgabor666/csibe,bgabor666/csibe,szeged/csibe,szeged/csibe,bgabor666/csibe,bgabor666/csibe,szeged/csibe | #!/usr/bin/env python
import argparse
import os
import subprocess
if __name__ == "__main__":
# Use wrappers for compilers (native)
c_compiler_name = "gcc"
if "CC" in os.environ:
c_compiler_name = os.environ["CC"]
preprocessed_sources = ""
if "CSIBE_PREPROCESSED_SOURCES" in os.environ:
... | #!/usr/bin/env python
import argparse
import os
import subprocess
if __name__ == "__main__":
# Use wrappers for compilers (native)
c_compiler_name = "gcc"
if "CC" in os.environ:
c_compiler_name = os.environ["CC"]
preprocessed_sources = ""
if "CSIBE_PREPROCESSED_SOURCES" in os.environ:
... | <commit_before>#!/usr/bin/env python
import argparse
import os
import subprocess
if __name__ == "__main__":
# Use wrappers for compilers (native)
c_compiler_name = "gcc"
if "CC" in os.environ:
c_compiler_name = os.environ["CC"]
preprocessed_sources = ""
if "CSIBE_PREPROCESSED_SOURCES" ... | #!/usr/bin/env python
import argparse
import os
import subprocess
if __name__ == "__main__":
# Use wrappers for compilers (native)
c_compiler_name = "gcc"
if "CC" in os.environ:
c_compiler_name = os.environ["CC"]
preprocessed_sources = ""
if "CSIBE_PREPROCESSED_SOURCES" in os.environ:
... | #!/usr/bin/env python
import argparse
import os
import subprocess
if __name__ == "__main__":
# Use wrappers for compilers (native)
c_compiler_name = "gcc"
if "CC" in os.environ:
c_compiler_name = os.environ["CC"]
preprocessed_sources = ""
if "CSIBE_PREPROCESSED_SOURCES" in os.environ:
... | <commit_before>#!/usr/bin/env python
import argparse
import os
import subprocess
if __name__ == "__main__":
# Use wrappers for compilers (native)
c_compiler_name = "gcc"
if "CC" in os.environ:
c_compiler_name = os.environ["CC"]
preprocessed_sources = ""
if "CSIBE_PREPROCESSED_SOURCES" ... |
1c7487e50def0bb6bffd7af30e4f1a948197bee8 | tests/settings.py | tests/settings.py |
DATABASE_ENGINE = 'sqlite3'
DATABASE_NAME = ':memory:'
DATABASE_USER = ''
DATABASE_PASSWORD = ''
DATABASE_HOST = ''
DATABASE_PORT = ''
INSTALLED_APPS = (
'djmoney',
'testapp'
) |
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.sqlite3',
'NAME': ':memory:',
}
}
INSTALLED_APPS = (
'djmoney',
'testapp'
)
| Switch to Django 1.2+ method of specifying databases. | Switch to Django 1.2+ method of specifying databases.
At least this way the tests run. Even though they do not pass yet.
| Python | bsd-3-clause | tsouvarev/django-money,recklessromeo/django-money,iXioN/django-money,pjdelport/django-money,recklessromeo/django-money,rescale/django-money,tsouvarev/django-money,iXioN/django-money,AlexRiina/django-money |
DATABASE_ENGINE = 'sqlite3'
DATABASE_NAME = ':memory:'
DATABASE_USER = ''
DATABASE_PASSWORD = ''
DATABASE_HOST = ''
DATABASE_PORT = ''
INSTALLED_APPS = (
'djmoney',
'testapp'
)Switch to Django 1.2+ method of specifying databases.
At least this way the tests... |
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.sqlite3',
'NAME': ':memory:',
}
}
INSTALLED_APPS = (
'djmoney',
'testapp'
)
| <commit_before>
DATABASE_ENGINE = 'sqlite3'
DATABASE_NAME = ':memory:'
DATABASE_USER = ''
DATABASE_PASSWORD = ''
DATABASE_HOST = ''
DATABASE_PORT = ''
INSTALLED_APPS = (
'djmoney',
'testapp'
)<commit_msg>Switch to Django 1.2+ method of specifying databases.
... |
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.sqlite3',
'NAME': ':memory:',
}
}
INSTALLED_APPS = (
'djmoney',
'testapp'
)
|
DATABASE_ENGINE = 'sqlite3'
DATABASE_NAME = ':memory:'
DATABASE_USER = ''
DATABASE_PASSWORD = ''
DATABASE_HOST = ''
DATABASE_PORT = ''
INSTALLED_APPS = (
'djmoney',
'testapp'
)Switch to Django 1.2+ method of specifying databases.
At least this way the tests... | <commit_before>
DATABASE_ENGINE = 'sqlite3'
DATABASE_NAME = ':memory:'
DATABASE_USER = ''
DATABASE_PASSWORD = ''
DATABASE_HOST = ''
DATABASE_PORT = ''
INSTALLED_APPS = (
'djmoney',
'testapp'
)<commit_msg>Switch to Django 1.2+ method of specifying databases.
... |
a2142fb8a592a9ad9b4870d4685ec02cfa621a77 | tests/settings.py | tests/settings.py | import os
import urllib
TRUSTED_ROOT_FILE = os.path.join(
os.path.dirname(os.path.abspath(__file__)), "AppleIncRootCertificate.cer"
)
SECRET_KEY = "notsecr3t"
IAP_SETTINGS = {
"TRUSTED_ROOT_FILE": TRUSTED_ROOT_FILE,
"PRODUCTION_BUNDLE_ID": "com.educreations.ios.Educreations",
}
if not os.path.isfile(TRU... | import os
import urllib
TRUSTED_ROOT_FILE = os.path.join(
os.path.dirname(os.path.abspath(__file__)), "AppleIncRootCertificate.cer"
)
SECRET_KEY = "notsecr3t"
IAP_SETTINGS = {
"TRUSTED_ROOT_FILE": TRUSTED_ROOT_FILE,
"PRODUCTION_BUNDLE_ID": "com.educreations.ios.Educreations",
}
if not os.path.isfile(TRU... | Fix cert retreival on python 3 | Fix cert retreival on python 3
| Python | mit | educreations/python-iap | import os
import urllib
TRUSTED_ROOT_FILE = os.path.join(
os.path.dirname(os.path.abspath(__file__)), "AppleIncRootCertificate.cer"
)
SECRET_KEY = "notsecr3t"
IAP_SETTINGS = {
"TRUSTED_ROOT_FILE": TRUSTED_ROOT_FILE,
"PRODUCTION_BUNDLE_ID": "com.educreations.ios.Educreations",
}
if not os.path.isfile(TRU... | import os
import urllib
TRUSTED_ROOT_FILE = os.path.join(
os.path.dirname(os.path.abspath(__file__)), "AppleIncRootCertificate.cer"
)
SECRET_KEY = "notsecr3t"
IAP_SETTINGS = {
"TRUSTED_ROOT_FILE": TRUSTED_ROOT_FILE,
"PRODUCTION_BUNDLE_ID": "com.educreations.ios.Educreations",
}
if not os.path.isfile(TRU... | <commit_before>import os
import urllib
TRUSTED_ROOT_FILE = os.path.join(
os.path.dirname(os.path.abspath(__file__)), "AppleIncRootCertificate.cer"
)
SECRET_KEY = "notsecr3t"
IAP_SETTINGS = {
"TRUSTED_ROOT_FILE": TRUSTED_ROOT_FILE,
"PRODUCTION_BUNDLE_ID": "com.educreations.ios.Educreations",
}
if not os.... | import os
import urllib
TRUSTED_ROOT_FILE = os.path.join(
os.path.dirname(os.path.abspath(__file__)), "AppleIncRootCertificate.cer"
)
SECRET_KEY = "notsecr3t"
IAP_SETTINGS = {
"TRUSTED_ROOT_FILE": TRUSTED_ROOT_FILE,
"PRODUCTION_BUNDLE_ID": "com.educreations.ios.Educreations",
}
if not os.path.isfile(TRU... | import os
import urllib
TRUSTED_ROOT_FILE = os.path.join(
os.path.dirname(os.path.abspath(__file__)), "AppleIncRootCertificate.cer"
)
SECRET_KEY = "notsecr3t"
IAP_SETTINGS = {
"TRUSTED_ROOT_FILE": TRUSTED_ROOT_FILE,
"PRODUCTION_BUNDLE_ID": "com.educreations.ios.Educreations",
}
if not os.path.isfile(TRU... | <commit_before>import os
import urllib
TRUSTED_ROOT_FILE = os.path.join(
os.path.dirname(os.path.abspath(__file__)), "AppleIncRootCertificate.cer"
)
SECRET_KEY = "notsecr3t"
IAP_SETTINGS = {
"TRUSTED_ROOT_FILE": TRUSTED_ROOT_FILE,
"PRODUCTION_BUNDLE_ID": "com.educreations.ios.Educreations",
}
if not os.... |
18603df8d13cf0eff753cb713e6c52ae30179f30 | experiments/camera-stdin-stdout/bg-subtract.py | experiments/camera-stdin-stdout/bg-subtract.py | #!/usr/bin/python
import cv2
import ImageReader
escape_key = 27
reader = ImageReader.ImageReader()
fgbg = cv2.createBackgroundSubtractorMOG2()
while True:
imgread, img = reader.decode()
if imgread:
fgmask = fgbg.apply(img)
cv2.imshow("frame", fgmask)
key = cv2.waitKey(1) & 0xFF
if k... | #!/usr/bin/python
import cv2
import ImageReader
import numpy as np
import sys
escape_key = 27
reader = ImageReader.ImageReader()
fgbg = cv2.createBackgroundSubtractorMOG2()
while True:
imgread, img = reader.decode()
if imgread:
fgmask = fgbg.apply(img)
retval, encodedimage = cv2.imencode(".... | Print to stdout the changed video | Print to stdout the changed video
| Python | mit | Mindavi/Positiebepalingssysteem | #!/usr/bin/python
import cv2
import ImageReader
escape_key = 27
reader = ImageReader.ImageReader()
fgbg = cv2.createBackgroundSubtractorMOG2()
while True:
imgread, img = reader.decode()
if imgread:
fgmask = fgbg.apply(img)
cv2.imshow("frame", fgmask)
key = cv2.waitKey(1) & 0xFF
if k... | #!/usr/bin/python
import cv2
import ImageReader
import numpy as np
import sys
escape_key = 27
reader = ImageReader.ImageReader()
fgbg = cv2.createBackgroundSubtractorMOG2()
while True:
imgread, img = reader.decode()
if imgread:
fgmask = fgbg.apply(img)
retval, encodedimage = cv2.imencode(".... | <commit_before>#!/usr/bin/python
import cv2
import ImageReader
escape_key = 27
reader = ImageReader.ImageReader()
fgbg = cv2.createBackgroundSubtractorMOG2()
while True:
imgread, img = reader.decode()
if imgread:
fgmask = fgbg.apply(img)
cv2.imshow("frame", fgmask)
key = cv2.waitKey(1) ... | #!/usr/bin/python
import cv2
import ImageReader
import numpy as np
import sys
escape_key = 27
reader = ImageReader.ImageReader()
fgbg = cv2.createBackgroundSubtractorMOG2()
while True:
imgread, img = reader.decode()
if imgread:
fgmask = fgbg.apply(img)
retval, encodedimage = cv2.imencode(".... | #!/usr/bin/python
import cv2
import ImageReader
escape_key = 27
reader = ImageReader.ImageReader()
fgbg = cv2.createBackgroundSubtractorMOG2()
while True:
imgread, img = reader.decode()
if imgread:
fgmask = fgbg.apply(img)
cv2.imshow("frame", fgmask)
key = cv2.waitKey(1) & 0xFF
if k... | <commit_before>#!/usr/bin/python
import cv2
import ImageReader
escape_key = 27
reader = ImageReader.ImageReader()
fgbg = cv2.createBackgroundSubtractorMOG2()
while True:
imgread, img = reader.decode()
if imgread:
fgmask = fgbg.apply(img)
cv2.imshow("frame", fgmask)
key = cv2.waitKey(1) ... |
252b0f5e69b7dddb0560e1ac37de1e6ea6e38bb9 | app.py | app.py | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
from flask import Flask, request, json
from flask.ext.cors import CORS
import database
import rsser
# Update data before application is allowed to start
database.update_database()
app = Flask(__name__)
CORS(app)
@app.route('/speakercast/speakers')
def speakers():
... | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
from flask import Flask, request, json
from flask.ext.cors import CORS
import database
import rsser
# Update data before application is allowed to start
database.update_database()
app = Flask(__name__)
CORS(app)
@app.route('/speakercast/speakers')
def speakers():
... | Handle case of generating ID with no speakers | Handle case of generating ID with no speakers
| Python | bsd-3-clause | philipbl/talk_feed,philipbl/SpeakerCast | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
from flask import Flask, request, json
from flask.ext.cors import CORS
import database
import rsser
# Update data before application is allowed to start
database.update_database()
app = Flask(__name__)
CORS(app)
@app.route('/speakercast/speakers')
def speakers():
... | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
from flask import Flask, request, json
from flask.ext.cors import CORS
import database
import rsser
# Update data before application is allowed to start
database.update_database()
app = Flask(__name__)
CORS(app)
@app.route('/speakercast/speakers')
def speakers():
... | <commit_before>#!/usr/bin/env python3
# -*- coding: utf-8 -*-
from flask import Flask, request, json
from flask.ext.cors import CORS
import database
import rsser
# Update data before application is allowed to start
database.update_database()
app = Flask(__name__)
CORS(app)
@app.route('/speakercast/speakers')
def s... | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
from flask import Flask, request, json
from flask.ext.cors import CORS
import database
import rsser
# Update data before application is allowed to start
database.update_database()
app = Flask(__name__)
CORS(app)
@app.route('/speakercast/speakers')
def speakers():
... | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
from flask import Flask, request, json
from flask.ext.cors import CORS
import database
import rsser
# Update data before application is allowed to start
database.update_database()
app = Flask(__name__)
CORS(app)
@app.route('/speakercast/speakers')
def speakers():
... | <commit_before>#!/usr/bin/env python3
# -*- coding: utf-8 -*-
from flask import Flask, request, json
from flask.ext.cors import CORS
import database
import rsser
# Update data before application is allowed to start
database.update_database()
app = Flask(__name__)
CORS(app)
@app.route('/speakercast/speakers')
def s... |
e198eb0fe6e4a916e2207588f4123675afe15bcf | functions/scale_grad.py | functions/scale_grad.py | import numpy
import chainer
from chainer.utils import type_check
class ScaleGrad(chainer.Function):
def __init__(self, scale=1.0):
self.scale = scale
def check_type_forward(self, in_types):
type_check.expect(
in_types.size() == 1,
in_types[0].dtype == numpy.float32
... | import numpy
import chainer
from chainer.utils import type_check
class ScaleGrad(chainer.Function):
def __init__(self, scale):
self.scale = scale
def check_type_forward(self, in_types):
type_check.expect(
in_types.size() == 1,
in_types[0].dtype == numpy.float32
... | Remove the default value for scale | Remove the default value for scale
| Python | mit | toslunar/chainerrl,toslunar/chainerrl | import numpy
import chainer
from chainer.utils import type_check
class ScaleGrad(chainer.Function):
def __init__(self, scale=1.0):
self.scale = scale
def check_type_forward(self, in_types):
type_check.expect(
in_types.size() == 1,
in_types[0].dtype == numpy.float32
... | import numpy
import chainer
from chainer.utils import type_check
class ScaleGrad(chainer.Function):
def __init__(self, scale):
self.scale = scale
def check_type_forward(self, in_types):
type_check.expect(
in_types.size() == 1,
in_types[0].dtype == numpy.float32
... | <commit_before>import numpy
import chainer
from chainer.utils import type_check
class ScaleGrad(chainer.Function):
def __init__(self, scale=1.0):
self.scale = scale
def check_type_forward(self, in_types):
type_check.expect(
in_types.size() == 1,
in_types[0].dtype == ... | import numpy
import chainer
from chainer.utils import type_check
class ScaleGrad(chainer.Function):
def __init__(self, scale):
self.scale = scale
def check_type_forward(self, in_types):
type_check.expect(
in_types.size() == 1,
in_types[0].dtype == numpy.float32
... | import numpy
import chainer
from chainer.utils import type_check
class ScaleGrad(chainer.Function):
def __init__(self, scale=1.0):
self.scale = scale
def check_type_forward(self, in_types):
type_check.expect(
in_types.size() == 1,
in_types[0].dtype == numpy.float32
... | <commit_before>import numpy
import chainer
from chainer.utils import type_check
class ScaleGrad(chainer.Function):
def __init__(self, scale=1.0):
self.scale = scale
def check_type_forward(self, in_types):
type_check.expect(
in_types.size() == 1,
in_types[0].dtype == ... |
8771bbdba5b10a3b9fab2822eccdec64d221edb4 | catalog/admin.py | catalog/admin.py | from django.contrib import admin
from .models import Author, Book, BookInstance, Genre, Language
# admin.site.register(Book)
# admin.site.register(Author)
admin.site.register(Genre)
# admin.site.register(BookInstance)
admin.site.register(Language)
# Define the admin class
class AuthorAdmin(admin.ModelAdmin):
li... | from django.contrib import admin
from .models import Author, Book, BookInstance, Genre, Language
# admin.site.register(Book)
# admin.site.register(Author)
admin.site.register(Genre)
# admin.site.register(BookInstance)
admin.site.register(Language)
class AuthorsInstanceInline(admin.TabularInline):
model = Book
... | Configure BookInstance list view and add an inline listing | Configure BookInstance list view and add an inline listing
| Python | bsd-3-clause | pavlenk0/my-catalog,pavlenk0/my-catalog | from django.contrib import admin
from .models import Author, Book, BookInstance, Genre, Language
# admin.site.register(Book)
# admin.site.register(Author)
admin.site.register(Genre)
# admin.site.register(BookInstance)
admin.site.register(Language)
# Define the admin class
class AuthorAdmin(admin.ModelAdmin):
li... | from django.contrib import admin
from .models import Author, Book, BookInstance, Genre, Language
# admin.site.register(Book)
# admin.site.register(Author)
admin.site.register(Genre)
# admin.site.register(BookInstance)
admin.site.register(Language)
class AuthorsInstanceInline(admin.TabularInline):
model = Book
... | <commit_before>from django.contrib import admin
from .models import Author, Book, BookInstance, Genre, Language
# admin.site.register(Book)
# admin.site.register(Author)
admin.site.register(Genre)
# admin.site.register(BookInstance)
admin.site.register(Language)
# Define the admin class
class AuthorAdmin(admin.Mode... | from django.contrib import admin
from .models import Author, Book, BookInstance, Genre, Language
# admin.site.register(Book)
# admin.site.register(Author)
admin.site.register(Genre)
# admin.site.register(BookInstance)
admin.site.register(Language)
class AuthorsInstanceInline(admin.TabularInline):
model = Book
... | from django.contrib import admin
from .models import Author, Book, BookInstance, Genre, Language
# admin.site.register(Book)
# admin.site.register(Author)
admin.site.register(Genre)
# admin.site.register(BookInstance)
admin.site.register(Language)
# Define the admin class
class AuthorAdmin(admin.ModelAdmin):
li... | <commit_before>from django.contrib import admin
from .models import Author, Book, BookInstance, Genre, Language
# admin.site.register(Book)
# admin.site.register(Author)
admin.site.register(Genre)
# admin.site.register(BookInstance)
admin.site.register(Language)
# Define the admin class
class AuthorAdmin(admin.Mode... |
fe34a904af1d691f96b19c87ee11129eecb09dc5 | byceps/blueprints/snippet_admin/service.py | byceps/blueprints/snippet_admin/service.py | # -*- coding: utf-8 -*-
"""
byceps.blueprints.snippet_admin.service
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
:Copyright: 2006-2016 Jochen Kupperschmidt
:License: Modified BSD, see LICENSE for details.
"""
from difflib import HtmlDiff
from ...database import db
from ..party.models import Party
from ..snippet.models.... | # -*- coding: utf-8 -*-
"""
byceps.blueprints.snippet_admin.service
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
:Copyright: 2006-2016 Jochen Kupperschmidt
:License: Modified BSD, see LICENSE for details.
"""
from difflib import HtmlDiff
from ...database import db
from ..party.models import Party
from ..snippet.models.... | Handle values to be compared being `None`. | Handle values to be compared being `None`.
| Python | bsd-3-clause | m-ober/byceps,homeworkprod/byceps,homeworkprod/byceps,homeworkprod/byceps,m-ober/byceps,m-ober/byceps | # -*- coding: utf-8 -*-
"""
byceps.blueprints.snippet_admin.service
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
:Copyright: 2006-2016 Jochen Kupperschmidt
:License: Modified BSD, see LICENSE for details.
"""
from difflib import HtmlDiff
from ...database import db
from ..party.models import Party
from ..snippet.models.... | # -*- coding: utf-8 -*-
"""
byceps.blueprints.snippet_admin.service
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
:Copyright: 2006-2016 Jochen Kupperschmidt
:License: Modified BSD, see LICENSE for details.
"""
from difflib import HtmlDiff
from ...database import db
from ..party.models import Party
from ..snippet.models.... | <commit_before># -*- coding: utf-8 -*-
"""
byceps.blueprints.snippet_admin.service
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
:Copyright: 2006-2016 Jochen Kupperschmidt
:License: Modified BSD, see LICENSE for details.
"""
from difflib import HtmlDiff
from ...database import db
from ..party.models import Party
from ..... | # -*- coding: utf-8 -*-
"""
byceps.blueprints.snippet_admin.service
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
:Copyright: 2006-2016 Jochen Kupperschmidt
:License: Modified BSD, see LICENSE for details.
"""
from difflib import HtmlDiff
from ...database import db
from ..party.models import Party
from ..snippet.models.... | # -*- coding: utf-8 -*-
"""
byceps.blueprints.snippet_admin.service
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
:Copyright: 2006-2016 Jochen Kupperschmidt
:License: Modified BSD, see LICENSE for details.
"""
from difflib import HtmlDiff
from ...database import db
from ..party.models import Party
from ..snippet.models.... | <commit_before># -*- coding: utf-8 -*-
"""
byceps.blueprints.snippet_admin.service
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
:Copyright: 2006-2016 Jochen Kupperschmidt
:License: Modified BSD, see LICENSE for details.
"""
from difflib import HtmlDiff
from ...database import db
from ..party.models import Party
from ..... |
946ef89ea55c30b9eb6684b4d73e96b05cf5d23d | aspen/server.py | aspen/server.py | from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from __future__ import unicode_literals
from algorithm import Algorithm
class Server(object):
def __init__(self, argv=None):
self.argv = argv
def get_algorithm(self):
return Algorit... | from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from __future__ import unicode_literals
from algorithm import Algorithm
def main():
Server().main()
class Server(object):
def __init__(self, argv=None):
self.argv = argv
def get_algor... | Fix CLI api (was missing entrypoint hook) | Fix CLI api (was missing entrypoint hook)
| Python | mit | gratipay/aspen.py,gratipay/aspen.py | from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from __future__ import unicode_literals
from algorithm import Algorithm
class Server(object):
def __init__(self, argv=None):
self.argv = argv
def get_algorithm(self):
return Algorit... | from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from __future__ import unicode_literals
from algorithm import Algorithm
def main():
Server().main()
class Server(object):
def __init__(self, argv=None):
self.argv = argv
def get_algor... | <commit_before>from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from __future__ import unicode_literals
from algorithm import Algorithm
class Server(object):
def __init__(self, argv=None):
self.argv = argv
def get_algorithm(self):
... | from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from __future__ import unicode_literals
from algorithm import Algorithm
def main():
Server().main()
class Server(object):
def __init__(self, argv=None):
self.argv = argv
def get_algor... | from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from __future__ import unicode_literals
from algorithm import Algorithm
class Server(object):
def __init__(self, argv=None):
self.argv = argv
def get_algorithm(self):
return Algorit... | <commit_before>from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from __future__ import unicode_literals
from algorithm import Algorithm
class Server(object):
def __init__(self, argv=None):
self.argv = argv
def get_algorithm(self):
... |
11f36192f1b74cd68d90a9cc0ed592c0c1b0148d | cdr_stats/mongodb_connection_middleware.py | cdr_stats/mongodb_connection_middleware.py | from django.conf import settings
from django.http import HttpResponseRedirect
from pymongo.connection import Connection
from pymongo.errors import ConnectionFailure
class MongodbConnectionMiddleware(object):
def process_request(self, request):
try:
connection = Connection(settings.CDR_MONGO_HO... | from django.conf import settings
from django import http
from django.http import HttpResponseRedirect
from pymongo.connection import Connection
from pymongo.errors import ConnectionFailure
class MongodbConnectionMiddleware(object):
def process_request(self, request):
try:
connection = Connecti... | Add middleware check for existing data | Add middleware check for existing data
| Python | mpl-2.0 | Star2Billing/cdr-stats,Star2Billing/cdr-stats,cdr-stats/cdr-stats,areski/cdr-stats,areski/cdr-stats,areski/cdr-stats,cdr-stats/cdr-stats,cdr-stats/cdr-stats,cdr-stats/cdr-stats,areski/cdr-stats,Star2Billing/cdr-stats,Star2Billing/cdr-stats | from django.conf import settings
from django.http import HttpResponseRedirect
from pymongo.connection import Connection
from pymongo.errors import ConnectionFailure
class MongodbConnectionMiddleware(object):
def process_request(self, request):
try:
connection = Connection(settings.CDR_MONGO_HO... | from django.conf import settings
from django import http
from django.http import HttpResponseRedirect
from pymongo.connection import Connection
from pymongo.errors import ConnectionFailure
class MongodbConnectionMiddleware(object):
def process_request(self, request):
try:
connection = Connecti... | <commit_before>from django.conf import settings
from django.http import HttpResponseRedirect
from pymongo.connection import Connection
from pymongo.errors import ConnectionFailure
class MongodbConnectionMiddleware(object):
def process_request(self, request):
try:
connection = Connection(settin... | from django.conf import settings
from django import http
from django.http import HttpResponseRedirect
from pymongo.connection import Connection
from pymongo.errors import ConnectionFailure
class MongodbConnectionMiddleware(object):
def process_request(self, request):
try:
connection = Connecti... | from django.conf import settings
from django.http import HttpResponseRedirect
from pymongo.connection import Connection
from pymongo.errors import ConnectionFailure
class MongodbConnectionMiddleware(object):
def process_request(self, request):
try:
connection = Connection(settings.CDR_MONGO_HO... | <commit_before>from django.conf import settings
from django.http import HttpResponseRedirect
from pymongo.connection import Connection
from pymongo.errors import ConnectionFailure
class MongodbConnectionMiddleware(object):
def process_request(self, request):
try:
connection = Connection(settin... |
6ef3e8778ad05c1dddcf6660f24f762f1725b906 | features/environment.py | features/environment.py | import os
import tempfile
from flask import json
import config
def before_scenario(context, scenario):
context.db_fd, context.db_url = tempfile.mkstemp()
config.SQLALCHEMY_DATABASE_URI = 'sqlite:///' + context.db_url
import tsserver
tsserver.app.config['TESTING'] = True
context.app = tsserver.a... | import os
import tempfile
from flask import json
import tsserver
# If set to True, each time the test is run, new database is created as a
# temporary file. If the value is equal to False, tests will be using SQLite
# in-memory database.
USE_DB_TEMP_FILE = False
def before_scenario(context, scenario):
if USE_... | Use SQLite in-memory database in tests | Use SQLite in-memory database in tests
Also, probably fix temporary databases not working.
| Python | mit | m4tx/techswarm-server | import os
import tempfile
from flask import json
import config
def before_scenario(context, scenario):
context.db_fd, context.db_url = tempfile.mkstemp()
config.SQLALCHEMY_DATABASE_URI = 'sqlite:///' + context.db_url
import tsserver
tsserver.app.config['TESTING'] = True
context.app = tsserver.a... | import os
import tempfile
from flask import json
import tsserver
# If set to True, each time the test is run, new database is created as a
# temporary file. If the value is equal to False, tests will be using SQLite
# in-memory database.
USE_DB_TEMP_FILE = False
def before_scenario(context, scenario):
if USE_... | <commit_before>import os
import tempfile
from flask import json
import config
def before_scenario(context, scenario):
context.db_fd, context.db_url = tempfile.mkstemp()
config.SQLALCHEMY_DATABASE_URI = 'sqlite:///' + context.db_url
import tsserver
tsserver.app.config['TESTING'] = True
context.a... | import os
import tempfile
from flask import json
import tsserver
# If set to True, each time the test is run, new database is created as a
# temporary file. If the value is equal to False, tests will be using SQLite
# in-memory database.
USE_DB_TEMP_FILE = False
def before_scenario(context, scenario):
if USE_... | import os
import tempfile
from flask import json
import config
def before_scenario(context, scenario):
context.db_fd, context.db_url = tempfile.mkstemp()
config.SQLALCHEMY_DATABASE_URI = 'sqlite:///' + context.db_url
import tsserver
tsserver.app.config['TESTING'] = True
context.app = tsserver.a... | <commit_before>import os
import tempfile
from flask import json
import config
def before_scenario(context, scenario):
context.db_fd, context.db_url = tempfile.mkstemp()
config.SQLALCHEMY_DATABASE_URI = 'sqlite:///' + context.db_url
import tsserver
tsserver.app.config['TESTING'] = True
context.a... |
dd15767944a3ec37a0ff568323384200d3fb540c | django_olcc/urls.py | django_olcc/urls.py | from django.conf import settings
from django.conf.urls.defaults import patterns, include, url
from django.contrib import admin
from django.contrib.staticfiles.urls import staticfiles_urlpatterns
from django.views.generic.simple import direct_to_template
# Enable the django admin
admin.autodiscover()
urlpatterns = pat... | from django.conf import settings
from django.conf.urls.defaults import patterns, include, url
from django.contrib import admin
from django.contrib.staticfiles.urls import staticfiles_urlpatterns
from django.views.generic.simple import direct_to_template
# Enable the django admin
admin.autodiscover()
urlpatterns = pat... | Update URL patterns for staticfiles. | Update URL patterns for staticfiles.
| Python | mit | twaddington/django-olcc,twaddington/django-olcc,twaddington/django-olcc | from django.conf import settings
from django.conf.urls.defaults import patterns, include, url
from django.contrib import admin
from django.contrib.staticfiles.urls import staticfiles_urlpatterns
from django.views.generic.simple import direct_to_template
# Enable the django admin
admin.autodiscover()
urlpatterns = pat... | from django.conf import settings
from django.conf.urls.defaults import patterns, include, url
from django.contrib import admin
from django.contrib.staticfiles.urls import staticfiles_urlpatterns
from django.views.generic.simple import direct_to_template
# Enable the django admin
admin.autodiscover()
urlpatterns = pat... | <commit_before>from django.conf import settings
from django.conf.urls.defaults import patterns, include, url
from django.contrib import admin
from django.contrib.staticfiles.urls import staticfiles_urlpatterns
from django.views.generic.simple import direct_to_template
# Enable the django admin
admin.autodiscover()
ur... | from django.conf import settings
from django.conf.urls.defaults import patterns, include, url
from django.contrib import admin
from django.contrib.staticfiles.urls import staticfiles_urlpatterns
from django.views.generic.simple import direct_to_template
# Enable the django admin
admin.autodiscover()
urlpatterns = pat... | from django.conf import settings
from django.conf.urls.defaults import patterns, include, url
from django.contrib import admin
from django.contrib.staticfiles.urls import staticfiles_urlpatterns
from django.views.generic.simple import direct_to_template
# Enable the django admin
admin.autodiscover()
urlpatterns = pat... | <commit_before>from django.conf import settings
from django.conf.urls.defaults import patterns, include, url
from django.contrib import admin
from django.contrib.staticfiles.urls import staticfiles_urlpatterns
from django.views.generic.simple import direct_to_template
# Enable the django admin
admin.autodiscover()
ur... |
ec0a27694454f0765f63f9c762d42190759fd672 | utils/templatetags/text_tags.py | utils/templatetags/text_tags.py | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
# Erik Stein <[email protected]>, 2015
import re
from django import template
from django.template.defaultfilters import stringfilter
from django.utils.html import conditional_escape
from django.utils.safestring import mark_safe
from .. import text a... | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
# Erik Stein <[email protected]>, 2015
import re
from django import template
from django.template.defaultfilters import stringfilter
from django.utils.encoding import force_text
from django.utils.html import conditional_escape
from django.utils.safes... | Make sure conditional_punctuation can handle all value type (using force_text). | Make sure conditional_punctuation can handle all value type (using force_text).
| Python | mit | sha-red/django-shared-utils,sha-red/django-shared-utils | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
# Erik Stein <[email protected]>, 2015
import re
from django import template
from django.template.defaultfilters import stringfilter
from django.utils.html import conditional_escape
from django.utils.safestring import mark_safe
from .. import text a... | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
# Erik Stein <[email protected]>, 2015
import re
from django import template
from django.template.defaultfilters import stringfilter
from django.utils.encoding import force_text
from django.utils.html import conditional_escape
from django.utils.safes... | <commit_before># -*- coding: utf-8 -*-
from __future__ import unicode_literals
# Erik Stein <[email protected]>, 2015
import re
from django import template
from django.template.defaultfilters import stringfilter
from django.utils.html import conditional_escape
from django.utils.safestring import mark_safe
from .... | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
# Erik Stein <[email protected]>, 2015
import re
from django import template
from django.template.defaultfilters import stringfilter
from django.utils.encoding import force_text
from django.utils.html import conditional_escape
from django.utils.safes... | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
# Erik Stein <[email protected]>, 2015
import re
from django import template
from django.template.defaultfilters import stringfilter
from django.utils.html import conditional_escape
from django.utils.safestring import mark_safe
from .. import text a... | <commit_before># -*- coding: utf-8 -*-
from __future__ import unicode_literals
# Erik Stein <[email protected]>, 2015
import re
from django import template
from django.template.defaultfilters import stringfilter
from django.utils.html import conditional_escape
from django.utils.safestring import mark_safe
from .... |
f410b51f850d2fb75de16d9de4e95be5eb7a4e07 | python/peacock/utils/TextSubWindow.py | python/peacock/utils/TextSubWindow.py | from PyQt5 import QtCore, QtWidgets
class TextSubWindow(QtWidgets.QTextEdit):
"""
TextEdit that saves it size when it closes and closes itself if the main widget disappears.
"""
def __init__(self):
super(TextSubWindow, self).__init__()
self.setWindowFlags(QtCore.Qt.SubWindow)
sel... | from PyQt5 import QtWidgets
class TextSubWindow(QtWidgets.QTextEdit):
"""
TextEdit that saves it size when it closes and closes itself if the main widget disappears.
"""
def __init__(self):
super(TextSubWindow, self).__init__()
self._size = None
def sizeHint(self, *args):
""... | Fix problem with copying from text window. | Fix problem with copying from text window.
closes #9843
| Python | lgpl-2.1 | harterj/moose,jessecarterMOOSE/moose,yipenggao/moose,yipenggao/moose,milljm/moose,harterj/moose,laagesen/moose,Chuban/moose,andrsd/moose,permcody/moose,dschwen/moose,milljm/moose,laagesen/moose,permcody/moose,laagesen/moose,nuclear-wizard/moose,jessecarterMOOSE/moose,bwspenc/moose,dschwen/moose,sapitts/moose,yipenggao/... | from PyQt5 import QtCore, QtWidgets
class TextSubWindow(QtWidgets.QTextEdit):
"""
TextEdit that saves it size when it closes and closes itself if the main widget disappears.
"""
def __init__(self):
super(TextSubWindow, self).__init__()
self.setWindowFlags(QtCore.Qt.SubWindow)
sel... | from PyQt5 import QtWidgets
class TextSubWindow(QtWidgets.QTextEdit):
"""
TextEdit that saves it size when it closes and closes itself if the main widget disappears.
"""
def __init__(self):
super(TextSubWindow, self).__init__()
self._size = None
def sizeHint(self, *args):
""... | <commit_before>from PyQt5 import QtCore, QtWidgets
class TextSubWindow(QtWidgets.QTextEdit):
"""
TextEdit that saves it size when it closes and closes itself if the main widget disappears.
"""
def __init__(self):
super(TextSubWindow, self).__init__()
self.setWindowFlags(QtCore.Qt.SubWind... | from PyQt5 import QtWidgets
class TextSubWindow(QtWidgets.QTextEdit):
"""
TextEdit that saves it size when it closes and closes itself if the main widget disappears.
"""
def __init__(self):
super(TextSubWindow, self).__init__()
self._size = None
def sizeHint(self, *args):
""... | from PyQt5 import QtCore, QtWidgets
class TextSubWindow(QtWidgets.QTextEdit):
"""
TextEdit that saves it size when it closes and closes itself if the main widget disappears.
"""
def __init__(self):
super(TextSubWindow, self).__init__()
self.setWindowFlags(QtCore.Qt.SubWindow)
sel... | <commit_before>from PyQt5 import QtCore, QtWidgets
class TextSubWindow(QtWidgets.QTextEdit):
"""
TextEdit that saves it size when it closes and closes itself if the main widget disappears.
"""
def __init__(self):
super(TextSubWindow, self).__init__()
self.setWindowFlags(QtCore.Qt.SubWind... |
965b459717302b674a8b06a243f2d002ce182aaa | prajna/readers.py | prajna/readers.py | # -*- coding: utf-8 -*-
from __future__ import unicode_literals, print_function
import logging
import os
from pelican.readers import BaseReader
logger = logging.getLogger(__name__)
class SlokaReader(BaseReader):
enabled = True
file_extensions = ['json']
extensions = None
def __init__(self, *args, ... | # -*- coding: utf-8 -*-
from __future__ import unicode_literals, print_function
import logging
import os
from pelican.readers import BaseReader
logger = logging.getLogger(__name__)
class SlokaReader(BaseReader):
enabled = True
file_extensions = ['json']
extensions = None
def __init__(self, *args, ... | Add format string to debug message. | Add format string to debug message.
| Python | mit | mananam/pelican-prajna,mananam/pelican-prajna | # -*- coding: utf-8 -*-
from __future__ import unicode_literals, print_function
import logging
import os
from pelican.readers import BaseReader
logger = logging.getLogger(__name__)
class SlokaReader(BaseReader):
enabled = True
file_extensions = ['json']
extensions = None
def __init__(self, *args, ... | # -*- coding: utf-8 -*-
from __future__ import unicode_literals, print_function
import logging
import os
from pelican.readers import BaseReader
logger = logging.getLogger(__name__)
class SlokaReader(BaseReader):
enabled = True
file_extensions = ['json']
extensions = None
def __init__(self, *args, ... | <commit_before># -*- coding: utf-8 -*-
from __future__ import unicode_literals, print_function
import logging
import os
from pelican.readers import BaseReader
logger = logging.getLogger(__name__)
class SlokaReader(BaseReader):
enabled = True
file_extensions = ['json']
extensions = None
def __init_... | # -*- coding: utf-8 -*-
from __future__ import unicode_literals, print_function
import logging
import os
from pelican.readers import BaseReader
logger = logging.getLogger(__name__)
class SlokaReader(BaseReader):
enabled = True
file_extensions = ['json']
extensions = None
def __init__(self, *args, ... | # -*- coding: utf-8 -*-
from __future__ import unicode_literals, print_function
import logging
import os
from pelican.readers import BaseReader
logger = logging.getLogger(__name__)
class SlokaReader(BaseReader):
enabled = True
file_extensions = ['json']
extensions = None
def __init__(self, *args, ... | <commit_before># -*- coding: utf-8 -*-
from __future__ import unicode_literals, print_function
import logging
import os
from pelican.readers import BaseReader
logger = logging.getLogger(__name__)
class SlokaReader(BaseReader):
enabled = True
file_extensions = ['json']
extensions = None
def __init_... |
4dfe50691b911d05be9a82946df77e234283ffe2 | codejail/util.py | codejail/util.py | """Helpers for codejail."""
import contextlib
import os
import shutil
import tempfile
class TempDirectory(object):
def __init__(self):
self.temp_dir = tempfile.mkdtemp(prefix="codejail-")
# Make directory readable by other users ('sandbox' user needs to be
# able to read it).
os.c... | """Helpers for codejail."""
import contextlib
import os
import shutil
import tempfile
@contextlib.contextmanager
def temp_directory():
"""
A context manager to make and use a temp directory.
The directory will be removed when done.
"""
temp_dir = tempfile.mkdtemp(prefix="codejail-")
# Make di... | Simplify these decorators, since we don't use the classes here anyway. | Simplify these decorators, since we don't use the classes here anyway.
| Python | apache-2.0 | edx/codejail,StepicOrg/codejail | """Helpers for codejail."""
import contextlib
import os
import shutil
import tempfile
class TempDirectory(object):
def __init__(self):
self.temp_dir = tempfile.mkdtemp(prefix="codejail-")
# Make directory readable by other users ('sandbox' user needs to be
# able to read it).
os.c... | """Helpers for codejail."""
import contextlib
import os
import shutil
import tempfile
@contextlib.contextmanager
def temp_directory():
"""
A context manager to make and use a temp directory.
The directory will be removed when done.
"""
temp_dir = tempfile.mkdtemp(prefix="codejail-")
# Make di... | <commit_before>"""Helpers for codejail."""
import contextlib
import os
import shutil
import tempfile
class TempDirectory(object):
def __init__(self):
self.temp_dir = tempfile.mkdtemp(prefix="codejail-")
# Make directory readable by other users ('sandbox' user needs to be
# able to read it... | """Helpers for codejail."""
import contextlib
import os
import shutil
import tempfile
@contextlib.contextmanager
def temp_directory():
"""
A context manager to make and use a temp directory.
The directory will be removed when done.
"""
temp_dir = tempfile.mkdtemp(prefix="codejail-")
# Make di... | """Helpers for codejail."""
import contextlib
import os
import shutil
import tempfile
class TempDirectory(object):
def __init__(self):
self.temp_dir = tempfile.mkdtemp(prefix="codejail-")
# Make directory readable by other users ('sandbox' user needs to be
# able to read it).
os.c... | <commit_before>"""Helpers for codejail."""
import contextlib
import os
import shutil
import tempfile
class TempDirectory(object):
def __init__(self):
self.temp_dir = tempfile.mkdtemp(prefix="codejail-")
# Make directory readable by other users ('sandbox' user needs to be
# able to read it... |
c0808574aaf410683f9c405e98be74a3ad4f4f2c | tests/events_test.py | tests/events_test.py | from unittest import TestCase
from mock import Mock
from nyuki.events import EventManager, Event, on_event
class Loop(Mock):
STACK = list()
def async(self, cb, *args):
self.STACK.append(cb)
class TestEventManager(TestCase):
def setUp(self):
loop = Mock()
self.manager = EventM... | from unittest import TestCase
from mock import Mock
from nyuki.events import EventManager, Event, on_event
class TestOnEvent(TestCase):
def test_001_call(self):
@on_event(Event.Connected, Event.Disconnected)
def test():
pass
self.assertIsInstance(test.on_event, set)
class T... | Add unit tests on events. | Add unit tests on events.
| Python | apache-2.0 | optiflows/nyuki,optiflows/nyuki,gdraynz/nyuki,gdraynz/nyuki | from unittest import TestCase
from mock import Mock
from nyuki.events import EventManager, Event, on_event
class Loop(Mock):
STACK = list()
def async(self, cb, *args):
self.STACK.append(cb)
class TestEventManager(TestCase):
def setUp(self):
loop = Mock()
self.manager = EventM... | from unittest import TestCase
from mock import Mock
from nyuki.events import EventManager, Event, on_event
class TestOnEvent(TestCase):
def test_001_call(self):
@on_event(Event.Connected, Event.Disconnected)
def test():
pass
self.assertIsInstance(test.on_event, set)
class T... | <commit_before>from unittest import TestCase
from mock import Mock
from nyuki.events import EventManager, Event, on_event
class Loop(Mock):
STACK = list()
def async(self, cb, *args):
self.STACK.append(cb)
class TestEventManager(TestCase):
def setUp(self):
loop = Mock()
self.m... | from unittest import TestCase
from mock import Mock
from nyuki.events import EventManager, Event, on_event
class TestOnEvent(TestCase):
def test_001_call(self):
@on_event(Event.Connected, Event.Disconnected)
def test():
pass
self.assertIsInstance(test.on_event, set)
class T... | from unittest import TestCase
from mock import Mock
from nyuki.events import EventManager, Event, on_event
class Loop(Mock):
STACK = list()
def async(self, cb, *args):
self.STACK.append(cb)
class TestEventManager(TestCase):
def setUp(self):
loop = Mock()
self.manager = EventM... | <commit_before>from unittest import TestCase
from mock import Mock
from nyuki.events import EventManager, Event, on_event
class Loop(Mock):
STACK = list()
def async(self, cb, *args):
self.STACK.append(cb)
class TestEventManager(TestCase):
def setUp(self):
loop = Mock()
self.m... |
6aa53f1fda74eb10051cb0bcc315f7db7dee1b57 | tests/test_propagation.py | tests/test_propagation.py | from opentracing import Format
from basictracer import BasicTracer
def test_propagation():
tracer = BasicTracer()
sp = tracer.start_span(operation_name="test")
sp.set_baggage_item("foo", "bar")
opname = 'op'
tests = [(Format.BINARY, bytearray()),
(Format.TEXT_MAP, {})]
for format,... | import pytest
from opentracing import Format, UnsupportedFormatException
from basictracer import BasicTracer
def test_propagation():
tracer = BasicTracer()
sp = tracer.start_span(operation_name="test")
sp.context.sampled = False
sp.set_baggage_item("foo", "bar")
opname = 'op'
# Test invalid ty... | Add baggage and invalid carrier tests | Add baggage and invalid carrier tests
| Python | apache-2.0 | opentracing/basictracer-python | from opentracing import Format
from basictracer import BasicTracer
def test_propagation():
tracer = BasicTracer()
sp = tracer.start_span(operation_name="test")
sp.set_baggage_item("foo", "bar")
opname = 'op'
tests = [(Format.BINARY, bytearray()),
(Format.TEXT_MAP, {})]
for format,... | import pytest
from opentracing import Format, UnsupportedFormatException
from basictracer import BasicTracer
def test_propagation():
tracer = BasicTracer()
sp = tracer.start_span(operation_name="test")
sp.context.sampled = False
sp.set_baggage_item("foo", "bar")
opname = 'op'
# Test invalid ty... | <commit_before>from opentracing import Format
from basictracer import BasicTracer
def test_propagation():
tracer = BasicTracer()
sp = tracer.start_span(operation_name="test")
sp.set_baggage_item("foo", "bar")
opname = 'op'
tests = [(Format.BINARY, bytearray()),
(Format.TEXT_MAP, {})]
... | import pytest
from opentracing import Format, UnsupportedFormatException
from basictracer import BasicTracer
def test_propagation():
tracer = BasicTracer()
sp = tracer.start_span(operation_name="test")
sp.context.sampled = False
sp.set_baggage_item("foo", "bar")
opname = 'op'
# Test invalid ty... | from opentracing import Format
from basictracer import BasicTracer
def test_propagation():
tracer = BasicTracer()
sp = tracer.start_span(operation_name="test")
sp.set_baggage_item("foo", "bar")
opname = 'op'
tests = [(Format.BINARY, bytearray()),
(Format.TEXT_MAP, {})]
for format,... | <commit_before>from opentracing import Format
from basictracer import BasicTracer
def test_propagation():
tracer = BasicTracer()
sp = tracer.start_span(operation_name="test")
sp.set_baggage_item("foo", "bar")
opname = 'op'
tests = [(Format.BINARY, bytearray()),
(Format.TEXT_MAP, {})]
... |
13a0c8b822582f84ff393298b13cf1e43642f825 | tests/test_stacks_file.py | tests/test_stacks_file.py | import json
from dmaws.stacks import Stack
from dmaws.context import Context
def is_true(x):
assert x
def is_in(a, b):
assert a in b
def valid_stack_json(stack):
text = stack.build('stage', 'env', {}).template_body
template = json.loads(text)
assert 'Parameters' in template
assert set(te... | import os
import json
from dmaws.stacks import Stack
from dmaws.context import Context
def is_true(x):
assert x
def is_in(a, b):
assert a in b
def valid_stack_json(ctx, stack):
text = stack.build('stage', 'env', ctx.variables).template_body
template = json.loads(text)
assert 'Parameters' in ... | Load default var files when testing template JSON | Load default var files when testing template JSON
Since template Jinja processing has access to the template variables
we need to load the default files when testing the JSON output.
| Python | mit | alphagov/digitalmarketplace-aws,alphagov/digitalmarketplace-aws,alphagov/digitalmarketplace-aws | import json
from dmaws.stacks import Stack
from dmaws.context import Context
def is_true(x):
assert x
def is_in(a, b):
assert a in b
def valid_stack_json(stack):
text = stack.build('stage', 'env', {}).template_body
template = json.loads(text)
assert 'Parameters' in template
assert set(te... | import os
import json
from dmaws.stacks import Stack
from dmaws.context import Context
def is_true(x):
assert x
def is_in(a, b):
assert a in b
def valid_stack_json(ctx, stack):
text = stack.build('stage', 'env', ctx.variables).template_body
template = json.loads(text)
assert 'Parameters' in ... | <commit_before>import json
from dmaws.stacks import Stack
from dmaws.context import Context
def is_true(x):
assert x
def is_in(a, b):
assert a in b
def valid_stack_json(stack):
text = stack.build('stage', 'env', {}).template_body
template = json.loads(text)
assert 'Parameters' in template
... | import os
import json
from dmaws.stacks import Stack
from dmaws.context import Context
def is_true(x):
assert x
def is_in(a, b):
assert a in b
def valid_stack_json(ctx, stack):
text = stack.build('stage', 'env', ctx.variables).template_body
template = json.loads(text)
assert 'Parameters' in ... | import json
from dmaws.stacks import Stack
from dmaws.context import Context
def is_true(x):
assert x
def is_in(a, b):
assert a in b
def valid_stack_json(stack):
text = stack.build('stage', 'env', {}).template_body
template = json.loads(text)
assert 'Parameters' in template
assert set(te... | <commit_before>import json
from dmaws.stacks import Stack
from dmaws.context import Context
def is_true(x):
assert x
def is_in(a, b):
assert a in b
def valid_stack_json(stack):
text = stack.build('stage', 'env', {}).template_body
template = json.loads(text)
assert 'Parameters' in template
... |
6aabf31aeb6766677f805bd4c0d5e4fc26522e53 | tests/test_memory.py | tests/test_memory.py | import sys
import weakref
import pytest # type: ignore
from hypothesis import given
from ppb_vector import Vector2
from utils import floats, vectors
class DummyVector:
"""A naïve representation of vectors."""
x: float
y: float
def __init__(self, x, y):
self.x = float(x)
self.y = f... | import sys
import weakref
import pytest # type: ignore
from hypothesis import given
from ppb_vector import Vector2
from utils import floats, vectors
class DummyVector:
"""A naïve representation of vectors."""
x: float
y: float
def __init__(self, x, y):
self.x = float(x)
self.y = f... | Disable test_object_size under CPython 3.8 | tests/memory: Disable test_object_size under CPython 3.8
| Python | artistic-2.0 | ppb/ppb-vector,ppb/ppb-vector | import sys
import weakref
import pytest # type: ignore
from hypothesis import given
from ppb_vector import Vector2
from utils import floats, vectors
class DummyVector:
"""A naïve representation of vectors."""
x: float
y: float
def __init__(self, x, y):
self.x = float(x)
self.y = f... | import sys
import weakref
import pytest # type: ignore
from hypothesis import given
from ppb_vector import Vector2
from utils import floats, vectors
class DummyVector:
"""A naïve representation of vectors."""
x: float
y: float
def __init__(self, x, y):
self.x = float(x)
self.y = f... | <commit_before>import sys
import weakref
import pytest # type: ignore
from hypothesis import given
from ppb_vector import Vector2
from utils import floats, vectors
class DummyVector:
"""A naïve representation of vectors."""
x: float
y: float
def __init__(self, x, y):
self.x = float(x)
... | import sys
import weakref
import pytest # type: ignore
from hypothesis import given
from ppb_vector import Vector2
from utils import floats, vectors
class DummyVector:
"""A naïve representation of vectors."""
x: float
y: float
def __init__(self, x, y):
self.x = float(x)
self.y = f... | import sys
import weakref
import pytest # type: ignore
from hypothesis import given
from ppb_vector import Vector2
from utils import floats, vectors
class DummyVector:
"""A naïve representation of vectors."""
x: float
y: float
def __init__(self, x, y):
self.x = float(x)
self.y = f... | <commit_before>import sys
import weakref
import pytest # type: ignore
from hypothesis import given
from ppb_vector import Vector2
from utils import floats, vectors
class DummyVector:
"""A naïve representation of vectors."""
x: float
y: float
def __init__(self, x, y):
self.x = float(x)
... |
9712183d01ef95fcd28ed1632346371127ec8a3e | tests/window_test.py | tests/window_test.py | #!/usr/bin/env python
# encoding: utf-8
"""Tests window.py for vimiv's test suite."""
from unittest import main
from vimiv_testcase import VimivTestCase, refresh_gui
class WindowTest(VimivTestCase):
"""Window Tests."""
@classmethod
def setUpClass(cls):
cls.init_test(cls, ["vimiv/testimages/"])
... | #!/usr/bin/env python
# encoding: utf-8
"""Tests window.py for vimiv's test suite."""
import os
from unittest import main, skipUnless
from vimiv_testcase import VimivTestCase, refresh_gui
class WindowTest(VimivTestCase):
"""Window Tests."""
@classmethod
def setUpClass(cls):
cls.init_test(cls, ["... | Add test for checking window resizing | Add test for checking window resizing
Test if the variable vimiv["window"].winsize is adjusted when resizing the
window. This is only guaranteed to work in Xvfb as e.g. tiling window managers
do not react to the resize from Gtk.
| Python | mit | karlch/vimiv,karlch/vimiv,karlch/vimiv | #!/usr/bin/env python
# encoding: utf-8
"""Tests window.py for vimiv's test suite."""
from unittest import main
from vimiv_testcase import VimivTestCase, refresh_gui
class WindowTest(VimivTestCase):
"""Window Tests."""
@classmethod
def setUpClass(cls):
cls.init_test(cls, ["vimiv/testimages/"])
... | #!/usr/bin/env python
# encoding: utf-8
"""Tests window.py for vimiv's test suite."""
import os
from unittest import main, skipUnless
from vimiv_testcase import VimivTestCase, refresh_gui
class WindowTest(VimivTestCase):
"""Window Tests."""
@classmethod
def setUpClass(cls):
cls.init_test(cls, ["... | <commit_before>#!/usr/bin/env python
# encoding: utf-8
"""Tests window.py for vimiv's test suite."""
from unittest import main
from vimiv_testcase import VimivTestCase, refresh_gui
class WindowTest(VimivTestCase):
"""Window Tests."""
@classmethod
def setUpClass(cls):
cls.init_test(cls, ["vimiv/t... | #!/usr/bin/env python
# encoding: utf-8
"""Tests window.py for vimiv's test suite."""
import os
from unittest import main, skipUnless
from vimiv_testcase import VimivTestCase, refresh_gui
class WindowTest(VimivTestCase):
"""Window Tests."""
@classmethod
def setUpClass(cls):
cls.init_test(cls, ["... | #!/usr/bin/env python
# encoding: utf-8
"""Tests window.py for vimiv's test suite."""
from unittest import main
from vimiv_testcase import VimivTestCase, refresh_gui
class WindowTest(VimivTestCase):
"""Window Tests."""
@classmethod
def setUpClass(cls):
cls.init_test(cls, ["vimiv/testimages/"])
... | <commit_before>#!/usr/bin/env python
# encoding: utf-8
"""Tests window.py for vimiv's test suite."""
from unittest import main
from vimiv_testcase import VimivTestCase, refresh_gui
class WindowTest(VimivTestCase):
"""Window Tests."""
@classmethod
def setUpClass(cls):
cls.init_test(cls, ["vimiv/t... |
7917716ebd11770c5d4d0634b39e32e4f577ab71 | tests/test_urls.py | tests/test_urls.py | from unittest import TestCase
class TestURLs(TestCase):
pass
| from unittest import TestCase
from django.contrib.auth import views
from django.core.urlresolvers import resolve, reverse
class URLsMixin(object):
"""
A TestCase Mixin with a check_url helper method for testing urls.
Pirated with slight modifications from incuna_test_utils
https://github.com/incuna/i... | Add lots of URL tests. | Add lots of URL tests.
* The URLsMixin from incuna_test_utils/testcases/urls.py
isn't quite doing what we want here, so rip it off and
make a small modification (resolve(...).func.cls ->
resolve(...).func).
* Add lots of tests for the django.contrib.auth views
that we're using (the others are more complex).
| Python | bsd-2-clause | incuna/incuna-auth,ghickman/incuna-auth,ghickman/incuna-auth,incuna/incuna-auth | from unittest import TestCase
class TestURLs(TestCase):
pass
Add lots of URL tests.
* The URLsMixin from incuna_test_utils/testcases/urls.py
isn't quite doing what we want here, so rip it off and
make a small modification (resolve(...).func.cls ->
resolve(...).func).
* Add lots of tests for the django.cont... | from unittest import TestCase
from django.contrib.auth import views
from django.core.urlresolvers import resolve, reverse
class URLsMixin(object):
"""
A TestCase Mixin with a check_url helper method for testing urls.
Pirated with slight modifications from incuna_test_utils
https://github.com/incuna/i... | <commit_before>from unittest import TestCase
class TestURLs(TestCase):
pass
<commit_msg>Add lots of URL tests.
* The URLsMixin from incuna_test_utils/testcases/urls.py
isn't quite doing what we want here, so rip it off and
make a small modification (resolve(...).func.cls ->
resolve(...).func).
* Add lots o... | from unittest import TestCase
from django.contrib.auth import views
from django.core.urlresolvers import resolve, reverse
class URLsMixin(object):
"""
A TestCase Mixin with a check_url helper method for testing urls.
Pirated with slight modifications from incuna_test_utils
https://github.com/incuna/i... | from unittest import TestCase
class TestURLs(TestCase):
pass
Add lots of URL tests.
* The URLsMixin from incuna_test_utils/testcases/urls.py
isn't quite doing what we want here, so rip it off and
make a small modification (resolve(...).func.cls ->
resolve(...).func).
* Add lots of tests for the django.cont... | <commit_before>from unittest import TestCase
class TestURLs(TestCase):
pass
<commit_msg>Add lots of URL tests.
* The URLsMixin from incuna_test_utils/testcases/urls.py
isn't quite doing what we want here, so rip it off and
make a small modification (resolve(...).func.cls ->
resolve(...).func).
* Add lots o... |
322997e229457bf43ee2281993ccdc30c8455244 | tests/test_util.py | tests/test_util.py | from archivebox import util
def test_download_url_downloads_content():
text = util.download_url("https://example.com")
assert "Example Domain" in text | from archivebox import util
def test_download_url_downloads_content():
text = util.download_url("http://localhost:8080/static/example.com.html")
assert "Example Domain" in text | Refactor util tests to use local webserver | test: Refactor util tests to use local webserver
| Python | mit | pirate/bookmark-archiver,pirate/bookmark-archiver,pirate/bookmark-archiver | from archivebox import util
def test_download_url_downloads_content():
text = util.download_url("https://example.com")
assert "Example Domain" in texttest: Refactor util tests to use local webserver | from archivebox import util
def test_download_url_downloads_content():
text = util.download_url("http://localhost:8080/static/example.com.html")
assert "Example Domain" in text | <commit_before>from archivebox import util
def test_download_url_downloads_content():
text = util.download_url("https://example.com")
assert "Example Domain" in text<commit_msg>test: Refactor util tests to use local webserver<commit_after> | from archivebox import util
def test_download_url_downloads_content():
text = util.download_url("http://localhost:8080/static/example.com.html")
assert "Example Domain" in text | from archivebox import util
def test_download_url_downloads_content():
text = util.download_url("https://example.com")
assert "Example Domain" in texttest: Refactor util tests to use local webserverfrom archivebox import util
def test_download_url_downloads_content():
text = util.download_url("http://loca... | <commit_before>from archivebox import util
def test_download_url_downloads_content():
text = util.download_url("https://example.com")
assert "Example Domain" in text<commit_msg>test: Refactor util tests to use local webserver<commit_after>from archivebox import util
def test_download_url_downloads_content():
... |
10554ed0c44f819985f9f6d1c97a265d281541a2 | test/test_types.py | test/test_types.py | """ Tests for the Types module """
import unittest
# pylint: disable=import-error
from res import types
class TestTypes(unittest.TestCase):
""" Tests for the Types module """
def test_getPieceAbbreviation_empty(self):
"Correctly convert a type to a character for display"
self.assertEqual('.'... | """ Tests for the Types module """
import unittest
# pylint: disable=import-error
from res import types
class TestTypes(unittest.TestCase):
""" Tests for the Types module """
def test_getPieceAbbreviation_empty(self):
"Correctly convert a type to a character for display"
self.assertEqual('.'... | Update redundant test to check error handling | Update redundant test to check error handling
| Python | mit | blairck/jaeger | """ Tests for the Types module """
import unittest
# pylint: disable=import-error
from res import types
class TestTypes(unittest.TestCase):
""" Tests for the Types module """
def test_getPieceAbbreviation_empty(self):
"Correctly convert a type to a character for display"
self.assertEqual('.'... | """ Tests for the Types module """
import unittest
# pylint: disable=import-error
from res import types
class TestTypes(unittest.TestCase):
""" Tests for the Types module """
def test_getPieceAbbreviation_empty(self):
"Correctly convert a type to a character for display"
self.assertEqual('.'... | <commit_before>""" Tests for the Types module """
import unittest
# pylint: disable=import-error
from res import types
class TestTypes(unittest.TestCase):
""" Tests for the Types module """
def test_getPieceAbbreviation_empty(self):
"Correctly convert a type to a character for display"
self.... | """ Tests for the Types module """
import unittest
# pylint: disable=import-error
from res import types
class TestTypes(unittest.TestCase):
""" Tests for the Types module """
def test_getPieceAbbreviation_empty(self):
"Correctly convert a type to a character for display"
self.assertEqual('.'... | """ Tests for the Types module """
import unittest
# pylint: disable=import-error
from res import types
class TestTypes(unittest.TestCase):
""" Tests for the Types module """
def test_getPieceAbbreviation_empty(self):
"Correctly convert a type to a character for display"
self.assertEqual('.'... | <commit_before>""" Tests for the Types module """
import unittest
# pylint: disable=import-error
from res import types
class TestTypes(unittest.TestCase):
""" Tests for the Types module """
def test_getPieceAbbreviation_empty(self):
"Correctly convert a type to a character for display"
self.... |
d4f63a22df8bb7a866737150064d92ce7227c875 | pyshould/dsl.py | pyshould/dsl.py | """
Define the names making up the domain specific language
"""
from .expectation import (
Expectation, ExpectationNot,
ExpectationAll, ExpectationAny,
ExpectationNone, OPERATOR_OR
)
# Create instances to be used with the overloaded | operator
should = Expectation(deferred=True)
should_not = E... | """
Define the names making up the domain specific language
"""
from .expectation import (
Expectation, ExpectationNot,
ExpectationAll, ExpectationAny,
ExpectationNone, OPERATOR_OR
)
# Create instances to be used with the overloaded | operator
should = Expectation(deferred=True)
should_not = E... | Allow multiple arguments for quantifiers | Allow multiple arguments for quantifiers
| Python | mit | drslump/pyshould | """
Define the names making up the domain specific language
"""
from .expectation import (
Expectation, ExpectationNot,
ExpectationAll, ExpectationAny,
ExpectationNone, OPERATOR_OR
)
# Create instances to be used with the overloaded | operator
should = Expectation(deferred=True)
should_not = E... | """
Define the names making up the domain specific language
"""
from .expectation import (
Expectation, ExpectationNot,
ExpectationAll, ExpectationAny,
ExpectationNone, OPERATOR_OR
)
# Create instances to be used with the overloaded | operator
should = Expectation(deferred=True)
should_not = E... | <commit_before>"""
Define the names making up the domain specific language
"""
from .expectation import (
Expectation, ExpectationNot,
ExpectationAll, ExpectationAny,
ExpectationNone, OPERATOR_OR
)
# Create instances to be used with the overloaded | operator
should = Expectation(deferred=True)... | """
Define the names making up the domain specific language
"""
from .expectation import (
Expectation, ExpectationNot,
ExpectationAll, ExpectationAny,
ExpectationNone, OPERATOR_OR
)
# Create instances to be used with the overloaded | operator
should = Expectation(deferred=True)
should_not = E... | """
Define the names making up the domain specific language
"""
from .expectation import (
Expectation, ExpectationNot,
ExpectationAll, ExpectationAny,
ExpectationNone, OPERATOR_OR
)
# Create instances to be used with the overloaded | operator
should = Expectation(deferred=True)
should_not = E... | <commit_before>"""
Define the names making up the domain specific language
"""
from .expectation import (
Expectation, ExpectationNot,
ExpectationAll, ExpectationAny,
ExpectationNone, OPERATOR_OR
)
# Create instances to be used with the overloaded | operator
should = Expectation(deferred=True)... |
6d1b20bd047a47c46e3aa33a920e71f890f2b1fa | run.py | run.py | __author__ = 'matt'
import datetime
import blockbuster
blockbuster.app.debug = blockbuster.config.debug_mode
blockbuster.bb_logging.logger.info("@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@")
blockbuster.bb_logging.logger.info("@@@@@@@@@@@@@@@@@@ BlockBuster " + blockbuster.config.app_version + " "
... | __author__ = 'matt'
import datetime
import blockbuster
blockbuster.app.debug = blockbuster.config.debug_mode
blockbuster.bb_logging.logger.info("@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@")
blockbuster.bb_logging.logger.info("@@@@@@@@@@@@@@@@@@ BlockBuster " + blockbuster.__version__ + " "
... | Update reference to application version | Update reference to application version
| Python | mit | mattstibbs/blockbuster-server,mattstibbs/blockbuster-server | __author__ = 'matt'
import datetime
import blockbuster
blockbuster.app.debug = blockbuster.config.debug_mode
blockbuster.bb_logging.logger.info("@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@")
blockbuster.bb_logging.logger.info("@@@@@@@@@@@@@@@@@@ BlockBuster " + blockbuster.config.app_version + " "
... | __author__ = 'matt'
import datetime
import blockbuster
blockbuster.app.debug = blockbuster.config.debug_mode
blockbuster.bb_logging.logger.info("@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@")
blockbuster.bb_logging.logger.info("@@@@@@@@@@@@@@@@@@ BlockBuster " + blockbuster.__version__ + " "
... | <commit_before>__author__ = 'matt'
import datetime
import blockbuster
blockbuster.app.debug = blockbuster.config.debug_mode
blockbuster.bb_logging.logger.info("@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@")
blockbuster.bb_logging.logger.info("@@@@@@@@@@@@@@@@@@ BlockBuster " + blockbuster.config.app_ver... | __author__ = 'matt'
import datetime
import blockbuster
blockbuster.app.debug = blockbuster.config.debug_mode
blockbuster.bb_logging.logger.info("@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@")
blockbuster.bb_logging.logger.info("@@@@@@@@@@@@@@@@@@ BlockBuster " + blockbuster.__version__ + " "
... | __author__ = 'matt'
import datetime
import blockbuster
blockbuster.app.debug = blockbuster.config.debug_mode
blockbuster.bb_logging.logger.info("@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@")
blockbuster.bb_logging.logger.info("@@@@@@@@@@@@@@@@@@ BlockBuster " + blockbuster.config.app_version + " "
... | <commit_before>__author__ = 'matt'
import datetime
import blockbuster
blockbuster.app.debug = blockbuster.config.debug_mode
blockbuster.bb_logging.logger.info("@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@")
blockbuster.bb_logging.logger.info("@@@@@@@@@@@@@@@@@@ BlockBuster " + blockbuster.config.app_ver... |
3f99d7728714aed4bc19d68d2e2d410d792fe4e9 | iati/core/constants.py | iati/core/constants.py | """A module containing constants required throughout IATI library code.
Warning:
This contents of this module should currently be deemed private.
Todo:
Allow logging constants to be user-definable.
"""
STANDARD_VERSIONS = ['2.02']
"""Define all versions of the Standard.
Todo:
This constant to be populate... | """A module containing constants required throughout IATI library code.
The contents of this file are not designed to be user-editable. Only edit if you know what you are doing!
Warning:
This contents of this module should currently be deemed private.
Todo:
Allow logging constants to be user-definable.
"""
... | Add note that the file is not designed to be user-editable! | Add note that the file is not designed to be user-editable!
| Python | mit | IATI/iati.core,IATI/iati.core | """A module containing constants required throughout IATI library code.
Warning:
This contents of this module should currently be deemed private.
Todo:
Allow logging constants to be user-definable.
"""
STANDARD_VERSIONS = ['2.02']
"""Define all versions of the Standard.
Todo:
This constant to be populate... | """A module containing constants required throughout IATI library code.
The contents of this file are not designed to be user-editable. Only edit if you know what you are doing!
Warning:
This contents of this module should currently be deemed private.
Todo:
Allow logging constants to be user-definable.
"""
... | <commit_before>"""A module containing constants required throughout IATI library code.
Warning:
This contents of this module should currently be deemed private.
Todo:
Allow logging constants to be user-definable.
"""
STANDARD_VERSIONS = ['2.02']
"""Define all versions of the Standard.
Todo:
This constant... | """A module containing constants required throughout IATI library code.
The contents of this file are not designed to be user-editable. Only edit if you know what you are doing!
Warning:
This contents of this module should currently be deemed private.
Todo:
Allow logging constants to be user-definable.
"""
... | """A module containing constants required throughout IATI library code.
Warning:
This contents of this module should currently be deemed private.
Todo:
Allow logging constants to be user-definable.
"""
STANDARD_VERSIONS = ['2.02']
"""Define all versions of the Standard.
Todo:
This constant to be populate... | <commit_before>"""A module containing constants required throughout IATI library code.
Warning:
This contents of this module should currently be deemed private.
Todo:
Allow logging constants to be user-definable.
"""
STANDARD_VERSIONS = ['2.02']
"""Define all versions of the Standard.
Todo:
This constant... |
56a2848a131e411ed687eec4d6a68f1901d942dc | icforum/forum/forms.py | icforum/forum/forms.py | from django import forms
from django.contrib.auth import authenticate
from .models import *
class SignInForm(forms.Form):
username = forms.CharField(max_length=100, label='Username')
password = forms.CharField(max_length=100, label='Password', widget=forms.PasswordInput)
def clean(self):
cleaned_data = super(Si... | from django import forms
from django.contrib.auth import authenticate
from .models import *
class SignInForm(forms.Form):
username = forms.CharField(max_length=100, label='Username')
password = forms.CharField(max_length=100, label='Password', widget=forms.PasswordInput)
def clean(self):
cleaned_data = super(Si... | Fix label on "new message" form | Fix label on "new message" form
| Python | apache-2.0 | rdujardin/icforum,rdujardin/icforum,rdujardin/icforum | from django import forms
from django.contrib.auth import authenticate
from .models import *
class SignInForm(forms.Form):
username = forms.CharField(max_length=100, label='Username')
password = forms.CharField(max_length=100, label='Password', widget=forms.PasswordInput)
def clean(self):
cleaned_data = super(Si... | from django import forms
from django.contrib.auth import authenticate
from .models import *
class SignInForm(forms.Form):
username = forms.CharField(max_length=100, label='Username')
password = forms.CharField(max_length=100, label='Password', widget=forms.PasswordInput)
def clean(self):
cleaned_data = super(Si... | <commit_before>from django import forms
from django.contrib.auth import authenticate
from .models import *
class SignInForm(forms.Form):
username = forms.CharField(max_length=100, label='Username')
password = forms.CharField(max_length=100, label='Password', widget=forms.PasswordInput)
def clean(self):
cleaned_... | from django import forms
from django.contrib.auth import authenticate
from .models import *
class SignInForm(forms.Form):
username = forms.CharField(max_length=100, label='Username')
password = forms.CharField(max_length=100, label='Password', widget=forms.PasswordInput)
def clean(self):
cleaned_data = super(Si... | from django import forms
from django.contrib.auth import authenticate
from .models import *
class SignInForm(forms.Form):
username = forms.CharField(max_length=100, label='Username')
password = forms.CharField(max_length=100, label='Password', widget=forms.PasswordInput)
def clean(self):
cleaned_data = super(Si... | <commit_before>from django import forms
from django.contrib.auth import authenticate
from .models import *
class SignInForm(forms.Form):
username = forms.CharField(max_length=100, label='Username')
password = forms.CharField(max_length=100, label='Password', widget=forms.PasswordInput)
def clean(self):
cleaned_... |
4bb72952c934dd6aea3db393226d37eb1b0eb72e | penelophant/models/auctions/DoubleBlindAuction.py | penelophant/models/auctions/DoubleBlindAuction.py | """ Double Blind Auction implementation """
from penelophant.models.Auction import Auction
class DoubleBlindAuction(Auction):
""" Double Blind Auction implementation """
__type__ = 'doubleblind'
__name__ = 'Double-Blind Auction'
__mapper_args__ = {'polymorphic_identity': __type__}
| """ Double Blind Auction implementation """
from penelophant.models.Auction import Auction
class DoubleBlindAuction(Auction):
""" Double Blind Auction implementation """
__type__ = 'doubleblind'
__name__ = 'Double-Blind Auction'
__mapper_args__ = {'polymorphic_identity': __type__}
show_highest_bid = False
| Add disallowing of double blind auction highest bids being disclosed | Add disallowing of double blind auction highest bids being disclosed
| Python | apache-2.0 | kevinoconnor7/penelophant,kevinoconnor7/penelophant | """ Double Blind Auction implementation """
from penelophant.models.Auction import Auction
class DoubleBlindAuction(Auction):
""" Double Blind Auction implementation """
__type__ = 'doubleblind'
__name__ = 'Double-Blind Auction'
__mapper_args__ = {'polymorphic_identity': __type__}
Add disallowing of double bl... | """ Double Blind Auction implementation """
from penelophant.models.Auction import Auction
class DoubleBlindAuction(Auction):
""" Double Blind Auction implementation """
__type__ = 'doubleblind'
__name__ = 'Double-Blind Auction'
__mapper_args__ = {'polymorphic_identity': __type__}
show_highest_bid = False
| <commit_before>""" Double Blind Auction implementation """
from penelophant.models.Auction import Auction
class DoubleBlindAuction(Auction):
""" Double Blind Auction implementation """
__type__ = 'doubleblind'
__name__ = 'Double-Blind Auction'
__mapper_args__ = {'polymorphic_identity': __type__}
<commit_msg>A... | """ Double Blind Auction implementation """
from penelophant.models.Auction import Auction
class DoubleBlindAuction(Auction):
""" Double Blind Auction implementation """
__type__ = 'doubleblind'
__name__ = 'Double-Blind Auction'
__mapper_args__ = {'polymorphic_identity': __type__}
show_highest_bid = False
| """ Double Blind Auction implementation """
from penelophant.models.Auction import Auction
class DoubleBlindAuction(Auction):
""" Double Blind Auction implementation """
__type__ = 'doubleblind'
__name__ = 'Double-Blind Auction'
__mapper_args__ = {'polymorphic_identity': __type__}
Add disallowing of double bl... | <commit_before>""" Double Blind Auction implementation """
from penelophant.models.Auction import Auction
class DoubleBlindAuction(Auction):
""" Double Blind Auction implementation """
__type__ = 'doubleblind'
__name__ = 'Double-Blind Auction'
__mapper_args__ = {'polymorphic_identity': __type__}
<commit_msg>A... |
9f43d877aed9eeca9fe1b2a8c3a19c034b5f3dfb | armstrong/apps/related_content/models.py | armstrong/apps/related_content/models.py | from django.contrib.contenttypes import generic
from django.contrib.contenttypes.models import ContentType
from django.db import models
from . import managers
class RelatedType(models.Model):
title = models.CharField(max_length=100)
def __unicode__(self):
return self.title
class RelatedContent(mod... | from django.contrib.contenttypes import generic
from django.contrib.contenttypes.models import ContentType
from django.db import models
from genericm2m.models import RelatedObjectsDescriptor
from . import managers
class RelatedObjectsField(RelatedObjectsDescriptor):
def __init__(self, model=None, from_field="sou... | Add in field for making a `related` field on objects. | Add in field for making a `related` field on objects.
Big thanks to @coleifer for his [django-generic-m2m][] project, we've
got a field for adding `related` to other objects with minimal new code.
[django-generic-m2m]: http://github.com/coleifer/django-generic-m2m
| Python | apache-2.0 | texastribune/armstrong.apps.related_content,armstrong/armstrong.apps.related_content,texastribune/armstrong.apps.related_content,armstrong/armstrong.apps.related_content | from django.contrib.contenttypes import generic
from django.contrib.contenttypes.models import ContentType
from django.db import models
from . import managers
class RelatedType(models.Model):
title = models.CharField(max_length=100)
def __unicode__(self):
return self.title
class RelatedContent(mod... | from django.contrib.contenttypes import generic
from django.contrib.contenttypes.models import ContentType
from django.db import models
from genericm2m.models import RelatedObjectsDescriptor
from . import managers
class RelatedObjectsField(RelatedObjectsDescriptor):
def __init__(self, model=None, from_field="sou... | <commit_before>from django.contrib.contenttypes import generic
from django.contrib.contenttypes.models import ContentType
from django.db import models
from . import managers
class RelatedType(models.Model):
title = models.CharField(max_length=100)
def __unicode__(self):
return self.title
class Rel... | from django.contrib.contenttypes import generic
from django.contrib.contenttypes.models import ContentType
from django.db import models
from genericm2m.models import RelatedObjectsDescriptor
from . import managers
class RelatedObjectsField(RelatedObjectsDescriptor):
def __init__(self, model=None, from_field="sou... | from django.contrib.contenttypes import generic
from django.contrib.contenttypes.models import ContentType
from django.db import models
from . import managers
class RelatedType(models.Model):
title = models.CharField(max_length=100)
def __unicode__(self):
return self.title
class RelatedContent(mod... | <commit_before>from django.contrib.contenttypes import generic
from django.contrib.contenttypes.models import ContentType
from django.db import models
from . import managers
class RelatedType(models.Model):
title = models.CharField(max_length=100)
def __unicode__(self):
return self.title
class Rel... |
5cc9d99238c417ec010db44b3919873929fd1d7f | devtools/travis-ci/update_versions_json.py | devtools/travis-ci/update_versions_json.py | import json
try:
from urllib.request import urlopen
except ImportError:
from urllib2 import urlopen
from mdtraj import version
if not version.release:
print("This is not a release.")
exit(0)
URL = 'http://www.msmbuilder.org'
versions = json.load(urlopen(URL + '/versions.json'))
# new release so all ... | import json
try:
from urllib.request import urlopen
except ImportError:
from urllib2 import urlopen
from mdtraj import version
if not version.release:
print("This is not a release.")
exit(0)
URL = 'http://www.msmbuilder.org'
versions = json.load(urlopen(URL + '/versions.json'))
# new release so all ... | Add 'display' key to versions.json | Add 'display' key to versions.json
| Python | lgpl-2.1 | mattwthompson/mdtraj,leeping/mdtraj,ctk3b/mdtraj,msultan/mdtraj,mattwthompson/mdtraj,rmcgibbo/mdtraj,dwhswenson/mdtraj,rmcgibbo/mdtraj,ctk3b/mdtraj,leeping/mdtraj,leeping/mdtraj,gph82/mdtraj,tcmoore3/mdtraj,gph82/mdtraj,ctk3b/mdtraj,msultan/mdtraj,tcmoore3/mdtraj,gph82/mdtraj,msultan/mdtraj,mdtraj/mdtraj,mattwthompson/... | import json
try:
from urllib.request import urlopen
except ImportError:
from urllib2 import urlopen
from mdtraj import version
if not version.release:
print("This is not a release.")
exit(0)
URL = 'http://www.msmbuilder.org'
versions = json.load(urlopen(URL + '/versions.json'))
# new release so all ... | import json
try:
from urllib.request import urlopen
except ImportError:
from urllib2 import urlopen
from mdtraj import version
if not version.release:
print("This is not a release.")
exit(0)
URL = 'http://www.msmbuilder.org'
versions = json.load(urlopen(URL + '/versions.json'))
# new release so all ... | <commit_before>import json
try:
from urllib.request import urlopen
except ImportError:
from urllib2 import urlopen
from mdtraj import version
if not version.release:
print("This is not a release.")
exit(0)
URL = 'http://www.msmbuilder.org'
versions = json.load(urlopen(URL + '/versions.json'))
# new ... | import json
try:
from urllib.request import urlopen
except ImportError:
from urllib2 import urlopen
from mdtraj import version
if not version.release:
print("This is not a release.")
exit(0)
URL = 'http://www.msmbuilder.org'
versions = json.load(urlopen(URL + '/versions.json'))
# new release so all ... | import json
try:
from urllib.request import urlopen
except ImportError:
from urllib2 import urlopen
from mdtraj import version
if not version.release:
print("This is not a release.")
exit(0)
URL = 'http://www.msmbuilder.org'
versions = json.load(urlopen(URL + '/versions.json'))
# new release so all ... | <commit_before>import json
try:
from urllib.request import urlopen
except ImportError:
from urllib2 import urlopen
from mdtraj import version
if not version.release:
print("This is not a release.")
exit(0)
URL = 'http://www.msmbuilder.org'
versions = json.load(urlopen(URL + '/versions.json'))
# new ... |
8258c451de6d94936d15d772fcbf3da24f6fb4b2 | byceps/services/email/transfer/models.py | byceps/services/email/transfer/models.py | """
byceps.services.email.transfer.models
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
:Copyright: 2006-2021 Jochen Kupperschmidt
:License: Revised BSD (see `LICENSE` file for details)
"""
from __future__ import annotations
from dataclasses import dataclass
from email.utils import formataddr
from ....typing import BrandID
... | """
byceps.services.email.transfer.models
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
:Copyright: 2006-2021 Jochen Kupperschmidt
:License: Revised BSD (see `LICENSE` file for details)
"""
from __future__ import annotations
from dataclasses import dataclass
from email.utils import formataddr
from typing import Optional
fro... | Make sender address name field optional | Make sender address name field optional
| Python | bsd-3-clause | homeworkprod/byceps,homeworkprod/byceps,homeworkprod/byceps | """
byceps.services.email.transfer.models
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
:Copyright: 2006-2021 Jochen Kupperschmidt
:License: Revised BSD (see `LICENSE` file for details)
"""
from __future__ import annotations
from dataclasses import dataclass
from email.utils import formataddr
from ....typing import BrandID
... | """
byceps.services.email.transfer.models
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
:Copyright: 2006-2021 Jochen Kupperschmidt
:License: Revised BSD (see `LICENSE` file for details)
"""
from __future__ import annotations
from dataclasses import dataclass
from email.utils import formataddr
from typing import Optional
fro... | <commit_before>"""
byceps.services.email.transfer.models
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
:Copyright: 2006-2021 Jochen Kupperschmidt
:License: Revised BSD (see `LICENSE` file for details)
"""
from __future__ import annotations
from dataclasses import dataclass
from email.utils import formataddr
from ....typing ... | """
byceps.services.email.transfer.models
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
:Copyright: 2006-2021 Jochen Kupperschmidt
:License: Revised BSD (see `LICENSE` file for details)
"""
from __future__ import annotations
from dataclasses import dataclass
from email.utils import formataddr
from typing import Optional
fro... | """
byceps.services.email.transfer.models
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
:Copyright: 2006-2021 Jochen Kupperschmidt
:License: Revised BSD (see `LICENSE` file for details)
"""
from __future__ import annotations
from dataclasses import dataclass
from email.utils import formataddr
from ....typing import BrandID
... | <commit_before>"""
byceps.services.email.transfer.models
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
:Copyright: 2006-2021 Jochen Kupperschmidt
:License: Revised BSD (see `LICENSE` file for details)
"""
from __future__ import annotations
from dataclasses import dataclass
from email.utils import formataddr
from ....typing ... |
791e03258c53379dde587a4bf0c05e0d2bc053ad | test_tbselenium.py | test_tbselenium.py | #!/usr/bin/env python2.7
import os
import site
import sys
sys.path.append(os.path.join(os.getcwd(), 'tor-browser-selenium'))
# site.addsitedir(path.join(getcwd(), 'tor-browser-selenium'))
from tbselenium.tbdriver import TorBrowserDriver
with TorBrowserDriver('~/.tb-stable/tor-browser_en-US/') as driver:
driver.ge... | #!/usr/bin/env python
# NOTICE: this is only working right now because I'm working from a dirty
# submodule where I've implemented this
# https://github.com/fowlslegs/tor-browser-selenium/commit/8f7c88871735fc86ee0209595e718ea03841ffee
# commit
import os
import site
site.addsitedir(os.path.join(os.getcwd(), 'tor-brow... | Fix test to work with patched tbdriver.py (see NOTICE in diff) | Fix test to work with patched tbdriver.py (see NOTICE in diff)
| Python | agpl-3.0 | freedomofpress/fingerprint-securedrop,freedomofpress/FingerprintSecureDrop,freedomofpress/fingerprint-securedrop,freedomofpress/FingerprintSecureDrop,freedomofpress/fingerprint-securedrop | #!/usr/bin/env python2.7
import os
import site
import sys
sys.path.append(os.path.join(os.getcwd(), 'tor-browser-selenium'))
# site.addsitedir(path.join(getcwd(), 'tor-browser-selenium'))
from tbselenium.tbdriver import TorBrowserDriver
with TorBrowserDriver('~/.tb-stable/tor-browser_en-US/') as driver:
driver.ge... | #!/usr/bin/env python
# NOTICE: this is only working right now because I'm working from a dirty
# submodule where I've implemented this
# https://github.com/fowlslegs/tor-browser-selenium/commit/8f7c88871735fc86ee0209595e718ea03841ffee
# commit
import os
import site
site.addsitedir(os.path.join(os.getcwd(), 'tor-brow... | <commit_before>#!/usr/bin/env python2.7
import os
import site
import sys
sys.path.append(os.path.join(os.getcwd(), 'tor-browser-selenium'))
# site.addsitedir(path.join(getcwd(), 'tor-browser-selenium'))
from tbselenium.tbdriver import TorBrowserDriver
with TorBrowserDriver('~/.tb-stable/tor-browser_en-US/') as driver... | #!/usr/bin/env python
# NOTICE: this is only working right now because I'm working from a dirty
# submodule where I've implemented this
# https://github.com/fowlslegs/tor-browser-selenium/commit/8f7c88871735fc86ee0209595e718ea03841ffee
# commit
import os
import site
site.addsitedir(os.path.join(os.getcwd(), 'tor-brow... | #!/usr/bin/env python2.7
import os
import site
import sys
sys.path.append(os.path.join(os.getcwd(), 'tor-browser-selenium'))
# site.addsitedir(path.join(getcwd(), 'tor-browser-selenium'))
from tbselenium.tbdriver import TorBrowserDriver
with TorBrowserDriver('~/.tb-stable/tor-browser_en-US/') as driver:
driver.ge... | <commit_before>#!/usr/bin/env python2.7
import os
import site
import sys
sys.path.append(os.path.join(os.getcwd(), 'tor-browser-selenium'))
# site.addsitedir(path.join(getcwd(), 'tor-browser-selenium'))
from tbselenium.tbdriver import TorBrowserDriver
with TorBrowserDriver('~/.tb-stable/tor-browser_en-US/') as driver... |
e525a819724f149186b5b156520afe2549e5902a | UliEngineering/Electronics/Power.py | UliEngineering/Electronics/Power.py | #!/usr/bin/env python3
"""
Utilities to compute the power of a device
"""
from UliEngineering.EngineerIO import normalize_numeric
from UliEngineering.Units import Unit
import numpy as np
__all__ = ["current_by_power", "power_by_current_and_voltage"]
def current_by_power(power="25 W", voltage="230 V") -> Unit("A"):
... | #!/usr/bin/env python3
"""
Utilities to compute the power of a device
"""
from UliEngineering.EngineerIO import normalize_numeric
from UliEngineering.Units import Unit
__all__ = ["current_by_power", "power_by_current_and_voltage"]
def current_by_power(power="25 W", voltage="230 V") -> Unit("A"):
"""
Given a d... | Remove unused numpy input (codacy) | Remove unused numpy input (codacy)
| Python | apache-2.0 | ulikoehler/UliEngineering | #!/usr/bin/env python3
"""
Utilities to compute the power of a device
"""
from UliEngineering.EngineerIO import normalize_numeric
from UliEngineering.Units import Unit
import numpy as np
__all__ = ["current_by_power", "power_by_current_and_voltage"]
def current_by_power(power="25 W", voltage="230 V") -> Unit("A"):
... | #!/usr/bin/env python3
"""
Utilities to compute the power of a device
"""
from UliEngineering.EngineerIO import normalize_numeric
from UliEngineering.Units import Unit
__all__ = ["current_by_power", "power_by_current_and_voltage"]
def current_by_power(power="25 W", voltage="230 V") -> Unit("A"):
"""
Given a d... | <commit_before>#!/usr/bin/env python3
"""
Utilities to compute the power of a device
"""
from UliEngineering.EngineerIO import normalize_numeric
from UliEngineering.Units import Unit
import numpy as np
__all__ = ["current_by_power", "power_by_current_and_voltage"]
def current_by_power(power="25 W", voltage="230 V") -... | #!/usr/bin/env python3
"""
Utilities to compute the power of a device
"""
from UliEngineering.EngineerIO import normalize_numeric
from UliEngineering.Units import Unit
__all__ = ["current_by_power", "power_by_current_and_voltage"]
def current_by_power(power="25 W", voltage="230 V") -> Unit("A"):
"""
Given a d... | #!/usr/bin/env python3
"""
Utilities to compute the power of a device
"""
from UliEngineering.EngineerIO import normalize_numeric
from UliEngineering.Units import Unit
import numpy as np
__all__ = ["current_by_power", "power_by_current_and_voltage"]
def current_by_power(power="25 W", voltage="230 V") -> Unit("A"):
... | <commit_before>#!/usr/bin/env python3
"""
Utilities to compute the power of a device
"""
from UliEngineering.EngineerIO import normalize_numeric
from UliEngineering.Units import Unit
import numpy as np
__all__ = ["current_by_power", "power_by_current_and_voltage"]
def current_by_power(power="25 W", voltage="230 V") -... |
79f7d8052333fcace914fa27ea2deb5f0d7cdbfc | readers/models.py | readers/models.py | from django.contrib.auth.models import User
from django.core.urlresolvers import reverse
from django.db import models
from model_utils.models import TimeStampedModel
class Reader(TimeStampedModel):
IBOOKS = 'iBooks'
KINDLE = 'Kindle'
TYPES = (
(IBOOKS, IBOOKS),
(KINDLE, KINDLE),
)
... | from django.contrib.auth.models import User
from django.core.urlresolvers import reverse
from django.db import models
from model_utils.models import TimeStampedModel
class Reader(TimeStampedModel):
IBOOKS = 'iBooks'
KINDLE = 'Kindle'
TYPES = (
(IBOOKS, 'iBooks (.epub, .pdf)'),
(KINDLE, 'K... | Make what reader can handle what clearer | Make what reader can handle what clearer
| Python | mit | phildini/bockus,phildini/bockus,phildini/bockus | from django.contrib.auth.models import User
from django.core.urlresolvers import reverse
from django.db import models
from model_utils.models import TimeStampedModel
class Reader(TimeStampedModel):
IBOOKS = 'iBooks'
KINDLE = 'Kindle'
TYPES = (
(IBOOKS, IBOOKS),
(KINDLE, KINDLE),
)
... | from django.contrib.auth.models import User
from django.core.urlresolvers import reverse
from django.db import models
from model_utils.models import TimeStampedModel
class Reader(TimeStampedModel):
IBOOKS = 'iBooks'
KINDLE = 'Kindle'
TYPES = (
(IBOOKS, 'iBooks (.epub, .pdf)'),
(KINDLE, 'K... | <commit_before>from django.contrib.auth.models import User
from django.core.urlresolvers import reverse
from django.db import models
from model_utils.models import TimeStampedModel
class Reader(TimeStampedModel):
IBOOKS = 'iBooks'
KINDLE = 'Kindle'
TYPES = (
(IBOOKS, IBOOKS),
(KINDLE, KIN... | from django.contrib.auth.models import User
from django.core.urlresolvers import reverse
from django.db import models
from model_utils.models import TimeStampedModel
class Reader(TimeStampedModel):
IBOOKS = 'iBooks'
KINDLE = 'Kindle'
TYPES = (
(IBOOKS, 'iBooks (.epub, .pdf)'),
(KINDLE, 'K... | from django.contrib.auth.models import User
from django.core.urlresolvers import reverse
from django.db import models
from model_utils.models import TimeStampedModel
class Reader(TimeStampedModel):
IBOOKS = 'iBooks'
KINDLE = 'Kindle'
TYPES = (
(IBOOKS, IBOOKS),
(KINDLE, KINDLE),
)
... | <commit_before>from django.contrib.auth.models import User
from django.core.urlresolvers import reverse
from django.db import models
from model_utils.models import TimeStampedModel
class Reader(TimeStampedModel):
IBOOKS = 'iBooks'
KINDLE = 'Kindle'
TYPES = (
(IBOOKS, IBOOKS),
(KINDLE, KIN... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.