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 |
|---|---|---|---|---|---|---|---|---|
4fd0225a615616a2a881e1d1c5c59942751cb204 | add classifiers | longaccess/longaccess-client,longaccess/longaccess-client,longaccess/longaccess-client | setup.py | setup.py | from setuptools import setup, find_packages
from lacli import __version__
setup(version=__version__,
name="lacli",
author="Konstantinos Koukopoulos",
author_email='kk@longaccess.com',
description="The Long Access client",
long_description=open('README').read(),
url='http://github.com/longaccess/longaccess-client/',
license='Apache',
packages=find_packages(exclude=['features*', '*.t']),
install_requires=['boto>=2.13.2', 'python-dateutil', 'filechunkio',
'docopt', 'progressbar', 'logutils', 'requests',
'unidecode', 'pycrypto', 'pyaml'],
tests_require=['testtools'],
test_suite="lacli.t",
entry_points="""
[console_scripts]
lacli = lacli.main:main
ladec = lacli.cipher.dec:main
""",
package_data={'lacli': ['data/certificate.html']},
classifiers=[
'Development Status :: 4 - Beta',
'Intended Audience :: Developers',
'Intended Audience :: System Administrators',
'Intended Audience :: Information Technology',
'Natural Language :: English',
'License :: OSI Approved :: Apache Software License',
'Operating System :: OS Independent',
'Programming Language :: Python',
'Programming Language :: Python :: 2',
'Programming Language :: Python :: 2.6',
'Programming Language :: Python :: 2.7',
'Topic :: System :: Archiving',
'Topic :: Utilities',
],
)
| from setuptools import setup, find_packages
from lacli import __version__
setup(version=__version__,
name="lacli",
author="Konstantinos Koukopoulos",
author_email='kk@longaccess.com',
description="The Long Access client",
long_description=open('README').read(),
url='http://github.com/longaccess/longaccess-client/',
license='Apache',
packages=find_packages(exclude=['features*', '*.t']),
install_requires=['boto>=2.13.2', 'python-dateutil', 'filechunkio',
'docopt', 'progressbar', 'logutils', 'requests',
'unidecode', 'pycrypto', 'pyaml'],
tests_require=['testtools'],
test_suite="lacli.t",
entry_points="""
[console_scripts]
lacli = lacli.main:main
ladec = lacli.cipher.dec:main
""",
package_data={'lacli': ['data/certificate.html']}
)
| apache-2.0 | Python |
2dd278e6d8241e751da7cb5e4f101ceb0bcbb5dd | set beta classifier | ariebovenberg/omgorm,ariebovenberg/snug | setup.py | setup.py | import os.path
from setuptools import setup, find_packages
def read_local_file(fname):
path = os.path.join(os.path.dirname(__file__), fname)
with open(path, 'r') as rfile:
return rfile.read()
metadata = {}
exec(read_local_file('snug/__about__.py'), metadata)
readme = read_local_file('README.rst')
history = read_local_file('HISTORY.rst')
setup(
name='snug',
version=metadata['__version__'],
description=metadata['__description__'],
license='MIT',
long_description=readme + '\n\n' + history,
url='https://github.com/ariebovenberg/snug',
author=metadata['__author__'],
author_email='a.c.bovenberg@gmail.com',
classifiers=[
'Development Status :: 4 - Beta',
'Intended Audience :: Developers',
'License :: OSI Approved :: MIT License',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.4',
'Programming Language :: Python :: 3.5',
'Programming Language :: Python :: 3.6',
'Programming Language :: Python :: 3.7',
],
install_requires=[
'typing>=3.6.2;python_version<"3.5"'
],
keywords=['api-wrapper', 'http', 'generators', 'async',
'graphql', 'rest', 'rpc'],
python_requires='>=3.4',
packages=find_packages(exclude=('tests', 'docs', 'examples'))
)
| import os.path
from setuptools import setup, find_packages
def read_local_file(fname):
path = os.path.join(os.path.dirname(__file__), fname)
with open(path, 'r') as rfile:
return rfile.read()
metadata = {}
exec(read_local_file('snug/__about__.py'), metadata)
readme = read_local_file('README.rst')
history = read_local_file('HISTORY.rst')
setup(
name='snug',
version=metadata['__version__'],
description=metadata['__description__'],
license='MIT',
long_description=readme + '\n\n' + history,
url='https://github.com/ariebovenberg/snug',
author=metadata['__author__'],
author_email='a.c.bovenberg@gmail.com',
classifiers=[
'Development Status :: 5 - Production/Stable',
'Intended Audience :: Developers',
'License :: OSI Approved :: MIT License',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.4',
'Programming Language :: Python :: 3.5',
'Programming Language :: Python :: 3.6',
'Programming Language :: Python :: 3.7',
],
install_requires=[
'typing>=3.6.2;python_version<"3.5"'
],
keywords=['api-wrapper', 'http', 'generators', 'async',
'graphql', 'rest', 'rpc'],
python_requires='>=3.4',
packages=find_packages(exclude=('tests', 'docs', 'examples'))
)
| mit | Python |
7de19538d40dafc95fd93ce90f91bbce98d78651 | Update pymatgen version to 1.2.2 | Bismarrck/pymatgen,migueldiascosta/pymatgen,migueldiascosta/pymatgen,Bismarrck/pymatgen,migueldiascosta/pymatgen,Bismarrck/pymatgen,Bismarrck/pymatgen,Bismarrck/pymatgen | setup.py | setup.py | import os
from setuptools import setup, find_packages
README = os.path.join(os.path.dirname(__file__), 'README.md')
long_description = open(README).read() + '\n\n'
setup (
name = 'pymatgen',
version = '1.2.2',
packages = find_packages(),
install_requires = ['numpy', 'scipy', 'matplotlib', 'PyCIFRW'],
data_files=[('data', ['pymatgen/core/periodic_table.json']),
('config', ['pymatgen/io/VaspInputSets.cfg'])],
author = 'Shyue Ping Ong, Anubhav Jain, Michael Kocher, Geoffroy Hautier, Dan Gunter, Vincent L Chevrier, Rickard Armiento',
author_email = 'shyue@mit.edu, anubhavj@mit.edu, mpkocher@lbnl.gov, geoffroy.hautier@uclouvain.be, dkgunter@lbl.gov, vincentchevrier@gmail.com, armiento@mit.edu',
maintainer = 'Shyue Ping Ong',
url = 'https://github.com/CederGroupMIT/pymatgen_repo/',
license = 'MIT',
description = "pymatgen is the Python library powering the Materials Project (www.materialsproject.org).",
long_description = long_description,
keywords = ["vasp", "materials", "project", "electronic", "structure"],
classifiers = [
"Programming Language :: Python :: 2.7",
"Development Status :: 4 - Beta",
"Intended Audience :: Science/Research",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
"Topic :: Scientific/Engineering :: Information Analysis",
"Topic :: Scientific/Engineering :: Physics",
"Topic :: Scientific/Engineering :: Chemistry",
"Topic :: Software Development :: Libraries :: Python Modules",
],
download_url = "https://github.com/CederGroupMIT/pymatgen_repo/tarball/master",
test_suite = 'nose.collector',
test_requires = ['nose']
)
| import os
from setuptools import setup, find_packages
README = os.path.join(os.path.dirname(__file__), 'README.md')
long_description = open(README).read() + '\n\n'
setup (
name = 'pymatgen',
version = '1.2.1',
packages = find_packages(),
install_requires = ['numpy', 'scipy', 'matplotlib', 'PyCIFRW'],
data_files=[('data', ['pymatgen/core/periodic_table.json']),
('config', ['pymatgen/io/VaspInputSets.cfg'])],
author = 'Shyue Ping Ong, Anubhav Jain, Michael Kocher, Geoffroy Hautier, Dan Gunter, Vincent L Chevrier, Rickard Armiento',
author_email = 'shyue@mit.edu, anubhavj@mit.edu, mpkocher@lbnl.gov, geoffroy.hautier@uclouvain.be, dkgunter@lbl.gov, vincentchevrier@gmail.com, armiento@mit.edu',
maintainer = 'Shyue Ping Ong',
url = 'https://github.com/CederGroupMIT/pymatgen_repo/',
license = 'MIT',
description = "pymatgen is the Python library powering the Materials Project (www.materialsproject.org).",
long_description = long_description,
keywords = ["vasp", "materials", "project", "electronic", "structure"],
classifiers = [
"Programming Language :: Python :: 2.7",
"Development Status :: 4 - Beta",
"Intended Audience :: Science/Research",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
"Topic :: Scientific/Engineering :: Information Analysis",
"Topic :: Scientific/Engineering :: Physics",
"Topic :: Scientific/Engineering :: Chemistry",
"Topic :: Software Development :: Libraries :: Python Modules",
],
download_url = "https://github.com/CederGroupMIT/pymatgen_repo/tarball/master",
test_suite = 'nose.collector',
test_requires = ['nose']
)
| mit | Python |
5e038b0126a35cee81be8fc01f85e9c162b83ead | Fix project name typo | jupyter/jupyter | setup.py | setup.py | #!/usr/bin/env python
# coding: utf-8
# Copyright (c) Jupyter Development Team.
# Distributed under the terms of the Modified BSD License.
from __future__ import print_function
import os
import sys
from distutils.core import setup
pjoin = os.path.join
here = os.path.abspath(os.path.dirname(__file__))
setup_args = dict(
name = 'jupyter',
version = '1.1.0',
description = "Jupyter metapackage. Install all the Jupyter components in one go.",
long_description = """Install the Jupyter system, including the notebook, qtconsole, and the IPython kernel.""",
author = "Jupyter Development Team",
author_email = "jupyter@googlegroups.org",
py_modules = [],
install_requires = [
'notebook',
'qtconsole',
'jupyter-console',
'nbconvert',
'ipykernel',
'ipywidgets',
],
url = "http://jupyter.org",
license = "BSD",
classifiers = [
'Intended Audience :: Developers',
'Intended Audience :: System Administrators',
'Intended Audience :: Science/Research',
'License :: OSI Approved :: BSD License',
'Programming Language :: Python',
'Programming Language :: Python :: 2',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.3',
'Programming Language :: Python :: 3.4',
'Programming Language :: Python :: 3.5'
],
)
if any(bdist in sys.argv for bdist in ['bdist_wheel', 'bdist_egg']):
import setuptools
if __name__ == '__main__':
setup(**setup_args)
| #!/usr/bin/env python
# coding: utf-8
# Copyright (c) Juptyer Development Team.
# Distributed under the terms of the Modified BSD License.
from __future__ import print_function
import os
import sys
from distutils.core import setup
pjoin = os.path.join
here = os.path.abspath(os.path.dirname(__file__))
setup_args = dict(
name = 'jupyter',
version = '1.1.0',
description = "Jupyter metapackage. Install all the Jupyter components in one go.",
long_description = """Install the Jupyter system, including the notebook, qtconsole, and the IPython kernel.""",
author = "Jupyter Development Team",
author_email = "jupyter@googlegroups.org",
py_modules = [],
install_requires = [
'notebook',
'qtconsole',
'jupyter-console',
'nbconvert',
'ipykernel',
'ipywidgets',
],
url = "http://jupyter.org",
license = "BSD",
classifiers = [
'Intended Audience :: Developers',
'Intended Audience :: System Administrators',
'Intended Audience :: Science/Research',
'License :: OSI Approved :: BSD License',
'Programming Language :: Python',
'Programming Language :: Python :: 2',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.3',
'Programming Language :: Python :: 3.4',
'Programming Language :: Python :: 3.5'
],
)
if any(bdist in sys.argv for bdist in ['bdist_wheel', 'bdist_egg']):
import setuptools
if __name__ == '__main__':
setup(**setup_args)
| bsd-3-clause | Python |
65ffe5d82988f0af830a21e8a273df2e14f9ae9c | update version | rpq/django_deploys | setup.py | setup.py | import glob
from distutils.core import setup
with open('PYPI_CLASSIFIERS.txt') as f:
PYPI_CLASSIFIERS = filter(None, f.read().split('\n'))
with open('REQUIREMENTS.txt') as f:
REQUIREMENTS = filter(None, f.read().split('\n'))
with open('README.md') as f:
README = f.read()
data_files = ['MIT_LICENSE.txt', 'REQUIREMENTS.txt', 'README.md',
'PYPI_CLASSIFIERS.txt',]
data_files.extend(glob.glob('templates/*'))
script_files = glob.glob('src/scripts/*')
setup(
name='django_deploys',
version='0.1.3',
url='https://github.com/rpq/django_deploys',
data_files=[
('django_deploys', data_files),],
scripts=script_files,
description='Some django deploy fabric methods',
install_requires=REQUIREMENTS,
long_description=README,
license='MIT_LICENSE.txt',
classifiers=PYPI_CLASSIFIERS,
author='Ramon Paul Quezada',
author_email='rpq@winscores.com',
)
| import glob
from distutils.core import setup
with open('PYPI_CLASSIFIERS.txt') as f:
PYPI_CLASSIFIERS = filter(None, f.read().split('\n'))
with open('REQUIREMENTS.txt') as f:
REQUIREMENTS = filter(None, f.read().split('\n'))
with open('README.md') as f:
README = f.read()
data_files = ['MIT_LICENSE.txt', 'REQUIREMENTS.txt', 'README.md',
'PYPI_CLASSIFIERS.txt',]
data_files.extend(glob.glob('templates/*'))
script_files = glob.glob('src/scripts/*')
setup(
name='django_deploys',
version='0.1.2',
url='https://github.com/rpq/django_deploys',
data_files=[
('django_deploys', data_files),],
scripts=script_files,
description='Some django deploy fabric methods',
install_requires=REQUIREMENTS,
long_description=README,
license='MIT_LICENSE.txt',
classifiers=PYPI_CLASSIFIERS,
author='Ramon Paul Quezada',
author_email='rpq@winscores.com',
)
| mit | Python |
8fb4149a6a7266b8784e06f537c83e39e5b4ccf4 | add sqlitebck for segment promotion, change development status | jkafader/trough,jkafader/trough | setup.py | setup.py | from setuptools import setup
import glob
setup(
name='Trough',
version='0.1dev1',
packages=['trough',],
maintainer='James Kafader',
maintainer_email='jkafader@archive.org',
url='https://github.com/internetarchive/trough',
license='BSD',
long_description=open('README.rst').read(),
classifiers=[
'Development Status :: 4 - Beta',
'Topic :: Database :: Database Engines/Servers',
'License :: OSI Approved :: BSD License',
],
install_requires=[
'protobuf==3.1.0.post1',
'PyYAML==3.12',
'requests==2.12.4',
'six==1.10.0',
'snakebite==2.8.2-python3',
'ujson==1.35',
'sqlparse==0.2.2',
'uWSGI==2.0.14',
'doublethink>=0.2.0.dev84',
'uhashring==0.7',
'flask==0.12.2',
'sqlitebck==1.2.1',
],
tests_require=['pytest'],
scripts=glob.glob('scripts/*.py'),
)
| from setuptools import setup
import glob
setup(
name='Trough',
version='0.1dev1',
packages=['trough',],
maintainer='James Kafader',
maintainer_email='jkafader@archive.org',
url='https://github.com/jkafader/trough',
license='BSD',
long_description=open('README.rst').read(),
classifiers=[
'Development Status :: 3 - Alpha',
'Topic :: Database :: Database Engines/Servers',
'License :: OSI Approved :: BSD License',
],
install_requires=[
'protobuf==3.1.0.post1',
'PyYAML==3.12',
'requests==2.12.4',
'six==1.10.0',
'snakebite==2.8.2-python3',
'ujson==1.35',
'sqlparse==0.2.2',
'uWSGI==2.0.14',
'doublethink>=0.2.0.dev84',
'uhashring==0.7',
'flask==0.12.2',
],
tests_require=['pytest'],
scripts=glob.glob('scripts/*.py'),
)
| bsd-2-clause | Python |
6e18192da18b6d1b9c6443981f007126ea7e6927 | Change package name to use hyphen | csdms/dakota,csdms/dakota | setup.py | setup.py | #! /usr/bin/env python
from ez_setup import use_setuptools
use_setuptools()
from setuptools import setup, find_packages
from csdms.dakota import __version__, plugin_script
setup(name='csdms-dakota',
version=__version__,
author='Mark Piper',
author_email='mark.piper@colorado.edu',
license='MIT',
description='Python API for Dakota',
long_description=open('README.md').read(),
namespace_packages=['csdms'],
packages=find_packages(exclude=['*.tests']),
entry_points={
'console_scripts': [
plugin_script + ' = csdms.dakota.run_plugin:main'
]
}
)
| #! /usr/bin/env python
from ez_setup import use_setuptools
use_setuptools()
from setuptools import setup, find_packages
from csdms.dakota import __version__, plugin_script
package_name = 'csdms.dakota'
setup(name=package_name,
version=__version__,
author='Mark Piper',
author_email='mark.piper@colorado.edu',
license='MIT',
description='Python API for Dakota',
long_description=open('README.md').read(),
namespace_packages=['csdms'],
packages=find_packages(exclude=['*.tests']),
entry_points={
'console_scripts': [
plugin_script + ' = ' + package_name + '.run_plugin:main'
]
}
)
| mit | Python |
46eee806108c39f73115a77da998cf7343e46723 | revert lxml depend: do it as a system package | Connexions/rhaptos.cnxmlutils,Connexions/rhaptos.cnxmlutils,Connexions/rhaptos.cnxmlutils,Connexions/rhaptos.cnxmlutils,Connexions/rhaptos.cnxmlutils | setup.py | setup.py | from setuptools import setup, find_packages
import os
version = '1.0'
setup(name='rhaptos.cnxmlutils',
version=version,
description="",
long_description=open("README.txt").read() + "\n" +
open(os.path.join("docs", "HISTORY.txt")).read(),
# Get more strings from
# http://pypi.python.org/pypi?:action=list_classifiers
classifiers=[
"Programming Language :: Python",
],
keywords='',
author='Rhaptos Developers',
author_email='rhaptos@rhaptos.org',
url='http://rhaptos.org',
license='GPL',
packages=find_packages(exclude=['ez_setup']),
namespace_packages=['rhaptos'],
include_package_data=True,
zip_safe=False,
install_requires=[
'setuptools',
#'lxml',
#'argparse',
# -*- Extra requirements: -*-
],
entry_points="""
# -*- Entry points: -*-
""",
)
| from setuptools import setup, find_packages
import os
version = '1.0'
setup(name='rhaptos.cnxmlutils',
version=version,
description="",
long_description=open("README.txt").read() + "\n" +
open(os.path.join("docs", "HISTORY.txt")).read(),
# Get more strings from
# http://pypi.python.org/pypi?:action=list_classifiers
classifiers=[
"Programming Language :: Python",
],
keywords='',
author='Rhaptos Developers',
author_email='rhaptos@rhaptos.org',
url='http://rhaptos.org',
license='GPL',
packages=find_packages(exclude=['ez_setup']),
namespace_packages=['rhaptos'],
include_package_data=True,
zip_safe=False,
install_requires=[
'setuptools',
'lxml',
#'argparse',
# -*- Extra requirements: -*-
],
entry_points="""
# -*- Entry points: -*-
""",
)
| agpl-3.0 | Python |
9d386ae0aa56af1bca38d9f732ff718a6642779c | Package submodules in setup script | Alphadelta14/python-newdispatch | setup.py | setup.py |
from setuptools import setup
setup(name='newdispatch',
version='1.2.1',
description='Async Handler and Event Dispatcher',
url='http://github.com/Alphadelta14/python-newdispatch',
author='Alpha',
author_email='alpha@projectpokemon.org',
license='MIT',
packages=['dispatch', 'dispatch.events', 'dispatch.async'],
zip_safe=True)
|
from setuptools import setup
setup(name='newdispatch',
version='1.2',
description='Async Handler and Event Dispatcher',
url='http://github.com/Alphadelta14/python-newdispatch',
author='Alpha',
author_email='alpha@projectpokemon.org',
license='MIT',
packages=['dispatch'],
zip_safe=True)
| mit | Python |
0f22ce31a7067386a0b29b6d107c3e9481fc1492 | Change Django requirement to avoid 1.10 alpha | Open511/open511-server,Open511/open511-server,Open511/open511-server | setup.py | setup.py | from setuptools import setup, find_packages
setup(
name = "open511-server",
version = "0.1",
url='',
license = "",
packages = find_packages(),
install_requires = [
'open511==0.5',
'lxml>=3.0,<=4.0',
'WebOb==1.5.1',
'python-dateutil==2.4.2',
'requests==2.8.1',
'pytz>=2015b',
'django-appconf==1.0.1',
'cssselect==0.9.1',
'Django>=1.9.2,<=1.9.99',
'jsonfield==1.0.3'
],
entry_points = {
'console_scripts': [
'open511-task-runner = open511_server.task_runner.task_runner'
]
},
)
| from setuptools import setup, find_packages
setup(
name = "open511-server",
version = "0.1",
url='',
license = "",
packages = find_packages(),
install_requires = [
'open511==0.5',
'lxml>=3.0,<=4.0',
'WebOb==1.5.1',
'python-dateutil==2.4.2',
'requests==2.8.1',
'pytz>=2015b',
'django-appconf==1.0.1',
'cssselect==0.9.1',
'Django>=1.9.2,<=1.10',
'jsonfield==1.0.3'
],
entry_points = {
'console_scripts': [
'open511-task-runner = open511_server.task_runner.task_runner'
]
},
)
| mit | Python |
f4c705af860a3265ea718a4b4fc07bbbc7eab0d6 | Update setup.py | bureaucratic-labs/yargy | setup.py | setup.py | # coding: utf-8
from __future__ import unicode_literals
from sys import version_info
from setuptools import setup, find_packages
REQUIREMENTS = [
'pymorphy2==0.8',
'backports.functools-lru-cache==1.3',
'intervaltree==2.1.0',
'jellyfish==0.5.6',
]
setup(
name='yargy',
version='0.8.0',
description='Tiny rule-based facts extraction package',
url='https://github.com/natasha/yargy',
author='Yargy contributors',
author_email='d.a.veselov@yandex.ru',
license='MIT',
classifiers=[
'Development Status :: 3 - Alpha',
'Intended Audience :: Developers',
'License :: OSI Approved :: MIT License',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3.3',
'Programming Language :: Python :: 3.4',
'Programming Language :: Python :: 3.5',
'Programming Language :: Python :: 3.6',
],
keywords='natural language processing, russian morphology',
packages=find_packages(),
install_requires=REQUIREMENTS,
)
| # coding: utf-8
from __future__ import unicode_literals
from sys import version_info
from setuptools import setup, find_packages
REQUIREMENTS = [
'pymorphy2==0.8',
'backports.functools-lru-cache==1.3',
'intervaltree==2.1.0',
'jellyfish==0.5.6',
]
setup(
name='yargy',
version='0.8.0',
description='Tiny rule-based facts extraction package',
url='https://github.com/bureaucratic-labs/yargy',
author='Dmitry Veselov',
author_email='d.a.veselov@yandex.ru',
license='MIT',
classifiers=[
'Development Status :: 3 - Alpha',
'Intended Audience :: Developers',
'License :: OSI Approved :: MIT License',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3.3',
'Programming Language :: Python :: 3.4',
'Programming Language :: Python :: 3.5',
],
keywords='natural language processing, russian morphology',
packages=find_packages(),
install_requires=REQUIREMENTS,
)
| mit | Python |
526f624d5058d2401e458c20f28d6c66d5550a21 | Unify quotes | fulfilio/fulfil-python-api,sharoonthomas/fulfil-python-api | setup.py | setup.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
try:
from setuptools import setup
except ImportError:
from distutils.core import setup
with open('README.rst') as readme_file:
readme = readme_file.read()
with open('HISTORY.rst') as history_file:
history = history_file.read()
requirements = [
'requests',
]
test_requirements = [
# TODO: put package test requirements here
]
setup(
name='fulfil_client',
version='0.4.0',
description="Fulfil REST API Client in Python",
long_description=readme + '\n\n' + history,
author="Fulfil.IO Inc.",
author_email='hello@fulfil.io',
url='https://github.com/fulfilio/fulfil-python-api',
packages=[
'fulfil_client',
],
package_dir={
'fulfil_client': 'fulfil_client'
},
include_package_data=True,
install_requires=requirements,
license="ISCL",
zip_safe=False,
keywords='fulfil_client',
classifiers=[
'Development Status :: 2 - Pre-Alpha',
'Intended Audience :: Developers',
'License :: OSI Approved :: ISC License (ISCL)',
'Natural Language :: English',
'Programming Language :: Python :: 2',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.3',
'Programming Language :: Python :: 3.4',
'Programming Language :: Python :: 3.5',
],
setup_requires=['pytest-runner'],
tests_require=['pytest'],
)
| #!/usr/bin/env python
# -*- coding: utf-8 -*-
try:
from setuptools import setup
except ImportError:
from distutils.core import setup
with open('README.rst') as readme_file:
readme = readme_file.read()
with open('HISTORY.rst') as history_file:
history = history_file.read()
requirements = [
'requests',
]
test_requirements = [
# TODO: put package test requirements here
]
setup(
name='fulfil_client',
version='0.4.0',
description="Fulfil REST API Client in Python",
long_description=readme + '\n\n' + history,
author="Fulfil.IO Inc.",
author_email='hello@fulfil.io',
url='https://github.com/fulfilio/fulfil-python-api',
packages=[
'fulfil_client',
],
package_dir={
'fulfil_client': 'fulfil_client'
},
include_package_data=True,
install_requires=requirements,
license="ISCL",
zip_safe=False,
keywords='fulfil_client',
classifiers=[
'Development Status :: 2 - Pre-Alpha',
'Intended Audience :: Developers',
'License :: OSI Approved :: ISC License (ISCL)',
'Natural Language :: English',
"Programming Language :: Python :: 2",
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.3',
'Programming Language :: Python :: 3.4',
'Programming Language :: Python :: 3.5',
],
setup_requires=['pytest-runner'],
tests_require=['pytest'],
)
| isc | Python |
819ae695b8b528a2e2ea046ed205f3f0326c50c0 | change lib version to 0.5 | Nic30/HWToolkit | setup.py | setup.py | #!/usr/bin/env python3
# -*- coding: UTF-8 -*-
from setuptools import setup, find_packages
setup(name='hwt',
version='0.5',
description='hdl synthesis toolkit',
url='https://github.com/Nic30/HWToolkit',
author='Michal Orsak',
author_email='michal.o.socials@gmail.com',
install_requires=[
'simpy', # discrete simulator
'jinja2', # hdl templates renderer
],
license='MIT',
packages=find_packages(),
package_data={'hwt': ['*.vhd', '*.v']},
include_package_data=True,
zip_safe=False)
| #!/usr/bin/env python3
# -*- coding: UTF-8 -*-
from setuptools import setup, find_packages
setup(name='hwt',
version='0.4',
description='hdl synthesis toolkit',
url='https://github.com/Nic30/HWToolkit',
author='Michal Orsak',
author_email='michal.o.socials@gmail.com',
install_requires=[
'simpy', # discrete simulator
'jinja2', # hdl templates renderer
],
license='MIT',
packages=find_packages(),
package_data={'hwt': ['*.vhd', '*.v']},
include_package_data=True,
zip_safe=False)
| mit | Python |
adc32c3f1468e7a18e93ab0d2c6267bb8658248d | Add env variable DEPLOY_ROLE_ARN to be able to specify a role to assume per stack | NitorCreations/nitor-deploy-tools,NitorCreations/nitor-deploy-tools,NitorCreations/nitor-deploy-tools | setup.py | setup.py | # Copyright 2016-2017 Nitor Creations Oy
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
import sys
from setuptools import setup
from n_utils import SCRIPTS, CONSOLESCRIPTS
setup(name='nitor_deploy_tools',
version='0.141',
description='Utilities for deploying with Nitor aws-utils',
url='http://github.com/NitorCreations/nitor-deploy-tools',
download_url='https://github.com/NitorCreations/nitor-deploy-tools/tarball/0.141',
author='Pasi Niemi',
author_email='pasi@nitor.com',
license='Apache 2.0',
packages=['n_utils'],
include_package_data=True,
scripts=SCRIPTS,
entry_points={
'console_scripts': CONSOLESCRIPTS,
},
install_requires=[
'pyaml',
'boto3',
'awscli',
'pycrypto',
'requests',
'termcolor',
'ipaddr',
'argcomplete',
'nitor-vault',
'psutil',
'Pygments'
] + ([
'win-unicode-console',
'wmi',
'pypiwin32'
] if sys.platform.startswith('win') else []),
zip_safe=False)
| # Copyright 2016-2017 Nitor Creations Oy
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
import sys
from setuptools import setup
from n_utils import SCRIPTS, CONSOLESCRIPTS
setup(name='nitor_deploy_tools',
version='0.140',
description='Utilities for deploying with Nitor aws-utils',
url='http://github.com/NitorCreations/nitor-deploy-tools',
download_url='https://github.com/NitorCreations/nitor-deploy-tools/tarball/0.140',
author='Pasi Niemi',
author_email='pasi@nitor.com',
license='Apache 2.0',
packages=['n_utils'],
include_package_data=True,
scripts=SCRIPTS,
entry_points={
'console_scripts': CONSOLESCRIPTS,
},
install_requires=[
'pyaml',
'boto3',
'awscli',
'pycrypto',
'requests',
'termcolor',
'ipaddr',
'argcomplete',
'nitor-vault',
'psutil',
'Pygments'
] + ([
'win-unicode-console',
'wmi',
'pypiwin32'
] if sys.platform.startswith('win') else []),
zip_safe=False)
| apache-2.0 | Python |
0fb6ae957e868d1f26150212e40d143d4500df06 | Add setup.py metadata Enforce Twisted dependencies at least 12.1 | alex/klein,macmania/klein,joac/klein,macmania/klein,joac/klein,hawkowl/klein,brighid/klein,brighid/klein | setup.py | setup.py | from setuptools import setup
setup(
classifiers=[
'Environment :: Web Environment',
'Intended Audience :: Developers',
'License :: OSI Approved :: MIT License',
'Operating System :: OS Independent',
'Programming Language :: Python',
'Programming Language :: Python :: 2.6',
'Programming Language :: Python :: 2.7',
'Topic :: Internet :: WWW/HTTP :: Dynamic Content',
'Topic :: Software Development :: Libraries :: Python Modules'
],
description="werkzeug + twisted.web",
install_requires=[
"Twisted>=12.1",
"werkzeug",
"mock"
],
keywords="twisted flask werkzeug web",
license="MIT",
name="klein",
packages=["klein"],
url="https://github.com/twisted/klein",
version="0.1.0",
)
| from setuptools import setup
setup(
name="klein",
version="0.1.0",
description="werkzeug + twisted.web",
packages=["klein"],
install_requires=["Twisted", "werkzeug", "mock"]
)
| mit | Python |
fcd6af0a2a02ef87eedd78aa3c09836cc0799a29 | Print ICU and Unicode version, if available | googlei18n/language-resources,googlei18n/language-resources,googlei18n/language-resources,googlei18n/language-resources,google/language-resources,google/language-resources,google/language-resources,google/language-resources,googlei18n/language-resources,googlei18n/language-resources,google/language-resources,google/language-resources | utils/python_version.py | utils/python_version.py | #! /usr/bin/env python
"""Print Python interpreter path and version."""
import sys
sys.stdout.write('%s\n' % sys.executable)
sys.stdout.write('%s\n' % sys.version)
try:
import icu # pylint: disable=g-import-not-at-top
sys.stdout.write('ICU %s\n' % icu.ICU_VERSION)
sys.stdout.write('Unicode %s\n' % icu.UNICODE_VERSION)
except ImportError:
pass
sys.stdout.flush()
| #! /usr/bin/env python
"""Print Python interpreter path and version."""
import sys
sys.stdout.write(sys.executable + '\n')
sys.stdout.write(sys.version + '\n')
sys.stdout.flush()
| apache-2.0 | Python |
92bce892e5b5df6fef51c59aea4778ef91f3471c | Bump version. | etesync/journal-manager | 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='django-etesync-journal',
version='0.5.6',
packages=find_packages(),
include_package_data=True,
license='AGPLv3',
description='The server side implementation of the EteSync protocol.',
long_description=README,
url='https://www.etesync.com/',
author='EteSync',
author_email='development@etesync.com',
classifiers=[
'Environment :: Web Environment',
'Framework :: Django',
'Intended Audience :: Developers',
'License :: OSI Approved :: GNU Affero General Public License v3',
'Operating System :: OS Independent',
'Programming Language :: Python',
'Programming Language :: Python :: 3',
'Topic :: Internet :: WWW/HTTP',
'Topic :: Internet :: WWW/HTTP :: Dynamic Content',
],
)
| 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='django-etesync-journal',
version='0.5.5',
packages=find_packages(),
include_package_data=True,
license='AGPLv3',
description='The server side implementation of the EteSync protocol.',
long_description=README,
url='https://www.etesync.com/',
author='EteSync',
author_email='development@etesync.com',
classifiers=[
'Environment :: Web Environment',
'Framework :: Django',
'Intended Audience :: Developers',
'License :: OSI Approved :: GNU Affero General Public License v3',
'Operating System :: OS Independent',
'Programming Language :: Python',
'Programming Language :: Python :: 3',
'Topic :: Internet :: WWW/HTTP',
'Topic :: Internet :: WWW/HTTP :: Dynamic Content',
],
)
| agpl-3.0 | Python |
2e54cf6796f80e457d697019091110c4e814ad61 | Define setup.py | ueg1990/faker-schema | setup.py | setup.py | import os
from setuptools import setup, find_packages
here = os.path.abspath(os.path.dirname(__file__))
with open(os.path.join(here, 'README.md')) as f:
README = f.read()
version = '0.1.0'
setup(
name='faker-schema',
version=version,
description="Generate fake data using joke2k's faker and your own schema",
long_description=README,
classifiers=[
'Development Status :: 3 - Alpha',
'Environment :: Console',
'Intended Audience :: Developers',
'Programming Language :: Python',
'Programming Language :: Python :: 2',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.3',
'Programming Language :: Python :: 3.4',
'Programming Language :: Python :: 3.5',
'Programming Language :: Python :: 3.6',
'Programming Language :: Python :: Implementation :: CPython',
'Programming Language :: Python :: Implementation :: PyPy',
'Topic :: Software Development :: Libraries :: Python Modules',
'Topic :: Software Development :: Testing',
'Topic :: Utilities',
'License :: OSI Approved :: MIT License'
],
keywords='faker fixtures data test mock generator schema',
author='Usman Ehtesham Gul',
author_email='uehtesham90@gmail.com@gmail.com',
url='https://github.com/ueg1990/faker-schema',
license='MIT License',
packages=find_packages(exclude=["tests"]),
platforms=["any"],
test_suite='tests',
install_requires=[
"Faker>=0.7.17"
]
) | mit | Python | |
564d0fb4b128ae9368f24d09edfa0960ba7962cb | include quagga templates | sk2/autonetkit | setup.py | setup.py | #!/usr/bin/env python
from setuptools import setup
#from setuptools import setup, find_packages
setup (
name = "autonetkit-v3-dev",
version = "0.0.34",
description = 'Automated configuration generator',
long_description = 'Automated configuration generator',
# simple to run
entry_points = {
'console_scripts': [
'autonetkit = autonetkit.console_script:main',
'ank_webserver = autonetkit.webserver:main',
],
},
author = 'Simon Knight',
author_email = "simon.knight@gmail.com",
url = "http://www.autonetkit.org",
packages = ['autonetkit', 'autonetkit.deploy', 'autonetkit.ank_vis',
'autonetkit.load', 'autonetkit.messaging', 'autonetkit.plugins'],
include_package_data = True, # include data from MANIFEST.in
package_data = {'': ['settings.cfg',
'config/configspec.cfg',
]},
download_url = ("http://pypi.python.org/pypi/AutoNetkit"),
install_requires = ['netaddr', 'mako', 'networkx>=1.7',
'configobj',
#'textfsm',
'pika',
],
classifiers = [
"Programming Language :: Python",
"Development Status :: 3 - Alpha",
"Intended Audience :: Science/Research",
"Intended Audience :: System Administrators",
"Intended Audience :: Telecommunications Industry",
"License :: OSI Approved :: BSD License",
"Operating System :: MacOS :: MacOS X",
"Operating System :: POSIX :: Linux",
"Topic :: System :: Networking",
"Topic :: System :: Software Distribution",
"Topic :: Scientific/Engineering :: Mathematics",
],
)
| #!/usr/bin/env python
from setuptools import setup
#from setuptools import setup, find_packages
setup (
name = "autonetkit-v3-dev",
version = "0.0.30",
description = 'Automated configuration generator',
long_description = 'Automated configuration generator',
# simple to run
entry_points = {
'console_scripts': [
'autonetkit = autonetkit.console_script:main',
'ank_webserver = autonetkit.webserver:main',
],
},
author = 'Simon Knight',
author_email = "simon.knight@gmail.com",
url = "http://www.autonetkit.org",
packages = ['autonetkit', 'autonetkit.deploy', 'autonetkit.ank_vis',
'autonetkit.load', 'autonetkit.messaging', 'autonetkit.plugins'],
package_data = {'': ['settings.cfg',
'config/configspec.cfg',
'ank_vis/*.*',
'ank_vis/icons/*.*',
'templates/*.mako',
'templates/*/*.mako',
]},
download_url = ("http://pypi.python.org/pypi/AutoNetkit"),
install_requires = ['netaddr', 'mako', 'networkx>=1.7',
'configobj',
#'textfsm',
'pika',
],
classifiers = [
"Programming Language :: Python",
"Development Status :: 3 - Alpha",
"Intended Audience :: Science/Research",
"Intended Audience :: System Administrators",
"Intended Audience :: Telecommunications Industry",
"License :: OSI Approved :: BSD License",
"Operating System :: MacOS :: MacOS X",
"Operating System :: POSIX :: Linux",
"Topic :: System :: Networking",
"Topic :: System :: Software Distribution",
"Topic :: Scientific/Engineering :: Mathematics",
],
)
| bsd-3-clause | Python |
42b5e3d0189a6228958d9fbadb2edb5df2ce2fce | Check if song exists in vandermusicgenerator | raspberrywhite/raspberrywhite,raspberrywhite/raspberrywhite,raspberrywhite/raspberrywhite,raspberrywhite/raspberrywhite | vandermusicgenerator.py | vandermusicgenerator.py | import os
import eyed3
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "servant.settings")
from server import models
# From now onwards start your script..
mypath = 'songs/'
for f in os.listdir(mypath):
path = os.path.join(mypath,f)
af = eyed3.load(path)
artist = af.tag.artist
title = af.tag.title
if models.Song.objects.filter(title = title, artist = artist).exists():
continue
song = models.Song()
song.path = path
song.title = title
song.artist = artist
song.save() | import os
import eyed3
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "servant.settings")
from server import models
# From now onwards start your script..
mypath = 'songs/'
for f in os.listdir(mypath):
path = os.path.join(mypath,f)
af = eyed3.load(path)
artist = af.tag.artist
title = af.tag.title
song = models.Song()
song.path = path
song.title = title
song.artist = artist
song.save() | bsd-3-clause | Python |
6fd69cb6201b31936523a5143f4b994b7209fd2a | add scipy pandas and astroquery as requirements | migueldvb/cine | setup.py | setup.py | #!/usr/bin/env python
try:
from setuptools import setup
except ImportError:
from distutils.core import setup
def readme():
with open('README.rst') as f:
return f.read()
setup(
name="cine",
version="0.2",
author="Miguel de Val-Borro",
author_email="miguel.deval@gmail.com",
url="https://github.com/migueldvb/cine",
packages=["cine"],
install_requires=[
'numpy', 'scipy', 'pandas', 'astroquery'
],
scripts=['bin/cine'],
description="Calculate infrared pumping rates by solar radiation",
long_description=readme(),
package_data={"": ["LICENSE"]},
include_package_data=True,
classifiers=[
'Development Status :: 3 - Alpha',
'License :: OSI Approved :: MIT License',
'Intended Audience :: Developers',
'Intended Audience :: Science/Research',
'Programming Language :: Python',
'Programming Language :: Python :: 2',
'Programming Language :: Python :: 2.6',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.4',
'Programming Language :: Python :: 3.5',
'Programming Language :: Python :: 3.6',
],
test_suite='nose.collector',
tests_require=['nose'],
)
| #!/usr/bin/env python
try:
from setuptools import setup
except ImportError:
from distutils.core import setup
def readme():
with open('README.rst') as f:
return f.read()
setup(
name="cine",
version="0.2",
author="Miguel de Val-Borro",
author_email="miguel.deval@gmail.com",
url="https://github.com/migueldvb/cine",
packages=["cine"],
install_requires=[
'numpy',
],
scripts=['bin/cine'],
description="Calculate infrared pumping rates by solar radiation",
long_description=readme(),
package_data={"": ["LICENSE"]},
include_package_data=True,
classifiers=[
'Development Status :: 3 - Alpha',
'License :: OSI Approved :: MIT License',
'Intended Audience :: Developers',
'Intended Audience :: Science/Research',
'Programming Language :: Python',
'Programming Language :: Python :: 2',
'Programming Language :: Python :: 2.6',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.4',
'Programming Language :: Python :: 3.5',
'Programming Language :: Python :: 3.6',
],
test_suite='nose.collector',
tests_require=['nose'],
)
| mit | Python |
5199bf0dc502d72df3d15ff6d87c0702f2e79247 | fix parse requirements | Aplopio/django_rip,Aplopio/rip | setup.py | setup.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
try:
from setuptools import setup, Command, find_packages
except ImportError:
from distutils.core import setup
import pip
from pip.req import parse_requirements
class PyTest(Command):
user_options = []
def initialize_options(self):
import subprocess
return_code = subprocess.call(
['pip', 'install', '-r' 'test-requirements.txt'])
if return_code != 0:
raise SystemExit(return_code)
def finalize_options(self):
pass
def run(self):
import sys, subprocess
errno = subprocess.call([sys.executable, 'runtests.py'])
raise SystemExit(errno)
readme = open('README.rst').read()
history = open('HISTORY.rst').read().replace('.. :changelog:', '')
install_reqs = parse_requirements(
'requirements.txt', session=pip.download.PipSession())
test_reqs = parse_requirements(
'test-requirements.txt', session=pip.download.PipSession())
requirements = [str(ir.req) for ir in install_reqs]
test_requirements = [str(ir.req) for ir in test_reqs]
setup(
name='rip',
version='0.0.5',
description='A python framework for writing restful APIs.',
long_description=readme + '\n\n' + history,
author='Aplopio developers',
author_email='devs@aplopio.com',
url='https://github.com/aplopio/rip',
package_dir={'rip': 'rip'},
packages=find_packages(),
include_package_data=True,
install_requires=requirements,
license="MIT",
zip_safe=False,
keywords='rip',
classifiers=[
'Development Status :: 2 - Pre-Alpha',
'Intended Audience :: Developers',
'License :: OSI Approved :: MIT License',
'Natural Language :: English',
'Programming Language :: Python :: 2.7'
],
tests_require=test_requirements,
cmdclass={'test': PyTest},
test_suite='tests'
)
| #!/usr/bin/env python
# -*- coding: utf-8 -*-
try:
from setuptools import setup, Command, find_packages
except ImportError:
from distutils.core import setup
from pip.req import parse_requirements
class PyTest(Command):
user_options = []
def initialize_options(self):
import subprocess
return_code = subprocess.call(
['pip', 'install', '-r' 'test-requirements.txt'])
if return_code != 0:
raise SystemExit(return_code)
def finalize_options(self):
pass
def run(self):
import sys, subprocess
errno = subprocess.call([sys.executable, 'runtests.py'])
raise SystemExit(errno)
readme = open('README.rst').read()
history = open('HISTORY.rst').read().replace('.. :changelog:', '')
install_reqs = parse_requirements('requirements.txt')
test_reqs = parse_requirements('test-requirements.txt')
requirements = [str(ir.req) for ir in install_reqs]
test_requirements = [str(ir.req) for ir in test_reqs]
setup(
name='rip',
version='0.0.5',
description='A python framework for writing restful APIs.',
long_description=readme + '\n\n' + history,
author='Aplopio developers',
author_email='devs@aplopio.com',
url='https://github.com/aplopio/rip',
package_dir={'rip': 'rip'},
packages=find_packages(),
include_package_data=True,
install_requires=requirements,
license="MIT",
zip_safe=False,
keywords='rip',
classifiers=[
'Development Status :: 2 - Pre-Alpha',
'Intended Audience :: Developers',
'License :: OSI Approved :: MIT License',
'Natural Language :: English',
'Programming Language :: Python :: 2.7'
],
tests_require=test_requirements,
cmdclass={'test': PyTest},
test_suite='tests'
)
| mit | Python |
1f83cc656a0d4b31fc5c4e4ba596f61843be23b1 | Fix array | rhazdon/django-sonic-screwdriver | setup.py | setup.py | import os
from setuptools import setup, find_packages
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-sonic-screwdriver",
version="0.2.2",
packages=find_packages(),
include_package_data=True,
license="MIT License",
description="Django Sonic Screwdriver is a collection of very useful commands and will make your life easier.",
long_description=README,
url="https://github.com/rhazdon/django-sonic-screwdriver",
author="Djordje Atlialp",
author_email="djordje@atlialp.com",
install_requires=["django", "djangorestframework", "wheel"],
tests_require=["coverage", "django", "djangorestframework", "coveralls"],
classifiers=[
"Development Status :: 3 - Alpha",
"Environment :: Plugins",
"Environment :: Web Environment",
"Framework :: Django",
"Intended Audience :: Developers",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.5",
"Programming Language :: Python :: 3.6",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: Implementation :: PyPy",
"Topic :: Utilities",
],
)
| import os
from setuptools import setup, find_packages
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-sonic-screwdriver",
version="0.2.2",
packages=find_packages(),
include_package_data=True,
license="MIT License",
description="Django Sonic Screwdriver is a collection of very useful commands and will make your life easier.",
long_description=README,
url="https://github.com/rhazdon/django-sonic-screwdriver",
author="Djordje Atlialp",
author_email="djordje@atlialp.com",
install_requires=["Django, djangorestframework, wheel"],
tests_require=["coverage", "django", "djangorestframework", "coveralls"],
classifiers=[
"Development Status :: 3 - Alpha",
"Environment :: Plugins",
"Environment :: Web Environment",
"Framework :: Django",
"Intended Audience :: Developers",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.5",
"Programming Language :: Python :: 3.6",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: Implementation :: PyPy",
"Topic :: Utilities",
],
)
| mit | Python |
46bc9ffd874977ae605aaeef181c77493ec078e0 | Fix https://jira.appcelerator.org/browse/TIMOB-6839 | FokkeZB/titanium_mobile,emilyvon/titanium_mobile,AngelkPetkov/titanium_mobile,peymanmortazavi/titanium_mobile,ashcoding/titanium_mobile,rblalock/titanium_mobile,emilyvon/titanium_mobile,linearhub/titanium_mobile,cheekiatng/titanium_mobile,pec1985/titanium_mobile,pinnamur/titanium_mobile,prop/titanium_mobile,smit1625/titanium_mobile,jhaynie/titanium_mobile,benbahrenburg/titanium_mobile,sriks/titanium_mobile,csg-coder/titanium_mobile,jhaynie/titanium_mobile,perdona/titanium_mobile,openbaoz/titanium_mobile,emilyvon/titanium_mobile,pec1985/titanium_mobile,smit1625/titanium_mobile,bhatfield/titanium_mobile,linearhub/titanium_mobile,FokkeZB/titanium_mobile,smit1625/titanium_mobile,csg-coder/titanium_mobile,FokkeZB/titanium_mobile,hieupham007/Titanium_Mobile,csg-coder/titanium_mobile,peymanmortazavi/titanium_mobile,benbahrenburg/titanium_mobile,rblalock/titanium_mobile,pec1985/titanium_mobile,collinprice/titanium_mobile,sriks/titanium_mobile,perdona/titanium_mobile,formalin14/titanium_mobile,bhatfield/titanium_mobile,shopmium/titanium_mobile,shopmium/titanium_mobile,collinprice/titanium_mobile,cheekiatng/titanium_mobile,peymanmortazavi/titanium_mobile,bright-sparks/titanium_mobile,indera/titanium_mobile,mvitr/titanium_mobile,ashcoding/titanium_mobile,linearhub/titanium_mobile,peymanmortazavi/titanium_mobile,falkolab/titanium_mobile,bright-sparks/titanium_mobile,bhatfield/titanium_mobile,hieupham007/Titanium_Mobile,jhaynie/titanium_mobile,KangaCoders/titanium_mobile,indera/titanium_mobile,KoketsoMabuela92/titanium_mobile,cheekiatng/titanium_mobile,pinnamur/titanium_mobile,KangaCoders/titanium_mobile,rblalock/titanium_mobile,ashcoding/titanium_mobile,shopmium/titanium_mobile,taoger/titanium_mobile,openbaoz/titanium_mobile,taoger/titanium_mobile,FokkeZB/titanium_mobile,taoger/titanium_mobile,kopiro/titanium_mobile,pinnamur/titanium_mobile,formalin14/titanium_mobile,perdona/titanium_mobile,AngelkPetkov/titanium_mobile,rblalock/titanium_mobile,taoger/titanium_mobile,KangaCoders/titanium_mobile,benbahrenburg/titanium_mobile,pec1985/titanium_mobile,csg-coder/titanium_mobile,AngelkPetkov/titanium_mobile,formalin14/titanium_mobile,indera/titanium_mobile,bright-sparks/titanium_mobile,kopiro/titanium_mobile,jvkops/titanium_mobile,bhatfield/titanium_mobile,KangaCoders/titanium_mobile,pinnamur/titanium_mobile,benbahrenburg/titanium_mobile,kopiro/titanium_mobile,jhaynie/titanium_mobile,bhatfield/titanium_mobile,pinnamur/titanium_mobile,taoger/titanium_mobile,KoketsoMabuela92/titanium_mobile,shopmium/titanium_mobile,pinnamur/titanium_mobile,KoketsoMabuela92/titanium_mobile,mano-mykingdom/titanium_mobile,linearhub/titanium_mobile,collinprice/titanium_mobile,ashcoding/titanium_mobile,pinnamur/titanium_mobile,shopmium/titanium_mobile,hieupham007/Titanium_Mobile,sriks/titanium_mobile,mvitr/titanium_mobile,FokkeZB/titanium_mobile,falkolab/titanium_mobile,falkolab/titanium_mobile,FokkeZB/titanium_mobile,openbaoz/titanium_mobile,prop/titanium_mobile,kopiro/titanium_mobile,linearhub/titanium_mobile,perdona/titanium_mobile,mvitr/titanium_mobile,KoketsoMabuela92/titanium_mobile,taoger/titanium_mobile,falkolab/titanium_mobile,collinprice/titanium_mobile,indera/titanium_mobile,hieupham007/Titanium_Mobile,jvkops/titanium_mobile,falkolab/titanium_mobile,pec1985/titanium_mobile,jvkops/titanium_mobile,prop/titanium_mobile,KangaCoders/titanium_mobile,bhatfield/titanium_mobile,falkolab/titanium_mobile,sriks/titanium_mobile,collinprice/titanium_mobile,AngelkPetkov/titanium_mobile,KoketsoMabuela92/titanium_mobile,jhaynie/titanium_mobile,jvkops/titanium_mobile,cheekiatng/titanium_mobile,sriks/titanium_mobile,bhatfield/titanium_mobile,mano-mykingdom/titanium_mobile,linearhub/titanium_mobile,mvitr/titanium_mobile,csg-coder/titanium_mobile,mano-mykingdom/titanium_mobile,mvitr/titanium_mobile,perdona/titanium_mobile,rblalock/titanium_mobile,cheekiatng/titanium_mobile,perdona/titanium_mobile,collinprice/titanium_mobile,jvkops/titanium_mobile,mano-mykingdom/titanium_mobile,KoketsoMabuela92/titanium_mobile,formalin14/titanium_mobile,mano-mykingdom/titanium_mobile,prop/titanium_mobile,pec1985/titanium_mobile,rblalock/titanium_mobile,perdona/titanium_mobile,jvkops/titanium_mobile,emilyvon/titanium_mobile,jhaynie/titanium_mobile,pinnamur/titanium_mobile,jhaynie/titanium_mobile,peymanmortazavi/titanium_mobile,openbaoz/titanium_mobile,openbaoz/titanium_mobile,smit1625/titanium_mobile,KangaCoders/titanium_mobile,sriks/titanium_mobile,emilyvon/titanium_mobile,benbahrenburg/titanium_mobile,kopiro/titanium_mobile,cheekiatng/titanium_mobile,shopmium/titanium_mobile,cheekiatng/titanium_mobile,smit1625/titanium_mobile,mvitr/titanium_mobile,collinprice/titanium_mobile,indera/titanium_mobile,formalin14/titanium_mobile,KangaCoders/titanium_mobile,kopiro/titanium_mobile,bright-sparks/titanium_mobile,ashcoding/titanium_mobile,mvitr/titanium_mobile,sriks/titanium_mobile,emilyvon/titanium_mobile,collinprice/titanium_mobile,jvkops/titanium_mobile,rblalock/titanium_mobile,hieupham007/Titanium_Mobile,peymanmortazavi/titanium_mobile,bhatfield/titanium_mobile,linearhub/titanium_mobile,jhaynie/titanium_mobile,pec1985/titanium_mobile,prop/titanium_mobile,peymanmortazavi/titanium_mobile,linearhub/titanium_mobile,KoketsoMabuela92/titanium_mobile,falkolab/titanium_mobile,formalin14/titanium_mobile,ashcoding/titanium_mobile,csg-coder/titanium_mobile,bright-sparks/titanium_mobile,sriks/titanium_mobile,hieupham007/Titanium_Mobile,mano-mykingdom/titanium_mobile,smit1625/titanium_mobile,pinnamur/titanium_mobile,ashcoding/titanium_mobile,AngelkPetkov/titanium_mobile,mvitr/titanium_mobile,pec1985/titanium_mobile,emilyvon/titanium_mobile,FokkeZB/titanium_mobile,prop/titanium_mobile,bright-sparks/titanium_mobile,benbahrenburg/titanium_mobile,smit1625/titanium_mobile,AngelkPetkov/titanium_mobile,peymanmortazavi/titanium_mobile,KangaCoders/titanium_mobile,jvkops/titanium_mobile,benbahrenburg/titanium_mobile,openbaoz/titanium_mobile,taoger/titanium_mobile,indera/titanium_mobile,perdona/titanium_mobile,mano-mykingdom/titanium_mobile,bright-sparks/titanium_mobile,AngelkPetkov/titanium_mobile,formalin14/titanium_mobile,benbahrenburg/titanium_mobile,ashcoding/titanium_mobile,smit1625/titanium_mobile,rblalock/titanium_mobile,mano-mykingdom/titanium_mobile,FokkeZB/titanium_mobile,kopiro/titanium_mobile,KoketsoMabuela92/titanium_mobile,hieupham007/Titanium_Mobile,prop/titanium_mobile,indera/titanium_mobile,prop/titanium_mobile,bright-sparks/titanium_mobile,indera/titanium_mobile,hieupham007/Titanium_Mobile,shopmium/titanium_mobile,falkolab/titanium_mobile,openbaoz/titanium_mobile,AngelkPetkov/titanium_mobile,csg-coder/titanium_mobile,taoger/titanium_mobile,emilyvon/titanium_mobile,csg-coder/titanium_mobile,pec1985/titanium_mobile,cheekiatng/titanium_mobile,openbaoz/titanium_mobile,formalin14/titanium_mobile,kopiro/titanium_mobile,shopmium/titanium_mobile | support/module/android/android.py | support/module/android/android.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Android Module Project Create Script
#
import os, sys, shutil
module_android_dir = os.path.abspath(os.path.dirname(sys._getframe(0).f_code.co_filename))
module_dir = os.path.dirname(module_android_dir)
sys.path.append(module_dir)
sdk_dir = os.path.dirname(module_dir)
sdk_android_dir = os.path.join(sdk_dir, 'android')
sys.path.append(sdk_android_dir)
import module, androidsdk
class android(module.ModulePlatform):
def __init__(self, project_dir, config, module_project):
super(android, self).__init__(project_dir, config, module_project)
self.sdk = androidsdk.AndroidSDK(module_project.sdk)
if self.sdk.get_platform_dir() == None:
print "[ERROR] Couldn't find the Android API r%s platform directory" % androidsdk.DEFAULT_API_LEVEL
sys.exit(1)
if self.sdk.get_google_apis_dir() == None:
print "[ERROR] Couldn't find the Google APIs r%s add-on directory" % androidsdk.DEFAULT_API_LEVEL
sys.exit(1)
self.init_classpath()
def init_classpath(self):
classpath_libs = [
self.sdk.get_android_jar(),
self.sdk.get_maps_jar(),
'/'.join([sdk_android_dir, 'titanium.jar']),
'/'.join([sdk_android_dir, 'js.jar']),
'/'.join([sdk_android_dir, 'kroll-common.jar']),
'/'.join([sdk_android_dir, 'kroll-apt.jar'])
]
self.classpath = ""
for lib in classpath_libs:
self.classpath += '\t<classpathentry kind="lib" path="%s"/>' % lib
def get_file_dest(self, to_path):
to_dir, to_file = os.path.split(to_path)
if to_file == "eclipse_classpath":
to_file = ".classpath"
elif to_file == "eclipse_project":
to_file = ".project"
return os.path.join(to_dir, to_file)
# escape win32 directories for ant build properties
def escape_dir(self, dir):
return dir.replace('\\', '\\\\')
def replace_tokens(self, string):
string = string.replace('__SDK_ANDROID__', self.escape_dir(sdk_android_dir))
string = string.replace('___CLASSPATH_ENTRIES___', self.classpath)
string = string.replace('___ANDROID_PLATFORM___', self.escape_dir(self.sdk.get_platform_dir()))
string = string.replace('___GOOGLE_APIS___', self.escape_dir(self.sdk.get_google_apis_dir()))
return string
def get_gitignore(self):
return ['.apt_generated']
def finished(self):
os.mkdir(os.path.join(self.project_dir, 'lib'))
os.makedirs(os.path.join(self.project_dir, 'build', '.apt_generated'))
| #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Android Module Project Create Script
#
import os, sys, shutil
module_android_dir = os.path.abspath(os.path.dirname(sys._getframe(0).f_code.co_filename))
module_dir = os.path.dirname(module_android_dir)
sys.path.append(module_dir)
sdk_dir = os.path.dirname(module_dir)
sdk_android_dir = os.path.join(sdk_dir, 'android')
sys.path.append(sdk_android_dir)
import module, androidsdk
class android(module.ModulePlatform):
def __init__(self, project_dir, config, module_project):
super(android, self).__init__(project_dir, config, module_project)
self.sdk = androidsdk.AndroidSDK(module_project.sdk)
if self.sdk.get_platform_dir() == None:
print "[ERROR] Couldn't find the Android API r%s platform directory" % androidsdk.DEFAULT_API_LEVEL
sys.exit(1)
if self.sdk.get_google_apis_dir() == None:
print "[ERROR] Couldn't find the Google APIs r%s add-on directory" % androidsdk.DEFAULT_API_LEVEL
sys.exit(1)
self.init_classpath()
def init_classpath(self):
classpath_libs = [
self.sdk.get_android_jar(),
self.sdk.get_maps_jar(),
'/'.join([sdk_android_dir, 'titanium.jar']),
'/'.join([sdk_android_dir, 'js.jar'])
]
self.classpath = ""
for lib in classpath_libs:
self.classpath += '\t<classpathentry kind="lib" path="%s"/>' % lib
def get_file_dest(self, to_path):
to_dir, to_file = os.path.split(to_path)
if to_file == "eclipse_classpath":
to_file = ".classpath"
elif to_file == "eclipse_project":
to_file = ".project"
return os.path.join(to_dir, to_file)
# escape win32 directories for ant build properties
def escape_dir(self, dir):
return dir.replace('\\', '\\\\')
def replace_tokens(self, string):
string = string.replace('__SDK_ANDROID__', self.escape_dir(sdk_android_dir))
string = string.replace('___CLASSPATH_ENTRIES___', self.classpath)
string = string.replace('___ANDROID_PLATFORM___', self.escape_dir(self.sdk.get_platform_dir()))
string = string.replace('___GOOGLE_APIS___', self.escape_dir(self.sdk.get_google_apis_dir()))
return string
def get_gitignore(self):
return ['.apt_generated']
def finished(self):
os.mkdir(os.path.join(self.project_dir, 'lib'))
os.makedirs(os.path.join(self.project_dir, 'build', '.apt_generated'))
| apache-2.0 | Python |
8488ad76b223b906aa98f94c3dac3b69206ad696 | fix setup.py | blturner/django-stardate,blturner/django-stardate | setup.py | setup.py | from setuptools import setup
setup(
name='django-stardate',
version='0.1.0.a1',
author=u'Benjamin Turner',
author_email='benturn@gmail.com',
packages=[
'stardate',
'stardate.backends',
'stardate.management',
'stardate.management.commands',
'stardate.tests',
'stardate.urls',
],
package_data={
'stardate': [
'templates/stardate/includes/*.html',
'templates/stardate/*.html',
],
},
url='https://github.com/blturner/django-stardate',
download_url='https://github.com/blturner/django-stardate/archive/v0.1.0.a1.tar.gz',
license='BSD',
description='Another django blog app.',
# long_description=open('README').read(),
zip_safe=False,
install_requires=[
'Django>=1.4,<1.7',
'django-markupfield==1.1.1',
'dropbox>=1.4,<2.0',
'Markdown==2.0.3',
'PyYAML==3.11',
'python-dateutil==2.1',
'python-social-auth>=0.1,<0.2',
'pytz<2014.4',
],
test_suite='stardate.tests'
)
| from setuptools import setup
setup(
name='django-stardate',
version='0.1.0.a1',
author=u'Benjamin Turner',
author_email='benturn@gmail.com',
packages=[
'stardate',
'stardate.backends',
'stardate.management.commands',
'stardate.tests',
'stardate.urls',
],
package_data={
'stardate': [
'templates/stardate/includes/*.html',
'templates/stardate/*.html',
],
},
url='https://github.com/blturner/django-stardate',
download_url='https://github.com/blturner/django-stardate/archive/v0.1.0.a1.tar.gz',
license='BSD',
description='Another django blog app.',
# long_description=open('README').read(),
zip_safe=False,
install_requires=[
'Django>=1.4,<1.7',
'django-markupfield==1.1.1',
'dropbox>=1.4,<2.0',
'Markdown==2.0.3',
'PyYAML==3.11',
'python-dateutil==2.1',
'python-social-auth>=0.1,<0.2',
'pytz<2014.4',
],
test_suite='stardate.tests'
)
| bsd-3-clause | Python |
cbd28549e5576e0095f8624c3906e1046f3f2c30 | Comment out old models; add m2m field from Env Profile to Choice model | ezPy-co/ezpy,alibulota/Package_Installer,ezPy-co/ezpy,alibulota/Package_Installer | installer/installer_config/models.py | installer/installer_config/models.py | from django.db import models
from django.contrib.auth.models import User
from django.utils.encoding import python_2_unicode_compatible
# @python_2_unicode_compatible
# class Package(models.Model):
# """Python Package Manager for pip requirements.txt"""
# display_name = models.CharField(max_length=63)
# install_name = models.CharField(max_length=63)
# version = models.FloatField(null=True, blank=True)
# website = models.URLField()
# description = models.TextField()
# class Meta:
# verbose_name = "pip package"
# def __str__(self):
# return str(self.display_name)
# @python_2_unicode_compatible
# class TerminalPrompt(models.Model):
# """Terminal prompt customization"""
# display_name = models.CharField(max_length=63)
# install_name = models.TextField()
# description = models.TextField()
# def __str__(self):
# return str(self.display_name)
@python_2_unicode_compatible
class UserChoice(models.Model):
description = models.CharField(max_length=63)
@python_2_unicode_compatible
class Step(models.Model):
STEP_TYPE_CHOICES = (
('dl', 'Download'),
('pip', 'Install with Pip'),
('edprof', 'Edit a profile'),
('edfile', 'Edit a file'),
('env', 'Set environment variable'),
('exec', 'Run a shell command')
)
step_type = models.CharField(max_length=63, choices=STEP_TYPE_CHOICES)
url = models.CharField(max_length=63, blank=True, null=True)
args = models.CharField(max_length=63, blank=True, null=True)
dependency = models.CharField(max_length=63, blank=True, null=True)
user_choice = models.ForeignKey(UserChoice, related_name='step')
@python_2_unicode_compatible
class EnvironmentProfile(models.Model):
"""Unique environment profile created by a user"""
user = models.ForeignKey(User, related_name='profile')
description = models.CharField(max_length=63)
choices = models.ManyToManyField(UserChoice,
related_name='profiles',
blank=True,
null=True)
# prompt = models.ForeignKey(TerminalPrompt, related_name='profile', blank=True, null=True)
# git_completion = models.BooleanField(default=True)
def __str__(self):
return str(self.description)
| from django.db import models
from django.contrib.auth.models import User
from django.utils.encoding import python_2_unicode_compatible
@python_2_unicode_compatible
class Package(models.Model):
"""Python Package Manager for pip requirements.txt"""
display_name = models.CharField(max_length=63)
install_name = models.CharField(max_length=63)
version = models.FloatField(null=True, blank=True)
website = models.URLField()
description = models.TextField()
class Meta:
verbose_name = "pip package"
def __str__(self):
return str(self.display_name)
@python_2_unicode_compatible
class TerminalPrompt(models.Model):
"""Terminal prompt customization"""
display_name = models.CharField(max_length=63)
install_name = models.TextField()
description = models.TextField()
def __str__(self):
return str(self.display_name)
@python_2_unicode_compatible
class UserChoice(models.Model):
description = models.CharField(max_length=63)
@python_2_unicode_compatible
class Step(models.Model):
STEP_TYPE_CHOICES = (
('dl', 'Download'),
('pip', 'Install with Pip'),
('edprof', 'Edit a profile'),
('edfile', 'Edit a file'),
('env', 'Set environment variable'),
('exec', 'Run a shell command')
)
step_type = models.CharField(max_length=63, choices=STEP_TYPE_CHOICES)
url = models.CharField(max_length=63, blank=True, null=True)
args = models.CharField(max_length=63, blank=True, null=True)
dependency = models.CharField(max_length=63, blank=True, null=True)
user_choice = models.ForeignKey(UserChoice, related_name='Choice')
@python_2_unicode_compatible
class EnvironmentProfile(models.Model):
"""Unique environment profile created by a user"""
user = models.ForeignKey(User, related_name='profile')
description = models.CharField(max_length=63)
packages = models.ManyToManyField(Package,
related_name='profiles',
blank=True,
null=True)
prompt = models.ForeignKey(TerminalPrompt, related_name='profile', blank=True, null=True)
git_completion = models.BooleanField(default=True)
def __str__(self):
return str(self.description)
# class UserChoice(models.Model):
# display_name = models.CharField(max_length=63)
# steps = models.ManyToManyField(Step)
# class Step(models.Model):
# step_type = models.CharField(choices=['shell', 'pip', 'system'], max_length=)
# command = models.CharField(max_length=255)
| mit | Python |
9ca994ddce631a8a89d1bd7d8fcff15d8eaadc4a | add maintainer info | Answeror/pyhook_py3k,carolus-rex/pyhook_3000 | setup.py | setup.py | '''pyHook: Python wrapper for out-of-context input hooks in Windows
The pyHook package provides callbacks for global mouse and keyboard events in Windows. Python
applications register event handlers for user input events such as left mouse down, left mouse up,
key down, etc. and set the keyboard and/or mouse hook. The underlying C library reports information
like the time of the event, the name of the window in which the event occurred, the value of the
event, any keyboard modifiers, etc.
'''
classifiers = """\
Development Status :: 5 - Production/Stable
Intended Audience :: Developers
License :: OSI Approved :: MIT License
Programming Language :: Python
Topic :: System :: Monitoring
Topic :: Software Development :: Libraries :: Python Modules
Operating System :: Microsoft :: Windows
"""
from distutils.core import setup, Extension
libs = ['user32']
doclines = __doc__.split('\n')
setup(name='pyHook',
version='1.5.1',
maintainer='Daniel Folkinshteyn',
maintainer_email='nanotube@users.sf.net',
author='Peter Parente',
author_email='parente@cs.unc.edu',
url='http://pyhook.sourceforge.net',
download_url='http://www.sourceforge.net/projects/pyhook',
license='http://www.opensource.org/licenses/mit-license.php',
platforms=['Win32'],
description = doclines[0],
classifiers = filter(None, classifiers.split('\n')),
long_description = ' '.join(doclines[2:]),
packages = ['pyHook'],
package_dir = {'pyHook' : ""},
ext_modules = [Extension('pyHook._cpyHook', ['cpyHook.i'], libraries=libs)],
data_files=[('Lib/site-packages/pyHook', ['LICENSE.txt', 'README.txt','CHANGELOG.txt'])]
) | '''pyHook: Python wrapper for out-of-context input hooks in Windows
The pyHook package provides callbacks for global mouse and keyboard events in Windows. Python
applications register event handlers for user input events such as left mouse down, left mouse up,
key down, etc. and set the keyboard and/or mouse hook. The underlying C library reports information
like the time of the event, the name of the window in which the event occurred, the value of the
event, any keyboard modifiers, etc.
'''
classifiers = """\
Development Status :: 5 - Production/Stable
Intended Audience :: Developers
License :: OSI Approved :: MIT License
Programming Language :: Python
Topic :: System :: Monitoring
Topic :: Software Development :: Libraries :: Python Modules
Operating System :: Microsoft :: Windows
"""
from distutils.core import setup, Extension
libs = ['user32']
doclines = __doc__.split('\n')
setup(name='pyHook',
version='1.5.1',
author='Peter Parente',
author_email='parente@cs.unc.edu',
url='http://pyhook.sourceforge.net',
download_url='http://www.sourceforge.net/projects/pyhook',
license='http://www.opensource.org/licenses/mit-license.php',
platforms=['Win32'],
description = doclines[0],
classifiers = filter(None, classifiers.split('\n')),
long_description = ' '.join(doclines[2:]),
packages = ['pyHook'],
package_dir = {'pyHook' : ""},
ext_modules = [Extension('pyHook._cpyHook', ['cpyHook.i'], libraries=libs)],
data_files=[('Lib/site-packages/pyHook', ['LICENSE.txt', 'README.txt','CHANGELOG.txt'])]
) | mit | Python |
c3bec8e9ec98f523a50f7bd18155b5303459bd71 | Fix ext_io at io | cielavenir/checkio-task-painting-wall,cielavenir/checkio-task-painting-wall,cielavenir/checkio-task-painting-wall | verification/referee.py | verification/referee.py | """
CheckiOReferee is a base referee for checking you code.
arguments:
tests -- the dict which contains tests in the specific structure.
Example you can see in tests.py.
cover_code -- it's a wrapper for user function for addition operations before give data
in user function. You can use some predefined codes from checkio.referee.cover_codes
checker -- it's replacing for default checking of user function result. If given, then
instead simple "==" will be using checker function.
You can use some predefined codes from checkio.referee.checkers
add_allowed_modules -- additional module which will be allowed for your task.
add_close_buildins -- some closed buildin words, as example, if you want close "eval"
remove_allowed_modules -- close standard library modules, as example "math"
checkio.referee.checkers
checkers.float_comparison -- Checking function fabric for check result with float numbers.
Syntax: checkers.float_comparison(digits) -- where "digits" is a quantity of significant
digits after coma.
checkio.referee.cover_codes
cover_codes.unwrap_args -- Your "input" from test can be given as a list. if you want unwrap this
before user function calling, then using this function. For example: if your test's input
is [2, 2] and you use this cover_code, then user function will be called as checkio(2, 2)
cover_codes.unwrap_kwargs -- the same as unwrap_kwargs, but unwrap dict.
"""
from checkio.signals import ON_CONNECT
from checkio import api
from checkio.referees.io import CheckiOReferee
from checkio.referees import cover_codes
from checkio.referees import checkers
from tests import TESTS
api.add_listener(
ON_CONNECT,
CheckiOReferee(
tests=TESTS,
cover_code={
'python-27': cover_codes.unwrap_args, # or None
'python-3': cover_codes.unwrap_args
},
checker=None, # checkers.float.comparison(2)
add_allowed_modules=[],
add_close_buildins=[],
remove_allowed_modules=[]
).on_ready)
| """
CheckiOReferee is a base referee for checking you code.
arguments:
tests -- the dict which contains tests in the specific structure.
Example you can see in tests.py.
cover_code -- it's a wrapper for user function for addition operations before give data
in user function. You can use some predefined codes from checkio.referee.cover_codes
checker -- it's replacing for default checking of user function result. If given, then
instead simple "==" will be using checker function.
You can use some predefined codes from checkio.referee.checkers
add_allowed_modules -- additional module which will be allowed for your task.
add_close_buildins -- some closed buildin words, as example, if you want close "eval"
remove_allowed_modules -- close standard library modules, as example "math"
checkio.referee.checkers
checkers.float_comparison -- Checking function fabric for check result with float numbers.
Syntax: checkers.float_comparison(digits) -- where "digits" is a quantity of significant
digits after coma.
checkio.referee.cover_codes
cover_codes.unwrap_args -- Your "input" from test can be given as a list. if you want unwrap this
before user function calling, then using this function. For example: if your test's input
is [2, 2] and you use this cover_code, then user function will be called as checkio(2, 2)
cover_codes.unwrap_kwargs -- the same as unwrap_kwargs, but unwrap dict.
"""
from checkio.signals import ON_CONNECT
from checkio import api
from checkio.referees.ext_io import CheckiOReferee
from checkio.referees import cover_codes
from checkio.referees import checkers
from tests import TESTS
api.add_listener(
ON_CONNECT,
CheckiOReferee(
tests=TESTS,
cover_code={
'python-27': cover_codes.unwrap_args, # or None
'python-3': cover_codes.unwrap_args
},
checker=None, # checkers.float.comparison(2)
add_allowed_modules=[],
add_close_buildins=[],
remove_allowed_modules=[]
).on_ready)
| mit | Python |
c4298a1a335b89c57e32b9d59a072d5b5be27694 | Use setuptools so we can tell easy_install our requirements without hax | saymedia/batchhttp | setup.py | setup.py | #!/usr/bin/env python
# Copyright (c) 2009 Six Apart Ltd.
# 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 conditions and the following disclaimer.
#
# * Redistributions in binary form must reproduce the above copyright notice,
# this list of conditions and the following disclaimer in the documentation
# and/or other materials provided with the distribution.
#
# * Neither the name of Six Apart Ltd. nor the names of its contributors may
# be used to endorse or promote products derived from this software without
# specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
# POSSIBILITY OF SUCH DAMAGE.
from setuptools import setup
setup(
name='batchhttp',
version='1.1a1',
description='HTTP Request Batching',
author='Six Apart Ltd.',
author_email='python@sixapart.com',
url='http://sixapart.github.com/batchhttp/',
packages=['batchhttp'],
provides=['batchhttp'],
requires=['httplib2(>=0.4.0)'],
install_requires=['httplib2>=0.4.0'],
)
| #!/usr/bin/env python
# Copyright (c) 2009 Six Apart Ltd.
# 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 conditions and the following disclaimer.
#
# * Redistributions in binary form must reproduce the above copyright notice,
# this list of conditions and the following disclaimer in the documentation
# and/or other materials provided with the distribution.
#
# * Neither the name of Six Apart Ltd. nor the names of its contributors may
# be used to endorse or promote products derived from this software without
# specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
# POSSIBILITY OF SUCH DAMAGE.
from distutils.core import setup
setup(
name='batchhttp',
version='1.1a1',
description='HTTP Request Batching',
author='Six Apart Ltd.',
author_email='python@sixapart.com',
url='http://sixapart.github.com/batchhttp/',
packages=['batchhttp'],
provides=['batchhttp'],
requires=['httplib2(>=0.4.0)'],
)
| bsd-3-clause | Python |
15b8810b3bf244295f38b628a0ebb1cb72f46bb3 | Update time service to simulate gradually increasing slow response times. | danriti/short-circuit,danriti/short-circuit | service_time.py | service_time.py | """ service_time.py """
from datetime import datetime
from time import sleep
from flask import Flask, jsonify
app = Flask(__name__)
count = 0
@app.route("/time", methods=['GET'])
def get_datetime():
global count
# sleep to simulate the service response time degrading
sleep(count)
count += 1
return jsonify(count=count,
datetime=datetime.now().isoformat())
if __name__ == "__main__":
app.run(port=3001, debug=True)
| """ service_time.py """
from datetime import datetime
from flask import Flask, jsonify
app = Flask(__name__)
count = 0
@app.route("/time", methods=['GET'])
def get_datetime():
global count
count += 1
return jsonify(count=count,
datetime=datetime.now().isoformat())
if __name__ == "__main__":
app.run(port=3001, debug=True)
| mit | Python |
d3271432e101e2ba3d3c59c1b28a373fe5c782d7 | Add pytest-faulthandler plugin for debugging CI seg faults | amolenaar/gaphas | setup.py | setup.py | """\
Gaphas is a MVC canvas that uses Cairo_ for rendering. One of the nicer things
of this widget is that the user (model) is not bothered with bounding box
calculations: this is all done through Cairo.
Some more features:
- Each item has it's own separate coordinate space (easy when items are
rotated).
- Items on the canvas can be connected to each other. Connections are
maintained by a linear constraint solver.
- Multiple views on one Canvas.
- What is drawn is determined by Painters. Multiple painters can be used and
painters can be chained.
- User interaction is handled by Tools. Tools can be chained.
- Versatile undo/redo system
GTK+ and PyGObject_ are required.
.. _Cairo: http://cairographics.org/
.. _PyGObject: https://pygobject.readthedocs.io/
"""
VERSION = "0.7.2"
from ez_setup import use_setuptools
use_setuptools()
from setuptools import setup, find_packages
setup(
name="gaphas",
version=VERSION,
description="Gaphas is a GTK+ based diagramming widget",
long_description=__doc__,
classifiers=[
"Development Status :: 5 - Production/Stable",
"Environment :: X11 Applications :: GTK",
"Intended Audience :: Developers",
"License :: OSI Approved :: GNU Library or Lesser General Public License (LGPL)",
"Programming Language :: Python",
"Topic :: Software Development :: Libraries :: Python Modules",
],
keywords="",
author="Arjan J. Molenaar",
author_email="arjanmol@users.sourceforge.net",
url="https://github.com/gaphor/gaphas",
license="GNU Library General Public License (LGPL, see COPYING)",
packages=find_packages(exclude=["ez_setup"]),
setup_requires=[
"pytest-runner",
"pytest-faulthandler >= 1.4.1",
"setuptools-git >= 0.3.4",
"future",
"six",
"pre-commit >= 0.12.0",
],
install_requires=[
"decorator >= 3.0.0",
"simplegeneric >= 0.6",
"PyGObject >= 3.26.1",
"pycairo >= 1.11.0",
],
zip_safe=False,
package_data={
# -*- package_data: -*-
},
entry_points={},
tests_require=["pytest"],
)
| """\
Gaphas is a MVC canvas that uses Cairo_ for rendering. One of the nicer things
of this widget is that the user (model) is not bothered with bounding box
calculations: this is all done through Cairo.
Some more features:
- Each item has it's own separate coordinate space (easy when items are
rotated).
- Items on the canvas can be connected to each other. Connections are
maintained by a linear constraint solver.
- Multiple views on one Canvas.
- What is drawn is determined by Painters. Multiple painters can be used and
painters can be chained.
- User interaction is handled by Tools. Tools can be chained.
- Versatile undo/redo system
GTK+ and PyGObject_ are required.
.. _Cairo: http://cairographics.org/
.. _PyGObject: https://pygobject.readthedocs.io/
"""
VERSION = "0.7.2"
from ez_setup import use_setuptools
use_setuptools()
from setuptools import setup, find_packages
setup(
name="gaphas",
version=VERSION,
description="Gaphas is a GTK+ based diagramming widget",
long_description=__doc__,
classifiers=[
"Development Status :: 5 - Production/Stable",
"Environment :: X11 Applications :: GTK",
"Intended Audience :: Developers",
"License :: OSI Approved :: GNU Library or Lesser General Public License (LGPL)",
"Programming Language :: Python",
"Topic :: Software Development :: Libraries :: Python Modules",
],
keywords="",
author="Arjan J. Molenaar",
author_email="arjanmol@users.sourceforge.net",
url="https://github.com/gaphor/gaphas",
license="GNU Library General Public License (LGPL, see COPYING)",
packages=find_packages(exclude=["ez_setup"]),
setup_requires=[
"pytest-runner",
"setuptools-git >= 0.3.4",
"future",
"six",
"pre-commit >= 0.12.0",
],
install_requires=[
"decorator >= 3.0.0",
"simplegeneric >= 0.6",
"PyGObject >= 3.26.1",
"pycairo >= 1.11.0",
],
zip_safe=False,
package_data={
# -*- package_data: -*-
},
entry_points={},
tests_require=["pytest"],
)
| lgpl-2.1 | Python |
9ee31ae37a754c44b779104d15997355f7c99496 | Add mutagenwrapper to install_requires | clee704/audiodiff | setup.py | setup.py | import os
import sys
from setuptools import setup, find_packages
from setuptools.command.test import test as TestCommand
from audiodiff import __version__
# Utility function to read the README file.
# Used for the long_description. It"s nice, because now 1) we have a top level
# README file and 2) it"s easier to type in the README file than to put a raw
# string in below ...
def read(fname):
return open(os.path.join(os.path.dirname(__file__), fname)).read()
class PyTest(TestCommand):
def finalize_options(self):
TestCommand.finalize_options(self)
self.test_args = []
self.test_suite = True
def run_tests(self):
#import here, cause outside the eggs aren't loaded
import pytest
errno = pytest.main(self.test_args)
sys.exit(errno)
setup(
name = "audiodiff",
version = __version__,
author = "Choongmin Lee",
author_email = "choongmin@me.com",
description = "commandline tool to compare audio files",
keywords = "lossless audio metadata comparison",
license = "MIT License",
url = "https://github.com/clee704/audiodiff",
packages = find_packages(),
install_requires = ["mutagen = 1.2.1", "mutagenwrapper = 0.0.2"],
long_description = read("README.rst"),
classifiers = [
# Full list is here: http://pypi.python.org/pypi?%3Aaction=list_classifiers
"Development Status :: 1 - Planning",
"Intended Audience :: Developers",
"Intended Audience :: End Users/Desktop",
"License :: OSI Approved :: MIT License",
"Programming Language :: Python",
"Topic :: Multimedia :: Sound/Audio :: Analysis",
"Topic :: Utilities",
],
tests_require = ["pytest"],
cmdclass = {"test": PyTest},
entry_points = {
"console_scripts": [
'audiodiff = audiodiff:main_func',
],
}
)
| import os
import sys
from setuptools import setup, find_packages
from setuptools.command.test import test as TestCommand
from audiodiff import __version__
# Utility function to read the README file.
# Used for the long_description. It"s nice, because now 1) we have a top level
# README file and 2) it"s easier to type in the README file than to put a raw
# string in below ...
def read(fname):
return open(os.path.join(os.path.dirname(__file__), fname)).read()
class PyTest(TestCommand):
def finalize_options(self):
TestCommand.finalize_options(self)
self.test_args = []
self.test_suite = True
def run_tests(self):
#import here, cause outside the eggs aren't loaded
import pytest
errno = pytest.main(self.test_args)
sys.exit(errno)
setup(
name = "audiodiff",
version = __version__,
author = "Choongmin Lee",
author_email = "choongmin@me.com",
description = "commandline tool to compare audio files",
keywords = "lossless audio metadata comparison",
license = "MIT License",
url = "https://github.com/clee704/audiodiff",
packages = find_packages(),
install_requires = ["mutagen >= 1.2.1"],
long_description = read("README.rst"),
classifiers = [
# Full list is here: http://pypi.python.org/pypi?%3Aaction=list_classifiers
"Development Status :: 1 - Planning",
"Intended Audience :: Developers",
"Intended Audience :: End Users/Desktop",
"License :: OSI Approved :: MIT License",
"Programming Language :: Python",
"Topic :: Multimedia :: Sound/Audio :: Analysis",
"Topic :: Utilities",
],
tests_require = ["pytest"],
cmdclass = {"test": PyTest},
entry_points = {
"console_scripts": [
'audiodiff = audiodiff:main_func',
],
}
)
| mit | Python |
e6d836cc423d5205934008040964d8e0086b926b | Fix missing import. Review URL: http://codereview.chromium.org/242113 | yitian134/chromium,Crystalnix/house-of-life-chromium,ropik/chromium,gavinp/chromium,adobe/chromium,ropik/chromium,ropik/chromium,Crystalnix/house-of-life-chromium,gavinp/chromium,Crystalnix/house-of-life-chromium,adobe/chromium,gavinp/chromium,ropik/chromium,Crystalnix/house-of-life-chromium,adobe/chromium,adobe/chromium,yitian134/chromium,Crystalnix/house-of-life-chromium,ropik/chromium,gavinp/chromium,gavinp/chromium,ropik/chromium,yitian134/chromium,adobe/chromium,adobe/chromium,gavinp/chromium,ropik/chromium,gavinp/chromium,adobe/chromium,gavinp/chromium,Crystalnix/house-of-life-chromium,gavinp/chromium,yitian134/chromium,adobe/chromium,yitian134/chromium,Crystalnix/house-of-life-chromium,yitian134/chromium,Crystalnix/house-of-life-chromium,yitian134/chromium,adobe/chromium,gavinp/chromium,Crystalnix/house-of-life-chromium,ropik/chromium,yitian134/chromium,yitian134/chromium,adobe/chromium,Crystalnix/house-of-life-chromium,Crystalnix/house-of-life-chromium,adobe/chromium,yitian134/chromium,ropik/chromium | webkit/tools/layout_tests/layout_package/test_files.py | webkit/tools/layout_tests/layout_package/test_files.py | #!/usr/bin/env python
# Copyright (c) 2009 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""This module is used to find all of the layout test files used by Chromium
(across all platforms). It exposes one public function - GatherTestFiles() -
which takes an optional list of paths. If a list is passed in, the returned
list of test files is constrained to those found under the paths passed in,
i.e. calling GatherTestFiles(["LayoutTests/fast"]) will only return files
under that directory."""
import glob
import os
import path_utils
# When collecting test cases, we include any file with these extensions.
_supported_file_extensions = set(['.html', '.shtml', '.xml', '.xhtml', '.pl',
'.php', '.svg'])
# When collecting test cases, skip these directories
_skipped_directories = set(['.svn', '_svn', 'resources', 'script-tests'])
# Top-level directories to shard when running tests.
SHARDABLE_DIRECTORIES = set(['chrome', 'LayoutTests', 'pending'])
def GatherTestFiles(paths):
"""Generate a set of test files and return them.
Args:
paths: a list of command line paths relative to the webkit/tests
directory. glob patterns are ok.
"""
paths_to_walk = set()
# if paths is empty, provide a pre-defined list.
if not paths:
paths = SHARDABLE_DIRECTORIES
for path in paths:
# If there's an * in the name, assume it's a glob pattern.
path = os.path.join(path_utils.LayoutTestsDir(path), path)
if path.find('*') > -1:
filenames = glob.glob(path)
paths_to_walk.update(filenames)
else:
paths_to_walk.add(path)
# Now walk all the paths passed in on the command line and get filenames
test_files = set()
for path in paths_to_walk:
if os.path.isfile(path) and _HasSupportedExtension(path):
test_files.add(os.path.normpath(path))
continue
for root, dirs, files in os.walk(path):
# don't walk skipped directories and sub directories
if os.path.basename(root) in _skipped_directories:
del dirs[:]
continue
for filename in files:
if _HasSupportedExtension(filename):
filename = os.path.join(root, filename)
filename = os.path.normpath(filename)
test_files.add(filename)
return test_files
def _HasSupportedExtension(filename):
"""Return true if filename is one of the file extensions we want to run a
test on."""
extension = os.path.splitext(filename)[1]
return extension in _supported_file_extensions
| #!/usr/bin/env python
# Copyright (c) 2009 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""This module is used to find all of the layout test files used by Chromium
(across all platforms). It exposes one public function - GatherTestFiles() -
which takes an optional list of paths. If a list is passed in, the returned
list of test files is constrained to those found under the paths passed in,
i.e. calling GatherTestFiles(["LayoutTests/fast"]) will only return files
under that directory."""
import os
import path_utils
# When collecting test cases, we include any file with these extensions.
_supported_file_extensions = set(['.html', '.shtml', '.xml', '.xhtml', '.pl',
'.php', '.svg'])
# When collecting test cases, skip these directories
_skipped_directories = set(['.svn', '_svn', 'resources', 'script-tests'])
# Top-level directories to shard when running tests.
SHARDABLE_DIRECTORIES = set(['chrome', 'LayoutTests', 'pending'])
def GatherTestFiles(paths):
"""Generate a set of test files and return them.
Args:
paths: a list of command line paths relative to the webkit/tests
directory. glob patterns are ok.
"""
paths_to_walk = set()
# if paths is empty, provide a pre-defined list.
if not paths:
paths = SHARDABLE_DIRECTORIES
for path in paths:
# If there's an * in the name, assume it's a glob pattern.
path = os.path.join(path_utils.LayoutTestsDir(path), path)
if path.find('*') > -1:
filenames = glob.glob(path)
paths_to_walk.update(filenames)
else:
paths_to_walk.add(path)
# Now walk all the paths passed in on the command line and get filenames
test_files = set()
for path in paths_to_walk:
if os.path.isfile(path) and _HasSupportedExtension(path):
test_files.add(os.path.normpath(path))
continue
for root, dirs, files in os.walk(path):
# don't walk skipped directories and sub directories
if os.path.basename(root) in _skipped_directories:
del dirs[:]
continue
for filename in files:
if _HasSupportedExtension(filename):
filename = os.path.join(root, filename)
filename = os.path.normpath(filename)
test_files.add(filename)
return test_files
def _HasSupportedExtension(filename):
"""Return true if filename is one of the file extensions we want to run a
test on."""
extension = os.path.splitext(filename)[1]
return extension in _supported_file_extensions
| bsd-3-clause | Python |
efb044361340a2b8eec61d91e9cb087e24db5e84 | Fix error message | jepcastelein/marketo-rest-python | marketorestpython/helper/exceptions.py | marketorestpython/helper/exceptions.py |
class MarketoException(Exception):
message = None
code = None
def __init__(self, exc = {'message':None,'code':None}):
self.message = exc['message']
self.code = exc['code']
def __str__(self):
return "Marketo API Error Code {}: {}".format(self.code, self.message)
|
class MarketoException(Exception):
message = None
code = None
def __init__(self, exc = {'message':None,'code':None}):
self.msg = exc['message']
self.code = exc['code']
def __str__(self):
return "Marketo API Error Code {}: {}".format(self.code, self.msg) | mit | Python |
95af3b8c71575294d47b48d83db119ca3d979ae5 | change entry point to main() | tLDP/python-tldp,tLDP/python-tldp,tLDP/python-tldp | setup.py | setup.py | # -*- coding: utf-8 -*-
import os
from setuptools import setup, find_packages
with open(os.path.join(os.path.dirname(__file__), 'README.rst')) as r_file:
readme = r_file.read()
setup(
name='tldp',
version='0.2',
license='MIT',
author='Martin A. Brown',
author_email='martin@linux-ip.net',
description='tools for processing all TLDP source documents',
long_description=readme,
packages=find_packages(),
test_suite='tests',
install_requires=['networkx',],
entry_points = {
'console_scripts': ['ldptool = tldp.driver:main',],
},
classifiers=[
'Development Status :: 3 - Alpha',
'Intended Audience :: Developers',
'License :: OSI Approved :: MIT License',
'Operating System :: OS Independent',
'Programming Language :: Python',
'Topic :: Software Development :: Documentation',
'Topic :: Software Development :: Libraries :: Python Modules',
],
)
| # -*- coding: utf-8 -*-
import os
from setuptools import setup, find_packages
with open(os.path.join(os.path.dirname(__file__), 'README.rst')) as r_file:
readme = r_file.read()
setup(
name='tldp',
version='0.2',
license='MIT',
author='Martin A. Brown',
author_email='martin@linux-ip.net',
description='tools for processing all TLDP source documents',
long_description=readme,
packages=find_packages(),
test_suite='tests',
install_requires=['networkx',],
entry_points = {
'console_scripts': ['ldptool = tldp.driver:run',],
},
classifiers=[
'Development Status :: 3 - Alpha',
'Intended Audience :: Developers',
'License :: OSI Approved :: MIT License',
'Operating System :: OS Independent',
'Programming Language :: Python',
'Topic :: Software Development :: Documentation',
'Topic :: Software Development :: Libraries :: Python Modules',
],
)
| mit | Python |
38c33a772532f33751dbbebe3ee0ecd0ad993616 | Fix migrations from text to inet. | MSPARP/newparp,MSPARP/newparp,MSPARP/newparp | alembic/versions/1fbbb727e1dc_change_last_ip_to_inet.py | alembic/versions/1fbbb727e1dc_change_last_ip_to_inet.py | """Change last_ip to inet.
Revision ID: 1fbbb727e1dc
Revises: 2dd8b091742b
Create Date: 2015-08-31 20:54:43.824788
"""
# revision identifiers, used by Alembic.
revision = '1fbbb727e1dc'
down_revision = '2dd8b091742b'
branch_labels = None
depends_on = None
from alembic import op
import sqlalchemy as sa
def upgrade():
# Default needs to be dropped because the old default of an empty string cannot be casted to an IP.
op.execute(u'alter table users alter column last_ip drop default;')
op.execute(u'alter table users alter column last_ip type inet using last_ip::inet;')
def downgrade():
### commands auto generated by Alembic - please adjust! ###
pass
### end Alembic commands ###
| """Change last_ip to inet.
Revision ID: 1fbbb727e1dc
Revises: 2dd8b091742b
Create Date: 2015-08-31 20:54:43.824788
"""
# revision identifiers, used by Alembic.
revision = '1fbbb727e1dc'
down_revision = '2dd8b091742b'
branch_labels = None
depends_on = None
from alembic import op
import sqlalchemy as sa
def upgrade():
### commands auto generated by Alembic - please adjust! ###
op.execute(u'alter table users alter column last_ip type inet using last_ip::inet;')
### end Alembic commands ###
def downgrade():
### commands auto generated by Alembic - please adjust! ###
pass
### end Alembic commands ###
| agpl-3.0 | Python |
615d76286b441ff563fde47524c8ff356edcc793 | Make login save cookies provided by server | daltonserey/tst,daltonserey/tst | tst/commands/login.py | tst/commands/login.py | from __future__ import print_function
import tst
import sys
import os
import webbrowser
import requests
from cachecontrol import CacheControl
from cachecontrol.caches.file_cache import FileCache
from tst.colors import *
from tst.utils import cprint, data2json, _assert
from tst.jsonfile import JsonFile
def main():
sitename = sys.argv[2] if len(sys.argv) > 2 else '_DEFAULT'
login(sitename)
def post(url, data):
s = requests.session()
s = CacheControl(s, cache=FileCache(os.path.expanduser('~/.tst/cache')))
try:
response = s.post(url, data=data2json(data), allow_redirects=True)
except requests.ConnectionError:
_assert(False, "Connection failed... check your internet connection")
if not response.ok:
cprint(LRED, "Login failed")
response.encoding = 'utf-8'
try:
token = response.json()
except ValueError:
_assert(False, "Server didn't send json")
return token
def login(sitename):
"""login in site"""
# fetch site urls
site = tst.get_site(sitename)
_assert(site is not None, "Site %s not found in config.yaml" % sitename)
login_url = site.login_url()
token_url = site.token_url()
_assert(login_url and token_url, "Site %s has no login urls" % site.name)
# open login url to user
cprint(LGREEN, "Get a code at: %s" % login_url)
webbrowser.open(login_url)
code = raw_input(LCYAN + "Code? " + RESET)
# exchange code for token
cprint(RESET, "Validating code: %s" % code)
cprint(YELLOW, token_url)
token = post(token_url, {"code": code})
# save token
tokens = JsonFile(os.path.expanduser('~/.tst/tokens.json'))
tokens[site.name] = token['tst_token']
tokens.writable = True
tokens.save()
# save cookies
cookies = token.get('cookies')
cookies_file = JsonFile(os.path.expanduser('~/.tst/cookies.json'))
cookies_file.writable = True
if cookies:
cprint(YELLOW, "Setting cookies: " + str(cookies))
cookies_file[site.name] = cookies
else:
if site.name in cookies_file:
cprint(YELLOW, "Removing previous cookie")
cookies_file.pop(site.name)
cookies_file.save()
cprint(LGREEN, "Logged in %s as %s" % (site.name, token['email']))
| from __future__ import print_function
import tst
import sys
import os
import webbrowser
import requests
from cachecontrol import CacheControl
from cachecontrol.caches.file_cache import FileCache
from tst.colors import *
from tst.utils import cprint, data2json, _assert
from tst.jsonfile import JsonFile
def main():
sitename = sys.argv[2] if len(sys.argv) > 2 else '_DEFAULT'
login(sitename)
def post(url, data):
s = requests.session()
s = CacheControl(s, cache=FileCache(os.path.expanduser('~/.tst/cache')))
try:
response = s.post(url, data=data2json(data), allow_redirects=True)
except requests.ConnectionError:
_assert(False, "Connection failed... check your internet connection")
if not response.ok:
cprint(LRED, "Login failed")
response.encoding = 'utf-8'
try:
token = response.json()
except ValueError:
_assert(False, "Server didn't send json")
return token
def login(sitename):
"""login in site"""
# fetch site urls
site = tst.get_site(sitename)
_assert(site is not None, "Site %s not found in config.yaml" % sitename)
login_url = site.login_url()
token_url = site.token_url()
_assert(login_url and token_url, "Site %s has no login urls" % site.name)
# open login url to user
cprint(LGREEN, "Get a code at: %s" % login_url)
webbrowser.open(login_url)
code = raw_input(LCYAN + "Code? " + RESET)
# exchange code for token
cprint(RESET, "Validating code: %s" % code)
token = post(token_url, {"code": code})
# save token
tokens = JsonFile(os.path.expanduser('~/.tst/tokens.json'))
tokens[site.name] = token['tst_token']
tokens.writable = True
tokens.save()
cprint(LGREEN, "Logged in %s as %s" % (site.name, token['email']))
| agpl-3.0 | Python |
2f9780aa11b9403445f399abf838d25d9cb4f120 | bump version to 0.4.8 on pypi | brianzq/att-bill-splitter | setup.py | setup.py | # -*- coding:utf-8 -*-
"""Setup for att-bill-splitter."""
from setuptools import find_packages, setup
setup(
name='att-bill-splitter',
# packages=['att-bill-splitter'],
version='0.4.8',
description='Parse AT&T bill and split wireless charges among users.',
author='Brian Zhang',
author_email='leapingzhang@gmail.com',
url='https://github.com/brianzq/att-bill-splitter',
# download_url=''
install_requires=[
'beautifulsoup4==4.5.1',
'click==6.6',
'future==0.16.0',
'peewee==2.8.4',
'python-slugify==1.2.1',
'requests',
'twilio==5.6.0',
'Unidecode==0.4.19',
],
packages=find_packages(),
extras_require={
'testing': [
'pytest>=2.9.2'
]
},
entry_points={
'console_scripts': [
'att-split-bill=attbillsplitter.entrypoints:split_bill',
'att-print-summary=attbillsplitter.entrypoints:print_summary',
'att-print-details=attbillsplitter.entrypoints:print_details',
'att-notify-users=attbillsplitter.entrypoints:notify_users',
'att-add-onetime-fee=attbillsplitter.entrypoints:add_onetime_fee',
'att-init-twilio=attbillsplitter.entrypoints:init_twilio',
'att-init-payment-msg=attbillsplitter.entrypoints:init_payment_msg'
],
},
zip_safe=False
)
| # -*- coding:utf-8 -*-
"""Setup for att-bill-splitter."""
from setuptools import find_packages, setup
setup(
name='att-bill-splitter',
# packages=['att-bill-splitter'],
version='0.4.7',
description='Parse AT&T bill and split wireless charges among users.',
author='Brian Zhang',
author_email='leapingzhang@gmail.com',
url='https://github.com/brianzq/att-bill-splitter',
# download_url=''
install_requires=[
'beautifulsoup4==4.5.1',
'click==6.6',
'future==0.16.0',
'peewee==2.8.4',
'python-slugify==1.2.1',
'requests',
'twilio==5.6.0',
'Unidecode==0.4.19',
],
packages=find_packages(),
extras_require={
'testing': [
'pytest>=2.9.2'
]
},
entry_points={
'console_scripts': [
'att-split-bill=attbillsplitter.entrypoints:split_bill',
'att-print-summary=attbillsplitter.entrypoints:print_summary',
'att-print-details=attbillsplitter.entrypoints:print_details',
'att-notify-users=attbillsplitter.entrypoints:notify_users',
'att-add-onetime-fee=attbillsplitter.entrypoints:add_onetime_fee',
'att-init-twilio=attbillsplitter.entrypoints:init_twilio',
'att-init-payment-msg=attbillsplitter.entrypoints:init_payment_msg'
],
},
zip_safe=False
)
| mit | Python |
66bf487d6031947291fd1aee532994900140466d | update version | mikicaivosevic/flask-cassandra-sessions | setup.py | setup.py | from distutils.core import setup
setup(
name = 'cassandra_flask_sessions',
packages = ['cassandra_flask_sessions'], # this must be the same as the name above
version = '0.3',
description = 'Server side sessions with Apache Cassandra',
author = 'Mikica Ivosevic',
author_email = 'mikica.ivosevic@gmail.com',
url = 'https://github.com/mikicaivosevic/flask-cassandra-sessions', # use the URL to the github repo
download_url = 'https://github.com/mikicaivosevic/flask-cassandra-sessions/archive/0.3.tar.gz', # I'll explain this in a second
keywords = ['flask', 'cassandra', 'sessions'],
classifiers = [],
) | from distutils.core import setup
setup(
name = 'cassandra_flask_sessions',
packages = ['cassandra_flask_sessions'], # this must be the same as the name above
version = '0.2',
description = 'Server side sessions with Apache Cassandra',
author = 'Mikica Ivosevic',
author_email = 'mikica.ivosevic@gmail.com',
url = 'https://github.com/mikicaivosevic/flask-cassandra-sessions', # use the URL to the github repo
download_url = 'https://github.com/mikicaivosevic/flask-cassandra-sessions/archive/0.2.tar.gz', # I'll explain this in a second
keywords = ['flask', 'cassandra', 'sessions'],
classifiers = [],
) | mit | Python |
fc1a9fa2e80863c879f666cf94e71b01574b4c48 | Fix Python 2 using codecs | subu-cliqz/annoy,pombredanne/annoy,spotify/annoy,tjrileywisc/annoy,eddelbuettel/annoy,BeifeiZhou/annoy,Houzz/annoy2,codeaudit/annoy,subu-cliqz/annoy,guitarmind/annoy,spotify/annoy,Houzz/annoy2,pombredanne/annoy,subu-cliqz/annoy,LongbinChen/annoy,pombredanne/annoy,tjrileywisc/annoy,eddelbuettel/annoy,pombredanne/annoy,tjrileywisc/annoy,BeifeiZhou/annoy,LongbinChen/annoy,spotify/annoy,tjrileywisc/annoy,BeifeiZhou/annoy,spotify/annoy,LongbinChen/annoy2,codeaudit/annoy,eddelbuettel/annoy,codeaudit/annoy,guitarmind/annoy,LongbinChen/annoy2,guitarmind/annoy,Houzz/annoy2,LongbinChen/annoy2,LongbinChen/annoy,eddelbuettel/annoy,subu-cliqz/annoy | setup.py | setup.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright (c) 2013 Spotify AB
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may not
# use this file except in compliance with the License. You may obtain a copy of
# the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations under
# the License.
from setuptools import setup, Extension
import codecs
import os
import sys
readme_note = """\
.. note::
For the latest source, discussion, etc, please visit the
`GitHub repository <https://github.com/spotify/annoy>`_\n\n
.. image:: https://img.shields.io/github/stars/spotify/annoy.svg
:target: https://github.com/spotify/annoy
"""
with codecs.open('README.rst', encoding='utf-8') as fobj:
long_description = readme_note + fobj.read()
setup(name='annoy',
version='1.4.1',
description='Approximate Nearest Neighbors in C++/Python optimized for memory usage and loading/saving to disk.',
packages=['annoy'],
ext_modules=[
Extension(
'annoy.annoylib', ['src/annoymodule.cc'],
depends=['src/annoylib.h'],
extra_compile_args=['-O3', '-march=native', '-ffast-math'],
)
],
long_description=long_description,
author='Erik Bernhardsson',
author_email='mail@erikbern.com',
url='https://github.com/spotify/annoy',
license='Apache License 2.0',
classifiers=[
'Development Status :: 5 - Production/Stable',
'Programming Language :: Python',
'Programming Language :: Python :: 2.6',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3.3',
'Programming Language :: Python :: 3.4',
],
keywords='nns, approximate nearest neighbor search',
setup_requires=['nose>=1.0']
)
| #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright (c) 2013 Spotify AB
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may not
# use this file except in compliance with the License. You may obtain a copy of
# the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations under
# the License.
from setuptools import setup, Extension
import os
import sys
readme_note = """\
.. note::
For the latest source, discussion, etc, please visit the
`GitHub repository <https://github.com/spotify/annoy>`_\n\n
.. image:: https://img.shields.io/github/stars/spotify/annoy.svg
:target: https://github.com/spotify/annoy
"""
with open('README.rst', encoding='utf-8') as fobj:
long_description = readme_note + fobj.read()
setup(name='annoy',
version='1.4.1',
description='Approximate Nearest Neighbors in C++/Python optimized for memory usage and loading/saving to disk.',
packages=['annoy'],
ext_modules=[
Extension(
'annoy.annoylib', ['src/annoymodule.cc'],
depends=['src/annoylib.h'],
extra_compile_args=['-O3', '-march=native', '-ffast-math'],
)
],
long_description=long_description,
author='Erik Bernhardsson',
author_email='mail@erikbern.com',
url='https://github.com/spotify/annoy',
license='Apache License 2.0',
classifiers=[
'Development Status :: 5 - Production/Stable',
'Programming Language :: Python',
'Programming Language :: Python :: 2.6',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3.3',
'Programming Language :: Python :: 3.4',
],
keywords='nns, approximate nearest neighbor search',
setup_requires=['nose>=1.0']
)
| apache-2.0 | Python |
44eb002fac1d164e61b3b34c063df6cbdb31e3ab | Add glob | lukassnoek/ICON2017,lukassnoek/ICON2017 | tutorial/functions.py | tutorial/functions.py | from glob import glob
import numpy as np
import os.path as op
def double_gamma(x, lag=6, a2=12, b1=0.9, b2=0.9, c=0.35):
a1 = lag
d1 = a1 * b1
d2 = a2 * b2
return np.array([(t/(d1))**a1 * np.exp(-(t-d1)/b1) - c*(t/(d2))**a2 * np.exp(-(t-d2)/b2) for t in x])
def single_gamma(x, lag=6, b=0.9):
a = lag
d = a * b
return (x/d)**a * np.exp(-(x-d)/b)
def return_some_objects():
obj1 = (5, 3, 2)
obj2 = True
obj3 = 5.3216
return(obj1, obj2, obj3)
def sort_nifti_paths(paths, idf='tstat'):
return sorted(paths, key=lambda x: int(op.basename(x).split('.')[0].split(idf)[-1]))
def glob_tstats():
return glob(op.join('..', 'data', 'pi0070', 'wm.feat', 'stats', 'tstat*.nii.gz')) | import numpy as np
import os.path as op
def double_gamma(x, lag=6, a2=12, b1=0.9, b2=0.9, c=0.35):
a1 = lag
d1 = a1 * b1
d2 = a2 * b2
return np.array([(t/(d1))**a1 * np.exp(-(t-d1)/b1) - c*(t/(d2))**a2 * np.exp(-(t-d2)/b2) for t in x])
def single_gamma(x, lag=6, b=0.9):
a = lag
d = a * b
return (x/d)**a * np.exp(-(x-d)/b)
def return_some_objects():
obj1 = (5, 3, 2)
obj2 = True
obj3 = 5.3216
return(obj1, obj2, obj3)
def sort_nifti_paths(paths, idf='tstat'):
return sorted(paths, key=lambda x: int(op.basename(x).split('.')[0].split(idf)[-1]))
| mit | Python |
6b6012e9109dc8852286c9afb91ab843c6ba32e2 | change order of imports | vortex-exoplanet/VIP,henry-ngo/VIP,carlgogo/vip_exoplanets | vip_hci/var/__init__.py | vip_hci/var/__init__.py | """
Subpackage ``var`` has helping functions such as:
- image filtering,
- shapes extraction (annulus, squares subimages, circular apertures),
- plotting,
- 2d fitting (Gaussian, Moffat).
"""
from __future__ import absolute_import
from .filters import *
from .fit_2d import *
from .plotting import *
from .shapes import *
| """
Subpackage ``var`` has helping functions such as:
- image filtering,
- shapes extraction (annulus, squares subimages, circular apertures),
- plotting,
- 2d fitting (Gaussian, Moffat).
"""
from __future__ import absolute_import
from .filters import *
from .fit_2d import *
from .shapes import *
from .plotting import *
| mit | Python |
701934b25257b956997a725e7465397d8384ebfc | Add check method to base vcs | dealertrack/flake8-diff,miki725/flake8-diff | flake8diff/vcs/base.py | flake8diff/vcs/base.py | from __future__ import unicode_literals, print_function
import re
from ..exceptions import VCSNotInstalledError
IS_PYTHON = re.compile(r'.*[.]py$')
class VCSBase(object):
name = None
def __init__(self, commits, options):
self.commits = commits
self.options = options
try:
self.vcs = self.get_vcs()
except:
raise VCSNotInstalledError(self.name)
def get_vcs(self):
"""
Get the binary executable of the vcs
"""
raise NotImplementedError
def is_used(self):
"""
If this VCS is used
"""
raise NotImplementedError
def changed_lines(self, filename):
"""
Get a list of all lines changed by this set of commits.
"""
raise NotImplementedError
def filter_file(self, filename):
"""
Function which given filename determines
if the file should be compared
"""
return IS_PYTHON.match(filename)
def changed_files(self):
"""
Return a list of all changed files.
"""
raise NotImplementedError
def check(self):
"""
Returns True if the configuration is correct or raises the exception
"""
return True
| from __future__ import unicode_literals, print_function
import re
from ..exceptions import VCSNotInstalledError
IS_PYTHON = re.compile(r'.*[.]py$')
class VCSBase(object):
name = None
def __init__(self, commits, options):
self.commits = commits
self.options = options
try:
self.vcs = self.get_vcs()
except:
raise VCSNotInstalledError(self.name)
def get_vcs(self):
"""
Get the binary executable of the vcs
"""
raise NotImplementedError
def is_used(self):
"""
If this VCS is used
"""
raise NotImplementedError
def changed_lines(self, filename):
"""
Get a list of all lines changed by this set of commits.
"""
raise NotImplementedError
def filter_file(self, filename):
"""
Function which given filename determines
if the file should be compared
"""
return IS_PYTHON.match(filename)
def changed_files(self):
"""
Return a list of all changed files.
"""
raise NotImplementedError
| mit | Python |
1e2721502f73a3d33ca5c78e5c81b2d915ae0d35 | debug metrlogy 2 | alibarkatali/module_web,alibarkatali/module_web,alibarkatali/module_web,alibarkatali/module_web,alibarkatali/module_web | db.py | db.py | # -*- coding: utf-8 -*-
import psycopg2, urlparse, re, os
import urlparse
DATABASE_URL="postgres://eoxdsmbgnnjprd:819342ac1961db6dceb37078f90e581b45743e34502382e75184184eae7b1948@ec2-23-21-220-152.compute-1.amazonaws.com:5432/decknecom629ch"
class Db:
"""Connexion à la base de données postgres de l'environnement Heroku."""
def __init__(self):
"""Initiate a connection to the default postgres database."""
urlparse.uses_netloc.append("imerir")
url = urlparse.urlparse(os.environ["DATABASE_URL"])
#url = urlparse.urlparse("postgresql://imerir:imerir@localhost/imerir")
print url
self.conn = psycopg2.connect(
database=url.path[1:],
user=url.username,
password=url.password,
host=url.hostname,
port=url.port
)
self.cur = self.conn.cursor()
def describeRow(self, row, columns, subkeys = None):
dRow = dict()
if subkeys == None:
for (i,cName) in enumerate(columns):
dRow[cName] = row[i]
else:
for (i,cName) in enumerate(columns):
k = cName if cName not in subkeys else subkeys[cName]
if k != "":
dRow[k] = row[i]
return dRow
def rowcount(self):
return self.cur.rowcount
def lastrowid(self):
return self.cur.lastrowid
def fetchall(self, subkeys = None):
rows = self.cur.fetchall()
if rows != None:
columns = map(lambda d: d[0], self.cur.description)
rows = [self.describeRow(row, columns, subkeys) for row in rows]
else:
rows = []
return rows
def fetchone(self, subkeys = None):
row = self.cur.fetchone()
if row != None:
columns = map(lambda d: d[0], self.cur.description)
row = self.describeRow(row, columns, subkeys)
return row
def execute(self, sql, sqlParams=None):
if sqlParams == None:
self.cur.execute(sql)
else:
sql = re.sub(r"@\(([^\)]+)\)", "%(\g<1>)s", sql)
self.cur.execute(sql, sqlParams)
self.conn.commit()
def select(self, sql, sqlParams=None, subkeys=None):
self.execute(sql, sqlParams)
return self.fetchall(subkeys)
def close(self):
self.cur.close()
self.conn.close()
def executeFile(self, filename):
f = file(filename, "r")
sql = f.read()
f.close()
self.execute(sql)
| # -*- coding: utf-8 -*-
import psycopg2, urlparse, re, os
import urlparse
#DATABASE_URL="postgres://eoxdsmbgnnjprd:819342ac1961db6dceb37078f90e581b45743e34502382e75184184eae7b1948@ec2-23-21-220-152.compute-1.amazonaws.com:5432/decknecom629ch"
class Db:
"""Connexion à la base de données postgres de l'environnement Heroku."""
def __init__(self):
"""Initiate a connection to the default postgres database."""
#urlparse.uses_netloc.append("imerir")
#url = urlparse.urlparse(os.environ["DATABASE_URL"])
url = urlparse.urlparse("postgresql://imerir:imerir@localhost/imerir")
print url
self.conn = psycopg2.connect(
database=url.path[1:],
user=url.username,
password=url.password,
host=url.hostname,
port=url.port
)
self.cur = self.conn.cursor()
def describeRow(self, row, columns, subkeys = None):
dRow = dict()
if subkeys == None:
for (i,cName) in enumerate(columns):
dRow[cName] = row[i]
else:
for (i,cName) in enumerate(columns):
k = cName if cName not in subkeys else subkeys[cName]
if k != "":
dRow[k] = row[i]
return dRow
def rowcount(self):
return self.cur.rowcount
def lastrowid(self):
return self.cur.lastrowid
def fetchall(self, subkeys = None):
rows = self.cur.fetchall()
if rows != None:
columns = map(lambda d: d[0], self.cur.description)
rows = [self.describeRow(row, columns, subkeys) for row in rows]
else:
rows = []
return rows
def fetchone(self, subkeys = None):
row = self.cur.fetchone()
if row != None:
columns = map(lambda d: d[0], self.cur.description)
row = self.describeRow(row, columns, subkeys)
return row
def execute(self, sql, sqlParams=None):
if sqlParams == None:
self.cur.execute(sql)
else:
sql = re.sub(r"@\(([^\)]+)\)", "%(\g<1>)s", sql)
self.cur.execute(sql, sqlParams)
self.conn.commit()
def select(self, sql, sqlParams=None, subkeys=None):
self.execute(sql, sqlParams)
return self.fetchall(subkeys)
def close(self):
self.cur.close()
self.conn.close()
def executeFile(self, filename):
f = file(filename, "r")
sql = f.read()
f.close()
self.execute(sql)
| mit | Python |
db99c05554cc9a1a8a03e558aad6bdcd8a439723 | Update favourite-music-example.py | nonkung51/IntentParser | examples/favourite-music-example.py | examples/favourite-music-example.py | import intentparser as ip
__author__ = 'Nonthakon Jitchiranant'
if __name__ == "__main__":
intent = ip.intentParser({
'description' : {
"type" : 'FavMusicIntent',
"args" : [(ip.OPTIONAL, "musics_types")],
"keyword" : [
(ip.REQUIRE, "musics_keyword"),
(ip.OPTIONAL, "musics_types")
]},
'musics_keyword' : ['is', 'are', 'music', 'favourite', 'genre'],
'musics_types' : [
"pop",
"rock",
"jazz",
"country",
"reggae"
]
})
intent.teachWords(["I love Reggae music.", "Rock is my favourite.", "I love Country music genre."])
print(intent.getResult("I love Rock music."))
print(intent.getResult("Jazz is my favourite."))
| import intentparser as ip
if __name__ == "__main__":
intent = ip.intentParser({
'description' : {
"type" : 'FavMusicIntent',
"args" : [(ip.OPTIONAL, "musics_types")],
"keyword" : [
(ip.REQUIRE, "musics_keyword"),
(ip.OPTIONAL, "musics_types")
]},
'musics_keyword' : ['is', 'are', 'music', 'favourite', 'genre'],
'musics_types' : [
"pop",
"rock",
"jazz",
"country",
"reggae"
]
})
intent.teachWords(["I love Reggae music.", "Rock is my favourite.", "I love Country music genre."])
print(intent.getResult("I love Rock music."))
print(intent.getResult("Jazz is my favourite."))
| apache-2.0 | Python |
03d13c9870796104f83400308f2308d538b8e8d5 | Use quadrant lower left | jhanley634/testing-tools,jhanley634/testing-tools,jhanley634/testing-tools,jhanley634/testing-tools,jhanley634/testing-tools,jhanley634/testing-tools,jhanley634/testing-tools | problem/pop_map/hexagon/example_terrain.py | problem/pop_map/hexagon/example_terrain.py | #! /usr/bin/env python
# Copyright 2020 John Hanley.
#
# Permission is hereby granted, free of charge, to any person obtaining a
# copy of this software and associated documentation files (the "Software"),
# to deal in the Software without restriction, including without limitation
# the rights to use, copy, modify, merge, publish, distribute, sublicense,
# and/or sell copies of the Software, and to permit persons to whom the
# Software is furnished to do so, subject to the following conditions:
# The above copyright notice and this permission notice shall be included in
# all copies or substantial portions of the Software.
# The software is provided "AS IS", without warranty of any kind, express or
# implied, including but not limited to the warranties of merchantability,
# fitness for a particular purpose and noninfringement. In no event shall
# the authors or copyright holders be liable for any claim, damages or
# other liability, whether in an action of contract, tort or otherwise,
# arising from, out of or in connection with the software or the use or
# other dealings in the software.
def _display_unicode_row(ch: str, n=4):
line = f'{ch} ' * n
print(f"{line}\n {line}\n{line}\n")
hex_horiz = '\u2394'
hex_pointy = '\u2b21'
black_horiz = '\u2b23'
black_pointy = '\u2b22'
x_super = '\u2093'
def display_unicode_example():
for hex in [hex_horiz, hex_pointy,
black_horiz, black_pointy]:
_display_unicode_row(hex)
def _sub(s: str, hx=hex_horiz):
s = s.replace('a', '\u2597') # Quadrant lower right
s = s.replace('b', '\u2596') # Quadrant lower left
return s.replace('x', hx)
def display_ascii_horiz_height2_example(n=3, reps=4):
line1 = r'/ab\__' * n
line2 = r'\__/ab' * n
for i in range(reps):
print('\n'.join(map(_sub, (line1, line2))))
def display_ascii_horiz_height3_example(n=3, reps=4, hex=hex_horiz):
line1 = (r' / \ y ' * n).replace('y', x_super)
line2 = r'( x )---' * n
line3 = r' \___/ . ' * n
for i in range(reps):
print('\n'.join((line1, line2, line3)))
if __name__ == '__main__':
display_unicode_example()
display_ascii_horiz_height2_example()
display_ascii_horiz_height3_example()
| #! /usr/bin/env python
# Copyright 2020 John Hanley.
#
# Permission is hereby granted, free of charge, to any person obtaining a
# copy of this software and associated documentation files (the "Software"),
# to deal in the Software without restriction, including without limitation
# the rights to use, copy, modify, merge, publish, distribute, sublicense,
# and/or sell copies of the Software, and to permit persons to whom the
# Software is furnished to do so, subject to the following conditions:
# The above copyright notice and this permission notice shall be included in
# all copies or substantial portions of the Software.
# The software is provided "AS IS", without warranty of any kind, express or
# implied, including but not limited to the warranties of merchantability,
# fitness for a particular purpose and noninfringement. In no event shall
# the authors or copyright holders be liable for any claim, damages or
# other liability, whether in an action of contract, tort or otherwise,
# arising from, out of or in connection with the software or the use or
# other dealings in the software.
def _display_unicode_row(ch: str, n=4):
line = f'{ch} ' * n
print(f"{line}\n {line}\n{line}\n")
hex_horiz = '\u2394'
hex_pointy = '\u2b21'
black_horiz = '\u2b23'
black_pointy = '\u2b22'
x_super = '\u2093'
def display_unicode_example():
for hex in [hex_horiz, hex_pointy,
black_horiz, black_pointy]:
_display_unicode_row(hex)
def _sub(s: str, hx=hex_horiz):
return s.replace('x', hx)
def display_ascii_horiz_height2_example(n=3, reps=4):
line1 = r'/ \__' * n
line2 = r'\__/ ' * n
for i in range(reps):
print('\n'.join(map(_sub, (line1, line2))))
def display_ascii_horiz_height3_example(n=3, reps=4, hex=hex_horiz):
line1 = (r' / \ y ' * n).replace('y', x_super)
line2 = r'( x )---' * n
line3 = r' \___/ . ' * n
for i in range(reps):
print('\n'.join((line1, line2, line3)))
if __name__ == '__main__':
display_unicode_example()
display_ascii_horiz_height2_example()
display_ascii_horiz_height3_example()
| mit | Python |
e35cbc26c63208739b4bc2e9881be2dee5aff50f | Bump version post-release | praekeltfoundation/docker-ci-deploy | setup.py | setup.py | import codecs
import os
from setuptools import setup, find_packages
HERE = os.path.abspath(os.path.dirname(__file__))
def read(*parts): # Stolen from txacme
with codecs.open(os.path.join(HERE, *parts), 'rb', 'utf-8') as f:
return f.read()
def readme():
# Prefer the ReStructuredText README, but fallback to Markdown if it hasn't
# been generated
if os.path.exists('README.rst'):
return read('README.rst')
else:
return read('README.md')
setup(
name='docker-ci-deploy',
version='0.3.1.dev0',
license='MIT',
url='https://github.com/praekeltfoundation/docker-ci-deploy',
description='Python script to help push Docker images to a registry using '
'CI services',
long_description=readme(),
author='Jamie Hewland',
author_email='jamie@praekelt.org',
maintainer='Praekelt.org SRE team',
maintainer_email='sre@praekelt.org',
classifiers=[
'Development Status :: 4 - Beta',
'License :: OSI Approved :: MIT License',
'Programming Language :: Python :: 2',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.4',
'Programming Language :: Python :: 3.5',
'Programming Language :: Python :: 3.6',
],
packages=find_packages(),
entry_points={
'console_scripts': [
'docker-ci-deploy = docker_ci_deploy.__main__:main',
'dcd = docker_ci_deploy.__main__:main',
]
}
)
| import codecs
import os
from setuptools import setup, find_packages
HERE = os.path.abspath(os.path.dirname(__file__))
def read(*parts): # Stolen from txacme
with codecs.open(os.path.join(HERE, *parts), 'rb', 'utf-8') as f:
return f.read()
def readme():
# Prefer the ReStructuredText README, but fallback to Markdown if it hasn't
# been generated
if os.path.exists('README.rst'):
return read('README.rst')
else:
return read('README.md')
setup(
name='docker-ci-deploy',
version='0.3.0',
license='MIT',
url='https://github.com/praekeltfoundation/docker-ci-deploy',
description='Python script to help push Docker images to a registry using '
'CI services',
long_description=readme(),
author='Jamie Hewland',
author_email='jamie@praekelt.org',
maintainer='Praekelt.org SRE team',
maintainer_email='sre@praekelt.org',
classifiers=[
'Development Status :: 4 - Beta',
'License :: OSI Approved :: MIT License',
'Programming Language :: Python :: 2',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.4',
'Programming Language :: Python :: 3.5',
'Programming Language :: Python :: 3.6',
],
packages=find_packages(),
entry_points={
'console_scripts': [
'docker-ci-deploy = docker_ci_deploy.__main__:main',
'dcd = docker_ci_deploy.__main__:main',
]
}
)
| mit | Python |
a266fd85d5843ff6a9b2ee33411ddd0e7f1b8439 | Bump version to 0.0.27 | thombashi/typepy | typepy/__version__.py | typepy/__version__.py | # encoding: utf-8
from datetime import datetime
__author__ = "Tsuyoshi Hombashi"
__copyright__ = "Copyright {}, {}".format(datetime.now().year, __author__)
__license__ = "MIT License"
__version__ = "0.0.27"
__maintainer__ = __author__
__email__ = "tsuyoshi.hombashi@gmail.com"
| # encoding: utf-8
from datetime import datetime
__author__ = "Tsuyoshi Hombashi"
__copyright__ = "Copyright {}, {}".format(datetime.now().year, __author__)
__license__ = "MIT License"
__version__ = "0.0.26"
__maintainer__ = __author__
__email__ = "tsuyoshi.hombashi@gmail.com"
| mit | Python |
89cda8553c662ac7b435516d888706e3f3193cb7 | Fix the unknown entity type test | jeffweeksio/sir | sir/__main__.py | sir/__main__.py | import argparse
from .schema import SCHEMA
def reindex(args):
known_entities = SCHEMA.keys()
if args['entities'] is not None:
entities = []
for e in args['entities']:
entities.extend(e.split(','))
unknown_entities = set(entities) - set(known_entities)
if unknown_entities:
raise ValueError("{0} are unkown entity types".format(unknown_entities))
else:
entities = known_entities
print(entities)
def watch(args):
raise NotImplementedError
def main():
parser = argparse.ArgumentParser()
subparsers = parser.add_subparsers()
reindex_parser = subparsers.add_parser("reindex", help="Reindexes all or a single entity type")
reindex_parser.set_defaults(func=reindex)
reindex_parser.add_argument('--entities', action='append', help='The entities to reindex' )
watch_parser = subparsers.add_parser("watch", help="Watches for incoming messages on an AMQP queue")
watch_parser.set_defaults(func=watch)
args = parser.parse_args()
args.func(vars(args))
if __name__ == '__main__':
main() | import argparse
from .schema import SCHEMA
def reindex(args):
known_entities = SCHEMA.keys()
if args['entities'] is not None:
entities = []
for e in args['entities']:
entities.extend(e.split(','))
unknown_entities = set(known_entities) - set(entities)
if unknown_entities:
raise ValueError("{0} are unkown entity types".format(unknown_entities))
else:
entities = known_entities
print(entities)
def watch(args):
raise NotImplementedError
def main():
parser = argparse.ArgumentParser()
subparsers = parser.add_subparsers()
reindex_parser = subparsers.add_parser("reindex", help="Reindexes all or a single entity type")
reindex_parser.set_defaults(func=reindex)
reindex_parser.add_argument('--entities', action='append', help='The entities to reindex' )
watch_parser = subparsers.add_parser("watch", help="Watches for incoming messages on an AMQP queue")
watch_parser.set_defaults(func=watch)
args = parser.parse_args()
args.func(vars(args))
if __name__ == '__main__':
main() | mit | Python |
bc177d920458acc1222be7a9810c24e65ed0abe5 | Hide "fatal: Not a git repository" error message. | xmms2/xmms2-stable,xmms2/xmms2-stable,dreamerc/xmms2,theeternalsw0rd/xmms2,oneman/xmms2-oneman-old,oneman/xmms2-oneman,dreamerc/xmms2,oneman/xmms2-oneman,theefer/xmms2,theefer/xmms2,krad-radio/xmms2-krad,oneman/xmms2-oneman-old,chrippa/xmms2,six600110/xmms2,chrippa/xmms2,theeternalsw0rd/xmms2,mantaraya36/xmms2-mantaraya36,chrippa/xmms2,theefer/xmms2,oneman/xmms2-oneman,theefer/xmms2,chrippa/xmms2,xmms2/xmms2-stable,oneman/xmms2-oneman-old,six600110/xmms2,chrippa/xmms2,mantaraya36/xmms2-mantaraya36,mantaraya36/xmms2-mantaraya36,oneman/xmms2-oneman,krad-radio/xmms2-krad,oneman/xmms2-oneman,oneman/xmms2-oneman-old,dreamerc/xmms2,six600110/xmms2,theeternalsw0rd/xmms2,krad-radio/xmms2-krad,dreamerc/xmms2,xmms2/xmms2-stable,krad-radio/xmms2-krad,six600110/xmms2,theefer/xmms2,theefer/xmms2,theeternalsw0rd/xmms2,oneman/xmms2-oneman,xmms2/xmms2-stable,xmms2/xmms2-stable,mantaraya36/xmms2-mantaraya36,oneman/xmms2-oneman,krad-radio/xmms2-krad,theefer/xmms2,mantaraya36/xmms2-mantaraya36,six600110/xmms2,krad-radio/xmms2-krad,mantaraya36/xmms2-mantaraya36,chrippa/xmms2,six600110/xmms2,mantaraya36/xmms2-mantaraya36,theeternalsw0rd/xmms2,dreamerc/xmms2,oneman/xmms2-oneman-old,theeternalsw0rd/xmms2 | waftools/gittools.py | waftools/gittools.py | import os
import sha
def gitsha(path):
h = sha.sha()
data = file(path).read()
h.update("blob %d\0" % len(data))
h.update(data)
return h.hexdigest()
def git_info():
commithash = os.popen('git-rev-parse --verify HEAD 2>/dev/null').read().strip()
if not commithash:
raise ValueError("Couldn't get hash")
if os.getuid() == os.stat(".git/index").st_uid:
os.system('git-update-index --refresh >/dev/null')
else:
print "NOT updating git cache, local changes might not be detected"
changed = bool(os.popen('git-diff-index -r HEAD').read())
return commithash, changed
def snapshot_info():
info = file('commithash').read().split('\n')
commithash = info[0]
changed = False
for line in [a for a in info[2:] if a]:
[mode, tag, sha, path] = line.split(None, 4)
if tag != 'blob':
continue
if gitsha(path) != sha:
changed = True
break
return commithash, changed
def get_info():
try:
return git_info()
except:
try:
return snapshot_info()
except:
return 'Unknown', False
def get_info_str():
commithash, changed = get_info()
if changed:
changed = " + local changes"
else:
changed = ""
return "%s%s" % (commithash, changed)
| import os
import sha
def gitsha(path):
h = sha.sha()
data = file(path).read()
h.update("blob %d\0" % len(data))
h.update(data)
return h.hexdigest()
def git_info():
commithash = os.popen('git-rev-parse --verify HEAD').read().strip()
if os.getuid() == os.stat(".git/index").st_uid:
os.system('git-update-index --refresh >/dev/null')
else:
print "NOT updating git cache, local changes might not be detected"
changed = bool(os.popen('git-diff-index -r HEAD').read())
return commithash, changed
def snapshot_info():
info = file('commithash').read().split('\n')
commithash = info[0]
changed = False
for line in [a for a in info[2:] if a]:
[mode, tag, sha, path] = line.split(None, 4)
if tag != 'blob':
continue
if gitsha(path) != sha:
changed = True
break
return commithash, changed
def get_info():
try:
return git_info()
except:
try:
return snapshot_info()
except:
return 'Unknown', False
def get_info_str():
commithash, changed = get_info()
if changed:
changed = " + local changes"
else:
changed = ""
return "%s%s" % (commithash, changed)
| lgpl-2.1 | Python |
fdb0c41d585ee963e2e0315f78c81c279e8e3172 | add missing end of line | inclement/kivy,akshayaurora/kivy,akshayaurora/kivy,rnixx/kivy,matham/kivy,matham/kivy,rnixx/kivy,matham/kivy,matham/kivy,kivy/kivy,kivy/kivy,inclement/kivy,kivy/kivy,inclement/kivy,akshayaurora/kivy,rnixx/kivy | examples/miscellaneous/imagesave.py | examples/miscellaneous/imagesave.py | # save an image into bytesio
from kivy.core.image import Image
from io import BytesIO
img = Image.load("data/logo/kivy-icon-512.png")
bio = BytesIO()
ret = img.save(bio, fmt="png")
print("len=", len(bio.read()))
bio = BytesIO()
ret = img.save(bio, fmt="jpg")
print("len=", len(bio.read()))
| # save an image into bytesio
from kivy.core.image import Image
from io import BytesIO
img = Image.load("data/logo/kivy-icon-512.png")
bio = BytesIO()
ret = img.save(bio, fmt="png")
print("len=", len(bio.read()))
bio = BytesIO()
ret = img.save(bio, fmt="jpg")
print("len=", len(bio.read())) | mit | Python |
44c25031cf64e0e8dc34597e5b9129809e11e42a | Prepare openprocurement.auctions.flash 1.2.1. | openprocurement/openprocurement.auctions.flash | setup.py | setup.py | from setuptools import setup, find_packages
import os
version = '1.2.1'
entry_points = {
'openprocurement.auctions.core.plugins': [
'auctions.flash = openprocurement.auctions.flash.includeme:includeme'
],
'openprocurement.auctions.flash.plugins': [
'flash.migration = openprocurement.auctions.flash.migration:migrate_data'
],
'openprocurement.tests': [
'auctions.flash = openprocurement.auctions.flash.tests.main:suite'
]
}
requires = [
'setuptools',
'openprocurement.auctions.core',
'openprocurement.schemas.dgf',
'schematics-flexible'
]
test_requires = requires + []
setup(
name='openprocurement.auctions.flash',
version=version,
description="",
long_description=open("README.rst").read() + "\n" + open(os.path.join("docs", "HISTORY.txt")).read(),
# Get more strings from
# http://pypi.python.org/pypi?:action=list_classifiers
classifiers=[
"Programming Language :: Python",
],
keywords='',
author='Quintagroup, Ltd.',
author_email='info@quintagroup.com',
license='Apache License 2.0',
url='https://github.com/openprocurement/openprocurement.auctions.flash',
packages=find_packages(exclude=['ez_setup']),
namespace_packages=['openprocurement', 'openprocurement.auctions'],
include_package_data=True,
zip_safe=False,
extras_require={'test': test_requires},
install_requires=requires,
test_require=test_requires,
entry_points=entry_points,
)
| from setuptools import setup, find_packages
import os
version = '1.2'
entry_points = {
'openprocurement.auctions.core.plugins': [
'auctions.flash = openprocurement.auctions.flash.includeme:includeme'
],
'openprocurement.auctions.flash.plugins': [
'flash.migration = openprocurement.auctions.flash.migration:migrate_data'
],
'openprocurement.tests': [
'auctions.flash = openprocurement.auctions.flash.tests.main:suite'
]
}
requires = [
'setuptools',
'openprocurement.auctions.core',
'openprocurement.schemas.dgf',
'schematics-flexible'
]
test_requires = requires + []
setup(
name='openprocurement.auctions.flash',
version=version,
description="",
long_description=open("README.rst").read() + "\n" + open(os.path.join("docs", "HISTORY.txt")).read(),
# Get more strings from
# http://pypi.python.org/pypi?:action=list_classifiers
classifiers=[
"Programming Language :: Python",
],
keywords='',
author='Quintagroup, Ltd.',
author_email='info@quintagroup.com',
license='Apache License 2.0',
url='https://github.com/openprocurement/openprocurement.auctions.flash',
packages=find_packages(exclude=['ez_setup']),
namespace_packages=['openprocurement', 'openprocurement.auctions'],
include_package_data=True,
zip_safe=False,
extras_require={'test': test_requires},
install_requires=requires,
test_require=test_requires,
entry_points=entry_points,
)
| apache-2.0 | Python |
ba2316b313b1de0e900f8a801a25734c142cb0e4 | add library dependencies. | tonyseek/flask-docker | setup.py | setup.py | import os
from setuptools import setup
with open(os.path.join(os.path.dirname(__file__), 'README.rst')) as readme:
next(readme)
long_description = ''.join(readme).strip()
setup(
name='Flask-Docker',
description='Uses Docker client in your Flask application.',
long_description=long_description,
version='0.1.0',
author='Jiangge Zhang',
author_email='tonyseek@gmail.com',
url='https://github.com/tonyseek/flask-docker',
license='MIT',
classifiers=[
'Development Status :: 3 - Alpha',
'Environment :: Web Environment',
'Framework :: Flask',
'Intended Audience :: Developers',
'License :: OSI Approved :: MIT License',
'Operating System :: OS Independent',
'Programming Language :: Python :: 2',
'Programming Language :: Python :: 2.6',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.3',
'Programming Language :: Python :: 3.4',
'Topic :: Software Development :: Libraries',
'Topic :: Utilities',
],
py_modules=['flask_docker'],
install_requires=['flask', 'docker-py'],
platforms=['Any'])
| import os
from setuptools import setup
with open(os.path.join(os.path.dirname(__file__), 'README.rst')) as readme:
next(readme)
long_description = ''.join(readme).strip()
setup(
name='Flask-Docker',
description='Uses Docker client in your Flask application.',
long_description=long_description,
version='0.1.0',
author='Jiangge Zhang',
author_email='tonyseek@gmail.com',
url='https://github.com/tonyseek/flask-docker',
license='MIT',
classifiers=[
'Development Status :: 3 - Alpha',
'Environment :: Web Environment',
'Framework :: Flask',
'Intended Audience :: Developers',
'License :: OSI Approved :: MIT License',
'Operating System :: OS Independent',
'Programming Language :: Python :: 2',
'Programming Language :: Python :: 2.6',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.3',
'Programming Language :: Python :: 3.4',
'Topic :: Software Development :: Libraries',
'Topic :: Utilities',
],
py_modules=['flask_docker'],
platforms=['Any'])
| mit | Python |
8fedd01a41123c7045dfde17e39171afeab6c61a | Update __init__.py | adamcharnock/django-tz-detect,adamcharnock/django-tz-detect,adamcharnock/django-tz-detect | tz_detect/__init__.py | tz_detect/__init__.py | VERSION = (0, 2, 5)
__version__ = '.'.join([str(n) for n in VERSION])
| __version__ = "0.2.5"
| mit | Python |
ab0cdf18d72acb28cac83ea11453bf66aef2726f | bump version in setup.py (no refs) | Opentopic/falcon-api | setup.py | setup.py | from setuptools import find_packages, setup
setup(
name='opentopic-falcon-api',
version='0.4.4',
author='Tomasz Roszko',
author_email='tom@opentopic.com',
description='Base Library for services api endpoints',
url='http://git.opentopic.com/backend/falcon-api',
license='GNU GENERAL PUBLIC LICENSE',
platforms=['OS Independent'],
packages=find_packages(),
include_package_data=True,
classifiers=[
'Development Status :: 4 - Beta',
'Environment :: Web Environment',
'Intended Audience :: Developers',
'License :: OSI Approved :: BSD License',
'Operating System :: OS Independent',
'Programming Language :: Python :: 3.x',
],
install_requires=[
'falcon>=1.0.0',
'python-rapidjson>=0.0.6',
],
tests_require=[
'mongoengine==0.10.6',
'SQLAlchemy>=1.0.12',
'elasticsearch-dsl==2.1.0',
'elasticsearch==2.3.0'
],
)
| from setuptools import find_packages, setup
setup(
name='opentopic-falcon-api',
version='0.4.3',
author='Tomasz Roszko',
author_email='tom@opentopic.com',
description='Base Library for services api endpoints',
url='http://git.opentopic.com/backend/falcon-api',
license='GNU GENERAL PUBLIC LICENSE',
platforms=['OS Independent'],
packages=find_packages(),
include_package_data=True,
classifiers=[
'Development Status :: 4 - Beta',
'Environment :: Web Environment',
'Intended Audience :: Developers',
'License :: OSI Approved :: BSD License',
'Operating System :: OS Independent',
'Programming Language :: Python :: 3.x',
],
install_requires=[
'falcon>=1.0.0',
'python-rapidjson>=0.0.6',
],
tests_require=[
'mongoengine==0.10.6',
'SQLAlchemy>=1.0.12',
'elasticsearch-dsl==2.1.0',
'elasticsearch==2.3.0'
],
)
| mit | Python |
bcc206b46c089ea7f7ea5dfbc5c8b11a1fe72447 | Add self-rating flag for movies. Removed LikedOrNot table | osama-haggag/movie-time,osama-haggag/movie-time | movie_time_app/models.py | movie_time_app/models.py | from django.db import models
# Create your models here.
class Movie(models.Model):
movie_id = models.IntegerField(primary_key=True)
title = models.CharField(max_length=200)
poster = models.ImageField(null=True, blank=True)
year = models.IntegerField(null=True)
genres = models.CharField(max_length=200)
num_ratings = models.IntegerField(null=True)
rating_median = models.FloatField(null=True)
rating_mean = models.FloatField(null=True)
relatable = models.BooleanField(default=True)
liked_or_not = models.NullBooleanField(null=True, blank=True)
def __str__(self):
return self.title
class Similarity(models.Model):
first_movie = models.ForeignKey(Movie, related_name='first_movie')
second_movie = models.ForeignKey(Movie, related_name='second_movie')
similarity_score = models.FloatField()
class Tag(models.Model):
movie = models.ForeignKey(Movie)
tag = models.CharField(max_length=50)
relevance = models.FloatField()
class OnlineLink(models.Model):
movie = models.ForeignKey(Movie)
imdb_id = models.CharField(max_length=50)
| from django.db import models
# Create your models here.
class Movie(models.Model):
movie_id = models.IntegerField(primary_key=True)
title = models.CharField(max_length=200)
poster = models.ImageField(null=True, blank=True)
year = models.IntegerField(null=True)
genres = models.CharField(max_length=200)
num_ratings = models.IntegerField(null=True)
rating_median = models.FloatField(null=True)
rating_mean = models.FloatField(null=True)
relatable = models.BooleanField(default=True)
def __str__(self):
return self.title
class LikedOrNot(models.Model):
movie = models.ForeignKey(Movie)
liked_or_not = models.SmallIntegerField(null=True, blank=True,
choices=((-1, "bad"), (0, "alright"), (1, "liked")))
class Similarity(models.Model):
first_movie = models.ForeignKey(Movie, related_name='first_movie')
second_movie = models.ForeignKey(Movie, related_name='second_movie')
similarity_score = models.FloatField()
class Tag(models.Model):
movie = models.ForeignKey(Movie)
tag = models.CharField(max_length=50)
relevance = models.FloatField()
class OnlineLink(models.Model):
movie = models.ForeignKey(Movie)
imdb_id = models.CharField(max_length=50)
| mit | Python |
2938599ec7531c43acd5faac1aad78614c4a1274 | Update setup py again | openclimatedata/pymagicc,openclimatedata/pymagicc | setup.py | setup.py | """
pymagicc
Thin Python wrapper around the
reduced complexity climate model MAGICC6 (http://magicc.org/).
Install using
pip install pymagicc
On Linux and macOS Wine (https://www.winehq.org) needs to be installed (usually
available with your package manager).
Find usage instructions in the
GitHub repository at https://github.com/openclimatedata/pymagicc.
"""
import versioneer
import os
from setuptools import setup, find_packages
from setuptools.command.test import test as TestCommand
path = os.path.abspath(os.path.dirname(__file__))
class PyTest(TestCommand):
def finalize_options(self):
TestCommand.finalize_options(self)
self.test_args = []
self.test_suite = True
def run_tests(self):
import pytest
pytest.main(self.test_args)
with open(os.path.join(path, "README.rst"), "r") as f:
readme = f.read()
cmdclass = versioneer.get_cmdclass()
cmdclass.update({"test": PyTest})
install_requirements = [
"pandas",
"pandas-datapackage-reader",
"f90nml",
"pyam-iamc",
"PyYAML",
]
extra_requirements = {"test": ["pytest", "pytest-cov", "codecov", "goodtables"]}
setup(
name="pymagicc",
version=versioneer.get_version(),
description="Python wrapper for the simple climate model MAGICC",
long_description=readme,
long_description_content_type="text/x-rst",
author="Robert Gieseke",
author_email="robert.gieseke@pik-potsdam.de",
url="https://github.com/openclimatedata/pymagicc",
license="GNU Affero General Public License v3",
keywords=[],
classifiers=[
"Development Status :: 4 - Beta",
"Intended Audience :: Developers",
"Operating System :: OS Independent",
"Programming Language :: Python :: 3.5",
"Programming Language :: Python :: 3.6",
"Programming Language :: Python :: 3.7",
],
packages=find_packages(exclude=["tests"]),
package_data={
"": ["*.csv"],
"pymagicc": [
"MAGICC6/*.txt",
"MAGICC6/out/.gitkeep",
"MAGICC6/run/*.CFG",
"MAGICC6/run/*.exe",
"MAGICC6/run/*.IN",
"MAGICC6/run/*.MON",
"MAGICC6/run/*.prn",
"MAGICC6/run/*.SCEN",
],
},
include_package_data=True,
install_requires=install_requirements,
extras_require=extra_requirements,
cmdclass=cmdclass,
)
| """
pymagicc
Thin Python wrapper around the
reduced complexity climate model MAGICC6 (http://magicc.org/).
Install using
pip install pymagicc
On Linux and macOS Wine (https://www.winehq.org) needs to be installed (usually
available with your package manager).
Find usage instructions in the
GitHub repository at https://github.com/openclimatedata/pymagicc.
"""
import versioneer
import os
from setuptools import setup, find_packages
from setuptools.command.test import test as TestCommand
path = os.path.abspath(os.path.dirname(__file__))
class PyTest(TestCommand):
def finalize_options(self):
TestCommand.finalize_options(self)
self.test_args = []
self.test_suite = True
def run_tests(self):
import pytest
pytest.main(self.test_args)
with open(os.path.join(path, "README.rst"), "r") as f:
readme = f.read()
cmdclass = versioneer.get_cmdclass()
cmdclass.update({"test": PyTest})
install_requirements = [
"pandas",
"pandas-datapackage-reader",
"f90nml",
"pyam-iamc",
"PyYAML"
]
test_requirements = [
"pytest",
"pytest-cov",
"codecov",
"goodtables",
]
setup(
name="pymagicc",
version=versioneer.get_version(),
description="Python wrapper for the simple climate model MAGICC",
long_description=readme,
long_description_content_type="text/x-rst",
author="Robert Gieseke",
author_email="robert.gieseke@pik-potsdam.de",
url="https://github.com/openclimatedata/pymagicc",
license="GNU Affero General Public License v3",
keywords=[],
classifiers=[
"Development Status :: 4 - Beta",
"Intended Audience :: Developers",
"Operating System :: OS Independent",
"Programming Language :: Python :: 3.5",
"Programming Language :: Python :: 3.6",
"Programming Language :: Python :: 3.7",
],
packages=find_packages(exclude=["tests"]),
package_data={
"": ["*.csv"],
"pymagicc": [
"MAGICC6/*.txt",
"MAGICC6/out/.gitkeep",
"MAGICC6/run/*.CFG",
"MAGICC6/run/*.exe",
"MAGICC6/run/*.IN",
"MAGICC6/run/*.MON",
"MAGICC6/run/*.prn",
"MAGICC6/run/*.SCEN",
],
},
include_package_data=True,
install_requires=install_requirements,
tests_require=test_requirements,
cmdclass=cmdclass,
)
| agpl-3.0 | Python |
f24b9e8405313fb46656df30b9055cf31d998703 | Update python version to 3.6 in setup.py | heprom/pymicro | setup.py | setup.py | import sys
import os
import setuptools
import pymicro
with open('README.rst', 'r') as f:
long_description = f.read()
try:
from distutils.command.build_py import build_py2to3 as build_py
from distutils.command.build import build
except ImportError:
from distutils.command.build_py import build_py
from distutils.command.build import build
## Load requirements.txt and format for setuptools.setup
requirements = []
dependency_links = []
here = os.path.abspath( os.path.dirname(__file__))
with open( os.path.join(here, "requirements.txt")) as fid:
content = fid.read().split("\n")
for line in content:
if line.startswith( "#" ) or line.startswith( " " ) or line=="":
continue
elif line.startswith( "-e" ):
pname = line.split("#egg=")[1]
req_line = "{} @ {}".format( pname, line[3:] )
requirements.append( req_line )
dep_line = line.replace("-e", "").strip()
dependency_links.append( dep_line )
else:
requirements.append( line )
## DISABLE C++ part compilation for basic-tools
os.environ["BASICTOOLS_DISABLE_MKL"] = "1"
os.environ["BASICTOOLS_DISABLE_OPENMP"] = "1"
all_packages = setuptools.find_packages(".", exclude=("examples","examples.*")) + ["pymicro." + x for x in setuptools.find_packages(".", exclude=("pymicro", "pymicro.*"))]
setuptools.setup(
name="pymicro",
version=pymicro.__version__,
author="Henry Proudhon",
author_email="henry.proudhon@mines-paristech.fr",
description="An open-source Python package to work with material microstructures and 3d data sets",
long_description=long_description,
long_description_content_type="text/x-rst",
url="https://github.com/heprom/pymicro",
packages=all_packages,
classifiers=[
"Programming Language :: Python :: 3",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
"Development Status :: 4 - Beta",
],
python_requires='>=3.6',
install_requires=requirements,
dependency_links=dependency_links,
include_package_data=False,
package_dir={'pymicro.examples': 'examples'},
package_data = {'': ['*.png', '*.gif'],
'pymicro.examples': ['data/*']},
license="MIT license",
cmdclass={'build':build}
)
| import sys
import os
import setuptools
import pymicro
with open('README.rst', 'r') as f:
long_description = f.read()
try:
from distutils.command.build_py import build_py2to3 as build_py
from distutils.command.build import build
except ImportError:
from distutils.command.build_py import build_py
from distutils.command.build import build
## Load requirements.txt and format for setuptools.setup
requirements = []
dependency_links = []
here = os.path.abspath( os.path.dirname(__file__))
with open( os.path.join(here, "requirements.txt")) as fid:
content = fid.read().split("\n")
for line in content:
if line.startswith( "#" ) or line.startswith( " " ) or line=="":
continue
elif line.startswith( "-e" ):
pname = line.split("#egg=")[1]
req_line = "{} @ {}".format( pname, line[3:] )
requirements.append( req_line )
dep_line = line.replace("-e", "").strip()
dependency_links.append( dep_line )
else:
requirements.append( line )
## DISABLE C++ part compilation for basic-tools
os.environ["BASICTOOLS_DISABLE_MKL"] = "1"
os.environ["BASICTOOLS_DISABLE_OPENMP"] = "1"
all_packages = setuptools.find_packages(".", exclude=("examples","examples.*")) + ["pymicro." + x for x in setuptools.find_packages(".", exclude=("pymicro", "pymicro.*"))]
setuptools.setup(
name="pymicro",
version=pymicro.__version__,
author="Henry Proudhon",
author_email="henry.proudhon@mines-paristech.fr",
description="An open-source Python package to work with material microstructures and 3d data sets",
long_description=long_description,
long_description_content_type="text/x-rst",
url="https://github.com/heprom/pymicro",
packages=all_packages,
classifiers=[
"Programming Language :: Python :: 3",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
"Development Status :: 4 - Beta",
],
python_requires='>=3.5',
install_requires=requirements,
dependency_links=dependency_links,
include_package_data=False,
package_dir={'pymicro.examples': 'examples'},
package_data = {'': ['*.png', '*.gif'],
'pymicro.examples': ['data/*']},
license="MIT license",
cmdclass={'build':build}
)
| mit | Python |
38b866b2d9b65ce1ff85dc58cc1faa0b140712a0 | Bump version number | trilan/lemon-tinymce,trilan/lemon-tinymce | setup.py | setup.py | from setuptools import setup, find_packages
setup(
name = 'lemon-tinymce',
version = '2.1.1',
url = 'https://github.com/trilan/lemon-tinymce',
author = 'Trilan Team',
author_email = 'dev@lemon.io',
description = 'A Django application that contains a widget to render a ' \
'form field as a TinyMCE editor.',
packages = find_packages(exclude=['demoproject', 'demoproject.*']),
include_package_data = True,
zip_safe = False,
)
| from setuptools import setup, find_packages
setup(
name = 'lemon-tinymce',
version = '2.1',
url = 'https://github.com/trilan/lemon-tinymce',
author = 'Trilan Team',
author_email = 'dev@lemon.io',
description = 'A Django application that contains a widget to render a ' \
'form field as a TinyMCE editor.',
packages = find_packages(exclude=['demoproject', 'demoproject.*']),
include_package_data = True,
zip_safe = False,
)
| mit | Python |
801b429ed04d0231c7bfb3b3ebeb797ac412af30 | test data cleanup | ldtri0209/robotframework,waldenner/robotframework,ldtri0209/robotframework,waldenner/robotframework,waldenner/robotframework,fiuba08/robotframework,waldenner/robotframework,fiuba08/robotframework,ldtri0209/robotframework,fiuba08/robotframework,waldenner/robotframework,fiuba08/robotframework,fiuba08/robotframework,ldtri0209/robotframework,ldtri0209/robotframework | tools/remoteserver/test/atest/arguments.py | tools/remoteserver/test/atest/arguments.py | class MyObject:
def __init__(self, index=0):
self.index = index
def __str__(self):
return '<MyObject%s>' % (self.index or '')
UNICODE = (u'Hyv\u00E4\u00E4 y\u00F6t\u00E4. '
u'\u0421\u043F\u0430\u0441\u0438\u0431\u043E!')
LIST_WITH_OBJECTS = [MyObject(1), MyObject(2)]
NESTED_LIST = [[True, False], [[1, None, MyObject(), {}]]]
NESTED_TUPLE = ((True, False), [(1, None, MyObject(), {})])
DICT_WITH_OBJECTS = {'As value': MyObject(1), MyObject(2): 'As key'}
NESTED_DICT = {1: {None: False},
2: {'A': {'n': None},
'B': {'o': MyObject(), 'e': {}}}}
| # Can be used in the test data like ${MyObject()} or ${MyObject(1)}
class MyObject:
def __init__(self, index=''):
self.index = index
def __str__(self):
return '<MyObject%s>' % self.index
UNICODE = (u'Hyv\u00E4\u00E4 y\u00F6t\u00E4. '
u'\u0421\u043F\u0430\u0441\u0438\u0431\u043E!')
LIST_WITH_OBJECTS = [MyObject(1), MyObject(2)]
NESTED_LIST = [ [True, False], [[1, None, MyObject(), {}]] ]
NESTED_TUPLE = ( (True, False), [(1, None, MyObject(), {})] )
DICT_WITH_OBJECTS = {'As value': MyObject(1), MyObject(2): 'As key'}
NESTED_DICT = { 1: {None: False},
2: {'A': {'n': None},
'B': {'o': MyObject(), 'e': {}}} }
| apache-2.0 | Python |
103d8feab7671d0bfab224e3655fa5adae73f747 | update sklearn version | nicodv/kmodes | setup.py | setup.py | from setuptools import setup, find_packages
import kmodes
DESCRIPTION = kmodes.__doc__
VERSION = kmodes.__version__
setup(
name='kmodes',
packages=find_packages(exclude=[
'*.tests',
'*.tests.*',
]),
version=VERSION,
url='https://github.com/nicodv/kmodes',
author='Nico de Vos',
author_email='njdevos@gmail.com',
license='MIT',
summary='Python implementations of the k-modes and k-prototypes clustering '
'algorithms, for clustering categorical data.',
description=DESCRIPTION,
long_description=open('README.rst', 'r').read(),
install_requires=[
'numpy>=1.13.0, <1.14.0',
'scikit-learn>=0.19.0, <0.20.0',
'scipy>=0.19.0, <0.20.0',
],
classifiers=['Development Status :: 3 - Alpha',
'Intended Audience :: Science/Research',
'License :: OSI Approved :: MIT License',
'Operating System :: Microsoft :: Windows',
'Operating System :: Unix',
'Operating System :: MacOS',
'Programming Language :: Python',
'Programming Language :: Python :: 2',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.4',
'Programming Language :: Python :: 3.5',
'Programming Language :: Python :: 3.6',
'Topic :: Scientific/Engineering'],
)
| from setuptools import setup, find_packages
import kmodes
DESCRIPTION = kmodes.__doc__
VERSION = kmodes.__version__
setup(
name='kmodes',
packages=find_packages(exclude=[
'*.tests',
'*.tests.*',
]),
version=VERSION,
url='https://github.com/nicodv/kmodes',
author='Nico de Vos',
author_email='njdevos@gmail.com',
license='MIT',
summary='Python implementations of the k-modes and k-prototypes clustering '
'algorithms, for clustering categorical data.',
description=DESCRIPTION,
long_description=open('README.rst', 'r').read(),
install_requires=[
'numpy>=1.13.0, <1.14.0',
'scikit-learn>=0.18.0, <0.19.0',
'scipy>=0.19.0, <0.20.0',
],
classifiers=['Development Status :: 3 - Alpha',
'Intended Audience :: Science/Research',
'License :: OSI Approved :: MIT License',
'Operating System :: Microsoft :: Windows',
'Operating System :: Unix',
'Operating System :: MacOS',
'Programming Language :: Python',
'Programming Language :: Python :: 2',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.4',
'Programming Language :: Python :: 3.5',
'Programming Language :: Python :: 3.6',
'Topic :: Scientific/Engineering'],
)
| mit | Python |
38cd6b39e45395e1993bca5f8315970bbd324285 | fix wording in query_chw (#6471) | pytorch/vision,pytorch/vision,pytorch/vision,pytorch/vision,pytorch/vision,pytorch/vision | torchvision/prototype/transforms/_utils.py | torchvision/prototype/transforms/_utils.py | from typing import Any, Callable, Tuple, Type, Union
import PIL.Image
import torch
from torch.utils._pytree import tree_flatten
from torchvision._utils import sequence_to_str
from torchvision.prototype import features
from .functional._meta import get_dimensions_image_pil, get_dimensions_image_tensor
def query_bounding_box(sample: Any) -> features.BoundingBox:
flat_sample, _ = tree_flatten(sample)
for i in flat_sample:
if isinstance(i, features.BoundingBox):
return i
raise TypeError("No bounding box was found in the sample")
def get_chw(image: Union[PIL.Image.Image, torch.Tensor, features.Image]) -> Tuple[int, int, int]:
if isinstance(image, features.Image):
channels = image.num_channels
height, width = image.image_size
elif isinstance(image, torch.Tensor):
channels, height, width = get_dimensions_image_tensor(image)
elif isinstance(image, PIL.Image.Image):
channels, height, width = get_dimensions_image_pil(image)
else:
raise TypeError(f"unable to get image dimensions from object of type {type(image).__name__}")
return channels, height, width
def query_chw(sample: Any) -> Tuple[int, int, int]:
flat_sample, _ = tree_flatten(sample)
chws = {
get_chw(item)
for item in flat_sample
if isinstance(item, (features.Image, PIL.Image.Image)) or is_simple_tensor(item)
}
if not chws:
raise TypeError("No image was found in the sample")
elif len(chws) > 2:
raise TypeError(f"Found multiple CxHxW dimensions in the sample: {sequence_to_str(sorted(chws))}")
return chws.pop()
def has_any(sample: Any, *types_or_checks: Union[Type, Callable[[Any], bool]]) -> bool:
flat_sample, _ = tree_flatten(sample)
for type_or_check in types_or_checks:
for obj in flat_sample:
if isinstance(obj, type_or_check) if isinstance(type_or_check, type) else type_or_check(obj):
return True
return False
def has_all(sample: Any, *types_or_checks: Union[Type, Callable[[Any], bool]]) -> bool:
flat_sample, _ = tree_flatten(sample)
for type_or_check in types_or_checks:
for obj in flat_sample:
if isinstance(obj, type_or_check) if isinstance(type_or_check, type) else type_or_check(obj):
break
else:
return False
return True
def is_simple_tensor(inpt: Any) -> bool:
return isinstance(inpt, torch.Tensor) and not isinstance(inpt, features._Feature)
| from typing import Any, Callable, Tuple, Type, Union
import PIL.Image
import torch
from torch.utils._pytree import tree_flatten
from torchvision._utils import sequence_to_str
from torchvision.prototype import features
from .functional._meta import get_dimensions_image_pil, get_dimensions_image_tensor
def query_bounding_box(sample: Any) -> features.BoundingBox:
flat_sample, _ = tree_flatten(sample)
for i in flat_sample:
if isinstance(i, features.BoundingBox):
return i
raise TypeError("No bounding box was found in the sample")
def get_chw(image: Union[PIL.Image.Image, torch.Tensor, features.Image]) -> Tuple[int, int, int]:
if isinstance(image, features.Image):
channels = image.num_channels
height, width = image.image_size
elif isinstance(image, torch.Tensor):
channels, height, width = get_dimensions_image_tensor(image)
elif isinstance(image, PIL.Image.Image):
channels, height, width = get_dimensions_image_pil(image)
else:
raise TypeError(f"unable to get image dimensions from object of type {type(image).__name__}")
return channels, height, width
def query_chw(sample: Any) -> Tuple[int, int, int]:
flat_sample, _ = tree_flatten(sample)
image_dimensionss = {
get_chw(item)
for item in flat_sample
if isinstance(item, (features.Image, PIL.Image.Image)) or is_simple_tensor(item)
}
if not image_dimensionss:
raise TypeError("No image was found in the sample")
elif len(image_dimensionss) > 2:
raise TypeError(f"Found multiple image dimensions in the sample: {sequence_to_str(sorted(image_dimensionss))}")
return image_dimensionss.pop()
def has_any(sample: Any, *types_or_checks: Union[Type, Callable[[Any], bool]]) -> bool:
flat_sample, _ = tree_flatten(sample)
for type_or_check in types_or_checks:
for obj in flat_sample:
if isinstance(obj, type_or_check) if isinstance(type_or_check, type) else type_or_check(obj):
return True
return False
def has_all(sample: Any, *types_or_checks: Union[Type, Callable[[Any], bool]]) -> bool:
flat_sample, _ = tree_flatten(sample)
for type_or_check in types_or_checks:
for obj in flat_sample:
if isinstance(obj, type_or_check) if isinstance(type_or_check, type) else type_or_check(obj):
break
else:
return False
return True
def is_simple_tensor(inpt: Any) -> bool:
return isinstance(inpt, torch.Tensor) and not isinstance(inpt, features._Feature)
| bsd-3-clause | Python |
65add8604c6862618166bc76d8ba60da13230d7d | Update __init__.py | vex1023/vxTrader | vxTrader/__init__.py | vxTrader/__init__.py | # encoding = utf-8
__name__ = 'vxTrader'
__version__ = '0.1.11'
__author__ = 'vex1023'
__email__ = 'vex1023@qq.com'
import logging
from vxUtils.PrettyLogger import add_console_logger
logger = logging.getLogger('vxQuant.vxTrader')
add_console_logger(logger)
from vxTrader.trader import Trader, load_traders
__all__ = ['logger', 'Trader', 'load_traders']
| # encoding = utf-8
__name__ = 'vxTrader'
__version__ = '0.1.10'
__author__ = 'vex1023'
__email__ = 'vex1023@qq.com'
import logging
from vxUtils.PrettyLogger import add_console_logger
logger = logging.getLogger('vxQuant.vxTrader')
add_console_logger(logger)
from vxTrader.trader import Trader, load_traders
__all__ = ['logger', 'Trader', 'load_traders']
| mit | Python |
506868fcaeb87c32143c44dfd9269982e4d04433 | Handle Domino file system inconsistencies | subutai/htmresearch,subutai/htmresearch,numenta/htmresearch,numenta/htmresearch,numenta/htmresearch,numenta/htmresearch,numenta/htmresearch,numenta/htmresearch,subutai/htmresearch,subutai/htmresearch,subutai/htmresearch,numenta/htmresearch,subutai/htmresearch,subutai/htmresearch,numenta/htmresearch,subutai/htmresearch | projects/speech_commands/run_experiment.py | projects/speech_commands/run_experiment.py | # ----------------------------------------------------------------------
# Numenta Platform for Intelligent Computing (NuPIC)
# Copyright (C) 2018, Numenta, Inc. Unless you have an agreement
# with Numenta, Inc., for a separate license for this software code, the
# following terms and conditions apply:
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero Public License version 3 as
# published by the Free Software Foundation.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
# See the GNU Affero Public License for more details.
#
# You should have received a copy of the GNU Affero Public License
# along with this program. If not, see http://www.gnu.org/licenses.
#
# http://numenta.org/licenses/
# ----------------------------------------------------------------------
from __future__ import print_function
import matplotlib
matplotlib.use('Agg')
import tarfile
from os import path
import os
import shutil
from htmresearch.frameworks.pytorch.sparse_speech_experiment import \
SparseSpeechExperiment
# Run from root dir:
# domino run projects/speech_commands//run_experiment.py -c projects/speech_commands/experiments.cfg
# OR
# python projects/speech_commands/run_experiment.py -c projects/speech_commands/experiments.cfg -d
if __name__ == '__main__':
suite = SparseSpeechExperiment()
suite.parse_opt()
projectDir = path.dirname(suite.options.config)
dataDir = path.join(path.abspath(projectDir), "data")
if "DOMINO_WORKING_DIR" in os.environ:
print("In domino")
if path.isdir(path.join(dataDir, "speech_commands")):
print("Removing speech_commands")
shutil.rmtree(path.join(dataDir, "speech_commands"))
if not path.isdir(path.join(dataDir, "speech_commands")):
print("Untarring dataset...")
tar = tarfile.open(path.join(dataDir, "speech_commands.tar.gz"))
tar.extractall(path=dataDir)
tar.close()
else:
print("Apparently this still exists:", path.join(dataDir, "speech_commands"))
print("listing files:")
files = os.listdir(path.join(dataDir, "speech_commands"))
print(files)
files = os.listdir(path.join(dataDir, "speech_commands", "train", "one"))
print("train/one", len(files), files[0:10])
suite.start()
| # ----------------------------------------------------------------------
# Numenta Platform for Intelligent Computing (NuPIC)
# Copyright (C) 2018, Numenta, Inc. Unless you have an agreement
# with Numenta, Inc., for a separate license for this software code, the
# following terms and conditions apply:
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero Public License version 3 as
# published by the Free Software Foundation.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
# See the GNU Affero Public License for more details.
#
# You should have received a copy of the GNU Affero Public License
# along with this program. If not, see http://www.gnu.org/licenses.
#
# http://numenta.org/licenses/
# ----------------------------------------------------------------------
import matplotlib
matplotlib.use('Agg')
import matplotlib.pyplot as plt
import tarfile
from os import path
from htmresearch.frameworks.pytorch.sparse_speech_experiment import \
SparseSpeechExperiment
# Run from htmresearch:
# domino run projects/speech_commands//run_experiment.py -c projects/speech_commands/experiments.cfg
# OR
# python projects/speech_commands/run_experiment.py -c projects/speech_commands/experiments.cfg -d
if __name__ == '__main__':
suite = SparseSpeechExperiment()
suite.parse_opt()
projectDir = path.dirname(suite.options.config)
dataDir = path.join(path.abspath(projectDir), "data")
if not path.isdir(path.join(dataDir, "speech_commands")):
tar = tarfile.open(path.join(dataDir, "speech_commands.tar.gz"))
tar.extractall(path=dataDir)
tar.close()
suite.start()
| agpl-3.0 | Python |
a01f381fd93c607752530c92b657d855aef76d47 | bump version | jrxFive/python-nomad | setup.py | setup.py | from distutils.core import setup
setup(
name='python-nomad',
version='0.7.0',
install_requires=['requests'],
packages=['nomad', 'nomad.api'],
url='http://github.com/jrxfive/python-nomad',
license='MIT',
author='jrxfive',
author_email='jrxfive@gmail.com',
description='Client library for Hashicorp Nomad',
classifiers=[
'Development Status :: 3 - Alpha',
'Intended Audience :: Developers',
'License :: OSI Approved :: MIT License',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3.3',
'Programming Language :: Python :: 3.4',
'Programming Language :: Python :: 3.5',
],
keywords='nomad hashicorp client',
)
| from distutils.core import setup
setup(
name='python-nomad',
version='0.6.1',
install_requires=['requests'],
packages=['nomad', 'nomad.api'],
url='http://github.com/jrxfive/python-nomad',
license='MIT',
author='jrxfive',
author_email='jrxfive@gmail.com',
description='Client library for Hashicorp Nomad',
classifiers=[
'Development Status :: 3 - Alpha',
'Intended Audience :: Developers',
'License :: OSI Approved :: MIT License',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3.3',
'Programming Language :: Python :: 3.4',
'Programming Language :: Python :: 3.5',
],
keywords='nomad hashicorp client',
)
| mit | Python |
bf97132fd263026aea42d5af9772d378eaec67d9 | Enable markdown for PyPI README | consbio/gis-metadata-parser | setup.py | setup.py | import subprocess
import sys
from setuptools import Command, setup
class RunTests(Command):
user_options = []
def initialize_options(self):
pass
def finalize_options(self):
pass
def run(self):
errno = subprocess.call([sys.executable, '-m', 'unittest', 'gis_metadata.tests.tests'])
raise SystemExit(errno)
with open('README.md') as readme:
long_description = readme.read()
setup(
name='gis_metadata_parser',
description='Parser for GIS metadata standards including FGDC and ISO-19115',
long_description=long_description,
long_description_content_type='text/markdown',
keywords='arcgis,fgdc,iso,ISO-19115,ISO-19139,gis,metadata,parser,xml,gis_metadata,gis_metadata_parser',
version='1.1.3',
packages=[
'gis_metadata', 'gis_metadata.tests'
],
install_requires=[
'parserutils>=1.1', 'six>=1.9.0'
],
url='https://github.com/consbio/gis-metadata-parser',
license='BSD',
cmdclass={'test': RunTests}
)
| import subprocess
import sys
from setuptools import Command, setup
class RunTests(Command):
user_options = []
def initialize_options(self):
pass
def finalize_options(self):
pass
def run(self):
errno = subprocess.call([sys.executable, '-m', 'unittest', 'gis_metadata.tests.tests'])
raise SystemExit(errno)
with open('README.md') as readme:
long_description = readme.read()
setup(
name='gis_metadata_parser',
description='Parser for GIS metadata standards including FGDC and ISO-19115',
long_description=long_description,
keywords='arcgis,fgdc,iso,ISO-19115,ISO-19139,gis,metadata,parser,xml,gis_metadata,gis_metadata_parser',
version='1.1.2',
packages=[
'gis_metadata', 'gis_metadata.tests'
],
install_requires=[
'parserutils>=1.1', 'six>=1.9.0'
],
url='https://github.com/consbio/gis-metadata-parser',
license='BSD',
cmdclass={'test': RunTests}
)
| bsd-3-clause | Python |
776dc83dbb2c374741eb11321913fc89b7d6489c | bump version to 1.0.0 alpha | armstrong/armstrong.dev | setup.py | setup.py | from distutils.core import setup
import os
# Borrowed and modified from django-registration
# Compile the list of packages available, because distutils doesn't have
# an easy way to do this.
packages, data_files = [], []
root_dir = os.path.dirname(__file__)
if root_dir:
os.chdir(root_dir)
def build_package(dirpath, dirnames, filenames):
# Ignore dirnames that start with '.'
for i, dirname in enumerate(dirnames):
if dirname.startswith('.'): del dirnames[i]
pkg = dirpath.replace(os.path.sep, '.')
if os.path.altsep:
pkg = pkg.replace(os.path.altsep, '.')
packages.append(pkg)
[build_package(dirpath, dirnames, filenames) for dirpath, dirnames, filenames in os.walk('armstrong')]
setup(
name='armstrong.dev',
version='1.0.0a',
description='Tools needed for development and testing of Armstrong',
author='Bay Citizen and Texas Tribune',
author_email='all@armstrongcms.org',
url='http://github.com/armstrongcms/armstrong.dev/',
# TODO: generate this dynamically
packages=packages,
install_requires=[
# TODO: add this as a concrete dependency once 1.1 is out
#'fabric',
],
classifiers=[
'Development Status :: 3 - Alpha',
'Environment :: Web Environment',
'Framework :: Django',
'Intended Audience :: Developers',
'License :: OSI Approved :: Apache Software License',
'Operating System :: OS Independent',
'Programming Language :: Python',
],
)
| from distutils.core import setup
import os
# Borrowed and modified from django-registration
# Compile the list of packages available, because distutils doesn't have
# an easy way to do this.
packages, data_files = [], []
root_dir = os.path.dirname(__file__)
if root_dir:
os.chdir(root_dir)
def build_package(dirpath, dirnames, filenames):
# Ignore dirnames that start with '.'
for i, dirname in enumerate(dirnames):
if dirname.startswith('.'): del dirnames[i]
pkg = dirpath.replace(os.path.sep, '.')
if os.path.altsep:
pkg = pkg.replace(os.path.altsep, '.')
packages.append(pkg)
[build_package(dirpath, dirnames, filenames) for dirpath, dirnames, filenames in os.walk('armstrong')]
setup(
name='armstrong.dev',
version='0.0.1a',
description='Tools needed for development and testing of Armstrong',
author='Bay Citizen and Texas Tribune',
author_email='all@armstrongcms.org',
url='http://github.com/armstrongcms/armstrong.dev/',
# TODO: generate this dynamically
packages=packages,
install_requires=[
# TODO: add this as a concrete dependency once 1.1 is out
#'fabric',
],
classifiers=[
'Development Status :: 3 - Alpha',
'Environment :: Web Environment',
'Framework :: Django',
'Intended Audience :: Developers',
'License :: OSI Approved :: Apache Software License',
'Operating System :: OS Independent',
'Programming Language :: Python',
],
)
| apache-2.0 | Python |
f6523fba03e832a76b005de87fb92659a36152b7 | Revert "Add test dependencies" | opennode/nodeconductor-saltstack | setup.py | setup.py | #!/usr/bin/env python
import sys
from setuptools import setup, find_packages
dev_requires = [
'Sphinx==1.2.2',
]
install_requires = [
'nodeconductor>=0.80.0',
# transitive dependency from nodeconductor core requires Pillow version <3.0.0
'Pillow>=2.0.0,<3.0.0',
]
# RPM installation does not need oslo, cliff and stevedore libs -
# they are required only for installation with setuptools
try:
action = sys.argv[1]
except IndexError:
pass
else:
if action in ['develop', 'install', 'test']:
install_requires += [
'cliff==1.7.0',
'oslo.config==1.4.0',
'oslo.i18n==1.0.0',
'oslo.utils==1.0.0',
'stevedore==1.0.0',
]
setup(
name='nodeconductor-saltstack',
version='0.1.3',
author='OpenNode Team',
author_email='info@opennodecloud.com',
url='http://nodeconductor.com',
description='NodeConductor SaltStack plugin allows to manage applications via SaltStack RPC',
long_description=open('README.rst').read(),
package_dir={'': 'src'},
packages=find_packages('src', exclude=["*.tests", "*.tests.*", "tests.*", "tests"]),
install_requires=install_requires,
zip_safe=False,
extras_require={
'dev': dev_requires,
},
entry_points={
'nodeconductor_extensions': (
'saltstack = nodeconductor_saltstack.saltstack.extension:SaltStackExtension',
'exchange = nodeconductor_saltstack.exchange.extension:ExchangeExtension',
'sharepoint = nodeconductor_saltstack.sharepoint.extension:SharepointExtension',
),
},
# tests_require=tests_requires,
include_package_data=True,
classifiers=[
'Framework :: Django',
'Intended Audience :: Developers',
'Intended Audience :: System Administrators',
'Operating System :: OS Independent',
'License :: OSI Approved :: Apache Software License',
],
)
| #!/usr/bin/env python
import sys
from setuptools import setup, find_packages
dev_requires = [
'Sphinx==1.2.2',
]
tests_requires = [
'ddt>=1.0.0',
'factory_boy==2.4.1',
'mock==1.0.1',
'mock-django==0.6.6',
'six>=1.9.0',
'django-celery==3.1.16',
]
install_requires = [
'nodeconductor>=0.80.0',
# transitive dependency from nodeconductor core requires Pillow version <3.0.0
'Pillow>=2.0.0,<3.0.0',
]
# RPM installation does not need oslo, cliff and stevedore libs -
# they are required only for installation with setuptools
try:
action = sys.argv[1]
except IndexError:
pass
else:
if action in ['develop', 'install', 'test']:
install_requires += [
'cliff==1.7.0',
'oslo.config==1.4.0',
'oslo.i18n==1.0.0',
'oslo.utils==1.0.0',
'stevedore==1.0.0',
]
setup(
name='nodeconductor-saltstack',
version='0.1.3',
author='OpenNode Team',
author_email='info@opennodecloud.com',
url='http://nodeconductor.com',
description='NodeConductor SaltStack plugin allows to manage applications via SaltStack RPC',
long_description=open('README.rst').read(),
package_dir={'': 'src'},
packages=find_packages('src', exclude=["*.tests", "*.tests.*", "tests.*", "tests"]),
install_requires=install_requires,
zip_safe=False,
extras_require={
'dev': dev_requires,
},
entry_points={
'nodeconductor_extensions': (
'saltstack = nodeconductor_saltstack.saltstack.extension:SaltStackExtension',
'exchange = nodeconductor_saltstack.exchange.extension:ExchangeExtension',
'sharepoint = nodeconductor_saltstack.sharepoint.extension:SharepointExtension',
),
},
tests_require=tests_requires,
include_package_data=True,
classifiers=[
'Framework :: Django',
'Intended Audience :: Developers',
'Intended Audience :: System Administrators',
'Operating System :: OS Independent',
'License :: OSI Approved :: Apache Software License',
],
)
| mit | Python |
b725303ed45fd38afeadb893bb31d57666c4f33f | Bump version to 3.3m5 | cloudify-cosmo/cloudify-amqp-influxdb,cloudify-cosmo/cloudify-amqp-influxdb | setup.py | setup.py | ########
# Copyright (c) 2014 GigaSpaces Technologies Ltd. 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 agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
############
from setuptools import setup
setup(
name='cloudify-amqp-influxdb',
version='3.3a5',
author='Cloudify',
author_email='cosmo-admin@gigaspaces.com',
packages=['amqp_influxdb'],
entry_points={
'console_scripts': [
'cloudify-amqp-influxdb = amqp_influxdb.__main__:main',
]
},
install_requires=[
'pika==0.9.13',
'requests==2.7.0'
],
)
| ########
# Copyright (c) 2014 GigaSpaces Technologies Ltd. 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 agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
############
from setuptools import setup
setup(
name='cloudify-amqp-influxdb',
version='3.3a4',
author='Cloudify',
author_email='cosmo-admin@gigaspaces.com',
packages=['amqp_influxdb'],
entry_points={
'console_scripts': [
'cloudify-amqp-influxdb = amqp_influxdb.__main__:main',
]
},
install_requires=[
'pika==0.9.13',
'requests==2.7.0'
],
)
| apache-2.0 | Python |
452844629051bc205205e85f3af82c019cbc268b | bump version number to 1.4alpha5 | Abhinav117/pymtl,Abhinav117/pymtl,Abhinav117/pymtl,Abhinav117/pymtl | setup.py | setup.py | # setup.py inspired by the PyPA sample project:
# https://github.com/pypa/sampleproject/blob/master/setup.py
from setuptools import setup, find_packages
from codecs import open # To use a consistent encoding
from os import path
def get_long_description():
here = path.abspath(path.dirname(__file__))
with open(path.join(here, 'README.rst'), encoding='utf-8') as f:
long_description = f.read()
setup(
name = 'pymtl',
version = '1.4alpha5', # https://www.python.org/dev/peps/pep-0440/
description = 'Python-based hardware modeling framework',
long_description = get_long_description(),
url = 'https://github.com/cornell-brg/pymtl',
author = 'Derek Lockhart',
author_email = 'lockhart@csl.cornell.edu',
# BSD 3-Clause License:
# - http://choosealicense.com/licenses/bsd-3-clause
# - http://opensource.org/licenses/BSD-3-Clause
license='BSD',
# See https://pypi.python.org/pypi?%3Aaction=list_classifiers
classifiers=[
'Development Status :: 3 - Alpha',
'License :: OSI Approved :: BSD License',
'Programming Language :: Python :: 2.7',
'Operating System :: MacOS :: MacOS X',
'Operating System :: POSIX :: Linux',
],
packages = find_packages(
exclude=['scripts', 'tests', 'ubmark', 'perf_tests']
),
package_data={
'pymtl': [
'tools/translation/verilator_wrapper.templ.c',
'tools/translation/verilator_wrapper.templ.py',
'tools/translation/cpp_wrapper.templ.py',
],
},
install_requires = [
'cffi',
'greenlet',
'pytest',
'pytest-xdist',
# Note: leaving out numpy due to pypy incompatibility
#'numpy==1.9.0',
],
)
| # setup.py inspired by the PyPA sample project:
# https://github.com/pypa/sampleproject/blob/master/setup.py
from setuptools import setup, find_packages
from codecs import open # To use a consistent encoding
from os import path
def get_long_description():
here = path.abspath(path.dirname(__file__))
with open(path.join(here, 'README.rst'), encoding='utf-8') as f:
long_description = f.read()
setup(
name = 'pymtl',
version = '1.4alpha4', # https://www.python.org/dev/peps/pep-0440/
description = 'Python-based hardware modeling framework',
long_description = get_long_description(),
url = 'https://github.com/cornell-brg/pymtl',
author = 'Derek Lockhart',
author_email = 'lockhart@csl.cornell.edu',
# BSD 3-Clause License:
# - http://choosealicense.com/licenses/bsd-3-clause
# - http://opensource.org/licenses/BSD-3-Clause
license='BSD',
# See https://pypi.python.org/pypi?%3Aaction=list_classifiers
classifiers=[
'Development Status :: 3 - Alpha',
'License :: OSI Approved :: BSD License',
'Programming Language :: Python :: 2.7',
'Operating System :: MacOS :: MacOS X',
'Operating System :: POSIX :: Linux',
],
packages = find_packages(
exclude=['scripts', 'tests', 'ubmark', 'perf_tests']
),
package_data={
'pymtl': [
'tools/translation/verilator_wrapper.templ.c',
'tools/translation/verilator_wrapper.templ.py',
'tools/translation/cpp_wrapper.templ.py',
],
},
install_requires = [
'cffi',
'greenlet',
'pytest',
'pytest-xdist',
# Note: leaving out numpy due to pypy incompatibility
#'numpy==1.9.0',
],
)
| bsd-3-clause | Python |
7e6a73c476390f864860c126e6d82707874ca1f6 | remove subprocess32 dependency (a relic from Python2) | angr/tracer | setup.py | setup.py | from setuptools import setup
setup(
name='tracer', version='0.1', description="Symbolically trace concrete inputs.",
packages=['tracer', 'tracer.cachemanager' ],
install_requires=[ 'shellphish-qemu'],
)
| from setuptools import setup
setup(
name='tracer', version='0.1', description="Symbolically trace concrete inputs.",
packages=['tracer', 'tracer.cachemanager' ],
install_requires=[ 'shellphish-qemu', 'subprocess32'],
)
| bsd-2-clause | Python |
38f70df41a60b3c82f66e4a66bc0659d9a84b255 | Bump to v0.3.0 | gisce/oopgrade | setup.py | setup.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import os
from setuptools import setup, find_packages
with open('README.rst') as readme_file:
readme = readme_file.read()
dirname = os.path.dirname(__file__)
setup(
name='oopgrade',
version='0.3.0',
description='Upgrade and migration tools',
long_description=readme,
author='GISCE-TI, S.L.',
author_email='devel@gisce.net',
url='https://github.com/gisce/oopgrade',
packages=find_packages(),
install_requires=[
'semver'
],
license='AGPL-3',
)
| #!/usr/bin/env python
# -*- coding: utf-8 -*-
import os
from setuptools import setup, find_packages
with open('README.rst') as readme_file:
readme = readme_file.read()
dirname = os.path.dirname(__file__)
setup(
name='oopgrade',
version='0.2.0',
description='Upgrade and migration tools',
long_description=readme,
author='GISCE-TI, S.L.',
author_email='devel@gisce.net',
url='https://github.com/gisce/oopgrade',
packages=find_packages(),
install_requires=[
'semver'
],
license='AGPL-3',
)
| agpl-3.0 | Python |
17e7da76fe7032eb6dc0cffd4d533d0d1de3afa6 | use new version number | ryninho/session2s3 | setup.py | setup.py | from setuptools import setup
setup(
name = 'session2s3',
packages = ['session2s3'],
version = '0.2a1',
description = 'Save your Python session to S3',
author = 'Eric Rynerson',
author_email = 'eric.rynerson@gmail.com',
license='MIT',
url = 'https://github.com/ryninho/session2s3',
download_url = 'https://github.com/ryninho/session2s3/archive/0.2.tar.gz',
keywords = ['s3', 'logging', 'debugging', 'session', 'rollback'],
classifiers = [
'Development Status :: 3 - Alpha',
'Programming Language :: Python :: 2.7'
],
install_requires=['boto3', 'dill'],
python_requires='==2.7.*',
)
| from setuptools import setup
setup(
name = 'session2s3',
packages = ['session2s3'],
version = '0.1a1',
description = 'Save your Python session to S3',
author = 'Eric Rynerson',
author_email = 'eric.rynerson@gmail.com',
license='MIT',
url = 'https://github.com/ryninho/session2s3',
download_url = 'https://github.com/ryninho/session2s3/archive/0.1.tar.gz',
keywords = ['s3', 'logging', 'debugging', 'session', 'rollback'],
classifiers = [
'Development Status :: 3 - Alpha',
'Programming Language :: Python :: 2.7'
],
install_requires=['boto3', 'dill'],
python_requires='==2.7.*',
)
| mit | Python |
2b0ebe66ee0a2f05a73c40fde3e0cc6bde216ede | Use setuptools | zacharyvoase/django-exceptional | setup.py | setup.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import os
import re
from setuptools import setup
rel_file = lambda *args: os.path.join(os.path.dirname(os.path.abspath(__file__)), *args)
def read_from(filename):
fp = open(filename)
try:
return fp.read()
finally:
fp.close()
def get_version():
data = read_from(rel_file('src', 'djexceptional', '__init__.py'))
return re.search(r"__version__ = '([^']+)'", data).group(1)
setup(
name = 'django-exceptional',
version = get_version(),
author = "Zachary Voase",
author_email = "z@zacharyvoase.com",
url = 'http://github.com/zacharyvoase/django-exceptional',
description = "A Django client for Exceptional (getexceptional.com).",
packages = ['djexceptional', 'djexceptional.tests'],
package_dir = {'': 'src'},
)
| #!/usr/bin/env python
# -*- coding: utf-8 -*-
import os
import re
from distutils.core import setup
rel_file = lambda *args: os.path.join(os.path.dirname(os.path.abspath(__file__)), *args)
def read_from(filename):
fp = open(filename)
try:
return fp.read()
finally:
fp.close()
def get_version():
data = read_from(rel_file('src', 'djexceptional', '__init__.py'))
return re.search(r"__version__ = '([^']+)'", data).group(1)
setup(
name = 'django-exceptional',
version = get_version(),
author = "Zachary Voase",
author_email = "z@zacharyvoase.com",
url = 'http://github.com/zacharyvoase/django-exceptional',
description = "A Django client for Exceptional (getexceptional.com).",
packages = ['djexceptional', 'djexceptional.tests'],
package_dir = {'': 'src'},
)
| unlicense | Python |
049e400fcbf9dd349906e49fba0135e4b3b07068 | bump version | korfuri/pip-prometheus | setup.py | setup.py | import os
from setuptools import setup
LONG_DESCRIPTION = """Pip-Prometheus
This code exports the version of installed Pip packages.
See https://github.com/korfuri/pip-prometheus for usage
instructions.
"""
setup(
name="pip-prometheus",
version="1.2.1",
author="Uriel Corfa",
author_email="uriel@corfa.fr",
description=(
"Exports Pip packages versions for Prometheus.io."),
license="Apache",
keywords="python pip monitoring prometheus",
url="http://github.com/korfuri/pip-prometheus",
packages=["pip_prometheus"],
test_suite="tests",
long_description=LONG_DESCRIPTION,
install_requires=[
"prometheus_client>=0.7.0",
"pip>=9.0.0",
],
classifiers=[
"Development Status :: 5 - Production/Stable",
"Intended Audience :: Developers",
"Intended Audience :: Information Technology",
"Intended Audience :: System Administrators",
"Topic :: System :: Monitoring",
"License :: OSI Approved :: Apache Software License",
"Programming Language :: Python :: 2",
"Programming Language :: Python :: 2.7",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.5",
"Programming Language :: Python :: 3.6",
"Programming Language :: Python :: 3.7",
],
)
| import os
from setuptools import setup
LONG_DESCRIPTION = """Pip-Prometheus
This code exports the version of installed Pip packages.
See https://github.com/korfuri/pip-prometheus for usage
instructions.
"""
setup(
name="pip-prometheus",
version="1.2.0",
author="Uriel Corfa",
author_email="uriel@corfa.fr",
description=(
"Exports Pip packages versions for Prometheus.io."),
license="Apache",
keywords="python pip monitoring prometheus",
url="http://github.com/korfuri/pip-prometheus",
packages=["pip_prometheus"],
test_suite="tests",
long_description=LONG_DESCRIPTION,
install_requires=[
"prometheus_client>=0.7.0",
"pip>=9.0.0",
],
classifiers=[
"Development Status :: 5 - Production/Stable",
"Intended Audience :: Developers",
"Intended Audience :: Information Technology",
"Intended Audience :: System Administrators",
"Topic :: System :: Monitoring",
"License :: OSI Approved :: Apache Software License",
"Programming Language :: Python :: 2",
"Programming Language :: Python :: 2.7",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.5",
"Programming Language :: Python :: 3.6",
"Programming Language :: Python :: 3.7",
],
)
| apache-2.0 | Python |
5b4adadc8560ca5f94391376146a3c73b947b005 | Increase version number | City-of-Helsinki/munigeo | setup.py | setup.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import os
from setuptools import setup
README = open(os.path.join(os.path.dirname(__file__), 'README.md')).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-munigeo',
version='0.2.1',
packages=['munigeo'],
include_package_data=True,
license='BSD License',
description='A Django app for processing municipality-related geospatial data.',
long_description=README,
url='https://github.com/City-of-Helsinki/django-munigeo',
author='Juha Yrjölä',
author_email='juha.yrjola@iki.fi',
install_requires=[
'Django',
'requests',
'requests_cache',
'django_mptt',
'django_modeltranslation',
'six',
'pyyaml',
],
setup_requires=['pytest-runner'],
tests_require=['pytest', 'pytest-django'],
classifiers=[
'Environment :: Web Environment',
'Framework :: Django',
'Intended Audience :: Developers',
'License :: OSI Approved :: BSD License',
'Operating System :: OS Independent',
'Programming Language :: Python',
'Programming Language :: Python :: 2.6',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.2',
'Programming Language :: Python :: 3.3',
'Programming Language :: Python :: 3.4',
'Programming Language :: Python :: 3.5',
'Programming Language :: Python :: 3.6',
'Topic :: Internet :: WWW/HTTP',
'Topic :: Internet :: WWW/HTTP :: Dynamic Content',
'Topic :: Scientific/Engineering :: GIS',
],
)
| #!/usr/bin/env python
# -*- coding: utf-8 -*-
import os
from setuptools import setup
README = open(os.path.join(os.path.dirname(__file__), 'README.md')).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-munigeo',
version='0.2.0',
packages=['munigeo'],
include_package_data=True,
license='BSD License',
description='A Django app for processing municipality-related geospatial data.',
long_description=README,
url='https://github.com/City-of-Helsinki/django-munigeo',
author='Juha Yrjölä',
author_email='juha.yrjola@iki.fi',
install_requires=[
'Django',
'requests',
'requests_cache',
'django_mptt',
'django_modeltranslation',
'six',
'pyyaml',
],
setup_requires=['pytest-runner'],
tests_require=['pytest', 'pytest-django'],
classifiers=[
'Environment :: Web Environment',
'Framework :: Django',
'Intended Audience :: Developers',
'License :: OSI Approved :: BSD License',
'Operating System :: OS Independent',
'Programming Language :: Python',
'Programming Language :: Python :: 2.6',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.2',
'Programming Language :: Python :: 3.3',
'Programming Language :: Python :: 3.4',
'Programming Language :: Python :: 3.5',
'Programming Language :: Python :: 3.6',
'Topic :: Internet :: WWW/HTTP',
'Topic :: Internet :: WWW/HTTP :: Dynamic Content',
'Topic :: Scientific/Engineering :: GIS',
],
)
| agpl-3.0 | Python |
cd656e3bd47ee484311bf83f5a0c937300eb8565 | Fix requirements versions | ablanco/yith-library-web-client,ablanco/yith-library-web-client,lorenzogil/yith-library-web-client,lorenzogil/yith-library-web-client,ablanco/yith-library-web-client,lorenzogil/yith-library-web-client,ablanco/yith-library-web-client,lorenzogil/yith-library-web-client | setup.py | setup.py | # Yith Library web client
# Copyright (C) 2012 Yaco Sistemas S.L.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
import os
from setuptools import setup, find_packages
here = os.path.abspath(os.path.dirname(__file__))
README = open(os.path.join(here, 'README.rst')).read()
CHANGES = open(os.path.join(here, 'CHANGES.rst')).read()
requires = [
'pyramid==1.3.4',
'pyramid_debugtoolbar==1.0.2',
'requests==0.14.0',
'waitress==0.8.1',
]
setup(name='yith-web-client',
version='0.0',
description='yith-web-client',
long_description=README + '\n\n' + CHANGES,
classifiers=[
"Programming Language :: Python",
"Framework :: Pylons",
"Topic :: Internet :: WWW/HTTP",
"Topic :: Internet :: WWW/HTTP :: WSGI :: Application",
],
author='',
author_email='',
url='',
keywords='web pyramid pylons',
packages=find_packages(),
include_package_data=True,
zip_safe=False,
install_requires=requires,
tests_require=requires,
test_suite="yithwebclient",
entry_points = """\
[paste.app_factory]
main = yithwebclient:main
""",
)
| # Yith Library web client
# Copyright (C) 2012 Yaco Sistemas S.L.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
import os
from setuptools import setup, find_packages
here = os.path.abspath(os.path.dirname(__file__))
README = open(os.path.join(here, 'README.rst')).read()
CHANGES = open(os.path.join(here, 'CHANGES.rst')).read()
requires = [
'pyramid',
'pyramid_debugtoolbar',
'requests',
'waitress',
]
setup(name='yith-web-client',
version='0.0',
description='yith-web-client',
long_description=README + '\n\n' + CHANGES,
classifiers=[
"Programming Language :: Python",
"Framework :: Pylons",
"Topic :: Internet :: WWW/HTTP",
"Topic :: Internet :: WWW/HTTP :: WSGI :: Application",
],
author='',
author_email='',
url='',
keywords='web pyramid pylons',
packages=find_packages(),
include_package_data=True,
zip_safe=False,
install_requires=requires,
tests_require=requires,
test_suite="yithwebclient",
entry_points = """\
[paste.app_factory]
main = yithwebclient:main
""",
)
| agpl-3.0 | Python |
e6df4d7e37321452edebc8a6b9c5f36d0b073d8b | Bump cvxopt from 1.2.5 to 1.2.5.post1 | bugra/l1 | setup.py | setup.py | #!/usr/bin/env python
from setuptools import setup
setup(name='l1',
version='0.1',
description='L1',
author='Bugra Akyildiz',
author_email='vbugra@gmail.com',
url='bugra.github.io',
packages=['l1'],
install_requires=['pandas==1.1.2',
'cvxopt==1.2.5.post1',
'statsmodels==0.12.0',
]
)
| #!/usr/bin/env python
from setuptools import setup
setup(name='l1',
version='0.1',
description='L1',
author='Bugra Akyildiz',
author_email='vbugra@gmail.com',
url='bugra.github.io',
packages=['l1'],
install_requires=['pandas==1.1.2',
'cvxopt==1.2.5',
'statsmodels==0.12.0',
]
)
| apache-2.0 | Python |
22fabfd4e26f677ecce30871af78561edefcaef6 | Bump vers for Latin syllabizer updates | kylepjohnson/cltk,diyclassics/cltk,D-K-E/cltk,cltk/cltk | setup.py | setup.py | """Config for PyPI."""
from setuptools import find_packages
from setuptools import setup
setup(
author='Kyle P. Johnson',
author_email='kyle@kyle-p-johnson.com',
classifiers=[
'Intended Audience :: Education',
'Intended Audience :: Science/Research',
'License :: OSI Approved :: MIT License',
'Natural Language :: Chinese (Traditional)',
'Natural Language :: English',
'Natural Language :: Greek',
'Natural Language :: Latin',
'Operating System :: POSIX',
'Programming Language :: Python :: 3.7',
'Topic :: Scientific/Engineering :: Artificial Intelligence',
'Topic :: Text Processing',
'Topic :: Text Processing :: General',
'Topic :: Text Processing :: Linguistic',
],
description='NLP for the ancient world',
install_requires=['gitpython',
'nltk',
'python-crfsuite',
'pyuca',
'pyyaml',
'regex',
'whoosh'],
keywords=['nlp', 'nltk', 'greek', 'latin', 'chinese', 'sanskrit', 'pali', 'tibetan', 'arabic', "germanic"],
license='MIT',
long_description='The Classical Language Toolkit (CLTK) is a framework for natural language processing for Classical languages.', # pylint: disable=C0301,
name='cltk',
packages=find_packages(),
url='https://github.com/cltk/cltk',
version='0.1.122',
zip_safe=True,
test_suite='cltk.tests.test_cltk',
)
| """Config for PyPI."""
from setuptools import find_packages
from setuptools import setup
setup(
author='Kyle P. Johnson',
author_email='kyle@kyle-p-johnson.com',
classifiers=[
'Intended Audience :: Education',
'Intended Audience :: Science/Research',
'License :: OSI Approved :: MIT License',
'Natural Language :: Chinese (Traditional)',
'Natural Language :: English',
'Natural Language :: Greek',
'Natural Language :: Latin',
'Operating System :: POSIX',
'Programming Language :: Python :: 3.7',
'Topic :: Scientific/Engineering :: Artificial Intelligence',
'Topic :: Text Processing',
'Topic :: Text Processing :: General',
'Topic :: Text Processing :: Linguistic',
],
description='NLP for the ancient world',
install_requires=['gitpython',
'nltk',
'python-crfsuite',
'pyuca',
'pyyaml',
'regex',
'whoosh'],
keywords=['nlp', 'nltk', 'greek', 'latin', 'chinese', 'sanskrit', 'pali', 'tibetan', 'arabic', "germanic"],
license='MIT',
long_description='The Classical Language Toolkit (CLTK) is a framework for natural language processing for Classical languages.', # pylint: disable=C0301,
name='cltk',
packages=find_packages(),
url='https://github.com/cltk/cltk',
version='0.1.121',
zip_safe=True,
test_suite='cltk.tests.test_cltk',
)
| mit | Python |
d261a41419ab1d2f0543798743ff34607d3d455f | Increment version for deployment. Update trove classifier. | mattions/pyfaidx | setup.py | setup.py | from setuptools import setup
import sys
install_requires = ['six']
if sys.version_info[0] == 2 and sys.version_info[1] == 6:
install_requires.extend(['ordereddict', 'argparse'])
setup(
name='pyfaidx',
provides='pyfaidx',
version='0.3.1',
author='Matthew Shirley',
author_email='mdshw5@gmail.com',
url='http://mattshirley.com',
description='pyfaidx: efficient pythonic random '
'access to fasta subsequences',
long_description=open('README.rst').read(),
license='MIT',
packages=['pyfaidx'],
install_requires=install_requires,
entry_points={'console_scripts': ['faidx = pyfaidx.cli:main', 'bedmask = pyfaidx.bedmask:main']},
classifiers=[
"Development Status :: 5 - Production/Stable",
"License :: OSI Approved :: MIT License",
"Environment :: Console",
"Intended Audience :: Science/Research",
"Natural Language :: English",
"Operating System :: Unix",
"Programming Language :: Python :: 3.4",
"Programming Language :: Python :: 3.3",
"Programming Language :: Python :: 3.2",
"Programming Language :: Python :: 2.7",
"Programming Language :: Python :: 2.6",
"Programming Language :: Python :: Implementation :: PyPy",
"Topic :: Scientific/Engineering :: Bio-Informatics"
]
)
| from setuptools import setup
import sys
install_requires = ['six']
if sys.version_info[0] == 2 and sys.version_info[1] == 6:
install_requires.extend(['ordereddict', 'argparse'])
setup(
name='pyfaidx',
provides='pyfaidx',
version='0.3.0',
author='Matthew Shirley',
author_email='mdshw5@gmail.com',
url='http://mattshirley.com',
description='pyfaidx: efficient pythonic random '
'access to fasta subsequences',
long_description=open('README.rst').read(),
license='MIT',
packages=['pyfaidx'],
install_requires=install_requires,
entry_points={'console_scripts': ['faidx = pyfaidx.cli:main', 'bedmask = pyfaidx.bedmask:main']},
classifiers=[
"Development Status :: 4 - Beta",
"License :: OSI Approved :: MIT License",
"Environment :: Console",
"Intended Audience :: Science/Research",
"Natural Language :: English",
"Operating System :: Unix",
"Programming Language :: Python :: 3.4",
"Programming Language :: Python :: 3.3",
"Programming Language :: Python :: 3.2",
"Programming Language :: Python :: 2.7",
"Programming Language :: Python :: 2.6",
"Programming Language :: Python :: Implementation :: PyPy",
"Topic :: Scientific/Engineering :: Bio-Informatics"
]
)
| bsd-3-clause | Python |
681ed2d9d62f3c4a623905fdc8d4847a24281626 | Add divisible/nondivisible for verify | habibmasuro/omniwallet,VukDukic/omniwallet,habibmasuro/omniwallet,achamely/omniwallet,Nevtep/omniwallet,VukDukic/omniwallet,achamely/omniwallet,OmniLayer/omniwallet,achamely/omniwallet,Nevtep/omniwallet,habibmasuro/omniwallet,achamely/omniwallet,OmniLayer/omniwallet,Nevtep/omniwallet,VukDukic/omniwallet,OmniLayer/omniwallet,OmniLayer/omniwallet,Nevtep/omniwallet,habibmasuro/omniwallet | api/mastercoin_verify.py | api/mastercoin_verify.py | import os
import glob
import re
from flask import Flask, request, jsonify, abort, json
import psycopg2, psycopg2.extras
import msc_apps
sqlconn = msc_apps.sql_connect()
data_dir_root = os.environ.get('DATADIR')
app = Flask(__name__)
app.debug = True
#TODO COnversion
@app.route('/properties')
def properties():
sqlconn.execute("select * from smartproperties")
ROWS= sqlconn.fetchall()
def dehexify(hex_str):
temp_str=[]
for let in hex_str:
if ord(let) < 128:
temp_str.append(let)
else:
temp_str.append('?')
return ''.join(temp_str)
response = []
for sprow in ROWS:
res = {
'currencyID': sprow[1],
'name': dehexify(sprow[-1]['name'])
}
response.append(res)
json_response = json.dumps( sorted(response, key=lambda x: int(x['currencyID']) ))
return json_response
@app.route('/addresses')
def addresses():
currency_id = request.args.get('currency_id')
response = []
currency_id = re.sub(r'\D+', '', currency_id) #check alphanumeric
#sqlconn.execute("select address,balanceavailable,balancereserved, from addressbalances ab, where propertyid=" + str(currency_id))
sqlconn.execute("select address,balanceavailable,balancereserved,sp.propertytype from addressbalances ab, smartproperties sp where ab.propertyid=sp.propertyid and sp.propertyid=" + str(currency_id))
ROWS= sqlconn.fetchall()
for addrrow in ROWS:
res = {
'address': addrrow[0]
}
divisible=addrrow[3]
if currency_id == '0': #BTC
res['balance'] = ('%.8f' % float(addrrow[1])).rstrip('0').rstrip('.')
response.append(res)
else:
if divisible:
res['balance'] = ('%.8f' % float(addrrow[1])).rstrip('0').rstrip('.')
res['reserved_balance'] = ('%.8f' % float(addrrow[2])).rstrip('0').rstrip('.')
else:
res['balance'] = ('%.8f' % float(addrrow[1]/10000000)).rstrip('0').rstrip('.')
res['reserved_balance'] = ('%.8f' % float(addrrow[2]/10000000)).rstrip('0').rstrip('.')
response.append(res)
json_response = json.dumps(response)
return json_response
@app.route('/transactions/<address>')
def transactions(address=None):
currency_id = request.args.get('currency_id')
print address, currency_id
if address == None:
abort(400)
currency_id = re.sub(r'\D+', '', currency_id) #check alphanumeric
sqlconn.execute("select * from addressesintxs a, transactions t where a.address=\'"+address+"\' and a.txdbserialnum = t.txdbserialnum and a.propertyid=" + str(currency_id))
ROWS= sqlconn.fetchall()
transactions = []
for txrow in ROWS:
transactions.append(txrow[9])
return jsonify({ 'address': address, 'transactions': transactions })
| import os
import glob
import re
from flask import Flask, request, jsonify, abort, json
import psycopg2, psycopg2.extras
import msc_apps
sqlconn = msc_apps.sql_connect()
data_dir_root = os.environ.get('DATADIR')
app = Flask(__name__)
app.debug = True
#TODO COnversion
@app.route('/properties')
def properties():
sqlconn.execute("select * from smartproperties")
ROWS= sqlconn.fetchall()
def dehexify(hex_str):
temp_str=[]
for let in hex_str:
if ord(let) < 128:
temp_str.append(let)
else:
temp_str.append('?')
return ''.join(temp_str)
response = []
for sprow in ROWS:
res = {
'currencyID': sprow[1],
'name': dehexify(sprow[-1]['name'])
}
response.append(res)
json_response = json.dumps( sorted(response, key=lambda x: int(x['currencyID']) ))
return json_response
@app.route('/addresses')
def addresses():
currency_id = request.args.get('currency_id')
response = []
currency_id = re.sub(r'\D+', '', currency_id) #check alphanumeric
sqlconn.execute("select * from addressbalances where propertyid=" + str(currency_id))
ROWS= sqlconn.fetchall()
for addrrow in ROWS:
res = {
'address': addrrow[0]
}
if currency_id == '0': #BTC
res['balance'] = ('%.8f' % float(addrrow[4])).rstrip('0').rstrip('.')
response.append(res)
else:
res['balance'] = ('%.8f' % float(addrrow[4])).rstrip('0').rstrip('.')
res['reserved_balance'] = ('%.8f' % float(addrrow[5])).rstrip('0').rstrip('.')
response.append(res)
json_response = json.dumps(response)
return json_response
@app.route('/transactions/<address>')
def transactions(address=None):
currency_id = request.args.get('currency_id')
print address, currency_id
if address == None:
abort(400)
currency_id = re.sub(r'\D+', '', currency_id) #check alphanumeric
sqlconn.execute("select * from addressesintxs a, transactions t where a.address=\'"+address+"\' and a.txdbserialnum = t.txdbserialnum and a.propertyid=" + str(currency_id))
ROWS= sqlconn.fetchall()
transactions = []
for txrow in ROWS:
transactions.append(txrow[9])
return jsonify({ 'address': address, 'transactions': transactions })
| agpl-3.0 | Python |
264821f36246f81186c63f44c56af6d0f244ccad | Update setup.py version / keywords | flxf/isomedia | setup.py | setup.py | #!/usr/bin/env python
from setuptools import setup, find_packages
setup(
name='isomedia',
version='0.2',
description='This is another ISO base media format file parser.',
author='Felix Fung',
author_email='felix.the.cheshire.cat@gmail.com',
url='https://github.com/flxf/isomedia',
packages=find_packages(exclude=['tests']),
install_requires=[],
keywords=['mp4', 'isom'],
)
| #!/usr/bin/env python
from setuptools import setup, find_packages
setup(
name='isomedia',
version='0.1',
description='This is another ISO base media format file parser.',
author='Felix Fung',
author_email='felix.the.cheshire.cat@gmail.com',
url='https://github.com/flxf/isomedia',
packages=find_packages(exclude=['tests']),
install_requires=[],
)
| mit | Python |
5522b105cfc30332d010927b5d14a0ede4f72dc9 | Update setup.py so that we can upload pip package. | google/tf-quant-finance,google/tf-quant-finance | setup.py | setup.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
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# ==============================================================================
"""Setup for pip package."""
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from setuptools import find_packages
from setuptools import setup
from setuptools.dist import Distribution
__version__ = '0.0.1dev'
REQUIRED_PACKAGES = [
'tensorflow >= 1.12.0',
'tensorflow-probability >= 0.5.0',
'numpy >= 1.13.3'
]
project_name = 'tf-quant-finance'
description = 'High performance Tensorflow library for quantitative finance.'
class BinaryDistribution(Distribution):
"""This class is needed in order to create OS specific wheels."""
def has_ext_modules(self):
return False
setup(
name=project_name,
version=__version__,
description=description,
author='Google Inc.',
author_email='tf-quant-finance@google.com',
# Contained modules and scripts.
packages=find_packages(),
install_requires=REQUIRED_PACKAGES,
# Add in any packaged data.
include_package_data=True,
zip_safe=False,
distclass=BinaryDistribution,
# PyPI package information.
classifiers=[
'Development Status :: 2 - Pre-Alpha',
'Intended Audience :: Developers',
'Intended Audience :: Education',
'Intended Audience :: Financial and Insurance Industry',
'License :: OSI Approved :: Apache Software License',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3.4',
'Programming Language :: Python :: 3.5',
'Programming Language :: Python :: 3.6',
'Natural Language :: English',
'Topic :: Scientific/Engineering :: Mathematics',
'Topic :: Software Development :: Libraries :: Python Modules',
'Topic :: Software Development :: Libraries',
'Operating System :: OS Independent',
],
license='Apache 2.0',
keywords='tensorflow quantitative finance hpc gpu option pricing',
package_data={
'tf_quant_finance': [
'third_party/sobol_data/new-joe-kuo.6.21201',
'third_party/sobol_data/LICENSE'
]
},
)
| # 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 or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# ==============================================================================
"""Setup for pip package."""
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from setuptools import find_packages
from setuptools import setup
from setuptools.dist import Distribution
__version__ = '0.0.1dev'
REQUIRED_PACKAGES = [
'tensorflow >= 1.12.0',
]
project_name = 'tf-quant-finance'
description = 'High performance Tensorflow library for quantitative finance.'
class BinaryDistribution(Distribution):
"""This class is needed in order to create OS specific wheels."""
def has_ext_modules(self):
return True
setup(
name=project_name,
version=__version__,
description=description,
author='Google Inc.',
author_email='tf-quant-finance@google.com',
# Contained modules and scripts.
packages=find_packages(),
install_requires=REQUIRED_PACKAGES,
# Add in any packaged data.
include_package_data=True,
zip_safe=False,
distclass=BinaryDistribution,
# PyPI package information.
classifiers=[
'Development Status :: 2 - Pre-Alpha',
'Intended Audience :: Developers',
'Intended Audience :: Education',
'Intended Audience :: Financial and Insurance Industry',
'License :: OSI Approved :: Apache Software License',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3.4',
'Programming Language :: Python :: 3.5',
'Programming Language :: Python :: 3.6',
'Natural Language :: English',
'Topic :: Scientific/Engineering :: Mathematics',
'Topic :: Software Development :: Libraries :: Python Modules',
'Topic :: Software Development :: Libraries',
],
license='Apache 2.0',
keywords='tensorflow quantitative finance hpc gpu option pricing',
package_data={
'tf_quant_finance': [
'third_party/sobol_data/new-joe-kuo.6.21201',
'third_party/sobol_data/LICENSE'
]
},
)
| apache-2.0 | Python |
89e8574ee30b52a3879624612b20b34516ef05da | Bump version | AASHE/iss | setup.py | setup.py | #!/usr/bin/env python
from setuptools import setup
import os
# Utility function to read README file
def read(fname):
return open(os.path.join(os.path.dirname(__file__), fname)).read()
setup(
name='iss',
version='2.0',
description="Ideally Single Source app for Salesforce data.",
author='Scott Johnson',
author_email='scott@aashe.org',
url='https://github.com/aashe/iss',
long_description=read("README.md"),
packages=[
'iss',
],
include_package_data=True,
classifiers=[
'Environment :: Web Environment',
'Intended Audience :: Developers',
'License :: OSI Approved :: BSD License',
'Operating System :: OS Independent',
'Programming Language :: Python :: 2.6',
'Programming Language :: Python :: 2.7',
'Framework :: Django',
],
install_requires=["Django>=1.4,<1.9",
"beatbox==32.1"]
)
| #!/usr/bin/env python
from setuptools import setup
import os
# Utility function to read README file
def read(fname):
return open(os.path.join(os.path.dirname(__file__), fname)).read()
setup(
name='iss',
version='1.1.2',
description="Ideally Single Source app for Salesforce data.",
author='Bob Erb',
author_email='bob.erb@aashe.org',
url='https://github.com/aashe/iss',
long_description=read("README.md"),
packages=[
'iss',
],
include_package_data=True,
classifiers=[
'Environment :: Web Environment',
'Intended Audience :: Developers',
'License :: OSI Approved :: BSD License',
'Operating System :: OS Independent',
'Programming Language :: Python :: 2.6',
'Programming Language :: Python :: 2.7',
'Framework :: Django',
],
install_requires=["Django>=1.4,<1.9",
"beatbox==32.1"]
)
| mit | Python |
c04dacd384d62d5fcf5db2028a9b8d8206ca32bd | bump version | ipdata/python | setup.py | setup.py | import pathlib
from setuptools import setup
# The directory containing this file
HERE = pathlib.Path(__file__).parent
# The text of the README file
README = (HERE / "README.md").read_text()
# This call to setup() does all the work
setup(
name="ipdata",
version="3.3.8",
description="Python Client for the ipdata IP Geolocation API",
long_description=README,
long_description_content_type="text/markdown",
url="https://github.com/ipdata/python",
author="Jonathan Kosgei",
author_email="jonatha@ipdata.co",
license="MIT",
classifiers=[
"License :: OSI Approved :: MIT License",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.7",
],
packages=["ipdata"],
include_package_data=True,
install_requires=["requests", "ipaddress", "click"],
entry_points={
'console_scripts': [
'ipdata = ipdata.cli:todo',
]
},
)
| import pathlib
from setuptools import setup
# The directory containing this file
HERE = pathlib.Path(__file__).parent
# The text of the README file
README = (HERE / "README.md").read_text()
# This call to setup() does all the work
setup(
name="ipdata",
version="3.3.7",
description="Python Client for the ipdata IP Geolocation API",
long_description=README,
long_description_content_type="text/markdown",
url="https://github.com/ipdata/python",
author="Jonathan Kosgei",
author_email="jonatha@ipdata.co",
license="MIT",
classifiers=[
"License :: OSI Approved :: MIT License",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.7",
],
packages=["ipdata"],
include_package_data=True,
install_requires=["requests", "ipaddress", "click"],
entry_points={
'console_scripts': [
'ipdata = ipdata.cli:todo',
]
},
)
| mit | Python |
f2b8683f2ba4d5050bf03d29ac227a1493b1e630 | Revert verstion. | twisted/twistedchecker | setup.py | setup.py | #!/usr/bin/env python
# Copyright (c) Twisted Matrix Laboratories.
# See LICENSE for details.
from setuptools import find_packages, setup
setup(
name='TwistedChecker',
description='A Twisted coding standard compliance checker.',
version='0.2.0',
author='Twisted Matrix Laboratories',
author_email='twisted-python@twistedmatrix.com',
url='https://github.com/twisted/twistedchecker',
packages=find_packages(),
package_data={
"twistedchecker": ["configuration/pylintrc"]
},
scripts=[
'bin/twistedchecker'
],
license='MIT',
classifiers=[
"Development Status :: 3 - Alpha",
"Environment :: Console",
"Intended Audience :: Developers",
"License :: OSI Approved :: MIT License",
"Programming Language :: Python",
"Programming Language :: Python :: 2",
"Programming Language :: Python :: 2.6",
"Programming Language :: Python :: 2.7",
"Topic :: Software Development :: Quality Assurance"
],
keywords=[
"twisted", "checker", "compliance", "pep8"
],
install_requires=[
"pylint == 0.26.0",
"logilab-common == 0.62.0",
"pep8 == 1.5.6"
],
long_description=file('README.rst').read()
)
| #!/usr/bin/env python
# Copyright (c) Twisted Matrix Laboratories.
# See LICENSE for details.
from setuptools import find_packages, setup
setup(
name='TwistedChecker',
description='A Twisted coding standard compliance checker.',
version='0.2.1',
author='Twisted Matrix Laboratories',
author_email='twisted-python@twistedmatrix.com',
url='https://github.com/twisted/twistedchecker',
packages=find_packages(),
package_data={
"twistedchecker": ["configuration/pylintrc"]
},
scripts=[
'bin/twistedchecker'
],
license='MIT',
classifiers=[
"Development Status :: 3 - Alpha",
"Environment :: Console",
"Intended Audience :: Developers",
"License :: OSI Approved :: MIT License",
"Programming Language :: Python",
"Programming Language :: Python :: 2",
"Programming Language :: Python :: 2.6",
"Programming Language :: Python :: 2.7",
"Topic :: Software Development :: Quality Assurance"
],
keywords=[
"twisted", "checker", "compliance", "pep8"
],
install_requires=[
"pylint == 0.26.0",
"logilab-common == 0.62.0",
"pep8 == 1.5.6"
],
long_description=file('README.rst').read()
)
| mit | Python |
28e615f8a99dc2aa0d178266e9196ccfadc55ea9 | fix underscores in package name | pombredanne/django-rest-framework-collection-json,advisory/django-rest-framework-collection-json | setup.py | setup.py | from setuptools import setup, find_packages
setup(
name='djangorestframework-collection-json',
version='0.0.1_dev_2',
description='Collection+JSON support for Django REST Framework',
author='Advisory Board Company',
packages=find_packages(exclude=['']),
install_requires=['djangorestframework'],
classifiers=['Private :: Do Not Upload to PyPI'],
include_package_data=True,
test_suite='tests.runtests.main',
)
| from setuptools import setup, find_packages
setup(
name='djangorestframework_collection_json',
version='0.0.1_dev_2',
description='Collection+JSON support for Django REST Framework',
author='Advisory Board Company',
packages=find_packages(exclude=['']),
install_requires=['djangorestframework'],
classifiers=['Private :: Do Not Upload to PyPI'],
include_package_data=True,
test_suite='tests.runtests.main',
)
| mit | Python |
7abb2f73879a5d73d9c0b52bc321f793b378ef9f | Remove buddies when they leave | ceibal-tatu/sugar-toolkit,ceibal-tatu/sugar-toolkit-gtk3,puneetgkaur/sugar-toolkit-gtk3,Daksh/sugar-toolkit-gtk3,quozl/sugar-toolkit-gtk3,gusDuarte/sugar-toolkit-gtk3,ceibal-tatu/sugar-toolkit-gtk3,tchx84/debian-pkg-sugar-toolkit-gtk3,sugarlabs/sugar-toolkit,sugarlabs/sugar-toolkit-gtk3,manuq/sugar-toolkit-gtk3,godiard/sugar-toolkit-gtk3,godiard/sugar-toolkit-gtk3,quozl/sugar-toolkit-gtk3,Daksh/sugar-toolkit-gtk3,ceibal-tatu/sugar-toolkit,tchx84/sugar-toolkit-gtk3,i5o/sugar-toolkit-gtk3,gusDuarte/sugar-toolkit-gtk3,godiard/sugar-toolkit-gtk3,tchx84/debian-pkg-sugar-toolkit,sugarlabs/sugar-toolkit,manuq/sugar-toolkit-gtk3,gusDuarte/sugar-toolkit-gtk3,tchx84/sugar-toolkit-gtk3,i5o/sugar-toolkit-gtk3,puneetgkaur/backup_sugar_sugartoolkit,sugarlabs/sugar-toolkit-gtk3,ceibal-tatu/sugar-toolkit-gtk3,sugarlabs/sugar-toolkit-gtk3,quozl/sugar-toolkit-gtk3,tchx84/debian-pkg-sugar-toolkit,puneetgkaur/backup_sugar_sugartoolkit,puneetgkaur/backup_sugar_sugartoolkit,puneetgkaur/sugar-toolkit-gtk3,puneetgkaur/sugar-toolkit-gtk3,quozl/sugar-toolkit-gtk3,tchx84/sugar-toolkit-gtk3,samdroid-apps/sugar-toolkit-gtk3,samdroid-apps/sugar-toolkit-gtk3,manuq/sugar-toolkit-gtk3,samdroid-apps/sugar-toolkit-gtk3,samdroid-apps/sugar-toolkit-gtk3,tchx84/debian-pkg-sugar-toolkit-gtk3,tchx84/debian-pkg-sugar-toolkit-gtk3,Daksh/sugar-toolkit-gtk3,gusDuarte/sugar-toolkit-gtk3,tchx84/debian-pkg-sugar-toolkit,i5o/sugar-toolkit-gtk3,sugarlabs/sugar-toolkit,sugarlabs/sugar-toolkit,ceibal-tatu/sugar-toolkit,i5o/sugar-toolkit-gtk3 | shell/frame/RightPanel.py | shell/frame/RightPanel.py | import goocanvas
from frame.PanelWindow import PanelWindow
from sugar.canvas.IconItem import IconItem
from sugar.canvas.IconColor import IconColor
from sugar.canvas.GridLayout import GridGroup
from sugar.canvas.GridLayout import GridConstraints
from sugar.presence import PresenceService
class RightPanel(GridGroup):
def __init__(self, shell, friends):
GridGroup.__init__(self, 1, 10)
self._shell = shell
self._friends = friends
self._activity_ps = None
self._joined_hid = -1
self._left_hid = -1
self._buddies = {}
self._pservice = PresenceService.get_instance()
self._pservice.connect('activity-appeared',
self.__activity_appeared_cb)
shell.connect('activity-changed', self.__activity_changed_cb)
def add(self, buddy):
icon = IconItem(icon_name='stock-buddy',
color=IconColor(buddy.get_color()))
icon.connect('clicked', self.__buddy_clicked_cb, buddy)
row = self.get_n_children()
constraints = GridConstraints(0, row , 1, 1, 6)
self._layout.set_constraints(icon, constraints)
self.add_child(icon)
self._buddies[buddy.get_name()] = icon
def remove(self, buddy):
i = self.find_child(self._buddies[buddy.get_name()])
self.remove_child(i)
def clear(self):
while (self.get_n_children() > 0):
self.remove_child(0)
self._buddies = {}
def __activity_appeared_cb(self, pservice, activity_ps):
activity = self._shell.get_current_activity()
if activity_ps.get_id() == activity.get_id():
self._set_activity_ps(activity_ps)
def _set_activity_ps(self, activity_ps):
if self._activity_ps == activity_ps:
return
if self._joined_hid > 0:
self._activity_ps.disconnect(self._joined_hid)
self._joined_hid = -1
if self._left_hid > 0:
self._activity_ps.disconnect(self._left_hid)
self._left_hid = -1
self._activity_ps = activity_ps
self.clear()
if activity_ps != None:
for buddy in activity_ps.get_joined_buddies():
self.add(buddy)
self._joined_hid = activity_ps.connect(
'buddy-joined', self.__buddy_joined_cb)
self._left_hid = activity_ps.connect(
'buddy-left', self.__buddy_left_cb)
def __activity_changed_cb(self, group, activity):
activity_ps = self._pservice.get_activity(activity.get_id())
self._set_activity_ps(activity_ps)
def __buddy_joined_cb(self, activity, buddy):
self.add(buddy)
def __buddy_left_cb(self, activity, buddy):
self.remove(buddy)
def __buddy_clicked_cb(self, icon, buddy):
self._friends.add_buddy(buddy)
| import goocanvas
from frame.PanelWindow import PanelWindow
from sugar.canvas.IconItem import IconItem
from sugar.canvas.IconColor import IconColor
from sugar.canvas.GridLayout import GridGroup
from sugar.canvas.GridLayout import GridConstraints
from sugar.presence import PresenceService
class RightPanel(GridGroup):
def __init__(self, shell, friends):
GridGroup.__init__(self, 1, 10)
self._shell = shell
self._friends = friends
self._activity_ps = None
self._joined_hid = -1
self._left_hid = -1
self._pservice = PresenceService.get_instance()
self._pservice.connect('activity-appeared',
self.__activity_appeared_cb)
shell.connect('activity-changed', self.__activity_changed_cb)
def add(self, buddy):
icon = IconItem(icon_name='stock-buddy',
color=IconColor(buddy.get_color()))
icon.connect('clicked', self.__buddy_clicked_cb, buddy)
row = self.get_n_children()
constraints = GridConstraints(0, row , 1, 1, 6)
self._layout.set_constraints(icon, constraints)
self.add_child(icon)
def remove(self, buddy):
pass
def clear(self):
while (self.get_n_children() > 0):
self.remove_child(0)
def __activity_appeared_cb(self, pservice, activity_ps):
activity = self._shell.get_current_activity()
if activity_ps.get_id() == activity.get_id():
self._set_activity_ps(activity_ps)
def _set_activity_ps(self, activity_ps):
if self._activity_ps == activity_ps:
return
if self._joined_hid > 0:
self._activity_ps.disconnect(self._joined_hid)
self._joined_hid = -1
if self._left_hid > 0:
self._activity_ps.disconnect(self._left_hid)
self._left_hid = -1
self._activity_ps = activity_ps
self.clear()
if activity_ps != None:
for buddy in activity_ps.get_joined_buddies():
self.add(buddy)
self._joined_hid = activity_ps.connect(
'buddy-joined', self.__buddy_joined_cb)
self._left_hid = activity_ps.connect(
'buddy-left', self.__buddy_left_cb)
def __activity_changed_cb(self, group, activity):
activity_ps = self._pservice.get_activity(activity.get_id())
self._set_activity_ps(activity_ps)
def __buddy_joined_cb(self, activity, buddy):
self.add(buddy)
def __buddy_left_cb(self, activity, buddy):
self.remove(buddy)
def __buddy_clicked_cb(self, icon, buddy):
self._friends.add_buddy(buddy)
| lgpl-2.1 | Python |
16f1afb7be694d237350376e9defec466554c7d7 | Add myself as maintainer in setup.py. | brilliant-org/django-nose,harukaeru/django-nose,mzdaniel/django-nose,krinart/django-nose,franciscoruiz/django-nose,alexhayes/django-nose,millerdev/django-nose,aristiden7o/django-nose,dgladkov/django-nose,mzdaniel/django-nose,fabiosantoscode/django-nose-123-fix,dgladkov/django-nose,brilliant-org/django-nose,krinart/django-nose,daineX/django-nose,fabiosantoscode/django-nose-123-fix,daineX/django-nose,Deepomatic/django-nose,360youlun/django-nose,sociateru/django-nose,millerdev/django-nose,aristiden7o/django-nose,sociateru/django-nose,franciscoruiz/django-nose,Deepomatic/django-nose,alexhayes/django-nose,360youlun/django-nose,harukaeru/django-nose | setup.py | setup.py | import os
from setuptools import setup, find_packages
ROOT = os.path.abspath(os.path.dirname(__file__))
setup(
name='django-nose',
version='1.0',
description='Django test runner that uses nose',
long_description=open(os.path.join(ROOT, 'README.rst')).read(),
author='Jeff Balogh',
author_email='me@jeffbalogh.org',
maintainer='Erik Rose',
maintainer_email='erikrose@grinchcentral.com',
url='http://github.com/jbalogh/django-nose',
license='BSD',
packages=find_packages(exclude=['testapp','testapp/*']),
include_package_data=True,
zip_safe=False,
install_requires=['nose', 'Django'],
tests_require=['south'],
# This blows up tox runs that install django-nose into a virtualenv,
# because it causes Nose to import django_nose.runner before the Django
# settings are initialized, leading to a mess of errors. There's no reason
# we need FixtureBundlingPlugin declared as an entrypoint anyway, since you
# need to be using django-nose to find the it useful, and django-nose knows
# about it intrinsically.
#entry_points="""
# [nose.plugins.0.10]
# fixture_bundler = django_nose.fixture_bundling:FixtureBundlingPlugin
# """,
classifiers=[
'Development Status :: 5 - Production/Stable',
'Environment :: Web Environment',
'Framework :: Django',
'Intended Audience :: Developers',
'License :: OSI Approved :: BSD License',
'Operating System :: OS Independent',
'Programming Language :: Python',
'Topic :: Software Development :: Libraries :: Python Modules',
]
)
| import os
from setuptools import setup, find_packages
ROOT = os.path.abspath(os.path.dirname(__file__))
setup(
name='django-nose',
version='1.0',
description='Django test runner that uses nose',
long_description=open(os.path.join(ROOT, 'README.rst')).read(),
author='Jeff Balogh',
author_email='me@jeffbalogh.org',
url='http://github.com/jbalogh/django-nose',
license='BSD',
packages=find_packages(exclude=['testapp','testapp/*']),
include_package_data=True,
zip_safe=False,
install_requires=['nose'],
tests_require=['Django', 'south'],
# This blows up tox runs that install django-nose into a virtualenv,
# because it causes Nose to import django_nose.runner before the Django
# settings are initialized, leading to a mess of errors. There's no reason
# we need FixtureBundlingPlugin declared as an entrypoint anyway, since you
# need to be using django-nose to find the it useful, and django-nose knows
# about it intrinsically.
#entry_points="""
# [nose.plugins.0.10]
# fixture_bundler = django_nose.fixture_bundling:FixtureBundlingPlugin
# """,
classifiers=[
'Development Status :: 4 - Beta',
'Environment :: Web Environment',
'Framework :: Django',
'Intended Audience :: Developers',
'License :: OSI Approved :: BSD License',
'Operating System :: OS Independent',
'Programming Language :: Python',
'Topic :: Software Development :: Libraries :: Python Modules',
]
)
| bsd-3-clause | Python |
e9d0db497d715ccb916f3e78bb023ac8294d2d60 | Update setup.py package list | sapiu/django-moderation,pombredanne/django-moderation,pombredanne/django-moderation,sapiu/django-moderation | setup.py | setup.py | from setuptools import setup, find_packages
import os
import sys
version = '0.3.6'
tests_require = ['django>=1.4.8,<1.7', 'django-webtest>=1.5.7,<1.6',
'webtest>=2.0,<2.1', 'mock', 'pillow', 'ipdb']
# ipython>2 is only supported on Python 2.7+
if sys.hexversion < 0x02070000:
tests_require = ['ipython>=0.10,<2'] + tests_require
if sys.hexversion >= 0x03000000:
tests_require = ['unittest2py3k'] + tests_require
else:
tests_require = ['unittest2'] + tests_require
setup(name='django-moderation',
version=version,
description="Generic Django objects moderation application",
long_description=open("README.rst").read() + "\n" +
open(os.path.join("docs", "history.rst")).read(),
classifiers=[
'Development Status :: 4 - Beta',
'Environment :: Web Environment',
'Intended Audience :: Developers',
'License :: OSI Approved :: BSD License',
'Operating System :: OS Independent',
'Programming Language :: Python',
'Framework :: Django',
],
keywords='django moderation models',
author='Dominik Szopa',
author_email='dszopa@gmail.com',
url='http://github.com/dominno/django-moderation',
license='BSD',
packages=find_packages('.', exclude=('tests', 'example_project')),
include_package_data=True,
tests_require=tests_require,
test_suite='runtests.runtests',
install_requires=[
'django>=1.4.8,<1.7',
'setuptools',
],
zip_safe=False,
)
| from setuptools import setup, find_packages
import os
import sys
version = '0.3.6'
tests_require = ['django>=1.4.8,<1.7', 'django-webtest>=1.5.7,<1.6',
'webtest>=2.0,<2.1', 'mock', 'pillow', 'ipdb']
# ipython>2 is only supported on Python 2.7+
if sys.hexversion < 0x02070000:
tests_require = ['ipython>=0.10,<2'] + tests_require
if sys.hexversion >= 0x03000000:
tests_require = ['unittest2py3k'] + tests_require
else:
tests_require = ['unittest2'] + tests_require
setup(name='django-moderation',
version=version,
description="Generic Django objects moderation application",
long_description=open("README.rst").read() + "\n" +
open(os.path.join("docs", "history.rst")).read(),
classifiers=[
'Development Status :: 4 - Beta',
'Environment :: Web Environment',
'Intended Audience :: Developers',
'License :: OSI Approved :: BSD License',
'Operating System :: OS Independent',
'Programming Language :: Python',
'Framework :: Django',
],
keywords='django moderation models',
author='Dominik Szopa',
author_email='dszopa@gmail.com',
url='http://github.com/dominno/django-moderation',
license='BSD',
packages = find_packages('.'),
include_package_data=True,
tests_require=tests_require,
test_suite='runtests.runtests',
install_requires=[
'django>=1.4.8,<1.7',
'setuptools',
],
zip_safe=False,
)
| bsd-3-clause | Python |
0e1aab0a03f2b2b56d6d2ad184daba1154ca9a9c | Upgrade vertica-python to 0.5.5 | dbcli/vcli,dbcli/vcli | setup.py | setup.py | import ast
import re
from setuptools import setup, find_packages
_version_re = re.compile(r'__version__\s+=\s+(.*)')
with open('vcli/__init__.py', 'rb') as f:
version = str(ast.literal_eval(_version_re.search(
f.read().decode('utf-8')).group(1)))
description = 'Vertica CLI with auto-completion and syntax highlighting'
setup(
name='vcli',
author='Chang-Hung Liang',
author_email='eliang.cs@gmail.com',
version=version,
license='LICENSE.txt',
url='http://github.com/dbcli/vcli',
packages=find_packages(),
package_data={'vcli': ['vclirc']},
description=description,
long_description=open('README.rst').read(),
install_requires=[
'click >= 4.1',
'configobj >= 5.0.6',
'prompt_toolkit==0.57',
'Pygments >= 2.0', # Pygments has to be Capitalcased. WTF?
'sqlparse == 0.1.16',
'vertica-python==0.5.5',
'setproctitle >= 1.1.9'
],
entry_points='''
[console_scripts]
vcli=vcli.main:cli
''',
classifiers=[
'Development Status :: 3 - Alpha',
'Intended Audience :: Developers',
'License :: OSI Approved :: BSD License',
'Operating System :: Unix',
'Programming Language :: Python',
'Programming Language :: Python :: 2.6',
'Programming Language :: Python :: 2.7',
'Programming Language :: SQL',
'Topic :: Database',
'Topic :: Database :: Front-Ends',
'Topic :: Software Development',
'Topic :: Software Development :: Libraries :: Python Modules',
],
)
| import ast
import re
from setuptools import setup, find_packages
_version_re = re.compile(r'__version__\s+=\s+(.*)')
with open('vcli/__init__.py', 'rb') as f:
version = str(ast.literal_eval(_version_re.search(
f.read().decode('utf-8')).group(1)))
description = 'Vertica CLI with auto-completion and syntax highlighting'
setup(
name='vcli',
author='Chang-Hung Liang',
author_email='eliang.cs@gmail.com',
version=version,
license='LICENSE.txt',
url='http://github.com/dbcli/vcli',
packages=find_packages(),
package_data={'vcli': ['vclirc']},
description=description,
long_description=open('README.rst').read(),
install_requires=[
'click >= 4.1',
'configobj >= 5.0.6',
'prompt_toolkit==0.57',
'Pygments >= 2.0', # Pygments has to be Capitalcased. WTF?
'sqlparse == 0.1.16',
'vertica-python==0.5.2',
'setproctitle >= 1.1.9'
],
entry_points='''
[console_scripts]
vcli=vcli.main:cli
''',
classifiers=[
'Development Status :: 3 - Alpha',
'Intended Audience :: Developers',
'License :: OSI Approved :: BSD License',
'Operating System :: Unix',
'Programming Language :: Python',
'Programming Language :: Python :: 2.6',
'Programming Language :: Python :: 2.7',
'Programming Language :: SQL',
'Topic :: Database',
'Topic :: Database :: Front-Ends',
'Topic :: Software Development',
'Topic :: Software Development :: Libraries :: Python Modules',
],
)
| bsd-3-clause | Python |
d155c998cfbe53df2d49445cb59811451f75c8b2 | Fix syntax | Ogaday/sapi-python-client,Ogaday/sapi-python-client | setup.py | setup.py | from setuptools import setup, find_packages
import kbcstorage
with open("README.md") as f:
readme = f.read()
setup(
name='kbcstorage',
version=kbcstorage.__version__,
url='https://github.com/keboola/sapi-python-client',
download_url='https://github.com/keboola/sapi-python-client',
packages=find_packages(),
install_requires=[
'boto3',
'requests'
],
long_description=readme,
license="MIT"
)
| from setuptools import setup, find_packages
import kbcstorage
with open("README.md") as f:
readme = f.read()
setup(
name='kbcstorage',
version=kbcstorage.__version__,
url='https://github.com/keboola/sapi-python-client',
download_url='https://github.com/keboola/sapi-python-client',
packages=find_packages(),
install_requires=[
'boto3',
'requests'
]
long_description=readme,
license="MIT"
)
| mit | Python |
e4b5c7f0c3382c61a27f63a6665f379056f19788 | Update the version to a pre-release number (#117) | quiltdata/quilt,quiltdata/quilt-compiler,quiltdata/quilt-compiler,quiltdata/quilt,quiltdata/quilt,quiltdata/quilt-compiler,quiltdata/quilt,quiltdata/quilt-compiler,quiltdata/quilt | setup.py | setup.py | from setuptools import setup, find_packages
def readme():
readme_short = """
``quilt`` is a command-line utility that builds, pushes, and installs
data packages. A `data package <https://blog.quiltdata.com/data-packages-for-fast-reproducible-python-analysis-c74b78015c7f>`_
is a versioned bundle of serialized data wrapped in a Python module.
``quilt`` pushes to and pulls from the package registry at quiltdata.com.
Visit `quiltdata.com <https://quiltdata.com>`_ for docs and more.
"""
return readme_short
setup(
name="quilt",
version="2.5pre1",
packages=find_packages(),
description='Quilt is an open-source data frame registry',
long_description=readme(),
classifiers=[
'Development Status :: 3 - Alpha',
'Intended Audience :: Developers',
'Operating System :: OS Independent',
'Programming Language :: Python',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3.4',
'Programming Language :: Python :: 3.5',
'Programming Language :: Python :: 3.6',
],
author='quiltdata',
author_email='contact@quiltdata.io',
license='LICENSE',
url='https://github.com/quiltdata/quilt',
download_url='https://github.com/quiltdata/quilt/releases/tag/2.4.1-beta',
keywords='quilt quiltdata shareable data dataframe package platform pandas',
install_requires=[
'appdirs>=1.4.0',
'future>=0.16.0',
'packaging>=16.8',
'pandas>=0.19.2',
'pyarrow>=0.4.0',
'pyOpenSSL>=16.2.0',
'pyyaml>=3.12',
'requests>=2.12.4',
'responses>=0.5.1',
'six>=1.10.0',
'tables>=3.3.0',
'tqdm>=4.11.2',
'xlrd>=1.0.0',
],
include_package_data=True,
entry_points={
'console_scripts': ['quilt=quilt.tools.main:main'],
}
)
| from setuptools import setup, find_packages
def readme():
readme_short = """
``quilt`` is a command-line utility that builds, pushes, and installs
data packages. A `data package <https://blog.quiltdata.com/data-packages-for-fast-reproducible-python-analysis-c74b78015c7f>`_
is a versioned bundle of serialized data wrapped in a Python module.
``quilt`` pushes to and pulls from the package registry at quiltdata.com.
Visit `quiltdata.com <https://quiltdata.com>`_ for docs and more.
"""
return readme_short
setup(
name="quilt",
version="2.4.1",
packages=find_packages(),
description='Quilt is an open-source data frame registry',
long_description=readme(),
classifiers=[
'Development Status :: 3 - Alpha',
'Intended Audience :: Developers',
'Operating System :: OS Independent',
'Programming Language :: Python',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3.4',
'Programming Language :: Python :: 3.5',
'Programming Language :: Python :: 3.6',
],
author='quiltdata',
author_email='contact@quiltdata.io',
license='LICENSE',
url='https://github.com/quiltdata/quilt',
download_url='https://github.com/quiltdata/quilt/releases/tag/2.4.1-beta',
keywords='quilt quiltdata shareable data dataframe package platform pandas',
install_requires=[
'appdirs>=1.4.0',
'future>=0.16.0',
'packaging>=16.8',
'pandas>=0.19.2',
'pyarrow>=0.4.0',
'pyOpenSSL>=16.2.0',
'pyyaml>=3.12',
'requests>=2.12.4',
'responses>=0.5.1',
'six>=1.10.0',
'tables>=3.3.0',
'tqdm>=4.11.2',
'xlrd>=1.0.0',
],
include_package_data=True,
entry_points={
'console_scripts': ['quilt=quilt.tools.main:main'],
}
)
| apache-2.0 | Python |
472a88c92ce86018b643f5b1a8f81e73df68a91d | Add download_url | usabilla/api-python | setup.py | setup.py | try:
from setuptools import setup, find_packages
except ImportError:
from distutils.core import setup
VERSION = '1.2.1'
setup(
name='usabilla',
version=VERSION,
description="Python client for Usabilla API",
license='MIT',
install_requires=['urllib3', 'requests'],
packages=find_packages(),
py_modules=['usabilla'],
author='Usabilla',
author_email='development@usabilla.com',
url='https://github.com/usabilla/api-python',
download_url='https://github.com/usabilla/api-python/tarball/%s' % VERSION,
test_suite='tests'
)
| try:
from setuptools import setup, find_packages
except ImportError:
from distutils.core import setup
setup(
name='usabilla',
version='1.2.1',
description="Python client for Usabilla API",
license='MIT',
install_requires=['urllib3', 'requests'],
packages=find_packages(),
py_modules=['usabilla'],
author='Usabilla',
author_email='development@usabilla.com',
url='https://github.com/usabilla/api-python',
test_suite='tests'
)
| mit | Python |
aae881111c5f51691310e4345cd1b348e81e6be2 | upgrade TA dependency (to remove distribute) | cadithealth/templatealchemy-jinja2 | setup.py | setup.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#------------------------------------------------------------------------------
# file: $Id$
# auth: Philip J Grabner <grabner@cadit.com>
# date: 2013/07/03
# copy: (C) Copyright 2013 Cadit Inc., see LICENSE.txt
#------------------------------------------------------------------------------
import os, sys, re
from setuptools import setup, find_packages
# require python 2.7+
if sys.hexversion < 0x02070000:
raise RuntimeError('This package requires python 2.7 or better')
heredir = os.path.abspath(os.path.dirname(__file__))
def read(*parts, **kw):
try: return open(os.path.join(heredir, *parts)).read()
except: return kw.get('default', '')
test_requires = [
'nose >= 1.3.0',
'coverage >= 3.5.3',
]
requires = [
'TemplateAlchemy >= 0.1.21',
'jinja2 >= 2.7',
'MarkupSafe >= 0.18',
]
classifiers = [
'Development Status :: 4 - Beta',
'Intended Audience :: Developers',
'Programming Language :: Python',
'Operating System :: OS Independent',
'Topic :: Software Development',
'Natural Language :: English',
'License :: OSI Approved :: MIT License',
'License :: Public Domain',
]
setup(
name = 'TemplateAlchemy-Jinja2',
version = read('VERSION.txt', default='0.0.1').strip()
description = 'Provides the Jinja2 template rendering engine to `TemplateAlchemy`',
long_description = read('README.rst'),
classifiers = classifiers,
author = 'Philip J Grabner, Cadit Health Inc',
author_email = 'oss@cadit.com',
url = 'http://github.com/cadithealth/templatealchemy-jinja2',
keywords = 'templatealchemy jinja2 driver',
packages = find_packages(),
namespace_packages = ['templatealchemy_driver'],
include_package_data = True,
zip_safe = True,
install_requires = requires,
tests_require = test_requires,
test_suite = 'templatealchemy',
entry_points = '',
license = 'MIT (http://opensource.org/licenses/MIT)',
)
#------------------------------------------------------------------------------
# end of $Id$
#------------------------------------------------------------------------------
| #!/usr/bin/env python
# -*- coding: utf-8 -*-
#------------------------------------------------------------------------------
# file: $Id$
# auth: Philip J Grabner <grabner@cadit.com>
# date: 2013/07/03
# copy: (C) Copyright 2013 Cadit Inc., see LICENSE.txt
#------------------------------------------------------------------------------
import os, sys, re
from setuptools import setup, find_packages
# require python 2.7+
assert(sys.version_info[0] > 2
or sys.version_info[0] == 2
and sys.version_info[1] >= 7)
here = os.path.abspath(os.path.dirname(__file__))
README = open(os.path.join(here, 'README.rst')).read()
test_requires = [
'nose >= 1.2.1',
'coverage >= 3.5.3',
]
requires = [
'TemplateAlchemy >= 0.1.18',
'jinja2 >= 2.7',
'MarkupSafe >= 0.18',
]
setup(
name = 'TemplateAlchemy-Jinja2',
version = '0.1.6',
description = 'Provides the Jinja2 template rendering engine to `TemplateAlchemy`',
long_description = README,
classifiers = [
'Development Status :: 4 - Beta',
'Intended Audience :: Developers',
'Programming Language :: Python',
'Operating System :: OS Independent',
'Topic :: Software Development',
'Natural Language :: English',
'License :: OSI Approved :: MIT License',
'License :: Public Domain',
],
author = 'Philip J Grabner, Cadit Health Inc',
author_email = 'oss@cadit.com',
url = 'http://github.com/cadithealth/templatealchemy-jinja2',
keywords = 'templatealchemy jinja2 driver',
packages = find_packages(),
namespace_packages = ['templatealchemy_driver'],
include_package_data = True,
zip_safe = True,
install_requires = requires,
tests_require = test_requires,
test_suite = 'templatealchemy',
entry_points = '',
license = 'MIT (http://opensource.org/licenses/MIT)',
)
#------------------------------------------------------------------------------
# end of $Id$
#------------------------------------------------------------------------------
| mit | Python |
7e94df10bb9fbbd16b1f15eaac5df01b77630f1d | Install extras during pip install; fixes devstack | openstack/heat,noironetworks/heat,varunarya10/heat,ntt-sic/heat,dragorosson/heat,gonzolino/heat,jasondunsmore/heat,maestro-hybrid-cloud/heat,jasondunsmore/heat,redhat-openstack/heat,srznew/heat,rh-s/heat,redhat-openstack/heat,rh-s/heat,miguelgrinberg/heat,dims/heat,dragorosson/heat,JioCloud/heat,srznew/heat,pratikmallya/heat,NeCTAR-RC/heat,JioCloud/heat,dims/heat,miguelgrinberg/heat,pshchelo/heat,maestro-hybrid-cloud/heat,steveb/heat,Triv90/Heat,citrix-openstack-build/heat,takeshineshiro/heat,rickerc/heat_audit,pshchelo/heat,NeCTAR-RC/heat,ntt-sic/heat,Triv90/Heat,varunarya10/heat,cwolferh/heat-scratch,pratikmallya/heat,citrix-openstack-build/heat,openstack/heat,cryptickp/heat,rickerc/heat_audit,steveb/heat,noironetworks/heat,rdo-management/heat,Triv90/Heat,gonzolino/heat,cryptickp/heat,rdo-management/heat,takeshineshiro/heat,cwolferh/heat-scratch | setup.py | setup.py | #!/usr/bin/python
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
# implied.
# See the License for the specific language governing permissions and
# limitations under the License.
import gettext
import os
import subprocess
import setuptools
from heat.openstack.common import setup
from heat import version
version.write_git_sha()
setuptools.setup(
name='heat',
version=version.HEAT_VERSION,
description='The heat project provides services for provisioning '
'virtual machines',
license='Apache License (2.0)',
author='Heat API Developers',
author_email='discuss@heat-api.org',
url='http://heat.openstack.org/',
cmdclass=setup.get_cmdclass(),
packages=setuptools.find_packages(exclude=['bin']),
include_package_data=True,
install_requires=['extras'],
classifiers=[
'Development Status :: 4 - Beta',
'License :: OSI Approved :: Apache Software License',
'Operating System :: POSIX :: Linux',
'Programming Language :: Python :: 2.6',
'Environment :: No Input/Output (Daemon)',
],
scripts=['bin/heat-cfn',
'bin/heat-api',
'bin/heat-api-cfn',
'bin/heat-api-cloudwatch',
'bin/heat-boto',
'bin/heat-engine',
'bin/heat-watch',
'bin/heat-db-setup',
'bin/heat-keystone-setup'],
py_modules=[])
| #!/usr/bin/python
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
# implied.
# See the License for the specific language governing permissions and
# limitations under the License.
import gettext
import os
import subprocess
import setuptools
from heat.openstack.common import setup
from heat import version
version.write_git_sha()
setuptools.setup(
name='heat',
version=version.HEAT_VERSION,
description='The heat project provides services for provisioning '
'virtual machines',
license='Apache License (2.0)',
author='Heat API Developers',
author_email='discuss@heat-api.org',
url='http://heat.openstack.org/',
cmdclass=setup.get_cmdclass(),
packages=setuptools.find_packages(exclude=['bin']),
include_package_data=True,
classifiers=[
'Development Status :: 4 - Beta',
'License :: OSI Approved :: Apache Software License',
'Operating System :: POSIX :: Linux',
'Programming Language :: Python :: 2.6',
'Environment :: No Input/Output (Daemon)',
],
scripts=['bin/heat-cfn',
'bin/heat-api',
'bin/heat-api-cfn',
'bin/heat-api-cloudwatch',
'bin/heat-boto',
'bin/heat-engine',
'bin/heat-watch',
'bin/heat-db-setup',
'bin/heat-keystone-setup'],
py_modules=[])
| apache-2.0 | Python |
cd7584645548758e59e05531d44121fb29c2e27c | Upgrade django-local-settings 1.0a8 => 1.0a10 | PSU-OIT-ARC/django-arcutils,wylee/django-arcutils,PSU-OIT-ARC/django-arcutils,wylee/django-arcutils | setup.py | setup.py | import sys
from setuptools import find_packages, setup
VERSION = '2.0.dev0'
install_requires = [
'django-local-settings>=1.0a10',
'stashward',
]
if sys.version_info[:2] < (3, 4):
install_requires.append('enum34')
setup(
name='django-arcutils',
version=VERSION,
url='https://github.com/PSU-OIT-ARC/django-arcutils',
author='PSU - OIT - ARC',
author_email='consultants@pdx.edu',
description='Common utilities used in ARC Django projects',
packages=find_packages(),
include_package_data=True,
zip_safe=False,
install_requires=install_requires,
extras_require={
'cas': [
'django-cas-client>=1.2.0',
],
'ldap': [
'ldap3>=0.9.9.1',
],
'dev': [
'django>=1.7',
'flake8',
'ldap3',
'mock',
'model_mommy',
],
},
entry_points="""
[console_scripts]
arcutils = arcutils.__main__:main
""",
classifiers=[
'Development Status :: 3 - Alpha',
'Framework :: Django',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.3',
'Programming Language :: Python :: 3.4',
],
)
| import sys
from setuptools import find_packages, setup
VERSION = '2.0.dev0'
install_requires = [
'django-local-settings>=1.0a8',
'stashward',
]
if sys.version_info[:2] < (3, 4):
install_requires.append('enum34')
setup(
name='django-arcutils',
version=VERSION,
url='https://github.com/PSU-OIT-ARC/django-arcutils',
author='PSU - OIT - ARC',
author_email='consultants@pdx.edu',
description='Common utilities used in ARC Django projects',
packages=find_packages(),
include_package_data=True,
zip_safe=False,
install_requires=install_requires,
extras_require={
'cas': [
'django-cas-client>=1.2.0',
],
'ldap': [
'ldap3>=0.9.9.1',
],
'dev': [
'django>=1.7',
'flake8',
'ldap3',
'mock',
'model_mommy',
],
},
entry_points="""
[console_scripts]
arcutils = arcutils.__main__:main
""",
classifiers=[
'Development Status :: 3 - Alpha',
'Framework :: Django',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.3',
'Programming Language :: Python :: 3.4',
],
)
| mit | Python |
35b49a952da9cb95fae4fd8eb25752ca9faee5ef | Update test deps: pytest-coverage -> pytest-cov | majerteam/quicklogging,majerteam/quicklogging | setup.py | setup.py |
try:
from setuptools import setup
except ImportError:
from distutils.core import setup
config = {
'description': 'Logging wrapper',
'author': 'Feth Arezki',
'url': 'https://github.com/majerteam/quicklogging',
'download_url': 'https://github.com/majerteam/quicklogging',
'author_email': 'tech@majerti.fr',
'version': '0.2',
'packages': ['quicklogging'],
'setup_requires': ['pytest-runner'],
'tests_require': ['pytest', 'pytest-cov', 'six', 'stringimporter>=0.1.3'],
'name': 'quicklogging'
}
setup(**config)
|
try:
from setuptools import setup
except ImportError:
from distutils.core import setup
config = {
'description': 'Logging wrapper',
'author': 'Feth Arezki',
'url': 'https://github.com/majerteam/quicklogging',
'download_url': 'https://github.com/majerteam/quicklogging',
'author_email': 'tech@majerti.fr',
'version': '0.2',
'packages': ['quicklogging'],
'setup_requires': ['pytest-runner'],
'tests_require': ['pytest', 'pytest-coverage', 'six', 'stringimporter>=0.1.3'],
'name': 'quicklogging'
}
setup(**config)
| mit | Python |
cf6ee37e17f0df159d96def76a5de7bff72e093f | fix installing scripts/budou.py | google/budou | setup.py | setup.py | # Copyright 2016 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 agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
import os
from setuptools import setup
def read_file(name):
with open(os.path.join(os.path.dirname(__file__), name), 'r') as f:
return f.read().strip()
setup(
name='budou',
version='0.8.10',
author='Shuhei Iitsuka',
author_email='tushuhei@google.com',
description='CJK Line Break Organizer',
license='Apache',
url='https://github.com/google/budou/',
packages=['budou'],
install_requires=read_file('requirements.txt').splitlines(),
tests_require=read_file('requirements_dev.txt').splitlines(),
long_description=open('README.md').read(),
long_description_content_type='text/markdown',
test_suite='test',
classifiers=[
'Development Status :: 3 - Alpha',
'Operating System :: OS Independent',
'Programming Language :: Python',
'License :: OSI Approved :: Apache Software License',
'Topic :: Software Development :: Libraries :: Python Modules',
],
)
| # Copyright 2016 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 agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
import os
from setuptools import setup
def read_file(name):
with open(os.path.join(os.path.dirname(__file__), name), 'r') as f:
return f.read().strip()
setup(
name='budou',
version='0.8.10',
author='Shuhei Iitsuka',
author_email='tushuhei@google.com',
description='CJK Line Break Organizer',
license='Apache',
url='https://github.com/google/budou/',
packages=['budou'],
install_requires=read_file('requirements.txt').splitlines(),
tests_require=read_file('requirements_dev.txt').splitlines(),
scripts=[
'budou/budou.py',
],
long_description=open('README.md').read(),
long_description_content_type='text/markdown',
test_suite='test',
classifiers=[
'Development Status :: 3 - Alpha',
'Operating System :: OS Independent',
'Programming Language :: Python',
'License :: OSI Approved :: Apache Software License',
'Topic :: Software Development :: Libraries :: Python Modules',
],
)
| apache-2.0 | Python |
fefe6684cd9e0d9d24a895e48a19f5ab633fe7af | Fix symlink function to check for Windows | raphael0202/spaCy,recognai/spaCy,aikramer2/spaCy,explosion/spaCy,aikramer2/spaCy,Gregory-Howard/spaCy,Gregory-Howard/spaCy,explosion/spaCy,honnibal/spaCy,spacy-io/spaCy,recognai/spaCy,raphael0202/spaCy,spacy-io/spaCy,raphael0202/spaCy,Gregory-Howard/spaCy,explosion/spaCy,recognai/spaCy,aikramer2/spaCy,spacy-io/spaCy,honnibal/spaCy,explosion/spaCy,spacy-io/spaCy,aikramer2/spaCy,recognai/spaCy,aikramer2/spaCy,raphael0202/spaCy,spacy-io/spaCy,explosion/spaCy,Gregory-Howard/spaCy,Gregory-Howard/spaCy,honnibal/spaCy,explosion/spaCy,aikramer2/spaCy,raphael0202/spaCy,recognai/spaCy,recognai/spaCy,spacy-io/spaCy,Gregory-Howard/spaCy,honnibal/spaCy,raphael0202/spaCy | spacy/compat.py | spacy/compat.py | # coding: utf8
from __future__ import unicode_literals
import six
import sys
import json
try:
import cPickle as pickle
except ImportError:
import pickle
try:
import copy_reg
except ImportError:
import copyreg as copy_reg
is_python2 = six.PY2
is_python3 = six.PY3
is_windows = sys.platform.startswith('win')
is_linux = sys.platform.startswith('linux')
is_osx = sys.platform == 'darwin'
if is_python2:
bytes_ = str
unicode_ = unicode
basestring_ = basestring
input_ = raw_input
json_dumps = lambda data: json.dumps(data, indent=2).decode('utf8')
elif is_python3:
bytes_ = bytes
unicode_ = str
basestring_ = str
input_ = input
json_dumps = lambda data: json.dumps(data, indent=2)
def symlink_to(orig, dest):
if is_python2 and is_windows:
import subprocess
subprocess.call(['mklink', '/d', unicode(orig), unicode(dest)], shell=True)
else:
orig.symlink_to(dest)
def is_config(python2=None, python3=None, windows=None, linux=None, osx=None):
return ((python2 == None or python2 == is_python2) and
(python3 == None or python3 == is_python3) and
(windows == None or windows == is_windows) and
(linux == None or linux == is_linux) and
(osx == None or osx == is_osx))
| # coding: utf8
from __future__ import unicode_literals
import six
import sys
import json
try:
import cPickle as pickle
except ImportError:
import pickle
try:
import copy_reg
except ImportError:
import copyreg as copy_reg
is_python2 = six.PY2
is_python3 = six.PY3
is_windows = sys.platform.startswith('win')
is_linux = sys.platform.startswith('linux')
is_osx = sys.platform == 'darwin'
if is_python2:
bytes_ = str
unicode_ = unicode
basestring_ = basestring
input_ = raw_input
json_dumps = lambda data: json.dumps(data, indent=2).decode('utf8')
elif is_python3:
bytes_ = bytes
unicode_ = str
basestring_ = str
input_ = input
json_dumps = lambda data: json.dumps(data, indent=2)
def symlink_to(orig, dest):
if is_python3:
orig.symlink_to(dest)
elif is_python2:
import subprocess
subprocess.call(['mklink', '/d', unicode(orig), unicode(dest)], shell=True)
def is_config(python2=None, python3=None, windows=None, linux=None, osx=None):
return ((python2 == None or python2 == is_python2) and
(python3 == None or python3 == is_python3) and
(windows == None or windows == is_windows) and
(linux == None or linux == is_linux) and
(osx == None or osx == is_osx))
| mit | Python |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.