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
74652fd620f33231e4e3086d4b461c2cdf18bfba
conjureup/controllers/vspheresetup/common.py
conjureup/controllers/vspheresetup/common.py
from conjureup import controllers from conjureup.app_config import app class BaseVSphereSetupController: def __init__(self): # Assign current datacenter app.provider.login() for dc in app.provider.get_datacenters(): if dc.name == app.provider.region: self.datace...
from conjureup import controllers from conjureup.app_config import app class BaseVSphereSetupController: def __init__(self): # Assign current datacenter app.provider.login() for dc in app.provider.get_datacenters(): if dc == app.provider.region: self.datacenter ...
Fix datacenter listing for r34lz
Fix datacenter listing for r34lz Signed-off-by: Adam Stokes <49c255c1d074742f60d19fdba5e2aa5a34add567@users.noreply.github.com>
Python
mit
Ubuntu-Solutions-Engineering/conjure,Ubuntu-Solutions-Engineering/conjure,ubuntu/conjure-up,conjure-up/conjure-up,ubuntu/conjure-up,conjure-up/conjure-up
from conjureup import controllers from conjureup.app_config import app class BaseVSphereSetupController: def __init__(self): # Assign current datacenter app.provider.login() for dc in app.provider.get_datacenters(): if dc.name == app.provider.region: self.datace...
from conjureup import controllers from conjureup.app_config import app class BaseVSphereSetupController: def __init__(self): # Assign current datacenter app.provider.login() for dc in app.provider.get_datacenters(): if dc == app.provider.region: self.datacenter ...
<commit_before>from conjureup import controllers from conjureup.app_config import app class BaseVSphereSetupController: def __init__(self): # Assign current datacenter app.provider.login() for dc in app.provider.get_datacenters(): if dc.name == app.provider.region: ...
from conjureup import controllers from conjureup.app_config import app class BaseVSphereSetupController: def __init__(self): # Assign current datacenter app.provider.login() for dc in app.provider.get_datacenters(): if dc == app.provider.region: self.datacenter ...
from conjureup import controllers from conjureup.app_config import app class BaseVSphereSetupController: def __init__(self): # Assign current datacenter app.provider.login() for dc in app.provider.get_datacenters(): if dc.name == app.provider.region: self.datace...
<commit_before>from conjureup import controllers from conjureup.app_config import app class BaseVSphereSetupController: def __init__(self): # Assign current datacenter app.provider.login() for dc in app.provider.get_datacenters(): if dc.name == app.provider.region: ...
532b0809b040318abbb8e62848f18ad0cdf72547
src/workspace/workspace_managers.py
src/workspace/workspace_managers.py
from workspace.models import GroupPublishedWorkspace, PublishedWorkSpace, WorkSpace def ref_from_workspace(workspace): if isinstance(workspace, WorkSpace): return 'group/' + str(workspace.id) elif isinstance(workspace, PublishedWorkSpace): return 'group_published/' + str(workspace.id) class...
from workspace.models import GroupPublishedWorkspace, PublishedWorkSpace, WorkSpace def ref_from_workspace(workspace): if isinstance(workspace, WorkSpace): return 'group/' + str(workspace.id) elif isinstance(workspace, PublishedWorkSpace): return 'group_published/' + str(workspace.id) class...
Make OrganizationWorkspaceManager ignore the original workspace when sharing workspaces with groups
Make OrganizationWorkspaceManager ignore the original workspace when sharing workspaces with groups
Python
agpl-3.0
rockneurotiko/wirecloud,jpajuelo/wirecloud,rockneurotiko/wirecloud,jpajuelo/wirecloud,jpajuelo/wirecloud,rockneurotiko/wirecloud,jpajuelo/wirecloud,rockneurotiko/wirecloud
from workspace.models import GroupPublishedWorkspace, PublishedWorkSpace, WorkSpace def ref_from_workspace(workspace): if isinstance(workspace, WorkSpace): return 'group/' + str(workspace.id) elif isinstance(workspace, PublishedWorkSpace): return 'group_published/' + str(workspace.id) class...
from workspace.models import GroupPublishedWorkspace, PublishedWorkSpace, WorkSpace def ref_from_workspace(workspace): if isinstance(workspace, WorkSpace): return 'group/' + str(workspace.id) elif isinstance(workspace, PublishedWorkSpace): return 'group_published/' + str(workspace.id) class...
<commit_before>from workspace.models import GroupPublishedWorkspace, PublishedWorkSpace, WorkSpace def ref_from_workspace(workspace): if isinstance(workspace, WorkSpace): return 'group/' + str(workspace.id) elif isinstance(workspace, PublishedWorkSpace): return 'group_published/' + str(worksp...
from workspace.models import GroupPublishedWorkspace, PublishedWorkSpace, WorkSpace def ref_from_workspace(workspace): if isinstance(workspace, WorkSpace): return 'group/' + str(workspace.id) elif isinstance(workspace, PublishedWorkSpace): return 'group_published/' + str(workspace.id) class...
from workspace.models import GroupPublishedWorkspace, PublishedWorkSpace, WorkSpace def ref_from_workspace(workspace): if isinstance(workspace, WorkSpace): return 'group/' + str(workspace.id) elif isinstance(workspace, PublishedWorkSpace): return 'group_published/' + str(workspace.id) class...
<commit_before>from workspace.models import GroupPublishedWorkspace, PublishedWorkSpace, WorkSpace def ref_from_workspace(workspace): if isinstance(workspace, WorkSpace): return 'group/' + str(workspace.id) elif isinstance(workspace, PublishedWorkSpace): return 'group_published/' + str(worksp...
06e7cf66d37a34a33349e47c374e733b1f3006be
test/functional/feature_shutdown.py
test/functional/feature_shutdown.py
#!/usr/bin/env python3 # Copyright (c) 2018 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """Test bitcoind shutdown.""" from test_framework.test_framework import BitcoinTestFramework from test_framewo...
#!/usr/bin/env python3 # Copyright (c) 2018 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """Test bitcoind shutdown.""" from test_framework.test_framework import BitcoinTestFramework from test_framewo...
Remove race between connecting and shutdown on separate connections
qa: Remove race between connecting and shutdown on separate connections
Python
mit
chaincoin/chaincoin,chaincoin/chaincoin,chaincoin/chaincoin,chaincoin/chaincoin,chaincoin/chaincoin,chaincoin/chaincoin
#!/usr/bin/env python3 # Copyright (c) 2018 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """Test bitcoind shutdown.""" from test_framework.test_framework import BitcoinTestFramework from test_framewo...
#!/usr/bin/env python3 # Copyright (c) 2018 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """Test bitcoind shutdown.""" from test_framework.test_framework import BitcoinTestFramework from test_framewo...
<commit_before>#!/usr/bin/env python3 # Copyright (c) 2018 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """Test bitcoind shutdown.""" from test_framework.test_framework import BitcoinTestFramework fr...
#!/usr/bin/env python3 # Copyright (c) 2018 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """Test bitcoind shutdown.""" from test_framework.test_framework import BitcoinTestFramework from test_framewo...
#!/usr/bin/env python3 # Copyright (c) 2018 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """Test bitcoind shutdown.""" from test_framework.test_framework import BitcoinTestFramework from test_framewo...
<commit_before>#!/usr/bin/env python3 # Copyright (c) 2018 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """Test bitcoind shutdown.""" from test_framework.test_framework import BitcoinTestFramework fr...
63ca54e320b77501a304aa0520e133e1194e1324
src/sentry/tasks/deletion.py
src/sentry/tasks/deletion.py
""" sentry.tasks.deletion ~~~~~~~~~~~~~~~~~~~~~ :copyright: (c) 2010-2013 by the Sentry Team, see AUTHORS for more details. :license: BSD, see LICENSE for more details. """ from celery.task import task @task(name='sentry.tasks.deletion.delete_project', queue='cleanup') def delete_project(object_id, **kwargs): f...
""" sentry.tasks.deletion ~~~~~~~~~~~~~~~~~~~~~ :copyright: (c) 2010-2013 by the Sentry Team, see AUTHORS for more details. :license: BSD, see LICENSE for more details. """ from celery.task import task @task(name='sentry.tasks.deletion.delete_project', queue='cleanup') def delete_project(object_id, **kwargs): f...
Break delete_project into smaller tasks
Break delete_project into smaller tasks
Python
bsd-3-clause
vperron/sentry,BuildingLink/sentry,JTCunning/sentry,fotinakis/sentry,BuildingLink/sentry,zenefits/sentry,daevaorn/sentry,nicholasserra/sentry,hongliang5623/sentry,llonchj/sentry,mitsuhiko/sentry,TedaLIEz/sentry,alexm92/sentry,mvaled/sentry,jokey2k/sentry,fuziontech/sentry,ngonzalvez/sentry,looker/sentry,camilonova/sent...
""" sentry.tasks.deletion ~~~~~~~~~~~~~~~~~~~~~ :copyright: (c) 2010-2013 by the Sentry Team, see AUTHORS for more details. :license: BSD, see LICENSE for more details. """ from celery.task import task @task(name='sentry.tasks.deletion.delete_project', queue='cleanup') def delete_project(object_id, **kwargs): f...
""" sentry.tasks.deletion ~~~~~~~~~~~~~~~~~~~~~ :copyright: (c) 2010-2013 by the Sentry Team, see AUTHORS for more details. :license: BSD, see LICENSE for more details. """ from celery.task import task @task(name='sentry.tasks.deletion.delete_project', queue='cleanup') def delete_project(object_id, **kwargs): f...
<commit_before>""" sentry.tasks.deletion ~~~~~~~~~~~~~~~~~~~~~ :copyright: (c) 2010-2013 by the Sentry Team, see AUTHORS for more details. :license: BSD, see LICENSE for more details. """ from celery.task import task @task(name='sentry.tasks.deletion.delete_project', queue='cleanup') def delete_project(object_id, *...
""" sentry.tasks.deletion ~~~~~~~~~~~~~~~~~~~~~ :copyright: (c) 2010-2013 by the Sentry Team, see AUTHORS for more details. :license: BSD, see LICENSE for more details. """ from celery.task import task @task(name='sentry.tasks.deletion.delete_project', queue='cleanup') def delete_project(object_id, **kwargs): f...
""" sentry.tasks.deletion ~~~~~~~~~~~~~~~~~~~~~ :copyright: (c) 2010-2013 by the Sentry Team, see AUTHORS for more details. :license: BSD, see LICENSE for more details. """ from celery.task import task @task(name='sentry.tasks.deletion.delete_project', queue='cleanup') def delete_project(object_id, **kwargs): f...
<commit_before>""" sentry.tasks.deletion ~~~~~~~~~~~~~~~~~~~~~ :copyright: (c) 2010-2013 by the Sentry Team, see AUTHORS for more details. :license: BSD, see LICENSE for more details. """ from celery.task import task @task(name='sentry.tasks.deletion.delete_project', queue='cleanup') def delete_project(object_id, *...
d73872b8bcc6c7c32fa10d4a8ffdd77fe568a954
pyautotest/cli.py
pyautotest/cli.py
# -*- coding: utf-8 -*- import logging import os import signal import time from optparse import OptionParser from watchdog.observers import Observer from pyautotest.observers import Notifier, ChangeHandler # Configure logging logging.basicConfig(format='%(asctime)s (%(name)s) [%(levelname)s]: %(message)s', datefmt=...
# -*- coding: utf-8 -*- import argparse import logging import os import signal import time from watchdog.observers import Observer from pyautotest.observers import Notifier, ChangeHandler # Configure logging logging.basicConfig(format='%(asctime)s (%(name)s) [%(levelname)s]: %(message)s', datefmt='%m-%d-%Y %H:%M:%S...
Switch from optparase to argparse
Switch from optparase to argparse
Python
mit
ascarter/pyautotest
# -*- coding: utf-8 -*- import logging import os import signal import time from optparse import OptionParser from watchdog.observers import Observer from pyautotest.observers import Notifier, ChangeHandler # Configure logging logging.basicConfig(format='%(asctime)s (%(name)s) [%(levelname)s]: %(message)s', datefmt=...
# -*- coding: utf-8 -*- import argparse import logging import os import signal import time from watchdog.observers import Observer from pyautotest.observers import Notifier, ChangeHandler # Configure logging logging.basicConfig(format='%(asctime)s (%(name)s) [%(levelname)s]: %(message)s', datefmt='%m-%d-%Y %H:%M:%S...
<commit_before># -*- coding: utf-8 -*- import logging import os import signal import time from optparse import OptionParser from watchdog.observers import Observer from pyautotest.observers import Notifier, ChangeHandler # Configure logging logging.basicConfig(format='%(asctime)s (%(name)s) [%(levelname)s]: %(messag...
# -*- coding: utf-8 -*- import argparse import logging import os import signal import time from watchdog.observers import Observer from pyautotest.observers import Notifier, ChangeHandler # Configure logging logging.basicConfig(format='%(asctime)s (%(name)s) [%(levelname)s]: %(message)s', datefmt='%m-%d-%Y %H:%M:%S...
# -*- coding: utf-8 -*- import logging import os import signal import time from optparse import OptionParser from watchdog.observers import Observer from pyautotest.observers import Notifier, ChangeHandler # Configure logging logging.basicConfig(format='%(asctime)s (%(name)s) [%(levelname)s]: %(message)s', datefmt=...
<commit_before># -*- coding: utf-8 -*- import logging import os import signal import time from optparse import OptionParser from watchdog.observers import Observer from pyautotest.observers import Notifier, ChangeHandler # Configure logging logging.basicConfig(format='%(asctime)s (%(name)s) [%(levelname)s]: %(messag...
5e30bd1ae8218a6ad5a2582c15aed99258994d83
tests/tests/test_swappable_model.py
tests/tests/test_swappable_model.py
from django.test import TestCase
from django.conf import settings from django.core.exceptions import ImproperlyConfigured from django.test import TestCase, modify_settings from boardinghouse.schema import get_schema_model class TestSwappableModel(TestCase): @modify_settings() def test_schema_model_app_not_found(self): settings.BOAR...
Write tests for swappable model.
Write tests for swappable model. Resolves #28, #36. --HG-- branch : fix-swappable-model
Python
bsd-3-clause
schinckel/django-boardinghouse,schinckel/django-boardinghouse,schinckel/django-boardinghouse
from django.test import TestCaseWrite tests for swappable model. Resolves #28, #36. --HG-- branch : fix-swappable-model
from django.conf import settings from django.core.exceptions import ImproperlyConfigured from django.test import TestCase, modify_settings from boardinghouse.schema import get_schema_model class TestSwappableModel(TestCase): @modify_settings() def test_schema_model_app_not_found(self): settings.BOAR...
<commit_before>from django.test import TestCase<commit_msg>Write tests for swappable model. Resolves #28, #36. --HG-- branch : fix-swappable-model<commit_after>
from django.conf import settings from django.core.exceptions import ImproperlyConfigured from django.test import TestCase, modify_settings from boardinghouse.schema import get_schema_model class TestSwappableModel(TestCase): @modify_settings() def test_schema_model_app_not_found(self): settings.BOAR...
from django.test import TestCaseWrite tests for swappable model. Resolves #28, #36. --HG-- branch : fix-swappable-modelfrom django.conf import settings from django.core.exceptions import ImproperlyConfigured from django.test import TestCase, modify_settings from boardinghouse.schema import get_schema_model class T...
<commit_before>from django.test import TestCase<commit_msg>Write tests for swappable model. Resolves #28, #36. --HG-- branch : fix-swappable-model<commit_after>from django.conf import settings from django.core.exceptions import ImproperlyConfigured from django.test import TestCase, modify_settings from boardinghouse...
1b1652053213f3939b50b2ac66a775cd5d4beed9
openpnm/__init__.py
openpnm/__init__.py
r""" ======= OpenPNM ======= OpenPNM is a package for performing pore network simulations of transport in porous materials. OpenPNM consists of several key modules. Each module is consisted of several classes and each class is consisted of a few methods. Here, you'll find a comprehensive documentation of the modules,...
r""" ======= OpenPNM ======= OpenPNM is a package for performing pore network simulations of transport in porous materials. OpenPNM consists of several key modules. Each module is consisted of several classes and each class is consisted of a few methods. Here, you'll find a comprehensive documentation of the modules,...
Fix import order to avoid circular import
Fix import order to avoid circular import
Python
mit
PMEAL/OpenPNM
r""" ======= OpenPNM ======= OpenPNM is a package for performing pore network simulations of transport in porous materials. OpenPNM consists of several key modules. Each module is consisted of several classes and each class is consisted of a few methods. Here, you'll find a comprehensive documentation of the modules,...
r""" ======= OpenPNM ======= OpenPNM is a package for performing pore network simulations of transport in porous materials. OpenPNM consists of several key modules. Each module is consisted of several classes and each class is consisted of a few methods. Here, you'll find a comprehensive documentation of the modules,...
<commit_before>r""" ======= OpenPNM ======= OpenPNM is a package for performing pore network simulations of transport in porous materials. OpenPNM consists of several key modules. Each module is consisted of several classes and each class is consisted of a few methods. Here, you'll find a comprehensive documentation ...
r""" ======= OpenPNM ======= OpenPNM is a package for performing pore network simulations of transport in porous materials. OpenPNM consists of several key modules. Each module is consisted of several classes and each class is consisted of a few methods. Here, you'll find a comprehensive documentation of the modules,...
r""" ======= OpenPNM ======= OpenPNM is a package for performing pore network simulations of transport in porous materials. OpenPNM consists of several key modules. Each module is consisted of several classes and each class is consisted of a few methods. Here, you'll find a comprehensive documentation of the modules,...
<commit_before>r""" ======= OpenPNM ======= OpenPNM is a package for performing pore network simulations of transport in porous materials. OpenPNM consists of several key modules. Each module is consisted of several classes and each class is consisted of a few methods. Here, you'll find a comprehensive documentation ...
32bf828445ed897609b908dff435191287f922f4
bookie/views/stats.py
bookie/views/stats.py
"""Basic views with no home""" import logging from pyramid.view import view_config from bookie.bcelery import tasks from bookie.models import BmarkMgr from bookie.models.auth import ActivationMgr from bookie.models.auth import UserMgr LOG = logging.getLogger(__name__) @view_config( route_name="dashboard", ...
"""Basic views with no home""" import logging from pyramid.view import view_config from bookie.models import BmarkMgr from bookie.models.auth import ActivationMgr from bookie.models.auth import UserMgr LOG = logging.getLogger(__name__) @view_config( route_name="dashboard", renderer="/stats/dashboard.mako")...
Clean up old code no longer used
Clean up old code no longer used
Python
agpl-3.0
adamlincoln/Bookie,charany1/Bookie,GreenLunar/Bookie,charany1/Bookie,skmezanul/Bookie,charany1/Bookie,adamlincoln/Bookie,GreenLunar/Bookie,pombredanne/Bookie,wangjun/Bookie,bookieio/Bookie,skmezanul/Bookie,pombredanne/Bookie,bookieio/Bookie,GreenLunar/Bookie,pombredanne/Bookie,teodesson/Bookie,skmezanul/Bookie,bookieio...
"""Basic views with no home""" import logging from pyramid.view import view_config from bookie.bcelery import tasks from bookie.models import BmarkMgr from bookie.models.auth import ActivationMgr from bookie.models.auth import UserMgr LOG = logging.getLogger(__name__) @view_config( route_name="dashboard", ...
"""Basic views with no home""" import logging from pyramid.view import view_config from bookie.models import BmarkMgr from bookie.models.auth import ActivationMgr from bookie.models.auth import UserMgr LOG = logging.getLogger(__name__) @view_config( route_name="dashboard", renderer="/stats/dashboard.mako")...
<commit_before>"""Basic views with no home""" import logging from pyramid.view import view_config from bookie.bcelery import tasks from bookie.models import BmarkMgr from bookie.models.auth import ActivationMgr from bookie.models.auth import UserMgr LOG = logging.getLogger(__name__) @view_config( route_name="d...
"""Basic views with no home""" import logging from pyramid.view import view_config from bookie.models import BmarkMgr from bookie.models.auth import ActivationMgr from bookie.models.auth import UserMgr LOG = logging.getLogger(__name__) @view_config( route_name="dashboard", renderer="/stats/dashboard.mako")...
"""Basic views with no home""" import logging from pyramid.view import view_config from bookie.bcelery import tasks from bookie.models import BmarkMgr from bookie.models.auth import ActivationMgr from bookie.models.auth import UserMgr LOG = logging.getLogger(__name__) @view_config( route_name="dashboard", ...
<commit_before>"""Basic views with no home""" import logging from pyramid.view import view_config from bookie.bcelery import tasks from bookie.models import BmarkMgr from bookie.models.auth import ActivationMgr from bookie.models.auth import UserMgr LOG = logging.getLogger(__name__) @view_config( route_name="d...
a29dad3b094b8d01a695e72cfc5e9b3bd51d6b6a
DataBase.py
DataBase.py
''' Copyright 2015 RTeam (Edgar Kaziahmedov, Klim Kireev, Artem Yashuhin) Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless re...
Use source file with license
Use source file with license
Python
apache-2.0
proffK/CourseManager
Use source file with license
''' Copyright 2015 RTeam (Edgar Kaziahmedov, Klim Kireev, Artem Yashuhin) Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless re...
<commit_before><commit_msg>Use source file with license<commit_after>
''' Copyright 2015 RTeam (Edgar Kaziahmedov, Klim Kireev, Artem Yashuhin) Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless re...
Use source file with license ''' Copyright 2015 RTeam (Edgar Kaziahmedov, Klim Kireev, Artem Yashuhin) Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licens...
<commit_before><commit_msg>Use source file with license<commit_after> ''' Copyright 2015 RTeam (Edgar Kaziahmedov, Klim Kireev, Artem Yashuhin) Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the Licens...
130acde92df3b0f9aad2f28b61f45e37531f44ac
runserver.py
runserver.py
#!/usr/bin/env python from sherry import app # Load debug config app.config.from_pyfile('../sherry.conf', silent=False) app.run(host='0.0.0.0', port=5000, debug=True)
#!/usr/bin/env python from sherry import app # Load debug config app.config.from_pyfile('../sherry.conf', silent=True) app.run(host='0.0.0.0', port=5000, debug=True)
Make optional sherry.conf optional. Oops.
Make optional sherry.conf optional. Oops.
Python
bsd-2-clause
PaulMcMillan/sherry,PaulMcMillan/sherry
#!/usr/bin/env python from sherry import app # Load debug config app.config.from_pyfile('../sherry.conf', silent=False) app.run(host='0.0.0.0', port=5000, debug=True) Make optional sherry.conf optional. Oops.
#!/usr/bin/env python from sherry import app # Load debug config app.config.from_pyfile('../sherry.conf', silent=True) app.run(host='0.0.0.0', port=5000, debug=True)
<commit_before>#!/usr/bin/env python from sherry import app # Load debug config app.config.from_pyfile('../sherry.conf', silent=False) app.run(host='0.0.0.0', port=5000, debug=True) <commit_msg>Make optional sherry.conf optional. Oops.<commit_after>
#!/usr/bin/env python from sherry import app # Load debug config app.config.from_pyfile('../sherry.conf', silent=True) app.run(host='0.0.0.0', port=5000, debug=True)
#!/usr/bin/env python from sherry import app # Load debug config app.config.from_pyfile('../sherry.conf', silent=False) app.run(host='0.0.0.0', port=5000, debug=True) Make optional sherry.conf optional. Oops.#!/usr/bin/env python from sherry import app # Load debug config app.config.from_pyfile('../sherry.conf', si...
<commit_before>#!/usr/bin/env python from sherry import app # Load debug config app.config.from_pyfile('../sherry.conf', silent=False) app.run(host='0.0.0.0', port=5000, debug=True) <commit_msg>Make optional sherry.conf optional. Oops.<commit_after>#!/usr/bin/env python from sherry import app # Load debug config ap...
c64149d3b1bb4998bddd6c05c85f0b3129f47020
pydbus/bus.py
pydbus/bus.py
from gi.repository import Gio from .proxy import ProxyMixin from .bus_names import OwnMixin, WatchMixin from .subscription import SubscriptionMixin from .registration import RegistrationMixin from .publication import PublicationMixin class Bus(ProxyMixin, OwnMixin, WatchMixin, SubscriptionMixin, RegistrationMixin, Pub...
from gi.repository import Gio from .proxy import ProxyMixin from .bus_names import OwnMixin, WatchMixin from .subscription import SubscriptionMixin from .registration import RegistrationMixin from .publication import PublicationMixin class Bus(ProxyMixin, OwnMixin, WatchMixin, SubscriptionMixin, RegistrationMixin, Pub...
Increase the default timeout to 1s.
Increase the default timeout to 1s.
Python
lgpl-2.1
LEW21/pydbus,LEW21/pydbus
from gi.repository import Gio from .proxy import ProxyMixin from .bus_names import OwnMixin, WatchMixin from .subscription import SubscriptionMixin from .registration import RegistrationMixin from .publication import PublicationMixin class Bus(ProxyMixin, OwnMixin, WatchMixin, SubscriptionMixin, RegistrationMixin, Pub...
from gi.repository import Gio from .proxy import ProxyMixin from .bus_names import OwnMixin, WatchMixin from .subscription import SubscriptionMixin from .registration import RegistrationMixin from .publication import PublicationMixin class Bus(ProxyMixin, OwnMixin, WatchMixin, SubscriptionMixin, RegistrationMixin, Pub...
<commit_before>from gi.repository import Gio from .proxy import ProxyMixin from .bus_names import OwnMixin, WatchMixin from .subscription import SubscriptionMixin from .registration import RegistrationMixin from .publication import PublicationMixin class Bus(ProxyMixin, OwnMixin, WatchMixin, SubscriptionMixin, Registr...
from gi.repository import Gio from .proxy import ProxyMixin from .bus_names import OwnMixin, WatchMixin from .subscription import SubscriptionMixin from .registration import RegistrationMixin from .publication import PublicationMixin class Bus(ProxyMixin, OwnMixin, WatchMixin, SubscriptionMixin, RegistrationMixin, Pub...
from gi.repository import Gio from .proxy import ProxyMixin from .bus_names import OwnMixin, WatchMixin from .subscription import SubscriptionMixin from .registration import RegistrationMixin from .publication import PublicationMixin class Bus(ProxyMixin, OwnMixin, WatchMixin, SubscriptionMixin, RegistrationMixin, Pub...
<commit_before>from gi.repository import Gio from .proxy import ProxyMixin from .bus_names import OwnMixin, WatchMixin from .subscription import SubscriptionMixin from .registration import RegistrationMixin from .publication import PublicationMixin class Bus(ProxyMixin, OwnMixin, WatchMixin, SubscriptionMixin, Registr...
c5a2c7e802d89ea17a7f0fd1a9194eaab8eaf61d
wcontrol/src/main.py
wcontrol/src/main.py
from flask import Flask app = Flask(__name__) app.config.from_object("config")
import os from flask import Flask app = Flask(__name__) app.config.from_object(os.environ.get("WCONTROL_CONF"))
Use a env var to get config
Use a env var to get config
Python
mit
pahumadad/weight-control,pahumadad/weight-control,pahumadad/weight-control,pahumadad/weight-control
from flask import Flask app = Flask(__name__) app.config.from_object("config") Use a env var to get config
import os from flask import Flask app = Flask(__name__) app.config.from_object(os.environ.get("WCONTROL_CONF"))
<commit_before>from flask import Flask app = Flask(__name__) app.config.from_object("config") <commit_msg>Use a env var to get config<commit_after>
import os from flask import Flask app = Flask(__name__) app.config.from_object(os.environ.get("WCONTROL_CONF"))
from flask import Flask app = Flask(__name__) app.config.from_object("config") Use a env var to get configimport os from flask import Flask app = Flask(__name__) app.config.from_object(os.environ.get("WCONTROL_CONF"))
<commit_before>from flask import Flask app = Flask(__name__) app.config.from_object("config") <commit_msg>Use a env var to get config<commit_after>import os from flask import Flask app = Flask(__name__) app.config.from_object(os.environ.get("WCONTROL_CONF"))
8d669dc8b09b8d7c8bc9b4c123e2bdd7c3521521
functionaltests/api/base.py
functionaltests/api/base.py
# -*- coding: utf-8 -*- # # Copyright 2013 - Noorul Islam K M # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applic...
# -*- coding: utf-8 -*- # # Copyright 2013 - Noorul Islam K M # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applic...
Fix Tempest tests failing on gate-solum-devstack-dsvm
Fix Tempest tests failing on gate-solum-devstack-dsvm Due to a new commit on tempest, devstack tests are failing. It changed the signature of RestClient constructor. This patch changes the signature of our inherited class to match the change from tempest. Change-Id: Id15682c68de123c0d66c6aa10d889c6304fcbb65
Python
apache-2.0
devdattakulkarni/test-solum,openstack/solum,ed-/solum,openstack/solum,ed-/solum,gilbertpilz/solum,ed-/solum,julienvey/solum,gilbertpilz/solum,stackforge/solum,ed-/solum,stackforge/solum,gilbertpilz/solum,gilbertpilz/solum,devdattakulkarni/test-solum,julienvey/solum
# -*- coding: utf-8 -*- # # Copyright 2013 - Noorul Islam K M # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applic...
# -*- coding: utf-8 -*- # # Copyright 2013 - Noorul Islam K M # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applic...
<commit_before># -*- coding: utf-8 -*- # # Copyright 2013 - Noorul Islam K M # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless req...
# -*- coding: utf-8 -*- # # Copyright 2013 - Noorul Islam K M # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applic...
# -*- coding: utf-8 -*- # # Copyright 2013 - Noorul Islam K M # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applic...
<commit_before># -*- coding: utf-8 -*- # # Copyright 2013 - Noorul Islam K M # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless req...
98dfc5569fb1ae58905f8b6a36deeda324dcdd7b
cronos/teilar/models.py
cronos/teilar/models.py
from django.db import models class Departments(models.Model): urlid = models.IntegerField(unique = True) name = models.CharField("Department name", max_length = 200) class Teachers(models.Model): urlid = models.CharField("URL ID", max_length = 30, unique = True) name = models.CharField("Teacher name",...
from django.db import models class Departments(models.Model): urlid = models.IntegerField(unique = True) name = models.CharField("Department name", max_length = 200) deprecated = models.BooleanField(default = False) def __unicode__(self): return self.name class Teachers(models.Model): url...
Add deprecated flag for teachers and departments
Add deprecated flag for teachers and departments
Python
agpl-3.0
LinuxTeam-teilar/cronos.teilar.gr,LinuxTeam-teilar/cronos.teilar.gr,LinuxTeam-teilar/cronos.teilar.gr
from django.db import models class Departments(models.Model): urlid = models.IntegerField(unique = True) name = models.CharField("Department name", max_length = 200) class Teachers(models.Model): urlid = models.CharField("URL ID", max_length = 30, unique = True) name = models.CharField("Teacher name",...
from django.db import models class Departments(models.Model): urlid = models.IntegerField(unique = True) name = models.CharField("Department name", max_length = 200) deprecated = models.BooleanField(default = False) def __unicode__(self): return self.name class Teachers(models.Model): url...
<commit_before>from django.db import models class Departments(models.Model): urlid = models.IntegerField(unique = True) name = models.CharField("Department name", max_length = 200) class Teachers(models.Model): urlid = models.CharField("URL ID", max_length = 30, unique = True) name = models.CharField(...
from django.db import models class Departments(models.Model): urlid = models.IntegerField(unique = True) name = models.CharField("Department name", max_length = 200) deprecated = models.BooleanField(default = False) def __unicode__(self): return self.name class Teachers(models.Model): url...
from django.db import models class Departments(models.Model): urlid = models.IntegerField(unique = True) name = models.CharField("Department name", max_length = 200) class Teachers(models.Model): urlid = models.CharField("URL ID", max_length = 30, unique = True) name = models.CharField("Teacher name",...
<commit_before>from django.db import models class Departments(models.Model): urlid = models.IntegerField(unique = True) name = models.CharField("Department name", max_length = 200) class Teachers(models.Model): urlid = models.CharField("URL ID", max_length = 30, unique = True) name = models.CharField(...
2ac94aa922dbf2d07039bc6545e7b1d31c5c9e4e
src/cclib/progress/__init__.py
src/cclib/progress/__init__.py
__revision__ = "$Revision$" from textprogress import TextProgress try: import qt except ImportError: pass # import QtProgress will cause an error else: from qtprogress import QtProgress
__revision__ = "$Revision$" from textprogress import TextProgress import sys if 'qt' in sys.modules.keys(): from qtprogress import QtProgress
Check to see if qt is loaded; if so, export QtProgress class
Check to see if qt is loaded; if so, export QtProgress class
Python
lgpl-2.1
Clyde-fare/cclib,Schamnad/cclib,jchodera/cclib,ghutchis/cclib,gaursagar/cclib,berquist/cclib,andersx/cclib,ben-albrecht/cclib,Schamnad/cclib,cclib/cclib,ATenderholt/cclib,cclib/cclib,langner/cclib,berquist/cclib,Clyde-fare/cclib,langner/cclib,ben-albrecht/cclib,ATenderholt/cclib,ghutchis/cclib,jchodera/cclib,andersx/cc...
__revision__ = "$Revision$" from textprogress import TextProgress try: import qt except ImportError: pass # import QtProgress will cause an error else: from qtprogress import QtProgress Check to see if qt is loaded; if so, export QtProgress class
__revision__ = "$Revision$" from textprogress import TextProgress import sys if 'qt' in sys.modules.keys(): from qtprogress import QtProgress
<commit_before>__revision__ = "$Revision$" from textprogress import TextProgress try: import qt except ImportError: pass # import QtProgress will cause an error else: from qtprogress import QtProgress <commit_msg>Check to see if qt is loaded; if so, export QtProgress class<commit_after>
__revision__ = "$Revision$" from textprogress import TextProgress import sys if 'qt' in sys.modules.keys(): from qtprogress import QtProgress
__revision__ = "$Revision$" from textprogress import TextProgress try: import qt except ImportError: pass # import QtProgress will cause an error else: from qtprogress import QtProgress Check to see if qt is loaded; if so, export QtProgress class__revision__ = "$Revision$" from textprogress import TextPro...
<commit_before>__revision__ = "$Revision$" from textprogress import TextProgress try: import qt except ImportError: pass # import QtProgress will cause an error else: from qtprogress import QtProgress <commit_msg>Check to see if qt is loaded; if so, export QtProgress class<commit_after>__revision__ = "$Rev...
f239fd08bb5536501b05ba6a81c99edffdea6f38
pylamb/bmi_ilamb.py
pylamb/bmi_ilamb.py
#! /usr/bin/env python import sys import subprocess class BmiIlamb(object): _command = 'run_ilamb' _args = None _env = None def __init__(self): self._time = self.get_start_time() @property def args(self): return [self._command] + (self._args or []) def get_component_name...
#! /usr/bin/env python import sys import subprocess class BmiIlamb(object): _command = 'run_ilamb.sh' _args = None _env = None def __init__(self): self._time = self.get_start_time() @property def args(self): return [self._command] + (self._args or []) def get_component_n...
Use the correct name for the run script
Use the correct name for the run script It may be time to go home.
Python
mit
permamodel/ILAMB,permamodel/ILAMB,permamodel/ILAMB
#! /usr/bin/env python import sys import subprocess class BmiIlamb(object): _command = 'run_ilamb' _args = None _env = None def __init__(self): self._time = self.get_start_time() @property def args(self): return [self._command] + (self._args or []) def get_component_name...
#! /usr/bin/env python import sys import subprocess class BmiIlamb(object): _command = 'run_ilamb.sh' _args = None _env = None def __init__(self): self._time = self.get_start_time() @property def args(self): return [self._command] + (self._args or []) def get_component_n...
<commit_before>#! /usr/bin/env python import sys import subprocess class BmiIlamb(object): _command = 'run_ilamb' _args = None _env = None def __init__(self): self._time = self.get_start_time() @property def args(self): return [self._command] + (self._args or []) def get...
#! /usr/bin/env python import sys import subprocess class BmiIlamb(object): _command = 'run_ilamb.sh' _args = None _env = None def __init__(self): self._time = self.get_start_time() @property def args(self): return [self._command] + (self._args or []) def get_component_n...
#! /usr/bin/env python import sys import subprocess class BmiIlamb(object): _command = 'run_ilamb' _args = None _env = None def __init__(self): self._time = self.get_start_time() @property def args(self): return [self._command] + (self._args or []) def get_component_name...
<commit_before>#! /usr/bin/env python import sys import subprocess class BmiIlamb(object): _command = 'run_ilamb' _args = None _env = None def __init__(self): self._time = self.get_start_time() @property def args(self): return [self._command] + (self._args or []) def get...
32def5f720b5ffb858f604dc360f66fa2a1b946a
pirx/base.py
pirx/base.py
import collections class Settings(object): def __init__(self): self._settings = collections.OrderedDict() def __setattr__(self, name, value): if name.startswith('_'): super(Settings, self).__setattr__(name, value) else: self._settings[name] = value def _se...
import collections class Settings(object): def __init__(self): self._settings = collections.OrderedDict() def __setattr__(self, name, value): if name.startswith('_'): super(Settings, self).__setattr__(name, value) else: self._settings[name] = value def __s...
Replace 'write' method with '__str__'
Replace 'write' method with '__str__'
Python
mit
piotrekw/pirx
import collections class Settings(object): def __init__(self): self._settings = collections.OrderedDict() def __setattr__(self, name, value): if name.startswith('_'): super(Settings, self).__setattr__(name, value) else: self._settings[name] = value def _se...
import collections class Settings(object): def __init__(self): self._settings = collections.OrderedDict() def __setattr__(self, name, value): if name.startswith('_'): super(Settings, self).__setattr__(name, value) else: self._settings[name] = value def __s...
<commit_before>import collections class Settings(object): def __init__(self): self._settings = collections.OrderedDict() def __setattr__(self, name, value): if name.startswith('_'): super(Settings, self).__setattr__(name, value) else: self._settings[name] = val...
import collections class Settings(object): def __init__(self): self._settings = collections.OrderedDict() def __setattr__(self, name, value): if name.startswith('_'): super(Settings, self).__setattr__(name, value) else: self._settings[name] = value def __s...
import collections class Settings(object): def __init__(self): self._settings = collections.OrderedDict() def __setattr__(self, name, value): if name.startswith('_'): super(Settings, self).__setattr__(name, value) else: self._settings[name] = value def _se...
<commit_before>import collections class Settings(object): def __init__(self): self._settings = collections.OrderedDict() def __setattr__(self, name, value): if name.startswith('_'): super(Settings, self).__setattr__(name, value) else: self._settings[name] = val...
62e32c356fc86bcd855d2931974b9df17856809e
tests/backends/test_macOS.py
tests/backends/test_macOS.py
import pytest import keyring from keyring.testing.backend import BackendBasicTests from keyring.backends import macOS @pytest.mark.skipif( not keyring.backends.macOS.Keyring.viable, reason="macOS backend not viable", ) class TestOSXKeychain(BackendBasicTests): def init_keyring(self): return macOS...
import pytest import keyring from keyring.testing.backend import BackendBasicTests from keyring.backends import macOS @pytest.mark.skipif( not keyring.backends.macOS.Keyring.viable, reason="macOS backend not viable", ) class Test_macOSKeychain(BackendBasicTests): def init_keyring(self): return ma...
Rename test to match preferred naming convention for macOS.
Rename test to match preferred naming convention for macOS.
Python
mit
jaraco/keyring
import pytest import keyring from keyring.testing.backend import BackendBasicTests from keyring.backends import macOS @pytest.mark.skipif( not keyring.backends.macOS.Keyring.viable, reason="macOS backend not viable", ) class TestOSXKeychain(BackendBasicTests): def init_keyring(self): return macOS...
import pytest import keyring from keyring.testing.backend import BackendBasicTests from keyring.backends import macOS @pytest.mark.skipif( not keyring.backends.macOS.Keyring.viable, reason="macOS backend not viable", ) class Test_macOSKeychain(BackendBasicTests): def init_keyring(self): return ma...
<commit_before>import pytest import keyring from keyring.testing.backend import BackendBasicTests from keyring.backends import macOS @pytest.mark.skipif( not keyring.backends.macOS.Keyring.viable, reason="macOS backend not viable", ) class TestOSXKeychain(BackendBasicTests): def init_keyring(self): ...
import pytest import keyring from keyring.testing.backend import BackendBasicTests from keyring.backends import macOS @pytest.mark.skipif( not keyring.backends.macOS.Keyring.viable, reason="macOS backend not viable", ) class Test_macOSKeychain(BackendBasicTests): def init_keyring(self): return ma...
import pytest import keyring from keyring.testing.backend import BackendBasicTests from keyring.backends import macOS @pytest.mark.skipif( not keyring.backends.macOS.Keyring.viable, reason="macOS backend not viable", ) class TestOSXKeychain(BackendBasicTests): def init_keyring(self): return macOS...
<commit_before>import pytest import keyring from keyring.testing.backend import BackendBasicTests from keyring.backends import macOS @pytest.mark.skipif( not keyring.backends.macOS.Keyring.viable, reason="macOS backend not viable", ) class TestOSXKeychain(BackendBasicTests): def init_keyring(self): ...
d26b9d22363f9763f959332d07445a2a4e7c221c
services/vimeo.py
services/vimeo.py
import foauth.providers class Vimeo(foauth.providers.OAuth1): # General info about the provider provider_url = 'http://vimeo.com/' docs_url = 'http://developer.vimeo.com/apis/advanced' category = 'Videos' # URLs to interact with the API request_token_url = 'https://vimeo.com/oauth/request_tok...
import foauth.providers class Vimeo(foauth.providers.OAuth1): # General info about the provider provider_url = 'http://vimeo.com/' docs_url = 'http://developer.vimeo.com/apis/advanced' category = 'Videos' # URLs to interact with the API request_token_url = 'https://vimeo.com/oauth/request_tok...
Rewrite Vimeo to use the new scope selection system
Rewrite Vimeo to use the new scope selection system
Python
bsd-3-clause
foauth/foauth.org,foauth/foauth.org,foauth/oauth-proxy,foauth/foauth.org
import foauth.providers class Vimeo(foauth.providers.OAuth1): # General info about the provider provider_url = 'http://vimeo.com/' docs_url = 'http://developer.vimeo.com/apis/advanced' category = 'Videos' # URLs to interact with the API request_token_url = 'https://vimeo.com/oauth/request_tok...
import foauth.providers class Vimeo(foauth.providers.OAuth1): # General info about the provider provider_url = 'http://vimeo.com/' docs_url = 'http://developer.vimeo.com/apis/advanced' category = 'Videos' # URLs to interact with the API request_token_url = 'https://vimeo.com/oauth/request_tok...
<commit_before>import foauth.providers class Vimeo(foauth.providers.OAuth1): # General info about the provider provider_url = 'http://vimeo.com/' docs_url = 'http://developer.vimeo.com/apis/advanced' category = 'Videos' # URLs to interact with the API request_token_url = 'https://vimeo.com/oa...
import foauth.providers class Vimeo(foauth.providers.OAuth1): # General info about the provider provider_url = 'http://vimeo.com/' docs_url = 'http://developer.vimeo.com/apis/advanced' category = 'Videos' # URLs to interact with the API request_token_url = 'https://vimeo.com/oauth/request_tok...
import foauth.providers class Vimeo(foauth.providers.OAuth1): # General info about the provider provider_url = 'http://vimeo.com/' docs_url = 'http://developer.vimeo.com/apis/advanced' category = 'Videos' # URLs to interact with the API request_token_url = 'https://vimeo.com/oauth/request_tok...
<commit_before>import foauth.providers class Vimeo(foauth.providers.OAuth1): # General info about the provider provider_url = 'http://vimeo.com/' docs_url = 'http://developer.vimeo.com/apis/advanced' category = 'Videos' # URLs to interact with the API request_token_url = 'https://vimeo.com/oa...
612c393ec4d964fb933ebf5b8f957ae573ae65ba
tests/rules/test_git_push.py
tests/rules/test_git_push.py
import pytest from thefuck.rules.git_push import match, get_new_command from tests.utils import Command @pytest.fixture def stderr(): return '''fatal: The current branch master has no upstream branch. To push the current branch and set the remote as upstream, use git push --set-upstream origin master ''' ...
import pytest from thefuck.rules.git_push import match, get_new_command from tests.utils import Command @pytest.fixture def stderr(): return '''fatal: The current branch master has no upstream branch. To push the current branch and set the remote as upstream, use git push --set-upstream origin master ''' ...
Check git_push matches without specifying a branch
Check git_push matches without specifying a branch
Python
mit
nvbn/thefuck,mlk/thefuck,mlk/thefuck,nvbn/thefuck,SimenB/thefuck,Clpsplug/thefuck,scorphus/thefuck,scorphus/thefuck,SimenB/thefuck,Clpsplug/thefuck
import pytest from thefuck.rules.git_push import match, get_new_command from tests.utils import Command @pytest.fixture def stderr(): return '''fatal: The current branch master has no upstream branch. To push the current branch and set the remote as upstream, use git push --set-upstream origin master ''' ...
import pytest from thefuck.rules.git_push import match, get_new_command from tests.utils import Command @pytest.fixture def stderr(): return '''fatal: The current branch master has no upstream branch. To push the current branch and set the remote as upstream, use git push --set-upstream origin master ''' ...
<commit_before>import pytest from thefuck.rules.git_push import match, get_new_command from tests.utils import Command @pytest.fixture def stderr(): return '''fatal: The current branch master has no upstream branch. To push the current branch and set the remote as upstream, use git push --set-upstream origin...
import pytest from thefuck.rules.git_push import match, get_new_command from tests.utils import Command @pytest.fixture def stderr(): return '''fatal: The current branch master has no upstream branch. To push the current branch and set the remote as upstream, use git push --set-upstream origin master ''' ...
import pytest from thefuck.rules.git_push import match, get_new_command from tests.utils import Command @pytest.fixture def stderr(): return '''fatal: The current branch master has no upstream branch. To push the current branch and set the remote as upstream, use git push --set-upstream origin master ''' ...
<commit_before>import pytest from thefuck.rules.git_push import match, get_new_command from tests.utils import Command @pytest.fixture def stderr(): return '''fatal: The current branch master has no upstream branch. To push the current branch and set the remote as upstream, use git push --set-upstream origin...
e621b9f03b19e38dc6754dd1a4cb7b172e4891e7
tests/test_extended_tests.py
tests/test_extended_tests.py
import pytest import glob from html2kirby import HTML2Kirby files = [] for f in glob.glob("extended_tests/*.html"): html = f txt = f.replace(".html", ".txt") files.append((html, txt)) @pytest.mark.parametrize("html,kirby", files) def test_file(html, kirby): formatter = HTML2Kirby() with open(...
import pytest import glob import os from html2kirby import HTML2Kirby files = [] path = os.path.dirname(os.path.abspath(__file__)) extended_tests_path = os.path.join(path, "extended_tests/*.html") for f in glob.glob(extended_tests_path): html = f txt = f.replace(".html", ".txt") files.append((html, tx...
Fix the extended test search
Fix the extended test search
Python
mit
liip/html2kirby,liip/html2kirby
import pytest import glob from html2kirby import HTML2Kirby files = [] for f in glob.glob("extended_tests/*.html"): html = f txt = f.replace(".html", ".txt") files.append((html, txt)) @pytest.mark.parametrize("html,kirby", files) def test_file(html, kirby): formatter = HTML2Kirby() with open(...
import pytest import glob import os from html2kirby import HTML2Kirby files = [] path = os.path.dirname(os.path.abspath(__file__)) extended_tests_path = os.path.join(path, "extended_tests/*.html") for f in glob.glob(extended_tests_path): html = f txt = f.replace(".html", ".txt") files.append((html, tx...
<commit_before>import pytest import glob from html2kirby import HTML2Kirby files = [] for f in glob.glob("extended_tests/*.html"): html = f txt = f.replace(".html", ".txt") files.append((html, txt)) @pytest.mark.parametrize("html,kirby", files) def test_file(html, kirby): formatter = HTML2Kirby() ...
import pytest import glob import os from html2kirby import HTML2Kirby files = [] path = os.path.dirname(os.path.abspath(__file__)) extended_tests_path = os.path.join(path, "extended_tests/*.html") for f in glob.glob(extended_tests_path): html = f txt = f.replace(".html", ".txt") files.append((html, tx...
import pytest import glob from html2kirby import HTML2Kirby files = [] for f in glob.glob("extended_tests/*.html"): html = f txt = f.replace(".html", ".txt") files.append((html, txt)) @pytest.mark.parametrize("html,kirby", files) def test_file(html, kirby): formatter = HTML2Kirby() with open(...
<commit_before>import pytest import glob from html2kirby import HTML2Kirby files = [] for f in glob.glob("extended_tests/*.html"): html = f txt = f.replace(".html", ".txt") files.append((html, txt)) @pytest.mark.parametrize("html,kirby", files) def test_file(html, kirby): formatter = HTML2Kirby() ...
603aacd06b99326d7dbab28e750b34589c51fa05
tests/test_postgresqlgate.py
tests/test_postgresqlgate.py
# coding: utf-8 """ Unit tests for the base gate. """ from unittest.mock import MagicMock, mock_open, patch import smdba.postgresqlgate class TestPgGt: """ Test suite for base gate. """ @patch("os.path.exists", MagicMock(side_effect=[True, False, False])) @patch("smdba.postgresqlgate.open", new_ca...
# coding: utf-8 """ Unit tests for the base gate. """ from unittest.mock import MagicMock, mock_open, patch import smdba.postgresqlgate class TestPgGt: """ Test suite for base gate. """ @patch("os.path.exists", MagicMock(side_effect=[True, False, False])) @patch("smdba.postgresqlgate.open", new_ca...
Add unit test for database scenario call
Add unit test for database scenario call
Python
mit
SUSE/smdba,SUSE/smdba
# coding: utf-8 """ Unit tests for the base gate. """ from unittest.mock import MagicMock, mock_open, patch import smdba.postgresqlgate class TestPgGt: """ Test suite for base gate. """ @patch("os.path.exists", MagicMock(side_effect=[True, False, False])) @patch("smdba.postgresqlgate.open", new_ca...
# coding: utf-8 """ Unit tests for the base gate. """ from unittest.mock import MagicMock, mock_open, patch import smdba.postgresqlgate class TestPgGt: """ Test suite for base gate. """ @patch("os.path.exists", MagicMock(side_effect=[True, False, False])) @patch("smdba.postgresqlgate.open", new_ca...
<commit_before># coding: utf-8 """ Unit tests for the base gate. """ from unittest.mock import MagicMock, mock_open, patch import smdba.postgresqlgate class TestPgGt: """ Test suite for base gate. """ @patch("os.path.exists", MagicMock(side_effect=[True, False, False])) @patch("smdba.postgresqlgat...
# coding: utf-8 """ Unit tests for the base gate. """ from unittest.mock import MagicMock, mock_open, patch import smdba.postgresqlgate class TestPgGt: """ Test suite for base gate. """ @patch("os.path.exists", MagicMock(side_effect=[True, False, False])) @patch("smdba.postgresqlgate.open", new_ca...
# coding: utf-8 """ Unit tests for the base gate. """ from unittest.mock import MagicMock, mock_open, patch import smdba.postgresqlgate class TestPgGt: """ Test suite for base gate. """ @patch("os.path.exists", MagicMock(side_effect=[True, False, False])) @patch("smdba.postgresqlgate.open", new_ca...
<commit_before># coding: utf-8 """ Unit tests for the base gate. """ from unittest.mock import MagicMock, mock_open, patch import smdba.postgresqlgate class TestPgGt: """ Test suite for base gate. """ @patch("os.path.exists", MagicMock(side_effect=[True, False, False])) @patch("smdba.postgresqlgat...
2a0b1d070996bfb3d950d4fae70b264ddabc7d2f
sheldon/config.py
sheldon/config.py
# -*- coding: utf-8 -*- """ @author: Seva Zhidkov @contact: zhidkovseva@gmail.com @license: The MIT license Copyright (C) 2015 """ import os class Config: def __init__(self, prefix='SHELDON_'): """ Load config from environment variables. :param prefix: string, all needed environment va...
# -*- coding: utf-8 -*- """ @author: Seva Zhidkov @contact: zhidkovseva@gmail.com @license: The MIT license Copyright (C) 2015 """ import os class Config: def __init__(self, prefix='SHELDON_'): """ Load config from environment variables. :param prefix: string, all needed environment va...
Add function for getting installed plugins
Add function for getting installed plugins
Python
mit
lises/sheldon
# -*- coding: utf-8 -*- """ @author: Seva Zhidkov @contact: zhidkovseva@gmail.com @license: The MIT license Copyright (C) 2015 """ import os class Config: def __init__(self, prefix='SHELDON_'): """ Load config from environment variables. :param prefix: string, all needed environment va...
# -*- coding: utf-8 -*- """ @author: Seva Zhidkov @contact: zhidkovseva@gmail.com @license: The MIT license Copyright (C) 2015 """ import os class Config: def __init__(self, prefix='SHELDON_'): """ Load config from environment variables. :param prefix: string, all needed environment va...
<commit_before># -*- coding: utf-8 -*- """ @author: Seva Zhidkov @contact: zhidkovseva@gmail.com @license: The MIT license Copyright (C) 2015 """ import os class Config: def __init__(self, prefix='SHELDON_'): """ Load config from environment variables. :param prefix: string, all needed...
# -*- coding: utf-8 -*- """ @author: Seva Zhidkov @contact: zhidkovseva@gmail.com @license: The MIT license Copyright (C) 2015 """ import os class Config: def __init__(self, prefix='SHELDON_'): """ Load config from environment variables. :param prefix: string, all needed environment va...
# -*- coding: utf-8 -*- """ @author: Seva Zhidkov @contact: zhidkovseva@gmail.com @license: The MIT license Copyright (C) 2015 """ import os class Config: def __init__(self, prefix='SHELDON_'): """ Load config from environment variables. :param prefix: string, all needed environment va...
<commit_before># -*- coding: utf-8 -*- """ @author: Seva Zhidkov @contact: zhidkovseva@gmail.com @license: The MIT license Copyright (C) 2015 """ import os class Config: def __init__(self, prefix='SHELDON_'): """ Load config from environment variables. :param prefix: string, all needed...
2f8ae4d29bd95c298209a0cb93b5354c00186d6b
trackpy/C_fallback_python.py
trackpy/C_fallback_python.py
try: from _Cfilters import nullify_secondary_maxima except ImportError: import numpy as np # Because of the way C imports work, nullify_secondary_maxima # is *called*, as in nullify_secondary_maxima(). # For the pure Python variant, we do not want to call the function, # so we make nullify_secon...
try: from _Cfilters import nullify_secondary_maxima except ImportError: import numpy as np # Because of the way C imports work, nullify_secondary_maxima # is *called*, as in nullify_secondary_maxima(). # For the pure Python variant, we do not want to call the function, # so we make nullify_secon...
Fix and speedup pure-Python fallback for C filter.
BUG/PERF: Fix and speedup pure-Python fallback for C filter.
Python
bsd-3-clause
daniorerio/trackpy,daniorerio/trackpy
try: from _Cfilters import nullify_secondary_maxima except ImportError: import numpy as np # Because of the way C imports work, nullify_secondary_maxima # is *called*, as in nullify_secondary_maxima(). # For the pure Python variant, we do not want to call the function, # so we make nullify_secon...
try: from _Cfilters import nullify_secondary_maxima except ImportError: import numpy as np # Because of the way C imports work, nullify_secondary_maxima # is *called*, as in nullify_secondary_maxima(). # For the pure Python variant, we do not want to call the function, # so we make nullify_secon...
<commit_before>try: from _Cfilters import nullify_secondary_maxima except ImportError: import numpy as np # Because of the way C imports work, nullify_secondary_maxima # is *called*, as in nullify_secondary_maxima(). # For the pure Python variant, we do not want to call the function, # so we mak...
try: from _Cfilters import nullify_secondary_maxima except ImportError: import numpy as np # Because of the way C imports work, nullify_secondary_maxima # is *called*, as in nullify_secondary_maxima(). # For the pure Python variant, we do not want to call the function, # so we make nullify_secon...
try: from _Cfilters import nullify_secondary_maxima except ImportError: import numpy as np # Because of the way C imports work, nullify_secondary_maxima # is *called*, as in nullify_secondary_maxima(). # For the pure Python variant, we do not want to call the function, # so we make nullify_secon...
<commit_before>try: from _Cfilters import nullify_secondary_maxima except ImportError: import numpy as np # Because of the way C imports work, nullify_secondary_maxima # is *called*, as in nullify_secondary_maxima(). # For the pure Python variant, we do not want to call the function, # so we mak...
cef249edef4100b8a3c009fa05febbc66c3fe5df
spamostack/spamostack.py
spamostack/spamostack.py
import argparse from collections import OrderedDict import json import logger import logging from session import Session from simulator import Simulator from cache import Cache from client_factory import ClientFactory from keeper import Keeper parser = argparse.ArgumentParser() parser.add_argument('--pipe', dest='pi...
import argparse from collections import OrderedDict import json import logger import logging from session import Session from simulator import Simulator from cache import Cache from client_factory import ClientFactory from keeper import Keeper parser = argparse.ArgumentParser() parser.add_argument('--pipe', dest='pi...
Add default path to config
Add default path to config
Python
apache-2.0
seecloud/spamostack
import argparse from collections import OrderedDict import json import logger import logging from session import Session from simulator import Simulator from cache import Cache from client_factory import ClientFactory from keeper import Keeper parser = argparse.ArgumentParser() parser.add_argument('--pipe', dest='pi...
import argparse from collections import OrderedDict import json import logger import logging from session import Session from simulator import Simulator from cache import Cache from client_factory import ClientFactory from keeper import Keeper parser = argparse.ArgumentParser() parser.add_argument('--pipe', dest='pi...
<commit_before>import argparse from collections import OrderedDict import json import logger import logging from session import Session from simulator import Simulator from cache import Cache from client_factory import ClientFactory from keeper import Keeper parser = argparse.ArgumentParser() parser.add_argument('--...
import argparse from collections import OrderedDict import json import logger import logging from session import Session from simulator import Simulator from cache import Cache from client_factory import ClientFactory from keeper import Keeper parser = argparse.ArgumentParser() parser.add_argument('--pipe', dest='pi...
import argparse from collections import OrderedDict import json import logger import logging from session import Session from simulator import Simulator from cache import Cache from client_factory import ClientFactory from keeper import Keeper parser = argparse.ArgumentParser() parser.add_argument('--pipe', dest='pi...
<commit_before>import argparse from collections import OrderedDict import json import logger import logging from session import Session from simulator import Simulator from cache import Cache from client_factory import ClientFactory from keeper import Keeper parser = argparse.ArgumentParser() parser.add_argument('--...
0003ef7fe3d59c4bda034dee334d45b6d7a2622d
pyvm_test.py
pyvm_test.py
import pyvm import unittest class PyVMTest(unittest.TestCase): def setUp(self): self.vm = pyvm.PythonVM() def test_load_const_num(self): self.assertEqual( 10, self.vm.eval('10') ) def test_load_const_str(self): self.assertEqual( "hoge", ...
import pyvm import unittest class PyVMTest(unittest.TestCase): def setUp(self): self.vm = pyvm.PythonVM() def test_load_const_num(self): self.assertEqual( 10, self.vm.eval('10') ) def test_load_const_num_float(self): self.assertEqual( 10...
Add test of storing float
Add test of storing float
Python
mit
utgwkk/tiny-python-vm
import pyvm import unittest class PyVMTest(unittest.TestCase): def setUp(self): self.vm = pyvm.PythonVM() def test_load_const_num(self): self.assertEqual( 10, self.vm.eval('10') ) def test_load_const_str(self): self.assertEqual( "hoge", ...
import pyvm import unittest class PyVMTest(unittest.TestCase): def setUp(self): self.vm = pyvm.PythonVM() def test_load_const_num(self): self.assertEqual( 10, self.vm.eval('10') ) def test_load_const_num_float(self): self.assertEqual( 10...
<commit_before>import pyvm import unittest class PyVMTest(unittest.TestCase): def setUp(self): self.vm = pyvm.PythonVM() def test_load_const_num(self): self.assertEqual( 10, self.vm.eval('10') ) def test_load_const_str(self): self.assertEqual( ...
import pyvm import unittest class PyVMTest(unittest.TestCase): def setUp(self): self.vm = pyvm.PythonVM() def test_load_const_num(self): self.assertEqual( 10, self.vm.eval('10') ) def test_load_const_num_float(self): self.assertEqual( 10...
import pyvm import unittest class PyVMTest(unittest.TestCase): def setUp(self): self.vm = pyvm.PythonVM() def test_load_const_num(self): self.assertEqual( 10, self.vm.eval('10') ) def test_load_const_str(self): self.assertEqual( "hoge", ...
<commit_before>import pyvm import unittest class PyVMTest(unittest.TestCase): def setUp(self): self.vm = pyvm.PythonVM() def test_load_const_num(self): self.assertEqual( 10, self.vm.eval('10') ) def test_load_const_str(self): self.assertEqual( ...
9ff48dd4bff605ad1521c8ebaffc18432a155d8d
wagtailcodeblock/settings.py
wagtailcodeblock/settings.py
from django.conf import settings def get_language_choices(): """ Default list of language choices, if not overridden by Django. """ DEFAULT_LANGUAGES = ( ('bash', 'Bash/Shell'), ('css', 'CSS'), ('diff', 'diff'), ('http', 'HTML'), ('javascript', 'Java...
from django.conf import settings def get_language_choices(): """ Default list of language choices, if not overridden by Django. """ DEFAULT_LANGUAGES = ( ('bash', 'Bash/Shell'), ('css', 'CSS'), ('diff', 'diff'), ('http', 'HTML'), ('javascript', 'Java...
Update to prims 1.10 version
Update to prims 1.10 version
Python
bsd-3-clause
FlipperPA/wagtailcodeblock,FlipperPA/wagtailcodeblock,FlipperPA/wagtailcodeblock
from django.conf import settings def get_language_choices(): """ Default list of language choices, if not overridden by Django. """ DEFAULT_LANGUAGES = ( ('bash', 'Bash/Shell'), ('css', 'CSS'), ('diff', 'diff'), ('http', 'HTML'), ('javascript', 'Java...
from django.conf import settings def get_language_choices(): """ Default list of language choices, if not overridden by Django. """ DEFAULT_LANGUAGES = ( ('bash', 'Bash/Shell'), ('css', 'CSS'), ('diff', 'diff'), ('http', 'HTML'), ('javascript', 'Java...
<commit_before>from django.conf import settings def get_language_choices(): """ Default list of language choices, if not overridden by Django. """ DEFAULT_LANGUAGES = ( ('bash', 'Bash/Shell'), ('css', 'CSS'), ('diff', 'diff'), ('http', 'HTML'), ('jav...
from django.conf import settings def get_language_choices(): """ Default list of language choices, if not overridden by Django. """ DEFAULT_LANGUAGES = ( ('bash', 'Bash/Shell'), ('css', 'CSS'), ('diff', 'diff'), ('http', 'HTML'), ('javascript', 'Java...
from django.conf import settings def get_language_choices(): """ Default list of language choices, if not overridden by Django. """ DEFAULT_LANGUAGES = ( ('bash', 'Bash/Shell'), ('css', 'CSS'), ('diff', 'diff'), ('http', 'HTML'), ('javascript', 'Java...
<commit_before>from django.conf import settings def get_language_choices(): """ Default list of language choices, if not overridden by Django. """ DEFAULT_LANGUAGES = ( ('bash', 'Bash/Shell'), ('css', 'CSS'), ('diff', 'diff'), ('http', 'HTML'), ('jav...
c4d64672c8c72ca928b354e9cfd35a7d40dbb78f
MROCPdjangoForm/ocpipeline/mrpaths.py
MROCPdjangoForm/ocpipeline/mrpaths.py
# # Code to load project paths # import os, sys MR_BASE_PATH = os.path.abspath(os.path.join(os.path.dirname(__file__), "/Users/dmhembere44/MR-connectome" )) MR_CMAPPER_PATH = os.path.join(MR_BASE_PATH, "cmapper" ) MR_MRCAP_PATH = os.path.join(MR_BASE_PATH, "mrcap" ) sys.path += [ MR_BASE_PATH, MR_CMAPPER_PATH, MR_MR...
# # Code to load project paths # import os, sys MR_BASE_PATH = os.path.abspath(os.path.join(os.path.dirname(__file__), "../.." )) MR_CMAPPER_PATH = os.path.join(MR_BASE_PATH, "cmapper" ) MR_MRCAP_PATH = os.path.join(MR_BASE_PATH, "mrcap" ) sys.path += [ MR_BASE_PATH, MR_CMAPPER_PATH, MR_MRCAP_PATH ]
Change to path, made relative
Change to path, made relative Former-commit-id: f00bf782fad3f6ddc6d2c97a23ff4f087ad3a22f
Python
apache-2.0
neurodata/ndmg
# # Code to load project paths # import os, sys MR_BASE_PATH = os.path.abspath(os.path.join(os.path.dirname(__file__), "/Users/dmhembere44/MR-connectome" )) MR_CMAPPER_PATH = os.path.join(MR_BASE_PATH, "cmapper" ) MR_MRCAP_PATH = os.path.join(MR_BASE_PATH, "mrcap" ) sys.path += [ MR_BASE_PATH, MR_CMAPPER_PATH, MR_MR...
# # Code to load project paths # import os, sys MR_BASE_PATH = os.path.abspath(os.path.join(os.path.dirname(__file__), "../.." )) MR_CMAPPER_PATH = os.path.join(MR_BASE_PATH, "cmapper" ) MR_MRCAP_PATH = os.path.join(MR_BASE_PATH, "mrcap" ) sys.path += [ MR_BASE_PATH, MR_CMAPPER_PATH, MR_MRCAP_PATH ]
<commit_before># # Code to load project paths # import os, sys MR_BASE_PATH = os.path.abspath(os.path.join(os.path.dirname(__file__), "/Users/dmhembere44/MR-connectome" )) MR_CMAPPER_PATH = os.path.join(MR_BASE_PATH, "cmapper" ) MR_MRCAP_PATH = os.path.join(MR_BASE_PATH, "mrcap" ) sys.path += [ MR_BASE_PATH, MR_CMAP...
# # Code to load project paths # import os, sys MR_BASE_PATH = os.path.abspath(os.path.join(os.path.dirname(__file__), "../.." )) MR_CMAPPER_PATH = os.path.join(MR_BASE_PATH, "cmapper" ) MR_MRCAP_PATH = os.path.join(MR_BASE_PATH, "mrcap" ) sys.path += [ MR_BASE_PATH, MR_CMAPPER_PATH, MR_MRCAP_PATH ]
# # Code to load project paths # import os, sys MR_BASE_PATH = os.path.abspath(os.path.join(os.path.dirname(__file__), "/Users/dmhembere44/MR-connectome" )) MR_CMAPPER_PATH = os.path.join(MR_BASE_PATH, "cmapper" ) MR_MRCAP_PATH = os.path.join(MR_BASE_PATH, "mrcap" ) sys.path += [ MR_BASE_PATH, MR_CMAPPER_PATH, MR_MR...
<commit_before># # Code to load project paths # import os, sys MR_BASE_PATH = os.path.abspath(os.path.join(os.path.dirname(__file__), "/Users/dmhembere44/MR-connectome" )) MR_CMAPPER_PATH = os.path.join(MR_BASE_PATH, "cmapper" ) MR_MRCAP_PATH = os.path.join(MR_BASE_PATH, "mrcap" ) sys.path += [ MR_BASE_PATH, MR_CMAP...
cba5a3d4928a3ee2e7672ca4a3f766a789d83acf
cupcake/smush/plot.py
cupcake/smush/plot.py
""" User-facing interface for plotting all dimensionality reduction algorithms """ def smushplot(data, smusher='pca', n_components=2, marker='o', marker_order=None, text=False, text_order=None, linewidth=1, linewidth_order=None, edgecolor='k', edgecolor_order=None, smusher_kws=None, ...
""" User-facing interface for plotting all dimensionality reduction algorithms """ def smushplot(data, smusher='PCA', x=1, y=2, n_components=2, marker='o', marker_order=None, text=False, text_order=None, linewidth=1, linewidth_order=None, edgecolor='k', edgecolor_order=None, s...
Add x, y arguments and docstring
Add x, y arguments and docstring
Python
bsd-3-clause
olgabot/cupcake
""" User-facing interface for plotting all dimensionality reduction algorithms """ def smushplot(data, smusher='pca', n_components=2, marker='o', marker_order=None, text=False, text_order=None, linewidth=1, linewidth_order=None, edgecolor='k', edgecolor_order=None, smusher_kws=None, ...
""" User-facing interface for plotting all dimensionality reduction algorithms """ def smushplot(data, smusher='PCA', x=1, y=2, n_components=2, marker='o', marker_order=None, text=False, text_order=None, linewidth=1, linewidth_order=None, edgecolor='k', edgecolor_order=None, s...
<commit_before>""" User-facing interface for plotting all dimensionality reduction algorithms """ def smushplot(data, smusher='pca', n_components=2, marker='o', marker_order=None, text=False, text_order=None, linewidth=1, linewidth_order=None, edgecolor='k', edgecolor_order=None, smusher_kw...
""" User-facing interface for plotting all dimensionality reduction algorithms """ def smushplot(data, smusher='PCA', x=1, y=2, n_components=2, marker='o', marker_order=None, text=False, text_order=None, linewidth=1, linewidth_order=None, edgecolor='k', edgecolor_order=None, s...
""" User-facing interface for plotting all dimensionality reduction algorithms """ def smushplot(data, smusher='pca', n_components=2, marker='o', marker_order=None, text=False, text_order=None, linewidth=1, linewidth_order=None, edgecolor='k', edgecolor_order=None, smusher_kws=None, ...
<commit_before>""" User-facing interface for plotting all dimensionality reduction algorithms """ def smushplot(data, smusher='pca', n_components=2, marker='o', marker_order=None, text=False, text_order=None, linewidth=1, linewidth_order=None, edgecolor='k', edgecolor_order=None, smusher_kw...
66ba9aa2172fbed67b67a06acb331d449d32a33c
tests/services/shop/conftest.py
tests/services/shop/conftest.py
""" :Copyright: 2006-2020 Jochen Kupperschmidt :License: Modified BSD, see LICENSE for details. """ import pytest from byceps.services.shop.cart.models import Cart from byceps.services.shop.sequence import service as sequence_service from byceps.services.shop.shop import service as shop_service from testfixtures.sho...
""" :Copyright: 2006-2020 Jochen Kupperschmidt :License: Modified BSD, see LICENSE for details. """ import pytest from byceps.services.shop.cart.models import Cart from byceps.services.shop.sequence import service as sequence_service from byceps.services.shop.shop import service as shop_service from testfixtures.sho...
Remove unused fixture from orderer
Remove unused fixture from orderer
Python
bsd-3-clause
homeworkprod/byceps,homeworkprod/byceps,homeworkprod/byceps
""" :Copyright: 2006-2020 Jochen Kupperschmidt :License: Modified BSD, see LICENSE for details. """ import pytest from byceps.services.shop.cart.models import Cart from byceps.services.shop.sequence import service as sequence_service from byceps.services.shop.shop import service as shop_service from testfixtures.sho...
""" :Copyright: 2006-2020 Jochen Kupperschmidt :License: Modified BSD, see LICENSE for details. """ import pytest from byceps.services.shop.cart.models import Cart from byceps.services.shop.sequence import service as sequence_service from byceps.services.shop.shop import service as shop_service from testfixtures.sho...
<commit_before>""" :Copyright: 2006-2020 Jochen Kupperschmidt :License: Modified BSD, see LICENSE for details. """ import pytest from byceps.services.shop.cart.models import Cart from byceps.services.shop.sequence import service as sequence_service from byceps.services.shop.shop import service as shop_service from t...
""" :Copyright: 2006-2020 Jochen Kupperschmidt :License: Modified BSD, see LICENSE for details. """ import pytest from byceps.services.shop.cart.models import Cart from byceps.services.shop.sequence import service as sequence_service from byceps.services.shop.shop import service as shop_service from testfixtures.sho...
""" :Copyright: 2006-2020 Jochen Kupperschmidt :License: Modified BSD, see LICENSE for details. """ import pytest from byceps.services.shop.cart.models import Cart from byceps.services.shop.sequence import service as sequence_service from byceps.services.shop.shop import service as shop_service from testfixtures.sho...
<commit_before>""" :Copyright: 2006-2020 Jochen Kupperschmidt :License: Modified BSD, see LICENSE for details. """ import pytest from byceps.services.shop.cart.models import Cart from byceps.services.shop.sequence import service as sequence_service from byceps.services.shop.shop import service as shop_service from t...
d95001c17b095b713d8a4edacead561ba127aa53
src/NamerTests.py
src/NamerTests.py
import unittest import os from approvaltests.Namer import Namer class NamerTests(unittest.TestCase): def test_class(self): n = Namer() self.assertEqual("NamerTests", n.getClassName()) def test_method(self): n = Namer() self.assertEqual("test_method", n.getMethodName()) d...
import unittest import os from approvaltests.Namer import Namer class NamerTests(unittest.TestCase): def test_class(self): n = Namer() self.assertEqual("NamerTests", n.getClassName()) def test_method(self): n = Namer() self.assertEqual("test_method", n.getMethodName()) d...
Remove '\' condition from test as it will not be in the file path when used on Linux.
Remove '\' condition from test as it will not be in the file path when used on Linux.
Python
apache-2.0
approvals/ApprovalTests.Python,tdpreece/ApprovalTests.Python,approvals/ApprovalTests.Python,approvals/ApprovalTests.Python
import unittest import os from approvaltests.Namer import Namer class NamerTests(unittest.TestCase): def test_class(self): n = Namer() self.assertEqual("NamerTests", n.getClassName()) def test_method(self): n = Namer() self.assertEqual("test_method", n.getMethodName()) d...
import unittest import os from approvaltests.Namer import Namer class NamerTests(unittest.TestCase): def test_class(self): n = Namer() self.assertEqual("NamerTests", n.getClassName()) def test_method(self): n = Namer() self.assertEqual("test_method", n.getMethodName()) d...
<commit_before>import unittest import os from approvaltests.Namer import Namer class NamerTests(unittest.TestCase): def test_class(self): n = Namer() self.assertEqual("NamerTests", n.getClassName()) def test_method(self): n = Namer() self.assertEqual("test_method", n.getMetho...
import unittest import os from approvaltests.Namer import Namer class NamerTests(unittest.TestCase): def test_class(self): n = Namer() self.assertEqual("NamerTests", n.getClassName()) def test_method(self): n = Namer() self.assertEqual("test_method", n.getMethodName()) d...
import unittest import os from approvaltests.Namer import Namer class NamerTests(unittest.TestCase): def test_class(self): n = Namer() self.assertEqual("NamerTests", n.getClassName()) def test_method(self): n = Namer() self.assertEqual("test_method", n.getMethodName()) d...
<commit_before>import unittest import os from approvaltests.Namer import Namer class NamerTests(unittest.TestCase): def test_class(self): n = Namer() self.assertEqual("NamerTests", n.getClassName()) def test_method(self): n = Namer() self.assertEqual("test_method", n.getMetho...
4e88b6ee9c1927aeb312e40335633d2ca9871c8c
tokens/migrations/0002_token_token_type.py
tokens/migrations/0002_token_token_type.py
# -*- coding: utf-8 -*- # Generated by Django 1.11.3 on 2017-07-14 19:02 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('tokens', '0001_initial'), ] operations = [ migrations.AddField( ...
# -*- coding: utf-8 -*- # Generated by Django 1.11.3 on 2017-07-14 19:02 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('tokens', '0001_initial'), ] operations = [ migrations.AddField( ...
Fix psycopg2 DataError due to bad varchar length
Fix psycopg2 DataError due to bad varchar length
Python
apache-2.0
onyb/ethane,onyb/ethane,onyb/ethane,onyb/ethane
# -*- coding: utf-8 -*- # Generated by Django 1.11.3 on 2017-07-14 19:02 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('tokens', '0001_initial'), ] operations = [ migrations.AddField( ...
# -*- coding: utf-8 -*- # Generated by Django 1.11.3 on 2017-07-14 19:02 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('tokens', '0001_initial'), ] operations = [ migrations.AddField( ...
<commit_before># -*- coding: utf-8 -*- # Generated by Django 1.11.3 on 2017-07-14 19:02 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('tokens', '0001_initial'), ] operations = [ migrations.AddFie...
# -*- coding: utf-8 -*- # Generated by Django 1.11.3 on 2017-07-14 19:02 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('tokens', '0001_initial'), ] operations = [ migrations.AddField( ...
# -*- coding: utf-8 -*- # Generated by Django 1.11.3 on 2017-07-14 19:02 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('tokens', '0001_initial'), ] operations = [ migrations.AddField( ...
<commit_before># -*- coding: utf-8 -*- # Generated by Django 1.11.3 on 2017-07-14 19:02 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('tokens', '0001_initial'), ] operations = [ migrations.AddFie...
e743f82d93e9501c8b3bd827ee0553ceec8aadb6
linkedin_scraper/spiders/search.py
linkedin_scraper/spiders/search.py
import scrapy class SearchSpider(scrapy.Spider): name = 'search' allowed_domains = ['linkedin.com'] start_urls = [ 'https://www.linkedin.com/vsearch/f?type=people&keywords=MateuszMoneta'] def parse(self, response): for search_result in response.css('li.mod.result.people'): ...
from os import environ from scrapy.spiders.init import InitSpider from scrapy.http import Request, FormRequest class SearchSpider(InitSpider): name = 'search' allowed_domains = ['linkedin.com'] login_page = 'https://www.linkedin.com/uas/login' start_urls = [ 'https://www.linkedin.com/vsearch...
Allow Spider to log into LinkedIn.
Allow Spider to log into LinkedIn. * SearchSpider now uses InitSpider as base class, * SearchSpider now accepts username and password arguments, * username and password can also be set by SPIDER_USERNAME and SPIDER_PASSWORD env variables, * SearchSpider log into LinkedIn by sending form with credentials to /uas/login ...
Python
mit
nihn/linkedin-scraper,nihn/linkedin-scraper
import scrapy class SearchSpider(scrapy.Spider): name = 'search' allowed_domains = ['linkedin.com'] start_urls = [ 'https://www.linkedin.com/vsearch/f?type=people&keywords=MateuszMoneta'] def parse(self, response): for search_result in response.css('li.mod.result.people'): ...
from os import environ from scrapy.spiders.init import InitSpider from scrapy.http import Request, FormRequest class SearchSpider(InitSpider): name = 'search' allowed_domains = ['linkedin.com'] login_page = 'https://www.linkedin.com/uas/login' start_urls = [ 'https://www.linkedin.com/vsearch...
<commit_before>import scrapy class SearchSpider(scrapy.Spider): name = 'search' allowed_domains = ['linkedin.com'] start_urls = [ 'https://www.linkedin.com/vsearch/f?type=people&keywords=MateuszMoneta'] def parse(self, response): for search_result in response.css('li.mod.result.people...
from os import environ from scrapy.spiders.init import InitSpider from scrapy.http import Request, FormRequest class SearchSpider(InitSpider): name = 'search' allowed_domains = ['linkedin.com'] login_page = 'https://www.linkedin.com/uas/login' start_urls = [ 'https://www.linkedin.com/vsearch...
import scrapy class SearchSpider(scrapy.Spider): name = 'search' allowed_domains = ['linkedin.com'] start_urls = [ 'https://www.linkedin.com/vsearch/f?type=people&keywords=MateuszMoneta'] def parse(self, response): for search_result in response.css('li.mod.result.people'): ...
<commit_before>import scrapy class SearchSpider(scrapy.Spider): name = 'search' allowed_domains = ['linkedin.com'] start_urls = [ 'https://www.linkedin.com/vsearch/f?type=people&keywords=MateuszMoneta'] def parse(self, response): for search_result in response.css('li.mod.result.people...
d237071aef4cc62c3506d25072937cdc6feab797
examples/modes/pygments_syntax_highlighter.py
examples/modes/pygments_syntax_highlighter.py
""" Minimal example showing the use of the AutoCompleteMode. """ import logging logging.basicConfig(level=logging.DEBUG) import sys from pyqode.qt import QtWidgets from pyqode.core.api import CodeEdit, ColorScheme from pyqode.core.backend import server from pyqode.core.modes import PygmentsSH if __name__ == '__main_...
""" Minimal example showing the use of the AutoCompleteMode. """ import logging logging.basicConfig(level=logging.DEBUG) import sys from pyqode.qt import QtWidgets from pyqode.core.api import CodeEdit, ColorScheme from pyqode.core.backend import server from pyqode.core.modes import PygmentsSH if __name__ == '__main_...
Update example to make use of the new simplified color scheme api
Update example to make use of the new simplified color scheme api
Python
mit
pyQode/pyqode.core,zwadar/pyqode.core,pyQode/pyqode.core
""" Minimal example showing the use of the AutoCompleteMode. """ import logging logging.basicConfig(level=logging.DEBUG) import sys from pyqode.qt import QtWidgets from pyqode.core.api import CodeEdit, ColorScheme from pyqode.core.backend import server from pyqode.core.modes import PygmentsSH if __name__ == '__main_...
""" Minimal example showing the use of the AutoCompleteMode. """ import logging logging.basicConfig(level=logging.DEBUG) import sys from pyqode.qt import QtWidgets from pyqode.core.api import CodeEdit, ColorScheme from pyqode.core.backend import server from pyqode.core.modes import PygmentsSH if __name__ == '__main_...
<commit_before>""" Minimal example showing the use of the AutoCompleteMode. """ import logging logging.basicConfig(level=logging.DEBUG) import sys from pyqode.qt import QtWidgets from pyqode.core.api import CodeEdit, ColorScheme from pyqode.core.backend import server from pyqode.core.modes import PygmentsSH if __nam...
""" Minimal example showing the use of the AutoCompleteMode. """ import logging logging.basicConfig(level=logging.DEBUG) import sys from pyqode.qt import QtWidgets from pyqode.core.api import CodeEdit, ColorScheme from pyqode.core.backend import server from pyqode.core.modes import PygmentsSH if __name__ == '__main_...
""" Minimal example showing the use of the AutoCompleteMode. """ import logging logging.basicConfig(level=logging.DEBUG) import sys from pyqode.qt import QtWidgets from pyqode.core.api import CodeEdit, ColorScheme from pyqode.core.backend import server from pyqode.core.modes import PygmentsSH if __name__ == '__main_...
<commit_before>""" Minimal example showing the use of the AutoCompleteMode. """ import logging logging.basicConfig(level=logging.DEBUG) import sys from pyqode.qt import QtWidgets from pyqode.core.api import CodeEdit, ColorScheme from pyqode.core.backend import server from pyqode.core.modes import PygmentsSH if __nam...
cd9b9675cd81e9ee01b4ad2932319a6070b82753
zerver/migrations/0099_index_wildcard_mentioned_user_messages.py
zerver/migrations/0099_index_wildcard_mentioned_user_messages.py
from django.db import migrations class Migration(migrations.Migration): dependencies = [ ("zerver", "0098_index_has_alert_word_user_messages"), ] operations = [ migrations.RunSQL( """ CREATE INDEX IF NOT EXISTS zerver_usermessage_wildcard_mentioned_message_id ...
from django.db import migrations class Migration(migrations.Migration): dependencies = [ ("zerver", "0098_index_has_alert_word_user_messages"), ] operations = [ migrations.RunSQL( """ CREATE INDEX IF NOT EXISTS zerver_usermessage_wildcard_mentioned_message_id ...
Fix typo in 0099 reverse_sql.
migrations: Fix typo in 0099 reverse_sql. Signed-off-by: Anders Kaseorg <dfdb7392591db597bc41cf266a9c3bc12a2706e5@zulip.com>
Python
apache-2.0
kou/zulip,kou/zulip,kou/zulip,rht/zulip,andersk/zulip,zulip/zulip,kou/zulip,andersk/zulip,andersk/zulip,zulip/zulip,andersk/zulip,rht/zulip,kou/zulip,rht/zulip,zulip/zulip,kou/zulip,andersk/zulip,zulip/zulip,zulip/zulip,zulip/zulip,rht/zulip,rht/zulip,kou/zulip,zulip/zulip,rht/zulip,rht/zulip,andersk/zulip,andersk/zuli...
from django.db import migrations class Migration(migrations.Migration): dependencies = [ ("zerver", "0098_index_has_alert_word_user_messages"), ] operations = [ migrations.RunSQL( """ CREATE INDEX IF NOT EXISTS zerver_usermessage_wildcard_mentioned_message_id ...
from django.db import migrations class Migration(migrations.Migration): dependencies = [ ("zerver", "0098_index_has_alert_word_user_messages"), ] operations = [ migrations.RunSQL( """ CREATE INDEX IF NOT EXISTS zerver_usermessage_wildcard_mentioned_message_id ...
<commit_before>from django.db import migrations class Migration(migrations.Migration): dependencies = [ ("zerver", "0098_index_has_alert_word_user_messages"), ] operations = [ migrations.RunSQL( """ CREATE INDEX IF NOT EXISTS zerver_usermessage_wildcard_mentioned_...
from django.db import migrations class Migration(migrations.Migration): dependencies = [ ("zerver", "0098_index_has_alert_word_user_messages"), ] operations = [ migrations.RunSQL( """ CREATE INDEX IF NOT EXISTS zerver_usermessage_wildcard_mentioned_message_id ...
from django.db import migrations class Migration(migrations.Migration): dependencies = [ ("zerver", "0098_index_has_alert_word_user_messages"), ] operations = [ migrations.RunSQL( """ CREATE INDEX IF NOT EXISTS zerver_usermessage_wildcard_mentioned_message_id ...
<commit_before>from django.db import migrations class Migration(migrations.Migration): dependencies = [ ("zerver", "0098_index_has_alert_word_user_messages"), ] operations = [ migrations.RunSQL( """ CREATE INDEX IF NOT EXISTS zerver_usermessage_wildcard_mentioned_...
2e897f7dce89d4b52c3507c62e7120ee238b713c
database/database_setup.py
database/database_setup.py
from sqlalchemy import Column, ForeignKey, Integer, String from sqlalchemy.orm import relationship from sqlalchemy import create_engine from models.base import Base from models.user import User from models.store import Store from models.product import Product engine = create_engine('sqlite:///productcatalog.db') Base...
from sqlalchemy import Column, ForeignKey, Integer, String from sqlalchemy.orm import relationship from sqlalchemy import create_engine from models.base import Base from models.user import User from models.store import Store from models.product import Product engine = create_engine('postgresql://catalog:catalog123!@l...
Connect database engine to postgresql
feat: Connect database engine to postgresql
Python
mit
caasted/aws-flask-catalog-app,caasted/aws-flask-catalog-app
from sqlalchemy import Column, ForeignKey, Integer, String from sqlalchemy.orm import relationship from sqlalchemy import create_engine from models.base import Base from models.user import User from models.store import Store from models.product import Product engine = create_engine('sqlite:///productcatalog.db') Base...
from sqlalchemy import Column, ForeignKey, Integer, String from sqlalchemy.orm import relationship from sqlalchemy import create_engine from models.base import Base from models.user import User from models.store import Store from models.product import Product engine = create_engine('postgresql://catalog:catalog123!@l...
<commit_before>from sqlalchemy import Column, ForeignKey, Integer, String from sqlalchemy.orm import relationship from sqlalchemy import create_engine from models.base import Base from models.user import User from models.store import Store from models.product import Product engine = create_engine('sqlite:///productca...
from sqlalchemy import Column, ForeignKey, Integer, String from sqlalchemy.orm import relationship from sqlalchemy import create_engine from models.base import Base from models.user import User from models.store import Store from models.product import Product engine = create_engine('postgresql://catalog:catalog123!@l...
from sqlalchemy import Column, ForeignKey, Integer, String from sqlalchemy.orm import relationship from sqlalchemy import create_engine from models.base import Base from models.user import User from models.store import Store from models.product import Product engine = create_engine('sqlite:///productcatalog.db') Base...
<commit_before>from sqlalchemy import Column, ForeignKey, Integer, String from sqlalchemy.orm import relationship from sqlalchemy import create_engine from models.base import Base from models.user import User from models.store import Store from models.product import Product engine = create_engine('sqlite:///productca...
a8c8b136f081e3a2c7f1fd1f833a85288a358e42
vumi_http_retry/workers/api/validate.py
vumi_http_retry/workers/api/validate.py
import json from functools import wraps from twisted.web import http from jsonschema import Draft4Validator from vumi_http_retry.workers.api.utils import response def validate(*validators): def validator(fn): @wraps(fn) def wrapper(api, req, *a, **kw): errors = [] for v...
import json from functools import wraps from twisted.web import http from jsonschema import Draft4Validator from vumi_http_retry.workers.api.utils import response def validate(*validators): def validator(fn): @wraps(fn) def wrapper(api, req, *a, **kw): errors = [] for v...
Change validators to allow additional arguments to be given to the functions they are wrapping
Change validators to allow additional arguments to be given to the functions they are wrapping
Python
bsd-3-clause
praekelt/vumi-http-retry-api,praekelt/vumi-http-retry-api
import json from functools import wraps from twisted.web import http from jsonschema import Draft4Validator from vumi_http_retry.workers.api.utils import response def validate(*validators): def validator(fn): @wraps(fn) def wrapper(api, req, *a, **kw): errors = [] for v...
import json from functools import wraps from twisted.web import http from jsonschema import Draft4Validator from vumi_http_retry.workers.api.utils import response def validate(*validators): def validator(fn): @wraps(fn) def wrapper(api, req, *a, **kw): errors = [] for v...
<commit_before>import json from functools import wraps from twisted.web import http from jsonschema import Draft4Validator from vumi_http_retry.workers.api.utils import response def validate(*validators): def validator(fn): @wraps(fn) def wrapper(api, req, *a, **kw): errors = [] ...
import json from functools import wraps from twisted.web import http from jsonschema import Draft4Validator from vumi_http_retry.workers.api.utils import response def validate(*validators): def validator(fn): @wraps(fn) def wrapper(api, req, *a, **kw): errors = [] for v...
import json from functools import wraps from twisted.web import http from jsonschema import Draft4Validator from vumi_http_retry.workers.api.utils import response def validate(*validators): def validator(fn): @wraps(fn) def wrapper(api, req, *a, **kw): errors = [] for v...
<commit_before>import json from functools import wraps from twisted.web import http from jsonschema import Draft4Validator from vumi_http_retry.workers.api.utils import response def validate(*validators): def validator(fn): @wraps(fn) def wrapper(api, req, *a, **kw): errors = [] ...
370dac353937d73798b4cd2014884b9f1aa95abf
osmaxx-py/osmaxx/contrib/auth/tests/test_frontend_permissions.py
osmaxx-py/osmaxx/contrib/auth/tests/test_frontend_permissions.py
from django.test import TestCase from django.contrib.auth.models import User from osmaxx.contrib.auth.frontend_permissions import user_in_osmaxx_group class TestFrontendPermissions(TestCase): def test_superuser_can_access_frontend_even_if_not_in_osmaxx_group(self): an_admin = User.objects.create_superuser...
from django.test import TestCase from django.contrib.auth.models import User, Group from osmaxx.contrib.auth.frontend_permissions import user_in_osmaxx_group, FRONTEND_USER_GROUP class TestFrontendPermissions(TestCase): def test_superuser_can_access_frontend_even_if_not_in_osmaxx_group(self): an_admin = U...
Test that users can access frontend when in osmaxx group
Test that users can access frontend when in osmaxx group
Python
mit
geometalab/osmaxx,geometalab/osmaxx-frontend,geometalab/osmaxx-frontend,geometalab/drf-utm-zone-info,geometalab/osmaxx,geometalab/drf-utm-zone-info,geometalab/osmaxx-frontend,geometalab/osmaxx,geometalab/osmaxx,geometalab/osmaxx-frontend
from django.test import TestCase from django.contrib.auth.models import User from osmaxx.contrib.auth.frontend_permissions import user_in_osmaxx_group class TestFrontendPermissions(TestCase): def test_superuser_can_access_frontend_even_if_not_in_osmaxx_group(self): an_admin = User.objects.create_superuser...
from django.test import TestCase from django.contrib.auth.models import User, Group from osmaxx.contrib.auth.frontend_permissions import user_in_osmaxx_group, FRONTEND_USER_GROUP class TestFrontendPermissions(TestCase): def test_superuser_can_access_frontend_even_if_not_in_osmaxx_group(self): an_admin = U...
<commit_before>from django.test import TestCase from django.contrib.auth.models import User from osmaxx.contrib.auth.frontend_permissions import user_in_osmaxx_group class TestFrontendPermissions(TestCase): def test_superuser_can_access_frontend_even_if_not_in_osmaxx_group(self): an_admin = User.objects.c...
from django.test import TestCase from django.contrib.auth.models import User, Group from osmaxx.contrib.auth.frontend_permissions import user_in_osmaxx_group, FRONTEND_USER_GROUP class TestFrontendPermissions(TestCase): def test_superuser_can_access_frontend_even_if_not_in_osmaxx_group(self): an_admin = U...
from django.test import TestCase from django.contrib.auth.models import User from osmaxx.contrib.auth.frontend_permissions import user_in_osmaxx_group class TestFrontendPermissions(TestCase): def test_superuser_can_access_frontend_even_if_not_in_osmaxx_group(self): an_admin = User.objects.create_superuser...
<commit_before>from django.test import TestCase from django.contrib.auth.models import User from osmaxx.contrib.auth.frontend_permissions import user_in_osmaxx_group class TestFrontendPermissions(TestCase): def test_superuser_can_access_frontend_even_if_not_in_osmaxx_group(self): an_admin = User.objects.c...
1652b921fa2fadc936b346fc3de217cf97b0e476
src/etc/make-snapshot.py
src/etc/make-snapshot.py
#!/usr/bin/env python import snapshot, sys if len(sys.argv) == 2: print(snapshot.make_snapshot(sys.argv[1], sys.argv[2], "")) else: print(snapshot.make_snapshot(sys.argv[1], sys.argv[2], sys.argv[3]))
#!/usr/bin/env python import snapshot, sys if len(sys.argv) == 3: print(snapshot.make_snapshot(sys.argv[1], sys.argv[2], "")) else: print(snapshot.make_snapshot(sys.argv[1], sys.argv[2], sys.argv[3]))
Fix condition in snapshot script. Argv is never 2 long, it can be 3 or 4.
Fix condition in snapshot script. Argv is never 2 long, it can be 3 or 4.
Python
apache-2.0
AerialX/rust-rt-minimal,fabricedesre/rust,emk/rust,erickt/rust,cllns/rust,j16r/rust,untitaker/rust,cllns/rust,miniupnp/rust,zachwick/rust,seanrivera/rust,aidancully/rust,achanda/rand,barosl/rust,pshc/rust,aidancully/rust,barosl/rust,kmcallister/rust,mdinger/rust,l0kod/rust,quornian/rust,fabricedesre/rust,LeoTestard/rus...
#!/usr/bin/env python import snapshot, sys if len(sys.argv) == 2: print(snapshot.make_snapshot(sys.argv[1], sys.argv[2], "")) else: print(snapshot.make_snapshot(sys.argv[1], sys.argv[2], sys.argv[3])) Fix condition in snapshot script. Argv is never 2 long, it can be 3 or 4.
#!/usr/bin/env python import snapshot, sys if len(sys.argv) == 3: print(snapshot.make_snapshot(sys.argv[1], sys.argv[2], "")) else: print(snapshot.make_snapshot(sys.argv[1], sys.argv[2], sys.argv[3]))
<commit_before>#!/usr/bin/env python import snapshot, sys if len(sys.argv) == 2: print(snapshot.make_snapshot(sys.argv[1], sys.argv[2], "")) else: print(snapshot.make_snapshot(sys.argv[1], sys.argv[2], sys.argv[3])) <commit_msg>Fix condition in snapshot script. Argv is never 2 long, it can be 3 or 4.<commit_a...
#!/usr/bin/env python import snapshot, sys if len(sys.argv) == 3: print(snapshot.make_snapshot(sys.argv[1], sys.argv[2], "")) else: print(snapshot.make_snapshot(sys.argv[1], sys.argv[2], sys.argv[3]))
#!/usr/bin/env python import snapshot, sys if len(sys.argv) == 2: print(snapshot.make_snapshot(sys.argv[1], sys.argv[2], "")) else: print(snapshot.make_snapshot(sys.argv[1], sys.argv[2], sys.argv[3])) Fix condition in snapshot script. Argv is never 2 long, it can be 3 or 4.#!/usr/bin/env python import snapsh...
<commit_before>#!/usr/bin/env python import snapshot, sys if len(sys.argv) == 2: print(snapshot.make_snapshot(sys.argv[1], sys.argv[2], "")) else: print(snapshot.make_snapshot(sys.argv[1], sys.argv[2], sys.argv[3])) <commit_msg>Fix condition in snapshot script. Argv is never 2 long, it can be 3 or 4.<commit_a...
837b767036f580a8c9d523e0f6c175a75d1dc3b2
pi_control_service/gpio_service.py
pi_control_service/gpio_service.py
from rpc import RPCService from pi_pin_manager import PinManager ALLOWED_ACTIONS = ('on', 'off', 'read') class GPIOService(RPCService): def __init__(self, rabbit_url, device_key, pin_config): self.pins = PinManager(config_file=pin_config) super(GPIOService, self).__init__( rabbit_ur...
from rpc import RPCService from pi_pin_manager import PinManager ALLOWED_ACTIONS = ('on', 'off', 'read', 'get_config') class GPIOService(RPCService): def __init__(self, rabbit_url, device_key, pin_config): self.pins = PinManager(config_file=pin_config) super(GPIOService, self).__init__( ...
Add get_config as GPIO action
Add get_config as GPIO action
Python
mit
HydAu/ProjectWeekds_Pi-Control-Service,projectweekend/Pi-Control-Service
from rpc import RPCService from pi_pin_manager import PinManager ALLOWED_ACTIONS = ('on', 'off', 'read') class GPIOService(RPCService): def __init__(self, rabbit_url, device_key, pin_config): self.pins = PinManager(config_file=pin_config) super(GPIOService, self).__init__( rabbit_ur...
from rpc import RPCService from pi_pin_manager import PinManager ALLOWED_ACTIONS = ('on', 'off', 'read', 'get_config') class GPIOService(RPCService): def __init__(self, rabbit_url, device_key, pin_config): self.pins = PinManager(config_file=pin_config) super(GPIOService, self).__init__( ...
<commit_before>from rpc import RPCService from pi_pin_manager import PinManager ALLOWED_ACTIONS = ('on', 'off', 'read') class GPIOService(RPCService): def __init__(self, rabbit_url, device_key, pin_config): self.pins = PinManager(config_file=pin_config) super(GPIOService, self).__init__( ...
from rpc import RPCService from pi_pin_manager import PinManager ALLOWED_ACTIONS = ('on', 'off', 'read', 'get_config') class GPIOService(RPCService): def __init__(self, rabbit_url, device_key, pin_config): self.pins = PinManager(config_file=pin_config) super(GPIOService, self).__init__( ...
from rpc import RPCService from pi_pin_manager import PinManager ALLOWED_ACTIONS = ('on', 'off', 'read') class GPIOService(RPCService): def __init__(self, rabbit_url, device_key, pin_config): self.pins = PinManager(config_file=pin_config) super(GPIOService, self).__init__( rabbit_ur...
<commit_before>from rpc import RPCService from pi_pin_manager import PinManager ALLOWED_ACTIONS = ('on', 'off', 'read') class GPIOService(RPCService): def __init__(self, rabbit_url, device_key, pin_config): self.pins = PinManager(config_file=pin_config) super(GPIOService, self).__init__( ...
6f8b5950a85c79ed33c1d00a35a1def2efc7bff5
tests/conftest.py
tests/conftest.py
from factories import post_factory, post
from factories import post_factory, post import os import sys root = os.path.join(os.path.dirname(__file__)) package = os.path.join(root, '..') sys.path.insert(0, os.path.abspath(package))
Make the tests run just via py.test
Make the tests run just via py.test
Python
mit
kalasjocke/hyp
from factories import post_factory, post Make the tests run just via py.test
from factories import post_factory, post import os import sys root = os.path.join(os.path.dirname(__file__)) package = os.path.join(root, '..') sys.path.insert(0, os.path.abspath(package))
<commit_before>from factories import post_factory, post <commit_msg>Make the tests run just via py.test<commit_after>
from factories import post_factory, post import os import sys root = os.path.join(os.path.dirname(__file__)) package = os.path.join(root, '..') sys.path.insert(0, os.path.abspath(package))
from factories import post_factory, post Make the tests run just via py.testfrom factories import post_factory, post import os import sys root = os.path.join(os.path.dirname(__file__)) package = os.path.join(root, '..') sys.path.insert(0, os.path.abspath(package))
<commit_before>from factories import post_factory, post <commit_msg>Make the tests run just via py.test<commit_after>from factories import post_factory, post import os import sys root = os.path.join(os.path.dirname(__file__)) package = os.path.join(root, '..') sys.path.insert(0, os.path.abspath(package))
11bcc53bc80409a0458e3a5b72014c9837561b65
src/main/python/setup.py
src/main/python/setup.py
import setuptools __version__ = None # This will get replaced when reading version.py exec(open('rlbot/version.py').read()) with open("README.md", "r") as readme_file: long_description = readme_file.read() setuptools.setup( name='rlbot', packages=setuptools.find_packages(), install_requires=['psuti...
import setuptools __version__ = None # This will get replaced when reading version.py exec(open('rlbot/version.py').read()) with open("README.md", "r") as readme_file: long_description = readme_file.read() setuptools.setup( name='rlbot', packages=setuptools.find_packages(), install_requires=['psuti...
Add MIT license that shows up in `pip show rlbot`
Add MIT license that shows up in `pip show rlbot`
Python
mit
drssoccer55/RLBot,drssoccer55/RLBot
import setuptools __version__ = None # This will get replaced when reading version.py exec(open('rlbot/version.py').read()) with open("README.md", "r") as readme_file: long_description = readme_file.read() setuptools.setup( name='rlbot', packages=setuptools.find_packages(), install_requires=['psuti...
import setuptools __version__ = None # This will get replaced when reading version.py exec(open('rlbot/version.py').read()) with open("README.md", "r") as readme_file: long_description = readme_file.read() setuptools.setup( name='rlbot', packages=setuptools.find_packages(), install_requires=['psuti...
<commit_before>import setuptools __version__ = None # This will get replaced when reading version.py exec(open('rlbot/version.py').read()) with open("README.md", "r") as readme_file: long_description = readme_file.read() setuptools.setup( name='rlbot', packages=setuptools.find_packages(), install_r...
import setuptools __version__ = None # This will get replaced when reading version.py exec(open('rlbot/version.py').read()) with open("README.md", "r") as readme_file: long_description = readme_file.read() setuptools.setup( name='rlbot', packages=setuptools.find_packages(), install_requires=['psuti...
import setuptools __version__ = None # This will get replaced when reading version.py exec(open('rlbot/version.py').read()) with open("README.md", "r") as readme_file: long_description = readme_file.read() setuptools.setup( name='rlbot', packages=setuptools.find_packages(), install_requires=['psuti...
<commit_before>import setuptools __version__ = None # This will get replaced when reading version.py exec(open('rlbot/version.py').read()) with open("README.md", "r") as readme_file: long_description = readme_file.read() setuptools.setup( name='rlbot', packages=setuptools.find_packages(), install_r...
39c777d6fc5555534628113190bb543c6225c07e
uncurl/bin.py
uncurl/bin.py
from __future__ import print_function import sys from .api import parse def main(): result = parse(sys.argv[1]) print(result)
from __future__ import print_function import sys from .api import parse def main(): if sys.stdin.isatty(): result = parse(sys.argv[1]) else: result = parse(sys.stdin.read()) print(result)
Read from stdin if available.
Read from stdin if available.
Python
apache-2.0
weinerjm/uncurl,spulec/uncurl
from __future__ import print_function import sys from .api import parse def main(): result = parse(sys.argv[1]) print(result) Read from stdin if available.
from __future__ import print_function import sys from .api import parse def main(): if sys.stdin.isatty(): result = parse(sys.argv[1]) else: result = parse(sys.stdin.read()) print(result)
<commit_before>from __future__ import print_function import sys from .api import parse def main(): result = parse(sys.argv[1]) print(result) <commit_msg>Read from stdin if available.<commit_after>
from __future__ import print_function import sys from .api import parse def main(): if sys.stdin.isatty(): result = parse(sys.argv[1]) else: result = parse(sys.stdin.read()) print(result)
from __future__ import print_function import sys from .api import parse def main(): result = parse(sys.argv[1]) print(result) Read from stdin if available.from __future__ import print_function import sys from .api import parse def main(): if sys.stdin.isatty(): result = parse(sys.argv[1]) ...
<commit_before>from __future__ import print_function import sys from .api import parse def main(): result = parse(sys.argv[1]) print(result) <commit_msg>Read from stdin if available.<commit_after>from __future__ import print_function import sys from .api import parse def main(): if sys.stdin.isatty(...
899f28e2cd7dbeb6227e8c56eef541cce1a424f4
alertaclient/commands/cmd_heartbeat.py
alertaclient/commands/cmd_heartbeat.py
import os import platform import sys import click prog = os.path.basename(sys.argv[0]) @click.command('heartbeat', short_help='Send a heartbeat') @click.option('--origin', default='{}/{}'.format(prog, platform.uname()[1])) @click.option('--tag', '-T', 'tags', multiple=True) @click.option('--timeout', metavar='EXPIR...
import os import platform import sys import click prog = os.path.basename(sys.argv[0]) @click.command('heartbeat', short_help='Send a heartbeat') @click.option('--origin', default='{}/{}'.format(prog, platform.uname()[1])) @click.option('--tag', '-T', 'tags', multiple=True) @click.option('--timeout', metavar='EXPIR...
Add check that heartbeat timeout is integer
Add check that heartbeat timeout is integer
Python
apache-2.0
alerta/python-alerta-client,alerta/python-alerta-client,alerta/python-alerta
import os import platform import sys import click prog = os.path.basename(sys.argv[0]) @click.command('heartbeat', short_help='Send a heartbeat') @click.option('--origin', default='{}/{}'.format(prog, platform.uname()[1])) @click.option('--tag', '-T', 'tags', multiple=True) @click.option('--timeout', metavar='EXPIR...
import os import platform import sys import click prog = os.path.basename(sys.argv[0]) @click.command('heartbeat', short_help='Send a heartbeat') @click.option('--origin', default='{}/{}'.format(prog, platform.uname()[1])) @click.option('--tag', '-T', 'tags', multiple=True) @click.option('--timeout', metavar='EXPIR...
<commit_before>import os import platform import sys import click prog = os.path.basename(sys.argv[0]) @click.command('heartbeat', short_help='Send a heartbeat') @click.option('--origin', default='{}/{}'.format(prog, platform.uname()[1])) @click.option('--tag', '-T', 'tags', multiple=True) @click.option('--timeout',...
import os import platform import sys import click prog = os.path.basename(sys.argv[0]) @click.command('heartbeat', short_help='Send a heartbeat') @click.option('--origin', default='{}/{}'.format(prog, platform.uname()[1])) @click.option('--tag', '-T', 'tags', multiple=True) @click.option('--timeout', metavar='EXPIR...
import os import platform import sys import click prog = os.path.basename(sys.argv[0]) @click.command('heartbeat', short_help='Send a heartbeat') @click.option('--origin', default='{}/{}'.format(prog, platform.uname()[1])) @click.option('--tag', '-T', 'tags', multiple=True) @click.option('--timeout', metavar='EXPIR...
<commit_before>import os import platform import sys import click prog = os.path.basename(sys.argv[0]) @click.command('heartbeat', short_help='Send a heartbeat') @click.option('--origin', default='{}/{}'.format(prog, platform.uname()[1])) @click.option('--tag', '-T', 'tags', multiple=True) @click.option('--timeout',...
ee8cb600c772e4a0f795a0fe00b1e612cb8a8e37
dirmuncher.py
dirmuncher.py
#!/usr/bin/env python # -*- Coding: utf-8 -*- import os class Dirmuncher: def __init__(self, directory): self.directory = directory def directoryListing(self): for dirname, dirnames, filenames in os.walk(self.directory): # Subdirectories for subdirname in dirnames: ...
#!/usr/bin/env python # -*- Coding: utf-8 -*- import os class Dirmuncher: def __init__(self, directory): self.directory = directory def getFiles(self): result = {} for dirname, dirnames, filenames in os.walk(self.directory): # Subdirectories for subdirname in ...
Sort files into dict with dir as key
[py] Sort files into dict with dir as key
Python
mit
claudemuller/masfir
#!/usr/bin/env python # -*- Coding: utf-8 -*- import os class Dirmuncher: def __init__(self, directory): self.directory = directory def directoryListing(self): for dirname, dirnames, filenames in os.walk(self.directory): # Subdirectories for subdirname in dirnames: ...
#!/usr/bin/env python # -*- Coding: utf-8 -*- import os class Dirmuncher: def __init__(self, directory): self.directory = directory def getFiles(self): result = {} for dirname, dirnames, filenames in os.walk(self.directory): # Subdirectories for subdirname in ...
<commit_before>#!/usr/bin/env python # -*- Coding: utf-8 -*- import os class Dirmuncher: def __init__(self, directory): self.directory = directory def directoryListing(self): for dirname, dirnames, filenames in os.walk(self.directory): # Subdirectories for subdirname i...
#!/usr/bin/env python # -*- Coding: utf-8 -*- import os class Dirmuncher: def __init__(self, directory): self.directory = directory def getFiles(self): result = {} for dirname, dirnames, filenames in os.walk(self.directory): # Subdirectories for subdirname in ...
#!/usr/bin/env python # -*- Coding: utf-8 -*- import os class Dirmuncher: def __init__(self, directory): self.directory = directory def directoryListing(self): for dirname, dirnames, filenames in os.walk(self.directory): # Subdirectories for subdirname in dirnames: ...
<commit_before>#!/usr/bin/env python # -*- Coding: utf-8 -*- import os class Dirmuncher: def __init__(self, directory): self.directory = directory def directoryListing(self): for dirname, dirnames, filenames in os.walk(self.directory): # Subdirectories for subdirname i...
f9c51c592483ab08417d4df33898d32f7700ffe9
sal/management/commands/update_admin_user.py
sal/management/commands/update_admin_user.py
''' Creates an admin user if there aren't any existing superusers ''' from django.core.management.base import BaseCommand, CommandError from django.contrib.auth.models import User from optparse import make_option class Command(BaseCommand): help = 'Creates/Updates an Admin user' def add_arguments(self, pars...
"""Creates an admin user if there aren't any existing superusers.""" from optparse import make_option from django.contrib.auth.models import User from django.core.management.base import BaseCommand, CommandError class Command(BaseCommand): help = 'Creates/Updates an Admin user' def add_arguments(self, par...
Fix exception handling in management command. Clean up.
Fix exception handling in management command. Clean up.
Python
apache-2.0
salopensource/sal,sheagcraig/sal,sheagcraig/sal,salopensource/sal,salopensource/sal,sheagcraig/sal,sheagcraig/sal,salopensource/sal
''' Creates an admin user if there aren't any existing superusers ''' from django.core.management.base import BaseCommand, CommandError from django.contrib.auth.models import User from optparse import make_option class Command(BaseCommand): help = 'Creates/Updates an Admin user' def add_arguments(self, pars...
"""Creates an admin user if there aren't any existing superusers.""" from optparse import make_option from django.contrib.auth.models import User from django.core.management.base import BaseCommand, CommandError class Command(BaseCommand): help = 'Creates/Updates an Admin user' def add_arguments(self, par...
<commit_before>''' Creates an admin user if there aren't any existing superusers ''' from django.core.management.base import BaseCommand, CommandError from django.contrib.auth.models import User from optparse import make_option class Command(BaseCommand): help = 'Creates/Updates an Admin user' def add_argum...
"""Creates an admin user if there aren't any existing superusers.""" from optparse import make_option from django.contrib.auth.models import User from django.core.management.base import BaseCommand, CommandError class Command(BaseCommand): help = 'Creates/Updates an Admin user' def add_arguments(self, par...
''' Creates an admin user if there aren't any existing superusers ''' from django.core.management.base import BaseCommand, CommandError from django.contrib.auth.models import User from optparse import make_option class Command(BaseCommand): help = 'Creates/Updates an Admin user' def add_arguments(self, pars...
<commit_before>''' Creates an admin user if there aren't any existing superusers ''' from django.core.management.base import BaseCommand, CommandError from django.contrib.auth.models import User from optparse import make_option class Command(BaseCommand): help = 'Creates/Updates an Admin user' def add_argum...
a5f60d664e7758b113abc31b405657952dd5eccd
tests/conftest.py
tests/conftest.py
import os import pytest from pywatson.watson import Watson @pytest.fixture def config(): """Get Watson configuration from the environment :return: dict with keys 'url', 'username', and 'password' """ try: return { 'url': os.environ['WATSON_URL'], 'username': os.environ...
import json import os import pytest from pywatson.watson import Watson @pytest.fixture def config(): """Get Watson configuration from the environment :return: dict with keys 'url', 'username', and 'password' """ try: return { 'url': os.environ['WATSON_URL'], 'username'...
Implement test data JSON loader
Implement test data JSON loader
Python
mit
sherlocke/pywatson
import os import pytest from pywatson.watson import Watson @pytest.fixture def config(): """Get Watson configuration from the environment :return: dict with keys 'url', 'username', and 'password' """ try: return { 'url': os.environ['WATSON_URL'], 'username': os.environ...
import json import os import pytest from pywatson.watson import Watson @pytest.fixture def config(): """Get Watson configuration from the environment :return: dict with keys 'url', 'username', and 'password' """ try: return { 'url': os.environ['WATSON_URL'], 'username'...
<commit_before>import os import pytest from pywatson.watson import Watson @pytest.fixture def config(): """Get Watson configuration from the environment :return: dict with keys 'url', 'username', and 'password' """ try: return { 'url': os.environ['WATSON_URL'], 'userna...
import json import os import pytest from pywatson.watson import Watson @pytest.fixture def config(): """Get Watson configuration from the environment :return: dict with keys 'url', 'username', and 'password' """ try: return { 'url': os.environ['WATSON_URL'], 'username'...
import os import pytest from pywatson.watson import Watson @pytest.fixture def config(): """Get Watson configuration from the environment :return: dict with keys 'url', 'username', and 'password' """ try: return { 'url': os.environ['WATSON_URL'], 'username': os.environ...
<commit_before>import os import pytest from pywatson.watson import Watson @pytest.fixture def config(): """Get Watson configuration from the environment :return: dict with keys 'url', 'username', and 'password' """ try: return { 'url': os.environ['WATSON_URL'], 'userna...
904db705daf24d68fcc9ac6010b55b93c7dc4544
txircd/modules/core/accounts.py
txircd/modules/core/accounts.py
from twisted.plugin import IPlugin from txircd.module_interface import IModuleData, ModuleData from txircd.utils import ircLower from zope.interface import implements class Accounts(ModuleData): implements(IPlugin, IModuleData) name = "Accounts" core = True def actions(self): return [ ("usercansetmetadata", ...
from twisted.plugin import IPlugin from twisted.words.protocols import irc from txircd.module_interface import IModuleData, ModuleData from txircd.utils import ircLower from zope.interface import implements # Numerics and names are taken from the IRCv3.1 SASL specification at http://ircv3.net/specs/extensions/sasl-3.1...
Add automatic sending of 900/901 numerics for account status
Add automatic sending of 900/901 numerics for account status
Python
bsd-3-clause
Heufneutje/txircd,ElementalAlchemist/txircd
from twisted.plugin import IPlugin from txircd.module_interface import IModuleData, ModuleData from txircd.utils import ircLower from zope.interface import implements class Accounts(ModuleData): implements(IPlugin, IModuleData) name = "Accounts" core = True def actions(self): return [ ("usercansetmetadata", ...
from twisted.plugin import IPlugin from twisted.words.protocols import irc from txircd.module_interface import IModuleData, ModuleData from txircd.utils import ircLower from zope.interface import implements # Numerics and names are taken from the IRCv3.1 SASL specification at http://ircv3.net/specs/extensions/sasl-3.1...
<commit_before>from twisted.plugin import IPlugin from txircd.module_interface import IModuleData, ModuleData from txircd.utils import ircLower from zope.interface import implements class Accounts(ModuleData): implements(IPlugin, IModuleData) name = "Accounts" core = True def actions(self): return [ ("userca...
from twisted.plugin import IPlugin from twisted.words.protocols import irc from txircd.module_interface import IModuleData, ModuleData from txircd.utils import ircLower from zope.interface import implements # Numerics and names are taken from the IRCv3.1 SASL specification at http://ircv3.net/specs/extensions/sasl-3.1...
from twisted.plugin import IPlugin from txircd.module_interface import IModuleData, ModuleData from txircd.utils import ircLower from zope.interface import implements class Accounts(ModuleData): implements(IPlugin, IModuleData) name = "Accounts" core = True def actions(self): return [ ("usercansetmetadata", ...
<commit_before>from twisted.plugin import IPlugin from txircd.module_interface import IModuleData, ModuleData from txircd.utils import ircLower from zope.interface import implements class Accounts(ModuleData): implements(IPlugin, IModuleData) name = "Accounts" core = True def actions(self): return [ ("userca...
f3c1e5bdf25b46e96a77221ace7438eb3b55cb05
bluebottle/common/management/commands/makemessages.py
bluebottle/common/management/commands/makemessages.py
import json import codecs import tempfile from django.core.management.commands.makemessages import Command as BaseCommand class Command(BaseCommand): """ Extend the makemessages to include some of the fixtures """ fixtures = [ ('bb_projects', 'project_data.json'), ('bb_tasks', 'skills.json'),...
import json import codecs import tempfile from django.core.management.commands.makemessages import Command as BaseCommand class Command(BaseCommand): """ Extend the makemessages to include some of the fixtures """ fixtures = [ ('bb_projects', 'project_data.json'), ('bb_tasks', 'skills.json'),...
Make loop a little more readable
Make loop a little more readable
Python
bsd-3-clause
onepercentclub/bluebottle,onepercentclub/bluebottle,onepercentclub/bluebottle,onepercentclub/bluebottle,onepercentclub/bluebottle
import json import codecs import tempfile from django.core.management.commands.makemessages import Command as BaseCommand class Command(BaseCommand): """ Extend the makemessages to include some of the fixtures """ fixtures = [ ('bb_projects', 'project_data.json'), ('bb_tasks', 'skills.json'),...
import json import codecs import tempfile from django.core.management.commands.makemessages import Command as BaseCommand class Command(BaseCommand): """ Extend the makemessages to include some of the fixtures """ fixtures = [ ('bb_projects', 'project_data.json'), ('bb_tasks', 'skills.json'),...
<commit_before>import json import codecs import tempfile from django.core.management.commands.makemessages import Command as BaseCommand class Command(BaseCommand): """ Extend the makemessages to include some of the fixtures """ fixtures = [ ('bb_projects', 'project_data.json'), ('bb_tasks', ...
import json import codecs import tempfile from django.core.management.commands.makemessages import Command as BaseCommand class Command(BaseCommand): """ Extend the makemessages to include some of the fixtures """ fixtures = [ ('bb_projects', 'project_data.json'), ('bb_tasks', 'skills.json'),...
import json import codecs import tempfile from django.core.management.commands.makemessages import Command as BaseCommand class Command(BaseCommand): """ Extend the makemessages to include some of the fixtures """ fixtures = [ ('bb_projects', 'project_data.json'), ('bb_tasks', 'skills.json'),...
<commit_before>import json import codecs import tempfile from django.core.management.commands.makemessages import Command as BaseCommand class Command(BaseCommand): """ Extend the makemessages to include some of the fixtures """ fixtures = [ ('bb_projects', 'project_data.json'), ('bb_tasks', ...
ecc56eec0ebee4a93d5052280ae5d8c649e1e6da
tests/test_api.py
tests/test_api.py
from nose.tools import eq_ import mock from lcp import api @mock.patch('lcp.api.requests.request') def _assert_calls_requests_with_url(original_url, expected_url, request_mock): api.Client('BASE_URL').request('METHOD', original_url) expected_headers = {'Content-Type': 'application/json'} eq_(request_mock...
from nose.tools import eq_ import mock from lcp import api class TestApiClient(object): def setup(self): self.client = api.Client('BASE_URL') def test_request_does_not_alter_absolute_urls(self): for absolute_url in [ 'http://www.points.com', 'https://www.point...
Refactor api test to setup test client in setup +review PLAT-127 DCORE-1109
Refactor api test to setup test client in setup +review PLAT-127 DCORE-1109
Python
bsd-3-clause
bradsokol/PyLCP,Points/PyLCP,bradsokol/PyLCP,Points/PyLCP
from nose.tools import eq_ import mock from lcp import api @mock.patch('lcp.api.requests.request') def _assert_calls_requests_with_url(original_url, expected_url, request_mock): api.Client('BASE_URL').request('METHOD', original_url) expected_headers = {'Content-Type': 'application/json'} eq_(request_mock...
from nose.tools import eq_ import mock from lcp import api class TestApiClient(object): def setup(self): self.client = api.Client('BASE_URL') def test_request_does_not_alter_absolute_urls(self): for absolute_url in [ 'http://www.points.com', 'https://www.point...
<commit_before>from nose.tools import eq_ import mock from lcp import api @mock.patch('lcp.api.requests.request') def _assert_calls_requests_with_url(original_url, expected_url, request_mock): api.Client('BASE_URL').request('METHOD', original_url) expected_headers = {'Content-Type': 'application/json'} e...
from nose.tools import eq_ import mock from lcp import api class TestApiClient(object): def setup(self): self.client = api.Client('BASE_URL') def test_request_does_not_alter_absolute_urls(self): for absolute_url in [ 'http://www.points.com', 'https://www.point...
from nose.tools import eq_ import mock from lcp import api @mock.patch('lcp.api.requests.request') def _assert_calls_requests_with_url(original_url, expected_url, request_mock): api.Client('BASE_URL').request('METHOD', original_url) expected_headers = {'Content-Type': 'application/json'} eq_(request_mock...
<commit_before>from nose.tools import eq_ import mock from lcp import api @mock.patch('lcp.api.requests.request') def _assert_calls_requests_with_url(original_url, expected_url, request_mock): api.Client('BASE_URL').request('METHOD', original_url) expected_headers = {'Content-Type': 'application/json'} e...
7bdfb1ef77d23bc868434e8d74d6184dd68c0a6e
tests/test_api.py
tests/test_api.py
# coding: utf-8 """ Test the backend API Written so that after creating a new backend, you can immediately see which parts are missing! """ from unittest import TestCase import inspect from pycurlbrowser.backend import * from pycurlbrowser import Browser def is_http_backend_derived(t): if t is HttpBackend: ...
# coding: utf-8 """ Test the backend API Written so that after creating a new backend, you can immediately see which parts are missing! """ from unittest import TestCase import inspect from pycurlbrowser.backend import * from pycurlbrowser import Browser def is_http_backend_derived(t): if t is HttpBackend: ...
Improve API test by only comparing args and varargs.
Improve API test by only comparing args and varargs.
Python
agpl-3.0
ahri/pycurlbrowser
# coding: utf-8 """ Test the backend API Written so that after creating a new backend, you can immediately see which parts are missing! """ from unittest import TestCase import inspect from pycurlbrowser.backend import * from pycurlbrowser import Browser def is_http_backend_derived(t): if t is HttpBackend: ...
# coding: utf-8 """ Test the backend API Written so that after creating a new backend, you can immediately see which parts are missing! """ from unittest import TestCase import inspect from pycurlbrowser.backend import * from pycurlbrowser import Browser def is_http_backend_derived(t): if t is HttpBackend: ...
<commit_before># coding: utf-8 """ Test the backend API Written so that after creating a new backend, you can immediately see which parts are missing! """ from unittest import TestCase import inspect from pycurlbrowser.backend import * from pycurlbrowser import Browser def is_http_backend_derived(t): if t is Ht...
# coding: utf-8 """ Test the backend API Written so that after creating a new backend, you can immediately see which parts are missing! """ from unittest import TestCase import inspect from pycurlbrowser.backend import * from pycurlbrowser import Browser def is_http_backend_derived(t): if t is HttpBackend: ...
# coding: utf-8 """ Test the backend API Written so that after creating a new backend, you can immediately see which parts are missing! """ from unittest import TestCase import inspect from pycurlbrowser.backend import * from pycurlbrowser import Browser def is_http_backend_derived(t): if t is HttpBackend: ...
<commit_before># coding: utf-8 """ Test the backend API Written so that after creating a new backend, you can immediately see which parts are missing! """ from unittest import TestCase import inspect from pycurlbrowser.backend import * from pycurlbrowser import Browser def is_http_backend_derived(t): if t is Ht...
916900aaa29c5a59bcdd78ca05069ea431629de4
tests/test_cmd.py
tests/test_cmd.py
import unittest from click.testing import CliRunner from scuevals_api.cmd import cli class CmdsTestCase(unittest.TestCase): @classmethod def setUpClass(cls): cls.runner = CliRunner() def cli_run(self, *cmds): return self.runner.invoke(cli, cmds) cls.cli_run = cli_run ...
import unittest from click.testing import CliRunner from scuevals_api.cmd import cli class CmdsTestCase(unittest.TestCase): @classmethod def setUpClass(cls): cls.runner = CliRunner() def cli_run(self, *cmds): return self.runner.invoke(cli, cmds) cls.cli_run = cli_run ...
Fix error message for initdb test
Fix error message for initdb test
Python
agpl-3.0
SCUEvals/scuevals-api,SCUEvals/scuevals-api
import unittest from click.testing import CliRunner from scuevals_api.cmd import cli class CmdsTestCase(unittest.TestCase): @classmethod def setUpClass(cls): cls.runner = CliRunner() def cli_run(self, *cmds): return self.runner.invoke(cli, cmds) cls.cli_run = cli_run ...
import unittest from click.testing import CliRunner from scuevals_api.cmd import cli class CmdsTestCase(unittest.TestCase): @classmethod def setUpClass(cls): cls.runner = CliRunner() def cli_run(self, *cmds): return self.runner.invoke(cli, cmds) cls.cli_run = cli_run ...
<commit_before>import unittest from click.testing import CliRunner from scuevals_api.cmd import cli class CmdsTestCase(unittest.TestCase): @classmethod def setUpClass(cls): cls.runner = CliRunner() def cli_run(self, *cmds): return self.runner.invoke(cli, cmds) cls.cli_r...
import unittest from click.testing import CliRunner from scuevals_api.cmd import cli class CmdsTestCase(unittest.TestCase): @classmethod def setUpClass(cls): cls.runner = CliRunner() def cli_run(self, *cmds): return self.runner.invoke(cli, cmds) cls.cli_run = cli_run ...
import unittest from click.testing import CliRunner from scuevals_api.cmd import cli class CmdsTestCase(unittest.TestCase): @classmethod def setUpClass(cls): cls.runner = CliRunner() def cli_run(self, *cmds): return self.runner.invoke(cli, cmds) cls.cli_run = cli_run ...
<commit_before>import unittest from click.testing import CliRunner from scuevals_api.cmd import cli class CmdsTestCase(unittest.TestCase): @classmethod def setUpClass(cls): cls.runner = CliRunner() def cli_run(self, *cmds): return self.runner.invoke(cli, cmds) cls.cli_r...
cfaaf421bb9627f1741a9ef4074517fd5daaec86
wsgi/setup.py
wsgi/setup.py
import subprocess import sys import setup_util import os def start(args): subprocess.Popen("gunicorn hello:app -b 0.0.0.0:8080 -w " + str((args.max_threads * 2)) + " --log-level=critical", shell=True, cwd="wsgi") return 0 def stop(): p = subprocess.Popen(['ps', 'aux'], stdout=subprocess.PIPE) out, err = p.com...
import subprocess import sys import setup_util import os def start(args): subprocess.Popen('gunicorn hello:app --worker-class="egg:meinheld#gunicorn_worker" -b 0.0.0.0:8080 -w ' + str((args.max_threads * 2)) + " --log-level=critical", shell=True, cwd="wsgi") return 0 def stop(): p = subproces...
Use meinheld worker (same as other Python Frameworks)
wsgi: Use meinheld worker (same as other Python Frameworks)
Python
bsd-3-clause
torhve/FrameworkBenchmarks,seem-sky/FrameworkBenchmarks,denkab/FrameworkBenchmarks,diablonhn/FrameworkBenchmarks,hamiltont/FrameworkBenchmarks,grob/FrameworkBenchmarks,lcp0578/FrameworkBenchmarks,knewmanTE/FrameworkBenchmarks,Ocramius/FrameworkBenchmarks,PermeAgility/FrameworkBenchmarks,jetty-project/FrameworkBenchmark...
import subprocess import sys import setup_util import os def start(args): subprocess.Popen("gunicorn hello:app -b 0.0.0.0:8080 -w " + str((args.max_threads * 2)) + " --log-level=critical", shell=True, cwd="wsgi") return 0 def stop(): p = subprocess.Popen(['ps', 'aux'], stdout=subprocess.PIPE) out, err = p.com...
import subprocess import sys import setup_util import os def start(args): subprocess.Popen('gunicorn hello:app --worker-class="egg:meinheld#gunicorn_worker" -b 0.0.0.0:8080 -w ' + str((args.max_threads * 2)) + " --log-level=critical", shell=True, cwd="wsgi") return 0 def stop(): p = subproces...
<commit_before> import subprocess import sys import setup_util import os def start(args): subprocess.Popen("gunicorn hello:app -b 0.0.0.0:8080 -w " + str((args.max_threads * 2)) + " --log-level=critical", shell=True, cwd="wsgi") return 0 def stop(): p = subprocess.Popen(['ps', 'aux'], stdout=subprocess.PIPE) o...
import subprocess import sys import setup_util import os def start(args): subprocess.Popen('gunicorn hello:app --worker-class="egg:meinheld#gunicorn_worker" -b 0.0.0.0:8080 -w ' + str((args.max_threads * 2)) + " --log-level=critical", shell=True, cwd="wsgi") return 0 def stop(): p = subproces...
import subprocess import sys import setup_util import os def start(args): subprocess.Popen("gunicorn hello:app -b 0.0.0.0:8080 -w " + str((args.max_threads * 2)) + " --log-level=critical", shell=True, cwd="wsgi") return 0 def stop(): p = subprocess.Popen(['ps', 'aux'], stdout=subprocess.PIPE) out, err = p.com...
<commit_before> import subprocess import sys import setup_util import os def start(args): subprocess.Popen("gunicorn hello:app -b 0.0.0.0:8080 -w " + str((args.max_threads * 2)) + " --log-level=critical", shell=True, cwd="wsgi") return 0 def stop(): p = subprocess.Popen(['ps', 'aux'], stdout=subprocess.PIPE) o...
1d4777f810388ee87cceb01c2b53367723fb3a71
PyFBA/cmd/__init__.py
PyFBA/cmd/__init__.py
from .citation import cite_me_please from .fluxes import measure_fluxes from .gapfill_from_roles import gapfill_from_roles from .assigned_functions_to_reactions import to_reactions from .fba_from_reactions import run_the_fba from .gapfill_from_reactions_multiple_conditions import gapfill_multiple_media from .media impo...
from .citation import cite_me_please from .fluxes import measure_fluxes from .gapfill_from_roles import gapfill_from_roles from .assigned_functions_to_reactions import to_reactions from .fba_from_reactions import run_the_fba from .gapfill_from_reactions_multiple_conditions import gapfill_multiple_media from .media impo...
Add a function to retrieve roles from reactions
Add a function to retrieve roles from reactions
Python
mit
linsalrob/PyFBA
from .citation import cite_me_please from .fluxes import measure_fluxes from .gapfill_from_roles import gapfill_from_roles from .assigned_functions_to_reactions import to_reactions from .fba_from_reactions import run_the_fba from .gapfill_from_reactions_multiple_conditions import gapfill_multiple_media from .media impo...
from .citation import cite_me_please from .fluxes import measure_fluxes from .gapfill_from_roles import gapfill_from_roles from .assigned_functions_to_reactions import to_reactions from .fba_from_reactions import run_the_fba from .gapfill_from_reactions_multiple_conditions import gapfill_multiple_media from .media impo...
<commit_before>from .citation import cite_me_please from .fluxes import measure_fluxes from .gapfill_from_roles import gapfill_from_roles from .assigned_functions_to_reactions import to_reactions from .fba_from_reactions import run_the_fba from .gapfill_from_reactions_multiple_conditions import gapfill_multiple_media f...
from .citation import cite_me_please from .fluxes import measure_fluxes from .gapfill_from_roles import gapfill_from_roles from .assigned_functions_to_reactions import to_reactions from .fba_from_reactions import run_the_fba from .gapfill_from_reactions_multiple_conditions import gapfill_multiple_media from .media impo...
from .citation import cite_me_please from .fluxes import measure_fluxes from .gapfill_from_roles import gapfill_from_roles from .assigned_functions_to_reactions import to_reactions from .fba_from_reactions import run_the_fba from .gapfill_from_reactions_multiple_conditions import gapfill_multiple_media from .media impo...
<commit_before>from .citation import cite_me_please from .fluxes import measure_fluxes from .gapfill_from_roles import gapfill_from_roles from .assigned_functions_to_reactions import to_reactions from .fba_from_reactions import run_the_fba from .gapfill_from_reactions_multiple_conditions import gapfill_multiple_media f...
6fd7f3cb01f621d2ea79e15188f8000c7b6fa361
tools/add_feed.py
tools/add_feed.py
import os from urllib.parse import urlencode, quote from autobit import Client def add_rarbg_feed(client, name, directory, filter_kwargs): url = 'http://localhost:5555/{}?{}'.format( quote(name), urlencode(filter_kwargs) ) return client.add_feed(name, url, directory) def main(): cl...
import os from autobit import Client def main(): client = Client('http://localhost:8081/gui/', auth=('admin', '20133')) client.get_torrents() name = input('name> ') directory = input('directory> ') os.makedirs(directory, exist_ok=True) client.add_feed( name, input('url> '),...
Remove code specific to my system
Remove code specific to my system
Python
mit
Mause/autobit
import os from urllib.parse import urlencode, quote from autobit import Client def add_rarbg_feed(client, name, directory, filter_kwargs): url = 'http://localhost:5555/{}?{}'.format( quote(name), urlencode(filter_kwargs) ) return client.add_feed(name, url, directory) def main(): cl...
import os from autobit import Client def main(): client = Client('http://localhost:8081/gui/', auth=('admin', '20133')) client.get_torrents() name = input('name> ') directory = input('directory> ') os.makedirs(directory, exist_ok=True) client.add_feed( name, input('url> '),...
<commit_before>import os from urllib.parse import urlencode, quote from autobit import Client def add_rarbg_feed(client, name, directory, filter_kwargs): url = 'http://localhost:5555/{}?{}'.format( quote(name), urlencode(filter_kwargs) ) return client.add_feed(name, url, directory) def...
import os from autobit import Client def main(): client = Client('http://localhost:8081/gui/', auth=('admin', '20133')) client.get_torrents() name = input('name> ') directory = input('directory> ') os.makedirs(directory, exist_ok=True) client.add_feed( name, input('url> '),...
import os from urllib.parse import urlencode, quote from autobit import Client def add_rarbg_feed(client, name, directory, filter_kwargs): url = 'http://localhost:5555/{}?{}'.format( quote(name), urlencode(filter_kwargs) ) return client.add_feed(name, url, directory) def main(): cl...
<commit_before>import os from urllib.parse import urlencode, quote from autobit import Client def add_rarbg_feed(client, name, directory, filter_kwargs): url = 'http://localhost:5555/{}?{}'.format( quote(name), urlencode(filter_kwargs) ) return client.add_feed(name, url, directory) def...
894203d67e88e8bac8ec4f8948d940789387b648
tests/data/questions.py
tests/data/questions.py
QUESTIONS = [ { 'questionText': 'What is the Labour Code?' }, { 'questionText': 'When can a union start a strike?' } ]
QUESTIONS = [ { 'questionText': 'What is the Labour Code?' }, { 'questionText': 'When can a union start a strike?', 'items': 0, 'evidenceRequest': { 'items': 0, 'profile': '' }, 'answerAssertion': '', 'category': '', 'co...
Add all blank parameters to sample question
Add all blank parameters to sample question
Python
mit
sherlocke/pywatson
QUESTIONS = [ { 'questionText': 'What is the Labour Code?' }, { 'questionText': 'When can a union start a strike?' } ] Add all blank parameters to sample question
QUESTIONS = [ { 'questionText': 'What is the Labour Code?' }, { 'questionText': 'When can a union start a strike?', 'items': 0, 'evidenceRequest': { 'items': 0, 'profile': '' }, 'answerAssertion': '', 'category': '', 'co...
<commit_before>QUESTIONS = [ { 'questionText': 'What is the Labour Code?' }, { 'questionText': 'When can a union start a strike?' } ] <commit_msg>Add all blank parameters to sample question<commit_after>
QUESTIONS = [ { 'questionText': 'What is the Labour Code?' }, { 'questionText': 'When can a union start a strike?', 'items': 0, 'evidenceRequest': { 'items': 0, 'profile': '' }, 'answerAssertion': '', 'category': '', 'co...
QUESTIONS = [ { 'questionText': 'What is the Labour Code?' }, { 'questionText': 'When can a union start a strike?' } ] Add all blank parameters to sample questionQUESTIONS = [ { 'questionText': 'What is the Labour Code?' }, { 'questionText': 'When can a union ...
<commit_before>QUESTIONS = [ { 'questionText': 'What is the Labour Code?' }, { 'questionText': 'When can a union start a strike?' } ] <commit_msg>Add all blank parameters to sample question<commit_after>QUESTIONS = [ { 'questionText': 'What is the Labour Code?' }, { ...
111d0bd356c18d0c028c73cd8c84c9d3e3ae591c
astropy/io/misc/asdf/tags/tests/helpers.py
astropy/io/misc/asdf/tags/tests/helpers.py
# Licensed under a 3-clause BSD style license - see LICENSE.rst # -*- coding: utf-8 -*- import os import urllib.parse import yaml import numpy as np def run_schema_example_test(organization, standard, name, version, check_func=None): import asdf from asdf.tests import helpers from asdf.types import for...
# Licensed under a 3-clause BSD style license - see LICENSE.rst # -*- coding: utf-8 -*- import os import urllib.parse import urllib.request import yaml import numpy as np def run_schema_example_test(organization, standard, name, version, check_func=None): import asdf from asdf.tests import helpers from...
Fix ASDF tag test helper to load schemas correctly
Fix ASDF tag test helper to load schemas correctly
Python
bsd-3-clause
pllim/astropy,astropy/astropy,lpsinger/astropy,larrybradley/astropy,StuartLittlefair/astropy,mhvk/astropy,pllim/astropy,MSeifert04/astropy,saimn/astropy,dhomeier/astropy,lpsinger/astropy,pllim/astropy,stargaser/astropy,larrybradley/astropy,larrybradley/astropy,bsipocz/astropy,StuartLittlefair/astropy,astropy/astropy,dh...
# Licensed under a 3-clause BSD style license - see LICENSE.rst # -*- coding: utf-8 -*- import os import urllib.parse import yaml import numpy as np def run_schema_example_test(organization, standard, name, version, check_func=None): import asdf from asdf.tests import helpers from asdf.types import for...
# Licensed under a 3-clause BSD style license - see LICENSE.rst # -*- coding: utf-8 -*- import os import urllib.parse import urllib.request import yaml import numpy as np def run_schema_example_test(organization, standard, name, version, check_func=None): import asdf from asdf.tests import helpers from...
<commit_before># Licensed under a 3-clause BSD style license - see LICENSE.rst # -*- coding: utf-8 -*- import os import urllib.parse import yaml import numpy as np def run_schema_example_test(organization, standard, name, version, check_func=None): import asdf from asdf.tests import helpers from asdf.t...
# Licensed under a 3-clause BSD style license - see LICENSE.rst # -*- coding: utf-8 -*- import os import urllib.parse import urllib.request import yaml import numpy as np def run_schema_example_test(organization, standard, name, version, check_func=None): import asdf from asdf.tests import helpers from...
# Licensed under a 3-clause BSD style license - see LICENSE.rst # -*- coding: utf-8 -*- import os import urllib.parse import yaml import numpy as np def run_schema_example_test(organization, standard, name, version, check_func=None): import asdf from asdf.tests import helpers from asdf.types import for...
<commit_before># Licensed under a 3-clause BSD style license - see LICENSE.rst # -*- coding: utf-8 -*- import os import urllib.parse import yaml import numpy as np def run_schema_example_test(organization, standard, name, version, check_func=None): import asdf from asdf.tests import helpers from asdf.t...
e2f1787601e7c05c9c5ab2efe26b6d1cb90b2ccb
saleor/account/migrations/0040_auto_20200415_0443.py
saleor/account/migrations/0040_auto_20200415_0443.py
# Generated by Django 3.0.5 on 2020-04-15 09:43 from django.db import migrations def change_extension_permission_to_plugin_permission(apps, schema_editor): permission = apps.get_model("auth", "Permission") users = apps.get_model("account", "User") plugin_permission = permission.objects.filter( c...
# Generated by Django 3.0.5 on 2020-04-15 09:43 from django.db import migrations def change_extension_permission_to_plugin_permission(apps, schema_editor): permission = apps.get_model("auth", "Permission") users = apps.get_model("account", "User") service_account = apps.get_model("account", "ServiceAccou...
Fix plugin permission data migration
Fix plugin permission data migration
Python
bsd-3-clause
mociepka/saleor,mociepka/saleor,mociepka/saleor
# Generated by Django 3.0.5 on 2020-04-15 09:43 from django.db import migrations def change_extension_permission_to_plugin_permission(apps, schema_editor): permission = apps.get_model("auth", "Permission") users = apps.get_model("account", "User") plugin_permission = permission.objects.filter( c...
# Generated by Django 3.0.5 on 2020-04-15 09:43 from django.db import migrations def change_extension_permission_to_plugin_permission(apps, schema_editor): permission = apps.get_model("auth", "Permission") users = apps.get_model("account", "User") service_account = apps.get_model("account", "ServiceAccou...
<commit_before># Generated by Django 3.0.5 on 2020-04-15 09:43 from django.db import migrations def change_extension_permission_to_plugin_permission(apps, schema_editor): permission = apps.get_model("auth", "Permission") users = apps.get_model("account", "User") plugin_permission = permission.objects.fi...
# Generated by Django 3.0.5 on 2020-04-15 09:43 from django.db import migrations def change_extension_permission_to_plugin_permission(apps, schema_editor): permission = apps.get_model("auth", "Permission") users = apps.get_model("account", "User") service_account = apps.get_model("account", "ServiceAccou...
# Generated by Django 3.0.5 on 2020-04-15 09:43 from django.db import migrations def change_extension_permission_to_plugin_permission(apps, schema_editor): permission = apps.get_model("auth", "Permission") users = apps.get_model("account", "User") plugin_permission = permission.objects.filter( c...
<commit_before># Generated by Django 3.0.5 on 2020-04-15 09:43 from django.db import migrations def change_extension_permission_to_plugin_permission(apps, schema_editor): permission = apps.get_model("auth", "Permission") users = apps.get_model("account", "User") plugin_permission = permission.objects.fi...
03e0e11491c64ae546134eb6c963a31958fe6d6d
address_book/address_book.py
address_book/address_book.py
from person import Person __all__ = ['AddressBook'] class AddressBook(object): def __init__(self): self.persons = [] def add_person(self, person): self.persons.append(person) def __contains__(self, item): if isinstance(item, Person): return item in self.persons ...
from person import Person __all__ = ['AddressBook'] class AddressBook(object): def __init__(self): self.persons = [] self.groups = [] def add_person(self, person): self.persons.append(person) def add_group(self, group): self.groups.append(group) def __contains__(se...
Add `add_group` method to `AddressBook` class - to make it possible to add groups to the address book
Add `add_group` method to `AddressBook` class - to make it possible to add groups to the address book
Python
mit
dizpers/python-address-book-assignment
from person import Person __all__ = ['AddressBook'] class AddressBook(object): def __init__(self): self.persons = [] def add_person(self, person): self.persons.append(person) def __contains__(self, item): if isinstance(item, Person): return item in self.persons ...
from person import Person __all__ = ['AddressBook'] class AddressBook(object): def __init__(self): self.persons = [] self.groups = [] def add_person(self, person): self.persons.append(person) def add_group(self, group): self.groups.append(group) def __contains__(se...
<commit_before>from person import Person __all__ = ['AddressBook'] class AddressBook(object): def __init__(self): self.persons = [] def add_person(self, person): self.persons.append(person) def __contains__(self, item): if isinstance(item, Person): return item in se...
from person import Person __all__ = ['AddressBook'] class AddressBook(object): def __init__(self): self.persons = [] self.groups = [] def add_person(self, person): self.persons.append(person) def add_group(self, group): self.groups.append(group) def __contains__(se...
from person import Person __all__ = ['AddressBook'] class AddressBook(object): def __init__(self): self.persons = [] def add_person(self, person): self.persons.append(person) def __contains__(self, item): if isinstance(item, Person): return item in self.persons ...
<commit_before>from person import Person __all__ = ['AddressBook'] class AddressBook(object): def __init__(self): self.persons = [] def add_person(self, person): self.persons.append(person) def __contains__(self, item): if isinstance(item, Person): return item in se...
72466cb328fb56bfe28f5c3a1f8fca082db24319
typer/__init__.py
typer/__init__.py
"""Typer, build great CLIs. Easy to code. Based on Python type hints.""" __version__ = "0.0.4" from click.exceptions import ( # noqa Abort, BadArgumentUsage, BadOptionUsage, BadParameter, ClickException, FileError, MissingParameter, NoSuchOption, UsageError, ) from click.termui im...
"""Typer, build great CLIs. Easy to code. Based on Python type hints.""" __version__ = "0.0.4" from click.exceptions import Abort, Exit # noqa from click.termui import ( # noqa clear, confirm, echo_via_pager, edit, get_terminal_size, getchar, launch, pause, progressbar, promp...
Clean exports from typer, remove unneeded Click components, add needed ones
:fire: Clean exports from typer, remove unneeded Click components, add needed ones Clean exports from typer, remove unneeded Click components
Python
mit
tiangolo/typer,tiangolo/typer
"""Typer, build great CLIs. Easy to code. Based on Python type hints.""" __version__ = "0.0.4" from click.exceptions import ( # noqa Abort, BadArgumentUsage, BadOptionUsage, BadParameter, ClickException, FileError, MissingParameter, NoSuchOption, UsageError, ) from click.termui im...
"""Typer, build great CLIs. Easy to code. Based on Python type hints.""" __version__ = "0.0.4" from click.exceptions import Abort, Exit # noqa from click.termui import ( # noqa clear, confirm, echo_via_pager, edit, get_terminal_size, getchar, launch, pause, progressbar, promp...
<commit_before>"""Typer, build great CLIs. Easy to code. Based on Python type hints.""" __version__ = "0.0.4" from click.exceptions import ( # noqa Abort, BadArgumentUsage, BadOptionUsage, BadParameter, ClickException, FileError, MissingParameter, NoSuchOption, UsageError, ) from ...
"""Typer, build great CLIs. Easy to code. Based on Python type hints.""" __version__ = "0.0.4" from click.exceptions import Abort, Exit # noqa from click.termui import ( # noqa clear, confirm, echo_via_pager, edit, get_terminal_size, getchar, launch, pause, progressbar, promp...
"""Typer, build great CLIs. Easy to code. Based on Python type hints.""" __version__ = "0.0.4" from click.exceptions import ( # noqa Abort, BadArgumentUsage, BadOptionUsage, BadParameter, ClickException, FileError, MissingParameter, NoSuchOption, UsageError, ) from click.termui im...
<commit_before>"""Typer, build great CLIs. Easy to code. Based on Python type hints.""" __version__ = "0.0.4" from click.exceptions import ( # noqa Abort, BadArgumentUsage, BadOptionUsage, BadParameter, ClickException, FileError, MissingParameter, NoSuchOption, UsageError, ) from ...
6709944d7e856fbce0434da0dc731fc83b55feb1
tests/test_cli_update.py
tests/test_cli_update.py
# -*- coding: utf-8 -*- import pathlib def test_should_write_json(cli_runner, tmp_rc, tmp_templates_file): result = cli_runner([ '-c', tmp_rc, 'update' ]) assert result.exit_code == 0 templates = pathlib.Path(tmp_templates_file) assert templates.exists()
# -*- coding: utf-8 -*- import pathlib import json def test_store_template_data_to_json(cli_runner, tmp_rc, tmp_templates_file): result = cli_runner([ '-c', tmp_rc, 'update' ]) assert result.exit_code == 0 templates = pathlib.Path(tmp_templates_file) assert templates.exists() with ...
Extend integration test to check correctness of dumped json data
Extend integration test to check correctness of dumped json data
Python
bsd-3-clause
hackebrot/cibopath
# -*- coding: utf-8 -*- import pathlib def test_should_write_json(cli_runner, tmp_rc, tmp_templates_file): result = cli_runner([ '-c', tmp_rc, 'update' ]) assert result.exit_code == 0 templates = pathlib.Path(tmp_templates_file) assert templates.exists() Extend integration test to check...
# -*- coding: utf-8 -*- import pathlib import json def test_store_template_data_to_json(cli_runner, tmp_rc, tmp_templates_file): result = cli_runner([ '-c', tmp_rc, 'update' ]) assert result.exit_code == 0 templates = pathlib.Path(tmp_templates_file) assert templates.exists() with ...
<commit_before># -*- coding: utf-8 -*- import pathlib def test_should_write_json(cli_runner, tmp_rc, tmp_templates_file): result = cli_runner([ '-c', tmp_rc, 'update' ]) assert result.exit_code == 0 templates = pathlib.Path(tmp_templates_file) assert templates.exists() <commit_msg>Exten...
# -*- coding: utf-8 -*- import pathlib import json def test_store_template_data_to_json(cli_runner, tmp_rc, tmp_templates_file): result = cli_runner([ '-c', tmp_rc, 'update' ]) assert result.exit_code == 0 templates = pathlib.Path(tmp_templates_file) assert templates.exists() with ...
# -*- coding: utf-8 -*- import pathlib def test_should_write_json(cli_runner, tmp_rc, tmp_templates_file): result = cli_runner([ '-c', tmp_rc, 'update' ]) assert result.exit_code == 0 templates = pathlib.Path(tmp_templates_file) assert templates.exists() Extend integration test to check...
<commit_before># -*- coding: utf-8 -*- import pathlib def test_should_write_json(cli_runner, tmp_rc, tmp_templates_file): result = cli_runner([ '-c', tmp_rc, 'update' ]) assert result.exit_code == 0 templates = pathlib.Path(tmp_templates_file) assert templates.exists() <commit_msg>Exten...
9ee1db76af2a1afdf59bf9099008715d9bca2f4d
tests/test_collection.py
tests/test_collection.py
from bukkit import Collection def test_creation(): buckets = Collection(rate=5, limit=23, timeout=31, clock=lambda: 0) assert buckets.rate == 5 assert buckets.limit == 23 assert buckets.timeout == 31 assert buckets.head_node.prev_node is buckets.tail_node assert buckets.tail_node.next_node is ...
from bukkit import Collection def test_creation(): buckets = Collection(rate=5, limit=23, timeout=31, clock=lambda: 0) assert buckets.rate == 5 assert buckets.limit == 23 assert buckets.timeout == 31 assert buckets.head_node.prev_node is buckets.tail_node assert buckets.tail_node.next_node is ...
Make sure getting buckets and checking for their presence work.
Make sure getting buckets and checking for their presence work.
Python
mit
kgaughan/bukkit
from bukkit import Collection def test_creation(): buckets = Collection(rate=5, limit=23, timeout=31, clock=lambda: 0) assert buckets.rate == 5 assert buckets.limit == 23 assert buckets.timeout == 31 assert buckets.head_node.prev_node is buckets.tail_node assert buckets.tail_node.next_node is ...
from bukkit import Collection def test_creation(): buckets = Collection(rate=5, limit=23, timeout=31, clock=lambda: 0) assert buckets.rate == 5 assert buckets.limit == 23 assert buckets.timeout == 31 assert buckets.head_node.prev_node is buckets.tail_node assert buckets.tail_node.next_node is ...
<commit_before>from bukkit import Collection def test_creation(): buckets = Collection(rate=5, limit=23, timeout=31, clock=lambda: 0) assert buckets.rate == 5 assert buckets.limit == 23 assert buckets.timeout == 31 assert buckets.head_node.prev_node is buckets.tail_node assert buckets.tail_nod...
from bukkit import Collection def test_creation(): buckets = Collection(rate=5, limit=23, timeout=31, clock=lambda: 0) assert buckets.rate == 5 assert buckets.limit == 23 assert buckets.timeout == 31 assert buckets.head_node.prev_node is buckets.tail_node assert buckets.tail_node.next_node is ...
from bukkit import Collection def test_creation(): buckets = Collection(rate=5, limit=23, timeout=31, clock=lambda: 0) assert buckets.rate == 5 assert buckets.limit == 23 assert buckets.timeout == 31 assert buckets.head_node.prev_node is buckets.tail_node assert buckets.tail_node.next_node is ...
<commit_before>from bukkit import Collection def test_creation(): buckets = Collection(rate=5, limit=23, timeout=31, clock=lambda: 0) assert buckets.rate == 5 assert buckets.limit == 23 assert buckets.timeout == 31 assert buckets.head_node.prev_node is buckets.tail_node assert buckets.tail_nod...
80c4b0fe0a654ef4ec56faac73af993408b846f1
test_client.py
test_client.py
from client import client import pytest def test_string_input(): assert client("String") == "You sent: String" def test_int_input(): assert client(42) == "You sent: 42" def test_empty_input(): with pytest.raises(TypeError): client() def test_over32_input(): assert client("A long message ...
from client import client import pytest def test_response_ok(): msg = "GET /path/to/myindex.html HTTP/1.1\r\nHost: localhost:50000\r\n" result = "HTTP/1.1 200 OK\r\n" con_type = "Content-Type: text/plain\r\n" body = "Content length: {}".format(21) # Length of message from file name to end of line ...
Add first test for a good response
Add first test for a good response
Python
mit
nbeck90/network_tools
from client import client import pytest def test_string_input(): assert client("String") == "You sent: String" def test_int_input(): assert client(42) == "You sent: 42" def test_empty_input(): with pytest.raises(TypeError): client() def test_over32_input(): assert client("A long message ...
from client import client import pytest def test_response_ok(): msg = "GET /path/to/myindex.html HTTP/1.1\r\nHost: localhost:50000\r\n" result = "HTTP/1.1 200 OK\r\n" con_type = "Content-Type: text/plain\r\n" body = "Content length: {}".format(21) # Length of message from file name to end of line ...
<commit_before>from client import client import pytest def test_string_input(): assert client("String") == "You sent: String" def test_int_input(): assert client(42) == "You sent: 42" def test_empty_input(): with pytest.raises(TypeError): client() def test_over32_input(): assert client("...
from client import client import pytest def test_response_ok(): msg = "GET /path/to/myindex.html HTTP/1.1\r\nHost: localhost:50000\r\n" result = "HTTP/1.1 200 OK\r\n" con_type = "Content-Type: text/plain\r\n" body = "Content length: {}".format(21) # Length of message from file name to end of line ...
from client import client import pytest def test_string_input(): assert client("String") == "You sent: String" def test_int_input(): assert client(42) == "You sent: 42" def test_empty_input(): with pytest.raises(TypeError): client() def test_over32_input(): assert client("A long message ...
<commit_before>from client import client import pytest def test_string_input(): assert client("String") == "You sent: String" def test_int_input(): assert client(42) == "You sent: 42" def test_empty_input(): with pytest.raises(TypeError): client() def test_over32_input(): assert client("...
6d6528182eb5dc21f41eb4ea5e4cfd08163edc96
sara_flexbe_states/src/sara_flexbe_states/Wonderland_Request.py
sara_flexbe_states/src/sara_flexbe_states/Wonderland_Request.py
#!/usr/bin/env python # encoding=utf8 import requests from flexbe_core import EventState, Logger class Wonderland_Request(EventState): ''' MoveArm receive a ROS pose as input and launch a ROS service with the same pose ># url string url to call <= response string Finish job. ''' def __init__(sel...
#!/usr/bin/env python # encoding=utf8 import requests from flexbe_core import EventState, Logger class Wonderland_Request(EventState): ''' Send requests to Wonderland server ># url string url to call <= response string Finish job. ''' def __init__(self): # See example_state.py for basic explan...
Simplify state and save server URL
Simplify state and save server URL
Python
bsd-3-clause
WalkingMachine/sara_behaviors,WalkingMachine/sara_behaviors
#!/usr/bin/env python # encoding=utf8 import requests from flexbe_core import EventState, Logger class Wonderland_Request(EventState): ''' MoveArm receive a ROS pose as input and launch a ROS service with the same pose ># url string url to call <= response string Finish job. ''' def __init__(sel...
#!/usr/bin/env python # encoding=utf8 import requests from flexbe_core import EventState, Logger class Wonderland_Request(EventState): ''' Send requests to Wonderland server ># url string url to call <= response string Finish job. ''' def __init__(self): # See example_state.py for basic explan...
<commit_before>#!/usr/bin/env python # encoding=utf8 import requests from flexbe_core import EventState, Logger class Wonderland_Request(EventState): ''' MoveArm receive a ROS pose as input and launch a ROS service with the same pose ># url string url to call <= response string Finish job. ''' d...
#!/usr/bin/env python # encoding=utf8 import requests from flexbe_core import EventState, Logger class Wonderland_Request(EventState): ''' Send requests to Wonderland server ># url string url to call <= response string Finish job. ''' def __init__(self): # See example_state.py for basic explan...
#!/usr/bin/env python # encoding=utf8 import requests from flexbe_core import EventState, Logger class Wonderland_Request(EventState): ''' MoveArm receive a ROS pose as input and launch a ROS service with the same pose ># url string url to call <= response string Finish job. ''' def __init__(sel...
<commit_before>#!/usr/bin/env python # encoding=utf8 import requests from flexbe_core import EventState, Logger class Wonderland_Request(EventState): ''' MoveArm receive a ROS pose as input and launch a ROS service with the same pose ># url string url to call <= response string Finish job. ''' d...
f275c8cc020119b52ed01bc6b56946279853d854
src/mmw/apps/bigcz/clients/cuahsi/details.py
src/mmw/apps/bigcz/clients/cuahsi/details.py
# -*- coding: utf-8 -*- from __future__ import print_function from __future__ import unicode_literals from __future__ import division from datetime import date, timedelta from rest_framework.exceptions import ValidationError DATE_FORMAT = '%m/%d/%Y' def details(wsdl, site): if not wsdl: raise Validatio...
# -*- coding: utf-8 -*- from __future__ import print_function from __future__ import unicode_literals from __future__ import division from datetime import date, timedelta from rest_framework.exceptions import ValidationError DATE_FORMAT = '%m/%d/%Y' def details(wsdl, site): if not wsdl: raise Validatio...
Stop ulmo caching for suds-jurko compliance
Stop ulmo caching for suds-jurko compliance Previously we were using ulmo with suds-jurko 0.6, which is the current latest release, but it is 4 years old. Most recent work on suds-jurko has been done on the development branch, including optimizations to memory use (which we need). Unfortunately, the development branch...
Python
apache-2.0
WikiWatershed/model-my-watershed,WikiWatershed/model-my-watershed,WikiWatershed/model-my-watershed,WikiWatershed/model-my-watershed,WikiWatershed/model-my-watershed
# -*- coding: utf-8 -*- from __future__ import print_function from __future__ import unicode_literals from __future__ import division from datetime import date, timedelta from rest_framework.exceptions import ValidationError DATE_FORMAT = '%m/%d/%Y' def details(wsdl, site): if not wsdl: raise Validatio...
# -*- coding: utf-8 -*- from __future__ import print_function from __future__ import unicode_literals from __future__ import division from datetime import date, timedelta from rest_framework.exceptions import ValidationError DATE_FORMAT = '%m/%d/%Y' def details(wsdl, site): if not wsdl: raise Validatio...
<commit_before># -*- coding: utf-8 -*- from __future__ import print_function from __future__ import unicode_literals from __future__ import division from datetime import date, timedelta from rest_framework.exceptions import ValidationError DATE_FORMAT = '%m/%d/%Y' def details(wsdl, site): if not wsdl: ...
# -*- coding: utf-8 -*- from __future__ import print_function from __future__ import unicode_literals from __future__ import division from datetime import date, timedelta from rest_framework.exceptions import ValidationError DATE_FORMAT = '%m/%d/%Y' def details(wsdl, site): if not wsdl: raise Validatio...
# -*- coding: utf-8 -*- from __future__ import print_function from __future__ import unicode_literals from __future__ import division from datetime import date, timedelta from rest_framework.exceptions import ValidationError DATE_FORMAT = '%m/%d/%Y' def details(wsdl, site): if not wsdl: raise Validatio...
<commit_before># -*- coding: utf-8 -*- from __future__ import print_function from __future__ import unicode_literals from __future__ import division from datetime import date, timedelta from rest_framework.exceptions import ValidationError DATE_FORMAT = '%m/%d/%Y' def details(wsdl, site): if not wsdl: ...
366316b0ea20ae178670581b61c52c481682d2b0
cosmic_ray/operators/exception_replacer.py
cosmic_ray/operators/exception_replacer.py
import ast import builtins from .operator import Operator class OutOfNoWhereException(Exception): pass setattr(builtins, OutOfNoWhereException.__name__, OutOfNoWhereException) class ExceptionReplacer(Operator): """An operator that modifies exception handlers.""" def visit_ExceptHandler(self, node): ...
import ast import builtins from .operator import Operator class CosmicRayTestingException(Exception): pass setattr(builtins, CosmicRayTestingException.__name__, CosmicRayTestingException) class ExceptionReplacer(Operator): """An operator that modifies exception handlers.""" def visit_ExceptHandler(s...
Change exception name to CosmicRayTestingException
Change exception name to CosmicRayTestingException
Python
mit
sixty-north/cosmic-ray
import ast import builtins from .operator import Operator class OutOfNoWhereException(Exception): pass setattr(builtins, OutOfNoWhereException.__name__, OutOfNoWhereException) class ExceptionReplacer(Operator): """An operator that modifies exception handlers.""" def visit_ExceptHandler(self, node): ...
import ast import builtins from .operator import Operator class CosmicRayTestingException(Exception): pass setattr(builtins, CosmicRayTestingException.__name__, CosmicRayTestingException) class ExceptionReplacer(Operator): """An operator that modifies exception handlers.""" def visit_ExceptHandler(s...
<commit_before>import ast import builtins from .operator import Operator class OutOfNoWhereException(Exception): pass setattr(builtins, OutOfNoWhereException.__name__, OutOfNoWhereException) class ExceptionReplacer(Operator): """An operator that modifies exception handlers.""" def visit_ExceptHandle...
import ast import builtins from .operator import Operator class CosmicRayTestingException(Exception): pass setattr(builtins, CosmicRayTestingException.__name__, CosmicRayTestingException) class ExceptionReplacer(Operator): """An operator that modifies exception handlers.""" def visit_ExceptHandler(s...
import ast import builtins from .operator import Operator class OutOfNoWhereException(Exception): pass setattr(builtins, OutOfNoWhereException.__name__, OutOfNoWhereException) class ExceptionReplacer(Operator): """An operator that modifies exception handlers.""" def visit_ExceptHandler(self, node): ...
<commit_before>import ast import builtins from .operator import Operator class OutOfNoWhereException(Exception): pass setattr(builtins, OutOfNoWhereException.__name__, OutOfNoWhereException) class ExceptionReplacer(Operator): """An operator that modifies exception handlers.""" def visit_ExceptHandle...
132309e91cc7e951d4a7f326d9e374dc8943f2f3
tests/core/providers/test_testrpc_provider.py
tests/core/providers/test_testrpc_provider.py
import pytest from web3.manager import ( RequestManager, ) from web3.providers.tester import ( TestRPCProvider, is_testrpc_available, ) from web3.utils.compat import socket def get_open_port(): s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) s.bind(("", 0)) s.listen(1) port = s.gets...
import pytest from web3.manager import ( RequestManager, ) from web3.providers.tester import ( TestRPCProvider as TheTestRPCProvider, is_testrpc_available, ) from web3.utils.compat import socket def get_open_port(): s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) s.bind(("", 0)) s.liste...
Resolve pytest warning about TestRPCProvider
Resolve pytest warning about TestRPCProvider
Python
mit
pipermerriam/web3.py
import pytest from web3.manager import ( RequestManager, ) from web3.providers.tester import ( TestRPCProvider, is_testrpc_available, ) from web3.utils.compat import socket def get_open_port(): s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) s.bind(("", 0)) s.listen(1) port = s.gets...
import pytest from web3.manager import ( RequestManager, ) from web3.providers.tester import ( TestRPCProvider as TheTestRPCProvider, is_testrpc_available, ) from web3.utils.compat import socket def get_open_port(): s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) s.bind(("", 0)) s.liste...
<commit_before>import pytest from web3.manager import ( RequestManager, ) from web3.providers.tester import ( TestRPCProvider, is_testrpc_available, ) from web3.utils.compat import socket def get_open_port(): s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) s.bind(("", 0)) s.listen(1) ...
import pytest from web3.manager import ( RequestManager, ) from web3.providers.tester import ( TestRPCProvider as TheTestRPCProvider, is_testrpc_available, ) from web3.utils.compat import socket def get_open_port(): s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) s.bind(("", 0)) s.liste...
import pytest from web3.manager import ( RequestManager, ) from web3.providers.tester import ( TestRPCProvider, is_testrpc_available, ) from web3.utils.compat import socket def get_open_port(): s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) s.bind(("", 0)) s.listen(1) port = s.gets...
<commit_before>import pytest from web3.manager import ( RequestManager, ) from web3.providers.tester import ( TestRPCProvider, is_testrpc_available, ) from web3.utils.compat import socket def get_open_port(): s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) s.bind(("", 0)) s.listen(1) ...
17e26fa55e70de657d52e340cb6b66691310a663
bettertexts/forms.py
bettertexts/forms.py
from django_comments.forms import CommentForm from django import forms from django.utils.translation import ugettext_lazy as _ from bettertexts.models import TextComment class TextCommentForm(CommentForm): def __init__(self, *args, **kwargs): super(TextCommentForm, self).__init__(*args, **kwargs) ...
from django_comments.forms import CommentForm from django import forms from django.utils.translation import ugettext_lazy as _ from bettertexts.models import TextComment class TextCommentForm(CommentForm): def __init__(self, *args, **kwargs): super(TextCommentForm, self).__init__(*args, **kwargs) ...
Fix checkboxes inform and involved
CL011: Fix checkboxes inform and involved
Python
mit
citizenline/citizenline,citizenline/citizenline,citizenline/citizenline,citizenline/citizenline
from django_comments.forms import CommentForm from django import forms from django.utils.translation import ugettext_lazy as _ from bettertexts.models import TextComment class TextCommentForm(CommentForm): def __init__(self, *args, **kwargs): super(TextCommentForm, self).__init__(*args, **kwargs) ...
from django_comments.forms import CommentForm from django import forms from django.utils.translation import ugettext_lazy as _ from bettertexts.models import TextComment class TextCommentForm(CommentForm): def __init__(self, *args, **kwargs): super(TextCommentForm, self).__init__(*args, **kwargs) ...
<commit_before>from django_comments.forms import CommentForm from django import forms from django.utils.translation import ugettext_lazy as _ from bettertexts.models import TextComment class TextCommentForm(CommentForm): def __init__(self, *args, **kwargs): super(TextCommentForm, self).__init__(*args, *...
from django_comments.forms import CommentForm from django import forms from django.utils.translation import ugettext_lazy as _ from bettertexts.models import TextComment class TextCommentForm(CommentForm): def __init__(self, *args, **kwargs): super(TextCommentForm, self).__init__(*args, **kwargs) ...
from django_comments.forms import CommentForm from django import forms from django.utils.translation import ugettext_lazy as _ from bettertexts.models import TextComment class TextCommentForm(CommentForm): def __init__(self, *args, **kwargs): super(TextCommentForm, self).__init__(*args, **kwargs) ...
<commit_before>from django_comments.forms import CommentForm from django import forms from django.utils.translation import ugettext_lazy as _ from bettertexts.models import TextComment class TextCommentForm(CommentForm): def __init__(self, *args, **kwargs): super(TextCommentForm, self).__init__(*args, *...
a473e54f5643483efc490f6362f0fca6fcf0c5bd
zappa/__init__.py
zappa/__init__.py
import sys SUPPORTED_VERSIONS = [(2, 7), (3, 6)] python_major_version = sys.version_info[0] python_minor_version = sys.version_info[1] if (python_major_version, python_minor_version) not in SUPPORTED_VERSIONS: formatted_supported_versions = ['{}.{}'.format(mav, miv) for mav, miv in SUPPORTED_VERSIONS] err_m...
Check Python version upon import
Check Python version upon import
Python
mit
scoates/Zappa,pjz/Zappa,mathom/Zappa,Miserlou/Zappa,anush0247/Zappa,Miserlou/Zappa,mathom/Zappa,scoates/Zappa,pjz/Zappa,anush0247/Zappa
Check Python version upon import
import sys SUPPORTED_VERSIONS = [(2, 7), (3, 6)] python_major_version = sys.version_info[0] python_minor_version = sys.version_info[1] if (python_major_version, python_minor_version) not in SUPPORTED_VERSIONS: formatted_supported_versions = ['{}.{}'.format(mav, miv) for mav, miv in SUPPORTED_VERSIONS] err_m...
<commit_before><commit_msg>Check Python version upon import<commit_after>
import sys SUPPORTED_VERSIONS = [(2, 7), (3, 6)] python_major_version = sys.version_info[0] python_minor_version = sys.version_info[1] if (python_major_version, python_minor_version) not in SUPPORTED_VERSIONS: formatted_supported_versions = ['{}.{}'.format(mav, miv) for mav, miv in SUPPORTED_VERSIONS] err_m...
Check Python version upon import import sys SUPPORTED_VERSIONS = [(2, 7), (3, 6)] python_major_version = sys.version_info[0] python_minor_version = sys.version_info[1] if (python_major_version, python_minor_version) not in SUPPORTED_VERSIONS: formatted_supported_versions = ['{}.{}'.format(mav, miv) for mav, miv ...
<commit_before><commit_msg>Check Python version upon import<commit_after> import sys SUPPORTED_VERSIONS = [(2, 7), (3, 6)] python_major_version = sys.version_info[0] python_minor_version = sys.version_info[1] if (python_major_version, python_minor_version) not in SUPPORTED_VERSIONS: formatted_supported_versions ...
ee66811628ea81e0540816e012c71d90457cc933
test/utils/filesystem/name_sanitizer_spec.py
test/utils/filesystem/name_sanitizer_spec.py
from tempfile import TemporaryDirectory from expects import expect from hypothesis import given, assume, example from hypothesis.strategies import text, characters from mamba import description, it from pathlib import Path from crowd_anki.utils.filesystem.name_sanitizer import sanitize_anki_deck_name, \ invalid_f...
from tempfile import TemporaryDirectory from expects import expect from hypothesis import given, assume, example from hypothesis.strategies import text, characters from mamba import description, it from pathlib import Path from crowd_anki.utils.filesystem.name_sanitizer import sanitize_anki_deck_name, \ invalid_f...
Add explicit example filtering based on the byte length of the content
Add explicit example filtering based on the byte length of the content
Python
mit
Stvad/CrowdAnki,Stvad/CrowdAnki,Stvad/CrowdAnki
from tempfile import TemporaryDirectory from expects import expect from hypothesis import given, assume, example from hypothesis.strategies import text, characters from mamba import description, it from pathlib import Path from crowd_anki.utils.filesystem.name_sanitizer import sanitize_anki_deck_name, \ invalid_f...
from tempfile import TemporaryDirectory from expects import expect from hypothesis import given, assume, example from hypothesis.strategies import text, characters from mamba import description, it from pathlib import Path from crowd_anki.utils.filesystem.name_sanitizer import sanitize_anki_deck_name, \ invalid_f...
<commit_before>from tempfile import TemporaryDirectory from expects import expect from hypothesis import given, assume, example from hypothesis.strategies import text, characters from mamba import description, it from pathlib import Path from crowd_anki.utils.filesystem.name_sanitizer import sanitize_anki_deck_name, ...
from tempfile import TemporaryDirectory from expects import expect from hypothesis import given, assume, example from hypothesis.strategies import text, characters from mamba import description, it from pathlib import Path from crowd_anki.utils.filesystem.name_sanitizer import sanitize_anki_deck_name, \ invalid_f...
from tempfile import TemporaryDirectory from expects import expect from hypothesis import given, assume, example from hypothesis.strategies import text, characters from mamba import description, it from pathlib import Path from crowd_anki.utils.filesystem.name_sanitizer import sanitize_anki_deck_name, \ invalid_f...
<commit_before>from tempfile import TemporaryDirectory from expects import expect from hypothesis import given, assume, example from hypothesis.strategies import text, characters from mamba import description, it from pathlib import Path from crowd_anki.utils.filesystem.name_sanitizer import sanitize_anki_deck_name, ...
c10be759ad2ddbd076a1fe0a887d3cf9325aba3d
src/scheduler.py
src/scheduler.py
from collections import namedtuple import sched_utils import check ScheduleConfiguration = namedtuple('ScheduleConfiguration', ['zones', 'teams', 'weight_zones', 'round_length', 'imbalance_action', 'match_count']...
"""Match scheduler. Usage: scheduler.py full <teams> <matches> [options] scheduler.py partial <teams> <previous> <matches> [options] Options: -w --weight Try to balance out between starting zones. --zones=<z> Number of start zones [default: 4]. --empty Leave empty spaces to balance out th...
Switch to a new command-line interface
Switch to a new command-line interface
Python
mit
prophile/match-scheduler,prophile/match-scheduler
from collections import namedtuple import sched_utils import check ScheduleConfiguration = namedtuple('ScheduleConfiguration', ['zones', 'teams', 'weight_zones', 'round_length', 'imbalance_action', 'match_count']...
"""Match scheduler. Usage: scheduler.py full <teams> <matches> [options] scheduler.py partial <teams> <previous> <matches> [options] Options: -w --weight Try to balance out between starting zones. --zones=<z> Number of start zones [default: 4]. --empty Leave empty spaces to balance out th...
<commit_before>from collections import namedtuple import sched_utils import check ScheduleConfiguration = namedtuple('ScheduleConfiguration', ['zones', 'teams', 'weight_zones', 'round_length', 'imbalance_action', ...
"""Match scheduler. Usage: scheduler.py full <teams> <matches> [options] scheduler.py partial <teams> <previous> <matches> [options] Options: -w --weight Try to balance out between starting zones. --zones=<z> Number of start zones [default: 4]. --empty Leave empty spaces to balance out th...
from collections import namedtuple import sched_utils import check ScheduleConfiguration = namedtuple('ScheduleConfiguration', ['zones', 'teams', 'weight_zones', 'round_length', 'imbalance_action', 'match_count']...
<commit_before>from collections import namedtuple import sched_utils import check ScheduleConfiguration = namedtuple('ScheduleConfiguration', ['zones', 'teams', 'weight_zones', 'round_length', 'imbalance_action', ...
ecd06f371fb83823494b17e341d7c4cf8bf117d0
utils/bug_reducer/bug_reducer/bug_reducer.py
utils/bug_reducer/bug_reducer/bug_reducer.py
#!/usr/bin/env python import argparse import opt_bug_reducer import random_bug_finder def main(): parser = argparse.ArgumentParser(description="""\ A program for reducing sib/sil crashers""") subparsers = parser.add_subparsers() opt_subparser = subparsers.add_parser("opt") opt_subparser.add_argume...
#!/usr/bin/env python import argparse import opt_bug_reducer import random_bug_finder def add_subparser(subparsers, module, name): sparser = subparsers.add_parser(name) sparser.add_argument('swift_build_dir', help='Path to the swift build directory ' 'conta...
Refactor adding subparsers given that all subparsers have a common swift_build_dir arg.
[sil-bug-reducer] Refactor adding subparsers given that all subparsers have a common swift_build_dir arg.
Python
apache-2.0
uasys/swift,JaSpa/swift,milseman/swift,harlanhaskins/swift,gregomni/swift,sschiau/swift,austinzheng/swift,xedin/swift,xwu/swift,codestergit/swift,harlanhaskins/swift,huonw/swift,shahmishal/swift,lorentey/swift,deyton/swift,gmilos/swift,sschiau/swift,gregomni/swift,harlanhaskins/swift,shajrawi/swift,stephentyrone/swift,...
#!/usr/bin/env python import argparse import opt_bug_reducer import random_bug_finder def main(): parser = argparse.ArgumentParser(description="""\ A program for reducing sib/sil crashers""") subparsers = parser.add_subparsers() opt_subparser = subparsers.add_parser("opt") opt_subparser.add_argume...
#!/usr/bin/env python import argparse import opt_bug_reducer import random_bug_finder def add_subparser(subparsers, module, name): sparser = subparsers.add_parser(name) sparser.add_argument('swift_build_dir', help='Path to the swift build directory ' 'conta...
<commit_before>#!/usr/bin/env python import argparse import opt_bug_reducer import random_bug_finder def main(): parser = argparse.ArgumentParser(description="""\ A program for reducing sib/sil crashers""") subparsers = parser.add_subparsers() opt_subparser = subparsers.add_parser("opt") opt_subpa...
#!/usr/bin/env python import argparse import opt_bug_reducer import random_bug_finder def add_subparser(subparsers, module, name): sparser = subparsers.add_parser(name) sparser.add_argument('swift_build_dir', help='Path to the swift build directory ' 'conta...
#!/usr/bin/env python import argparse import opt_bug_reducer import random_bug_finder def main(): parser = argparse.ArgumentParser(description="""\ A program for reducing sib/sil crashers""") subparsers = parser.add_subparsers() opt_subparser = subparsers.add_parser("opt") opt_subparser.add_argume...
<commit_before>#!/usr/bin/env python import argparse import opt_bug_reducer import random_bug_finder def main(): parser = argparse.ArgumentParser(description="""\ A program for reducing sib/sil crashers""") subparsers = parser.add_subparsers() opt_subparser = subparsers.add_parser("opt") opt_subpa...
2d01301e9154045f4b15d1523089ad36fdd7f6f4
cs251tk/toolkit/process_student.py
cs251tk/toolkit/process_student.py
import os from cs251tk.student import remove from cs251tk.student import clone_student from cs251tk.student import stash from cs251tk.student import pull from cs251tk.student import checkout_date from cs251tk.student import record from cs251tk.student import reset from cs251tk.student import analyze from cs251tk.commo...
import os from cs251tk.student import remove from cs251tk.student import clone_student from cs251tk.student import stash from cs251tk.student import pull from cs251tk.student import checkout_date from cs251tk.student import record from cs251tk.student import reset from cs251tk.student import analyze def process_stud...
Remove leftover imports from testing
Remove leftover imports from testing
Python
mit
StoDevX/cs251-toolkit,StoDevX/cs251-toolkit,StoDevX/cs251-toolkit,StoDevX/cs251-toolkit
import os from cs251tk.student import remove from cs251tk.student import clone_student from cs251tk.student import stash from cs251tk.student import pull from cs251tk.student import checkout_date from cs251tk.student import record from cs251tk.student import reset from cs251tk.student import analyze from cs251tk.commo...
import os from cs251tk.student import remove from cs251tk.student import clone_student from cs251tk.student import stash from cs251tk.student import pull from cs251tk.student import checkout_date from cs251tk.student import record from cs251tk.student import reset from cs251tk.student import analyze def process_stud...
<commit_before>import os from cs251tk.student import remove from cs251tk.student import clone_student from cs251tk.student import stash from cs251tk.student import pull from cs251tk.student import checkout_date from cs251tk.student import record from cs251tk.student import reset from cs251tk.student import analyze fro...
import os from cs251tk.student import remove from cs251tk.student import clone_student from cs251tk.student import stash from cs251tk.student import pull from cs251tk.student import checkout_date from cs251tk.student import record from cs251tk.student import reset from cs251tk.student import analyze def process_stud...
import os from cs251tk.student import remove from cs251tk.student import clone_student from cs251tk.student import stash from cs251tk.student import pull from cs251tk.student import checkout_date from cs251tk.student import record from cs251tk.student import reset from cs251tk.student import analyze from cs251tk.commo...
<commit_before>import os from cs251tk.student import remove from cs251tk.student import clone_student from cs251tk.student import stash from cs251tk.student import pull from cs251tk.student import checkout_date from cs251tk.student import record from cs251tk.student import reset from cs251tk.student import analyze fro...
729d3160f974c521ab6605c02cf64861be0fb6ab
fri/utils.py
fri/utils.py
import numpy as np def distance(u, v): """ Distance measure custom made for feature comparison. Parameters ---------- u: first feature v: second feature Returns ------- """ u = np.asarray(u) v = np.asarray(v) # Euclidean differences diff = (u - v) ** 2 # Null...
import numpy as np def distance(u, v): """ Distance measure custom made for feature comparison. Parameters ---------- u: first feature v: second feature Returns ------- """ u = np.asarray(u) v = np.asarray(v) # Euclidean differences diff = (u - v) ** 2 # Null...
Revert removal of necessary function
Revert removal of necessary function
Python
mit
lpfann/fri
import numpy as np def distance(u, v): """ Distance measure custom made for feature comparison. Parameters ---------- u: first feature v: second feature Returns ------- """ u = np.asarray(u) v = np.asarray(v) # Euclidean differences diff = (u - v) ** 2 # Null...
import numpy as np def distance(u, v): """ Distance measure custom made for feature comparison. Parameters ---------- u: first feature v: second feature Returns ------- """ u = np.asarray(u) v = np.asarray(v) # Euclidean differences diff = (u - v) ** 2 # Null...
<commit_before>import numpy as np def distance(u, v): """ Distance measure custom made for feature comparison. Parameters ---------- u: first feature v: second feature Returns ------- """ u = np.asarray(u) v = np.asarray(v) # Euclidean differences diff = (u - v) ...
import numpy as np def distance(u, v): """ Distance measure custom made for feature comparison. Parameters ---------- u: first feature v: second feature Returns ------- """ u = np.asarray(u) v = np.asarray(v) # Euclidean differences diff = (u - v) ** 2 # Null...
import numpy as np def distance(u, v): """ Distance measure custom made for feature comparison. Parameters ---------- u: first feature v: second feature Returns ------- """ u = np.asarray(u) v = np.asarray(v) # Euclidean differences diff = (u - v) ** 2 # Null...
<commit_before>import numpy as np def distance(u, v): """ Distance measure custom made for feature comparison. Parameters ---------- u: first feature v: second feature Returns ------- """ u = np.asarray(u) v = np.asarray(v) # Euclidean differences diff = (u - v) ...
02522262692554a499d7c0fbc8f2efe4361023f1
bmi_ilamb/__init__.py
bmi_ilamb/__init__.py
import os from .bmi_ilamb import BmiIlamb __all__ = ['BmiIlamb'] __version__ = 0.1 package_dir = os.path.dirname(__file__) data_dir = os.path.join(package_dir, 'data')
import os from .bmi_ilamb import BmiIlamb from .config import Configuration __all__ = ['BmiIlamb', 'Configuration'] __version__ = 0.1 package_dir = os.path.dirname(__file__) data_dir = os.path.join(package_dir, 'data')
Add Configuration to package definition
Add Configuration to package definition
Python
mit
permamodel/bmi-ilamb
import os from .bmi_ilamb import BmiIlamb __all__ = ['BmiIlamb'] __version__ = 0.1 package_dir = os.path.dirname(__file__) data_dir = os.path.join(package_dir, 'data') Add Configuration to package definition
import os from .bmi_ilamb import BmiIlamb from .config import Configuration __all__ = ['BmiIlamb', 'Configuration'] __version__ = 0.1 package_dir = os.path.dirname(__file__) data_dir = os.path.join(package_dir, 'data')
<commit_before>import os from .bmi_ilamb import BmiIlamb __all__ = ['BmiIlamb'] __version__ = 0.1 package_dir = os.path.dirname(__file__) data_dir = os.path.join(package_dir, 'data') <commit_msg>Add Configuration to package definition<commit_after>
import os from .bmi_ilamb import BmiIlamb from .config import Configuration __all__ = ['BmiIlamb', 'Configuration'] __version__ = 0.1 package_dir = os.path.dirname(__file__) data_dir = os.path.join(package_dir, 'data')
import os from .bmi_ilamb import BmiIlamb __all__ = ['BmiIlamb'] __version__ = 0.1 package_dir = os.path.dirname(__file__) data_dir = os.path.join(package_dir, 'data') Add Configuration to package definitionimport os from .bmi_ilamb import BmiIlamb from .config import Configuration __all__ = ['BmiIlamb', 'Configur...
<commit_before>import os from .bmi_ilamb import BmiIlamb __all__ = ['BmiIlamb'] __version__ = 0.1 package_dir = os.path.dirname(__file__) data_dir = os.path.join(package_dir, 'data') <commit_msg>Add Configuration to package definition<commit_after>import os from .bmi_ilamb import BmiIlamb from .config import Configu...
af2687703bc13eeabfe715e35988ad8c54ce9117
builds/format_json.py
builds/format_json.py
#!/usr/bin/env python # -*- encoding: utf-8 -*- import json import os import subprocess import sys def find_json_files(): for root, _, filenames in os.walk('.'): if any( d in root for d in ['/WIP', '/.terraform', '/target'] ): continue for f in filenam...
#!/usr/bin/env python # -*- encoding: utf-8 -*- import json import os import subprocess import sys def find_json_files(): for root, _, filenames in os.walk('.'): if any( d in root for d in ['/WIP', '/.terraform', '/target'] ): continue for f in filenam...
Tweak the JSON we export
Tweak the JSON we export
Python
mit
wellcometrust/platform-api,wellcometrust/platform-api,wellcometrust/platform-api,wellcometrust/platform-api
#!/usr/bin/env python # -*- encoding: utf-8 -*- import json import os import subprocess import sys def find_json_files(): for root, _, filenames in os.walk('.'): if any( d in root for d in ['/WIP', '/.terraform', '/target'] ): continue for f in filenam...
#!/usr/bin/env python # -*- encoding: utf-8 -*- import json import os import subprocess import sys def find_json_files(): for root, _, filenames in os.walk('.'): if any( d in root for d in ['/WIP', '/.terraform', '/target'] ): continue for f in filenam...
<commit_before>#!/usr/bin/env python # -*- encoding: utf-8 -*- import json import os import subprocess import sys def find_json_files(): for root, _, filenames in os.walk('.'): if any( d in root for d in ['/WIP', '/.terraform', '/target'] ): continue f...
#!/usr/bin/env python # -*- encoding: utf-8 -*- import json import os import subprocess import sys def find_json_files(): for root, _, filenames in os.walk('.'): if any( d in root for d in ['/WIP', '/.terraform', '/target'] ): continue for f in filenam...
#!/usr/bin/env python # -*- encoding: utf-8 -*- import json import os import subprocess import sys def find_json_files(): for root, _, filenames in os.walk('.'): if any( d in root for d in ['/WIP', '/.terraform', '/target'] ): continue for f in filenam...
<commit_before>#!/usr/bin/env python # -*- encoding: utf-8 -*- import json import os import subprocess import sys def find_json_files(): for root, _, filenames in os.walk('.'): if any( d in root for d in ['/WIP', '/.terraform', '/target'] ): continue f...
0b5cc3f4702081eb565ef83c3175efc4e8b30e75
circuits/node/node.py
circuits/node/node.py
# Module: node # Date: ... # Author: ... """Node ... """ from .client import Client from .server import Server from circuits import handler, BaseComponent class Node(BaseComponent): """Node ... """ channel = "node" def __init__(self, bind=None, channel=channel, **kwargs): su...
# Module: node # Date: ... # Author: ... """Node ... """ from .client import Client from .server import Server from circuits import handler, BaseComponent class Node(BaseComponent): """Node ... """ channel = "node" def __init__(self, bind=None, channel=channel, **kwargs): su...
Fix channel definition in add method
Fix channel definition in add method
Python
mit
eriol/circuits,eriol/circuits,treemo/circuits,nizox/circuits,eriol/circuits,treemo/circuits,treemo/circuits
# Module: node # Date: ... # Author: ... """Node ... """ from .client import Client from .server import Server from circuits import handler, BaseComponent class Node(BaseComponent): """Node ... """ channel = "node" def __init__(self, bind=None, channel=channel, **kwargs): su...
# Module: node # Date: ... # Author: ... """Node ... """ from .client import Client from .server import Server from circuits import handler, BaseComponent class Node(BaseComponent): """Node ... """ channel = "node" def __init__(self, bind=None, channel=channel, **kwargs): su...
<commit_before># Module: node # Date: ... # Author: ... """Node ... """ from .client import Client from .server import Server from circuits import handler, BaseComponent class Node(BaseComponent): """Node ... """ channel = "node" def __init__(self, bind=None, channel=channel, **kwar...
# Module: node # Date: ... # Author: ... """Node ... """ from .client import Client from .server import Server from circuits import handler, BaseComponent class Node(BaseComponent): """Node ... """ channel = "node" def __init__(self, bind=None, channel=channel, **kwargs): su...
# Module: node # Date: ... # Author: ... """Node ... """ from .client import Client from .server import Server from circuits import handler, BaseComponent class Node(BaseComponent): """Node ... """ channel = "node" def __init__(self, bind=None, channel=channel, **kwargs): su...
<commit_before># Module: node # Date: ... # Author: ... """Node ... """ from .client import Client from .server import Server from circuits import handler, BaseComponent class Node(BaseComponent): """Node ... """ channel = "node" def __init__(self, bind=None, channel=channel, **kwar...
3234d929d22d7504d89753ce6351d0efe1bfa8ac
whitepy/lexer.py
whitepy/lexer.py
from .lexerconstants import * from .ws_token import Tokeniser class Lexer(object): def __init__(self, line): self.line = line self.pos = 0 self.tokens = [] def _get_int(self): token = Tokeniser() if self.line[-1] == '\n': const = 'INT' token.sca...
from .lexerconstants import * from .ws_token import Tokeniser class IntError(ValueError): '''Exception when invalid integer is found''' class Lexer(object): def __init__(self, line): self.line = line self.pos = 0 self.tokens = [] def _get_int(self): token = Tokeniser() ...
Add Execption for invalid Integer
Add Execption for invalid Integer Exception class created for invalid integer and raise it if a bad integer is found
Python
apache-2.0
yasn77/whitepy
from .lexerconstants import * from .ws_token import Tokeniser class Lexer(object): def __init__(self, line): self.line = line self.pos = 0 self.tokens = [] def _get_int(self): token = Tokeniser() if self.line[-1] == '\n': const = 'INT' token.sca...
from .lexerconstants import * from .ws_token import Tokeniser class IntError(ValueError): '''Exception when invalid integer is found''' class Lexer(object): def __init__(self, line): self.line = line self.pos = 0 self.tokens = [] def _get_int(self): token = Tokeniser() ...
<commit_before>from .lexerconstants import * from .ws_token import Tokeniser class Lexer(object): def __init__(self, line): self.line = line self.pos = 0 self.tokens = [] def _get_int(self): token = Tokeniser() if self.line[-1] == '\n': const = 'INT' ...
from .lexerconstants import * from .ws_token import Tokeniser class IntError(ValueError): '''Exception when invalid integer is found''' class Lexer(object): def __init__(self, line): self.line = line self.pos = 0 self.tokens = [] def _get_int(self): token = Tokeniser() ...
from .lexerconstants import * from .ws_token import Tokeniser class Lexer(object): def __init__(self, line): self.line = line self.pos = 0 self.tokens = [] def _get_int(self): token = Tokeniser() if self.line[-1] == '\n': const = 'INT' token.sca...
<commit_before>from .lexerconstants import * from .ws_token import Tokeniser class Lexer(object): def __init__(self, line): self.line = line self.pos = 0 self.tokens = [] def _get_int(self): token = Tokeniser() if self.line[-1] == '\n': const = 'INT' ...
9d0ea4eaf8269350fabc3415545bebf4da4137a7
source/segue/backend/processor/background.py
source/segue/backend/processor/background.py
# :coding: utf-8 # :copyright: Copyright (c) 2013 Martin Pengelly-Phillips # :license: See LICENSE.txt. import multiprocessing from .base import Processor class BackgroundProcessor(Processor): '''Local background processor.''' def process(self, command, args=None, kw=None): '''Process *command*...
# :coding: utf-8 # :copyright: Copyright (c) 2013 Martin Pengelly-Phillips # :license: See LICENSE.txt. import multiprocessing from .base import Processor class BackgroundProcessor(Processor): '''Local background processor.''' def process(self, command, args=None, kw=None): '''Process *command*...
Fix passing invalid None to multiprocessing Process class.
Fix passing invalid None to multiprocessing Process class.
Python
apache-2.0
4degrees/segue
# :coding: utf-8 # :copyright: Copyright (c) 2013 Martin Pengelly-Phillips # :license: See LICENSE.txt. import multiprocessing from .base import Processor class BackgroundProcessor(Processor): '''Local background processor.''' def process(self, command, args=None, kw=None): '''Process *command*...
# :coding: utf-8 # :copyright: Copyright (c) 2013 Martin Pengelly-Phillips # :license: See LICENSE.txt. import multiprocessing from .base import Processor class BackgroundProcessor(Processor): '''Local background processor.''' def process(self, command, args=None, kw=None): '''Process *command*...
<commit_before># :coding: utf-8 # :copyright: Copyright (c) 2013 Martin Pengelly-Phillips # :license: See LICENSE.txt. import multiprocessing from .base import Processor class BackgroundProcessor(Processor): '''Local background processor.''' def process(self, command, args=None, kw=None): '''Pr...
# :coding: utf-8 # :copyright: Copyright (c) 2013 Martin Pengelly-Phillips # :license: See LICENSE.txt. import multiprocessing from .base import Processor class BackgroundProcessor(Processor): '''Local background processor.''' def process(self, command, args=None, kw=None): '''Process *command*...
# :coding: utf-8 # :copyright: Copyright (c) 2013 Martin Pengelly-Phillips # :license: See LICENSE.txt. import multiprocessing from .base import Processor class BackgroundProcessor(Processor): '''Local background processor.''' def process(self, command, args=None, kw=None): '''Process *command*...
<commit_before># :coding: utf-8 # :copyright: Copyright (c) 2013 Martin Pengelly-Phillips # :license: See LICENSE.txt. import multiprocessing from .base import Processor class BackgroundProcessor(Processor): '''Local background processor.''' def process(self, command, args=None, kw=None): '''Pr...
34334bdb85644a5553ba36af5dc98942ea5fbf21
launch_control/__init__.py
launch_control/__init__.py
# This file is part of the ARM Validation Dashboard Project. # for the Linaro organization (http://linaro.org/) # # For more details see: # https://blueprints.launchpad.net/ubuntu/+spec/arm-m-validation-dashboard __version__ = "0.0.1"
# This file is part of the ARM Validation Dashboard Project. # for the Linaro organization (http://linaro.org/) # # For more details see: # https://blueprints.launchpad.net/ubuntu/+spec/arm-m-validation-dashboard """ Public API for Launch Control. Please see one of the available packages for more information. """ ...
Add docstring to launch_control package
Add docstring to launch_control package
Python
agpl-3.0
Linaro/lava-server,Linaro/lava-server,OSSystems/lava-server,OSSystems/lava-server,Linaro/lava-server,Linaro/lava-server,OSSystems/lava-server
# This file is part of the ARM Validation Dashboard Project. # for the Linaro organization (http://linaro.org/) # # For more details see: # https://blueprints.launchpad.net/ubuntu/+spec/arm-m-validation-dashboard __version__ = "0.0.1" Add docstring to launch_control package
# This file is part of the ARM Validation Dashboard Project. # for the Linaro organization (http://linaro.org/) # # For more details see: # https://blueprints.launchpad.net/ubuntu/+spec/arm-m-validation-dashboard """ Public API for Launch Control. Please see one of the available packages for more information. """ ...
<commit_before># This file is part of the ARM Validation Dashboard Project. # for the Linaro organization (http://linaro.org/) # # For more details see: # https://blueprints.launchpad.net/ubuntu/+spec/arm-m-validation-dashboard __version__ = "0.0.1" <commit_msg>Add docstring to launch_control package<commit_after>
# This file is part of the ARM Validation Dashboard Project. # for the Linaro organization (http://linaro.org/) # # For more details see: # https://blueprints.launchpad.net/ubuntu/+spec/arm-m-validation-dashboard """ Public API for Launch Control. Please see one of the available packages for more information. """ ...
# This file is part of the ARM Validation Dashboard Project. # for the Linaro organization (http://linaro.org/) # # For more details see: # https://blueprints.launchpad.net/ubuntu/+spec/arm-m-validation-dashboard __version__ = "0.0.1" Add docstring to launch_control package# This file is part of the ARM Validation ...
<commit_before># This file is part of the ARM Validation Dashboard Project. # for the Linaro organization (http://linaro.org/) # # For more details see: # https://blueprints.launchpad.net/ubuntu/+spec/arm-m-validation-dashboard __version__ = "0.0.1" <commit_msg>Add docstring to launch_control package<commit_after>#...
cb1af2160952c7065e236d2cd544f46e5b252e92
account_partner_account_summary/__openerp__.py
account_partner_account_summary/__openerp__.py
# -*- coding: utf-8 -*- { 'name': 'Partner Account Summary', 'version': '1.0', 'description': """Partner Account Summary""", 'category': 'Aeroo Reporting', 'author': 'Ingenieria ADHOC', 'website': 'www.ingadhoc.com', 'depends': [ 'sale', 'report_aeroo', ], 'data':...
# -*- coding: utf-8 -*- { 'name': 'Partner Account Summary', 'version': '1.0', 'description': """Partner Account Summary""", 'category': 'Aeroo Reporting', 'author': 'Ingenieria ADHOC', 'website': 'www.ingadhoc.com', 'depends': [ 'sale', 'report_aeroo', 'l10n_ar_invoi...
ADD dependency of l10n_ar_invoice for account summary
ADD dependency of l10n_ar_invoice for account summary
Python
agpl-3.0
maljac/odoo-addons,adhoc-dev/odoo-addons,syci/ingadhoc-odoo-addons,dvitme/odoo-addons,ingadhoc/account-payment,jorsea/odoo-addons,ingadhoc/stock,jorsea/odoo-addons,ingadhoc/account-financial-tools,sysadminmatmoz/ingadhoc,levkar/odoo-addons,syci/ingadhoc-odoo-addons,ingadhoc/partner,ingadhoc/product,ClearCorp/account-fi...
# -*- coding: utf-8 -*- { 'name': 'Partner Account Summary', 'version': '1.0', 'description': """Partner Account Summary""", 'category': 'Aeroo Reporting', 'author': 'Ingenieria ADHOC', 'website': 'www.ingadhoc.com', 'depends': [ 'sale', 'report_aeroo', ], 'data':...
# -*- coding: utf-8 -*- { 'name': 'Partner Account Summary', 'version': '1.0', 'description': """Partner Account Summary""", 'category': 'Aeroo Reporting', 'author': 'Ingenieria ADHOC', 'website': 'www.ingadhoc.com', 'depends': [ 'sale', 'report_aeroo', 'l10n_ar_invoi...
<commit_before># -*- coding: utf-8 -*- { 'name': 'Partner Account Summary', 'version': '1.0', 'description': """Partner Account Summary""", 'category': 'Aeroo Reporting', 'author': 'Ingenieria ADHOC', 'website': 'www.ingadhoc.com', 'depends': [ 'sale', 'report_aeroo', ...
# -*- coding: utf-8 -*- { 'name': 'Partner Account Summary', 'version': '1.0', 'description': """Partner Account Summary""", 'category': 'Aeroo Reporting', 'author': 'Ingenieria ADHOC', 'website': 'www.ingadhoc.com', 'depends': [ 'sale', 'report_aeroo', 'l10n_ar_invoi...
# -*- coding: utf-8 -*- { 'name': 'Partner Account Summary', 'version': '1.0', 'description': """Partner Account Summary""", 'category': 'Aeroo Reporting', 'author': 'Ingenieria ADHOC', 'website': 'www.ingadhoc.com', 'depends': [ 'sale', 'report_aeroo', ], 'data':...
<commit_before># -*- coding: utf-8 -*- { 'name': 'Partner Account Summary', 'version': '1.0', 'description': """Partner Account Summary""", 'category': 'Aeroo Reporting', 'author': 'Ingenieria ADHOC', 'website': 'www.ingadhoc.com', 'depends': [ 'sale', 'report_aeroo', ...
517d25cf79c4d04661309ab7b3ab0638a2f968ee
api/docbleach/utils/__init__.py
api/docbleach/utils/__init__.py
import os import random import string def secure_uuid(): """ Strength: 6*3 random characters from a list of 62, approx. 64^18 possible strings, or 2^100. Should be enough to prevent a successful bruteforce, as download links are only valid for 3 hours :return: """ return id_generator() + "...
import os import string from random import SystemRandom cryptogen = SystemRandom() def secure_uuid(): """ Strength: 6*3 random characters from a list of 62, approx. 64^18 possible strings, or 2^100. Should be enough to prevent a successful bruteforce, as download links are only valid for 3 hours ...
Use SystemRandom to generate security-viable randomness
Use SystemRandom to generate security-viable randomness
Python
mit
docbleach/DocBleach-Web,docbleach/DocBleach-Web,docbleach/DocBleach-Web,docbleach/DocBleach-Web
import os import random import string def secure_uuid(): """ Strength: 6*3 random characters from a list of 62, approx. 64^18 possible strings, or 2^100. Should be enough to prevent a successful bruteforce, as download links are only valid for 3 hours :return: """ return id_generator() + "...
import os import string from random import SystemRandom cryptogen = SystemRandom() def secure_uuid(): """ Strength: 6*3 random characters from a list of 62, approx. 64^18 possible strings, or 2^100. Should be enough to prevent a successful bruteforce, as download links are only valid for 3 hours ...
<commit_before>import os import random import string def secure_uuid(): """ Strength: 6*3 random characters from a list of 62, approx. 64^18 possible strings, or 2^100. Should be enough to prevent a successful bruteforce, as download links are only valid for 3 hours :return: """ return id_...
import os import string from random import SystemRandom cryptogen = SystemRandom() def secure_uuid(): """ Strength: 6*3 random characters from a list of 62, approx. 64^18 possible strings, or 2^100. Should be enough to prevent a successful bruteforce, as download links are only valid for 3 hours ...
import os import random import string def secure_uuid(): """ Strength: 6*3 random characters from a list of 62, approx. 64^18 possible strings, or 2^100. Should be enough to prevent a successful bruteforce, as download links are only valid for 3 hours :return: """ return id_generator() + "...
<commit_before>import os import random import string def secure_uuid(): """ Strength: 6*3 random characters from a list of 62, approx. 64^18 possible strings, or 2^100. Should be enough to prevent a successful bruteforce, as download links are only valid for 3 hours :return: """ return id_...
a4df3f966e232e8327522a3db32870f5dcea0c03
cartridge/shop/middleware.py
cartridge/shop/middleware.py
from mezzanine.conf import settings from cartridge.shop.models import Cart class ShopMiddleware(object): def __init__(self): old = ("SHOP_SSL_ENABLED", "SHOP_FORCE_HOST", "SHOP_FORCE_SSL_VIEWS") for name in old: try: getattr(settings, name) except Attribu...
from mezzanine.conf import settings from cartridge.shop.models import Cart class SSLRedirect(object): def __init__(self): old = ("SHOP_SSL_ENABLED", "SHOP_FORCE_HOST", "SHOP_FORCE_SSL_VIEWS") for name in old: try: getattr(settings, name) except AttributeE...
Add deprecated fallback for SSLMiddleware.
Add deprecated fallback for SSLMiddleware.
Python
bsd-2-clause
traxxas/cartridge,traxxas/cartridge,Parisson/cartridge,Kniyl/cartridge,syaiful6/cartridge,jaywink/cartridge-reservable,wbtuomela/cartridge,syaiful6/cartridge,ryneeverett/cartridge,wbtuomela/cartridge,dsanders11/cartridge,wbtuomela/cartridge,dsanders11/cartridge,wyzex/cartridge,jaywink/cartridge-reservable,Parisson/cart...
from mezzanine.conf import settings from cartridge.shop.models import Cart class ShopMiddleware(object): def __init__(self): old = ("SHOP_SSL_ENABLED", "SHOP_FORCE_HOST", "SHOP_FORCE_SSL_VIEWS") for name in old: try: getattr(settings, name) except Attribu...
from mezzanine.conf import settings from cartridge.shop.models import Cart class SSLRedirect(object): def __init__(self): old = ("SHOP_SSL_ENABLED", "SHOP_FORCE_HOST", "SHOP_FORCE_SSL_VIEWS") for name in old: try: getattr(settings, name) except AttributeE...
<commit_before> from mezzanine.conf import settings from cartridge.shop.models import Cart class ShopMiddleware(object): def __init__(self): old = ("SHOP_SSL_ENABLED", "SHOP_FORCE_HOST", "SHOP_FORCE_SSL_VIEWS") for name in old: try: getattr(settings, name) ...
from mezzanine.conf import settings from cartridge.shop.models import Cart class SSLRedirect(object): def __init__(self): old = ("SHOP_SSL_ENABLED", "SHOP_FORCE_HOST", "SHOP_FORCE_SSL_VIEWS") for name in old: try: getattr(settings, name) except AttributeE...
from mezzanine.conf import settings from cartridge.shop.models import Cart class ShopMiddleware(object): def __init__(self): old = ("SHOP_SSL_ENABLED", "SHOP_FORCE_HOST", "SHOP_FORCE_SSL_VIEWS") for name in old: try: getattr(settings, name) except Attribu...
<commit_before> from mezzanine.conf import settings from cartridge.shop.models import Cart class ShopMiddleware(object): def __init__(self): old = ("SHOP_SSL_ENABLED", "SHOP_FORCE_HOST", "SHOP_FORCE_SSL_VIEWS") for name in old: try: getattr(settings, name) ...
fdf014fb0602cbba476b0e35d451f43e86be7cdc
django_project/core/settings/test_travis.py
django_project/core/settings/test_travis.py
# -*- coding: utf-8 -*- from .test import * # noqa DATABASES = { 'default': { 'ENGINE': 'django.contrib.gis.db.backends.postgis', 'NAME': 'gis', 'USER': 'postgres', 'PASSWORD': '', 'HOST': 'localhost', # Set to empty string for default. 'PORT': '', } }
# -*- coding: utf-8 -*- from .test import * # noqa DATABASES = { 'default': { 'ENGINE': 'django.contrib.gis.db.backends.postgis', 'NAME': 'test_db', 'USER': 'postgres', 'PASSWORD': '', 'HOST': 'localhost', # Set to empty string for default. 'PORT': '', }...
Fix wrong db name for travis.
Fix wrong db name for travis.
Python
bsd-2-clause
AIFDR/inasafe-django,timlinux/inasafe-django,timlinux/inasafe-django,AIFDR/inasafe-django,AIFDR/inasafe-django,timlinux/inasafe-django,AIFDR/inasafe-django,timlinux/inasafe-django
# -*- coding: utf-8 -*- from .test import * # noqa DATABASES = { 'default': { 'ENGINE': 'django.contrib.gis.db.backends.postgis', 'NAME': 'gis', 'USER': 'postgres', 'PASSWORD': '', 'HOST': 'localhost', # Set to empty string for default. 'PORT': '', } } F...
# -*- coding: utf-8 -*- from .test import * # noqa DATABASES = { 'default': { 'ENGINE': 'django.contrib.gis.db.backends.postgis', 'NAME': 'test_db', 'USER': 'postgres', 'PASSWORD': '', 'HOST': 'localhost', # Set to empty string for default. 'PORT': '', }...
<commit_before># -*- coding: utf-8 -*- from .test import * # noqa DATABASES = { 'default': { 'ENGINE': 'django.contrib.gis.db.backends.postgis', 'NAME': 'gis', 'USER': 'postgres', 'PASSWORD': '', 'HOST': 'localhost', # Set to empty string for default. 'PORT'...
# -*- coding: utf-8 -*- from .test import * # noqa DATABASES = { 'default': { 'ENGINE': 'django.contrib.gis.db.backends.postgis', 'NAME': 'test_db', 'USER': 'postgres', 'PASSWORD': '', 'HOST': 'localhost', # Set to empty string for default. 'PORT': '', }...
# -*- coding: utf-8 -*- from .test import * # noqa DATABASES = { 'default': { 'ENGINE': 'django.contrib.gis.db.backends.postgis', 'NAME': 'gis', 'USER': 'postgres', 'PASSWORD': '', 'HOST': 'localhost', # Set to empty string for default. 'PORT': '', } } F...
<commit_before># -*- coding: utf-8 -*- from .test import * # noqa DATABASES = { 'default': { 'ENGINE': 'django.contrib.gis.db.backends.postgis', 'NAME': 'gis', 'USER': 'postgres', 'PASSWORD': '', 'HOST': 'localhost', # Set to empty string for default. 'PORT'...
d7624defd7d05e721aeb0ccd074c7172c51295bf
nvchecker_source/git.py
nvchecker_source/git.py
# MIT licensed # Copyright (c) 2020 Felix Yan <felixonmars@archlinux.org>, et al. import re from nvchecker_source.cmd import run_cmd async def get_version( name, conf, *, cache, keymanager=None ): git = conf['git'] cmd = f"git ls-remote -t --refs {git}" data = await cache.get(cmd, run_cmd) regex = "(?<=refs...
# MIT licensed # Copyright (c) 2020 Felix Yan <felixonmars@archlinux.org>, et al. import re from .cmd import run_cmd # type: ignore async def get_version( name, conf, *, cache, keymanager=None ): git = conf['git'] cmd = f"git ls-remote -t --refs {git}" data = await cache.get(cmd, run_cmd) regex = "(?<=refs/...
Fix mypy and regex flag
Fix mypy and regex flag
Python
mit
lilydjwg/nvchecker
# MIT licensed # Copyright (c) 2020 Felix Yan <felixonmars@archlinux.org>, et al. import re from nvchecker_source.cmd import run_cmd async def get_version( name, conf, *, cache, keymanager=None ): git = conf['git'] cmd = f"git ls-remote -t --refs {git}" data = await cache.get(cmd, run_cmd) regex = "(?<=refs...
# MIT licensed # Copyright (c) 2020 Felix Yan <felixonmars@archlinux.org>, et al. import re from .cmd import run_cmd # type: ignore async def get_version( name, conf, *, cache, keymanager=None ): git = conf['git'] cmd = f"git ls-remote -t --refs {git}" data = await cache.get(cmd, run_cmd) regex = "(?<=refs/...
<commit_before># MIT licensed # Copyright (c) 2020 Felix Yan <felixonmars@archlinux.org>, et al. import re from nvchecker_source.cmd import run_cmd async def get_version( name, conf, *, cache, keymanager=None ): git = conf['git'] cmd = f"git ls-remote -t --refs {git}" data = await cache.get(cmd, run_cmd) re...
# MIT licensed # Copyright (c) 2020 Felix Yan <felixonmars@archlinux.org>, et al. import re from .cmd import run_cmd # type: ignore async def get_version( name, conf, *, cache, keymanager=None ): git = conf['git'] cmd = f"git ls-remote -t --refs {git}" data = await cache.get(cmd, run_cmd) regex = "(?<=refs/...
# MIT licensed # Copyright (c) 2020 Felix Yan <felixonmars@archlinux.org>, et al. import re from nvchecker_source.cmd import run_cmd async def get_version( name, conf, *, cache, keymanager=None ): git = conf['git'] cmd = f"git ls-remote -t --refs {git}" data = await cache.get(cmd, run_cmd) regex = "(?<=refs...
<commit_before># MIT licensed # Copyright (c) 2020 Felix Yan <felixonmars@archlinux.org>, et al. import re from nvchecker_source.cmd import run_cmd async def get_version( name, conf, *, cache, keymanager=None ): git = conf['git'] cmd = f"git ls-remote -t --refs {git}" data = await cache.get(cmd, run_cmd) re...
36e5af74e6ecaba4cea4bfcd2c1ef997d1e15eb0
openstack/tests/functional/telemetry/v2/test_meter.py
openstack/tests/functional/telemetry/v2/test_meter.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...
Make sure there is data for the meter test
Make sure there is data for the meter test The meter tests relies on someone else creating a meter. If this test happens to run on a brand new system and it runs before the object store tests, it may fail. For some object store activity before the test. Change-Id: Ie9b7775bad4550842bfdaebd893eb8293590b7ff
Python
apache-2.0
openstack/python-openstacksdk,dtroyer/python-openstacksdk,openstack/python-openstacksdk,dudymas/python-openstacksdk,dtroyer/python-openstacksdk,stackforge/python-openstacksdk,briancurtin/python-openstacksdk,stackforge/python-openstacksdk,dudymas/python-openstacksdk,briancurtin/python-openstacksdk
# 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...
47f495e7e5b8fa06991e0c263bc9239818dd5b4f
airpy/list.py
airpy/list.py
import os import airpy def airlist(): installed_docs = os.listdir(airpy.data_directory) for dir in installed_docs: print(dir, end= ' ') print(end = '\n')
from __future__ import print_function import os import airpy def airlist(): installed_docs = os.listdir(airpy.data_directory) for dir in installed_docs: print(dir, end= ' ') print(end = '\n')
Add a Backwards compatibility for python 2.7 by adding a __future__ import
Add a Backwards compatibility for python 2.7 by adding a __future__ import
Python
mit
kevinaloys/airpy
import os import airpy def airlist(): installed_docs = os.listdir(airpy.data_directory) for dir in installed_docs: print(dir, end= ' ') print(end = '\n')Add a Backwards compatibility for python 2.7 by adding a __future__ import
from __future__ import print_function import os import airpy def airlist(): installed_docs = os.listdir(airpy.data_directory) for dir in installed_docs: print(dir, end= ' ') print(end = '\n')
<commit_before>import os import airpy def airlist(): installed_docs = os.listdir(airpy.data_directory) for dir in installed_docs: print(dir, end= ' ') print(end = '\n')<commit_msg>Add a Backwards compatibility for python 2.7 by adding a __future__ import<commit_after>
from __future__ import print_function import os import airpy def airlist(): installed_docs = os.listdir(airpy.data_directory) for dir in installed_docs: print(dir, end= ' ') print(end = '\n')
import os import airpy def airlist(): installed_docs = os.listdir(airpy.data_directory) for dir in installed_docs: print(dir, end= ' ') print(end = '\n')Add a Backwards compatibility for python 2.7 by adding a __future__ importfrom __future__ import print_function import os import airpy def airlist(): installed...
<commit_before>import os import airpy def airlist(): installed_docs = os.listdir(airpy.data_directory) for dir in installed_docs: print(dir, end= ' ') print(end = '\n')<commit_msg>Add a Backwards compatibility for python 2.7 by adding a __future__ import<commit_after>from __future__ import print_function import o...
6656493c3bf9b24d67c6de8cb33a1ca3defa4db8
code/python/yum-check-update.py
code/python/yum-check-update.py
#!/usr/bin/python import json import subprocess process = subprocess.Popen(["yum", "check-update", "-q"], stdout=subprocess.PIPE) (output, err) = process.communicate() exit_code = process.wait() if exit_code == 0 and output == "": print "Up to date" else: print json.dumps({"exit_code": exit_code, "raw...
#!/usr/bin/python import json import subprocess process = subprocess.Popen(["yum", "check-update", "-q"], stdout=subprocess.PIPE) (output, err) = process.communicate() exit_code = process.wait() if exit_code == 0 and output == "": print json.dumps({"exit_code": exit_code, "raw": "Up to date"}) else: p...
Make output types consistent for policy creation purposes
Make output types consistent for policy creation purposes
Python
mit
ScriptRock/content,ScriptRock/content,ScriptRock/content,ScriptRock/content,ScriptRock/content,ScriptRock/content
#!/usr/bin/python import json import subprocess process = subprocess.Popen(["yum", "check-update", "-q"], stdout=subprocess.PIPE) (output, err) = process.communicate() exit_code = process.wait() if exit_code == 0 and output == "": print "Up to date" else: print json.dumps({"exit_code": exit_code, "raw...
#!/usr/bin/python import json import subprocess process = subprocess.Popen(["yum", "check-update", "-q"], stdout=subprocess.PIPE) (output, err) = process.communicate() exit_code = process.wait() if exit_code == 0 and output == "": print json.dumps({"exit_code": exit_code, "raw": "Up to date"}) else: p...
<commit_before>#!/usr/bin/python import json import subprocess process = subprocess.Popen(["yum", "check-update", "-q"], stdout=subprocess.PIPE) (output, err) = process.communicate() exit_code = process.wait() if exit_code == 0 and output == "": print "Up to date" else: print json.dumps({"exit_code": ...
#!/usr/bin/python import json import subprocess process = subprocess.Popen(["yum", "check-update", "-q"], stdout=subprocess.PIPE) (output, err) = process.communicate() exit_code = process.wait() if exit_code == 0 and output == "": print json.dumps({"exit_code": exit_code, "raw": "Up to date"}) else: p...
#!/usr/bin/python import json import subprocess process = subprocess.Popen(["yum", "check-update", "-q"], stdout=subprocess.PIPE) (output, err) = process.communicate() exit_code = process.wait() if exit_code == 0 and output == "": print "Up to date" else: print json.dumps({"exit_code": exit_code, "raw...
<commit_before>#!/usr/bin/python import json import subprocess process = subprocess.Popen(["yum", "check-update", "-q"], stdout=subprocess.PIPE) (output, err) = process.communicate() exit_code = process.wait() if exit_code == 0 and output == "": print "Up to date" else: print json.dumps({"exit_code": ...
68b0f560322884967b817ad87cef8c1db9600dbd
app/main/errors.py
app/main/errors.py
from flask import render_template from app.main import main @main.app_errorhandler(400) def page_not_found(e): return _render_error_page(500) @main.app_errorhandler(404) def page_not_found(e): return _render_error_page(404) @main.app_errorhandler(500) def exception(e): return _render_error_page(500) ...
from flask import render_template from app.main import main @main.app_errorhandler(400) def page_not_found(e): print(e.message) return _render_error_page(500) @main.app_errorhandler(404) def page_not_found(e): print(e.message) return _render_error_page(404) @main.app_errorhandler(500) def exceptio...
Add print statements for all error types
Add print statements for all error types
Python
mit
alphagov/notify-frontend,alphagov/notify-frontend,alphagov/notify-frontend,alphagov/notify-frontend
from flask import render_template from app.main import main @main.app_errorhandler(400) def page_not_found(e): return _render_error_page(500) @main.app_errorhandler(404) def page_not_found(e): return _render_error_page(404) @main.app_errorhandler(500) def exception(e): return _render_error_page(500) ...
from flask import render_template from app.main import main @main.app_errorhandler(400) def page_not_found(e): print(e.message) return _render_error_page(500) @main.app_errorhandler(404) def page_not_found(e): print(e.message) return _render_error_page(404) @main.app_errorhandler(500) def exceptio...
<commit_before>from flask import render_template from app.main import main @main.app_errorhandler(400) def page_not_found(e): return _render_error_page(500) @main.app_errorhandler(404) def page_not_found(e): return _render_error_page(404) @main.app_errorhandler(500) def exception(e): return _render_er...
from flask import render_template from app.main import main @main.app_errorhandler(400) def page_not_found(e): print(e.message) return _render_error_page(500) @main.app_errorhandler(404) def page_not_found(e): print(e.message) return _render_error_page(404) @main.app_errorhandler(500) def exceptio...
from flask import render_template from app.main import main @main.app_errorhandler(400) def page_not_found(e): return _render_error_page(500) @main.app_errorhandler(404) def page_not_found(e): return _render_error_page(404) @main.app_errorhandler(500) def exception(e): return _render_error_page(500) ...
<commit_before>from flask import render_template from app.main import main @main.app_errorhandler(400) def page_not_found(e): return _render_error_page(500) @main.app_errorhandler(404) def page_not_found(e): return _render_error_page(404) @main.app_errorhandler(500) def exception(e): return _render_er...
0e60863d43a5b230839191743f72818763eeee71
buildPy2app.py
buildPy2app.py
""" This is a setup.py script generated by py2applet Usage: python setup.py py2app """ from setuptools import setup from glob import glob import syncplay APP = ['syncplayClient.py'] DATA_FILES = [ ('resources', glob('resources/*.png') + glob('resources/*.rtf') + glob('resources/*.lua')), ] OPTIONS = { 'icon...
""" This is a setup.py script generated by py2applet Usage: python setup.py py2app """ from setuptools import setup from glob import glob import syncplay APP = ['syncplayClient.py'] DATA_FILES = [ ('resources', glob('resources/*.png') + glob('resources/*.rtf') + glob('resources/*.lua')), ] OPTIONS = { 'icon...
Update py2app script for Qt 5.11
Update py2app script for Qt 5.11
Python
apache-2.0
Syncplay/syncplay,NeverDecaf/syncplay,NeverDecaf/syncplay,alby128/syncplay,Syncplay/syncplay,alby128/syncplay
""" This is a setup.py script generated by py2applet Usage: python setup.py py2app """ from setuptools import setup from glob import glob import syncplay APP = ['syncplayClient.py'] DATA_FILES = [ ('resources', glob('resources/*.png') + glob('resources/*.rtf') + glob('resources/*.lua')), ] OPTIONS = { 'icon...
""" This is a setup.py script generated by py2applet Usage: python setup.py py2app """ from setuptools import setup from glob import glob import syncplay APP = ['syncplayClient.py'] DATA_FILES = [ ('resources', glob('resources/*.png') + glob('resources/*.rtf') + glob('resources/*.lua')), ] OPTIONS = { 'icon...
<commit_before>""" This is a setup.py script generated by py2applet Usage: python setup.py py2app """ from setuptools import setup from glob import glob import syncplay APP = ['syncplayClient.py'] DATA_FILES = [ ('resources', glob('resources/*.png') + glob('resources/*.rtf') + glob('resources/*.lua')), ] OPT...
""" This is a setup.py script generated by py2applet Usage: python setup.py py2app """ from setuptools import setup from glob import glob import syncplay APP = ['syncplayClient.py'] DATA_FILES = [ ('resources', glob('resources/*.png') + glob('resources/*.rtf') + glob('resources/*.lua')), ] OPTIONS = { 'icon...
""" This is a setup.py script generated by py2applet Usage: python setup.py py2app """ from setuptools import setup from glob import glob import syncplay APP = ['syncplayClient.py'] DATA_FILES = [ ('resources', glob('resources/*.png') + glob('resources/*.rtf') + glob('resources/*.lua')), ] OPTIONS = { 'icon...
<commit_before>""" This is a setup.py script generated by py2applet Usage: python setup.py py2app """ from setuptools import setup from glob import glob import syncplay APP = ['syncplayClient.py'] DATA_FILES = [ ('resources', glob('resources/*.png') + glob('resources/*.rtf') + glob('resources/*.lua')), ] OPT...
326f0b881d36ed19d0a37495ae34fc24fc1eb707
connect_ffi.py
connect_ffi.py
from cffi import FFI ffi = FFI() print "Loading Spotify library..." #TODO: Use absolute paths for open() and stuff #Header generated with cpp spotify.h > spotify.processed.h && sed -i 's/__extension__//g' spotify.processed.h with open("spotify.processed.h") as file: header = file.read() ffi.cdef(header) ffi.cdef(...
from cffi import FFI ffi = FFI() print "Loading Spotify library..." #TODO: Use absolute paths for open() and stuff #Header generated with cpp spotify.h > spotify.processed.h && sed -i 's/__extension__//g' spotify.processed.h with open(os.path.join(sys.path[0], "spotify.processed.h")) as file: header = file.read() ...
Load the spotify header file from an absolute path
Load the spotify header file from an absolute path
Python
mit
Fornoth/spotify-connect-web,Fornoth/spotify-connect-web,Fornoth/spotify-connect-web,Fornoth/spotify-connect-web,Fornoth/spotify-connect-web
from cffi import FFI ffi = FFI() print "Loading Spotify library..." #TODO: Use absolute paths for open() and stuff #Header generated with cpp spotify.h > spotify.processed.h && sed -i 's/__extension__//g' spotify.processed.h with open("spotify.processed.h") as file: header = file.read() ffi.cdef(header) ffi.cdef(...
from cffi import FFI ffi = FFI() print "Loading Spotify library..." #TODO: Use absolute paths for open() and stuff #Header generated with cpp spotify.h > spotify.processed.h && sed -i 's/__extension__//g' spotify.processed.h with open(os.path.join(sys.path[0], "spotify.processed.h")) as file: header = file.read() ...
<commit_before>from cffi import FFI ffi = FFI() print "Loading Spotify library..." #TODO: Use absolute paths for open() and stuff #Header generated with cpp spotify.h > spotify.processed.h && sed -i 's/__extension__//g' spotify.processed.h with open("spotify.processed.h") as file: header = file.read() ffi.cdef(he...
from cffi import FFI ffi = FFI() print "Loading Spotify library..." #TODO: Use absolute paths for open() and stuff #Header generated with cpp spotify.h > spotify.processed.h && sed -i 's/__extension__//g' spotify.processed.h with open(os.path.join(sys.path[0], "spotify.processed.h")) as file: header = file.read() ...
from cffi import FFI ffi = FFI() print "Loading Spotify library..." #TODO: Use absolute paths for open() and stuff #Header generated with cpp spotify.h > spotify.processed.h && sed -i 's/__extension__//g' spotify.processed.h with open("spotify.processed.h") as file: header = file.read() ffi.cdef(header) ffi.cdef(...
<commit_before>from cffi import FFI ffi = FFI() print "Loading Spotify library..." #TODO: Use absolute paths for open() and stuff #Header generated with cpp spotify.h > spotify.processed.h && sed -i 's/__extension__//g' spotify.processed.h with open("spotify.processed.h") as file: header = file.read() ffi.cdef(he...
1dbb1e0f8751f37271178665a727c4eefc49a88c
partner_firstname/exceptions.py
partner_firstname/exceptions.py
# -*- encoding: utf-8 -*- # Odoo, Open Source Management Solution # Copyright (C) 2014-2015 Grupo ESOC <www.grupoesoc.es> # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by # the Free Software Foundation, either versio...
# -*- encoding: utf-8 -*- # Odoo, Open Source Management Solution # Copyright (C) 2014-2015 Grupo ESOC <www.grupoesoc.es> # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by # the Free Software Foundation, either versio...
Remove subclassing of exception, since there is only one.
Remove subclassing of exception, since there is only one.
Python
agpl-3.0
BT-fgarbely/partner-contact,diagramsoftware/partner-contact,andrius-preimantas/partner-contact,BT-jmichaud/partner-contact,Antiun/partner-contact,Therp/partner-contact,idncom/partner-contact,gurneyalex/partner-contact,Endika/partner-contact,Ehtaga/partner-contact,QANSEE/partner-contact,raycarnes/partner-contact,open-sy...
# -*- encoding: utf-8 -*- # Odoo, Open Source Management Solution # Copyright (C) 2014-2015 Grupo ESOC <www.grupoesoc.es> # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by # the Free Software Foundation, either versio...
# -*- encoding: utf-8 -*- # Odoo, Open Source Management Solution # Copyright (C) 2014-2015 Grupo ESOC <www.grupoesoc.es> # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by # the Free Software Foundation, either versio...
<commit_before># -*- encoding: utf-8 -*- # Odoo, Open Source Management Solution # Copyright (C) 2014-2015 Grupo ESOC <www.grupoesoc.es> # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by # the Free Software Foundation...
# -*- encoding: utf-8 -*- # Odoo, Open Source Management Solution # Copyright (C) 2014-2015 Grupo ESOC <www.grupoesoc.es> # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by # the Free Software Foundation, either versio...
# -*- encoding: utf-8 -*- # Odoo, Open Source Management Solution # Copyright (C) 2014-2015 Grupo ESOC <www.grupoesoc.es> # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by # the Free Software Foundation, either versio...
<commit_before># -*- encoding: utf-8 -*- # Odoo, Open Source Management Solution # Copyright (C) 2014-2015 Grupo ESOC <www.grupoesoc.es> # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by # the Free Software Foundation...
a96cb89524f2fa17a015011d972d396e509a1079
journal.py
journal.py
# -*- coding: utf-8 -*- from flask import Flask import os import psycopg2 from contextlib import closing DB_SCHEMA = """ DROP TABLE IF EXISTS entries; CREATE TABLE entries ( id serial PRIMARY KEY, title VARCHAR (127) NOT NULL, text TEXT NOT NULL, created TIMESTAMP NOT NULL ) """ app = Flask(__name_...
# -*- coding: utf-8 -*- from flask import Flask import os import psycopg2 from contextlib import closing from flask import g DB_SCHEMA = """ DROP TABLE IF EXISTS entries; CREATE TABLE entries ( id serial PRIMARY KEY, title VARCHAR (127) NOT NULL, text TEXT NOT NULL, created TIMESTAMP NOT NULL ) """ ...
Add code for getting and releasing a database connection
Add code for getting and releasing a database connection
Python
mit
rivese/learning_journal,EyuelAbebe/learning_journal,EyuelAbebe/learning_journal
# -*- coding: utf-8 -*- from flask import Flask import os import psycopg2 from contextlib import closing DB_SCHEMA = """ DROP TABLE IF EXISTS entries; CREATE TABLE entries ( id serial PRIMARY KEY, title VARCHAR (127) NOT NULL, text TEXT NOT NULL, created TIMESTAMP NOT NULL ) """ app = Flask(__name_...
# -*- coding: utf-8 -*- from flask import Flask import os import psycopg2 from contextlib import closing from flask import g DB_SCHEMA = """ DROP TABLE IF EXISTS entries; CREATE TABLE entries ( id serial PRIMARY KEY, title VARCHAR (127) NOT NULL, text TEXT NOT NULL, created TIMESTAMP NOT NULL ) """ ...
<commit_before># -*- coding: utf-8 -*- from flask import Flask import os import psycopg2 from contextlib import closing DB_SCHEMA = """ DROP TABLE IF EXISTS entries; CREATE TABLE entries ( id serial PRIMARY KEY, title VARCHAR (127) NOT NULL, text TEXT NOT NULL, created TIMESTAMP NOT NULL ) """ app ...
# -*- coding: utf-8 -*- from flask import Flask import os import psycopg2 from contextlib import closing from flask import g DB_SCHEMA = """ DROP TABLE IF EXISTS entries; CREATE TABLE entries ( id serial PRIMARY KEY, title VARCHAR (127) NOT NULL, text TEXT NOT NULL, created TIMESTAMP NOT NULL ) """ ...
# -*- coding: utf-8 -*- from flask import Flask import os import psycopg2 from contextlib import closing DB_SCHEMA = """ DROP TABLE IF EXISTS entries; CREATE TABLE entries ( id serial PRIMARY KEY, title VARCHAR (127) NOT NULL, text TEXT NOT NULL, created TIMESTAMP NOT NULL ) """ app = Flask(__name_...
<commit_before># -*- coding: utf-8 -*- from flask import Flask import os import psycopg2 from contextlib import closing DB_SCHEMA = """ DROP TABLE IF EXISTS entries; CREATE TABLE entries ( id serial PRIMARY KEY, title VARCHAR (127) NOT NULL, text TEXT NOT NULL, created TIMESTAMP NOT NULL ) """ app ...
69705079398391cdc392b18dcd440fbc3b7404fd
celery_cgi.py
celery_cgi.py
import os import logging from celery import Celery from temp_config.set_environment import DeployEnv runtime_env = DeployEnv() runtime_env.load_deployment_environment() redis_server = os.environ.get('REDIS_HOSTNAME') redis_port = os.environ.get('REDIS_PORT') celery_tasks = [ 'hms_flask.modules.hms_controller', ...
import os import logging from celery import Celery from temp_config.set_environment import DeployEnv runtime_env = DeployEnv() runtime_env.load_deployment_environment() redis_server = os.environ.get('REDIS_HOSTNAME') redis_port = os.environ.get('REDIS_PORT') celery_tasks = [ 'hms_flask.modules.hms_controller', ...
Set celery to ignore results
Set celery to ignore results
Python
unlicense
puruckertom/ubertool_ecorest,puruckertom/ubertool_ecorest,quanted/ubertool_ecorest,quanted/ubertool_ecorest,puruckertom/ubertool_ecorest,quanted/ubertool_ecorest,quanted/ubertool_ecorest,puruckertom/ubertool_ecorest
import os import logging from celery import Celery from temp_config.set_environment import DeployEnv runtime_env = DeployEnv() runtime_env.load_deployment_environment() redis_server = os.environ.get('REDIS_HOSTNAME') redis_port = os.environ.get('REDIS_PORT') celery_tasks = [ 'hms_flask.modules.hms_controller', ...
import os import logging from celery import Celery from temp_config.set_environment import DeployEnv runtime_env = DeployEnv() runtime_env.load_deployment_environment() redis_server = os.environ.get('REDIS_HOSTNAME') redis_port = os.environ.get('REDIS_PORT') celery_tasks = [ 'hms_flask.modules.hms_controller', ...
<commit_before>import os import logging from celery import Celery from temp_config.set_environment import DeployEnv runtime_env = DeployEnv() runtime_env.load_deployment_environment() redis_server = os.environ.get('REDIS_HOSTNAME') redis_port = os.environ.get('REDIS_PORT') celery_tasks = [ 'hms_flask.modules.hms...
import os import logging from celery import Celery from temp_config.set_environment import DeployEnv runtime_env = DeployEnv() runtime_env.load_deployment_environment() redis_server = os.environ.get('REDIS_HOSTNAME') redis_port = os.environ.get('REDIS_PORT') celery_tasks = [ 'hms_flask.modules.hms_controller', ...
import os import logging from celery import Celery from temp_config.set_environment import DeployEnv runtime_env = DeployEnv() runtime_env.load_deployment_environment() redis_server = os.environ.get('REDIS_HOSTNAME') redis_port = os.environ.get('REDIS_PORT') celery_tasks = [ 'hms_flask.modules.hms_controller', ...
<commit_before>import os import logging from celery import Celery from temp_config.set_environment import DeployEnv runtime_env = DeployEnv() runtime_env.load_deployment_environment() redis_server = os.environ.get('REDIS_HOSTNAME') redis_port = os.environ.get('REDIS_PORT') celery_tasks = [ 'hms_flask.modules.hms...
a6ed56b37bba3f5abff73c297a8a20271d73cab2
example/random-agent/random-agent.py
example/random-agent/random-agent.py
#!/usr/bin/env python import argparse import logging import sys import gym import universe # register the universe environments from universe import wrappers logger = logging.getLogger() def main(): parser = argparse.ArgumentParser(description=None) parser.add_argument('-v', '--verbose', action='count', des...
#!/usr/bin/env python import argparse import logging import sys import gym import universe # register the universe environments from universe import wrappers logger = logging.getLogger() def main(): parser = argparse.ArgumentParser(description=None) parser.add_argument('-v', '--verbose', action='count', des...
Add configure call to random_agent
Add configure call to random_agent
Python
mit
openai/universe,rht/universe
#!/usr/bin/env python import argparse import logging import sys import gym import universe # register the universe environments from universe import wrappers logger = logging.getLogger() def main(): parser = argparse.ArgumentParser(description=None) parser.add_argument('-v', '--verbose', action='count', des...
#!/usr/bin/env python import argparse import logging import sys import gym import universe # register the universe environments from universe import wrappers logger = logging.getLogger() def main(): parser = argparse.ArgumentParser(description=None) parser.add_argument('-v', '--verbose', action='count', des...
<commit_before>#!/usr/bin/env python import argparse import logging import sys import gym import universe # register the universe environments from universe import wrappers logger = logging.getLogger() def main(): parser = argparse.ArgumentParser(description=None) parser.add_argument('-v', '--verbose', acti...
#!/usr/bin/env python import argparse import logging import sys import gym import universe # register the universe environments from universe import wrappers logger = logging.getLogger() def main(): parser = argparse.ArgumentParser(description=None) parser.add_argument('-v', '--verbose', action='count', des...
#!/usr/bin/env python import argparse import logging import sys import gym import universe # register the universe environments from universe import wrappers logger = logging.getLogger() def main(): parser = argparse.ArgumentParser(description=None) parser.add_argument('-v', '--verbose', action='count', des...
<commit_before>#!/usr/bin/env python import argparse import logging import sys import gym import universe # register the universe environments from universe import wrappers logger = logging.getLogger() def main(): parser = argparse.ArgumentParser(description=None) parser.add_argument('-v', '--verbose', acti...
ef0d0fa26bfd22c281c54bc348877afd0a7ee9d7
tests/integration/blueprints/metrics/test_metrics.py
tests/integration/blueprints/metrics/test_metrics.py
""" :Copyright: 2006-2020 Jochen Kupperschmidt :License: Modified BSD, see LICENSE for details. """ import pytest # To be overridden by test parametrization @pytest.fixture def config_overrides(): return {} @pytest.fixture def client(admin_app, config_overrides, make_admin_app): app = make_admin_app(**conf...
""" :Copyright: 2006-2020 Jochen Kupperschmidt :License: Modified BSD, see LICENSE for details. """ import re import pytest # To be overridden by test parametrization @pytest.fixture def config_overrides(): return {} @pytest.fixture def client(admin_app, config_overrides, make_admin_app): app = make_admin...
Use regex to match user metrics
Use regex to match user metrics
Python
bsd-3-clause
homeworkprod/byceps,homeworkprod/byceps,homeworkprod/byceps
""" :Copyright: 2006-2020 Jochen Kupperschmidt :License: Modified BSD, see LICENSE for details. """ import pytest # To be overridden by test parametrization @pytest.fixture def config_overrides(): return {} @pytest.fixture def client(admin_app, config_overrides, make_admin_app): app = make_admin_app(**conf...
""" :Copyright: 2006-2020 Jochen Kupperschmidt :License: Modified BSD, see LICENSE for details. """ import re import pytest # To be overridden by test parametrization @pytest.fixture def config_overrides(): return {} @pytest.fixture def client(admin_app, config_overrides, make_admin_app): app = make_admin...
<commit_before>""" :Copyright: 2006-2020 Jochen Kupperschmidt :License: Modified BSD, see LICENSE for details. """ import pytest # To be overridden by test parametrization @pytest.fixture def config_overrides(): return {} @pytest.fixture def client(admin_app, config_overrides, make_admin_app): app = make_a...
""" :Copyright: 2006-2020 Jochen Kupperschmidt :License: Modified BSD, see LICENSE for details. """ import re import pytest # To be overridden by test parametrization @pytest.fixture def config_overrides(): return {} @pytest.fixture def client(admin_app, config_overrides, make_admin_app): app = make_admin...
""" :Copyright: 2006-2020 Jochen Kupperschmidt :License: Modified BSD, see LICENSE for details. """ import pytest # To be overridden by test parametrization @pytest.fixture def config_overrides(): return {} @pytest.fixture def client(admin_app, config_overrides, make_admin_app): app = make_admin_app(**conf...
<commit_before>""" :Copyright: 2006-2020 Jochen Kupperschmidt :License: Modified BSD, see LICENSE for details. """ import pytest # To be overridden by test parametrization @pytest.fixture def config_overrides(): return {} @pytest.fixture def client(admin_app, config_overrides, make_admin_app): app = make_a...
a0fab69d12d64d4e5371fcb26a4ec70365a76fa6
cref/app/web/tasks.py
cref/app/web/tasks.py
from celery import Celery from cref.app.terminal import run_cref app = Celery( 'tasks', backend='db+sqlite:///results.sqlite', broker='amqp://guest@localhost//' ) @app.task def predict_structure(sequence, params={}): return run_cref(sequence)
from celery import Celery from cref.app.terminal import run_cref app = Celery( 'tasks', backend='db+sqlite:///data/results.sqlite', broker='amqp://guest@localhost//' ) @app.task def predict_structure(sequence, params={}): return run_cref(sequence)
Move task results database to data dir
Move task results database to data dir
Python
mit
mchelem/cref2,mchelem/cref2,mchelem/cref2
from celery import Celery from cref.app.terminal import run_cref app = Celery( 'tasks', backend='db+sqlite:///results.sqlite', broker='amqp://guest@localhost//' ) @app.task def predict_structure(sequence, params={}): return run_cref(sequence) Move task results database to data dir
from celery import Celery from cref.app.terminal import run_cref app = Celery( 'tasks', backend='db+sqlite:///data/results.sqlite', broker='amqp://guest@localhost//' ) @app.task def predict_structure(sequence, params={}): return run_cref(sequence)
<commit_before>from celery import Celery from cref.app.terminal import run_cref app = Celery( 'tasks', backend='db+sqlite:///results.sqlite', broker='amqp://guest@localhost//' ) @app.task def predict_structure(sequence, params={}): return run_cref(sequence) <commit_msg>Move task results database to ...
from celery import Celery from cref.app.terminal import run_cref app = Celery( 'tasks', backend='db+sqlite:///data/results.sqlite', broker='amqp://guest@localhost//' ) @app.task def predict_structure(sequence, params={}): return run_cref(sequence)
from celery import Celery from cref.app.terminal import run_cref app = Celery( 'tasks', backend='db+sqlite:///results.sqlite', broker='amqp://guest@localhost//' ) @app.task def predict_structure(sequence, params={}): return run_cref(sequence) Move task results database to data dirfrom celery import ...
<commit_before>from celery import Celery from cref.app.terminal import run_cref app = Celery( 'tasks', backend='db+sqlite:///results.sqlite', broker='amqp://guest@localhost//' ) @app.task def predict_structure(sequence, params={}): return run_cref(sequence) <commit_msg>Move task results database to ...
9011b359bdf164994734f8d6890a2d5acb5fa865
project_euler/solutions/problem_32.py
project_euler/solutions/problem_32.py
from itertools import permutations def solve() -> int: pandigital = [] for permutation in permutations(range(1, 10)): result = int(''.join(str(digit) for digit in permutation[:4])) for i in range(1, 4): left = int(''.join(str(digit) for digit in permutation[4:4 + i])) ...
from itertools import permutations from ..library.base import list_to_number def solve() -> int: pandigital = [] for permutation in permutations(range(1, 10)): result = list_to_number(permutation[:4]) for i in range(1, 4): left = list_to_number(permutation[4:4 + i]) ...
Replace joins with list_to_number in 32
Replace joins with list_to_number in 32
Python
mit
cryvate/project-euler,cryvate/project-euler
from itertools import permutations def solve() -> int: pandigital = [] for permutation in permutations(range(1, 10)): result = int(''.join(str(digit) for digit in permutation[:4])) for i in range(1, 4): left = int(''.join(str(digit) for digit in permutation[4:4 + i])) ...
from itertools import permutations from ..library.base import list_to_number def solve() -> int: pandigital = [] for permutation in permutations(range(1, 10)): result = list_to_number(permutation[:4]) for i in range(1, 4): left = list_to_number(permutation[4:4 + i]) ...
<commit_before>from itertools import permutations def solve() -> int: pandigital = [] for permutation in permutations(range(1, 10)): result = int(''.join(str(digit) for digit in permutation[:4])) for i in range(1, 4): left = int(''.join(str(digit) for digit in permutation[4:4 + i...
from itertools import permutations from ..library.base import list_to_number def solve() -> int: pandigital = [] for permutation in permutations(range(1, 10)): result = list_to_number(permutation[:4]) for i in range(1, 4): left = list_to_number(permutation[4:4 + i]) ...
from itertools import permutations def solve() -> int: pandigital = [] for permutation in permutations(range(1, 10)): result = int(''.join(str(digit) for digit in permutation[:4])) for i in range(1, 4): left = int(''.join(str(digit) for digit in permutation[4:4 + i])) ...
<commit_before>from itertools import permutations def solve() -> int: pandigital = [] for permutation in permutations(range(1, 10)): result = int(''.join(str(digit) for digit in permutation[:4])) for i in range(1, 4): left = int(''.join(str(digit) for digit in permutation[4:4 + i...
921bdcc5d6f6ac4be7dfd0015e5b5fd6d06e6486
runcommands/__main__.py
runcommands/__main__.py
import sys from .config import RawConfig, RunConfig from .exc import RunCommandsError from .run import run, partition_argv, read_run_args from .util import printer def main(argv=None): try: all_argv, run_argv, command_argv = partition_argv(argv) cli_args = run.parse_args(RawConfig(run=RunConfig()...
import sys from .config import RawConfig, RunConfig from .exc import RunCommandsError from .run import run, partition_argv, read_run_args from .util import printer def main(argv=None): debug = None try: all_argv, run_argv, command_argv = partition_argv(argv) cli_args = run.parse_args(RawConfi...
Raise exception when --debug is specified to main script
Raise exception when --debug is specified to main script I.e., instead of printing the exception and then exiting.
Python
mit
wylee/runcommands,wylee/runcommands
import sys from .config import RawConfig, RunConfig from .exc import RunCommandsError from .run import run, partition_argv, read_run_args from .util import printer def main(argv=None): try: all_argv, run_argv, command_argv = partition_argv(argv) cli_args = run.parse_args(RawConfig(run=RunConfig()...
import sys from .config import RawConfig, RunConfig from .exc import RunCommandsError from .run import run, partition_argv, read_run_args from .util import printer def main(argv=None): debug = None try: all_argv, run_argv, command_argv = partition_argv(argv) cli_args = run.parse_args(RawConfi...
<commit_before>import sys from .config import RawConfig, RunConfig from .exc import RunCommandsError from .run import run, partition_argv, read_run_args from .util import printer def main(argv=None): try: all_argv, run_argv, command_argv = partition_argv(argv) cli_args = run.parse_args(RawConfig(...
import sys from .config import RawConfig, RunConfig from .exc import RunCommandsError from .run import run, partition_argv, read_run_args from .util import printer def main(argv=None): debug = None try: all_argv, run_argv, command_argv = partition_argv(argv) cli_args = run.parse_args(RawConfi...
import sys from .config import RawConfig, RunConfig from .exc import RunCommandsError from .run import run, partition_argv, read_run_args from .util import printer def main(argv=None): try: all_argv, run_argv, command_argv = partition_argv(argv) cli_args = run.parse_args(RawConfig(run=RunConfig()...
<commit_before>import sys from .config import RawConfig, RunConfig from .exc import RunCommandsError from .run import run, partition_argv, read_run_args from .util import printer def main(argv=None): try: all_argv, run_argv, command_argv = partition_argv(argv) cli_args = run.parse_args(RawConfig(...
a3c582df681aae77034e2db08999c89866cd6470
utilities.py
utilities.py
import collections def each(function, iterable): for item in iterable: function(item) def each_unpack(function, iterable): for item in iterable: function(*item) def minmax(*args): min = None max = None for x in args: if max < x: max = x if x > min: min = x return min, max ...
import collections def each(function, iterable): for item in iterable: function(item) def each_unpack(function, iterable): for item in iterable: function(*item) def minmax(*args): min = None max = None for x in args: if max < x: max = x if x > min: min = x return min, max ...
Refactor earth mover's distance implementation
Refactor earth mover's distance implementation
Python
mit
davidfoerster/schema-matching
import collections def each(function, iterable): for item in iterable: function(item) def each_unpack(function, iterable): for item in iterable: function(*item) def minmax(*args): min = None max = None for x in args: if max < x: max = x if x > min: min = x return min, max ...
import collections def each(function, iterable): for item in iterable: function(item) def each_unpack(function, iterable): for item in iterable: function(*item) def minmax(*args): min = None max = None for x in args: if max < x: max = x if x > min: min = x return min, max ...
<commit_before>import collections def each(function, iterable): for item in iterable: function(item) def each_unpack(function, iterable): for item in iterable: function(*item) def minmax(*args): min = None max = None for x in args: if max < x: max = x if x > min: min = x re...
import collections def each(function, iterable): for item in iterable: function(item) def each_unpack(function, iterable): for item in iterable: function(*item) def minmax(*args): min = None max = None for x in args: if max < x: max = x if x > min: min = x return min, max ...
import collections def each(function, iterable): for item in iterable: function(item) def each_unpack(function, iterable): for item in iterable: function(*item) def minmax(*args): min = None max = None for x in args: if max < x: max = x if x > min: min = x return min, max ...
<commit_before>import collections def each(function, iterable): for item in iterable: function(item) def each_unpack(function, iterable): for item in iterable: function(*item) def minmax(*args): min = None max = None for x in args: if max < x: max = x if x > min: min = x re...