commit stringlengths 40 40 | subject stringlengths 4 1.73k | repos stringlengths 5 127k | old_file stringlengths 2 751 | new_file stringlengths 2 751 | new_contents stringlengths 1 8.98k | old_contents stringlengths 0 6.59k | license stringclasses 13
values | lang stringclasses 23
values |
|---|---|---|---|---|---|---|---|---|
8cce0f9789673c9b4033fa2685b6da24d8d53147 | Bump vers for OE POS taggers | LBenzahia/cltk,TylerKirby/cltk,TylerKirby/cltk,LBenzahia/cltk,kylepjohnson/cltk,diyclassics/cltk,D-K-E/cltk,cltk/cltk | setup.py | setup.py | """Config for PyPI."""
from setuptools import find_packages
from setuptools import setup
setup(
author='Kyle P. Johnson',
author_email='kyle@kyle-p-johnson.com',
classifiers=[
'Intended Audience :: Education',
'Intended Audience :: Science/Research',
'License :: OSI Approved :: MI... | """Config for PyPI."""
from setuptools import find_packages
from setuptools import setup
setup(
author='Kyle P. Johnson',
author_email='kyle@kyle-p-johnson.com',
classifiers=[
'Intended Audience :: Education',
'Intended Audience :: Science/Research',
'License :: OSI Approved :: MI... | mit | Python |
b8fb03a8945f1a895c8f5e55f01a6d4219aa745a | Add metadata | nicholasbishop/pyglsl_parser,nicholasbishop/pyglsl_parser | setup.py | setup.py | #! /usr/bin/env python
# pylint: disable=invalid-name,missing-docstring
from setuptools import setup
from setuptools.extension import Extension
from Cython.Build import cythonize
extensions = [
Extension(
name='pyglsl_parser.parser',
sources=['pyglsl_parser/parser.pyx',
'glsl-par... | #! /usr/bin/env python
# pylint: disable=invalid-name,missing-docstring
from setuptools import setup
from setuptools.extension import Extension
from Cython.Build import cythonize
extensions = [
Extension(
name='pyglsl_parser.parser',
sources=['pyglsl_parser/parser.pyx',
'glsl-par... | mit | Python |
a3a51b905ec92b5f11c5dec5d9eed455c992fb86 | Update version of cluster package pulled in. | getwarped/powershift-cli,getwarped/powershift-cli | setup.py | setup.py | import sys
import os
from setuptools import setup
long_description = open('README.rst').read()
classifiers = [
'Development Status :: 4 - Beta',
'License :: OSI Approved :: BSD License',
'Programming Language :: Python :: 2',
'Programming Language :: Python :: 2.7',
'Programming Language :: Pytho... | import sys
import os
from setuptools import setup
long_description = open('README.rst').read()
classifiers = [
'Development Status :: 4 - Beta',
'License :: OSI Approved :: BSD License',
'Programming Language :: Python :: 2',
'Programming Language :: Python :: 2.7',
'Programming Language :: Pytho... | bsd-2-clause | Python |
27e2b252db2e2372d98996b3768683cfcd5b8bc2 | bump version number | codeforamerica/w-drive-extractor | setup.py | setup.py | from setuptools import setup, find_packages
from os import path
here = path.abspath(path.dirname(__file__))
# convert .md to .rst; from here: http://stackoverflow.com/questions/10718767/have-the-same-readme-both-in-markdown-and-restructuredtext
try:
from pypandoc import convert
long_description = convert(path... | from setuptools import setup, find_packages
from os import path
here = path.abspath(path.dirname(__file__))
# convert .md to .rst; from here: http://stackoverflow.com/questions/10718767/have-the-same-readme-both-in-markdown-and-restructuredtext
try:
from pypandoc import convert
long_description = convert(path... | mit | Python |
5550b2feb24ee4f8f527182c115018b170f0d2cc | update version in setup file | fritzprix/jconfigpy,fritzprix/jconfigpy | setup.py | setup.py | import os
from setuptools import setup
# Utility function to read the README file.
# Used for the long_description. It's nice, because now 1) we have a top level
# README file and 2) it's easier to type in the README file than to put a raw
# string in below ...
def read(fname):
return open(os.path.join(... | import os
from setuptools import setup
# Utility function to read the README file.
# Used for the long_description. It's nice, because now 1) we have a top level
# README file and 2) it's easier to type in the README file than to put a raw
# string in below ...
def read(fname):
return open(os.path.join(... | bsd-2-clause | Python |
f8babfd27fdc8c618fe8827d8a2cc4cf3153a1ad | support form Flask-WTF bigger then 0.8, aim for python 3 | qpxu007/Flask-AppBuilder,rpiotti/Flask-AppBuilder,qpxu007/Flask-AppBuilder,zhounanshu/Flask-AppBuilder,dpgaspar/Flask-AppBuilder,dpgaspar/Flask-AppBuilder,rpiotti/Flask-AppBuilder,qpxu007/Flask-AppBuilder,zhounanshu/Flask-AppBuilder,qpxu007/Flask-AppBuilder,zhounanshu/Flask-AppBuilder,dpgaspar/Flask-AppBuilder,rpiotti/... | setup.py | setup.py | import os
import sys
from setuptools import setup, find_packages
def fpath(name):
return os.path.join(os.path.dirname(__file__), name)
def read(fname):
return open(fpath(fname)).read()
def desc():
return read('README.rst')
setup(
name='Flask-AppBuilder',
version='0.8.1',
url='https://github.... | import os
import sys
from setuptools import setup, find_packages
def fpath(name):
return os.path.join(os.path.dirname(__file__), name)
def read(fname):
return open(fpath(fname)).read()
def desc():
return read('README.rst')
setup(
name='Flask-AppBuilder',
version='0.8.1',
url='https://github.... | bsd-3-clause | Python |
b0ec026a6f75f03073de6de3fb2f7bfaff7b6d70 | Update version number to 0.11 | google/empirical_calibration | setup.py | setup.py | # Copyright 2019 The Empirical Calibration Authors.
#
# 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
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law o... | # Copyright 2019 The Empirical Calibration Authors.
#
# 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
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law o... | apache-2.0 | Python |
327b4a656347951b1b6bed1f04465dffc5011ec1 | Update setup.py | rfverbruggen/rachiopy | setup.py | setup.py | """Rachiopy setup script."""
from setuptools import find_packages, setup
VERSION = "1.0.0"
GITHUB_USERNAME = "rfverbruggen"
GITHUB_REPOSITORY = "rachiopy"
GITHUB_PATH = f"{GITHUB_USERNAME}/{GITHUB_REPOSITORY}"
GITHUB_URL = f"https://github.com/{GITHUB_PATH}"
DOWNLOAD_URL = f"{GITHUB_URL}/archive/{VERSION}.tar.gz"
P... | """Rachiopy setup script."""
from setuptools import find_packages, setup
from datetime import datetime
VERSION = "1.0.0"
GITHUB_USERNAME = "rfverbruggen"
GITHUB_REPOSITORY = "rachiopy"
GITHUB_PATH = f"{GITHUB_USERNAME}/{GITHUB_REPOSITORY}"
GITHUB_URL = f"https://github.com/{GITHUB_PATH}"
DOWNLOAD_URL = f"{GITHUB_UR... | mit | Python |
f91007560497d370b7451d212ad91dd23b47c892 | Create version 0.3.22 | Duke-GCB/DukeDSClient,Duke-GCB/DukeDSClient | setup.py | setup.py | from setuptools import setup
setup(name='DukeDSClient',
version='0.3.22',
description='Command line tool(ddsclient) to upload/manage projects on the duke-data-service.',
url='https://github.com/Duke-GCB/DukeDSClient',
keywords='duke dds dukedataservice',
author='John Bradley',
... | from setuptools import setup
setup(name='DukeDSClient',
version='0.3.21',
description='Command line tool(ddsclient) to upload/manage projects on the duke-data-service.',
url='https://github.com/Duke-GCB/DukeDSClient',
keywords='duke dds dukedataservice',
author='John Bradley',
... | mit | Python |
4c15430e02c12f190b95791681f20f1a36a016d9 | Add Python 3.4 classifier | mnaberez/py65,mkeller0815/py65 | setup.py | setup.py | __version__ = '0.21-dev'
import os
import sys
py_version = sys.version_info[:2]
PY3 = py_version[0] == 3
if PY3:
if py_version < (3, 2):
raise RuntimeError('On Python 3, Py65 requires Python 3.2 or later')
else:
if py_version < (2, 6):
raise RuntimeError('On Python 2, Py65 requires Python 2.6... | __version__ = '0.21-dev'
import os
import sys
py_version = sys.version_info[:2]
PY3 = py_version[0] == 3
if PY3:
if py_version < (3, 2):
raise RuntimeError('On Python 3, Py65 requires Python 3.2 or later')
else:
if py_version < (2, 6):
raise RuntimeError('On Python 2, Py65 requires Python 2.6... | bsd-3-clause | Python |
f31d7a224d0c5a3c2b1d2b16fb4bc74edefacf24 | Bump version string | madisongh/autobuilder | setup.py | setup.py | from setuptools import setup, find_packages
setup(
name='autobuilder',
version='0.6.7',
packages=find_packages(),
license='MIT',
author='Matt Madison',
author_email='matt@madison.systems',
install_requires=['buildbot>=0.8.12m1']
)
| from setuptools import setup, find_packages
setup(
name='autobuilder',
version='0.6.6',
packages=find_packages(),
license='MIT',
author='Matt Madison',
author_email='matt@madison.systems',
install_requires=['buildbot>=0.8.12m1']
)
| mit | Python |
014acee66b9cff26cb8f02f65c071f78a0a77e19 | Bump version to 0.9.4pbs22 | pbs/cmsplugin-filer,pbs/cmsplugin-filer,pbs/cmsplugin-filer,pbs/cmsplugin-filer | setup.py | setup.py | import os
from setuptools import setup, find_packages
def read(fname):
return open(os.path.join(os.path.dirname(__file__), fname)).read()
dependency_links = [
'http://github.com/pbs/django-cms/tarball/support/2.3.x#egg=django-cms-2.3.5pbs.X.dev',
'http://github.com/pbs/django-filer/tarball/master_pbs#egg=... | import os
from setuptools import setup, find_packages
def read(fname):
return open(os.path.join(os.path.dirname(__file__), fname)).read()
dependency_links = [
'http://github.com/pbs/django-cms/tarball/support/2.3.x#egg=django-cms-2.3.5pbs.X.dev',
'http://github.com/pbs/django-filer/tarball/master_pbs#egg=... | bsd-3-clause | Python |
c53b8a0a06596d9803a8df92e909d4ad28169dda | Update the cookiedomain requirement to 0.6, which has httponly. | FND/tiddlyspace,TiddlySpace/tiddlyspace,TiddlySpace/tiddlyspace,FND/tiddlyspace,FND/tiddlyspace,TiddlySpace/tiddlyspace | setup.py | setup.py | AUTHOR = 'Osmosoft'
AUTHOR_EMAIL = 'tiddlyspace@osmosoft.com'
NAME = 'tiddlywebplugins.tiddlyspace'
DESCRIPTION = 'A discoursive social model for TiddlyWiki'
VERSION = '0.2.2' # N.B.: duplicate of tiddlywebplugins.tiddlyspace.__init__
import os
from setuptools import setup, find_packages
setup(
namespace_packa... | AUTHOR = 'Osmosoft'
AUTHOR_EMAIL = 'tiddlyspace@osmosoft.com'
NAME = 'tiddlywebplugins.tiddlyspace'
DESCRIPTION = 'A discoursive social model for TiddlyWiki'
VERSION = '0.2.2' # N.B.: duplicate of tiddlywebplugins.tiddlyspace.__init__
import os
from setuptools import setup, find_packages
setup(
namespace_packa... | bsd-3-clause | Python |
07656b928c506c0f9d602a5c4195793b5e449693 | test fix | GiovanniMCMXCIX/async-connect.py | setup.py | setup.py | from setuptools import setup, find_packages
import sys
import re
with open('requirements.txt') as f:
requirements = f.readlines()
with open('async_connect/__init__.py') as f:
version = re.search(r'^__version__\s*=\s*[\'"]([^\'"]*)[\'"]', f.read(), re.MULTILINE).group(1)
with open('README.rst') as f:
read... | from setuptools import setup, find_packages
import re
with open('requirements.txt') as f:
requirements = f.readlines()
with open('async_connect/__init__.py') as f:
version = re.search(r'^__version__\s*=\s*[\'"]([^\'"]*)[\'"]', f.read(), re.MULTILINE).group(1)
with open('README.rst') as f:
readme = f.read... | mit | Python |
ca62972886bcaef6375e78e32514883183f50929 | bump version UP! Align to pypi | b3nab/instapy-cli,b3nab/instapy-cli | setup.py | setup.py | import os
import codecs
from setuptools import setup, find_packages
here = os.path.abspath(os.path.dirname(__file__))
def read(*parts):
"""
Build an absolute path from *parts* and and return the contents of the
resulting file. Assume UTF-8 encoding.
"""
with codecs.open(os.path.join(here, *parts... | import os
from setuptools import setup, find_packages
here = os.path.abspath(os.path.dirname(__file__))
setup(
name='instapy-cli',
version='0.0.1',
description='Python library and cli used to upload photo on Instagram. W/o a phone!',
long_description=open('README.md.rst').read(),
classifiers=[
... | mit | Python |
47dd0d3f9d5d150adad7097bb2a24964f3c732b2 | add pytest dep | williballenthin/python-evtx | setup.py | setup.py | #!/usr/bin/env python
import setuptools
long_description = """python-evtx is a pure Python parser for \
Windows Event Log files (those with the file extension ".evtx"). \
The module provides programmatic access to the File and Chunk headers, \
record templates, and event entries. For example, you can use \
python-evt... | #!/usr/bin/env python
import setuptools
long_description = """python-evtx is a pure Python parser for \
Windows Event Log files (those with the file extension ".evtx"). \
The module provides programmatic access to the File and Chunk headers, \
record templates, and event entries. For example, you can use \
python-evt... | apache-2.0 | Python |
f3cc4d84fbfcb430b004d730e44653079b3b3490 | Update version to 1.6 | zillolo/vsut-python | setup.py | setup.py | import os
from setuptools import setup
def read(file):
return open(os.path.join(os.path.dirname(__file__), file)).read()
setup(
name="vsut",
version="1.6",
author="Alex Egger",
author_email="alex.egger96@gmail.com",
description="A simple unit testing framework for Python 3.4",
license="MIT... | import os
from setuptools import setup
def read(file):
return open(os.path.join(os.path.dirname(__file__), file)).read()
setup(
name="vsut",
version="1.5.5",
author="Alex Egger",
author_email="alex.egger96@gmail.com",
description="A simple unit testing framework for Python 3.4",
license="M... | mit | Python |
5ea089d150a7e6132670ab92521bf763b1e719bf | bump version to 0.2 | srittau/python-htmlgen | setup.py | setup.py | #!/usr/bin/python
from setuptools import setup
setup(
name="htmlgen",
version="0.2",
description="HTML 5 Generator",
author="Sebastian Rittau",
author_email="srittau@rittau.biz",
url="https://github.com/srittau/python-htmlgen",
packages=["htmlgen", "test_htmlgen"],
depends=["asserts"]... | #!/usr/bin/python
from setuptools import setup
setup(
name="htmlgen",
version="0.1",
description="HTML 5 Generator",
author="Sebastian Rittau",
author_email="srittau@rittau.biz",
url="https://github.com/srittau/python-htmlgen",
packages=["htmlgen", "test_htmlgen"],
depends=["asserts"]... | mit | Python |
7cfe670f621ac8ee7723e80c279a9794dc0a1bb9 | update docker version | Jeff-Wang93/vent,cglewis/vent,CyberReboot/vent,CyberReboot/vent,Jeff-Wang93/vent,CyberReboot/vent,cglewis/vent,Jeff-Wang93/vent,cglewis/vent | setup.py | setup.py | from setuptools import setup
setup(
name='vent',
version='v0.6.9.dev',
packages=['vent', 'vent.core', 'vent.core.file_drop',
'vent.core.rq_worker', 'vent.core.rq_dashboard', 'vent.menus',
'vent.core.network_tap', 'vent.core.network_tap.ncontrol',
'vent.core.rmq_es_... | from setuptools import setup
setup(
name='vent',
version='v0.6.9.dev',
packages=['vent', 'vent.core', 'vent.core.file_drop',
'vent.core.rq_worker', 'vent.core.rq_dashboard', 'vent.menus',
'vent.core.network_tap', 'vent.core.network_tap.ncontrol',
'vent.core.rmq_es_... | apache-2.0 | Python |
046f9e35568c4f647780e504e2000fabf0f9937b | use __version__ from dynash.py | raff/dynash | setup.py | setup.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from setuptools import setup
from dynash import __version__
SETUP_OPTIONS = dict(
name='dynash',
version=__version__,
description='Command line client for DynamoDB',
long_description = open("README.md").read(),
author='Raffaele Sena',
author_email=... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from setuptools import setup
SETUP_OPTIONS = dict(
name='dynash',
version='0.5.1',
description='Command line client for DynamoDB',
long_description = open("README.md").read(),
author='Raffaele Sena',
author_email='raff367@gmail.com',
url='https... | mit | Python |
1f9b2c7836d6738d5a86d93644a04da7729b3688 | Prepare openprocurement.api 2.4.5. | openprocurement/openprocurement.api | setup.py | setup.py | import os
from setuptools import setup, find_packages
here = os.path.abspath(os.path.dirname(__file__))
with open(os.path.join(here, 'README.rst')) as f:
README = f.read()
requires = [
'barbecue',
'chaussette',
'cornice',
'couchdb-schematics',
'gevent',
'iso8601',
'jsonpatch',
'li... | import os
from setuptools import setup, find_packages
here = os.path.abspath(os.path.dirname(__file__))
with open(os.path.join(here, 'README.rst')) as f:
README = f.read()
requires = [
'barbecue',
'chaussette',
'cornice',
'couchdb-schematics',
'gevent',
'iso8601',
'jsonpatch',
'li... | apache-2.0 | Python |
cabfe1a7586e5ce313105cab08810f51dae6b479 | Update setup.py | mattharrison/rst2odp,mattharrison/rst2odp | setup.py | setup.py | #from distutils.core import setup
from setuptools import setup
from odplib import meta
setup(name="rst2odp",
version=meta.__version__,
author=meta.__author__,
author_email=meta.__email__,
description="Converter for rst to OpenOffice Impress",
long_description='''Packacking of rst2odp and... | #from distutils.core import setup
from setuptools import setup
from odplib import meta
setup(name="rst2odp",
version=meta.__version__,
author=meta.__author__,
author_email=meta.__email__,
description="Converter for rst to OpenOffice Impress",
long_description='''Packacking of rst2odp and... | mit | Python |
1a7eb2627fbf3bc0ddb5d8fd5b051f3139275590 | Fix moderation rule | hackEns/Jarvis,hackEns/Jarvis | Rules/Moderation.py | Rules/Moderation.py | from ._shared import *
class Moderation(Rule):
"""Handles message to moderate listing"""
def __init__(self, bot):
self.bot = bot
def __call__(self, serv, author, args):
"""Handles message to moderate listing"""
if not self.bot.has_admin_rights(serv, author):
return
... | from ._shared import *
class Moderation(Rule):
"""Handles message to moderate listing"""
def __init__(self, bot):
self.bot = bot
def __call__(self, serv, author, args):
"""Handles message to moderate listing"""
if not self.bot.has_admin_rights(serv, author):
return
... | mit | Python |
90c82f0936addeb4469db2c42c1cd48713e7f3cf | Switch from bold to red highlighting. | adlr/wash-sale-calculator | progress_logger.py | progress_logger.py | # Copyright Google
# BSD License
import copy
import wash
# from http://stackoverflow.com/questions/8924173/how-do-i-print-bold-text-in-python
class color:
PURPLE = '\033[95m'
CYAN = '\033[96m'
DARKCYAN = '\033[36m'
BLUE = '\033[94m'
GREEN = '\033[92m'
YELLOW = '\033[93m'
RED = '\033[91m'
BOLD = '\033... | # Copyright Google
# BSD License
import copy
import wash
# from http://stackoverflow.com/questions/8924173/how-do-i-print-bold-text-in-python
class color:
PURPLE = '\033[95m'
CYAN = '\033[96m'
DARKCYAN = '\033[36m'
BLUE = '\033[94m'
GREEN = '\033[92m'
YELLOW = '\033[93m'
RED = '\033[91m'
BOLD = '\033... | bsd-2-clause | Python |
a25558ef0f1a902e948424bc0a3e137cc4d0f569 | implement programming via remote gdb session | chrism333/xpcc,chrism333/xpcc,dergraaf/xpcc,dergraaf/xpcc,dergraaf/xpcc,dergraaf/xpcc,chrism333/xpcc,chrism333/xpcc | scons/site_tools/openocd_remote.py | scons/site_tools/openocd_remote.py | #!/usr/bin/env python
#
# Copyright (c) 2014, Roboterclub Aachen e.V.
# All Rights Reserved.
#
# The file is part of the xpcc library and is released under the 3-clause BSD
# license. See the file `LICENSE` for the full license governing this code.
import platform
from SCons.Script import *
# -----------------------... | #!/usr/bin/env python
#
# Copyright (c) 2014, Roboterclub Aachen e.V.
# All Rights Reserved.
#
# The file is part of the xpcc library and is released under the 3-clause BSD
# license. See the file `LICENSE` for the full license governing this code.
import platform
from SCons.Script import *
# -----------------------... | bsd-3-clause | Python |
c3f844cfe03a23a5d6207ba99b5dc6abac9b94a1 | Add unit test. | wwitzel3/awx,snahelou/awx,snahelou/awx,wwitzel3/awx,wwitzel3/awx,snahelou/awx,wwitzel3/awx,snahelou/awx | awx/main/tests/unit/models/test_job_unit.py | awx/main/tests/unit/models/test_job_unit.py | import pytest
import json
from awx.main.tasks import RunJob
from awx.main.models import Job
@pytest.fixture
def job(mocker):
return mocker.MagicMock(**{
'display_extra_vars.return_value': '{\"secret_key\": \"$encrypted$\"}',
'extra_vars_dict': {"secret_key": "my_password"},
'pk': 1, 'job_... | import pytest
import json
from awx.main.tasks import RunJob
from awx.main.models import Job
@pytest.fixture
def job(mocker):
return mocker.MagicMock(**{
'display_extra_vars.return_value': '{\"secret_key\": \"$encrypted$\"}',
'extra_vars_dict': {"secret_key": "my_password"},
'pk': 1, 'job_... | apache-2.0 | Python |
3b0760ce604ab5e627f8459fc83f4f7b638c224e | Fix flake8 warning | nimbis/cmsplugin-forms-builder | cmsplugin_forms_builder/cms_plugins.py | cmsplugin_forms_builder/cms_plugins.py | from cms.plugin_base import CMSPluginBase
from cms.plugin_pool import plugin_pool
from cmsplugin_forms_builder.models import PluginForm
from django.utils.translation import ugettext_lazy as _
class FormBuilderPlugin(CMSPluginBase):
"""
Plugin class for form-builder forms.
"""
model = PluginForm
... | from cms.plugin_base import CMSPluginBase
from cms.plugin_pool import plugin_pool
from cmsplugin_forms_builder.models import PluginForm
from django.utils.translation import ugettext_lazy as _
class FormBuilderPlugin(CMSPluginBase):
"""
Plugin class for form-builder forms.
"""
model = PluginForm
... | bsd-3-clause | Python |
749b05712474ea8695fb6f2d1662399da42b1d32 | Update error with user input | ZEUSOFCS/Python | SimpleCalculator.py | SimpleCalculator.py | '''
Author : DORIAN JAVA BROWN
Version : N/A
Copyright : All Rights Reserve; You may use, distribute and modify this code.
Description : This is a simple calculator that can add, subtract, multiply and divide using functions
'''
def calculate():
# operation selection from the user
print('\n\n'... | '''
Author : DORIAN JAVA BROWN
Version : N/A
Copyright : All Rights Reserve; You may use, distribute and modify this code.
Description : This is a simple calculator that can add, subtract, multiply and divide using functions
'''
'''function definitions'''
def calculate():
# operation selection f... | mit | Python |
8f815c41b505c01cbc1c57088ddc3a465f1ac07c | Add a configuration key for the URL of the Fedora OpenID server | jeremycline/fmn,jeremycline/fmn,jeremycline/fmn | fmn/web/default_config.py | fmn/web/default_config.py | SECRET_KEY = 'changeme please'
# TODO -- May I set this to true?
FAS_OPENID_CHECK_CERT = False
#ADMIN_GROUPS = ['sysadmin-web']
FMN_FEDORA_OPENID = 'https://id.fedoraproject.org'
| SECRET_KEY = 'changeme please'
# TODO -- May I set this to true?
FAS_OPENID_CHECK_CERT = False
#ADMIN_GROUPS = ['sysadmin-web']
| lgpl-2.1 | Python |
87b6166bb2f88b54c78569d6b566c4d557733c57 | Modify proxy to use inlineCallbacks | cataliniacob/ep2012-tutorial-twisted | proxy.py | proxy.py | from twisted.internet import defer, endpoints, protocol, reactor
from twisted.protocols import basic
from twisted.web.client import getPage
import time
class ProxyProtocol(basic.LineReceiver):
def lineReceived(self, line):
if not line.startswith('http://'):
return
self.getPage(line)
... | from twisted.internet import endpoints, protocol, reactor
from twisted.protocols import basic
from twisted.web.client import getPage
import time
class ProxyProtocol(basic.LineReceiver):
def gotPage(self, data, line, start):
print 'Fetched {} in {} sec'.format(line, time.time() - start)
self.transp... | mit | Python |
d75e1309bf41f05489ffcf8502309b765bc8c359 | handle non dev/rc last release (#5133) | draperjames/bokeh,DuCorey/bokeh,rs2/bokeh,stonebig/bokeh,dennisobrien/bokeh,philippjfr/bokeh,jakirkham/bokeh,jakirkham/bokeh,azjps/bokeh,ericmjl/bokeh,draperjames/bokeh,philippjfr/bokeh,schoolie/bokeh,azjps/bokeh,percyfal/bokeh,mindriot101/bokeh,aavanian/bokeh,percyfal/bokeh,timsnyder/bokeh,aavanian/bokeh,timsnyder/bok... | scripts/update_bokehjs_versions.py | scripts/update_bokehjs_versions.py | import os
import re
import sys
def check_input(version):
pat = r'^(\d+.\d+.\d+)((dev|rc)\d+)?$'
if not re.match(pat, version):
print("The new version must be in the format X.X.X([dev|rc]X) (ex. '0.12.0')")
return False
return True
def version_update(version, filename):
pat = r"""(relea... | import os
import re
import sys
def check_input(version):
pat = r'^(\d+.\d+.\d+)((dev|rc)\d+)?$'
if not re.match(pat, version):
print("The new version must be in the format X.X.X([dev|rc]X) (ex. '0.12.0')")
return False
return True
def version_update(version, filename):
pat = r"""(relea... | bsd-3-clause | Python |
001924264830761cfa5938ca542201f2e8bdaf66 | Fix haystack index | kelvan/freieit,kelvan/freieit | freieit/search_indexes.py | freieit/search_indexes.py | from haystack import indexes
from .models import ExpertProfile
class ExpertProfileIndex(indexes.SearchIndex, indexes.Indexable):
#text = indexes.CharField(document=True, use_template=True)
text = indexes.EdgeNgramField(document=True, use_template=True)
#name = indexes.CharField(model_attr='name')
#lo... | from haystack import indexes, site
from .models import ExpertProfile
class ExpertProfileIndex(indexes.SearchIndex):
#text = indexes.CharField(document=True, use_template=True)
text = indexes.EdgeNgramField(document=True, use_template=True)
#name = indexes.CharField(model_attr='name')
#location = inde... | agpl-3.0 | Python |
270df828dfc76f993a999daeeb8fa8f6c82b1e62 | Fix typo in documentation | leshchevds/ganeti,mbakke/ganeti,leshchevds/ganeti,dimara/ganeti,ganeti/ganeti,bitemyapp/ganeti,ganeti/ganeti,ganeti-github-testing/ganeti-test-1,mbakke/ganeti,ganeti-github-testing/ganeti-test-1,yiannist/ganeti,yiannist/ganeti,onponomarev/ganeti,bitemyapp/ganeti,onponomarev/ganeti,andir/ganeti,andir/ganeti,yiannist/gan... | lib/cmdlib/query.py | lib/cmdlib/query.py | #
#
# Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 Google Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later... | #
#
# Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 Google Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later... | bsd-2-clause | Python |
afc47fd469d7836dcda0eb8bb027cce2a0ed2121 | Update MergeSort.py | maneeshd/Algorithms-and-Data-Structures | fundamentals/MergeSort.py | fundamentals/MergeSort.py | """
@author: Maneesh D
@email: maneeshd77@gmail.com
@date: 24/6/17
Worst Case Analysis: Merge Sort -> O(nlog n)
"""
from random import randint
from timeit import Timer, default_timer
def merge_sort(data):
if len(data) == 1:
return data
n = len(data)
mid = n // 2
# Divide and sort the sub lis... | """
@author: Maneesh D
@email: maneeshd77@gmail.com
@date: 24/6/17
Merge Sort -> O(nlog n)
"""
from random import randint
from timeit import Timer, default_timer
def merge_sort(data):
if len(data) == 1:
return data
n = len(data)
mid = n // 2
# Divide and sort the sub lists
left = merge_s... | mit | Python |
bebbbed6dba82329fcaab32fdb0109ec78cd7ad9 | Use correct subprotocol | zmap/ztag | ztag/transforms/s7.py | ztag/transforms/s7.py | from ztag.transform import *
from ztag import protocols, errors
class S7Transform(ZGrabTransform):
name = "s7/status"
port = 102
protocol = protocols.S7
subprotocol = protocols.S7.SZL
def _transform_object(self, obj):
zout = ZMapTransformOutput()
wrapped = Transformable(obj)
... | from ztag.transform import *
from ztag import protocols, errors
class S7Transform(ZGrabTransform):
name = "s7/status"
port = 102
protocol = protocols.S7
subprotocol = protocols.S7.STATUS
def _transform_object(self, obj):
zout = ZMapTransformOutput()
wrapped = Transformable(obj)
... | apache-2.0 | Python |
0cd617ddc7e6303139583b6a92e90cfac1e91b31 | set AUTOSYNTH_MULTIPLE_COMMITS=true for context aware commits (#938) | googleapis/nodejs-pubsub,googleapis/nodejs-pubsub,googleapis/nodejs-pubsub | synth.py | synth.py | import synthtool as s
import synthtool.gcp as gcp
import logging
import subprocess
import os
logging.basicConfig(level=logging.DEBUG)
AUTOSYNTH_MULTIPLE_COMMITS = True
gapic = gcp.GAPICGenerator()
common_templates = gcp.CommonTemplates()
# tasks has two product names, and a poorly named artman yaml
version = 'v1'
... | import synthtool as s
import synthtool.gcp as gcp
import logging
import subprocess
import os
logging.basicConfig(level=logging.DEBUG)
gapic = gcp.GAPICGenerator()
common_templates = gcp.CommonTemplates()
# tasks has two product names, and a poorly named artman yaml
version = 'v1'
library = gapic.node_library(
'p... | apache-2.0 | Python |
59860336a32b4cb438d275ced06a3100a2dd78b6 | Update synth.py | googleapis/java-pubsublite-spark,googleapis/java-pubsublite-spark,googleapis/java-pubsublite-spark | synth.py | synth.py | # Copyright 2021 Google LLC
#
# 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, s... | # Copyright 2020 Google LLC
#
# 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, s... | apache-2.0 | Python |
0e8994d1dbeb6266156fa9615fc003aa0d0a4822 | remove unused import, flake8 | chrisseto/waterbutler,RCOSDP/waterbutler,rdhyee/waterbutler,CenterForOpenScience/waterbutler,TomBaxter/waterbutler,hmoco/waterbutler,icereval/waterbutler,kwierman/waterbutler,cosenal/waterbutler,Johnetordoff/waterbutler,Ghalko/waterbutler,rafaeldelucena/waterbutler,felliott/waterbutler | tasks.py | tasks.py | # -*- coding: utf-8 -*-
import sys
from invoke import task, run
from waterbutler import settings
@task
def install(upgrade=False, pip_cache=None, wheel_repo=None):
cmd = 'pip install -r dev-requirements.txt'
if upgrade:
cmd += ' --upgrade'
if pip_cache:
cmd += ' --download-cache={}'.fo... | # -*- coding: utf-8 -*-
import os
import sys
from invoke import task, run
from waterbutler import settings
@task
def install(upgrade=False, pip_cache=None, wheel_repo=None):
cmd = 'pip install -r dev-requirements.txt'
if upgrade:
cmd += ' --upgrade'
if pip_cache:
cmd += ' --download-ca... | apache-2.0 | Python |
fd9ef4b30ef09d52c120e9e8ab2461cbce939dfd | Add --show-diff-on-failure | marshmallow-code/apispec,marshmallow-code/smore | tasks.py | tasks.py | # -*- coding: utf-8 -*-
import os
import sys
import webbrowser
from invoke import task
docs_dir = 'docs'
build_dir = os.path.join(docs_dir, '_build')
@task
def test(ctx, watch=False, last_failing=False):
"""Run the tests.
Note: --watch requires pytest-xdist to be installed.
"""
import pytest
syn... | # -*- coding: utf-8 -*-
import os
import sys
import webbrowser
from invoke import task
docs_dir = 'docs'
build_dir = os.path.join(docs_dir, '_build')
@task
def test(ctx, watch=False, last_failing=False):
"""Run the tests.
Note: --watch requires pytest-xdist to be installed.
"""
import pytest
syn... | mit | Python |
59c9e30df3397a9114a59cc8a318cf011ba04085 | fix terminal size formatting | GoogleCloudPlatform/django-demo-app-unicodex,GoogleCloudPlatform/django-demo-app-unicodex,GoogleCloudPlatform/django-demo-app-unicodex | .util/cliformatting.py | .util/cliformatting.py | import os
import sys
import click
from math import ceil
import shutil
columns, _ = shutil.get_terminal_size()
RESULTS = {"success": 0, "failure": 0}
def header(msg):
click.secho(f"\n# {msg}", bold=True)
def s(n):
if n == 1:
return ""
return "s"
def error(s, details=None):
lineart = "*****... | import os
import sys
import click
from math import ceil
import shutil
rows, columns = shutil.get_terminal_size()
RESULTS = {"success": 0, "failure": 0}
def header(msg):
click.secho(f"\n# {msg}", bold=True)
def s(n):
if n == 1:
return ""
return "s"
def error(s, details=None):
lineart = "**... | apache-2.0 | Python |
3b5473048d40feee7807c5ad50f4521113d8216f | copy packages instead of symlinking | scalableminds/webknossos,scalableminds/webknossos,scalableminds/webknossos,scalableminds/webknossos,scalableminds/webknossos,scalableminds/webknossos | buildtools/publish_deb.py | buildtools/publish_deb.py | #!/usr/bin/python2
import os
import sys
import subprocess
import shutil
import gzip
archive_dir = "%s/packages" % (os.environ["WORKSPACE"])
if not os.path.isdir(archive_dir):
print "no artifacts archived. Either this is a failed build or a job that does not archive artifacts"
sys.exit(0)
deb_packages = filter(l... | #!/usr/bin/python2
import os
import sys
import subprocess
import shutil
import gzip
archive_dir = "%s/packages" % (os.environ["WORKSPACE"])
if not os.path.isdir(archive_dir):
print "no artifacts archived. Either this is a failed build or a job that does not archive artifacts"
sys.exit(0)
deb_packages = filter(l... | agpl-3.0 | Python |
2f0dc639a4448e0762843fe3c9a4239eb7fac8c6 | Fix bug- socks_http does not resolve DNS remotely via Tor | metamarcdw/nowallet | nowallet/socks_http.py | nowallet/socks_http.py | import asyncio
import aiohttp
import aiosocks
from aiosocks.connector import ProxyConnector, ProxyClientRequest
class SocksHTTPError(Exception):
pass
async def urlopen(url: str) -> str:
auth5 = aiosocks.Socks5Auth(
'proxyuser1', password='pwd') # type: aiosocks.Socks5Auth
conn = ProxyConnector(re... | import asyncio
import aiohttp
import aiosocks
from aiosocks.connector import ProxyConnector, ProxyClientRequest
class SocksHTTPError(Exception):
pass
async def urlopen(url: str) -> str:
auth5 = aiosocks.Socks5Auth(
'proxyuser1', password='pwd') # type: aiosocks.Socks5Auth
conn = ProxyConnector(re... | mit | Python |
a68193102354af807285d0238354314c9aa67a25 | Move victim selection to enforce | tengqm/senlin,tengqm/senlin,tengqm/senlin-container,openstack/senlin,stackforge/senlin,Alzon/senlin,openstack/senlin,openstack/senlin,Alzon/senlin,tengqm/senlin-container,stackforge/senlin | senlin/policies/deletion_policy.py | senlin/policies/deletion_policy.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 unde... | # 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 unde... | apache-2.0 | Python |
b3213feae032032018354548f244a3204f04707f | Change compressor. | alephmelo/pyncd | pyncd.py | pyncd.py | import lzma
x = open('examples/imgs/square.png', 'rb').read() # file 1 of any type
y = open('examples/imgs/circle.png', 'rb').read() # file 2 of the same type as file 1
x_y = x + y # the concatenation of files
x_comp = lzma.compress(x) # compress file 1
y_comp = lzma.compress(y) # compress file 2
x_y_comp = lzma.comp... | import gzip
x = open('1.png', 'rb').read() # file 1 of any type
y = open('2.png', 'rb').read() # file 2 of the same type as file 1
x_y = x + y # the concatenation of files
x_comp = gzip.compress(x) # compress file 1
y_comp = gzip.compress(y) # compress file 2
x_y_comp = gzip.compress(x_y) # compress file concatenated... | mit | Python |
111e1d1b92860a4342c3499ca9eb0e5623b4974c | Increase RQ default_timeout to one hour (in case we have very very long running jobs) | OpenSourceActivismTech/call-power,OpenSourceActivismTech/call-power,spacedogXYZ/call-power,OpenSourceActivismTech/call-power,OpenSourceActivismTech/call-power,spacedogXYZ/call-power,spacedogXYZ/call-power,spacedogXYZ/call-power | call_server/extensions.py | call_server/extensions.py | # define flask extensions in separate file, to resolve import dependencies
from flask_sqlalchemy import SQLAlchemy as _BaseSQLAlchemy
# workaround to enable pool_pre_ping
# per https://github.com/pallets/flask-sqlalchemy/issues/589#issuecomment-361075700
class SQLAlchemy(_BaseSQLAlchemy):
def apply_pool_defaults(s... | # define flask extensions in separate file, to resolve import dependencies
from flask_sqlalchemy import SQLAlchemy as _BaseSQLAlchemy
# workaround to enable pool_pre_ping
# per https://github.com/pallets/flask-sqlalchemy/issues/589#issuecomment-361075700
class SQLAlchemy(_BaseSQLAlchemy):
def apply_pool_defaults(s... | agpl-3.0 | Python |
e8fdbc786b7a8391014199366a71b290b49efb4c | Fix views decorators (ref #141) | GeotrekCE/Geotrek-admin,mabhub/Geotrek,makinacorpus/Geotrek,GeotrekCE/Geotrek-admin,makinacorpus/Geotrek,camillemonchicourt/Geotrek,Anaethelion/Geotrek,mabhub/Geotrek,makinacorpus/Geotrek,GeotrekCE/Geotrek-admin,johan--/Geotrek,johan--/Geotrek,johan--/Geotrek,camillemonchicourt/Geotrek,Anaethelion/Geotrek,mabhub/Geotre... | caminae/trekking/views.py | caminae/trekking/views.py | from django.utils.decorators import method_decorator
from caminae.authent.decorators import trekking_manager_required
from caminae.mapentity.views import (MapEntityLayer, MapEntityList, MapEntityJsonList,
MapEntityDetail, MapEntityCreate, MapEntityUpdate, MapEntityDelete)
from .models ... | from caminae.authent.decorators import trekking_manager_required
from caminae.mapentity.views import (MapEntityLayer, MapEntityList, MapEntityJsonList,
MapEntityDetail, MapEntityCreate, MapEntityUpdate, MapEntityDelete)
from .models import Trek, POI
from .filters import TrekFilter, POIF... | bsd-2-clause | Python |
c0c3d63c6124549008a2dc17c1e691e799129444 | Fix getting unwatched episodes from Plex | verdel/plex2myshows | plex2myshows/modules/plex/plex.py | plex2myshows/modules/plex/plex.py | class Plex(object):
def __init__(self, plex):
self.plex = plex
def get_watched_episodes(self, section_name):
watched_episodes = []
shows = self.plex.library.section(section_name).searchShows()
for show in shows:
watched_episodes.extend(show.watched())
return ... | class Plex(object):
def __init__(self, plex):
self.plex = plex
def get_watched_episodes(self, section_name):
watched_episodes = set(self.plex.library.section(section_name).searchEpisodes(unwatched=False))
return watched_episodes
| mit | Python |
b34c8b94202294f63ff88d2d8085222bfa50dc46 | Sort on first name after last name | DemocracyClub/yournextrepresentative,DemocracyClub/yournextrepresentative,DemocracyClub/yournextrepresentative | candidates/csv_helpers.py | candidates/csv_helpers.py | from __future__ import unicode_literals
from compat import BufferDictWriter
from .models import CSV_ROW_FIELDS
def _candidate_sort_by_name_key(row):
return (
row['name'].split()[-1],
row['name'].rsplit(None, 1)[0],
not row['election_current'],
row['election_date'],
row['el... | from __future__ import unicode_literals
from compat import BufferDictWriter
from .models import CSV_ROW_FIELDS
def _candidate_sort_by_name_key(row):
return (
row['name'].split()[-1],
not row['election_current'],
row['election_date'],
row['election'],
row['post_label']
... | agpl-3.0 | Python |
d8da358042e6b02426804783b20e256398c6c467 | Remove decimals from y-axis percentage label | davidrobles/mlnd-capstone-code | capstone/rl/utils/plot.py | capstone/rl/utils/plot.py | from __future__ import division
import matplotlib
matplotlib.use('Agg')
import matplotlib.pyplot as plt
from matplotlib.ticker import FuncFormatter
from .callbacks import Callback
from ...game.players import GreedyQ, RandPlayer
from ...game.utils import play_series
class EpisodicWLDPlotter(Callback):
'''
Plot... | from __future__ import division
import matplotlib
matplotlib.use('Agg')
import matplotlib.pyplot as plt
from matplotlib.ticker import FuncFormatter
from .callbacks import Callback
from ...game.players import GreedyQ, RandPlayer
from ...game.utils import play_series
class EpisodicWLDPlotter(Callback):
'''
Plot... | mit | Python |
b77685c442fcc769727c443a59ac2bb620d90bdc | update copyright year | lheagy/casingResearch,lheagy/casingSimulations | casingSimulations/info.py | casingSimulations/info.py | __version__ = '0.1.0b0'
__author__ = 'Lindsey Heagy'
__license__ = 'MIT'
__copyright__ = 'Copyright 2018-2019 Lindsey Heagy'
| __version__ = '0.1.0b0'
__author__ = 'Lindsey Heagy'
__license__ = 'MIT'
__copyright__ = 'Copyright 2018 Lindsey Heagy'
| mit | Python |
ff93b501d489f182617e7f8f497747f26e91f39e | add older experiments | ColumbiaCMB/kid_readout,ColumbiaCMB/kid_readout | kid_readout/analysis/resources/starcryo_experiments.py | kid_readout/analysis/resources/starcryo_experiments.py | import bisect
from kid_readout.utils.time_tools import date_to_unix_time
by_unix_time_table = [
('2014-07-03', 'STAR Cryo 4x5 0813f12 Al horn package, AR chip, LPF, copper shield, IR LED fiber', 'light'),
('2014-04-28', 'STAR Cryo 4x5 0813f12 Al horn package, AR chip, LPF, copper shield... | import bisect
from kid_readout.utils.time_tools import date_to_unix_time
by_unix_time_table = [('2014-04-28', 'STAR Cryo 4x5 0813f12 Al horn package, AR chip, LPF, copper shield', 'light'),
('2014-04-16', 'STAR Cryo 4x5 0813f12 Al horn package, AR chip, fully taped', 'dark'),
('2014-04-... | bsd-2-clause | Python |
c91a593507cea9c6ba2777eff741b9e7ec7fdf0f | Fix test to give more data on failure | saltstack/salt,saltstack/salt,saltstack/salt,saltstack/salt,saltstack/salt | tests/integration/cli/custom_module.py | tests/integration/cli/custom_module.py | # -*- coding: utf-8 -*-
'''
:codeauthor: :email:`Daniel Mizyrycki (mzdaniel@glidelink.net)`
tests.integration.cli.custom_module
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Test salt-ssh sls with a custom module work.
$ cat srv/custom_module.sls
custom-module:
module.run:
- name: test.r... | # -*- coding: utf-8 -*-
'''
:codeauthor: :email:`Daniel Mizyrycki (mzdaniel@glidelink.net)`
tests.integration.cli.custom_module
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Test salt-ssh sls with a custom module work.
$ cat srv/custom_module.sls
custom-module:
module.run:
- name: test.r... | apache-2.0 | Python |
ccc8c0d885c9eaafeba2e91e248bf3febc484ab5 | change default port to IANA and allow to change peer port | sileht/pifpaf,jd/pifpaf,jd/pifpaf,sileht/pifpaf,sileht/pifpaf | pifpaf/drivers/etcd.py | pifpaf/drivers/etcd.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... | # 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... | apache-2.0 | Python |
9044657473e949138343132bbfb4c96b137c6abb | Use NotImplementedError | toslunar/chainerrl,toslunar/chainerrl | chainerrl/agents/sarsa.py | chainerrl/agents/sarsa.py | from __future__ import unicode_literals
from __future__ import print_function
from __future__ import division
from __future__ import absolute_import
from builtins import * # NOQA
from future import standard_library
standard_library.install_aliases() # NOQA
from chainerrl.agents import dqn
class SARSA(dqn.DQN):
... | from __future__ import unicode_literals
from __future__ import print_function
from __future__ import division
from __future__ import absolute_import
from builtins import * # NOQA
from future import standard_library
standard_library.install_aliases() # NOQA
from chainerrl.agents import dqn
class SARSA(dqn.DQN):
... | mit | Python |
6ab7c268d21ada1c30414551bdbb03190560ae55 | Fix typo in runserver.py breaking debug mode. | chromakode/wake | runserver.py | runserver.py | #!/usr/bin/env python
import argparse
from wake import app
parser = argparse.ArgumentParser()
parser.add_argument(
'--host',
default='127.0.0.1',
help='hostname to listen on',
)
parser.add_argument(
'--port',
type=int,
default=5000,
help='port to listen on',
)
parser.add_argument(
'--... | #!/usr/bin/env python
import argparse
from wake import app
parser = argparse.ArgumentParser()
parser.add_argument(
'--host',
default='127.0.0.1',
help='hostname to listen on',
)
parser.add_argument(
'--port',
type=int,
default=5000,
help='port to listen on',
)
parser.add_argument(
'--... | bsd-3-clause | Python |
64605573382f1c9fb2170d0cdbcd007f5ddae8d6 | Fix to pass all test | ishikota/PyPokerEngine | tests/players/sample/console_player_test.py | tests/players/sample/console_player_test.py | from tests.base_unittest import BaseUnitTest
from pypokerengine.players.sample.console_player import PokerPlayer as ConsolePlayer
class ConsolePlayerTest(BaseUnitTest):
def setUp(self):
self.valid_actions = [\
{'action': 'fold', 'amount': 0},\
{'action': 'call', 'amount': 10},\
{'action'... | from tests.base_unittest import BaseUnitTest
from pypokerengine.players.sample.console_player import PokerPlayer as ConsolePlayer
class ConsolePlayerTest(BaseUnitTest):
def setUp(self):
self.valid_actions = [\
{'action': 'fold', 'amount': 0},\
{'action': 'call', 'amount': 10},\
{'action'... | mit | Python |
c9cd0ed7b8d9d43c4143074489fcd5e14137b45a | implement list method main loop and quit action | CaptainDesAstres/Blender-Render-Manager,CaptainDesAstres/Simple-Blender-Render-Manager | queue.py | queue.py | #!/usr/bin/python3.4
# -*-coding:Utf-8 -*
'''module that contain queue class'''
from renderingTask import renderingTask
import os
class queue:
'''class who contain the list of all the rendering task to manage'''
def __init__(self,xml=False):
'''initialize queue object with empty queue who is filled with values... | #!/usr/bin/python3.4
# -*-coding:Utf-8 -*
'''module that contain queue class'''
from renderingTask import renderingTask
class queue:
'''class who contain the list of all the rendering task to manage'''
def __init__(self,xml=False):
'''initialize queue object with empty queue who is filled with values extract f... | mit | Python |
1bafd352110d186d1371d14714abd8de7e6e590f | Update prompt | 0xddaa/pwndbg,anthraxx/pwndbg,0xddaa/pwndbg,pwndbg/pwndbg,pwndbg/pwndbg,chubbymaggie/pwndbg,cebrusfs/217gdb,cebrusfs/217gdb,anthraxx/pwndbg,pwndbg/pwndbg,cebrusfs/217gdb,pwndbg/pwndbg,disconnect3d/pwndbg,0xddaa/pwndbg,disconnect3d/pwndbg,cebrusfs/217gdb,anthraxx/pwndbg,zachriggle/pwndbg,anthraxx/pwndbg,chubbymaggie/pwn... | pwndbg/__init__.py | pwndbg/__init__.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import gdb
import pwndbg.arch
import pwndbg.arguments
import pwndbg.disasm
import pwndbg.disasm.arm
import pwndbg.disasm.jump
import pwndbg.disasm.mips
import pwndbg.disasm.ppc
import pwndbg.disasm.sparc
import pwndbg.disasm.x86
import pwndbg.vmmap
import pwndbg.dt
import ... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import gdb
import pwndbg.arch
import pwndbg.arguments
import pwndbg.disasm
import pwndbg.disasm.arm
import pwndbg.disasm.jump
import pwndbg.disasm.mips
import pwndbg.disasm.ppc
import pwndbg.disasm.sparc
import pwndbg.disasm.x86
import pwndbg.vmmap
import pwndbg.dt
import ... | mit | Python |
ea2faeb88d2b6ddc98a9a10c760574dca993673c | change func1 to accept args | armundle/scratch,armundle/scratch | py/decorator_ex.py | py/decorator_ex.py | def entryExitFunc(f):
def newFunc():
print "inside decorator function"
print "entering", f.__name__
f()
print "exited", f.__name__
return newFunc
class entryExit(object):
'''
If there are no decorator arguments, the function to be decorated is passed
to the constr... | def entryExitFunc(f):
def newFunc():
print "inside decorator function"
print "entering", f.__name__
f()
print "exited", f.__name__
return newFunc
class entryExit(object):
def __init__(self, f):
'''
If there are no decorator arguments, the function to be decorated ... | mit | Python |
b553029859b55db2963b15694f5f17714ac8c079 | Update Futures_demo.py | Chandlercjy/OnePy | examples/Futures_demo.py | examples/Futures_demo.py | import matplotlib.pyplot as plt
import OnePy as op
####### Strategy Demo
class MyStrategy(op.StrategyBase):
# 可用参数:
# list格式: self.cash, self.position, self.margin,
# self.total, self.unre_profit
def __init__(self,marketevent):
super(MyStrategy,self).__init__(mar... | import matplotlib.pyplot as plt
import OnePy as op
####### Strategy Demo
class MyStrategy(op.StrategyBase):
# 可用参数:
# list格式: self.cash, self.position, self.margin,
# self.total, self.unre_profit
def __init__(self,marketevent):
super(MyStrategy,self).__init__(mar... | mit | Python |
0ed07211d62044a42e1b0ff024f8feb20435270d | Use strings for IDs in Committee Popolo | mysociety/pombola,mysociety/pombola,mysociety/pombola,mysociety/pombola,mysociety/pombola,mysociety/pombola | pombola/south_africa/views/api.py | pombola/south_africa/views/api.py | from django.http import JsonResponse
from django.views.generic import ListView
from pombola.core.models import Organisation
# Output Popolo JSON suitable for WriteInPublic for any committees that have an
# email address.
class CommitteesPopoloJson(ListView):
queryset = Organisation.objects.filter(
kind__... | from django.http import JsonResponse
from django.views.generic import ListView
from pombola.core.models import Organisation
# Output Popolo JSON suitable for WriteInPublic for any committees that have an
# email address.
class CommitteesPopoloJson(ListView):
queryset = Organisation.objects.filter(
kind__... | agpl-3.0 | Python |
c606e5d1481ae82072cccd4b9edb6b7d73933277 | update version in preparation for release | geggo/pyface,brett-patterson/pyface,pankajp/pyface,geggo/pyface | pyface/__init__.py | pyface/__init__.py | #------------------------------------------------------------------------------
# Copyright (c) 2005-2011, Enthought, Inc.
# All rights reserved.
#
# This software is provided without warranty under the terms of the BSD
# license included in enthought/LICENSE.txt and may be redistributed only
# under the conditions des... | #------------------------------------------------------------------------------
# Copyright (c) 2005-2011, Enthought, Inc.
# All rights reserved.
#
# This software is provided without warranty under the terms of the BSD
# license included in enthought/LICENSE.txt and may be redistributed only
# under the conditions des... | bsd-3-clause | Python |
3429e18dd112f4c5058d0e27662379c2860baded | Fix indentation on string_methods.py | exercism/python,jmluy/xpython,exercism/python,jmluy/xpython | exercises/concept/little-sisters-essay/string_methods.py | exercises/concept/little-sisters-essay/string_methods.py | def capitalize_title(title):
"""
:param title: str title string that needs title casing
:return: str title string in title case (first letters capitalized)
"""
pass
def check_sentence_ending(sentence):
"""
:param sentence: str a sentence to check.
:return: bool True if punctuated ... | def capitalize_title(title):
"""
:param title: str title string that needs title casing
:return: str title string in title case (first letters capitalized)
"""
pass
def check_sentence_ending(sentence):
"""
:param sentence: str a sentence to check.
:return: bool True if punctuated ... | mit | Python |
d779c126e922b6b9907100ac4fc75de9d085b98a | Revert "Update runc4.py" | neurodata/ndgrutedb,openconnectome/m2g,neurodata/ndgrutedb,neurodata/ndgrutedb,openconnectome/m2g,neurodata/ndmg,neurodata/ndgrutedb,neurodata/ndgrutedb,neurodata/ndgrutedb,openconnectome/m2g,openconnectome/m2g,openconnectome/m2g,neurodata/ndgrutedb,openconnectome/m2g,openconnectome/m2g,openconnectome/m2g,neurodata/ndg... | MR-OCP/MROCPdjango/ocpipeline/procs/runc4.py | MR-OCP/MROCPdjango/ocpipeline/procs/runc4.py | #!/usr/bin/env python
# Copyright 2014 Open Connectome Project (http://openconnecto.me)
#
# 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
#
#... | #!/usr/bin/env python
# Copyright 2014 Open Connectome Project (http://openconnecto.me)
#
# 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
#
#... | apache-2.0 | Python |
217d1f94f03b5cda709798dda98380362b937bd3 | update comment | ddebrunner/streamsx.topology,ddebrunner/streamsx.topology,wmarshall484/streamsx.topology,ddebrunner/streamsx.topology,ibmkendrick/streamsx.topology,wmarshall484/streamsx.topology,IBMStreams/streamsx.topology,wmarshall484/streamsx.topology,IBMStreams/streamsx.topology,ddebrunner/streamsx.topology,ibmkendrick/streamsx.to... | samples/python/topology/games/fizz_buzz.py | samples/python/topology/games/fizz_buzz.py | from streamsx.topology.topology import Topology
import streamsx.topology.context
import fizz_buzz_functions
def main():
"""
Plays Fizz Buzz (https://en.wikipedia.org/wiki/Fizz_buzz)
Example:
python3 fizz_buzz.py
Output:
1
2
Fizz!
4
Buzz!
Fiz... | from streamsx.topology.topology import Topology
import streamsx.topology.context
import fizz_buzz_functions
def main():
"""
Plays Fizz Buzz (https://en.wikipedia.org/wiki/Fizz_buzz)
Example:
python3 fizz_buzz.py
Output:
1
2
Fizz!
4
Buzz!
Fiz... | apache-2.0 | Python |
fca6289f6fe1e0e5605a7ea12a54395fe98d0425 | Define rio tasks. | soasme/rio,soasme/rio,soasme/rio | rio/tasks.py | rio/tasks.py | # -*- coding: utf-8 -*-
"""
rio.tasks
~~~~~~~~~~
Implement of rio tasks based on celery.
"""
from os import environ
from celery import task
from celery.task.http import URL
from .core import celery
def get_webhook(url, payload):
return URL(url, app=celery, dispatcher=None).get_async(**payload)
def post_webh... | # -*- coding: utf-8 -*-
"""
rio.tasks
~~~~~~~~~~
Implement of rio tasks based on celery.
"""
from os import environ
from celery import Celery
from .conf import configure_app
def register_tasks(app):
"""Register tasks to application.
"""
pass
def create_app():
"""Celery application factory functio... | mit | Python |
2b995c68c980f1f38e1e6c6bb69ab88b78353cce | Update version. | pyhmsa/pyhmsa | pyhmsa/__init__.py | pyhmsa/__init__.py | #!/usr/bin/env python
__author__ = "Philippe T. Pinard"
__email__ = "philippe.pinard@gmail.com"
__version__ = "0.1.6"
__copyright__ = "Copyright (c) 2013-2014 Philippe T. Pinard"
__license__ = "MIT"
# This is required to create a namespace package.
# A namespace package allows programs to be located in different dire... | #!/usr/bin/env python
__author__ = "Philippe T. Pinard"
__email__ = "philippe.pinard@gmail.com"
__version__ = "0.1.5"
__copyright__ = "Copyright (c) 2013-2014 Philippe T. Pinard"
__license__ = "MIT"
# This is required to create a namespace package.
# A namespace package allows programs to be located in different dire... | mit | Python |
c46f46197589a89e98c8d5960d5c587a7c3dd6b0 | delete load data part | w007878/Keras-GAN | train.py | train.py | import keras
import cv2
from load import load_args
from load import load_img
if __name__ == '__main__':
args = load_args()
print args
img = load_img(args.PATH)
| import keras
import cv2
from load import load_args
if __name__ == '__main__':
args = load_args()
print args
| mit | Python |
4c025819cb34939c7b97b145155ee89c8f0b2e93 | add concept of entity in the askomics abstraction | askomics/askomics,askomics/askomics,xgaia/askomics,xgaia/askomics,ofilangi/askomics,xgaia/askomics,ofilangi/askomics,askomics/askomics,ofilangi/askomics,askomics/askomics,ofilangi/askomics,xgaia/askomics | askomics/libaskomics/integration/AbstractedEntity.py | askomics/libaskomics/integration/AbstractedEntity.py | #! /usr/bin/env python3
# -*- coding: utf-8 -*-
import logging
import json
from askomics.libaskomics.ParamManager import ParamManager
from askomics.libaskomics.utils import pformat_generic_object
class AbstractedEntity(object):
"""
An AbstractedEntity represents the classes of the database.
It is defined... | #! /usr/bin/env python3
# -*- coding: utf-8 -*-
import logging
import json
from askomics.libaskomics.ParamManager import ParamManager
from askomics.libaskomics.utils import pformat_generic_object
class AbstractedEntity(object):
"""
An AbstractedEntity represents the classes of the database.
It is defined... | agpl-3.0 | Python |
2b9d8dba5f421ad854574e9d1b7004578dd78346 | Bump version to 4.1.1b2 | platformio/platformio,platformio/platformio-core,platformio/platformio-core | platformio/__init__.py | platformio/__init__.py | # Copyright (c) 2014-present PlatformIO <contact@platformio.org>
#
# 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 appli... | # Copyright (c) 2014-present PlatformIO <contact@platformio.org>
#
# 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 appli... | apache-2.0 | Python |
89a4d4dcf5533e2045d32282c3ad43c42d745a34 | fix problem with wrong datatype | gousiosg/pullreqs-dnn,gousiosg/pullreqs-dnn | train.py | train.py | #!/usr/bin/env python
#
# (c) 2016 -- onwards Georgios Gousios <gousiosg@gmail.com>
#
import argparse
import pickle
import json
from keras.models import Sequential
from keras.layers import LSTM, Dense, Activation, Embedding, Bidirectional
from keras.callbacks import CSVLogger, EarlyStopping, ModelCheckpoint, ReduceL... | #!/usr/bin/env python
#
# (c) 2016 -- onwards Georgios Gousios <gousiosg@gmail.com>
#
import argparse
import pickle
import json
from keras.models import Sequential
from keras.layers import LSTM, Dense, Activation, Embedding, Bidirectional
from keras.callbacks import CSVLogger, EarlyStopping, ModelCheckpoint, ReduceL... | mit | Python |
94756c1e7e6a164546b4808c8b8fb9db78e1990a | Update cluster_info.py | PlatformLSF/platform-python-lsf-api | examples/cluster_info.py | examples/cluster_info.py | #! /usr/bin/env python
from pythonlsf import lsf
if lsf.lsb_init("test") > 0:
exit(1)
print '\n Hosts in cluster: ', lsf.get_host_names()
print '\n Clustername: ', lsf.ls_getclustername(), '\n'
print '{0:15s} {1:20s} {2:20s} {3:5s} {4:4s}'.format('Hostname', 'Type',
... | #!/usr/local/bin/python2.7
from pythonlsf import lsf
print '\n Hosts in cluster: ', lsf.get_host_names()
print '\n Clustername: ', lsf.ls_getclustername(), '\n'
print '{0:15s} {1:20s} {2:20s} {3:5s} {4:4s}'.format('Hostname', 'Type',
'Model', 'Cores', 'Load')
fo... | epl-1.0 | Python |
e187ab0f5285378a891552b7cecba0bad47395ab | upgrade plenum version to 1.6 | evernym/plenum,evernym/zeno | plenum/__metadata__.py | plenum/__metadata__.py | """
plenum package metadata
"""
__title__ = 'indy-plenum'
__version_info__ = (1, 6)
__version__ = '.'.join(map(str, __version_info__))
__author__ = "Hyperledger"
__author_email__ = 'hyperledger-indy@lists.hyperledger.org'
__maintainer__ = 'Hyperledger'
__maintainer_email__ = 'hyperledger-indy@lists.hyperledger.org'
__... | """
plenum package metadata
"""
__title__ = 'indy-plenum'
__version_info__ = (1, 5)
__version__ = '.'.join(map(str, __version_info__))
__author__ = "Hyperledger"
__author_email__ = 'hyperledger-indy@lists.hyperledger.org'
__maintainer__ = 'Hyperledger'
__maintainer_email__ = 'hyperledger-indy@lists.hyperledger.org'
__... | apache-2.0 | Python |
1a18445482c67b38810e330065e5ff04e772af4a | Fix from_email in IncomingLetter migrations | ad-m/foundation-manager,pilnujemy/pytamy,pilnujemy/pytamy,pilnujemy/pytamy,ad-m/foundation-manager,ad-m/foundation-manager,pilnujemy/pytamy,ad-m/foundation-manager | foundation/letters/migrations/0009_auto_20151216_0656.py | foundation/letters/migrations/0009_auto_20151216_0656.py | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations, models
def split_models(apps, schema_editor):
# We can't import the Person model directly as it may be a newer
# version than this migration expects. We use the historical version.
L = apps.get_model("letter... | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations, models
def split_models(apps, schema_editor):
# We can't import the Person model directly as it may be a newer
# version than this migration expects. We use the historical version.
L = apps.get_model("letter... | bsd-3-clause | Python |
11b293afd11b6d568644a559dff9299ec9dc916f | Add comments on current Timer abstraction | evernym/plenum,evernym/zeno | plenum/common/timer.py | plenum/common/timer.py | from abc import ABC, abstractmethod
from functools import wraps
from typing import Callable, NamedTuple
import time
from sortedcontainers import SortedListWithKey
# TODO: Consider renaming this into Scheduler?
class TimerService(ABC):
@abstractmethod
def get_current_time(self) -> float:
pass
@a... | from abc import ABC, abstractmethod
from functools import wraps
from typing import Callable, NamedTuple
import time
from sortedcontainers import SortedListWithKey
class TimerService(ABC):
@abstractmethod
def get_current_time(self) -> float:
pass
@abstractmethod
def schedule(self, delay: int... | apache-2.0 | Python |
317c19b2d2767276a426a4d058191dbaaf8f4c6f | Extend the duration of the tough_filters_cases page set. | hgl888/chromium-crosswalk,TheTypoMaster/chromium-crosswalk,ltilve/chromium,hgl888/chromium-crosswalk-efl,Chilledheart/chromium,Fireblend/chromium-crosswalk,dednal/chromium.src,markYoungH/chromium.src,markYoungH/chromium.src,axinging/chromium-crosswalk,Pluto-tv/chromium-crosswalk,Jonekee/chromium.src,TheTypoMaster/chrom... | tools/perf/page_sets/tough_filters_cases.py | tools/perf/page_sets/tough_filters_cases.py | # Copyright 2014 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
from telemetry.page import page as page_module
from telemetry.page import page_set as page_set_module
class ToughFiltersCasesPage(page_module.Page):
def ... | # Copyright 2014 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
from telemetry.page import page as page_module
from telemetry.page import page_set as page_set_module
class ToughFiltersCasesPage(page_module.Page):
def ... | bsd-3-clause | Python |
bdddee22a4e710e580e105cf187ce77c59f09d31 | enable auto parallel and non-uniform k-points | mlouhivu/gpaw-accelerator-benchmarks,mlouhivu/gpaw-accelerator-benchmarks | silicon-crystal/silicon-crystal.py | silicon-crystal/silicon-crystal.py | ###
### GPAW benchmark: Silicon Crystal
###
from __future__ import print_function
from ase.lattice import bulk
from gpaw import GPAW, Mixer, ConvergenceError
from gpaw.eigensolvers.rmm_diis import RMM_DIIS
from gpaw.mpi import size, rank
try:
from gpaw import use_mic
except ImportError:
use_mic = False
# no. ... | ###
### GPAW benchmark: Silicon Crystal
###
from __future__ import print_function
from ase.lattice import bulk
from gpaw import GPAW, Mixer, ConvergenceError
from gpaw.eigensolvers.rmm_diis import RMM_DIIS
from gpaw.mpi import size, rank
try:
from gpaw import use_mic
except ImportError:
use_mic = False
# no. ... | mit | Python |
130d966f933983dc366a3023ac78a2ba24bf064c | add flag for data set binarization | TheRiddance/dcgan | train.py | train.py | """
Andrin Jenal, 2017
ETH Zurich
"""
import tensorflow as tf
from dcgan import DCGAN
import hdf5_dataset
from checkpoint_saver import CheckpointSaver
from visualizer import ImageVisualizer
flags = tf.app.flags
flags.DEFINE_string("dataset", "datasets/celeb_dataset_3k_colored.h5", "sample results dir")
flags.DEFINE... | """
Andrin Jenal, 2017
ETH Zurich
"""
import tensorflow as tf
from dcgan import DCGAN
import hdf5_dataset
from checkpoint_saver import CheckpointSaver
from visualizer import ImageVisualizer
flags = tf.app.flags
flags.DEFINE_string("dataset", "datasets/celeb_dataset_3k_colored.h5", "sample results dir")
flags.DEFINE... | bsd-3-clause | Python |
9933920ebc49b4e275ff93bd6d918945ee77e9a4 | Make keepalive tests under macOS less stressful | cherrypy/cheroot | cheroot/test/test_wsgi.py | cheroot/test/test_wsgi.py | """Test wsgi."""
from concurrent.futures.thread import ThreadPoolExecutor
import pytest
import portend
import requests
from requests_toolbelt.sessions import BaseUrlSession as Session
from jaraco.context import ExceptionTrap
from cheroot import wsgi
from cheroot._compat import IS_MACOS, IS_WINDOWS
IS_SLOW_ENV = IS... | """Test wsgi."""
from concurrent.futures.thread import ThreadPoolExecutor
import pytest
import portend
import requests
from requests_toolbelt.sessions import BaseUrlSession as Session
from jaraco.context import ExceptionTrap
from cheroot import wsgi
@pytest.fixture
def simple_wsgi_server():
"""Fucking simple w... | bsd-3-clause | Python |
88327c5e0a7ba7af086ad461e20395a33215b96c | Update api.py | FNNDSC/ChRIS_ultron_backEnd,FNNDSC/ChRIS_ultron_backEnd,FNNDSC/ChRIS_ultron_backEnd,FNNDSC/ChRIS_ultron_backEnd | chris_backend/core/api.py | chris_backend/core/api.py | from django.conf.urls import url, include
from rest_framework.urlpatterns import format_suffix_patterns
from feeds import views
# API v1 endpoints
urlpatterns = format_suffix_patterns([
url(r'^v1/$', views.api_root),
url(r'^v1/feeds/$', views.FeedList.as_view(), name='feed-list'),
url(r'^v1/feeds/(?P<pk... | from django.conf.urls import url, include
from rest_framework.urlpatterns import format_suffix_patterns
from feeds import views
# API v1 endpoints
urlpatterns = format_suffix_patterns([
url(r'^v1/$', views.api_root),
url(r'^v1/feeds/$', views.FeedList.as_view(), name='feed-list'),
url(r'^v1/feeds/(?P<pk... | mit | Python |
51fb4cc79ecba178b811a1a0bb403c91317a116e | allow kwargs in ASE atoms converter | nisse3000/pymatgen,davidwaroquiers/pymatgen,davidwaroquiers/pymatgen,fraricci/pymatgen,dongsenfo/pymatgen,vorwerkc/pymatgen,tschaume/pymatgen,blondegeek/pymatgen,vorwerkc/pymatgen,gVallverdu/pymatgen,tschaume/pymatgen,montoyjh/pymatgen,fraricci/pymatgen,fraricci/pymatgen,montoyjh/pymatgen,tschaume/pymatgen,gVallverdu/p... | pymatgen/io/ase.py | pymatgen/io/ase.py | # coding: utf-8
# Copyright (c) Pymatgen Development Team.
# Distributed under the terms of the MIT License.
from __future__ import division, unicode_literals, absolute_import
"""
This module provides conversion between the Atomic Simulation Environment
Atoms object and pymatgen Structure objects.
"""
__author__ = ... | # coding: utf-8
# Copyright (c) Pymatgen Development Team.
# Distributed under the terms of the MIT License.
from __future__ import division, unicode_literals, absolute_import
"""
This module provides conversion between the Atomic Simulation Environment
Atoms object and pymatgen Structure objects.
"""
__author__ = ... | mit | Python |
6db9a65c7b734c7c421075cbae11b5b1df35980e | Remove RingBuffer TODO from midi_monitor example | stephenedie/jackclient-python,spatialaudio/jackclient-python | examples/midi_monitor.py | examples/midi_monitor.py | #!/usr/bin/env python3
"""JACK client that prints all received MIDI events."""
import jack
import binascii
client = jack.Client("MIDI-Monitor")
port = client.midi_inports.register("input")
@client.set_process_callback
def process(frames):
for offset, data in port.incoming_midi_events():
print("{0}: 0x{... | #!/usr/bin/env python3
"""JACK client that prints all received MIDI events."""
import jack
import binascii
client = jack.Client("MIDI-Monitor")
port = client.midi_inports.register("input")
@client.set_process_callback
def process(frames):
for offset, data in port.incoming_midi_events():
# TODO: use rin... | mit | Python |
e47b7e5952d4001459aee5ba570a7cc6d4c10d43 | Add import of the InvalidDirectoryValueError to the directory package's test file | SizzlingVortex/classyfd | tests/unit/directory/test_directory.py | tests/unit/directory/test_directory.py | """Contains the unit tests for the inner directory package"""
import unittest
import os
from classyfd import Directory, InvalidDirectoryValueError
class TestDirectory(unittest.TestCase):
def setUp(self):
self.fake_path = os.path.abspath("hello-world-dir")
return
def test_create_directory... | """Contains the unit tests for the inner directory package"""
import unittest
import os
from classyfd import Directory
class TestDirectory(unittest.TestCase):
def setUp(self):
self.fake_path = os.path.abspath("hello-world-dir")
return
def test_create_directory_object(self):
d = D... | mit | Python |
91eddb82671842cfd1dd7aa58dc42d7ffd1d1550 | call passed functions in get_function | lefnire/tensorforce,reinforceio/tensorforce | tensorforce/util/config_util.py | tensorforce/util/config_util.py | # Copyright 2016 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 2016 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... | apache-2.0 | Python |
d6532c24675956c6dc093dd330be1b78d691994f | Build Test | shear/rppy | rppy/rppy.py | rppy/rppy.py | # rppy - a geophysical library for Python
# Copyright (C) 2015 Sean Matthew Contenti
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (a... | # rppy - a geophysical library for Python
# Copyright (C) 2015 Sean Matthew Contenti
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (a... | bsd-2-clause | Python |
7ab671fea7fda45be5994d85378bfb326eddd7fb | Fix invalid use of F() when creating user story | gauravjns/taiga-back,seanchen/taiga-back,joshisa/taiga-back,dycodedev/taiga-back,WALR/taiga-back,astronaut1712/taiga-back,Tigerwhit4/taiga-back,jeffdwyatt/taiga-back,bdang2012/taiga-back-casting,CMLL/taiga-back,obimod/taiga-back,coopsource/taiga-back,Rademade/taiga-back,dayatz/taiga-back,CoolCloud/taiga-back,astagi/tai... | taiga/projects/occ/mixins.py | taiga/projects/occ/mixins.py | # Copyright (C) 2014 Andrey Antukh <niwi@niwi.be>
# Copyright (C) 2014 Jesús Espino <jespinog@gmail.com>
# Copyright (C) 2014 David Barragán <bameda@dbarragan.com>
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the F... | # Copyright (C) 2014 Andrey Antukh <niwi@niwi.be>
# Copyright (C) 2014 Jesús Espino <jespinog@gmail.com>
# Copyright (C) 2014 David Barragán <bameda@dbarragan.com>
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the F... | agpl-3.0 | Python |
4b7b2727a35cfcb0117b0ba4571da9a0ea81824a | Remove old reimplementation of routes. | joshisa/taiga-back,joshisa/taiga-back,gam-phon/taiga-back,bdang2012/taiga-back-casting,jeffdwyatt/taiga-back,rajiteh/taiga-back,crr0004/taiga-back,crr0004/taiga-back,EvgeneOskin/taiga-back,dayatz/taiga-back,Rademade/taiga-back,joshisa/taiga-back,Rademade/taiga-back,astronaut1712/taiga-back,forging2012/taiga-back,coopso... | greenmine/base/routers.py | greenmine/base/routers.py | # -*- coding: utf-8 -*-
from rest_framework import routers
class DefaultRouter(routers.DefaultRouter):
pass
__all__ = ["DefaultRouter"]
| # -*- coding: utf-8 -*-
from rest_framework import routers
# Special router for actions.
actions_router = routers.Route(url=r'^{prefix}/{methodname}{trailing_slash}$',
mapping={'{httpmethod}': '{methodname}'},
name='{basename}-{methodnamehyphen}',
... | agpl-3.0 | Python |
0e2c092ce3472bf26db7d3b836eb230cfb002656 | fix method naming conflict | r0fls/sanic,ashleysommer/sanic,lixxu/sanic,channelcat/sanic,yunstanford/sanic,lixxu/sanic,yunstanford/sanic,r0fls/sanic,channelcat/sanic,channelcat/sanic,ashleysommer/sanic,jrocketfingers/sanic,channelcat/sanic,jrocketfingers/sanic,lixxu/sanic,lixxu/sanic,Tim-Erwin/sanic,ashleysommer/sanic,ai0/sanic,yunstanford/sanic,T... | examples/sanic_peewee.py | examples/sanic_peewee.py | ## You need the following additional packages for this example
# aiopg
# peewee_async
# peewee
## sanic imports
from sanic import Sanic
from sanic.response import json
## peewee_async related imports
import uvloop
import peewee
from peewee_async import Manager, PostgresqlDatabase
# we instantiate a custom loop so ... | ## You need the following additional packages for this example
# aiopg
# peewee_async
# peewee
## sanic imports
from sanic import Sanic
from sanic.response import json
## peewee_async related imports
import uvloop
import peewee
from peewee_async import Manager, PostgresqlDatabase
# we instantiate a custom loop so ... | mit | Python |
53e4a8a00d4b1c0bed0ae93bb48831b04f1fc12d | Exclude msaa on Mac bots Review URL: https://codereview.appspot.com/7055043 | google/skia-buildbot,google/skia-buildbot,google/skia-buildbot,google/skia-buildbot,Tiger66639/skia-buildbot,google/skia-buildbot,google/skia-buildbot,Tiger66639/skia-buildbot,Tiger66639/skia-buildbot,Tiger66639/skia-buildbot,Tiger66639/skia-buildbot,google/skia-buildbot,Tiger66639/skia-buildbot,Tiger66639/skia-buildbo... | slave/skia_slave_scripts/run_gm.py | slave/skia_slave_scripts/run_gm.py | #!/usr/bin/env python
# Copyright (c) 2012 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
""" Run the Skia GM executable. """
from utils import shell_utils
from build_step import BuildStep
import errno
import os
import s... | #!/usr/bin/env python
# Copyright (c) 2012 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
""" Run the Skia GM executable. """
from utils import shell_utils
from build_step import BuildStep
import errno
import os
import s... | bsd-3-clause | Python |
ff68546c69b68c4f83eb843f3ecb5789358d2f32 | enable category select plugin by default | potato/searx,kdani3/searx,pointhi/searx,dzc34/searx,gugod/searx,asciimoo/searx,jibe-b/searx,gugod/searx,dzc34/searx,potato/searx,jcherqui/searx,dalf/searx,matejc/searx,jpope777/searx,potato/searx,jpope777/searx,jcherqui/searx,misnyo/searx,PwnArt1st/searx,PwnArt1st/searx,misnyo/searx,GreenLunar/searx,jcherqui/searx,gugo... | searx/plugins/search_on_category_select.py | searx/plugins/search_on_category_select.py | '''
searx is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
searx is distributed in the hope that it will be useful,
but WITHOUT ANY WA... | '''
searx is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
searx is distributed in the hope that it will be useful,
but WITHOUT ANY WA... | agpl-3.0 | Python |
e6a72c4987246e5c56863a7b98cdbe8be729a688 | fix syntax errors | Krozark/django-slider,Krozark/django-slider,Krozark/django-slider | slider/templatetags/slider_tags.py | slider/templatetags/slider_tags.py | # -*- coding: utf-8 -*-
from django import template
from slider.models import SliderImage
import random
register = template.Library()
def get_random_item(l,max=None):
res= []
size = len(l)
indexs = range(0,size)
if max == None:
max = size
for i in range(0, max):
index = random.cho... | # -*- coding: utf-8 -*-
from django import template
from slider.models import SliderImage
import random
register = template.Library()
def get_random_item(l,max=None):
res= []
size = len(l)
indexs = range(0,size)
if max = None:
max = size
for i in range(0: max):
index = random.choi... | bsd-2-clause | Python |
82b4ea673aefd73384eb442c1769211d55c74c14 | Update test infrastructure | dbinetti/barberscore,barberscore/barberscore-api,barberscore/barberscore-api,barberscore/barberscore-api,dbinetti/barberscore,dbinetti/barberscore-django,dbinetti/barberscore-django,barberscore/barberscore-api | project/settings/test.py | project/settings/test.py | # Local
from .base import *
# Heroku
ALLOWED_HOSTS = [
'testserver',
]
# Redis
RQ_QUEUES['default']['ASYNC'] = False
# Email
EMAIL_BACKEND = 'django.core.mail.backends.console.EmailBackend'
# Cloudinary
CLOUDINARY_URL = None
MEDIA_URL = '/media/'
DEFAULT_FILE_STORAGE = 'django.core.files.storage.FileSystemStora... | # Local
from .base import *
# Heroku
ALLOWED_HOSTS = [
'testserver',
]
# Redis
RQ_QUEUES['default']['ASYNC'] = False
# Email
EMAIL_BACKEND = 'django.core.mail.backends.console.EmailBackend'
| bsd-2-clause | Python |
e2ef73097ae220be4e52563e4e098aea228f82fa | rename polls hook | praekelt/molo-tuneme,praekelt/molo-tuneme,praekelt/molo-tuneme,praekelt/molo-tuneme | polls/wagtail_hooks.py | polls/wagtail_hooks.py | from django.conf.urls import url
from polls.admin import QuestionsModelAdmin
from polls.admin_views import QuestionResultsAdminView
from polls.models import PollsIndexPage
from wagtail.wagtailcore import hooks
from wagtail.contrib.modeladmin.options import modeladmin_register
from django.contrib.auth.models import User... | from django.conf.urls import url
from polls.admin import QuestionsModelAdmin
from polls.admin_views import QuestionResultsAdminView
from polls.models import PollsIndexPage
from wagtail.wagtailcore import hooks
from wagtail.contrib.modeladmin.options import modeladmin_register
from django.contrib.auth.models import User... | bsd-2-clause | Python |
5fc16267239890acbf6c4d7ab4685c4a2f420360 | allow empty domain in tests | qedsoftware/commcare-hq,dimagi/commcare-hq,qedsoftware/commcare-hq,dimagi/commcare-hq,qedsoftware/commcare-hq,dimagi/commcare-hq,qedsoftware/commcare-hq,dimagi/commcare-hq,qedsoftware/commcare-hq,dimagi/commcare-hq | corehq/form_processor/utils/general.py | corehq/form_processor/utils/general.py | from django.conf import settings
from corehq.toggles import USE_SQL_BACKEND, NAMESPACE_DOMAIN, NEW_EXPORTS, TF_USES_SQLITE_BACKEND
from dimagi.utils.logging import notify_exception
def should_use_sql_backend(domain_name):
from corehq.apps.domain.models import Domain
if settings.UNIT_TESTING:
return _... | from django.conf import settings
from corehq.toggles import USE_SQL_BACKEND, NAMESPACE_DOMAIN, NEW_EXPORTS, TF_USES_SQLITE_BACKEND
from dimagi.utils.logging import notify_exception
def should_use_sql_backend(domain_name):
from corehq.apps.domain.models import Domain
if settings.UNIT_TESTING:
return _... | bsd-3-clause | Python |
a486d9bb6f498391997639b549b51b691490f4fa | Update settings.py | cartologic/cartoview-project-template | project_name/settings.py | project_name/settings.py | # -*- coding: utf-8 -*-
import os
from cartoview.settings import *
PROJECT_NAME = "{{project_name}}"
PROJECT_DIR = os.path.dirname(os.path.abspath(__file__))
BASE_DIR = os.path.dirname(PROJECT_DIR)
# static settings section
STATICFILES_DIRS += [os.path.join(PROJECT_DIR, "static"), ]
MEDIA_ROOT = os.path.join(BASE_DIR,... | # -*- coding: utf-8 -*-
import os
from cartoview.settings import *
PROJECT_DIR = os.path.dirname(os.path.abspath(__file__))
BASE_DIR = os.path.dirname(PROJECT_DIR)
# static settings section
STATICFILES_DIRS += [os.path.join(PROJECT_DIR, "static"), ]
MEDIA_ROOT = os.path.join(BASE_DIR, "uploaded")
MEDIA_URL = "/upload... | bsd-2-clause | Python |
70b61dd599529009f9cf9631c9ae505dd210c23b | Fix flake8 issues with OtsuMultipleThreshold.py | thewtex/tomviz,cryos/tomviz,cjh1/tomviz,mathturtle/tomviz,thewtex/tomviz,cryos/tomviz,mathturtle/tomviz,cjh1/tomviz,mathturtle/tomviz,OpenChemistry/tomviz,OpenChemistry/tomviz,OpenChemistry/tomviz,thewtex/tomviz,cryos/tomviz,cjh1/tomviz,OpenChemistry/tomviz | tomviz/python/OtsuMultipleThreshold.py | tomviz/python/OtsuMultipleThreshold.py | def transform_scalars(dataset):
"""This filter performs semi-automatic multithresholding of a data set.
Voxels are automatically classified into a chosen number of classes such
that inter-class variance of the voxel values is minimized. The output is a
label map with one label per voxel class.
"""
... | def transform_scalars(dataset):
"""This filter performs semi-automatic multithresholding of a data set.
Voxels are automatically classified into a chosen number of classes such that
inter-class variance of the voxel values is minimized. The output is a label
map with one label per voxel class.
"""
... | bsd-3-clause | Python |
3e1f330236fdb0af692099f91ee3435d273a7bad | Fix import error "No module named six.moves" for plugin sanity job | cisco-openstack/tempest,openstack/tempest,cisco-openstack/tempest,Juniper/tempest,masayukig/tempest,vedujoshi/tempest,masayukig/tempest,openstack/tempest,Juniper/tempest,vedujoshi/tempest | tools/generate-tempest-plugins-list.py | tools/generate-tempest-plugins-list.py | #! /usr/bin/env python
# Copyright 2016 Hewlett Packard Enterprise Development Company, L.P.
#
# 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... | #! /usr/bin/env python
# Copyright 2016 Hewlett Packard Enterprise Development Company, L.P.
#
# 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... | apache-2.0 | Python |
e065515362281039f459e5fa79292957f0435aa7 | Fix copyright year | uber-common/opentracing-python-instrumentation,uber-common/opentracing-python-instrumentation | opentracing_instrumentation/client_hooks/_singleton.py | opentracing_instrumentation/client_hooks/_singleton.py | # Copyright (c) 2015,2018 Uber Technologies, Inc.
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge,... | # Copyright (c) 2018 Uber Technologies, Inc.
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publ... | mit | Python |
d896082b282d17616573de2bcca4b383420d1e7a | Fix a bad import (get_version) | Agicia/lpod-python,lpod/lpod-docs,Agicia/lpod-python,lpod/lpod-docs | python/__init__.py | python/__init__.py | # -*- coding: UTF-8 -*-
# Copyright (C) 2009 Itaapy, ArsAperta, Pierlis, Talend
# Import from itools
from itools.core import get_version
__version__ = get_version()
| # -*- coding: UTF-8 -*-
# Copyright (C) 2009 Itaapy, ArsAperta, Pierlis, Talend
# Import from itools
from itools.pkg import get_version
__version__ = get_version()
| apache-2.0 | Python |
b78ce84f2a36789fc0fbb6b184b5c8d8ebb23234 | Clarify py.test arguments in run_test.py | ericdill/bluesky,ericdill/bluesky | run_tests.py | run_tests.py | #!/usr/bin/env python
import sys
import pytest
if __name__ == '__main__':
# show output results from every test function
args = ['-v']
# show the message output for skipped and expected failure tests
args.append('-rxs')
# compute coverage stats for bluesky
args.extend(['--cov', 'bluesky'])
... | #!/usr/bin/env python
import sys
import pytest
if __name__ == '__main__':
sys.exit(pytest.main())
| bsd-3-clause | Python |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.