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
358b40875647734bb25d2b9e25506d13ca60a740
neuroimaging/utils/tests/data/__init__.py
neuroimaging/utils/tests/data/__init__.py
"""Information used for locating nipy test data. Nipy uses a set of test data that is installed separately. The test data should be located in the directory ``~/.nipy/tests/data``. Install the data in your home directory from the data repository:: $ mkdir -p .nipy/tests/data $ svn co http://neuroimaging.scipy.or...
""" Nipy uses a set of test data that is installed separately. The test data should be located in the directory ``~/.nipy/tests/data``. Install the data in your home directory from the data repository:: $ mkdir -p .nipy/tests/data $ svn co http://neuroimaging.scipy.org/svn/ni/data/trunk/fmri .nipy/tests/data """...
Extend error message regarding missing test data.
Extend error message regarding missing test data.
Python
bsd-3-clause
yarikoptic/NiPy-OLD,yarikoptic/NiPy-OLD
"""Information used for locating nipy test data. Nipy uses a set of test data that is installed separately. The test data should be located in the directory ``~/.nipy/tests/data``. Install the data in your home directory from the data repository:: $ mkdir -p .nipy/tests/data $ svn co http://neuroimaging.scipy.or...
""" Nipy uses a set of test data that is installed separately. The test data should be located in the directory ``~/.nipy/tests/data``. Install the data in your home directory from the data repository:: $ mkdir -p .nipy/tests/data $ svn co http://neuroimaging.scipy.org/svn/ni/data/trunk/fmri .nipy/tests/data """...
<commit_before>"""Information used for locating nipy test data. Nipy uses a set of test data that is installed separately. The test data should be located in the directory ``~/.nipy/tests/data``. Install the data in your home directory from the data repository:: $ mkdir -p .nipy/tests/data $ svn co http://neuroi...
""" Nipy uses a set of test data that is installed separately. The test data should be located in the directory ``~/.nipy/tests/data``. Install the data in your home directory from the data repository:: $ mkdir -p .nipy/tests/data $ svn co http://neuroimaging.scipy.org/svn/ni/data/trunk/fmri .nipy/tests/data """...
"""Information used for locating nipy test data. Nipy uses a set of test data that is installed separately. The test data should be located in the directory ``~/.nipy/tests/data``. Install the data in your home directory from the data repository:: $ mkdir -p .nipy/tests/data $ svn co http://neuroimaging.scipy.or...
<commit_before>"""Information used for locating nipy test data. Nipy uses a set of test data that is installed separately. The test data should be located in the directory ``~/.nipy/tests/data``. Install the data in your home directory from the data repository:: $ mkdir -p .nipy/tests/data $ svn co http://neuroi...
2430d4ae362ca22ebff83b405355d60343b3a0c1
non_iterable_example/_5_context.py
non_iterable_example/_5_context.py
def print_numbers(numbers): for n in numbers: print(n) if random: numbers = 1 print_numbers(numbers) else: numbers = 1, 2, 3 print_numbers(numbers)
def print_numbers(flag, numbers): if flag: for n in numbers: print(n) if random: numbers = 1 print_numbers(False, numbers) else: numbers = 1, 2, 3 print_numbers(True, numbers)
Modify example to emphasise importance of context.
Modify example to emphasise importance of context.
Python
unlicense
markshannon/buggy_code
def print_numbers(numbers): for n in numbers: print(n) if random: numbers = 1 print_numbers(numbers) else: numbers = 1, 2, 3 print_numbers(numbers) Modify example to emphasise importance of context.
def print_numbers(flag, numbers): if flag: for n in numbers: print(n) if random: numbers = 1 print_numbers(False, numbers) else: numbers = 1, 2, 3 print_numbers(True, numbers)
<commit_before> def print_numbers(numbers): for n in numbers: print(n) if random: numbers = 1 print_numbers(numbers) else: numbers = 1, 2, 3 print_numbers(numbers) <commit_msg>Modify example to emphasise importance of context.<commit_after>
def print_numbers(flag, numbers): if flag: for n in numbers: print(n) if random: numbers = 1 print_numbers(False, numbers) else: numbers = 1, 2, 3 print_numbers(True, numbers)
def print_numbers(numbers): for n in numbers: print(n) if random: numbers = 1 print_numbers(numbers) else: numbers = 1, 2, 3 print_numbers(numbers) Modify example to emphasise importance of context. def print_numbers(flag, numbers): if flag: for n in numbers: prin...
<commit_before> def print_numbers(numbers): for n in numbers: print(n) if random: numbers = 1 print_numbers(numbers) else: numbers = 1, 2, 3 print_numbers(numbers) <commit_msg>Modify example to emphasise importance of context.<commit_after> def print_numbers(flag, numbers): if flag: ...
13c6a1527bb5d241989c7b7beb11a48eacc4d69c
tests/unit/http_tests.py
tests/unit/http_tests.py
import unittest, os, sys current_dir = os.path.dirname(__file__) base_dir = os.path.join(current_dir, os.pardir, os.pardir) sys.path.append(base_dir) from requests.exceptions import ConnectionError from pycrawler.http import HttpRequest class HttpRequestTests(unittest.TestCase): def test_response_not_empty(sel...
import unittest, os, sys current_dir = os.path.dirname(__file__) base_dir = os.path.join(current_dir, os.pardir, os.pardir) sys.path.append(base_dir) from pycrawler.http import HttpRequest, UrlNotValidException class HttpRequestTests(unittest.TestCase): def test_response_not_empty(self): url = 'http://...
Change raises class to UrlNotValidException
Change raises class to UrlNotValidException
Python
mit
slaveofcode/pycrawler,slaveofcode/pycrawler
import unittest, os, sys current_dir = os.path.dirname(__file__) base_dir = os.path.join(current_dir, os.pardir, os.pardir) sys.path.append(base_dir) from requests.exceptions import ConnectionError from pycrawler.http import HttpRequest class HttpRequestTests(unittest.TestCase): def test_response_not_empty(sel...
import unittest, os, sys current_dir = os.path.dirname(__file__) base_dir = os.path.join(current_dir, os.pardir, os.pardir) sys.path.append(base_dir) from pycrawler.http import HttpRequest, UrlNotValidException class HttpRequestTests(unittest.TestCase): def test_response_not_empty(self): url = 'http://...
<commit_before>import unittest, os, sys current_dir = os.path.dirname(__file__) base_dir = os.path.join(current_dir, os.pardir, os.pardir) sys.path.append(base_dir) from requests.exceptions import ConnectionError from pycrawler.http import HttpRequest class HttpRequestTests(unittest.TestCase): def test_respons...
import unittest, os, sys current_dir = os.path.dirname(__file__) base_dir = os.path.join(current_dir, os.pardir, os.pardir) sys.path.append(base_dir) from pycrawler.http import HttpRequest, UrlNotValidException class HttpRequestTests(unittest.TestCase): def test_response_not_empty(self): url = 'http://...
import unittest, os, sys current_dir = os.path.dirname(__file__) base_dir = os.path.join(current_dir, os.pardir, os.pardir) sys.path.append(base_dir) from requests.exceptions import ConnectionError from pycrawler.http import HttpRequest class HttpRequestTests(unittest.TestCase): def test_response_not_empty(sel...
<commit_before>import unittest, os, sys current_dir = os.path.dirname(__file__) base_dir = os.path.join(current_dir, os.pardir, os.pardir) sys.path.append(base_dir) from requests.exceptions import ConnectionError from pycrawler.http import HttpRequest class HttpRequestTests(unittest.TestCase): def test_respons...
2ac5befcfe04be0d8406c539f6900c079b561dfd
tests/test_iati_standard.py
tests/test_iati_standard.py
from web_test_base import * class TestIATIStandard(WebTestBase): """ TODO: Add tests to assert that: - the number of activities and publishers roughly matches those displayed on the Registry - a key string appears on the homepage """ requests_to_load = { 'IATI Standard Homepage - no www...
from web_test_base import * class TestIATIStandard(WebTestBase): """ TODO: Add tests to assert that: - the number of activities and publishers roughly matches those displayed on the Registry - a key string appears on the homepage """ requests_to_load = { 'IATI Standard Homepage - no www...
Change test name to be more descriptive
Change test name to be more descriptive Also better conforms to the naming conventions for other tests in this module.
Python
mit
IATI/IATI-Website-Tests
from web_test_base import * class TestIATIStandard(WebTestBase): """ TODO: Add tests to assert that: - the number of activities and publishers roughly matches those displayed on the Registry - a key string appears on the homepage """ requests_to_load = { 'IATI Standard Homepage - no www...
from web_test_base import * class TestIATIStandard(WebTestBase): """ TODO: Add tests to assert that: - the number of activities and publishers roughly matches those displayed on the Registry - a key string appears on the homepage """ requests_to_load = { 'IATI Standard Homepage - no www...
<commit_before>from web_test_base import * class TestIATIStandard(WebTestBase): """ TODO: Add tests to assert that: - the number of activities and publishers roughly matches those displayed on the Registry - a key string appears on the homepage """ requests_to_load = { 'IATI Standard Ho...
from web_test_base import * class TestIATIStandard(WebTestBase): """ TODO: Add tests to assert that: - the number of activities and publishers roughly matches those displayed on the Registry - a key string appears on the homepage """ requests_to_load = { 'IATI Standard Homepage - no www...
from web_test_base import * class TestIATIStandard(WebTestBase): """ TODO: Add tests to assert that: - the number of activities and publishers roughly matches those displayed on the Registry - a key string appears on the homepage """ requests_to_load = { 'IATI Standard Homepage - no www...
<commit_before>from web_test_base import * class TestIATIStandard(WebTestBase): """ TODO: Add tests to assert that: - the number of activities and publishers roughly matches those displayed on the Registry - a key string appears on the homepage """ requests_to_load = { 'IATI Standard Ho...
53cb3adb97bb434a896938c2c7f78109e5b5566f
tests/test_identify_repo.py
tests/test_identify_repo.py
#!/usr/bin/env python # -*- coding: utf-8 -*- """ test_identify_repo ------------------ """ import pytest from cookiecutter import exceptions, vcs def test_identify_git_github(): repo_url = "https://github.com/audreyr/cookiecutter-pypackage.git" assert vcs.identify_repo(repo_url) == "git" def test_identi...
#!/usr/bin/env python # -*- coding: utf-8 -*- """ test_identify_repo ------------------ """ import pytest from cookiecutter import exceptions, vcs def test_identify_git_github(): repo_url = 'https://github.com/audreyr/cookiecutter-pypackage.git' assert vcs.identify_repo(repo_url) == 'git' def test_identi...
Use single quotes instead of double quotes
Use single quotes instead of double quotes
Python
bsd-3-clause
audreyr/cookiecutter,audreyr/cookiecutter,sp1rs/cookiecutter,lucius-feng/cookiecutter,luzfcb/cookiecutter,christabor/cookiecutter,jhermann/cookiecutter,terryjbates/cookiecutter,cichm/cookiecutter,terryjbates/cookiecutter,Springerle/cookiecutter,venumech/cookiecutter,moi65/cookiecutter,0k/cookiecutter,ramiroluz/cookiecu...
#!/usr/bin/env python # -*- coding: utf-8 -*- """ test_identify_repo ------------------ """ import pytest from cookiecutter import exceptions, vcs def test_identify_git_github(): repo_url = "https://github.com/audreyr/cookiecutter-pypackage.git" assert vcs.identify_repo(repo_url) == "git" def test_identi...
#!/usr/bin/env python # -*- coding: utf-8 -*- """ test_identify_repo ------------------ """ import pytest from cookiecutter import exceptions, vcs def test_identify_git_github(): repo_url = 'https://github.com/audreyr/cookiecutter-pypackage.git' assert vcs.identify_repo(repo_url) == 'git' def test_identi...
<commit_before>#!/usr/bin/env python # -*- coding: utf-8 -*- """ test_identify_repo ------------------ """ import pytest from cookiecutter import exceptions, vcs def test_identify_git_github(): repo_url = "https://github.com/audreyr/cookiecutter-pypackage.git" assert vcs.identify_repo(repo_url) == "git" ...
#!/usr/bin/env python # -*- coding: utf-8 -*- """ test_identify_repo ------------------ """ import pytest from cookiecutter import exceptions, vcs def test_identify_git_github(): repo_url = 'https://github.com/audreyr/cookiecutter-pypackage.git' assert vcs.identify_repo(repo_url) == 'git' def test_identi...
#!/usr/bin/env python # -*- coding: utf-8 -*- """ test_identify_repo ------------------ """ import pytest from cookiecutter import exceptions, vcs def test_identify_git_github(): repo_url = "https://github.com/audreyr/cookiecutter-pypackage.git" assert vcs.identify_repo(repo_url) == "git" def test_identi...
<commit_before>#!/usr/bin/env python # -*- coding: utf-8 -*- """ test_identify_repo ------------------ """ import pytest from cookiecutter import exceptions, vcs def test_identify_git_github(): repo_url = "https://github.com/audreyr/cookiecutter-pypackage.git" assert vcs.identify_repo(repo_url) == "git" ...
6722f037783580f30e94317e1eb8e5c34b0e7719
runtests.py
runtests.py
import os from django.conf import settings os.environ['REUSE_DB'] = '1' if not settings.configured: INSTALLED_APPS = ( 'django.contrib.auth', 'django.contrib.contenttypes', 'django.contrib.sessions', 'django.contrib.messages', 'django_nose', 'markitup', '...
import os from django.conf import settings os.environ['REUSE_DB'] = '1' if not settings.configured: INSTALLED_APPS = ( 'django.contrib.auth', 'django.contrib.contenttypes', 'django.contrib.sessions', 'django.contrib.messages', 'django_nose', 'markitup', '...
Read database user and password from environment.
Read database user and password from environment.
Python
mit
zsiciarz/django-pgallery,zsiciarz/django-pgallery
import os from django.conf import settings os.environ['REUSE_DB'] = '1' if not settings.configured: INSTALLED_APPS = ( 'django.contrib.auth', 'django.contrib.contenttypes', 'django.contrib.sessions', 'django.contrib.messages', 'django_nose', 'markitup', '...
import os from django.conf import settings os.environ['REUSE_DB'] = '1' if not settings.configured: INSTALLED_APPS = ( 'django.contrib.auth', 'django.contrib.contenttypes', 'django.contrib.sessions', 'django.contrib.messages', 'django_nose', 'markitup', '...
<commit_before>import os from django.conf import settings os.environ['REUSE_DB'] = '1' if not settings.configured: INSTALLED_APPS = ( 'django.contrib.auth', 'django.contrib.contenttypes', 'django.contrib.sessions', 'django.contrib.messages', 'django_nose', 'marki...
import os from django.conf import settings os.environ['REUSE_DB'] = '1' if not settings.configured: INSTALLED_APPS = ( 'django.contrib.auth', 'django.contrib.contenttypes', 'django.contrib.sessions', 'django.contrib.messages', 'django_nose', 'markitup', '...
import os from django.conf import settings os.environ['REUSE_DB'] = '1' if not settings.configured: INSTALLED_APPS = ( 'django.contrib.auth', 'django.contrib.contenttypes', 'django.contrib.sessions', 'django.contrib.messages', 'django_nose', 'markitup', '...
<commit_before>import os from django.conf import settings os.environ['REUSE_DB'] = '1' if not settings.configured: INSTALLED_APPS = ( 'django.contrib.auth', 'django.contrib.contenttypes', 'django.contrib.sessions', 'django.contrib.messages', 'django_nose', 'marki...
29041cdaf3beca926f1dff1d3f147b7dc07ad8dd
pylp/cli/run.py
pylp/cli/run.py
""" Run a pylpfile. Copyright (C) 2017 The Pylp Authors. This file is under the MIT License. """ import runpy, os, sys import traceback import asyncio import pylp, pylp.cli.logger as logger # Run a pylpfile def run(path, tasks): # Test if the pylpfile exists if not os.path.isfile(path): logger.log(logger.red(...
""" Run a pylpfile. Copyright (C) 2017 The Pylp Authors. This file is under the MIT License. """ import runpy, os, sys import traceback import asyncio import pylp import pylp.cli.logger as logger from pylp.utils.paths import make_readable_path # Run a pylpfile def run(path, tasks): # Test if the pylpfile exists ...
Make pylpfile path more readable
Make pylpfile path more readable
Python
mit
pylp/pylp
""" Run a pylpfile. Copyright (C) 2017 The Pylp Authors. This file is under the MIT License. """ import runpy, os, sys import traceback import asyncio import pylp, pylp.cli.logger as logger # Run a pylpfile def run(path, tasks): # Test if the pylpfile exists if not os.path.isfile(path): logger.log(logger.red(...
""" Run a pylpfile. Copyright (C) 2017 The Pylp Authors. This file is under the MIT License. """ import runpy, os, sys import traceback import asyncio import pylp import pylp.cli.logger as logger from pylp.utils.paths import make_readable_path # Run a pylpfile def run(path, tasks): # Test if the pylpfile exists ...
<commit_before>""" Run a pylpfile. Copyright (C) 2017 The Pylp Authors. This file is under the MIT License. """ import runpy, os, sys import traceback import asyncio import pylp, pylp.cli.logger as logger # Run a pylpfile def run(path, tasks): # Test if the pylpfile exists if not os.path.isfile(path): logger....
""" Run a pylpfile. Copyright (C) 2017 The Pylp Authors. This file is under the MIT License. """ import runpy, os, sys import traceback import asyncio import pylp import pylp.cli.logger as logger from pylp.utils.paths import make_readable_path # Run a pylpfile def run(path, tasks): # Test if the pylpfile exists ...
""" Run a pylpfile. Copyright (C) 2017 The Pylp Authors. This file is under the MIT License. """ import runpy, os, sys import traceback import asyncio import pylp, pylp.cli.logger as logger # Run a pylpfile def run(path, tasks): # Test if the pylpfile exists if not os.path.isfile(path): logger.log(logger.red(...
<commit_before>""" Run a pylpfile. Copyright (C) 2017 The Pylp Authors. This file is under the MIT License. """ import runpy, os, sys import traceback import asyncio import pylp, pylp.cli.logger as logger # Run a pylpfile def run(path, tasks): # Test if the pylpfile exists if not os.path.isfile(path): logger....
90f851b6af1f558cdfb8d5d69b65742effdbdb81
uchicagohvz/production_settings.py
uchicagohvz/production_settings.py
from local_settings import * DEBUG = False ALLOWED_HOSTS = ['uchicagohvz.org'] # Database DATABASES = { 'default': { 'ENGINE': 'django.db.backends.postgresql_psycopg2', # Add 'postgresql_psycopg2', 'postgresql', 'mysql', 'sqlite3' or 'oracle'. 'NAME': 'uchicagohvz', # Or path...
from local_settings import * DEBUG = False ALLOWED_HOSTS = ['uchicagohvz.org'] ADMINS = ( ('Administrator', '[email protected]'), ) # Database DATABASES = { 'default': { 'ENGINE': 'django.db.backends.postgresql_psycopg2', # Add 'postgresql_psycopg2', 'postgresql', 'mysql', 'sqlite3' or 'oracle'....
Add ADMINS to production settings
Add ADMINS to production settings
Python
mit
kz26/uchicago-hvz,kz26/uchicago-hvz,kz26/uchicago-hvz
from local_settings import * DEBUG = False ALLOWED_HOSTS = ['uchicagohvz.org'] # Database DATABASES = { 'default': { 'ENGINE': 'django.db.backends.postgresql_psycopg2', # Add 'postgresql_psycopg2', 'postgresql', 'mysql', 'sqlite3' or 'oracle'. 'NAME': 'uchicagohvz', # Or path...
from local_settings import * DEBUG = False ALLOWED_HOSTS = ['uchicagohvz.org'] ADMINS = ( ('Administrator', '[email protected]'), ) # Database DATABASES = { 'default': { 'ENGINE': 'django.db.backends.postgresql_psycopg2', # Add 'postgresql_psycopg2', 'postgresql', 'mysql', 'sqlite3' or 'oracle'....
<commit_before>from local_settings import * DEBUG = False ALLOWED_HOSTS = ['uchicagohvz.org'] # Database DATABASES = { 'default': { 'ENGINE': 'django.db.backends.postgresql_psycopg2', # Add 'postgresql_psycopg2', 'postgresql', 'mysql', 'sqlite3' or 'oracle'. 'NAME': 'uchicagohvz', ...
from local_settings import * DEBUG = False ALLOWED_HOSTS = ['uchicagohvz.org'] ADMINS = ( ('Administrator', '[email protected]'), ) # Database DATABASES = { 'default': { 'ENGINE': 'django.db.backends.postgresql_psycopg2', # Add 'postgresql_psycopg2', 'postgresql', 'mysql', 'sqlite3' or 'oracle'....
from local_settings import * DEBUG = False ALLOWED_HOSTS = ['uchicagohvz.org'] # Database DATABASES = { 'default': { 'ENGINE': 'django.db.backends.postgresql_psycopg2', # Add 'postgresql_psycopg2', 'postgresql', 'mysql', 'sqlite3' or 'oracle'. 'NAME': 'uchicagohvz', # Or path...
<commit_before>from local_settings import * DEBUG = False ALLOWED_HOSTS = ['uchicagohvz.org'] # Database DATABASES = { 'default': { 'ENGINE': 'django.db.backends.postgresql_psycopg2', # Add 'postgresql_psycopg2', 'postgresql', 'mysql', 'sqlite3' or 'oracle'. 'NAME': 'uchicagohvz', ...
0db7179ac218d9f84298ce3277b13f591d2a4f07
troposphere/datapipeline.py
troposphere/datapipeline.py
from . import AWSObject, AWSProperty, Ref from .validators import boolean class ParameterObjectAttribute(AWSProperty): props = { 'Key': (basestring, True), 'StringValue': (basestring, False), } class ParameterObject(AWSProperty): props = { 'Attributes': ([ParameterObjectAttribute...
from . import AWSObject, AWSProperty, Ref from .validators import boolean class ParameterObjectAttribute(AWSProperty): props = { 'Key': (basestring, True), 'StringValue': (basestring, False), } class ParameterObject(AWSProperty): props = { 'Attributes': ([ParameterObjectAttribute...
Revert "Allow Ref in StringValue"
Revert "Allow Ref in StringValue" This reverts commit a1957fb04118ce13f2cb37a52bc93718eed0ae41.
Python
bsd-2-clause
kid/troposphere,dmm92/troposphere,7digital/troposphere,inetCatapult/troposphere,mannytoledo/troposphere,Yipit/troposphere,ccortezb/troposphere,alonsodomin/troposphere,wangqiang8511/troposphere,ptoraskar/troposphere,alonsodomin/troposphere,amosshapira/troposphere,cloudtools/troposphere,xxxVxxx/troposphere,johnctitus/tro...
from . import AWSObject, AWSProperty, Ref from .validators import boolean class ParameterObjectAttribute(AWSProperty): props = { 'Key': (basestring, True), 'StringValue': (basestring, False), } class ParameterObject(AWSProperty): props = { 'Attributes': ([ParameterObjectAttribute...
from . import AWSObject, AWSProperty, Ref from .validators import boolean class ParameterObjectAttribute(AWSProperty): props = { 'Key': (basestring, True), 'StringValue': (basestring, False), } class ParameterObject(AWSProperty): props = { 'Attributes': ([ParameterObjectAttribute...
<commit_before>from . import AWSObject, AWSProperty, Ref from .validators import boolean class ParameterObjectAttribute(AWSProperty): props = { 'Key': (basestring, True), 'StringValue': (basestring, False), } class ParameterObject(AWSProperty): props = { 'Attributes': ([Parameter...
from . import AWSObject, AWSProperty, Ref from .validators import boolean class ParameterObjectAttribute(AWSProperty): props = { 'Key': (basestring, True), 'StringValue': (basestring, False), } class ParameterObject(AWSProperty): props = { 'Attributes': ([ParameterObjectAttribute...
from . import AWSObject, AWSProperty, Ref from .validators import boolean class ParameterObjectAttribute(AWSProperty): props = { 'Key': (basestring, True), 'StringValue': (basestring, False), } class ParameterObject(AWSProperty): props = { 'Attributes': ([ParameterObjectAttribute...
<commit_before>from . import AWSObject, AWSProperty, Ref from .validators import boolean class ParameterObjectAttribute(AWSProperty): props = { 'Key': (basestring, True), 'StringValue': (basestring, False), } class ParameterObject(AWSProperty): props = { 'Attributes': ([Parameter...
4dcb0a9860b654a08839a61f5e67af69771de39c
tests/test_slow_requests.py
tests/test_slow_requests.py
import datetime import dnstwister.tools def test2(): """Looooong domain names highlighted that the idna decoding is slooooow. This is a basic benchmark for performance. """ domain = 'zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz.zzzzzzzzzzzzzzzzzzzzzzzzzppieo.com' start = date...
import datetime import dnstwister.tools def test2(): """Looooong domain names highlighted that the idna decoding is slooooow. This is a basic benchmark for performance, based on a bot's behaviour recently. """ domain = 'zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz.zzzzzzzzzzzz...
Test threshold increased because the Travis server is a bit slower :)
Test threshold increased because the Travis server is a bit slower :)
Python
unlicense
thisismyrobot/dnstwister,thisismyrobot/dnstwister,thisismyrobot/dnstwister
import datetime import dnstwister.tools def test2(): """Looooong domain names highlighted that the idna decoding is slooooow. This is a basic benchmark for performance. """ domain = 'zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz.zzzzzzzzzzzzzzzzzzzzzzzzzppieo.com' start = date...
import datetime import dnstwister.tools def test2(): """Looooong domain names highlighted that the idna decoding is slooooow. This is a basic benchmark for performance, based on a bot's behaviour recently. """ domain = 'zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz.zzzzzzzzzzzz...
<commit_before>import datetime import dnstwister.tools def test2(): """Looooong domain names highlighted that the idna decoding is slooooow. This is a basic benchmark for performance. """ domain = 'zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz.zzzzzzzzzzzzzzzzzzzzzzzzzppieo.com' ...
import datetime import dnstwister.tools def test2(): """Looooong domain names highlighted that the idna decoding is slooooow. This is a basic benchmark for performance, based on a bot's behaviour recently. """ domain = 'zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz.zzzzzzzzzzzz...
import datetime import dnstwister.tools def test2(): """Looooong domain names highlighted that the idna decoding is slooooow. This is a basic benchmark for performance. """ domain = 'zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz.zzzzzzzzzzzzzzzzzzzzzzzzzppieo.com' start = date...
<commit_before>import datetime import dnstwister.tools def test2(): """Looooong domain names highlighted that the idna decoding is slooooow. This is a basic benchmark for performance. """ domain = 'zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz.zzzzzzzzzzzzzzzzzzzzzzzzzppieo.com' ...
7aab7b17858fb307e8e4f136038e4448be449f9e
runtests.py
runtests.py
# Unit test driver. import os import sys from unittest import TestLoader, TestSuite, TextTestRunner topdir = os.path.split(os.path.abspath(__file__))[0] os.chdir(topdir) loader = TestLoader() if sys.version_info[:2] < (3, 0): tests = loader.discover('.', 'test_*.py') elif sys.version_info[:2] > (3, 2): test...
# Unit test driver. import os import sys from unittest import TestLoader, TestSuite, TextTestRunner topdir = os.path.split(os.path.abspath(__file__))[0] os.chdir(topdir) loader = TestLoader() if sys.version_info < (3, 0): tests = loader.discover('.', 'test_*.py') elif sys.version_info > (3, 2): tests = Test...
Exit non-zero if tests fail
Exit non-zero if tests fail runtests.py was exiting 0 if test either failed or passed (which confused tox, travis, etc). Determine the status code based on the success of the test suite run.
Python
mit
cocagne/txdbus
# Unit test driver. import os import sys from unittest import TestLoader, TestSuite, TextTestRunner topdir = os.path.split(os.path.abspath(__file__))[0] os.chdir(topdir) loader = TestLoader() if sys.version_info[:2] < (3, 0): tests = loader.discover('.', 'test_*.py') elif sys.version_info[:2] > (3, 2): test...
# Unit test driver. import os import sys from unittest import TestLoader, TestSuite, TextTestRunner topdir = os.path.split(os.path.abspath(__file__))[0] os.chdir(topdir) loader = TestLoader() if sys.version_info < (3, 0): tests = loader.discover('.', 'test_*.py') elif sys.version_info > (3, 2): tests = Test...
<commit_before># Unit test driver. import os import sys from unittest import TestLoader, TestSuite, TextTestRunner topdir = os.path.split(os.path.abspath(__file__))[0] os.chdir(topdir) loader = TestLoader() if sys.version_info[:2] < (3, 0): tests = loader.discover('.', 'test_*.py') elif sys.version_info[:2] > (...
# Unit test driver. import os import sys from unittest import TestLoader, TestSuite, TextTestRunner topdir = os.path.split(os.path.abspath(__file__))[0] os.chdir(topdir) loader = TestLoader() if sys.version_info < (3, 0): tests = loader.discover('.', 'test_*.py') elif sys.version_info > (3, 2): tests = Test...
# Unit test driver. import os import sys from unittest import TestLoader, TestSuite, TextTestRunner topdir = os.path.split(os.path.abspath(__file__))[0] os.chdir(topdir) loader = TestLoader() if sys.version_info[:2] < (3, 0): tests = loader.discover('.', 'test_*.py') elif sys.version_info[:2] > (3, 2): test...
<commit_before># Unit test driver. import os import sys from unittest import TestLoader, TestSuite, TextTestRunner topdir = os.path.split(os.path.abspath(__file__))[0] os.chdir(topdir) loader = TestLoader() if sys.version_info[:2] < (3, 0): tests = loader.discover('.', 'test_*.py') elif sys.version_info[:2] > (...
6ac70bb24b7fab272adb9805fa0509aa2282add4
pysswords/db.py
pysswords/db.py
from glob import glob import os from .credential import Credential from .crypt import create_gpg, load_gpg class Database(object): def __init__(self, path, gpg): self.path = path self.gpg = gpg @classmethod def create(cls, path, passphrase, gpg_bin="gpg"): gpg = create_gpg(gpg_b...
from glob import glob import os from .credential import Credential from .crypt import create_gpg, load_gpg class Database(object): def __init__(self, path, gpg): self.path = path self.gpg = gpg @classmethod def create(cls, path, passphrase, gpg_bin="gpg"): gpg = create_gpg(gpg_b...
Fix get gpg key from database
Fix get gpg key from database
Python
mit
scorphus/passpie,marcwebbie/pysswords,marcwebbie/passpie,scorphus/passpie,eiginn/passpie,eiginn/passpie,marcwebbie/passpie
from glob import glob import os from .credential import Credential from .crypt import create_gpg, load_gpg class Database(object): def __init__(self, path, gpg): self.path = path self.gpg = gpg @classmethod def create(cls, path, passphrase, gpg_bin="gpg"): gpg = create_gpg(gpg_b...
from glob import glob import os from .credential import Credential from .crypt import create_gpg, load_gpg class Database(object): def __init__(self, path, gpg): self.path = path self.gpg = gpg @classmethod def create(cls, path, passphrase, gpg_bin="gpg"): gpg = create_gpg(gpg_b...
<commit_before>from glob import glob import os from .credential import Credential from .crypt import create_gpg, load_gpg class Database(object): def __init__(self, path, gpg): self.path = path self.gpg = gpg @classmethod def create(cls, path, passphrase, gpg_bin="gpg"): gpg = c...
from glob import glob import os from .credential import Credential from .crypt import create_gpg, load_gpg class Database(object): def __init__(self, path, gpg): self.path = path self.gpg = gpg @classmethod def create(cls, path, passphrase, gpg_bin="gpg"): gpg = create_gpg(gpg_b...
from glob import glob import os from .credential import Credential from .crypt import create_gpg, load_gpg class Database(object): def __init__(self, path, gpg): self.path = path self.gpg = gpg @classmethod def create(cls, path, passphrase, gpg_bin="gpg"): gpg = create_gpg(gpg_b...
<commit_before>from glob import glob import os from .credential import Credential from .crypt import create_gpg, load_gpg class Database(object): def __init__(self, path, gpg): self.path = path self.gpg = gpg @classmethod def create(cls, path, passphrase, gpg_bin="gpg"): gpg = c...
4d88162d7c1d596f87f0fb1cc18dd5509bc92330
i18n.py
i18n.py
# -*- coding: utf-8 -*- import os import config import gettext # Change this variable to your app name! # The translation files will be under # @LOCALE_DIR@/@LANGUAGE@/LC_MESSAGES/@[email protected] APP_NAME = "simpleValidator" LOCALE_DIR = os.path.abspath('lang') # .mo files will then be located in APP_Dir/i18n/LAN...
# -*- coding: utf-8 -*- import os import config import gettext # Change this variable to your app name! # The translation files will be under # @LOCALE_DIR@/@LANGUAGE@/LC_MESSAGES/@[email protected] APP_NAME = "simpleValidator" LOCALE_DIR = os.path.abspath('lang') # .mo files will then be located in APP_Dir/i18n/LAN...
Set fallback to true on get text to avoid crash on missing language file
Set fallback to true on get text to avoid crash on missing language file
Python
mit
markleent/simpleValidator
# -*- coding: utf-8 -*- import os import config import gettext # Change this variable to your app name! # The translation files will be under # @LOCALE_DIR@/@LANGUAGE@/LC_MESSAGES/@[email protected] APP_NAME = "simpleValidator" LOCALE_DIR = os.path.abspath('lang') # .mo files will then be located in APP_Dir/i18n/LAN...
# -*- coding: utf-8 -*- import os import config import gettext # Change this variable to your app name! # The translation files will be under # @LOCALE_DIR@/@LANGUAGE@/LC_MESSAGES/@[email protected] APP_NAME = "simpleValidator" LOCALE_DIR = os.path.abspath('lang') # .mo files will then be located in APP_Dir/i18n/LAN...
<commit_before># -*- coding: utf-8 -*- import os import config import gettext # Change this variable to your app name! # The translation files will be under # @LOCALE_DIR@/@LANGUAGE@/LC_MESSAGES/@[email protected] APP_NAME = "simpleValidator" LOCALE_DIR = os.path.abspath('lang') # .mo files will then be located in A...
# -*- coding: utf-8 -*- import os import config import gettext # Change this variable to your app name! # The translation files will be under # @LOCALE_DIR@/@LANGUAGE@/LC_MESSAGES/@[email protected] APP_NAME = "simpleValidator" LOCALE_DIR = os.path.abspath('lang') # .mo files will then be located in APP_Dir/i18n/LAN...
# -*- coding: utf-8 -*- import os import config import gettext # Change this variable to your app name! # The translation files will be under # @LOCALE_DIR@/@LANGUAGE@/LC_MESSAGES/@[email protected] APP_NAME = "simpleValidator" LOCALE_DIR = os.path.abspath('lang') # .mo files will then be located in APP_Dir/i18n/LAN...
<commit_before># -*- coding: utf-8 -*- import os import config import gettext # Change this variable to your app name! # The translation files will be under # @LOCALE_DIR@/@LANGUAGE@/LC_MESSAGES/@[email protected] APP_NAME = "simpleValidator" LOCALE_DIR = os.path.abspath('lang') # .mo files will then be located in A...
850464de61237a7fae64219a39e9c937f7d40c01
randcat.py
randcat.py
#! /usr/bin/python3 import random random.seed() # this initializes with the Date, which I think is a novel enough seed while True: # if we're going with a mimicing of cat /dev/random, it'll pretty much just go until it's killed print(chr(random.getrandbits(8)), end='')
#! /usr/bin/python3 import calendar import time seed = calendar.timegm(time.gmtime()) # We'll use the epoch time as a seed. def random (seed): seed2 = (seed*297642 + 83782)/70000 return int(seed2) % 70000; p = seed while True: # if we're going with a mimicing of cat /dev/random, it'll pretty much j...
Make it so we're using our own seed.
Make it so we're using our own seed.
Python
apache-2.0
Tombert/RandCat
#! /usr/bin/python3 import random random.seed() # this initializes with the Date, which I think is a novel enough seed while True: # if we're going with a mimicing of cat /dev/random, it'll pretty much just go until it's killed print(chr(random.getrandbits(8)), end='') Make it so we're using our own seed.
#! /usr/bin/python3 import calendar import time seed = calendar.timegm(time.gmtime()) # We'll use the epoch time as a seed. def random (seed): seed2 = (seed*297642 + 83782)/70000 return int(seed2) % 70000; p = seed while True: # if we're going with a mimicing of cat /dev/random, it'll pretty much j...
<commit_before>#! /usr/bin/python3 import random random.seed() # this initializes with the Date, which I think is a novel enough seed while True: # if we're going with a mimicing of cat /dev/random, it'll pretty much just go until it's killed print(chr(random.getrandbits(8)), end='') <commit_msg>Make it so we're...
#! /usr/bin/python3 import calendar import time seed = calendar.timegm(time.gmtime()) # We'll use the epoch time as a seed. def random (seed): seed2 = (seed*297642 + 83782)/70000 return int(seed2) % 70000; p = seed while True: # if we're going with a mimicing of cat /dev/random, it'll pretty much j...
#! /usr/bin/python3 import random random.seed() # this initializes with the Date, which I think is a novel enough seed while True: # if we're going with a mimicing of cat /dev/random, it'll pretty much just go until it's killed print(chr(random.getrandbits(8)), end='') Make it so we're using our own seed.#! /usr...
<commit_before>#! /usr/bin/python3 import random random.seed() # this initializes with the Date, which I think is a novel enough seed while True: # if we're going with a mimicing of cat /dev/random, it'll pretty much just go until it's killed print(chr(random.getrandbits(8)), end='') <commit_msg>Make it so we're...
bbd8ed9fe5679d6eb85ddd183515e6bf5c95d5fc
filter-test.py
filter-test.py
#!/usr/bin/env python # # Test hook to launch an irker instance (if it doesn't already exist) # just before shipping the notification. We start it in in another terminal # so you can watch the debug messages. Probably only of interest only to # developers # # To use it, set up irkerhook.py to file on each commit. # The...
#!/usr/bin/env python # # Test hook to launch an irker instance (if it doesn't already exist) # just before shipping the notification. We start it in in another terminal # so you can watch the debug messages. Intended to be used in the root # directory of the irker repo. Probably only of interest only to irker # develo...
Document the test filter better.
Document the test filter better.
Python
bsd-3-clause
Trellmor/irker,boklm/irker,dak180/irker,Southen/irker
#!/usr/bin/env python # # Test hook to launch an irker instance (if it doesn't already exist) # just before shipping the notification. We start it in in another terminal # so you can watch the debug messages. Probably only of interest only to # developers # # To use it, set up irkerhook.py to file on each commit. # The...
#!/usr/bin/env python # # Test hook to launch an irker instance (if it doesn't already exist) # just before shipping the notification. We start it in in another terminal # so you can watch the debug messages. Intended to be used in the root # directory of the irker repo. Probably only of interest only to irker # develo...
<commit_before>#!/usr/bin/env python # # Test hook to launch an irker instance (if it doesn't already exist) # just before shipping the notification. We start it in in another terminal # so you can watch the debug messages. Probably only of interest only to # developers # # To use it, set up irkerhook.py to file on eac...
#!/usr/bin/env python # # Test hook to launch an irker instance (if it doesn't already exist) # just before shipping the notification. We start it in in another terminal # so you can watch the debug messages. Intended to be used in the root # directory of the irker repo. Probably only of interest only to irker # develo...
#!/usr/bin/env python # # Test hook to launch an irker instance (if it doesn't already exist) # just before shipping the notification. We start it in in another terminal # so you can watch the debug messages. Probably only of interest only to # developers # # To use it, set up irkerhook.py to file on each commit. # The...
<commit_before>#!/usr/bin/env python # # Test hook to launch an irker instance (if it doesn't already exist) # just before shipping the notification. We start it in in another terminal # so you can watch the debug messages. Probably only of interest only to # developers # # To use it, set up irkerhook.py to file on eac...
74983020db5cfcd3e81e258837979522f2d1b639
flac_errors.py
flac_errors.py
import re errorFile = open('samples/foobar2000-errors.txt', 'r') errors = errorFile.readlines() index = -1 for i in range(len(errors)): line = errors[i] if re.search(r'List of undecodable items:', line): index = i nbErrorsFoobar = 0 for i in range(index, len(errors)): line = errors[i] match = re.search(r'"(.*....
import re errorFile = open('samples/foobar2000-errors.txt', 'r') errors = errorFile.readlines() errorsSet = set() index = -1 for i in range(len(errors)): line = errors[i] if re.search(r'List of undecodable items:', line): index = i nbErrorsFoobar = 0 for i in range(index, len(errors)): line = errors[i] match =...
Use a Set to avoid duplicates
Use a Set to avoid duplicates
Python
mit
derekhendrickx/find-my-flac-errors
import re errorFile = open('samples/foobar2000-errors.txt', 'r') errors = errorFile.readlines() index = -1 for i in range(len(errors)): line = errors[i] if re.search(r'List of undecodable items:', line): index = i nbErrorsFoobar = 0 for i in range(index, len(errors)): line = errors[i] match = re.search(r'"(.*....
import re errorFile = open('samples/foobar2000-errors.txt', 'r') errors = errorFile.readlines() errorsSet = set() index = -1 for i in range(len(errors)): line = errors[i] if re.search(r'List of undecodable items:', line): index = i nbErrorsFoobar = 0 for i in range(index, len(errors)): line = errors[i] match =...
<commit_before>import re errorFile = open('samples/foobar2000-errors.txt', 'r') errors = errorFile.readlines() index = -1 for i in range(len(errors)): line = errors[i] if re.search(r'List of undecodable items:', line): index = i nbErrorsFoobar = 0 for i in range(index, len(errors)): line = errors[i] match = re...
import re errorFile = open('samples/foobar2000-errors.txt', 'r') errors = errorFile.readlines() errorsSet = set() index = -1 for i in range(len(errors)): line = errors[i] if re.search(r'List of undecodable items:', line): index = i nbErrorsFoobar = 0 for i in range(index, len(errors)): line = errors[i] match =...
import re errorFile = open('samples/foobar2000-errors.txt', 'r') errors = errorFile.readlines() index = -1 for i in range(len(errors)): line = errors[i] if re.search(r'List of undecodable items:', line): index = i nbErrorsFoobar = 0 for i in range(index, len(errors)): line = errors[i] match = re.search(r'"(.*....
<commit_before>import re errorFile = open('samples/foobar2000-errors.txt', 'r') errors = errorFile.readlines() index = -1 for i in range(len(errors)): line = errors[i] if re.search(r'List of undecodable items:', line): index = i nbErrorsFoobar = 0 for i in range(index, len(errors)): line = errors[i] match = re...
42c6d252084fa9336cf5c5d1766de29bc31bf082
dbaas/workflow/steps/util/resize/start_database.py
dbaas/workflow/steps/util/resize/start_database.py
# -*- coding: utf-8 -*- import logging from util import full_stack from workflow.steps.util.base import BaseStep from workflow.exceptions.error_codes import DBAAS_0022 from workflow.steps.util.restore_snapshot import use_database_initialization_script LOG = logging.getLogger(__name__) class StartDatabase(BaseStep): ...
# -*- coding: utf-8 -*- import logging from util import full_stack from workflow.steps.util.base import BaseStep from workflow.exceptions.error_codes import DBAAS_0022 from workflow.steps.util.restore_snapshot import use_database_initialization_script from time import sleep LOG = logging.getLogger(__name__) class St...
Add sleep on start database
Add sleep on start database
Python
bsd-3-clause
globocom/database-as-a-service,globocom/database-as-a-service,globocom/database-as-a-service,globocom/database-as-a-service
# -*- coding: utf-8 -*- import logging from util import full_stack from workflow.steps.util.base import BaseStep from workflow.exceptions.error_codes import DBAAS_0022 from workflow.steps.util.restore_snapshot import use_database_initialization_script LOG = logging.getLogger(__name__) class StartDatabase(BaseStep): ...
# -*- coding: utf-8 -*- import logging from util import full_stack from workflow.steps.util.base import BaseStep from workflow.exceptions.error_codes import DBAAS_0022 from workflow.steps.util.restore_snapshot import use_database_initialization_script from time import sleep LOG = logging.getLogger(__name__) class St...
<commit_before># -*- coding: utf-8 -*- import logging from util import full_stack from workflow.steps.util.base import BaseStep from workflow.exceptions.error_codes import DBAAS_0022 from workflow.steps.util.restore_snapshot import use_database_initialization_script LOG = logging.getLogger(__name__) class StartDatab...
# -*- coding: utf-8 -*- import logging from util import full_stack from workflow.steps.util.base import BaseStep from workflow.exceptions.error_codes import DBAAS_0022 from workflow.steps.util.restore_snapshot import use_database_initialization_script from time import sleep LOG = logging.getLogger(__name__) class St...
# -*- coding: utf-8 -*- import logging from util import full_stack from workflow.steps.util.base import BaseStep from workflow.exceptions.error_codes import DBAAS_0022 from workflow.steps.util.restore_snapshot import use_database_initialization_script LOG = logging.getLogger(__name__) class StartDatabase(BaseStep): ...
<commit_before># -*- coding: utf-8 -*- import logging from util import full_stack from workflow.steps.util.base import BaseStep from workflow.exceptions.error_codes import DBAAS_0022 from workflow.steps.util.restore_snapshot import use_database_initialization_script LOG = logging.getLogger(__name__) class StartDatab...
6e31eb9e1049d75ad4e7e1031c0dfa4d6617c48f
csaps/__init__.py
csaps/__init__.py
# -*- coding: utf-8 -*- """ Cubic spline approximation (smoothing) """ from csaps._version import __version__ # noqa from csaps._base import ( SplinePPForm, UnivariateCubicSmoothingSpline, MultivariateCubicSmoothingSpline, NdGridCubicSmoothingSpline, ) from csaps._types import ( UnivariateDataT...
# -*- coding: utf-8 -*- """ Cubic spline approximation (smoothing) """ from csaps._version import __version__ # noqa from csaps._base import ( SplinePPForm, NdGridSplinePPForm, UnivariateCubicSmoothingSpline, MultivariateCubicSmoothingSpline, NdGridCubicSmoothingSpline, ) from csaps._types impo...
Add NdGridSplinePPForm to csaps imports
Add NdGridSplinePPForm to csaps imports
Python
mit
espdev/csaps
# -*- coding: utf-8 -*- """ Cubic spline approximation (smoothing) """ from csaps._version import __version__ # noqa from csaps._base import ( SplinePPForm, UnivariateCubicSmoothingSpline, MultivariateCubicSmoothingSpline, NdGridCubicSmoothingSpline, ) from csaps._types import ( UnivariateDataT...
# -*- coding: utf-8 -*- """ Cubic spline approximation (smoothing) """ from csaps._version import __version__ # noqa from csaps._base import ( SplinePPForm, NdGridSplinePPForm, UnivariateCubicSmoothingSpline, MultivariateCubicSmoothingSpline, NdGridCubicSmoothingSpline, ) from csaps._types impo...
<commit_before># -*- coding: utf-8 -*- """ Cubic spline approximation (smoothing) """ from csaps._version import __version__ # noqa from csaps._base import ( SplinePPForm, UnivariateCubicSmoothingSpline, MultivariateCubicSmoothingSpline, NdGridCubicSmoothingSpline, ) from csaps._types import ( ...
# -*- coding: utf-8 -*- """ Cubic spline approximation (smoothing) """ from csaps._version import __version__ # noqa from csaps._base import ( SplinePPForm, NdGridSplinePPForm, UnivariateCubicSmoothingSpline, MultivariateCubicSmoothingSpline, NdGridCubicSmoothingSpline, ) from csaps._types impo...
# -*- coding: utf-8 -*- """ Cubic spline approximation (smoothing) """ from csaps._version import __version__ # noqa from csaps._base import ( SplinePPForm, UnivariateCubicSmoothingSpline, MultivariateCubicSmoothingSpline, NdGridCubicSmoothingSpline, ) from csaps._types import ( UnivariateDataT...
<commit_before># -*- coding: utf-8 -*- """ Cubic spline approximation (smoothing) """ from csaps._version import __version__ # noqa from csaps._base import ( SplinePPForm, UnivariateCubicSmoothingSpline, MultivariateCubicSmoothingSpline, NdGridCubicSmoothingSpline, ) from csaps._types import ( ...
6aa8f148b3b3975363d5d4a763f5abb45ea6cbd8
databin/parsers/__init__.py
databin/parsers/__init__.py
from databin.parsers.util import ParseException from databin.parsers.simple import parse_csv, parse_tsv from databin.parsers.psql import parse_psql PARSERS = [ ('Comma-Separated Values', 'csv', parse_csv), ('Tab-Separated Values', 'tsv', parse_tsv), ('Excel copy & paste', 'excel', parse_tsv), ('psql Sh...
from databin.parsers.util import ParseException from databin.parsers.simple import parse_csv, parse_tsv from databin.parsers.psql import parse_psql PARSERS = [ ('Excel copy & paste', 'excel', parse_tsv), ('Comma-Separated Values', 'csv', parse_csv), ('Tab-Separated Values', 'tsv', parse_tsv), ('psql Sh...
Make excel format the default
Make excel format the default
Python
mit
LeTristanB/Pastable,pudo/databin,LeTristanB/Pastable
from databin.parsers.util import ParseException from databin.parsers.simple import parse_csv, parse_tsv from databin.parsers.psql import parse_psql PARSERS = [ ('Comma-Separated Values', 'csv', parse_csv), ('Tab-Separated Values', 'tsv', parse_tsv), ('Excel copy & paste', 'excel', parse_tsv), ('psql Sh...
from databin.parsers.util import ParseException from databin.parsers.simple import parse_csv, parse_tsv from databin.parsers.psql import parse_psql PARSERS = [ ('Excel copy & paste', 'excel', parse_tsv), ('Comma-Separated Values', 'csv', parse_csv), ('Tab-Separated Values', 'tsv', parse_tsv), ('psql Sh...
<commit_before>from databin.parsers.util import ParseException from databin.parsers.simple import parse_csv, parse_tsv from databin.parsers.psql import parse_psql PARSERS = [ ('Comma-Separated Values', 'csv', parse_csv), ('Tab-Separated Values', 'tsv', parse_tsv), ('Excel copy & paste', 'excel', parse_tsv)...
from databin.parsers.util import ParseException from databin.parsers.simple import parse_csv, parse_tsv from databin.parsers.psql import parse_psql PARSERS = [ ('Excel copy & paste', 'excel', parse_tsv), ('Comma-Separated Values', 'csv', parse_csv), ('Tab-Separated Values', 'tsv', parse_tsv), ('psql Sh...
from databin.parsers.util import ParseException from databin.parsers.simple import parse_csv, parse_tsv from databin.parsers.psql import parse_psql PARSERS = [ ('Comma-Separated Values', 'csv', parse_csv), ('Tab-Separated Values', 'tsv', parse_tsv), ('Excel copy & paste', 'excel', parse_tsv), ('psql Sh...
<commit_before>from databin.parsers.util import ParseException from databin.parsers.simple import parse_csv, parse_tsv from databin.parsers.psql import parse_psql PARSERS = [ ('Comma-Separated Values', 'csv', parse_csv), ('Tab-Separated Values', 'tsv', parse_tsv), ('Excel copy & paste', 'excel', parse_tsv)...
301f62a80140c319735d37fdab80b66712722de0
h2o-bindings/bin/custom/R/gen_isolationforest.py
h2o-bindings/bin/custom/R/gen_isolationforest.py
def update_param(name, param): if name == 'stopping_metric': param['values'] = ['AUTO', 'anomaly_score'] return param return None # param untouched extensions = dict( required_params=['training_frame', 'x'], validate_required_params="", set_required_params=""" parms$training_frame...
def update_param(name, param): if name == 'validation_response_column': param['name'] = None return param if name == 'stopping_metric': param['values'] = ['AUTO', 'anomaly_score'] return param return None # param untouched extensions = dict( required_params=['training_f...
Disable validation_response_column in R (only Python supported at first)
Disable validation_response_column in R (only Python supported at first)
Python
apache-2.0
michalkurka/h2o-3,michalkurka/h2o-3,h2oai/h2o-3,h2oai/h2o-3,michalkurka/h2o-3,h2oai/h2o-3,h2oai/h2o-3,h2oai/h2o-3,michalkurka/h2o-3,h2oai/h2o-3,michalkurka/h2o-3,h2oai/h2o-3,h2oai/h2o-3,michalkurka/h2o-3,michalkurka/h2o-3
def update_param(name, param): if name == 'stopping_metric': param['values'] = ['AUTO', 'anomaly_score'] return param return None # param untouched extensions = dict( required_params=['training_frame', 'x'], validate_required_params="", set_required_params=""" parms$training_frame...
def update_param(name, param): if name == 'validation_response_column': param['name'] = None return param if name == 'stopping_metric': param['values'] = ['AUTO', 'anomaly_score'] return param return None # param untouched extensions = dict( required_params=['training_f...
<commit_before>def update_param(name, param): if name == 'stopping_metric': param['values'] = ['AUTO', 'anomaly_score'] return param return None # param untouched extensions = dict( required_params=['training_frame', 'x'], validate_required_params="", set_required_params=""" parms...
def update_param(name, param): if name == 'validation_response_column': param['name'] = None return param if name == 'stopping_metric': param['values'] = ['AUTO', 'anomaly_score'] return param return None # param untouched extensions = dict( required_params=['training_f...
def update_param(name, param): if name == 'stopping_metric': param['values'] = ['AUTO', 'anomaly_score'] return param return None # param untouched extensions = dict( required_params=['training_frame', 'x'], validate_required_params="", set_required_params=""" parms$training_frame...
<commit_before>def update_param(name, param): if name == 'stopping_metric': param['values'] = ['AUTO', 'anomaly_score'] return param return None # param untouched extensions = dict( required_params=['training_frame', 'x'], validate_required_params="", set_required_params=""" parms...
ed0fcadbcfe3316bd5e997a36155b1847504685a
dcsh/main.py
dcsh/main.py
from __future__ import absolute_import, print_function import os import sys import time import requests def main(): script = open(sys.argv[1], 'rb').read() resp = requests.post( url="http://localhost:5000/run", data=script, headers={'Content-Type': 'application/octet-stream'}) ...
from __future__ import absolute_import, print_function import argparse import json import os import subprocess import sys import time import requests DISPATCHER = "localhost:5000" def parse_args(): """ Parse arguments provided at the command line returns an ordered pair: (script, public_key) where sc...
Encrypt client connection to DC node using SSH
Encrypt client connection to DC node using SSH
Python
apache-2.0
mesosphere/dcsh
from __future__ import absolute_import, print_function import os import sys import time import requests def main(): script = open(sys.argv[1], 'rb').read() resp = requests.post( url="http://localhost:5000/run", data=script, headers={'Content-Type': 'application/octet-stream'}) ...
from __future__ import absolute_import, print_function import argparse import json import os import subprocess import sys import time import requests DISPATCHER = "localhost:5000" def parse_args(): """ Parse arguments provided at the command line returns an ordered pair: (script, public_key) where sc...
<commit_before> from __future__ import absolute_import, print_function import os import sys import time import requests def main(): script = open(sys.argv[1], 'rb').read() resp = requests.post( url="http://localhost:5000/run", data=script, headers={'Content-Type': 'application/octet-...
from __future__ import absolute_import, print_function import argparse import json import os import subprocess import sys import time import requests DISPATCHER = "localhost:5000" def parse_args(): """ Parse arguments provided at the command line returns an ordered pair: (script, public_key) where sc...
from __future__ import absolute_import, print_function import os import sys import time import requests def main(): script = open(sys.argv[1], 'rb').read() resp = requests.post( url="http://localhost:5000/run", data=script, headers={'Content-Type': 'application/octet-stream'}) ...
<commit_before> from __future__ import absolute_import, print_function import os import sys import time import requests def main(): script = open(sys.argv[1], 'rb').read() resp = requests.post( url="http://localhost:5000/run", data=script, headers={'Content-Type': 'application/octet-...
5ae12aa12cef04704ff90071acf098fdfdc7a91a
utils/tests/test_pipeline.py
utils/tests/test_pipeline.py
from io import StringIO from django.core.management import call_command from django.test import TestCase class PipelineTestCase(TestCase): def test_success(self): call_command('collectstatic', '--noinput', stdout=StringIO()) call_command('clean_staticfilesjson', stdout=StringIO())
import os from io import StringIO from django.conf import settings from django.core.management import call_command from django.core.management.base import CommandError from django.test import TestCase class PipelineTestCase(TestCase): def setUp(self): file_path = os.path.join(settings.STATIC_ROOT, 'stati...
Add test for missing staticfiles.json
Add test for missing staticfiles.json
Python
mit
bulv1ne/django-utils,bulv1ne/django-utils
from io import StringIO from django.core.management import call_command from django.test import TestCase class PipelineTestCase(TestCase): def test_success(self): call_command('collectstatic', '--noinput', stdout=StringIO()) call_command('clean_staticfilesjson', stdout=StringIO()) Add test for m...
import os from io import StringIO from django.conf import settings from django.core.management import call_command from django.core.management.base import CommandError from django.test import TestCase class PipelineTestCase(TestCase): def setUp(self): file_path = os.path.join(settings.STATIC_ROOT, 'stati...
<commit_before>from io import StringIO from django.core.management import call_command from django.test import TestCase class PipelineTestCase(TestCase): def test_success(self): call_command('collectstatic', '--noinput', stdout=StringIO()) call_command('clean_staticfilesjson', stdout=StringIO())...
import os from io import StringIO from django.conf import settings from django.core.management import call_command from django.core.management.base import CommandError from django.test import TestCase class PipelineTestCase(TestCase): def setUp(self): file_path = os.path.join(settings.STATIC_ROOT, 'stati...
from io import StringIO from django.core.management import call_command from django.test import TestCase class PipelineTestCase(TestCase): def test_success(self): call_command('collectstatic', '--noinput', stdout=StringIO()) call_command('clean_staticfilesjson', stdout=StringIO()) Add test for m...
<commit_before>from io import StringIO from django.core.management import call_command from django.test import TestCase class PipelineTestCase(TestCase): def test_success(self): call_command('collectstatic', '--noinput', stdout=StringIO()) call_command('clean_staticfilesjson', stdout=StringIO())...
d0046ae1dfc6c3cd86477180c3175562834c8f41
test/test_datapath.py
test/test_datapath.py
# coding=UTF8 import pytest from core import hybra class TestUM: def setup(self): hybra.set_data_path('./data2/') self.g = hybra.data( 'news', folder = '', terms = ['yle.json'] ) def test_is_changed( self ): assert( hybra.data_path() == './data2/' )
# coding=UTF8 import pytest from core import hybra class TestUM: def setup(self): hybra.set_data_path('./data_empty/') def test_is_changed( self ): assert( hybra.data_path() == './data_empty/' )
Remove data load from test
Remove data load from test
Python
mit
HIIT/hybra-core,HIIT/hybra-core,HIIT/hybra-core,HIIT/hybra-core,HIIT/hybra-core
# coding=UTF8 import pytest from core import hybra class TestUM: def setup(self): hybra.set_data_path('./data2/') self.g = hybra.data( 'news', folder = '', terms = ['yle.json'] ) def test_is_changed( self ): assert( hybra.data_path() == './data2/' ) Remove data load from test
# coding=UTF8 import pytest from core import hybra class TestUM: def setup(self): hybra.set_data_path('./data_empty/') def test_is_changed( self ): assert( hybra.data_path() == './data_empty/' )
<commit_before># coding=UTF8 import pytest from core import hybra class TestUM: def setup(self): hybra.set_data_path('./data2/') self.g = hybra.data( 'news', folder = '', terms = ['yle.json'] ) def test_is_changed( self ): assert( hybra.data_path() == './data2/' ) <commit_msg>Remove...
# coding=UTF8 import pytest from core import hybra class TestUM: def setup(self): hybra.set_data_path('./data_empty/') def test_is_changed( self ): assert( hybra.data_path() == './data_empty/' )
# coding=UTF8 import pytest from core import hybra class TestUM: def setup(self): hybra.set_data_path('./data2/') self.g = hybra.data( 'news', folder = '', terms = ['yle.json'] ) def test_is_changed( self ): assert( hybra.data_path() == './data2/' ) Remove data load from test# codin...
<commit_before># coding=UTF8 import pytest from core import hybra class TestUM: def setup(self): hybra.set_data_path('./data2/') self.g = hybra.data( 'news', folder = '', terms = ['yle.json'] ) def test_is_changed( self ): assert( hybra.data_path() == './data2/' ) <commit_msg>Remove...
fd19236999eccd9cbf049bc5b8917cd603974f97
centerline/__init__.py
centerline/__init__.py
from .centerline import Centerline __all__ = ['Centerline']
# -*- coding: utf-8 -*- from __future__ import unicode_literals from . import utils from .centerline import Centerline __all__ = ['utils', 'Centerline']
Add the utils module to the package index
Add the utils module to the package index
Python
mit
fitodic/polygon-centerline,fitodic/centerline,fitodic/centerline
from .centerline import Centerline __all__ = ['Centerline'] Add the utils module to the package index
# -*- coding: utf-8 -*- from __future__ import unicode_literals from . import utils from .centerline import Centerline __all__ = ['utils', 'Centerline']
<commit_before>from .centerline import Centerline __all__ = ['Centerline'] <commit_msg>Add the utils module to the package index<commit_after>
# -*- coding: utf-8 -*- from __future__ import unicode_literals from . import utils from .centerline import Centerline __all__ = ['utils', 'Centerline']
from .centerline import Centerline __all__ = ['Centerline'] Add the utils module to the package index# -*- coding: utf-8 -*- from __future__ import unicode_literals from . import utils from .centerline import Centerline __all__ = ['utils', 'Centerline']
<commit_before>from .centerline import Centerline __all__ = ['Centerline'] <commit_msg>Add the utils module to the package index<commit_after># -*- coding: utf-8 -*- from __future__ import unicode_literals from . import utils from .centerline import Centerline __all__ = ['utils', 'Centerline']
7488988934a5370b372eed0f5245518ab612fa89
utils/mail_utils.py
utils/mail_utils.py
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Utils for sending emails via SMTP on localhost. """ from email.utils import formatdate from email.mime.text import MIMEText import smtplib import textwrap from config import MAILSERVER_HOST def wrap_message(message, chars_in_line=80): """Wraps an unformatted bl...
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Utils for sending emails via SMTP on localhost. """ from email.utils import formatdate from email.mime.text import MIMEText import smtplib import textwrap from config import MAILSERVER_HOST, MAILSERVER_PORT def wrap_message(message, chars_in_line=80): """Wraps ...
Add possibility to locally forward the mail server
Add possibility to locally forward the mail server
Python
mit
MarauderXtreme/sipa,lukasjuhrich/sipa,lukasjuhrich/sipa,MarauderXtreme/sipa,agdsn/sipa,agdsn/sipa,agdsn/sipa,agdsn/sipa,lukasjuhrich/sipa,fgrsnau/sipa,lukasjuhrich/sipa,MarauderXtreme/sipa,fgrsnau/sipa,fgrsnau/sipa
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Utils for sending emails via SMTP on localhost. """ from email.utils import formatdate from email.mime.text import MIMEText import smtplib import textwrap from config import MAILSERVER_HOST def wrap_message(message, chars_in_line=80): """Wraps an unformatted bl...
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Utils for sending emails via SMTP on localhost. """ from email.utils import formatdate from email.mime.text import MIMEText import smtplib import textwrap from config import MAILSERVER_HOST, MAILSERVER_PORT def wrap_message(message, chars_in_line=80): """Wraps ...
<commit_before>#!/usr/bin/env python # -*- coding: utf-8 -*- """ Utils for sending emails via SMTP on localhost. """ from email.utils import formatdate from email.mime.text import MIMEText import smtplib import textwrap from config import MAILSERVER_HOST def wrap_message(message, chars_in_line=80): """Wraps an...
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Utils for sending emails via SMTP on localhost. """ from email.utils import formatdate from email.mime.text import MIMEText import smtplib import textwrap from config import MAILSERVER_HOST, MAILSERVER_PORT def wrap_message(message, chars_in_line=80): """Wraps ...
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Utils for sending emails via SMTP on localhost. """ from email.utils import formatdate from email.mime.text import MIMEText import smtplib import textwrap from config import MAILSERVER_HOST def wrap_message(message, chars_in_line=80): """Wraps an unformatted bl...
<commit_before>#!/usr/bin/env python # -*- coding: utf-8 -*- """ Utils for sending emails via SMTP on localhost. """ from email.utils import formatdate from email.mime.text import MIMEText import smtplib import textwrap from config import MAILSERVER_HOST def wrap_message(message, chars_in_line=80): """Wraps an...
4fd5fd238d4c8353e131e5399a184edbd6de159d
ibmcnx/test/loadFunction.py
ibmcnx/test/loadFunction.py
import sys from java.lang import String from java.util import HashSet from java.util import HashMap import java import lotusConnectionsCommonAdmin globdict = globals() locdict = locals() def loadFilesService(): global globdict global locdict execfile("filesAdmin.py",globdict,locdict)
import sys from java.lang import String from java.util import HashSet from java.util import HashMap import java import lotusConnectionsCommonAdmin globdict = globals() locdict = locals() def loadFilesService(): global globdict global locdict ldict(globals(),locals()) execfile("filesAdmin.py",globdict...
Customize scripts to work with menu
Customize scripts to work with menu
Python
apache-2.0
stoeps13/ibmcnx2,stoeps13/ibmcnx2
import sys from java.lang import String from java.util import HashSet from java.util import HashMap import java import lotusConnectionsCommonAdmin globdict = globals() locdict = locals() def loadFilesService(): global globdict global locdict execfile("filesAdmin.py",globdict,locdict) Customize scripts to...
import sys from java.lang import String from java.util import HashSet from java.util import HashMap import java import lotusConnectionsCommonAdmin globdict = globals() locdict = locals() def loadFilesService(): global globdict global locdict ldict(globals(),locals()) execfile("filesAdmin.py",globdict...
<commit_before> import sys from java.lang import String from java.util import HashSet from java.util import HashMap import java import lotusConnectionsCommonAdmin globdict = globals() locdict = locals() def loadFilesService(): global globdict global locdict execfile("filesAdmin.py",globdict,locdict) <comm...
import sys from java.lang import String from java.util import HashSet from java.util import HashMap import java import lotusConnectionsCommonAdmin globdict = globals() locdict = locals() def loadFilesService(): global globdict global locdict ldict(globals(),locals()) execfile("filesAdmin.py",globdict...
import sys from java.lang import String from java.util import HashSet from java.util import HashMap import java import lotusConnectionsCommonAdmin globdict = globals() locdict = locals() def loadFilesService(): global globdict global locdict execfile("filesAdmin.py",globdict,locdict) Customize scripts to...
<commit_before> import sys from java.lang import String from java.util import HashSet from java.util import HashMap import java import lotusConnectionsCommonAdmin globdict = globals() locdict = locals() def loadFilesService(): global globdict global locdict execfile("filesAdmin.py",globdict,locdict) <comm...
76252224293f3b54dafa1cf2356dcc9a2991cf39
externaldata/adsbedata/RetrieveHistoricalADSBEdata.py
externaldata/adsbedata/RetrieveHistoricalADSBEdata.py
""" Utilities for downloading historical data in a given AOI. Python 3.5 """ import requests import io import zipfile import os from time import strftime import logging import yaml from model import aircraft_report from model import report_receiver from utils import postgres as pg_utils logger = logging.getLogger(__...
""" Utilities for downloading historical data in a given AOI. Python 3.5 """ import requests import io import zipfile import os from time import strftime import logging import yaml from model import aircraft_report from model import report_receiver from utils import postgres as pg_utils logger = logging.getLogger(__...
Refactor output for zip archive and download
Refactor output for zip archive and download
Python
apache-2.0
GISDev01/adsbpostgis
""" Utilities for downloading historical data in a given AOI. Python 3.5 """ import requests import io import zipfile import os from time import strftime import logging import yaml from model import aircraft_report from model import report_receiver from utils import postgres as pg_utils logger = logging.getLogger(__...
""" Utilities for downloading historical data in a given AOI. Python 3.5 """ import requests import io import zipfile import os from time import strftime import logging import yaml from model import aircraft_report from model import report_receiver from utils import postgres as pg_utils logger = logging.getLogger(__...
<commit_before>""" Utilities for downloading historical data in a given AOI. Python 3.5 """ import requests import io import zipfile import os from time import strftime import logging import yaml from model import aircraft_report from model import report_receiver from utils import postgres as pg_utils logger = loggi...
""" Utilities for downloading historical data in a given AOI. Python 3.5 """ import requests import io import zipfile import os from time import strftime import logging import yaml from model import aircraft_report from model import report_receiver from utils import postgres as pg_utils logger = logging.getLogger(__...
""" Utilities for downloading historical data in a given AOI. Python 3.5 """ import requests import io import zipfile import os from time import strftime import logging import yaml from model import aircraft_report from model import report_receiver from utils import postgres as pg_utils logger = logging.getLogger(__...
<commit_before>""" Utilities for downloading historical data in a given AOI. Python 3.5 """ import requests import io import zipfile import os from time import strftime import logging import yaml from model import aircraft_report from model import report_receiver from utils import postgres as pg_utils logger = loggi...
53ee8d6a3fd773b08003ca6e7a371ac787eab622
polling_stations/apps/data_collection/management/commands/import_watford.py
polling_stations/apps/data_collection/management/commands/import_watford.py
""" Import Watford """ from data_collection.management.commands import BaseShpShpImporter class Command(BaseShpShpImporter): """ Imports the Polling Station data from Watford """ council_id = 'E07000103' districts_name = 'Watford_Polling_Districts' stations_name = 'Watford_Polling_Stations...
""" Import Watford """ from data_collection.management.commands import BaseShpShpImporter class Command(BaseShpShpImporter): """ Imports the Polling Station data from Watford """ council_id = 'E07000103' districts_name = 'Watford_Polling_Districts' stations_name = 'Watford_Polling_Stations...
Add polling_district_id in Watford import script
Add polling_district_id in Watford import script
Python
bsd-3-clause
chris48s/UK-Polling-Stations,DemocracyClub/UK-Polling-Stations,chris48s/UK-Polling-Stations,DemocracyClub/UK-Polling-Stations,chris48s/UK-Polling-Stations,andylolz/UK-Polling-Stations,andylolz/UK-Polling-Stations,DemocracyClub/UK-Polling-Stations,andylolz/UK-Polling-Stations
""" Import Watford """ from data_collection.management.commands import BaseShpShpImporter class Command(BaseShpShpImporter): """ Imports the Polling Station data from Watford """ council_id = 'E07000103' districts_name = 'Watford_Polling_Districts' stations_name = 'Watford_Polling_Stations...
""" Import Watford """ from data_collection.management.commands import BaseShpShpImporter class Command(BaseShpShpImporter): """ Imports the Polling Station data from Watford """ council_id = 'E07000103' districts_name = 'Watford_Polling_Districts' stations_name = 'Watford_Polling_Stations...
<commit_before>""" Import Watford """ from data_collection.management.commands import BaseShpShpImporter class Command(BaseShpShpImporter): """ Imports the Polling Station data from Watford """ council_id = 'E07000103' districts_name = 'Watford_Polling_Districts' stations_name = 'Watford_P...
""" Import Watford """ from data_collection.management.commands import BaseShpShpImporter class Command(BaseShpShpImporter): """ Imports the Polling Station data from Watford """ council_id = 'E07000103' districts_name = 'Watford_Polling_Districts' stations_name = 'Watford_Polling_Stations...
""" Import Watford """ from data_collection.management.commands import BaseShpShpImporter class Command(BaseShpShpImporter): """ Imports the Polling Station data from Watford """ council_id = 'E07000103' districts_name = 'Watford_Polling_Districts' stations_name = 'Watford_Polling_Stations...
<commit_before>""" Import Watford """ from data_collection.management.commands import BaseShpShpImporter class Command(BaseShpShpImporter): """ Imports the Polling Station data from Watford """ council_id = 'E07000103' districts_name = 'Watford_Polling_Districts' stations_name = 'Watford_P...
761b0a959882499b629d9bc3fbd1b971beaf66a5
mymodule/blueprints/api_v1/__init__.py
mymodule/blueprints/api_v1/__init__.py
import flask from flask import current_app as app from werkzeug import exceptions from mymodule.blueprints.api_v1 import upload blueprint = flask.Blueprint('v1', __name__, url_prefix='/api/v1') blueprint.add_url_rule('/upload', view_func=upload.post, methods=['POST']) @blueprint.route('/test') def index(): app...
import flask from flask import current_app as app from werkzeug import exceptions from . import upload blueprint = flask.Blueprint('v1', __name__, url_prefix='/api/v1') blueprint.add_url_rule('/upload', view_func=upload.post, methods=['POST']) @blueprint.route('/test') def index(): app.logger.info('TEST %d', 1...
Simplify import of api_v1 subpackage.
Simplify import of api_v1 subpackage.
Python
mit
eduardobmc/flask-test
import flask from flask import current_app as app from werkzeug import exceptions from mymodule.blueprints.api_v1 import upload blueprint = flask.Blueprint('v1', __name__, url_prefix='/api/v1') blueprint.add_url_rule('/upload', view_func=upload.post, methods=['POST']) @blueprint.route('/test') def index(): app...
import flask from flask import current_app as app from werkzeug import exceptions from . import upload blueprint = flask.Blueprint('v1', __name__, url_prefix='/api/v1') blueprint.add_url_rule('/upload', view_func=upload.post, methods=['POST']) @blueprint.route('/test') def index(): app.logger.info('TEST %d', 1...
<commit_before>import flask from flask import current_app as app from werkzeug import exceptions from mymodule.blueprints.api_v1 import upload blueprint = flask.Blueprint('v1', __name__, url_prefix='/api/v1') blueprint.add_url_rule('/upload', view_func=upload.post, methods=['POST']) @blueprint.route('/test') def i...
import flask from flask import current_app as app from werkzeug import exceptions from . import upload blueprint = flask.Blueprint('v1', __name__, url_prefix='/api/v1') blueprint.add_url_rule('/upload', view_func=upload.post, methods=['POST']) @blueprint.route('/test') def index(): app.logger.info('TEST %d', 1...
import flask from flask import current_app as app from werkzeug import exceptions from mymodule.blueprints.api_v1 import upload blueprint = flask.Blueprint('v1', __name__, url_prefix='/api/v1') blueprint.add_url_rule('/upload', view_func=upload.post, methods=['POST']) @blueprint.route('/test') def index(): app...
<commit_before>import flask from flask import current_app as app from werkzeug import exceptions from mymodule.blueprints.api_v1 import upload blueprint = flask.Blueprint('v1', __name__, url_prefix='/api/v1') blueprint.add_url_rule('/upload', view_func=upload.post, methods=['POST']) @blueprint.route('/test') def i...
48c20cdd866299a8b7495038ecb7ec9ea831657e
ibmcnx/doc/DataSources.py
ibmcnx/doc/DataSources.py
###### # Check ExId (GUID) by Email through JDBC # # Author: Christoph Stoettner # Mail: [email protected] # Documentation: http://scripting101.stoeps.de # # Version: 2.0 # Date: 2014-06-04 # # License: Apache 2.0 # # Check ExId of a User in all Connections Appli...
###### # Check ExId (GUID) by Email through JDBC # # Author: Christoph Stoettner # Mail: [email protected] # Documentation: http://scripting101.stoeps.de # # Version: 2.0 # Date: 2014-06-04 # # License: Apache 2.0 # # Check ExId of a User in all Connections Appli...
Create documentation of DataSource Settings
: Create documentation of DataSource Settings Task-Url:
Python
apache-2.0
stoeps13/ibmcnx2,stoeps13/ibmcnx2
###### # Check ExId (GUID) by Email through JDBC # # Author: Christoph Stoettner # Mail: [email protected] # Documentation: http://scripting101.stoeps.de # # Version: 2.0 # Date: 2014-06-04 # # License: Apache 2.0 # # Check ExId of a User in all Connections Appli...
###### # Check ExId (GUID) by Email through JDBC # # Author: Christoph Stoettner # Mail: [email protected] # Documentation: http://scripting101.stoeps.de # # Version: 2.0 # Date: 2014-06-04 # # License: Apache 2.0 # # Check ExId of a User in all Connections Appli...
<commit_before>###### # Check ExId (GUID) by Email through JDBC # # Author: Christoph Stoettner # Mail: [email protected] # Documentation: http://scripting101.stoeps.de # # Version: 2.0 # Date: 2014-06-04 # # License: Apache 2.0 # # Check ExId of a User in all Co...
###### # Check ExId (GUID) by Email through JDBC # # Author: Christoph Stoettner # Mail: [email protected] # Documentation: http://scripting101.stoeps.de # # Version: 2.0 # Date: 2014-06-04 # # License: Apache 2.0 # # Check ExId of a User in all Connections Appli...
###### # Check ExId (GUID) by Email through JDBC # # Author: Christoph Stoettner # Mail: [email protected] # Documentation: http://scripting101.stoeps.de # # Version: 2.0 # Date: 2014-06-04 # # License: Apache 2.0 # # Check ExId of a User in all Connections Appli...
<commit_before>###### # Check ExId (GUID) by Email through JDBC # # Author: Christoph Stoettner # Mail: [email protected] # Documentation: http://scripting101.stoeps.de # # Version: 2.0 # Date: 2014-06-04 # # License: Apache 2.0 # # Check ExId of a User in all Co...
0b4a210031af065f9e8c98d98242283660e2fe7e
runtests.py
runtests.py
# python setup.py test # or # python runtests.py import sys from django.conf import settings APP = 'djrill' settings.configure( DEBUG=True, DATABASES={ 'default': { 'ENGINE': 'django.db.backends.sqlite3', } }, ROOT_URLCONF=APP+'.urls', INSTALLED_APPS=( 'djang...
# python setup.py test # or # python runtests.py import sys from django import VERSION as django_version from django.conf import settings APP = 'djrill' ADMIN = 'django.contrib.admin' if django_version >= (1, 7): ADMIN = 'django.contrib.admin.apps.SimpleAdminConfig' settings.configure( DEBUG=True, DATA...
Test against SimpleAdminConfig on Django>=1.7.
Test against SimpleAdminConfig on Django>=1.7. In test cases, use the same admin setup we recommend to users.
Python
bsd-3-clause
idlweb/Djrill,barseghyanartur/Djrill,janusnic/Djrill,brack3t/Djrill,janusnic/Djrill,idlweb/Djrill,barseghyanartur/Djrill
# python setup.py test # or # python runtests.py import sys from django.conf import settings APP = 'djrill' settings.configure( DEBUG=True, DATABASES={ 'default': { 'ENGINE': 'django.db.backends.sqlite3', } }, ROOT_URLCONF=APP+'.urls', INSTALLED_APPS=( 'djang...
# python setup.py test # or # python runtests.py import sys from django import VERSION as django_version from django.conf import settings APP = 'djrill' ADMIN = 'django.contrib.admin' if django_version >= (1, 7): ADMIN = 'django.contrib.admin.apps.SimpleAdminConfig' settings.configure( DEBUG=True, DATA...
<commit_before># python setup.py test # or # python runtests.py import sys from django.conf import settings APP = 'djrill' settings.configure( DEBUG=True, DATABASES={ 'default': { 'ENGINE': 'django.db.backends.sqlite3', } }, ROOT_URLCONF=APP+'.urls', INSTALLED_APPS=(...
# python setup.py test # or # python runtests.py import sys from django import VERSION as django_version from django.conf import settings APP = 'djrill' ADMIN = 'django.contrib.admin' if django_version >= (1, 7): ADMIN = 'django.contrib.admin.apps.SimpleAdminConfig' settings.configure( DEBUG=True, DATA...
# python setup.py test # or # python runtests.py import sys from django.conf import settings APP = 'djrill' settings.configure( DEBUG=True, DATABASES={ 'default': { 'ENGINE': 'django.db.backends.sqlite3', } }, ROOT_URLCONF=APP+'.urls', INSTALLED_APPS=( 'djang...
<commit_before># python setup.py test # or # python runtests.py import sys from django.conf import settings APP = 'djrill' settings.configure( DEBUG=True, DATABASES={ 'default': { 'ENGINE': 'django.db.backends.sqlite3', } }, ROOT_URLCONF=APP+'.urls', INSTALLED_APPS=(...
cc2e96a6030840c5221a2cce5042bedb69f8fc55
templates/openwisp2/urls.py
templates/openwisp2/urls.py
from django.conf.urls import include, url from django.contrib import admin from django.contrib.staticfiles.urls import staticfiles_urlpatterns admin.autodiscover() urlpatterns = [ url(r'^admin/', include(admin.site.urls)), url(r'^', include('django_netjsonconfig.controller.urls', namespace='controller')), ] ...
from django.conf.urls import include, url from django.contrib import admin from django.contrib.staticfiles.urls import staticfiles_urlpatterns admin.autodiscover() admin.site.site_url = None urlpatterns = [ url(r'^admin/', include(admin.site.urls)), url(r'^', include('django_netjsonconfig.controller.urls', n...
Hide "view site" link in admin
Hide "view site" link in admin
Python
bsd-3-clause
nemesisdesign/ansible-openwisp2,openwisp/ansible-openwisp2,ritwickdsouza/ansible-openwisp2
from django.conf.urls import include, url from django.contrib import admin from django.contrib.staticfiles.urls import staticfiles_urlpatterns admin.autodiscover() urlpatterns = [ url(r'^admin/', include(admin.site.urls)), url(r'^', include('django_netjsonconfig.controller.urls', namespace='controller')), ] ...
from django.conf.urls import include, url from django.contrib import admin from django.contrib.staticfiles.urls import staticfiles_urlpatterns admin.autodiscover() admin.site.site_url = None urlpatterns = [ url(r'^admin/', include(admin.site.urls)), url(r'^', include('django_netjsonconfig.controller.urls', n...
<commit_before>from django.conf.urls import include, url from django.contrib import admin from django.contrib.staticfiles.urls import staticfiles_urlpatterns admin.autodiscover() urlpatterns = [ url(r'^admin/', include(admin.site.urls)), url(r'^', include('django_netjsonconfig.controller.urls', namespace='co...
from django.conf.urls import include, url from django.contrib import admin from django.contrib.staticfiles.urls import staticfiles_urlpatterns admin.autodiscover() admin.site.site_url = None urlpatterns = [ url(r'^admin/', include(admin.site.urls)), url(r'^', include('django_netjsonconfig.controller.urls', n...
from django.conf.urls import include, url from django.contrib import admin from django.contrib.staticfiles.urls import staticfiles_urlpatterns admin.autodiscover() urlpatterns = [ url(r'^admin/', include(admin.site.urls)), url(r'^', include('django_netjsonconfig.controller.urls', namespace='controller')), ] ...
<commit_before>from django.conf.urls import include, url from django.contrib import admin from django.contrib.staticfiles.urls import staticfiles_urlpatterns admin.autodiscover() urlpatterns = [ url(r'^admin/', include(admin.site.urls)), url(r'^', include('django_netjsonconfig.controller.urls', namespace='co...
dd19919923b5265b913089b46cbcb60d4bec0841
tests/unit/common/storage/test_utils.py
tests/unit/common/storage/test_utils.py
# Copyright (c) 2014 Rackspace Hosting, Inc. # # 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 ...
# Copyright (c) 2014 Rackspace Hosting, Inc. # # 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 ...
Fix assertion for Testutils to check on sqlite://:memory:
Fix assertion for Testutils to check on sqlite://:memory: The current uses sqlite://memory to test a connection. This is a faulty path to memory. Corrent path is sqlite://:memory: Change-Id: I950521f9b9c6aa8ae73be24121a836e84e409ca2
Python
apache-2.0
rackerlabs/marconi,openstack/zaqar,openstack/zaqar,openstack/zaqar,openstack/zaqar
# Copyright (c) 2014 Rackspace Hosting, Inc. # # 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 ...
# Copyright (c) 2014 Rackspace Hosting, Inc. # # 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 ...
<commit_before># Copyright (c) 2014 Rackspace Hosting, Inc. # # 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...
# Copyright (c) 2014 Rackspace Hosting, Inc. # # 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 ...
# Copyright (c) 2014 Rackspace Hosting, Inc. # # 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 ...
<commit_before># Copyright (c) 2014 Rackspace Hosting, Inc. # # 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...
d0dfd2c9055092f64e396177275dbe285ad41efb
blo/DBControl.py
blo/DBControl.py
import sqlite3 class DBControl: def __init__(self, db_name=":memory:"): self.db_conn = sqlite3.connect(db_name)
import sqlite3 class DBControl: def __init__(self, db_name=":memory:"): self.db_conn = sqlite3.connect(db_name) def create_tables(self): self.db_conn.execute("""CREATE TABLE IF NOT EXISTS Articles (" id INTEGER PRIMARY KEY AUTOINCREMENT, ...
Add Create tables method and close db connection method.
Add Create tables method and close db connection method. create_table method create article table (if not exists in db) and virtual table for full text search.
Python
mit
10nin/blo,10nin/blo
import sqlite3 class DBControl: def __init__(self, db_name=":memory:"): self.db_conn = sqlite3.connect(db_name) Add Create tables method and close db connection method. create_table method create article table (if not exists in db) and virtual table for full text search.
import sqlite3 class DBControl: def __init__(self, db_name=":memory:"): self.db_conn = sqlite3.connect(db_name) def create_tables(self): self.db_conn.execute("""CREATE TABLE IF NOT EXISTS Articles (" id INTEGER PRIMARY KEY AUTOINCREMENT, ...
<commit_before>import sqlite3 class DBControl: def __init__(self, db_name=":memory:"): self.db_conn = sqlite3.connect(db_name) <commit_msg>Add Create tables method and close db connection method. create_table method create article table (if not exists in db) and virtual table for full text search.<commit...
import sqlite3 class DBControl: def __init__(self, db_name=":memory:"): self.db_conn = sqlite3.connect(db_name) def create_tables(self): self.db_conn.execute("""CREATE TABLE IF NOT EXISTS Articles (" id INTEGER PRIMARY KEY AUTOINCREMENT, ...
import sqlite3 class DBControl: def __init__(self, db_name=":memory:"): self.db_conn = sqlite3.connect(db_name) Add Create tables method and close db connection method. create_table method create article table (if not exists in db) and virtual table for full text search.import sqlite3 class DBControl: ...
<commit_before>import sqlite3 class DBControl: def __init__(self, db_name=":memory:"): self.db_conn = sqlite3.connect(db_name) <commit_msg>Add Create tables method and close db connection method. create_table method create article table (if not exists in db) and virtual table for full text search.<commit...
b2ed8de7302cbea0a80b87f3dfe370ca0a60d75a
kawasemi/backends/github.py
kawasemi/backends/github.py
# -*- coding: utf-8 -*- import json import requests from .base import BaseChannel from ..exceptions import HttpError class GitHubChannel(BaseChannel): def __init__(self, token, owner, repository, base_url="https://api.github.com", *args, **kwargs): self.token = token self.url = ...
# -*- coding: utf-8 -*- import json import requests from .base import BaseChannel from ..exceptions import HttpError class GitHubChannel(BaseChannel): def __init__(self, token, owner, repository, base_url="https://api.github.com", *args, **kwargs): self.token = token self.url = ...
Set Accept header explicitly in GitHubChannel
Set Accept header explicitly in GitHubChannel
Python
mit
ymyzk/kawasemi,ymyzk/django-channels
# -*- coding: utf-8 -*- import json import requests from .base import BaseChannel from ..exceptions import HttpError class GitHubChannel(BaseChannel): def __init__(self, token, owner, repository, base_url="https://api.github.com", *args, **kwargs): self.token = token self.url = ...
# -*- coding: utf-8 -*- import json import requests from .base import BaseChannel from ..exceptions import HttpError class GitHubChannel(BaseChannel): def __init__(self, token, owner, repository, base_url="https://api.github.com", *args, **kwargs): self.token = token self.url = ...
<commit_before># -*- coding: utf-8 -*- import json import requests from .base import BaseChannel from ..exceptions import HttpError class GitHubChannel(BaseChannel): def __init__(self, token, owner, repository, base_url="https://api.github.com", *args, **kwargs): self.token = token ...
# -*- coding: utf-8 -*- import json import requests from .base import BaseChannel from ..exceptions import HttpError class GitHubChannel(BaseChannel): def __init__(self, token, owner, repository, base_url="https://api.github.com", *args, **kwargs): self.token = token self.url = ...
# -*- coding: utf-8 -*- import json import requests from .base import BaseChannel from ..exceptions import HttpError class GitHubChannel(BaseChannel): def __init__(self, token, owner, repository, base_url="https://api.github.com", *args, **kwargs): self.token = token self.url = ...
<commit_before># -*- coding: utf-8 -*- import json import requests from .base import BaseChannel from ..exceptions import HttpError class GitHubChannel(BaseChannel): def __init__(self, token, owner, repository, base_url="https://api.github.com", *args, **kwargs): self.token = token ...
c04c9dcfdc2be2368ac2c705ce4852039573767b
datac/main.py
datac/main.py
# -*- coding: utf-8 -*- import copy def init_abscissa(params, abscissae, abscissa_name): """ List of dicts to initialize object w/ calc method This method generates a list of dicts; each dict is sufficient to initialize an object featuring a calculator method of interest. This list can be thought of as th...
# -*- coding: utf-8 -*- import copy def init_abscissa(abscissae, abscissa_name, params = {}): """ List of dicts to initialize object w/ calc method This method generates a list of dicts; each dict is sufficient to initialize an object featuring a calculator method of interest. This list can be thought of ...
Reorder arg list, set default for static params
Reorder arg list, set default for static params
Python
mit
jrsmith3/datac,jrsmith3/datac
# -*- coding: utf-8 -*- import copy def init_abscissa(params, abscissae, abscissa_name): """ List of dicts to initialize object w/ calc method This method generates a list of dicts; each dict is sufficient to initialize an object featuring a calculator method of interest. This list can be thought of as th...
# -*- coding: utf-8 -*- import copy def init_abscissa(abscissae, abscissa_name, params = {}): """ List of dicts to initialize object w/ calc method This method generates a list of dicts; each dict is sufficient to initialize an object featuring a calculator method of interest. This list can be thought of ...
<commit_before># -*- coding: utf-8 -*- import copy def init_abscissa(params, abscissae, abscissa_name): """ List of dicts to initialize object w/ calc method This method generates a list of dicts; each dict is sufficient to initialize an object featuring a calculator method of interest. This list can be t...
# -*- coding: utf-8 -*- import copy def init_abscissa(abscissae, abscissa_name, params = {}): """ List of dicts to initialize object w/ calc method This method generates a list of dicts; each dict is sufficient to initialize an object featuring a calculator method of interest. This list can be thought of ...
# -*- coding: utf-8 -*- import copy def init_abscissa(params, abscissae, abscissa_name): """ List of dicts to initialize object w/ calc method This method generates a list of dicts; each dict is sufficient to initialize an object featuring a calculator method of interest. This list can be thought of as th...
<commit_before># -*- coding: utf-8 -*- import copy def init_abscissa(params, abscissae, abscissa_name): """ List of dicts to initialize object w/ calc method This method generates a list of dicts; each dict is sufficient to initialize an object featuring a calculator method of interest. This list can be t...
746510dc0b939fe11a2b025805678a0829cf814a
handler/minion_server.py
handler/minion_server.py
#!/usr/bin/env python import server import supervisor class MinionServer(server.Server): def __init__(self, ip, port): super(MinionServer, self).__init__(ip, port) def handle(self, data): supervisor.start( 'worker.conf', target='worker_{}'.format(data['image']), ...
#!/usr/bin/env python import server import supervisor class MinionServer(server.Server): def __init__(self, ip, port): super(MinionServer, self).__init__(ip, port) def handle(self, data): """Start a worker. Message format: { 'image': 'image name' ...
Document message format for minion server
Document message format for minion server
Python
mit
waltermoreira/adama-minion
#!/usr/bin/env python import server import supervisor class MinionServer(server.Server): def __init__(self, ip, port): super(MinionServer, self).__init__(ip, port) def handle(self, data): supervisor.start( 'worker.conf', target='worker_{}'.format(data['image']), ...
#!/usr/bin/env python import server import supervisor class MinionServer(server.Server): def __init__(self, ip, port): super(MinionServer, self).__init__(ip, port) def handle(self, data): """Start a worker. Message format: { 'image': 'image name' ...
<commit_before>#!/usr/bin/env python import server import supervisor class MinionServer(server.Server): def __init__(self, ip, port): super(MinionServer, self).__init__(ip, port) def handle(self, data): supervisor.start( 'worker.conf', target='worker_{}'.format(data[...
#!/usr/bin/env python import server import supervisor class MinionServer(server.Server): def __init__(self, ip, port): super(MinionServer, self).__init__(ip, port) def handle(self, data): """Start a worker. Message format: { 'image': 'image name' ...
#!/usr/bin/env python import server import supervisor class MinionServer(server.Server): def __init__(self, ip, port): super(MinionServer, self).__init__(ip, port) def handle(self, data): supervisor.start( 'worker.conf', target='worker_{}'.format(data['image']), ...
<commit_before>#!/usr/bin/env python import server import supervisor class MinionServer(server.Server): def __init__(self, ip, port): super(MinionServer, self).__init__(ip, port) def handle(self, data): supervisor.start( 'worker.conf', target='worker_{}'.format(data[...
fbb78c22de50274c2fa937929799259042810bac
src/sas/sasview/__init__.py
src/sas/sasview/__init__.py
from distutils.version import StrictVersion __version__ = "5.0" StrictVersion(__version__) __DOI__ = "Zenodo, DOI:10.5281/zenodo.3011184" __release_date__ = "2019" __build__ = "GIT_COMMIT"
from distutils.version import StrictVersion __version__ = "5.0.1" StrictVersion(__version__) __DOI__ = "Zenodo, DOI:10.5281/zenodo.3011184" __release_date__ = "2019" __build__ = "GIT_COMMIT"
Update dot version number to enable separate installation space. GH-1412
Update dot version number to enable separate installation space. GH-1412
Python
bsd-3-clause
SasView/sasview,SasView/sasview,SasView/sasview,SasView/sasview,SasView/sasview,SasView/sasview
from distutils.version import StrictVersion __version__ = "5.0" StrictVersion(__version__) __DOI__ = "Zenodo, DOI:10.5281/zenodo.3011184" __release_date__ = "2019" __build__ = "GIT_COMMIT"Update dot version number to enable separate installation space. GH-1412
from distutils.version import StrictVersion __version__ = "5.0.1" StrictVersion(__version__) __DOI__ = "Zenodo, DOI:10.5281/zenodo.3011184" __release_date__ = "2019" __build__ = "GIT_COMMIT"
<commit_before>from distutils.version import StrictVersion __version__ = "5.0" StrictVersion(__version__) __DOI__ = "Zenodo, DOI:10.5281/zenodo.3011184" __release_date__ = "2019" __build__ = "GIT_COMMIT"<commit_msg>Update dot version number to enable separate installation space. GH-1412<commit_after>
from distutils.version import StrictVersion __version__ = "5.0.1" StrictVersion(__version__) __DOI__ = "Zenodo, DOI:10.5281/zenodo.3011184" __release_date__ = "2019" __build__ = "GIT_COMMIT"
from distutils.version import StrictVersion __version__ = "5.0" StrictVersion(__version__) __DOI__ = "Zenodo, DOI:10.5281/zenodo.3011184" __release_date__ = "2019" __build__ = "GIT_COMMIT"Update dot version number to enable separate installation space. GH-1412from distutils.version import StrictVersion __version__ = "5...
<commit_before>from distutils.version import StrictVersion __version__ = "5.0" StrictVersion(__version__) __DOI__ = "Zenodo, DOI:10.5281/zenodo.3011184" __release_date__ = "2019" __build__ = "GIT_COMMIT"<commit_msg>Update dot version number to enable separate installation space. GH-1412<commit_after>from distutils.vers...
75eed75ee9c70368100d7ce8f3fdcc8169912062
lfc/context_processors.py
lfc/context_processors.py
# lfc imports import lfc.utils from django.conf import settings from django.utils import translation def main(request): """context processor for LFC. """ current_language = translation.get_language() default_language = settings.LANGUAGE_CODE return { "PORTAL" : lfc.utils.get_portal(), ...
# lfc imports import lfc.utils from django.conf import settings from django.utils import translation def main(request): """context processor for LFC. """ current_language = translation.get_language() default_language = settings.LANGUAGE_CODE is_default_language = default_language == current_la...
Return correct language for using within links
Improvement: Return correct language for using within links
Python
bsd-3-clause
natea/django-lfc,natea/django-lfc
# lfc imports import lfc.utils from django.conf import settings from django.utils import translation def main(request): """context processor for LFC. """ current_language = translation.get_language() default_language = settings.LANGUAGE_CODE return { "PORTAL" : lfc.utils.get_portal(), ...
# lfc imports import lfc.utils from django.conf import settings from django.utils import translation def main(request): """context processor for LFC. """ current_language = translation.get_language() default_language = settings.LANGUAGE_CODE is_default_language = default_language == current_la...
<commit_before># lfc imports import lfc.utils from django.conf import settings from django.utils import translation def main(request): """context processor for LFC. """ current_language = translation.get_language() default_language = settings.LANGUAGE_CODE return { "PORTAL" : lfc.utils.get...
# lfc imports import lfc.utils from django.conf import settings from django.utils import translation def main(request): """context processor for LFC. """ current_language = translation.get_language() default_language = settings.LANGUAGE_CODE is_default_language = default_language == current_la...
# lfc imports import lfc.utils from django.conf import settings from django.utils import translation def main(request): """context processor for LFC. """ current_language = translation.get_language() default_language = settings.LANGUAGE_CODE return { "PORTAL" : lfc.utils.get_portal(), ...
<commit_before># lfc imports import lfc.utils from django.conf import settings from django.utils import translation def main(request): """context processor for LFC. """ current_language = translation.get_language() default_language = settings.LANGUAGE_CODE return { "PORTAL" : lfc.utils.get...
fb34c787c1d0050436698929d200202329a27bf3
app/settings.py
app/settings.py
import os SECURE_MESSAGING_DATABASE_URL = os.getenv('SECURE_MESSAGING_DATABASE_URL', 'sqlite:////tmp/messages.db') # postgres://rasmessage:rasmessage@localhost:5432/messages
import os ''' This file is the main configuration for the Secure Messaging Service. It contains a full default configuration All configuration may be overridden by setting the appropriate environment variable name. ''' SECURE_MESSAGING_DATABASE_URL = os.getenv('SECURE_MESSAGING_DATABASE_URL', 'sqlite:////tmp/...
Add docstring to main configuration.
Add docstring to main configuration.
Python
mit
qateam123/secure-messaging-api
import os SECURE_MESSAGING_DATABASE_URL = os.getenv('SECURE_MESSAGING_DATABASE_URL', 'sqlite:////tmp/messages.db') # postgres://rasmessage:rasmessage@localhost:5432/messages Add docstring to main configuration.
import os ''' This file is the main configuration for the Secure Messaging Service. It contains a full default configuration All configuration may be overridden by setting the appropriate environment variable name. ''' SECURE_MESSAGING_DATABASE_URL = os.getenv('SECURE_MESSAGING_DATABASE_URL', 'sqlite:////tmp/...
<commit_before>import os SECURE_MESSAGING_DATABASE_URL = os.getenv('SECURE_MESSAGING_DATABASE_URL', 'sqlite:////tmp/messages.db') # postgres://rasmessage:rasmessage@localhost:5432/messages <commit_msg>Add docstring to main configuration.<commit_after>
import os ''' This file is the main configuration for the Secure Messaging Service. It contains a full default configuration All configuration may be overridden by setting the appropriate environment variable name. ''' SECURE_MESSAGING_DATABASE_URL = os.getenv('SECURE_MESSAGING_DATABASE_URL', 'sqlite:////tmp/...
import os SECURE_MESSAGING_DATABASE_URL = os.getenv('SECURE_MESSAGING_DATABASE_URL', 'sqlite:////tmp/messages.db') # postgres://rasmessage:rasmessage@localhost:5432/messages Add docstring to main configuration.import os ''' This file is the main configuration for the Secure Messaging Service. It contains a full d...
<commit_before>import os SECURE_MESSAGING_DATABASE_URL = os.getenv('SECURE_MESSAGING_DATABASE_URL', 'sqlite:////tmp/messages.db') # postgres://rasmessage:rasmessage@localhost:5432/messages <commit_msg>Add docstring to main configuration.<commit_after>import os ''' This file is the main configuration for the Secure Me...
8570efd42f35b89d9a97d9aa5a5aa47765cd21f6
diary/logthread.py
diary/logthread.py
from threading import Thread try: from queue import Queue except ImportError: # python 2 from Queue import Queue class ElemThread(Thread): """A thread for logging as to not disrupt the logged application""" def __init__(self, elem, name="Elementary Logger"): """Construct a thread for logging...
from threading import Thread try: from queue import Queue except ImportError: # python 2 from Queue import Queue class DiaryThread(Thread): """A thread for logging as to not disrupt the logged application""" def __init__(self, diary, name="Diary Logger"): """Construct a thread for logging ...
Make last changes over to diary name
Make last changes over to diary name
Python
mit
GreenVars/diary
from threading import Thread try: from queue import Queue except ImportError: # python 2 from Queue import Queue class ElemThread(Thread): """A thread for logging as to not disrupt the logged application""" def __init__(self, elem, name="Elementary Logger"): """Construct a thread for logging...
from threading import Thread try: from queue import Queue except ImportError: # python 2 from Queue import Queue class DiaryThread(Thread): """A thread for logging as to not disrupt the logged application""" def __init__(self, diary, name="Diary Logger"): """Construct a thread for logging ...
<commit_before>from threading import Thread try: from queue import Queue except ImportError: # python 2 from Queue import Queue class ElemThread(Thread): """A thread for logging as to not disrupt the logged application""" def __init__(self, elem, name="Elementary Logger"): """Construct a thr...
from threading import Thread try: from queue import Queue except ImportError: # python 2 from Queue import Queue class DiaryThread(Thread): """A thread for logging as to not disrupt the logged application""" def __init__(self, diary, name="Diary Logger"): """Construct a thread for logging ...
from threading import Thread try: from queue import Queue except ImportError: # python 2 from Queue import Queue class ElemThread(Thread): """A thread for logging as to not disrupt the logged application""" def __init__(self, elem, name="Elementary Logger"): """Construct a thread for logging...
<commit_before>from threading import Thread try: from queue import Queue except ImportError: # python 2 from Queue import Queue class ElemThread(Thread): """A thread for logging as to not disrupt the logged application""" def __init__(self, elem, name="Elementary Logger"): """Construct a thr...
ac8ec95b5d9f3f0bca2f6c1e367a08a5fd0ee787
bdp/runtests.py
bdp/runtests.py
""" Module runtests.py - Runs all unittests configured in different buildout projects. """ import os import subprocess, shlex PYPROJECTS = 'platform/frontend' def run(): """ Main eintry point """ projects = PYPROJECTS.split(',') for project in projects: cmd = shlex.split('bin/django jenki...
""" Module runtests.py - Runs all unittests configured in different buildout projects. """ import os import subprocess, shlex PYPROJECTS = 'platform/frontend' def run(): """ Main eintry point """ projects = PYPROJECTS.split(',') projects_root = os.getcwd() for project in projects: os....
Change to correct directory when testing
Change to correct directory when testing
Python
apache-2.0
telefonicaid/fiware-cosmos-platform,telefonicaid/fiware-cosmos-platform,telefonicaid/fiware-cosmos-platform,telefonicaid/fiware-cosmos-platform,telefonicaid/fiware-cosmos-platform
""" Module runtests.py - Runs all unittests configured in different buildout projects. """ import os import subprocess, shlex PYPROJECTS = 'platform/frontend' def run(): """ Main eintry point """ projects = PYPROJECTS.split(',') for project in projects: cmd = shlex.split('bin/django jenki...
""" Module runtests.py - Runs all unittests configured in different buildout projects. """ import os import subprocess, shlex PYPROJECTS = 'platform/frontend' def run(): """ Main eintry point """ projects = PYPROJECTS.split(',') projects_root = os.getcwd() for project in projects: os....
<commit_before>""" Module runtests.py - Runs all unittests configured in different buildout projects. """ import os import subprocess, shlex PYPROJECTS = 'platform/frontend' def run(): """ Main eintry point """ projects = PYPROJECTS.split(',') for project in projects: cmd = shlex.split('b...
""" Module runtests.py - Runs all unittests configured in different buildout projects. """ import os import subprocess, shlex PYPROJECTS = 'platform/frontend' def run(): """ Main eintry point """ projects = PYPROJECTS.split(',') projects_root = os.getcwd() for project in projects: os....
""" Module runtests.py - Runs all unittests configured in different buildout projects. """ import os import subprocess, shlex PYPROJECTS = 'platform/frontend' def run(): """ Main eintry point """ projects = PYPROJECTS.split(',') for project in projects: cmd = shlex.split('bin/django jenki...
<commit_before>""" Module runtests.py - Runs all unittests configured in different buildout projects. """ import os import subprocess, shlex PYPROJECTS = 'platform/frontend' def run(): """ Main eintry point """ projects = PYPROJECTS.split(',') for project in projects: cmd = shlex.split('b...
43abdf7610ba1ca16eb82f282d754d8b4033b834
test/symbols/show_glyphs.py
test/symbols/show_glyphs.py
#!/usr/bin/env python # -*- coding: utf-8 -*- devicons_start = "e700" devicons_end = "e7c5" print "Devicons" for ii in xrange(int(devicons_start, 16), int(devicons_end, 16) + 1): print unichr(ii), custom_start = "e600" custom_end = "e62b" print "\nCustom" for ii in xrange(int(custom_start, 16), int(custom_end, ...
#!/usr/bin/env python # -*- coding: utf-8 -*- devicons_start = "e700" devicons_end = "e7c5" print "Devicons" for ii in xrange(int(devicons_start, 16), int(devicons_end, 16) + 1): print unichr(ii), custom_start = "e5fa" custom_end = "e62b" print "\nCustom" for ii in xrange(int(custom_start, 16), int(custom_end, ...
Extend vim-devicons display script range
Extend vim-devicons display script range
Python
mit
mkofinas/prompt-support,mkofinas/prompt-support
#!/usr/bin/env python # -*- coding: utf-8 -*- devicons_start = "e700" devicons_end = "e7c5" print "Devicons" for ii in xrange(int(devicons_start, 16), int(devicons_end, 16) + 1): print unichr(ii), custom_start = "e600" custom_end = "e62b" print "\nCustom" for ii in xrange(int(custom_start, 16), int(custom_end, ...
#!/usr/bin/env python # -*- coding: utf-8 -*- devicons_start = "e700" devicons_end = "e7c5" print "Devicons" for ii in xrange(int(devicons_start, 16), int(devicons_end, 16) + 1): print unichr(ii), custom_start = "e5fa" custom_end = "e62b" print "\nCustom" for ii in xrange(int(custom_start, 16), int(custom_end, ...
<commit_before>#!/usr/bin/env python # -*- coding: utf-8 -*- devicons_start = "e700" devicons_end = "e7c5" print "Devicons" for ii in xrange(int(devicons_start, 16), int(devicons_end, 16) + 1): print unichr(ii), custom_start = "e600" custom_end = "e62b" print "\nCustom" for ii in xrange(int(custom_start, 16), i...
#!/usr/bin/env python # -*- coding: utf-8 -*- devicons_start = "e700" devicons_end = "e7c5" print "Devicons" for ii in xrange(int(devicons_start, 16), int(devicons_end, 16) + 1): print unichr(ii), custom_start = "e5fa" custom_end = "e62b" print "\nCustom" for ii in xrange(int(custom_start, 16), int(custom_end, ...
#!/usr/bin/env python # -*- coding: utf-8 -*- devicons_start = "e700" devicons_end = "e7c5" print "Devicons" for ii in xrange(int(devicons_start, 16), int(devicons_end, 16) + 1): print unichr(ii), custom_start = "e600" custom_end = "e62b" print "\nCustom" for ii in xrange(int(custom_start, 16), int(custom_end, ...
<commit_before>#!/usr/bin/env python # -*- coding: utf-8 -*- devicons_start = "e700" devicons_end = "e7c5" print "Devicons" for ii in xrange(int(devicons_start, 16), int(devicons_end, 16) + 1): print unichr(ii), custom_start = "e600" custom_end = "e62b" print "\nCustom" for ii in xrange(int(custom_start, 16), i...
4f20f940102d353b6200f44ae5aaa51a85b89aba
pxe_manager/tests/test_pxemanager.py
pxe_manager/tests/test_pxemanager.py
from pxe_manager.pxemanager import PxeManager from resource_manager.client import ResourceManagerClient import httpretty @httpretty.activate def test_defaults(): client = ResourceManagerClient() cobbler_url = "http://cobbler.example.com/cobbler_api" cobbler_user = "user" cobbler_password = "password" ...
from pxe_manager.pxemanager import PxeManager from resource_manager.client import ResourceManagerClient import httpretty @httpretty.activate def test_defaults(): host_client = ResourceManagerClient() pub_ip_client = ResourceManagerClient(resource_type='public-addresses') priv_ip_client = ResourceManagerCl...
Update unit test with new pxemanager signature
Update unit test with new pxemanager signature
Python
apache-2.0
tbeckham/DeploymentManager,tbeckham/DeploymentManager,ccassler/DeploymentManager,tbeckham/DeploymentManager,ccassler/DeploymentManager,ccassler/DeploymentManager
from pxe_manager.pxemanager import PxeManager from resource_manager.client import ResourceManagerClient import httpretty @httpretty.activate def test_defaults(): client = ResourceManagerClient() cobbler_url = "http://cobbler.example.com/cobbler_api" cobbler_user = "user" cobbler_password = "password" ...
from pxe_manager.pxemanager import PxeManager from resource_manager.client import ResourceManagerClient import httpretty @httpretty.activate def test_defaults(): host_client = ResourceManagerClient() pub_ip_client = ResourceManagerClient(resource_type='public-addresses') priv_ip_client = ResourceManagerCl...
<commit_before>from pxe_manager.pxemanager import PxeManager from resource_manager.client import ResourceManagerClient import httpretty @httpretty.activate def test_defaults(): client = ResourceManagerClient() cobbler_url = "http://cobbler.example.com/cobbler_api" cobbler_user = "user" cobbler_passwor...
from pxe_manager.pxemanager import PxeManager from resource_manager.client import ResourceManagerClient import httpretty @httpretty.activate def test_defaults(): host_client = ResourceManagerClient() pub_ip_client = ResourceManagerClient(resource_type='public-addresses') priv_ip_client = ResourceManagerCl...
from pxe_manager.pxemanager import PxeManager from resource_manager.client import ResourceManagerClient import httpretty @httpretty.activate def test_defaults(): client = ResourceManagerClient() cobbler_url = "http://cobbler.example.com/cobbler_api" cobbler_user = "user" cobbler_password = "password" ...
<commit_before>from pxe_manager.pxemanager import PxeManager from resource_manager.client import ResourceManagerClient import httpretty @httpretty.activate def test_defaults(): client = ResourceManagerClient() cobbler_url = "http://cobbler.example.com/cobbler_api" cobbler_user = "user" cobbler_passwor...
e307d4e5586ac08559cf607e484e55d70bd4b0ae
tests/people/test_models.py
tests/people/test_models.py
import pytest from components.people.models import Group, Idol, Membership, Staff from components.people.factories import (GroupFactory, IdolFactory, MembershipFactory, StaffFactory) @pytest.mark.django_db def test_group_factory(): factory = GroupFactory() assert isinstance(factory, Group) assert 'gr...
import pytest from components.people.models import Group, Idol, Membership, Staff from components.people.factories import (GroupFactory, IdolFactory, MembershipFactory, StaffFactory) pytestmark = pytest.mark.django_db def test_group_factory(): factory = GroupFactory() assert isinstance(factory, Group) ...
Mark all of these tests too.
Mark all of these tests too.
Python
apache-2.0
hello-base/web,hello-base/web,hello-base/web,hello-base/web
import pytest from components.people.models import Group, Idol, Membership, Staff from components.people.factories import (GroupFactory, IdolFactory, MembershipFactory, StaffFactory) @pytest.mark.django_db def test_group_factory(): factory = GroupFactory() assert isinstance(factory, Group) assert 'gr...
import pytest from components.people.models import Group, Idol, Membership, Staff from components.people.factories import (GroupFactory, IdolFactory, MembershipFactory, StaffFactory) pytestmark = pytest.mark.django_db def test_group_factory(): factory = GroupFactory() assert isinstance(factory, Group) ...
<commit_before>import pytest from components.people.models import Group, Idol, Membership, Staff from components.people.factories import (GroupFactory, IdolFactory, MembershipFactory, StaffFactory) @pytest.mark.django_db def test_group_factory(): factory = GroupFactory() assert isinstance(factory, Group)...
import pytest from components.people.models import Group, Idol, Membership, Staff from components.people.factories import (GroupFactory, IdolFactory, MembershipFactory, StaffFactory) pytestmark = pytest.mark.django_db def test_group_factory(): factory = GroupFactory() assert isinstance(factory, Group) ...
import pytest from components.people.models import Group, Idol, Membership, Staff from components.people.factories import (GroupFactory, IdolFactory, MembershipFactory, StaffFactory) @pytest.mark.django_db def test_group_factory(): factory = GroupFactory() assert isinstance(factory, Group) assert 'gr...
<commit_before>import pytest from components.people.models import Group, Idol, Membership, Staff from components.people.factories import (GroupFactory, IdolFactory, MembershipFactory, StaffFactory) @pytest.mark.django_db def test_group_factory(): factory = GroupFactory() assert isinstance(factory, Group)...
5cd5f89c7973fc3e5e3e7b4aabc4992050c3643f
tests/selenium/test_home.py
tests/selenium/test_home.py
""" Module to hold basic home Selenium tests. """ from selenium import selenium import unittest, time, re, os, sys, subprocess def rel_to_abs(path): """ Function to take relative path and make absolute """ current_dir = os.path.abspath(os.path.dirname(__file__)) return os.path.join(current_dir, pat...
""" Module to hold basic home Selenium tests. """ from selenium import selenium import unittest, time, re, os, sys, subprocess def rel_to_abs(path): """ Function to take relative path and make absolute """ current_dir = os.path.abspath(os.path.dirname(__file__)) return os.path.join(current_dir, pat...
Change selenium browser to firefox.
Change selenium browser to firefox.
Python
agpl-3.0
watchcat/cbu-rotterdam,codeforeurope/Change-By-Us,watchcat/cbu-rotterdam,localprojects/Change-By-Us,localprojects/Change-By-Us,codeforamerica/Change-By-Us,codeforeurope/Change-By-Us,codeforamerica/Change-By-Us,localprojects/Change-By-Us,watchcat/cbu-rotterdam,codeforamerica/Change-By-Us,watchcat/cbu-rotterdam,codeforeu...
""" Module to hold basic home Selenium tests. """ from selenium import selenium import unittest, time, re, os, sys, subprocess def rel_to_abs(path): """ Function to take relative path and make absolute """ current_dir = os.path.abspath(os.path.dirname(__file__)) return os.path.join(current_dir, pat...
""" Module to hold basic home Selenium tests. """ from selenium import selenium import unittest, time, re, os, sys, subprocess def rel_to_abs(path): """ Function to take relative path and make absolute """ current_dir = os.path.abspath(os.path.dirname(__file__)) return os.path.join(current_dir, pat...
<commit_before>""" Module to hold basic home Selenium tests. """ from selenium import selenium import unittest, time, re, os, sys, subprocess def rel_to_abs(path): """ Function to take relative path and make absolute """ current_dir = os.path.abspath(os.path.dirname(__file__)) return os.path.join(c...
""" Module to hold basic home Selenium tests. """ from selenium import selenium import unittest, time, re, os, sys, subprocess def rel_to_abs(path): """ Function to take relative path and make absolute """ current_dir = os.path.abspath(os.path.dirname(__file__)) return os.path.join(current_dir, pat...
""" Module to hold basic home Selenium tests. """ from selenium import selenium import unittest, time, re, os, sys, subprocess def rel_to_abs(path): """ Function to take relative path and make absolute """ current_dir = os.path.abspath(os.path.dirname(__file__)) return os.path.join(current_dir, pat...
<commit_before>""" Module to hold basic home Selenium tests. """ from selenium import selenium import unittest, time, re, os, sys, subprocess def rel_to_abs(path): """ Function to take relative path and make absolute """ current_dir = os.path.abspath(os.path.dirname(__file__)) return os.path.join(c...
61c4c634807b4adfe9e08152543eba396e256ab9
conllu/tree_helpers.py
conllu/tree_helpers.py
from __future__ import print_function, unicode_literals from collections import namedtuple TreeNode = namedtuple('TreeNode', ['data', 'children']) def create_tree(node_children_mapping, start=0): subtree = [ TreeNode(child, create_tree(node_children_mapping, child["id"])) for child in node_childre...
from __future__ import print_function, unicode_literals from collections import namedtuple TreeNode = namedtuple('TreeNode', ['data', 'children']) def create_tree(node_children_mapping, start=0): subtree = [ TreeNode(child, create_tree(node_children_mapping, child["id"])) for child in node_childre...
Generalize print_tree to work with different number of columns.
Generalize print_tree to work with different number of columns.
Python
mit
EmilStenstrom/conllu
from __future__ import print_function, unicode_literals from collections import namedtuple TreeNode = namedtuple('TreeNode', ['data', 'children']) def create_tree(node_children_mapping, start=0): subtree = [ TreeNode(child, create_tree(node_children_mapping, child["id"])) for child in node_childre...
from __future__ import print_function, unicode_literals from collections import namedtuple TreeNode = namedtuple('TreeNode', ['data', 'children']) def create_tree(node_children_mapping, start=0): subtree = [ TreeNode(child, create_tree(node_children_mapping, child["id"])) for child in node_childre...
<commit_before>from __future__ import print_function, unicode_literals from collections import namedtuple TreeNode = namedtuple('TreeNode', ['data', 'children']) def create_tree(node_children_mapping, start=0): subtree = [ TreeNode(child, create_tree(node_children_mapping, child["id"])) for child ...
from __future__ import print_function, unicode_literals from collections import namedtuple TreeNode = namedtuple('TreeNode', ['data', 'children']) def create_tree(node_children_mapping, start=0): subtree = [ TreeNode(child, create_tree(node_children_mapping, child["id"])) for child in node_childre...
from __future__ import print_function, unicode_literals from collections import namedtuple TreeNode = namedtuple('TreeNode', ['data', 'children']) def create_tree(node_children_mapping, start=0): subtree = [ TreeNode(child, create_tree(node_children_mapping, child["id"])) for child in node_childre...
<commit_before>from __future__ import print_function, unicode_literals from collections import namedtuple TreeNode = namedtuple('TreeNode', ['data', 'children']) def create_tree(node_children_mapping, start=0): subtree = [ TreeNode(child, create_tree(node_children_mapping, child["id"])) for child ...
c7deb065bc51661501289b1f695aa0c21260266d
python/saliweb/backend/process_jobs.py
python/saliweb/backend/process_jobs.py
def main(webservice): web = webservice.get_web_service(webservice.config) web.do_all_processing()
from optparse import OptionParser import saliweb.backend import sys def get_options(): parser = OptionParser() parser.set_usage(""" %prog [-h] [-v] Do any necessary processing of incoming, completed, or old jobs. """) parser.add_option('-v', '--verbose', action="store_true", dest="verbose", ...
Add a verbose option; by default, swallow any statefile exception.
Add a verbose option; by default, swallow any statefile exception.
Python
lgpl-2.1
salilab/saliweb,salilab/saliweb,salilab/saliweb,salilab/saliweb,salilab/saliweb
def main(webservice): web = webservice.get_web_service(webservice.config) web.do_all_processing() Add a verbose option; by default, swallow any statefile exception.
from optparse import OptionParser import saliweb.backend import sys def get_options(): parser = OptionParser() parser.set_usage(""" %prog [-h] [-v] Do any necessary processing of incoming, completed, or old jobs. """) parser.add_option('-v', '--verbose', action="store_true", dest="verbose", ...
<commit_before>def main(webservice): web = webservice.get_web_service(webservice.config) web.do_all_processing() <commit_msg>Add a verbose option; by default, swallow any statefile exception.<commit_after>
from optparse import OptionParser import saliweb.backend import sys def get_options(): parser = OptionParser() parser.set_usage(""" %prog [-h] [-v] Do any necessary processing of incoming, completed, or old jobs. """) parser.add_option('-v', '--verbose', action="store_true", dest="verbose", ...
def main(webservice): web = webservice.get_web_service(webservice.config) web.do_all_processing() Add a verbose option; by default, swallow any statefile exception.from optparse import OptionParser import saliweb.backend import sys def get_options(): parser = OptionParser() parser.set_usage(""" %prog [...
<commit_before>def main(webservice): web = webservice.get_web_service(webservice.config) web.do_all_processing() <commit_msg>Add a verbose option; by default, swallow any statefile exception.<commit_after>from optparse import OptionParser import saliweb.backend import sys def get_options(): parser = Option...
5c296cdb60f448c6dc15720d5ec7a5310a09f1ae
troposphere/eventschemas.py
troposphere/eventschemas.py
# Copyright (c) 2012-2019, Mark Peek <[email protected]> # All rights reserved. # # See LICENSE file for full license. # # *** Do not modify - this file is autogenerated *** # Resource specification version: 10.0.0 from . import AWSObject from troposphere import Tags class Discoverer(AWSObject): resource_type = "AW...
# Copyright (c) 2012-2019, Mark Peek <[email protected]> # All rights reserved. # # See LICENSE file for full license. # # *** Do not modify - this file is autogenerated *** # Resource specification version: 14.1.0 from . import AWSObject from troposphere import Tags class Discoverer(AWSObject): resource_type = "AW...
Update EventSchemas per 2020-04-30 changes
Update EventSchemas per 2020-04-30 changes
Python
bsd-2-clause
cloudtools/troposphere,cloudtools/troposphere
# Copyright (c) 2012-2019, Mark Peek <[email protected]> # All rights reserved. # # See LICENSE file for full license. # # *** Do not modify - this file is autogenerated *** # Resource specification version: 10.0.0 from . import AWSObject from troposphere import Tags class Discoverer(AWSObject): resource_type = "AW...
# Copyright (c) 2012-2019, Mark Peek <[email protected]> # All rights reserved. # # See LICENSE file for full license. # # *** Do not modify - this file is autogenerated *** # Resource specification version: 14.1.0 from . import AWSObject from troposphere import Tags class Discoverer(AWSObject): resource_type = "AW...
<commit_before># Copyright (c) 2012-2019, Mark Peek <[email protected]> # All rights reserved. # # See LICENSE file for full license. # # *** Do not modify - this file is autogenerated *** # Resource specification version: 10.0.0 from . import AWSObject from troposphere import Tags class Discoverer(AWSObject): reso...
# Copyright (c) 2012-2019, Mark Peek <[email protected]> # All rights reserved. # # See LICENSE file for full license. # # *** Do not modify - this file is autogenerated *** # Resource specification version: 14.1.0 from . import AWSObject from troposphere import Tags class Discoverer(AWSObject): resource_type = "AW...
# Copyright (c) 2012-2019, Mark Peek <[email protected]> # All rights reserved. # # See LICENSE file for full license. # # *** Do not modify - this file is autogenerated *** # Resource specification version: 10.0.0 from . import AWSObject from troposphere import Tags class Discoverer(AWSObject): resource_type = "AW...
<commit_before># Copyright (c) 2012-2019, Mark Peek <[email protected]> # All rights reserved. # # See LICENSE file for full license. # # *** Do not modify - this file is autogenerated *** # Resource specification version: 10.0.0 from . import AWSObject from troposphere import Tags class Discoverer(AWSObject): reso...
c30534ae95dd5d8ffbe449a842538fafd808c773
python/tests/test_none.py
python/tests/test_none.py
import types def test_none_singleton(py2): if py2: assert isinstance(None, types.NoneType) else: # https://stackoverflow.com/questions/21706609 assert type(None)() is None class Negator(object): def __eq__(self, other): return not other # doesn't make sense def test_none_...
import types def test_singleton(py2): if py2: assert isinstance(None, types.NoneType) else: # https://stackoverflow.com/questions/21706609 assert type(None)() is None class Negator(object): def __eq__(self, other): return not other # doesn't make sense def __ne__(self...
Improve tests relevant to None comparison
[python] Improve tests relevant to None comparison
Python
mit
imsardine/learning,imsardine/learning,imsardine/learning,imsardine/learning,imsardine/learning,imsardine/learning,imsardine/learning
import types def test_none_singleton(py2): if py2: assert isinstance(None, types.NoneType) else: # https://stackoverflow.com/questions/21706609 assert type(None)() is None class Negator(object): def __eq__(self, other): return not other # doesn't make sense def test_none_...
import types def test_singleton(py2): if py2: assert isinstance(None, types.NoneType) else: # https://stackoverflow.com/questions/21706609 assert type(None)() is None class Negator(object): def __eq__(self, other): return not other # doesn't make sense def __ne__(self...
<commit_before>import types def test_none_singleton(py2): if py2: assert isinstance(None, types.NoneType) else: # https://stackoverflow.com/questions/21706609 assert type(None)() is None class Negator(object): def __eq__(self, other): return not other # doesn't make sense ...
import types def test_singleton(py2): if py2: assert isinstance(None, types.NoneType) else: # https://stackoverflow.com/questions/21706609 assert type(None)() is None class Negator(object): def __eq__(self, other): return not other # doesn't make sense def __ne__(self...
import types def test_none_singleton(py2): if py2: assert isinstance(None, types.NoneType) else: # https://stackoverflow.com/questions/21706609 assert type(None)() is None class Negator(object): def __eq__(self, other): return not other # doesn't make sense def test_none_...
<commit_before>import types def test_none_singleton(py2): if py2: assert isinstance(None, types.NoneType) else: # https://stackoverflow.com/questions/21706609 assert type(None)() is None class Negator(object): def __eq__(self, other): return not other # doesn't make sense ...
b6b627cb4c5d6b7dc1636794de870a2bf6da262b
cookiecutter/replay.py
cookiecutter/replay.py
# -*- coding: utf-8 -*- """ cookiecutter.replay ------------------- """ from __future__ import unicode_literals from .compat import is_string def dump(template_name, context): if not is_string(template_name): raise TypeError('Template name is required to be of type str')
# -*- coding: utf-8 -*- """ cookiecutter.replay ------------------- """ from __future__ import unicode_literals from .compat import is_string def dump(template_name, context): if not is_string(template_name): raise TypeError('Template name is required to be of type str') if not isinstance(context,...
Raise a TypeError if context is not a dict
Raise a TypeError if context is not a dict
Python
bsd-3-clause
pjbull/cookiecutter,hackebrot/cookiecutter,cguardia/cookiecutter,luzfcb/cookiecutter,stevepiercy/cookiecutter,agconti/cookiecutter,michaeljoseph/cookiecutter,venumech/cookiecutter,christabor/cookiecutter,michaeljoseph/cookiecutter,terryjbates/cookiecutter,takeflight/cookiecutter,dajose/cookiecutter,pjbull/cookiecutter,...
# -*- coding: utf-8 -*- """ cookiecutter.replay ------------------- """ from __future__ import unicode_literals from .compat import is_string def dump(template_name, context): if not is_string(template_name): raise TypeError('Template name is required to be of type str') Raise a TypeError if context is...
# -*- coding: utf-8 -*- """ cookiecutter.replay ------------------- """ from __future__ import unicode_literals from .compat import is_string def dump(template_name, context): if not is_string(template_name): raise TypeError('Template name is required to be of type str') if not isinstance(context,...
<commit_before># -*- coding: utf-8 -*- """ cookiecutter.replay ------------------- """ from __future__ import unicode_literals from .compat import is_string def dump(template_name, context): if not is_string(template_name): raise TypeError('Template name is required to be of type str') <commit_msg>Rais...
# -*- coding: utf-8 -*- """ cookiecutter.replay ------------------- """ from __future__ import unicode_literals from .compat import is_string def dump(template_name, context): if not is_string(template_name): raise TypeError('Template name is required to be of type str') if not isinstance(context,...
# -*- coding: utf-8 -*- """ cookiecutter.replay ------------------- """ from __future__ import unicode_literals from .compat import is_string def dump(template_name, context): if not is_string(template_name): raise TypeError('Template name is required to be of type str') Raise a TypeError if context is...
<commit_before># -*- coding: utf-8 -*- """ cookiecutter.replay ------------------- """ from __future__ import unicode_literals from .compat import is_string def dump(template_name, context): if not is_string(template_name): raise TypeError('Template name is required to be of type str') <commit_msg>Rais...
40afa196ec94bbe7a2600fc18e612cf5ff267dc0
scrapi/harvesters/shareok.py
scrapi/harvesters/shareok.py
""" Harvester for the SHAREOK Repository Repository for the SHARE project Example API call: https://shareok.org/oai/request?verb=ListRecords&metadataPrefix=oai_dc """ from __future__ import unicode_literals from scrapi.base import OAIHarvester class ShareOKHarvester(OAIHarvester): short_name = 'shareok' l...
""" Harvester for the SHAREOK Repository Repository for the SHARE project Example API call: https://shareok.org/oai/request?verb=ListRecords&metadataPrefix=oai_dc """ from __future__ import unicode_literals from scrapi.base import OAIHarvester class ShareOKHarvester(OAIHarvester): short_name = 'shareok' l...
Add approves sets to SHAREOK harvester
Add approves sets to SHAREOK harvester
Python
apache-2.0
erinspace/scrapi,fabianvf/scrapi,felliott/scrapi,fabianvf/scrapi,mehanig/scrapi,jeffreyliu3230/scrapi,felliott/scrapi,CenterForOpenScience/scrapi,erinspace/scrapi,ostwald/scrapi,mehanig/scrapi,icereval/scrapi,alexgarciac/scrapi,CenterForOpenScience/scrapi
""" Harvester for the SHAREOK Repository Repository for the SHARE project Example API call: https://shareok.org/oai/request?verb=ListRecords&metadataPrefix=oai_dc """ from __future__ import unicode_literals from scrapi.base import OAIHarvester class ShareOKHarvester(OAIHarvester): short_name = 'shareok' l...
""" Harvester for the SHAREOK Repository Repository for the SHARE project Example API call: https://shareok.org/oai/request?verb=ListRecords&metadataPrefix=oai_dc """ from __future__ import unicode_literals from scrapi.base import OAIHarvester class ShareOKHarvester(OAIHarvester): short_name = 'shareok' l...
<commit_before>""" Harvester for the SHAREOK Repository Repository for the SHARE project Example API call: https://shareok.org/oai/request?verb=ListRecords&metadataPrefix=oai_dc """ from __future__ import unicode_literals from scrapi.base import OAIHarvester class ShareOKHarvester(OAIHarvester): short_name = ...
""" Harvester for the SHAREOK Repository Repository for the SHARE project Example API call: https://shareok.org/oai/request?verb=ListRecords&metadataPrefix=oai_dc """ from __future__ import unicode_literals from scrapi.base import OAIHarvester class ShareOKHarvester(OAIHarvester): short_name = 'shareok' l...
""" Harvester for the SHAREOK Repository Repository for the SHARE project Example API call: https://shareok.org/oai/request?verb=ListRecords&metadataPrefix=oai_dc """ from __future__ import unicode_literals from scrapi.base import OAIHarvester class ShareOKHarvester(OAIHarvester): short_name = 'shareok' l...
<commit_before>""" Harvester for the SHAREOK Repository Repository for the SHARE project Example API call: https://shareok.org/oai/request?verb=ListRecords&metadataPrefix=oai_dc """ from __future__ import unicode_literals from scrapi.base import OAIHarvester class ShareOKHarvester(OAIHarvester): short_name = ...
0c17311f7fd511f5dae8f8e4acc2dce1a2de3cf5
main.py
main.py
import numpy as np import matplotlib.pyplot as plt # generate sample data x_data = np.linspace(-5, 5, 20) y_data = np.random.normal(0.0, 1.0, x_data.size) plt.plot(x_data, y_data, 'o') plt.show()
import math import numpy as np import matplotlib.pyplot as plt # generate sample data x_data = np.linspace(-math.pi, math.pi, 30) y_data = np.sin(x_data) + np.random.normal(0.0, 0.1, x_data.size) plt.plot(x_data, y_data, 'o') plt.show()
Change to sin() function with noise
Change to sin() function with noise
Python
mit
MorganR/basic-gaussian-process
import numpy as np import matplotlib.pyplot as plt # generate sample data x_data = np.linspace(-5, 5, 20) y_data = np.random.normal(0.0, 1.0, x_data.size) plt.plot(x_data, y_data, 'o') plt.show() Change to sin() function with noise
import math import numpy as np import matplotlib.pyplot as plt # generate sample data x_data = np.linspace(-math.pi, math.pi, 30) y_data = np.sin(x_data) + np.random.normal(0.0, 0.1, x_data.size) plt.plot(x_data, y_data, 'o') plt.show()
<commit_before>import numpy as np import matplotlib.pyplot as plt # generate sample data x_data = np.linspace(-5, 5, 20) y_data = np.random.normal(0.0, 1.0, x_data.size) plt.plot(x_data, y_data, 'o') plt.show() <commit_msg>Change to sin() function with noise<commit_after>
import math import numpy as np import matplotlib.pyplot as plt # generate sample data x_data = np.linspace(-math.pi, math.pi, 30) y_data = np.sin(x_data) + np.random.normal(0.0, 0.1, x_data.size) plt.plot(x_data, y_data, 'o') plt.show()
import numpy as np import matplotlib.pyplot as plt # generate sample data x_data = np.linspace(-5, 5, 20) y_data = np.random.normal(0.0, 1.0, x_data.size) plt.plot(x_data, y_data, 'o') plt.show() Change to sin() function with noiseimport math import numpy as np import matplotlib.pyplot as plt # generate sample data ...
<commit_before>import numpy as np import matplotlib.pyplot as plt # generate sample data x_data = np.linspace(-5, 5, 20) y_data = np.random.normal(0.0, 1.0, x_data.size) plt.plot(x_data, y_data, 'o') plt.show() <commit_msg>Change to sin() function with noise<commit_after>import math import numpy as np import matplotl...
03b0f1fafd813afd928ce1e665373837105369f3
app.py
app.py
from flask import Flask, request, jsonify, send_from_directory from werkzeug import secure_filename import os import uuid app = Flask(__name__) UPLOAD_FOLDER = "uploads/" @app.route("/") def index(): if not os.path.isdir(UPLOAD_FOLDER): os.mkdir(UPLOAD_FOLDER) projects = os.listdir(UPLOAD_FOLDER) r...
from flask import Flask, request, jsonify, send_from_directory import os import uuid app = Flask(__name__) UPLOAD_FOLDER = "uploads/" @app.route("/") def index(): if not os.path.isdir(UPLOAD_FOLDER): os.mkdir(UPLOAD_FOLDER) projects = os.listdir(UPLOAD_FOLDER) return projects.__repr__() + "\n" @a...
Return new file name when uploading
Return new file name when uploading
Python
mit
spb201/turbulent-octo-rutabaga-api,spb201/turbulent-octo-rutabaga-api,spb201/turbulent-octo-rutabaga-api
from flask import Flask, request, jsonify, send_from_directory from werkzeug import secure_filename import os import uuid app = Flask(__name__) UPLOAD_FOLDER = "uploads/" @app.route("/") def index(): if not os.path.isdir(UPLOAD_FOLDER): os.mkdir(UPLOAD_FOLDER) projects = os.listdir(UPLOAD_FOLDER) r...
from flask import Flask, request, jsonify, send_from_directory import os import uuid app = Flask(__name__) UPLOAD_FOLDER = "uploads/" @app.route("/") def index(): if not os.path.isdir(UPLOAD_FOLDER): os.mkdir(UPLOAD_FOLDER) projects = os.listdir(UPLOAD_FOLDER) return projects.__repr__() + "\n" @a...
<commit_before>from flask import Flask, request, jsonify, send_from_directory from werkzeug import secure_filename import os import uuid app = Flask(__name__) UPLOAD_FOLDER = "uploads/" @app.route("/") def index(): if not os.path.isdir(UPLOAD_FOLDER): os.mkdir(UPLOAD_FOLDER) projects = os.listdir(UPLOA...
from flask import Flask, request, jsonify, send_from_directory import os import uuid app = Flask(__name__) UPLOAD_FOLDER = "uploads/" @app.route("/") def index(): if not os.path.isdir(UPLOAD_FOLDER): os.mkdir(UPLOAD_FOLDER) projects = os.listdir(UPLOAD_FOLDER) return projects.__repr__() + "\n" @a...
from flask import Flask, request, jsonify, send_from_directory from werkzeug import secure_filename import os import uuid app = Flask(__name__) UPLOAD_FOLDER = "uploads/" @app.route("/") def index(): if not os.path.isdir(UPLOAD_FOLDER): os.mkdir(UPLOAD_FOLDER) projects = os.listdir(UPLOAD_FOLDER) r...
<commit_before>from flask import Flask, request, jsonify, send_from_directory from werkzeug import secure_filename import os import uuid app = Flask(__name__) UPLOAD_FOLDER = "uploads/" @app.route("/") def index(): if not os.path.isdir(UPLOAD_FOLDER): os.mkdir(UPLOAD_FOLDER) projects = os.listdir(UPLOA...
41477996e16e2d8b917bfc9f4428e64f1fa560dc
app.py
app.py
import json from flask import Flask, request, abort from flask.ext.restful import Resource, Api from mongoengine import connect from models import Tweet, Topic from models.routing import register_api_model, ModelResource from collecting.routes import CollectorListResource, CollectorResource from helpers import get_requ...
from flask import Flask from flask.ext.restful import Api from mongoengine import connect from models import Tweet, Topic from models.routing import register_api_model from collecting.routes import CollectorListResource, CollectorResource import config app = Flask(__name__, static_url_path='') api = Api(app, prefix='/...
Remove unused imports (and try out tmux)
Remove unused imports (and try out tmux)
Python
apache-2.0
jmcomets/twitto-feels,jmcomets/twitto-feels
import json from flask import Flask, request, abort from flask.ext.restful import Resource, Api from mongoengine import connect from models import Tweet, Topic from models.routing import register_api_model, ModelResource from collecting.routes import CollectorListResource, CollectorResource from helpers import get_requ...
from flask import Flask from flask.ext.restful import Api from mongoengine import connect from models import Tweet, Topic from models.routing import register_api_model from collecting.routes import CollectorListResource, CollectorResource import config app = Flask(__name__, static_url_path='') api = Api(app, prefix='/...
<commit_before>import json from flask import Flask, request, abort from flask.ext.restful import Resource, Api from mongoengine import connect from models import Tweet, Topic from models.routing import register_api_model, ModelResource from collecting.routes import CollectorListResource, CollectorResource from helpers ...
from flask import Flask from flask.ext.restful import Api from mongoengine import connect from models import Tweet, Topic from models.routing import register_api_model from collecting.routes import CollectorListResource, CollectorResource import config app = Flask(__name__, static_url_path='') api = Api(app, prefix='/...
import json from flask import Flask, request, abort from flask.ext.restful import Resource, Api from mongoengine import connect from models import Tweet, Topic from models.routing import register_api_model, ModelResource from collecting.routes import CollectorListResource, CollectorResource from helpers import get_requ...
<commit_before>import json from flask import Flask, request, abort from flask.ext.restful import Resource, Api from mongoengine import connect from models import Tweet, Topic from models.routing import register_api_model, ModelResource from collecting.routes import CollectorListResource, CollectorResource from helpers ...
65074720eee3f86f819046607e986d293c7d400f
api/commands.py
api/commands.py
import json import requests from Suchary.local_settings import GCM_API_KEY from api.models import Device URL = 'https://android.googleapis.com/gcm/send' HEADER = {'Authorization': 'key=' + GCM_API_KEY, 'Content-Type': 'application/json'} def get_reg_ids(): reg_ids = [device.registration_id for device in Device.o...
import json import requests from Suchary.local_settings import GCM_API_KEY from api.models import Device URL = 'https://android.googleapis.com/gcm/send' HEADER = {'Authorization': 'key=' + GCM_API_KEY, 'Content-Type': 'application/json'} def get_reg_ids(alias): devices = Device.objects.filter(active=True) ...
Send message only to one device if its alias was specified.
Send message only to one device if its alias was specified.
Python
mit
jchmura/suchary-django,jchmura/suchary-django,jchmura/suchary-django
import json import requests from Suchary.local_settings import GCM_API_KEY from api.models import Device URL = 'https://android.googleapis.com/gcm/send' HEADER = {'Authorization': 'key=' + GCM_API_KEY, 'Content-Type': 'application/json'} def get_reg_ids(): reg_ids = [device.registration_id for device in Device.o...
import json import requests from Suchary.local_settings import GCM_API_KEY from api.models import Device URL = 'https://android.googleapis.com/gcm/send' HEADER = {'Authorization': 'key=' + GCM_API_KEY, 'Content-Type': 'application/json'} def get_reg_ids(alias): devices = Device.objects.filter(active=True) ...
<commit_before>import json import requests from Suchary.local_settings import GCM_API_KEY from api.models import Device URL = 'https://android.googleapis.com/gcm/send' HEADER = {'Authorization': 'key=' + GCM_API_KEY, 'Content-Type': 'application/json'} def get_reg_ids(): reg_ids = [device.registration_id for dev...
import json import requests from Suchary.local_settings import GCM_API_KEY from api.models import Device URL = 'https://android.googleapis.com/gcm/send' HEADER = {'Authorization': 'key=' + GCM_API_KEY, 'Content-Type': 'application/json'} def get_reg_ids(alias): devices = Device.objects.filter(active=True) ...
import json import requests from Suchary.local_settings import GCM_API_KEY from api.models import Device URL = 'https://android.googleapis.com/gcm/send' HEADER = {'Authorization': 'key=' + GCM_API_KEY, 'Content-Type': 'application/json'} def get_reg_ids(): reg_ids = [device.registration_id for device in Device.o...
<commit_before>import json import requests from Suchary.local_settings import GCM_API_KEY from api.models import Device URL = 'https://android.googleapis.com/gcm/send' HEADER = {'Authorization': 'key=' + GCM_API_KEY, 'Content-Type': 'application/json'} def get_reg_ids(): reg_ids = [device.registration_id for dev...
08adcf2402f46dfc3332146cac1705e149b18e32
tree/108.py
tree/108.py
# Definition for a binary tree node. # class TreeNode: # def __init__(self, x): # self.val = x # self.left = None # self.right = None #recursive solution class Solution: def sortedArrayToBST(self, nums: List[int]) -> TreeNode: if not nums: return None ...
# Definition for a binary tree node. # class TreeNode: # def __init__(self, x): # self.val = x # self.left = None # self.right = None #recursive solution class Solution: def sortedArrayToBST(self, nums: List[int]) -> TreeNode: if not nums: return None ...
Convert Sorted Array to Binary Search Tree
Convert Sorted Array to Binary Search Tree
Python
apache-2.0
MingfeiPan/leetcode,MingfeiPan/leetcode,MingfeiPan/leetcode,MingfeiPan/leetcode,MingfeiPan/leetcode
# Definition for a binary tree node. # class TreeNode: # def __init__(self, x): # self.val = x # self.left = None # self.right = None #recursive solution class Solution: def sortedArrayToBST(self, nums: List[int]) -> TreeNode: if not nums: return None ...
# Definition for a binary tree node. # class TreeNode: # def __init__(self, x): # self.val = x # self.left = None # self.right = None #recursive solution class Solution: def sortedArrayToBST(self, nums: List[int]) -> TreeNode: if not nums: return None ...
<commit_before># Definition for a binary tree node. # class TreeNode: # def __init__(self, x): # self.val = x # self.left = None # self.right = None #recursive solution class Solution: def sortedArrayToBST(self, nums: List[int]) -> TreeNode: if not nums: re...
# Definition for a binary tree node. # class TreeNode: # def __init__(self, x): # self.val = x # self.left = None # self.right = None #recursive solution class Solution: def sortedArrayToBST(self, nums: List[int]) -> TreeNode: if not nums: return None ...
# Definition for a binary tree node. # class TreeNode: # def __init__(self, x): # self.val = x # self.left = None # self.right = None #recursive solution class Solution: def sortedArrayToBST(self, nums: List[int]) -> TreeNode: if not nums: return None ...
<commit_before># Definition for a binary tree node. # class TreeNode: # def __init__(self, x): # self.val = x # self.left = None # self.right = None #recursive solution class Solution: def sortedArrayToBST(self, nums: List[int]) -> TreeNode: if not nums: re...
39bc88808d9286f7d6a74120b8d8bade9888e41c
example_app/app.py
example_app/app.py
"""This is an example app, demonstrating usage.""" import os from flask import Flask from flask_jsondash.charts_builder import charts app = Flask(__name__) app.config['SECRET_KEY'] = 'NOTSECURELOL' app.config.update( JSONDASH_FILTERUSERS=False, JSONDASH_GLOBALDASH=False, JSONDASH_GLOBAL_USER='global', )...
"""This is an example app, demonstrating usage.""" import os from flask import Flask from flask_jsondash.charts_builder import charts app = Flask(__name__) app.config['SECRET_KEY'] = 'NOTSECURELOL' app.config.update( JSONDASH_FILTERUSERS=False, JSONDASH_GLOBALDASH=True, JSONDASH_GLOBAL_USER='global', ) ...
Enable global by default in example.
Enable global by default in example.
Python
mit
christabor/flask_jsondash,christabor/flask_jsondash,christabor/flask_jsondash
"""This is an example app, demonstrating usage.""" import os from flask import Flask from flask_jsondash.charts_builder import charts app = Flask(__name__) app.config['SECRET_KEY'] = 'NOTSECURELOL' app.config.update( JSONDASH_FILTERUSERS=False, JSONDASH_GLOBALDASH=False, JSONDASH_GLOBAL_USER='global', )...
"""This is an example app, demonstrating usage.""" import os from flask import Flask from flask_jsondash.charts_builder import charts app = Flask(__name__) app.config['SECRET_KEY'] = 'NOTSECURELOL' app.config.update( JSONDASH_FILTERUSERS=False, JSONDASH_GLOBALDASH=True, JSONDASH_GLOBAL_USER='global', ) ...
<commit_before>"""This is an example app, demonstrating usage.""" import os from flask import Flask from flask_jsondash.charts_builder import charts app = Flask(__name__) app.config['SECRET_KEY'] = 'NOTSECURELOL' app.config.update( JSONDASH_FILTERUSERS=False, JSONDASH_GLOBALDASH=False, JSONDASH_GLOBAL_U...
"""This is an example app, demonstrating usage.""" import os from flask import Flask from flask_jsondash.charts_builder import charts app = Flask(__name__) app.config['SECRET_KEY'] = 'NOTSECURELOL' app.config.update( JSONDASH_FILTERUSERS=False, JSONDASH_GLOBALDASH=True, JSONDASH_GLOBAL_USER='global', ) ...
"""This is an example app, demonstrating usage.""" import os from flask import Flask from flask_jsondash.charts_builder import charts app = Flask(__name__) app.config['SECRET_KEY'] = 'NOTSECURELOL' app.config.update( JSONDASH_FILTERUSERS=False, JSONDASH_GLOBALDASH=False, JSONDASH_GLOBAL_USER='global', )...
<commit_before>"""This is an example app, demonstrating usage.""" import os from flask import Flask from flask_jsondash.charts_builder import charts app = Flask(__name__) app.config['SECRET_KEY'] = 'NOTSECURELOL' app.config.update( JSONDASH_FILTERUSERS=False, JSONDASH_GLOBALDASH=False, JSONDASH_GLOBAL_U...
221d672368f8989508aaf5b36f6a4f9f5bd5425a
winthrop/books/migrations/0008_add-digital-edition.py
winthrop/books/migrations/0008_add-digital-edition.py
# -*- coding: utf-8 -*- # Generated by Django 1.10.5 on 2017-02-17 18:01 from __future__ import unicode_literals from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('djiffy', '0002_add-digital-edition'), ('books', '00...
# -*- coding: utf-8 -*- # Generated by Django 1.10.5 on 2017-02-17 18:19 from __future__ import unicode_literals from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('djiffy', '0001_initial'), ('books', '0007_title-len...
Fix migration so it works with actual existing djiffy migrations
Fix migration so it works with actual existing djiffy migrations
Python
apache-2.0
Princeton-CDH/winthrop-django,Princeton-CDH/winthrop-django,Princeton-CDH/winthrop-django
# -*- coding: utf-8 -*- # Generated by Django 1.10.5 on 2017-02-17 18:01 from __future__ import unicode_literals from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('djiffy', '0002_add-digital-edition'), ('books', '00...
# -*- coding: utf-8 -*- # Generated by Django 1.10.5 on 2017-02-17 18:19 from __future__ import unicode_literals from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('djiffy', '0001_initial'), ('books', '0007_title-len...
<commit_before># -*- coding: utf-8 -*- # Generated by Django 1.10.5 on 2017-02-17 18:01 from __future__ import unicode_literals from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('djiffy', '0002_add-digital-edition'), ...
# -*- coding: utf-8 -*- # Generated by Django 1.10.5 on 2017-02-17 18:19 from __future__ import unicode_literals from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('djiffy', '0001_initial'), ('books', '0007_title-len...
# -*- coding: utf-8 -*- # Generated by Django 1.10.5 on 2017-02-17 18:01 from __future__ import unicode_literals from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('djiffy', '0002_add-digital-edition'), ('books', '00...
<commit_before># -*- coding: utf-8 -*- # Generated by Django 1.10.5 on 2017-02-17 18:01 from __future__ import unicode_literals from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('djiffy', '0002_add-digital-edition'), ...
0f77c9a48e84a3185794f97c5f15c7b13ae1d505
tests/test_vector2_angle.py
tests/test_vector2_angle.py
from ppb_vector import Vector2 from math import isclose import pytest @pytest.mark.parametrize("left, right, expected", [ (Vector2(1, 1), Vector2(0, -1), 135), (Vector2(1, 1), Vector2(-1, 0), 135), (Vector2(0, 1), Vector2(0, -1), 180), (Vector2(-1, -1), Vector2(1, 0), 135), (Vector2(-1, -1), Vector...
from ppb_vector import Vector2 from math import isclose import pytest @pytest.mark.parametrize("left, right, expected", [ (Vector2(1, 1), Vector2(0, -1), 135), (Vector2(1, 1), Vector2(-1, 0), 135), (Vector2(0, 1), Vector2(0, -1), 180), (Vector2(-1, -1), Vector2(1, 0), 135), (Vector2(-1, -1), Vector...
Add some additional test cases
Add some additional test cases
Python
artistic-2.0
ppb/ppb-vector,ppb/ppb-vector
from ppb_vector import Vector2 from math import isclose import pytest @pytest.mark.parametrize("left, right, expected", [ (Vector2(1, 1), Vector2(0, -1), 135), (Vector2(1, 1), Vector2(-1, 0), 135), (Vector2(0, 1), Vector2(0, -1), 180), (Vector2(-1, -1), Vector2(1, 0), 135), (Vector2(-1, -1), Vector...
from ppb_vector import Vector2 from math import isclose import pytest @pytest.mark.parametrize("left, right, expected", [ (Vector2(1, 1), Vector2(0, -1), 135), (Vector2(1, 1), Vector2(-1, 0), 135), (Vector2(0, 1), Vector2(0, -1), 180), (Vector2(-1, -1), Vector2(1, 0), 135), (Vector2(-1, -1), Vector...
<commit_before>from ppb_vector import Vector2 from math import isclose import pytest @pytest.mark.parametrize("left, right, expected", [ (Vector2(1, 1), Vector2(0, -1), 135), (Vector2(1, 1), Vector2(-1, 0), 135), (Vector2(0, 1), Vector2(0, -1), 180), (Vector2(-1, -1), Vector2(1, 0), 135), (Vector2(...
from ppb_vector import Vector2 from math import isclose import pytest @pytest.mark.parametrize("left, right, expected", [ (Vector2(1, 1), Vector2(0, -1), 135), (Vector2(1, 1), Vector2(-1, 0), 135), (Vector2(0, 1), Vector2(0, -1), 180), (Vector2(-1, -1), Vector2(1, 0), 135), (Vector2(-1, -1), Vector...
from ppb_vector import Vector2 from math import isclose import pytest @pytest.mark.parametrize("left, right, expected", [ (Vector2(1, 1), Vector2(0, -1), 135), (Vector2(1, 1), Vector2(-1, 0), 135), (Vector2(0, 1), Vector2(0, -1), 180), (Vector2(-1, -1), Vector2(1, 0), 135), (Vector2(-1, -1), Vector...
<commit_before>from ppb_vector import Vector2 from math import isclose import pytest @pytest.mark.parametrize("left, right, expected", [ (Vector2(1, 1), Vector2(0, -1), 135), (Vector2(1, 1), Vector2(-1, 0), 135), (Vector2(0, 1), Vector2(0, -1), 180), (Vector2(-1, -1), Vector2(1, 0), 135), (Vector2(...
44990f83fc9f68486dc54999fc038c564e516f95
tests/test_vector2_angle.py
tests/test_vector2_angle.py
from ppb_vector import Vector2 from math import isclose import pytest @pytest.mark.parametrize("left, right, expected", [ (Vector2(1, 1), Vector2(0, -1), 135), (Vector2(1, 1), Vector2(-1, 0), 135), (Vector2(0, 1), Vector2(0, -1), 180), (Vector2(-1, -1), Vector2(1, 0), 135), (Vector2(-1, -1), Vector...
from ppb_vector import Vector2 from math import isclose import pytest @pytest.mark.parametrize("left, right, expected", [ (Vector2(1, 1), Vector2(0, -1), -135), (Vector2(1, 1), Vector2(-1, 0), 135), (Vector2(0, 1), Vector2(0, -1), 180), (Vector2(-1, -1), Vector2(1, 0), 135), (Vector2(-1, -1), Vecto...
Fix a clearly wrong sign
Fix a clearly wrong sign
Python
artistic-2.0
ppb/ppb-vector,ppb/ppb-vector
from ppb_vector import Vector2 from math import isclose import pytest @pytest.mark.parametrize("left, right, expected", [ (Vector2(1, 1), Vector2(0, -1), 135), (Vector2(1, 1), Vector2(-1, 0), 135), (Vector2(0, 1), Vector2(0, -1), 180), (Vector2(-1, -1), Vector2(1, 0), 135), (Vector2(-1, -1), Vector...
from ppb_vector import Vector2 from math import isclose import pytest @pytest.mark.parametrize("left, right, expected", [ (Vector2(1, 1), Vector2(0, -1), -135), (Vector2(1, 1), Vector2(-1, 0), 135), (Vector2(0, 1), Vector2(0, -1), 180), (Vector2(-1, -1), Vector2(1, 0), 135), (Vector2(-1, -1), Vecto...
<commit_before>from ppb_vector import Vector2 from math import isclose import pytest @pytest.mark.parametrize("left, right, expected", [ (Vector2(1, 1), Vector2(0, -1), 135), (Vector2(1, 1), Vector2(-1, 0), 135), (Vector2(0, 1), Vector2(0, -1), 180), (Vector2(-1, -1), Vector2(1, 0), 135), (Vector2(...
from ppb_vector import Vector2 from math import isclose import pytest @pytest.mark.parametrize("left, right, expected", [ (Vector2(1, 1), Vector2(0, -1), -135), (Vector2(1, 1), Vector2(-1, 0), 135), (Vector2(0, 1), Vector2(0, -1), 180), (Vector2(-1, -1), Vector2(1, 0), 135), (Vector2(-1, -1), Vecto...
from ppb_vector import Vector2 from math import isclose import pytest @pytest.mark.parametrize("left, right, expected", [ (Vector2(1, 1), Vector2(0, -1), 135), (Vector2(1, 1), Vector2(-1, 0), 135), (Vector2(0, 1), Vector2(0, -1), 180), (Vector2(-1, -1), Vector2(1, 0), 135), (Vector2(-1, -1), Vector...
<commit_before>from ppb_vector import Vector2 from math import isclose import pytest @pytest.mark.parametrize("left, right, expected", [ (Vector2(1, 1), Vector2(0, -1), 135), (Vector2(1, 1), Vector2(-1, 0), 135), (Vector2(0, 1), Vector2(0, -1), 180), (Vector2(-1, -1), Vector2(1, 0), 135), (Vector2(...
11022b79ded961bdd2e9a6bff0c4f4a03097084c
scripts/install_new_database.py
scripts/install_new_database.py
#!/usr/bin/env python3 import os import sys _upper_dir = os.path.abspath( os.path.join(os.path.dirname(__file__), '..')) if _upper_dir not in sys.path: sys.path.append(_upper_dir) import chdb if __name__ == '__main__': chdb.install_scratch_db()
#!/usr/bin/env python3 import os import sys _upper_dir = os.path.abspath( os.path.join(os.path.dirname(__file__), '..')) if _upper_dir not in sys.path: sys.path.append(_upper_dir) import chdb def sanity_check(): sdb = chdb.init_scratch_db() snippet_count = sdb.execute_with_retry_s( '''SELECT ...
Add a couple of sanity checks so we don't break the database.
Add a couple of sanity checks so we don't break the database. Part of #139.
Python
mit
guilherme-pg/citationhunt,eggpi/citationhunt,guilherme-pg/citationhunt,guilherme-pg/citationhunt,guilherme-pg/citationhunt,eggpi/citationhunt,eggpi/citationhunt,eggpi/citationhunt
#!/usr/bin/env python3 import os import sys _upper_dir = os.path.abspath( os.path.join(os.path.dirname(__file__), '..')) if _upper_dir not in sys.path: sys.path.append(_upper_dir) import chdb if __name__ == '__main__': chdb.install_scratch_db() Add a couple of sanity checks so we don't break the database...
#!/usr/bin/env python3 import os import sys _upper_dir = os.path.abspath( os.path.join(os.path.dirname(__file__), '..')) if _upper_dir not in sys.path: sys.path.append(_upper_dir) import chdb def sanity_check(): sdb = chdb.init_scratch_db() snippet_count = sdb.execute_with_retry_s( '''SELECT ...
<commit_before>#!/usr/bin/env python3 import os import sys _upper_dir = os.path.abspath( os.path.join(os.path.dirname(__file__), '..')) if _upper_dir not in sys.path: sys.path.append(_upper_dir) import chdb if __name__ == '__main__': chdb.install_scratch_db() <commit_msg>Add a couple of sanity checks so ...
#!/usr/bin/env python3 import os import sys _upper_dir = os.path.abspath( os.path.join(os.path.dirname(__file__), '..')) if _upper_dir not in sys.path: sys.path.append(_upper_dir) import chdb def sanity_check(): sdb = chdb.init_scratch_db() snippet_count = sdb.execute_with_retry_s( '''SELECT ...
#!/usr/bin/env python3 import os import sys _upper_dir = os.path.abspath( os.path.join(os.path.dirname(__file__), '..')) if _upper_dir not in sys.path: sys.path.append(_upper_dir) import chdb if __name__ == '__main__': chdb.install_scratch_db() Add a couple of sanity checks so we don't break the database...
<commit_before>#!/usr/bin/env python3 import os import sys _upper_dir = os.path.abspath( os.path.join(os.path.dirname(__file__), '..')) if _upper_dir not in sys.path: sys.path.append(_upper_dir) import chdb if __name__ == '__main__': chdb.install_scratch_db() <commit_msg>Add a couple of sanity checks so ...
4836cb93b03eae38c0e1eebeee831f9b4fc012eb
cozify/config.py
cozify/config.py
import configparser import os def ephemeralWrite(): with open(ephemeralFile, 'w') as configfile: ephemeral.write(configfile) # prime ephemeral storage ephemeralFile = "%s/.config/python-cozify.cfg" % os.path.expanduser('~') try: file = open(ephemeralFile, 'r') except IOError: file = open(ephemeral...
import configparser import os ephemeralFile = "%s/.config/python-cozify.cfg" % os.path.expanduser('~') ephemeral = None def ephemeralWrite(): with open(ephemeralFile, 'w') as configfile: ephemeral.write(configfile) # allow setting the ephemeral storage location. # Useful especially for testing without a...
Support for changing ephemeral state storage mid-run. Mostly useful for debugging and testing without hosing your main state
Support for changing ephemeral state storage mid-run. Mostly useful for debugging and testing without hosing your main state
Python
mit
Artanicus/python-cozify,Artanicus/python-cozify
import configparser import os def ephemeralWrite(): with open(ephemeralFile, 'w') as configfile: ephemeral.write(configfile) # prime ephemeral storage ephemeralFile = "%s/.config/python-cozify.cfg" % os.path.expanduser('~') try: file = open(ephemeralFile, 'r') except IOError: file = open(ephemeral...
import configparser import os ephemeralFile = "%s/.config/python-cozify.cfg" % os.path.expanduser('~') ephemeral = None def ephemeralWrite(): with open(ephemeralFile, 'w') as configfile: ephemeral.write(configfile) # allow setting the ephemeral storage location. # Useful especially for testing without a...
<commit_before>import configparser import os def ephemeralWrite(): with open(ephemeralFile, 'w') as configfile: ephemeral.write(configfile) # prime ephemeral storage ephemeralFile = "%s/.config/python-cozify.cfg" % os.path.expanduser('~') try: file = open(ephemeralFile, 'r') except IOError: file =...
import configparser import os ephemeralFile = "%s/.config/python-cozify.cfg" % os.path.expanduser('~') ephemeral = None def ephemeralWrite(): with open(ephemeralFile, 'w') as configfile: ephemeral.write(configfile) # allow setting the ephemeral storage location. # Useful especially for testing without a...
import configparser import os def ephemeralWrite(): with open(ephemeralFile, 'w') as configfile: ephemeral.write(configfile) # prime ephemeral storage ephemeralFile = "%s/.config/python-cozify.cfg" % os.path.expanduser('~') try: file = open(ephemeralFile, 'r') except IOError: file = open(ephemeral...
<commit_before>import configparser import os def ephemeralWrite(): with open(ephemeralFile, 'w') as configfile: ephemeral.write(configfile) # prime ephemeral storage ephemeralFile = "%s/.config/python-cozify.cfg" % os.path.expanduser('~') try: file = open(ephemeralFile, 'r') except IOError: file =...
9cccd1de4c9b9a6ca101c36edf288f0f4efec842
mea.py
mea.py
# MEA stands for model execution agent. # Its task is to simulate models and interpret # the simulation output. import pysb from pysb.integrate import Solver class MEA: def __init__(self): pass if __name__ == '__main__': pass
# MEA stands for model execution agent. # Its task is to simulate models and interpret # the simulation output. import warnings import numpy import matplotlib.pyplot as plt import pysb from pysb.integrate import Solver class MEA: def __init__(self): pass def get_monomer(self, model, agent): '...
Add model simulation with target observation to MEA
Add model simulation with target observation to MEA
Python
bsd-2-clause
sorgerlab/bioagents,bgyori/bioagents
# MEA stands for model execution agent. # Its task is to simulate models and interpret # the simulation output. import pysb from pysb.integrate import Solver class MEA: def __init__(self): pass if __name__ == '__main__': pass Add model simulation with target observation to MEA
# MEA stands for model execution agent. # Its task is to simulate models and interpret # the simulation output. import warnings import numpy import matplotlib.pyplot as plt import pysb from pysb.integrate import Solver class MEA: def __init__(self): pass def get_monomer(self, model, agent): '...
<commit_before># MEA stands for model execution agent. # Its task is to simulate models and interpret # the simulation output. import pysb from pysb.integrate import Solver class MEA: def __init__(self): pass if __name__ == '__main__': pass <commit_msg>Add model simulation with target observation to ...
# MEA stands for model execution agent. # Its task is to simulate models and interpret # the simulation output. import warnings import numpy import matplotlib.pyplot as plt import pysb from pysb.integrate import Solver class MEA: def __init__(self): pass def get_monomer(self, model, agent): '...
# MEA stands for model execution agent. # Its task is to simulate models and interpret # the simulation output. import pysb from pysb.integrate import Solver class MEA: def __init__(self): pass if __name__ == '__main__': pass Add model simulation with target observation to MEA# MEA stands for model e...
<commit_before># MEA stands for model execution agent. # Its task is to simulate models and interpret # the simulation output. import pysb from pysb.integrate import Solver class MEA: def __init__(self): pass if __name__ == '__main__': pass <commit_msg>Add model simulation with target observation to ...
4a3da350105314310cb0a44f11b50c9c6c6617ee
integration-test/1387-business-and-spur-routes.py
integration-test/1387-business-and-spur-routes.py
from . import FixtureTest class BusinessAndSpurRoutes(FixtureTest): def test_first_capitol_dr_i70_business(self): self.load_fixtures([ 'https://www.openstreetmap.org/relation/1933234', ]) # check that First Capitol Dr, part of the above relation, is given # a network ...
from . import FixtureTest class BusinessAndSpurRoutes(FixtureTest): def _check_route_relation( self, rel_id, way_id, tile, shield_text, network): z, x, y = map(int, tile.split('/')) self.load_fixtures([ 'https://www.openstreetmap.org/relation/%d' % (rel_id,), ], c...
Add more test cases for spur / business route modifiers.
Add more test cases for spur / business route modifiers.
Python
mit
mapzen/vector-datasource,mapzen/vector-datasource,mapzen/vector-datasource
from . import FixtureTest class BusinessAndSpurRoutes(FixtureTest): def test_first_capitol_dr_i70_business(self): self.load_fixtures([ 'https://www.openstreetmap.org/relation/1933234', ]) # check that First Capitol Dr, part of the above relation, is given # a network ...
from . import FixtureTest class BusinessAndSpurRoutes(FixtureTest): def _check_route_relation( self, rel_id, way_id, tile, shield_text, network): z, x, y = map(int, tile.split('/')) self.load_fixtures([ 'https://www.openstreetmap.org/relation/%d' % (rel_id,), ], c...
<commit_before>from . import FixtureTest class BusinessAndSpurRoutes(FixtureTest): def test_first_capitol_dr_i70_business(self): self.load_fixtures([ 'https://www.openstreetmap.org/relation/1933234', ]) # check that First Capitol Dr, part of the above relation, is given ...
from . import FixtureTest class BusinessAndSpurRoutes(FixtureTest): def _check_route_relation( self, rel_id, way_id, tile, shield_text, network): z, x, y = map(int, tile.split('/')) self.load_fixtures([ 'https://www.openstreetmap.org/relation/%d' % (rel_id,), ], c...
from . import FixtureTest class BusinessAndSpurRoutes(FixtureTest): def test_first_capitol_dr_i70_business(self): self.load_fixtures([ 'https://www.openstreetmap.org/relation/1933234', ]) # check that First Capitol Dr, part of the above relation, is given # a network ...
<commit_before>from . import FixtureTest class BusinessAndSpurRoutes(FixtureTest): def test_first_capitol_dr_i70_business(self): self.load_fixtures([ 'https://www.openstreetmap.org/relation/1933234', ]) # check that First Capitol Dr, part of the above relation, is given ...
f7d83caae3264d86420ce654f3669175c284a82d
ocradmin/core/decorators.py
ocradmin/core/decorators.py
# Miscellaneos functions relating the projects app import os from datetime import datetime from django.http import HttpResponseRedirect from django.utils.http import urlquote from django.conf import settings def project_required(func): """ Decorator function for other actions that require a project to be ...
# Miscellaneos functions relating the projects app import os from datetime import datetime from django.http import HttpResponseRedirect from django.utils.http import urlquote from django.conf import settings def project_required(func): """ Decorator function for other actions that require a project to be ...
Add project as request attribute to save a little boilerplate
Add project as request attribute to save a little boilerplate
Python
apache-2.0
vitorio/ocropodium,vitorio/ocropodium,vitorio/ocropodium,vitorio/ocropodium
# Miscellaneos functions relating the projects app import os from datetime import datetime from django.http import HttpResponseRedirect from django.utils.http import urlquote from django.conf import settings def project_required(func): """ Decorator function for other actions that require a project to be ...
# Miscellaneos functions relating the projects app import os from datetime import datetime from django.http import HttpResponseRedirect from django.utils.http import urlquote from django.conf import settings def project_required(func): """ Decorator function for other actions that require a project to be ...
<commit_before># Miscellaneos functions relating the projects app import os from datetime import datetime from django.http import HttpResponseRedirect from django.utils.http import urlquote from django.conf import settings def project_required(func): """ Decorator function for other actions that require a...
# Miscellaneos functions relating the projects app import os from datetime import datetime from django.http import HttpResponseRedirect from django.utils.http import urlquote from django.conf import settings def project_required(func): """ Decorator function for other actions that require a project to be ...
# Miscellaneos functions relating the projects app import os from datetime import datetime from django.http import HttpResponseRedirect from django.utils.http import urlquote from django.conf import settings def project_required(func): """ Decorator function for other actions that require a project to be ...
<commit_before># Miscellaneos functions relating the projects app import os from datetime import datetime from django.http import HttpResponseRedirect from django.utils.http import urlquote from django.conf import settings def project_required(func): """ Decorator function for other actions that require a...
abfe1e291d0c9963cb91d0e95996c8fe72167107
src/Figures/FigureHelpers.py
src/Figures/FigureHelpers.py
""" Created on Jun 12, 2013 @author: agross """ import matplotlib.pyplot as plt def init_ax(ax, figsize=None): """ Helper to initialize an axis. If the axis is not specified (eg is None), this fill create a new figure. ax: matplotlib axis object, or None figsize: size of figure if we have ...
""" Created on Jun 12, 2013 @author: agross """ import matplotlib.pyplot as plt def init_ax(ax, figsize=None): """ Helper to initialize an axis. If the axis is not specified (eg is None), this fill create a new figure. ax: matplotlib axis object, or None figsize: size of figure if we have ...
Add non-default option to despline top of axis.
Add non-default option to despline top of axis.
Python
mit
theandygross/Figures
""" Created on Jun 12, 2013 @author: agross """ import matplotlib.pyplot as plt def init_ax(ax, figsize=None): """ Helper to initialize an axis. If the axis is not specified (eg is None), this fill create a new figure. ax: matplotlib axis object, or None figsize: size of figure if we have ...
""" Created on Jun 12, 2013 @author: agross """ import matplotlib.pyplot as plt def init_ax(ax, figsize=None): """ Helper to initialize an axis. If the axis is not specified (eg is None), this fill create a new figure. ax: matplotlib axis object, or None figsize: size of figure if we have ...
<commit_before>""" Created on Jun 12, 2013 @author: agross """ import matplotlib.pyplot as plt def init_ax(ax, figsize=None): """ Helper to initialize an axis. If the axis is not specified (eg is None), this fill create a new figure. ax: matplotlib axis object, or None figsize: size of fig...
""" Created on Jun 12, 2013 @author: agross """ import matplotlib.pyplot as plt def init_ax(ax, figsize=None): """ Helper to initialize an axis. If the axis is not specified (eg is None), this fill create a new figure. ax: matplotlib axis object, or None figsize: size of figure if we have ...
""" Created on Jun 12, 2013 @author: agross """ import matplotlib.pyplot as plt def init_ax(ax, figsize=None): """ Helper to initialize an axis. If the axis is not specified (eg is None), this fill create a new figure. ax: matplotlib axis object, or None figsize: size of figure if we have ...
<commit_before>""" Created on Jun 12, 2013 @author: agross """ import matplotlib.pyplot as plt def init_ax(ax, figsize=None): """ Helper to initialize an axis. If the axis is not specified (eg is None), this fill create a new figure. ax: matplotlib axis object, or None figsize: size of fig...
203642a879fb934b99e4d55025eede171390a4d4
mopidy_dleyna/__init__.py
mopidy_dleyna/__init__.py
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 pathlib import pkg_resources from mopidy import config, exceptions, ext __version__ = pkg_resources.get_distribution("Mopidy-dLeyna").version class Extension(ext.Extension): dist_name = "Mopidy-dLeyna" ext_name = "dleyna" version = __version__ def get_default_config(self): return c...
Use pkg_resources to read version
Use pkg_resources to read version
Python
apache-2.0
tkem/mopidy-dleyna
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 pathlib import pkg_resources from mopidy import config, exceptions, ext __version__ = pkg_resources.get_distribution("Mopidy-dLeyna").version class Extension(ext.Extension): dist_name = "Mopidy-dLeyna" ext_name = "dleyna" version = __version__ def get_default_config(self): return c...
<commit_before>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") ...
import pathlib import pkg_resources from mopidy import config, exceptions, ext __version__ = pkg_resources.get_distribution("Mopidy-dLeyna").version class Extension(ext.Extension): dist_name = "Mopidy-dLeyna" ext_name = "dleyna" version = __version__ def get_default_config(self): return c...
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 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") ...
49194edaff3766cc3853c6b561f5d20571492f74
asp/__init__.py
asp/__init__.py
# From http://stackoverflow.com/questions/458550/standard-way-to-embed-version-into-python-package # Author: James Antill (http://stackoverflow.com/users/10314/james-antill) __version__ = '0.1.2.1' __version_info__ = tuple([ int(num) for num in __version__.split('.')]) class SpecializationError(Exception): """ ...
# From http://stackoverflow.com/questions/458550/standard-way-to-embed-version-into-python-package # Author: James Antill (http://stackoverflow.com/users/10314/james-antill) __version__ = '0.1.2.2' __version_info__ = tuple([ int(num) for num in __version__.split('.')]) class SpecializationError(Exception): """ ...
Increment version number because of config file interface change.
Increment version number because of config file interface change.
Python
bsd-3-clause
pbirsinger/aspNew,pbirsinger/aspNew,shoaibkamil/asp,richardxia/asp-multilevel-debug,pbirsinger/aspNew,shoaibkamil/asp,richardxia/asp-multilevel-debug,shoaibkamil/asp,richardxia/asp-multilevel-debug
# From http://stackoverflow.com/questions/458550/standard-way-to-embed-version-into-python-package # Author: James Antill (http://stackoverflow.com/users/10314/james-antill) __version__ = '0.1.2.1' __version_info__ = tuple([ int(num) for num in __version__.split('.')]) class SpecializationError(Exception): """ ...
# From http://stackoverflow.com/questions/458550/standard-way-to-embed-version-into-python-package # Author: James Antill (http://stackoverflow.com/users/10314/james-antill) __version__ = '0.1.2.2' __version_info__ = tuple([ int(num) for num in __version__.split('.')]) class SpecializationError(Exception): """ ...
<commit_before># From http://stackoverflow.com/questions/458550/standard-way-to-embed-version-into-python-package # Author: James Antill (http://stackoverflow.com/users/10314/james-antill) __version__ = '0.1.2.1' __version_info__ = tuple([ int(num) for num in __version__.split('.')]) class SpecializationError(Excepti...
# From http://stackoverflow.com/questions/458550/standard-way-to-embed-version-into-python-package # Author: James Antill (http://stackoverflow.com/users/10314/james-antill) __version__ = '0.1.2.2' __version_info__ = tuple([ int(num) for num in __version__.split('.')]) class SpecializationError(Exception): """ ...
# From http://stackoverflow.com/questions/458550/standard-way-to-embed-version-into-python-package # Author: James Antill (http://stackoverflow.com/users/10314/james-antill) __version__ = '0.1.2.1' __version_info__ = tuple([ int(num) for num in __version__.split('.')]) class SpecializationError(Exception): """ ...
<commit_before># From http://stackoverflow.com/questions/458550/standard-way-to-embed-version-into-python-package # Author: James Antill (http://stackoverflow.com/users/10314/james-antill) __version__ = '0.1.2.1' __version_info__ = tuple([ int(num) for num in __version__.split('.')]) class SpecializationError(Excepti...
a044d33c1e29a1d283baa6bd24b1c63676b061df
install-qt.py
install-qt.py
''' Simple script to install PyQt or PySide based on PYTEST_QT_FORCE_PYQT and python version. Meant to be used in travis-ci. ''' import os import sys def run(cmd): print(cmd) r = os.system(cmd) if r != 0: sys.exit('command %s failed with status %s' % (cmd, r)) py3k = sys.version_info[0] == 3 if os...
''' Simple script to install PyQt or PySide based on PYTEST_QT_FORCE_PYQT and python version. Meant to be used in travis-ci. ''' import os import sys def run(cmd): print(cmd) r = os.system(cmd) if r != 0: sys.exit('command %s failed with status %s' % (cmd, r)) py3k = sys.version_info[0] == 3 if os...
Install debugging symbols on Travis
Install debugging symbols on Travis
Python
mit
pytest-dev/pytest-qt,The-Compiler/pytest-qt
''' Simple script to install PyQt or PySide based on PYTEST_QT_FORCE_PYQT and python version. Meant to be used in travis-ci. ''' import os import sys def run(cmd): print(cmd) r = os.system(cmd) if r != 0: sys.exit('command %s failed with status %s' % (cmd, r)) py3k = sys.version_info[0] == 3 if os...
''' Simple script to install PyQt or PySide based on PYTEST_QT_FORCE_PYQT and python version. Meant to be used in travis-ci. ''' import os import sys def run(cmd): print(cmd) r = os.system(cmd) if r != 0: sys.exit('command %s failed with status %s' % (cmd, r)) py3k = sys.version_info[0] == 3 if os...
<commit_before>''' Simple script to install PyQt or PySide based on PYTEST_QT_FORCE_PYQT and python version. Meant to be used in travis-ci. ''' import os import sys def run(cmd): print(cmd) r = os.system(cmd) if r != 0: sys.exit('command %s failed with status %s' % (cmd, r)) py3k = sys.version_inf...
''' Simple script to install PyQt or PySide based on PYTEST_QT_FORCE_PYQT and python version. Meant to be used in travis-ci. ''' import os import sys def run(cmd): print(cmd) r = os.system(cmd) if r != 0: sys.exit('command %s failed with status %s' % (cmd, r)) py3k = sys.version_info[0] == 3 if os...
''' Simple script to install PyQt or PySide based on PYTEST_QT_FORCE_PYQT and python version. Meant to be used in travis-ci. ''' import os import sys def run(cmd): print(cmd) r = os.system(cmd) if r != 0: sys.exit('command %s failed with status %s' % (cmd, r)) py3k = sys.version_info[0] == 3 if os...
<commit_before>''' Simple script to install PyQt or PySide based on PYTEST_QT_FORCE_PYQT and python version. Meant to be used in travis-ci. ''' import os import sys def run(cmd): print(cmd) r = os.system(cmd) if r != 0: sys.exit('command %s failed with status %s' % (cmd, r)) py3k = sys.version_inf...
b744498b2308748dacf9947b78386f10f2072061
beetle/utils.py
beetle/utils.py
import os def read_folder(folder, mode): for folder, __, files in os.walk(folder): for file_name in files: path = os.path.join(folder, file_name) with open(path, mode) as fo: yield path, fo.read() def remove_leading_folder(path): __, partial_path = path.split(...
import os def read_folder(folder, mode): if 'b' in mode: encoding = None else: encoding = 'utf-8' for folder, __, files in os.walk(folder): for file_name in files: path = os.path.join(folder, file_name) with open(path, mode, encoding=encoding) as fo: ...
Define encoding when reading files if they aren't opened in binary mode
Define encoding when reading files if they aren't opened in binary mode
Python
mit
cknv/beetle
import os def read_folder(folder, mode): for folder, __, files in os.walk(folder): for file_name in files: path = os.path.join(folder, file_name) with open(path, mode) as fo: yield path, fo.read() def remove_leading_folder(path): __, partial_path = path.split(...
import os def read_folder(folder, mode): if 'b' in mode: encoding = None else: encoding = 'utf-8' for folder, __, files in os.walk(folder): for file_name in files: path = os.path.join(folder, file_name) with open(path, mode, encoding=encoding) as fo: ...
<commit_before>import os def read_folder(folder, mode): for folder, __, files in os.walk(folder): for file_name in files: path = os.path.join(folder, file_name) with open(path, mode) as fo: yield path, fo.read() def remove_leading_folder(path): __, partial_pat...
import os def read_folder(folder, mode): if 'b' in mode: encoding = None else: encoding = 'utf-8' for folder, __, files in os.walk(folder): for file_name in files: path = os.path.join(folder, file_name) with open(path, mode, encoding=encoding) as fo: ...
import os def read_folder(folder, mode): for folder, __, files in os.walk(folder): for file_name in files: path = os.path.join(folder, file_name) with open(path, mode) as fo: yield path, fo.read() def remove_leading_folder(path): __, partial_path = path.split(...
<commit_before>import os def read_folder(folder, mode): for folder, __, files in os.walk(folder): for file_name in files: path = os.path.join(folder, file_name) with open(path, mode) as fo: yield path, fo.read() def remove_leading_folder(path): __, partial_pat...
65b1f849cbf02320992e3ef9db86c71e564cc826
src/mountebank/exceptions.py
src/mountebank/exceptions.py
class ImposterException(StandardError): def __init__(self, response): self._response = response
import sys if sys.version_info.major == 2: error_base_class = StandardError elif sys.version_info.major == 3: error_base_class = Exception else: raise RuntimeError('Unsupported Python version: {}'.format(sys.version)) class ImposterException(error_base_class): def __init__(self, response): s...
Make Python 2 and 3 compatible
Make Python 2 and 3 compatible
Python
bsd-2-clause
kevinjqiu/py-mountebank
class ImposterException(StandardError): def __init__(self, response): self._response = response Make Python 2 and 3 compatible
import sys if sys.version_info.major == 2: error_base_class = StandardError elif sys.version_info.major == 3: error_base_class = Exception else: raise RuntimeError('Unsupported Python version: {}'.format(sys.version)) class ImposterException(error_base_class): def __init__(self, response): s...
<commit_before>class ImposterException(StandardError): def __init__(self, response): self._response = response <commit_msg>Make Python 2 and 3 compatible<commit_after>
import sys if sys.version_info.major == 2: error_base_class = StandardError elif sys.version_info.major == 3: error_base_class = Exception else: raise RuntimeError('Unsupported Python version: {}'.format(sys.version)) class ImposterException(error_base_class): def __init__(self, response): s...
class ImposterException(StandardError): def __init__(self, response): self._response = response Make Python 2 and 3 compatibleimport sys if sys.version_info.major == 2: error_base_class = StandardError elif sys.version_info.major == 3: error_base_class = Exception else: raise RuntimeError('Uns...
<commit_before>class ImposterException(StandardError): def __init__(self, response): self._response = response <commit_msg>Make Python 2 and 3 compatible<commit_after>import sys if sys.version_info.major == 2: error_base_class = StandardError elif sys.version_info.major == 3: error_base_class = Ex...
e9d62c12448822246ad0ed79a90b36dd27429615
echidna/demo/server.py
echidna/demo/server.py
""" Echidna demo server. """ import os from cyclone.web import RequestHandler from echidna.server import EchidnaServer class DemoServer(EchidnaServer): """ A server to demo Echidna. """ def __init__(self, **settings): defaults = { "template_path": ( os.path.join...
""" Echidna demo server. """ import os from cyclone.web import RequestHandler from echidna.server import EchidnaServer class DemoServer(EchidnaServer): """ A server to demo Echidna. """ def __init__(self, **settings): defaults = { "template_path": ( os.path.join...
Add list of channels to demo.html template context.
Add list of channels to demo.html template context.
Python
bsd-3-clause
praekelt/echidna,praekelt/echidna,praekelt/echidna,praekelt/echidna
""" Echidna demo server. """ import os from cyclone.web import RequestHandler from echidna.server import EchidnaServer class DemoServer(EchidnaServer): """ A server to demo Echidna. """ def __init__(self, **settings): defaults = { "template_path": ( os.path.join...
""" Echidna demo server. """ import os from cyclone.web import RequestHandler from echidna.server import EchidnaServer class DemoServer(EchidnaServer): """ A server to demo Echidna. """ def __init__(self, **settings): defaults = { "template_path": ( os.path.join...
<commit_before>""" Echidna demo server. """ import os from cyclone.web import RequestHandler from echidna.server import EchidnaServer class DemoServer(EchidnaServer): """ A server to demo Echidna. """ def __init__(self, **settings): defaults = { "template_path": ( ...
""" Echidna demo server. """ import os from cyclone.web import RequestHandler from echidna.server import EchidnaServer class DemoServer(EchidnaServer): """ A server to demo Echidna. """ def __init__(self, **settings): defaults = { "template_path": ( os.path.join...
""" Echidna demo server. """ import os from cyclone.web import RequestHandler from echidna.server import EchidnaServer class DemoServer(EchidnaServer): """ A server to demo Echidna. """ def __init__(self, **settings): defaults = { "template_path": ( os.path.join...
<commit_before>""" Echidna demo server. """ import os from cyclone.web import RequestHandler from echidna.server import EchidnaServer class DemoServer(EchidnaServer): """ A server to demo Echidna. """ def __init__(self, **settings): defaults = { "template_path": ( ...
396df5eac473fccc16e103d3d3316aefd653789a
changeling/models.py
changeling/models.py
import uuid import jsonschema import changeling.exception class Change(object): schema = { 'name': 'change', 'properties': { 'id': {'type': 'string'}, 'name': {'type': 'string'}, 'description': {'type': 'string'}, }, 'additionalProperties': Fa...
import uuid import jsonschema import changeling.exception class Change(object): schema = { 'name': 'change', 'properties': { 'id': {'type': 'string'}, 'name': {'type': 'string'}, 'description': {'type': 'string'}, 'tags': {'type': 'array'}, ...
Add tags - that was too easy
Add tags - that was too easy
Python
apache-2.0
bcwaldon/changeling,bcwaldon/changeling
import uuid import jsonschema import changeling.exception class Change(object): schema = { 'name': 'change', 'properties': { 'id': {'type': 'string'}, 'name': {'type': 'string'}, 'description': {'type': 'string'}, }, 'additionalProperties': Fa...
import uuid import jsonschema import changeling.exception class Change(object): schema = { 'name': 'change', 'properties': { 'id': {'type': 'string'}, 'name': {'type': 'string'}, 'description': {'type': 'string'}, 'tags': {'type': 'array'}, ...
<commit_before>import uuid import jsonschema import changeling.exception class Change(object): schema = { 'name': 'change', 'properties': { 'id': {'type': 'string'}, 'name': {'type': 'string'}, 'description': {'type': 'string'}, }, 'additional...
import uuid import jsonschema import changeling.exception class Change(object): schema = { 'name': 'change', 'properties': { 'id': {'type': 'string'}, 'name': {'type': 'string'}, 'description': {'type': 'string'}, 'tags': {'type': 'array'}, ...
import uuid import jsonschema import changeling.exception class Change(object): schema = { 'name': 'change', 'properties': { 'id': {'type': 'string'}, 'name': {'type': 'string'}, 'description': {'type': 'string'}, }, 'additionalProperties': Fa...
<commit_before>import uuid import jsonschema import changeling.exception class Change(object): schema = { 'name': 'change', 'properties': { 'id': {'type': 'string'}, 'name': {'type': 'string'}, 'description': {'type': 'string'}, }, 'additional...
4a24e19c160535c7a65c7f3f11748e6048386038
examples/gst/wavenc.py
examples/gst/wavenc.py
#!/usr/bin/env python import sys import gst def decode(filename): output = filename + '.wav' pipeline = ('filesrc location="%s" ! spider ! audio/x-raw-int,rate=44100,stereo=2 ! wavenc ! ' 'filesink location="%s"') % (filename, output) bin = gst.parse_launch(pipeline) bin.set_state(...
#!/usr/bin/env python import sys import gst def decode(filename): output = filename + '.wav' pipeline = ('{ filesrc location="%s" ! spider ! audio/x-raw-int,rate=44100,stereo=2 ! wavenc ! ' 'filesink location="%s" }') % (filename, output) bin = gst.parse_launch(pipeline) bin.set_st...
Put it in a thread and run it in a mainloop
Put it in a thread and run it in a mainloop Original commit message from CVS: Put it in a thread and run it in a mainloop
Python
lgpl-2.1
lubosz/gst-python,freedesktop-unofficial-mirror/gstreamer__gst-python,lubosz/gst-python,alessandrod/gst-python,freedesktop-unofficial-mirror/gstreamer__gst-python,GStreamer/gst-python,pexip/gst-python,freedesktop-unofficial-mirror/gstreamer-sdk__gst-python,GStreamer/gst-python,pexip/gst-python,freedesktop-unofficial-mi...
#!/usr/bin/env python import sys import gst def decode(filename): output = filename + '.wav' pipeline = ('filesrc location="%s" ! spider ! audio/x-raw-int,rate=44100,stereo=2 ! wavenc ! ' 'filesink location="%s"') % (filename, output) bin = gst.parse_launch(pipeline) bin.set_state(...
#!/usr/bin/env python import sys import gst def decode(filename): output = filename + '.wav' pipeline = ('{ filesrc location="%s" ! spider ! audio/x-raw-int,rate=44100,stereo=2 ! wavenc ! ' 'filesink location="%s" }') % (filename, output) bin = gst.parse_launch(pipeline) bin.set_st...
<commit_before>#!/usr/bin/env python import sys import gst def decode(filename): output = filename + '.wav' pipeline = ('filesrc location="%s" ! spider ! audio/x-raw-int,rate=44100,stereo=2 ! wavenc ! ' 'filesink location="%s"') % (filename, output) bin = gst.parse_launch(pipeline) ...
#!/usr/bin/env python import sys import gst def decode(filename): output = filename + '.wav' pipeline = ('{ filesrc location="%s" ! spider ! audio/x-raw-int,rate=44100,stereo=2 ! wavenc ! ' 'filesink location="%s" }') % (filename, output) bin = gst.parse_launch(pipeline) bin.set_st...
#!/usr/bin/env python import sys import gst def decode(filename): output = filename + '.wav' pipeline = ('filesrc location="%s" ! spider ! audio/x-raw-int,rate=44100,stereo=2 ! wavenc ! ' 'filesink location="%s"') % (filename, output) bin = gst.parse_launch(pipeline) bin.set_state(...
<commit_before>#!/usr/bin/env python import sys import gst def decode(filename): output = filename + '.wav' pipeline = ('filesrc location="%s" ! spider ! audio/x-raw-int,rate=44100,stereo=2 ! wavenc ! ' 'filesink location="%s"') % (filename, output) bin = gst.parse_launch(pipeline) ...
fc523d543392b9ef7d5b8b6c8ec962b151552e42
tests/test_fields/test_uuid_field.py
tests/test_fields/test_uuid_field.py
from __future__ import unicode_literals import uuid from django.core.exceptions import ValidationError from django.test import TestCase from model_utils.fields import UUIDField class UUIDFieldTests(TestCase): def test_uuid_version_default(self): instance = UUIDField() self.assertEqual(instance...
from __future__ import unicode_literals import uuid from django.core.exceptions import ValidationError from django.test import TestCase from model_utils.fields import UUIDField class UUIDFieldTests(TestCase): def test_uuid_version_default(self): instance = UUIDField() self.assertEqual(instance...
Add tdd to increase coverage
Add tdd to increase coverage
Python
bsd-3-clause
carljm/django-model-utils,carljm/django-model-utils
from __future__ import unicode_literals import uuid from django.core.exceptions import ValidationError from django.test import TestCase from model_utils.fields import UUIDField class UUIDFieldTests(TestCase): def test_uuid_version_default(self): instance = UUIDField() self.assertEqual(instance...
from __future__ import unicode_literals import uuid from django.core.exceptions import ValidationError from django.test import TestCase from model_utils.fields import UUIDField class UUIDFieldTests(TestCase): def test_uuid_version_default(self): instance = UUIDField() self.assertEqual(instance...
<commit_before>from __future__ import unicode_literals import uuid from django.core.exceptions import ValidationError from django.test import TestCase from model_utils.fields import UUIDField class UUIDFieldTests(TestCase): def test_uuid_version_default(self): instance = UUIDField() self.asser...
from __future__ import unicode_literals import uuid from django.core.exceptions import ValidationError from django.test import TestCase from model_utils.fields import UUIDField class UUIDFieldTests(TestCase): def test_uuid_version_default(self): instance = UUIDField() self.assertEqual(instance...
from __future__ import unicode_literals import uuid from django.core.exceptions import ValidationError from django.test import TestCase from model_utils.fields import UUIDField class UUIDFieldTests(TestCase): def test_uuid_version_default(self): instance = UUIDField() self.assertEqual(instance...
<commit_before>from __future__ import unicode_literals import uuid from django.core.exceptions import ValidationError from django.test import TestCase from model_utils.fields import UUIDField class UUIDFieldTests(TestCase): def test_uuid_version_default(self): instance = UUIDField() self.asser...
61018e88f6ef7e24665fca8b336493ff254fa61b
examples/irrev_rxns.py
examples/irrev_rxns.py
"""Example of irreversible reaction.""" import os from chemkinlib.utils import Parser from chemkinlib.reactions import ReactionSystems from chemkinlib.config import DATA_DIRECTORY import numpy # USER INPUT: reaction (xml) file xml_filename = os.path.join(DATA_DIRECTORY, "rxnset_long.xml") parser = Parser.ReactionP...
"""Example of irreversible reaction.""" import os from chemkinlib.utils import Parser from chemkinlib.reactions import ReactionSystems from chemkinlib.config import DATA_DIRECTORY import numpy # USER INPUT: reaction (xml) file xml_filename = os.path.join(DATA_DIRECTORY, "rxnset_long.xml") parser = Parser.ReactionP...
Add documentation of the new functions
Add documentation of the new functions
Python
mit
cs207-group11/cs207-FinalProject,krmotwani/cs207-FinalProject,hsim13372/cs207-FinalProject
"""Example of irreversible reaction.""" import os from chemkinlib.utils import Parser from chemkinlib.reactions import ReactionSystems from chemkinlib.config import DATA_DIRECTORY import numpy # USER INPUT: reaction (xml) file xml_filename = os.path.join(DATA_DIRECTORY, "rxnset_long.xml") parser = Parser.ReactionP...
"""Example of irreversible reaction.""" import os from chemkinlib.utils import Parser from chemkinlib.reactions import ReactionSystems from chemkinlib.config import DATA_DIRECTORY import numpy # USER INPUT: reaction (xml) file xml_filename = os.path.join(DATA_DIRECTORY, "rxnset_long.xml") parser = Parser.ReactionP...
<commit_before> """Example of irreversible reaction.""" import os from chemkinlib.utils import Parser from chemkinlib.reactions import ReactionSystems from chemkinlib.config import DATA_DIRECTORY import numpy # USER INPUT: reaction (xml) file xml_filename = os.path.join(DATA_DIRECTORY, "rxnset_long.xml") parser = P...
"""Example of irreversible reaction.""" import os from chemkinlib.utils import Parser from chemkinlib.reactions import ReactionSystems from chemkinlib.config import DATA_DIRECTORY import numpy # USER INPUT: reaction (xml) file xml_filename = os.path.join(DATA_DIRECTORY, "rxnset_long.xml") parser = Parser.ReactionP...
"""Example of irreversible reaction.""" import os from chemkinlib.utils import Parser from chemkinlib.reactions import ReactionSystems from chemkinlib.config import DATA_DIRECTORY import numpy # USER INPUT: reaction (xml) file xml_filename = os.path.join(DATA_DIRECTORY, "rxnset_long.xml") parser = Parser.ReactionP...
<commit_before> """Example of irreversible reaction.""" import os from chemkinlib.utils import Parser from chemkinlib.reactions import ReactionSystems from chemkinlib.config import DATA_DIRECTORY import numpy # USER INPUT: reaction (xml) file xml_filename = os.path.join(DATA_DIRECTORY, "rxnset_long.xml") parser = P...
6d43879608a3f218120b88da911c8bacf8177d82
owebunit/tests/simple.py
owebunit/tests/simple.py
import BaseHTTPServer import threading import time import owebunit import bottle app = bottle.Bottle() @app.route('/ok') def ok(): return 'ok' @app.route('/internal_server_error') def internal_error(): bottle.abort(500, 'internal server error') def run_server(): app.run(host='localhost', port=8041) cla...
import BaseHTTPServer import threading import time import owebunit import bottle app = bottle.Bottle() @app.route('/ok') def ok(): return 'ok' @app.route('/internal_server_error') def internal_error(): bottle.abort(500, 'internal server error') def run_server(): app.run(host='localhost', port=8041) cla...
Test using multiple concurrent sessions
Test using multiple concurrent sessions
Python
bsd-2-clause
p/webracer
import BaseHTTPServer import threading import time import owebunit import bottle app = bottle.Bottle() @app.route('/ok') def ok(): return 'ok' @app.route('/internal_server_error') def internal_error(): bottle.abort(500, 'internal server error') def run_server(): app.run(host='localhost', port=8041) cla...
import BaseHTTPServer import threading import time import owebunit import bottle app = bottle.Bottle() @app.route('/ok') def ok(): return 'ok' @app.route('/internal_server_error') def internal_error(): bottle.abort(500, 'internal server error') def run_server(): app.run(host='localhost', port=8041) cla...
<commit_before>import BaseHTTPServer import threading import time import owebunit import bottle app = bottle.Bottle() @app.route('/ok') def ok(): return 'ok' @app.route('/internal_server_error') def internal_error(): bottle.abort(500, 'internal server error') def run_server(): app.run(host='localhost', ...
import BaseHTTPServer import threading import time import owebunit import bottle app = bottle.Bottle() @app.route('/ok') def ok(): return 'ok' @app.route('/internal_server_error') def internal_error(): bottle.abort(500, 'internal server error') def run_server(): app.run(host='localhost', port=8041) cla...
import BaseHTTPServer import threading import time import owebunit import bottle app = bottle.Bottle() @app.route('/ok') def ok(): return 'ok' @app.route('/internal_server_error') def internal_error(): bottle.abort(500, 'internal server error') def run_server(): app.run(host='localhost', port=8041) cla...
<commit_before>import BaseHTTPServer import threading import time import owebunit import bottle app = bottle.Bottle() @app.route('/ok') def ok(): return 'ok' @app.route('/internal_server_error') def internal_error(): bottle.abort(500, 'internal server error') def run_server(): app.run(host='localhost', ...
0e8504c8ad81076f190918b17d9c46710875fe8f
common/fields.py
common/fields.py
from django.db.models import AutoField class SequenceField(AutoField): """Overrides the parts of AutoField that force it to be a PK""" def __init__(self, *args, **kwargs): super(SequenceField, self).__init__(*args, **kwargs) def check(self, **kwargs): """Shut up '(fields.E100) AutoFields ...
from django.db.models import Field class SequenceField(Field): def __init__(self, *args, **kwargs): kwargs['blank'] = True super(SequenceField, self).__init__(*args, **kwargs) def deconstruct(self): name, path, args, kwargs = super(SequenceField, self).deconstruct() # lacks 'k...
Revert "Experiment with SequenceField that inherits from AutoField"
Revert "Experiment with SequenceField that inherits from AutoField" This reverts commit 726c1d31e353e6c1a079fd06c3008c0714f95b86.
Python
mit
MasterFacilityList/mfl_api,MasterFacilityList/mfl_api,urandu/mfl_api,urandu/mfl_api,urandu/mfl_api,MasterFacilityList/mfl_api,MasterFacilityList/mfl_api,urandu/mfl_api,MasterFacilityList/mfl_api
from django.db.models import AutoField class SequenceField(AutoField): """Overrides the parts of AutoField that force it to be a PK""" def __init__(self, *args, **kwargs): super(SequenceField, self).__init__(*args, **kwargs) def check(self, **kwargs): """Shut up '(fields.E100) AutoFields ...
from django.db.models import Field class SequenceField(Field): def __init__(self, *args, **kwargs): kwargs['blank'] = True super(SequenceField, self).__init__(*args, **kwargs) def deconstruct(self): name, path, args, kwargs = super(SequenceField, self).deconstruct() # lacks 'k...
<commit_before>from django.db.models import AutoField class SequenceField(AutoField): """Overrides the parts of AutoField that force it to be a PK""" def __init__(self, *args, **kwargs): super(SequenceField, self).__init__(*args, **kwargs) def check(self, **kwargs): """Shut up '(fields.E1...
from django.db.models import Field class SequenceField(Field): def __init__(self, *args, **kwargs): kwargs['blank'] = True super(SequenceField, self).__init__(*args, **kwargs) def deconstruct(self): name, path, args, kwargs = super(SequenceField, self).deconstruct() # lacks 'k...
from django.db.models import AutoField class SequenceField(AutoField): """Overrides the parts of AutoField that force it to be a PK""" def __init__(self, *args, **kwargs): super(SequenceField, self).__init__(*args, **kwargs) def check(self, **kwargs): """Shut up '(fields.E100) AutoFields ...
<commit_before>from django.db.models import AutoField class SequenceField(AutoField): """Overrides the parts of AutoField that force it to be a PK""" def __init__(self, *args, **kwargs): super(SequenceField, self).__init__(*args, **kwargs) def check(self, **kwargs): """Shut up '(fields.E1...
5b8482aa7851f11df81e8a457c85b53dbcbeeddf
f8a_jobs/graph_sync.py
f8a_jobs/graph_sync.py
"""Functions to retrieve pending list and invoke Graph Sync.""" import f8a_jobs.defaults as configuration import requests import traceback import logging logger = logging.getLogger(__name__) def _api_call(url, params={}): try: logger.info("API Call for url: %s, params: %s" % (url, params)) r = ...
"""Functions to retrieve pending list and invoke Graph Sync.""" import f8a_jobs.defaults as configuration import requests import traceback import logging from urllib.parse import urljoin logger = logging.getLogger(__name__) def _api_call(url, params=None): params = params or {} try: logger.info("AP...
Fix code for review comments
Fix code for review comments
Python
apache-2.0
fabric8-analytics/fabric8-analytics-jobs,fabric8-analytics/fabric8-analytics-jobs
"""Functions to retrieve pending list and invoke Graph Sync.""" import f8a_jobs.defaults as configuration import requests import traceback import logging logger = logging.getLogger(__name__) def _api_call(url, params={}): try: logger.info("API Call for url: %s, params: %s" % (url, params)) r = ...
"""Functions to retrieve pending list and invoke Graph Sync.""" import f8a_jobs.defaults as configuration import requests import traceback import logging from urllib.parse import urljoin logger = logging.getLogger(__name__) def _api_call(url, params=None): params = params or {} try: logger.info("AP...
<commit_before>"""Functions to retrieve pending list and invoke Graph Sync.""" import f8a_jobs.defaults as configuration import requests import traceback import logging logger = logging.getLogger(__name__) def _api_call(url, params={}): try: logger.info("API Call for url: %s, params: %s" % (url, params...
"""Functions to retrieve pending list and invoke Graph Sync.""" import f8a_jobs.defaults as configuration import requests import traceback import logging from urllib.parse import urljoin logger = logging.getLogger(__name__) def _api_call(url, params=None): params = params or {} try: logger.info("AP...
"""Functions to retrieve pending list and invoke Graph Sync.""" import f8a_jobs.defaults as configuration import requests import traceback import logging logger = logging.getLogger(__name__) def _api_call(url, params={}): try: logger.info("API Call for url: %s, params: %s" % (url, params)) r = ...
<commit_before>"""Functions to retrieve pending list and invoke Graph Sync.""" import f8a_jobs.defaults as configuration import requests import traceback import logging logger = logging.getLogger(__name__) def _api_call(url, params={}): try: logger.info("API Call for url: %s, params: %s" % (url, params...
079e7cbbd59266e1dc8b161989c90202caa4c5a8
flaskbb/utils/views.py
flaskbb/utils/views.py
from flask import render_template from flask.views import View class RenderableView(View): def __init__(self, template, view): self.template = template self.view = view def dispatch_request(self, *args, **kwargs): view_model = self.view(*args, **kwargs) return render_template(...
from flaskbb.utils.helpers import render_template from flask.views import View class RenderableView(View): def __init__(self, template, view): self.template = template self.view = view def dispatch_request(self, *args, **kwargs): view_model = self.view(*args, **kwargs) return ...
Use local render_template than Flask's native
Use local render_template than Flask's native TODO: Provide a renderer argument at instantation?
Python
bsd-3-clause
realityone/flaskbb,realityone/flaskbb,dromanow/flaskbb,dromanow/flaskbb,realityone/flaskbb,dromanow/flaskbb
from flask import render_template from flask.views import View class RenderableView(View): def __init__(self, template, view): self.template = template self.view = view def dispatch_request(self, *args, **kwargs): view_model = self.view(*args, **kwargs) return render_template(...
from flaskbb.utils.helpers import render_template from flask.views import View class RenderableView(View): def __init__(self, template, view): self.template = template self.view = view def dispatch_request(self, *args, **kwargs): view_model = self.view(*args, **kwargs) return ...
<commit_before>from flask import render_template from flask.views import View class RenderableView(View): def __init__(self, template, view): self.template = template self.view = view def dispatch_request(self, *args, **kwargs): view_model = self.view(*args, **kwargs) return r...
from flaskbb.utils.helpers import render_template from flask.views import View class RenderableView(View): def __init__(self, template, view): self.template = template self.view = view def dispatch_request(self, *args, **kwargs): view_model = self.view(*args, **kwargs) return ...
from flask import render_template from flask.views import View class RenderableView(View): def __init__(self, template, view): self.template = template self.view = view def dispatch_request(self, *args, **kwargs): view_model = self.view(*args, **kwargs) return render_template(...
<commit_before>from flask import render_template from flask.views import View class RenderableView(View): def __init__(self, template, view): self.template = template self.view = view def dispatch_request(self, *args, **kwargs): view_model = self.view(*args, **kwargs) return r...
e4967c60c172ee85c6050744b487156daee13c23
Dice.py
Dice.py
import random class Die(object): def __init__(self, sides = 6): self.sides = sides self.held = False self.die_face = 1 def change_held(self, held): self.held = held def roll_die(self): if (self.held == False): self.die_face = random.randint(1, self.sides) ...
Add base Die functionality(roll, hold, get)
Add base Die functionality(roll, hold, get)
Python
mit
achyutreddy24/DiceGame
Add base Die functionality(roll, hold, get)
import random class Die(object): def __init__(self, sides = 6): self.sides = sides self.held = False self.die_face = 1 def change_held(self, held): self.held = held def roll_die(self): if (self.held == False): self.die_face = random.randint(1, self.sides) ...
<commit_before><commit_msg>Add base Die functionality(roll, hold, get)<commit_after>
import random class Die(object): def __init__(self, sides = 6): self.sides = sides self.held = False self.die_face = 1 def change_held(self, held): self.held = held def roll_die(self): if (self.held == False): self.die_face = random.randint(1, self.sides) ...
Add base Die functionality(roll, hold, get)import random class Die(object): def __init__(self, sides = 6): self.sides = sides self.held = False self.die_face = 1 def change_held(self, held): self.held = held def roll_die(self): if (self.held == False): sel...
<commit_before><commit_msg>Add base Die functionality(roll, hold, get)<commit_after>import random class Die(object): def __init__(self, sides = 6): self.sides = sides self.held = False self.die_face = 1 def change_held(self, held): self.held = held def roll_die(self): ...
e0771e601c7429f7929077c5397ec9fb228fafb1
ide/__init__.py
ide/__init__.py
from flask import Flask from ide.assets import assets from ide.util import root_relative_path app = Flask(__name__) app.config.from_object('ide.secret') app.config.update({ 'DEBUG': True, 'ASSETS_DEBUG': True, 'LESS_BIN': root_relative_path('node_modules', 'less', 'bin', 'lessc'), }) assets.init_app(app) ...
from flask import Flask from ide.assets import assets from ide.util import root_relative_path app = Flask(__name__) app.config.from_object('ide.secret') app.config.update({ 'DEBUG': True, 'ASSETS_DEBUG': True, 'LESS_BIN': str(root_relative_path('node_modules', 'less', 'bin', 'lessc')), }) assets.init_app(...
Fix crash when compiling less files.
Fix crash when compiling less files.
Python
apache-2.0
Sable/mclab-ide,Sable/mclab-ide,Sable/mclab-ide,Sable/mclab-ide,Sable/mclab-ide,Sable/mclab-ide
from flask import Flask from ide.assets import assets from ide.util import root_relative_path app = Flask(__name__) app.config.from_object('ide.secret') app.config.update({ 'DEBUG': True, 'ASSETS_DEBUG': True, 'LESS_BIN': root_relative_path('node_modules', 'less', 'bin', 'lessc'), }) assets.init_app(app) ...
from flask import Flask from ide.assets import assets from ide.util import root_relative_path app = Flask(__name__) app.config.from_object('ide.secret') app.config.update({ 'DEBUG': True, 'ASSETS_DEBUG': True, 'LESS_BIN': str(root_relative_path('node_modules', 'less', 'bin', 'lessc')), }) assets.init_app(...
<commit_before>from flask import Flask from ide.assets import assets from ide.util import root_relative_path app = Flask(__name__) app.config.from_object('ide.secret') app.config.update({ 'DEBUG': True, 'ASSETS_DEBUG': True, 'LESS_BIN': root_relative_path('node_modules', 'less', 'bin', 'lessc'), }) assets...
from flask import Flask from ide.assets import assets from ide.util import root_relative_path app = Flask(__name__) app.config.from_object('ide.secret') app.config.update({ 'DEBUG': True, 'ASSETS_DEBUG': True, 'LESS_BIN': str(root_relative_path('node_modules', 'less', 'bin', 'lessc')), }) assets.init_app(...
from flask import Flask from ide.assets import assets from ide.util import root_relative_path app = Flask(__name__) app.config.from_object('ide.secret') app.config.update({ 'DEBUG': True, 'ASSETS_DEBUG': True, 'LESS_BIN': root_relative_path('node_modules', 'less', 'bin', 'lessc'), }) assets.init_app(app) ...
<commit_before>from flask import Flask from ide.assets import assets from ide.util import root_relative_path app = Flask(__name__) app.config.from_object('ide.secret') app.config.update({ 'DEBUG': True, 'ASSETS_DEBUG': True, 'LESS_BIN': root_relative_path('node_modules', 'less', 'bin', 'lessc'), }) assets...
3dcf879c7188f61d43d3a3b11dc74b8de431037a
pyethapp/tests/test_jsonrpc.py
pyethapp/tests/test_jsonrpc.py
solidity_code = "contract test { function multiply(uint a) returns(uint d) { return a * 7; } }" def test_compileSolidity(): from pyethapp.jsonrpc import Compilers, data_encoder import ethereum._solidity s = ethereum._solidity.get_solidity() c = Compilers() assert 'solidity' in c.getCompilers() ...
import pytest solidity_code = "contract test { function multiply(uint a) returns(uint d) { return a * 7; } }" def test_compileSolidity(): from pyethapp.jsonrpc import Compilers, data_encoder import ethereum._solidity s = ethereum._solidity.get_solidity() if s == None: pytest.xfail("solidity...
Fix test to xfail when Solidity is not present
Fix test to xfail when Solidity is not present
Python
mit
ethereum/pyethapp,changwu-tw/pyethapp,gsalgado/pyethapp,RomanZacharia/pyethapp,changwu-tw/pyethapp,ethereum/pyethapp,d-das/pyethapp,vaporry/pyethapp,RomanZacharia/pyethapp,gsalgado/pyethapp
solidity_code = "contract test { function multiply(uint a) returns(uint d) { return a * 7; } }" def test_compileSolidity(): from pyethapp.jsonrpc import Compilers, data_encoder import ethereum._solidity s = ethereum._solidity.get_solidity() c = Compilers() assert 'solidity' in c.getCompilers() ...
import pytest solidity_code = "contract test { function multiply(uint a) returns(uint d) { return a * 7; } }" def test_compileSolidity(): from pyethapp.jsonrpc import Compilers, data_encoder import ethereum._solidity s = ethereum._solidity.get_solidity() if s == None: pytest.xfail("solidity...
<commit_before> solidity_code = "contract test { function multiply(uint a) returns(uint d) { return a * 7; } }" def test_compileSolidity(): from pyethapp.jsonrpc import Compilers, data_encoder import ethereum._solidity s = ethereum._solidity.get_solidity() c = Compilers() assert 'solidity' in c....
import pytest solidity_code = "contract test { function multiply(uint a) returns(uint d) { return a * 7; } }" def test_compileSolidity(): from pyethapp.jsonrpc import Compilers, data_encoder import ethereum._solidity s = ethereum._solidity.get_solidity() if s == None: pytest.xfail("solidity...
solidity_code = "contract test { function multiply(uint a) returns(uint d) { return a * 7; } }" def test_compileSolidity(): from pyethapp.jsonrpc import Compilers, data_encoder import ethereum._solidity s = ethereum._solidity.get_solidity() c = Compilers() assert 'solidity' in c.getCompilers() ...
<commit_before> solidity_code = "contract test { function multiply(uint a) returns(uint d) { return a * 7; } }" def test_compileSolidity(): from pyethapp.jsonrpc import Compilers, data_encoder import ethereum._solidity s = ethereum._solidity.get_solidity() c = Compilers() assert 'solidity' in c....
e77ed1e555f363c23734ec80a0daf6fa740b78ee
scripts/cache/dm/combine.py
scripts/cache/dm/combine.py
# Combine DM layers into one shapefile! # Daryl Herzmann 4 Nov 2005 import mapscript, dbflib, sys ts = sys.argv[1] outshp = mapscript.shapefileObj('dm_%s.shp'%ts, mapscript.MS_SHAPEFILE_POLYGON ) dbf = dbflib.create("dm_%s"%ts) dbf.add_field("DCAT", dbflib.FTInteger, 1, 0) counter = 0 for d in range(5): shp = map...
# Combine DM layers into one shapefile! # Daryl Herzmann 4 Nov 2005 import mapscript, dbflib, sys, os ts = sys.argv[1] outshp = mapscript.shapefileObj('dm_%s.shp'%ts, mapscript.MS_SHAPEFILE_POLYGON ) dbf = dbflib.create("dm_%s"%ts) dbf.add_field("DCAT", dbflib.FTInteger, 1, 0) counter = 0 for d in range(5): if no...
Check for shapefile existance before attempting to open
Check for shapefile existance before attempting to open
Python
mit
akrherz/iem,akrherz/iem,akrherz/iem,akrherz/iem,akrherz/iem
# Combine DM layers into one shapefile! # Daryl Herzmann 4 Nov 2005 import mapscript, dbflib, sys ts = sys.argv[1] outshp = mapscript.shapefileObj('dm_%s.shp'%ts, mapscript.MS_SHAPEFILE_POLYGON ) dbf = dbflib.create("dm_%s"%ts) dbf.add_field("DCAT", dbflib.FTInteger, 1, 0) counter = 0 for d in range(5): shp = map...
# Combine DM layers into one shapefile! # Daryl Herzmann 4 Nov 2005 import mapscript, dbflib, sys, os ts = sys.argv[1] outshp = mapscript.shapefileObj('dm_%s.shp'%ts, mapscript.MS_SHAPEFILE_POLYGON ) dbf = dbflib.create("dm_%s"%ts) dbf.add_field("DCAT", dbflib.FTInteger, 1, 0) counter = 0 for d in range(5): if no...
<commit_before># Combine DM layers into one shapefile! # Daryl Herzmann 4 Nov 2005 import mapscript, dbflib, sys ts = sys.argv[1] outshp = mapscript.shapefileObj('dm_%s.shp'%ts, mapscript.MS_SHAPEFILE_POLYGON ) dbf = dbflib.create("dm_%s"%ts) dbf.add_field("DCAT", dbflib.FTInteger, 1, 0) counter = 0 for d in range(...
# Combine DM layers into one shapefile! # Daryl Herzmann 4 Nov 2005 import mapscript, dbflib, sys, os ts = sys.argv[1] outshp = mapscript.shapefileObj('dm_%s.shp'%ts, mapscript.MS_SHAPEFILE_POLYGON ) dbf = dbflib.create("dm_%s"%ts) dbf.add_field("DCAT", dbflib.FTInteger, 1, 0) counter = 0 for d in range(5): if no...
# Combine DM layers into one shapefile! # Daryl Herzmann 4 Nov 2005 import mapscript, dbflib, sys ts = sys.argv[1] outshp = mapscript.shapefileObj('dm_%s.shp'%ts, mapscript.MS_SHAPEFILE_POLYGON ) dbf = dbflib.create("dm_%s"%ts) dbf.add_field("DCAT", dbflib.FTInteger, 1, 0) counter = 0 for d in range(5): shp = map...
<commit_before># Combine DM layers into one shapefile! # Daryl Herzmann 4 Nov 2005 import mapscript, dbflib, sys ts = sys.argv[1] outshp = mapscript.shapefileObj('dm_%s.shp'%ts, mapscript.MS_SHAPEFILE_POLYGON ) dbf = dbflib.create("dm_%s"%ts) dbf.add_field("DCAT", dbflib.FTInteger, 1, 0) counter = 0 for d in range(...
713e720bd3e4029273d72ab58aa79fbd79f0bafa
unit_tests/test_analyse_idynomics.py
unit_tests/test_analyse_idynomics.py
from nose.tools import * from analyse_idynomics import * from os.path import join, dirname, realpath class TestAnalyseiDynomics: expected_solutes = ['MyAtmos', 'pressure'] expected_species = ['MyBact'] expected_timesteps = 2 expected_dimensions = (20.0, 20.0, 2.0) def setUp(self): self...
from nose.tools import * from analyse_idynomics import * from os.path import join, dirname, realpath class TestAnalyseiDynomics: expected_solutes = ['MyAtmos', 'pressure'] expected_species = ['MyBact'] expected_reaction_rates = ['MyGrowth-rate'] expected_timesteps = 2 expected_dimensions = (20.0, 2...
Add unit test for getting reaction rate names
Add unit test for getting reaction rate names
Python
mit
fophillips/pyDynoMiCS
from nose.tools import * from analyse_idynomics import * from os.path import join, dirname, realpath class TestAnalyseiDynomics: expected_solutes = ['MyAtmos', 'pressure'] expected_species = ['MyBact'] expected_timesteps = 2 expected_dimensions = (20.0, 20.0, 2.0) def setUp(self): self...
from nose.tools import * from analyse_idynomics import * from os.path import join, dirname, realpath class TestAnalyseiDynomics: expected_solutes = ['MyAtmos', 'pressure'] expected_species = ['MyBact'] expected_reaction_rates = ['MyGrowth-rate'] expected_timesteps = 2 expected_dimensions = (20.0, 2...
<commit_before>from nose.tools import * from analyse_idynomics import * from os.path import join, dirname, realpath class TestAnalyseiDynomics: expected_solutes = ['MyAtmos', 'pressure'] expected_species = ['MyBact'] expected_timesteps = 2 expected_dimensions = (20.0, 20.0, 2.0) def setUp(self...
from nose.tools import * from analyse_idynomics import * from os.path import join, dirname, realpath class TestAnalyseiDynomics: expected_solutes = ['MyAtmos', 'pressure'] expected_species = ['MyBact'] expected_reaction_rates = ['MyGrowth-rate'] expected_timesteps = 2 expected_dimensions = (20.0, 2...
from nose.tools import * from analyse_idynomics import * from os.path import join, dirname, realpath class TestAnalyseiDynomics: expected_solutes = ['MyAtmos', 'pressure'] expected_species = ['MyBact'] expected_timesteps = 2 expected_dimensions = (20.0, 20.0, 2.0) def setUp(self): self...
<commit_before>from nose.tools import * from analyse_idynomics import * from os.path import join, dirname, realpath class TestAnalyseiDynomics: expected_solutes = ['MyAtmos', 'pressure'] expected_species = ['MyBact'] expected_timesteps = 2 expected_dimensions = (20.0, 20.0, 2.0) def setUp(self...
284d750d7da25b1d3db17ca4d5931e1b6d1d7319
tests/browser/test_editor.py
tests/browser/test_editor.py
from fancypages.test.testcases import SplinterTestCase class TestEditingFancyPage(SplinterTestCase): is_staff = True is_logged_in = True def test_moving_a_block(self): pass
from django.core.urlresolvers import reverse from fancypages.test.testcases import SplinterTestCase class TestTheEditorPanel(SplinterTestCase): is_staff = True is_logged_in = True def _get_cookie_names(self): return [c.get('name') for c in self.browser.cookies.all()] def test_can_be_opened_...
Add tests for editor panel JS
Add tests for editor panel JS
Python
bsd-3-clause
tangentlabs/django-fancypages,socradev/django-fancypages,socradev/django-fancypages,tangentlabs/django-fancypages,tangentlabs/django-fancypages,socradev/django-fancypages
from fancypages.test.testcases import SplinterTestCase class TestEditingFancyPage(SplinterTestCase): is_staff = True is_logged_in = True def test_moving_a_block(self): pass Add tests for editor panel JS
from django.core.urlresolvers import reverse from fancypages.test.testcases import SplinterTestCase class TestTheEditorPanel(SplinterTestCase): is_staff = True is_logged_in = True def _get_cookie_names(self): return [c.get('name') for c in self.browser.cookies.all()] def test_can_be_opened_...
<commit_before>from fancypages.test.testcases import SplinterTestCase class TestEditingFancyPage(SplinterTestCase): is_staff = True is_logged_in = True def test_moving_a_block(self): pass <commit_msg>Add tests for editor panel JS<commit_after>
from django.core.urlresolvers import reverse from fancypages.test.testcases import SplinterTestCase class TestTheEditorPanel(SplinterTestCase): is_staff = True is_logged_in = True def _get_cookie_names(self): return [c.get('name') for c in self.browser.cookies.all()] def test_can_be_opened_...
from fancypages.test.testcases import SplinterTestCase class TestEditingFancyPage(SplinterTestCase): is_staff = True is_logged_in = True def test_moving_a_block(self): pass Add tests for editor panel JSfrom django.core.urlresolvers import reverse from fancypages.test.testcases import SplinterTes...
<commit_before>from fancypages.test.testcases import SplinterTestCase class TestEditingFancyPage(SplinterTestCase): is_staff = True is_logged_in = True def test_moving_a_block(self): pass <commit_msg>Add tests for editor panel JS<commit_after>from django.core.urlresolvers import reverse from fan...
53cf4a078a072c9510e389295c19a0391b1eeef8
grab/tools/encoding.py
grab/tools/encoding.py
import re RE_SPECIAL_ENTITY = re.compile('&#(1[2-6][0-9]);') def smart_str(value, encoding='utf-8'): """ Normalize unicode/byte string to byte string. """ if isinstance(value, unicode): value = value.encode(encoding) return value def smart_unicode(value, encoding='utf-8'): """ N...
import re RE_SPECIAL_ENTITY = re.compile('&#(1[2-6][0-9]);') def smart_str(value, encoding='utf-8'): """ Normalize unicode/byte string to byte string. """ if isinstance(value, unicode): value = value.encode(encoding) return value def smart_unicode(value, encoding='utf-8'): """ N...
Fix issue in special_entity_handler function
Fix issue in special_entity_handler function
Python
mit
alihalabyah/grab,pombredanne/grab-1,SpaceAppsXploration/grab,alihalabyah/grab,codevlabs/grab,DDShadoww/grab,lorien/grab,kevinlondon/grab,raybuhr/grab,maurobaraldi/grab,huiyi1990/grab,istinspring/grab,giserh/grab,DDShadoww/grab,maurobaraldi/grab,pombredanne/grab-1,shaunstanislaus/grab,subeax/grab,huiyi1990/grab,liorvh/g...
import re RE_SPECIAL_ENTITY = re.compile('&#(1[2-6][0-9]);') def smart_str(value, encoding='utf-8'): """ Normalize unicode/byte string to byte string. """ if isinstance(value, unicode): value = value.encode(encoding) return value def smart_unicode(value, encoding='utf-8'): """ N...
import re RE_SPECIAL_ENTITY = re.compile('&#(1[2-6][0-9]);') def smart_str(value, encoding='utf-8'): """ Normalize unicode/byte string to byte string. """ if isinstance(value, unicode): value = value.encode(encoding) return value def smart_unicode(value, encoding='utf-8'): """ N...
<commit_before>import re RE_SPECIAL_ENTITY = re.compile('&#(1[2-6][0-9]);') def smart_str(value, encoding='utf-8'): """ Normalize unicode/byte string to byte string. """ if isinstance(value, unicode): value = value.encode(encoding) return value def smart_unicode(value, encoding='utf-8')...
import re RE_SPECIAL_ENTITY = re.compile('&#(1[2-6][0-9]);') def smart_str(value, encoding='utf-8'): """ Normalize unicode/byte string to byte string. """ if isinstance(value, unicode): value = value.encode(encoding) return value def smart_unicode(value, encoding='utf-8'): """ N...
import re RE_SPECIAL_ENTITY = re.compile('&#(1[2-6][0-9]);') def smart_str(value, encoding='utf-8'): """ Normalize unicode/byte string to byte string. """ if isinstance(value, unicode): value = value.encode(encoding) return value def smart_unicode(value, encoding='utf-8'): """ N...
<commit_before>import re RE_SPECIAL_ENTITY = re.compile('&#(1[2-6][0-9]);') def smart_str(value, encoding='utf-8'): """ Normalize unicode/byte string to byte string. """ if isinstance(value, unicode): value = value.encode(encoding) return value def smart_unicode(value, encoding='utf-8')...
9f4ffd065dc13ba16d8d9839f39f901c0c111155
backdrop/core/log_handler.py
backdrop/core/log_handler.py
from logging import FileHandler from logstash_formatter import LogstashFormatter import logging from flask import request def get_log_file_handler(path, log_level=logging.DEBUG): handler = FileHandler(path) handler.setFormatter(logging.Formatter( "%(asctime)s [%(levelname)s] -> %(message)s")) hand...
from logging import FileHandler from logstash_formatter import LogstashFormatter import logging from flask import request def get_log_file_handler(path, log_level=logging.DEBUG): handler = FileHandler(path) handler.setFormatter(logging.Formatter( "%(asctime)s [%(levelname)s] -> %(message)s")) hand...
Add request method and url to response log
Add request method and url to response log At the moment we can't relate the response to a request.
Python
mit
alphagov/backdrop,alphagov/backdrop,alphagov/backdrop
from logging import FileHandler from logstash_formatter import LogstashFormatter import logging from flask import request def get_log_file_handler(path, log_level=logging.DEBUG): handler = FileHandler(path) handler.setFormatter(logging.Formatter( "%(asctime)s [%(levelname)s] -> %(message)s")) hand...
from logging import FileHandler from logstash_formatter import LogstashFormatter import logging from flask import request def get_log_file_handler(path, log_level=logging.DEBUG): handler = FileHandler(path) handler.setFormatter(logging.Formatter( "%(asctime)s [%(levelname)s] -> %(message)s")) hand...
<commit_before>from logging import FileHandler from logstash_formatter import LogstashFormatter import logging from flask import request def get_log_file_handler(path, log_level=logging.DEBUG): handler = FileHandler(path) handler.setFormatter(logging.Formatter( "%(asctime)s [%(levelname)s] -> %(messag...
from logging import FileHandler from logstash_formatter import LogstashFormatter import logging from flask import request def get_log_file_handler(path, log_level=logging.DEBUG): handler = FileHandler(path) handler.setFormatter(logging.Formatter( "%(asctime)s [%(levelname)s] -> %(message)s")) hand...
from logging import FileHandler from logstash_formatter import LogstashFormatter import logging from flask import request def get_log_file_handler(path, log_level=logging.DEBUG): handler = FileHandler(path) handler.setFormatter(logging.Formatter( "%(asctime)s [%(levelname)s] -> %(message)s")) hand...
<commit_before>from logging import FileHandler from logstash_formatter import LogstashFormatter import logging from flask import request def get_log_file_handler(path, log_level=logging.DEBUG): handler = FileHandler(path) handler.setFormatter(logging.Formatter( "%(asctime)s [%(levelname)s] -> %(messag...
a0a90c7a4be2b419af0d745753b83f11f63916d2
registration/__init__.py
registration/__init__.py
VERSION = (0, 9, 0, 'beta', 1) def get_version(): from django.utils.version import get_version as django_get_version return django_get_version(VERSION) # pragma: no cover
VERSION = (1, 0, 0, 'final', 0) def get_version(): "Returns a PEP 386-compliant version number from VERSION." assert len(VERSION) == 5 assert VERSION[3] in ('alpha', 'beta', 'rc', 'final') # Now build the two parts of the version number: # main = X.Y[.Z] # sub = .devN - for pre-alpha releases...
Fix version number reporting so we can be installed before Django.
Fix version number reporting so we can be installed before Django.
Python
bsd-3-clause
lubosz/django-registration,lubosz/django-registration
VERSION = (0, 9, 0, 'beta', 1) def get_version(): from django.utils.version import get_version as django_get_version return django_get_version(VERSION) # pragma: no cover Fix version number reporting so we can be installed before Django.
VERSION = (1, 0, 0, 'final', 0) def get_version(): "Returns a PEP 386-compliant version number from VERSION." assert len(VERSION) == 5 assert VERSION[3] in ('alpha', 'beta', 'rc', 'final') # Now build the two parts of the version number: # main = X.Y[.Z] # sub = .devN - for pre-alpha releases...
<commit_before>VERSION = (0, 9, 0, 'beta', 1) def get_version(): from django.utils.version import get_version as django_get_version return django_get_version(VERSION) # pragma: no cover <commit_msg>Fix version number reporting so we can be installed before Django.<commit_after>
VERSION = (1, 0, 0, 'final', 0) def get_version(): "Returns a PEP 386-compliant version number from VERSION." assert len(VERSION) == 5 assert VERSION[3] in ('alpha', 'beta', 'rc', 'final') # Now build the two parts of the version number: # main = X.Y[.Z] # sub = .devN - for pre-alpha releases...
VERSION = (0, 9, 0, 'beta', 1) def get_version(): from django.utils.version import get_version as django_get_version return django_get_version(VERSION) # pragma: no cover Fix version number reporting so we can be installed before Django.VERSION = (1, 0, 0, 'final', 0) def get_version(): "Returns a PEP 3...
<commit_before>VERSION = (0, 9, 0, 'beta', 1) def get_version(): from django.utils.version import get_version as django_get_version return django_get_version(VERSION) # pragma: no cover <commit_msg>Fix version number reporting so we can be installed before Django.<commit_after>VERSION = (1, 0, 0, 'final', 0) ...
66dc90fd88f3d70b166c5bb69a4b4e2bed743848
synapse/tests/test_config.py
synapse/tests/test_config.py
from synapse.tests.common import * import synapse.lib.config as s_config class ConfTest(SynTest): def test_conf_base(self): defs = ( ('fooval',{'type':'int','doc':'what is foo val?','defval':99}), ('enabled',{'type':'bool','doc':'is thing enabled?','defval':0}), ) ...
from synapse.tests.common import * import synapse.lib.config as s_config class ConfTest(SynTest): def test_conf_base(self): defs = ( ('fooval',{'type':'int','doc':'what is foo val?','defval':99}), ('enabled',{'type':'bool','doc':'is thing enabled?','defval':0}), ) ...
Update test to ensure that default configuration values are available via getConfOpt
Update test to ensure that default configuration values are available via getConfOpt
Python
apache-2.0
vivisect/synapse,vertexproject/synapse,vertexproject/synapse,vertexproject/synapse
from synapse.tests.common import * import synapse.lib.config as s_config class ConfTest(SynTest): def test_conf_base(self): defs = ( ('fooval',{'type':'int','doc':'what is foo val?','defval':99}), ('enabled',{'type':'bool','doc':'is thing enabled?','defval':0}), ) ...
from synapse.tests.common import * import synapse.lib.config as s_config class ConfTest(SynTest): def test_conf_base(self): defs = ( ('fooval',{'type':'int','doc':'what is foo val?','defval':99}), ('enabled',{'type':'bool','doc':'is thing enabled?','defval':0}), ) ...
<commit_before>from synapse.tests.common import * import synapse.lib.config as s_config class ConfTest(SynTest): def test_conf_base(self): defs = ( ('fooval',{'type':'int','doc':'what is foo val?','defval':99}), ('enabled',{'type':'bool','doc':'is thing enabled?','defval':0}), ...
from synapse.tests.common import * import synapse.lib.config as s_config class ConfTest(SynTest): def test_conf_base(self): defs = ( ('fooval',{'type':'int','doc':'what is foo val?','defval':99}), ('enabled',{'type':'bool','doc':'is thing enabled?','defval':0}), ) ...
from synapse.tests.common import * import synapse.lib.config as s_config class ConfTest(SynTest): def test_conf_base(self): defs = ( ('fooval',{'type':'int','doc':'what is foo val?','defval':99}), ('enabled',{'type':'bool','doc':'is thing enabled?','defval':0}), ) ...
<commit_before>from synapse.tests.common import * import synapse.lib.config as s_config class ConfTest(SynTest): def test_conf_base(self): defs = ( ('fooval',{'type':'int','doc':'what is foo val?','defval':99}), ('enabled',{'type':'bool','doc':'is thing enabled?','defval':0}), ...
e77acf1c6144619ed12faa9ab9feb02e27c2f3fe
test/functionalities/backticks/TestBackticksWithoutATarget.py
test/functionalities/backticks/TestBackticksWithoutATarget.py
""" Test that backticks without a target should work (not infinite looping). """ import os, time import unittest2 import lldb from lldbtest import * class BackticksWithNoTargetTestCase(TestBase): mydir = TestBase.compute_mydir(__file__) def test_backticks_no_target(self): """A simple test of backtic...
""" Test that backticks without a target should work (not infinite looping). """ import os, time import unittest2 import lldb from lldbtest import * class BackticksWithNoTargetTestCase(TestBase): mydir = TestBase.compute_mydir(__file__) @unittest2.expectedFailure # llvm.org/pr19241 IRInterpreter does not ha...
Add expected failure annotation for llvm.org/pr19241
Add expected failure annotation for llvm.org/pr19241 git-svn-id: 4c4cc70b1ef44ba2b7963015e681894188cea27e@204718 91177308-0d34-0410-b5e6-96231b3b80d8
Python
apache-2.0
llvm-mirror/lldb,llvm-mirror/lldb,apple/swift-lldb,llvm-mirror/lldb,llvm-mirror/lldb,apple/swift-lldb,apple/swift-lldb,apple/swift-lldb,llvm-mirror/lldb,apple/swift-lldb,apple/swift-lldb
""" Test that backticks without a target should work (not infinite looping). """ import os, time import unittest2 import lldb from lldbtest import * class BackticksWithNoTargetTestCase(TestBase): mydir = TestBase.compute_mydir(__file__) def test_backticks_no_target(self): """A simple test of backtic...
""" Test that backticks without a target should work (not infinite looping). """ import os, time import unittest2 import lldb from lldbtest import * class BackticksWithNoTargetTestCase(TestBase): mydir = TestBase.compute_mydir(__file__) @unittest2.expectedFailure # llvm.org/pr19241 IRInterpreter does not ha...
<commit_before>""" Test that backticks without a target should work (not infinite looping). """ import os, time import unittest2 import lldb from lldbtest import * class BackticksWithNoTargetTestCase(TestBase): mydir = TestBase.compute_mydir(__file__) def test_backticks_no_target(self): """A simple ...
""" Test that backticks without a target should work (not infinite looping). """ import os, time import unittest2 import lldb from lldbtest import * class BackticksWithNoTargetTestCase(TestBase): mydir = TestBase.compute_mydir(__file__) @unittest2.expectedFailure # llvm.org/pr19241 IRInterpreter does not ha...
""" Test that backticks without a target should work (not infinite looping). """ import os, time import unittest2 import lldb from lldbtest import * class BackticksWithNoTargetTestCase(TestBase): mydir = TestBase.compute_mydir(__file__) def test_backticks_no_target(self): """A simple test of backtic...
<commit_before>""" Test that backticks without a target should work (not infinite looping). """ import os, time import unittest2 import lldb from lldbtest import * class BackticksWithNoTargetTestCase(TestBase): mydir = TestBase.compute_mydir(__file__) def test_backticks_no_target(self): """A simple ...
658e0a3dbd260f2d27756ed5605794b2320ba728
backend/src/pox/ext/gini/samples/packet_loss.py
backend/src/pox/ext/gini/samples/packet_loss.py
#!/usr/bin/python2 """ packet_loss.py: Simulates packet loss by dropping all packets with a probability of 25%. """ import random from pox.core import core import pox.openflow.libopenflow_01 as of def packet_in(event):. if random.random() >= 0.25: msg = of.ofp_packet_out(data = event.ofp) msg.ac...
#!/usr/bin/python2 """ packet_loss.py: Simulates packet loss by dropping all packets with a probability of 25%. """ import random from pox.core import core import pox.openflow.libopenflow_01 as of def packet_in(event): if random.random() >= 0.25: msg = of.ofp_packet_out(data = event.ofp) msg.act...
Fix bug in packet loss
Fix bug in packet loss
Python
mit
anrl/gini3,michaelkourlas/gini,michaelkourlas/gini,anrl/gini3,michaelkourlas/gini,anrl/gini3,michaelkourlas/gini,anrl/gini3,anrl/gini3,michaelkourlas/gini
#!/usr/bin/python2 """ packet_loss.py: Simulates packet loss by dropping all packets with a probability of 25%. """ import random from pox.core import core import pox.openflow.libopenflow_01 as of def packet_in(event):. if random.random() >= 0.25: msg = of.ofp_packet_out(data = event.ofp) msg.ac...
#!/usr/bin/python2 """ packet_loss.py: Simulates packet loss by dropping all packets with a probability of 25%. """ import random from pox.core import core import pox.openflow.libopenflow_01 as of def packet_in(event): if random.random() >= 0.25: msg = of.ofp_packet_out(data = event.ofp) msg.act...
<commit_before>#!/usr/bin/python2 """ packet_loss.py: Simulates packet loss by dropping all packets with a probability of 25%. """ import random from pox.core import core import pox.openflow.libopenflow_01 as of def packet_in(event):. if random.random() >= 0.25: msg = of.ofp_packet_out(data = event.ofp)...
#!/usr/bin/python2 """ packet_loss.py: Simulates packet loss by dropping all packets with a probability of 25%. """ import random from pox.core import core import pox.openflow.libopenflow_01 as of def packet_in(event): if random.random() >= 0.25: msg = of.ofp_packet_out(data = event.ofp) msg.act...
#!/usr/bin/python2 """ packet_loss.py: Simulates packet loss by dropping all packets with a probability of 25%. """ import random from pox.core import core import pox.openflow.libopenflow_01 as of def packet_in(event):. if random.random() >= 0.25: msg = of.ofp_packet_out(data = event.ofp) msg.ac...
<commit_before>#!/usr/bin/python2 """ packet_loss.py: Simulates packet loss by dropping all packets with a probability of 25%. """ import random from pox.core import core import pox.openflow.libopenflow_01 as of def packet_in(event):. if random.random() >= 0.25: msg = of.ofp_packet_out(data = event.ofp)...
9b859b4dfc0f215b61e05662f0d0af435227e932
src/adhocracy_sample/adhocracy_sample/__init__.py
src/adhocracy_sample/adhocracy_sample/__init__.py
"""Simple sample app using the Adhocracy core.""" from adhocracy import root_factory from pyramid.config import Configurator def includeme(config): """Setup sample app.""" config.include('adhocracy') # include default resource types config.include('adhocracy.resources.tag') config.include('adhocra...
"""Simple sample app using the Adhocracy core.""" from adhocracy import root_factory from pyramid.config import Configurator def includeme(config): """Setup sample app.""" config.include('adhocracy') # include additional default resource types config.include('adhocracy.resources.tag') config.inclu...
Include additional resources + sheets for login test.
Include additional resources + sheets for login test.
Python
agpl-3.0
fhartwig/adhocracy3.mercator,xs2maverick/adhocracy3.mercator,liqd/adhocracy3.mercator,fhartwig/adhocracy3.mercator,liqd/adhocracy3.mercator,liqd/adhocracy3.mercator,liqd/adhocracy3.mercator,liqd/adhocracy3.mercator,xs2maverick/adhocracy3.mercator,xs2maverick/adhocracy3.mercator,fhartwig/adhocracy3.mercator,liqd/adhocra...
"""Simple sample app using the Adhocracy core.""" from adhocracy import root_factory from pyramid.config import Configurator def includeme(config): """Setup sample app.""" config.include('adhocracy') # include default resource types config.include('adhocracy.resources.tag') config.include('adhocra...
"""Simple sample app using the Adhocracy core.""" from adhocracy import root_factory from pyramid.config import Configurator def includeme(config): """Setup sample app.""" config.include('adhocracy') # include additional default resource types config.include('adhocracy.resources.tag') config.inclu...
<commit_before>"""Simple sample app using the Adhocracy core.""" from adhocracy import root_factory from pyramid.config import Configurator def includeme(config): """Setup sample app.""" config.include('adhocracy') # include default resource types config.include('adhocracy.resources.tag') config.i...
"""Simple sample app using the Adhocracy core.""" from adhocracy import root_factory from pyramid.config import Configurator def includeme(config): """Setup sample app.""" config.include('adhocracy') # include additional default resource types config.include('adhocracy.resources.tag') config.inclu...
"""Simple sample app using the Adhocracy core.""" from adhocracy import root_factory from pyramid.config import Configurator def includeme(config): """Setup sample app.""" config.include('adhocracy') # include default resource types config.include('adhocracy.resources.tag') config.include('adhocra...
<commit_before>"""Simple sample app using the Adhocracy core.""" from adhocracy import root_factory from pyramid.config import Configurator def includeme(config): """Setup sample app.""" config.include('adhocracy') # include default resource types config.include('adhocracy.resources.tag') config.i...
b7eff5f52801fb066b975ce1726a76bcfa64987a
injectors/tty.py
injectors/tty.py
# vim: set fileencoding=utf-8 # Pavel Odvody <[email protected]> # # HICA - Host integrated container applications # # MIT License (C) 2015 from base.hica_base import * class TtyInjector(HicaInjector): def get_description(self): return 'Allocates a TTY for the process' def get_config_key(self): return '...
# vim: set fileencoding=utf-8 # Pavel Odvody <[email protected]> # # HICA - Host integrated container applications # # MIT License (C) 2015 from base.hica_base import * class TtyInjector(HicaInjector): def get_description(self): return 'Allocates a TTY for the process' def get_config_key(self): return '...
Use the proper none value
Use the proper none value
Python
mit
shaded-enmity/docker-hica
# vim: set fileencoding=utf-8 # Pavel Odvody <[email protected]> # # HICA - Host integrated container applications # # MIT License (C) 2015 from base.hica_base import * class TtyInjector(HicaInjector): def get_description(self): return 'Allocates a TTY for the process' def get_config_key(self): return '...
# vim: set fileencoding=utf-8 # Pavel Odvody <[email protected]> # # HICA - Host integrated container applications # # MIT License (C) 2015 from base.hica_base import * class TtyInjector(HicaInjector): def get_description(self): return 'Allocates a TTY for the process' def get_config_key(self): return '...
<commit_before># vim: set fileencoding=utf-8 # Pavel Odvody <[email protected]> # # HICA - Host integrated container applications # # MIT License (C) 2015 from base.hica_base import * class TtyInjector(HicaInjector): def get_description(self): return 'Allocates a TTY for the process' def get_config_key(self...
# vim: set fileencoding=utf-8 # Pavel Odvody <[email protected]> # # HICA - Host integrated container applications # # MIT License (C) 2015 from base.hica_base import * class TtyInjector(HicaInjector): def get_description(self): return 'Allocates a TTY for the process' def get_config_key(self): return '...
# vim: set fileencoding=utf-8 # Pavel Odvody <[email protected]> # # HICA - Host integrated container applications # # MIT License (C) 2015 from base.hica_base import * class TtyInjector(HicaInjector): def get_description(self): return 'Allocates a TTY for the process' def get_config_key(self): return '...
<commit_before># vim: set fileencoding=utf-8 # Pavel Odvody <[email protected]> # # HICA - Host integrated container applications # # MIT License (C) 2015 from base.hica_base import * class TtyInjector(HicaInjector): def get_description(self): return 'Allocates a TTY for the process' def get_config_key(self...
c30d9685239607883aeaee73618651f694f7d1b2
server/lib/slack/add_player.py
server/lib/slack/add_player.py
#!/usr/bin/python2.7 import re import lib.webutil as webutil from lib.data import players as player_data def handle(command_text): player_components = command_text.split(' ') new_player_id = re.sub('[<@]', '', player_components[2].split('|')[0]) player = player_data.get_player(new_player_id) if player...
#!/usr/bin/python2.7 import re import lib.webutil as webutil import slack.util as slackutil from lib.data import players as player_data def handle(command_text): player_components = command_text.split(' ') new_player_id = re.sub('[<@]', '', player_components[2].split('|')[0]) player = player_data.get_play...
Update response for adding a player
Update response for adding a player
Python
mit
groppe/mario
#!/usr/bin/python2.7 import re import lib.webutil as webutil from lib.data import players as player_data def handle(command_text): player_components = command_text.split(' ') new_player_id = re.sub('[<@]', '', player_components[2].split('|')[0]) player = player_data.get_player(new_player_id) if player...
#!/usr/bin/python2.7 import re import lib.webutil as webutil import slack.util as slackutil from lib.data import players as player_data def handle(command_text): player_components = command_text.split(' ') new_player_id = re.sub('[<@]', '', player_components[2].split('|')[0]) player = player_data.get_play...
<commit_before>#!/usr/bin/python2.7 import re import lib.webutil as webutil from lib.data import players as player_data def handle(command_text): player_components = command_text.split(' ') new_player_id = re.sub('[<@]', '', player_components[2].split('|')[0]) player = player_data.get_player(new_player_id...
#!/usr/bin/python2.7 import re import lib.webutil as webutil import slack.util as slackutil from lib.data import players as player_data def handle(command_text): player_components = command_text.split(' ') new_player_id = re.sub('[<@]', '', player_components[2].split('|')[0]) player = player_data.get_play...
#!/usr/bin/python2.7 import re import lib.webutil as webutil from lib.data import players as player_data def handle(command_text): player_components = command_text.split(' ') new_player_id = re.sub('[<@]', '', player_components[2].split('|')[0]) player = player_data.get_player(new_player_id) if player...
<commit_before>#!/usr/bin/python2.7 import re import lib.webutil as webutil from lib.data import players as player_data def handle(command_text): player_components = command_text.split(' ') new_player_id = re.sub('[<@]', '', player_components[2].split('|')[0]) player = player_data.get_player(new_player_id...
d34fb5a386eae07f57c78125d13664aa7965c487
demo/__init__.py
demo/__init__.py
#!/usr/bin/env python """Package for PythonTemplateDemo.""" __project__ = 'PythonTemplateDemo' __version__ = '0.0.0' VERSION = __project__ + '-' + __version__
"""Package for PythonTemplateDemo.""" __project__ = 'PythonTemplateDemo' __version__ = '0.0.0' VERSION = __project__ + '-' + __version__
Deploy Travis CI build 352 to GitHub
Deploy Travis CI build 352 to GitHub
Python
mit
jacebrowning/template-python-demo
#!/usr/bin/env python """Package for PythonTemplateDemo.""" __project__ = 'PythonTemplateDemo' __version__ = '0.0.0' VERSION = __project__ + '-' + __version__ Deploy Travis CI build 352 to GitHub
"""Package for PythonTemplateDemo.""" __project__ = 'PythonTemplateDemo' __version__ = '0.0.0' VERSION = __project__ + '-' + __version__
<commit_before>#!/usr/bin/env python """Package for PythonTemplateDemo.""" __project__ = 'PythonTemplateDemo' __version__ = '0.0.0' VERSION = __project__ + '-' + __version__ <commit_msg>Deploy Travis CI build 352 to GitHub<commit_after>
"""Package for PythonTemplateDemo.""" __project__ = 'PythonTemplateDemo' __version__ = '0.0.0' VERSION = __project__ + '-' + __version__
#!/usr/bin/env python """Package for PythonTemplateDemo.""" __project__ = 'PythonTemplateDemo' __version__ = '0.0.0' VERSION = __project__ + '-' + __version__ Deploy Travis CI build 352 to GitHub"""Package for PythonTemplateDemo.""" __project__ = 'PythonTemplateDemo' __version__ = '0.0.0' VERSION = __project__ + '...
<commit_before>#!/usr/bin/env python """Package for PythonTemplateDemo.""" __project__ = 'PythonTemplateDemo' __version__ = '0.0.0' VERSION = __project__ + '-' + __version__ <commit_msg>Deploy Travis CI build 352 to GitHub<commit_after>"""Package for PythonTemplateDemo.""" __project__ = 'PythonTemplateDemo' __versi...
3643edcd02d0b16c53fe07f9de0be1d13564237f
opps/db/conf.py
opps/db/conf.py
#!/usr/bin/env python # -*- coding: utf-8 -*- from django.conf import settings from appconf import AppConf class OppsDataBaseConf(AppConf): HOST = getattr(settings, 'OPPS_DB_HOSR', None) USER = getattr(settings, 'OPPS_DB_USER', None) PASSWORD = getattr(settings, 'OPPS_DB_PASSWORD', None) PORT = geta...
#!/usr/bin/env python # -*- coding: utf-8 -*- from django.conf import settings from appconf import AppConf class OppsDataBaseConf(AppConf): HOST = getattr(settings, 'OPPS_DB_HOSR', None) USER = getattr(settings, 'OPPS_DB_USER', None) PASSWORD = getattr(settings, 'OPPS_DB_PASSWORD', None) PORT = geta...
Add default database name, used in opps db
Add default database name, used in opps db
Python
mit
opps/opps,YACOWS/opps,williamroot/opps,williamroot/opps,opps/opps,YACOWS/opps,YACOWS/opps,opps/opps,williamroot/opps,YACOWS/opps,jeanmask/opps,jeanmask/opps,williamroot/opps,jeanmask/opps,jeanmask/opps,opps/opps
#!/usr/bin/env python # -*- coding: utf-8 -*- from django.conf import settings from appconf import AppConf class OppsDataBaseConf(AppConf): HOST = getattr(settings, 'OPPS_DB_HOSR', None) USER = getattr(settings, 'OPPS_DB_USER', None) PASSWORD = getattr(settings, 'OPPS_DB_PASSWORD', None) PORT = geta...
#!/usr/bin/env python # -*- coding: utf-8 -*- from django.conf import settings from appconf import AppConf class OppsDataBaseConf(AppConf): HOST = getattr(settings, 'OPPS_DB_HOSR', None) USER = getattr(settings, 'OPPS_DB_USER', None) PASSWORD = getattr(settings, 'OPPS_DB_PASSWORD', None) PORT = geta...
<commit_before>#!/usr/bin/env python # -*- coding: utf-8 -*- from django.conf import settings from appconf import AppConf class OppsDataBaseConf(AppConf): HOST = getattr(settings, 'OPPS_DB_HOSR', None) USER = getattr(settings, 'OPPS_DB_USER', None) PASSWORD = getattr(settings, 'OPPS_DB_PASSWORD', None) ...
#!/usr/bin/env python # -*- coding: utf-8 -*- from django.conf import settings from appconf import AppConf class OppsDataBaseConf(AppConf): HOST = getattr(settings, 'OPPS_DB_HOSR', None) USER = getattr(settings, 'OPPS_DB_USER', None) PASSWORD = getattr(settings, 'OPPS_DB_PASSWORD', None) PORT = geta...
#!/usr/bin/env python # -*- coding: utf-8 -*- from django.conf import settings from appconf import AppConf class OppsDataBaseConf(AppConf): HOST = getattr(settings, 'OPPS_DB_HOSR', None) USER = getattr(settings, 'OPPS_DB_USER', None) PASSWORD = getattr(settings, 'OPPS_DB_PASSWORD', None) PORT = geta...
<commit_before>#!/usr/bin/env python # -*- coding: utf-8 -*- from django.conf import settings from appconf import AppConf class OppsDataBaseConf(AppConf): HOST = getattr(settings, 'OPPS_DB_HOSR', None) USER = getattr(settings, 'OPPS_DB_USER', None) PASSWORD = getattr(settings, 'OPPS_DB_PASSWORD', None) ...
a5b57601da6e9b85eca18d61e3784addd1863fa4
i3pystatus/__init__.py
i3pystatus/__init__.py
#!/usr/bin/env python from i3pystatus.core import Status from i3pystatus.core.modules import Module, IntervalModule from i3pystatus.core.settings import SettingsBase from i3pystatus.core.util import formatp
from pkgutil import extend_path from i3pystatus.core import Status from i3pystatus.core.modules import Module, IntervalModule from i3pystatus.core.settings import SettingsBase from i3pystatus.core.util import formatp __path__ = extend_path(__path__, __name__)
Make i3pystatus a namespace package
Make i3pystatus a namespace package
Python
mit
Arvedui/i3pystatus,schroeji/i3pystatus,opatut/i3pystatus,MaicoTimmerman/i3pystatus,eBrnd/i3pystatus,m45t3r/i3pystatus,teto/i3pystatus,drwahl/i3pystatus,Arvedui/i3pystatus,teto/i3pystatus,fmarchenko/i3pystatus,plumps/i3pystatus,paulollivier/i3pystatus,juliushaertl/i3pystatus,ismaelpuerto/i3pystatus,schroeji/i3pystatus,n...
#!/usr/bin/env python from i3pystatus.core import Status from i3pystatus.core.modules import Module, IntervalModule from i3pystatus.core.settings import SettingsBase from i3pystatus.core.util import formatp Make i3pystatus a namespace package
from pkgutil import extend_path from i3pystatus.core import Status from i3pystatus.core.modules import Module, IntervalModule from i3pystatus.core.settings import SettingsBase from i3pystatus.core.util import formatp __path__ = extend_path(__path__, __name__)
<commit_before>#!/usr/bin/env python from i3pystatus.core import Status from i3pystatus.core.modules import Module, IntervalModule from i3pystatus.core.settings import SettingsBase from i3pystatus.core.util import formatp <commit_msg>Make i3pystatus a namespace package<commit_after>
from pkgutil import extend_path from i3pystatus.core import Status from i3pystatus.core.modules import Module, IntervalModule from i3pystatus.core.settings import SettingsBase from i3pystatus.core.util import formatp __path__ = extend_path(__path__, __name__)
#!/usr/bin/env python from i3pystatus.core import Status from i3pystatus.core.modules import Module, IntervalModule from i3pystatus.core.settings import SettingsBase from i3pystatus.core.util import formatp Make i3pystatus a namespace package from pkgutil import extend_path from i3pystatus.core import Status from i3p...
<commit_before>#!/usr/bin/env python from i3pystatus.core import Status from i3pystatus.core.modules import Module, IntervalModule from i3pystatus.core.settings import SettingsBase from i3pystatus.core.util import formatp <commit_msg>Make i3pystatus a namespace package<commit_after> from pkgutil import extend_path fr...
79d2a4824607048a79396731072d18636c7e69f3
jqsh/__main__.py
jqsh/__main__.py
#!/usr/bin/env python3 import sys import jqsh.parser import json while True: # a simple repl try: for value in jqsh.parser.parse(input('jqsh> ')).start(): json.dump(value, sys.stdout, sort_keys=True, indent=2, separators=(',', ': ')) print() # add a newline because json.dump doesn...
#!/usr/bin/env python3 """A shell based on jq. Usage: jqsh jqsh -c <filter> | --filter=<filter> jqsh -h | --help Options: -c, --filter=<filter> Apply this filter to the standard input instead of starting interactive mode. -h, --help Print this message and exit. """ import sys import jqsh.par...
Add argument parsing and --filter option
Add argument parsing and --filter option
Python
mit
jq-shell/python-jqsh
#!/usr/bin/env python3 import sys import jqsh.parser import json while True: # a simple repl try: for value in jqsh.parser.parse(input('jqsh> ')).start(): json.dump(value, sys.stdout, sort_keys=True, indent=2, separators=(',', ': ')) print() # add a newline because json.dump doesn...
#!/usr/bin/env python3 """A shell based on jq. Usage: jqsh jqsh -c <filter> | --filter=<filter> jqsh -h | --help Options: -c, --filter=<filter> Apply this filter to the standard input instead of starting interactive mode. -h, --help Print this message and exit. """ import sys import jqsh.par...
<commit_before>#!/usr/bin/env python3 import sys import jqsh.parser import json while True: # a simple repl try: for value in jqsh.parser.parse(input('jqsh> ')).start(): json.dump(value, sys.stdout, sort_keys=True, indent=2, separators=(',', ': ')) print() # add a newline because ...
#!/usr/bin/env python3 """A shell based on jq. Usage: jqsh jqsh -c <filter> | --filter=<filter> jqsh -h | --help Options: -c, --filter=<filter> Apply this filter to the standard input instead of starting interactive mode. -h, --help Print this message and exit. """ import sys import jqsh.par...
#!/usr/bin/env python3 import sys import jqsh.parser import json while True: # a simple repl try: for value in jqsh.parser.parse(input('jqsh> ')).start(): json.dump(value, sys.stdout, sort_keys=True, indent=2, separators=(',', ': ')) print() # add a newline because json.dump doesn...
<commit_before>#!/usr/bin/env python3 import sys import jqsh.parser import json while True: # a simple repl try: for value in jqsh.parser.parse(input('jqsh> ')).start(): json.dump(value, sys.stdout, sort_keys=True, indent=2, separators=(',', ': ')) print() # add a newline because ...