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 |
|---|---|---|---|---|---|---|---|---|
b59cac320ad7057e35ca25d79a677eebad691617 | bump version to 0.2.0 | whitews/ReFlowRESTClient | setup.py | setup.py | from setuptools import setup
setup(
name='ReFlowRESTClient',
version='0.2.0',
author='Scott White',
author_email='scott.white@duke.edu',
packages=['reflowrestclient'],
package_data={'': []},
url='https://github.com/whitews/ReFlowRESTClient',
license='LICENSE.txt',
description='REST ... | from setuptools import setup
setup(
name='ReFlowRESTClient',
version='0.1.3b',
author='Scott White',
author_email='scott.white@duke.edu',
packages=['reflowrestclient'],
package_data={'': []},
url='https://github.com/whitews/ReFlowRESTClient',
license='LICENSE.txt',
description='REST... | bsd-3-clause | Python |
e2a8874e8b875de1cc8b335961bf766da93cadf9 | update RC1 | keras-team/keras-cv,keras-team/keras-cv,keras-team/keras-cv | setup.py | setup.py | # Copyright 2019 The KerasCV 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 or agreed to in ... | # Copyright 2019 The KerasCV 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 or agreed to in ... | apache-2.0 | Python |
165be2b256c790cc11df428a1dfdb71ecf767d89 | Fix numpy dependency. | bsmithyman/galoshes | setup.py | setup.py | '''Galoshes
'''
from distutils.core import setup
import numpy as np
from setuptools import find_packages
CLASSIFIERS = [
'Development Status :: 3 - Alpha',
'Intended Audience :: Developers',
'Intended Audience :: Science/Research',
'License :: OSI Approved :: MIT License',
'Programming Language :: Python',
'Topic :: ... | '''Galoshes
'''
import os
from distutils.core import setup
from setuptools import find_packages
CLASSIFIERS = [
'Development Status :: 3 - Alpha',
'Intended Audience :: Developers',
'Intended Audience :: Science/Research',
'License :: OSI Approved :: MIT License',
'Programming Language :: Python',
'Topic :: Scientifi... | mit | Python |
8e3e342107f7283c191d68400a3c2c485e0a3d9e | set version to 1.0.0.dev1 | fivejjs/pyuv,fivejjs/pyuv,saghul/pyuv,saghul/pyuv,saghul/pyuv,fivejjs/pyuv | setup.py | setup.py | # coding=utf-8
import codecs
try:
from setuptools import setup, Extension
except ImportError:
from distutils.core import setup, Extension
from setup_libuv import libuv_build_ext, libuv_sdist
__version__ = "1.0.0.dev1"
setup(name = "pyuv",
version = __version__,
author ... | # coding=utf-8
import codecs
try:
from setuptools import setup, Extension
except ImportError:
from distutils.core import setup, Extension
from setup_libuv import libuv_build_ext, libuv_sdist
__version__ = "1.0.0-dev"
setup(name = "pyuv",
version = __version__,
author ... | mit | Python |
3dc3d3185b4d3132994293851edba7acfc966ca0 | Add trove classifiers | erikrose/more-itertools,more-itertools/more-itertools | setup.py | setup.py | from re import sub
from setuptools import setup
def get_long_description():
# Fix display issues on PyPI caused by RST markup
readme = open('README.rst').read()
version_lines = []
with open('docs/versions.rst') as infile:
next(infile)
for line in infile:
line = line.rstri... | from re import sub
from setuptools import setup
def get_long_description():
# Fix display issues on PyPI caused by RST markup
readme = open('README.rst').read()
version_lines = []
with open('docs/versions.rst') as infile:
next(infile)
for line in infile:
line = line.rstri... | mit | Python |
eebf4a9da300ec74dec17ed04d2e52ef454a12cb | Add Mock to test requirements in setup.py | gaga3966/django-timepiece,josesanch/django-timepiece,gaga3966/django-timepiece,arbitrahj/django-timepiece,arbitrahj/django-timepiece,BocuStudio/django-timepiece,caktus/django-timepiece,caktus/django-timepiece,josesanch/django-timepiece,BocuStudio/django-timepiece,dannybrowne86/django-timepiece,dannybrowne86/django-time... | setup.py | setup.py | from setuptools import setup, find_packages
required_packages = [
'django>=1.3',
'psycopg2==2.4.1',
'python-dateutil==1.5',
'django-pagination==1.0.7',
'django-selectable==0.4.1',
'django-bootstrap-toolkit==2.5.6',
'django-compressor==1.2',
'pytz==2012c'
]
test_packages = [
'Mock=... | from setuptools import setup, find_packages
required_packages = [
'django>=1.3',
'psycopg2==2.4.1',
'python-dateutil==1.5',
'django-pagination==1.0.7',
'django-selectable==0.4.1',
'django-bootstrap-toolkit==2.5.6',
'django-compressor==1.2',
'pytz==2012c'
]
setup(
name='django-time... | mit | Python |
d029a1ef7ad76662d3cc27ea24bcac51d17774e9 | Fix license in setup.py | dyve/django-bootstrap3,dyve/django-bootstrap3 | setup.py | setup.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import os
import sys
import bootstrap3
try:
from setuptools import setup
except ImportError:
from distutils.core import setup
VERSION = bootstrap3.__version__
if sys.argv[-1] == 'publish':
os.system('cd docs && make html')
os.system('python setup.py sdi... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import os
import sys
import bootstrap3
try:
from setuptools import setup
except ImportError:
from distutils.core import setup
VERSION = bootstrap3.__version__
if sys.argv[-1] == 'publish':
os.system('cd docs && make html')
os.system('python setup.py sdi... | bsd-3-clause | Python |
fad31fcc4e0c3aa8c41bcb16cfce22ec40dd0635 | Bump version | ageorge/beets-bandcamp | setup.py | setup.py | from setuptools import setup
setup(
name='beets-bandcamp',
version='0.1.1',
description='Plugin for beets (http://beets.io) to use bandcamp as an autotagger source.',
long_description=open('README.rst').read(),
author='Ariel George',
author_email='unarbolito@gmail.com',
url='https://github.... | from setuptools import setup
setup(
name='beets-bandcamp',
version='0.1.0',
description='Plugin for beets (http://beets.io) to use bandcamp as an autotagger source.',
long_description=open('README.rst').read(),
author='Ariel George',
author_email='unarbolito@gmail.com',
url='https://github.... | mit | Python |
2905000d03d3f12d237ee407a594ce2318ec4fcd | Bump version | netbek/chrys,netbek/chrys,netbek/chrys | setup.py | setup.py | import setuptools
with open("README.md", "r") as fh:
long_description = fh.read()
setuptools.setup(
name="chrys",
version="2.0.26",
author="Hein Bekker",
author_email="hein@netbek.co.za",
description="A collection of color palettes for mapping and visualisation",
long_description=long_desc... | import setuptools
with open("README.md", "r") as fh:
long_description = fh.read()
setuptools.setup(
name="chrys",
version="2.0.25",
author="Hein Bekker",
author_email="hein@netbek.co.za",
description="A collection of color palettes for mapping and visualisation",
long_description=long_desc... | bsd-3-clause | Python |
e58f4390a3591db53461ad1a893ecb81a39d2c0e | Modify setup.py for Pypi distribution | PBrockmann/ipython-ferretmagic,PBrockmann/ipython_ferretmagic,PBrockmann/ipython_ferretmagic | setup.py | setup.py | import setuptools
with open("README.md", "r") as fh:
long_description = fh.read()
setuptools.setup(
name = 'ferretmagic',
packages = ['ferretmagic'],
py_modules = ['ferretmagic'],
version = '20200603',
description = 'ipython extension for pyferret',
author = 'Patrick Brockmann',
author_email = 'Patr... | import setuptools
with open("README.md", "r") as fh:
long_description = fh.read()
setuptools.setup(
name = 'ferretmagic',
packages = ['ferretmagic'],
py_modules = ['ferretmagic'],
version = '20181001',
description = 'ipython extension for pyferret',
author = 'Patrick Brockmann',
author_email = 'Patr... | mit | Python |
b678758c11ad55f7f33642414f97a678786a9418 | Remove Python 3.4 urllib3 specifier | pplu/botocore,boto/botocore | setup.py | setup.py | #!/usr/bin/env python
import codecs
import os.path
import re
import sys
from setuptools import setup, find_packages
here = os.path.abspath(os.path.dirname(__file__))
def read(*parts):
return codecs.open(os.path.join(here, *parts), 'r').read()
def find_version(*file_paths):
version_file = read(*file_paths... | #!/usr/bin/env python
import codecs
import os.path
import re
import sys
from setuptools import setup, find_packages
here = os.path.abspath(os.path.dirname(__file__))
def read(*parts):
return codecs.open(os.path.join(here, *parts), 'r').read()
def find_version(*file_paths):
version_file = read(*file_paths... | apache-2.0 | Python |
d3e20471497cad17d5f8a2c70d7be53f80efe000 | Update download URL to match current version / tag. | BlasiusVonSzerencsi/pagerduty-events-api | setup.py | setup.py | from setuptools import setup
setup(name='pagerduty_events_api',
version='0.2.0',
description='Python wrapper for Pagerduty Events API',
url='https://github.com/BlasiusVonSzerencsi/pagerduty-events-api',
download_url='https://github.com/BlasiusVonSzerencsi/pagerduty-events-api/tarball/0.2.0',
... | from setuptools import setup
setup(name='pagerduty_events_api',
version='0.2.0',
description='Python wrapper for Pagerduty Events API',
url='https://github.com/BlasiusVonSzerencsi/pagerduty-events-api',
download_url='https://github.com/BlasiusVonSzerencsi/pagerduty-events-api/tarball/0.1.1',
... | mit | Python |
0a1b387de5bcb1c7a8d223cce6f654a8bac5fed7 | Add long_description to package metadata for display by PyPI | tomhoule/django-minio-storage | setup.py | setup.py | # encoding: utf-8
from setuptools import setup
with open('README.md') as f:
long_description = f.read()
setup(
name="django-minio-storage",
license="MIT",
use_scm_version=True,
description="Django file storage using the minio python client",
long_description=long_description,
long_descript... | # encoding: utf-8
from setuptools import setup
setup(
name="django-minio-storage",
license="MIT",
use_scm_version=True,
description="Django file storage using the minio python client",
author="Tom Houlé",
author_email="tom@kafunsho.be",
url="https://github.com/py-pa/django-minio-storage",
... | apache-2.0 | Python |
f8976263c72ab3b4bb4b47e3a7746ea2f4c42af2 | fix syntax error | Pixelapse/pyglass | setup.py | setup.py | #!/usr/bin/env python
# System modules
import sys
import os
import shlex
import subprocess
import shutil
import platform
from os.path import join
# Library modules
try:
from setuptools import setup, find_packages
except ImportError:
from distutils.core import setup
from distutils.dir_util import copy_tree
from ... | #!/usr/bin/env python
# System modules
import sys
import os
import shlex
import subprocess
import shutil
import platform
from os.path import join
# Library modules
try:
from setuptools import setup, find_packages
except ImportError:
from distutils.core import setup
from distutils.dir_util import copy_tree
from ... | mit | Python |
5ca8f7981349ed86438185f02681225f059cc9d9 | add upper bound for grafeas (#30) | googleapis/python-containeranalysis,googleapis/python-containeranalysis | setup.py | setup.py | # -*- coding: utf-8 -*-
#
# Copyright 2019 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
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law... | # -*- coding: utf-8 -*-
#
# Copyright 2019 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
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law... | apache-2.0 | Python |
b5ee678115391885a00cfd1ee114c6b5b22f7a55 | Rename the package so we can push to PyPi | Aloomaio/facebook-sdk,mobolic/facebook-sdk | setup.py | setup.py | #!/usr/bin/env python
from distutils.core import setup
setup(
name='facebook-sdk',
version='0.2.0',
description='This client library is designed to support the Facebook Graph API and the official Facebook JavaScript SDK, which is the canonical way to implement Facebook authentication.',
author='Facebo... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from distutils.core import setup
setup(
name='facebook-python-sdk',
version='0.2.0',
description='This client library is designed to support the Facebook Graph API and the official Facebook JavaScript SDK, which is the canonical way to implement Facebook authe... | apache-2.0 | Python |
1bff5691232e1817a05f4440ea259a9065912ce7 | Bump to v0.1.2 | gisce/enerdata,Som-Energia/enerdata | setup.py | setup.py | from setuptools import setup, find_packages
setup(
name='enerdata',
version='0.1.2',
packages=find_packages(),
url='http://code.gisce.net',
license='MIT',
author='GISCE-TI, S.L.',
author_email='devel@gisce.net',
install_requires=[
'pytz'
],
description=''
)
| from setuptools import setup, find_packages
setup(
name='enerdata',
version='0.1.1',
packages=find_packages(),
url='http://code.gisce.net',
license='MIT',
author='GISCE-TI, S.L.',
author_email='devel@gisce.net',
install_requires=[
'pytz'
],
description=''
)
| mit | Python |
fa02cce7c1e158735cd54aea79623b048395841d | update setup.py to reflect all dependencies | edx/edx-notifications,edx/edx-notifications,edx/edx-notifications,edx/edx-notifications | setup.py | setup.py | #!/usr/bin/env python
from setuptools import setup
setup(
name='edx-notifications',
version='0.1.1',
description='Notification subsystem for Open edX',
long_description=open('README.md').read(),
author='edX',
url='https://github.com/edx/edx-notifications',
license='AGPL',
classifiers=[... | #!/usr/bin/env python
from setuptools import setup
setup(
name='edx-notifications',
version='0.1.1',
description='Notification subsystem for Open edX',
long_description=open('README.md').read(),
author='edX',
url='https://github.com/edx/edx-notifications',
license='AGPL',
classifiers=[... | agpl-3.0 | Python |
c3026fe38e132aa13c8be9a9e7f4c29cd2ed3ec3 | Fix release. | illagrenan/django-make-app,illagrenan/django-make-app | setup.py | setup.py | # coding=utf-8
import io
from setuptools import setup
setup(
name='django_make_app',
version='0.1.2.1',
description='Define models and fields using YAML and generate app for Django with views, forms, templates etc.',
long_description=io.open('README.rst').read(),
url='https://github.com/illagrena... | # coding=utf-8
import io
from setuptools import setup
setup(
name='django_make_app',
version='0.1.2',
description='Define models and fields using YAML and generate app for Django with views, forms, templates etc.',
long_description=io.open('README.rst').read(),
url='https://github.com/illagrenan/... | mit | Python |
b55df5699ed7e37a4388dae0ac29e7d4e927ee3b | Bump 0.4.0 | msgflo/msgflo-python | setup.py | setup.py | import os
from setuptools import find_packages, setup
with open(os.path.join(os.path.dirname(__file__), 'README.md')) as readme:
README = readme.read()
# allow setup.py to be run from any path
os.chdir(os.path.normpath(os.path.join(os.path.abspath(__file__), os.pardir)))
setup(
name='msgflo',
version='0.... | import os
from setuptools import find_packages, setup
with open(os.path.join(os.path.dirname(__file__), 'README.md')) as readme:
README = readme.read()
# allow setup.py to be run from any path
os.chdir(os.path.normpath(os.path.join(os.path.abspath(__file__), os.pardir)))
setup(
name='msgflo',
version='0.... | mit | Python |
8530130c6eb73f190ad36346154bdd55b605d8bc | Bump version | appknox/vendor,appknox/vendor,appknox/vendor | setup.py | setup.py | #! /usr/bin/env python
# -*- coding: utf-8 -*-
#
# vim: fenc=utf-8
# vim: tabstop=4 expandtab shiftwidth=4 softtabstop=4
#
#
"""
File name: setup.py
Version: 0.1
Author: dhilipsiva <dhilipsiva@gmail.com>
Date created: 2015-11-24
"""
from setuptools import setup, find_packages
setup(
name='ak-vendor',
version... | #! /usr/bin/env python
# -*- coding: utf-8 -*-
#
# vim: fenc=utf-8
# vim: tabstop=4 expandtab shiftwidth=4 softtabstop=4
#
#
"""
File name: setup.py
Version: 0.1
Author: dhilipsiva <dhilipsiva@gmail.com>
Date created: 2015-11-24
"""
from setuptools import setup, find_packages
setup(
name='ak-vendor',
version... | mit | Python |
6dcd9570b3250e55be8aa43a9ec696e714319c47 | Remove scikit-learn as a dependency | samueljackson92/coranking | setup.py | setup.py | import sys
if sys.version_info[0] >= 3:
import builtins
else:
import __builtin__ as builtins
try:
from setuptools import setup
except ImportError:
from distutils.core import setup
from distutils.core import Extension
try:
# Try building with Cython
from Cython.Distutils import build_ext
f... | import sys
if sys.version_info[0] >= 3:
import builtins
else:
import __builtin__ as builtins
try:
from setuptools import setup
except ImportError:
from distutils.core import setup
from distutils.core import Extension
try:
# Try building with Cython
from Cython.Distutils import build_ext
f... | mit | Python |
ba05c7b10d276ae908de3117685c39fecfe93a03 | Add missing packages parameter to setup | renanivo/pytest-testdox | setup.py | setup.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import os
from setuptools import setup
def read(fname):
path = os.path.join(os.path.dirname(__file__), fname)
with open(path) as f:
return f.read()
setup(
name='pytest-testdox',
version='0.0.1',
description='A testdox format reporter for pyt... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import os
from setuptools import setup
def read(fname):
path = os.path.join(os.path.dirname(__file__), fname)
with open(path) as f:
return f.read()
setup(
name='pytest-testdox',
version='0.0.1',
description='A testdox format reporter for pyt... | mit | Python |
57363540ad24e8df38588668b697be77d570f9e1 | Update setup.py (remove binica, change SCoT to scot, and add scot.external). | cle1109/scot,cbrnr/scot,mbillingr/SCoT,scot-dev/scot,scot-dev/scot,mbillingr/SCoT,cle1109/scot,cbrnr/scot | setup.py | setup.py | #!/usr/bin/env python
from distutils.core import setup
versionfile = open('VERSION', 'r')
ver = versionfile.read().strip()
versionfile.close()
setup(name='scot',
version=ver,
description='Source Connectivity Toolbox',
author='Martin Billinger',
author_email='martin.billinger@tugraz.at',
... | #!/usr/bin/env python
from distutils.core import setup
versionfile = open('VERSION', 'r')
ver = versionfile.read().strip()
versionfile.close()
setup(name='SCoT',
version=ver,
description='Source Connectivity Toolbox',
author='Martin Billinger',
author_email='martin.billinger@tugraz.at',
... | mit | Python |
76433eaef0464f00decf9031cf43fb2308886cdf | Add transaction to the underlying setup.py requirements | petrilli/pyramid_transactional_celery,petrilli/pyramid_transactional_celery | setup.py | setup.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
try:
from setuptools import setup
except ImportError:
from distutils.core import setup
readme = open('README.rst').read()
history = open('HISTORY.rst').read().replace('.. :changelog:', '')
requirements = [
'transaction',
]
test_requirements = [
# TODO:... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
try:
from setuptools import setup
except ImportError:
from distutils.core import setup
readme = open('README.rst').read()
history = open('HISTORY.rst').read().replace('.. :changelog:', '')
requirements = [
# TODO: put package requirements here
]
test_requi... | bsd-3-clause | Python |
c1299d7d02a02b4c63de37fdecf31255dc7398fe | Fix version of django <3 | Pierre-Sassoulas/django-survey,Pierre-Sassoulas/django-survey,Pierre-Sassoulas/django-survey | setup.py | setup.py | import sys
from os import path
import setuptools
if sys.version_info < (3, 6):
sys.exit("Sorry, Python < 3.6 is not supported")
DESCRIPTION = (
"A django survey app, based on and compatible with "
'"django-survey". You will be able to migrate your data from an ancient '
"version of django-survey, but... | import sys
from os import path
import setuptools
if sys.version_info < (3, 6):
sys.exit("Sorry, Python < 3.6 is not supported")
DESCRIPTION = (
"A django survey app, based on and compatible with "
'"django-survey". You will be able to migrate your data from an ancient '
"version of django-survey, but... | agpl-3.0 | Python |
0209a92c237acb223dff5476a973a8838bd3538d | Bump version to 0.3.19 | mwilliamson/spur.py | setup.py | setup.py | #!/usr/bin/env python
import os
from setuptools import setup
def read(fname):
return open(os.path.join(os.path.dirname(__file__), fname)).read()
setup(
name='spur',
version='0.3.19',
description='Run commands and manipulate files locally or over SSH using the same interface',
long_description=rea... | #!/usr/bin/env python
import os
from setuptools import setup
def read(fname):
return open(os.path.join(os.path.dirname(__file__), fname)).read()
setup(
name='spur',
version='0.3.18',
description='Run commands and manipulate files locally or over SSH using the same interface',
long_description=rea... | bsd-2-clause | Python |
b996c38c03b5303815011b01e7d0018907fcd682 | Use a separate log object | singingwolfboy/flask-dance-slack | slack.py | slack.py | import os
import sys
import logging
from werkzeug.contrib.fixers import ProxyFix
import flask
from flask import Flask, redirect, url_for
from flask_dance.consumer import OAuth2ConsumerBlueprint
from raven.contrib.flask import Sentry
log = logging.getLogger(__name__)
log.setLevel(logging.INFO)
app = Flask(__name__)
ap... | import os
import sys
import logging
from werkzeug.contrib.fixers import ProxyFix
import flask
from flask import Flask, redirect, url_for
from flask_dance.consumer import OAuth2ConsumerBlueprint
from raven.contrib.flask import Sentry
app = Flask(__name__)
app.wsgi_app = ProxyFix(app.wsgi_app)
sentry = Sentry(app)
loggi... | mit | Python |
6122a8488613bdd7d5aaf80e7238cd2d80687a91 | Update price attribute to price_history list as well as update function accordingly. | bsmukasa/stock_alerter | stock.py | stock.py | class Stock:
def __init__(self, symbol):
self.symbol = symbol
self.price_history = []
@property
def price(self):
if self.price_history:
return self.price_history[-1]
else:
return None
def update(self, timestamp, price):
if price < 0:
... | class Stock:
def __init__(self, symbol):
self.symbol = symbol
self.price = None
def update(self, timestamp, price):
if price < 0:
raise ValueError("price should not be negative")
self.price = price
| mit | Python |
fbdb52a8a15cec2f6949090d9664b95e5479f4c0 | add temp code replacement hack due to gapic code-gen template bug (#201) | googleapis/java-bigquerystorage,googleapis/java-bigquerystorage,googleapis/java-bigquerystorage | synth.py | synth.py | # Copyright 2019 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 2019 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 |
a6be9e38950600ad429ababfe355e8cb52b4325a | set AUTOSYNTH_MULTIPLE_COMMITS=true for context aware commits (#163) | googleapis/nodejs-datalabeling,googleapis/nodejs-datalabeling,googleapis/nodejs-datalabeling | synth.py | synth.py | # Copyright 2018 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 2018 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 |
0a66a93a7e95ec35f26c5bc1256a687913ad16c8 | enable context aware commits (#95) | googleapis/java-scheduler,googleapis/java-scheduler,googleapis/java-scheduler | synth.py | synth.py | # Copyright 2018 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 2018 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 |
9f9827185bd6a840044e367e2dede83868962ee3 | fix proto messages (#2612) | googleapis/google-cloud-php-text-to-speech,googleapis/google-cloud-php-text-to-speech | synth.py | synth.py | # Copyright 2018 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 2018 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 |
797057345393b74b8df21b145d784f38c1d565a5 | Update invoke tasks. | jmcarp/py-cfenv | tasks.py | tasks.py | # -*- coding: utf-8 -*-
from invoke import task, run
@task
def clean(ctx):
run('rm -rf dist')
run('rm -rf build')
run('rm -rf cfenv.egg-info')
@task
def publish(ctx, test=False):
"""Publish to the cheeseshop."""
clean(ctx)
if test:
run('python setup.py register -r test sdist bdist_whe... | # -*- coding: utf-8 -*-
from invoke import task, run
@task
def clean():
run('rm -rf dist')
run('rm -rf build')
run('rm -rf cfenv.egg-info')
@task
def publish(test=False):
"""Publish to the cheeseshop."""
clean()
if test:
run('python setup.py register -r test sdist bdist_wheel', echo=T... | mit | Python |
1583aaf429e252f32439759e1363f3908efa0b03 | Set a higher default for darks | zemogle/raspberrysky | tasks.py | tasks.py | from celery import Celery
from allsky import single_image_raspistill
celery = Celery('tasks', broker='redis://localhost:6379/0', backend='redis://localhost:6379/0')
@celery.task
def background_task():
# some long running task here (this simple example has no output)
pid = single_image_raspistill(filename='st... | from celery import Celery
from allsky import single_image_raspistill
celery = Celery('tasks', broker='redis://localhost:6379/0', backend='redis://localhost:6379/0')
@celery.task
def background_task():
# some long running task here (this simple example has no output)
pid = single_image_raspistill(filename='st... | mit | Python |
298dff5183ea43ea556a85cec40748c31d169a15 | support latest muffin | klen/muffin-sentry | tests.py | tests.py | from unittest import mock
import muffin
import pytest
@pytest.fixture
def app():
import muffin_sentry
app = muffin.Application(SENTRY_DSN="http://public:secret@example.com/1")
sentry = muffin_sentry.Plugin(app)
assert sentry.app
return app
async def test_muffin_sentry(app, client):
sentr... | from unittest import mock
import muffin
import pytest
@pytest.fixture
def app():
import muffin_sentry
app = muffin.Application('sentry', SENTRY_DSN="http://public:secret@example.com/1")
sentry = muffin_sentry.Plugin(app)
assert sentry.app
return app
async def test_muffin_sentry(app, client):... | mit | Python |
00dcad5330f9f5381e923f69b1392f9db591de4a | Add stack tests | nickdrozd/ecio-lisp,nickdrozd/ecio-lisp | tests.py | tests.py | import unittest
import subprocess
from reg import *
from stack import *
class EvalTest(unittest.TestCase):
# setup #
def __init__(self, *args, **kwargs):
super().__init__(*args, **kwargs)
self.verbose = 0
self.reg1 = 'TEST_REG1'
self.reg2 = 'TEST_REG2'
self.stack = 'TEST_STACK'
self.files = self.reg... | import unittest
import subprocess
from reg import *
class EvalTest(unittest.TestCase):
def setUp(self):
self.verbose = 1
self.test_reg = 'TEST'
subprocess.call('touch TEST'.split(' '))
def tearDown(self):
subprocess.call('rm TEST'.split(' '))
def test_reg(self):
data = 'hello'
self.assign_and_verify(... | mit | Python |
c092df63766b96f1a0802c13e12e8dae7a9d4d69 | add coverage to python test run | dsten/datascience,data-8/datascience | tests.py | tests.py | import pytest
import sys
if __name__ == "__main__":
sys.exit(pytest.main(['--nbval-lax', '--cov=datascience', 'tests'])) | import pytest
import sys
if __name__ == "__main__":
sys.exit(pytest.main(["tests"])) | bsd-3-clause | Python |
97d176bfb36e4410c4b631e236b2681e0ad576da | Add missing string interpolation in error message. (#24) | click-contrib/click-log | click_log/options.py | click_log/options.py | import logging
import click
from .core import _normalize_logger
def simple_verbosity_option(logger=None, *names, **kwargs):
'''A decorator that adds a `--verbosity, -v` option to the decorated
command.
Name can be configured through ``*names``. Keyword arguments are passed to
the underlying ``click.... | import logging
import click
from .core import _normalize_logger
def simple_verbosity_option(logger=None, *names, **kwargs):
'''A decorator that adds a `--verbosity, -v` option to the decorated
command.
Name can be configured through ``*names``. Keyword arguments are passed to
the underlying ``click.... | mit | Python |
d3e3fa53e9364ba9ba90eb0b7fee009ceca204e3 | make get_config_from_args work correctly | NUKnightLab/tarbell,eads/tarbell,eyeseast/tarbell,tarbell-project/tarbell,tarbell-project/tarbell,NUKnightLab/tarbell,NUKnightLab/tarbell,eyeseast/tarbell,eads/tarbell | tarbell/utils.py | tarbell/utils.py | # -*- coding: utf-8 -*-
"""
tarbell.utils
~~~~~~~~~
This module provides utilities for Tarbell.
"""
import os
import sys
from clint.textui import colored
def list_get(l, idx, default=None):
"""Get from a list with an optional default value."""
try:
if l[idx]:
return l[idx]
else:
... | # -*- coding: utf-8 -*-
"""
tarbell.utils
~~~~~~~~~
This module provides utilities for Tarbell.
"""
import os
import sys
from clint.textui import colored
def list_get(l, idx, default=None):
"""Get from a list with an optional default value."""
try:
if l[idx]:
return l[idx]
else:
... | bsd-3-clause | Python |
df81ef2c3c029d7f00bb15475fe170b82de743e2 | handle empty csr_map in csr_map_update | mithro/HDMI2USB-litex-firmware,mithro/HDMI2USB-litex-firmware,mithro/HDMI2USB-litex-firmware,mithro/HDMI2USB-litex-firmware | targets/utils.py | targets/utils.py | import pprint
def period_ns(freq):
return 1e9/freq
def csr_map_update(csr_map, csr_peripherals):
csr_map.update(dict((n, v)
for v, n in enumerate(csr_peripherals, start=(max(csr_map.values()) + 1) if csr_map else 0)))
def csr_map_update_print(csr_map, csr_peripherals):
print()
print("-"*75... | import pprint
def period_ns(freq):
return 1e9/freq
def csr_map_update(csr_map, csr_peripherals):
csr_map.update(dict((n, v)
for v, n in enumerate(csr_peripherals, start=max(csr_map.values()) + 1)))
def csr_map_update_print(csr_map, csr_peripherals):
print()
print("-"*75)
print("Previou... | bsd-2-clause | Python |
818ed2dc1b46e4e5c1b3a555713bbcdad27b4fe9 | Update version to 0.5.0 | climapulse/dj-bgfiles | bgfiles/__init__.py | bgfiles/__init__.py | __version__ = '0.5.0'
| __version__ = '0.4.0'
| bsd-3-clause | Python |
8c5a2b0a09b4f07a58ba901767e99e4d12d1e62a | Remove rtmpt conversion | wlerin/showroom | proxy_showroom.py | proxy_showroom.py | #!/usr/bin/env python3
# if having trouble connecting, try using this instead of the basic showroom.py,
# with HTTP_PROXY/http_proxy environment variables set
import showroom.core
BaseDownloader = showroom.core.Downloader
class PatchedDownloader(BaseDownloader):
pass
showroom.core.Downloader = PatchedDownloade... | #!/usr/bin/env python3
# if having trouble connecting, try using this instead of the basic showroom.py,
# with HTTP_PROXY/http_proxy environment variables set
import showroom.core
BaseDownloader = showroom.core.Downloader
class PatchedDownloader(BaseDownloader):
@property
def stream_url(self):
return... | mit | Python |
5ac6fefcc2544a99b95f83067f69b8da464e4f59 | Remove unused import | sorki/ckanext-redmine-autoissues,aptivate/ckanext-syndicate,sorki/ckanext-redmine-autoissues,aptivate/ckanext-syndicate | ckanext/syndicate/plugin.py | ckanext/syndicate/plugin.py | import os
import ckan.plugins as plugins
import ckan.plugins.toolkit as toolkit
from ckan.lib.celery_app import celery
from pylons import config
import ckan.model as model
from ckan.model.domain_object import DomainObjectOperation
import uuid
SYNDICATE_FLAG = 'syndicate'
def syndicate_task(package_id, topic):
... | import os
import ckan.plugins as plugins
import ckan.plugins.toolkit as toolkit
from ckan.lib.celery_app import celery
from pylons import config
import ckan.model as model
from ckan.model.domain_object import DomainObjectOperation
import uuid
SYNDICATE_FLAG = 'syndicate'
def syndicate_task(package_id, topic):
... | agpl-3.0 | Python |
7d781cfbd3dc5813afc5eef7b5c4e6019351339f | update version. Add Flask support. | clach04/json-rpc | jsonrpc/__init__.py | jsonrpc/__init__.py | __version = (1, 10, 1)
__version__ = version = '.'.join(map(str, __version))
__project__ = PROJECT = __name__
from .manager import JSONRPCResponseManager
from .dispatcher import Dispatcher
dispatcher = Dispatcher()
# lint_ignore=W0611,W0401
| __version = (1, 9, 2)
__version__ = version = '.'.join(map(str, __version))
__project__ = PROJECT = __name__
from .manager import JSONRPCResponseManager
from .dispatcher import Dispatcher
dispatcher = Dispatcher()
# lint_ignore=W0611,W0401
| mit | Python |
984c3fa8fb1eb872bbba4e959ca620a30d67d7eb | Use module as singleton instead of class | peterl94/CLbundler,peterl94/CLbundler | clbundler/formulamanager.py | clbundler/formulamanager.py | import os
import imp
_formula_cache = {}
_formula_kit_cache = {}
_default_search_path = [os.path.join(os.path.dirname(__file__), "..", "Formula")]
_default_search_path.append(os.path.join(_default_search_path[0], config.os_name()))
def _find(name, search_path=[]):
formula_path = ""
for path in search_path + ... | import os
import imp
_formula_cache = {}
_default_search_path = [os.path.join(os.path.dirname(__file__), "..", "Formula")]
class FormulaManager:
@staticmethod
def _find(name, search_path=[]):
file_path = ""
for path in search_path + default_search_path:
if os.path.exists(os.path.j... | mit | Python |
615d5f585b1f3083d0f5e334b4851b1a434ca305 | remove old LGPL license terms | hirokiky/jubatus-python-client,jubatus/jubatus-python-client,hirokiky/jubatus-python-client,jubatus/jubatus-python-client | jubatus/__init__.py | jubatus/__init__.py |
__all__ = ["classifier", "regression", "recommender", "stat", "graph"]
from jubatus.classifier.client import classifier as Classifier
from jubatus.regression.client import regression as Regression
from jubatus.recommender.client import recommender as Recommender
from jubatus.stat.client import stat as Stat
from jubat... | # Jubatus: Online machine learning framework for distributed environment
# Copyright (C) 2011 Preferred Infrastracture and Nippon Telegraph and Telephone Corporation.
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by ... | mit | Python |
e0296d56655bb3ca47f37cfb0b11a875e4018fac | add configuration class to hold the config related data change logic correspondingly | jiakai-lian/XcodeProjectAutoConfigurator | xcode_auto_configor.py | xcode_auto_configor.py | #!/usr/bin/python
from mod_pbxproj import XcodeProject
import sys
import json
#print 'Number of arguments:', len(sys.argv), 'arguments.'
#print 'Argument List:', str(sys.argv)
class Configuration:
def __init__(self,jsonFileName):
self.jsonFileName = jsonFileName
#find config name
self.nam... | #!/usr/bin/python
from mod_pbxproj import XcodeProject
import sys
import json
#print 'Number of arguments:', len(sys.argv), 'arguments.'
#print 'Argument List:', str(sys.argv)
if len(sys.argv) < 2:
raise Exception("need project.pbxproj file path")
#read the file path
filePath = sys.argv[1]
if len(sys.argv) > ... | mit | Python |
ce396e27387702247fc68c5b78722d917036c729 | fix #4 | bashu/django-clearable-widget,bashu/django-clearable-widget,bashu/django-clearable-widget | clearable_widget/widgets.py | clearable_widget/widgets.py | # -*- coding: utf-8 -*-
from django import forms
from django.conf import settings
from django.utils.safestring import mark_safe
from django.template.loader import render_to_string
from django.contrib.staticfiles.storage import staticfiles_storage
class MediaMixin(object):
class Media: # pylint: disable=C1001
... | # -*- coding: utf-8 -*-
from django import forms
from django.conf import settings
from django.utils.safestring import mark_safe
from django.template.loader import render_to_string
from django.contrib.staticfiles.storage import staticfiles_storage
class MediaMixin(object):
class Media: # pylint: disable=C1001
... | bsd-3-clause | Python |
43c1f230382a3b7ad7776d28840c5305bb919ab9 | Fix load order to fix routes. | bac/juju-gui,bac/juju-gui,mitechie/juju-gui,mitechie/juju-gui,mitechie/juju-gui,mitechie/juju-gui,bac/juju-gui,bac/juju-gui | jujugui/__init__.py | jujugui/__init__.py | # Copyright 2015 Canonical Ltd. This software is licensed under the
# GNU Affero General Public License version 3 (see the file LICENSE).
from pyramid.config import Configurator
def main(global_config, **settings):
"""Return a Pyramid WSGI application."""
config = Configurator(settings=settings)
return ... | # Copyright 2015 Canonical Ltd. This software is licensed under the
# GNU Affero General Public License version 3 (see the file LICENSE).
from pyramid.config import Configurator
def main(global_config, **settings):
"""Return a Pyramid WSGI application."""
config = Configurator(settings=settings)
return ... | agpl-3.0 | Python |
e0769ed003139cf97dbecb102a6aab7818392315 | Fix inverted FaceBrow R macro ctrl | SqueezeStudioAnimation/omtk,SqueezeStudioAnimation/omtk | python/omtk/modules/rigFaceBrow.py | python/omtk/modules/rigFaceBrow.py | import pymel.core as pymel
from omtk.modules import rigFaceAvarGrps
from omtk.libs import libCtrlShapes
from omtk.libs import libRigging
from omtk.modules import rigFaceAvar
class CtrlBrow(rigFaceAvar.BaseCtrlFace):
def __createNode__(self, **kwargs):
return libCtrlShapes.create_triangle_low()
class Fac... | import pymel.core as pymel
from omtk.modules import rigFaceAvarGrps
from omtk.libs import libCtrlShapes
from omtk.libs import libRigging
from omtk.modules import rigFaceAvar
class CtrlBrow(rigFaceAvar.BaseCtrlFace):
def __createNode__(self, **kwargs):
return libCtrlShapes.create_triangle_low()
class Fac... | mit | Python |
75a4733d059f6aad758f93a9c6e4878093afd184 | Switch to paho-mqtt and make ready for py3 | fabaff/mqtt-panel,fabaff/mqtt-panel,fabaff/mqtt-panel | test-messages.py | test-messages.py | #!/usr/bin/python3
#
# test-messages.py - This script publish a random MQTT messages every 2 s.
#
# Copyright (c) 2013-2016, Fabian Affolter <fabian@affolter-engineering.ch>
# Released under the MIT license. See LICENSE file for details.
#
import random
import time
import paho.mqtt.client as mqtt
timestamp = int(time... | #!/usr/bin/python2
#
# test-messages.py - This script publish a random MQTT messages every 2 s.
#
# Copyright (c) 2013-2015, Fabian Affolter <fabian@affolter-engineering.ch>
# Released under the MIT license. See LICENSE file for details.
#
import random
import time
import mosquitto
timestamp = int(time.time())
broke... | mit | Python |
80be01d5a99c20f6190769474104bff0974dcd5d | fix typo | FunTimeCoding/python-skeleton,FunTimeCoding/python-skeleton | python_skeleton/python_skeleton.py | python_skeleton/python_skeleton.py | class PythonSkeleton:
@staticmethod
def run():
PythonSkeleton.hello()
return 0
@staticmethod
def hello():
print('Hello friend.')
| class PythonSkeleton:
@staticmethod
def run():
PythonSkeleton.hello()
return 0
@staticmethod
def hello():
print('Hello Friend.')
| mit | Python |
f553bcfb7be90c38647b5865afa1c9f854b1c2fc | bump version to 0.2.2 !cosmetic | jeicher/NMRPy | nmrpy/version.py | nmrpy/version.py | __version__ = '0.2.2'
| __version__ = '0.2.1'
| bsd-3-clause | Python |
ea83c242e17084f1fbf4666632f92516b0309940 | change proxied urls (#7973) | rtfd/readthedocs.org,rtfd/readthedocs.org,rtfd/readthedocs.org,rtfd/readthedocs.org | readthedocs/api/v2/proxied_urls.py | readthedocs/api/v2/proxied_urls.py | """
Proxied API URLs.
Served from the same domain docs are served,
so they can make use of features that require to have access to their cookies.
"""
from django.conf import settings
from django.conf.urls import include, url
from readthedocs.analytics.proxied_api import AnalyticsView
from readthedocs.search.proxied_... | """
Proxied API URLs.
Served from the same domain docs are served,
so they can make use of features that require to have access to their cookies.
"""
from django.conf import settings
from django.conf.urls import include, url
from readthedocs.analytics.proxied_api import AnalyticsView
from readthedocs.search.proxied_... | mit | Python |
9351521b9311aca655681174f43407af9cc50405 | Upgrade to 0.7 | learningequality/kolibri,jonboiser/kolibri,christianmemije/kolibri,lyw07/kolibri,indirectlylit/kolibri,DXCanas/kolibri,jonboiser/kolibri,jonboiser/kolibri,christianmemije/kolibri,mrpau/kolibri,christianmemije/kolibri,benjaoming/kolibri,mrpau/kolibri,indirectlylit/kolibri,learningequality/kolibri,indirectlylit/kolibri,l... | kolibri/__init__.py | kolibri/__init__.py | from __future__ import absolute_import, print_function, unicode_literals
# NB! This is not necessarily the version scheme we want, however having a good
# tracking of releases once we start doing lots of pre-releases is essential.
from .utils.version import get_version
#: This may not be the exact version as it's sub... | from __future__ import absolute_import, print_function, unicode_literals
# NB! This is not necessarily the version scheme we want, however having a good
# tracking of releases once we start doing lots of pre-releases is essential.
from .utils.version import get_version
#: This may not be the exact version as it's sub... | mit | Python |
a68832a2c97af876b628efe743f504b7b9d5927f | put the userdata building into base class for clouds | hep-gc/cloudscheduler,hep-gc/cloudscheduler,hep-gc/cloudscheduler,hep-gc/cloudscheduler | cloudscheduler/basecloud.py | cloudscheduler/basecloud.py | import gzip
import uuid
import cloudscheduler.config as csconfig
import cloudscheduler.cloud_init_util
import io.StringIO
class BaseCloud():
def __init__(self, name, slots=0, extrayaml=""):
self.name = name
self.enabled = False
self.vms = {}
self.slots = slots
self.max_slots... | import uuid
class BaseCloud():
def __init__(self, name, slots=0):
self.name = name
self.enabled = False
self.vms = {}
self.slots = slots
def __repr__(self):
return ' : '.join([self.name, self.slots, self.enabled])
def num_vms(self):
return len(vms)
de... | apache-2.0 | Python |
91e7bcfe8df281b682b40b1488e1b9b8fdd455bf | update the reacher env test. | tensorflow/tensor2tensor,tensorflow/tensor2tensor,tensorflow/tensor2tensor,tensorflow/tensor2tensor,tensorflow/tensor2tensor | tensor2tensor/envs/mujoco_problems_test.py | tensor2tensor/envs/mujoco_problems_test.py | # coding=utf-8
# Copyright 2019 The Tensor2Tensor 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
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable... | # coding=utf-8
# Copyright 2019 The Tensor2Tensor 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
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable... | apache-2.0 | Python |
c6d510905afeb7ccb6c557327c15981db2c7813a | Add documentation to plugin API. | ironman5366/W.I.L.L,ironman5366/W.I.L.L | will/plugins/API.py | will/plugins/API.py | """
-----------------------------------
Public facing API for WILL plugins.
-----------------------------------
Will uses an event driven plugin architecture revolving around the simple use
of decorators. Writing a plugin for WILL is as simple as subscribing to an event
via a simple decorator.
Events currently come ... | import pyplugins as plugins
import will.logger as logger
init = plugins.event(plugins.EVT_INIT)
shutdown = plugins.event(plugins.EVT_EXIT)
subscribe_to_any = plugins.event(plugins.EVT_ANY_INPUT)
subscribe_to = plugins.event
log = logger.log
| mit | Python |
355d87575796508ec59fe24dd1e31a36e3a600e4 | Fix various bugs so that it runs to completion with success | HazyResearch/dd-genomics,amwenger/dd-genomics,HazyResearch/dd-genomics,amwenger/dd-genomics,amwenger/dd-genomics,HazyResearch/dd-genomics,HazyResearch/dd-genomics,rionda/dd-genomics,rionda/dd-genomics,HazyResearch/dd-genomics | code/gene_mentions_local.py | code/gene_mentions_local.py | #! /usr/bin/env python3
#
# Find mentions of genes in a 'local' way (i.e., in a sentence-level way) by
# looking up words in the gene synonyms dictionary
#
# First argument is the application base directory
#
import json
import sys
# Type of the mentions
MENTION_TYPE="GENE"
# Load the gene synonyms dictionary
GENES... | #! /usr/bin/env python3
#
# Find mentions of genes in a 'local' way (i.e., in a sentence-level way) by
# looking up words in the gene synonyms dictionary
#
# First argument is the application base directory
#
import json
import sys
# Type of the mentions
MENTION_TYPE="GENE"
# Load the gene synonyms dictionary
GENES... | apache-2.0 | Python |
978c2de3375865c08e2469987cb77674aaceaa26 | Prepare pySBOL post19 | SynBioDex/libSBOL,SynBioDex/libSBOL,SynBioDex/libSBOL,SynBioDex/libSBOL | wrapper/__init__.py | wrapper/__init__.py | from __future__ import absolute_import
__version__ = '2.3.0'
__commit__ = 'ed3518f7e3a71933ab2ec051814a1fed34c7a704'
from sbol.sbol import *
import sbol.unit_tests
| from __future__ import absolute_import
__version__ = '2.3.0'
__commit__ = 'e2a2977660ade83ca32db644a4a28872befffd10'
from sbol.sbol import *
import sbol.unit_tests
| apache-2.0 | Python |
2a8f539718226dd92c4ec8f00e9d5c48fe6bb09f | Bump version | rm-hull/ssd1306 | oled/__init__.py | oled/__init__.py | """
ssd1306 for Python.
"""
__version__ = '0.3.4' | """
ssd1306 for Python.
"""
__version__ = '0.3.3' | mit | Python |
1651eb80c81fb66f4eb33581719cb6fa889330b5 | bump version | emunsing/pyiso,davidkuep/pyiso,emunsing/pyiso | pyiso/__init__.py | pyiso/__init__.py | import imp
import os.path
__version__ = '0.1.14'
def client_factory(client_name, **kwargs):
"""Return a client for an external data set"""
# set up
module_name = client_name.lower()
class_name = '%sClient' % client_name.upper()
dir_name = os.path.dirname(os.path.abspath(__file__))
error_msg ... | import imp
import os.path
__version__ = '0.1.13'
def client_factory(client_name, **kwargs):
"""Return a client for an external data set"""
# set up
module_name = client_name.lower()
class_name = '%sClient' % client_name.upper()
dir_name = os.path.dirname(os.path.abspath(__file__))
error_msg ... | apache-2.0 | Python |
4fcc4d8ef0e1983b88399806ce9e7ce3f69ef463 | Refactor for better naming | mapillary/OpenSfM,oscarlorentzon/OpenSfM,BrookRoberts/OpenSfM,oscarlorentzon/OpenSfM,mapillary/OpenSfM,BrookRoberts/OpenSfM,sunbingfengPI/OpenSFM_Test,sunbingfengPI/OpenSFM_Test,mapillary/OpenSfM,oscarlorentzon/OpenSfM,sunbingfengPI/OpenSFM_Test,sunbingfengPI/OpenSFM_Test,BrookRoberts/OpenSfM,mapillary/OpenSfM,BrookRob... | opensfm/dense.py | opensfm/dense.py |
import cv2
import numpy as np
from opensfm import csfm
def compute_depthmap(data, graph, reconstruction, shot_id):
"""Compute depthmap for a single shot."""
shot = reconstruction.shots[shot_id]
neighbors = find_neighboring_images(shot, reconstruction)
min_depth, max_depth = compute_depth_range(graph... | import cv2
import numpy as np
from opensfm import csfm
def compute_depthmap(data, graph, reconstruction, shot_id):
neighbors = find_neighboring_images(shot_id, reconstruction)
print shot_id, neighbors
de = csfm.DepthmapEstimator()
images = {}
for sid in neighbors:
shot = reconstruction.sh... | bsd-2-clause | Python |
93c43305a0d7d0c8fe4ffe6ddede4d3c6c409491 | Update test_planeXYZ.py | sebi06/BioFormatsRead | test_planeXYZ.py | test_planeXYZ.py | # -*- coding: utf-8 -*-
"""
@author: Sebi
File: test_planeXYZ.py
Date: 08.03.2017
Version. 0.2
"""
import bfimage as bf
# define filename
filename = r'testdata/Beads_63X_NA1.35_xy=0.042_z=0.1.czi'
# use for BioFormtas <= 5.1.10
urlnamespace = 'http://www.openmicroscopy.org/Schemas/OME/2015-01'
# use for BioFormtas ... | # -*- coding: utf-8 -*-
"""
@author: Sebi
File: test_planeXYZ.py
Date: 21.03.2016
Version. 0.1
"""
import bfimage as bf
# define filename
filename = r'testdata/Beads_63X_NA1.35_xy=0.042_z=0.1.czi'
# specify bioformats_package.jar to use if required
#bf.set_bfpath(insert path to bioformats_package.jar here)
# creat... | bsd-2-clause | Python |
e0691b5e9bbfa6555f55b09886f192141cc41764 | fix packages | andresriancho/dotcloud-cli | setup.py | setup.py | #!/usr/bin/env python
from setuptools import setup
VERSION = '0.9.0'
setup(
name = 'dotcloud2',
author = 'dotCloud Inc.',
version = VERSION,
packages = [
'dotcloud',
'dotcloud.ui',
'dotcloud.client'
],
scripts = [
'bin/dotcloud2'
],
install_requires = [... | #!/usr/bin/env python
from setuptools import setup
VERSION = '0.9.0'
setup(
name = 'dotcloud2',
author = 'dotCloud Inc.',
version = VERSION,
packages = [
'dotcloud.ui',
'dotcloud.client'
],
scripts = [
'bin/dotcloud2'
],
install_requires = ['argparse'],
zip... | mit | Python |
65911e48e7f071a02e87413308e80b25496a8d0c | Add runner support | czpython/aldryn-faq,czpython/aldryn-faq,czpython/aldryn-faq,czpython/aldryn-faq | test_settings.py | test_settings.py | HELPER_SETTINGS = {
'TIME_ZONE': 'Europe/Zurich',
'LANGUAGES': (
('en', 'English'),
('de', 'German'),
('fr', 'French'),
),
'INSTALLED_APPS': [
'adminsortable',
'aldryn_faq',
'djangocms_text_ckeditor',
'hvad',
'sortedm2m',
],
}
def run... | HELPER_SETTINGS = {
'TIME_ZONE': 'Europe/Zurich',
'LANGUAGES': (
('en', 'English'),
('de', 'German'),
('fr', 'French'),
),
'INSTALLED_APPS': [
'adminsortable',
'aldryn_faq',
'djangocms_text_ckeditor',
'hvad',
'sortedm2m',
],
}
| bsd-3-clause | Python |
4a8f62ed8ed22b8fb6dbd00727222d9631c98946 | fix train name | sunlightlabs/shred | wmata.py | wmata.py | import requests
from shred import Command
STATION_CODE = 'A03'
LINE_CODE = 'RD'
class MetroCommand(Command):
COMMAND = 'metro'
def __call__(self, *args, **kwargs):
url = 'http://api.wmata.com/StationPrediction.svc/json/GetPrediction/A03'
params = {'api_key': self.key}
resp = requ... | import requests
from shred import Command
STATION_CODE = 'A03'
LINE_CODE = 'RD'
class MetroCommand(Command):
COMMAND = 'metro'
def __call__(self, *args, **kwargs):
url = 'http://api.wmata.com/StationPrediction.svc/json/GetPrediction/A03'
params = {'api_key': self.key}
resp = requ... | bsd-3-clause | Python |
bf63084655e89ebf74f05270197ddbd1f6077926 | Fix a flake8 issue | davidfischer/rpc4django,davidfischer/rpc4django,davidfischer/rpc4django | rpc4django/templatetags/rpctags.py | rpc4django/templatetags/rpctags.py | '''
Creates a template tag that can handle `restructured text`_ (reST)
.. _restructured text: http://docutils.sourceforge.net/rst.html
'''
import logging
from django import template
from django.utils.safestring import mark_safe
from django.conf import settings
logger = logging.getLogger('rpc4django')
RESTRICT_REST... | '''
Creates a template tag that can handle `restructured text`_ (reST)
.. _restructured text: http://docutils.sourceforge.net/rst.html
'''
import logging
from django import template
from django.utils.safestring import mark_safe
from django.conf import settings
logger = logging.getLogger('rpc4django')
RESTRICT_REST... | bsd-3-clause | Python |
6261601e1178049bf04e6d28dfc18c42d996f782 | Convert assert statements of test_copy_without_render | venumech/cookiecutter,moi65/cookiecutter,0k/cookiecutter,vintasoftware/cookiecutter,sp1rs/cookiecutter,ionelmc/cookiecutter,drgarcia1986/cookiecutter,janusnic/cookiecutter,christabor/cookiecutter,audreyr/cookiecutter,hackebrot/cookiecutter,tylerdave/cookiecutter,terryjbates/cookiecutter,pjbull/cookiecutter,benthomasson... | tests/test_generate_copy_without_render.py | tests/test_generate_copy_without_render.py | def test_generate_copy_without_render_extensions():
generate.generate_files(
context={
'cookiecutter': {
"repo_name": "test_copy_without_render",
"render_test": "I have been rendered!",
"_copy_without_render": [
"*not-rendered",... | def test_generate_copy_without_render_extensions(self):
generate.generate_files(
context={
'cookiecutter': {
"repo_name": "test_copy_without_render",
"render_test": "I have been rendered!",
"_copy_without_render": [
"*not-render... | bsd-3-clause | Python |
92baf4dd6ed6ffd84c3ae93085c053ace2672d1f | add unsigned tests | JoelBender/bacpypes,JoelBender/bacpypes | tests/test_primitive_data/test_unsigned.py | tests/test_primitive_data/test_unsigned.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Test Primitive Data Unsigned
----------------------------
"""
import unittest
from bacpypes.debugging import bacpypes_debugging, ModuleLogger, xtob
from bacpypes.primitivedata import Unsigned, Tag
# some debugging
_debug = 0
_log = ModuleLogger(globals())
@bacpype... | mit | Python | |
15b8cbf7e5eb51a0900ad8c46549e8b81d751459 | replace assertFalse with assertIs | mweb/python,exercism/xpython,exercism/python,mweb/python,N-Parsons/exercism-python,N-Parsons/exercism-python,pheanex/xpython,exercism/xpython,jmluy/xpython,smalley/python,behrtam/xpython,jmluy/xpython,pheanex/xpython,behrtam/xpython,exercism/python,smalley/python | exercises/pascals-triangle/pascals_triangle_test.py | exercises/pascals-triangle/pascals_triangle_test.py | import unittest
from pascals_triangle import triangle, row, is_triangle
class PascalsTriangleTest(unittest.TestCase):
def test_triangle1(self):
ans = ['1', '1 1', '1 2 1', '1 3 3 1', '1 4 6 4 1']
self.assertEqual(triangle(4), ans)
def test_triangle2(self):
ans = ['1', '1 1', '1 2 1',... | import unittest
from pascals_triangle import triangle, row, is_triangle
class PascalsTriangleTest(unittest.TestCase):
def test_triangle1(self):
ans = ['1', '1 1', '1 2 1', '1 3 3 1', '1 4 6 4 1']
self.assertEqual(triangle(4), ans)
def test_triangle2(self):
ans = ['1', '1 1', '1 2 1',... | mit | Python |
d501f1cc03a4d3d873b417ad1fa5b73e91f67365 | Fix improper use of yield in generator | saltstack/salt,saltstack/salt,saltstack/salt,saltstack/salt,saltstack/salt | salt/log/handlers/log4mongo_mod.py | salt/log/handlers/log4mongo_mod.py | # -*- coding: utf-8 -*-
'''
Log4Mongo Logging Handler
=========================
This module provides a logging handler for sending salt logs to MongoDB
Configuration
-------------
In the salt configuration file (e.g. /etc/salt/{master,minion}):
.. code-block:: yaml
log4mongo_han... | # -*- coding: utf-8 -*-
'''
Log4Mongo Logging Handler
=========================
This module provides a logging handler for sending salt logs to MongoDB
Configuration
-------------
In the salt configuration file (e.g. /etc/salt/{master,minion}):
.. code-block:: yaml
log4mongo_han... | apache-2.0 | Python |
56bc64cf58fb180b3270948446660c83995fc583 | fix docs for choose | piotrmaslanka/satella,piotrmaslanka/satella | satella/coding/sequences/choose.py | satella/coding/sequences/choose.py | import typing as tp
IteratorOrIterable = tp.Union[tp.Iterator, tp.Iterable]
def choose_one(filter_fun: tp.Callable[[tp.Any], bool], iterable: IteratorOrIterable) -> tp.Any:
"""
Syntactic sugar for
>>> choose(filter_fun, iterable, check_multiple=True)
This exhausts the iterable.
:param filter_f... | import typing as tp
IteratorOrIterable = tp.Union[tp.Iterator, tp.Iterable]
def choose_one(filter_fun: tp.Callable[[tp.Any], bool], iterable: IteratorOrIterable) -> tp.Any:
"""
Syntactic sugar for
>>> choose(filter_fun, iterable, check_multiple=True)
This exhausts the iterable.
:param filter_f... | mit | Python |
668eaa6591f8039ada2b4b6d50b3970655373216 | Bump version 0.19.0rc15 --> 0.19.0rc16 | lbryio/lbry,lbryio/lbry,lbryio/lbry | lbrynet/__init__.py | lbrynet/__init__.py | import logging
__version__ = "0.19.0rc16"
version = tuple(__version__.split('.'))
logging.getLogger(__name__).addHandler(logging.NullHandler())
| import logging
__version__ = "0.19.0rc15"
version = tuple(__version__.split('.'))
logging.getLogger(__name__).addHandler(logging.NullHandler())
| mit | Python |
de1afc2feb1e7572ee7a59909247a2cde67492c9 | Add __slots__ to satisfy tests (rudimentary_repr is still ordinary __repr__ if __slots__ are there). | ionelmc/python-hunter | tests/sample3.py | tests/sample3.py | class Bad(Exception):
__slots__ = []
def __repr__(self):
raise RuntimeError("I'm a bad class!")
def a():
x = Bad()
return x
def b():
x = Bad()
raise x
a()
try:
b()
except Exception as exc:
print(exc)
| class Bad(Exception):
def __repr__(self):
raise RuntimeError("I'm a bad class!")
def a():
x = Bad()
return x
def b():
x = Bad()
raise x
a()
try:
b()
except Exception as exc:
print(exc)
| bsd-2-clause | Python |
35160bb4a8473fa8811966aed1ba69d827827aa3 | Add Sitemap.create_node() | Lodifice/mfnf-pdf-export,Lodifice/mfnf-pdf-export,Lodifice/mfnf-pdf-export | parse_sitemap.py | parse_sitemap.py | """Module for parsing the sitemap of MFNF into a JSON file."""
import re
import requests
from api import MediaWikiSession, MediaWikiAPI
class Sitemap:
"""Functions for parsing sitemap."""
@staticmethod
def create_node(code, depth):
"""Returns a sitemap node with no children"""
return {"c... | """Module for parsing the sitemap of MFNF into a JSON file."""
import re
import requests
from api import MediaWikiSession, MediaWikiAPI
class Sitemap:
@staticmethod
def compute_tokens(sitemap):
"""Generator for all node specifications in a sitemap. It yields tuples
`(code, depth)` whereas `c... | apache-2.0 | Python |
188afd6dd056e0ae34607ca1dea8a74f4f247c42 | refresh API | svebk/DeepSentiBank_memex,svebk/DeepSentiBank_memex,svebk/DeepSentiBank_memex,svebk/DeepSentiBank_memex | scripts/continuous_update_hbase.py | scripts/continuous_update_hbase.py | import os
import sys
import time
import datetime
sys.path.append('..')
import cu_image_search
from cu_image_search.update import updater_hbase
lasttime = 0
interval = 300
if __name__=="__main__":
""" Run updater based on `conf_file` given as parameter
"""
if len(sys.argv)<2:
print "python continuo... | import os
import sys
import time
import datetime
sys.path.append('..')
import cu_image_search
from cu_image_search.update import updater_hbase
lasttime = 0
interval = 60
if __name__=="__main__":
""" Run updater based on `conf_file` given as parameter
"""
if len(sys.argv)<2:
print "python continuou... | bsd-2-clause | Python |
9274cd94442b2507b2d83e2a3e305a0a3b5dc802 | Fix the unnecessary list comprehension | lord63/zhihudaily,lord63/zhihudaily,lord63/zhihudaily | zhihudaily/utils.py | zhihudaily/utils.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from __future__ import absolute_import, unicode_literals
import re
import requests
from zhihudaily.cache import cache
@cache.memoize(timeout=1200)
def make_request(url):
session = requests.Session()
session.headers.update({'User-Agent': 'Mozilla/5.0 (X11; Ubun... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from __future__ import absolute_import, unicode_literals
import re
import requests
from zhihudaily.cache import cache
@cache.memoize(timeout=1200)
def make_request(url):
session = requests.Session()
session.headers.update({'User-Agent': 'Mozilla/5.0 (X11; Ubun... | mit | Python |
9aa673593baa67d6e7fc861015041cfb6b69c6c3 | Fix import of common module | sebbrochet/ranwinconf | bin/list_winconf.py | bin/list_winconf.py | #!/usr/bin/env python
def main():
import argparse
from ranwinconf.common import generate_host_config
parser = argparse.ArgumentParser()
parser.add_argument('host', type=str, help="Name or IP of the host to get configuration from")
parser.add_argument('--output', type=str, nargs='?', default='<stdo... | #!/usr/bin/env python
def main():
import argparse
from ranwinconf.common import generate_host_config
parser = argparse.ArgumentParser()
parser.add_argument('host', type=str, help="Name or IP of the host to get configuration from")
parser.add_argument('--output', type=str, nargs='?', default='<stdo... | mit | Python |
b0a1ed3b76b932cf55c598d114911a08c2dfa0b0 | Remove default value for kiosk_id in init | mrbrowning/queueing | queueing/kiosk.py | queueing/kiosk.py | """
queueing.kiosk
==============
Logic for checkout kiosks.
:author: Michael Browning
:copyright: (c) 2013 by Michael Browning.
:license: BSD, see LICENSE for more details.
"""
import threading
import Queue
class Kiosk(threading.Thread):
"""A kiosk that customers check out at."""
... | """
queueing.kiosk
==============
Logic for checkout kiosks.
:author: Michael Browning
:copyright: (c) 2013 by Michael Browning.
:license: BSD, see LICENSE for more details.
"""
import threading
import Queue
class Kiosk(threading.Thread):
"""A kiosk that customers check out at."""
... | bsd-3-clause | Python |
fd50c3d92531bd9c33f741889d70a6addac77b84 | Bump version | renalreg/radar,renalreg/radar,renalreg/radar,renalreg/radar | radar/__init__.py | radar/__init__.py | __version__ = '2.9.0'
| __version__ = '2.8.0'
| agpl-3.0 | Python |
71f73cd4f009875904f545bf559bbdec351d9c20 | remove logging | Youhana-Hana/interpolation,Youhana-Hana/interpolation | lib/Interpolator.py | lib/Interpolator.py | class Interpolator:
""" Interpolate matrix and calculate average for all entries with nan value"""
def interpolate(self, matrix):
result = []
for row in range(0, len(matrix)):
result.append([])
rowLength = len(matrix[row])
for col in range(0, rowLength):
... | class Interpolator:
""" Interpolate matrix and calculate average for all entries with nan value"""
def interpolate(self, matrix):
result = []
for row in range(0, len(matrix)):
result.append([])
rowLength = len(matrix[row])
for col in range(0, rowLength):
... | mit | Python |
7765fd58410cab13fcc229211af77b2e1a398b63 | remove unused patterns | djaodjin/djaodjin-survey,djaodjin/djaodjin-survey,djaodjin/djaodjin-survey | testsite/urls.py | testsite/urls.py | # Copyright (c) 2016, DjaoDjin inc.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# 1. Redistributions of source code must retain the above copyright notice,
# this list of conditions and t... | # Copyright (c) 2016, DjaoDjin inc.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# 1. Redistributions of source code must retain the above copyright notice,
# this list of conditions and t... | bsd-2-clause | Python |
8443f187974222dc5295171e602b20ae9507b898 | Remove unused import | texastribune/tx_salaries,texastribune/tx_salaries | tx_salaries/utils/transformers/__init__.py | tx_salaries/utils/transformers/__init__.py | import hashlib
from StringIO import StringIO
from csvkit import convert
from csvkit.unicsv import UnicodeCSVReader
from django.core import exceptions
from . import alamo_colleges
from . import brownsville_isd
from . import collin_college
from . import el_paso_county
def convert_to_csv_reader(filename):
format =... | from copy import copy
import hashlib
from StringIO import StringIO
from csvkit import convert
from csvkit.unicsv import UnicodeCSVReader
from django.core import exceptions
from . import alamo_colleges
from . import brownsville_isd
from . import collin_college
from . import el_paso_county
def convert_to_csv_reader(f... | apache-2.0 | Python |
add459e2e2409a76f2f129075d65c628121886c0 | fix hook typo | itnihao/thriftpy,keitheis/thriftpy,duydb2/thriftpy,OctavianLee/thriftpy,misakwa/thriftpy,adsharma/flattools,eleme/thriftpy,duydb2/thriftpy,maralla/thriftpy,importcjj/thriftpy,OctavianLee/thriftpy,adsharma/flattools,keitheis/thriftpy,misakwa/thriftpy,spladug/thriftpy,mariusvniekerk/thriftpy,itnihao/thriftpy,importcjj/th... | thriftpy/hook.py | thriftpy/hook.py | # -*- coding: utf-8 -*-
import os
import sys
from .parser import load
class ThriftImporter(object):
def __init__(self, extension="_thrift"):
self.extension = extension
def __eq__(self, other):
return self.__class__.__module__ == other.__class__.__module__ and \
self.__class__.__... | # -*- coding: utf-8 -*-
import os
import sys
from .parser import load
class ThriftImporter(object):
def __init__(self, extension="_thrift"):
self.extension = extension
def __eq__(self, other):
return self.__class__.__module__ == other.__class__.__module__ and \
self.__class__.__... | mit | Python |
0e77bba83b0202c5abda9d2174105e26c98be7b9 | monitor bandwidth and check more often and | benediktkr/lokun-record,benediktkr/lokun-record | record/monitor.py | record/monitor.py | import model
import smtplib
from email.mime.text import MIMEText
import socket
from status import StatusState
from common.logger import Logger
from time import time
logger = Logger("monitor", mailfrom="lokun@sudo.is")
errors = []
vpndown = []
empty = []
status = "green"
def main():
state = StatusState.check()
... | import model
import smtplib
from email.mime.text import MIMEText
import socket
from status import StatusState
from common.logger import Logger
from time import time
logger = Logger("monitor", mailfrom="lokun@sudo.is")
errors = []
vpndown = []
empty = []
status = "green"
def main():
state = StatusState.check()
... | agpl-3.0 | Python |
41ac61da8e39bc0eaac0cd05dc13bd185447f277 | add documentation to reduce_dataset tools | plabadille/image_classifier | reduce_dataset.py | reduce_dataset.py | '''
This script will reduce the dataset in data_dir by the wanted numbers of features per class. It will not erase the data_dir dataset.
Usage : $python reduce_dataset.py <new data directory name> <sample per class wanted>
-------
Environment installation : Please refer to the README.md file.
----... | import sys, os
from shutil import copyfile
supplied_args = sys.argv[1:]
DATA_DIRECTORY = "data_dir"
NEW_DATA_DIRECTORY = supplied_args[0] if supplied_args else sys.exit("You need to supplied a new data directory name : $python reduce_dataset.py <new data directory name> <max sample by class>")
MAX_SAMPLE_BY_CLASS = i... | mit | Python |
e4b9dbe681b7918074a1442e0c3cc615928cc83e | Update main.py | msmbuilder/mdentropy,msmbuilder/mdentropy | mdentropy/cli/main.py | mdentropy/cli/main.py | from __future__ import print_function, absolute_import, division
import sys
import argparse
from .. import __version__
from . import dmutinf
from . import dtent
def main():
help = ('MDEntropy is a python library that allows users to perform '
'information-theoretic analyses on molecular dynamics (MD... | from __future__ import print_function, absolute_import, division
import sys
import argparse
from .. import __version__
from . import dmutinf
from . import dtent
def main():
help = ('MDEntropy is a python library that allows users to perform '
'information-theoretic analyses on molecular dynamics (MD... | mit | Python |
92c0aead6bd700dda7e72542da73948e137ddf83 | update package version | clach04/json-rpc,lorehov/json-rpc | jsonrpc/__init__.py | jsonrpc/__init__.py | __version = (1, 0, 4)
__version__ = version = '.'.join(map(str, __version))
__project__ = PROJECT = __name__
#from .jsonrpc import JSONRPCProtocol, JSONRPCRequest, JSONRPCResponse
#from .exceptions import *
# lint_ignore=W0611,W0401
| __version = (1, 0, 3)
__version__ = version = '.'.join(map(str, __version))
__project__ = PROJECT = __name__
#from .jsonrpc import JSONRPCProtocol, JSONRPCRequest, JSONRPCResponse
#from .exceptions import *
# lint_ignore=W0611,W0401
| mit | Python |
834d77e85547544fcc9e1ef07eb8a870de13b2e4 | Make go_version an argument to deps() | bazelbuild/rules_k8s,bazelbuild/rules_k8s,bazelbuild/rules_k8s | k8s/k8s_go_deps.bzl | k8s/k8s_go_deps.bzl | # Copyright 2017 The Bazel Authors. 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 la... | # Copyright 2017 The Bazel Authors. 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 la... | apache-2.0 | Python |
e585510f930c4a28c5eed105921372ef01d704fc | Fix directory location. | visualfabriq/bqueryd | bqueryd/__init__.py | bqueryd/__init__.py | import codecs
import logging
import os
with codecs.open(os.path.join(os.path.dirname(__file__), '..', 'VERSION'), "r", "utf-8") as f:
__version__ = f.readline().rstrip('\n')
logger = logging.getLogger('bqueryd')
ch = logging.StreamHandler()
formatter = logging.Formatter('%(levelname)s %(asctime)s %(name)s %(messa... | import codecs
import logging
import os
with codecs.open(os.path.join(os.path.dirname(__file__), 'VERSION'), "r", "utf-8") as f:
__version__ = f.readline().rstrip('\n')
logger = logging.getLogger('bqueryd')
ch = logging.StreamHandler()
formatter = logging.Formatter('%(levelname)s %(asctime)s %(name)s %(message)s',... | bsd-3-clause | Python |
d23d4fb67f5c11372783b312f5c9cb351f1c3d8e | Refactor get shape points | LoveXanome/urbanbus-rest,LoveXanome/urbanbus-rest | services/display_routes_details.py | services/display_routes_details.py | # -*- coding: utf-8 -*-
from database.database_access import get_dao
from gtfslib.model import Route, StopTime, Shape
from gtfsplugins import decret_2015_1610
from database.database_access import get_dao
def get_routes_details(limit):
dao = get_dao()
parsedRoutes = []
count = 0
for route in dao.routes(fltr=Route.... | # -*- coding: utf-8 -*-
from database.database_access import get_dao
from gtfslib.model import Route, StopTime, Shape
from gtfsplugins import decret_2015_1610
from database.database_access import get_dao
def get_routes_details(limit):
dao = get_dao()
parsedRoutes = []
count = 0
for route in dao.routes(fltr=Route.... | mit | Python |
8e1109d382fcee58b12f4845e3801bd35fba4dc1 | Remove unused function. | sjl/splice.vim,sjl/splice.vim | autoload/splicelib/util/windows.py | autoload/splicelib/util/windows.py | import vim
def focus(winnr):
vim.command('%dwincmd w' % winnr)
def close_all():
focus(1)
vim.command('wincmd o')
def split():
vim.command('wincmd s')
def vsplit():
vim.command('wincmd v')
def currentnr():
return int(vim.eval('winnr()'))
def pos():
return vim.current.window.cursor
cl... | import vim
def focus(winnr):
vim.command('%dwincmd w' % winnr)
def close(winnr):
focus(winnr)
vim.command('wincmd c')
def close_all():
focus(1)
vim.command('wincmd o')
def split():
vim.command('wincmd s')
def vsplit():
vim.command('wincmd v')
def currentnr():
return int(vim.eval('... | mit | Python |
2a627d4cc0b18d70afcc813fa27d8b77031dd1fc | add mappings for sdt values | mscout1/trades_take_home_test | trade_matcher.py | trade_matcher.py | """
Trade Reconciler.
This script reads in two files, each containing a list of trades'
It then attempts to reconcile the two, printing a list of matches,
and two lists of non-matches.
This script can comprehend 2 different formats, csv and sdt
(Comma Seperated Values and Semicolen Delimited Text)
These formats vary ... | """
Trade Reconciler.
This script reads in two files, each containing a list of trades'
It then attempts to reconcile the two, printing a list of matches,
and two lists of non-matches.
This script can comprehend 2 different formats, csv and sdt
(Comma Seperated Values and Semicolen Delimited Text)
These formats vary ... | mit | Python |
42d8d0f080ea11e41d691620b68843e7c5a597e0 | use np.where in HRinst | polortiz4/bme590_assignment02 | HRinst.py | HRinst.py | import numpy as np
from scipy import stats
def HRinst(dataset,secperunit=60):
"""
Takes the input data of the time and voltage to convert it into an array with time and instantaneous heart rate.
:param dataset: (tuple) Each element is an ndarray (1xN).
:returns: ndarray of 2 columns. First column wit... | import numpy as np
from scipy import stats
def HRinst(dataset):
"""
Takes the input data of the time and voltage to convert it into an array with time and instantaneous heart rate.
:param: dataset: tuple of two elements. Each element is an ndarray (1xN).
:param: dataset: tuple of two elements. Each e... | mit | Python |
1e26a1a0989fbd8d8ee5deb2494838e96cdde2b8 | Add BigStashError in __init__.py | longaccess/bigstash-python,longaccess/bigstash-python | BigStash/__init__.py | BigStash/__init__.py | from .version import get_versions
__version__ = get_versions()['version']
del get_versions
from .auth import BigStashAuth
from .api import BigStashAPI
from .conf import BigStashAPISettings
from .error import BigStashError
__all__ = ['__version__', 'BigStashAuth', 'BigStashAPI',
'BigStashAPISettings', 'BigS... | from .version import get_versions
__version__ = get_versions()['version']
del get_versions
from .auth import BigStashAuth
from .api import BigStashAPI
from .conf import BigStashAPISettings
__all__ = ['__version__', 'BigStashAuth', 'BigStashAPI', 'BigStashAPISettings']
| apache-2.0 | Python |
9a86457b6034839017d4649fb40f531356aca68c | Update start.py | WebShark025/TheZigZagProject,WebShark025/TheZigZagProject | plugins/start.py | plugins/start.py |
@bot.message_handler(commands=['start', 'help'])
def send_welcome(message):
userid = message.from_user.id
banlist = redisserver.sismember('zigzag_banlist', '{}'.format(userid))
if banlist:
bot.reply_to(message, "You are banned!")
return
markup = types.InlineKeyboardMarkup()
markupib = types.InlineKey... |
@bot.message_handler(commands=['start', 'help'])
def send_welcome(message):
userid = message.from_user.id
banlist = redisserver.sismember('zigzag_banlist', '{}'.format(userid))
if banlist:
bot.reply_to(message, "You are banned!")
return
markup = types.ReplyKeyboardMarkup()
markupi = types.InlineKeybo... | mit | Python |
c5127ec22cc5328baf829159a21c7bdf78044f55 | Replace all extra characters with commas in queries; improves matching | guaq/paikkis | webapp.py | webapp.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from __future__ import print_function
import json
import re
import traceback
from bottle import route, run, get, request, response, abort
from db import search, info
@route('/v1/pois.json')
def pois_v1():
global _db
filter = request.query.get('filter', None)
i... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from __future__ import print_function
import json
import traceback
from bottle import route, run, get, request, response, abort
from db import search, info
@route('/v1/pois.json')
def pois_v1():
global _db
filter = request.query.get('filter', None)
if filter i... | mit | Python |
3a3eb02f81b8954eeb73f6a346012067e9164f24 | Fix super() call in exceptions. Closes #305 | sk7/django-social-auth,duoduo369/django-social-auth,VishvajitP/django-social-auth,MjAbuz/django-social-auth,antoviaque/django-social-auth-norel,vuchau/django-social-auth,limdauto/django-social-auth,getsentry/django-social-auth,vxvinh1511/django-social-auth,gustavoam/django-social-auth,adw0rd/django-social-auth,mayankcu... | social_auth/backends/exceptions.py | social_auth/backends/exceptions.py | class SocialAuthBaseException(ValueError):
"""Base class for pipeline exceptions."""
pass
class StopPipeline(SocialAuthBaseException):
"""Stop pipeline process exception.
Raise this exception to stop the rest of the pipeline process.
"""
def __unicode__(self):
return u'Stop pipeline'
... | class SocialAuthBaseException(ValueError):
"""Base class for pipeline exceptions."""
pass
class StopPipeline(SocialAuthBaseException):
"""Stop pipeline process exception.
Raise this exception to stop the rest of the pipeline process.
"""
def __unicode__(self):
return u'Stop pipeline'
... | bsd-3-clause | Python |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.