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 |
|---|---|---|---|---|---|---|---|---|
52e8734ef54772b4c67e40b887ca7d0ad925c6e8 | use project-version format for tag. | quantopian/ta-lib,quantopian/ta-lib | setup.py | setup.py | from distutils.core import setup
from distutils.extension import Extension
from Cython.Distutils import build_ext
import numpy
import os
import sys
if sys.platform == "darwin":
if os.path.exists("/opt/local/include/ta-lib"):
include_talib_dir = "/opt/local/include"
lib_talib_dir = "/opt/local/lib"... | from distutils.core import setup
from distutils.extension import Extension
from Cython.Distutils import build_ext
import numpy
import os
import sys
if sys.platform == "darwin":
if os.path.exists("/opt/local/include/ta-lib"):
include_talib_dir = "/opt/local/include"
lib_talib_dir = "/opt/local/lib"... | bsd-2-clause | Python |
4437ab3021d5d81c1e4f8682529456e17fe32e74 | Fix package_data installation. Code remains to be written to discover the path for namebench.cfg and alexa data | catap/namebench,jimmsta/namebench-1 | setup.py | setup.py | # Copyright 2009 Google Inc. 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 2009 Google Inc. 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 |
59cca112feb323630d4749c2a4fab9a2d59553b7 | add psycopg2 dependency | habalux/pg_testenv,habalux/pg_testenv | setup.py | setup.py | from setuptools import setup
setup(
name='pg_testenv',
version="0.1",
author="Teemu Haapoja",
author_email="teemu.haapoja@gmail.com",
description="PostgreSQL test instance creator",
license="BSD",
install_requires=['psycopg2'],
scripts = [
'pg_testenv'
],
)
| from setuptools import setup
setup(
name='pg_testenv',
version="0.1",
author="Teemu Haapoja",
author_email="teemu.haapoja@gmail.com",
description="PostgreSQL test instance creator",
license="BSD",
scripts = [
'pg_testenv'
],
)
| bsd-2-clause | Python |
ec5cf5b306ea20051cf5b02983fdd356f04a9a5e | switch to pyannote.core 0.8 | pyannote/pyannote-audio,pyannote/pyannote-audio,pyannote/pyannote-audio | setup.py | setup.py | #!/usr/bin/env python
# encoding: utf-8
# The MIT License (MIT)
# Copyright (c) 2016 CNRS
# 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 ... | #!/usr/bin/env python
# encoding: utf-8
# The MIT License (MIT)
# Copyright (c) 2016 CNRS
# 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 ... | mit | Python |
c2e97163f1ccfb45b28239e151102ef0bf7070d3 | Bump version, add classifiers. | jd-boyd/corker,vs-networks/corker | setup.py | setup.py | from setuptools import setup, find_packages
setup(name='corker',
version='0.2',
description='Another WSGI Framework',
classifiers=["Development Status :: 4 - Beta",
"Intended Audience :: Developers",
"License :: OSI Approved :: BSD License",
"T... | from setuptools import setup, find_packages
setup(name='corker',
version='0.2-pre1',
description='Another WSGI Framework',
license='BSD',
author='Joshua D. Boyd',
author_email='jdboyd@jdboyd.net',
url='https://github.com/jd-boyd/corker',
packages=find_packages(),
package... | bsd-2-clause | Python |
c81fa8e41fb1411945ac0c045547c59a09a443c4 | bump version | danvk/webdiff,danvk/webdiff,daytonb/webdiff,daytonb/webdiff,danvk/webdiff,daytonb/webdiff,danvk/webdiff,danvk/webdiff,daytonb/webdiff | setup.py | setup.py | from setuptools import setup, find_packages
setup(name='webdiff',
version='0.4.3',
description='Two-column web-based git difftool',
author='Dan Vanderkam',
author_email='danvdk@gmail.com',
url='https://github.com/danvk/webdiff/',
entry_points={
'console_scripts': [
... | from setuptools import setup, find_packages
setup(name='webdiff',
version='0.4.2',
description='Two-column web-based git difftool',
author='Dan Vanderkam',
author_email='danvdk@gmail.com',
url='https://github.com/danvk/webdiff/',
entry_points={
'console_scripts': [
... | apache-2.0 | Python |
123d57e0ef22adb5ae5f09b435c69f0589f521d1 | Correct setup.py description field error when it contains new lines | secnot/rectpack | setup.py | setup.py | from setuptools import setup
long_description = """A collection of heuristic algorithms for solving the 2D knapsack problem,
also known as the bin packing problem. In essence packing a set of rectangles into the
smallest number of bins."""
setup(
name="rectpack",
version="0.2.2",
description="2D Rectangle... | from setuptools import setup
long_description = """A collection of heuristic algorithms for solving the 2D knapsack problem,
also known as the bin packing problem. In essence packing a set of rectangles into the
smallest number of bins."""
setup(
name="rectpack",
version="0.2.2",
description=long_descript... | apache-2.0 | Python |
72cb87ea53a294c2395818c25f42379293b37308 | Bump version number | mwilliamson/mayo | setup.py | setup.py | #!/usr/bin/env python
import os
from distutils.core import setup
def read(fname):
return open(os.path.join(os.path.dirname(__file__), fname)).read()
setup(
name='blah',
version='0.1.5',
description='Thin wrapper around source control systems',
long_description=read("README"),
author='Michael ... | #!/usr/bin/env python
import os
from distutils.core import setup
def read(fname):
return open(os.path.join(os.path.dirname(__file__), fname)).read()
setup(
name='blah',
version='0.1.4',
description='Thin wrapper around source control systems',
long_description=read("README"),
author='Michael ... | bsd-2-clause | Python |
e0993dcf8dc38462604e38d7a31b80d3880e696b | Kill get_version hack | DasIch/relief,DasIch/relief | setup.py | setup.py | # coding: utf-8
import os
import sys
from setuptools import setup
from relief import __version__
PACKAGE_PATH = os.path.join(
os.path.abspath(os.path.dirname(__file__)), "relief"
)
if sys.version_info[:2] < (2, 7):
install_requires = ['ordereddict>=1.1', 'Counter>=1.0.0']
else:
install_requires = []
... | # coding: utf-8
import os
import sys
from setuptools import setup
PACKAGE_PATH = os.path.join(
os.path.abspath(os.path.dirname(__file__)), "relief"
)
if sys.version_info[:2] < (2, 7):
install_requires = ['ordereddict>=1.1', 'Counter>=1.0.0']
else:
install_requires = []
def get_version():
path = os... | bsd-3-clause | Python |
9232fa78e6a04f25f493fef91014384719c730ee | remove unused import from setup.py | twaldear/flask-secure-headers | setup.py | setup.py | from setuptools import setup
setup(
name = 'flask-secure-headers',
packages = ['flask_secure_headers'],
include_package_data = True,
version = '0.2',
description = 'Secure Header Wrapper for Flask Applications',
long_description = """
Add security headers to a Flask application. This is intended to be a s... | from setuptools import setup
import flask_secure_headers
setup(
name = 'flask-secure-headers',
packages = ['flask_secure_headers'],
include_package_data = True,
version = '0.2',
description = 'Secure Header Wrapper for Flask Applications',
long_description = """
Add security headers to a Flask application... | mit | Python |
bd3942724c7a2f04d5eb6277a35e5ebf54ebf6e0 | Add python 3.6 in the supported version | ningirsu/stepmania-server,ningirsu/stepmania-server | setup.py | setup.py | """ Setup script """
import shutil
import os
import sys
import glob
from setuptools import setup, find_packages
try:
import py2exe
except ImportError:
pass
import smserver
for filename in glob.glob("cfg/*.yml*"):
shutil.copy(filename, "smserver/_fallback_conf")
conf_dir = None
if os.path.splitdrive(sy... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import shutil
import os
import sys
import glob
from setuptools import setup, find_packages
try:
import py2exe
except ImportError:
pass
import smserver
for filename in glob.glob("cfg/*.yml*"):
shutil.copy(filename, "smserver/_fallback_conf")
conf_dir = None
... | mit | Python |
235609b1b370fee8f03cdf0d9d6a70075bd6e50e | Update to next dev version | openfisca/openfisca-web-api,openfisca/openfisca-web-api,sgmap/openfisca-web-api,sgmap/openfisca-web-api | setup.py | setup.py | #! /usr/bin/env python
# -*- coding: utf-8 -*-
# OpenFisca -- A versatile microsimulation software
# By: OpenFisca Team <contact@openfisca.fr>
#
# Copyright (C) 2011, 2012, 2013, 2014, 2015 OpenFisca Team
# https://github.com/openfisca
#
# This file is part of OpenFisca.
#
# OpenFisca is free software; you can redist... | #! /usr/bin/env python
# -*- coding: utf-8 -*-
# OpenFisca -- A versatile microsimulation software
# By: OpenFisca Team <contact@openfisca.fr>
#
# Copyright (C) 2011, 2012, 2013, 2014, 2015 OpenFisca Team
# https://github.com/openfisca
#
# This file is part of OpenFisca.
#
# OpenFisca is free software; you can redist... | agpl-3.0 | Python |
fdb461f000adefff0d1050464e5783c96222f364 | Add minimum version for pycryptodome | SCUEvals/scuevals-api,SCUEvals/scuevals-api | setup.py | setup.py | from setuptools import setup
setup(
name='scuevals-api',
packages=['scuevals_api'],
include_package_data=True,
test_suite='tests',
entry_points={
'console_scripts': [
'app=scuevals_api.cmd:cli'
]
},
install_requires=[
'alembic==0.9.7',
'beautifuls... | from setuptools import setup
setup(
name='scuevals-api',
packages=['scuevals_api'],
include_package_data=True,
test_suite='tests',
entry_points={
'console_scripts': [
'app=scuevals_api.cmd:cli'
]
},
install_requires=[
'alembic==0.9.7',
'beautifuls... | agpl-3.0 | Python |
3a279370ca4847abfe82f1be99111e04bf2de61b | Remove unnecessary import | DavidHowlett/pyserial-1,hoihu/pyserial | setup.py | setup.py | # setup.py for pySerial
#
# Windows installer:
# "python setup.py bdist_wininst"
#
# Direct install (all systems):
# "python setup.py install"
#
# For Python 3.x use the corresponding Python executable,
# e.g. "python3 setup.py ..."
try:
from setuptools import setup
except ImportError:
from distutils.core ... | # setup.py for pySerial
#
# Windows installer:
# "python setup.py bdist_wininst"
#
# Direct install (all systems):
# "python setup.py install"
#
# For Python 3.x use the corresponding Python executable,
# e.g. "python3 setup.py ..."
import sys
try:
from setuptools import setup
except ImportError:
from dis... | bsd-3-clause | Python |
3121572d452a58161f9bb9e7f813254b592b680b | bump version | hopshadoop/hops-util-py,hopshadoop/hops-util-py | setup.py | setup.py | import os
from setuptools import setup
def read(fname):
return open(os.path.join(os.path.dirname(__file__), fname)).read()
setup(
name='hops',
version='1.1.6',
author='Robin Andersson',
author_email='robin.eric.andersson@gmail.com',
description='A helper library for Hops that facilitates deve... | import os
from setuptools import setup
def read(fname):
return open(os.path.join(os.path.dirname(__file__), fname)).read()
setup(
name='hops',
version='1.1.5',
author='Robin Andersson',
author_email='robin.eric.andersson@gmail.com',
description='A helper library for Hops that facilitates deve... | apache-2.0 | Python |
426247045dacf56fc5c7324fffbc140e9ea1b2e2 | Bump tqdm from 4.37.0 to 4.38.0 | glidernet/ogn-python,glidernet/ogn-python,Meisterschueler/ogn-python,glidernet/ogn-python,Meisterschueler/ogn-python,glidernet/ogn-python,Meisterschueler/ogn-python,Meisterschueler/ogn-python | setup.py | setup.py | #!/usr/bin/env python3
from os import path
from setuptools import setup, find_packages
here = path.abspath(path.dirname(__file__))
# Get the long description from the README file
with open(path.join(here, 'README.md'), encoding='utf-8') as f:
long_description = f.read()
setup(
name='ogn-python',
versio... | #!/usr/bin/env python3
from os import path
from setuptools import setup, find_packages
here = path.abspath(path.dirname(__file__))
# Get the long description from the README file
with open(path.join(here, 'README.md'), encoding='utf-8') as f:
long_description = f.read()
setup(
name='ogn-python',
versio... | agpl-3.0 | Python |
2029b86059f538f6ab5ab3e472708a9632141010 | add holoviews to dependencies | michaelaye/pyciss | setup.py | setup.py | from os import path
from setuptools import find_packages, setup
DISTNAME = 'pyciss'
DESCRIPTION = "Software for handling Cassini ISS data"
AUTHOR = "K.-Michael Aye"
AUTHOR_EMAIL = "michael.aye@lasp.colorado.edu"
MAINTAINER_EMAIL = AUTHOR_EMAIL
URL = "https://github.com/michaelaye/pyciss"
LICENSE = "ISC"
KEYWORDS = ['... | from os import path
from setuptools import find_packages, setup
DISTNAME = 'pyciss'
DESCRIPTION = "Software for handling Cassini ISS data"
AUTHOR = "K.-Michael Aye"
AUTHOR_EMAIL = "michael.aye@lasp.colorado.edu"
MAINTAINER_EMAIL = AUTHOR_EMAIL
URL = "https://github.com/michaelaye/pyciss"
LICENSE = "ISC"
KEYWORDS = ['... | isc | Python |
0cae8f8e892bf40e30598cee3fe32dc496a8ec7b | Fix setup.py setuptools reference | tnewman/PyKazoo | setup.py | setup.py | #!/usr/bin/env python3
# noinspection PyUnresolvedReferences
import setuptools
from distutils.core import setup
setup(
name='PyKazoo',
version='0.0a1',
packages=['pykazoo'],
install_requires=['requests==2.7.0'],
url='https://github.com/tnewman/PyKazoo',
license='MIT',
author='Thomas Newman... | #!/usr/bin/env python3
from distutils.core import setup
setup(
name='PyKazoo',
version='0.0a1',
packages=['pykazoo'],
install_requires=['requests==2.7.0'],
url='https://github.com/tnewman/PyKazoo',
license='MIT',
author='Thomas Newman',
author_email='tnewman@users.noreply.github.com',
... | mit | Python |
ea6a22678e8169ced9465269b68fbe9394aa2efb | Bump version to 0.2 | jamescooke/factory_djoy | setup.py | setup.py | import os
import setuptools
setuptools.setup(
name='factory_djoy',
version='0.2',
description="Wrappers over Factory Boy's Django Factories",
url='http://github.com/jamescooke/factory_djoy',
author='James Cooke',
author_email='github@jamescooke.info',
license='MIT',
packages=setupto... | import os
import setuptools
setuptools.setup(
name='factory_djoy',
version='0.1',
description="Wrappers over Factory Boy's Django Factories",
url='http://github.com/jamescooke/factory_djoy',
author='James Cooke',
author_email='github@jamescooke.info',
license='MIT',
packages=setupto... | mit | Python |
226654bfc455991f9f3134c18ac91fced704f09e | Bump version to 0.5.16. | wlanslovenija/datastream | setup.py | setup.py | #!/usr/bin/env python
import os
from setuptools import setup, find_packages
VERSION = '0.5.16'
if __name__ == '__main__':
setup(
name='datastream',
version=VERSION,
description="Datastream API time-series library.",
long_description=open(os.path.join(os.path.dirname(__file__), 'R... | #!/usr/bin/env python
import os
from setuptools import setup, find_packages
VERSION = '0.5.15'
if __name__ == '__main__':
setup(
name='datastream',
version=VERSION,
description="Datastream API time-series library.",
long_description=open(os.path.join(os.path.dirname(__file__), 'R... | agpl-3.0 | Python |
a3f150be3ea89a87eca9902da58aa93d6623da42 | bump version to 0.2.6 | CivicTechTO/django-councilmatic,datamade/django-councilmatic,datamade/django-councilmatic,datamade/django-councilmatic,CivicTechTO/django-councilmatic,CivicTechTO/django-councilmatic,datamade/django-councilmatic,CivicTechTO/django-councilmatic | setup.py | setup.py | import os
from setuptools import setup
with open(os.path.join(os.path.dirname(__file__), 'README.rst')) 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='django-councilmatic',
version='0.2... | import os
from setuptools import setup
with open(os.path.join(os.path.dirname(__file__), 'README.rst')) 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='django-councilmatic',
version='0.2... | mit | Python |
d9544b310f791493633b9d78cc5b257d041366c5 | Bump up version | Pro-bit/Probit-RedisCeleryScheduler | setup.py | setup.py | import os
from setuptools import setup, find_packages
# allow setup.py to be run from any path
os.chdir(os.path.normpath(os.path.join(os.path.abspath(__file__), os.pardir)))
REQUIREMENTS = ["redis", "redlock-py"]
README = """
probit-scheduler - redis backed scheduler for celery beat. This scheduler was made from htt... | import os
from setuptools import setup, find_packages
# allow setup.py to be run from any path
os.chdir(os.path.normpath(os.path.join(os.path.abspath(__file__), os.pardir)))
REQUIREMENTS = ["redis", "redlock-py"]
README = """
probit-scheduler - redis backed scheduler for celery beat. This scheduler was made from htt... | mit | Python |
e19826d9da69dbdb704d3d366f864b9317ac2861 | Disable unused django-setuptest. | bitsoffreedom/newspeak | setup.py | setup.py | #!/usr/bin/env python
from setuptools import setup, find_packages
try:
README = open('README.rst').read()
except:
README = None
try:
REQUIREMENTS = open('requirements.txt').read()
except:
REQUIREMENTS = None
setup(
name='newspeak',
version="0.1",
description='Standalone Django based feed... | #!/usr/bin/env python
from setuptools import setup, find_packages
try:
README = open('README.rst').read()
except:
README = None
try:
REQUIREMENTS = open('requirements.txt').read()
except:
REQUIREMENTS = None
setup(
name='newspeak',
version="0.1",
description='Standalone Django based feed... | bsd-3-clause | Python |
105a23c0e07c737b9bbe7face42443a26409df32 | Declare Python 3 support in setup.py. | glorpen/webassets,aconrad/webassets,0x1997/webassets,JDeuce/webassets,wijerasa/webassets,heynemann/webassets,heynemann/webassets,wijerasa/webassets,JDeuce/webassets,scorphus/webassets,heynemann/webassets,aconrad/webassets,glorpen/webassets,john2x/webassets,florianjacob/webassets,glorpen/webassets,aconrad/webassets,0x19... | setup.py | setup.py | #!/usr/bin/env python
import os
from setuptools import setup, find_packages
from webassets.six.moves import map
from webassets.six.moves import zip
try:
from sphinx.setup_command import BuildDoc
cmdclass = {'build_sphinx': BuildDoc}
except ImportError:
cmdclass = {}
# Figure out the version. This could al... | #!/usr/bin/env python
import os
from setuptools import setup, find_packages
from webassets.six.moves import map
from webassets.six.moves import zip
try:
from sphinx.setup_command import BuildDoc
cmdclass = {'build_sphinx': BuildDoc}
except ImportError:
cmdclass = {}
# Figure out the version. This could al... | bsd-2-clause | Python |
aa6bc481529022bb878fcd76903bb0ccb93d7048 | Fix schema salad pin. | dleehr/cwltool,chapmanb/cwltool,dleehr/cwltool,common-workflow-language/cwltool,common-workflow-language/cwltool,chapmanb/cwltool,jeremiahsavage/cwltool,jeremiahsavage/cwltool,dleehr/cwltool,SciDAP/cwltool,chapmanb/cwltool,jeremiahsavage/cwltool,SciDAP/cwltool,chapmanb/cwltool,SciDAP/cwltool,jeremiahsavage/cwltool,comm... | setup.py | setup.py | #!/usr/bin/env python
import os
import sys
import setuptools.command.egg_info as egg_info_cmd
import shutil
from setuptools import setup, find_packages
SETUP_DIR = os.path.dirname(__file__)
README = os.path.join(SETUP_DIR, 'README.rst')
try:
import gittaggers
tagger = gittaggers.EggInfoFromGit
except Import... | #!/usr/bin/env python
import os
import sys
import setuptools.command.egg_info as egg_info_cmd
import shutil
from setuptools import setup, find_packages
SETUP_DIR = os.path.dirname(__file__)
README = os.path.join(SETUP_DIR, 'README.rst')
try:
import gittaggers
tagger = gittaggers.EggInfoFromGit
except Import... | apache-2.0 | Python |
e03d38e2ca78aa82c8791b43beaa044e27fc4424 | Bump version to 0.2.1 | byashimov/django-controlcenter,byashimov/django-controlcenter,byashimov/django-controlcenter | setup.py | setup.py | from setuptools import find_packages, setup
setup(
name='django-controlcenter',
version='0.2.1',
description='Set of widgets to build dashboards for your Django-project.',
long_description='',
url='https://github.com/byashimov/django-controlcenter',
author='Murad Byashimov',
author_email='b... | from setuptools import find_packages, setup
setup(
name='django-controlcenter',
version='0.2.0',
description='Set of widgets to build dashboards for your Django-project.',
long_description='',
url='https://github.com/byashimov/django-controlcenter',
author='Murad Byashimov',
author_email='b... | bsd-3-clause | Python |
1c02453275d32109028aa3b915e56640404e74fe | Update setup.py | yunify/qingcloud-sdk-python | setup.py | setup.py | # coding:utf-8
import sys
try:
from setuptools import setup
except ImportError:
from distutils.core import setup
if sys.version_info < (2, 6):
error = 'ERROR: qingcloud-sdk requires Python Version 2.6 or above.'
print >> sys.stderr, error
sys.exit(1)
setup(
name='qingcloud-sdk',
version=... | # coding:utf-8
import sys
try:
from setuptools import setup
except ImportError:
from distutils.core import setup
if sys.version_info < (2, 6):
error = 'ERROR: qingcloud-sdk requires Python Version 2.6 or above.'
print >> sys.stderr, error
sys.exit(1)
setup(
name='qingcloud-sdk',
version=... | apache-2.0 | Python |
b82e851a74c2a3ac4823723be2f6b0caf88cb7c8 | use distutils for comming python 3.12 | nakagami/CyMySQL | setup.py | setup.py | import sys
try:
from setuptools import setup, Command, Extension
except ImportError:
from distutils.core import setup, Command
from distutils.extension import Extension
try:
from Cython.Build import cythonize
ext_modules = cythonize([
Extension("cymysql.packet", ["cymysql/packet.pyx"]),... | import sys
from distutils.core import setup, Command
from distutils.extension import Extension
try:
from Cython.Build import cythonize
ext_modules = cythonize([
Extension("cymysql.packet", ["cymysql/packet.pyx"]),
Extension("cymysql.charset", ["cymysql/charset.py"]),
Extensi... | mit | Python |
2998e76c9129ef5740ab177343db262c391594a6 | Bump pytest-spec version. | marrow/cache,marrow/cache | setup.py | setup.py | #!/usr/bin/env python
# encoding: utf-8
from __future__ import print_function
import os
import sys
import codecs
try:
from setuptools.core import setup, find_packages
except ImportError:
from setuptools import setup, find_packages
from setuptools.command.test import test as TestCommand
if sys.version_info < (2... | #!/usr/bin/env python
# encoding: utf-8
from __future__ import print_function
import os
import sys
import codecs
try:
from setuptools.core import setup, find_packages
except ImportError:
from setuptools import setup, find_packages
from setuptools.command.test import test as TestCommand
if sys.version_info < (2... | mit | Python |
8866c06ee9131cf0e52c08e0ae9e08db90347590 | increment version | raintank/graphite-raintank,raintank/graphite-raintank,raintank/graphite-raintank | setup.py | setup.py | # coding: utf-8
from setuptools import setup
setup(
name='graphite_raintank',
version='0.2',
url='https://github.com/raintank/graphite_raintank',
license='apache2',
author='Anthony Woods',
author_email='awoods@raintank.io',
description=('Raintank backend plugin for graphite_api'),
long_... | # coding: utf-8
from setuptools import setup
setup(
name='graphite_raintank',
version='0.1',
url='https://github.com/raintank/graphite_raintank',
license='apache2',
author='Anthony Woods',
author_email='awoods@raintank.io',
description=('Raintank backend plugin for graphite_api'),
long_... | apache-2.0 | Python |
4744e2df3a99ddca3caae4359985daffb30bb94b | Update Flask-Z3950 | alexandermendes/pybossa-z3950 | setup.py | setup.py | # -*- coding: utf8 -*-
"""
pybossa-z3950
-------------
A PyBossa plugin for Z39.50 integration.
"""
import re
import os
from setuptools import setup
version = re.search('^__version__\s*=\s*"(.*)"',
open('pybossa_z3950/__init__.py').read(),
re.M).group(1)
try:
here = os.... | # -*- coding: utf8 -*-
"""
pybossa-z3950
-------------
A PyBossa plugin for Z39.50 integration.
"""
import re
import os
from setuptools import setup
version = re.search('^__version__\s*=\s*"(.*)"',
open('pybossa_z3950/__init__.py').read(),
re.M).group(1)
try:
here = os.... | bsd-3-clause | Python |
43dc6dc0a9b33de0db1f79f7470d69519192dc1f | Put tests_require into extras_require also | rwstauner/dear_astrid,rwstauner/dear_astrid | setup.py | setup.py | from setuptools import setup, find_packages
try:
import nose.commands
extra_args = dict(
cmdclass={'test': nose.commands.nosetests},
)
except ImportError:
extra_args = dict()
# TODO: would this work? (is the file included in the dist?)
#tests_require = [l.strip() for l in open('test-requirements.txt').rea... | from setuptools import setup, find_packages
try:
import nose.commands
extra_args = dict(
cmdclass={'test': nose.commands.nosetests},
)
except ImportError:
extra_args = dict()
setup(
name='dear_astrid',
version='0.1.0',
author='Randy Stauner',
author_email='randy@magnificent-tears.com',
package... | mit | Python |
1c2e79fb67fb2d71e1d8714f47552af3b442fda8 | bump version to 1.0.6 | ishiland/python-geosupport | setup.py | setup.py |
try:
from setuptools import setup
except ImportError:
raise ImportError(
"setuptools module required, please go to "
"https://pypi.python.org/pypi/setuptools and follow the instructions "
"for installing setuptools"
)
with open("README.md", "r") as fh:
long_description = fh.re... |
try:
from setuptools import setup
except ImportError:
raise ImportError(
"setuptools module required, please go to "
"https://pypi.python.org/pypi/setuptools and follow the instructions "
"for installing setuptools"
)
with open("README.md", "r") as fh:
long_description = fh.re... | mit | Python |
797d2ea521b40bbbdab5430f1d08dbb3e5fb1eb1 | Fix repo URL in setup.py | SeismicData/pyasdf,SeismicData/pyasdf | setup.py | setup.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Setup script for the pyasdf module.
:copyright:
Lion Krischer (krischer@geophysik.uni-muenchen.de), 2014
:license:
BSD 3-Clause ("BSD New" or "BSD Simplified")
"""
import inspect
import os
from setuptools import setup, find_packages
def get_package_data():
... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Setup script for the pyasdf module.
:copyright:
Lion Krischer (krischer@geophysik.uni-muenchen.de), 2014
:license:
BSD 3-Clause ("BSD New" or "BSD Simplified")
"""
import inspect
import os
from setuptools import setup, find_packages
def get_package_data():
... | bsd-3-clause | Python |
e31b93d1fdda810d70d3050c73c6638b29219d12 | Increase the allowed version of aniso8601 (#1072) | graphql-python/graphene,graphql-python/graphene | setup.py | setup.py | import ast
import codecs
import re
import sys
from setuptools import find_packages, setup
from setuptools.command.test import test as TestCommand
_version_re = re.compile(r"VERSION\s+=\s+(.*)")
with open("graphene/__init__.py", "rb") as f:
version = ast.literal_eval(_version_re.search(f.read().decode("utf-8")).g... | import ast
import codecs
import re
import sys
from setuptools import find_packages, setup
from setuptools.command.test import test as TestCommand
_version_re = re.compile(r"VERSION\s+=\s+(.*)")
with open("graphene/__init__.py", "rb") as f:
version = ast.literal_eval(_version_re.search(f.read().decode("utf-8")).g... | mit | Python |
9031637554fa0b844f33d208d2527825fdd629fc | Update pypi classifiers. | dmpayton/django-admin-honeypot,wujuguang/django-admin-honeypot,wujuguang/django-admin-honeypot,dmpayton/django-admin-honeypot | setup.py | setup.py | #!/usr/bin/env python
import sys
from admin_honeypot import __version__, __description__, __license__
try:
from setuptools import setup, find_packages
except ImportError:
from distutils.core import setup, find_packages
setup(
name='django-admin-honeypot',
version=__version__,
description=__descrip... | #!/usr/bin/env python
import sys
from admin_honeypot import __version__, __description__, __license__
try:
from setuptools import setup, find_packages
except ImportError:
from distutils.core import setup, find_packages
setup(
name='django-admin-honeypot',
version=__version__,
description=__descrip... | mit | Python |
a387f0f91bd7fa8a86401de5060b073f1e9b2e82 | fix packages in setup.py for PyPI | tanghaibao/jcvi,sgordon007/jcvi_062915 | setup.py | setup.py | #!/usr/bin/env python
from setuptools import setup, find_packages
from glob import glob
name = "jcvi"
classifiers = [
'Development Status :: 4 - Beta',
'Intended Audience :: Science/Research',
'License :: OSI Approved :: BSD License',
'Programming Language :: Python',
'Programming Language :: Pyt... | #!/usr/bin/env python
from setuptools import setup, find_packages
from glob import glob
name = "jcvi"
classifiers = [
'Development Status :: 4 - Beta',
'Intended Audience :: Science/Research',
'License :: OSI Approved :: BSD License',
'Programming Language :: Python',
'Programming Language :: Pyt... | bsd-2-clause | Python |
f428dace08e11cdba34767dea989380fa6d4e423 | Add long_description | unnonouno/mrep | setup.py | setup.py | #!/usr/bin/env python
import os
from setuptools import setup
requires = [
'mecab-python3',
]
def read(name):
return open(os.path.join(os.path.dirname(__file__), name)).read()
setup(
name='miura',
version='0.1.0',
description='MIURA: pattern matcher for morpheme sequences',
long_descripti... | #!/usr/bin/env python
from setuptools import setup
requires = [
'mecab-python3',
]
setup(
name='miura',
version='0.1.0',
description='MIURA: pattern matcher for morpheme sequences',
author='Yuya Unno',
author_email='unnonouno@gmail.com',
url='https://github.com/unnonouno/miura',
p... | mit | Python |
d24daa18023d0d59d70a4328466613f3a03de039 | add tests_require packages | pinax/pinax-comments,pinax/pinax-comments,eldarion/dialogos | setup.py | setup.py | import codecs
from os import path
from setuptools import find_packages, setup
def read(*parts):
filename = path.join(path.dirname(__file__), *parts)
with codecs.open(filename, encoding="utf-8") as fp:
return fp.read()
setup(
author="",
author_email="",
description="",
name="pinax-co... | import codecs
from os import path
from setuptools import find_packages, setup
def read(*parts):
filename = path.join(path.dirname(__file__), *parts)
with codecs.open(filename, encoding="utf-8") as fp:
return fp.read()
setup(
author="",
author_email="",
description="",
name="pinax-co... | mit | Python |
a61b79a6d427745f3bf240554b3dd852d8e6ed65 | Add classifiers | swarmer/fridge,swarmer/fridge | setup.py | setup.py | from distutils.core import setup
setup(name='Fridge',
version='0.1',
py_modules=['fridge'],
description='Persistent JSON-encoded distionary',
author='Anton Barkovsky',
author_email='swarmer.pm@gmail.com',
url='http://fridge.readthedocs.org/',
classifiers=[
... | from distutils.core import setup
setup(name='Fridge',
version='0.1',
py_modules=['fridge'],
description='Persistent JSON-encoded distionary',
author='Anton Barkovsky',
author_email='swarmer.pm@gmail.com',
url='http://fridge.readthedocs.org/')
| mit | Python |
3bf4ce1f01d3e67702d91ccf4119ad6d956af99e | bump to 0.4.4 | benoitc/socketpool,mgedmin/socketpool | setup.py | setup.py | #!/usr/bin/env python
# -*- coding: utf-8 -
#
# This file is part of socketpool.
# See the NOTICE for more information.
import os
from setuptools import setup, find_packages
CLASSIFIERS = [
'Development Status :: 4 - Beta',
'Environment :: Web Environment',
'Intended Audience :: Developers',
'License... | #!/usr/bin/env python
# -*- coding: utf-8 -
#
# This file is part of socketpool.
# See the NOTICE for more information.
import os
from setuptools import setup, find_packages
CLASSIFIERS = [
'Development Status :: 4 - Beta',
'Environment :: Web Environment',
'Intended Audience :: Developers',
'License... | mit | Python |
590a7b926af1e57d48a087f18556caa4f3e1170c | Remove the duplicated filter in PreferenceAdmin | kensonman/webframe,kensonman/webframe,kensonman/webframe | admin.py | admin.py | # -*- coding: utf-8 -*-
# File: src/webframe/admin.py
# Date: 2019-11-21 14:55
# Author: Kenson Man <kenson@breakthrough.org.hk>
# Desc: The file provide the Admin-Tools in webframe module
from django.contrib import admin
from django.utils.translation import ugettext_lazy as _, ugettext
from .models import *
impo... | # -*- coding: utf-8 -*-
# File: src/webframe/admin.py
# Date: 2019-11-21 14:55
# Author: Kenson Man <kenson@breakthrough.org.hk>
# Desc: The file provide the Admin-Tools in webframe module
from django.contrib import admin
from django.utils.translation import ugettext_lazy as _, ugettext
from .models import *
impo... | apache-2.0 | Python |
83dd154759a430918931072e8e82db413c4f5741 | Use proper settings | chrisseto/waterbutler,kwierman/waterbutler,Ghalko/waterbutler,hmoco/waterbutler,TomBaxter/waterbutler,rafaeldelucena/waterbutler,Johnetordoff/waterbutler,felliott/waterbutler,icereval/waterbutler,rdhyee/waterbutler,CenterForOpenScience/waterbutler,RCOSDP/waterbutler,cosenal/waterbutler | tasks.py | tasks.py | # encoding: utf-8
from invoke import task
from waterbutler import settings
@task
def tornado(port=settings.PORT, address=settings.ADDRESS, debug=settings.DEBUG):
from waterbutler.server import serve
serve(port, address, debug)
| # encoding: utf-8
from invoke import task
from waterbutler.server import settings
@task
def tornado(port=settings.PORT, address=settings.ADDRESS, debug=settings.DEBUG):
from waterbutler.server import serve
serve(port, address, debug)
| apache-2.0 | Python |
cae6d756294c90b93e5505ce5eec9f93ced83398 | Improve test task; switch flake8->syntax | 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):
flake(ctx)
import pytest
errcode = pytest.main(['tests'])
sys.exit(errcode)
@task
def flake(ctx):
"""Run flake8 on codebase."... | mit | Python |
1235589dae5cf5dc1a8bf1114f65f0b36bb7bca1 | Simplify tests | rmgorman/django-guardian,rmgorman/django-guardian,benkonrath/django-guardian,benkonrath/django-guardian,benkonrath/django-guardian,lukaszb/django-guardian,lukaszb/django-guardian,rmgorman/django-guardian,lukaszb/django-guardian | tests.py | tests.py | """
Unit tests runner for ``django-guardian`` based on boundled example project.
Tests are independent from this example application but setuptools need
instructions how to interpret ``test`` command when we run::
python setup.py test
"""
import os
import sys
def main():
os.environ.setdefault(
"DJAN... | """
Unit tests runner for ``django-guardian`` based on boundled example project.
Tests are independent from this example application but setuptools need
instructions how to interpret ``test`` command when we run::
python setup.py test
"""
import os
import sys
import django
os.environ["DJANGO_SETTINGS_MODULE"] = ... | bsd-2-clause | Python |
e6f14f8ef1bb0ab247d331b6ef023d35543663be | Update tests. | dschwertfeger/partitioned-hash-join | tests.py | tests.py | from io import open
import unittest
from partitioned_hash_join import (
build_hash_table,
h1,
is_duplicate,
join,
letters_for_result,
value_for_letter,
LETTERS
)
class PartitionedHashJoinTests(unittest.TestCase):
def test_h1(self):
self.assertEqual(h1('H1234567890'), 123)
... | from io import open
import unittest
from partitioned_hash_join import (
build_hash_table,
h1,
join,
write
)
class PartitionedHashJoinTests(unittest.TestCase):
def test_h1(self):
self.assertEqual(h1('H1234567890'), 12)
def test_join(self):
r = open('r_test_bucket.txt', 'r')
... | mit | Python |
2a9f27c46810cb14d25ddb3282c72de4303ee5bd | raise KeyError on getitem | mgax/kv | tests.py | tests.py | import unittest
class KV(object):
def __len__(self):
return 0
def __getitem__(self, key):
raise KeyError
class KVTest(unittest.TestCase):
def test_new_kv_is_empty(self):
self.assertEqual(len(KV()), 0)
def test_get_missing_value_raises_key_error(self):
with self.as... | import unittest
class KV(object):
def __len__(self):
return 0
class KVTest(unittest.TestCase):
def test_new_kv_is_empty(self):
self.assertEqual(len(KV()), 0)
| bsd-2-clause | Python |
561340c241dcbd9021e27dda44675ff8eaed9ad3 | add unix_socket argument | innogames/igcollect | src/mysql.py | src/mysql.py | #!/usr/bin/env python
#
# igcollect - Mysql Status
#
# Copyright (c) 2016, InnoGames GmbH
#
try:
from mysql.connector import connect
except ImportError:
from MySQLdb import connect
from argparse import ArgumentParser
from time import time
def parse_args():
parser = ArgumentParser()
parser.add_argume... | #!/usr/bin/env python
#
# igcollect - Mysql Status
#
# Copyright (c) 2016, InnoGames GmbH
#
try:
from mysql.connector import connect
except ImportError:
from MySQLdb import connect
from argparse import ArgumentParser
from time import time
def parse_args():
parser = ArgumentParser()
parser.add_argume... | mit | Python |
b33ffb6d15c29697c158743f89c2adf5a2e19e32 | Update working draft URL. | googlearchive/pywebsocket,GoogleChromeLabs/pywebsocket3,google/pywebsocket,google/pywebsocket,googlearchive/pywebsocket,GoogleChromeLabs/pywebsocket3,google/pywebsocket,GoogleChromeLabs/pywebsocket3,googlearchive/pywebsocket | src/setup.py | src/setup.py | #!/usr/bin/env python
#
# Copyright 2009, Google 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:
#
# * Redistributions of source code must retain the above copyright
# notice, this list... | #!/usr/bin/env python
#
# Copyright 2009, Google 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:
#
# * Redistributions of source code must retain the above copyright
# notice, this list... | bsd-3-clause | Python |
51084b951d7d878d5400a6bfca1c8da1793b0a17 | Modify init method of staffto take in staff person type only | EdwinKato/Space-Allocator,EdwinKato/Space-Allocator | src/staff.py | src/staff.py | from .person import Person
class Staff(Person):
def __init__(self, first_name, last_name, person_id, has_living_space = None, has_office = None):
super(Staff, self).__init__(first_name, last_name, "staff", "N", person_id, has_living_space, has_office)
| from .person import Person
class Staff(Person):
def __init__(self, first_name, last_name, person_type, person_id, has_living_space = None, has_office = None):
super(Staff, self).__init__(first_name, last_name, person_type, "N", person_id, has_living_space, has_office)
| mit | Python |
74c294d11c3ba98f497df73fdd5d5061da601975 | add the -j argument | azverkan/scons,azverkan/scons,datalogics-robb/scons,azverkan/scons,datalogics-robb/scons,datalogics-robb/scons,datalogics/scons,datalogics/scons,azverkan/scons,datalogics/scons,datalogics/scons,azverkan/scons,datalogics-robb/scons | src/scons.py | src/scons.py | #!/usr/bin/env python
import getopt
import os.path
import string
import sys
def PrintUsage():
print "Usage: scons [OPTION]... TARGET..."
print "Build TARGET or multiple TARGET(s)"
print " "
print ' -f CONSCRIPT execute CONSCRIPT instead of "SConstruct"'
print " -j N execute... | #!/usr/bin/env python
import getopt
import os.path
import string
import sys
opts, targets = getopt.getopt(sys.argv[1:], 'f:')
Scripts = []
for o, a in opts:
if o == '-f': Scripts.append(a)
if not Scripts:
Scripts.append('SConstruct')
# XXX The commented-out code here adds any "scons" subdirs in anything
... | mit | Python |
194687d9b3809bb2e976c194c2245264c395000a | add some doctest cases of anyconfig.tests.common.MaskedImportLoader | ssato/python-anyconfig,pmquang/python-anyconfig,ssato/python-anyconfig,pmquang/python-anyconfig | anyconfig/tests/common.py | anyconfig/tests/common.py | #
# Copyright (C) 2011 - 2014 Satoru SATOH <ssato at redhat.com>
#
import imp
import os.path
import sys
import tempfile
def selfdir():
return os.path.dirname(__file__)
def setup_workdir():
return tempfile.mkdtemp(dir="/tmp", prefix="python-anyconfig-tests-")
def cleanup_workdir(workdir):
"""
FIXME... | #
# Copyright (C) 2011 - 2014 Satoru SATOH <ssato at redhat.com>
#
import imp
import os.path
import sys
import tempfile
def selfdir():
return os.path.dirname(__file__)
def setup_workdir():
return tempfile.mkdtemp(dir="/tmp", prefix="python-anyconfig-tests-")
def cleanup_workdir(workdir):
"""
FIXME... | mit | Python |
73f20bde3e0d66b9b6bd787b0c2a0a581e132faa | Add `list` command to show available instances | cloudboss/bossimage,cloudboss/bossimage | bossimage/cli.py | bossimage/cli.py | # Copyright 2016 Joseph Wright <rjosephwright@gmail.com>
#
# 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,... | # Copyright 2016 Joseph Wright <rjosephwright@gmail.com>
#
# 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,... | mit | Python |
0f6272aef4fd37ca1b6cf1a0a86ccaab6ff90f82 | Add year-month parsing to monthfield in admin. | datakortet/dkmodelfields | dkmodelfields/adminforms/monthfield.py | dkmodelfields/adminforms/monthfield.py | # -*- coding: utf-8 -*-
"""Admin support code for MonthFields.
"""
from dk import ttcal
from django.forms.fields import CharField
from django.forms import ValidationError
from django.forms.util import flatatt
from django.forms.widgets import TextInput
from django.utils.safestring import mark_safe
class MonthInput(T... | # -*- coding: utf-8 -*-
"""Admin support code for MonthFields.
"""
from dk import ttcal
from django.forms.fields import CharField
from django.forms import ValidationError
from django.forms.util import flatatt
from django.forms.widgets import TextInput
from django.utils.safestring import mark_safe
class MonthInput(T... | mit | Python |
6bd9d8de1066bcd4b63ad41da676cf764b4ff00d | Update reference to sv-benchmarks | ultimate-pa/benchexec,ultimate-pa/benchexec,sosy-lab/benchexec,sosy-lab/benchexec,ultimate-pa/benchexec,ultimate-pa/benchexec,sosy-lab/benchexec,ultimate-pa/benchexec,sosy-lab/benchexec,sosy-lab/benchexec,sosy-lab/benchexec,ultimate-pa/benchexec | benchexec/tools/sv_benchmarks_util.py | benchexec/tools/sv_benchmarks_util.py | # This file is part of BenchExec, a framework for reliable benchmarking:
# https://github.com/sosy-lab/benchexec
#
# SPDX-FileCopyrightText: 2007-2020 Dirk Beyer <https://www.sosy-lab.org>
#
# SPDX-License-Identifier: Apache-2.0
"""
This module contains some useful functions related to tasks in the sv-benchmarks
repos... | # This file is part of BenchExec, a framework for reliable benchmarking:
# https://github.com/sosy-lab/benchexec
#
# SPDX-FileCopyrightText: 2007-2020 Dirk Beyer <https://www.sosy-lab.org>
#
# SPDX-License-Identifier: Apache-2.0
"""
This module contains some useful functions related to tasks in the sv-benchmarks
repos... | apache-2.0 | Python |
e34d437fb9ede1c5a547bbabe99978207e2a389b | Make paths manipulation stuff private | samdroid-apps/sugar-toolkit-gtk3,i5o/sugar-toolkit-gtk3,gusDuarte/sugar-toolkit-gtk3,puneetgkaur/sugar-toolkit-gtk3,puneetgkaur/sugar-toolkit-gtk3,i5o/sugar-toolkit-gtk3,sugarlabs/sugar-toolkit-gtk3,tchx84/sugar-toolkit-gtk3,tchx84/debian-pkg-sugar-toolkit,manuq/sugar-toolkit-gtk3,sugarlabs/sugar-toolkit-gtk3,quozl/sug... | sugar/env.py | sugar/env.py | import os
import sys
import pwd
try:
from sugar.__uninstalled__ import *
except ImportError:
from sugar.__installed__ import *
import sugar.setup
def setup():
for path in sugar_python_path:
sys.path.insert(0, path)
if os.environ.has_key('PYTHONPATH'):
old_path = os.environ['PYTHONPATH']
os.environ['PYTH... | import os
import sys
import pwd
try:
from sugar.__uninstalled__ import *
except ImportError:
from sugar.__installed__ import *
import sugar.setup
def add_to_python_path(path):
sys.path.insert(0, path)
if os.environ.has_key('PYTHONPATH'):
old_path = os.environ['PYTHONPATH']
os.environ['PYTHONPATH'] = path + '... | lgpl-2.1 | Python |
0e2d9b496ab12d512e56041d9f4ffbadf7fab4ab | Remove unused method | tchx84/debian-pkg-sugar-toolkit-gtk3,puneetgkaur/backup_sugar_sugartoolkit,Daksh/sugar-toolkit-gtk3,sugarlabs/sugar-toolkit,sugarlabs/sugar-toolkit,manuq/sugar-toolkit-gtk3,quozl/sugar-toolkit-gtk3,gusDuarte/sugar-toolkit-gtk3,samdroid-apps/sugar-toolkit-gtk3,tchx84/sugar-toolkit-gtk3,tchx84/debian-pkg-sugar-toolkit,gu... | sugar/env.py | sugar/env.py | # Copyright (C) 2006, Red Hat, Inc.
#
# 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 the Free Software Foundation; either
# version 2 of the License, or (at your option) any later version.
#
# This library is distrib... | # Copyright (C) 2006, Red Hat, Inc.
#
# 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 the Free Software Foundation; either
# version 2 of the License, or (at your option) any later version.
#
# This library is distrib... | lgpl-2.1 | Python |
29b0f18a3b7dcc6e0123889c1c845d7511677c96 | fix indentation | terceiro/squad,terceiro/squad,terceiro/squad,terceiro/squad | squad/run.py | squad/run.py | import os
import sys
from squad.version import __version__
from squad.manage import main as manage
__usage__ = """usage: squad [OPTIONS]
Options:
-f, --fast Fast startup: skip potentially slow operations, such as
running database migrations and compiling static assets
-h, --... | import os
import sys
from squad.version import __version__
from squad.manage import main as manage
__usage__ = """usage: squad [OPTIONS]
Options:
-f, --fast Fast startup: skip potentially slow operations, such as
running database migrations and compiling static assets
-h, --he... | agpl-3.0 | Python |
0e0096e664997ffa935273ba66b46a1e943a685a | add json support to dump_lol | zbraniecki/l20n,zbraniecki/fluent.js,mail-apps/l20n.js,l20n/l20n.js,zbraniecki/l20n.js,stasm/python-l20n,Pike/l20n.js,projectfluent/fluent.js,zbraniecki/fluent.js,Pike/l20n.js,stasm/l20n.js,mail-apps/l20n.js,projectfluent/fluent.js,projectfluent/fluent.js,zbraniecki/l20n,Swaven/l20n.js | python/tools/dump_lol.py | python/tools/dump_lol.py | #!/usr/bin/python
import argparse
from l20n.format.lol.parser import Parser
import pyast.dump.raw, pyast.dump.json
def read_file(filename, charset='utf-8', errors='strict'):
with open(filename, 'rb') as f:
return f.read().decode(charset, errors)
def dump_lol(path, t):
source = read_file(path)
p ... | #!/usr/bin/python
import argparse
from l20n.format.lol.parser import Parser
import pyast
def read_file(filename, charset='utf-8', errors='strict'):
with open(filename, 'rb') as f:
return f.read().decode(charset, errors)
def dump_lol(path):
source = read_file(path)
p = Parser()
lol = p.parse(... | apache-2.0 | Python |
9e7137c241684d450e8ec62fc365fd21bd20b38d | Fix gunicorn socket path | Candihub/pixel,Candihub/pixel,Candihub/pixel,Candihub/pixel,Candihub/pixel | docker/usr/local/etc/gunicorn/pixel.py | docker/usr/local/etc/gunicorn/pixel.py | # Gunicorn-django settings
bind = ['unix:/app/pixel/run/gunicorn.sock']
graceful_timeout = 90
loglevel = 'error'
name = 'pixel'
python_path = '/app/pixel'
timeout = 90
workers = 3
| # Gunicorn-django settings
bind = ['unix:/app/run/gunicorn.sock']
graceful_timeout = 90
loglevel = 'error'
name = 'pixel'
python_path = '/app/pixel'
timeout = 90
workers = 3
| bsd-3-clause | Python |
4d1a33462e73111f2507c4fd1e990af2952ad3df | Fix serializer tests | novafloss/django-formidable | demo/tests/serializers/tests_validations.py | demo/tests/serializers/tests_validations.py | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.test import TestCase
from formidable.models import Formidable
from formidable.serializers.validation import (
MinLengthSerializer, RegexpSerializer,
ValidationSerializer
)
class ValidationSerializerTest(TestCase):
increment = 0... | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.test import TestCase
from formidable.models import Formidable
from formidable.serializers.validation import (
MinLengthSerializer, RegexpSerializer,
ValidationSerializer
)
class ValidationSerializerTest(TestCase):
def setUp(se... | mit | Python |
74a9cfe1206e3314890af165e5c8193c687844a0 | Add files via upload | mphor/Tweet-bote | post.py | post.py | # -*- coding: utf-8 -*-
"""
Created on Mon Sep 4 16:23:07 2017
@author: mojod
"""
import random
import tweepy
import time
consumer_key='L3MsyCOoqgSPc4jzZV8wero0d'
consumer_secret='ZCOI3x1f8GZ9c2cJ8kPYyyBW4gRX4MJBbyHijGE1UObnAow6ka'
access_token='3789452353-dmM75KVaDGqIPz6ZtzP8b5Q6VkvzQQo9Sn34ZOZ'
ac... | # -*- coding: utf-8 -*-
"""
Created on Mon Sep 4 16:23:07 2017
@author: mojod
"""
import random
import tweepy
consumer_key='L3MsyCOoqgSPc4jzZV8wero0d'
consumer_secret='ZCOI3x1f8GZ9c2cJ8kPYyyBW4gRX4MJBbyHijGE1UObnAow6ka'
access_token='3789452353-dmM75KVaDGqIPz6ZtzP8b5Q6VkvzQQo9Sn34ZOZ'
access_token_s... | mit | Python |
85d2c012bfaeeb04fa8dd31cd05a04a8dc43c14e | Add tests that have and get of nonterms raise exceptions | PatrikValkovic/grammpy | tests/grammar_term-nonterm_test/NonterminalsInvalidTest.py | tests/grammar_term-nonterm_test/NonterminalsInvalidTest.py | #!/usr/bin/env python
"""
:Author Patrik Valkovic
:Created 23.06.2017 16:39
:Licence GNUv3
Part of grammpy
"""
from unittest import TestCase, main
from grammpy.RawGrammar import RawGrammar as Grammar
from grammpy import Nonterminal
from grammpy.exceptions import NotNonterminalException
class TempClass(... | #!/usr/bin/env python
"""
:Author Patrik Valkovic
:Created 23.06.2017 16:39
:Licence GNUv3
Part of grammpy
"""
from unittest import TestCase, main
from grammpy.RawGrammar import RawGrammar
class NonterminalsInvalidTest(TestCase):
pass
if __name__ == '__main__':
main()
| mit | Python |
25737b0d0389d0ccbd12d01f9076a889891f0a22 | Update XENIFACE and XENVIF | benchalmers/win-installer,OwenSmith/win-installer,cheng--zhang/win-installer,cheng--zhang/win-installer,cheng--zhang/win-installer,kostaslamda/win-installer,xenserver/win-installer,kostaslamda/win-installer,xenserver/win-installer,benchalmers/win-installer,kostaslamda/win-installer,kostaslamda/win-installer,benchalmers... | manifestspecific.py | manifestspecific.py | # Copyright (c) Citrix Systems 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:
#
# * Redistributions of source code must retain the above
# copyright notice, this list of c... | # Copyright (c) Citrix Systems 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:
#
# * Redistributions of source code must retain the above
# copyright notice, this list of c... | bsd-2-clause | Python |
b6a09c80d349adc91e2a05de8864b75bcb4b71dc | Put whqled xenvif #56 into trunk | xenserver/win-installer,cheng--zhang/win-installer,OwenSmith/win-installer,xenserver/win-installer,benchalmers/win-installer,benchalmers/win-installer,benchalmers/win-installer,xenserver/win-installer,OwenSmith/win-installer,OwenSmith/win-installer,kostaslamda/win-installer,benchalmers/win-installer,cheng--zhang/win-in... | manifestspecific.py | manifestspecific.py | # Copyright (c) Citrix Systems 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:
#
# * Redistributions of source code must retain the above
# copyright notice, this list of c... | # Copyright (c) Citrix Systems 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:
#
# * Redistributions of source code must retain the above
# copyright notice, this list of c... | bsd-2-clause | Python |
5d749f1d3e69ce233bd5ac81b39e535c0d02a954 | Move back to last merged tools versions, to overcome buildnumber issue | xenserver/win-installer,OwenSmith/win-installer,benchalmers/win-installer,cheng--zhang/win-installer,OwenSmith/win-installer,kostaslamda/win-installer,kostaslamda/win-installer,kostaslamda/win-installer,kostaslamda/win-installer,cheng--zhang/win-installer,cheng--zhang/win-installer,xenserver/win-installer,benchalmers/w... | manifestspecific.py | manifestspecific.py | # Copyright (c) Citrix Systems 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:
#
# * Redistributions of source code must retain the above
# copyright notice, this list of c... | # Copyright (c) Citrix Systems 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:
#
# * Redistributions of source code must retain the above
# copyright notice, this list of c... | bsd-2-clause | Python |
516c18a74f1b606b03ab07091cb0004e75c0a49b | Fix kate plugin | leepa/isort,AbsoluteMSTR/isort,wimglenn/isort,tomviner/isort,jmullan/isort,adamchainz/isort,adamchainz/isort,graingert/isort,pahko/isort,leepa/isort,PyCQA/isort,aequitas/isort,tomviner/isort,gforcada/isort,jmullan/isort,jamesbroadhead/isort,pahko/isort,levic/isort,wimglenn/isort,gforcada/isort,AbsoluteMSTR/isort,jamesb... | kate_plugin.py | kate_plugin.py | """
isort/kate_plugin.py
Provides a simple kate plugin that enables the use of isort to sort Python imports
in the currently open kate file.
Copyright (C) 2013 Timothy Edmund Crosley
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Pu... | """
isort/kate_plugin.py
Provides a simple kate plugin that enables the use of isort to sort Python imports
in the currently open kate file.
Copyright (C) 2013 Timothy Edmund Crosley
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Pu... | mit | Python |
f2dfbfbee1cd87f2e6f499b78eae1a8ca39dd529 | create a category form | alpsayin/django-qanda,alpsayin/django-qanda,alpsayin/django-qanda,alpsayin/django-qanda | qanda/qanda_app/forms.py | qanda/qanda_app/forms.py | from django.forms import ModelForm, Textarea, TextInput, Select
from models import Question, Answer, Reply, Category
from django import forms
from django.conf import settings
from django.utils.translation import ugettext as _
class QuestionForm(ModelForm):
def __init__(self, *args, **kwargs):
super(QuestionForm, s... | from django.forms import ModelForm, Textarea, TextInput, Select
from models import Question, Answer, Reply
from django import forms
from django.conf import settings
from django.utils.translation import ugettext as _
class QuestionForm(ModelForm):
def __init__(self, *args, **kwargs):
super(QuestionForm, self).__ini... | mit | Python |
5d69fa2a169274c65bfd047199a2df9c88f188e3 | use the taggit widget in question form | alpsayin/django-qanda,alpsayin/django-qanda,alpsayin/django-qanda,alpsayin/django-qanda | qanda/qanda_app/forms.py | qanda/qanda_app/forms.py | from django.forms import ModelForm, Textarea, TextInput, Select
from models import Question, Answer, Reply
from django import forms
class QuestionForm(ModelForm):
def __init__(self, *args, **kwargs):
super(QuestionForm, self).__init__(*args, **kwargs)
self.fields['category'].required = False
class Meta:
mode... | from django.forms import ModelForm, Textarea, TextInput, Select
from models import Question, Answer, Reply
from django import forms
class QuestionForm(ModelForm):
def __init__(self, *args, **kwargs):
super(QuestionForm, self).__init__(*args, **kwargs)
self.fields['category'].required = False
class Meta:
mode... | mit | Python |
174a374a685829ede49236f820122b442b9ec920 | Fix taichi_dynamic example (#4767) | yuanming-hu/taichi,yuanming-hu/taichi,yuanming-hu/taichi,yuanming-hu/taichi | python/taichi/examples/features/sparse/taichi_dynamic.py | python/taichi/examples/features/sparse/taichi_dynamic.py | import taichi as ti
ti.init()
x = ti.field(ti.i32)
l = ti.field(ti.i32)
n = 16
ti.root.dense(ti.i, n).dynamic(ti.j, n).place(x)
ti.root.dense(ti.i, n).place(l)
@ti.kernel
def make_lists():
for i in range(n):
for j in range(i):
ti.append(x.parent(), i, j * j)
l[i] = ti.length(x.paren... | import taichi as ti
x = ti.field(ti.i32)
l = ti.field(ti.i32)
n = 16
ti.init()
ti.root.dense(ti.i, n).dynamic(ti.j, n).place(x)
ti.root.dense(ti.i, n).place(l)
@ti.kernel
def make_lists():
for i in range(n):
for j in range(i):
ti.append(x.parent(), i, j * j)
l[i] = ti.length(x.paren... | apache-2.0 | Python |
d57161b9449faa1218e4dab55fe4b2bd6f0c3436 | Remove unused code and get rid of flake8 errors | swesterveld/udacity-nd004-p4-conference-organization-app,swesterveld/udacity-nd004-p4-conference-organization-app,swesterveld/udacity-nd004-p4-conference-organization-app | utils.py | utils.py | import json
import os
import time
from google.appengine.api import urlfetch
def getUserId(user, id_type="email"):
if id_type == "email":
return user.email()
if id_type == "oauth":
"""A workaround implementation for getting userid."""
auth = os.getenv('HTTP_AUTHORIZATION')
bea... | import json
import os
import time
import uuid
from google.appengine.api import urlfetch
from models import Profile
def getUserId(user, id_type="email"):
if id_type == "email":
return user.email()
if id_type == "oauth":
"""A workaround implementation for getting userid."""
auth = os.ge... | apache-2.0 | Python |
f6d7707abcd80524857386d96495cc79795cd5d5 | use htmlparser to get a word meaning in yahoo dictionary | breeze101792/list_vocabulary,breeze101792/list_vocabulary | ydict.py | ydict.py | import urllib.request
from html.parser import HTMLParser
class DictParser(HTMLParser):
def __init__(self):
super().__init__()
self.content = False
# self.query_string = None
self.li_counter = 0
self.ignore_flag = False
def handle_starttag(self, tag, attrs):
if se... | import urllib.request
from html.parser import HTMLParser
class DictParser(HTMLParser):
# def __init__(self):
# super.__init__()
def handle_starttag(self, tag, attrs):
print("Encountered a start tag:", tag)
def handle_endtag(self, tag):
print("Encountered an end tag :", tag)
def ... | agpl-3.0 | Python |
0545539a6d3df83af57f973a82cff2961cbe32ec | Test db login | tamasgal/km3pipe,tamasgal/km3pipe | km3pipe/tests/test_db.py | km3pipe/tests/test_db.py | # coding=utf-8
# Filename: test_core.py
# pylint: disable=C0111,E1003,R0904,C0103,R0201,C0102
from __future__ import division, absolute_import, print_function
from km3pipe.testing import TestCase, MagicMock
from km3pipe.db import DBManager, DOMContainer
from km3pipe.logger import logging
__author__ = "Tamas Gal"
__c... | # coding=utf-8
# Filename: test_core.py
# pylint: disable=C0111,E1003,R0904,C0103,R0201,C0102
from __future__ import division, absolute_import, print_function
from km3pipe.testing import TestCase
from km3pipe.db import DOMContainer
__author__ = "Tamas Gal"
__copyright__ = "Copyright 2016, Tamas Gal and the KM3NeT co... | mit | Python |
ffbc39b4eeb4a3e4850f83faa13c1ddf616d2328 | Add mail to administrators | morelab/weblabdeusto,weblabdeusto/weblabdeusto,porduna/weblabdeusto,weblabdeusto/weblabdeusto,zstars/weblabdeusto,porduna/weblabdeusto,zstars/weblabdeusto,porduna/weblabdeusto,porduna/weblabdeusto,morelab/weblabdeusto,zstars/weblabdeusto,zstars/weblabdeusto,weblabdeusto/weblabdeusto,morelab/weblabdeusto,zstars/weblabde... | tools/wcloud/wcloud/utils.py | tools/wcloud/wcloud/utils.py | import sys
import smtplib
from email.mime.text import MIMEText
from email.mime.multipart import MIMEMultipart
DEFAULT_EMAIL_HOST = 'mail.deusto.es'
EMAILS_SENT = []
def send_email(app, body_text, subject, from_email, to_email, body_html=None):
email_host = app.config.get('EMAIL_HOST', DEFAULT_EMAIL_HOST)
i... | import sys
import smtplib
from email.mime.text import MIMEText
from email.mime.multipart import MIMEMultipart
DEFAULT_EMAIL_HOST = 'mail.deusto.es'
EMAILS_SENT = []
def send_email(app, body_text, subject, from_email, to_email, body_html=None):
email_host = app.config.get('EMAIL_HOST', DEFAULT_EMAIL_HOST)
i... | bsd-2-clause | Python |
ae3f9fbcf2bedba6798460569b10260c9acaa1bf | fix url to match filter | rrooij/sitewatcher_telegram | watcher/tweakerswatcher.py | watcher/tweakerswatcher.py | import requests
import json
import os.path
from watcher.watcher import Watcher
class TweakersWatcher(Watcher):
watcher_name = 'Tweakers Pricewatch'
filename = 'site_tweakers.txt'
def parse_site(self):
url = 'https://tweakers.net/xmlhttp/xmlHttp.php?application=tweakbase&type=filter&action=deals&d... | import requests
import json
import os.path
from watcher.watcher import Watcher
class TweakersWatcher(Watcher):
watcher_name = 'Tweakers Pricewatch'
filename = 'site_tweakers.txt'
def parse_site(self):
url = 'https://tweakers.net/xmlhttp/xmlHttp.php?application=tweakbase&type=filter&action=deals&d... | agpl-3.0 | Python |
d3effa1b80c8d56c98451f335b8099b72fa1f61b | Remove orderdict | anthonysandrin/kafka-utils,anthonysandrin/kafka-utils,Yelp/kafka-utils,Yelp/kafka-utils | yelp_kafka_tool/kafka_cluster_manager/cluster_info/util.py | yelp_kafka_tool/kafka_cluster_manager/cluster_info/util.py | from collections import Counter
def get_partitions_per_broker(brokers):
"""Return partition count for each broker."""
return dict(
(broker, len(broker.partitions))
for broker in brokers
)
def get_leaders_per_broker(brokers, partitions):
"""Return count for each broker the number of t... | from collections import Counter, OrderedDict
def get_partitions_per_broker(brokers):
"""Return partition count for each broker."""
return dict(
(broker, len(broker.partitions))
for broker in brokers
)
def get_leaders_per_broker(brokers, partitions):
"""Return count for each broker th... | apache-2.0 | Python |
b0212d5489b10956976365c862470e338c45509a | Test twisted and cares resolvers in netutil_test. | lujinda/tornado,mr-ping/tornado,nbargnesi/tornado,lsanotes/tornado,ListFranz/tornado,bdarnell/tornado,cyrilMargaria/tornado,ms7s/tornado,z-fork/tornado,insflow/tornado,akalipetis/tornado,lilydjwg/tornado,ListFranz/tornado,hzruandd/tornado,wsyzxcn/tornado,tornadoweb/tornado,coderhaoxin/tornado,eklitzke/tornado,kevinge31... | tornado/test/netutil_test.py | tornado/test/netutil_test.py | from __future__ import absolute_import, division, print_function, with_statement
import socket
from tornado.netutil import BlockingResolver, ThreadedResolver, is_valid_ip
from tornado.testing import AsyncTestCase, gen_test
from tornado.test.util import unittest
try:
from concurrent import futures
except ImportEr... | from __future__ import absolute_import, division, print_function, with_statement
import socket
from tornado.netutil import BlockingResolver, ThreadedResolver, is_valid_ip
from tornado.testing import AsyncTestCase, gen_test
from tornado.test.util import unittest
try:
from concurrent import futures
except ImportEr... | apache-2.0 | Python |
738fc28922e0807bd292c8257ac251f5f743c237 | Fix pep8 errors. | chrneumann/kotti_dkbase | kotti_dkbase/__init__.py | kotti_dkbase/__init__.py | from pyramid.httpexceptions import HTTPError
from pyramid.httpexceptions import HTTPNotFound
from kotti_dkbase.views import error_view
from kotti_dkbase.views import exception_decorator
def includeme(config):
config.include('pyramid_zcml')
config.load_zcml('configure.zcml')
config.add_view(
error_... | from pyramid.httpexceptions import HTTPError
from pyramid.httpexceptions import HTTPNotFound
from kotti_dkbase.views import error_view
from kotti_dkbase.views import exception_decorator
def includeme(config):
config.include('pyramid_zcml')
config.load_zcml('configure.zcml')
config.add_view(
error_v... | bsd-2-clause | Python |
9a861757011e2f8ba17bc30b0e874d087f5afd7b | Bump version to 6.0.1b1 | 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 |
491d7eca2137613978a7d88ad74fcdda9dcb5e5c | add find_packages to setup.py | msupino/alerta-contrib,msupino/alerta-contrib,alerta/alerta-contrib,alerta/alerta-contrib,alerta/alerta-contrib | plugins/geoip/setup.py | plugins/geoip/setup.py | #!/usr/bin/env python
from setuptools import setup, find_packages
version = '0.1.0'
setup(
name="alerta-geoip",
version=version,
description='Alerta plugin for GeoIP Lookup',
url='https://github.com/alerta/alerta-contrib',
license='Apache License 2.0',
author='Nick Satterly',
author_email... | #!/usr/bin/env python
import setuptools
version = '0.1.0'
setuptools.setup(
name="alerta-geoip",
version=version,
description='Alerta plugin for GeoIP Lookup',
url='https://github.com/alerta/alerta-contrib',
license='Apache License 2.0',
author='Nick Satterly',
author_email='nick.satterly... | mit | Python |
e3b71c58a409239845588ed9f20970243db45dba | add delay to slow balls movement in pygame1_sample | joeryan/interact-python | pong/pygame1_sample.py | pong/pygame1_sample.py | import sys, pygame
import time
pygame.init()
size = width, height = 640, 480
speed = [1, 1]
black = 0, 0, 0
screen = pygame.display.set_mode(size)
ball = pygame.image.load("ball.gif")
ballrect = ball.get_rect()
while 1:
for event in pygame.event.get():
if event.type == pygame.QUIT: sys.exit()
ball... | import sys, pygame
pygame.init()
size = width, height = 640, 480
speed = [2, 2]
black = 0, 0, 0
screen = pygame.display.set_mode(size)
ball = pygame.image.load("ball.gif")
ballrect = ball.get_rect()
while 1:
for event in pygame.event.get():
if event.type == pygame.QUIT: sys.exit()
ballrect = ballre... | mit | Python |
126e6be2dd7b61809656ada1adfe3c64cbe24c47 | Add couchbase/spock to branch merge set. | daverigby/kv_engine,daverigby/kv_engine,daverigby/kv_engine,daverigby/kv_engine | engines/ep/scripts/unmerged-commits.py | engines/ep/scripts/unmerged-commits.py | #!/usr/bin/env python2.7
# Script to show which commit(s) are not yet merged between our release branches.
from __future__ import print_function
import subprocess
import sys
class bcolors:
"""Define ANSI color codes, if we're running under a TTY."""
if sys.stdout.isatty():
HEADER = '\033[36m'
... | #!/usr/bin/env python2.7
# Script to show which commit(s) are not yet merged between our release branches.
from __future__ import print_function
import subprocess
import sys
class bcolors:
"""Define ANSI color codes, if we're running under a TTY."""
if sys.stdout.isatty():
HEADER = '\033[36m'
... | bsd-3-clause | Python |
c94960b8c42ab46331cf1f5b76c2c2f4deb33b9d | fix KeyError on small word set | baverman/typetrainer,baverman/typetrainer | typetrainer/tutors/common.py | typetrainer/tutors/common.py | import random
import collections
import itertools
from typetrainer.generator import make_char_chain, generate_word
class Filler(object):
def __init__(self, words, make_lengths_seq):
self.dist = {}
self.first, self.other, self.word_chars = make_char_chain(words, 3, self.dist)
self.lengths =... | import random
import collections
import itertools
from typetrainer.generator import make_char_chain, generate_word
class Filler(object):
def __init__(self, words, make_lengths_seq):
self.dist = {}
self.first, self.other, self.word_chars = make_char_chain(words, 3, self.dist)
self.lengths =... | mit | Python |
078e409d3c09e9ec0699ea95a2786c2342474bba | Return timestamp as a float in JSON. | openxc/web-logging-example,openxc/web-logging-example | views.py | views.py | import json
from collections import deque
from flask import request, render_template
from flask import current_app as app, abort
from util import make_status_response, generate_filename, jsonify
RECORDS_QUEUE = deque(maxlen=100)
def _prime_records_queue(q):
filename = generate_filename(app.config)
try:
... | import json
from collections import deque
from flask import request, render_template
from flask import current_app as app, abort
from util import make_status_response, generate_filename, jsonify
RECORDS_QUEUE = deque(maxlen=100)
def _prime_records_queue(q):
with open(generate_filename(app.config), 'r') as trac... | bsd-3-clause | Python |
2a7ed7c2d6f37c3b6965ad92b21cecc0a4abd91a | Add first verion to upload via BioBlend | pajanne/galaxy-kickstart,pajanne/galaxy-kickstart | upload_datasets_to_galaxy.py | upload_datasets_to_galaxy.py | #!/usr/bin/python3
import argparse
from bioblend.galaxy import GalaxyInstance
import configparser
import os
def upload_datasets_to_galaxy():
# Arguments initialization
parser = argparse.ArgumentParser(description="Script to upload a folder into"
"Galaxy Data Lib... | #!/usr/bin/python3
import argparse
# from bioblend.galaxy import GalaxyInstance
import configparser
def upload_datasets_to_galaxy():
# Arguments initialization
parser = argparse.ArgumentParser(description="Script to upload a folder into"
"Galaxy Data Libraries")... | mit | Python |
1f4006ba9831f47a7ccc3fa0f8f9fbbb44b0c217 | fix plot_matplotlib_hist2d.py covariance matrix | ndawe/rootpy,kreczko/rootpy,kreczko/rootpy,rootpy/rootpy,ndawe/rootpy,rootpy/rootpy,kreczko/rootpy,rootpy/rootpy,ndawe/rootpy | examples/plotting/plot_matplotlib_hist2d.py | examples/plotting/plot_matplotlib_hist2d.py | #!/usr/bin/env python
"""
========================================
Plot a 2D ROOT histogram with matplotlib
========================================
This example demonstrates how a 2D ROOT histogram can be displayed with
matplotlib.
"""
print __doc__
import ROOT
from matplotlib import pyplot as plt
from rootpy.plottin... | #!/usr/bin/env python
"""
========================================
Plot a 2D ROOT histogram with matplotlib
========================================
This example demonstrates how a 2D ROOT histogram can be displayed with
matplotlib.
"""
print __doc__
import ROOT
from matplotlib import pyplot as plt
from rootpy.plottin... | bsd-3-clause | Python |
0e7a6f58bc740479a616c973c5973bd255501004 | Update feedback_tags.py | bitmazk/django-feedback-form,bitmazk/django-feedback-form | feedback_form/templatetags/feedback_tags.py | feedback_form/templatetags/feedback_tags.py | """Template tags and filters for the ``feedback_form`` app."""
from django import template
from ..app_settings import * # NOQA
from ..forms import FeedbackForm
register = template.Library()
@register.inclusion_tag('feedback_form/partials/form.html', takes_context=True)
def feedback_form(context):
"""Template t... | """Template tags and filters for the ``feedback_form`` app."""
from django import template
from ..app_settings import * # NOQA
from ..forms import FeedbackForm
register = template.Library()
@register.inclusion_tag('feedback_form/partials/form.html', takes_context=True)
def feedback_form(context):
"""Template t... | mit | Python |
426dd82e9b2a7c2de2b6ba9091ad67057ffe9f5f | Create db, if there isn't one. | punchagan/statiki,punchagan/statiki | statiki.wsgi | statiki.wsgi | import os
from os.path import abspath, dirname
import sys
#active the python virtualenv for this application
HOME = os.environ['HOME']
activate_this = '%s/.virtualenvs/statiki/bin/activate_this.py' % HOME
execfile(activate_this, dict(__file__=activate_this))
# Add the source directory to the path
HERE = dirname(abspa... | import os
from os.path import abspath, dirname
import sys
#active the python virtualenv for this application
HOME = os.environ['HOME']
activate_this = '%s/.virtualenvs/statiki/bin/activate_this.py' % HOME
execfile(activate_this, dict(__file__=activate_this))
# Add the source directory to the path
HERE = dirname(abspa... | mit | Python |
78bfcf1561597113a91f7449642085a392c20429 | use doctype instead of service name to send email | vjFaLk/frappe,vjFaLk/frappe,vjFaLk/frappe,vjFaLk/frappe | frappe/integrations/offsite_backup_utils.py | frappe/integrations/offsite_backup_utils.py | # -*- coding: utf-8 -*-
# Copyright (c) 2019, Frappe Technologies and contributors
# For license information, please see license.txt
from __future__ import unicode_literals
import frappe
import glob
import os
from frappe.utils import split_emails, get_backups_path
def send_email(success, service_name, doctype, email... | # -*- coding: utf-8 -*-
# Copyright (c) 2019, Frappe Technologies and contributors
# For license information, please see license.txt
from __future__ import unicode_literals
import frappe
import glob
import os
from frappe.utils import split_emails, get_backups_path
def send_email(success, service_name, doctype, email... | mit | Python |
5659ae2668edb934f422e15edb81b1977da9b2c2 | clean up | dkohreidze/seo-auto-internal-links | sail.py | sail.py | #!/usr/bin/python
# David Kohreidze
import csv
import os
import re
with open('keywords.csv', 'rU') as csvf:
reader = csv.reader(csvf)
links = {rows[0]:rows[1] for rows in reader}
for f in os.listdir('.'):
if os.path.isfile(f):
if f.endswith(".txt"):
s = open(f).read()
print "Processing %s.." %f
f... | #!/usr/bin/python
# David Kohreidze
import csv
import os
import re
with open('keywords.csv', 'rU') as csvf:
reader = csv.reader(csvf)
links = {rows[0]:rows[1] for rows in reader} # builds dictionary from file
for f in os.listdir('.'): # for every file in the current directory
if os.path.isfile(f): # must be a f... | mit | Python |
03c221d7ac1ca955b41577d525bd40b6188045ea | Clarify comment. | earcanal/dotprobe,earcanal/dotprobe,earcanal/dotprobe | size.py | size.py | #!/usr/bin/python
# calculate the number of pixels for a stimulus
# fixed: viewer distance, vertical resolution, visual angle
# argv[1] = vertical screen height (cm)
from math import atan2, degrees
import sys
if sys.argv[1]:
h = float(sys.argv[1])
else:
h = 21.5 # Dell laptop
h = 20.6 # M... | #!/usr/bin/python
# calculate the number of pixels for a stimulus
# fixed: viewer distance, vertical resolution, visual angle
# argv[1] = vertical screen height
from math import atan2, degrees
import sys
if sys.argv[1]:
h = float(sys.argv[1])
else:
h = 21.5 # Dell laptop
h = 20.6 # Macboo... | cc0-1.0 | Python |
3972f861fae155b84bc344810b0e5a1c8cbb418c | Fix SMBC next page XPath | J-CPelletier/WebComicToCBZ,J-CPelletier/webcomix,J-CPelletier/webcomix | webcomix/supported_comics.py | webcomix/supported_comics.py | supported_comics = {
"xkcd": ("http://xkcd.com/1/", "//a[@rel='next']/@href", "//div[@id='comic']//img/@src"),
"Nedroid": ("http://nedroid.com/2005/09/2210-whee/", "//div[@class='nav-next']/a/@href", "//div[@id='comic']/img/@src"),
"JL8": ("http://limbero.org/jl8/1", "//a[text()='>']/@href", "//img/@src"),
... | supported_comics = {
"xkcd": ("http://xkcd.com/1/", "//a[@rel='next']/@href", "//div[@id='comic']//img/@src"),
"Nedroid": ("http://nedroid.com/2005/09/2210-whee/", "//div[@class='nav-next']/a/@href", "//div[@id='comic']/img/@src"),
"JL8": ("http://limbero.org/jl8/1", "//a[text()='>']/@href", "//img/@src"),
... | mit | Python |
c0ebc5d757e71c06a8ca3597bf92d496aa0dd5ee | update test child age | vanesa/kid-o,vanesa/kid-o,vanesa/kid-o,vanesa/kid-o | test.py | test.py | import os
import unittest
import tempfile
import json
from app import app
from app.models import db, Child, User
from datetime import datetime
class ChildViewTestCase(unittest.TestCase):
def test_child_view(self):
first_name = "Martha"
last_name = "Sosa"
birth_date= datetime.strptime(... | import os
import unittest
import tempfile
import json
from app import app
from app.models import db, Child, User
from datetime import datetime
class ChildViewTestCase(unittest.TestCase):
def test_child_view(self):
first_name = "Martha"
last_name = "Sosa"
birth_date= datetime.strptime(... | bsd-3-clause | Python |
e890ac9ef00193beac77b757c62911553cebf656 | Change save path to local path | adampiskorski/lpr_poc | test.py | test.py | import urllib
urllib.urlretrieve('http://192.168.0.13:8080/photoaf.jpg', 'img.jpg') | import urllib
urllib.urlretrieve('http://192.168.0.13:8080/photoaf.jpg', '/home/pi/img/img.jpg') | mit | Python |
89b1bfaad82f1e19df51b189b65ce940983d0da1 | comment out cfl in tests since it seems to be broken. | reticulatingspline/Scores,cottongin/Scores | test.py | test.py | ###
# Copyright (c) 2012-2014, spline
# All rights reserved.
###
from supybot.test import *
class ScoresTestCase(PluginTestCase):
plugins = ('Scores',)
def testScores(self):
# cfb, cfl, d1bb, golf, mlb, nascar, nba, ncb, ncw, nfl, nhl, racing, tennis, and wnba
conf.supybot.plugins.Scores... | ###
# Copyright (c) 2012-2014, spline
# All rights reserved.
###
from supybot.test import *
class ScoresTestCase(PluginTestCase):
plugins = ('Scores',)
def testScores(self):
# cfb, cfl, d1bb, golf, mlb, nascar, nba, ncb, ncw, nfl, nhl, racing, tennis, and wnba
conf.supybot.plugins.Scores... | mit | Python |
ac8d6210b1e48e7ce1131412b45d23846b7c73d2 | Fix to minor style issue | panoplyio/panoply-python-sdk | test.py | test.py | import time
import panoply
KEY = "panoply/2g866xw4oaqt1emi"
SECRET = "MmM0NWNvc2wwYmJ4ZDJ0OS84MmY3MzQ4NC02MDIzLTQyN2QtODdkMS0yY2I0NTAzNDk0NDQvMDM3MzM1OTk5NTYyL3VzLWVhc3QtMQ==" # noqa
sdk = panoply.SDK(KEY, SECRET)
sdk.write('roi-test', {'hello': 1})
print sdk.qurl
time.sleep(5)
| import time
import panoply
KEY = "panoply/2g866xw4oaqt1emi"
SECRET = "MmM0NWNvc2wwYmJ4ZDJ0OS84MmY3MzQ4NC02MDIzLTQyN2QtODdkMS0yY2I0NTAzNDk0NDQvMDM3MzM1OTk5NTYyL3VzLWVhc3QtMQ==" # noqa
sdk = panoply.SDK(KEY, SECRET)
sdk.write('roi-test', {'hello': 1})
print sdk.qurl
time.sleep(5)
| mit | Python |
5e089a1b155071bb9f009657320c9c12418f517d | debug travis | scienceopen/histutils,scienceopen/histutils | test.py | test.py | #!/usr/bin/env python
from numpy import array,nan,uint16,int64
from numpy.testing import assert_allclose
from datetime import datetime
#
try:
from .airMass import airmass
from .rawDMCreader import goRead
from .plotSolarElev import compsolar
except Exception as e:
print(e)
from airMass import airmass... | #!/usr/bin/env python
from numpy import array,nan,uint16,int64
from numpy.testing import assert_allclose
from datetime import datetime
#
try:
from .airMass import airmass
from .rawDMCreader import goRead
from .plotSolarElev import compsolar
except:
from airMass import airmass
from rawDMCreader impor... | mit | Python |
e859119ba7c898c9c5a1e3c9a719050461abc249 | test installed package | tsadm/desktop,tsadm/desktop,tsadm/desktop,tsadm/desktop | test.py | test.py | #!/usr/bin/env python3
import sys
from os import path
from unittest import TestLoader, TextTestRunner
print("Python {}".format(sys.version))
if not '--test-installed' in sys.argv:
libdir = path.join(path.abspath(path.curdir), 'lib')
sys.path.insert(0, libdir)
from tsdesktop import version
version.println()
... | #!/usr/bin/env python3
import sys
from os import path
from unittest import TestLoader, TextTestRunner
print("Python {}".format(sys.version))
libdir = path.join(path.abspath(path.curdir), 'lib')
sys.path.insert(0, libdir)
from tsdesktop import version
version.println()
ldr = TestLoader()
suite = ldr.discover('tsdesk... | bsd-3-clause | Python |
10a78f1d5cfb38c14c7e5434fdd5258fdf41a351 | Fix failing tests (oops) | rhargreaves/zx-spec | test.py | test.py | #!/usr/bin/env python
import os
import subprocess
import time
import glob
import unittest
class TestPasses(unittest.TestCase):
@classmethod
def setUpClass(self):
clean()
self.output = run_zx_spec("bin/test-passes.tap")
def test_zx_spec_header_displayed(self):
self.assertRegexpMatc... | #!/usr/bin/env python
import os
import subprocess
import time
import glob
import unittest
class TestPasses(unittest.TestCase):
@classmethod
def setUpClass(self):
clean()
self.output = run_zx_spec("bin/test-passes.tap")
def test_zx_spec_header_displayed(self):
self.assertRegexpMatc... | mit | Python |
8638e02de720954ed33098ec88a044dee38302f6 | test ... | ryanrhymes/scandex | test.py | test.py | #!/usr/bin/env python
import os
import socket
import sys
def test():
print "hello"
sock = socket.socket(socket.AF_UNIX, socket.SOCK_STREAM)
server_address = '/var/run/docker.sock'
sock.connect(server_address)
pass
if __name__=="__main__":
test()
sys.exit(0)
| #!/usr/bin/env python
import os
import socket
import sys
def test():
print "hello"
pass
if __name__=="__main__":
test()
sys.exit(0)
| mit | Python |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.