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
11195079cbf302b15f0b3091c96aba7d79f0050e
Bump to v0.3.0
gisce/esios
setup.py
setup.py
from setuptools import setup, find_packages setup( name='esios', version='0.3.0', packages=find_packages(), url='https://github.com/gisce/esios', license='MIT', install_requires=['libsaas'], author='GISCE-TI, S.L.', author_email='devel@gisce.net', description='Interact with e.sios API', )
from setuptools import setup, find_packages setup( name='esios', version='0.2.0', packages=find_packages(), url='https://github.com/gisce/esios', license='MIT', install_requires=['libsaas'], author='GISCE-TI, S.L.', author_email='devel@gisce.net', description='Interact with e.sios API', )
mit
Python
705030fcfde9320cbb2c39e9548c246e3cda5e87
Update version and PyPi
hllau/html_node
setup.py
setup.py
from setuptools import setup, find_packages setup( name="HtmlNode", version="0.1.4", packages=find_packages(), description="A simple Python HTML generator", author="Hing-Lung Lau", author_email="lung220@gmail.com", url="http://github.com/hllau/html_node", license="Apache v2", keywords="html builder factory template" )
from setuptools import setup, find_packages setup( name="HtmlNode", version="0.1.3", packages=find_packages(), description="A simple Python HTML generator", author="Hing-Lung Lau", author_email="lung220@gmail.com", url="http://github.com/hllau/html_node", license="Apache v2", keywords="html builder factory template" )
apache-2.0
Python
e6f9e9fac32f2d68e597dbf6252ad4941cf3ed5a
Simplify setup.py
python-attrs/attrs,hynek/attrs
setup.py
setup.py
import codecs import os import re from setuptools import setup, find_packages ############################################################################### NAME = "attrs" PACKAGES = find_packages(where="src") META_PATH = os.path.join("src", "attr", "__init__.py") KEYWORDS = ["class", "attribute", "boilerplate"] CLASSIFIERS = [ "Development Status :: 5 - Production/Stable", "Intended Audience :: Developers", "Natural Language :: English", "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", "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.3", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: Implementation :: CPython", "Programming Language :: Python :: Implementation :: PyPy", "Topic :: Software Development :: Libraries :: Python Modules", ] INSTALL_REQUIRES = [] ############################################################################### HERE = os.path.abspath(os.path.dirname(__file__)) def read(*parts): """ Build an absolute path from *parts* and and return the contents of the resulting file. Assume UTF-8 encoding. """ with codecs.open(os.path.join(HERE, *parts), "rb", "utf-8") as f: return f.read() META_FILE = read(META_PATH) def find_meta(meta): """ Extract __*meta*__ from META_FILE. """ meta_match = re.search( r"^__{meta}__ = ['\"]([^'\"]*)['\"]".format(meta=meta), META_FILE, re.M ) if meta_match: return meta_match.group(1) raise RuntimeError("Unable to find __{meta}__ string.".format(meta=meta)) if __name__ == "__main__": setup( name=NAME, description=find_meta("description"), license=find_meta("license"), url=find_meta("uri"), version=find_meta("version"), author=find_meta("author"), author_email=find_meta("email"), maintainer=find_meta("author"), maintainer_email=find_meta("email"), keywords=KEYWORDS, long_description=read("README.rst"), packages=PACKAGES, package_dir={"": "src"}, zip_safe=False, classifiers=CLASSIFIERS, install_requires=INSTALL_REQUIRES, )
import codecs import os import re from setuptools import setup, find_packages ############################################################################### NAME = "attrs" PACKAGES = find_packages(where="src", exclude=["tests*"]) META_PATH = os.path.join("src", "attr", "__init__.py") KEYWORDS = ["class", "attribute", "boilerplate"] CLASSIFIERS = [ "Development Status :: 5 - Production/Stable", "Intended Audience :: Developers", "Natural Language :: English", "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", "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.3", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: Implementation :: CPython", "Programming Language :: Python :: Implementation :: PyPy", "Topic :: Software Development :: Libraries :: Python Modules", ] INSTALL_REQUIRES = [] ############################################################################### HERE = os.path.abspath(os.path.dirname(__file__)) def read(*parts): """ Build an absolute path from *parts* and and return the contents of the resulting file. Assume UTF-8 encoding. """ with codecs.open(os.path.join(HERE, *parts), "rb", "utf-8") as f: return f.read() META_FILE = read(META_PATH) def find_meta(meta): """ Extract __*meta*__ from META_FILE. """ meta_match = re.search( r"^__{meta}__ = ['\"]([^'\"]*)['\"]".format(meta=meta), META_FILE, re.M ) if meta_match: return meta_match.group(1) raise RuntimeError("Unable to find __{meta}__ string.".format(meta=meta)) if __name__ == "__main__": setup( name=NAME, description=find_meta("description"), license=find_meta("license"), url=find_meta("uri"), version=find_meta("version"), author=find_meta("author"), author_email=find_meta("email"), maintainer=find_meta("author"), maintainer_email=find_meta("email"), keywords=KEYWORDS, long_description=read("README.rst"), packages=PACKAGES, package_dir={"": "src"}, zip_safe=False, classifiers=CLASSIFIERS, install_requires=INSTALL_REQUIRES, )
mit
Python
739d48856d1b8460520083e799776316653ab1b7
Prepare openprocurement.tender.openua 2.3.27.
openprocurement/openprocurement.tender.openua
setup.py
setup.py
from setuptools import setup, find_packages import os version = '2.3.27' requires = [ 'setuptools', 'openprocurement.api>=2.3', ] test_requires = requires + [ 'webtest', 'python-coveralls', ] docs_requires = requires + [ 'sphinxcontrib-httpdomain', ] entry_points = { 'openprocurement.api.plugins': [ 'aboveThresholdUA = openprocurement.tender.openua:includeme' ] } setup(name='openprocurement.tender.openua', 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=[ "License :: OSI Approved :: Apache Software License", "Programming Language :: Python", ], keywords='', author='Quintagroup, Ltd.', author_email='info@quintagroup.com', url='https://github.com/openprocurement/openprocurement.tender.openua', license='Apache License 2.0', packages=find_packages(exclude=['ez_setup']), namespace_packages=['openprocurement', 'openprocurement.tender'], include_package_data=True, zip_safe=False, install_requires=requires, tests_require=test_requires, extras_require={'test': test_requires, 'docs': docs_requires}, test_suite="openprocurement.tender.openua.tests.main.suite", entry_points=entry_points )
from setuptools import setup, find_packages import os version = '2.3.26' requires = [ 'setuptools', 'openprocurement.api>=2.3', ] test_requires = requires + [ 'webtest', 'python-coveralls', ] docs_requires = requires + [ 'sphinxcontrib-httpdomain', ] entry_points = { 'openprocurement.api.plugins': [ 'aboveThresholdUA = openprocurement.tender.openua:includeme' ] } setup(name='openprocurement.tender.openua', 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=[ "License :: OSI Approved :: Apache Software License", "Programming Language :: Python", ], keywords='', author='Quintagroup, Ltd.', author_email='info@quintagroup.com', url='https://github.com/openprocurement/openprocurement.tender.openua', license='Apache License 2.0', packages=find_packages(exclude=['ez_setup']), namespace_packages=['openprocurement', 'openprocurement.tender'], include_package_data=True, zip_safe=False, install_requires=requires, tests_require=test_requires, extras_require={'test': test_requires, 'docs': docs_requires}, test_suite="openprocurement.tender.openua.tests.main.suite", entry_points=entry_points )
apache-2.0
Python
2d8eafef867bbfb434fcb4b8a6fc33a4db081441
add missing podhub.meh dependency
podhub-io/website
setup.py
setup.py
#!/usr/bin/env python 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='podhub.website', version='0.0.0+git', packages=find_packages(exclude=['ez_setup']), namespace_packages=['podhub'], include_package_data=True, license='MIT', description='website', long_description=README, url='https://github.com/podhub/website', author='Jon Chen', author_email='bsd@voltaire.sh', classifiers=[ 'Intended Audience :: Developers', 'License :: OSI Approved :: BSD License', 'Operating System :: POSIX :: Linux', 'Programming Language :: Python', 'Programming Language :: Python :: 3', 'Programming Language :: Python :: 3.2', 'Programming Language :: Python :: 3.3', 'Programming Language :: Python :: 3.4', ], install_requires=[ 'alembic==0.7.6', 'Flask==0.10.1', 'Flask-Migrate==1.4.0', 'Flask-Script==2.0.5', 'Flask-SQLAlchemy==2.0', 'itsdangerous==0.24', 'Jinja2==2.7.3', 'Mako==1.0.1', 'MarkupSafe==0.23', 'SQLAlchemy==1.0.4', 'Werkzeug==0.10.4', 'podhub.meh==0.0.111', ], scripts=[ 'scripts/podhub_site', ], )
#!/usr/bin/env python 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='podhub.website', version='0.0.0+git', packages=find_packages(exclude=['ez_setup']), namespace_packages=['podhub'], include_package_data=True, license='MIT', description='website', long_description=README, url='https://github.com/podhub/website', author='Jon Chen', author_email='bsd@voltaire.sh', classifiers=[ 'Intended Audience :: Developers', 'License :: OSI Approved :: BSD License', 'Operating System :: POSIX :: Linux', 'Programming Language :: Python', 'Programming Language :: Python :: 3', 'Programming Language :: Python :: 3.2', 'Programming Language :: Python :: 3.3', 'Programming Language :: Python :: 3.4', ], install_requires=[ 'alembic==0.7.6', 'Flask==0.10.1', 'Flask-Migrate==1.4.0', 'Flask-Script==2.0.5', 'Flask-SQLAlchemy==2.0', 'itsdangerous==0.24', 'Jinja2==2.7.3', 'Mako==1.0.1', 'MarkupSafe==0.23', 'SQLAlchemy==1.0.4', 'Werkzeug==0.10.4', ], scripts=[ 'scripts/podhub_site', ], )
apache-2.0
Python
f29bf0827723e3cddbed1cfbd5968ffb69dd7e6c
Update version number to 1.8.0
mentionllc/google-visualization-python,pib/chartfood
setup.py
setup.py
#!/usr/bin/python # # Copyright (C) 2009 Google Inc. # # 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. """Setup module for Google Visualization Python API.""" __author__ = "Misha Seltzer" import distutils.core import unittest import gviz_api_test class TestCommand(distutils.core.Command): """Class that provides the 'test' command for setup.""" user_options = [] def initialize_options(self): """Must override this method in the Command class.""" pass def finalize_options(self): """Must override this method in the Command class.""" pass def run(self): """The run method - running the tests on invocation.""" suite = unittest.TestLoader().loadTestsFromTestCase( gviz_api_test.DataTableTest) unittest.TextTestRunner().run(suite) distutils.core.setup( name="gviz_api.py", version="1.8.0", description="Python API for Google Visualization", long_description=""" The Python API for Google Visualization makes it easy to convert python data structures into Google Visualization JS code, DataTable JSon construction string or JSon response for Query object. """.strip(), author="Amit Weinstein, Misha Seltzer", license="Apache 2.0", url="http://code.google.com/p/google-visualization-python/", py_modules=["gviz_api"], cmdclass={"test": TestCommand}, )
#!/usr/bin/python # # Copyright (C) 2009 Google Inc. # # 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. """Setup module for Google Visualization Python API.""" __author__ = "Misha Seltzer" import distutils.core import unittest import gviz_api_test class TestCommand(distutils.core.Command): """Class that provides the 'test' command for setup.""" user_options = [] def initialize_options(self): """Must override this method in the Command class.""" pass def finalize_options(self): """Must override this method in the Command class.""" pass def run(self): """The run method - running the tests on invocation.""" suite = unittest.TestLoader().loadTestsFromTestCase( gviz_api_test.DataTableTest) unittest.TextTestRunner().run(suite) distutils.core.setup( name="gviz_api.py", version="1.7.1", description="Python API for Google Visualization", long_description=""" The Python API for Google Visualization makes it easy to convert python data structures into Google Visualization JS code, DataTable JSon construction string or JSon response for Query object. """.strip(), author="Amit Weinstein, Misha Seltzer", license="Apache 2.0", url="http://code.google.com/p/google-visualization-python/", py_modules=["gviz_api"], cmdclass={"test": TestCommand}, )
apache-2.0
Python
bebe2be26d21289bb43936d3895c4b29126d508c
Change rtfd -> readthedocs in package description
spatialaudio/nbsphinx,spatialaudio/nbsphinx,spatialaudio/nbsphinx
setup.py
setup.py
from setuptools import setup # "import" __version__ for line in open('nbsphinx.py'): if line.startswith('__version__'): exec(line) break setup( name='nbsphinx', version=__version__, py_modules=['nbsphinx'], install_requires=[ 'docutils', 'jinja2', 'nbconvert', 'traitlets', 'nbformat', 'sphinx>=1.3.2,!=1.5.0', ], author='Matthias Geier', author_email='Matthias.Geier@gmail.com', description='Jupyter Notebook Tools for Sphinx', long_description=open('README.rst').read(), license='MIT', keywords='Sphinx Jupyter notebook'.split(), url='http://nbsphinx.readthedocs.io/', platforms='any', classifiers=[ 'Framework :: Sphinx', 'Framework :: Sphinx :: Extension', 'Framework :: Jupyter', 'Intended Audience :: Education', 'Intended Audience :: Science/Research', 'License :: OSI Approved :: MIT License', 'Operating System :: OS Independent', 'Programming Language :: Python', 'Programming Language :: Python :: 3', 'Topic :: Documentation :: Sphinx', ], zip_safe=True, )
from setuptools import setup # "import" __version__ for line in open('nbsphinx.py'): if line.startswith('__version__'): exec(line) break setup( name='nbsphinx', version=__version__, py_modules=['nbsphinx'], install_requires=[ 'docutils', 'jinja2', 'nbconvert', 'traitlets', 'nbformat', 'sphinx>=1.3.2,!=1.5.0', ], author='Matthias Geier', author_email='Matthias.Geier@gmail.com', description='Jupyter Notebook Tools for Sphinx', long_description=open('README.rst').read(), license='MIT', keywords='Sphinx Jupyter notebook'.split(), url='http://nbsphinx.rtfd.io/', platforms='any', classifiers=[ 'Framework :: Sphinx', 'Framework :: Sphinx :: Extension', 'Framework :: Jupyter', 'Intended Audience :: Education', 'Intended Audience :: Science/Research', 'License :: OSI Approved :: MIT License', 'Operating System :: OS Independent', 'Programming Language :: Python', 'Programming Language :: Python :: 3', 'Topic :: Documentation :: Sphinx', ], zip_safe=True, )
mit
Python
c4aac06f299c99c3340726e0d283555df7cd4186
Add BeautifulSoup to the setup.py.
Awingu/django-saml2-idp,Awingu/django-saml2-idp,Awingu/django-saml2-idp
setup.py
setup.py
from setuptools import setup, find_packages setup( name='saml2idp', version='0.0.3', description='SAML 2.0 Django Application', long_description = open('README.rst', 'r').read() + open('AUTHORS.rst', 'r').read(), author='Unomena', author_email='dev@unomena.com', license='BSD', url='http://github.com/unomena/django-saml2-idp', packages = find_packages(), install_requires = [ ], tests_require=[ 'django-setuptest>=0.1.2', 'pysqlite>=2.5', 'BeautifulSoup==3.2.1', ], test_suite="setuptest.setuptest.SetupTestSuite", include_package_data=True, classifiers = [ "Programming Language :: Python", "License :: OSI Approved :: BSD License", "Development Status :: 4 - Beta", "Operating System :: OS Independent", "Framework :: Django", "Intended Audience :: Developers", "Topic :: Internet :: WWW/HTTP :: Dynamic Content", ], zip_safe=False, )
from setuptools import setup, find_packages setup( name='saml2idp', version='0.0.3', description='SAML 2.0 Django Application', long_description = open('README.rst', 'r').read() + open('AUTHORS.rst', 'r').read(), author='Unomena', author_email='dev@unomena.com', license='BSD', url='http://github.com/unomena/django-saml2-idp', packages = find_packages(), install_requires = [ ], tests_require=[ 'django-setuptest>=0.1.2', 'pysqlite>=2.5' ], test_suite="setuptest.setuptest.SetupTestSuite", include_package_data=True, classifiers = [ "Programming Language :: Python", "License :: OSI Approved :: BSD License", "Development Status :: 4 - Beta", "Operating System :: OS Independent", "Framework :: Django", "Intended Audience :: Developers", "Topic :: Internet :: WWW/HTTP :: Dynamic Content", ], zip_safe=False, )
bsd-3-clause
Python
9d19fb7ada5caaa2dc74736cd12635bed3d8516a
Put in some version requirements.
taschini/morepath,faassen/morepath,morepath/morepath
setup.py
setup.py
import os from setuptools import setup, find_packages setup(name='morepath', version = '0.1dev', description="A micro web-framework with superpowers", author="Martijn Faassen", author_email="faassen@startifact.com", license="BSD", packages=find_packages(), include_package_data=True, zip_safe=False, install_requires=[ 'setuptools', 'venusian >= 1.0a8', 'reg', 'werkzeug >= 0.9.4', ], extras_require = dict( test=['pytest >= 2.0', 'pytest-cov'], ), )
import os from setuptools import setup, find_packages setup(name='morepath', version = '0.1dev', description="A micro web-framework with superpowers", author="Martijn Faassen", author_email="faassen@startifact.com", license="BSD", packages=find_packages(), include_package_data=True, zip_safe=False, install_requires=[ 'setuptools', 'venusian', 'reg', 'werkzeug', ], extras_require = dict( test=['pytest >= 2.0', 'pytest-cov'], ), )
bsd-3-clause
Python
1901f45c9153e345144b63d4c6fcd9881c0ecb98
add raven as extra requirements.
soasme/blackgate
setup.py
setup.py
#!/usr/bin/env python # -*- coding: utf-8 -*- from setuptools import setup, find_packages with open('README.rst') as readme_file: readme = readme_file.read() with open('HISTORY.rst') as history_file: history = history_file.read() requirements = [ 'futures', 'tornado', 'PyYAML', 'click', ] raven_requirements = [ 'raven', ] test_requirements = [ # TODO: put package test requirements here ] setup( name='blackgate', version='0.2.5', license='MIT', description="A set of utilities to build API gateway.", long_description=readme + '\n\n' + history, zip_safe=False, include_package_data=True, install_requires=requirements, platforms='any', author="Ju Lin", author_email='soasme@gmail.com', url='https://github.com/soasme/blackgate', packages=find_packages(exclude=('tests', 'tests.*', '*.tests', '*.tests.*', )), package_dir={'blackgate': 'blackgate'}, keywords='microservices, api, gateway, server, production,', classifiers=[ 'Development Status :: 2 - Pre-Alpha', 'Intended Audience :: Developers', 'License :: OSI Approved :: MIT License', 'Operating System :: OS Independent', 'Programming Language :: Python', "Programming Language :: Python :: 2", 'Programming Language :: Python :: 2.7', ], test_suite='tests', tests_require=test_requirements, extras_require={ 'raven': raven_requirements, }, entry_points={ 'console_scripts': [ 'blackgate=blackgate.cli:main' ] }, )
#!/usr/bin/env python # -*- coding: utf-8 -*- from setuptools import setup, find_packages with open('README.rst') as readme_file: readme = readme_file.read() with open('HISTORY.rst') as history_file: history = history_file.read() requirements = [ 'futures>=3.0.5', 'tornado>=4.3', 'PyYAML>=3.11', 'click>=6.0', ] test_requirements = [ # TODO: put package test requirements here ] setup( name='blackgate', version='0.2.5', license='MIT', description="A set of utilities to build API gateway.", long_description=readme + '\n\n' + history, zip_safe=False, include_package_data=True, install_requires=requirements, platforms='any', author="Ju Lin", author_email='soasme@gmail.com', url='https://github.com/soasme/blackgate', packages=find_packages(exclude=('tests', 'tests.*', '*.tests', '*.tests.*', )), package_dir={'blackgate': 'blackgate'}, keywords='microservices, api, gateway, server, production,', classifiers=[ 'Development Status :: 2 - Pre-Alpha', 'Intended Audience :: Developers', 'License :: OSI Approved :: MIT License', 'Operating System :: OS Independent', 'Programming Language :: Python', "Programming Language :: Python :: 2", 'Programming Language :: Python :: 2.7', ], test_suite='tests', tests_require=test_requirements, entry_points={ 'console_scripts': [ 'blackgate=blackgate.cli:main' ] }, )
mit
Python
13fdb27ff9584b848c512b9919a21dd3c0992816
Increment the module version
pandamasta/django-eblog
setup.py
setup.py
import os from setuptools import setup README = open(os.path.join(os.path.dirname(__file__), 'README.rst')).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-eblog', version='0.2', packages=['eblog'], include_package_data=True, license='BSD License', description='A simple Django app', long_description=README, url='', author='', author_email='', classifiers=[ 'Environment :: Web Environment', 'Framework :: Django', 'Intended Audience :: Developers', 'License :: OSI Approved :: BSD License', # example license 'Operating System :: OS Independent', 'Programming Language :: Python', 'Programming Language :: Python :: 2.6', 'Programming Language :: Python :: 2.7', 'Topic :: Internet :: WWW/HTTP', 'Topic :: Internet :: WWW/HTTP :: Dynamic Content', ], )
import os from setuptools import setup README = open(os.path.join(os.path.dirname(__file__), 'README.rst')).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-eblog', version='0.1', packages=['eblog'], include_package_data=True, license='BSD License', description='A simple Django app', long_description=README, url='', author='', author_email='', classifiers=[ 'Environment :: Web Environment', 'Framework :: Django', 'Intended Audience :: Developers', 'License :: OSI Approved :: BSD License', # example license 'Operating System :: OS Independent', 'Programming Language :: Python', 'Programming Language :: Python :: 2.6', 'Programming Language :: Python :: 2.7', 'Topic :: Internet :: WWW/HTTP', 'Topic :: Internet :: WWW/HTTP :: Dynamic Content', ], )
bsd-3-clause
Python
8b242acd4ad8410f307939a1b48c20c1a6d1fc55
add coding: utf-8
camptocamp/formalchemy,camptocamp/formalchemy,FormAlchemy/formalchemy,abourget/formalchemy-abourget,FormAlchemy/formalchemy,FormAlchemy/formalchemy,camptocamp/formalchemy,camptocamp/formalchemy,FormAlchemy/formalchemy
setup.py
setup.py
# -*- coding: utf-8 -*- long_description = open('README.txt').read().strip() +\ '\n\n' +\ 'Changes\n' +\ '=======\n\n' +\ open('CHANGELOG.txt').read().strip() args = dict(name='FormAlchemy', license='MIT License', version='1.0', description='FormAlchemy greatly speeds development with SQLAlchemy mapped classes (models) in a HTML forms environment.', long_description=long_description, author='Alexandre Conrad, Jonathan Ellis, Gaël Pasgrimaud', author_email='formalchemy@googlegroups.com', url='http://formalchemy.googlecode.com', download_url='http://code.google.com/p/formalchemy/downloads/list', packages=['formalchemy', 'formalchemy.tempita'], package_data={'formalchemy': ['i18n/*/LC_MESSAGES/formalchemy.mo']}, classifiers=[ 'Development Status :: 3 - Alpha', 'Intended Audience :: Developers', 'License :: OSI Approved :: MIT License', 'Natural Language :: English', 'Operating System :: OS Independent', 'Programming Language :: Python', 'Topic :: Software Development :: Libraries :: Python Modules', 'Topic :: Software Development :: User Interfaces', 'Topic :: Text Processing :: Markup :: HTML', 'Topic :: Utilities', ] ) try: from setuptools import setup args.update( message_extractors = {'formalchemy': [ ('**.py', 'python', None), ('**.mako', 'mako', None)]}, zip_safe=False, ) except: from distutils.core import setup setup(**args)
long_description = open('README.txt').read().strip() +\ '\n\n' +\ 'Changes\n' +\ '=======\n\n' +\ open('CHANGELOG.txt').read().strip() args = dict(name='FormAlchemy', license='MIT License', version='1.0', description='FormAlchemy greatly speeds development with SQLAlchemy mapped classes (models) in a HTML forms environment.', long_description=long_description, author='Alexandre Conrad, Jonathan Ellis, Gaël Pasgrimaud', author_email='formalchemy@googlegroups.com', url='http://formalchemy.googlecode.com', download_url='http://code.google.com/p/formalchemy/downloads/list', packages=['formalchemy', 'formalchemy.tempita'], package_data={'formalchemy': ['i18n/*/LC_MESSAGES/formalchemy.mo']}, classifiers=[ 'Development Status :: 3 - Alpha', 'Intended Audience :: Developers', 'License :: OSI Approved :: MIT License', 'Natural Language :: English', 'Operating System :: OS Independent', 'Programming Language :: Python', 'Topic :: Software Development :: Libraries :: Python Modules', 'Topic :: Software Development :: User Interfaces', 'Topic :: Text Processing :: Markup :: HTML', 'Topic :: Utilities', ] ) try: from setuptools import setup args.update( message_extractors = {'formalchemy': [ ('**.py', 'python', None), ('**.mako', 'mako', None)]}, zip_safe=False, ) except: from distutils.core import setup setup(**args)
mit
Python
d9e85fc770455a53070c29df023e5e79e3075bb1
Update setup.py metadata
Previz-app/io_scene_dnb_previz,Previz-app/io_scene_dnb_previz,Previz-app/io_scene_previz,Previz-app/io_scene_previz
setup.py
setup.py
from setuptools import setup, find_packages from tools.distutils.command import bdist_blender_addon setup( name='io_scene_previz', # Versions should comply with PEP440. For a discussion on single-sourcing # the version across setup.py and the project code, see # https://packaging.python.org/en/latest/single_source_version.html version='0.0.8', description='Blender Previz addon', url='https://app.previz.co', author='Previz', author_email='info@previz.co', license='MIT', classifiers=[ 'Development Status :: 4 - Beta', 'Intended Audience :: End Users/Desktop', 'Topic :: Multimedia :: Graphics :: 3D Modeling', 'License :: OSI Approved :: MIT License', 'Programming Language :: Python :: 3 :: Only' ], keywords='previz 3d scene exporter', packages=find_packages(exclude=['tools.distutils.command', 'tests']), install_requires=['previz'], extras_require={}, package_data={}, data_files=[], cmdclass={ 'bdist_blender_addon': bdist_blender_addon } )
from setuptools import setup, find_packages from tools.distutils.command import bdist_blender_addon setup( name='io_scene_previz', # Versions should comply with PEP440. For a discussion on single-sourcing # the version across setup.py and the project code, see # https://packaging.python.org/en/latest/single_source_version.html version='0.0.8', description='Blender Previz addon', url='https://app.previz.co', author='Previz', author_email='info@previz.co', license='MIT', # See https://pypi.python.org/pypi?%3Aaction=list_classifiers classifiers=[ 'Development Status :: 3 - Alpha', 'Intended Audience :: Developers', 'Topic :: Multimedia :: Graphics :: 3D Modeling', 'License :: OSI Approved :: MIT License', 'Programming Language :: Python :: 3', ], keywords='previz development 3d scene exporter', packages=find_packages(exclude=['tools.distutils.command', 'tests']), install_requires=['previz'], extras_require={}, package_data={}, data_files=[], cmdclass={ 'bdist_blender_addon': bdist_blender_addon } )
mit
Python
f68613de29647ad147b3b140115b98af3ac9ef28
Fix classifier
maxzheng/workspace-tools
setup.py
setup.py
#!/usr/bin/env python2.6 import os import setuptools def find_files(path): return [os.path.join(path, f) for f in os.listdir(path)] setuptools.setup( name='workspace-tools', version='0.7.6', author='Max Zheng', author_email='maxzheng.os @t gmail.com', description='Tools to simplify working with multiple product repositories with SCM / development tools abstraction.', long_description=open('README.rst').read(), url='https://github.com/maxzheng/workspace-tools', entry_points={ 'console_scripts': [ 'wst = workspace.controller:main', ], }, install_requires=open('requirements.txt').read(), license='MIT', package_dir={'': 'src'}, packages=setuptools.find_packages('src'), include_package_data=True, setup_requires=['setuptools-git'], classifiers=[ 'Development Status :: 5 - Production/Stable', 'Intended Audience :: Developers', 'Topic :: Software Development', 'License :: OSI Approved :: MIT License', 'Programming Language :: Python :: 2', 'Programming Language :: Python :: 2.6', 'Programming Language :: Python :: 2.7', ], keywords='workspace multiple repositories git svn scm abstraction development tools', )
#!/usr/bin/env python2.6 import os import setuptools def find_files(path): return [os.path.join(path, f) for f in os.listdir(path)] setuptools.setup( name='workspace-tools', version='0.7.6', author='Max Zheng', author_email='maxzheng.os @t gmail.com', description='Tools to simplify working with multiple product repositories with SCM / development tools abstraction.', long_description=open('README.rst').read(), url='https://github.com/maxzheng/workspace-tools', entry_points={ 'console_scripts': [ 'wst = workspace.controller:main', ], }, install_requires=open('requirements.txt').read(), license='MIT', package_dir={'': 'src'}, packages=setuptools.find_packages('src'), include_package_data=True, setup_requires=['setuptools-git'], classifiers=[ 'Development Status :: 5 - Production/Stable', 'Intended Audience :: Developers', 'Topic :: Software Development :: Development Tools', 'License :: OSI Approved :: MIT License', 'Programming Language :: Python :: 2', 'Programming Language :: Python :: 2.6', 'Programming Language :: Python :: 2.7', ], keywords='workspace multiple repositories git svn scm abstraction development tools', )
mit
Python
e87e2c2d8b6bfd3f02e7b470bd48e55063b580c7
bump to 0.1.6
cristina0botez/m3u8,cristina0botez/m3u8,bertothunder/m3u8,gabrielfalcao/m3u8,cnry/m3u8,neon-lab/m3u8,pbs/m3u8,cnry/m3u8,feuvan/m3u8,gabrielfalcao/m3u8,feuvan/m3u8,pbs/m3u8,neon-lab/m3u8,bertothunder/m3u8
setup.py
setup.py
import os from setuptools import setup long_description = None if os.path.exists("README.rst"): long_description = open("README.rst").read() setup( name="m3u8", author='Globo.com', author_email='videos3@corp.globo.com', version="0.1.6", zip_safe=False, packages=["m3u8"], url="https://github.com/globocom/m3u8", description="Python m3u8 parser", long_description=long_description )
import os from setuptools import setup long_description = None if os.path.exists("README.rst"): long_description = open("README.rst").read() setup( name="m3u8", author='Globo.com', version="0.1.5", zip_safe=False, packages=["m3u8"], url="https://github.com/globocom/m3u8", description="Python m3u8 parser", long_description=long_description )
mit
Python
a59aeb6309084837b83c8215284c9ca70a2fa2f1
Bump to 0.8.2
iancmcc/ouimeaux,iancmcc/ouimeaux,iancmcc/ouimeaux
setup.py
setup.py
#!/usr/bin/env python # -*- coding: utf-8 -*- import os import sys here = lambda *a: os.path.join(os.path.dirname(__file__), *a) try: from setuptools import setup except ImportError: from distutils.core import setup if sys.argv[-1] == 'publish': os.system('python setup.py sdist upload') sys.exit() readme = open(here('README.md')).read() history = open(here('HISTORY.rst')).read().replace('.. :changelog:', '') requirements = [x.strip() for x in open(here('requirements.txt')).readlines()] setup( name='ouimeaux', version='0.8.2', description='Open source control for Belkin WeMo devices', long_description=readme + '\n\n' + history, author='Ian McCracken', author_email='ian.mccracken@gmail.com', url='https://github.com/iancmcc/ouimeaux', packages=[ 'ouimeaux', ], package_dir={'ouimeaux': 'ouimeaux'}, include_package_data=True, install_requires=requirements, license="BSD", zip_safe=False, keywords='ouimeaux', classifiers=[ 'Development Status :: 2 - Pre-Alpha', 'Topic :: Home Automation', 'Intended Audience :: Developers', 'License :: OSI Approved :: BSD License', 'Natural Language :: English', "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', 'Programming Language :: Python :: 3.5', ], entry_points={ 'console_scripts': [ 'wemo = ouimeaux.cli:wemo' ] }, # added CORS as dependency extras_require = { 'server': [ "flask-restful", "flask-basicauth", "gevent-socketio", "flask-cors", ], }, test_suite='tests', )
#!/usr/bin/env python # -*- coding: utf-8 -*- import os import sys here = lambda *a: os.path.join(os.path.dirname(__file__), *a) try: from setuptools import setup except ImportError: from distutils.core import setup if sys.argv[-1] == 'publish': os.system('python setup.py sdist upload') sys.exit() readme = open(here('README.md')).read() history = open(here('HISTORY.rst')).read().replace('.. :changelog:', '') requirements = [x.strip() for x in open(here('requirements.txt')).readlines()] setup( name='ouimeaux', version='0.8.1', description='Open source control for Belkin WeMo devices', long_description=readme + '\n\n' + history, author='Ian McCracken', author_email='ian.mccracken@gmail.com', url='https://github.com/iancmcc/ouimeaux', packages=[ 'ouimeaux', ], package_dir={'ouimeaux': 'ouimeaux'}, include_package_data=True, install_requires=requirements, license="BSD", zip_safe=False, keywords='ouimeaux', classifiers=[ 'Development Status :: 2 - Pre-Alpha', 'Topic :: Home Automation', 'Intended Audience :: Developers', 'License :: OSI Approved :: BSD License', 'Natural Language :: English', "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', 'Programming Language :: Python :: 3.5', ], entry_points={ 'console_scripts': [ 'wemo = ouimeaux.cli:wemo' ] }, # added CORS as dependency extras_require = { 'server': [ "flask-restful", "flask-basicauth", "gevent-socketio", "flask-cors", ], }, test_suite='tests', )
bsd-3-clause
Python
38802d0b8aa93af2e299e54cb0e61a3aac5770fd
Bump version number
wendbv/pluvo-python,wendbv/pluvo-python
setup.py
setup.py
from setuptools import setup setup( name='pluvo', packages=['pluvo'], package_data={}, version='0.2.14', description='Python library to access the Pluvo REST API.', author='Wend BV', author_email='info@wend.nl', license='MIT', url='https://github.com/wendbv/pluvo-python', keywords=['REST', 'API', 'Pluvo'], classifiers=[ 'Development Status :: 4 - Beta', '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', ], install_requires=['requests'], tests_require=['coverage', 'flake8==2.6.2', 'pytest>=2.7', 'pytest-cov', 'pytest-flake8==0.2', 'pytest-mock'] )
from setuptools import setup setup( name='pluvo', packages=['pluvo'], package_data={}, version='0.2.13', description='Python library to access the Pluvo REST API.', author='Wend BV', author_email='info@wend.nl', license='MIT', url='https://github.com/wendbv/pluvo-python', keywords=['REST', 'API', 'Pluvo'], classifiers=[ 'Development Status :: 4 - Beta', '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', ], install_requires=['requests'], tests_require=['coverage', 'flake8==2.6.2', 'pytest>=2.7', 'pytest-cov', 'pytest-flake8==0.2', 'pytest-mock'] )
mit
Python
6273a10c50da0e1c743e0fc5082293f583650d44
add scripts to setup
Parisson/TimeSide,Parisson/TimeSide,Parisson/TimeSide,Parisson/TimeSide,Parisson/TimeSide
setup.py
setup.py
#!/usr/bin/env python # -*- coding: utf-8 -*- from setuptools import setup, find_packages CLASSIFIERS = [ 'Intended Audience :: Science/Research', 'Programming Language :: Python', 'Programming Language :: JavaScript', 'Topic :: Internet :: WWW/HTTP :: Dynamic Content', 'Topic :: Multimedia :: Sound/Audio', 'Topic :: Multimedia :: Sound/Audio :: Analysis', 'Topic :: Multimedia :: Sound/Audio :: Players', 'Topic :: Scientific/Engineering :: Information Analysis', ] KEYWORDS = 'audio analyze transcode graph player metadata' setup( name = "TimeSide", url='http://code.google.com/p/timeside', description = "open and fast web audio components", long_description = open('README.rst').read(), author = ["Guillaume Pellerin", "Olivier Guilyardi", "Riccardo Zaccarelli", "Paul Brossier"], author_email = ["yomguy@parisson.com","olivier@samalyse.com", "riccardo.zaccarelli@gmail.com", "piem@piem.org"], version = '0.3.3', install_requires = [ 'setuptools', 'numpy', 'mutagen', 'pil', ], platforms=['OS Independent'], license='Gnu Public License V2', classifiers = CLASSIFIERS, keywords = KEYWORDS, packages = find_packages(), include_package_data = True, zip_safe = False, scripts=['scripts/ts-waveforms'], )
#!/usr/bin/env python # -*- coding: utf-8 -*- from setuptools import setup, find_packages CLASSIFIERS = [ 'Intended Audience :: Science/Research', 'Programming Language :: Python', 'Programming Language :: JavaScript', 'Topic :: Internet :: WWW/HTTP :: Dynamic Content', 'Topic :: Multimedia :: Sound/Audio', 'Topic :: Multimedia :: Sound/Audio :: Analysis', 'Topic :: Multimedia :: Sound/Audio :: Players', 'Topic :: Scientific/Engineering :: Information Analysis', ] KEYWORDS = 'audio analyze transcode graph player metadata' setup( name = "TimeSide", url='http://code.google.com/p/timeside', description = "open and fast web audio components", long_description = open('README.rst').read(), author = ["Guillaume Pellerin", "Olivier Guilyardi", "Riccardo Zaccarelli", "Paul Brossier"], author_email = ["yomguy@parisson.com","olivier@samalyse.com", "riccardo.zaccarelli@gmail.com", "piem@piem.org"], version = '0.3.3', install_requires = [ 'setuptools', 'numpy', 'mutagen', 'pil', ], platforms=['OS Independent'], license='Gnu Public License V2', classifiers = CLASSIFIERS, keywords = KEYWORDS, packages = find_packages(), include_package_data = True, zip_safe = False, )
agpl-3.0
Python
489dd98ca5959b55d801c04d22fd388b6efab1f3
fix pandoc missing
arve0/leicacam
setup.py
setup.py
#!/usr/bin/env python import os import sys try: from setuptools import setup except ImportError: from distutils.core import setup if sys.argv[-1] == 'publish': os.system('python setup.py sdist upload') sys.exit() os.system('make rst') try: readme = open('README.rst').read() except FileNotFoundError: print('pandoc not found, not making rst description') readme = '' setup( name='leicacam', version='0.0.1', description='Control Leica microscopes with python', long_description=readme, author='Arve Seljebu', author_email='arve.seljebu@gmail.com', url='https://github.com/arve0/leicacam', packages=[ 'leicacam', ], package_dir={'leicacam': 'leicacam'}, include_package_data=True, install_requires=[ ], license='MIT', zip_safe=False, keywords='leicacam', classifiers=[ 'Development Status :: 2 - Pre-Alpha', 'Intended Audience :: Developers', 'License :: OSI Approved :: MIT License', 'Natural Language :: English', 'Programming Language :: Python :: 2', 'Programming Language :: Python :: 2.7', 'Programming Language :: Python :: 3', 'Programming Language :: Python :: 3.4', 'Programming Language :: Python :: Implementation :: PyPy', ], )
#!/usr/bin/env python import os import sys try: from setuptools import setup except ImportError: from distutils.core import setup if sys.argv[-1] == 'publish': os.system('python setup.py sdist upload') sys.exit() os.system('make rst') readme = open('README.rst').read() setup( name='leicacam', version='0.0.1', description='Control Leica microscopes with python', long_description=readme, author='Arve Seljebu', author_email='arve.seljebu@gmail.com', url='https://github.com/arve0/leicacam', packages=[ 'leicacam', ], package_dir={'leicacam': 'leicacam'}, include_package_data=True, install_requires=[ ], license='MIT', zip_safe=False, keywords='leicacam', classifiers=[ 'Development Status :: 2 - Pre-Alpha', 'Intended Audience :: Developers', 'License :: OSI Approved :: MIT License', 'Natural Language :: English', 'Programming Language :: Python :: 2', 'Programming Language :: Python :: 2.7', 'Programming Language :: Python :: 3', 'Programming Language :: Python :: 3.4', 'Programming Language :: Python :: Implementation :: PyPy', ], )
mit
Python
b4e25711127414766514091dab29e78cca9719da
Bump version
xorel/sgmanager,scenek/sgmanager
setup.py
setup.py
#!/usr/bin/env python # -*- coding: utf-8 -*- # Copyright (C) 2007-2013, GoodData(R) Corporation. All rights reserved from setuptools import setup setup( name='sgmanager', version='1.2.1', packages=['sgmanager', 'sgmanager.logger', 'sgmanager.securitygroups'], entry_points = { 'console_scripts': [ 'sgmanager = sgmanager.cli:main' ] }, license='BSD', author='Filip Pytloun', author_email='filip.pytloun@gooddata.com', maintainer='Filip Pytloun', maintainer_email='filip@pytloun.cz', description='Security Groups Management Tool', long_description='Tooling for management of security groups. Load local configuration, load remote groups and apply differences.', url='https://github.com/gooddata/sgmanager', download_url='https://github.com/gooddata/sgmanager', platform='POSIX', classifiers=[ 'Development Status :: 5 - Production/Stable', 'Environment :: Console', 'Intended Audience :: Developers', 'Intended Audience :: System Administrators', 'License :: OSI Approved :: BSD License', 'Natural Language :: English', 'Operating System :: POSIX', 'Topic :: System :: Networking :: Firewalls', 'Programming Language :: Python', 'Programming Language :: Python :: Implementation :: CPython', ], install_requires=['boto<2.35', 'PyYAML', 'argparse'] )
#!/usr/bin/env python # -*- coding: utf-8 -*- # Copyright (C) 2007-2013, GoodData(R) Corporation. All rights reserved from setuptools import setup setup( name='sgmanager', version='1.2', packages=['sgmanager', 'sgmanager.logger', 'sgmanager.securitygroups'], entry_points = { 'console_scripts': [ 'sgmanager = sgmanager.cli:main' ] }, license='BSD', author='Filip Pytloun', author_email='filip.pytloun@gooddata.com', maintainer='Filip Pytloun', maintainer_email='filip@pytloun.cz', description='Security Groups Management Tool', long_description='Tooling for management of security groups. Load local configuration, load remote groups and apply differences.', url='https://github.com/gooddata/sgmanager', download_url='https://github.com/gooddata/sgmanager', platform='POSIX', classifiers=[ 'Development Status :: 5 - Production/Stable', 'Environment :: Console', 'Intended Audience :: Developers', 'Intended Audience :: System Administrators', 'License :: OSI Approved :: BSD License', 'Natural Language :: English', 'Operating System :: POSIX', 'Topic :: System :: Networking :: Firewalls', 'Programming Language :: Python', 'Programming Language :: Python :: Implementation :: CPython', ], install_requires=['boto<2.35', 'PyYAML', 'argparse'] )
bsd-3-clause
Python
155b2292d72227867d279848c38b38ce6675dff8
bump version
cenkalti/darbe,cenk/darbe
setup.py
setup.py
# coding=utf8 from setuptools import setup setup( name='Darbe', version='1.1.4', author=u'Cenk Altı', author_email='cenkalti@gmail.com', keywords='mysql rds migration database replication slave', url='https://github.com/cenk/darbe', py_modules=['darbe'], install_requires=[ 'boto3', 'mysql-connector', ], description='RDS MySQL replication setup tool', entry_points={ 'console_scripts': [ 'darbe = darbe:main', ], }, )
# coding=utf8 from setuptools import setup setup( name='Darbe', version='1.1.3', author=u'Cenk Altı', author_email='cenkalti@gmail.com', keywords='mysql rds migration database replication slave', url='https://github.com/cenk/darbe', py_modules=['darbe'], install_requires=[ 'boto3', 'mysql-connector', ], description='RDS MySQL replication setup tool', entry_points={ 'console_scripts': [ 'darbe = darbe:main', ], }, )
mit
Python
cbbcbb5707a90929da8d47f6b3322cebec983279
Add jianfan to python package installation
hermanschaaf/mafan,cychiang/mafan
setup.py
setup.py
from setuptools import setup from distutils.core import Command import os import sys class TestCommand(Command): description = "Run tests" user_options = [] def initialize_options(self): pass def finalize_options(self): pass def run(self): import subprocess errno = subprocess.call(['nosetests', '--debug=DEBUG', '-s']) raise SystemExit(errno) setup( name='mafan', version='0.2.10', author='Herman Schaaf', author_email='herman@ironzebra.com', packages=[ 'mafan', 'mafan.hanzidentifier', 'mafan.third_party', 'mafan.third_party.jianfan' ], scripts=['bin/convert.py'], url='https://github.com/hermanschaaf/mafan', license='LICENSE.txt', description='A toolbox for working with the Chinese language in Python', long_description=open('docs/README.md').read(), cmdclass={ 'test': TestCommand, }, install_requires=[ "jieba == 0.29", "argparse == 1.1", "chardet == 2.1.1", "wsgiref == 0.1.2", ], )
from setuptools import setup from distutils.core import Command import os import sys class TestCommand(Command): description = "Run tests" user_options = [] def initialize_options(self): pass def finalize_options(self): pass def run(self): import subprocess errno = subprocess.call(['nosetests', '--debug=DEBUG', '-s']) raise SystemExit(errno) setup( name='mafan', version='0.2.7', author='Herman Schaaf', author_email='herman@ironzebra.com', packages=['mafan', 'mafan.hanzidentifier'], scripts=['bin/convert.py'], url='https://github.com/hermanschaaf/mafan', license='LICENSE.txt', description='A toolbox for working with the Chinese language in Python', long_description=open('docs/README.md').read(), cmdclass={ 'test': TestCommand, }, install_requires=[ "jieba == 0.29", "argparse == 1.1", "chardet == 2.1.1", "wsgiref == 0.1.2", ], )
mit
Python
fea3c14db1e69349587ccc0be1697ab10b1f5101
update for release 0.11
mukerjee/simpleplotlib
setup.py
setup.py
from setuptools import setup setup( name='simpleplotlib', packages=['simpleplotlib'], version='0.11', description='A matplotlib wrapper focused on beauty and simplicity', author='Matthew K. Mukerjee', author_email='Matthew.Mukerjee@gmail.com', url='https://github.com/mukerjee/simpleplotlib', download_url='https://github.com/mukerjee/simpleplotlib/tarball/0.11', license='MIT License', keywords=['matplotlib', 'plots', 'beauty', 'simplicity'], classifiers=[ 'Development Status :: 3 - Alpha', 'Intended Audience :: Science/Research', 'License :: OSI Approved :: MIT License', 'Operating System :: OS Independent', 'Programming Language :: Python :: 2.6', 'Programming Language :: Python :: 2.7', 'Programming Language :: Python :: 3.3', 'Topic :: Scientific/Engineering' ], install_requires=[ 'matplotlib>=2.0.0', 'numpy', 'dotmap', ] )
from setuptools import setup setup( name='simpleplotlib', packages=['simpleplotlib'], version='0.1', description='A matplotlib wrapper focused on beauty and simplicity', author='Matthew K. Mukerjee', author_email='Matthew.Mukerjee@gmail.com', url='https://github.com/mukerjee/simpleplotlib', download_url='https://github.com/mukerjee/simpleplotlib/tarball/0.1', license='MIT License', keywords=['matplotlib', 'plots', 'beauty', 'simplicity'], classifiers=[ 'Development Status :: 3 - Alpha', 'Intended Audience :: Science/Research', 'License :: OSI Approved :: MIT License', 'Operating System :: OS Independent', 'Programming Language :: Python :: 2.6', 'Programming Language :: Python :: 2.7', 'Programming Language :: Python :: 3.3', 'Topic :: Scientific/Engineering' ], install_requires=[ 'matplotlib>=2.0.0', 'numpy', 'dotmap', ] )
mit
Python
e26b392b3b1cfc04772839b546f73aa1f81bdb15
Make setup recogonize hy files
theanalyst/hash
setup.py
setup.py
# -*- coding: utf-8 -*- import os import sys try: from setuptools import setup, find_packages except ImportError: from distutils.core import setup if sys.argv[-1] == 'publish': os.system('python setup.py sdist upload') sys.exit() readme = open('README.rst').read() setup( name='hash', version='0.1.0', description='Hy from AST', long_description=readme, author='Abhishek L', author_email='abhishek.lekshmanan@gmail.com', url='https://github.com/theanalyst/hash', packages= find_packages(exclude=['tests']), package_data = { 'hash' : ['*.hy'], }, install_requires=['hy >= 0.10.0' ], license= "BSD", keywords='hash', classifiers=[ 'Development Status :: 3-Alpha', 'Intended Audience :: Developers', 'License :: OSI Approved :: BSD License', "Programming Language :: Lisp", "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', ], )
# -*- coding: utf-8 -*- import os import sys try: from setuptools import setup, find_packages except ImportError: from distutils.core import setup if sys.argv[-1] == 'publish': os.system('python setup.py sdist upload') sys.exit() readme = open('README.rst').read() setup( name='hash', version='0.1.0', description='Hy from AST', long_description=readme, author='Abhishek L', author_email='abhishek.lekshmanan@gmail.com', url='https://github.com/theanalyst/hash', packages= find_packages(exclude=['tests']), license= "BSD", keywords='hash', classifiers=[ 'Development Status :: 3-Alpha', 'Intended Audience :: Developers', 'License :: OSI Approved :: BSD License', "Programming Language :: Lisp", "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', ], )
bsd-3-clause
Python
eeb00d12a93d87792af6f8cc4866ef08aa715e5b
add Python version check
ldo/dbussy
setup.py
setup.py
#+ # Distutils script to install DBussy. Invoke from the command line # in this directory as follows: # # python3 setup.py build # sudo python3 setup.py install # # Written by Lawrence D'Oliveiro <ldo@geek-central.gen.nz>. #- import sys import distutils.core from distutils.command.build import \ build as std_build class my_build(std_build) : "customization of build to perform additional validation." def run(self) : try : exec \ ( "async def dummy() :\n" " pass\n" "#end dummy\n" ) except SyntaxError : sys.stderr.write("This module requires Python 3.5 or later.\n") sys.exit(-1) #end try super().run() #end run #end my_build distutils.core.setup \ ( name = "DBussy", version = "0.6", description = "language bindings for libdbus, for Python 3.5 or later", author = "Lawrence D'Oliveiro", author_email = "ldo@geek-central.gen.nz", url = "http://github.com/ldo/dbussy", py_modules = ["dbussy", "ravel"], cmdclass = { "build" : my_build, }, )
#+ # Distutils script to install DBussy. Invoke from the command line # in this directory as follows: # # python3 setup.py build # sudo python3 setup.py install # # Written by Lawrence D'Oliveiro <ldo@geek-central.gen.nz>. #- import distutils.core distutils.core.setup \ ( name = "DBussy", version = "0.6", description = "language bindings for libdbus, for Python 3.5 or later", author = "Lawrence D'Oliveiro", author_email = "ldo@geek-central.gen.nz", url = "http://github.com/ldo/dbussy", py_modules = ["dbussy", "ravel"], )
lgpl-2.1
Python
6c110304a0a1e78a9e30397b80cb053a73a6dc66
add url
stilley2/filesdb
setup.py
setup.py
from setuptools import setup setup(name='filesdb', version='0.2.0', description='A simple tool for tracking files', author='Steven Tilley', author_email='steventilleyii@gmail.com', packages=['filesdb'], entry_points={'console_scripts': ['filesdb = filesdb.__init__:main']}, python_requires='>=3', tests_require=['pytest'], setup_requires=['pytest-runner'], url='https://github.com/stilley2/filesdb', )
from setuptools import setup setup(name='filesdb', version='0.2.0', description='A simple tool for tracking files', author='Steven Tilley', author_email='steventilleyii@gmail.com', packages=['filesdb'], entry_points={'console_scripts': ['filesdb = filesdb.__init__:main']}, python_requires='>=3', tests_require=['pytest'], setup_requires=['pytest-runner'], )
mit
Python
5689eb765005306f26b86e22ab98685813288960
update description
mylokin/schematec
setup.py
setup.py
import re try: from setuptools import setup except ImportError: from distutils.core import setup version = '' with open('schematec/__init__.py', 'r') as fd: regex = re.compile(r'__version__\s*=\s*[\'"]([^\'"]*)[\'"]') for line in fd: m = regex.match(line) if m: version = m.group(1) break setup( name='schematec', packages=['schematec'], package_data={'': ['LICENSE']}, version=version, description='Set of tools that makes input data validation easier', author='Andrey Gubarev', author_email='mylokin@me.com', url='https://github.com/mylokin/schematec', keywords=['schema'], license='MIT', classifiers=( 'Development Status :: 4 - Beta', 'Intended Audience :: Developers', 'Operating System :: OS Independent', 'License :: OSI Approved :: MIT License', 'Programming Language :: Python', 'Programming Language :: Python :: 2.7', 'Programming Language :: Python :: 3', 'Programming Language :: Python :: 3.4', 'Topic :: Database', 'Topic :: Database :: Database Engines/Servers', ), )
import re try: from setuptools import setup except ImportError: from distutils.core import setup version = '' with open('schematec/__init__.py', 'r') as fd: regex = re.compile(r'__version__\s*=\s*[\'"]([^\'"]*)[\'"]') for line in fd: m = regex.match(line) if m: version = m.group(1) break setup( name='schematec', packages=['schematec'], package_data={'': ['LICENSE']}, version=version, description='Data models for Mongo', author='Andrey Gubarev', author_email='mylokin@me.com', url='https://github.com/mylokin/schematec', keywords=['schema'], license='MIT', classifiers=( 'Development Status :: 4 - Beta', 'Intended Audience :: Developers', 'Operating System :: OS Independent', 'License :: OSI Approved :: MIT License', 'Programming Language :: Python', 'Programming Language :: Python :: 2.7', 'Programming Language :: Python :: 3', 'Programming Language :: Python :: 3.4', 'Topic :: Database', 'Topic :: Database :: Database Engines/Servers', ), )
mit
Python
aeee792e7c0215efc297667b4a75d5512425a2d5
bump the version after the fat finger removal of set_environment on prior commit.
devopscenter/django-code-deploy,devopscenter/django-code-deploy
setup.py
setup.py
from distutils.core import setup setup( name = 'django-code-deploy', packages = ['django_code_deploy'], # this must be the same as the name above version = '0.9.8', description = 'Deploys Django code to AWS based on tags', author = 'Josh devops.center, Bob devops.center, Gregg devops.center', author_email = 'josh@devops.center, bob@devops.center, gjensen@devops.center', url = 'https://github.com/devopscenter/django-code-deploy', # use the URL to the github repo download_url = 'https://github.com/devopscenter/django-code-deploy/tarball/0.1', # I'll explain this in a second keywords = ['testing', 'logging', 'example'], # arbitrary keywords classifiers = [], )
from distutils.core import setup setup( name = 'django-code-deploy', packages = ['django_code_deploy'], # this must be the same as the name above version = '0.9.7', description = 'Deploys Django code to AWS based on tags', author = 'Josh devops.center, Bob devops.center, Gregg devops.center', author_email = 'josh@devops.center, bob@devops.center, gjensen@devops.center', url = 'https://github.com/devopscenter/django-code-deploy', # use the URL to the github repo download_url = 'https://github.com/devopscenter/django-code-deploy/tarball/0.1', # I'll explain this in a second keywords = ['testing', 'logging', 'example'], # arbitrary keywords classifiers = [], )
apache-2.0
Python
4565c185ed96cc31f78e132ea10a7c1d6daeb080
include flickrapi requirement
jordanjoz1/flickr-views-counter
setup.py
setup.py
import os import sys from setuptools import setup, find_packages version = '0.1.0' def read(f): return open(os.path.join(os.path.dirname(__file__), f)).read().strip() setup(name='flickr-views-counter', version=version, description=('Get view counts, favorites, and other data for each ' 'picture in a user\'s photostream'), long_description='\n\n'.join((read('README.md'), read('CHANGELOG'))), classifiers=[ 'License :: OSI Approved :: BSD License', 'Intended Audience :: Developers', 'Programming Language :: Python'], keywords='flickr photos views favorites', author='Jordan Jozwiak', author_email='support@jozapps.com', url='https://github.com/jordanjoz1/flickr-views-counter', license='MIT', py_modules=['count-views'], namespace_packages=[], install_requires = ['flickrapi'], entry_points={ 'console_scripts': [ 'flickr-views-counter = count-views:main'] }, include_package_data = False)
import os import sys from setuptools import setup, find_packages version = '0.1.0' def read(f): return open(os.path.join(os.path.dirname(__file__), f)).read().strip() setup(name='flickr-views-counter', version=version, description=('Get view counts, favorites, and other data for each ' 'picture in a user\'s photostream'), long_description='\n\n'.join((read('README.md'), read('CHANGELOG'))), classifiers=[ 'License :: OSI Approved :: BSD License', 'Intended Audience :: Developers', 'Programming Language :: Python'], keywords='flickr photos views favorites', author='Jordan Jozwiak', author_email='support@jozapps.com', url='https://github.com/jordanjoz1/flickr-views-counter', license='MIT', py_modules=['count-views'], namespace_packages=[], install_requires = [], entry_points={ 'console_scripts': [ 'flickr-views-counter = count-views:main'] }, include_package_data = False)
mit
Python
d1b454e7a08697695dff949250cfce25b367e30f
Fix setup.py
helloTC/ATT,BNUCNL/ATT
setup.py
setup.py
# emacs: -*- mode: python-mode; py-indent-offset: 4; indent-tabs-mode: nil -*- # vi: set ft=python sts=4 ts=4 sw=4 et; from distutils.core import setup setup(name='ATT', version='0.5', description='Toolbox for neuroimaging data analysis', author='Taicheng Huang', author_email='taicheng_huang@mail.bnu.edu.cn', url='https://github.com/helloTC/ATT', packages=['ATT.algorithm', 'ATT.iofunc', 'ATT.util'], install_requires=['numpy', 'scipy', 'nibabel', 'six', 'sklearn', 'pandas', 'matplotlib', 'seaborn'] )
# emacs: -*- mode: python-mode; py-indent-offset: 4; indent-tabs-mode: nil -*- # vi: set ft=python sts=4 ts=4 sw=4 et; from distutils.core import setup setup(name='ATT', version='1.0', description='Toolbox for nifti data analysis', author='Taicheng Huang', author_email='taicheng_huang@sina.cn', url='https://github.com/helloTC/ATT', packages=['algorithm', 'graph', 'iofunc', 'surface', 'util', 'volume'], install_requires=['numpy', 'scipy', 'nibabel', 'six', 'sklearn', 'pandas', 'matplotlib', 'seaborn'] )
mit
Python
17ec4e6dd52eb73584ce556905a4d3aff6c46240
Fix installation with pip3
Zowie/django-htmlmin,Zowie/django-htmlmin
setup.py
setup.py
# -*- coding: utf-8 -*- # Copyright 2013 django-htmlmin authors. All rights reserved. # Use of this source code is governed by a BSD-style # license that can be found in the LICENSE file. from setuptools import setup, find_packages from htmlmin import __version__ import sys PY_VERSION = sys.version_info[0], sys.version_info[1] if PY_VERSION < (3, 0): README = open('README.rst').read() else: README = open('README.rst', encoding='utf-8').read() setup( name='django-htmlmin', version=__version__, description='html minify for django', long_description=README, author='CobraTeam', author_email='andrewsmedina@gmail.com', packages=find_packages(), include_package_data=True, test_suite='nose.collector', install_requires=['argparse', 'beautifulsoup4', 'html5lib'], tests_require=['nose', 'coverage', 'django'], entry_points={ 'console_scripts': [ 'pyminify = htmlmin.commands:main', ], }, )
# -*- coding: utf-8 -*- # Copyright 2013 django-htmlmin authors. All rights reserved. # Use of this source code is governed by a BSD-style # license that can be found in the LICENSE file. from setuptools import setup, find_packages from htmlmin import __version__ README = open('README.rst').read() setup( name='django-htmlmin', version=__version__, description='html minify for django', long_description=README, author='CobraTeam', author_email='andrewsmedina@gmail.com', packages=find_packages(), include_package_data=True, test_suite='nose.collector', install_requires=['argparse', 'beautifulsoup4', 'html5lib'], tests_require=['nose', 'coverage', 'django'], entry_points={ 'console_scripts': [ 'pyminify = htmlmin.commands:main', ], }, )
bsd-2-clause
Python
9b84157118337b8e360ff41ca4c72fe57c11f231
Bump version
appknox/vendor,appknox/vendor,appknox/vendor
setup.py
setup.py
#! /usr/bin/env python # -*- coding: utf-8 -*- # # vim: fenc=utf-8 # vim: tabstop=4 expandtab shiftwidth=4 softtabstop=4 # # """ File name: setup.py Version: 0.1 Author: dhilipsiva <dhilipsiva@gmail.com> Date created: 2015-11-24 """ from setuptools import setup, find_packages from codecs import open from os import path here = path.abspath(path.dirname(__file__)) f = path.join(here, 'README.md') try: from pypandoc import convert long_description = convert(f, 'rst') except ImportError: print( "pypandoc module not found, could not convert Markdown to RST") long_description = open(f, 'r').read() reqs = open("requirements.txt", "r").read().splitlines() setup( name='ak-vendor', version='0.2.2', description="Some vendor scripts that we use here at Appknox", long_description=long_description, url='https://github.com/appknox/vendor', author='dhilipsiva', author_email='dhilipsiva@gmail.com', license='MIT', classifiers=[ 'Development Status :: 4 - Beta', 'Intended Audience :: Developers', 'Topic :: Software Development :: Build Tools', 'License :: OSI Approved :: MIT License', 'Programming Language :: Python :: 3', 'Programming Language :: Python :: 3.5', ], keywords='appknox vendor', packages=find_packages(), py_modules=['ak_vendor'], entry_points='', install_requires=reqs, extras_require={ 'dev': [''], 'test': [''], }, )
#! /usr/bin/env python # -*- coding: utf-8 -*- # # vim: fenc=utf-8 # vim: tabstop=4 expandtab shiftwidth=4 softtabstop=4 # # """ File name: setup.py Version: 0.1 Author: dhilipsiva <dhilipsiva@gmail.com> Date created: 2015-11-24 """ from setuptools import setup, find_packages from codecs import open from os import path here = path.abspath(path.dirname(__file__)) f = path.join(here, 'README.md') try: from pypandoc import convert long_description = convert(f, 'rst') except ImportError: print( "pypandoc module not found, could not convert Markdown to RST") long_description = open(f, 'r').read() reqs = open("requirements.txt", "r").read().splitlines() setup( name='ak-vendor', version='0.2.1', description="Some vendor scripts that we use here at Appknox", long_description=long_description, url='https://github.com/appknox/vendor', author='dhilipsiva', author_email='dhilipsiva@gmail.com', license='MIT', classifiers=[ 'Development Status :: 4 - Beta', 'Intended Audience :: Developers', 'Topic :: Software Development :: Build Tools', 'License :: OSI Approved :: MIT License', 'Programming Language :: Python :: 3', 'Programming Language :: Python :: 3.5', ], keywords='appknox vendor', packages=find_packages(), py_modules=['ak_vendor'], entry_points='', install_requires=reqs, extras_require={ 'dev': [''], 'test': [''], }, )
mit
Python
75113f3818c48ef72f00ebf8ac5c9491902a67b7
Simplify long description
gabrielmagno/nano-dlna,gabrielmagno/nano-dlna,gabrielmagno/nano-dlna
setup.py
setup.py
#!/usr/bin/env python import sys from setuptools import setup install_requires = [ 'Twisted>=16.2.0', ] setup( name='nanodlna', version='0.1.0', description='A minimal UPnP/DLNA media streamer', long_description='nano-dlna is a command line tool that allows you to play a local video file in your TV (or any other DLNA compatible device)' author='Gabriel Magno', author_email='gabrielmagno1@gmail.com', url='https://github.com/gabrielmagno/nano-dlna', license='MIT', classifiers=[ 'Development Status :: 3 - Alpha', 'Environment :: Console', 'Intended Audience :: Developers', 'Intended Audience :: End Users/Desktop', 'License :: OSI Approved :: MIT License', 'Natural Language :: English', 'Operating System :: OS Independent', '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', 'Topic :: Software Development :: Libraries :: Python Modules', 'Topic :: Multimedia :: Sound/Audio', 'Topic :: Multimedia :: Video', 'Topic :: Utilities' ], packages=['nanodlna'], package_dir={'nanodlna': 'nanodlna'}, package_data={'nanodlna': ['templates/*.xml']}, entry_points={ 'console_scripts': [ 'nanodlna = nanodlna.cli:run', ] }, install_requires=install_requires )
#!/usr/bin/env python import sys from setuptools import setup install_requires = [ 'Twisted>=16.2.0', ] setup( name='nanodlna', version='0.1.0', description='A minimal UPnP/DLNA media streamer', long_description=open('README.md').read(), author='Gabriel Magno', author_email='gabrielmagno1@gmail.com', url='https://github.com/gabrielmagno/nano-dlna', license='MIT', classifiers=[ 'Development Status :: 3 - Alpha', 'Environment :: Console', 'Intended Audience :: Developers', 'Intended Audience :: End Users/Desktop', 'License :: OSI Approved :: MIT License', 'Natural Language :: English', 'Operating System :: OS Independent', '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', 'Topic :: Software Development :: Libraries :: Python Modules', 'Topic :: Multimedia :: Sound/Audio', 'Topic :: Multimedia :: Video', 'Topic :: Utilities' ], packages=['nanodlna'], package_dir={'nanodlna': 'nanodlna'}, package_data={'nanodlna': ['templates/*.xml']}, entry_points={ 'console_scripts': [ 'nanodlna = nanodlna.cli:run', ] }, install_requires=install_requires )
mit
Python
6616832ff1aa17d09c19eecde593b21e80a97e36
Fix setup.py homepage link. Closes #120.
captainsafia/agate,wireservice/agate,eads/journalism,flother/agate,onyxfish/journalism,TylerFisher/agate,onyxfish/agate,dwillis/agate,JoeGermuska/agate
setup.py
setup.py
#!/usr/bin/env python from setuptools import setup import sys install_requires = [ 'six==1.6.1' ] if sys.version_info == (2, 6): install_requires.append('ordereddict>=1.1') if sys.version_info[0] == 2: install_requires.append('python-dateutil==1.5') else: install_requires.append('python-dateutil>=2.0') setup( name='journalism', version='0.4.0', description='', long_description=open('README').read(), author='Christopher Groskopf', author_email='staringmonkey@gmail.com', url='http://journalism.readthedocs.org/', license='MIT', classifiers=[ 'Development Status :: 3 - Alpha', 'Intended Audience :: Developers', 'Intended Audience :: End Users/Desktop', 'Intended Audience :: Science/Research', 'License :: OSI Approved :: MIT License', 'Natural Language :: English', 'Operating System :: OS Independent', 'Programming Language :: Python', 'Programming Language :: Python :: 2.6', 'Programming Language :: Python :: 2.7', 'Programming Language :: Python :: 3.2', 'Programming Language :: Python :: 3.3', 'Programming Language :: Python :: 3.4', 'Programming Language :: Python :: Implementation :: CPython', 'Programming Language :: Python :: Implementation :: PyPy', 'Topic :: Scientific/Engineering :: Information Analysis', 'Topic :: Software Development :: Libraries :: Python Modules', ], packages=[ 'journalism', ], install_requires=install_requires )
#!/usr/bin/env python from setuptools import setup import sys install_requires = [ 'six==1.6.1' ] if sys.version_info == (2, 6): install_requires.append('ordereddict>=1.1') if sys.version_info[0] == 2: install_requires.append('python-dateutil==1.5') else: install_requires.append('python-dateutil>=2.0') setup( name='journalism', version='0.4.0', description='', long_description=open('README').read(), author='Christopher Groskopf', author_email='staringmonkey@gmail.com', url='journalism takes the horror out of basic data analysis and manipulation.', license='MIT', classifiers=[ 'Development Status :: 3 - Alpha', 'Intended Audience :: Developers', 'Intended Audience :: End Users/Desktop', 'Intended Audience :: Science/Research', 'License :: OSI Approved :: MIT License', 'Natural Language :: English', 'Operating System :: OS Independent', 'Programming Language :: Python', 'Programming Language :: Python :: 2.6', 'Programming Language :: Python :: 2.7', 'Programming Language :: Python :: 3.2', 'Programming Language :: Python :: 3.3', 'Programming Language :: Python :: 3.4', 'Programming Language :: Python :: Implementation :: CPython', 'Programming Language :: Python :: Implementation :: PyPy', 'Topic :: Scientific/Engineering :: Information Analysis', 'Topic :: Software Development :: Libraries :: Python Modules', ], packages=[ 'journalism', ], install_requires=install_requires )
mit
Python
5e4a1544e0643ed6968c6936e8669a8c4a8554a3
Remove useless dependency
MichelJuillard/dlstats,MichelJuillard/dlstats,mmalter/dlstats,MichelJuillard/dlstats,Widukind/dlstats,mmalter/dlstats,mmalter/dlstats,Widukind/dlstats
setup.py
setup.py
#! /usr/bin/env python3 # -*- coding: utf-8 -*- from distutils.core import setup import os setup(name='dlstats', version='0.1', description='A python module that provides an interface between statistics providers and pandas.', author='Widukind team', author_email='dev@michaelmalter.fr', url='https://github.com/Widukind', package_dir={'dlstats': 'src', 'dlstats.gunicorn': 'src/gunicorn', 'dlstats.fetchers': 'src/fetchers'}, packages=['dlstats', 'dlstats.gunicorn', 'dlstats.fetchers'], data_files=[('/etc/init.d',['init/dlstats']), ('/usr/local/bin',['init/dlstats-daemon.py'])], install_requires=[ 'pandas>=0.12', ] ) try: with open('/etc/init.d/dlstats'): os.chmod('/etc/init.d/dlstats', 0o755) except IOError: pass try: with open('/usr/local/bin/dlstats-daemon.py'): os.chmod('/usr/local/bin/dlstats-daemon.py', 0o755) except IOError: pass
#! /usr/bin/env python3 # -*- coding: utf-8 -*- from distutils.core import setup import os setup(name='dlstats', version='0.1', description='A python module that provides an interface between statistics providers and pandas.', author='Widukind team', author_email='dev@michaelmalter.fr', url='https://github.com/Widukind', package_dir={'dlstats': 'src', 'dlstats.gunicorn': 'src/gunicorn', 'dlstats.fetchers': 'src/fetchers'}, packages=['dlstats', 'dlstats.gunicorn', 'dlstats.fetchers'], data_files=[('/etc/init.d',['init/dlstats']), ('/usr/local/bin',['init/dlstats-daemon.py'])], install_requires=[ 'pandas>=0.12', 'flask-restful', 'flask' ] ) try: with open('/etc/init.d/dlstats'): os.chmod('/etc/init.d/dlstats', 0o755) except IOError: pass try: with open('/usr/local/bin/dlstats-daemon.py'): os.chmod('/usr/local/bin/dlstats-daemon.py', 0o755) except IOError: pass
agpl-3.0
Python
88fc8cb242b430163a14bc02647ea363c53e164e
Switch to ndt for volume-from-snapshot
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.152', 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.152', 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.151', 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.151', 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
6774db4c9ec2aa082512092f7aaf64cf291154e9
Add ap2en module to the setup.py file so it gets installed too.
timovwb/runner,therzka/runner,transcriptic/runner
setup.py
setup.py
from setuptools import setup setup( name='transcriptic', version='1.3.13', py_modules=['transcriptic', 'ap2en'], install_requires=[ 'Click>=5.1', 'requests' ], entry_points=''' [console_scripts] transcriptic=transcriptic:cli ''', )
from setuptools import setup setup( name='transcriptic', version='1.3.13', py_modules=['transcriptic'], install_requires=[ 'Click>=5.1', 'requests' ], entry_points=''' [console_scripts] transcriptic=transcriptic:cli ''', )
bsd-3-clause
Python
43effd41397e448c5c1f0fa74eae6c1fc9d55f0d
Bump version number
sburnett/bismark-release-manager
setup.py
setup.py
from setuptools import setup setup( name='bismark-release-manager', version='1.0.43', description='Manage releases, packages, experiments and upgrades ' 'for the BISmark deployment.', license='MIT License', author='Sam Burnett', py_modules=[ 'common', 'deploy', 'experiments', 'groups', 'main', 'openwrt', 'opkg', 'release', 'subcommands', 'tree', ], entry_points={'console_scripts': ['brm = main:main']}, )
from setuptools import setup setup( name='bismark-release-manager', version='1.0.42', description='Manage releases, packages, experiments and upgrades ' 'for the BISmark deployment.', license='MIT License', author='Sam Burnett', py_modules=[ 'common', 'deploy', 'experiments', 'groups', 'main', 'openwrt', 'opkg', 'release', 'subcommands', 'tree', ], entry_points={'console_scripts': ['brm = main:main']}, )
mit
Python
dc148a12d02035593b3a6f6d5415c6bb26e4817a
fix : setup file updated
Moduland/instatag
setup.py
setup.py
from distutils.core import setup setup( name = 'instatag', packages = ['instatag'], version = '0.1', description = 'Extract users from tag in instagram', long_description="", author = 'Moduland Co', author_email = 'info@moduland.ir', url = 'https://github.com/Moduland/instatag', download_url = 'https://github.com/Moduland/instatag/tarball/v0.1', keywords = ['extract', 'scrap', 'instagram','python','tags','users'], install_requires=[ 'art', 'bs4', 'requests', ], classifiers = [ 'Development Status :: 3 - Alpha', 'Intended Audience :: End Users/Desktop', 'License :: OSI Approved :: MIT', 'Operating System :: OS Independent', 'Programming Language :: Python :: 3.4', 'Programming Language :: Python :: 3.5', 'Programming Language :: Python :: 3.6', 'Topic :: Internet', ], license='MIT', )
from distutils.core import setup setup( name = 'instatag', packages = ['instatag'], version = '0.1', description = 'Extract users from tag in instagram', long_description="", author = 'Moduland Co', author_email = 'info@moduland.ir', url = 'https://github.com/Moduland/instatag', download_url = 'https://github.com/Moduland/instatag/tarball/v0.1', keywords = ['extract', 'scrap', 'instagram','python','tags','users'], install_requires=[ 'art', 'bs4', 'requests', ], classifiers = [], license='MIT', )
mit
Python
87f2ca2818d5a795ce138f13de8e343a8506ffbd
debug setup
tridesclous/tridesclous
setup.py
setup.py
from setuptools import setup import os import tridesclous install_requires = [ 'numpy', 'scipy', 'pandas', 'scikit-learn', 'matplotlib', 'seaborn', 'quantities==0.10.1', 'neo==0.5.1', ] extras_require={ 'gui' : ['PyQt5', 'pyqtgraph==0.10.0', 'matplotlib'], 'online' : 'pyacq', 'opencl' : ['pyopencl'], } long_description = "" setup( name = "tridesclous", version = tridesclous.__version__, packages = ['tridesclous', 'tridesclous.gui','tridesclous.online', 'tridesclous.scripts',], install_requires=install_requires, extras_require = extras_require, author = "C. Pouzat, S.Garcia", author_email = "", description = "offline/online spike sorting with french touch that light the barbecue", long_description = long_description, entry_points={ 'console_scripts': ['tdc=tridesclous.scripts.tdc:main'], #~ 'gui_scripts': ['tdcgui=tridesclous.scripts.tdc:open_mainwindow'], }, license = "MIT", url='https://github.com/tridesclous/trisdesclous', classifiers = [ 'Development Status :: 4 - Beta', 'Intended Audience :: Science/Research', 'License :: OSI Approved :: MIT License', 'Natural Language :: English', 'Operating System :: OS Independent', 'Programming Language :: Python :: 3', 'Topic :: Scientific/Engineering'] )
from setuptools import setup import os import tridesclous install_requires = [ 'numpy', 'scipy', 'pandas', 'scikit-learn', 'matplotlib', 'seaborn', 'neo>=0.5.1', ] extras_require={ 'gui' : ['PyQt5', 'pyqtgraph==0.10.0', 'matplotlib'], 'online' : 'pyacq', 'opencl' : ['pyopencl'], } long_description = "" setup( name = "tridesclous", version = tridesclous.__version__, packages = ['tridesclous', 'tridesclous.gui','tridesclous.online', 'tridesclous.scripts',], install_requires=install_requires, extras_require = extras_require, author = "C. Pouzat, S.Garcia", author_email = "", description = "offline/online spike sorting with french touch that light the barbecue", long_description = long_description, entry_points={ 'console_scripts': ['tdc=tridesclous.scripts.tdc:main'], #~ 'gui_scripts': ['tdcgui=tridesclous.scripts.tdc:open_mainwindow'], }, license = "MIT", url='https://github.com/tridesclous/trisdesclous', classifiers = [ 'Development Status :: 4 - Beta', 'Intended Audience :: Science/Research', 'License :: OSI Approved :: MIT License', 'Natural Language :: English', 'Operating System :: OS Independent', 'Programming Language :: Python :: 3', 'Topic :: Scientific/Engineering'] )
mit
Python
9798a4884d3960820730de73d4a04446c3a32678
fix syntax
pyreaclib/pyreaclib
setup.py
setup.py
from setuptools import setup, find_packages setup(name='pynucastro', version='1.5.0', description='Python Interfaces to the nuclear reaction rate databases', url='https://github.com/pynucastro/nucastro', author='pynucastro development group', author_email='michael.zingale@stonybrook.edu', license='BSD', packages=find_packages(), package_data={"pynucastro": ["library/*", "library/tabular/*", "templates/*", "templates/fortran-vode/*", "templates/starkiller-microphysics/*", "nucdata/*"]}, install_requires=['networkx', 'numpy', 'numba', 'sympy', 'scipy', 'matplotlib', 'ipywidgets', 'numba'], zip_safe=False)
from setuptools import setup, find_packages setup(name='pynucastro', version='1.5.0', description='Python Interfaces to the nuclear reaction rate databases', url='https://github.com/pynucastro/nucastro', author='pynucastro development group' author_email='michael.zingale@stonybrook.edu', license='BSD', packages=find_packages(), package_data={"pynucastro": ["library/*", "library/tabular/*", "templates/*", "templates/fortran-vode/*", "templates/starkiller-microphysics/*", "nucdata/*"]}, install_requires=['networkx', 'numpy', 'numba', 'sympy', 'scipy', 'matplotlib', 'ipywidgets', 'numba'], zip_safe=False)
bsd-3-clause
Python
9020e5cf22ae95c6bae6badf6dce427c8e9f502c
Bump version to 0.0.9
polyaxon/polyaxon,polyaxon/polyaxon,polyaxon/polyaxon
setup.py
setup.py
#!/usr/bin/env python import sys from setuptools import find_packages, setup from setuptools.command.test import test as TestCommand class PyTest(TestCommand): def finalize_options(self): TestCommand.finalize_options(self) self.test_args = [] self.test_suite = True def run_tests(self): import pytest errcode = pytest.main(self.test_args) sys.exit(errcode) setup(name='polyaxon-schemas', version='0.0.9', description='Schema definitions and validation for Polyaxon.', maintainer='Mourad Mourafiq', maintainer_email='mouradmourafiq@gmail.com', author='Mourad Mourafiq', author_email='mouradmourafiq@gmail.com', url='https://github.com/polyaxon/polyaxon-schemas', license='MIT', platforms='any', packages=find_packages(), keywords=[ 'polyaxon', 'tensorFlow', 'deep-learning', 'machine-learning', 'data-science', 'neural-networks', 'artificial-intelligence', 'ai', 'reinforcement-learning', 'kubernetes', ], install_requires=[ 'Jinja2==2.10', 'marshmallow==2.15.0', 'numpy==1.14.2', 'python-dateutil==2.7.0', 'pytz==2018.3', 'PyYAML==3.12', 'six==1.11.0', ], classifiers=[ 'Programming Language :: Python', 'Operating System :: OS Independent', 'Intended Audience :: Developers', 'Intended Audience :: Science/Research', 'Topic :: Scientific/Engineering :: Artificial Intelligence' ], tests_require=['pytest'], cmdclass={'test': PyTest})
#!/usr/bin/env python import sys from setuptools import find_packages, setup from setuptools.command.test import test as TestCommand class PyTest(TestCommand): def finalize_options(self): TestCommand.finalize_options(self) self.test_args = [] self.test_suite = True def run_tests(self): import pytest errcode = pytest.main(self.test_args) sys.exit(errcode) setup(name='polyaxon-schemas', version='0.0.8', description='Schema definitions and validation for Polyaxon.', maintainer='Mourad Mourafiq', maintainer_email='mouradmourafiq@gmail.com', author='Mourad Mourafiq', author_email='mouradmourafiq@gmail.com', url='https://github.com/polyaxon/polyaxon-schemas', license='MIT', platforms='any', packages=find_packages(), keywords=[ 'polyaxon', 'tensorFlow', 'deep-learning', 'machine-learning', 'data-science', 'neural-networks', 'artificial-intelligence', 'ai', 'reinforcement-learning', 'kubernetes', ], install_requires=[ 'Jinja2==2.10', 'marshmallow==2.15.0', 'numpy==1.14.2', 'python-dateutil==2.7.0', 'pytz==2018.3', 'PyYAML==3.12', 'six==1.11.0', ], classifiers=[ 'Programming Language :: Python', 'Operating System :: OS Independent', 'Intended Audience :: Developers', 'Intended Audience :: Science/Research', 'Topic :: Scientific/Engineering :: Artificial Intelligence' ], tests_require=['pytest'], cmdclass={'test': PyTest})
apache-2.0
Python
010fe2d0be30a98808eeaa6e6f4dd2b260df43c4
Support running tests with setup.py
yola/yolapy
setup.py
setup.py
from setuptools import find_packages, setup import yolapy with open('README.rst') as readme_file: readme = readme_file.read() with open('CHANGELOG.rst') as changelog_file: changelog = changelog_file.read() setup( name='yolapy', version=yolapy.__version__, description='Python client for the Yola API', long_description='%s\n\n%s' % (readme, changelog), author='Yola', author_email='engineers@yola.com', license='MIT (Expat)', url='https://github.com/yola/yolapy', packages=find_packages(), test_suite='nose.collector', classifiers=[ 'License :: OSI Approved :: MIT License', 'Programming Language :: Python :: 2', 'Programming Language :: Python :: 3', 'Topic :: Internet :: WWW/HTTP', ], install_requires=[ 'demands >= 1.0.6, < 2.0.0', ], tests_require=[ 'nose >= 1.3.0, < 1.4.0', ], )
from setuptools import find_packages, setup import yolapy with open('README.rst') as readme_file: readme = readme_file.read() with open('CHANGELOG.rst') as changelog_file: changelog = changelog_file.read() setup( name='yolapy', version=yolapy.__version__, description='Python client for the Yola API', long_description='%s\n\n%s' % (readme, changelog), author='Yola', author_email='engineers@yola.com', license='MIT (Expat)', url='https://github.com/yola/yolapy', packages=find_packages(), classifiers=[ 'License :: OSI Approved :: MIT License', 'Programming Language :: Python :: 2', 'Programming Language :: Python :: 3', 'Topic :: Internet :: WWW/HTTP', ], install_requires=[ 'demands >= 1.0.6, < 2.0.0', ], )
mit
Python
b68c1edf352f560ff132c1c092b44134dfea9243
Bump version
yossigo/mockredis,locationlabs/mockredis,matejkloska/mockredis,path/mockredis
setup.py
setup.py
#!/usr/bin/env python from setuptools import setup, find_packages # Match releases to redis-py versions __version__ = '2.9.0.3' # Jenkins will replace __build__ with a unique value. __build__ = '' setup(name='mockredispy', version=__version__ + __build__, description='Mock for redis-py', url='http://www.github.com/locationlabs/mockredis', license='Apache2', packages=find_packages(exclude=['*.tests']), setup_requires=[ 'nose' ], extras_require={ 'lua': ['lunatic-python-bugfix==1.1.1'], }, tests_require=[ 'redis>=2.9.0' ], test_suite='mockredis.tests', entry_points={ 'nose.plugins.0.10': [ 'with_redis = mockredis.noseplugin:WithRedis' ] })
#!/usr/bin/env python from setuptools import setup, find_packages # Match releases to redis-py versions __version__ = '2.9.0.2' # Jenkins will replace __build__ with a unique value. __build__ = '' setup(name='mockredispy', version=__version__ + __build__, description='Mock for redis-py', url='http://www.github.com/locationlabs/mockredis', license='Apache2', packages=find_packages(exclude=['*.tests']), setup_requires=[ 'nose' ], extras_require={ 'lua': ['lunatic-python-bugfix==1.1.1'], }, tests_require=[ 'redis>=2.9.0' ], test_suite='mockredis.tests', entry_points={ 'nose.plugins.0.10': [ 'with_redis = mockredis.noseplugin:WithRedis' ] })
apache-2.0
Python
ba2e263e40e1324f8fd6c3ee012a8d9ada46bdd1
Disable strict C90 flag that appears to be accidentally being used by distutils
blake-sheridan/py,blake-sheridan/py
setup.py
setup.py
#!/usr/local/bin/python3 from distutils.core import setup, Extension # Workaround -Werror=statement-after-declaration # http://bugs.python.org/issue18211 import os os.environ['CFLAGS'] = '-Wno-unused-result' setup( name = 'lazy', version = '1.0', description = 'Lazy', ext_modules = [ Extension( name = 'b._collections', sources = [ 'src/collections.c', ], ), Extension( name = 'b._types', depends = [ 'include/memoizer.h', ], include_dirs = [ 'include', ], sources = [ 'src/memoizer.c', 'src/types.c', ], ), ], )
#!/usr/local/bin/python3 from distutils.core import setup, Extension setup( name = 'lazy', version = '1.0', description = 'Lazy', ext_modules = [ Extension( name = 'b._collections', sources = [ 'src/collections.c', ], ), Extension( name = 'b._types', depends = [ 'include/memoizer.h', ], include_dirs = [ 'include', ], sources = [ 'src/memoizer.c', 'src/types.c', ], ), ], )
apache-2.0
Python
45d88122aee0a0dc9fd3a88a3d2015d0c6240775
Stop lying on Python2 support
matiboy/django_safari_notifications,matiboy/django_safari_notifications
setup.py
setup.py
#!/usr/bin/env python # -*- coding: utf-8 -*- import os import re import sys try: from setuptools import setup except ImportError: from distutils.core import setup def get_version(*file_paths): """Retrieves the version from django_safari_notifications/__init__.py""" filename = os.path.join(os.path.dirname(__file__), *file_paths) version_file = open(filename).read() version_match = re.search(r"^__version__ = ['\"]([^'\"]*)['\"]", version_file, re.M) if version_match: return version_match.group(1) raise RuntimeError('Unable to find version string.') version = get_version("django_safari_notifications", "__init__.py") if sys.argv[-1] == 'publish': try: import wheel print("Wheel version: ", wheel.__version__) except ImportError: print('Wheel library missing. Please run "pip install wheel"') sys.exit() os.system('python setup.py sdist upload') os.system('python setup.py bdist_wheel upload') sys.exit() if sys.argv[-1] == 'tag': print("Tagging the version on git:") os.system("git tag -a %s -m 'version %s'" % (version, version)) os.system("git push --tags") sys.exit() readme = open('README.rst').read() history = open('HISTORY.rst').read().replace('.. :changelog:', '') setup( name='django-safari-notifications', version=version, description="""Support for Safari Push Notifications from within Django""", long_description=readme + '\n\n' + history, author='matiboy', author_email='mathieu@redapesolutions.com', url='https://github.com/matiboy/django-safari-notifications', packages=[ 'django_safari_notifications', ], include_package_data=True, install_requires=["django-model-utils>=2.0", "inquirer>=2.1"], license="MIT", zip_safe=False, keywords='django-safari-notifications', classifiers=[ 'Development Status :: 3 - Alpha', 'Framework :: Django', 'Framework :: Django :: 1.9', 'Framework :: Django :: 1.10', 'Intended Audience :: Developers', 'License :: OSI Approved :: BSD License', 'Natural Language :: English', 'Programming Language :: Python :: 3', 'Programming Language :: Python :: 3.4', 'Programming Language :: Python :: 3.5', ], )
#!/usr/bin/env python # -*- coding: utf-8 -*- import os import re import sys try: from setuptools import setup except ImportError: from distutils.core import setup def get_version(*file_paths): """Retrieves the version from django_safari_notifications/__init__.py""" filename = os.path.join(os.path.dirname(__file__), *file_paths) version_file = open(filename).read() version_match = re.search(r"^__version__ = ['\"]([^'\"]*)['\"]", version_file, re.M) if version_match: return version_match.group(1) raise RuntimeError('Unable to find version string.') version = get_version("django_safari_notifications", "__init__.py") if sys.argv[-1] == 'publish': try: import wheel print("Wheel version: ", wheel.__version__) except ImportError: print('Wheel library missing. Please run "pip install wheel"') sys.exit() os.system('python setup.py sdist upload') os.system('python setup.py bdist_wheel upload') sys.exit() if sys.argv[-1] == 'tag': print("Tagging the version on git:") os.system("git tag -a %s -m 'version %s'" % (version, version)) os.system("git push --tags") sys.exit() readme = open('README.rst').read() history = open('HISTORY.rst').read().replace('.. :changelog:', '') setup( name='django-safari-notifications', version=version, description="""Support for Safari Push Notifications from within Django""", long_description=readme + '\n\n' + history, author='matiboy', author_email='mathieu@redapesolutions.com', url='https://github.com/matiboy/django-safari-notifications', packages=[ 'django_safari_notifications', ], include_package_data=True, install_requires=["django-model-utils>=2.0", "inquirer>=2.1"], license="MIT", zip_safe=False, keywords='django-safari-notifications', classifiers=[ 'Development Status :: 3 - Alpha', 'Framework :: Django', 'Framework :: Django :: 1.8', 'Framework :: Django :: 1.9', 'Framework :: Django :: 1.10', 'Intended Audience :: Developers', 'License :: OSI Approved :: BSD License', 'Natural Language :: English', 'Programming Language :: Python :: 2', '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', ], )
mit
Python
da981b55674cd11dcebe9b6d7070e83f9b39dd1d
use join even for finding version
erikrose/pyelasticsearch
setup.py
setup.py
import codecs import re from os.path import join, dirname from setuptools import setup, find_packages def read(filename): return codecs.open(join(dirname(__file__), filename), 'r').read() def find_version(file_path): version_file = read(file_path) version_match = re.search(r"^__version__ = ['\"]([^'\"]*)['\"]", version_file, re.M) if version_match: return version_match.group(1) raise RuntimeError("Unable to find version string.") setup( name="pyelasticsearch", version=find_version(join("pyelasticsearch", "__init__.py")), description="Lightweight python wrapper for elasticsearch.", long_description=read('README.rst') + '\n\n' + '\n'.join(read(join('docs', 'source', 'changelog.rst')) .splitlines()[1:]), author='Robert Eanes', author_email='python@robsinbox.com', maintainer='Jannis Leidel', maintainer_email='jannis@leidel.info', license='BSD', packages=find_packages(), include_package_data=True, zip_safe=False, classifiers=[ 'Development Status :: 4 - Beta', 'Intended Audience :: Developers', 'License :: OSI Approved :: BSD License', 'Operating System :: OS Independent', 'Programming Language :: Python', 'Programming Language :: Python :: 2', 'Programming Language :: Python :: 2.6', 'Programming Language :: Python :: 2.7', 'Topic :: Internet :: WWW/HTTP :: Indexing/Search' ], requires=[ # Needed? 'requests(>=1.0,<2.0)', 'simplejson(>=2.1.0)' ], install_requires=[ 'requests>=1.0,<2.0', 'simplejson>=2.1.0' ], tests_require=['mock'], test_suite='pyelasticsearch.tests', url='http://github.com/rhec/pyelasticsearch' )
import codecs import re from os.path import join, dirname from setuptools import setup, find_packages def read(filename): return codecs.open(join(dirname(__file__), filename), 'r').read() def find_version(file_path): version_file = read(file_path) version_match = re.search(r"^__version__ = ['\"]([^'\"]*)['\"]", version_file, re.M) if version_match: return version_match.group(1) raise RuntimeError("Unable to find version string.") setup( name="pyelasticsearch", version=find_version("pyelasticsearch/__init__.py"), description="Lightweight python wrapper for elasticsearch.", long_description=read('README.rst') + '\n\n' + '\n'.join(read(join('docs', 'source', 'changelog.rst')) .splitlines()[1:]), author='Robert Eanes', author_email='python@robsinbox.com', maintainer='Jannis Leidel', maintainer_email='jannis@leidel.info', license='BSD', packages=find_packages(), include_package_data=True, zip_safe=False, classifiers=[ 'Development Status :: 4 - Beta', 'Intended Audience :: Developers', 'License :: OSI Approved :: BSD License', 'Operating System :: OS Independent', 'Programming Language :: Python', 'Programming Language :: Python :: 2', 'Programming Language :: Python :: 2.6', 'Programming Language :: Python :: 2.7', 'Topic :: Internet :: WWW/HTTP :: Indexing/Search' ], requires=[ # Needed? 'requests(>=1.0,<2.0)', 'simplejson(>=2.1.0)' ], install_requires=[ 'requests>=1.0,<2.0', 'simplejson>=2.1.0' ], tests_require=['mock'], test_suite='pyelasticsearch.tests', url='http://github.com/rhec/pyelasticsearch' )
bsd-3-clause
Python
11774b2a17624a5de52a518094ac6fb9ec13a4f9
Bump version to 0.2.1
indygreg/python-zstandard,indygreg/python-zstandard,indygreg/python-zstandard,indygreg/python-zstandard,terrelln/python-zstandard,terrelln/python-zstandard,terrelln/python-zstandard,terrelln/python-zstandard
setup.py
setup.py
#!/usr/bin/env python # Copyright (c) 2016-present, Gregory Szorc # All rights reserved. # # This software may be modified and distributed under the terms # of the BSD license. See the LICENSE file for details. import os from setuptools import setup, Extension try: import cffi except ImportError: cffi = None HERE = os.path.abspath(os.path.dirname(__file__)) zstd_sources = ['zstd/%s' % p for p in ( 'common/entropy_common.c', 'common/fse_decompress.c', 'common/xxhash.c', 'common/zstd_common.c', 'compress/fse_compress.c', 'compress/huf_compress.c', 'compress/zbuff_compress.c', 'compress/zstd_compress.c', 'decompress/huf_decompress.c', 'decompress/zbuff_decompress.c', 'decompress/zstd_decompress.c', 'dictBuilder/divsufsort.c', 'dictBuilder/zdict.c', )] sources = zstd_sources + ['zstd.c'] # TODO compile with optimizations. ext = Extension('zstd', sources, include_dirs=[os.path.join(HERE, d) for d in ( 'zstd', 'zstd/common', 'zstd/compress', 'zstd/decompress', 'zstd/dictBuilder', )], ) extensions = [ext] if cffi: import make_cffi extensions.append(make_cffi.ffi.distutils_extension()) setup( name='zstandard', version='0.2.1', description='Zstandard bindings for Python', long_description=open('README.rst', 'r').read(), url='https://github.com/indygreg/python-zstandard', author='Gregory Szorc', author_email='gregory.szorc@gmail.com', license='BSD', classifiers=[ 'Development Status :: 3 - Alpha', 'Intended Audience :: Developers', 'License :: OSI Approved :: BSD License', 'Programming Language :: C', 'Programming Language :: Python :: 2.6', 'Programming Language :: Python :: 2.7', 'Programming Language :: Python :: 3.3', 'Programming Language :: Python :: 3.4', 'Programming Language :: Python :: 3.5', ], keywords='zstandard zstd compression', ext_modules=extensions, test_suite='tests', )
#!/usr/bin/env python # Copyright (c) 2016-present, Gregory Szorc # All rights reserved. # # This software may be modified and distributed under the terms # of the BSD license. See the LICENSE file for details. import os from setuptools import setup, Extension try: import cffi except ImportError: cffi = None HERE = os.path.abspath(os.path.dirname(__file__)) zstd_sources = ['zstd/%s' % p for p in ( 'common/entropy_common.c', 'common/fse_decompress.c', 'common/xxhash.c', 'common/zstd_common.c', 'compress/fse_compress.c', 'compress/huf_compress.c', 'compress/zbuff_compress.c', 'compress/zstd_compress.c', 'decompress/huf_decompress.c', 'decompress/zbuff_decompress.c', 'decompress/zstd_decompress.c', 'dictBuilder/divsufsort.c', 'dictBuilder/zdict.c', )] sources = zstd_sources + ['zstd.c'] # TODO compile with optimizations. ext = Extension('zstd', sources, include_dirs=[os.path.join(HERE, d) for d in ( 'zstd', 'zstd/common', 'zstd/compress', 'zstd/decompress', 'zstd/dictBuilder', )], ) extensions = [ext] if cffi: import make_cffi extensions.append(make_cffi.ffi.distutils_extension()) setup( name='zstandard', version='0.2', description='Zstandard bindings for Python', long_description=open('README.rst', 'r').read(), url='https://github.com/indygreg/python-zstandard', author='Gregory Szorc', author_email='gregory.szorc@gmail.com', license='BSD', classifiers=[ 'Development Status :: 3 - Alpha', 'Intended Audience :: Developers', 'License :: OSI Approved :: BSD License', 'Programming Language :: C', 'Programming Language :: Python :: 2.6', 'Programming Language :: Python :: 2.7', 'Programming Language :: Python :: 3.3', 'Programming Language :: Python :: 3.4', 'Programming Language :: Python :: 3.5', ], keywords='zstandard zstd compression', ext_modules=extensions, test_suite='tests', )
bsd-3-clause
Python
4ff0dda83d592c7f8e29935b77edc9a09411d4d8
Add classifiers and keywords to setup.py.
BeifeiZhou/annoy,aimeida/annoy,LongbinChen/annoy2,pombredanne/annoy,pombredanne/annoy,codeaudit/annoy,LongbinChen/annoy,spotify/annoy,spotify/annoy,eddelbuettel/annoy,LongbinChen/annoy2,tjrileywisc/annoy,Houzz/annoy2,LongbinChen/annoy2,tjrileywisc/annoy,eddelbuettel/annoy,codeaudit/annoy,eddelbuettel/annoy,subu-cliqz/annoy,subu-cliqz/annoy,BeifeiZhou/annoy,pombredanne/annoy,spotify/annoy,LongbinChen/annoy,guitarmind/annoy,tjrileywisc/annoy,tjrileywisc/annoy,aimeida/annoy,LongbinChen/annoy,codeaudit/annoy,Houzz/annoy2,guitarmind/annoy,Houzz/annoy2,eddelbuettel/annoy,BeifeiZhou/annoy,guitarmind/annoy,aimeida/annoy,subu-cliqz/annoy,spotify/annoy,pombredanne/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 distutils.core import setup, Extension import os readme_note = """\ .. note:: For the latest source, discussion, etc, please visit the `GitHub repository <https://github.com/spotify/annoy>`_\n\n """ with open('README.rst') as fobj: long_description = readme_note + fobj.read() setup(name='annoy', version='1.0.3', description='Approximate Nearest Neighbors in C++/Python optimized for memory usage and loading/saving to disk.', packages=['annoy'], ext_modules=[Extension('annoy.annoylib', ['src/annoylib.cc'], libraries=['boost_python'])], long_description=long_description, author='Erik Bernhardsson', author_email='erikbern@spotify.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', 'Programming Language :: Python :: 2.6', 'Programming Language :: Python :: 2.7', ], keywords='nns, approximate nearest neighbor search', )
#!/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 distutils.core import setup, Extension import os readme_note = """\ .. note:: For the latest source, discussion, etc, please visit the `GitHub repository <https://github.com/spotify/annoy>`_\n\n """ with open('README.rst') as fobj: long_description = readme_note + fobj.read() setup(name='annoy', version='1.0.3', description='Approximate Nearest Neighbors in C++/Python optimized for memory usage and loading/saving to disk.', packages=['annoy'], ext_modules=[Extension('annoy.annoylib', ['src/annoylib.cc'], libraries=['boost_python'])], long_description=long_description, author='Erik Bernhardsson', author_email='erikbern@spotify.com', url='https://github.com/spotify/annoy', license='Apache License 2.0', )
apache-2.0
Python
ee1ed38fcff2c52bd2e02ba91f18103abe5adcf2
bump version
appknox/vendor,appknox/vendor,appknox/vendor
setup.py
setup.py
#! /usr/bin/env python # -*- coding: utf-8 -*- # # vim: fenc=utf-8 # vim: tabstop=4 expandtab shiftwidth=4 softtabstop=4 # # """ File name: setup.py Version: 0.1 Author: dhilipsiva <dhilipsiva@gmail.com> Date created: 2015-11-24 """ from setuptools import setup, find_packages from codecs import open from os import path here = path.abspath(path.dirname(__file__)) f = path.join(here, 'README.md') try: from pypandoc import convert long_description = convert(f, 'rst') except ImportError: print( "pypandoc module not found, could not convert Markdown to RST") long_description = open(f, 'r').read() reqs = open("requirements.txt", "r").read().splitlines() setup( name='ak-vendor', version='0.2.1', description="Some vendor scripts that we use here at Appknox", long_description=long_description, url='https://github.com/appknox/vendor', author='dhilipsiva', author_email='dhilipsiva@gmail.com', license='MIT', classifiers=[ 'Development Status :: 4 - Beta', 'Intended Audience :: Developers', 'Topic :: Software Development :: Build Tools', 'License :: OSI Approved :: MIT License', 'Programming Language :: Python :: 3', 'Programming Language :: Python :: 3.5', ], keywords='appknox vendor', packages=find_packages(), py_modules=['ak_vendor'], entry_points='', install_requires=reqs, extras_require={ 'dev': [''], 'test': [''], }, )
#! /usr/bin/env python # -*- coding: utf-8 -*- # # vim: fenc=utf-8 # vim: tabstop=4 expandtab shiftwidth=4 softtabstop=4 # # """ File name: setup.py Version: 0.1 Author: dhilipsiva <dhilipsiva@gmail.com> Date created: 2015-11-24 """ from setuptools import setup, find_packages from codecs import open from os import path here = path.abspath(path.dirname(__file__)) f = path.join(here, 'README.md') try: from pypandoc import convert long_description = convert(f, 'rst') except ImportError: print( "pypandoc module not found, could not convert Markdown to RST") long_description = open(f, 'r').read() reqs = open("requirements.txt", "r").read().splitlines() setup( name='ak-vendor', version='0.2.0', description="Some vendor scripts that we use here at Appknox", long_description=long_description, url='https://github.com/appknox/vendor', author='dhilipsiva', author_email='dhilipsiva@gmail.com', license='MIT', classifiers=[ 'Development Status :: 4 - Beta', 'Intended Audience :: Developers', 'Topic :: Software Development :: Build Tools', 'License :: OSI Approved :: MIT License', 'Programming Language :: Python :: 3', 'Programming Language :: Python :: 3.5', ], keywords='appknox vendor', packages=find_packages(), py_modules=['ak_vendor'], entry_points='', install_requires=reqs, extras_require={ 'dev': [''], 'test': [''], }, )
mit
Python
97d96ac08a1f4035ae48f9951f900a43a6bc4b0c
Bump version for v0.3.3
tempbottle/pycapnp,SymbiFlow/pycapnp,jparyani/pycapnp,rcrowder/pycapnp,tempbottle/pycapnp,SymbiFlow/pycapnp,rcrowder/pycapnp,tempbottle/pycapnp,jparyani/pycapnp,rcrowder/pycapnp,jparyani/pycapnp,jparyani/pycapnp,rcrowder/pycapnp,SymbiFlow/pycapnp,SymbiFlow/pycapnp,tempbottle/pycapnp
setup.py
setup.py
#!/usr/bin/env python try: from Cython.Build import cythonize import Cython except ImportError: raise RuntimeError('No cython installed. Please run `pip install cython`') if Cython.__version__ < '0.19.1': raise RuntimeError('Old cython installed. Please run `pip install -U cython`') from distutils.core import setup import os MAJOR = 0 MINOR = 3 MICRO = 3 VERSION = '%d.%d.%d' % (MAJOR, MINOR, MICRO) def write_version_py(filename=None): cnt = """\ version = '%s' short_version = '%s' """ if not filename: filename = os.path.join( os.path.dirname(__file__), 'capnp', 'version.py') a = open(filename, 'w') try: a.write(cnt % (VERSION, VERSION)) finally: a.close() write_version_py() try: import pypandoc long_description = pypandoc.convert('README.md', 'rst') except (IOError, ImportError): long_description = '' setup( name="capnp", packages=["capnp"], version=VERSION, package_data={'capnp': ['*.pxd', '*.pyx', '*.h']}, ext_modules=cythonize('capnp/*.pyx', language="c++"), install_requires=[ 'cython > 0.19', 'setuptools >= 0.8'], # PyPi info description='A cython wrapping of the C++ capnproto library', long_description=long_description, license='BSD', author="Jason Paryani", author_email="pypi-contact@jparyani.com", url = 'https://github.com/jparyani/capnpc-python-cpp', download_url = 'https://github.com/jparyani/capnpc-python-cpp/archive/v%s.zip' % VERSION, keywords = ['capnp', 'capnproto'], classifiers = [ 'Development Status :: 3 - Alpha', 'Intended Audience :: Developers', 'License :: OSI Approved :: BSD License', 'Operating System :: MacOS :: MacOS X', 'Operating System :: POSIX', 'Programming Language :: C++', 'Programming Language :: Cython', 'Programming Language :: Python :: 2', '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 :: Implementation :: PyPy', 'Topic :: Communications'], )
#!/usr/bin/env python try: from Cython.Build import cythonize import Cython except ImportError: raise RuntimeError('No cython installed. Please run `pip install cython`') if Cython.__version__ < '0.19.1': raise RuntimeError('Old cython installed. Please run `pip install -U cython`') from distutils.core import setup import os MAJOR = 0 MINOR = 3 MICRO = 2 VERSION = '%d.%d.%d' % (MAJOR, MINOR, MICRO) def write_version_py(filename=None): cnt = """\ version = '%s' short_version = '%s' """ if not filename: filename = os.path.join( os.path.dirname(__file__), 'capnp', 'version.py') a = open(filename, 'w') try: a.write(cnt % (VERSION, VERSION)) finally: a.close() write_version_py() try: import pypandoc long_description = pypandoc.convert('README.md', 'rst') except (IOError, ImportError): long_description = '' setup( name="capnp", packages=["capnp"], version=VERSION, package_data={'capnp': ['*.pxd', '*.pyx', '*.h']}, ext_modules=cythonize('capnp/*.pyx', language="c++"), install_requires=[ 'cython > 0.19', 'setuptools >= 0.8'], # PyPi info description='A cython wrapping of the C++ capnproto library', long_description=long_description, license='BSD', author="Jason Paryani", author_email="pypi-contact@jparyani.com", url = 'https://github.com/jparyani/capnpc-python-cpp', download_url = 'https://github.com/jparyani/capnpc-python-cpp/archive/v%s.zip' % VERSION, keywords = ['capnp', 'capnproto'], classifiers = [ 'Development Status :: 3 - Alpha', 'Intended Audience :: Developers', 'License :: OSI Approved :: BSD License', 'Operating System :: MacOS :: MacOS X', 'Operating System :: POSIX', 'Programming Language :: C++', 'Programming Language :: Cython', 'Programming Language :: Python :: 2', '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 :: Implementation :: PyPy', 'Topic :: Communications'], )
bsd-2-clause
Python
777f4bdb150442a2f52693b7347fdb9948326975
Bump to v0.0.5
incuna/django-user-management,incuna/django-user-management
setup.py
setup.py
from setuptools import setup, find_packages version = '0.0.5' install_requires = ( 'djangorestframework>=2.3.12,<3', 'incuna_mail>=0.1.1', ) setup( name='django-user-management', packages=find_packages(), include_package_data=True, version=version, description='', long_description='', author='incuna', author_email='admin@incuna.com', url='https://github.com/incuna/django-user-management/', install_requires=install_requires, zip_safe=False, )
from setuptools import setup, find_packages version = '0.0.4' install_requires = ( 'djangorestframework>=2.3.12,<3', 'incuna_mail>=0.1.1', ) setup( name='django-user-management', packages=find_packages(), include_package_data=True, version=version, description='', long_description='', author='incuna', author_email='admin@incuna.com', url='https://github.com/incuna/django-user-management/', install_requires=install_requires, zip_safe=False, )
bsd-2-clause
Python
9093c16da872031320afdb30948bc7c5d343cd6f
enhance dummy plugin
ryansb/taskforge
taskforge/plugin.py
taskforge/plugin.py
import abc import logging import pkg_resources import six from persist import Warrior @six.add_metaclass(abc.ABCMeta) class PluginBase(object): log = logging.getLogger(__name__) def __init__(self, *args, **kwargs): # TODO: do something with option parameters pass @abc.abstractmethod def pre_run(self): """Optional pre-run setup. Only run once.""" pass @abc.abstractmethod def post_run(self): """Optional post-run teardown""" pass @abc.abstractmethod def process_task(self, task): """Receive a single task in taskw format and return the task after processing. If there are no changes, None should be returned """ raise NotImplementedError class DummyPlugin(PluginBase): def __init__(self, *args, **kwargs): super(DummyPlugin, self).__init__(*args, **kwargs) self.opts = kwargs def pre_run(self): self.log.debug("prerun for DummyPlugin") def post_run(self): self.log.debug("postrun for DummyPlugin") def process_task(self, task): self.log.debug("Dummy plugin loaded with options: " "{}".format(self.opts)) self.log.info("Task pro:{} tags:{} found".format(task['project'], task['tags'])) for a in task['annotations']: self.log.info(a[:80]) def load_plugin(plugin_conf): """Takes a full plugin configuration dict Returns an instance of the plugin loaded and initialized with the plugin options """ ep = pkg_resources.EntryPoint.parse( "{name} = {entrypoint}".format(**plugin_conf), pkg_resources.get_distribution(plugin_conf.get('module', 'taskforge')) ) return ep.load()(**plugin_conf.get('options', {})) def run_plugin(loaded): """Takes a plugin and runs it over pending/waiting tasks """ loaded.pre_run() for t in Warrior().iter_tasks(): loaded.process_task(t) loaded.post_run()
import abc import logging import pkg_resources import six @six.add_metaclass(abc.ABCMeta) class PluginBase(object): log = logging.getLogger(__name__) def __init__(self, *args, **kwargs): # TODO: do something with option parameters pass @abc.abstractmethod def pre_run(self): """Optional pre-run setup. Only run once.""" pass @abc.abstractmethod def post_run(self): """Optional post-run teardown""" pass @abc.abstractmethod def process_task(self, task): """Receive a single task in taskw format and return the task after processing. If there are no changes, None should be returned """ raise NotImplementedError class DummyPlugin(PluginBase): def __init__(self, *args, **kwargs): super(DummyPlugin, self).__init__(*args, **kwargs) self.opts = kwargs def pre_run(self): self.log.debug("prerun for DummyPlugin") def post_run(self): self.log.debug("postrun for DummyPlugin") def process_task(self, task): self.log.info("Hey, dummy plugin loaded with options: " "{}".format(self.opts)) def load_plugin(plugin_conf): """Takes a full plugin configuration dict Returns an instance of the plugin loaded and initialized with the plugin options """ ep = pkg_resources.EntryPoint.parse( "{name} = {entrypoint}".format(**plugin_conf), pkg_resources.get_distribution(plugin_conf.get('module', 'taskforge')) ) return ep.load()(**plugin_conf.get('options', {})) def run_plugin(loaded): """Takes a plugin and runs it over pending/waiting tasks """ loaded.pre_run() for t in Warrior().iter_tasks(): loaded.process_task(t) loaded.post_run()
agpl-3.0
Python
a6c5ecfbceb63fb8c4974902960acfe323303f04
Add details to setup.py.
alexhanson/intercom
setup.py
setup.py
#!/usr/bin/env python from setuptools import setup setup( name='intercom', version='0.0.1', url='https://github.com/alexhanson/intercom', license='ISC License', install_requires=[ 'click==6.6', 'CherryPy==7.1.0', 'Jinja2==2.8', 'pytz==2016.6.1', ], packages=[ 'intercom', ], package_data={ 'intercom': ['templates/*'], }, entry_points={ 'console_scripts': ['intercom = intercom.__main__:main'], }, )
#!/usr/bin/env python from setuptools import setup setup( name='intercom', version='0.0.1', install_requires=[ 'click==6.6', 'CherryPy==7.1.0', 'Jinja2==2.8', 'pytz==2016.6.1', ], packages=[ 'intercom', ], package_data={ 'intercom': ['templates/*'], }, entry_points={ 'console_scripts': ['intercom = intercom.__main__:main'], }, )
isc
Python
51ccea9761e8799bbd099878eafb2739f24af766
Update metadata
photo/openphoto-python,photo/openphoto-python
setup.py
setup.py
#!/usr/bin/env python import sys import openphoto requires = ['requests', 'requests_oauthlib'] console_script = """[console_scripts] openphoto = openphoto.main:main """ # Check the Python version (major, minor) = sys.version_info[:2] if (major, minor) < (2, 6): raise SystemExit("Sorry, Python 2.6 or newer required") try: from setuptools import setup kw = {'entry_points': console_script, 'zip_safe': True, 'install_requires': requires } except ImportError: from distutils.core import setup kw = {'scripts': ['bin/openphoto'], 'requires': requires} setup(name='openphoto', version=openphoto.__version__, description='The official Python client library for Trovebox/OpenPhoto', long_description=open("README.markdown").read(), author='Pete Burgers, James Walker', url='https://github.com/openphoto/openphoto-python', packages=['openphoto'], keywords=['openphoto', 'pyopenphoto', 'openphoto-python', 'trovebox'], classifiers=['Development Status :: 4 - Beta', 'Intended Audience :: Developers', 'License :: OSI Approved :: Apache Software License', 'Operating System :: OS Independent', 'Programming Language :: Python', 'Topic :: Multimedia :: Graphics', 'Topic :: Software Development :: Libraries :: Python Modules', ], license='Apache 2.0', test_suite='tests.unit', **kw )
#!/usr/bin/env python import sys import openphoto requires = ['requests', 'requests_oauthlib'] console_script = """[console_scripts] openphoto = openphoto.main:main """ # Check the Python version (major, minor) = sys.version_info[:2] if (major, minor) < (2, 6): raise SystemExit("Sorry, Python 2.6 or newer required") try: from setuptools import setup kw = {'entry_points': console_script, 'zip_safe': True, 'install_requires': requires } except ImportError: from distutils.core import setup kw = {'scripts': ['bin/openphoto'], 'requires': requires} setup(name='openphoto', version=openphoto.__version__, description='The official Python client library for Trovebox/OpenPhoto', long_description=('This library works with any OpenPhoto server ' '(including the trovebox.com hosted service).\n' 'It provides full access to your photos and metadata, ' 'via a simple Pythonic API.'), author='Pete Burgers, James Walker', url='https://github.com/openphoto/openphoto-python', packages=['openphoto'], classifiers=['Development Status :: 4 - Beta', 'Intended Audience :: Developers', 'License :: OSI Approved :: Apache Software License', 'Operating System :: OS Independent', 'Programming Language :: Python', 'Topic :: Multimedia :: Graphics', 'Topic :: Software Development :: Libraries :: Python Modules', ], license='LICENSE', test_suite='tests.unit', **kw )
apache-2.0
Python
42bb00308ef0102a1b0dec874ad410a52b36e5b3
fix search bug: TaxonFilter searches now taxonomic name
parksandwildlife/wastd,parksandwildlife/wastd,parksandwildlife/wastd,parksandwildlife/wastd
taxonomy/filters.py
taxonomy/filters.py
"""Taxonomy filters.""" # from django.contrib.auth.models import User import django_filters from django_filters.filters import BooleanFilter from django_filters.widgets import BooleanWidget from django.db import models # from django import forms from .models import Taxon class TaxonFilter(django_filters.FilterSet): """Filter for Taxon.""" current = BooleanFilter(widget=BooleanWidget()) class Meta: """Class opts.""" model = Taxon fields = ['taxonomic_name', 'rank', 'current', 'publication_status'] filter_overrides = { models.CharField: { 'filter_class': django_filters.CharFilter, 'extra': lambda f: {'lookup_expr': 'icontains', }, }, # models.BooleanField: { # 'filter_class': django_filters.BooleanFilter, # 'extra': lambda f: {'widget': forms.CheckboxInput,}, # }, }
"""Taxonomy filters.""" # from django.contrib.auth.models import User import django_filters from django_filters.filters import BooleanFilter from django_filters.widgets import BooleanWidget from django.db import models # from django import forms from .models import Taxon class TaxonFilter(django_filters.FilterSet): """Filter for Taxon.""" current = BooleanFilter(widget=BooleanWidget()) class Meta: """Class opts.""" model = Taxon fields = ['name', 'rank', 'current', 'publication_status'] filter_overrides = { models.CharField: { 'filter_class': django_filters.CharFilter, 'extra': lambda f: {'lookup_expr': 'icontains', }, }, # models.BooleanField: { # 'filter_class': django_filters.BooleanFilter, # 'extra': lambda f: {'widget': forms.CheckboxInput,}, # }, }
mit
Python
7ddd3a5fdd57410a5135a012f37155103a4e129d
Raise requests dep version
credativUK/vdirsyncer,untitaker/vdirsyncer,credativUK/vdirsyncer,untitaker/vdirsyncer,hobarrera/vdirsyncer,mathstuf/vdirsyncer,hobarrera/vdirsyncer,tribut/vdirsyncer,tribut/vdirsyncer,untitaker/vdirsyncer,mathstuf/vdirsyncer
setup.py
setup.py
# -*- coding: utf-8 -*- ''' vdirsyncer ~~~~~~~~~~ vdirsyncer is a synchronization tool for vdir. See the README for more details. :copyright: (c) 2014 Markus Unterwaditzer & contributors :license: MIT, see LICENSE for more details. ''' import ast import re from setuptools import find_packages, setup _version_re = re.compile(r'__version__\s+=\s+(.*)') with open('vdirsyncer/__init__.py', 'rb') as f: version = str(ast.literal_eval(_version_re.search( f.read().decode('utf-8')).group(1))) setup( name='vdirsyncer', version=version, author='Markus Unterwaditzer', author_email='markus@unterwaditzer.net', url='https://github.com/untitaker/vdirsyncer', description='A synchronization tool for vdir', license='MIT', long_description=open('README.rst').read(), packages=find_packages(exclude=['tests.*', 'tests']), include_package_data=True, entry_points={ 'console_scripts': ['vdirsyncer = vdirsyncer.cli:main'] }, install_requires=[ 'click>=3.1', 'requests>=2.4.1', 'lxml>=3.0', 'icalendar>=3.6', 'requests_toolbelt>=0.3.0' ], extras_require={'keyring': ['keyring']} )
# -*- coding: utf-8 -*- ''' vdirsyncer ~~~~~~~~~~ vdirsyncer is a synchronization tool for vdir. See the README for more details. :copyright: (c) 2014 Markus Unterwaditzer & contributors :license: MIT, see LICENSE for more details. ''' import ast import re from setuptools import find_packages, setup _version_re = re.compile(r'__version__\s+=\s+(.*)') with open('vdirsyncer/__init__.py', 'rb') as f: version = str(ast.literal_eval(_version_re.search( f.read().decode('utf-8')).group(1))) setup( name='vdirsyncer', version=version, author='Markus Unterwaditzer', author_email='markus@unterwaditzer.net', url='https://github.com/untitaker/vdirsyncer', description='A synchronization tool for vdir', license='MIT', long_description=open('README.rst').read(), packages=find_packages(exclude=['tests.*', 'tests']), include_package_data=True, entry_points={ 'console_scripts': ['vdirsyncer = vdirsyncer.cli:main'] }, install_requires=[ 'click>=3.1', 'requests>=2.1', 'lxml>=3.0', 'icalendar>=3.6', 'requests_toolbelt>=0.3.0' ], extras_require={'keyring': ['keyring']} )
mit
Python
bbcd67f9dc26930c197c04e318d74e36b2fc9ead
Add one more assertion.
joyxu/kernelci-backend,joyxu/kernelci-backend,kernelci/kernelci-backend,joyxu/kernelci-backend,kernelci/kernelci-backend
app/utils/tests/test_meta_parser.py
app/utils/tests/test_meta_parser.py
# Copyright (C) 2014 Linaro Ltd. # # 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 json import logging import os import tempfile import types import unittest from utils.meta_parser import parse_metadata_file class TestMetaParser(unittest.TestCase): def setUp(self): logging.disable(logging.CRITICAL) self.temp_metadata = tempfile.NamedTemporaryFile(delete=False) def tearDown(self): logging.disable(logging.NOTSET) try: os.unlink(self.temp_metadata.name) except Exception: pass def test_parse_config_file(self): file_content = ( '[DEFAULT]\nbuild_status: PASS\nbuild_log: build.log' ) with open(self.temp_metadata.name, 'w') as w_file: w_file.write(file_content) expected = dict(build_status='PASS', build_log='build.log') metadata = parse_metadata_file(self.temp_metadata.name) self.assertEqual(expected, metadata) def test_parse_normal_file(self): file_content = ( 'build_status: PASS\nbuild_log: build.log\n' ) with open(self.temp_metadata.name, 'w') as w_file: w_file.write(file_content) expected = dict(build_status='PASS', build_log='build.log') metadata = parse_metadata_file(self.temp_metadata.name) self.assertEqual(expected, metadata) def test_parse_json_file(self): expected = dict(build_status='PASS', build_log='build.log') try: json_tmp = tempfile.NamedTemporaryFile( suffix='.json', delete=False ) with open(json_tmp.name, 'w') as w_file: json.dump(expected, w_file) metadata = parse_metadata_file(json_tmp.name) self.assertIsInstance(metadata, types.DictionaryType) self.assertEqual(expected, metadata) finally: os.unlink(json_tmp.name)
# Copyright (C) 2014 Linaro Ltd. # # 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 json import logging import os import tempfile import unittest from utils.meta_parser import parse_metadata_file class TestMetaParser(unittest.TestCase): def setUp(self): logging.disable(logging.CRITICAL) self.temp_metadata = tempfile.NamedTemporaryFile(delete=False) def tearDown(self): logging.disable(logging.NOTSET) try: os.unlink(self.temp_metadata.name) except Exception: pass def test_parse_config_file(self): file_content = ( '[DEFAULT]\nbuild_status: PASS\nbuild_log: build.log' ) with open(self.temp_metadata.name, 'w') as w_file: w_file.write(file_content) expected = dict(build_status='PASS', build_log='build.log') metadata = parse_metadata_file(self.temp_metadata.name) self.assertEqual(expected, metadata) def test_parse_normal_file(self): file_content = ( 'build_status: PASS\nbuild_log: build.log\n' ) with open(self.temp_metadata.name, 'w') as w_file: w_file.write(file_content) expected = dict(build_status='PASS', build_log='build.log') metadata = parse_metadata_file(self.temp_metadata.name) self.assertEqual(expected, metadata) def test_parse_json_file(self): expected = dict(build_status='PASS', build_log='build.log') try: json_tmp = tempfile.NamedTemporaryFile( suffix='.json', delete=False ) with open(json_tmp.name, 'w') as w_file: json.dump(expected, w_file) metadata = parse_metadata_file(json_tmp.name) self.assertEqual(expected, metadata) finally: os.unlink(json_tmp.name)
agpl-3.0
Python
26dda5e77861357f4639516222f1c26a12429608
set logging level to INFO always, log when recieving a message
OndragKlaus/janus
telegram_bot/bot.py
telegram_bot/bot.py
# Copyright (c) 2017 Janus Development Team # # 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. import json import functools import logging import traceback import sys from telegram.ext import Updater, MessageHandler, Filters from wit import Wit with open('config.json') as fp: config = json.load(fp) logging.basicConfig(level=logging.INFO) wit = Wit(access_token=config['wit_token']) def handler(func): """ Decorator for handlers that catches errors. """ def wrapper(bot, update): try: return func(bot, update) except: exc_string = traceback.format_exc() if config.get('debug'): update.message.reply_text(exc_string) raise return wrapper @handler def reply(bot, update): logging.info('Received message from %s', update.message.from_user['username']) update.message.reply_text(update.message.text) def main(): updater = Updater(config['telegram_token']) updater.dispatcher.add_handler(MessageHandler(Filters.text, reply)) updater.start_polling() updater.idle() if __name__ == '__main__': main()
# Copyright (c) 2017 Janus Development Team # # 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. import json import functools import traceback import sys from telegram.ext import Updater, MessageHandler, Filters from wit import Wit with open('config.json') as fp: config = json.load(fp) wit = Wit(access_token=config['wit_token']) def handler(func): """ Decorator for handlers that catches errors. """ def wrapper(bot, update): try: return func(bot, update) except: exc_string = traceback.format_exc() print(exc_string, file=sys.stderr) if config.get('debug'): update.message.reply_text(exc_string) else: update.message.reply_text('Internal Error') return wrapper @handler def reply(bot, update): update.message.reply_text(update.message.text) def main(): updater = Updater(config['telegram_token']) updater.dispatcher.add_handler(MessageHandler(Filters.text, reply)) updater.start_polling() updater.idle() if __name__ == '__main__': main()
mit
Python
b33f622a0b5647dad58d29a4ee322d02615533e0
Bump to 0.5.1
ricobl/django-thumbor,ricobl/django-thumbor
setup.py
setup.py
# -*- coding: utf-8 -*- from setuptools import setup setup( name='django-thumbor', version='0.5.1', description=( 'A django application to resize images using the thumbor service'), long_description=open('README.rst').read(), author=u'Enrico Batista da Luz', author_email='rico.bl@gmail.com', url='http://github.com/ricobl/django-thumbor/', license=( 'django-thumbor is licensed under the MIT license. ' 'For more information, please see LICENSE file.'), classifiers=[ 'License :: OSI Approved :: MIT License', ], packages=[ 'django_thumbor', 'django_thumbor.templatetags', ], install_requires=( 'Django>=1.4', 'libthumbor', ), tests_require=( 'django-nose', 'mock', ) )
# -*- coding: utf-8 -*- from setuptools import setup setup( name='django-thumbor', version='0.5', description=( 'A django application to resize images using the thumbor service'), long_description=open('README.rst').read(), author=u'Enrico Batista da Luz', author_email='rico.bl@gmail.com', url='http://github.com/ricobl/django-thumbor/', license=( 'django-thumbor is licensed under the MIT license. ' 'For more information, please see LICENSE file.'), classifiers=[ 'License :: OSI Approved :: MIT License', ], packages=[ 'django_thumbor', 'django_thumbor.templatetags', ], install_requires=( 'Django>=1.4', 'libthumbor', ), tests_require=( 'django-nose', 'mock', ) )
mit
Python
01f55200f29f59bf2125ed768daa2f9d0c508d95
Update to v0.15.5
LonamiWebs/Telethon,expectocode/Telethon,LonamiWebs/Telethon,LonamiWebs/Telethon,LonamiWebs/Telethon
telethon/version.py
telethon/version.py
# Versions should comply with PEP440. # This line is parsed in setup.py: __version__ = '0.15.5'
# Versions should comply with PEP440. # This line is parsed in setup.py: __version__ = '0.15.4'
mit
Python
a8e88036f88adefd3f3206016e9b78f3b58d204b
Bump minimum version for google-api-core to 1.14.0. (#8709)
googleapis/python-speech,googleapis/python-speech
setup.py
setup.py
# Copyright 2018 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, 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 io import os import setuptools # Package metadata. name = "google-cloud-speech" description = "Google Cloud Speech API client library" version = "1.1.0" # Should be one of: # 'Development Status :: 3 - Alpha' # 'Development Status :: 4 - Beta' # 'Development Status :: 5 - Production/Stable' release_status = "Development Status :: 5 - Production/Stable" dependencies = ["google-api-core[grpc] >= 1.14.0, < 2.0.0dev"] extras = {} # Setup boilerplate below this line. package_root = os.path.abspath(os.path.dirname(__file__)) readme_filename = os.path.join(package_root, "README.rst") with io.open(readme_filename, encoding="utf-8") as readme_file: readme = readme_file.read() # Only include packages under the 'google' namespace. Do not include tests, # benchmarks, etc. packages = [ package for package in setuptools.find_packages() if package.startswith("google") ] # Determine which namespaces are needed. namespaces = ["google"] if "google.cloud" in packages: namespaces.append("google.cloud") setuptools.setup( name=name, version=version, description=description, long_description=readme, author="Google LLC", author_email="googleapis-packages@google.com", license="Apache 2.0", url="https://github.com/GoogleCloudPlatform/google-cloud-python", classifiers=[ release_status, "Intended Audience :: Developers", "License :: OSI Approved :: Apache Software License", "Programming Language :: Python", "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", "Operating System :: OS Independent", "Topic :: Internet", ], platforms="Posix; MacOS X; Windows", packages=packages, namespace_packages=namespaces, install_requires=dependencies, extras_require=extras, python_requires=">=2.7,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*", include_package_data=True, zip_safe=False, )
# Copyright 2018 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, 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 io import os import setuptools # Package metadata. name = "google-cloud-speech" description = "Google Cloud Speech API client library" version = "1.1.0" # Should be one of: # 'Development Status :: 3 - Alpha' # 'Development Status :: 4 - Beta' # 'Development Status :: 5 - Production/Stable' release_status = "Development Status :: 5 - Production/Stable" dependencies = ["google-api-core[grpc] >= 1.6.0, < 2.0.0dev"] extras = {} # Setup boilerplate below this line. package_root = os.path.abspath(os.path.dirname(__file__)) readme_filename = os.path.join(package_root, "README.rst") with io.open(readme_filename, encoding="utf-8") as readme_file: readme = readme_file.read() # Only include packages under the 'google' namespace. Do not include tests, # benchmarks, etc. packages = [ package for package in setuptools.find_packages() if package.startswith("google") ] # Determine which namespaces are needed. namespaces = ["google"] if "google.cloud" in packages: namespaces.append("google.cloud") setuptools.setup( name=name, version=version, description=description, long_description=readme, author="Google LLC", author_email="googleapis-packages@google.com", license="Apache 2.0", url="https://github.com/GoogleCloudPlatform/google-cloud-python", classifiers=[ release_status, "Intended Audience :: Developers", "License :: OSI Approved :: Apache Software License", "Programming Language :: Python", "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", "Operating System :: OS Independent", "Topic :: Internet", ], platforms="Posix; MacOS X; Windows", packages=packages, namespace_packages=namespaces, install_requires=dependencies, extras_require=extras, python_requires=">=2.7,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*", include_package_data=True, zip_safe=False, )
apache-2.0
Python
b0c3ecf6fd0b25b6d512951e76cfd3e548737217
include base config in packages
unt-libraries/django-premis-event-service,unt-libraries/django-premis-event-service,unt-libraries/django-premis-event-service
setup.py
setup.py
#! /usr/bin/env python import os from setuptools import setup README = open(os.path.join(os.path.dirname(__file__), 'README.rst')).read() # allow setup.py to be run from any path os.chdir(os.path.normpath(os.path.join(os.path.abspath(__file__), os.pardir))) install_requires = [ 'lxml >= 3.0.0', 'codalib>=1.0.0' ] setup( name="django-premis-event-service", version="1.1.0", packages=['premis_event_service', 'premis_event_service.config.settings.base'], include_package_data=True, license="BSD", description="A Django application for storing and querying PREMIS Events", long_description=README, keywords="django PREMIS preservation", author="University of North Texas Libraries", url="https://github.com/unt-libraries/django-premis-event-service", install_requires=install_requires, classifiers=[ "Environment :: Web Environment", "Framework :: Django", "Intended Audience :: System Administrators", "License :: OSI Approved :: BSD License", "Natural Language :: English", "Operating System :: OS Independent", "Programming Language :: Python", "Programming Language :: Python :: 2.6", "Programming Language :: Python :: 2.7", "Topic :: Internet :: WWW/HTTP :: WSGI :: Application", ], )
#! /usr/bin/env python import os from setuptools import setup README = open(os.path.join(os.path.dirname(__file__), 'README.rst')).read() # allow setup.py to be run from any path os.chdir(os.path.normpath(os.path.join(os.path.abspath(__file__), os.pardir))) install_requires = [ 'lxml >= 3.0.0', 'codalib>=1.0.0' ] setup( name="django-premis-event-service", version="1.1.0", packages=['premis_event_service'], include_package_data=True, license="BSD", description="A Django application for storing and querying PREMIS Events", long_description=README, keywords="django PREMIS preservation", author="University of North Texas Libraries", url="https://github.com/unt-libraries/django-premis-event-service", install_requires=install_requires, classifiers=[ "Environment :: Web Environment", "Framework :: Django", "Intended Audience :: System Administrators", "License :: OSI Approved :: BSD License", "Natural Language :: English", "Operating System :: OS Independent", "Programming Language :: Python", "Programming Language :: Python :: 2.6", "Programming Language :: Python :: 2.7", "Topic :: Internet :: WWW/HTTP :: WSGI :: Application", ], )
bsd-3-clause
Python
0ac5bd820af112f068bc49043ff1159901255e22
bump version
swappsco/django-qa,swappsco/django-qa
setup.py
setup.py
#!/usr/bin/env python # -*- coding: utf-8 -*- from setuptools import find_packages, setup with open('README.md') as file: long_description = file.read() setup( name='django-qa', version='0.0.18', description='Pluggable django app for Q&A', long_description=long_description, author='arjunkomath, cdvv7788, sebastian-code, jlariza, swappsco', author_email='dev@swapps.co', url='https://github.com/swappsco/django-qa', license='MIT', packages=find_packages(), classifiers=[ 'Development Status :: 4 - Beta', 'Framework :: Django', 'Intended Audience :: Developers', 'License :: OSI Approved :: BSD License', 'Operating System :: OS Independent', 'Programming Language :: Python', 'Programming Language :: Python :: 2.7', 'Programming Language :: Python :: 3.3', ], install_requires=[ 'django-annoying', 'django_bootstrap3', 'django_markdown', 'pillow', 'django-taggit', ], extras_require={ 'i18n': [ 'django-modeltranslation>=0.5b1', ], }, include_package_data=True, zip_safe=False, )
#!/usr/bin/env python # -*- coding: utf-8 -*- from setuptools import find_packages, setup with open('README.md') as file: long_description = file.read() setup( name='django-qa', version='0.0.17', description='Pluggable django app for Q&A', long_description=long_description, author='arjunkomath, cdvv7788, sebastian-code, jlariza, swappsco', author_email='dev@swapps.co', url='https://github.com/swappsco/django-qa', license='MIT', packages=find_packages(), classifiers=[ 'Development Status :: 4 - Beta', 'Framework :: Django', 'Intended Audience :: Developers', 'License :: OSI Approved :: BSD License', 'Operating System :: OS Independent', 'Programming Language :: Python', 'Programming Language :: Python :: 2.7', 'Programming Language :: Python :: 3.3', ], install_requires=[ 'django-annoying', 'django_bootstrap3', 'django_markdown', 'pillow', 'django-taggit', ], extras_require={ 'i18n': [ 'django-modeltranslation>=0.5b1', ], }, include_package_data=True, zip_safe=False, )
mit
Python
7aae60589595ec63e8f6b731b2d2d4b5fda191c8
add proper classifiers in setup.py
alfredodeza/pecan-mount
setup.py
setup.py
from setuptools import setup, find_packages import os import re readme = os.path.join(os.path.dirname(__file__), 'README.rst') LONG_DESCRIPTION = open(readme).read() module_file = open("pecan_mount/__init__.py").read() metadata = dict(re.findall("__([a-z]+)__\s*=\s*'([^']+)'", module_file)) setup( name='pecan-mount', version=metadata['version'], description="Mount Pecan apps", long_description=LONG_DESCRIPTION, install_requires = ['pecan'], classifiers=[ 'Development Status :: 4 - Beta', 'Intended Audience :: Developers', 'Intended Audience :: System Administrators', 'License :: OSI Approved :: MIT License', 'Operating System :: MacOS :: MacOS X', 'Operating System :: Microsoft :: Windows', 'Operating System :: POSIX', 'Programming Language :: Python', 'Programming Language :: Python :: 2.6', 'Programming Language :: Python :: 2.7', 'Programming Language :: Python :: 3.3', ], keywords='mount, pecan, wsgi', packages=find_packages(), author='Alfredo Deza', author_email='alfredodeza [at] gmail.com', license='MIT', zip_safe=False, # At some point we ought to add this entry_points=""" [pecan.extension] mount = pecan_mount """ )
from setuptools import setup, find_packages import os import re readme = os.path.join(os.path.dirname(__file__), 'README.rst') LONG_DESCRIPTION = open(readme).read() module_file = open("pecan_mount/__init__.py").read() metadata = dict(re.findall("__([a-z]+)__\s*=\s*'([^']+)'", module_file)) setup( name='pecan-mount', version=metadata['version'], description="Mount Pecan apps", long_description=LONG_DESCRIPTION, install_requires = ['pecan'], classifiers=[ 'Development Status :: 4 - Beta', 'Intended Audience :: Developers', 'Intended Audience :: System Administrators', 'License :: OSI Approved :: MIT License', 'Operating System :: MacOS :: MacOS X', 'Operating System :: Microsoft :: Windows', 'Operating System :: POSIX', 'Programming Language :: Python' ], keywords='mount, pecan, wsgi', packages=find_packages(), author='Alfredo Deza', author_email='alfredodeza [at] gmail.com', license='MIT', zip_safe=False, # At some point we ought to add this entry_points=""" [pecan.extension] mount = pecan_mount """ )
bsd-3-clause
Python
2465cab205a3fa6b90aa1cf54faaab11dc792af0
bump version
KeepSafe/ks-email-parser,KeepSafe/ks-email-parser
setup.py
setup.py
import os from setuptools import setup, find_packages from pip.req import parse_requirements from pip.download import PipSession version = '0.2.13' def read(f): return open(os.path.join(os.path.dirname(__file__), f)).read().strip() install_reqs = parse_requirements('requirements.txt', session=PipSession()) reqs = [str(ir.req) for ir in install_reqs] setup( name='ks-email-parser', version=version, description=('A command line tool to render HTML and text emails of markdown content.'), long_description='\n\n'.join((read('README.md'), read('CHANGELOG'))), classifiers=[ 'License :: OSI Approved :: BSD License', 'Intended Audience :: Developers', 'Programming Language :: Python' ], author='Keepsafe', author_email='support@getkeepsafe.com', url='https://github.com/KeepSafe/ks-email-parser', license='Apache', packages=find_packages(), install_requires=reqs, entry_points={'console_scripts': ['ks-email-parser = email_parser.cmd:main']}, include_package_data=True)
import os from setuptools import setup, find_packages from pip.req import parse_requirements from pip.download import PipSession version = '0.2.12' def read(f): return open(os.path.join(os.path.dirname(__file__), f)).read().strip() install_reqs = parse_requirements('requirements.txt', session=PipSession()) reqs = [str(ir.req) for ir in install_reqs] setup( name='ks-email-parser', version=version, description=('A command line tool to render HTML and text emails of markdown content.'), long_description='\n\n'.join((read('README.md'), read('CHANGELOG'))), classifiers=[ 'License :: OSI Approved :: BSD License', 'Intended Audience :: Developers', 'Programming Language :: Python' ], author='Keepsafe', author_email='support@getkeepsafe.com', url='https://github.com/KeepSafe/ks-email-parser', license='Apache', packages=find_packages(), install_requires=reqs, entry_points={'console_scripts': ['ks-email-parser = email_parser.cmd:main']}, include_package_data=True)
apache-2.0
Python
4015c22ad82018397a3ef398dd5f2b8cfe65faac
Change account which calls initialize_epoch
karlfloersch/pyethereum,karlfloersch/pyethereum,ethereum/pyethereum,ethereum/pyethereum
ethereum/hybrid_casper/consensus.py
ethereum/hybrid_casper/consensus.py
from ethereum import utils, transactions from ethereum.common import update_block_env_variables from ethereum.messages import apply_transaction from ethereum.hybrid_casper import casper_utils from ethereum.utils import sha3, privtoaddr, to_string # Block initialization state transition def initialize(state, block=None): config = state.config state.txindex = 0 state.gas_used = 0 state.bloom = 0 state.receipts = [] if block is not None: update_block_env_variables(state, block) # Initalize the next epoch in the Casper contract if state.block_number % state.env.config['EPOCH_LENGTH'] == 0 and state.block_number != 0: key, account = sha3(to_string(999)), privtoaddr(sha3(to_string(999))) data = casper_utils.casper_translator.encode('initialize_epoch', [state.block_number // state.env.config['EPOCH_LENGTH']]) transaction = transactions.Transaction(state.get_nonce(account), 0, 3141592, state.env.config['CASPER_ADDRESS'], 0, data).sign(key) success, output = apply_transaction(state, transaction) assert success if state.is_DAO(at_fork_height=True): for acct in state.config['CHILD_DAO_LIST']: state.transfer_value( acct, state.config['DAO_WITHDRAWER'], state.get_balance(acct)) if state.is_METROPOLIS(at_fork_height=True): state.set_code(utils.normalize_address( config["METROPOLIS_STATEROOT_STORE"]), config["METROPOLIS_GETTER_CODE"]) state.set_code(utils.normalize_address( config["METROPOLIS_BLOCKHASH_STORE"]), config["METROPOLIS_GETTER_CODE"])
from ethereum import utils, transactions from ethereum.tools import tester from ethereum.common import update_block_env_variables from ethereum.messages import apply_transaction from ethereum.hybrid_casper import casper_utils # Block initialization state transition def initialize(state, block=None): config = state.config state.txindex = 0 state.gas_used = 0 state.bloom = 0 state.receipts = [] if block is not None: update_block_env_variables(state, block) # Initalize the next epoch in the Casper contract if state.block_number % state.env.config['EPOCH_LENGTH'] == 0 and state.block_number != 0: data = casper_utils.casper_translator.encode('initialize_epoch', [state.block_number // state.env.config['EPOCH_LENGTH']]) transaction = transactions.Transaction(state.get_nonce(tester.a0), 0, 3141592, state.env.config['CASPER_ADDRESS'], 0, data).sign(tester.k0) success, output = apply_transaction(state, transaction) assert success if state.is_DAO(at_fork_height=True): for acct in state.config['CHILD_DAO_LIST']: state.transfer_value( acct, state.config['DAO_WITHDRAWER'], state.get_balance(acct)) if state.is_METROPOLIS(at_fork_height=True): state.set_code(utils.normalize_address( config["METROPOLIS_STATEROOT_STORE"]), config["METROPOLIS_GETTER_CODE"]) state.set_code(utils.normalize_address( config["METROPOLIS_BLOCKHASH_STORE"]), config["METROPOLIS_GETTER_CODE"])
mit
Python
c261bf8a7bb6deca83b90dad70a2f090dc72b7c5
Update Getting_Started_with_Pandas.py
LamaHamadeh/Harvard-PH526x
Week4-Case-Studies-Part2/Classifying-Whiskies/Getting_Started_with_Pandas.py
Week4-Case-Studies-Part2/Classifying-Whiskies/Getting_Started_with_Pandas.py
# -*- coding: utf-8 -*- """ Created on Tue Mar 28 10:17:25 2017 @author: ADB3HAMADL """ #In this case study we will classify scotch whiskies based on their flavor #characterisctics. #------------------------------------------------------------------------------ ##import pandas library which is a Python library designed to query and #manipulate annotated data tables import pandas as pd #Two main objects in Pandas to work with: Series and DataFrame. #Series #------- x = pd.Series([6,3,8,6], index = ['q', 'w', 'e', 'r']) #in case we didn't #specify the index, pandas will specify indicies numbers from 0 to len(x) print x print x[['w','r']] #if we want to look at the values that correspond to certain indicies #there are many ways to construct a Series object in Pandas. #Creatign a dictionary is one of them age = {'Tim':29, 'Jim':31, 'Pam':27, 'Sam':35} x = pd.Series(age) print x #DataFrame #--------- #create a dictionary data = {'name': ['Tim', 'Jim', 'Pam', 'Sam'], 'age': [29, 31, 27, 35], 'ZIP':['02115', '02130', '67700', '00100']} #create a DataFrame x = pd.DataFrame(data, columns = ['name', 'age', 'ZIP']) #show DataFrame print x #show data in specific column print x['name'] #another way to show data in specific column is to use data attribute notation print x.name #Indexing #-------- #we often need to reindex a series of a DataFrame object #this doesn't affect the association between the index and the corresponding #data, but instead it essentially reorders the data in the object. #reindex: Reorders the indices of a pandas Series object according to its argument x = pd.Series([6,3,8,6], index = ['q', 'w', 'e', 'r']) #look at the index print x.index #we can take the index, and we can construct a new Python list, which consists #of the same elements, the same letters, but now they have been ordered alphabetically. print sorted(x.index) #or print x.reindex(sorted(x.index)) #arithmetic operations #---------------------- #Series and Data Frame objects support arithmetic operations like addition. #If we, for example, add two Series objects together, #the data alignment happens by index. #What that means is that entries in the series that have the same index #are added together in the same way we might add elements of a NumPy array. #If the indices do not match, however, Pandas #introduces a NAN, or not a number object, the resulting series. x = pd.Series([6,3,8,6], index = ['q', 'w', 'e', 'r']) y = pd.Series([7,3,5,2], index = ['e', 'q', 'r', 't']) #with different indices print x print y #let's add them together print x+y #It can be seen that the last two elements have NAN values and that is due to #the addition between two different indices. In order to have meaningful #resulting values, the indicies must be the same! #------------------------------------------------------------------------------
# -*- coding: utf-8 -*- """ Created on Tue Mar 28 10:17:25 2017 @author: ADB3HAMADL """ #In this case study we will classify scotch whiskies based on their flavor #characterisctics. #------------------------------------------------------------------------------ ##import pandas library which is a Python library designed to query and #manipulate annotated data tables import pandas as pd #Two main objects in Pandas to work with: Series and DataFrame. #Series #------- x = pd.Series([6,3,8,6], index = ['q', 'w', 'e', 'r']) #in case we didn't #specify the index, pandas will specify indicies numbers from 0 to len(x) print x print x[['w','r']] #if we want to look at the values that correspond to certain indicies #there are many ways to construct a Series object in Pandas. #Creatign a dictionary is one of them age = {'Tim':29, 'Jim':31, 'Pam':27, 'Sam':35} x = pd.Series(age) print x #DataFrame #--------- #create a dictionary data = {'name': ['Tim', 'Jim', 'Pam', 'Sam'], 'age': [29, 31, 27, 35], 'ZIP':['02115', '02130', '67700', '00100']} #create a DataFrame x = pd.DataFrame(data, columns = ['name', 'age', 'ZIP']) #show DataFrame print x #show data in specific column print x['name'] #another way to show data in specific column is to use data attribute notation print x.name #we often need to reindex a series of a DataFrame object #this doesn't affect the association between the index and the corresponding #data, but instead it essentially reorders the data in the object. #reindex: Reorders the indices of a pandas Series object according to its argument x = pd.Series([6,3,8,6], index = ['q', 'w', 'e', 'r']) #look at the index print x.index #we can take the index, and we can construct a new Python list, which consists #of the same elements, the same letters, but now they have been ordered alphabetically. print sorted(x.index) #or print x.reindex(sorted(x.index)) #Series and Data Frame objects support arithmetic operations like addition. #If we, for example, add two Series objects together, #the data alignment happens by index. #What that means is that entries in the series that have the same index #are added together in the same way we might add elements of a NumPy array. #If the indices do not match, however, Pandas #introduces a NAN, or not a number object, the resulting series. x = pd.Series([6,3,8,6], index = ['q', 'w', 'e', 'r']) y = pd.Series([7,3,5,2], index = ['e', 'q', 'r', 't']) #with different indices print x print y #let's add them together print x+y #It can be seen that the last two elements have NAN values and that is due to #the addition between two different indices. In order to have meaningful #resulting values, the indicies must be the same! #------------------------------------------------------------------------------
mit
Python
f28e7f9ec1fa4c4cbe041e746c7d4ed15f579b9e
Fix bug in demo's call to close_recruitment()
Dallinger/Dallinger,jcpeterson/Dallinger,berkeley-cocosci/Wallace,berkeley-cocosci/Wallace,jcpeterson/Dallinger,berkeley-cocosci/Wallace,suchow/Wallace,suchow/Wallace,suchow/Wallace,Dallinger/Dallinger,jcpeterson/Dallinger,Dallinger/Dallinger,jcpeterson/Dallinger,jcpeterson/Dallinger,Dallinger/Dallinger,Dallinger/Dallinger
examples/bartlett1932/experiment.py
examples/bartlett1932/experiment.py
from wallace.networks import Chain from wallace.processes import RandomWalkFromSource from wallace.recruiters import PsiTurkRecruiter from wallace.agents import ReplicatorAgent from wallace.experiments import Experiment from wallace.sources import Source class Bartlett1932(Experiment): def __init__(self, session): super(Bartlett1932, self).__init__(session) self.task = "Transmission chain" self.num_agents = 10 self.num_steps = self.num_agents - 1 self.agent_type = ReplicatorAgent self.network = Chain(self.agent_type, self.session) self.process = RandomWalkFromSource(self.network) self.recruiter = PsiTurkRecruiter # Setup for first time experiment is accessed if not self.network.sources: source = WarOfTheGhostsSource() self.network.add_source_global(source) print "Added initial source: " + str(source) def newcomer_arrival_trigger(self, newcomer): self.network.add_agent(newcomer) # If this is the first participant, link them to the source. if len(self.network.agents) == 1: source = self.network.sources[0] source.connect_to(newcomer) self.network.db.commit() # Run the next step of the process. self.process.step() def transmission_reception_trigger(self, transmissions): # Mark transmissions as received for t in transmissions: t.mark_received() def information_creation_trigger(self, info): agent = info.origin self.network.db.add(agent) self.network.db.commit() if self.is_experiment_over(): # If the experiment is over, stop recruiting and export the data. self.recruiter().close_recruitment(self) else: # Otherwise recruit a new participant. self.recruiter().recruit_new_participants(self, n=1) def is_experiment_over(self): return len(self.network.agents) == self.num_agents class WarOfTheGhostsSource(Source): """A source that transmits the War of Ghosts story from Bartlett (1932). """ __mapper_args__ = {"polymorphic_identity": "war_of_the_ghosts_source"} @staticmethod def _data(): with open("static/stimuli/ghosts.md", "r") as f: return f.read()
from wallace.networks import Chain from wallace.processes import RandomWalkFromSource from wallace.recruiters import PsiTurkRecruiter from wallace.agents import ReplicatorAgent from wallace.experiments import Experiment from wallace.sources import Source class Bartlett1932(Experiment): def __init__(self, session): super(Bartlett1932, self).__init__(session) self.task = "Transmission chain" self.num_agents = 10 self.num_steps = self.num_agents - 1 self.agent_type = ReplicatorAgent self.network = Chain(self.agent_type, self.session) self.process = RandomWalkFromSource(self.network) self.recruiter = PsiTurkRecruiter # Setup for first time experiment is accessed if not self.network.sources: source = WarOfTheGhostsSource() self.network.add_source_global(source) print "Added initial source: " + str(source) def newcomer_arrival_trigger(self, newcomer): self.network.add_agent(newcomer) # If this is the first participant, link them to the source. if len(self.network.agents) == 1: source = self.network.sources[0] source.connect_to(newcomer) self.network.db.commit() # Run the next step of the process. self.process.step() def transmission_reception_trigger(self, transmissions): # Mark transmissions as received for t in transmissions: t.mark_received() def information_creation_trigger(self, info): agent = info.origin self.network.db.add(agent) self.network.db.commit() if self.is_experiment_over(): # If the experiment is over, stop recruiting and export the data. self.recruiter().close_recruitment() else: # Otherwise recruit a new participant. self.recruiter().recruit_new_participants(self, n=1) def is_experiment_over(self): return len(self.network.agents) == self.num_agents class WarOfTheGhostsSource(Source): """A source that transmits the War of Ghosts story from Bartlett (1932). """ __mapper_args__ = {"polymorphic_identity": "war_of_the_ghosts_source"} @staticmethod def _data(): with open("static/stimuli/ghosts.md", "r") as f: return f.read()
mit
Python
824296db625cdd94959c6d519f8b47a534d4917a
add parse full and icon_emoji
kesre/slask,llimllib/limbo,NUKnightLab/slask,akatrevorjay/slask,TetraEtc/limbo,signalnine/alanabot,rizaon/limbo,wmv/slackbot-python,TetraEtc/limbo,Marclass/limbo,dorian1453/limbo,palachu/sdbot,uilab-github/slask,cmyr/debt-bot,joshshadowfax/slask,shawnsi/limbo,kylemsguy/limbo,uilab-github/slask,llimllib/limbo,UnILabKAIST/slask,serverdensity/sdbot,Whirlscape/debt-bot,michaelMinar/limbo,sentinelleader/limbo,mmisiewicz/slask,ruhee/limbo,freshbooks/limbo
slask.py
slask.py
from glob import glob import importlib import json import os import re import sys import traceback from flask import Flask, request app = Flask(__name__) curdir = os.path.dirname(os.path.abspath(__file__)) os.chdir(curdir) from config import config hooks = {} def init_plugins(): for plugin in glob('plugins/[!_]*.py'): print "plugin: %s" % plugin try: mod = importlib.import_module(plugin.replace("/", ".")[:-3]) modname = mod.__name__.split('.')[1] for hook in re.findall("on_(\w+)", " ".join(dir(mod))): hookfun = getattr(mod, "on_" + hook) print "attaching %s.%s to %s" % (modname, hookfun, hook) hooks.setdefault(hook, []).append(hookfun) if mod.__doc__: firstline = mod.__doc__.split('\n')[0] hooks.setdefault('help', []).append(firstline) hooks.setdefault('extendedhelp', {})[modname] = mod.__doc__ #bare except, because the modules could raise any number of errors #on import, and we want them not to kill our server except: print "import failed on module %s, module not loaded" % plugin print "%s" % sys.exc_info()[0] print "%s" % traceback.format_exc() init_plugins() def run_hook(hook, data): responses = [] for hook in hooks.get(hook, []): h = hook(data) if h: responses.append(h) return responses @app.route("/", methods=['POST']) def main(): text = "\n".join(run_hook("message", request.form)) if not text: return "" username = config.get("username", "slask") icon = config.get("icon", ":poop:") response = { "text": text, "username": username, "icon_emoji": icon, "parse": "full", } return json.dumps(response) if __name__ == "__main__": app.run(debug=True)
from glob import glob import importlib import json import os import re import sys import traceback from flask import Flask, request app = Flask(__name__) curdir = os.path.dirname(os.path.abspath(__file__)) os.chdir(curdir) from config import config hooks = {} def init_plugins(): for plugin in glob('plugins/[!_]*.py'): print "plugin: %s" % plugin try: mod = importlib.import_module(plugin.replace("/", ".")[:-3]) modname = mod.__name__.split('.')[1] for hook in re.findall("on_(\w+)", " ".join(dir(mod))): hookfun = getattr(mod, "on_" + hook) print "attaching %s.%s to %s" % (modname, hookfun, hook) hooks.setdefault(hook, []).append(hookfun) if mod.__doc__: firstline = mod.__doc__.split('\n')[0] hooks.setdefault('help', []).append(firstline) hooks.setdefault('extendedhelp', {})[modname] = mod.__doc__ #bare except, because the modules could raise any number of errors #on import, and we want them not to kill our server except: print "import failed on module %s, module not loaded" % plugin print "%s" % sys.exc_info()[0] print "%s" % traceback.format_exc() init_plugins() def run_hook(hook, data): responses = [] for hook in hooks.get(hook, []): h = hook(data) if h: responses.append(h) return responses @app.route("/", methods=['POST']) def main(): text = "\n".join(run_hook("message", request.form)) if not text: return "" username = config.get("username", "slask") icon = config.get("icon", ":poop:") response = { "text": text, "username": username, "icon-emoji": icon, } return json.dumps(response) if __name__ == "__main__": app.run(debug=True)
mit
Python
4ece44ee6b9a8ead757be603a76aa2f8d5f92e36
enable fast C++ implementation of python protobuf (#1489)
tensorflow/tensorboard,tensorflow/tensorboard,tensorflow/tensorboard,tensorflow/tensorboard,tensorflow/tensorboard,tensorflow/tensorboard,tensorflow/tensorboard
tensorboard/main.py
tensorboard/main.py
# Copyright 2015 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable 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. # ============================================================================== """TensorBoard main module. This module ties together `tensorboard.program` and `tensorboard.default_plugins` to provide standard TensorBoard. It's meant to be tiny and act as little other than a config file. Those wishing to customize the set of plugins or static assets that TensorBoard uses can swap out this file with their own. """ from __future__ import absolute_import from __future__ import division from __future__ import print_function # pylint: disable=g-import-not-at-top import os # Disable the TF GCS filesystem cache which interacts pathologically with the # pattern of reads used by TensorBoard for logdirs. See for details: # https://github.com/tensorflow/tensorboard/issues/1225 # This must be set before the first import of tensorflow. os.environ['GCS_READ_CACHE_DISABLED'] = '1' # Use fast C++ implementation of Python protocol buffers. See: # https://github.com/protocolbuffers/protobuf/blob/v3.6.0/python/google/protobuf/pyext/README os.environ['PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION'] = 'cpp' os.environ['PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION_VERSION'] = '2' # pylint: enable=g-import-not-at-top import sys from tensorboard import default from tensorboard import program def run_main(): """Initializes flags and calls main().""" program.setup_environment() tensorboard = program.TensorBoard(default.get_plugins(), default.get_assets_zip_provider()) try: from absl import app # Import this to check that app.run() will accept the flags_parser argument. from absl.flags import argparse_flags app.run(tensorboard.main, flags_parser=tensorboard.configure) raise AssertionError("absl.app.run() shouldn't return") except ImportError: pass tensorboard.configure(sys.argv) sys.exit(tensorboard.main()) if __name__ == '__main__': run_main()
# Copyright 2015 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable 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. # ============================================================================== """TensorBoard main module. This module ties together `tensorboard.program` and `tensorboard.default_plugins` to provide standard TensorBoard. It's meant to be tiny and act as little other than a config file. Those wishing to customize the set of plugins or static assets that TensorBoard uses can swap out this file with their own. """ from __future__ import absolute_import from __future__ import division from __future__ import print_function # pylint: disable=g-import-not-at-top # Disable the TF GCS filesystem cache which interacts pathologically with the # pattern of reads used by TensorBoard for logdirs. See for details: # https://github.com/tensorflow/tensorboard/issues/1225 # This must be set before the first import of tensorflow. import os os.environ['GCS_READ_CACHE_DISABLED'] = '1' # pylint: enable=g-import-not-at-top import sys from tensorboard import default from tensorboard import program def run_main(): """Initializes flags and calls main().""" program.setup_environment() tensorboard = program.TensorBoard(default.get_plugins(), default.get_assets_zip_provider()) try: from absl import app # Import this to check that app.run() will accept the flags_parser argument. from absl.flags import argparse_flags app.run(tensorboard.main, flags_parser=tensorboard.configure) raise AssertionError("absl.app.run() shouldn't return") except ImportError: pass tensorboard.configure(sys.argv) sys.exit(tensorboard.main()) if __name__ == '__main__': run_main()
apache-2.0
Python
9a0511fb336b4cda2c2bab9f9040a7005b383a7b
create scoped session in the task
softdevbeing/-southwest-checkin,nickaknudson/southwest-checkin,softdevbeing/-southwest-checkin,sguha00/southwest-checkin,cdorros/southwest-checkin,sguha00/southwest-checkin,echo0101/southwest-checkin,echo0101/southwest-checkin,nickaknudson/southwest-checkin,nickaknudson/southwest-checkin,echo0101/southwest-checkin,cdorros/southwest-checkin,softdevbeing/-southwest-checkin,sguha00/southwest-checkin,cdorros/southwest-checkin
tasks.py
tasks.py
from celery import Celery from sqlalchemy.orm import scoped_session from settings import Config config = Config() from models import Reservation, Flight, FlightLeg, FlightLegLocation from db import Database from sw_checkin_email import * celery = Celery('tasks') celery.config_from_object('celery_config') @celery.task(default_retry_delay=config["RETRY_INTERVAL"], max_retries=config["MAX_RETRIES"]) def test_celery(flight_id): try: db = Database('southwest-checkin.db') flight = session.query(Flight).get(flight_id) return "Found flight %s" % flight.id except Exception, exc: raise test_celery.retry(exc=exc) @celery.task(default_retry_delay=config["RETRY_INTERVAL"], max_retries=config["MAX_RETRIES"]) def check_in_flight(reservation_id, flight_id): db = Database(heroku=True) session = scoped_session(db.session_factory) flight = session.query(Flight).get(flight_id) if flight.success: print "Skipping flight %d. Already checked in at %s" % (flight_id, flight.position) return reservation = session.query(Reservation).get(reservation_id) (position, boarding_pass) = getBoardingPass(reservation) if position: check_in_success(reservation, flight, boarding_pass, position) else: print 'FAILURE. Scheduling another try in %d seconds' % config["RETRY_INTERVAL"] raise check_in_flight.retry(reservation_id, flight_id)
from celery import Celery from settings import Config config = Config() from models import Reservation, Flight, FlightLeg, FlightLegLocation from db import Database from sw_checkin_email import * celery = Celery('tasks') celery.config_from_object('celery_config') @celery.task(default_retry_delay=config["RETRY_INTERVAL"], max_retries=config["MAX_RETRIES"]) def test_celery(flight_id): try: db = Database('southwest-checkin.db') flight = db.Session.query(Flight).get(flight_id) return "Found flight %s" % flight.id except Exception, exc: raise test_celery.retry(exc=exc) @celery.task(default_retry_delay=config["RETRY_INTERVAL"], max_retries=config["MAX_RETRIES"]) def check_in_flight(reservation_id, flight_id): db = Database(heroku=True) flight = db.Session.query(Flight).get(flight_id) if flight.success: print "Skipping flight %d. Already checked in at %s" % (flight_id, flight.position) return reservation = db.Session.query(Reservation).get(reservation_id) (position, boarding_pass) = getBoardingPass(reservation) if position: check_in_success(reservation, flight, boarding_pass, position) else: print 'FAILURE. Scheduling another try in %d seconds' % config["RETRY_INTERVAL"] raise check_in_flight.retry(reservation_id, flight_id)
mit
Python
ce0f4a30cad570557ad67122333041806d411adc
Set changelog_file for invocations release task, which now dry-runs ok
bitprophet/lexicon
tasks.py
tasks.py
from invoke import Collection from invocations import docs from invocations.checks import blacken from invocations.packaging import release from invocations.pytest import test, coverage ns = Collection(test, coverage, release, blacken, docs) ns.configure( {"packaging": {"sign": True, "changelog_file": "docs/changelog.rst"}} )
from invoke import Collection from invocations import docs from invocations.checks import blacken from invocations.packaging import release from invocations.pytest import test, coverage ns = Collection(test, coverage, release, blacken, docs) ns.configure({"packaging": {"sign": True}})
bsd-2-clause
Python
35fab0222543a2f32ef395bf6b622bad29533ceb
Create lazy launcher in setUp.
GoldenLine/gtlaunch
tests.py
tests.py
import unittest from gtlaunch import Launcher class MockOptions(object): def __init__(self): self.verbose = False self.config = '' self.project = '' class LauncherTestCase(unittest.TestCase): def setUp(self): self.options = MockOptions() self.launcher = Launcher(self.options, lazy=True) def test_lazy_init(self): self.assertIsNone(self.launcher.project) def test_no_cwd(self): project = { 'tabs': [], } args = self.launcher.build_args(project) self.assertNotIn('--working-directory', args) def test_cwd(self): project = { 'cwd': '/home/test', 'tabs': [], } args = self.launcher.build_args(project) idx = args.index('--working-directory') self.assertEqual(args[idx + 1], project['cwd']) def test_args_maximize(self): project = { 'cwd': '~', 'tabs': [], } args = self.launcher.build_args(project) self.assertIn('--maximize', args) if __name__ == '__main__': unittest.main()
import unittest from gtlaunch import Launcher class MockOptions(object): def __init__(self): self.verbose = False self.config = '' self.project = '' class LauncherTestCase(unittest.TestCase): def setUp(self): self.options = MockOptions() def test_lazy_init(self): launcher = Launcher(self.options, lazy=True) self.assertIsNone(launcher.project) def test_no_cwd(self): project = { 'tabs': [], } launcher = Launcher(self.options, lazy=True) args = launcher.build_args(project) self.assertNotIn('--working-directory', args) def test_cwd(self): project = { 'cwd': '/home/test', 'tabs': [], } launcher = Launcher(self.options, lazy=True) args = launcher.build_args(project) idx = args.index('--working-directory') self.assertEqual(args[idx + 1], project['cwd']) def test_args_maximize(self): project = { 'cwd': '~', 'tabs': [], } launcher = Launcher(self.options, lazy=True) args = launcher.build_args(project) self.assertIn('--maximize', args) if __name__ == '__main__': unittest.main()
mit
Python
f1e1033e786d372641c2bdaa836547de2d714d8e
Add coverage omits
laslabs/Python-Carepoint
tests.py
tests.py
# -*- coding: utf-8 -*- ############################################################################## # # Author: Dave Lasley <dave@laslabs.com> # Copyright: 2015 LasLabs, Inc [https://laslabs.com] # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the 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/>. # ############################################################################## from setuptools import Command class Tests(Command): TEST_RESULTS = '_results' COVERAGE_RESULTS = 'coverage.xml' user_options = [] # < For Command API compatibility def initialize_options(self, ): pass def finalize_options(self, ): pass def run(self, ): ''' Perform imports inside run to avoid errors before installs, then run ''' from xmlrunner import XMLTestRunner import coverage from unittest import TestLoader from os import path loader = TestLoader() tests = loader.discover('.', 'test_*.py') cov = coverage.Coverage( omit='*/tests/', ) cov.start() t = XMLTestRunner(verbosity=1, output=self.TEST_RESULTS) t.run(tests) cov.stop() cov.save() cov.xml_report(outfile=self.COVERAGE_RESULTS)
# -*- coding: utf-8 -*- ############################################################################## # # Author: Dave Lasley <dave@laslabs.com> # Copyright: 2015 LasLabs, Inc [https://laslabs.com] # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the 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/>. # ############################################################################## from setuptools import Command class Tests(Command): TEST_RESULTS = '_results' COVERAGE_RESULTS = 'coverage.xml' user_options = [] # < For Command API compatibility def initialize_options(self, ): pass def finalize_options(self, ): pass def run(self, ): ''' Perform imports inside run to avoid errors before installs, then run ''' from xmlrunner import XMLTestRunner import coverage from unittest import TestLoader from os import path loader = TestLoader() tests = loader.discover('.', 'test_*.py') cov = coverage.Coverage() cov.start() t = XMLTestRunner(verbosity=1, output=self.TEST_RESULTS) t.run(tests) cov.stop() cov.save() cov.xml_report(outfile=self.COVERAGE_RESULTS)
mit
Python
a2745253170147514d863504f0848b0d16bec11a
Change output colors
kshvmdn/nowplaying
track.py
track.py
from termcolor import colored class Track: def __init__(self, track): self.track = track self.title = track.name.get() self.artist = track.artist.get() self.album = track.album.get() def __str__(self): return '{} - {}, {}'.format(colored(self.title, attrs=['bold']), colored(self.artist, 'blue'), self.album)
from termcolor import colored class Track: def __init__(self, track): self.track = track self.title = track.name.get() self.artist = track.artist.get() self.album = track.album.get() def __str__(self): return '{} - {}, {}'.format(colored(self.title, attrs=['bold']), colored(self.artist, 'red'), self.album)
mit
Python
eb16ae52f604e80adb57508596394a682ab8e2c4
Update routes.py
dominodatalab/python-domino,dominodatalab/python-domino
domino/routes.py
domino/routes.py
class _Routes: def __init__(self, host, owner_username, project_name): self.host = host self._owner_username = owner_username self._project_name = project_name # Project URLs def _build_project_url(self): return self.host + '/v1/projects/' + \ self._owner_username + '/' + self._project_name def _build_project_url_private_api(self): return self.host + '/u/' + self._owner_username + '/' + self._project_name def runs_list(self): return self._build_project_url() + '/runs' def runs_start(self): return self._build_project_url() + '/runs' def runs_status(self, runId): return self._build_project_url() + '/runs/' + runId def files_list(self, commitId, path): return self._build_project_url() + '/files/' + commitId + '/' + path def files_upload(self, path): return self._build_project_url() + path def blobs_get(self, key): return self._build_project_url() + '/blobs/' + key def fork_project(self): return self._build_project_url_private_api() + '/fork' def _build_old_project_url(self): # TODO refactor once these API endpoints are supported in REST API return self.host + '/' \ + self._owner_username + '/' + self._project_name def collaborators_get(self): return self._build_old_project_url() + '/collaborators' def collaborators_add(self): return self._build_old_project_url() + '/addCollaborator' def collaborators_remove(self): return self._build_old_project_url() + '/removeCollaborator' # Endpoint URLs def _build_endpoint_url(self): return self.host + '/v1/' + \ self._owner_username + '/' + self._project_name + '/endpoint' def endpoint(self): return self._build_endpoint_url() def endpoint_state(self): return self._build_endpoint_url() + '/state' def endpoint_publish(self): return self._build_endpoint_url() + '/publishRelease' # Miscellaneous URLs def deployment_version(self): return self.host + '/version' def project_create(self): return self.host + '/new'
class _Routes: def __init__(self, host, owner_username, project_name): self.host = host self._owner_username = owner_username self._project_name = project_name # Project URLs def _build_project_url(self): return self.host + '/v1/projects/' + \ self._owner_username + '/' + self._project_name def _build_project_url_private_api(self): return self.host + '/u/' + self._owner_username + '/' + self._project_name def runs_list(self): return self._build_project_url() + '/runs' def runs_start(self): return self._build_project_url() + '/runs' def runs_status(self, runId): return self._build_project_url() + '/runs/' + runId def files_list(self, commitId, path): return self._build_project_url() + '/files/' + commitId + '/' + path def files_upload(self, path): return self._build_project_url() + path def blobs_get(self, key): return self._build_project_url() + '/blobs/' + key def fork_project(self): return self._build_project_url_private_api() + '/fork' def _build_old_project_url(self): # TODO refactor once these API endpoints are supported in REST API return self.host + '/' \ + self._owner_username + '/' + self._project_name def collaborators_get(self): return self._build_old_project_url() + '/collaborators' def collaborators_add(self): return self._build_old_project_url() + '/addCollaborator' def collaborators_remove(self): return self._build_old_project_url() + '/removeCollaborator' # Endpoint URLs def _build_endpoint_url(self): return self.host + '/v1/' + \ self._owner_username + '/' + self._project_name + '/endpoint' def endpoint(self): return self._build_endpoint_url() def endpoint_state(self): return self._build_endpoint_url() + '/state' def endpoint_publish(self): return self._build_endpoint_url() + '/publishRelease' # Miscellaneous URLs def deployment_version(self): return self.host + '/version' def project_create(self): return self.host + '/new'
apache-2.0
Python
3de4e648f218db5269cc9d90af4c163294faaab7
add sklearn.metrics.average_precision_score as apr in metrics
jeongyoonlee/Kaggler,jeongyoonlee/Kaggler,jeongyoonlee/Kaggler
kaggler/metrics/classification.py
kaggler/metrics/classification.py
import matplotlib.pyplot as plt from sklearn.metrics import roc_curve, precision_recall_curve, log_loss from sklearn.metrics import roc_auc_score as auc # noqa from sklearn.metrics import average_precision_score as apr # noqa from ..const import EPS def logloss(y, p): """Bounded log loss error. Args: y (numpy.array): target p (numpy.array): prediction Returns: bounded log loss error """ p[p < EPS] = EPS p[p > 1 - EPS] = 1 - EPS return log_loss(y, p) def plot_roc_curve(y, p): fpr, tpr, _ = roc_curve(y, p) plt.plot(fpr, tpr) plt.plot([0, 1], [0, 1], color='navy', linestyle='--') plt.xlim([0.0, 1.0]) plt.ylim([0.0, 1.05]) plt.xlabel('False Positive Rate') plt.ylabel('True Positive Rate') def plot_pr_curve(y, p): precision, recall, _ = precision_recall_curve(y, p) plt.step(recall, precision, color='b', alpha=0.2, where='post') plt.fill_between(recall, precision, step='post', alpha=0.2, color='b') plt.xlabel('Recall') plt.ylabel('Precision') plt.ylim([0.0, 1.05]) plt.xlim([0.0, 1.0])
import matplotlib.pyplot as plt from sklearn.metrics import roc_curve, precision_recall_curve, log_loss from sklearn.metrics import roc_auc_score as auc # noqa from ..const import EPS def logloss(y, p): """Bounded log loss error. Args: y (numpy.array): target p (numpy.array): prediction Returns: bounded log loss error """ p[p < EPS] = EPS p[p > 1 - EPS] = 1 - EPS return log_loss(y, p) def plot_roc_curve(y, p): fpr, tpr, _ = roc_curve(y, p) plt.plot(fpr, tpr) plt.plot([0, 1], [0, 1], color='navy', linestyle='--') plt.xlim([0.0, 1.0]) plt.ylim([0.0, 1.05]) plt.xlabel('False Positive Rate') plt.ylabel('True Positive Rate') def plot_pr_curve(y, p): precision, recall, _ = precision_recall_curve(y, p) plt.step(recall, precision, color='b', alpha=0.2, where='post') plt.fill_between(recall, precision, step='post', alpha=0.2, color='b') plt.xlabel('Recall') plt.ylabel('Precision') plt.ylim([0.0, 1.05]) plt.xlim([0.0, 1.0])
mit
Python
ce6284e3734358d7b70f2920b246af853bb48ccd
Update analogInOut.py
KrempelEv/krempelair,bittracker/krempelair,bittracker/krempelair,KrempelEv/krempelair,KrempelEv/krempelair,bittracker/krempelair
krempelair/lib/bus/analogInOut.py
krempelair/lib/bus/analogInOut.py
#!/usr/bin/env python3 # -*- coding: utf-8 -*- import smbus import logging as log class analogInOut(): def __init__(self): self._bus = smbus.SMBus(1) LOG_FILENAME = 'krempelair.log' log.basicConfig(filename=LOG_FILENAME,level=logging.DEBUG) def getValue(self, address, chanel): var = self._bus.read_i2c_block_data(address,chanel,11) #Werte von Board in 11 stelliges Array schreiben val = var[2]*256+var[1] #Berechnung der korrekten Zahlenwerte aus dem Array log.debug("Analogwert von Adresse "+str(address)+ " mit Kanal " +str(chanel) +" mit Wert "+ str(val)) #Ausgabe in der Python Shell return val def setValue(self, address, chanel, value): a=int(value) HBy = int(a/256) LBy = int(a-HBy*256) field=[LBy,HBy] self._bus.write_i2c_block_data(address,chanel,field)
#!/usr/bin/env python3 # -*- coding: utf-8 -*- import smbus import logging as log class analogInOut(): def __init__(self): self._bus = smbus.SMBus(1) LOG_FILENAME = 'krempelair.log' logging.basicConfig(filename=LOG_FILENAME,level=logging.DEBUG) def getValue(self, address, chanel): var = self._bus.read_i2c_block_data(address,chanel,11) #Werte von Board in 11 stelliges Array schreiben val = var[2]*256+var[1] #Berechnung der korrekten Zahlenwerte aus dem Array log.debug("Analogwert von Adresse "+str(address)+ " mit Kanal " +str(chanel) +" mit Wert "+ str(val)) #Ausgabe in der Python Shell return val def setValue(self, address, chanel, value): a=int(value) HBy = int(a/256) LBy = int(a-HBy*256) field=[LBy,HBy] self._bus.write_i2c_block_data(address,chanel,field)
agpl-3.0
Python
d49bc9a42d9bdc9e44f6f656c0daf3245c31e853
Remove unnecessary takeoff command
scorelab/DroneSym,scorelab/DroneSym,scorelab/DroneSym,scorelab/DroneSym,scorelab/DroneSym
dronesym-python/flask-api/src/mavparser.py
dronesym-python/flask-api/src/mavparser.py
from dronekit import Vehicle, Command from pymavlink import mavutil def create_mission(drone, waypoints): cmds = drone.commands cmds.clear() for (i, wp) in enumerate(waypoints): cmds.add(Command(0, 0, 0, mavutil.mavlink.MAV_FRAME_GLOBAL_RELATIVE_ALT, mavutil.mavlink.MAV_CMD_NAV_WAYPOINT, 0, 0, 0, 0, 0, 0, wp['lat'], wp['lon'], 10)) cmds.add(Command(0, 0, 0, mavutil.mavlink.MAV_FRAME_GLOBAL_RELATIVE_ALT, mavutil.mavlink.MAV_CMD_NAV_LAND, 0, 0, 0, 0, 0, 0, waypoints[-1]['lat'], waypoints[-1]['lon'], 0)) print 'uploading mission...' cmds.upload() print 'mission uploaded' return
from dronekit import Vehicle, Command from pymavlink import mavutil def create_mission(drone, waypoints): cmds = drone.commands cmds.clear() cmds.add(Command(0, 0, 0, mavutil.mavlink.MAV_FRAME_GLOBAL_RELATIVE_ALT, mavutil.mavlink.MAV_CMD_NAV_TAKEOFF, 0, 0, 0, 0, 0, 0, waypoints[0]['lat'], waypoints[0]['lon'], 10)) for (i, wp) in enumerate(waypoints): cmds.add(Command(0, 0, 0, mavutil.mavlink.MAV_FRAME_GLOBAL_RELATIVE_ALT, mavutil.mavlink.MAV_CMD_NAV_WAYPOINT, 0, 0, 0, 0, 0, 0, wp['lat'], wp['lon'], 10)) cmds.add(Command(0, 0, 0, mavutil.mavlink.MAV_FRAME_GLOBAL_RELATIVE_ALT, mavutil.mavlink.MAV_CMD_NAV_LAND, 0, 0, 0, 0, 0, 0, waypoints[-1]['lat'], waypoints[-1]['lon'], 0)) print 'uploading mission...' cmds.upload() print 'mission uploaded' return
apache-2.0
Python
a5d2e8feff29f70dadc45ff026f3c42ef5332bdb
define a logger
adrn/SuperFreq
superfreq/__init__.py
superfreq/__init__.py
from .core import * from .naff import * import logging logger = logging.Logger()
from .core import * from .naff import *
mit
Python
f7852806c3198d58162b66e18bfd9998ef33b63c
Modify receiver to prevent using in future
WheatonCS/Lexos,WheatonCS/Lexos,WheatonCS/Lexos
lexos/receivers/stats_receiver.py
lexos/receivers/stats_receiver.py
from lexos.receivers.base_receiver import BaseReceiver class StatsReceiver(BaseReceiver): def __init__(self): """So far there is no frontend option for statistics analysis""" super().__init__() def options_from_front_end(self): """So far there is no frontend option for statistics analysis""" raise NotImplementedError
from lexos.receivers.base_receiver import BaseReceiver class StatsReceiver(BaseReceiver): def __init__(self): """So far there is no frontend option for statistics analysis""" super().__init__() def options_from_front_end(self): """So far there is no frontend option for statistics analysis""" pass
mit
Python
17d34c49f07b4e71886c741a42edae6ad14919f3
simplify read_events
BoraDowon/Life3.0,BoraDowon/Life3.0,BoraDowon/Life3.0
life3/app/services.py
life3/app/services.py
from django.http import JsonResponse from .models import LifeLog from .data import LifeLogDto # TODO: do we need to consider class based? def create_event(data: LifeLogDto): # TODO: validation life_log = LifeLog() life_log.title = data.title life_log.status = data.status life_log.type = data.type life_log.save() def remove_event(): pass def modify_event(): pass def read_events(): life_logs = LifeLog.objects.all().values('title', 'status', 'type') return JsonResponse({'result': list(life_logs)})
import json from .models import LifeLog from .data import LifeLogDto # TODO: do we need to consider class based? def create_event(data: LifeLogDto): # TODO: validation life_log = LifeLog() life_log.title = data.title life_log.status = data.status life_log.type = data.type life_log.save() def remove_event(): pass def modify_event(): pass def read_events(): # FIXME: implement logic and serializer query_set = LifeLog.objects.all() fields = ['title', 'status', 'type'] query_list = list() for query_item in query_set: item = dict() for key in fields: if getattr(query_item, key): item[key] = getattr(query_item, key) query_list.append(item) json_data = json.dumps(query_list) return json_data
mit
Python
c76ec596f65fb984ee1484c1a19e5d24085c62f0
Remove unused import
tysonholub/twilio-python,Mobii/twilio-python,bcorwin/twilio-python,supermanheng21/twilio-python,Rosy-S/twilio-python,twilio/twilio-python,YeelerG/twilio-python,johannakate/twilio-python
tests/pricing/test_numbers.py
tests/pricing/test_numbers.py
import unittest from nose.tools import assert_equal from mock import patch from tests.tools import create_mock_json from twilio.rest.resources.pricing.phone_numbers import PhoneNumberCountries AUTH = ("AC123", "token") BASE_URI = "https://pricing.twilio.com/v1" class NumbersTest(unittest.TestCase): @patch('twilio.rest.resources.base.make_twilio_request') def test_number_countries(self, request): resp = create_mock_json('tests/resources/pricing/phone_number_country_list.json') resp.status_code = 200 request.return_value = resp countries = PhoneNumberCountries(BASE_URI + "/PhoneNumbers", AUTH) result = countries.list() assert_equal(result[0].iso_country, "AC") assert_equal(len(result), 3) request.assert_called_with( "GET", "{}/PhoneNumbers/Countries".format(BASE_URI), auth=AUTH, ) @patch('twilio.rest.resources.base.make_twilio_request') def test_number_country(self, request): resp = create_mock_json('tests/resources/pricing/phone_number_country_instance.json') resp.status_code = 200 request.return_value = resp countries = PhoneNumberCountries(BASE_URI + "/PhoneNumbers", AUTH) country = countries.get('EE') assert_equal(country.country, "Estonia") assert_equal( country.phone_number_prices, [ { 'type': 'mobile', 'base_price': 3.00, 'current_price': 3.00, }, { 'type': 'national', 'base_price': 1.00, 'current_price': 1.00, } ], ) request.assert_called_with( "GET", "{}/PhoneNumbers/Countries/EE".format(BASE_URI), auth=AUTH, )
import unittest from nose.tools import assert_equal from mock import patch, ANY from tests.tools import create_mock_json from twilio.rest.resources.pricing.phone_numbers import PhoneNumberCountries AUTH = ("AC123", "token") BASE_URI = "https://pricing.twilio.com/v1" class NumbersTest(unittest.TestCase): @patch('twilio.rest.resources.base.make_twilio_request') def test_number_countries(self, request): resp = create_mock_json('tests/resources/pricing/phone_number_country_list.json') resp.status_code = 200 request.return_value = resp countries = PhoneNumberCountries(BASE_URI + "/PhoneNumbers", AUTH) result = countries.list() assert_equal(result[0].iso_country, "AC") assert_equal(len(result), 3) request.assert_called_with( "GET", "{}/PhoneNumbers/Countries".format(BASE_URI), auth=AUTH, ) @patch('twilio.rest.resources.base.make_twilio_request') def test_number_country(self, request): resp = create_mock_json('tests/resources/pricing/phone_number_country_instance.json') resp.status_code = 200 request.return_value = resp countries = PhoneNumberCountries(BASE_URI + "/PhoneNumbers", AUTH) country = countries.get('EE') assert_equal(country.country, "Estonia") assert_equal( country.phone_number_prices, [ { 'type': 'mobile', 'base_price': 3.00, 'current_price': 3.00, }, { 'type': 'national', 'base_price': 1.00, 'current_price': 1.00, } ], ) request.assert_called_with( "GET", "{}/PhoneNumbers/Countries/EE".format(BASE_URI), auth=AUTH, )
mit
Python
012c827a643124c47c5cf93631021b5505d4aaf5
Test with a nonexistent save directory
p/webracer
tests/response_saving_test.py
tests/response_saving_test.py
import os import os.path import webracer import nose.plugins.attrib from . import utils from .apps import kitchen_sink_app utils.app_runner_setup(__name__, kitchen_sink_app.app, 8060) save_dir = os.path.join(os.path.dirname(__file__), 'tmp') nonexistent_save_dir = '/tmp/nonexistent.dee11123e367b4a7506f856cc55898fabd4caeff' def list_save_dir(): entries = os.listdir(save_dir) entries = [entry for entry in entries if entry[0] != '.'] return entries @nose.plugins.attrib.attr('client') @webracer.config(host='localhost', port=8060) @webracer.config(save_responses=True, save_dir=save_dir) class ResponseTest(webracer.WebTestCase): def setUp(self, *args, **kwargs): super(ResponseTest, self).setUp(*args, **kwargs) if not os.path.exists(save_dir): os.mkdir(save_dir) else: for entry in list_save_dir(): os.unlink(os.path.join(save_dir, entry)) def test_save_successful(self): self.assertEqual(0, len(list_save_dir())) self.get('/ok') self.assert_status(200) self.assertEqual('ok', self.response.body) entries = list_save_dir() # response + last symlink self.assertEqual(2, len(entries)) assert 'last' in entries entries.remove('last') assert entries[0].startswith('response') @webracer.config(save_responses=True, save_dir=nonexistent_save_dir) def test_save_unsuccessful(self): assert not os.path.exists(nonexistent_save_dir) with self.assert_raises(IOError) as cm: self.get('/ok') assert nonexistent_save_dir in str(cm.exception) assert not os.path.exists(nonexistent_save_dir)
import os import os.path import webracer import nose.plugins.attrib from . import utils from .apps import kitchen_sink_app utils.app_runner_setup(__name__, kitchen_sink_app.app, 8060) save_dir = os.path.join(os.path.dirname(__file__), 'tmp') def list_save_dir(): entries = os.listdir(save_dir) entries = [entry for entry in entries if entry[0] != '.'] return entries @nose.plugins.attrib.attr('client') @webracer.config(host='localhost', port=8060) @webracer.config(save_responses=True, save_dir=save_dir) class ResponseTest(webracer.WebTestCase): def setUp(self, *args, **kwargs): super(ResponseTest, self).setUp(*args, **kwargs) if not os.path.exists(save_dir): os.mkdir(save_dir) else: for entry in list_save_dir(): os.unlink(os.path.join(save_dir, entry)) def test_save_successful(self): self.assertEqual(0, len(list_save_dir())) self.get('/ok') self.assert_status(200) self.assertEqual('ok', self.response.body) entries = list_save_dir() # response + last symlink self.assertEqual(2, len(entries)) assert 'last' in entries entries.remove('last') assert entries[0].startswith('response')
bsd-2-clause
Python
3ea22e0c7b1a1f4e026cb330a2de340245b17968
Convert to string once it's been validated as JSON
harej/reports_bot,harej/wikiproject_scripts
load_configuration.py
load_configuration.py
# -*- coding: utf-8 -*- """ Loads wikiproject.json, validates it, stores it Copyright (C) 2015 James Hare Licensed under MIT License: http://mitlicense.org """ import os import sys import configparser import json import mw import datetime from bs4 import BeautifulSoup from project_index import WikiProjectTools def main(): loginfile = configparser.ConfigParser() loginfile.read([os.path.expanduser('~/.wiki.ini')]) username = loginfile.get('wiki', 'username') password = loginfile.get('wiki', 'password') enwp = mw.Wiki('https://en.wikipedia.org/w/api.php') enwp.login(username, password) # Exports the contents of the wikiproject.json page params = {'action': 'query', 'format': 'json', 'titles': 'Wikipedia:WikiProject X/wikiproject.json', 'export': ''} data = enwp.request(params) dump = data['query']['export']['*'] # We now have a calzone with JSON filling in an XML crust. Boy is this stupid. output = BeautifulSoup(dump, 'xml') output = output.find('text') # The contents are stored in an XML field called 'text' output = output.get_text() # We now have the JSON blob, in string format. try: output = json.loads(output) except ValueError as ack: # If JSON is invalid now = datetime.datetime.utcnow() wikitime = now.strftime('%Y%m%d%H%M%S') report = str(wikitime) + ': ' + str(ack) filename = "errors.log" save = open(filename, "w") save.write(report) save.close() sys.exit() # At this point, we have valid JSON at our disposal. Time to save to the database. wptools = WikiProjectTools() wptools.query('index', 'create table config_draft (json mediumtext character set utf8 collate utf8_unicode_ci) engine=innodb character set=utf8;', None) wptools.query('index', 'insert into config_draft (json) values (%s);', (str(output),)) wptools.query('index', 'drop table if exists config', None) wptools.query('index', 'rename table config_draft to config', None) if __name__ == "__main__": main()
# -*- coding: utf-8 -*- """ Loads wikiproject.json, validates it, stores it Copyright (C) 2015 James Hare Licensed under MIT License: http://mitlicense.org """ import os import sys import configparser import json import mw import datetime from bs4 import BeautifulSoup from project_index import WikiProjectTools def main(): loginfile = configparser.ConfigParser() loginfile.read([os.path.expanduser('~/.wiki.ini')]) username = loginfile.get('wiki', 'username') password = loginfile.get('wiki', 'password') enwp = mw.Wiki('https://en.wikipedia.org/w/api.php') enwp.login(username, password) # Exports the contents of the wikiproject.json page params = {'action': 'query', 'format': 'json', 'titles': 'Wikipedia:WikiProject X/wikiproject.json', 'export': ''} data = enwp.request(params) dump = data['query']['export']['*'] # We now have a calzone with JSON filling in an XML crust. Boy is this stupid. output = BeautifulSoup(dump, 'xml') output = output.find('text') # The contents are stored in an XML field called 'text' output = output.get_text() # We now have the JSON blob, in string format. try: output = json.loads(output) except ValueError as ack: # If JSON is invalid now = datetime.datetime.utcnow() wikitime = now.strftime('%Y%m%d%H%M%S') report = str(wikitime) + ': ' + str(ack) filename = "errors.log" save = open(filename, "w") save.write(report) save.close() sys.exit() # At this point, we have valid JSON at our disposal. Time to save to the database. wptools = WikiProjectTools() wptools.query('index', 'create table config_draft (json mediumtext character set utf8 collate utf8_unicode_ci) engine=innodb character set=utf8;', None) wptools.query('index', 'insert into config_draft (json) values (%s);', (output,)) wptools.query('index', 'drop table if exists config', None) wptools.query('index', 'rename table config_draft to config', None) if __name__ == "__main__": main()
mit
Python
4f4841954c28a2e6c311b38796309a7ea8db81e7
Remove required fields in account_banking_ccorp
sysadminmatmoz/odoo-clearcorp,sysadminmatmoz/odoo-clearcorp,ClearCorp-dev/odoo-clearcorp,ClearCorp/odoo-clearcorp,ClearCorp-dev/odoo-clearcorp,ClearCorp/odoo-clearcorp,sysadminmatmoz/odoo-clearcorp,ClearCorp/odoo-clearcorp,sysadminmatmoz/odoo-clearcorp,ClearCorp/odoo-clearcorp,ClearCorp-dev/odoo-clearcorp,ClearCorp-dev/odoo-clearcorp
account_banking_ccorp/account_banking_ccorp.py
account_banking_ccorp/account_banking_ccorp.py
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Addons modules by CLEARCORP S.A. # Copyright (C) 2009-TODAY CLEARCORP S.A. (<http://clearcorp.co.cr>). # # 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/licens es/>. # ############################################################################## from openerp.osv import osv, fields from openerp.tools.translate import _ from parsers import models def parser_types(*args, **kwargs): '''Delay evaluation of parser types until start of wizard, to allow depending modules to initialize and add their parsers to the list ''' return models.parser_type.get_parser_types() class resPartnerBank(osv.Model): _inherit = "res.partner.bank" _columns = { 'parser_types': fields.selection( parser_types, 'Parser type', help=_("Parser type used to import bank statements file")), 'default_credit_account_id': fields.many2one( 'account.account', 'Default credit account', select=True), 'default_debit_account_id': fields.many2one('account.account', 'Default debit account', select=True), }
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Addons modules by CLEARCORP S.A. # Copyright (C) 2009-TODAY CLEARCORP S.A. (<http://clearcorp.co.cr>). # # 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/licens es/>. # ############################################################################## from openerp.osv import osv, fields from openerp.tools.translate import _ from parsers import models def parser_types(*args, **kwargs): '''Delay evaluation of parser types until start of wizard, to allow depending modules to initialize and add their parsers to the list ''' return models.parser_type.get_parser_types() class resPartnerBank(osv.Model): _inherit = "res.partner.bank" _columns = { 'parser_types': fields.selection( parser_types, 'Parser type', help=_("Parser type used to import bank statements file")), 'default_credit_account_id': fields.many2one( 'account.account', 'Default credit account', select=True, required=True), 'default_debit_account_id': fields.many2one('account.account', 'Default debit account', select=True, required=True), }
agpl-3.0
Python
b9702a5ff1447225e95c86fa431cc66117bdc127
change host for postgis
akittas/geocoder,epyatopal/geocoder-1,ahlusar1989/geocoder,DenisCarriere/geocoder,minimedj/geocoder,miraculixx/geocoder
examples/example_postgis_connect.py
examples/example_postgis_connect.py
import psycopg2 import psycopg2.extras import geocoder import logging import time conn = psycopg2.connect("host=kingston.cbn8rngmikzu.us-west-2.rds.amazonaws.com port=5432 dbname=mydb user=addxy password=Denis44C") cur = conn.cursor(cursor_factory=psycopg2.extras.DictCursor) sql_search = """ SELECT * FROM geocoder LIMIT 1""" cur.execute(sql_search) print cur.fetchone()
import psycopg2 import psycopg2.extras import geocoder import logging import time conn = psycopg2.connect("host=postgis.cbn8rngmikzu.us-west-2.rds.amazonaws.com port=5432 dbname=mydb user=addxy password=Denis44C") cur = conn.cursor(cursor_factory=psycopg2.extras.DictCursor) sql_search = """ SELECT * FROM geocoder LIMIT 1""" cur.execute(sql_search) print cur.fetchone()
mit
Python
b8aedd0e69e862a74cba896bb0dbb1d2748c4edf
join fft threads before getting values
rudimeier/numpy,BabeNovelty/numpy,pizzathief/numpy,MSeifert04/numpy,utke1/numpy,gfyoung/numpy,simongibbons/numpy,empeeu/numpy,mortada/numpy,numpy/numpy,jankoslavic/numpy,Srisai85/numpy,WillieMaddox/numpy,pdebuyl/numpy,behzadnouri/numpy,cowlicks/numpy,ESSS/numpy,gfyoung/numpy,rherault-insa/numpy,simongibbons/numpy,mingwpy/numpy,musically-ut/numpy,ddasilva/numpy,MichaelAquilina/numpy,skymanaditya1/numpy,GaZ3ll3/numpy,shoyer/numpy,SiccarPoint/numpy,mathdd/numpy,Linkid/numpy,simongibbons/numpy,anntzer/numpy,SunghanKim/numpy,ViralLeadership/numpy,ChanderG/numpy,Linkid/numpy,grlee77/numpy,joferkington/numpy,ekalosak/numpy,Yusa95/numpy,ChanderG/numpy,ssanderson/numpy,sonnyhu/numpy,joferkington/numpy,yiakwy/numpy,felipebetancur/numpy,pbrod/numpy,larsmans/numpy,pbrod/numpy,endolith/numpy,groutr/numpy,behzadnouri/numpy,Yusa95/numpy,felipebetancur/numpy,skymanaditya1/numpy,mhvk/numpy,charris/numpy,sigma-random/numpy,pdebuyl/numpy,hainm/numpy,gmcastil/numpy,sonnyhu/numpy,ChanderG/numpy,KaelChen/numpy,WillieMaddox/numpy,jakirkham/numpy,empeeu/numpy,numpy/numpy,WarrenWeckesser/numpy,larsmans/numpy,MSeifert04/numpy,bringingheavendown/numpy,mindw/numpy,naritta/numpy,MichaelAquilina/numpy,madphysicist/numpy,mhvk/numpy,CMartelLML/numpy,seberg/numpy,kiwifb/numpy,nguyentu1602/numpy,grlee77/numpy,Yusa95/numpy,mhvk/numpy,mattip/numpy,argriffing/numpy,dato-code/numpy,GrimDerp/numpy,yiakwy/numpy,rmcgibbo/numpy,naritta/numpy,abalkin/numpy,groutr/numpy,andsor/numpy,dch312/numpy,mindw/numpy,GrimDerp/numpy,rajathkumarmp/numpy,grlee77/numpy,shoyer/numpy,ContinuumIO/numpy,njase/numpy,abalkin/numpy,felipebetancur/numpy,SunghanKim/numpy,kiwifb/numpy,Anwesh43/numpy,jschueller/numpy,ahaldane/numpy,NextThought/pypy-numpy,rmcgibbo/numpy,tynn/numpy,mindw/numpy,cowlicks/numpy,pyparallel/numpy,jankoslavic/numpy,SiccarPoint/numpy,gfyoung/numpy,grlee77/numpy,mattip/numpy,githubmlai/numpy,MSeifert04/numpy,rudimeier/numpy,endolith/numpy,skwbc/numpy,rhythmsosad/numpy,shoyer/numpy,gmcastil/numpy,charris/numpy,andsor/numpy,cjermain/numpy,endolith/numpy,skwbc/numpy,has2k1/numpy,Linkid/numpy,jschueller/numpy,dimasad/numpy,Dapid/numpy,argriffing/numpy,chatcannon/numpy,moreati/numpy,Srisai85/numpy,rhythmsosad/numpy,Eric89GXL/numpy,jakirkham/numpy,mingwpy/numpy,pizzathief/numpy,brandon-rhodes/numpy,charris/numpy,jonathanunderwood/numpy,sigma-random/numpy,tacaswell/numpy,sonnyhu/numpy,naritta/numpy,pbrod/numpy,nguyentu1602/numpy,jankoslavic/numpy,tynn/numpy,WarrenWeckesser/numpy,dwillmer/numpy,ContinuumIO/numpy,groutr/numpy,larsmans/numpy,GaZ3ll3/numpy,stuarteberg/numpy,BMJHayward/numpy,yiakwy/numpy,hainm/numpy,SiccarPoint/numpy,bmorris3/numpy,nguyentu1602/numpy,ekalosak/numpy,SunghanKim/numpy,skymanaditya1/numpy,MichaelAquilina/numpy,bertrand-l/numpy,KaelChen/numpy,dato-code/numpy,Srisai85/numpy,tynn/numpy,sinhrks/numpy,AustereCuriosity/numpy,jorisvandenbossche/numpy,pizzathief/numpy,GrimDerp/numpy,chiffa/numpy,bertrand-l/numpy,pizzathief/numpy,jakirkham/numpy,MaPePeR/numpy,solarjoe/numpy,kiwifb/numpy,pbrod/numpy,mathdd/numpy,ekalosak/numpy,jonathanunderwood/numpy,Eric89GXL/numpy,ahaldane/numpy,githubmlai/numpy,numpy/numpy,Eric89GXL/numpy,ChanderG/numpy,mortada/numpy,dwillmer/numpy,leifdenby/numpy,nbeaver/numpy,cjermain/numpy,ahaldane/numpy,cowlicks/numpy,drasmuss/numpy,tacaswell/numpy,KaelChen/numpy,rhythmsosad/numpy,maniteja123/numpy,BMJHayward/numpy,BMJHayward/numpy,anntzer/numpy,madphysicist/numpy,brandon-rhodes/numpy,tacaswell/numpy,larsmans/numpy,sinhrks/numpy,ddasilva/numpy,tdsmith/numpy,rmcgibbo/numpy,ahaldane/numpy,rajathkumarmp/numpy,mhvk/numpy,ssanderson/numpy,maniteja123/numpy,kirillzhuravlev/numpy,WillieMaddox/numpy,ViralLeadership/numpy,trankmichael/numpy,mwiebe/numpy,mortada/numpy,madphysicist/numpy,CMartelLML/numpy,Yusa95/numpy,musically-ut/numpy,MaPePeR/numpy,ajdawson/numpy,abalkin/numpy,charris/numpy,rgommers/numpy,mattip/numpy,BabeNovelty/numpy,skwbc/numpy,mingwpy/numpy,stuarteberg/numpy,tdsmith/numpy,AustereCuriosity/numpy,SunghanKim/numpy,dch312/numpy,kirillzhuravlev/numpy,Anwesh43/numpy,pbrod/numpy,seberg/numpy,utke1/numpy,endolith/numpy,mhvk/numpy,AustereCuriosity/numpy,ajdawson/numpy,gmcastil/numpy,jakirkham/numpy,pizzathief/numpy,trankmichael/numpy,musically-ut/numpy,chiffa/numpy,has2k1/numpy,bmorris3/numpy,dch312/numpy,stuarteberg/numpy,chatcannon/numpy,nguyentu1602/numpy,rgommers/numpy,dato-code/numpy,rudimeier/numpy,WarrenWeckesser/numpy,drasmuss/numpy,b-carter/numpy,joferkington/numpy,brandon-rhodes/numpy,stuarteberg/numpy,rhythmsosad/numpy,rgommers/numpy,githubmlai/numpy,mortada/numpy,dch312/numpy,MichaelAquilina/numpy,moreati/numpy,b-carter/numpy,jonathanunderwood/numpy,ekalosak/numpy,ContinuumIO/numpy,kirillzhuravlev/numpy,rmcgibbo/numpy,GaZ3ll3/numpy,GaZ3ll3/numpy,chatcannon/numpy,tdsmith/numpy,shoyer/numpy,seberg/numpy,jankoslavic/numpy,jorisvandenbossche/numpy,sinhrks/numpy,ahaldane/numpy,bringingheavendown/numpy,Anwesh43/numpy,CMartelLML/numpy,jorisvandenbossche/numpy,NextThought/pypy-numpy,solarjoe/numpy,CMartelLML/numpy,numpy/numpy,rajathkumarmp/numpy,njase/numpy,sinhrks/numpy,njase/numpy,empeeu/numpy,ESSS/numpy,dimasad/numpy,felipebetancur/numpy,argriffing/numpy,moreati/numpy,githubmlai/numpy,madphysicist/numpy,brandon-rhodes/numpy,MaPePeR/numpy,MSeifert04/numpy,WarrenWeckesser/numpy,rudimeier/numpy,seberg/numpy,simongibbons/numpy,ViralLeadership/numpy,ChristopherHogan/numpy,empeeu/numpy,andsor/numpy,bertrand-l/numpy,MaPePeR/numpy,solarjoe/numpy,MSeifert04/numpy,Anwesh43/numpy,tdsmith/numpy,trankmichael/numpy,Srisai85/numpy,has2k1/numpy,dato-code/numpy,BabeNovelty/numpy,SiccarPoint/numpy,joferkington/numpy,Dapid/numpy,dwillmer/numpy,leifdenby/numpy,jschueller/numpy,ajdawson/numpy,grlee77/numpy,jakirkham/numpy,drasmuss/numpy,anntzer/numpy,mattip/numpy,jschueller/numpy,behzadnouri/numpy,maniteja123/numpy,musically-ut/numpy,yiakwy/numpy,sonnyhu/numpy,dimasad/numpy,madphysicist/numpy,pdebuyl/numpy,rajathkumarmp/numpy,mathdd/numpy,ChristopherHogan/numpy,Eric89GXL/numpy,Dapid/numpy,sigma-random/numpy,mingwpy/numpy,bringingheavendown/numpy,simongibbons/numpy,rherault-insa/numpy,ssanderson/numpy,cjermain/numpy,hainm/numpy,mindw/numpy,BMJHayward/numpy,trankmichael/numpy,anntzer/numpy,mathdd/numpy,cowlicks/numpy,shoyer/numpy,utke1/numpy,sigma-random/numpy,ChristopherHogan/numpy,nbeaver/numpy,pyparallel/numpy,mwiebe/numpy,pdebuyl/numpy,dimasad/numpy,mwiebe/numpy,andsor/numpy,skymanaditya1/numpy,dwillmer/numpy,NextThought/pypy-numpy,bmorris3/numpy,ChristopherHogan/numpy,leifdenby/numpy,rherault-insa/numpy,chiffa/numpy,ajdawson/numpy,GrimDerp/numpy,jorisvandenbossche/numpy,naritta/numpy,cjermain/numpy,KaelChen/numpy,rgommers/numpy,pyparallel/numpy,hainm/numpy,ESSS/numpy,b-carter/numpy,has2k1/numpy,ddasilva/numpy,jorisvandenbossche/numpy,nbeaver/numpy,NextThought/pypy-numpy,Linkid/numpy,kirillzhuravlev/numpy,bmorris3/numpy,BabeNovelty/numpy,WarrenWeckesser/numpy
numpy/fft/tests/test_fftpack.py
numpy/fft/tests/test_fftpack.py
from __future__ import division, absolute_import, print_function import numpy as np from numpy.testing import TestCase, run_module_suite, assert_array_almost_equal from numpy.testing import assert_array_equal import threading import sys if sys.version_info[0] >= 3: import queue else: import Queue as queue def fft1(x): L = len(x) phase = -2j*np.pi*(np.arange(L)/float(L)) phase = np.arange(L).reshape(-1, 1) * phase return np.sum(x*np.exp(phase), axis=1) class TestFFTShift(TestCase): def test_fft_n(self): self.assertRaises(ValueError, np.fft.fft, [1, 2, 3], 0) class TestFFT1D(TestCase): def test_basic(self): rand = np.random.random x = rand(30) + 1j*rand(30) assert_array_almost_equal(fft1(x), np.fft.fft(x)) class TestFFTThreadSafe(TestCase): threads = 16 input_shape = (800, 200) def _test_mtsame(self, func, *args): def worker(args, q): q.put(func(*args)) q = queue.Queue() expected = func(*args) # Spin off a bunch of threads to call the same function simultaneously t = [threading.Thread(target=worker, args=(args, q)) for i in range(self.threads)] [x.start() for x in t] [x.join() for x in t] # Make sure all threads returned the correct value for i in range(self.threads): assert_array_equal(q.get(timeout=5), expected, 'Function returned wrong value in multithreaded context') def test_fft(self): a = np.ones(self.input_shape) * 1+0j self._test_mtsame(np.fft.fft, a) def test_ifft(self): a = np.ones(self.input_shape) * 1+0j self._test_mtsame(np.fft.ifft, a) def test_rfft(self): a = np.ones(self.input_shape) self._test_mtsame(np.fft.rfft, a) def test_irfft(self): a = np.ones(self.input_shape) * 1+0j self._test_mtsame(np.fft.irfft, a) if __name__ == "__main__": run_module_suite()
from __future__ import division, absolute_import, print_function import numpy as np from numpy.testing import TestCase, run_module_suite, assert_array_almost_equal from numpy.testing import assert_array_equal import threading import sys if sys.version_info[0] >= 3: import queue else: import Queue as queue def fft1(x): L = len(x) phase = -2j*np.pi*(np.arange(L)/float(L)) phase = np.arange(L).reshape(-1, 1) * phase return np.sum(x*np.exp(phase), axis=1) class TestFFTShift(TestCase): def test_fft_n(self): self.assertRaises(ValueError, np.fft.fft, [1, 2, 3], 0) class TestFFT1D(TestCase): def test_basic(self): rand = np.random.random x = rand(30) + 1j*rand(30) assert_array_almost_equal(fft1(x), np.fft.fft(x)) class TestFFTThreadSafe(TestCase): threads = 16 input_shape = (800, 200) def _test_mtsame(self, func, *args): def worker(args, q): q.put(func(*args)) q = queue.Queue() expected = func(*args) # Spin off a bunch of threads to call the same function simultaneously t = [threading.Thread(target=worker, args=(args, q)) for i in range(self.threads)] [x.start() for x in t] # Make sure all threads returned the correct value for i in range(self.threads): assert_array_equal(q.get(timeout=5), expected, 'Function returned wrong value in multithreaded context') [x.join() for x in t] def test_fft(self): a = np.ones(self.input_shape) * 1+0j self._test_mtsame(np.fft.fft, a) def test_ifft(self): a = np.ones(self.input_shape) * 1+0j self._test_mtsame(np.fft.ifft, a) def test_rfft(self): a = np.ones(self.input_shape) self._test_mtsame(np.fft.rfft, a) def test_irfft(self): a = np.ones(self.input_shape) * 1+0j self._test_mtsame(np.fft.irfft, a) if __name__ == "__main__": run_module_suite()
bsd-3-clause
Python
b73bb0553368852b1656ff03e4e3bf2f66f8e2ec
Add debug output to failing test
stormrose-va/xobox
tests/t_utils/test_filters.py
tests/t_utils/test_filters.py
# -*- coding: utf-8 -*- """ tests.t_utils.test_filters ~~~~~~~~~~~~~~~~~~~~~~~~~~ :copyright: Copyright 2017 by The Stormrose Project team, see AUTHORS. :license: MIT License, see LICENSE for details. """ import os import importlib from unittest import TestCase from xobox.utils import filters class TestXoboxUtilsFilters(TestCase): """ Unit tests for :py:mod:`xobox.utils.filters` """ def test_01(self): """ Test Case 01: Detect test modules in current path. Test is passed if the returned list matches with the expected result. """ test_path = os.path.dirname(os.path.realpath(__file__)) print(test_path) result = [] expected = [ 'test_compat.py', 'test_convert.py', 'test_dynamic.py', 'test_filters.py', 'test_loader.py', 'test_singleton.py', 'test_termcolor.py', 'test_timer.py', 'test_version.py' ] for root, dirs, files in os.walk(test_path): print(root) print(dirs) print(files) result += list(filter(filters.files, files)) print(expected) print(result) self.assertListEqual(result, expected) def test_02(self): """ Test Case 02: Detect members of current test module. Test is passed if the returned list matches with the expected result. """ test_module = importlib.import_module('tests.t_utils.test_filters') result = list(filter(filters.members, dir(test_module))) expected = ['TestCase', 'TestXoboxUtilsFilters', 'filters', 'importlib', 'os'] self.assertListEqual(result, expected) def test_03(self): """ Test Case 03: Detect modules in tests package path. Test is passed if the returned list matches with the expected result. """ test_path = os.path.dirname(os.path.dirname(os.path.realpath(__file__))) gen_dir = os.listdir(test_path) result = list(filter(filters.modules, gen_dir)) expected = ['t_cli', 't_conf', 't_core', 't_scripts', 't_utils', 'test_xobox.py'] self.assertListEqual(result, expected)
# -*- coding: utf-8 -*- """ tests.t_utils.test_filters ~~~~~~~~~~~~~~~~~~~~~~~~~~ :copyright: Copyright 2017 by The Stormrose Project team, see AUTHORS. :license: MIT License, see LICENSE for details. """ import os import importlib from unittest import TestCase from xobox.utils import filters class TestXoboxUtilsFilters(TestCase): """ Unit tests for :py:mod:`xobox.utils.filters` """ def test_01(self): """ Test Case 01: Detect test modules in current path. Test is passed if the returned list matches with the expected result. """ test_path = os.path.dirname(os.path.realpath(__file__)) result = [] expected = [ 'test_compat.py', 'test_convert.py', 'test_dynamic.py', 'test_filters.py', 'test_loader.py', 'test_singleton.py', 'test_termcolor.py', 'test_timer.py', 'test_version.py' ] for root, dirs, files in os.walk(test_path): result += list(filter(filters.files, files)) self.assertListEqual(result, expected) def test_02(self): """ Test Case 02: Detect members of current test module. Test is passed if the returned list matches with the expected result. """ test_module = importlib.import_module('tests.t_utils.test_filters') result = list(filter(filters.members, dir(test_module))) expected = ['TestCase', 'TestXoboxUtilsFilters', 'filters', 'importlib', 'os'] self.assertListEqual(result, expected) def test_03(self): """ Test Case 03: Detect modules in tests package path. Test is passed if the returned list matches with the expected result. """ test_path = os.path.dirname(os.path.dirname(os.path.realpath(__file__))) gen_dir = os.listdir(test_path) result = list(filter(filters.modules, gen_dir)) expected = ['t_cli', 't_conf', 't_core', 't_scripts', 't_utils', 'test_xobox.py'] self.assertListEqual(result, expected)
mit
Python
6435193a41a38d99bfb0c0f0ab4733464e12a7d6
allow to overwrite setting in the tests
mmohrhard/crash,mmohrhard/crash,mmohrhard/crash,Liongold/crash,Liongold/crash,Liongold/crash
django/crashreport/symbols/handler.py
django/crashreport/symbols/handler.py
# -*- Mode: python; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ # # This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. # from zipfile import ZipFile from .models import SymbolsUpload from django.utils import timezone from django.conf import settings class SymbolsUploadHandler(object): def __init__(self): pass def process(self, data, path): zip_file = ZipFile(path) file_names = "\n".join(zip_file.namelist()) zip_file.extractall(settings.SYMBOL_LOCATION) upload = SymbolsUpload() upload.files = file_names upload.comment = data['version'] + " " + data['platform'] upload.comment upload.upload_time = timezone.now() upload.save() # vim:set shiftwidth=4 softtabstop=4 expandtab: */
# -*- Mode: python; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ # # This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. # from zipfile import ZipFile from .models import SymbolsUpload from django.utils import timezone from django.conf import settings class SymbolsUploadHandler(object): symbol_location = settings.SYMBOL_LOCATION def __init__(self): pass def process(self, data, path): zip_file = ZipFile(path) file_names = "\n".join(zip_file.namelist()) zip_file.extractall(SymbolsUploadHandler.symbol_location) upload = SymbolsUpload() upload.files = file_names upload.comment = data['version'] + " " + data['platform'] upload.comment upload.upload_time = timezone.now() upload.save() # vim:set shiftwidth=4 softtabstop=4 expandtab: */
mpl-2.0
Python
bcc3df62656cc4197b17b40fa88f5bba1ee5ffa9
Update tree level.
weijia/obj_sys,weijia/obj_sys
obj_sys/ufs_obj_in_tree_view.py
obj_sys/ufs_obj_in_tree_view.py
from django.core.context_processors import csrf from django.views.generic import TemplateView from djangoautoconf.django_utils import retrieve_param from models_mptt import UfsObjInTree class ItemTreeView(TemplateView): item_class = UfsObjInTree default_level = 2 def get_context_data(self, **kwargs): # context = super(AddTagTemplateView, self).get_context_data(**kwargs) context = {} data = retrieve_param(self.request) if "root" in data: root = self.item_class.objects.filter(pk=data["root"]) tree_items = self.item_class.objects.get_queryset_descendants(root).filter( level__lt=root[0].level+self.default_level+1) else: tree_items = self.item_class.objects.filter(level__lt=self.default_level) c = {"user": self.request.user, "nodes": tree_items} c.update(csrf(self.request)) context.update(c) # log = logging.getLogger(__name__) # log.error(context) return context
from django.core.context_processors import csrf from django.views.generic import TemplateView from djangoautoconf.django_utils import retrieve_param from models_mptt import UfsObjInTree class ItemTreeView(TemplateView): item_class = UfsObjInTree default_level = 2 def get_context_data(self, **kwargs): # context = super(AddTagTemplateView, self).get_context_data(**kwargs) context = {} data = retrieve_param(self.request) if "root" in data: root = self.item_class.objects.filter(pk=data["root"]) tree_items = self.item_class.objects.get_queryset_descendants(root).filter( level__lt=root[0].level+self.default_level) else: tree_items = self.item_class.objects.filter(level__lt=self.default_level) c = {"user": self.request.user, "nodes": tree_items} c.update(csrf(self.request)) context.update(c) # log = logging.getLogger(__name__) # log.error(context) return context
bsd-3-clause
Python
2a7322608789b377a1315a1fcfbccb2617f73e4e
Update test_wrong_password.py
AlexBenyuh/python_training
test/test_wrong_password.py
test/test_wrong_password.py
# -*- coding: utf-8 -*- from model.credentials import Credentials def test_success_login_mk(app): app.cas.wrong_password(Credentials(login="380960000000", password="1"))
# -*- coding: utf-8 -*- from model.credentials import Credentials def test_success_login_mk(app): app.cas.wrong_password(Credentials(login="380961451058", password="MK2prod_20"))
apache-2.0
Python
addee67fbf46a795c9de4669c9951c84b6590d98
Add params in BaseContext abtract methods
CartoDB/cartoframes,CartoDB/cartoframes
cartoframes/context/base_context.py
cartoframes/context/base_context.py
from abc import ABCMeta, abstractmethod class BaseContext(): __metaclass__ = ABCMeta @abstractmethod def download(self, query, retry_times=0): pass @abstractmethod def upload(self, query, data): pass @abstractmethod def execute_query(self, query, parse_json=True, do_post=True, format=None, **request_args): pass @abstractmethod def execute_long_running_query(self, query): pass
from abc import ABCMeta, abstractmethod class BaseContext(): __metaclass__ = ABCMeta @abstractmethod def download(self): pass @abstractmethod def upload(self): pass @abstractmethod def execute_query(self): pass @abstractmethod def execute_long_running_query(self): pass
bsd-3-clause
Python
df6fdf1a7a1f356ba06ef5641deb24861e2db77d
Clean up inplace ops in relu
spacy-io/thinc,explosion/thinc,spacy-io/thinc,explosion/thinc,spacy-io/thinc,explosion/thinc,explosion/thinc
thinc/neural/_classes/relu.py
thinc/neural/_classes/relu.py
from .affine import Affine from ... import describe from ... import check from ...describe import Dimension, Synapses, Biases from ...check import has_shape class ReLu(Affine): @check.arg(1, has_shape(('nB', 'nI'))) def predict(self, input__BI): output__BO = Affine.predict(self, input__BI) output__BO = self.ops.relu(output__BO, inplace=False) return output__BO @check.arg(1, has_shape(('nB', 'nI'))) def begin_update(self, input__BI, drop=0.0): output__BO, finish_affine = Affine.begin_update(self, input__BI, drop=0.) output__BO = self.ops.relu(output__BO) @check.arg(0, has_shape(('nB', 'nO'))) def finish_update(gradient, sgd=None): gradient = self.ops.backprop_relu(gradient, output__BO) return finish_affine(gradient, sgd) dropped, bp_dropout = self.ops.dropout(output__BO, drop, inplace=False) return dropped, bp_dropout(finish_update)
from .affine import Affine from ... import describe from ... import check from ...describe import Dimension, Synapses, Biases from ...check import has_shape class ReLu(Affine): @check.arg(1, has_shape(('nB', 'nI'))) def predict(self, input__BI): output__BO = Affine.predict(self, input__BI) output__BO = output__BO.copy() output__BO = self.ops.relu(output__BO, inplace=True) return output__BO @check.arg(1, has_shape(('nB', 'nI'))) def begin_update(self, input__BI, drop=0.0): output__BO, finish_affine = Affine.begin_update(self, input__BI, drop=0.) output_copy = output__BO.copy() output_copy = self.ops.relu(output_copy, inplace=True) @check.arg(0, has_shape(('nB', 'nO'))) def finish_update(gradient, sgd=None): gradient = gradient.copy() gradient = self.ops.backprop_relu(gradient, output_copy, inplace=True) return finish_affine(gradient, sgd) output__BO[:] = output_copy output__BO, bp_dropout = self.ops.dropout(output__BO, drop, inplace=True) return output__BO, bp_dropout(finish_update)
mit
Python
ad0c052c654f23162e05d848d89a8345b294d983
Make hyphen compile on Win64
patrickm/chromium.src,zcbenz/cefode-chromium,nacl-webkit/chrome_deps,krieger-od/nwjs_chromium.src,nacl-webkit/chrome_deps,axinging/chromium-crosswalk,ondra-novak/chromium.src,timopulkkinen/BubbleFish,ChromiumWebApps/chromium,markYoungH/chromium.src,hujiajie/pa-chromium,Chilledheart/chromium,hujiajie/pa-chromium,crosswalk-project/chromium-crosswalk-efl,nacl-webkit/chrome_deps,nacl-webkit/chrome_deps,krieger-od/nwjs_chromium.src,Jonekee/chromium.src,mogoweb/chromium-crosswalk,nacl-webkit/chrome_deps,ltilve/chromium,Jonekee/chromium.src,dushu1203/chromium.src,ChromiumWebApps/chromium,hujiajie/pa-chromium,markYoungH/chromium.src,ChromiumWebApps/chromium,patrickm/chromium.src,anirudhSK/chromium,hgl888/chromium-crosswalk,dushu1203/chromium.src,pozdnyakov/chromium-crosswalk,Chilledheart/chromium,mogoweb/chromium-crosswalk,Fireblend/chromium-crosswalk,Just-D/chromium-1,Fireblend/chromium-crosswalk,hgl888/chromium-crosswalk-efl,TheTypoMaster/chromium-crosswalk,mogoweb/chromium-crosswalk,hgl888/chromium-crosswalk-efl,Fireblend/chromium-crosswalk,ChromiumWebApps/chromium,Jonekee/chromium.src,Chilledheart/chromium,ChromiumWebApps/chromium,PeterWangIntel/chromium-crosswalk,pozdnyakov/chromium-crosswalk,krieger-od/nwjs_chromium.src,Pluto-tv/chromium-crosswalk,bright-sparks/chromium-spacewalk,hgl888/chromium-crosswalk,axinging/chromium-crosswalk,M4sse/chromium.src,jaruba/chromium.src,hgl888/chromium-crosswalk-efl,TheTypoMaster/chromium-crosswalk,timopulkkinen/BubbleFish,hgl888/chromium-crosswalk,markYoungH/chromium.src,zcbenz/cefode-chromium,dushu1203/chromium.src,patrickm/chromium.src,dushu1203/chromium.src,mohamed--abdel-maksoud/chromium.src,anirudhSK/chromium,hujiajie/pa-chromium,chuan9/chromium-crosswalk,ltilve/chromium,Just-D/chromium-1,TheTypoMaster/chromium-crosswalk,bright-sparks/chromium-spacewalk,ondra-novak/chromium.src,ondra-novak/chromium.src,markYoungH/chromium.src,hujiajie/pa-chromium,patrickm/chromium.src,mohamed--abdel-maksoud/chromium.src,Chilledheart/chromium,zcbenz/cefode-chromium,dednal/chromium.src,bright-sparks/chromium-spacewalk,Fireblend/chromium-crosswalk,zcbenz/cefode-chromium,anirudhSK/chromium,markYoungH/chromium.src,Jonekee/chromium.src,bright-sparks/chromium-spacewalk,fujunwei/chromium-crosswalk,Jonekee/chromium.src,fujunwei/chromium-crosswalk,TheTypoMaster/chromium-crosswalk,zcbenz/cefode-chromium,pozdnyakov/chromium-crosswalk,zcbenz/cefode-chromium,crosswalk-project/chromium-crosswalk-efl,bright-sparks/chromium-spacewalk,ondra-novak/chromium.src,dushu1203/chromium.src,timopulkkinen/BubbleFish,anirudhSK/chromium,Chilledheart/chromium,chuan9/chromium-crosswalk,dushu1203/chromium.src,Jonekee/chromium.src,ltilve/chromium,hujiajie/pa-chromium,Pluto-tv/chromium-crosswalk,ondra-novak/chromium.src,patrickm/chromium.src,hgl888/chromium-crosswalk-efl,dushu1203/chromium.src,M4sse/chromium.src,hgl888/chromium-crosswalk-efl,timopulkkinen/BubbleFish,jaruba/chromium.src,nacl-webkit/chrome_deps,jaruba/chromium.src,littlstar/chromium.src,Just-D/chromium-1,mogoweb/chromium-crosswalk,mogoweb/chromium-crosswalk,M4sse/chromium.src,hgl888/chromium-crosswalk,littlstar/chromium.src,Fireblend/chromium-crosswalk,pozdnyakov/chromium-crosswalk,littlstar/chromium.src,littlstar/chromium.src,patrickm/chromium.src,krieger-od/nwjs_chromium.src,anirudhSK/chromium,timopulkkinen/BubbleFish,Chilledheart/chromium,Fireblend/chromium-crosswalk,littlstar/chromium.src,zcbenz/cefode-chromium,ondra-novak/chromium.src,jaruba/chromium.src,M4sse/chromium.src,ondra-novak/chromium.src,Just-D/chromium-1,markYoungH/chromium.src,mohamed--abdel-maksoud/chromium.src,mohamed--abdel-maksoud/chromium.src,hujiajie/pa-chromium,littlstar/chromium.src,mohamed--abdel-maksoud/chromium.src,dednal/chromium.src,pozdnyakov/chromium-crosswalk,timopulkkinen/BubbleFish,axinging/chromium-crosswalk,Just-D/chromium-1,nacl-webkit/chrome_deps,fujunwei/chromium-crosswalk,zcbenz/cefode-chromium,markYoungH/chromium.src,nacl-webkit/chrome_deps,anirudhSK/chromium,PeterWangIntel/chromium-crosswalk,dednal/chromium.src,markYoungH/chromium.src,Just-D/chromium-1,fujunwei/chromium-crosswalk,M4sse/chromium.src,markYoungH/chromium.src,chuan9/chromium-crosswalk,dednal/chromium.src,littlstar/chromium.src,ltilve/chromium,timopulkkinen/BubbleFish,fujunwei/chromium-crosswalk,mogoweb/chromium-crosswalk,crosswalk-project/chromium-crosswalk-efl,timopulkkinen/BubbleFish,pozdnyakov/chromium-crosswalk,chuan9/chromium-crosswalk,krieger-od/nwjs_chromium.src,ChromiumWebApps/chromium,fujunwei/chromium-crosswalk,dednal/chromium.src,nacl-webkit/chrome_deps,crosswalk-project/chromium-crosswalk-efl,mohamed--abdel-maksoud/chromium.src,mogoweb/chromium-crosswalk,bright-sparks/chromium-spacewalk,hgl888/chromium-crosswalk,Pluto-tv/chromium-crosswalk,Jonekee/chromium.src,dushu1203/chromium.src,hgl888/chromium-crosswalk,hgl888/chromium-crosswalk-efl,chuan9/chromium-crosswalk,mohamed--abdel-maksoud/chromium.src,ondra-novak/chromium.src,axinging/chromium-crosswalk,mogoweb/chromium-crosswalk,fujunwei/chromium-crosswalk,TheTypoMaster/chromium-crosswalk,mogoweb/chromium-crosswalk,dushu1203/chromium.src,PeterWangIntel/chromium-crosswalk,PeterWangIntel/chromium-crosswalk,Chilledheart/chromium,anirudhSK/chromium,anirudhSK/chromium,hgl888/chromium-crosswalk,dushu1203/chromium.src,jaruba/chromium.src,chuan9/chromium-crosswalk,ltilve/chromium,hgl888/chromium-crosswalk-efl,Pluto-tv/chromium-crosswalk,Pluto-tv/chromium-crosswalk,TheTypoMaster/chromium-crosswalk,timopulkkinen/BubbleFish,dednal/chromium.src,Just-D/chromium-1,chuan9/chromium-crosswalk,crosswalk-project/chromium-crosswalk-efl,mohamed--abdel-maksoud/chromium.src,Pluto-tv/chromium-crosswalk,pozdnyakov/chromium-crosswalk,krieger-od/nwjs_chromium.src,bright-sparks/chromium-spacewalk,Pluto-tv/chromium-crosswalk,dednal/chromium.src,Jonekee/chromium.src,dednal/chromium.src,littlstar/chromium.src,chuan9/chromium-crosswalk,ltilve/chromium,PeterWangIntel/chromium-crosswalk,pozdnyakov/chromium-crosswalk,M4sse/chromium.src,timopulkkinen/BubbleFish,mohamed--abdel-maksoud/chromium.src,pozdnyakov/chromium-crosswalk,M4sse/chromium.src,patrickm/chromium.src,PeterWangIntel/chromium-crosswalk,Jonekee/chromium.src,dednal/chromium.src,bright-sparks/chromium-spacewalk,TheTypoMaster/chromium-crosswalk,anirudhSK/chromium,nacl-webkit/chrome_deps,M4sse/chromium.src,mohamed--abdel-maksoud/chromium.src,Fireblend/chromium-crosswalk,fujunwei/chromium-crosswalk,Pluto-tv/chromium-crosswalk,M4sse/chromium.src,crosswalk-project/chromium-crosswalk-efl,ChromiumWebApps/chromium,mogoweb/chromium-crosswalk,zcbenz/cefode-chromium,Chilledheart/chromium,TheTypoMaster/chromium-crosswalk,krieger-od/nwjs_chromium.src,axinging/chromium-crosswalk,Fireblend/chromium-crosswalk,hgl888/chromium-crosswalk-efl,krieger-od/nwjs_chromium.src,mohamed--abdel-maksoud/chromium.src,Jonekee/chromium.src,pozdnyakov/chromium-crosswalk,ChromiumWebApps/chromium,pozdnyakov/chromium-crosswalk,hgl888/chromium-crosswalk,anirudhSK/chromium,hgl888/chromium-crosswalk-efl,axinging/chromium-crosswalk,crosswalk-project/chromium-crosswalk-efl,hgl888/chromium-crosswalk-efl,hujiajie/pa-chromium,hujiajie/pa-chromium,ChromiumWebApps/chromium,patrickm/chromium.src,ChromiumWebApps/chromium,ChromiumWebApps/chromium,Fireblend/chromium-crosswalk,timopulkkinen/BubbleFish,krieger-od/nwjs_chromium.src,patrickm/chromium.src,PeterWangIntel/chromium-crosswalk,hujiajie/pa-chromium,chuan9/chromium-crosswalk,ltilve/chromium,dushu1203/chromium.src,Pluto-tv/chromium-crosswalk,anirudhSK/chromium,ondra-novak/chromium.src,ltilve/chromium,PeterWangIntel/chromium-crosswalk,anirudhSK/chromium,fujunwei/chromium-crosswalk,jaruba/chromium.src,axinging/chromium-crosswalk,ChromiumWebApps/chromium,axinging/chromium-crosswalk,crosswalk-project/chromium-crosswalk-efl,krieger-od/nwjs_chromium.src,Chilledheart/chromium,jaruba/chromium.src,axinging/chromium-crosswalk,ltilve/chromium,axinging/chromium-crosswalk,Just-D/chromium-1,dednal/chromium.src,axinging/chromium-crosswalk,hujiajie/pa-chromium,krieger-od/nwjs_chromium.src,jaruba/chromium.src,nacl-webkit/chrome_deps,markYoungH/chromium.src,zcbenz/cefode-chromium,jaruba/chromium.src,crosswalk-project/chromium-crosswalk-efl,bright-sparks/chromium-spacewalk,dednal/chromium.src,jaruba/chromium.src,zcbenz/cefode-chromium,M4sse/chromium.src,jaruba/chromium.src,hgl888/chromium-crosswalk,Jonekee/chromium.src,TheTypoMaster/chromium-crosswalk,PeterWangIntel/chromium-crosswalk,markYoungH/chromium.src,Just-D/chromium-1,M4sse/chromium.src
third_party/hyphen/hyphen.gyp
third_party/hyphen/hyphen.gyp
# Copyright (c) 2012 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. { 'targets': [ { 'target_name': 'hyphen', 'type': 'static_library', 'include_dirs': [ '.', ], 'defines': [ 'HYPHEN_CHROME_CLIENT', ], 'sources': [ 'hnjalloc.c', 'hnjalloc.h', 'hyphen.h', 'hyphen.c', ], 'direct_dependent_settings': { 'defines': [ 'HYPHEN_CHROME_CLIENT', ], 'include_dirs': [ '.', ], }, # TODO(jschuh): http://crbug.com/167187 'msvs_disabled_warnings': [ 4267, ], }, ], }
# Copyright (c) 2012 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. { 'targets': [ { 'target_name': 'hyphen', 'type': 'static_library', 'include_dirs': [ '.', ], 'defines': [ 'HYPHEN_CHROME_CLIENT', ], 'sources': [ 'hnjalloc.c', 'hnjalloc.h', 'hyphen.h', 'hyphen.c', ], 'direct_dependent_settings': { 'defines': [ 'HYPHEN_CHROME_CLIENT', ], 'include_dirs': [ '.', ], }, }, ], }
bsd-3-clause
Python
0f98c41a7fcf7632903216f3fa29cfa13c769a7b
Clean up code in utils
globaleaks/Tor2web,globaleaks/Tor2web,globaleaks/Tor2web,globaleaks/Tor2web
utils.py
utils.py
import httplib import urllib2 import socks class Storage(dict): """ A Storage object is like a dictionary except `obj.foo` can be used in addition to `obj['foo']`. >>> o = Storage(a=1) >>> o.a 1 >>> o['a'] 1 >>> o.a = 2 >>> o['a'] 2 >>> del o.a >>> o.a None """ def __getattr__(self, key): try: return self[key] except KeyError, k: return None def __setattr__(self, key, value): self[key] = value def __delattr__(self, key): try: del self[key] except KeyError, k: raise AttributeError, k def __repr__(self): return '<Storage ' + dict.__repr__(self) + '>' def __getstate__(self): return dict(self) def __setstate__(self, value): for (k, v) in value.items(): self[k] = v class SocksiPyConnection(httplib.HTTPConnection): def __init__(self, proxytype, proxyaddr, proxyport = None, rdns = True, username = None, password = None, *args, **kwargs): self.proxyargs = (proxytype, proxyaddr, proxyport, rdns, username, password) httplib.HTTPConnection.__init__(self, *args, **kwargs) def connect(self): self.sock = socks.socksocket() self.sock.setproxy(*self.proxyargs) if isinstance(self.timeout, float): self.sock.settimeout(self.timeout) self.sock.connect((self.host, self.port)) class SocksiPyHandler(urllib2.HTTPHandler): def __init__(self, *args, **kwargs): self.args = args self.kw = kwargs urllib2.HTTPHandler.__init__(self) def http_open(self, req): def build(host, port=None, strict=None, timeout=0): conn = SocksiPyConnection(*self.args, host=host, port=port, strict=strict, timeout=timeout, **self.kw) return conn return self.do_open(build, req)
import httplib import urllib2 class Storage(dict): """ A Storage object is like a dictionary except `obj.foo` can be used in addition to `obj['foo']`. >>> o = Storage(a=1) >>> o.a 1 >>> o['a'] 1 >>> o.a = 2 >>> o['a'] 2 >>> del o.a >>> o.a None """ def __getattr__(self, key): try: return self[key] except KeyError, k: return None def __setattr__(self, key, value): self[key] = value def __delattr__(self, key): try: del self[key] except KeyError, k: raise AttributeError, k def __repr__(self): return '<Storage ' + dict.__repr__(self) + '>' def __getstate__(self): return dict(self) def __setstate__(self, value): for (k, v) in value.items(): self[k] = v class SocksiPyConnection(httplib.HTTPConnection): def __init__(self, proxytype, proxyaddr, proxyport = None, rdns = True, username = None, password = None, *args, **kwargs): self.proxyargs = (proxytype, proxyaddr, proxyport, rdns, username, password) httplib.HTTPConnection.__init__(self, *args, **kwargs) def connect(self): self.sock = socks.socksocket() self.sock.setproxy(*self.proxyargs) if isinstance(self.timeout, float): self.sock.settimeout(self.timeout) self.sock.connect((self.host, self.port)) class SocksiPyHandler(urllib2.HTTPHandler): def __init__(self, *args, **kwargs): self.args = args self.kw = kwargs urllib2.HTTPHandler.__init__(self) def http_open(self, req): def build(host, port=None, strict=None, timeout=0): conn = SocksiPyConnection(*self.args, host=host, port=port, strict=strict, timeout=timeout, **self.kw) return conn return self.do_open(build, req)
agpl-3.0
Python
bde130742db1805e4ae4e324334ca3160ae4cc71
make sure to import datetime
smn/ircarchive
utils.py
utils.py
from google.appengine.ext import db from datetime import datetime def key(*args): return db.Key.from_path(*args).id_or_name() def get_or_create(model, **kwargs): key_name = key(model.kind(), '/'.join(kwargs.values())) return model.get_or_insert(key_name, **kwargs) def parse_timestamp(timestamp): FORMAT = '%Y-%m-%dT%H:%M:%S' if '.' in timestamp: nofrag, frag = timestamp.split('.') nofrag_dt = datetime.strptime(nofrag, FORMAT) dt = nofrag_dt.replace(microsecond=int(frag)) return dt else: return datetime.strptime(timestamp, FORMAT)
from google.appengine.ext import db def key(*args): return db.Key.from_path(*args).id_or_name() def get_or_create(model, **kwargs): key_name = key(model.kind(), '/'.join(kwargs.values())) return model.get_or_insert(key_name, **kwargs) def parse_timestamp(timestamp): FORMAT = '%Y-%m-%dT%H:%M:%S' if '.' in timestamp: nofrag, frag = timestamp.split('.') nofrag_dt = datetime.strptime(nofrag, FORMAT) dt = nofrag_dt.replace(microsecond=int(frag)) return dt else: return datetime.strptime(timestamp, FORMAT)
bsd-3-clause
Python
b084e02dd2cf7b492c69090b6acd548066c7c34f
Check if quants are moved and pass moves to done to avoid duplication
rgbconsulting/rgb-addons,rgbconsulting/rgb-pos,rgbconsulting/rgb-pos,rgbconsulting/rgb-addons
pos_picking_state_fix/models/pos_picking.py
pos_picking_state_fix/models/pos_picking.py
# -*- coding: utf-8 -*- # See README file for full copyright and licensing details. import time from openerp import models, api from openerp.tools import DEFAULT_SERVER_DATETIME_FORMAT class PosPicking(models.Model): _inherit = 'pos.order' @api.multi def create_picking(self): try: super(PosPicking, self).create_picking() except: if self.picking_id.state != 'done': for move in self.picking_id.move_lines: if move.quant_ids: # We pass this move to done because the quants were already moved move.write({'state': 'done', 'date': time.strftime(DEFAULT_SERVER_DATETIME_FORMAT)}) else: # If there are no moved quants we pass the move to Waiting Availability move.do_unreserve() return True
# -*- coding: utf-8 -*- # See README file for full copyright and licensing details. from openerp import models, api class PosPicking(models.Model): _inherit = 'pos.order' @api.multi def create_picking(self): try: super(PosPicking, self).create_picking() except: # Cancel move lines if self.picking_id.state != 'done': for move in self.picking_id.move_lines: move.do_unreserve() return True
agpl-3.0
Python
8545528c07ed9eaf006a49cf1b875dcec70e89c7
Use `strip_html_tags`
avinassh/Laozi,avinassh/Laozi
utils.py
utils.py
import re import textwrap import html2text text_maker = html2text.HTML2Text() text_maker.body_width = 0 def strip_html_tags(text): return re.sub('<[^<]+?>', '', text) def html_to_md(string, strip_html=True): if strip_html is True: string = strip_html_tags(string) return text_maker.handle(string) def get_formatted_book_data(book_data): template = textwrap.dedent("""\ *Title:* {0} by {1} *Rating:* {2} by {3} users *Description:* {4} *Link*: {5} Tip: {6}""") title = book_data['title'] authors = book_data['authors'] average_rating = book_data['average_rating'] ratings_count = book_data['ratings_count'] description = html_to_md(book_data.get('description', '')) url = book_data['url'] tip = 'Use author name also for better search results' template = template.format(title, authors, average_rating, ratings_count, description, url, tip) return template
import textwrap import html2text text_maker = html2text.HTML2Text() text_maker.body_width = 0 def html_to_md(string): string = string.replace('<br>', ' ') return text_maker.handle(string) def get_formatted_book_data(book_data): template = textwrap.dedent("""\ **Title:** {0} by {1} **Rating:** {2} by {3} users **Description:** {4} **Link**: {5} Tip: {6}""") title = book_data['title'] authors = book_data['authors'] average_rating = book_data['average_rating'] ratings_count = book_data['ratings_count'] description = html_to_md(book_data.get('description', '')) url = book_data['url'] tip = 'Use author name also for better search results' template = template.format(title, authors, average_rating, ratings_count, description, url, tip) return template
mit
Python