commit
stringlengths 40
40
| old_file
stringlengths 4
150
| new_file
stringlengths 4
150
| old_contents
stringlengths 0
3.26k
| new_contents
stringlengths 1
4.43k
| subject
stringlengths 15
501
| message
stringlengths 15
4.06k
| lang
stringclasses 4
values | license
stringclasses 13
values | repos
stringlengths 5
91.5k
| diff
stringlengths 0
4.35k
|
|---|---|---|---|---|---|---|---|---|---|---|
751aecfae754a555aad15fe1771bbf209de00c9c
|
setup.py
|
setup.py
|
#!/usr/bin/env python
# -*- encoding: utf-8 -*-
import os
import sys
from setuptools import setup, find_packages
from setuptools.command.test import test as TestCommand
class PyTest(TestCommand):
user_options = [('pytest-args=', 'a', "Arguments to pass to py.test")]
def initialize_options(self):
TestCommand.initialize_options(self)
self.pytest_args = []
def finalize_options(self):
TestCommand.finalize_options(self)
self.test_args = []
self.test_suite = True
def run_tests(self):
# import here, cause outside the eggs aren't loaded
import pytest
errno = pytest.main(self.pytest_args)
sys.exit(errno)
def version():
import gocd_cli
return gocd_cli.__version__
README = open(os.path.join(os.path.dirname(__file__), 'README.rst')).read()
setup(
name='gocd_cli',
author='Björn Andersson',
author_email='ba@sanitarium.se',
license='MIT License',
description='A CLI client for interacting with Go Continuous Delivery',
long_description=README,
version=version(),
packages=find_packages(exclude=('tests',)),
namespace_packages=('gocd_cli', 'gocd_cli.commands',),
cmdclass={'test': PyTest},
install_requires=[
'gocd>=0.7,<1.0',
],
tests_require=[
'pytest',
'mock==1.0.1'
],
)
|
#!/usr/bin/env python
# -*- encoding: utf-8 -*-
import os
import sys
from setuptools import setup, find_packages
from setuptools.command.test import test as TestCommand
class PyTest(TestCommand):
user_options = [('pytest-args=', 'a', "Arguments to pass to py.test")]
def initialize_options(self):
TestCommand.initialize_options(self)
self.pytest_args = []
def finalize_options(self):
TestCommand.finalize_options(self)
self.test_args = []
self.test_suite = True
def run_tests(self):
# import here, cause outside the eggs aren't loaded
import pytest
errno = pytest.main(self.pytest_args)
sys.exit(errno)
def version():
import gocd_cli
return gocd_cli.__version__
README = open(os.path.join(os.path.dirname(__file__), 'README.rst')).read()
setup(
name='gocd-cli',
author='Björn Andersson',
author_email='ba@sanitarium.se',
license='MIT License',
description='A CLI client for interacting with Go Continuous Delivery',
long_description=README,
version=version(),
packages=find_packages(exclude=('tests',)),
namespace_packages=('gocd_cli', 'gocd_cli.commands',),
cmdclass={'test': PyTest},
install_requires=[
'gocd>=0.7,<1.0',
],
tests_require=[
'pytest',
'mock==1.0.1'
],
)
|
Change the name to match the repo
|
Change the name to match the repo
And decent naming conventions, underscores are yuck for names :p
|
Python
|
mit
|
gaqzi/py-gocd-cli,gaqzi/gocd-cli
|
---
+++
@@ -32,7 +32,7 @@
README = open(os.path.join(os.path.dirname(__file__), 'README.rst')).read()
setup(
- name='gocd_cli',
+ name='gocd-cli',
author='Björn Andersson',
author_email='ba@sanitarium.se',
license='MIT License',
|
2ac7469e6ebee4b85851da7eb5fd0325ea7a97e4
|
setup.py
|
setup.py
|
import os
from setuptools import setup, find_packages
VERSION = (0, 1, 7)
__version__ = '.'.join(map(str, VERSION))
readme_rst = os.path.join(os.path.dirname(__file__), 'README.rst')
if os.path.exists(readme_rst):
long_description = open(readme_rst).read()
else:
long_description = "This module provides a few map widgets for Django applications."
# 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-map-widgets',
version=__version__,
description="Map widgets for Django PostGIS fields",
long_description=long_description,
author="Erdem Ozkol",
author_email="erdemozkol@gmail.com",
url="https://github.com/erdem/django-map-widgets",
license="MIT",
platforms=["any"],
packages=find_packages(exclude=("example", "static", "env")),
include_package_data=True,
classifiers=[
"Environment :: Web Environment",
"Intended Audience :: Developers",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
"Framework :: Django",
"Programming Language :: Python",
],
)
|
import os
from setuptools import setup, find_packages
VERSION = (0, 1, 7)
__version__ = '.'.join(map(str, VERSION))
# readme_rst = os.path.join(os.path.dirname(__file__), 'README.rst')
# if os.path.exists(readme_rst):
# long_description = open(readme_rst).read()
# else:
long_description = "This module provides a few map widgets for Django applications."
# 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-map-widgets',
version=__version__,
description="Map widgets for Django PostGIS fields",
long_description=long_description,
author="Erdem Ozkol",
author_email="erdemozkol@gmail.com",
url="https://github.com/erdem/django-map-widgets",
license="MIT",
platforms=["any"],
packages=find_packages(exclude=("example", "static", "env")),
include_package_data=True,
classifiers=[
"Environment :: Web Environment",
"Intended Audience :: Developers",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
"Framework :: Django",
"Programming Language :: Python",
],
)
|
Comment long_description read, because it cause exception
|
Comment long_description read, because it cause exception
UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position 424
|
Python
|
mit
|
erdem/django-map-widgets,erdem/django-map-widgets,erdem/django-map-widgets,erdem/django-map-widgets
|
---
+++
@@ -4,12 +4,12 @@
VERSION = (0, 1, 7)
__version__ = '.'.join(map(str, VERSION))
-readme_rst = os.path.join(os.path.dirname(__file__), 'README.rst')
+# readme_rst = os.path.join(os.path.dirname(__file__), 'README.rst')
-if os.path.exists(readme_rst):
- long_description = open(readme_rst).read()
-else:
- long_description = "This module provides a few map widgets for Django applications."
+# if os.path.exists(readme_rst):
+# long_description = open(readme_rst).read()
+# else:
+long_description = "This module provides a few map widgets for Django applications."
# allow setup.py to be run from any path
os.chdir(os.path.normpath(os.path.join(os.path.abspath(__file__), os.pardir)))
|
51f32076e8708c55420989b660323cdfd9fc6650
|
cycy/interpreter.py
|
cycy/interpreter.py
|
from cycy import compiler
from cycy.parser.sourceparser import parse
class CyCy(object):
"""
The main CyCy interpreter.
"""
def run(self, bytecode):
pass
def interpret(source):
print "Hello, world!"
return
bytecode = compiler.Context.to_bytecode(parse(source.getContent()))
CyCy().run(bytecode)
|
from cycy import compiler
from cycy.parser.sourceparser import parse
class CyCy(object):
"""
The main CyCy interpreter.
"""
def run(self, bytecode):
pass
def interpret(source):
bytecode = compiler.Context.to_bytecode(parse(source))
CyCy().run(bytecode)
|
Break the tests to show us we're not writing RPython.
|
Break the tests to show us we're not writing RPython.
|
Python
|
mit
|
Magnetic/cycy,Magnetic/cycy,Magnetic/cycy
|
---
+++
@@ -12,8 +12,5 @@
def interpret(source):
- print "Hello, world!"
- return
-
- bytecode = compiler.Context.to_bytecode(parse(source.getContent()))
+ bytecode = compiler.Context.to_bytecode(parse(source))
CyCy().run(bytecode)
|
bf8d19cd1258de8080713f7155f7a6607504ec18
|
setup.py
|
setup.py
|
from setuptools import setup
setup(name='botometer',
version='1.0',
description='Check Twitter accounts for bot behavior',
url='https://github.com/IUNetSci/botometer-python',
download_url='https://github.com/IUNetSci/botometer-python/archive/1.0.zip',
author='Clayton A Davis',
author_email='claydavi@indiana.edu',
license='MIT',
packages=['botometer'],
install_requires=[
'requests',
'tweepy',
],
)
|
from setuptools import setup
setup(name='botometer',
version='1.0',
description='Check Twitter accounts for bot behavior',
url='https://github.com/IUNetSci/botometer-python',
download_url='https://github.com/IUNetSci/botometer-python/archive/1.0.zip',
author='Clayton A Davis',
author_email='claydavi@indiana.edu',
license='MIT',
packages=['botometer'],
install_requires=[
'requests',
'tweepy >= 3.5.0',
],
)
|
Update tweepy version in install_requires
|
Update tweepy version in install_requires
|
Python
|
mit
|
truthy/botornot-python
|
---
+++
@@ -11,6 +11,6 @@
packages=['botometer'],
install_requires=[
'requests',
- 'tweepy',
+ 'tweepy >= 3.5.0',
],
)
|
1a892b9d9ee2121241a43d7d0af772dfbb5d08e1
|
setup.py
|
setup.py
|
import os
from setuptools import setup, find_packages
with open(os.path.join(os.path.dirname(__file__), 'VERSION')) as v_file:
version = v_file.read().strip()
with open(os.path.join(os.path.dirname(__file__), 'README.md')) as readme:
README = readme.read()
setup(
name='canvas_python_sdk',
version=version,
description='A python SDK for Instructure\'s Canvas LMS API',
author='Harvard University',
author_email='tlt_opensource@g.harvard.edu',
url='https://github.com/penzance/canvas_python_sdk',
packages=find_packages(exclude=["*.tests", "*.tests.*", "tests.*", "tests"]),
long_description=README,
classifiers=[
"License :: OSI Approved :: MIT License",
'Operating System :: OS Independent',
"Programming Language :: Python :: 2",
"Programming Language :: Python :: 2.6",
"Programming Language :: Python :: 2.7",
"Development Status :: 4 - Beta",
"Intended Audience :: Developers",
"Topic :: Software Development",
],
keywords='canvas api sdk LMS',
license='MIT',
zip_safe=False,
install_requires=[
'requests',
],
test_suite='tests',
tests_require=[
'mock>=1.0.1',
],
)
|
import os
from setuptools import setup, find_packages
with open(os.path.join(os.path.dirname(__file__), 'VERSION')) as v_file:
version = v_file.read().strip()
with open(os.path.join(os.path.dirname(__file__), 'README.md')) as readme:
README = readme.read()
setup(
name='canvas_python_sdk',
version=version,
description='A python SDK for Instructure\'s Canvas LMS API',
author='Harvard University',
author_email='tlt-opensource@g.harvard.edu',
url='https://github.com/penzance/canvas_python_sdk',
packages=find_packages(exclude=["*.tests", "*.tests.*", "tests.*", "tests"]),
long_description=README,
classifiers=[
"License :: OSI Approved :: MIT License",
'Operating System :: OS Independent',
"Programming Language :: Python :: 2",
"Programming Language :: Python :: 2.6",
"Programming Language :: Python :: 2.7",
"Development Status :: 4 - Beta",
"Intended Audience :: Developers",
"Topic :: Software Development",
],
keywords='canvas api sdk LMS',
license='MIT',
zip_safe=False,
install_requires=[
'requests',
],
test_suite='tests',
tests_require=[
'mock>=1.0.1',
],
)
|
Fix dash in author email
|
Fix dash in author email
|
Python
|
mit
|
penzance/canvas_python_sdk
|
---
+++
@@ -12,7 +12,7 @@
version=version,
description='A python SDK for Instructure\'s Canvas LMS API',
author='Harvard University',
- author_email='tlt_opensource@g.harvard.edu',
+ author_email='tlt-opensource@g.harvard.edu',
url='https://github.com/penzance/canvas_python_sdk',
packages=find_packages(exclude=["*.tests", "*.tests.*", "tests.*", "tests"]),
long_description=README,
|
e3cdb622671eb817b62bf2acfc99b75c0f4ed351
|
setup.py
|
setup.py
|
#!/usr/bin/env python
from setuptools import setup, find_packages
setup(
name='django-synchro',
description='Django app for database data synchronization.',
long_description=open('README.rst').read(),
version='0.6',
author='Jacek Tomaszewski',
author_email='jacek.tomek@gmail.com',
url='https://github.com/zlorf/django-synchro',
license='MIT',
install_requires=(
'django-dbsettings>=0.7',
'django>=1.4',
),
classifiers=[
'Development Status :: 4 - Beta',
'Environment :: Web Environment',
'License :: OSI Approved :: MIT License',
'Operating System :: OS Independent',
'Programming Language :: Python',
'Framework :: Django',
],
packages=find_packages(),
include_package_data = True,
)
|
#!/usr/bin/env python
from setuptools import setup, find_packages
setup(
name='django-synchro',
description='Django app for database data synchronization.',
long_description=open('README.rst').read(),
version='0.6',
author='Jacek Tomaszewski',
author_email='jacek.tomek@gmail.com',
url='https://github.com/zlorf/django-synchro',
license='MIT',
install_requires=(
'django-dbsettings>=0.7',
'django>=1.4',
),
classifiers=[
'Development Status :: 4 - Beta',
'Environment :: Web Environment',
'License :: OSI Approved :: MIT License',
'Operating System :: OS Independent',
'Programming Language :: Python',
'Framework :: Django',
'Framework :: Django :: 1.4',
'Framework :: Django :: 1.5',
'Framework :: Django :: 1.6',
'Framework :: Django :: 1.7',
],
packages=find_packages(),
include_package_data = True,
)
|
Add classifiers for Django versions.
|
Add classifiers for Django versions.
|
Python
|
mit
|
zlorf/django-synchro,zlorf/django-synchro
|
---
+++
@@ -21,6 +21,10 @@
'Operating System :: OS Independent',
'Programming Language :: Python',
'Framework :: Django',
+ 'Framework :: Django :: 1.4',
+ 'Framework :: Django :: 1.5',
+ 'Framework :: Django :: 1.6',
+ 'Framework :: Django :: 1.7',
],
packages=find_packages(),
include_package_data = True,
|
d272b9a080eeb3b9459ab2c9c5d615694cfe620b
|
setup.py
|
setup.py
|
# -*- coding: UTF-8 -*-
from distutils.core import setup
from setuptools import find_packages
import time
_version = "2.9.dev%s" % int(time.time())
_packages = find_packages('.', exclude=["*.tests", "*.tests.*", "tests.*", "tests"])
setup(
name='laterpay-client',
version=_version,
description="LaterPay API client",
long_description=open("README.rst").read(),
author="LaterPay GmbH",
author_email="TODO",
url="https://github.com/laterpay/laterpay-client-python",
license='MIT',
keywords="LaterPay API client",
test_suite="test_client",
packages=_packages,
package_data={'laterpay.django': ['templates/laterpay/inclusion/*']},
classifiers=(
"Development Status :: 5 - Production/Stable",
"Intended Audience :: Developers",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
"Programming Language :: Python",
"Programming Language :: Python :: 2.7",
"Topic :: Software Development :: Libraries :: Python Modules",
),
)
|
# -*- coding: UTF-8 -*-
from distutils.core import setup
from setuptools import find_packages
import time
_version = "2.9.dev%s" % int(time.time())
_packages = find_packages('.', exclude=["*.tests", "*.tests.*", "tests.*", "tests"])
setup(
name='laterpay-client',
version=_version,
description="LaterPay API client",
long_description=open("README.rst").read(),
author="LaterPay GmbH",
author_email="support@laterpay.net",
url="https://github.com/laterpay/laterpay-client-python",
license='MIT',
keywords="LaterPay API client",
test_suite="test_client",
packages=_packages,
package_data={'laterpay.django': ['templates/laterpay/inclusion/*']},
classifiers=(
"Development Status :: 5 - Production/Stable",
"Intended Audience :: Developers",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
"Programming Language :: Python",
"Programming Language :: Python :: 2.7",
"Topic :: Software Development :: Libraries :: Python Modules",
),
)
|
Use support address for author email
|
Use support address for author email
|
Python
|
mit
|
laterpay/laterpay-client-python
|
---
+++
@@ -13,7 +13,7 @@
description="LaterPay API client",
long_description=open("README.rst").read(),
author="LaterPay GmbH",
- author_email="TODO",
+ author_email="support@laterpay.net",
url="https://github.com/laterpay/laterpay-client-python",
license='MIT',
keywords="LaterPay API client",
|
eb6286a4b2b877192ec42614fbb344fdb170f3e3
|
setup.py
|
setup.py
|
import os
from setuptools import setup
def read(fname):
return open(os.path.join(os.path.dirname(__file__), fname)).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 = "UCLDC Deep Harvester",
version = "0.0.3",
description = ("deep harvester code for the UCLDC project"),
long_description=read('README.md'),
author='Barbara Hui',
author_email='barbara.hui@ucop.edu',
dependency_links=[
'https://github.com/ucldc/pynux/archive/master.zip#egg=pynux',
'https://github.com/mredar/jsonpath/archive/master.zip#egg=jsonpath'
],
install_requires=[
'boto',
'pynux',
'python-magic',
'couchdb',
'jsonpath',
'akara'
],
packages=['deepharvest', 's3stash'],
test_suite='tests'
)
### note: dpla-ingestion code is a dependency
###pip_main(['install',
### 'git+ssh://git@bitbucket.org/mredar/dpla-ingestion.git@ucldc'])
|
import os
from setuptools import setup
def read(fname):
return open(os.path.join(os.path.dirname(__file__), fname)).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 = "UCLDC Deep Harvester",
version = "0.0.3",
description = ("deep harvester code for the UCLDC project"),
long_description=read('README.md'),
author='Barbara Hui',
author_email='barbara.hui@ucop.edu',
dependency_links=[
'https://github.com/ucldc/pynux/archive/master.zip#egg=pynux',
'https://github.com/mredar/jsonpath/archive/master.zip#egg=jsonpath',
'https://github.com/barbarahui/ucldc-iiif/archive/master.zip#egg=ucldc-iiif'
],
install_requires=[
'boto',
'pynux',
'python-magic',
'couchdb',
'jsonpath',
'akara',
'ucldc-iiif'
],
packages=['deepharvest', 's3stash'],
test_suite='tests'
)
### note: dpla-ingestion code is a dependency
###pip_main(['install',
### 'git+ssh://git@bitbucket.org/mredar/dpla-ingestion.git@ucldc'])
|
Add ucldc-iiif repo as a dependency.
|
Add ucldc-iiif repo as a dependency.
|
Python
|
bsd-3-clause
|
barbarahui/nuxeo-calisphere,barbarahui/nuxeo-calisphere
|
---
+++
@@ -16,7 +16,8 @@
author_email='barbara.hui@ucop.edu',
dependency_links=[
'https://github.com/ucldc/pynux/archive/master.zip#egg=pynux',
- 'https://github.com/mredar/jsonpath/archive/master.zip#egg=jsonpath'
+ 'https://github.com/mredar/jsonpath/archive/master.zip#egg=jsonpath',
+ 'https://github.com/barbarahui/ucldc-iiif/archive/master.zip#egg=ucldc-iiif'
],
install_requires=[
'boto',
@@ -24,7 +25,8 @@
'python-magic',
'couchdb',
'jsonpath',
- 'akara'
+ 'akara',
+ 'ucldc-iiif'
],
packages=['deepharvest', 's3stash'],
test_suite='tests'
|
a22d36688995ec798628238f716dd7852b7af0a2
|
setup.py
|
setup.py
|
#!/usr/bin/env python
# -*- coding: utf-8 -*-
from distutils.core import setup, Extension
import numpy
import re
with open('README.rst') as f:
readme = f.read()
with open('tifffile.py') as f:
text = f.read()
version = re.search("__version__ = '(.*?)'", text).groups()[0]
setup(
name='tifffile',
version=version,
description='Read and write image data from and to TIFF files.',
long_description=readme,
author='Steven Silvester',
author_email='steven.silvester@ieee.org',
url='https://github.com/blink1073/tifffile',
include_package_data=True,
ext_modules=[Extension('_tifffile',
['tifffile.c'],
include_dirs=[numpy.get_include()])],
requires=['numpy (>=1.8.2)'],
license="BSD",
zip_safe=False,
keywords='tifffile',
classifiers=[
'Development Status :: 4 - Beta',
'Intended Audience :: Developers',
'License :: OSI Approved :: BSD License',
'Operating System :: OS Independent',
"Programming Language :: C",
"Programming Language :: Python :: 2",
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.4',
],
)
|
#!/usr/bin/env python
# -*- coding: utf-8 -*-
from distutils.core import setup, Extension
import numpy
import re
with open('README.rst') as f:
readme = f.read()
with open('tifffile.py') as f:
text = f.read()
version = re.search("__version__ = '(.*?)'", text).groups()[0]
setup(
name='tifffile',
version=version,
description='Read and write image data from and to TIFF files.',
long_description=readme,
author='Steven Silvester',
author_email='steven.silvester@ieee.org',
url='https://github.com/blink1073/tifffile',
py_modules=['tifffile'],
include_package_data=True,
ext_modules=[Extension('_tifffile',
['tifffile.c'],
include_dirs=[numpy.get_include()])],
requires=['numpy (>=1.8.2)'],
license="BSD",
zip_safe=False,
keywords='tifffile',
classifiers=[
'Development Status :: 4 - Beta',
'Intended Audience :: Developers',
'License :: OSI Approved :: BSD License',
'Operating System :: OS Independent',
"Programming Language :: C",
"Programming Language :: Python :: 2",
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.4',
],
)
|
Make sure the tifffile.py is installed.
|
Make sure the tifffile.py is installed.
|
Python
|
bsd-3-clause
|
blink1073/vidsrc,blink1073/vidsrc
|
---
+++
@@ -23,6 +23,7 @@
author='Steven Silvester',
author_email='steven.silvester@ieee.org',
url='https://github.com/blink1073/tifffile',
+ py_modules=['tifffile'],
include_package_data=True,
ext_modules=[Extension('_tifffile',
['tifffile.c'],
|
3cc434bf4bbed3239e08780fc3cbc6d5bf5823cb
|
setup.py
|
setup.py
|
#!/usr/bin/env python
import os
from setuptools import setup
# under test we do not want the nose entry point
if "XTRACEBACK_NO_NOSE" in os.environ:
entry_points = None
else:
entry_points = {
"nose.plugins": ("xtraceback=xtraceback.nosextraceback:NoseXTraceback",),
}
README = open(os.path.join(os.path.dirname(__file__), "README.md"))
setup(name="xtraceback",
version="0.4.0-dev",
description="A verbose traceback formatter",
long_description="\n".join(README.read().splitlines()[0:3]),
license="MIT",
keywords="traceback exception nose",
author="Ischium",
author_email="support@ischium.net",
url="https://github.com/ischium/xtraceback",
packages=("xtraceback",),
install_requires=("stacked >= 0.1.1",),
extras_require=dict(syntax=("pygments")),
tests_require=("nose", "pygments", "yanc"),
test_suite="nose.collector",
entry_points=entry_points,
)
|
#!/usr/bin/env python
import os
from setuptools import setup
# under test we do not want the nose entry point
if "XTRACEBACK_NO_NOSE" in os.environ:
entry_points = None
else:
entry_points = {
"nose.plugins": ("xtraceback=xtraceback.nosextraceback:NoseXTraceback",),
}
README = open(os.path.join(os.path.dirname(__file__), "README.md"))
setup(name="xtraceback",
version="0.4.0-dev",
description="A verbose traceback formatter",
long_description="\n".join(README.read().splitlines()[0:3]),
license="MIT",
keywords="traceback exception nose",
author="Ischium",
author_email="support@ischium.net",
url="https://github.com/ischium/xtraceback",
packages=("xtraceback",),
install_requires=("stacked >= 0.1.1",),
extras_require=dict(syntax=("pygments")),
tests_require=("nose", "pygments", "yanc"),
test_suite="nose.collector",
entry_points=entry_points,
classifiers=[
"Programming Language :: Python",
"Programming Language :: Python :: 2",
"Programming Language :: Python :: 3"],
)
|
Add Python language compatibility classifiers
|
Add Python language compatibility classifiers
|
Python
|
mit
|
0compute/xtraceback,g2p/xtraceback
|
---
+++
@@ -29,4 +29,8 @@
tests_require=("nose", "pygments", "yanc"),
test_suite="nose.collector",
entry_points=entry_points,
+ classifiers=[
+ "Programming Language :: Python",
+ "Programming Language :: Python :: 2",
+ "Programming Language :: Python :: 3"],
)
|
e0a15a818d91a547c6b61044adc07d79b33d9394
|
setup.py
|
setup.py
|
try:
from setuptools import setup, find_packages
except:
from ez_setup import use_setuptools
use_setuptools()
from setuptools import setup, find_packages
setup(
name = 'django-flatblocks',
version = '0.3.5',
description = 'django-flatblocks acts like django.contrib.flatpages but '
'for parts of a page; like an editable help box you want '
'show alongside the main content.',
long_description = open('README.rst').read(),
keywords = 'django apps',
license = 'New BSD License',
author = 'Horst Gutmann',
author_email = 'zerok@zerokspot.com',
url = 'http://github.com/zerok/django-flatblocks/',
dependency_links = [],
classifiers = [
'Development Status :: 3 - Alpha',
'Environment :: Plugins',
'Framework :: Django',
'Intended Audience :: Developers',
'License :: OSI Approved :: BSD License',
'Programming Language :: Python',
'Topic :: Software Development :: Libraries :: Python Modules',
],
packages = find_packages(exclude='ez_setup'),
include_package_data = True,
zip_safe = False,
)
|
try:
from setuptools import setup, find_packages
except:
from ez_setup import use_setuptools
use_setuptools()
from setuptools import setup, find_packages
setup(
name = 'django-flatblocks',
version = '0.3.5',
description = 'django-flatblocks acts like django.contrib.flatpages but '
'for parts of a page; like an editable help box you want '
'show alongside the main content.',
long_description = open('README.rst').read(),
keywords = 'django apps',
license = 'New BSD License',
author = 'Horst Gutmann',
author_email = 'zerok@zerokspot.com',
url = 'http://github.com/zerok/django-flatblocks/',
dependency_links = [],
classifiers = [
'Development Status :: 3 - Alpha',
'Environment :: Plugins',
'Framework :: Django',
'Intended Audience :: Developers',
'License :: OSI Approved :: BSD License',
'Programming Language :: Python',
'Topic :: Software Development :: Libraries :: Python Modules',
],
packages = find_packages(exclude=['ez_setup', 'test_project']),
include_package_data = True,
zip_safe = False,
)
|
Exclude test_project from installation so it won't pollute site-packages.
|
Exclude test_project from installation so it won't pollute site-packages.
|
Python
|
bsd-3-clause
|
zerok/django-flatblocks,zerok/django-flatblocks,funkybob/django-flatblocks,danirus/django-flatblocks-xtd,funkybob/django-flatblocks,danirus/django-flatblocks-xtd
|
---
+++
@@ -27,7 +27,7 @@
'Programming Language :: Python',
'Topic :: Software Development :: Libraries :: Python Modules',
],
- packages = find_packages(exclude='ez_setup'),
+ packages = find_packages(exclude=['ez_setup', 'test_project']),
include_package_data = True,
zip_safe = False,
)
|
b3c4ca9826ffb71194b94a78cd32998138d033ef
|
setup.py
|
setup.py
|
import setuptools
setuptools.setup(
name='bashlint',
version='0.0.1',
description="Bash linting tool",
long_description="Simple Bash linting tool written in Python.",
keywords='bash',
author='Stanislav Kudriashev',
author_email='stas.kudriashev@gmail.com',
url='https://github.com/skudriashev/bashlint',
license='MIT',
py_modules=['bashlint'],
zip_safe=False,
entry_points={
'console_scripts': [
'bashlint = bashlint:main',
],
},
classifiers=[
'Development Status :: 2 - Pre-Alpha',
'Environment :: Console',
'Intended Audience :: Developers',
'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',
'Topic :: Software Development :: Libraries :: Python Modules',
],
)
|
import codecs
import setuptools
setuptools.setup(
name='bashlint',
version='0.0.1',
description='Bash linting tool',
long_description=codecs.open('README.rst', 'r', 'utf-8').read(),
keywords='bash',
author='Stanislav Kudriashev',
author_email='stas.kudriashev@gmail.com',
url='https://github.com/skudriashev/bashlint',
license='MIT',
py_modules=['bashlint'],
zip_safe=False,
entry_points={
'console_scripts': [
'bashlint = bashlint:main',
],
},
classifiers=[
'Development Status :: 2 - Pre-Alpha',
'Environment :: Console',
'Intended Audience :: Developers',
'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',
'Topic :: Software Development :: Libraries :: Python Modules',
],
)
|
Add README content to long description
|
Add README content to long description
|
Python
|
mit
|
skudriashev/bashlint
|
---
+++
@@ -1,11 +1,13 @@
+import codecs
+
import setuptools
setuptools.setup(
name='bashlint',
version='0.0.1',
- description="Bash linting tool",
- long_description="Simple Bash linting tool written in Python.",
+ description='Bash linting tool',
+ long_description=codecs.open('README.rst', 'r', 'utf-8').read(),
keywords='bash',
author='Stanislav Kudriashev',
author_email='stas.kudriashev@gmail.com',
|
d1171195e771b3de4a40c3773d10f5d0837da2b2
|
setup.py
|
setup.py
|
import os
import sys
from setuptools import setup, find_packages
def read(fname):
return open(os.path.join(os.path.dirname(__file__), fname)).read()
requirements = ['httplib2', 'argparse', 'prettytable']
if sys.version_info < (2, 6):
requirements.append('simplejson')
setup(
name = "python-keystoneclient",
version = "2.7",
description = "Client library for OpenStack Keystone API",
long_description = read('README.rst'),
url = 'https://github.com/4P/python-keystoneclient',
license = 'Apache',
author = 'Nebula Inc, based on work by Rackspace and Jacob Kaplan-Moss',
author_email = 'gabriel.hurley@nebula.com',
packages = find_packages(exclude=['tests', 'tests.*']),
classifiers = [
'Development Status :: 4 - Beta',
'Environment :: Console',
'Intended Audience :: Developers',
'Intended Audience :: Information Technology',
'License :: OSI Approved :: Apache Software License',
'Operating System :: OS Independent',
'Programming Language :: Python',
],
install_requires = requirements,
tests_require = ["nose", "mock", "mox"],
test_suite = "nose.collector",
entry_points = {
'console_scripts': ['keystone = keystoneclient.shell:main']
}
)
|
import os
import sys
from setuptools import setup, find_packages
def read(fname):
return open(os.path.join(os.path.dirname(__file__), fname)).read()
requirements = ['httplib2', 'argparse', 'prettytable']
if sys.version_info < (2, 6):
requirements.append('simplejson')
setup(
name = "python-keystoneclient",
version = "2012.1",
description = "Client library for OpenStack Keystone API",
long_description = read('README.rst'),
url = 'https://github.com/openstack/python-keystoneclient',
license = 'Apache',
author = 'Nebula Inc, based on work by Rackspace and Jacob Kaplan-Moss',
author_email = 'gabriel.hurley@nebula.com',
packages = find_packages(exclude=['tests', 'tests.*']),
classifiers = [
'Development Status :: 4 - Beta',
'Environment :: Console',
'Intended Audience :: Developers',
'Intended Audience :: Information Technology',
'License :: OSI Approved :: Apache Software License',
'Operating System :: OS Independent',
'Programming Language :: Python',
],
install_requires = requirements,
tests_require = ["nose", "mock", "mox"],
test_suite = "nose.collector",
entry_points = {
'console_scripts': ['keystone = keystoneclient.shell:main']
}
)
|
Adjust version number to match other deliveries
|
Adjust version number to match other deliveries
Set version from 2.7 to 2012.1 to match the other OpenStack
Keystone deliveries (python-keystoneclient will be released
as part of Keystone 2012.1~e3). Also adjusted the location
of the git repository to match new location. Fixes bug 917656.
Change-Id: I4d8d071e3cdc5665e29a89067958f5f1e8964221
|
Python
|
apache-2.0
|
citrix-openstack-build/python-keystoneclient,Mercador/python-keystoneclient,sdpp/python-keystoneclient,jamielennox/python-keystoneclient,ntt-sic/python-keystoneclient,klmitch/python-keystoneclient,jamielennox/python-keystoneclient,dolph/python-keystoneclient,Mercador/python-keystoneclient,dolph/python-keystoneclient,jamielennox/python-keystoneclient,ging/python-keystoneclient,magic0704/python-keystoneclient,ntt-sic/python-keystoneclient,citrix-openstack-build/python-keystoneclient,magic0704/python-keystoneclient,alexpilotti/python-keystoneclient,darren-wang/ksc,klmitch/python-keystoneclient,darren-wang/ksc,alexpilotti/python-keystoneclient,metacloud/python-keystoneclient,metacloud/python-keystoneclient,ging/python-keystoneclient,citrix-openstack-build/python-keystoneclient,ntt-sic/python-keystoneclient,sdpp/python-keystoneclient
|
---
+++
@@ -12,10 +12,10 @@
setup(
name = "python-keystoneclient",
- version = "2.7",
+ version = "2012.1",
description = "Client library for OpenStack Keystone API",
long_description = read('README.rst'),
- url = 'https://github.com/4P/python-keystoneclient',
+ url = 'https://github.com/openstack/python-keystoneclient',
license = 'Apache',
author = 'Nebula Inc, based on work by Rackspace and Jacob Kaplan-Moss',
author_email = 'gabriel.hurley@nebula.com',
|
5889fa354ff987e872ff87dda5bbf667759a4129
|
setup.py
|
setup.py
|
from setuptools import setup, Extension, find_packages
from glob import glob
from os import path
import sys
def version():
with open('src/iteration_utilities/__init__.py') as f:
for line in f:
if line.startswith('__version__'):
return line.split(r"'")[1]
_iteration_utilities_module = Extension(
'iteration_utilities._iteration_utilities',
sources=[path.join('src', 'iteration_utilities', '_iteration_utilities', '_module.c')],
depends=glob(path.join('src', '*.c'))
)
setup(
packages=find_packages('src'),
package_dir={'': 'src'},
py_modules=[path.splitext(path.basename(p))[0] for p in glob('src/*.py')],
version=version(),
ext_modules=[_iteration_utilities_module],
)
|
from setuptools import setup, Extension, find_packages
from glob import glob
from os import path
import sys
def version():
with open('src/iteration_utilities/__init__.py') as f:
for line in f:
if line.startswith('__version__'):
return line.split(r"'")[1]
_iteration_utilities_module = Extension(
'iteration_utilities._iteration_utilities',
sources=[path.join('src', 'iteration_utilities', '_iteration_utilities', '_module.c')],
depends=glob(path.join('src', 'iteration_utilities', '_iteration_utilities', '*.c'))
)
setup(
packages=find_packages('src'),
package_dir={'': 'src'},
py_modules=[path.splitext(path.basename(p))[0] for p in glob('src/*.py')],
version=version(),
ext_modules=[_iteration_utilities_module],
)
|
Fix the depends argument of the C Extension
|
Fix the depends argument of the C Extension
|
Python
|
apache-2.0
|
MSeifert04/iteration_utilities,MSeifert04/iteration_utilities,MSeifert04/iteration_utilities,MSeifert04/iteration_utilities
|
---
+++
@@ -16,7 +16,7 @@
_iteration_utilities_module = Extension(
'iteration_utilities._iteration_utilities',
sources=[path.join('src', 'iteration_utilities', '_iteration_utilities', '_module.c')],
- depends=glob(path.join('src', '*.c'))
+ depends=glob(path.join('src', 'iteration_utilities', '_iteration_utilities', '*.c'))
)
setup(
|
8cdf631d8f3c817e75c2c02218ae60635b49951c
|
setup.py
|
setup.py
|
from distutils.core import setup
# Load in babel support, if available.
try:
from babel.messages import frontend as babel
cmdclass = {"compile_catalog": babel.compile_catalog,
"extract_messages": babel.extract_messages,
"init_catalog": babel.init_catalog,
"update_catalog": babel.update_catalog,}
except ImportError:
cmdclass = {}
setup(name="django-money",
version="0.1",
description="Adds support for using money and currency fields in django models and forms. Uses py-moneyed as money implementation, based on python-money django implementation.",
url="https://github.com/jakewins/django-money",
packages=["djmoney",
"djmoney.forms",
"djmoney.models"],
install_requires=['setuptools',
'Django >= 1.2',
'py-moneyed > 0.4'],
cmdclass = cmdclass,
classifiers=["Development Status :: 5 - Production/Stable",
"Intended Audience :: Developers",
"License :: OSI Approved :: BSD License",
"Operating System :: OS Independent",
"Programming Language :: Python",
"Framework :: Django",])
|
from distutils.core import setup
# Load in babel support, if available.
try:
from babel.messages import frontend as babel
cmdclass = {"compile_catalog": babel.compile_catalog,
"extract_messages": babel.extract_messages,
"init_catalog": babel.init_catalog,
"update_catalog": babel.update_catalog,}
except ImportError:
cmdclass = {}
setup(name="django-money",
version="0.2",
description="Adds support for using money and currency fields in django models and forms. Uses py-moneyed as the money implementation.",
url="https://github.com/reinbach/django-money",
packages=["djmoney",
"djmoney.forms",
"djmoney.models"],
install_requires=['setuptools',
'Django >= 1.2',
'py-moneyed > 0.4'],
cmdclass = cmdclass,
classifiers=["Development Status :: 5 - Production/Stable",
"Intended Audience :: Developers",
"License :: OSI Approved :: BSD License",
"Operating System :: OS Independent",
"Programming Language :: Python",
"Framework :: Django",])
|
Increase version and switch location to new upstream.
|
Increase version and switch location to new upstream.
|
Python
|
bsd-3-clause
|
pjdelport/django-money,AlexRiina/django-money,tsouvarev/django-money,iXioN/django-money,rescale/django-money,recklessromeo/django-money,iXioN/django-money,tsouvarev/django-money,recklessromeo/django-money
|
---
+++
@@ -13,9 +13,9 @@
setup(name="django-money",
- version="0.1",
- description="Adds support for using money and currency fields in django models and forms. Uses py-moneyed as money implementation, based on python-money django implementation.",
- url="https://github.com/jakewins/django-money",
+ version="0.2",
+ description="Adds support for using money and currency fields in django models and forms. Uses py-moneyed as the money implementation.",
+ url="https://github.com/reinbach/django-money",
packages=["djmoney",
"djmoney.forms",
"djmoney.models"],
|
a134bdbe2677fdc5a9c7d6408ea021b8e981098b
|
qtawesome/tests/test_qtawesome.py
|
qtawesome/tests/test_qtawesome.py
|
r"""
Tests for QtAwesome.
"""
# Standard library imports
import sys
import subprocess
# Test Library imports
import pytest
# Local imports
import qtawesome as qta
from qtawesome.iconic_font import IconicFont
from PyQt5.QtWidgets import QApplication
def test_segfault_import():
output_number = subprocess.call('python -c "import qtawesome '
'; qtawesome.icon()"', shell=True)
assert output_number == 0
def test_unique_font_family_name():
"""
Test that each font used by qtawesome has a unique name.
Regression test for Issue #107
"""
app = QApplication(sys.argv)
resource = qta._instance()
assert isinstance(resource, IconicFont)
prefixes = list(resource.fontname.keys())
assert prefixes
fontnames = set(resource.fontname.values())
assert fontnames
assert len(prefixes) == len(fontnames)
sys.exit(app.exec_())
if __name__ == "__main__":
pytest.main()
|
r"""
Tests for QtAwesome.
"""
# Standard library imports
import sys
import subprocess
# Test Library imports
import pytest
# Local imports
import qtawesome as qta
from qtawesome.iconic_font import IconicFont
from PyQt5.QtWidgets import QApplication
def test_segfault_import():
output_number = subprocess.call('python -c "import qtawesome '
'; qtawesome.icon()"', shell=True)
assert output_number == 0
def test_unique_font_family_name():
"""
Test that each font used by qtawesome has a unique name. If this test
fails, this probably means that you need to rename the family name of
some fonts. Please see PR #98 for more details on why it is necessary and
on how to do this.
Regression test for Issue #107
"""
app = QApplication(sys.argv)
resource = qta._instance()
assert isinstance(resource, IconicFont)
prefixes = list(resource.fontname.keys())
assert prefixes
fontnames = set(resource.fontname.values())
assert fontnames
assert len(prefixes) == len(fontnames)
sys.exit(app.exec_())
if __name__ == "__main__":
pytest.main()
|
Add more details in the test docstring.
|
Add more details in the test docstring.
|
Python
|
mit
|
spyder-ide/qtawesome
|
---
+++
@@ -22,7 +22,10 @@
def test_unique_font_family_name():
"""
- Test that each font used by qtawesome has a unique name.
+ Test that each font used by qtawesome has a unique name. If this test
+ fails, this probably means that you need to rename the family name of
+ some fonts. Please see PR #98 for more details on why it is necessary and
+ on how to do this.
Regression test for Issue #107
"""
|
a4e8347ccf34fa0cc42740e9ad45afe037dec5f6
|
app.py
|
app.py
|
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import os
from sys import argv
import bottle
from bottle import default_app, request, route, response, get
from tsc.models import DB
bottle.debug(True)
application = bottle.default_app()
if __name__ == "__main__":
bottle.run(application, host="0.0.0.0", port=argv[1])
@get("/")
def index():
response.content_type = "application/json; charset=utf-8"
conn = None
try:
conn = DB.connect(os.environ.get("CLEARDB_DATABASE_URL"))
with conn.cursor() as cursor:
cursor.execute("SELECT COUNT(*) FROM teacher")
cursor.fetchone()
return {
"APP_ID": os.environ.get("APP_ID"),
"db": "true",
}
finally:
if conn:
conn.close()
|
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import os
from sys import argv
import bottle
from bottle import template, response, get
from tsc.models import DB
bottle.debug(True)
application = bottle.default_app()
if __name__ == "__main__":
bottle.run(application, host="0.0.0.0", port=argv[1])
@get("/")
def index():
html = """
<html>
<head>
<meta charset="UTF-8"></meta>
<title>dmm-eikaiwa-tsc - Teacher Schedule Checker for DMM Eikaiwa</title>
</head>
<body>
Want to know how to use this app? See <a href="https://github.com/oinume/dmm-eikaiwa-tsc/blob/master/README.md">README</a>
<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-2241989-17', 'auto');
ga('send', 'pageview');
</script>
</body>
</html>
"""
return template(html)
@get("/status")
def status():
response.content_type = "application/json; charset=utf-8"
conn = None
try:
conn = DB.connect(os.environ.get("CLEARDB_DATABASE_URL"))
with conn.cursor() as cursor:
cursor.execute("SELECT COUNT(*) FROM teacher")
cursor.fetchone()
return {
"APP_ID": os.environ.get("APP_ID"),
"db": "true",
}
finally:
if conn:
conn.close()
|
Add GA tag to /
|
Add GA tag to /
|
Python
|
mit
|
oinume/dmm-eikaiwa-tsc,oinume/dmm-eikaiwa-tsc
|
---
+++
@@ -4,7 +4,7 @@
import os
from sys import argv
import bottle
-from bottle import default_app, request, route, response, get
+from bottle import template, response, get
from tsc.models import DB
bottle.debug(True)
@@ -15,6 +15,33 @@
@get("/")
def index():
+ html = """
+<html>
+<head>
+<meta charset="UTF-8"></meta>
+<title>dmm-eikaiwa-tsc - Teacher Schedule Checker for DMM Eikaiwa</title>
+</head>
+<body>
+Want to know how to use this app? See <a href="https://github.com/oinume/dmm-eikaiwa-tsc/blob/master/README.md">README</a>
+
+<script>
+ (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
+ (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
+ m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
+ })(window,document,'script','//www.google-analytics.com/analytics.js','ga');
+
+ ga('create', 'UA-2241989-17', 'auto');
+ ga('send', 'pageview');
+</script>
+</body>
+</html>
+ """
+ return template(html)
+
+
+
+@get("/status")
+def status():
response.content_type = "application/json; charset=utf-8"
conn = None
try:
|
5982e5a4f0bb7f47e604aea2c851ba50bcbe07e1
|
hexify.py
|
hexify.py
|
import uflash
import argparse
import sys
import os
_HELP_TEXT = """
A simple utility script intended for creating hexified versions of MicroPython
scripts on the local filesystem _NOT_ the microbit. Does not autodetect a
microbit. Accepts multiple input scripts and optionally one output directory.
"""
def main(argv=None):
if not argv:
argv = sys.argv[1:]
parser = argparse.ArgumentParser(description=_HELP_TEXT)
parser.add_argument('source', nargs='*', default=None)
parser.add_argument('-o', '--outdir', default=None,
help="Output directory")
args = parser.parse_args(argv)
for file in args.source:
if not args.outdir:
(script_path, script_name) = os.path.split(file)
args.outdir = script_path
uflash.flash(path_to_python=file,
paths_to_microbits=[args.outdir], keepname=True)
if __name__ == '__main__':
main(sys.argv[1:])
|
import uflash
import argparse
import sys
import os
_HELP_TEXT = """
A simple utility script intended for creating hexified versions of MicroPython
scripts on the local filesystem _NOT_ the microbit. Does not autodetect a
microbit. Accepts multiple input scripts and optionally one output directory.
"""
def main(argv=None):
if not argv:
argv = sys.argv[1:]
parser = argparse.ArgumentParser(description=_HELP_TEXT)
parser.add_argument('source', nargs='*', default=None)
parser.add_argument('-r', '--runtime', default=None,
help="Use the referenced MicroPython runtime.")
parser.add_argument('-o', '--outdir', default=None,
help="Output directory")
parser.add_argument('-m', '--minify',
action='store_true',
help='Minify the source')
args = parser.parse_args(argv)
for file in args.source:
if not args.outdir:
(script_path, script_name) = os.path.split(file)
args.outdir = script_path
uflash.flash(path_to_python=file,
path_to_runtime=args.runtime,
paths_to_microbits=[args.outdir],
minify=args.minify,
keepname=True) # keepname is always True in hexify
if __name__ == '__main__':
main(sys.argv[1:])
|
Add runtime and minify support
|
Add runtime and minify support
Added command line arguments for runtime and minify.
|
Python
|
mit
|
ntoll/uflash
|
---
+++
@@ -16,8 +16,13 @@
parser = argparse.ArgumentParser(description=_HELP_TEXT)
parser.add_argument('source', nargs='*', default=None)
+ parser.add_argument('-r', '--runtime', default=None,
+ help="Use the referenced MicroPython runtime.")
parser.add_argument('-o', '--outdir', default=None,
help="Output directory")
+ parser.add_argument('-m', '--minify',
+ action='store_true',
+ help='Minify the source')
args = parser.parse_args(argv)
for file in args.source:
@@ -25,7 +30,10 @@
(script_path, script_name) = os.path.split(file)
args.outdir = script_path
uflash.flash(path_to_python=file,
- paths_to_microbits=[args.outdir], keepname=True)
+ path_to_runtime=args.runtime,
+ paths_to_microbits=[args.outdir],
+ minify=args.minify,
+ keepname=True) # keepname is always True in hexify
if __name__ == '__main__':
|
ee2bd9191bb10a31c0eb688cbddaaa8fedba68a7
|
IPython/html/terminal/handlers.py
|
IPython/html/terminal/handlers.py
|
"""Tornado handlers for the terminal emulator."""
# Copyright (c) IPython Development Team.
# Distributed under the terms of the Modified BSD License.
from tornado import web
import terminado
from ..base.handlers import IPythonHandler
class TerminalHandler(IPythonHandler):
"""Render the terminal interface."""
@web.authenticated
def get(self, term_name):
self.write(self.render_template('terminal.html',
ws_path="terminals/websocket/%s" % term_name))
class NewTerminalHandler(IPythonHandler):
"""Redirect to a new terminal."""
@web.authenticated
def get(self):
name, _ = self.application.terminal_manager.new_named_terminal()
self.redirect("/terminals/%s" % name, permanent=False)
TermSocket = terminado.TermSocket
|
"""Tornado handlers for the terminal emulator."""
# Copyright (c) IPython Development Team.
# Distributed under the terms of the Modified BSD License.
from tornado import web
import terminado
from ..base.handlers import IPythonHandler
class TerminalHandler(IPythonHandler):
"""Render the terminal interface."""
@web.authenticated
def get(self, term_name):
self.write(self.render_template('terminal.html',
ws_path="terminals/websocket/%s" % term_name))
class NewTerminalHandler(IPythonHandler):
"""Redirect to a new terminal."""
@web.authenticated
def get(self):
name, _ = self.application.terminal_manager.new_named_terminal()
self.redirect("/terminals/%s" % name, permanent=False)
class TermSocket(terminado.TermSocket, IPythonHandler):
def get(self, *args, **kwargs):
if not self.get_current_user():
raise web.HTTPError(403)
return super(TermSocket, self).get(*args, **kwargs)
|
Add authentication for terminal websockets
|
Add authentication for terminal websockets
|
Python
|
bsd-3-clause
|
ipython/ipython,ipython/ipython
|
---
+++
@@ -21,4 +21,8 @@
name, _ = self.application.terminal_manager.new_named_terminal()
self.redirect("/terminals/%s" % name, permanent=False)
-TermSocket = terminado.TermSocket
+class TermSocket(terminado.TermSocket, IPythonHandler):
+ def get(self, *args, **kwargs):
+ if not self.get_current_user():
+ raise web.HTTPError(403)
+ return super(TermSocket, self).get(*args, **kwargs)
|
670f589758ba5eb12df4cf1ea40eab7e7fb13a2f
|
python_scripts/mc_solr.py
|
python_scripts/mc_solr.py
|
import requests
import ipdb
import mc_config
import psycopg2
import psycopg2.extras
import time
def get_solr_location():
##TODO -- get this from the yaml file
return 'http://localhost:8983'
def get_solr_collection_url_prefix():
return get_solr_location() + '/solr/collection1'
def solr_request( path, params):
url = get_solr_collection_url_prefix() + '/' + path
print 'url: {}'.format( url )
params['wt'] = 'json'
r = requests.get( url, params=params, headers = { 'Accept': 'application/json'})
print 'request url '
print r.url
data = r.json()
return data
def dataimport_command( command, params={}):
params['command'] = command
return solr_request( 'dataimport', params )
def dataimport_status():
return dataimport_command( 'status' )
def dataimport_delta_import():
params = {
'commit': 'true',
'clean': 'false',
}
##Note: We're using the delta import through full import approach
return dataimport_command( 'full-import', params )
def dataimport_full_import():
params = {
'commit': 'true',
'clean': 'true',
}
##Note: We're using the delta import through full import approach
return dataimport_command( 'full-import', params )
def dataimport_reload_config():
return dataimport_command( 'reload' )
|
import requests
import mc_config
import psycopg2
import psycopg2.extras
import time
def get_solr_location():
##TODO -- get this from the yaml file
return 'http://localhost:8983'
def get_solr_collection_url_prefix():
return get_solr_location() + '/solr/collection1'
def solr_request( path, params):
url = get_solr_collection_url_prefix() + '/' + path
print 'url: {}'.format( url )
params['wt'] = 'json'
r = requests.get( url, params=params, headers = { 'Accept': 'application/json'})
print 'request url '
print r.url
data = r.json()
return data
def dataimport_command( command, params={}):
params['command'] = command
return solr_request( 'dataimport', params )
def dataimport_status():
return dataimport_command( 'status' )
def dataimport_delta_import():
params = {
'commit': 'true',
'clean': 'false',
}
##Note: We're using the delta import through full import approach
return dataimport_command( 'full-import', params )
def dataimport_full_import():
params = {
'commit': 'true',
'clean': 'true',
}
##Note: We're using the delta import through full import approach
return dataimport_command( 'full-import', params )
def dataimport_reload_config():
return dataimport_command( 'reload' )
|
Remove ipdb to get rid of spam warnings.
|
Remove ipdb to get rid of spam warnings.
|
Python
|
agpl-3.0
|
AchyuthIIIT/mediacloud,berkmancenter/mediacloud,AchyuthIIIT/mediacloud,AchyuthIIIT/mediacloud,AchyuthIIIT/mediacloud,berkmancenter/mediacloud,berkmancenter/mediacloud,berkmancenter/mediacloud,AchyuthIIIT/mediacloud,AchyuthIIIT/mediacloud,AchyuthIIIT/mediacloud,AchyuthIIIT/mediacloud,berkmancenter/mediacloud,AchyuthIIIT/mediacloud
|
---
+++
@@ -1,5 +1,4 @@
import requests
-import ipdb
import mc_config
import psycopg2
import psycopg2.extras
|
6a0186eb0d0e822dded1e58d0381625ded887221
|
serfnode/handler/parent_server.py
|
serfnode/handler/parent_server.py
|
#!/usr/bin/env python
import os
import select
import serf
def server():
"""A server for serf commands.
Commands are a string object that are passed to serf.
"""
os.mkfifo('/serfnode/parent')
pipe = os.fdopen(
os.open('/serfnode/parent', os.O_RDONLY | os.O_NONBLOCK), 'r', 0)
# open a dummy client to avoid getting EOF when other clients disconnect
_pipe = os.fdopen(
os.open('/serfnode/parent', os.O_WRONLY | os.O_NONBLOCK), 'w', 0)
polling = select.poll()
polling.register(pipe.fileno())
while True:
polling.poll()
cmd = pipe.readline()
serf.serf_plain(*cmd.split())
if __name__ == '__main__':
server()
|
#!/usr/bin/env python
import os
import select
import json
import serf
def server():
"""A server for serf commands.
Commands are a string object that are passed to serf.
"""
os.mkfifo('/serfnode/parent')
pipe = os.fdopen(
os.open('/serfnode/parent', os.O_RDONLY | os.O_NONBLOCK), 'r', 0)
# open a dummy client to avoid getting EOF when other clients disconnect
_pipe = os.fdopen(
os.open('/serfnode/parent', os.O_WRONLY | os.O_NONBLOCK), 'w', 0)
polling = select.poll()
polling.register(pipe.fileno())
while True:
polling.poll()
cmd = pipe.readline()
try:
name, payload = json.loads(cmd)
except:
print("Wrong payload: {}".format(cmd))
try:
serf.serf_plain('event', name, json.dumps(payload))
except:
print("serf command failed")
if __name__ == '__main__':
server()
|
Make parent server more robust
|
Make parent server more robust
|
Python
|
mit
|
waltermoreira/serfnode,waltermoreira/serfnode,waltermoreira/serfnode
|
---
+++
@@ -2,6 +2,7 @@
import os
import select
+import json
import serf
@@ -23,7 +24,14 @@
while True:
polling.poll()
cmd = pipe.readline()
- serf.serf_plain(*cmd.split())
+ try:
+ name, payload = json.loads(cmd)
+ except:
+ print("Wrong payload: {}".format(cmd))
+ try:
+ serf.serf_plain('event', name, json.dumps(payload))
+ except:
+ print("serf command failed")
if __name__ == '__main__':
|
058cee7b5a3efcf6b6bd02a314f1223153cc797f
|
tools/TreeBest/fasta_header_converter.py
|
tools/TreeBest/fasta_header_converter.py
|
import json
import optparse
transcript_species_dict = dict()
sequence_dict = dict()
def readgene(gene):
for transcript in gene['Transcript']:
transcript_species_dict[transcript['id']] = transcript['species'].replace("_", "")
def read_fasta(fp):
for line in fp:
line = line.rstrip()
if line.startswith(">"):
name = line.replace(">", "")
print ">" + name + "_" + transcript_species_dict[name]
else:
print line
parser = optparse.OptionParser()
parser.add_option('-j', '--json', dest="input_gene_filename",
help='Gene Tree from Ensembl in JSON format')
parser.add_option('-f', '--fasta', dest="input_fasta_filename",
help='Gene Tree from Ensembl in JSON format')
options, args = parser.parse_args()
if options.input_gene_filename is None:
raise Exception('-j option must be specified')
if options.input_fasta_filename is None:
raise Exception('-f option must be specified')
with open(options.input_gene_filename) as data_file:
data = json.load(data_file)
for gene_dict in data.values():
readgene(gene_dict)
with open(options.input_fasta_filename) as fp:
read_fasta(fp)
|
from __future__ import print_function
import json
import optparse
def read_gene_info(gene_info):
transcript_species_dict = dict()
for gene_dict in gene_info.values():
for transcript in gene_dict['Transcript']:
transcript_species_dict[transcript['id']] = transcript['species'].replace("_", "")
return transcript_species_dict
parser = optparse.OptionParser()
parser.add_option('-j', '--json', dest="input_gene_filename",
help='Gene feature information in JSON format')
parser.add_option('-f', '--fasta', dest="input_fasta_filename",
help='Sequences in FASTA format')
options, args = parser.parse_args()
if options.input_gene_filename is None:
raise Exception('-j option must be specified')
if options.input_fasta_filename is None:
raise Exception('-f option must be specified')
with open(options.input_gene_filename) as json_fh:
gene_info = json.load(json_fh)
transcript_species_dict = read_gene_info(gene_info)
with open(options.input_fasta_filename) as fasta_fh:
for line in fasta_fh:
line = line.rstrip()
if line.startswith(">"):
name = line[1:].lstrip()
print(">" + name + "_" + transcript_species_dict[name])
else:
print(line)
|
Use print() for Python3. No global variables. Optimisations
|
Use print() for Python3. No global variables. Optimisations
|
Python
|
mit
|
TGAC/earlham-galaxytools,PerlaTroncosoRey/tgac-galaxytools,TGAC/tgac-galaxytools,anilthanki/tgac-galaxytools,TGAC/earlham-galaxytools,anilthanki/tgac-galaxytools,TGAC/earlham-galaxytools,wjurkowski/earlham-galaxytools,anilthanki/tgac-galaxytools,anilthanki/tgac-galaxytools,TGAC/earlham-galaxytools,anilthanki/tgac-galaxytools,TGAC/earlham-galaxytools,TGAC/tgac-galaxytools
|
---
+++
@@ -1,34 +1,22 @@
+from __future__ import print_function
+
import json
-
import optparse
-transcript_species_dict = dict()
-sequence_dict = dict()
-
-
-def readgene(gene):
- for transcript in gene['Transcript']:
- transcript_species_dict[transcript['id']] = transcript['species'].replace("_", "")
-
-
-def read_fasta(fp):
- for line in fp:
- line = line.rstrip()
- if line.startswith(">"):
- name = line.replace(">", "")
- print ">" + name + "_" + transcript_species_dict[name]
- else:
- print line
+def read_gene_info(gene_info):
+ transcript_species_dict = dict()
+ for gene_dict in gene_info.values():
+ for transcript in gene_dict['Transcript']:
+ transcript_species_dict[transcript['id']] = transcript['species'].replace("_", "")
+ return transcript_species_dict
parser = optparse.OptionParser()
parser.add_option('-j', '--json', dest="input_gene_filename",
- help='Gene Tree from Ensembl in JSON format')
-
+ help='Gene feature information in JSON format')
parser.add_option('-f', '--fasta', dest="input_fasta_filename",
- help='Gene Tree from Ensembl in JSON format')
-
+ help='Sequences in FASTA format')
options, args = parser.parse_args()
if options.input_gene_filename is None:
@@ -37,11 +25,15 @@
if options.input_fasta_filename is None:
raise Exception('-f option must be specified')
-with open(options.input_gene_filename) as data_file:
- data = json.load(data_file)
+with open(options.input_gene_filename) as json_fh:
+ gene_info = json.load(json_fh)
+transcript_species_dict = read_gene_info(gene_info)
-for gene_dict in data.values():
- readgene(gene_dict)
-
-with open(options.input_fasta_filename) as fp:
- read_fasta(fp)
+with open(options.input_fasta_filename) as fasta_fh:
+ for line in fasta_fh:
+ line = line.rstrip()
+ if line.startswith(">"):
+ name = line[1:].lstrip()
+ print(">" + name + "_" + transcript_species_dict[name])
+ else:
+ print(line)
|
44b23909e262f20ebe7492fffbf1f89839d51d2f
|
ckanext/opendatani/dcat.py
|
ckanext/opendatani/dcat.py
|
from rdflib.namespace import Namespace
from ckanext.dcat.profiles import RDFProfile
DCT = Namespace("http://purl.org/dc/terms/")
class NIArcGISProfile(RDFProfile):
'''
An RDF profile for the Northern Ireland ArcGIS harvester
'''
def parse_dataset(self, dataset_dict, dataset_ref):
#TODO: if there is more than one source with different defaults,
# modify accordingly
dataset_dict['frequency'] = 'notPlanned'
dataset_dict['topic_category'] = 'location'
dataset_dict['lineage'] = '-'
dataset_dict['contact_name'] = 'OSNI Mapping Helpdesk'
dataset_dict['contact_email'] = 'mapping.helpdesk@dfpni.gov.uk'
dataset_dict['license_id'] = 'uk-ogl'
_remove_extra('contact_name', dataset_dict)
_remove_extra('contact_email', dataset_dict)
return dataset_dict
def _remove_extra(key, dataset_dict):
dataset_dict['extras'][:] = [e
for e in dataset_dict['extras']
if e['key'] != key]
|
from rdflib.namespace import Namespace
from ckanext.dcat.profiles import RDFProfile
DCT = Namespace("http://purl.org/dc/terms/")
class NIArcGISProfile(RDFProfile):
'''
An RDF profile for the Northern Ireland ArcGIS harvester
'''
def parse_dataset(self, dataset_dict, dataset_ref):
#TODO: if there is more than one source with different defaults,
# modify accordingly
dataset_dict['frequency'] = 'notPlanned'
dataset_dict['topic_category'] = 'location'
dataset_dict['lineage'] = '-'
dataset_dict['contact_name'] = 'OSNI Mapping Helpdesk'
dataset_dict['contact_email'] = 'mapping.helpdesk@dfpni.gov.uk'
dataset_dict['license_id'] = 'uk-ogl'
_remove_extra('contact_name', dataset_dict)
_remove_extra('contact_email', dataset_dict)
for resource in dataset_dict.get('resources', []):
if resource['format'] == 'OGC WMS':
resource['format'] = 'WMS'
return dataset_dict
def _remove_extra(key, dataset_dict):
dataset_dict['extras'][:] = [e
for e in dataset_dict['extras']
if e['key'] != key]
|
Tweak WMS resource format so views are created
|
Tweak WMS resource format so views are created
|
Python
|
agpl-3.0
|
okfn/ckanext-opendatani,okfn/ckanext-opendatani,okfn/ckanext-opendatani,okfn/ckanext-opendatani
|
---
+++
@@ -24,6 +24,10 @@
_remove_extra('contact_name', dataset_dict)
_remove_extra('contact_email', dataset_dict)
+ for resource in dataset_dict.get('resources', []):
+ if resource['format'] == 'OGC WMS':
+ resource['format'] = 'WMS'
+
return dataset_dict
|
46982bbb4c8c74aece4b80fdbdcf3d5ee1d75ac9
|
Lib/email/Iterators.py
|
Lib/email/Iterators.py
|
# Copyright (C) 2001,2002 Python Software Foundation
# Author: barry@zope.com (Barry Warsaw)
"""Various types of useful iterators and generators.
"""
import sys
try:
from email._compat22 import body_line_iterator, typed_subpart_iterator
except SyntaxError:
# Python 2.1 doesn't have generators
from email._compat21 import body_line_iterator, typed_subpart_iterator
def _structure(msg, level=0, fp=None):
"""A handy debugging aid"""
if fp is None:
fp = sys.stdout
tab = ' ' * (level * 4)
print >> fp, tab + msg.get_content_type()
if msg.is_multipart():
for subpart in msg.get_payload():
_structure(subpart, level+1, fp)
|
# Copyright (C) 2001,2002 Python Software Foundation
# Author: barry@zope.com (Barry Warsaw)
"""Various types of useful iterators and generators.
"""
import sys
try:
from email._compat22 import body_line_iterator, typed_subpart_iterator
except SyntaxError:
# Python 2.1 doesn't have generators
from email._compat21 import body_line_iterator, typed_subpart_iterator
def _structure(msg, fp=None, level=0):
"""A handy debugging aid"""
if fp is None:
fp = sys.stdout
tab = ' ' * (level * 4)
print >> fp, tab + msg.get_content_type()
if msg.is_multipart():
for subpart in msg.get_payload():
_structure(subpart, fp, level+1)
|
Swap fp and level arguments.
|
_structure(): Swap fp and level arguments.
|
Python
|
mit
|
sk-/python2.7-type-annotator,sk-/python2.7-type-annotator,sk-/python2.7-type-annotator
|
---
+++
@@ -15,7 +15,7 @@
-def _structure(msg, level=0, fp=None):
+def _structure(msg, fp=None, level=0):
"""A handy debugging aid"""
if fp is None:
fp = sys.stdout
@@ -23,4 +23,4 @@
print >> fp, tab + msg.get_content_type()
if msg.is_multipart():
for subpart in msg.get_payload():
- _structure(subpart, level+1, fp)
+ _structure(subpart, fp, level+1)
|
012bd4e09c7ed08ff79ce039a9682a5249fef1fc
|
plugins/clue/clue.py
|
plugins/clue/clue.py
|
from __future__ import unicode_literals
# don't convert to ascii in py2.7 when creating string to return
crontable = []
outputs = []
def process_message(data):
if data['channel'].startswith("D"):
outputs.append([data['channel'], "from repeat1 \"{}\" in channel {}".format(
data['text'], data['channel'])]
)
|
from __future__ import unicode_literals
# don't convert to ascii in py2.7 when creating string to return
crontable = []
outputs = []
def process_message(data):
outputs.append([data['channel'], "from repeat1 \"{}\" in channel {}".format(
data['text'], data['channel'])]
)
|
Allow stony to talk in channels other than direct-message channels.
|
Allow stony to talk in channels other than direct-message channels.
A direct-message channel identifier always starts with the character
'D', (while other channels have identifiers that start with 'C'). By
lifting the restriction of the channel name starting with "D", stony
can now talk in any channel.
Note: There's nothing we can do in the code to instruct stony to join
any particular channel. Instead, stony will need to be invited to any
channel of interest.
|
Python
|
mit
|
cworth-gh/stony
|
---
+++
@@ -6,7 +6,6 @@
def process_message(data):
- if data['channel'].startswith("D"):
- outputs.append([data['channel'], "from repeat1 \"{}\" in channel {}".format(
- data['text'], data['channel'])]
- )
+ outputs.append([data['channel'], "from repeat1 \"{}\" in channel {}".format(
+ data['text'], data['channel'])]
+ )
|
c8d2d6a4eace2107639badd17983e048dc9259e5
|
mfh.py
|
mfh.py
|
import os
import sys
import time
from multiprocessing import Process, Event
import mfhclient
import update
from arguments import parse
def main():
q = Event()
mfhclient_process = Process(
args=(args, q,),
name="mfhclient_process",
target=mfhclient.main,
)
mfhclient_process.start()
trigger_process = Process(
args=(q,),
name="trigger_process",
target=update.trigger,
)
trigger_process.start()
trigger_process.join()
while mfhclient_process.is_alive():
time.sleep(5)
else:
update.pull("origin", "master")
sys.stdout.flush()
os.execl(sys.executable, sys.executable, *sys.argv)
if __name__ == '__main__':
# Parse arguments
args = parse()
main()
|
import os
import sys
import time
from multiprocessing import Process, Event
import mfhclient
import update
from arguments import parse
from settings import HONEYPORT
def main():
update_event = Event()
mfhclient_process = Process(
args=(args, update_event,),
name="mfhclient_process",
target=mfhclient.main,
)
if args.client is not None:
mfhclient_process.start()
trigger_process = Process(
args=(update_event,),
name="trigger_process",
target=update.trigger,
)
trigger_process.start()
trigger_process.join()
while mfhclient_process.is_alive():
time.sleep(5)
else:
update.pull("origin", "master")
sys.stdout.flush()
os.execl(sys.executable, sys.executable, *sys.argv)
if __name__ == '__main__':
# Parse arguments
args = parse()
if args.c:
args.client = HONEYPORT
main()
|
Add condition to only launch client if -c or --client is specified
|
Add condition to only launch client if -c or --client is specified
|
Python
|
mit
|
Zloool/manyfaced-honeypot
|
---
+++
@@ -6,18 +6,20 @@
import mfhclient
import update
from arguments import parse
+from settings import HONEYPORT
def main():
- q = Event()
+ update_event = Event()
mfhclient_process = Process(
- args=(args, q,),
+ args=(args, update_event,),
name="mfhclient_process",
target=mfhclient.main,
)
- mfhclient_process.start()
+ if args.client is not None:
+ mfhclient_process.start()
trigger_process = Process(
- args=(q,),
+ args=(update_event,),
name="trigger_process",
target=update.trigger,
)
@@ -33,4 +35,6 @@
if __name__ == '__main__':
# Parse arguments
args = parse()
+ if args.c:
+ args.client = HONEYPORT
main()
|
cba1a165bdfef3c8bd95c0b5864aee811fbc55b3
|
myfedora/plugins/apps/tools/profileinfo.py
|
myfedora/plugins/apps/tools/profileinfo.py
|
from myfedora.widgets.resourceview import ToolWidget
from fedora.tg.client import BaseClient
from myfedora.lib.app_factory import AppFactory
class ProfileInfoToolApp(AppFactory):
entry_name = "tools.profileinfo"
class ProfileInfoToolWidget(ToolWidget):
template = 'genshi:myfedora.plugins.apps.tools.templates.profileinfo'
display_name = "Info"
def update_params(self, d):
super(ProfileInfoToolWidget, self).update_params(d)
return d
|
from myfedora.widgets.resourceview import ToolWidget
from fedora.client import BaseClient
from myfedora.lib.app_factory import AppFactory
class ProfileInfoToolApp(AppFactory):
entry_name = "tools.profileinfo"
class ProfileInfoToolWidget(ToolWidget):
template = 'genshi:myfedora.plugins.apps.tools.templates.profileinfo'
display_name = "Info"
def update_params(self, d):
super(ProfileInfoToolWidget, self).update_params(d)
return d
|
Fix a deprecation warning from python-fedora
|
Fix a deprecation warning from python-fedora
|
Python
|
agpl-3.0
|
Fale/fedora-packages,Fale/fedora-packages,fedora-infra/fedora-packages,fedora-infra/fedora-packages,fedora-infra/fedora-packages,Fale/fedora-packages,fedora-infra/fedora-packages
|
---
+++
@@ -1,5 +1,5 @@
from myfedora.widgets.resourceview import ToolWidget
-from fedora.tg.client import BaseClient
+from fedora.client import BaseClient
from myfedora.lib.app_factory import AppFactory
class ProfileInfoToolApp(AppFactory):
|
ab6ca021430933b38788ad2ae19f27f8ed00ab54
|
parse.py
|
parse.py
|
import sys
import simplejson as json
indentation = 0
lang_def = None
with open('language.json') as lang_def_file:
lang_def = json.loads(lang_def_file.read())
if lang_def is None:
print("error reading json language definition")
exit(1)
repl = lang_def['rules']
sin = sys.argv[1]
for r in repl:
sin = sin.replace(r['lang_rep'], r['il_rep'])
for r in repl:
sin = sin.replace(r['il_rep'], r['python_rep'])
sin = sin.replace('\\n', '\n')
for l in sin.splitlines():
try:
r = eval(l)
if r is not None:
print(r)
except:
try:
exec(l)
except:
print("ERROR OMG ERROR" + str(l))
|
import sys
import simplejson as json
def translate(file='hello_world.py'):
lang_def = None
with open('language.json') as lang_def_file:
lang_def = json.loads(lang_def_file.read())
if lang_def is None:
print('error reading json language definition')
exit(1)
python_code = None
with open(file) as python_file:
python_code = python_file.read()
if python_code is None:
print('error reading python file', file)
exit(1)
repl = lang_def['rules']
for r in repl:
python_code = python_code.replace(r['python_rep'], r['il_rep'])
for r in repl:
python_code = python_code.replace(r['il_rep'], r['lang_rep'])
python_code = python_code.replace('\\n', '\n')
print(python_code)
exit(0)
if len(sys.argv) == 1:
print("fail: requires at least one command line argument")
exit(1)
if sys.argv[1] == 'translate':
if len(sys.argv) > 2:
translate(sys.argv[2])
else:
translate()
print('fail: shouldn\'t reach here')
exit(1)
indentation = 0
lang_def = None
with open('language.json') as lang_def_file:
lang_def = json.loads(lang_def_file.read())
if lang_def is None:
print('error reading json language definition')
exit(1)
repl = lang_def['rules']
sin = sys.argv[1]
for r in repl:
sin = sin.replace(r['lang_rep'], r['il_rep'])
for r in repl:
sin = sin.replace(r['il_rep'], r['python_rep'])
sin = sin.replace('\\n', '\n')
for l in sin.splitlines():
try:
r = eval(l)
if r is not None:
print(r)
except:
try:
exec(l)
except:
print("ERROR OMG ERROR" + str(l))
|
Add translate functionality via command line arguments
|
Add translate functionality via command line arguments
|
Python
|
unlicense
|
philipdexter/build-a-lang
|
---
+++
@@ -1,5 +1,45 @@
import sys
import simplejson as json
+
+def translate(file='hello_world.py'):
+ lang_def = None
+ with open('language.json') as lang_def_file:
+ lang_def = json.loads(lang_def_file.read())
+ if lang_def is None:
+ print('error reading json language definition')
+ exit(1)
+ python_code = None
+ with open(file) as python_file:
+ python_code = python_file.read()
+ if python_code is None:
+ print('error reading python file', file)
+ exit(1)
+
+ repl = lang_def['rules']
+
+ for r in repl:
+ python_code = python_code.replace(r['python_rep'], r['il_rep'])
+ for r in repl:
+ python_code = python_code.replace(r['il_rep'], r['lang_rep'])
+
+ python_code = python_code.replace('\\n', '\n')
+
+ print(python_code)
+
+ exit(0)
+
+if len(sys.argv) == 1:
+ print("fail: requires at least one command line argument")
+ exit(1)
+
+if sys.argv[1] == 'translate':
+ if len(sys.argv) > 2:
+ translate(sys.argv[2])
+ else:
+ translate()
+
+print('fail: shouldn\'t reach here')
+exit(1)
indentation = 0
@@ -8,7 +48,7 @@
lang_def = json.loads(lang_def_file.read())
if lang_def is None:
- print("error reading json language definition")
+ print('error reading json language definition')
exit(1)
repl = lang_def['rules']
|
e1569a514345a8c78d415011387d06aed5e6daa4
|
webshack/cli.py
|
webshack/cli.py
|
"""WebShack: Sensible web components.
Usage:
webshack get <package>...
webshack -h | --help
webshack --version
Options:
-h --help Show this screen.
--version Show version.
"""
import sys
from docopt import docopt
from termcolor import colored
from webshack.install_package import install_package_hierarchy
import webshack.package_db as pdb
from pathlib import Path
VERSION="0.0.1"
class CLIOutput:
def __init__(self):
self.shift_width = 0
def log(self, package):
if package is None:
self.end_package()
else:
self.begin_package(package)
def begin_package(self, package):
self.shift_width = 50 - len(package)
sys.stdout.write("Installing {pkg}...".format(pkg=colored(package, 'blue')))
sys.stdout.flush()
def end_package(self):
sys.stdout.write(' '*self.shift_width)
sys.stdout.write('[{}]\n'.format(colored('DONE', 'green', attrs=['bold'])))
sys.stdout.flush()
def main():
options = docopt(__doc__, version=VERSION)
db = pdb.standard_package_db()
components = Path('components')
if options['get']:
output = CLIOutput()
for package in options['<package>']:
install_package_hierarchy(package, db, components,
log_output=output.log)
|
"""WebShack: Sensible web components.
Usage:
webshack list
webshack get <package>...
webshack -h | --help
webshack --version
Options:
-h --help Show this screen.
--version Show version.
"""
import sys
from docopt import docopt
from termcolor import colored
from webshack.install_package import install_package_hierarchy
import webshack.package_db as pdb
from pathlib import Path
VERSION="0.0.1"
class CLIOutput:
def __init__(self):
self.shift_width = 0
def log(self, package):
if package is None:
self.end_package()
else:
self.begin_package(package)
def begin_package(self, package):
self.shift_width = 50 - len(package)
sys.stdout.write("Installing {pkg}...".format(pkg=colored(package, 'blue')))
sys.stdout.flush()
def end_package(self):
sys.stdout.write(' '*self.shift_width)
sys.stdout.write('[{}]\n'.format(colored('DONE', 'green', attrs=['bold'])))
sys.stdout.flush()
def main():
options = docopt(__doc__, version=VERSION)
db = pdb.standard_package_db()
components = Path('components')
if options['get']:
output = CLIOutput()
for package in options['<package>']:
install_package_hierarchy(package, db, components,
log_output=output.log)
elif options['list']:
for package in sorted(db):
print(package)
|
Add a subcommand for listing packages
|
Add a subcommand for listing packages
|
Python
|
mit
|
prophile/webshack
|
---
+++
@@ -1,6 +1,7 @@
"""WebShack: Sensible web components.
Usage:
+ webshack list
webshack get <package>...
webshack -h | --help
webshack --version
@@ -50,4 +51,7 @@
for package in options['<package>']:
install_package_hierarchy(package, db, components,
log_output=output.log)
+ elif options['list']:
+ for package in sorted(db):
+ print(package)
|
ef30c5573a02d072f586973a13419d6fea0fffb5
|
utils.py
|
utils.py
|
#!/usr/bin/env
from __future__ import print_function, unicode_literals
import sys
def safe_print(msg, *args, **kwargs):
"""Safely print strings containing unicode characters."""
try:
print(msg, *args, **kwargs)
except:
print(msg.encode(sys.stdout.encoding or 'utf8', errors='replace'), *args, **kwargs)
|
#!/usr/bin/env
from __future__ import print_function, unicode_literals
import sys
def safe_print(msg="", *args, **kwargs):
"""Safely print strings containing unicode characters."""
try:
print(msg, *args, **kwargs)
except:
print(msg.encode(sys.stdout.encoding or 'utf8', errors='replace'), *args, **kwargs)
|
Add default message to safe_print
|
Add default message to safe_print
|
Python
|
mit
|
thebigmunch/gmusicapi-scripts
|
---
+++
@@ -5,7 +5,7 @@
import sys
-def safe_print(msg, *args, **kwargs):
+def safe_print(msg="", *args, **kwargs):
"""Safely print strings containing unicode characters."""
try:
|
4cb1b6b8656d4e3893b3aa8fe5766b507afa6d24
|
cmsplugin_rt/button/cms_plugins.py
|
cmsplugin_rt/button/cms_plugins.py
|
from cms.plugin_base import CMSPluginBase
from cms.plugin_pool import plugin_pool
from cms.models.pluginmodel import CMSPlugin
from django.utils.translation import ugettext_lazy as _
from django.conf import settings
from models import *
bootstrap_module_name = _("Widgets")
layout_module_name = _("Layout elements")
generic_module_name = _("Generic")
meta_module_name = _("Meta elements")
class ButtonPlugin(CMSPluginBase):
model = ButtonPluginModel
name = _("Button")
#module = bootstrap_module_name
render_template = "button_plugin.html"
def render(self, context, instance, placeholder):
context['instance'] = instance
if instance.page_link:
context['link'] = instance.page_link.get_absolute_url()
else:
context['link'] = instance.button_link
return context
plugin_pool.register_plugin(ButtonPlugin)
|
from cms.plugin_base import CMSPluginBase
from cms.plugin_pool import plugin_pool
from cms.models.pluginmodel import CMSPlugin
from django.utils.translation import ugettext_lazy as _
from django.conf import settings
from models import *
bootstrap_module_name = _("Widgets")
layout_module_name = _("Layout elements")
generic_module_name = _("Generic")
meta_module_name = _("Meta elements")
class ButtonPlugin(CMSPluginBase):
model = ButtonPluginModel
name = _("Button")
#module = bootstrap_module_name
render_template = "button_plugin.html"
text_enabled = True
def render(self, context, instance, placeholder):
context['instance'] = instance
if instance.page_link:
context['link'] = instance.page_link.get_absolute_url()
else:
context['link'] = instance.button_link
return context
plugin_pool.register_plugin(ButtonPlugin)
|
Make Button plugin usable inside Text plugin
|
Make Button plugin usable inside Text plugin
|
Python
|
bsd-3-clause
|
RacingTadpole/cmsplugin-rt
|
---
+++
@@ -16,6 +16,7 @@
name = _("Button")
#module = bootstrap_module_name
render_template = "button_plugin.html"
+ text_enabled = True
def render(self, context, instance, placeholder):
context['instance'] = instance
|
cf843755f4edffb13deebac6c4e39cb44fff72e6
|
statement_format.py
|
statement_format.py
|
import pandas as pd
def fn(row):
if row['Type'] == 'DIRECT DEBIT':
return 'DD'
if row['Type'] == 'DIRECT CREDIT' or row['Spending Category'] == 'INCOME':
return 'BP'
if row['Amount (GBP)'] < 0:
return 'SO'
raise Exception('Unintended state')
df = pd.read_csv('statement.csv')
output = df[['Date']]
output['Type'] = df.apply(fn, axis=1)
output['Description'] = df['Reference']
output['Paid Out'] = df['Amount (GBP)'].copy()
output['Paid In'] = df['Amount (GBP)'].copy()
output['Paid Out'] = output['Paid Out'] * -1
output['Paid Out'][output['Paid Out'] < 0] = None
output['Paid In'][output['Paid In'] < 0] = None
output['Balance'] = df['Balance (GBP)']
print(output)
output.to_csv('output.csv', index=False)
|
import json
import pandas as pd
def fn(row):
if row['Type'] == 'DIRECT DEBIT':
return 'DD'
if row['Type'] == 'DIRECT CREDIT' or row['Spending Category'] == 'INCOME':
return 'BP'
if row['Amount (GBP)'] < 0:
return 'SO'
raise Exception('Unintended state')
df = pd.read_csv('statement.csv')
conversions = json.load(open('description_conversion.json'))
output = df[['Date']]
output['Type'] = df.apply(fn, axis=1)
output['Description'] = (df['Counter Party'] + ' ' + df['Reference']).replace(conversions)
output['Paid Out'] = df['Amount (GBP)'].copy()
output['Paid In'] = df['Amount (GBP)'].copy()
output['Paid Out'] = output['Paid Out'] * -1
output['Paid Out'][output['Paid Out'] < 0] = None
output['Paid In'][output['Paid In'] < 0] = None
output['Balance'] = df['Balance (GBP)']
output.to_csv('output.csv', index=False)
|
Correct operation. Now to fix panda warnings
|
Correct operation. Now to fix panda warnings
|
Python
|
mit
|
noelevans/sandpit,noelevans/sandpit,noelevans/sandpit,noelevans/sandpit,noelevans/sandpit,noelevans/sandpit
|
---
+++
@@ -1,3 +1,4 @@
+import json
import pandas as pd
@@ -12,9 +13,10 @@
df = pd.read_csv('statement.csv')
+conversions = json.load(open('description_conversion.json'))
output = df[['Date']]
output['Type'] = df.apply(fn, axis=1)
-output['Description'] = df['Reference']
+output['Description'] = (df['Counter Party'] + ' ' + df['Reference']).replace(conversions)
output['Paid Out'] = df['Amount (GBP)'].copy()
output['Paid In'] = df['Amount (GBP)'].copy()
output['Paid Out'] = output['Paid Out'] * -1
@@ -22,5 +24,4 @@
output['Paid In'][output['Paid In'] < 0] = None
output['Balance'] = df['Balance (GBP)']
-print(output)
output.to_csv('output.csv', index=False)
|
1e6b0b6f53a4508c3e4218345b2ee57d48fbc8d1
|
flask_app.py
|
flask_app.py
|
from flask import abort
from flask import Flask
from flask_caching import Cache
import main
app = Flask(__name__)
cache = Cache(app, config={'CACHE_TYPE': 'simple'})
@app.route('/')
def display_available():
content = ('<html>' +
'<head>' +
'<title>Restaurant Menu Parser</title>' +
'</head>' +
'<body>' +
'<p><a href="ki">Campus Solna (KI)</a></p>' +
'<p><a href="uu">Campus Uppsala (BMC)</a></p>' +
'</body>' +
'</html>')
return content
@app.route('/api/restaurants')
@cache.cached(timeout=3600)
def api_list_restaurants():
return main.list_restaurants()
@app.route('/api/restaurant/<name>')
@cache.cached(timeout=3600)
def api_get_restaurant(name):
data = main.get_restaurant(name)
if not data:
abort(404)
return data
@app.route('/ki')
@cache.cached(timeout=3600)
def make_menu_ki():
return main.gen_ki_menu()
@app.route('/uu')
@cache.cached(timeout=3600)
def make_menu_uu():
return main.gen_uu_menu()
|
import json
from flask import abort
from flask import Flask
from flask_caching import Cache
import main
app = Flask(__name__)
cache = Cache(app, config={'CACHE_TYPE': 'simple'})
@app.route('/')
def display_available():
content = ('<html>' +
'<head>' +
'<title>Restaurant Menu Parser</title>' +
'</head>' +
'<body>' +
'<p><a href="ki">Campus Solna (KI)</a></p>' +
'<p><a href="uu">Campus Uppsala (BMC)</a></p>' +
'</body>' +
'</html>')
return content
@app.route('/api/restaurants')
@cache.cached(timeout=3600)
def api_list_restaurants():
return json.dumps(main.list_restaurants())
@app.route('/api/restaurant/<name>')
@cache.cached(timeout=3600)
def api_get_restaurant(name):
data = main.get_restaurant(name)
if not data:
abort(404)
return json.dumps(data)
@app.route('/ki')
@cache.cached(timeout=3600)
def make_menu_ki():
return main.gen_ki_menu()
@app.route('/uu')
@cache.cached(timeout=3600)
def make_menu_uu():
return main.gen_uu_menu()
|
Return str instead of dict.
|
Return str instead of dict.
|
Python
|
bsd-3-clause
|
talavis/kimenu
|
---
+++
@@ -1,3 +1,5 @@
+import json
+
from flask import abort
from flask import Flask
from flask_caching import Cache
@@ -26,7 +28,7 @@
@app.route('/api/restaurants')
@cache.cached(timeout=3600)
def api_list_restaurants():
- return main.list_restaurants()
+ return json.dumps(main.list_restaurants())
@app.route('/api/restaurant/<name>')
@@ -35,7 +37,7 @@
data = main.get_restaurant(name)
if not data:
abort(404)
- return data
+ return json.dumps(data)
@app.route('/ki')
|
31bfcd8d7b82bdd53a0d9649402b5dd38a23d506
|
tests/scoring_engine/web/test_admin.py
|
tests/scoring_engine/web/test_admin.py
|
from web_test import WebTest
from scoring_engine.models.team import Team
from scoring_engine.models.user import User
class TestAdmin(WebTest):
def setup(self):
super(TestAdmin, self).setup()
team1 = Team(name="Team 1", color="White")
self.db.save(team1)
user1 = User(username='testuser', password='testpass', team=team1)
self.db.save(user1)
def auth_and_get_path(self, path):
self.client.login('testuser', 'testpass')
return self.client.get(path)
def test_auth_required_admin(self):
self.verify_auth_required('/admin')
def test_auth_required_admin_status(self):
self.verify_auth_required('/admin/status')
stats_resp = self.auth_and_get_path('/admin/status')
assert stats_resp.status_code == 200
def test_auth_required_admin_manage(self):
self.verify_auth_required('/admin/manage')
stats_resp = self.auth_and_get_path('/admin/manage')
assert stats_resp.status_code == 200
def test_auth_required_admin_stats(self):
self.verify_auth_required('/admin/stats')
stats_resp = self.auth_and_get_path('/admin/stats')
assert stats_resp.status_code == 200
|
from web_test import WebTest
from scoring_engine.models.team import Team
from scoring_engine.models.user import User
class TestAdmin(WebTest):
def setup(self):
super(TestAdmin, self).setup()
team1 = Team(name="Team 1", color="White")
self.db.save(team1)
user1 = User(username='testuser', password='testpass', team=team1)
self.db.save(user1)
def auth_and_get_path(self, path):
self.client.login('testuser', 'testpass')
return self.client.get(path)
def test_auth_required_admin(self):
self.verify_auth_required('/admin')
def test_auth_required_admin_status(self):
self.verify_auth_required('/admin/status')
stats_resp = self.auth_and_get_path('/admin/status')
assert stats_resp.status_code == 200
def test_auth_required_admin_manage(self):
self.verify_auth_required('/admin/manage')
stats_resp = self.auth_and_get_path('/admin/manage')
assert stats_resp.status_code == 200
def test_auth_required_admin_stats(self):
self.verify_auth_required('/admin/stats')
stats_resp = self.auth_and_get_path('/admin/stats')
assert stats_resp.status_code == 200
|
Remove extra line in test admin
|
Remove extra line in test admin
Signed-off-by: Brandon Myers <9cda508be11a1ae7ceef912b85c196946f0ec5f3@mozilla.com>
|
Python
|
mit
|
pwnbus/scoring_engine,pwnbus/scoring_engine,pwnbus/scoring_engine,pwnbus/scoring_engine
|
---
+++
@@ -27,7 +27,6 @@
stats_resp = self.auth_and_get_path('/admin/manage')
assert stats_resp.status_code == 200
-
def test_auth_required_admin_stats(self):
self.verify_auth_required('/admin/stats')
stats_resp = self.auth_and_get_path('/admin/stats')
|
9e4608b5cafcaf69718b3b187e143098ed74954f
|
examples/dispatcher/main.py
|
examples/dispatcher/main.py
|
import time
from osbrain import random_nameserver
from osbrain import run_agent
from osbrain import Agent
from osbrain import Proxy
def log(agent, message):
agent.log_info(message)
def rep_handler(agent, message):
if agent.i < 10:
if not agent.i % 5:
agent.send('rep', 5)
else:
agent.send('rep', 1)
agent.i += 1
def worker_loop(agent):
while True:
agent.send('dispatcher', 'READY!')
x = agent.recv('dispatcher')
time.sleep(x)
agent.send('results', '%s finished with %s' % (agent.name, x))
if __name__ == '__main__':
ns = random_nameserver()
results = run_agent('Results', nsaddr=ns)
results_addr = results.bind('PULL', handler=log)
dispatcher = run_agent('Dispatcher', nsaddr=ns)
dispatcher.set_attr(i=0)
dispatcher_addr = dispatcher.bind('REP', alias='rep', handler=rep_handler)
for i in range(5):
worker = run_agent('Worker%s' % i, nsaddr=ns)
worker.connect(results_addr, alias='results')
worker.connect(dispatcher_addr, alias='dispatcher')
worker.stop()
worker.set_loop(worker_loop)
worker.run()
|
import time
from osbrain import random_nameserver
from osbrain import run_agent
def log(agent, message):
agent.log_info(message)
def rep_handler(agent, message):
if agent.i < 10:
if not agent.i % 5:
agent.send('rep', 5)
else:
agent.send('rep', 1)
agent.i += 1
def worker_loop(agent):
while True:
agent.send('dispatcher', 'READY!')
x = agent.recv('dispatcher')
time.sleep(x)
agent.send('results', '%s finished with %s' % (agent.name, x))
if __name__ == '__main__':
ns = random_nameserver()
results = run_agent('Results', nsaddr=ns)
results_addr = results.bind('PULL', handler=log)
dispatcher = run_agent('Dispatcher', nsaddr=ns)
dispatcher.set_attr(i=0)
dispatcher_addr = dispatcher.bind('REP', alias='rep', handler=rep_handler)
for i in range(5):
worker = run_agent('Worker%s' % i, nsaddr=ns)
worker.connect(results_addr, alias='results')
worker.connect(dispatcher_addr, alias='dispatcher')
worker.stop()
worker.set_loop(worker_loop)
worker.run()
|
Remove unused imports in example
|
Remove unused imports in example
|
Python
|
apache-2.0
|
opensistemas-hub/osbrain
|
---
+++
@@ -1,8 +1,6 @@
import time
from osbrain import random_nameserver
from osbrain import run_agent
-from osbrain import Agent
-from osbrain import Proxy
def log(agent, message):
|
300471024ff16026d23bf60008d19784604b2eb3
|
gala-training-crossval-sub.py
|
gala-training-crossval-sub.py
|
# IPython log file
from gala import classify
datas = []
labels = []
import numpy as np
list(map(np.shape, labels))
for i in range(3, 4):
data, label = classify.load_training_data_from_disk('training-data-%i.h5' % i, names=['data', 'labels'])
datas.append(data)
labels.append(label[:, 0])
X0 = np.concatenate(datas, axis=0)
y0 = np.concatenate(labels)
idx = np.random.choice(len(y0), size=3000, replace=False)
X, y = X0[idx], y0[idx]
param_dist = {'n_estimators': [20, 100, 200, 500],
'max_depth': [3, 5, 20, None],
'max_features': ['auto', 5, 10, 20],
'bootstrap': [True, False],
'criterion': ['gini', 'entropy']}
from sklearn import grid_search as gs
from time import time
from sklearn import ensemble
ensemble.RandomForestClassifier().get_params().keys()
rf = ensemble.RandomForestClassifier()
random_search = gs.GridSearchCV(rf, param_grid=param_dist, refit=False,
verbose=2, n_jobs=12)
start=time(); random_search.fit(X, y); stop=time()
|
# IPython log file
from gala import classify
datas = []
labels = []
import numpy as np
list(map(np.shape, labels))
for i in range(3, 4):
data, label = classify.load_training_data_from_disk('training-data-%i.h5' % i, names=['data', 'labels'])
datas.append(data)
labels.append(label[:, 0])
X0 = np.concatenate(datas, axis=0)
y0 = np.concatenate(labels)
# runtime was 5min for 3000 samples, expect ~2h for 72,000
idx = np.random.choice(len(y0), size=72000, replace=False)
X, y = X0[idx], y0[idx]
param_dist = {'n_estimators': [20, 100, 200, 500],
'max_depth': [3, 5, 20, None],
'max_features': ['auto', 5, 10, 20],
'bootstrap': [True, False],
'criterion': ['gini', 'entropy']}
from sklearn import grid_search as gs
from time import time
from sklearn import ensemble
ensemble.RandomForestClassifier().get_params().keys()
rf = ensemble.RandomForestClassifier()
random_search = gs.GridSearchCV(rf, param_grid=param_dist, refit=False,
verbose=2, n_jobs=12)
start=time(); random_search.fit(X, y); stop=time()
|
Add run for 72k samples
|
Add run for 72k samples
|
Python
|
bsd-3-clause
|
jni/gala-scripts
|
---
+++
@@ -13,7 +13,8 @@
X0 = np.concatenate(datas, axis=0)
y0 = np.concatenate(labels)
-idx = np.random.choice(len(y0), size=3000, replace=False)
+# runtime was 5min for 3000 samples, expect ~2h for 72,000
+idx = np.random.choice(len(y0), size=72000, replace=False)
X, y = X0[idx], y0[idx]
param_dist = {'n_estimators': [20, 100, 200, 500],
'max_depth': [3, 5, 20, None],
|
0c7d6fa29c7c6d9513f0a63b9165fe7f00788b04
|
setup.py
|
setup.py
|
from setuptools import setup, find_packages
__author__ = 'Michiaki Ariga'
setup(
name='tabula',
version='0.1',
description='Simple wrapper for tabula, read tables from PDF into DataFrame',
author=__author__,
author_email='chezou@gmail.com',
url='https://github.com/chezou/tabula-py',
classifiers=[
'Development Status :: 4 - Beta',
'Topic :: Text Processing :: General',
'License :: OSI Approved :: MIT License',
'Programming Language :: Python :: 3.5',
'Programming Language :: Python :: 3 :: Only',
],
include_package_data=True,
packages=['tabula'],
package_data={'tabula': ['tabula-0.9.1-jar-with-dependencies.jar']},
license='MIT License',
keywords=['data frame', 'pdf', 'table'],
install_requires=[
'pandas',
],
)
|
from setuptools import setup, find_packages
__author__ = 'Michiaki Ariga'
setup(
name='tabula-py',
version='0.1',
description='Simple wrapper for tabula, read tables from PDF into DataFrame',
author=__author__,
author_email='chezou@gmail.com',
url='https://github.com/chezou/tabula-py',
classifiers=[
'Development Status :: 4 - Beta',
'Topic :: Text Processing :: General',
'License :: OSI Approved :: MIT License',
'Programming Language :: Python :: 3.5',
'Programming Language :: Python :: 3 :: Only',
],
include_package_data=True,
packages=['tabula'],
package_data={'tabula': ['tabula-0.9.1-jar-with-dependencies.jar']},
license='MIT License',
keywords=['data frame', 'pdf', 'table'],
install_requires=[
'pandas',
],
)
|
Change package name because of conflict
|
Change package name because of conflict
|
Python
|
mit
|
chezou/tabula-py
|
---
+++
@@ -3,7 +3,7 @@
__author__ = 'Michiaki Ariga'
setup(
- name='tabula',
+ name='tabula-py',
version='0.1',
description='Simple wrapper for tabula, read tables from PDF into DataFrame',
author=__author__,
|
beaa9ac3f90bbfaf124e04db9b4e790b4ebe8d9e
|
setup.py
|
setup.py
|
"""
Flask-JWT-Extended
-------------------
Flask-Login provides jwt endpoint protection for Flask.
"""
from setuptools import setup
setup(name='Flask-JWT-Extended',
version='2.4.1',
url='https://github.com/vimalloc/flask-jwt-extended',
license='MIT',
author='Landon Gilbert-Bland',
author_email='landogbland@gmail.com',
description='Extended JWT integration with Flask',
long_description='Extended JWT integration with Flask',
keywords = ['flask', 'jwt', 'json web token'],
packages=['flask_jwt_extended'],
zip_safe=False,
platforms='any',
install_requires=['Flask', 'PyJWT', 'simplekv'],
extras_require={
'asymmetric_crypto': ["cryptography"]
},
classifiers=[
'Development Status :: 4 - Beta',
'Environment :: Web Environment',
'Intended Audience :: Developers',
'License :: OSI Approved :: MIT License',
'Operating System :: OS Independent',
'Programming Language :: Python',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.3',
'Programming Language :: Python :: 3.4',
'Programming Language :: Python :: 3.5',
'Programming Language :: Python :: 3.6',
'Topic :: Internet :: WWW/HTTP :: Dynamic Content',
'Topic :: Software Development :: Libraries :: Python Modules'
])
|
"""
Flask-JWT-Extended
-------------------
Flask-Login provides jwt endpoint protection for Flask.
"""
from setuptools import setup
setup(name='Flask-JWT-Extended',
version='2.4.1',
url='https://github.com/vimalloc/flask-jwt-extended',
license='MIT',
author='Landon Gilbert-Bland',
author_email='landogbland@gmail.com',
description='Extended JWT integration with Flask',
long_description='Extended JWT integration with Flask',
keywords = ['flask', 'jwt', 'json web token'],
packages=['flask_jwt_extended'],
zip_safe=False,
platforms='any',
install_requires=['Flask', 'PyJWT'],
extras_require={
'asymmetric_crypto': ["cryptography"]
},
classifiers=[
'Development Status :: 5 - Production/Stable',
'Environment :: Web Environment',
'Intended Audience :: Developers',
'License :: OSI Approved :: MIT License',
'Operating System :: OS Independent',
'Programming Language :: Python',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.3',
'Programming Language :: Python :: 3.4',
'Programming Language :: Python :: 3.5',
'Programming Language :: Python :: 3.6',
'Topic :: Internet :: WWW/HTTP :: Dynamic Content',
'Topic :: Software Development :: Libraries :: Python Modules'
])
|
Remove simplekv requirement, mark as procution instead of beta
|
Remove simplekv requirement, mark as procution instead of beta
|
Python
|
mit
|
vimalloc/flask-jwt-extended
|
---
+++
@@ -17,12 +17,12 @@
packages=['flask_jwt_extended'],
zip_safe=False,
platforms='any',
- install_requires=['Flask', 'PyJWT', 'simplekv'],
+ install_requires=['Flask', 'PyJWT'],
extras_require={
'asymmetric_crypto': ["cryptography"]
},
classifiers=[
- 'Development Status :: 4 - Beta',
+ 'Development Status :: 5 - Production/Stable',
'Environment :: Web Environment',
'Intended Audience :: Developers',
'License :: OSI Approved :: MIT License',
|
684d279f9fd85fd7a8420164ce0bbba6265d8d6d
|
setup.py
|
setup.py
|
from setuptools import setup, find_packages
from ckanext.qa import __version__
setup(
name='ckanext-qa',
version=__version__,
description='Quality Assurance plugin for CKAN',
long_description='',
classifiers=[],
keywords='',
author='Open Knowledge Foundation',
author_email='info@okfn.org',
url='http://ckan.org/wiki/Extensions',
license='mit',
packages=find_packages(exclude=['tests']),
namespace_packages=['ckanext', 'ckanext.qa'],
include_package_data=True,
zip_safe=False,
install_requires=[
'celery==2.4.2',
'kombu==2.1.3',
'kombu-sqlalchemy==1.1.0',
'SQLAlchemy>=0.6.6',
'requests==0.6.4',
],
tests_require=[
'nose',
'mock',
],
entry_points='''
[paste.paster_command]
qa=ckanext.qa.commands:QACommand
[ckan.plugins]
qa=ckanext.qa.plugin:QAPlugin
[ckan.celery_task]
tasks=ckanext.qa.celery_import:task_imports
''',
)
|
from setuptools import setup, find_packages
from ckanext.qa import __version__
setup(
name='ckanext-qa',
version=__version__,
description='Quality Assurance plugin for CKAN',
long_description='',
classifiers=[],
keywords='',
author='Open Knowledge Foundation',
author_email='info@okfn.org',
url='http://ckan.org/wiki/Extensions',
license='mit',
packages=find_packages(exclude=['tests']),
namespace_packages=['ckanext', 'ckanext.qa'],
include_package_data=True,
zip_safe=False,
install_requires=[
'celery==2.4.2',
'kombu==2.1.3',
'kombu-sqlalchemy==1.1.0',
'SQLAlchemy>=0.6.6',
'requests==0.14',
],
tests_require=[
'nose',
'mock',
],
entry_points='''
[paste.paster_command]
qa=ckanext.qa.commands:QACommand
[ckan.plugins]
qa=ckanext.qa.plugin:QAPlugin
[ckan.celery_task]
tasks=ckanext.qa.celery_import:task_imports
''',
)
|
Update requests version to match ckanext-archiver.
|
Update requests version to match ckanext-archiver.
|
Python
|
mit
|
ckan/ckanext-qa,ckan/ckanext-qa,ckan/ckanext-qa
|
---
+++
@@ -21,7 +21,7 @@
'kombu==2.1.3',
'kombu-sqlalchemy==1.1.0',
'SQLAlchemy>=0.6.6',
- 'requests==0.6.4',
+ 'requests==0.14',
],
tests_require=[
'nose',
|
7842e714cf4345f11f59fc0915c86f1b2a836a9b
|
setup.py
|
setup.py
|
#!/usr/bin/env python
"""Installs geordi"""
import os
import sys
from distutils.core import setup
def long_description():
"""Get the long description from the README"""
return open(os.path.join(sys.path[0], 'README.txt')).read()
setup(
author='Brodie Rao',
author_email='brodie@sf.io',
classifiers=[
'Development Status :: 3 - Alpha',
'Environment :: Web Environment',
'Framework :: Django',
'Intended Audience :: Developers',
('License :: OSI Approved :: '
'GNU Lesser General Public License v2 (LGPLv2)'),
'Natural Language :: English',
'Operating System :: OS Independent',
'Programming Language :: Python',
'Programming Language :: JavaScript',
'Topic :: Software Development',
'Topic :: Utilities',
],
description='A Django middleware for interactive profiling',
dependency_links=[
'https://bitbucket.org/brodie/gprof2dot/get/097c7cca29882a7de789dbc27069a4bb4f8fc5b0.tar.gz#egg=gprof2dot-dev'
],
download_url='https://bitbucket.org/brodie/geordi/get/0.1.tar.gz',
install_requires=['gprof2dot==dev'],
keywords='django graph profiler',
license='GNU Lesser GPL',
long_description=long_description(),
name='geordi',
packages=['geordi'],
url='https://bitbucket.org/brodie/geordi',
version='0.1',
)
|
#!/usr/bin/env python
"""Installs geordi"""
import os
import sys
from distutils.core import setup
def long_description():
"""Get the long description from the README"""
return open(os.path.join(sys.path[0], 'README.txt')).read()
setup(
author='Brodie Rao',
author_email='brodie@sf.io',
classifiers=[
'Development Status :: 3 - Alpha',
'Environment :: Web Environment',
'Framework :: Django',
'Intended Audience :: Developers',
('License :: OSI Approved :: '
'GNU Lesser General Public License v2 (LGPLv2)'),
'Natural Language :: English',
'Operating System :: OS Independent',
'Programming Language :: Python',
'Programming Language :: JavaScript',
'Topic :: Software Development',
'Topic :: Utilities',
],
description='A Django middleware for interactive profiling',
dependency_links=[
'https://bitbucket.org/brodie/gprof2dot/get/3d61cf0a321e06edc252d45e135ffea2bd16c1cc.tar.gz#egg=gprof2dot-dev'
],
download_url='https://bitbucket.org/brodie/geordi/get/0.1.tar.gz',
install_requires=['gprof2dot==dev'],
keywords='django graph profiler',
license='GNU Lesser GPL',
long_description=long_description(),
name='geordi',
packages=['geordi'],
url='https://bitbucket.org/brodie/geordi',
version='0.1',
)
|
Update gprof2dot to a version that includes absolute times
|
Update gprof2dot to a version that includes absolute times
|
Python
|
lgpl-2.1
|
HurricaneLabs/geordi,goconnectome/geordi
|
---
+++
@@ -28,7 +28,7 @@
],
description='A Django middleware for interactive profiling',
dependency_links=[
- 'https://bitbucket.org/brodie/gprof2dot/get/097c7cca29882a7de789dbc27069a4bb4f8fc5b0.tar.gz#egg=gprof2dot-dev'
+ 'https://bitbucket.org/brodie/gprof2dot/get/3d61cf0a321e06edc252d45e135ffea2bd16c1cc.tar.gz#egg=gprof2dot-dev'
],
download_url='https://bitbucket.org/brodie/geordi/get/0.1.tar.gz',
install_requires=['gprof2dot==dev'],
|
b5af31fba4bde1b90857d693b8277a3d2a0e3607
|
rplugin/python3/deoplete/sources/go.py
|
rplugin/python3/deoplete/sources/go.py
|
import deoplete.util
from .base import Base
class Source(Base):
def __init__(self, vim):
Base.__init__(self, vim)
self.name = 'go'
self.mark = '[go]'
self.filetypes = ['go']
self.rank = 100
self.min_pattern_length = 0
self.is_bytepos = True
def get_complete_api(self, findstart):
complete_api = self.vim.vars['deoplete#sources#go']
if complete_api == 'gocode':
return self.vim.call('gocomplete#Complete', findstart, 0)
elif complete_api == 'vim-go':
return self.vim.call('go#complete#Complete', findstart, 0)
else:
return deoplete.util.error(self.vim, "g:deoplete#sources#go must be 'gocode' or 'vim-go'")
def get_complete_position(self, context):
return self.get_complete_api(1)
def gather_candidates(self, context):
return self.get_complete_api(0)
|
import deoplete.util
from .base import Base
class Source(Base):
def __init__(self, vim):
Base.__init__(self, vim)
self.name = 'go'
self.mark = '[go]'
self.filetypes = ['go']
self.min_pattern_length = 0
self.is_bytepos = True
def get_complete_api(self, findstart):
complete_api = self.vim.vars['deoplete#sources#go']
if complete_api == 'gocode':
return self.vim.call('gocomplete#Complete', findstart, 0)
elif complete_api == 'vim-go':
return self.vim.call('go#complete#Complete', findstart, 0)
else:
return deoplete.util.error(self.vim, "g:deoplete#sources#go must be 'gocode' or 'vim-go'")
def get_complete_position(self, context):
return self.get_complete_api(1)
def gather_candidates(self, context):
return self.get_complete_api(0)
|
Remove rank to default set. deoplete will set 100
|
Remove rank to default set. deoplete will set 100
Signed-off-by: Koichi Shiraishi <2e5bdfebde234ed3509bcfc18121c70b6631e207@gmail.com>
|
Python
|
mit
|
zchee/deoplete-go,zchee/deoplete-go
|
---
+++
@@ -9,7 +9,6 @@
self.name = 'go'
self.mark = '[go]'
self.filetypes = ['go']
- self.rank = 100
self.min_pattern_length = 0
self.is_bytepos = True
|
83820cb37f65e6c15427808d90abe8a8e36f24b8
|
setup.py
|
setup.py
|
from __future__ import absolute_import
#from distutils.core import setup
from setuptools import setup
descr = """
microscopium: unsupervised sample clustering and dataset exploration
for high content screens.
"""
DISTNAME = 'microscopium'
DESCRIPTION = 'Clustering of High Content Screen Images'
LONG_DESCRIPTION = descr
MAINTAINER = 'Juan Nunez-Iglesias'
MAINTAINER_EMAIL = 'juan.n@unimelb.edu.au'
URL = 'https://github.com/microscopium/microscopium'
LICENSE = 'BSD 3-clause'
DOWNLOAD_URL = 'https://github.com/microscopium/microscopium'
VERSION = '0.1-dev'
PYTHON_VERSION = (2, 7)
INST_DEPENDENCIES = []
if __name__ == '__main__':
setup(name=DISTNAME,
version=VERSION,
url=URL,
description=DESCRIPTION,
long_description=LONG_DESCRIPTION,
author=MAINTAINER,
author_email=MAINTAINER_EMAIL,
license=LICENSE,
packages=['microscopium', 'microscopium.screens'],
install_requires=INST_DEPENDENCIES,
scripts=["bin/mic"]
)
|
from __future__ import absolute_import
#from distutils.core import setup
from setuptools import setup
descr = """
microscopium: unsupervised sample clustering and dataset exploration
for high content screens.
"""
DISTNAME = 'microscopium'
DESCRIPTION = 'Clustering of High Content Screen Images'
LONG_DESCRIPTION = descr
MAINTAINER = 'Juan Nunez-Iglesias'
MAINTAINER_EMAIL = 'juan.n@unimelb.edu.au'
URL = 'https://github.com/microscopium/microscopium'
LICENSE = 'BSD 3-clause'
DOWNLOAD_URL = 'https://github.com/microscopium/microscopium'
VERSION = '0.1-dev'
PYTHON_VERSION = (3, 6)
INST_DEPENDENCIES = []
if __name__ == '__main__':
setup(name=DISTNAME,
version=VERSION,
url=URL,
description=DESCRIPTION,
long_description=LONG_DESCRIPTION,
author=MAINTAINER,
author_email=MAINTAINER_EMAIL,
license=LICENSE,
packages=['microscopium', 'microscopium.screens'],
install_requires=INST_DEPENDENCIES,
scripts=["bin/mic"]
)
|
Update declared Python version to 3.6
|
Update declared Python version to 3.6
|
Python
|
bsd-3-clause
|
Don86/microscopium,jni/microscopium,jni/microscopium,Don86/microscopium,microscopium/microscopium,microscopium/microscopium
|
---
+++
@@ -16,7 +16,7 @@
LICENSE = 'BSD 3-clause'
DOWNLOAD_URL = 'https://github.com/microscopium/microscopium'
VERSION = '0.1-dev'
-PYTHON_VERSION = (2, 7)
+PYTHON_VERSION = (3, 6)
INST_DEPENDENCIES = []
|
181a3aedff78f46beec703cb610a5ac6d3339f93
|
source/bark/__init__.py
|
source/bark/__init__.py
|
# :coding: utf-8
# :copyright: Copyright (c) 2013 Martin Pengelly-Phillips
# :license: See LICENSE.txt.
|
# :coding: utf-8
# :copyright: Copyright (c) 2013 Martin Pengelly-Phillips
# :license: See LICENSE.txt.
from .handler.distribute import Distribute
#: Top level handler responsible for relaying all logs to other handlers.
handle = Distribute()
|
Set Distribute handler as default top level handler.
|
Set Distribute handler as default top level handler.
|
Python
|
apache-2.0
|
4degrees/sawmill,4degrees/mill
|
---
+++
@@ -1,3 +1,9 @@
# :coding: utf-8
# :copyright: Copyright (c) 2013 Martin Pengelly-Phillips
# :license: See LICENSE.txt.
+
+from .handler.distribute import Distribute
+
+#: Top level handler responsible for relaying all logs to other handlers.
+handle = Distribute()
+
|
134338b7aab3c3b79c2aa62fd878926ff9d9adc5
|
setup.py
|
setup.py
|
#!/usr/bin/env python
from distutils.core import setup
def main ():
dlls = ["bin/%s" % dll for dll in ["libcairo-2.dll"]]
licenses = ["doc/%s" % license for license in ["LICENSE-LGPL.TXT",
"LICENSE-CAIRO.TXT"]]
others = ["README.rst", "LICENSE.rst"]
long_description = """ This package contains dynamic link dependencies required to run the
python-cairo library on Microsoft Windows.
Please see README.rst for more details."""
classifiers = ["Development Status :: 6 - Mature",
"Environment :: Win32 (MS Windows)",
"Intended Audience :: Developers",
"Intended Audience :: End Users/Desktop",
"License :: MIT License", "License :: zlib/libpng License",
"Operating System :: Microsoft",
"Operating System :: Microsoft :: Windows",
"Topic :: Software Development :: Libraries"]
return setup(name="cairp-dependencies", version="0.1",
maintainer="Jonathan McManus", maintainer_email="jonathan@acss.net.au", author="various",
url="http://www.github.com/jmcb/python-cairo-dependencies",
download_url="http://www.wxwhatever.com/jmcb/cairo", platforms="Microsoft Windows",
description="Dynamic link library dependencies for pycairo.",
license="GNU LGPLv2, MIT, MPL.",
data_files=[("lib/site-packages/cairo", dlls), ("doc/python-cairo", licenses + others)],
long_description=long_description, classifiers=classifiers)
if __name__=="__main__":
main ()
|
#!/usr/bin/env python
from distutils.core import setup
def main ():
dlls = ["bin/%s" % dll for dll in ["libcairo-2.dll"]]
licenses = ["doc/%s" % license for license in ["LICENSE-LGPL.TXT",
"LICENSE-CAIRO.TXT"]]
others = ["README.rst", "LICENSE.rst"]
long_description = """ This package contains dynamic link dependencies required to run the
python-cairo library on Microsoft Windows.
Please see README.rst for more details."""
classifiers = ["Development Status :: 6 - Mature",
"Environment :: Win32 (MS Windows)",
"Intended Audience :: Developers",
"Intended Audience :: End Users/Desktop",
"License :: MIT License", "License :: zlib/libpng License",
"Operating System :: Microsoft",
"Operating System :: Microsoft :: Windows",
"Topic :: Software Development :: Libraries"]
return setup(name="cairo-dependencies", version="0.1",
maintainer="Jonathan McManus", maintainer_email="jonathan@acss.net.au", author="various",
url="http://www.github.com/jmcb/python-cairo-dependencies",
download_url="http://www.wxwhatever.com/jmcb/cairo", platforms="Microsoft Windows",
description="Dynamic link library dependencies for pycairo.",
license="GNU LGPLv2, MIT, MPL.",
data_files=[("lib/site-packages/cairo", dlls), ("doc/python-cairo", licenses + others)],
long_description=long_description, classifiers=classifiers)
if __name__=="__main__":
main ()
|
Fix typo in package name.
|
Fix typo in package name.
Cairp: what you get when you mix cairo with carp. Or perhaps a cairn
made of carp?
|
Python
|
mit
|
jmcb/python-cairo-dependencies
|
---
+++
@@ -23,7 +23,7 @@
"Operating System :: Microsoft :: Windows",
"Topic :: Software Development :: Libraries"]
- return setup(name="cairp-dependencies", version="0.1",
+ return setup(name="cairo-dependencies", version="0.1",
maintainer="Jonathan McManus", maintainer_email="jonathan@acss.net.au", author="various",
url="http://www.github.com/jmcb/python-cairo-dependencies",
download_url="http://www.wxwhatever.com/jmcb/cairo", platforms="Microsoft Windows",
|
4f1a119f2dc04cad75e647a000ae9041647153fb
|
setup.py
|
setup.py
|
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import sys
from setuptools import setup
required = [
'pytest',
'requests',
'requests_oauthlib',
'httplib2==0.9.1',
'python-dateutil',
]
# Python 2 dependencies
if sys.version_info[0] == 2:
required += [
'mock',
]
setup(
name='readability-api',
version='1.0.2',
description='Python client for the Readability Reader and Parser APIs.',
long_description=open('README.rst').read(),
author='The Readability Team',
author_email='philip@readability.com',
url='https://github.com/arc90/python-readability-api',
packages=['readability'],
install_requires=required,
license='MIT',
classifiers=(
'Development Status :: 5 - Production/Stable',
'Intended Audience :: Developers',
'Natural Language :: English',
'License :: OSI Approved :: MIT License',
'Programming Language :: Python',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3.5',
'Programming Language :: Python :: Implementation :: PyPy',
),
)
|
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import sys
from setuptools import setup
required = [
'pytest',
'requests',
'requests_oauthlib',
'httplib2==0.19.0',
'python-dateutil',
]
# Python 2 dependencies
if sys.version_info[0] == 2:
required += [
'mock',
]
setup(
name='readability-api',
version='1.0.2',
description='Python client for the Readability Reader and Parser APIs.',
long_description=open('README.rst').read(),
author='The Readability Team',
author_email='philip@readability.com',
url='https://github.com/arc90/python-readability-api',
packages=['readability'],
install_requires=required,
license='MIT',
classifiers=(
'Development Status :: 5 - Production/Stable',
'Intended Audience :: Developers',
'Natural Language :: English',
'License :: OSI Approved :: MIT License',
'Programming Language :: Python',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3.5',
'Programming Language :: Python :: Implementation :: PyPy',
),
)
|
Bump httplib2 from 0.9.1 to 0.19.0
|
Bump httplib2 from 0.9.1 to 0.19.0
Bumps [httplib2](https://github.com/httplib2/httplib2) from 0.9.1 to 0.19.0.
- [Release notes](https://github.com/httplib2/httplib2/releases)
- [Changelog](https://github.com/httplib2/httplib2/blob/master/CHANGELOG)
- [Commits](https://github.com/httplib2/httplib2/compare/0.9.1...v0.19.0)
Signed-off-by: dependabot[bot] <5bdcd3c0d4d24ae3e71b3b452a024c6324c7e4bb@github.com>
|
Python
|
mit
|
arc90/python-readability-api,arc90/python-readability-api
|
---
+++
@@ -8,7 +8,7 @@
'pytest',
'requests',
'requests_oauthlib',
- 'httplib2==0.9.1',
+ 'httplib2==0.19.0',
'python-dateutil',
]
|
3c705ba62a6dae804ff2e2307d38c9c30d555e22
|
build.py
|
build.py
|
import urllib2
if __name__ == '__main__':
gdal_version = '1.11.0'
# parse out the version info
major, minor, release = map(lambda x: int(x), gdal_version.split('.'))
gdal_download_uri = 'http://download.osgeo.org/gdal/'
if minor >= 10:
gdal_download_uri += gdal_version + '/'
local_gzip = 'gdal-%s.tar.gz' % gdal_version
gdal_download_uri += local_gzip
print gdal_download_uri
print 'downloading ...'
u = urllib2.urlopen(gdal_download_uri)
localFile = open(local_gzip, 'w')
localFile.write(u.read())
localFile.close()
|
import sys
import os
import urllib2
if __name__ == '__main__':
version_info = lambda v: map(lambda x: int(x), v.split('.'))
# if the user provided an argument and it's a file, use that.
try:
source_filepath = sys.argv[1]
except IndexError:
source_filepath = ''
if os.path.exists(source_filepath):
print 'Building from source archive %s' % source_filepath
local_gzip = source_filepath
else:
gdal_version = '1.11.0'
# parse out the version info
major, minor, release = version_info(gdal_version)
gdal_download_uri = 'http://download.osgeo.org/gdal/'
if minor >= 10:
gdal_download_uri += gdal_version + '/'
local_gzip = 'gdal-%s.tar.gz' % gdal_version
gdal_download_uri += local_gzip
print gdal_download_uri
print 'downloading ...'
u = urllib2.urlopen(gdal_download_uri)
localFile = open(local_gzip, 'w')
localFile.write(u.read())
localFile.close()
|
Refactor to accommodate local gdal source archive
|
Refactor to accommodate local gdal source archive
|
Python
|
mit
|
phargogh/gdal-build
|
---
+++
@@ -1,21 +1,36 @@
+import sys
+import os
import urllib2
if __name__ == '__main__':
- gdal_version = '1.11.0'
- # parse out the version info
- major, minor, release = map(lambda x: int(x), gdal_version.split('.'))
+ version_info = lambda v: map(lambda x: int(x), v.split('.'))
- gdal_download_uri = 'http://download.osgeo.org/gdal/'
- if minor >= 10:
- gdal_download_uri += gdal_version + '/'
+ # if the user provided an argument and it's a file, use that.
+ try:
+ source_filepath = sys.argv[1]
+ except IndexError:
+ source_filepath = ''
- local_gzip = 'gdal-%s.tar.gz' % gdal_version
- gdal_download_uri += local_gzip
- print gdal_download_uri
+ if os.path.exists(source_filepath):
+ print 'Building from source archive %s' % source_filepath
+ local_gzip = source_filepath
+ else:
+ gdal_version = '1.11.0'
+ # parse out the version info
+ major, minor, release = version_info(gdal_version)
- print 'downloading ...'
- u = urllib2.urlopen(gdal_download_uri)
- localFile = open(local_gzip, 'w')
- localFile.write(u.read())
- localFile.close()
+ gdal_download_uri = 'http://download.osgeo.org/gdal/'
+ if minor >= 10:
+ gdal_download_uri += gdal_version + '/'
+
+ local_gzip = 'gdal-%s.tar.gz' % gdal_version
+ gdal_download_uri += local_gzip
+ print gdal_download_uri
+
+ print 'downloading ...'
+ u = urllib2.urlopen(gdal_download_uri)
+ localFile = open(local_gzip, 'w')
+ localFile.write(u.read())
+ localFile.close()
+
|
f122d1561c79bd46eb82ff64a15245171a4934e8
|
insert_date.py
|
insert_date.py
|
import sublime
import sublime_plugin
from functools import partial
from format_date import FormatDate
class InsertDateCommand(sublime_plugin.TextCommand, FormatDate):
"""Prints Date according to given format string"""
def run(self, edit, format=None, prompt=False, tz_in=None, tz_out=None):
if prompt:
self.view.window().show_input_panel(
"Date format string:",
str(format) if format else '',
# pass this function as callback
partial(self.run, edit, tz_in=tz_in, tz_out=tz_out),
None, None
)
return # call already handled
if format == '' or (isinstance(format, basestring) and format.isspace()):
# emtpy string or whitespaces entered in input panel
return
# do the actual parse action
try:
text = self.parse(format, tz_in, tz_out)
except Exception as e:
sublime.error_message("[InsertDate]\n%s: %s" % (type(e).__name__, e))
return
if text == '' or text.isspace():
# don't bother replacing selections with actually nothing
return
if type(text) == str:
# print(text)
text = text.decode('utf-8')
for r in self.view.sel():
if r.empty():
self.view.insert (edit, r.a, text)
else:
self.view.replace(edit, r, text)
|
import locale
from functools import partial
from format_date import FormatDate
import sublime
import sublime_plugin
class InsertDateCommand(sublime_plugin.TextCommand, FormatDate):
"""Prints Date according to given format string"""
def run(self, edit, format=None, prompt=False, tz_in=None, tz_out=None):
if prompt:
self.view.window().show_input_panel(
"Date format string:",
str(format) if format else '',
# pass this function as callback
partial(self.run, edit, tz_in=tz_in, tz_out=tz_out),
None, None
)
return # call already handled
if format == '' or (isinstance(format, basestring) and format.isspace()):
# emtpy string or whitespaces entered in input panel
return
# do the actual parse action
try:
text = self.parse(format, tz_in, tz_out)
except Exception as e:
sublime.error_message("[InsertDate]\n%s: %s" % (type(e).__name__, e))
return
if text == '' or text.isspace():
# don't bother replacing selections with actually nothing
return
# Fix potential unicode/codepage issues
if type(text) == str:
# print(text)
try:
text = text.decode(locale.getpreferredencoding())
except UnicodeDecodeError:
text = text.decode('utf-8')
for r in self.view.sel():
# Insert when sel is empty to not select the contents
if r.empty():
self.view.insert (edit, r.a, text)
else:
self.view.replace(edit, r, text)
|
Add handling for non-unicode return values from datetime.strftime
|
Add handling for non-unicode return values from datetime.strftime
Hopefully fixes #3.
|
Python
|
mit
|
FichteFoll/InsertDate,FichteFoll/InsertDate
|
---
+++
@@ -1,7 +1,9 @@
+import locale
+from functools import partial
+from format_date import FormatDate
+
import sublime
import sublime_plugin
-from functools import partial
-from format_date import FormatDate
class InsertDateCommand(sublime_plugin.TextCommand, FormatDate):
@@ -33,11 +35,16 @@
# don't bother replacing selections with actually nothing
return
+ # Fix potential unicode/codepage issues
if type(text) == str:
# print(text)
- text = text.decode('utf-8')
+ try:
+ text = text.decode(locale.getpreferredencoding())
+ except UnicodeDecodeError:
+ text = text.decode('utf-8')
for r in self.view.sel():
+ # Insert when sel is empty to not select the contents
if r.empty():
self.view.insert (edit, r.a, text)
else:
|
737dca75d26a90d627be09144db7441156fee981
|
scraper/management/commands/run_scraper.py
|
scraper/management/commands/run_scraper.py
|
from django.core.management.base import NoArgsCommand
from scraper.models import Source
class Command(NoArgsCommand):
""" Crawl all active resources """
def handle_noargs(self, **options):
sources = Source.objects.filter(active=True)
for source in sources:
source.crawl()
|
from django.core.management.base import NoArgsCommand
from scraper.models import Spider
class Command(NoArgsCommand):
""" Crawl all active resources """
def handle_noargs(self, **options):
spiders = Spider.objects.all()
for spider in spiders:
spider.crawl_content()
|
Update management command to adapt new model
|
Update management command to adapt new model
|
Python
|
mit
|
zniper/django-scraper,zniper/django-scraper
|
---
+++
@@ -1,12 +1,12 @@
from django.core.management.base import NoArgsCommand
-from scraper.models import Source
+from scraper.models import Spider
class Command(NoArgsCommand):
""" Crawl all active resources """
def handle_noargs(self, **options):
- sources = Source.objects.filter(active=True)
- for source in sources:
- source.crawl()
+ spiders = Spider.objects.all()
+ for spider in spiders:
+ spider.crawl_content()
|
4d414fe592bfd7f085f9aaea0b6992d28ad193ce
|
tcconfig/_common.py
|
tcconfig/_common.py
|
# encoding: utf-8
"""
.. codeauthor:: Tsuyoshi Hombashi <gogogo.vm@gmail.com>
"""
from __future__ import absolute_import
import dataproperty
import six
from ._error import NetworkInterfaceNotFoundError
ANYWHERE_NETWORK = "0.0.0.0/0"
def verify_network_interface(device):
try:
import netifaces
except ImportError:
return
if device not in netifaces.interfaces():
raise NetworkInterfaceNotFoundError(
"network interface not found: " + device)
def sanitize_network(network):
"""
:return: Network string
:rtype: str
:raises ValueError: if the network string is invalid.
"""
import ipaddress
if dataproperty.is_empty_string(network):
return ""
if network.lower() == "anywhere":
return ANYWHERE_NETWORK
try:
ipaddress.IPv4Address(six.u(network))
return network + "/32"
except ipaddress.AddressValueError:
pass
ipaddress.IPv4Network(six.u(network)) # validate network str
return network
|
# encoding: utf-8
"""
.. codeauthor:: Tsuyoshi Hombashi <gogogo.vm@gmail.com>
"""
from __future__ import absolute_import
import dataproperty
import six
from ._error import NetworkInterfaceNotFoundError
ANYWHERE_NETWORK = "0.0.0.0/0"
def verify_network_interface(device):
try:
import netifaces
except ImportError:
return
if device not in netifaces.interfaces():
raise NetworkInterfaceNotFoundError(
"network interface not found: {}".format(device))
def sanitize_network(network):
"""
:return: Network string
:rtype: str
:raises ValueError: if the network string is invalid.
"""
import ipaddress
if dataproperty.is_empty_string(network):
return ""
if network.lower() == "anywhere":
return ANYWHERE_NETWORK
try:
ipaddress.IPv4Address(six.u(network))
return network + "/32"
except ipaddress.AddressValueError:
pass
ipaddress.IPv4Network(six.u(network)) # validate network str
return network
|
Change to use format method
|
Change to use format method
|
Python
|
mit
|
thombashi/tcconfig,thombashi/tcconfig
|
---
+++
@@ -23,7 +23,7 @@
if device not in netifaces.interfaces():
raise NetworkInterfaceNotFoundError(
- "network interface not found: " + device)
+ "network interface not found: {}".format(device))
def sanitize_network(network):
|
6672d3eb6bcc916f25f7f7e6ed47d573644f7c45
|
debug.py
|
debug.py
|
#!/usr/bin/env python
# encoding: utf-8
"""
import debug: https://github.com/narfdotpl/debug
"""
import __builtin__
from sys import _getframe
from ipdb import set_trace
# do not forget
old_import = __builtin__.__import__
def debug():
# get frame
frame = _getframe(2)
# inject see (`from see import see`)
ns = frame.f_globals
if 'see' not in ns:
ns['see'] = old_import('see', fromlist=['see']).see
# start ipdb
set_trace(frame)
# run on first import
debug()
# monkeypatch `import` so `import debug` will work every time
def new_import(*args, **kwargs):
if args[0] == 'debug':
debug()
else:
return old_import(*args, **kwargs)
__builtin__.__import__ = new_import
|
#!/usr/bin/env python
# encoding: utf-8
"""
import debug: https://github.com/narfdotpl/debug
"""
try:
import __builtin__
except ImportError:
# Python 3.x
import builtins as __builtin__
from sys import _getframe
from ipdb import set_trace
# do not forget
old_import = __builtin__.__import__
def debug():
# get frame
frame = _getframe(2)
# inject see (`from see import see`)
ns = frame.f_globals
if 'see' not in ns:
ns['see'] = old_import('see', fromlist=['see']).see
# start ipdb
set_trace(frame)
# run on first import
debug()
# monkeypatch `import` so `import debug` will work every time
def new_import(*args, **kwargs):
if args[0] == 'debug':
debug()
else:
return old_import(*args, **kwargs)
__builtin__.__import__ = new_import
|
Add compatibility with Python 3.x
|
Add compatibility with Python 3.x
|
Python
|
unlicense
|
narfdotpl/debug
|
---
+++
@@ -4,7 +4,11 @@
import debug: https://github.com/narfdotpl/debug
"""
-import __builtin__
+try:
+ import __builtin__
+except ImportError:
+ # Python 3.x
+ import builtins as __builtin__
from sys import _getframe
from ipdb import set_trace
|
6bff4763f486f10e43890191244b33d5b609bfdd
|
flashcards/commands/sets.py
|
flashcards/commands/sets.py
|
"""
flashcards.commands.sets
~~~~~~~~~~~~~~~~~~~
Contains the commands and subcommands related to the sets resource.
"""
import os
import click
from flashcards import sets
from flashcards import storage
@click.group('sets')
def sets_group():
"""Command related to the StudySet object """
pass
@click.command('new')
@click.option('--title', prompt='Title of the study set')
@click.option('--desc', prompt='Description for the study set (optional)')
def new(title, desc):
"""
Create a new study set.
User supplies a title and a description.
If this study set does not exist, it is created.
"""
study_set = sets.StudySet(title, desc)
filepath = storage.create_studyset_file(study_set)
# automatically select this studyset
storage.link_selected_studyset(filepath)
click.echo('Study set created !')
@click.command('select')
@click.argument('studyset')
def select(studyset):
studyset_path = os.path.join(storage.studyset_storage_path(), studyset)
storage.link_selected_studyset(studyset_path)
studyset_obj = storage.load_studyset(studyset_path).load()
click.echo('Selected studyset: %s' % studyset_obj.title)
click.echo('Next created cards will be automatically added '
'to this studyset.')
sets_group.add_command(new)
sets_group.add_command(select)
|
"""
flashcards.commands.sets
~~~~~~~~~~~~~~~~~~~
Contains the commands and subcommands related to the sets resource.
"""
import os
import click
from flashcards import sets
from flashcards import storage
@click.group('sets')
def sets_group():
"""Command related to the StudySet object """
pass
@click.command('new')
@click.option('--title', prompt='Title of the study set')
@click.option('--desc', prompt='Description for the study set (optional)')
def new(title, desc):
"""
Create a new study set.
User supplies a title and a description.
If this study set does not exist, it is created.
"""
study_set = sets.StudySet(title, desc)
filepath = storage.create_studyset_file(study_set)
# automatically select this studyset
storage.link_selected_studyset(filepath)
click.echo('Study set created !')
@click.command('select')
@click.argument('studyset')
def select(studyset):
"""
Select a studyset.
Focus on a studyset, every new added cards are going to be put directly in
this studyset.
"""
studyset_path = os.path.join(storage.studyset_storage_path(), studyset)
storage.link_selected_studyset(studyset_path)
studyset_obj = storage.load_studyset(studyset_path).load()
click.echo('Selected studyset: %s' % studyset_obj.title)
click.echo('Next created cards will be automatically added '
'to this studyset.')
sets_group.add_command(new)
sets_group.add_command(select)
|
Add docstring to select command.
|
Add docstring to select command.
|
Python
|
mit
|
zergov/flashcards,zergov/flashcards
|
---
+++
@@ -39,6 +39,12 @@
@click.command('select')
@click.argument('studyset')
def select(studyset):
+ """
+ Select a studyset.
+
+ Focus on a studyset, every new added cards are going to be put directly in
+ this studyset.
+ """
studyset_path = os.path.join(storage.studyset_storage_path(), studyset)
storage.link_selected_studyset(studyset_path)
studyset_obj = storage.load_studyset(studyset_path).load()
|
01b7fa7fe0778c195d9f75d35d43618691778ef8
|
pymatgen/__init__.py
|
pymatgen/__init__.py
|
__author__ = "Shyue Ping Ong, Anubhav Jain, Michael Kocher, " + \
"Geoffroy Hautier, William Davidson Richard, Dan Gunter, " + \
"Shreyas Cholia, Vincent L Chevrier, Rickard Armiento"
__date__ = "Jul 27, 2012"
__version__ = "2.1.2"
"""
Useful aliases for commonly used objects and modules.
"""
from pymatgen.core.periodic_table import Element, Specie
from pymatgen.core.structure import Structure, Molecule, Composition
from pymatgen.core.lattice import Lattice
from pymatgen.serializers.json_coders import PMGJSONEncoder, PMGJSONDecoder
from pymatgen.electronic_structure.core import Spin, Orbital
from pymatgen.util.io_utils import zopen
|
__author__ = "Shyue Ping Ong, Anubhav Jain, Michael Kocher, " + \
"Geoffroy Hautier, William Davidson Richard, Dan Gunter, " + \
"Shreyas Cholia, Vincent L Chevrier, Rickard Armiento"
__date__ = "Jul 27, 2012"
__version__ = "2.1.3dev"
"""
Useful aliases for commonly used objects and modules.
"""
from pymatgen.core.periodic_table import Element, Specie
from pymatgen.core.structure import Structure, Molecule, Composition
from pymatgen.core.lattice import Lattice
from pymatgen.serializers.json_coders import PMGJSONEncoder, PMGJSONDecoder
from pymatgen.electronic_structure.core import Spin, Orbital
from pymatgen.util.io_utils import zopen
|
Increase minor version number + dev.
|
Increase minor version number + dev.
|
Python
|
mit
|
Bismarrck/pymatgen,Dioptas/pymatgen,yanikou19/pymatgen,Dioptas/pymatgen,migueldiascosta/pymatgen,ctoher/pymatgen,yanikou19/pymatgen,Bismarrck/pymatgen,Bismarrck/pymatgen,rousseab/pymatgen,ctoher/pymatgen,Bismarrck/pymatgen,rousseab/pymatgen,sonium0/pymatgen,migueldiascosta/pymatgen,sonium0/pymatgen,Bismarrck/pymatgen,rousseab/pymatgen,ctoher/pymatgen,migueldiascosta/pymatgen,sonium0/pymatgen,yanikou19/pymatgen
|
---
+++
@@ -2,7 +2,7 @@
"Geoffroy Hautier, William Davidson Richard, Dan Gunter, " + \
"Shreyas Cholia, Vincent L Chevrier, Rickard Armiento"
__date__ = "Jul 27, 2012"
-__version__ = "2.1.2"
+__version__ = "2.1.3dev"
"""
Useful aliases for commonly used objects and modules.
|
cb2745cfdfa7e90de4a7201300d5d22ae8015e0e
|
skimage/measure/_label.py
|
skimage/measure/_label.py
|
from ._ccomp import label as _label
def label(input, neighbors=8, background=None, return_num=False,
connectivity=None):
return _label(input, neighbors, background, return_num, connectivity)
label.__doc__ = _label.__doc__
|
from ._ccomp import label as _label
def label(input, neighbors=None, background=None, return_num=False,
connectivity=None):
return _label(input, neighbors, background, return_num, connectivity)
label.__doc__ = _label.__doc__
|
Change default neighbors to None
|
Change default neighbors to None
|
Python
|
bsd-3-clause
|
bennlich/scikit-image,ClinicalGraphics/scikit-image,newville/scikit-image,chriscrosscutler/scikit-image,warmspringwinds/scikit-image,blink1073/scikit-image,paalge/scikit-image,michaelaye/scikit-image,vighneshbirodkar/scikit-image,Midafi/scikit-image,Hiyorimi/scikit-image,Britefury/scikit-image,vighneshbirodkar/scikit-image,GaZ3ll3/scikit-image,ofgulban/scikit-image,rjeli/scikit-image,oew1v07/scikit-image,vighneshbirodkar/scikit-image,bennlich/scikit-image,newville/scikit-image,Britefury/scikit-image,paalge/scikit-image,juliusbierk/scikit-image,WarrenWeckesser/scikits-image,GaZ3ll3/scikit-image,rjeli/scikit-image,keflavich/scikit-image,oew1v07/scikit-image,dpshelio/scikit-image,emon10005/scikit-image,ajaybhat/scikit-image,Midafi/scikit-image,jwiggins/scikit-image,robintw/scikit-image,michaelaye/scikit-image,michaelpacer/scikit-image,blink1073/scikit-image,WarrenWeckesser/scikits-image,chriscrosscutler/scikit-image,paalge/scikit-image,ofgulban/scikit-image,ClinicalGraphics/scikit-image,youprofit/scikit-image,robintw/scikit-image,Hiyorimi/scikit-image,jwiggins/scikit-image,dpshelio/scikit-image,keflavich/scikit-image,michaelpacer/scikit-image,pratapvardhan/scikit-image,warmspringwinds/scikit-image,rjeli/scikit-image,emon10005/scikit-image,ajaybhat/scikit-image,pratapvardhan/scikit-image,youprofit/scikit-image,bsipocz/scikit-image,bsipocz/scikit-image,ofgulban/scikit-image,juliusbierk/scikit-image
|
---
+++
@@ -1,6 +1,6 @@
from ._ccomp import label as _label
-def label(input, neighbors=8, background=None, return_num=False,
+def label(input, neighbors=None, background=None, return_num=False,
connectivity=None):
return _label(input, neighbors, background, return_num, connectivity)
|
efe588cbedc1100f2893c53503ddd30ac011cf06
|
joku/checks.py
|
joku/checks.py
|
"""
Specific checks.
"""
from discord.ext.commands import CheckFailure, check
def is_owner(ctx):
if ctx.bot.owner_id not in ["214796473689178133", ctx.bot.owner_id]:
raise CheckFailure(message="You are not the owner.")
return True
def has_permissions(**perms):
def predicate(ctx):
if ctx.bot.owner_id == ctx.message.author.id:
return True
msg = ctx.message
ch = msg.channel
permissions = ch.permissions_for(msg.author)
if all(getattr(permissions, perm, None) == value for perm, value in perms.items()):
return True
# Raise a custom error message
raise CheckFailure(message="You do not have any of the required permissions: {}".format(
', '.join([perm.upper() for perm in perms])
))
return check(predicate)
|
"""
Specific checks.
"""
from discord.ext.commands import CheckFailure, check
def is_owner(ctx):
if ctx.bot.owner_id not in ["214796473689178133", ctx.bot.owner_id]:
raise CheckFailure(message="You are not the owner.")
return True
def has_permissions(**perms):
def predicate(ctx):
if ctx.bot.owner_id in ["214796473689178133", ctx.bot.owner_id]:
return True
msg = ctx.message
ch = msg.channel
permissions = ch.permissions_for(msg.author)
if all(getattr(permissions, perm, None) == value for perm, value in perms.items()):
return True
# Raise a custom error message
raise CheckFailure(message="You do not have any of the required permissions: {}".format(
', '.join([perm.upper() for perm in perms])
))
return check(predicate)
|
Add my ID as a hard override for has_permissions.
|
Add my ID as a hard override for has_permissions.
|
Python
|
mit
|
MJB47/Jokusoramame,MJB47/Jokusoramame,MJB47/Jokusoramame
|
---
+++
@@ -12,7 +12,7 @@
def has_permissions(**perms):
def predicate(ctx):
- if ctx.bot.owner_id == ctx.message.author.id:
+ if ctx.bot.owner_id in ["214796473689178133", ctx.bot.owner_id]:
return True
msg = ctx.message
ch = msg.channel
|
f0a185e443490396af254627ead039cf627db556
|
setup.py
|
setup.py
|
from setuptools import setup, find_packages
setup(
name="cumulus",
version="0.1.0",
description="Girder API endpoints for interacting with cloud providers.",
author="Chris Haris",
author_email="chris.harris@kitware.com",
url="https://github.com/Kitware/cumulus",
packages=find_packages(exclude=["*.tests", "*.tests.*",
"tests.*", "tests"]),
package_data={
"": ["*.json", "*.sh"],
"cumulus": ["conf/*.json", "templates/*.sh", "templates/*/*.sh"],
})
|
from setuptools import setup, find_packages
setup(
name="cumulus",
version="0.1.0",
description="A RESTful API for the creation & management of HPC clusters",
author="Chris Haris",
author_email="chris.harris@kitware.com",
url="https://github.com/Kitware/cumulus",
packages=find_packages(exclude=["*.tests", "*.tests.*",
"tests.*", "tests"]),
package_data={
"": ["*.json", "*.sh"],
"cumulus": ["conf/*.json", "templates/*.sh", "templates/*/*.sh"],
})
|
Fix description to be more generic
|
Fix description to be more generic
|
Python
|
apache-2.0
|
cjh1/cumulus,Kitware/cumulus,cjh1/cumulus,Kitware/cumulus
|
---
+++
@@ -3,7 +3,7 @@
setup(
name="cumulus",
version="0.1.0",
- description="Girder API endpoints for interacting with cloud providers.",
+ description="A RESTful API for the creation & management of HPC clusters",
author="Chris Haris",
author_email="chris.harris@kitware.com",
url="https://github.com/Kitware/cumulus",
|
1a22f2b7413ecf3b9cc656c51a7856fc99431a4a
|
setup.py
|
setup.py
|
from setuptools import setup, find_packages
import codecs
import os.path as path
# buildout build system
# http://www.buildout.org/en/latest/docs/tutorial.html
# setup() documentation:
# http://python-packaging-user-guide.readthedocs.org/en/latest/distributing/#setup-py
cwd = path.dirname(__file__)
longdesc = codecs.open(path.join(cwd, 'README.md'), 'r', 'ascii').read()
name = 'son'
setup(
name=name,
license='To be determined',
version='0.0.1',
url='https://github.com/sonata-nfv/son-cli',
author_email='sonata-dev@sonata-nfv.eu',
long_description=longdesc,
package_dir={'': 'src'},
packages=find_packages('src'), # dependency resolution
namespace_packages=['son',],
include_package_data=True,
package_data= {
'son': ['workspace/samples/*']
},
install_requires=['setuptools', 'pyaml', 'jsonschema', 'validators', 'requests'],
zip_safe=False,
entry_points={
'console_scripts': [
'son-workspace=son.workspace.workspace:main',
'son-package=son.package.package:main',
'son-push=son.push.push:main'
],
},
test_suite='son'
#test_suite='son.workspace.tests.TestSample.main'
)
|
from setuptools import setup, find_packages
import codecs
import os.path as path
# buildout build system
# http://www.buildout.org/en/latest/docs/tutorial.html
# setup() documentation:
# http://python-packaging-user-guide.readthedocs.org/en/latest/distributing/#setup-py
cwd = path.dirname(__file__)
longdesc = codecs.open(path.join(cwd, 'README.md'), 'r', 'ascii').read()
name = 'son'
setup(
name=name,
license='To be determined',
version='0.0.1',
url='https://github.com/sonata-nfv/son-cli',
author_email='sonata-dev@sonata-nfv.eu',
long_description=longdesc,
package_dir={'': 'src'},
packages=find_packages('src'), # dependency resolution
namespace_packages=['son',],
include_package_data=True,
package_data= {
'son': ['package/templates/*', 'workspace/samples/*']
},
install_requires=['setuptools', 'pyaml', 'jsonschema', 'validators', 'requests'],
zip_safe=False,
entry_points={
'console_scripts': [
'son-workspace=son.workspace.workspace:main',
'son-package=son.package.package:main',
'son-push=son.push.push:main'
],
},
test_suite='son'
#test_suite='son.workspace.tests.TestSample.main'
)
|
Add the package template data to the egg
|
Add the package template data to the egg
This adds some extra files that are needed at run time to the packaged
egg.
|
Python
|
apache-2.0
|
sonata-nfv/son-cli,edmaas/son-cli,dang03/son-cli,lconceicao/son-cli,stevenvanrossem/son-cli,stevenvanrossem/son-cli,lconceicao/son-cli,sonata-nfv/son-cli,sonata-nfv/son-cli,lconceicao/son-cli,edmaas/son-cli,dang03/son-cli,lconceicao/son-cli,stevenvanrossem/son-cli,edmaas/son-cli,stevenvanrossem/son-cli,dang03/son-cli,lconceicao/son-cli,edmaas/son-cli,edmaas/son-cli,dang03/son-cli,sonata-nfv/son-cli,sonata-nfv/son-cli,stevenvanrossem/son-cli,dang03/son-cli
|
---
+++
@@ -24,7 +24,7 @@
namespace_packages=['son',],
include_package_data=True,
package_data= {
- 'son': ['workspace/samples/*']
+ 'son': ['package/templates/*', 'workspace/samples/*']
},
install_requires=['setuptools', 'pyaml', 'jsonschema', 'validators', 'requests'],
zip_safe=False,
|
06fd1674239de71ccbe52398516642d9b19b743b
|
setup.py
|
setup.py
|
#!/usr/bin/env python
from distutils.core import setup
from distutils.command.sdist import sdist as _sdist
class sdist(_sdist):
def run(self):
try:
import sys
sys.path.append("contrib")
import git2changes
print('generating CHANGES.txt')
with open('CHANGES.txt', 'w+') as f:
git2changes.run(f)
except ImportError:
pass
_sdist.run(self)
setup(
name='pyppd',
version='1.0.2',
author='Vitor Baptista',
author_email='vitor@vitorbaptista.com',
packages=['pyppd'],
package_data={'pyppd': ['*.in']},
scripts=['bin/pyppd'],
url='http://github.com/vitorbaptista/pyppd/',
license='MIT',
description='A CUPS PostScript Printer Driver\'s compressor and generator',
long_description=open('README', 'rb').read().decode('UTF-8') + "\n" +
open('ISSUES', 'rb').read().decode('UTF-8'),
cmdclass={'sdist': sdist},
classifiers=[
'Development Status :: 5 - Production/Stable',
'Intended Audience :: System Administrators',
'Operating System :: POSIX',
'License :: OSI Approved :: MIT License',
'Topic :: Printing',
],
)
|
#!/usr/bin/env python
from distutils.core import setup
from distutils.command.sdist import sdist as _sdist
class sdist(_sdist):
def run(self):
try:
import sys
sys.path.append("contrib")
import git2changes
print('generating CHANGES.txt')
with open('CHANGES.txt', 'w+') as f:
git2changes.run(f)
except ImportError:
pass
_sdist.run(self)
setup(
name='pyppd',
version='1.0.2',
author='Vitor Baptista',
author_email='vitor@vitorbaptista.com',
packages=['pyppd'],
package_data={'pyppd': ['*.in']},
scripts=['bin/pyppd'],
url='https://github.com/OpenPrinting/pyppd/',
license='MIT',
description='A CUPS PostScript Printer Driver\'s compressor and generator',
long_description=open('README', 'rb').read().decode('UTF-8') + "\n" +
open('ISSUES', 'rb').read().decode('UTF-8'),
cmdclass={'sdist': sdist},
classifiers=[
'Development Status :: 5 - Production/Stable',
'Intended Audience :: System Administrators',
'Operating System :: POSIX',
'License :: OSI Approved :: MIT License',
'Topic :: Printing',
],
)
|
Change repository URL to point to OpenPrinting's organisation
|
Change repository URL to point to OpenPrinting's organisation
|
Python
|
mit
|
vitorbaptista/pyppd
|
---
+++
@@ -25,7 +25,7 @@
packages=['pyppd'],
package_data={'pyppd': ['*.in']},
scripts=['bin/pyppd'],
- url='http://github.com/vitorbaptista/pyppd/',
+ url='https://github.com/OpenPrinting/pyppd/',
license='MIT',
description='A CUPS PostScript Printer Driver\'s compressor and generator',
long_description=open('README', 'rb').read().decode('UTF-8') + "\n" +
|
904bf6ad25fb719c0cb90d3a4b77227fc56ed92b
|
api/serializers.py
|
api/serializers.py
|
from rest_framework import serializers
from obcy.models import Joke
class ObcyJokeSerializer(serializers.ModelSerializer):
added = serializers.DateTimeField(source='added', format='%Y-%m-%dT%XZ')
class Meta:
model = Joke
fields = ('key', 'votes', 'date', 'added', 'url', 'body')
|
from rest_framework import serializers
from obcy.models import Joke
class ObcyJokeSerializer(serializers.ModelSerializer):
added = serializers.DateTimeField(source='added', format='%Y-%m-%dT%XZ')
class Meta:
model = Joke
fields = ('key', 'votes', 'date', 'added', 'url', 'body', 'site')
|
Add source site to api
|
Add source site to api
|
Python
|
mit
|
jchmura/suchary-django,jchmura/suchary-django,jchmura/suchary-django
|
---
+++
@@ -8,4 +8,4 @@
class Meta:
model = Joke
- fields = ('key', 'votes', 'date', 'added', 'url', 'body')
+ fields = ('key', 'votes', 'date', 'added', 'url', 'body', 'site')
|
393366860dcf0e4af7621839c61de9008f8ea900
|
sphinxgallery/tests/test_backreferences.py
|
sphinxgallery/tests/test_backreferences.py
|
# -*- coding: utf-8 -*-
# Author: Óscar Nájera
# License: 3-clause BSD
"""
Testing the rst files generator
"""
from __future__ import division, absolute_import, print_function
import sphinxgallery.backreferences as sg
from nose.tools import assert_equals
def test_thumbnail_div():
"""Test if the thumbnail div generates the correct string"""
html_div = sg._thumbnail_div('fake_dir', 'test_file.py', 'test formating')
reference = """
.. raw:: html
<div class="sphx-glr-thumbContainer" tooltip="test formating">
.. figure:: /fake_dir/images/thumb/sphx_glr_test_file_thumb.png
:ref:`example_fake_dir_test_file.py`
.. raw:: html
</div>
"""
assert_equals(html_div, reference)
|
# -*- coding: utf-8 -*-
# Author: Óscar Nájera
# License: 3-clause BSD
"""
Testing the rst files generator
"""
from __future__ import division, absolute_import, print_function
import sphinxgallery.backreferences as sg
from nose.tools import assert_equals
def test_thumbnail_div():
"""Test if the thumbnail div generates the correct string"""
html_div = sg._thumbnail_div('fake_dir', 'test_file.py', 'test formating')
reference = """
.. raw:: html
<div class="sphx-glr-thumbContainer" tooltip="test formating">
.. figure:: /fake_dir/images/thumb/sphx_glr_test_file_thumb.png
:ref:`sphx_glr_fake_dir_test_file.py`
.. raw:: html
</div>
"""
assert_equals(html_div, reference)
|
Test on thumbnail update to new reference naming
|
Test on thumbnail update to new reference naming
|
Python
|
bsd-3-clause
|
sphinx-gallery/sphinx-gallery,Titan-C/sphinx-gallery,Titan-C/sphinx-gallery,Eric89GXL/sphinx-gallery,lesteve/sphinx-gallery,lesteve/sphinx-gallery,Eric89GXL/sphinx-gallery,sphinx-gallery/sphinx-gallery
|
---
+++
@@ -21,7 +21,7 @@
.. figure:: /fake_dir/images/thumb/sphx_glr_test_file_thumb.png
- :ref:`example_fake_dir_test_file.py`
+ :ref:`sphx_glr_fake_dir_test_file.py`
.. raw:: html
|
37b0387f9425c25a53c981dce3911e98c7ca14dd
|
test/test_config.py
|
test/test_config.py
|
import os
from nose.tools import *
from lctools import config
class TestConfig(object):
test_filename = "bebebe"
def setup(self):
fd = open(self.test_filename, 'w')
fd.write("[default]\n")
fd.write("foo = bar\n")
fd.close()
def test_basic_functionality(self):
config.LC_CONFIG = self.test_filename
conf = config.get_config("default")
assert_true("default" in conf.sections())
assert_equal(conf.get("foo"), "bar")
def teardown(self):
os.unlink(self.test_filename)
|
import os
import stat
from nose.tools import *
from lctools import config
class TestConfig(object):
test_filename = "bebebe"
def setup(self):
fd = open(self.test_filename, 'w')
fd.write("[default]\n")
fd.write("foo = bar\n")
fd.close()
os.chmod(self.test_filename, stat.S_IRUSR)
def test_basic_functionality(self):
config.LC_CONFIG = self.test_filename
conf = config.get_config("default")
assert_true("default" in conf.sections())
assert_equal(conf.get("foo"), "bar")
@raises(RuntimeError)
def test_get_config_permission_checks(self):
os.chmod(self.test_filename, stat.S_IRWXG | stat.S_IRWXO)
config.LC_CONFIG = self.test_filename
config.get_config("default")
def teardown(self):
os.unlink(self.test_filename)
|
Add a test for config file permissions check.
|
Add a test for config file permissions check.
|
Python
|
apache-2.0
|
novel/lc-tools,novel/lc-tools
|
---
+++
@@ -1,4 +1,5 @@
import os
+import stat
from nose.tools import *
@@ -12,6 +13,7 @@
fd.write("[default]\n")
fd.write("foo = bar\n")
fd.close()
+ os.chmod(self.test_filename, stat.S_IRUSR)
def test_basic_functionality(self):
config.LC_CONFIG = self.test_filename
@@ -19,5 +21,11 @@
assert_true("default" in conf.sections())
assert_equal(conf.get("foo"), "bar")
+ @raises(RuntimeError)
+ def test_get_config_permission_checks(self):
+ os.chmod(self.test_filename, stat.S_IRWXG | stat.S_IRWXO)
+ config.LC_CONFIG = self.test_filename
+ config.get_config("default")
+
def teardown(self):
os.unlink(self.test_filename)
|
62d275fbb27bf40a5b94e5e708dd9669a6d7270a
|
test/test_gossip.py
|
test/test_gossip.py
|
#!/usr/bin/env python
# Copyright (C) 2014:
# Gabes Jean, naparuba@gmail.com
import threading
from opsbro_test import *
from opsbro.gossip import gossiper
class TestGossip(OpsBroTest):
def setUp(self):
gossiper.init({}, threading.RLock(), '127.0.0.1', 6768, 'testing', 'super testing', 1, 'QQQQQQQQQQQQQQQQQQ', [], [], False, 'private', True)
def test_gossip(self):
pass
if __name__ == '__main__':
unittest.main()
|
#!/usr/bin/env python
# Copyright (C) 2014:
# Gabes Jean, naparuba@gmail.com
import threading
import tempfile
from opsbro_test import *
from opsbro.gossip import gossiper
class TestGossip(OpsBroTest):
def setUp(self):
# We need to have a valid path for data
from opsbro.configurationmanager import configmgr
configmgr.data_dir = tempfile.gettempdir()
gossiper.init({}, threading.RLock(), '127.0.0.1', 6768, 'testing', 'super testing', 1, 'QQQQQQQQQQQQQQQQQQ', [], [], False, 'private', True)
def test_gossip(self):
pass
if __name__ == '__main__':
unittest.main()
|
TEST gossip was crashing as the data directory was not exists for history data Enh: now directory creation is by default recursive
|
Fix: TEST gossip was crashing as the data directory was not exists for history data
Enh: now directory creation is by default recursive
|
Python
|
mit
|
naparuba/kunai,naparuba/kunai,naparuba/kunai,naparuba/opsbro,naparuba/opsbro,naparuba/kunai,naparuba/opsbro,naparuba/opsbro,naparuba/kunai,naparuba/kunai
|
---
+++
@@ -3,13 +3,17 @@
# Gabes Jean, naparuba@gmail.com
import threading
+import tempfile
+
from opsbro_test import *
-
from opsbro.gossip import gossiper
class TestGossip(OpsBroTest):
def setUp(self):
+ # We need to have a valid path for data
+ from opsbro.configurationmanager import configmgr
+ configmgr.data_dir = tempfile.gettempdir()
gossiper.init({}, threading.RLock(), '127.0.0.1', 6768, 'testing', 'super testing', 1, 'QQQQQQQQQQQQQQQQQQ', [], [], False, 'private', True)
|
1175a7da5583f58915cfe7991ba250cb19db39f7
|
pysswords/credential.py
|
pysswords/credential.py
|
import os
class Credential(object):
def __init__(self, name, login, password, comments):
self.name = name
self.login = login
self.password = password
self.comments = comments
def save(self, database_path):
credential_path = os.path.join(database_path, self.name)
os.makedirs(credential_path)
with open(os.path.join(credential_path, "login"), "w") as f:
f.write(self.login)
with open(os.path.join(credential_path, "password"), "w") as f:
f.write(self.password)
with open(os.path.join(credential_path, "comments"), "w") as f:
f.write(self.comments)
@classmethod
def from_path(cls, path):
return Credential(
name=os.path.basename(path),
login=open(path + "/login").read(),
password=open(path + "/password").read(),
comments=open(path + "/comments").read()
)
def __str__(self):
return "<Credential: name={}, login={}, password='...', {}>".format(
self.name,
self.login,
self.comments
)
|
import os
class Credential(object):
def __init__(self, name, login, password, comments):
self.name = name
self.login = login
self.password = password
self.comments = comments
def save(self, database_path):
credential_path = os.path.join(database_path, self.name)
os.makedirs(credential_path)
with open(os.path.join(credential_path, "login"), "w") as f:
f.write(self.login)
with open(os.path.join(credential_path, "password"), "w") as f:
f.write(self.password)
with open(os.path.join(credential_path, "comments"), "w") as f:
f.write(self.comments)
@classmethod
def from_path(cls, path):
return Credential(
name=os.path.basename(path),
login=open(path + "/login").read(),
password=open(path + "/password").read(),
comments=open(path + "/comments").read()
)
def __str__(self):
return "<name={}, login={}, password='...', {}>".format(
self.name,
self.login,
self.comments
)
|
Change string formating for Credential
|
Change string formating for Credential
|
Python
|
mit
|
marcwebbie/passpie,scorphus/passpie,marcwebbie/pysswords,eiginn/passpie,marcwebbie/passpie,scorphus/passpie,eiginn/passpie
|
---
+++
@@ -31,7 +31,7 @@
)
def __str__(self):
- return "<Credential: name={}, login={}, password='...', {}>".format(
+ return "<name={}, login={}, password='...', {}>".format(
self.name,
self.login,
self.comments
|
edbbcdda383c8f15c5a3c496490f2a85125d844d
|
setup.py
|
setup.py
|
from setuptools import setup, find_packages
import ofxparse
setup(name='ofxparse',
version=ofxparse.__version__,
description="Tools for working with the OFX (Open Financial Exchange) file format",
long_description=open("./README", "r").read(),
# Get strings from http://pypi.python.org/pypi?%3Aaction=list_classifiers
classifiers=[
"Development Status :: 4 - Beta",
"Intended Audience :: Developers",
"Natural Language :: English",
"Operating System :: OS Independent",
"Programming Language :: Python",
"Topic :: Software Development :: Libraries :: Python Modules",
"Topic :: Utilities",
"License :: OSI Approved :: MIT License",
],
keywords='ofx, Open Financial Exchange, file formats',
author='Jerry Seutter',
author_email='jseutter.ofxparse@gmail.com',
url='http://sites.google.com/site/ofxparse',
license='MIT License',
packages=find_packages(exclude=['ez_setup', 'examples', 'tests']),
include_package_data=True,
zip_safe=True,
install_requires=[
# -*- Extra requirements: -*-
"BeautifulSoup>=3.0",
],
entry_points="""
""",
use_2to3 = True,
test_suite = 'tests',
)
|
from setuptools import setup, find_packages
import re
VERSION = re.search(r"__version__ = '(.*?)'",
open("ofxparse/__init__.py").read()).group(1)
setup(name='ofxparse',
version=VERSION,
description="Tools for working with the OFX (Open Financial Exchange) file format",
long_description=open("./README", "r").read(),
# Get strings from http://pypi.python.org/pypi?%3Aaction=list_classifiers
classifiers=[
"Development Status :: 4 - Beta",
"Intended Audience :: Developers",
"Natural Language :: English",
"Operating System :: OS Independent",
"Programming Language :: Python",
"Topic :: Software Development :: Libraries :: Python Modules",
"Topic :: Utilities",
"License :: OSI Approved :: MIT License",
],
keywords='ofx, Open Financial Exchange, file formats',
author='Jerry Seutter',
author_email='jseutter.ofxparse@gmail.com',
url='http://sites.google.com/site/ofxparse',
license='MIT License',
packages=find_packages(exclude=['ez_setup', 'examples', 'tests']),
include_package_data=True,
zip_safe=True,
install_requires=[
# -*- Extra requirements: -*-
"BeautifulSoup>=3.0",
],
entry_points="""
""",
use_2to3 = True,
test_suite = 'tests',
)
|
Fix ImportError when installing without BeautifulSoup
|
Fix ImportError when installing without BeautifulSoup
|
Python
|
mit
|
udibr/ofxparse,rdsteed/ofxparse,jseutter/ofxparse,jaraco/ofxparse,hiromu2000/ofxparse,egh/ofxparse
|
---
+++
@@ -1,9 +1,12 @@
from setuptools import setup, find_packages
-import ofxparse
+import re
+VERSION = re.search(r"__version__ = '(.*?)'",
+ open("ofxparse/__init__.py").read()).group(1)
+
setup(name='ofxparse',
- version=ofxparse.__version__,
+ version=VERSION,
description="Tools for working with the OFX (Open Financial Exchange) file format",
long_description=open("./README", "r").read(),
# Get strings from http://pypi.python.org/pypi?%3Aaction=list_classifiers
|
e56a8b5cf4e298d69bc321a4ce323e2f881900d0
|
pyvac/views/__init__.py
|
pyvac/views/__init__.py
|
# -*- coding: utf-8 -*-
from .base import RedirectView
from pyvac.models import VacationType
class Index(RedirectView):
redirect_route = u'login'
class Home(RedirectView):
redirect_route = u'login'
def render(self):
if not self.user:
return self.redirect()
ret_dict = {'types': [vac.name for vac in
VacationType.find(self.session,
order_by=[VacationType.name])]}
if self.request.matched_route:
matched_route = self.request.matched_route.name
ret_dict.update({'matched_route': matched_route,
'csrf_token': self.request.session.get_csrf_token()})
return ret_dict
ret_dict.update({'csrf_token': self.request.session.get_csrf_token()})
return ret_dict
|
# -*- coding: utf-8 -*-
from .base import RedirectView
from pyvac.models import VacationType
class Index(RedirectView):
redirect_route = u'login'
class Home(RedirectView):
redirect_route = u'login'
def render(self):
if not self.user:
return self.redirect()
ret_dict = {'types': [vac.name for vac in
VacationType.find(self.session,
order_by=[VacationType.id])]}
if self.request.matched_route:
matched_route = self.request.matched_route.name
ret_dict.update({'matched_route': matched_route,
'csrf_token': self.request.session.get_csrf_token()})
return ret_dict
ret_dict.update({'csrf_token': self.request.session.get_csrf_token()})
return ret_dict
|
Sort vacation type by id when displaying on home page
|
Sort vacation type by id when displaying on home page
|
Python
|
bsd-3-clause
|
doyousoft/pyvac,sayoun/pyvac,doyousoft/pyvac,doyousoft/pyvac,sayoun/pyvac,sayoun/pyvac
|
---
+++
@@ -17,7 +17,7 @@
ret_dict = {'types': [vac.name for vac in
VacationType.find(self.session,
- order_by=[VacationType.name])]}
+ order_by=[VacationType.id])]}
if self.request.matched_route:
matched_route = self.request.matched_route.name
ret_dict.update({'matched_route': matched_route,
|
adcbb33f7f0fed92bbbe33ef37b67db8841953d1
|
setup.py
|
setup.py
|
#!/usr/bin/env python
from setuptools import setup
def readme():
with open('README.rst') as f:
return f.read()
setup(
name='pneumatic',
version='0.1.8',
description='A bulk upload library for DocumentCloud.',
long_description=readme(),
classifiers=[
'Development Status :: 4 - Beta',
'Intended Audience :: Developers',
'License :: OSI Approved :: MIT License',
'Natural Language :: English',
'Operating System :: OS Independent',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.4',
'Programming Language :: Python :: 3.5',
'Programming Language :: Python :: 3.6',
'Programming Language :: Python :: 3.7',
],
url='http://pneumatic.readthedocs.io/en/latest/',
author='Anthony DeBarros',
author_email='practicalsqlbook@gmail.com',
license='MIT',
packages=['pneumatic'],
install_requires=[
'requests',
'colorama'
],
zip_safe=False
)
|
#!/usr/bin/env python
from setuptools import setup
def readme():
with open('README.rst') as f:
return f.read()
setup(
name='pneumatic',
version='0.1.8',
description='A bulk upload library for DocumentCloud.',
long_description=readme(),
classifiers=[
'Development Status :: 4 - Beta',
'Intended Audience :: Developers',
'License :: OSI Approved :: MIT License',
'Natural Language :: English',
'Operating System :: OS Independent',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.4',
'Programming Language :: Python :: 3.5',
'Programming Language :: Python :: 3.6',
'Programming Language :: Python :: 3.7',
],
url='http://pneumatic.readthedocs.io/en/latest/',
author='Anthony DeBarros',
author_email='practicalsqlbook@gmail.com',
license='MIT',
packages=['pneumatic'],
install_requires=[
'requests',
'colorama'
],
exclude_package_data={'': ['.DS_Store']},
zip_safe=False
)
|
Exclude .DS_Store from package build.
|
Exclude .DS_Store from package build.
|
Python
|
mit
|
anthonydb/pneumatic
|
---
+++
@@ -34,5 +34,6 @@
'requests',
'colorama'
],
+ exclude_package_data={'': ['.DS_Store']},
zip_safe=False
)
|
9596d7c5cd30a41961ac49471c3501a29b619d46
|
setup.py
|
setup.py
|
from setuptools import setup, find_packages
import sys
if sys.version_info.major != 3:
raise RuntimeError("PhenoGraph requires Python 3")
setup(
name="PhenoGraph",
description="Graph-based clustering for high-dimensional single-cell data",
version="1.2",
author="Jacob Levine",
author_email="jl3545@columbia.edu",
packages=find_packages(),
package_data={
'': ['louvain/*convert*', 'louvain/*community*', 'louvain/*hierarchy*']
},
include_package_data=True,
zip_safe=False,
url="https://github.com/jacoblevine/PhenoGraph",
license="LICENSE",
long_description=open("README.md").read(),
install_requires=open("requirements.txt").read()
)
|
from setuptools import setup, find_packages
import sys
if sys.version_info.major != 3:
raise RuntimeError("PhenoGraph requires Python 3")
setup(
name="PhenoGraph",
description="Graph-based clustering for high-dimensional single-cell data",
version="1.3",
author="Jacob Levine",
author_email="jl3545@columbia.edu",
packages=find_packages(),
package_data={
'': ['louvain/*convert*', 'louvain/*community*', 'louvain/*hierarchy*']
},
include_package_data=True,
zip_safe=False,
url="https://github.com/jacoblevine/PhenoGraph",
license="LICENSE",
long_description=open("README.md").read(),
install_requires=open("requirements.txt").read()
)
|
Increment version. New in 1.3: Linux binaries are properly included
|
Increment version. New in 1.3: Linux binaries are properly included
|
Python
|
mit
|
jacoblevine/PhenoGraph
|
---
+++
@@ -8,7 +8,7 @@
setup(
name="PhenoGraph",
description="Graph-based clustering for high-dimensional single-cell data",
- version="1.2",
+ version="1.3",
author="Jacob Levine",
author_email="jl3545@columbia.edu",
packages=find_packages(),
|
5deb33c244242d36a16a8c08ff816368b345a8f3
|
qr_code/qrcode/image.py
|
qr_code/qrcode/image.py
|
"""
Import the required subclasses of :class:`~qrcode.image.base.BaseImage` from the qrcode library with a fallback to SVG
format when the Pillow library is not available.
"""
import logging
from qrcode.image.svg import SvgPathImage as _SvgPathImage
logger = logging.getLogger('django')
try:
from qrcode.image.pil import PilImage as _PilImageOrFallback
except ImportError:
logger.info("Pillow is not installed. No support available for PNG format.")
from qrcode.image.svg import SvgPathImage as _PilImageOrFallback
SVG_FORMAT_NAME = 'svg'
PNG_FORMAT_NAME = 'png'
SvgPathImage = _SvgPathImage
PilImageOrFallback = _PilImageOrFallback
def has_png_support():
return PilImageOrFallback is not SvgPathImage
def get_supported_image_format(image_format):
image_format = image_format.lower()
if image_format not in [SVG_FORMAT_NAME, PNG_FORMAT_NAME]:
logger.warning('Unknown image format: %s' % image_format)
image_format = SVG_FORMAT_NAME
elif image_format == PNG_FORMAT_NAME and not has_png_support():
logger.warning("No support available for PNG format, SVG will be used instead. Please install Pillow for PNG support.")
image_format = SVG_FORMAT_NAME
return image_format
|
"""
Import the required subclasses of :class:`~qrcode.image.base.BaseImage` from the qrcode library with a fallback to SVG
format when the Pillow library is not available.
"""
import logging
from qrcode.image.svg import SvgPathImage as _SvgPathImage
logger = logging.getLogger('django')
try:
from qrcode.image.pil import PilImage as _PilImageOrFallback
except ImportError: # pragma: no cover
logger.info("Pillow is not installed. No support available for PNG format.")
from qrcode.image.svg import SvgPathImage as _PilImageOrFallback
SVG_FORMAT_NAME = 'svg'
PNG_FORMAT_NAME = 'png'
SvgPathImage = _SvgPathImage
PilImageOrFallback = _PilImageOrFallback
def has_png_support():
return PilImageOrFallback is not SvgPathImage
def get_supported_image_format(image_format):
image_format = image_format.lower()
if image_format not in [SVG_FORMAT_NAME, PNG_FORMAT_NAME]:
logger.warning('Unknown image format: %s' % image_format)
image_format = SVG_FORMAT_NAME
elif image_format == PNG_FORMAT_NAME and not has_png_support():
logger.warning(
"No support available for PNG format, SVG will be used instead. Please install Pillow for PNG support.")
image_format = SVG_FORMAT_NAME
return image_format
|
Exclude handling of the situation where Pillow is not available from test coverage.
|
Exclude handling of the situation where Pillow is not available from test coverage.
|
Python
|
bsd-3-clause
|
dprog-philippe-docourt/django-qr-code,dprog-philippe-docourt/django-qr-code,dprog-philippe-docourt/django-qr-code
|
---
+++
@@ -4,10 +4,11 @@
"""
import logging
from qrcode.image.svg import SvgPathImage as _SvgPathImage
+
logger = logging.getLogger('django')
try:
from qrcode.image.pil import PilImage as _PilImageOrFallback
-except ImportError:
+except ImportError: # pragma: no cover
logger.info("Pillow is not installed. No support available for PNG format.")
from qrcode.image.svg import SvgPathImage as _PilImageOrFallback
@@ -28,6 +29,7 @@
logger.warning('Unknown image format: %s' % image_format)
image_format = SVG_FORMAT_NAME
elif image_format == PNG_FORMAT_NAME and not has_png_support():
- logger.warning("No support available for PNG format, SVG will be used instead. Please install Pillow for PNG support.")
+ logger.warning(
+ "No support available for PNG format, SVG will be used instead. Please install Pillow for PNG support.")
image_format = SVG_FORMAT_NAME
return image_format
|
ca62e5dae3b07bb0534fbb2df9072c744bff6e4b
|
setup.py
|
setup.py
|
import os.path as path
from setuptools import setup
def get_readme(filename):
if not path.exists(filename):
return ""
with open(path.join(path.dirname(__file__), filename)) as readme:
content = readme.read()
return content
setup(name="mdx_linkify",
version="0.6",
author="Raitis (daGrevis) Stengrevics",
author_email="dagrevis@gmail.com",
description="Link recognition for Python Markdown",
license="MIT",
keywords="markdown links",
url="https://github.com/daGrevis/mdx_linkify",
packages=["mdx_linkify"],
long_description=get_readme("README.md"),
classifiers=[
"Topic :: Text Processing :: Markup",
"Topic :: Utilities",
"Programming Language :: Python :: 2.7",
"Programming Language :: Python :: 3.3",
"Programming Language :: Python :: Implementation :: PyPy",
"Development Status :: 4 - Beta",
"License :: OSI Approved :: MIT License",
],
install_requires=["Markdown>=2.5", "bleach>=1.4"],
test_suite="mdx_linkify.tests")
|
import os.path as path
from setuptools import setup
def get_readme(filename):
if not path.exists(filename):
return ""
with open(path.join(path.dirname(__file__), filename)) as readme:
content = readme.read()
return content
setup(name="mdx_linkify",
version="0.6",
author="Raitis (daGrevis) Stengrevics",
author_email="dagrevis@gmail.com",
description="Link recognition for Python Markdown",
license="MIT",
keywords="markdown links",
url="https://github.com/daGrevis/mdx_linkify",
packages=["mdx_linkify"],
long_description=get_readme("README.md"),
classifiers=[
"Topic :: Text Processing :: Markup",
"Topic :: Utilities",
"Programming Language :: Python :: 2.7",
"Programming Language :: Python :: 3.3",
"Programming Language :: Python :: Implementation :: PyPy",
"Development Status :: 4 - Beta",
"License :: OSI Approved :: MIT License",
],
install_requires=["Markdown>=2.6", "bleach>=2.0.0"],
test_suite="mdx_linkify.tests")
|
Update dependency to Markdown 2.6+ & bleach 2.0.0+
|
Update dependency to Markdown 2.6+ & bleach 2.0.0+
|
Python
|
mit
|
daGrevis/mdx_linkify
|
---
+++
@@ -29,5 +29,5 @@
"Development Status :: 4 - Beta",
"License :: OSI Approved :: MIT License",
],
- install_requires=["Markdown>=2.5", "bleach>=1.4"],
+ install_requires=["Markdown>=2.6", "bleach>=2.0.0"],
test_suite="mdx_linkify.tests")
|
d0e4c6300c8328f4f72b4a2b04061e94d7c7dea8
|
setup.py
|
setup.py
|
# -*- coding: utf-8 -*-
import os
from setuptools import setup
def read(fname):
try:
return open(os.path.join(os.path.dirname(__file__), fname)).read()
except:
return ''
setup(
name='todoist-python',
version='7.0.15',
packages=['todoist', 'todoist.managers'],
author='Doist Team',
author_email='info@todoist.com',
license='BSD',
description='todoist-python - The official Todoist Python API library',
long_description = read('README.md'),
install_requires=[
'requests',
],
# see here for complete list of classifiers
# http://pypi.python.org/pypi?%3Aaction=list_classifiers
classifiers=(
'Intended Audience :: Developers',
'License :: OSI Approved :: BSD License',
'Programming Language :: Python',
),
)
|
# -*- coding: utf-8 -*-
import os
from setuptools import setup
def read(fname):
try:
return open(os.path.join(os.path.dirname(__file__), fname)).read()
except:
return ''
setup(
name='todoist-python',
version='7.0.16',
packages=['todoist', 'todoist.managers'],
author='Doist Team',
author_email='info@todoist.com',
license='BSD',
description='todoist-python - The official Todoist Python API library',
long_description = read('README.md'),
install_requires=[
'requests',
],
# see here for complete list of classifiers
# http://pypi.python.org/pypi?%3Aaction=list_classifiers
classifiers=(
'Intended Audience :: Developers',
'License :: OSI Approved :: BSD License',
'Programming Language :: Python',
),
)
|
Update the PyPI version to 7.0.16.
|
Update the PyPI version to 7.0.16.
|
Python
|
mit
|
Doist/todoist-python
|
---
+++
@@ -10,7 +10,7 @@
setup(
name='todoist-python',
- version='7.0.15',
+ version='7.0.16',
packages=['todoist', 'todoist.managers'],
author='Doist Team',
author_email='info@todoist.com',
|
4737bbc134aaa3b4512ef89e7824a36495e68291
|
setup.py
|
setup.py
|
# -*- coding: utf-8 -*-
import os
from setuptools import setup
def read(fname):
try:
return open(os.path.join(os.path.dirname(__file__), fname)).read()
except:
return ''
setup(
name='todoist-python',
version='0.2.6',
packages=['todoist', 'todoist.managers'],
author='Doist Team',
author_email='info@todoist.com',
license='BSD',
description='todoist-python - The official Todoist Python API library',
long_description = read('README.md'),
install_requires=[
'requests',
],
# see here for complete list of classifiers
# http://pypi.python.org/pypi?%3Aaction=list_classifiers
classifiers=(
'Intended Audience :: Developers',
'License :: OSI Approved :: BSD License',
'Programming Language :: Python',
),
)
|
# -*- coding: utf-8 -*-
import os
from setuptools import setup
def read(fname):
try:
return open(os.path.join(os.path.dirname(__file__), fname)).read()
except:
return ''
setup(
name='todoist-python',
version='0.2.7',
packages=['todoist', 'todoist.managers'],
author='Doist Team',
author_email='info@todoist.com',
license='BSD',
description='todoist-python - The official Todoist Python API library',
long_description = read('README.md'),
install_requires=[
'requests',
],
# see here for complete list of classifiers
# http://pypi.python.org/pypi?%3Aaction=list_classifiers
classifiers=(
'Intended Audience :: Developers',
'License :: OSI Approved :: BSD License',
'Programming Language :: Python',
),
)
|
Update the PyPI version to 0.2.7
|
Update the PyPI version to 0.2.7
|
Python
|
mit
|
Doist/todoist-python,electronick1/todoist-python
|
---
+++
@@ -10,7 +10,7 @@
setup(
name='todoist-python',
- version='0.2.6',
+ version='0.2.7',
packages=['todoist', 'todoist.managers'],
author='Doist Team',
author_email='info@todoist.com',
|
a8a56f20dd76f61ec1ea6e99037490922d5cbcb1
|
setup.py
|
setup.py
|
#!/usr/bin/env python
"""
:Author Patrik Valkovic
:Created 04.08.2017 19:00
:Licence GNUv3
Part of grammpy
"""
from distutils.core import setup
setup(
name='grammpy',
version='1.1.1',
packages=['grammpy', 'grammpy.Grammars', 'grammpy.exceptions'],
url='https://github.com/PatrikValkovic/grammpy',
license='GNU General Public License v3.0',
author='Patrik Valkovic',
download_url='https://github.com/PatrikValkovic/grammpy/archive/v1.0.1.tar.gz',
author_email='patrik.valkovic@hotmail.cz',
description='Package for representing formal grammars.'
)
|
#!/usr/bin/env python
"""
:Author Patrik Valkovic
:Created 04.08.2017 19:00
:Licence GNUv3
Part of grammpy
"""
from distutils.core import setup
setup(
name='grammpy',
version='1.1.1',
packages=['grammpy', 'grammpy.Grammars', 'grammpy.exceptions', 'grammpy.Rules'],
url='https://github.com/PatrikValkovic/grammpy',
license='GNU General Public License v3.0',
author='Patrik Valkovic',
download_url='https://github.com/PatrikValkovic/grammpy/archive/v1.0.1.tar.gz',
author_email='patrik.valkovic@hotmail.cz',
description='Package for representing formal grammars.'
)
|
FIX missing Rules directory in package
|
FIX missing Rules directory in package
|
Python
|
mit
|
PatrikValkovic/grammpy
|
---
+++
@@ -13,7 +13,7 @@
setup(
name='grammpy',
version='1.1.1',
- packages=['grammpy', 'grammpy.Grammars', 'grammpy.exceptions'],
+ packages=['grammpy', 'grammpy.Grammars', 'grammpy.exceptions', 'grammpy.Rules'],
url='https://github.com/PatrikValkovic/grammpy',
license='GNU General Public License v3.0',
author='Patrik Valkovic',
|
a582b184c9918cdf556c9892b70481deccded61d
|
setup.py
|
setup.py
|
from setuptools import setup
from setuptools import find_packages
setup(name='Keras',
version='0.1.2',
description='Theano-based Deep Learning library',
author='Francois Chollet',
author_email='francois.chollet@gmail.com',
url='https://github.com/fchollet/keras',
download_url='https://github.com/fchollet/keras/tarball/0.1.2',
license='MIT',
install_requires=['theano', 'pyyaml', 'h5py'],
packages=find_packages())
|
from setuptools import setup
from setuptools import find_packages
setup(name='Keras',
version='0.1.2',
description='Theano-based Deep Learning library',
author='Francois Chollet',
author_email='francois.chollet@gmail.com',
url='https://github.com/fchollet/keras',
download_url='https://github.com/fchollet/keras/tarball/0.1.2',
license='MIT',
install_requires=['theano', 'pyyaml'],
extras_require = {
'h5py': ['h5py'],
},
packages=find_packages())
|
Remove h5py requirement and made it optional.
|
Remove h5py requirement and made it optional.
|
Python
|
mit
|
xiaoda99/keras,jimgoo/keras,dxj19831029/keras,eulerreich/keras,iScienceLuvr/keras,ledbetdr/keras,kemaswill/keras,cvfish/keras,why11002526/keras,gamer13/keras,DeepGnosis/keras,harshhemani/keras,saurav111/keras,abayowbo/keras,Aureliu/keras,keras-team/keras,kuza55/keras,relh/keras,nehz/keras,keskarnitish/keras,dolaameng/keras,jalexvig/keras,nebw/keras,florentchandelier/keras,Smerity/keras,3dconv/keras,bottler/keras,ashhher3/keras,zxytim/keras,untom/keras,sjuvekar/keras,printedheart/keras,MagicSen/keras,iamtrask/keras,keras-team/keras,brainwater/keras,yingzha/keras,rodrigob/keras,EderSantana/keras,johmathe/keras,fmacias64/keras,chenych11/keras,stephenbalaban/keras,amy12xx/keras,imcomking/Convolutional-GRU-keras-extension-,daviddiazvico/keras
|
---
+++
@@ -10,5 +10,8 @@
url='https://github.com/fchollet/keras',
download_url='https://github.com/fchollet/keras/tarball/0.1.2',
license='MIT',
- install_requires=['theano', 'pyyaml', 'h5py'],
+ install_requires=['theano', 'pyyaml'],
+ extras_require = {
+ 'h5py': ['h5py'],
+ },
packages=find_packages())
|
c6e7f85907c59de284938d30342c7ca48674d4c7
|
setup.py
|
setup.py
|
#!/usr/bin/env python
from setuptools import setup, find_packages
from mutant import __version__
github_url = 'https://github.com/charettes/django-mutant'
long_desc = open('README.md').read()
setup(
name='django-mutant',
version='.'.join(str(v) for v in __version__),
description='Dynamic model definition and alteration (evolving schemas)',
long_description=open('README.md').read(),
url=github_url,
author='Simon Charette',
author_email='charette.s@gmail.com',
install_requires=(
'django>=1.3,<=1.5',
'south>=0.7.6',
'django-orderable==1.2.1',
'django-picklefield==0.2.0',
'django-polymodels==1.0.1',
),
dependency_links=(
'https://github.com/tkaemming/django-orderable/tarball/master#egg=django-orderable-1.2.1',
),
packages=find_packages(exclude=['tests']),
include_package_data=True,
license='MIT License',
classifiers=[
'Development Status :: 1 - Planning',
'Environment :: Web Environment',
'Framework :: Django',
'Intended Audience :: Developers',
'License :: OSI Approved :: MIT License',
'Operating System :: OS Independent',
'Programming Language :: Python',
'Topic :: Software Development :: Libraries :: Python Modules'
],
)
|
#!/usr/bin/env python
from setuptools import setup, find_packages
from mutant import __version__
github_url = 'https://github.com/charettes/django-mutant'
long_desc = open('README.md').read()
setup(
name='django-mutant',
version='.'.join(str(v) for v in __version__),
description='Dynamic model definition and alteration (evolving schemas)',
long_description=open('README.md').read(),
url=github_url,
author='Simon Charette',
author_email='charette.s@gmail.com',
install_requires=(
'django>=1.4,<=1.6',
'south>=0.7.6',
'django-orderable==1.2.1',
'django-picklefield==0.2.0',
'django-polymodels==1.0.1',
),
dependency_links=(
'https://github.com/tkaemming/django-orderable/tarball/master#egg=django-orderable-1.2.1',
),
packages=find_packages(exclude=['tests']),
include_package_data=True,
license='MIT License',
classifiers=[
'Development Status :: 1 - Planning',
'Environment :: Web Environment',
'Framework :: Django',
'Intended Audience :: Developers',
'License :: OSI Approved :: MIT License',
'Operating System :: OS Independent',
'Programming Language :: Python',
'Topic :: Software Development :: Libraries :: Python Modules'
],
)
|
Allow Django 1.6 install while preventing 1.3.X
|
Allow Django 1.6 install while preventing 1.3.X
|
Python
|
mit
|
charettes/django-mutant
|
---
+++
@@ -15,7 +15,7 @@
author='Simon Charette',
author_email='charette.s@gmail.com',
install_requires=(
- 'django>=1.3,<=1.5',
+ 'django>=1.4,<=1.6',
'south>=0.7.6',
'django-orderable==1.2.1',
'django-picklefield==0.2.0',
|
3e717a2a77dcf18f9a281e68462b5809010e1835
|
setup.py
|
setup.py
|
from setuptools import setup
setup(name='pyW215',
version='0.4',
description='Interface for d-link W215 Smart Plugs.',
url='https://github.com/linuxchristian/pyW215',
author='Christian Juncker Brædstrup',
author_email='christian@fredborg-braedstrup.dk',
license='MIT',
packages=['pyW215'],
install_requires=[],
zip_safe=False)
|
# -*- coding: utf-8 -*-
from setuptools import setup
from os import path
here = path.abspath(path.dirname(__file__))
# Get the long description from the README file
with open(path.join(here, 'README.rst'), encoding='utf-8') as f:
long_description = f.read()
setup(name='pyW215',
version='0.4',
description='Interface for d-link W215 Smart Plugs.',
long_description=long_description,
url='https://github.com/linuxchristian/pyW215',
author='Christian Juncker Brædstrup',
author_email='christian@junckerbraedstrup.dk',
license='MIT',
keywords='D-Link W215 W110 Smartplug',
packages=['pyW215'],
install_requires=[],
zip_safe=False)
|
Prepare for publication on pypi
|
Prepare for publication on pypi
|
Python
|
mit
|
LinuxChristian/pyW215
|
---
+++
@@ -1,12 +1,22 @@
+# -*- coding: utf-8 -*-
from setuptools import setup
+from os import path
+
+here = path.abspath(path.dirname(__file__))
+
+# Get the long description from the README file
+with open(path.join(here, 'README.rst'), encoding='utf-8') as f:
+ long_description = f.read()
setup(name='pyW215',
- version='0.4',
- description='Interface for d-link W215 Smart Plugs.',
- url='https://github.com/linuxchristian/pyW215',
- author='Christian Juncker Brædstrup',
- author_email='christian@fredborg-braedstrup.dk',
- license='MIT',
- packages=['pyW215'],
- install_requires=[],
- zip_safe=False)
+ version='0.4',
+ description='Interface for d-link W215 Smart Plugs.',
+ long_description=long_description,
+ url='https://github.com/linuxchristian/pyW215',
+ author='Christian Juncker Brædstrup',
+ author_email='christian@junckerbraedstrup.dk',
+ license='MIT',
+ keywords='D-Link W215 W110 Smartplug',
+ packages=['pyW215'],
+ install_requires=[],
+ zip_safe=False)
|
fd5b1bc59bc6b6640727fc88ade075be9b8355c4
|
setup.py
|
setup.py
|
#!/usr/bin/env python3
from setuptools import setup, find_packages
from thotkeeper import __version__ as tk_version
with open("README.md", "r") as fh:
long_description = fh.read()
setup(
name='thotkeeper',
version=tk_version,
author='C. Michael Pilato',
author_email='cmpilato@red-bean.com',
description='Cross-platform personal daily journaling',
long_description=long_description,
long_description_content_type='text/markdown',
keywords='journaling',
url='https://github.com/cmpilato/thotkeeper',
packages=find_packages(),
package_data={
'thotkeeper': ['thotkeeper/*.xrc'],
},
data_files=[
('share/pixmaps', ['icons/thotkeeper.xpm']),
('share/icons/hicolor/scalable/apps', ['icons/thotkeeper.svg']),
],
entry_points={
'console_scripts': [
'thotkeeper = thotkeeper:main',
],
},
classifiers=[
'Programming Language :: Python :: 3',
'License :: OSI Approved :: BSD-2 License',
'Operating System :: OS Independent',
],
include_package_data=True,
zip_safe=False,
platforms='any',
python_requires='>=3.4',
)
|
#!/usr/bin/env python3
from setuptools import setup, find_packages
from thotkeeper import __version__ as tk_version
with open("README.md", "r") as fh:
long_description = fh.read()
setup(
name='thotkeeper',
version=tk_version,
author='C. Michael Pilato',
author_email='cmpilato@red-bean.com',
description='Cross-platform personal daily journaling',
long_description=long_description,
long_description_content_type='text/markdown',
keywords='journaling',
url='https://github.com/cmpilato/thotkeeper',
packages=find_packages(),
package_data={
'thotkeeper': ['*.xrc'],
},
data_files=[
('share/pixmaps', ['icons/thotkeeper.xpm']),
('share/icons/hicolor/scalable/apps', ['icons/thotkeeper.svg']),
],
entry_points={
'console_scripts': [
'thotkeeper = thotkeeper:main',
],
},
classifiers=[
'Programming Language :: Python :: 3',
'License :: OSI Approved :: BSD-2 License',
'Operating System :: OS Independent',
],
include_package_data=True,
zip_safe=False,
platforms='any',
python_requires='>=3.4',
)
|
Fix the XRC package_data entry.
|
Fix the XRC package_data entry.
|
Python
|
bsd-2-clause
|
cmpilato/thotkeeper
|
---
+++
@@ -18,7 +18,7 @@
url='https://github.com/cmpilato/thotkeeper',
packages=find_packages(),
package_data={
- 'thotkeeper': ['thotkeeper/*.xrc'],
+ 'thotkeeper': ['*.xrc'],
},
data_files=[
('share/pixmaps', ['icons/thotkeeper.xpm']),
|
c984957d006cacfe2e741d5f57fcb8257f4d846b
|
setup.py
|
setup.py
|
#!/usr/bin/env python
try:
from setuptools import setup
except ImportError:
from distutils.core import setup
VERSION = '0.2'
setup(name='tornado-httpclient-session',
version=VERSION,
packages=['httpclient_session', 'httpclient_session.test'],
author='mailto1587',
author_email='mailto1587@gmail.com',
description='Session support to tornado.httpclient.',
license='http://opensource.org/licenses/MIT',
url='https://github.com/mailto1587/tornado-httpclient-session',
keywords=['Tornado', 'HttpClient', 'Session'],
install_requires=[
'tornado'
])
|
#!/usr/bin/env python
try:
from setuptools import setup
except ImportError:
from distutils.core import setup
VERSION = '0.1.0'
setup(name='tornado-httpclient-session',
version=VERSION,
packages=['httpclient_session', 'httpclient_session.test'],
author='mailto1587',
author_email='mailto1587@gmail.com',
description='Session support to tornado.httpclient.',
license='http://opensource.org/licenses/MIT',
url='https://github.com/mailto1587/tornado-httpclient-session',
keywords=['Tornado', 'HttpClient', 'Session'],
install_requires=[
'tornado'
])
|
Use semantic versioning and re-publish to PyPi
|
Use semantic versioning and re-publish to PyPi
|
Python
|
mit
|
Norpadon/tornado-httpclient-session
|
---
+++
@@ -5,7 +5,7 @@
except ImportError:
from distutils.core import setup
-VERSION = '0.2'
+VERSION = '0.1.0'
setup(name='tornado-httpclient-session',
version=VERSION,
|
ab63395c1d8c9ec6bce13811965c8335463b0b78
|
setup.py
|
setup.py
|
from distutils.core import setup, Extension
setup(name = "Indexer", version = "0.1", ext_modules = [Extension("rabin", ["src/rabin.c", ])])
|
from distutils.core import setup, Extension
import os
os.environ['CFLAGS'] = "-Qunused-arguments"
setup(name = "Indexer", version = "0.1", ext_modules = [Extension("rabin", ["src/rabin.c", ])])
|
Fix compile error on OS X 10.9
|
Fix compile error on OS X 10.9
|
Python
|
apache-2.0
|
pombredanne/python-rabin-fingerprint,pombredanne/python-rabin-fingerprint,cschwede/python-rabin-fingerprint,cschwede/python-rabin-fingerprint
|
---
+++
@@ -1,3 +1,5 @@
from distutils.core import setup, Extension
+import os
+os.environ['CFLAGS'] = "-Qunused-arguments"
setup(name = "Indexer", version = "0.1", ext_modules = [Extension("rabin", ["src/rabin.c", ])])
|
006929cb8032f038522645a687f7385dcaa66b78
|
setup.py
|
setup.py
|
from distutils.core import setup, Extension
from glob import glob
module1 = Extension('hashpumpy',
sources = glob('*.cpp'),
libraries = ['crypto'])
setup (name = 'hashpumpy',
version = '1.0',
author = 'Zach Riggle (Python binding), Brian Wallace (HashPump)',
description = 'Python bindings for HashPump',
data_files = glob('*.h'),
ext_modules = [module1],
license = 'MIT',
url = 'https://github.com/bwall/HashPump')
|
from distutils.core import setup, Extension
from glob import glob
module1 = Extension('hashpumpy',
sources = glob('*.cpp'),
libraries = ['crypto'])
setup (name = 'hashpumpy',
version = '1.0',
author = 'Zach Riggle (Python binding), Brian Wallace (HashPump)',
description = 'Python bindings for HashPump',
data_files = [('include', glob('*.h'))],
ext_modules = [module1],
license = 'MIT',
url = 'https://github.com/bwall/HashPump')
|
Install header files to include/
|
Install header files to include/
|
Python
|
mit
|
bwall/HashPump,bwall/HashPump,christophetd/HashPump,christophetd/HashPump
|
---
+++
@@ -9,7 +9,7 @@
version = '1.0',
author = 'Zach Riggle (Python binding), Brian Wallace (HashPump)',
description = 'Python bindings for HashPump',
- data_files = glob('*.h'),
+ data_files = [('include', glob('*.h'))],
ext_modules = [module1],
license = 'MIT',
url = 'https://github.com/bwall/HashPump')
|
784e1257e7784d15f84cb81c5fff887796ebd54f
|
setup.py
|
setup.py
|
from distutils.core import setup
setup(
name='crasync',
packages=['crasync'], # this must be the same as the name above
version='v1.0.0a',
description='An async wrapper for cr-api.com',
author='verixx',
author_email='abdurraqeeb53@gmail.com',
url='https://github.com/grokkers/cr-async', # use the URL to the github repo
download_url='https://github.com/grokkers/cr-async/archive/v1.0.0-alpha.tar.gz', # I'll explain this in a second
keywords=['clashroyale'], # arbitrary keywords
classifiers=[],
install_requires=['aiohttp>=2.0.0,<2.3.0']
)
|
from distutils.core import setup
setup(
name='crasync',
packages=['crasync'], # this must be the same as the name above
version='v1.1.0',
description='An async wrapper for cr-api.com',
author='verixx',
author_email='abdurraqeeb53@gmail.com',
url='https://github.com/grokkers/cr-async', # use the URL to the github repo
download_url='https://github.com/grokkers/cr-async/archive/v1.1.0.tar.gz', # I'll explain this in a second
keywords=['clashroyale'], # arbitrary keywords
classifiers=[],
install_requires=['aiohttp>=2.0.0,<2.3.0']
)
|
Set to the next version
|
Set to the next version
|
Python
|
mit
|
grokkers/cr-async
|
---
+++
@@ -3,12 +3,12 @@
setup(
name='crasync',
packages=['crasync'], # this must be the same as the name above
- version='v1.0.0a',
+ version='v1.1.0',
description='An async wrapper for cr-api.com',
author='verixx',
author_email='abdurraqeeb53@gmail.com',
url='https://github.com/grokkers/cr-async', # use the URL to the github repo
- download_url='https://github.com/grokkers/cr-async/archive/v1.0.0-alpha.tar.gz', # I'll explain this in a second
+ download_url='https://github.com/grokkers/cr-async/archive/v1.1.0.tar.gz', # I'll explain this in a second
keywords=['clashroyale'], # arbitrary keywords
classifiers=[],
install_requires=['aiohttp>=2.0.0,<2.3.0']
|
352461ab268d6f6bba691f837880ef0d3def4f43
|
setup.py
|
setup.py
|
# -*- coding: utf-8 -*-
"""
image analysis group tools
"""
from setuptools import setup
setup(
name='image-analysis',
version='0.0.1',
url='https://github.com/CoDaS-Lab/image-analysis',
license='BSD',
author='CoDaSLab http://shaftolab.com/',
author_email='s@sophiaray.info',
description='A small but fast and easy to use stand-alone template '
'engine written in pure python.',
long_description=__doc__,
zip_safe=False,
classifiers=[
'Programming Language :: Python :: 3.5',
],
packages=['image-analysis'],
install_requires=['scipy >= 0.18.1','scikit-learn>=0.17', 'ffmpeg>=3.2.2',
'sk-video>=1.17', 'scikit-image>=0.12.0'],
extras_require=None,
include_package_data=True
)
|
# -*- coding: utf-8 -*-
"""
image analysis group tools
"""
from setuptools import setup
setup(
name='image-analysis',
version='0.0.1',
url='https://github.com/CoDaS-Lab/image-analysis',
license='BSD',
author='CoDaSLab http://shaftolab.com/',
author_email='s@sophiaray.info',
description='A small but fast and easy to use stand-alone template '
'engine written in pure python.',
long_description=__doc__,
zip_safe=False,
classifiers=[
'Programming Language :: Python :: 3.5',
],
packages=['image-analysis'],
install_requires=['scipy >= 0.18.1','scikit-learn>=0.17', 'ffmpeg>=3.2.2',
'sk-video>=1.1.7', 'scikit-image>=0.12.0'],
extras_require=None,
include_package_data=True
)
|
Correct version number for sk-video
|
Correct version number for sk-video
|
Python
|
apache-2.0
|
CoDaS-Lab/image_analysis
|
---
+++
@@ -21,7 +21,7 @@
],
packages=['image-analysis'],
install_requires=['scipy >= 0.18.1','scikit-learn>=0.17', 'ffmpeg>=3.2.2',
- 'sk-video>=1.17', 'scikit-image>=0.12.0'],
+ 'sk-video>=1.1.7', 'scikit-image>=0.12.0'],
extras_require=None,
include_package_data=True
)
|
85697d8a1d79a599071fea4cc41216f3df3f3586
|
setup.py
|
setup.py
|
from distutils.core import setup
setup(
name='flickruper',
version='0.1.0',
author='Igor Katson',
author_email='igor.katson@gmail.com',
py_modules=['flickruper'],
scripts=['bin/flickruper'],
entry_points={
'console_scripts': ['flickruper = flickruper:main'],
},
url='http://pypi.python.org/pypi/flickruper/',
license='LICENSE.txt',
description='Multi-threaded uploader for Flickr',
long_description=open('README.rst').read(),
install_requires=[
"flickrapi>=1.4.4",
],
)
|
from distutils.core import setup
setup(
name='flickruper',
version='0.1.0',
author='Igor Katson',
author_email='igor.katson@gmail.com',
py_modules=['flickruper'],
scripts=['bin/flickruper'],
entry_points={
'console_scripts': ['flickruper = flickruper:main'],
},
url='https://github.com/ikatson/flickruper',
license='LICENSE.txt',
description='Multi-threaded uploader for Flickr',
long_description=open('README.rst').read(),
install_requires=[
"flickrapi>=1.4.4",
],
)
|
Make it installable with PyPI
|
Make it installable with PyPI
|
Python
|
mit
|
ikatson/flickruper
|
---
+++
@@ -10,7 +10,7 @@
entry_points={
'console_scripts': ['flickruper = flickruper:main'],
},
- url='http://pypi.python.org/pypi/flickruper/',
+ url='https://github.com/ikatson/flickruper',
license='LICENSE.txt',
description='Multi-threaded uploader for Flickr',
long_description=open('README.rst').read(),
|
126b9d4e49bfdba7305d727f13eb2f97b0051069
|
setup.py
|
setup.py
|
try:
from setuptools import setup
except:
from distutils.core import setup
from distutils.command import install
import forms
for scheme in install.INSTALL_SCHEMES.values():
scheme['data'] = scheme['purelib']
setup(
name='forms',
version=forms.version,
description='HTML forms framework for Nevow',
author='Matt Goodall',
author_email='matt@pollenation.net',
packages=['forms', 'forms.test'],
data_files=[
['forms', ['forms/forms.css']],
]
)
|
try:
from setuptools import setup
except:
from distutils.core import setup
import forms
setup(
name='forms',
version=forms.version,
description='HTML forms framework for Nevow',
author='Matt Goodall',
author_email='matt@pollenation.net',
packages=['forms', 'forms.test'],
package_data={
'forms': ['forms.css'],
}
)
|
Use py2.4' package_data thing instead of hacking it.
|
Use py2.4' package_data thing instead of hacking it.
|
Python
|
mit
|
emgee/formal,emgee/formal,emgee/formal
|
---
+++
@@ -2,12 +2,8 @@
from setuptools import setup
except:
from distutils.core import setup
-from distutils.command import install
import forms
-
-for scheme in install.INSTALL_SCHEMES.values():
- scheme['data'] = scheme['purelib']
setup(
name='forms',
@@ -16,7 +12,7 @@
author='Matt Goodall',
author_email='matt@pollenation.net',
packages=['forms', 'forms.test'],
- data_files=[
- ['forms', ['forms/forms.css']],
- ]
+ package_data={
+ 'forms': ['forms.css'],
+ }
)
|
a982d30b0b3f97858209b51d9c8525086daf37f8
|
setup.py
|
setup.py
|
#!/usr/bin/env python
from setuptools import setup
import maxmindupdater
with open('README.rst') as readme_file:
readme = readme_file.read().decode('utf8')
setup(
name=maxmindupdater.__name__,
version=maxmindupdater.__version__,
description=maxmindupdater.__doc__,
long_description=readme,
author='Yola',
author_email='engineers@yola.com',
license='MIT (Expat)',
url=maxmindupdater.__url__,
packages=['maxmindupdater'],
test_suite='nose.collector',
entry_points={
'console_scripts': ['maxmind-updater=maxmindupdater.__main__:main'],
},
install_requires=[
'requests >= 2.0.0, < 3.0.0',
],
classifiers=[
'License :: OSI Approved :: MIT License',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3.4',
],
)
|
#!/usr/bin/env python
from codecs import open
from setuptools import setup
import maxmindupdater
with open('README.rst', encoding='utf8') as readme_file:
readme = readme_file.read()
setup(
name=maxmindupdater.__name__,
version=maxmindupdater.__version__,
description=maxmindupdater.__doc__,
long_description=readme,
author='Yola',
author_email='engineers@yola.com',
license='MIT (Expat)',
url=maxmindupdater.__url__,
packages=['maxmindupdater'],
test_suite='nose.collector',
entry_points={
'console_scripts': ['maxmind-updater=maxmindupdater.__main__:main'],
},
install_requires=[
'requests >= 2.0.0, < 3.0.0',
],
classifiers=[
'License :: OSI Approved :: MIT License',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3.4',
],
)
|
Handle encoding better across python versions
|
Handle encoding better across python versions
|
Python
|
mit
|
yola/maxmind-updater,yola/maxmind-updater
|
---
+++
@@ -1,9 +1,10 @@
#!/usr/bin/env python
+from codecs import open
from setuptools import setup
import maxmindupdater
-with open('README.rst') as readme_file:
- readme = readme_file.read().decode('utf8')
+with open('README.rst', encoding='utf8') as readme_file:
+ readme = readme_file.read()
setup(
name=maxmindupdater.__name__,
|
ce606a9dfce7506da0072832cb5ea7c96163d582
|
setup.py
|
setup.py
|
from distutils.core import setup
setup(
name='Lookupy',
version='0.1',
author='Vineet Naik',
author_email='naikvin@gmail.com',
packages=['lookupy',],
license='MIT License',
description='Django QuerySet inspired interface to query list of dicts',
long_description=open('README.md').read(),
)
|
from distutils.core import setup
try:
long_desc = open('./README.md').read()
except IOError:
long_desc = 'See: https://github.com/naiquevin/lookupy/blob/master/README.md'
setup(
name='Lookupy',
version='0.1',
author='Vineet Naik',
author_email='naikvin@gmail.com',
packages=['lookupy',],
license='MIT License',
description='Django QuerySet inspired interface to query list of dicts',
long_description=long_desc,
)
|
Handle building the package in absence of README.md
|
Handle building the package in absence of README.md
|
Python
|
mit
|
naiquevin/lookupy
|
---
+++
@@ -1,4 +1,9 @@
from distutils.core import setup
+
+try:
+ long_desc = open('./README.md').read()
+except IOError:
+ long_desc = 'See: https://github.com/naiquevin/lookupy/blob/master/README.md'
setup(
name='Lookupy',
@@ -8,6 +13,6 @@
packages=['lookupy',],
license='MIT License',
description='Django QuerySet inspired interface to query list of dicts',
- long_description=open('README.md').read(),
+ long_description=long_desc,
)
|
3f869e81a8c5e8f62146bc09b0c316fbc1327799
|
setup.py
|
setup.py
|
form setuptools import setup, find_packages
setup(name='todo-man',
version='0.0.1',
author='Rylan Santinon',
license='Apache',
packages=['todo-man'])
|
from setuptools import setup, find_packages
setup(name='todo-man',
version='0.0.1',
author='Rylan Santinon',
description='Grab TODOs in your source code them and put them into a markdown document',
license='Apache',
packages=['todo-man'])
|
Fix typo in import statement
|
Fix typo in import statement
|
Python
|
apache-2.0
|
rylans/todo-man
|
---
+++
@@ -1,7 +1,8 @@
-form setuptools import setup, find_packages
+from setuptools import setup, find_packages
setup(name='todo-man',
version='0.0.1',
author='Rylan Santinon',
+ description='Grab TODOs in your source code them and put them into a markdown document',
license='Apache',
packages=['todo-man'])
|
2cdb59c417d2a099744f629557307331bba8d706
|
setup.py
|
setup.py
|
#!/usr/bin/env python
import os
from setuptools import setup
def read(fname):
with open(os.path.join(os.path.abspath(os.path.dirname(__file__)), fname), 'r') as infile:
content = infile.read()
return content
setup(
name='marshmallow-polyfield',
version=3.1,
description='An unofficial extension to Marshmallow to allow for polymorphic fields',
long_description=read('README.rst'),
author='Matt Bachmann',
author_email='bachmann.matt@gmail.com',
url='https://github.com/Bachmann1234/marshmallow-polyfield',
packages=['marshmallow_polyfield', 'tests'],
license=read('LICENSE'),
keywords=('serialization', 'rest', 'json', 'api', 'marshal',
'marshalling', 'deserialization', 'validation', 'schema'),
install_requires=['marshmallow>=2.0.0'],
classifiers=[
'Intended Audience :: Developers',
'License :: OSI Approved :: Apache Software License',
'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 :: Implementation :: CPython',
'Programming Language :: Python :: Implementation :: PyPy',
],
)
|
#!/usr/bin/env python
import os
from setuptools import setup
def read(fname):
with open(os.path.join(os.path.abspath(os.path.dirname(__file__)), fname), 'r') as infile:
content = infile.read()
return content
setup(
name='marshmallow-polyfield',
version=3.1,
description='An unofficial extension to Marshmallow to allow for polymorphic fields',
long_description=read('README.rst'),
author='Matt Bachmann',
author_email='bachmann.matt@gmail.com',
url='https://github.com/Bachmann1234/marshmallow-polyfield',
packages=['marshmallow_polyfield', 'tests'],
license=read('LICENSE'),
keywords=('serialization', 'rest', 'json', 'api', 'marshal',
'marshalling', 'deserialization', 'validation', 'schema'),
install_requires=['marshmallow>=2.0.0'],
classifiers=[
'Intended Audience :: Developers',
'License :: OSI Approved :: Apache Software License',
'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 :: Implementation :: CPython',
'Programming Language :: Python :: Implementation :: PyPy',
],
)
|
Add newline to make flake happy
|
Add newline to make flake happy
|
Python
|
apache-2.0
|
Bachmann1234/marshmallow-polyfield
|
---
+++
@@ -7,6 +7,7 @@
with open(os.path.join(os.path.abspath(os.path.dirname(__file__)), fname), 'r') as infile:
content = infile.read()
return content
+
setup(
name='marshmallow-polyfield',
|
572d990af00e4113b66e7fe06083032f70710874
|
setup.py
|
setup.py
|
#!/usr/bin/env python
from setuptools import setup, find_packages
setup(name='confab',
version='0.2',
description='Configuration management with Fabric and Jinja2.',
author='Location Labs',
author_email='info@locationlabs.com',
url='http://github.com/locationlabs/confab',
license='Apache2',
packages=find_packages(exclude=['*.tests']),
namespace_packages=[
'confab'
],
setup_requires=[
'nose>=1.0'
],
install_requires=[
'Fabric>=1.4',
'Jinja2>=2.4',
'python-magic'
],
test_suite = 'confab.tests',
entry_points={
'console_scripts': [
'confab = confab.main:main',
]
},
)
|
#!/usr/bin/env python
from setuptools import setup, find_packages
import os
version='0.2' + os.environ.get('BUILD_SUFFIX','')
setup(name='confab',
version=version,
description='Configuration management with Fabric and Jinja2.',
author='Location Labs',
author_email='info@locationlabs.com',
url='http://github.com/locationlabs/confab',
license='Apache2',
packages=find_packages(exclude=['*.tests']),
namespace_packages=[
'confab'
],
setup_requires=[
'nose>=1.0'
],
install_requires=[
'Fabric>=1.4',
'Jinja2>=2.4',
'python-magic'
],
test_suite = 'confab.tests',
entry_points={
'console_scripts': [
'confab = confab.main:main',
]
},
)
|
Support .dev<N> extension to version via env var.
|
Support .dev<N> extension to version via env var.
|
Python
|
apache-2.0
|
locationlabs/confab
|
---
+++
@@ -1,9 +1,12 @@
#!/usr/bin/env python
from setuptools import setup, find_packages
+import os
+
+version='0.2' + os.environ.get('BUILD_SUFFIX','')
setup(name='confab',
- version='0.2',
+ version=version,
description='Configuration management with Fabric and Jinja2.',
author='Location Labs',
author_email='info@locationlabs.com',
|
1c17410550c926960eab863c2c2e8dca63e92364
|
setup.py
|
setup.py
|
#!/usr/bin/env python3
import os.path
from setuptools import setup, find_packages
def read(fname):
return open(os.path.join(os.path.dirname(__file__), fname)).read()
setup(
name="eventstreamd",
version="0.6.1",
description="Simple Event Stream Server",
long_description=read("README.md"),
long_description_content_type="text/markdown",
author="Sebastian Rittau",
author_email="srittau@rittau.biz",
url="https://github.com/srittau/eventstreamd",
packages=find_packages(),
scripts=[os.path.join("bin", "eventstreamd")],
tests_require=["asserts >= 0.6"],
license="MIT",
classifiers=[
"Development Status :: 3 - Alpha",
"License :: OSI Approved :: MIT License",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.7",
"Topic :: Internet :: WWW/HTTP",
],
)
|
#!/usr/bin/env python3
import os.path
from setuptools import setup, find_packages
def read(fname):
return open(os.path.join(os.path.dirname(__file__), fname)).read()
setup(
name="eventstreamd",
version="0.6.1",
description="Simple Event Stream Server",
long_description=read("README.md"),
long_description_content_type="text/markdown",
author="Sebastian Rittau",
author_email="srittau@rittau.biz",
url="https://github.com/srittau/eventstreamd",
packages=find_packages(),
scripts=[os.path.join("bin", "eventstreamd")],
tests_require=["asserts >= 0.6"],
license="MIT",
classifiers=[
"Development Status :: 3 - Alpha",
"License :: OSI Approved :: MIT License",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Topic :: Internet :: WWW/HTTP",
],
)
|
Add Python 3.8 to supported versions
|
Add Python 3.8 to supported versions
|
Python
|
mit
|
srittau/eventstreamd,srittau/eventstreamd
|
---
+++
@@ -26,6 +26,7 @@
"License :: OSI Approved :: MIT License",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.7",
+ "Programming Language :: Python :: 3.8",
"Topic :: Internet :: WWW/HTTP",
],
)
|
b193cd6ffdb3343f8b5619962e275ffa63c55ed5
|
setup.py
|
setup.py
|
import subprocess
from setuptools import setup
import startup
subprocess.check_call('./gen_manifest.sh')
setup(
name = 'startup',
version = startup.__version__,
description = 'A dependency graph resolver for program startup',
long_description = startup.__doc__,
author = startup.__author__,
author_email = startup.__author_email__,
license = startup.__license__,
url = 'https://github.com/clchiou/startup',
py_modules = ['startup'],
test_suite = 'tests',
platforms = '*',
classifiers = [
'Development Status :: 1 - Planning',
'Intended Audience :: Developers',
'License :: OSI Approved :: MIT License',
'Operating System :: OS Independent',
'Programming Language :: Python :: 3 :: Only',
'Topic :: Software Development :: Libraries :: Python Modules',
],
)
|
import subprocess
from setuptools import setup
try:
import buildtools
except ImportError:
buildtools = None
import startup
subprocess.check_call('./gen_manifest.sh')
if buildtools:
cmdclass = {
'bdist_zipapp': buildtools.make_bdist_zipapp(main_optional=True),
}
else:
cmdclass = {}
setup(
name = 'startup',
version = startup.__version__,
description = 'A dependency graph resolver for program startup',
long_description = startup.__doc__,
author = startup.__author__,
author_email = startup.__author_email__,
license = startup.__license__,
url = 'https://github.com/clchiou/startup',
cmdclass = cmdclass,
py_modules = ['startup'],
test_suite = 'tests',
platforms = '*',
classifiers = [
'Development Status :: 1 - Planning',
'Intended Audience :: Developers',
'License :: OSI Approved :: MIT License',
'Operating System :: OS Independent',
'Programming Language :: Python :: 3 :: Only',
'Topic :: Software Development :: Libraries :: Python Modules',
],
)
|
Support bdist_zipapp when buildtools is available
|
Support bdist_zipapp when buildtools is available
|
Python
|
mit
|
clchiou/startup,clchiou/startup
|
---
+++
@@ -1,10 +1,23 @@
import subprocess
from setuptools import setup
+
+try:
+ import buildtools
+except ImportError:
+ buildtools = None
import startup
subprocess.check_call('./gen_manifest.sh')
+
+
+if buildtools:
+ cmdclass = {
+ 'bdist_zipapp': buildtools.make_bdist_zipapp(main_optional=True),
+ }
+else:
+ cmdclass = {}
setup(
@@ -17,6 +30,8 @@
author_email = startup.__author_email__,
license = startup.__license__,
url = 'https://github.com/clchiou/startup',
+
+ cmdclass = cmdclass,
py_modules = ['startup'],
test_suite = 'tests',
|
1f2c5b6e75224116b8c3a327aa739eed976ded11
|
setup.py
|
setup.py
|
from setuptools import setup, find_packages
setup(name='pyramid_es',
version='0.3.2.dev',
description='Elasticsearch integration for Pyramid.',
long_description=open('README.rst').read(),
classifiers=[
'Development Status :: 2 - Pre-Alpha',
'License :: OSI Approved :: MIT License',
'Programming Language :: Python :: 2',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.3',
'Programming Language :: Python :: 3.4',
'Framework :: Pyramid',
'Topic :: Internet :: WWW/HTTP :: Indexing/Search',
],
keywords='pyramid search elasticsearch',
url='http://github.com/cartlogic/pyramid_es',
author='Scott Torborg',
author_email='scott@cartlogic.com',
install_requires=[
'pyramid>=1.4',
'pyramid_tm',
'transaction',
'sqlalchemy>=0.8',
'six>=1.5.2',
'elasticsearch>=1.0.0,<2.0.0',
],
license='MIT',
packages=find_packages(),
test_suite='nose.collector',
tests_require=['nose'],
zip_safe=False)
|
from setuptools import setup, find_packages
setup(name='pyramid_es',
version='0.3.2.dev',
description='Elasticsearch integration for Pyramid.',
long_description=open('README.rst').read(),
classifiers=[
'Development Status :: 3 - Alpha',
'License :: OSI Approved :: MIT License',
'Programming Language :: Python :: 2',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.3',
'Programming Language :: Python :: 3.4',
'Framework :: Pyramid',
'Topic :: Internet :: WWW/HTTP :: Indexing/Search',
],
keywords='pyramid search elasticsearch',
url='http://github.com/cartlogic/pyramid_es',
author='Scott Torborg',
author_email='scott@cartlogic.com',
install_requires=[
'pyramid>=1.4',
'pyramid_tm',
'transaction',
'sqlalchemy>=0.8',
'six>=1.5.2',
'elasticsearch>=1.0.0,<2.0.0',
],
license='MIT',
packages=find_packages(),
test_suite='nose.collector',
tests_require=['nose'],
zip_safe=False)
|
Update pypi classifier to Alpha status
|
Update pypi classifier to Alpha status
|
Python
|
mit
|
storborg/pyramid_es
|
---
+++
@@ -6,7 +6,7 @@
description='Elasticsearch integration for Pyramid.',
long_description=open('README.rst').read(),
classifiers=[
- 'Development Status :: 2 - Pre-Alpha',
+ 'Development Status :: 3 - Alpha',
'License :: OSI Approved :: MIT License',
'Programming Language :: Python :: 2',
'Programming Language :: Python :: 2.7',
|
2f593f1581eaa4ec30c1a73a71bc8e0a52284441
|
setup.py
|
setup.py
|
from setuptools import setup
setup(
name='armstrong.base',
version='0.1.2',
description='Base functionality that needs to be shared widely',
author='Texas Tribune',
author_email='tech@texastribune.org',
url='http://github.com/texastribune/armstrong.base/',
packages=[
'armstrong.base',
'armstrong.base.templatetags',
'armstrong.base.tests',
],
namespace_packages=[
"armstrong",
],
install_requires=[
'setuptools',
],
classifiers=[
'Development Status :: 3 - Alpha',
'Environment :: Web Environment',
'Framework :: Django',
'Intended Audience :: Developers',
'License :: OSI Approved :: BSD License',
'Operating System :: OS Independent',
'Programming Language :: Python',
],
)
|
from setuptools import setup
setup(
name='armstrong.base',
version='0.1.3',
description='Base functionality that needs to be shared widely',
author='Texas Tribune',
author_email='tech@texastribune.org',
url='http://github.com/texastribune/armstrong.base/',
packages=[
'armstrong.base',
'armstrong.base.templatetags',
'armstrong.base.tests',
'armstrong.base.tests.templatetags',
],
namespace_packages=[
"armstrong",
],
install_requires=[
'setuptools',
],
classifiers=[
'Development Status :: 3 - Alpha',
'Environment :: Web Environment',
'Framework :: Django',
'Intended Audience :: Developers',
'License :: OSI Approved :: BSD License',
'Operating System :: OS Independent',
'Programming Language :: Python',
],
)
|
Install missing templatetags test package
|
Install missing templatetags test package
|
Python
|
bsd-3-clause
|
texastribune/armstrong.base
|
---
+++
@@ -2,7 +2,7 @@
setup(
name='armstrong.base',
- version='0.1.2',
+ version='0.1.3',
description='Base functionality that needs to be shared widely',
author='Texas Tribune',
author_email='tech@texastribune.org',
@@ -11,6 +11,7 @@
'armstrong.base',
'armstrong.base.templatetags',
'armstrong.base.tests',
+ 'armstrong.base.tests.templatetags',
],
namespace_packages=[
"armstrong",
|
3299b0057ab79f81103128ec15f894f6e4c039a4
|
setup.py
|
setup.py
|
import os
from setuptools import setup
with open(os.path.join(os.path.dirname(__file__), 'README.rst')) as readme:
README = readme.read()
# allow setup.py to be run from any path
os.chdir(os.path.normpath(os.path.join(os.path.abspath(__file__), os.pardir)))
setup(
name='money-to-prisoners-transaction-uploader',
version='0.1',
packages=[
'mtp_transaction_uploader',
],
entry_points={
'console_scripts': ['upload-transactions = mtp_transaction_uploader.upload:main']
},
include_package_data=True,
license='BSD License',
description='Retrieve direct services file, process, and upload transactions',
long_description=README,
dependency_links=[
'https://github.com/ministryofjustice/bankline-direct-parser/tarball/data-services-parser#egg=bankline-direct-parser'
],
install_requires=[
'requests-oauthlib==0.5.0',
'slumber==0.7.1',
'pysftp==0.2.8',
'bankline-direct-parser'
],
classifiers=[
'Intended Audience :: Python Developers',
],
test_suite='tests'
)
|
import os
from setuptools import setup
with open(os.path.join(os.path.dirname(__file__), 'README.rst')) as readme:
README = readme.read()
# allow setup.py to be run from any path
os.chdir(os.path.normpath(os.path.join(os.path.abspath(__file__), os.pardir)))
setup(
name='money-to-prisoners-transaction-uploader',
version='0.1',
packages=[
'mtp_transaction_uploader',
],
entry_points={
'console_scripts': ['upload-transactions = mtp_transaction_uploader.upload:main']
},
include_package_data=True,
license='BSD License',
description='Retrieve direct services file, process, and upload transactions',
long_description=README,
dependency_links=[
'https://github.com/ministryofjustice/bankline-direct-parser/tarball/master#egg=bankline-direct-parser'
],
install_requires=[
'requests-oauthlib==0.5.0',
'slumber==0.7.1',
'pysftp==0.2.8',
'bankline-direct-parser'
],
classifiers=[
'Intended Audience :: Python Developers',
],
test_suite='tests'
)
|
Change the parser library requirement to reference master
|
Change the parser library requirement to reference master
|
Python
|
mit
|
ministryofjustice/money-to-prisoners-transaction-uploader
|
---
+++
@@ -21,7 +21,7 @@
description='Retrieve direct services file, process, and upload transactions',
long_description=README,
dependency_links=[
- 'https://github.com/ministryofjustice/bankline-direct-parser/tarball/data-services-parser#egg=bankline-direct-parser'
+ 'https://github.com/ministryofjustice/bankline-direct-parser/tarball/master#egg=bankline-direct-parser'
],
install_requires=[
'requests-oauthlib==0.5.0',
|
de11e989fd18c2565a99e8299f76eebe0fff8dc4
|
setup.py
|
setup.py
|
import os
from setuptools import setup, find_packages
def read(fname):
return open(os.path.join(os.path.dirname(__file__), fname)).read()
setup(
name = "fastly",
version = "0.0.2,
author = "Fastly?",
author_email="support@fastly.com",
description = ("Fastly python API"),
license = "dunno",
keywords = "fastly api",
url = "https://github.com/fastly/fastly-py",
packages=find_packages(),
long_description=read('README'),
classifiers=[
"Development Status :: 3 - Alpha",
"Topic :: Utilities",
"License :: OSI Approved??? :: BSD License???",
],
entry_points = {
'console_scripts': [
'purge_service = fastly.scripts.purge_service:purge_service',
'purge_key = fastly.scripts.purge_key:purge_key',
'purge_url = fastly.scripts.purge_url:purge_url',
]
},
)
|
import os
from setuptools import setup, find_packages
def read(fname):
return open(os.path.join(os.path.dirname(__file__), fname)).read()
setup(
name = "fastly",
version = "0.0.2",
author = "Fastly?",
author_email="support@fastly.com",
description = ("Fastly python API"),
license = "dunno",
keywords = "fastly api",
url = "https://github.com/fastly/fastly-py",
packages=find_packages(),
long_description=read('README'),
classifiers=[
"Development Status :: 3 - Alpha",
"Topic :: Utilities",
"License :: OSI Approved??? :: BSD License???",
],
entry_points = {
'console_scripts': [
'purge_service = fastly.scripts.purge_service:purge_service',
'purge_key = fastly.scripts.purge_key:purge_key',
'purge_url = fastly.scripts.purge_url:purge_url',
]
},
)
|
Fix missing quote after version number.
|
Fix missing quote after version number.
|
Python
|
mit
|
fastly/fastly-py,fastly/fastly-py
|
---
+++
@@ -6,7 +6,7 @@
setup(
name = "fastly",
- version = "0.0.2,
+ version = "0.0.2",
author = "Fastly?",
author_email="support@fastly.com",
description = ("Fastly python API"),
|
46f0aa2f1dd219fa733b4e1e522c382d695ad8d6
|
setup.py
|
setup.py
|
from distutils.core import setup
setup(
name='permission',
version='0.1.2',
author='Zhipeng Liu',
author_email='hustlzp@qq.com',
url='https://github.com/hustlzp/permission',
packages=['permission'],
license='LICENSE',
description='Simple permission control for Python Web Frameworks.',
long_description=open('README.rst').read(),
classifiers=[
'Development Status :: 4 - Beta',
'Environment :: Web Environment',
'Intended Audience :: Developers',
'License :: OSI Approved :: MIT License',
'Operating System :: OS Independent',
'Programming Language :: Python :: 2.7',
'Topic :: Internet :: WWW/HTTP :: Dynamic Content',
'Topic :: Software Development :: Libraries :: Python Modules'
]
)
|
from distutils.core import setup
setup(
name='permission',
version='0.1.3',
author='Zhipeng Liu',
author_email='hustlzp@qq.com',
url='https://github.com/hustlzp/permission',
packages=['permission'],
license='LICENSE',
description='Simple and flexible permission control for Flask app.',
long_description=open('README.rst').read(),
classifiers=[
'Development Status :: 4 - Beta',
'Environment :: Web Environment',
'Intended Audience :: Developers',
'License :: OSI Approved :: MIT License',
'Operating System :: OS Independent',
'Programming Language :: Python :: 2.7',
'Topic :: Internet :: WWW/HTTP :: Dynamic Content',
'Topic :: Software Development :: Libraries :: Python Modules'
]
)
|
Update description and bump version to 0.1.3
|
Update description and bump version to 0.1.3
|
Python
|
mit
|
hustlzp/permission
|
---
+++
@@ -2,13 +2,13 @@
setup(
name='permission',
- version='0.1.2',
+ version='0.1.3',
author='Zhipeng Liu',
author_email='hustlzp@qq.com',
url='https://github.com/hustlzp/permission',
packages=['permission'],
license='LICENSE',
- description='Simple permission control for Python Web Frameworks.',
+ description='Simple and flexible permission control for Flask app.',
long_description=open('README.rst').read(),
classifiers=[
'Development Status :: 4 - Beta',
|
504d515f03fffdc999cc21a9615ea659a4e29f3b
|
setup.py
|
setup.py
|
#!/usr/bin/env python
from distutils.core import setup
setup(name='Frappy',
version='0.1',
description='Framework for creating Web APIs in Python',
author='Luke Lee',
author_email='durdenmisc@gmail.com',
url='http://github.com/durden/frappy',
packages=['frappy', 'frappy.services', 'frappy.core']
)
|
#!/usr/bin/env python
from distutils.core import setup
setup(name='Frappy',
version='0.1',
description='Framework for creating Web APIs in Python',
author='Luke Lee',
author_email='durdenmisc@gmail.com',
url='http://github.com/durden/frappy',
packages=['frappy', 'frappy.services', 'frappy.core',
'frappy.services.twitter']
)
|
Add twitter services to install since they work again
|
Add twitter services to install since they work again
|
Python
|
mit
|
durden/frappy
|
---
+++
@@ -8,5 +8,6 @@
author='Luke Lee',
author_email='durdenmisc@gmail.com',
url='http://github.com/durden/frappy',
- packages=['frappy', 'frappy.services', 'frappy.core']
+ packages=['frappy', 'frappy.services', 'frappy.core',
+ 'frappy.services.twitter']
)
|
798808550be49e941d72044622ae920171611283
|
setup.py
|
setup.py
|
from setuptools import setup, find_packages
import versioneer
def read_requirements():
import os
path = os.path.dirname(os.path.abspath(__file__))
requirements_file = os.path.join(path, 'requirements.txt')
try:
with open(requirements_file, 'r') as req_fp:
requires = req_fp.read().split()
except IOError:
return []
else:
return [require.split() for require in requires]
setup(name='PyMT',
version=versioneer.get_version(),
cmdclass=versioneer.get_cmdclass(),
description='The CSDMS Python Modeling Toolkit',
author='Eric Hutton',
author_email='huttone@colorado.edu',
url='http://csdms.colorado.edu',
setup_requires=['setuptools', ],
packages=find_packages(exclude=("tests*", "cmt")),
entry_points={
'console_scripts': [
'cmt-config=cmt.cmd.cmt_config:main',
],
},
)
|
from setuptools import setup, find_packages
import versioneer
def read_requirements():
import os
path = os.path.dirname(os.path.abspath(__file__))
requirements_file = os.path.join(path, "requirements.txt")
try:
with open(requirements_file, "r") as req_fp:
requires = req_fp.read().split()
except IOError:
return []
else:
return [require.split() for require in requires]
setup(
name="pymt",
version=versioneer.get_version(),
cmdclass=versioneer.get_cmdclass(),
description="The CSDMS Python Modeling Toolkit",
author="Eric Hutton",
author_email="huttone@colorado.edu",
url="http://csdms.colorado.edu",
setup_requires=["setuptools"],
packages=find_packages(exclude=("tests*",)),
entry_points={"console_scripts": ["cmt-config=cmt.cmd.cmt_config:main"]},
)
|
Include cmt in installed packages.
|
Include cmt in installed packages.
|
Python
|
mit
|
csdms/coupling,csdms/coupling,csdms/pymt
|
---
+++
@@ -6,11 +6,10 @@
def read_requirements():
import os
-
path = os.path.dirname(os.path.abspath(__file__))
- requirements_file = os.path.join(path, 'requirements.txt')
+ requirements_file = os.path.join(path, "requirements.txt")
try:
- with open(requirements_file, 'r') as req_fp:
+ with open(requirements_file, "r") as req_fp:
requires = req_fp.read().split()
except IOError:
return []
@@ -18,18 +17,15 @@
return [require.split() for require in requires]
-setup(name='PyMT',
- version=versioneer.get_version(),
- cmdclass=versioneer.get_cmdclass(),
- description='The CSDMS Python Modeling Toolkit',
- author='Eric Hutton',
- author_email='huttone@colorado.edu',
- url='http://csdms.colorado.edu',
- setup_requires=['setuptools', ],
- packages=find_packages(exclude=("tests*", "cmt")),
- entry_points={
- 'console_scripts': [
- 'cmt-config=cmt.cmd.cmt_config:main',
- ],
- },
+setup(
+ name="pymt",
+ version=versioneer.get_version(),
+ cmdclass=versioneer.get_cmdclass(),
+ description="The CSDMS Python Modeling Toolkit",
+ author="Eric Hutton",
+ author_email="huttone@colorado.edu",
+ url="http://csdms.colorado.edu",
+ setup_requires=["setuptools"],
+ packages=find_packages(exclude=("tests*",)),
+ entry_points={"console_scripts": ["cmt-config=cmt.cmd.cmt_config:main"]},
)
|
0451c608525ee81e27c8f8ec78d31e50f0bed9d2
|
box/models.py
|
box/models.py
|
BASE_URL = 'https://api.box.com/2.0'
FOLDERS_URL = '{}/folders/{{}}/items'.format(BASE_URL)
MAX_FOLDERS = 1000
class Client(object):
def __init__(self, provider_logic):
"""
Box client constructor
:param provider_logic: oauthclient ProviderLogic instance
:return:
"""
self.provider_logic = provider_logic
def folders(self, parent=None, limit=100, offset=0):
if parent:
folder_id = parent['id']
else:
folder_id = 0
url = FOLDERS_URL.format(folder_id)
count = 0
while count < limit:
params = {
# this is the request limit, not the number of folders we actually want
'limit': 100,
'offset': offset+count,
}
response = self.provider_logic.get(url, params=params)
json_data = response.json()
# if we hit the total number of entries, we have to be done
total_count = json_data['total_count']
if count >= total_count:
break
# determine how many more entries to get from the result set
entry_count = limit - count
entries = json_data['entries'][:entry_count]
for entry in entries:
yield entry
# increment the count by the number of entries
count += len(entries)
|
BASE_URL = 'https://api.box.com/2.0'
FOLDERS_URL = '{}/folders/{{}}/items'.format(BASE_URL)
MAX_FOLDERS = 1000
class Client(object):
def __init__(self, provider_logic):
"""
Box client constructor
:param provider_logic: oauthclient ProviderLogic instance
:return:
"""
self.provider_logic = provider_logic
def folders(self, parent=None, limit=100, offset=0):
if parent:
folder_id = parent['id']
else:
folder_id = 0
url = FOLDERS_URL.format(folder_id)
count = 0
while count < limit:
params = {
# this is the request limit, not the number of folders we actually want
'limit': 100,
'offset': offset+count,
}
response = self.provider_logic.get(url, params=params)
response.raise_for_status()
json_data = response.json()
# if we hit the total number of entries, we have to be done
total_count = json_data['total_count']
if count >= total_count:
break
# determine how many more entries to get from the result set
entry_count = limit - count
entries = json_data['entries'][:entry_count]
for entry in entries:
yield entry
# increment the count by the number of entries
count += len(entries)
|
Raise an exception when the API response is not successful
|
Raise an exception when the API response is not successful
|
Python
|
apache-2.0
|
rca/box
|
---
+++
@@ -32,6 +32,7 @@
}
response = self.provider_logic.get(url, params=params)
+ response.raise_for_status()
json_data = response.json()
|
32bbd11a910b9c1d686b2d41671f01390af3c36c
|
setup.py
|
setup.py
|
# -*- coding: utf-8 -*-
from setuptools import setup
import os
os.environ['DJANGO_SETTINGS_MODULE'] = 'tests.settings'
description = """
Django settings resolver.
"""
setup(
name = "django-sr",
url = "https://github.com/jespino/django-sr",
author = "Jesús Espino",
author_email = "jespinog@gmail.com",
version=':versiontools:sr:',
packages = [
"sr",
"sr.templatetags",
],
description = description.strip(),
install_requires=['django >= 1.3.0'],
setup_requires = [
'versiontools >= 1.8',
],
zip_safe=False,
include_package_data = False,
package_data = {},
test_suite = 'nose.collector',
tests_require = ['nose >= 1.2.1', 'django >= 1.3.0'],
classifiers = [
"Development Status :: 5 - Production/Stable",
"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",
"License :: OSI Approved :: BSD License",
"Environment :: Web Environment",
"Framework :: Django",
"Topic :: Software Development :: Libraries",
"Topic :: Utilities",
],
)
|
# -*- coding: utf-8 -*-
from setuptools import setup
import os
os.environ['DJANGO_SETTINGS_MODULE'] = 'tests.settings'
description = """
Django settings resolver.
"""
setup(
name = "django-sr",
url = "https://github.com/jespino/django-sr",
author = "Jesús Espino",
author_email = "jespinog@gmail.com",
version='0.2',
packages = [
"sr",
"sr.templatetags",
],
description = description.strip(),
install_requires=['django >= 1.3.0'],
zip_safe=False,
include_package_data = False,
package_data = {},
test_suite = 'nose.collector',
tests_require = ['nose >= 1.2.1', 'django >= 1.3.0'],
classifiers = [
"Development Status :: 5 - Production/Stable",
"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",
"License :: OSI Approved :: BSD License",
"Environment :: Web Environment",
"Framework :: Django",
"Topic :: Software Development :: Libraries",
"Topic :: Utilities",
],
)
|
Remove versiontools dependency and change version number.
|
Remove versiontools dependency and change version number.
|
Python
|
bsd-3-clause
|
jespino/django-sr
|
---
+++
@@ -13,16 +13,13 @@
url = "https://github.com/jespino/django-sr",
author = "Jesús Espino",
author_email = "jespinog@gmail.com",
- version=':versiontools:sr:',
+ version='0.2',
packages = [
"sr",
"sr.templatetags",
],
description = description.strip(),
install_requires=['django >= 1.3.0'],
- setup_requires = [
- 'versiontools >= 1.8',
- ],
zip_safe=False,
include_package_data = False,
package_data = {},
|
082dd34f8c9090f8bcb48b460e8ccc0e80aa205c
|
setup.py
|
setup.py
|
from distutils.core import setup
requirements = []
with open('requirements.txt', 'r') as f:
for line in f:
requirements.append(str(line.strip()))
setup(
name='pp_api',
version='0.1dev',
packages=['pp_api', 'pp_api.server_data'],
license='MIT',
requires=requirements
)
|
from distutils.core import setup
setup(
name='pp_api',
version='0.1dev',
packages=['pp_api', 'pp_api.server_data'],
license='MIT',
requires=open('requirements.txt', 'r').read().split()
)
|
Revert "Fixed reading of requirements from the file"
|
Revert "Fixed reading of requirements from the file"
This reverts commit 29be75d
|
Python
|
mit
|
artreven/pp_api
|
---
+++
@@ -1,15 +1,9 @@
from distutils.core import setup
-
-requirements = []
-
-with open('requirements.txt', 'r') as f:
- for line in f:
- requirements.append(str(line.strip()))
setup(
name='pp_api',
version='0.1dev',
packages=['pp_api', 'pp_api.server_data'],
license='MIT',
- requires=requirements
+ requires=open('requirements.txt', 'r').read().split()
)
|
d194c8e532b57956ef2a91f7d391b8f5a7d3c639
|
setup.py
|
setup.py
|
import os
from setuptools import setup
setup(
name = "django-jsonfield",
version = open(os.path.join(os.path.dirname(__file__), 'jsonfield', 'VERSION')).read().strip(),
description = "JSONField for django models",
long_description = open("README.rst").read(),
url = "http://bitbucket.org/schinckel/django-jsonfield/",
author = "Matthew Schinckel",
author_email = "matt@schinckel.net",
packages = [
"jsonfield",
],
classifiers = [
'Programming Language :: Python',
'License :: OSI Approved :: BSD License',
'Operating System :: OS Independent',
'Framework :: Django',
],
test_suite='tests.main',
include_package_data=True,
)
|
import os
from setuptools import setup
setup(
name = "django-jsonfield",
version = open(os.path.join(os.path.dirname(__file__), 'jsonfield', 'VERSION')).read().strip(),
description = "JSONField for django models",
long_description = open("README.rst").read(),
url = "http://bitbucket.org/schinckel/django-jsonfield/",
author = "Matthew Schinckel",
author_email = "matt@schinckel.net",
packages = [
"jsonfield",
],
classifiers = [
'Programming Language :: Python',
'Programming Language :: Python :: 3',
'License :: OSI Approved :: BSD License',
'Operating System :: OS Independent',
'Framework :: Django',
],
test_suite='tests.main',
include_package_data=True,
)
|
Add Python 3 classifier trove
|
Add Python 3 classifier trove
|
Python
|
bsd-3-clause
|
SideStudios/django-jsonfield
|
---
+++
@@ -14,6 +14,7 @@
],
classifiers = [
'Programming Language :: Python',
+ 'Programming Language :: Python :: 3',
'License :: OSI Approved :: BSD License',
'Operating System :: OS Independent',
'Framework :: Django',
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.