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
509893fffd0d3df965f43035b5004e42b9d631c4
ci/testsettings.py
ci/testsettings.py
# minimal django settings required to run tests DATABASES = { "default": { "ENGINE": "django.db.backends.sqlite3", "NAME": "test.db", } } SECRET_KEY = ''
# minimal django settings required to run tests DATABASES = { "default": { "ENGINE": "django.db.backends.sqlite3", "NAME": "test.db", } } # SECRET_KEY = ''
Fix sample test settings for use with travis-ci
Fix sample test settings for use with travis-ci
Python
apache-2.0
Princeton-CDH/django-pucas,Princeton-CDH/django-pucas
# minimal django settings required to run tests DATABASES = { "default": { "ENGINE": "django.db.backends.sqlite3", "NAME": "test.db", } } SECRET_KEY = ''Fix sample test settings for use with travis-ci
# minimal django settings required to run tests DATABASES = { "default": { "ENGINE": "django.db.backends.sqlite3", "NAME": "test.db", } } # SECRET_KEY = ''
<commit_before># minimal django settings required to run tests DATABASES = { "default": { "ENGINE": "django.db.backends.sqlite3", "NAME": "test.db", } } SECRET_KEY = ''<commit_msg>Fix sample test settings for use with travis-ci<commit_after>
# minimal django settings required to run tests DATABASES = { "default": { "ENGINE": "django.db.backends.sqlite3", "NAME": "test.db", } } # SECRET_KEY = ''
# minimal django settings required to run tests DATABASES = { "default": { "ENGINE": "django.db.backends.sqlite3", "NAME": "test.db", } } SECRET_KEY = ''Fix sample test settings for use with travis-ci# minimal django settings required to run tests DATABASES = { "default": { "ENGINE"...
<commit_before># minimal django settings required to run tests DATABASES = { "default": { "ENGINE": "django.db.backends.sqlite3", "NAME": "test.db", } } SECRET_KEY = ''<commit_msg>Fix sample test settings for use with travis-ci<commit_after># minimal django settings required to run tests DATABA...
3e0b015da6a2c9ef648e54959e6f3aab1509a036
kippt_reader/settings/production.py
kippt_reader/settings/production.py
from os import environ import dj_database_url from .base import * INSTALLED_APPS += ( 'djangosecure', ) PRODUCTION_MIDDLEWARE_CLASSES = ( 'djangosecure.middleware.SecurityMiddleware', ) MIDDLEWARE_CLASSES = PRODUCTION_MIDDLEWARE_CLASSES + MIDDLEWARE_CLASSES DATABASES = {'default': dj_database_url.config(...
from os import environ import dj_database_url from .base import * INSTALLED_APPS += ( 'djangosecure', ) PRODUCTION_MIDDLEWARE_CLASSES = ( 'djangosecure.middleware.SecurityMiddleware', ) MIDDLEWARE_CLASSES = PRODUCTION_MIDDLEWARE_CLASSES + MIDDLEWARE_CLASSES DATABASES = {'default': dj_database_url.config(...
Add SECURE_REDIRECT_EXEMPT to old HTTP callbacks
Add SECURE_REDIRECT_EXEMPT to old HTTP callbacks
Python
mit
jpadilla/feedleap,jpadilla/feedleap
from os import environ import dj_database_url from .base import * INSTALLED_APPS += ( 'djangosecure', ) PRODUCTION_MIDDLEWARE_CLASSES = ( 'djangosecure.middleware.SecurityMiddleware', ) MIDDLEWARE_CLASSES = PRODUCTION_MIDDLEWARE_CLASSES + MIDDLEWARE_CLASSES DATABASES = {'default': dj_database_url.config(...
from os import environ import dj_database_url from .base import * INSTALLED_APPS += ( 'djangosecure', ) PRODUCTION_MIDDLEWARE_CLASSES = ( 'djangosecure.middleware.SecurityMiddleware', ) MIDDLEWARE_CLASSES = PRODUCTION_MIDDLEWARE_CLASSES + MIDDLEWARE_CLASSES DATABASES = {'default': dj_database_url.config(...
<commit_before>from os import environ import dj_database_url from .base import * INSTALLED_APPS += ( 'djangosecure', ) PRODUCTION_MIDDLEWARE_CLASSES = ( 'djangosecure.middleware.SecurityMiddleware', ) MIDDLEWARE_CLASSES = PRODUCTION_MIDDLEWARE_CLASSES + MIDDLEWARE_CLASSES DATABASES = {'default': dj_datab...
from os import environ import dj_database_url from .base import * INSTALLED_APPS += ( 'djangosecure', ) PRODUCTION_MIDDLEWARE_CLASSES = ( 'djangosecure.middleware.SecurityMiddleware', ) MIDDLEWARE_CLASSES = PRODUCTION_MIDDLEWARE_CLASSES + MIDDLEWARE_CLASSES DATABASES = {'default': dj_database_url.config(...
from os import environ import dj_database_url from .base import * INSTALLED_APPS += ( 'djangosecure', ) PRODUCTION_MIDDLEWARE_CLASSES = ( 'djangosecure.middleware.SecurityMiddleware', ) MIDDLEWARE_CLASSES = PRODUCTION_MIDDLEWARE_CLASSES + MIDDLEWARE_CLASSES DATABASES = {'default': dj_database_url.config(...
<commit_before>from os import environ import dj_database_url from .base import * INSTALLED_APPS += ( 'djangosecure', ) PRODUCTION_MIDDLEWARE_CLASSES = ( 'djangosecure.middleware.SecurityMiddleware', ) MIDDLEWARE_CLASSES = PRODUCTION_MIDDLEWARE_CLASSES + MIDDLEWARE_CLASSES DATABASES = {'default': dj_datab...
0319ff5049da2c53d8b6507d7fc625ce00a421af
compare.py
compare.py
"""The compare module contains the components you need to compare values and ensure that your expectations are met. To make use of this module, you simply import the "expect" starter into your spec/test file, and specify the expectation you have about two values. """ class Expr(object): """Encapsulates a pytho...
"""The compare module contains the components you need to compare values and ensure that your expectations are met. To make use of this module, you simply import the "expect" starter into your spec/test file, and specify the expectation you have about two values. The expect starter is simply an alias to the Expr clas...
Implement @matcher decorator to register matchers.
Implement @matcher decorator to register matchers.
Python
bsd-3-clause
rudylattae/compare,rudylattae/compare
"""The compare module contains the components you need to compare values and ensure that your expectations are met. To make use of this module, you simply import the "expect" starter into your spec/test file, and specify the expectation you have about two values. """ class Expr(object): """Encapsulates a pytho...
"""The compare module contains the components you need to compare values and ensure that your expectations are met. To make use of this module, you simply import the "expect" starter into your spec/test file, and specify the expectation you have about two values. The expect starter is simply an alias to the Expr clas...
<commit_before>"""The compare module contains the components you need to compare values and ensure that your expectations are met. To make use of this module, you simply import the "expect" starter into your spec/test file, and specify the expectation you have about two values. """ class Expr(object): """Encap...
"""The compare module contains the components you need to compare values and ensure that your expectations are met. To make use of this module, you simply import the "expect" starter into your spec/test file, and specify the expectation you have about two values. The expect starter is simply an alias to the Expr clas...
"""The compare module contains the components you need to compare values and ensure that your expectations are met. To make use of this module, you simply import the "expect" starter into your spec/test file, and specify the expectation you have about two values. """ class Expr(object): """Encapsulates a pytho...
<commit_before>"""The compare module contains the components you need to compare values and ensure that your expectations are met. To make use of this module, you simply import the "expect" starter into your spec/test file, and specify the expectation you have about two values. """ class Expr(object): """Encap...
52c8ee184cc0071187c1915c4f3e6f287f3faa81
config/__init__.py
config/__init__.py
import os BASE_PATH = os.path.abspath(os.path.dirname(__file__)) PRO_CONF_PATH = '/etc/skylines/production.py' DEV_CONF_PATH = os.path.join(BASE_PATH, 'default.py') TESTING_CONF_PATH = os.path.join(BASE_PATH, 'testing.py') def to_envvar(path=None): """ Loads the application configuration from a file. Re...
import os BASE_PATH = os.path.abspath(os.path.dirname(__file__)) PRO_CONF_PATH = '/etc/skylines/production.py' DEV_CONF_PATH = os.path.join(BASE_PATH, 'default.py') TESTING_CONF_PATH = os.path.join(BASE_PATH, 'testing.py') def to_envvar(path=None): """ Loads the application configuration from a file. Re...
Make sure use_testing() is not detected as a unit test by nose
config: Make sure use_testing() is not detected as a unit test by nose
Python
agpl-3.0
shadowoneau/skylines,kerel-fs/skylines,Turbo87/skylines,kerel-fs/skylines,snip/skylines,Harry-R/skylines,snip/skylines,RBE-Avionik/skylines,Harry-R/skylines,Turbo87/skylines,RBE-Avionik/skylines,TobiasLohner/SkyLines,skylines-project/skylines,Turbo87/skylines,Harry-R/skylines,skylines-project/skylines,skylines-project/...
import os BASE_PATH = os.path.abspath(os.path.dirname(__file__)) PRO_CONF_PATH = '/etc/skylines/production.py' DEV_CONF_PATH = os.path.join(BASE_PATH, 'default.py') TESTING_CONF_PATH = os.path.join(BASE_PATH, 'testing.py') def to_envvar(path=None): """ Loads the application configuration from a file. Re...
import os BASE_PATH = os.path.abspath(os.path.dirname(__file__)) PRO_CONF_PATH = '/etc/skylines/production.py' DEV_CONF_PATH = os.path.join(BASE_PATH, 'default.py') TESTING_CONF_PATH = os.path.join(BASE_PATH, 'testing.py') def to_envvar(path=None): """ Loads the application configuration from a file. Re...
<commit_before>import os BASE_PATH = os.path.abspath(os.path.dirname(__file__)) PRO_CONF_PATH = '/etc/skylines/production.py' DEV_CONF_PATH = os.path.join(BASE_PATH, 'default.py') TESTING_CONF_PATH = os.path.join(BASE_PATH, 'testing.py') def to_envvar(path=None): """ Loads the application configuration from...
import os BASE_PATH = os.path.abspath(os.path.dirname(__file__)) PRO_CONF_PATH = '/etc/skylines/production.py' DEV_CONF_PATH = os.path.join(BASE_PATH, 'default.py') TESTING_CONF_PATH = os.path.join(BASE_PATH, 'testing.py') def to_envvar(path=None): """ Loads the application configuration from a file. Re...
import os BASE_PATH = os.path.abspath(os.path.dirname(__file__)) PRO_CONF_PATH = '/etc/skylines/production.py' DEV_CONF_PATH = os.path.join(BASE_PATH, 'default.py') TESTING_CONF_PATH = os.path.join(BASE_PATH, 'testing.py') def to_envvar(path=None): """ Loads the application configuration from a file. Re...
<commit_before>import os BASE_PATH = os.path.abspath(os.path.dirname(__file__)) PRO_CONF_PATH = '/etc/skylines/production.py' DEV_CONF_PATH = os.path.join(BASE_PATH, 'default.py') TESTING_CONF_PATH = os.path.join(BASE_PATH, 'testing.py') def to_envvar(path=None): """ Loads the application configuration from...
14803816c50bc1557c633f5d11f2c7a6d339429a
karspexet/ticket/urls.py
karspexet/ticket/urls.py
from django.conf.urls import url from karspexet.ticket import views urlpatterns = [ url(r"^show/(?P<show_id>\d+)/select_seats$", views.select_seats, name="select_seats"), url(r"^reservation/(?P<reservation_id>\d+)/process_payment$", views.process_payment, name="process_payment"), url(r"^booking_overview/?...
from django.conf.urls import url from karspexet.ticket import views urlpatterns = [ url(r"^show/(?P<show_id>\d+)/select_seats/?$", views.select_seats, name="select_seats"), url(r"^reservation/(?P<reservation_id>\d+)/process_payment$", views.process_payment, name="process_payment"), url(r"^booking_overview...
Allow trailing slash on select_seats url
Allow trailing slash on select_seats url
Python
mit
Karspexet/Karspexet,Karspexet/Karspexet,Karspexet/Karspexet,Karspexet/Karspexet,Karspexet/Karspexet
from django.conf.urls import url from karspexet.ticket import views urlpatterns = [ url(r"^show/(?P<show_id>\d+)/select_seats$", views.select_seats, name="select_seats"), url(r"^reservation/(?P<reservation_id>\d+)/process_payment$", views.process_payment, name="process_payment"), url(r"^booking_overview/?...
from django.conf.urls import url from karspexet.ticket import views urlpatterns = [ url(r"^show/(?P<show_id>\d+)/select_seats/?$", views.select_seats, name="select_seats"), url(r"^reservation/(?P<reservation_id>\d+)/process_payment$", views.process_payment, name="process_payment"), url(r"^booking_overview...
<commit_before>from django.conf.urls import url from karspexet.ticket import views urlpatterns = [ url(r"^show/(?P<show_id>\d+)/select_seats$", views.select_seats, name="select_seats"), url(r"^reservation/(?P<reservation_id>\d+)/process_payment$", views.process_payment, name="process_payment"), url(r"^boo...
from django.conf.urls import url from karspexet.ticket import views urlpatterns = [ url(r"^show/(?P<show_id>\d+)/select_seats/?$", views.select_seats, name="select_seats"), url(r"^reservation/(?P<reservation_id>\d+)/process_payment$", views.process_payment, name="process_payment"), url(r"^booking_overview...
from django.conf.urls import url from karspexet.ticket import views urlpatterns = [ url(r"^show/(?P<show_id>\d+)/select_seats$", views.select_seats, name="select_seats"), url(r"^reservation/(?P<reservation_id>\d+)/process_payment$", views.process_payment, name="process_payment"), url(r"^booking_overview/?...
<commit_before>from django.conf.urls import url from karspexet.ticket import views urlpatterns = [ url(r"^show/(?P<show_id>\d+)/select_seats$", views.select_seats, name="select_seats"), url(r"^reservation/(?P<reservation_id>\d+)/process_payment$", views.process_payment, name="process_payment"), url(r"^boo...
0a2285ac398a237a746fed11abca78fcb8c75252
nest/settings/heroku.py
nest/settings/heroku.py
from .base import * import dj_database_url DEBUG = False TEMPLATE_DEBUG = DEBUG DATABASES['default'] = dj_database_url.config() ALLOWED_HOSTS = [ '.captainquail.com', '.quailcomics.com', '.herokuapp.com', 'localhost', '127.0.0.1' ] STATIC_URL = 'http://media.quailcomics.com/assets/' INSTALLED_A...
from .base import * import dj_database_url DEBUG = False TEMPLATE_DEBUG = DEBUG try: DATABASES['default'] = dj_database_url.config() except ImproperlyConfigured: DATABASES = { 'default': { 'ENGINE': 'postgresql_psycopg2', 'NAME': 'quailcomics', 'USER': 'quailcomics'...
Add db settings for angel.
Add db settings for angel.
Python
mit
ImmaculateObsession/nest,ImmaculateObsession/nest,ImmaculateObsession/nest,ImmaculateObsession/nest,ImmaculateObsession/nest
from .base import * import dj_database_url DEBUG = False TEMPLATE_DEBUG = DEBUG DATABASES['default'] = dj_database_url.config() ALLOWED_HOSTS = [ '.captainquail.com', '.quailcomics.com', '.herokuapp.com', 'localhost', '127.0.0.1' ] STATIC_URL = 'http://media.quailcomics.com/assets/' INSTALLED_A...
from .base import * import dj_database_url DEBUG = False TEMPLATE_DEBUG = DEBUG try: DATABASES['default'] = dj_database_url.config() except ImproperlyConfigured: DATABASES = { 'default': { 'ENGINE': 'postgresql_psycopg2', 'NAME': 'quailcomics', 'USER': 'quailcomics'...
<commit_before>from .base import * import dj_database_url DEBUG = False TEMPLATE_DEBUG = DEBUG DATABASES['default'] = dj_database_url.config() ALLOWED_HOSTS = [ '.captainquail.com', '.quailcomics.com', '.herokuapp.com', 'localhost', '127.0.0.1' ] STATIC_URL = 'http://media.quailcomics.com/assets...
from .base import * import dj_database_url DEBUG = False TEMPLATE_DEBUG = DEBUG try: DATABASES['default'] = dj_database_url.config() except ImproperlyConfigured: DATABASES = { 'default': { 'ENGINE': 'postgresql_psycopg2', 'NAME': 'quailcomics', 'USER': 'quailcomics'...
from .base import * import dj_database_url DEBUG = False TEMPLATE_DEBUG = DEBUG DATABASES['default'] = dj_database_url.config() ALLOWED_HOSTS = [ '.captainquail.com', '.quailcomics.com', '.herokuapp.com', 'localhost', '127.0.0.1' ] STATIC_URL = 'http://media.quailcomics.com/assets/' INSTALLED_A...
<commit_before>from .base import * import dj_database_url DEBUG = False TEMPLATE_DEBUG = DEBUG DATABASES['default'] = dj_database_url.config() ALLOWED_HOSTS = [ '.captainquail.com', '.quailcomics.com', '.herokuapp.com', 'localhost', '127.0.0.1' ] STATIC_URL = 'http://media.quailcomics.com/assets...
900b45c49573ee4fbaacf65fd9c02adef87639b1
nest/settings/heroku.py
nest/settings/heroku.py
from .base import * import dj_database_url DEBUG = False TEMPLATE_DEBUG = DEBUG try: DATABASES['default'] = dj_database_url.config() except ImproperlyConfigured: DATABASES = { 'default': { 'ENGINE': 'postgresql_psycopg2', 'NAME': 'quailcomics', 'USER': 'quailcomics'...
from .base import * import dj_database_url DEBUG = False TEMPLATE_DEBUG = DEBUG DATABASES['default'] = dj_database_url.config() ALLOWED_HOSTS = [ '.captainquail.com', '.quailcomics.com', '.herokuapp.com', 'localhost', '127.0.0.1' ] STATIC_URL = 'http://media.quailcomics.com/assets/' INSTALLED_A...
Undo that which was done.
Undo that which was done.
Python
mit
ImmaculateObsession/nest,ImmaculateObsession/nest,ImmaculateObsession/nest,ImmaculateObsession/nest,ImmaculateObsession/nest
from .base import * import dj_database_url DEBUG = False TEMPLATE_DEBUG = DEBUG try: DATABASES['default'] = dj_database_url.config() except ImproperlyConfigured: DATABASES = { 'default': { 'ENGINE': 'postgresql_psycopg2', 'NAME': 'quailcomics', 'USER': 'quailcomics'...
from .base import * import dj_database_url DEBUG = False TEMPLATE_DEBUG = DEBUG DATABASES['default'] = dj_database_url.config() ALLOWED_HOSTS = [ '.captainquail.com', '.quailcomics.com', '.herokuapp.com', 'localhost', '127.0.0.1' ] STATIC_URL = 'http://media.quailcomics.com/assets/' INSTALLED_A...
<commit_before>from .base import * import dj_database_url DEBUG = False TEMPLATE_DEBUG = DEBUG try: DATABASES['default'] = dj_database_url.config() except ImproperlyConfigured: DATABASES = { 'default': { 'ENGINE': 'postgresql_psycopg2', 'NAME': 'quailcomics', 'USER'...
from .base import * import dj_database_url DEBUG = False TEMPLATE_DEBUG = DEBUG DATABASES['default'] = dj_database_url.config() ALLOWED_HOSTS = [ '.captainquail.com', '.quailcomics.com', '.herokuapp.com', 'localhost', '127.0.0.1' ] STATIC_URL = 'http://media.quailcomics.com/assets/' INSTALLED_A...
from .base import * import dj_database_url DEBUG = False TEMPLATE_DEBUG = DEBUG try: DATABASES['default'] = dj_database_url.config() except ImproperlyConfigured: DATABASES = { 'default': { 'ENGINE': 'postgresql_psycopg2', 'NAME': 'quailcomics', 'USER': 'quailcomics'...
<commit_before>from .base import * import dj_database_url DEBUG = False TEMPLATE_DEBUG = DEBUG try: DATABASES['default'] = dj_database_url.config() except ImproperlyConfigured: DATABASES = { 'default': { 'ENGINE': 'postgresql_psycopg2', 'NAME': 'quailcomics', 'USER'...
7db4a5a365c0d96d65b38b3fd33872080179cf93
benchexec/tools/kissat.py
benchexec/tools/kissat.py
# This file is part of BenchExec, a framework for reliable benchmarking: # https://github.com/sosy-lab/benchexec # # SPDX-FileCopyrightText: 2007-2020 Dirk Beyer <https://www.sosy-lab.org> # # SPDX-License-Identifier: Apache-2.0 import benchexec.result as result import benchexec.tools.template class Tool(benchexec.t...
# This file is part of BenchExec, a framework for reliable benchmarking: # https://github.com/sosy-lab/benchexec # # SPDX-FileCopyrightText: 2007-2020 Dirk Beyer <https://www.sosy-lab.org> # # SPDX-License-Identifier: Apache-2.0 import benchexec.result as result import benchexec.tools.template class Tool(benchexec.t...
Modify the tool-info module according to Philipp's reviews
Modify the tool-info module according to Philipp's reviews
Python
apache-2.0
ultimate-pa/benchexec,ultimate-pa/benchexec,sosy-lab/benchexec,sosy-lab/benchexec,dbeyer/benchexec,ultimate-pa/benchexec,dbeyer/benchexec,sosy-lab/benchexec,ultimate-pa/benchexec,ultimate-pa/benchexec,dbeyer/benchexec,ultimate-pa/benchexec,dbeyer/benchexec,sosy-lab/benchexec,sosy-lab/benchexec,sosy-lab/benchexec
# This file is part of BenchExec, a framework for reliable benchmarking: # https://github.com/sosy-lab/benchexec # # SPDX-FileCopyrightText: 2007-2020 Dirk Beyer <https://www.sosy-lab.org> # # SPDX-License-Identifier: Apache-2.0 import benchexec.result as result import benchexec.tools.template class Tool(benchexec.t...
# This file is part of BenchExec, a framework for reliable benchmarking: # https://github.com/sosy-lab/benchexec # # SPDX-FileCopyrightText: 2007-2020 Dirk Beyer <https://www.sosy-lab.org> # # SPDX-License-Identifier: Apache-2.0 import benchexec.result as result import benchexec.tools.template class Tool(benchexec.t...
<commit_before># This file is part of BenchExec, a framework for reliable benchmarking: # https://github.com/sosy-lab/benchexec # # SPDX-FileCopyrightText: 2007-2020 Dirk Beyer <https://www.sosy-lab.org> # # SPDX-License-Identifier: Apache-2.0 import benchexec.result as result import benchexec.tools.template class T...
# This file is part of BenchExec, a framework for reliable benchmarking: # https://github.com/sosy-lab/benchexec # # SPDX-FileCopyrightText: 2007-2020 Dirk Beyer <https://www.sosy-lab.org> # # SPDX-License-Identifier: Apache-2.0 import benchexec.result as result import benchexec.tools.template class Tool(benchexec.t...
# This file is part of BenchExec, a framework for reliable benchmarking: # https://github.com/sosy-lab/benchexec # # SPDX-FileCopyrightText: 2007-2020 Dirk Beyer <https://www.sosy-lab.org> # # SPDX-License-Identifier: Apache-2.0 import benchexec.result as result import benchexec.tools.template class Tool(benchexec.t...
<commit_before># This file is part of BenchExec, a framework for reliable benchmarking: # https://github.com/sosy-lab/benchexec # # SPDX-FileCopyrightText: 2007-2020 Dirk Beyer <https://www.sosy-lab.org> # # SPDX-License-Identifier: Apache-2.0 import benchexec.result as result import benchexec.tools.template class T...
c6dcb3cb3dd0a7ab4101275a1e96c629e5d7ba28
tools/misc/python/test-data-in-out3.py
tools/misc/python/test-data-in-out3.py
# TOOL test-data-in-out3.py: "Test data input and output in Python3" (Data input output test.) # INPUT input TYPE GENERIC # OUTPUT output import shutil shutil.copyfile('input', 'output')
# TOOL test-data-in-out3.py: "Test data input and output in Python3" (Data input output test.) # INPUT input TYPE GENERIC # OUTPUT output # RUNTIME python3 import shutil shutil.copyfile('input', 'output')
Move python3 custom runtime to sadl
Move python3 custom runtime to sadl
Python
mit
chipster/chipster-tools,chipster/chipster-tools,chipster/chipster-tools,chipster/chipster-tools
# TOOL test-data-in-out3.py: "Test data input and output in Python3" (Data input output test.) # INPUT input TYPE GENERIC # OUTPUT output import shutil shutil.copyfile('input', 'output') Move python3 custom runtime to sadl
# TOOL test-data-in-out3.py: "Test data input and output in Python3" (Data input output test.) # INPUT input TYPE GENERIC # OUTPUT output # RUNTIME python3 import shutil shutil.copyfile('input', 'output')
<commit_before># TOOL test-data-in-out3.py: "Test data input and output in Python3" (Data input output test.) # INPUT input TYPE GENERIC # OUTPUT output import shutil shutil.copyfile('input', 'output') <commit_msg>Move python3 custom runtime to sadl<commit_after>
# TOOL test-data-in-out3.py: "Test data input and output in Python3" (Data input output test.) # INPUT input TYPE GENERIC # OUTPUT output # RUNTIME python3 import shutil shutil.copyfile('input', 'output')
# TOOL test-data-in-out3.py: "Test data input and output in Python3" (Data input output test.) # INPUT input TYPE GENERIC # OUTPUT output import shutil shutil.copyfile('input', 'output') Move python3 custom runtime to sadl# TOOL test-data-in-out3.py: "Test data input and output in Python3" (Data input output test.)...
<commit_before># TOOL test-data-in-out3.py: "Test data input and output in Python3" (Data input output test.) # INPUT input TYPE GENERIC # OUTPUT output import shutil shutil.copyfile('input', 'output') <commit_msg>Move python3 custom runtime to sadl<commit_after># TOOL test-data-in-out3.py: "Test data input and out...
24582fa0e031ad8c964a094912a6fb5a02bc2ace
tests/unit/fixture/test_logging.py
tests/unit/fixture/test_logging.py
# Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # d...
# Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # d...
Test formatting errors with log level being emitted
Test formatting errors with log level being emitted The test to ensure that formatting errors are handled properly was being run using info level logging, but the default log configuration for tests does not emit messages at that level, so switch to error. Change-Id: Ie11a51deea65627b45a11d7dfca36d16c1b5949e
Python
apache-2.0
akash1808/oslo.log,meganjbaker/oslo.log,magic0704/oslo.log,JioCloud/oslo.log,zzicewind/oslo.log,varunarya10/oslo.log,openstack/oslo.log
# Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # d...
# Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # d...
<commit_before># Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
# Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # d...
# Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # d...
<commit_before># Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
ab4983e577b9831b91290976be00917edb9fad6f
mlox/modules/resources.py
mlox/modules/resources.py
"""Handle program wide resources (files, images, etc...)""" import os import sys import base64 import tempfile def unpack_resource(data): """Convert base64 encoded data into a file handle, and a temporary file name to access the data""" file_handle = tempfile.NamedTemporaryFile() file_handle.write(base64.b...
"""Handle program wide resources (files, images, etc...)""" import os import sys import base64 import tempfile def unpack_resource(data): """Convert base64 encoded data into a file handle, and a temporary file name to access the data""" file_handle = tempfile.NamedTemporaryFile() file_handle.write(base64.b...
Switch back to using the old SVN update location.
Switch back to using the old SVN update location. While changing the download location would be nice, this keeps the option of putting a final data file that would force users to update.
Python
mit
EmperorArthur/mlox,EmperorArthur/mlox,EmperorArthur/mlox
"""Handle program wide resources (files, images, etc...)""" import os import sys import base64 import tempfile def unpack_resource(data): """Convert base64 encoded data into a file handle, and a temporary file name to access the data""" file_handle = tempfile.NamedTemporaryFile() file_handle.write(base64.b...
"""Handle program wide resources (files, images, etc...)""" import os import sys import base64 import tempfile def unpack_resource(data): """Convert base64 encoded data into a file handle, and a temporary file name to access the data""" file_handle = tempfile.NamedTemporaryFile() file_handle.write(base64.b...
<commit_before>"""Handle program wide resources (files, images, etc...)""" import os import sys import base64 import tempfile def unpack_resource(data): """Convert base64 encoded data into a file handle, and a temporary file name to access the data""" file_handle = tempfile.NamedTemporaryFile() file_handle...
"""Handle program wide resources (files, images, etc...)""" import os import sys import base64 import tempfile def unpack_resource(data): """Convert base64 encoded data into a file handle, and a temporary file name to access the data""" file_handle = tempfile.NamedTemporaryFile() file_handle.write(base64.b...
"""Handle program wide resources (files, images, etc...)""" import os import sys import base64 import tempfile def unpack_resource(data): """Convert base64 encoded data into a file handle, and a temporary file name to access the data""" file_handle = tempfile.NamedTemporaryFile() file_handle.write(base64.b...
<commit_before>"""Handle program wide resources (files, images, etc...)""" import os import sys import base64 import tempfile def unpack_resource(data): """Convert base64 encoded data into a file handle, and a temporary file name to access the data""" file_handle = tempfile.NamedTemporaryFile() file_handle...
2b2696dde438a46a7b831867111cc767a88bf77e
lib/DjangoLibrary.py
lib/DjangoLibrary.py
from robot.api import logger import os import signal import subprocess ROBOT_LIBRARY_DOC_FORMAT = 'reST' class DjangoLibrary: """A library for testing Django with Robot Framework. """ django_pid = None selenium_pid = None # TEST CASE => New instance is created for every test case. # TEST S...
# -*- coding: utf-8 -*- __version__ = '0.1' from robot.api import logger import os import signal import subprocess ROBOT_LIBRARY_DOC_FORMAT = 'reST' class DjangoLibrary: """A library for testing Django with Robot Framework. """ django_pid = None selenium_pid = None # TEST CASE => New instance...
Add version, utf-8 and some comments.
Add version, utf-8 and some comments.
Python
apache-2.0
kitconcept/robotframework-djangolibrary
from robot.api import logger import os import signal import subprocess ROBOT_LIBRARY_DOC_FORMAT = 'reST' class DjangoLibrary: """A library for testing Django with Robot Framework. """ django_pid = None selenium_pid = None # TEST CASE => New instance is created for every test case. # TEST S...
# -*- coding: utf-8 -*- __version__ = '0.1' from robot.api import logger import os import signal import subprocess ROBOT_LIBRARY_DOC_FORMAT = 'reST' class DjangoLibrary: """A library for testing Django with Robot Framework. """ django_pid = None selenium_pid = None # TEST CASE => New instance...
<commit_before>from robot.api import logger import os import signal import subprocess ROBOT_LIBRARY_DOC_FORMAT = 'reST' class DjangoLibrary: """A library for testing Django with Robot Framework. """ django_pid = None selenium_pid = None # TEST CASE => New instance is created for every test cas...
# -*- coding: utf-8 -*- __version__ = '0.1' from robot.api import logger import os import signal import subprocess ROBOT_LIBRARY_DOC_FORMAT = 'reST' class DjangoLibrary: """A library for testing Django with Robot Framework. """ django_pid = None selenium_pid = None # TEST CASE => New instance...
from robot.api import logger import os import signal import subprocess ROBOT_LIBRARY_DOC_FORMAT = 'reST' class DjangoLibrary: """A library for testing Django with Robot Framework. """ django_pid = None selenium_pid = None # TEST CASE => New instance is created for every test case. # TEST S...
<commit_before>from robot.api import logger import os import signal import subprocess ROBOT_LIBRARY_DOC_FORMAT = 'reST' class DjangoLibrary: """A library for testing Django with Robot Framework. """ django_pid = None selenium_pid = None # TEST CASE => New instance is created for every test cas...
ac7902ad4d4c4df94fa6b13ae9ef18623d63b900
tests/_utils.py
tests/_utils.py
import os, sys support = os.path.join(os.path.dirname(__file__), '_support') def load(name): sys.path.insert(0, support) mod = __import__(name) sys.path.pop(0) return mod
import os, sys from contextlib import contextmanager support = os.path.join(os.path.dirname(__file__), '_support') @contextmanager def support_path(): sys.path.insert(0, support) yield sys.path.pop(0) def load(name): with support_path(): return __import__(name)
Tweak support load path jazz
Tweak support load path jazz
Python
bsd-2-clause
mkusz/invoke,sophacles/invoke,singingwolfboy/invoke,pfmoore/invoke,kejbaly2/invoke,alex/invoke,pfmoore/invoke,pyinvoke/invoke,kejbaly2/invoke,frol/invoke,mkusz/invoke,mattrobenolt/invoke,mattrobenolt/invoke,frol/invoke,pyinvoke/invoke,tyewang/invoke
import os, sys support = os.path.join(os.path.dirname(__file__), '_support') def load(name): sys.path.insert(0, support) mod = __import__(name) sys.path.pop(0) return mod Tweak support load path jazz
import os, sys from contextlib import contextmanager support = os.path.join(os.path.dirname(__file__), '_support') @contextmanager def support_path(): sys.path.insert(0, support) yield sys.path.pop(0) def load(name): with support_path(): return __import__(name)
<commit_before>import os, sys support = os.path.join(os.path.dirname(__file__), '_support') def load(name): sys.path.insert(0, support) mod = __import__(name) sys.path.pop(0) return mod <commit_msg>Tweak support load path jazz<commit_after>
import os, sys from contextlib import contextmanager support = os.path.join(os.path.dirname(__file__), '_support') @contextmanager def support_path(): sys.path.insert(0, support) yield sys.path.pop(0) def load(name): with support_path(): return __import__(name)
import os, sys support = os.path.join(os.path.dirname(__file__), '_support') def load(name): sys.path.insert(0, support) mod = __import__(name) sys.path.pop(0) return mod Tweak support load path jazzimport os, sys from contextlib import contextmanager support = os.path.join(os.path.dirname(__file__...
<commit_before>import os, sys support = os.path.join(os.path.dirname(__file__), '_support') def load(name): sys.path.insert(0, support) mod = __import__(name) sys.path.pop(0) return mod <commit_msg>Tweak support load path jazz<commit_after>import os, sys from contextlib import contextmanager suppor...
9660fb734ecf2ad2c181eba790cdd2ddc9ed423e
cyder/core/system/forms.py
cyder/core/system/forms.py
from django import forms from cyder.base.eav.forms import get_eav_form from cyder.base.mixins import UsabilityFormMixin from cyder.core.system.models import System, SystemAV class SystemForm(forms.ModelForm): class Meta: model = System class ExtendedSystemForm(forms.ModelForm, UsabilityFormMixin): ...
from django import forms from cyder.base.eav.forms import get_eav_form from cyder.base.mixins import UsabilityFormMixin from cyder.core.system.models import System, SystemAV class SystemForm(forms.ModelForm): class Meta: model = System class ExtendedSystemForm(forms.ModelForm, UsabilityFormMixin): ...
Fix system form interface_type choices
Fix system form interface_type choices
Python
bsd-3-clause
murrown/cyder,drkitty/cyder,OSU-Net/cyder,akeym/cyder,murrown/cyder,OSU-Net/cyder,murrown/cyder,akeym/cyder,murrown/cyder,drkitty/cyder,zeeman/cyder,zeeman/cyder,OSU-Net/cyder,akeym/cyder,zeeman/cyder,OSU-Net/cyder,drkitty/cyder,akeym/cyder,drkitty/cyder,zeeman/cyder
from django import forms from cyder.base.eav.forms import get_eav_form from cyder.base.mixins import UsabilityFormMixin from cyder.core.system.models import System, SystemAV class SystemForm(forms.ModelForm): class Meta: model = System class ExtendedSystemForm(forms.ModelForm, UsabilityFormMixin): ...
from django import forms from cyder.base.eav.forms import get_eav_form from cyder.base.mixins import UsabilityFormMixin from cyder.core.system.models import System, SystemAV class SystemForm(forms.ModelForm): class Meta: model = System class ExtendedSystemForm(forms.ModelForm, UsabilityFormMixin): ...
<commit_before>from django import forms from cyder.base.eav.forms import get_eav_form from cyder.base.mixins import UsabilityFormMixin from cyder.core.system.models import System, SystemAV class SystemForm(forms.ModelForm): class Meta: model = System class ExtendedSystemForm(forms.ModelForm, Usability...
from django import forms from cyder.base.eav.forms import get_eav_form from cyder.base.mixins import UsabilityFormMixin from cyder.core.system.models import System, SystemAV class SystemForm(forms.ModelForm): class Meta: model = System class ExtendedSystemForm(forms.ModelForm, UsabilityFormMixin): ...
from django import forms from cyder.base.eav.forms import get_eav_form from cyder.base.mixins import UsabilityFormMixin from cyder.core.system.models import System, SystemAV class SystemForm(forms.ModelForm): class Meta: model = System class ExtendedSystemForm(forms.ModelForm, UsabilityFormMixin): ...
<commit_before>from django import forms from cyder.base.eav.forms import get_eav_form from cyder.base.mixins import UsabilityFormMixin from cyder.core.system.models import System, SystemAV class SystemForm(forms.ModelForm): class Meta: model = System class ExtendedSystemForm(forms.ModelForm, Usability...
8f6ee9e2f39803ba2d47a96f795d36655d18edfb
contentpages/tests.py
contentpages/tests.py
from django.test import TestCase from django.urls import reverse from contentpages.views import ContentPage class TestContentPage(TestCase): def test_get_template(self): # test that the template view uses the template requested # using pliny as a view that will always be present route =...
from django.test import TestCase from django.urls import reverse class TestContentPage(TestCase): def test_get_template(self): # test that the template view uses the template requested # using pliny as a view that will always be present route = reverse('content:render', kwargs={'template...
Remove unused import from contentpages test
Remove unused import from contentpages test
Python
mit
bwhicks/PlinyProject,bwhicks/PlinyProject,bwhicks/PlinyProject,bwhicks/PlinyProject
from django.test import TestCase from django.urls import reverse from contentpages.views import ContentPage class TestContentPage(TestCase): def test_get_template(self): # test that the template view uses the template requested # using pliny as a view that will always be present route =...
from django.test import TestCase from django.urls import reverse class TestContentPage(TestCase): def test_get_template(self): # test that the template view uses the template requested # using pliny as a view that will always be present route = reverse('content:render', kwargs={'template...
<commit_before>from django.test import TestCase from django.urls import reverse from contentpages.views import ContentPage class TestContentPage(TestCase): def test_get_template(self): # test that the template view uses the template requested # using pliny as a view that will always be present ...
from django.test import TestCase from django.urls import reverse class TestContentPage(TestCase): def test_get_template(self): # test that the template view uses the template requested # using pliny as a view that will always be present route = reverse('content:render', kwargs={'template...
from django.test import TestCase from django.urls import reverse from contentpages.views import ContentPage class TestContentPage(TestCase): def test_get_template(self): # test that the template view uses the template requested # using pliny as a view that will always be present route =...
<commit_before>from django.test import TestCase from django.urls import reverse from contentpages.views import ContentPage class TestContentPage(TestCase): def test_get_template(self): # test that the template view uses the template requested # using pliny as a view that will always be present ...
41e29433da8f7db803ddd76ac7c7d543c69ad41c
account_journal_period_close/tests/__init__.py
account_journal_period_close/tests/__init__.py
# -*- coding: utf-8 -*- # # # Authors: Adrien Peiffer # Copyright (c) 2014 Acsone SA/NV (http://www.acsone.eu) # All Rights Reserved # # WARNING: This program as such is intended to be used by professional # programmers who take the whole responsibility of assessing all potential # consequences result...
# -*- coding: utf-8 -*- # # # Authors: Adrien Peiffer # Copyright (c) 2014 Acsone SA/NV (http://www.acsone.eu) # All Rights Reserved # # WARNING: This program as such is intended to be used by professional # programmers who take the whole responsibility of assessing all potential # consequences result...
Add checks list on tests init file
[ADD] Add checks list on tests init file
Python
agpl-3.0
open-synergy/account-financial-tools,factorlibre/account-financial-tools,damdam-s/account-financial-tools,VitalPet/account-financial-tools,credativUK/account-financial-tools,open-synergy/account-financial-tools,abstract-open-solutions/account-financial-tools,taktik/account-financial-tools,nagyv/account-financial-tools,...
# -*- coding: utf-8 -*- # # # Authors: Adrien Peiffer # Copyright (c) 2014 Acsone SA/NV (http://www.acsone.eu) # All Rights Reserved # # WARNING: This program as such is intended to be used by professional # programmers who take the whole responsibility of assessing all potential # consequences result...
# -*- coding: utf-8 -*- # # # Authors: Adrien Peiffer # Copyright (c) 2014 Acsone SA/NV (http://www.acsone.eu) # All Rights Reserved # # WARNING: This program as such is intended to be used by professional # programmers who take the whole responsibility of assessing all potential # consequences result...
<commit_before># -*- coding: utf-8 -*- # # # Authors: Adrien Peiffer # Copyright (c) 2014 Acsone SA/NV (http://www.acsone.eu) # All Rights Reserved # # WARNING: This program as such is intended to be used by professional # programmers who take the whole responsibility of assessing all potential # cons...
# -*- coding: utf-8 -*- # # # Authors: Adrien Peiffer # Copyright (c) 2014 Acsone SA/NV (http://www.acsone.eu) # All Rights Reserved # # WARNING: This program as such is intended to be used by professional # programmers who take the whole responsibility of assessing all potential # consequences result...
# -*- coding: utf-8 -*- # # # Authors: Adrien Peiffer # Copyright (c) 2014 Acsone SA/NV (http://www.acsone.eu) # All Rights Reserved # # WARNING: This program as such is intended to be used by professional # programmers who take the whole responsibility of assessing all potential # consequences result...
<commit_before># -*- coding: utf-8 -*- # # # Authors: Adrien Peiffer # Copyright (c) 2014 Acsone SA/NV (http://www.acsone.eu) # All Rights Reserved # # WARNING: This program as such is intended to be used by professional # programmers who take the whole responsibility of assessing all potential # cons...
0b0d26373f8f2f0cf869bce430eaaf6a84407f2c
src/nodeconductor_assembly_waldur/invoices/filters.py
src/nodeconductor_assembly_waldur/invoices/filters.py
import django_filters from nodeconductor.core.filters import UUIDFilter, URLFilter from . import models class InvoiceFilter(django_filters.FilterSet): customer_uuid = UUIDFilter(name='customer__uuid') state = django_filters.MultipleChoiceFilter(choices=models.Invoice.States.CHOICES) class Meta(object):...
import django_filters from nodeconductor.core.filters import UUIDFilter, URLFilter from . import models class InvoiceFilter(django_filters.FilterSet): customer = URLFilter(view_name='customer-detail', name='customer__uuid') customer_uuid = UUIDFilter(name='customer__uuid') state = django_filters.Multipl...
Make filtering invoices and payment details by customer consistent with serializer (WAL-231)
Make filtering invoices and payment details by customer consistent with serializer (WAL-231)
Python
mit
opennode/waldur-mastermind,opennode/nodeconductor-assembly-waldur,opennode/nodeconductor-assembly-waldur,opennode/waldur-mastermind,opennode/waldur-mastermind,opennode/nodeconductor-assembly-waldur,opennode/waldur-mastermind
import django_filters from nodeconductor.core.filters import UUIDFilter, URLFilter from . import models class InvoiceFilter(django_filters.FilterSet): customer_uuid = UUIDFilter(name='customer__uuid') state = django_filters.MultipleChoiceFilter(choices=models.Invoice.States.CHOICES) class Meta(object):...
import django_filters from nodeconductor.core.filters import UUIDFilter, URLFilter from . import models class InvoiceFilter(django_filters.FilterSet): customer = URLFilter(view_name='customer-detail', name='customer__uuid') customer_uuid = UUIDFilter(name='customer__uuid') state = django_filters.Multipl...
<commit_before>import django_filters from nodeconductor.core.filters import UUIDFilter, URLFilter from . import models class InvoiceFilter(django_filters.FilterSet): customer_uuid = UUIDFilter(name='customer__uuid') state = django_filters.MultipleChoiceFilter(choices=models.Invoice.States.CHOICES) clas...
import django_filters from nodeconductor.core.filters import UUIDFilter, URLFilter from . import models class InvoiceFilter(django_filters.FilterSet): customer = URLFilter(view_name='customer-detail', name='customer__uuid') customer_uuid = UUIDFilter(name='customer__uuid') state = django_filters.Multipl...
import django_filters from nodeconductor.core.filters import UUIDFilter, URLFilter from . import models class InvoiceFilter(django_filters.FilterSet): customer_uuid = UUIDFilter(name='customer__uuid') state = django_filters.MultipleChoiceFilter(choices=models.Invoice.States.CHOICES) class Meta(object):...
<commit_before>import django_filters from nodeconductor.core.filters import UUIDFilter, URLFilter from . import models class InvoiceFilter(django_filters.FilterSet): customer_uuid = UUIDFilter(name='customer__uuid') state = django_filters.MultipleChoiceFilter(choices=models.Invoice.States.CHOICES) clas...
3cb07a7f547b4187c918e7340d15c172cb9a7231
fabfile.py
fabfile.py
#!/usr/bin/env python # update_remotes # Updates all my remote machines # # Author: Daniel Gonzalez Gasull import sys from fabric import api as fab_api from fabric import exceptions as fab_ex try: import settings except ImportError: print('No settings file') sys.exit() fab_api.env.use_ssh_config = True...
#!/usr/bin/env python # update_remotes # Updates all my remote machines # # Author: Daniel Gonzalez Gasull import sys from fabric import api as fab_api from fabric import exceptions as fab_ex try: import settings except ImportError: print('No settings file') sys.exit() fab_api.env.use_ssh_config = True...
Exit if tuple of remote hosts is empty.
Exit if tuple of remote hosts is empty.
Python
apache-2.0
gasull/src-git-pull
#!/usr/bin/env python # update_remotes # Updates all my remote machines # # Author: Daniel Gonzalez Gasull import sys from fabric import api as fab_api from fabric import exceptions as fab_ex try: import settings except ImportError: print('No settings file') sys.exit() fab_api.env.use_ssh_config = True...
#!/usr/bin/env python # update_remotes # Updates all my remote machines # # Author: Daniel Gonzalez Gasull import sys from fabric import api as fab_api from fabric import exceptions as fab_ex try: import settings except ImportError: print('No settings file') sys.exit() fab_api.env.use_ssh_config = True...
<commit_before>#!/usr/bin/env python # update_remotes # Updates all my remote machines # # Author: Daniel Gonzalez Gasull import sys from fabric import api as fab_api from fabric import exceptions as fab_ex try: import settings except ImportError: print('No settings file') sys.exit() fab_api.env.use_ss...
#!/usr/bin/env python # update_remotes # Updates all my remote machines # # Author: Daniel Gonzalez Gasull import sys from fabric import api as fab_api from fabric import exceptions as fab_ex try: import settings except ImportError: print('No settings file') sys.exit() fab_api.env.use_ssh_config = True...
#!/usr/bin/env python # update_remotes # Updates all my remote machines # # Author: Daniel Gonzalez Gasull import sys from fabric import api as fab_api from fabric import exceptions as fab_ex try: import settings except ImportError: print('No settings file') sys.exit() fab_api.env.use_ssh_config = True...
<commit_before>#!/usr/bin/env python # update_remotes # Updates all my remote machines # # Author: Daniel Gonzalez Gasull import sys from fabric import api as fab_api from fabric import exceptions as fab_ex try: import settings except ImportError: print('No settings file') sys.exit() fab_api.env.use_ss...
a75dc02612fd2159731d8fdc04e85a2fbc0138d0
bvspca/core/templatetags/utility_tags.py
bvspca/core/templatetags/utility_tags.py
from django import template from django.conf import settings register = template.Library() @register.filter def to_css_name(value): return value.lower().replace(' ', '-') @register.filter def get_property(instance, key): return getattr(instance, key) @register.assignment_tag def get_google_maps_key(): ...
from django import template from django.conf import settings register = template.Library() @register.filter def to_css_name(value): return value.lower().replace(' ', '-') @register.filter def get_property(instance, key): return getattr(instance, key) @register.simple_tag def get_google_maps_key(): re...
Switch from deprecated assignment tags to simple tags
Switch from deprecated assignment tags to simple tags
Python
mit
nfletton/bvspca,nfletton/bvspca,nfletton/bvspca,nfletton/bvspca
from django import template from django.conf import settings register = template.Library() @register.filter def to_css_name(value): return value.lower().replace(' ', '-') @register.filter def get_property(instance, key): return getattr(instance, key) @register.assignment_tag def get_google_maps_key(): ...
from django import template from django.conf import settings register = template.Library() @register.filter def to_css_name(value): return value.lower().replace(' ', '-') @register.filter def get_property(instance, key): return getattr(instance, key) @register.simple_tag def get_google_maps_key(): re...
<commit_before>from django import template from django.conf import settings register = template.Library() @register.filter def to_css_name(value): return value.lower().replace(' ', '-') @register.filter def get_property(instance, key): return getattr(instance, key) @register.assignment_tag def get_google...
from django import template from django.conf import settings register = template.Library() @register.filter def to_css_name(value): return value.lower().replace(' ', '-') @register.filter def get_property(instance, key): return getattr(instance, key) @register.simple_tag def get_google_maps_key(): re...
from django import template from django.conf import settings register = template.Library() @register.filter def to_css_name(value): return value.lower().replace(' ', '-') @register.filter def get_property(instance, key): return getattr(instance, key) @register.assignment_tag def get_google_maps_key(): ...
<commit_before>from django import template from django.conf import settings register = template.Library() @register.filter def to_css_name(value): return value.lower().replace(' ', '-') @register.filter def get_property(instance, key): return getattr(instance, key) @register.assignment_tag def get_google...
c37269b8e1ea62773a2af1a04676d6d74aac0850
apps/chats/urls.py
apps/chats/urls.py
from django.conf.urls.defaults import * urlpatterns = patterns('chats.views', url('^chats/$', 'index', name='chats_index'), url('^chats/new/$', 'new', name='chats_new'), url('^chats/(?P<id>\d+)/$', 'show', name='chats_show'), )
from django.conf.urls.defaults import * urlpatterns = patterns('chats.views', url('^chats/$', 'index', name='chats-index'), url('^chats/new/$', 'new', name='chats-new'), url('^chats/(?P<id>\d+)/$', 'show', name='chats-show'), )
Use dashes in url names
Use dashes in url names
Python
mit
tofumatt/quotes,tofumatt/quotes
from django.conf.urls.defaults import * urlpatterns = patterns('chats.views', url('^chats/$', 'index', name='chats_index'), url('^chats/new/$', 'new', name='chats_new'), url('^chats/(?P<id>\d+)/$', 'show', name='chats_show'), ) Use dashes in url names
from django.conf.urls.defaults import * urlpatterns = patterns('chats.views', url('^chats/$', 'index', name='chats-index'), url('^chats/new/$', 'new', name='chats-new'), url('^chats/(?P<id>\d+)/$', 'show', name='chats-show'), )
<commit_before>from django.conf.urls.defaults import * urlpatterns = patterns('chats.views', url('^chats/$', 'index', name='chats_index'), url('^chats/new/$', 'new', name='chats_new'), url('^chats/(?P<id>\d+)/$', 'show', name='chats_show'), ) <commit_msg>Use dashes in url names<commit_after>
from django.conf.urls.defaults import * urlpatterns = patterns('chats.views', url('^chats/$', 'index', name='chats-index'), url('^chats/new/$', 'new', name='chats-new'), url('^chats/(?P<id>\d+)/$', 'show', name='chats-show'), )
from django.conf.urls.defaults import * urlpatterns = patterns('chats.views', url('^chats/$', 'index', name='chats_index'), url('^chats/new/$', 'new', name='chats_new'), url('^chats/(?P<id>\d+)/$', 'show', name='chats_show'), ) Use dashes in url namesfrom django.conf.urls.defaults import * urlpatterns = p...
<commit_before>from django.conf.urls.defaults import * urlpatterns = patterns('chats.views', url('^chats/$', 'index', name='chats_index'), url('^chats/new/$', 'new', name='chats_new'), url('^chats/(?P<id>\d+)/$', 'show', name='chats_show'), ) <commit_msg>Use dashes in url names<commit_after>from django.con...
d314bb50e5769c6f6d46383e12397b27cca633ca
appstats/config.py
appstats/config.py
REDIS_HOST = '127.0.0.1' REDIS_PORT = 6379 REDIS_DB = 0 MONGO_HOST = '127.0.0.1' MONGO_PORT = 27017 MONGO_DB_NAME = 'appstats' APP_IDS = [dict(key='prom.ua', name='Prom.ua'), dict(key='tiu.ru', name='Tiu.ru'), dict(key='deal.by', name='Deal.by')] FIELDS = [ dict(key='NUMBER', name='NUMBE...
REDIS_HOST = '127.0.0.1' REDIS_PORT = 6379 REDIS_DB = 0 MONGO_HOST = '127.0.0.1' MONGO_PORT = 27017 MONGO_DB_NAME = 'appstats' APP_IDS = [dict(key='prom.ua', name='Prom.ua'), dict(key='tiu.ru', name='Tiu.ru'), dict(key='deal.by', name='Deal.by')] FIELDS = [ dict(key='NUMBER', name='NUMBE...
Change NUMBER field format: None -> count
Change NUMBER field format: None -> count
Python
mit
uvNikita/appstats,uvNikita/appstats,uvNikita/appstats
REDIS_HOST = '127.0.0.1' REDIS_PORT = 6379 REDIS_DB = 0 MONGO_HOST = '127.0.0.1' MONGO_PORT = 27017 MONGO_DB_NAME = 'appstats' APP_IDS = [dict(key='prom.ua', name='Prom.ua'), dict(key='tiu.ru', name='Tiu.ru'), dict(key='deal.by', name='Deal.by')] FIELDS = [ dict(key='NUMBER', name='NUMBE...
REDIS_HOST = '127.0.0.1' REDIS_PORT = 6379 REDIS_DB = 0 MONGO_HOST = '127.0.0.1' MONGO_PORT = 27017 MONGO_DB_NAME = 'appstats' APP_IDS = [dict(key='prom.ua', name='Prom.ua'), dict(key='tiu.ru', name='Tiu.ru'), dict(key='deal.by', name='Deal.by')] FIELDS = [ dict(key='NUMBER', name='NUMBE...
<commit_before>REDIS_HOST = '127.0.0.1' REDIS_PORT = 6379 REDIS_DB = 0 MONGO_HOST = '127.0.0.1' MONGO_PORT = 27017 MONGO_DB_NAME = 'appstats' APP_IDS = [dict(key='prom.ua', name='Prom.ua'), dict(key='tiu.ru', name='Tiu.ru'), dict(key='deal.by', name='Deal.by')] FIELDS = [ dict(key='NUMBER',...
REDIS_HOST = '127.0.0.1' REDIS_PORT = 6379 REDIS_DB = 0 MONGO_HOST = '127.0.0.1' MONGO_PORT = 27017 MONGO_DB_NAME = 'appstats' APP_IDS = [dict(key='prom.ua', name='Prom.ua'), dict(key='tiu.ru', name='Tiu.ru'), dict(key='deal.by', name='Deal.by')] FIELDS = [ dict(key='NUMBER', name='NUMBE...
REDIS_HOST = '127.0.0.1' REDIS_PORT = 6379 REDIS_DB = 0 MONGO_HOST = '127.0.0.1' MONGO_PORT = 27017 MONGO_DB_NAME = 'appstats' APP_IDS = [dict(key='prom.ua', name='Prom.ua'), dict(key='tiu.ru', name='Tiu.ru'), dict(key='deal.by', name='Deal.by')] FIELDS = [ dict(key='NUMBER', name='NUMBE...
<commit_before>REDIS_HOST = '127.0.0.1' REDIS_PORT = 6379 REDIS_DB = 0 MONGO_HOST = '127.0.0.1' MONGO_PORT = 27017 MONGO_DB_NAME = 'appstats' APP_IDS = [dict(key='prom.ua', name='Prom.ua'), dict(key='tiu.ru', name='Tiu.ru'), dict(key='deal.by', name='Deal.by')] FIELDS = [ dict(key='NUMBER',...
1caccbc11a17c1f01d802ec0dc3d52d5de9d5049
coda/coda_replication/tests/test_urls.py
coda/coda_replication/tests/test_urls.py
import pytest from django.core.urlresolvers import resolve from .. import views pytestmark = pytest.mark.urls('coda_replication.urls') def test_queue(): assert resolve('/APP/queue/ark:/00001/codajom1/').func == views.queue def test_queue_collection(): assert resolve('/APP/queue/').func == views.queue ...
import pytest from django.core.urlresolvers import resolve from .. import views pytestmark = pytest.mark.urls('coda_replication.urls') def test_queue(): assert resolve('/APP/queue/ark:/00001/codajom1/').func == views.queue def test_queue_collection(): assert resolve('/APP/queue/').func == views.queue ...
Add a test for queue_search_JSON.
Add a test for queue_search_JSON.
Python
bsd-3-clause
unt-libraries/coda,unt-libraries/coda,unt-libraries/coda,unt-libraries/coda
import pytest from django.core.urlresolvers import resolve from .. import views pytestmark = pytest.mark.urls('coda_replication.urls') def test_queue(): assert resolve('/APP/queue/ark:/00001/codajom1/').func == views.queue def test_queue_collection(): assert resolve('/APP/queue/').func == views.queue ...
import pytest from django.core.urlresolvers import resolve from .. import views pytestmark = pytest.mark.urls('coda_replication.urls') def test_queue(): assert resolve('/APP/queue/ark:/00001/codajom1/').func == views.queue def test_queue_collection(): assert resolve('/APP/queue/').func == views.queue ...
<commit_before>import pytest from django.core.urlresolvers import resolve from .. import views pytestmark = pytest.mark.urls('coda_replication.urls') def test_queue(): assert resolve('/APP/queue/ark:/00001/codajom1/').func == views.queue def test_queue_collection(): assert resolve('/APP/queue/').func ==...
import pytest from django.core.urlresolvers import resolve from .. import views pytestmark = pytest.mark.urls('coda_replication.urls') def test_queue(): assert resolve('/APP/queue/ark:/00001/codajom1/').func == views.queue def test_queue_collection(): assert resolve('/APP/queue/').func == views.queue ...
import pytest from django.core.urlresolvers import resolve from .. import views pytestmark = pytest.mark.urls('coda_replication.urls') def test_queue(): assert resolve('/APP/queue/ark:/00001/codajom1/').func == views.queue def test_queue_collection(): assert resolve('/APP/queue/').func == views.queue ...
<commit_before>import pytest from django.core.urlresolvers import resolve from .. import views pytestmark = pytest.mark.urls('coda_replication.urls') def test_queue(): assert resolve('/APP/queue/ark:/00001/codajom1/').func == views.queue def test_queue_collection(): assert resolve('/APP/queue/').func ==...
5d2649fc005e514452c8d83f103b4fd2c5b03519
tailor/output/printer.py
tailor/output/printer.py
import os from tailor.types.location import Location class Printer: def __init__(self, filepath): self.__filepath = os.path.abspath(filepath) def warn(self, warn_msg, ctx=None, loc=Location(1, 1)): self.__print('warning', warn_msg, ctx, loc) def error(self, err_msg, ctx=None, loc=Locat...
import os from tailor.types.location import Location class Printer: def __init__(self, filepath): self.__filepath = os.path.abspath(filepath) def warn(self, warn_msg, ctx=None, loc=Location(1, 1)): self.__print('warning', warn_msg, ctx, loc) def error(self, err_msg, ctx=None, loc=Locat...
Increment column to be printed by 1
Increment column to be printed by 1
Python
mit
sleekbyte/tailor,sleekbyte/tailor,sleekbyte/tailor,sleekbyte/tailor,sleekbyte/tailor
import os from tailor.types.location import Location class Printer: def __init__(self, filepath): self.__filepath = os.path.abspath(filepath) def warn(self, warn_msg, ctx=None, loc=Location(1, 1)): self.__print('warning', warn_msg, ctx, loc) def error(self, err_msg, ctx=None, loc=Locat...
import os from tailor.types.location import Location class Printer: def __init__(self, filepath): self.__filepath = os.path.abspath(filepath) def warn(self, warn_msg, ctx=None, loc=Location(1, 1)): self.__print('warning', warn_msg, ctx, loc) def error(self, err_msg, ctx=None, loc=Locat...
<commit_before>import os from tailor.types.location import Location class Printer: def __init__(self, filepath): self.__filepath = os.path.abspath(filepath) def warn(self, warn_msg, ctx=None, loc=Location(1, 1)): self.__print('warning', warn_msg, ctx, loc) def error(self, err_msg, ctx=...
import os from tailor.types.location import Location class Printer: def __init__(self, filepath): self.__filepath = os.path.abspath(filepath) def warn(self, warn_msg, ctx=None, loc=Location(1, 1)): self.__print('warning', warn_msg, ctx, loc) def error(self, err_msg, ctx=None, loc=Locat...
import os from tailor.types.location import Location class Printer: def __init__(self, filepath): self.__filepath = os.path.abspath(filepath) def warn(self, warn_msg, ctx=None, loc=Location(1, 1)): self.__print('warning', warn_msg, ctx, loc) def error(self, err_msg, ctx=None, loc=Locat...
<commit_before>import os from tailor.types.location import Location class Printer: def __init__(self, filepath): self.__filepath = os.path.abspath(filepath) def warn(self, warn_msg, ctx=None, loc=Location(1, 1)): self.__print('warning', warn_msg, ctx, loc) def error(self, err_msg, ctx=...
b342ce094593f5921332140a9de69b0bdeba9ede
example.py
example.py
#!/usr/bin/env python import logging from ina219 import INA219 SHUNT_OHMS = 0.1 MAX_EXPECTED_AMPS = 0.2 def read(): ina = INA219(SHUNT_OHMS, MAX_EXPECTED_AMPS, log_level=logging.INFO) ina.configure(ina.RANGE_16V, ina.GAIN_AUTO) print ("Bus Voltage : %.3f V" % ina.voltage()) print ("Bus Current ...
#!/usr/bin/env python import logging from ina219 import INA219 SHUNT_OHMS = 0.1 MAX_EXPECTED_AMPS = 0.2 def read(): ina = INA219(SHUNT_OHMS, MAX_EXPECTED_AMPS, log_level=logging.INFO) ina.configure(ina.RANGE_16V, ina.GAIN_AUTO) print("Bus Voltage : %.3f V" % ina.voltage()) print("Bus Current ...
Fix flake8 error in Python 3 build
Fix flake8 error in Python 3 build
Python
mit
chrisb2/pi_ina219
#!/usr/bin/env python import logging from ina219 import INA219 SHUNT_OHMS = 0.1 MAX_EXPECTED_AMPS = 0.2 def read(): ina = INA219(SHUNT_OHMS, MAX_EXPECTED_AMPS, log_level=logging.INFO) ina.configure(ina.RANGE_16V, ina.GAIN_AUTO) print ("Bus Voltage : %.3f V" % ina.voltage()) print ("Bus Current ...
#!/usr/bin/env python import logging from ina219 import INA219 SHUNT_OHMS = 0.1 MAX_EXPECTED_AMPS = 0.2 def read(): ina = INA219(SHUNT_OHMS, MAX_EXPECTED_AMPS, log_level=logging.INFO) ina.configure(ina.RANGE_16V, ina.GAIN_AUTO) print("Bus Voltage : %.3f V" % ina.voltage()) print("Bus Current ...
<commit_before>#!/usr/bin/env python import logging from ina219 import INA219 SHUNT_OHMS = 0.1 MAX_EXPECTED_AMPS = 0.2 def read(): ina = INA219(SHUNT_OHMS, MAX_EXPECTED_AMPS, log_level=logging.INFO) ina.configure(ina.RANGE_16V, ina.GAIN_AUTO) print ("Bus Voltage : %.3f V" % ina.voltage()) print ...
#!/usr/bin/env python import logging from ina219 import INA219 SHUNT_OHMS = 0.1 MAX_EXPECTED_AMPS = 0.2 def read(): ina = INA219(SHUNT_OHMS, MAX_EXPECTED_AMPS, log_level=logging.INFO) ina.configure(ina.RANGE_16V, ina.GAIN_AUTO) print("Bus Voltage : %.3f V" % ina.voltage()) print("Bus Current ...
#!/usr/bin/env python import logging from ina219 import INA219 SHUNT_OHMS = 0.1 MAX_EXPECTED_AMPS = 0.2 def read(): ina = INA219(SHUNT_OHMS, MAX_EXPECTED_AMPS, log_level=logging.INFO) ina.configure(ina.RANGE_16V, ina.GAIN_AUTO) print ("Bus Voltage : %.3f V" % ina.voltage()) print ("Bus Current ...
<commit_before>#!/usr/bin/env python import logging from ina219 import INA219 SHUNT_OHMS = 0.1 MAX_EXPECTED_AMPS = 0.2 def read(): ina = INA219(SHUNT_OHMS, MAX_EXPECTED_AMPS, log_level=logging.INFO) ina.configure(ina.RANGE_16V, ina.GAIN_AUTO) print ("Bus Voltage : %.3f V" % ina.voltage()) print ...
617df13670573b858b6c23249f4287786807d8b6
website/notifications/listeners.py
website/notifications/listeners.py
import logging from website.notifications.exceptions import InvalidSubscriptionError from website.notifications.utils import subscribe_user_to_notifications, subscribe_user_to_global_notifications from website.project.signals import contributor_added, project_created from framework.auth.signals import user_confirmed l...
import logging from website.notifications.exceptions import InvalidSubscriptionError from website.notifications.utils import subscribe_user_to_notifications, subscribe_user_to_global_notifications from website.project.signals import contributor_added, project_created from framework.auth.signals import user_confirmed l...
Remove incorrect check for institution_id
Remove incorrect check for institution_id Fixes https://sentry.cos.io/sentry/osf-iy/issues/273424/
Python
apache-2.0
brianjgeiger/osf.io,adlius/osf.io,erinspace/osf.io,Johnetordoff/osf.io,leb2dg/osf.io,cslzchen/osf.io,Nesiehr/osf.io,chennan47/osf.io,caneruguz/osf.io,acshi/osf.io,leb2dg/osf.io,chrisseto/osf.io,chrisseto/osf.io,CenterForOpenScience/osf.io,laurenrevere/osf.io,acshi/osf.io,pattisdr/osf.io,aaxelb/osf.io,aaxelb/osf.io,acsh...
import logging from website.notifications.exceptions import InvalidSubscriptionError from website.notifications.utils import subscribe_user_to_notifications, subscribe_user_to_global_notifications from website.project.signals import contributor_added, project_created from framework.auth.signals import user_confirmed l...
import logging from website.notifications.exceptions import InvalidSubscriptionError from website.notifications.utils import subscribe_user_to_notifications, subscribe_user_to_global_notifications from website.project.signals import contributor_added, project_created from framework.auth.signals import user_confirmed l...
<commit_before>import logging from website.notifications.exceptions import InvalidSubscriptionError from website.notifications.utils import subscribe_user_to_notifications, subscribe_user_to_global_notifications from website.project.signals import contributor_added, project_created from framework.auth.signals import us...
import logging from website.notifications.exceptions import InvalidSubscriptionError from website.notifications.utils import subscribe_user_to_notifications, subscribe_user_to_global_notifications from website.project.signals import contributor_added, project_created from framework.auth.signals import user_confirmed l...
import logging from website.notifications.exceptions import InvalidSubscriptionError from website.notifications.utils import subscribe_user_to_notifications, subscribe_user_to_global_notifications from website.project.signals import contributor_added, project_created from framework.auth.signals import user_confirmed l...
<commit_before>import logging from website.notifications.exceptions import InvalidSubscriptionError from website.notifications.utils import subscribe_user_to_notifications, subscribe_user_to_global_notifications from website.project.signals import contributor_added, project_created from framework.auth.signals import us...
95fe3ba491c539780f8876faf3504a366ec2ca56
yowsup/layers/protocol_iq/layer.py
yowsup/layers/protocol_iq/layer.py
from yowsup.layers import YowProtocolLayer from yowsup.common import YowConstants from .protocolentities import * class YowIqProtocolLayer(YowProtocolLayer): def __init__(self): handleMap = { "iq": (self.recvIq, self.sendIq) } super(YowIqProtocolLayer, self).__init__(handleMap) ...
from yowsup.layers import YowProtocolLayer from yowsup.common import YowConstants from .protocolentities import * class YowIqProtocolLayer(YowProtocolLayer): def __init__(self): handleMap = { "iq": (self.recvIq, self.sendIq) } super(YowIqProtocolLayer, self).__init__(handleMap) ...
Use _sendIq for handling pongs
Use _sendIq for handling pongs
Python
mit
biji/yowsup,ongair/yowsup
from yowsup.layers import YowProtocolLayer from yowsup.common import YowConstants from .protocolentities import * class YowIqProtocolLayer(YowProtocolLayer): def __init__(self): handleMap = { "iq": (self.recvIq, self.sendIq) } super(YowIqProtocolLayer, self).__init__(handleMap) ...
from yowsup.layers import YowProtocolLayer from yowsup.common import YowConstants from .protocolentities import * class YowIqProtocolLayer(YowProtocolLayer): def __init__(self): handleMap = { "iq": (self.recvIq, self.sendIq) } super(YowIqProtocolLayer, self).__init__(handleMap) ...
<commit_before>from yowsup.layers import YowProtocolLayer from yowsup.common import YowConstants from .protocolentities import * class YowIqProtocolLayer(YowProtocolLayer): def __init__(self): handleMap = { "iq": (self.recvIq, self.sendIq) } super(YowIqProtocolLayer, self).__ini...
from yowsup.layers import YowProtocolLayer from yowsup.common import YowConstants from .protocolentities import * class YowIqProtocolLayer(YowProtocolLayer): def __init__(self): handleMap = { "iq": (self.recvIq, self.sendIq) } super(YowIqProtocolLayer, self).__init__(handleMap) ...
from yowsup.layers import YowProtocolLayer from yowsup.common import YowConstants from .protocolentities import * class YowIqProtocolLayer(YowProtocolLayer): def __init__(self): handleMap = { "iq": (self.recvIq, self.sendIq) } super(YowIqProtocolLayer, self).__init__(handleMap) ...
<commit_before>from yowsup.layers import YowProtocolLayer from yowsup.common import YowConstants from .protocolentities import * class YowIqProtocolLayer(YowProtocolLayer): def __init__(self): handleMap = { "iq": (self.recvIq, self.sendIq) } super(YowIqProtocolLayer, self).__ini...
9e148028300a46f9074b9f188dc04d87884c8905
rsr/headerbar.py
rsr/headerbar.py
from gi.repository import Gio, Gtk from rsr.commands import commands class HeaderBar(Gtk.HeaderBar): def __init__(self, win): super(HeaderBar, self).__init__() self.win = win self.set_show_close_button(True) self.set_title('RunSQLRun') self.set_subtitle('Database query t...
from gi.repository import Gio, Gtk from rsr.commands import commands class HeaderBar(Gtk.HeaderBar): def __init__(self, win): super(HeaderBar, self).__init__() self.win = win self.set_show_close_button(True) self.set_title('RunSQLRun') self.set_subtitle('Database query t...
Hide preferences button for now.
Hide preferences button for now.
Python
mit
andialbrecht/runsqlrun
from gi.repository import Gio, Gtk from rsr.commands import commands class HeaderBar(Gtk.HeaderBar): def __init__(self, win): super(HeaderBar, self).__init__() self.win = win self.set_show_close_button(True) self.set_title('RunSQLRun') self.set_subtitle('Database query t...
from gi.repository import Gio, Gtk from rsr.commands import commands class HeaderBar(Gtk.HeaderBar): def __init__(self, win): super(HeaderBar, self).__init__() self.win = win self.set_show_close_button(True) self.set_title('RunSQLRun') self.set_subtitle('Database query t...
<commit_before>from gi.repository import Gio, Gtk from rsr.commands import commands class HeaderBar(Gtk.HeaderBar): def __init__(self, win): super(HeaderBar, self).__init__() self.win = win self.set_show_close_button(True) self.set_title('RunSQLRun') self.set_subtitle('D...
from gi.repository import Gio, Gtk from rsr.commands import commands class HeaderBar(Gtk.HeaderBar): def __init__(self, win): super(HeaderBar, self).__init__() self.win = win self.set_show_close_button(True) self.set_title('RunSQLRun') self.set_subtitle('Database query t...
from gi.repository import Gio, Gtk from rsr.commands import commands class HeaderBar(Gtk.HeaderBar): def __init__(self, win): super(HeaderBar, self).__init__() self.win = win self.set_show_close_button(True) self.set_title('RunSQLRun') self.set_subtitle('Database query t...
<commit_before>from gi.repository import Gio, Gtk from rsr.commands import commands class HeaderBar(Gtk.HeaderBar): def __init__(self, win): super(HeaderBar, self).__init__() self.win = win self.set_show_close_button(True) self.set_title('RunSQLRun') self.set_subtitle('D...
c1d22d24e6c1d7aa1a70e07e39ee0196da86b26f
scripts/stock_price/white_noise.py
scripts/stock_price/white_noise.py
#!/usr/bin/python3 # coding: utf-8 ''' Create a white noise animation like a TV screen ''' import numpy as np from PIL import Image width = 128 height = 96 n_frames = 10 frame_duration = 100 center_value = 64 def create_image(): image = np.zeros(shape=(height, width, 3), dtype=int) for y i...
#!/usr/bin/python3 # coding: utf-8 ''' Create a white noise animation like a TV screen ''' import itertools import random import matplotlib.pyplot as plt import numpy as np from PIL import Image width = 256 height = 192 max_value = 255 # brightness value_center = 64 # mean value_range = 16 # s...
Fix distributions of the white noise sampler
Fix distributions of the white noise sampler
Python
mit
zettsu-t/cPlusPlusFriend,zettsu-t/cPlusPlusFriend,zettsu-t/cPlusPlusFriend,zettsu-t/cPlusPlusFriend,zettsu-t/cPlusPlusFriend,zettsu-t/cPlusPlusFriend,zettsu-t/cPlusPlusFriend
#!/usr/bin/python3 # coding: utf-8 ''' Create a white noise animation like a TV screen ''' import numpy as np from PIL import Image width = 128 height = 96 n_frames = 10 frame_duration = 100 center_value = 64 def create_image(): image = np.zeros(shape=(height, width, 3), dtype=int) for y i...
#!/usr/bin/python3 # coding: utf-8 ''' Create a white noise animation like a TV screen ''' import itertools import random import matplotlib.pyplot as plt import numpy as np from PIL import Image width = 256 height = 192 max_value = 255 # brightness value_center = 64 # mean value_range = 16 # s...
<commit_before>#!/usr/bin/python3 # coding: utf-8 ''' Create a white noise animation like a TV screen ''' import numpy as np from PIL import Image width = 128 height = 96 n_frames = 10 frame_duration = 100 center_value = 64 def create_image(): image = np.zeros(shape=(height, width, 3), dtype=in...
#!/usr/bin/python3 # coding: utf-8 ''' Create a white noise animation like a TV screen ''' import itertools import random import matplotlib.pyplot as plt import numpy as np from PIL import Image width = 256 height = 192 max_value = 255 # brightness value_center = 64 # mean value_range = 16 # s...
#!/usr/bin/python3 # coding: utf-8 ''' Create a white noise animation like a TV screen ''' import numpy as np from PIL import Image width = 128 height = 96 n_frames = 10 frame_duration = 100 center_value = 64 def create_image(): image = np.zeros(shape=(height, width, 3), dtype=int) for y i...
<commit_before>#!/usr/bin/python3 # coding: utf-8 ''' Create a white noise animation like a TV screen ''' import numpy as np from PIL import Image width = 128 height = 96 n_frames = 10 frame_duration = 100 center_value = 64 def create_image(): image = np.zeros(shape=(height, width, 3), dtype=in...
d133a74913df1b86318b724f900b1f1c33cb7860
scripts/slave/recipes/crashpad/continuous.py
scripts/slave/recipes/crashpad/continuous.py
# Copyright 2014 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """Buildbot recipe definition for the various Crashpad continuous builders. """ DEPS = [ 'gclient', 'path', 'platform', 'properties', 'python', ...
# Copyright 2014 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """Buildbot recipe definition for the various Crashpad continuous builders. """ DEPS = [ 'gclient', 'path', 'platform', 'properties', 'python', ...
Fix clobber on crashpad recipe
Fix clobber on crashpad recipe Apparently (from looking at https://build.chromium.org/p/client.crashpad/builders/crashpad_mac_dbg/builds/25/steps/steps/logs/stdio ) buildbot only adds 'clobber' to the dict, but has a value of '', so just check for existence instead. So much for having tests. :p R=dpranke@chromium.o...
Python
bsd-3-clause
eunchong/build,eunchong/build,eunchong/build,eunchong/build
# Copyright 2014 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """Buildbot recipe definition for the various Crashpad continuous builders. """ DEPS = [ 'gclient', 'path', 'platform', 'properties', 'python', ...
# Copyright 2014 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """Buildbot recipe definition for the various Crashpad continuous builders. """ DEPS = [ 'gclient', 'path', 'platform', 'properties', 'python', ...
<commit_before># Copyright 2014 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """Buildbot recipe definition for the various Crashpad continuous builders. """ DEPS = [ 'gclient', 'path', 'platform', 'properties',...
# Copyright 2014 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """Buildbot recipe definition for the various Crashpad continuous builders. """ DEPS = [ 'gclient', 'path', 'platform', 'properties', 'python', ...
# Copyright 2014 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """Buildbot recipe definition for the various Crashpad continuous builders. """ DEPS = [ 'gclient', 'path', 'platform', 'properties', 'python', ...
<commit_before># Copyright 2014 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """Buildbot recipe definition for the various Crashpad continuous builders. """ DEPS = [ 'gclient', 'path', 'platform', 'properties',...
1b47c9eb39a2c5bbdf05397c949619d5a044f2ae
fabfile.py
fabfile.py
from fabric.api import env, run, local, sudo, settings from fabric.contrib.console import confirm def build_local(): local('docker-compose run app go build -v') local('mv app/app ./application') def copy_app(): local('scp application {0}@{1}:/home/{0}'.format(env.user, env.hosts[0])) def stop_service(...
import os from fabric.api import env, run, local, sudo, settings env.password = os.getenv('SUDO_PASSWORD', None) assert env.password def build_local(): local('docker-compose run app go build -v') local('mv app/app ./application') def copy_app(): local('scp application {0}@{1}:/home/{0}'.format(env.use...
Set password in env var
Set password in env var
Python
mit
exitcodezero/picloud,exitcodezero/pi-cloud-sockets
from fabric.api import env, run, local, sudo, settings from fabric.contrib.console import confirm def build_local(): local('docker-compose run app go build -v') local('mv app/app ./application') def copy_app(): local('scp application {0}@{1}:/home/{0}'.format(env.user, env.hosts[0])) def stop_service(...
import os from fabric.api import env, run, local, sudo, settings env.password = os.getenv('SUDO_PASSWORD', None) assert env.password def build_local(): local('docker-compose run app go build -v') local('mv app/app ./application') def copy_app(): local('scp application {0}@{1}:/home/{0}'.format(env.use...
<commit_before>from fabric.api import env, run, local, sudo, settings from fabric.contrib.console import confirm def build_local(): local('docker-compose run app go build -v') local('mv app/app ./application') def copy_app(): local('scp application {0}@{1}:/home/{0}'.format(env.user, env.hosts[0])) de...
import os from fabric.api import env, run, local, sudo, settings env.password = os.getenv('SUDO_PASSWORD', None) assert env.password def build_local(): local('docker-compose run app go build -v') local('mv app/app ./application') def copy_app(): local('scp application {0}@{1}:/home/{0}'.format(env.use...
from fabric.api import env, run, local, sudo, settings from fabric.contrib.console import confirm def build_local(): local('docker-compose run app go build -v') local('mv app/app ./application') def copy_app(): local('scp application {0}@{1}:/home/{0}'.format(env.user, env.hosts[0])) def stop_service(...
<commit_before>from fabric.api import env, run, local, sudo, settings from fabric.contrib.console import confirm def build_local(): local('docker-compose run app go build -v') local('mv app/app ./application') def copy_app(): local('scp application {0}@{1}:/home/{0}'.format(env.user, env.hosts[0])) de...
43662a6417a9d589bac2ab49e5b9b5441adf1115
atomic/__init__.py
atomic/__init__.py
from .atomic_data import AtomicData from .collisional_radiative import CollRadEquilibrium from .time_dependent_rates import RateEquations, RateEquationsWithDiffusion from .radiation import Radiation from .electron_cooling import ElectronCooling element = AtomicData.from_element
import os, sys sys.path.append(os.path.join(os.path.dirname(__file__))) from .atomic_data import AtomicData from .collisional_radiative import CollRadEquilibrium from .time_dependent_rates import RateEquations, RateEquationsWithDiffusion from .radiation import Radiation from .electron_cooling import ElectronCooling el...
Set path to find _xxdata.so files
Set path to find _xxdata.so files
Python
mit
cfe316/atomic
from .atomic_data import AtomicData from .collisional_radiative import CollRadEquilibrium from .time_dependent_rates import RateEquations, RateEquationsWithDiffusion from .radiation import Radiation from .electron_cooling import ElectronCooling element = AtomicData.from_element Set path to find _xxdata.so files
import os, sys sys.path.append(os.path.join(os.path.dirname(__file__))) from .atomic_data import AtomicData from .collisional_radiative import CollRadEquilibrium from .time_dependent_rates import RateEquations, RateEquationsWithDiffusion from .radiation import Radiation from .electron_cooling import ElectronCooling el...
<commit_before>from .atomic_data import AtomicData from .collisional_radiative import CollRadEquilibrium from .time_dependent_rates import RateEquations, RateEquationsWithDiffusion from .radiation import Radiation from .electron_cooling import ElectronCooling element = AtomicData.from_element <commit_msg>Set path to ...
import os, sys sys.path.append(os.path.join(os.path.dirname(__file__))) from .atomic_data import AtomicData from .collisional_radiative import CollRadEquilibrium from .time_dependent_rates import RateEquations, RateEquationsWithDiffusion from .radiation import Radiation from .electron_cooling import ElectronCooling el...
from .atomic_data import AtomicData from .collisional_radiative import CollRadEquilibrium from .time_dependent_rates import RateEquations, RateEquationsWithDiffusion from .radiation import Radiation from .electron_cooling import ElectronCooling element = AtomicData.from_element Set path to find _xxdata.so filesimport...
<commit_before>from .atomic_data import AtomicData from .collisional_radiative import CollRadEquilibrium from .time_dependent_rates import RateEquations, RateEquationsWithDiffusion from .radiation import Radiation from .electron_cooling import ElectronCooling element = AtomicData.from_element <commit_msg>Set path to ...
ad8600f94268adaa00b71a92adc601a87d2cef14
test_echo.py
test_echo.py
from echo_client import client def test_1(): assert client('This is a unicode test') == 'This is a unicode test' def test_2(): assert client(u'This is an é unicode test') == u'This is an é unicode test'
from echo_client import client def test_1(): assert client('This is a unicode test') == 'This is a unicode test' def test_2(): assert client('This string is larger than my current buffer size. It should return all of the characters. This is the last sentence of this test.') == 'This string is larger than my...
Add long and empty strings for testing
Add long and empty strings for testing
Python
mit
jwarren116/network-tools,jwarren116/network-tools
from echo_client import client def test_1(): assert client('This is a unicode test') == 'This is a unicode test' def test_2(): assert client(u'This is an é unicode test') == u'This is an é unicode test' Add long and empty strings for testing
from echo_client import client def test_1(): assert client('This is a unicode test') == 'This is a unicode test' def test_2(): assert client('This string is larger than my current buffer size. It should return all of the characters. This is the last sentence of this test.') == 'This string is larger than my...
<commit_before>from echo_client import client def test_1(): assert client('This is a unicode test') == 'This is a unicode test' def test_2(): assert client(u'This is an é unicode test') == u'This is an é unicode test' <commit_msg>Add long and empty strings for testing<commit_after>
from echo_client import client def test_1(): assert client('This is a unicode test') == 'This is a unicode test' def test_2(): assert client('This string is larger than my current buffer size. It should return all of the characters. This is the last sentence of this test.') == 'This string is larger than my...
from echo_client import client def test_1(): assert client('This is a unicode test') == 'This is a unicode test' def test_2(): assert client(u'This is an é unicode test') == u'This is an é unicode test' Add long and empty strings for testingfrom echo_client import client def test_1(): assert client('T...
<commit_before>from echo_client import client def test_1(): assert client('This is a unicode test') == 'This is a unicode test' def test_2(): assert client(u'This is an é unicode test') == u'This is an é unicode test' <commit_msg>Add long and empty strings for testing<commit_after>from echo_client import cl...
eba712b9efced9cb8d2d6cd0683fb550e5f5b1ca
mininews/sitemaps.py
mininews/sitemaps.py
from django.contrib.sitemaps import Sitemap class MininewsSitemap(Sitemap): # Let's assume that an article - once published - will not change. changefreq = "never" # Define the model class here to make it easier to customise this class. model = None def items(self): return self.model.ob...
from django.contrib.sitemaps import Sitemap class MininewsSitemap(Sitemap): def items(self): return self.model.objects.live() def lastmod(self, obj): return obj.modified
Remove defaults from the sitemap.py that should not be set in Mininews.
Remove defaults from the sitemap.py that should not be set in Mininews.
Python
mit
richardbarran/django-minipub,richardbarran/django-minipub,richardbarran/django-mininews,richardbarran/django-mininews,richardbarran/django-mininews
from django.contrib.sitemaps import Sitemap class MininewsSitemap(Sitemap): # Let's assume that an article - once published - will not change. changefreq = "never" # Define the model class here to make it easier to customise this class. model = None def items(self): return self.model.ob...
from django.contrib.sitemaps import Sitemap class MininewsSitemap(Sitemap): def items(self): return self.model.objects.live() def lastmod(self, obj): return obj.modified
<commit_before>from django.contrib.sitemaps import Sitemap class MininewsSitemap(Sitemap): # Let's assume that an article - once published - will not change. changefreq = "never" # Define the model class here to make it easier to customise this class. model = None def items(self): retur...
from django.contrib.sitemaps import Sitemap class MininewsSitemap(Sitemap): def items(self): return self.model.objects.live() def lastmod(self, obj): return obj.modified
from django.contrib.sitemaps import Sitemap class MininewsSitemap(Sitemap): # Let's assume that an article - once published - will not change. changefreq = "never" # Define the model class here to make it easier to customise this class. model = None def items(self): return self.model.ob...
<commit_before>from django.contrib.sitemaps import Sitemap class MininewsSitemap(Sitemap): # Let's assume that an article - once published - will not change. changefreq = "never" # Define the model class here to make it easier to customise this class. model = None def items(self): retur...
4ae0f5ea2c48aaa141f25edc0d35e07da0d5e5f4
project/api/managers.py
project/api/managers.py
# Django from django.contrib.auth.models import BaseUserManager class UserManager(BaseUserManager): def create_user(self, email, password='', **kwargs): user = self.model( email=email, password='', is_active=True, **kwargs ) user.save(using=...
# Django from django.contrib.auth.models import BaseUserManager class UserManager(BaseUserManager): def create_user(self, email, person, password='', **kwargs): user = self.model( email=email, person=person, password='', is_active=True, **kwargs...
Update `create_user` method manager to require person
Update `create_user` method manager to require person
Python
bsd-2-clause
barberscore/barberscore-api,dbinetti/barberscore-django,dbinetti/barberscore,barberscore/barberscore-api,barberscore/barberscore-api,dbinetti/barberscore,dbinetti/barberscore-django,barberscore/barberscore-api
# Django from django.contrib.auth.models import BaseUserManager class UserManager(BaseUserManager): def create_user(self, email, password='', **kwargs): user = self.model( email=email, password='', is_active=True, **kwargs ) user.save(using=...
# Django from django.contrib.auth.models import BaseUserManager class UserManager(BaseUserManager): def create_user(self, email, person, password='', **kwargs): user = self.model( email=email, person=person, password='', is_active=True, **kwargs...
<commit_before># Django from django.contrib.auth.models import BaseUserManager class UserManager(BaseUserManager): def create_user(self, email, password='', **kwargs): user = self.model( email=email, password='', is_active=True, **kwargs ) u...
# Django from django.contrib.auth.models import BaseUserManager class UserManager(BaseUserManager): def create_user(self, email, person, password='', **kwargs): user = self.model( email=email, person=person, password='', is_active=True, **kwargs...
# Django from django.contrib.auth.models import BaseUserManager class UserManager(BaseUserManager): def create_user(self, email, password='', **kwargs): user = self.model( email=email, password='', is_active=True, **kwargs ) user.save(using=...
<commit_before># Django from django.contrib.auth.models import BaseUserManager class UserManager(BaseUserManager): def create_user(self, email, password='', **kwargs): user = self.model( email=email, password='', is_active=True, **kwargs ) u...
c2b294483035c0b846be2dcacb7b9db4b36c2014
tests/settings/base.py
tests/settings/base.py
import os local_path = lambda path: os.path.join(os.path.dirname(__file__), path) APP_ROOT = os.path.abspath( os.path.join(os.path.dirname(__file__), '..')) DEBUG = True SECRET_KEY = 'not-so-secret-for-tests' INSTALLED_APPS = [ 'django.contrib.contenttypes', 'django.contrib.sessions', 'django.contr...
import os local_path = lambda path: os.path.join(os.path.dirname(__file__), path) APP_ROOT = os.path.abspath( os.path.join(os.path.dirname(__file__), '..')) DEBUG = True SECRET_KEY = 'not-so-secret-for-tests' INSTALLED_APPS = [ 'django.contrib.contenttypes', 'django.contrib.sessions', 'django.contr...
Add timezone settings to the test project.
Add timezone settings to the test project.
Python
bsd-3-clause
unt-libraries/django-name,damonkelley/django-name,unt-libraries/django-name,unt-libraries/django-name,damonkelley/django-name,damonkelley/django-name
import os local_path = lambda path: os.path.join(os.path.dirname(__file__), path) APP_ROOT = os.path.abspath( os.path.join(os.path.dirname(__file__), '..')) DEBUG = True SECRET_KEY = 'not-so-secret-for-tests' INSTALLED_APPS = [ 'django.contrib.contenttypes', 'django.contrib.sessions', 'django.contr...
import os local_path = lambda path: os.path.join(os.path.dirname(__file__), path) APP_ROOT = os.path.abspath( os.path.join(os.path.dirname(__file__), '..')) DEBUG = True SECRET_KEY = 'not-so-secret-for-tests' INSTALLED_APPS = [ 'django.contrib.contenttypes', 'django.contrib.sessions', 'django.contr...
<commit_before>import os local_path = lambda path: os.path.join(os.path.dirname(__file__), path) APP_ROOT = os.path.abspath( os.path.join(os.path.dirname(__file__), '..')) DEBUG = True SECRET_KEY = 'not-so-secret-for-tests' INSTALLED_APPS = [ 'django.contrib.contenttypes', 'django.contrib.sessions', ...
import os local_path = lambda path: os.path.join(os.path.dirname(__file__), path) APP_ROOT = os.path.abspath( os.path.join(os.path.dirname(__file__), '..')) DEBUG = True SECRET_KEY = 'not-so-secret-for-tests' INSTALLED_APPS = [ 'django.contrib.contenttypes', 'django.contrib.sessions', 'django.contr...
import os local_path = lambda path: os.path.join(os.path.dirname(__file__), path) APP_ROOT = os.path.abspath( os.path.join(os.path.dirname(__file__), '..')) DEBUG = True SECRET_KEY = 'not-so-secret-for-tests' INSTALLED_APPS = [ 'django.contrib.contenttypes', 'django.contrib.sessions', 'django.contr...
<commit_before>import os local_path = lambda path: os.path.join(os.path.dirname(__file__), path) APP_ROOT = os.path.abspath( os.path.join(os.path.dirname(__file__), '..')) DEBUG = True SECRET_KEY = 'not-so-secret-for-tests' INSTALLED_APPS = [ 'django.contrib.contenttypes', 'django.contrib.sessions', ...
1cda977eff5a2edaa0de82882ef2e7d1611329b7
tests/test_protocol.py
tests/test_protocol.py
""" The tests provided in this module make sure that the server is compliant to the SaltyRTC protocol. """ import pytest class TestProtocol: @pytest.mark.asyncio def test_server_hello(self, ws_client_factory, get_unencrypted_packet): """ The server must send a valid `server-hello` on connectio...
""" The tests provided in this module make sure that the server is compliant to the SaltyRTC protocol. """ import asyncio import pytest import saltyrtc class TestProtocol: @pytest.mark.asyncio def test_no_subprotocols(self, ws_client_factory): """ The server must drop the client after the co...
Add tests for invalid and no provided sub-protocols
Add tests for invalid and no provided sub-protocols
Python
mit
saltyrtc/saltyrtc-server-python,saltyrtc/saltyrtc-server-python
""" The tests provided in this module make sure that the server is compliant to the SaltyRTC protocol. """ import pytest class TestProtocol: @pytest.mark.asyncio def test_server_hello(self, ws_client_factory, get_unencrypted_packet): """ The server must send a valid `server-hello` on connectio...
""" The tests provided in this module make sure that the server is compliant to the SaltyRTC protocol. """ import asyncio import pytest import saltyrtc class TestProtocol: @pytest.mark.asyncio def test_no_subprotocols(self, ws_client_factory): """ The server must drop the client after the co...
<commit_before>""" The tests provided in this module make sure that the server is compliant to the SaltyRTC protocol. """ import pytest class TestProtocol: @pytest.mark.asyncio def test_server_hello(self, ws_client_factory, get_unencrypted_packet): """ The server must send a valid `server-hell...
""" The tests provided in this module make sure that the server is compliant to the SaltyRTC protocol. """ import asyncio import pytest import saltyrtc class TestProtocol: @pytest.mark.asyncio def test_no_subprotocols(self, ws_client_factory): """ The server must drop the client after the co...
""" The tests provided in this module make sure that the server is compliant to the SaltyRTC protocol. """ import pytest class TestProtocol: @pytest.mark.asyncio def test_server_hello(self, ws_client_factory, get_unencrypted_packet): """ The server must send a valid `server-hello` on connectio...
<commit_before>""" The tests provided in this module make sure that the server is compliant to the SaltyRTC protocol. """ import pytest class TestProtocol: @pytest.mark.asyncio def test_server_hello(self, ws_client_factory, get_unencrypted_packet): """ The server must send a valid `server-hell...
a86ecdb187c06da216be0dd5020748bf84f8638b
tests/test_settings.py
tests/test_settings.py
from os import environ SECRET_KEY = "fake-secret-key" INSTALLED_APPS = [ "tests", ] DATABASES = { "default": { "ENGINE": "django.db.backends.sqlite3", "NAME": ":memory:", } } MIDDLEWARE_CLASSES = [] CHANNELS = { "CHANNELS": { "channels.backends.slack.SlackChannel": { ...
from os import environ SECRET_KEY = "fake-secret-key" INSTALLED_APPS = [ "tests", ] DATABASES = { "default": { "ENGINE": "django.db.backends.sqlite3", "NAME": ":memory:", } } MIDDLEWARE_CLASSES = [] CHANNELS = { "CHANNELS": { "channels.backends.hipchat.HipChatChannel": { ...
Add test settings for HipChatChannel
Add test settings for HipChatChannel
Python
mit
ymyzk/django-channels,ymyzk/kawasemi
from os import environ SECRET_KEY = "fake-secret-key" INSTALLED_APPS = [ "tests", ] DATABASES = { "default": { "ENGINE": "django.db.backends.sqlite3", "NAME": ":memory:", } } MIDDLEWARE_CLASSES = [] CHANNELS = { "CHANNELS": { "channels.backends.slack.SlackChannel": { ...
from os import environ SECRET_KEY = "fake-secret-key" INSTALLED_APPS = [ "tests", ] DATABASES = { "default": { "ENGINE": "django.db.backends.sqlite3", "NAME": ":memory:", } } MIDDLEWARE_CLASSES = [] CHANNELS = { "CHANNELS": { "channels.backends.hipchat.HipChatChannel": { ...
<commit_before>from os import environ SECRET_KEY = "fake-secret-key" INSTALLED_APPS = [ "tests", ] DATABASES = { "default": { "ENGINE": "django.db.backends.sqlite3", "NAME": ":memory:", } } MIDDLEWARE_CLASSES = [] CHANNELS = { "CHANNELS": { "channels.backends.slack.SlackCha...
from os import environ SECRET_KEY = "fake-secret-key" INSTALLED_APPS = [ "tests", ] DATABASES = { "default": { "ENGINE": "django.db.backends.sqlite3", "NAME": ":memory:", } } MIDDLEWARE_CLASSES = [] CHANNELS = { "CHANNELS": { "channels.backends.hipchat.HipChatChannel": { ...
from os import environ SECRET_KEY = "fake-secret-key" INSTALLED_APPS = [ "tests", ] DATABASES = { "default": { "ENGINE": "django.db.backends.sqlite3", "NAME": ":memory:", } } MIDDLEWARE_CLASSES = [] CHANNELS = { "CHANNELS": { "channels.backends.slack.SlackChannel": { ...
<commit_before>from os import environ SECRET_KEY = "fake-secret-key" INSTALLED_APPS = [ "tests", ] DATABASES = { "default": { "ENGINE": "django.db.backends.sqlite3", "NAME": ":memory:", } } MIDDLEWARE_CLASSES = [] CHANNELS = { "CHANNELS": { "channels.backends.slack.SlackCha...
0b797d14a609172d4965320aa30eae9e9c1f892e
tests/test_strutils.py
tests/test_strutils.py
# -*- coding: utf-8 -*- from boltons import strutils def test_asciify(): ref = u'Beyoncé' b = strutils.asciify(ref) assert len(b) == len(b) assert b[-1:].decode('ascii') == 'e' def test_indent(): to_indent = '\nabc\ndef\n\nxyz\n' ref = '\n abc\n def\n\n xyz\n' assert strutils.indent(...
# -*- coding: utf-8 -*- import uuid from boltons import strutils def test_asciify(): ref = u'Beyoncé' b = strutils.asciify(ref) assert len(b) == len(b) assert b[-1:].decode('ascii') == 'e' def test_indent(): to_indent = '\nabc\ndef\n\nxyz\n' ref = '\n abc\n def\n\n xyz\n' assert str...
Add is_uuid unit-tests, including garbage types.
Add is_uuid unit-tests, including garbage types.
Python
bsd-3-clause
zeroSteiner/boltons,doublereedkurt/boltons,markrwilliams/boltons
# -*- coding: utf-8 -*- from boltons import strutils def test_asciify(): ref = u'Beyoncé' b = strutils.asciify(ref) assert len(b) == len(b) assert b[-1:].decode('ascii') == 'e' def test_indent(): to_indent = '\nabc\ndef\n\nxyz\n' ref = '\n abc\n def\n\n xyz\n' assert strutils.indent(...
# -*- coding: utf-8 -*- import uuid from boltons import strutils def test_asciify(): ref = u'Beyoncé' b = strutils.asciify(ref) assert len(b) == len(b) assert b[-1:].decode('ascii') == 'e' def test_indent(): to_indent = '\nabc\ndef\n\nxyz\n' ref = '\n abc\n def\n\n xyz\n' assert str...
<commit_before># -*- coding: utf-8 -*- from boltons import strutils def test_asciify(): ref = u'Beyoncé' b = strutils.asciify(ref) assert len(b) == len(b) assert b[-1:].decode('ascii') == 'e' def test_indent(): to_indent = '\nabc\ndef\n\nxyz\n' ref = '\n abc\n def\n\n xyz\n' assert s...
# -*- coding: utf-8 -*- import uuid from boltons import strutils def test_asciify(): ref = u'Beyoncé' b = strutils.asciify(ref) assert len(b) == len(b) assert b[-1:].decode('ascii') == 'e' def test_indent(): to_indent = '\nabc\ndef\n\nxyz\n' ref = '\n abc\n def\n\n xyz\n' assert str...
# -*- coding: utf-8 -*- from boltons import strutils def test_asciify(): ref = u'Beyoncé' b = strutils.asciify(ref) assert len(b) == len(b) assert b[-1:].decode('ascii') == 'e' def test_indent(): to_indent = '\nabc\ndef\n\nxyz\n' ref = '\n abc\n def\n\n xyz\n' assert strutils.indent(...
<commit_before># -*- coding: utf-8 -*- from boltons import strutils def test_asciify(): ref = u'Beyoncé' b = strutils.asciify(ref) assert len(b) == len(b) assert b[-1:].decode('ascii') == 'e' def test_indent(): to_indent = '\nabc\ndef\n\nxyz\n' ref = '\n abc\n def\n\n xyz\n' assert s...
1ce23f576888d9e5acf506443374ce0844e70e21
south/signals.py
south/signals.py
""" South-specific signals """ from django.dispatch import Signal # Sent at the start of the migration of an app pre_migrate = Signal(providing_args=["app"]) # Sent after each successful migration of an app post_migrate = Signal(providing_args=["app"]) # Sent after each run of a particular migration in a direction ...
""" South-specific signals """ from django.dispatch import Signal from django.conf import settings # Sent at the start of the migration of an app pre_migrate = Signal(providing_args=["app"]) # Sent after each successful migration of an app post_migrate = Signal(providing_args=["app"]) # Sent after each run of a par...
Add a compatibility hook to deal with creating django.contrib.auth permissions on migrated models.
Add a compatibility hook to deal with creating django.contrib.auth permissions on migrated models.
Python
apache-2.0
nimnull/django-south,RaD/django-south,RaD/django-south,philipn/django-south,nimnull/django-south,RaD/django-south,philipn/django-south
""" South-specific signals """ from django.dispatch import Signal # Sent at the start of the migration of an app pre_migrate = Signal(providing_args=["app"]) # Sent after each successful migration of an app post_migrate = Signal(providing_args=["app"]) # Sent after each run of a particular migration in a direction ...
""" South-specific signals """ from django.dispatch import Signal from django.conf import settings # Sent at the start of the migration of an app pre_migrate = Signal(providing_args=["app"]) # Sent after each successful migration of an app post_migrate = Signal(providing_args=["app"]) # Sent after each run of a par...
<commit_before>""" South-specific signals """ from django.dispatch import Signal # Sent at the start of the migration of an app pre_migrate = Signal(providing_args=["app"]) # Sent after each successful migration of an app post_migrate = Signal(providing_args=["app"]) # Sent after each run of a particular migration ...
""" South-specific signals """ from django.dispatch import Signal from django.conf import settings # Sent at the start of the migration of an app pre_migrate = Signal(providing_args=["app"]) # Sent after each successful migration of an app post_migrate = Signal(providing_args=["app"]) # Sent after each run of a par...
""" South-specific signals """ from django.dispatch import Signal # Sent at the start of the migration of an app pre_migrate = Signal(providing_args=["app"]) # Sent after each successful migration of an app post_migrate = Signal(providing_args=["app"]) # Sent after each run of a particular migration in a direction ...
<commit_before>""" South-specific signals """ from django.dispatch import Signal # Sent at the start of the migration of an app pre_migrate = Signal(providing_args=["app"]) # Sent after each successful migration of an app post_migrate = Signal(providing_args=["app"]) # Sent after each run of a particular migration ...
83d767f75534da4c225eca407ec5eff6ed5774a2
crmapp/contacts/views.py
crmapp/contacts/views.py
from django.shortcuts import render from django.contrib.auth.decorators import login_required from .models import Contact @login_required() def contact_detail(request, uuid): contact = Contact.objects.get(uuid=uuid) return render(request, 'contacts/contact_detail.html', {'...
from django.shortcuts import render from django.contrib.auth.decorators import login_required from django.http import HttpResponseRedirect from django.core.urlresolvers import reverse from django.http import HttpResponseForbidden from .models import Contact from .forms import ContactForm @login_required() def contac...
Create the Contacts App - Part II > New Contact - Create View
Create the Contacts App - Part II > New Contact - Create View
Python
mit
deenaariff/Django,tabdon/crmeasyapp,tabdon/crmeasyapp
from django.shortcuts import render from django.contrib.auth.decorators import login_required from .models import Contact @login_required() def contact_detail(request, uuid): contact = Contact.objects.get(uuid=uuid) return render(request, 'contacts/contact_detail.html', {'...
from django.shortcuts import render from django.contrib.auth.decorators import login_required from django.http import HttpResponseRedirect from django.core.urlresolvers import reverse from django.http import HttpResponseForbidden from .models import Contact from .forms import ContactForm @login_required() def contac...
<commit_before>from django.shortcuts import render from django.contrib.auth.decorators import login_required from .models import Contact @login_required() def contact_detail(request, uuid): contact = Contact.objects.get(uuid=uuid) return render(request, 'contacts/contact_detail.html', ...
from django.shortcuts import render from django.contrib.auth.decorators import login_required from django.http import HttpResponseRedirect from django.core.urlresolvers import reverse from django.http import HttpResponseForbidden from .models import Contact from .forms import ContactForm @login_required() def contac...
from django.shortcuts import render from django.contrib.auth.decorators import login_required from .models import Contact @login_required() def contact_detail(request, uuid): contact = Contact.objects.get(uuid=uuid) return render(request, 'contacts/contact_detail.html', {'...
<commit_before>from django.shortcuts import render from django.contrib.auth.decorators import login_required from .models import Contact @login_required() def contact_detail(request, uuid): contact = Contact.objects.get(uuid=uuid) return render(request, 'contacts/contact_detail.html', ...
0a2fa84285a586282d79146f85d9efba12a528dd
Parallel/Testing/Cxx/TestSockets.py
Parallel/Testing/Cxx/TestSockets.py
""" Driver script for testing sockets Unix only """ import os, sys, time # Fork, run server in child, client in parent pid = os.fork() if pid == 0: # exec the parent os.execv(sys.argv[1], ('-D', sys.argv[3])) else: # wait a little to make sure that the server is ready time.sleep(10) # run the c...
""" Driver script for testing sockets Unix only """ import os, sys, time # Fork, run server in child, client in parent pid = os.fork() if pid == 0: # exec the parent os.execv(sys.argv[1], ('-D', sys.argv[3])) else: # wait a little to make sure that the server is ready time.sleep(10) # run the c...
Return code from script must reflect that of the test.
BUG: Return code from script must reflect that of the test.
Python
bsd-3-clause
mspark93/VTK,jeffbaumes/jeffbaumes-vtk,demarle/VTK,sumedhasingla/VTK,sankhesh/VTK,mspark93/VTK,keithroe/vtkoptix,daviddoria/PointGraphsPhase1,SimVascular/VTK,collects/VTK,SimVascular/VTK,sumedhasingla/VTK,mspark93/VTK,biddisco/VTK,sgh/vtk,jmerkow/VTK,aashish24/VTK-old,demarle/VTK,demarle/VTK,aashish24/VTK-old,johnkit/v...
""" Driver script for testing sockets Unix only """ import os, sys, time # Fork, run server in child, client in parent pid = os.fork() if pid == 0: # exec the parent os.execv(sys.argv[1], ('-D', sys.argv[3])) else: # wait a little to make sure that the server is ready time.sleep(10) # run the c...
""" Driver script for testing sockets Unix only """ import os, sys, time # Fork, run server in child, client in parent pid = os.fork() if pid == 0: # exec the parent os.execv(sys.argv[1], ('-D', sys.argv[3])) else: # wait a little to make sure that the server is ready time.sleep(10) # run the c...
<commit_before>""" Driver script for testing sockets Unix only """ import os, sys, time # Fork, run server in child, client in parent pid = os.fork() if pid == 0: # exec the parent os.execv(sys.argv[1], ('-D', sys.argv[3])) else: # wait a little to make sure that the server is ready time.sleep(10) ...
""" Driver script for testing sockets Unix only """ import os, sys, time # Fork, run server in child, client in parent pid = os.fork() if pid == 0: # exec the parent os.execv(sys.argv[1], ('-D', sys.argv[3])) else: # wait a little to make sure that the server is ready time.sleep(10) # run the c...
""" Driver script for testing sockets Unix only """ import os, sys, time # Fork, run server in child, client in parent pid = os.fork() if pid == 0: # exec the parent os.execv(sys.argv[1], ('-D', sys.argv[3])) else: # wait a little to make sure that the server is ready time.sleep(10) # run the c...
<commit_before>""" Driver script for testing sockets Unix only """ import os, sys, time # Fork, run server in child, client in parent pid = os.fork() if pid == 0: # exec the parent os.execv(sys.argv[1], ('-D', sys.argv[3])) else: # wait a little to make sure that the server is ready time.sleep(10) ...
52803c6cea6a1e1b06486f137f62e6e827cdcb1d
tests/conftest.py
tests/conftest.py
from tests.test import Test def pytest_addoption(parser): parser.addoption('--transport-urls', action='store', help='Transport urls') parser.addoption('--admin-refresh-token', action='store', help='Admin refresh tokens') parser.addoption('--user-refresh-token', action='store', ...
from tests.test import Test def pytest_addoption(parser): parser.addoption('--transport-urls', action='store', help='Transport urls') parser.addoption('--admin-refresh-token', action='store', help='Admin refresh tokens') parser.addoption('--user-refresh-token', action='store', ...
Add token type to test id
Add token type to test id
Python
apache-2.0
devicehive/devicehive-python
from tests.test import Test def pytest_addoption(parser): parser.addoption('--transport-urls', action='store', help='Transport urls') parser.addoption('--admin-refresh-token', action='store', help='Admin refresh tokens') parser.addoption('--user-refresh-token', action='store', ...
from tests.test import Test def pytest_addoption(parser): parser.addoption('--transport-urls', action='store', help='Transport urls') parser.addoption('--admin-refresh-token', action='store', help='Admin refresh tokens') parser.addoption('--user-refresh-token', action='store', ...
<commit_before>from tests.test import Test def pytest_addoption(parser): parser.addoption('--transport-urls', action='store', help='Transport urls') parser.addoption('--admin-refresh-token', action='store', help='Admin refresh tokens') parser.addoption('--user-refresh-token', action='...
from tests.test import Test def pytest_addoption(parser): parser.addoption('--transport-urls', action='store', help='Transport urls') parser.addoption('--admin-refresh-token', action='store', help='Admin refresh tokens') parser.addoption('--user-refresh-token', action='store', ...
from tests.test import Test def pytest_addoption(parser): parser.addoption('--transport-urls', action='store', help='Transport urls') parser.addoption('--admin-refresh-token', action='store', help='Admin refresh tokens') parser.addoption('--user-refresh-token', action='store', ...
<commit_before>from tests.test import Test def pytest_addoption(parser): parser.addoption('--transport-urls', action='store', help='Transport urls') parser.addoption('--admin-refresh-token', action='store', help='Admin refresh tokens') parser.addoption('--user-refresh-token', action='...
701402c4a51474b244ff28dd2d5c9a0731440308
mozcal/events/api.py
mozcal/events/api.py
from tastypie.resources import ModelResource from models import Event class EventResource(ModelResource): class Meta: queryset = Event.objects.all()
from tastypie.resources import ModelResource from models import Event class EventResource(ModelResource): class Meta: queryset = Event.objects.all() filtering = { "title": ('startswith',), }
Allow filtering of event by title
Allow filtering of event by title
Python
bsd-3-clause
ppapadeas/wprevents,yvan-sraka/wprevents,yvan-sraka/wprevents,ppapadeas/wprevents,ppapadeas/wprevents,yvan-sraka/wprevents,yvan-sraka/wprevents
from tastypie.resources import ModelResource from models import Event class EventResource(ModelResource): class Meta: queryset = Event.objects.all() Allow filtering of event by title
from tastypie.resources import ModelResource from models import Event class EventResource(ModelResource): class Meta: queryset = Event.objects.all() filtering = { "title": ('startswith',), }
<commit_before>from tastypie.resources import ModelResource from models import Event class EventResource(ModelResource): class Meta: queryset = Event.objects.all() <commit_msg>Allow filtering of event by title<commit_after>
from tastypie.resources import ModelResource from models import Event class EventResource(ModelResource): class Meta: queryset = Event.objects.all() filtering = { "title": ('startswith',), }
from tastypie.resources import ModelResource from models import Event class EventResource(ModelResource): class Meta: queryset = Event.objects.all() Allow filtering of event by titlefrom tastypie.resources import ModelResource from models import Event class EventResource(ModelResource): class Meta: quer...
<commit_before>from tastypie.resources import ModelResource from models import Event class EventResource(ModelResource): class Meta: queryset = Event.objects.all() <commit_msg>Allow filtering of event by title<commit_after>from tastypie.resources import ModelResource from models import Event class EventResour...
f5af9624359523ddf67b63327d8fe85382497c47
pycroft/helpers/user.py
pycroft/helpers/user.py
# -*- coding: utf-8 -*- # Copyright (c) 2015 The Pycroft Authors. See the AUTHORS file. # This file is part of the Pycroft project and licensed under the terms of # the Apache License, Version 2.0. See the LICENSE file for details. from passlib.apps import ldap_context import passlib.utils ldap_context = ldap_context....
# -*- coding: utf-8 -*- # Copyright (c) 2015 The Pycroft Authors. See the AUTHORS file. # This file is part of the Pycroft project and licensed under the terms of # the Apache License, Version 2.0. See the LICENSE file for details. from passlib.apps import ldap_context import passlib.utils crypt_context = ldap_context...
Set deprecated password hashing schemes
Set deprecated password hashing schemes
Python
apache-2.0
agdsn/pycroft,agdsn/pycroft,agdsn/pycroft,agdsn/pycroft,agdsn/pycroft,lukasjuhrich/pycroft,lukasjuhrich/pycroft,lukasjuhrich/pycroft,lukasjuhrich/pycroft
# -*- coding: utf-8 -*- # Copyright (c) 2015 The Pycroft Authors. See the AUTHORS file. # This file is part of the Pycroft project and licensed under the terms of # the Apache License, Version 2.0. See the LICENSE file for details. from passlib.apps import ldap_context import passlib.utils ldap_context = ldap_context....
# -*- coding: utf-8 -*- # Copyright (c) 2015 The Pycroft Authors. See the AUTHORS file. # This file is part of the Pycroft project and licensed under the terms of # the Apache License, Version 2.0. See the LICENSE file for details. from passlib.apps import ldap_context import passlib.utils crypt_context = ldap_context...
<commit_before># -*- coding: utf-8 -*- # Copyright (c) 2015 The Pycroft Authors. See the AUTHORS file. # This file is part of the Pycroft project and licensed under the terms of # the Apache License, Version 2.0. See the LICENSE file for details. from passlib.apps import ldap_context import passlib.utils ldap_context ...
# -*- coding: utf-8 -*- # Copyright (c) 2015 The Pycroft Authors. See the AUTHORS file. # This file is part of the Pycroft project and licensed under the terms of # the Apache License, Version 2.0. See the LICENSE file for details. from passlib.apps import ldap_context import passlib.utils crypt_context = ldap_context...
# -*- coding: utf-8 -*- # Copyright (c) 2015 The Pycroft Authors. See the AUTHORS file. # This file is part of the Pycroft project and licensed under the terms of # the Apache License, Version 2.0. See the LICENSE file for details. from passlib.apps import ldap_context import passlib.utils ldap_context = ldap_context....
<commit_before># -*- coding: utf-8 -*- # Copyright (c) 2015 The Pycroft Authors. See the AUTHORS file. # This file is part of the Pycroft project and licensed under the terms of # the Apache License, Version 2.0. See the LICENSE file for details. from passlib.apps import ldap_context import passlib.utils ldap_context ...
5e60696e781b538bdffd9db15eca28b22ed3c705
myuw_mobile/views.py
myuw_mobile/views.py
from django.http import HttpResponseRedirect, HttpResponse from django.shortcuts import get_object_or_404, render_to_response from django.template import RequestContext import logging from myuw_api.sws_dao import Quarter from myuw_api.pws_dao import Person as PersonDAO logger = logging.getLogger('myuw_mobile.views') ...
from django.http import HttpResponseRedirect, HttpResponse from django.shortcuts import get_object_or_404, render_to_response from django.template import RequestContext from django.conf import settings import logging from myuw_api.sws_dao import Quarter from myuw_api.pws_dao import Person as PersonDAO logger = logging...
Allow javerage to persist as the user if debug is on, otherwise use request.user - allows this to work behind pubcookie/other auth
Allow javerage to persist as the user if debug is on, otherwise use request.user - allows this to work behind pubcookie/other auth
Python
apache-2.0
uw-it-aca/myuw,fanglinfang/myuw,uw-it-aca/myuw,uw-it-aca/myuw,fanglinfang/myuw,uw-it-aca/myuw,fanglinfang/myuw
from django.http import HttpResponseRedirect, HttpResponse from django.shortcuts import get_object_or_404, render_to_response from django.template import RequestContext import logging from myuw_api.sws_dao import Quarter from myuw_api.pws_dao import Person as PersonDAO logger = logging.getLogger('myuw_mobile.views') ...
from django.http import HttpResponseRedirect, HttpResponse from django.shortcuts import get_object_or_404, render_to_response from django.template import RequestContext from django.conf import settings import logging from myuw_api.sws_dao import Quarter from myuw_api.pws_dao import Person as PersonDAO logger = logging...
<commit_before>from django.http import HttpResponseRedirect, HttpResponse from django.shortcuts import get_object_or_404, render_to_response from django.template import RequestContext import logging from myuw_api.sws_dao import Quarter from myuw_api.pws_dao import Person as PersonDAO logger = logging.getLogger('myuw_m...
from django.http import HttpResponseRedirect, HttpResponse from django.shortcuts import get_object_or_404, render_to_response from django.template import RequestContext from django.conf import settings import logging from myuw_api.sws_dao import Quarter from myuw_api.pws_dao import Person as PersonDAO logger = logging...
from django.http import HttpResponseRedirect, HttpResponse from django.shortcuts import get_object_or_404, render_to_response from django.template import RequestContext import logging from myuw_api.sws_dao import Quarter from myuw_api.pws_dao import Person as PersonDAO logger = logging.getLogger('myuw_mobile.views') ...
<commit_before>from django.http import HttpResponseRedirect, HttpResponse from django.shortcuts import get_object_or_404, render_to_response from django.template import RequestContext import logging from myuw_api.sws_dao import Quarter from myuw_api.pws_dao import Person as PersonDAO logger = logging.getLogger('myuw_m...
a5409ca51e95b4d6ca99a63e0422ca1fe8d344f8
tags/templatetags/tags_tags.py
tags/templatetags/tags_tags.py
# -*- coding: utf8 -*- from __future__ import unicode_literals from __future__ import absolute_import from django import template from django.db.models.loading import get_model from ..models import CustomTag register = template.Library() @register.assignment_tag def get_obj_list(app, model, obj): ''' Retu...
# -*- coding: utf8 -*- from __future__ import unicode_literals from __future__ import absolute_import from django import template from django.core.exceptions import ObjectDoesNotExist from django.db.models.loading import get_model from django.http import Http404 from ..models import CustomTag register = template.Li...
Fix server error in tag search for non-existing tag.
Fix server error in tag search for non-existing tag.
Python
bsd-3-clause
ugoertz/django-familio,ugoertz/django-familio,ugoertz/django-familio,ugoertz/django-familio
# -*- coding: utf8 -*- from __future__ import unicode_literals from __future__ import absolute_import from django import template from django.db.models.loading import get_model from ..models import CustomTag register = template.Library() @register.assignment_tag def get_obj_list(app, model, obj): ''' Retu...
# -*- coding: utf8 -*- from __future__ import unicode_literals from __future__ import absolute_import from django import template from django.core.exceptions import ObjectDoesNotExist from django.db.models.loading import get_model from django.http import Http404 from ..models import CustomTag register = template.Li...
<commit_before># -*- coding: utf8 -*- from __future__ import unicode_literals from __future__ import absolute_import from django import template from django.db.models.loading import get_model from ..models import CustomTag register = template.Library() @register.assignment_tag def get_obj_list(app, model, obj): ...
# -*- coding: utf8 -*- from __future__ import unicode_literals from __future__ import absolute_import from django import template from django.core.exceptions import ObjectDoesNotExist from django.db.models.loading import get_model from django.http import Http404 from ..models import CustomTag register = template.Li...
# -*- coding: utf8 -*- from __future__ import unicode_literals from __future__ import absolute_import from django import template from django.db.models.loading import get_model from ..models import CustomTag register = template.Library() @register.assignment_tag def get_obj_list(app, model, obj): ''' Retu...
<commit_before># -*- coding: utf8 -*- from __future__ import unicode_literals from __future__ import absolute_import from django import template from django.db.models.loading import get_model from ..models import CustomTag register = template.Library() @register.assignment_tag def get_obj_list(app, model, obj): ...
33f1c68dbb0228cf995fb120f659fbad20968bf6
mopidy_dleyna/__init__.py
mopidy_dleyna/__init__.py
import os from mopidy import config, exceptions, ext __version__ = "1.2.2" class Extension(ext.Extension): dist_name = "Mopidy-dLeyna" ext_name = "dleyna" version = __version__ def get_default_config(self): return config.read(os.path.join(os.path.dirname(__file__), "ext.conf")) def ge...
import pathlib from mopidy import config, exceptions, ext __version__ = "1.2.2" class Extension(ext.Extension): dist_name = "Mopidy-dLeyna" ext_name = "dleyna" version = __version__ def get_default_config(self): return config.read(pathlib.Path(__file__).parent / "ext.conf") def get_co...
Use pathlib to read ext.conf
Use pathlib to read ext.conf
Python
apache-2.0
tkem/mopidy-dleyna
import os from mopidy import config, exceptions, ext __version__ = "1.2.2" class Extension(ext.Extension): dist_name = "Mopidy-dLeyna" ext_name = "dleyna" version = __version__ def get_default_config(self): return config.read(os.path.join(os.path.dirname(__file__), "ext.conf")) def ge...
import pathlib from mopidy import config, exceptions, ext __version__ = "1.2.2" class Extension(ext.Extension): dist_name = "Mopidy-dLeyna" ext_name = "dleyna" version = __version__ def get_default_config(self): return config.read(pathlib.Path(__file__).parent / "ext.conf") def get_co...
<commit_before>import os from mopidy import config, exceptions, ext __version__ = "1.2.2" class Extension(ext.Extension): dist_name = "Mopidy-dLeyna" ext_name = "dleyna" version = __version__ def get_default_config(self): return config.read(os.path.join(os.path.dirname(__file__), "ext.conf...
import pathlib from mopidy import config, exceptions, ext __version__ = "1.2.2" class Extension(ext.Extension): dist_name = "Mopidy-dLeyna" ext_name = "dleyna" version = __version__ def get_default_config(self): return config.read(pathlib.Path(__file__).parent / "ext.conf") def get_co...
import os from mopidy import config, exceptions, ext __version__ = "1.2.2" class Extension(ext.Extension): dist_name = "Mopidy-dLeyna" ext_name = "dleyna" version = __version__ def get_default_config(self): return config.read(os.path.join(os.path.dirname(__file__), "ext.conf")) def ge...
<commit_before>import os from mopidy import config, exceptions, ext __version__ = "1.2.2" class Extension(ext.Extension): dist_name = "Mopidy-dLeyna" ext_name = "dleyna" version = __version__ def get_default_config(self): return config.read(os.path.join(os.path.dirname(__file__), "ext.conf...
0f48c588e8f7f3a2a678b981d58df0e792bfdf1d
mopidy_pandora/pydora.py
mopidy_pandora/pydora.py
import logging import pandora logger = logging.getLogger(__name__) class MopidyPandoraAPIClient(pandora.APIClient): """Pydora API Client for Mopidy-Pandora This API client implements caching of the station list. """ def __init__(self, transport, partner_user, partner_password, device, ...
import logging import pandora logger = logging.getLogger(__name__) class MopidyPandoraAPIClient(pandora.APIClient): """Pydora API Client for Mopidy-Pandora This API client implements caching of the station list. """ def __init__(self, transport, partner_user, partner_password, device, ...
Remove superfluous override of 'get_playlist'.
Remove superfluous override of 'get_playlist'.
Python
apache-2.0
rectalogic/mopidy-pandora,jcass77/mopidy-pandora
import logging import pandora logger = logging.getLogger(__name__) class MopidyPandoraAPIClient(pandora.APIClient): """Pydora API Client for Mopidy-Pandora This API client implements caching of the station list. """ def __init__(self, transport, partner_user, partner_password, device, ...
import logging import pandora logger = logging.getLogger(__name__) class MopidyPandoraAPIClient(pandora.APIClient): """Pydora API Client for Mopidy-Pandora This API client implements caching of the station list. """ def __init__(self, transport, partner_user, partner_password, device, ...
<commit_before>import logging import pandora logger = logging.getLogger(__name__) class MopidyPandoraAPIClient(pandora.APIClient): """Pydora API Client for Mopidy-Pandora This API client implements caching of the station list. """ def __init__(self, transport, partner_user, partner_password, device...
import logging import pandora logger = logging.getLogger(__name__) class MopidyPandoraAPIClient(pandora.APIClient): """Pydora API Client for Mopidy-Pandora This API client implements caching of the station list. """ def __init__(self, transport, partner_user, partner_password, device, ...
import logging import pandora logger = logging.getLogger(__name__) class MopidyPandoraAPIClient(pandora.APIClient): """Pydora API Client for Mopidy-Pandora This API client implements caching of the station list. """ def __init__(self, transport, partner_user, partner_password, device, ...
<commit_before>import logging import pandora logger = logging.getLogger(__name__) class MopidyPandoraAPIClient(pandora.APIClient): """Pydora API Client for Mopidy-Pandora This API client implements caching of the station list. """ def __init__(self, transport, partner_user, partner_password, device...
ff187c82a0aa5d06c23a3a4a7974018a63699c6a
sir/indexing.py
sir/indexing.py
from . import querying from logging import getLogger logger = getLogger("sir") def index_entity(solr_connection, query, search_entity): """ Indexes a single entity type. :param solr.Solr solr_connection: :param sqlalchemy.orm.query.Query query: :param sir.schema.search_entity.SearchEntity searc...
from . import querying from logging import getLogger logger = getLogger("sir") def index_entity(solr_connection, query, search_entity): """ Indexes a single entity type. :param solr.Solr solr_connection: :param sqlalchemy.orm.query.Query query: :param sir.schema.searchentities.SearchEntity sear...
Fix a link in index_entity's docstring
Fix a link in index_entity's docstring
Python
mit
jeffweeksio/sir
from . import querying from logging import getLogger logger = getLogger("sir") def index_entity(solr_connection, query, search_entity): """ Indexes a single entity type. :param solr.Solr solr_connection: :param sqlalchemy.orm.query.Query query: :param sir.schema.search_entity.SearchEntity searc...
from . import querying from logging import getLogger logger = getLogger("sir") def index_entity(solr_connection, query, search_entity): """ Indexes a single entity type. :param solr.Solr solr_connection: :param sqlalchemy.orm.query.Query query: :param sir.schema.searchentities.SearchEntity sear...
<commit_before>from . import querying from logging import getLogger logger = getLogger("sir") def index_entity(solr_connection, query, search_entity): """ Indexes a single entity type. :param solr.Solr solr_connection: :param sqlalchemy.orm.query.Query query: :param sir.schema.search_entity.Sea...
from . import querying from logging import getLogger logger = getLogger("sir") def index_entity(solr_connection, query, search_entity): """ Indexes a single entity type. :param solr.Solr solr_connection: :param sqlalchemy.orm.query.Query query: :param sir.schema.searchentities.SearchEntity sear...
from . import querying from logging import getLogger logger = getLogger("sir") def index_entity(solr_connection, query, search_entity): """ Indexes a single entity type. :param solr.Solr solr_connection: :param sqlalchemy.orm.query.Query query: :param sir.schema.search_entity.SearchEntity searc...
<commit_before>from . import querying from logging import getLogger logger = getLogger("sir") def index_entity(solr_connection, query, search_entity): """ Indexes a single entity type. :param solr.Solr solr_connection: :param sqlalchemy.orm.query.Query query: :param sir.schema.search_entity.Sea...
5c435749b043f0605e9d1b5279a5a8fd4a5a1c25
pyfolio/tests/test_nbs.py
pyfolio/tests/test_nbs.py
#!/usr/bin/env python """ simple example script for running notebooks and reporting exceptions. Usage: `checkipnb.py foo.ipynb [bar.ipynb [...]]` Each cell is submitted to the kernel, and checked for errors. """ import os import glob from runipy.notebook_runner import NotebookRunner from IPython.nbformat.current impor...
#!/usr/bin/env python """ simple example script for running notebooks and reporting exceptions. Usage: `checkipnb.py foo.ipynb [bar.ipynb [...]]` Each cell is submitted to the kernel, and checked for errors. """ import os import glob from runipy.notebook_runner import NotebookRunner from IPython.nbformat.current impor...
Make nb_tests for bayesian optional because PyMC3 is not a hard dependency
TST: Make nb_tests for bayesian optional because PyMC3 is not a hard dependency
Python
apache-2.0
ChinaQuants/pyfolio,chayapan/pyfolio,ChinaQuants/pyfolio,quantopian/pyfolio,YihaoLu/pyfolio,quantopian/pyfolio,femtotrader/pyfolio,femtotrader/pyfolio,YihaoLu/pyfolio
#!/usr/bin/env python """ simple example script for running notebooks and reporting exceptions. Usage: `checkipnb.py foo.ipynb [bar.ipynb [...]]` Each cell is submitted to the kernel, and checked for errors. """ import os import glob from runipy.notebook_runner import NotebookRunner from IPython.nbformat.current impor...
#!/usr/bin/env python """ simple example script for running notebooks and reporting exceptions. Usage: `checkipnb.py foo.ipynb [bar.ipynb [...]]` Each cell is submitted to the kernel, and checked for errors. """ import os import glob from runipy.notebook_runner import NotebookRunner from IPython.nbformat.current impor...
<commit_before>#!/usr/bin/env python """ simple example script for running notebooks and reporting exceptions. Usage: `checkipnb.py foo.ipynb [bar.ipynb [...]]` Each cell is submitted to the kernel, and checked for errors. """ import os import glob from runipy.notebook_runner import NotebookRunner from IPython.nbforma...
#!/usr/bin/env python """ simple example script for running notebooks and reporting exceptions. Usage: `checkipnb.py foo.ipynb [bar.ipynb [...]]` Each cell is submitted to the kernel, and checked for errors. """ import os import glob from runipy.notebook_runner import NotebookRunner from IPython.nbformat.current impor...
#!/usr/bin/env python """ simple example script for running notebooks and reporting exceptions. Usage: `checkipnb.py foo.ipynb [bar.ipynb [...]]` Each cell is submitted to the kernel, and checked for errors. """ import os import glob from runipy.notebook_runner import NotebookRunner from IPython.nbformat.current impor...
<commit_before>#!/usr/bin/env python """ simple example script for running notebooks and reporting exceptions. Usage: `checkipnb.py foo.ipynb [bar.ipynb [...]]` Each cell is submitted to the kernel, and checked for errors. """ import os import glob from runipy.notebook_runner import NotebookRunner from IPython.nbforma...
572feef82f113e25b480ea8428f36ca0f7510fc3
getwords.py
getwords.py
from subprocess import getoutput from random import randrange from filelock import FileLock DICT_PATH = './dict.txt' OOPS_SEEK_TOO_FAR = 48 DICT_LENGTH = 61973 # don't run on OS X def randomize(): out = getoutput('sort -R ' + DICT_PATH) with FileLock(DICT_PATH): with open(DICT_PATH, 'w') as f: ...
from subprocess import getoutput from random import randrange from filelock import FileLock LOCK_PATH = '/tmp/ifixit_dict.lock' DICT_PATH = './dict.txt' OOPS_SEEK_TOO_FAR = 48 DICT_LENGTH = 61973 # don't run on OS X def randomize(): out = getoutput('sort -R ' + DICT_PATH) with FileLock(LOCK_PATH): ...
Use a separate lock path
Use a separate lock path
Python
mit
DeltaHeavy/wrath-ctf-framework,DeltaHeavy/wrath-ctf-framework,WhiteHatCP/wrath-ctf-framework,DeltaHeavy/wrath-ctf-framework,DeltaHeavy/wrath-ctf-framework,WhiteHatCP/wrath-ctf-framework,WhiteHatCP/wrath-ctf-framework,WhiteHatCP/wrath-ctf-framework
from subprocess import getoutput from random import randrange from filelock import FileLock DICT_PATH = './dict.txt' OOPS_SEEK_TOO_FAR = 48 DICT_LENGTH = 61973 # don't run on OS X def randomize(): out = getoutput('sort -R ' + DICT_PATH) with FileLock(DICT_PATH): with open(DICT_PATH, 'w') as f: ...
from subprocess import getoutput from random import randrange from filelock import FileLock LOCK_PATH = '/tmp/ifixit_dict.lock' DICT_PATH = './dict.txt' OOPS_SEEK_TOO_FAR = 48 DICT_LENGTH = 61973 # don't run on OS X def randomize(): out = getoutput('sort -R ' + DICT_PATH) with FileLock(LOCK_PATH): ...
<commit_before>from subprocess import getoutput from random import randrange from filelock import FileLock DICT_PATH = './dict.txt' OOPS_SEEK_TOO_FAR = 48 DICT_LENGTH = 61973 # don't run on OS X def randomize(): out = getoutput('sort -R ' + DICT_PATH) with FileLock(DICT_PATH): with open(DICT_PATH, ...
from subprocess import getoutput from random import randrange from filelock import FileLock LOCK_PATH = '/tmp/ifixit_dict.lock' DICT_PATH = './dict.txt' OOPS_SEEK_TOO_FAR = 48 DICT_LENGTH = 61973 # don't run on OS X def randomize(): out = getoutput('sort -R ' + DICT_PATH) with FileLock(LOCK_PATH): ...
from subprocess import getoutput from random import randrange from filelock import FileLock DICT_PATH = './dict.txt' OOPS_SEEK_TOO_FAR = 48 DICT_LENGTH = 61973 # don't run on OS X def randomize(): out = getoutput('sort -R ' + DICT_PATH) with FileLock(DICT_PATH): with open(DICT_PATH, 'w') as f: ...
<commit_before>from subprocess import getoutput from random import randrange from filelock import FileLock DICT_PATH = './dict.txt' OOPS_SEEK_TOO_FAR = 48 DICT_LENGTH = 61973 # don't run on OS X def randomize(): out = getoutput('sort -R ' + DICT_PATH) with FileLock(DICT_PATH): with open(DICT_PATH, ...
893f1724321fd9d4b25e6ddaac5749bdadecbabd
python_apps/pypo/setup.py
python_apps/pypo/setup.py
import os from setuptools import setup # Change directory since setuptools uses relative paths os.chdir(os.path.dirname(os.path.realpath(__file__))) setup( name="airtime-playout", version="1.0", description="LibreTime Playout", author="LibreTime Contributors", url="https://github.com/libretime/li...
from os import chdir from pathlib import Path from setuptools import setup # Change directory since setuptools uses relative paths here = Path(__file__).parent chdir(here) setup( name="airtime-playout", version="1.0", description="LibreTime Playout", author="LibreTime Contributors", url="https://...
Add local api_client dependency to playout
Add local api_client dependency to playout
Python
agpl-3.0
LibreTime/libretime,LibreTime/libretime,LibreTime/libretime,LibreTime/libretime,LibreTime/libretime,LibreTime/libretime
import os from setuptools import setup # Change directory since setuptools uses relative paths os.chdir(os.path.dirname(os.path.realpath(__file__))) setup( name="airtime-playout", version="1.0", description="LibreTime Playout", author="LibreTime Contributors", url="https://github.com/libretime/li...
from os import chdir from pathlib import Path from setuptools import setup # Change directory since setuptools uses relative paths here = Path(__file__).parent chdir(here) setup( name="airtime-playout", version="1.0", description="LibreTime Playout", author="LibreTime Contributors", url="https://...
<commit_before>import os from setuptools import setup # Change directory since setuptools uses relative paths os.chdir(os.path.dirname(os.path.realpath(__file__))) setup( name="airtime-playout", version="1.0", description="LibreTime Playout", author="LibreTime Contributors", url="https://github.c...
from os import chdir from pathlib import Path from setuptools import setup # Change directory since setuptools uses relative paths here = Path(__file__).parent chdir(here) setup( name="airtime-playout", version="1.0", description="LibreTime Playout", author="LibreTime Contributors", url="https://...
import os from setuptools import setup # Change directory since setuptools uses relative paths os.chdir(os.path.dirname(os.path.realpath(__file__))) setup( name="airtime-playout", version="1.0", description="LibreTime Playout", author="LibreTime Contributors", url="https://github.com/libretime/li...
<commit_before>import os from setuptools import setup # Change directory since setuptools uses relative paths os.chdir(os.path.dirname(os.path.realpath(__file__))) setup( name="airtime-playout", version="1.0", description="LibreTime Playout", author="LibreTime Contributors", url="https://github.c...
b776a05c8bb57d63259263c985883422f56298c7
pyvac/helpers/calendar.py
pyvac/helpers/calendar.py
import logging import caldav from dateutil.relativedelta import relativedelta log = logging.getLogger(__file__) def addToCal(url, date_from, date_end, summary): """ Add entry in calendar to period date_from, date_end """ vcal_entry = """BEGIN:VCALENDAR VERSION:2.0 PRODID:Pyvac Calendar BEGIN:VEVENT SUMMARY:...
import urllib import logging import caldav from dateutil.relativedelta import relativedelta log = logging.getLogger(__file__) def addToCal(url, date_from, date_end, summary): """ Add entry in calendar to period date_from, date_end """ vcal_entry = """BEGIN:VCALENDAR VERSION:2.0 PRODID:Pyvac Calendar BEGIN:V...
Fix bug with ics url format with latest vobject version
Fix bug with ics url format with latest vobject version
Python
bsd-3-clause
sayoun/pyvac,sayoun/pyvac,sayoun/pyvac
import logging import caldav from dateutil.relativedelta import relativedelta log = logging.getLogger(__file__) def addToCal(url, date_from, date_end, summary): """ Add entry in calendar to period date_from, date_end """ vcal_entry = """BEGIN:VCALENDAR VERSION:2.0 PRODID:Pyvac Calendar BEGIN:VEVENT SUMMARY:...
import urllib import logging import caldav from dateutil.relativedelta import relativedelta log = logging.getLogger(__file__) def addToCal(url, date_from, date_end, summary): """ Add entry in calendar to period date_from, date_end """ vcal_entry = """BEGIN:VCALENDAR VERSION:2.0 PRODID:Pyvac Calendar BEGIN:V...
<commit_before>import logging import caldav from dateutil.relativedelta import relativedelta log = logging.getLogger(__file__) def addToCal(url, date_from, date_end, summary): """ Add entry in calendar to period date_from, date_end """ vcal_entry = """BEGIN:VCALENDAR VERSION:2.0 PRODID:Pyvac Calendar BEGIN:...
import urllib import logging import caldav from dateutil.relativedelta import relativedelta log = logging.getLogger(__file__) def addToCal(url, date_from, date_end, summary): """ Add entry in calendar to period date_from, date_end """ vcal_entry = """BEGIN:VCALENDAR VERSION:2.0 PRODID:Pyvac Calendar BEGIN:V...
import logging import caldav from dateutil.relativedelta import relativedelta log = logging.getLogger(__file__) def addToCal(url, date_from, date_end, summary): """ Add entry in calendar to period date_from, date_end """ vcal_entry = """BEGIN:VCALENDAR VERSION:2.0 PRODID:Pyvac Calendar BEGIN:VEVENT SUMMARY:...
<commit_before>import logging import caldav from dateutil.relativedelta import relativedelta log = logging.getLogger(__file__) def addToCal(url, date_from, date_end, summary): """ Add entry in calendar to period date_from, date_end """ vcal_entry = """BEGIN:VCALENDAR VERSION:2.0 PRODID:Pyvac Calendar BEGIN:...
a5cd7e2bea66003c1223891853077e47df24b7cf
vx_intro.py
vx_intro.py
import vx import math from sys import argv _tick_functions = [] def _register_tick_function(f, front=False): if front: _tick_functions.insert(0, f) else: _tick_functions.append(f) def _tick(): for f in _tick_functions: f() vx.my_vx = _tick vx.register_tick_function = _register_tic...
import vx import math import os import sys _tick_functions = [] def _register_tick_function(f, front=False): if front: _tick_functions.insert(0, f) else: _tick_functions.append(f) def _tick(): for f in _tick_functions: f() vx.my_vx = _tick vx.register_tick_function = _register_tic...
Add ~/.python to PYTHONPATH and import rc
Add ~/.python to PYTHONPATH and import rc
Python
mit
philipdexter/vx,philipdexter/vx
import vx import math from sys import argv _tick_functions = [] def _register_tick_function(f, front=False): if front: _tick_functions.insert(0, f) else: _tick_functions.append(f) def _tick(): for f in _tick_functions: f() vx.my_vx = _tick vx.register_tick_function = _register_tic...
import vx import math import os import sys _tick_functions = [] def _register_tick_function(f, front=False): if front: _tick_functions.insert(0, f) else: _tick_functions.append(f) def _tick(): for f in _tick_functions: f() vx.my_vx = _tick vx.register_tick_function = _register_tic...
<commit_before>import vx import math from sys import argv _tick_functions = [] def _register_tick_function(f, front=False): if front: _tick_functions.insert(0, f) else: _tick_functions.append(f) def _tick(): for f in _tick_functions: f() vx.my_vx = _tick vx.register_tick_function ...
import vx import math import os import sys _tick_functions = [] def _register_tick_function(f, front=False): if front: _tick_functions.insert(0, f) else: _tick_functions.append(f) def _tick(): for f in _tick_functions: f() vx.my_vx = _tick vx.register_tick_function = _register_tic...
import vx import math from sys import argv _tick_functions = [] def _register_tick_function(f, front=False): if front: _tick_functions.insert(0, f) else: _tick_functions.append(f) def _tick(): for f in _tick_functions: f() vx.my_vx = _tick vx.register_tick_function = _register_tic...
<commit_before>import vx import math from sys import argv _tick_functions = [] def _register_tick_function(f, front=False): if front: _tick_functions.insert(0, f) else: _tick_functions.append(f) def _tick(): for f in _tick_functions: f() vx.my_vx = _tick vx.register_tick_function ...
0064ce135507df6ec5d5e3b70240b7483f2f9025
polygraph/types/tests/test_union.py
polygraph/types/tests/test_union.py
from unittest import TestCase, skip from polygraph.exceptions import PolygraphValueError from polygraph.types.basic_type import Union from polygraph.types.scalar import Float, Int, String @skip # FIXME class UnionTypeTest(TestCase): def test_commutativity(self): self.assertEqual(Union(String, Int), Unio...
from unittest import TestCase, skip from polygraph.exceptions import PolygraphValueError from polygraph.types.basic_type import Union from polygraph.types.scalar import Float, Int, String # @skip # FIXME class UnionTypeTest(TestCase): def test_commutativity(self): self.assertEqual(Union(String, Int), Un...
Add failing tests for type equality
Add failing tests for type equality
Python
mit
polygraph-python/polygraph
from unittest import TestCase, skip from polygraph.exceptions import PolygraphValueError from polygraph.types.basic_type import Union from polygraph.types.scalar import Float, Int, String @skip # FIXME class UnionTypeTest(TestCase): def test_commutativity(self): self.assertEqual(Union(String, Int), Unio...
from unittest import TestCase, skip from polygraph.exceptions import PolygraphValueError from polygraph.types.basic_type import Union from polygraph.types.scalar import Float, Int, String # @skip # FIXME class UnionTypeTest(TestCase): def test_commutativity(self): self.assertEqual(Union(String, Int), Un...
<commit_before>from unittest import TestCase, skip from polygraph.exceptions import PolygraphValueError from polygraph.types.basic_type import Union from polygraph.types.scalar import Float, Int, String @skip # FIXME class UnionTypeTest(TestCase): def test_commutativity(self): self.assertEqual(Union(Str...
from unittest import TestCase, skip from polygraph.exceptions import PolygraphValueError from polygraph.types.basic_type import Union from polygraph.types.scalar import Float, Int, String # @skip # FIXME class UnionTypeTest(TestCase): def test_commutativity(self): self.assertEqual(Union(String, Int), Un...
from unittest import TestCase, skip from polygraph.exceptions import PolygraphValueError from polygraph.types.basic_type import Union from polygraph.types.scalar import Float, Int, String @skip # FIXME class UnionTypeTest(TestCase): def test_commutativity(self): self.assertEqual(Union(String, Int), Unio...
<commit_before>from unittest import TestCase, skip from polygraph.exceptions import PolygraphValueError from polygraph.types.basic_type import Union from polygraph.types.scalar import Float, Int, String @skip # FIXME class UnionTypeTest(TestCase): def test_commutativity(self): self.assertEqual(Union(Str...
b9d5c21a1c18fafd205e6fdc931b82cad6875bc8
unit_tests/test_ccs.py
unit_tests/test_ccs.py
#!/usr/bin/env python3 import pytest import sys # This line allows the tests to run if you just naively run this script. # But the preferred way is to use run_tests.sh sys.path.insert(0,'../MultiQC') from multiqc.modules.ccs.ccs import parse_PacBio_log, parse_line PARSABLE_LINES = [ '', 'ZMWs input...
#!/usr/bin/env python3 import pytest import sys # This line allows the tests to run if you just naively run this script. # But the preferred way is to use run_tests.sh sys.path.insert(0,'../MultiQC') from multiqc.modules.ccs.ccs import parse_PacBio_log, parse_line PARSABLE_LINES = [ '', 'ZMWs input...
Add tests for parsing percentages
Add tests for parsing percentages
Python
mit
ewels/MultiQC_TestData,ewels/MultiQC_TestData,ewels/MultiQC_TestData,ewels/MultiQC_TestData,ewels/MultiQC_TestData
#!/usr/bin/env python3 import pytest import sys # This line allows the tests to run if you just naively run this script. # But the preferred way is to use run_tests.sh sys.path.insert(0,'../MultiQC') from multiqc.modules.ccs.ccs import parse_PacBio_log, parse_line PARSABLE_LINES = [ '', 'ZMWs input...
#!/usr/bin/env python3 import pytest import sys # This line allows the tests to run if you just naively run this script. # But the preferred way is to use run_tests.sh sys.path.insert(0,'../MultiQC') from multiqc.modules.ccs.ccs import parse_PacBio_log, parse_line PARSABLE_LINES = [ '', 'ZMWs input...
<commit_before>#!/usr/bin/env python3 import pytest import sys # This line allows the tests to run if you just naively run this script. # But the preferred way is to use run_tests.sh sys.path.insert(0,'../MultiQC') from multiqc.modules.ccs.ccs import parse_PacBio_log, parse_line PARSABLE_LINES = [ '', ...
#!/usr/bin/env python3 import pytest import sys # This line allows the tests to run if you just naively run this script. # But the preferred way is to use run_tests.sh sys.path.insert(0,'../MultiQC') from multiqc.modules.ccs.ccs import parse_PacBio_log, parse_line PARSABLE_LINES = [ '', 'ZMWs input...
#!/usr/bin/env python3 import pytest import sys # This line allows the tests to run if you just naively run this script. # But the preferred way is to use run_tests.sh sys.path.insert(0,'../MultiQC') from multiqc.modules.ccs.ccs import parse_PacBio_log, parse_line PARSABLE_LINES = [ '', 'ZMWs input...
<commit_before>#!/usr/bin/env python3 import pytest import sys # This line allows the tests to run if you just naively run this script. # But the preferred way is to use run_tests.sh sys.path.insert(0,'../MultiQC') from multiqc.modules.ccs.ccs import parse_PacBio_log, parse_line PARSABLE_LINES = [ '', ...
43a54b9d8e753f721619aa5fcecec39eb4ca6eff
django_amber/utils.py
django_amber/utils.py
from multiprocessing import Process from time import sleep from socket import socket import requests from django.core.management import call_command from django.core.management.commands.runserver import Command as RunserverCommand default_port = RunserverCommand.default_port def run_runserver_in_process(port=defa...
from multiprocessing import Process from time import sleep from socket import socket import traceback import requests from django.core.management import call_command from django.core.management.commands.runserver import Command as RunserverCommand default_port = RunserverCommand.default_port def run_runserver_in_...
Add logging and increase timeout
Add logging and increase timeout
Python
mit
PyconUK/2017.pyconuk.org,PyconUK/2017.pyconuk.org,PyconUK/2017.pyconuk.org
from multiprocessing import Process from time import sleep from socket import socket import requests from django.core.management import call_command from django.core.management.commands.runserver import Command as RunserverCommand default_port = RunserverCommand.default_port def run_runserver_in_process(port=defa...
from multiprocessing import Process from time import sleep from socket import socket import traceback import requests from django.core.management import call_command from django.core.management.commands.runserver import Command as RunserverCommand default_port = RunserverCommand.default_port def run_runserver_in_...
<commit_before>from multiprocessing import Process from time import sleep from socket import socket import requests from django.core.management import call_command from django.core.management.commands.runserver import Command as RunserverCommand default_port = RunserverCommand.default_port def run_runserver_in_pr...
from multiprocessing import Process from time import sleep from socket import socket import traceback import requests from django.core.management import call_command from django.core.management.commands.runserver import Command as RunserverCommand default_port = RunserverCommand.default_port def run_runserver_in_...
from multiprocessing import Process from time import sleep from socket import socket import requests from django.core.management import call_command from django.core.management.commands.runserver import Command as RunserverCommand default_port = RunserverCommand.default_port def run_runserver_in_process(port=defa...
<commit_before>from multiprocessing import Process from time import sleep from socket import socket import requests from django.core.management import call_command from django.core.management.commands.runserver import Command as RunserverCommand default_port = RunserverCommand.default_port def run_runserver_in_pr...
5254e31d2309aa21b347d854293084eefddaa465
virtool/error_pages.py
virtool/error_pages.py
from aiohttp import web from mako.template import Template from virtool.utils import get_static_hash template_500 = Template(filename="virtool/templates/error_500.html") async def middleware_factory(app, handler): async def middleware_handler(request): try: response = await handler(request)...
from aiohttp import web from mako.template import Template from virtool.utils import get_static_hash template_500 = Template(filename="virtool/templates/error_500.html") async def middleware_factory(app, handler): async def middleware_handler(request): is_api_call = request.path.startswith("/api") ...
Make HTTPExceptions return errors for /api calls
Make HTTPExceptions return errors for /api calls
Python
mit
virtool/virtool,virtool/virtool,igboyes/virtool,igboyes/virtool
from aiohttp import web from mako.template import Template from virtool.utils import get_static_hash template_500 = Template(filename="virtool/templates/error_500.html") async def middleware_factory(app, handler): async def middleware_handler(request): try: response = await handler(request)...
from aiohttp import web from mako.template import Template from virtool.utils import get_static_hash template_500 = Template(filename="virtool/templates/error_500.html") async def middleware_factory(app, handler): async def middleware_handler(request): is_api_call = request.path.startswith("/api") ...
<commit_before>from aiohttp import web from mako.template import Template from virtool.utils import get_static_hash template_500 = Template(filename="virtool/templates/error_500.html") async def middleware_factory(app, handler): async def middleware_handler(request): try: response = await h...
from aiohttp import web from mako.template import Template from virtool.utils import get_static_hash template_500 = Template(filename="virtool/templates/error_500.html") async def middleware_factory(app, handler): async def middleware_handler(request): is_api_call = request.path.startswith("/api") ...
from aiohttp import web from mako.template import Template from virtool.utils import get_static_hash template_500 = Template(filename="virtool/templates/error_500.html") async def middleware_factory(app, handler): async def middleware_handler(request): try: response = await handler(request)...
<commit_before>from aiohttp import web from mako.template import Template from virtool.utils import get_static_hash template_500 = Template(filename="virtool/templates/error_500.html") async def middleware_factory(app, handler): async def middleware_handler(request): try: response = await h...
6e31ee3aba81e0cafe3b95d1eefd8b0d30d956d1
manual_test.py
manual_test.py
def output(arg): print("MANUAL: arg=", arg) def main(): for abc in range(10): import ipdb; ipdb.set_trace() output(abc) # code to test with nose import unittest class IpdbUsageTests(unittest.TestCase): def testMain(self): main() if __name__ == "__main__": main()
def output(arg): print("MANUAL: arg=%s" % arg) def main(): for abc in range(10): import ipdb; ipdb.set_trace() output(abc) # code to test with nose import unittest class IpdbUsageTests(unittest.TestCase): def testMain(self): main() if __name__ == "__main__": main()
Update 2to3 output to use string substitution.
Update 2to3 output to use string substitution.
Python
bsd-3-clause
michelesr/ipdb
def output(arg): print("MANUAL: arg=", arg) def main(): for abc in range(10): import ipdb; ipdb.set_trace() output(abc) # code to test with nose import unittest class IpdbUsageTests(unittest.TestCase): def testMain(self): main() if __name__ == "__main__": main() Update 2t...
def output(arg): print("MANUAL: arg=%s" % arg) def main(): for abc in range(10): import ipdb; ipdb.set_trace() output(abc) # code to test with nose import unittest class IpdbUsageTests(unittest.TestCase): def testMain(self): main() if __name__ == "__main__": main()
<commit_before>def output(arg): print("MANUAL: arg=", arg) def main(): for abc in range(10): import ipdb; ipdb.set_trace() output(abc) # code to test with nose import unittest class IpdbUsageTests(unittest.TestCase): def testMain(self): main() if __name__ == "__main__": m...
def output(arg): print("MANUAL: arg=%s" % arg) def main(): for abc in range(10): import ipdb; ipdb.set_trace() output(abc) # code to test with nose import unittest class IpdbUsageTests(unittest.TestCase): def testMain(self): main() if __name__ == "__main__": main()
def output(arg): print("MANUAL: arg=", arg) def main(): for abc in range(10): import ipdb; ipdb.set_trace() output(abc) # code to test with nose import unittest class IpdbUsageTests(unittest.TestCase): def testMain(self): main() if __name__ == "__main__": main() Update 2t...
<commit_before>def output(arg): print("MANUAL: arg=", arg) def main(): for abc in range(10): import ipdb; ipdb.set_trace() output(abc) # code to test with nose import unittest class IpdbUsageTests(unittest.TestCase): def testMain(self): main() if __name__ == "__main__": m...
41ed48324354ba9e4263c4085c44902d983835fe
telemetry/telemetry/core/platform/factory.py
telemetry/telemetry/core/platform/factory.py
# Copyright 2014 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. import sys from telemetry import decorators from telemetry.core.platform import linux_platform_backend from telemetry.core.platform import mac_platform_back...
# Copyright 2014 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. import sys from telemetry import decorators from telemetry.core.platform import linux_platform_backend from telemetry.core.platform import mac_platform_back...
Enable sandbox on OS X page cyclers
[Telemetry] Enable sandbox on OS X page cyclers The sandbox is disabled when running the page cyclers because it interferes with collecting IO stats on some platforms. The sandbox does not interfere with IO stat collection on OS X.. BUG=361049 Review URL: https://codereview.chromium.org/176603002 git-svn-id: de016...
Python
bsd-3-clause
SummerLW/Perf-Insight-Report,catapult-project/catapult,benschmaus/catapult,sahiljain/catapult,benschmaus/catapult,benschmaus/catapult,catapult-project/catapult-csm,catapult-project/catapult,benschmaus/catapult,catapult-project/catapult-csm,catapult-project/catapult,sahiljain/catapult,sahiljain/catapult,benschmaus/catap...
# Copyright 2014 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. import sys from telemetry import decorators from telemetry.core.platform import linux_platform_backend from telemetry.core.platform import mac_platform_back...
# Copyright 2014 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. import sys from telemetry import decorators from telemetry.core.platform import linux_platform_backend from telemetry.core.platform import mac_platform_back...
<commit_before># Copyright 2014 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. import sys from telemetry import decorators from telemetry.core.platform import linux_platform_backend from telemetry.core.platform import ma...
# Copyright 2014 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. import sys from telemetry import decorators from telemetry.core.platform import linux_platform_backend from telemetry.core.platform import mac_platform_back...
# Copyright 2014 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. import sys from telemetry import decorators from telemetry.core.platform import linux_platform_backend from telemetry.core.platform import mac_platform_back...
<commit_before># Copyright 2014 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. import sys from telemetry import decorators from telemetry.core.platform import linux_platform_backend from telemetry.core.platform import ma...
90a265c9c673856a6f119ab04bbd5d57ab375dc6
django_fsm_log/models.py
django_fsm_log/models.py
from __future__ import unicode_literals from django.conf import settings from django.contrib.contenttypes.generic import GenericForeignKey from django.contrib.contenttypes.models import ContentType from django.db import models from django_fsm.signals import post_transition from .managers import StateLogManager cla...
from __future__ import unicode_literals from django.conf import settings from django.contrib.contenttypes.generic import GenericForeignKey from django.contrib.contenttypes.models import ContentType from django.db import models from django.utils.timezone import now from django_fsm.signals import post_transition from ...
Switch from auto_now_add=True to default=now
Switch from auto_now_add=True to default=now This allows for optional direct setting of the timestamp, eg when loading fixtures.
Python
mit
ticosax/django-fsm-log,blueyed/django-fsm-log,Andrey86/django-fsm-log,gizmag/django-fsm-log,fjcapdevila/django-fsm-log,mord4z/django-fsm-log,pombredanne/django-fsm-log
from __future__ import unicode_literals from django.conf import settings from django.contrib.contenttypes.generic import GenericForeignKey from django.contrib.contenttypes.models import ContentType from django.db import models from django_fsm.signals import post_transition from .managers import StateLogManager cla...
from __future__ import unicode_literals from django.conf import settings from django.contrib.contenttypes.generic import GenericForeignKey from django.contrib.contenttypes.models import ContentType from django.db import models from django.utils.timezone import now from django_fsm.signals import post_transition from ...
<commit_before>from __future__ import unicode_literals from django.conf import settings from django.contrib.contenttypes.generic import GenericForeignKey from django.contrib.contenttypes.models import ContentType from django.db import models from django_fsm.signals import post_transition from .managers import StateL...
from __future__ import unicode_literals from django.conf import settings from django.contrib.contenttypes.generic import GenericForeignKey from django.contrib.contenttypes.models import ContentType from django.db import models from django.utils.timezone import now from django_fsm.signals import post_transition from ...
from __future__ import unicode_literals from django.conf import settings from django.contrib.contenttypes.generic import GenericForeignKey from django.contrib.contenttypes.models import ContentType from django.db import models from django_fsm.signals import post_transition from .managers import StateLogManager cla...
<commit_before>from __future__ import unicode_literals from django.conf import settings from django.contrib.contenttypes.generic import GenericForeignKey from django.contrib.contenttypes.models import ContentType from django.db import models from django_fsm.signals import post_transition from .managers import StateL...
2359b65a59b5326a07768578469177d65bbddf6e
celery/__init__.py
celery/__init__.py
"""Distributed Task Queue""" from celery.distmeta import __version__, __author__, __contact__ from celery.distmeta import __homepage__, __docformat__ from celery.distmeta import VERSION, is_stable_release, version_with_meta
"""Distributed Task Queue""" from celery.distmeta import (__version__, __author__, __contact__, __homepage__, __docformat__, VERSION, is_stable_release, version_with_meta)
Use from .. import (...) parens
Use from .. import (...) parens
Python
bsd-3-clause
frac/celery,cbrepo/celery,frac/celery,WoLpH/celery,WoLpH/celery,ask/celery,mitsuhiko/celery,cbrepo/celery,ask/celery,mitsuhiko/celery
"""Distributed Task Queue""" from celery.distmeta import __version__, __author__, __contact__ from celery.distmeta import __homepage__, __docformat__ from celery.distmeta import VERSION, is_stable_release, version_with_meta Use from .. import (...) parens
"""Distributed Task Queue""" from celery.distmeta import (__version__, __author__, __contact__, __homepage__, __docformat__, VERSION, is_stable_release, version_with_meta)
<commit_before>"""Distributed Task Queue""" from celery.distmeta import __version__, __author__, __contact__ from celery.distmeta import __homepage__, __docformat__ from celery.distmeta import VERSION, is_stable_release, version_with_meta <commit_msg>Use from .. import (...) parens<commit_after>
"""Distributed Task Queue""" from celery.distmeta import (__version__, __author__, __contact__, __homepage__, __docformat__, VERSION, is_stable_release, version_with_meta)
"""Distributed Task Queue""" from celery.distmeta import __version__, __author__, __contact__ from celery.distmeta import __homepage__, __docformat__ from celery.distmeta import VERSION, is_stable_release, version_with_meta Use from .. import (...) parens"""Distributed Task Queue""" from celery.distmeta import (__versi...
<commit_before>"""Distributed Task Queue""" from celery.distmeta import __version__, __author__, __contact__ from celery.distmeta import __homepage__, __docformat__ from celery.distmeta import VERSION, is_stable_release, version_with_meta <commit_msg>Use from .. import (...) parens<commit_after>"""Distributed Task Queu...
610c979d00b3b89f3f2b16d58e4b2a797b380d41
tests/fixtures/postgres.py
tests/fixtures/postgres.py
import pytest from sqlalchemy import text from sqlalchemy.exc import ProgrammingError from sqlalchemy.ext.asyncio import create_async_engine from sqlalchemy.ext.asyncio import AsyncSession from virtool.postgres import Base @pytest.fixture def test_pg_connection_string(request): return request.config.getoption("...
import pytest from sqlalchemy import text from sqlalchemy.exc import ProgrammingError from sqlalchemy.ext.asyncio import create_async_engine from sqlalchemy.ext.asyncio import AsyncSession from virtool.postgres import Base @pytest.fixture def test_pg_connection_string(request): return request.config.getoption("...
Add connection string for connecting to virtool database in order to create a test database
Add connection string for connecting to virtool database in order to create a test database
Python
mit
igboyes/virtool,virtool/virtool,igboyes/virtool,virtool/virtool
import pytest from sqlalchemy import text from sqlalchemy.exc import ProgrammingError from sqlalchemy.ext.asyncio import create_async_engine from sqlalchemy.ext.asyncio import AsyncSession from virtool.postgres import Base @pytest.fixture def test_pg_connection_string(request): return request.config.getoption("...
import pytest from sqlalchemy import text from sqlalchemy.exc import ProgrammingError from sqlalchemy.ext.asyncio import create_async_engine from sqlalchemy.ext.asyncio import AsyncSession from virtool.postgres import Base @pytest.fixture def test_pg_connection_string(request): return request.config.getoption("...
<commit_before>import pytest from sqlalchemy import text from sqlalchemy.exc import ProgrammingError from sqlalchemy.ext.asyncio import create_async_engine from sqlalchemy.ext.asyncio import AsyncSession from virtool.postgres import Base @pytest.fixture def test_pg_connection_string(request): return request.con...
import pytest from sqlalchemy import text from sqlalchemy.exc import ProgrammingError from sqlalchemy.ext.asyncio import create_async_engine from sqlalchemy.ext.asyncio import AsyncSession from virtool.postgres import Base @pytest.fixture def test_pg_connection_string(request): return request.config.getoption("...
import pytest from sqlalchemy import text from sqlalchemy.exc import ProgrammingError from sqlalchemy.ext.asyncio import create_async_engine from sqlalchemy.ext.asyncio import AsyncSession from virtool.postgres import Base @pytest.fixture def test_pg_connection_string(request): return request.config.getoption("...
<commit_before>import pytest from sqlalchemy import text from sqlalchemy.exc import ProgrammingError from sqlalchemy.ext.asyncio import create_async_engine from sqlalchemy.ext.asyncio import AsyncSession from virtool.postgres import Base @pytest.fixture def test_pg_connection_string(request): return request.con...
253ec40f59d2d28a848e17a7c62f85c3bd97dce9
pages/views.py
pages/views.py
from django.http import Http404 from django.shortcuts import get_object_or_404 from django.contrib.sites.models import SITE_CACHE from pages import settings from pages.models import Page, Content from pages.utils import auto_render, get_language_from_request def details(request, page_id=None, slug=None, temp...
from django.http import Http404 from django.shortcuts import get_object_or_404 from django.contrib.sites.models import SITE_CACHE from pages import settings from pages.models import Page, Content from pages.utils import auto_render, get_language_from_request def details(request, page_id=None, slug=None, temp...
Add documentation to the default view
Add documentation to the default view
Python
bsd-3-clause
PiRSquared17/django-page-cms,google-code-export/django-page-cms,PiRSquared17/django-page-cms,PiRSquared17/django-page-cms,google-code-export/django-page-cms,pombreda/django-page-cms,Alwnikrotikz/django-page-cms,pombreda/django-page-cms,odyaka341/django-page-cms,odyaka341/django-page-cms,Alwnikrotikz/django-page-cms,pom...
from django.http import Http404 from django.shortcuts import get_object_or_404 from django.contrib.sites.models import SITE_CACHE from pages import settings from pages.models import Page, Content from pages.utils import auto_render, get_language_from_request def details(request, page_id=None, slug=None, temp...
from django.http import Http404 from django.shortcuts import get_object_or_404 from django.contrib.sites.models import SITE_CACHE from pages import settings from pages.models import Page, Content from pages.utils import auto_render, get_language_from_request def details(request, page_id=None, slug=None, temp...
<commit_before>from django.http import Http404 from django.shortcuts import get_object_or_404 from django.contrib.sites.models import SITE_CACHE from pages import settings from pages.models import Page, Content from pages.utils import auto_render, get_language_from_request def details(request, page_id=None, slug=None...
from django.http import Http404 from django.shortcuts import get_object_or_404 from django.contrib.sites.models import SITE_CACHE from pages import settings from pages.models import Page, Content from pages.utils import auto_render, get_language_from_request def details(request, page_id=None, slug=None, temp...
from django.http import Http404 from django.shortcuts import get_object_or_404 from django.contrib.sites.models import SITE_CACHE from pages import settings from pages.models import Page, Content from pages.utils import auto_render, get_language_from_request def details(request, page_id=None, slug=None, temp...
<commit_before>from django.http import Http404 from django.shortcuts import get_object_or_404 from django.contrib.sites.models import SITE_CACHE from pages import settings from pages.models import Page, Content from pages.utils import auto_render, get_language_from_request def details(request, page_id=None, slug=None...
ae01c2c1e5ca693193aed12b66fb78e9d613faa7
tests/unit/test_context.py
tests/unit/test_context.py
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2011 OpenStack LLC. # 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/...
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2011 OpenStack LLC. # 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/...
Use testtools as test base class.
Use testtools as test base class. On the path to testr migration, we need to replace the unittest base classes with testtools. Replace tearDown with addCleanup, addCleanup is more resilient than tearDown. The fixtures library has excellent support for managing and cleaning tempfiles. Use it. Replace skip_ with testtoo...
Python
apache-2.0
dims/oslo.context,citrix-openstack-build/oslo.context,yanheven/oslo.middleware,JioCloud/oslo.context,varunarya10/oslo.context,openstack/oslo.context
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2011 OpenStack LLC. # 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/...
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2011 OpenStack LLC. # 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/...
<commit_before># vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2011 OpenStack LLC. # 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://...
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2011 OpenStack LLC. # 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/...
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2011 OpenStack LLC. # 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/...
<commit_before># vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2011 OpenStack LLC. # 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://...
ea710f4a2d734994ee3d18e90c7afc6aff2f8604
djedi/admin/cms.py
djedi/admin/cms.py
from django.contrib.admin import ModelAdmin from django.core.exceptions import PermissionDenied from django.views.decorators.clickjacking import xframe_options_exempt from django.views.generic import View from ..auth import has_permission from ..compat import include, patterns, render, url from .mixins import DjediCon...
from django.contrib.admin import ModelAdmin from django.core.exceptions import PermissionDenied from django.views.decorators.clickjacking import xframe_options_exempt from django.views.generic import View from ..auth import has_permission from ..compat import include, patterns, render, url from .mixins import DjediCon...
Replace non-ASCII character in comment
Replace non-ASCII character in comment
Python
bsd-3-clause
5monkeys/djedi-cms,5monkeys/djedi-cms,5monkeys/djedi-cms
from django.contrib.admin import ModelAdmin from django.core.exceptions import PermissionDenied from django.views.decorators.clickjacking import xframe_options_exempt from django.views.generic import View from ..auth import has_permission from ..compat import include, patterns, render, url from .mixins import DjediCon...
from django.contrib.admin import ModelAdmin from django.core.exceptions import PermissionDenied from django.views.decorators.clickjacking import xframe_options_exempt from django.views.generic import View from ..auth import has_permission from ..compat import include, patterns, render, url from .mixins import DjediCon...
<commit_before>from django.contrib.admin import ModelAdmin from django.core.exceptions import PermissionDenied from django.views.decorators.clickjacking import xframe_options_exempt from django.views.generic import View from ..auth import has_permission from ..compat import include, patterns, render, url from .mixins ...
from django.contrib.admin import ModelAdmin from django.core.exceptions import PermissionDenied from django.views.decorators.clickjacking import xframe_options_exempt from django.views.generic import View from ..auth import has_permission from ..compat import include, patterns, render, url from .mixins import DjediCon...
from django.contrib.admin import ModelAdmin from django.core.exceptions import PermissionDenied from django.views.decorators.clickjacking import xframe_options_exempt from django.views.generic import View from ..auth import has_permission from ..compat import include, patterns, render, url from .mixins import DjediCon...
<commit_before>from django.contrib.admin import ModelAdmin from django.core.exceptions import PermissionDenied from django.views.decorators.clickjacking import xframe_options_exempt from django.views.generic import View from ..auth import has_permission from ..compat import include, patterns, render, url from .mixins ...
957ebd10ebe51306c1f5a5ff4842077542454fcf
indra/biopax/biopax_api.py
indra/biopax/biopax_api.py
import sys from processor import BiopaxProcessor from indra.java_vm import autoclass, JavaException from indra.biopax import pathway_commons_client as pcc def process_pc_neighborhood(gene_names, neighbor_limit=1): model = pcc.graph_query('neighborhood', gene_names, neighbor_limit=neig...
import sys from processor import BiopaxProcessor from indra.java_vm import autoclass, JavaException from indra.biopax import pathway_commons_client as pcc def process_pc_neighborhood(gene_names, neighbor_limit=1): model = pcc.graph_query('neighborhood', gene_names, neighbor_limit=neig...
Fix calling pathway commons client in biopax api
Fix calling pathway commons client in biopax api
Python
bsd-2-clause
pvtodorov/indra,johnbachman/belpy,sorgerlab/belpy,pvtodorov/indra,jmuhlich/indra,johnbachman/indra,sorgerlab/belpy,pvtodorov/indra,sorgerlab/belpy,johnbachman/indra,sorgerlab/indra,jmuhlich/indra,sorgerlab/indra,johnbachman/belpy,johnbachman/belpy,pvtodorov/indra,johnbachman/indra,sorgerlab/indra,jmuhlich/indra,bgyori/...
import sys from processor import BiopaxProcessor from indra.java_vm import autoclass, JavaException from indra.biopax import pathway_commons_client as pcc def process_pc_neighborhood(gene_names, neighbor_limit=1): model = pcc.graph_query('neighborhood', gene_names, neighbor_limit=neig...
import sys from processor import BiopaxProcessor from indra.java_vm import autoclass, JavaException from indra.biopax import pathway_commons_client as pcc def process_pc_neighborhood(gene_names, neighbor_limit=1): model = pcc.graph_query('neighborhood', gene_names, neighbor_limit=neig...
<commit_before>import sys from processor import BiopaxProcessor from indra.java_vm import autoclass, JavaException from indra.biopax import pathway_commons_client as pcc def process_pc_neighborhood(gene_names, neighbor_limit=1): model = pcc.graph_query('neighborhood', gene_names, neig...
import sys from processor import BiopaxProcessor from indra.java_vm import autoclass, JavaException from indra.biopax import pathway_commons_client as pcc def process_pc_neighborhood(gene_names, neighbor_limit=1): model = pcc.graph_query('neighborhood', gene_names, neighbor_limit=neig...
import sys from processor import BiopaxProcessor from indra.java_vm import autoclass, JavaException from indra.biopax import pathway_commons_client as pcc def process_pc_neighborhood(gene_names, neighbor_limit=1): model = pcc.graph_query('neighborhood', gene_names, neighbor_limit=neig...
<commit_before>import sys from processor import BiopaxProcessor from indra.java_vm import autoclass, JavaException from indra.biopax import pathway_commons_client as pcc def process_pc_neighborhood(gene_names, neighbor_limit=1): model = pcc.graph_query('neighborhood', gene_names, neig...
c10afc4ebd4d7ec8571c0685c0d87f76b25b3af9
scipy/special/_precompute/utils.py
scipy/special/_precompute/utils.py
try: import mpmath as mp except ImportError: pass try: from sympy.abc import x # type: ignore[import] except ImportError: pass def lagrange_inversion(a): """Given a series f(x) = a[1]*x + a[2]*x**2 + ... + a[n-1]*x**(n - 1), use the Lagrange inversion formula to compute a series g...
try: import mpmath as mp except ImportError: pass try: from sympy.abc import x # type: ignore[import] except ImportError: pass def lagrange_inversion(a): """Given a series f(x) = a[1]*x + a[2]*x**2 + ... + a[n-1]*x**(n - 1), use the Lagrange inversion formula to compute a series g...
Use list comprehension instead of lambda function
Use list comprehension instead of lambda function
Python
bsd-3-clause
grlee77/scipy,WarrenWeckesser/scipy,vigna/scipy,endolith/scipy,andyfaff/scipy,rgommers/scipy,scipy/scipy,grlee77/scipy,mdhaber/scipy,Stefan-Endres/scipy,zerothi/scipy,rgommers/scipy,andyfaff/scipy,scipy/scipy,zerothi/scipy,tylerjereddy/scipy,endolith/scipy,mdhaber/scipy,endolith/scipy,rgommers/scipy,mdhaber/scipy,endol...
try: import mpmath as mp except ImportError: pass try: from sympy.abc import x # type: ignore[import] except ImportError: pass def lagrange_inversion(a): """Given a series f(x) = a[1]*x + a[2]*x**2 + ... + a[n-1]*x**(n - 1), use the Lagrange inversion formula to compute a series g...
try: import mpmath as mp except ImportError: pass try: from sympy.abc import x # type: ignore[import] except ImportError: pass def lagrange_inversion(a): """Given a series f(x) = a[1]*x + a[2]*x**2 + ... + a[n-1]*x**(n - 1), use the Lagrange inversion formula to compute a series g...
<commit_before>try: import mpmath as mp except ImportError: pass try: from sympy.abc import x # type: ignore[import] except ImportError: pass def lagrange_inversion(a): """Given a series f(x) = a[1]*x + a[2]*x**2 + ... + a[n-1]*x**(n - 1), use the Lagrange inversion formula to compute ...
try: import mpmath as mp except ImportError: pass try: from sympy.abc import x # type: ignore[import] except ImportError: pass def lagrange_inversion(a): """Given a series f(x) = a[1]*x + a[2]*x**2 + ... + a[n-1]*x**(n - 1), use the Lagrange inversion formula to compute a series g...
try: import mpmath as mp except ImportError: pass try: from sympy.abc import x # type: ignore[import] except ImportError: pass def lagrange_inversion(a): """Given a series f(x) = a[1]*x + a[2]*x**2 + ... + a[n-1]*x**(n - 1), use the Lagrange inversion formula to compute a series g...
<commit_before>try: import mpmath as mp except ImportError: pass try: from sympy.abc import x # type: ignore[import] except ImportError: pass def lagrange_inversion(a): """Given a series f(x) = a[1]*x + a[2]*x**2 + ... + a[n-1]*x**(n - 1), use the Lagrange inversion formula to compute ...
9e6f3f9c6816d151132b0e133524cb56a6d998d2
skeleton/website/jasyscript.py
skeleton/website/jasyscript.py
import konstrukteur.Konstrukteur import jasy.asset.Manager2 as AssetManager @task def build(regenerate = False): """Generate source (development) version""" # Initialize assets assetManager = AssetManager.AssetManager(profile, session) # Build static website konstrukteur.Konstrukteur.build(regenerate) # Copy ...
import konstrukteur.Konstrukteur import jasy.asset.Manager as AssetManager @task def build(regenerate = False): """Generate source (development) version""" # Initialize assets assetManager = AssetManager.AssetManager(profile, session) # Build static website konstrukteur.Konstrukteur.build(regenerate) # Copy a...
Fix renaming of jasy.asset.Manager2 to jasy.asset.Manager
Fix renaming of jasy.asset.Manager2 to jasy.asset.Manager
Python
mit
fastner/konstrukteur,fastner/konstrukteur,fastner/konstrukteur
import konstrukteur.Konstrukteur import jasy.asset.Manager2 as AssetManager @task def build(regenerate = False): """Generate source (development) version""" # Initialize assets assetManager = AssetManager.AssetManager(profile, session) # Build static website konstrukteur.Konstrukteur.build(regenerate) # Copy ...
import konstrukteur.Konstrukteur import jasy.asset.Manager as AssetManager @task def build(regenerate = False): """Generate source (development) version""" # Initialize assets assetManager = AssetManager.AssetManager(profile, session) # Build static website konstrukteur.Konstrukteur.build(regenerate) # Copy a...
<commit_before>import konstrukteur.Konstrukteur import jasy.asset.Manager2 as AssetManager @task def build(regenerate = False): """Generate source (development) version""" # Initialize assets assetManager = AssetManager.AssetManager(profile, session) # Build static website konstrukteur.Konstrukteur.build(regene...
import konstrukteur.Konstrukteur import jasy.asset.Manager as AssetManager @task def build(regenerate = False): """Generate source (development) version""" # Initialize assets assetManager = AssetManager.AssetManager(profile, session) # Build static website konstrukteur.Konstrukteur.build(regenerate) # Copy a...
import konstrukteur.Konstrukteur import jasy.asset.Manager2 as AssetManager @task def build(regenerate = False): """Generate source (development) version""" # Initialize assets assetManager = AssetManager.AssetManager(profile, session) # Build static website konstrukteur.Konstrukteur.build(regenerate) # Copy ...
<commit_before>import konstrukteur.Konstrukteur import jasy.asset.Manager2 as AssetManager @task def build(regenerate = False): """Generate source (development) version""" # Initialize assets assetManager = AssetManager.AssetManager(profile, session) # Build static website konstrukteur.Konstrukteur.build(regene...
105864b44af3f1210e194e2deabfc760cac25055
talempd/zest/skype/FirstRound/MiddleRandom.py
talempd/zest/skype/FirstRound/MiddleRandom.py
from random import shuffle def midrand(sentence): words = sentence.split() newwords = [randomized(word) for word in words] newsentence = ' '.join(newwords) if sentence == newsentence: return "They can't be different" else: return newsentence def randomized(word): if len(set(wor...
from random import shuffle def midrand(sentence): words = sentence.split() newwords = [randomized(word) for word in words] newsentence = ' '.join(newwords) if sentence == newsentence: return "They can't be different" else: return newsentence def randomized(word): if len(set(wor...
Fix Two Bugs for MidRand
Fix Two Bugs for MidRand
Python
mit
cc13ny/Allin,Chasego/codi,cc13ny/algo,cc13ny/Allin,cc13ny/algo,cc13ny/Allin,cc13ny/algo,Chasego/codirit,Chasego/codi,Chasego/codirit,Chasego/codirit,Chasego/codi,Chasego/cod,Chasego/cod,Chasego/cod,Chasego/codi,cc13ny/algo,Chasego/codi,Chasego/cod,Chasego/codirit,cc13ny/Allin,Chasego/codirit,Chasego/cod,cc13ny/Allin,cc...
from random import shuffle def midrand(sentence): words = sentence.split() newwords = [randomized(word) for word in words] newsentence = ' '.join(newwords) if sentence == newsentence: return "They can't be different" else: return newsentence def randomized(word): if len(set(wor...
from random import shuffle def midrand(sentence): words = sentence.split() newwords = [randomized(word) for word in words] newsentence = ' '.join(newwords) if sentence == newsentence: return "They can't be different" else: return newsentence def randomized(word): if len(set(wor...
<commit_before>from random import shuffle def midrand(sentence): words = sentence.split() newwords = [randomized(word) for word in words] newsentence = ' '.join(newwords) if sentence == newsentence: return "They can't be different" else: return newsentence def randomized(word): ...
from random import shuffle def midrand(sentence): words = sentence.split() newwords = [randomized(word) for word in words] newsentence = ' '.join(newwords) if sentence == newsentence: return "They can't be different" else: return newsentence def randomized(word): if len(set(wor...
from random import shuffle def midrand(sentence): words = sentence.split() newwords = [randomized(word) for word in words] newsentence = ' '.join(newwords) if sentence == newsentence: return "They can't be different" else: return newsentence def randomized(word): if len(set(wor...
<commit_before>from random import shuffle def midrand(sentence): words = sentence.split() newwords = [randomized(word) for word in words] newsentence = ' '.join(newwords) if sentence == newsentence: return "They can't be different" else: return newsentence def randomized(word): ...
76b55e9ff15f2e0d0b7ece7e0e063a3d4ffcbade
tests/helpers.py
tests/helpers.py
from unittest.mock import call def calls_from(list_args): return [call(*args) for args in list_args]
from mock import call def calls_from(list_args): return [call(*args) for args in list_args]
Load mock module from mock package instead of unittest to support Python prior to 3.3
Load mock module from mock package instead of unittest to support Python prior to 3.3
Python
mit
mina-asham/pictures-dedupe-and-rename
from unittest.mock import call def calls_from(list_args): return [call(*args) for args in list_args] Load mock module from mock package instead of unittest to support Python prior to 3.3
from mock import call def calls_from(list_args): return [call(*args) for args in list_args]
<commit_before>from unittest.mock import call def calls_from(list_args): return [call(*args) for args in list_args] <commit_msg>Load mock module from mock package instead of unittest to support Python prior to 3.3<commit_after>
from mock import call def calls_from(list_args): return [call(*args) for args in list_args]
from unittest.mock import call def calls_from(list_args): return [call(*args) for args in list_args] Load mock module from mock package instead of unittest to support Python prior to 3.3from mock import call def calls_from(list_args): return [call(*args) for args in list_args]
<commit_before>from unittest.mock import call def calls_from(list_args): return [call(*args) for args in list_args] <commit_msg>Load mock module from mock package instead of unittest to support Python prior to 3.3<commit_after>from mock import call def calls_from(list_args): return [call(*args) for args in ...
47f1d3bf2ef53fa9fef9eff46497ca02f366e3fb
nap/auth.py
nap/auth.py
from __future__ import unicode_literals # Authentication and Authorisation from functools import wraps from . import http def permit(test_func): '''Decorate a handler to control access''' def decorator(view_func): @wraps(view_func) def _wrapped_view(self, *args, **kwargs): if tes...
from __future__ import unicode_literals # Authentication and Authorisation from functools import wraps from . import http def permit(test_func, response_class=http.Forbidden): '''Decorate a handler to control access''' def decorator(view_func): @wraps(view_func) def _wrapped_view(self, *args...
Allow control of response type for failing permit check
Allow control of response type for failing permit check
Python
bsd-3-clause
limbera/django-nap
from __future__ import unicode_literals # Authentication and Authorisation from functools import wraps from . import http def permit(test_func): '''Decorate a handler to control access''' def decorator(view_func): @wraps(view_func) def _wrapped_view(self, *args, **kwargs): if tes...
from __future__ import unicode_literals # Authentication and Authorisation from functools import wraps from . import http def permit(test_func, response_class=http.Forbidden): '''Decorate a handler to control access''' def decorator(view_func): @wraps(view_func) def _wrapped_view(self, *args...
<commit_before>from __future__ import unicode_literals # Authentication and Authorisation from functools import wraps from . import http def permit(test_func): '''Decorate a handler to control access''' def decorator(view_func): @wraps(view_func) def _wrapped_view(self, *args, **kwargs): ...
from __future__ import unicode_literals # Authentication and Authorisation from functools import wraps from . import http def permit(test_func, response_class=http.Forbidden): '''Decorate a handler to control access''' def decorator(view_func): @wraps(view_func) def _wrapped_view(self, *args...
from __future__ import unicode_literals # Authentication and Authorisation from functools import wraps from . import http def permit(test_func): '''Decorate a handler to control access''' def decorator(view_func): @wraps(view_func) def _wrapped_view(self, *args, **kwargs): if tes...
<commit_before>from __future__ import unicode_literals # Authentication and Authorisation from functools import wraps from . import http def permit(test_func): '''Decorate a handler to control access''' def decorator(view_func): @wraps(view_func) def _wrapped_view(self, *args, **kwargs): ...
a34086d5bbd63d98953919c72d4eb4623063ad0c
piptools/repositories/minimal_upgrade.py
piptools/repositories/minimal_upgrade.py
# coding: utf-8 from __future__ import (absolute_import, division, print_function, unicode_literals) from .base import BaseRepository class MinimalUpgradeRepository(BaseRepository): """ The MinimalUpgradeRepository uses a provided requirements file as a proxy in front of a reposit...
# coding: utf-8 from __future__ import (absolute_import, division, print_function, unicode_literals) from .base import BaseRepository class MinimalUpgradeRepository(BaseRepository): """ The MinimalUpgradeRepository uses a provided requirements file as a proxy in front of a reposit...
Add missing properties to pass through to the proxied repository.
Add missing properties to pass through to the proxied repository.
Python
bsd-2-clause
suutari/prequ,suutari/prequ,suutari-ai/prequ
# coding: utf-8 from __future__ import (absolute_import, division, print_function, unicode_literals) from .base import BaseRepository class MinimalUpgradeRepository(BaseRepository): """ The MinimalUpgradeRepository uses a provided requirements file as a proxy in front of a reposit...
# coding: utf-8 from __future__ import (absolute_import, division, print_function, unicode_literals) from .base import BaseRepository class MinimalUpgradeRepository(BaseRepository): """ The MinimalUpgradeRepository uses a provided requirements file as a proxy in front of a reposit...
<commit_before># coding: utf-8 from __future__ import (absolute_import, division, print_function, unicode_literals) from .base import BaseRepository class MinimalUpgradeRepository(BaseRepository): """ The MinimalUpgradeRepository uses a provided requirements file as a proxy in fro...
# coding: utf-8 from __future__ import (absolute_import, division, print_function, unicode_literals) from .base import BaseRepository class MinimalUpgradeRepository(BaseRepository): """ The MinimalUpgradeRepository uses a provided requirements file as a proxy in front of a reposit...
# coding: utf-8 from __future__ import (absolute_import, division, print_function, unicode_literals) from .base import BaseRepository class MinimalUpgradeRepository(BaseRepository): """ The MinimalUpgradeRepository uses a provided requirements file as a proxy in front of a reposit...
<commit_before># coding: utf-8 from __future__ import (absolute_import, division, print_function, unicode_literals) from .base import BaseRepository class MinimalUpgradeRepository(BaseRepository): """ The MinimalUpgradeRepository uses a provided requirements file as a proxy in fro...
e2452a46766abdef354d9e04f6fb61eae51bf6ee
yepes/models.py
yepes/models.py
# -*- coding:utf-8 -*- from django import template template.add_to_builtins('yepes.defaultfilters') template.add_to_builtins('yepes.defaulttags')
# -*- coding:utf-8 -*- from __future__ import absolute_import import types from django import template from django.db import connections from django.db.models.manager import Manager from django.db.models.query import QuerySet from django.utils import six template.add_to_builtins('yepes.defaultfilters') template.ad...
Implement truncate() method for Manager and in_batches() method for QuerySet
Implement truncate() method for Manager and in_batches() method for QuerySet
Python
bsd-3-clause
samuelmaudo/yepes,samuelmaudo/yepes,samuelmaudo/yepes,samuelmaudo/yepes
# -*- coding:utf-8 -*- from django import template template.add_to_builtins('yepes.defaultfilters') template.add_to_builtins('yepes.defaulttags') Implement truncate() method for Manager and in_batches() method for QuerySet
# -*- coding:utf-8 -*- from __future__ import absolute_import import types from django import template from django.db import connections from django.db.models.manager import Manager from django.db.models.query import QuerySet from django.utils import six template.add_to_builtins('yepes.defaultfilters') template.ad...
<commit_before># -*- coding:utf-8 -*- from django import template template.add_to_builtins('yepes.defaultfilters') template.add_to_builtins('yepes.defaulttags') <commit_msg>Implement truncate() method for Manager and in_batches() method for QuerySet<commit_after>
# -*- coding:utf-8 -*- from __future__ import absolute_import import types from django import template from django.db import connections from django.db.models.manager import Manager from django.db.models.query import QuerySet from django.utils import six template.add_to_builtins('yepes.defaultfilters') template.ad...
# -*- coding:utf-8 -*- from django import template template.add_to_builtins('yepes.defaultfilters') template.add_to_builtins('yepes.defaulttags') Implement truncate() method for Manager and in_batches() method for QuerySet# -*- coding:utf-8 -*- from __future__ import absolute_import import types from django import...
<commit_before># -*- coding:utf-8 -*- from django import template template.add_to_builtins('yepes.defaultfilters') template.add_to_builtins('yepes.defaulttags') <commit_msg>Implement truncate() method for Manager and in_batches() method for QuerySet<commit_after># -*- coding:utf-8 -*- from __future__ import absolute...
7717aad873f7cc68de26618c49d24cd5dc6202c5
dodocs/__init__.py
dodocs/__init__.py
"""Main function Copyright (c) 2015 Francesco Montesano MIT Licence """ import os import sys import colorama from dodocs.cmdline import parse from dodocs.logger import setLogger __version__ = "0.0.1" colorama.init(autoreset=True) def main(argv=None): """ Main code Parameters ---------- argv...
"""Main function Copyright (c) 2015 Francesco Montesano MIT Licence """ import os import sys from dodocs.cmdline import parse import dodocs.logger as dlog __version__ = "0.0.1" def main(argv=None): """ Main code Parameters ---------- argv : list of strings, optional command line argum...
Remove colorama and update the logger interface
Remove colorama and update the logger interface
Python
mit
montefra/dodocs
"""Main function Copyright (c) 2015 Francesco Montesano MIT Licence """ import os import sys import colorama from dodocs.cmdline import parse from dodocs.logger import setLogger __version__ = "0.0.1" colorama.init(autoreset=True) def main(argv=None): """ Main code Parameters ---------- argv...
"""Main function Copyright (c) 2015 Francesco Montesano MIT Licence """ import os import sys from dodocs.cmdline import parse import dodocs.logger as dlog __version__ = "0.0.1" def main(argv=None): """ Main code Parameters ---------- argv : list of strings, optional command line argum...
<commit_before>"""Main function Copyright (c) 2015 Francesco Montesano MIT Licence """ import os import sys import colorama from dodocs.cmdline import parse from dodocs.logger import setLogger __version__ = "0.0.1" colorama.init(autoreset=True) def main(argv=None): """ Main code Parameters ----...
"""Main function Copyright (c) 2015 Francesco Montesano MIT Licence """ import os import sys from dodocs.cmdline import parse import dodocs.logger as dlog __version__ = "0.0.1" def main(argv=None): """ Main code Parameters ---------- argv : list of strings, optional command line argum...
"""Main function Copyright (c) 2015 Francesco Montesano MIT Licence """ import os import sys import colorama from dodocs.cmdline import parse from dodocs.logger import setLogger __version__ = "0.0.1" colorama.init(autoreset=True) def main(argv=None): """ Main code Parameters ---------- argv...
<commit_before>"""Main function Copyright (c) 2015 Francesco Montesano MIT Licence """ import os import sys import colorama from dodocs.cmdline import parse from dodocs.logger import setLogger __version__ = "0.0.1" colorama.init(autoreset=True) def main(argv=None): """ Main code Parameters ----...
b435f5c07a39874195781d928b7451d2765c3cf9
test-project/testproject/models.py
test-project/testproject/models.py
import datetime, json from sqlalchemy import ( Column, Integer, Text, DateTime, ForeignKey, ) from sqlalchemy.ext.declarative import declarative_base from sqlalchemy.orm import ( scoped_session, sessionmaker, relationship, backref, ) from zope.sqlalchemy import ZopeTransac...
from __future__ import absolute_import, unicode_literals import datetime, json from sqlalchemy import ( Column, Integer, Text, DateTime, ForeignKey, ) from sqlalchemy.ext.declarative import declarative_base from sqlalchemy.orm import ( scoped_session, sessionmaker, relationship,...
Fix to unicode problem in 3.2
Fix to unicode problem in 3.2
Python
mit
RedTurtle/sqlalchemy-datatables,Pegase745/sqlalchemy-datatables
import datetime, json from sqlalchemy import ( Column, Integer, Text, DateTime, ForeignKey, ) from sqlalchemy.ext.declarative import declarative_base from sqlalchemy.orm import ( scoped_session, sessionmaker, relationship, backref, ) from zope.sqlalchemy import ZopeTransac...
from __future__ import absolute_import, unicode_literals import datetime, json from sqlalchemy import ( Column, Integer, Text, DateTime, ForeignKey, ) from sqlalchemy.ext.declarative import declarative_base from sqlalchemy.orm import ( scoped_session, sessionmaker, relationship,...
<commit_before>import datetime, json from sqlalchemy import ( Column, Integer, Text, DateTime, ForeignKey, ) from sqlalchemy.ext.declarative import declarative_base from sqlalchemy.orm import ( scoped_session, sessionmaker, relationship, backref, ) from zope.sqlalchemy imp...
from __future__ import absolute_import, unicode_literals import datetime, json from sqlalchemy import ( Column, Integer, Text, DateTime, ForeignKey, ) from sqlalchemy.ext.declarative import declarative_base from sqlalchemy.orm import ( scoped_session, sessionmaker, relationship,...
import datetime, json from sqlalchemy import ( Column, Integer, Text, DateTime, ForeignKey, ) from sqlalchemy.ext.declarative import declarative_base from sqlalchemy.orm import ( scoped_session, sessionmaker, relationship, backref, ) from zope.sqlalchemy import ZopeTransac...
<commit_before>import datetime, json from sqlalchemy import ( Column, Integer, Text, DateTime, ForeignKey, ) from sqlalchemy.ext.declarative import declarative_base from sqlalchemy.orm import ( scoped_session, sessionmaker, relationship, backref, ) from zope.sqlalchemy imp...
9f1ec5e42d66477fc884bf5ea853d145c0adeb4f
tests/test_fs.py
tests/test_fs.py
from farmfs.fs import normpath as _normalize from farmfs.fs import userPath2Path as up2p from farmfs.fs import Path def test_normalize_abs(): assert _normalize("/") == "/" assert _normalize("/a") == "/a" assert _normalize("/a/") == "/a" assert _normalize("/a/b") == "/a/b" assert _normalize(...
from farmfs.fs import normpath as _normalize from farmfs.fs import userPath2Path as up2p from farmfs.fs import Path def test_normalize_abs(): assert _normalize("/") == "/" assert _normalize("/a") == "/a" assert _normalize("/a/") == "/a" assert _normalize("/a/b") == "/a/b" assert _normalize(...
Add test case for “/“
Add test case for “/“
Python
mit
andrewguy9/farmfs,andrewguy9/farmfs
from farmfs.fs import normpath as _normalize from farmfs.fs import userPath2Path as up2p from farmfs.fs import Path def test_normalize_abs(): assert _normalize("/") == "/" assert _normalize("/a") == "/a" assert _normalize("/a/") == "/a" assert _normalize("/a/b") == "/a/b" assert _normalize(...
from farmfs.fs import normpath as _normalize from farmfs.fs import userPath2Path as up2p from farmfs.fs import Path def test_normalize_abs(): assert _normalize("/") == "/" assert _normalize("/a") == "/a" assert _normalize("/a/") == "/a" assert _normalize("/a/b") == "/a/b" assert _normalize(...
<commit_before>from farmfs.fs import normpath as _normalize from farmfs.fs import userPath2Path as up2p from farmfs.fs import Path def test_normalize_abs(): assert _normalize("/") == "/" assert _normalize("/a") == "/a" assert _normalize("/a/") == "/a" assert _normalize("/a/b") == "/a/b" ass...
from farmfs.fs import normpath as _normalize from farmfs.fs import userPath2Path as up2p from farmfs.fs import Path def test_normalize_abs(): assert _normalize("/") == "/" assert _normalize("/a") == "/a" assert _normalize("/a/") == "/a" assert _normalize("/a/b") == "/a/b" assert _normalize(...
from farmfs.fs import normpath as _normalize from farmfs.fs import userPath2Path as up2p from farmfs.fs import Path def test_normalize_abs(): assert _normalize("/") == "/" assert _normalize("/a") == "/a" assert _normalize("/a/") == "/a" assert _normalize("/a/b") == "/a/b" assert _normalize(...
<commit_before>from farmfs.fs import normpath as _normalize from farmfs.fs import userPath2Path as up2p from farmfs.fs import Path def test_normalize_abs(): assert _normalize("/") == "/" assert _normalize("/a") == "/a" assert _normalize("/a/") == "/a" assert _normalize("/a/b") == "/a/b" ass...
7311b134379087dd7f181682b9b58aeb8d794e6c
examples/basic_siggen.py
examples/basic_siggen.py
from pymoku import Moku, ValueOutOfRangeException from pymoku.instruments import * import time, logging import matplotlib import matplotlib.pyplot as plt logging.basicConfig(format='%(asctime)s:%(name)s:%(levelname)s::%(message)s') logging.getLogger('pymoku').setLevel(logging.DEBUG) # Use Moku.get_by_serial() or get...
from pymoku import Moku, ValueOutOfRangeException from pymoku.instruments import * import time, logging import matplotlib import matplotlib.pyplot as plt logging.basicConfig(format='%(asctime)s:%(name)s:%(levelname)s::%(message)s') logging.getLogger('pymoku').setLevel(logging.DEBUG) # Use Moku.get_by_serial() or get...
Tidy up basic siggen example
Siggen: Tidy up basic siggen example
Python
mit
benizl/pymoku,liquidinstruments/pymoku
from pymoku import Moku, ValueOutOfRangeException from pymoku.instruments import * import time, logging import matplotlib import matplotlib.pyplot as plt logging.basicConfig(format='%(asctime)s:%(name)s:%(levelname)s::%(message)s') logging.getLogger('pymoku').setLevel(logging.DEBUG) # Use Moku.get_by_serial() or get...
from pymoku import Moku, ValueOutOfRangeException from pymoku.instruments import * import time, logging import matplotlib import matplotlib.pyplot as plt logging.basicConfig(format='%(asctime)s:%(name)s:%(levelname)s::%(message)s') logging.getLogger('pymoku').setLevel(logging.DEBUG) # Use Moku.get_by_serial() or get...
<commit_before>from pymoku import Moku, ValueOutOfRangeException from pymoku.instruments import * import time, logging import matplotlib import matplotlib.pyplot as plt logging.basicConfig(format='%(asctime)s:%(name)s:%(levelname)s::%(message)s') logging.getLogger('pymoku').setLevel(logging.DEBUG) # Use Moku.get_by_...
from pymoku import Moku, ValueOutOfRangeException from pymoku.instruments import * import time, logging import matplotlib import matplotlib.pyplot as plt logging.basicConfig(format='%(asctime)s:%(name)s:%(levelname)s::%(message)s') logging.getLogger('pymoku').setLevel(logging.DEBUG) # Use Moku.get_by_serial() or get...
from pymoku import Moku, ValueOutOfRangeException from pymoku.instruments import * import time, logging import matplotlib import matplotlib.pyplot as plt logging.basicConfig(format='%(asctime)s:%(name)s:%(levelname)s::%(message)s') logging.getLogger('pymoku').setLevel(logging.DEBUG) # Use Moku.get_by_serial() or get...
<commit_before>from pymoku import Moku, ValueOutOfRangeException from pymoku.instruments import * import time, logging import matplotlib import matplotlib.pyplot as plt logging.basicConfig(format='%(asctime)s:%(name)s:%(levelname)s::%(message)s') logging.getLogger('pymoku').setLevel(logging.DEBUG) # Use Moku.get_by_...
379e99a672537776ac0e160999967b5efce29305
tweepy/media.py
tweepy/media.py
# Tweepy # Copyright 2009-2021 Joshua Roesslein # See LICENSE for details. from tweepy.mixins import DataMapping class Media(DataMapping): __slots__ = ( "data", "media_key", "type", "duration_ms", "height", "non_public_metrics", "organic_metrics", "preview_image_url", "promoted_metrics",...
# Tweepy # Copyright 2009-2021 Joshua Roesslein # See LICENSE for details. from tweepy.mixins import DataMapping class Media(DataMapping): __slots__ = ( "data", "media_key", "type", "duration_ms", "height", "non_public_metrics", "organic_metrics", "preview_image_url", "promoted_metrics",...
Add alt_text field for Media
Add alt_text field for Media
Python
mit
svven/tweepy,tweepy/tweepy
# Tweepy # Copyright 2009-2021 Joshua Roesslein # See LICENSE for details. from tweepy.mixins import DataMapping class Media(DataMapping): __slots__ = ( "data", "media_key", "type", "duration_ms", "height", "non_public_metrics", "organic_metrics", "preview_image_url", "promoted_metrics",...
# Tweepy # Copyright 2009-2021 Joshua Roesslein # See LICENSE for details. from tweepy.mixins import DataMapping class Media(DataMapping): __slots__ = ( "data", "media_key", "type", "duration_ms", "height", "non_public_metrics", "organic_metrics", "preview_image_url", "promoted_metrics",...
<commit_before># Tweepy # Copyright 2009-2021 Joshua Roesslein # See LICENSE for details. from tweepy.mixins import DataMapping class Media(DataMapping): __slots__ = ( "data", "media_key", "type", "duration_ms", "height", "non_public_metrics", "organic_metrics", "preview_image_url", "pro...
# Tweepy # Copyright 2009-2021 Joshua Roesslein # See LICENSE for details. from tweepy.mixins import DataMapping class Media(DataMapping): __slots__ = ( "data", "media_key", "type", "duration_ms", "height", "non_public_metrics", "organic_metrics", "preview_image_url", "promoted_metrics",...
# Tweepy # Copyright 2009-2021 Joshua Roesslein # See LICENSE for details. from tweepy.mixins import DataMapping class Media(DataMapping): __slots__ = ( "data", "media_key", "type", "duration_ms", "height", "non_public_metrics", "organic_metrics", "preview_image_url", "promoted_metrics",...
<commit_before># Tweepy # Copyright 2009-2021 Joshua Roesslein # See LICENSE for details. from tweepy.mixins import DataMapping class Media(DataMapping): __slots__ = ( "data", "media_key", "type", "duration_ms", "height", "non_public_metrics", "organic_metrics", "preview_image_url", "pro...
09d78bb23ffba9d1d709a3ba5cbabbe84a9b1978
server/macros/currency_usd_to_cad.py
server/macros/currency_usd_to_cad.py
# -*- coding: utf-8; -*- # # This file is part of Superdesk. # # Copyright 2013, 2014 Sourcefabric z.u. and contributors. # # For the full copyright and license information, please see the # AUTHORS and LICENSE files distributed with this source code, or # at https://www.sourcefabric.org/superdesk/license import os im...
# -*- coding: utf-8; -*- # # This file is part of Superdesk. # # Copyright 2013, 2014 Sourcefabric z.u. and contributors. # # For the full copyright and license information, please see the # AUTHORS and LICENSE files distributed with this source code, or # at https://www.sourcefabric.org/superdesk/license import os im...
Delete the desks settings for macro
fix(macro): Delete the desks settings for macro
Python
agpl-3.0
pavlovicnemanja/superdesk,amagdas/superdesk,verifiedpixel/superdesk,mdhaman/superdesk-aap,sivakuna-aap/superdesk,plamut/superdesk,marwoodandrew/superdesk,petrjasek/superdesk,fritzSF/superdesk,petrjasek/superdesk-ntb,verifiedpixel/superdesk,marwoodandrew/superdesk,superdesk/superdesk-aap,verifiedpixel/superdesk,superdes...
# -*- coding: utf-8; -*- # # This file is part of Superdesk. # # Copyright 2013, 2014 Sourcefabric z.u. and contributors. # # For the full copyright and license information, please see the # AUTHORS and LICENSE files distributed with this source code, or # at https://www.sourcefabric.org/superdesk/license import os im...
# -*- coding: utf-8; -*- # # This file is part of Superdesk. # # Copyright 2013, 2014 Sourcefabric z.u. and contributors. # # For the full copyright and license information, please see the # AUTHORS and LICENSE files distributed with this source code, or # at https://www.sourcefabric.org/superdesk/license import os im...
<commit_before># -*- coding: utf-8; -*- # # This file is part of Superdesk. # # Copyright 2013, 2014 Sourcefabric z.u. and contributors. # # For the full copyright and license information, please see the # AUTHORS and LICENSE files distributed with this source code, or # at https://www.sourcefabric.org/superdesk/licens...
# -*- coding: utf-8; -*- # # This file is part of Superdesk. # # Copyright 2013, 2014 Sourcefabric z.u. and contributors. # # For the full copyright and license information, please see the # AUTHORS and LICENSE files distributed with this source code, or # at https://www.sourcefabric.org/superdesk/license import os im...
# -*- coding: utf-8; -*- # # This file is part of Superdesk. # # Copyright 2013, 2014 Sourcefabric z.u. and contributors. # # For the full copyright and license information, please see the # AUTHORS and LICENSE files distributed with this source code, or # at https://www.sourcefabric.org/superdesk/license import os im...
<commit_before># -*- coding: utf-8; -*- # # This file is part of Superdesk. # # Copyright 2013, 2014 Sourcefabric z.u. and contributors. # # For the full copyright and license information, please see the # AUTHORS and LICENSE files distributed with this source code, or # at https://www.sourcefabric.org/superdesk/licens...
153bc6edf9a450d6fb585ba73699e7b37e7bb6b8
skimage/viewer/qt/__init__.py
skimage/viewer/qt/__init__.py
import os import warnings qt_api = os.environ.get('QT_API') if qt_api is None: try: import PySide qt_api = 'pyside' except ImportError: try: import PyQt4 qt_api = 'pyqt' except ImportError: qt_api = 'none' # Note that we don't wan...
import os import warnings qt_api = os.environ.get('QT_API') if qt_api is None: try: import PySide qt_api = 'pyside' except ImportError: try: import PyQt4 qt_api = 'pyqt' except ImportError: qt_api = None # Note that we don't want ...
Use None instead of 'none' for qt backend
Use None instead of 'none' for qt backend
Python
bsd-3-clause
michaelaye/scikit-image,almarklein/scikit-image,jwiggins/scikit-image,pratapvardhan/scikit-image,ClinicalGraphics/scikit-image,paalge/scikit-image,warmspringwinds/scikit-image,vighneshbirodkar/scikit-image,newville/scikit-image,chriscrosscutler/scikit-image,ClinicalGraphics/scikit-image,blink1073/scikit-image,pratapvar...
import os import warnings qt_api = os.environ.get('QT_API') if qt_api is None: try: import PySide qt_api = 'pyside' except ImportError: try: import PyQt4 qt_api = 'pyqt' except ImportError: qt_api = 'none' # Note that we don't wan...
import os import warnings qt_api = os.environ.get('QT_API') if qt_api is None: try: import PySide qt_api = 'pyside' except ImportError: try: import PyQt4 qt_api = 'pyqt' except ImportError: qt_api = None # Note that we don't want ...
<commit_before>import os import warnings qt_api = os.environ.get('QT_API') if qt_api is None: try: import PySide qt_api = 'pyside' except ImportError: try: import PyQt4 qt_api = 'pyqt' except ImportError: qt_api = 'none' # Note th...
import os import warnings qt_api = os.environ.get('QT_API') if qt_api is None: try: import PySide qt_api = 'pyside' except ImportError: try: import PyQt4 qt_api = 'pyqt' except ImportError: qt_api = None # Note that we don't want ...
import os import warnings qt_api = os.environ.get('QT_API') if qt_api is None: try: import PySide qt_api = 'pyside' except ImportError: try: import PyQt4 qt_api = 'pyqt' except ImportError: qt_api = 'none' # Note that we don't wan...
<commit_before>import os import warnings qt_api = os.environ.get('QT_API') if qt_api is None: try: import PySide qt_api = 'pyside' except ImportError: try: import PyQt4 qt_api = 'pyqt' except ImportError: qt_api = 'none' # Note th...
a80069cb364e4802321aaba918ef671daebcff50
elephantblog/admin.py
elephantblog/admin.py
from django.contrib import admin from django.utils.translation import ugettext_lazy as _ from elephantblog.models import Entry, EntryAdmin, Category, CategoryTranslation from feincms.translations import admin_translationinline, short_language_code CategoryTranslationInline = admin_translationinline(CategoryTranslat...
from django.contrib import admin from django.utils.translation import ugettext_lazy as _ from elephantblog.models import Entry, EntryAdmin, Category, CategoryTranslation from feincms.translations import admin_translationinline, short_language_code CategoryTranslationInline = admin_translationinline(CategoryTranslat...
Remove the broken translations extension autodetection
Remove the broken translations extension autodetection
Python
bsd-3-clause
joshuajonah/feincms-elephantblog,matthiask/feincms-elephantblog,sbaechler/feincms-elephantblog,michaelkuty/feincms-elephantblog,joshuajonah/feincms-elephantblog,matthiask/feincms-elephantblog,michaelkuty/feincms-elephantblog,michaelkuty/feincms-elephantblog,feincms/feincms-elephantblog,sbaechler/feincms-elephantblog,sb...
from django.contrib import admin from django.utils.translation import ugettext_lazy as _ from elephantblog.models import Entry, EntryAdmin, Category, CategoryTranslation from feincms.translations import admin_translationinline, short_language_code CategoryTranslationInline = admin_translationinline(CategoryTranslat...
from django.contrib import admin from django.utils.translation import ugettext_lazy as _ from elephantblog.models import Entry, EntryAdmin, Category, CategoryTranslation from feincms.translations import admin_translationinline, short_language_code CategoryTranslationInline = admin_translationinline(CategoryTranslat...
<commit_before>from django.contrib import admin from django.utils.translation import ugettext_lazy as _ from elephantblog.models import Entry, EntryAdmin, Category, CategoryTranslation from feincms.translations import admin_translationinline, short_language_code CategoryTranslationInline = admin_translationinline(C...
from django.contrib import admin from django.utils.translation import ugettext_lazy as _ from elephantblog.models import Entry, EntryAdmin, Category, CategoryTranslation from feincms.translations import admin_translationinline, short_language_code CategoryTranslationInline = admin_translationinline(CategoryTranslat...
from django.contrib import admin from django.utils.translation import ugettext_lazy as _ from elephantblog.models import Entry, EntryAdmin, Category, CategoryTranslation from feincms.translations import admin_translationinline, short_language_code CategoryTranslationInline = admin_translationinline(CategoryTranslat...
<commit_before>from django.contrib import admin from django.utils.translation import ugettext_lazy as _ from elephantblog.models import Entry, EntryAdmin, Category, CategoryTranslation from feincms.translations import admin_translationinline, short_language_code CategoryTranslationInline = admin_translationinline(C...
cb48464859110d4e6ebcf59d70a59804c55d4705
tests/QtNetwork/basic_auth_test.py
tests/QtNetwork/basic_auth_test.py
import unittest from PySide.QtCore import * from PySide.QtNetwork import * from helper import UsesQApplication from httpd import TestServer class testAuthenticationSignal(UsesQApplication): def setUp(self): super(testAuthenticationSignal, self).setUp() self.httpd = TestServer(secure=True) ...
import unittest from PySide.QtCore import * from PySide.QtNetwork import * from helper import UsesQCoreApplication from httpd import TestServer class testAuthenticationSignal(UsesQCoreApplication): def setUp(self): super(testAuthenticationSignal, self).setUp() self.httpd = TestServer(secure=Tru...
Remove the dependecy of QtGui from a test located in QtNetwork.
Remove the dependecy of QtGui from a test located in QtNetwork.
Python
lgpl-2.1
M4rtinK/pyside-android,enthought/pyside,IronManMark20/pyside2,IronManMark20/pyside2,M4rtinK/pyside-android,M4rtinK/pyside-android,pankajp/pyside,PySide/PySide,qtproject/pyside-pyside,M4rtinK/pyside-bb10,qtproject/pyside-pyside,enthought/pyside,enthought/pyside,RobinD42/pyside,M4rtinK/pyside-bb10,BadSingleton/pyside2,gb...
import unittest from PySide.QtCore import * from PySide.QtNetwork import * from helper import UsesQApplication from httpd import TestServer class testAuthenticationSignal(UsesQApplication): def setUp(self): super(testAuthenticationSignal, self).setUp() self.httpd = TestServer(secure=True) ...
import unittest from PySide.QtCore import * from PySide.QtNetwork import * from helper import UsesQCoreApplication from httpd import TestServer class testAuthenticationSignal(UsesQCoreApplication): def setUp(self): super(testAuthenticationSignal, self).setUp() self.httpd = TestServer(secure=Tru...
<commit_before>import unittest from PySide.QtCore import * from PySide.QtNetwork import * from helper import UsesQApplication from httpd import TestServer class testAuthenticationSignal(UsesQApplication): def setUp(self): super(testAuthenticationSignal, self).setUp() self.httpd = TestServer(sec...
import unittest from PySide.QtCore import * from PySide.QtNetwork import * from helper import UsesQCoreApplication from httpd import TestServer class testAuthenticationSignal(UsesQCoreApplication): def setUp(self): super(testAuthenticationSignal, self).setUp() self.httpd = TestServer(secure=Tru...
import unittest from PySide.QtCore import * from PySide.QtNetwork import * from helper import UsesQApplication from httpd import TestServer class testAuthenticationSignal(UsesQApplication): def setUp(self): super(testAuthenticationSignal, self).setUp() self.httpd = TestServer(secure=True) ...
<commit_before>import unittest from PySide.QtCore import * from PySide.QtNetwork import * from helper import UsesQApplication from httpd import TestServer class testAuthenticationSignal(UsesQApplication): def setUp(self): super(testAuthenticationSignal, self).setUp() self.httpd = TestServer(sec...
494fd9dd3cb526682e5cb6fabc12ce4263875aea
flask_slacker/__init__.py
flask_slacker/__init__.py
""" flask_slacker ~~~~~~~~~~~~~ A Flask extension for using Slacker. :copyright: (c) 2017 Matheus Rosa :license: MIT, see LICENSE for more details. """ from slacker import Slacker as BaseSlacker __version__ = '0.0.1' class Slacker(object): def __init__(self, app=None, **kwargs): ""...
""" flask_slacker ~~~~~~~~~~~~~ A Flask extension for using Slacker. :copyright: (c) 2017 Matheus Rosa :license: MIT, see LICENSE for more details. """ from slacker import Slacker as BaseSlacker, DEFAULT_TIMEOUT __version__ = '0.0.1' class Slacker(object): def __init__(self, app=None): ...
Load app configs for Slacker
Load app configs for Slacker
Python
mit
mdsrosa/flask-slacker
""" flask_slacker ~~~~~~~~~~~~~ A Flask extension for using Slacker. :copyright: (c) 2017 Matheus Rosa :license: MIT, see LICENSE for more details. """ from slacker import Slacker as BaseSlacker __version__ = '0.0.1' class Slacker(object): def __init__(self, app=None, **kwargs): ""...
""" flask_slacker ~~~~~~~~~~~~~ A Flask extension for using Slacker. :copyright: (c) 2017 Matheus Rosa :license: MIT, see LICENSE for more details. """ from slacker import Slacker as BaseSlacker, DEFAULT_TIMEOUT __version__ = '0.0.1' class Slacker(object): def __init__(self, app=None): ...
<commit_before>""" flask_slacker ~~~~~~~~~~~~~ A Flask extension for using Slacker. :copyright: (c) 2017 Matheus Rosa :license: MIT, see LICENSE for more details. """ from slacker import Slacker as BaseSlacker __version__ = '0.0.1' class Slacker(object): def __init__(self, app=None, **kwar...
""" flask_slacker ~~~~~~~~~~~~~ A Flask extension for using Slacker. :copyright: (c) 2017 Matheus Rosa :license: MIT, see LICENSE for more details. """ from slacker import Slacker as BaseSlacker, DEFAULT_TIMEOUT __version__ = '0.0.1' class Slacker(object): def __init__(self, app=None): ...
""" flask_slacker ~~~~~~~~~~~~~ A Flask extension for using Slacker. :copyright: (c) 2017 Matheus Rosa :license: MIT, see LICENSE for more details. """ from slacker import Slacker as BaseSlacker __version__ = '0.0.1' class Slacker(object): def __init__(self, app=None, **kwargs): ""...
<commit_before>""" flask_slacker ~~~~~~~~~~~~~ A Flask extension for using Slacker. :copyright: (c) 2017 Matheus Rosa :license: MIT, see LICENSE for more details. """ from slacker import Slacker as BaseSlacker __version__ = '0.0.1' class Slacker(object): def __init__(self, app=None, **kwar...
ebfdde13ef464104b744d6eff41ebe181861603a
froide/helper/widgets.py
froide/helper/widgets.py
from django import forms from django.core.urlresolvers import reverse from django.utils.safestring import mark_safe class EmailInput(forms.TextInput): input_type = 'email' class DateInput(forms.DateInput): input_type = 'date' class AgreeCheckboxInput(forms.CheckboxInput): def __init__(self, attrs=None...
from django import forms from django.core.urlresolvers import reverse from django.utils.safestring import mark_safe class EmailInput(forms.TextInput): input_type = 'email' class DateInput(forms.DateInput): input_type = 'date' class AgreeCheckboxInput(forms.CheckboxInput): def __init__(self, attrs=None...
Change widget to Bootstrap form
Change widget to Bootstrap form
Python
mit
stefanw/froide,okfse/froide,catcosmo/froide,CodeforHawaii/froide,ryankanno/froide,okfse/froide,stefanw/froide,LilithWittmann/froide,catcosmo/froide,stefanw/froide,catcosmo/froide,ryankanno/froide,okfse/froide,LilithWittmann/froide,stefanw/froide,CodeforHawaii/froide,LilithWittmann/froide,CodeforHawaii/froide,okfse/froi...
from django import forms from django.core.urlresolvers import reverse from django.utils.safestring import mark_safe class EmailInput(forms.TextInput): input_type = 'email' class DateInput(forms.DateInput): input_type = 'date' class AgreeCheckboxInput(forms.CheckboxInput): def __init__(self, attrs=None...
from django import forms from django.core.urlresolvers import reverse from django.utils.safestring import mark_safe class EmailInput(forms.TextInput): input_type = 'email' class DateInput(forms.DateInput): input_type = 'date' class AgreeCheckboxInput(forms.CheckboxInput): def __init__(self, attrs=None...
<commit_before>from django import forms from django.core.urlresolvers import reverse from django.utils.safestring import mark_safe class EmailInput(forms.TextInput): input_type = 'email' class DateInput(forms.DateInput): input_type = 'date' class AgreeCheckboxInput(forms.CheckboxInput): def __init__(s...
from django import forms from django.core.urlresolvers import reverse from django.utils.safestring import mark_safe class EmailInput(forms.TextInput): input_type = 'email' class DateInput(forms.DateInput): input_type = 'date' class AgreeCheckboxInput(forms.CheckboxInput): def __init__(self, attrs=None...
from django import forms from django.core.urlresolvers import reverse from django.utils.safestring import mark_safe class EmailInput(forms.TextInput): input_type = 'email' class DateInput(forms.DateInput): input_type = 'date' class AgreeCheckboxInput(forms.CheckboxInput): def __init__(self, attrs=None...
<commit_before>from django import forms from django.core.urlresolvers import reverse from django.utils.safestring import mark_safe class EmailInput(forms.TextInput): input_type = 'email' class DateInput(forms.DateInput): input_type = 'date' class AgreeCheckboxInput(forms.CheckboxInput): def __init__(s...
469b7e8a83308b4ea6ad84d49d7a8aa42274a381
projects/views.py
projects/views.py
from django.contrib.auth.decorators import login_required from django.shortcuts import render from .models import Project from .forms import ProjectForm @login_required def add_project(request): data = request.POST if request.POST else None form = ProjectForm(data, user=request.user) if form.is_valid():...
from django.contrib.auth.decorators import login_required from django.shortcuts import render, get_object_or_404 from django.http import HttpResponseRedirect, Http404 from .models import Project from .forms import ProjectForm def can_edit_projects(user): return user.is_authenticated() and user.has_perm('project...
Add restrictioins for who can edit the project and who cannot
Add restrictioins for who can edit the project and who cannot
Python
mit
Hackfmi/Diaphanum,Hackfmi/Diaphanum
from django.contrib.auth.decorators import login_required from django.shortcuts import render from .models import Project from .forms import ProjectForm @login_required def add_project(request): data = request.POST if request.POST else None form = ProjectForm(data, user=request.user) if form.is_valid():...
from django.contrib.auth.decorators import login_required from django.shortcuts import render, get_object_or_404 from django.http import HttpResponseRedirect, Http404 from .models import Project from .forms import ProjectForm def can_edit_projects(user): return user.is_authenticated() and user.has_perm('project...
<commit_before>from django.contrib.auth.decorators import login_required from django.shortcuts import render from .models import Project from .forms import ProjectForm @login_required def add_project(request): data = request.POST if request.POST else None form = ProjectForm(data, user=request.user) if f...
from django.contrib.auth.decorators import login_required from django.shortcuts import render, get_object_or_404 from django.http import HttpResponseRedirect, Http404 from .models import Project from .forms import ProjectForm def can_edit_projects(user): return user.is_authenticated() and user.has_perm('project...
from django.contrib.auth.decorators import login_required from django.shortcuts import render from .models import Project from .forms import ProjectForm @login_required def add_project(request): data = request.POST if request.POST else None form = ProjectForm(data, user=request.user) if form.is_valid():...
<commit_before>from django.contrib.auth.decorators import login_required from django.shortcuts import render from .models import Project from .forms import ProjectForm @login_required def add_project(request): data = request.POST if request.POST else None form = ProjectForm(data, user=request.user) if f...
c73d6687cb9b8579cb0e36e1f971353d916ceff5
cfgov/v1/migrations/0012_share_perms.py
cfgov/v1/migrations/0012_share_perms.py
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations def create_share_permissions(apps, schema_editor): ContentType = apps.get_model('contenttypes.ContentType') Permission = apps.get_model('auth.Permission') Group = apps.get_model('auth.Group') v1_content_...
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations def create_share_permissions(apps, schema_editor): ContentType = apps.get_model('contenttypes.ContentType') Permission = apps.get_model('auth.Permission') Group = apps.get_model('auth.Group') v1_content_...
Fix Share page permission migration
Fix Share page permission migration
Python
cc0-1.0
kave/cfgov-refresh,kave/cfgov-refresh,kave/cfgov-refresh,kave/cfgov-refresh
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations def create_share_permissions(apps, schema_editor): ContentType = apps.get_model('contenttypes.ContentType') Permission = apps.get_model('auth.Permission') Group = apps.get_model('auth.Group') v1_content_...
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations def create_share_permissions(apps, schema_editor): ContentType = apps.get_model('contenttypes.ContentType') Permission = apps.get_model('auth.Permission') Group = apps.get_model('auth.Group') v1_content_...
<commit_before># -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations def create_share_permissions(apps, schema_editor): ContentType = apps.get_model('contenttypes.ContentType') Permission = apps.get_model('auth.Permission') Group = apps.get_model('auth.Group') ...
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations def create_share_permissions(apps, schema_editor): ContentType = apps.get_model('contenttypes.ContentType') Permission = apps.get_model('auth.Permission') Group = apps.get_model('auth.Group') v1_content_...
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations def create_share_permissions(apps, schema_editor): ContentType = apps.get_model('contenttypes.ContentType') Permission = apps.get_model('auth.Permission') Group = apps.get_model('auth.Group') v1_content_...
<commit_before># -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations def create_share_permissions(apps, schema_editor): ContentType = apps.get_model('contenttypes.ContentType') Permission = apps.get_model('auth.Permission') Group = apps.get_model('auth.Group') ...
274f5b738386e8a7ad0a7fd5ae46719fe15712de
clowder/clowder/cli/stash_controller.py
clowder/clowder/cli/stash_controller.py
from cement.ext.ext_argparse import expose from clowder.cli.abstract_base_controller import AbstractBaseController class StashController(AbstractBaseController): class Meta: label = 'stash' stacked_on = 'base' stacked_type = 'nested' description = 'Stash current changes' @exp...
from cement.ext.ext_argparse import expose from clowder.cli.abstract_base_controller import AbstractBaseController from clowder.commands.util import ( filter_groups, filter_projects_on_project_names, run_group_command, run_project_command ) from clowder.util.decorators import ( print_clowder_repo_s...
Add `clowder stash` logic to Cement controller
Add `clowder stash` logic to Cement controller
Python
mit
JrGoodle/clowder,JrGoodle/clowder,JrGoodle/clowder
from cement.ext.ext_argparse import expose from clowder.cli.abstract_base_controller import AbstractBaseController class StashController(AbstractBaseController): class Meta: label = 'stash' stacked_on = 'base' stacked_type = 'nested' description = 'Stash current changes' @exp...
from cement.ext.ext_argparse import expose from clowder.cli.abstract_base_controller import AbstractBaseController from clowder.commands.util import ( filter_groups, filter_projects_on_project_names, run_group_command, run_project_command ) from clowder.util.decorators import ( print_clowder_repo_s...
<commit_before>from cement.ext.ext_argparse import expose from clowder.cli.abstract_base_controller import AbstractBaseController class StashController(AbstractBaseController): class Meta: label = 'stash' stacked_on = 'base' stacked_type = 'nested' description = 'Stash current cha...
from cement.ext.ext_argparse import expose from clowder.cli.abstract_base_controller import AbstractBaseController from clowder.commands.util import ( filter_groups, filter_projects_on_project_names, run_group_command, run_project_command ) from clowder.util.decorators import ( print_clowder_repo_s...
from cement.ext.ext_argparse import expose from clowder.cli.abstract_base_controller import AbstractBaseController class StashController(AbstractBaseController): class Meta: label = 'stash' stacked_on = 'base' stacked_type = 'nested' description = 'Stash current changes' @exp...
<commit_before>from cement.ext.ext_argparse import expose from clowder.cli.abstract_base_controller import AbstractBaseController class StashController(AbstractBaseController): class Meta: label = 'stash' stacked_on = 'base' stacked_type = 'nested' description = 'Stash current cha...
b8de9355e0c592b1c57f91e3980544bab7cbfb0f
app/assets.py
app/assets.py
from flask_assets import Bundle, Environment js = Bundle( 'node_modules/jquery/dist/jquery.js', 'node_modules/jquery-pjax/jquery.pjax.js', 'node_modules/bootbox/bootbox.js', 'node_modules/bootstrap/dist/js/bootstrap.min.js', 'js/application.js', filters='jsmin', output='gen/packed.js' ) css...
from flask_assets import Bundle, Environment, Filter # fixes missing semicolon in last statement of jquery.pjax.js class ConcatFilter(Filter): def concat(self, out, hunks, **kw): out.write(';'.join([h.data() for h, info in hunks])) js = Bundle( 'node_modules/jquery/dist/jquery.js', 'node_modules/j...
Add concat filter to fix issue with jquery-pjax
Add concat filter to fix issue with jquery-pjax jquery-pjax makes use of IIFEs but does not terminate its last statement with a semicolon, causing syntax errors after asset concatenation. See also: https://github.com/miracle2k/webassets/issues/100#issuecomment-388461033
Python
mit
cburmeister/flask-bones,cburmeister/flask-bones,cburmeister/flask-bones
from flask_assets import Bundle, Environment js = Bundle( 'node_modules/jquery/dist/jquery.js', 'node_modules/jquery-pjax/jquery.pjax.js', 'node_modules/bootbox/bootbox.js', 'node_modules/bootstrap/dist/js/bootstrap.min.js', 'js/application.js', filters='jsmin', output='gen/packed.js' ) css...
from flask_assets import Bundle, Environment, Filter # fixes missing semicolon in last statement of jquery.pjax.js class ConcatFilter(Filter): def concat(self, out, hunks, **kw): out.write(';'.join([h.data() for h, info in hunks])) js = Bundle( 'node_modules/jquery/dist/jquery.js', 'node_modules/j...
<commit_before>from flask_assets import Bundle, Environment js = Bundle( 'node_modules/jquery/dist/jquery.js', 'node_modules/jquery-pjax/jquery.pjax.js', 'node_modules/bootbox/bootbox.js', 'node_modules/bootstrap/dist/js/bootstrap.min.js', 'js/application.js', filters='jsmin', output='gen/p...
from flask_assets import Bundle, Environment, Filter # fixes missing semicolon in last statement of jquery.pjax.js class ConcatFilter(Filter): def concat(self, out, hunks, **kw): out.write(';'.join([h.data() for h, info in hunks])) js = Bundle( 'node_modules/jquery/dist/jquery.js', 'node_modules/j...
from flask_assets import Bundle, Environment js = Bundle( 'node_modules/jquery/dist/jquery.js', 'node_modules/jquery-pjax/jquery.pjax.js', 'node_modules/bootbox/bootbox.js', 'node_modules/bootstrap/dist/js/bootstrap.min.js', 'js/application.js', filters='jsmin', output='gen/packed.js' ) css...
<commit_before>from flask_assets import Bundle, Environment js = Bundle( 'node_modules/jquery/dist/jquery.js', 'node_modules/jquery-pjax/jquery.pjax.js', 'node_modules/bootbox/bootbox.js', 'node_modules/bootstrap/dist/js/bootstrap.min.js', 'js/application.js', filters='jsmin', output='gen/p...
d1a4796ee349f7233a9c766a4162d71e598c6327
test/expression_command/persistent_variables/TestPersistentVariables.py
test/expression_command/persistent_variables/TestPersistentVariables.py
""" Test that lldb persistent variables works correctly. """ import os, time import unittest2 import lldb from lldbtest import * class PersistentVariablesTestCase(TestBase): mydir = os.path.join("expression_command", "persistent_variables") def test_persistent_variables(self): """Test that lldb pers...
""" Test that lldb persistent variables works correctly. """ import os, time import unittest2 import lldb from lldbtest import * class PersistentVariablesTestCase(TestBase): mydir = os.path.join("expression_command", "persistent_variables") def test_persistent_variables(self): """Test that lldb pers...
Change the golden output so that merely evaluating an existing persistent variable does not result in a newly created persistent variable. The old one is returned, instead.
Change the golden output so that merely evaluating an existing persistent variable does not result in a newly created persistent variable. The old one is returned, instead. git-svn-id: b33bab8abb5b18c12ee100cd7761ab452d00b2b0@121775 91177308-0d34-0410-b5e6-96231b3b80d8
Python
apache-2.0
llvm-mirror/lldb,llvm-mirror/lldb,apple/swift-lldb,llvm-mirror/lldb,apple/swift-lldb,llvm-mirror/lldb,llvm-mirror/lldb,apple/swift-lldb,apple/swift-lldb,apple/swift-lldb,apple/swift-lldb
""" Test that lldb persistent variables works correctly. """ import os, time import unittest2 import lldb from lldbtest import * class PersistentVariablesTestCase(TestBase): mydir = os.path.join("expression_command", "persistent_variables") def test_persistent_variables(self): """Test that lldb pers...
""" Test that lldb persistent variables works correctly. """ import os, time import unittest2 import lldb from lldbtest import * class PersistentVariablesTestCase(TestBase): mydir = os.path.join("expression_command", "persistent_variables") def test_persistent_variables(self): """Test that lldb pers...
<commit_before>""" Test that lldb persistent variables works correctly. """ import os, time import unittest2 import lldb from lldbtest import * class PersistentVariablesTestCase(TestBase): mydir = os.path.join("expression_command", "persistent_variables") def test_persistent_variables(self): """Test...
""" Test that lldb persistent variables works correctly. """ import os, time import unittest2 import lldb from lldbtest import * class PersistentVariablesTestCase(TestBase): mydir = os.path.join("expression_command", "persistent_variables") def test_persistent_variables(self): """Test that lldb pers...
""" Test that lldb persistent variables works correctly. """ import os, time import unittest2 import lldb from lldbtest import * class PersistentVariablesTestCase(TestBase): mydir = os.path.join("expression_command", "persistent_variables") def test_persistent_variables(self): """Test that lldb pers...
<commit_before>""" Test that lldb persistent variables works correctly. """ import os, time import unittest2 import lldb from lldbtest import * class PersistentVariablesTestCase(TestBase): mydir = os.path.join("expression_command", "persistent_variables") def test_persistent_variables(self): """Test...
5168d4256bdfac937be62c8dc509a79a4ba9101c
pythran/tests/rosetta/average_loop_length.py
pythran/tests/rosetta/average_loop_length.py
#from http://rosettacode.org/wiki/Average_loop_length#Python #pythran export analytical(int) #pythran export testing(int, int) #runas analytical(10) #runas testing(10, 100) #from __future__ import division # Only necessary for Python 2.X from math import factorial from random import randrange def analytical(n): retu...
#from http://rosettacode.org/wiki/Average_loop_length#Python #pythran export analytical(int) #pythran export testing(int, int) #runas analytical(10) #runas avg = testing(10, 10**5); theory = analytical(10); abs((avg / theory - 1) * 100) < 0.1 #from __future__ import division # Only necessary for Python 2.X from math i...
Fix test to have less random result
Fix test to have less random result
Python
bsd-3-clause
hainm/pythran,artas360/pythran,pombredanne/pythran,serge-sans-paille/pythran,artas360/pythran,pombredanne/pythran,pombredanne/pythran,pbrunet/pythran,hainm/pythran,pbrunet/pythran,pbrunet/pythran,artas360/pythran,serge-sans-paille/pythran,hainm/pythran
#from http://rosettacode.org/wiki/Average_loop_length#Python #pythran export analytical(int) #pythran export testing(int, int) #runas analytical(10) #runas testing(10, 100) #from __future__ import division # Only necessary for Python 2.X from math import factorial from random import randrange def analytical(n): retu...
#from http://rosettacode.org/wiki/Average_loop_length#Python #pythran export analytical(int) #pythran export testing(int, int) #runas analytical(10) #runas avg = testing(10, 10**5); theory = analytical(10); abs((avg / theory - 1) * 100) < 0.1 #from __future__ import division # Only necessary for Python 2.X from math i...
<commit_before>#from http://rosettacode.org/wiki/Average_loop_length#Python #pythran export analytical(int) #pythran export testing(int, int) #runas analytical(10) #runas testing(10, 100) #from __future__ import division # Only necessary for Python 2.X from math import factorial from random import randrange def analy...
#from http://rosettacode.org/wiki/Average_loop_length#Python #pythran export analytical(int) #pythran export testing(int, int) #runas analytical(10) #runas avg = testing(10, 10**5); theory = analytical(10); abs((avg / theory - 1) * 100) < 0.1 #from __future__ import division # Only necessary for Python 2.X from math i...
#from http://rosettacode.org/wiki/Average_loop_length#Python #pythran export analytical(int) #pythran export testing(int, int) #runas analytical(10) #runas testing(10, 100) #from __future__ import division # Only necessary for Python 2.X from math import factorial from random import randrange def analytical(n): retu...
<commit_before>#from http://rosettacode.org/wiki/Average_loop_length#Python #pythran export analytical(int) #pythran export testing(int, int) #runas analytical(10) #runas testing(10, 100) #from __future__ import division # Only necessary for Python 2.X from math import factorial from random import randrange def analy...
bd5f6ac7a9b801b53e7f7e0d4d84301a8f8652ef
program.py
program.py
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 import requests from requests.auth import HTTPBasicAuth 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() pl...
Update function to get player stats using base_url
Update function to get player stats using base_url
Python
mit
prcutler/nflpool,prcutler/nflpool
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 import requests from requests.auth import HTTPBasicAuth 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() pl...
<commit_before>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 Divis...
import json import csv import requests from requests.auth import HTTPBasicAuth 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() pl...
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 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 Divis...
9c4bdc15c14e430edadff8a15c7f2db8a90cd90f
src/apps/core/context_processors.py
src/apps/core/context_processors.py
from django.conf import settings def static(request): """Provides a context variable that differentiates between the base JavaScript URL when in debug mode vs. not. """ CSS_URL = '{}stylesheets/css/'.format(settings.STATIC_URL) JAVASCRIPT_URL = '{}scripts/javascript/'.format(settings.STATIC_URL...
import os from django.conf import settings def static(request): "Shorthand static URLs. In debug mode, the JavaScript is not minified." static_url = settings.STATIC_URL prefix = 'src' if settings.DEBUG else 'min' return { 'CSS_URL': os.path.join(static_url, 'stylesheets/css'), 'IMAGES_U...
Clean up core static context processor
Clean up core static context processor
Python
bsd-2-clause
bruth/wicked-django-template,bruth/wicked-django-template,bruth/wicked-django-template
from django.conf import settings def static(request): """Provides a context variable that differentiates between the base JavaScript URL when in debug mode vs. not. """ CSS_URL = '{}stylesheets/css/'.format(settings.STATIC_URL) JAVASCRIPT_URL = '{}scripts/javascript/'.format(settings.STATIC_URL...
import os from django.conf import settings def static(request): "Shorthand static URLs. In debug mode, the JavaScript is not minified." static_url = settings.STATIC_URL prefix = 'src' if settings.DEBUG else 'min' return { 'CSS_URL': os.path.join(static_url, 'stylesheets/css'), 'IMAGES_U...
<commit_before>from django.conf import settings def static(request): """Provides a context variable that differentiates between the base JavaScript URL when in debug mode vs. not. """ CSS_URL = '{}stylesheets/css/'.format(settings.STATIC_URL) JAVASCRIPT_URL = '{}scripts/javascript/'.format(sett...
import os from django.conf import settings def static(request): "Shorthand static URLs. In debug mode, the JavaScript is not minified." static_url = settings.STATIC_URL prefix = 'src' if settings.DEBUG else 'min' return { 'CSS_URL': os.path.join(static_url, 'stylesheets/css'), 'IMAGES_U...
from django.conf import settings def static(request): """Provides a context variable that differentiates between the base JavaScript URL when in debug mode vs. not. """ CSS_URL = '{}stylesheets/css/'.format(settings.STATIC_URL) JAVASCRIPT_URL = '{}scripts/javascript/'.format(settings.STATIC_URL...
<commit_before>from django.conf import settings def static(request): """Provides a context variable that differentiates between the base JavaScript URL when in debug mode vs. not. """ CSS_URL = '{}stylesheets/css/'.format(settings.STATIC_URL) JAVASCRIPT_URL = '{}scripts/javascript/'.format(sett...
e53574e699203eb36ee6f2a22539a340605b61d4
mockthink/test/conftest.py
mockthink/test/conftest.py
# coding: utf-8 from __future__ import absolute_import, division, print_function, unicode_literals import pytest import rethinkdb from mockthink import MockThink from mockthink.test.common import as_db_and_table, load_stock_data def pytest_addoption(parser): group = parser.getgroup("mockthink", "Mockthink Test...
# coding: utf-8 from __future__ import absolute_import, division, print_function, unicode_literals import pytest import rethinkdb from mockthink import MockThink from mockthink.test.common import as_db_and_table, load_stock_data def pytest_addoption(parser): group = parser.getgroup("mockthink", "Mockthink Test...
Switch pytest fixture to function scope
Switch pytest fixture to function scope Still use the class's get_data method for fixture data
Python
mit
scivey/mockthink,deadscivey/mockthink
# coding: utf-8 from __future__ import absolute_import, division, print_function, unicode_literals import pytest import rethinkdb from mockthink import MockThink from mockthink.test.common import as_db_and_table, load_stock_data def pytest_addoption(parser): group = parser.getgroup("mockthink", "Mockthink Test...
# coding: utf-8 from __future__ import absolute_import, division, print_function, unicode_literals import pytest import rethinkdb from mockthink import MockThink from mockthink.test.common import as_db_and_table, load_stock_data def pytest_addoption(parser): group = parser.getgroup("mockthink", "Mockthink Test...
<commit_before># coding: utf-8 from __future__ import absolute_import, division, print_function, unicode_literals import pytest import rethinkdb from mockthink import MockThink from mockthink.test.common import as_db_and_table, load_stock_data def pytest_addoption(parser): group = parser.getgroup("mockthink", ...
# coding: utf-8 from __future__ import absolute_import, division, print_function, unicode_literals import pytest import rethinkdb from mockthink import MockThink from mockthink.test.common import as_db_and_table, load_stock_data def pytest_addoption(parser): group = parser.getgroup("mockthink", "Mockthink Test...
# coding: utf-8 from __future__ import absolute_import, division, print_function, unicode_literals import pytest import rethinkdb from mockthink import MockThink from mockthink.test.common import as_db_and_table, load_stock_data def pytest_addoption(parser): group = parser.getgroup("mockthink", "Mockthink Test...
<commit_before># coding: utf-8 from __future__ import absolute_import, division, print_function, unicode_literals import pytest import rethinkdb from mockthink import MockThink from mockthink.test.common import as_db_and_table, load_stock_data def pytest_addoption(parser): group = parser.getgroup("mockthink", ...
52d9ed9c08ef0686a891e3428349b70d74a7ecf8
scripts/munge_fah_data.py
scripts/munge_fah_data.py
import numpy as np import os import glob import mdtraj as md import fahmunge import pandas as pd projects = pd.read_csv("./projects.csv", index_col=0) output_path = "/data/choderalab/fah/munged/" for (project, location, pdb) in projects.itertuples(): print(project, location, pdb) allatom_output_path = os.path...
import numpy as np import os import glob import mdtraj as md import fahmunge import pandas as pd projects = pd.read_csv("./projects.csv", index_col=0) output_path = "/data/choderalab/fah/munged/" for (project, location, pdb) in projects.itertuples(): print(project, location, pdb) allatom_output_path = os.path...
Change output data structure to support faster rsync
Change output data structure to support faster rsync
Python
lgpl-2.1
steven-albanese/FAHMunge,kyleabeauchamp/FAHMunge,choderalab/FAHMunge
import numpy as np import os import glob import mdtraj as md import fahmunge import pandas as pd projects = pd.read_csv("./projects.csv", index_col=0) output_path = "/data/choderalab/fah/munged/" for (project, location, pdb) in projects.itertuples(): print(project, location, pdb) allatom_output_path = os.path...
import numpy as np import os import glob import mdtraj as md import fahmunge import pandas as pd projects = pd.read_csv("./projects.csv", index_col=0) output_path = "/data/choderalab/fah/munged/" for (project, location, pdb) in projects.itertuples(): print(project, location, pdb) allatom_output_path = os.path...
<commit_before>import numpy as np import os import glob import mdtraj as md import fahmunge import pandas as pd projects = pd.read_csv("./projects.csv", index_col=0) output_path = "/data/choderalab/fah/munged/" for (project, location, pdb) in projects.itertuples(): print(project, location, pdb) allatom_output...
import numpy as np import os import glob import mdtraj as md import fahmunge import pandas as pd projects = pd.read_csv("./projects.csv", index_col=0) output_path = "/data/choderalab/fah/munged/" for (project, location, pdb) in projects.itertuples(): print(project, location, pdb) allatom_output_path = os.path...
import numpy as np import os import glob import mdtraj as md import fahmunge import pandas as pd projects = pd.read_csv("./projects.csv", index_col=0) output_path = "/data/choderalab/fah/munged/" for (project, location, pdb) in projects.itertuples(): print(project, location, pdb) allatom_output_path = os.path...
<commit_before>import numpy as np import os import glob import mdtraj as md import fahmunge import pandas as pd projects = pd.read_csv("./projects.csv", index_col=0) output_path = "/data/choderalab/fah/munged/" for (project, location, pdb) in projects.itertuples(): print(project, location, pdb) allatom_output...
5ecde010ed93f5017a15899c53dbfdfc054d907f
indra/sources/hume/api.py
indra/sources/hume/api.py
__all__ = ['process_jsonld_file', 'process_jsonld'] import json import logging from indra.sources.hume import processor logger = logging.getLogger(__name__) def process_jsonld_file(fname): """Process a JSON-LD file in the new format to extract Statements. Parameters ---------- fname : str T...
__all__ = ['process_jsonld_file', 'process_jsonld'] import json import logging from indra.sources.hume import processor logger = logging.getLogger(__name__) def process_jsonld_file(fname): """Process a JSON-LD file in the new format to extract Statements. Parameters ---------- fname : str T...
Add encoding parameter to open jsonld
Add encoding parameter to open jsonld
Python
bsd-2-clause
johnbachman/belpy,sorgerlab/belpy,bgyori/indra,sorgerlab/indra,johnbachman/indra,johnbachman/indra,johnbachman/indra,sorgerlab/indra,sorgerlab/belpy,sorgerlab/indra,bgyori/indra,johnbachman/belpy,sorgerlab/belpy,bgyori/indra,johnbachman/belpy
__all__ = ['process_jsonld_file', 'process_jsonld'] import json import logging from indra.sources.hume import processor logger = logging.getLogger(__name__) def process_jsonld_file(fname): """Process a JSON-LD file in the new format to extract Statements. Parameters ---------- fname : str T...
__all__ = ['process_jsonld_file', 'process_jsonld'] import json import logging from indra.sources.hume import processor logger = logging.getLogger(__name__) def process_jsonld_file(fname): """Process a JSON-LD file in the new format to extract Statements. Parameters ---------- fname : str T...
<commit_before>__all__ = ['process_jsonld_file', 'process_jsonld'] import json import logging from indra.sources.hume import processor logger = logging.getLogger(__name__) def process_jsonld_file(fname): """Process a JSON-LD file in the new format to extract Statements. Parameters ---------- fname ...
__all__ = ['process_jsonld_file', 'process_jsonld'] import json import logging from indra.sources.hume import processor logger = logging.getLogger(__name__) def process_jsonld_file(fname): """Process a JSON-LD file in the new format to extract Statements. Parameters ---------- fname : str T...
__all__ = ['process_jsonld_file', 'process_jsonld'] import json import logging from indra.sources.hume import processor logger = logging.getLogger(__name__) def process_jsonld_file(fname): """Process a JSON-LD file in the new format to extract Statements. Parameters ---------- fname : str T...
<commit_before>__all__ = ['process_jsonld_file', 'process_jsonld'] import json import logging from indra.sources.hume import processor logger = logging.getLogger(__name__) def process_jsonld_file(fname): """Process a JSON-LD file in the new format to extract Statements. Parameters ---------- fname ...
2ab74cdb6adc979195f6ba60d5f8e9bf9dd4b74d
scikits/learn/__init__.py
scikits/learn/__init__.py
""" Machine Learning module in python ================================= scikits.learn is a Python module integrating classique machine learning algorithms in the tightly-nit world of scientific Python packages (numpy, scipy, matplotlib). It aims to provide simple and efficient solutions to learning problems that are ...
""" Machine Learning module in python ================================= scikits.learn is a Python module integrating classique machine learning algorithms in the tightly-nit world of scientific Python packages (numpy, scipy, matplotlib). It aims to provide simple and efficient solutions to learning problems that are ...
Add a tester to the scikit.
ENH: Add a tester to the scikit.
Python
bsd-3-clause
alexsavio/scikit-learn,joernhees/scikit-learn,shikhardb/scikit-learn,poryfly/scikit-learn,costypetrisor/scikit-learn,treycausey/scikit-learn,stylianos-kampakis/scikit-learn,alexsavio/scikit-learn,bigdataelephants/scikit-learn,costypetrisor/scikit-learn,stylianos-kampakis/scikit-learn,liangz0707/scikit-learn,nmayorov/sc...
""" Machine Learning module in python ================================= scikits.learn is a Python module integrating classique machine learning algorithms in the tightly-nit world of scientific Python packages (numpy, scipy, matplotlib). It aims to provide simple and efficient solutions to learning problems that are ...
""" Machine Learning module in python ================================= scikits.learn is a Python module integrating classique machine learning algorithms in the tightly-nit world of scientific Python packages (numpy, scipy, matplotlib). It aims to provide simple and efficient solutions to learning problems that are ...
<commit_before>""" Machine Learning module in python ================================= scikits.learn is a Python module integrating classique machine learning algorithms in the tightly-nit world of scientific Python packages (numpy, scipy, matplotlib). It aims to provide simple and efficient solutions to learning pro...
""" Machine Learning module in python ================================= scikits.learn is a Python module integrating classique machine learning algorithms in the tightly-nit world of scientific Python packages (numpy, scipy, matplotlib). It aims to provide simple and efficient solutions to learning problems that are ...
""" Machine Learning module in python ================================= scikits.learn is a Python module integrating classique machine learning algorithms in the tightly-nit world of scientific Python packages (numpy, scipy, matplotlib). It aims to provide simple and efficient solutions to learning problems that are ...
<commit_before>""" Machine Learning module in python ================================= scikits.learn is a Python module integrating classique machine learning algorithms in the tightly-nit world of scientific Python packages (numpy, scipy, matplotlib). It aims to provide simple and efficient solutions to learning pro...
ce2c22fb3616fbfdaf3a5c1f1de3f2fa1fc9f76f
proselint/checks/lilienfeld/terms_to_avoid.py
proselint/checks/lilienfeld/terms_to_avoid.py
# -*- coding: utf-8 -*- """Psychological and psychiatric terms to avoid. --- layout: post source: Scott O. Lilienfeld, et al. source_url: http://dx.doi.org/10.3389/fpsyg.2015.01100 title: psychological and psychiatric terms to avoid date: 2014-06-10 12:31:19 categories: writing --- Psychological an...
# -*- coding: utf-8 -*- """Psychological and psychiatric terms to avoid. --- layout: post source: Scott O. Lilienfeld, et al. source_url: http://dx.doi.org/10.3389/fpsyg.2015.01100 title: psychological and psychiatric terms to avoid date: 2014-06-10 12:31:19 categories: writing --- Psychological an...
Check for p = 0.00
Check for p = 0.00 #149
Python
bsd-3-clause
jstewmon/proselint,amperser/proselint,amperser/proselint,jstewmon/proselint,amperser/proselint,jstewmon/proselint,amperser/proselint,amperser/proselint
# -*- coding: utf-8 -*- """Psychological and psychiatric terms to avoid. --- layout: post source: Scott O. Lilienfeld, et al. source_url: http://dx.doi.org/10.3389/fpsyg.2015.01100 title: psychological and psychiatric terms to avoid date: 2014-06-10 12:31:19 categories: writing --- Psychological an...
# -*- coding: utf-8 -*- """Psychological and psychiatric terms to avoid. --- layout: post source: Scott O. Lilienfeld, et al. source_url: http://dx.doi.org/10.3389/fpsyg.2015.01100 title: psychological and psychiatric terms to avoid date: 2014-06-10 12:31:19 categories: writing --- Psychological an...
<commit_before># -*- coding: utf-8 -*- """Psychological and psychiatric terms to avoid. --- layout: post source: Scott O. Lilienfeld, et al. source_url: http://dx.doi.org/10.3389/fpsyg.2015.01100 title: psychological and psychiatric terms to avoid date: 2014-06-10 12:31:19 categories: writing --- P...
# -*- coding: utf-8 -*- """Psychological and psychiatric terms to avoid. --- layout: post source: Scott O. Lilienfeld, et al. source_url: http://dx.doi.org/10.3389/fpsyg.2015.01100 title: psychological and psychiatric terms to avoid date: 2014-06-10 12:31:19 categories: writing --- Psychological an...
# -*- coding: utf-8 -*- """Psychological and psychiatric terms to avoid. --- layout: post source: Scott O. Lilienfeld, et al. source_url: http://dx.doi.org/10.3389/fpsyg.2015.01100 title: psychological and psychiatric terms to avoid date: 2014-06-10 12:31:19 categories: writing --- Psychological an...
<commit_before># -*- coding: utf-8 -*- """Psychological and psychiatric terms to avoid. --- layout: post source: Scott O. Lilienfeld, et al. source_url: http://dx.doi.org/10.3389/fpsyg.2015.01100 title: psychological and psychiatric terms to avoid date: 2014-06-10 12:31:19 categories: writing --- P...
2abf0e6b9009abd7c34b459ad9e3f2c6223bb043
polyaxon/db/getters/experiment_groups.py
polyaxon/db/getters/experiment_groups.py
import logging from db.models.experiment_groups import ExperimentGroup _logger = logging.getLogger('polyaxon.db') def get_valid_experiment_group(experiment_group_id): try: return ExperimentGroup.objects.get(id=experiment_group_id) except ExperimentGroup.DoesNotExist: _logger.info('Experiment...
import logging from db.models.experiment_groups import ExperimentGroup _logger = logging.getLogger('polyaxon.db') def get_valid_experiment_group(experiment_group_id): try: return ExperimentGroup.objects.get(id=experiment_group_id) except ExperimentGroup.DoesNotExist: _logger.info('Experiment...
Add condition to check if experiment group exists before checking status
Add condition to check if experiment group exists before checking status
Python
apache-2.0
polyaxon/polyaxon,polyaxon/polyaxon,polyaxon/polyaxon
import logging from db.models.experiment_groups import ExperimentGroup _logger = logging.getLogger('polyaxon.db') def get_valid_experiment_group(experiment_group_id): try: return ExperimentGroup.objects.get(id=experiment_group_id) except ExperimentGroup.DoesNotExist: _logger.info('Experiment...
import logging from db.models.experiment_groups import ExperimentGroup _logger = logging.getLogger('polyaxon.db') def get_valid_experiment_group(experiment_group_id): try: return ExperimentGroup.objects.get(id=experiment_group_id) except ExperimentGroup.DoesNotExist: _logger.info('Experiment...
<commit_before>import logging from db.models.experiment_groups import ExperimentGroup _logger = logging.getLogger('polyaxon.db') def get_valid_experiment_group(experiment_group_id): try: return ExperimentGroup.objects.get(id=experiment_group_id) except ExperimentGroup.DoesNotExist: _logger.i...
import logging from db.models.experiment_groups import ExperimentGroup _logger = logging.getLogger('polyaxon.db') def get_valid_experiment_group(experiment_group_id): try: return ExperimentGroup.objects.get(id=experiment_group_id) except ExperimentGroup.DoesNotExist: _logger.info('Experiment...
import logging from db.models.experiment_groups import ExperimentGroup _logger = logging.getLogger('polyaxon.db') def get_valid_experiment_group(experiment_group_id): try: return ExperimentGroup.objects.get(id=experiment_group_id) except ExperimentGroup.DoesNotExist: _logger.info('Experiment...
<commit_before>import logging from db.models.experiment_groups import ExperimentGroup _logger = logging.getLogger('polyaxon.db') def get_valid_experiment_group(experiment_group_id): try: return ExperimentGroup.objects.get(id=experiment_group_id) except ExperimentGroup.DoesNotExist: _logger.i...
fbf25d0e190e660c0be31b615c0753d62358ad46
settings/settings.py
settings/settings.py
from django.utils import timezone from settings.models import Setting from utils.dates import string_to_datetime class Settings: def __init__(self, values=None): if values is None: return settings = Setting.objects.filter(name__in=values) self.__dict__['settings'] = dict((o.na...
from django.utils import timezone from settings.models import Setting from utils.dates import string_to_datetime class Settings: def __init__(self, values=None): if values is None: return settings = Setting.objects.filter(name__in=values) self.__dict__['settings'] = dict((o.na...
Simplify Settings code a little bit
Simplify Settings code a little bit - Fixes error 500 on homepage with clean database
Python
agpl-3.0
m4tx/egielda,m4tx/egielda,m4tx/egielda
from django.utils import timezone from settings.models import Setting from utils.dates import string_to_datetime class Settings: def __init__(self, values=None): if values is None: return settings = Setting.objects.filter(name__in=values) self.__dict__['settings'] = dict((o.na...
from django.utils import timezone from settings.models import Setting from utils.dates import string_to_datetime class Settings: def __init__(self, values=None): if values is None: return settings = Setting.objects.filter(name__in=values) self.__dict__['settings'] = dict((o.na...
<commit_before>from django.utils import timezone from settings.models import Setting from utils.dates import string_to_datetime class Settings: def __init__(self, values=None): if values is None: return settings = Setting.objects.filter(name__in=values) self.__dict__['settings...
from django.utils import timezone from settings.models import Setting from utils.dates import string_to_datetime class Settings: def __init__(self, values=None): if values is None: return settings = Setting.objects.filter(name__in=values) self.__dict__['settings'] = dict((o.na...
from django.utils import timezone from settings.models import Setting from utils.dates import string_to_datetime class Settings: def __init__(self, values=None): if values is None: return settings = Setting.objects.filter(name__in=values) self.__dict__['settings'] = dict((o.na...
<commit_before>from django.utils import timezone from settings.models import Setting from utils.dates import string_to_datetime class Settings: def __init__(self, values=None): if values is None: return settings = Setting.objects.filter(name__in=values) self.__dict__['settings...