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
07ea75c5e5f0294a9ca184bc44619a83e5cda38b
tools/debug_launcher.py
tools/debug_launcher.py
#!/usr/bin/python # Debug stub for launching Python debug session inside LLDB import sys import subprocess args = ['*'] + sys.argv[3:] script = [ "import sys, runpy, __main__", "sys.orig_main = __main__", "sys.argv=['%s']" % "','".join(args), "runpy.run_module('ptvsd', alter_sys=True, run_name='__main__')" ] c...
#!/usr/bin/python # Debug stub for launching Python debug session inside LLDB import sys import subprocess args = sys.argv[1:] script = [ "import sys,runpy,__main__", "sys.orig_main = __main__", "sys.argv=['%s']" % "','".join(args), "runpy.run_path('%s', run_name='__main__')" % sys.argv[1] ] command = ['lldb-6...
Make python debugging work with latest Python extension.
Make python debugging work with latest Python extension.
Python
mit
vadimcn/vscode-lldb,vadimcn/vscode-lldb,vadimcn/vscode-lldb,vadimcn/vscode-lldb,vadimcn/vscode-lldb,vadimcn/vscode-lldb,vadimcn/vscode-lldb
#!/usr/bin/python # Debug stub for launching Python debug session inside LLDB import sys import subprocess args = ['*'] + sys.argv[3:] script = [ "import sys, runpy, __main__", "sys.orig_main = __main__", "sys.argv=['%s']" % "','".join(args), "runpy.run_module('ptvsd', alter_sys=True, run_name='__main__')" ] c...
#!/usr/bin/python # Debug stub for launching Python debug session inside LLDB import sys import subprocess args = sys.argv[1:] script = [ "import sys,runpy,__main__", "sys.orig_main = __main__", "sys.argv=['%s']" % "','".join(args), "runpy.run_path('%s', run_name='__main__')" % sys.argv[1] ] command = ['lldb-6...
<commit_before>#!/usr/bin/python # Debug stub for launching Python debug session inside LLDB import sys import subprocess args = ['*'] + sys.argv[3:] script = [ "import sys, runpy, __main__", "sys.orig_main = __main__", "sys.argv=['%s']" % "','".join(args), "runpy.run_module('ptvsd', alter_sys=True, run_name='...
#!/usr/bin/python # Debug stub for launching Python debug session inside LLDB import sys import subprocess args = sys.argv[1:] script = [ "import sys,runpy,__main__", "sys.orig_main = __main__", "sys.argv=['%s']" % "','".join(args), "runpy.run_path('%s', run_name='__main__')" % sys.argv[1] ] command = ['lldb-6...
#!/usr/bin/python # Debug stub for launching Python debug session inside LLDB import sys import subprocess args = ['*'] + sys.argv[3:] script = [ "import sys, runpy, __main__", "sys.orig_main = __main__", "sys.argv=['%s']" % "','".join(args), "runpy.run_module('ptvsd', alter_sys=True, run_name='__main__')" ] c...
<commit_before>#!/usr/bin/python # Debug stub for launching Python debug session inside LLDB import sys import subprocess args = ['*'] + sys.argv[3:] script = [ "import sys, runpy, __main__", "sys.orig_main = __main__", "sys.argv=['%s']" % "','".join(args), "runpy.run_module('ptvsd', alter_sys=True, run_name='...
a18a19345298c43400dbfb984f97e97b3d0b624a
pyelasticsearch/__init__.py
pyelasticsearch/__init__.py
from __future__ import absolute_import from pyelasticsearch.client import ElasticSearch from pyelasticsearch.exceptions import (Timeout, ConnectionError, ElasticHttpError, InvalidJsonResponseError, E...
from __future__ import absolute_import from pyelasticsearch.client import ElasticSearch from pyelasticsearch.exceptions import (Timeout, ConnectionError, ElasticHttpError, InvalidJsonResponseError, E...
Change author and bump version.
Change author and bump version.
Python
bsd-3-clause
erikrose/pyelasticsearch
from __future__ import absolute_import from pyelasticsearch.client import ElasticSearch from pyelasticsearch.exceptions import (Timeout, ConnectionError, ElasticHttpError, InvalidJsonResponseError, E...
from __future__ import absolute_import from pyelasticsearch.client import ElasticSearch from pyelasticsearch.exceptions import (Timeout, ConnectionError, ElasticHttpError, InvalidJsonResponseError, E...
<commit_before>from __future__ import absolute_import from pyelasticsearch.client import ElasticSearch from pyelasticsearch.exceptions import (Timeout, ConnectionError, ElasticHttpError, InvalidJsonResponseError, ...
from __future__ import absolute_import from pyelasticsearch.client import ElasticSearch from pyelasticsearch.exceptions import (Timeout, ConnectionError, ElasticHttpError, InvalidJsonResponseError, E...
from __future__ import absolute_import from pyelasticsearch.client import ElasticSearch from pyelasticsearch.exceptions import (Timeout, ConnectionError, ElasticHttpError, InvalidJsonResponseError, E...
<commit_before>from __future__ import absolute_import from pyelasticsearch.client import ElasticSearch from pyelasticsearch.exceptions import (Timeout, ConnectionError, ElasticHttpError, InvalidJsonResponseError, ...
4022e09632602e65328f4561fe1b87a490ab587b
nau_timetable/wsgi.py
nau_timetable/wsgi.py
""" WSGI config for nau_timetable project. It exposes the WSGI callable as a module-level variable named ``application``. For more information on this file, see https://docs.djangoproject.com/en/1.8/howto/deployment/wsgi/ """ import os from django.core.wsgi import get_wsgi_application os.environ.setdefault("DJANGO...
""" WSGI config for nau_timetable project. It exposes the WSGI callable as a module-level variable named ``application``. For more information on this file, see https://docs.djangoproject.com/en/1.8/howto/deployment/wsgi/ """ import os from django.core.wsgi import get_wsgi_application from whitenoise.django import...
Fix flake8: E402 module level import not at top of file
Fix flake8: E402 module level import not at top of file
Python
mit
bluebirrd/nau-timetable,bluebirrd/nau-timetable,bluebirrrrd/nau-timetable,bluebirrrrd/nau-timetable,bluebirrd/nau-timetable,bluebirrd/nau-timetable,bluebirrrrd/nau-timetable,bluebirrrrd/nau-timetable
""" WSGI config for nau_timetable project. It exposes the WSGI callable as a module-level variable named ``application``. For more information on this file, see https://docs.djangoproject.com/en/1.8/howto/deployment/wsgi/ """ import os from django.core.wsgi import get_wsgi_application os.environ.setdefault("DJANGO...
""" WSGI config for nau_timetable project. It exposes the WSGI callable as a module-level variable named ``application``. For more information on this file, see https://docs.djangoproject.com/en/1.8/howto/deployment/wsgi/ """ import os from django.core.wsgi import get_wsgi_application from whitenoise.django import...
<commit_before>""" WSGI config for nau_timetable project. It exposes the WSGI callable as a module-level variable named ``application``. For more information on this file, see https://docs.djangoproject.com/en/1.8/howto/deployment/wsgi/ """ import os from django.core.wsgi import get_wsgi_application os.environ.set...
""" WSGI config for nau_timetable project. It exposes the WSGI callable as a module-level variable named ``application``. For more information on this file, see https://docs.djangoproject.com/en/1.8/howto/deployment/wsgi/ """ import os from django.core.wsgi import get_wsgi_application from whitenoise.django import...
""" WSGI config for nau_timetable project. It exposes the WSGI callable as a module-level variable named ``application``. For more information on this file, see https://docs.djangoproject.com/en/1.8/howto/deployment/wsgi/ """ import os from django.core.wsgi import get_wsgi_application os.environ.setdefault("DJANGO...
<commit_before>""" WSGI config for nau_timetable project. It exposes the WSGI callable as a module-level variable named ``application``. For more information on this file, see https://docs.djangoproject.com/en/1.8/howto/deployment/wsgi/ """ import os from django.core.wsgi import get_wsgi_application os.environ.set...
7aa140778cd689a8efa86f0890c4ccb8fc7f0d43
infrastructure/tests/test_api_views.py
infrastructure/tests/test_api_views.py
from django.test import Client, TestCase from infrastructure import utils from infrastructure import models import json from infrastructure.models import FinancialYear, QuarterlySpendFile, Expenditure, Project from scorecard.models import Geography from scorecard.profiles import MunicipalityProfile from scorecard.adm...
from django.test import TestCase class TestProject(TestCase): fixtures = ["test_infrastructure.json"] def test_infrastructure_project_filters(self): response = self.client.get( "/api/v1/infrastructure/search/?q=&province=Western+Cape&municipality=City+of+Cape+Town&project_type=New&functio...
Add test for infra search API and some refactoring
Add test for infra search API and some refactoring
Python
mit
Code4SA/municipal-data,Code4SA/municipal-data,Code4SA/municipal-data,Code4SA/municipal-data
from django.test import Client, TestCase from infrastructure import utils from infrastructure import models import json from infrastructure.models import FinancialYear, QuarterlySpendFile, Expenditure, Project from scorecard.models import Geography from scorecard.profiles import MunicipalityProfile from scorecard.adm...
from django.test import TestCase class TestProject(TestCase): fixtures = ["test_infrastructure.json"] def test_infrastructure_project_filters(self): response = self.client.get( "/api/v1/infrastructure/search/?q=&province=Western+Cape&municipality=City+of+Cape+Town&project_type=New&functio...
<commit_before>from django.test import Client, TestCase from infrastructure import utils from infrastructure import models import json from infrastructure.models import FinancialYear, QuarterlySpendFile, Expenditure, Project from scorecard.models import Geography from scorecard.profiles import MunicipalityProfile fro...
from django.test import TestCase class TestProject(TestCase): fixtures = ["test_infrastructure.json"] def test_infrastructure_project_filters(self): response = self.client.get( "/api/v1/infrastructure/search/?q=&province=Western+Cape&municipality=City+of+Cape+Town&project_type=New&functio...
from django.test import Client, TestCase from infrastructure import utils from infrastructure import models import json from infrastructure.models import FinancialYear, QuarterlySpendFile, Expenditure, Project from scorecard.models import Geography from scorecard.profiles import MunicipalityProfile from scorecard.adm...
<commit_before>from django.test import Client, TestCase from infrastructure import utils from infrastructure import models import json from infrastructure.models import FinancialYear, QuarterlySpendFile, Expenditure, Project from scorecard.models import Geography from scorecard.profiles import MunicipalityProfile fro...
fa0d478aeb167422a56d6e9e8c3e0a35947765e9
pipeline_notifier_test/routes_test.py
pipeline_notifier_test/routes_test.py
import unittest from unittest.mock import Mock from pipeline_notifier.routes import setup_routes class RoutesTests(unittest.TestCase): def test_route_setup_works(self): setup_routes(Mock(), [])
import unittest from unittest.mock import Mock from pipeline_notifier.routes import setup_routes class RoutesTests(unittest.TestCase): def setUp(self): self.pipeline = Mock() self.app = AppMock() setup_routes(self.app, [self.pipeline]) def test_root_route_returns_something(self): ...
Add framework for unit testing flask routes
Add framework for unit testing flask routes
Python
mit
pimterry/pipeline-notifier
import unittest from unittest.mock import Mock from pipeline_notifier.routes import setup_routes class RoutesTests(unittest.TestCase): def test_route_setup_works(self): setup_routes(Mock(), [])Add framework for unit testing flask routes
import unittest from unittest.mock import Mock from pipeline_notifier.routes import setup_routes class RoutesTests(unittest.TestCase): def setUp(self): self.pipeline = Mock() self.app = AppMock() setup_routes(self.app, [self.pipeline]) def test_root_route_returns_something(self): ...
<commit_before>import unittest from unittest.mock import Mock from pipeline_notifier.routes import setup_routes class RoutesTests(unittest.TestCase): def test_route_setup_works(self): setup_routes(Mock(), [])<commit_msg>Add framework for unit testing flask routes<commit_after>
import unittest from unittest.mock import Mock from pipeline_notifier.routes import setup_routes class RoutesTests(unittest.TestCase): def setUp(self): self.pipeline = Mock() self.app = AppMock() setup_routes(self.app, [self.pipeline]) def test_root_route_returns_something(self): ...
import unittest from unittest.mock import Mock from pipeline_notifier.routes import setup_routes class RoutesTests(unittest.TestCase): def test_route_setup_works(self): setup_routes(Mock(), [])Add framework for unit testing flask routesimport unittest from unittest.mock import Mock from pipeline_notifier.r...
<commit_before>import unittest from unittest.mock import Mock from pipeline_notifier.routes import setup_routes class RoutesTests(unittest.TestCase): def test_route_setup_works(self): setup_routes(Mock(), [])<commit_msg>Add framework for unit testing flask routes<commit_after>import unittest from unittest....
06b9982ea716daa627a0beb700721c7ca53601fd
run.py
run.py
#!/usr/bin/env python if __name__ == '__main__': import os import sys if sys.version_info[0:2] < (3, 4): raise SystemExit('python 3.4+ is required') root_path = os.path.abspath(os.path.dirname(__file__)) try: import mtp_common # NB: this version does not need to be update...
#!/usr/bin/env python if __name__ == '__main__': import os import sys if sys.version_info[0:2] < (3, 6): raise SystemExit('Python 3.6+ is required') root_path = os.path.abspath(os.path.dirname(__file__)) try: import mtp_common # NB: this version does not need to be update...
Support only python versions 3.6+ explicitly …which has been the assumption for a while as 3.6 features are already in use and base docker images use 3.6.
Support only python versions 3.6+ explicitly …which has been the assumption for a while as 3.6 features are already in use and base docker images use 3.6.
Python
mit
ministryofjustice/money-to-prisoners-transaction-uploader
#!/usr/bin/env python if __name__ == '__main__': import os import sys if sys.version_info[0:2] < (3, 4): raise SystemExit('python 3.4+ is required') root_path = os.path.abspath(os.path.dirname(__file__)) try: import mtp_common # NB: this version does not need to be update...
#!/usr/bin/env python if __name__ == '__main__': import os import sys if sys.version_info[0:2] < (3, 6): raise SystemExit('Python 3.6+ is required') root_path = os.path.abspath(os.path.dirname(__file__)) try: import mtp_common # NB: this version does not need to be update...
<commit_before>#!/usr/bin/env python if __name__ == '__main__': import os import sys if sys.version_info[0:2] < (3, 4): raise SystemExit('python 3.4+ is required') root_path = os.path.abspath(os.path.dirname(__file__)) try: import mtp_common # NB: this version does not ne...
#!/usr/bin/env python if __name__ == '__main__': import os import sys if sys.version_info[0:2] < (3, 6): raise SystemExit('Python 3.6+ is required') root_path = os.path.abspath(os.path.dirname(__file__)) try: import mtp_common # NB: this version does not need to be update...
#!/usr/bin/env python if __name__ == '__main__': import os import sys if sys.version_info[0:2] < (3, 4): raise SystemExit('python 3.4+ is required') root_path = os.path.abspath(os.path.dirname(__file__)) try: import mtp_common # NB: this version does not need to be update...
<commit_before>#!/usr/bin/env python if __name__ == '__main__': import os import sys if sys.version_info[0:2] < (3, 4): raise SystemExit('python 3.4+ is required') root_path = os.path.abspath(os.path.dirname(__file__)) try: import mtp_common # NB: this version does not ne...
b996e2642cf46da5e99857060c5d2bd0107d8e62
troposphere/__init__.py
troposphere/__init__.py
from flask import Flask from flask import render_template app = Flask(__name__) @app.route('/', defaults={'path': ''}) @app.route('/<path:path>') def application(path): return render_template('application.html') if __name__ == '__main__': app.run(host='0.0.0.0', debug=True)
from flask import Flask from flask import render_template app = Flask(__name__) @app.route('/login') def login(): return "LOGIN!" @app.route('/logout') def logout(): return "LOGOUT!" @app.route('/', defaults={'path': ''}) @app.route('/<path:path>') def application(path): return render_template('applicat...
Add login and logout stubs
Add login and logout stubs
Python
apache-2.0
CCI-MOC/GUI-Frontend,CCI-MOC/GUI-Frontend,CCI-MOC/GUI-Frontend,CCI-MOC/GUI-Frontend,CCI-MOC/GUI-Frontend
from flask import Flask from flask import render_template app = Flask(__name__) @app.route('/', defaults={'path': ''}) @app.route('/<path:path>') def application(path): return render_template('application.html') if __name__ == '__main__': app.run(host='0.0.0.0', debug=True) Add login and logout stubs
from flask import Flask from flask import render_template app = Flask(__name__) @app.route('/login') def login(): return "LOGIN!" @app.route('/logout') def logout(): return "LOGOUT!" @app.route('/', defaults={'path': ''}) @app.route('/<path:path>') def application(path): return render_template('applicat...
<commit_before>from flask import Flask from flask import render_template app = Flask(__name__) @app.route('/', defaults={'path': ''}) @app.route('/<path:path>') def application(path): return render_template('application.html') if __name__ == '__main__': app.run(host='0.0.0.0', debug=True) <commit_msg>Add log...
from flask import Flask from flask import render_template app = Flask(__name__) @app.route('/login') def login(): return "LOGIN!" @app.route('/logout') def logout(): return "LOGOUT!" @app.route('/', defaults={'path': ''}) @app.route('/<path:path>') def application(path): return render_template('applicat...
from flask import Flask from flask import render_template app = Flask(__name__) @app.route('/', defaults={'path': ''}) @app.route('/<path:path>') def application(path): return render_template('application.html') if __name__ == '__main__': app.run(host='0.0.0.0', debug=True) Add login and logout stubsfrom fla...
<commit_before>from flask import Flask from flask import render_template app = Flask(__name__) @app.route('/', defaults={'path': ''}) @app.route('/<path:path>') def application(path): return render_template('application.html') if __name__ == '__main__': app.run(host='0.0.0.0', debug=True) <commit_msg>Add log...
a44eecac4306504e7d3e6b8253deeb35e6b1fb43
numpy/typing/setup.py
numpy/typing/setup.py
def configuration(parent_package='', top_path=None): from numpy.distutils.misc_util import Configuration config = Configuration('typing', parent_package, top_path) config.add_subpackage('tests') config.add_data_dir('tests/data') return config if __name__ == '__main__': from numpy.distutils.cor...
def configuration(parent_package='', top_path=None): from numpy.distutils.misc_util import Configuration config = Configuration('typing', parent_package, top_path) config.add_subpackage('tests') config.add_data_dir('tests/data') config.add_data_files('*.pyi') return config if __name__ == '__ma...
Add `.pyi` data files to the `numpy.typing` sub-package
BLD: Add `.pyi` data files to the `numpy.typing` sub-package
Python
bsd-3-clause
mattip/numpy,jakirkham/numpy,seberg/numpy,rgommers/numpy,anntzer/numpy,numpy/numpy,numpy/numpy,charris/numpy,jakirkham/numpy,anntzer/numpy,charris/numpy,pdebuyl/numpy,rgommers/numpy,charris/numpy,mattip/numpy,rgommers/numpy,simongibbons/numpy,mattip/numpy,jakirkham/numpy,pdebuyl/numpy,endolith/numpy,anntzer/numpy,seber...
def configuration(parent_package='', top_path=None): from numpy.distutils.misc_util import Configuration config = Configuration('typing', parent_package, top_path) config.add_subpackage('tests') config.add_data_dir('tests/data') return config if __name__ == '__main__': from numpy.distutils.cor...
def configuration(parent_package='', top_path=None): from numpy.distutils.misc_util import Configuration config = Configuration('typing', parent_package, top_path) config.add_subpackage('tests') config.add_data_dir('tests/data') config.add_data_files('*.pyi') return config if __name__ == '__ma...
<commit_before>def configuration(parent_package='', top_path=None): from numpy.distutils.misc_util import Configuration config = Configuration('typing', parent_package, top_path) config.add_subpackage('tests') config.add_data_dir('tests/data') return config if __name__ == '__main__': from nump...
def configuration(parent_package='', top_path=None): from numpy.distutils.misc_util import Configuration config = Configuration('typing', parent_package, top_path) config.add_subpackage('tests') config.add_data_dir('tests/data') config.add_data_files('*.pyi') return config if __name__ == '__ma...
def configuration(parent_package='', top_path=None): from numpy.distutils.misc_util import Configuration config = Configuration('typing', parent_package, top_path) config.add_subpackage('tests') config.add_data_dir('tests/data') return config if __name__ == '__main__': from numpy.distutils.cor...
<commit_before>def configuration(parent_package='', top_path=None): from numpy.distutils.misc_util import Configuration config = Configuration('typing', parent_package, top_path) config.add_subpackage('tests') config.add_data_dir('tests/data') return config if __name__ == '__main__': from nump...
95e2ee8c1969dc335237dd27221049fe6fc51111
django_emarsys/api.py
django_emarsys/api.py
# -*- coding: utf-8 -*- import emarsys from django.conf import settings client = emarsys.Emarsys(settings.EMARSYS_ACCOUNT, settings.EMARSYS_PASSWORD, settings.EMARSYS_BASE_URI) def get_events(): response = client.call('/api/v2/event', 'GET') return {event[...
# -*- coding: utf-8 -*- import emarsys from django.conf import settings client = emarsys.Emarsys(settings.EMARSYS_ACCOUNT, settings.EMARSYS_PASSWORD, settings.EMARSYS_BASE_URI) def get_events(): response = client.call('/api/v2/event', 'GET') return {event[...
Return event ids as int
Return event ids as int
Python
mit
machtfit/django-emarsys,machtfit/django-emarsys
# -*- coding: utf-8 -*- import emarsys from django.conf import settings client = emarsys.Emarsys(settings.EMARSYS_ACCOUNT, settings.EMARSYS_PASSWORD, settings.EMARSYS_BASE_URI) def get_events(): response = client.call('/api/v2/event', 'GET') return {event[...
# -*- coding: utf-8 -*- import emarsys from django.conf import settings client = emarsys.Emarsys(settings.EMARSYS_ACCOUNT, settings.EMARSYS_PASSWORD, settings.EMARSYS_BASE_URI) def get_events(): response = client.call('/api/v2/event', 'GET') return {event[...
<commit_before># -*- coding: utf-8 -*- import emarsys from django.conf import settings client = emarsys.Emarsys(settings.EMARSYS_ACCOUNT, settings.EMARSYS_PASSWORD, settings.EMARSYS_BASE_URI) def get_events(): response = client.call('/api/v2/event', 'GET') ...
# -*- coding: utf-8 -*- import emarsys from django.conf import settings client = emarsys.Emarsys(settings.EMARSYS_ACCOUNT, settings.EMARSYS_PASSWORD, settings.EMARSYS_BASE_URI) def get_events(): response = client.call('/api/v2/event', 'GET') return {event[...
# -*- coding: utf-8 -*- import emarsys from django.conf import settings client = emarsys.Emarsys(settings.EMARSYS_ACCOUNT, settings.EMARSYS_PASSWORD, settings.EMARSYS_BASE_URI) def get_events(): response = client.call('/api/v2/event', 'GET') return {event[...
<commit_before># -*- coding: utf-8 -*- import emarsys from django.conf import settings client = emarsys.Emarsys(settings.EMARSYS_ACCOUNT, settings.EMARSYS_PASSWORD, settings.EMARSYS_BASE_URI) def get_events(): response = client.call('/api/v2/event', 'GET') ...
4580913b9f8ef692e3417a9b04e88a34ff69716d
download_summaries.py
download_summaries.py
#!/usr/bin/env python # -*- coding: utf-8 -*- from utils.summary_downloader import SummaryDownloader if __name__ == '__main__': # setting target dir and time interval of interest tgt_dir = r"D:\nhl\official_and_json\2016-17" tgt_dir = r"d:\tmp\test" date = "2017/04/03" to_date = "2017/04/03" ...
#!/usr/bin/env python # -*- coding: utf-8 -*- from utils.summary_downloader import SummaryDownloader if __name__ == '__main__': # setting target dir and time interval of interest tgt_dir = r"D:\nhl\official_and_json\2016-17" tgt_dir = r"d:\tmp\test" date = "2017/05/01" to_date = "2017/05/01" ...
Adjust number of download workers
Adjust number of download workers
Python
mit
leaffan/pynhldb
#!/usr/bin/env python # -*- coding: utf-8 -*- from utils.summary_downloader import SummaryDownloader if __name__ == '__main__': # setting target dir and time interval of interest tgt_dir = r"D:\nhl\official_and_json\2016-17" tgt_dir = r"d:\tmp\test" date = "2017/04/03" to_date = "2017/04/03" ...
#!/usr/bin/env python # -*- coding: utf-8 -*- from utils.summary_downloader import SummaryDownloader if __name__ == '__main__': # setting target dir and time interval of interest tgt_dir = r"D:\nhl\official_and_json\2016-17" tgt_dir = r"d:\tmp\test" date = "2017/05/01" to_date = "2017/05/01" ...
<commit_before>#!/usr/bin/env python # -*- coding: utf-8 -*- from utils.summary_downloader import SummaryDownloader if __name__ == '__main__': # setting target dir and time interval of interest tgt_dir = r"D:\nhl\official_and_json\2016-17" tgt_dir = r"d:\tmp\test" date = "2017/04/03" to_date = "...
#!/usr/bin/env python # -*- coding: utf-8 -*- from utils.summary_downloader import SummaryDownloader if __name__ == '__main__': # setting target dir and time interval of interest tgt_dir = r"D:\nhl\official_and_json\2016-17" tgt_dir = r"d:\tmp\test" date = "2017/05/01" to_date = "2017/05/01" ...
#!/usr/bin/env python # -*- coding: utf-8 -*- from utils.summary_downloader import SummaryDownloader if __name__ == '__main__': # setting target dir and time interval of interest tgt_dir = r"D:\nhl\official_and_json\2016-17" tgt_dir = r"d:\tmp\test" date = "2017/04/03" to_date = "2017/04/03" ...
<commit_before>#!/usr/bin/env python # -*- coding: utf-8 -*- from utils.summary_downloader import SummaryDownloader if __name__ == '__main__': # setting target dir and time interval of interest tgt_dir = r"D:\nhl\official_and_json\2016-17" tgt_dir = r"d:\tmp\test" date = "2017/04/03" to_date = "...
70cfff61c8b3841e71674da0b13c6fc8eee3e924
api/institutions/serializers.py
api/institutions/serializers.py
from rest_framework import serializers as ser from api.base.serializers import JSONAPISerializer, RelationshipField, LinksField class InstitutionSerializer(JSONAPISerializer): filterable_fields = frozenset([ 'id', 'name' ]) name = ser.CharField(read_only=True) id = ser.CharField(read...
from rest_framework import serializers as ser from api.base.serializers import JSONAPISerializer, RelationshipField, LinksField class InstitutionSerializer(JSONAPISerializer): filterable_fields = frozenset([ 'id', 'name' ]) name = ser.CharField(read_only=True) id = ser.CharField(read...
Add get_absolute_url method to institutions
Add get_absolute_url method to institutions
Python
apache-2.0
zamattiac/osf.io,doublebits/osf.io,Nesiehr/osf.io,laurenrevere/osf.io,TomHeatwole/osf.io,chennan47/osf.io,mluo613/osf.io,jnayak1/osf.io,Nesiehr/osf.io,leb2dg/osf.io,caneruguz/osf.io,SSJohns/osf.io,mluke93/osf.io,sloria/osf.io,hmoco/osf.io,binoculars/osf.io,RomanZWang/osf.io,DanielSBrown/osf.io,rdhyee/osf.io,binoculars/...
from rest_framework import serializers as ser from api.base.serializers import JSONAPISerializer, RelationshipField, LinksField class InstitutionSerializer(JSONAPISerializer): filterable_fields = frozenset([ 'id', 'name' ]) name = ser.CharField(read_only=True) id = ser.CharField(read...
from rest_framework import serializers as ser from api.base.serializers import JSONAPISerializer, RelationshipField, LinksField class InstitutionSerializer(JSONAPISerializer): filterable_fields = frozenset([ 'id', 'name' ]) name = ser.CharField(read_only=True) id = ser.CharField(read...
<commit_before>from rest_framework import serializers as ser from api.base.serializers import JSONAPISerializer, RelationshipField, LinksField class InstitutionSerializer(JSONAPISerializer): filterable_fields = frozenset([ 'id', 'name' ]) name = ser.CharField(read_only=True) id = ser...
from rest_framework import serializers as ser from api.base.serializers import JSONAPISerializer, RelationshipField, LinksField class InstitutionSerializer(JSONAPISerializer): filterable_fields = frozenset([ 'id', 'name' ]) name = ser.CharField(read_only=True) id = ser.CharField(read...
from rest_framework import serializers as ser from api.base.serializers import JSONAPISerializer, RelationshipField, LinksField class InstitutionSerializer(JSONAPISerializer): filterable_fields = frozenset([ 'id', 'name' ]) name = ser.CharField(read_only=True) id = ser.CharField(read...
<commit_before>from rest_framework import serializers as ser from api.base.serializers import JSONAPISerializer, RelationshipField, LinksField class InstitutionSerializer(JSONAPISerializer): filterable_fields = frozenset([ 'id', 'name' ]) name = ser.CharField(read_only=True) id = ser...
e2d74754ad42f412b8344257cb3c1c9943931b17
test/integration/ggrc/models/test_control.py
test/integration/ggrc/models/test_control.py
# Copyright (C) 2016 Google Inc. # Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file> from ggrc import db from ggrc.models import Control from integration.ggrc import TestCase from .factories import ControlCategoryFactory, ControlFactory from nose.plugins.skip import SkipTest from nose.tools...
# Copyright (C) 2016 Google Inc. # Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file> """Tests for control model.""" from ggrc import db from ggrc.models import Control from integration.ggrc import TestCase from integration.ggrc.models import factories class TestControl(TestCase): def tes...
Clean up control model tests
Clean up control model tests
Python
apache-2.0
plamut/ggrc-core,selahssea/ggrc-core,AleksNeStu/ggrc-core,AleksNeStu/ggrc-core,andrei-karalionak/ggrc-core,andrei-karalionak/ggrc-core,andrei-karalionak/ggrc-core,VinnieJohns/ggrc-core,selahssea/ggrc-core,VinnieJohns/ggrc-core,plamut/ggrc-core,AleksNeStu/ggrc-core,AleksNeStu/ggrc-core,andrei-karalionak/ggrc-core,selahs...
# Copyright (C) 2016 Google Inc. # Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file> from ggrc import db from ggrc.models import Control from integration.ggrc import TestCase from .factories import ControlCategoryFactory, ControlFactory from nose.plugins.skip import SkipTest from nose.tools...
# Copyright (C) 2016 Google Inc. # Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file> """Tests for control model.""" from ggrc import db from ggrc.models import Control from integration.ggrc import TestCase from integration.ggrc.models import factories class TestControl(TestCase): def tes...
<commit_before> # Copyright (C) 2016 Google Inc. # Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file> from ggrc import db from ggrc.models import Control from integration.ggrc import TestCase from .factories import ControlCategoryFactory, ControlFactory from nose.plugins.skip import SkipTest ...
# Copyright (C) 2016 Google Inc. # Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file> """Tests for control model.""" from ggrc import db from ggrc.models import Control from integration.ggrc import TestCase from integration.ggrc.models import factories class TestControl(TestCase): def tes...
# Copyright (C) 2016 Google Inc. # Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file> from ggrc import db from ggrc.models import Control from integration.ggrc import TestCase from .factories import ControlCategoryFactory, ControlFactory from nose.plugins.skip import SkipTest from nose.tools...
<commit_before> # Copyright (C) 2016 Google Inc. # Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file> from ggrc import db from ggrc.models import Control from integration.ggrc import TestCase from .factories import ControlCategoryFactory, ControlFactory from nose.plugins.skip import SkipTest ...
fbb3c38417e85f327e6a347338a005162779314b
run_tests.py
run_tests.py
from __future__ import print_function import os import imp import fnmatch # Test directory DIR_TEST = 'tests' def find_tests(pathname): """Recursively finds the test modules. :param str pathname: Path name where the tests are stored. :returns: List of paths to each test modules. :rtype: :class:`li...
from __future__ import print_function import os import sys import imp import fnmatch # Test directory DIR_TEST = 'tests' def find_tests(pathname): """Recursively finds the test modules. :param str pathname: Path name where the tests are stored. :returns: List of paths to each test modules. :rtype:...
Allow to chose a specific case test.
[tests] Allow to chose a specific case test.
Python
bsd-3-clause
owtf/ptp,DoomTaper/ptp
from __future__ import print_function import os import imp import fnmatch # Test directory DIR_TEST = 'tests' def find_tests(pathname): """Recursively finds the test modules. :param str pathname: Path name where the tests are stored. :returns: List of paths to each test modules. :rtype: :class:`li...
from __future__ import print_function import os import sys import imp import fnmatch # Test directory DIR_TEST = 'tests' def find_tests(pathname): """Recursively finds the test modules. :param str pathname: Path name where the tests are stored. :returns: List of paths to each test modules. :rtype:...
<commit_before>from __future__ import print_function import os import imp import fnmatch # Test directory DIR_TEST = 'tests' def find_tests(pathname): """Recursively finds the test modules. :param str pathname: Path name where the tests are stored. :returns: List of paths to each test modules. :rt...
from __future__ import print_function import os import sys import imp import fnmatch # Test directory DIR_TEST = 'tests' def find_tests(pathname): """Recursively finds the test modules. :param str pathname: Path name where the tests are stored. :returns: List of paths to each test modules. :rtype:...
from __future__ import print_function import os import imp import fnmatch # Test directory DIR_TEST = 'tests' def find_tests(pathname): """Recursively finds the test modules. :param str pathname: Path name where the tests are stored. :returns: List of paths to each test modules. :rtype: :class:`li...
<commit_before>from __future__ import print_function import os import imp import fnmatch # Test directory DIR_TEST = 'tests' def find_tests(pathname): """Recursively finds the test modules. :param str pathname: Path name where the tests are stored. :returns: List of paths to each test modules. :rt...
5ee6e2ce3854d8ca60b5aedfb21cd61172511a8f
hrmpy/tests/test_parser.py
hrmpy/tests/test_parser.py
import pytest from hrmpy import parser def test_parse_program_empty(): with pytest.raises(RuntimeError): parser.parse_program("") def test_parse_program_no_header(): with pytest.raises(RuntimeError): parser.parse_program("\n".join([ "INBOX", "OUTBOX", ])) d...
import pytest from hrmpy import parser class TestParseProgram(object): def test_empty_program(self): """ An empty string is not a program. """ with pytest.raises(RuntimeError): parser.parse_program("") def test_no_header(self): """ A program witho...
Test a (very) few more things.
Test a (very) few more things.
Python
mit
jerith/hrmpy
import pytest from hrmpy import parser def test_parse_program_empty(): with pytest.raises(RuntimeError): parser.parse_program("") def test_parse_program_no_header(): with pytest.raises(RuntimeError): parser.parse_program("\n".join([ "INBOX", "OUTBOX", ])) d...
import pytest from hrmpy import parser class TestParseProgram(object): def test_empty_program(self): """ An empty string is not a program. """ with pytest.raises(RuntimeError): parser.parse_program("") def test_no_header(self): """ A program witho...
<commit_before>import pytest from hrmpy import parser def test_parse_program_empty(): with pytest.raises(RuntimeError): parser.parse_program("") def test_parse_program_no_header(): with pytest.raises(RuntimeError): parser.parse_program("\n".join([ "INBOX", "OUTBOX", ...
import pytest from hrmpy import parser class TestParseProgram(object): def test_empty_program(self): """ An empty string is not a program. """ with pytest.raises(RuntimeError): parser.parse_program("") def test_no_header(self): """ A program witho...
import pytest from hrmpy import parser def test_parse_program_empty(): with pytest.raises(RuntimeError): parser.parse_program("") def test_parse_program_no_header(): with pytest.raises(RuntimeError): parser.parse_program("\n".join([ "INBOX", "OUTBOX", ])) d...
<commit_before>import pytest from hrmpy import parser def test_parse_program_empty(): with pytest.raises(RuntimeError): parser.parse_program("") def test_parse_program_no_header(): with pytest.raises(RuntimeError): parser.parse_program("\n".join([ "INBOX", "OUTBOX", ...
e0510d5161ad42ce265d5fc0d5e22147f4f0033c
dsub/_dsub_version.py
dsub/_dsub_version.py
# Copyright 2017 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or a...
# Copyright 2017 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or a...
Update dsub version to 0.4.0
Update dsub version to 0.4.0 PiperOrigin-RevId: 328430334
Python
apache-2.0
DataBiosphere/dsub,DataBiosphere/dsub
# Copyright 2017 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or a...
# Copyright 2017 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or a...
<commit_before># Copyright 2017 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by appl...
# Copyright 2017 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or a...
# Copyright 2017 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or a...
<commit_before># Copyright 2017 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by appl...
c88478f399417e2099e90d9b445c2a7bfb57af70
aspc/senate/views.py
aspc/senate/views.py
from django.views.generic import ListView from aspc.senate.models import Document, Appointment import datetime class DocumentList(ListView): model = Document context_object_name = 'documents' paginate_by = 20 class AppointmentList(ListView): model = Appointment context_object_name = 'appointments'...
from django.views.generic import ListView from aspc.senate.models import Document, Appointment import datetime class DocumentList(ListView): model = Document context_object_name = 'documents' paginate_by = 20 class AppointmentList(ListView): model = Appointment context_object_name = 'appointments'...
Correct typo in Appointments view
Correct typo in Appointments view
Python
mit
theworldbright/mainsite,aspc/mainsite,theworldbright/mainsite,aspc/mainsite,aspc/mainsite,theworldbright/mainsite,aspc/mainsite,theworldbright/mainsite
from django.views.generic import ListView from aspc.senate.models import Document, Appointment import datetime class DocumentList(ListView): model = Document context_object_name = 'documents' paginate_by = 20 class AppointmentList(ListView): model = Appointment context_object_name = 'appointments'...
from django.views.generic import ListView from aspc.senate.models import Document, Appointment import datetime class DocumentList(ListView): model = Document context_object_name = 'documents' paginate_by = 20 class AppointmentList(ListView): model = Appointment context_object_name = 'appointments'...
<commit_before>from django.views.generic import ListView from aspc.senate.models import Document, Appointment import datetime class DocumentList(ListView): model = Document context_object_name = 'documents' paginate_by = 20 class AppointmentList(ListView): model = Appointment context_object_name =...
from django.views.generic import ListView from aspc.senate.models import Document, Appointment import datetime class DocumentList(ListView): model = Document context_object_name = 'documents' paginate_by = 20 class AppointmentList(ListView): model = Appointment context_object_name = 'appointments'...
from django.views.generic import ListView from aspc.senate.models import Document, Appointment import datetime class DocumentList(ListView): model = Document context_object_name = 'documents' paginate_by = 20 class AppointmentList(ListView): model = Appointment context_object_name = 'appointments'...
<commit_before>from django.views.generic import ListView from aspc.senate.models import Document, Appointment import datetime class DocumentList(ListView): model = Document context_object_name = 'documents' paginate_by = 20 class AppointmentList(ListView): model = Appointment context_object_name =...
a44665230d2b589a1550b1293cb690d9116d0dca
acme/__init__.py
acme/__init__.py
# python3 # Copyright 2018 DeepMind Technologies Limited. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless re...
# Copyright 2018 DeepMind Technologies Limited. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by ...
Remove unused comments related to Python 2 compatibility.
Remove unused comments related to Python 2 compatibility. PiperOrigin-RevId: 440310765 Change-Id: I7afdea122cd2565b06f387509de2476106d46d8c
Python
apache-2.0
deepmind/acme,deepmind/acme
# python3 # Copyright 2018 DeepMind Technologies Limited. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless re...
# Copyright 2018 DeepMind Technologies Limited. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by ...
<commit_before># python3 # Copyright 2018 DeepMind Technologies Limited. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2....
# Copyright 2018 DeepMind Technologies Limited. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by ...
# python3 # Copyright 2018 DeepMind Technologies Limited. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless re...
<commit_before># python3 # Copyright 2018 DeepMind Technologies Limited. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2....
ea315b018fb3fab6925f1194fcd3e341166ab6fb
opt/resource/common.py
opt/resource/common.py
import json from urllib.parse import urljoin import sys def get_payload(): return json.load(sys.stdin) def get_index_url(payload): source = payload['source'] uri = source['uri'] index = source['index'] if not uri.endswith('/'): uri += '/' if not index.endswith('/'): index += ...
import json from urllib.parse import urljoin import sys def get_payload(): return json.load(sys.stdin) def get_index_url(payload): source = payload['source'] uri = source['uri'] index = source['index'] if not uri.endswith('/'): uri += '/' if not index.endswith('/'): index += ...
Handle missing version in payload.
Handle missing version in payload.
Python
mit
mdomke/concourse-devpi-resource
import json from urllib.parse import urljoin import sys def get_payload(): return json.load(sys.stdin) def get_index_url(payload): source = payload['source'] uri = source['uri'] index = source['index'] if not uri.endswith('/'): uri += '/' if not index.endswith('/'): index += ...
import json from urllib.parse import urljoin import sys def get_payload(): return json.load(sys.stdin) def get_index_url(payload): source = payload['source'] uri = source['uri'] index = source['index'] if not uri.endswith('/'): uri += '/' if not index.endswith('/'): index += ...
<commit_before>import json from urllib.parse import urljoin import sys def get_payload(): return json.load(sys.stdin) def get_index_url(payload): source = payload['source'] uri = source['uri'] index = source['index'] if not uri.endswith('/'): uri += '/' if not index.endswith('/'): ...
import json from urllib.parse import urljoin import sys def get_payload(): return json.load(sys.stdin) def get_index_url(payload): source = payload['source'] uri = source['uri'] index = source['index'] if not uri.endswith('/'): uri += '/' if not index.endswith('/'): index += ...
import json from urllib.parse import urljoin import sys def get_payload(): return json.load(sys.stdin) def get_index_url(payload): source = payload['source'] uri = source['uri'] index = source['index'] if not uri.endswith('/'): uri += '/' if not index.endswith('/'): index += ...
<commit_before>import json from urllib.parse import urljoin import sys def get_payload(): return json.load(sys.stdin) def get_index_url(payload): source = payload['source'] uri = source['uri'] index = source['index'] if not uri.endswith('/'): uri += '/' if not index.endswith('/'): ...
37178102a9518d73b4e2040ac8cbb622663f9afd
{{cookiecutter.project_slug}}/config/urls.py
{{cookiecutter.project_slug}}/config/urls.py
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.conf import settings from django.conf.urls import include, url from django.conf.urls.static import static from django.contrib import admin from django.views.generic import TemplateView from django.views import defaults as default_views urlpat...
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.conf import settings from django.conf.urls import include, url from django.conf.urls.static import static from django.contrib import admin from django.views.generic import TemplateView from django.views import defaults as default_views urlpat...
Include Debug Toolbar URLs only in debug mode
Include Debug Toolbar URLs only in debug mode
Python
bsd-3-clause
valerymelou/cookiecutter-django-gulp,valerymelou/cookiecutter-django-gulp,valerymelou/cookiecutter-django-gulp
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.conf import settings from django.conf.urls import include, url from django.conf.urls.static import static from django.contrib import admin from django.views.generic import TemplateView from django.views import defaults as default_views urlpat...
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.conf import settings from django.conf.urls import include, url from django.conf.urls.static import static from django.contrib import admin from django.views.generic import TemplateView from django.views import defaults as default_views urlpat...
<commit_before># -*- coding: utf-8 -*- from __future__ import unicode_literals from django.conf import settings from django.conf.urls import include, url from django.conf.urls.static import static from django.contrib import admin from django.views.generic import TemplateView from django.views import defaults as defaul...
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.conf import settings from django.conf.urls import include, url from django.conf.urls.static import static from django.contrib import admin from django.views.generic import TemplateView from django.views import defaults as default_views urlpat...
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.conf import settings from django.conf.urls import include, url from django.conf.urls.static import static from django.contrib import admin from django.views.generic import TemplateView from django.views import defaults as default_views urlpat...
<commit_before># -*- coding: utf-8 -*- from __future__ import unicode_literals from django.conf import settings from django.conf.urls import include, url from django.conf.urls.static import static from django.contrib import admin from django.views.generic import TemplateView from django.views import defaults as defaul...
cf0fa32efc6d89aad5d569ad59aefb66e9f7df12
wsgiservice/__init__.py
wsgiservice/__init__.py
"""This root level directives are importend from the submodules. They are made available here as well to keep the number of imports to a minimum for most applications. """ import wsgiservice.routing from wsgiservice.decorators import mount, validate, expires from wsgiservice.objects import Response from wsgiservice.app...
"""This root level directives are importend from the submodules. They are made available here as well to keep the number of imports to a minimum for most applications. """ import wsgiservice.routing from wsgiservice.decorators import mount, validate, expires from wsgiservice.objects import Response from wsgiservice.app...
Remove the unused duration access.
Remove the unused duration access.
Python
bsd-2-clause
pneff/wsgiservice,beekpr/wsgiservice
"""This root level directives are importend from the submodules. They are made available here as well to keep the number of imports to a minimum for most applications. """ import wsgiservice.routing from wsgiservice.decorators import mount, validate, expires from wsgiservice.objects import Response from wsgiservice.app...
"""This root level directives are importend from the submodules. They are made available here as well to keep the number of imports to a minimum for most applications. """ import wsgiservice.routing from wsgiservice.decorators import mount, validate, expires from wsgiservice.objects import Response from wsgiservice.app...
<commit_before>"""This root level directives are importend from the submodules. They are made available here as well to keep the number of imports to a minimum for most applications. """ import wsgiservice.routing from wsgiservice.decorators import mount, validate, expires from wsgiservice.objects import Response from ...
"""This root level directives are importend from the submodules. They are made available here as well to keep the number of imports to a minimum for most applications. """ import wsgiservice.routing from wsgiservice.decorators import mount, validate, expires from wsgiservice.objects import Response from wsgiservice.app...
"""This root level directives are importend from the submodules. They are made available here as well to keep the number of imports to a minimum for most applications. """ import wsgiservice.routing from wsgiservice.decorators import mount, validate, expires from wsgiservice.objects import Response from wsgiservice.app...
<commit_before>"""This root level directives are importend from the submodules. They are made available here as well to keep the number of imports to a minimum for most applications. """ import wsgiservice.routing from wsgiservice.decorators import mount, validate, expires from wsgiservice.objects import Response from ...
f1ef0652acdd9211f8e39eb57845251e7ccc496e
commands.py
commands.py
import generate as gen commands = {} def cmd_func(name): def _cmd_func(f): commands.setdefault(name, f) return f return _cmd_func @cmd_func('get-latest-rev') def get_latest_rev(args): return "%s %s" % (gen.success('( )', gen.string('test')), gen.success('12')) def ...
import generate as gen commands = {} def cmd_func(name): def _cmd_func(f): commands.setdefault(name, f) return f return _cmd_func @cmd_func('get-latest-rev') def get_latest_rev(args): return "%s %s" % (gen.success('( )', gen.string('test')), gen.success('12')) def ...
Use the real unknown command err-code
Use the real unknown command err-code Using the real unknown command error code means that the client actually understands the error and behaves appropriately.
Python
bsd-3-clause
slonopotamus/git_svn_server
import generate as gen commands = {} def cmd_func(name): def _cmd_func(f): commands.setdefault(name, f) return f return _cmd_func @cmd_func('get-latest-rev') def get_latest_rev(args): return "%s %s" % (gen.success('( )', gen.string('test')), gen.success('12')) def ...
import generate as gen commands = {} def cmd_func(name): def _cmd_func(f): commands.setdefault(name, f) return f return _cmd_func @cmd_func('get-latest-rev') def get_latest_rev(args): return "%s %s" % (gen.success('( )', gen.string('test')), gen.success('12')) def ...
<commit_before> import generate as gen commands = {} def cmd_func(name): def _cmd_func(f): commands.setdefault(name, f) return f return _cmd_func @cmd_func('get-latest-rev') def get_latest_rev(args): return "%s %s" % (gen.success('( )', gen.string('test')), gen.succe...
import generate as gen commands = {} def cmd_func(name): def _cmd_func(f): commands.setdefault(name, f) return f return _cmd_func @cmd_func('get-latest-rev') def get_latest_rev(args): return "%s %s" % (gen.success('( )', gen.string('test')), gen.success('12')) def ...
import generate as gen commands = {} def cmd_func(name): def _cmd_func(f): commands.setdefault(name, f) return f return _cmd_func @cmd_func('get-latest-rev') def get_latest_rev(args): return "%s %s" % (gen.success('( )', gen.string('test')), gen.success('12')) def ...
<commit_before> import generate as gen commands = {} def cmd_func(name): def _cmd_func(f): commands.setdefault(name, f) return f return _cmd_func @cmd_func('get-latest-rev') def get_latest_rev(args): return "%s %s" % (gen.success('( )', gen.string('test')), gen.succe...
9d4908d28efd31a16a47bdfaf09895913dc2977f
sympy/utilities/tests/test_timeutils.py
sympy/utilities/tests/test_timeutils.py
"""Tests for simple tools for timing functions' execution. """ from sympy.utilities.timeutils import timed def test_timed(): result = timed(lambda: 1 + 1, limit=100000) assert result[0] == 100000 and result[3] == "ns" result = timed("1 + 1", limit=100000) assert result[0] == 100000 and result[3] == "...
"""Tests for simple tools for timing functions' execution. """ import sys if sys.version_info[:2] <= (2, 5): disabled = True from sympy.utilities.timeutils import timed def test_timed(): result = timed(lambda: 1 + 1, limit=100000) assert result[0] == 100000 and result[3] == "ns" result = timed("1 +...
Disable timed() tests on Python 2.5
utilities: Disable timed() tests on Python 2.5
Python
bsd-3-clause
jbbskinny/sympy,kumarkrishna/sympy,oliverlee/sympy,shipci/sympy,yashsharan/sympy,meghana1995/sympy,vipulroxx/sympy,Vishluck/sympy,drufat/sympy,cswiercz/sympy,MechCoder/sympy,mcdaniel67/sympy,saurabhjn76/sympy,jaimahajan1997/sympy,dqnykamp/sympy,rahuldan/sympy,AunShiLord/sympy,Sumith1896/sympy,pandeyadarsh/sympy,shikil/...
"""Tests for simple tools for timing functions' execution. """ from sympy.utilities.timeutils import timed def test_timed(): result = timed(lambda: 1 + 1, limit=100000) assert result[0] == 100000 and result[3] == "ns" result = timed("1 + 1", limit=100000) assert result[0] == 100000 and result[3] == "...
"""Tests for simple tools for timing functions' execution. """ import sys if sys.version_info[:2] <= (2, 5): disabled = True from sympy.utilities.timeutils import timed def test_timed(): result = timed(lambda: 1 + 1, limit=100000) assert result[0] == 100000 and result[3] == "ns" result = timed("1 +...
<commit_before>"""Tests for simple tools for timing functions' execution. """ from sympy.utilities.timeutils import timed def test_timed(): result = timed(lambda: 1 + 1, limit=100000) assert result[0] == 100000 and result[3] == "ns" result = timed("1 + 1", limit=100000) assert result[0] == 100000 and...
"""Tests for simple tools for timing functions' execution. """ import sys if sys.version_info[:2] <= (2, 5): disabled = True from sympy.utilities.timeutils import timed def test_timed(): result = timed(lambda: 1 + 1, limit=100000) assert result[0] == 100000 and result[3] == "ns" result = timed("1 +...
"""Tests for simple tools for timing functions' execution. """ from sympy.utilities.timeutils import timed def test_timed(): result = timed(lambda: 1 + 1, limit=100000) assert result[0] == 100000 and result[3] == "ns" result = timed("1 + 1", limit=100000) assert result[0] == 100000 and result[3] == "...
<commit_before>"""Tests for simple tools for timing functions' execution. """ from sympy.utilities.timeutils import timed def test_timed(): result = timed(lambda: 1 + 1, limit=100000) assert result[0] == 100000 and result[3] == "ns" result = timed("1 + 1", limit=100000) assert result[0] == 100000 and...
4c7f36e6a5f277b1c84d665edb279476a9e15063
src/pyop/exceptions.py
src/pyop/exceptions.py
from oic.oauth2.message import ErrorResponse from .util import should_fragment_encode class BearerTokenError(ValueError): pass class InvalidAuthorizationCode(ValueError): pass class InvalidAccessToken(ValueError): pass class InvalidRefreshToken(ValueError): pass class InvalidSubjectIdentifier...
import json from oic.oauth2.message import ErrorResponse from .util import should_fragment_encode class BearerTokenError(ValueError): pass class InvalidAuthorizationCode(ValueError): pass class InvalidAccessToken(ValueError): pass class InvalidRefreshToken(ValueError): pass class InvalidSubj...
Add JSON convenience to InvalidRegistrationRequest.
Add JSON convenience to InvalidRegistrationRequest.
Python
apache-2.0
its-dirg/pyop
from oic.oauth2.message import ErrorResponse from .util import should_fragment_encode class BearerTokenError(ValueError): pass class InvalidAuthorizationCode(ValueError): pass class InvalidAccessToken(ValueError): pass class InvalidRefreshToken(ValueError): pass class InvalidSubjectIdentifier...
import json from oic.oauth2.message import ErrorResponse from .util import should_fragment_encode class BearerTokenError(ValueError): pass class InvalidAuthorizationCode(ValueError): pass class InvalidAccessToken(ValueError): pass class InvalidRefreshToken(ValueError): pass class InvalidSubj...
<commit_before>from oic.oauth2.message import ErrorResponse from .util import should_fragment_encode class BearerTokenError(ValueError): pass class InvalidAuthorizationCode(ValueError): pass class InvalidAccessToken(ValueError): pass class InvalidRefreshToken(ValueError): pass class InvalidSu...
import json from oic.oauth2.message import ErrorResponse from .util import should_fragment_encode class BearerTokenError(ValueError): pass class InvalidAuthorizationCode(ValueError): pass class InvalidAccessToken(ValueError): pass class InvalidRefreshToken(ValueError): pass class InvalidSubj...
from oic.oauth2.message import ErrorResponse from .util import should_fragment_encode class BearerTokenError(ValueError): pass class InvalidAuthorizationCode(ValueError): pass class InvalidAccessToken(ValueError): pass class InvalidRefreshToken(ValueError): pass class InvalidSubjectIdentifier...
<commit_before>from oic.oauth2.message import ErrorResponse from .util import should_fragment_encode class BearerTokenError(ValueError): pass class InvalidAuthorizationCode(ValueError): pass class InvalidAccessToken(ValueError): pass class InvalidRefreshToken(ValueError): pass class InvalidSu...
48ec1d9494ae8215f6b4bc4b79bcefe318d8a5b4
create_csv.py
create_csv.py
import csv from datetime import date from scraper.draft_scraper import scrape CSV_FILE = 'datasets/%s_nbadraft.csv' for year in range(1947, date.today().year): draft = scrape(year) header = [key for key in draft[1].keys()] with open(CSV_FILE % year, 'w', newline='') as outfile: dw = csv.DictWrite...
import csv from datetime import date from scraper.draft_scraper import scrape CSV_FILE = 'datasets/%s_nbadraft.csv' for year in range(1947, date.today().year): draft = scrape(year) header = [key for key in draft[1].keys()] with open(CSV_FILE % year, 'w', newline='') as outfile: dw = csv.DictWrite...
Print line after creating each csv
Print line after creating each csv
Python
mit
kshvmdn/nbadrafts
import csv from datetime import date from scraper.draft_scraper import scrape CSV_FILE = 'datasets/%s_nbadraft.csv' for year in range(1947, date.today().year): draft = scrape(year) header = [key for key in draft[1].keys()] with open(CSV_FILE % year, 'w', newline='') as outfile: dw = csv.DictWrite...
import csv from datetime import date from scraper.draft_scraper import scrape CSV_FILE = 'datasets/%s_nbadraft.csv' for year in range(1947, date.today().year): draft = scrape(year) header = [key for key in draft[1].keys()] with open(CSV_FILE % year, 'w', newline='') as outfile: dw = csv.DictWrite...
<commit_before>import csv from datetime import date from scraper.draft_scraper import scrape CSV_FILE = 'datasets/%s_nbadraft.csv' for year in range(1947, date.today().year): draft = scrape(year) header = [key for key in draft[1].keys()] with open(CSV_FILE % year, 'w', newline='') as outfile: dw ...
import csv from datetime import date from scraper.draft_scraper import scrape CSV_FILE = 'datasets/%s_nbadraft.csv' for year in range(1947, date.today().year): draft = scrape(year) header = [key for key in draft[1].keys()] with open(CSV_FILE % year, 'w', newline='') as outfile: dw = csv.DictWrite...
import csv from datetime import date from scraper.draft_scraper import scrape CSV_FILE = 'datasets/%s_nbadraft.csv' for year in range(1947, date.today().year): draft = scrape(year) header = [key for key in draft[1].keys()] with open(CSV_FILE % year, 'w', newline='') as outfile: dw = csv.DictWrite...
<commit_before>import csv from datetime import date from scraper.draft_scraper import scrape CSV_FILE = 'datasets/%s_nbadraft.csv' for year in range(1947, date.today().year): draft = scrape(year) header = [key for key in draft[1].keys()] with open(CSV_FILE % year, 'w', newline='') as outfile: dw ...
bf7571dfbf2f3081e539d5f3a5558d80fcd3fbee
app/utils/fields.py
app/utils/fields.py
from wtforms import Field from wtforms.widgets import TextInput class TagListField(Field): """ Field for comma-separated list of tags. From http://wtforms.readthedocs.org/en/latest/fields.html#custom-fields """ widget = TextInput() def _value(self): if self.data: try: ...
from wtforms import Field from wtforms.widgets import TextInput class TagListField(Field): """ Field for comma-separated list of tags. """ widget = TextInput() def _value(self): if self.data: try: # The data is a list of strings return ', '.join(self.d...
Remove explicit unicode encoding on strings
Remove explicit unicode encoding on strings
Python
mit
Encrylize/flask-blogger,Encrylize/flask-blogger,Encrylize/flask-blogger
from wtforms import Field from wtforms.widgets import TextInput class TagListField(Field): """ Field for comma-separated list of tags. From http://wtforms.readthedocs.org/en/latest/fields.html#custom-fields """ widget = TextInput() def _value(self): if self.data: try: ...
from wtforms import Field from wtforms.widgets import TextInput class TagListField(Field): """ Field for comma-separated list of tags. """ widget = TextInput() def _value(self): if self.data: try: # The data is a list of strings return ', '.join(self.d...
<commit_before>from wtforms import Field from wtforms.widgets import TextInput class TagListField(Field): """ Field for comma-separated list of tags. From http://wtforms.readthedocs.org/en/latest/fields.html#custom-fields """ widget = TextInput() def _value(self): if self.data: ...
from wtforms import Field from wtforms.widgets import TextInput class TagListField(Field): """ Field for comma-separated list of tags. """ widget = TextInput() def _value(self): if self.data: try: # The data is a list of strings return ', '.join(self.d...
from wtforms import Field from wtforms.widgets import TextInput class TagListField(Field): """ Field for comma-separated list of tags. From http://wtforms.readthedocs.org/en/latest/fields.html#custom-fields """ widget = TextInput() def _value(self): if self.data: try: ...
<commit_before>from wtforms import Field from wtforms.widgets import TextInput class TagListField(Field): """ Field for comma-separated list of tags. From http://wtforms.readthedocs.org/en/latest/fields.html#custom-fields """ widget = TextInput() def _value(self): if self.data: ...
52ef3152fb92c5f0363578fe1e7d51f57c18295b
core/fns.py
core/fns.py
from functools import partial from itertools import accumulate as accumulate_, chain, tee MYPY = False if MYPY: from typing import Callable, Iterable, Iterator, Optional, Tuple, TypeVar T = TypeVar('T') filter_ = partial(filter, None) # type: Callable[[Iterator[Optional[T]]], Iterator[T]] flatten = chain.fr...
from functools import partial from itertools import accumulate as accumulate_, chain, tee MYPY = False if MYPY: from typing import Callable, Iterable, Iterator, Optional, Tuple, TypeVar T = TypeVar('T') filter_ = partial(filter, None) # type: Callable[[Iterator[Optional[T]]], Iterator[T]] flatten = chain.fr...
Make `initial` argument to `accumulate` optional
Make `initial` argument to `accumulate` optional
Python
mit
divmain/GitSavvy,divmain/GitSavvy,divmain/GitSavvy
from functools import partial from itertools import accumulate as accumulate_, chain, tee MYPY = False if MYPY: from typing import Callable, Iterable, Iterator, Optional, Tuple, TypeVar T = TypeVar('T') filter_ = partial(filter, None) # type: Callable[[Iterator[Optional[T]]], Iterator[T]] flatten = chain.fr...
from functools import partial from itertools import accumulate as accumulate_, chain, tee MYPY = False if MYPY: from typing import Callable, Iterable, Iterator, Optional, Tuple, TypeVar T = TypeVar('T') filter_ = partial(filter, None) # type: Callable[[Iterator[Optional[T]]], Iterator[T]] flatten = chain.fr...
<commit_before>from functools import partial from itertools import accumulate as accumulate_, chain, tee MYPY = False if MYPY: from typing import Callable, Iterable, Iterator, Optional, Tuple, TypeVar T = TypeVar('T') filter_ = partial(filter, None) # type: Callable[[Iterator[Optional[T]]], Iterator[T]] fla...
from functools import partial from itertools import accumulate as accumulate_, chain, tee MYPY = False if MYPY: from typing import Callable, Iterable, Iterator, Optional, Tuple, TypeVar T = TypeVar('T') filter_ = partial(filter, None) # type: Callable[[Iterator[Optional[T]]], Iterator[T]] flatten = chain.fr...
from functools import partial from itertools import accumulate as accumulate_, chain, tee MYPY = False if MYPY: from typing import Callable, Iterable, Iterator, Optional, Tuple, TypeVar T = TypeVar('T') filter_ = partial(filter, None) # type: Callable[[Iterator[Optional[T]]], Iterator[T]] flatten = chain.fr...
<commit_before>from functools import partial from itertools import accumulate as accumulate_, chain, tee MYPY = False if MYPY: from typing import Callable, Iterable, Iterator, Optional, Tuple, TypeVar T = TypeVar('T') filter_ = partial(filter, None) # type: Callable[[Iterator[Optional[T]]], Iterator[T]] fla...
eb0579d7bcd585e8ae0ca82060540743f8ec90ae
py/tables.py
py/tables.py
import sqlalchemy import sqlalchemy.ext.declarative Base = sqlalchemy.ext.declarative.declarative_base() class Post(Base): __tablename__ = "posts" id = sqlalchemy.Column(sqlalchemy.Integer, primary_key = True) title = sqlalchemy.Column(sqlalchemy.String) body = sqlalchemy.Column(sqlalchemy.Text,) #Should be text...
import sqlalchemy import sqlalchemy.ext.declarative Base = sqlalchemy.ext.declarative.declarative_base() class Post(Base): __tablename__ = "posts" id = sqlalchemy.Column(sqlalchemy.Integer, primary_key = True) title = sqlalchemy.Column(sqlalchemy.String) body = sqlalchemy.Column(sqlalchemy.Text,) #Should be text...
Fix bug where column the function was being called, rather than class
Fix bug where column the function was being called, rather than class
Python
mit
ollien/Timpani,ollien/Timpani,ollien/Timpani
import sqlalchemy import sqlalchemy.ext.declarative Base = sqlalchemy.ext.declarative.declarative_base() class Post(Base): __tablename__ = "posts" id = sqlalchemy.Column(sqlalchemy.Integer, primary_key = True) title = sqlalchemy.Column(sqlalchemy.String) body = sqlalchemy.Column(sqlalchemy.Text,) #Should be text...
import sqlalchemy import sqlalchemy.ext.declarative Base = sqlalchemy.ext.declarative.declarative_base() class Post(Base): __tablename__ = "posts" id = sqlalchemy.Column(sqlalchemy.Integer, primary_key = True) title = sqlalchemy.Column(sqlalchemy.String) body = sqlalchemy.Column(sqlalchemy.Text,) #Should be text...
<commit_before>import sqlalchemy import sqlalchemy.ext.declarative Base = sqlalchemy.ext.declarative.declarative_base() class Post(Base): __tablename__ = "posts" id = sqlalchemy.Column(sqlalchemy.Integer, primary_key = True) title = sqlalchemy.Column(sqlalchemy.String) body = sqlalchemy.Column(sqlalchemy.Text,) ...
import sqlalchemy import sqlalchemy.ext.declarative Base = sqlalchemy.ext.declarative.declarative_base() class Post(Base): __tablename__ = "posts" id = sqlalchemy.Column(sqlalchemy.Integer, primary_key = True) title = sqlalchemy.Column(sqlalchemy.String) body = sqlalchemy.Column(sqlalchemy.Text,) #Should be text...
import sqlalchemy import sqlalchemy.ext.declarative Base = sqlalchemy.ext.declarative.declarative_base() class Post(Base): __tablename__ = "posts" id = sqlalchemy.Column(sqlalchemy.Integer, primary_key = True) title = sqlalchemy.Column(sqlalchemy.String) body = sqlalchemy.Column(sqlalchemy.Text,) #Should be text...
<commit_before>import sqlalchemy import sqlalchemy.ext.declarative Base = sqlalchemy.ext.declarative.declarative_base() class Post(Base): __tablename__ = "posts" id = sqlalchemy.Column(sqlalchemy.Integer, primary_key = True) title = sqlalchemy.Column(sqlalchemy.String) body = sqlalchemy.Column(sqlalchemy.Text,) ...
007cd14cd3fd215cd91403ebe09cd5c0bb555f23
armstrong/apps/related_content/admin.py
armstrong/apps/related_content/admin.py
from django.contrib import admin from django.contrib.contenttypes.generic import GenericTabularInline from .models import RelatedContent from .models import RelatedType class RelatedContentInline(GenericTabularInline): ct_field = "source_type" ct_fk_field = "source_id" model = RelatedContent admin.sit...
from django import forms from django.contrib import admin from django.contrib.contenttypes.generic import GenericTabularInline from armstrong.hatband import widgets from .models import RelatedContent from .models import RelatedType class RelatedContentInlineForm(forms.ModelForm): class Meta: widgets = { ...
Add in visualsearch for GFK
Add in visualsearch for GFK
Python
apache-2.0
texastribune/armstrong.apps.related_content,armstrong/armstrong.apps.related_content,armstrong/armstrong.apps.related_content,texastribune/armstrong.apps.related_content
from django.contrib import admin from django.contrib.contenttypes.generic import GenericTabularInline from .models import RelatedContent from .models import RelatedType class RelatedContentInline(GenericTabularInline): ct_field = "source_type" ct_fk_field = "source_id" model = RelatedContent admin.sit...
from django import forms from django.contrib import admin from django.contrib.contenttypes.generic import GenericTabularInline from armstrong.hatband import widgets from .models import RelatedContent from .models import RelatedType class RelatedContentInlineForm(forms.ModelForm): class Meta: widgets = { ...
<commit_before>from django.contrib import admin from django.contrib.contenttypes.generic import GenericTabularInline from .models import RelatedContent from .models import RelatedType class RelatedContentInline(GenericTabularInline): ct_field = "source_type" ct_fk_field = "source_id" model = RelatedCont...
from django import forms from django.contrib import admin from django.contrib.contenttypes.generic import GenericTabularInline from armstrong.hatband import widgets from .models import RelatedContent from .models import RelatedType class RelatedContentInlineForm(forms.ModelForm): class Meta: widgets = { ...
from django.contrib import admin from django.contrib.contenttypes.generic import GenericTabularInline from .models import RelatedContent from .models import RelatedType class RelatedContentInline(GenericTabularInline): ct_field = "source_type" ct_fk_field = "source_id" model = RelatedContent admin.sit...
<commit_before>from django.contrib import admin from django.contrib.contenttypes.generic import GenericTabularInline from .models import RelatedContent from .models import RelatedType class RelatedContentInline(GenericTabularInline): ct_field = "source_type" ct_fk_field = "source_id" model = RelatedCont...
f9e5ee2bcb088aec6f0d1c012caaaca05fe69560
lims/celery.py
lims/celery.py
import os from celery import Celery from celery.schedules import crontab os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'lims.settings') app = Celery('lims', broker=os.environ.get('REDIS_URL', 'redis://127.0.0.1:6379'), backend='redis') app.config_from_object('django.conf:settings', namespace='CELERY') app.autodisco...
import os from celery import Celery from celery.schedules import crontab os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'lims.settings') app = Celery('lims', broker=os.environ.get('REDIS_URL', 'redis://127.0.0.1:6379'), backend=os.environ.get('REDIS_URL', 'redis://127.0.0.1:6379')) app.config_from_objec...
Fix issue with backend not being recognised
Fix issue with backend not being recognised
Python
mit
GETLIMS/LIMS-Backend,GETLIMS/LIMS-Backend
import os from celery import Celery from celery.schedules import crontab os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'lims.settings') app = Celery('lims', broker=os.environ.get('REDIS_URL', 'redis://127.0.0.1:6379'), backend='redis') app.config_from_object('django.conf:settings', namespace='CELERY') app.autodisco...
import os from celery import Celery from celery.schedules import crontab os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'lims.settings') app = Celery('lims', broker=os.environ.get('REDIS_URL', 'redis://127.0.0.1:6379'), backend=os.environ.get('REDIS_URL', 'redis://127.0.0.1:6379')) app.config_from_objec...
<commit_before>import os from celery import Celery from celery.schedules import crontab os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'lims.settings') app = Celery('lims', broker=os.environ.get('REDIS_URL', 'redis://127.0.0.1:6379'), backend='redis') app.config_from_object('django.conf:settings', namespace='CELERY'...
import os from celery import Celery from celery.schedules import crontab os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'lims.settings') app = Celery('lims', broker=os.environ.get('REDIS_URL', 'redis://127.0.0.1:6379'), backend=os.environ.get('REDIS_URL', 'redis://127.0.0.1:6379')) app.config_from_objec...
import os from celery import Celery from celery.schedules import crontab os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'lims.settings') app = Celery('lims', broker=os.environ.get('REDIS_URL', 'redis://127.0.0.1:6379'), backend='redis') app.config_from_object('django.conf:settings', namespace='CELERY') app.autodisco...
<commit_before>import os from celery import Celery from celery.schedules import crontab os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'lims.settings') app = Celery('lims', broker=os.environ.get('REDIS_URL', 'redis://127.0.0.1:6379'), backend='redis') app.config_from_object('django.conf:settings', namespace='CELERY'...
027178a21083ceaa4151806e877a58ec7792f625
pysswords/__main__.py
pysswords/__main__.py
import argparse from getpass import getpass from pysswords.db import Database from pysswords.crypt import CryptOptions def get_args(): parser = argparse.ArgumentParser() parser.add_argument('path') parser.add_argument('--create', action='store_true') parser.add_argument('--password', default=None) ...
import argparse from getpass import getpass from pysswords.db import Database from pysswords.crypt import CryptOptions def get_args(): parser = argparse.ArgumentParser() main_group = parser.add_argument_group('Main options') main_group.add_argument('path', help='Path to database file') main_group.add_...
Refactor get args function from console interface
Refactor get args function from console interface
Python
mit
eiginn/passpie,scorphus/passpie,marcwebbie/passpie,scorphus/passpie,marcwebbie/pysswords,eiginn/passpie,marcwebbie/passpie
import argparse from getpass import getpass from pysswords.db import Database from pysswords.crypt import CryptOptions def get_args(): parser = argparse.ArgumentParser() parser.add_argument('path') parser.add_argument('--create', action='store_true') parser.add_argument('--password', default=None) ...
import argparse from getpass import getpass from pysswords.db import Database from pysswords.crypt import CryptOptions def get_args(): parser = argparse.ArgumentParser() main_group = parser.add_argument_group('Main options') main_group.add_argument('path', help='Path to database file') main_group.add_...
<commit_before>import argparse from getpass import getpass from pysswords.db import Database from pysswords.crypt import CryptOptions def get_args(): parser = argparse.ArgumentParser() parser.add_argument('path') parser.add_argument('--create', action='store_true') parser.add_argument('--password', de...
import argparse from getpass import getpass from pysswords.db import Database from pysswords.crypt import CryptOptions def get_args(): parser = argparse.ArgumentParser() main_group = parser.add_argument_group('Main options') main_group.add_argument('path', help='Path to database file') main_group.add_...
import argparse from getpass import getpass from pysswords.db import Database from pysswords.crypt import CryptOptions def get_args(): parser = argparse.ArgumentParser() parser.add_argument('path') parser.add_argument('--create', action='store_true') parser.add_argument('--password', default=None) ...
<commit_before>import argparse from getpass import getpass from pysswords.db import Database from pysswords.crypt import CryptOptions def get_args(): parser = argparse.ArgumentParser() parser.add_argument('path') parser.add_argument('--create', action='store_true') parser.add_argument('--password', de...
1b3c6c7dd8116ce0e523de4acd02aa19cedcfd70
appengine_config.py
appengine_config.py
# appengine_config.py from google.appengine.ext import vendor # Add any libraries install in the "lib" folder. vendor.add('lib')
# appengine_config.py from google.appengine.ext import vendor import os # Add any libraries install in the "lib" folder. vendor.add(os.path.join(os.path.dirname(os.path.realpath(__file__)), 'lib'))
Use new-style method of setting module path
Use new-style method of setting module path
Python
agpl-3.0
sleinen/zrcal,sleinen/zrcal
# appengine_config.py from google.appengine.ext import vendor # Add any libraries install in the "lib" folder. vendor.add('lib') Use new-style method of setting module path
# appengine_config.py from google.appengine.ext import vendor import os # Add any libraries install in the "lib" folder. vendor.add(os.path.join(os.path.dirname(os.path.realpath(__file__)), 'lib'))
<commit_before># appengine_config.py from google.appengine.ext import vendor # Add any libraries install in the "lib" folder. vendor.add('lib') <commit_msg>Use new-style method of setting module path<commit_after>
# appengine_config.py from google.appengine.ext import vendor import os # Add any libraries install in the "lib" folder. vendor.add(os.path.join(os.path.dirname(os.path.realpath(__file__)), 'lib'))
# appengine_config.py from google.appengine.ext import vendor # Add any libraries install in the "lib" folder. vendor.add('lib') Use new-style method of setting module path# appengine_config.py from google.appengine.ext import vendor import os # Add any libraries install in the "lib" folder. vendor.add(os.path.join(...
<commit_before># appengine_config.py from google.appengine.ext import vendor # Add any libraries install in the "lib" folder. vendor.add('lib') <commit_msg>Use new-style method of setting module path<commit_after># appengine_config.py from google.appengine.ext import vendor import os # Add any libraries install in t...
d28fa7874d7b0602eb5064d9f43b8b01674de69f
presentation/models.py
presentation/models.py
from django.db import models from model_utils.models import TimeStampedModel from warp.users.models import User class Presentation(TimeStampedModel): subject = models.CharField(max_length=50) author = models.ForeignKey(User, on_delete=models.CASCADE) views = models.IntegerField(default=0) is_public =...
from django.db import models from django.db.models import Manager from django.db.models import QuerySet from model_utils.models import TimeStampedModel from warp.users.models import User class PresentationQuerySet(QuerySet): def public(self): return self.filter(is_public=True) def authored_by(self, ...
Add presentation queryset and model manager
Add presentation queryset and model manager
Python
mit
SaturDJang/warp,SaturDJang/warp,SaturDJang/warp,SaturDJang/warp
from django.db import models from model_utils.models import TimeStampedModel from warp.users.models import User class Presentation(TimeStampedModel): subject = models.CharField(max_length=50) author = models.ForeignKey(User, on_delete=models.CASCADE) views = models.IntegerField(default=0) is_public =...
from django.db import models from django.db.models import Manager from django.db.models import QuerySet from model_utils.models import TimeStampedModel from warp.users.models import User class PresentationQuerySet(QuerySet): def public(self): return self.filter(is_public=True) def authored_by(self, ...
<commit_before>from django.db import models from model_utils.models import TimeStampedModel from warp.users.models import User class Presentation(TimeStampedModel): subject = models.CharField(max_length=50) author = models.ForeignKey(User, on_delete=models.CASCADE) views = models.IntegerField(default=0) ...
from django.db import models from django.db.models import Manager from django.db.models import QuerySet from model_utils.models import TimeStampedModel from warp.users.models import User class PresentationQuerySet(QuerySet): def public(self): return self.filter(is_public=True) def authored_by(self, ...
from django.db import models from model_utils.models import TimeStampedModel from warp.users.models import User class Presentation(TimeStampedModel): subject = models.CharField(max_length=50) author = models.ForeignKey(User, on_delete=models.CASCADE) views = models.IntegerField(default=0) is_public =...
<commit_before>from django.db import models from model_utils.models import TimeStampedModel from warp.users.models import User class Presentation(TimeStampedModel): subject = models.CharField(max_length=50) author = models.ForeignKey(User, on_delete=models.CASCADE) views = models.IntegerField(default=0) ...
8d55268fb3239dd429cb488a6c13e09d7839aa1a
registration/forms.py
registration/forms.py
from django import forms from registration import constants class CompanyForm(forms.Form): company_number = forms.CharField( label='Company number', help_text=('This is the 8-digit number on the company certificate of ' 'incorporation.'), max_length=8, min_lengt...
from django import forms from registration import constants class CompanyForm(forms.Form): company_number = forms.CharField( label='Company number', help_text=('This is the 8-digit number on the company certificate of ' 'incorporation.'), max_length=8, min_lengt...
Make description field a textarea in company form
Make description field a textarea in company form
Python
mit
uktrade/directory-ui-supplier,uktrade/directory-ui-supplier,uktrade/directory-ui-supplier
from django import forms from registration import constants class CompanyForm(forms.Form): company_number = forms.CharField( label='Company number', help_text=('This is the 8-digit number on the company certificate of ' 'incorporation.'), max_length=8, min_lengt...
from django import forms from registration import constants class CompanyForm(forms.Form): company_number = forms.CharField( label='Company number', help_text=('This is the 8-digit number on the company certificate of ' 'incorporation.'), max_length=8, min_lengt...
<commit_before>from django import forms from registration import constants class CompanyForm(forms.Form): company_number = forms.CharField( label='Company number', help_text=('This is the 8-digit number on the company certificate of ' 'incorporation.'), max_length=8, ...
from django import forms from registration import constants class CompanyForm(forms.Form): company_number = forms.CharField( label='Company number', help_text=('This is the 8-digit number on the company certificate of ' 'incorporation.'), max_length=8, min_lengt...
from django import forms from registration import constants class CompanyForm(forms.Form): company_number = forms.CharField( label='Company number', help_text=('This is the 8-digit number on the company certificate of ' 'incorporation.'), max_length=8, min_lengt...
<commit_before>from django import forms from registration import constants class CompanyForm(forms.Form): company_number = forms.CharField( label='Company number', help_text=('This is the 8-digit number on the company certificate of ' 'incorporation.'), max_length=8, ...
925f112863f128907862b230ed1767e10d91deed
run_tests.py
run_tests.py
import sys import os import subprocess def main(): executableName = './CuraEngine' if len(sys.argv) > 1: executableName = sys.argv[1] exitValue = 0 for subPath in os.listdir('testcase_models'): print 'Running test on %s' % (subPath) ret = subprocess.call([executableName, os.path.join('testcase_models', sub...
import sys import os import subprocess def main(): executableName = './CuraEngine' if len(sys.argv) > 1: executableName = sys.argv[1] exitValue = 0 for subPath in os.listdir('testcase_models'): print 'Running test on %s' % (subPath) ret = subprocess.call([executableName, '-o', 'temp.gcode', os.path.join('t...
Fix the python script that runs the tests.
Fix the python script that runs the tests.
Python
agpl-3.0
patrick3coffee/CuraTinyG,Ultimaker/CuraEngine,be3d/CuraEngine,uus169/CuraEngine,totalretribution/CuraEngine,be3d/CuraEngine,jacobdai/CuraEngine-1,electrocbd/CuraEngine,Intrinsically-Sublime/CuraEngine,robotustra/curax,derekhe/CuraEngine,uus169/CuraEngine,totalretribution/CuraEngine,phonyphonecall/CuraEngine,markwal/Cur...
import sys import os import subprocess def main(): executableName = './CuraEngine' if len(sys.argv) > 1: executableName = sys.argv[1] exitValue = 0 for subPath in os.listdir('testcase_models'): print 'Running test on %s' % (subPath) ret = subprocess.call([executableName, os.path.join('testcase_models', sub...
import sys import os import subprocess def main(): executableName = './CuraEngine' if len(sys.argv) > 1: executableName = sys.argv[1] exitValue = 0 for subPath in os.listdir('testcase_models'): print 'Running test on %s' % (subPath) ret = subprocess.call([executableName, '-o', 'temp.gcode', os.path.join('t...
<commit_before>import sys import os import subprocess def main(): executableName = './CuraEngine' if len(sys.argv) > 1: executableName = sys.argv[1] exitValue = 0 for subPath in os.listdir('testcase_models'): print 'Running test on %s' % (subPath) ret = subprocess.call([executableName, os.path.join('testca...
import sys import os import subprocess def main(): executableName = './CuraEngine' if len(sys.argv) > 1: executableName = sys.argv[1] exitValue = 0 for subPath in os.listdir('testcase_models'): print 'Running test on %s' % (subPath) ret = subprocess.call([executableName, '-o', 'temp.gcode', os.path.join('t...
import sys import os import subprocess def main(): executableName = './CuraEngine' if len(sys.argv) > 1: executableName = sys.argv[1] exitValue = 0 for subPath in os.listdir('testcase_models'): print 'Running test on %s' % (subPath) ret = subprocess.call([executableName, os.path.join('testcase_models', sub...
<commit_before>import sys import os import subprocess def main(): executableName = './CuraEngine' if len(sys.argv) > 1: executableName = sys.argv[1] exitValue = 0 for subPath in os.listdir('testcase_models'): print 'Running test on %s' % (subPath) ret = subprocess.call([executableName, os.path.join('testca...
a72c494c5c0f010192f39d84c13c90c0f0f8941e
sympycore/calculus/__init__.py
sympycore/calculus/__init__.py
from .algebra import Calculus, I, integrate, oo, undefined from .functions import exp, log, sqrt, sin, cos, tan, cot, pi, E Symbol = Calculus.Symbol Number = Calculus.Number Add = lambda *args: Calculus.Add(*map(Calculus.convert, args)) Mul = lambda *args: Calculus.Mul(*map(Calculus.convert, args)) Pow = la...
from .algebra import Calculus, I, integrate, oo, undefined from .functions import exp, log, sqrt, sin, cos, tan, cot, pi, E Symbol = Calculus.Symbol def Number(num, denom=None): n = Calculus.Number(Calculus.convert_coefficient(num)) if denom is None: return n return n / denom Add = l...
Fix calculus.Number to handle floats.
Fix calculus.Number to handle floats.
Python
bsd-3-clause
pearu/sympycore,pearu/sympycore
from .algebra import Calculus, I, integrate, oo, undefined from .functions import exp, log, sqrt, sin, cos, tan, cot, pi, E Symbol = Calculus.Symbol Number = Calculus.Number Add = lambda *args: Calculus.Add(*map(Calculus.convert, args)) Mul = lambda *args: Calculus.Mul(*map(Calculus.convert, args)) Pow = la...
from .algebra import Calculus, I, integrate, oo, undefined from .functions import exp, log, sqrt, sin, cos, tan, cot, pi, E Symbol = Calculus.Symbol def Number(num, denom=None): n = Calculus.Number(Calculus.convert_coefficient(num)) if denom is None: return n return n / denom Add = l...
<commit_before> from .algebra import Calculus, I, integrate, oo, undefined from .functions import exp, log, sqrt, sin, cos, tan, cot, pi, E Symbol = Calculus.Symbol Number = Calculus.Number Add = lambda *args: Calculus.Add(*map(Calculus.convert, args)) Mul = lambda *args: Calculus.Mul(*map(Calculus.convert, a...
from .algebra import Calculus, I, integrate, oo, undefined from .functions import exp, log, sqrt, sin, cos, tan, cot, pi, E Symbol = Calculus.Symbol def Number(num, denom=None): n = Calculus.Number(Calculus.convert_coefficient(num)) if denom is None: return n return n / denom Add = l...
from .algebra import Calculus, I, integrate, oo, undefined from .functions import exp, log, sqrt, sin, cos, tan, cot, pi, E Symbol = Calculus.Symbol Number = Calculus.Number Add = lambda *args: Calculus.Add(*map(Calculus.convert, args)) Mul = lambda *args: Calculus.Mul(*map(Calculus.convert, args)) Pow = la...
<commit_before> from .algebra import Calculus, I, integrate, oo, undefined from .functions import exp, log, sqrt, sin, cos, tan, cot, pi, E Symbol = Calculus.Symbol Number = Calculus.Number Add = lambda *args: Calculus.Add(*map(Calculus.convert, args)) Mul = lambda *args: Calculus.Mul(*map(Calculus.convert, a...
006a37819372ae9d161bece9c44a83bc26b7d43e
test/probe/__init__.py
test/probe/__init__.py
from test import get_config from swift.common.utils import config_true_value config = get_config('probe_test') CHECK_SERVER_TIMEOUT = int(config.get('check_server_timeout', 30)) VALIDATE_RSYNC = config_true_value(config.get('validate_rsync', False))
# Copyright (c) 2010-2017 OpenStack Foundation # # 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 agree...
Add license in swift code file
Add license in swift code file Source code should be licensed under the Apache 2.0 license. Add Apache License in swift/probe/__init__.py file. Change-Id: I3b6bc2ec5fe5caac87ee23f637dbcc7a5d8fc331
Python
apache-2.0
tipabu/swift,tipabu/swift,psachin/swift,smerritt/swift,smerritt/swift,smerritt/swift,matthewoliver/swift,clayg/swift,notmyname/swift,nadeemsyed/swift,swiftstack/swift,openstack/swift,matthewoliver/swift,matthewoliver/swift,nadeemsyed/swift,tipabu/swift,openstack/swift,psachin/swift,openstack/swift,swiftstack/swift,psac...
from test import get_config from swift.common.utils import config_true_value config = get_config('probe_test') CHECK_SERVER_TIMEOUT = int(config.get('check_server_timeout', 30)) VALIDATE_RSYNC = config_true_value(config.get('validate_rsync', False)) Add license in swift code file Source code should be licensed under t...
# Copyright (c) 2010-2017 OpenStack Foundation # # 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 agree...
<commit_before>from test import get_config from swift.common.utils import config_true_value config = get_config('probe_test') CHECK_SERVER_TIMEOUT = int(config.get('check_server_timeout', 30)) VALIDATE_RSYNC = config_true_value(config.get('validate_rsync', False)) <commit_msg>Add license in swift code file Source code...
# Copyright (c) 2010-2017 OpenStack Foundation # # 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 agree...
from test import get_config from swift.common.utils import config_true_value config = get_config('probe_test') CHECK_SERVER_TIMEOUT = int(config.get('check_server_timeout', 30)) VALIDATE_RSYNC = config_true_value(config.get('validate_rsync', False)) Add license in swift code file Source code should be licensed under t...
<commit_before>from test import get_config from swift.common.utils import config_true_value config = get_config('probe_test') CHECK_SERVER_TIMEOUT = int(config.get('check_server_timeout', 30)) VALIDATE_RSYNC = config_true_value(config.get('validate_rsync', False)) <commit_msg>Add license in swift code file Source code...
aec355326b0f6116d6ffb1b0aeb7e35c2074c9ed
ebcf_alexa.py
ebcf_alexa.py
""" Entry point for lambda """ from _ebcf_alexa import interaction_model import logging LOG = logging.getLogger() LOG.setLevel(logging.DEBUG) def lambda_handler(event, context) -> dict: """ Route the incoming request based on type (LaunchRequest, IntentRequest, etc.) The JSON body of the request is provided i...
""" Entry point for lambda """ from _ebcf_alexa import interaction_model, incoming_types, speechlet import logging LOG = logging.getLogger() LOG.setLevel(logging.DEBUG) ALEXA_SKILL_ID = 'amzn1.ask.skill.d6f2f7c4-7689-410d-9c35-8f8baae37969' def lambda_handler(event_dict: dict, context) -> dict: """ Route the inc...
Update lambda handler function to dispatch to interaction model
Update lambda handler function to dispatch to interaction model
Python
mit
dmotles/ebcf-alexa
""" Entry point for lambda """ from _ebcf_alexa import interaction_model import logging LOG = logging.getLogger() LOG.setLevel(logging.DEBUG) def lambda_handler(event, context) -> dict: """ Route the incoming request based on type (LaunchRequest, IntentRequest, etc.) The JSON body of the request is provided i...
""" Entry point for lambda """ from _ebcf_alexa import interaction_model, incoming_types, speechlet import logging LOG = logging.getLogger() LOG.setLevel(logging.DEBUG) ALEXA_SKILL_ID = 'amzn1.ask.skill.d6f2f7c4-7689-410d-9c35-8f8baae37969' def lambda_handler(event_dict: dict, context) -> dict: """ Route the inc...
<commit_before>""" Entry point for lambda """ from _ebcf_alexa import interaction_model import logging LOG = logging.getLogger() LOG.setLevel(logging.DEBUG) def lambda_handler(event, context) -> dict: """ Route the incoming request based on type (LaunchRequest, IntentRequest, etc.) The JSON body of the reques...
""" Entry point for lambda """ from _ebcf_alexa import interaction_model, incoming_types, speechlet import logging LOG = logging.getLogger() LOG.setLevel(logging.DEBUG) ALEXA_SKILL_ID = 'amzn1.ask.skill.d6f2f7c4-7689-410d-9c35-8f8baae37969' def lambda_handler(event_dict: dict, context) -> dict: """ Route the inc...
""" Entry point for lambda """ from _ebcf_alexa import interaction_model import logging LOG = logging.getLogger() LOG.setLevel(logging.DEBUG) def lambda_handler(event, context) -> dict: """ Route the incoming request based on type (LaunchRequest, IntentRequest, etc.) The JSON body of the request is provided i...
<commit_before>""" Entry point for lambda """ from _ebcf_alexa import interaction_model import logging LOG = logging.getLogger() LOG.setLevel(logging.DEBUG) def lambda_handler(event, context) -> dict: """ Route the incoming request based on type (LaunchRequest, IntentRequest, etc.) The JSON body of the reques...
7df2e3bc6f651b9caa45d57a1cd21eac374148a3
compile/00-shortcuts.dg.py
compile/00-shortcuts.dg.py
builtins = import operator = import functools = import importlib = import # Choose a function based on the number of arguments. varary = (*fs) -> (*xs) -> (fs !! (len: xs - 1)): (*): xs builtins . $ = (f, *xs) -> f: (*): xs builtins . : = (f, *xs) -> f: (*): xs builtins . , = (*xs) -> xs builtins . < = operator.l...
builtins = import operator = import functools = import importlib = import # Choose a function based on the number of arguments. varary = (*fs) -> (*xs) -> (fs !! (len: xs)): (*): xs builtins . $ = (f, *xs) -> f: (*): xs builtins . : = (f, *xs) -> f: (*): xs builtins . , = (*xs) -> xs builtins . < = operator.lt bu...
Fix the infinite recursion when calling runtime +/-.
Fix the infinite recursion when calling runtime +/-.
Python
mit
pyos/dg
builtins = import operator = import functools = import importlib = import # Choose a function based on the number of arguments. varary = (*fs) -> (*xs) -> (fs !! (len: xs - 1)): (*): xs builtins . $ = (f, *xs) -> f: (*): xs builtins . : = (f, *xs) -> f: (*): xs builtins . , = (*xs) -> xs builtins . < = operator.l...
builtins = import operator = import functools = import importlib = import # Choose a function based on the number of arguments. varary = (*fs) -> (*xs) -> (fs !! (len: xs)): (*): xs builtins . $ = (f, *xs) -> f: (*): xs builtins . : = (f, *xs) -> f: (*): xs builtins . , = (*xs) -> xs builtins . < = operator.lt bu...
<commit_before>builtins = import operator = import functools = import importlib = import # Choose a function based on the number of arguments. varary = (*fs) -> (*xs) -> (fs !! (len: xs - 1)): (*): xs builtins . $ = (f, *xs) -> f: (*): xs builtins . : = (f, *xs) -> f: (*): xs builtins . , = (*xs) -> xs builtins . ...
builtins = import operator = import functools = import importlib = import # Choose a function based on the number of arguments. varary = (*fs) -> (*xs) -> (fs !! (len: xs)): (*): xs builtins . $ = (f, *xs) -> f: (*): xs builtins . : = (f, *xs) -> f: (*): xs builtins . , = (*xs) -> xs builtins . < = operator.lt bu...
builtins = import operator = import functools = import importlib = import # Choose a function based on the number of arguments. varary = (*fs) -> (*xs) -> (fs !! (len: xs - 1)): (*): xs builtins . $ = (f, *xs) -> f: (*): xs builtins . : = (f, *xs) -> f: (*): xs builtins . , = (*xs) -> xs builtins . < = operator.l...
<commit_before>builtins = import operator = import functools = import importlib = import # Choose a function based on the number of arguments. varary = (*fs) -> (*xs) -> (fs !! (len: xs - 1)): (*): xs builtins . $ = (f, *xs) -> f: (*): xs builtins . : = (f, *xs) -> f: (*): xs builtins . , = (*xs) -> xs builtins . ...
678bd63609d80239668d596ce6fffe2ddd70f7d2
conf_site/settings/travis-ci.py
conf_site/settings/travis-ci.py
from base import * # noqa: F401,F403 DEBUG = False TEMPLATE_DEBUG = DEBUG DATABASES = { "default": { "ENGINE": "django.db.backends.postgresql_psycopg2", "NAME": "travis", "USER": "", "PASSWORD": "", "HOST": "", "PORT": "", } } SECRET_KEY = "foobar" STATICFILES_S...
from base import * # noqa: F401,F403 DEBUG = False TEMPLATE_DEBUG = DEBUG DATABASES = { "default": { "ENGINE": "django.db.backends.postgresql_psycopg2", "NAME": "travis", "USER": "", "PASSWORD": "", "HOST": "", "PORT": "", } } GOOGLE_ANALYTICS_PROPERTY_ID = "UA-...
Add fake Google Analytics ID for Travis-CI.
Add fake Google Analytics ID for Travis-CI. Add GOOGLE_ANALYTICS_PROPERTY_ID setting to Travis CI settings so that we can load webpages without django-analytical causing errors. Note that an empty string does not work.
Python
mit
pydata/conf_site,pydata/conf_site,pydata/conf_site
from base import * # noqa: F401,F403 DEBUG = False TEMPLATE_DEBUG = DEBUG DATABASES = { "default": { "ENGINE": "django.db.backends.postgresql_psycopg2", "NAME": "travis", "USER": "", "PASSWORD": "", "HOST": "", "PORT": "", } } SECRET_KEY = "foobar" STATICFILES_S...
from base import * # noqa: F401,F403 DEBUG = False TEMPLATE_DEBUG = DEBUG DATABASES = { "default": { "ENGINE": "django.db.backends.postgresql_psycopg2", "NAME": "travis", "USER": "", "PASSWORD": "", "HOST": "", "PORT": "", } } GOOGLE_ANALYTICS_PROPERTY_ID = "UA-...
<commit_before>from base import * # noqa: F401,F403 DEBUG = False TEMPLATE_DEBUG = DEBUG DATABASES = { "default": { "ENGINE": "django.db.backends.postgresql_psycopg2", "NAME": "travis", "USER": "", "PASSWORD": "", "HOST": "", "PORT": "", } } SECRET_KEY = "foobar...
from base import * # noqa: F401,F403 DEBUG = False TEMPLATE_DEBUG = DEBUG DATABASES = { "default": { "ENGINE": "django.db.backends.postgresql_psycopg2", "NAME": "travis", "USER": "", "PASSWORD": "", "HOST": "", "PORT": "", } } GOOGLE_ANALYTICS_PROPERTY_ID = "UA-...
from base import * # noqa: F401,F403 DEBUG = False TEMPLATE_DEBUG = DEBUG DATABASES = { "default": { "ENGINE": "django.db.backends.postgresql_psycopg2", "NAME": "travis", "USER": "", "PASSWORD": "", "HOST": "", "PORT": "", } } SECRET_KEY = "foobar" STATICFILES_S...
<commit_before>from base import * # noqa: F401,F403 DEBUG = False TEMPLATE_DEBUG = DEBUG DATABASES = { "default": { "ENGINE": "django.db.backends.postgresql_psycopg2", "NAME": "travis", "USER": "", "PASSWORD": "", "HOST": "", "PORT": "", } } SECRET_KEY = "foobar...
702fabfc96b3b07efb4d5c30a6807031b803a551
kolibri/deployment/default/wsgi.py
kolibri/deployment/default/wsgi.py
""" WSGI config for kolibri project. It exposes the WSGI callable as a module-level variable named ``application``. For more information on this file, see https://docs.djangoproject.com/en/1.8/howto/deployment/wsgi/ """ import logging import os import time from django.core.wsgi import get_wsgi_application from djang...
""" WSGI config for kolibri project. It exposes the WSGI callable as a module-level variable named ``application``. For more information on this file, see https://docs.djangoproject.com/en/1.8/howto/deployment/wsgi/ """ import logging import os import time from django.core.wsgi import get_wsgi_application from djang...
Add kolibri version to server start logging.
Add kolibri version to server start logging.
Python
mit
indirectlylit/kolibri,learningequality/kolibri,learningequality/kolibri,indirectlylit/kolibri,learningequality/kolibri,mrpau/kolibri,learningequality/kolibri,mrpau/kolibri,indirectlylit/kolibri,indirectlylit/kolibri,mrpau/kolibri,mrpau/kolibri
""" WSGI config for kolibri project. It exposes the WSGI callable as a module-level variable named ``application``. For more information on this file, see https://docs.djangoproject.com/en/1.8/howto/deployment/wsgi/ """ import logging import os import time from django.core.wsgi import get_wsgi_application from djang...
""" WSGI config for kolibri project. It exposes the WSGI callable as a module-level variable named ``application``. For more information on this file, see https://docs.djangoproject.com/en/1.8/howto/deployment/wsgi/ """ import logging import os import time from django.core.wsgi import get_wsgi_application from djang...
<commit_before>""" WSGI config for kolibri project. It exposes the WSGI callable as a module-level variable named ``application``. For more information on this file, see https://docs.djangoproject.com/en/1.8/howto/deployment/wsgi/ """ import logging import os import time from django.core.wsgi import get_wsgi_applica...
""" WSGI config for kolibri project. It exposes the WSGI callable as a module-level variable named ``application``. For more information on this file, see https://docs.djangoproject.com/en/1.8/howto/deployment/wsgi/ """ import logging import os import time from django.core.wsgi import get_wsgi_application from djang...
""" WSGI config for kolibri project. It exposes the WSGI callable as a module-level variable named ``application``. For more information on this file, see https://docs.djangoproject.com/en/1.8/howto/deployment/wsgi/ """ import logging import os import time from django.core.wsgi import get_wsgi_application from djang...
<commit_before>""" WSGI config for kolibri project. It exposes the WSGI callable as a module-level variable named ``application``. For more information on this file, see https://docs.djangoproject.com/en/1.8/howto/deployment/wsgi/ """ import logging import os import time from django.core.wsgi import get_wsgi_applica...
87d13bddb5f98438e959c3aafcf1d3a936dd264b
turbustat/statistics/statistics_list.py
turbustat/statistics/statistics_list.py
# Licensed under an MIT open source license - see LICENSE ''' Returns a list of all available distance metrics ''' statistics_list = ["Wavelet", "MVC", "PSpec", "Bispectrum", "DeltaVariance", "Genus", "VCS", "VCA", "Tsallis", "PCA", "SCF", "Cramer", "Skewness", "Kurtosis", "VCS_Den...
# Licensed under an MIT open source license - see LICENSE ''' Returns a list of all available distance metrics ''' statistics_list = ["Wavelet", "MVC", "PSpec", "Bispectrum", "DeltaVariance", "Genus", "VCS", "VCA", "Tsallis", "PCA", "SCF", "Cramer", "Skewness", "Kurtosis", "VCS_Den...
Remove PDF_AD from stats list
Remove PDF_AD from stats list
Python
mit
Astroua/TurbuStat,e-koch/TurbuStat
# Licensed under an MIT open source license - see LICENSE ''' Returns a list of all available distance metrics ''' statistics_list = ["Wavelet", "MVC", "PSpec", "Bispectrum", "DeltaVariance", "Genus", "VCS", "VCA", "Tsallis", "PCA", "SCF", "Cramer", "Skewness", "Kurtosis", "VCS_Den...
# Licensed under an MIT open source license - see LICENSE ''' Returns a list of all available distance metrics ''' statistics_list = ["Wavelet", "MVC", "PSpec", "Bispectrum", "DeltaVariance", "Genus", "VCS", "VCA", "Tsallis", "PCA", "SCF", "Cramer", "Skewness", "Kurtosis", "VCS_Den...
<commit_before># Licensed under an MIT open source license - see LICENSE ''' Returns a list of all available distance metrics ''' statistics_list = ["Wavelet", "MVC", "PSpec", "Bispectrum", "DeltaVariance", "Genus", "VCS", "VCA", "Tsallis", "PCA", "SCF", "Cramer", "Skewness", "Kurt...
# Licensed under an MIT open source license - see LICENSE ''' Returns a list of all available distance metrics ''' statistics_list = ["Wavelet", "MVC", "PSpec", "Bispectrum", "DeltaVariance", "Genus", "VCS", "VCA", "Tsallis", "PCA", "SCF", "Cramer", "Skewness", "Kurtosis", "VCS_Den...
# Licensed under an MIT open source license - see LICENSE ''' Returns a list of all available distance metrics ''' statistics_list = ["Wavelet", "MVC", "PSpec", "Bispectrum", "DeltaVariance", "Genus", "VCS", "VCA", "Tsallis", "PCA", "SCF", "Cramer", "Skewness", "Kurtosis", "VCS_Den...
<commit_before># Licensed under an MIT open source license - see LICENSE ''' Returns a list of all available distance metrics ''' statistics_list = ["Wavelet", "MVC", "PSpec", "Bispectrum", "DeltaVariance", "Genus", "VCS", "VCA", "Tsallis", "PCA", "SCF", "Cramer", "Skewness", "Kurt...
202027ac9a2680ba8825d488c146d152beaa4b5d
tests/test_coursera.py
tests/test_coursera.py
import unittest from mooc_aggregator_restful_api import coursera class CourseraTestCase(unittest.TestCase): ''' Unit Tests for module udacity ''' def setUp(self): self.coursera_test_object = coursera.CourseraAPI() def test_coursera_api_courses_response(self): self.assertEqual(s...
import unittest from mooc_aggregator_restful_api import coursera class CourseraTestCase(unittest.TestCase): ''' Unit Tests for module udacity ''' def setUp(self): self.coursera_test_object = coursera.CourseraAPI() def test_coursera_api_courses_response(self): self.assertEqual(s...
Remove test for sessions for Coursera API
Remove test for sessions for Coursera API
Python
mit
ueg1990/mooc_aggregator_restful_api
import unittest from mooc_aggregator_restful_api import coursera class CourseraTestCase(unittest.TestCase): ''' Unit Tests for module udacity ''' def setUp(self): self.coursera_test_object = coursera.CourseraAPI() def test_coursera_api_courses_response(self): self.assertEqual(s...
import unittest from mooc_aggregator_restful_api import coursera class CourseraTestCase(unittest.TestCase): ''' Unit Tests for module udacity ''' def setUp(self): self.coursera_test_object = coursera.CourseraAPI() def test_coursera_api_courses_response(self): self.assertEqual(s...
<commit_before>import unittest from mooc_aggregator_restful_api import coursera class CourseraTestCase(unittest.TestCase): ''' Unit Tests for module udacity ''' def setUp(self): self.coursera_test_object = coursera.CourseraAPI() def test_coursera_api_courses_response(self): sel...
import unittest from mooc_aggregator_restful_api import coursera class CourseraTestCase(unittest.TestCase): ''' Unit Tests for module udacity ''' def setUp(self): self.coursera_test_object = coursera.CourseraAPI() def test_coursera_api_courses_response(self): self.assertEqual(s...
import unittest from mooc_aggregator_restful_api import coursera class CourseraTestCase(unittest.TestCase): ''' Unit Tests for module udacity ''' def setUp(self): self.coursera_test_object = coursera.CourseraAPI() def test_coursera_api_courses_response(self): self.assertEqual(s...
<commit_before>import unittest from mooc_aggregator_restful_api import coursera class CourseraTestCase(unittest.TestCase): ''' Unit Tests for module udacity ''' def setUp(self): self.coursera_test_object = coursera.CourseraAPI() def test_coursera_api_courses_response(self): sel...
8db7072cef4c5ddbf408cdf1740e926f4d78747b
Functions/echo-python/lambda_function.py
Functions/echo-python/lambda_function.py
"""Created By: Andrew Ryan DeFilippis""" print('Lambda cold-start...') from json import dumps, loads # Disable 'testing_locally' when deploying to AWS Lambda testing_locally = False verbose = False class CWLogs(object): def __init__(self, context): self.context = context def event(self, message, ...
"""Created By: Andrew Ryan DeFilippis""" print('Lambda cold-start...') from json import dumps, loads # Disable 'testing_locally' when deploying to AWS Lambda testing_locally = True verbose = True class CWLogs(object): """Define the structure of log events to match all other CloudWatch Log Events logged by AWS ...
Add documentation, and modify default values
Add documentation, and modify default values
Python
apache-2.0
andrewdefilippis/aws-lambda
"""Created By: Andrew Ryan DeFilippis""" print('Lambda cold-start...') from json import dumps, loads # Disable 'testing_locally' when deploying to AWS Lambda testing_locally = False verbose = False class CWLogs(object): def __init__(self, context): self.context = context def event(self, message, ...
"""Created By: Andrew Ryan DeFilippis""" print('Lambda cold-start...') from json import dumps, loads # Disable 'testing_locally' when deploying to AWS Lambda testing_locally = True verbose = True class CWLogs(object): """Define the structure of log events to match all other CloudWatch Log Events logged by AWS ...
<commit_before>"""Created By: Andrew Ryan DeFilippis""" print('Lambda cold-start...') from json import dumps, loads # Disable 'testing_locally' when deploying to AWS Lambda testing_locally = False verbose = False class CWLogs(object): def __init__(self, context): self.context = context def event(...
"""Created By: Andrew Ryan DeFilippis""" print('Lambda cold-start...') from json import dumps, loads # Disable 'testing_locally' when deploying to AWS Lambda testing_locally = True verbose = True class CWLogs(object): """Define the structure of log events to match all other CloudWatch Log Events logged by AWS ...
"""Created By: Andrew Ryan DeFilippis""" print('Lambda cold-start...') from json import dumps, loads # Disable 'testing_locally' when deploying to AWS Lambda testing_locally = False verbose = False class CWLogs(object): def __init__(self, context): self.context = context def event(self, message, ...
<commit_before>"""Created By: Andrew Ryan DeFilippis""" print('Lambda cold-start...') from json import dumps, loads # Disable 'testing_locally' when deploying to AWS Lambda testing_locally = False verbose = False class CWLogs(object): def __init__(self, context): self.context = context def event(...
5de08e3b7be029a3a10dab9e4a259b046488d4af
examples/django_app/tests/test_integration.py
examples/django_app/tests/test_integration.py
from django.test import TestCase from django.core.urlresolvers import reverse import unittest class ApiIntegrationTestCase(TestCase): def setUp(self): super(ApiIntegrationTestCase, self).setUp() self.api_url = reverse('chatterbot:chatterbot') def _get_json(self, response): import jso...
from django.test import TestCase from django.core.urlresolvers import reverse import unittest class ApiIntegrationTestCase(TestCase): def setUp(self): super(ApiIntegrationTestCase, self).setUp() self.api_url = reverse('chatterbot:chatterbot') def tearDown(self): super(ApiIntegrationT...
Add test method to clear response queue.
Add test method to clear response queue.
Python
bsd-3-clause
Reinaesaya/OUIRL-ChatBot,Gustavo6046/ChatterBot,maclogan/VirtualPenPal,davizucon/ChatterBot,gunthercox/ChatterBot,Reinaesaya/OUIRL-ChatBot,vkosuri/ChatterBot
from django.test import TestCase from django.core.urlresolvers import reverse import unittest class ApiIntegrationTestCase(TestCase): def setUp(self): super(ApiIntegrationTestCase, self).setUp() self.api_url = reverse('chatterbot:chatterbot') def _get_json(self, response): import jso...
from django.test import TestCase from django.core.urlresolvers import reverse import unittest class ApiIntegrationTestCase(TestCase): def setUp(self): super(ApiIntegrationTestCase, self).setUp() self.api_url = reverse('chatterbot:chatterbot') def tearDown(self): super(ApiIntegrationT...
<commit_before>from django.test import TestCase from django.core.urlresolvers import reverse import unittest class ApiIntegrationTestCase(TestCase): def setUp(self): super(ApiIntegrationTestCase, self).setUp() self.api_url = reverse('chatterbot:chatterbot') def _get_json(self, response): ...
from django.test import TestCase from django.core.urlresolvers import reverse import unittest class ApiIntegrationTestCase(TestCase): def setUp(self): super(ApiIntegrationTestCase, self).setUp() self.api_url = reverse('chatterbot:chatterbot') def tearDown(self): super(ApiIntegrationT...
from django.test import TestCase from django.core.urlresolvers import reverse import unittest class ApiIntegrationTestCase(TestCase): def setUp(self): super(ApiIntegrationTestCase, self).setUp() self.api_url = reverse('chatterbot:chatterbot') def _get_json(self, response): import jso...
<commit_before>from django.test import TestCase from django.core.urlresolvers import reverse import unittest class ApiIntegrationTestCase(TestCase): def setUp(self): super(ApiIntegrationTestCase, self).setUp() self.api_url = reverse('chatterbot:chatterbot') def _get_json(self, response): ...
3ea9a14cdc4e19595ae8b14667d86ae42ba3d58c
astropy/wcs/tests/extension/test_extension.py
astropy/wcs/tests/extension/test_extension.py
# Licensed under a 3-clause BSD style license - see LICENSE.rst from __future__ import absolute_import, division, print_function, unicode_literals import os import subprocess import sys def test_wcsapi_extension(tmpdir): # Test that we can build a simple C extension with the astropy.wcs C API setup_path = ...
# Licensed under a 3-clause BSD style license - see LICENSE.rst from __future__ import absolute_import, division, print_function, unicode_literals import os import subprocess import sys def test_wcsapi_extension(tmpdir): # Test that we can build a simple C extension with the astropy.wcs C API setup_path = ...
Make work when astropy isn't installed.
Make work when astropy isn't installed.
Python
bsd-3-clause
dhomeier/astropy,dhomeier/astropy,StuartLittlefair/astropy,joergdietrich/astropy,astropy/astropy,kelle/astropy,mhvk/astropy,stargaser/astropy,larrybradley/astropy,kelle/astropy,kelle/astropy,dhomeier/astropy,mhvk/astropy,joergdietrich/astropy,kelle/astropy,mhvk/astropy,astropy/astropy,saimn/astropy,MSeifert04/astropy,D...
# Licensed under a 3-clause BSD style license - see LICENSE.rst from __future__ import absolute_import, division, print_function, unicode_literals import os import subprocess import sys def test_wcsapi_extension(tmpdir): # Test that we can build a simple C extension with the astropy.wcs C API setup_path = ...
# Licensed under a 3-clause BSD style license - see LICENSE.rst from __future__ import absolute_import, division, print_function, unicode_literals import os import subprocess import sys def test_wcsapi_extension(tmpdir): # Test that we can build a simple C extension with the astropy.wcs C API setup_path = ...
<commit_before># Licensed under a 3-clause BSD style license - see LICENSE.rst from __future__ import absolute_import, division, print_function, unicode_literals import os import subprocess import sys def test_wcsapi_extension(tmpdir): # Test that we can build a simple C extension with the astropy.wcs C API ...
# Licensed under a 3-clause BSD style license - see LICENSE.rst from __future__ import absolute_import, division, print_function, unicode_literals import os import subprocess import sys def test_wcsapi_extension(tmpdir): # Test that we can build a simple C extension with the astropy.wcs C API setup_path = ...
# Licensed under a 3-clause BSD style license - see LICENSE.rst from __future__ import absolute_import, division, print_function, unicode_literals import os import subprocess import sys def test_wcsapi_extension(tmpdir): # Test that we can build a simple C extension with the astropy.wcs C API setup_path = ...
<commit_before># Licensed under a 3-clause BSD style license - see LICENSE.rst from __future__ import absolute_import, division, print_function, unicode_literals import os import subprocess import sys def test_wcsapi_extension(tmpdir): # Test that we can build a simple C extension with the astropy.wcs C API ...
ecc666f7dfc7ace45692c8759acff6d46bc1c43e
tests/drivers/test-kml21.py
tests/drivers/test-kml21.py
import pyxb.binding.generate import os.path schema_path = '%s/../../pyxb/standard/schemas/kml21.xsd' % (os.path.dirname(__file__),) code = pyxb.binding.generate.GeneratePython(schema_file=schema_path) rv = compile(code, 'test', 'exec') eval(rv) from pyxb.exceptions_ import * import unittest class TestKML (unittest....
import pyxb.binding.generate import os.path schema_path = '%s/../../pyxb/standard/schemas/kml.xsd' % (os.path.dirname(__file__),) code = pyxb.binding.generate.GeneratePython(schema_file=schema_path) rv = compile(code, 'test', 'exec') eval(rv) from pyxb.exceptions_ import * import unittest class TestKML (unittest.Te...
Change name to reference new schema name
Change name to reference new schema name
Python
apache-2.0
CantemoInternal/pyxb,jonfoster/pyxb-upstream-mirror,balanced/PyXB,jonfoster/pyxb-upstream-mirror,jonfoster/pyxb1,pabigot/pyxb,balanced/PyXB,jonfoster/pyxb2,pabigot/pyxb,jonfoster/pyxb-upstream-mirror,balanced/PyXB,jonfoster/pyxb1,CantemoInternal/pyxb,jonfoster/pyxb2,CantemoInternal/pyxb,jonfoster/pyxb2
import pyxb.binding.generate import os.path schema_path = '%s/../../pyxb/standard/schemas/kml21.xsd' % (os.path.dirname(__file__),) code = pyxb.binding.generate.GeneratePython(schema_file=schema_path) rv = compile(code, 'test', 'exec') eval(rv) from pyxb.exceptions_ import * import unittest class TestKML (unittest....
import pyxb.binding.generate import os.path schema_path = '%s/../../pyxb/standard/schemas/kml.xsd' % (os.path.dirname(__file__),) code = pyxb.binding.generate.GeneratePython(schema_file=schema_path) rv = compile(code, 'test', 'exec') eval(rv) from pyxb.exceptions_ import * import unittest class TestKML (unittest.Te...
<commit_before>import pyxb.binding.generate import os.path schema_path = '%s/../../pyxb/standard/schemas/kml21.xsd' % (os.path.dirname(__file__),) code = pyxb.binding.generate.GeneratePython(schema_file=schema_path) rv = compile(code, 'test', 'exec') eval(rv) from pyxb.exceptions_ import * import unittest class Tes...
import pyxb.binding.generate import os.path schema_path = '%s/../../pyxb/standard/schemas/kml.xsd' % (os.path.dirname(__file__),) code = pyxb.binding.generate.GeneratePython(schema_file=schema_path) rv = compile(code, 'test', 'exec') eval(rv) from pyxb.exceptions_ import * import unittest class TestKML (unittest.Te...
import pyxb.binding.generate import os.path schema_path = '%s/../../pyxb/standard/schemas/kml21.xsd' % (os.path.dirname(__file__),) code = pyxb.binding.generate.GeneratePython(schema_file=schema_path) rv = compile(code, 'test', 'exec') eval(rv) from pyxb.exceptions_ import * import unittest class TestKML (unittest....
<commit_before>import pyxb.binding.generate import os.path schema_path = '%s/../../pyxb/standard/schemas/kml21.xsd' % (os.path.dirname(__file__),) code = pyxb.binding.generate.GeneratePython(schema_file=schema_path) rv = compile(code, 'test', 'exec') eval(rv) from pyxb.exceptions_ import * import unittest class Tes...
493e6e96795fa812a6a3890ffde8004a2153cb75
util/plot.py
util/plot.py
from __future__ import division import numpy as NP import pylab as PL from mpl_toolkits.axes_grid1 import make_axes_locatable def centers2edges(x): """ Given the array of (assumed) uniformly spaced coordinate centers *x*, return the array of cell edge coordinates. """ delta = x[1] - x[0] retu...
from __future__ import division import numpy as NP import pylab as PL from mpl_toolkits.axes_grid1 import make_axes_locatable def centers2edges(x): """ Given the array of (assumed) uniformly spaced coordinate centers *x*, return the array of cell edge coordinates. """ delta = x[1] - x[0] retu...
Set axes back to input axes at end of add_colorbar.
Set axes back to input axes at end of add_colorbar.
Python
mit
butala/pyrsss
from __future__ import division import numpy as NP import pylab as PL from mpl_toolkits.axes_grid1 import make_axes_locatable def centers2edges(x): """ Given the array of (assumed) uniformly spaced coordinate centers *x*, return the array of cell edge coordinates. """ delta = x[1] - x[0] retu...
from __future__ import division import numpy as NP import pylab as PL from mpl_toolkits.axes_grid1 import make_axes_locatable def centers2edges(x): """ Given the array of (assumed) uniformly spaced coordinate centers *x*, return the array of cell edge coordinates. """ delta = x[1] - x[0] retu...
<commit_before>from __future__ import division import numpy as NP import pylab as PL from mpl_toolkits.axes_grid1 import make_axes_locatable def centers2edges(x): """ Given the array of (assumed) uniformly spaced coordinate centers *x*, return the array of cell edge coordinates. """ delta = x[1] ...
from __future__ import division import numpy as NP import pylab as PL from mpl_toolkits.axes_grid1 import make_axes_locatable def centers2edges(x): """ Given the array of (assumed) uniformly spaced coordinate centers *x*, return the array of cell edge coordinates. """ delta = x[1] - x[0] retu...
from __future__ import division import numpy as NP import pylab as PL from mpl_toolkits.axes_grid1 import make_axes_locatable def centers2edges(x): """ Given the array of (assumed) uniformly spaced coordinate centers *x*, return the array of cell edge coordinates. """ delta = x[1] - x[0] retu...
<commit_before>from __future__ import division import numpy as NP import pylab as PL from mpl_toolkits.axes_grid1 import make_axes_locatable def centers2edges(x): """ Given the array of (assumed) uniformly spaced coordinate centers *x*, return the array of cell edge coordinates. """ delta = x[1] ...
e349996bc98c57464f25152bdd0ab663398b6a46
deploy/travis/local_settings.py
deploy/travis/local_settings.py
# Kegbot local settings, for travis-ci.org build # NEVER set DEBUG to `True` in production. import os HOME = os.environ['HOME'] DEBUG = True TEMPLATE_DEBUG = DEBUG DATABASES = {'default': {'ENGINE': 'django.db.backends.sqlite3', 'NAME': HOME + '/kegbot-data/kegbot.sqlite'}} KEGBOT_ROOT = HOME + '/kegbot-data' MED...
# Kegbot local settings, for travis-ci.org build # NEVER set DEBUG to `True` in production. import os HOME = os.environ['HOME'] DEBUG = True TEMPLATE_DEBUG = DEBUG DATABASES = {'default': {'ENGINE': 'django.db.backends.sqlite3', 'NAME': HOME + '/kegbot-data/kegbot.sqlite'}} KEGBOT_ROOT = HOME + '/kegbot-data' MED...
Use console e-mail backend when running under Travis.
Use console e-mail backend when running under Travis.
Python
mit
Kegbot/kegbot-server,Kegbot/kegbot-server,Kegbot/kegbot-server,Kegbot/kegbot-server,Kegbot/kegbot-server
# Kegbot local settings, for travis-ci.org build # NEVER set DEBUG to `True` in production. import os HOME = os.environ['HOME'] DEBUG = True TEMPLATE_DEBUG = DEBUG DATABASES = {'default': {'ENGINE': 'django.db.backends.sqlite3', 'NAME': HOME + '/kegbot-data/kegbot.sqlite'}} KEGBOT_ROOT = HOME + '/kegbot-data' MED...
# Kegbot local settings, for travis-ci.org build # NEVER set DEBUG to `True` in production. import os HOME = os.environ['HOME'] DEBUG = True TEMPLATE_DEBUG = DEBUG DATABASES = {'default': {'ENGINE': 'django.db.backends.sqlite3', 'NAME': HOME + '/kegbot-data/kegbot.sqlite'}} KEGBOT_ROOT = HOME + '/kegbot-data' MED...
<commit_before># Kegbot local settings, for travis-ci.org build # NEVER set DEBUG to `True` in production. import os HOME = os.environ['HOME'] DEBUG = True TEMPLATE_DEBUG = DEBUG DATABASES = {'default': {'ENGINE': 'django.db.backends.sqlite3', 'NAME': HOME + '/kegbot-data/kegbot.sqlite'}} KEGBOT_ROOT = HOME + '/ke...
# Kegbot local settings, for travis-ci.org build # NEVER set DEBUG to `True` in production. import os HOME = os.environ['HOME'] DEBUG = True TEMPLATE_DEBUG = DEBUG DATABASES = {'default': {'ENGINE': 'django.db.backends.sqlite3', 'NAME': HOME + '/kegbot-data/kegbot.sqlite'}} KEGBOT_ROOT = HOME + '/kegbot-data' MED...
# Kegbot local settings, for travis-ci.org build # NEVER set DEBUG to `True` in production. import os HOME = os.environ['HOME'] DEBUG = True TEMPLATE_DEBUG = DEBUG DATABASES = {'default': {'ENGINE': 'django.db.backends.sqlite3', 'NAME': HOME + '/kegbot-data/kegbot.sqlite'}} KEGBOT_ROOT = HOME + '/kegbot-data' MED...
<commit_before># Kegbot local settings, for travis-ci.org build # NEVER set DEBUG to `True` in production. import os HOME = os.environ['HOME'] DEBUG = True TEMPLATE_DEBUG = DEBUG DATABASES = {'default': {'ENGINE': 'django.db.backends.sqlite3', 'NAME': HOME + '/kegbot-data/kegbot.sqlite'}} KEGBOT_ROOT = HOME + '/ke...
eae216cc2d1bbe6e1c1aab1c4cf53d57b29b057c
froide/helper/csv_utils.py
froide/helper/csv_utils.py
from django.utils import six from django.http import StreamingHttpResponse def export_csv_response(queryset, fields, name='export.csv'): response = StreamingHttpResponse(export_csv(queryset, fields), content_type='text/csv') response['Content-Disposition'] = 'attachment; filen...
from django.utils import six from django.http import StreamingHttpResponse def export_csv_response(generator, name='export.csv'): response = StreamingHttpResponse(generator, content_type='text/csv') response['Content-Disposition'] = 'attachment; filename="%s"' % name return response class FakeFile(objec...
Fix export_csv_response function to take generator
Fix export_csv_response function to take generator
Python
mit
LilithWittmann/froide,catcosmo/froide,fin/froide,stefanw/froide,catcosmo/froide,catcosmo/froide,ryankanno/froide,catcosmo/froide,catcosmo/froide,ryankanno/froide,okfse/froide,fin/froide,CodeforHawaii/froide,CodeforHawaii/froide,okfse/froide,stefanw/froide,stefanw/froide,LilithWittmann/froide,okfse/froide,ryankanno/froi...
from django.utils import six from django.http import StreamingHttpResponse def export_csv_response(queryset, fields, name='export.csv'): response = StreamingHttpResponse(export_csv(queryset, fields), content_type='text/csv') response['Content-Disposition'] = 'attachment; filen...
from django.utils import six from django.http import StreamingHttpResponse def export_csv_response(generator, name='export.csv'): response = StreamingHttpResponse(generator, content_type='text/csv') response['Content-Disposition'] = 'attachment; filename="%s"' % name return response class FakeFile(objec...
<commit_before>from django.utils import six from django.http import StreamingHttpResponse def export_csv_response(queryset, fields, name='export.csv'): response = StreamingHttpResponse(export_csv(queryset, fields), content_type='text/csv') response['Content-Disposition'] = 'at...
from django.utils import six from django.http import StreamingHttpResponse def export_csv_response(generator, name='export.csv'): response = StreamingHttpResponse(generator, content_type='text/csv') response['Content-Disposition'] = 'attachment; filename="%s"' % name return response class FakeFile(objec...
from django.utils import six from django.http import StreamingHttpResponse def export_csv_response(queryset, fields, name='export.csv'): response = StreamingHttpResponse(export_csv(queryset, fields), content_type='text/csv') response['Content-Disposition'] = 'attachment; filen...
<commit_before>from django.utils import six from django.http import StreamingHttpResponse def export_csv_response(queryset, fields, name='export.csv'): response = StreamingHttpResponse(export_csv(queryset, fields), content_type='text/csv') response['Content-Disposition'] = 'at...
ecc9efaf3bbbb3d6231d1217ff124d8237ac09bb
chef/role.py
chef/role.py
from chef.base import ChefObject class Role(ChefObject): """A model object for a Chef role.""" url = '/roles' attributes = [ 'description', ]
from chef.base import ChefObject class Role(ChefObject): """A model object for a Chef role.""" url = '/roles' attributes = [ 'description', 'run_list', ]
Add run_list to Role for testing.
Add run_list to Role for testing.
Python
apache-2.0
cread/pychef,Scalr/pychef,Scalr/pychef,cread/pychef,jarosser06/pychef,coderanger/pychef,coderanger/pychef,dipakvwarade/pychef,jarosser06/pychef,dipakvwarade/pychef
from chef.base import ChefObject class Role(ChefObject): """A model object for a Chef role.""" url = '/roles' attributes = [ 'description', ] Add run_list to Role for testing.
from chef.base import ChefObject class Role(ChefObject): """A model object for a Chef role.""" url = '/roles' attributes = [ 'description', 'run_list', ]
<commit_before>from chef.base import ChefObject class Role(ChefObject): """A model object for a Chef role.""" url = '/roles' attributes = [ 'description', ] <commit_msg>Add run_list to Role for testing.<commit_after>
from chef.base import ChefObject class Role(ChefObject): """A model object for a Chef role.""" url = '/roles' attributes = [ 'description', 'run_list', ]
from chef.base import ChefObject class Role(ChefObject): """A model object for a Chef role.""" url = '/roles' attributes = [ 'description', ] Add run_list to Role for testing.from chef.base import ChefObject class Role(ChefObject): """A model object for a Chef role.""" url = '/roles...
<commit_before>from chef.base import ChefObject class Role(ChefObject): """A model object for a Chef role.""" url = '/roles' attributes = [ 'description', ] <commit_msg>Add run_list to Role for testing.<commit_after>from chef.base import ChefObject class Role(ChefObject): """A model obje...
26598254cd48a716527eb4689ad96551c5a39790
ksp_login/__init__.py
ksp_login/__init__.py
__version__ = '0.6.0' __version_info__ = __version__.split('.') from django.utils.translation import ugettext_lazy as _ def __activate_social_auth_monkeypatch(): from social_core.backends.base import BaseAuth from social_core.backends.open_id import (OPENID_ID_FIELD, OpenIdAuth) from social_core.backends...
__version__ = '0.6.0' __version_info__ = tuple(map(int, __version__.split('.'))) from django.utils.translation import ugettext_lazy as _ def __activate_social_auth_monkeypatch(): from social_core.backends.base import BaseAuth from social_core.backends.open_id import (OPENID_ID_FIELD, OpenIdAuth) from soc...
Make version info tuple of ints.
Make version info tuple of ints.
Python
bsd-3-clause
koniiiik/ksp_login,koniiiik/ksp_login,koniiiik/ksp_login
__version__ = '0.6.0' __version_info__ = __version__.split('.') from django.utils.translation import ugettext_lazy as _ def __activate_social_auth_monkeypatch(): from social_core.backends.base import BaseAuth from social_core.backends.open_id import (OPENID_ID_FIELD, OpenIdAuth) from social_core.backends...
__version__ = '0.6.0' __version_info__ = tuple(map(int, __version__.split('.'))) from django.utils.translation import ugettext_lazy as _ def __activate_social_auth_monkeypatch(): from social_core.backends.base import BaseAuth from social_core.backends.open_id import (OPENID_ID_FIELD, OpenIdAuth) from soc...
<commit_before>__version__ = '0.6.0' __version_info__ = __version__.split('.') from django.utils.translation import ugettext_lazy as _ def __activate_social_auth_monkeypatch(): from social_core.backends.base import BaseAuth from social_core.backends.open_id import (OPENID_ID_FIELD, OpenIdAuth) from socia...
__version__ = '0.6.0' __version_info__ = tuple(map(int, __version__.split('.'))) from django.utils.translation import ugettext_lazy as _ def __activate_social_auth_monkeypatch(): from social_core.backends.base import BaseAuth from social_core.backends.open_id import (OPENID_ID_FIELD, OpenIdAuth) from soc...
__version__ = '0.6.0' __version_info__ = __version__.split('.') from django.utils.translation import ugettext_lazy as _ def __activate_social_auth_monkeypatch(): from social_core.backends.base import BaseAuth from social_core.backends.open_id import (OPENID_ID_FIELD, OpenIdAuth) from social_core.backends...
<commit_before>__version__ = '0.6.0' __version_info__ = __version__.split('.') from django.utils.translation import ugettext_lazy as _ def __activate_social_auth_monkeypatch(): from social_core.backends.base import BaseAuth from social_core.backends.open_id import (OPENID_ID_FIELD, OpenIdAuth) from socia...
d9fd011a2750a01cac67aa6ca37c0aedc2a7ad94
law/workflow/local.py
law/workflow/local.py
# -*- coding: utf-8 -*- """ Local workflow implementation. """ __all__ = ["LocalWorkflow"] from law.workflow.base import Workflow, WorkflowProxy class LocalWorkflowProxy(WorkflowProxy): workflow_type = "local" def requires(self): reqs = super(LocalWorkflowProxy, self).requires() reqs["b...
# -*- coding: utf-8 -*- """ Local workflow implementation. """ __all__ = ["LocalWorkflow"] from law.workflow.base import Workflow, WorkflowProxy class LocalWorkflowProxy(WorkflowProxy): workflow_type = "local" def __init__(self, *args, **kwargs): super(LocalWorkflowProxy, self).__init__(*args, ...
Add missing run method to LocalWorkflow.
Add missing run method to LocalWorkflow.
Python
bsd-3-clause
riga/law,riga/law
# -*- coding: utf-8 -*- """ Local workflow implementation. """ __all__ = ["LocalWorkflow"] from law.workflow.base import Workflow, WorkflowProxy class LocalWorkflowProxy(WorkflowProxy): workflow_type = "local" def requires(self): reqs = super(LocalWorkflowProxy, self).requires() reqs["b...
# -*- coding: utf-8 -*- """ Local workflow implementation. """ __all__ = ["LocalWorkflow"] from law.workflow.base import Workflow, WorkflowProxy class LocalWorkflowProxy(WorkflowProxy): workflow_type = "local" def __init__(self, *args, **kwargs): super(LocalWorkflowProxy, self).__init__(*args, ...
<commit_before># -*- coding: utf-8 -*- """ Local workflow implementation. """ __all__ = ["LocalWorkflow"] from law.workflow.base import Workflow, WorkflowProxy class LocalWorkflowProxy(WorkflowProxy): workflow_type = "local" def requires(self): reqs = super(LocalWorkflowProxy, self).requires() ...
# -*- coding: utf-8 -*- """ Local workflow implementation. """ __all__ = ["LocalWorkflow"] from law.workflow.base import Workflow, WorkflowProxy class LocalWorkflowProxy(WorkflowProxy): workflow_type = "local" def __init__(self, *args, **kwargs): super(LocalWorkflowProxy, self).__init__(*args, ...
# -*- coding: utf-8 -*- """ Local workflow implementation. """ __all__ = ["LocalWorkflow"] from law.workflow.base import Workflow, WorkflowProxy class LocalWorkflowProxy(WorkflowProxy): workflow_type = "local" def requires(self): reqs = super(LocalWorkflowProxy, self).requires() reqs["b...
<commit_before># -*- coding: utf-8 -*- """ Local workflow implementation. """ __all__ = ["LocalWorkflow"] from law.workflow.base import Workflow, WorkflowProxy class LocalWorkflowProxy(WorkflowProxy): workflow_type = "local" def requires(self): reqs = super(LocalWorkflowProxy, self).requires() ...
3b92d215a42a8c4047d2be57b7679b87a6bfb737
cnxmathml2svg.py
cnxmathml2svg.py
# -*- coding: utf-8 -*- # ### # Copyright (c) 2015, Rice University # This software is subject to the provisions of the GNU Affero General # Public License version 3 (AGPLv3). # See LICENCE.txt for details. # ### from pyramid.config import Configurator __all__ = ('main',) def main(global_config, **settings): ""...
# -*- coding: utf-8 -*- # ### # Copyright (c) 2015, Rice University # This software is subject to the provisions of the GNU Affero General # Public License version 3 (AGPLv3). # See LICENCE.txt for details. # ### from pyramid.config import Configurator from pyramid.response import Response __all__ = ('main',) def co...
Add the conversion view to the app.
Add the conversion view to the app.
Python
agpl-3.0
Connexions/cnx-mathml2svg,pumazi/cnx-mathml2svg
# -*- coding: utf-8 -*- # ### # Copyright (c) 2015, Rice University # This software is subject to the provisions of the GNU Affero General # Public License version 3 (AGPLv3). # See LICENCE.txt for details. # ### from pyramid.config import Configurator __all__ = ('main',) def main(global_config, **settings): ""...
# -*- coding: utf-8 -*- # ### # Copyright (c) 2015, Rice University # This software is subject to the provisions of the GNU Affero General # Public License version 3 (AGPLv3). # See LICENCE.txt for details. # ### from pyramid.config import Configurator from pyramid.response import Response __all__ = ('main',) def co...
<commit_before># -*- coding: utf-8 -*- # ### # Copyright (c) 2015, Rice University # This software is subject to the provisions of the GNU Affero General # Public License version 3 (AGPLv3). # See LICENCE.txt for details. # ### from pyramid.config import Configurator __all__ = ('main',) def main(global_config, **se...
# -*- coding: utf-8 -*- # ### # Copyright (c) 2015, Rice University # This software is subject to the provisions of the GNU Affero General # Public License version 3 (AGPLv3). # See LICENCE.txt for details. # ### from pyramid.config import Configurator from pyramid.response import Response __all__ = ('main',) def co...
# -*- coding: utf-8 -*- # ### # Copyright (c) 2015, Rice University # This software is subject to the provisions of the GNU Affero General # Public License version 3 (AGPLv3). # See LICENCE.txt for details. # ### from pyramid.config import Configurator __all__ = ('main',) def main(global_config, **settings): ""...
<commit_before># -*- coding: utf-8 -*- # ### # Copyright (c) 2015, Rice University # This software is subject to the provisions of the GNU Affero General # Public License version 3 (AGPLv3). # See LICENCE.txt for details. # ### from pyramid.config import Configurator __all__ = ('main',) def main(global_config, **se...
4dae2456d36a92951beaca2f57ddbed575103cf6
moksha/api/hub/consumer.py
moksha/api/hub/consumer.py
# This file is part of Moksha. # # Moksha is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # Moksha is distributed in the hope that it...
# This file is part of Moksha. # # Moksha is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # Moksha is distributed in the hope that it...
Add a send_message and stop methods to the Consumer, along with some module docs.
Add a send_message and stop methods to the Consumer, along with some module docs.
Python
apache-2.0
lmacken/moksha,ralphbean/moksha,ralphbean/moksha,pombredanne/moksha,lmacken/moksha,mokshaproject/moksha,mokshaproject/moksha,mokshaproject/moksha,lmacken/moksha,pombredanne/moksha,pombredanne/moksha,ralphbean/moksha,pombredanne/moksha,mokshaproject/moksha
# This file is part of Moksha. # # Moksha is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # Moksha is distributed in the hope that it...
# This file is part of Moksha. # # Moksha is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # Moksha is distributed in the hope that it...
<commit_before># This file is part of Moksha. # # Moksha is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # Moksha is distributed in t...
# This file is part of Moksha. # # Moksha is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # Moksha is distributed in the hope that it...
# This file is part of Moksha. # # Moksha is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # Moksha is distributed in the hope that it...
<commit_before># This file is part of Moksha. # # Moksha is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # Moksha is distributed in t...
d106719a0b7bcbd87989bd36f618f90c4df02c46
sequana/gui/browser.py
sequana/gui/browser.py
# coding: utf-8 from PyQt5 import QtCore from PyQt5.QtWebKitWidgets import QWebView class MyBrowser(QWebView): closing = QtCore.Signal() def __init(self): super().__init__() self.loadFinished.connec(self._results_available) def _results_available(self, ok): print("results") ...
# coding: utf-8 from PyQt5 import QtCore from PyQt5.QtWebKitWidgets import QWebView class MyBrowser(QWebView): #closing = QtCore.Signal() def __init(self): super().__init__() self.loadFinished.connec(self._results_available) def _results_available(self, ok): frame = self.page().m...
Fix issue with signal on tars
Fix issue with signal on tars
Python
bsd-3-clause
sequana/sequana,sequana/sequana,sequana/sequana,sequana/sequana,sequana/sequana
# coding: utf-8 from PyQt5 import QtCore from PyQt5.QtWebKitWidgets import QWebView class MyBrowser(QWebView): closing = QtCore.Signal() def __init(self): super().__init__() self.loadFinished.connec(self._results_available) def _results_available(self, ok): print("results") ...
# coding: utf-8 from PyQt5 import QtCore from PyQt5.QtWebKitWidgets import QWebView class MyBrowser(QWebView): #closing = QtCore.Signal() def __init(self): super().__init__() self.loadFinished.connec(self._results_available) def _results_available(self, ok): frame = self.page().m...
<commit_before># coding: utf-8 from PyQt5 import QtCore from PyQt5.QtWebKitWidgets import QWebView class MyBrowser(QWebView): closing = QtCore.Signal() def __init(self): super().__init__() self.loadFinished.connec(self._results_available) def _results_available(self, ok): print("r...
# coding: utf-8 from PyQt5 import QtCore from PyQt5.QtWebKitWidgets import QWebView class MyBrowser(QWebView): #closing = QtCore.Signal() def __init(self): super().__init__() self.loadFinished.connec(self._results_available) def _results_available(self, ok): frame = self.page().m...
# coding: utf-8 from PyQt5 import QtCore from PyQt5.QtWebKitWidgets import QWebView class MyBrowser(QWebView): closing = QtCore.Signal() def __init(self): super().__init__() self.loadFinished.connec(self._results_available) def _results_available(self, ok): print("results") ...
<commit_before># coding: utf-8 from PyQt5 import QtCore from PyQt5.QtWebKitWidgets import QWebView class MyBrowser(QWebView): closing = QtCore.Signal() def __init(self): super().__init__() self.loadFinished.connec(self._results_available) def _results_available(self, ok): print("r...
a6b6d229aa83497f43f04104498394fbd5df9fb8
articles/models.py
articles/models.py
from django.db import models from django.urls import reverse class Tag(models.Model): name = models.CharField(max_length=10) def __str__(self): return self.name def get_absolute_url(self): return reverse('articles:tagged-list', args=[self.name]) class Article(models.Model): title =...
from django.db import models from django.urls import reverse class Tag(models.Model): name = models.CharField(max_length=10) def __str__(self): return self.name def get_absolute_url(self): return reverse('articles:tagged-list', kwargs={'tags_with_plus': self.name})...
Use kwargs instead of args in reverse in get_absolute_url method
Use kwargs instead of args in reverse in get_absolute_url method
Python
bsd-3-clause
invzhi/invzhi.me,invzhi/invzhi.me
from django.db import models from django.urls import reverse class Tag(models.Model): name = models.CharField(max_length=10) def __str__(self): return self.name def get_absolute_url(self): return reverse('articles:tagged-list', args=[self.name]) class Article(models.Model): title =...
from django.db import models from django.urls import reverse class Tag(models.Model): name = models.CharField(max_length=10) def __str__(self): return self.name def get_absolute_url(self): return reverse('articles:tagged-list', kwargs={'tags_with_plus': self.name})...
<commit_before>from django.db import models from django.urls import reverse class Tag(models.Model): name = models.CharField(max_length=10) def __str__(self): return self.name def get_absolute_url(self): return reverse('articles:tagged-list', args=[self.name]) class Article(models.Mode...
from django.db import models from django.urls import reverse class Tag(models.Model): name = models.CharField(max_length=10) def __str__(self): return self.name def get_absolute_url(self): return reverse('articles:tagged-list', kwargs={'tags_with_plus': self.name})...
from django.db import models from django.urls import reverse class Tag(models.Model): name = models.CharField(max_length=10) def __str__(self): return self.name def get_absolute_url(self): return reverse('articles:tagged-list', args=[self.name]) class Article(models.Model): title =...
<commit_before>from django.db import models from django.urls import reverse class Tag(models.Model): name = models.CharField(max_length=10) def __str__(self): return self.name def get_absolute_url(self): return reverse('articles:tagged-list', args=[self.name]) class Article(models.Mode...
03b4e218e796bf2cc42015f70195fb4a5e13f33b
decision/__init__.py
decision/__init__.py
import os, logging from flask import Flask from raven.contrib.flask import Sentry app = Flask(__name__) app.config.from_object(os.environ.get('SETTINGS')) app.logger.info("\nConfiguration\n%s\n" % app.config) # Sentry exception reporting if 'SENTRY_DSN' in os.environ: sentry = Sentry(app, dsn=os.environ['SENTRY...
import os, logging from flask import Flask from raven.contrib.flask import Sentry app = Flask(__name__) app.config.from_object(os.environ.get('SETTINGS')) app.logger.debug("\nConfiguration\n%s\n" % app.config) # Sentry exception reporting if 'SENTRY_DSN' in os.environ: sentry = Sentry(app, dsn=os.environ['SENTR...
Set config logging in init to debug
Set config logging in init to debug
Python
mit
LandRegistry/decision-alpha,LandRegistry/decision-alpha
import os, logging from flask import Flask from raven.contrib.flask import Sentry app = Flask(__name__) app.config.from_object(os.environ.get('SETTINGS')) app.logger.info("\nConfiguration\n%s\n" % app.config) # Sentry exception reporting if 'SENTRY_DSN' in os.environ: sentry = Sentry(app, dsn=os.environ['SENTRY...
import os, logging from flask import Flask from raven.contrib.flask import Sentry app = Flask(__name__) app.config.from_object(os.environ.get('SETTINGS')) app.logger.debug("\nConfiguration\n%s\n" % app.config) # Sentry exception reporting if 'SENTRY_DSN' in os.environ: sentry = Sentry(app, dsn=os.environ['SENTR...
<commit_before>import os, logging from flask import Flask from raven.contrib.flask import Sentry app = Flask(__name__) app.config.from_object(os.environ.get('SETTINGS')) app.logger.info("\nConfiguration\n%s\n" % app.config) # Sentry exception reporting if 'SENTRY_DSN' in os.environ: sentry = Sentry(app, dsn=os....
import os, logging from flask import Flask from raven.contrib.flask import Sentry app = Flask(__name__) app.config.from_object(os.environ.get('SETTINGS')) app.logger.debug("\nConfiguration\n%s\n" % app.config) # Sentry exception reporting if 'SENTRY_DSN' in os.environ: sentry = Sentry(app, dsn=os.environ['SENTR...
import os, logging from flask import Flask from raven.contrib.flask import Sentry app = Flask(__name__) app.config.from_object(os.environ.get('SETTINGS')) app.logger.info("\nConfiguration\n%s\n" % app.config) # Sentry exception reporting if 'SENTRY_DSN' in os.environ: sentry = Sentry(app, dsn=os.environ['SENTRY...
<commit_before>import os, logging from flask import Flask from raven.contrib.flask import Sentry app = Flask(__name__) app.config.from_object(os.environ.get('SETTINGS')) app.logger.info("\nConfiguration\n%s\n" % app.config) # Sentry exception reporting if 'SENTRY_DSN' in os.environ: sentry = Sentry(app, dsn=os....
99cb654ec5730f6be33bb091aa3ac9e70963470c
hc/front/tests/test_add_channel.py
hc/front/tests/test_add_channel.py
from django.contrib.auth.models import User from django.test import TestCase from hc.api.models import Channel class AddChannelTestCase(TestCase): def setUp(self): self.alice = User(username="alice") self.alice.set_password("password") self.alice.save() def test_it_works(self): ...
from django.conf import settings from django.contrib.auth.models import User from django.test import TestCase from hc.api.models import Channel class AddChannelTestCase(TestCase): def setUp(self): self.alice = User(username="alice") self.alice.set_password("password") self.alice.save() ...
Fix tests when Pushover is not configured
Fix tests when Pushover is not configured
Python
bsd-3-clause
healthchecks/healthchecks,iphoting/healthchecks,BetterWorks/healthchecks,BetterWorks/healthchecks,healthchecks/healthchecks,healthchecks/healthchecks,healthchecks/healthchecks,iphoting/healthchecks,iphoting/healthchecks,BetterWorks/healthchecks,BetterWorks/healthchecks,iphoting/healthchecks
from django.contrib.auth.models import User from django.test import TestCase from hc.api.models import Channel class AddChannelTestCase(TestCase): def setUp(self): self.alice = User(username="alice") self.alice.set_password("password") self.alice.save() def test_it_works(self): ...
from django.conf import settings from django.contrib.auth.models import User from django.test import TestCase from hc.api.models import Channel class AddChannelTestCase(TestCase): def setUp(self): self.alice = User(username="alice") self.alice.set_password("password") self.alice.save() ...
<commit_before>from django.contrib.auth.models import User from django.test import TestCase from hc.api.models import Channel class AddChannelTestCase(TestCase): def setUp(self): self.alice = User(username="alice") self.alice.set_password("password") self.alice.save() def test_it_wor...
from django.conf import settings from django.contrib.auth.models import User from django.test import TestCase from hc.api.models import Channel class AddChannelTestCase(TestCase): def setUp(self): self.alice = User(username="alice") self.alice.set_password("password") self.alice.save() ...
from django.contrib.auth.models import User from django.test import TestCase from hc.api.models import Channel class AddChannelTestCase(TestCase): def setUp(self): self.alice = User(username="alice") self.alice.set_password("password") self.alice.save() def test_it_works(self): ...
<commit_before>from django.contrib.auth.models import User from django.test import TestCase from hc.api.models import Channel class AddChannelTestCase(TestCase): def setUp(self): self.alice = User(username="alice") self.alice.set_password("password") self.alice.save() def test_it_wor...
f65fd97940cb1f9c146de1b95c6e1e8652ae0c52
bonspy/__init__.py
bonspy/__init__.py
# -*- coding: utf-8 -*- from __future__ import ( print_function, division, generators, absolute_import, unicode_literals ) from .bonsai import BonsaiTree from .logistic import LogisticConverter
# -*- coding: utf-8 -*- from __future__ import ( print_function, division, generators, absolute_import, unicode_literals ) from bonspy.bonsai import BonsaiTree from bonspy.logistic import LogisticConverter
Use more robust absolute imports
Use more robust absolute imports
Python
bsd-3-clause
markovianhq/bonspy
# -*- coding: utf-8 -*- from __future__ import ( print_function, division, generators, absolute_import, unicode_literals ) from .bonsai import BonsaiTree from .logistic import LogisticConverter Use more robust absolute imports
# -*- coding: utf-8 -*- from __future__ import ( print_function, division, generators, absolute_import, unicode_literals ) from bonspy.bonsai import BonsaiTree from bonspy.logistic import LogisticConverter
<commit_before># -*- coding: utf-8 -*- from __future__ import ( print_function, division, generators, absolute_import, unicode_literals ) from .bonsai import BonsaiTree from .logistic import LogisticConverter <commit_msg>Use more robust absolute imports<commit_after>
# -*- coding: utf-8 -*- from __future__ import ( print_function, division, generators, absolute_import, unicode_literals ) from bonspy.bonsai import BonsaiTree from bonspy.logistic import LogisticConverter
# -*- coding: utf-8 -*- from __future__ import ( print_function, division, generators, absolute_import, unicode_literals ) from .bonsai import BonsaiTree from .logistic import LogisticConverter Use more robust absolute imports# -*- coding: utf-8 -*- from __future__ import ( print_function, division, gene...
<commit_before># -*- coding: utf-8 -*- from __future__ import ( print_function, division, generators, absolute_import, unicode_literals ) from .bonsai import BonsaiTree from .logistic import LogisticConverter <commit_msg>Use more robust absolute imports<commit_after># -*- coding: utf-8 -*- from __future__ im...
0a73784ca3995b42b77d9a4cb3e6903154ef8914
bokeh/models/widgets/panels.py
bokeh/models/widgets/panels.py
""" Various kinds of panel widgets. """ from __future__ import absolute_import from ...properties import Bool, Int, String, Instance, List from ..widget import Widget from ..actions import Callback class Panel(Widget): """ A single-widget container with title bar and controls. """ title = String(help="...
""" Various kinds of panel widgets. """ from __future__ import absolute_import from ...properties import Bool, Int, String, Instance, List from ..widget import Widget from ..callbacks import Callback class Panel(Widget): """ A single-widget container with title bar and controls. """ title = String(help...
Fix comflict (not merge conflict) because of those inter-related PRs.
Fix comflict (not merge conflict) because of those inter-related PRs.
Python
bsd-3-clause
khkaminska/bokeh,ericmjl/bokeh,ChinaQuants/bokeh,jplourenco/bokeh,clairetang6/bokeh,Karel-van-de-Plassche/bokeh,phobson/bokeh,srinathv/bokeh,rs2/bokeh,muku42/bokeh,Karel-van-de-Plassche/bokeh,KasperPRasmussen/bokeh,aavanian/bokeh,schoolie/bokeh,paultcochrane/bokeh,gpfreitas/bokeh,bokeh/bokeh,jplourenco/bokeh,aavanian/b...
""" Various kinds of panel widgets. """ from __future__ import absolute_import from ...properties import Bool, Int, String, Instance, List from ..widget import Widget from ..actions import Callback class Panel(Widget): """ A single-widget container with title bar and controls. """ title = String(help="...
""" Various kinds of panel widgets. """ from __future__ import absolute_import from ...properties import Bool, Int, String, Instance, List from ..widget import Widget from ..callbacks import Callback class Panel(Widget): """ A single-widget container with title bar and controls. """ title = String(help...
<commit_before>""" Various kinds of panel widgets. """ from __future__ import absolute_import from ...properties import Bool, Int, String, Instance, List from ..widget import Widget from ..actions import Callback class Panel(Widget): """ A single-widget container with title bar and controls. """ title ...
""" Various kinds of panel widgets. """ from __future__ import absolute_import from ...properties import Bool, Int, String, Instance, List from ..widget import Widget from ..callbacks import Callback class Panel(Widget): """ A single-widget container with title bar and controls. """ title = String(help...
""" Various kinds of panel widgets. """ from __future__ import absolute_import from ...properties import Bool, Int, String, Instance, List from ..widget import Widget from ..actions import Callback class Panel(Widget): """ A single-widget container with title bar and controls. """ title = String(help="...
<commit_before>""" Various kinds of panel widgets. """ from __future__ import absolute_import from ...properties import Bool, Int, String, Instance, List from ..widget import Widget from ..actions import Callback class Panel(Widget): """ A single-widget container with title bar and controls. """ title ...
fbaf1a64621e8b72b7ee46b8c58a12ed96a0f41f
utils/summary_downloader.py
utils/summary_downloader.py
#!/usr/bin/env python # -*- coding: utf-8 -*- from dateutil.parser import parse from dateutil.relativedelta import DAILY from dateutil.rrule import rrule class SummaryDownloader(): # base url for official schedule json page SCHEDULE_URL_BASE = "http://statsapi.web.nhl.com/api/v1/schedule" # url template...
#!/usr/bin/env python # -*- coding: utf-8 -*- from dateutil.parser import parse from dateutil.rrule import rrule, DAILY class SummaryDownloader(): # base url for official schedule json page SCHEDULE_URL_BASE = "http://statsapi.web.nhl.com/api/v1/schedule" # url template for official json gamefeed page ...
Add function to find downloadable files
Add function to find downloadable files
Python
mit
leaffan/pynhldb
#!/usr/bin/env python # -*- coding: utf-8 -*- from dateutil.parser import parse from dateutil.relativedelta import DAILY from dateutil.rrule import rrule class SummaryDownloader(): # base url for official schedule json page SCHEDULE_URL_BASE = "http://statsapi.web.nhl.com/api/v1/schedule" # url template...
#!/usr/bin/env python # -*- coding: utf-8 -*- from dateutil.parser import parse from dateutil.rrule import rrule, DAILY class SummaryDownloader(): # base url for official schedule json page SCHEDULE_URL_BASE = "http://statsapi.web.nhl.com/api/v1/schedule" # url template for official json gamefeed page ...
<commit_before>#!/usr/bin/env python # -*- coding: utf-8 -*- from dateutil.parser import parse from dateutil.relativedelta import DAILY from dateutil.rrule import rrule class SummaryDownloader(): # base url for official schedule json page SCHEDULE_URL_BASE = "http://statsapi.web.nhl.com/api/v1/schedule" ...
#!/usr/bin/env python # -*- coding: utf-8 -*- from dateutil.parser import parse from dateutil.rrule import rrule, DAILY class SummaryDownloader(): # base url for official schedule json page SCHEDULE_URL_BASE = "http://statsapi.web.nhl.com/api/v1/schedule" # url template for official json gamefeed page ...
#!/usr/bin/env python # -*- coding: utf-8 -*- from dateutil.parser import parse from dateutil.relativedelta import DAILY from dateutil.rrule import rrule class SummaryDownloader(): # base url for official schedule json page SCHEDULE_URL_BASE = "http://statsapi.web.nhl.com/api/v1/schedule" # url template...
<commit_before>#!/usr/bin/env python # -*- coding: utf-8 -*- from dateutil.parser import parse from dateutil.relativedelta import DAILY from dateutil.rrule import rrule class SummaryDownloader(): # base url for official schedule json page SCHEDULE_URL_BASE = "http://statsapi.web.nhl.com/api/v1/schedule" ...
a490a85e5842bd31a99a94f2530dbbea2d1c2584
bot/game/launch.py
bot/game/launch.py
import telegram def callback_query_handler(bot: telegram.Bot, update: telegram.Update): callback_query = update.callback_query game_short_name = callback_query.game_short_name if game_short_name == "rock_paper_scissors": callback_query_id = callback_query.id bot.answerCallbackQuery(callbac...
import telegram def callback_query_handler(bot: telegram.Bot, update: telegram.Update): callback_query = update.callback_query game_short_name = callback_query.game_short_name if game_short_name == "rock_paper_scissors": callback_query_id = callback_query.id bot.answerCallbackQuery(callbac...
Update url to point to return develop branch html page
Update url to point to return develop branch html page
Python
apache-2.0
alvarogzp/telegram-games,alvarogzp/telegram-games,alvarogzp/telegram-games,alvarogzp/telegram-games
import telegram def callback_query_handler(bot: telegram.Bot, update: telegram.Update): callback_query = update.callback_query game_short_name = callback_query.game_short_name if game_short_name == "rock_paper_scissors": callback_query_id = callback_query.id bot.answerCallbackQuery(callbac...
import telegram def callback_query_handler(bot: telegram.Bot, update: telegram.Update): callback_query = update.callback_query game_short_name = callback_query.game_short_name if game_short_name == "rock_paper_scissors": callback_query_id = callback_query.id bot.answerCallbackQuery(callbac...
<commit_before>import telegram def callback_query_handler(bot: telegram.Bot, update: telegram.Update): callback_query = update.callback_query game_short_name = callback_query.game_short_name if game_short_name == "rock_paper_scissors": callback_query_id = callback_query.id bot.answerCallba...
import telegram def callback_query_handler(bot: telegram.Bot, update: telegram.Update): callback_query = update.callback_query game_short_name = callback_query.game_short_name if game_short_name == "rock_paper_scissors": callback_query_id = callback_query.id bot.answerCallbackQuery(callbac...
import telegram def callback_query_handler(bot: telegram.Bot, update: telegram.Update): callback_query = update.callback_query game_short_name = callback_query.game_short_name if game_short_name == "rock_paper_scissors": callback_query_id = callback_query.id bot.answerCallbackQuery(callbac...
<commit_before>import telegram def callback_query_handler(bot: telegram.Bot, update: telegram.Update): callback_query = update.callback_query game_short_name = callback_query.game_short_name if game_short_name == "rock_paper_scissors": callback_query_id = callback_query.id bot.answerCallba...
49ebd8bee6cc91cf80715a7b2e01c4cfbe78d1da
tests/regression/bug_122.py
tests/regression/bug_122.py
import logging import sys import threading import time import spotify if len(sys.argv) != 3: sys.exit('Usage: %s USERNAME PASSWORD' % sys.argv[0]) username, password = sys.argv[1], sys.argv[2] def login(session, username, password): logged_in_event = threading.Event() def logged_in_listener(session, ...
from __future__ import print_function import logging import sys import threading import time import spotify if len(sys.argv) != 3: sys.exit('Usage: %s USERNAME PASSWORD' % sys.argv[0]) username, password = sys.argv[1], sys.argv[2] def login(session, username, password): logged_in_event = threading.Event(...
Fix flake8 warning when running on Python 3
Fix flake8 warning when running on Python 3
Python
apache-2.0
felix1m/pyspotify,kotamat/pyspotify,jodal/pyspotify,mopidy/pyspotify,jodal/pyspotify,jodal/pyspotify,kotamat/pyspotify,felix1m/pyspotify,felix1m/pyspotify,kotamat/pyspotify,mopidy/pyspotify
import logging import sys import threading import time import spotify if len(sys.argv) != 3: sys.exit('Usage: %s USERNAME PASSWORD' % sys.argv[0]) username, password = sys.argv[1], sys.argv[2] def login(session, username, password): logged_in_event = threading.Event() def logged_in_listener(session, ...
from __future__ import print_function import logging import sys import threading import time import spotify if len(sys.argv) != 3: sys.exit('Usage: %s USERNAME PASSWORD' % sys.argv[0]) username, password = sys.argv[1], sys.argv[2] def login(session, username, password): logged_in_event = threading.Event(...
<commit_before>import logging import sys import threading import time import spotify if len(sys.argv) != 3: sys.exit('Usage: %s USERNAME PASSWORD' % sys.argv[0]) username, password = sys.argv[1], sys.argv[2] def login(session, username, password): logged_in_event = threading.Event() def logged_in_lis...
from __future__ import print_function import logging import sys import threading import time import spotify if len(sys.argv) != 3: sys.exit('Usage: %s USERNAME PASSWORD' % sys.argv[0]) username, password = sys.argv[1], sys.argv[2] def login(session, username, password): logged_in_event = threading.Event(...
import logging import sys import threading import time import spotify if len(sys.argv) != 3: sys.exit('Usage: %s USERNAME PASSWORD' % sys.argv[0]) username, password = sys.argv[1], sys.argv[2] def login(session, username, password): logged_in_event = threading.Event() def logged_in_listener(session, ...
<commit_before>import logging import sys import threading import time import spotify if len(sys.argv) != 3: sys.exit('Usage: %s USERNAME PASSWORD' % sys.argv[0]) username, password = sys.argv[1], sys.argv[2] def login(session, username, password): logged_in_event = threading.Event() def logged_in_lis...
ba0471464ab3f6d29fcc12fa2de9231581c07944
tst/utils.py
tst/utils.py
from __future__ import print_function import sys import string import json from colors import * def is_posix_filename(name, extra_chars=""): CHARS = string.letters + string.digits + "._-" + extra_chars return all(c in CHARS for c in name) def cprint(color, msg, file=sys.stdout, end='\n'): data = msg._...
from __future__ import print_function import sys import string import json from colors import * def is_posix_filename(name, extra_chars=""): CHARS = string.letters + string.digits + "._-" + extra_chars return all(c in CHARS for c in name) def cprint(color, msg, file=sys.stdout, end='\n'): if type(msg)...
Fix cprint with unicode characters
Fix cprint with unicode characters
Python
agpl-3.0
daltonserey/tst,daltonserey/tst
from __future__ import print_function import sys import string import json from colors import * def is_posix_filename(name, extra_chars=""): CHARS = string.letters + string.digits + "._-" + extra_chars return all(c in CHARS for c in name) def cprint(color, msg, file=sys.stdout, end='\n'): data = msg._...
from __future__ import print_function import sys import string import json from colors import * def is_posix_filename(name, extra_chars=""): CHARS = string.letters + string.digits + "._-" + extra_chars return all(c in CHARS for c in name) def cprint(color, msg, file=sys.stdout, end='\n'): if type(msg)...
<commit_before>from __future__ import print_function import sys import string import json from colors import * def is_posix_filename(name, extra_chars=""): CHARS = string.letters + string.digits + "._-" + extra_chars return all(c in CHARS for c in name) def cprint(color, msg, file=sys.stdout, end='\n'): ...
from __future__ import print_function import sys import string import json from colors import * def is_posix_filename(name, extra_chars=""): CHARS = string.letters + string.digits + "._-" + extra_chars return all(c in CHARS for c in name) def cprint(color, msg, file=sys.stdout, end='\n'): if type(msg)...
from __future__ import print_function import sys import string import json from colors import * def is_posix_filename(name, extra_chars=""): CHARS = string.letters + string.digits + "._-" + extra_chars return all(c in CHARS for c in name) def cprint(color, msg, file=sys.stdout, end='\n'): data = msg._...
<commit_before>from __future__ import print_function import sys import string import json from colors import * def is_posix_filename(name, extra_chars=""): CHARS = string.letters + string.digits + "._-" + extra_chars return all(c in CHARS for c in name) def cprint(color, msg, file=sys.stdout, end='\n'): ...
685fa68b79b4d21f69fe55f66724191d30bbbaa8
contact/views.py
contact/views.py
from rest_framework import serializers from rest_framework.views import APIView from rest_framework.response import Response from django import http from .tasks import send_contact_form_inquiry # Serializers define the API representation. class ContactSerializer(serializers.Serializer): email = serializers.Email...
from rest_framework import serializers from rest_framework.views import APIView from rest_framework.response import Response from django import http from .tasks import send_contact_form_inquiry # Serializers define the API representation. class ContactSerializer(serializers.Serializer): email = serializers.Email...
Remove all permisson for contact API
Remove all permisson for contact API
Python
mit
p2pu/learning-circles,p2pu/learning-circles,p2pu/learning-circles,p2pu/learning-circles
from rest_framework import serializers from rest_framework.views import APIView from rest_framework.response import Response from django import http from .tasks import send_contact_form_inquiry # Serializers define the API representation. class ContactSerializer(serializers.Serializer): email = serializers.Email...
from rest_framework import serializers from rest_framework.views import APIView from rest_framework.response import Response from django import http from .tasks import send_contact_form_inquiry # Serializers define the API representation. class ContactSerializer(serializers.Serializer): email = serializers.Email...
<commit_before>from rest_framework import serializers from rest_framework.views import APIView from rest_framework.response import Response from django import http from .tasks import send_contact_form_inquiry # Serializers define the API representation. class ContactSerializer(serializers.Serializer): email = se...
from rest_framework import serializers from rest_framework.views import APIView from rest_framework.response import Response from django import http from .tasks import send_contact_form_inquiry # Serializers define the API representation. class ContactSerializer(serializers.Serializer): email = serializers.Email...
from rest_framework import serializers from rest_framework.views import APIView from rest_framework.response import Response from django import http from .tasks import send_contact_form_inquiry # Serializers define the API representation. class ContactSerializer(serializers.Serializer): email = serializers.Email...
<commit_before>from rest_framework import serializers from rest_framework.views import APIView from rest_framework.response import Response from django import http from .tasks import send_contact_form_inquiry # Serializers define the API representation. class ContactSerializer(serializers.Serializer): email = se...
5523946b35d076c47be92d703cdb071c18f6d0ec
tests/test_subgenerators.py
tests/test_subgenerators.py
import pytest from resumeback import send_self from . import CustomError, defer, wait_until_finished, State def test_subgenerator_next(): ts = State() def subgenerator(this): yield defer(this.next) ts.run = True @send_self def func(this): yield from subgenerator(this) ...
import pytest from resumeback import send_self from . import CustomError, defer, wait_until_finished, State def test_subgenerator_next(): ts = State() def subgenerator(this): yield defer(this.next) ts.run = True @send_self def func(this): yield from subgenerator(this) ...
Add test for decorated subgenerator
Add test for decorated subgenerator
Python
mit
FichteFoll/resumeback
import pytest from resumeback import send_self from . import CustomError, defer, wait_until_finished, State def test_subgenerator_next(): ts = State() def subgenerator(this): yield defer(this.next) ts.run = True @send_self def func(this): yield from subgenerator(this) ...
import pytest from resumeback import send_self from . import CustomError, defer, wait_until_finished, State def test_subgenerator_next(): ts = State() def subgenerator(this): yield defer(this.next) ts.run = True @send_self def func(this): yield from subgenerator(this) ...
<commit_before>import pytest from resumeback import send_self from . import CustomError, defer, wait_until_finished, State def test_subgenerator_next(): ts = State() def subgenerator(this): yield defer(this.next) ts.run = True @send_self def func(this): yield from subgenera...
import pytest from resumeback import send_self from . import CustomError, defer, wait_until_finished, State def test_subgenerator_next(): ts = State() def subgenerator(this): yield defer(this.next) ts.run = True @send_self def func(this): yield from subgenerator(this) ...
import pytest from resumeback import send_self from . import CustomError, defer, wait_until_finished, State def test_subgenerator_next(): ts = State() def subgenerator(this): yield defer(this.next) ts.run = True @send_self def func(this): yield from subgenerator(this) ...
<commit_before>import pytest from resumeback import send_self from . import CustomError, defer, wait_until_finished, State def test_subgenerator_next(): ts = State() def subgenerator(this): yield defer(this.next) ts.run = True @send_self def func(this): yield from subgenera...
a2b1d10e042d135c3c014622ffeabd7e96a46f9f
tests/test_update_target.py
tests/test_update_target.py
""" Tests for helper function for updating a target from a Vuforia database. """ import io import pytest from vws import VWS from vws.exceptions import UnknownTarget class TestUpdateTarget: """ Test for updating a target. """ def test_get_target( self, client: VWS, high_qua...
""" Tests for helper function for updating a target from a Vuforia database. """ import io import pytest from vws import VWS from vws.exceptions import UnknownTarget class TestUpdateTarget: """ Test for updating a target. """ def test_get_target( self, client: VWS, high_qua...
Comment out part done code
Comment out part done code
Python
mit
adamtheturtle/vws-python,adamtheturtle/vws-python
""" Tests for helper function for updating a target from a Vuforia database. """ import io import pytest from vws import VWS from vws.exceptions import UnknownTarget class TestUpdateTarget: """ Test for updating a target. """ def test_get_target( self, client: VWS, high_qua...
""" Tests for helper function for updating a target from a Vuforia database. """ import io import pytest from vws import VWS from vws.exceptions import UnknownTarget class TestUpdateTarget: """ Test for updating a target. """ def test_get_target( self, client: VWS, high_qua...
<commit_before>""" Tests for helper function for updating a target from a Vuforia database. """ import io import pytest from vws import VWS from vws.exceptions import UnknownTarget class TestUpdateTarget: """ Test for updating a target. """ def test_get_target( self, client: VWS, ...
""" Tests for helper function for updating a target from a Vuforia database. """ import io import pytest from vws import VWS from vws.exceptions import UnknownTarget class TestUpdateTarget: """ Test for updating a target. """ def test_get_target( self, client: VWS, high_qua...
""" Tests for helper function for updating a target from a Vuforia database. """ import io import pytest from vws import VWS from vws.exceptions import UnknownTarget class TestUpdateTarget: """ Test for updating a target. """ def test_get_target( self, client: VWS, high_qua...
<commit_before>""" Tests for helper function for updating a target from a Vuforia database. """ import io import pytest from vws import VWS from vws.exceptions import UnknownTarget class TestUpdateTarget: """ Test for updating a target. """ def test_get_target( self, client: VWS, ...
cd0426dbbfc6f1573cf5d09485b8930eb498e1c6
mbuild/tests/test_utils.py
mbuild/tests/test_utils.py
import difflib import pytest from mbuild.tests.base_test import BaseTest from mbuild.utils.io import get_fn from mbuild.utils.validation import assert_port_exists class TestUtils(BaseTest): def test_assert_port_exists(self, ch2): assert_port_exists('up', ch2) with pytest.raises(ValueError): ...
import difflib import numpy as np import pytest from mbuild.tests.base_test import BaseTest from mbuild.utils.io import get_fn, import_ from mbuild.utils.validation import assert_port_exists class TestUtils(BaseTest): def test_assert_port_exists(self, ch2): assert_port_exists('up', ch2) with py...
Add some unit test on utils.io
Add some unit test on utils.io
Python
mit
iModels/mbuild,iModels/mbuild
import difflib import pytest from mbuild.tests.base_test import BaseTest from mbuild.utils.io import get_fn from mbuild.utils.validation import assert_port_exists class TestUtils(BaseTest): def test_assert_port_exists(self, ch2): assert_port_exists('up', ch2) with pytest.raises(ValueError): ...
import difflib import numpy as np import pytest from mbuild.tests.base_test import BaseTest from mbuild.utils.io import get_fn, import_ from mbuild.utils.validation import assert_port_exists class TestUtils(BaseTest): def test_assert_port_exists(self, ch2): assert_port_exists('up', ch2) with py...
<commit_before>import difflib import pytest from mbuild.tests.base_test import BaseTest from mbuild.utils.io import get_fn from mbuild.utils.validation import assert_port_exists class TestUtils(BaseTest): def test_assert_port_exists(self, ch2): assert_port_exists('up', ch2) with pytest.raises(Val...
import difflib import numpy as np import pytest from mbuild.tests.base_test import BaseTest from mbuild.utils.io import get_fn, import_ from mbuild.utils.validation import assert_port_exists class TestUtils(BaseTest): def test_assert_port_exists(self, ch2): assert_port_exists('up', ch2) with py...
import difflib import pytest from mbuild.tests.base_test import BaseTest from mbuild.utils.io import get_fn from mbuild.utils.validation import assert_port_exists class TestUtils(BaseTest): def test_assert_port_exists(self, ch2): assert_port_exists('up', ch2) with pytest.raises(ValueError): ...
<commit_before>import difflib import pytest from mbuild.tests.base_test import BaseTest from mbuild.utils.io import get_fn from mbuild.utils.validation import assert_port_exists class TestUtils(BaseTest): def test_assert_port_exists(self, ch2): assert_port_exists('up', ch2) with pytest.raises(Val...
0b035ceaa611c13eac6e2cb01801ac46d9c2b13e
docs/__init__.py
docs/__init__.py
#! /usr/bin/env python3 def get_version(data): def all_same(s): return all(x == s[0] for x in s) def has_digit(s): return any(x.isdigit() for x in s) data = data.splitlines() return list( line for line, underline in zip(data, data[1:]) if (len(line) == len(underline) ...
#! /usr/bin/env python3 def get_version(data): def all_same(s): return all(x == s[0] for x in s) def has_digit(s): return any(x.isdigit() for x in s) data = data.splitlines() return list( line for line, underline in zip(data, data[1:]) if (len(line) == len(underline) ...
Fix syntax error in 3.7+
Fix syntax error in 3.7+ https://bugs.python.org/issue32012
Python
mit
Bystroushaak/pyDHTMLParser,Bystroushaak/pyDHTMLParser
#! /usr/bin/env python3 def get_version(data): def all_same(s): return all(x == s[0] for x in s) def has_digit(s): return any(x.isdigit() for x in s) data = data.splitlines() return list( line for line, underline in zip(data, data[1:]) if (len(line) == len(underline) ...
#! /usr/bin/env python3 def get_version(data): def all_same(s): return all(x == s[0] for x in s) def has_digit(s): return any(x.isdigit() for x in s) data = data.splitlines() return list( line for line, underline in zip(data, data[1:]) if (len(line) == len(underline) ...
<commit_before>#! /usr/bin/env python3 def get_version(data): def all_same(s): return all(x == s[0] for x in s) def has_digit(s): return any(x.isdigit() for x in s) data = data.splitlines() return list( line for line, underline in zip(data, data[1:]) if (len(line) == ...
#! /usr/bin/env python3 def get_version(data): def all_same(s): return all(x == s[0] for x in s) def has_digit(s): return any(x.isdigit() for x in s) data = data.splitlines() return list( line for line, underline in zip(data, data[1:]) if (len(line) == len(underline) ...
#! /usr/bin/env python3 def get_version(data): def all_same(s): return all(x == s[0] for x in s) def has_digit(s): return any(x.isdigit() for x in s) data = data.splitlines() return list( line for line, underline in zip(data, data[1:]) if (len(line) == len(underline) ...
<commit_before>#! /usr/bin/env python3 def get_version(data): def all_same(s): return all(x == s[0] for x in s) def has_digit(s): return any(x.isdigit() for x in s) data = data.splitlines() return list( line for line, underline in zip(data, data[1:]) if (len(line) == ...
7b17a42713d0afedb594d184fb82fa3feab5681a
api/applications/urls.py
api/applications/urls.py
from django.conf.urls import url from api.applications import views urlpatterns = [ url(r'^$', views.ApplicationList.as_view(), name='application-list'), url(r'^(?P<client_id>\w+)/$', views.ApplicationDetail.as_view(), name='application-detail') ]
from django.conf.urls import url from api.applications import views urlpatterns = [ url(r'^$', views.ApplicationList.as_view(), name='application-list'), url(r'^(?P<client_id>\w+)/$', views.ApplicationDetail.as_view(), name='application-detail'), url(r'^(?P<client_id>\w+)/reset/$', views.ApplicationReset....
Add url for client secret resetting
Add url for client secret resetting
Python
apache-2.0
CenterForOpenScience/osf.io,samchrisinger/osf.io,SSJohns/osf.io,mfraezz/osf.io,alexschiller/osf.io,kwierman/osf.io,wearpants/osf.io,kwierman/osf.io,hmoco/osf.io,sloria/osf.io,binoculars/osf.io,brandonPurvis/osf.io,aaxelb/osf.io,ticklemepierce/osf.io,doublebits/osf.io,leb2dg/osf.io,brandonPurvis/osf.io,ticklemepierce/os...
from django.conf.urls import url from api.applications import views urlpatterns = [ url(r'^$', views.ApplicationList.as_view(), name='application-list'), url(r'^(?P<client_id>\w+)/$', views.ApplicationDetail.as_view(), name='application-detail') ] Add url for client secret resetting
from django.conf.urls import url from api.applications import views urlpatterns = [ url(r'^$', views.ApplicationList.as_view(), name='application-list'), url(r'^(?P<client_id>\w+)/$', views.ApplicationDetail.as_view(), name='application-detail'), url(r'^(?P<client_id>\w+)/reset/$', views.ApplicationReset....
<commit_before>from django.conf.urls import url from api.applications import views urlpatterns = [ url(r'^$', views.ApplicationList.as_view(), name='application-list'), url(r'^(?P<client_id>\w+)/$', views.ApplicationDetail.as_view(), name='application-detail') ] <commit_msg>Add url for client secret resetting...
from django.conf.urls import url from api.applications import views urlpatterns = [ url(r'^$', views.ApplicationList.as_view(), name='application-list'), url(r'^(?P<client_id>\w+)/$', views.ApplicationDetail.as_view(), name='application-detail'), url(r'^(?P<client_id>\w+)/reset/$', views.ApplicationReset....
from django.conf.urls import url from api.applications import views urlpatterns = [ url(r'^$', views.ApplicationList.as_view(), name='application-list'), url(r'^(?P<client_id>\w+)/$', views.ApplicationDetail.as_view(), name='application-detail') ] Add url for client secret resettingfrom django.conf.urls impor...
<commit_before>from django.conf.urls import url from api.applications import views urlpatterns = [ url(r'^$', views.ApplicationList.as_view(), name='application-list'), url(r'^(?P<client_id>\w+)/$', views.ApplicationDetail.as_view(), name='application-detail') ] <commit_msg>Add url for client secret resetting...
f23ee95c7b662dec71ed7fd527854a7f832e3603
Lib/test/test_ctypes.py
Lib/test/test_ctypes.py
# trivial test import _ctypes import ctypes
import unittest from test.test_support import run_suite import ctypes.test def test_main(): skipped, testcases = ctypes.test.get_tests(ctypes.test, "test_*.py", verbosity=0) suites = [unittest.makeSuite(t) for t in testcases] run_suite(unittest.TestSuite(suites)) if __name__ == "__main__": test_main(...
Replace the trivial ctypes test (did only an import) with the real test suite.
Replace the trivial ctypes test (did only an import) with the real test suite.
Python
mit
sk-/python2.7-type-annotator,sk-/python2.7-type-annotator,sk-/python2.7-type-annotator
# trivial test import _ctypes import ctypes Replace the trivial ctypes test (did only an import) with the real test suite.
import unittest from test.test_support import run_suite import ctypes.test def test_main(): skipped, testcases = ctypes.test.get_tests(ctypes.test, "test_*.py", verbosity=0) suites = [unittest.makeSuite(t) for t in testcases] run_suite(unittest.TestSuite(suites)) if __name__ == "__main__": test_main(...
<commit_before># trivial test import _ctypes import ctypes <commit_msg>Replace the trivial ctypes test (did only an import) with the real test suite.<commit_after>
import unittest from test.test_support import run_suite import ctypes.test def test_main(): skipped, testcases = ctypes.test.get_tests(ctypes.test, "test_*.py", verbosity=0) suites = [unittest.makeSuite(t) for t in testcases] run_suite(unittest.TestSuite(suites)) if __name__ == "__main__": test_main(...
# trivial test import _ctypes import ctypes Replace the trivial ctypes test (did only an import) with the real test suite.import unittest from test.test_support import run_suite import ctypes.test def test_main(): skipped, testcases = ctypes.test.get_tests(ctypes.test, "test_*.py", verbosity=0) suites = [uni...
<commit_before># trivial test import _ctypes import ctypes <commit_msg>Replace the trivial ctypes test (did only an import) with the real test suite.<commit_after>import unittest from test.test_support import run_suite import ctypes.test def test_main(): skipped, testcases = ctypes.test.get_tests(ctypes.test, "t...
c12ec403fe382484b1963738143fe1ea2cbdb000
opps/images/templatetags/images_tags.py
opps/images/templatetags/images_tags.py
#!/usr/bin/env python # -*- coding: utf-8 -*- from django import template from ..generate import image_url as url register = template.Library() @register.simple_tag def image_url(image_url, **kwargs): return url(image_url=image_url, **kwargs) @register.simple_tag def image_obj(image, **kwargs): new = {} ...
#!/usr/bin/env python # -*- coding: utf-8 -*- from django import template from ..generate import image_url as url register = template.Library() @register.simple_tag def image_url(image_url, **kwargs): return url(image_url=image_url, **kwargs) @register.simple_tag def image_obj(image, **kwargs): new = {} ...
Fix pep8, E231 missing whitespace after ','
Fix pep8, E231 missing whitespace after ','
Python
mit
williamroot/opps,jeanmask/opps,YACOWS/opps,YACOWS/opps,opps/opps,williamroot/opps,jeanmask/opps,jeanmask/opps,opps/opps,YACOWS/opps,YACOWS/opps,williamroot/opps,williamroot/opps,jeanmask/opps,opps/opps,opps/opps
#!/usr/bin/env python # -*- coding: utf-8 -*- from django import template from ..generate import image_url as url register = template.Library() @register.simple_tag def image_url(image_url, **kwargs): return url(image_url=image_url, **kwargs) @register.simple_tag def image_obj(image, **kwargs): new = {} ...
#!/usr/bin/env python # -*- coding: utf-8 -*- from django import template from ..generate import image_url as url register = template.Library() @register.simple_tag def image_url(image_url, **kwargs): return url(image_url=image_url, **kwargs) @register.simple_tag def image_obj(image, **kwargs): new = {} ...
<commit_before>#!/usr/bin/env python # -*- coding: utf-8 -*- from django import template from ..generate import image_url as url register = template.Library() @register.simple_tag def image_url(image_url, **kwargs): return url(image_url=image_url, **kwargs) @register.simple_tag def image_obj(image, **kwargs):...
#!/usr/bin/env python # -*- coding: utf-8 -*- from django import template from ..generate import image_url as url register = template.Library() @register.simple_tag def image_url(image_url, **kwargs): return url(image_url=image_url, **kwargs) @register.simple_tag def image_obj(image, **kwargs): new = {} ...
#!/usr/bin/env python # -*- coding: utf-8 -*- from django import template from ..generate import image_url as url register = template.Library() @register.simple_tag def image_url(image_url, **kwargs): return url(image_url=image_url, **kwargs) @register.simple_tag def image_obj(image, **kwargs): new = {} ...
<commit_before>#!/usr/bin/env python # -*- coding: utf-8 -*- from django import template from ..generate import image_url as url register = template.Library() @register.simple_tag def image_url(image_url, **kwargs): return url(image_url=image_url, **kwargs) @register.simple_tag def image_obj(image, **kwargs):...
075d6e6cfe225c7bc57b8cb2ea66be646a207f10
cars196_dataset.py
cars196_dataset.py
# -*- coding: utf-8 -*- """ Created on Fri Dec 23 19:02:49 2016 @author: sakurai """ from fuel.datasets import H5PYDataset from fuel.utils import find_in_data_path from fuel.schemes import SequentialScheme from fuel.streams import DataStream class Cars196Dataset(H5PYDataset): _filename = 'cars196/cars196.hdf5'...
# -*- coding: utf-8 -*- """ Created on Fri Dec 23 19:02:49 2016 @author: sakurai """ from fuel.datasets import H5PYDataset from fuel.utils import find_in_data_path from fuel.schemes import SequentialScheme from fuel.streams import DataStream class Cars196Dataset(H5PYDataset): _filename = 'cars196/cars196.hdf5'...
Load datasets as raw ndarray
Load datasets as raw ndarray
Python
mit
ronekko/deep_metric_learning
# -*- coding: utf-8 -*- """ Created on Fri Dec 23 19:02:49 2016 @author: sakurai """ from fuel.datasets import H5PYDataset from fuel.utils import find_in_data_path from fuel.schemes import SequentialScheme from fuel.streams import DataStream class Cars196Dataset(H5PYDataset): _filename = 'cars196/cars196.hdf5'...
# -*- coding: utf-8 -*- """ Created on Fri Dec 23 19:02:49 2016 @author: sakurai """ from fuel.datasets import H5PYDataset from fuel.utils import find_in_data_path from fuel.schemes import SequentialScheme from fuel.streams import DataStream class Cars196Dataset(H5PYDataset): _filename = 'cars196/cars196.hdf5'...
<commit_before># -*- coding: utf-8 -*- """ Created on Fri Dec 23 19:02:49 2016 @author: sakurai """ from fuel.datasets import H5PYDataset from fuel.utils import find_in_data_path from fuel.schemes import SequentialScheme from fuel.streams import DataStream class Cars196Dataset(H5PYDataset): _filename = 'cars19...
# -*- coding: utf-8 -*- """ Created on Fri Dec 23 19:02:49 2016 @author: sakurai """ from fuel.datasets import H5PYDataset from fuel.utils import find_in_data_path from fuel.schemes import SequentialScheme from fuel.streams import DataStream class Cars196Dataset(H5PYDataset): _filename = 'cars196/cars196.hdf5'...
# -*- coding: utf-8 -*- """ Created on Fri Dec 23 19:02:49 2016 @author: sakurai """ from fuel.datasets import H5PYDataset from fuel.utils import find_in_data_path from fuel.schemes import SequentialScheme from fuel.streams import DataStream class Cars196Dataset(H5PYDataset): _filename = 'cars196/cars196.hdf5'...
<commit_before># -*- coding: utf-8 -*- """ Created on Fri Dec 23 19:02:49 2016 @author: sakurai """ from fuel.datasets import H5PYDataset from fuel.utils import find_in_data_path from fuel.schemes import SequentialScheme from fuel.streams import DataStream class Cars196Dataset(H5PYDataset): _filename = 'cars19...
36a4b66d3f9f7de52760da5e3c7f7c5f9170bb2a
bockus/prod_settings/__init__.py
bockus/prod_settings/__init__.py
from bockus.settings import * import dj_database_url DEBUG = False TEMPLATE_DEBUG = DEBUG DATABASES['default'] = dj_database_url.config() ALLOWED_HOSTS = [ '.booksonas.com', '.herokuapp.com', 'localhost', '127.0.0.1', ] SECURE_PROXY_SSL_HEADER = ('HTTP_X_FORWARDED_PROTO', 'https') SECRET_KEY = get_...
from bockus.settings import * import dj_database_url DEBUG = True TEMPLATE_DEBUG = DEBUG DATABASES['default'] = dj_database_url.config() ALLOWED_HOSTS = [ '.booksonas.com', '.herokuapp.com', 'localhost', '127.0.0.1', ] SECURE_PROXY_SSL_HEADER = ('HTTP_X_FORWARDED_PROTO', 'https') SECRET_KEY = get_e...
Change debug setting for testing.
Change debug setting for testing.
Python
mit
phildini/bockus,phildini/bockus,phildini/bockus
from bockus.settings import * import dj_database_url DEBUG = False TEMPLATE_DEBUG = DEBUG DATABASES['default'] = dj_database_url.config() ALLOWED_HOSTS = [ '.booksonas.com', '.herokuapp.com', 'localhost', '127.0.0.1', ] SECURE_PROXY_SSL_HEADER = ('HTTP_X_FORWARDED_PROTO', 'https') SECRET_KEY = get_...
from bockus.settings import * import dj_database_url DEBUG = True TEMPLATE_DEBUG = DEBUG DATABASES['default'] = dj_database_url.config() ALLOWED_HOSTS = [ '.booksonas.com', '.herokuapp.com', 'localhost', '127.0.0.1', ] SECURE_PROXY_SSL_HEADER = ('HTTP_X_FORWARDED_PROTO', 'https') SECRET_KEY = get_e...
<commit_before>from bockus.settings import * import dj_database_url DEBUG = False TEMPLATE_DEBUG = DEBUG DATABASES['default'] = dj_database_url.config() ALLOWED_HOSTS = [ '.booksonas.com', '.herokuapp.com', 'localhost', '127.0.0.1', ] SECURE_PROXY_SSL_HEADER = ('HTTP_X_FORWARDED_PROTO', 'https') SE...
from bockus.settings import * import dj_database_url DEBUG = True TEMPLATE_DEBUG = DEBUG DATABASES['default'] = dj_database_url.config() ALLOWED_HOSTS = [ '.booksonas.com', '.herokuapp.com', 'localhost', '127.0.0.1', ] SECURE_PROXY_SSL_HEADER = ('HTTP_X_FORWARDED_PROTO', 'https') SECRET_KEY = get_e...
from bockus.settings import * import dj_database_url DEBUG = False TEMPLATE_DEBUG = DEBUG DATABASES['default'] = dj_database_url.config() ALLOWED_HOSTS = [ '.booksonas.com', '.herokuapp.com', 'localhost', '127.0.0.1', ] SECURE_PROXY_SSL_HEADER = ('HTTP_X_FORWARDED_PROTO', 'https') SECRET_KEY = get_...
<commit_before>from bockus.settings import * import dj_database_url DEBUG = False TEMPLATE_DEBUG = DEBUG DATABASES['default'] = dj_database_url.config() ALLOWED_HOSTS = [ '.booksonas.com', '.herokuapp.com', 'localhost', '127.0.0.1', ] SECURE_PROXY_SSL_HEADER = ('HTTP_X_FORWARDED_PROTO', 'https') SE...
d05b9effc6d230aeb2a13759a67df644d75140ca
cts/views.py
cts/views.py
from django.http import HttpResponse def health_view(request): return HttpResponse()
from django.http import HttpResponse def health_view(request): return HttpResponse("I am okay.", content_type="text/plain")
Return some text on a health check
Return some text on a health check
Python
bsd-3-clause
theirc/CTS,theirc/CTS,theirc/CTS,stbenjam/CTS,stbenjam/CTS,stbenjam/CTS,stbenjam/CTS,theirc/CTS
from django.http import HttpResponse def health_view(request): return HttpResponse() Return some text on a health check
from django.http import HttpResponse def health_view(request): return HttpResponse("I am okay.", content_type="text/plain")
<commit_before>from django.http import HttpResponse def health_view(request): return HttpResponse() <commit_msg>Return some text on a health check<commit_after>
from django.http import HttpResponse def health_view(request): return HttpResponse("I am okay.", content_type="text/plain")
from django.http import HttpResponse def health_view(request): return HttpResponse() Return some text on a health checkfrom django.http import HttpResponse def health_view(request): return HttpResponse("I am okay.", content_type="text/plain")
<commit_before>from django.http import HttpResponse def health_view(request): return HttpResponse() <commit_msg>Return some text on a health check<commit_after>from django.http import HttpResponse def health_view(request): return HttpResponse("I am okay.", content_type="text/plain")
68cca0cab9f2cfde6098801936d631aa8255adeb
tt_dailyemailblast/tasks.py
tt_dailyemailblast/tasks.py
from celery.task import task from . import models from .send_backends import sync @task def send_daily_email_blasts(blast_pk): blast = models.DailyEmailBlast.objects.get(pk=blast_pk) sync.sync_daily_email_blasts(blast) @task def send_recipients_list(recipients_list_pk, blast_pk): blast = models.DailyEm...
from celery.task import task from . import models from .send_backends import sync @task def send_daily_email_blasts(blast_pk): blast = models.DailyEmailBlast.objects.get(pk=blast_pk) sync.sync_daily_email_blasts(blast) @task def send_recipients_list(recipients_list_pk, blast_pk): blast = models.DailyEm...
Fix typo causing send_recipient task to fail
Fix typo causing send_recipient task to fail
Python
apache-2.0
texastribune/tt_dailyemailblast,texastribune/tt_dailyemailblast
from celery.task import task from . import models from .send_backends import sync @task def send_daily_email_blasts(blast_pk): blast = models.DailyEmailBlast.objects.get(pk=blast_pk) sync.sync_daily_email_blasts(blast) @task def send_recipients_list(recipients_list_pk, blast_pk): blast = models.DailyEm...
from celery.task import task from . import models from .send_backends import sync @task def send_daily_email_blasts(blast_pk): blast = models.DailyEmailBlast.objects.get(pk=blast_pk) sync.sync_daily_email_blasts(blast) @task def send_recipients_list(recipients_list_pk, blast_pk): blast = models.DailyEm...
<commit_before>from celery.task import task from . import models from .send_backends import sync @task def send_daily_email_blasts(blast_pk): blast = models.DailyEmailBlast.objects.get(pk=blast_pk) sync.sync_daily_email_blasts(blast) @task def send_recipients_list(recipients_list_pk, blast_pk): blast =...
from celery.task import task from . import models from .send_backends import sync @task def send_daily_email_blasts(blast_pk): blast = models.DailyEmailBlast.objects.get(pk=blast_pk) sync.sync_daily_email_blasts(blast) @task def send_recipients_list(recipients_list_pk, blast_pk): blast = models.DailyEm...
from celery.task import task from . import models from .send_backends import sync @task def send_daily_email_blasts(blast_pk): blast = models.DailyEmailBlast.objects.get(pk=blast_pk) sync.sync_daily_email_blasts(blast) @task def send_recipients_list(recipients_list_pk, blast_pk): blast = models.DailyEm...
<commit_before>from celery.task import task from . import models from .send_backends import sync @task def send_daily_email_blasts(blast_pk): blast = models.DailyEmailBlast.objects.get(pk=blast_pk) sync.sync_daily_email_blasts(blast) @task def send_recipients_list(recipients_list_pk, blast_pk): blast =...
912c81e99adf89d0c39ac19d1705bad4426d134b
tt_dailyemailblast/utils.py
tt_dailyemailblast/utils.py
from armstrong.utils.backends import GenericBackend def get_template_names(blast, recipient_list, recipient): return [ 'tt_dailyemailblast/%s/%s/%s.html' % (blast.blast_type.slug, recipient_list.slug, recipient.slug), 'tt_dailyemailblast/%s/%s.html' % (blast.blast_type.slug, ...
from armstrong.utils.backends import GenericBackend def get_template_names(blast, recipient_list, recipient): return [ 'tt_dailyemailblast/%s/%s/%s.html' % (blast.blast_type.slug, recipient_list.slug, recipient.slug), 'tt_dailyemailblast/%s/%s.html' % (blast.blast_type.slug, ...
Fix get_backend doesn't actually return a backend
Fix get_backend doesn't actually return a backend
Python
apache-2.0
texastribune/tt_dailyemailblast,texastribune/tt_dailyemailblast
from armstrong.utils.backends import GenericBackend def get_template_names(blast, recipient_list, recipient): return [ 'tt_dailyemailblast/%s/%s/%s.html' % (blast.blast_type.slug, recipient_list.slug, recipient.slug), 'tt_dailyemailblast/%s/%s.html' % (blast.blast_type.slug, ...
from armstrong.utils.backends import GenericBackend def get_template_names(blast, recipient_list, recipient): return [ 'tt_dailyemailblast/%s/%s/%s.html' % (blast.blast_type.slug, recipient_list.slug, recipient.slug), 'tt_dailyemailblast/%s/%s.html' % (blast.blast_type.slug, ...
<commit_before>from armstrong.utils.backends import GenericBackend def get_template_names(blast, recipient_list, recipient): return [ 'tt_dailyemailblast/%s/%s/%s.html' % (blast.blast_type.slug, recipient_list.slug, recipient.slug), 'tt_dailyemailblast/%s/%s.html' % (blast.blast_ty...
from armstrong.utils.backends import GenericBackend def get_template_names(blast, recipient_list, recipient): return [ 'tt_dailyemailblast/%s/%s/%s.html' % (blast.blast_type.slug, recipient_list.slug, recipient.slug), 'tt_dailyemailblast/%s/%s.html' % (blast.blast_type.slug, ...
from armstrong.utils.backends import GenericBackend def get_template_names(blast, recipient_list, recipient): return [ 'tt_dailyemailblast/%s/%s/%s.html' % (blast.blast_type.slug, recipient_list.slug, recipient.slug), 'tt_dailyemailblast/%s/%s.html' % (blast.blast_type.slug, ...
<commit_before>from armstrong.utils.backends import GenericBackend def get_template_names(blast, recipient_list, recipient): return [ 'tt_dailyemailblast/%s/%s/%s.html' % (blast.blast_type.slug, recipient_list.slug, recipient.slug), 'tt_dailyemailblast/%s/%s.html' % (blast.blast_ty...
c156dd50e8f6b699ba87b7e185207e9ad3654979
examples/ssl_server.py
examples/ssl_server.py
import secure_smtpd import asyncore, logging, time, signal, sys from secure_smtpd import SMTPServer, FakeCredentialValidator class SSLSMTPServer(SMTPServer): def __init__(self): pass def process_message(self, peer, mailfrom, rcpttos, message_data): print message_data ...
import logging from secure_smtpd import SMTPServer, FakeCredentialValidator, LOG_NAME class SSLSMTPServer(SMTPServer): def process_message(self, peer, mailfrom, rcpttos, message_data): print message_data logger = logging.getLogger( LOG_NAME ) logger.setLevel(logging.INFO) server = SSLSMTPServer( ('0....
Use unprivlidged port to make testing easier.
Use unprivlidged port to make testing easier. Use new server run() method. Refactor example class to make things simpler.
Python
isc
bcoe/secure-smtpd
import secure_smtpd import asyncore, logging, time, signal, sys from secure_smtpd import SMTPServer, FakeCredentialValidator class SSLSMTPServer(SMTPServer): def __init__(self): pass def process_message(self, peer, mailfrom, rcpttos, message_data): print message_data ...
import logging from secure_smtpd import SMTPServer, FakeCredentialValidator, LOG_NAME class SSLSMTPServer(SMTPServer): def process_message(self, peer, mailfrom, rcpttos, message_data): print message_data logger = logging.getLogger( LOG_NAME ) logger.setLevel(logging.INFO) server = SSLSMTPServer( ('0....
<commit_before>import secure_smtpd import asyncore, logging, time, signal, sys from secure_smtpd import SMTPServer, FakeCredentialValidator class SSLSMTPServer(SMTPServer): def __init__(self): pass def process_message(self, peer, mailfrom, rcpttos, message_data): print message_dat...
import logging from secure_smtpd import SMTPServer, FakeCredentialValidator, LOG_NAME class SSLSMTPServer(SMTPServer): def process_message(self, peer, mailfrom, rcpttos, message_data): print message_data logger = logging.getLogger( LOG_NAME ) logger.setLevel(logging.INFO) server = SSLSMTPServer( ('0....
import secure_smtpd import asyncore, logging, time, signal, sys from secure_smtpd import SMTPServer, FakeCredentialValidator class SSLSMTPServer(SMTPServer): def __init__(self): pass def process_message(self, peer, mailfrom, rcpttos, message_data): print message_data ...
<commit_before>import secure_smtpd import asyncore, logging, time, signal, sys from secure_smtpd import SMTPServer, FakeCredentialValidator class SSLSMTPServer(SMTPServer): def __init__(self): pass def process_message(self, peer, mailfrom, rcpttos, message_data): print message_dat...
42285c696dc2bcbcc1aeb6ed0bd46b6418e4223f
program.py
program.py
import json import csv from collections import namedtuple from player_class import Players def main(): filename = get_data_file() data = load_file(filename) division_standings() playoff_standings() playoff_standings() player_stats() points_for() tiebreaker() player_score() # Imp...
import json import csv import requests import secret base_url = https://www.mysportsfeeds.com/api/feed/pull/nfl/2016-2017-regular/ def main(): division_standings() playoff_standings() playoff_standings() player_stats() points_for() tiebreaker() player_score() # Get Division Standings f...
Add stub for pulling player_stats including a new base_url for MySportsFeed
Add stub for pulling player_stats including a new base_url for MySportsFeed
Python
mit
prcutler/nflpool,prcutler/nflpool
import json import csv from collections import namedtuple from player_class import Players def main(): filename = get_data_file() data = load_file(filename) division_standings() playoff_standings() playoff_standings() player_stats() points_for() tiebreaker() player_score() # Imp...
import json import csv import requests import secret base_url = https://www.mysportsfeeds.com/api/feed/pull/nfl/2016-2017-regular/ def main(): division_standings() playoff_standings() playoff_standings() player_stats() points_for() tiebreaker() player_score() # Get Division Standings f...
<commit_before>import json import csv from collections import namedtuple from player_class import Players def main(): filename = get_data_file() data = load_file(filename) division_standings() playoff_standings() playoff_standings() player_stats() points_for() tiebreaker() player_...
import json import csv import requests import secret base_url = https://www.mysportsfeeds.com/api/feed/pull/nfl/2016-2017-regular/ def main(): division_standings() playoff_standings() playoff_standings() player_stats() points_for() tiebreaker() player_score() # Get Division Standings f...
import json import csv from collections import namedtuple from player_class import Players def main(): filename = get_data_file() data = load_file(filename) division_standings() playoff_standings() playoff_standings() player_stats() points_for() tiebreaker() player_score() # Imp...
<commit_before>import json import csv from collections import namedtuple from player_class import Players def main(): filename = get_data_file() data = load_file(filename) division_standings() playoff_standings() playoff_standings() player_stats() points_for() tiebreaker() player_...
6a48f6c0a4dec53a0094706957eecef10c2a6001
medical_appointment/__openerp__.py
medical_appointment/__openerp__.py
# -*- coding: utf-8 -*- # © 2016 LasLabs Inc. # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). { 'name': 'Medical Appointment', 'summary': 'Add Appointment concept to medical_physician', 'version': '9.0.1.0.0', 'author': 'LasLabs, Odoo Community Association (OCA)', 'category': ...
# -*- coding: utf-8 -*- # © 2016 LasLabs Inc. # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). { 'name': 'Medical Appointment', 'summary': 'Add Appointment concept to medical_physician', 'version': '9.0.1.0.0', 'author': 'LasLabs, Odoo Community Association (OCA)', 'category': ...
Add medical_physician requirement to medical_appointment
Add medical_physician requirement to medical_appointment
Python
agpl-3.0
laslabs/vertical-medical,laslabs/vertical-medical
# -*- coding: utf-8 -*- # © 2016 LasLabs Inc. # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). { 'name': 'Medical Appointment', 'summary': 'Add Appointment concept to medical_physician', 'version': '9.0.1.0.0', 'author': 'LasLabs, Odoo Community Association (OCA)', 'category': ...
# -*- coding: utf-8 -*- # © 2016 LasLabs Inc. # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). { 'name': 'Medical Appointment', 'summary': 'Add Appointment concept to medical_physician', 'version': '9.0.1.0.0', 'author': 'LasLabs, Odoo Community Association (OCA)', 'category': ...
<commit_before># -*- coding: utf-8 -*- # © 2016 LasLabs Inc. # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). { 'name': 'Medical Appointment', 'summary': 'Add Appointment concept to medical_physician', 'version': '9.0.1.0.0', 'author': 'LasLabs, Odoo Community Association (OCA)', ...
# -*- coding: utf-8 -*- # © 2016 LasLabs Inc. # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). { 'name': 'Medical Appointment', 'summary': 'Add Appointment concept to medical_physician', 'version': '9.0.1.0.0', 'author': 'LasLabs, Odoo Community Association (OCA)', 'category': ...
# -*- coding: utf-8 -*- # © 2016 LasLabs Inc. # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). { 'name': 'Medical Appointment', 'summary': 'Add Appointment concept to medical_physician', 'version': '9.0.1.0.0', 'author': 'LasLabs, Odoo Community Association (OCA)', 'category': ...
<commit_before># -*- coding: utf-8 -*- # © 2016 LasLabs Inc. # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). { 'name': 'Medical Appointment', 'summary': 'Add Appointment concept to medical_physician', 'version': '9.0.1.0.0', 'author': 'LasLabs, Odoo Community Association (OCA)', ...
75486c41bd648e63f1baf118000300cb7dee164b
ovirt-guest-agent/setup.py
ovirt-guest-agent/setup.py
from distutils.core import setup from glob import glob import os import sys import py2exe if len(sys.argv) == 1: sys.argv.append("py2exe") sys.argv.append("-b 1") class Target: def __init__(self, **kw): self.__dict__.update(kw) self.version = "1.0.16" self.company_name = "Red Ha...
from distutils.core import setup from glob import glob import os import sys import py2exe if len(sys.argv) == 1: sys.argv.append("py2exe") sys.argv.append("-b 1") class Target: def __init__(self, **kw): self.__dict__.update(kw) self.version = "1.0.16" self.package_version = "1.0...
Add explicit package version to the oVirt GA executable
Add explicit package version to the oVirt GA executable We really need to track 2 different versions in case of oVirt GA: - the version of the oVirt GA package itself - RH(E)V specific version of the oVirt GA package This patch adds setting of the package_version. Change-Id: I2dea656facbf2aa33a733316136e0e4d1b8d4744...
Python
apache-2.0
oVirt/ovirt-guest-agent,oVirt/ovirt-guest-agent,oVirt/ovirt-guest-agent,oVirt/ovirt-guest-agent
from distutils.core import setup from glob import glob import os import sys import py2exe if len(sys.argv) == 1: sys.argv.append("py2exe") sys.argv.append("-b 1") class Target: def __init__(self, **kw): self.__dict__.update(kw) self.version = "1.0.16" self.company_name = "Red Ha...
from distutils.core import setup from glob import glob import os import sys import py2exe if len(sys.argv) == 1: sys.argv.append("py2exe") sys.argv.append("-b 1") class Target: def __init__(self, **kw): self.__dict__.update(kw) self.version = "1.0.16" self.package_version = "1.0...
<commit_before> from distutils.core import setup from glob import glob import os import sys import py2exe if len(sys.argv) == 1: sys.argv.append("py2exe") sys.argv.append("-b 1") class Target: def __init__(self, **kw): self.__dict__.update(kw) self.version = "1.0.16" self.company...
from distutils.core import setup from glob import glob import os import sys import py2exe if len(sys.argv) == 1: sys.argv.append("py2exe") sys.argv.append("-b 1") class Target: def __init__(self, **kw): self.__dict__.update(kw) self.version = "1.0.16" self.package_version = "1.0...
from distutils.core import setup from glob import glob import os import sys import py2exe if len(sys.argv) == 1: sys.argv.append("py2exe") sys.argv.append("-b 1") class Target: def __init__(self, **kw): self.__dict__.update(kw) self.version = "1.0.16" self.company_name = "Red Ha...
<commit_before> from distutils.core import setup from glob import glob import os import sys import py2exe if len(sys.argv) == 1: sys.argv.append("py2exe") sys.argv.append("-b 1") class Target: def __init__(self, **kw): self.__dict__.update(kw) self.version = "1.0.16" self.company...
7c2ef2ce6b31d6188c4ea25d2c885d47a67ad5cb
OnlineParticipationDataset/pipelines.py
OnlineParticipationDataset/pipelines.py
# -*- coding: utf-8 -*- # Define your item pipelines here # # Don't forget to add your pipeline to the ITEM_PIPELINES setting # See: http://doc.scrapy.org/en/latest/topics/item-pipeline.html import json,os from datetime import datetime from scrapy.exporters import JsonLinesItemExporter path = "downloads" class Onl...
# -*- coding: utf-8 -*- # Define your item pipelines here # # Don't forget to add your pipeline to the ITEM_PIPELINES setting # See: http://doc.scrapy.org/en/latest/topics/item-pipeline.html import json,os from datetime import datetime from scrapy.exporters import JsonLinesItemExporter path = "downloads" class Onl...
Save datetime in JSON as ISO
Save datetime in JSON as ISO
Python
mit
Liebeck/OnlineParticipationDatasets
# -*- coding: utf-8 -*- # Define your item pipelines here # # Don't forget to add your pipeline to the ITEM_PIPELINES setting # See: http://doc.scrapy.org/en/latest/topics/item-pipeline.html import json,os from datetime import datetime from scrapy.exporters import JsonLinesItemExporter path = "downloads" class Onl...
# -*- coding: utf-8 -*- # Define your item pipelines here # # Don't forget to add your pipeline to the ITEM_PIPELINES setting # See: http://doc.scrapy.org/en/latest/topics/item-pipeline.html import json,os from datetime import datetime from scrapy.exporters import JsonLinesItemExporter path = "downloads" class Onl...
<commit_before># -*- coding: utf-8 -*- # Define your item pipelines here # # Don't forget to add your pipeline to the ITEM_PIPELINES setting # See: http://doc.scrapy.org/en/latest/topics/item-pipeline.html import json,os from datetime import datetime from scrapy.exporters import JsonLinesItemExporter path = "downloa...
# -*- coding: utf-8 -*- # Define your item pipelines here # # Don't forget to add your pipeline to the ITEM_PIPELINES setting # See: http://doc.scrapy.org/en/latest/topics/item-pipeline.html import json,os from datetime import datetime from scrapy.exporters import JsonLinesItemExporter path = "downloads" class Onl...
# -*- coding: utf-8 -*- # Define your item pipelines here # # Don't forget to add your pipeline to the ITEM_PIPELINES setting # See: http://doc.scrapy.org/en/latest/topics/item-pipeline.html import json,os from datetime import datetime from scrapy.exporters import JsonLinesItemExporter path = "downloads" class Onl...
<commit_before># -*- coding: utf-8 -*- # Define your item pipelines here # # Don't forget to add your pipeline to the ITEM_PIPELINES setting # See: http://doc.scrapy.org/en/latest/topics/item-pipeline.html import json,os from datetime import datetime from scrapy.exporters import JsonLinesItemExporter path = "downloa...
b5059e1d525b0e774923fade7c1b2f183c499622
addons/web_calendar/contacts.py
addons/web_calendar/contacts.py
from openerp.osv import fields, osv class web_calendar_contacts(osv.osv): _name = 'web_calendar.contacts' _columns = { 'user_id': fields.many2one('res.users','Me'), 'partner_id': fields.many2one('res.partner','Contact'), 'active':fields.boolean('active'), } _defaul...
from openerp.osv import fields, osv class web_calendar_contacts(osv.osv): _name = 'web_calendar.contacts' _columns = { 'user_id': fields.many2one('res.users','Me'), 'partner_id': fields.many2one('res.partner','Contact',required=True), 'active':fields.boolean('active'), ...
Add required on field res.partner from model Contacts to avoid the creation of empty coworkers
[FIX] Add required on field res.partner from model Contacts to avoid the creation of empty coworkers bzr revid: jke@openerp.com-20131218091020-8upymhda9nd84fg8
Python
agpl-3.0
Gitlab11/odoo,havt/odoo,acshan/odoo,oihane/odoo,fdvarela/odoo8,ApuliaSoftware/odoo,hassoon3/odoo,tinkerthaler/odoo,chiragjogi/odoo,rowemoore/odoo,mmbtba/odoo,abdellatifkarroum/odoo,eino-makitalo/odoo,jusdng/odoo,Eric-Zhong/odoo,colinnewell/odoo,acshan/odoo,spadae22/odoo,minhtuancn/odoo,apocalypsebg/odoo,GauravSahu/odoo...
from openerp.osv import fields, osv class web_calendar_contacts(osv.osv): _name = 'web_calendar.contacts' _columns = { 'user_id': fields.many2one('res.users','Me'), 'partner_id': fields.many2one('res.partner','Contact'), 'active':fields.boolean('active'), } _defaul...
from openerp.osv import fields, osv class web_calendar_contacts(osv.osv): _name = 'web_calendar.contacts' _columns = { 'user_id': fields.many2one('res.users','Me'), 'partner_id': fields.many2one('res.partner','Contact',required=True), 'active':fields.boolean('active'), ...
<commit_before>from openerp.osv import fields, osv class web_calendar_contacts(osv.osv): _name = 'web_calendar.contacts' _columns = { 'user_id': fields.many2one('res.users','Me'), 'partner_id': fields.many2one('res.partner','Contact'), 'active':fields.boolean('active'), ...
from openerp.osv import fields, osv class web_calendar_contacts(osv.osv): _name = 'web_calendar.contacts' _columns = { 'user_id': fields.many2one('res.users','Me'), 'partner_id': fields.many2one('res.partner','Contact',required=True), 'active':fields.boolean('active'), ...
from openerp.osv import fields, osv class web_calendar_contacts(osv.osv): _name = 'web_calendar.contacts' _columns = { 'user_id': fields.many2one('res.users','Me'), 'partner_id': fields.many2one('res.partner','Contact'), 'active':fields.boolean('active'), } _defaul...
<commit_before>from openerp.osv import fields, osv class web_calendar_contacts(osv.osv): _name = 'web_calendar.contacts' _columns = { 'user_id': fields.many2one('res.users','Me'), 'partner_id': fields.many2one('res.partner','Contact'), 'active':fields.boolean('active'), ...
2f31183c2ec71baa826282e10ce7e6b7decbdc75
Tools/idle/IdlePrefs.py
Tools/idle/IdlePrefs.py
# Color Prefs for idle class ColorPrefs: CNormal = "black", "white" # "purple", "white" CKeyword = "#ff7700", None CComment = "#dd0000", None CString = "#00aa00", None CDefinition = "#0000ff", None CHilite = "#000068", "#006868" CSync = None, None # N...
# Color Prefs for idle class ColorPrefs: CNormal = "black", "white" # "purple", "white" CKeyword = "#ff7700", None CComment = "#dd0000", None CString = "#00aa00", None CDefinition = "#0000ff", None CHilite = "#000068", "#006868" CSync = None, None # N...
Make the color for stderr red (i.e. the standard warning/danger/stop color) rather than green. Suggested by Sam Schulenburg.
Make the color for stderr red (i.e. the standard warning/danger/stop color) rather than green. Suggested by Sam Schulenburg.
Python
mit
sk-/python2.7-type-annotator,sk-/python2.7-type-annotator,sk-/python2.7-type-annotator
# Color Prefs for idle class ColorPrefs: CNormal = "black", "white" # "purple", "white" CKeyword = "#ff7700", None CComment = "#dd0000", None CString = "#00aa00", None CDefinition = "#0000ff", None CHilite = "#000068", "#006868" CSync = None, None # N...
# Color Prefs for idle class ColorPrefs: CNormal = "black", "white" # "purple", "white" CKeyword = "#ff7700", None CComment = "#dd0000", None CString = "#00aa00", None CDefinition = "#0000ff", None CHilite = "#000068", "#006868" CSync = None, None # N...
<commit_before># Color Prefs for idle class ColorPrefs: CNormal = "black", "white" # "purple", "white" CKeyword = "#ff7700", None CComment = "#dd0000", None CString = "#00aa00", None CDefinition = "#0000ff", None CHilite = "#000068", "#006868" CSync = None, None...
# Color Prefs for idle class ColorPrefs: CNormal = "black", "white" # "purple", "white" CKeyword = "#ff7700", None CComment = "#dd0000", None CString = "#00aa00", None CDefinition = "#0000ff", None CHilite = "#000068", "#006868" CSync = None, None # N...
# Color Prefs for idle class ColorPrefs: CNormal = "black", "white" # "purple", "white" CKeyword = "#ff7700", None CComment = "#dd0000", None CString = "#00aa00", None CDefinition = "#0000ff", None CHilite = "#000068", "#006868" CSync = None, None # N...
<commit_before># Color Prefs for idle class ColorPrefs: CNormal = "black", "white" # "purple", "white" CKeyword = "#ff7700", None CComment = "#dd0000", None CString = "#00aa00", None CDefinition = "#0000ff", None CHilite = "#000068", "#006868" CSync = None, None...
14503786d1ff3a91cee1b05698faf60e1f7bb371
edit.py
edit.py
# Open your $EDITOR to compose a message in weechat # # Usage: # /edit # # History: # 10-18-2015 # Version 1.0.0: initial release import os import os.path import subprocess import weechat def edit(data, buf, args): editor = os.environ.get("EDITOR", "vim") path = os.path.expanduser("~/.weechat/message.txt") ...
# Open your $EDITOR to compose a message in weechat # # Usage: # /edit # # History: # 10-18-2015 # Version 1.0.0: initial release import os import os.path import subprocess import weechat def edit(data, buf, args): editor = os.environ.get("EDITOR", "vim") path = os.path.expanduser("~/.weechat/message.txt") ...
Remove file after using it
Remove file after using it
Python
mit
keith/edit-weechat
# Open your $EDITOR to compose a message in weechat # # Usage: # /edit # # History: # 10-18-2015 # Version 1.0.0: initial release import os import os.path import subprocess import weechat def edit(data, buf, args): editor = os.environ.get("EDITOR", "vim") path = os.path.expanduser("~/.weechat/message.txt") ...
# Open your $EDITOR to compose a message in weechat # # Usage: # /edit # # History: # 10-18-2015 # Version 1.0.0: initial release import os import os.path import subprocess import weechat def edit(data, buf, args): editor = os.environ.get("EDITOR", "vim") path = os.path.expanduser("~/.weechat/message.txt") ...
<commit_before># Open your $EDITOR to compose a message in weechat # # Usage: # /edit # # History: # 10-18-2015 # Version 1.0.0: initial release import os import os.path import subprocess import weechat def edit(data, buf, args): editor = os.environ.get("EDITOR", "vim") path = os.path.expanduser("~/.weechat/...
# Open your $EDITOR to compose a message in weechat # # Usage: # /edit # # History: # 10-18-2015 # Version 1.0.0: initial release import os import os.path import subprocess import weechat def edit(data, buf, args): editor = os.environ.get("EDITOR", "vim") path = os.path.expanduser("~/.weechat/message.txt") ...
# Open your $EDITOR to compose a message in weechat # # Usage: # /edit # # History: # 10-18-2015 # Version 1.0.0: initial release import os import os.path import subprocess import weechat def edit(data, buf, args): editor = os.environ.get("EDITOR", "vim") path = os.path.expanduser("~/.weechat/message.txt") ...
<commit_before># Open your $EDITOR to compose a message in weechat # # Usage: # /edit # # History: # 10-18-2015 # Version 1.0.0: initial release import os import os.path import subprocess import weechat def edit(data, buf, args): editor = os.environ.get("EDITOR", "vim") path = os.path.expanduser("~/.weechat/...
ece48034dac3466e2ebf5ced85afc0a36cf4997b
api/base/content_negotiation.py
api/base/content_negotiation.py
from rest_framework.negotiation import BaseContentNegotiation class CustomClientContentNegotiation(BaseContentNegotiation): def select_parser(self, request, parsers): """ Select the first parser in the `.parser_classes` list. """ return parsers[0] def select_renderer(self, req...
from rest_framework.negotiation import BaseContentNegotiation class CustomClientContentNegotiation(BaseContentNegotiation): def select_parser(self, request, parsers): """ Select the first parser in the `.parser_classes` list. """ content_type = request.QUERY_PARAMS.get('content_typ...
Change select_parser to choose parser based on content_type instead of manadating a parser
Change select_parser to choose parser based on content_type instead of manadating a parser
Python
apache-2.0
ZobairAlijan/osf.io,haoyuchen1992/osf.io,ckc6cz/osf.io,danielneis/osf.io,abought/osf.io,SSJohns/osf.io,felliott/osf.io,cwisecarver/osf.io,kwierman/osf.io,HalcyonChimera/osf.io,laurenrevere/osf.io,GageGaskins/osf.io,RomanZWang/osf.io,cslzchen/osf.io,doublebits/osf.io,samchrisinger/osf.io,acshi/osf.io,mluo613/osf.io,bill...
from rest_framework.negotiation import BaseContentNegotiation class CustomClientContentNegotiation(BaseContentNegotiation): def select_parser(self, request, parsers): """ Select the first parser in the `.parser_classes` list. """ return parsers[0] def select_renderer(self, req...
from rest_framework.negotiation import BaseContentNegotiation class CustomClientContentNegotiation(BaseContentNegotiation): def select_parser(self, request, parsers): """ Select the first parser in the `.parser_classes` list. """ content_type = request.QUERY_PARAMS.get('content_typ...
<commit_before>from rest_framework.negotiation import BaseContentNegotiation class CustomClientContentNegotiation(BaseContentNegotiation): def select_parser(self, request, parsers): """ Select the first parser in the `.parser_classes` list. """ return parsers[0] def select_ren...
from rest_framework.negotiation import BaseContentNegotiation class CustomClientContentNegotiation(BaseContentNegotiation): def select_parser(self, request, parsers): """ Select the first parser in the `.parser_classes` list. """ content_type = request.QUERY_PARAMS.get('content_typ...
from rest_framework.negotiation import BaseContentNegotiation class CustomClientContentNegotiation(BaseContentNegotiation): def select_parser(self, request, parsers): """ Select the first parser in the `.parser_classes` list. """ return parsers[0] def select_renderer(self, req...
<commit_before>from rest_framework.negotiation import BaseContentNegotiation class CustomClientContentNegotiation(BaseContentNegotiation): def select_parser(self, request, parsers): """ Select the first parser in the `.parser_classes` list. """ return parsers[0] def select_ren...
2b58a34a6bde9c7db39fc436928e344284de633b
app/DataLogger/sqlite_logger.py
app/DataLogger/sqlite_logger.py
import sqlite3 import time class SQLiteLogger: def __init__(self, filename="g2x.db"): self.filename = filename self.connection = None def __enter__(self): try: with open(self.filename): self.connection = sqlite3.connect(self.filename) except IOError...
import sqlite3 import time class SQLiteLogger: def __init__(self, filename="g2x.db"): self.filename = filename self.connection = None def __enter__(self): self.open() return self def __exit__(self, type, value, traceback): self.close() def open(self): ...
Allow logger to be opened and closed directly
Allow logger to be opened and closed directly
Python
mit
gizmo-cda/g2x,gizmo-cda/g2x,thelonious/g2x,gizmo-cda/g2x,gizmo-cda/g2x,thelonious/g2x
import sqlite3 import time class SQLiteLogger: def __init__(self, filename="g2x.db"): self.filename = filename self.connection = None def __enter__(self): try: with open(self.filename): self.connection = sqlite3.connect(self.filename) except IOError...
import sqlite3 import time class SQLiteLogger: def __init__(self, filename="g2x.db"): self.filename = filename self.connection = None def __enter__(self): self.open() return self def __exit__(self, type, value, traceback): self.close() def open(self): ...
<commit_before>import sqlite3 import time class SQLiteLogger: def __init__(self, filename="g2x.db"): self.filename = filename self.connection = None def __enter__(self): try: with open(self.filename): self.connection = sqlite3.connect(self.filename) ...
import sqlite3 import time class SQLiteLogger: def __init__(self, filename="g2x.db"): self.filename = filename self.connection = None def __enter__(self): self.open() return self def __exit__(self, type, value, traceback): self.close() def open(self): ...
import sqlite3 import time class SQLiteLogger: def __init__(self, filename="g2x.db"): self.filename = filename self.connection = None def __enter__(self): try: with open(self.filename): self.connection = sqlite3.connect(self.filename) except IOError...
<commit_before>import sqlite3 import time class SQLiteLogger: def __init__(self, filename="g2x.db"): self.filename = filename self.connection = None def __enter__(self): try: with open(self.filename): self.connection = sqlite3.connect(self.filename) ...
4c4b8f1a9d54d34dd9c2ee89367c7e290f94a12f
archive/archive_api/src/models/_base.py
archive/archive_api/src/models/_base.py
# -*- encoding: utf-8 from flask_restplus import fields, Model class TypedModel(Model): """ A thin wrapper around ``Model`` that adds a ``type`` field. """ def __init__(self, name, model_fields, *args, **kwargs): # When you use a model in ``@api.response``, it triggers an internal #...
# -*- encoding: utf-8 from flask_restplus import fields, Model class TypedModel(Model): """ A thin wrapper around ``Model`` that adds a ``type`` field. """ def __init__(self, name, model_fields, *args, **kwargs): # When you use a model in ``@api.response``, it triggers an internal #...
Make sure we ask callers for the "type" field
Make sure we ask callers for the "type" field
Python
mit
wellcometrust/platform-api,wellcometrust/platform-api,wellcometrust/platform-api,wellcometrust/platform-api
# -*- encoding: utf-8 from flask_restplus import fields, Model class TypedModel(Model): """ A thin wrapper around ``Model`` that adds a ``type`` field. """ def __init__(self, name, model_fields, *args, **kwargs): # When you use a model in ``@api.response``, it triggers an internal #...
# -*- encoding: utf-8 from flask_restplus import fields, Model class TypedModel(Model): """ A thin wrapper around ``Model`` that adds a ``type`` field. """ def __init__(self, name, model_fields, *args, **kwargs): # When you use a model in ``@api.response``, it triggers an internal #...
<commit_before># -*- encoding: utf-8 from flask_restplus import fields, Model class TypedModel(Model): """ A thin wrapper around ``Model`` that adds a ``type`` field. """ def __init__(self, name, model_fields, *args, **kwargs): # When you use a model in ``@api.response``, it triggers an int...
# -*- encoding: utf-8 from flask_restplus import fields, Model class TypedModel(Model): """ A thin wrapper around ``Model`` that adds a ``type`` field. """ def __init__(self, name, model_fields, *args, **kwargs): # When you use a model in ``@api.response``, it triggers an internal #...
# -*- encoding: utf-8 from flask_restplus import fields, Model class TypedModel(Model): """ A thin wrapper around ``Model`` that adds a ``type`` field. """ def __init__(self, name, model_fields, *args, **kwargs): # When you use a model in ``@api.response``, it triggers an internal #...
<commit_before># -*- encoding: utf-8 from flask_restplus import fields, Model class TypedModel(Model): """ A thin wrapper around ``Model`` that adds a ``type`` field. """ def __init__(self, name, model_fields, *args, **kwargs): # When you use a model in ``@api.response``, it triggers an int...
d76e4f45f78dc34a22f641cc8c691ac8f35daf0c
src/exhaustive_search/euclidean_mst.py
src/exhaustive_search/euclidean_mst.py
""" Provides a solution (`solve`) to the EMST problem. """ # Euclidean Minimum Spanning Tree (MST) algorithm # # input: a list of n Point objects # # output: a list of (p, q) tuples, where p and q are each input Point # objects, and (p, q) should be connected in a minimum spanning tree # of the input points def solve(...
""" Provides a solution (`solve`) to the EMST problem. """ from .graph import Graph # Euclidean Minimum Spanning Tree (MST) algorithm # # input: a list of n Point objects # # output: a list of (p, q) tuples, where p and q are each input Point # objects, and (p, q) should be connected in a minimum spanning tree # of t...
Use (still wrong) Graph implementation in MST.py
Use (still wrong) Graph implementation in MST.py
Python
isc
ciarand/exhausting-search-homework
""" Provides a solution (`solve`) to the EMST problem. """ # Euclidean Minimum Spanning Tree (MST) algorithm # # input: a list of n Point objects # # output: a list of (p, q) tuples, where p and q are each input Point # objects, and (p, q) should be connected in a minimum spanning tree # of the input points def solve(...
""" Provides a solution (`solve`) to the EMST problem. """ from .graph import Graph # Euclidean Minimum Spanning Tree (MST) algorithm # # input: a list of n Point objects # # output: a list of (p, q) tuples, where p and q are each input Point # objects, and (p, q) should be connected in a minimum spanning tree # of t...
<commit_before>""" Provides a solution (`solve`) to the EMST problem. """ # Euclidean Minimum Spanning Tree (MST) algorithm # # input: a list of n Point objects # # output: a list of (p, q) tuples, where p and q are each input Point # objects, and (p, q) should be connected in a minimum spanning tree # of the input po...
""" Provides a solution (`solve`) to the EMST problem. """ from .graph import Graph # Euclidean Minimum Spanning Tree (MST) algorithm # # input: a list of n Point objects # # output: a list of (p, q) tuples, where p and q are each input Point # objects, and (p, q) should be connected in a minimum spanning tree # of t...
""" Provides a solution (`solve`) to the EMST problem. """ # Euclidean Minimum Spanning Tree (MST) algorithm # # input: a list of n Point objects # # output: a list of (p, q) tuples, where p and q are each input Point # objects, and (p, q) should be connected in a minimum spanning tree # of the input points def solve(...
<commit_before>""" Provides a solution (`solve`) to the EMST problem. """ # Euclidean Minimum Spanning Tree (MST) algorithm # # input: a list of n Point objects # # output: a list of (p, q) tuples, where p and q are each input Point # objects, and (p, q) should be connected in a minimum spanning tree # of the input po...
b60bcae61d2da4a6869db25f233e8bec40740ffc
test/test_notebook.py
test/test_notebook.py
import glob from nbconvert.preprocessors import ExecutePreprocessor import nbformat import pytest notebooks = sorted(glob.glob("*.ipynb")) @pytest.mark.parametrize("notebook", notebooks) def test_notebook_execution(notebook): with open(notebook) as fin: nb = nbformat.read(fin, as_version=4) ep = Ex...
import glob from nbconvert.preprocessors import ExecutePreprocessor import nbformat import pytest notebooks = sorted(glob.glob("*.ipynb")) @pytest.mark.parametrize("notebook", notebooks) def test_notebook_execution(notebook): with open(notebook) as fin: nb = nbformat.read(fin, as_version=4) ep = Ex...
Remove requirement to clear notebooks
Remove requirement to clear notebooks
Python
mit
alanhdu/AccessibleML,adicu/AccessibleML
import glob from nbconvert.preprocessors import ExecutePreprocessor import nbformat import pytest notebooks = sorted(glob.glob("*.ipynb")) @pytest.mark.parametrize("notebook", notebooks) def test_notebook_execution(notebook): with open(notebook) as fin: nb = nbformat.read(fin, as_version=4) ep = Ex...
import glob from nbconvert.preprocessors import ExecutePreprocessor import nbformat import pytest notebooks = sorted(glob.glob("*.ipynb")) @pytest.mark.parametrize("notebook", notebooks) def test_notebook_execution(notebook): with open(notebook) as fin: nb = nbformat.read(fin, as_version=4) ep = Ex...
<commit_before>import glob from nbconvert.preprocessors import ExecutePreprocessor import nbformat import pytest notebooks = sorted(glob.glob("*.ipynb")) @pytest.mark.parametrize("notebook", notebooks) def test_notebook_execution(notebook): with open(notebook) as fin: nb = nbformat.read(fin, as_version=...
import glob from nbconvert.preprocessors import ExecutePreprocessor import nbformat import pytest notebooks = sorted(glob.glob("*.ipynb")) @pytest.mark.parametrize("notebook", notebooks) def test_notebook_execution(notebook): with open(notebook) as fin: nb = nbformat.read(fin, as_version=4) ep = Ex...
import glob from nbconvert.preprocessors import ExecutePreprocessor import nbformat import pytest notebooks = sorted(glob.glob("*.ipynb")) @pytest.mark.parametrize("notebook", notebooks) def test_notebook_execution(notebook): with open(notebook) as fin: nb = nbformat.read(fin, as_version=4) ep = Ex...
<commit_before>import glob from nbconvert.preprocessors import ExecutePreprocessor import nbformat import pytest notebooks = sorted(glob.glob("*.ipynb")) @pytest.mark.parametrize("notebook", notebooks) def test_notebook_execution(notebook): with open(notebook) as fin: nb = nbformat.read(fin, as_version=...
9b1ecea92cc629bf659764cf45d63b1d911a24e3
plugins/urlgrabber.py
plugins/urlgrabber.py
from plugins.categories import ISilentCommand try: import requests_pyopenssl from requests.packages.urllib3 import connectionpool connectionpool.ssl_wrap_socket = requests_pyopenssl.ssl_wrap_socket except ImportError: pass import requests from bs4 import BeautifulSoup class URLGrabber (ISilentCommand...
from plugins.categories import ISilentCommand try: import requests_pyopenssl from requests.packages.urllib3 import connectionpool connectionpool.ssl_wrap_socket = requests_pyopenssl.ssl_wrap_socket except ImportError: pass import requests from bs4 import BeautifulSoup class URLGrabber (ISilentCommand...
Use a realistic User-Agent for reddit
Use a realistic User-Agent for reddit
Python
isc
ComSSA/KhlavKalash
from plugins.categories import ISilentCommand try: import requests_pyopenssl from requests.packages.urllib3 import connectionpool connectionpool.ssl_wrap_socket = requests_pyopenssl.ssl_wrap_socket except ImportError: pass import requests from bs4 import BeautifulSoup class URLGrabber (ISilentCommand...
from plugins.categories import ISilentCommand try: import requests_pyopenssl from requests.packages.urllib3 import connectionpool connectionpool.ssl_wrap_socket = requests_pyopenssl.ssl_wrap_socket except ImportError: pass import requests from bs4 import BeautifulSoup class URLGrabber (ISilentCommand...
<commit_before>from plugins.categories import ISilentCommand try: import requests_pyopenssl from requests.packages.urllib3 import connectionpool connectionpool.ssl_wrap_socket = requests_pyopenssl.ssl_wrap_socket except ImportError: pass import requests from bs4 import BeautifulSoup class URLGrabber ...
from plugins.categories import ISilentCommand try: import requests_pyopenssl from requests.packages.urllib3 import connectionpool connectionpool.ssl_wrap_socket = requests_pyopenssl.ssl_wrap_socket except ImportError: pass import requests from bs4 import BeautifulSoup class URLGrabber (ISilentCommand...
from plugins.categories import ISilentCommand try: import requests_pyopenssl from requests.packages.urllib3 import connectionpool connectionpool.ssl_wrap_socket = requests_pyopenssl.ssl_wrap_socket except ImportError: pass import requests from bs4 import BeautifulSoup class URLGrabber (ISilentCommand...
<commit_before>from plugins.categories import ISilentCommand try: import requests_pyopenssl from requests.packages.urllib3 import connectionpool connectionpool.ssl_wrap_socket = requests_pyopenssl.ssl_wrap_socket except ImportError: pass import requests from bs4 import BeautifulSoup class URLGrabber ...
27e4adcf0ccd36c7c2a079f04e19ed38e8a05edd
app/config.py
app/config.py
WTF_CSRF_ENABLED = True SECRET_KEY = 'you-will-never-guess' # In minutes CURRENT_TICKET_LIFETIME = 2 QUEUED_TICKET_LIFETIME = 2
WTF_CSRF_ENABLED = True SECRET_KEY = 'you-will-never-guess' # In minutes CURRENT_TICKET_LIFETIME = 720 QUEUED_TICKET_LIFETIME = 2
Set standard lifetime of tickets to 12 hours
Set standard lifetime of tickets to 12 hours
Python
apache-2.0
otto-de/gatekeeper,otto-de/gatekeeper,otto-de/gatekeeper,otto-de/gatekeeper
WTF_CSRF_ENABLED = True SECRET_KEY = 'you-will-never-guess' # In minutes CURRENT_TICKET_LIFETIME = 2 QUEUED_TICKET_LIFETIME = 2 Set standard lifetime of tickets to 12 hours
WTF_CSRF_ENABLED = True SECRET_KEY = 'you-will-never-guess' # In minutes CURRENT_TICKET_LIFETIME = 720 QUEUED_TICKET_LIFETIME = 2
<commit_before>WTF_CSRF_ENABLED = True SECRET_KEY = 'you-will-never-guess' # In minutes CURRENT_TICKET_LIFETIME = 2 QUEUED_TICKET_LIFETIME = 2 <commit_msg>Set standard lifetime of tickets to 12 hours<commit_after>
WTF_CSRF_ENABLED = True SECRET_KEY = 'you-will-never-guess' # In minutes CURRENT_TICKET_LIFETIME = 720 QUEUED_TICKET_LIFETIME = 2
WTF_CSRF_ENABLED = True SECRET_KEY = 'you-will-never-guess' # In minutes CURRENT_TICKET_LIFETIME = 2 QUEUED_TICKET_LIFETIME = 2 Set standard lifetime of tickets to 12 hoursWTF_CSRF_ENABLED = True SECRET_KEY = 'you-will-never-guess' # In minutes CURRENT_TICKET_LIFETIME = 720 QUEUED_TICKET_LIFETIME = 2
<commit_before>WTF_CSRF_ENABLED = True SECRET_KEY = 'you-will-never-guess' # In minutes CURRENT_TICKET_LIFETIME = 2 QUEUED_TICKET_LIFETIME = 2 <commit_msg>Set standard lifetime of tickets to 12 hours<commit_after>WTF_CSRF_ENABLED = True SECRET_KEY = 'you-will-never-guess' # In minutes CURRENT_TICKET_LIFETIME = 720 QU...
95becdbbece636369754850ee14d664042c1f4c2
squadron/exthandlers/tests/test_virtualenv.py
squadron/exthandlers/tests/test_virtualenv.py
import os from ..virtualenv import ext_virtualenv def test_basic(tmpdir): tmpdir = str(tmpdir) abs_source = os.path.join(tmpdir, 'requirements.txt') with open(abs_source, 'w') as vfile: vfile.write('bottle\n') vfile.write('pytest\n') dest = os.path.join(tmpdir, 'env~virtualenv') f...
import os from ..virtualenv import ext_virtualenv def integration(tmpdir): tmpdir = str(tmpdir) abs_source = os.path.join(tmpdir, 'requirements.txt') with open(abs_source, 'w') as vfile: vfile.write('bottle\n') vfile.write('pytest\n') dest = os.path.join(tmpdir, 'env~virtualenv') ...
Change the virtualenv test to an integration test
Change the virtualenv test to an integration test So that we're not downloading them constantly
Python
mit
gosquadron/squadron,gosquadron/squadron
import os from ..virtualenv import ext_virtualenv def test_basic(tmpdir): tmpdir = str(tmpdir) abs_source = os.path.join(tmpdir, 'requirements.txt') with open(abs_source, 'w') as vfile: vfile.write('bottle\n') vfile.write('pytest\n') dest = os.path.join(tmpdir, 'env~virtualenv') f...
import os from ..virtualenv import ext_virtualenv def integration(tmpdir): tmpdir = str(tmpdir) abs_source = os.path.join(tmpdir, 'requirements.txt') with open(abs_source, 'w') as vfile: vfile.write('bottle\n') vfile.write('pytest\n') dest = os.path.join(tmpdir, 'env~virtualenv') ...
<commit_before>import os from ..virtualenv import ext_virtualenv def test_basic(tmpdir): tmpdir = str(tmpdir) abs_source = os.path.join(tmpdir, 'requirements.txt') with open(abs_source, 'w') as vfile: vfile.write('bottle\n') vfile.write('pytest\n') dest = os.path.join(tmpdir, 'env~vir...
import os from ..virtualenv import ext_virtualenv def integration(tmpdir): tmpdir = str(tmpdir) abs_source = os.path.join(tmpdir, 'requirements.txt') with open(abs_source, 'w') as vfile: vfile.write('bottle\n') vfile.write('pytest\n') dest = os.path.join(tmpdir, 'env~virtualenv') ...
import os from ..virtualenv import ext_virtualenv def test_basic(tmpdir): tmpdir = str(tmpdir) abs_source = os.path.join(tmpdir, 'requirements.txt') with open(abs_source, 'w') as vfile: vfile.write('bottle\n') vfile.write('pytest\n') dest = os.path.join(tmpdir, 'env~virtualenv') f...
<commit_before>import os from ..virtualenv import ext_virtualenv def test_basic(tmpdir): tmpdir = str(tmpdir) abs_source = os.path.join(tmpdir, 'requirements.txt') with open(abs_source, 'w') as vfile: vfile.write('bottle\n') vfile.write('pytest\n') dest = os.path.join(tmpdir, 'env~vir...
4d8ee930b772329b4c3ded17a5a04efb7dada977
tests/test__compat.py
tests/test__compat.py
#!/usr/bin/env python # -*- coding: utf-8 -*- import pytest import numpy as np import dask import dask.array as da import dask.array.utils as dau import dask_distance._compat @pytest.mark.parametrize("x", [ list(range(5)), np.random.randint(10, size=(15, 16)), da.random.randint(10, size=(15, 16), chu...
#!/usr/bin/env python # -*- coding: utf-8 -*- import pytest import numpy as np import dask.array as da import dask.array.utils as dau import dask_distance._compat @pytest.mark.parametrize("x", [ list(range(5)), np.random.randint(10, size=(15, 16)), da.random.randint(10, size=(15, 16), chunks=(5, 5)),...
Drop unused import from _compat tests
Drop unused import from _compat tests
Python
bsd-3-clause
jakirkham/dask-distance
#!/usr/bin/env python # -*- coding: utf-8 -*- import pytest import numpy as np import dask import dask.array as da import dask.array.utils as dau import dask_distance._compat @pytest.mark.parametrize("x", [ list(range(5)), np.random.randint(10, size=(15, 16)), da.random.randint(10, size=(15, 16), chu...
#!/usr/bin/env python # -*- coding: utf-8 -*- import pytest import numpy as np import dask.array as da import dask.array.utils as dau import dask_distance._compat @pytest.mark.parametrize("x", [ list(range(5)), np.random.randint(10, size=(15, 16)), da.random.randint(10, size=(15, 16), chunks=(5, 5)),...
<commit_before>#!/usr/bin/env python # -*- coding: utf-8 -*- import pytest import numpy as np import dask import dask.array as da import dask.array.utils as dau import dask_distance._compat @pytest.mark.parametrize("x", [ list(range(5)), np.random.randint(10, size=(15, 16)), da.random.randint(10, siz...
#!/usr/bin/env python # -*- coding: utf-8 -*- import pytest import numpy as np import dask.array as da import dask.array.utils as dau import dask_distance._compat @pytest.mark.parametrize("x", [ list(range(5)), np.random.randint(10, size=(15, 16)), da.random.randint(10, size=(15, 16), chunks=(5, 5)),...
#!/usr/bin/env python # -*- coding: utf-8 -*- import pytest import numpy as np import dask import dask.array as da import dask.array.utils as dau import dask_distance._compat @pytest.mark.parametrize("x", [ list(range(5)), np.random.randint(10, size=(15, 16)), da.random.randint(10, size=(15, 16), chu...
<commit_before>#!/usr/bin/env python # -*- coding: utf-8 -*- import pytest import numpy as np import dask import dask.array as da import dask.array.utils as dau import dask_distance._compat @pytest.mark.parametrize("x", [ list(range(5)), np.random.randint(10, size=(15, 16)), da.random.randint(10, siz...
ac0fe94d5ced669bb1e5b5c0645b0597bf96c895
tests/test_unicode.py
tests/test_unicode.py
import os from tests.test_pip import here, reset_env, run_pip def test_install_package_that_emits_unicode(): """ Install a package with a setup.py that emits UTF-8 output and then fails. This works fine in Python 2, but fails in Python 3 with: Traceback (most recent call last): ... File "...
import os from tests.test_pip import here, reset_env, run_pip def test_install_package_that_emits_unicode(): """ Install a package with a setup.py that emits UTF-8 output and then fails. This works fine in Python 2, but fails in Python 3 with: Traceback (most recent call last): ... File "...
Fix unicode tests to work with new temp file assertions
Fix unicode tests to work with new temp file assertions
Python
mit
pjdelport/pip,patricklaw/pip,fiber-space/pip,dstufft/pip,esc/pip,prasaianooz/pip,wkeyword/pip,nthall/pip,fiber-space/pip,graingert/pip,davidovich/pip,luzfcb/pip,cjerdonek/pip,jythontools/pip,RonnyPfannschmidt/pip,pjdelport/pip,techtonik/pip,pradyunsg/pip,mindw/pip,prasaianooz/pip,ianw/pip,qwcode/pip,erikrose/pip,zenlam...
import os from tests.test_pip import here, reset_env, run_pip def test_install_package_that_emits_unicode(): """ Install a package with a setup.py that emits UTF-8 output and then fails. This works fine in Python 2, but fails in Python 3 with: Traceback (most recent call last): ... File "...
import os from tests.test_pip import here, reset_env, run_pip def test_install_package_that_emits_unicode(): """ Install a package with a setup.py that emits UTF-8 output and then fails. This works fine in Python 2, but fails in Python 3 with: Traceback (most recent call last): ... File "...
<commit_before>import os from tests.test_pip import here, reset_env, run_pip def test_install_package_that_emits_unicode(): """ Install a package with a setup.py that emits UTF-8 output and then fails. This works fine in Python 2, but fails in Python 3 with: Traceback (most recent call last): ....
import os from tests.test_pip import here, reset_env, run_pip def test_install_package_that_emits_unicode(): """ Install a package with a setup.py that emits UTF-8 output and then fails. This works fine in Python 2, but fails in Python 3 with: Traceback (most recent call last): ... File "...
import os from tests.test_pip import here, reset_env, run_pip def test_install_package_that_emits_unicode(): """ Install a package with a setup.py that emits UTF-8 output and then fails. This works fine in Python 2, but fails in Python 3 with: Traceback (most recent call last): ... File "...
<commit_before>import os from tests.test_pip import here, reset_env, run_pip def test_install_package_that_emits_unicode(): """ Install a package with a setup.py that emits UTF-8 output and then fails. This works fine in Python 2, but fails in Python 3 with: Traceback (most recent call last): ....
2e95fa670bccd4b38aa1bf30932b152559c077f4
fuse_util.py
fuse_util.py
import sublime import os def getSetting(key,default=None): s = sublime.load_settings("Fuse.sublime-settings") return s.get(key, default) def getFusePathFromSettings(): path = getSetting("fuse_path_override") if path == "" or path == None: return "fuse" else: return path+"/fuse" def setSetting(key,value): s...
import sublime import os def getSetting(key,default=None): s = sublime.load_settings("Fuse.sublime-settings") return s.get(key, default) def getFusePathFromSettings(): path = getSetting("fuse_path_override") if path == "" or path == None: return "fuse" else: return path+"/fuse" def setSetting(key,value): s...
Handle that Path can be none
Handle that Path can be none
Python
mit
fusetools/Fuse.SublimePlugin,fusetools/Fuse.SublimePlugin
import sublime import os def getSetting(key,default=None): s = sublime.load_settings("Fuse.sublime-settings") return s.get(key, default) def getFusePathFromSettings(): path = getSetting("fuse_path_override") if path == "" or path == None: return "fuse" else: return path+"/fuse" def setSetting(key,value): s...
import sublime import os def getSetting(key,default=None): s = sublime.load_settings("Fuse.sublime-settings") return s.get(key, default) def getFusePathFromSettings(): path = getSetting("fuse_path_override") if path == "" or path == None: return "fuse" else: return path+"/fuse" def setSetting(key,value): s...
<commit_before>import sublime import os def getSetting(key,default=None): s = sublime.load_settings("Fuse.sublime-settings") return s.get(key, default) def getFusePathFromSettings(): path = getSetting("fuse_path_override") if path == "" or path == None: return "fuse" else: return path+"/fuse" def setSetting...
import sublime import os def getSetting(key,default=None): s = sublime.load_settings("Fuse.sublime-settings") return s.get(key, default) def getFusePathFromSettings(): path = getSetting("fuse_path_override") if path == "" or path == None: return "fuse" else: return path+"/fuse" def setSetting(key,value): s...
import sublime import os def getSetting(key,default=None): s = sublime.load_settings("Fuse.sublime-settings") return s.get(key, default) def getFusePathFromSettings(): path = getSetting("fuse_path_override") if path == "" or path == None: return "fuse" else: return path+"/fuse" def setSetting(key,value): s...
<commit_before>import sublime import os def getSetting(key,default=None): s = sublime.load_settings("Fuse.sublime-settings") return s.get(key, default) def getFusePathFromSettings(): path = getSetting("fuse_path_override") if path == "" or path == None: return "fuse" else: return path+"/fuse" def setSetting...
29696868de9a02f6621bcc506a378630fae2ae7a
polemarch/__init__.py
polemarch/__init__.py
''' ### Polemarch is ansible based service for orchestration infrastructure. * [Documentation](http://polemarch.readthedocs.io/) * [Issue Tracker](https://gitlab.com/vstconsulting/polemarch/issues) * [Source Code](https://gitlab.com/vstconsulting/polemarch) ''' import os import warnings try: from vstutils.enviro...
''' ### Polemarch is ansible based service for orchestration infrastructure. * [Documentation](http://polemarch.readthedocs.io/) * [Issue Tracker](https://gitlab.com/vstconsulting/polemarch/issues) * [Source Code](https://gitlab.com/vstconsulting/polemarch) ''' import os import warnings try: from vstutils.enviro...
Update vstutils version and fix capability in settings.
Update vstutils version and fix capability in settings.
Python
agpl-3.0
vstconsulting/polemarch,vstconsulting/polemarch,vstconsulting/polemarch,vstconsulting/polemarch
''' ### Polemarch is ansible based service for orchestration infrastructure. * [Documentation](http://polemarch.readthedocs.io/) * [Issue Tracker](https://gitlab.com/vstconsulting/polemarch/issues) * [Source Code](https://gitlab.com/vstconsulting/polemarch) ''' import os import warnings try: from vstutils.enviro...
''' ### Polemarch is ansible based service for orchestration infrastructure. * [Documentation](http://polemarch.readthedocs.io/) * [Issue Tracker](https://gitlab.com/vstconsulting/polemarch/issues) * [Source Code](https://gitlab.com/vstconsulting/polemarch) ''' import os import warnings try: from vstutils.enviro...
<commit_before>''' ### Polemarch is ansible based service for orchestration infrastructure. * [Documentation](http://polemarch.readthedocs.io/) * [Issue Tracker](https://gitlab.com/vstconsulting/polemarch/issues) * [Source Code](https://gitlab.com/vstconsulting/polemarch) ''' import os import warnings try: from ...
''' ### Polemarch is ansible based service for orchestration infrastructure. * [Documentation](http://polemarch.readthedocs.io/) * [Issue Tracker](https://gitlab.com/vstconsulting/polemarch/issues) * [Source Code](https://gitlab.com/vstconsulting/polemarch) ''' import os import warnings try: from vstutils.enviro...
''' ### Polemarch is ansible based service for orchestration infrastructure. * [Documentation](http://polemarch.readthedocs.io/) * [Issue Tracker](https://gitlab.com/vstconsulting/polemarch/issues) * [Source Code](https://gitlab.com/vstconsulting/polemarch) ''' import os import warnings try: from vstutils.enviro...
<commit_before>''' ### Polemarch is ansible based service for orchestration infrastructure. * [Documentation](http://polemarch.readthedocs.io/) * [Issue Tracker](https://gitlab.com/vstconsulting/polemarch/issues) * [Source Code](https://gitlab.com/vstconsulting/polemarch) ''' import os import warnings try: from ...
a680f4ba60e79ff7f169916d380f92a47739ccf6
collect_menus_to_json.py
collect_menus_to_json.py
from CafeScraper.Scraper import Scraper import json scraper = Scraper() json_dump = json.dumps(list(scraper.cafes_dict.values()), default=lambda c: c.__dict__, sort_keys=True) print(json_dump) # save to file with open('menus.json', 'w') as fp: print(json_dump, file=fp) # # # for cafe in scraper.cafe...
from pathlib import Path from time import time from CafeScraper.Scraper import Scraper import json def collect_backup_and_dump(): ''' Get the new json ''' scraper = Scraper() json_dump = json.dumps(list(scraper.cafes_dict.values()), default=lambda c: c.__dict__, sort_keys=True) ...
Backup all menus collected while keeping a main json file.
Backup all menus collected while keeping a main json file.
Python
mit
atbe/MSU-Cafe-Scraper,atbe/MSU-Cafe-Scraper
from CafeScraper.Scraper import Scraper import json scraper = Scraper() json_dump = json.dumps(list(scraper.cafes_dict.values()), default=lambda c: c.__dict__, sort_keys=True) print(json_dump) # save to file with open('menus.json', 'w') as fp: print(json_dump, file=fp) # # # for cafe in scraper.cafe...
from pathlib import Path from time import time from CafeScraper.Scraper import Scraper import json def collect_backup_and_dump(): ''' Get the new json ''' scraper = Scraper() json_dump = json.dumps(list(scraper.cafes_dict.values()), default=lambda c: c.__dict__, sort_keys=True) ...
<commit_before>from CafeScraper.Scraper import Scraper import json scraper = Scraper() json_dump = json.dumps(list(scraper.cafes_dict.values()), default=lambda c: c.__dict__, sort_keys=True) print(json_dump) # save to file with open('menus.json', 'w') as fp: print(json_dump, file=fp) # # # for cafe ...
from pathlib import Path from time import time from CafeScraper.Scraper import Scraper import json def collect_backup_and_dump(): ''' Get the new json ''' scraper = Scraper() json_dump = json.dumps(list(scraper.cafes_dict.values()), default=lambda c: c.__dict__, sort_keys=True) ...
from CafeScraper.Scraper import Scraper import json scraper = Scraper() json_dump = json.dumps(list(scraper.cafes_dict.values()), default=lambda c: c.__dict__, sort_keys=True) print(json_dump) # save to file with open('menus.json', 'w') as fp: print(json_dump, file=fp) # # # for cafe in scraper.cafe...
<commit_before>from CafeScraper.Scraper import Scraper import json scraper = Scraper() json_dump = json.dumps(list(scraper.cafes_dict.values()), default=lambda c: c.__dict__, sort_keys=True) print(json_dump) # save to file with open('menus.json', 'w') as fp: print(json_dump, file=fp) # # # for cafe ...
63f7489066aeb23dbefc6f8de534ad05144431ad
boardinghouse/tests/test_sql.py
boardinghouse/tests/test_sql.py
""" Tests for the RAW sql functions. """ from django.conf import settings from django.test import TestCase from django.db.models import connection from boardinghouse.models import Schema class TestRejectSchemaColumnChange(TestCase): def test_exception_is_raised(self): Schema.objects.mass_create('a') ...
""" Tests for the RAW sql functions. """ from django.conf import settings from django.test import TestCase from django.db import connection from boardinghouse.models import Schema class TestRejectSchemaColumnChange(TestCase): def test_exception_is_raised(self): Schema.objects.mass_create('a') cur...
Make test work with 1.7
Make test work with 1.7
Python
bsd-3-clause
luzfcb/django-boardinghouse,luzfcb/django-boardinghouse,luzfcb/django-boardinghouse
""" Tests for the RAW sql functions. """ from django.conf import settings from django.test import TestCase from django.db.models import connection from boardinghouse.models import Schema class TestRejectSchemaColumnChange(TestCase): def test_exception_is_raised(self): Schema.objects.mass_create('a') ...
""" Tests for the RAW sql functions. """ from django.conf import settings from django.test import TestCase from django.db import connection from boardinghouse.models import Schema class TestRejectSchemaColumnChange(TestCase): def test_exception_is_raised(self): Schema.objects.mass_create('a') cur...
<commit_before>""" Tests for the RAW sql functions. """ from django.conf import settings from django.test import TestCase from django.db.models import connection from boardinghouse.models import Schema class TestRejectSchemaColumnChange(TestCase): def test_exception_is_raised(self): Schema.objects.mass_c...
""" Tests for the RAW sql functions. """ from django.conf import settings from django.test import TestCase from django.db import connection from boardinghouse.models import Schema class TestRejectSchemaColumnChange(TestCase): def test_exception_is_raised(self): Schema.objects.mass_create('a') cur...
""" Tests for the RAW sql functions. """ from django.conf import settings from django.test import TestCase from django.db.models import connection from boardinghouse.models import Schema class TestRejectSchemaColumnChange(TestCase): def test_exception_is_raised(self): Schema.objects.mass_create('a') ...
<commit_before>""" Tests for the RAW sql functions. """ from django.conf import settings from django.test import TestCase from django.db.models import connection from boardinghouse.models import Schema class TestRejectSchemaColumnChange(TestCase): def test_exception_is_raised(self): Schema.objects.mass_c...
e3adb0e716cd3f200baa037f6d5a1dd0bb598202
src/shield/__init__.py
src/shield/__init__.py
# -*- coding: utf-8 -*- from __future__ import print_function, unicode_literals from __future__ import absolute_import, division import inspect from . import registry class _method_wrapper(object): """A placeholder object used to wrap methods until the rules decorator comes around and adds everything to the s...
# -*- coding: utf-8 -*- from __future__ import print_function, unicode_literals from __future__ import absolute_import, division from . import registry class rule: """Add the decorated rule to our registry""" def __init__(self, *perms, **kwargs): """owner: The owner of the permissions. permis...
Delete the class method shenannigans
Delete the class method shenannigans
Python
mit
concordusapps/python-shield
# -*- coding: utf-8 -*- from __future__ import print_function, unicode_literals from __future__ import absolute_import, division import inspect from . import registry class _method_wrapper(object): """A placeholder object used to wrap methods until the rules decorator comes around and adds everything to the s...
# -*- coding: utf-8 -*- from __future__ import print_function, unicode_literals from __future__ import absolute_import, division from . import registry class rule: """Add the decorated rule to our registry""" def __init__(self, *perms, **kwargs): """owner: The owner of the permissions. permis...
<commit_before># -*- coding: utf-8 -*- from __future__ import print_function, unicode_literals from __future__ import absolute_import, division import inspect from . import registry class _method_wrapper(object): """A placeholder object used to wrap methods until the rules decorator comes around and adds ever...
# -*- coding: utf-8 -*- from __future__ import print_function, unicode_literals from __future__ import absolute_import, division from . import registry class rule: """Add the decorated rule to our registry""" def __init__(self, *perms, **kwargs): """owner: The owner of the permissions. permis...
# -*- coding: utf-8 -*- from __future__ import print_function, unicode_literals from __future__ import absolute_import, division import inspect from . import registry class _method_wrapper(object): """A placeholder object used to wrap methods until the rules decorator comes around and adds everything to the s...
<commit_before># -*- coding: utf-8 -*- from __future__ import print_function, unicode_literals from __future__ import absolute_import, division import inspect from . import registry class _method_wrapper(object): """A placeholder object used to wrap methods until the rules decorator comes around and adds ever...