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
232c80a0ce03f4b2cbef9bf4f86546fa2110cf47
setup.py
setup.py
import versioneer from setuptools import setup setup( name='domain_events', version=versioneer.get_version(), cmdclass=versioneer.get_cmdclass(), description='Send and receive domain events via RabbitMQ', author='Ableton AG', author_email='[email protected]', url='https://github.com/Able...
import versioneer from setuptools import setup, find_packages setup( name='domain_events', version=versioneer.get_version(), cmdclass=versioneer.get_cmdclass(), description='Send and receive domain events via RabbitMQ', author='Ableton AG', author_email='[email protected]', url='https://...
Add django app and tests to source distribution
Add django app and tests to source distribution
Python
mit
AbletonAG/domain-events
import versioneer from setuptools import setup setup( name='domain_events', version=versioneer.get_version(), cmdclass=versioneer.get_cmdclass(), description='Send and receive domain events via RabbitMQ', author='Ableton AG', author_email='[email protected]', url='https://github.com/Able...
import versioneer from setuptools import setup, find_packages setup( name='domain_events', version=versioneer.get_version(), cmdclass=versioneer.get_cmdclass(), description='Send and receive domain events via RabbitMQ', author='Ableton AG', author_email='[email protected]', url='https://...
<commit_before>import versioneer from setuptools import setup setup( name='domain_events', version=versioneer.get_version(), cmdclass=versioneer.get_cmdclass(), description='Send and receive domain events via RabbitMQ', author='Ableton AG', author_email='[email protected]', url='https://...
import versioneer from setuptools import setup, find_packages setup( name='domain_events', version=versioneer.get_version(), cmdclass=versioneer.get_cmdclass(), description='Send and receive domain events via RabbitMQ', author='Ableton AG', author_email='[email protected]', url='https://...
import versioneer from setuptools import setup setup( name='domain_events', version=versioneer.get_version(), cmdclass=versioneer.get_cmdclass(), description='Send and receive domain events via RabbitMQ', author='Ableton AG', author_email='[email protected]', url='https://github.com/Able...
<commit_before>import versioneer from setuptools import setup setup( name='domain_events', version=versioneer.get_version(), cmdclass=versioneer.get_cmdclass(), description='Send and receive domain events via RabbitMQ', author='Ableton AG', author_email='[email protected]', url='https://...
2c141722aa8478b7e6a078d02206a26db3772a95
setup.py
setup.py
import os from setuptools import setup def getPackages(base): packages = [] def visit(arg, directory, files): if '__init__.py' in files: packages.append(directory.replace('/', '.')) os.path.walk(base, visit, None) return packages setup( name='tryfer', version='0.1', ...
import os from setuptools import setup def getPackages(base): packages = [] def visit(arg, directory, files): if '__init__.py' in files: packages.append(directory.replace('/', '.')) os.path.walk(base, visit, None) return packages setup( name='tryfer', version='0.1', ...
Add maintainer and long description.
Add maintainer and long description.
Python
apache-2.0
tryfer/tryfer
import os from setuptools import setup def getPackages(base): packages = [] def visit(arg, directory, files): if '__init__.py' in files: packages.append(directory.replace('/', '.')) os.path.walk(base, visit, None) return packages setup( name='tryfer', version='0.1', ...
import os from setuptools import setup def getPackages(base): packages = [] def visit(arg, directory, files): if '__init__.py' in files: packages.append(directory.replace('/', '.')) os.path.walk(base, visit, None) return packages setup( name='tryfer', version='0.1', ...
<commit_before>import os from setuptools import setup def getPackages(base): packages = [] def visit(arg, directory, files): if '__init__.py' in files: packages.append(directory.replace('/', '.')) os.path.walk(base, visit, None) return packages setup( name='tryfer', ver...
import os from setuptools import setup def getPackages(base): packages = [] def visit(arg, directory, files): if '__init__.py' in files: packages.append(directory.replace('/', '.')) os.path.walk(base, visit, None) return packages setup( name='tryfer', version='0.1', ...
import os from setuptools import setup def getPackages(base): packages = [] def visit(arg, directory, files): if '__init__.py' in files: packages.append(directory.replace('/', '.')) os.path.walk(base, visit, None) return packages setup( name='tryfer', version='0.1', ...
<commit_before>import os from setuptools import setup def getPackages(base): packages = [] def visit(arg, directory, files): if '__init__.py' in files: packages.append(directory.replace('/', '.')) os.path.walk(base, visit, None) return packages setup( name='tryfer', ver...
17ec7f6350890384069611ee485ef1b26d0867ed
setup.py
setup.py
#!/usr/bin/python import time from datetime import date from setuptools import setup from pagekite.common import APPVER import os try: # This borks sdist. os.remove('.SELF') except: pass setup( name="pagekite", version=APPVER.replace('github', 'dev%d' % time.time()), license="AGPLv3+", author="B...
#!/usr/bin/python import time from datetime import date from setuptools import setup from pagekite.common import APPVER import os try: # This borks sdist. os.remove('.SELF') except: pass setup( name="pagekite", version=APPVER.replace('github', 'dev%d' % (120*int(time.time()/120))), license="AGPLv3+"...
Reduce dev version number resolution
Reduce dev version number resolution
Python
agpl-3.0
lyoshenka/PyPagekite,lyoshenka/PyPagekite,output/PyPagekite,output/PyPagekite,pagekite/PyPagekite,lyoshenka/PyPagekite,pagekite/PyPagekite,pagekite/PyPagekite,output/PyPagekite
#!/usr/bin/python import time from datetime import date from setuptools import setup from pagekite.common import APPVER import os try: # This borks sdist. os.remove('.SELF') except: pass setup( name="pagekite", version=APPVER.replace('github', 'dev%d' % time.time()), license="AGPLv3+", author="B...
#!/usr/bin/python import time from datetime import date from setuptools import setup from pagekite.common import APPVER import os try: # This borks sdist. os.remove('.SELF') except: pass setup( name="pagekite", version=APPVER.replace('github', 'dev%d' % (120*int(time.time()/120))), license="AGPLv3+"...
<commit_before>#!/usr/bin/python import time from datetime import date from setuptools import setup from pagekite.common import APPVER import os try: # This borks sdist. os.remove('.SELF') except: pass setup( name="pagekite", version=APPVER.replace('github', 'dev%d' % time.time()), license="AGPLv3+"...
#!/usr/bin/python import time from datetime import date from setuptools import setup from pagekite.common import APPVER import os try: # This borks sdist. os.remove('.SELF') except: pass setup( name="pagekite", version=APPVER.replace('github', 'dev%d' % (120*int(time.time()/120))), license="AGPLv3+"...
#!/usr/bin/python import time from datetime import date from setuptools import setup from pagekite.common import APPVER import os try: # This borks sdist. os.remove('.SELF') except: pass setup( name="pagekite", version=APPVER.replace('github', 'dev%d' % time.time()), license="AGPLv3+", author="B...
<commit_before>#!/usr/bin/python import time from datetime import date from setuptools import setup from pagekite.common import APPVER import os try: # This borks sdist. os.remove('.SELF') except: pass setup( name="pagekite", version=APPVER.replace('github', 'dev%d' % time.time()), license="AGPLv3+"...
740f29abddc9ab05b5a395b8b69a54cae5ace0bf
setup.py
setup.py
# -*- coding: utf-8 -*- # # setup.py # anytop # from setuptools import setup setup( name='anytop', version='0.2.1', description='Streaming frequency distribution viewer.', long_description=open('README.rst').read(), author='Lars Yencken', author_email='[email protected]', url='http://gith...
# -*- coding: utf-8 -*- # # setup.py # anytop # from setuptools import setup setup( name='anytop', version='0.2.1', description='Streaming frequency distribution viewer.', long_description=open('README.rst').read(), author='Lars Yencken', author_email='[email protected]', url='http://gith...
Add Python 3 trove classifiers.
Add Python 3 trove classifiers.
Python
isc
larsyencken/anytop
# -*- coding: utf-8 -*- # # setup.py # anytop # from setuptools import setup setup( name='anytop', version='0.2.1', description='Streaming frequency distribution viewer.', long_description=open('README.rst').read(), author='Lars Yencken', author_email='[email protected]', url='http://gith...
# -*- coding: utf-8 -*- # # setup.py # anytop # from setuptools import setup setup( name='anytop', version='0.2.1', description='Streaming frequency distribution viewer.', long_description=open('README.rst').read(), author='Lars Yencken', author_email='[email protected]', url='http://gith...
<commit_before># -*- coding: utf-8 -*- # # setup.py # anytop # from setuptools import setup setup( name='anytop', version='0.2.1', description='Streaming frequency distribution viewer.', long_description=open('README.rst').read(), author='Lars Yencken', author_email='[email protected]', u...
# -*- coding: utf-8 -*- # # setup.py # anytop # from setuptools import setup setup( name='anytop', version='0.2.1', description='Streaming frequency distribution viewer.', long_description=open('README.rst').read(), author='Lars Yencken', author_email='[email protected]', url='http://gith...
# -*- coding: utf-8 -*- # # setup.py # anytop # from setuptools import setup setup( name='anytop', version='0.2.1', description='Streaming frequency distribution viewer.', long_description=open('README.rst').read(), author='Lars Yencken', author_email='[email protected]', url='http://gith...
<commit_before># -*- coding: utf-8 -*- # # setup.py # anytop # from setuptools import setup setup( name='anytop', version='0.2.1', description='Streaming frequency distribution viewer.', long_description=open('README.rst').read(), author='Lars Yencken', author_email='[email protected]', u...
f8e2d9a36cc60c711e006dba1265f7fdef74cb5a
setup.py
setup.py
from setuptools import setup setup( name='tower', version='0.3.2', description='Pull strings from a variety of sources, collapse whitespace, ' 'support context (msgctxt), and merging .pot files.', long_description=open('README.rst').read(), author='Wil Clouser', author_email='wc...
from setuptools import setup setup( name='tower', version='0.3.3', description='Pull strings from a variety of sources, collapse whitespace, ' 'support context (msgctxt), and merging .pot files.', long_description=open('README.rst').read(), author='Wil Clouser', author_email='wc...
Update version to pick up plurals fix
Update version to pick up plurals fix
Python
bsd-3-clause
clouserw/tower
from setuptools import setup setup( name='tower', version='0.3.2', description='Pull strings from a variety of sources, collapse whitespace, ' 'support context (msgctxt), and merging .pot files.', long_description=open('README.rst').read(), author='Wil Clouser', author_email='wc...
from setuptools import setup setup( name='tower', version='0.3.3', description='Pull strings from a variety of sources, collapse whitespace, ' 'support context (msgctxt), and merging .pot files.', long_description=open('README.rst').read(), author='Wil Clouser', author_email='wc...
<commit_before>from setuptools import setup setup( name='tower', version='0.3.2', description='Pull strings from a variety of sources, collapse whitespace, ' 'support context (msgctxt), and merging .pot files.', long_description=open('README.rst').read(), author='Wil Clouser', a...
from setuptools import setup setup( name='tower', version='0.3.3', description='Pull strings from a variety of sources, collapse whitespace, ' 'support context (msgctxt), and merging .pot files.', long_description=open('README.rst').read(), author='Wil Clouser', author_email='wc...
from setuptools import setup setup( name='tower', version='0.3.2', description='Pull strings from a variety of sources, collapse whitespace, ' 'support context (msgctxt), and merging .pot files.', long_description=open('README.rst').read(), author='Wil Clouser', author_email='wc...
<commit_before>from setuptools import setup setup( name='tower', version='0.3.2', description='Pull strings from a variety of sources, collapse whitespace, ' 'support context (msgctxt), and merging .pot files.', long_description=open('README.rst').read(), author='Wil Clouser', a...
1fa8d33feffa26944d89cb059530edb9e6bf047b
setup.py
setup.py
from setuptools import find_packages, setup setup( name='caar', version='5.0.0-beta.5', url='http://github.com/nickpowersys/CaaR/', license='BSD 3-Clause License', author='Nicholas A. Brown', author_email='[email protected]', description='Accelerating analysis of time stamped sensor...
from setuptools import find_packages, setup setup( name='caar', version='5.0.0-beta.6', url='http://github.com/nickpowersys/CaaR/', license='BSD 3-Clause License', author='Nicholas A. Brown', author_email='[email protected]', description='Accelerating analysis of time stamped sensor...
Build wheel excluding local backports
Build wheel excluding local backports
Python
bsd-3-clause
nickpowersys/CaaR
from setuptools import find_packages, setup setup( name='caar', version='5.0.0-beta.5', url='http://github.com/nickpowersys/CaaR/', license='BSD 3-Clause License', author='Nicholas A. Brown', author_email='[email protected]', description='Accelerating analysis of time stamped sensor...
from setuptools import find_packages, setup setup( name='caar', version='5.0.0-beta.6', url='http://github.com/nickpowersys/CaaR/', license='BSD 3-Clause License', author='Nicholas A. Brown', author_email='[email protected]', description='Accelerating analysis of time stamped sensor...
<commit_before>from setuptools import find_packages, setup setup( name='caar', version='5.0.0-beta.5', url='http://github.com/nickpowersys/CaaR/', license='BSD 3-Clause License', author='Nicholas A. Brown', author_email='[email protected]', description='Accelerating analysis of time...
from setuptools import find_packages, setup setup( name='caar', version='5.0.0-beta.6', url='http://github.com/nickpowersys/CaaR/', license='BSD 3-Clause License', author='Nicholas A. Brown', author_email='[email protected]', description='Accelerating analysis of time stamped sensor...
from setuptools import find_packages, setup setup( name='caar', version='5.0.0-beta.5', url='http://github.com/nickpowersys/CaaR/', license='BSD 3-Clause License', author='Nicholas A. Brown', author_email='[email protected]', description='Accelerating analysis of time stamped sensor...
<commit_before>from setuptools import find_packages, setup setup( name='caar', version='5.0.0-beta.5', url='http://github.com/nickpowersys/CaaR/', license='BSD 3-Clause License', author='Nicholas A. Brown', author_email='[email protected]', description='Accelerating analysis of time...
79358f9eb3b12b45d3e1ebe8840aed9e9d8a7274
setup.py
setup.py
#!/usr/bin/env python from setuptools import setup, find_packages setup( name='django-oscar-fancypages', version=":versiontools:fancypages:", url='https://github.com/tangentlabs/django-oscar-fancypages', author="Sebastian Vetter", author_email="[email protected]", descript...
#!/usr/bin/env python from setuptools import setup, find_packages setup( name='django-oscar-fancypages', version=":versiontools:fancypages:", url='https://github.com/tangentlabs/django-oscar-fancypages', author="Sebastian Vetter", author_email="[email protected]", descript...
Update django to use latest security release
Update django to use latest security release
Python
bsd-3-clause
tangentlabs/django-oscar-fancypages,tangentlabs/django-oscar-fancypages
#!/usr/bin/env python from setuptools import setup, find_packages setup( name='django-oscar-fancypages', version=":versiontools:fancypages:", url='https://github.com/tangentlabs/django-oscar-fancypages', author="Sebastian Vetter", author_email="[email protected]", descript...
#!/usr/bin/env python from setuptools import setup, find_packages setup( name='django-oscar-fancypages', version=":versiontools:fancypages:", url='https://github.com/tangentlabs/django-oscar-fancypages', author="Sebastian Vetter", author_email="[email protected]", descript...
<commit_before>#!/usr/bin/env python from setuptools import setup, find_packages setup( name='django-oscar-fancypages', version=":versiontools:fancypages:", url='https://github.com/tangentlabs/django-oscar-fancypages', author="Sebastian Vetter", author_email="[email protected]...
#!/usr/bin/env python from setuptools import setup, find_packages setup( name='django-oscar-fancypages', version=":versiontools:fancypages:", url='https://github.com/tangentlabs/django-oscar-fancypages', author="Sebastian Vetter", author_email="[email protected]", descript...
#!/usr/bin/env python from setuptools import setup, find_packages setup( name='django-oscar-fancypages', version=":versiontools:fancypages:", url='https://github.com/tangentlabs/django-oscar-fancypages', author="Sebastian Vetter", author_email="[email protected]", descript...
<commit_before>#!/usr/bin/env python from setuptools import setup, find_packages setup( name='django-oscar-fancypages', version=":versiontools:fancypages:", url='https://github.com/tangentlabs/django-oscar-fancypages', author="Sebastian Vetter", author_email="[email protected]...
659d9be59ad816680d9c8fc13e4be67627e1d290
ecommerce/courses/utils.py
ecommerce/courses/utils.py
import hashlib from django.conf import settings from django.core.cache import cache from edx_rest_api_client.client import EdxRestApiClient from ecommerce.core.url_utils import get_lms_url def mode_for_seat(product): """ Returns the enrollment mode (aka course mode) for the specified product. If the spe...
import hashlib from django.conf import settings from django.core.cache import cache from edx_rest_api_client.client import EdxRestApiClient from ecommerce.core.url_utils import get_lms_url def mode_for_seat(product): """ Returns the enrollment mode (aka course mode) for the specified product. If the spe...
Handle for missing product attribute
mattdrayer/WL-525: Handle for missing product attribute
Python
agpl-3.0
mferenca/HMS-ecommerce,edx/ecommerce,eduNEXT/edunext-ecommerce,eduNEXT/edunext-ecommerce,eduNEXT/edunext-ecommerce,mferenca/HMS-ecommerce,edx/ecommerce,eduNEXT/edunext-ecommerce,edx/ecommerce,mferenca/HMS-ecommerce,edx/ecommerce
import hashlib from django.conf import settings from django.core.cache import cache from edx_rest_api_client.client import EdxRestApiClient from ecommerce.core.url_utils import get_lms_url def mode_for_seat(product): """ Returns the enrollment mode (aka course mode) for the specified product. If the spe...
import hashlib from django.conf import settings from django.core.cache import cache from edx_rest_api_client.client import EdxRestApiClient from ecommerce.core.url_utils import get_lms_url def mode_for_seat(product): """ Returns the enrollment mode (aka course mode) for the specified product. If the spe...
<commit_before>import hashlib from django.conf import settings from django.core.cache import cache from edx_rest_api_client.client import EdxRestApiClient from ecommerce.core.url_utils import get_lms_url def mode_for_seat(product): """ Returns the enrollment mode (aka course mode) for the specified product....
import hashlib from django.conf import settings from django.core.cache import cache from edx_rest_api_client.client import EdxRestApiClient from ecommerce.core.url_utils import get_lms_url def mode_for_seat(product): """ Returns the enrollment mode (aka course mode) for the specified product. If the spe...
import hashlib from django.conf import settings from django.core.cache import cache from edx_rest_api_client.client import EdxRestApiClient from ecommerce.core.url_utils import get_lms_url def mode_for_seat(product): """ Returns the enrollment mode (aka course mode) for the specified product. If the spe...
<commit_before>import hashlib from django.conf import settings from django.core.cache import cache from edx_rest_api_client.client import EdxRestApiClient from ecommerce.core.url_utils import get_lms_url def mode_for_seat(product): """ Returns the enrollment mode (aka course mode) for the specified product....
9c32e25169fa2d0be74bdf320da401ddcb2491e3
studygroups/forms.py
studygroups/forms.py
from django import forms from studygroups.models import Application from studygroups.models import Reminder from localflavor.us.forms import USPhoneNumberField class ApplicationForm(forms.ModelForm): mobile = USPhoneNumberField(required=False) def clean(self): cleaned_data = super(ApplicationForm, se...
from django import forms from studygroups.models import Application from studygroups.models import Reminder from localflavor.us.forms import USPhoneNumberField class ApplicationForm(forms.ModelForm): mobile = USPhoneNumberField(required=False) def clean(self): cleaned_data = super(ApplicationForm, se...
Update question about computer access
Update question about computer access
Python
mit
p2pu/learning-circles,p2pu/learning-circles,p2pu/learning-circles,p2pu/learning-circles
from django import forms from studygroups.models import Application from studygroups.models import Reminder from localflavor.us.forms import USPhoneNumberField class ApplicationForm(forms.ModelForm): mobile = USPhoneNumberField(required=False) def clean(self): cleaned_data = super(ApplicationForm, se...
from django import forms from studygroups.models import Application from studygroups.models import Reminder from localflavor.us.forms import USPhoneNumberField class ApplicationForm(forms.ModelForm): mobile = USPhoneNumberField(required=False) def clean(self): cleaned_data = super(ApplicationForm, se...
<commit_before>from django import forms from studygroups.models import Application from studygroups.models import Reminder from localflavor.us.forms import USPhoneNumberField class ApplicationForm(forms.ModelForm): mobile = USPhoneNumberField(required=False) def clean(self): cleaned_data = super(Appl...
from django import forms from studygroups.models import Application from studygroups.models import Reminder from localflavor.us.forms import USPhoneNumberField class ApplicationForm(forms.ModelForm): mobile = USPhoneNumberField(required=False) def clean(self): cleaned_data = super(ApplicationForm, se...
from django import forms from studygroups.models import Application from studygroups.models import Reminder from localflavor.us.forms import USPhoneNumberField class ApplicationForm(forms.ModelForm): mobile = USPhoneNumberField(required=False) def clean(self): cleaned_data = super(ApplicationForm, se...
<commit_before>from django import forms from studygroups.models import Application from studygroups.models import Reminder from localflavor.us.forms import USPhoneNumberField class ApplicationForm(forms.ModelForm): mobile = USPhoneNumberField(required=False) def clean(self): cleaned_data = super(Appl...
4e0bbffd400885030af0cbba20cacde1804aefbc
blockbuster/bb_logging.py
blockbuster/bb_logging.py
import logging import logging.handlers # ######### Set up logging ########## # log.basicConfig(format="%(asctime)s - %(levelname)s: %(message)s", level=log.DEBUG) logger = logging.getLogger('bb_log') logger.setLevel(logging.DEBUG) # create file handler which logs even debug messages tfh = logging.handlers.TimedRotat...
import config import logging import logging.handlers # ######### Set up logging ########## # log.basicConfig(format="%(asctime)s - %(levelname)s: %(message)s", level=log.DEBUG) logger = logging.getLogger('bb_log') logger.setLevel(logging.DEBUG) # create file handler which logs even debug messages tfh = logging.handl...
Change file logHandler to use configured path for log files
Change file logHandler to use configured path for log files
Python
mit
mattstibbs/blockbuster-server,mattstibbs/blockbuster-server
import logging import logging.handlers # ######### Set up logging ########## # log.basicConfig(format="%(asctime)s - %(levelname)s: %(message)s", level=log.DEBUG) logger = logging.getLogger('bb_log') logger.setLevel(logging.DEBUG) # create file handler which logs even debug messages tfh = logging.handlers.TimedRotat...
import config import logging import logging.handlers # ######### Set up logging ########## # log.basicConfig(format="%(asctime)s - %(levelname)s: %(message)s", level=log.DEBUG) logger = logging.getLogger('bb_log') logger.setLevel(logging.DEBUG) # create file handler which logs even debug messages tfh = logging.handl...
<commit_before>import logging import logging.handlers # ######### Set up logging ########## # log.basicConfig(format="%(asctime)s - %(levelname)s: %(message)s", level=log.DEBUG) logger = logging.getLogger('bb_log') logger.setLevel(logging.DEBUG) # create file handler which logs even debug messages tfh = logging.hand...
import config import logging import logging.handlers # ######### Set up logging ########## # log.basicConfig(format="%(asctime)s - %(levelname)s: %(message)s", level=log.DEBUG) logger = logging.getLogger('bb_log') logger.setLevel(logging.DEBUG) # create file handler which logs even debug messages tfh = logging.handl...
import logging import logging.handlers # ######### Set up logging ########## # log.basicConfig(format="%(asctime)s - %(levelname)s: %(message)s", level=log.DEBUG) logger = logging.getLogger('bb_log') logger.setLevel(logging.DEBUG) # create file handler which logs even debug messages tfh = logging.handlers.TimedRotat...
<commit_before>import logging import logging.handlers # ######### Set up logging ########## # log.basicConfig(format="%(asctime)s - %(levelname)s: %(message)s", level=log.DEBUG) logger = logging.getLogger('bb_log') logger.setLevel(logging.DEBUG) # create file handler which logs even debug messages tfh = logging.hand...
bf56b75607a6728b12470e0b48074d0ad8124b66
views.py
views.py
from flask import Flask, render_template, make_response from image_helpers import create_image app = Flask(__name__) @app.route('/') def index(): return render_template('index.html') @app.route('/<width>x<height>') @app.route('/<width>X<height>') def serve_image(width, height): stringfile = create_image(wid...
from flask import Flask, render_template, make_response from image_helpers import create_image app = Flask(__name__) @app.route('/') def index(): return render_template('index.html') @app.route('/<width>x<height>') @app.route('/<width>X<height>') @app.route('/<width>x<height>/') @app.route('/<width>X<height>/')...
Add support for appending /
Add support for appending /
Python
mit
agnethesoraa/placepuppy,agnethesoraa/placepuppy
from flask import Flask, render_template, make_response from image_helpers import create_image app = Flask(__name__) @app.route('/') def index(): return render_template('index.html') @app.route('/<width>x<height>') @app.route('/<width>X<height>') def serve_image(width, height): stringfile = create_image(wid...
from flask import Flask, render_template, make_response from image_helpers import create_image app = Flask(__name__) @app.route('/') def index(): return render_template('index.html') @app.route('/<width>x<height>') @app.route('/<width>X<height>') @app.route('/<width>x<height>/') @app.route('/<width>X<height>/')...
<commit_before>from flask import Flask, render_template, make_response from image_helpers import create_image app = Flask(__name__) @app.route('/') def index(): return render_template('index.html') @app.route('/<width>x<height>') @app.route('/<width>X<height>') def serve_image(width, height): stringfile = c...
from flask import Flask, render_template, make_response from image_helpers import create_image app = Flask(__name__) @app.route('/') def index(): return render_template('index.html') @app.route('/<width>x<height>') @app.route('/<width>X<height>') @app.route('/<width>x<height>/') @app.route('/<width>X<height>/')...
from flask import Flask, render_template, make_response from image_helpers import create_image app = Flask(__name__) @app.route('/') def index(): return render_template('index.html') @app.route('/<width>x<height>') @app.route('/<width>X<height>') def serve_image(width, height): stringfile = create_image(wid...
<commit_before>from flask import Flask, render_template, make_response from image_helpers import create_image app = Flask(__name__) @app.route('/') def index(): return render_template('index.html') @app.route('/<width>x<height>') @app.route('/<width>X<height>') def serve_image(width, height): stringfile = c...
9e5be1a70936ce206e9f99dd90e4f26b3a78616e
fjord/settings/__init__.py
fjord/settings/__init__.py
import sys # This is imported as the DJANGO_SETTINGS_MODULE. It imports local.py # which imports base.py which imports funfactory.settings_base. # # Thus: # # 1. base.py overrides funfactory.settings_base # 2. local.py overrides everything # 3. if we're running tests, tests override local try: from fjord.settings...
import sys # This is imported as the DJANGO_SETTINGS_MODULE. It imports local.py # which imports base.py which imports funfactory.settings_base. # # Thus: # # 1. base.py overrides funfactory.settings_base # 2. local.py overrides everything # 3. if we're running tests, tests override local try: from fjord.settings...
Add debugging print statment for jenkins
Add debugging print statment for jenkins
Python
bsd-3-clause
staranjeet/fjord,rlr/fjord,rlr/fjord,DESHRAJ/fjord,lgp171188/fjord,hoosteeno/fjord,Ritsyy/fjord,staranjeet/fjord,lgp171188/fjord,mozilla/fjord,lgp171188/fjord,mozilla/fjord,lgp171188/fjord,DESHRAJ/fjord,mozilla/fjord,Ritsyy/fjord,staranjeet/fjord,rlr/fjord,DESHRAJ/fjord,hoosteeno/fjord,staranjeet/fjord,mozilla/fjord,rl...
import sys # This is imported as the DJANGO_SETTINGS_MODULE. It imports local.py # which imports base.py which imports funfactory.settings_base. # # Thus: # # 1. base.py overrides funfactory.settings_base # 2. local.py overrides everything # 3. if we're running tests, tests override local try: from fjord.settings...
import sys # This is imported as the DJANGO_SETTINGS_MODULE. It imports local.py # which imports base.py which imports funfactory.settings_base. # # Thus: # # 1. base.py overrides funfactory.settings_base # 2. local.py overrides everything # 3. if we're running tests, tests override local try: from fjord.settings...
<commit_before>import sys # This is imported as the DJANGO_SETTINGS_MODULE. It imports local.py # which imports base.py which imports funfactory.settings_base. # # Thus: # # 1. base.py overrides funfactory.settings_base # 2. local.py overrides everything # 3. if we're running tests, tests override local try: from...
import sys # This is imported as the DJANGO_SETTINGS_MODULE. It imports local.py # which imports base.py which imports funfactory.settings_base. # # Thus: # # 1. base.py overrides funfactory.settings_base # 2. local.py overrides everything # 3. if we're running tests, tests override local try: from fjord.settings...
import sys # This is imported as the DJANGO_SETTINGS_MODULE. It imports local.py # which imports base.py which imports funfactory.settings_base. # # Thus: # # 1. base.py overrides funfactory.settings_base # 2. local.py overrides everything # 3. if we're running tests, tests override local try: from fjord.settings...
<commit_before>import sys # This is imported as the DJANGO_SETTINGS_MODULE. It imports local.py # which imports base.py which imports funfactory.settings_base. # # Thus: # # 1. base.py overrides funfactory.settings_base # 2. local.py overrides everything # 3. if we're running tests, tests override local try: from...
734100112759b8f52be6013fb69988bd4b203f71
magnum/tests/functional/mesos/test_mesos_python_client.py
magnum/tests/functional/mesos/test_mesos_python_client.py
# Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the Li...
# Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the Li...
Fix mesos baymodel creation case
Functional: Fix mesos baymodel creation case Mesos expects a docker network driver type. Partially implements: blueprint mesos-functional-testing Change-Id: I74946b51c9cb852f016c6e265d1700ae8bc3aa17
Python
apache-2.0
openstack/magnum,openstack/magnum,ArchiFleKs/magnum,jay-lau/magnum,ArchiFleKs/magnum
# Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the Li...
# Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the Li...
<commit_before># Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distribut...
# Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the Li...
# Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the Li...
<commit_before># Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distribut...
828c300973d47ce09844840176f2e9e68d955bbd
wrt/wrt-manifest-tizen-tests/const.py
wrt/wrt-manifest-tizen-tests/const.py
#!/usr/bin/env python import sys, os import itertools, shutil Tizen_User=os.environ['TIZEN_USER'] path = os.path.abspath(__file__) path = os.path.split(path)[0] os.chdir(path) print path device_ssh_ip = "" ssh_device = device_ssh_ip.split(",") path_tcs = path + "/tcs" path_result= path + "/result" path_allpairs = path ...
#!/usr/bin/env python import sys, os import itertools, shutil Tizen_User = "app" if os.environ['TIZEN_USER']: Tizen_User = os.environ['TIZEN_USER'] path = os.path.abspath(__file__) path = os.path.split(path)[0] os.chdir(path) print path device_ssh_ip = "" ssh_device = device_ssh_ip.split(",") path_tcs = path + "/tcs"...
Update pyunit TIZEN_USER for default value
[wrt] Update pyunit TIZEN_USER for default value - Setting default value 'app' for TIZEN_USER in manifest Impacted tests(approved): new 0, update 264, delete 0 Unit test platform: [Tizen] Unit test result summary: pass 264, fail 0, block 0
Python
bsd-3-clause
jiajiax/crosswalk-test-suite,ibelem/crosswalk-test-suite,chunywang/crosswalk-test-suite,BruceDai/crosswalk-test-suite,haoyunfeix/crosswalk-test-suite,yunxliu/crosswalk-test-suite,jiajiax/crosswalk-test-suite,Shao-Feng/crosswalk-test-suite,crosswalk-project/crosswalk-test-suite,YongseopKim/crosswalk-test-suite,zqzhang/c...
#!/usr/bin/env python import sys, os import itertools, shutil Tizen_User=os.environ['TIZEN_USER'] path = os.path.abspath(__file__) path = os.path.split(path)[0] os.chdir(path) print path device_ssh_ip = "" ssh_device = device_ssh_ip.split(",") path_tcs = path + "/tcs" path_result= path + "/result" path_allpairs = path ...
#!/usr/bin/env python import sys, os import itertools, shutil Tizen_User = "app" if os.environ['TIZEN_USER']: Tizen_User = os.environ['TIZEN_USER'] path = os.path.abspath(__file__) path = os.path.split(path)[0] os.chdir(path) print path device_ssh_ip = "" ssh_device = device_ssh_ip.split(",") path_tcs = path + "/tcs"...
<commit_before>#!/usr/bin/env python import sys, os import itertools, shutil Tizen_User=os.environ['TIZEN_USER'] path = os.path.abspath(__file__) path = os.path.split(path)[0] os.chdir(path) print path device_ssh_ip = "" ssh_device = device_ssh_ip.split(",") path_tcs = path + "/tcs" path_result= path + "/result" path_a...
#!/usr/bin/env python import sys, os import itertools, shutil Tizen_User = "app" if os.environ['TIZEN_USER']: Tizen_User = os.environ['TIZEN_USER'] path = os.path.abspath(__file__) path = os.path.split(path)[0] os.chdir(path) print path device_ssh_ip = "" ssh_device = device_ssh_ip.split(",") path_tcs = path + "/tcs"...
#!/usr/bin/env python import sys, os import itertools, shutil Tizen_User=os.environ['TIZEN_USER'] path = os.path.abspath(__file__) path = os.path.split(path)[0] os.chdir(path) print path device_ssh_ip = "" ssh_device = device_ssh_ip.split(",") path_tcs = path + "/tcs" path_result= path + "/result" path_allpairs = path ...
<commit_before>#!/usr/bin/env python import sys, os import itertools, shutil Tizen_User=os.environ['TIZEN_USER'] path = os.path.abspath(__file__) path = os.path.split(path)[0] os.chdir(path) print path device_ssh_ip = "" ssh_device = device_ssh_ip.split(",") path_tcs = path + "/tcs" path_result= path + "/result" path_a...
0f4208dd6088a6a96a0145045b11cf2d152db30d
src/samples/pillow.py
src/samples/pillow.py
#!/usr/bin/env python # -*- coding: utf-8 -*- from libavg import app, avg from PIL import Image # Demonstrates interoperability with pillow (https://pillow.readthedocs.org/index.html) class MyMainDiv(app.MainDiv): def onInit(self): self.toggleTouchVisualization() srcbmp = avg.Bitmap("rgb24-64x64....
#!/usr/bin/env python # -*- coding: utf-8 -*- from libavg import app, avg from PIL import Image # Demonstrates interoperability with pillow (https://pillow.readthedocs.io) class MyMainDiv(app.MainDiv): def onInit(self): self.toggleTouchVisualization() srcbmp = avg.Bitmap("rgb24-64x64.png") ...
Update link in the comment and change saved image format to .png
Update link in the comment and change saved image format to .png
Python
lgpl-2.1
libavg/libavg,libavg/libavg,libavg/libavg,libavg/libavg
#!/usr/bin/env python # -*- coding: utf-8 -*- from libavg import app, avg from PIL import Image # Demonstrates interoperability with pillow (https://pillow.readthedocs.org/index.html) class MyMainDiv(app.MainDiv): def onInit(self): self.toggleTouchVisualization() srcbmp = avg.Bitmap("rgb24-64x64....
#!/usr/bin/env python # -*- coding: utf-8 -*- from libavg import app, avg from PIL import Image # Demonstrates interoperability with pillow (https://pillow.readthedocs.io) class MyMainDiv(app.MainDiv): def onInit(self): self.toggleTouchVisualization() srcbmp = avg.Bitmap("rgb24-64x64.png") ...
<commit_before>#!/usr/bin/env python # -*- coding: utf-8 -*- from libavg import app, avg from PIL import Image # Demonstrates interoperability with pillow (https://pillow.readthedocs.org/index.html) class MyMainDiv(app.MainDiv): def onInit(self): self.toggleTouchVisualization() srcbmp = avg.Bitma...
#!/usr/bin/env python # -*- coding: utf-8 -*- from libavg import app, avg from PIL import Image # Demonstrates interoperability with pillow (https://pillow.readthedocs.io) class MyMainDiv(app.MainDiv): def onInit(self): self.toggleTouchVisualization() srcbmp = avg.Bitmap("rgb24-64x64.png") ...
#!/usr/bin/env python # -*- coding: utf-8 -*- from libavg import app, avg from PIL import Image # Demonstrates interoperability with pillow (https://pillow.readthedocs.org/index.html) class MyMainDiv(app.MainDiv): def onInit(self): self.toggleTouchVisualization() srcbmp = avg.Bitmap("rgb24-64x64....
<commit_before>#!/usr/bin/env python # -*- coding: utf-8 -*- from libavg import app, avg from PIL import Image # Demonstrates interoperability with pillow (https://pillow.readthedocs.org/index.html) class MyMainDiv(app.MainDiv): def onInit(self): self.toggleTouchVisualization() srcbmp = avg.Bitma...
360005d65575c4b47b25dc8308e8a5611a00e584
tools/bootstrap_project.py
tools/bootstrap_project.py
# TODO: Implement!
# TODO: Implement! ''' We want a folder structure something like this: |-bin |-conf |-doc | \-paper |-experiments | \-2000-01-01-example | |-audit | |-bin | |-conf | |-data | |-doc | |-lib | |-log | |-raw | |-results | |-run | \-tmp |-lib |-raw |-results \-src '''
Add comments in bootstrap script
Add comments in bootstrap script
Python
mit
pharmbio/sciluigi,pharmbio/sciluigi,samuell/sciluigi
# TODO: Implement! Add comments in bootstrap script
# TODO: Implement! ''' We want a folder structure something like this: |-bin |-conf |-doc | \-paper |-experiments | \-2000-01-01-example | |-audit | |-bin | |-conf | |-data | |-doc | |-lib | |-log | |-raw | |-results | |-run | \-tmp |-lib |-raw |-results \-src '''
<commit_before># TODO: Implement! <commit_msg>Add comments in bootstrap script<commit_after>
# TODO: Implement! ''' We want a folder structure something like this: |-bin |-conf |-doc | \-paper |-experiments | \-2000-01-01-example | |-audit | |-bin | |-conf | |-data | |-doc | |-lib | |-log | |-raw | |-results | |-run | \-tmp |-lib |-raw |-results \-src '''
# TODO: Implement! Add comments in bootstrap script# TODO: Implement! ''' We want a folder structure something like this: |-bin |-conf |-doc | \-paper |-experiments | \-2000-01-01-example | |-audit | |-bin | |-conf | |-data | |-doc | |-lib | |-log | |-raw | |-results | |-run | \-tmp |-lib |-raw ...
<commit_before># TODO: Implement! <commit_msg>Add comments in bootstrap script<commit_after># TODO: Implement! ''' We want a folder structure something like this: |-bin |-conf |-doc | \-paper |-experiments | \-2000-01-01-example | |-audit | |-bin | |-conf | |-data | |-doc | |-lib | |-log | |-raw | |...
75ff727cd29ae1b379c551f46217fa75bf0fb2bc
videoeditor.py
videoeditor.py
from moviepy.editor import * def bake_annotations(video_file, end_point, annotations): clip = VideoFileClip(video_file) composite_clips = [clip] #for annotation in annotations: # txt_clip = TextClip(annotation["text"], color="white", fontsize=70) # txt_clip = txt_clip.set_position(("center",...
from moviepy.editor import * def bake_annotations(video_file, end_point, annotations): clip = VideoFileClip(video_file) composite_clips = [clip] #for annotation in annotations: # txt_clip = TextClip(annotation["text"], color="white", fontsize=70) # txt_clip = txt_clip.set_position(("center",...
Make pause dependant on annotation text length
Make pause dependant on annotation text length
Python
mit
melonmanchan/achso-video-exporter,melonmanchan/achso-video-exporter
from moviepy.editor import * def bake_annotations(video_file, end_point, annotations): clip = VideoFileClip(video_file) composite_clips = [clip] #for annotation in annotations: # txt_clip = TextClip(annotation["text"], color="white", fontsize=70) # txt_clip = txt_clip.set_position(("center",...
from moviepy.editor import * def bake_annotations(video_file, end_point, annotations): clip = VideoFileClip(video_file) composite_clips = [clip] #for annotation in annotations: # txt_clip = TextClip(annotation["text"], color="white", fontsize=70) # txt_clip = txt_clip.set_position(("center",...
<commit_before>from moviepy.editor import * def bake_annotations(video_file, end_point, annotations): clip = VideoFileClip(video_file) composite_clips = [clip] #for annotation in annotations: # txt_clip = TextClip(annotation["text"], color="white", fontsize=70) # txt_clip = txt_clip.set_posi...
from moviepy.editor import * def bake_annotations(video_file, end_point, annotations): clip = VideoFileClip(video_file) composite_clips = [clip] #for annotation in annotations: # txt_clip = TextClip(annotation["text"], color="white", fontsize=70) # txt_clip = txt_clip.set_position(("center",...
from moviepy.editor import * def bake_annotations(video_file, end_point, annotations): clip = VideoFileClip(video_file) composite_clips = [clip] #for annotation in annotations: # txt_clip = TextClip(annotation["text"], color="white", fontsize=70) # txt_clip = txt_clip.set_position(("center",...
<commit_before>from moviepy.editor import * def bake_annotations(video_file, end_point, annotations): clip = VideoFileClip(video_file) composite_clips = [clip] #for annotation in annotations: # txt_clip = TextClip(annotation["text"], color="white", fontsize=70) # txt_clip = txt_clip.set_posi...
bb3019eed45b684739e7847b24d9999da12492c4
src/slack/monitor.py
src/slack/monitor.py
import logging import os from slackclient import SlackClient import logging logger = logging.getLogger(__name__) def get_message_info(event, bot_name): return event['channel'], event['user'], event['text'][len(bot_name) + 1:].strip() def reply(event, bot_name, client, repo): channel, user, message = get_me...
import logging import os import time from slackclient import SlackClient import logging logger = logging.getLogger(__name__) def get_message_info(event, bot_name): return event['channel'], event['user'], event['text'][len(bot_name) + 1:].strip() def reply(event, bot_name, client, repo): channel, user, mess...
Add sleep step and logging to bot integration
Add sleep step and logging to bot integration
Python
mit
baylesj/chopBot3000,baylesj/chopBot3000
import logging import os from slackclient import SlackClient import logging logger = logging.getLogger(__name__) def get_message_info(event, bot_name): return event['channel'], event['user'], event['text'][len(bot_name) + 1:].strip() def reply(event, bot_name, client, repo): channel, user, message = get_me...
import logging import os import time from slackclient import SlackClient import logging logger = logging.getLogger(__name__) def get_message_info(event, bot_name): return event['channel'], event['user'], event['text'][len(bot_name) + 1:].strip() def reply(event, bot_name, client, repo): channel, user, mess...
<commit_before>import logging import os from slackclient import SlackClient import logging logger = logging.getLogger(__name__) def get_message_info(event, bot_name): return event['channel'], event['user'], event['text'][len(bot_name) + 1:].strip() def reply(event, bot_name, client, repo): channel, user, m...
import logging import os import time from slackclient import SlackClient import logging logger = logging.getLogger(__name__) def get_message_info(event, bot_name): return event['channel'], event['user'], event['text'][len(bot_name) + 1:].strip() def reply(event, bot_name, client, repo): channel, user, mess...
import logging import os from slackclient import SlackClient import logging logger = logging.getLogger(__name__) def get_message_info(event, bot_name): return event['channel'], event['user'], event['text'][len(bot_name) + 1:].strip() def reply(event, bot_name, client, repo): channel, user, message = get_me...
<commit_before>import logging import os from slackclient import SlackClient import logging logger = logging.getLogger(__name__) def get_message_info(event, bot_name): return event['channel'], event['user'], event['text'][len(bot_name) + 1:].strip() def reply(event, bot_name, client, repo): channel, user, m...
412233eff937f64579827e7a7c64963d23a716fa
zipa/module.py
zipa/module.py
import sys from .magic import SelfWrapper def register_module(name): self = sys.modules['zipa'] sys.modules[name] = SelfWrapper(self) class ModuleImporter(object): def __init__(self, module_name): self.name = module_name def find_module(self, name, path=None): if name.startswith('{...
import sys from .magic import SelfWrapper def register_module(name): self = sys.modules['zipa'] sys.modules[name] = SelfWrapper(self) class ModuleImporter(object): def __init__(self, module_name): self.module = module_name + '.' def find_module(self, name, path=None): if name.start...
Make the logic more readable
Make the logic more readable
Python
apache-2.0
PressLabs/zipa
import sys from .magic import SelfWrapper def register_module(name): self = sys.modules['zipa'] sys.modules[name] = SelfWrapper(self) class ModuleImporter(object): def __init__(self, module_name): self.name = module_name def find_module(self, name, path=None): if name.startswith('{...
import sys from .magic import SelfWrapper def register_module(name): self = sys.modules['zipa'] sys.modules[name] = SelfWrapper(self) class ModuleImporter(object): def __init__(self, module_name): self.module = module_name + '.' def find_module(self, name, path=None): if name.start...
<commit_before>import sys from .magic import SelfWrapper def register_module(name): self = sys.modules['zipa'] sys.modules[name] = SelfWrapper(self) class ModuleImporter(object): def __init__(self, module_name): self.name = module_name def find_module(self, name, path=None): if nam...
import sys from .magic import SelfWrapper def register_module(name): self = sys.modules['zipa'] sys.modules[name] = SelfWrapper(self) class ModuleImporter(object): def __init__(self, module_name): self.module = module_name + '.' def find_module(self, name, path=None): if name.start...
import sys from .magic import SelfWrapper def register_module(name): self = sys.modules['zipa'] sys.modules[name] = SelfWrapper(self) class ModuleImporter(object): def __init__(self, module_name): self.name = module_name def find_module(self, name, path=None): if name.startswith('{...
<commit_before>import sys from .magic import SelfWrapper def register_module(name): self = sys.modules['zipa'] sys.modules[name] = SelfWrapper(self) class ModuleImporter(object): def __init__(self, module_name): self.name = module_name def find_module(self, name, path=None): if nam...
6aee1c51d2607047091280abb56d2956cebe1ebb
zvm/zstring.py
zvm/zstring.py
# # A ZString-to-ASCII Universal Translator. # # For the license of this file, please consult the LICENSE file in the # root directory of this distribution. # class ZStringEndOfString(Exception): """No more data left in string.""" class ZStringStream(object): """This class takes an address and a ZMemory, and ...
# # A ZString-to-ASCII Universal Translator. # # For the license of this file, please consult the LICENSE file in the # root directory of this distribution. # class ZStringEndOfString(Exception): """No more data left in string.""" class ZStringStream(object): """This class takes an address and a ZMemory, and ...
Make the string translator return the actual right values!
Make the string translator return the actual right values! * zvm/zstring.py: (ZStringStream._get_block): Remove debug printing. (ZStringStream.get): Make the offset calculations work on the correct bits of the data chunk. Remove debug printing.
Python
bsd-3-clause
sussman/zvm,sussman/zvm
# # A ZString-to-ASCII Universal Translator. # # For the license of this file, please consult the LICENSE file in the # root directory of this distribution. # class ZStringEndOfString(Exception): """No more data left in string.""" class ZStringStream(object): """This class takes an address and a ZMemory, and ...
# # A ZString-to-ASCII Universal Translator. # # For the license of this file, please consult the LICENSE file in the # root directory of this distribution. # class ZStringEndOfString(Exception): """No more data left in string.""" class ZStringStream(object): """This class takes an address and a ZMemory, and ...
<commit_before># # A ZString-to-ASCII Universal Translator. # # For the license of this file, please consult the LICENSE file in the # root directory of this distribution. # class ZStringEndOfString(Exception): """No more data left in string.""" class ZStringStream(object): """This class takes an address and ...
# # A ZString-to-ASCII Universal Translator. # # For the license of this file, please consult the LICENSE file in the # root directory of this distribution. # class ZStringEndOfString(Exception): """No more data left in string.""" class ZStringStream(object): """This class takes an address and a ZMemory, and ...
# # A ZString-to-ASCII Universal Translator. # # For the license of this file, please consult the LICENSE file in the # root directory of this distribution. # class ZStringEndOfString(Exception): """No more data left in string.""" class ZStringStream(object): """This class takes an address and a ZMemory, and ...
<commit_before># # A ZString-to-ASCII Universal Translator. # # For the license of this file, please consult the LICENSE file in the # root directory of this distribution. # class ZStringEndOfString(Exception): """No more data left in string.""" class ZStringStream(object): """This class takes an address and ...
2fcef274bb3ee23329fb523ec9b3d59266584fe9
runtests.py
runtests.py
import sys try: from django.conf import settings from django.test.utils import get_runner settings.configure( DEBUG=True, USE_TZ=True, DATABASES={ "default": { "ENGINE": "django.db.backends.sqlite3", "NAME": ":memory:", } ...
import sys try: from django.conf import settings from django.test.utils import get_runner settings.configure( DEBUG=True, USE_TZ=True, DATABASES={ "default": { "ENGINE": "django.db.backends.sqlite3", "NAME": ":memory:", } ...
Update file name in error message
Update file name in error message
Python
bsd-2-clause
pgollakota/django-chartit,pgollakota/django-chartit,pgollakota/django-chartit
import sys try: from django.conf import settings from django.test.utils import get_runner settings.configure( DEBUG=True, USE_TZ=True, DATABASES={ "default": { "ENGINE": "django.db.backends.sqlite3", "NAME": ":memory:", } ...
import sys try: from django.conf import settings from django.test.utils import get_runner settings.configure( DEBUG=True, USE_TZ=True, DATABASES={ "default": { "ENGINE": "django.db.backends.sqlite3", "NAME": ":memory:", } ...
<commit_before>import sys try: from django.conf import settings from django.test.utils import get_runner settings.configure( DEBUG=True, USE_TZ=True, DATABASES={ "default": { "ENGINE": "django.db.backends.sqlite3", "NAME": ":memory:", ...
import sys try: from django.conf import settings from django.test.utils import get_runner settings.configure( DEBUG=True, USE_TZ=True, DATABASES={ "default": { "ENGINE": "django.db.backends.sqlite3", "NAME": ":memory:", } ...
import sys try: from django.conf import settings from django.test.utils import get_runner settings.configure( DEBUG=True, USE_TZ=True, DATABASES={ "default": { "ENGINE": "django.db.backends.sqlite3", "NAME": ":memory:", } ...
<commit_before>import sys try: from django.conf import settings from django.test.utils import get_runner settings.configure( DEBUG=True, USE_TZ=True, DATABASES={ "default": { "ENGINE": "django.db.backends.sqlite3", "NAME": ":memory:", ...
16372a41a14ccb5ff7148bcb913864598f5be321
src/twitchHandler.py
src/twitchHandler.py
from twitch import TwitchClient class TwitchHandler: async def validateStream(url, twitch_id): client = TwitchClient(client_id=twitch_id) channelName = url.split('/')[-1] channels = client.search.channels(channelName) if channels: channel = channels[0] ...
from twitch import TwitchClient class TwitchHandler: async def validateStream(url, twitch_id): client = TwitchClient(client_id=twitch_id) channelName = url.split('/')[-1] channels = client.search.channels(channelName) if channels: for ch in channels: ...
Fix Bot Errors with Selecting Wrong Users
Fix Bot Errors with Selecting Wrong Users Also fix validation in case the zeroth user isn't correct, which is happening a bunch. Compare the names casefolded incase of mismatch in capitalization.
Python
mit
lgkern/PriestPy
from twitch import TwitchClient class TwitchHandler: async def validateStream(url, twitch_id): client = TwitchClient(client_id=twitch_id) channelName = url.split('/')[-1] channels = client.search.channels(channelName) if channels: channel = channels[0] ...
from twitch import TwitchClient class TwitchHandler: async def validateStream(url, twitch_id): client = TwitchClient(client_id=twitch_id) channelName = url.split('/')[-1] channels = client.search.channels(channelName) if channels: for ch in channels: ...
<commit_before>from twitch import TwitchClient class TwitchHandler: async def validateStream(url, twitch_id): client = TwitchClient(client_id=twitch_id) channelName = url.split('/')[-1] channels = client.search.channels(channelName) if channels: channel = chann...
from twitch import TwitchClient class TwitchHandler: async def validateStream(url, twitch_id): client = TwitchClient(client_id=twitch_id) channelName = url.split('/')[-1] channels = client.search.channels(channelName) if channels: for ch in channels: ...
from twitch import TwitchClient class TwitchHandler: async def validateStream(url, twitch_id): client = TwitchClient(client_id=twitch_id) channelName = url.split('/')[-1] channels = client.search.channels(channelName) if channels: channel = channels[0] ...
<commit_before>from twitch import TwitchClient class TwitchHandler: async def validateStream(url, twitch_id): client = TwitchClient(client_id=twitch_id) channelName = url.split('/')[-1] channels = client.search.channels(channelName) if channels: channel = chann...
a7a050f71901abfc9477e70b7fc3319cf17b078a
thefeeder/public_message_datatype.py
thefeeder/public_message_datatype.py
import collections import logging from datatypes.core import DictionaryValidator from datatypes.validators import geo_json_validator, entry_validator from voluptuous import All schema = { "title_number": All(str), "extent": geo_json_validator.geo_json_schema, "property_description": entry_validator.entry...
import collections import logging from datatypes.core import DictionaryValidator from datatypes.validators import geo_json_validator, entry_validator from voluptuous import All schema = { "title_number": All(str), "tenure" : All(str), "class_of_title" : All(str), "extent": geo_json_validator.geo_json...
Update public schema to include class_of_title and tenure
Update public schema to include class_of_title and tenure
Python
mit
LandRegistry/the-feeder-alpha,LandRegistry/the-feeder-alpha
import collections import logging from datatypes.core import DictionaryValidator from datatypes.validators import geo_json_validator, entry_validator from voluptuous import All schema = { "title_number": All(str), "extent": geo_json_validator.geo_json_schema, "property_description": entry_validator.entry...
import collections import logging from datatypes.core import DictionaryValidator from datatypes.validators import geo_json_validator, entry_validator from voluptuous import All schema = { "title_number": All(str), "tenure" : All(str), "class_of_title" : All(str), "extent": geo_json_validator.geo_json...
<commit_before>import collections import logging from datatypes.core import DictionaryValidator from datatypes.validators import geo_json_validator, entry_validator from voluptuous import All schema = { "title_number": All(str), "extent": geo_json_validator.geo_json_schema, "property_description": entry_...
import collections import logging from datatypes.core import DictionaryValidator from datatypes.validators import geo_json_validator, entry_validator from voluptuous import All schema = { "title_number": All(str), "tenure" : All(str), "class_of_title" : All(str), "extent": geo_json_validator.geo_json...
import collections import logging from datatypes.core import DictionaryValidator from datatypes.validators import geo_json_validator, entry_validator from voluptuous import All schema = { "title_number": All(str), "extent": geo_json_validator.geo_json_schema, "property_description": entry_validator.entry...
<commit_before>import collections import logging from datatypes.core import DictionaryValidator from datatypes.validators import geo_json_validator, entry_validator from voluptuous import All schema = { "title_number": All(str), "extent": geo_json_validator.geo_json_schema, "property_description": entry_...
9834830788bf9fe594bf4a4e67de36231fcd8990
stars/serializers.py
stars/serializers.py
from .models import Star from rest_framework import serializers class StarSerializer(serializers.ModelSerializer): class Meta: model = Star fields = ('pk', 'date', 'text', 'from_user', 'to_user', 'category', 'subcategory') class StarSmallSerializer(serializers.ModelSerializer): class Meta: ...
from .models import Star from employees.models import Employee from rest_framework import serializers class EmployeeSimpleSerializer(serializers.ModelSerializer): class Meta: model = Employee fields = ('pk', 'username', 'first_name', 'last_name') class StarSerializer(serializers.ModelSerializer)...
Add EmployeeSimpleSerializer in order to avoid publish sensitive user data such passwords and other related fields
Add EmployeeSimpleSerializer in order to avoid publish sensitive user data such passwords and other related fields
Python
apache-2.0
belatrix/BackendAllStars
from .models import Star from rest_framework import serializers class StarSerializer(serializers.ModelSerializer): class Meta: model = Star fields = ('pk', 'date', 'text', 'from_user', 'to_user', 'category', 'subcategory') class StarSmallSerializer(serializers.ModelSerializer): class Meta: ...
from .models import Star from employees.models import Employee from rest_framework import serializers class EmployeeSimpleSerializer(serializers.ModelSerializer): class Meta: model = Employee fields = ('pk', 'username', 'first_name', 'last_name') class StarSerializer(serializers.ModelSerializer)...
<commit_before>from .models import Star from rest_framework import serializers class StarSerializer(serializers.ModelSerializer): class Meta: model = Star fields = ('pk', 'date', 'text', 'from_user', 'to_user', 'category', 'subcategory') class StarSmallSerializer(serializers.ModelSerializer): ...
from .models import Star from employees.models import Employee from rest_framework import serializers class EmployeeSimpleSerializer(serializers.ModelSerializer): class Meta: model = Employee fields = ('pk', 'username', 'first_name', 'last_name') class StarSerializer(serializers.ModelSerializer)...
from .models import Star from rest_framework import serializers class StarSerializer(serializers.ModelSerializer): class Meta: model = Star fields = ('pk', 'date', 'text', 'from_user', 'to_user', 'category', 'subcategory') class StarSmallSerializer(serializers.ModelSerializer): class Meta: ...
<commit_before>from .models import Star from rest_framework import serializers class StarSerializer(serializers.ModelSerializer): class Meta: model = Star fields = ('pk', 'date', 'text', 'from_user', 'to_user', 'category', 'subcategory') class StarSmallSerializer(serializers.ModelSerializer): ...
a84f382055cc5443819694bc3ec58895bcbf57ca
pskb_website/utils.py
pskb_website/utils.py
import re from unicodedata import normalize _punct_re = re.compile(r'[\t !"#$%&\'()*\-/<=>?@\[\\\]^_`{|},.]+') # From http://flask.pocoo.org/snippets/5/ def slugify(text, delim=u'-'): """Generates an slightly worse ASCII-only slug.""" result = [] for word in _punct_re.split(text.lower()): word ...
import re from unicodedata import normalize _punct_re = re.compile(r'[\t !"#$%&\'()*\-/<=>?@\[\\\]^_`{|},.:]+') # From http://flask.pocoo.org/snippets/5/ def slugify(text, delim=u'-'): """Generates an slightly worse ASCII-only slug.""" result = [] for word in _punct_re.split(text.lower()): word...
Change ":" in titles to "-" for better SEO
Change ":" in titles to "-" for better SEO
Python
agpl-3.0
pluralsight/guides-cms,paulocheque/guides-cms,paulocheque/guides-cms,pluralsight/guides-cms,pluralsight/guides-cms,paulocheque/guides-cms
import re from unicodedata import normalize _punct_re = re.compile(r'[\t !"#$%&\'()*\-/<=>?@\[\\\]^_`{|},.]+') # From http://flask.pocoo.org/snippets/5/ def slugify(text, delim=u'-'): """Generates an slightly worse ASCII-only slug.""" result = [] for word in _punct_re.split(text.lower()): word ...
import re from unicodedata import normalize _punct_re = re.compile(r'[\t !"#$%&\'()*\-/<=>?@\[\\\]^_`{|},.:]+') # From http://flask.pocoo.org/snippets/5/ def slugify(text, delim=u'-'): """Generates an slightly worse ASCII-only slug.""" result = [] for word in _punct_re.split(text.lower()): word...
<commit_before>import re from unicodedata import normalize _punct_re = re.compile(r'[\t !"#$%&\'()*\-/<=>?@\[\\\]^_`{|},.]+') # From http://flask.pocoo.org/snippets/5/ def slugify(text, delim=u'-'): """Generates an slightly worse ASCII-only slug.""" result = [] for word in _punct_re.split(text.lower())...
import re from unicodedata import normalize _punct_re = re.compile(r'[\t !"#$%&\'()*\-/<=>?@\[\\\]^_`{|},.:]+') # From http://flask.pocoo.org/snippets/5/ def slugify(text, delim=u'-'): """Generates an slightly worse ASCII-only slug.""" result = [] for word in _punct_re.split(text.lower()): word...
import re from unicodedata import normalize _punct_re = re.compile(r'[\t !"#$%&\'()*\-/<=>?@\[\\\]^_`{|},.]+') # From http://flask.pocoo.org/snippets/5/ def slugify(text, delim=u'-'): """Generates an slightly worse ASCII-only slug.""" result = [] for word in _punct_re.split(text.lower()): word ...
<commit_before>import re from unicodedata import normalize _punct_re = re.compile(r'[\t !"#$%&\'()*\-/<=>?@\[\\\]^_`{|},.]+') # From http://flask.pocoo.org/snippets/5/ def slugify(text, delim=u'-'): """Generates an slightly worse ASCII-only slug.""" result = [] for word in _punct_re.split(text.lower())...
dcb2c6d3472282c7dde4522e68cf45c27cb46b37
tests/accounts/test_models.py
tests/accounts/test_models.py
import pytest from components.accounts.factories import EditorFactory from components.accounts.models import Editor pytestmark = pytest.mark.django_db class TestEditors: def test_factory(self): factory = EditorFactory() assert isinstance(factory, Editor) assert 'dancer' in factory.userna...
import pytest from components.accounts.factories import EditorFactory from components.accounts.models import Editor pytestmark = pytest.mark.django_db class TestEditors: def test_factory(self): factory = EditorFactory() assert isinstance(factory, Editor) assert 'dancer' in factory.userna...
Add a silly failing test.
Add a silly failing test.
Python
apache-2.0
hello-base/web,hello-base/web,hello-base/web,hello-base/web
import pytest from components.accounts.factories import EditorFactory from components.accounts.models import Editor pytestmark = pytest.mark.django_db class TestEditors: def test_factory(self): factory = EditorFactory() assert isinstance(factory, Editor) assert 'dancer' in factory.userna...
import pytest from components.accounts.factories import EditorFactory from components.accounts.models import Editor pytestmark = pytest.mark.django_db class TestEditors: def test_factory(self): factory = EditorFactory() assert isinstance(factory, Editor) assert 'dancer' in factory.userna...
<commit_before>import pytest from components.accounts.factories import EditorFactory from components.accounts.models import Editor pytestmark = pytest.mark.django_db class TestEditors: def test_factory(self): factory = EditorFactory() assert isinstance(factory, Editor) assert 'dancer' in...
import pytest from components.accounts.factories import EditorFactory from components.accounts.models import Editor pytestmark = pytest.mark.django_db class TestEditors: def test_factory(self): factory = EditorFactory() assert isinstance(factory, Editor) assert 'dancer' in factory.userna...
import pytest from components.accounts.factories import EditorFactory from components.accounts.models import Editor pytestmark = pytest.mark.django_db class TestEditors: def test_factory(self): factory = EditorFactory() assert isinstance(factory, Editor) assert 'dancer' in factory.userna...
<commit_before>import pytest from components.accounts.factories import EditorFactory from components.accounts.models import Editor pytestmark = pytest.mark.django_db class TestEditors: def test_factory(self): factory = EditorFactory() assert isinstance(factory, Editor) assert 'dancer' in...
e6a991b91587f0ef081114b0d15390f682563071
antfarm/base.py
antfarm/base.py
import logging log = logging.getLogger(__name__) from .request import Request class App(object): ''' Base Application class. Create an instance of this, passing configuration options, and use the resulting instance as your WSGI application callable. application = App(root_view=myview) You...
import logging log = logging.getLogger(__name__) from .request import Request class App(object): ''' Base Application class. Create an instance of this, passing configuration options, and use the resulting instance as your WSGI application callable. application = App(root_view=myview) You...
Update the app with all supplied config arguments
Update the app with all supplied config arguments
Python
mit
funkybob/antfarm
import logging log = logging.getLogger(__name__) from .request import Request class App(object): ''' Base Application class. Create an instance of this, passing configuration options, and use the resulting instance as your WSGI application callable. application = App(root_view=myview) You...
import logging log = logging.getLogger(__name__) from .request import Request class App(object): ''' Base Application class. Create an instance of this, passing configuration options, and use the resulting instance as your WSGI application callable. application = App(root_view=myview) You...
<commit_before> import logging log = logging.getLogger(__name__) from .request import Request class App(object): ''' Base Application class. Create an instance of this, passing configuration options, and use the resulting instance as your WSGI application callable. application = App(root_view=m...
import logging log = logging.getLogger(__name__) from .request import Request class App(object): ''' Base Application class. Create an instance of this, passing configuration options, and use the resulting instance as your WSGI application callable. application = App(root_view=myview) You...
import logging log = logging.getLogger(__name__) from .request import Request class App(object): ''' Base Application class. Create an instance of this, passing configuration options, and use the resulting instance as your WSGI application callable. application = App(root_view=myview) You...
<commit_before> import logging log = logging.getLogger(__name__) from .request import Request class App(object): ''' Base Application class. Create an instance of this, passing configuration options, and use the resulting instance as your WSGI application callable. application = App(root_view=m...
fc39c6afa49a312413468dfdffcc2de94bb7d78e
tests/test_runner.py
tests/test_runner.py
import unittest from mo.runner import Variable class TestVariable(unittest.TestCase): def test_default(self): v = Variable('name', {'default': 'default'}) self.assertEqual(v.value, 'default') self.assertEqual(str(v), 'default') def test_value(self): v = Variable('name', {'def...
import unittest from mo.runner import Task, Variable class TestVariable(unittest.TestCase): def test_default(self): v = Variable('name', {'default': 'default'}) self.assertEqual(v.value, 'default') self.assertEqual(str(v), 'default') def test_value(self): v = Variable('name',...
Add some more tests for tasks
Add some more tests for tasks
Python
mit
thomasleese/mo
import unittest from mo.runner import Variable class TestVariable(unittest.TestCase): def test_default(self): v = Variable('name', {'default': 'default'}) self.assertEqual(v.value, 'default') self.assertEqual(str(v), 'default') def test_value(self): v = Variable('name', {'def...
import unittest from mo.runner import Task, Variable class TestVariable(unittest.TestCase): def test_default(self): v = Variable('name', {'default': 'default'}) self.assertEqual(v.value, 'default') self.assertEqual(str(v), 'default') def test_value(self): v = Variable('name',...
<commit_before>import unittest from mo.runner import Variable class TestVariable(unittest.TestCase): def test_default(self): v = Variable('name', {'default': 'default'}) self.assertEqual(v.value, 'default') self.assertEqual(str(v), 'default') def test_value(self): v = Variabl...
import unittest from mo.runner import Task, Variable class TestVariable(unittest.TestCase): def test_default(self): v = Variable('name', {'default': 'default'}) self.assertEqual(v.value, 'default') self.assertEqual(str(v), 'default') def test_value(self): v = Variable('name',...
import unittest from mo.runner import Variable class TestVariable(unittest.TestCase): def test_default(self): v = Variable('name', {'default': 'default'}) self.assertEqual(v.value, 'default') self.assertEqual(str(v), 'default') def test_value(self): v = Variable('name', {'def...
<commit_before>import unittest from mo.runner import Variable class TestVariable(unittest.TestCase): def test_default(self): v = Variable('name', {'default': 'default'}) self.assertEqual(v.value, 'default') self.assertEqual(str(v), 'default') def test_value(self): v = Variabl...
fd36968474dbeba7e3d195e8b5ab12be7ff0eb87
src/misc/parse_tool_playbook_yaml.py
src/misc/parse_tool_playbook_yaml.py
#!/usr/bin/env python # -*- coding: utf-8 -*- import sys import os import argparse import re import yaml def get_revision_number(yaml_content, tool_name): for tool in yaml_content['tools']: if tool["name"] == tool_name: if tool.has_key("revision"): print tool["revision"][0] de...
#!/usr/bin/env python # -*- coding: utf-8 -*- import sys import os import argparse import re import yaml def get_revision_number(yaml_content, tool_name): for tool in yaml_content['tools']: if tool["name"] == tool_name: if tool.has_key("revisions"): print tool["revisions"][0] ...
Correct key for revision in tool playbook parser
Correct key for revision in tool playbook parser
Python
apache-2.0
ASaiM/framework,ASaiM/framework
#!/usr/bin/env python # -*- coding: utf-8 -*- import sys import os import argparse import re import yaml def get_revision_number(yaml_content, tool_name): for tool in yaml_content['tools']: if tool["name"] == tool_name: if tool.has_key("revision"): print tool["revision"][0] de...
#!/usr/bin/env python # -*- coding: utf-8 -*- import sys import os import argparse import re import yaml def get_revision_number(yaml_content, tool_name): for tool in yaml_content['tools']: if tool["name"] == tool_name: if tool.has_key("revisions"): print tool["revisions"][0] ...
<commit_before>#!/usr/bin/env python # -*- coding: utf-8 -*- import sys import os import argparse import re import yaml def get_revision_number(yaml_content, tool_name): for tool in yaml_content['tools']: if tool["name"] == tool_name: if tool.has_key("revision"): print tool["re...
#!/usr/bin/env python # -*- coding: utf-8 -*- import sys import os import argparse import re import yaml def get_revision_number(yaml_content, tool_name): for tool in yaml_content['tools']: if tool["name"] == tool_name: if tool.has_key("revisions"): print tool["revisions"][0] ...
#!/usr/bin/env python # -*- coding: utf-8 -*- import sys import os import argparse import re import yaml def get_revision_number(yaml_content, tool_name): for tool in yaml_content['tools']: if tool["name"] == tool_name: if tool.has_key("revision"): print tool["revision"][0] de...
<commit_before>#!/usr/bin/env python # -*- coding: utf-8 -*- import sys import os import argparse import re import yaml def get_revision_number(yaml_content, tool_name): for tool in yaml_content['tools']: if tool["name"] == tool_name: if tool.has_key("revision"): print tool["re...
5bb8d24d90b7e6fab72f4f4988ea3055d3250b7e
src/nodeconductor_assembly_waldur/invoices/serializers.py
src/nodeconductor_assembly_waldur/invoices/serializers.py
from rest_framework import serializers from . import models class OpenStackItemSerializer(serializers.HyperlinkedModelSerializer): class Meta(object): model = models.OpenStackItem fields = ('package_details', 'package', 'price', 'start', 'end') extra_kwargs = { 'package': {'lo...
from rest_framework import serializers from . import models class OpenStackItemSerializer(serializers.HyperlinkedModelSerializer): class Meta(object): model = models.OpenStackItem fields = ('package_details', 'package', 'price', 'start', 'end') extra_kwargs = { 'package': {'lo...
Remove redundant view_name variable in serializer
Remove redundant view_name variable in serializer - WAL-109
Python
mit
opennode/nodeconductor-assembly-waldur,opennode/waldur-mastermind,opennode/nodeconductor-assembly-waldur,opennode/waldur-mastermind,opennode/waldur-mastermind,opennode/nodeconductor-assembly-waldur,opennode/waldur-mastermind
from rest_framework import serializers from . import models class OpenStackItemSerializer(serializers.HyperlinkedModelSerializer): class Meta(object): model = models.OpenStackItem fields = ('package_details', 'package', 'price', 'start', 'end') extra_kwargs = { 'package': {'lo...
from rest_framework import serializers from . import models class OpenStackItemSerializer(serializers.HyperlinkedModelSerializer): class Meta(object): model = models.OpenStackItem fields = ('package_details', 'package', 'price', 'start', 'end') extra_kwargs = { 'package': {'lo...
<commit_before>from rest_framework import serializers from . import models class OpenStackItemSerializer(serializers.HyperlinkedModelSerializer): class Meta(object): model = models.OpenStackItem fields = ('package_details', 'package', 'price', 'start', 'end') extra_kwargs = { ...
from rest_framework import serializers from . import models class OpenStackItemSerializer(serializers.HyperlinkedModelSerializer): class Meta(object): model = models.OpenStackItem fields = ('package_details', 'package', 'price', 'start', 'end') extra_kwargs = { 'package': {'lo...
from rest_framework import serializers from . import models class OpenStackItemSerializer(serializers.HyperlinkedModelSerializer): class Meta(object): model = models.OpenStackItem fields = ('package_details', 'package', 'price', 'start', 'end') extra_kwargs = { 'package': {'lo...
<commit_before>from rest_framework import serializers from . import models class OpenStackItemSerializer(serializers.HyperlinkedModelSerializer): class Meta(object): model = models.OpenStackItem fields = ('package_details', 'package', 'price', 'start', 'end') extra_kwargs = { ...
608fc063e5b153b99b79cab2248b586db3ebda1f
tests/test_pybind11.py
tests/test_pybind11.py
import sys import os d = os.path.dirname(__file__) sys.path.append(os.path.join(d, '../')) import jtrace # para = jtrace.Paraboloid(0.0, 0.0) # print(para.A) # print(para.B) # vec = jtrace.Vec3() # print(vec.MagnitudeSquared()) # vec = jtrace.Vec3(1, 2, 3) # print(vec.MagnitudeSquared()) # unitvec = vec.UnitVec3() # p...
import sys import os import jtrace # para = jtrace.Paraboloid(0.0, 0.0) # print(para.A) # print(para.B) # vec = jtrace.Vec3() # print(vec.MagnitudeSquared()) # vec = jtrace.Vec3(1, 2, 3) # print(vec.MagnitudeSquared()) # unitvec = vec.UnitVec3() # print(unitvec.Magnitude()) # ray = jtrace.Ray(jtrace.Vec3(), jtrace.Vec...
Remove sys.path hacking from test
Remove sys.path hacking from test
Python
bsd-2-clause
jmeyers314/batoid,jmeyers314/jtrace,jmeyers314/batoid,jmeyers314/jtrace,jmeyers314/jtrace
import sys import os d = os.path.dirname(__file__) sys.path.append(os.path.join(d, '../')) import jtrace # para = jtrace.Paraboloid(0.0, 0.0) # print(para.A) # print(para.B) # vec = jtrace.Vec3() # print(vec.MagnitudeSquared()) # vec = jtrace.Vec3(1, 2, 3) # print(vec.MagnitudeSquared()) # unitvec = vec.UnitVec3() # p...
import sys import os import jtrace # para = jtrace.Paraboloid(0.0, 0.0) # print(para.A) # print(para.B) # vec = jtrace.Vec3() # print(vec.MagnitudeSquared()) # vec = jtrace.Vec3(1, 2, 3) # print(vec.MagnitudeSquared()) # unitvec = vec.UnitVec3() # print(unitvec.Magnitude()) # ray = jtrace.Ray(jtrace.Vec3(), jtrace.Vec...
<commit_before>import sys import os d = os.path.dirname(__file__) sys.path.append(os.path.join(d, '../')) import jtrace # para = jtrace.Paraboloid(0.0, 0.0) # print(para.A) # print(para.B) # vec = jtrace.Vec3() # print(vec.MagnitudeSquared()) # vec = jtrace.Vec3(1, 2, 3) # print(vec.MagnitudeSquared()) # unitvec = vec...
import sys import os import jtrace # para = jtrace.Paraboloid(0.0, 0.0) # print(para.A) # print(para.B) # vec = jtrace.Vec3() # print(vec.MagnitudeSquared()) # vec = jtrace.Vec3(1, 2, 3) # print(vec.MagnitudeSquared()) # unitvec = vec.UnitVec3() # print(unitvec.Magnitude()) # ray = jtrace.Ray(jtrace.Vec3(), jtrace.Vec...
import sys import os d = os.path.dirname(__file__) sys.path.append(os.path.join(d, '../')) import jtrace # para = jtrace.Paraboloid(0.0, 0.0) # print(para.A) # print(para.B) # vec = jtrace.Vec3() # print(vec.MagnitudeSquared()) # vec = jtrace.Vec3(1, 2, 3) # print(vec.MagnitudeSquared()) # unitvec = vec.UnitVec3() # p...
<commit_before>import sys import os d = os.path.dirname(__file__) sys.path.append(os.path.join(d, '../')) import jtrace # para = jtrace.Paraboloid(0.0, 0.0) # print(para.A) # print(para.B) # vec = jtrace.Vec3() # print(vec.MagnitudeSquared()) # vec = jtrace.Vec3(1, 2, 3) # print(vec.MagnitudeSquared()) # unitvec = vec...
bad9909ac1149063cf97fc03787c203a17308552
bqueryd/node.py
bqueryd/node.py
#!/srv/python/venv/bin/ipython -i import bqueryd import os import sys import logging import ConfigParser config = ConfigParser.RawConfigParser() config.read(['/etc/bqueryd.cfg', os.path.expanduser('~/.bqueryd.cfg')]) redis_url=config.get('Main', 'redis_url') if __name__ == '__main__': if '-v' in sys.argv: ...
#!/srv/python/venv/bin/ipython -i import bqueryd import os import sys import logging import ConfigParser config = ConfigParser.RawConfigParser() config.read(['/etc/bqueryd.cfg', os.path.expanduser('~/.bqueryd.cfg')]) redis_url=config.get('Main', 'redis_url') if __name__ == '__main__': if '-v' in sys.argv: ...
Use var named "rpc" and not "a"
Use var named "rpc" and not "a"
Python
bsd-3-clause
visualfabriq/bqueryd
#!/srv/python/venv/bin/ipython -i import bqueryd import os import sys import logging import ConfigParser config = ConfigParser.RawConfigParser() config.read(['/etc/bqueryd.cfg', os.path.expanduser('~/.bqueryd.cfg')]) redis_url=config.get('Main', 'redis_url') if __name__ == '__main__': if '-v' in sys.argv: ...
#!/srv/python/venv/bin/ipython -i import bqueryd import os import sys import logging import ConfigParser config = ConfigParser.RawConfigParser() config.read(['/etc/bqueryd.cfg', os.path.expanduser('~/.bqueryd.cfg')]) redis_url=config.get('Main', 'redis_url') if __name__ == '__main__': if '-v' in sys.argv: ...
<commit_before>#!/srv/python/venv/bin/ipython -i import bqueryd import os import sys import logging import ConfigParser config = ConfigParser.RawConfigParser() config.read(['/etc/bqueryd.cfg', os.path.expanduser('~/.bqueryd.cfg')]) redis_url=config.get('Main', 'redis_url') if __name__ == '__main__': if '-v' in s...
#!/srv/python/venv/bin/ipython -i import bqueryd import os import sys import logging import ConfigParser config = ConfigParser.RawConfigParser() config.read(['/etc/bqueryd.cfg', os.path.expanduser('~/.bqueryd.cfg')]) redis_url=config.get('Main', 'redis_url') if __name__ == '__main__': if '-v' in sys.argv: ...
#!/srv/python/venv/bin/ipython -i import bqueryd import os import sys import logging import ConfigParser config = ConfigParser.RawConfigParser() config.read(['/etc/bqueryd.cfg', os.path.expanduser('~/.bqueryd.cfg')]) redis_url=config.get('Main', 'redis_url') if __name__ == '__main__': if '-v' in sys.argv: ...
<commit_before>#!/srv/python/venv/bin/ipython -i import bqueryd import os import sys import logging import ConfigParser config = ConfigParser.RawConfigParser() config.read(['/etc/bqueryd.cfg', os.path.expanduser('~/.bqueryd.cfg')]) redis_url=config.get('Main', 'redis_url') if __name__ == '__main__': if '-v' in s...
69f5ee4a703a52d09799b0a9978cb35a05ab18c6
docs/cryptography-docs.py
docs/cryptography-docs.py
from docutils import nodes from sphinx.util.compat import Directive, make_admonition DANGER_MESSAGE = """ This is a "Hazardous Materials" module. You should **ONLY** use it if you're 100% absolutely sure that you know what you're doing because this module is full of land mines, dragons, and dinosaurs with laser guns...
from docutils import nodes from sphinx.util.compat import Directive, make_admonition DANGER_MESSAGE = """ This is a "Hazardous Materials" module. You should **ONLY** use it if you're 100% absolutely sure that you know what you're doing because this module is full of land mines, dragons, and dinosaurs with laser guns...
Fix latex compilation (needed for pdf on read the docs)
Fix latex compilation (needed for pdf on read the docs)
Python
bsd-3-clause
skeuomorf/cryptography,sholsapp/cryptography,Lukasa/cryptography,glyph/cryptography,glyph/cryptography,Hasimir/cryptography,sholsapp/cryptography,kimvais/cryptography,kimvais/cryptography,Lukasa/cryptography,dstufft/cryptography,dstufft/cryptography,Ayrx/cryptography,kimvais/cryptography,dstufft/cryptography,bwhmather/...
from docutils import nodes from sphinx.util.compat import Directive, make_admonition DANGER_MESSAGE = """ This is a "Hazardous Materials" module. You should **ONLY** use it if you're 100% absolutely sure that you know what you're doing because this module is full of land mines, dragons, and dinosaurs with laser guns...
from docutils import nodes from sphinx.util.compat import Directive, make_admonition DANGER_MESSAGE = """ This is a "Hazardous Materials" module. You should **ONLY** use it if you're 100% absolutely sure that you know what you're doing because this module is full of land mines, dragons, and dinosaurs with laser guns...
<commit_before>from docutils import nodes from sphinx.util.compat import Directive, make_admonition DANGER_MESSAGE = """ This is a "Hazardous Materials" module. You should **ONLY** use it if you're 100% absolutely sure that you know what you're doing because this module is full of land mines, dragons, and dinosaurs ...
from docutils import nodes from sphinx.util.compat import Directive, make_admonition DANGER_MESSAGE = """ This is a "Hazardous Materials" module. You should **ONLY** use it if you're 100% absolutely sure that you know what you're doing because this module is full of land mines, dragons, and dinosaurs with laser guns...
from docutils import nodes from sphinx.util.compat import Directive, make_admonition DANGER_MESSAGE = """ This is a "Hazardous Materials" module. You should **ONLY** use it if you're 100% absolutely sure that you know what you're doing because this module is full of land mines, dragons, and dinosaurs with laser guns...
<commit_before>from docutils import nodes from sphinx.util.compat import Directive, make_admonition DANGER_MESSAGE = """ This is a "Hazardous Materials" module. You should **ONLY** use it if you're 100% absolutely sure that you know what you're doing because this module is full of land mines, dragons, and dinosaurs ...
a8e42b122916696dbe63ddae3190502b296b47ec
label_response/__init__.py
label_response/__init__.py
import json def check_labels(api): with open('config.json', 'r') as fd: config = json.load(fd) if not config['active']: return labels = config['labels'] for label, comment in labels.items(): if api.payload['label']['name'].lower() == label: api.post_comment(comment...
import json def check_labels(api, config): if not config.get('active'): return labels = config.get('labels', []) for label, comment in labels.items(): if api.payload['label']['name'].lower() == label: api.post_comment(comment) methods = [check_labels]
Support for multiple methods, and leave the config file to hooker
Support for multiple methods, and leave the config file to hooker
Python
mpl-2.0
servo-automation/highfive,servo-automation/highfive,servo-highfive/highfive
import json def check_labels(api): with open('config.json', 'r') as fd: config = json.load(fd) if not config['active']: return labels = config['labels'] for label, comment in labels.items(): if api.payload['label']['name'].lower() == label: api.post_comment(comment...
import json def check_labels(api, config): if not config.get('active'): return labels = config.get('labels', []) for label, comment in labels.items(): if api.payload['label']['name'].lower() == label: api.post_comment(comment) methods = [check_labels]
<commit_before>import json def check_labels(api): with open('config.json', 'r') as fd: config = json.load(fd) if not config['active']: return labels = config['labels'] for label, comment in labels.items(): if api.payload['label']['name'].lower() == label: api.post_...
import json def check_labels(api, config): if not config.get('active'): return labels = config.get('labels', []) for label, comment in labels.items(): if api.payload['label']['name'].lower() == label: api.post_comment(comment) methods = [check_labels]
import json def check_labels(api): with open('config.json', 'r') as fd: config = json.load(fd) if not config['active']: return labels = config['labels'] for label, comment in labels.items(): if api.payload['label']['name'].lower() == label: api.post_comment(comment...
<commit_before>import json def check_labels(api): with open('config.json', 'r') as fd: config = json.load(fd) if not config['active']: return labels = config['labels'] for label, comment in labels.items(): if api.payload['label']['name'].lower() == label: api.post_...
ecfdaee676fe6c0dd9609c944bc5f25b38e0ed05
validator/__init__.py
validator/__init__.py
__version__ = '1.10.76' class ValidationTimeout(Exception): """Validation has timed out. May be replaced by the exception type raised by an external timeout handler when run in a server environment.""" def __init__(self, timeout): self.timeout = timeout def __str__(self): return...
__version__ = '1.11.0' class ValidationTimeout(Exception): """Validation has timed out. May be replaced by the exception type raised by an external timeout handler when run in a server environment.""" def __init__(self, timeout): self.timeout = timeout def __str__(self): return ...
Prepare release 1.11.0. Note that this release deprecates the validator.
Prepare release 1.11.0. Note that this release deprecates the validator.
Python
bsd-3-clause
mozilla/amo-validator,mozilla/amo-validator,mozilla/amo-validator,mozilla/amo-validator
__version__ = '1.10.76' class ValidationTimeout(Exception): """Validation has timed out. May be replaced by the exception type raised by an external timeout handler when run in a server environment.""" def __init__(self, timeout): self.timeout = timeout def __str__(self): return...
__version__ = '1.11.0' class ValidationTimeout(Exception): """Validation has timed out. May be replaced by the exception type raised by an external timeout handler when run in a server environment.""" def __init__(self, timeout): self.timeout = timeout def __str__(self): return ...
<commit_before>__version__ = '1.10.76' class ValidationTimeout(Exception): """Validation has timed out. May be replaced by the exception type raised by an external timeout handler when run in a server environment.""" def __init__(self, timeout): self.timeout = timeout def __str__(self):...
__version__ = '1.11.0' class ValidationTimeout(Exception): """Validation has timed out. May be replaced by the exception type raised by an external timeout handler when run in a server environment.""" def __init__(self, timeout): self.timeout = timeout def __str__(self): return ...
__version__ = '1.10.76' class ValidationTimeout(Exception): """Validation has timed out. May be replaced by the exception type raised by an external timeout handler when run in a server environment.""" def __init__(self, timeout): self.timeout = timeout def __str__(self): return...
<commit_before>__version__ = '1.10.76' class ValidationTimeout(Exception): """Validation has timed out. May be replaced by the exception type raised by an external timeout handler when run in a server environment.""" def __init__(self, timeout): self.timeout = timeout def __str__(self):...
a01e924ccd80a11b2f5c59828c5395b92d9fd5a7
scripts/load_firebase.py
scripts/load_firebase.py
import argparse import requests import time DEFAULT_DEVICE = 0 DEFAULT_FILE = '../data/ECG_data.csv' def main(device=0, filename=DEFAULT_FILE): print("Loading firebase for device #%d" % device) with open(filename) as f: index = 0 count = 0 timestamp = int(time.time() * 1000) f...
import argparse import requests import time DEFAULT_DEVICE = 0 DEFAULT_FILE = '../data/ECG_data.csv' def main(device=0, filename=DEFAULT_FILE): print("Loading firebase for device #%d" % device) with open(filename) as f: index = 0 count = 0 timestamp = int(time.time() * 1000) f...
Update ID of device in load script
Update ID of device in load script
Python
mit
easyCZ/SLIP-A-2015,easyCZ/SLIP-A-2015,easyCZ/SLIP-A-2015,easyCZ/SLIP-A-2015,easyCZ/SLIP-A-2015,easyCZ/SLIP-A-2015
import argparse import requests import time DEFAULT_DEVICE = 0 DEFAULT_FILE = '../data/ECG_data.csv' def main(device=0, filename=DEFAULT_FILE): print("Loading firebase for device #%d" % device) with open(filename) as f: index = 0 count = 0 timestamp = int(time.time() * 1000) f...
import argparse import requests import time DEFAULT_DEVICE = 0 DEFAULT_FILE = '../data/ECG_data.csv' def main(device=0, filename=DEFAULT_FILE): print("Loading firebase for device #%d" % device) with open(filename) as f: index = 0 count = 0 timestamp = int(time.time() * 1000) f...
<commit_before>import argparse import requests import time DEFAULT_DEVICE = 0 DEFAULT_FILE = '../data/ECG_data.csv' def main(device=0, filename=DEFAULT_FILE): print("Loading firebase for device #%d" % device) with open(filename) as f: index = 0 count = 0 timestamp = int(time.time() * ...
import argparse import requests import time DEFAULT_DEVICE = 0 DEFAULT_FILE = '../data/ECG_data.csv' def main(device=0, filename=DEFAULT_FILE): print("Loading firebase for device #%d" % device) with open(filename) as f: index = 0 count = 0 timestamp = int(time.time() * 1000) f...
import argparse import requests import time DEFAULT_DEVICE = 0 DEFAULT_FILE = '../data/ECG_data.csv' def main(device=0, filename=DEFAULT_FILE): print("Loading firebase for device #%d" % device) with open(filename) as f: index = 0 count = 0 timestamp = int(time.time() * 1000) f...
<commit_before>import argparse import requests import time DEFAULT_DEVICE = 0 DEFAULT_FILE = '../data/ECG_data.csv' def main(device=0, filename=DEFAULT_FILE): print("Loading firebase for device #%d" % device) with open(filename) as f: index = 0 count = 0 timestamp = int(time.time() * ...
07096ba58e61580168c85dbcbecb107824096871
python/tutorial/example.py
python/tutorial/example.py
from matasano.util.byte_xor import byte_list_xor import sys if __name__ == "__main__": if len(sys.argv) != 2: print("Usage:\n\t python -m example.py <string to encrypt>") quit() input_str = sys.argv[1] # Convert string to list of bytes byte_list_input = [ord(c) for c in input_str] ...
from matasano.util.byte_xor import byte_list_xor import sys if __name__ == "__main__": if len(sys.argv) != 2: print("Usage:\n\t python -m example.py <string to encrypt>") quit() input_str = sys.argv[1] # Convert string to list of bytes byte_list_input = [ord(c) for c in input_str] ...
Change XOR to flip second last bit
Change XOR to flip second last bit Making change to cause merge conflict as an example.
Python
mit
TheLunchtimeAttack/matasano-challenges,TheLunchtimeAttack/matasano-challenges
from matasano.util.byte_xor import byte_list_xor import sys if __name__ == "__main__": if len(sys.argv) != 2: print("Usage:\n\t python -m example.py <string to encrypt>") quit() input_str = sys.argv[1] # Convert string to list of bytes byte_list_input = [ord(c) for c in input_str] ...
from matasano.util.byte_xor import byte_list_xor import sys if __name__ == "__main__": if len(sys.argv) != 2: print("Usage:\n\t python -m example.py <string to encrypt>") quit() input_str = sys.argv[1] # Convert string to list of bytes byte_list_input = [ord(c) for c in input_str] ...
<commit_before>from matasano.util.byte_xor import byte_list_xor import sys if __name__ == "__main__": if len(sys.argv) != 2: print("Usage:\n\t python -m example.py <string to encrypt>") quit() input_str = sys.argv[1] # Convert string to list of bytes byte_list_input = [ord(c) for c in...
from matasano.util.byte_xor import byte_list_xor import sys if __name__ == "__main__": if len(sys.argv) != 2: print("Usage:\n\t python -m example.py <string to encrypt>") quit() input_str = sys.argv[1] # Convert string to list of bytes byte_list_input = [ord(c) for c in input_str] ...
from matasano.util.byte_xor import byte_list_xor import sys if __name__ == "__main__": if len(sys.argv) != 2: print("Usage:\n\t python -m example.py <string to encrypt>") quit() input_str = sys.argv[1] # Convert string to list of bytes byte_list_input = [ord(c) for c in input_str] ...
<commit_before>from matasano.util.byte_xor import byte_list_xor import sys if __name__ == "__main__": if len(sys.argv) != 2: print("Usage:\n\t python -m example.py <string to encrypt>") quit() input_str = sys.argv[1] # Convert string to list of bytes byte_list_input = [ord(c) for c in...
be3e22f391e50bfdfb83f73382c392afc2fc9f1f
scripts/registrations.py
scripts/registrations.py
from competition.models import (Competition, RegistrationQuestion, RegistrationQuestionResponse) import csv import StringIO def run(): shirt = RegistrationQuestion.objects.filter(question__contains="shirt") for c in Competition.objects.all().order_by('start_time'): pri...
from competition.models import (Competition, RegistrationQuestion, RegistrationQuestionResponse) import csv import StringIO def run(): shirt = RegistrationQuestion.objects.filter(question__contains="shirt") for c in Competition.objects.all().order_by('start_time'): pri...
Add email address to registration script output
Add email address to registration script output
Python
bsd-3-clause
siggame/webserver,siggame/webserver,siggame/webserver
from competition.models import (Competition, RegistrationQuestion, RegistrationQuestionResponse) import csv import StringIO def run(): shirt = RegistrationQuestion.objects.filter(question__contains="shirt") for c in Competition.objects.all().order_by('start_time'): pri...
from competition.models import (Competition, RegistrationQuestion, RegistrationQuestionResponse) import csv import StringIO def run(): shirt = RegistrationQuestion.objects.filter(question__contains="shirt") for c in Competition.objects.all().order_by('start_time'): pri...
<commit_before>from competition.models import (Competition, RegistrationQuestion, RegistrationQuestionResponse) import csv import StringIO def run(): shirt = RegistrationQuestion.objects.filter(question__contains="shirt") for c in Competition.objects.all().order_by('start_time...
from competition.models import (Competition, RegistrationQuestion, RegistrationQuestionResponse) import csv import StringIO def run(): shirt = RegistrationQuestion.objects.filter(question__contains="shirt") for c in Competition.objects.all().order_by('start_time'): pri...
from competition.models import (Competition, RegistrationQuestion, RegistrationQuestionResponse) import csv import StringIO def run(): shirt = RegistrationQuestion.objects.filter(question__contains="shirt") for c in Competition.objects.all().order_by('start_time'): pri...
<commit_before>from competition.models import (Competition, RegistrationQuestion, RegistrationQuestionResponse) import csv import StringIO def run(): shirt = RegistrationQuestion.objects.filter(question__contains="shirt") for c in Competition.objects.all().order_by('start_time...
f2752572d915563ea5a3361dbb7a3fee08b04660
tests/test_mmstats.py
tests/test_mmstats.py
import mmstats def test_uint(): class MyStats(mmstats.MmStats): apples = mmstats.UIntStat() oranges = mmstats.UIntStat() mmst = MyStats() # Basic format assert mmst.mmap[0] == '\x01' assert mmst.mmap.find('applesL') != -1 assert mmst.mmap.find('orangesL') != -1 # Stat man...
import mmstats def test_uint(): class MyStats(mmstats.MmStats): zebras = mmstats.UIntStat() apples = mmstats.UIntStat() oranges = mmstats.UIntStat() mmst = MyStats() # Basic format assert mmst.mmap[0] == '\x01' assert mmst.mmap.find('applesL') != -1 assert mmst.mmap.fi...
Make basic test a bit more thorough
Make basic test a bit more thorough
Python
bsd-3-clause
schmichael/mmstats,schmichael/mmstats,schmichael/mmstats,schmichael/mmstats
import mmstats def test_uint(): class MyStats(mmstats.MmStats): apples = mmstats.UIntStat() oranges = mmstats.UIntStat() mmst = MyStats() # Basic format assert mmst.mmap[0] == '\x01' assert mmst.mmap.find('applesL') != -1 assert mmst.mmap.find('orangesL') != -1 # Stat man...
import mmstats def test_uint(): class MyStats(mmstats.MmStats): zebras = mmstats.UIntStat() apples = mmstats.UIntStat() oranges = mmstats.UIntStat() mmst = MyStats() # Basic format assert mmst.mmap[0] == '\x01' assert mmst.mmap.find('applesL') != -1 assert mmst.mmap.fi...
<commit_before>import mmstats def test_uint(): class MyStats(mmstats.MmStats): apples = mmstats.UIntStat() oranges = mmstats.UIntStat() mmst = MyStats() # Basic format assert mmst.mmap[0] == '\x01' assert mmst.mmap.find('applesL') != -1 assert mmst.mmap.find('orangesL') != -1 ...
import mmstats def test_uint(): class MyStats(mmstats.MmStats): zebras = mmstats.UIntStat() apples = mmstats.UIntStat() oranges = mmstats.UIntStat() mmst = MyStats() # Basic format assert mmst.mmap[0] == '\x01' assert mmst.mmap.find('applesL') != -1 assert mmst.mmap.fi...
import mmstats def test_uint(): class MyStats(mmstats.MmStats): apples = mmstats.UIntStat() oranges = mmstats.UIntStat() mmst = MyStats() # Basic format assert mmst.mmap[0] == '\x01' assert mmst.mmap.find('applesL') != -1 assert mmst.mmap.find('orangesL') != -1 # Stat man...
<commit_before>import mmstats def test_uint(): class MyStats(mmstats.MmStats): apples = mmstats.UIntStat() oranges = mmstats.UIntStat() mmst = MyStats() # Basic format assert mmst.mmap[0] == '\x01' assert mmst.mmap.find('applesL') != -1 assert mmst.mmap.find('orangesL') != -1 ...
18c287a9cfba6e06e1e41db5e23f57b58db64980
command_line/small_molecule.py
command_line/small_molecule.py
import sys from xia2_main import run if __name__ == '__main__': if 'small_molecule=true' not in sys.argv: sys.argv.insert(1, 'small_molecule=true') run()
from __future__ import division if __name__ == '__main__': import sys if 'small_molecule=true' not in sys.argv: sys.argv.insert(1, 'small_molecule=true') # clean up command-line so we know what was happening i.e. xia2.small_molecule # becomes xia2 small_molecule=true (and other things) but without repeatin...
Reduce redundancy in corrected command-line; replace dispatcher name with xia2 from xia2.small molecule for print out
Reduce redundancy in corrected command-line; replace dispatcher name with xia2 from xia2.small molecule for print out
Python
bsd-3-clause
xia2/xia2,xia2/xia2
import sys from xia2_main import run if __name__ == '__main__': if 'small_molecule=true' not in sys.argv: sys.argv.insert(1, 'small_molecule=true') run() Reduce redundancy in corrected command-line; replace dispatcher name with xia2 from xia2.small molecule for print out
from __future__ import division if __name__ == '__main__': import sys if 'small_molecule=true' not in sys.argv: sys.argv.insert(1, 'small_molecule=true') # clean up command-line so we know what was happening i.e. xia2.small_molecule # becomes xia2 small_molecule=true (and other things) but without repeatin...
<commit_before>import sys from xia2_main import run if __name__ == '__main__': if 'small_molecule=true' not in sys.argv: sys.argv.insert(1, 'small_molecule=true') run() <commit_msg>Reduce redundancy in corrected command-line; replace dispatcher name with xia2 from xia2.small molecule for print out<commit_after...
from __future__ import division if __name__ == '__main__': import sys if 'small_molecule=true' not in sys.argv: sys.argv.insert(1, 'small_molecule=true') # clean up command-line so we know what was happening i.e. xia2.small_molecule # becomes xia2 small_molecule=true (and other things) but without repeatin...
import sys from xia2_main import run if __name__ == '__main__': if 'small_molecule=true' not in sys.argv: sys.argv.insert(1, 'small_molecule=true') run() Reduce redundancy in corrected command-line; replace dispatcher name with xia2 from xia2.small molecule for print outfrom __future__ import division if __na...
<commit_before>import sys from xia2_main import run if __name__ == '__main__': if 'small_molecule=true' not in sys.argv: sys.argv.insert(1, 'small_molecule=true') run() <commit_msg>Reduce redundancy in corrected command-line; replace dispatcher name with xia2 from xia2.small molecule for print out<commit_after...
986675f8b415ddbe3d9bccc9d9c88ee00f9d589c
tldextract_app/handlers.py
tldextract_app/handlers.py
from cStringIO import StringIO import tldextract import web try: import json except ImportError: from django.utils import simplejson as json urls = ( '/api/extract', 'Extract', '/api/re', 'TheRegex', '/test', 'Test', ) class Extract: def GET(self): url = web.input(url='')....
from cStringIO import StringIO import tldextract import web try: import json except ImportError: from django.utils import simplejson as json urls = ( '/api/extract', 'Extract', '/api/re', 'TLDSet', '/test', 'Test', ) class Extract: def GET(self): url = web.input(url='').ur...
Fix viewing live TLD definitions on GAE
Fix viewing live TLD definitions on GAE
Python
bsd-3-clause
john-kurkowski/tldextract,jvrsantacruz/tldextract,TeamHG-Memex/tldextract,pombredanne/tldextract,jvanasco/tldextract
from cStringIO import StringIO import tldextract import web try: import json except ImportError: from django.utils import simplejson as json urls = ( '/api/extract', 'Extract', '/api/re', 'TheRegex', '/test', 'Test', ) class Extract: def GET(self): url = web.input(url='')....
from cStringIO import StringIO import tldextract import web try: import json except ImportError: from django.utils import simplejson as json urls = ( '/api/extract', 'Extract', '/api/re', 'TLDSet', '/test', 'Test', ) class Extract: def GET(self): url = web.input(url='').ur...
<commit_before>from cStringIO import StringIO import tldextract import web try: import json except ImportError: from django.utils import simplejson as json urls = ( '/api/extract', 'Extract', '/api/re', 'TheRegex', '/test', 'Test', ) class Extract: def GET(self): url = web...
from cStringIO import StringIO import tldextract import web try: import json except ImportError: from django.utils import simplejson as json urls = ( '/api/extract', 'Extract', '/api/re', 'TLDSet', '/test', 'Test', ) class Extract: def GET(self): url = web.input(url='').ur...
from cStringIO import StringIO import tldextract import web try: import json except ImportError: from django.utils import simplejson as json urls = ( '/api/extract', 'Extract', '/api/re', 'TheRegex', '/test', 'Test', ) class Extract: def GET(self): url = web.input(url='')....
<commit_before>from cStringIO import StringIO import tldextract import web try: import json except ImportError: from django.utils import simplejson as json urls = ( '/api/extract', 'Extract', '/api/re', 'TheRegex', '/test', 'Test', ) class Extract: def GET(self): url = web...
194449e880bf50cde799a1853474c8075e4cf5d4
derrida/__init__.py
derrida/__init__.py
__version_info__ = (1, 2, 0, None) # Dot-connect all but the last. Last is dash-connected if not None. __version__ = '.'.join([str(i) for i in __version_info__[:-1]]) if __version_info__[-1] is not None: __version__ += ('-%s' % (__version_info__[-1],)) # context processor to add version to the template environm...
__version_info__ = (1, 3, 0, 'dev') # Dot-connect all but the last. Last is dash-connected if not None. __version__ = '.'.join([str(i) for i in __version_info__[:-1]]) if __version_info__[-1] is not None: __version__ += ('-%s' % (__version_info__[-1],)) # context processor to add version to the template environ...
Set develop version to 1.3-dev
Set develop version to 1.3-dev
Python
apache-2.0
Princeton-CDH/derrida-django,Princeton-CDH/derrida-django,Princeton-CDH/derrida-django,Princeton-CDH/derrida-django
__version_info__ = (1, 2, 0, None) # Dot-connect all but the last. Last is dash-connected if not None. __version__ = '.'.join([str(i) for i in __version_info__[:-1]]) if __version_info__[-1] is not None: __version__ += ('-%s' % (__version_info__[-1],)) # context processor to add version to the template environm...
__version_info__ = (1, 3, 0, 'dev') # Dot-connect all but the last. Last is dash-connected if not None. __version__ = '.'.join([str(i) for i in __version_info__[:-1]]) if __version_info__[-1] is not None: __version__ += ('-%s' % (__version_info__[-1],)) # context processor to add version to the template environ...
<commit_before>__version_info__ = (1, 2, 0, None) # Dot-connect all but the last. Last is dash-connected if not None. __version__ = '.'.join([str(i) for i in __version_info__[:-1]]) if __version_info__[-1] is not None: __version__ += ('-%s' % (__version_info__[-1],)) # context processor to add version to the te...
__version_info__ = (1, 3, 0, 'dev') # Dot-connect all but the last. Last is dash-connected if not None. __version__ = '.'.join([str(i) for i in __version_info__[:-1]]) if __version_info__[-1] is not None: __version__ += ('-%s' % (__version_info__[-1],)) # context processor to add version to the template environ...
__version_info__ = (1, 2, 0, None) # Dot-connect all but the last. Last is dash-connected if not None. __version__ = '.'.join([str(i) for i in __version_info__[:-1]]) if __version_info__[-1] is not None: __version__ += ('-%s' % (__version_info__[-1],)) # context processor to add version to the template environm...
<commit_before>__version_info__ = (1, 2, 0, None) # Dot-connect all but the last. Last is dash-connected if not None. __version__ = '.'.join([str(i) for i in __version_info__[:-1]]) if __version_info__[-1] is not None: __version__ += ('-%s' % (__version_info__[-1],)) # context processor to add version to the te...
3fc765bad65e405f6303bf5ea76e8b4f6de17c13
Instanssi/admin_programme/forms.py
Instanssi/admin_programme/forms.py
# -*- coding: utf-8 -*- from django import forms from crispy_forms.helper import FormHelper from crispy_forms.layout import Submit, Layout, Fieldset, ButtonHolder from Instanssi.ext_programme.models import ProgrammeEvent class ProgrammeEventForm(forms.ModelForm): def __init__(self, *args, **kwargs): super...
# -*- coding: utf-8 -*- from django import forms from crispy_forms.helper import FormHelper from crispy_forms.layout import Submit, Layout, Fieldset, ButtonHolder from Instanssi.ext_programme.models import ProgrammeEvent class ProgrammeEventForm(forms.ModelForm): def __init__(self, *args, **kwargs): super...
Add active field to form.
admin_programme: Add active field to form.
Python
mit
Instanssi/Instanssi.org,Instanssi/Instanssi.org,Instanssi/Instanssi.org,Instanssi/Instanssi.org
# -*- coding: utf-8 -*- from django import forms from crispy_forms.helper import FormHelper from crispy_forms.layout import Submit, Layout, Fieldset, ButtonHolder from Instanssi.ext_programme.models import ProgrammeEvent class ProgrammeEventForm(forms.ModelForm): def __init__(self, *args, **kwargs): super...
# -*- coding: utf-8 -*- from django import forms from crispy_forms.helper import FormHelper from crispy_forms.layout import Submit, Layout, Fieldset, ButtonHolder from Instanssi.ext_programme.models import ProgrammeEvent class ProgrammeEventForm(forms.ModelForm): def __init__(self, *args, **kwargs): super...
<commit_before># -*- coding: utf-8 -*- from django import forms from crispy_forms.helper import FormHelper from crispy_forms.layout import Submit, Layout, Fieldset, ButtonHolder from Instanssi.ext_programme.models import ProgrammeEvent class ProgrammeEventForm(forms.ModelForm): def __init__(self, *args, **kwargs)...
# -*- coding: utf-8 -*- from django import forms from crispy_forms.helper import FormHelper from crispy_forms.layout import Submit, Layout, Fieldset, ButtonHolder from Instanssi.ext_programme.models import ProgrammeEvent class ProgrammeEventForm(forms.ModelForm): def __init__(self, *args, **kwargs): super...
# -*- coding: utf-8 -*- from django import forms from crispy_forms.helper import FormHelper from crispy_forms.layout import Submit, Layout, Fieldset, ButtonHolder from Instanssi.ext_programme.models import ProgrammeEvent class ProgrammeEventForm(forms.ModelForm): def __init__(self, *args, **kwargs): super...
<commit_before># -*- coding: utf-8 -*- from django import forms from crispy_forms.helper import FormHelper from crispy_forms.layout import Submit, Layout, Fieldset, ButtonHolder from Instanssi.ext_programme.models import ProgrammeEvent class ProgrammeEventForm(forms.ModelForm): def __init__(self, *args, **kwargs)...
f14107b723bcf62b327b10d8726b2bf8ef2031eb
tests/test_manifest_delivery_base.py
tests/test_manifest_delivery_base.py
import yaml from app.config import QueueNames def test_queue_names_set_in_manifest_delivery_base_correctly(): with open("manifest-delivery-base.yml", 'r') as stream: search = ' -Q ' yml_commands = [y['command'] for y in yaml.load(stream)['applications']] watched_queues = set() fo...
import yaml from app.config import QueueNames def test_queue_names_set_in_manifest_delivery_base_correctly(): with open("manifest-delivery-base.yml", 'r') as stream: search = ' -Q ' yml_commands = [y['command'] for y in yaml.load(stream)['applications']] watched_queues = set() fo...
Fix test that checks queues
Fix test that checks queues
Python
mit
alphagov/notifications-api,alphagov/notifications-api
import yaml from app.config import QueueNames def test_queue_names_set_in_manifest_delivery_base_correctly(): with open("manifest-delivery-base.yml", 'r') as stream: search = ' -Q ' yml_commands = [y['command'] for y in yaml.load(stream)['applications']] watched_queues = set() fo...
import yaml from app.config import QueueNames def test_queue_names_set_in_manifest_delivery_base_correctly(): with open("manifest-delivery-base.yml", 'r') as stream: search = ' -Q ' yml_commands = [y['command'] for y in yaml.load(stream)['applications']] watched_queues = set() fo...
<commit_before>import yaml from app.config import QueueNames def test_queue_names_set_in_manifest_delivery_base_correctly(): with open("manifest-delivery-base.yml", 'r') as stream: search = ' -Q ' yml_commands = [y['command'] for y in yaml.load(stream)['applications']] watched_queues = s...
import yaml from app.config import QueueNames def test_queue_names_set_in_manifest_delivery_base_correctly(): with open("manifest-delivery-base.yml", 'r') as stream: search = ' -Q ' yml_commands = [y['command'] for y in yaml.load(stream)['applications']] watched_queues = set() fo...
import yaml from app.config import QueueNames def test_queue_names_set_in_manifest_delivery_base_correctly(): with open("manifest-delivery-base.yml", 'r') as stream: search = ' -Q ' yml_commands = [y['command'] for y in yaml.load(stream)['applications']] watched_queues = set() fo...
<commit_before>import yaml from app.config import QueueNames def test_queue_names_set_in_manifest_delivery_base_correctly(): with open("manifest-delivery-base.yml", 'r') as stream: search = ' -Q ' yml_commands = [y['command'] for y in yaml.load(stream)['applications']] watched_queues = s...
e889b37d6db1ca29e874e11cdc122159fe9da136
trigrams.py
trigrams.py
# -*- coding: utf-8 -*- """Generate random story using trigrams.""" import io import string def read_file(): """Open and read file input.""" f = io.open('sherlock_small.txt', 'r') lines = ''.join(f.readlines()) print(lines) return lines def strip_punct(text): """Do stuff.""" # strip punc...
# -*- coding: utf-8 -*- """Generate random story using trigrams.""" import io import string def read_file(): """Open and read file input.""" f = io.open('sherlock_small.txt', 'r') lines = ''.join(f.readlines()) # print(lines) return lines def strip_punct(text): """Do stuff.""" # strip pu...
Add return statement to strip_punct
Add return statement to strip_punct
Python
mit
bgarnaat/401_trigrams
# -*- coding: utf-8 -*- """Generate random story using trigrams.""" import io import string def read_file(): """Open and read file input.""" f = io.open('sherlock_small.txt', 'r') lines = ''.join(f.readlines()) print(lines) return lines def strip_punct(text): """Do stuff.""" # strip punc...
# -*- coding: utf-8 -*- """Generate random story using trigrams.""" import io import string def read_file(): """Open and read file input.""" f = io.open('sherlock_small.txt', 'r') lines = ''.join(f.readlines()) # print(lines) return lines def strip_punct(text): """Do stuff.""" # strip pu...
<commit_before># -*- coding: utf-8 -*- """Generate random story using trigrams.""" import io import string def read_file(): """Open and read file input.""" f = io.open('sherlock_small.txt', 'r') lines = ''.join(f.readlines()) print(lines) return lines def strip_punct(text): """Do stuff.""" ...
# -*- coding: utf-8 -*- """Generate random story using trigrams.""" import io import string def read_file(): """Open and read file input.""" f = io.open('sherlock_small.txt', 'r') lines = ''.join(f.readlines()) # print(lines) return lines def strip_punct(text): """Do stuff.""" # strip pu...
# -*- coding: utf-8 -*- """Generate random story using trigrams.""" import io import string def read_file(): """Open and read file input.""" f = io.open('sherlock_small.txt', 'r') lines = ''.join(f.readlines()) print(lines) return lines def strip_punct(text): """Do stuff.""" # strip punc...
<commit_before># -*- coding: utf-8 -*- """Generate random story using trigrams.""" import io import string def read_file(): """Open and read file input.""" f = io.open('sherlock_small.txt', 'r') lines = ''.join(f.readlines()) print(lines) return lines def strip_punct(text): """Do stuff.""" ...
3375ac1b2f44a18db1b5014de72fe048005c954c
txircd/modules/cmd_pass.py
txircd/modules/cmd_pass.py
from twisted.words.protocols import irc from txircd.modbase import Command, Module class PassCommand(Command, Module): def onUse(self, user, params): if user.registered == 0: user.sendMessage(irc.ERR_ALREADYREGISTRED, ":Unauthorized command (already registered)") return if not params: user.sendMessage(ir...
from twisted.words.protocols import irc from txircd.modbase import Command, Module class PassCommand(Command, Module): def onUse(self, user, data): user.password = data["password"] def processParams(self, user, params): if user.registered == 0: user.sendMessage(irc.ERR_ALREADYREGISTRED, ":Unauthorized comma...
Make the PASS command take advantage of processParams and handle the data dict correctly
Make the PASS command take advantage of processParams and handle the data dict correctly
Python
bsd-3-clause
DesertBus/txircd,Heufneutje/txircd,ElementalAlchemist/txircd
from twisted.words.protocols import irc from txircd.modbase import Command, Module class PassCommand(Command, Module): def onUse(self, user, params): if user.registered == 0: user.sendMessage(irc.ERR_ALREADYREGISTRED, ":Unauthorized command (already registered)") return if not params: user.sendMessage(ir...
from twisted.words.protocols import irc from txircd.modbase import Command, Module class PassCommand(Command, Module): def onUse(self, user, data): user.password = data["password"] def processParams(self, user, params): if user.registered == 0: user.sendMessage(irc.ERR_ALREADYREGISTRED, ":Unauthorized comma...
<commit_before>from twisted.words.protocols import irc from txircd.modbase import Command, Module class PassCommand(Command, Module): def onUse(self, user, params): if user.registered == 0: user.sendMessage(irc.ERR_ALREADYREGISTRED, ":Unauthorized command (already registered)") return if not params: user...
from twisted.words.protocols import irc from txircd.modbase import Command, Module class PassCommand(Command, Module): def onUse(self, user, data): user.password = data["password"] def processParams(self, user, params): if user.registered == 0: user.sendMessage(irc.ERR_ALREADYREGISTRED, ":Unauthorized comma...
from twisted.words.protocols import irc from txircd.modbase import Command, Module class PassCommand(Command, Module): def onUse(self, user, params): if user.registered == 0: user.sendMessage(irc.ERR_ALREADYREGISTRED, ":Unauthorized command (already registered)") return if not params: user.sendMessage(ir...
<commit_before>from twisted.words.protocols import irc from txircd.modbase import Command, Module class PassCommand(Command, Module): def onUse(self, user, params): if user.registered == 0: user.sendMessage(irc.ERR_ALREADYREGISTRED, ":Unauthorized command (already registered)") return if not params: user...
ff62c68bf26898f6c432ea340d868c0eca005a31
APITaxi/documentation/examples.py
APITaxi/documentation/examples.py
# -*- coding: utf-8 -*- from flask import Blueprint, render_template, url_for as base_url_for from flask.ext.security import current_user from ..extensions import user_datastore from ..models.taxis import Taxi from functools import partial mod = Blueprint('examples', __name__) @mod.route('/documentation/examples') d...
# -*- coding: utf-8 -*- from flask import Blueprint, render_template, url_for as base_url_for from flask.ext.security import current_user from ..extensions import user_datastore from ..models.taxis import Taxi from functools import partial mod = Blueprint('examples', __name__) @mod.route('/documentation/examples') d...
Fix test for anonymity in documentation
Fix test for anonymity in documentation
Python
agpl-3.0
openmaraude/APITaxi,l-vincent-l/APITaxi,l-vincent-l/APITaxi,openmaraude/APITaxi
# -*- coding: utf-8 -*- from flask import Blueprint, render_template, url_for as base_url_for from flask.ext.security import current_user from ..extensions import user_datastore from ..models.taxis import Taxi from functools import partial mod = Blueprint('examples', __name__) @mod.route('/documentation/examples') d...
# -*- coding: utf-8 -*- from flask import Blueprint, render_template, url_for as base_url_for from flask.ext.security import current_user from ..extensions import user_datastore from ..models.taxis import Taxi from functools import partial mod = Blueprint('examples', __name__) @mod.route('/documentation/examples') d...
<commit_before># -*- coding: utf-8 -*- from flask import Blueprint, render_template, url_for as base_url_for from flask.ext.security import current_user from ..extensions import user_datastore from ..models.taxis import Taxi from functools import partial mod = Blueprint('examples', __name__) @mod.route('/documentati...
# -*- coding: utf-8 -*- from flask import Blueprint, render_template, url_for as base_url_for from flask.ext.security import current_user from ..extensions import user_datastore from ..models.taxis import Taxi from functools import partial mod = Blueprint('examples', __name__) @mod.route('/documentation/examples') d...
# -*- coding: utf-8 -*- from flask import Blueprint, render_template, url_for as base_url_for from flask.ext.security import current_user from ..extensions import user_datastore from ..models.taxis import Taxi from functools import partial mod = Blueprint('examples', __name__) @mod.route('/documentation/examples') d...
<commit_before># -*- coding: utf-8 -*- from flask import Blueprint, render_template, url_for as base_url_for from flask.ext.security import current_user from ..extensions import user_datastore from ..models.taxis import Taxi from functools import partial mod = Blueprint('examples', __name__) @mod.route('/documentati...
8bd94920eb508849851ea851554d05c7a16ee932
Source/Common/Experiments/scintilla_simple.py
Source/Common/Experiments/scintilla_simple.py
import wb_scintilla import sys from PyQt5 import QtWidgets from PyQt5 import QtGui from PyQt5 import QtCore app =QtWidgets.QApplication( sys.argv ) scintilla = wb_scintilla.WbScintilla( None ) for name in sorted( dir(scintilla) ): if name[0] != '_': print( name ) scintilla.insertText( 0, 'line 1\n' ) sc...
import wb_scintilla import sys from PyQt5 import QtWidgets from PyQt5 import QtGui from PyQt5 import QtCore app =QtWidgets.QApplication( sys.argv ) scintilla = wb_scintilla.WbScintilla( None ) if False: for name in sorted( dir(scintilla) ): if name[0] != '_': print( name ) scintilla.insertT...
Add indicator example to simple test.
Add indicator example to simple test.
Python
apache-2.0
barry-scott/scm-workbench,barry-scott/git-workbench,barry-scott/git-workbench,barry-scott/scm-workbench,barry-scott/scm-workbench
import wb_scintilla import sys from PyQt5 import QtWidgets from PyQt5 import QtGui from PyQt5 import QtCore app =QtWidgets.QApplication( sys.argv ) scintilla = wb_scintilla.WbScintilla( None ) for name in sorted( dir(scintilla) ): if name[0] != '_': print( name ) scintilla.insertText( 0, 'line 1\n' ) sc...
import wb_scintilla import sys from PyQt5 import QtWidgets from PyQt5 import QtGui from PyQt5 import QtCore app =QtWidgets.QApplication( sys.argv ) scintilla = wb_scintilla.WbScintilla( None ) if False: for name in sorted( dir(scintilla) ): if name[0] != '_': print( name ) scintilla.insertT...
<commit_before>import wb_scintilla import sys from PyQt5 import QtWidgets from PyQt5 import QtGui from PyQt5 import QtCore app =QtWidgets.QApplication( sys.argv ) scintilla = wb_scintilla.WbScintilla( None ) for name in sorted( dir(scintilla) ): if name[0] != '_': print( name ) scintilla.insertText( 0, ...
import wb_scintilla import sys from PyQt5 import QtWidgets from PyQt5 import QtGui from PyQt5 import QtCore app =QtWidgets.QApplication( sys.argv ) scintilla = wb_scintilla.WbScintilla( None ) if False: for name in sorted( dir(scintilla) ): if name[0] != '_': print( name ) scintilla.insertT...
import wb_scintilla import sys from PyQt5 import QtWidgets from PyQt5 import QtGui from PyQt5 import QtCore app =QtWidgets.QApplication( sys.argv ) scintilla = wb_scintilla.WbScintilla( None ) for name in sorted( dir(scintilla) ): if name[0] != '_': print( name ) scintilla.insertText( 0, 'line 1\n' ) sc...
<commit_before>import wb_scintilla import sys from PyQt5 import QtWidgets from PyQt5 import QtGui from PyQt5 import QtCore app =QtWidgets.QApplication( sys.argv ) scintilla = wb_scintilla.WbScintilla( None ) for name in sorted( dir(scintilla) ): if name[0] != '_': print( name ) scintilla.insertText( 0, ...
13ce6044fa2105ab4c543be0f72a4ba4faf1d890
src/billing/factories.py
src/billing/factories.py
import factory import random from billing.models import Billing, OrderBilling from member.factories import ClientFactory from order.factories import OrderFactory class BillingFactory(factory.DjangoModelFactory): class Meta: model = Billing client = factory.SubFactory(ClientFactory) total_amount...
import factory import random from billing.models import Billing, OrderBilling from member.factories import ClientFactory from order.factories import OrderFactory class BillingFactory(factory.DjangoModelFactory): class Meta: model = Billing client = factory.SubFactory(ClientFactory) total_amount...
Fix BillingOrder factory to properly set billing_id property
Fix BillingOrder factory to properly set billing_id property
Python
agpl-3.0
savoirfairelinux/sous-chef,savoirfairelinux/sous-chef,savoirfairelinux/santropol-feast,savoirfairelinux/sous-chef,savoirfairelinux/santropol-feast,madmath/sous-chef,madmath/sous-chef,savoirfairelinux/santropol-feast,madmath/sous-chef
import factory import random from billing.models import Billing, OrderBilling from member.factories import ClientFactory from order.factories import OrderFactory class BillingFactory(factory.DjangoModelFactory): class Meta: model = Billing client = factory.SubFactory(ClientFactory) total_amount...
import factory import random from billing.models import Billing, OrderBilling from member.factories import ClientFactory from order.factories import OrderFactory class BillingFactory(factory.DjangoModelFactory): class Meta: model = Billing client = factory.SubFactory(ClientFactory) total_amount...
<commit_before>import factory import random from billing.models import Billing, OrderBilling from member.factories import ClientFactory from order.factories import OrderFactory class BillingFactory(factory.DjangoModelFactory): class Meta: model = Billing client = factory.SubFactory(ClientFactory) ...
import factory import random from billing.models import Billing, OrderBilling from member.factories import ClientFactory from order.factories import OrderFactory class BillingFactory(factory.DjangoModelFactory): class Meta: model = Billing client = factory.SubFactory(ClientFactory) total_amount...
import factory import random from billing.models import Billing, OrderBilling from member.factories import ClientFactory from order.factories import OrderFactory class BillingFactory(factory.DjangoModelFactory): class Meta: model = Billing client = factory.SubFactory(ClientFactory) total_amount...
<commit_before>import factory import random from billing.models import Billing, OrderBilling from member.factories import ClientFactory from order.factories import OrderFactory class BillingFactory(factory.DjangoModelFactory): class Meta: model = Billing client = factory.SubFactory(ClientFactory) ...
2168557dc088be1b991f7eb42dabac144e3add3b
src/ggrc/models/event.py
src/ggrc/models/event.py
# Copyright (C) 2017 Google Inc. # Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file> from ggrc import db from ggrc.models.mixins import Base class Event(Base, db.Model): __tablename__ = 'events' action = db.Column( db.Enum(u'POST', u'PUT', u'DELETE', u'BULK', u'GET'), null...
# Copyright (C) 2017 Google Inc. # Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file> from ggrc import db from ggrc.models.mixins import Base class Event(Base, db.Model): __tablename__ = 'events' action = db.Column( db.Enum(u'POST', u'PUT', u'DELETE', u'BULK', u'GET'), null...
Remove redundant index declaration from Event
Remove redundant index declaration from Event The updated at index is already declared in ChangeTracked mixin which is included in the Base mixin.
Python
apache-2.0
plamut/ggrc-core,VinnieJohns/ggrc-core,VinnieJohns/ggrc-core,selahssea/ggrc-core,selahssea/ggrc-core,VinnieJohns/ggrc-core,plamut/ggrc-core,plamut/ggrc-core,selahssea/ggrc-core,selahssea/ggrc-core,plamut/ggrc-core,VinnieJohns/ggrc-core
# Copyright (C) 2017 Google Inc. # Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file> from ggrc import db from ggrc.models.mixins import Base class Event(Base, db.Model): __tablename__ = 'events' action = db.Column( db.Enum(u'POST', u'PUT', u'DELETE', u'BULK', u'GET'), null...
# Copyright (C) 2017 Google Inc. # Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file> from ggrc import db from ggrc.models.mixins import Base class Event(Base, db.Model): __tablename__ = 'events' action = db.Column( db.Enum(u'POST', u'PUT', u'DELETE', u'BULK', u'GET'), null...
<commit_before># Copyright (C) 2017 Google Inc. # Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file> from ggrc import db from ggrc.models.mixins import Base class Event(Base, db.Model): __tablename__ = 'events' action = db.Column( db.Enum(u'POST', u'PUT', u'DELETE', u'BULK', u'GE...
# Copyright (C) 2017 Google Inc. # Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file> from ggrc import db from ggrc.models.mixins import Base class Event(Base, db.Model): __tablename__ = 'events' action = db.Column( db.Enum(u'POST', u'PUT', u'DELETE', u'BULK', u'GET'), null...
# Copyright (C) 2017 Google Inc. # Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file> from ggrc import db from ggrc.models.mixins import Base class Event(Base, db.Model): __tablename__ = 'events' action = db.Column( db.Enum(u'POST', u'PUT', u'DELETE', u'BULK', u'GET'), null...
<commit_before># Copyright (C) 2017 Google Inc. # Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file> from ggrc import db from ggrc.models.mixins import Base class Event(Base, db.Model): __tablename__ = 'events' action = db.Column( db.Enum(u'POST', u'PUT', u'DELETE', u'BULK', u'GE...
fe11cc39e394d44f06b743d5b967625b6d12575f
api/parsers/datanasa.py
api/parsers/datanasa.py
import json from flaskext.mongoalchemy import BaseQuery import requests from api import app from api import db ENDPOINT = 'http://data.nasa.gov/api/' class DatasetQuery(BaseQuery): def get_by_remote_id(self, pk): return self.filter(self.type.remote_id==pk) class Dataset(db.Document): """ Represen...
import json from flaskext.mongoalchemy import BaseQuery import requests from api import app from api import db ENDPOINT = 'http://data.nasa.gov/api/' class DatasetQuery(BaseQuery): def get_by_remote_id(self, pk): return self.filter(self.type.remote_id==pk).first() def get_by_slug(self, slug): ...
Add slug to the db and allow querying it
Add slug to the db and allow querying it
Python
mit
oxford-space-apps/open-data-api
import json from flaskext.mongoalchemy import BaseQuery import requests from api import app from api import db ENDPOINT = 'http://data.nasa.gov/api/' class DatasetQuery(BaseQuery): def get_by_remote_id(self, pk): return self.filter(self.type.remote_id==pk) class Dataset(db.Document): """ Represen...
import json from flaskext.mongoalchemy import BaseQuery import requests from api import app from api import db ENDPOINT = 'http://data.nasa.gov/api/' class DatasetQuery(BaseQuery): def get_by_remote_id(self, pk): return self.filter(self.type.remote_id==pk).first() def get_by_slug(self, slug): ...
<commit_before>import json from flaskext.mongoalchemy import BaseQuery import requests from api import app from api import db ENDPOINT = 'http://data.nasa.gov/api/' class DatasetQuery(BaseQuery): def get_by_remote_id(self, pk): return self.filter(self.type.remote_id==pk) class Dataset(db.Document): ...
import json from flaskext.mongoalchemy import BaseQuery import requests from api import app from api import db ENDPOINT = 'http://data.nasa.gov/api/' class DatasetQuery(BaseQuery): def get_by_remote_id(self, pk): return self.filter(self.type.remote_id==pk).first() def get_by_slug(self, slug): ...
import json from flaskext.mongoalchemy import BaseQuery import requests from api import app from api import db ENDPOINT = 'http://data.nasa.gov/api/' class DatasetQuery(BaseQuery): def get_by_remote_id(self, pk): return self.filter(self.type.remote_id==pk) class Dataset(db.Document): """ Represen...
<commit_before>import json from flaskext.mongoalchemy import BaseQuery import requests from api import app from api import db ENDPOINT = 'http://data.nasa.gov/api/' class DatasetQuery(BaseQuery): def get_by_remote_id(self, pk): return self.filter(self.type.remote_id==pk) class Dataset(db.Document): ...
3193eead48f0aeb2bb46fa6cce64a959ae19cece
web/imgtl/template.py
web/imgtl/template.py
#!/usr/bin/env python # -*- coding: utf-8 -*- import re from jinja2 import evalcontextfilter, Markup, escape RE_NL2BR = re.compile(r'(\\r)?\\n', re.UNICODE | re.MULTILINE) @evalcontextfilter def jinja2_filter_nl2br(eval_ctx, value): res = RE_NL2BR.sub('<br>\n', unicode(escape(value))) if eval_ctx.autoescape...
#!/usr/bin/env python # -*- coding: utf-8 -*- import re from jinja2 import evalcontextfilter, Markup, escape RE_NL2BR = re.compile(r'(\r)?\n', re.UNICODE | re.MULTILINE) @evalcontextfilter def jinja2_filter_nl2br(eval_ctx, value): res = RE_NL2BR.sub('<br>\n', unicode(escape(value))) if eval_ctx.autoescape: ...
Fix newline not processed problem
Fix newline not processed problem
Python
mit
revi/imgtl,imgtl/imgtl,revi/imgtl,imgtl/imgtl,revi/imgtl
#!/usr/bin/env python # -*- coding: utf-8 -*- import re from jinja2 import evalcontextfilter, Markup, escape RE_NL2BR = re.compile(r'(\\r)?\\n', re.UNICODE | re.MULTILINE) @evalcontextfilter def jinja2_filter_nl2br(eval_ctx, value): res = RE_NL2BR.sub('<br>\n', unicode(escape(value))) if eval_ctx.autoescape...
#!/usr/bin/env python # -*- coding: utf-8 -*- import re from jinja2 import evalcontextfilter, Markup, escape RE_NL2BR = re.compile(r'(\r)?\n', re.UNICODE | re.MULTILINE) @evalcontextfilter def jinja2_filter_nl2br(eval_ctx, value): res = RE_NL2BR.sub('<br>\n', unicode(escape(value))) if eval_ctx.autoescape: ...
<commit_before>#!/usr/bin/env python # -*- coding: utf-8 -*- import re from jinja2 import evalcontextfilter, Markup, escape RE_NL2BR = re.compile(r'(\\r)?\\n', re.UNICODE | re.MULTILINE) @evalcontextfilter def jinja2_filter_nl2br(eval_ctx, value): res = RE_NL2BR.sub('<br>\n', unicode(escape(value))) if eval...
#!/usr/bin/env python # -*- coding: utf-8 -*- import re from jinja2 import evalcontextfilter, Markup, escape RE_NL2BR = re.compile(r'(\r)?\n', re.UNICODE | re.MULTILINE) @evalcontextfilter def jinja2_filter_nl2br(eval_ctx, value): res = RE_NL2BR.sub('<br>\n', unicode(escape(value))) if eval_ctx.autoescape: ...
#!/usr/bin/env python # -*- coding: utf-8 -*- import re from jinja2 import evalcontextfilter, Markup, escape RE_NL2BR = re.compile(r'(\\r)?\\n', re.UNICODE | re.MULTILINE) @evalcontextfilter def jinja2_filter_nl2br(eval_ctx, value): res = RE_NL2BR.sub('<br>\n', unicode(escape(value))) if eval_ctx.autoescape...
<commit_before>#!/usr/bin/env python # -*- coding: utf-8 -*- import re from jinja2 import evalcontextfilter, Markup, escape RE_NL2BR = re.compile(r'(\\r)?\\n', re.UNICODE | re.MULTILINE) @evalcontextfilter def jinja2_filter_nl2br(eval_ctx, value): res = RE_NL2BR.sub('<br>\n', unicode(escape(value))) if eval...
56e6ab84025f071c04701d3dc736b68e82361139
apitestcase/testcase.py
apitestcase/testcase.py
import types import unittest import requests class TestCase(object): """ Add assetion methods for HTTP Requests to TestCase """ hosts = [] def assertGet(self, endpoint="", status_code=200, body=""): """ Asserts GET requests on a given endpoint """ for host in self...
import unittest import requests class TestCase(object): """ Add assetion methods for HTTP Requests to TestCase """ hosts = [] def assertGet(self, endpoint="", status_code=200, body=""): """ Asserts GET requests on a given endpoint """ for host in self.hosts: ...
Change assertGet body check from StringType to str
Change assertGet body check from StringType to str
Python
mit
bramwelt/apitestcase
import types import unittest import requests class TestCase(object): """ Add assetion methods for HTTP Requests to TestCase """ hosts = [] def assertGet(self, endpoint="", status_code=200, body=""): """ Asserts GET requests on a given endpoint """ for host in self...
import unittest import requests class TestCase(object): """ Add assetion methods for HTTP Requests to TestCase """ hosts = [] def assertGet(self, endpoint="", status_code=200, body=""): """ Asserts GET requests on a given endpoint """ for host in self.hosts: ...
<commit_before>import types import unittest import requests class TestCase(object): """ Add assetion methods for HTTP Requests to TestCase """ hosts = [] def assertGet(self, endpoint="", status_code=200, body=""): """ Asserts GET requests on a given endpoint """ f...
import unittest import requests class TestCase(object): """ Add assetion methods for HTTP Requests to TestCase """ hosts = [] def assertGet(self, endpoint="", status_code=200, body=""): """ Asserts GET requests on a given endpoint """ for host in self.hosts: ...
import types import unittest import requests class TestCase(object): """ Add assetion methods for HTTP Requests to TestCase """ hosts = [] def assertGet(self, endpoint="", status_code=200, body=""): """ Asserts GET requests on a given endpoint """ for host in self...
<commit_before>import types import unittest import requests class TestCase(object): """ Add assetion methods for HTTP Requests to TestCase """ hosts = [] def assertGet(self, endpoint="", status_code=200, body=""): """ Asserts GET requests on a given endpoint """ f...
8126e8951ced9462afce1964cb4f256fabcc05a9
tests/test__utils.py
tests/test__utils.py
#!/usr/bin/env python # -*- coding: utf-8 -*- from __future__ import absolute_import import pytest import numpy as np import dask_distance._utils def test__bool_cmp_mtx_cnt(): u = np.array([0, 0, 0, 1, 1, 1, 1, 1, 1, 1], dtype=bool) v = np.array([0, 1, 1, 0, 0, 0, 1, 1, 1, 1], dtype=bool) uv_cmp_mtx...
#!/usr/bin/env python # -*- coding: utf-8 -*- from __future__ import absolute_import import pytest import numpy as np import dask_distance._utils @pytest.mark.parametrize("et, u, v", [ (ValueError, np.zeros((2,), dtype=bool), np.zeros((3,), dtype=bool)), ]) def test__bool_cmp_mtx_cnt_err(et, u, v): with ...
Test mismatched array lengths error in utils
Test mismatched array lengths error in utils Adds a test for `_bool_cmp_mtx_cnt` to make sure that if two arrays are provided with two different lengths that it will raise a `ValueError`.
Python
bsd-3-clause
jakirkham/dask-distance
#!/usr/bin/env python # -*- coding: utf-8 -*- from __future__ import absolute_import import pytest import numpy as np import dask_distance._utils def test__bool_cmp_mtx_cnt(): u = np.array([0, 0, 0, 1, 1, 1, 1, 1, 1, 1], dtype=bool) v = np.array([0, 1, 1, 0, 0, 0, 1, 1, 1, 1], dtype=bool) uv_cmp_mtx...
#!/usr/bin/env python # -*- coding: utf-8 -*- from __future__ import absolute_import import pytest import numpy as np import dask_distance._utils @pytest.mark.parametrize("et, u, v", [ (ValueError, np.zeros((2,), dtype=bool), np.zeros((3,), dtype=bool)), ]) def test__bool_cmp_mtx_cnt_err(et, u, v): with ...
<commit_before>#!/usr/bin/env python # -*- coding: utf-8 -*- from __future__ import absolute_import import pytest import numpy as np import dask_distance._utils def test__bool_cmp_mtx_cnt(): u = np.array([0, 0, 0, 1, 1, 1, 1, 1, 1, 1], dtype=bool) v = np.array([0, 1, 1, 0, 0, 0, 1, 1, 1, 1], dtype=bool) ...
#!/usr/bin/env python # -*- coding: utf-8 -*- from __future__ import absolute_import import pytest import numpy as np import dask_distance._utils @pytest.mark.parametrize("et, u, v", [ (ValueError, np.zeros((2,), dtype=bool), np.zeros((3,), dtype=bool)), ]) def test__bool_cmp_mtx_cnt_err(et, u, v): with ...
#!/usr/bin/env python # -*- coding: utf-8 -*- from __future__ import absolute_import import pytest import numpy as np import dask_distance._utils def test__bool_cmp_mtx_cnt(): u = np.array([0, 0, 0, 1, 1, 1, 1, 1, 1, 1], dtype=bool) v = np.array([0, 1, 1, 0, 0, 0, 1, 1, 1, 1], dtype=bool) uv_cmp_mtx...
<commit_before>#!/usr/bin/env python # -*- coding: utf-8 -*- from __future__ import absolute_import import pytest import numpy as np import dask_distance._utils def test__bool_cmp_mtx_cnt(): u = np.array([0, 0, 0, 1, 1, 1, 1, 1, 1, 1], dtype=bool) v = np.array([0, 1, 1, 0, 0, 0, 1, 1, 1, 1], dtype=bool) ...
2313e2aae705481df5d7ea6c09fcf5e4eaa80cf7
tests/test_client.py
tests/test_client.py
import pytest from aiohttp_json_rpc.client import JsonRpcClient pytestmark = pytest.mark.asyncio(reason='Depends on asyncio') async def test_client_autoconnect(rpc_context): async def ping(request): return 'pong' rpc_context.rpc.add_methods( ('', ping), ) client = JsonRpcClient( ...
import pytest from aiohttp_json_rpc.client import JsonRpcClient pytestmark = pytest.mark.asyncio(reason='Depends on asyncio') async def test_client_connect_disconnect(rpc_context): async def ping(request): return 'pong' rpc_context.rpc.add_methods( ('', ping), ) client = JsonRpcCl...
Add test for client connect/disconnect methods
Add test for client connect/disconnect methods
Python
apache-2.0
pengutronix/aiohttp-json-rpc,pengutronix/aiohttp-json-rpc,pengutronix/aiohttp-json-rpc
import pytest from aiohttp_json_rpc.client import JsonRpcClient pytestmark = pytest.mark.asyncio(reason='Depends on asyncio') async def test_client_autoconnect(rpc_context): async def ping(request): return 'pong' rpc_context.rpc.add_methods( ('', ping), ) client = JsonRpcClient( ...
import pytest from aiohttp_json_rpc.client import JsonRpcClient pytestmark = pytest.mark.asyncio(reason='Depends on asyncio') async def test_client_connect_disconnect(rpc_context): async def ping(request): return 'pong' rpc_context.rpc.add_methods( ('', ping), ) client = JsonRpcCl...
<commit_before>import pytest from aiohttp_json_rpc.client import JsonRpcClient pytestmark = pytest.mark.asyncio(reason='Depends on asyncio') async def test_client_autoconnect(rpc_context): async def ping(request): return 'pong' rpc_context.rpc.add_methods( ('', ping), ) client = J...
import pytest from aiohttp_json_rpc.client import JsonRpcClient pytestmark = pytest.mark.asyncio(reason='Depends on asyncio') async def test_client_connect_disconnect(rpc_context): async def ping(request): return 'pong' rpc_context.rpc.add_methods( ('', ping), ) client = JsonRpcCl...
import pytest from aiohttp_json_rpc.client import JsonRpcClient pytestmark = pytest.mark.asyncio(reason='Depends on asyncio') async def test_client_autoconnect(rpc_context): async def ping(request): return 'pong' rpc_context.rpc.add_methods( ('', ping), ) client = JsonRpcClient( ...
<commit_before>import pytest from aiohttp_json_rpc.client import JsonRpcClient pytestmark = pytest.mark.asyncio(reason='Depends on asyncio') async def test_client_autoconnect(rpc_context): async def ping(request): return 'pong' rpc_context.rpc.add_methods( ('', ping), ) client = J...
135b949eb33c75ba097aa17ade777bd39877365e
tests/test_flake8.py
tests/test_flake8.py
from subprocess import CalledProcessError, check_output as run FLAKE8_COMMAND = 'flake8' FLAKE8_INPUTS = [ 'skylines', 'tests' ] FLAKE8_EXCLUDES = [ 'geoid.py' ] def pytest_generate_tests(metafunc): metafunc.parametrize('folder', FLAKE8_INPUTS) def test_flake8(folder): """ Run skylines packag...
from subprocess import CalledProcessError, check_output as run FLAKE8_COMMAND = 'flake8' FLAKE8_INPUTS = [ 'skylines', 'tests' ] def pytest_generate_tests(metafunc): metafunc.parametrize('folder', FLAKE8_INPUTS) def test_flake8(folder): """ Run skylines package through flake8 """ try: ...
Revert "flake8: Ignore geoid.py issues"
Revert "flake8: Ignore geoid.py issues" This reverts commit a70cea27c37c1ced21d51b950f49d4987f501385.
Python
agpl-3.0
shadowoneau/skylines,skylines-project/skylines,RBE-Avionik/skylines,TobiasLohner/SkyLines,RBE-Avionik/skylines,kerel-fs/skylines,TobiasLohner/SkyLines,skylines-project/skylines,Harry-R/skylines,shadowoneau/skylines,Harry-R/skylines,snip/skylines,Turbo87/skylines,skylines-project/skylines,skylines-project/skylines,Turbo...
from subprocess import CalledProcessError, check_output as run FLAKE8_COMMAND = 'flake8' FLAKE8_INPUTS = [ 'skylines', 'tests' ] FLAKE8_EXCLUDES = [ 'geoid.py' ] def pytest_generate_tests(metafunc): metafunc.parametrize('folder', FLAKE8_INPUTS) def test_flake8(folder): """ Run skylines packag...
from subprocess import CalledProcessError, check_output as run FLAKE8_COMMAND = 'flake8' FLAKE8_INPUTS = [ 'skylines', 'tests' ] def pytest_generate_tests(metafunc): metafunc.parametrize('folder', FLAKE8_INPUTS) def test_flake8(folder): """ Run skylines package through flake8 """ try: ...
<commit_before>from subprocess import CalledProcessError, check_output as run FLAKE8_COMMAND = 'flake8' FLAKE8_INPUTS = [ 'skylines', 'tests' ] FLAKE8_EXCLUDES = [ 'geoid.py' ] def pytest_generate_tests(metafunc): metafunc.parametrize('folder', FLAKE8_INPUTS) def test_flake8(folder): """ Run ...
from subprocess import CalledProcessError, check_output as run FLAKE8_COMMAND = 'flake8' FLAKE8_INPUTS = [ 'skylines', 'tests' ] def pytest_generate_tests(metafunc): metafunc.parametrize('folder', FLAKE8_INPUTS) def test_flake8(folder): """ Run skylines package through flake8 """ try: ...
from subprocess import CalledProcessError, check_output as run FLAKE8_COMMAND = 'flake8' FLAKE8_INPUTS = [ 'skylines', 'tests' ] FLAKE8_EXCLUDES = [ 'geoid.py' ] def pytest_generate_tests(metafunc): metafunc.parametrize('folder', FLAKE8_INPUTS) def test_flake8(folder): """ Run skylines packag...
<commit_before>from subprocess import CalledProcessError, check_output as run FLAKE8_COMMAND = 'flake8' FLAKE8_INPUTS = [ 'skylines', 'tests' ] FLAKE8_EXCLUDES = [ 'geoid.py' ] def pytest_generate_tests(metafunc): metafunc.parametrize('folder', FLAKE8_INPUTS) def test_flake8(folder): """ Run ...
776fcbce9f23e799cd3101ddfa0bb966898d7064
tests/test_status.py
tests/test_status.py
import re import pkg_resources from pip import __version__ from pip.commands.status import search_packages_info from tests.test_pip import reset_env, run_pip def test_status(): """ Test end to end test for status command. """ dist = pkg_resources.get_distribution('pip') reset_env() result = ru...
import re import pkg_resources from pip import __version__ from pip.commands.status import search_packages_info from tests.test_pip import reset_env, run_pip def test_status(): """ Test end to end test for status command. """ dist = pkg_resources.get_distribution('pip') reset_env() result = r...
Test search for more than one distribution.
Test search for more than one distribution.
Python
mit
fiber-space/pip,qwcode/pip,msabramo/pip,blarghmatey/pip,jamezpolley/pip,jythontools/pip,ChristopherHogan/pip,rouge8/pip,rbtcollins/pip,qwcode/pip,nthall/pip,esc/pip,chaoallsome/pip,ianw/pip,jamezpolley/pip,jamezpolley/pip,pradyunsg/pip,KarelJakubec/pip,haridsv/pip,zorosteven/pip,fiber-space/pip,pfmoore/pip,h4ck3rm1k3/p...
import re import pkg_resources from pip import __version__ from pip.commands.status import search_packages_info from tests.test_pip import reset_env, run_pip def test_status(): """ Test end to end test for status command. """ dist = pkg_resources.get_distribution('pip') reset_env() result = ru...
import re import pkg_resources from pip import __version__ from pip.commands.status import search_packages_info from tests.test_pip import reset_env, run_pip def test_status(): """ Test end to end test for status command. """ dist = pkg_resources.get_distribution('pip') reset_env() result = r...
<commit_before>import re import pkg_resources from pip import __version__ from pip.commands.status import search_packages_info from tests.test_pip import reset_env, run_pip def test_status(): """ Test end to end test for status command. """ dist = pkg_resources.get_distribution('pip') reset_env() ...
import re import pkg_resources from pip import __version__ from pip.commands.status import search_packages_info from tests.test_pip import reset_env, run_pip def test_status(): """ Test end to end test for status command. """ dist = pkg_resources.get_distribution('pip') reset_env() result = r...
import re import pkg_resources from pip import __version__ from pip.commands.status import search_packages_info from tests.test_pip import reset_env, run_pip def test_status(): """ Test end to end test for status command. """ dist = pkg_resources.get_distribution('pip') reset_env() result = ru...
<commit_before>import re import pkg_resources from pip import __version__ from pip.commands.status import search_packages_info from tests.test_pip import reset_env, run_pip def test_status(): """ Test end to end test for status command. """ dist = pkg_resources.get_distribution('pip') reset_env() ...
f5373bb2153715c6d349d48890d9f03b1e24b847
backslash/contrib/keepalive_thread.py
backslash/contrib/keepalive_thread.py
import threading import logbook _logger = logbook.Logger(__name__) class KeepaliveThread(threading.Thread): def __init__(self, client, session, interval): super(KeepaliveThread, self).__init__() self._client = client self._session = session self._interval = interval / 2.0 ...
import threading import logbook _logger = logbook.Logger(__name__) class KeepaliveThread(threading.Thread): def __init__(self, client, session, interval): super(KeepaliveThread, self).__init__() self._client = client self._session = session self._interval = interval / 2.0 ...
Add debug logs to keepalive thread
Add debug logs to keepalive thread
Python
bsd-3-clause
vmalloc/backslash-python,slash-testing/backslash-python
import threading import logbook _logger = logbook.Logger(__name__) class KeepaliveThread(threading.Thread): def __init__(self, client, session, interval): super(KeepaliveThread, self).__init__() self._client = client self._session = session self._interval = interval / 2.0 ...
import threading import logbook _logger = logbook.Logger(__name__) class KeepaliveThread(threading.Thread): def __init__(self, client, session, interval): super(KeepaliveThread, self).__init__() self._client = client self._session = session self._interval = interval / 2.0 ...
<commit_before>import threading import logbook _logger = logbook.Logger(__name__) class KeepaliveThread(threading.Thread): def __init__(self, client, session, interval): super(KeepaliveThread, self).__init__() self._client = client self._session = session self._interval = interva...
import threading import logbook _logger = logbook.Logger(__name__) class KeepaliveThread(threading.Thread): def __init__(self, client, session, interval): super(KeepaliveThread, self).__init__() self._client = client self._session = session self._interval = interval / 2.0 ...
import threading import logbook _logger = logbook.Logger(__name__) class KeepaliveThread(threading.Thread): def __init__(self, client, session, interval): super(KeepaliveThread, self).__init__() self._client = client self._session = session self._interval = interval / 2.0 ...
<commit_before>import threading import logbook _logger = logbook.Logger(__name__) class KeepaliveThread(threading.Thread): def __init__(self, client, session, interval): super(KeepaliveThread, self).__init__() self._client = client self._session = session self._interval = interva...
2b9740d875faddc4b30835e5540e5aa7733e288e
apps/reactions/admin.py
apps/reactions/admin.py
from django.contrib import admin from django.utils.translation import ugettext_lazy as _ from .models import Reaction class ReactionAdmin(admin.ModelAdmin): fieldsets = ( (None, { 'fields': ('content_type', 'object_pk'), }), (_('Content'), { 'fields': ('author', 'ed...
from django.contrib import admin from django.utils.translation import ugettext_lazy as _ from .models import Reaction class ReactionAdmin(admin.ModelAdmin): fieldsets = ( (None, { 'fields': ('content_type', 'object_pk'), }), (_('Content'), { 'fields': ('author', 'ed...
Use created for ordering and date_hierarchy in ReactionAdmin.
Use created for ordering and date_hierarchy in ReactionAdmin.
Python
bsd-3-clause
onepercentclub/onepercentclub-site,onepercentclub/onepercentclub-site,onepercentclub/onepercentclub-site,onepercentclub/onepercentclub-site,onepercentclub/onepercentclub-site
from django.contrib import admin from django.utils.translation import ugettext_lazy as _ from .models import Reaction class ReactionAdmin(admin.ModelAdmin): fieldsets = ( (None, { 'fields': ('content_type', 'object_pk'), }), (_('Content'), { 'fields': ('author', 'ed...
from django.contrib import admin from django.utils.translation import ugettext_lazy as _ from .models import Reaction class ReactionAdmin(admin.ModelAdmin): fieldsets = ( (None, { 'fields': ('content_type', 'object_pk'), }), (_('Content'), { 'fields': ('author', 'ed...
<commit_before>from django.contrib import admin from django.utils.translation import ugettext_lazy as _ from .models import Reaction class ReactionAdmin(admin.ModelAdmin): fieldsets = ( (None, { 'fields': ('content_type', 'object_pk'), }), (_('Content'), { 'fields':...
from django.contrib import admin from django.utils.translation import ugettext_lazy as _ from .models import Reaction class ReactionAdmin(admin.ModelAdmin): fieldsets = ( (None, { 'fields': ('content_type', 'object_pk'), }), (_('Content'), { 'fields': ('author', 'ed...
from django.contrib import admin from django.utils.translation import ugettext_lazy as _ from .models import Reaction class ReactionAdmin(admin.ModelAdmin): fieldsets = ( (None, { 'fields': ('content_type', 'object_pk'), }), (_('Content'), { 'fields': ('author', 'ed...
<commit_before>from django.contrib import admin from django.utils.translation import ugettext_lazy as _ from .models import Reaction class ReactionAdmin(admin.ModelAdmin): fieldsets = ( (None, { 'fields': ('content_type', 'object_pk'), }), (_('Content'), { 'fields':...
6e307688aede207fcdcb5e8ccb86a548dd12c2b4
src/metpy/_version.py
src/metpy/_version.py
# Copyright (c) 2019 MetPy Developers. # Distributed under the terms of the BSD 3-Clause License. # SPDX-License-Identifier: BSD-3-Clause """Tools for versioning.""" def get_version(): """Get MetPy's version. Either get it from package metadata, or get it using version control information if a developmen...
# Copyright (c) 2019 MetPy Developers. # Distributed under the terms of the BSD 3-Clause License. # SPDX-License-Identifier: BSD-3-Clause """Tools for versioning.""" def get_version(): """Get MetPy's version. Either get it from package metadata, or get it using version control information if a developmen...
Fix getting version for development install
MNT: Fix getting version for development install Path wasn't updated when we moved source code to 'src/'.
Python
bsd-3-clause
dopplershift/MetPy,Unidata/MetPy,dopplershift/MetPy,Unidata/MetPy
# Copyright (c) 2019 MetPy Developers. # Distributed under the terms of the BSD 3-Clause License. # SPDX-License-Identifier: BSD-3-Clause """Tools for versioning.""" def get_version(): """Get MetPy's version. Either get it from package metadata, or get it using version control information if a developmen...
# Copyright (c) 2019 MetPy Developers. # Distributed under the terms of the BSD 3-Clause License. # SPDX-License-Identifier: BSD-3-Clause """Tools for versioning.""" def get_version(): """Get MetPy's version. Either get it from package metadata, or get it using version control information if a developmen...
<commit_before># Copyright (c) 2019 MetPy Developers. # Distributed under the terms of the BSD 3-Clause License. # SPDX-License-Identifier: BSD-3-Clause """Tools for versioning.""" def get_version(): """Get MetPy's version. Either get it from package metadata, or get it using version control information if ...
# Copyright (c) 2019 MetPy Developers. # Distributed under the terms of the BSD 3-Clause License. # SPDX-License-Identifier: BSD-3-Clause """Tools for versioning.""" def get_version(): """Get MetPy's version. Either get it from package metadata, or get it using version control information if a developmen...
# Copyright (c) 2019 MetPy Developers. # Distributed under the terms of the BSD 3-Clause License. # SPDX-License-Identifier: BSD-3-Clause """Tools for versioning.""" def get_version(): """Get MetPy's version. Either get it from package metadata, or get it using version control information if a developmen...
<commit_before># Copyright (c) 2019 MetPy Developers. # Distributed under the terms of the BSD 3-Clause License. # SPDX-License-Identifier: BSD-3-Clause """Tools for versioning.""" def get_version(): """Get MetPy's version. Either get it from package metadata, or get it using version control information if ...
c143503012ee0e726e199882afaed0b00541f32d
tests/web_api/test_handlers.py
tests/web_api/test_handlers.py
# -*- coding: utf-8 -*- from openfisca_web_api.handlers import get_flat_trace def test_flat_trace(): tree = { 'name': 'a', 'period': 2019, 'children': [ { 'name': 'b', 'period': 2019, 'children': [], 'parameters':...
# -*- coding: utf-8 -*- from openfisca_web_api.handlers import get_flat_trace def test_flat_trace(): tree = { 'name': 'a', 'period': 2019, 'children': [ { 'name': 'b', 'period': 2019, 'children': [], 'parameters':...
Fix error on flat trace with cahe test
Fix error on flat trace with cahe test
Python
agpl-3.0
openfisca/openfisca-core,openfisca/openfisca-core
# -*- coding: utf-8 -*- from openfisca_web_api.handlers import get_flat_trace def test_flat_trace(): tree = { 'name': 'a', 'period': 2019, 'children': [ { 'name': 'b', 'period': 2019, 'children': [], 'parameters':...
# -*- coding: utf-8 -*- from openfisca_web_api.handlers import get_flat_trace def test_flat_trace(): tree = { 'name': 'a', 'period': 2019, 'children': [ { 'name': 'b', 'period': 2019, 'children': [], 'parameters':...
<commit_before># -*- coding: utf-8 -*- from openfisca_web_api.handlers import get_flat_trace def test_flat_trace(): tree = { 'name': 'a', 'period': 2019, 'children': [ { 'name': 'b', 'period': 2019, 'children': [], ...
# -*- coding: utf-8 -*- from openfisca_web_api.handlers import get_flat_trace def test_flat_trace(): tree = { 'name': 'a', 'period': 2019, 'children': [ { 'name': 'b', 'period': 2019, 'children': [], 'parameters':...
# -*- coding: utf-8 -*- from openfisca_web_api.handlers import get_flat_trace def test_flat_trace(): tree = { 'name': 'a', 'period': 2019, 'children': [ { 'name': 'b', 'period': 2019, 'children': [], 'parameters':...
<commit_before># -*- coding: utf-8 -*- from openfisca_web_api.handlers import get_flat_trace def test_flat_trace(): tree = { 'name': 'a', 'period': 2019, 'children': [ { 'name': 'b', 'period': 2019, 'children': [], ...
2a47ff10958d27785a35d3f5f3a3ccc6b1283021
app/commands.py
app/commands.py
from faker import Faker import click from app.database import db from app.user.models import User @click.option('--num_users', default=5, help='Number of users.') def populate_db(num_users): """Populates the database with seed data.""" fake = Faker() users = [] for _ in range(num_users): user...
from faker import Faker import click from app.database import db from app.user.models import User @click.option('--num_users', default=5, help='Number of users.') def populate_db(num_users): """Populates the database with seed data.""" fake = Faker() users = [] for _ in range(num_users): user...
Use kwargs when calling User.__init__
Use kwargs when calling User.__init__
Python
mit
cburmeister/flask-bones,cburmeister/flask-bones,cburmeister/flask-bones
from faker import Faker import click from app.database import db from app.user.models import User @click.option('--num_users', default=5, help='Number of users.') def populate_db(num_users): """Populates the database with seed data.""" fake = Faker() users = [] for _ in range(num_users): user...
from faker import Faker import click from app.database import db from app.user.models import User @click.option('--num_users', default=5, help='Number of users.') def populate_db(num_users): """Populates the database with seed data.""" fake = Faker() users = [] for _ in range(num_users): user...
<commit_before>from faker import Faker import click from app.database import db from app.user.models import User @click.option('--num_users', default=5, help='Number of users.') def populate_db(num_users): """Populates the database with seed data.""" fake = Faker() users = [] for _ in range(num_users...
from faker import Faker import click from app.database import db from app.user.models import User @click.option('--num_users', default=5, help='Number of users.') def populate_db(num_users): """Populates the database with seed data.""" fake = Faker() users = [] for _ in range(num_users): user...
from faker import Faker import click from app.database import db from app.user.models import User @click.option('--num_users', default=5, help='Number of users.') def populate_db(num_users): """Populates the database with seed data.""" fake = Faker() users = [] for _ in range(num_users): user...
<commit_before>from faker import Faker import click from app.database import db from app.user.models import User @click.option('--num_users', default=5, help='Number of users.') def populate_db(num_users): """Populates the database with seed data.""" fake = Faker() users = [] for _ in range(num_users...
957a311d8fa26b18715eada3484f07bbe609818a
stationspinner/libs/drf_extensions.py
stationspinner/libs/drf_extensions.py
from rest_framework import permissions, viewsets, serializers import json class CapsulerPermission(permissions.IsAuthenticated): """ Standard capsuler access permission. If the data was pulled from the api by one of the api keys registered to this user, this permission class will grant access to it. ...
from rest_framework import permissions, viewsets, serializers import json class CapsulerPermission(permissions.IsAuthenticated): """ Standard capsuler access permission. If the data was pulled from the api by one of the api keys registered to this user, this permission class will grant access to it. ...
Add mixin for evaluating characterIDs
Add mixin for evaluating characterIDs
Python
agpl-3.0
kriberg/stationspinner,kriberg/stationspinner
from rest_framework import permissions, viewsets, serializers import json class CapsulerPermission(permissions.IsAuthenticated): """ Standard capsuler access permission. If the data was pulled from the api by one of the api keys registered to this user, this permission class will grant access to it. ...
from rest_framework import permissions, viewsets, serializers import json class CapsulerPermission(permissions.IsAuthenticated): """ Standard capsuler access permission. If the data was pulled from the api by one of the api keys registered to this user, this permission class will grant access to it. ...
<commit_before>from rest_framework import permissions, viewsets, serializers import json class CapsulerPermission(permissions.IsAuthenticated): """ Standard capsuler access permission. If the data was pulled from the api by one of the api keys registered to this user, this permission class will grant a...
from rest_framework import permissions, viewsets, serializers import json class CapsulerPermission(permissions.IsAuthenticated): """ Standard capsuler access permission. If the data was pulled from the api by one of the api keys registered to this user, this permission class will grant access to it. ...
from rest_framework import permissions, viewsets, serializers import json class CapsulerPermission(permissions.IsAuthenticated): """ Standard capsuler access permission. If the data was pulled from the api by one of the api keys registered to this user, this permission class will grant access to it. ...
<commit_before>from rest_framework import permissions, viewsets, serializers import json class CapsulerPermission(permissions.IsAuthenticated): """ Standard capsuler access permission. If the data was pulled from the api by one of the api keys registered to this user, this permission class will grant a...
80e0d9c0e9b0f809eaede0c3c3053daf99e0ce4b
boto3facade/__init__.py
boto3facade/__init__.py
"""A simple facade for boto3.""" import os import inspect __version__ = "0.5.2" __dir__ = os.path.dirname(inspect.getfile(inspect.currentframe()))
"""A simple facade for boto3.""" import os import inspect __version__ = "0.5.3" __dir__ = os.path.dirname(inspect.getfile(inspect.currentframe()))
Fix formatting of pypi docs
Fix formatting of pypi docs
Python
mit
InnovativeTravel/boto3facade,FindHotel/boto3facade
"""A simple facade for boto3.""" import os import inspect __version__ = "0.5.2" __dir__ = os.path.dirname(inspect.getfile(inspect.currentframe())) Fix formatting of pypi docs
"""A simple facade for boto3.""" import os import inspect __version__ = "0.5.3" __dir__ = os.path.dirname(inspect.getfile(inspect.currentframe()))
<commit_before>"""A simple facade for boto3.""" import os import inspect __version__ = "0.5.2" __dir__ = os.path.dirname(inspect.getfile(inspect.currentframe())) <commit_msg>Fix formatting of pypi docs<commit_after>
"""A simple facade for boto3.""" import os import inspect __version__ = "0.5.3" __dir__ = os.path.dirname(inspect.getfile(inspect.currentframe()))
"""A simple facade for boto3.""" import os import inspect __version__ = "0.5.2" __dir__ = os.path.dirname(inspect.getfile(inspect.currentframe())) Fix formatting of pypi docs"""A simple facade for boto3.""" import os import inspect __version__ = "0.5.3" __dir__ = os.path.dirname(inspect.getfile(inspect.currentfra...
<commit_before>"""A simple facade for boto3.""" import os import inspect __version__ = "0.5.2" __dir__ = os.path.dirname(inspect.getfile(inspect.currentframe())) <commit_msg>Fix formatting of pypi docs<commit_after>"""A simple facade for boto3.""" import os import inspect __version__ = "0.5.3" __dir__ = os.path.d...
ec7791663ed866d240edbaf5e0dd766e9418e1ff
cla_backend/apps/status/tests/smoketests.py
cla_backend/apps/status/tests/smoketests.py
import unittest from celery import Celery from django.conf import settings from django.db import connection class SmokeTests(unittest.TestCase): def setUp(self): pass def test_can_access_db(self): cursor = connection.cursor() cursor.execute('SELECT 1') row = cursor.fetchone(...
import unittest from celery import Celery from django.conf import settings from django.db import connection class SmokeTests(unittest.TestCase): def setUp(self): pass def test_can_access_db(self): "access the database" cursor = connection.cursor() cursor.execute('SELECT 1') ...
Add docstrings so that hubot can say what went wrong
Add docstrings so that hubot can say what went wrong
Python
mit
ministryofjustice/cla_backend,ministryofjustice/cla_backend,ministryofjustice/cla_backend,ministryofjustice/cla_backend
import unittest from celery import Celery from django.conf import settings from django.db import connection class SmokeTests(unittest.TestCase): def setUp(self): pass def test_can_access_db(self): cursor = connection.cursor() cursor.execute('SELECT 1') row = cursor.fetchone(...
import unittest from celery import Celery from django.conf import settings from django.db import connection class SmokeTests(unittest.TestCase): def setUp(self): pass def test_can_access_db(self): "access the database" cursor = connection.cursor() cursor.execute('SELECT 1') ...
<commit_before>import unittest from celery import Celery from django.conf import settings from django.db import connection class SmokeTests(unittest.TestCase): def setUp(self): pass def test_can_access_db(self): cursor = connection.cursor() cursor.execute('SELECT 1') row = c...
import unittest from celery import Celery from django.conf import settings from django.db import connection class SmokeTests(unittest.TestCase): def setUp(self): pass def test_can_access_db(self): "access the database" cursor = connection.cursor() cursor.execute('SELECT 1') ...
import unittest from celery import Celery from django.conf import settings from django.db import connection class SmokeTests(unittest.TestCase): def setUp(self): pass def test_can_access_db(self): cursor = connection.cursor() cursor.execute('SELECT 1') row = cursor.fetchone(...
<commit_before>import unittest from celery import Celery from django.conf import settings from django.db import connection class SmokeTests(unittest.TestCase): def setUp(self): pass def test_can_access_db(self): cursor = connection.cursor() cursor.execute('SELECT 1') row = c...
8ef2f7c7a2606971181ffcb968286dd321b8dcb6
pytips/default_settings.py
pytips/default_settings.py
# -*- coding: utf-8 -*- DEBUG = True # If you think this is my actual secret key, I have a bridge to sell you. SECRET_KEY = '\x1a\x16\xd5U\xdc\x0fL\x91\x1f\x11\x08{\xa2}\xae>\xf0\x15\xd9)\xe68%!' # By default, just use SQLite in memory SQLALCHEMY_DATABASE_URI = 'sqlite:////tmp/test.db'
# -*- coding: utf-8 -*- DEBUG = True # If you think this is my actual secret key, I have a bridge to sell you. SECRET_KEY = '\x1a\x16\xd5U\xdc\x0fL\x91\x1f\x11\x08{\xa2}\xae>\xf0\x15\xd9)\xe68%!' # By default, just use SQLite in memory SQLALCHEMY_DATABASE_URI = 'sqlite://'
Change default back to in-memory.
Change default back to in-memory. --HG-- branch : local-db
Python
isc
gthank/pytips,gthank/pytips,gthank/pytips,gthank/pytips
# -*- coding: utf-8 -*- DEBUG = True # If you think this is my actual secret key, I have a bridge to sell you. SECRET_KEY = '\x1a\x16\xd5U\xdc\x0fL\x91\x1f\x11\x08{\xa2}\xae>\xf0\x15\xd9)\xe68%!' # By default, just use SQLite in memory SQLALCHEMY_DATABASE_URI = 'sqlite:////tmp/test.db' Change default back to in-memory....
# -*- coding: utf-8 -*- DEBUG = True # If you think this is my actual secret key, I have a bridge to sell you. SECRET_KEY = '\x1a\x16\xd5U\xdc\x0fL\x91\x1f\x11\x08{\xa2}\xae>\xf0\x15\xd9)\xe68%!' # By default, just use SQLite in memory SQLALCHEMY_DATABASE_URI = 'sqlite://'
<commit_before># -*- coding: utf-8 -*- DEBUG = True # If you think this is my actual secret key, I have a bridge to sell you. SECRET_KEY = '\x1a\x16\xd5U\xdc\x0fL\x91\x1f\x11\x08{\xa2}\xae>\xf0\x15\xd9)\xe68%!' # By default, just use SQLite in memory SQLALCHEMY_DATABASE_URI = 'sqlite:////tmp/test.db' <commit_msg>Change...
# -*- coding: utf-8 -*- DEBUG = True # If you think this is my actual secret key, I have a bridge to sell you. SECRET_KEY = '\x1a\x16\xd5U\xdc\x0fL\x91\x1f\x11\x08{\xa2}\xae>\xf0\x15\xd9)\xe68%!' # By default, just use SQLite in memory SQLALCHEMY_DATABASE_URI = 'sqlite://'
# -*- coding: utf-8 -*- DEBUG = True # If you think this is my actual secret key, I have a bridge to sell you. SECRET_KEY = '\x1a\x16\xd5U\xdc\x0fL\x91\x1f\x11\x08{\xa2}\xae>\xf0\x15\xd9)\xe68%!' # By default, just use SQLite in memory SQLALCHEMY_DATABASE_URI = 'sqlite:////tmp/test.db' Change default back to in-memory....
<commit_before># -*- coding: utf-8 -*- DEBUG = True # If you think this is my actual secret key, I have a bridge to sell you. SECRET_KEY = '\x1a\x16\xd5U\xdc\x0fL\x91\x1f\x11\x08{\xa2}\xae>\xf0\x15\xd9)\xe68%!' # By default, just use SQLite in memory SQLALCHEMY_DATABASE_URI = 'sqlite:////tmp/test.db' <commit_msg>Change...
25027605e5a370dfb0cb40ab9aeddafc89090441
download.py
download.py
# coding=utf-8 import urllib2 import json import re # album_url = 'http://www.ximalaya.com/7712455/album/6333174' album_url = 'http://www.ximalaya.com/7712455/album/4474664' headers = {'User-Agent': 'Safari/537.36'} resp = urllib2.urlopen(urllib2.Request(album_url, headers=headers)) ids = re.search('sound_ids=\"(.*)\...
# coding=utf-8 from urllib2 import urlopen, Request import json import re class XmlyDownloader(object): def __init__(self): self.headers = {'User-Agent': 'Safari/537.36'} def getIDs(self, url): resp = urlopen(Request(url, headers=self.headers)) return re.search('sound_ids=\"(.*)\"', ...
Rewrite the script in a package fasshion.
Rewrite the script in a package fasshion.
Python
mit
bangbangbear/ximalayaDownloader
# coding=utf-8 import urllib2 import json import re # album_url = 'http://www.ximalaya.com/7712455/album/6333174' album_url = 'http://www.ximalaya.com/7712455/album/4474664' headers = {'User-Agent': 'Safari/537.36'} resp = urllib2.urlopen(urllib2.Request(album_url, headers=headers)) ids = re.search('sound_ids=\"(.*)\...
# coding=utf-8 from urllib2 import urlopen, Request import json import re class XmlyDownloader(object): def __init__(self): self.headers = {'User-Agent': 'Safari/537.36'} def getIDs(self, url): resp = urlopen(Request(url, headers=self.headers)) return re.search('sound_ids=\"(.*)\"', ...
<commit_before># coding=utf-8 import urllib2 import json import re # album_url = 'http://www.ximalaya.com/7712455/album/6333174' album_url = 'http://www.ximalaya.com/7712455/album/4474664' headers = {'User-Agent': 'Safari/537.36'} resp = urllib2.urlopen(urllib2.Request(album_url, headers=headers)) ids = re.search('so...
# coding=utf-8 from urllib2 import urlopen, Request import json import re class XmlyDownloader(object): def __init__(self): self.headers = {'User-Agent': 'Safari/537.36'} def getIDs(self, url): resp = urlopen(Request(url, headers=self.headers)) return re.search('sound_ids=\"(.*)\"', ...
# coding=utf-8 import urllib2 import json import re # album_url = 'http://www.ximalaya.com/7712455/album/6333174' album_url = 'http://www.ximalaya.com/7712455/album/4474664' headers = {'User-Agent': 'Safari/537.36'} resp = urllib2.urlopen(urllib2.Request(album_url, headers=headers)) ids = re.search('sound_ids=\"(.*)\...
<commit_before># coding=utf-8 import urllib2 import json import re # album_url = 'http://www.ximalaya.com/7712455/album/6333174' album_url = 'http://www.ximalaya.com/7712455/album/4474664' headers = {'User-Agent': 'Safari/537.36'} resp = urllib2.urlopen(urllib2.Request(album_url, headers=headers)) ids = re.search('so...
cb3156b5bc279295b5c932a36818d5ed460b31d5
ynr/urls.py
ynr/urls.py
from __future__ import unicode_literals import sys from django.conf import settings from django.conf.urls import include, url from django.views.generic import TemplateView from django.contrib import admin from django.conf.urls.static import static from django.contrib.staticfiles.urls import staticfiles_urlpatterns ...
from __future__ import unicode_literals import sys from django.conf import settings from django.conf.urls import include, url from django.views.generic import TemplateView from django.contrib import admin from django.conf.urls.static import static from django.contrib.staticfiles.urls import staticfiles_urlpatterns ...
Use getattr in case setting doesn't exist
Use getattr in case setting doesn't exist
Python
agpl-3.0
DemocracyClub/yournextrepresentative,DemocracyClub/yournextrepresentative,DemocracyClub/yournextrepresentative
from __future__ import unicode_literals import sys from django.conf import settings from django.conf.urls import include, url from django.views.generic import TemplateView from django.contrib import admin from django.conf.urls.static import static from django.contrib.staticfiles.urls import staticfiles_urlpatterns ...
from __future__ import unicode_literals import sys from django.conf import settings from django.conf.urls import include, url from django.views.generic import TemplateView from django.contrib import admin from django.conf.urls.static import static from django.contrib.staticfiles.urls import staticfiles_urlpatterns ...
<commit_before>from __future__ import unicode_literals import sys from django.conf import settings from django.conf.urls import include, url from django.views.generic import TemplateView from django.contrib import admin from django.conf.urls.static import static from django.contrib.staticfiles.urls import staticfil...
from __future__ import unicode_literals import sys from django.conf import settings from django.conf.urls import include, url from django.views.generic import TemplateView from django.contrib import admin from django.conf.urls.static import static from django.contrib.staticfiles.urls import staticfiles_urlpatterns ...
from __future__ import unicode_literals import sys from django.conf import settings from django.conf.urls import include, url from django.views.generic import TemplateView from django.contrib import admin from django.conf.urls.static import static from django.contrib.staticfiles.urls import staticfiles_urlpatterns ...
<commit_before>from __future__ import unicode_literals import sys from django.conf import settings from django.conf.urls import include, url from django.views.generic import TemplateView from django.contrib import admin from django.conf.urls.static import static from django.contrib.staticfiles.urls import staticfil...
fd10df8ff5e1312a3ec93bcb6abc1800aafa78cc
collaboration/dispatch/__init__.py
collaboration/dispatch/__init__.py
"""Multi-consumer multi-producer dispatching mechanism Originally based on pydispatch (BSD) http://pypi.python.org/pypi/PyDispatcher/2.0.1 See license.txt for original license. Heavily modified for Django's purposes. """ from sugar3.dispatch.dispatcher import Signal
"""Multi-consumer multi-producer dispatching mechanism Originally based on pydispatch (BSD) http://pypi.python.org/pypi/PyDispatcher/2.0.1 See license.txt for original license. Heavily modified for Django's purposes. """
Remove unused import 'Signal' (F401)
Remove unused import 'Signal' (F401)
Python
mit
walterbender/turtleart,AlanJAS/turtleart
"""Multi-consumer multi-producer dispatching mechanism Originally based on pydispatch (BSD) http://pypi.python.org/pypi/PyDispatcher/2.0.1 See license.txt for original license. Heavily modified for Django's purposes. """ from sugar3.dispatch.dispatcher import Signal Remove unused import 'Signal' (F401)
"""Multi-consumer multi-producer dispatching mechanism Originally based on pydispatch (BSD) http://pypi.python.org/pypi/PyDispatcher/2.0.1 See license.txt for original license. Heavily modified for Django's purposes. """
<commit_before>"""Multi-consumer multi-producer dispatching mechanism Originally based on pydispatch (BSD) http://pypi.python.org/pypi/PyDispatcher/2.0.1 See license.txt for original license. Heavily modified for Django's purposes. """ from sugar3.dispatch.dispatcher import Signal <commit_msg>Remove unused import 'S...
"""Multi-consumer multi-producer dispatching mechanism Originally based on pydispatch (BSD) http://pypi.python.org/pypi/PyDispatcher/2.0.1 See license.txt for original license. Heavily modified for Django's purposes. """
"""Multi-consumer multi-producer dispatching mechanism Originally based on pydispatch (BSD) http://pypi.python.org/pypi/PyDispatcher/2.0.1 See license.txt for original license. Heavily modified for Django's purposes. """ from sugar3.dispatch.dispatcher import Signal Remove unused import 'Signal' (F401)"""Multi-consu...
<commit_before>"""Multi-consumer multi-producer dispatching mechanism Originally based on pydispatch (BSD) http://pypi.python.org/pypi/PyDispatcher/2.0.1 See license.txt for original license. Heavily modified for Django's purposes. """ from sugar3.dispatch.dispatcher import Signal <commit_msg>Remove unused import 'S...
7d6e6318e0696aed8011b86817aa48460f5ad969
scripts/buildtool/cmake.py
scripts/buildtool/cmake.py
import string TEMPL = """\ # $WARNING # Only Windows builds supported with CMake cmake_minimum_required(VERSION 2.8 FATAL_ERROR) project($PROJNAME) if(NOT DEFINED WIN32) message(FATAL_ERROR "Only Windows supported with CMake") endif() include_directories($INCDIRS) add_executable($EXENAME $SOURCES) """ def run(obj):...
import string TEMPL = """\ # $WARNING # Only Windows builds supported with CMake cmake_minimum_required(VERSION 2.8 FATAL_ERROR) project($PROJNAME) if(NOT DEFINED WIN32) message(FATAL_ERROR "Only Windows supported with CMake") endif() include_directories($INCDIRS) add_executable($EXENAME WIN32 $SOURCES) """ def run...
Fix incorrect windows subsystem in CMake backend
Fix incorrect windows subsystem in CMake backend
Python
bsd-2-clause
depp/sglib,depp/sglib
import string TEMPL = """\ # $WARNING # Only Windows builds supported with CMake cmake_minimum_required(VERSION 2.8 FATAL_ERROR) project($PROJNAME) if(NOT DEFINED WIN32) message(FATAL_ERROR "Only Windows supported with CMake") endif() include_directories($INCDIRS) add_executable($EXENAME $SOURCES) """ def run(obj):...
import string TEMPL = """\ # $WARNING # Only Windows builds supported with CMake cmake_minimum_required(VERSION 2.8 FATAL_ERROR) project($PROJNAME) if(NOT DEFINED WIN32) message(FATAL_ERROR "Only Windows supported with CMake") endif() include_directories($INCDIRS) add_executable($EXENAME WIN32 $SOURCES) """ def run...
<commit_before>import string TEMPL = """\ # $WARNING # Only Windows builds supported with CMake cmake_minimum_required(VERSION 2.8 FATAL_ERROR) project($PROJNAME) if(NOT DEFINED WIN32) message(FATAL_ERROR "Only Windows supported with CMake") endif() include_directories($INCDIRS) add_executable($EXENAME $SOURCES) """...
import string TEMPL = """\ # $WARNING # Only Windows builds supported with CMake cmake_minimum_required(VERSION 2.8 FATAL_ERROR) project($PROJNAME) if(NOT DEFINED WIN32) message(FATAL_ERROR "Only Windows supported with CMake") endif() include_directories($INCDIRS) add_executable($EXENAME WIN32 $SOURCES) """ def run...
import string TEMPL = """\ # $WARNING # Only Windows builds supported with CMake cmake_minimum_required(VERSION 2.8 FATAL_ERROR) project($PROJNAME) if(NOT DEFINED WIN32) message(FATAL_ERROR "Only Windows supported with CMake") endif() include_directories($INCDIRS) add_executable($EXENAME $SOURCES) """ def run(obj):...
<commit_before>import string TEMPL = """\ # $WARNING # Only Windows builds supported with CMake cmake_minimum_required(VERSION 2.8 FATAL_ERROR) project($PROJNAME) if(NOT DEFINED WIN32) message(FATAL_ERROR "Only Windows supported with CMake") endif() include_directories($INCDIRS) add_executable($EXENAME $SOURCES) """...
f39b1e44ae3bd709b4b11995f809536ae2e6cc5b
dbaas/physical/admin/parameter.py
dbaas/physical/admin/parameter.py
# -*- coding: utf-8 -*- from __future__ import absolute_import, unicode_literals from django_services import admin from ..service.parameter import ParameterService from ..forms.parameter import ParameterForm class ParameterAdmin(admin.DjangoServicesAdmin): form = ParameterForm service_class = ParameterService...
# -*- coding: utf-8 -*- from __future__ import absolute_import, unicode_literals from django_services import admin from ..service.parameter import ParameterService from ..forms.parameter import ParameterForm class ParameterAdmin(admin.DjangoServicesAdmin): form = ParameterForm service_class = ParameterService...
Rename model field class_path to custom_method
Rename model field class_path to custom_method
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 -*- from __future__ import absolute_import, unicode_literals from django_services import admin from ..service.parameter import ParameterService from ..forms.parameter import ParameterForm class ParameterAdmin(admin.DjangoServicesAdmin): form = ParameterForm service_class = ParameterService...
# -*- coding: utf-8 -*- from __future__ import absolute_import, unicode_literals from django_services import admin from ..service.parameter import ParameterService from ..forms.parameter import ParameterForm class ParameterAdmin(admin.DjangoServicesAdmin): form = ParameterForm service_class = ParameterService...
<commit_before># -*- coding: utf-8 -*- from __future__ import absolute_import, unicode_literals from django_services import admin from ..service.parameter import ParameterService from ..forms.parameter import ParameterForm class ParameterAdmin(admin.DjangoServicesAdmin): form = ParameterForm service_class = P...
# -*- coding: utf-8 -*- from __future__ import absolute_import, unicode_literals from django_services import admin from ..service.parameter import ParameterService from ..forms.parameter import ParameterForm class ParameterAdmin(admin.DjangoServicesAdmin): form = ParameterForm service_class = ParameterService...
# -*- coding: utf-8 -*- from __future__ import absolute_import, unicode_literals from django_services import admin from ..service.parameter import ParameterService from ..forms.parameter import ParameterForm class ParameterAdmin(admin.DjangoServicesAdmin): form = ParameterForm service_class = ParameterService...
<commit_before># -*- coding: utf-8 -*- from __future__ import absolute_import, unicode_literals from django_services import admin from ..service.parameter import ParameterService from ..forms.parameter import ParameterForm class ParameterAdmin(admin.DjangoServicesAdmin): form = ParameterForm service_class = P...
febf5e96847fd01b82f7b9a8e30a5cdae30120f5
layers.py
layers.py
import lasagne import numpy as np WIDTH_INDEX = 3 HEIGHT_INDEX = 2 LAYER_INDEX = 1 class SpatialPoolingLayer(lasagne.layers.Layer): # I assume that all bins has square shape for simplicity # Maybe later I change this behaviour def __init__(self, incoming, bin_sizes, **kwargs): super(SpatialPoolin...
import lasagne import numpy as np from theano import tensor as T WIDTH_INDEX = 3 HEIGHT_INDEX = 2 LAYER_INDEX = 1 class SpatialPoolingLayer(lasagne.layers.Layer): # I assume that all bins has square shape for simplicity # Maybe later I change this behaviour def __init__(self, incoming, bin_sizes, **kwarg...
Fix syntax in spatial layer
Fix syntax in spatial layer
Python
mit
dimmddr/roadSignsNN
import lasagne import numpy as np WIDTH_INDEX = 3 HEIGHT_INDEX = 2 LAYER_INDEX = 1 class SpatialPoolingLayer(lasagne.layers.Layer): # I assume that all bins has square shape for simplicity # Maybe later I change this behaviour def __init__(self, incoming, bin_sizes, **kwargs): super(SpatialPoolin...
import lasagne import numpy as np from theano import tensor as T WIDTH_INDEX = 3 HEIGHT_INDEX = 2 LAYER_INDEX = 1 class SpatialPoolingLayer(lasagne.layers.Layer): # I assume that all bins has square shape for simplicity # Maybe later I change this behaviour def __init__(self, incoming, bin_sizes, **kwarg...
<commit_before>import lasagne import numpy as np WIDTH_INDEX = 3 HEIGHT_INDEX = 2 LAYER_INDEX = 1 class SpatialPoolingLayer(lasagne.layers.Layer): # I assume that all bins has square shape for simplicity # Maybe later I change this behaviour def __init__(self, incoming, bin_sizes, **kwargs): supe...
import lasagne import numpy as np from theano import tensor as T WIDTH_INDEX = 3 HEIGHT_INDEX = 2 LAYER_INDEX = 1 class SpatialPoolingLayer(lasagne.layers.Layer): # I assume that all bins has square shape for simplicity # Maybe later I change this behaviour def __init__(self, incoming, bin_sizes, **kwarg...
import lasagne import numpy as np WIDTH_INDEX = 3 HEIGHT_INDEX = 2 LAYER_INDEX = 1 class SpatialPoolingLayer(lasagne.layers.Layer): # I assume that all bins has square shape for simplicity # Maybe later I change this behaviour def __init__(self, incoming, bin_sizes, **kwargs): super(SpatialPoolin...
<commit_before>import lasagne import numpy as np WIDTH_INDEX = 3 HEIGHT_INDEX = 2 LAYER_INDEX = 1 class SpatialPoolingLayer(lasagne.layers.Layer): # I assume that all bins has square shape for simplicity # Maybe later I change this behaviour def __init__(self, incoming, bin_sizes, **kwargs): supe...
f433a77ec569512e23d71827036652dd60065b15
fabfile.py
fabfile.py
from fabric.api import execute, local, settings, task @task def docs(): local('make -C docs/ html') @task def autodocs(): auto(docs) @task def test(path=None): path = path or 'tests/' local('nosetests ' + path) @task def autotest(path=None): auto(test, path=path) @task def coverage(path=No...
from fabric.api import execute, local, settings, task @task def docs(): local('make -C docs/ html') @task def autodocs(): auto(docs) @task def test(path=None): path = path or 'tests/' local('nosetests ' + path) @task def autotest(path=None): auto(test, path=path) @task def coverage(path=No...
Add lint/autolint tasks for running flake8 on everything
fab: Add lint/autolint tasks for running flake8 on everything
Python
apache-2.0
jcass77/mopidy,ali/mopidy,bencevans/mopidy,dbrgn/mopidy,adamcik/mopidy,rawdlite/mopidy,pacificIT/mopidy,abarisain/mopidy,vrs01/mopidy,woutervanwijk/mopidy,mokieyue/mopidy,bencevans/mopidy,hkariti/mopidy,SuperStarPL/mopidy,mopidy/mopidy,diandiankan/mopidy,dbrgn/mopidy,tkem/mopidy,rawdlite/mopidy,kingosticks/mopidy,swak/...
from fabric.api import execute, local, settings, task @task def docs(): local('make -C docs/ html') @task def autodocs(): auto(docs) @task def test(path=None): path = path or 'tests/' local('nosetests ' + path) @task def autotest(path=None): auto(test, path=path) @task def coverage(path=No...
from fabric.api import execute, local, settings, task @task def docs(): local('make -C docs/ html') @task def autodocs(): auto(docs) @task def test(path=None): path = path or 'tests/' local('nosetests ' + path) @task def autotest(path=None): auto(test, path=path) @task def coverage(path=No...
<commit_before>from fabric.api import execute, local, settings, task @task def docs(): local('make -C docs/ html') @task def autodocs(): auto(docs) @task def test(path=None): path = path or 'tests/' local('nosetests ' + path) @task def autotest(path=None): auto(test, path=path) @task def c...
from fabric.api import execute, local, settings, task @task def docs(): local('make -C docs/ html') @task def autodocs(): auto(docs) @task def test(path=None): path = path or 'tests/' local('nosetests ' + path) @task def autotest(path=None): auto(test, path=path) @task def coverage(path=No...
from fabric.api import execute, local, settings, task @task def docs(): local('make -C docs/ html') @task def autodocs(): auto(docs) @task def test(path=None): path = path or 'tests/' local('nosetests ' + path) @task def autotest(path=None): auto(test, path=path) @task def coverage(path=No...
<commit_before>from fabric.api import execute, local, settings, task @task def docs(): local('make -C docs/ html') @task def autodocs(): auto(docs) @task def test(path=None): path = path or 'tests/' local('nosetests ' + path) @task def autotest(path=None): auto(test, path=path) @task def c...
589bfc0f5e57215aa69746e82100375d6f3b8cc9
kpub/tests/test_counts.py
kpub/tests/test_counts.py
import kpub def test_annual_count(): # Does the cumulative count match the annual count? db = kpub.PublicationDB() annual = db.get_annual_publication_count() cumul = db.get_annual_publication_count_cumulative() assert annual['k2'][2010] == 0 # K2 didn't exist in 2010 # The first K2 papers sta...
import kpub def test_annual_count(): # Does the cumulative count match the annual count? db = kpub.PublicationDB() annual = db.get_annual_publication_count() cumul = db.get_annual_publication_count_cumulative() assert annual['k2'][2010] == 0 # K2 didn't exist in 2010 # The first K2 papers sta...
Add a test for the new multi-year feature
Add a test for the new multi-year feature
Python
mit
KeplerGO/kpub
import kpub def test_annual_count(): # Does the cumulative count match the annual count? db = kpub.PublicationDB() annual = db.get_annual_publication_count() cumul = db.get_annual_publication_count_cumulative() assert annual['k2'][2010] == 0 # K2 didn't exist in 2010 # The first K2 papers sta...
import kpub def test_annual_count(): # Does the cumulative count match the annual count? db = kpub.PublicationDB() annual = db.get_annual_publication_count() cumul = db.get_annual_publication_count_cumulative() assert annual['k2'][2010] == 0 # K2 didn't exist in 2010 # The first K2 papers sta...
<commit_before>import kpub def test_annual_count(): # Does the cumulative count match the annual count? db = kpub.PublicationDB() annual = db.get_annual_publication_count() cumul = db.get_annual_publication_count_cumulative() assert annual['k2'][2010] == 0 # K2 didn't exist in 2010 # The firs...
import kpub def test_annual_count(): # Does the cumulative count match the annual count? db = kpub.PublicationDB() annual = db.get_annual_publication_count() cumul = db.get_annual_publication_count_cumulative() assert annual['k2'][2010] == 0 # K2 didn't exist in 2010 # The first K2 papers sta...
import kpub def test_annual_count(): # Does the cumulative count match the annual count? db = kpub.PublicationDB() annual = db.get_annual_publication_count() cumul = db.get_annual_publication_count_cumulative() assert annual['k2'][2010] == 0 # K2 didn't exist in 2010 # The first K2 papers sta...
<commit_before>import kpub def test_annual_count(): # Does the cumulative count match the annual count? db = kpub.PublicationDB() annual = db.get_annual_publication_count() cumul = db.get_annual_publication_count_cumulative() assert annual['k2'][2010] == 0 # K2 didn't exist in 2010 # The firs...
276111f633b6151368eb38f01b222567c5ebed97
labsys/auth/decorators.py
labsys/auth/decorators.py
from functools import wraps from flask import abort from flask_login import current_user from labsys.auth.models import Permission def permission_required(permission): def decorator(f): @wraps(f) def decorated_function(*args, **kwargs): if not current_user.can(permission): ...
from functools import wraps from flask import abort, current_app from flask_login import current_user from labsys.auth.models import Permission def permission_required(permission): def decorator(f): @wraps(f) def decorated_function(*args, **kwargs): if not current_user.can(permission) ...
Verify if it's a testing app for permissioning
:rocket: Verify if it's a testing app for permissioning
Python
mit
gems-uff/labsys,gems-uff/labsys,gems-uff/labsys
from functools import wraps from flask import abort from flask_login import current_user from labsys.auth.models import Permission def permission_required(permission): def decorator(f): @wraps(f) def decorated_function(*args, **kwargs): if not current_user.can(permission): ...
from functools import wraps from flask import abort, current_app from flask_login import current_user from labsys.auth.models import Permission def permission_required(permission): def decorator(f): @wraps(f) def decorated_function(*args, **kwargs): if not current_user.can(permission) ...
<commit_before>from functools import wraps from flask import abort from flask_login import current_user from labsys.auth.models import Permission def permission_required(permission): def decorator(f): @wraps(f) def decorated_function(*args, **kwargs): if not current_user.can(permission...
from functools import wraps from flask import abort, current_app from flask_login import current_user from labsys.auth.models import Permission def permission_required(permission): def decorator(f): @wraps(f) def decorated_function(*args, **kwargs): if not current_user.can(permission) ...
from functools import wraps from flask import abort from flask_login import current_user from labsys.auth.models import Permission def permission_required(permission): def decorator(f): @wraps(f) def decorated_function(*args, **kwargs): if not current_user.can(permission): ...
<commit_before>from functools import wraps from flask import abort from flask_login import current_user from labsys.auth.models import Permission def permission_required(permission): def decorator(f): @wraps(f) def decorated_function(*args, **kwargs): if not current_user.can(permission...
e39e3f1c512c7766dd72b728dae322b427ab60a3
wluopensource/osl_flatpages/models.py
wluopensource/osl_flatpages/models.py
from django.db import models import markdown class Flatpage(models.Model): page_name = models.CharField(max_length=100, primary_key=True, unique=True) markdown_content = models.TextField('content') content = models.TextField(editable=False) def __unicode__(self): return self.page_name ...
from django.db import models import markdown class Flatpage(models.Model): page_name = models.CharField(max_length=100, primary_key=True, unique=True) title = models.CharField(max_length=100) description = models.CharField(max_length=255) markdown_content = models.TextField('content') content = mod...
Change osl_flatpage model to separate meta data from content
Change osl_flatpage model to separate meta data from content
Python
bsd-3-clause
jeffcharles/Open-Source-at-Laurier-Website,jeffcharles/Open-Source-at-Laurier-Website,jeffcharles/Open-Source-at-Laurier-Website,jeffcharles/Open-Source-at-Laurier-Website
from django.db import models import markdown class Flatpage(models.Model): page_name = models.CharField(max_length=100, primary_key=True, unique=True) markdown_content = models.TextField('content') content = models.TextField(editable=False) def __unicode__(self): return self.page_name ...
from django.db import models import markdown class Flatpage(models.Model): page_name = models.CharField(max_length=100, primary_key=True, unique=True) title = models.CharField(max_length=100) description = models.CharField(max_length=255) markdown_content = models.TextField('content') content = mod...
<commit_before>from django.db import models import markdown class Flatpage(models.Model): page_name = models.CharField(max_length=100, primary_key=True, unique=True) markdown_content = models.TextField('content') content = models.TextField(editable=False) def __unicode__(self): return self...
from django.db import models import markdown class Flatpage(models.Model): page_name = models.CharField(max_length=100, primary_key=True, unique=True) title = models.CharField(max_length=100) description = models.CharField(max_length=255) markdown_content = models.TextField('content') content = mod...
from django.db import models import markdown class Flatpage(models.Model): page_name = models.CharField(max_length=100, primary_key=True, unique=True) markdown_content = models.TextField('content') content = models.TextField(editable=False) def __unicode__(self): return self.page_name ...
<commit_before>from django.db import models import markdown class Flatpage(models.Model): page_name = models.CharField(max_length=100, primary_key=True, unique=True) markdown_content = models.TextField('content') content = models.TextField(editable=False) def __unicode__(self): return self...
d6052e0c1aafef8fa0a5c051838d649c080e0b10
invite/urls.py
invite/urls.py
from django.urls import path from invite import views app_name = 'invite' urlpatterns = [ path('$', views.index, name='index'), path('invite/$', views.invite, name='invite'), path('resend/(?P<code>.*)/$', views.resend, name='resend'), path('revoke/(?P<code>.*)/$', views.revoke, name='revoke'), pat...
from django.urls import re_path from invite import views app_name = 'invite' urlpatterns = [ re_path(r'^$', views.index, name='index'), re_path(r'^invite/$', views.invite, name='invite'), re_path(r'^resend/(?P<code>.*)/$', views.resend, name='resend'), re_path(r'^revoke/(?P<code>.*)/$', views.revoke, ...
Replace usage of url with re_path.
Replace usage of url with re_path.
Python
bsd-3-clause
unt-libraries/django-invite,unt-libraries/django-invite
from django.urls import path from invite import views app_name = 'invite' urlpatterns = [ path('$', views.index, name='index'), path('invite/$', views.invite, name='invite'), path('resend/(?P<code>.*)/$', views.resend, name='resend'), path('revoke/(?P<code>.*)/$', views.revoke, name='revoke'), pat...
from django.urls import re_path from invite import views app_name = 'invite' urlpatterns = [ re_path(r'^$', views.index, name='index'), re_path(r'^invite/$', views.invite, name='invite'), re_path(r'^resend/(?P<code>.*)/$', views.resend, name='resend'), re_path(r'^revoke/(?P<code>.*)/$', views.revoke, ...
<commit_before>from django.urls import path from invite import views app_name = 'invite' urlpatterns = [ path('$', views.index, name='index'), path('invite/$', views.invite, name='invite'), path('resend/(?P<code>.*)/$', views.resend, name='resend'), path('revoke/(?P<code>.*)/$', views.revoke, name='re...
from django.urls import re_path from invite import views app_name = 'invite' urlpatterns = [ re_path(r'^$', views.index, name='index'), re_path(r'^invite/$', views.invite, name='invite'), re_path(r'^resend/(?P<code>.*)/$', views.resend, name='resend'), re_path(r'^revoke/(?P<code>.*)/$', views.revoke, ...
from django.urls import path from invite import views app_name = 'invite' urlpatterns = [ path('$', views.index, name='index'), path('invite/$', views.invite, name='invite'), path('resend/(?P<code>.*)/$', views.resend, name='resend'), path('revoke/(?P<code>.*)/$', views.revoke, name='revoke'), pat...
<commit_before>from django.urls import path from invite import views app_name = 'invite' urlpatterns = [ path('$', views.index, name='index'), path('invite/$', views.invite, name='invite'), path('resend/(?P<code>.*)/$', views.resend, name='resend'), path('revoke/(?P<code>.*)/$', views.revoke, name='re...
24c9ec73aed1337e1262143c5879bee3f936142c
data.py
data.py
import string ROWS = 12 COLUMNS = 14 TMPL_OPTIONS = { 'page-size': 'Letter' } PERCENTAGE_TO_CROP_SCAN_IMG = 0.005 PERCENTAGE_TO_CROP_CHAR_IMG = 0.1 CROPPED_IMG_NAME = "cropped_picture.bmp" CUT_CHAR_IMGS_DIR = "cutting_output_images" MAX_COLUMNS_PER_PAGE = 14 MAX_ROWS_PER_PAEG = 12 RELA_PIXELS_CHARACTER_BAR_HEIG...
import string ROWS = 12 COLUMNS = 14 TMPL_OPTIONS = { 'page-size': 'Letter' } PERCENTAGE_TO_CROP_SCAN_IMG = 0.005 PERCENTAGE_TO_CROP_CHAR_IMG = 0.1 CROPPED_IMG_NAME = "cropped_picture.bmp" CUT_CHAR_IMGS_DIR = "cutting_output_images" MAX_COLUMNS_PER_PAGE = 14 MAX_ROWS_PER_PAEG = 12 RELA_PIXELS_CHARACTER_BAR_HEIG...
Change constant variables to fit new template
Change constant variables to fit new template
Python
mit
fontify/fontify,fontify/fontify,fontify/fontify,fontify/fontify
import string ROWS = 12 COLUMNS = 14 TMPL_OPTIONS = { 'page-size': 'Letter' } PERCENTAGE_TO_CROP_SCAN_IMG = 0.005 PERCENTAGE_TO_CROP_CHAR_IMG = 0.1 CROPPED_IMG_NAME = "cropped_picture.bmp" CUT_CHAR_IMGS_DIR = "cutting_output_images" MAX_COLUMNS_PER_PAGE = 14 MAX_ROWS_PER_PAEG = 12 RELA_PIXELS_CHARACTER_BAR_HEIG...
import string ROWS = 12 COLUMNS = 14 TMPL_OPTIONS = { 'page-size': 'Letter' } PERCENTAGE_TO_CROP_SCAN_IMG = 0.005 PERCENTAGE_TO_CROP_CHAR_IMG = 0.1 CROPPED_IMG_NAME = "cropped_picture.bmp" CUT_CHAR_IMGS_DIR = "cutting_output_images" MAX_COLUMNS_PER_PAGE = 14 MAX_ROWS_PER_PAEG = 12 RELA_PIXELS_CHARACTER_BAR_HEIG...
<commit_before>import string ROWS = 12 COLUMNS = 14 TMPL_OPTIONS = { 'page-size': 'Letter' } PERCENTAGE_TO_CROP_SCAN_IMG = 0.005 PERCENTAGE_TO_CROP_CHAR_IMG = 0.1 CROPPED_IMG_NAME = "cropped_picture.bmp" CUT_CHAR_IMGS_DIR = "cutting_output_images" MAX_COLUMNS_PER_PAGE = 14 MAX_ROWS_PER_PAEG = 12 RELA_PIXELS_CHA...
import string ROWS = 12 COLUMNS = 14 TMPL_OPTIONS = { 'page-size': 'Letter' } PERCENTAGE_TO_CROP_SCAN_IMG = 0.005 PERCENTAGE_TO_CROP_CHAR_IMG = 0.1 CROPPED_IMG_NAME = "cropped_picture.bmp" CUT_CHAR_IMGS_DIR = "cutting_output_images" MAX_COLUMNS_PER_PAGE = 14 MAX_ROWS_PER_PAEG = 12 RELA_PIXELS_CHARACTER_BAR_HEIG...
import string ROWS = 12 COLUMNS = 14 TMPL_OPTIONS = { 'page-size': 'Letter' } PERCENTAGE_TO_CROP_SCAN_IMG = 0.005 PERCENTAGE_TO_CROP_CHAR_IMG = 0.1 CROPPED_IMG_NAME = "cropped_picture.bmp" CUT_CHAR_IMGS_DIR = "cutting_output_images" MAX_COLUMNS_PER_PAGE = 14 MAX_ROWS_PER_PAEG = 12 RELA_PIXELS_CHARACTER_BAR_HEIG...
<commit_before>import string ROWS = 12 COLUMNS = 14 TMPL_OPTIONS = { 'page-size': 'Letter' } PERCENTAGE_TO_CROP_SCAN_IMG = 0.005 PERCENTAGE_TO_CROP_CHAR_IMG = 0.1 CROPPED_IMG_NAME = "cropped_picture.bmp" CUT_CHAR_IMGS_DIR = "cutting_output_images" MAX_COLUMNS_PER_PAGE = 14 MAX_ROWS_PER_PAEG = 12 RELA_PIXELS_CHA...
dc60ed6efdd4eb9a78e29623acee7505f2d864e6
Lib/test/test_fork1.py
Lib/test/test_fork1.py
"""This test checks for correct fork() behavior. We want fork1() semantics -- only the forking thread survives in the child after a fork(). On some systems (e.g. Solaris without posix threads) we find that all active threads survive in the child after a fork(); this is an error. """ import os, sys, time, thread LO...
"""This test checks for correct fork() behavior. We want fork1() semantics -- only the forking thread survives in the child after a fork(). On some systems (e.g. Solaris without posix threads) we find that all active threads survive in the child after a fork(); this is an error. """ import os, sys, time, thread LO...
Use a constant to specify the number of child threads to create.
Use a constant to specify the number of child threads to create. Instead of assuming that the number process ids of the threads is the same as the process id of the controlling process, use a copy of the dictionary and check for changes in the process ids of the threads from the thread's process ids in the parent proc...
Python
mit
sk-/python2.7-type-annotator,sk-/python2.7-type-annotator,sk-/python2.7-type-annotator
"""This test checks for correct fork() behavior. We want fork1() semantics -- only the forking thread survives in the child after a fork(). On some systems (e.g. Solaris without posix threads) we find that all active threads survive in the child after a fork(); this is an error. """ import os, sys, time, thread LO...
"""This test checks for correct fork() behavior. We want fork1() semantics -- only the forking thread survives in the child after a fork(). On some systems (e.g. Solaris without posix threads) we find that all active threads survive in the child after a fork(); this is an error. """ import os, sys, time, thread LO...
<commit_before>"""This test checks for correct fork() behavior. We want fork1() semantics -- only the forking thread survives in the child after a fork(). On some systems (e.g. Solaris without posix threads) we find that all active threads survive in the child after a fork(); this is an error. """ import os, sys, t...
"""This test checks for correct fork() behavior. We want fork1() semantics -- only the forking thread survives in the child after a fork(). On some systems (e.g. Solaris without posix threads) we find that all active threads survive in the child after a fork(); this is an error. """ import os, sys, time, thread LO...
"""This test checks for correct fork() behavior. We want fork1() semantics -- only the forking thread survives in the child after a fork(). On some systems (e.g. Solaris without posix threads) we find that all active threads survive in the child after a fork(); this is an error. """ import os, sys, time, thread LO...
<commit_before>"""This test checks for correct fork() behavior. We want fork1() semantics -- only the forking thread survives in the child after a fork(). On some systems (e.g. Solaris without posix threads) we find that all active threads survive in the child after a fork(); this is an error. """ import os, sys, t...
be5dd49826b08b6d2489db72a76ed00f978b0fbe
st2reactor/st2reactor/rules/worker.py
st2reactor/st2reactor/rules/worker.py
from st2common.transport.reactor import get_trigger_queue def work(): # TODO Listen on this queue and dispatch message to the rules engine queue = get_trigger_queue(name='st2.trigger_dispatch.rules_engine', routing_key='#') pass
from kombu import Connection from kombu.mixins import ConsumerMixin from oslo.config import cfg from st2common import log as logging from st2common.transport.reactor import get_trigger_queue from st2common.util.greenpooldispatch import BufferedDispatcher LOG = logging.getLogger(__name__) RULESENGINE_WORK_Q = get_tri...
Handle messages posted to the TriggerInstance work Q.
Handle messages posted to the TriggerInstance work Q.
Python
apache-2.0
StackStorm/st2,grengojbo/st2,pinterb/st2,Itxaka/st2,lakshmi-kannan/st2,StackStorm/st2,grengojbo/st2,StackStorm/st2,peak6/st2,Itxaka/st2,punalpatel/st2,tonybaloney/st2,pixelrebel/st2,dennybaa/st2,lakshmi-kannan/st2,armab/st2,dennybaa/st2,jtopjian/st2,alfasin/st2,pixelrebel/st2,pinterb/st2,punalpatel/st2,nzlosh/st2,pixel...
from st2common.transport.reactor import get_trigger_queue def work(): # TODO Listen on this queue and dispatch message to the rules engine queue = get_trigger_queue(name='st2.trigger_dispatch.rules_engine', routing_key='#') pass Handle messages posted to the TriggerInstance w...
from kombu import Connection from kombu.mixins import ConsumerMixin from oslo.config import cfg from st2common import log as logging from st2common.transport.reactor import get_trigger_queue from st2common.util.greenpooldispatch import BufferedDispatcher LOG = logging.getLogger(__name__) RULESENGINE_WORK_Q = get_tri...
<commit_before>from st2common.transport.reactor import get_trigger_queue def work(): # TODO Listen on this queue and dispatch message to the rules engine queue = get_trigger_queue(name='st2.trigger_dispatch.rules_engine', routing_key='#') pass <commit_msg>Handle messages post...
from kombu import Connection from kombu.mixins import ConsumerMixin from oslo.config import cfg from st2common import log as logging from st2common.transport.reactor import get_trigger_queue from st2common.util.greenpooldispatch import BufferedDispatcher LOG = logging.getLogger(__name__) RULESENGINE_WORK_Q = get_tri...
from st2common.transport.reactor import get_trigger_queue def work(): # TODO Listen on this queue and dispatch message to the rules engine queue = get_trigger_queue(name='st2.trigger_dispatch.rules_engine', routing_key='#') pass Handle messages posted to the TriggerInstance w...
<commit_before>from st2common.transport.reactor import get_trigger_queue def work(): # TODO Listen on this queue and dispatch message to the rules engine queue = get_trigger_queue(name='st2.trigger_dispatch.rules_engine', routing_key='#') pass <commit_msg>Handle messages post...
e83266987db962f2546da84f5f507ff4f67e3499
django_vend/stores/outlet_urls.py
django_vend/stores/outlet_urls.py
from django.conf.urls import url from . import views urlpatterns = [ url(r'^$', views.OutletList.as_view(), name='vend_outlet_list'), ]
from django.conf.urls import url from . import views urlpatterns = [ url(r'^$', views.OutletList.as_view(), name='vend_outlet_list'), url(r'^(?P<uid>[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12})/$', views.OutletDetail.as_view(), name='vend_outlet_detail'), ]
Add urlconf entry for VendOutlet detail
Add urlconf entry for VendOutlet detail
Python
bsd-3-clause
remarkablerocket/django-vend,remarkablerocket/django-vend
from django.conf.urls import url from . import views urlpatterns = [ url(r'^$', views.OutletList.as_view(), name='vend_outlet_list'), ] Add urlconf entry for VendOutlet detail
from django.conf.urls import url from . import views urlpatterns = [ url(r'^$', views.OutletList.as_view(), name='vend_outlet_list'), url(r'^(?P<uid>[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12})/$', views.OutletDetail.as_view(), name='vend_outlet_detail'), ]
<commit_before>from django.conf.urls import url from . import views urlpatterns = [ url(r'^$', views.OutletList.as_view(), name='vend_outlet_list'), ] <commit_msg>Add urlconf entry for VendOutlet detail<commit_after>
from django.conf.urls import url from . import views urlpatterns = [ url(r'^$', views.OutletList.as_view(), name='vend_outlet_list'), url(r'^(?P<uid>[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12})/$', views.OutletDetail.as_view(), name='vend_outlet_detail'), ]
from django.conf.urls import url from . import views urlpatterns = [ url(r'^$', views.OutletList.as_view(), name='vend_outlet_list'), ] Add urlconf entry for VendOutlet detailfrom django.conf.urls import url from . import views urlpatterns = [ url(r'^$', views.OutletList.as_view(), name='vend_...
<commit_before>from django.conf.urls import url from . import views urlpatterns = [ url(r'^$', views.OutletList.as_view(), name='vend_outlet_list'), ] <commit_msg>Add urlconf entry for VendOutlet detail<commit_after>from django.conf.urls import url from . import views urlpatterns = [ url(r'^$', views....
1b28a83dd7a8c5698de266656f07dcd3f98826f2
tensorforce/core/memories/__init__.py
tensorforce/core/memories/__init__.py
# Copyright 2017 reinforce.io. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or...
# Copyright 2017 reinforce.io. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or...
Change import order in memories
Change import order in memories
Python
apache-2.0
lefnire/tensorforce,reinforceio/tensorforce
# Copyright 2017 reinforce.io. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or...
# Copyright 2017 reinforce.io. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or...
<commit_before># Copyright 2017 reinforce.io. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by ap...
# Copyright 2017 reinforce.io. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or...
# Copyright 2017 reinforce.io. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or...
<commit_before># Copyright 2017 reinforce.io. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by ap...
9dffd8819d998d9e850709ee0a7a0f33e6cb186d
tools/np_suppressions.py
tools/np_suppressions.py
suppressions = [ # This one cannot be covered by any Python language test because there is # no code pathway to it. But it is part of the C API, so must not be # excised from the code. [ r".*/multiarray/mapping\.", "PyArray_MapIterReset" ], # PyArray_Std trivially forwards to and appears to be sup...
suppressions = [ # This one cannot be covered by any Python language test because there is # no code pathway to it. But it is part of the C API, so must not be # excised from the code. [ r".*/multiarray/mapping\.", "PyArray_MapIterReset" ], # PyArray_Std trivially forwards to and appears to be sup...
Add supressions for array casting functions that don't seem to be callable.
Add supressions for array casting functions that don't seem to be callable.
Python
bsd-3-clause
teoliphant/numpy-refactor,teoliphant/numpy-refactor,teoliphant/numpy-refactor,teoliphant/numpy-refactor,teoliphant/numpy-refactor
suppressions = [ # This one cannot be covered by any Python language test because there is # no code pathway to it. But it is part of the C API, so must not be # excised from the code. [ r".*/multiarray/mapping\.", "PyArray_MapIterReset" ], # PyArray_Std trivially forwards to and appears to be sup...
suppressions = [ # This one cannot be covered by any Python language test because there is # no code pathway to it. But it is part of the C API, so must not be # excised from the code. [ r".*/multiarray/mapping\.", "PyArray_MapIterReset" ], # PyArray_Std trivially forwards to and appears to be sup...
<commit_before>suppressions = [ # This one cannot be covered by any Python language test because there is # no code pathway to it. But it is part of the C API, so must not be # excised from the code. [ r".*/multiarray/mapping\.", "PyArray_MapIterReset" ], # PyArray_Std trivially forwards to and ap...
suppressions = [ # This one cannot be covered by any Python language test because there is # no code pathway to it. But it is part of the C API, so must not be # excised from the code. [ r".*/multiarray/mapping\.", "PyArray_MapIterReset" ], # PyArray_Std trivially forwards to and appears to be sup...
suppressions = [ # This one cannot be covered by any Python language test because there is # no code pathway to it. But it is part of the C API, so must not be # excised from the code. [ r".*/multiarray/mapping\.", "PyArray_MapIterReset" ], # PyArray_Std trivially forwards to and appears to be sup...
<commit_before>suppressions = [ # This one cannot be covered by any Python language test because there is # no code pathway to it. But it is part of the C API, so must not be # excised from the code. [ r".*/multiarray/mapping\.", "PyArray_MapIterReset" ], # PyArray_Std trivially forwards to and ap...
627c1fb7128a1419e7a1598f4585bef1c216910d
ckanext/nhm/settings.py
ckanext/nhm/settings.py
#!/usr/bin/env python # encoding: utf-8 # # This file is part of ckanext-nhm # Created by the Natural History Museum in London, UK COLLECTION_CONTACTS = { u'Data Portal / Other': u'[email protected]', u'Algae, Fungi & Plants': u'[email protected]', u'Economic & Environmental Earth Sciences': u'g.miller@nhm....
#!/usr/bin/env python # encoding: utf-8 # # This file is part of ckanext-nhm # Created by the Natural History Museum in London, UK from collections import OrderedDict # the order here matters as the default option should always be first in the dict so that it is # automatically selected in combo boxes that use this li...
Use an OrderedDict to ensure the first option is the default option
Use an OrderedDict to ensure the first option is the default option
Python
mit
NaturalHistoryMuseum/ckanext-nhm,NaturalHistoryMuseum/ckanext-nhm,NaturalHistoryMuseum/ckanext-nhm
#!/usr/bin/env python # encoding: utf-8 # # This file is part of ckanext-nhm # Created by the Natural History Museum in London, UK COLLECTION_CONTACTS = { u'Data Portal / Other': u'[email protected]', u'Algae, Fungi & Plants': u'[email protected]', u'Economic & Environmental Earth Sciences': u'g.miller@nhm....
#!/usr/bin/env python # encoding: utf-8 # # This file is part of ckanext-nhm # Created by the Natural History Museum in London, UK from collections import OrderedDict # the order here matters as the default option should always be first in the dict so that it is # automatically selected in combo boxes that use this li...
<commit_before>#!/usr/bin/env python # encoding: utf-8 # # This file is part of ckanext-nhm # Created by the Natural History Museum in London, UK COLLECTION_CONTACTS = { u'Data Portal / Other': u'[email protected]', u'Algae, Fungi & Plants': u'[email protected]', u'Economic & Environmental Earth Sciences': ...
#!/usr/bin/env python # encoding: utf-8 # # This file is part of ckanext-nhm # Created by the Natural History Museum in London, UK from collections import OrderedDict # the order here matters as the default option should always be first in the dict so that it is # automatically selected in combo boxes that use this li...
#!/usr/bin/env python # encoding: utf-8 # # This file is part of ckanext-nhm # Created by the Natural History Museum in London, UK COLLECTION_CONTACTS = { u'Data Portal / Other': u'[email protected]', u'Algae, Fungi & Plants': u'[email protected]', u'Economic & Environmental Earth Sciences': u'g.miller@nhm....
<commit_before>#!/usr/bin/env python # encoding: utf-8 # # This file is part of ckanext-nhm # Created by the Natural History Museum in London, UK COLLECTION_CONTACTS = { u'Data Portal / Other': u'[email protected]', u'Algae, Fungi & Plants': u'[email protected]', u'Economic & Environmental Earth Sciences': ...
6c1af25e427ddc9d5bcbdca017d39813c34030bd
bandnames/bandnames/settings/local.py
bandnames/bandnames/settings/local.py
from __future__ import absolute_import from os.path import join, normpath from .base import * DEBUG = True TEMPLATE_DEBUG = DEBUG EMAIL_BACKEND = 'django.core.mail.backends.console.EmailBackend' DATABASES = { 'default': { 'ENGINE': 'django.db.backends.sqlite3', 'NAME': normpath(join(DJANGO_ROOT...
from __future__ import absolute_import from os.path import join, normpath from .base import * DEBUG = True TEMPLATE_DEBUG = DEBUG EMAIL_BACKEND = 'django.core.mail.backends.console.EmailBackend' DATABASES = { 'default': { 'ENGINE': 'django.db.backends.sqlite3', 'NAME': normpath(join(DJANGO_ROOT...
Remove debug toolbar due to 'TypeError: process() takes exactly 3 arguments (2 given)'
Remove debug toolbar due to 'TypeError: process() takes exactly 3 arguments (2 given)'
Python
mit
pyepye/bandnames,pyepye/bandnames
from __future__ import absolute_import from os.path import join, normpath from .base import * DEBUG = True TEMPLATE_DEBUG = DEBUG EMAIL_BACKEND = 'django.core.mail.backends.console.EmailBackend' DATABASES = { 'default': { 'ENGINE': 'django.db.backends.sqlite3', 'NAME': normpath(join(DJANGO_ROOT...
from __future__ import absolute_import from os.path import join, normpath from .base import * DEBUG = True TEMPLATE_DEBUG = DEBUG EMAIL_BACKEND = 'django.core.mail.backends.console.EmailBackend' DATABASES = { 'default': { 'ENGINE': 'django.db.backends.sqlite3', 'NAME': normpath(join(DJANGO_ROOT...
<commit_before>from __future__ import absolute_import from os.path import join, normpath from .base import * DEBUG = True TEMPLATE_DEBUG = DEBUG EMAIL_BACKEND = 'django.core.mail.backends.console.EmailBackend' DATABASES = { 'default': { 'ENGINE': 'django.db.backends.sqlite3', 'NAME': normpath(j...
from __future__ import absolute_import from os.path import join, normpath from .base import * DEBUG = True TEMPLATE_DEBUG = DEBUG EMAIL_BACKEND = 'django.core.mail.backends.console.EmailBackend' DATABASES = { 'default': { 'ENGINE': 'django.db.backends.sqlite3', 'NAME': normpath(join(DJANGO_ROOT...
from __future__ import absolute_import from os.path import join, normpath from .base import * DEBUG = True TEMPLATE_DEBUG = DEBUG EMAIL_BACKEND = 'django.core.mail.backends.console.EmailBackend' DATABASES = { 'default': { 'ENGINE': 'django.db.backends.sqlite3', 'NAME': normpath(join(DJANGO_ROOT...
<commit_before>from __future__ import absolute_import from os.path import join, normpath from .base import * DEBUG = True TEMPLATE_DEBUG = DEBUG EMAIL_BACKEND = 'django.core.mail.backends.console.EmailBackend' DATABASES = { 'default': { 'ENGINE': 'django.db.backends.sqlite3', 'NAME': normpath(j...
5b1d13f29984997181b953f36d637b6e187ec220
blankspot/node_registration/models.py
blankspot/node_registration/models.py
from django.db import models class Position(models.Model): first_name = models.CharField(max_length=50, blank=True, null=True) last_name = models.CharField(max_length=50, blank=True, null=True) nick = models.CharField(max_length=128) email = models.EmailField(max_length=254) street = models.CharField(max_length=2...
from django.db import models class Position(models.Model): first_name = models.CharField(max_length=50, blank=True, null=True) last_name = models.CharField(max_length=50, blank=True, null=True) nick = models.CharField(max_length=128) email = models.EmailField(max_length=254) street = models.CharField(max_length=2...
Rename column altitude to longitude ...
Rename column altitude to longitude ...
Python
agpl-3.0
frlan/blankspot
from django.db import models class Position(models.Model): first_name = models.CharField(max_length=50, blank=True, null=True) last_name = models.CharField(max_length=50, blank=True, null=True) nick = models.CharField(max_length=128) email = models.EmailField(max_length=254) street = models.CharField(max_length=2...
from django.db import models class Position(models.Model): first_name = models.CharField(max_length=50, blank=True, null=True) last_name = models.CharField(max_length=50, blank=True, null=True) nick = models.CharField(max_length=128) email = models.EmailField(max_length=254) street = models.CharField(max_length=2...
<commit_before>from django.db import models class Position(models.Model): first_name = models.CharField(max_length=50, blank=True, null=True) last_name = models.CharField(max_length=50, blank=True, null=True) nick = models.CharField(max_length=128) email = models.EmailField(max_length=254) street = models.CharFie...
from django.db import models class Position(models.Model): first_name = models.CharField(max_length=50, blank=True, null=True) last_name = models.CharField(max_length=50, blank=True, null=True) nick = models.CharField(max_length=128) email = models.EmailField(max_length=254) street = models.CharField(max_length=2...
from django.db import models class Position(models.Model): first_name = models.CharField(max_length=50, blank=True, null=True) last_name = models.CharField(max_length=50, blank=True, null=True) nick = models.CharField(max_length=128) email = models.EmailField(max_length=254) street = models.CharField(max_length=2...
<commit_before>from django.db import models class Position(models.Model): first_name = models.CharField(max_length=50, blank=True, null=True) last_name = models.CharField(max_length=50, blank=True, null=True) nick = models.CharField(max_length=128) email = models.EmailField(max_length=254) street = models.CharFie...
bcaee4414402017985f8a25134a5cecc99a1c8bb
docker/build_scripts/ssl-check.py
docker/build_scripts/ssl-check.py
# cf. https://github.com/pypa/manylinux/issues/53 GOOD_SSL = "https://google.com" BAD_SSL = "https://self-signed.badssl.com" import sys print("Testing SSL certificate checking for Python:", sys.version) if (sys.version_info[:2] < (2, 7) or sys.version_info[:2] < (3, 4)): print("This version never checks SSL...
# cf. https://github.com/pypa/manylinux/issues/53 GOOD_SSL = "https://google.com" BAD_SSL = "https://self-signed.badssl.com" import sys print("Testing SSL certificate checking for Python:", sys.version) if (sys.version_info[:2] < (3, 4)): print("This version never checks SSL certs; skipping tests") sys.exit...
Remove leftover relic from supporting CPython 2.6.
Remove leftover relic from supporting CPython 2.6.
Python
mit
pypa/manylinux,manylinux/manylinux,pypa/manylinux,pypa/manylinux,manylinux/manylinux,Parsely/manylinux,Parsely/manylinux
# cf. https://github.com/pypa/manylinux/issues/53 GOOD_SSL = "https://google.com" BAD_SSL = "https://self-signed.badssl.com" import sys print("Testing SSL certificate checking for Python:", sys.version) if (sys.version_info[:2] < (2, 7) or sys.version_info[:2] < (3, 4)): print("This version never checks SSL...
# cf. https://github.com/pypa/manylinux/issues/53 GOOD_SSL = "https://google.com" BAD_SSL = "https://self-signed.badssl.com" import sys print("Testing SSL certificate checking for Python:", sys.version) if (sys.version_info[:2] < (3, 4)): print("This version never checks SSL certs; skipping tests") sys.exit...
<commit_before># cf. https://github.com/pypa/manylinux/issues/53 GOOD_SSL = "https://google.com" BAD_SSL = "https://self-signed.badssl.com" import sys print("Testing SSL certificate checking for Python:", sys.version) if (sys.version_info[:2] < (2, 7) or sys.version_info[:2] < (3, 4)): print("This version n...
# cf. https://github.com/pypa/manylinux/issues/53 GOOD_SSL = "https://google.com" BAD_SSL = "https://self-signed.badssl.com" import sys print("Testing SSL certificate checking for Python:", sys.version) if (sys.version_info[:2] < (3, 4)): print("This version never checks SSL certs; skipping tests") sys.exit...
# cf. https://github.com/pypa/manylinux/issues/53 GOOD_SSL = "https://google.com" BAD_SSL = "https://self-signed.badssl.com" import sys print("Testing SSL certificate checking for Python:", sys.version) if (sys.version_info[:2] < (2, 7) or sys.version_info[:2] < (3, 4)): print("This version never checks SSL...
<commit_before># cf. https://github.com/pypa/manylinux/issues/53 GOOD_SSL = "https://google.com" BAD_SSL = "https://self-signed.badssl.com" import sys print("Testing SSL certificate checking for Python:", sys.version) if (sys.version_info[:2] < (2, 7) or sys.version_info[:2] < (3, 4)): print("This version n...
e79b92888fa9dfc57a274f3377cf425776ccb468
food.py
food.py
# Food Class class Food: def __init__(self, x, y): self.location = (x, y) self.eaten = False def getX(self): return self.location[0] def getY(self): return self.location[1] def setX(self, newX): self.location[0] = newX def setY(self, newY): self.location[1] = newY def isEaten(self): return ea...
# Food Class class Food: def __init__(self, x, y): self.location = (x, y) self.eaten = False def getX(self): return self.location[0] def getY(self): return self.location[1] def setX(self, newX): self.location[0] = newX def setY(self, newY): self.location[1] = newY def isEaten(self): return se...
Add self before eaten on isEaten for Food
Add self before eaten on isEaten for Food
Python
mit
MEhlinger/rpi_pushbutton_games
# Food Class class Food: def __init__(self, x, y): self.location = (x, y) self.eaten = False def getX(self): return self.location[0] def getY(self): return self.location[1] def setX(self, newX): self.location[0] = newX def setY(self, newY): self.location[1] = newY def isEaten(self): return ea...
# Food Class class Food: def __init__(self, x, y): self.location = (x, y) self.eaten = False def getX(self): return self.location[0] def getY(self): return self.location[1] def setX(self, newX): self.location[0] = newX def setY(self, newY): self.location[1] = newY def isEaten(self): return se...
<commit_before># Food Class class Food: def __init__(self, x, y): self.location = (x, y) self.eaten = False def getX(self): return self.location[0] def getY(self): return self.location[1] def setX(self, newX): self.location[0] = newX def setY(self, newY): self.location[1] = newY def isEaten(sel...
# Food Class class Food: def __init__(self, x, y): self.location = (x, y) self.eaten = False def getX(self): return self.location[0] def getY(self): return self.location[1] def setX(self, newX): self.location[0] = newX def setY(self, newY): self.location[1] = newY def isEaten(self): return se...
# Food Class class Food: def __init__(self, x, y): self.location = (x, y) self.eaten = False def getX(self): return self.location[0] def getY(self): return self.location[1] def setX(self, newX): self.location[0] = newX def setY(self, newY): self.location[1] = newY def isEaten(self): return ea...
<commit_before># Food Class class Food: def __init__(self, x, y): self.location = (x, y) self.eaten = False def getX(self): return self.location[0] def getY(self): return self.location[1] def setX(self, newX): self.location[0] = newX def setY(self, newY): self.location[1] = newY def isEaten(sel...
3912afaf9e069ae914c535af21155d10da930494
tests/unit/utils/test_translations.py
tests/unit/utils/test_translations.py
import subprocess import os from flask import current_app from babel.support import Translations, NullTranslations from flaskbb.utils.translations import FlaskBBDomain from flaskbb.extensions import plugin_manager def _compile_translations(): PLUGINS_FOLDER = os.path.join(current_app.root_path, "plugins") tra...
import subprocess import os from flask import current_app from babel.support import Translations, NullTranslations from flaskbb.utils.translations import FlaskBBDomain from flaskbb.extensions import plugin_manager def _remove_compiled_translations(): translations_folder = os.path.join(current_app.root_path, "tran...
Remove the compiled translations for testing
Remove the compiled translations for testing
Python
bsd-3-clause
zky001/flaskbb,realityone/flaskbb,dromanow/flaskbb,qitianchan/flaskbb,realityone/flaskbb,SeanChen0617/flaskbb,SeanChen0617/flaskbb-1,SeanChen0617/flaskbb,zky001/flaskbb,emile2016/flaskbb,China-jp/flaskbb,dromanow/flaskbb,lucius-feng/flaskbb,dromanow/flaskbb,SeanChen0617/flaskbb-1,qitianchan/flaskbb,emile2016/flaskbb,re...
import subprocess import os from flask import current_app from babel.support import Translations, NullTranslations from flaskbb.utils.translations import FlaskBBDomain from flaskbb.extensions import plugin_manager def _compile_translations(): PLUGINS_FOLDER = os.path.join(current_app.root_path, "plugins") tra...
import subprocess import os from flask import current_app from babel.support import Translations, NullTranslations from flaskbb.utils.translations import FlaskBBDomain from flaskbb.extensions import plugin_manager def _remove_compiled_translations(): translations_folder = os.path.join(current_app.root_path, "tran...
<commit_before>import subprocess import os from flask import current_app from babel.support import Translations, NullTranslations from flaskbb.utils.translations import FlaskBBDomain from flaskbb.extensions import plugin_manager def _compile_translations(): PLUGINS_FOLDER = os.path.join(current_app.root_path, "pl...
import subprocess import os from flask import current_app from babel.support import Translations, NullTranslations from flaskbb.utils.translations import FlaskBBDomain from flaskbb.extensions import plugin_manager def _remove_compiled_translations(): translations_folder = os.path.join(current_app.root_path, "tran...
import subprocess import os from flask import current_app from babel.support import Translations, NullTranslations from flaskbb.utils.translations import FlaskBBDomain from flaskbb.extensions import plugin_manager def _compile_translations(): PLUGINS_FOLDER = os.path.join(current_app.root_path, "plugins") tra...
<commit_before>import subprocess import os from flask import current_app from babel.support import Translations, NullTranslations from flaskbb.utils.translations import FlaskBBDomain from flaskbb.extensions import plugin_manager def _compile_translations(): PLUGINS_FOLDER = os.path.join(current_app.root_path, "pl...
03085721fed3bd5880cbd44c1b146acded6c7719
tardis_code_compare.py
tardis_code_compare.py
import os import pandas as pd import astropy.units as units class CodeComparisonOutputFile(object): first_column_name = 'VEL' def __init__(self, times, data_table, model_name, data_first_column): self.times = times self.data_table = data_table self.data_table.insert(0, 'wav', data_fir...
Add generation of spectral output file
Add generation of spectral output file
Python
bsd-3-clause
tardis-sn/tardisanalysis
Add generation of spectral output file
import os import pandas as pd import astropy.units as units class CodeComparisonOutputFile(object): first_column_name = 'VEL' def __init__(self, times, data_table, model_name, data_first_column): self.times = times self.data_table = data_table self.data_table.insert(0, 'wav', data_fir...
<commit_before> <commit_msg>Add generation of spectral output file<commit_after>
import os import pandas as pd import astropy.units as units class CodeComparisonOutputFile(object): first_column_name = 'VEL' def __init__(self, times, data_table, model_name, data_first_column): self.times = times self.data_table = data_table self.data_table.insert(0, 'wav', data_fir...
Add generation of spectral output fileimport os import pandas as pd import astropy.units as units class CodeComparisonOutputFile(object): first_column_name = 'VEL' def __init__(self, times, data_table, model_name, data_first_column): self.times = times self.data_table = data_table se...
<commit_before> <commit_msg>Add generation of spectral output file<commit_after>import os import pandas as pd import astropy.units as units class CodeComparisonOutputFile(object): first_column_name = 'VEL' def __init__(self, times, data_table, model_name, data_first_column): self.times = times ...
6daf3d416be4a54b8fbb4cbedc833d086b40fe9d
importlib_resources/tests/test_path.py
importlib_resources/tests/test_path.py
import io import os.path import pathlib import sys import unittest import importlib_resources as resources from . import data from . import util class CommonTests(util.CommonTests, unittest.TestCase): def execute(self, package, path): with resources.path(package, path): pass class PathTest...
import io import os.path import pathlib import sys import unittest import importlib_resources as resources from . import data from . import util class CommonTests(util.CommonTests, unittest.TestCase): def execute(self, package, path): with resources.path(package, path): pass class PathTest...
Test zip data for path()
Test zip data for path()
Python
apache-2.0
python/importlib_resources
import io import os.path import pathlib import sys import unittest import importlib_resources as resources from . import data from . import util class CommonTests(util.CommonTests, unittest.TestCase): def execute(self, package, path): with resources.path(package, path): pass class PathTest...
import io import os.path import pathlib import sys import unittest import importlib_resources as resources from . import data from . import util class CommonTests(util.CommonTests, unittest.TestCase): def execute(self, package, path): with resources.path(package, path): pass class PathTest...
<commit_before>import io import os.path import pathlib import sys import unittest import importlib_resources as resources from . import data from . import util class CommonTests(util.CommonTests, unittest.TestCase): def execute(self, package, path): with resources.path(package, path): pass ...
import io import os.path import pathlib import sys import unittest import importlib_resources as resources from . import data from . import util class CommonTests(util.CommonTests, unittest.TestCase): def execute(self, package, path): with resources.path(package, path): pass class PathTest...
import io import os.path import pathlib import sys import unittest import importlib_resources as resources from . import data from . import util class CommonTests(util.CommonTests, unittest.TestCase): def execute(self, package, path): with resources.path(package, path): pass class PathTest...
<commit_before>import io import os.path import pathlib import sys import unittest import importlib_resources as resources from . import data from . import util class CommonTests(util.CommonTests, unittest.TestCase): def execute(self, package, path): with resources.path(package, path): pass ...
8aa855fc2a0242f90301404062eaa3e62352d627
api/base/exceptions.py
api/base/exceptions.py
from rest_framework import status from rest_framework.exceptions import APIException, ParseError def json_api_exception_handler(exc, context): """ Custom exception handler that returns errors object as an array """ # Import inside method to avoid errors when the OSF is loaded without Django from rest_fr...
from rest_framework import status from rest_framework.exceptions import APIException, ParseError def json_api_exception_handler(exc, context): """ Custom exception handler that returns errors object as an array """ # Import inside method to avoid errors when the OSF is loaded without Django from rest_fr...
Use list comprehensions and consolidate error formatting where error details are either a list or a string.
Use list comprehensions and consolidate error formatting where error details are either a list or a string.
Python
apache-2.0
felliott/osf.io,samchrisinger/osf.io,Ghalko/osf.io,kch8qx/osf.io,kwierman/osf.io,acshi/osf.io,CenterForOpenScience/osf.io,emetsger/osf.io,haoyuchen1992/osf.io,kwierman/osf.io,kch8qx/osf.io,cslzchen/osf.io,arpitar/osf.io,kwierman/osf.io,billyhunt/osf.io,mattclark/osf.io,danielneis/osf.io,danielneis/osf.io,cwisecarver/os...
from rest_framework import status from rest_framework.exceptions import APIException, ParseError def json_api_exception_handler(exc, context): """ Custom exception handler that returns errors object as an array """ # Import inside method to avoid errors when the OSF is loaded without Django from rest_fr...
from rest_framework import status from rest_framework.exceptions import APIException, ParseError def json_api_exception_handler(exc, context): """ Custom exception handler that returns errors object as an array """ # Import inside method to avoid errors when the OSF is loaded without Django from rest_fr...
<commit_before> from rest_framework import status from rest_framework.exceptions import APIException, ParseError def json_api_exception_handler(exc, context): """ Custom exception handler that returns errors object as an array """ # Import inside method to avoid errors when the OSF is loaded without Django ...
from rest_framework import status from rest_framework.exceptions import APIException, ParseError def json_api_exception_handler(exc, context): """ Custom exception handler that returns errors object as an array """ # Import inside method to avoid errors when the OSF is loaded without Django from rest_fr...
from rest_framework import status from rest_framework.exceptions import APIException, ParseError def json_api_exception_handler(exc, context): """ Custom exception handler that returns errors object as an array """ # Import inside method to avoid errors when the OSF is loaded without Django from rest_fr...
<commit_before> from rest_framework import status from rest_framework.exceptions import APIException, ParseError def json_api_exception_handler(exc, context): """ Custom exception handler that returns errors object as an array """ # Import inside method to avoid errors when the OSF is loaded without Django ...
e84a06ea851a81648ba6ee54c88a61c049e913f2
gorilla/__init__.py
gorilla/__init__.py
# __ __ __ # .-----.-----.----|__| | .---.-. # | _ | _ | _| | | | _ | # |___ |_____|__| |__|__|__|___._| # |_____| # """ gorilla ~~~~~~~ Convenient approach to monkey patching. :copyright: Copyright 2014-2016 by Christopher Crouzet. :license: MIT, see LIC...
# __ __ __ # .-----.-----.----|__| | .---.-. # | _ | _ | _| | | | _ | # |___ |_____|__| |__|__|__|___._| # |_____| # """ gorilla ~~~~~~~ Convenient approach to monkey patching. :copyright: Copyright 2014-2016 by Christopher Crouzet. :license: MIT, see LIC...
Remove the `get_original_attribute` shortcut from the root module.
Remove the `get_original_attribute` shortcut from the root module.
Python
mit
christophercrouzet/gorilla
# __ __ __ # .-----.-----.----|__| | .---.-. # | _ | _ | _| | | | _ | # |___ |_____|__| |__|__|__|___._| # |_____| # """ gorilla ~~~~~~~ Convenient approach to monkey patching. :copyright: Copyright 2014-2016 by Christopher Crouzet. :license: MIT, see LIC...
# __ __ __ # .-----.-----.----|__| | .---.-. # | _ | _ | _| | | | _ | # |___ |_____|__| |__|__|__|___._| # |_____| # """ gorilla ~~~~~~~ Convenient approach to monkey patching. :copyright: Copyright 2014-2016 by Christopher Crouzet. :license: MIT, see LIC...
<commit_before># __ __ __ # .-----.-----.----|__| | .---.-. # | _ | _ | _| | | | _ | # |___ |_____|__| |__|__|__|___._| # |_____| # """ gorilla ~~~~~~~ Convenient approach to monkey patching. :copyright: Copyright 2014-2016 by Christopher Crouzet. :licens...
# __ __ __ # .-----.-----.----|__| | .---.-. # | _ | _ | _| | | | _ | # |___ |_____|__| |__|__|__|___._| # |_____| # """ gorilla ~~~~~~~ Convenient approach to monkey patching. :copyright: Copyright 2014-2016 by Christopher Crouzet. :license: MIT, see LIC...
# __ __ __ # .-----.-----.----|__| | .---.-. # | _ | _ | _| | | | _ | # |___ |_____|__| |__|__|__|___._| # |_____| # """ gorilla ~~~~~~~ Convenient approach to monkey patching. :copyright: Copyright 2014-2016 by Christopher Crouzet. :license: MIT, see LIC...
<commit_before># __ __ __ # .-----.-----.----|__| | .---.-. # | _ | _ | _| | | | _ | # |___ |_____|__| |__|__|__|___._| # |_____| # """ gorilla ~~~~~~~ Convenient approach to monkey patching. :copyright: Copyright 2014-2016 by Christopher Crouzet. :licens...
7b382ac1dda54b30fb02dff681b031368f72eb42
httpobs/__init__.py
httpobs/__init__.py
SOURCE_URL = 'https://github.com/mozilla/http-observatory' VERSION = '0.9.2'
SOURCE_URL = 'https://github.com/mozilla/http-observatory' VERSION = '0.9.3'
Increment release version to 0.9.3
Increment release version to 0.9.3
Python
mpl-2.0
mozilla/http-observatory,mozilla/http-observatory,mozilla/http-observatory,april/http-observatory,april/http-observatory,april/http-observatory
SOURCE_URL = 'https://github.com/mozilla/http-observatory' VERSION = '0.9.2' Increment release version to 0.9.3
SOURCE_URL = 'https://github.com/mozilla/http-observatory' VERSION = '0.9.3'
<commit_before>SOURCE_URL = 'https://github.com/mozilla/http-observatory' VERSION = '0.9.2' <commit_msg>Increment release version to 0.9.3<commit_after>
SOURCE_URL = 'https://github.com/mozilla/http-observatory' VERSION = '0.9.3'
SOURCE_URL = 'https://github.com/mozilla/http-observatory' VERSION = '0.9.2' Increment release version to 0.9.3SOURCE_URL = 'https://github.com/mozilla/http-observatory' VERSION = '0.9.3'
<commit_before>SOURCE_URL = 'https://github.com/mozilla/http-observatory' VERSION = '0.9.2' <commit_msg>Increment release version to 0.9.3<commit_after>SOURCE_URL = 'https://github.com/mozilla/http-observatory' VERSION = '0.9.3'
9580418cfaaacd0f324df3337e332de4410cb3d1
server_dev.py
server_dev.py
import projects from flask import Flask, render_template, abort app = Flask(__name__) @app.errorhandler(404) def page_not_found(e): return render_template('404.html'), 404 @app.route('/') def index(): project_list = projects.get_projects() return render_template('index.html', projects=project_list) @app...
import projects from flask import Flask, render_template, abort app = Flask(__name__) def route(*a, **kw): kw['strict_slashes'] = kw.get('strict_slashes', False) return app.route(*a, **kw) @app.errorhandler(404) def page_not_found(e): return render_template('404.html'), 404 @route('/') def index(): ...
Refactor slash-unpickiness as a function and redecorate
Refactor slash-unpickiness as a function and redecorate
Python
mit
teslaworksumn/teslaworks.net,teslaworksumn/teslaworks.net
import projects from flask import Flask, render_template, abort app = Flask(__name__) @app.errorhandler(404) def page_not_found(e): return render_template('404.html'), 404 @app.route('/') def index(): project_list = projects.get_projects() return render_template('index.html', projects=project_list) @app...
import projects from flask import Flask, render_template, abort app = Flask(__name__) def route(*a, **kw): kw['strict_slashes'] = kw.get('strict_slashes', False) return app.route(*a, **kw) @app.errorhandler(404) def page_not_found(e): return render_template('404.html'), 404 @route('/') def index(): ...
<commit_before>import projects from flask import Flask, render_template, abort app = Flask(__name__) @app.errorhandler(404) def page_not_found(e): return render_template('404.html'), 404 @app.route('/') def index(): project_list = projects.get_projects() return render_template('index.html', projects=proj...
import projects from flask import Flask, render_template, abort app = Flask(__name__) def route(*a, **kw): kw['strict_slashes'] = kw.get('strict_slashes', False) return app.route(*a, **kw) @app.errorhandler(404) def page_not_found(e): return render_template('404.html'), 404 @route('/') def index(): ...
import projects from flask import Flask, render_template, abort app = Flask(__name__) @app.errorhandler(404) def page_not_found(e): return render_template('404.html'), 404 @app.route('/') def index(): project_list = projects.get_projects() return render_template('index.html', projects=project_list) @app...
<commit_before>import projects from flask import Flask, render_template, abort app = Flask(__name__) @app.errorhandler(404) def page_not_found(e): return render_template('404.html'), 404 @app.route('/') def index(): project_list = projects.get_projects() return render_template('index.html', projects=proj...
ddab25e03c96ad6c4950ee38fe5dcd73da5aa05c
shared/api.py
shared/api.py
from __future__ import print_function import boto3 import json import os import btr3baseball jobTable = os.environ['JOB_TABLE'] jobQueue = os.environ['JOB_QUEUE'] queue = boto3.resource('sqs').get_queue_by_name(QueueName=jobQueue) jobRepo = btr3baseball.JobRepository(jobTable) dsRepo = btr3baseball.DatasourceReposito...
from __future__ import print_function import boto3 import json import os import btr3baseball jobTable = os.environ['JOB_TABLE'] jobQueue = os.environ['JOB_QUEUE'] queue = boto3.resource('sqs').get_queue_by_name(QueueName=jobQueue) jobRepo = btr3baseball.JobRepository(jobTable) dsRepo = btr3baseball.DatasourceReposito...
Add wrapper for event data elem
Add wrapper for event data elem
Python
apache-2.0
bryantrobbins/baseball,bryantrobbins/baseball,bryantrobbins/baseball,bryantrobbins/baseball,bryantrobbins/baseball
from __future__ import print_function import boto3 import json import os import btr3baseball jobTable = os.environ['JOB_TABLE'] jobQueue = os.environ['JOB_QUEUE'] queue = boto3.resource('sqs').get_queue_by_name(QueueName=jobQueue) jobRepo = btr3baseball.JobRepository(jobTable) dsRepo = btr3baseball.DatasourceReposito...
from __future__ import print_function import boto3 import json import os import btr3baseball jobTable = os.environ['JOB_TABLE'] jobQueue = os.environ['JOB_QUEUE'] queue = boto3.resource('sqs').get_queue_by_name(QueueName=jobQueue) jobRepo = btr3baseball.JobRepository(jobTable) dsRepo = btr3baseball.DatasourceReposito...
<commit_before>from __future__ import print_function import boto3 import json import os import btr3baseball jobTable = os.environ['JOB_TABLE'] jobQueue = os.environ['JOB_QUEUE'] queue = boto3.resource('sqs').get_queue_by_name(QueueName=jobQueue) jobRepo = btr3baseball.JobRepository(jobTable) dsRepo = btr3baseball.Dat...
from __future__ import print_function import boto3 import json import os import btr3baseball jobTable = os.environ['JOB_TABLE'] jobQueue = os.environ['JOB_QUEUE'] queue = boto3.resource('sqs').get_queue_by_name(QueueName=jobQueue) jobRepo = btr3baseball.JobRepository(jobTable) dsRepo = btr3baseball.DatasourceReposito...
from __future__ import print_function import boto3 import json import os import btr3baseball jobTable = os.environ['JOB_TABLE'] jobQueue = os.environ['JOB_QUEUE'] queue = boto3.resource('sqs').get_queue_by_name(QueueName=jobQueue) jobRepo = btr3baseball.JobRepository(jobTable) dsRepo = btr3baseball.DatasourceReposito...
<commit_before>from __future__ import print_function import boto3 import json import os import btr3baseball jobTable = os.environ['JOB_TABLE'] jobQueue = os.environ['JOB_QUEUE'] queue = boto3.resource('sqs').get_queue_by_name(QueueName=jobQueue) jobRepo = btr3baseball.JobRepository(jobTable) dsRepo = btr3baseball.Dat...
d1911215a0c7043c5011da55707f6a40938c7d59
alarme/extras/sensor/web/views/home.py
alarme/extras/sensor/web/views/home.py
from aiohttp.web import HTTPFound from .core import CoreView from ..util import login_required, handle_exception class Home(CoreView): @login_required async def req(self): return HTTPFound(self.request.app.router.get('control').url()) @handle_exception async def get(self): self.sens...
from aiohttp.web import HTTPFound from .core import CoreView from ..util import login_required, handle_exception class Home(CoreView): @login_required async def req(self): return HTTPFound(self.request.app.router.get('control').url()) @handle_exception async def get(self): return aw...
Remove debug app exit on / access (web sensor)
Remove debug app exit on / access (web sensor)
Python
mit
insolite/alarme,insolite/alarme,insolite/alarme
from aiohttp.web import HTTPFound from .core import CoreView from ..util import login_required, handle_exception class Home(CoreView): @login_required async def req(self): return HTTPFound(self.request.app.router.get('control').url()) @handle_exception async def get(self): self.sens...
from aiohttp.web import HTTPFound from .core import CoreView from ..util import login_required, handle_exception class Home(CoreView): @login_required async def req(self): return HTTPFound(self.request.app.router.get('control').url()) @handle_exception async def get(self): return aw...
<commit_before>from aiohttp.web import HTTPFound from .core import CoreView from ..util import login_required, handle_exception class Home(CoreView): @login_required async def req(self): return HTTPFound(self.request.app.router.get('control').url()) @handle_exception async def get(self): ...
from aiohttp.web import HTTPFound from .core import CoreView from ..util import login_required, handle_exception class Home(CoreView): @login_required async def req(self): return HTTPFound(self.request.app.router.get('control').url()) @handle_exception async def get(self): return aw...
from aiohttp.web import HTTPFound from .core import CoreView from ..util import login_required, handle_exception class Home(CoreView): @login_required async def req(self): return HTTPFound(self.request.app.router.get('control').url()) @handle_exception async def get(self): self.sens...
<commit_before>from aiohttp.web import HTTPFound from .core import CoreView from ..util import login_required, handle_exception class Home(CoreView): @login_required async def req(self): return HTTPFound(self.request.app.router.get('control').url()) @handle_exception async def get(self): ...
41deccb4cde9d553db021f1da90759b4b1b14665
picaxe/urls.py
picaxe/urls.py
from django.conf.urls import patterns, include, url from django.contrib import admin urlpatterns = patterns('', # Examples: # url(r'^$', 'picaxe.views.home', name='home'), # url(r'^blog/', include('blog.urls')), url(r'^admin/', include(admin.site.urls)), url(r'photologue/', include('photologue.url...
from django.conf.urls import patterns, include, url from django.contrib import admin from django.contrib.sites.models import Site urlpatterns = patterns('', # Examples: # url(r'^$', 'picaxe.views.home', name='home'), # url(r'^blog/', include('blog.urls')), url(r'^admin/', include(admin.site.urls)), ...
Remove django.contrib.sites from admin interface
Remove django.contrib.sites from admin interface
Python
mit
TuinfeesT/PicAxe
from django.conf.urls import patterns, include, url from django.contrib import admin urlpatterns = patterns('', # Examples: # url(r'^$', 'picaxe.views.home', name='home'), # url(r'^blog/', include('blog.urls')), url(r'^admin/', include(admin.site.urls)), url(r'photologue/', include('photologue.url...
from django.conf.urls import patterns, include, url from django.contrib import admin from django.contrib.sites.models import Site urlpatterns = patterns('', # Examples: # url(r'^$', 'picaxe.views.home', name='home'), # url(r'^blog/', include('blog.urls')), url(r'^admin/', include(admin.site.urls)), ...
<commit_before>from django.conf.urls import patterns, include, url from django.contrib import admin urlpatterns = patterns('', # Examples: # url(r'^$', 'picaxe.views.home', name='home'), # url(r'^blog/', include('blog.urls')), url(r'^admin/', include(admin.site.urls)), url(r'photologue/', include(...
from django.conf.urls import patterns, include, url from django.contrib import admin from django.contrib.sites.models import Site urlpatterns = patterns('', # Examples: # url(r'^$', 'picaxe.views.home', name='home'), # url(r'^blog/', include('blog.urls')), url(r'^admin/', include(admin.site.urls)), ...
from django.conf.urls import patterns, include, url from django.contrib import admin urlpatterns = patterns('', # Examples: # url(r'^$', 'picaxe.views.home', name='home'), # url(r'^blog/', include('blog.urls')), url(r'^admin/', include(admin.site.urls)), url(r'photologue/', include('photologue.url...
<commit_before>from django.conf.urls import patterns, include, url from django.contrib import admin urlpatterns = patterns('', # Examples: # url(r'^$', 'picaxe.views.home', name='home'), # url(r'^blog/', include('blog.urls')), url(r'^admin/', include(admin.site.urls)), url(r'photologue/', include(...
3bf64037a2b8da9704a7da2f1546b6e5e0a3c78e
panoptes_client/avatar.py
panoptes_client/avatar.py
from panoptes_client.panoptes import ( Panoptes, PanoptesAPIException, PanoptesObject, LinkResolver, ) from panoptes_client.project import Project class Avatar(PanoptesObject): _api_slug = 'avatar' _link_slug = 'avatars' _edit_attributes = () @classmethod def http_get(cls, path, pa...
from panoptes_client.panoptes import ( Panoptes, PanoptesAPIException, PanoptesObject, LinkResolver, ) from panoptes_client.project import Project class Avatar(PanoptesObject): _api_slug = 'avatar' _link_slug = 'avatars' _edit_attributes = () @classmethod def http_get(cls, path, p...
Add blank lines according to hound
Add blank lines according to hound
Python
apache-2.0
zooniverse/panoptes-python-client
from panoptes_client.panoptes import ( Panoptes, PanoptesAPIException, PanoptesObject, LinkResolver, ) from panoptes_client.project import Project class Avatar(PanoptesObject): _api_slug = 'avatar' _link_slug = 'avatars' _edit_attributes = () @classmethod def http_get(cls, path, pa...
from panoptes_client.panoptes import ( Panoptes, PanoptesAPIException, PanoptesObject, LinkResolver, ) from panoptes_client.project import Project class Avatar(PanoptesObject): _api_slug = 'avatar' _link_slug = 'avatars' _edit_attributes = () @classmethod def http_get(cls, path, p...
<commit_before>from panoptes_client.panoptes import ( Panoptes, PanoptesAPIException, PanoptesObject, LinkResolver, ) from panoptes_client.project import Project class Avatar(PanoptesObject): _api_slug = 'avatar' _link_slug = 'avatars' _edit_attributes = () @classmethod def http_ge...
from panoptes_client.panoptes import ( Panoptes, PanoptesAPIException, PanoptesObject, LinkResolver, ) from panoptes_client.project import Project class Avatar(PanoptesObject): _api_slug = 'avatar' _link_slug = 'avatars' _edit_attributes = () @classmethod def http_get(cls, path, p...
from panoptes_client.panoptes import ( Panoptes, PanoptesAPIException, PanoptesObject, LinkResolver, ) from panoptes_client.project import Project class Avatar(PanoptesObject): _api_slug = 'avatar' _link_slug = 'avatars' _edit_attributes = () @classmethod def http_get(cls, path, pa...
<commit_before>from panoptes_client.panoptes import ( Panoptes, PanoptesAPIException, PanoptesObject, LinkResolver, ) from panoptes_client.project import Project class Avatar(PanoptesObject): _api_slug = 'avatar' _link_slug = 'avatars' _edit_attributes = () @classmethod def http_ge...
32cdc4fa334f3d415c0ce8f4fa37fa7d4c721915
fabfile.py
fabfile.py
import os from fabric.api import task, run, local, sudo, cd, env env.hosts = [ os.environ['TWWEB_HOST'], ] def virtualenv(command, user=None): run('source /var/www/envs/twweb/bin/activate && ' + command) @task def deploy(): local('git push origin development') local('git checkout master') loc...
import os from fabric.api import task, run, local, sudo, cd, env env.hosts = [ os.environ['TWWEB_HOST'], ] def virtualenv(command, user=None): run('source /var/www/envs/twweb/bin/activate && ' + command) @task def deploy(): local('git push origin development') local('git checkout master') loc...
Use shell=False when chowning logs folder.
Use shell=False when chowning logs folder.
Python
agpl-3.0
coddingtonbear/inthe.am,coddingtonbear/inthe.am,coddingtonbear/inthe.am,coddingtonbear/inthe.am,coddingtonbear/inthe.am
import os from fabric.api import task, run, local, sudo, cd, env env.hosts = [ os.environ['TWWEB_HOST'], ] def virtualenv(command, user=None): run('source /var/www/envs/twweb/bin/activate && ' + command) @task def deploy(): local('git push origin development') local('git checkout master') loc...
import os from fabric.api import task, run, local, sudo, cd, env env.hosts = [ os.environ['TWWEB_HOST'], ] def virtualenv(command, user=None): run('source /var/www/envs/twweb/bin/activate && ' + command) @task def deploy(): local('git push origin development') local('git checkout master') loc...
<commit_before>import os from fabric.api import task, run, local, sudo, cd, env env.hosts = [ os.environ['TWWEB_HOST'], ] def virtualenv(command, user=None): run('source /var/www/envs/twweb/bin/activate && ' + command) @task def deploy(): local('git push origin development') local('git checkout m...
import os from fabric.api import task, run, local, sudo, cd, env env.hosts = [ os.environ['TWWEB_HOST'], ] def virtualenv(command, user=None): run('source /var/www/envs/twweb/bin/activate && ' + command) @task def deploy(): local('git push origin development') local('git checkout master') loc...
import os from fabric.api import task, run, local, sudo, cd, env env.hosts = [ os.environ['TWWEB_HOST'], ] def virtualenv(command, user=None): run('source /var/www/envs/twweb/bin/activate && ' + command) @task def deploy(): local('git push origin development') local('git checkout master') loc...
<commit_before>import os from fabric.api import task, run, local, sudo, cd, env env.hosts = [ os.environ['TWWEB_HOST'], ] def virtualenv(command, user=None): run('source /var/www/envs/twweb/bin/activate && ' + command) @task def deploy(): local('git push origin development') local('git checkout m...