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
b4120ec570624ae4c66269ae2a8f916ec55734e9
ipywidgets/widgets/valuewidget.py
ipywidgets/widgets/valuewidget.py
# Copyright (c) Jupyter Development Team. # Distributed under the terms of the Modified BSD License. """Contains the ValueWidget class""" from .widget import Widget class ValueWidget(Widget): """Widget that can be used for the input of an interactive function""" def get_interact_value(self): """Ret...
# Copyright (c) Jupyter Development Team. # Distributed under the terms of the Modified BSD License. """Contains the ValueWidget class""" from .widget import Widget from traitlets import Any class ValueWidget(Widget): """Widget that can be used for the input of an interactive function""" value = Any(help="...
Add a value trait to Value widgets.
Add a value trait to Value widgets.
Python
bsd-3-clause
ipython/ipywidgets,jupyter-widgets/ipywidgets,jupyter-widgets/ipywidgets,jupyter-widgets/ipywidgets,jupyter-widgets/ipywidgets,ipython/ipywidgets,SylvainCorlay/ipywidgets,SylvainCorlay/ipywidgets,ipython/ipywidgets,ipython/ipywidgets,SylvainCorlay/ipywidgets,SylvainCorlay/ipywidgets,ipython/ipywidgets
# Copyright (c) Jupyter Development Team. # Distributed under the terms of the Modified BSD License. """Contains the ValueWidget class""" from .widget import Widget class ValueWidget(Widget): """Widget that can be used for the input of an interactive function""" def get_interact_value(self): """Ret...
# Copyright (c) Jupyter Development Team. # Distributed under the terms of the Modified BSD License. """Contains the ValueWidget class""" from .widget import Widget from traitlets import Any class ValueWidget(Widget): """Widget that can be used for the input of an interactive function""" value = Any(help="...
<commit_before># Copyright (c) Jupyter Development Team. # Distributed under the terms of the Modified BSD License. """Contains the ValueWidget class""" from .widget import Widget class ValueWidget(Widget): """Widget that can be used for the input of an interactive function""" def get_interact_value(self):...
# Copyright (c) Jupyter Development Team. # Distributed under the terms of the Modified BSD License. """Contains the ValueWidget class""" from .widget import Widget from traitlets import Any class ValueWidget(Widget): """Widget that can be used for the input of an interactive function""" value = Any(help="...
# Copyright (c) Jupyter Development Team. # Distributed under the terms of the Modified BSD License. """Contains the ValueWidget class""" from .widget import Widget class ValueWidget(Widget): """Widget that can be used for the input of an interactive function""" def get_interact_value(self): """Ret...
<commit_before># Copyright (c) Jupyter Development Team. # Distributed under the terms of the Modified BSD License. """Contains the ValueWidget class""" from .widget import Widget class ValueWidget(Widget): """Widget that can be used for the input of an interactive function""" def get_interact_value(self):...
7dbe03fcbbbf57ec9380eb9a1c24b5fd9f6594e2
zinnia/tests/utils.py
zinnia/tests/utils.py
"""Utils for Zinnia's tests""" import cStringIO from xmlrpclib import Transport from django.test.client import Client class TestTransport(Transport): """Handles connections to XML-RPC server through Django test client.""" def __init__(self, *args, **kwargs): Transport.__init__(self, *args, **kwa...
"""Utils for Zinnia's tests""" import StringIO from xmlrpclib import Transport from django.test.client import Client class TestTransport(Transport): """Handles connections to XML-RPC server through Django test client.""" def __init__(self, *args, **kwargs): Transport.__init__(self, *args, **kwar...
Fix tests on Python2.7 xmlrpclib.Transport.parse_response calls 'getheader' on its response input
Fix tests on Python2.7 xmlrpclib.Transport.parse_response calls 'getheader' on its response input
Python
bsd-3-clause
1844144/django-blog-zinnia,petecummings/django-blog-zinnia,jfdsmit/django-blog-zinnia,Maplecroft/django-blog-zinnia,marctc/django-blog-zinnia,Zopieux/django-blog-zinnia,1844144/django-blog-zinnia,petecummings/django-blog-zinnia,bywbilly/django-blog-zinnia,Zopieux/django-blog-zinnia,bywbilly/django-blog-zinnia,extertion...
"""Utils for Zinnia's tests""" import cStringIO from xmlrpclib import Transport from django.test.client import Client class TestTransport(Transport): """Handles connections to XML-RPC server through Django test client.""" def __init__(self, *args, **kwargs): Transport.__init__(self, *args, **kwa...
"""Utils for Zinnia's tests""" import StringIO from xmlrpclib import Transport from django.test.client import Client class TestTransport(Transport): """Handles connections to XML-RPC server through Django test client.""" def __init__(self, *args, **kwargs): Transport.__init__(self, *args, **kwar...
<commit_before>"""Utils for Zinnia's tests""" import cStringIO from xmlrpclib import Transport from django.test.client import Client class TestTransport(Transport): """Handles connections to XML-RPC server through Django test client.""" def __init__(self, *args, **kwargs): Transport.__init__(sel...
"""Utils for Zinnia's tests""" import StringIO from xmlrpclib import Transport from django.test.client import Client class TestTransport(Transport): """Handles connections to XML-RPC server through Django test client.""" def __init__(self, *args, **kwargs): Transport.__init__(self, *args, **kwar...
"""Utils for Zinnia's tests""" import cStringIO from xmlrpclib import Transport from django.test.client import Client class TestTransport(Transport): """Handles connections to XML-RPC server through Django test client.""" def __init__(self, *args, **kwargs): Transport.__init__(self, *args, **kwa...
<commit_before>"""Utils for Zinnia's tests""" import cStringIO from xmlrpclib import Transport from django.test.client import Client class TestTransport(Transport): """Handles connections to XML-RPC server through Django test client.""" def __init__(self, *args, **kwargs): Transport.__init__(sel...
1ecc81d47cb8a9b07e5b37f382f1145c5232359d
docs/conf.py
docs/conf.py
# -*- coding: utf-8 -*- from __future__ import absolute_import, unicode_literals from sphinx_celery import conf globals().update(conf.build_config( 'amqp', __file__, project='py-amqp', description='Python Promises', version_dev='2.0', version_stable='1.4', canonical_url='https://amqp.readthedo...
# -*- coding: utf-8 -*- from __future__ import absolute_import, unicode_literals from sphinx_celery import conf globals().update(conf.build_config( 'amqp', __file__, project='py-amqp', description='Python Promises', version_dev='2.1', version_stable='2.0', canonical_url='https://amqp.readthedo...
Set stable version to 2.x
Docs: Set stable version to 2.x
Python
lgpl-2.1
smurfix/aio-py-amqp,smurfix/aio-py-amqp
# -*- coding: utf-8 -*- from __future__ import absolute_import, unicode_literals from sphinx_celery import conf globals().update(conf.build_config( 'amqp', __file__, project='py-amqp', description='Python Promises', version_dev='2.0', version_stable='1.4', canonical_url='https://amqp.readthedo...
# -*- coding: utf-8 -*- from __future__ import absolute_import, unicode_literals from sphinx_celery import conf globals().update(conf.build_config( 'amqp', __file__, project='py-amqp', description='Python Promises', version_dev='2.1', version_stable='2.0', canonical_url='https://amqp.readthedo...
<commit_before># -*- coding: utf-8 -*- from __future__ import absolute_import, unicode_literals from sphinx_celery import conf globals().update(conf.build_config( 'amqp', __file__, project='py-amqp', description='Python Promises', version_dev='2.0', version_stable='1.4', canonical_url='https:/...
# -*- coding: utf-8 -*- from __future__ import absolute_import, unicode_literals from sphinx_celery import conf globals().update(conf.build_config( 'amqp', __file__, project='py-amqp', description='Python Promises', version_dev='2.1', version_stable='2.0', canonical_url='https://amqp.readthedo...
# -*- coding: utf-8 -*- from __future__ import absolute_import, unicode_literals from sphinx_celery import conf globals().update(conf.build_config( 'amqp', __file__, project='py-amqp', description='Python Promises', version_dev='2.0', version_stable='1.4', canonical_url='https://amqp.readthedo...
<commit_before># -*- coding: utf-8 -*- from __future__ import absolute_import, unicode_literals from sphinx_celery import conf globals().update(conf.build_config( 'amqp', __file__, project='py-amqp', description='Python Promises', version_dev='2.0', version_stable='1.4', canonical_url='https:/...
2355b13c180bfb065cf5826f5e1e48079822da16
dimod/package_info.py
dimod/package_info.py
__version__ = '1.0.0.dev4' __author__ = 'D-Wave Systems Inc.' __authoremail__ = '[email protected]' __description__ = 'A shared API for binary quadratic model samplers.'
__version__ = '1.0.0.dev5' __author__ = 'D-Wave Systems Inc.' __authoremail__ = '[email protected]' __description__ = 'A shared API for binary quadratic model samplers.'
Update version 1.0.0.dev4 -> 1.0.0.dev5
Update version 1.0.0.dev4 -> 1.0.0.dev5
Python
apache-2.0
oneklc/dimod,oneklc/dimod
__version__ = '1.0.0.dev4' __author__ = 'D-Wave Systems Inc.' __authoremail__ = '[email protected]' __description__ = 'A shared API for binary quadratic model samplers.' Update version 1.0.0.dev4 -> 1.0.0.dev5
__version__ = '1.0.0.dev5' __author__ = 'D-Wave Systems Inc.' __authoremail__ = '[email protected]' __description__ = 'A shared API for binary quadratic model samplers.'
<commit_before>__version__ = '1.0.0.dev4' __author__ = 'D-Wave Systems Inc.' __authoremail__ = '[email protected]' __description__ = 'A shared API for binary quadratic model samplers.' <commit_msg>Update version 1.0.0.dev4 -> 1.0.0.dev5<commit_after>
__version__ = '1.0.0.dev5' __author__ = 'D-Wave Systems Inc.' __authoremail__ = '[email protected]' __description__ = 'A shared API for binary quadratic model samplers.'
__version__ = '1.0.0.dev4' __author__ = 'D-Wave Systems Inc.' __authoremail__ = '[email protected]' __description__ = 'A shared API for binary quadratic model samplers.' Update version 1.0.0.dev4 -> 1.0.0.dev5__version__ = '1.0.0.dev5' __author__ = 'D-Wave Systems Inc.' __authoremail__ = '[email protected]' _...
<commit_before>__version__ = '1.0.0.dev4' __author__ = 'D-Wave Systems Inc.' __authoremail__ = '[email protected]' __description__ = 'A shared API for binary quadratic model samplers.' <commit_msg>Update version 1.0.0.dev4 -> 1.0.0.dev5<commit_after>__version__ = '1.0.0.dev5' __author__ = 'D-Wave Systems Inc.' __a...
fa89ac95954502c14105857dfbb8dece271408e0
fiesta/fiesta.py
fiesta/fiesta.py
import base64, json, urllib2 api_client_id = "To3-IKknn36qAAAA" api_client_secret = "46d028xWl8zXGa3GCOYJMeXlr5pUebCNZcz3SCJj" basic_auth = base64.b64encode("%s:%s" % (api_client_id, api_client_secret)) def _create_and_send_request(uri, api_inputs): request = urllib2.Request(uri) request.add_header("Authoriza...
import base64, json, urllib2 api_client_id = "" api_client_secret = "" basic_auth = base64.b64encode("%s:%s" % (api_client_id, api_client_secret)) def _create_and_send_request(uri, api_inputs): request = urllib2.Request(uri) request.add_header("Authorization", "Basic %s" % (basic_auth)) request.add_header...
Remove accidental commit of credentials
Remove accidental commit of credentials
Python
apache-2.0
fiesta/fiesta-python
import base64, json, urllib2 api_client_id = "To3-IKknn36qAAAA" api_client_secret = "46d028xWl8zXGa3GCOYJMeXlr5pUebCNZcz3SCJj" basic_auth = base64.b64encode("%s:%s" % (api_client_id, api_client_secret)) def _create_and_send_request(uri, api_inputs): request = urllib2.Request(uri) request.add_header("Authoriza...
import base64, json, urllib2 api_client_id = "" api_client_secret = "" basic_auth = base64.b64encode("%s:%s" % (api_client_id, api_client_secret)) def _create_and_send_request(uri, api_inputs): request = urllib2.Request(uri) request.add_header("Authorization", "Basic %s" % (basic_auth)) request.add_header...
<commit_before>import base64, json, urllib2 api_client_id = "To3-IKknn36qAAAA" api_client_secret = "46d028xWl8zXGa3GCOYJMeXlr5pUebCNZcz3SCJj" basic_auth = base64.b64encode("%s:%s" % (api_client_id, api_client_secret)) def _create_and_send_request(uri, api_inputs): request = urllib2.Request(uri) request.add_he...
import base64, json, urllib2 api_client_id = "" api_client_secret = "" basic_auth = base64.b64encode("%s:%s" % (api_client_id, api_client_secret)) def _create_and_send_request(uri, api_inputs): request = urllib2.Request(uri) request.add_header("Authorization", "Basic %s" % (basic_auth)) request.add_header...
import base64, json, urllib2 api_client_id = "To3-IKknn36qAAAA" api_client_secret = "46d028xWl8zXGa3GCOYJMeXlr5pUebCNZcz3SCJj" basic_auth = base64.b64encode("%s:%s" % (api_client_id, api_client_secret)) def _create_and_send_request(uri, api_inputs): request = urllib2.Request(uri) request.add_header("Authoriza...
<commit_before>import base64, json, urllib2 api_client_id = "To3-IKknn36qAAAA" api_client_secret = "46d028xWl8zXGa3GCOYJMeXlr5pUebCNZcz3SCJj" basic_auth = base64.b64encode("%s:%s" % (api_client_id, api_client_secret)) def _create_and_send_request(uri, api_inputs): request = urllib2.Request(uri) request.add_he...
a98f1291df2a9d7a232e96f6b65369c03b5f8e12
dmoj/executors/ZIG.py
dmoj/executors/ZIG.py
from dmoj.executors.compiled_executor import CompiledExecutor class Executor(CompiledExecutor): ext = 'zig' name = 'ZIG' command = 'zig' test_program = ''' const std = @import("std"); pub fn main() !void { const io = std.io; const stdin = std.io.getStdIn().inStream(); const stdout = std.i...
from dmoj.executors.compiled_executor import CompiledExecutor class Executor(CompiledExecutor): ext = 'zig' name = 'ZIG' command = 'zig' test_program = ''' const std = @import("std"); pub fn main() !void { const io = std.io; const stdin = std.io.getStdIn().inStream(); const stdout = std.i...
Move Zig source normalization to `create_files`
Move Zig source normalization to `create_files` This actually works, even if I don't know why.
Python
agpl-3.0
DMOJ/judge,DMOJ/judge,DMOJ/judge
from dmoj.executors.compiled_executor import CompiledExecutor class Executor(CompiledExecutor): ext = 'zig' name = 'ZIG' command = 'zig' test_program = ''' const std = @import("std"); pub fn main() !void { const io = std.io; const stdin = std.io.getStdIn().inStream(); const stdout = std.i...
from dmoj.executors.compiled_executor import CompiledExecutor class Executor(CompiledExecutor): ext = 'zig' name = 'ZIG' command = 'zig' test_program = ''' const std = @import("std"); pub fn main() !void { const io = std.io; const stdin = std.io.getStdIn().inStream(); const stdout = std.i...
<commit_before>from dmoj.executors.compiled_executor import CompiledExecutor class Executor(CompiledExecutor): ext = 'zig' name = 'ZIG' command = 'zig' test_program = ''' const std = @import("std"); pub fn main() !void { const io = std.io; const stdin = std.io.getStdIn().inStream(); const...
from dmoj.executors.compiled_executor import CompiledExecutor class Executor(CompiledExecutor): ext = 'zig' name = 'ZIG' command = 'zig' test_program = ''' const std = @import("std"); pub fn main() !void { const io = std.io; const stdin = std.io.getStdIn().inStream(); const stdout = std.i...
from dmoj.executors.compiled_executor import CompiledExecutor class Executor(CompiledExecutor): ext = 'zig' name = 'ZIG' command = 'zig' test_program = ''' const std = @import("std"); pub fn main() !void { const io = std.io; const stdin = std.io.getStdIn().inStream(); const stdout = std.i...
<commit_before>from dmoj.executors.compiled_executor import CompiledExecutor class Executor(CompiledExecutor): ext = 'zig' name = 'ZIG' command = 'zig' test_program = ''' const std = @import("std"); pub fn main() !void { const io = std.io; const stdin = std.io.getStdIn().inStream(); const...
a426a460555e17d6969444f6dea2ef4e131d6eaf
iatidataquality/registry.py
iatidataquality/registry.py
# IATI Data Quality, tools for Data QA on IATI-formatted publications # by Mark Brough, Martin Keegan, Ben Webb and Jennifer Smith # # Copyright (C) 2013 Publish What You Fund # # This programme is free software; you may redistribute and/or modify # it under the terms of the GNU Affero General Public License v3...
# IATI Data Quality, tools for Data QA on IATI-formatted publications # by Mark Brough, Martin Keegan, Ben Webb and Jennifer Smith # # Copyright (C) 2013 Publish What You Fund # # This programme is free software; you may redistribute and/or modify # it under the terms of the GNU Affero General Public License v3...
Add URL for checking for deleted packages
Add URL for checking for deleted packages
Python
agpl-3.0
pwyf/IATI-Data-Quality,pwyf/IATI-Data-Quality,pwyf/IATI-Data-Quality,pwyf/IATI-Data-Quality
# IATI Data Quality, tools for Data QA on IATI-formatted publications # by Mark Brough, Martin Keegan, Ben Webb and Jennifer Smith # # Copyright (C) 2013 Publish What You Fund # # This programme is free software; you may redistribute and/or modify # it under the terms of the GNU Affero General Public License v3...
# IATI Data Quality, tools for Data QA on IATI-formatted publications # by Mark Brough, Martin Keegan, Ben Webb and Jennifer Smith # # Copyright (C) 2013 Publish What You Fund # # This programme is free software; you may redistribute and/or modify # it under the terms of the GNU Affero General Public License v3...
<commit_before> # IATI Data Quality, tools for Data QA on IATI-formatted publications # by Mark Brough, Martin Keegan, Ben Webb and Jennifer Smith # # Copyright (C) 2013 Publish What You Fund # # This programme is free software; you may redistribute and/or modify # it under the terms of the GNU Affero General Pu...
# IATI Data Quality, tools for Data QA on IATI-formatted publications # by Mark Brough, Martin Keegan, Ben Webb and Jennifer Smith # # Copyright (C) 2013 Publish What You Fund # # This programme is free software; you may redistribute and/or modify # it under the terms of the GNU Affero General Public License v3...
# IATI Data Quality, tools for Data QA on IATI-formatted publications # by Mark Brough, Martin Keegan, Ben Webb and Jennifer Smith # # Copyright (C) 2013 Publish What You Fund # # This programme is free software; you may redistribute and/or modify # it under the terms of the GNU Affero General Public License v3...
<commit_before> # IATI Data Quality, tools for Data QA on IATI-formatted publications # by Mark Brough, Martin Keegan, Ben Webb and Jennifer Smith # # Copyright (C) 2013 Publish What You Fund # # This programme is free software; you may redistribute and/or modify # it under the terms of the GNU Affero General Pu...
9109d7d148abd8764b750becced3487f6d9ea8fc
rpcdaemon/lib/pidfile.py
rpcdaemon/lib/pidfile.py
import os class PIDFile(): def __init__(self, path): if not path: raise IOError('File not found. Please specify PID file path.') self.path = path def __enter__(self): if not os.path.exists(self.path): # Create it with open(self.path, 'w') as pidfil...
import os class PIDFile(): def __init__(self, path): if not path: raise IOError('File not found. Please specify PID file path.') self.path = path def __enter__(self): if not os.path.exists(self.path): # Create it with open(self.path, 'w') as pidfil...
Fix change in args between versions of python-daemon
Fix change in args between versions of python-daemon Newer version call __exit__ with exception data, old versions merely call __exit__().
Python
apache-2.0
Apsu/rpcdaemon
import os class PIDFile(): def __init__(self, path): if not path: raise IOError('File not found. Please specify PID file path.') self.path = path def __enter__(self): if not os.path.exists(self.path): # Create it with open(self.path, 'w') as pidfil...
import os class PIDFile(): def __init__(self, path): if not path: raise IOError('File not found. Please specify PID file path.') self.path = path def __enter__(self): if not os.path.exists(self.path): # Create it with open(self.path, 'w') as pidfil...
<commit_before>import os class PIDFile(): def __init__(self, path): if not path: raise IOError('File not found. Please specify PID file path.') self.path = path def __enter__(self): if not os.path.exists(self.path): # Create it with open(self.path,...
import os class PIDFile(): def __init__(self, path): if not path: raise IOError('File not found. Please specify PID file path.') self.path = path def __enter__(self): if not os.path.exists(self.path): # Create it with open(self.path, 'w') as pidfil...
import os class PIDFile(): def __init__(self, path): if not path: raise IOError('File not found. Please specify PID file path.') self.path = path def __enter__(self): if not os.path.exists(self.path): # Create it with open(self.path, 'w') as pidfil...
<commit_before>import os class PIDFile(): def __init__(self, path): if not path: raise IOError('File not found. Please specify PID file path.') self.path = path def __enter__(self): if not os.path.exists(self.path): # Create it with open(self.path,...
3ec6dda43e617ddf6ad6b755cbcf2e93d5ff0983
feebb/preprocessor.py
feebb/preprocessor.py
import json class Preprocessor: def __init__(self): self.reset() def reset(self): self.number_elements = 0 self.length_elements = [] self.E_elements = [] self.I_elements = [] self.loads = [] self.supports = [] def load_json(self, infile): s...
import json class Preprocessor: def __init__(self): self.reset() def __str__(self): return json.dumps(self.__dict__, indent=2, separators=(',', ': ')) def reset(self): self.number_elements = 0 self.length_elements = [] self.E_elements = [] self.I_elements ...
Add __str__ to Preprocessor class
Add __str__ to Preprocessor class
Python
mit
rbn920/feebb
import json class Preprocessor: def __init__(self): self.reset() def reset(self): self.number_elements = 0 self.length_elements = [] self.E_elements = [] self.I_elements = [] self.loads = [] self.supports = [] def load_json(self, infile): s...
import json class Preprocessor: def __init__(self): self.reset() def __str__(self): return json.dumps(self.__dict__, indent=2, separators=(',', ': ')) def reset(self): self.number_elements = 0 self.length_elements = [] self.E_elements = [] self.I_elements ...
<commit_before>import json class Preprocessor: def __init__(self): self.reset() def reset(self): self.number_elements = 0 self.length_elements = [] self.E_elements = [] self.I_elements = [] self.loads = [] self.supports = [] def load_json(self, inf...
import json class Preprocessor: def __init__(self): self.reset() def __str__(self): return json.dumps(self.__dict__, indent=2, separators=(',', ': ')) def reset(self): self.number_elements = 0 self.length_elements = [] self.E_elements = [] self.I_elements ...
import json class Preprocessor: def __init__(self): self.reset() def reset(self): self.number_elements = 0 self.length_elements = [] self.E_elements = [] self.I_elements = [] self.loads = [] self.supports = [] def load_json(self, infile): s...
<commit_before>import json class Preprocessor: def __init__(self): self.reset() def reset(self): self.number_elements = 0 self.length_elements = [] self.E_elements = [] self.I_elements = [] self.loads = [] self.supports = [] def load_json(self, inf...
2409dfabbd53aaa9e21d8b93485cff0dd2db308c
wooey/migrations/0012_wooeyjob_uuid.py
wooey/migrations/0012_wooeyjob_uuid.py
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations import uuid, os def gen_uuid(apps, schema_editor): WooeyJob = apps.get_model('wooey', 'WooeyJob') for obj in WooeyJob.objects.all(): obj.uuid = uuid.uuid4() obj.save() class Migration(mig...
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations import uuid, os def gen_uuid(apps, schema_editor): WooeyJob = apps.get_model('wooey', 'WooeyJob') for obj in WooeyJob.objects.all(): obj.uuid = uuid.uuid4() obj.save() class Migration(mig...
Remove migrations.RunPython.noop from reverse for Django<1.8
Remove migrations.RunPython.noop from reverse for Django<1.8
Python
bsd-3-clause
waytai/Wooey,wooey/Wooey,alexkolar/Wooey,wooey/Wooey,hottwaj/Wooey,wooey/Wooey,hottwaj/Wooey,wooey/Wooey,waytai/Wooey,hottwaj/Wooey,alexkolar/Wooey,waytai/Wooey,alexkolar/Wooey
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations import uuid, os def gen_uuid(apps, schema_editor): WooeyJob = apps.get_model('wooey', 'WooeyJob') for obj in WooeyJob.objects.all(): obj.uuid = uuid.uuid4() obj.save() class Migration(mig...
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations import uuid, os def gen_uuid(apps, schema_editor): WooeyJob = apps.get_model('wooey', 'WooeyJob') for obj in WooeyJob.objects.all(): obj.uuid = uuid.uuid4() obj.save() class Migration(mig...
<commit_before># -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations import uuid, os def gen_uuid(apps, schema_editor): WooeyJob = apps.get_model('wooey', 'WooeyJob') for obj in WooeyJob.objects.all(): obj.uuid = uuid.uuid4() obj.save() clas...
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations import uuid, os def gen_uuid(apps, schema_editor): WooeyJob = apps.get_model('wooey', 'WooeyJob') for obj in WooeyJob.objects.all(): obj.uuid = uuid.uuid4() obj.save() class Migration(mig...
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations import uuid, os def gen_uuid(apps, schema_editor): WooeyJob = apps.get_model('wooey', 'WooeyJob') for obj in WooeyJob.objects.all(): obj.uuid = uuid.uuid4() obj.save() class Migration(mig...
<commit_before># -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations import uuid, os def gen_uuid(apps, schema_editor): WooeyJob = apps.get_model('wooey', 'WooeyJob') for obj in WooeyJob.objects.all(): obj.uuid = uuid.uuid4() obj.save() clas...
8182b0b053d45252c7800aa1bf1f750fdfa7f876
examples/jumbo_fields.py
examples/jumbo_fields.py
from __future__ import print_function import time from simpleflow import ( activity, Workflow, futures, ) @activity.with_attributes(task_list='quickstart', version='example') def repeat50k(s): return s * 50000 @activity.with_attributes(task_list='quickstart', version='example') def length(x): ...
from __future__ import print_function import os from simpleflow import Workflow, activity @activity.with_attributes(task_list='quickstart', version='example') def repeat50k(s): return s * 50000 @activity.with_attributes(task_list='quickstart', version='example') def length(x): return len(x) class JumboF...
Make JumboFieldsWorkflow fail if no env var
Make JumboFieldsWorkflow fail if no env var If SIMPLEFLOW_JUMBO_FIELDS_BUCKET is not set, the example doesn't work; make this clear. Signed-off-by: Yves Bastide <[email protected]>
Python
mit
botify-labs/simpleflow,botify-labs/simpleflow
from __future__ import print_function import time from simpleflow import ( activity, Workflow, futures, ) @activity.with_attributes(task_list='quickstart', version='example') def repeat50k(s): return s * 50000 @activity.with_attributes(task_list='quickstart', version='example') def length(x): ...
from __future__ import print_function import os from simpleflow import Workflow, activity @activity.with_attributes(task_list='quickstart', version='example') def repeat50k(s): return s * 50000 @activity.with_attributes(task_list='quickstart', version='example') def length(x): return len(x) class JumboF...
<commit_before>from __future__ import print_function import time from simpleflow import ( activity, Workflow, futures, ) @activity.with_attributes(task_list='quickstart', version='example') def repeat50k(s): return s * 50000 @activity.with_attributes(task_list='quickstart', version='example') def ...
from __future__ import print_function import os from simpleflow import Workflow, activity @activity.with_attributes(task_list='quickstart', version='example') def repeat50k(s): return s * 50000 @activity.with_attributes(task_list='quickstart', version='example') def length(x): return len(x) class JumboF...
from __future__ import print_function import time from simpleflow import ( activity, Workflow, futures, ) @activity.with_attributes(task_list='quickstart', version='example') def repeat50k(s): return s * 50000 @activity.with_attributes(task_list='quickstart', version='example') def length(x): ...
<commit_before>from __future__ import print_function import time from simpleflow import ( activity, Workflow, futures, ) @activity.with_attributes(task_list='quickstart', version='example') def repeat50k(s): return s * 50000 @activity.with_attributes(task_list='quickstart', version='example') def ...
09bf3b9883096e7a433508a6d6e03efad2a137df
httpavail.py
httpavail.py
import sys, requests, argparse from retrying import retry argparser = argparse.ArgumentParser(formatter_class=argparse.ArgumentDefaultsHelpFormatter) argparser.add_argument('url') argparser.add_argument('-t', '--timeout', type=int, default=120, help='total timeout in seconds to wait for the url to be available') argpa...
import sys, requests, argparse from retrying import retry argparser = argparse.ArgumentParser(formatter_class=argparse.ArgumentDefaultsHelpFormatter) argparser.add_argument('url') argparser.add_argument('-t', '--timeout', type=int, default=120, help='total timeout in seconds to wait for the url to be available') argpa...
Make the expected HTTP status code configurable
Make the expected HTTP status code configurable
Python
mit
ulich/docker-httpavail
import sys, requests, argparse from retrying import retry argparser = argparse.ArgumentParser(formatter_class=argparse.ArgumentDefaultsHelpFormatter) argparser.add_argument('url') argparser.add_argument('-t', '--timeout', type=int, default=120, help='total timeout in seconds to wait for the url to be available') argpa...
import sys, requests, argparse from retrying import retry argparser = argparse.ArgumentParser(formatter_class=argparse.ArgumentDefaultsHelpFormatter) argparser.add_argument('url') argparser.add_argument('-t', '--timeout', type=int, default=120, help='total timeout in seconds to wait for the url to be available') argpa...
<commit_before>import sys, requests, argparse from retrying import retry argparser = argparse.ArgumentParser(formatter_class=argparse.ArgumentDefaultsHelpFormatter) argparser.add_argument('url') argparser.add_argument('-t', '--timeout', type=int, default=120, help='total timeout in seconds to wait for the url to be av...
import sys, requests, argparse from retrying import retry argparser = argparse.ArgumentParser(formatter_class=argparse.ArgumentDefaultsHelpFormatter) argparser.add_argument('url') argparser.add_argument('-t', '--timeout', type=int, default=120, help='total timeout in seconds to wait for the url to be available') argpa...
import sys, requests, argparse from retrying import retry argparser = argparse.ArgumentParser(formatter_class=argparse.ArgumentDefaultsHelpFormatter) argparser.add_argument('url') argparser.add_argument('-t', '--timeout', type=int, default=120, help='total timeout in seconds to wait for the url to be available') argpa...
<commit_before>import sys, requests, argparse from retrying import retry argparser = argparse.ArgumentParser(formatter_class=argparse.ArgumentDefaultsHelpFormatter) argparser.add_argument('url') argparser.add_argument('-t', '--timeout', type=int, default=120, help='total timeout in seconds to wait for the url to be av...
12edf5a5d77f96986a12105f922fabea83032bad
tests/scratchtest2.py
tests/scratchtest2.py
#!/usr/bin/env python import sys sys.path.append("../zvm") from zmemory import ZMemory from zlexer import ZLexer story = file("../stories/zork.z1").read() mem = ZMemory(story) lexer = ZLexer(mem) print "This story is z version", mem.version print "Standard dictionary:" print " word separators are", lexer._separ...
#!/usr/bin/env python import sys sys.path.append("../zvm") from zmemory import ZMemory from zlexer import ZLexer story = file("../stories/zork.z1").read() mem = ZMemory(story) lexer = ZLexer(mem) print "This story is z version", mem.version print "Standard dictionary:" print " word separators are", lexer._separ...
Revert r67, which was not the changeset intended for commit.
Revert r67, which was not the changeset intended for commit.
Python
bsd-3-clause
BGCX262/zvm-hg-to-git,BGCX262/zvm-hg-to-git
#!/usr/bin/env python import sys sys.path.append("../zvm") from zmemory import ZMemory from zlexer import ZLexer story = file("../stories/zork.z1").read() mem = ZMemory(story) lexer = ZLexer(mem) print "This story is z version", mem.version print "Standard dictionary:" print " word separators are", lexer._separ...
#!/usr/bin/env python import sys sys.path.append("../zvm") from zmemory import ZMemory from zlexer import ZLexer story = file("../stories/zork.z1").read() mem = ZMemory(story) lexer = ZLexer(mem) print "This story is z version", mem.version print "Standard dictionary:" print " word separators are", lexer._separ...
<commit_before>#!/usr/bin/env python import sys sys.path.append("../zvm") from zmemory import ZMemory from zlexer import ZLexer story = file("../stories/zork.z1").read() mem = ZMemory(story) lexer = ZLexer(mem) print "This story is z version", mem.version print "Standard dictionary:" print " word separators are...
#!/usr/bin/env python import sys sys.path.append("../zvm") from zmemory import ZMemory from zlexer import ZLexer story = file("../stories/zork.z1").read() mem = ZMemory(story) lexer = ZLexer(mem) print "This story is z version", mem.version print "Standard dictionary:" print " word separators are", lexer._separ...
#!/usr/bin/env python import sys sys.path.append("../zvm") from zmemory import ZMemory from zlexer import ZLexer story = file("../stories/zork.z1").read() mem = ZMemory(story) lexer = ZLexer(mem) print "This story is z version", mem.version print "Standard dictionary:" print " word separators are", lexer._separ...
<commit_before>#!/usr/bin/env python import sys sys.path.append("../zvm") from zmemory import ZMemory from zlexer import ZLexer story = file("../stories/zork.z1").read() mem = ZMemory(story) lexer = ZLexer(mem) print "This story is z version", mem.version print "Standard dictionary:" print " word separators are...
316d3b783d4ca9e1551add910440f20de27d0dff
redgreen.py
redgreen.py
#!/usr/bin/env python import pygame import random screen_width = 640 screen_height = 480 screen = None ready_text = None def start(): global screen, ready_text pygame.init() screen = pygame.display.set_mode( ( screen_width, screen_height ) ) font = pygame.font.Font( None, screen_height / 5 ) rea...
#!/usr/bin/env python import pygame import random screen_width = 640 screen_height = 480 screen = None ready_text = None def start(): global screen, ready_text, ready_text_pos pygame.init() screen = pygame.display.set_mode( ( screen_width, screen_height ) ) font = pygame.font.Font( None, screen_heig...
Make ready screen explicitly black, and shape screen white
Make ready screen explicitly black, and shape screen white
Python
mit
andybalaam/redgreen
#!/usr/bin/env python import pygame import random screen_width = 640 screen_height = 480 screen = None ready_text = None def start(): global screen, ready_text pygame.init() screen = pygame.display.set_mode( ( screen_width, screen_height ) ) font = pygame.font.Font( None, screen_height / 5 ) rea...
#!/usr/bin/env python import pygame import random screen_width = 640 screen_height = 480 screen = None ready_text = None def start(): global screen, ready_text, ready_text_pos pygame.init() screen = pygame.display.set_mode( ( screen_width, screen_height ) ) font = pygame.font.Font( None, screen_heig...
<commit_before>#!/usr/bin/env python import pygame import random screen_width = 640 screen_height = 480 screen = None ready_text = None def start(): global screen, ready_text pygame.init() screen = pygame.display.set_mode( ( screen_width, screen_height ) ) font = pygame.font.Font( None, screen_heigh...
#!/usr/bin/env python import pygame import random screen_width = 640 screen_height = 480 screen = None ready_text = None def start(): global screen, ready_text, ready_text_pos pygame.init() screen = pygame.display.set_mode( ( screen_width, screen_height ) ) font = pygame.font.Font( None, screen_heig...
#!/usr/bin/env python import pygame import random screen_width = 640 screen_height = 480 screen = None ready_text = None def start(): global screen, ready_text pygame.init() screen = pygame.display.set_mode( ( screen_width, screen_height ) ) font = pygame.font.Font( None, screen_height / 5 ) rea...
<commit_before>#!/usr/bin/env python import pygame import random screen_width = 640 screen_height = 480 screen = None ready_text = None def start(): global screen, ready_text pygame.init() screen = pygame.display.set_mode( ( screen_width, screen_height ) ) font = pygame.font.Font( None, screen_heigh...
44426207ba65ba6c56c1092b0313f508c59d6b1f
core/exceptions.py
core/exceptions.py
import sublime from ..common import util MYPY = False if MYPY: from typing import Sequence class GitSavvyError(Exception): def __init__(self, msg, *args, cmd=None, stdout="", stderr="", **kwargs): # type: (str, object, Sequence[str], str, str, object) -> None super(GitSavvyError, self).__ini...
import sublime from ..common import util MYPY = False if MYPY: from typing import Sequence class GitSavvyError(Exception): def __init__(self, msg, *args, cmd=None, stdout="", stderr="", **kwargs): # type: (str, object, Sequence[str], str, str, object) -> None super(GitSavvyError, self).__ini...
Remove unused `show_status` feature of `GitSavvyError`
Remove unused `show_status` feature of `GitSavvyError`
Python
mit
divmain/GitSavvy,divmain/GitSavvy,divmain/GitSavvy
import sublime from ..common import util MYPY = False if MYPY: from typing import Sequence class GitSavvyError(Exception): def __init__(self, msg, *args, cmd=None, stdout="", stderr="", **kwargs): # type: (str, object, Sequence[str], str, str, object) -> None super(GitSavvyError, self).__ini...
import sublime from ..common import util MYPY = False if MYPY: from typing import Sequence class GitSavvyError(Exception): def __init__(self, msg, *args, cmd=None, stdout="", stderr="", **kwargs): # type: (str, object, Sequence[str], str, str, object) -> None super(GitSavvyError, self).__ini...
<commit_before>import sublime from ..common import util MYPY = False if MYPY: from typing import Sequence class GitSavvyError(Exception): def __init__(self, msg, *args, cmd=None, stdout="", stderr="", **kwargs): # type: (str, object, Sequence[str], str, str, object) -> None super(GitSavvyErr...
import sublime from ..common import util MYPY = False if MYPY: from typing import Sequence class GitSavvyError(Exception): def __init__(self, msg, *args, cmd=None, stdout="", stderr="", **kwargs): # type: (str, object, Sequence[str], str, str, object) -> None super(GitSavvyError, self).__ini...
import sublime from ..common import util MYPY = False if MYPY: from typing import Sequence class GitSavvyError(Exception): def __init__(self, msg, *args, cmd=None, stdout="", stderr="", **kwargs): # type: (str, object, Sequence[str], str, str, object) -> None super(GitSavvyError, self).__ini...
<commit_before>import sublime from ..common import util MYPY = False if MYPY: from typing import Sequence class GitSavvyError(Exception): def __init__(self, msg, *args, cmd=None, stdout="", stderr="", **kwargs): # type: (str, object, Sequence[str], str, str, object) -> None super(GitSavvyErr...
7c518085d0e1901f12f251069c6b4b90595664b4
flocker/node/agents/functional/test_cinder.py
flocker/node/agents/functional/test_cinder.py
# Copyright Hybrid Logic Ltd. See LICENSE file for details. """ Functional tests for ``flocker.node.agents.cinder`` using a real OpenStack cluster. """ # A helper to check the environment for username and API key # Create an authenticated cinder API instance # Supply that to make_iblockdeviceapi_tests from uuid imp...
# Copyright Hybrid Logic Ltd. See LICENSE file for details. """ Functional tests for ``flocker.node.agents.cinder`` using a real OpenStack cluster. """ # A helper to check the environment for username and API key # Create an authenticated cinder API instance # Supply that to make_iblockdeviceapi_tests from uuid imp...
Use tidy client for cinderblockapi tests too.
Use tidy client for cinderblockapi tests too.
Python
apache-2.0
jml/flocker,lukemarsden/flocker,agonzalezro/flocker,runcom/flocker,runcom/flocker,w4ngyi/flocker,runcom/flocker,Azulinho/flocker,w4ngyi/flocker,lukemarsden/flocker,AndyHuu/flocker,LaynePeng/flocker,jml/flocker,1d4Nf6/flocker,adamtheturtle/flocker,moypray/flocker,mbrukman/flocker,jml/flocker,Azulinho/flocker,Azulinho/fl...
# Copyright Hybrid Logic Ltd. See LICENSE file for details. """ Functional tests for ``flocker.node.agents.cinder`` using a real OpenStack cluster. """ # A helper to check the environment for username and API key # Create an authenticated cinder API instance # Supply that to make_iblockdeviceapi_tests from uuid imp...
# Copyright Hybrid Logic Ltd. See LICENSE file for details. """ Functional tests for ``flocker.node.agents.cinder`` using a real OpenStack cluster. """ # A helper to check the environment for username and API key # Create an authenticated cinder API instance # Supply that to make_iblockdeviceapi_tests from uuid imp...
<commit_before># Copyright Hybrid Logic Ltd. See LICENSE file for details. """ Functional tests for ``flocker.node.agents.cinder`` using a real OpenStack cluster. """ # A helper to check the environment for username and API key # Create an authenticated cinder API instance # Supply that to make_iblockdeviceapi_tests...
# Copyright Hybrid Logic Ltd. See LICENSE file for details. """ Functional tests for ``flocker.node.agents.cinder`` using a real OpenStack cluster. """ # A helper to check the environment for username and API key # Create an authenticated cinder API instance # Supply that to make_iblockdeviceapi_tests from uuid imp...
# Copyright Hybrid Logic Ltd. See LICENSE file for details. """ Functional tests for ``flocker.node.agents.cinder`` using a real OpenStack cluster. """ # A helper to check the environment for username and API key # Create an authenticated cinder API instance # Supply that to make_iblockdeviceapi_tests from uuid imp...
<commit_before># Copyright Hybrid Logic Ltd. See LICENSE file for details. """ Functional tests for ``flocker.node.agents.cinder`` using a real OpenStack cluster. """ # A helper to check the environment for username and API key # Create an authenticated cinder API instance # Supply that to make_iblockdeviceapi_tests...
8e2cfa2845b6fadba1914246ed2169741164aa32
mastertickets/db_default.py
mastertickets/db_default.py
# Created by Noah Kantrowitz on 2007-07-04. # Copyright (c) 2007 Noah Kantrowitz. All rights reserved. from trac.db import Table, Column name = 'mastertickets' version = 2 tables = [ Table('mastertickets', key=('source','dest'))[ Column('source', type='integer'), Column('dest', type='integer'), ...
# Created by Noah Kantrowitz on 2007-07-04. # Copyright (c) 2007 Noah Kantrowitz. All rights reserved. from trac.db import Table, Column name = 'mastertickets' version = 2 tables = [ Table('mastertickets', key=('source','dest'))[ Column('source', type='integer'), Column('dest', type='integer'), ...
Fix the migration to actual work.
Fix the migration to actual work.
Python
bsd-3-clause
thmo/trac-mastertickets,pombredanne/trac-mastertickets,pombredanne/trac-mastertickets,thmo/trac-mastertickets
# Created by Noah Kantrowitz on 2007-07-04. # Copyright (c) 2007 Noah Kantrowitz. All rights reserved. from trac.db import Table, Column name = 'mastertickets' version = 2 tables = [ Table('mastertickets', key=('source','dest'))[ Column('source', type='integer'), Column('dest', type='integer'), ...
# Created by Noah Kantrowitz on 2007-07-04. # Copyright (c) 2007 Noah Kantrowitz. All rights reserved. from trac.db import Table, Column name = 'mastertickets' version = 2 tables = [ Table('mastertickets', key=('source','dest'))[ Column('source', type='integer'), Column('dest', type='integer'), ...
<commit_before># Created by Noah Kantrowitz on 2007-07-04. # Copyright (c) 2007 Noah Kantrowitz. All rights reserved. from trac.db import Table, Column name = 'mastertickets' version = 2 tables = [ Table('mastertickets', key=('source','dest'))[ Column('source', type='integer'), Column('dest', type...
# Created by Noah Kantrowitz on 2007-07-04. # Copyright (c) 2007 Noah Kantrowitz. All rights reserved. from trac.db import Table, Column name = 'mastertickets' version = 2 tables = [ Table('mastertickets', key=('source','dest'))[ Column('source', type='integer'), Column('dest', type='integer'), ...
# Created by Noah Kantrowitz on 2007-07-04. # Copyright (c) 2007 Noah Kantrowitz. All rights reserved. from trac.db import Table, Column name = 'mastertickets' version = 2 tables = [ Table('mastertickets', key=('source','dest'))[ Column('source', type='integer'), Column('dest', type='integer'), ...
<commit_before># Created by Noah Kantrowitz on 2007-07-04. # Copyright (c) 2007 Noah Kantrowitz. All rights reserved. from trac.db import Table, Column name = 'mastertickets' version = 2 tables = [ Table('mastertickets', key=('source','dest'))[ Column('source', type='integer'), Column('dest', type...
369efdb0074ec29259e519b5d3974d55a17af56d
test_groupelo.py
test_groupelo.py
import groupelo def test_win_expectancy(): assert groupelo.win_expectancy(1500, 1500) == 0.5 assert groupelo.win_expectancy(1501, 1499) > 0.5 assert groupelo.win_expectancy(1550, 1450) > 0.6 assert groupelo.win_expectancy(1600, 1400) > 0.7 assert groupelo.win_expectancy(1700, 1300) > 0.9 assert...
# Run this with py.test or nose import groupelo def test_win_expectancy(): assert groupelo.win_expectancy(1500, 1500) == 0.5 assert groupelo.win_expectancy(1501, 1499) > 0.5 assert groupelo.win_expectancy(1550, 1450) > 0.6 assert groupelo.win_expectancy(1600, 1400) > 0.7 assert groupelo.win_expect...
Add a comment explaining how to run this unit test.
Add a comment explaining how to run this unit test.
Python
mit
dripton/groupelo
import groupelo def test_win_expectancy(): assert groupelo.win_expectancy(1500, 1500) == 0.5 assert groupelo.win_expectancy(1501, 1499) > 0.5 assert groupelo.win_expectancy(1550, 1450) > 0.6 assert groupelo.win_expectancy(1600, 1400) > 0.7 assert groupelo.win_expectancy(1700, 1300) > 0.9 assert...
# Run this with py.test or nose import groupelo def test_win_expectancy(): assert groupelo.win_expectancy(1500, 1500) == 0.5 assert groupelo.win_expectancy(1501, 1499) > 0.5 assert groupelo.win_expectancy(1550, 1450) > 0.6 assert groupelo.win_expectancy(1600, 1400) > 0.7 assert groupelo.win_expect...
<commit_before>import groupelo def test_win_expectancy(): assert groupelo.win_expectancy(1500, 1500) == 0.5 assert groupelo.win_expectancy(1501, 1499) > 0.5 assert groupelo.win_expectancy(1550, 1450) > 0.6 assert groupelo.win_expectancy(1600, 1400) > 0.7 assert groupelo.win_expectancy(1700, 1300) >...
# Run this with py.test or nose import groupelo def test_win_expectancy(): assert groupelo.win_expectancy(1500, 1500) == 0.5 assert groupelo.win_expectancy(1501, 1499) > 0.5 assert groupelo.win_expectancy(1550, 1450) > 0.6 assert groupelo.win_expectancy(1600, 1400) > 0.7 assert groupelo.win_expect...
import groupelo def test_win_expectancy(): assert groupelo.win_expectancy(1500, 1500) == 0.5 assert groupelo.win_expectancy(1501, 1499) > 0.5 assert groupelo.win_expectancy(1550, 1450) > 0.6 assert groupelo.win_expectancy(1600, 1400) > 0.7 assert groupelo.win_expectancy(1700, 1300) > 0.9 assert...
<commit_before>import groupelo def test_win_expectancy(): assert groupelo.win_expectancy(1500, 1500) == 0.5 assert groupelo.win_expectancy(1501, 1499) > 0.5 assert groupelo.win_expectancy(1550, 1450) > 0.6 assert groupelo.win_expectancy(1600, 1400) > 0.7 assert groupelo.win_expectancy(1700, 1300) >...
dca0598633350dfda2450552760ffbc774e63cb8
myfedora/lib/app_globals.py
myfedora/lib/app_globals.py
"""The application's Globals object""" from tg import config from shove import Shove from feedcache.cache import Cache from app_factory import AppFactoryDict class Globals(object): """Globals acts as a container for objects available throughout the life of the application """ def __init__(self): ...
"""The application's Globals object""" from tg import config from app_factory import AppFactoryDict class Globals(object): """Globals acts as a container for objects available throughout the life of the application """ def __init__(self): """One instance of Globals is created during applicati...
Remove the feed cache and storage from the globals. This lives in moksha.
Remove the feed cache and storage from the globals. This lives in moksha.
Python
agpl-3.0
fedora-infra/fedora-packages,fedora-infra/fedora-packages,Fale/fedora-packages,Fale/fedora-packages,fedora-infra/fedora-packages,Fale/fedora-packages,fedora-infra/fedora-packages
"""The application's Globals object""" from tg import config from shove import Shove from feedcache.cache import Cache from app_factory import AppFactoryDict class Globals(object): """Globals acts as a container for objects available throughout the life of the application """ def __init__(self): ...
"""The application's Globals object""" from tg import config from app_factory import AppFactoryDict class Globals(object): """Globals acts as a container for objects available throughout the life of the application """ def __init__(self): """One instance of Globals is created during applicati...
<commit_before>"""The application's Globals object""" from tg import config from shove import Shove from feedcache.cache import Cache from app_factory import AppFactoryDict class Globals(object): """Globals acts as a container for objects available throughout the life of the application """ def __ini...
"""The application's Globals object""" from tg import config from app_factory import AppFactoryDict class Globals(object): """Globals acts as a container for objects available throughout the life of the application """ def __init__(self): """One instance of Globals is created during applicati...
"""The application's Globals object""" from tg import config from shove import Shove from feedcache.cache import Cache from app_factory import AppFactoryDict class Globals(object): """Globals acts as a container for objects available throughout the life of the application """ def __init__(self): ...
<commit_before>"""The application's Globals object""" from tg import config from shove import Shove from feedcache.cache import Cache from app_factory import AppFactoryDict class Globals(object): """Globals acts as a container for objects available throughout the life of the application """ def __ini...
a52345306a1561496e2630fa12d938af84ff3f7d
management/commands/import_unit_data.py
management/commands/import_unit_data.py
# -*- encoding: UTF-8 -*- # # Copyright 2015 # # STIC-Investigación - Universidad de La Laguna (ULL) <[email protected]> # # This file is part of CVN. # # CVN is free software: you can redistribute it and/or modify it under # the terms of the GNU Affero General Public License as published by # the ...
# -*- encoding: UTF-8 -*- # # Copyright 2015 # # STIC-Investigación - Universidad de La Laguna (ULL) <[email protected]> # # This file is part of CVN. # # CVN is free software: you can redistribute it and/or modify it under # the terms of the GNU Affero General Public License as published by # the ...
Delete Report models before reloading them
Delete Report models before reloading them
Python
agpl-3.0
tic-ull/portal-del-investigador-cvn,tic-ull/portal-del-investigador-cvn
# -*- encoding: UTF-8 -*- # # Copyright 2015 # # STIC-Investigación - Universidad de La Laguna (ULL) <[email protected]> # # This file is part of CVN. # # CVN is free software: you can redistribute it and/or modify it under # the terms of the GNU Affero General Public License as published by # the ...
# -*- encoding: UTF-8 -*- # # Copyright 2015 # # STIC-Investigación - Universidad de La Laguna (ULL) <[email protected]> # # This file is part of CVN. # # CVN is free software: you can redistribute it and/or modify it under # the terms of the GNU Affero General Public License as published by # the ...
<commit_before># -*- encoding: UTF-8 -*- # # Copyright 2015 # # STIC-Investigación - Universidad de La Laguna (ULL) <[email protected]> # # This file is part of CVN. # # CVN is free software: you can redistribute it and/or modify it under # the terms of the GNU Affero General Public License as publish...
# -*- encoding: UTF-8 -*- # # Copyright 2015 # # STIC-Investigación - Universidad de La Laguna (ULL) <[email protected]> # # This file is part of CVN. # # CVN is free software: you can redistribute it and/or modify it under # the terms of the GNU Affero General Public License as published by # the ...
# -*- encoding: UTF-8 -*- # # Copyright 2015 # # STIC-Investigación - Universidad de La Laguna (ULL) <[email protected]> # # This file is part of CVN. # # CVN is free software: you can redistribute it and/or modify it under # the terms of the GNU Affero General Public License as published by # the ...
<commit_before># -*- encoding: UTF-8 -*- # # Copyright 2015 # # STIC-Investigación - Universidad de La Laguna (ULL) <[email protected]> # # This file is part of CVN. # # CVN is free software: you can redistribute it and/or modify it under # the terms of the GNU Affero General Public License as publish...
3ab27c7ff2161d0ce4ccc7f2ffef8e4b5b745911
feder/cases/autocomplete_light_registry.py
feder/cases/autocomplete_light_registry.py
import autocomplete_light from models import Case class CaseAutocomplete(autocomplete_light.AutocompleteModelBase): search_fields = ['name'] def choices_for_request(self, *args, **kwargs): qs = super(CaseAutocomplete, self).choices_for_request(*args, **kwargs) return qs.only('id', 'name') aut...
import autocomplete_light from .models import Case class CaseAutocomplete(autocomplete_light.AutocompleteModelBase): search_fields = ['name'] def choices_for_request(self, *args, **kwargs): qs = super(CaseAutocomplete, self).choices_for_request(*args, **kwargs) return qs.only('id', 'name') au...
Fix typo in cases autocomplete
Fix typo in cases autocomplete
Python
mit
watchdogpolska/feder,watchdogpolska/feder,watchdogpolska/feder,watchdogpolska/feder
import autocomplete_light from models import Case class CaseAutocomplete(autocomplete_light.AutocompleteModelBase): search_fields = ['name'] def choices_for_request(self, *args, **kwargs): qs = super(CaseAutocomplete, self).choices_for_request(*args, **kwargs) return qs.only('id', 'name') aut...
import autocomplete_light from .models import Case class CaseAutocomplete(autocomplete_light.AutocompleteModelBase): search_fields = ['name'] def choices_for_request(self, *args, **kwargs): qs = super(CaseAutocomplete, self).choices_for_request(*args, **kwargs) return qs.only('id', 'name') au...
<commit_before>import autocomplete_light from models import Case class CaseAutocomplete(autocomplete_light.AutocompleteModelBase): search_fields = ['name'] def choices_for_request(self, *args, **kwargs): qs = super(CaseAutocomplete, self).choices_for_request(*args, **kwargs) return qs.only('i...
import autocomplete_light from .models import Case class CaseAutocomplete(autocomplete_light.AutocompleteModelBase): search_fields = ['name'] def choices_for_request(self, *args, **kwargs): qs = super(CaseAutocomplete, self).choices_for_request(*args, **kwargs) return qs.only('id', 'name') au...
import autocomplete_light from models import Case class CaseAutocomplete(autocomplete_light.AutocompleteModelBase): search_fields = ['name'] def choices_for_request(self, *args, **kwargs): qs = super(CaseAutocomplete, self).choices_for_request(*args, **kwargs) return qs.only('id', 'name') aut...
<commit_before>import autocomplete_light from models import Case class CaseAutocomplete(autocomplete_light.AutocompleteModelBase): search_fields = ['name'] def choices_for_request(self, *args, **kwargs): qs = super(CaseAutocomplete, self).choices_for_request(*args, **kwargs) return qs.only('i...
a5d1879ce858618179258cca6eaed3ff087a8f42
vulndb/tests/test_proper_data_installation.py
vulndb/tests/test_proper_data_installation.py
import subprocess import unittest class TestDataIsInstalled(unittest.TestCase): TEST_CMD = "python -c 'from vulndb import DBVuln; DBVuln.from_id(123)'" def test_data_is_installed_in_virtualenv(self): # When we run this in the current CMD it will load the python class # and db files from this ...
import subprocess import unittest class TestDataIsInstalled(unittest.TestCase): TEST_CMD = "python -c 'from vulndb import DBVuln; DBVuln.from_id(1)'" def test_data_is_installed_in_virtualenv(self): # When we run this in the current CMD it will load the python class # and db files from this di...
Test with an existing id
Test with an existing id
Python
bsd-3-clause
vulndb/python-sdk,vulndb/python-sdk,LocutusOfBorg/python-sdk
import subprocess import unittest class TestDataIsInstalled(unittest.TestCase): TEST_CMD = "python -c 'from vulndb import DBVuln; DBVuln.from_id(123)'" def test_data_is_installed_in_virtualenv(self): # When we run this in the current CMD it will load the python class # and db files from this ...
import subprocess import unittest class TestDataIsInstalled(unittest.TestCase): TEST_CMD = "python -c 'from vulndb import DBVuln; DBVuln.from_id(1)'" def test_data_is_installed_in_virtualenv(self): # When we run this in the current CMD it will load the python class # and db files from this di...
<commit_before>import subprocess import unittest class TestDataIsInstalled(unittest.TestCase): TEST_CMD = "python -c 'from vulndb import DBVuln; DBVuln.from_id(123)'" def test_data_is_installed_in_virtualenv(self): # When we run this in the current CMD it will load the python class # and db f...
import subprocess import unittest class TestDataIsInstalled(unittest.TestCase): TEST_CMD = "python -c 'from vulndb import DBVuln; DBVuln.from_id(1)'" def test_data_is_installed_in_virtualenv(self): # When we run this in the current CMD it will load the python class # and db files from this di...
import subprocess import unittest class TestDataIsInstalled(unittest.TestCase): TEST_CMD = "python -c 'from vulndb import DBVuln; DBVuln.from_id(123)'" def test_data_is_installed_in_virtualenv(self): # When we run this in the current CMD it will load the python class # and db files from this ...
<commit_before>import subprocess import unittest class TestDataIsInstalled(unittest.TestCase): TEST_CMD = "python -c 'from vulndb import DBVuln; DBVuln.from_id(123)'" def test_data_is_installed_in_virtualenv(self): # When we run this in the current CMD it will load the python class # and db f...
54054b4e007acbb5f1389a5e2091824a4c083e91
examples/plotting/LineAnimator_examples.py
examples/plotting/LineAnimator_examples.py
""" ============= LineAnimator ============= This example shows off some ways in which you can use the LineAnimator object to animate line plots. """ import numpy as np import matplotlib.pyplot as plt from sunpy.visualization.animator import LineAnimator ##############################################################...
""" ============= LineAnimator ============= This example shows off some ways in which you can use the LineAnimator object to animate line plots. """ import numpy as np import matplotlib.pyplot as plt from sunpy.visualization.animator import LineAnimator ##############################################################...
Fix LineAnimator example to adhere to new pixel edges axis_ranges API.
Fix LineAnimator example to adhere to new pixel edges axis_ranges API.
Python
bsd-2-clause
dpshelio/sunpy,dpshelio/sunpy,dpshelio/sunpy
""" ============= LineAnimator ============= This example shows off some ways in which you can use the LineAnimator object to animate line plots. """ import numpy as np import matplotlib.pyplot as plt from sunpy.visualization.animator import LineAnimator ##############################################################...
""" ============= LineAnimator ============= This example shows off some ways in which you can use the LineAnimator object to animate line plots. """ import numpy as np import matplotlib.pyplot as plt from sunpy.visualization.animator import LineAnimator ##############################################################...
<commit_before>""" ============= LineAnimator ============= This example shows off some ways in which you can use the LineAnimator object to animate line plots. """ import numpy as np import matplotlib.pyplot as plt from sunpy.visualization.animator import LineAnimator ###############################################...
""" ============= LineAnimator ============= This example shows off some ways in which you can use the LineAnimator object to animate line plots. """ import numpy as np import matplotlib.pyplot as plt from sunpy.visualization.animator import LineAnimator ##############################################################...
""" ============= LineAnimator ============= This example shows off some ways in which you can use the LineAnimator object to animate line plots. """ import numpy as np import matplotlib.pyplot as plt from sunpy.visualization.animator import LineAnimator ##############################################################...
<commit_before>""" ============= LineAnimator ============= This example shows off some ways in which you can use the LineAnimator object to animate line plots. """ import numpy as np import matplotlib.pyplot as plt from sunpy.visualization.animator import LineAnimator ###############################################...
3ed6c303e935a78781d096ab90e77a6c1360322d
wutu/tests/modules/test_module/test_module.py
wutu/tests/modules/test_module/test_module.py
from wutu.module import Module class TestModule(Module): def __init__(self): super(TestModule, self).__init__() def ping(self): return "pong" def get(self): return {"result": "Hello"}
from wutu.module import Module class TestModule(Module): def __init__(self): super(TestModule, self).__init__() def ping(self): return "pong" def get(self, id): return {"result": id}
Make test module return dynamic value
Make test module return dynamic value
Python
mit
zaibacu/wutu,zaibacu/wutu,zaibacu/wutu
from wutu.module import Module class TestModule(Module): def __init__(self): super(TestModule, self).__init__() def ping(self): return "pong" def get(self): return {"result": "Hello"} Make test module return dynamic value
from wutu.module import Module class TestModule(Module): def __init__(self): super(TestModule, self).__init__() def ping(self): return "pong" def get(self, id): return {"result": id}
<commit_before>from wutu.module import Module class TestModule(Module): def __init__(self): super(TestModule, self).__init__() def ping(self): return "pong" def get(self): return {"result": "Hello"} <commit_msg>Make test module return dynamic value<commit_after>
from wutu.module import Module class TestModule(Module): def __init__(self): super(TestModule, self).__init__() def ping(self): return "pong" def get(self, id): return {"result": id}
from wutu.module import Module class TestModule(Module): def __init__(self): super(TestModule, self).__init__() def ping(self): return "pong" def get(self): return {"result": "Hello"} Make test module return dynamic valuefrom wutu.module import Module class TestModule(Module): ...
<commit_before>from wutu.module import Module class TestModule(Module): def __init__(self): super(TestModule, self).__init__() def ping(self): return "pong" def get(self): return {"result": "Hello"} <commit_msg>Make test module return dynamic value<commit_after>from wutu.module i...
f8a592301aa44e79e504f15e8c0b37a566c3e4cb
daybed/__init__.py
daybed/__init__.py
"""Main entry point """ import couchdb from pyramid.config import Configurator from pyramid.events import NewRequest from daybed.db import DatabaseConnection, sync_couchdb_views def add_db_to_request(event): request = event.request settings = request.registry.settings con_info = settings['db_server'][set...
"""Main entry point """ import couchdb from pyramid.config import Configurator from pyramid.events import NewRequest from daybed.db import DatabaseConnection, sync_couchdb_views def add_db_to_request(event): request = event.request settings = request.registry.settings con_info = settings['db_server'][set...
Add test at init to create couchdb database if not already exists
Add test at init to create couchdb database if not already exists
Python
bsd-3-clause
spiral-project/daybed,spiral-project/daybed
"""Main entry point """ import couchdb from pyramid.config import Configurator from pyramid.events import NewRequest from daybed.db import DatabaseConnection, sync_couchdb_views def add_db_to_request(event): request = event.request settings = request.registry.settings con_info = settings['db_server'][set...
"""Main entry point """ import couchdb from pyramid.config import Configurator from pyramid.events import NewRequest from daybed.db import DatabaseConnection, sync_couchdb_views def add_db_to_request(event): request = event.request settings = request.registry.settings con_info = settings['db_server'][set...
<commit_before>"""Main entry point """ import couchdb from pyramid.config import Configurator from pyramid.events import NewRequest from daybed.db import DatabaseConnection, sync_couchdb_views def add_db_to_request(event): request = event.request settings = request.registry.settings con_info = settings['...
"""Main entry point """ import couchdb from pyramid.config import Configurator from pyramid.events import NewRequest from daybed.db import DatabaseConnection, sync_couchdb_views def add_db_to_request(event): request = event.request settings = request.registry.settings con_info = settings['db_server'][set...
"""Main entry point """ import couchdb from pyramid.config import Configurator from pyramid.events import NewRequest from daybed.db import DatabaseConnection, sync_couchdb_views def add_db_to_request(event): request = event.request settings = request.registry.settings con_info = settings['db_server'][set...
<commit_before>"""Main entry point """ import couchdb from pyramid.config import Configurator from pyramid.events import NewRequest from daybed.db import DatabaseConnection, sync_couchdb_views def add_db_to_request(event): request = event.request settings = request.registry.settings con_info = settings['...
dfc1851f27fa3de8de11d1facccfe28ae8e90dc6
subprocrunner/_which.py
subprocrunner/_which.py
# encoding: utf-8 """ .. codeauthor:: Tsuyoshi Hombashi <[email protected]> """ from __future__ import absolute_import from __future__ import unicode_literals import shutil import warnings import six import typepy from ._error import CommandNotFoundError from ._error import InvalidCommandError class Wh...
# encoding: utf-8 """ .. codeauthor:: Tsuyoshi Hombashi <[email protected]> """ from __future__ import absolute_import from __future__ import unicode_literals import shutil import warnings import six import typepy from ._error import CommandNotFoundError from ._error import InvalidCommandError class Wh...
Replace a method call to use the latest version method
Replace a method call to use the latest version method
Python
mit
thombashi/subprocrunner,thombashi/subprocrunner
# encoding: utf-8 """ .. codeauthor:: Tsuyoshi Hombashi <[email protected]> """ from __future__ import absolute_import from __future__ import unicode_literals import shutil import warnings import six import typepy from ._error import CommandNotFoundError from ._error import InvalidCommandError class Wh...
# encoding: utf-8 """ .. codeauthor:: Tsuyoshi Hombashi <[email protected]> """ from __future__ import absolute_import from __future__ import unicode_literals import shutil import warnings import six import typepy from ._error import CommandNotFoundError from ._error import InvalidCommandError class Wh...
<commit_before># encoding: utf-8 """ .. codeauthor:: Tsuyoshi Hombashi <[email protected]> """ from __future__ import absolute_import from __future__ import unicode_literals import shutil import warnings import six import typepy from ._error import CommandNotFoundError from ._error import InvalidCommandE...
# encoding: utf-8 """ .. codeauthor:: Tsuyoshi Hombashi <[email protected]> """ from __future__ import absolute_import from __future__ import unicode_literals import shutil import warnings import six import typepy from ._error import CommandNotFoundError from ._error import InvalidCommandError class Wh...
# encoding: utf-8 """ .. codeauthor:: Tsuyoshi Hombashi <[email protected]> """ from __future__ import absolute_import from __future__ import unicode_literals import shutil import warnings import six import typepy from ._error import CommandNotFoundError from ._error import InvalidCommandError class Wh...
<commit_before># encoding: utf-8 """ .. codeauthor:: Tsuyoshi Hombashi <[email protected]> """ from __future__ import absolute_import from __future__ import unicode_literals import shutil import warnings import six import typepy from ._error import CommandNotFoundError from ._error import InvalidCommandE...
c613b59861d24a7627844114933c318423d18866
alpha_helix_generator/geometry.py
alpha_helix_generator/geometry.py
import numpy as np
import numpy as np def normalize(v): '''Normalize a vector based on its 2 norm.''' if 0 == np.linalg.norm(v): return v return v / np.linalg.norm(v) def create_frame_from_three_points(p1, p2, p3): '''Create a left-handed coordinate frame from 3 points. The p2 is the origin; the y-axis is ...
Add some basic geometric functions.
Add some basic geometric functions.
Python
bsd-3-clause
xingjiepan/ss_generator
import numpy as np Add some basic geometric functions.
import numpy as np def normalize(v): '''Normalize a vector based on its 2 norm.''' if 0 == np.linalg.norm(v): return v return v / np.linalg.norm(v) def create_frame_from_three_points(p1, p2, p3): '''Create a left-handed coordinate frame from 3 points. The p2 is the origin; the y-axis is ...
<commit_before>import numpy as np <commit_msg>Add some basic geometric functions.<commit_after>
import numpy as np def normalize(v): '''Normalize a vector based on its 2 norm.''' if 0 == np.linalg.norm(v): return v return v / np.linalg.norm(v) def create_frame_from_three_points(p1, p2, p3): '''Create a left-handed coordinate frame from 3 points. The p2 is the origin; the y-axis is ...
import numpy as np Add some basic geometric functions.import numpy as np def normalize(v): '''Normalize a vector based on its 2 norm.''' if 0 == np.linalg.norm(v): return v return v / np.linalg.norm(v) def create_frame_from_three_points(p1, p2, p3): '''Create a left-handed coordinate frame fr...
<commit_before>import numpy as np <commit_msg>Add some basic geometric functions.<commit_after>import numpy as np def normalize(v): '''Normalize a vector based on its 2 norm.''' if 0 == np.linalg.norm(v): return v return v / np.linalg.norm(v) def create_frame_from_three_points(p1, p2, p3): ''...
e3828ae72ae778461eee9b93ccc87167505f91f8
validate.py
validate.py
"""Check for inconsistancies in the database.""" from server.db import BuildingBuilder, BuildingType, load, UnitType def main(): load() for name in UnitType.resource_names(): if UnitType.count(getattr(UnitType, name) == 1): continue else: print(f'There is no unit that ...
"""Check for inconsistancies in the database.""" from server.db import ( BuildingBuilder, BuildingRecruit, BuildingType, load, UnitType ) def main(): load() for name in UnitType.resource_names(): if UnitType.count(getattr(UnitType, name) >= 1): continue else: print...
Make sure all unit types can be recruited.
Make sure all unit types can be recruited.
Python
mpl-2.0
chrisnorman7/pyrts,chrisnorman7/pyrts,chrisnorman7/pyrts
"""Check for inconsistancies in the database.""" from server.db import BuildingBuilder, BuildingType, load, UnitType def main(): load() for name in UnitType.resource_names(): if UnitType.count(getattr(UnitType, name) == 1): continue else: print(f'There is no unit that ...
"""Check for inconsistancies in the database.""" from server.db import ( BuildingBuilder, BuildingRecruit, BuildingType, load, UnitType ) def main(): load() for name in UnitType.resource_names(): if UnitType.count(getattr(UnitType, name) >= 1): continue else: print...
<commit_before>"""Check for inconsistancies in the database.""" from server.db import BuildingBuilder, BuildingType, load, UnitType def main(): load() for name in UnitType.resource_names(): if UnitType.count(getattr(UnitType, name) == 1): continue else: print(f'There i...
"""Check for inconsistancies in the database.""" from server.db import ( BuildingBuilder, BuildingRecruit, BuildingType, load, UnitType ) def main(): load() for name in UnitType.resource_names(): if UnitType.count(getattr(UnitType, name) >= 1): continue else: print...
"""Check for inconsistancies in the database.""" from server.db import BuildingBuilder, BuildingType, load, UnitType def main(): load() for name in UnitType.resource_names(): if UnitType.count(getattr(UnitType, name) == 1): continue else: print(f'There is no unit that ...
<commit_before>"""Check for inconsistancies in the database.""" from server.db import BuildingBuilder, BuildingType, load, UnitType def main(): load() for name in UnitType.resource_names(): if UnitType.count(getattr(UnitType, name) == 1): continue else: print(f'There i...
99412f8b3394abdab900755095c788604669853d
ankieta/ankieta/petition/views.py
ankieta/ankieta/petition/views.py
# from django.shortcuts import render from django.views.generic import ListView, CreateView, DetailView, TemplateView from django.core.urlresolvers import reverse from braces.views import SetHeadlineMixin from braces.views import OrderableListMixin from .models import Signature from .forms import SignatureForm class ...
# from django.shortcuts import render from django.views.generic import ListView, CreateView, DetailView, TemplateView from django.core.urlresolvers import reverse from braces.views import OrderableListMixin from .models import Signature from .forms import SignatureForm class SignatureList(OrderableListMixin, ListView...
Remove headline from create view
Remove headline from create view
Python
bsd-3-clause
watchdogpolska/prezydent.siecobywatelska.pl,watchdogpolska/prezydent.siecobywatelska.pl,watchdogpolska/prezydent.siecobywatelska.pl
# from django.shortcuts import render from django.views.generic import ListView, CreateView, DetailView, TemplateView from django.core.urlresolvers import reverse from braces.views import SetHeadlineMixin from braces.views import OrderableListMixin from .models import Signature from .forms import SignatureForm class ...
# from django.shortcuts import render from django.views.generic import ListView, CreateView, DetailView, TemplateView from django.core.urlresolvers import reverse from braces.views import OrderableListMixin from .models import Signature from .forms import SignatureForm class SignatureList(OrderableListMixin, ListView...
<commit_before># from django.shortcuts import render from django.views.generic import ListView, CreateView, DetailView, TemplateView from django.core.urlresolvers import reverse from braces.views import SetHeadlineMixin from braces.views import OrderableListMixin from .models import Signature from .forms import Signatu...
# from django.shortcuts import render from django.views.generic import ListView, CreateView, DetailView, TemplateView from django.core.urlresolvers import reverse from braces.views import OrderableListMixin from .models import Signature from .forms import SignatureForm class SignatureList(OrderableListMixin, ListView...
# from django.shortcuts import render from django.views.generic import ListView, CreateView, DetailView, TemplateView from django.core.urlresolvers import reverse from braces.views import SetHeadlineMixin from braces.views import OrderableListMixin from .models import Signature from .forms import SignatureForm class ...
<commit_before># from django.shortcuts import render from django.views.generic import ListView, CreateView, DetailView, TemplateView from django.core.urlresolvers import reverse from braces.views import SetHeadlineMixin from braces.views import OrderableListMixin from .models import Signature from .forms import Signatu...
72216757991a2120bb81e0003496eee908373b0c
keystone/common/policies/ec2_credential.py
keystone/common/policies/ec2_credential.py
# Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under t...
# Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under t...
Set the correct in-code policy for ec2 operations
Set the correct in-code policy for ec2 operations In I8bd0fa342cdfee00acd3c7a33f7232fe0a87e23f we moved some of the policy defaults into code. Some of the policy were accidentally changed. Change-Id: Ib744317025d928c7397ab00dc706172592a9abaf Closes-Bug: #1675377
Python
apache-2.0
ilay09/keystone,rajalokan/keystone,openstack/keystone,ilay09/keystone,mahak/keystone,ilay09/keystone,mahak/keystone,openstack/keystone,rajalokan/keystone,rajalokan/keystone,mahak/keystone,openstack/keystone
# Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under t...
# Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under t...
<commit_before># Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # dist...
# Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under t...
# Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under t...
<commit_before># Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # dist...
1090b8b4e17b29b69eb205ac0c7fea65f597807f
ffdnispdb/__init__.py
ffdnispdb/__init__.py
# -*- coding: utf-8 -*- from flask import Flask, g from flask.ext.babel import Babel from flask.ext.sqlalchemy import SQLAlchemy, event from .sessions import MySessionInterface app = Flask(__name__) app.config.from_object('config') babel = Babel(app) db = SQLAlchemy(app) app.session_interface = MySessionInterface(db...
# -*- coding: utf-8 -*- from flask import Flask, g from flask.ext.babel import Babel from flask.ext.sqlalchemy import SQLAlchemy, event from werkzeug.contrib.cache import NullCache from .sessions import MySessionInterface app = Flask(__name__) app.config.from_object('config') babel = Babel(app) db = SQLAlchemy(app) ...
Enable NullCache so we can start implementing cache
Enable NullCache so we can start implementing cache
Python
bsd-3-clause
Psycojoker/ffdn-db,Psycojoker/ffdn-db
# -*- coding: utf-8 -*- from flask import Flask, g from flask.ext.babel import Babel from flask.ext.sqlalchemy import SQLAlchemy, event from .sessions import MySessionInterface app = Flask(__name__) app.config.from_object('config') babel = Babel(app) db = SQLAlchemy(app) app.session_interface = MySessionInterface(db...
# -*- coding: utf-8 -*- from flask import Flask, g from flask.ext.babel import Babel from flask.ext.sqlalchemy import SQLAlchemy, event from werkzeug.contrib.cache import NullCache from .sessions import MySessionInterface app = Flask(__name__) app.config.from_object('config') babel = Babel(app) db = SQLAlchemy(app) ...
<commit_before># -*- coding: utf-8 -*- from flask import Flask, g from flask.ext.babel import Babel from flask.ext.sqlalchemy import SQLAlchemy, event from .sessions import MySessionInterface app = Flask(__name__) app.config.from_object('config') babel = Babel(app) db = SQLAlchemy(app) app.session_interface = MySess...
# -*- coding: utf-8 -*- from flask import Flask, g from flask.ext.babel import Babel from flask.ext.sqlalchemy import SQLAlchemy, event from werkzeug.contrib.cache import NullCache from .sessions import MySessionInterface app = Flask(__name__) app.config.from_object('config') babel = Babel(app) db = SQLAlchemy(app) ...
# -*- coding: utf-8 -*- from flask import Flask, g from flask.ext.babel import Babel from flask.ext.sqlalchemy import SQLAlchemy, event from .sessions import MySessionInterface app = Flask(__name__) app.config.from_object('config') babel = Babel(app) db = SQLAlchemy(app) app.session_interface = MySessionInterface(db...
<commit_before># -*- coding: utf-8 -*- from flask import Flask, g from flask.ext.babel import Babel from flask.ext.sqlalchemy import SQLAlchemy, event from .sessions import MySessionInterface app = Flask(__name__) app.config.from_object('config') babel = Babel(app) db = SQLAlchemy(app) app.session_interface = MySess...
b16d634ee9390864da8de6f8d4e7f9e546c8f772
ifs/source/jenkins.py
ifs/source/jenkins.py
version_cmd = 'java -jar /usr/share/jenkins/jenkins.war --version' version_re = '(\d\.\d{3})' depends = ['wget'] install_script = """ wget -q -O - http://pkg.jenkins-ci.org/debian/jenkins-ci.org.key | apt-key add - echo "deb http://pkg.jenkins-ci.org/debian binary/" > /etc/apt/sources.list.d/jenkins.list apt-get update...
version_cmd = 'java -jar /usr/share/jenkins/jenkins.war --version' version_re = '(\d\.\d{3})' depends = ['wget'] install_script = """ wget -q -O - http://pkg.jenkins-ci.org/debian/jenkins-ci.org.key | apt-key add - echo "deb http://pkg.jenkins-ci.org/debian binary/" > /etc/apt/sources.list.d/jenkins.list apt-get update...
Update Jenkins source to only update the Jenkins repository
Update Jenkins source to only update the Jenkins repository
Python
isc
cbednarski/ifs-python,cbednarski/ifs-python
version_cmd = 'java -jar /usr/share/jenkins/jenkins.war --version' version_re = '(\d\.\d{3})' depends = ['wget'] install_script = """ wget -q -O - http://pkg.jenkins-ci.org/debian/jenkins-ci.org.key | apt-key add - echo "deb http://pkg.jenkins-ci.org/debian binary/" > /etc/apt/sources.list.d/jenkins.list apt-get update...
version_cmd = 'java -jar /usr/share/jenkins/jenkins.war --version' version_re = '(\d\.\d{3})' depends = ['wget'] install_script = """ wget -q -O - http://pkg.jenkins-ci.org/debian/jenkins-ci.org.key | apt-key add - echo "deb http://pkg.jenkins-ci.org/debian binary/" > /etc/apt/sources.list.d/jenkins.list apt-get update...
<commit_before>version_cmd = 'java -jar /usr/share/jenkins/jenkins.war --version' version_re = '(\d\.\d{3})' depends = ['wget'] install_script = """ wget -q -O - http://pkg.jenkins-ci.org/debian/jenkins-ci.org.key | apt-key add - echo "deb http://pkg.jenkins-ci.org/debian binary/" > /etc/apt/sources.list.d/jenkins.list...
version_cmd = 'java -jar /usr/share/jenkins/jenkins.war --version' version_re = '(\d\.\d{3})' depends = ['wget'] install_script = """ wget -q -O - http://pkg.jenkins-ci.org/debian/jenkins-ci.org.key | apt-key add - echo "deb http://pkg.jenkins-ci.org/debian binary/" > /etc/apt/sources.list.d/jenkins.list apt-get update...
version_cmd = 'java -jar /usr/share/jenkins/jenkins.war --version' version_re = '(\d\.\d{3})' depends = ['wget'] install_script = """ wget -q -O - http://pkg.jenkins-ci.org/debian/jenkins-ci.org.key | apt-key add - echo "deb http://pkg.jenkins-ci.org/debian binary/" > /etc/apt/sources.list.d/jenkins.list apt-get update...
<commit_before>version_cmd = 'java -jar /usr/share/jenkins/jenkins.war --version' version_re = '(\d\.\d{3})' depends = ['wget'] install_script = """ wget -q -O - http://pkg.jenkins-ci.org/debian/jenkins-ci.org.key | apt-key add - echo "deb http://pkg.jenkins-ci.org/debian binary/" > /etc/apt/sources.list.d/jenkins.list...
77fac3732f1baae9f3c3be7b38f8837459fee163
src/markdown/makrdown.py
src/markdown/makrdown.py
from markdown import markdown from markdown.extensions.tables import TableExtension from .my_codehilite import CodeHiliteExtension from .my_fenced_code import FencedCodeExtension from .my_headerid import HeaderIdExtension def customized_markdown(text): return markdown(text, extensions=[FencedCodeExtension(), ...
import subprocess from xml.etree import ElementTree import pygments from bs4 import BeautifulSoup from pygments.formatters import get_formatter_by_name from pygments.lexers import get_lexer_by_name def customized_markdown(text): kramdown = subprocess.Popen( ["kramdown", "--input", "GFM", ...
Use kramdown for markdown convertion.
Use kramdown for markdown convertion.
Python
apache-2.0
belovrv/kotlin-web-site,meilalina/kotlin-web-site,hltj/kotlin-web-site-cn,madvirus/kotlin-web-site,hltj/kotlin-web-site-cn,hltj/kotlin-web-site-cn,JetBrains/kotlin-web-site,hltj/kotlin-web-site-cn,meilalina/kotlin-web-site,JetBrains/kotlin-web-site,JetBrains/kotlin-web-site,hltj/kotlin-web-site-cn,JetBrains/kotlin-web-...
from markdown import markdown from markdown.extensions.tables import TableExtension from .my_codehilite import CodeHiliteExtension from .my_fenced_code import FencedCodeExtension from .my_headerid import HeaderIdExtension def customized_markdown(text): return markdown(text, extensions=[FencedCodeExtension(), ...
import subprocess from xml.etree import ElementTree import pygments from bs4 import BeautifulSoup from pygments.formatters import get_formatter_by_name from pygments.lexers import get_lexer_by_name def customized_markdown(text): kramdown = subprocess.Popen( ["kramdown", "--input", "GFM", ...
<commit_before>from markdown import markdown from markdown.extensions.tables import TableExtension from .my_codehilite import CodeHiliteExtension from .my_fenced_code import FencedCodeExtension from .my_headerid import HeaderIdExtension def customized_markdown(text): return markdown(text, extensions=[FencedCodeE...
import subprocess from xml.etree import ElementTree import pygments from bs4 import BeautifulSoup from pygments.formatters import get_formatter_by_name from pygments.lexers import get_lexer_by_name def customized_markdown(text): kramdown = subprocess.Popen( ["kramdown", "--input", "GFM", ...
from markdown import markdown from markdown.extensions.tables import TableExtension from .my_codehilite import CodeHiliteExtension from .my_fenced_code import FencedCodeExtension from .my_headerid import HeaderIdExtension def customized_markdown(text): return markdown(text, extensions=[FencedCodeExtension(), ...
<commit_before>from markdown import markdown from markdown.extensions.tables import TableExtension from .my_codehilite import CodeHiliteExtension from .my_fenced_code import FencedCodeExtension from .my_headerid import HeaderIdExtension def customized_markdown(text): return markdown(text, extensions=[FencedCodeE...
ed9b7b6295f311dbbd7f66f0cbcb393ab122afec
django/__init__.py
django/__init__.py
VERSION = (1, 6, 0, 'beta', 2) def get_version(*args, **kwargs): # Don't litter django/__init__.py with all the get_version stuff. # Only import if it's actually called. from django.utils.version import get_version return get_version(*args, **kwargs)
VERSION = (1, 6, 0, 'beta', 3) def get_version(*args, **kwargs): # Don't litter django/__init__.py with all the get_version stuff. # Only import if it's actually called. from django.utils.version import get_version return get_version(*args, **kwargs)
Bump version number for 1.6 beta 3 security release.
[1.6.x] Bump version number for 1.6 beta 3 security release.
Python
bsd-3-clause
dex4er/django,django-nonrel/django,redhat-openstack/django,felixjimenez/django,redhat-openstack/django,dex4er/django,django-nonrel/django,dex4er/django,django-nonrel/django,redhat-openstack/django,redhat-openstack/django,django-nonrel/django,felixjimenez/django,felixjimenez/django,felixjimenez/django
VERSION = (1, 6, 0, 'beta', 2) def get_version(*args, **kwargs): # Don't litter django/__init__.py with all the get_version stuff. # Only import if it's actually called. from django.utils.version import get_version return get_version(*args, **kwargs) [1.6.x] Bump version number for 1.6 beta 3 security ...
VERSION = (1, 6, 0, 'beta', 3) def get_version(*args, **kwargs): # Don't litter django/__init__.py with all the get_version stuff. # Only import if it's actually called. from django.utils.version import get_version return get_version(*args, **kwargs)
<commit_before>VERSION = (1, 6, 0, 'beta', 2) def get_version(*args, **kwargs): # Don't litter django/__init__.py with all the get_version stuff. # Only import if it's actually called. from django.utils.version import get_version return get_version(*args, **kwargs) <commit_msg>[1.6.x] Bump version numb...
VERSION = (1, 6, 0, 'beta', 3) def get_version(*args, **kwargs): # Don't litter django/__init__.py with all the get_version stuff. # Only import if it's actually called. from django.utils.version import get_version return get_version(*args, **kwargs)
VERSION = (1, 6, 0, 'beta', 2) def get_version(*args, **kwargs): # Don't litter django/__init__.py with all the get_version stuff. # Only import if it's actually called. from django.utils.version import get_version return get_version(*args, **kwargs) [1.6.x] Bump version number for 1.6 beta 3 security ...
<commit_before>VERSION = (1, 6, 0, 'beta', 2) def get_version(*args, **kwargs): # Don't litter django/__init__.py with all the get_version stuff. # Only import if it's actually called. from django.utils.version import get_version return get_version(*args, **kwargs) <commit_msg>[1.6.x] Bump version numb...
58ce11d293d19247e2765176983edc5e552bdfd5
celery/loaders/__init__.py
celery/loaders/__init__.py
import os from celery.loaders.djangoapp import Loader as DjangoLoader from celery.loaders.default import Loader as DefaultLoader from django.conf import settings from django.core.management import setup_environ """ .. class:: Loader The current loader class. """ Loader = DefaultLoader if settings.configured: Loa...
import os from celery.loaders.djangoapp import Loader as DjangoLoader from celery.loaders.default import Loader as DefaultLoader from django.conf import settings from django.core.management import setup_environ """ .. class:: Loader The current loader class. """ Loader = DefaultLoader if settings.configured: Loa...
Use a django settings module, if defined, even if it wasn't already loaded by Django (for example, when using ./celeryd directly rather than the celeryd management command.
Use a django settings module, if defined, even if it wasn't already loaded by Django (for example, when using ./celeryd directly rather than the celeryd management command.
Python
bsd-3-clause
frac/celery,cbrepo/celery,cbrepo/celery,mitsuhiko/celery,ask/celery,frac/celery,ask/celery,WoLpH/celery,mitsuhiko/celery,WoLpH/celery
import os from celery.loaders.djangoapp import Loader as DjangoLoader from celery.loaders.default import Loader as DefaultLoader from django.conf import settings from django.core.management import setup_environ """ .. class:: Loader The current loader class. """ Loader = DefaultLoader if settings.configured: Loa...
import os from celery.loaders.djangoapp import Loader as DjangoLoader from celery.loaders.default import Loader as DefaultLoader from django.conf import settings from django.core.management import setup_environ """ .. class:: Loader The current loader class. """ Loader = DefaultLoader if settings.configured: Loa...
<commit_before>import os from celery.loaders.djangoapp import Loader as DjangoLoader from celery.loaders.default import Loader as DefaultLoader from django.conf import settings from django.core.management import setup_environ """ .. class:: Loader The current loader class. """ Loader = DefaultLoader if settings.conf...
import os from celery.loaders.djangoapp import Loader as DjangoLoader from celery.loaders.default import Loader as DefaultLoader from django.conf import settings from django.core.management import setup_environ """ .. class:: Loader The current loader class. """ Loader = DefaultLoader if settings.configured: Loa...
import os from celery.loaders.djangoapp import Loader as DjangoLoader from celery.loaders.default import Loader as DefaultLoader from django.conf import settings from django.core.management import setup_environ """ .. class:: Loader The current loader class. """ Loader = DefaultLoader if settings.configured: Loa...
<commit_before>import os from celery.loaders.djangoapp import Loader as DjangoLoader from celery.loaders.default import Loader as DefaultLoader from django.conf import settings from django.core.management import setup_environ """ .. class:: Loader The current loader class. """ Loader = DefaultLoader if settings.conf...
786e98f3c37e1c3bdedc424ed6eaec86e900ec83
test/test_testplugin.py
test/test_testplugin.py
"""Tests of the test-runner plugins.""" import py import unittest from nose.plugins import PluginTester from coverage.runners.noseplugin import Coverage class TestCoverage(PluginTester, unittest.TestCase): """Test the nose plugin.""" activate = '--with-coverage' # enables the plugin plugins = [Coverage()...
"""Tests of the test-runner plugins.""" import py import unittest from nose.plugins import PluginTester from coverage.runners.noseplugin import Coverage class TestCoverage(PluginTester, unittest.TestCase): """Test the nose plugin.""" activate = '--with-coverage' # enables the plugin plugins = [Coverage()...
Mark the py.test test as not to be run in nose.
Mark the py.test test as not to be run in nose.
Python
apache-2.0
jayhetee/coveragepy,nedbat/coveragepy,jayhetee/coveragepy,larsbutler/coveragepy,7WebPages/coveragepy,larsbutler/coveragepy,hugovk/coveragepy,blueyed/coveragepy,nedbat/coveragepy,7WebPages/coveragepy,hugovk/coveragepy,hugovk/coveragepy,blueyed/coveragepy,larsbutler/coveragepy,jayhetee/coveragepy,jayhetee/coveragepy,jayh...
"""Tests of the test-runner plugins.""" import py import unittest from nose.plugins import PluginTester from coverage.runners.noseplugin import Coverage class TestCoverage(PluginTester, unittest.TestCase): """Test the nose plugin.""" activate = '--with-coverage' # enables the plugin plugins = [Coverage()...
"""Tests of the test-runner plugins.""" import py import unittest from nose.plugins import PluginTester from coverage.runners.noseplugin import Coverage class TestCoverage(PluginTester, unittest.TestCase): """Test the nose plugin.""" activate = '--with-coverage' # enables the plugin plugins = [Coverage()...
<commit_before>"""Tests of the test-runner plugins.""" import py import unittest from nose.plugins import PluginTester from coverage.runners.noseplugin import Coverage class TestCoverage(PluginTester, unittest.TestCase): """Test the nose plugin.""" activate = '--with-coverage' # enables the plugin plugin...
"""Tests of the test-runner plugins.""" import py import unittest from nose.plugins import PluginTester from coverage.runners.noseplugin import Coverage class TestCoverage(PluginTester, unittest.TestCase): """Test the nose plugin.""" activate = '--with-coverage' # enables the plugin plugins = [Coverage()...
"""Tests of the test-runner plugins.""" import py import unittest from nose.plugins import PluginTester from coverage.runners.noseplugin import Coverage class TestCoverage(PluginTester, unittest.TestCase): """Test the nose plugin.""" activate = '--with-coverage' # enables the plugin plugins = [Coverage()...
<commit_before>"""Tests of the test-runner plugins.""" import py import unittest from nose.plugins import PluginTester from coverage.runners.noseplugin import Coverage class TestCoverage(PluginTester, unittest.TestCase): """Test the nose plugin.""" activate = '--with-coverage' # enables the plugin plugin...
8ce509a2a3df1fcc38442e35e8733bf00bd788ad
harvest/decorators.py
harvest/decorators.py
import os from functools import wraps from argparse import ArgumentParser from fabric.context_managers import prefix def cached_property(func): cach_attr = '_{0}'.format(func.__name__) @property def wrap(self): if not hasattr(self, cach_attr): value = func(self) if value i...
import os from functools import wraps from argparse import ArgumentParser from fabric.context_managers import prefix def cached_property(func): cach_attr = '_{0}'.format(func.__name__) @property def wrap(self): if not hasattr(self, cach_attr): value = func(self) if value i...
Return resulting object from decorated function if any
Return resulting object from decorated function if any
Python
bsd-2-clause
chop-dbhi/harvest,tjrivera/harvest
import os from functools import wraps from argparse import ArgumentParser from fabric.context_managers import prefix def cached_property(func): cach_attr = '_{0}'.format(func.__name__) @property def wrap(self): if not hasattr(self, cach_attr): value = func(self) if value i...
import os from functools import wraps from argparse import ArgumentParser from fabric.context_managers import prefix def cached_property(func): cach_attr = '_{0}'.format(func.__name__) @property def wrap(self): if not hasattr(self, cach_attr): value = func(self) if value i...
<commit_before>import os from functools import wraps from argparse import ArgumentParser from fabric.context_managers import prefix def cached_property(func): cach_attr = '_{0}'.format(func.__name__) @property def wrap(self): if not hasattr(self, cach_attr): value = func(self) ...
import os from functools import wraps from argparse import ArgumentParser from fabric.context_managers import prefix def cached_property(func): cach_attr = '_{0}'.format(func.__name__) @property def wrap(self): if not hasattr(self, cach_attr): value = func(self) if value i...
import os from functools import wraps from argparse import ArgumentParser from fabric.context_managers import prefix def cached_property(func): cach_attr = '_{0}'.format(func.__name__) @property def wrap(self): if not hasattr(self, cach_attr): value = func(self) if value i...
<commit_before>import os from functools import wraps from argparse import ArgumentParser from fabric.context_managers import prefix def cached_property(func): cach_attr = '_{0}'.format(func.__name__) @property def wrap(self): if not hasattr(self, cach_attr): value = func(self) ...
28514ecf13ee124af6fee43e032cbbfe6a2a50e0
Lib/compiler/__init__.py
Lib/compiler/__init__.py
"""Package for parsing and compiling Python source code There are several functions defined at the top level that are imported from modules contained in the package. parse(buf, mode="exec") -> AST Converts a string containing Python source code to an abstract syntax tree (AST). The AST is defined in compiler...
"""Package for parsing and compiling Python source code There are several functions defined at the top level that are imported from modules contained in the package. parse(buf, mode="exec") -> AST Converts a string containing Python source code to an abstract syntax tree (AST). The AST is defined in compiler...
Use relative imports in compiler package now that it is required. (Should this go into 2.5 or should we do compiler.XXX?)
Use relative imports in compiler package now that it is required. (Should this go into 2.5 or should we do compiler.XXX?)
Python
mit
sk-/python2.7-type-annotator,sk-/python2.7-type-annotator,sk-/python2.7-type-annotator
"""Package for parsing and compiling Python source code There are several functions defined at the top level that are imported from modules contained in the package. parse(buf, mode="exec") -> AST Converts a string containing Python source code to an abstract syntax tree (AST). The AST is defined in compiler...
"""Package for parsing and compiling Python source code There are several functions defined at the top level that are imported from modules contained in the package. parse(buf, mode="exec") -> AST Converts a string containing Python source code to an abstract syntax tree (AST). The AST is defined in compiler...
<commit_before>"""Package for parsing and compiling Python source code There are several functions defined at the top level that are imported from modules contained in the package. parse(buf, mode="exec") -> AST Converts a string containing Python source code to an abstract syntax tree (AST). The AST is defi...
"""Package for parsing and compiling Python source code There are several functions defined at the top level that are imported from modules contained in the package. parse(buf, mode="exec") -> AST Converts a string containing Python source code to an abstract syntax tree (AST). The AST is defined in compiler...
"""Package for parsing and compiling Python source code There are several functions defined at the top level that are imported from modules contained in the package. parse(buf, mode="exec") -> AST Converts a string containing Python source code to an abstract syntax tree (AST). The AST is defined in compiler...
<commit_before>"""Package for parsing and compiling Python source code There are several functions defined at the top level that are imported from modules contained in the package. parse(buf, mode="exec") -> AST Converts a string containing Python source code to an abstract syntax tree (AST). The AST is defi...
5c3c0c60dc7047be8ad9f93d7e0b140ba243099e
iatidq/test_result.py
iatidq/test_result.py
# IATI Data Quality, tools for Data QA on IATI-formatted publications # by Mark Brough, Martin Keegan, Ben Webb and Jennifer Smith # # Copyright (C) 2013 Publish What You Fund # # This programme is free software; you may redistribute and/or modify # it under the terms of the GNU Affero General Public License v3...
# IATI Data Quality, tools for Data QA on IATI-formatted publications # by Mark Brough, Martin Keegan, Ben Webb and Jennifer Smith # # Copyright (C) 2013 Publish What You Fund # # This programme is free software; you may redistribute and/or modify # it under the terms of the GNU Affero General Public License v3...
Add skipped result status; future compatibilty for non-run tests
Add skipped result status; future compatibilty for non-run tests
Python
agpl-3.0
pwyf/IATI-Data-Quality,pwyf/IATI-Data-Quality,pwyf/IATI-Data-Quality,pwyf/IATI-Data-Quality
# IATI Data Quality, tools for Data QA on IATI-formatted publications # by Mark Brough, Martin Keegan, Ben Webb and Jennifer Smith # # Copyright (C) 2013 Publish What You Fund # # This programme is free software; you may redistribute and/or modify # it under the terms of the GNU Affero General Public License v3...
# IATI Data Quality, tools for Data QA on IATI-formatted publications # by Mark Brough, Martin Keegan, Ben Webb and Jennifer Smith # # Copyright (C) 2013 Publish What You Fund # # This programme is free software; you may redistribute and/or modify # it under the terms of the GNU Affero General Public License v3...
<commit_before> # IATI Data Quality, tools for Data QA on IATI-formatted publications # by Mark Brough, Martin Keegan, Ben Webb and Jennifer Smith # # Copyright (C) 2013 Publish What You Fund # # This programme is free software; you may redistribute and/or modify # it under the terms of the GNU Affero General Pu...
# IATI Data Quality, tools for Data QA on IATI-formatted publications # by Mark Brough, Martin Keegan, Ben Webb and Jennifer Smith # # Copyright (C) 2013 Publish What You Fund # # This programme is free software; you may redistribute and/or modify # it under the terms of the GNU Affero General Public License v3...
# IATI Data Quality, tools for Data QA on IATI-formatted publications # by Mark Brough, Martin Keegan, Ben Webb and Jennifer Smith # # Copyright (C) 2013 Publish What You Fund # # This programme is free software; you may redistribute and/or modify # it under the terms of the GNU Affero General Public License v3...
<commit_before> # IATI Data Quality, tools for Data QA on IATI-formatted publications # by Mark Brough, Martin Keegan, Ben Webb and Jennifer Smith # # Copyright (C) 2013 Publish What You Fund # # This programme is free software; you may redistribute and/or modify # it under the terms of the GNU Affero General Pu...
27aad0e3ed95cb43b28eb3c02fa96b3a9b74de5b
tests/test_container.py
tests/test_container.py
# coding: utf8 from .common import * class TestContainers(TestCase): def test_unicode_filename(self): container = av.open(self.sandboxed(u'¢∞§¶•ªº.mov'), 'w')
# coding: utf8 import os import sys import unittest from .common import * # On Windows, Python 3.0 - 3.5 have issues handling unicode filenames. # Starting with Python 3.6 the situation is saner thanks to PEP 529: # # https://www.python.org/dev/peps/pep-0529/ broken_unicode = ( os.name == 'nt' and sys.versi...
Disable unicode filename test on Windows with Python 3.0 - 3.5
Disable unicode filename test on Windows with Python 3.0 - 3.5 Before PEP 529 landed in Python 3.6, unicode filename handling on Windows is hit-and-miss, so don't break CI.
Python
bsd-3-clause
PyAV-Org/PyAV,mikeboers/PyAV,PyAV-Org/PyAV,mikeboers/PyAV
# coding: utf8 from .common import * class TestContainers(TestCase): def test_unicode_filename(self): container = av.open(self.sandboxed(u'¢∞§¶•ªº.mov'), 'w') Disable unicode filename test on Windows with Python 3.0 - 3.5 Before PEP 529 landed in Python 3.6, unicode filename handling on Windows is hit...
# coding: utf8 import os import sys import unittest from .common import * # On Windows, Python 3.0 - 3.5 have issues handling unicode filenames. # Starting with Python 3.6 the situation is saner thanks to PEP 529: # # https://www.python.org/dev/peps/pep-0529/ broken_unicode = ( os.name == 'nt' and sys.versi...
<commit_before># coding: utf8 from .common import * class TestContainers(TestCase): def test_unicode_filename(self): container = av.open(self.sandboxed(u'¢∞§¶•ªº.mov'), 'w') <commit_msg>Disable unicode filename test on Windows with Python 3.0 - 3.5 Before PEP 529 landed in Python 3.6, unicode filename...
# coding: utf8 import os import sys import unittest from .common import * # On Windows, Python 3.0 - 3.5 have issues handling unicode filenames. # Starting with Python 3.6 the situation is saner thanks to PEP 529: # # https://www.python.org/dev/peps/pep-0529/ broken_unicode = ( os.name == 'nt' and sys.versi...
# coding: utf8 from .common import * class TestContainers(TestCase): def test_unicode_filename(self): container = av.open(self.sandboxed(u'¢∞§¶•ªº.mov'), 'w') Disable unicode filename test on Windows with Python 3.0 - 3.5 Before PEP 529 landed in Python 3.6, unicode filename handling on Windows is hit...
<commit_before># coding: utf8 from .common import * class TestContainers(TestCase): def test_unicode_filename(self): container = av.open(self.sandboxed(u'¢∞§¶•ªº.mov'), 'w') <commit_msg>Disable unicode filename test on Windows with Python 3.0 - 3.5 Before PEP 529 landed in Python 3.6, unicode filename...
6b83217f422b46ef9cc4ef5aa124350eee825fe1
satchless/contrib/tax/flatgroups/models.py
satchless/contrib/tax/flatgroups/models.py
from django.db import models from django.utils.translation import ugettext_lazy as _ class TaxGroup(models.Model): name = models.CharField(_("group name"), max_length=100) rate = models.DecimalField(_("rate"), max_digits=4, decimal_places=2, help_text=_("Percentile rate of the t...
from django.db import models from django.utils.translation import ugettext_lazy as _ class TaxGroup(models.Model): name = models.CharField(_("group name"), max_length=100) rate = models.DecimalField(_("rate"), max_digits=4, decimal_places=2, help_text=_("Percentile rate of the t...
Fix - TaxedProductMixin is abstract model
Fix - TaxedProductMixin is abstract model
Python
bsd-3-clause
taedori81/satchless
from django.db import models from django.utils.translation import ugettext_lazy as _ class TaxGroup(models.Model): name = models.CharField(_("group name"), max_length=100) rate = models.DecimalField(_("rate"), max_digits=4, decimal_places=2, help_text=_("Percentile rate of the t...
from django.db import models from django.utils.translation import ugettext_lazy as _ class TaxGroup(models.Model): name = models.CharField(_("group name"), max_length=100) rate = models.DecimalField(_("rate"), max_digits=4, decimal_places=2, help_text=_("Percentile rate of the t...
<commit_before>from django.db import models from django.utils.translation import ugettext_lazy as _ class TaxGroup(models.Model): name = models.CharField(_("group name"), max_length=100) rate = models.DecimalField(_("rate"), max_digits=4, decimal_places=2, help_text=_("Percentil...
from django.db import models from django.utils.translation import ugettext_lazy as _ class TaxGroup(models.Model): name = models.CharField(_("group name"), max_length=100) rate = models.DecimalField(_("rate"), max_digits=4, decimal_places=2, help_text=_("Percentile rate of the t...
from django.db import models from django.utils.translation import ugettext_lazy as _ class TaxGroup(models.Model): name = models.CharField(_("group name"), max_length=100) rate = models.DecimalField(_("rate"), max_digits=4, decimal_places=2, help_text=_("Percentile rate of the t...
<commit_before>from django.db import models from django.utils.translation import ugettext_lazy as _ class TaxGroup(models.Model): name = models.CharField(_("group name"), max_length=100) rate = models.DecimalField(_("rate"), max_digits=4, decimal_places=2, help_text=_("Percentil...
c7a002c3c0f86db931fdc0a3240ff38ffab03ff8
glanerbeard/web.py
glanerbeard/web.py
import logging from flask import ( Flask, render_template, abort ) from glanerbeard.server import Server app = Flask(__name__) app.config.from_pyfile('../settings.py') servers = Server.createFromConfig(app.config['SERVERS'], app.config['API_KEYS']) @app.route('/') def index(): shows = [server.getShows() for se...
import logging from flask import ( Flask, render_template, abort ) from glanerbeard.server import Server app = Flask(__name__) app.config.from_object('glanerbeard.default_settings') app.config.from_envvar('GLANERBEARD_SETTINGS') servers = Server.createFromConfig(app.config['SERVERS'], app.config['API_KEYS']) @...
Use the new settings loading method.
Use the new settings loading method.
Python
apache-2.0
daenney/glanerbeard
import logging from flask import ( Flask, render_template, abort ) from glanerbeard.server import Server app = Flask(__name__) app.config.from_pyfile('../settings.py') servers = Server.createFromConfig(app.config['SERVERS'], app.config['API_KEYS']) @app.route('/') def index(): shows = [server.getShows() for se...
import logging from flask import ( Flask, render_template, abort ) from glanerbeard.server import Server app = Flask(__name__) app.config.from_object('glanerbeard.default_settings') app.config.from_envvar('GLANERBEARD_SETTINGS') servers = Server.createFromConfig(app.config['SERVERS'], app.config['API_KEYS']) @...
<commit_before>import logging from flask import ( Flask, render_template, abort ) from glanerbeard.server import Server app = Flask(__name__) app.config.from_pyfile('../settings.py') servers = Server.createFromConfig(app.config['SERVERS'], app.config['API_KEYS']) @app.route('/') def index(): shows = [server.ge...
import logging from flask import ( Flask, render_template, abort ) from glanerbeard.server import Server app = Flask(__name__) app.config.from_object('glanerbeard.default_settings') app.config.from_envvar('GLANERBEARD_SETTINGS') servers = Server.createFromConfig(app.config['SERVERS'], app.config['API_KEYS']) @...
import logging from flask import ( Flask, render_template, abort ) from glanerbeard.server import Server app = Flask(__name__) app.config.from_pyfile('../settings.py') servers = Server.createFromConfig(app.config['SERVERS'], app.config['API_KEYS']) @app.route('/') def index(): shows = [server.getShows() for se...
<commit_before>import logging from flask import ( Flask, render_template, abort ) from glanerbeard.server import Server app = Flask(__name__) app.config.from_pyfile('../settings.py') servers = Server.createFromConfig(app.config['SERVERS'], app.config['API_KEYS']) @app.route('/') def index(): shows = [server.ge...
0bc7ad27ec36832f7309af476efdabd25a677328
grako/rendering.py
grako/rendering.py
# -*- coding: utf-8 -*- from __future__ import print_function, division, absolute_import, unicode_literals import itertools from .util import trim def render(item, **fields): """ Render the given item """ if item is None: return '' elif isinstance(item, Renderer): return item.render(**f...
# -*- coding: utf-8 -*- from __future__ import print_function, division, absolute_import, unicode_literals import itertools from .util import trim def render(item, **fields): """ Render the given item """ if item is None: return '' elif isinstance(item, Renderer): return item.render(**f...
Allow render_fields to override the default template.
Allow render_fields to override the default template.
Python
bsd-2-clause
vmuriart/grako,frnknglrt/grako
# -*- coding: utf-8 -*- from __future__ import print_function, division, absolute_import, unicode_literals import itertools from .util import trim def render(item, **fields): """ Render the given item """ if item is None: return '' elif isinstance(item, Renderer): return item.render(**f...
# -*- coding: utf-8 -*- from __future__ import print_function, division, absolute_import, unicode_literals import itertools from .util import trim def render(item, **fields): """ Render the given item """ if item is None: return '' elif isinstance(item, Renderer): return item.render(**f...
<commit_before># -*- coding: utf-8 -*- from __future__ import print_function, division, absolute_import, unicode_literals import itertools from .util import trim def render(item, **fields): """ Render the given item """ if item is None: return '' elif isinstance(item, Renderer): return ...
# -*- coding: utf-8 -*- from __future__ import print_function, division, absolute_import, unicode_literals import itertools from .util import trim def render(item, **fields): """ Render the given item """ if item is None: return '' elif isinstance(item, Renderer): return item.render(**f...
# -*- coding: utf-8 -*- from __future__ import print_function, division, absolute_import, unicode_literals import itertools from .util import trim def render(item, **fields): """ Render the given item """ if item is None: return '' elif isinstance(item, Renderer): return item.render(**f...
<commit_before># -*- coding: utf-8 -*- from __future__ import print_function, division, absolute_import, unicode_literals import itertools from .util import trim def render(item, **fields): """ Render the given item """ if item is None: return '' elif isinstance(item, Renderer): return ...
08b998d63808b99cf96635bd50b7d33238cda633
Recorders.py
Recorders.py
from Measurement import Measurement class Recorder(object): def __init__(self, recorderType): self.recorderType = recorderType def record(self, measure: Measurement): None class PrintRecorder(Recorder): def __init__(self, config): Recorder.__init__(self, 'file') self.form...
import os from Measurement import Measurement class Recorder(object): def __init__(self, recorderType): self.recorderType = recorderType def record(self, measure: Measurement): None class PrintRecorder(Recorder): def __init__(self, config): Recorder.__init__(self, 'file') ...
Create folder if not exist
Create folder if not exist
Python
mit
hectortosa/py-temperature-recorder
from Measurement import Measurement class Recorder(object): def __init__(self, recorderType): self.recorderType = recorderType def record(self, measure: Measurement): None class PrintRecorder(Recorder): def __init__(self, config): Recorder.__init__(self, 'file') self.form...
import os from Measurement import Measurement class Recorder(object): def __init__(self, recorderType): self.recorderType = recorderType def record(self, measure: Measurement): None class PrintRecorder(Recorder): def __init__(self, config): Recorder.__init__(self, 'file') ...
<commit_before>from Measurement import Measurement class Recorder(object): def __init__(self, recorderType): self.recorderType = recorderType def record(self, measure: Measurement): None class PrintRecorder(Recorder): def __init__(self, config): Recorder.__init__(self, 'file') ...
import os from Measurement import Measurement class Recorder(object): def __init__(self, recorderType): self.recorderType = recorderType def record(self, measure: Measurement): None class PrintRecorder(Recorder): def __init__(self, config): Recorder.__init__(self, 'file') ...
from Measurement import Measurement class Recorder(object): def __init__(self, recorderType): self.recorderType = recorderType def record(self, measure: Measurement): None class PrintRecorder(Recorder): def __init__(self, config): Recorder.__init__(self, 'file') self.form...
<commit_before>from Measurement import Measurement class Recorder(object): def __init__(self, recorderType): self.recorderType = recorderType def record(self, measure: Measurement): None class PrintRecorder(Recorder): def __init__(self, config): Recorder.__init__(self, 'file') ...
156093f3b4872d68663897b8525f4706ec5a555c
pyfr/template.py
pyfr/template.py
# -*- coding: utf-8 -*- import os import pkgutil from mako.lookup import TemplateLookup from mako.template import Template class DottedTemplateLookup(TemplateLookup): def __init__(self, pkg): self.dfltpkg = pkg def adjust_uri(self, uri, relto): return uri def get_template(self, name):...
# -*- coding: utf-8 -*- import os import pkgutil from mako.lookup import TemplateLookup from mako.template import Template class DottedTemplateLookup(TemplateLookup): def __init__(self, pkg): self.dfltpkg = pkg def adjust_uri(self, uri, relto): return uri def get_template(self, name):...
Enhance the dotted name lookup functionality.
Enhance the dotted name lookup functionality.
Python
bsd-3-clause
tjcorona/PyFR,tjcorona/PyFR,tjcorona/PyFR,BrianVermeire/PyFR,iyer-arvind/PyFR,Aerojspark/PyFR
# -*- coding: utf-8 -*- import os import pkgutil from mako.lookup import TemplateLookup from mako.template import Template class DottedTemplateLookup(TemplateLookup): def __init__(self, pkg): self.dfltpkg = pkg def adjust_uri(self, uri, relto): return uri def get_template(self, name):...
# -*- coding: utf-8 -*- import os import pkgutil from mako.lookup import TemplateLookup from mako.template import Template class DottedTemplateLookup(TemplateLookup): def __init__(self, pkg): self.dfltpkg = pkg def adjust_uri(self, uri, relto): return uri def get_template(self, name):...
<commit_before> # -*- coding: utf-8 -*- import os import pkgutil from mako.lookup import TemplateLookup from mako.template import Template class DottedTemplateLookup(TemplateLookup): def __init__(self, pkg): self.dfltpkg = pkg def adjust_uri(self, uri, relto): return uri def get_templa...
# -*- coding: utf-8 -*- import os import pkgutil from mako.lookup import TemplateLookup from mako.template import Template class DottedTemplateLookup(TemplateLookup): def __init__(self, pkg): self.dfltpkg = pkg def adjust_uri(self, uri, relto): return uri def get_template(self, name):...
# -*- coding: utf-8 -*- import os import pkgutil from mako.lookup import TemplateLookup from mako.template import Template class DottedTemplateLookup(TemplateLookup): def __init__(self, pkg): self.dfltpkg = pkg def adjust_uri(self, uri, relto): return uri def get_template(self, name):...
<commit_before> # -*- coding: utf-8 -*- import os import pkgutil from mako.lookup import TemplateLookup from mako.template import Template class DottedTemplateLookup(TemplateLookup): def __init__(self, pkg): self.dfltpkg = pkg def adjust_uri(self, uri, relto): return uri def get_templa...
1a74d34d358940175c9e5ac50a11ac3f0f40729b
app/sense.py
app/sense.py
import threading import time class SensorThread(object): def __init__(self, notify, delay=0): self.notify = notify self.delay = delay self.interval = 0.2 self.color = -1 def start(self, control, robot): self.control = control self.robot = robot thread =...
import threading import time class SensorThread(object): def __init__(self, notify, delay=0): self.notify = notify self.delay = delay self.interval = 0.2 self.color = -1 def start(self, control, robot): self.control = control self.robot = robot thread =...
Work without the Gyro sensor for retail set compatibility.
Work without the Gyro sensor for retail set compatibility.
Python
bsd-2-clause
legorovers/legoflask,legorovers/legoflask,legorovers/legoflask
import threading import time class SensorThread(object): def __init__(self, notify, delay=0): self.notify = notify self.delay = delay self.interval = 0.2 self.color = -1 def start(self, control, robot): self.control = control self.robot = robot thread =...
import threading import time class SensorThread(object): def __init__(self, notify, delay=0): self.notify = notify self.delay = delay self.interval = 0.2 self.color = -1 def start(self, control, robot): self.control = control self.robot = robot thread =...
<commit_before>import threading import time class SensorThread(object): def __init__(self, notify, delay=0): self.notify = notify self.delay = delay self.interval = 0.2 self.color = -1 def start(self, control, robot): self.control = control self.robot = robot ...
import threading import time class SensorThread(object): def __init__(self, notify, delay=0): self.notify = notify self.delay = delay self.interval = 0.2 self.color = -1 def start(self, control, robot): self.control = control self.robot = robot thread =...
import threading import time class SensorThread(object): def __init__(self, notify, delay=0): self.notify = notify self.delay = delay self.interval = 0.2 self.color = -1 def start(self, control, robot): self.control = control self.robot = robot thread =...
<commit_before>import threading import time class SensorThread(object): def __init__(self, notify, delay=0): self.notify = notify self.delay = delay self.interval = 0.2 self.color = -1 def start(self, control, robot): self.control = control self.robot = robot ...
b3cbd97738c03975f89cc0264cfd47ea44b9728e
annoycode.py
annoycode.py
# == Requires python 3.4! == # Changes Unicode symbols with other symbols that looks the same. from data import Data if __name__ == "__main__": data = Data() if not data.load() or not data.hasMatches(): print("Use trainer.py to generate data for use.") exit(-1) string = "A B C ! -" (ne...
# == Requires python 3.4! == # Changes Unicode symbols with other symbols that looks the same. from data import Data if __name__ == "__main__": data = Data() if not data.load() or not data.hasMatches(): print("Use trainer.py to generate data for use.") exit(-1) string = "ABC!-" stringE...
Print stats on in/out byte count and increase in percent.
ac: Print stats on in/out byte count and increase in percent.
Python
mit
netromdk/annoycode
# == Requires python 3.4! == # Changes Unicode symbols with other symbols that looks the same. from data import Data if __name__ == "__main__": data = Data() if not data.load() or not data.hasMatches(): print("Use trainer.py to generate data for use.") exit(-1) string = "A B C ! -" (ne...
# == Requires python 3.4! == # Changes Unicode symbols with other symbols that looks the same. from data import Data if __name__ == "__main__": data = Data() if not data.load() or not data.hasMatches(): print("Use trainer.py to generate data for use.") exit(-1) string = "ABC!-" stringE...
<commit_before># == Requires python 3.4! == # Changes Unicode symbols with other symbols that looks the same. from data import Data if __name__ == "__main__": data = Data() if not data.load() or not data.hasMatches(): print("Use trainer.py to generate data for use.") exit(-1) string = "A B...
# == Requires python 3.4! == # Changes Unicode symbols with other symbols that looks the same. from data import Data if __name__ == "__main__": data = Data() if not data.load() or not data.hasMatches(): print("Use trainer.py to generate data for use.") exit(-1) string = "ABC!-" stringE...
# == Requires python 3.4! == # Changes Unicode symbols with other symbols that looks the same. from data import Data if __name__ == "__main__": data = Data() if not data.load() or not data.hasMatches(): print("Use trainer.py to generate data for use.") exit(-1) string = "A B C ! -" (ne...
<commit_before># == Requires python 3.4! == # Changes Unicode symbols with other symbols that looks the same. from data import Data if __name__ == "__main__": data = Data() if not data.load() or not data.hasMatches(): print("Use trainer.py to generate data for use.") exit(-1) string = "A B...
b529bc715ff133147576aa9026fd281226b7f3b7
app/views.py
app/views.py
from app import app from app.models import Post from flask import render_template @app.route('/') @app.route('/page/<int:page>') def blog(page=1): """View the blog.""" posts = Post.query.filter_by_latest() if posts: pagination = posts.paginate(page=page, per_page=Post.PER_PAGE) return render_t...
from app import app from app.models import Post from flask import render_template @app.route('/') @app.route('/page/<int:page>') def blog(page=1): """View the blog.""" posts = Post.query.filter_by(visible=True) \ .order_by(Post.published.desc()) if posts: pagination = posts.p...
Fix queries and path to templates
Fix queries and path to templates
Python
mit
thebitstick/Flask-Blog,thebitstick/Flask-Blog
from app import app from app.models import Post from flask import render_template @app.route('/') @app.route('/page/<int:page>') def blog(page=1): """View the blog.""" posts = Post.query.filter_by_latest() if posts: pagination = posts.paginate(page=page, per_page=Post.PER_PAGE) return render_t...
from app import app from app.models import Post from flask import render_template @app.route('/') @app.route('/page/<int:page>') def blog(page=1): """View the blog.""" posts = Post.query.filter_by(visible=True) \ .order_by(Post.published.desc()) if posts: pagination = posts.p...
<commit_before>from app import app from app.models import Post from flask import render_template @app.route('/') @app.route('/page/<int:page>') def blog(page=1): """View the blog.""" posts = Post.query.filter_by_latest() if posts: pagination = posts.paginate(page=page, per_page=Post.PER_PAGE) ...
from app import app from app.models import Post from flask import render_template @app.route('/') @app.route('/page/<int:page>') def blog(page=1): """View the blog.""" posts = Post.query.filter_by(visible=True) \ .order_by(Post.published.desc()) if posts: pagination = posts.p...
from app import app from app.models import Post from flask import render_template @app.route('/') @app.route('/page/<int:page>') def blog(page=1): """View the blog.""" posts = Post.query.filter_by_latest() if posts: pagination = posts.paginate(page=page, per_page=Post.PER_PAGE) return render_t...
<commit_before>from app import app from app.models import Post from flask import render_template @app.route('/') @app.route('/page/<int:page>') def blog(page=1): """View the blog.""" posts = Post.query.filter_by_latest() if posts: pagination = posts.paginate(page=page, per_page=Post.PER_PAGE) ...
009a9f401fd0c1dba6702c1114a73b77f38b9ce3
bin/parse.py
bin/parse.py
#!/usr/bin/env python # -*- encoding: utf8 -*- import json import sys result = {} INDEX = { "AREA": 5 + 3 * 3 + 3 * 3, "CITY": 5 + 3 * 3, "CODE": 5 } for line in open("ORIGIN.txt"): code = line[:INDEX["CODE"]] city = line[INDEX["CODE"]: INDEX["CITY"]] if not city in result: result[city] = {...
#!/usr/bin/env python # -*- encoding: utf8 -*- import json import sys result = {} INDEX = { "AREA": 5 + 3 * 3 + 3 * 3, "CITY": 5 + 3 * 3, "CODE": 5 } for line in open("ORIGIN.txt"): code = line[:INDEX["CODE"]] city = line[INDEX["CODE"]: INDEX["CITY"]] if not city in result: result[city] = {...
Fix name parsing for roads
Fix name parsing for roads
Python
mit
lihengl/dizu-api,lihengl/dizu-api
#!/usr/bin/env python # -*- encoding: utf8 -*- import json import sys result = {} INDEX = { "AREA": 5 + 3 * 3 + 3 * 3, "CITY": 5 + 3 * 3, "CODE": 5 } for line in open("ORIGIN.txt"): code = line[:INDEX["CODE"]] city = line[INDEX["CODE"]: INDEX["CITY"]] if not city in result: result[city] = {...
#!/usr/bin/env python # -*- encoding: utf8 -*- import json import sys result = {} INDEX = { "AREA": 5 + 3 * 3 + 3 * 3, "CITY": 5 + 3 * 3, "CODE": 5 } for line in open("ORIGIN.txt"): code = line[:INDEX["CODE"]] city = line[INDEX["CODE"]: INDEX["CITY"]] if not city in result: result[city] = {...
<commit_before>#!/usr/bin/env python # -*- encoding: utf8 -*- import json import sys result = {} INDEX = { "AREA": 5 + 3 * 3 + 3 * 3, "CITY": 5 + 3 * 3, "CODE": 5 } for line in open("ORIGIN.txt"): code = line[:INDEX["CODE"]] city = line[INDEX["CODE"]: INDEX["CITY"]] if not city in result: r...
#!/usr/bin/env python # -*- encoding: utf8 -*- import json import sys result = {} INDEX = { "AREA": 5 + 3 * 3 + 3 * 3, "CITY": 5 + 3 * 3, "CODE": 5 } for line in open("ORIGIN.txt"): code = line[:INDEX["CODE"]] city = line[INDEX["CODE"]: INDEX["CITY"]] if not city in result: result[city] = {...
#!/usr/bin/env python # -*- encoding: utf8 -*- import json import sys result = {} INDEX = { "AREA": 5 + 3 * 3 + 3 * 3, "CITY": 5 + 3 * 3, "CODE": 5 } for line in open("ORIGIN.txt"): code = line[:INDEX["CODE"]] city = line[INDEX["CODE"]: INDEX["CITY"]] if not city in result: result[city] = {...
<commit_before>#!/usr/bin/env python # -*- encoding: utf8 -*- import json import sys result = {} INDEX = { "AREA": 5 + 3 * 3 + 3 * 3, "CITY": 5 + 3 * 3, "CODE": 5 } for line in open("ORIGIN.txt"): code = line[:INDEX["CODE"]] city = line[INDEX["CODE"]: INDEX["CITY"]] if not city in result: r...
dfa3a3c120b2555706c37da19496557a55f743db
reports/views.py
reports/views.py
from django.contrib.auth.decorators import user_passes_test from django.shortcuts import render from django.core.paginator import Paginator from .forms import ReportForm from .models import Report def can_add_reports(user): return user.is_authenticated() and user.has_perm('reports.add_report') @user_passes_tes...
from django.contrib.auth.decorators import permission_required from django.core.paginator import Paginator from django.shortcuts import render from .forms import ReportForm, CopyFormSet from .models import Report @permission_required('reports.add_report', login_url='members:login') def add_report(request): data ...
Add add report with copies functionality and permission
Add add report with copies functionality and permission
Python
mit
Hackfmi/Diaphanum,Hackfmi/Diaphanum
from django.contrib.auth.decorators import user_passes_test from django.shortcuts import render from django.core.paginator import Paginator from .forms import ReportForm from .models import Report def can_add_reports(user): return user.is_authenticated() and user.has_perm('reports.add_report') @user_passes_tes...
from django.contrib.auth.decorators import permission_required from django.core.paginator import Paginator from django.shortcuts import render from .forms import ReportForm, CopyFormSet from .models import Report @permission_required('reports.add_report', login_url='members:login') def add_report(request): data ...
<commit_before>from django.contrib.auth.decorators import user_passes_test from django.shortcuts import render from django.core.paginator import Paginator from .forms import ReportForm from .models import Report def can_add_reports(user): return user.is_authenticated() and user.has_perm('reports.add_report') @...
from django.contrib.auth.decorators import permission_required from django.core.paginator import Paginator from django.shortcuts import render from .forms import ReportForm, CopyFormSet from .models import Report @permission_required('reports.add_report', login_url='members:login') def add_report(request): data ...
from django.contrib.auth.decorators import user_passes_test from django.shortcuts import render from django.core.paginator import Paginator from .forms import ReportForm from .models import Report def can_add_reports(user): return user.is_authenticated() and user.has_perm('reports.add_report') @user_passes_tes...
<commit_before>from django.contrib.auth.decorators import user_passes_test from django.shortcuts import render from django.core.paginator import Paginator from .forms import ReportForm from .models import Report def can_add_reports(user): return user.is_authenticated() and user.has_perm('reports.add_report') @...
2e5bcbea0b6adbc947e62c31726734c081500d14
scripts/generate_dump_for_offline_apps_off.py
scripts/generate_dump_for_offline_apps_off.py
#!/usr/bin/python from __future__ import absolute_import, division, print_function import csv from itertools import imap from operator import itemgetter def main(): import pandas df = pandas.read_csv('/srv/off/html/data/en.openfoodfacts.org.products.csv', sep='\t', low_memory=False) colnames = ['code','pr...
#!/usr/bin/python from __future__ import absolute_import, division, print_function import csv from itertools import imap from operator import itemgetter def main(): import pandas df = pandas.read_csv('/srv/off/html/data/en.openfoodfacts.org.products.csv', sep='\t', low_memory=False) colnames = ['code','pr...
Add support for the Eco-Score for Offline-Scan
Add support for the Eco-Score for Offline-Scan Add support for the Eco-Score for Offline-Scan
Python
agpl-3.0
openfoodfacts/openfoodfacts-server,openfoodfacts/openfoodfacts-server,openfoodfacts/openfoodfacts-server,openfoodfacts/openfoodfacts-server,openfoodfacts/openfoodfacts-server
#!/usr/bin/python from __future__ import absolute_import, division, print_function import csv from itertools import imap from operator import itemgetter def main(): import pandas df = pandas.read_csv('/srv/off/html/data/en.openfoodfacts.org.products.csv', sep='\t', low_memory=False) colnames = ['code','pr...
#!/usr/bin/python from __future__ import absolute_import, division, print_function import csv from itertools import imap from operator import itemgetter def main(): import pandas df = pandas.read_csv('/srv/off/html/data/en.openfoodfacts.org.products.csv', sep='\t', low_memory=False) colnames = ['code','pr...
<commit_before>#!/usr/bin/python from __future__ import absolute_import, division, print_function import csv from itertools import imap from operator import itemgetter def main(): import pandas df = pandas.read_csv('/srv/off/html/data/en.openfoodfacts.org.products.csv', sep='\t', low_memory=False) colname...
#!/usr/bin/python from __future__ import absolute_import, division, print_function import csv from itertools import imap from operator import itemgetter def main(): import pandas df = pandas.read_csv('/srv/off/html/data/en.openfoodfacts.org.products.csv', sep='\t', low_memory=False) colnames = ['code','pr...
#!/usr/bin/python from __future__ import absolute_import, division, print_function import csv from itertools import imap from operator import itemgetter def main(): import pandas df = pandas.read_csv('/srv/off/html/data/en.openfoodfacts.org.products.csv', sep='\t', low_memory=False) colnames = ['code','pr...
<commit_before>#!/usr/bin/python from __future__ import absolute_import, division, print_function import csv from itertools import imap from operator import itemgetter def main(): import pandas df = pandas.read_csv('/srv/off/html/data/en.openfoodfacts.org.products.csv', sep='\t', low_memory=False) colname...
9530f7a65b5381fbb178dab120454dfc40a8d604
djangopypi2/apps/pypi_users/views.py
djangopypi2/apps/pypi_users/views.py
from django.contrib.auth import logout as auth_logout from django.contrib.auth.models import User from django.contrib.auth.decorators import login_required from django.views.generic.detail import SingleObjectMixin from django.views.generic.list import MultipleObjectMixin from django.views.generic.list import ListView f...
from django.contrib.auth import logout as auth_logout from django.contrib.auth.models import User from django.contrib.auth.decorators import login_required from django.views.generic.detail import SingleObjectMixin from django.views.generic.list import MultipleObjectMixin from django.views.generic.list import ListView f...
Fix bad super calls causing infinite recursion
Fix bad super calls causing infinite recursion
Python
bsd-3-clause
popen2/djangopypi2,popen2/djangopypi2,pitrho/djangopypi2,hsmade/djangopypi2,pitrho/djangopypi2,hsmade/djangopypi2
from django.contrib.auth import logout as auth_logout from django.contrib.auth.models import User from django.contrib.auth.decorators import login_required from django.views.generic.detail import SingleObjectMixin from django.views.generic.list import MultipleObjectMixin from django.views.generic.list import ListView f...
from django.contrib.auth import logout as auth_logout from django.contrib.auth.models import User from django.contrib.auth.decorators import login_required from django.views.generic.detail import SingleObjectMixin from django.views.generic.list import MultipleObjectMixin from django.views.generic.list import ListView f...
<commit_before>from django.contrib.auth import logout as auth_logout from django.contrib.auth.models import User from django.contrib.auth.decorators import login_required from django.views.generic.detail import SingleObjectMixin from django.views.generic.list import MultipleObjectMixin from django.views.generic.list im...
from django.contrib.auth import logout as auth_logout from django.contrib.auth.models import User from django.contrib.auth.decorators import login_required from django.views.generic.detail import SingleObjectMixin from django.views.generic.list import MultipleObjectMixin from django.views.generic.list import ListView f...
from django.contrib.auth import logout as auth_logout from django.contrib.auth.models import User from django.contrib.auth.decorators import login_required from django.views.generic.detail import SingleObjectMixin from django.views.generic.list import MultipleObjectMixin from django.views.generic.list import ListView f...
<commit_before>from django.contrib.auth import logout as auth_logout from django.contrib.auth.models import User from django.contrib.auth.decorators import login_required from django.views.generic.detail import SingleObjectMixin from django.views.generic.list import MultipleObjectMixin from django.views.generic.list im...
dca70886d2535dd843ea995b8d193958997de41b
slack_sdk/oauth/state_store/state_store.py
slack_sdk/oauth/state_store/state_store.py
from logging import Logger class OAuthStateStore: @property def logger(self) -> Logger: raise NotImplementedError() def issue(self) -> str: raise NotImplementedError() def consume(self, state: str) -> bool: raise NotImplementedError()
from logging import Logger class OAuthStateStore: @property def logger(self) -> Logger: raise NotImplementedError() def issue(self, *args, **kwargs) -> str: raise NotImplementedError() def consume(self, state: str) -> bool: raise NotImplementedError()
Enable additional data on state creation
Enable additional data on state creation This should allow for the creation of custom states where the additional data can be used to associate external accounts.
Python
mit
slackhq/python-slackclient,slackapi/python-slackclient,slackapi/python-slackclient,slackapi/python-slackclient
from logging import Logger class OAuthStateStore: @property def logger(self) -> Logger: raise NotImplementedError() def issue(self) -> str: raise NotImplementedError() def consume(self, state: str) -> bool: raise NotImplementedError() Enable additional data on state creation ...
from logging import Logger class OAuthStateStore: @property def logger(self) -> Logger: raise NotImplementedError() def issue(self, *args, **kwargs) -> str: raise NotImplementedError() def consume(self, state: str) -> bool: raise NotImplementedError()
<commit_before>from logging import Logger class OAuthStateStore: @property def logger(self) -> Logger: raise NotImplementedError() def issue(self) -> str: raise NotImplementedError() def consume(self, state: str) -> bool: raise NotImplementedError() <commit_msg>Enable additio...
from logging import Logger class OAuthStateStore: @property def logger(self) -> Logger: raise NotImplementedError() def issue(self, *args, **kwargs) -> str: raise NotImplementedError() def consume(self, state: str) -> bool: raise NotImplementedError()
from logging import Logger class OAuthStateStore: @property def logger(self) -> Logger: raise NotImplementedError() def issue(self) -> str: raise NotImplementedError() def consume(self, state: str) -> bool: raise NotImplementedError() Enable additional data on state creation ...
<commit_before>from logging import Logger class OAuthStateStore: @property def logger(self) -> Logger: raise NotImplementedError() def issue(self) -> str: raise NotImplementedError() def consume(self, state: str) -> bool: raise NotImplementedError() <commit_msg>Enable additio...
f0017fc656bc3ee0cfbe1bafe73efe9abc27bc32
mqueue/apps.py
mqueue/apps.py
import importlib from typing import List, Tuple, Union from django.utils.translation import ugettext_lazy as _ from django.apps import AppConfig class MqueueConfig(AppConfig): name = "mqueue" verbose_name = _(u"Events queue") def ready(self): # models registration from settings from djang...
import importlib from typing import List, Tuple, Union from django.utils.translation import gettext_lazy as _ from django.apps import AppConfig class MqueueConfig(AppConfig): name = "mqueue" default_auto_field = "django.db.models.BigAutoField" verbose_name = _("Events queue") def ready(self): ...
Add bigautofield default in app conf
Add bigautofield default in app conf
Python
mit
synw/django-mqueue,synw/django-mqueue,synw/django-mqueue
import importlib from typing import List, Tuple, Union from django.utils.translation import ugettext_lazy as _ from django.apps import AppConfig class MqueueConfig(AppConfig): name = "mqueue" verbose_name = _(u"Events queue") def ready(self): # models registration from settings from djang...
import importlib from typing import List, Tuple, Union from django.utils.translation import gettext_lazy as _ from django.apps import AppConfig class MqueueConfig(AppConfig): name = "mqueue" default_auto_field = "django.db.models.BigAutoField" verbose_name = _("Events queue") def ready(self): ...
<commit_before>import importlib from typing import List, Tuple, Union from django.utils.translation import ugettext_lazy as _ from django.apps import AppConfig class MqueueConfig(AppConfig): name = "mqueue" verbose_name = _(u"Events queue") def ready(self): # models registration from settings ...
import importlib from typing import List, Tuple, Union from django.utils.translation import gettext_lazy as _ from django.apps import AppConfig class MqueueConfig(AppConfig): name = "mqueue" default_auto_field = "django.db.models.BigAutoField" verbose_name = _("Events queue") def ready(self): ...
import importlib from typing import List, Tuple, Union from django.utils.translation import ugettext_lazy as _ from django.apps import AppConfig class MqueueConfig(AppConfig): name = "mqueue" verbose_name = _(u"Events queue") def ready(self): # models registration from settings from djang...
<commit_before>import importlib from typing import List, Tuple, Union from django.utils.translation import ugettext_lazy as _ from django.apps import AppConfig class MqueueConfig(AppConfig): name = "mqueue" verbose_name = _(u"Events queue") def ready(self): # models registration from settings ...
0d7a92f3f1bd405a33d4124bc6a3fb8fbfbba06c
telepathy/templatetags/custommardown.py
telepathy/templatetags/custommardown.py
# -*- coding: utf-8 -*- from __future__ import unicode_literals import markdown from django import template from django.template.defaultfilters import stringfilter from django.utils.encoding import force_unicode from django.utils.safestring import mark_safe register = template.Library() @register.filter(is_safe=T...
# -*- coding: utf-8 -*- from __future__ import unicode_literals import markdown from django import template from django.template.defaultfilters import stringfilter from django.utils.encoding import force_unicode from django.utils.safestring import mark_safe register = template.Library() @register.filter(is_safe=F...
Make markdown unsafe and let django make it safe after
Make markdown unsafe and let django make it safe after
Python
agpl-3.0
UrLab/DocHub,UrLab/DocHub,UrLab/beta402,UrLab/beta402,UrLab/DocHub,UrLab/DocHub,UrLab/beta402
# -*- coding: utf-8 -*- from __future__ import unicode_literals import markdown from django import template from django.template.defaultfilters import stringfilter from django.utils.encoding import force_unicode from django.utils.safestring import mark_safe register = template.Library() @register.filter(is_safe=T...
# -*- coding: utf-8 -*- from __future__ import unicode_literals import markdown from django import template from django.template.defaultfilters import stringfilter from django.utils.encoding import force_unicode from django.utils.safestring import mark_safe register = template.Library() @register.filter(is_safe=F...
<commit_before># -*- coding: utf-8 -*- from __future__ import unicode_literals import markdown from django import template from django.template.defaultfilters import stringfilter from django.utils.encoding import force_unicode from django.utils.safestring import mark_safe register = template.Library() @register.f...
# -*- coding: utf-8 -*- from __future__ import unicode_literals import markdown from django import template from django.template.defaultfilters import stringfilter from django.utils.encoding import force_unicode from django.utils.safestring import mark_safe register = template.Library() @register.filter(is_safe=F...
# -*- coding: utf-8 -*- from __future__ import unicode_literals import markdown from django import template from django.template.defaultfilters import stringfilter from django.utils.encoding import force_unicode from django.utils.safestring import mark_safe register = template.Library() @register.filter(is_safe=T...
<commit_before># -*- coding: utf-8 -*- from __future__ import unicode_literals import markdown from django import template from django.template.defaultfilters import stringfilter from django.utils.encoding import force_unicode from django.utils.safestring import mark_safe register = template.Library() @register.f...
1813413b33170f87cc9fb721c7b5a8cdecfab722
ckanext/googleanalytics/tests/conftest.py
ckanext/googleanalytics/tests/conftest.py
import pytest import factory from factory.alchemy import SQLAlchemyModelFactory from pytest_factoryboy import register import ckan.model as model from ckanext.googleanalytics.model import PackageStats, ResourceStats @pytest.fixture() def clean_db(reset_db, migrate_db_for): reset_db() migrate_db_for("google...
import pytest import factory from factory.alchemy import SQLAlchemyModelFactory from pytest_factoryboy import register from ckan.plugins import toolkit import ckan.model as model from ckanext.googleanalytics.model import PackageStats, ResourceStats if toolkit.requires_ckan_version("2.9"): @pytest.fixture() ...
Fix fixture for older versions
Fix fixture for older versions
Python
agpl-3.0
ckan/ckanext-googleanalytics,ckan/ckanext-googleanalytics,ckan/ckanext-googleanalytics
import pytest import factory from factory.alchemy import SQLAlchemyModelFactory from pytest_factoryboy import register import ckan.model as model from ckanext.googleanalytics.model import PackageStats, ResourceStats @pytest.fixture() def clean_db(reset_db, migrate_db_for): reset_db() migrate_db_for("google...
import pytest import factory from factory.alchemy import SQLAlchemyModelFactory from pytest_factoryboy import register from ckan.plugins import toolkit import ckan.model as model from ckanext.googleanalytics.model import PackageStats, ResourceStats if toolkit.requires_ckan_version("2.9"): @pytest.fixture() ...
<commit_before>import pytest import factory from factory.alchemy import SQLAlchemyModelFactory from pytest_factoryboy import register import ckan.model as model from ckanext.googleanalytics.model import PackageStats, ResourceStats @pytest.fixture() def clean_db(reset_db, migrate_db_for): reset_db() migrate...
import pytest import factory from factory.alchemy import SQLAlchemyModelFactory from pytest_factoryboy import register from ckan.plugins import toolkit import ckan.model as model from ckanext.googleanalytics.model import PackageStats, ResourceStats if toolkit.requires_ckan_version("2.9"): @pytest.fixture() ...
import pytest import factory from factory.alchemy import SQLAlchemyModelFactory from pytest_factoryboy import register import ckan.model as model from ckanext.googleanalytics.model import PackageStats, ResourceStats @pytest.fixture() def clean_db(reset_db, migrate_db_for): reset_db() migrate_db_for("google...
<commit_before>import pytest import factory from factory.alchemy import SQLAlchemyModelFactory from pytest_factoryboy import register import ckan.model as model from ckanext.googleanalytics.model import PackageStats, ResourceStats @pytest.fixture() def clean_db(reset_db, migrate_db_for): reset_db() migrate...
cca432708ec6220c8d3b7f23ff8c7c5f29d6737a
app/tools/application.py
app/tools/application.py
# -*- coding:utf-8 -*- import os,time,asyncio,json import logging logging.basicConfig(level=logging.ERROR) try: from aiohttp import web except ImportError: logging.error("Can't import module aiohttp") from tools.log import Log from tools.httptools import Middleware,Route from tools.template import Template from tool...
# -*- coding:utf-8 -*- import os,time,asyncio,json import logging logging.basicConfig(level=logging.ERROR) try: from aiohttp import web except ImportError: logging.error("Can't import module aiohttp") from tools.log import Log from tools.httptools import Middleware,Route from tools.template import Template from tool...
Change the way of creating database's connection pool
Change the way of creating database's connection pool
Python
mit
free-free/pyblog,free-free/pyblog,free-free/pyblog,free-free/pyblog
# -*- coding:utf-8 -*- import os,time,asyncio,json import logging logging.basicConfig(level=logging.ERROR) try: from aiohttp import web except ImportError: logging.error("Can't import module aiohttp") from tools.log import Log from tools.httptools import Middleware,Route from tools.template import Template from tool...
# -*- coding:utf-8 -*- import os,time,asyncio,json import logging logging.basicConfig(level=logging.ERROR) try: from aiohttp import web except ImportError: logging.error("Can't import module aiohttp") from tools.log import Log from tools.httptools import Middleware,Route from tools.template import Template from tool...
<commit_before># -*- coding:utf-8 -*- import os,time,asyncio,json import logging logging.basicConfig(level=logging.ERROR) try: from aiohttp import web except ImportError: logging.error("Can't import module aiohttp") from tools.log import Log from tools.httptools import Middleware,Route from tools.template import Tem...
# -*- coding:utf-8 -*- import os,time,asyncio,json import logging logging.basicConfig(level=logging.ERROR) try: from aiohttp import web except ImportError: logging.error("Can't import module aiohttp") from tools.log import Log from tools.httptools import Middleware,Route from tools.template import Template from tool...
# -*- coding:utf-8 -*- import os,time,asyncio,json import logging logging.basicConfig(level=logging.ERROR) try: from aiohttp import web except ImportError: logging.error("Can't import module aiohttp") from tools.log import Log from tools.httptools import Middleware,Route from tools.template import Template from tool...
<commit_before># -*- coding:utf-8 -*- import os,time,asyncio,json import logging logging.basicConfig(level=logging.ERROR) try: from aiohttp import web except ImportError: logging.error("Can't import module aiohttp") from tools.log import Log from tools.httptools import Middleware,Route from tools.template import Tem...
23bf1380d20e0782025ba997f3d33be6d873ae04
piwik/indico_piwik/views.py
piwik/indico_piwik/views.py
# This file is part of Indico. # Copyright (C) 2002 - 2015 European Organization for Nuclear Research (CERN). # # Indico is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License as # published by the Free Software Foundation; either version 3 of the # License, or (a...
# This file is part of Indico. # Copyright (C) 2002 - 2015 European Organization for Nuclear Research (CERN). # # Indico is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License as # published by the Free Software Foundation; either version 3 of the # License, or (a...
Mark sidemenu entry as active
Piwik: Mark sidemenu entry as active
Python
mit
ThiefMaster/indico-plugins,indico/indico-plugins,ThiefMaster/indico-plugins,ThiefMaster/indico-plugins,indico/indico-plugins,indico/indico-plugins,ThiefMaster/indico-plugins,indico/indico-plugins
# This file is part of Indico. # Copyright (C) 2002 - 2015 European Organization for Nuclear Research (CERN). # # Indico is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License as # published by the Free Software Foundation; either version 3 of the # License, or (a...
# This file is part of Indico. # Copyright (C) 2002 - 2015 European Organization for Nuclear Research (CERN). # # Indico is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License as # published by the Free Software Foundation; either version 3 of the # License, or (a...
<commit_before># This file is part of Indico. # Copyright (C) 2002 - 2015 European Organization for Nuclear Research (CERN). # # Indico is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License as # published by the Free Software Foundation; either version 3 of the #...
# This file is part of Indico. # Copyright (C) 2002 - 2015 European Organization for Nuclear Research (CERN). # # Indico is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License as # published by the Free Software Foundation; either version 3 of the # License, or (a...
# This file is part of Indico. # Copyright (C) 2002 - 2015 European Organization for Nuclear Research (CERN). # # Indico is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License as # published by the Free Software Foundation; either version 3 of the # License, or (a...
<commit_before># This file is part of Indico. # Copyright (C) 2002 - 2015 European Organization for Nuclear Research (CERN). # # Indico is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License as # published by the Free Software Foundation; either version 3 of the #...
c3ee23290183f240f52942a121ae048108e7853e
demo/urls.py
demo/urls.py
from django.conf.urls import patterns, include, url from django.conf.urls.static import static from django.conf import settings from django.contrib import admin from django.views.generic.base import RedirectView from wagtail.wagtailcore import urls as wagtail_urls from wagtail.wagtailadmin import urls as wagtailadmin_...
from django.conf.urls import include, url from django.conf.urls.static import static from django.conf import settings from django.contrib import admin from django.views.generic.base import RedirectView from wagtail.wagtailcore import urls as wagtail_urls from wagtail.wagtailadmin import urls as wagtailadmin_urls from ...
Fix demo URLs for Dajngo 1.10
Fix demo URLs for Dajngo 1.10
Python
mit
apihackers/wapps,apihackers/wapps,apihackers/wapps,apihackers/wapps
from django.conf.urls import patterns, include, url from django.conf.urls.static import static from django.conf import settings from django.contrib import admin from django.views.generic.base import RedirectView from wagtail.wagtailcore import urls as wagtail_urls from wagtail.wagtailadmin import urls as wagtailadmin_...
from django.conf.urls import include, url from django.conf.urls.static import static from django.conf import settings from django.contrib import admin from django.views.generic.base import RedirectView from wagtail.wagtailcore import urls as wagtail_urls from wagtail.wagtailadmin import urls as wagtailadmin_urls from ...
<commit_before>from django.conf.urls import patterns, include, url from django.conf.urls.static import static from django.conf import settings from django.contrib import admin from django.views.generic.base import RedirectView from wagtail.wagtailcore import urls as wagtail_urls from wagtail.wagtailadmin import urls a...
from django.conf.urls import include, url from django.conf.urls.static import static from django.conf import settings from django.contrib import admin from django.views.generic.base import RedirectView from wagtail.wagtailcore import urls as wagtail_urls from wagtail.wagtailadmin import urls as wagtailadmin_urls from ...
from django.conf.urls import patterns, include, url from django.conf.urls.static import static from django.conf import settings from django.contrib import admin from django.views.generic.base import RedirectView from wagtail.wagtailcore import urls as wagtail_urls from wagtail.wagtailadmin import urls as wagtailadmin_...
<commit_before>from django.conf.urls import patterns, include, url from django.conf.urls.static import static from django.conf import settings from django.contrib import admin from django.views.generic.base import RedirectView from wagtail.wagtailcore import urls as wagtail_urls from wagtail.wagtailadmin import urls a...
f8746cc68deb32d2c01201d8014c7e423e891c30
django_mysqlpool/__init__.py
django_mysqlpool/__init__.py
# -*- coding: utf-8 -*- """The top-level package for ``django-mysqlpool``.""" # These imports make 2 act like 3, making it easier on us to switch to PyPy or # some other VM if we need to for performance reasons. from __future__ import (absolute_import, print_function, unicode_literals, division)...
# -*- coding: utf-8 -*- """The top-level package for ``django-mysqlpool``.""" # These imports make 2 act like 3, making it easier on us to switch to PyPy or # some other VM if we need to for performance reasons. from __future__ import (absolute_import, print_function, unicode_literals, division)...
Cut a new release to incorporate the HashableDict fix.
Cut a new release to incorporate the HashableDict fix.
Python
mit
smartfile/django-mysqlpool
# -*- coding: utf-8 -*- """The top-level package for ``django-mysqlpool``.""" # These imports make 2 act like 3, making it easier on us to switch to PyPy or # some other VM if we need to for performance reasons. from __future__ import (absolute_import, print_function, unicode_literals, division)...
# -*- coding: utf-8 -*- """The top-level package for ``django-mysqlpool``.""" # These imports make 2 act like 3, making it easier on us to switch to PyPy or # some other VM if we need to for performance reasons. from __future__ import (absolute_import, print_function, unicode_literals, division)...
<commit_before># -*- coding: utf-8 -*- """The top-level package for ``django-mysqlpool``.""" # These imports make 2 act like 3, making it easier on us to switch to PyPy or # some other VM if we need to for performance reasons. from __future__ import (absolute_import, print_function, unicode_literals, ...
# -*- coding: utf-8 -*- """The top-level package for ``django-mysqlpool``.""" # These imports make 2 act like 3, making it easier on us to switch to PyPy or # some other VM if we need to for performance reasons. from __future__ import (absolute_import, print_function, unicode_literals, division)...
# -*- coding: utf-8 -*- """The top-level package for ``django-mysqlpool``.""" # These imports make 2 act like 3, making it easier on us to switch to PyPy or # some other VM if we need to for performance reasons. from __future__ import (absolute_import, print_function, unicode_literals, division)...
<commit_before># -*- coding: utf-8 -*- """The top-level package for ``django-mysqlpool``.""" # These imports make 2 act like 3, making it easier on us to switch to PyPy or # some other VM if we need to for performance reasons. from __future__ import (absolute_import, print_function, unicode_literals, ...
bc9012c887065e503a5ac231df8ed4e47a2175ad
apps/challenges/forms.py
apps/challenges/forms.py
from django import forms from tower import ugettext_lazy as _ from challenges.models import Submission class EntryForm(forms.ModelForm): class Meta: model = Submission fields = ( 'title', 'brief_description', 'description', 'created_by' ...
from django import forms from challenges.models import Submission class EntryForm(forms.ModelForm): class Meta: model = Submission fields = ( 'title', 'brief_description', 'description', 'created_by' )
Clear up an unused import.
Clear up an unused import.
Python
bsd-3-clause
mozilla/mozilla-ignite,mozilla/mozilla-ignite,mozilla/mozilla-ignite,mozilla/mozilla-ignite
from django import forms from tower import ugettext_lazy as _ from challenges.models import Submission class EntryForm(forms.ModelForm): class Meta: model = Submission fields = ( 'title', 'brief_description', 'description', 'created_by' ...
from django import forms from challenges.models import Submission class EntryForm(forms.ModelForm): class Meta: model = Submission fields = ( 'title', 'brief_description', 'description', 'created_by' )
<commit_before>from django import forms from tower import ugettext_lazy as _ from challenges.models import Submission class EntryForm(forms.ModelForm): class Meta: model = Submission fields = ( 'title', 'brief_description', 'description', 'cre...
from django import forms from challenges.models import Submission class EntryForm(forms.ModelForm): class Meta: model = Submission fields = ( 'title', 'brief_description', 'description', 'created_by' )
from django import forms from tower import ugettext_lazy as _ from challenges.models import Submission class EntryForm(forms.ModelForm): class Meta: model = Submission fields = ( 'title', 'brief_description', 'description', 'created_by' ...
<commit_before>from django import forms from tower import ugettext_lazy as _ from challenges.models import Submission class EntryForm(forms.ModelForm): class Meta: model = Submission fields = ( 'title', 'brief_description', 'description', 'cre...
e228042b7b59ab1b2be6e772dabbf595befc2cf6
kombulogger/server.py
kombulogger/server.py
# -*- coding: utf-8 -*- from __future__ import print_function import os import codecs import kombu from kombulogger import default_broker_url, default_queue_name class KombuLogServer(object): log_format = '{host}\t{level}\t{message}' def __init__(self, url=None, queue=None): url = url or default...
# -*- coding: utf-8 -*- from __future__ import print_function import os import codecs import kombu from kombulogger import default_broker_url, default_queue_name class KombuLogServer(object): log_format = u'{host}\t{level}\t{message}' def __init__(self, url=None, queue=None): url = url or defaul...
Fix unicode error on py2
Fix unicode error on py2
Python
mit
tuomur/kombulogger
# -*- coding: utf-8 -*- from __future__ import print_function import os import codecs import kombu from kombulogger import default_broker_url, default_queue_name class KombuLogServer(object): log_format = '{host}\t{level}\t{message}' def __init__(self, url=None, queue=None): url = url or default...
# -*- coding: utf-8 -*- from __future__ import print_function import os import codecs import kombu from kombulogger import default_broker_url, default_queue_name class KombuLogServer(object): log_format = u'{host}\t{level}\t{message}' def __init__(self, url=None, queue=None): url = url or defaul...
<commit_before># -*- coding: utf-8 -*- from __future__ import print_function import os import codecs import kombu from kombulogger import default_broker_url, default_queue_name class KombuLogServer(object): log_format = '{host}\t{level}\t{message}' def __init__(self, url=None, queue=None): url =...
# -*- coding: utf-8 -*- from __future__ import print_function import os import codecs import kombu from kombulogger import default_broker_url, default_queue_name class KombuLogServer(object): log_format = u'{host}\t{level}\t{message}' def __init__(self, url=None, queue=None): url = url or defaul...
# -*- coding: utf-8 -*- from __future__ import print_function import os import codecs import kombu from kombulogger import default_broker_url, default_queue_name class KombuLogServer(object): log_format = '{host}\t{level}\t{message}' def __init__(self, url=None, queue=None): url = url or default...
<commit_before># -*- coding: utf-8 -*- from __future__ import print_function import os import codecs import kombu from kombulogger import default_broker_url, default_queue_name class KombuLogServer(object): log_format = '{host}\t{level}\t{message}' def __init__(self, url=None, queue=None): url =...
a8e87b389c8b61e986ffb3c9c25af71c09796b52
collector.py
collector.py
import yaml import newspaper from newspaper import news_pool def get_config(): with open('/options/config.yml') as file: config = yaml.safe_load(file) keys = config.keys() if not 'threads' in keys: config['threads'] = 2 if not 'source' in keys: raise Exception('"source" not def...
import yaml import newspaper from rabbit.publisher import Publisher def main(): with open('/options/config.yml') as file: config = yaml.safe_load(file) paper = newspaper.build(config['source']) publisher = Publisher( rabbit_url=config['rabbit_url'], publish_interval=1, arti...
Build paper and hand articles to queue
Build paper and hand articles to queue
Python
mit
projectweekend/Article-Collector
import yaml import newspaper from newspaper import news_pool def get_config(): with open('/options/config.yml') as file: config = yaml.safe_load(file) keys = config.keys() if not 'threads' in keys: config['threads'] = 2 if not 'source' in keys: raise Exception('"source" not def...
import yaml import newspaper from rabbit.publisher import Publisher def main(): with open('/options/config.yml') as file: config = yaml.safe_load(file) paper = newspaper.build(config['source']) publisher = Publisher( rabbit_url=config['rabbit_url'], publish_interval=1, arti...
<commit_before>import yaml import newspaper from newspaper import news_pool def get_config(): with open('/options/config.yml') as file: config = yaml.safe_load(file) keys = config.keys() if not 'threads' in keys: config['threads'] = 2 if not 'source' in keys: raise Exception('"...
import yaml import newspaper from rabbit.publisher import Publisher def main(): with open('/options/config.yml') as file: config = yaml.safe_load(file) paper = newspaper.build(config['source']) publisher = Publisher( rabbit_url=config['rabbit_url'], publish_interval=1, arti...
import yaml import newspaper from newspaper import news_pool def get_config(): with open('/options/config.yml') as file: config = yaml.safe_load(file) keys = config.keys() if not 'threads' in keys: config['threads'] = 2 if not 'source' in keys: raise Exception('"source" not def...
<commit_before>import yaml import newspaper from newspaper import news_pool def get_config(): with open('/options/config.yml') as file: config = yaml.safe_load(file) keys = config.keys() if not 'threads' in keys: config['threads'] = 2 if not 'source' in keys: raise Exception('"...
75433ba1f8a0c057eacc49c77caf17fe19ffcda1
snapp/models.py
snapp/models.py
from django.db import models class Snap(models.Model): filename = models.CharField() downloaded = models.DateTimeField('date downloaded')
from django.db import models class Snap(models.Model): filename = models.CharField('124') downloaded = models.DateTimeField('date downloaded')
Add length to filename field
Add length to filename field
Python
mit
burk/helgapp,burk/helgapp
from django.db import models class Snap(models.Model): filename = models.CharField() downloaded = models.DateTimeField('date downloaded') Add length to filename field
from django.db import models class Snap(models.Model): filename = models.CharField('124') downloaded = models.DateTimeField('date downloaded')
<commit_before>from django.db import models class Snap(models.Model): filename = models.CharField() downloaded = models.DateTimeField('date downloaded') <commit_msg>Add length to filename field<commit_after>
from django.db import models class Snap(models.Model): filename = models.CharField('124') downloaded = models.DateTimeField('date downloaded')
from django.db import models class Snap(models.Model): filename = models.CharField() downloaded = models.DateTimeField('date downloaded') Add length to filename fieldfrom django.db import models class Snap(models.Model): filename = models.CharField('124') downloaded = models.DateTimeField('date downl...
<commit_before>from django.db import models class Snap(models.Model): filename = models.CharField() downloaded = models.DateTimeField('date downloaded') <commit_msg>Add length to filename field<commit_after>from django.db import models class Snap(models.Model): filename = models.CharField('124') down...
c104c70ad79edfa23d1a2ed76d37a25f77cd6586
PRESUBMIT.py
PRESUBMIT.py
# Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file # for details. All rights reserved. Use of this source code is governed by a # BSD-style license that can be found in the LICENSE file. """Top-level presubmit script for Dart. See http://dev.chromium.org/developers/how-tos/depottools/presubm...
# Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file # for details. All rights reserved. Use of this source code is governed by a # BSD-style license that can be found in the LICENSE file. """Top-level presubmit script for Dart. See http://dev.chromium.org/developers/how-tos/depottools/presubm...
Disable status tree check until we figure out what is wrong with dart-status.appspot.com
Disable status tree check until we figure out what is wrong with dart-status.appspot.com [email protected], [email protected] Review URL: https://codereview.chromium.org//23270003 git-svn-id: c93d8a2297af3b929165606efe145742a534bc71@26257 260f80e4-7a28-3924-810f-c04153c831b5
Python
bsd-3-clause
dart-lang/sdk,dart-archive/dart-sdk,dart-archive/dart-sdk,dartino/dart-sdk,dart-lang/sdk,dartino/dart-sdk,dartino/dart-sdk,dart-lang/sdk,dartino/dart-sdk,dartino/dart-sdk,dartino/dart-sdk,dart-archive/dart-sdk,dart-archive/dart-sdk,dart-archive/dart-sdk,dart-lang/sdk,dart-archive/dart-sdk,dart-lang/sdk,dartino/dart-sdk...
# Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file # for details. All rights reserved. Use of this source code is governed by a # BSD-style license that can be found in the LICENSE file. """Top-level presubmit script for Dart. See http://dev.chromium.org/developers/how-tos/depottools/presubm...
# Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file # for details. All rights reserved. Use of this source code is governed by a # BSD-style license that can be found in the LICENSE file. """Top-level presubmit script for Dart. See http://dev.chromium.org/developers/how-tos/depottools/presubm...
<commit_before># Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file # for details. All rights reserved. Use of this source code is governed by a # BSD-style license that can be found in the LICENSE file. """Top-level presubmit script for Dart. See http://dev.chromium.org/developers/how-tos/dep...
# Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file # for details. All rights reserved. Use of this source code is governed by a # BSD-style license that can be found in the LICENSE file. """Top-level presubmit script for Dart. See http://dev.chromium.org/developers/how-tos/depottools/presubm...
# Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file # for details. All rights reserved. Use of this source code is governed by a # BSD-style license that can be found in the LICENSE file. """Top-level presubmit script for Dart. See http://dev.chromium.org/developers/how-tos/depottools/presubm...
<commit_before># Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file # for details. All rights reserved. Use of this source code is governed by a # BSD-style license that can be found in the LICENSE file. """Top-level presubmit script for Dart. See http://dev.chromium.org/developers/how-tos/dep...
26e43b23a72a85c23184c2f5551885d65cc17831
conda_verify/errors.py
conda_verify/errors.py
from collections import namedtuple class PackageError(Exception): """Exception to be raised when user wants to exit on error.""" class RecipeError(Exception): """Exception to be raised when user wants to exit on error.""" class Error(namedtuple('Error', ['file', 'line_number', 'code', 'message'])): ""...
from collections import namedtuple class PackageError(Exception): """Exception to be raised when user wants to exit on error.""" class RecipeError(Exception): """Exception to be raised when user wants to exit on error.""" class Error(namedtuple('Error', ['code', 'message'])): """Error class creates er...
Remove file and line_number from Error class (may add at a later date)
Remove file and line_number from Error class (may add at a later date)
Python
bsd-3-clause
mandeep/conda-verify
from collections import namedtuple class PackageError(Exception): """Exception to be raised when user wants to exit on error.""" class RecipeError(Exception): """Exception to be raised when user wants to exit on error.""" class Error(namedtuple('Error', ['file', 'line_number', 'code', 'message'])): ""...
from collections import namedtuple class PackageError(Exception): """Exception to be raised when user wants to exit on error.""" class RecipeError(Exception): """Exception to be raised when user wants to exit on error.""" class Error(namedtuple('Error', ['code', 'message'])): """Error class creates er...
<commit_before>from collections import namedtuple class PackageError(Exception): """Exception to be raised when user wants to exit on error.""" class RecipeError(Exception): """Exception to be raised when user wants to exit on error.""" class Error(namedtuple('Error', ['file', 'line_number', 'code', 'mess...
from collections import namedtuple class PackageError(Exception): """Exception to be raised when user wants to exit on error.""" class RecipeError(Exception): """Exception to be raised when user wants to exit on error.""" class Error(namedtuple('Error', ['code', 'message'])): """Error class creates er...
from collections import namedtuple class PackageError(Exception): """Exception to be raised when user wants to exit on error.""" class RecipeError(Exception): """Exception to be raised when user wants to exit on error.""" class Error(namedtuple('Error', ['file', 'line_number', 'code', 'message'])): ""...
<commit_before>from collections import namedtuple class PackageError(Exception): """Exception to be raised when user wants to exit on error.""" class RecipeError(Exception): """Exception to be raised when user wants to exit on error.""" class Error(namedtuple('Error', ['file', 'line_number', 'code', 'mess...
6ae9da5ddf987873abb6f54992907542eaf80237
movieman2/tests.py
movieman2/tests.py
import datetime from django.contrib.auth.models import User from django.test import TestCase import tmdbsimple as tmdb from .models import Movie class MovieTestCase(TestCase): def setUp(self): User.objects.create(username="test_user", password="pass", email="[email protected]", first_name="Test", ...
import datetime import tmdbsimple as tmdb from django.contrib.auth.models import User from django.test import TestCase from .models import Movie class MovieTestCase(TestCase): def setUp(self): User.objects.create(username="movie_test_case", password="pass", email="movie@test_case.tld", ...
Change test case user info
Change test case user info
Python
mit
simon-andrews/movieman2,simon-andrews/movieman2
import datetime from django.contrib.auth.models import User from django.test import TestCase import tmdbsimple as tmdb from .models import Movie class MovieTestCase(TestCase): def setUp(self): User.objects.create(username="test_user", password="pass", email="[email protected]", first_name="Test", ...
import datetime import tmdbsimple as tmdb from django.contrib.auth.models import User from django.test import TestCase from .models import Movie class MovieTestCase(TestCase): def setUp(self): User.objects.create(username="movie_test_case", password="pass", email="movie@test_case.tld", ...
<commit_before>import datetime from django.contrib.auth.models import User from django.test import TestCase import tmdbsimple as tmdb from .models import Movie class MovieTestCase(TestCase): def setUp(self): User.objects.create(username="test_user", password="pass", email="[email protected]", first_name="Te...
import datetime import tmdbsimple as tmdb from django.contrib.auth.models import User from django.test import TestCase from .models import Movie class MovieTestCase(TestCase): def setUp(self): User.objects.create(username="movie_test_case", password="pass", email="movie@test_case.tld", ...
import datetime from django.contrib.auth.models import User from django.test import TestCase import tmdbsimple as tmdb from .models import Movie class MovieTestCase(TestCase): def setUp(self): User.objects.create(username="test_user", password="pass", email="[email protected]", first_name="Test", ...
<commit_before>import datetime from django.contrib.auth.models import User from django.test import TestCase import tmdbsimple as tmdb from .models import Movie class MovieTestCase(TestCase): def setUp(self): User.objects.create(username="test_user", password="pass", email="[email protected]", first_name="Te...
732a49045d0e5f2dabc6c3d4b89e9be41633b1d8
contacts/views/__init__.py
contacts/views/__init__.py
from braces.views import LoginRequiredMixin from django.core.exceptions import PermissionDenied from django.shortcuts import ( get_object_or_404, redirect ) from contacts.models import ( Book, BookOwner, ) class BookOwnerMixin(LoginRequiredMixin): def get_queryset(self): if self.kwargs.g...
from braces.views import LoginRequiredMixin from django.core.exceptions import PermissionDenied from django.shortcuts import ( get_object_or_404, redirect ) from contacts.models import ( Book, BookOwner, ) class BookOwnerMixin(LoginRequiredMixin): def get_queryset(self): if self.kwargs.g...
Create book if one doesn't exist during tag creation
Create book if one doesn't exist during tag creation
Python
mit
phildini/logtacts,phildini/logtacts,phildini/logtacts,phildini/logtacts,phildini/logtacts
from braces.views import LoginRequiredMixin from django.core.exceptions import PermissionDenied from django.shortcuts import ( get_object_or_404, redirect ) from contacts.models import ( Book, BookOwner, ) class BookOwnerMixin(LoginRequiredMixin): def get_queryset(self): if self.kwargs.g...
from braces.views import LoginRequiredMixin from django.core.exceptions import PermissionDenied from django.shortcuts import ( get_object_or_404, redirect ) from contacts.models import ( Book, BookOwner, ) class BookOwnerMixin(LoginRequiredMixin): def get_queryset(self): if self.kwargs.g...
<commit_before>from braces.views import LoginRequiredMixin from django.core.exceptions import PermissionDenied from django.shortcuts import ( get_object_or_404, redirect ) from contacts.models import ( Book, BookOwner, ) class BookOwnerMixin(LoginRequiredMixin): def get_queryset(self): i...
from braces.views import LoginRequiredMixin from django.core.exceptions import PermissionDenied from django.shortcuts import ( get_object_or_404, redirect ) from contacts.models import ( Book, BookOwner, ) class BookOwnerMixin(LoginRequiredMixin): def get_queryset(self): if self.kwargs.g...
from braces.views import LoginRequiredMixin from django.core.exceptions import PermissionDenied from django.shortcuts import ( get_object_or_404, redirect ) from contacts.models import ( Book, BookOwner, ) class BookOwnerMixin(LoginRequiredMixin): def get_queryset(self): if self.kwargs.g...
<commit_before>from braces.views import LoginRequiredMixin from django.core.exceptions import PermissionDenied from django.shortcuts import ( get_object_or_404, redirect ) from contacts.models import ( Book, BookOwner, ) class BookOwnerMixin(LoginRequiredMixin): def get_queryset(self): i...
fbb8408c0f31079d79e08cd77fe54d27d6eb5f45
byceps/services/party/models/setting.py
byceps/services/party/models/setting.py
""" byceps.services.party.models.setting ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :Copyright: 2006-2018 Jochen Kupperschmidt :License: Modified BSD, see LICENSE for details. """ from ....database import db from ....typing import PartyID from ....util.instances import ReprBuilder class Setting(db.Model): """A party-...
""" byceps.services.party.models.setting ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :Copyright: 2006-2018 Jochen Kupperschmidt :License: Modified BSD, see LICENSE for details. """ from ....database import db from ....typing import PartyID from ....util.instances import ReprBuilder class Setting(db.Model): """A party-...
Align foreign key field length with maximum party ID length
Align foreign key field length with maximum party ID length
Python
bsd-3-clause
homeworkprod/byceps,m-ober/byceps,homeworkprod/byceps,m-ober/byceps,m-ober/byceps,homeworkprod/byceps
""" byceps.services.party.models.setting ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :Copyright: 2006-2018 Jochen Kupperschmidt :License: Modified BSD, see LICENSE for details. """ from ....database import db from ....typing import PartyID from ....util.instances import ReprBuilder class Setting(db.Model): """A party-...
""" byceps.services.party.models.setting ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :Copyright: 2006-2018 Jochen Kupperschmidt :License: Modified BSD, see LICENSE for details. """ from ....database import db from ....typing import PartyID from ....util.instances import ReprBuilder class Setting(db.Model): """A party-...
<commit_before>""" byceps.services.party.models.setting ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :Copyright: 2006-2018 Jochen Kupperschmidt :License: Modified BSD, see LICENSE for details. """ from ....database import db from ....typing import PartyID from ....util.instances import ReprBuilder class Setting(db.Model): ...
""" byceps.services.party.models.setting ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :Copyright: 2006-2018 Jochen Kupperschmidt :License: Modified BSD, see LICENSE for details. """ from ....database import db from ....typing import PartyID from ....util.instances import ReprBuilder class Setting(db.Model): """A party-...
""" byceps.services.party.models.setting ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :Copyright: 2006-2018 Jochen Kupperschmidt :License: Modified BSD, see LICENSE for details. """ from ....database import db from ....typing import PartyID from ....util.instances import ReprBuilder class Setting(db.Model): """A party-...
<commit_before>""" byceps.services.party.models.setting ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :Copyright: 2006-2018 Jochen Kupperschmidt :License: Modified BSD, see LICENSE for details. """ from ....database import db from ....typing import PartyID from ....util.instances import ReprBuilder class Setting(db.Model): ...
ea0d732972d4b86cffdc63d73ff04b3da06b6860
osmwriter/_version.py
osmwriter/_version.py
"""Store the version info so that setup.py and __init__ can access it. """ __version__ = "0.2.0"
"""Store the version info so that setup.py and __init__ can access it. """ __version__ = "0.2.0.dev"
Prepare version 0.2.0.dev for next development cycle
Prepare version 0.2.0.dev for next development cycle
Python
agpl-3.0
rory/openstreetmap-writer
"""Store the version info so that setup.py and __init__ can access it. """ __version__ = "0.2.0" Prepare version 0.2.0.dev for next development cycle
"""Store the version info so that setup.py and __init__ can access it. """ __version__ = "0.2.0.dev"
<commit_before>"""Store the version info so that setup.py and __init__ can access it. """ __version__ = "0.2.0" <commit_msg>Prepare version 0.2.0.dev for next development cycle<commit_after>
"""Store the version info so that setup.py and __init__ can access it. """ __version__ = "0.2.0.dev"
"""Store the version info so that setup.py and __init__ can access it. """ __version__ = "0.2.0" Prepare version 0.2.0.dev for next development cycle"""Store the version info so that setup.py and __init__ can access it. """ __version__ = "0.2.0.dev"
<commit_before>"""Store the version info so that setup.py and __init__ can access it. """ __version__ = "0.2.0" <commit_msg>Prepare version 0.2.0.dev for next development cycle<commit_after>"""Store the version info so that setup.py and __init__ can access it. """ __version__ = "0.2.0.dev"
5b151720d3a2e5409e28d7f4a9c989fc8176cb32
main.py
main.py
#!/usr/bin/env python import asyncio import logging import sys import discord from discord.ext.commands import when_mentioned_or import yaml from bot import BeattieBot try: import uvloop except ImportError: pass else: asyncio.set_event_loop_policy(uvloop.EventLoopPolicy()) with open('config/config.yaml'...
#!/usr/bin/env python import asyncio import logging import sys import discord from discord.ext.commands import when_mentioned_or import yaml from bot import BeattieBot try: import uvloop except ImportError: pass else: asyncio.set_event_loop_policy(uvloop.EventLoopPolicy()) with open('config/config.yaml'...
Use self> for selfbot prefix, and >/b> for normal bot prefix
Use self> for selfbot prefix, and >/b> for normal bot prefix
Python
mit
BeatButton/beattie,BeatButton/beattie-bot
#!/usr/bin/env python import asyncio import logging import sys import discord from discord.ext.commands import when_mentioned_or import yaml from bot import BeattieBot try: import uvloop except ImportError: pass else: asyncio.set_event_loop_policy(uvloop.EventLoopPolicy()) with open('config/config.yaml'...
#!/usr/bin/env python import asyncio import logging import sys import discord from discord.ext.commands import when_mentioned_or import yaml from bot import BeattieBot try: import uvloop except ImportError: pass else: asyncio.set_event_loop_policy(uvloop.EventLoopPolicy()) with open('config/config.yaml'...
<commit_before>#!/usr/bin/env python import asyncio import logging import sys import discord from discord.ext.commands import when_mentioned_or import yaml from bot import BeattieBot try: import uvloop except ImportError: pass else: asyncio.set_event_loop_policy(uvloop.EventLoopPolicy()) with open('conf...
#!/usr/bin/env python import asyncio import logging import sys import discord from discord.ext.commands import when_mentioned_or import yaml from bot import BeattieBot try: import uvloop except ImportError: pass else: asyncio.set_event_loop_policy(uvloop.EventLoopPolicy()) with open('config/config.yaml'...
#!/usr/bin/env python import asyncio import logging import sys import discord from discord.ext.commands import when_mentioned_or import yaml from bot import BeattieBot try: import uvloop except ImportError: pass else: asyncio.set_event_loop_policy(uvloop.EventLoopPolicy()) with open('config/config.yaml'...
<commit_before>#!/usr/bin/env python import asyncio import logging import sys import discord from discord.ext.commands import when_mentioned_or import yaml from bot import BeattieBot try: import uvloop except ImportError: pass else: asyncio.set_event_loop_policy(uvloop.EventLoopPolicy()) with open('conf...
643d7c2515c663777a058c9fce02beedeb34b77a
plotly/graph_objs/graph_objs_tools.py
plotly/graph_objs/graph_objs_tools.py
def update_keys(keys): """Change keys we used to support to their new equivalent.""" updated_keys = list() for key in keys: if key in translations: updated_keys += [translations[key]] else: updated_keys += [key] return updated_keys translations = dict( scl="c...
def update_keys(keys): """Change keys we used to support to their new equivalent.""" updated_keys = list() for key in keys: if key in translations: updated_keys += [translations[key]] else: updated_keys += [key] return updated_keys translations = dict( scl="c...
Fix typo in reversescale translation
Fix typo in reversescale translation - allows 'reversescl' (old key) to get map to 'reversescale' (new key)
Python
mit
plotly/python-api,plotly/plotly.py,plotly/python-api,ee-in/python-api,ee-in/python-api,plotly/python-api,plotly/plotly.py,ee-in/python-api,plotly/plotly.py
def update_keys(keys): """Change keys we used to support to their new equivalent.""" updated_keys = list() for key in keys: if key in translations: updated_keys += [translations[key]] else: updated_keys += [key] return updated_keys translations = dict( scl="c...
def update_keys(keys): """Change keys we used to support to their new equivalent.""" updated_keys = list() for key in keys: if key in translations: updated_keys += [translations[key]] else: updated_keys += [key] return updated_keys translations = dict( scl="c...
<commit_before>def update_keys(keys): """Change keys we used to support to their new equivalent.""" updated_keys = list() for key in keys: if key in translations: updated_keys += [translations[key]] else: updated_keys += [key] return updated_keys translations = d...
def update_keys(keys): """Change keys we used to support to their new equivalent.""" updated_keys = list() for key in keys: if key in translations: updated_keys += [translations[key]] else: updated_keys += [key] return updated_keys translations = dict( scl="c...
def update_keys(keys): """Change keys we used to support to their new equivalent.""" updated_keys = list() for key in keys: if key in translations: updated_keys += [translations[key]] else: updated_keys += [key] return updated_keys translations = dict( scl="c...
<commit_before>def update_keys(keys): """Change keys we used to support to their new equivalent.""" updated_keys = list() for key in keys: if key in translations: updated_keys += [translations[key]] else: updated_keys += [key] return updated_keys translations = d...
ff66e137532593bfa3ce16b993be636236f549a2
polyaxon/scheduler/spawners/templates/init_containers.py
polyaxon/scheduler/spawners/templates/init_containers.py
class InitCommands(object): COPY = 'copy' CREATE = 'create' DELETE = 'delete' @classmethod def is_copy(cls, command): return command == cls.COPY @classmethod def is_create(cls, command): return command == cls.CREATE @classmethod def is_delete(cls, command): ...
class InitCommands(object): COPY = 'copy' CREATE = 'create' DELETE = 'delete' @classmethod def is_copy(cls, command): return command == cls.COPY @classmethod def is_create(cls, command): return command == cls.CREATE @classmethod def is_delete(cls, command): ...
Fix delete command in pod initializer
Fix delete command in pod initializer
Python
apache-2.0
polyaxon/polyaxon,polyaxon/polyaxon,polyaxon/polyaxon
class InitCommands(object): COPY = 'copy' CREATE = 'create' DELETE = 'delete' @classmethod def is_copy(cls, command): return command == cls.COPY @classmethod def is_create(cls, command): return command == cls.CREATE @classmethod def is_delete(cls, command): ...
class InitCommands(object): COPY = 'copy' CREATE = 'create' DELETE = 'delete' @classmethod def is_copy(cls, command): return command == cls.COPY @classmethod def is_create(cls, command): return command == cls.CREATE @classmethod def is_delete(cls, command): ...
<commit_before>class InitCommands(object): COPY = 'copy' CREATE = 'create' DELETE = 'delete' @classmethod def is_copy(cls, command): return command == cls.COPY @classmethod def is_create(cls, command): return command == cls.CREATE @classmethod def is_delete(cls, co...
class InitCommands(object): COPY = 'copy' CREATE = 'create' DELETE = 'delete' @classmethod def is_copy(cls, command): return command == cls.COPY @classmethod def is_create(cls, command): return command == cls.CREATE @classmethod def is_delete(cls, command): ...
class InitCommands(object): COPY = 'copy' CREATE = 'create' DELETE = 'delete' @classmethod def is_copy(cls, command): return command == cls.COPY @classmethod def is_create(cls, command): return command == cls.CREATE @classmethod def is_delete(cls, command): ...
<commit_before>class InitCommands(object): COPY = 'copy' CREATE = 'create' DELETE = 'delete' @classmethod def is_copy(cls, command): return command == cls.COPY @classmethod def is_create(cls, command): return command == cls.CREATE @classmethod def is_delete(cls, co...
cfac1504b590d329ffb56d1a46cad7cc1b4b22ff
corehq/apps/couch_sql_migration/util.py
corehq/apps/couch_sql_migration/util.py
from functools import wraps import gevent from greenlet import GreenletExit def exit_on_error(func): @wraps(func) def wrapper(*args, **kw): try: func(*args, **kw) except gevent.get_hub().SYSTEM_ERROR: raise except GreenletExit: raise except ...
from functools import wraps import gevent from greenlet import GreenletExit def exit_on_error(func): @wraps(func) def wrapper(*args, **kw): try: return func(*args, **kw) except gevent.get_hub().SYSTEM_ERROR: raise except GreenletExit: raise ...
Fix exit_on_error in case of return value
Fix exit_on_error in case of return value
Python
bsd-3-clause
dimagi/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq
from functools import wraps import gevent from greenlet import GreenletExit def exit_on_error(func): @wraps(func) def wrapper(*args, **kw): try: func(*args, **kw) except gevent.get_hub().SYSTEM_ERROR: raise except GreenletExit: raise except ...
from functools import wraps import gevent from greenlet import GreenletExit def exit_on_error(func): @wraps(func) def wrapper(*args, **kw): try: return func(*args, **kw) except gevent.get_hub().SYSTEM_ERROR: raise except GreenletExit: raise ...
<commit_before>from functools import wraps import gevent from greenlet import GreenletExit def exit_on_error(func): @wraps(func) def wrapper(*args, **kw): try: func(*args, **kw) except gevent.get_hub().SYSTEM_ERROR: raise except GreenletExit: raise ...
from functools import wraps import gevent from greenlet import GreenletExit def exit_on_error(func): @wraps(func) def wrapper(*args, **kw): try: return func(*args, **kw) except gevent.get_hub().SYSTEM_ERROR: raise except GreenletExit: raise ...
from functools import wraps import gevent from greenlet import GreenletExit def exit_on_error(func): @wraps(func) def wrapper(*args, **kw): try: func(*args, **kw) except gevent.get_hub().SYSTEM_ERROR: raise except GreenletExit: raise except ...
<commit_before>from functools import wraps import gevent from greenlet import GreenletExit def exit_on_error(func): @wraps(func) def wrapper(*args, **kw): try: func(*args, **kw) except gevent.get_hub().SYSTEM_ERROR: raise except GreenletExit: raise ...
3484610b0c711b000da8dc37ab76649aa4abfc58
ptt_preproc_filter.py
ptt_preproc_filter.py
#!/usr/bin/env python import json import sys from os import scandir, remove from datetime import datetime START_DT = datetime(2016, 7, 1, 0, 0, 0) END_DT = datetime(2016, 12, 1, 0, 0, 0) DRY_RUN = True for dir_entry in scandir('preprocessed'): path = dir_entry.path with open(path) as f: # read t...
#!/usr/bin/env python import json import sys from pathlib import Path from os import remove from datetime import datetime START_DT = datetime(2016, 7, 1, 0, 0, 0) END_DT = datetime(2016, 12, 1, 0, 0, 0) DRY_RUN = True for path in Path('preprocessed/').iterdir(): with path.open() as f: # read the jso...
Use pathlib in the filter
Use pathlib in the filter
Python
mit
moskytw/mining-news
#!/usr/bin/env python import json import sys from os import scandir, remove from datetime import datetime START_DT = datetime(2016, 7, 1, 0, 0, 0) END_DT = datetime(2016, 12, 1, 0, 0, 0) DRY_RUN = True for dir_entry in scandir('preprocessed'): path = dir_entry.path with open(path) as f: # read t...
#!/usr/bin/env python import json import sys from pathlib import Path from os import remove from datetime import datetime START_DT = datetime(2016, 7, 1, 0, 0, 0) END_DT = datetime(2016, 12, 1, 0, 0, 0) DRY_RUN = True for path in Path('preprocessed/').iterdir(): with path.open() as f: # read the jso...
<commit_before>#!/usr/bin/env python import json import sys from os import scandir, remove from datetime import datetime START_DT = datetime(2016, 7, 1, 0, 0, 0) END_DT = datetime(2016, 12, 1, 0, 0, 0) DRY_RUN = True for dir_entry in scandir('preprocessed'): path = dir_entry.path with open(path) as f: ...
#!/usr/bin/env python import json import sys from pathlib import Path from os import remove from datetime import datetime START_DT = datetime(2016, 7, 1, 0, 0, 0) END_DT = datetime(2016, 12, 1, 0, 0, 0) DRY_RUN = True for path in Path('preprocessed/').iterdir(): with path.open() as f: # read the jso...
#!/usr/bin/env python import json import sys from os import scandir, remove from datetime import datetime START_DT = datetime(2016, 7, 1, 0, 0, 0) END_DT = datetime(2016, 12, 1, 0, 0, 0) DRY_RUN = True for dir_entry in scandir('preprocessed'): path = dir_entry.path with open(path) as f: # read t...
<commit_before>#!/usr/bin/env python import json import sys from os import scandir, remove from datetime import datetime START_DT = datetime(2016, 7, 1, 0, 0, 0) END_DT = datetime(2016, 12, 1, 0, 0, 0) DRY_RUN = True for dir_entry in scandir('preprocessed'): path = dir_entry.path with open(path) as f: ...
71cf0ce2348b46841f2f37c2c8934726832e5094
takeyourmeds/groups/groups_admin/tests.py
takeyourmeds/groups/groups_admin/tests.py
from takeyourmeds.utils.test import SuperuserTestCase class SmokeTest(SuperuserTestCase): def test_index(self): self.assertGET(200, 'groups:admin:index', login=True) def test_view(self): self.assertGET( 200, 'groups:admin:view', self.user.profile.group_id, ...
from takeyourmeds.utils.test import SuperuserTestCase class SmokeTest(SuperuserTestCase): def test_index(self): self.assertGET(200, 'groups:admin:index', login=True) def test_view(self): self.assertGET( 200, 'groups:admin:view', self.user.profile.group_id, ...
Test access token csv download
Test access token csv download Signed-off-by: Chris Lamb <[email protected]>
Python
mit
takeyourmeds/takeyourmeds-web,takeyourmeds/takeyourmeds-web,takeyourmeds/takeyourmeds-web,takeyourmeds/takeyourmeds-web
from takeyourmeds.utils.test import SuperuserTestCase class SmokeTest(SuperuserTestCase): def test_index(self): self.assertGET(200, 'groups:admin:index', login=True) def test_view(self): self.assertGET( 200, 'groups:admin:view', self.user.profile.group_id, ...
from takeyourmeds.utils.test import SuperuserTestCase class SmokeTest(SuperuserTestCase): def test_index(self): self.assertGET(200, 'groups:admin:index', login=True) def test_view(self): self.assertGET( 200, 'groups:admin:view', self.user.profile.group_id, ...
<commit_before>from takeyourmeds.utils.test import SuperuserTestCase class SmokeTest(SuperuserTestCase): def test_index(self): self.assertGET(200, 'groups:admin:index', login=True) def test_view(self): self.assertGET( 200, 'groups:admin:view', self.user.prof...
from takeyourmeds.utils.test import SuperuserTestCase class SmokeTest(SuperuserTestCase): def test_index(self): self.assertGET(200, 'groups:admin:index', login=True) def test_view(self): self.assertGET( 200, 'groups:admin:view', self.user.profile.group_id, ...
from takeyourmeds.utils.test import SuperuserTestCase class SmokeTest(SuperuserTestCase): def test_index(self): self.assertGET(200, 'groups:admin:index', login=True) def test_view(self): self.assertGET( 200, 'groups:admin:view', self.user.profile.group_id, ...
<commit_before>from takeyourmeds.utils.test import SuperuserTestCase class SmokeTest(SuperuserTestCase): def test_index(self): self.assertGET(200, 'groups:admin:index', login=True) def test_view(self): self.assertGET( 200, 'groups:admin:view', self.user.prof...
808b248d71785e44f764b7724e0d2812a750c9b4
Memoir/urls.py
Memoir/urls.py
"""Memoir URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/1.9/topics/http/urls/ Examples: Function views 1. Add an import: from my_app import views 2. Add a URL to urlpatterns: url(r'^$', views.home, name='home') Class-base...
"""Memoir URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/1.9/topics/http/urls/ Examples: Function views 1. Add an import: from my_app import views 2. Add a URL to urlpatterns: url(r'^$', views.home, name='home') Class-base...
Configure a simple index page
Configure a simple index page For now, this is a place-holder.
Python
mit
nivbend/memoir,nivbend/memoir,nivbend/memoir
"""Memoir URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/1.9/topics/http/urls/ Examples: Function views 1. Add an import: from my_app import views 2. Add a URL to urlpatterns: url(r'^$', views.home, name='home') Class-base...
"""Memoir URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/1.9/topics/http/urls/ Examples: Function views 1. Add an import: from my_app import views 2. Add a URL to urlpatterns: url(r'^$', views.home, name='home') Class-base...
<commit_before>"""Memoir URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/1.9/topics/http/urls/ Examples: Function views 1. Add an import: from my_app import views 2. Add a URL to urlpatterns: url(r'^$', views.home, name='ho...
"""Memoir URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/1.9/topics/http/urls/ Examples: Function views 1. Add an import: from my_app import views 2. Add a URL to urlpatterns: url(r'^$', views.home, name='home') Class-base...
"""Memoir URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/1.9/topics/http/urls/ Examples: Function views 1. Add an import: from my_app import views 2. Add a URL to urlpatterns: url(r'^$', views.home, name='home') Class-base...
<commit_before>"""Memoir URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/1.9/topics/http/urls/ Examples: Function views 1. Add an import: from my_app import views 2. Add a URL to urlpatterns: url(r'^$', views.home, name='ho...
bd4b4af4596120d1deee6db4e420829c0d40e377
boris/settings/config.py
boris/settings/config.py
import os import boris from .base import STATIC_URL # helper for building absolute paths PROJECT_ROOT = os.path.abspath(os.path.dirname(boris.__file__)) p = lambda x: os.path.join(PROJECT_ROOT, x) DATABASES = { 'default': { 'ENGINE': 'django.db.backends.sqlite3', 'NAME': 'boris.db', 'USER...
import os import boris from .base import STATIC_URL # helper for building absolute paths PROJECT_ROOT = os.path.abspath(os.path.dirname(boris.__file__)) p = lambda x: os.path.join(PROJECT_ROOT, x) DATABASES = { 'default': { 'ENGINE': 'django.db.backends.mysql', 'NAME': 'boris', 'USER': ''...
Change default database from sqlite to mysql.
Change default database from sqlite to mysql.
Python
mit
fragaria/BorIS,fragaria/BorIS,fragaria/BorIS
import os import boris from .base import STATIC_URL # helper for building absolute paths PROJECT_ROOT = os.path.abspath(os.path.dirname(boris.__file__)) p = lambda x: os.path.join(PROJECT_ROOT, x) DATABASES = { 'default': { 'ENGINE': 'django.db.backends.sqlite3', 'NAME': 'boris.db', 'USER...
import os import boris from .base import STATIC_URL # helper for building absolute paths PROJECT_ROOT = os.path.abspath(os.path.dirname(boris.__file__)) p = lambda x: os.path.join(PROJECT_ROOT, x) DATABASES = { 'default': { 'ENGINE': 'django.db.backends.mysql', 'NAME': 'boris', 'USER': ''...
<commit_before>import os import boris from .base import STATIC_URL # helper for building absolute paths PROJECT_ROOT = os.path.abspath(os.path.dirname(boris.__file__)) p = lambda x: os.path.join(PROJECT_ROOT, x) DATABASES = { 'default': { 'ENGINE': 'django.db.backends.sqlite3', 'NAME': 'boris.db'...
import os import boris from .base import STATIC_URL # helper for building absolute paths PROJECT_ROOT = os.path.abspath(os.path.dirname(boris.__file__)) p = lambda x: os.path.join(PROJECT_ROOT, x) DATABASES = { 'default': { 'ENGINE': 'django.db.backends.mysql', 'NAME': 'boris', 'USER': ''...
import os import boris from .base import STATIC_URL # helper for building absolute paths PROJECT_ROOT = os.path.abspath(os.path.dirname(boris.__file__)) p = lambda x: os.path.join(PROJECT_ROOT, x) DATABASES = { 'default': { 'ENGINE': 'django.db.backends.sqlite3', 'NAME': 'boris.db', 'USER...
<commit_before>import os import boris from .base import STATIC_URL # helper for building absolute paths PROJECT_ROOT = os.path.abspath(os.path.dirname(boris.__file__)) p = lambda x: os.path.join(PROJECT_ROOT, x) DATABASES = { 'default': { 'ENGINE': 'django.db.backends.sqlite3', 'NAME': 'boris.db'...
a2d4381de5dc50110a0e57d7e56a668edbee2ccf
bot/utils.py
bot/utils.py
from discord import Embed def build_embed(ctx, desc: str, title: str = ''): name = ctx.message.server.me.nick if ctx.message.server.me.nick is not None else ctx.bot.user.name embed = Embed( title=title, description=desc ) embed.set_author(name=name, icon_url=ctx.bot.user.avatar_url) return embed
from enum import IntEnum from discord import Embed class OpStatus(IntEnum): SUCCESS = 0x2ECC71, FAILURE = 0xc0392B, WARNING = 0xf39C12 def build_embed(ctx, desc: str, title: str = '', status: OpStatus = OpStatus.SUCCESS) -> Embed: name = ctx.message.server.me.nick if ctx.message.server.me.nick is not None else ...
Add support for colored output in embeds
Add support for colored output in embeds
Python
apache-2.0
HellPie/discord-reply-bot
from discord import Embed def build_embed(ctx, desc: str, title: str = ''): name = ctx.message.server.me.nick if ctx.message.server.me.nick is not None else ctx.bot.user.name embed = Embed( title=title, description=desc ) embed.set_author(name=name, icon_url=ctx.bot.user.avatar_url) return embed Add support ...
from enum import IntEnum from discord import Embed class OpStatus(IntEnum): SUCCESS = 0x2ECC71, FAILURE = 0xc0392B, WARNING = 0xf39C12 def build_embed(ctx, desc: str, title: str = '', status: OpStatus = OpStatus.SUCCESS) -> Embed: name = ctx.message.server.me.nick if ctx.message.server.me.nick is not None else ...
<commit_before>from discord import Embed def build_embed(ctx, desc: str, title: str = ''): name = ctx.message.server.me.nick if ctx.message.server.me.nick is not None else ctx.bot.user.name embed = Embed( title=title, description=desc ) embed.set_author(name=name, icon_url=ctx.bot.user.avatar_url) return emb...
from enum import IntEnum from discord import Embed class OpStatus(IntEnum): SUCCESS = 0x2ECC71, FAILURE = 0xc0392B, WARNING = 0xf39C12 def build_embed(ctx, desc: str, title: str = '', status: OpStatus = OpStatus.SUCCESS) -> Embed: name = ctx.message.server.me.nick if ctx.message.server.me.nick is not None else ...
from discord import Embed def build_embed(ctx, desc: str, title: str = ''): name = ctx.message.server.me.nick if ctx.message.server.me.nick is not None else ctx.bot.user.name embed = Embed( title=title, description=desc ) embed.set_author(name=name, icon_url=ctx.bot.user.avatar_url) return embed Add support ...
<commit_before>from discord import Embed def build_embed(ctx, desc: str, title: str = ''): name = ctx.message.server.me.nick if ctx.message.server.me.nick is not None else ctx.bot.user.name embed = Embed( title=title, description=desc ) embed.set_author(name=name, icon_url=ctx.bot.user.avatar_url) return emb...
e44d32f18b438dc56bf483aecd3b9f3db03e6fae
gpn/graph.py
gpn/graph.py
# -*- coding: utf-8 -*- import os import pprint import warnings from gpn.node import Node suffix = '.node' suffix_default = '.node-default' class Graph(object): def __init__(self, path=None, nodes=None): global suffix global suffix_default assert not path or not nodes, ('Cannot specify b...
# -*- coding: utf-8 -*- import os import pprint import warnings from gpn.node import Node suffix = '.node' suffix_default = '.node-default' class Graph(object): def __init__(self, path=None, nodes=None): global suffix global suffix_default assert not path or not nodes, ('Cannot specify b...
Fix typo and minor formatting.
Fix typo and minor formatting.
Python
mit
shawnbrown/gpn,shawnbrown/gpn
# -*- coding: utf-8 -*- import os import pprint import warnings from gpn.node import Node suffix = '.node' suffix_default = '.node-default' class Graph(object): def __init__(self, path=None, nodes=None): global suffix global suffix_default assert not path or not nodes, ('Cannot specify b...
# -*- coding: utf-8 -*- import os import pprint import warnings from gpn.node import Node suffix = '.node' suffix_default = '.node-default' class Graph(object): def __init__(self, path=None, nodes=None): global suffix global suffix_default assert not path or not nodes, ('Cannot specify b...
<commit_before># -*- coding: utf-8 -*- import os import pprint import warnings from gpn.node import Node suffix = '.node' suffix_default = '.node-default' class Graph(object): def __init__(self, path=None, nodes=None): global suffix global suffix_default assert not path or not nodes, ('C...
# -*- coding: utf-8 -*- import os import pprint import warnings from gpn.node import Node suffix = '.node' suffix_default = '.node-default' class Graph(object): def __init__(self, path=None, nodes=None): global suffix global suffix_default assert not path or not nodes, ('Cannot specify b...
# -*- coding: utf-8 -*- import os import pprint import warnings from gpn.node import Node suffix = '.node' suffix_default = '.node-default' class Graph(object): def __init__(self, path=None, nodes=None): global suffix global suffix_default assert not path or not nodes, ('Cannot specify b...
<commit_before># -*- coding: utf-8 -*- import os import pprint import warnings from gpn.node import Node suffix = '.node' suffix_default = '.node-default' class Graph(object): def __init__(self, path=None, nodes=None): global suffix global suffix_default assert not path or not nodes, ('C...
81189460862be9d03c951c318df6ada2ffefb02f
functest/tests/unit/utils/test_utils.py
functest/tests/unit/utils/test_utils.py
#!/usr/bin/env python # Copyright (c) 2016 Orange and others. # # All rights reserved. This program and the accompanying materials # are made available under the terms of the Apache License, Version 2.0 # which accompanies this distribution, and is available at # http://www.apache.org/licenses/LICENSE-2.0 import logg...
#!/usr/bin/env python # Copyright (c) 2016 Orange and others. # # All rights reserved. This program and the accompanying materials # are made available under the terms of the Apache License, Version 2.0 # which accompanies this distribution, and is available at # http://www.apache.org/licenses/LICENSE-2.0 import logg...
Allow unit testing w/o internet connectivity
Allow unit testing w/o internet connectivity urllib2.urlopen() is now patched when testing the internet connectivity helper. Change-Id: I4ddf1dd8f494fe282735e1051986a0b5dd1a040f Signed-off-by: Cédric Ollivier <[email protected]>
Python
apache-2.0
mywulin/functest,opnfv/functest,mywulin/functest,opnfv/functest
#!/usr/bin/env python # Copyright (c) 2016 Orange and others. # # All rights reserved. This program and the accompanying materials # are made available under the terms of the Apache License, Version 2.0 # which accompanies this distribution, and is available at # http://www.apache.org/licenses/LICENSE-2.0 import logg...
#!/usr/bin/env python # Copyright (c) 2016 Orange and others. # # All rights reserved. This program and the accompanying materials # are made available under the terms of the Apache License, Version 2.0 # which accompanies this distribution, and is available at # http://www.apache.org/licenses/LICENSE-2.0 import logg...
<commit_before>#!/usr/bin/env python # Copyright (c) 2016 Orange and others. # # All rights reserved. This program and the accompanying materials # are made available under the terms of the Apache License, Version 2.0 # which accompanies this distribution, and is available at # http://www.apache.org/licenses/LICENSE-2...
#!/usr/bin/env python # Copyright (c) 2016 Orange and others. # # All rights reserved. This program and the accompanying materials # are made available under the terms of the Apache License, Version 2.0 # which accompanies this distribution, and is available at # http://www.apache.org/licenses/LICENSE-2.0 import logg...
#!/usr/bin/env python # Copyright (c) 2016 Orange and others. # # All rights reserved. This program and the accompanying materials # are made available under the terms of the Apache License, Version 2.0 # which accompanies this distribution, and is available at # http://www.apache.org/licenses/LICENSE-2.0 import logg...
<commit_before>#!/usr/bin/env python # Copyright (c) 2016 Orange and others. # # All rights reserved. This program and the accompanying materials # are made available under the terms of the Apache License, Version 2.0 # which accompanies this distribution, and is available at # http://www.apache.org/licenses/LICENSE-2...
23d5d0e0e77dc0b0816df51a8a1e42bc4069112b
rst2pdf/style2yaml.py
rst2pdf/style2yaml.py
#!/usr/bin/env python3 # SPDX-License-Identifier: MIT """Convert older RSON stylesheets to YAML format Run the script with the filename to convert, it outputs to stdout """ import argparse import json import yaml from rst2pdf.dumpstyle import fixstyle from rst2pdf.rson import loads as rloads def main(): pars...
#!/usr/bin/env python3 # SPDX-License-Identifier: MIT """Convert older RSON stylesheets to YAML format Run the script with this list of filenames to convert. It outputs to stdout, or use the --save3 flag to have it create .yaml files """ import argparse import json import os import yaml from rst2pdf.dumpstyle impo...
Add save functionality to the conversion script
Add save functionality to the conversion script
Python
mit
rst2pdf/rst2pdf,rst2pdf/rst2pdf
#!/usr/bin/env python3 # SPDX-License-Identifier: MIT """Convert older RSON stylesheets to YAML format Run the script with the filename to convert, it outputs to stdout """ import argparse import json import yaml from rst2pdf.dumpstyle import fixstyle from rst2pdf.rson import loads as rloads def main(): pars...
#!/usr/bin/env python3 # SPDX-License-Identifier: MIT """Convert older RSON stylesheets to YAML format Run the script with this list of filenames to convert. It outputs to stdout, or use the --save3 flag to have it create .yaml files """ import argparse import json import os import yaml from rst2pdf.dumpstyle impo...
<commit_before>#!/usr/bin/env python3 # SPDX-License-Identifier: MIT """Convert older RSON stylesheets to YAML format Run the script with the filename to convert, it outputs to stdout """ import argparse import json import yaml from rst2pdf.dumpstyle import fixstyle from rst2pdf.rson import loads as rloads def m...
#!/usr/bin/env python3 # SPDX-License-Identifier: MIT """Convert older RSON stylesheets to YAML format Run the script with this list of filenames to convert. It outputs to stdout, or use the --save3 flag to have it create .yaml files """ import argparse import json import os import yaml from rst2pdf.dumpstyle impo...
#!/usr/bin/env python3 # SPDX-License-Identifier: MIT """Convert older RSON stylesheets to YAML format Run the script with the filename to convert, it outputs to stdout """ import argparse import json import yaml from rst2pdf.dumpstyle import fixstyle from rst2pdf.rson import loads as rloads def main(): pars...
<commit_before>#!/usr/bin/env python3 # SPDX-License-Identifier: MIT """Convert older RSON stylesheets to YAML format Run the script with the filename to convert, it outputs to stdout """ import argparse import json import yaml from rst2pdf.dumpstyle import fixstyle from rst2pdf.rson import loads as rloads def m...
e380ef8d890db4cd21ab9ceb943a38758526976f
numba/tests/issues/test_issue_184.py
numba/tests/issues/test_issue_184.py
import sys from numba import * import numpy as np @jit(object_(double[:, :])) def func2(A): L = [] n = A.shape[0] for i in range(10): for j in range(10): temp = A[i-n : i+n+1, j-2 : j+n+1] L.append(temp) return L A = np.empty(1000000, dtype=np.double).reshape(1000, 100...
import sys from numba import * import numpy as np @jit(object_(double[:, :])) def func2(A): L = [] n = A.shape[0] for i in range(10): for j in range(10): temp = A[i-n : i+n+1, j-2 : j+n+1] L.append(temp) return L A = np.empty(1000000, dtype=np.double).reshape(1000, 100...
Fix test 184 for python 3
Fix test 184 for python 3
Python
bsd-2-clause
gdementen/numba,seibert/numba,numba/numba,ssarangi/numba,pombredanne/numba,pitrou/numba,cpcloud/numba,gmarkall/numba,ssarangi/numba,stefanseefeld/numba,gmarkall/numba,seibert/numba,stuartarchibald/numba,IntelLabs/numba,GaZ3ll3/numba,stefanseefeld/numba,gdementen/numba,stefanseefeld/numba,gmarkall/numba,pombredanne/numb...
import sys from numba import * import numpy as np @jit(object_(double[:, :])) def func2(A): L = [] n = A.shape[0] for i in range(10): for j in range(10): temp = A[i-n : i+n+1, j-2 : j+n+1] L.append(temp) return L A = np.empty(1000000, dtype=np.double).reshape(1000, 100...
import sys from numba import * import numpy as np @jit(object_(double[:, :])) def func2(A): L = [] n = A.shape[0] for i in range(10): for j in range(10): temp = A[i-n : i+n+1, j-2 : j+n+1] L.append(temp) return L A = np.empty(1000000, dtype=np.double).reshape(1000, 100...
<commit_before>import sys from numba import * import numpy as np @jit(object_(double[:, :])) def func2(A): L = [] n = A.shape[0] for i in range(10): for j in range(10): temp = A[i-n : i+n+1, j-2 : j+n+1] L.append(temp) return L A = np.empty(1000000, dtype=np.double).re...
import sys from numba import * import numpy as np @jit(object_(double[:, :])) def func2(A): L = [] n = A.shape[0] for i in range(10): for j in range(10): temp = A[i-n : i+n+1, j-2 : j+n+1] L.append(temp) return L A = np.empty(1000000, dtype=np.double).reshape(1000, 100...
import sys from numba import * import numpy as np @jit(object_(double[:, :])) def func2(A): L = [] n = A.shape[0] for i in range(10): for j in range(10): temp = A[i-n : i+n+1, j-2 : j+n+1] L.append(temp) return L A = np.empty(1000000, dtype=np.double).reshape(1000, 100...
<commit_before>import sys from numba import * import numpy as np @jit(object_(double[:, :])) def func2(A): L = [] n = A.shape[0] for i in range(10): for j in range(10): temp = A[i-n : i+n+1, j-2 : j+n+1] L.append(temp) return L A = np.empty(1000000, dtype=np.double).re...
5439f17fb2ebea7f8c5695c79324c29c483bfb78
wger/nutrition/migrations/0004_auto_20200819_2310.py
wger/nutrition/migrations/0004_auto_20200819_2310.py
# Generated by Django 3.1 on 2020-08-19 21:10 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('nutrition', '0003_auto_20170118_2308'), ] operations = [ migrations.AlterField( model_name='nutritionplan', name='desc...
# flake8: noqa # Generated by Django 3.1 on 2020-08-19 21:10 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('nutrition', '0003_auto_20170118_2308'), ] operations = [ migrations.AlterField( model_name='nutritionplan', ...
Add noqa flag to migration file
Add noqa flag to migration file
Python
agpl-3.0
rolandgeider/wger,petervanderdoes/wger,wger-project/wger,rolandgeider/wger,petervanderdoes/wger,wger-project/wger,petervanderdoes/wger,petervanderdoes/wger,rolandgeider/wger,rolandgeider/wger,wger-project/wger,wger-project/wger
# Generated by Django 3.1 on 2020-08-19 21:10 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('nutrition', '0003_auto_20170118_2308'), ] operations = [ migrations.AlterField( model_name='nutritionplan', name='desc...
# flake8: noqa # Generated by Django 3.1 on 2020-08-19 21:10 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('nutrition', '0003_auto_20170118_2308'), ] operations = [ migrations.AlterField( model_name='nutritionplan', ...
<commit_before># Generated by Django 3.1 on 2020-08-19 21:10 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('nutrition', '0003_auto_20170118_2308'), ] operations = [ migrations.AlterField( model_name='nutritionplan', ...
# flake8: noqa # Generated by Django 3.1 on 2020-08-19 21:10 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('nutrition', '0003_auto_20170118_2308'), ] operations = [ migrations.AlterField( model_name='nutritionplan', ...
# Generated by Django 3.1 on 2020-08-19 21:10 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('nutrition', '0003_auto_20170118_2308'), ] operations = [ migrations.AlterField( model_name='nutritionplan', name='desc...
<commit_before># Generated by Django 3.1 on 2020-08-19 21:10 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('nutrition', '0003_auto_20170118_2308'), ] operations = [ migrations.AlterField( model_name='nutritionplan', ...
2dfe6e78088f974310c1e7fc309f008310be0080
dask_ndmeasure/_utils.py
dask_ndmeasure/_utils.py
# -*- coding: utf-8 -*- import operator import numpy import dask.array from . import _compat def _norm_input_labels_index(input, labels=None, index=None): """ Normalize arguments to a standard form. """ input = _compat._asarray(input) if labels is None: labels = (input != 0).astype(...
# -*- coding: utf-8 -*- import operator import numpy import dask.array from . import _compat def _norm_input_labels_index(input, labels=None, index=None): """ Normalize arguments to a standard form. """ input = _compat._asarray(input) if labels is None: labels = (input != 0).astype(...
Simplify the label matches function
Simplify the label matches function Focus only creating a mask of selected labels and none of the other products that this function was creating before.
Python
bsd-3-clause
dask-image/dask-ndmeasure
# -*- coding: utf-8 -*- import operator import numpy import dask.array from . import _compat def _norm_input_labels_index(input, labels=None, index=None): """ Normalize arguments to a standard form. """ input = _compat._asarray(input) if labels is None: labels = (input != 0).astype(...
# -*- coding: utf-8 -*- import operator import numpy import dask.array from . import _compat def _norm_input_labels_index(input, labels=None, index=None): """ Normalize arguments to a standard form. """ input = _compat._asarray(input) if labels is None: labels = (input != 0).astype(...
<commit_before># -*- coding: utf-8 -*- import operator import numpy import dask.array from . import _compat def _norm_input_labels_index(input, labels=None, index=None): """ Normalize arguments to a standard form. """ input = _compat._asarray(input) if labels is None: labels = (inpu...
# -*- coding: utf-8 -*- import operator import numpy import dask.array from . import _compat def _norm_input_labels_index(input, labels=None, index=None): """ Normalize arguments to a standard form. """ input = _compat._asarray(input) if labels is None: labels = (input != 0).astype(...
# -*- coding: utf-8 -*- import operator import numpy import dask.array from . import _compat def _norm_input_labels_index(input, labels=None, index=None): """ Normalize arguments to a standard form. """ input = _compat._asarray(input) if labels is None: labels = (input != 0).astype(...
<commit_before># -*- coding: utf-8 -*- import operator import numpy import dask.array from . import _compat def _norm_input_labels_index(input, labels=None, index=None): """ Normalize arguments to a standard form. """ input = _compat._asarray(input) if labels is None: labels = (inpu...
c790e1dd756495f0e34ff3c2cdadb02b4d6ee320
protocols/admin.py
protocols/admin.py
from django.contrib import admin from .models import Protocol, Topic, Institution class ProtocolAdmin(admin.ModelAdmin): list_display = ['number', 'start_time', 'get_topics', 'information', 'majority', 'current_majority', 'get_absent'] list_display_links = ['number'] list_filter = ['topics'] search...
from django.contrib import admin from .models import Protocol, Topic, Institution class ProtocolAdmin(admin.ModelAdmin): list_display = ['number', 'start_time', 'get_topics', 'information', 'majority', 'current_majority', 'institution'] list_display_links = ['number'] list_filter = ['institution__name',...
Change search and list fields
Change search and list fields
Python
mit
Hackfmi/Diaphanum,Hackfmi/Diaphanum
from django.contrib import admin from .models import Protocol, Topic, Institution class ProtocolAdmin(admin.ModelAdmin): list_display = ['number', 'start_time', 'get_topics', 'information', 'majority', 'current_majority', 'get_absent'] list_display_links = ['number'] list_filter = ['topics'] search...
from django.contrib import admin from .models import Protocol, Topic, Institution class ProtocolAdmin(admin.ModelAdmin): list_display = ['number', 'start_time', 'get_topics', 'information', 'majority', 'current_majority', 'institution'] list_display_links = ['number'] list_filter = ['institution__name',...
<commit_before>from django.contrib import admin from .models import Protocol, Topic, Institution class ProtocolAdmin(admin.ModelAdmin): list_display = ['number', 'start_time', 'get_topics', 'information', 'majority', 'current_majority', 'get_absent'] list_display_links = ['number'] list_filter = ['topic...
from django.contrib import admin from .models import Protocol, Topic, Institution class ProtocolAdmin(admin.ModelAdmin): list_display = ['number', 'start_time', 'get_topics', 'information', 'majority', 'current_majority', 'institution'] list_display_links = ['number'] list_filter = ['institution__name',...
from django.contrib import admin from .models import Protocol, Topic, Institution class ProtocolAdmin(admin.ModelAdmin): list_display = ['number', 'start_time', 'get_topics', 'information', 'majority', 'current_majority', 'get_absent'] list_display_links = ['number'] list_filter = ['topics'] search...
<commit_before>from django.contrib import admin from .models import Protocol, Topic, Institution class ProtocolAdmin(admin.ModelAdmin): list_display = ['number', 'start_time', 'get_topics', 'information', 'majority', 'current_majority', 'get_absent'] list_display_links = ['number'] list_filter = ['topic...
299fed5e4531b9cf3bc6043f69b4c7c4db62b6dc
proxy/data/clients.py
proxy/data/clients.py
import blocks connectedClients = {} class ClientData(object): """docstring for ClientData""" def __init__(self, ipAddress, segaId, handle): self.ipAddress = ipAddress self.segaId = segaId self.handle = handle def getHandle(self): return self.handle def setHandle(self, handle): self.handle = handle def ...
import blocks connectedClients = {} class ClientData(object): """docstring for ClientData""" def __init__(self, ipAddress, segaId, handle): self.ipAddress = ipAddress self.segaId = segaId self.handle = handle def getHandle(self): return self.handle def setHandle(self, handle): self.handle = handle def ...
Update SEGA Id in server side too
Update SEGA Id in server side too
Python
agpl-3.0
alama/PSO2Proxy,cyberkitsune/PSO2Proxy,alama/PSO2Proxy,cyberkitsune/PSO2Proxy,cyberkitsune/PSO2Proxy,flyergo/PSO2Proxy,flyergo/PSO2Proxy,alama/PSO2Proxy
import blocks connectedClients = {} class ClientData(object): """docstring for ClientData""" def __init__(self, ipAddress, segaId, handle): self.ipAddress = ipAddress self.segaId = segaId self.handle = handle def getHandle(self): return self.handle def setHandle(self, handle): self.handle = handle def ...
import blocks connectedClients = {} class ClientData(object): """docstring for ClientData""" def __init__(self, ipAddress, segaId, handle): self.ipAddress = ipAddress self.segaId = segaId self.handle = handle def getHandle(self): return self.handle def setHandle(self, handle): self.handle = handle def ...
<commit_before>import blocks connectedClients = {} class ClientData(object): """docstring for ClientData""" def __init__(self, ipAddress, segaId, handle): self.ipAddress = ipAddress self.segaId = segaId self.handle = handle def getHandle(self): return self.handle def setHandle(self, handle): self.handle...
import blocks connectedClients = {} class ClientData(object): """docstring for ClientData""" def __init__(self, ipAddress, segaId, handle): self.ipAddress = ipAddress self.segaId = segaId self.handle = handle def getHandle(self): return self.handle def setHandle(self, handle): self.handle = handle def ...
import blocks connectedClients = {} class ClientData(object): """docstring for ClientData""" def __init__(self, ipAddress, segaId, handle): self.ipAddress = ipAddress self.segaId = segaId self.handle = handle def getHandle(self): return self.handle def setHandle(self, handle): self.handle = handle def ...
<commit_before>import blocks connectedClients = {} class ClientData(object): """docstring for ClientData""" def __init__(self, ipAddress, segaId, handle): self.ipAddress = ipAddress self.segaId = segaId self.handle = handle def getHandle(self): return self.handle def setHandle(self, handle): self.handle...
c74cb57a8c0186b4186319018a1ed6d7f3687882
celery/tests/test_serialization.py
celery/tests/test_serialization.py
import sys import unittest class TestAAPickle(unittest.TestCase): def test_no_cpickle(self): from celery.tests.utils import mask_modules del(sys.modules["celery.serialization"]) with mask_modules("cPickle"): from celery.serialization import pickle import pickle as ...
from __future__ import with_statement import sys import unittest class TestAAPickle(unittest.TestCase): def test_no_cpickle(self): from celery.tests.utils import mask_modules del(sys.modules["celery.serialization"]) with mask_modules("cPickle"): from celery.serialization impor...
Make tests pass in Python 2.5 by importing with_statement from __future__
Make tests pass in Python 2.5 by importing with_statement from __future__
Python
bsd-3-clause
frac/celery,WoLpH/celery,mitsuhiko/celery,frac/celery,ask/celery,cbrepo/celery,WoLpH/celery,cbrepo/celery,ask/celery,mitsuhiko/celery
import sys import unittest class TestAAPickle(unittest.TestCase): def test_no_cpickle(self): from celery.tests.utils import mask_modules del(sys.modules["celery.serialization"]) with mask_modules("cPickle"): from celery.serialization import pickle import pickle as ...
from __future__ import with_statement import sys import unittest class TestAAPickle(unittest.TestCase): def test_no_cpickle(self): from celery.tests.utils import mask_modules del(sys.modules["celery.serialization"]) with mask_modules("cPickle"): from celery.serialization impor...
<commit_before>import sys import unittest class TestAAPickle(unittest.TestCase): def test_no_cpickle(self): from celery.tests.utils import mask_modules del(sys.modules["celery.serialization"]) with mask_modules("cPickle"): from celery.serialization import pickle im...
from __future__ import with_statement import sys import unittest class TestAAPickle(unittest.TestCase): def test_no_cpickle(self): from celery.tests.utils import mask_modules del(sys.modules["celery.serialization"]) with mask_modules("cPickle"): from celery.serialization impor...
import sys import unittest class TestAAPickle(unittest.TestCase): def test_no_cpickle(self): from celery.tests.utils import mask_modules del(sys.modules["celery.serialization"]) with mask_modules("cPickle"): from celery.serialization import pickle import pickle as ...
<commit_before>import sys import unittest class TestAAPickle(unittest.TestCase): def test_no_cpickle(self): from celery.tests.utils import mask_modules del(sys.modules["celery.serialization"]) with mask_modules("cPickle"): from celery.serialization import pickle im...
adb658a874a7d0437607bf828e99adf2dee74438
openassessment/fileupload/backends/__init__.py
openassessment/fileupload/backends/__init__.py
""" File Upload backends. """ from django.conf import settings from . import django_storage, filesystem, s3, swift def get_backend(): # Use S3 backend by default (current behaviour) backend_setting = getattr(settings, "ORA2_FILEUPLOAD_BACKEND", "s3") if backend_setting == "s3": return s3.Backen...
""" File Upload backends. """ from django.conf import settings from . import django_storage, filesystem, s3, swift def get_backend(): # .. setting_name: ORA2_FILEUPLOAD_BACKEND # .. setting_default: s3 # .. setting_description: The backend used to upload the ora2 submissions attachments # the s...
Add annotation for ORA2_FILEUPLOAD_BACKEND setting
Add annotation for ORA2_FILEUPLOAD_BACKEND setting
Python
agpl-3.0
edx/edx-ora2,edx/edx-ora2,EDUlib/edx-ora2,edx/edx-ora2,EDUlib/edx-ora2,EDUlib/edx-ora2,EDUlib/edx-ora2,edx/edx-ora2
""" File Upload backends. """ from django.conf import settings from . import django_storage, filesystem, s3, swift def get_backend(): # Use S3 backend by default (current behaviour) backend_setting = getattr(settings, "ORA2_FILEUPLOAD_BACKEND", "s3") if backend_setting == "s3": return s3.Backen...
""" File Upload backends. """ from django.conf import settings from . import django_storage, filesystem, s3, swift def get_backend(): # .. setting_name: ORA2_FILEUPLOAD_BACKEND # .. setting_default: s3 # .. setting_description: The backend used to upload the ora2 submissions attachments # the s...
<commit_before>""" File Upload backends. """ from django.conf import settings from . import django_storage, filesystem, s3, swift def get_backend(): # Use S3 backend by default (current behaviour) backend_setting = getattr(settings, "ORA2_FILEUPLOAD_BACKEND", "s3") if backend_setting == "s3": r...
""" File Upload backends. """ from django.conf import settings from . import django_storage, filesystem, s3, swift def get_backend(): # .. setting_name: ORA2_FILEUPLOAD_BACKEND # .. setting_default: s3 # .. setting_description: The backend used to upload the ora2 submissions attachments # the s...
""" File Upload backends. """ from django.conf import settings from . import django_storage, filesystem, s3, swift def get_backend(): # Use S3 backend by default (current behaviour) backend_setting = getattr(settings, "ORA2_FILEUPLOAD_BACKEND", "s3") if backend_setting == "s3": return s3.Backen...
<commit_before>""" File Upload backends. """ from django.conf import settings from . import django_storage, filesystem, s3, swift def get_backend(): # Use S3 backend by default (current behaviour) backend_setting = getattr(settings, "ORA2_FILEUPLOAD_BACKEND", "s3") if backend_setting == "s3": r...
b84dff394f4c9b0b5aeaeb6bdc1d67ef4a9f02e0
neuroimaging/setup.py
neuroimaging/setup.py
import os def configuration(parent_package='',top_path=None): from numpy.distutils.misc_util import Configuration config = Configuration('neuroimaging', parent_package, top_path) config.add_subpackage('algorithms') config.add_subpackage('core') config.add_subpackage('data_io') config.add_subpa...
import os def configuration(parent_package='',top_path=None): from numpy.distutils.misc_util import Configuration config = Configuration('neuroimaging', parent_package, top_path) config.add_subpackage('algorithms') config.add_subpackage('core') config.add_subpackage('externals') config.add_sub...
Change neuroimaging package list data_io to io.
Change neuroimaging package list data_io to io.
Python
bsd-3-clause
yarikoptic/NiPy-OLD,yarikoptic/NiPy-OLD
import os def configuration(parent_package='',top_path=None): from numpy.distutils.misc_util import Configuration config = Configuration('neuroimaging', parent_package, top_path) config.add_subpackage('algorithms') config.add_subpackage('core') config.add_subpackage('data_io') config.add_subpa...
import os def configuration(parent_package='',top_path=None): from numpy.distutils.misc_util import Configuration config = Configuration('neuroimaging', parent_package, top_path) config.add_subpackage('algorithms') config.add_subpackage('core') config.add_subpackage('externals') config.add_sub...
<commit_before>import os def configuration(parent_package='',top_path=None): from numpy.distutils.misc_util import Configuration config = Configuration('neuroimaging', parent_package, top_path) config.add_subpackage('algorithms') config.add_subpackage('core') config.add_subpackage('data_io') c...
import os def configuration(parent_package='',top_path=None): from numpy.distutils.misc_util import Configuration config = Configuration('neuroimaging', parent_package, top_path) config.add_subpackage('algorithms') config.add_subpackage('core') config.add_subpackage('externals') config.add_sub...
import os def configuration(parent_package='',top_path=None): from numpy.distutils.misc_util import Configuration config = Configuration('neuroimaging', parent_package, top_path) config.add_subpackage('algorithms') config.add_subpackage('core') config.add_subpackage('data_io') config.add_subpa...
<commit_before>import os def configuration(parent_package='',top_path=None): from numpy.distutils.misc_util import Configuration config = Configuration('neuroimaging', parent_package, top_path) config.add_subpackage('algorithms') config.add_subpackage('core') config.add_subpackage('data_io') c...
b7f2efe79e5a91ab78850842eafc73d1ee0a52cc
shortuuid/__init__.py
shortuuid/__init__.py
from shortuuid.main import ( encode, decode, uuid, get_alphabet, set_alphabet, ShortUUID, )
from shortuuid.main import ( encode, decode, uuid, random, get_alphabet, set_alphabet, ShortUUID, )
Include `random` in imports from shortuuid.main
Include `random` in imports from shortuuid.main When `random` was added to `main.py` the `__init__.py` file wasn't updated to expose it. Currently, to use, you have to do: `import shortuuid; shortuuid.main.random(24)`. With these changes you can do `import shortuuid; shortuuid.random()`. This better mirrors the behavi...
Python
bsd-3-clause
skorokithakis/shortuuid,stochastic-technologies/shortuuid
from shortuuid.main import ( encode, decode, uuid, get_alphabet, set_alphabet, ShortUUID, ) Include `random` in imports from shortuuid.main When `random` was added to `main.py` the `__init__.py` file wasn't updated to expose it. Currently, to use, you have to do: `import shortuuid; shortuuid.ma...
from shortuuid.main import ( encode, decode, uuid, random, get_alphabet, set_alphabet, ShortUUID, )
<commit_before>from shortuuid.main import ( encode, decode, uuid, get_alphabet, set_alphabet, ShortUUID, ) <commit_msg>Include `random` in imports from shortuuid.main When `random` was added to `main.py` the `__init__.py` file wasn't updated to expose it. Currently, to use, you have to do: `imp...
from shortuuid.main import ( encode, decode, uuid, random, get_alphabet, set_alphabet, ShortUUID, )
from shortuuid.main import ( encode, decode, uuid, get_alphabet, set_alphabet, ShortUUID, ) Include `random` in imports from shortuuid.main When `random` was added to `main.py` the `__init__.py` file wasn't updated to expose it. Currently, to use, you have to do: `import shortuuid; shortuuid.ma...
<commit_before>from shortuuid.main import ( encode, decode, uuid, get_alphabet, set_alphabet, ShortUUID, ) <commit_msg>Include `random` in imports from shortuuid.main When `random` was added to `main.py` the `__init__.py` file wasn't updated to expose it. Currently, to use, you have to do: `imp...
4d8c7aea5e808075a68d810fb7c966808ad28bca
scripts/upload_2_crowdai.py
scripts/upload_2_crowdai.py
#!/usr/bin/env python try: import crowdai except: raise Exception("Please install the `crowdai` python client by : pip install crowdai") import argparse parser = argparse.ArgumentParser(description='Upload saved docker environments to crowdai for grading') parser.add_argument('--api_key', dest='api_key', action...
#!/usr/bin/env python try: import crowdai except: raise Exception("Please install the `crowdai` python client by : pip install crowdai") import argparse parser = argparse.ArgumentParser(description='Upload saved docker environments to crowdai for grading') parser.add_argument('--api_key', dest='api_key', action...
Use parseargs reference for docker_container
Use parseargs reference for docker_container
Python
mit
stanfordnmbl/osim-rl,vzhuang/osim-rl
#!/usr/bin/env python try: import crowdai except: raise Exception("Please install the `crowdai` python client by : pip install crowdai") import argparse parser = argparse.ArgumentParser(description='Upload saved docker environments to crowdai for grading') parser.add_argument('--api_key', dest='api_key', action...
#!/usr/bin/env python try: import crowdai except: raise Exception("Please install the `crowdai` python client by : pip install crowdai") import argparse parser = argparse.ArgumentParser(description='Upload saved docker environments to crowdai for grading') parser.add_argument('--api_key', dest='api_key', action...
<commit_before>#!/usr/bin/env python try: import crowdai except: raise Exception("Please install the `crowdai` python client by : pip install crowdai") import argparse parser = argparse.ArgumentParser(description='Upload saved docker environments to crowdai for grading') parser.add_argument('--api_key', dest='a...
#!/usr/bin/env python try: import crowdai except: raise Exception("Please install the `crowdai` python client by : pip install crowdai") import argparse parser = argparse.ArgumentParser(description='Upload saved docker environments to crowdai for grading') parser.add_argument('--api_key', dest='api_key', action...
#!/usr/bin/env python try: import crowdai except: raise Exception("Please install the `crowdai` python client by : pip install crowdai") import argparse parser = argparse.ArgumentParser(description='Upload saved docker environments to crowdai for grading') parser.add_argument('--api_key', dest='api_key', action...
<commit_before>#!/usr/bin/env python try: import crowdai except: raise Exception("Please install the `crowdai` python client by : pip install crowdai") import argparse parser = argparse.ArgumentParser(description='Upload saved docker environments to crowdai for grading') parser.add_argument('--api_key', dest='a...
2db6e8e294059847251feb9610c42180ae44e05b
fbone/appointment/views.py
fbone/appointment/views.py
# -*- coding: utf-8 -*- from flask import (Blueprint, render_template, request, flash, url_for, redirect, session) from flask.ext.mail import Message from ..extensions import db, mail from .forms import MakeAppointmentForm from .models import Appointment appointment = Blueprint('appointment', __n...
# -*- coding: utf-8 -*- from datetime import datetime from flask import (Blueprint, render_template, request, abort, flash, url_for, redirect, session) from flask.ext.mail import Message from ..extensions import db, mail from .forms import MakeAppointmentForm from .models import Appointment appo...
Fix some error about session.
Fix some error about session.
Python
bsd-3-clause
wpic/flask-appointment-calendar,wpic/flask-appointment-calendar
# -*- coding: utf-8 -*- from flask import (Blueprint, render_template, request, flash, url_for, redirect, session) from flask.ext.mail import Message from ..extensions import db, mail from .forms import MakeAppointmentForm from .models import Appointment appointment = Blueprint('appointment', __n...
# -*- coding: utf-8 -*- from datetime import datetime from flask import (Blueprint, render_template, request, abort, flash, url_for, redirect, session) from flask.ext.mail import Message from ..extensions import db, mail from .forms import MakeAppointmentForm from .models import Appointment appo...
<commit_before># -*- coding: utf-8 -*- from flask import (Blueprint, render_template, request, flash, url_for, redirect, session) from flask.ext.mail import Message from ..extensions import db, mail from .forms import MakeAppointmentForm from .models import Appointment appointment = Blueprint('ap...
# -*- coding: utf-8 -*- from datetime import datetime from flask import (Blueprint, render_template, request, abort, flash, url_for, redirect, session) from flask.ext.mail import Message from ..extensions import db, mail from .forms import MakeAppointmentForm from .models import Appointment appo...
# -*- coding: utf-8 -*- from flask import (Blueprint, render_template, request, flash, url_for, redirect, session) from flask.ext.mail import Message from ..extensions import db, mail from .forms import MakeAppointmentForm from .models import Appointment appointment = Blueprint('appointment', __n...
<commit_before># -*- coding: utf-8 -*- from flask import (Blueprint, render_template, request, flash, url_for, redirect, session) from flask.ext.mail import Message from ..extensions import db, mail from .forms import MakeAppointmentForm from .models import Appointment appointment = Blueprint('ap...
f694b582e72412d4022d6ff21a97d32f77484b9b
heap/heap.py
heap/heap.py
# -*- coding:utf-8 -*- import numpy as np class ArrayHeap(object): def __init__(self, sz, data = None): self.sz = sz self.cnt = 0 self.heap = [0 for i in range(sz + 1)] if data is not None: for i, val in enumerate(data): self.heap[i + 1] = val ...
# -*- coding:utf-8 -*- import numpy as np class MaxHeap(object): def __init__(self, sz, data): self.sz = sz self.heap = [0] * (sz + 1) self.cnt = len(data) self.heap[1: self.cnt + 1] = data self.build_heap() def build_heap(self): last_non_leaf = se...
Rename the class named ArrayHeap to the class named MaxHeap. Simplify __init__ method code to make it readable
Rename the class named ArrayHeap to the class named MaxHeap. Simplify __init__ method code to make it readable
Python
apache-2.0
free-free/algorithm,free-free/algorithm
# -*- coding:utf-8 -*- import numpy as np class ArrayHeap(object): def __init__(self, sz, data = None): self.sz = sz self.cnt = 0 self.heap = [0 for i in range(sz + 1)] if data is not None: for i, val in enumerate(data): self.heap[i + 1] = val ...
# -*- coding:utf-8 -*- import numpy as np class MaxHeap(object): def __init__(self, sz, data): self.sz = sz self.heap = [0] * (sz + 1) self.cnt = len(data) self.heap[1: self.cnt + 1] = data self.build_heap() def build_heap(self): last_non_leaf = se...
<commit_before># -*- coding:utf-8 -*- import numpy as np class ArrayHeap(object): def __init__(self, sz, data = None): self.sz = sz self.cnt = 0 self.heap = [0 for i in range(sz + 1)] if data is not None: for i, val in enumerate(data): self.heap[i +...
# -*- coding:utf-8 -*- import numpy as np class MaxHeap(object): def __init__(self, sz, data): self.sz = sz self.heap = [0] * (sz + 1) self.cnt = len(data) self.heap[1: self.cnt + 1] = data self.build_heap() def build_heap(self): last_non_leaf = se...
# -*- coding:utf-8 -*- import numpy as np class ArrayHeap(object): def __init__(self, sz, data = None): self.sz = sz self.cnt = 0 self.heap = [0 for i in range(sz + 1)] if data is not None: for i, val in enumerate(data): self.heap[i + 1] = val ...
<commit_before># -*- coding:utf-8 -*- import numpy as np class ArrayHeap(object): def __init__(self, sz, data = None): self.sz = sz self.cnt = 0 self.heap = [0 for i in range(sz + 1)] if data is not None: for i, val in enumerate(data): self.heap[i +...
5d6b729232e086212ea46590d80b02366ae5a236
bin/start.py
bin/start.py
#!/usr/bin/python import sys, os from paste.deploy import loadapp, loadserver import logging if __name__ == '__main__': logging.basicConfig(filename = '/var/log/reporting-api.log', level = logging.INFO) realfile = os.path.realpath(__file__) realdir = os.path.dirname(realfile) pardir = os.path.realpath(os.path.joi...
#!/usr/bin/python import sys, os from paste.deploy import loadapp, loadserver import logging if __name__ == '__main__': logging.basicConfig(filename = '/var/log/reporting-api.log', level = logging.INFO) realfile = os.path.realpath(__file__) realdir = os.path.dirname(realfile) pardir = os.path.realpath(os.path.joi...
Insert the path to the source tree at the front of the python path rather than at the end. Something broken got put into some one of the python include directories somehow.
Insert the path to the source tree at the front of the python path rather than at the end. Something broken got put into some one of the python include directories somehow.
Python
apache-2.0
NCI-Cloud/reporting-api,NCI-Cloud/reporting-api,NeCTAR-RC/reporting-api,NeCTAR-RC/reporting-api
#!/usr/bin/python import sys, os from paste.deploy import loadapp, loadserver import logging if __name__ == '__main__': logging.basicConfig(filename = '/var/log/reporting-api.log', level = logging.INFO) realfile = os.path.realpath(__file__) realdir = os.path.dirname(realfile) pardir = os.path.realpath(os.path.joi...
#!/usr/bin/python import sys, os from paste.deploy import loadapp, loadserver import logging if __name__ == '__main__': logging.basicConfig(filename = '/var/log/reporting-api.log', level = logging.INFO) realfile = os.path.realpath(__file__) realdir = os.path.dirname(realfile) pardir = os.path.realpath(os.path.joi...
<commit_before>#!/usr/bin/python import sys, os from paste.deploy import loadapp, loadserver import logging if __name__ == '__main__': logging.basicConfig(filename = '/var/log/reporting-api.log', level = logging.INFO) realfile = os.path.realpath(__file__) realdir = os.path.dirname(realfile) pardir = os.path.realp...
#!/usr/bin/python import sys, os from paste.deploy import loadapp, loadserver import logging if __name__ == '__main__': logging.basicConfig(filename = '/var/log/reporting-api.log', level = logging.INFO) realfile = os.path.realpath(__file__) realdir = os.path.dirname(realfile) pardir = os.path.realpath(os.path.joi...
#!/usr/bin/python import sys, os from paste.deploy import loadapp, loadserver import logging if __name__ == '__main__': logging.basicConfig(filename = '/var/log/reporting-api.log', level = logging.INFO) realfile = os.path.realpath(__file__) realdir = os.path.dirname(realfile) pardir = os.path.realpath(os.path.joi...
<commit_before>#!/usr/bin/python import sys, os from paste.deploy import loadapp, loadserver import logging if __name__ == '__main__': logging.basicConfig(filename = '/var/log/reporting-api.log', level = logging.INFO) realfile = os.path.realpath(__file__) realdir = os.path.dirname(realfile) pardir = os.path.realp...
f075f083d002cb7ca3819ec1115eb82681b1e9b1
test.py
test.py
#!/usr/bin/python import unittest import subprocess class TestWilkins(unittest.TestCase): def test_cliusage(self): output = subprocess.check_output(['./wilkins.py', '--word', 'remain', '--output', 'json']) self.assertEqual(output.strip(), '{"synonyms": ["stay", "rest"], "type": "Verb", "residual"...
#!/usr/bin/python import unittest import subprocess class TestWilkins(unittest.TestCase): def test_cliusage(self): output = subprocess.check_output(['./wilkins.py', '--word', 'remain', '--output', 'json']) self.assertEqual(output.strip(), '{"synonyms": ["bla", "rest"], "type": "Verb", "residual":...
Test broken - just demo
Test broken - just demo
Python
mit
az-labs/wilkins-python
#!/usr/bin/python import unittest import subprocess class TestWilkins(unittest.TestCase): def test_cliusage(self): output = subprocess.check_output(['./wilkins.py', '--word', 'remain', '--output', 'json']) self.assertEqual(output.strip(), '{"synonyms": ["stay", "rest"], "type": "Verb", "residual"...
#!/usr/bin/python import unittest import subprocess class TestWilkins(unittest.TestCase): def test_cliusage(self): output = subprocess.check_output(['./wilkins.py', '--word', 'remain', '--output', 'json']) self.assertEqual(output.strip(), '{"synonyms": ["bla", "rest"], "type": "Verb", "residual":...
<commit_before>#!/usr/bin/python import unittest import subprocess class TestWilkins(unittest.TestCase): def test_cliusage(self): output = subprocess.check_output(['./wilkins.py', '--word', 'remain', '--output', 'json']) self.assertEqual(output.strip(), '{"synonyms": ["stay", "rest"], "type": "Ve...
#!/usr/bin/python import unittest import subprocess class TestWilkins(unittest.TestCase): def test_cliusage(self): output = subprocess.check_output(['./wilkins.py', '--word', 'remain', '--output', 'json']) self.assertEqual(output.strip(), '{"synonyms": ["bla", "rest"], "type": "Verb", "residual":...
#!/usr/bin/python import unittest import subprocess class TestWilkins(unittest.TestCase): def test_cliusage(self): output = subprocess.check_output(['./wilkins.py', '--word', 'remain', '--output', 'json']) self.assertEqual(output.strip(), '{"synonyms": ["stay", "rest"], "type": "Verb", "residual"...
<commit_before>#!/usr/bin/python import unittest import subprocess class TestWilkins(unittest.TestCase): def test_cliusage(self): output = subprocess.check_output(['./wilkins.py', '--word', 'remain', '--output', 'json']) self.assertEqual(output.strip(), '{"synonyms": ["stay", "rest"], "type": "Ve...
1ade5cef22e162ce07edb6d94859268727da4949
agile.py
agile.py
import requests import xml.etree.ElementTree as ET from credentials import app_key, user_key, corp_id, report_id base_url = 'https://prod3.agileticketing.net/api/reporting.svc/xml/render' date = '&DatePicker=thisweek' report = '&MembershipMultiPicker=130&filename=memberactivity.xml' url = '{}{}{}{}{}{}{}'.format(base...
import requests import xml.etree.ElementTree as ET from credentials import app_key, user_key, corp_id, report_id base_url = 'https://prod3.agileticketing.net/api/reporting.svc/xml/render' date = '&DatePicker=thisweek' report = '&MembershipMultiPicker=130&filename=memberactivity.xml' url = '{}{}{}{}{}{}{}'.format(base...
Create dict out of member info and append to list
Create dict out of member info and append to list append_members() work identically to append_contacts(). A for loop is also needed to loop over every member entry in the XML file.
Python
mit
deadlyraptor/reels
import requests import xml.etree.ElementTree as ET from credentials import app_key, user_key, corp_id, report_id base_url = 'https://prod3.agileticketing.net/api/reporting.svc/xml/render' date = '&DatePicker=thisweek' report = '&MembershipMultiPicker=130&filename=memberactivity.xml' url = '{}{}{}{}{}{}{}'.format(base...
import requests import xml.etree.ElementTree as ET from credentials import app_key, user_key, corp_id, report_id base_url = 'https://prod3.agileticketing.net/api/reporting.svc/xml/render' date = '&DatePicker=thisweek' report = '&MembershipMultiPicker=130&filename=memberactivity.xml' url = '{}{}{}{}{}{}{}'.format(base...
<commit_before>import requests import xml.etree.ElementTree as ET from credentials import app_key, user_key, corp_id, report_id base_url = 'https://prod3.agileticketing.net/api/reporting.svc/xml/render' date = '&DatePicker=thisweek' report = '&MembershipMultiPicker=130&filename=memberactivity.xml' url = '{}{}{}{}{}{}...
import requests import xml.etree.ElementTree as ET from credentials import app_key, user_key, corp_id, report_id base_url = 'https://prod3.agileticketing.net/api/reporting.svc/xml/render' date = '&DatePicker=thisweek' report = '&MembershipMultiPicker=130&filename=memberactivity.xml' url = '{}{}{}{}{}{}{}'.format(base...
import requests import xml.etree.ElementTree as ET from credentials import app_key, user_key, corp_id, report_id base_url = 'https://prod3.agileticketing.net/api/reporting.svc/xml/render' date = '&DatePicker=thisweek' report = '&MembershipMultiPicker=130&filename=memberactivity.xml' url = '{}{}{}{}{}{}{}'.format(base...
<commit_before>import requests import xml.etree.ElementTree as ET from credentials import app_key, user_key, corp_id, report_id base_url = 'https://prod3.agileticketing.net/api/reporting.svc/xml/render' date = '&DatePicker=thisweek' report = '&MembershipMultiPicker=130&filename=memberactivity.xml' url = '{}{}{}{}{}{}...
e598426d190fbe9ccd6a2f11e4fd75de6e749071
test_settings.py
test_settings.py
from gem.settings import * # noqa: F401, F403 DATABASES = { 'default': { 'ENGINE': 'django.db.backends.sqlite3', 'NAME': 'gem_test.db', } } DEBUG = True CELERY_ALWAYS_EAGER = True STATICFILES_STORAGE = 'django.contrib.staticfiles.storage.StaticFilesStorage'
from gem.settings import * # noqa: F401, F403 DATABASES = { 'default': { 'ENGINE': 'django.db.backends.sqlite3', 'NAME': 'gem_test.db', } } LOGGING = { 'version': 1, 'handlers': { 'console': { 'level': 'WARNING', 'class': 'logging.StreamHandler', ...
Set log level for test
Set log level for test When moving to Python 3 the logger starts putting out loads of DEBUG and INFO lines, but we only really care about WARNING.
Python
bsd-2-clause
praekelt/molo-gem,praekelt/molo-gem,praekelt/molo-gem
from gem.settings import * # noqa: F401, F403 DATABASES = { 'default': { 'ENGINE': 'django.db.backends.sqlite3', 'NAME': 'gem_test.db', } } DEBUG = True CELERY_ALWAYS_EAGER = True STATICFILES_STORAGE = 'django.contrib.staticfiles.storage.StaticFilesStorage' Set log level for test When movin...
from gem.settings import * # noqa: F401, F403 DATABASES = { 'default': { 'ENGINE': 'django.db.backends.sqlite3', 'NAME': 'gem_test.db', } } LOGGING = { 'version': 1, 'handlers': { 'console': { 'level': 'WARNING', 'class': 'logging.StreamHandler', ...
<commit_before>from gem.settings import * # noqa: F401, F403 DATABASES = { 'default': { 'ENGINE': 'django.db.backends.sqlite3', 'NAME': 'gem_test.db', } } DEBUG = True CELERY_ALWAYS_EAGER = True STATICFILES_STORAGE = 'django.contrib.staticfiles.storage.StaticFilesStorage' <commit_msg>Set log...
from gem.settings import * # noqa: F401, F403 DATABASES = { 'default': { 'ENGINE': 'django.db.backends.sqlite3', 'NAME': 'gem_test.db', } } LOGGING = { 'version': 1, 'handlers': { 'console': { 'level': 'WARNING', 'class': 'logging.StreamHandler', ...
from gem.settings import * # noqa: F401, F403 DATABASES = { 'default': { 'ENGINE': 'django.db.backends.sqlite3', 'NAME': 'gem_test.db', } } DEBUG = True CELERY_ALWAYS_EAGER = True STATICFILES_STORAGE = 'django.contrib.staticfiles.storage.StaticFilesStorage' Set log level for test When movin...
<commit_before>from gem.settings import * # noqa: F401, F403 DATABASES = { 'default': { 'ENGINE': 'django.db.backends.sqlite3', 'NAME': 'gem_test.db', } } DEBUG = True CELERY_ALWAYS_EAGER = True STATICFILES_STORAGE = 'django.contrib.staticfiles.storage.StaticFilesStorage' <commit_msg>Set log...
f6b40cbe9da0552b27b7c4c5d1a2d9bb0a75dafd
custom/icds_reports/permissions.py
custom/icds_reports/permissions.py
from functools import wraps from django.http import HttpResponse from corehq.apps.locations.permissions import user_can_access_location_id from custom.icds_core.view_utils import icds_pre_release_features def can_access_location_data(view_fn): """ Decorator controlling a user's access to VIEW data for a spe...
from functools import wraps from django.http import HttpResponse from corehq.apps.locations.permissions import user_can_access_location_id from custom.icds_core.view_utils import icds_pre_release_features def can_access_location_data(view_fn): """ Decorator controlling a user's access to VIEW data for a spe...
Remove Feature flag from the location security check for dashboard
Remove Feature flag from the location security check for dashboard
Python
bsd-3-clause
dimagi/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq
from functools import wraps from django.http import HttpResponse from corehq.apps.locations.permissions import user_can_access_location_id from custom.icds_core.view_utils import icds_pre_release_features def can_access_location_data(view_fn): """ Decorator controlling a user's access to VIEW data for a spe...
from functools import wraps from django.http import HttpResponse from corehq.apps.locations.permissions import user_can_access_location_id from custom.icds_core.view_utils import icds_pre_release_features def can_access_location_data(view_fn): """ Decorator controlling a user's access to VIEW data for a spe...
<commit_before>from functools import wraps from django.http import HttpResponse from corehq.apps.locations.permissions import user_can_access_location_id from custom.icds_core.view_utils import icds_pre_release_features def can_access_location_data(view_fn): """ Decorator controlling a user's access to VIEW...
from functools import wraps from django.http import HttpResponse from corehq.apps.locations.permissions import user_can_access_location_id from custom.icds_core.view_utils import icds_pre_release_features def can_access_location_data(view_fn): """ Decorator controlling a user's access to VIEW data for a spe...
from functools import wraps from django.http import HttpResponse from corehq.apps.locations.permissions import user_can_access_location_id from custom.icds_core.view_utils import icds_pre_release_features def can_access_location_data(view_fn): """ Decorator controlling a user's access to VIEW data for a spe...
<commit_before>from functools import wraps from django.http import HttpResponse from corehq.apps.locations.permissions import user_can_access_location_id from custom.icds_core.view_utils import icds_pre_release_features def can_access_location_data(view_fn): """ Decorator controlling a user's access to VIEW...
62eea0104615b5d75183d5392fe250fa07d2a988
src/bulksms/config.py
src/bulksms/config.py
# BULKSMS Config. CONFIG = { 'BULK_SMS': { 'AUTH': { 'USERNAME': '', 'PASSWORD': '' }, 'URL': { 'SINGLE': 'https://bulksms.2way.co.za/eapi/submission/send_sms/2/2.0', 'BATCH': 'http://bulksms.2way.co.za/eapi/submission/send_batch/1/1.0' ...
# BULKSMS Config. CONFIG = { 'BULK_SMS': { 'AUTH': { 'USERNAME': '', 'PASSWORD': '' }, 'URL': { 'SENDING': { { 'SINGLE': 'https://bulksms.2way.co.za/eapi/submission/send_sms/2/2.0', 'BATCH': 'https://...
Add url for getting credits.
Add url for getting credits.
Python
mit
tsotetsi/django-bulksms
# BULKSMS Config. CONFIG = { 'BULK_SMS': { 'AUTH': { 'USERNAME': '', 'PASSWORD': '' }, 'URL': { 'SINGLE': 'https://bulksms.2way.co.za/eapi/submission/send_sms/2/2.0', 'BATCH': 'http://bulksms.2way.co.za/eapi/submission/send_batch/1/1.0' ...
# BULKSMS Config. CONFIG = { 'BULK_SMS': { 'AUTH': { 'USERNAME': '', 'PASSWORD': '' }, 'URL': { 'SENDING': { { 'SINGLE': 'https://bulksms.2way.co.za/eapi/submission/send_sms/2/2.0', 'BATCH': 'https://...
<commit_before># BULKSMS Config. CONFIG = { 'BULK_SMS': { 'AUTH': { 'USERNAME': '', 'PASSWORD': '' }, 'URL': { 'SINGLE': 'https://bulksms.2way.co.za/eapi/submission/send_sms/2/2.0', 'BATCH': 'http://bulksms.2way.co.za/eapi/submission/send_batch...
# BULKSMS Config. CONFIG = { 'BULK_SMS': { 'AUTH': { 'USERNAME': '', 'PASSWORD': '' }, 'URL': { 'SENDING': { { 'SINGLE': 'https://bulksms.2way.co.za/eapi/submission/send_sms/2/2.0', 'BATCH': 'https://...
# BULKSMS Config. CONFIG = { 'BULK_SMS': { 'AUTH': { 'USERNAME': '', 'PASSWORD': '' }, 'URL': { 'SINGLE': 'https://bulksms.2way.co.za/eapi/submission/send_sms/2/2.0', 'BATCH': 'http://bulksms.2way.co.za/eapi/submission/send_batch/1/1.0' ...
<commit_before># BULKSMS Config. CONFIG = { 'BULK_SMS': { 'AUTH': { 'USERNAME': '', 'PASSWORD': '' }, 'URL': { 'SINGLE': 'https://bulksms.2way.co.za/eapi/submission/send_sms/2/2.0', 'BATCH': 'http://bulksms.2way.co.za/eapi/submission/send_batch...