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
|
|---|---|---|---|---|---|---|---|---|---|---|
b902c32237febd976ae899bea41195adc58920d0
|
tests/context.py
|
tests/context.py
|
from spec import Spec
from mock import patch
from invoke.context import Context
class Context_(Spec):
class run_:
@patch('invoke.context.run')
def honors_warn_state(self, run):
Context(run={'warn': True}).run('x')
run.assert_called_with('x', warn=True)
|
from spec import Spec
from mock import patch
from invoke.context import Context
class Context_(Spec):
class run_:
def _honors(self, kwarg, value):
with patch('invoke.context.run') as run:
Context(run={kwarg: value}).run('x')
run.assert_called_with('x', **{kwarg: value})
def honors_warn_state(self):
self._honors('warn', True)
def honors_hide_state(self):
self._honors('hide', 'both')
|
Refactor + add test for run(hide)
|
Refactor + add test for run(hide)
|
Python
|
bsd-2-clause
|
pyinvoke/invoke,mattrobenolt/invoke,pfmoore/invoke,tyewang/invoke,pyinvoke/invoke,frol/invoke,kejbaly2/invoke,mkusz/invoke,frol/invoke,mkusz/invoke,kejbaly2/invoke,pfmoore/invoke,singingwolfboy/invoke,sophacles/invoke,mattrobenolt/invoke
|
---
+++
@@ -6,7 +6,13 @@
class Context_(Spec):
class run_:
- @patch('invoke.context.run')
- def honors_warn_state(self, run):
- Context(run={'warn': True}).run('x')
- run.assert_called_with('x', warn=True)
+ def _honors(self, kwarg, value):
+ with patch('invoke.context.run') as run:
+ Context(run={kwarg: value}).run('x')
+ run.assert_called_with('x', **{kwarg: value})
+
+ def honors_warn_state(self):
+ self._honors('warn', True)
+
+ def honors_hide_state(self):
+ self._honors('hide', 'both')
|
bd8c4e3640649cb9253f7a10088d8e879afc5b4f
|
st2client/st2client/models/keyvalue.py
|
st2client/st2client/models/keyvalue.py
|
# Licensed to the StackStorm, Inc ('StackStorm') under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with
# the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
from __future__ import absolute_import
import logging
from st2client.models import core
LOG = logging.getLogger(__name__)
class KeyValuePair(core.Resource):
_alias = 'Key'
_display_name = 'Key Value Pair'
_plural = 'Keys'
_plural_display_name = 'Key Value Pairs'
_repr_attributes = ['name', 'value']
# Note: This is a temporary hack until we refactor client and make it support non id PKs
|
# Licensed to the StackStorm, Inc ('StackStorm') under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with
# the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
from __future__ import absolute_import
import logging
from st2client.models import core
LOG = logging.getLogger(__name__)
class KeyValuePair(core.Resource):
_alias = 'Key'
_display_name = 'Key Value Pair'
_plural = 'Keys'
_plural_display_name = 'Key Value Pairs'
_repr_attributes = ['name', 'value']
# Note: This is a temporary hack until we refactor client and make it support non id PKs
def get_id(self):
return self.name
def set_id(self, value):
pass
id = property(get_id, set_id)
|
Add back code which is needed.
|
Add back code which is needed.
|
Python
|
apache-2.0
|
StackStorm/st2,nzlosh/st2,StackStorm/st2,nzlosh/st2,StackStorm/st2,Plexxi/st2,nzlosh/st2,nzlosh/st2,Plexxi/st2,StackStorm/st2,Plexxi/st2,Plexxi/st2
|
---
+++
@@ -31,3 +31,10 @@
_repr_attributes = ['name', 'value']
# Note: This is a temporary hack until we refactor client and make it support non id PKs
+ def get_id(self):
+ return self.name
+
+ def set_id(self, value):
+ pass
+
+ id = property(get_id, set_id)
|
8e5854e09a0c05a46257eb7130aac48c0dcb9079
|
backdrop/collector/__init__.py
|
backdrop/collector/__init__.py
|
__VERSION__ = "0.0.6"
__AUTHOR__ = "GDS Developers"
__AUTHOR_EMAIL__ = ""
|
__VERSION__ = "0.0.8"
__AUTHOR__ = "GDS Developers"
__AUTHOR_EMAIL__ = ""
|
Bring __VERSION__ inline with latest tag
|
Bring __VERSION__ inline with latest tag
|
Python
|
mit
|
gds-attic/backdrop-collector,alphagov/performanceplatform-collector,alphagov/performanceplatform-collector,alphagov/performanceplatform-collector,gds-attic/backdrop-collector
|
---
+++
@@ -1,3 +1,3 @@
-__VERSION__ = "0.0.6"
+__VERSION__ = "0.0.8"
__AUTHOR__ = "GDS Developers"
__AUTHOR_EMAIL__ = ""
|
240ae629ba54d79d9306227fa9a88e8bc93324ea
|
tests/extractor_test.py
|
tests/extractor_test.py
|
import os
import shutil
from nose.tools import *
import beastling.beastxml
import beastling.configuration
import beastling.extractor
def test_extractor():
config = beastling.configuration.Configuration(configfile="tests/configs/embed_data.conf")
config.process()
xml = beastling.beastxml.BeastXml(config)
os.makedirs("testing_tmp_dir")
os.chdir("testing_tmp_dir")
xml.write_file("beastling.xml")
beastling.extractor.extract("beastling.xml")
os.chdir("..")
shutil.rmtree("testing_tmp_dir")
assert not os.path.exists("testing_tmp_dir")
|
import os
import shutil
from nose.tools import *
import beastling.beastxml
import beastling.configuration
import beastling.extractor
_test_dir = os.path.dirname(__file__)
def test_extractor():
config = beastling.configuration.Configuration(configfile="tests/configs/embed_data.conf")
config.process()
xml = beastling.beastxml.BeastXml(config)
os.makedirs("testing_tmp_dir")
os.chdir("testing_tmp_dir")
xml.write_file("beastling.xml")
beastling.extractor.extract("beastling.xml")
def teardown():
os.chdir(os.path.join(_test_dir, ".."))
shutil.rmtree("testing_tmp_dir")
|
Clean up afterwards, even if test fails.
|
Clean up afterwards, even if test fails.
|
Python
|
bsd-2-clause
|
lmaurits/BEASTling
|
---
+++
@@ -7,6 +7,8 @@
import beastling.configuration
import beastling.extractor
+_test_dir = os.path.dirname(__file__)
+
def test_extractor():
config = beastling.configuration.Configuration(configfile="tests/configs/embed_data.conf")
config.process()
@@ -15,6 +17,7 @@
os.chdir("testing_tmp_dir")
xml.write_file("beastling.xml")
beastling.extractor.extract("beastling.xml")
- os.chdir("..")
+
+def teardown():
+ os.chdir(os.path.join(_test_dir, ".."))
shutil.rmtree("testing_tmp_dir")
- assert not os.path.exists("testing_tmp_dir")
|
ba1de19895b001069966a10d9c72b8485c4b4195
|
tests/testapp/views.py
|
tests/testapp/views.py
|
from __future__ import unicode_literals
from django.shortcuts import get_object_or_404, render
from django.utils.html import format_html, mark_safe
from content_editor.contents import contents_for_mptt_item
from content_editor.renderer import PluginRenderer
from .models import Page, RichText, Image, Snippet, External
renderer = PluginRenderer()
renderer.register(
RichText,
lambda plugin: mark_safe(plugin.text),
)
renderer.register(
Image,
lambda plugin: format_html(
'<figure><img src="{}" alt=""/><figcaption>{}</figcaption></figure>',
plugin.image.url,
plugin.caption,
),
)
def page_detail(request, path=None):
page = get_object_or_404(
Page.objects.active(),
path='/{}/'.format(path) if path else '/',
)
page.activate_language(request)
contents = contents_for_mptt_item(
page,
[RichText, Image, Snippet, External],
)
return render(request, page.template.template_name, {
'page': page,
'content': {
region.key: renderer.render(contents[region.key])
for region in page.regions
},
})
|
from __future__ import unicode_literals
from django.shortcuts import get_object_or_404, render
from django.utils.html import format_html
from content_editor.contents import contents_for_mptt_item
from content_editor.renderer import PluginRenderer
from feincms3 import plugins
from .models import Page, RichText, Image, Snippet, External
renderer = PluginRenderer()
renderer.register(
RichText,
plugins.render_richtext,
)
renderer.register(
Image,
lambda plugin: format_html(
'<figure><img src="{}" alt=""/><figcaption>{}</figcaption></figure>',
plugin.image.url,
plugin.caption,
),
)
def page_detail(request, path=None):
page = get_object_or_404(
Page.objects.active(),
path='/{}/'.format(path) if path else '/',
)
page.activate_language(request)
contents = contents_for_mptt_item(
page,
[RichText, Image, Snippet, External],
)
return render(request, page.template.template_name, {
'page': page,
'content': {
region.key: renderer.render(contents[region.key])
for region in page.regions
},
})
|
Use render_richtext in test suite
|
Use render_richtext in test suite
|
Python
|
bsd-3-clause
|
matthiask/feincms3,matthiask/feincms3,matthiask/feincms3
|
---
+++
@@ -1,10 +1,12 @@
from __future__ import unicode_literals
from django.shortcuts import get_object_or_404, render
-from django.utils.html import format_html, mark_safe
+from django.utils.html import format_html
from content_editor.contents import contents_for_mptt_item
from content_editor.renderer import PluginRenderer
+
+from feincms3 import plugins
from .models import Page, RichText, Image, Snippet, External
@@ -12,7 +14,7 @@
renderer = PluginRenderer()
renderer.register(
RichText,
- lambda plugin: mark_safe(plugin.text),
+ plugins.render_richtext,
)
renderer.register(
Image,
|
7b1773d5c3fa07899ad9d56d4ac488c1c2e2014e
|
dope_cherry.py
|
dope_cherry.py
|
#!/usr/bin/env python
# coding=utf8
# This is an example of how to run dope (or any other WSGI app) in CherryPy.
# Running it will start dope at the document root, and the server on port 80.
#
# Assuming a virtual environment in which cherrypy is installed, this would be
# the way to run it:
#
# $ /path/to/virtualenv/bin/python /path/to/virtualenv/bin/cherryd -i dope_cherry
from dope import app
import cherrypy
# graft to tree root
cherrypy.tree.graft(app)
# configure
cherrypy.config.update({
'server.socket_port': 80,
'server.socket_host': '0.0.0.0',
'run_as_user': 'nobody',
'run_as_group': 'nogroup',
})
cherrypy.config.update('dope_cherry.cfg')
# drop priviledges
cherrypy.process.plugins.DropPrivileges(cherrypy.engine, uid = cherrypy.config['run_as_user'], gid = cherrypy.config['run_as_group']).subscribe()
|
#!/usr/bin/env python
# coding=utf8
# This is an example of how to run dope (or any other WSGI app) in CherryPy.
# Running it will start dope at the document root, and the server on port 80.
#
# Assuming a virtual environment in which cherrypy is installed, this would be
# the way to run it:
#
# $ /path/to/virtualenv/bin/python /path/to/virtualenv/bin/cherryd -i dope_cherry
from dope import app
import cherrypy
# graft to tree root
cherrypy.tree.graft(app)
# configure
cherrypy.config.update({
'server.socket_port': 80,
'server.socket_host': '0.0.0.0',
'server.max_request_body_size': 0, # unlimited
'run_as_user': 'nobody',
'run_as_group': 'nogroup',
})
cherrypy.config.update('dope_cherry.cfg')
# drop priviledges
cherrypy.process.plugins.DropPrivileges(cherrypy.engine, uid = cherrypy.config['run_as_user'], gid = cherrypy.config['run_as_group']).subscribe()
|
Set server.max_request_body_size in cherrypy settings to allow more then 100M uploads.
|
Set server.max_request_body_size in cherrypy settings to allow more then 100M uploads.
|
Python
|
mit
|
mbr/dope,mbr/dope
|
---
+++
@@ -19,6 +19,7 @@
cherrypy.config.update({
'server.socket_port': 80,
'server.socket_host': '0.0.0.0',
+ 'server.max_request_body_size': 0, # unlimited
'run_as_user': 'nobody',
'run_as_group': 'nogroup',
})
|
b345d27486376ed4c1b9edbbf999cef074b21b3c
|
lambda_utils/setup.py
|
lambda_utils/setup.py
|
import os
from setuptools import find_packages, setup
def local_file(name):
return os.path.relpath(os.path.join(os.path.dirname(__file__), name))
SOURCE = local_file('src')
setup(
name='wellcome_lambda_utils',
packages=find_packages(SOURCE),
package_dir={'': SOURCE},
version='1.0.6',
install_requires=[
'attrs>=17.2.0',
'boto3',
'daiquiri>=1.3.0',
'python-dateutil',
'requests>=2.18.4',
],
python_requires='>=3.6',
description='Common lib for lambdas',
author='Wellcome digital platform',
author_email='wellcomedigitalplatform@wellcome.ac.uk',
url='https://github.com/wellcometrust/platform',
keywords=['lambda', 'utils'],
classifiers=[],
)
|
import os
from setuptools import find_packages, setup
def local_file(name):
return os.path.relpath(os.path.join(os.path.dirname(__file__), name))
SOURCE = local_file('src')
setup(
name='wellcome_lambda_utils',
packages=find_packages(SOURCE),
package_dir={'': SOURCE},
version='2017.10.20',
install_requires=[
'attrs>=17.2.0',
'boto3',
'daiquiri>=1.3.0',
'python-dateutil',
'requests>=2.18.4',
],
python_requires='>=3.6',
description='Common lib for lambdas',
author='Wellcome digital platform',
author_email='wellcomedigitalplatform@wellcome.ac.uk',
url='https://github.com/wellcometrust/platform',
keywords=['lambda', 'utils'],
classifiers=[],
)
|
Switch lambda_utils to CalVer, bump the version
|
Switch lambda_utils to CalVer, bump the version
|
Python
|
mit
|
wellcometrust/platform-api,wellcometrust/platform-api,wellcometrust/platform-api,wellcometrust/platform-api
|
---
+++
@@ -13,7 +13,7 @@
name='wellcome_lambda_utils',
packages=find_packages(SOURCE),
package_dir={'': SOURCE},
- version='1.0.6',
+ version='2017.10.20',
install_requires=[
'attrs>=17.2.0',
'boto3',
|
2ca649f158a5ec4b93105081d93eba7516419c53
|
tests/simple_service.py
|
tests/simple_service.py
|
from gi.repository import GLib
import dbus
import dbus.service
from dbus.mainloop.glib import DBusGMainLoop
class MyDBUSService(dbus.service.Object):
def __init__(self):
bus_name = dbus.service.BusName('com.zielmicha.test', bus=dbus.SessionBus())
dbus.service.Object.__init__(self, bus_name, '/com/zielmicha/test')
@dbus.service.method('com.zielmicha.test')
def hello(self, *args, **kwargs):
print 'hello world {} {}'.format(args, kwargs)
return ("Hello, world!", args[0] if args else 1)
@dbus.service.signal('com.zielmicha.testsignal')
def hello_sig(self):
print 'hello world sig'
DBusGMainLoop(set_as_default=True)
myservice = MyDBUSService()
loop = GLib.MainLoop()
loop.run()
|
from gi.repository import GLib
import dbus
import dbus.service
from dbus.mainloop.glib import DBusGMainLoop
class MyDBUSService(dbus.service.Object):
def __init__(self):
bus_name = dbus.service.BusName('com.zielmicha.test', bus=dbus.SessionBus())
dbus.service.Object.__init__(self, bus_name, '/com/zielmicha/test')
@dbus.service.method('com.zielmicha.test')
def hello(self, *args, **kwargs):
print( 'hello world {} {}'.format(args, kwargs) )
return ("Hello, world!", args[0] if args else 1)
@dbus.service.signal('com.zielmicha.testsignal')
def hello_sig(self):
print( 'hello world sig' )
DBusGMainLoop(set_as_default=True)
myservice = MyDBUSService()
loop = GLib.MainLoop()
loop.run()
|
Make python script work with python 3 as well as python 2.7
|
Make python script work with python 3 as well as python 2.7
|
Python
|
mit
|
zielmicha/nim-dbus,zielmicha/nim-dbus,zielmicha/nim-dbus
|
---
+++
@@ -10,12 +10,12 @@
@dbus.service.method('com.zielmicha.test')
def hello(self, *args, **kwargs):
- print 'hello world {} {}'.format(args, kwargs)
+ print( 'hello world {} {}'.format(args, kwargs) )
return ("Hello, world!", args[0] if args else 1)
@dbus.service.signal('com.zielmicha.testsignal')
def hello_sig(self):
- print 'hello world sig'
+ print( 'hello world sig' )
DBusGMainLoop(set_as_default=True)
myservice = MyDBUSService()
|
7fcc7a2540eabdd1ccbe85fa62df66f1caeb24ae
|
setup.py
|
setup.py
|
from setuptools import setup, find_packages
from codebuilder import __version__
setup(
name='codebuilder',
version=__version__,
description='CLI helper for AWS CodeBuild and CodePipeline',
url='http://github.com/wnkz/codebuilder',
author='wnkz',
author_email='g@predicsis.ai',
license='MIT',
packages=find_packages(),
zip_safe=False,
install_requires = [
'Click',
'boto3',
'dpath',
'awscli'
],
entry_points = {
'console_scripts': [
'codebuilder=codebuilder.cli:cli',
],
},
)
|
from setuptools import setup, find_packages
from codebuilder import __version__
setup(
name='codebuilder',
version=__version__,
description='CLI helper for AWS CodeBuild and CodePipeline',
url='http://github.com/wnkz/codebuilder',
author='wnkz',
author_email='g@predicsis.ai',
license='MIT',
packages=find_packages(),
zip_safe=False,
install_requires = [
'Click',
'boto3',
'dpath'
],
entry_points = {
'console_scripts': [
'codebuilder=codebuilder.cli:cli',
],
},
)
|
Remove awscli dependency and assume it is installed
|
Remove awscli dependency and assume it is installed
|
Python
|
mit
|
wnkz/codebuilder,wnkz/codebuilder
|
---
+++
@@ -15,8 +15,7 @@
install_requires = [
'Click',
'boto3',
- 'dpath',
- 'awscli'
+ 'dpath'
],
entry_points = {
'console_scripts': [
|
9c9d16d9a71986373d9bbe06d6c3484f97553152
|
setup.py
|
setup.py
|
from setuptools import setup
from os import path
here = path.abspath(path.dirname(__file__))
with open(path.join(here, 'README.rst'), encoding='utf-8') as readme_file:
long_description = readme_file.read()
setup(
name='ordering',
version='0.1.0',
description='A data structure to impose a total order on a collection of objects',
long_description=long_description,
url='https://github.com/madman-bob/python-order-maintenance',
author='Robert Wright',
author_email='madman.bob@hotmail.co.uk',
license='MIT',
classifiers=[
'Development Status :: 3 - Alpha',
'Intended Audience :: Developers',
'License :: OSI Approved :: MIT License',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.6',
],
keywords=['order', 'ordering'],
packages=['ordering'],
python_requires='>=3.6'
)
|
from setuptools import setup
from os import path
here = path.abspath(path.dirname(__file__))
with open(path.join(here, 'README.rst'), encoding='utf-8') as readme_file:
long_description = readme_file.read()
setup(
name='ordering',
version='0.2.0',
description='A data structure to impose a total order on a collection of objects',
long_description=long_description,
url='https://github.com/madman-bob/python-order-maintenance',
author='Robert Wright',
author_email='madman.bob@hotmail.co.uk',
license='MIT',
classifiers=[
'Development Status :: 3 - Alpha',
'Intended Audience :: Developers',
'License :: OSI Approved :: MIT License',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.6',
],
keywords=['order', 'ordering'],
packages=['ordering'],
python_requires='>=3.6'
)
|
Bump version number to 0.2.0
|
Bump version number to 0.2.0
|
Python
|
mit
|
madman-bob/python-order-maintenance
|
---
+++
@@ -8,7 +8,7 @@
setup(
name='ordering',
- version='0.1.0',
+ version='0.2.0',
description='A data structure to impose a total order on a collection of objects',
long_description=long_description,
url='https://github.com/madman-bob/python-order-maintenance',
|
45569a10768ce5730a25699611d8de07cbcc8491
|
setup.py
|
setup.py
|
from setuptools import setup, find_packages
try:
import pypandoc
def long_description():
return pypandoc.convert_file('README.md', 'rst')
except ImportError:
def long_description():
return ''
setup(
name='rq-retry-scheduler',
version='0.1.0b6',
url='https://github.com/mikemill/rq_retry_scheduler',
description='RQ Retry and Scheduler',
long_description=long_description(),
author='Michael Miller',
author_email='mikemill@gmail.com',
packages=find_packages(exclude=['*tests*']),
license='MIT',
install_requires=['rq>=0.6.0'],
zip_safe=False,
platforms='any',
entry_points={
'console_scripts': [
'rqscheduler = rq_retry_scheduler.cli:main',
],
},
classifiers=[
'Development Status :: 4 - Beta',
'License :: OSI Approved :: MIT License',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3.4',
'Programming Language :: Python :: 3.5',
'Programming Language :: Python :: 3.6',
]
)
|
from setuptools import setup, find_packages
try:
import pypandoc
def long_description():
return pypandoc.convert_file('README.md', 'rst')
except ImportError:
def long_description():
return ''
setup(
name='rq-retry-scheduler',
version='0.1.1b1',
url='https://github.com/mikemill/rq_retry_scheduler',
description='RQ Retry and Scheduler',
long_description=long_description(),
author='Michael Miller',
author_email='mikemill@gmail.com',
packages=find_packages(exclude=['*tests*']),
license='MIT',
install_requires=['rq>=0.6.0'],
zip_safe=False,
platforms='any',
entry_points={
'console_scripts': [
'rqscheduler = rq_retry_scheduler.cli:main',
],
},
classifiers=[
'Development Status :: 4 - Beta',
'License :: OSI Approved :: MIT License',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3.4',
'Programming Language :: Python :: 3.5',
'Programming Language :: Python :: 3.6',
]
)
|
Update the version number in preparation for release.
|
Update the version number in preparation for release.
|
Python
|
mit
|
mikemill/rq_retry_scheduler
|
---
+++
@@ -13,7 +13,7 @@
setup(
name='rq-retry-scheduler',
- version='0.1.0b6',
+ version='0.1.1b1',
url='https://github.com/mikemill/rq_retry_scheduler',
description='RQ Retry and Scheduler',
long_description=long_description(),
|
9addb88d7d3b9067a0581cb46b048ad693bbb720
|
setup.py
|
setup.py
|
try:
from setuptools import setup
except ImportError:
from distutils.core import setup
config = {
'Description': 'A simple Finite Element Modeling (FEM) library',
'author': 'Greg Hamel (MrJarv1s)',
'url': 'https://github.com/MrJarv1s/FEMur',
'download_url': 'https://github.com/MrJarv1s/FEMur',
'author_email': 'hamegreg@gmail.com',
'version': '0.1',
'install_requires': ['nose', 'numpy', 'scipy', 'sympy'],
'packages': ['FEMur'],
'scripts': [],
'name': 'FEMur',
'classifiers': [
"Development Status :: 2 - Pre-Alpha",
"Environment :: Console",
"License :: OSI Approved :: MIT License",
"Natural Language :: English",
"Programming Language :: Python :: 3.6",
"Topic :: Scientific/Engineering"
]
}
setup(**config)
|
try:
from setuptools import setup
except ImportError:
from distutils.core import setup
config = {
'Description': 'A simple Finite Element Modeling (FEM) library',
'author': 'Greg Hamel (MrJarv1s)',
'url': 'https://github.com/MrJarv1s/FEMur',
'download_url': 'https://github.com/MrJarv1s/FEMur',
'author_email': 'hamegreg@gmail.com',
'version': '0.1',
'install_requires': ['nose', 'numpy', 'scipy', 'sympy', 'matplotlib'],
'packages': ['FEMur'],
'scripts': [],
'name': 'FEMur',
'classifiers': [
"Development Status :: 2 - Pre-Alpha",
"Environment :: Console",
"License :: OSI Approved :: MIT License",
"Natural Language :: English",
"Programming Language :: Python :: 3.6",
"Topic :: Scientific/Engineering"
]
}
setup(**config)
|
Add matplotlib as a dependency
|
Add matplotlib as a dependency
|
Python
|
mit
|
MrJarv1s/FEMur
|
---
+++
@@ -10,7 +10,7 @@
'download_url': 'https://github.com/MrJarv1s/FEMur',
'author_email': 'hamegreg@gmail.com',
'version': '0.1',
- 'install_requires': ['nose', 'numpy', 'scipy', 'sympy'],
+ 'install_requires': ['nose', 'numpy', 'scipy', 'sympy', 'matplotlib'],
'packages': ['FEMur'],
'scripts': [],
'name': 'FEMur',
|
44083ea7efc9a48c86ee5ce749cce94cb98bdc05
|
spicedham/nonsensefilter.py
|
spicedham/nonsensefilter.py
|
import operator
from itertools import imap, repeat
from spicedham.config import config
from spicedham.backend import Backend
class NonsenseFilter(object):
def __init__(self):
self.filter_match = config['nonsensefilter']['filter_match']
self.filter_miss = config['nonsensefilter']['filter_miss']
def train(self, tag, response, value):
pass
def classify(self, tag, response):
list_in_dict = lambda x: not Backend.get_key(x, False)
if all(imap(list_in_dict, repeat(tag), response)):
return self.filter_match
else:
return self.filter_miss
|
import operator
from itertools import imap, repeat
from spicedham.config import config
from spicedham.backend import Backend
class NonsenseFilter(object):
def __init__(self):
self.filter_match = config['nonsensefilter']['filter_match']
self.filter_miss = config['nonsensefilter']['filter_miss']
def train(self, tag, response, value):
pass
def classify(self, tag, response):
list_in_dict = lambda x, y: not Backend.get_key(x, y, False)
if all(imap(list_in_dict, repeat(tag), response)):
return self.filter_match
else:
return self.filter_miss
|
Fix nonsense filter lambda so it uses tags
|
Fix nonsense filter lambda so it uses tags
|
Python
|
mpl-2.0
|
mozilla/spicedham,mozilla/spicedham
|
---
+++
@@ -13,7 +13,7 @@
pass
def classify(self, tag, response):
- list_in_dict = lambda x: not Backend.get_key(x, False)
+ list_in_dict = lambda x, y: not Backend.get_key(x, y, False)
if all(imap(list_in_dict, repeat(tag), response)):
return self.filter_match
else:
|
df973fa9fe8f0dc4b8b6a50ff7410e9fd4faed2b
|
setup.py
|
setup.py
|
from setuptools import setup
import glob
import os.path as op
from os import listdir
from pyuvdata import version
import json
data = [version.git_origin, version.git_hash, version.git_description, version.git_branch]
with open(op.join('pyuvdata', 'GIT_INFO'), 'w') as outfile:
json.dump(data, outfile)
setup_args = {
'name': 'pyuvdata',
'author': 'HERA Team',
'url': 'https://github.com/HERA-Team/pyuvdata',
'license': 'BSD',
'description': 'an interface for astronomical interferometeric datasets in python',
'package_dir': {'pyuvdata': 'pyuvdata'},
'packages': ['pyuvdata', 'pyuvdata.tests'],
'scripts': glob.glob('scripts/*'),
'version': version.version,
'include_package_data': True,
'install_requires': ['numpy>=1.10', 'scipy', 'astropy>=1.2', 'pyephem', 'aipy'],
'classifiers': ['Development Status :: 5 - Production/Stable',
'Intended Audience :: Science/Research',
'License :: OSI Approved :: BSD License',
'Programming Language :: Python :: 2.7',
'Topic :: Scientific/Engineering :: Astronomy'],
'keywords': 'radio astronomy interferometry'
}
if __name__ == '__main__':
apply(setup, (), setup_args)
|
from setuptools import setup
import glob
import os.path as op
from os import listdir
from pyuvdata import version
import json
data = [version.git_origin, version.git_hash, version.git_description, version.git_branch]
with open(op.join('pyuvdata', 'GIT_INFO'), 'w') as outfile:
json.dump(data, outfile)
setup_args = {
'name': 'pyuvdata',
'author': 'HERA Team',
'url': 'https://github.com/HERA-Team/pyuvdata',
'license': 'BSD',
'description': 'an interface for astronomical interferometeric datasets in python',
'package_dir': {'pyuvdata': 'pyuvdata'},
'packages': ['pyuvdata', 'pyuvdata.tests'],
'scripts': glob.glob('scripts/*'),
'version': version.version,
'include_package_data': True,
'install_requires': ['numpy>=1.10', 'scipy', 'astropy>=1.2', 'pyephem', 'aipy>=2.1.5'],
'classifiers': ['Development Status :: 5 - Production/Stable',
'Intended Audience :: Science/Research',
'License :: OSI Approved :: BSD License',
'Programming Language :: Python :: 2.7',
'Topic :: Scientific/Engineering :: Astronomy'],
'keywords': 'radio astronomy interferometry'
}
if __name__ == '__main__':
apply(setup, (), setup_args)
|
Add an aipy version requirement
|
Add an aipy version requirement
|
Python
|
bsd-2-clause
|
HERA-Team/pyuvdata,HERA-Team/pyuvdata,HERA-Team/pyuvdata,HERA-Team/pyuvdata
|
---
+++
@@ -20,7 +20,7 @@
'scripts': glob.glob('scripts/*'),
'version': version.version,
'include_package_data': True,
- 'install_requires': ['numpy>=1.10', 'scipy', 'astropy>=1.2', 'pyephem', 'aipy'],
+ 'install_requires': ['numpy>=1.10', 'scipy', 'astropy>=1.2', 'pyephem', 'aipy>=2.1.5'],
'classifiers': ['Development Status :: 5 - Production/Stable',
'Intended Audience :: Science/Research',
'License :: OSI Approved :: BSD License',
|
f46a0cb7109d3532aa4cba8b0e351fe20bc8056f
|
setup.py
|
setup.py
|
import os
from setuptools import find_packages, setup
about_path = os.path.join(os.path.dirname(__file__), "revscoring/about.py")
exec(compile(open(about_path).read(), about_path, "exec"))
def read(fname):
return open(os.path.join(os.path.dirname(__file__), fname)).read()
def requirements(fname):
return [line.strip()
for line in open(os.path.join(os.path.dirname(__file__), fname))]
setup(
name=__name__, # noqa
version=__version__, # noqa
author=__author__, # noqa
author_email=__author_email__, # noqa
description=__description__, # noqa
url=__url__, # noqa
license=__license__, # noqa
entry_points={
'console_scripts': [
'revscoring = revscoring.revscoring:main',
],
},
packages=find_packages(),
long_description=read('README.md'),
install_requires=requirements("requirements.txt"),
classifiers=[
"Development Status :: 3 - Alpha",
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Environment :: Other Environment",
"Intended Audience :: Developers",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent"
],
)
|
import os
import sys
import package
from setuptools import find_packages, setup
about_path = os.path.join(os.path.dirname(__file__), "revscoring/about.py")
exec(compile(open(about_path).read(), about_path, "exec"))
if sys.version_info <= (3, 0):
print("Revscoring needs Python 3 to run properly. Your version is " + platform.python_version())
sys.exit(1)
def read(fname):
return open(os.path.join(os.path.dirname(__file__), fname)).read()
def requirements(fname):
return [line.strip()
for line in open(os.path.join(os.path.dirname(__file__), fname))]
setup(
python_requires:"<=3"
name=__name__, # noqa
version=__version__, # noqa
author=__author__, # noqa
author_email=__author_email__, # noqa
description=__description__, # noqa
url=__url__, # noqa
license=__license__, # noqa
entry_points={
'console_scripts': [
'revscoring = revscoring.revscoring:main',
],
},
packages=find_packages(),
long_description=read('README.md'),
install_requires=requirements("requirements.txt"),
classifiers=[
"Development Status :: 3 - Alpha",
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Environment :: Other Environment",
"Intended Audience :: Developers",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent"
],
)
|
Add hard requirements for py3
|
Add hard requirements for py3
|
Python
|
mit
|
wiki-ai/revscoring,he7d3r/revscoring
|
---
+++
@@ -1,9 +1,15 @@
import os
-
+import sys
+import package
from setuptools import find_packages, setup
about_path = os.path.join(os.path.dirname(__file__), "revscoring/about.py")
exec(compile(open(about_path).read(), about_path, "exec"))
+
+
+if sys.version_info <= (3, 0):
+ print("Revscoring needs Python 3 to run properly. Your version is " + platform.python_version())
+ sys.exit(1)
def read(fname):
@@ -16,6 +22,7 @@
setup(
+ python_requires:"<=3"
name=__name__, # noqa
version=__version__, # noqa
author=__author__, # noqa
|
0cee0801c8a5fd320a0e0b4cb7136ec1360539f0
|
api/api/views/attendee/rsvp.py
|
api/api/views/attendee/rsvp.py
|
"""
Submit an RSVP for the current user
"""
from django import forms
from hackfsu_com.views.generic import ApiView
from hackfsu_com.util import acl
from api.models import AttendeeStatus, Hackathon
from django.utils import timezone
class RequestForm(forms.Form):
rsvp_answer = forms.BooleanField(required=False)
extra_info = forms.CharField(required=False, max_length=500)
class RsvpView(ApiView):
request_form_class = RequestForm
allowed_after_current_hackathon_ends = False
access_manager = acl.AccessManager(acl_accept=[
acl.group_hacker,
acl.group_mentor,
acl.group_organizer,
acl.group_judge
])
def authenticate(self, request):
if not super().authenticate(request):
return False
# Add check to make sure not already RSVP'd
return AttendeeStatus.objects.filter(
hackathon=Hackathon.objects.current(), user=request.user, rsvp_submitted_at__isnull=True
).exists()
def work(self, request, req, res):
status = AttendeeStatus.objects.get(hackathon=Hackathon.objects.current(), user=request.user)
status.rsvp_result = req['rsvp_answer']
status.rsvp_submitted_at = timezone.now()
status.extra_info = req['extra_info']
status.save()
|
"""
Submit an RSVP for the current user
"""
from django import forms
from hackfsu_com.views.generic import ApiView
from hackfsu_com.util import acl
from api.models import AttendeeStatus, Hackathon
from django.utils import timezone
class RequestForm(forms.Form):
rsvp_answer = forms.BooleanField(required=False)
extra_info = forms.CharField(required=False, max_length=500)
class RsvpView(ApiView):
request_form_class = RequestForm
allowed_after_current_hackathon_ends = True
access_manager = acl.AccessManager(acl_accept=[
acl.group_hacker,
acl.group_mentor,
acl.group_organizer,
acl.group_judge
])
def authenticate(self, request):
if not super().authenticate(request):
return False
# Add check to make sure not already RSVP'd
return AttendeeStatus.objects.filter(
hackathon=Hackathon.objects.current(), user=request.user, rsvp_submitted_at__isnull=True
).exists()
def work(self, request, req, res):
status = AttendeeStatus.objects.get(hackathon=Hackathon.objects.current(), user=request.user)
status.rsvp_result = req['rsvp_answer']
status.rsvp_submitted_at = timezone.now()
status.extra_info = req['extra_info']
status.save()
|
Allow RSVP after hackathon ends
|
Allow RSVP after hackathon ends
damn it jared
|
Python
|
apache-2.0
|
andrewsosa/hackfsu_com,andrewsosa/hackfsu_com,andrewsosa/hackfsu_com,andrewsosa/hackfsu_com
|
---
+++
@@ -16,7 +16,7 @@
class RsvpView(ApiView):
request_form_class = RequestForm
- allowed_after_current_hackathon_ends = False
+ allowed_after_current_hackathon_ends = True
access_manager = acl.AccessManager(acl_accept=[
acl.group_hacker,
acl.group_mentor,
|
0f8ba23c445a56897a00c25b6a2784484e567045
|
setup.py
|
setup.py
|
#!/usr/bin/env python
"""
Setup script for PythonTemplateDemo.
"""
import setuptools
from demo import __project__, __version__
import os
if os.path.exists('README.rst'):
README = open('README.rst').read()
else:
README = "" # a placeholder, readme is generated on release
CHANGES = open('CHANGES.md').read()
setuptools.setup(
name=__project__,
version=__version__,
description="PythonTemplateDemo is a Python 3 package template.",
url='https://github.com/jacebrowning/template-python-demo',
author='Jace Browning',
author_email='jacebrowning@gmail.com',
packages=setuptools.find_packages(),
entry_points={'console_scripts': []},
long_description=(README + '\n' + CHANGES),
license='MIT',
classifiers=[
'Development Status :: 1 - Planning',
'Natural Language :: English',
'Operating System :: OS Independent',
'Programming Language :: Python :: 3.3',
],
install_requires=open('requirements.txt').readlines(),
)
|
#!/usr/bin/env python
"""Setup script for PythonTemplateDemo."""
import setuptools
from demo import __project__, __version__
import os
if os.path.exists('README.rst'):
README = open('README.rst').read()
else:
README = "" # a placeholder, readme is generated on release
CHANGES = open('CHANGES.md').read()
setuptools.setup(
name=__project__,
version=__version__,
description="PythonTemplateDemo is a Python 3 package template.",
url='https://github.com/jacebrowning/template-python-demo',
author='Jace Browning',
author_email='jacebrowning@gmail.com',
packages=setuptools.find_packages(),
entry_points={'console_scripts': []},
long_description=(README + '\n' + CHANGES),
license='MIT',
classifiers=[
'Development Status :: 1 - Planning',
'Natural Language :: English',
'Operating System :: OS Independent',
'Programming Language :: Python :: 3.3',
],
install_requires=open('requirements.txt').readlines(),
)
|
Deploy Travis CI build 377 to GitHub
|
Deploy Travis CI build 377 to GitHub
|
Python
|
mit
|
jacebrowning/template-python-demo
|
---
+++
@@ -1,8 +1,6 @@
#!/usr/bin/env python
-"""
-Setup script for PythonTemplateDemo.
-"""
+"""Setup script for PythonTemplateDemo."""
import setuptools
|
2c9dc66b64a7afeee958e950c25366fd43d07bb3
|
setup.py
|
setup.py
|
"""
Setup and installation for the package.
"""
try:
from setuptools import setup
except ImportError:
from distutils.core import setup
setup(
name="three",
version="0.1",
author="Zach Williams",
author_email="hey@zachwill.com",
description="An easy-to-use wrapper for the Open311 API",
long_description=open('README.md').read(),
packages=[
'three'
],
install_requires=[
'mock',
'requests',
],
license='MIT',
classifiers=[
'Development Status :: 1 - Planning',
'Intended Audience :: Developers',
'Natural Language :: English',
'License :: OSI Approved :: MIT License',
'Programming Language :: Python',
'Programming Language :: Python :: 2.6',
'Programming Language :: Python :: 2.7',
],
)
|
"""
Setup and installation for the package.
"""
try:
from setuptools import setup
except ImportError:
from distutils.core import setup
setup(
name="three",
version="0.1",
author="Zach Williams",
author_email="hey@zachwill.com",
description="An easy-to-use wrapper for the Open311 API",
long_description=open('README.md').read(),
packages=[
'three'
],
install_requires=[
'mock',
'simplejson',
'requests',
],
license='MIT',
classifiers=[
'Development Status :: 1 - Planning',
'Intended Audience :: Developers',
'Natural Language :: English',
'License :: OSI Approved :: MIT License',
'Programming Language :: Python',
'Programming Language :: Python :: 2.6',
'Programming Language :: Python :: 2.7',
],
)
|
Add simplejson as installation requirement
|
Add simplejson as installation requirement
|
Python
|
bsd-3-clause
|
codeforamerica/three
|
---
+++
@@ -20,6 +20,7 @@
],
install_requires=[
'mock',
+ 'simplejson',
'requests',
],
license='MIT',
|
fd14dc0cd191b4060562a83fad29ab852044f1fc
|
subscriptions/management/commands/add_prepend_next_to_subscriptions.py
|
subscriptions/management/commands/add_prepend_next_to_subscriptions.py
|
from django.core.exceptions import ObjectDoesNotExist
from django.core.management.base import BaseCommand, CommandError
from subscriptions.models import Subscription
class Command(BaseCommand):
help = ("Active subscription holders need to be informed via audio file "
"about the new missed call service.")
def add_arguments(self, parser):
parser.add_argument(
'--audio', type=str,
help='Audio file containing the notification of the new missed'
' call service.')
def handle(self, *args, **options):
audio_file = options['audio']
if not audio_file:
raise CommandError('--audio_file is a required parameter')
self.stdout.write("Processing active subscriptions ...")
count = 0
active_subscriptions = Subscription.objects.filter(
active=True,
messageset__content_type="audio")
for active_subscription in active_subscriptions.iterator():
# Add audio file to subscription meta_data. Not sure how we'll
# handle translations here.
if (not active_subscription.metadata["prepend_next_delivery"] or
active_subscription.metadata["prepend_next_delivery"]
is None):
active_subscription.metadata["prepend_next_delivery"] = \
audio_file
count += 1
if count > 0:
self.stdout.write("Updated {} subscriptions with audio "
"notifications".format(count))
else:
self.stdout.write(
"No subscriptions updated with audio file notes")
|
from django.core.management.base import BaseCommand, CommandError
from subscriptions.models import Subscription
class Command(BaseCommand):
help = ("Active subscription holders need to be informed via audio file "
"about the new missed call service.")
def add_arguments(self, parser):
parser.add_argument(
'--audio', type=str,
help='Audio file containing the notification of the new missed'
' call service.')
def handle(self, *args, **options):
audio_file = options['audio']
if not audio_file:
raise CommandError('--audio_file is a required parameter')
self.stdout.write("Processing active subscriptions ...")
count = 0
active_subscriptions = Subscription.objects.filter(
active=True,
messageset__content_type="audio")
for active_subscription in active_subscriptions.iterator():
# Add audio file to subscription meta_data. Not sure how we'll
# handle translations here.
if (not active_subscription.metadata["prepend_next_delivery"] or
active_subscription.metadata["prepend_next_delivery"]
is None):
active_subscription.metadata["prepend_next_delivery"] = \
audio_file
count += 1
if count > 0:
self.stdout.write("Updated {} subscriptions with audio "
"notifications".format(count))
else:
self.stdout.write(
"No subscriptions updated with audio file notes")
|
Remove unused ObjectDoesNotExist exception import
|
Remove unused ObjectDoesNotExist exception import
|
Python
|
bsd-3-clause
|
praekelt/seed-stage-based-messaging,praekelt/seed-stage-based-messaging,praekelt/seed-staged-based-messaging
|
---
+++
@@ -1,4 +1,3 @@
-from django.core.exceptions import ObjectDoesNotExist
from django.core.management.base import BaseCommand, CommandError
from subscriptions.models import Subscription
|
9286baad7800b3d9e3d3724b891ceb8e6ff90687
|
config.py
|
config.py
|
import os
try:
from local_config import *
except ImportError:
twilio_sid = os.environ.get('TWILIO_SID', '')
twilio_token = os.environ.get('TWILIO_TOKEN', '')
twilio_number = os.environ.get('TWILIO_NUMBER', '')
google_client_id = os.environ.get('GOOGLE_CLIENT_ID', '')
google_client_secret = os.environ.get('GOOGLE_CLIENT_SECRET', '')
google_sheet_key = os.environ.get('GOOGLE_SHEET_KEY', '')
website_user = os.environ.get('WEBSITE_USER', '')
website_pass = os.environ.get('WEBSITE_PASS', '')
demo_mode = os.environ.get('DEMO_MODE', '')
debug_mode = os.environ.get('DEBUG_MODE', '')
|
import os
try:
from local_config import *
except ImportError:
twilio_sid = os.environ.get('TWILIO_SID', '')
twilio_token = os.environ.get('TWILIO_TOKEN', '')
twilio_number = os.environ.get('TWILIO_NUMBER', '')
google_client_id = os.environ.get('GOOGLE_CLIENT_ID', '')
google_client_secret = os.environ.get('GOOGLE_CLIENT_SECRET', '')
google_sheet_key = os.environ.get('GOOGLE_SHEET_KEY', '')
website_user = os.environ.get('WEBSITE_USER', '')
website_pass = os.environ.get('WEBSITE_PASS', '')
# We need the following variables to be boolean so we just check for a value against the environment variable
# to mean True and then take absence of either a value or the variable to mean False
demo_mode = bool(os.environ.get('DEMO_MODE', False))
debug_mode = bool(os.environ.get('DEBUG_MODE', False))
|
Update logic for reading boolean environment variables
|
Update logic for reading boolean environment variables
|
Python
|
mit
|
nhshd-slot/SLOT,nhshd-slot/SLOT,nhshd-slot/SLOT
|
---
+++
@@ -1,4 +1,5 @@
import os
+
try:
from local_config import *
@@ -16,6 +17,9 @@
website_user = os.environ.get('WEBSITE_USER', '')
website_pass = os.environ.get('WEBSITE_PASS', '')
- demo_mode = os.environ.get('DEMO_MODE', '')
+ # We need the following variables to be boolean so we just check for a value against the environment variable
+ # to mean True and then take absence of either a value or the variable to mean False
- debug_mode = os.environ.get('DEBUG_MODE', '')
+ demo_mode = bool(os.environ.get('DEMO_MODE', False))
+
+ debug_mode = bool(os.environ.get('DEBUG_MODE', False))
|
e6bd87d5a4ba42edb4e301258712be2da2a35b2d
|
setup.py
|
setup.py
|
#!/usr/bin/env python
"""Setup script for MemeGen."""
import sys
import logging
import setuptools
from memegen import __project__, __version__
try:
README = open("README.rst").read()
CHANGELOG = open("CHANGELOG.rst").read()
except IOError:
DESCRIPTION = "<placeholder>"
else:
DESCRIPTION = README + '\n' + CHANGELOG
def load_requirements():
"""Exclude specific requirements based on platform."""
requirements = []
for line in open("requirements.txt").readlines():
name = line.split('=')[0].strip()
if sys.platform == 'win32':
if name in ['psycopg2', 'gunicorn']:
logging.warning("Skipped requirement: %s", line)
continue
requirements.append(line)
return requirements
setuptools.setup(
name=__project__,
version=__version__,
description="The open source meme generator.",
url='https://github.com/jacebrowning/memegen',
author='Jace Browning',
author_email='jacebrowning@gmail.com',
packages=setuptools.find_packages(),
entry_points={'console_scripts': []},
long_description=(DESCRIPTION),
license='MIT',
classifiers=[
'Development Status :: 5 - Production/Stable',
'Natural Language :: English',
'Operating System :: OS Independent',
'Programming Language :: Python :: 3.5',
],
install_requires=load_requirements(),
)
|
#!/usr/bin/env python
"""Setup script for MemeGen."""
import os
import logging
import setuptools
from memegen import __project__, __version__
try:
README = open("README.rst").read()
CHANGELOG = open("CHANGELOG.rst").read()
except IOError:
DESCRIPTION = "<placeholder>"
else:
DESCRIPTION = README + '\n' + CHANGELOG
def load_requirements():
"""Exclude specific requirements based on platform."""
requirements = []
for line in open("requirements.txt").readlines():
line = line.strip()
name = line.split('=')[0].strip()
if os.name == 'nt':
if name in ['psycopg2', 'gunicorn']:
logging.warning("Skipped requirement: %s", line)
continue
requirements.append(line)
return requirements
setuptools.setup(
name=__project__,
version=__version__,
description="The open source meme generator.",
url='https://github.com/jacebrowning/memegen',
author='Jace Browning',
author_email='jacebrowning@gmail.com',
packages=setuptools.find_packages(),
entry_points={'console_scripts': []},
long_description=(DESCRIPTION),
license='MIT',
classifiers=[
'Development Status :: 5 - Production/Stable',
'Natural Language :: English',
'Operating System :: OS Independent',
'Programming Language :: Python :: 3.5',
],
install_requires=load_requirements(),
)
|
Use os.name to detect OS
|
Use os.name to detect OS
This is consistent with the rest of the code.
|
Python
|
mit
|
DanLindeman/memegen,DanLindeman/memegen,DanLindeman/memegen,DanLindeman/memegen
|
---
+++
@@ -2,7 +2,7 @@
"""Setup script for MemeGen."""
-import sys
+import os
import logging
import setuptools
@@ -23,9 +23,10 @@
requirements = []
for line in open("requirements.txt").readlines():
+ line = line.strip()
name = line.split('=')[0].strip()
- if sys.platform == 'win32':
+ if os.name == 'nt':
if name in ['psycopg2', 'gunicorn']:
logging.warning("Skipped requirement: %s", line)
continue
|
1f9c998815ddcb1ededb940ebc86ac816d2cf6aa
|
setup.py
|
setup.py
|
from setuptools import setup
setup(
name='troposphere-sugar',
version='0.0.4',
description='Common utilities on top of troposphere and boto for ease of clouformation template creation',
author='Enric Lluelles',
author_email='enric@lluel.es',
url="https://github.com/enriclluelles/troposphere_sugar",
packages=['troposphere_sugar', 'troposphere_sugar.decorators'],
license='MIT',
install_requires=['troposphere>=1.2.0']
)
|
from setuptools import setup
setup(
name='troposphere-sugar',
version='0.0.5',
description='Common utilities on top of troposphere and boto for ease of clouformation template creation',
author='Enric Lluelles',
author_email='enric@lluel.es',
url="https://github.com/enriclluelles/troposphere_sugar",
packages=['troposphere_sugar', 'troposphere_sugar.decorators'],
license='MIT',
install_requires=['troposphere>=1.2.0', 'boto3>=1.4.0']
)
|
Add boto3 as dependency, bump version
|
Add boto3 as dependency, bump version
|
Python
|
mit
|
enriclluelles/troposphere_sugar
|
---
+++
@@ -2,12 +2,12 @@
setup(
name='troposphere-sugar',
- version='0.0.4',
+ version='0.0.5',
description='Common utilities on top of troposphere and boto for ease of clouformation template creation',
author='Enric Lluelles',
author_email='enric@lluel.es',
url="https://github.com/enriclluelles/troposphere_sugar",
packages=['troposphere_sugar', 'troposphere_sugar.decorators'],
license='MIT',
- install_requires=['troposphere>=1.2.0']
+ install_requires=['troposphere>=1.2.0', 'boto3>=1.4.0']
)
|
c33806dac3e693d2a33d6739fab78b644b36c9af
|
setup.py
|
setup.py
|
# -*- coding: utf-8 -*-
from setuptools import setup, find_packages
console_scripts = [
'makiki = makiki.cli:main_parser',
]
requires = [
'blinker>=1.4',
'gevent>=1.1',
'gunicorn>=19.0',
'Jinja2>=2.8.1',
]
setup(
name='makiki',
version='0.1.0',
description='Web service utils and generator.',
long_description='',
author='Wang Yanqing',
author_email='me@oreki.moe',
packages=find_packages(),
url='http://github.com/faith0811/makiki',
include_package_data=True,
entry_points={
'console_scripts': console_scripts,
},
zip_safe=False,
install_requires=requires,
)
|
# -*- coding: utf-8 -*-
from setuptools import setup, find_packages
console_scripts = [
'makiki = makiki.cli:main_parser',
]
requires = [
'blinker>=1.4',
'gevent==1.1.2',
'gunicorn>=19.0',
'Jinja2>=2.8.1',
'psycogreen>=1.0.0',
'psycopg2>=2.6.2',
'hug>=2.1.2',
]
setup(
name='makiki',
version='0.1.1',
description='Web service utils and generator.',
long_description='',
author='Wang Yanqing',
author_email='me@oreki.moe',
packages=find_packages(),
url='http://github.com/faith0811/makiki',
include_package_data=True,
entry_points={
'console_scripts': console_scripts,
},
zip_safe=False,
install_requires=requires,
)
|
Add useful libs and bump version to 0.1.1
|
Add useful libs and bump version to 0.1.1
|
Python
|
mit
|
faith0811/makiki,faith0811/makiki
|
---
+++
@@ -8,14 +8,17 @@
requires = [
'blinker>=1.4',
- 'gevent>=1.1',
+ 'gevent==1.1.2',
'gunicorn>=19.0',
'Jinja2>=2.8.1',
+ 'psycogreen>=1.0.0',
+ 'psycopg2>=2.6.2',
+ 'hug>=2.1.2',
]
setup(
name='makiki',
- version='0.1.0',
+ version='0.1.1',
description='Web service utils and generator.',
long_description='',
author='Wang Yanqing',
|
7b92f1c5d1b109b93eb5535e70573b708c3df305
|
setup.py
|
setup.py
|
import sys
from setuptools import setup
from setuptools.command.test import test as TestCommand
import pipin
class PyTest(TestCommand):
def finalize_options(self):
TestCommand.finalize_options(self)
self.test_args = []
self.test_suite = True
def run_tests(self):
import pytest
errcode = pytest.main(self.test_args)
sys.exit(errcode)
setup(
name='pipin',
version=pipin.__version__,
description='',
author='Matt Lenc',
author_email='matt.lenc@gmail.com',
url='http://github.com/mattack108/pipin',
license='LICENSE.txt',
packages=['pipin'],
install_requires=['argparse'],
tests_require=['pytest'],
cmdclass={'test': PyTest},
test_suite='pipin.tests.test_pipin',
extras_require={
'testing': ['pytest'],
},
entry_points={
'console_scripts': [
'pipin = pipin.pipin:lets_pipin',
]
},
classifiers=[
"Environment :: Console",
"Intended Audience :: Developers",
"License :: OSI Approved :: MIT License",
"Programming Language :: Python",
"Programming Language :: Python :: 2.6",
"Programming Language :: Python :: 2.7",
"Programming Language :: Python :: 3.3",
"Topic :: Software Development",
"Topic :: Utilities",
]
)
|
import sys
from setuptools import setup
from setuptools.command.test import test as TestCommand
import pipin
install_requires = []
if sys.version_info[:2] < (2, 6):
install_requires.append('argparse')
class PyTest(TestCommand):
def finalize_options(self):
TestCommand.finalize_options(self)
self.test_args = []
self.test_suite = True
def run_tests(self):
import pytest
errcode = pytest.main(self.test_args)
sys.exit(errcode)
setup(
name='pipin',
version=pipin.__version__,
description='',
author='Matt Lenc',
author_email='matt.lenc@gmail.com',
url='http://github.com/mattack108/pipin',
license='LICENSE.txt',
packages=['pipin'],
install_requires=install_requires,
tests_require=['pytest'],
cmdclass={'test': PyTest},
test_suite='pipin.tests.test_pipin',
extras_require={
'testing': ['pytest'],
},
entry_points={
'console_scripts': [
'pipin = pipin.pipin:lets_pipin',
]
},
classifiers=[
"Environment :: Console",
"Intended Audience :: Developers",
"License :: OSI Approved :: MIT License",
"Programming Language :: Python",
"Programming Language :: Python :: 2.6",
"Programming Language :: Python :: 2.7",
"Programming Language :: Python :: 3.3",
"Topic :: Software Development",
"Topic :: Utilities",
]
)
|
Make the py2.6 dependency conditional
|
Make the py2.6 dependency conditional
|
Python
|
mit
|
mlen108/pipin
|
---
+++
@@ -3,6 +3,10 @@
from setuptools.command.test import test as TestCommand
import pipin
+
+install_requires = []
+if sys.version_info[:2] < (2, 6):
+ install_requires.append('argparse')
class PyTest(TestCommand):
@@ -25,7 +29,7 @@
url='http://github.com/mattack108/pipin',
license='LICENSE.txt',
packages=['pipin'],
- install_requires=['argparse'],
+ install_requires=install_requires,
tests_require=['pytest'],
cmdclass={'test': PyTest},
test_suite='pipin.tests.test_pipin',
|
d5c8b10500661727ddbfdb4afa4f770f098a06d5
|
setup.py
|
setup.py
|
from setuptools import setup
setup(
entry_points={
'trac.plugins': [
"ticket-reporter = twisted_trac_plugins.ticket_reporter",
],
},
name='Twisted Trac Plugins', version='0.0',
description="Plugins for twisted's trac instance",
author="Tom Prince", author_email="tomprince@twistedmatrix.com",
license='MIT',
url='https://github.com/twisted-infra/twisted-trac-plugins',
packages=['twisted_trac_plugins'],
)
|
from setuptools import setup
setup(
entry_points={
'trac.plugins': [
"release-macro = twisted_trac_plugins.release_macro",
"ticket-reporter = twisted_trac_plugins.ticket_reporter",
],
},
name='Twisted Trac Plugins', version='0.0',
description="Plugins for twisted's trac instance",
author="Tom Prince", author_email="tomprince@twistedmatrix.com",
license='MIT',
url='https://github.com/twisted-infra/twisted-trac-plugins',
packages=['twisted_trac_plugins'],
)
|
Add release macro to entry points.
|
Add release macro to entry points.
|
Python
|
mit
|
twisted-infra/twisted-trac-plugins
|
---
+++
@@ -3,6 +3,7 @@
setup(
entry_points={
'trac.plugins': [
+ "release-macro = twisted_trac_plugins.release_macro",
"ticket-reporter = twisted_trac_plugins.ticket_reporter",
],
},
|
4d6a69dc60ea4f10330c11de04ba4706b980d037
|
setup.py
|
setup.py
|
from setuptools import setup, find_packages
install_requires = open('requirements.txt').read().split()
setup(
name='mocurly',
packages=find_packages(exclude=("tests", "tests.*")),
package_data={'mocurly': ['templates/*.xml']},
version='0.1.1',
description='A library that allows your python tests to easily mock out the recurly library',
author='Yoriyasu Yano',
author_email='yoriy@captricity.com',
url='https://github.com/Captricity/mocurly',
download_url='https://github.com/Captricity/mocurly/tarball/v0.1',
keywords = ['testing'],
install_requires=install_requires,
test_suite='tests'
)
|
from setuptools import setup, find_packages
install_requires = open('requirements.txt').read().split()
setup(
name='mocurly',
packages=find_packages(exclude=("tests", "tests.*")),
package_data={'mocurly': ['templates/*.xml']},
version='0.1.2',
description='A library that allows your python tests to easily mock out the recurly library',
author='Yoriyasu Yano',
author_email='yoriy@captricity.com',
url='https://github.com/Captricity/mocurly',
download_url='https://github.com/Captricity/mocurly/tarball/v0.1.2',
keywords = ['testing'],
install_requires=install_requires,
test_suite='tests'
)
|
Bump version for new feature
|
Bump version for new feature
|
Python
|
mit
|
Captricity/mocurly
|
---
+++
@@ -6,12 +6,12 @@
name='mocurly',
packages=find_packages(exclude=("tests", "tests.*")),
package_data={'mocurly': ['templates/*.xml']},
- version='0.1.1',
+ version='0.1.2',
description='A library that allows your python tests to easily mock out the recurly library',
author='Yoriyasu Yano',
author_email='yoriy@captricity.com',
url='https://github.com/Captricity/mocurly',
- download_url='https://github.com/Captricity/mocurly/tarball/v0.1',
+ download_url='https://github.com/Captricity/mocurly/tarball/v0.1.2',
keywords = ['testing'],
install_requires=install_requires,
test_suite='tests'
|
341a4a3a4bd3ac0761196695a1458e75b6d9a772
|
setup.py
|
setup.py
|
#!/usr/bin/python
from setuptools import setup
with open("README.rst") as readme:
long_description = readme.read()
setup(
name = 'cosmic',
version = "0.3.0.alpha2",
url = "http://www.cosmic-api.com/docs/cosmic/python/",
packages = ['cosmic'],
description = 'A high-level web API framework',
license = "MIT",
author = "8313547 Canada Inc.",
author_email = "alexei@boronine.com",
long_description = long_description,
install_requires = [
"teleport==0.2.1",
"Flask==0.10",
"Werkzeug==0.9.1",
"requests==2.0.0",
],
classifiers=[
'Development Status :: 3 - Alpha',
],
)
|
#!/usr/bin/python
from setuptools import setup
with open("README.rst") as readme:
long_description = readme.read()
setup(
name = 'cosmic',
version = "0.3.0.alpha3",
url = "http://www.cosmic-api.com/docs/cosmic/python/",
packages = ['cosmic'],
description = 'A high-level web API framework',
license = "MIT",
author = "8313547 Canada Inc.",
author_email = "alexei@boronine.com",
long_description = long_description,
install_requires = [
"teleport==0.2.1",
"Flask==0.10",
"Werkzeug==0.9.1",
"requests==2.0.0",
],
classifiers=[
'Development Status :: 3 - Alpha',
],
)
|
Make get_by_id return representation without id, for consistency
|
Make get_by_id return representation without id, for consistency
|
Python
|
mit
|
cosmic-api/cosmic.py
|
---
+++
@@ -7,7 +7,7 @@
setup(
name = 'cosmic',
- version = "0.3.0.alpha2",
+ version = "0.3.0.alpha3",
url = "http://www.cosmic-api.com/docs/cosmic/python/",
packages = ['cosmic'],
description = 'A high-level web API framework',
|
154b01b4c116d7a7a940168bef60728cce4c3973
|
setup.py
|
setup.py
|
#!/usr/bin/env python2.6
try:
from setuptools import setup
except:
from distutils.core import setup
def getVersion():
import os
packageSeedFile = os.path.join("lib", "_version.py")
ns = {"__name__": __name__, }
execfile(packageSeedFile, ns)
return ns["version"]
version = getVersion()
setup(
name = version.package,
version = version.short(),
description = "Pub Client and Service",
long_description = "Pub key management service and client",
author = "Oliver Gould", author_email = "ver@yahoo-inc.com",
maintainer = "Oliver Gould", maintainer_email = "ver@yahoo-inc.com",
requires = ["jersey", "twisted", "twisted.conch", "pendrell(>=0.2.0)", ],
packages = ["pub", "pub.cases", "pub.client", "twisted.plugins", ],
scripts = ["bin/jget", "bin/pubc", ],
package_dir = {"pub": "lib", },
package_data = {"twisted.plugins": ["pubs.py"], },
)
|
#!/usr/bin/env python2.6
try:
from setuptools import setup
except:
from distutils.core import setup
def getVersion():
import os
packageSeedFile = os.path.join("lib", "_version.py")
ns = {"__name__": __name__, }
execfile(packageSeedFile, ns)
return ns["version"]
version = getVersion()
setup(
name = version.package,
version = version.short(),
description = "Pub Client and Service",
long_description = "Pub key management service and client",
author = "Oliver Gould", author_email = "ver@yahoo-inc.com",
maintainer = "Oliver Gould", maintainer_email = "ver@yahoo-inc.com",
requires = ["jersey", "Twisted", "pendrell>=0.3.0", ],
packages = ["pub", "pub.cases", "pub.client", "twisted.plugins", ],
scripts = ["bin/jget", "bin/pubc", ],
package_dir = {"pub": "lib", },
package_data = {"twisted.plugins": ["pubs.py"], },
)
|
Fix Twisted requirement (I think?)
|
Fix Twisted requirement (I think?)
|
Python
|
bsd-3-clause
|
olix0r/pub
|
---
+++
@@ -26,7 +26,7 @@
author = "Oliver Gould", author_email = "ver@yahoo-inc.com",
maintainer = "Oliver Gould", maintainer_email = "ver@yahoo-inc.com",
- requires = ["jersey", "twisted", "twisted.conch", "pendrell(>=0.2.0)", ],
+ requires = ["jersey", "Twisted", "pendrell>=0.3.0", ],
packages = ["pub", "pub.cases", "pub.client", "twisted.plugins", ],
scripts = ["bin/jget", "bin/pubc", ],
package_dir = {"pub": "lib", },
|
b42d762acd30a19b5035b536a8d3c059b74dc5ed
|
setup.py
|
setup.py
|
from distutils.core import setup
setup(
name = 'pybenchmark',
packages = ['pybenchmark'], # this must be the same as the name above
version = '0.0.4',
description = 'A benchmark utility used in performance tests.',
author = 'Eugene Duboviy',
author_email = 'eugene.dubovoy@gmail.com',
url = 'https://github.com/duboviy/pybenchmark', # use the URL to the github repo
download_url = 'https://github.com/duboviy/pybenchmark/tarball/0.0.4', # I'll explain this in a second
keywords = ['benchmark', 'performance', 'testing'], # arbitrary keywords
classifiers = [],
)
|
from distutils.core import setup
setup(
name = 'pybenchmark',
packages = ['pybenchmark'], # this must be the same as the name above
version = '0.0.5',
description = 'A benchmark utility used in performance tests.',
author = 'Eugene Duboviy',
author_email = 'eugene.dubovoy@gmail.com',
url = 'https://github.com/duboviy/pybenchmark', # use the URL to the github repo
download_url = 'https://github.com/duboviy/pybenchmark/tarball/0.0.5', # I'll explain this in a second
keywords = ['benchmark', 'performance', 'testing'], # arbitrary keywords
classifiers=[
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Intended Audience :: Developers",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
"Topic :: Software Development :: Libraries :: Python Modules",
],
long_description=open('README.md').read(),
install_requires=[
'psutil',
'gevent',
],
)
|
Add new PyPI release version
|
Add new PyPI release version
|
Python
|
mit
|
duboviy/pybenchmark
|
---
+++
@@ -2,12 +2,24 @@
setup(
name = 'pybenchmark',
packages = ['pybenchmark'], # this must be the same as the name above
- version = '0.0.4',
+ version = '0.0.5',
description = 'A benchmark utility used in performance tests.',
author = 'Eugene Duboviy',
author_email = 'eugene.dubovoy@gmail.com',
url = 'https://github.com/duboviy/pybenchmark', # use the URL to the github repo
- download_url = 'https://github.com/duboviy/pybenchmark/tarball/0.0.4', # I'll explain this in a second
+ download_url = 'https://github.com/duboviy/pybenchmark/tarball/0.0.5', # I'll explain this in a second
keywords = ['benchmark', 'performance', 'testing'], # arbitrary keywords
- classifiers = [],
+ classifiers=[
+ "Programming Language :: Python",
+ "Programming Language :: Python :: 3",
+ "Intended Audience :: Developers",
+ "License :: OSI Approved :: MIT License",
+ "Operating System :: OS Independent",
+ "Topic :: Software Development :: Libraries :: Python Modules",
+ ],
+ long_description=open('README.md').read(),
+ install_requires=[
+ 'psutil',
+ 'gevent',
+ ],
)
|
ba959fe7bd3b4a0bee758090585cf1a2bbc5b94c
|
setup.py
|
setup.py
|
from setuptools import setup
setup(
name="spare5",
version='0.1',
description="Spare 5 Python API client",
license="MIT",
author="John Williams, Philip Kimmey",
author_email="john@rover.com, philip@rover.com",
packages=['spare5'],
keywords=['spare5'],
install_requires=[],
classifiers=[
'Environment :: Other Environment',
'Environment :: Web Environment',
'Intended Audience :: Developers',
'License :: OSI Approved :: MIT License',
'Operating System :: OS Independent',
'Programming Language :: Python',
'Topic :: Internet :: WWW/HTTP :: Dynamic Content :: CGI Tools/Libraries'
],
)
|
from setuptools import setup
from setuptools import find_packages
setup(
name="spare5",
version='0.1',
description="Spare 5 Python API client",
license="MIT",
author="John Williams, Philip Kimmey",
author_email="john@rover.com, philip@rover.com",
packages=find_packages(),
keywords=['spare5'],
install_requires=[],
classifiers=[
'Environment :: Other Environment',
'Environment :: Web Environment',
'Intended Audience :: Developers',
'License :: OSI Approved :: MIT License',
'Operating System :: OS Independent',
'Programming Language :: Python',
'Topic :: Internet :: WWW/HTTP :: Dynamic Content :: CGI Tools/Libraries'
],
)
|
Use find packages to recursively search
|
Use find packages to recursively search
|
Python
|
mit
|
roverdotcom/spare5-python
|
---
+++
@@ -1,4 +1,5 @@
from setuptools import setup
+from setuptools import find_packages
setup(
@@ -8,7 +9,7 @@
license="MIT",
author="John Williams, Philip Kimmey",
author_email="john@rover.com, philip@rover.com",
- packages=['spare5'],
+ packages=find_packages(),
keywords=['spare5'],
install_requires=[],
classifiers=[
|
b06773830ea3f3be4580ea9c4c49a84b07d27634
|
setup.py
|
setup.py
|
from setuptools import setup, find_packages
import unormalize
import codecs
def long_description():
with codecs.open('README.rst', encoding='utf8') as f:
return f.read()
setup(
name='unormalize',
version=unormalize.__version__,
description=unormalize.__doc__.strip(),
long_description=long_description(),
url='https://github.com/eddieantonio/unormalize',
download_url='https://github.com/eddieantonio/unormalize',
author=unormalize.__author__,
author_email='easantos@ualberta.ca',
license=unormalize.__license__,
packages=find_packages(),
entry_points={
'console_scripts': [
'unormalize = unormalize.__init__:main',
'nfc = unormalize.__init__:nfc',
'nfd = unormalize.__init__:nfd',
'nfkc = unormalize.__init__:nfkc',
'nfkd = unormalize.__init__:nfkd',
],
},
classifiers=[
'Development Status :: 5 - Production/Stable',
'Programming Language :: Python',
'Programming Language :: Python :: 2',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3.3',
'Programming Language :: Python :: 3.4',
'Environment :: Console',
'License :: OSI Approved :: MIT License',
'Topic :: Text Processing',
'Topic :: Utilities'
],
)
|
from setuptools import setup, find_packages
import unormalize
import codecs
def long_description():
with codecs.open('README.rst', encoding='utf8') as f:
return f.read()
setup(
name='unormalize',
version=unormalize.__version__,
description=unormalize.__doc__.strip(),
long_description=long_description(),
url='https://github.com/eddieantonio/unormalize',
download_url='https://github.com/eddieantonio/unormalize',
author=unormalize.__author__,
author_email='easantos@ualberta.ca',
license=unormalize.__license__,
packages=find_packages(),
entry_points={
'console_scripts': [
'unormalize = unormalize.__init__:main',
'nfc = unormalize.__init__:nfc',
'nfd = unormalize.__init__:nfd',
'nfkc = unormalize.__init__:nfkc',
'nfkd = unormalize.__init__:nfkd',
],
},
classifiers=[
'Development Status :: 5 - Production/Stable',
'Programming Language :: Python',
'Programming Language :: Python :: 2',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3.3',
'Programming Language :: Python :: 3.4',
'Programming Language :: Python :: 3.5',
'Programming Language :: Python :: 3.6',
'Environment :: Console',
'License :: OSI Approved :: MIT License',
'Topic :: Text Processing',
'Topic :: Utilities'
],
)
|
Add newer versions of Python 3.4 to classifier list.
|
Add newer versions of Python 3.4 to classifier list.
|
Python
|
mit
|
eddieantonio/unormalize
|
---
+++
@@ -35,6 +35,8 @@
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3.3',
'Programming Language :: Python :: 3.4',
+ 'Programming Language :: Python :: 3.5',
+ 'Programming Language :: Python :: 3.6',
'Environment :: Console',
'License :: OSI Approved :: MIT License',
'Topic :: Text Processing',
|
1c397202b6df7b62cbd22509ee7cc366c2c09d6c
|
setup.py
|
setup.py
|
try:
from setuptools import setup, find_packages
except ImportError:
from ez_setup import use_setuptools
use_setuptools()
from setuptools import setup, find_packages
setup(
name='debexpo',
version="",
#description='',
#author='',
#author_email='',
#url='',
install_requires=[
"Pylons>=1.0",
"SQLAlchemy>=0.6",
"Webhelpers>=0.6.1",
"Babel>=0.9.6",
"ZSI",
"python-debian==0.1.16",
"soaplib==0.8.1"],
packages=find_packages(exclude=['ez_setup']),
include_package_data=True,
test_suite='nose.collector',
package_data={'debexpo': ['i18n/*/LC_MESSAGES/*.mo']},
message_extractors = {'debexpo': [
('**.py', 'python', None),
('templates/**.mako', 'mako', None),
('public/**', 'ignore', None)]},
entry_points="""
[paste.app_factory]
main = debexpo.config.middleware:make_app
[paste.app_install]
main = pylons.util:PylonsInstaller
[console_scripts]
debexpo-importer = debexpo.scripts.debexpo_importer:main
debexpo-user-importer = debexpo.scripts.user_importer:main
""",
)
|
try:
from setuptools import setup, find_packages
except ImportError:
from ez_setup import use_setuptools
use_setuptools()
from setuptools import setup, find_packages
setup(
name='debexpo',
version="",
#description='',
#author='',
#author_email='',
#url='',
install_requires=[
"Pylons>=1.0",
"SQLAlchemy>=0.6",
"Webhelpers>=0.6.1",
"Babel>=0.9.6",
"ZSI",
"python-debian>=0.1.16",
"soaplib==0.8.1"],
packages=find_packages(exclude=['ez_setup']),
include_package_data=True,
test_suite='nose.collector',
package_data={'debexpo': ['i18n/*/LC_MESSAGES/*.mo']},
message_extractors = {'debexpo': [
('**.py', 'python', None),
('templates/**.mako', 'mako', None),
('public/**', 'ignore', None)]},
entry_points="""
[paste.app_factory]
main = debexpo.config.middleware:make_app
[paste.app_install]
main = pylons.util:PylonsInstaller
[console_scripts]
debexpo-importer = debexpo.scripts.debexpo_importer:main
debexpo-user-importer = debexpo.scripts.user_importer:main
""",
)
|
Make library dependencies python-debian a bit more sane
|
Make library dependencies python-debian a bit more sane
|
Python
|
mit
|
jadonk/debexpo,jonnylamb/debexpo,jadonk/debexpo,jonnylamb/debexpo,swvist/Debexpo,jadonk/debexpo,swvist/Debexpo,swvist/Debexpo,jonnylamb/debexpo
|
---
+++
@@ -18,7 +18,7 @@
"Webhelpers>=0.6.1",
"Babel>=0.9.6",
"ZSI",
- "python-debian==0.1.16",
+ "python-debian>=0.1.16",
"soaplib==0.8.1"],
packages=find_packages(exclude=['ez_setup']),
include_package_data=True,
|
51228ca43fdc27af9cf5c0a6b569e2b6a9d77cb7
|
setup.py
|
setup.py
|
#!/usr/bin/env python
from mpyq import __version__ as version
from setuptools import setup
setup(name='mpyq',
version=version,
author='Aku Kotkavuo',
author_email='aku@hibana.net',
url='http://github.com/arkx/mpyq/',
description='A Python library for extracting MPQ (MoPaQ) files.',
py_modules=['mpyq'],
entry_points={
'console_scripts': ['mpyq = mpyq:main']
},
classifiers=[
'Development Status :: 3 - Alpha',
'Environment :: Console',
'Intended Audience :: End Users/Desktop',
'Intended Audience :: Developers',
'License :: OSI Approved :: BSD License',
'Operating System :: MacOS :: MacOS X',
'Operating System :: Microsoft :: Windows',
'Operating System :: POSIX',
'Programming Language :: Python :: 2.6',
'Programming Language :: Python :: 2.7',
'Topic :: Games/Entertainment :: Real Time Strategy',
'Topic :: Software Development :: Libraries',
'Topic :: System :: Archiving',
],
)
|
#!/usr/bin/env python
import sys
from setuptools import setup
from mpyq import __version__ as version
setup(name='mpyq',
version=version,
author='Aku Kotkavuo',
author_email='aku@hibana.net',
url='http://github.com/arkx/mpyq/',
description='A Python library for extracting MPQ (MoPaQ) files.',
py_modules=['mpyq'],
entry_points={
'console_scripts': ['mpyq = mpyq:main']
},
classifiers=[
'Development Status :: 3 - Alpha',
'Environment :: Console',
'Intended Audience :: End Users/Desktop',
'Intended Audience :: Developers',
'License :: OSI Approved :: BSD License',
'Operating System :: MacOS :: MacOS X',
'Operating System :: Microsoft :: Windows',
'Operating System :: POSIX',
'Programming Language :: Python :: 2.6',
'Programming Language :: Python :: 2.7',
'Topic :: Games/Entertainment :: Real Time Strategy',
'Topic :: Software Development :: Libraries',
'Topic :: System :: Archiving',
],
install_requires=['argparse'] if float(sys.version[:3]) < 2.7 else [],
)
|
Add version dependent inclusion of argparse as a install requirement.
|
Add version dependent inclusion of argparse as a install requirement.
For versions prior to 2.7 argparse must be installed manually before
mpyq can be installed.
By checking the current python version we can make sure to only
require the argparse module for versions of python < 2.7.
(Patch slightly modified.)
Signed-off-by: Aku Kotkavuo <22220c18caede9806cb42c8e2b41136d711673bf@hibana.net>
|
Python
|
bsd-2-clause
|
fengthedroid/mpyq,eagleflo/mpyq
|
---
+++
@@ -1,7 +1,8 @@
#!/usr/bin/env python
+import sys
+from setuptools import setup
from mpyq import __version__ as version
-from setuptools import setup
setup(name='mpyq',
version=version,
@@ -28,4 +29,5 @@
'Topic :: Software Development :: Libraries',
'Topic :: System :: Archiving',
],
+ install_requires=['argparse'] if float(sys.version[:3]) < 2.7 else [],
)
|
a80a875a62f3cf4e73eb47934b7589b00042d369
|
staticmodel/django/__init__.py
|
staticmodel/django/__init__.py
|
"""
******************
Django integration
******************
**Static Model** provides two custom Django model fields in the
``staticmodel.django.fields`` module:
* ``StaticModelCharField`` (sub-class of ``django.db.models.CharField``)
* ``StaticModelIntegerField`` (sub-class of ``django.db.models.IntegerField``)
Static model members are returned, and can be set, as the value of the
fields on a django model object.
Both fields take the following keyword arguments in addition to the
arguments taken by their respective sub-classes:
* ``static_model``: The static model class associated with this field.
* ``value_field_name``: The static model field name whose value will
be stored in the database. Defaults to the first field name in
``static_model._field_names``.
* ``display_field_name``: The static model field name whose value will
be used as the display value in the ``choices`` passed to the parent
field. Defaults to the value of ``value_field_name``.
When the model field is instantiated, it validates the values of
``value_field_name`` and ``display_field_name`` against
**every member** of the static model to insure the fields exist and
contain a value appropriate for the value of the field. This ensures
that error-causing inconsistencies are detected early during
development.
"""
|
"""
************************
Django model integration
************************
**Static Model** provides custom Django model fields in the
``staticmodel.django.models`` package:
* ``StaticModelCharField`` (sub-class of ``django.db.models.CharField``)
* ``StaticModelTextField`` (sub-class of ``django.db.models.TextField``)
* ``StaticModelIntegerField`` (sub-class of ``django.db.models.IntegerField``)
Static model members are returned, and can be set, as the value of the
fields on a django model object.
All fields take the following keyword arguments in addition to the
arguments taken by their respective parent classes:
* ``static_model``: The static model class associated with this field.
* ``value_field_name``: The static model field name whose value will
be stored in the database. Defaults to the first field name in
``static_model._field_names``.
* ``display_field_name``: The static model field name whose value will
be used as the display value in the ``choices`` passed to the parent
field. Defaults to the value of ``value_field_name``.
When the model field is instantiated, it validates the values of
``value_field_name`` and ``display_field_name`` against
**every member** of the static model to insure the fields exist and
contain a value appropriate for the value of the field. This ensures
that error-causing inconsistencies are detected early during
development.
"""
|
Fix django model field docstring.
|
Fix django model field docstring.
|
Python
|
mit
|
wsmith323/staticmodel
|
---
+++
@@ -1,19 +1,20 @@
"""
-******************
-Django integration
-******************
+************************
+Django model integration
+************************
-**Static Model** provides two custom Django model fields in the
-``staticmodel.django.fields`` module:
+**Static Model** provides custom Django model fields in the
+``staticmodel.django.models`` package:
* ``StaticModelCharField`` (sub-class of ``django.db.models.CharField``)
+ * ``StaticModelTextField`` (sub-class of ``django.db.models.TextField``)
* ``StaticModelIntegerField`` (sub-class of ``django.db.models.IntegerField``)
Static model members are returned, and can be set, as the value of the
fields on a django model object.
-Both fields take the following keyword arguments in addition to the
-arguments taken by their respective sub-classes:
+All fields take the following keyword arguments in addition to the
+arguments taken by their respective parent classes:
* ``static_model``: The static model class associated with this field.
* ``value_field_name``: The static model field name whose value will
|
117de7c9ff56388ae7e33fb05f146710e423f174
|
setup.py
|
setup.py
|
from distutils.core import setup
setup(
name='Decouple',
version='1.2.1',
packages=['Decouple', 'Decouple.BatchPlugins'],
license='LICENSE',
description='Decouple and recouple.',
long_description=open('README.md').read(),
author='Sven Kreiss, Kyle Cranmer',
author_email='sk@svenkreiss.com',
install_requires= [
'BatchLikelihoodScan',
'LHCHiggsCouplings',
'numpy',
'scipy',
'multiprocessing',
'progressbar',
],
entry_points={
'console_scripts': [
'decouple = scripts.decouple:main',
'recouple = scripts.recouple:main',
# decouple tools
'decouple_obtain_etas = Decouple.obtainEtas:main',
# recouple tools
'recouple_mutmuw = Decouple.muTmuW:main',
'recouple_kvkf = Decouple.kVkF:main',
'recouple_kglukgamma = Decouple.kGlukGamma:main',
]
}
)
|
from distutils.core import setup
setup(
name='Decouple',
version='1.2.2',
packages=['Decouple', 'Decouple.BatchPlugins', 'scripts'],
license='LICENSE',
description='Decouple and recouple.',
long_description=open('README.md').read(),
author='Sven Kreiss, Kyle Cranmer',
author_email='sk@svenkreiss.com',
install_requires= [
'BatchLikelihoodScan',
'LHCHiggsCouplings',
'numpy',
'scipy',
'multiprocessing',
'progressbar',
],
entry_points={
'console_scripts': [
'decouple = scripts.decouple:main',
'recouple = scripts.recouple:main',
# decouple tools
'decouple_obtain_etas = Decouple.obtainEtas:main',
# recouple tools
'recouple_mutmuw = Decouple.muTmuW:main',
'recouple_kvkf = Decouple.kVkF:main',
'recouple_kglukgamma = Decouple.kGlukGamma:main',
]
}
)
|
Include 'scripts' as module in package.
|
Include 'scripts' as module in package.
|
Python
|
mit
|
svenkreiss/decouple
|
---
+++
@@ -2,8 +2,8 @@
setup(
name='Decouple',
- version='1.2.1',
- packages=['Decouple', 'Decouple.BatchPlugins'],
+ version='1.2.2',
+ packages=['Decouple', 'Decouple.BatchPlugins', 'scripts'],
license='LICENSE',
description='Decouple and recouple.',
long_description=open('README.md').read(),
|
ccb9aebb5f2338e12d8aa79d65fa1a6e972e76c2
|
todobackend/__init__.py
|
todobackend/__init__.py
|
from logging import getLogger, basicConfig, INFO
from os import getenv
from aiohttp import web
from .middleware import cors_middleware_factory
from .views import (
IndexView,
TodoView,
)
IP = '0.0.0.0'
PORT = getenv('PORT', '8000')
basicConfig(level=INFO)
logger = getLogger(__name__)
async def init(loop):
app = web.Application(loop=loop, middlewares=[cors_middleware_factory])
# Routes
app.router.add_route('*', '/', IndexView.dispatch)
app.router.add_route('*', '/{uuid}', TodoView.dispatch)
# Config
logger.info("Starting server at %s:%s", IP, PORT)
srv = await loop.create_server(app.make_handler(), IP, PORT)
return srv
|
from logging import getLogger, basicConfig, INFO
from os import getenv
from aiohttp import web
from .middleware import cors_middleware_factory
from .views import (
IndexView,
TodoView,
)
IP = getenv('IP', '0.0.0.0')
PORT = getenv('PORT', '8000')
basicConfig(level=INFO)
logger = getLogger(__name__)
async def init(loop):
app = web.Application(loop=loop, middlewares=[cors_middleware_factory])
# Routes
app.router.add_route('*', '/', IndexView.dispatch)
app.router.add_route('*', '/{uuid}', TodoView.dispatch)
# Config
logger.info("Starting server at %s:%s", IP, PORT)
srv = await loop.create_server(app.make_handler(), IP, PORT)
return srv
|
Allow users to specify IP
|
MOD: Allow users to specify IP
|
Python
|
mit
|
justuswilhelm/todobackend-aiohttp
|
---
+++
@@ -8,7 +8,7 @@
TodoView,
)
-IP = '0.0.0.0'
+IP = getenv('IP', '0.0.0.0')
PORT = getenv('PORT', '8000')
basicConfig(level=INFO)
|
8fe31c3fbf3853d679f29b6743d05478cc1413f9
|
tests/unit/utils/test_utils.py
|
tests/unit/utils/test_utils.py
|
# coding=utf-8
'''
Test case for utils/__init__.py
'''
from tests.support.unit import TestCase, skipIf
from tests.support.mock import (
NO_MOCK,
NO_MOCK_REASON,
MagicMock,
patch
)
try:
import pytest
except ImportError:
pytest = None
import salt.utils
@skipIf(pytest is None, 'PyTest is missing')
class UtilsTestCase(TestCase):
'''
Test case for utils/__init__.py
'''
def test_get_module_environment(self):
'''
Test for salt.utils.get_module_environment
:return:
'''
_globals = {}
salt.utils.get_module_environment(_globals)
|
# coding=utf-8
'''
Test case for utils/__init__.py
'''
from __future__ import unicode_literals, print_function, absolute_import
from tests.support.unit import TestCase, skipIf
from tests.support.mock import (
NO_MOCK,
NO_MOCK_REASON,
MagicMock,
patch
)
try:
import pytest
except ImportError:
pytest = None
import salt.utils
@skipIf(pytest is None, 'PyTest is missing')
class UtilsTestCase(TestCase):
'''
Test case for utils/__init__.py
'''
def test_get_module_environment_empty(self):
'''
Test for salt.utils.get_module_environment
Test if empty globals returns to an empty environment
with the correct type.
:return:
'''
out = salt.utils.get_module_environment({})
assert out == {}
assert isinstance(out, dict)
|
Add unit test to check if the environment returns a correct type
|
Add unit test to check if the environment returns a correct type
|
Python
|
apache-2.0
|
saltstack/salt,saltstack/salt,saltstack/salt,saltstack/salt,saltstack/salt
|
---
+++
@@ -2,6 +2,7 @@
'''
Test case for utils/__init__.py
'''
+from __future__ import unicode_literals, print_function, absolute_import
from tests.support.unit import TestCase, skipIf
from tests.support.mock import (
NO_MOCK,
@@ -22,10 +23,13 @@
'''
Test case for utils/__init__.py
'''
- def test_get_module_environment(self):
+ def test_get_module_environment_empty(self):
'''
Test for salt.utils.get_module_environment
+ Test if empty globals returns to an empty environment
+ with the correct type.
:return:
'''
- _globals = {}
- salt.utils.get_module_environment(_globals)
+ out = salt.utils.get_module_environment({})
+ assert out == {}
+ assert isinstance(out, dict)
|
f5ff12afcc75f722a41356ca89d09c23b03396dd
|
setup.py
|
setup.py
|
import os
from setuptools import setup
import sys
with open(os.path.join(os.path.dirname(__file__), 'README.rst')) as readme:
README = readme.read()
tests_require = ['responses>=0.5']
if sys.version_info < (3, 3):
tests_require.append('mock>=1.3')
# 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-moj-irat',
version='0.3',
packages=['moj_irat'],
include_package_data=True,
license='BSD License',
description="Tools to support adding a Django-based service to "
"Ministry of Justice's Incidence Response and Tuning",
long_description=README,
install_requires=['Django>=1.8,<1.9', 'requests'],
classifiers=[
'Framework :: Django',
'Intended Audience :: MoJ Developers',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3.4',
],
test_suite='runtests.runtests',
tests_require=tests_require
)
|
import os
from setuptools import setup
import sys
with open(os.path.join(os.path.dirname(__file__), 'README.rst')) as readme:
README = readme.read()
tests_require = ['responses>=0.5']
if sys.version_info < (3, 3):
tests_require.append('mock>=1.3')
# 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-moj-irat',
version='0.3',
packages=['moj_irat'],
include_package_data=True,
license='BSD License',
description="Tools to support adding a Django-based service to "
"Ministry of Justice's Incidence Response and Tuning",
long_description=README,
install_requires=['Django>=1.8', 'requests'],
classifiers=[
'Framework :: Django',
'Intended Audience :: MoJ Developers',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3.4',
],
test_suite='runtests.runtests',
tests_require=tests_require
)
|
Remove <1.9 limit on Django version
|
Remove <1.9 limit on Django version
|
Python
|
mit
|
ministryofjustice/django-moj-irat
|
---
+++
@@ -21,7 +21,7 @@
description="Tools to support adding a Django-based service to "
"Ministry of Justice's Incidence Response and Tuning",
long_description=README,
- install_requires=['Django>=1.8,<1.9', 'requests'],
+ install_requires=['Django>=1.8', 'requests'],
classifiers=[
'Framework :: Django',
'Intended Audience :: MoJ Developers',
|
774915b91358b2e8ec7f665826b3dde4be1b5607
|
setup.py
|
setup.py
|
#!/usr/bin/env python
from distutils.core import setup
from os.path import dirname, join
from codecs import open
setup(name='hashids',
version='1.1.0',
description='Python implementation of hashids (http://www.hashids.org).'
'Compatible with python 2.6-3.',
long_description=open(join(dirname(__file__), 'README.rst'), encoding='utf-8').read(),
author='David Aurelio',
author_email='dev@david-aurelio.com',
url='https://github.com/davidaurelio/hashids-python',
license='MIT License',
py_modules=('hashids',),
classifiers=[
'Programming Language :: Python :: 2',
'Programming Language :: Python :: 2.6',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.2',
'Programming Language :: Python :: 3.3',
'Programming Language :: Python :: 3.4',
],)
|
#!/usr/bin/env python
from distutils.core import setup
from os.path import dirname, join
from codecs import open
setup(name='hashids',
version='1.1.0',
description='Python implementation of hashids (http://www.hashids.org).'
'Compatible with python 2.6-3.',
long_description=open(join(dirname(__file__), 'README.rst'), encoding='utf-8').read(),
author='David Aurelio',
author_email='dev@david-aurelio.com',
url='https://github.com/davidaurelio/hashids-python',
license='MIT License',
py_modules=('hashids',),
classifiers=[
'Programming Language :: Python :: 2',
'Programming Language :: Python :: 2.6',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.2',
'Programming Language :: Python :: 3.3',
'Programming Language :: Python :: 3.4',
'Programming Language :: Python :: 3.5',
'Programming Language :: Python :: 3.6',
],)
|
Extend list of supported python versions
|
Extend list of supported python versions
|
Python
|
mit
|
davidaurelio/hashids-python
|
---
+++
@@ -21,4 +21,6 @@
'Programming Language :: Python :: 3.2',
'Programming Language :: Python :: 3.3',
'Programming Language :: Python :: 3.4',
+ 'Programming Language :: Python :: 3.5',
+ 'Programming Language :: Python :: 3.6',
],)
|
a1ddc3eac2c663c25498fe105843eef634a59de0
|
setup.py
|
setup.py
|
from setuptools import setup, find_packages
__version__ = "0.0.13"
setup(
# package name in pypi
name='django-oscar-api',
# extract version from module.
version=__version__,
description="REST API module for django-oscar",
long_description=open('README.rst').read(),
classifiers=[
'Development Status :: 4 - Beta',
'Environment :: Web Environment',
'Framework :: Django',
'Intended Audience :: Developers',
'License :: OSI Approved :: BSD License',
'Operating System :: Unix',
'Programming Language :: Python'
],
keywords='',
author='Lars van de Kerkhof, Martijn Jacobs',
author_email='lars@permanentmarkers.nl, martijn@devopsconsulting.nl',
url='https://github.com/tangentlabs/django-oscar-api',
license='BSD',
# include all packages in the egg, except the test package.
packages=find_packages(exclude=['ez_setup', 'examples', '*tests', '*fixtures', 'sandbox']),
# for avoiding conflict have one namespace for all apc related eggs.
namespace_packages=[],
# include non python files
include_package_data=True,
zip_safe=False,
# specify dependencies
install_requires=[
'setuptools',
'django-oscar',
'djangorestframework<3.0.0'
],
# mark test target to require extras.
extras_require={
'test': ['django-nose',]
},
)
|
from setuptools import setup, find_packages
__version__ = "0.0.13"
setup(
# package name in pypi
name='django-oscar-api',
# extract version from module.
version=__version__,
description="REST API module for django-oscar",
long_description=open('README.rst').read(),
classifiers=[
'Development Status :: 4 - Beta',
'Environment :: Web Environment',
'Framework :: Django',
'Intended Audience :: Developers',
'License :: OSI Approved :: BSD License',
'Operating System :: Unix',
'Programming Language :: Python'
],
keywords='',
author='Lars van de Kerkhof, Martijn Jacobs',
author_email='lars@permanentmarkers.nl, martijn@devopsconsulting.nl',
url='https://github.com/tangentlabs/django-oscar-api',
license='BSD',
# include all packages in the egg, except the test package.
packages=find_packages(exclude=['ez_setup', 'examples', '*tests', '*fixtures', 'sandbox']),
# for avoiding conflict have one namespace for all apc related eggs.
namespace_packages=[],
# include non python files
include_package_data=True,
zip_safe=False,
# specify dependencies
install_requires=[
'setuptools',
'django-oscar>=0.6',
'djangorestframework<3.0.0'
],
# mark test target to require extras.
extras_require={
'test': ['django-nose',]
},
)
|
Use a sane version of oscar.
|
Use a sane version of oscar.
|
Python
|
bsd-3-clause
|
regulusweb/django-oscar-api,crgwbr/django-oscar-api,KuwaitNET/django-oscar-api,lijoantony/django-oscar-api
|
---
+++
@@ -35,7 +35,7 @@
# specify dependencies
install_requires=[
'setuptools',
- 'django-oscar',
+ 'django-oscar>=0.6',
'djangorestframework<3.0.0'
],
# mark test target to require extras.
|
7a393502b36567dce93df718d716373414e2e674
|
test_noise_addition.py
|
test_noise_addition.py
|
# #!/usr/bin python
#Test Noise Addition:
import numpy as np
import matplotlib.pyplot as plt
def add_noise(flux, SNR):
"Using the formulation mu/sigma"
mu = np.mean(flux)
sigma = mu / SNR
# Add normal distributed noise at the SNR level.
noisey_flux = flux + np.random.normal(0, sigma, len(flux))
return noisey_flux
def main():
""" Visually test the addition of Noise using add_noise function
"""
flux = np.ones(100)
for i, snr in enumerate([50, 100, 200, 300]):
plt.plot(add_noise(flux, snr) + 0.05 * i, label="snr={}".format(snr))
plt.legend()
plt.show()
if __name__ == "__main__":
main()
|
#!/usr/bin/env python
#Test Noise Addition:
import numpy as np
import matplotlib.pyplot as plt
def add_noise(flux, SNR):
"Using the formulation mu/sigma"
mu = np.mean(flux)
sigma = mu / SNR
# Add normal distributed noise at the SNR level.
noisey_flux = flux + np.random.normal(0, sigma, len(flux))
return noisey_flux
def add_noise2(flux, SNR):
"Using the formulation mu/sigma"
#mu = np.mean(flux)
sigma = flux / SNR
# Add normal distributed noise at the SNR level.
noisey_flux = flux + np.random.normal(0, sigma)
return noisey_flux
def main():
""" Visually test the addition of Noise using add_noise function
"""
flux = np.ones(100)
for i, snr in enumerate([50, 100, 200, 300]):
# Test that the standard deviation of the noise is close to the snr level
print("Applying a snr of {}".format(snr))
noisey_flux = add_noise(flux, snr)
std = np.std(noisey_flux)
print("Standard deviation of signal = {}".format(std))
SNR = 1 / std
print("Estimated SNR from stddev = {}".format(SNR))
plt.plot(noisey_flux + 0.05 * i, label="snr={}".format(snr))
plt.legend()
plt.show()
if __name__ == "__main__":
main()
|
Fix noise calculation, add printing to check SNR value of data
|
Fix noise calculation, add printing to check SNR value of data
|
Python
|
mit
|
jason-neal/companion_simulations,jason-neal/companion_simulations
|
---
+++
@@ -1,4 +1,4 @@
-# #!/usr/bin python
+#!/usr/bin/env python
#Test Noise Addition:
import numpy as np
@@ -14,15 +14,38 @@
return noisey_flux
+def add_noise2(flux, SNR):
+ "Using the formulation mu/sigma"
+ #mu = np.mean(flux)
+ sigma = flux / SNR
+ # Add normal distributed noise at the SNR level.
+ noisey_flux = flux + np.random.normal(0, sigma)
+ return noisey_flux
+
+
def main():
""" Visually test the addition of Noise using add_noise function
"""
flux = np.ones(100)
for i, snr in enumerate([50, 100, 200, 300]):
- plt.plot(add_noise(flux, snr) + 0.05 * i, label="snr={}".format(snr))
+ # Test that the standard deviation of the noise is close to the snr level
+ print("Applying a snr of {}".format(snr))
+ noisey_flux = add_noise(flux, snr)
+ std = np.std(noisey_flux)
+ print("Standard deviation of signal = {}".format(std))
+ SNR = 1 / std
+ print("Estimated SNR from stddev = {}".format(SNR))
+ plt.plot(noisey_flux + 0.05 * i, label="snr={}".format(snr))
+
plt.legend()
plt.show()
+
+
+
+
+
+
if __name__ == "__main__":
main()
|
38b60466398172166daa2616fc1c5ea138bf513c
|
setup.py
|
setup.py
|
from setuptools import setup, find_packages
from gcm import VERSION
setup(
name='django-gcm',
version=VERSION,
description='Google Cloud Messaging Server',
author='Adam Bogdal',
author_email='adam@bogdal.pl',
url='https://github.com/bogdal/django-gcm',
download_url='https://github.com/bogdal/django-gcm/zipball/master',
packages=find_packages(),
package_data={
'gcm': ['locale/*/LC_MESSAGES/*']
},
include_package_data=True,
classifiers=[
'Development Status :: 4 - Beta',
'Environment :: Web Environment',
'Framework :: Django',
'Intended Audience :: Developers',
'License :: OSI Approved :: BSD License',
'Operating System :: OS Independent',
'Programming Language :: Python',
'Topic :: Software Development :: Libraries :: Python Modules',
'Topic :: Utilities'],
zip_safe=False,
install_requires=[
'django>=1.5',
'django-tastypie>=0.9.13',
'pytz==2013.8',
'requests>=1.2.0',
],
)
|
from setuptools import setup, find_packages
from gcm import VERSION
setup(
name='django-gcm',
version=VERSION,
description='Google Cloud Messaging Server',
author='Adam Bogdal',
author_email='adam@bogdal.pl',
url='https://github.com/bogdal/django-gcm',
download_url='https://github.com/bogdal/django-gcm/zipball/master',
packages=find_packages(),
package_data={
'gcm': ['locale/*/LC_MESSAGES/*']
},
include_package_data=True,
classifiers=[
'Development Status :: 4 - Beta',
'Environment :: Web Environment',
'Framework :: Django',
'Intended Audience :: Developers',
'License :: OSI Approved :: BSD License',
'Operating System :: OS Independent',
'Programming Language :: Python',
'Topic :: Software Development :: Libraries :: Python Modules',
'Topic :: Utilities'],
zip_safe=False,
install_requires=[
'django>=1.5',
'django-tastypie>=0.9.13',
'python-mimeparse>=0.1.4',
'pytz==2013.8',
'requests>=1.2.0',
],
)
|
Add missing dependency for tastypie
|
Add missing dependency for tastypie
|
Python
|
bsd-2-clause
|
johnofkorea/django-gcm,johnofkorea/django-gcm,bogdal/django-gcm,bogdal/django-gcm
|
---
+++
@@ -28,6 +28,7 @@
install_requires=[
'django>=1.5',
'django-tastypie>=0.9.13',
+ 'python-mimeparse>=0.1.4',
'pytz==2013.8',
'requests>=1.2.0',
],
|
b60cca91aada5a9b634a893de5bc757afe3c5ba9
|
setup.py
|
setup.py
|
from setuptools import setup
version = '1.0.24'
try:
import pypandoc
long_description = pypandoc.convert('README.md', 'rst')
except (IOError, ImportError):
long_description = open('README.md').read()
setup(name='falcon-autocrud',
version=version,
description='Makes RESTful CRUD easier',
long_description=long_description,
url='https://bitbucket.org/garymonson/falcon-autocrud',
author='Gary Monson',
author_email='gary.monson@gmail.com',
license='MIT',
classifiers=[
'Development Status :: 4 - Beta',
'Intended Audience :: Developers',
'License :: OSI Approved :: MIT License',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.4',
'Topic :: Database :: Front-Ends',
'Topic :: Internet :: WWW/HTTP',
'Topic :: Internet :: WWW/HTTP :: Dynamic Content',
'Topic :: Internet :: WWW/HTTP :: WSGI :: Middleware',
],
keywords='falcon crud rest database',
packages=['falcon_autocrud'],
install_requires=[
'falcon >= 1.0.0',
'sqlalchemy',
],
zip_safe=False)
|
from setuptools import setup
version = '1.0.24'
try:
import pypandoc
long_description = pypandoc.convert('README.md', 'rst')
except (IOError, ImportError):
long_description = open('README.md').read()
setup(name='falcon-autocrud',
version=version,
description='Makes RESTful CRUD easier',
long_description=long_description,
url='https://bitbucket.org/garymonson/falcon-autocrud',
author='Gary Monson',
author_email='gary.monson@gmail.com',
license='MIT',
classifiers=[
'Development Status :: 4 - Beta',
'Intended Audience :: Developers',
'License :: OSI Approved :: MIT License',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.4',
'Topic :: Database :: Front-Ends',
'Topic :: Internet :: WWW/HTTP',
'Topic :: Internet :: WWW/HTTP :: Dynamic Content',
'Topic :: Internet :: WWW/HTTP :: WSGI :: Middleware',
],
keywords='falcon crud rest database',
packages=['falcon_autocrud'],
install_requires=[
'falcon >= 1.0.0',
'jsonschema',
'sqlalchemy',
],
zip_safe=False)
|
Add library required for schema checking
|
Add library required for schema checking
|
Python
|
mit
|
bdupharm/falcon-autocrud
|
---
+++
@@ -31,6 +31,7 @@
packages=['falcon_autocrud'],
install_requires=[
'falcon >= 1.0.0',
+ 'jsonschema',
'sqlalchemy',
],
zip_safe=False)
|
7c10f4511e64bedad079e39834d6b845cfb942cc
|
setup.py
|
setup.py
|
# -*- coding: utf-8 -*-
#
# setup.py
# shelly
#
"""
Package information for shelly package.
"""
from setuptools import setup
VERSION = '0.1.0'
setup(
name='shelly',
description="Standalone tools to make the shell better.",
long_description="""
Shelly makes processing line-by-line data in the shell easier, by providing
access to useful functional programming primitives and interactive tools.
""",
url="http://bitbucket.org/larsyencken/shelly/",
version=VERSION,
author="Lars Yencken",
author_email="lars@yencken.org",
license="BSD",
scripts=[
'drop',
'take',
'groupby',
'random',
'max',
'trickle',
'min',
'range',
],
)
|
# -*- coding: utf-8 -*-
#
# setup.py
# shelly
#
"""
Package information for shelly package.
"""
from setuptools import setup
VERSION = '0.1.0'
setup(
name='shelly',
description="Standalone tools to make the shell better.",
long_description="""
Shelly makes processing line-by-line data in the shell easier, by providing
access to useful functional programming primitives and interactive tools.
""",
url="http://bitbucket.org/larsyencken/shelly/",
version=VERSION,
author="Lars Yencken",
author_email="lars@yencken.org",
license="BSD",
scripts=[
'drop',
'exists',
'groupby',
'max',
'min',
'random',
'range',
'subsample',
'take',
'trickle',
],
)
|
Update the list of scripts to install.
|
Update the list of scripts to install.
|
Python
|
isc
|
larsyencken/shelly
|
---
+++
@@ -26,12 +26,14 @@
license="BSD",
scripts=[
'drop',
+ 'exists',
+ 'groupby',
+ 'max',
+ 'min',
+ 'random',
+ 'range',
+ 'subsample',
'take',
- 'groupby',
- 'random',
- 'max',
'trickle',
- 'min',
- 'range',
],
)
|
da9e6a701c701ac38d512159424fd33401b4c91d
|
setup.py
|
setup.py
|
#/usr/bin/env python
import os
from setuptools import setup, find_packages
from salad import VERSION
ROOT_DIR = os.path.dirname(__file__)
SOURCE_DIR = os.path.join(ROOT_DIR)
setup(
name="salad",
description="A nice mix of great BDD ingredients",
author="Steven Skoczen",
author_email="steven.skoczen@wk.com",
url="https://github.com/wieden-kennedy/salad",
version=VERSION,
download_url = ['https://github.com/skoczen/lettuce/tarball/fork', ],
install_requires=["nose", "splinter", "zope.testbrowser", "lettuce>=0.2.10.1"],
dependency_links = ['https://github.com/skoczen/lettuce/tarball/fork#egg=lettuce-0.2.10.1', ],
packages=find_packages(),
zip_safe=False,
include_package_data=True,
classifiers=[
"Programming Language :: Python",
"License :: OSI Approved :: BSD License",
"Operating System :: OS Independent",
"Development Status :: 4 - Beta",
"Environment :: Web Environment",
"Intended Audience :: Developers",
"Topic :: Internet :: WWW/HTTP",
"Topic :: Software Development :: Libraries :: Python Modules",
],
entry_points={
'console_scripts': ['salad = salad.cli:main'],
},
)
|
#/usr/bin/env python
import os
from setuptools import setup, find_packages
from salad import VERSION
ROOT_DIR = os.path.dirname(__file__)
SOURCE_DIR = os.path.join(ROOT_DIR)
requirements = ["argparse", "nose", "splinter", "zope.testbrowser", "lettuce>=0.2.10.1"]
try: import argparse
except ImportError: requirements.append('argparse')
setup(
name="salad",
description="A nice mix of great BDD ingredients",
author="Steven Skoczen",
author_email="steven.skoczen@wk.com",
url="https://github.com/wieden-kennedy/salad",
version=VERSION,
download_url = ['https://github.com/skoczen/lettuce/tarball/fork', ],
install_requires=requirements,
dependency_links = ['https://github.com/skoczen/lettuce/tarball/fork#egg=lettuce-0.2.10.1', ],
packages=find_packages(),
zip_safe=False,
include_package_data=True,
classifiers=[
"Programming Language :: Python",
"License :: OSI Approved :: BSD License",
"Operating System :: OS Independent",
"Development Status :: 4 - Beta",
"Environment :: Web Environment",
"Intended Audience :: Developers",
"Topic :: Internet :: WWW/HTTP",
"Topic :: Software Development :: Libraries :: Python Modules",
],
entry_points={
'console_scripts': ['salad = salad.cli:main'],
},
)
|
Install argparse when installing on Python 2.6
|
Install argparse when installing on Python 2.6
|
Python
|
bsd-3-clause
|
adw0rd/salad-py3,beanqueen/salad,salad/salad,beanqueen/salad,adw0rd/salad-py3,salad/salad
|
---
+++
@@ -5,6 +5,10 @@
ROOT_DIR = os.path.dirname(__file__)
SOURCE_DIR = os.path.join(ROOT_DIR)
+
+requirements = ["argparse", "nose", "splinter", "zope.testbrowser", "lettuce>=0.2.10.1"]
+try: import argparse
+except ImportError: requirements.append('argparse')
setup(
name="salad",
@@ -14,7 +18,7 @@
url="https://github.com/wieden-kennedy/salad",
version=VERSION,
download_url = ['https://github.com/skoczen/lettuce/tarball/fork', ],
- install_requires=["nose", "splinter", "zope.testbrowser", "lettuce>=0.2.10.1"],
+ install_requires=requirements,
dependency_links = ['https://github.com/skoczen/lettuce/tarball/fork#egg=lettuce-0.2.10.1', ],
packages=find_packages(),
zip_safe=False,
|
505489011e3a9b32efc172e002dbbcfce27b5874
|
setup.py
|
setup.py
|
#!/usr/bin/env python
from distutils.core import setup
setup(
name='fmi',
version='0.50',
description='FMI weather data fetcher',
author='Kimmo Huoman',
author_email='kipenroskaposti@gmail.com',
url='https://github.com/kipe/fmi',
packages=['fmi', 'fmi.symbols'],
package_data={
'fmi.symbols': [
'*.svg',
'fmi/symbols/*',
],
},
install_requires=[
'beautifulsoup4>=4.4.0',
'python-dateutil>=2.4.2',
'requests>=2.20.0',
])
|
#!/usr/bin/env python
from distutils.core import setup
setup(
name='fmi_weather',
version='0.50',
description='FMI weather data fetcher',
author='Kimmo Huoman',
author_email='kipenroskaposti@gmail.com',
url='https://github.com/kipe/fmi',
packages=['fmi', 'fmi.symbols'],
package_data={
'fmi.symbols': [
'*.svg',
'fmi/symbols/*',
],
},
install_requires=[
'beautifulsoup4>=4.4.0',
'python-dateutil>=2.4.2',
'requests>=2.20.0',
])
|
Rename package to fmi_weather, as 'fmi' is already taken.
|
Rename package to fmi_weather, as 'fmi' is already taken.
|
Python
|
mit
|
kipe/fmi
|
---
+++
@@ -2,7 +2,7 @@
from distutils.core import setup
setup(
- name='fmi',
+ name='fmi_weather',
version='0.50',
description='FMI weather data fetcher',
author='Kimmo Huoman',
|
b0e7db83e1b81c5babe0ac9193d5a71f655bd75c
|
setup.py
|
setup.py
|
from setuptools import setup, find_packages
setup(
name='django-likes',
version='0.1',
description='Django app providing view interface to django-secretballot.',
long_description = open('README.rst', 'r').read() + open('AUTHORS.rst', 'r').read() + open('CHANGELOG.rst', 'r').read(),
author='Praekelt Foundation',
author_email='dev@praekelt.com',
license='BSD',
url='http://github.com/praekelt/django-likes',
packages = find_packages(),
include_package_data=True,
install_requires = [
'django-secretballot',
],
tests_require=[
'django-setuptest>=0.0.6',
],
test_suite="setuptest.setuptest.SetupTestSuite",
classifiers = [
"Programming Language :: Python",
"License :: OSI Approved :: BSD License",
"Development Status :: 4 - Beta",
"Operating System :: OS Independent",
"Framework :: Django",
"Intended Audience :: Developers",
"Topic :: Internet :: WWW/HTTP :: Dynamic Content",
],
zip_safe=False,
)
|
from setuptools import setup, find_packages
setup(
name='django-likes',
version='0.1',
description='Django app providing view interface to django-secretballot.',
long_description = open('README.rst', 'r').read() + open('AUTHORS.rst', 'r').read() + open('CHANGELOG.rst', 'r').read(),
author='Praekelt Foundation',
author_email='dev@praekelt.com',
license='BSD',
url='http://github.com/praekelt/django-likes',
packages = find_packages(),
include_package_data=True,
install_requires = [
'git+https://github.com/sunlightlabs/django-secretballot.git',
],
tests_require=[
'django-setuptest>=0.0.6',
],
test_suite="setuptest.setuptest.SetupTestSuite",
classifiers = [
"Programming Language :: Python",
"License :: OSI Approved :: BSD License",
"Development Status :: 4 - Beta",
"Operating System :: OS Independent",
"Framework :: Django",
"Intended Audience :: Developers",
"Topic :: Internet :: WWW/HTTP :: Dynamic Content",
],
zip_safe=False,
)
|
Put secretballot's Git repository instead of using the release
|
Put secretballot's Git repository instead of using the release
|
Python
|
bsd-3-clause
|
Afnarel/django-likes,Afnarel/django-likes,Afnarel/django-likes
|
---
+++
@@ -12,7 +12,7 @@
packages = find_packages(),
include_package_data=True,
install_requires = [
- 'django-secretballot',
+ 'git+https://github.com/sunlightlabs/django-secretballot.git',
],
tests_require=[
'django-setuptest>=0.0.6',
|
73d8857dd3d7798d29d7f9ef9bc41193ee692616
|
setup.py
|
setup.py
|
from setuptools import setup, find_packages
setup(
name = 'annotateit',
version = '2.1.2',
packages = find_packages(),
install_requires = [
'annotator==0.7.2',
'Flask==0.8',
'Flask-Mail==0.6.1',
'Flask-SQLAlchemy==0.15',
'Flask-WTF==0.5.4',
'SQLAlchemy==0.7.5',
'itsdangerous==0.12'
],
test_requires = [
'nose==1.1.2',
'mock==0.8.0'
]
)
|
from setuptools import setup, find_packages
setup(
name = 'annotateit',
version = '2.1.2',
packages = find_packages(),
install_requires = [
'annotator==0.7.3',
'Flask==0.8',
'Flask-Mail==0.6.1',
'Flask-SQLAlchemy==0.15',
'Flask-WTF==0.5.4',
'SQLAlchemy==0.7.5',
'itsdangerous==0.12'
],
test_requires = [
'nose==1.1.2',
'mock==0.8.0'
]
)
|
Update dependency on annotator -> 0.7.3 to fix datetime decoder bug.
|
Update dependency on annotator -> 0.7.3 to fix datetime decoder bug.
|
Python
|
agpl-3.0
|
openannotation/annotateit,openannotation/annotateit
|
---
+++
@@ -6,7 +6,7 @@
packages = find_packages(),
install_requires = [
- 'annotator==0.7.2',
+ 'annotator==0.7.3',
'Flask==0.8',
'Flask-Mail==0.6.1',
'Flask-SQLAlchemy==0.15',
|
a074ccda405c5215bc3157f9d6086dced6f271a9
|
setup.py
|
setup.py
|
__author__ = 'adaml, boul, jedeko'
from setuptools import setup
setup(
zip_safe=True,
name='cloudify-cloudstack-plugin',
version='1.1',
packages=[
'cloudstack_plugin',
'cloudstack_exoscale_plugin'
],
license='Apache License 2.0',
description='Cloudify plugin for the Cloudstack cloud infrastructure.',
install_requires=[
"cloudify-plugins-common",
"cloudify-plugins-common>=3.0",
"apache-libcloud"
]
)
|
__author__ = 'adaml, boul, jedeko'
from setuptools import setup
setup(
zip_safe=True,
name='cloudify-cloudstack-plugin',
version='1.1',
packages=[
'cloudstack_plugin',
'cloudstack_exoscale_plugin'
],
license='Apache License 2.0',
description='Cloudify plugin for the Cloudstack cloud infrastructure.',
install_requires=[
"cloudify-plugins-common",
"cloudify-plugins-common>=3.0",
"apache-libcloud>=0.16"
]
)
|
Update libcloud dependency to 0.16
|
Update libcloud dependency to 0.16
|
Python
|
apache-2.0
|
cloudify-cosmo/cloudify-cloudstack-plugin,cloudify-cosmo/cloudify-cloudstack-plugin
|
---
+++
@@ -15,6 +15,6 @@
install_requires=[
"cloudify-plugins-common",
"cloudify-plugins-common>=3.0",
- "apache-libcloud"
+ "apache-libcloud>=0.16"
]
)
|
b7e4a6df41dd1938e6be999a59871048094e0727
|
setup.py
|
setup.py
|
from setuptools import setup, find_packages
setup(
name='panoptescli',
version='1.1.1',
url='https://github.com/zooniverse/panoptes-cli',
author='Adam McMaster',
author_email='adam@zooniverse.org',
description=(
'A command-line client for Panoptes, the API behind the Zooniverse'
),
packages=find_packages(),
include_package_data=True,
install_requires=[
'Click>=6.7,<7.1',
'PyYAML>=5.1,<5.4',
'panoptes-client>=1.0,<2.0',
'humanize>=0.5.1,<0.6',
'pathvalidate>=0.29.0,<0.30',
],
entry_points='''
[console_scripts]
panoptes=panoptes_cli.scripts.panoptes:cli
''',
)
|
from setuptools import setup, find_packages
setup(
name='panoptescli',
version='1.1.1',
url='https://github.com/zooniverse/panoptes-cli',
author='Adam McMaster',
author_email='adam@zooniverse.org',
description=(
'A command-line client for Panoptes, the API behind the Zooniverse'
),
packages=find_packages(),
include_package_data=True,
install_requires=[
'Click>=6.7,<7.1',
'PyYAML>=5.1,<5.4',
'panoptes-client>=1.0,<2.0',
'humanize>=0.5.1,<1.1',
'pathvalidate>=0.29.0,<0.30',
],
entry_points='''
[console_scripts]
panoptes=panoptes_cli.scripts.panoptes:cli
''',
)
|
Update humanize requirement from <0.6,>=0.5.1 to >=0.5.1,<1.1
|
Update humanize requirement from <0.6,>=0.5.1 to >=0.5.1,<1.1
Updates the requirements on [humanize](https://github.com/jmoiron/humanize) to permit the latest version.
- [Release notes](https://github.com/jmoiron/humanize/releases)
- [Commits](https://github.com/jmoiron/humanize/compare/0.5.1...1.0.0)
Signed-off-by: dependabot-preview[bot] <5bdcd3c0d4d24ae3e71b3b452a024c6324c7e4bb@dependabot.com>
|
Python
|
apache-2.0
|
zooniverse/panoptes-cli
|
---
+++
@@ -15,7 +15,7 @@
'Click>=6.7,<7.1',
'PyYAML>=5.1,<5.4',
'panoptes-client>=1.0,<2.0',
- 'humanize>=0.5.1,<0.6',
+ 'humanize>=0.5.1,<1.1',
'pathvalidate>=0.29.0,<0.30',
],
entry_points='''
|
b1168ed34505c8bfa20e6679c06cc9fd0ae559d1
|
setup.py
|
setup.py
|
from setuptools import setup
from fdep import __VERSION__
try:
ldsc = open("README.md").read()
except:
ldsc = ""
setup(
name="fdep",
packages=['fdep'],
version=__VERSION__,
author="Checkr",
author_email="eng@checkr.com",
url="http://github.com/checkr/fdep",
license="MIT LICENSE",
description="Fdep is a simple, easy-to-use, production-ready tool/library written in Python to download datasets, misc. files for your machine learning projects.",
long_description=ldsc,
entry_points={
'console_scripts': [
'fdep = fdep.__main__:main'
]
},
install_requires=[
'PyYAML==3.12',
'boto3==1.4.0',
'requests==2.11.1',
'colorama==0.3.7',
'tqdm==4.8.4'
]
)
|
from setuptools import setup
from fdep import __VERSION__
try:
ldsc = open("README.md").read()
except:
ldsc = ""
setup(
name="fdep",
packages=['fdep'],
version=__VERSION__,
author="Checkr",
author_email="eng@checkr.com",
url="http://github.com/checkr/fdep",
license="MIT LICENSE",
description="Fdep is a simple, easy-to-use, production-ready tool/library written in Python to download datasets, misc. files for your machine learning projects.",
long_description=ldsc,
entry_points={
'console_scripts': ['fdep=fdep.__main__:main']
},
install_requires=[
'PyYAML==3.12',
'boto3==1.4.0',
'requests==2.11.1',
'colorama==0.3.7',
'tqdm==4.8.4'
]
)
|
Clean up a little bit
|
Clean up a little bit
|
Python
|
mit
|
checkr/fdep
|
---
+++
@@ -17,9 +17,7 @@
description="Fdep is a simple, easy-to-use, production-ready tool/library written in Python to download datasets, misc. files for your machine learning projects.",
long_description=ldsc,
entry_points={
- 'console_scripts': [
- 'fdep = fdep.__main__:main'
- ]
+ 'console_scripts': ['fdep=fdep.__main__:main']
},
install_requires=[
'PyYAML==3.12',
|
a8ac3656ad66eb5767742adc6e0c35b61e7f13d6
|
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.17',
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.18',
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.18.
|
Update the PyPI version to 0.2.18.
|
Python
|
mit
|
Doist/todoist-python
|
---
+++
@@ -10,7 +10,7 @@
setup(
name='todoist-python',
- version='0.2.17',
+ version='0.2.18',
packages=['todoist', 'todoist.managers'],
author='Doist Team',
author_email='info@todoist.com',
|
0a047eabb06afcf870e6fa160b808816454a85d7
|
setup.py
|
setup.py
|
from setuptools import setup
import sys, os
from pip.req import parse_requirements
exec(open('tooldog/version.py').read())
install_reqs = parse_requirements('requirements.txt', session='')
reqs = [str(ir.req) for ir in install_reqs]
if sys.argv[-1] == 'publish':
os.system("python setup.py sdist bdist_wheel upload; git push")
sys.exit()
setup(name="tooldog",
version=__version__,
description='Tool description generator (from https//bio.tools to XML and CWL)',
author='Kenzo-Hugo Hillion and Herve Menager',
author_email='kehillio@pasteur.fr and hmenager@pasteur.fr',
license='MIT',
keywords = ['biotools','galaxy','xml','cwl'],
install_requires=reqs,
packages=["tooldog", "tooldog.annotate", "tooldog.analyse"],
package_data={
'tooldog': ['annotate/data/*'],
},
entry_points={'console_scripts':['tooldog=tooldog.main:run']},
classifiers=[
'Development Status :: 4 - Beta',
'Topic :: Scientific/Engineering :: Bio-Informatics',
'Operating System :: OS Independent',
'Intended Audience :: Developers',
'Intended Audience :: Science/Research',
'Environment :: Console',
],
)
|
from setuptools import setup
import sys, os
exec(open('tooldog/version.py').read())
if sys.argv[-1] == 'publish':
os.system("python setup.py sdist bdist_wheel upload; git push")
sys.exit()
setup(name="tooldog",
version=__version__,
description='Tool description generator (from https//bio.tools to XML and CWL)',
author='Kenzo-Hugo Hillion and Herve Menager',
author_email='kehillio@pasteur.fr and hmenager@pasteur.fr',
license='MIT',
keywords = ['biotools','galaxy','xml','cwl'],
install_requires=['rdflib', 'requests', 'galaxyxml', 'cwlgen'],
packages=["tooldog", "tooldog.annotate", "tooldog.analyse"],
package_data={
'tooldog': ['annotate/data/*'],
},
entry_points={'console_scripts':['tooldog=tooldog.main:run']},
classifiers=[
'Development Status :: 4 - Beta',
'Topic :: Scientific/Engineering :: Bio-Informatics',
'Operating System :: OS Independent',
'Intended Audience :: Developers',
'Intended Audience :: Science/Research',
'Environment :: Console',
],
)
|
Fix Pypi issue for correct install
|
Fix Pypi issue for correct install
|
Python
|
mit
|
khillion/ToolDog
|
---
+++
@@ -1,11 +1,7 @@
from setuptools import setup
import sys, os
-from pip.req import parse_requirements
exec(open('tooldog/version.py').read())
-
-install_reqs = parse_requirements('requirements.txt', session='')
-reqs = [str(ir.req) for ir in install_reqs]
if sys.argv[-1] == 'publish':
os.system("python setup.py sdist bdist_wheel upload; git push")
@@ -18,7 +14,7 @@
author_email='kehillio@pasteur.fr and hmenager@pasteur.fr',
license='MIT',
keywords = ['biotools','galaxy','xml','cwl'],
- install_requires=reqs,
+ install_requires=['rdflib', 'requests', 'galaxyxml', 'cwlgen'],
packages=["tooldog", "tooldog.annotate", "tooldog.analyse"],
package_data={
'tooldog': ['annotate/data/*'],
|
8e6041d78da54415d4b4cf918a0abba2f779b8d7
|
setup.py
|
setup.py
|
#!/usr/bin/env python
from distutils.core import setup
import os
#README = "/".join([os.path.dirname(__file__), "README.md"])
#with open(README) as file:
# long_description = file.read()
setup(
name='graphitesend',
version='0.3.0',
description='A simple interface for sending metrics to Graphite',
author='Danny Lawrence',
author_email='dannyla@linux.com',
url='https://github.com/daniellawrence/graphitesend',
package_dir={'': 'src'},
packages=[''],
scripts=['bin/graphitesend'],
long_description="https://github.com/daniellawrence/graphitesend",
)
|
#!/usr/bin/env python
from distutils.core import setup
import os
#README = "/".join([os.path.dirname(__file__), "README.md"])
#with open(README) as file:
# long_description = file.read()
setup(
name='graphitesend',
version='0.3.2',
description='A simple interface for sending metrics to Graphite',
author='Danny Lawrence',
author_email='dannyla@linux.com',
url='https://github.com/daniellawrence/graphitesend',
package_dir={'': 'src'},
packages=[''],
scripts=['bin/graphitesend'],
long_description="https://github.com/daniellawrence/graphitesend",
)
|
Increase version for logging and pep8
|
Increase version for logging and pep8
|
Python
|
apache-2.0
|
daniellawrence/graphitesend,rdefeo/graphitesend,PabloLefort/graphitesend,numberly/graphitesend
|
---
+++
@@ -9,7 +9,7 @@
setup(
name='graphitesend',
- version='0.3.0',
+ version='0.3.2',
description='A simple interface for sending metrics to Graphite',
author='Danny Lawrence',
author_email='dannyla@linux.com',
|
89ede0eaf7ef96824731da94fba38075c46e2c95
|
setup.py
|
setup.py
|
#! /usr/bin/env python
# coding: utf-8
from setuptools import find_packages, setup
setup(name='egoio',
author='NEXT ENERGY, Reiner Lemoine Institut gGmbH, ZNES',
author_email='',
description='ego input/output repository',
version='0.3.0',
url='https://github.com/openego/ego.io',
packages=find_packages(),
license='GNU Affero General Public License v3.0',
install_requires=[
'geoalchemy2 >= 0.3.0, <= 0.4.0',
'sqlalchemy >= 1.0.11, <= 1.1.15',
'keyring >= 4.0',
'psycopg2'],
extras_require={
"sqlalchemy": 'postgresql'}
)
|
#! /usr/bin/env python
# coding: utf-8
from setuptools import find_packages, setup
setup(name='egoio',
author='NEXT ENERGY, Reiner Lemoine Institut gGmbH, ZNES',
author_email='',
description='ego input/output repository',
version='0.3.0',
url='https://github.com/openego/ego.io',
packages=find_packages(),
license='GNU Affero General Public License v3.0',
install_requires=[
'geoalchemy2 >= 0.3.0, <= 0.4.0',
'sqlalchemy >= 1.0.11, <= 1.1.15',
'keyring >= 4.0',
'psycopg2'],
extras_require={
"sqlalchemy": 'postgresql'},
package_data={'tools': 'sqlacodegen_oedb.sh'}
)
|
Add codegen script to package_data
|
Add codegen script to package_data
|
Python
|
agpl-3.0
|
openego/ego.io,openego/ego.io
|
---
+++
@@ -17,5 +17,6 @@
'keyring >= 4.0',
'psycopg2'],
extras_require={
- "sqlalchemy": 'postgresql'}
+ "sqlalchemy": 'postgresql'},
+ package_data={'tools': 'sqlacodegen_oedb.sh'}
)
|
c308ddec90d37777896a9275738fac8e5764dec7
|
setup.py
|
setup.py
|
#!/usr/bin/env python
from setuptools import setup, find_packages
setup(
name='Eve-Mongoengine',
version='0.0.1',
url='https://github.com/hellerstanislav/eve-mongoengine',
author='Stanislav Heller',
author_email='heller.stanislav@gmail.com',
description='An Eve extension for Mongoengine ODM support',
packages=['eve_mongoengine'],
zip_safe=False,
test_suite="tests",
include_package_data=True,
platforms='any',
install_requires=[
'Eve>=0.1',
'Mongoengine>=0.8.4',
]
)
|
#!/usr/bin/env python
from setuptools import setup, find_packages
setup(
name='Eve-Mongoengine',
version='0.0.1',
url='https://github.com/hellerstanislav/eve-mongoengine',
author='Stanislav Heller',
author_email='heller.stanislav@gmail.com',
description='An Eve extension for Mongoengine ODM support',
packages=['eve_mongoengine'],
zip_safe=False,
test_suite="tests",
include_package_data=True,
platforms='any',
install_requires=[
'Eve>=0.1',
'pymongo==2.6.2',
'Mongoengine>=0.8.4',
]
)
|
Update dependency to pymongo 2.6.2
|
Update dependency to pymongo 2.6.2
|
Python
|
mit
|
bumbeelabs2/eve-mongoengine,MongoEngine/eve-mongoengine,rudaoshi/eve-mongoengine,kcaylor/eve-mongoengine,rudaoshi/eve-mongoengine
|
---
+++
@@ -16,6 +16,7 @@
platforms='any',
install_requires=[
'Eve>=0.1',
+ 'pymongo==2.6.2',
'Mongoengine>=0.8.4',
]
)
|
aae0586728f29887b6789260a286cb3e7a244b52
|
setup.py
|
setup.py
|
try:
from setuptools import setup
except ImportError:
from distutils.core import setup
from azurectl.version import __VERSION__
config = {
'description': 'Manage Azure PubCloud Service',
'author': 'PubCloud Development team',
'url': 'https://github.com/SUSE/azurectl',
'download_url': 'https://github.com/SUSE/azurectl',
'author_email': 'public-cloud-dev@susecloud.net',
'version': __VERSION__,
'install_requires': [
'docopt==0.6.2',
'APScheduler==3.0.2',
'pyliblzma==0.5.3',
'azure_storage==0.20.0',
'azure_servicemanagement_legacy==0.20.0',
'python-dateutil==2.1'
],
'packages': ['azurectl'],
'entry_points': {
'console_scripts': ['azurectl=azurectl.azurectl:main'],
},
'name': 'azurectl'
}
setup(**config)
|
try:
from setuptools import setup
except ImportError:
from distutils.core import setup
from azurectl.version import __VERSION__
config = {
'description': 'Manage Azure PubCloud Service',
'author': 'PubCloud Development team',
'url': 'https://github.com/SUSE/azurectl',
'download_url': 'https://github.com/SUSE/azurectl',
'author_email': 'public-cloud-dev@susecloud.net',
'version': __VERSION__,
'install_requires': [
'docopt==0.6.2',
'APScheduler==3.0.2',
'pyliblzma==0.5.3',
'azure_storage==0.20.0',
'azure_servicemanagement_legacy==0.20.0',
'python-dateutil==2.4'
],
'packages': ['azurectl'],
'entry_points': {
'console_scripts': ['azurectl=azurectl.azurectl:main'],
},
'name': 'azurectl'
}
setup(**config)
|
Update python-dateutil to match the package we ship in Cloud:Tools
|
Update python-dateutil to match the package we ship in Cloud:Tools
|
Python
|
apache-2.0
|
SUSE/azurectl,SUSE/azurectl,SUSE/azurectl
|
---
+++
@@ -18,7 +18,7 @@
'pyliblzma==0.5.3',
'azure_storage==0.20.0',
'azure_servicemanagement_legacy==0.20.0',
- 'python-dateutil==2.1'
+ 'python-dateutil==2.4'
],
'packages': ['azurectl'],
'entry_points': {
|
5e8218a2fb5b0c63df4394e299ad75fec2494b29
|
setup.py
|
setup.py
|
import os
from setuptools import setup
from withtool import __version__
def read(fname):
path = os.path.join(os.path.dirname(__file__), fname)
with open(path, encoding='utf-8') as f:
return f.read()
setup(
name='with',
version=__version__,
description='A shell context manager',
long_description=read('README.rst'),
author='Renan Ivo',
author_email='renanivom@gmail.com',
url='https://github.com/renanivo/with',
keywords='context manager shell command line repl',
scripts=['bin/with'],
install_requires=[
'appdirs==1.4.3',
'docopt==0.6.2',
'prompt-toolkit==1.0',
'python-slugify==1.2.1',
],
packages=['withtool'],
classifiers=[
'Environment :: Console',
'Intended Audience :: Developers',
'License :: OSI Approved :: MIT License',
'Operating System :: OS Independent',
'Programming Language :: Python :: 3 :: Only',
'Programming Language :: Python :: 3.4',
'Programming Language :: Python :: 3.5',
]
)
|
import os
from setuptools import setup
from withtool import __version__
def read(fname):
path = os.path.join(os.path.dirname(__file__), fname)
with open(path, encoding='utf-8') as f:
return f.read()
setup(
name='with',
version=__version__,
description='A shell context manager',
long_description=read('README.rst'),
author='Renan Ivo',
author_email='renanivom@gmail.com',
url='https://github.com/renanivo/with',
keywords='context manager shell command line repl',
scripts=['bin/with'],
install_requires=[
'appdirs==1.4.3',
'docopt==0.6.2',
'prompt-toolkit==1.0',
'python-slugify==1.2.2',
],
packages=['withtool'],
classifiers=[
'Environment :: Console',
'Intended Audience :: Developers',
'License :: OSI Approved :: MIT License',
'Operating System :: OS Independent',
'Programming Language :: Python :: 3 :: Only',
'Programming Language :: Python :: 3.4',
'Programming Language :: Python :: 3.5',
]
)
|
Upgrade dependency python-slugify to ==1.2.2
|
Upgrade dependency python-slugify to ==1.2.2
|
Python
|
mit
|
renanivo/with
|
---
+++
@@ -25,7 +25,7 @@
'appdirs==1.4.3',
'docopt==0.6.2',
'prompt-toolkit==1.0',
- 'python-slugify==1.2.1',
+ 'python-slugify==1.2.2',
],
packages=['withtool'],
classifiers=[
|
b9b5af6bc8da56caadf74e75b833338330305779
|
setup.py
|
setup.py
|
from setuptools import setup, find_packages
import sys, os
here = os.path.abspath(os.path.dirname(__file__))
try:
README = open(os.path.join(here, 'README.rst')).read()
except IOError:
README = ''
version = "0.1.0"
test_requirements = [
'nose',
'webtest',
]
setup(name='tgext.mailer',
version=version,
description="TurboGears extension for sending emails with transaction manager integration",
long_description=README,
classifiers=[
"Environment :: Web Environment",
"Framework :: TurboGears"
],
keywords='turbogears2.extension',
author='Alessandro Molina',
author_email='amol@turbogears.org',
url='https://github.com/amol-/tgext.mailer',
license='MIT',
packages=find_packages(exclude=['ez_setup', 'examples', 'tgext.mailer.tests']),
namespace_packages = ['tgext'],
include_package_data=True,
zip_safe=False,
install_requires=[
"TurboGears2 >= 2.3.2",
"repoze.sendmail == 4.1",
],
extras_require={
# Used by Travis and Coverage due to setup.py nosetests
# causing a coredump when used with coverage
'testing': test_requirements,
},
test_suite='nose.collector',
tests_require=test_requirements,
entry_points="""
# -*- Entry points: -*-
""",
)
|
from setuptools import setup, find_packages
import sys, os
here = os.path.abspath(os.path.dirname(__file__))
try:
README = open(os.path.join(here, 'README.rst')).read()
except IOError:
README = ''
version = "0.1.0"
test_requirements = [
'nose',
'webtest',
]
setup(name='tgext.mailer',
version=version,
description="TurboGears extension for sending emails with transaction manager integration",
long_description=README,
classifiers=[
"Environment :: Web Environment",
"Framework :: TurboGears"
],
keywords='turbogears2.extension',
author='Alessandro Molina',
author_email='amol@turbogears.org',
url='https://github.com/amol-/tgext.mailer',
license='MIT',
packages=find_packages(exclude=['ez_setup', 'examples', 'tgext.mailer.tests']),
namespace_packages = ['tgext'],
include_package_data=True,
zip_safe=False,
install_requires=[
"TurboGears2 >= 2.3.2",
"repoze.sendmail == 4.3",
],
extras_require={
# Used by Travis and Coverage due to setup.py nosetests
# causing a coredump when used with coverage
'testing': test_requirements,
},
test_suite='nose.collector',
tests_require=test_requirements,
entry_points="""
# -*- Entry points: -*-
""",
)
|
Upgrade to sendmail 4.3, fixed old bug with transaction
|
Upgrade to sendmail 4.3, fixed old bug with transaction
|
Python
|
mit
|
amol-/tgext.mailer
|
---
+++
@@ -33,7 +33,7 @@
zip_safe=False,
install_requires=[
"TurboGears2 >= 2.3.2",
- "repoze.sendmail == 4.1",
+ "repoze.sendmail == 4.3",
],
extras_require={
# Used by Travis and Coverage due to setup.py nosetests
|
e0d284e9796bddad2dcb1284f9c9fa34c85db8af
|
setup.py
|
setup.py
|
from distutils.core import setup
import pykka
setup(
name='Pykka',
version=pykka.get_version(),
author='Stein Magnus Jodal',
author_email='stein.magnus@jodal.no',
packages=['pykka'],
url='http://jodal.github.com/pykka/',
license='Apache License, Version 2.0',
description='Pykka is easy to use concurrency using the actor model',
long_description=open('README.rst').read(),
classifiers=[
'Development Status :: 3 - Alpha',
'Intended Audience :: Developers',
'License :: OSI Approved :: Apache Software License',
'Programming Language :: Python :: 2.6',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3',
'Topic :: Software Development :: Libraries',
],
)
|
from distutils.core import setup
import pykka
setup(
name='Pykka',
version=pykka.get_version(),
author='Stein Magnus Jodal',
author_email='stein.magnus@jodal.no',
packages=['pykka'],
url='http://jodal.github.com/pykka/',
license='Apache License, Version 2.0',
description='Pykka is easy to use concurrency using the actor model',
long_description=open('README.rst').read(),
classifiers=[
'Development Status :: 4 - Beta',
'Intended Audience :: Developers',
'License :: OSI Approved :: Apache Software License',
'Programming Language :: Python :: 2.6',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3',
'Topic :: Software Development :: Libraries',
],
)
|
Change development status from alpha to beta
|
Change development status from alpha to beta
|
Python
|
apache-2.0
|
jodal/pykka,tamland/pykka,tempbottle/pykka
|
---
+++
@@ -13,7 +13,7 @@
description='Pykka is easy to use concurrency using the actor model',
long_description=open('README.rst').read(),
classifiers=[
- 'Development Status :: 3 - Alpha',
+ 'Development Status :: 4 - Beta',
'Intended Audience :: Developers',
'License :: OSI Approved :: Apache Software License',
'Programming Language :: Python :: 2.6',
|
9efd6c325376270938cd16fec9907fcb4680722e
|
setup.py
|
setup.py
|
from setuptools import setup, find_packages
with open("README.md", "r") as fh:
long_description = fh.read()
setup(
name="EQTransformer",
author="S. Mostafa Mousavi",
version="0.1.61",
author_email="smousavi05@gmail.com",
description="A python package for making and using attentive deep-learning models for earthquake signal detection and phase picking.",
long_description=long_description,
long_description_content_type="text/markdown",
url="https://github.com/smousavi05/EQTransformer",
license="MIT",
packages=find_packages(),
keywords='Seismology, Earthquakes Detection, P&S Picking, Deep Learning, Attention Mechanism',
install_requires=[
'pytest',
'numpy==1.20.3',
'keyring>=15.1',
'pkginfo>=1.4.2',
'scipy==1.4.1',
'tensorflow==2.5.1',
'keras==2.3.1',
'matplotlib',
'pandas',
'tqdm==4.48.0',
'h5py==3.1.0',
'obspy',
'jupyter'],
python_requires='>=3.6',
)
|
from setuptools import setup, find_packages
with open("README.md", "r") as fh:
long_description = fh.read()
setup(
name="EQTransformer",
author="S. Mostafa Mousavi",
version="0.1.61",
author_email="smousavi05@gmail.com",
description="A python package for making and using attentive deep-learning models for earthquake signal detection and phase picking.",
long_description=long_description,
long_description_content_type="text/markdown",
url="https://github.com/smousavi05/EQTransformer",
license="MIT",
packages=find_packages(),
keywords='Seismology, Earthquakes Detection, P&S Picking, Deep Learning, Attention Mechanism',
install_requires=[
'pytest',
'numpy==1.20.3',
'keyring>=15.1',
'pkginfo>=1.4.2',
'scipy==1.4.1',
'tensorflow==2.5.2',
'keras==2.3.1',
'matplotlib',
'pandas',
'tqdm==4.48.0',
'h5py==3.1.0',
'obspy',
'jupyter'],
python_requires='>=3.6',
)
|
Bump tensorflow from 2.5.1 to 2.5.2
|
Bump tensorflow from 2.5.1 to 2.5.2
Bumps [tensorflow](https://github.com/tensorflow/tensorflow) from 2.5.1 to 2.5.2.
- [Release notes](https://github.com/tensorflow/tensorflow/releases)
- [Changelog](https://github.com/tensorflow/tensorflow/blob/master/RELEASE.md)
- [Commits](https://github.com/tensorflow/tensorflow/compare/v2.5.1...v2.5.2)
---
updated-dependencies:
- dependency-name: tensorflow
dependency-type: direct:production
...
Signed-off-by: dependabot[bot] <5bdcd3c0d4d24ae3e71b3b452a024c6324c7e4bb@github.com>
|
Python
|
mit
|
smousavi05/EQTransformer
|
---
+++
@@ -21,7 +21,7 @@
'keyring>=15.1',
'pkginfo>=1.4.2',
'scipy==1.4.1',
- 'tensorflow==2.5.1',
+ 'tensorflow==2.5.2',
'keras==2.3.1',
'matplotlib',
'pandas',
|
53332dd8eae28e9a42ea213b8b3d482f09135ce3
|
setup.py
|
setup.py
|
#!/usr/bin/env python
import sys
from setuptools import setup
requires = ['six']
tests_require = ['mock', 'nose']
if sys.version_info[0] == 2:
requires += ['python-dateutil>=1.0, != 2.0']
else:
# Py3k
requires += ['python-dateutil>=2.0']
with open('README.rst') as f:
readme = f.read()
setup(
name='freezegun',
version='0.3.10',
description='Let your Python tests travel through time',
long_desciption=readme,
author='Steve Pulec',
author_email='spulec@gmail.com',
url='https://github.com/spulec/freezegun',
packages=['freezegun'],
install_requires=requires,
tests_require=tests_require,
include_package_data=True,
license='Apache 2.0',
classifiers=[
'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 :: 3.5',
'Programming Language :: Python :: 3.6',
],
)
|
#!/usr/bin/env python
import sys
from setuptools import setup
requires = ['six']
tests_require = ['mock', 'nose']
if sys.version_info[0] == 2:
requires += ['python-dateutil>=1.0, != 2.0']
else:
# Py3k
requires += ['python-dateutil>=2.0']
with open('README.rst') as f:
readme = f.read()
setup(
name='freezegun',
version='0.3.10',
description='Let your Python tests travel through time',
long_desciption=readme,
author='Steve Pulec',
author_email='spulec@gmail.com',
url='https://github.com/spulec/freezegun',
packages=['freezegun'],
install_requires=requires,
tests_require=tests_require,
include_package_data=True,
license='Apache 2.0',
python_requires='>=2.6, !=3.0.*, !=3.1.*, !=3.2.*',
classifiers=[
'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 :: 3.5',
'Programming Language :: Python :: 3.6',
],
)
|
Add python_requires to help pip
|
Add python_requires to help pip
|
Python
|
apache-2.0
|
spulec/freezegun
|
---
+++
@@ -29,6 +29,7 @@
tests_require=tests_require,
include_package_data=True,
license='Apache 2.0',
+ python_requires='>=2.6, !=3.0.*, !=3.1.*, !=3.2.*',
classifiers=[
'License :: OSI Approved :: Apache Software License',
'Programming Language :: Python :: 2',
|
bcf7b9a670b2ad1ad1962879de2009453e98a315
|
setup.py
|
setup.py
|
from distutils.core import setup
import skyfield # to learn the version
setup(
name='skyfield',
version=skyfield.__version__,
description=skyfield.__doc__.split('\n', 1)[0],
long_description=open('README.rst').read(),
license='MIT',
author='Brandon Rhodes',
author_email='brandon@rhodesmill.org',
url='http://github.com/brandon-rhodes/python-skyfield/',
classifiers=[
'Development Status :: 4 - Beta',
'Intended Audience :: Developers',
'Intended Audience :: Education',
'Intended Audience :: Science/Research',
'License :: OSI Approved :: MIT License',
'Programming Language :: Python :: 2.6',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3.2',
'Programming Language :: Python :: 3.3',
'Programming Language :: Python :: 3.4',
'Topic :: Scientific/Engineering :: Astronomy',
],
packages=[
'skyfield',
'skyfield.data',
'skyfield.tests',
],
package_data = {
'skyfield': ['documentation/*.rst'],
'skyfield.data': ['*.npy', '*.txt'],
},
install_requires=[
'de421==2008.1',
'jplephem>=1.2',
'numpy',
'requests>=1.2.3',
'sgp4>=1.3',
])
|
from distutils.core import setup
import skyfield # safe, because __init__.py contains no import statements
setup(
name='skyfield',
version=skyfield.__version__,
description=skyfield.__doc__.split('\n', 1)[0],
long_description=open('README.rst').read(),
license='MIT',
author='Brandon Rhodes',
author_email='brandon@rhodesmill.org',
url='http://github.com/brandon-rhodes/python-skyfield/',
classifiers=[
'Development Status :: 4 - Beta',
'Intended Audience :: Developers',
'Intended Audience :: Education',
'Intended Audience :: Science/Research',
'License :: OSI Approved :: MIT License',
'Programming Language :: Python :: 2.6',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3.2',
'Programming Language :: Python :: 3.3',
'Programming Language :: Python :: 3.4',
'Topic :: Scientific/Engineering :: Astronomy',
],
packages=[
'skyfield',
'skyfield.data',
'skyfield.tests',
],
package_data = {
'skyfield': ['documentation/*.rst'],
'skyfield.data': ['*.npy', '*.txt'],
},
install_requires=[
'de421==2008.1',
'jplephem>=1.2',
'numpy',
'requests>=1.2.3',
'sgp4>=1.3',
])
|
Make it clearer when import could be a bad idea
|
Make it clearer when import could be a bad idea
|
Python
|
mit
|
skyfielders/python-skyfield,exoanalytic/python-skyfield,ozialien/python-skyfield,GuidoBR/python-skyfield,ozialien/python-skyfield,exoanalytic/python-skyfield,skyfielders/python-skyfield,GuidoBR/python-skyfield
|
---
+++
@@ -1,5 +1,5 @@
from distutils.core import setup
-import skyfield # to learn the version
+import skyfield # safe, because __init__.py contains no import statements
setup(
name='skyfield',
|
d251f7f97e5fc32fd41266430ed0e991109e1fbe
|
setup.py
|
setup.py
|
from setuptools import setup, find_packages
from dimod import __version__, __author__, __description__, __authoremail__
install_requires = ['decorator>=4.1.0']
extras_require = {'all': ['numpy']}
packages = ['dimod',
'dimod.responses',
'dimod.composites',
'dimod.samplers']
setup(
name='dimod',
version=__version__,
author=__author__,
author_email=__authoremail__,
description=__description__,
url='https://github.com/dwavesystems/dimod',
download_url='https://github.com/dwavesys/dimod/archive/0.1.1.tar.gz',
license='Apache 2.0',
packages=packages,
install_requires=install_requires,
extras_require=extras_require,
)
|
from setuptools import setup, find_packages
from dimod import __version__, __author__, __description__, __authoremail__, _PY2
install_requires = ['decorator>=4.1.0']
if _PY2:
# enum is built-in for python 3
install_requires.append('enum')
extras_require = {'all': ['numpy']}
packages = ['dimod',
'dimod.responses',
'dimod.composites',
'dimod.samplers']
setup(
name='dimod',
version=__version__,
author=__author__,
author_email=__authoremail__,
description=__description__,
url='https://github.com/dwavesystems/dimod',
download_url='https://github.com/dwavesys/dimod/archive/0.1.1.tar.gz',
license='Apache 2.0',
packages=packages,
install_requires=install_requires,
extras_require=extras_require,
)
|
Add enum for python2 install
|
Add enum for python2 install
|
Python
|
apache-2.0
|
dwavesystems/dimod,dwavesystems/dimod
|
---
+++
@@ -1,8 +1,12 @@
from setuptools import setup, find_packages
-from dimod import __version__, __author__, __description__, __authoremail__
+from dimod import __version__, __author__, __description__, __authoremail__, _PY2
install_requires = ['decorator>=4.1.0']
+if _PY2:
+ # enum is built-in for python 3
+ install_requires.append('enum')
+
extras_require = {'all': ['numpy']}
packages = ['dimod',
|
9c4ceba823a1e25ce75e5231a705ca2cbc76c3dc
|
setup.py
|
setup.py
|
import re
import codecs
from setuptools import setup
import upsidedown
VERSION = str(upsidedown.__version__)
(AUTHOR, EMAIL) = re.match('^(.*?)\s*<(.*)>$', upsidedown.__author__).groups()
URL = upsidedown.__url__
LICENSE = upsidedown.__license__
with codecs.open('README', encoding='utf-8') as readme:
long_description = readme.read()
setup(name='upsidedown',
version=VERSION,
author=AUTHOR,
author_email=EMAIL,
description='"Flip" characters in a string to create an "upside-down" impression.',
long_description=long_description,
url=URL,
download_url='http://github.com/cburgmer/upsidedown/downloads',
py_modules=['upsidedown'],
entry_points={
'console_scripts': [
'upsidedown = upsidedown:main',
],
},
license=LICENSE,
classifiers=[
'Environment :: Console',
'Intended Audience :: Developers',
'Development Status :: 5 - Production/Stable',
'Operating System :: OS Independent',
'Programming Language :: Python',
'License :: OSI Approved :: MIT License',
'Topic :: Text Processing',
])
|
import re
import codecs
from setuptools import setup
import upsidedown
VERSION = str(upsidedown.__version__)
(AUTHOR, EMAIL) = re.match('^(.*?)\s*<(.*)>$', upsidedown.__author__).groups()
URL = upsidedown.__url__
LICENSE = upsidedown.__license__
with codecs.open('README', encoding='utf-8') as readme:
long_description = readme.read()
setup(name='upsidedown',
version=VERSION,
author=AUTHOR,
author_email=EMAIL,
description='"Flip" characters in a string to create an "upside-down" impression.',
long_description=long_description,
url=URL,
download_url='http://github.com/cburgmer/upsidedown/downloads',
py_modules=['upsidedown'],
entry_points={
'console_scripts': [
'upsidedown = upsidedown:main',
],
},
license=LICENSE,
classifiers=[
'Environment :: Console',
'Intended Audience :: Developers',
'Development Status :: 5 - Production/Stable',
'Operating System :: OS Independent',
'Programming Language :: Python :: 2.6',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3',
'License :: OSI Approved :: MIT License',
'Topic :: Text Processing',
])
|
Add Trove classifiers indicating supported Python versions.
|
Add Trove classifiers indicating supported Python versions.
|
Python
|
mit
|
cburgmer/upsidedown,jaraco/upsidedown
|
---
+++
@@ -33,7 +33,9 @@
'Intended Audience :: Developers',
'Development Status :: 5 - Production/Stable',
'Operating System :: OS Independent',
- 'Programming Language :: Python',
+ 'Programming Language :: Python :: 2.6',
+ 'Programming Language :: Python :: 2.7',
+ 'Programming Language :: Python :: 3',
'License :: OSI Approved :: MIT License',
'Topic :: Text Processing',
])
|
fcef30a09d24ade495085fc281c334da0098f727
|
tests/test_commands.py
|
tests/test_commands.py
|
from pim.commands.init import _defaults, _make_package
from pim.commands.install import install
from pim.commands.uninstall import uninstall
from click.testing import CliRunner
def _create_test_package():
d = _defaults()
d['description'] = 'test package'
_make_package(d, True)
return d
def test_install_and_uninstall():
pkg_to_install = 'nose'
runner = CliRunner()
with runner.isolated_filesystem():
d = _create_test_package()
result = runner.invoke(install, ['-g', pkg_to_install])
# _install([pkg_to_install], globally=True)
with open('requirements.txt', 'r') as f:
lines = f.readlines()
assert pkg_to_install in lines
result = runner.invoke(uninstall, ['-g', pkg_to_install])
with open('requirements.txt', 'r') as f:
lines = f.readlines()
assert pkg_to_install not in lines
|
from pim.commands.init import _defaults, _make_package
from pim.commands.install import install
from pim.commands.uninstall import uninstall
from click.testing import CliRunner
def _create_test_package():
"""Helper function to create a test package"""
d = _defaults()
d['description'] = 'test package'
_make_package(d, True)
return d
def test_install_and_uninstall():
"""Round trip the install/uninstall functionality"""
pkg_to_install = 'nose'
runner = CliRunner()
with runner.isolated_filesystem():
d = _create_test_package()
result = runner.invoke(install, ['-g', pkg_to_install])
# _install([pkg_to_install], globally=True)
with open('requirements.txt', 'r') as f:
lines = f.readlines()
assert pkg_to_install in lines
result = runner.invoke(uninstall, ['-g', pkg_to_install])
with open('requirements.txt', 'r') as f:
lines = f.readlines()
assert pkg_to_install not in lines
|
Add docstring to test functions
|
DOC: Add docstring to test functions
|
Python
|
mit
|
freeman-lab/pim
|
---
+++
@@ -5,12 +5,14 @@
from click.testing import CliRunner
def _create_test_package():
+ """Helper function to create a test package"""
d = _defaults()
d['description'] = 'test package'
_make_package(d, True)
return d
def test_install_and_uninstall():
+ """Round trip the install/uninstall functionality"""
pkg_to_install = 'nose'
runner = CliRunner()
with runner.isolated_filesystem():
|
b0dba403abb5d0a81d823eddc90c19160dc5b354
|
setup.py
|
setup.py
|
from codecs import open as codecs_open
from setuptools import setup, find_packages
with codecs_open('README.md', encoding='utf-8') as f:
LONG_DESCRIPTION = f.read()
setup(name='gypsy',
version='0.0.1',
description=u"Forestry Growth and Yield Projection System",
long_description=LONG_DESCRIPTION,
classifiers=[],
keywords='',
author=u"Julianno Sambatti, Jotham Apaloo",
author_email='julianno.sambatti@tesera.com',
url='',
license='',
packages=find_packages(exclude=['ez_setup', 'examples', 'tests']),
zip_safe=False,
include_package_data=True,
package_data={
'gypsy': ['data/*'],
},
install_requires=[
'click>=6.6',
'pandas>=0.18.1',
'matplotlib==1.5.2',
],
extras_require={
'test': ['pytest>=2.9.1', 'pytest-cov'],
'lint': ['pylint>=1.5.4'],
'docs': ['sphinx>=1.4.1'],
'dev': ['git-pylint-commit-hook>=2.1.1'],
},
entry_points="""
[console_scripts]
gypsy=gypsy.scripts.cli:cli
"""
)
|
from codecs import open as codecs_open
from setuptools import setup, find_packages
with codecs_open('README.md', encoding='utf-8') as f:
LONG_DESCRIPTION = f.read()
setup(name='gypsy',
version='0.0.1',
description=u"Forestry Growth and Yield Projection System",
long_description=LONG_DESCRIPTION,
classifiers=[],
keywords='',
author=u"Julianno Sambatti, Jotham Apaloo",
author_email='julianno.sambatti@tesera.com',
url='',
license='',
packages=find_packages(exclude=['ez_setup', 'examples', 'tests']),
zip_safe=False,
include_package_data=True,
package_data={
'gypsy': ['data/*'],
},
install_requires=[
'click>=6.6',
'pandas>=0.18.1',
'matplotlib>=1.5.2',
'colorlog>=2.7.0',
],
extras_require={
'test': ['pytest==2.9.1', 'pytest-cov==2.4.0'],
'lint': ['pylint==1.5.4'],
'docs': ['sphinx==1.4.1'],
'dev': ['git-pylint-commit-hook==2.1.1'],
},
entry_points="""
[console_scripts]
gypsy=gypsy.scripts.cli:cli
"""
)
|
Add colorlog to reqs and fix dev req versions
|
Add colorlog to reqs and fix dev req versions
|
Python
|
mit
|
tesera/pygypsy,tesera/pygypsy
|
---
+++
@@ -25,13 +25,14 @@
install_requires=[
'click>=6.6',
'pandas>=0.18.1',
- 'matplotlib==1.5.2',
+ 'matplotlib>=1.5.2',
+ 'colorlog>=2.7.0',
],
extras_require={
- 'test': ['pytest>=2.9.1', 'pytest-cov'],
- 'lint': ['pylint>=1.5.4'],
- 'docs': ['sphinx>=1.4.1'],
- 'dev': ['git-pylint-commit-hook>=2.1.1'],
+ 'test': ['pytest==2.9.1', 'pytest-cov==2.4.0'],
+ 'lint': ['pylint==1.5.4'],
+ 'docs': ['sphinx==1.4.1'],
+ 'dev': ['git-pylint-commit-hook==2.1.1'],
},
entry_points="""
[console_scripts]
|
6c488d267cd5919eb545855a522d5cd7ec7d0fec
|
molly/utils/management/commands/generate_cache_manifest.py
|
molly/utils/management/commands/generate_cache_manifest.py
|
import os
import os.path
from django.core.management.base import NoArgsCommand
from django.conf import settings
class Command(NoArgsCommand):
can_import_settings = True
def handle_noargs(self, **options):
cache_manifest_path = os.path.join(settings.STATIC_ROOT,
'cache.manifest')
static_prefix_length = len(settings.STATIC_ROOT.split(os.sep))
with open(cache_manifest_path, 'w') as cache_manifest:
print >>cache_manifest, "CACHE MANIFEST"
print >>cache_manifest, "CACHE:"
for root, dirs, files in os.walk(settings.STATIC_ROOT):
if root == settings.STATIC_ROOT:
# Don't cache admin media or markers
dirs.remove('admin')
dirs.remove('markers')
url = '/'.join(root.split(os.sep)[static_prefix_length:])
for file in files:
# Don't cache uncompressed JS/CSS
_, ext = os.path.splitext(file)
if ext in ('.js','.css') and 'c' != url.split('/')[0]:
continue
print >>cache_manifest, "%s%s/%s" % (settings.STATIC_URL, url, file)
|
import os
import os.path
from django.core.management.base import NoArgsCommand
from django.conf import settings
class Command(NoArgsCommand):
can_import_settings = True
def handle_noargs(self, **options):
cache_manifest_path = os.path.join(settings.STATIC_ROOT,
'cache.manifest')
static_prefix_length = len(settings.STATIC_ROOT.split(os.sep))
with open(cache_manifest_path, 'w') as cache_manifest:
print >>cache_manifest, "CACHE MANIFEST"
print >>cache_manifest, "CACHE:"
for root, dirs, files in os.walk(settings.STATIC_ROOT):
url = '/'.join(root.split(os.sep)[static_prefix_length:])
for file in files:
print >>cache_manifest, "%s%s/%s" % (settings.STATIC_URL, url, file)
|
Revert "Don't cache markers, admin files or uncompressed JS/CSS"
|
Revert "Don't cache markers, admin files or uncompressed JS/CSS"
This reverts commit 357d4053e80e433b899ecacc15fba2a04cd6032b.
|
Python
|
apache-2.0
|
mollyproject/mollyproject,mollyproject/mollyproject,mollyproject/mollyproject
|
---
+++
@@ -16,14 +16,6 @@
print >>cache_manifest, "CACHE MANIFEST"
print >>cache_manifest, "CACHE:"
for root, dirs, files in os.walk(settings.STATIC_ROOT):
- if root == settings.STATIC_ROOT:
- # Don't cache admin media or markers
- dirs.remove('admin')
- dirs.remove('markers')
url = '/'.join(root.split(os.sep)[static_prefix_length:])
for file in files:
- # Don't cache uncompressed JS/CSS
- _, ext = os.path.splitext(file)
- if ext in ('.js','.css') and 'c' != url.split('/')[0]:
- continue
print >>cache_manifest, "%s%s/%s" % (settings.STATIC_URL, url, file)
|
aa3a79f3e733e65e354e0c1c63bf3efe0f128fc1
|
contentcuration/contentcuration/views/json_dump.py
|
contentcuration/contentcuration/views/json_dump.py
|
import json
from rest_framework.renderers import JSONRenderer
"""
Format data such that it can be safely loaded by JSON.parse in javascript
1. create a JSON string
2. second, correctly wrap the JSON in quotes for inclusion in JS
Ref: https://github.com/learningequality/kolibri/issues/6044
"""
def _json_dumps(value):
"""
json.dumps parameters for dumping unicode into JS
"""
return json.dumps(value, separators=(",", ":"), ensure_ascii=False)
def json_for_parse_from_data(data):
return _json_dumps(_json_dumps(data))
def json_for_parse_from_serializer(serializer):
return _json_dumps(JSONRenderer().render(serializer.data))
|
import json
from rest_framework.renderers import JSONRenderer
"""
Format data such that it can be safely loaded by JSON.parse in javascript
1. create a JSON string
2. second, correctly wrap the JSON in quotes for inclusion in JS
Ref: https://github.com/learningequality/kolibri/issues/6044
"""
def _json_dumps(value):
"""
json.dumps parameters for dumping unicode into JS
"""
return json.dumps(value, separators=(",", ":"), ensure_ascii=False)
def json_for_parse_from_data(data):
return _json_dumps(_json_dumps(data))
def json_for_parse_from_serializer(serializer):
return _json_dumps(JSONRenderer().render(serializer.data).decode("utf-8"))
|
Update json bootstrapping code for Py3.
|
Update json bootstrapping code for Py3.
|
Python
|
mit
|
DXCanas/content-curation,DXCanas/content-curation,DXCanas/content-curation,DXCanas/content-curation
|
---
+++
@@ -22,5 +22,4 @@
def json_for_parse_from_serializer(serializer):
- return _json_dumps(JSONRenderer().render(serializer.data))
-
+ return _json_dumps(JSONRenderer().render(serializer.data).decode("utf-8"))
|
00dddace119917ff4e6428450d6ddf75f50bc3ac
|
setup.py
|
setup.py
|
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import os
import sys
try:
from setuptools import setup
except ImportError:
from distutils.core import setup
if sys.argv[-1] == 'publish':
os.system('pandoc -o README.rst README.md')
os.system('python setup.py sdist upload')
sys.exit()
README = open('README.md').read()
HISTORY = open('CHANGES.txt').read().replace('.. :changelog:', '')
setup(
name='sjcl',
version='0.1.5',
description="""
Decrypt and encrypt messages compatible to the "Stanford Javascript Crypto
Library (SJCL)" message format.
This module was created while programming and testing the encrypted
blog platform on cryptedblog.com which is based on sjcl.
""",
long_description=README + '\n\n' + HISTORY,
author='Ulf Bartel',
author_email='elastic.code@gmail.com',
url='https://github.com/berlincode/sjcl',
packages=[
'sjcl',
],
package_dir={'sjcl': 'sjcl'},
include_package_data=True,
install_requires=['pycrypto'], # TODO add version >=
license="new-style BSD",
zip_safe=False,
keywords='SJCL, AES, encryption, pycrypto, Javascript',
entry_points={
},
classifiers=[
'Intended Audience :: Developers',
'License :: OSI Approved :: BSD License',
'Natural Language :: English',
],
test_suite='tests',
)
|
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import os
import sys
try:
from setuptools import setup
except ImportError:
from distutils.core import setup
if sys.argv[-1] == 'publish':
os.system('pandoc -o README.rst README.md')
os.system('python setup.py sdist upload')
sys.exit()
README = open('README.md').read()
HISTORY = open('CHANGES.txt').read().replace('.. :changelog:', '')
setup(
name='sjcl',
version='0.1.5',
description="""
Decrypt and encrypt messages compatible to the "Stanford Javascript Crypto
Library (SJCL)" message format.
This module was created while programming and testing the encrypted
blog platform on cryptedblog.com which is based on sjcl.
""",
long_description=README + '\n\n' + HISTORY,
author='Ulf Bartel',
author_email='elastic.code@gmail.com',
url='https://github.com/berlincode/sjcl',
packages=[
'sjcl',
],
package_dir={'sjcl': 'sjcl'},
include_package_data=True,
install_requires=['pycryptodome'], # TODO add version >=
license="new-style BSD",
zip_safe=False,
keywords='SJCL, AES, encryption, pycrypto, Javascript',
entry_points={
},
classifiers=[
'Intended Audience :: Developers',
'License :: OSI Approved :: BSD License',
'Natural Language :: English',
],
test_suite='tests',
)
|
Install requires pycryptodome, not pycrypto
|
Install requires pycryptodome, not pycrypto
PyCrypto version on PyPi is 2.6, but sjcl requires 2.7.
PyCrypto is not maintained. PyCryptodome is a drop in replacement.
A fresh install of sjcl with PyCrypto in Python 3.6.1 on macOS results
in error on:
File "/Users/jthetzel/.local/src/py_test/venv/lib/python3.6/
site-packages/sjcl/sjcl.py", line 76, in check_mode_ccm
"You need a version >= 2.7a1 (or a special branch)."
Exception: Pycrypto does not seem to support MODE_CCM.
You need a version >= 2.7a1 (or a special branch).
A fresh install of sjcl with PyCryptodome has no error.
|
Python
|
bsd-3-clause
|
berlincode/sjcl
|
---
+++
@@ -37,7 +37,7 @@
],
package_dir={'sjcl': 'sjcl'},
include_package_data=True,
- install_requires=['pycrypto'], # TODO add version >=
+ install_requires=['pycryptodome'], # TODO add version >=
license="new-style BSD",
zip_safe=False,
keywords='SJCL, AES, encryption, pycrypto, Javascript',
|
e647731ecd2f7c3d68744137e298143529962693
|
setup.py
|
setup.py
|
#!/usr/bin/env python
from distutils.core import setup
setup(name='Splango',
version='0.1',
description='Split (A/B) testing library for Django',
author='Shimon Rura',
author_email='shimon@rura.org',
url='http://github.com/shimon/Splango',
packages=['splango','splango.templatetags'],
)
|
#!/usr/bin/env python
from distutils.core import setup
setup(name='Splango',
version='0.1',
description='Split (A/B) testing library for Django',
author='Shimon Rura',
author_email='shimon@rura.org',
url='http://github.com/shimon/Splango',
packages=['splango','splango.templatetags'],
package_data={'splango': ['templates/*.html', 'templates/*/*.html']}
)
|
Make sure templates get included
|
Make sure templates get included
|
Python
|
mit
|
shimon/Splango
|
---
+++
@@ -9,4 +9,5 @@
author_email='shimon@rura.org',
url='http://github.com/shimon/Splango',
packages=['splango','splango.templatetags'],
- )
+ package_data={'splango': ['templates/*.html', 'templates/*/*.html']}
+)
|
f708d695f2f0a33c3e856ebd4aa8299c46e91694
|
setup.py
|
setup.py
|
#!/usr/bin/env python3
from setuptools import setup
setup(
name="ldap_dingens",
version="0.1",
description="LDAP web frontend for the FSFW Dresden group",
url="https://github.com/fsfw-dresden/ldap-dingens",
author="Dominik Pataky",
author_email="mail@netdecorator.org",
license="AGPL",
classifiers=[
"Development Status :: 3 - Alpha",
"Programming Language :: Python :: 3",
],
keywords="ldap web-frontend flask",
install_requires=[
"Flask>=0.10.1",
"Flask-Login>=0.2.11",
"Flask-WTF>=0.10",
"itsdangerous>=0.24",
"Jinja2>=2.7.3",
"MarkupSafe>=0.23",
"SQLAlchemy>=0.9.9",
"Werkzeug>=0.9.6",
"WTForms>=2.0",
"blinker>=1.3"
],
packages=["ldap_dingens"],
package_data={
"ldap_dingens": [
"static/css/*.css",
"templates/*.html",
"templates/invite/*.html",
]
},
)
|
#!/usr/bin/env python3
from setuptools import setup
setup(
name="ldap_dingens",
version="0.1",
description="LDAP web frontend for the FSFW Dresden group",
url="https://github.com/fsfw-dresden/ldap-dingens",
author="Dominik Pataky",
author_email="mail@netdecorator.org",
license="AGPL",
classifiers=[
"Development Status :: 3 - Alpha",
"Programming Language :: Python :: 3",
],
keywords="ldap web-frontend flask",
install_requires=[
"Flask>=0.10.1",
"Flask-Login>=0.2.11",
"Flask-WTF>=0.10",
"itsdangerous>=0.24",
"Jinja2>=2.7.3",
"MarkupSafe>=0.23",
"SQLAlchemy>=0.9.9",
"Werkzeug>=0.9.6",
"WTForms>=2.0",
"blinker>=1.3",
"enum34>=1.0",
"ldap3>=0.9.7.1"
],
packages=["ldap_dingens"],
package_data={
"ldap_dingens": [
"static/css/*.css",
"templates/*.html",
"templates/invite/*.html",
]
},
)
|
Add some more or less obvious dependencies
|
Add some more or less obvious dependencies
|
Python
|
agpl-3.0
|
fsfw-dresden/ldap-dingens,fsfw-dresden/ldap-dingens
|
---
+++
@@ -24,7 +24,9 @@
"SQLAlchemy>=0.9.9",
"Werkzeug>=0.9.6",
"WTForms>=2.0",
- "blinker>=1.3"
+ "blinker>=1.3",
+ "enum34>=1.0",
+ "ldap3>=0.9.7.1"
],
packages=["ldap_dingens"],
package_data={
|
9e09a45edee517f62c252fce9716d82e63ea7a0e
|
pact/group.py
|
pact/group.py
|
import itertools
from .base import PactBase
class PactGroup(PactBase):
def __init__(self, pacts=None, lazy=True):
if pacts is None:
pacts = []
self._pacts = pacts[:]
self._finished_pacts = []
self._is_lazy = lazy
super(PactGroup, self).__init__()
def __iadd__(self, other):
self.add(other)
return self
def __iter__(self):
return itertools.chain(self._pacts, self._finished_pacts)
def add(self, pact, absorb=False):
if absorb and isinstance(pact, PactGroup):
if isinstance(pact, PactGroup):
raise NotImplementedError('Absorbing groups is not supported') # pragma: no cover
self._pacts.append(pact)
if absorb:
# pylint: disable=protected-access
while pact._then:
# then might throw, so we attempt it first
self.then(pact._then[0])
pact._then.pop(0)
def _is_finished(self):
has_finished = True
indexes_to_remove = []
for index, pact in enumerate(self._pacts):
if pact.poll():
indexes_to_remove.append(index)
else:
has_finished = False
if self._is_lazy:
break
for index in reversed(indexes_to_remove):
self._finished_pacts.append(self._pacts.pop(index))
return has_finished
def __repr__(self):
return repr(list(self._pacts))
|
import itertools
from .base import PactBase
class PactGroup(PactBase):
def __init__(self, pacts=None, lazy=True):
if pacts is None:
pacts = []
self._pacts = list(pacts)
self._finished_pacts = []
self._is_lazy = lazy
super(PactGroup, self).__init__()
def __iadd__(self, other):
self.add(other)
return self
def __iter__(self):
return itertools.chain(self._pacts, self._finished_pacts)
def add(self, pact, absorb=False):
if absorb and isinstance(pact, PactGroup):
if isinstance(pact, PactGroup):
raise NotImplementedError('Absorbing groups is not supported') # pragma: no cover
self._pacts.append(pact)
if absorb:
# pylint: disable=protected-access
while pact._then:
# then might throw, so we attempt it first
self.then(pact._then[0])
pact._then.pop(0)
def _is_finished(self):
has_finished = True
indexes_to_remove = []
for index, pact in enumerate(self._pacts):
if pact.poll():
indexes_to_remove.append(index)
else:
has_finished = False
if self._is_lazy:
break
for index in reversed(indexes_to_remove):
self._finished_pacts.append(self._pacts.pop(index))
return has_finished
def __repr__(self):
return repr(list(self._pacts))
|
Use list instead of [:] to allow the pact argument to be an iterator
|
Use list instead of [:] to allow the pact argument to be an iterator
|
Python
|
bsd-3-clause
|
vmalloc/pact
|
---
+++
@@ -8,7 +8,7 @@
def __init__(self, pacts=None, lazy=True):
if pacts is None:
pacts = []
- self._pacts = pacts[:]
+ self._pacts = list(pacts)
self._finished_pacts = []
self._is_lazy = lazy
super(PactGroup, self).__init__()
|
f068be029606253d36518478151793e70e231d5f
|
setup.py
|
setup.py
|
# encoding: utf-8
"""
setup
~~~~~
:copyright: 2014 by Daniel Neuhäuser
:license: BSD, see LICENSE.rst for details
"""
from setuptools import setup
with open('README.rst', 'r') as readme:
long_description = readme.read()
setup(
name='oore',
description='Object-Oriented Regular Expressions',
long_description=long_description,
version='0.2.0',
author='Daniel Neuhäuser',
author_email='ich@danielneuhaeuser.de',
url='https://github.com/DasIch/oore',
py_modules=['oore'],
classifiers=[
'Intended Audience :: Developers',
'License :: OSI Approved :: BSD License',
'Programming Language :: Python',
'Programming Language :: Python :: 2',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.3',
'Programming Language :: Python :: 3.4',
'Programming Language :: Python :: Implementation :: CPython',
'Programming Language :: Python :: Implementation :: PyPy',
]
)
|
# encoding: utf-8
"""
setup
~~~~~
:copyright: 2014 by Daniel Neuhäuser
:license: BSD, see LICENSE.rst for details
"""
from setuptools import setup
with open('README.rst', 'r') as readme:
long_description = readme.read()
setup(
name='oore',
description='Object-Oriented Regular Expressions',
long_description=long_description,
version='0.2.1',
author='Daniel Neuhäuser',
author_email='ich@danielneuhaeuser.de',
url='https://github.com/DasIch/oore',
py_modules=['oore'],
classifiers=[
'Intended Audience :: Developers',
'License :: OSI Approved :: BSD License',
'Programming Language :: Python',
'Programming Language :: Python :: 2',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.3',
'Programming Language :: Python :: 3.4',
'Programming Language :: Python :: Implementation :: CPython',
'Programming Language :: Python :: Implementation :: PyPy',
]
)
|
Change version to 0.2.1 for next release
|
Change version to 0.2.1 for next release
|
Python
|
bsd-3-clause
|
DasIch/oore
|
---
+++
@@ -17,7 +17,7 @@
name='oore',
description='Object-Oriented Regular Expressions',
long_description=long_description,
- version='0.2.0',
+ version='0.2.1',
author='Daniel Neuhäuser',
author_email='ich@danielneuhaeuser.de',
url='https://github.com/DasIch/oore',
|
53bcc5478d3bf25be308ca0e2d0920dcb5b57cfe
|
setup.py
|
setup.py
|
from setuptools import setup, find_packages
from eppy import __version__
setup(
name = "EPP",
version = __version__,
author = "Wil Tan",
author_email = "wil@cloudregistry.net",
description = "EPP Client for Python",
license = "MIT/X",
install_requires = [],
packages = ['eppy']
)
|
from setuptools import setup, find_packages
from eppy import __version__
setup(
name = "EPP",
version = __version__,
author = "Wil Tan",
author_email = "wil@cloudregistry.net",
description = "EPP Client for Python",
license = "MIT/X",
install_requires = ["backports.ssl_match_hostname"],
packages = ['eppy']
)
|
Add missing dependency to install_requires list
|
Add missing dependency to install_requires list
|
Python
|
mit
|
cloudregistry/eppy
|
---
+++
@@ -10,6 +10,6 @@
author_email = "wil@cloudregistry.net",
description = "EPP Client for Python",
license = "MIT/X",
- install_requires = [],
+ install_requires = ["backports.ssl_match_hostname"],
packages = ['eppy']
)
|
b740afb96931518d122ebb10bb356457036b35ed
|
setup.py
|
setup.py
|
#!/usr/bin/env python
import sys
from setuptools import find_packages, setup
install_requires = ['robotframework']
if sys.version_info < (2, 7):
install_requires.append('argparse')
setup(
name='pre_commit_robotframework_tidy',
description='A pre-commit hook to run Robot Framework\'s tidy tool.',
url='https://github.com/guykisel/pre-commit-robotframework-tidy',
version='0.0.1dev0',
author='Guy Kisel',
author_email='guy.kisel@gmail.com',
platforms='any',
classifiers=[
'License :: OSI Approved :: MIT License',
'Programming Language :: Python :: 2',
'Programming Language :: Python :: 2.6',
'Programming Language :: Python :: 2.7',
'Operating System :: OS Independent',
],
packages=find_packages('.', exclude=('tests*', 'testing*')),
install_requires=install_requires,
entry_points={
'console_scripts': [
'python-robotframework-tidy = pre_commit_hook.rf_tify:main',
],
},
)
|
#!/usr/bin/env python
import sys
from setuptools import find_packages, setup
install_requires = ['robotframework']
if sys.version_info < (2, 7):
install_requires.append('argparse')
setup(
name='pre_commit_robotframework_tidy',
description='A pre-commit hook to run Robot Framework\'s tidy tool.',
url='https://github.com/guykisel/pre-commit-robotframework-tidy',
version='0.0.1dev0',
author='Guy Kisel',
author_email='guy.kisel@gmail.com',
platforms='any',
classifiers=[
'License :: OSI Approved :: MIT License',
'Programming Language :: Python :: 2',
'Programming Language :: Python :: 2.6',
'Programming Language :: Python :: 2.7',
'Operating System :: OS Independent',
],
packages=find_packages('.', exclude=('tests*', 'testing*')),
install_requires=install_requires,
entry_points={
'console_scripts': [
('python-robotframework-tidy = '
'pre_commit_robotframework_tidy.rf_tify:main'),
],
},
)
|
Fix package name in entry point
|
Fix package name in entry point
|
Python
|
mit
|
guykisel/pre-commit-robotframework-tidy
|
---
+++
@@ -28,7 +28,8 @@
install_requires=install_requires,
entry_points={
'console_scripts': [
- 'python-robotframework-tidy = pre_commit_hook.rf_tify:main',
+ ('python-robotframework-tidy = '
+ 'pre_commit_robotframework_tidy.rf_tify:main'),
],
},
)
|
d71921a3dff82b038311b15fc9b56926521eaefb
|
setup.py
|
setup.py
|
import os
from setuptools import setup, find_packages
package_files_paths = []
def package_files(directory):
global package_files_paths
for (path, directories, filenames) in os.walk(directory):
for filename in filenames:
if filename == '.gitignore':
continue
print(filename)
package_files_paths.append(os.path.join('..', path, filename))
package_files('OpenCLGA/ui')
package_files('OpenCLGA/kernel')
setup(name='OpenCLGA',
version='0.1',
description='Run a general purpose genetic algorithm on top of pyopencl.',
url='https://github.com/PyOCL/OpenCLGA.git',
author='John Hu(胡訓誠), Kilik Kuo(郭彥廷)',
author_email='im@john.hu, kilik.kuo@gmail.com',
license='MIT',
include_package_data=True,
packages=find_packages(),
package_data={
'OpenCLGA': package_files_paths,
},
install_requires=[
'pycparser',
'cffi',
'numpy',
'wheel',
#'pyopencl'
],
zip_safe=False)
|
import os
from setuptools import setup, find_packages
package_files_paths = []
def package_files(directory):
global package_files_paths
for (path, directories, filenames) in os.walk(directory):
for filename in filenames:
if filename == '.gitignore':
continue
print(filename)
package_files_paths.append(os.path.join('..', path, filename))
package_files('OpenCLGA/ui')
package_files('OpenCLGA/kernel')
setup(name='OpenCLGA',
version='0.1',
description='Run a general purpose genetic algorithm on top of pyopencl.',
url='https://github.com/PyOCL/OpenCLGA.git',
author='John Hu(胡訓誠), Kilik Kuo(郭彥廷)',
author_email='im@john.hu, kilik.kuo@gmail.com',
license='MIT',
include_package_data=True,
packages=find_packages(),
package_data={
'OpenCLGA': package_files_paths,
},
install_requires=[
'numpy',
'pyopencl'
],
zip_safe=False)
|
Modify required package list to minimal pakcages.
|
Modify required package list to minimal pakcages.
|
Python
|
mit
|
PyOCL/OpenCLGA,PyOCL/oclGA,PyOCL/oclGA,PyOCL/TSP,PyOCL/TSP,PyOCL/oclGA,PyOCL/oclGA,PyOCL/OpenCLGA,PyOCL/OpenCLGA
|
---
+++
@@ -27,10 +27,7 @@
'OpenCLGA': package_files_paths,
},
install_requires=[
- 'pycparser',
- 'cffi',
'numpy',
- 'wheel',
- #'pyopencl'
+ 'pyopencl'
],
zip_safe=False)
|
1e1430d89d0cbd5f1de04194ac394b703c86693d
|
virtool/api/genbank.py
|
virtool/api/genbank.py
|
"""
Provides request handlers for managing and viewing analyses.
"""
import aiohttp
import aiohttp.web
import virtool.genbank
import virtool.http.proxy
import virtool.http.routes
from virtool.api.utils import bad_gateway, json_response, not_found
routes = virtool.http.routes.Routes()
@routes.get("/api/genbank/{accession}")
async def get(req):
"""
Retrieve the Genbank data associated with the given accession and transform it into a Virtool-style sequence
document.
"""
accession = req.match_info["accession"]
session = req.app["client"]
settings = req.app["settings"]
try:
data = await virtool.genbank.fetch(settings, session, accession)
if data is None:
return not_found()
return json_response(data)
except aiohttp.client_exceptions.ClientConnectorError:
return bad_gateway("Could not reach Genbank")
|
"""
Provides request handlers for managing and viewing analyses.
"""
import aiohttp
import aiohttp.client_exceptions
import virtool.genbank
import virtool.http.proxy
import virtool.http.routes
from virtool.api.utils import bad_gateway, json_response, not_found
routes = virtool.http.routes.Routes()
@routes.get("/api/genbank/{accession}")
async def get(req):
"""
Retrieve the Genbank data associated with the given accession and transform it into a Virtool-style sequence
document.
"""
accession = req.match_info["accession"]
session = req.app["client"]
settings = req.app["settings"]
try:
data = await virtool.genbank.fetch(settings, session, accession)
if data is None:
return not_found()
return json_response(data)
except aiohttp.client_exceptions.ClientConnectorError:
return bad_gateway("Could not reach NCBI")
|
Return 502 when NCBI unavailable
|
Return 502 when NCBI unavailable
|
Python
|
mit
|
virtool/virtool,virtool/virtool,igboyes/virtool,igboyes/virtool
|
---
+++
@@ -3,7 +3,7 @@
"""
import aiohttp
-import aiohttp.web
+import aiohttp.client_exceptions
import virtool.genbank
import virtool.http.proxy
@@ -27,10 +27,10 @@
try:
data = await virtool.genbank.fetch(settings, session, accession)
- if data is None:
- return not_found()
+ if data is None:
+ return not_found()
- return json_response(data)
+ return json_response(data)
except aiohttp.client_exceptions.ClientConnectorError:
- return bad_gateway("Could not reach Genbank")
+ return bad_gateway("Could not reach NCBI")
|
057aecebb701810c57cac5b8e44a5d5d0a03fa12
|
virtool/error_pages.py
|
virtool/error_pages.py
|
import os
import sys
from aiohttp import web
from mako.template import Template
from virtool.utils import get_static_hash
@web.middleware
async def middleware(req, handler):
is_api_call = req.path.startswith("/api")
try:
response = await handler(req)
if not is_api_call and response.status == 404:
return handle_404(req.app["client_path"])
return response
except web.HTTPException as ex:
if ex.status == 404:
return handle_404(req.app["client_path"])
raise
def handle_404(client_path):
path = os.path.join(sys.path[0], "templates", "error_404.html")
html = Template(filename=path).render(hash=get_static_hash(client_path))
return web.Response(body=html, content_type="text/html", status=404)
|
import os
import sys
from aiohttp import web
from mako.template import Template
from virtool.utils import get_static_hash
from virtool.handlers.utils import json_response
@web.middleware
async def middleware(req, handler):
is_api_call = req.path.startswith("/api")
try:
response = await handler(req)
if not is_api_call and response.status == 404:
return handle_404(req.app["client_path"])
return response
except web.HTTPException as ex:
if is_api_call:
return json_response({
"id": "not_found",
"message": "Not found"
})
if ex.status == 404:
return handle_404(req.app["client_path"])
raise
def handle_404(client_path):
path = os.path.join(sys.path[0], "templates", "error_404.html")
html = Template(filename=path).render(hash=get_static_hash(client_path))
return web.Response(body=html, content_type="text/html", status=404)
|
Return json error response for ALL api errors
|
Return json error response for ALL api errors
HTML responses were being returned for non-existent endpoints. This was resulting on some uncaught exceptions.
|
Python
|
mit
|
virtool/virtool,igboyes/virtool,igboyes/virtool,virtool/virtool
|
---
+++
@@ -4,6 +4,7 @@
from mako.template import Template
from virtool.utils import get_static_hash
+from virtool.handlers.utils import json_response
@web.middleware
@@ -19,6 +20,11 @@
return response
except web.HTTPException as ex:
+ if is_api_call:
+ return json_response({
+ "id": "not_found",
+ "message": "Not found"
+ })
if ex.status == 404:
return handle_404(req.app["client_path"])
|
2721a3d5c8bfcf3a6945e8744e4887688578ce9f
|
tests/test_emailharvesterws.py
|
tests/test_emailharvesterws.py
|
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
test_botanick
----------------------------------
Tests for `botanick` module.
"""
import pytest
from botanick import Botanick
def test_botanick():
emails_found = Botanick.search("squad.pro")
assert emails_found != ""
print(emails_found)
|
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
test_botanick
----------------------------------
Tests for `botanick` module.
"""
from botanick import Botanick
def test_botanick():
emails_found = Botanick.search("squad.pro")
assert emails_found != ""
|
Revert "Revert "Fix a codacy issue""
|
Revert "Revert "Fix a codacy issue""
This reverts commit 6551c882745b13d5b9be183e83f379e34b067921.
|
Python
|
mit
|
avidot/Botanick
|
---
+++
@@ -8,12 +8,9 @@
Tests for `botanick` module.
"""
-import pytest
-
from botanick import Botanick
def test_botanick():
emails_found = Botanick.search("squad.pro")
assert emails_found != ""
- print(emails_found)
|
e7e2c68a147adc9e7d0da69740d4698b7c100796
|
micro.py
|
micro.py
|
#!/usr/bin/env python
from sys import argv
from operator import add, sub, mul, div
functions = { \
'+': (2, add), \
'-': (2, sub), \
'*': (2, mul), \
'/': (2, div) \
}
def get_code():
return argv[1]
def get_tokens(code):
return code.split(' ')
def parse_function(tokens):
return 'test', (23, None), tokens[-1:]
def evaluate(tokens):
name = tokens[0]
tokens = tokens[1:]
if name == 'fn':
name, function, tokens = parse_function(tokens)
functions[name] = function
return 0, tokens
if name not in functions:
return int(name), tokens
function = functions[name]
arguments = []
for _ in xrange(function[0]):
value, tokens = evaluate(tokens)
arguments.append(value)
value = function[1](*arguments)
return value, tokens
if __name__ == '__main__':
code = get_code()
tokens = get_tokens(code)
value, _ = evaluate(tokens)
print(value)
print(functions)
|
#!/usr/bin/env python
from sys import argv
from operator import add, sub, mul, div
from uuid import uuid4
functions = { \
'+': (2, add), \
'-': (2, sub), \
'*': (2, mul), \
'/': (2, div) \
}
def get_code():
return argv[1]
def get_tokens(code):
return code.split(' ')
def generate_name():
return str(uuid4())
def parse_function(tokens):
name = ''
if tokens[0] != '(':
name = tokens[0]
tokens = tokens[1:]
else:
name = generate_name()
# cut the open parenthesis
tokens = tokens[1:]
return name, (23, None), tokens[-1:]
def evaluate(tokens):
name = tokens[0]
tokens = tokens[1:]
if name == 'fn':
name, function, tokens = parse_function(tokens)
functions[name] = function
return 0, tokens
if name not in functions:
return int(name), tokens
function = functions[name]
arguments = []
for _ in xrange(function[0]):
value, tokens = evaluate(tokens)
arguments.append(value)
value = function[1](*arguments)
return value, tokens
if __name__ == '__main__':
code = get_code()
tokens = get_tokens(code)
value, _ = evaluate(tokens)
print(value)
print(functions)
|
Add a parsing of a function name.
|
Add a parsing of a function name.
|
Python
|
mit
|
thewizardplusplus/micro,thewizardplusplus/micro,thewizardplusplus/micro
|
---
+++
@@ -2,6 +2,7 @@
from sys import argv
from operator import add, sub, mul, div
+from uuid import uuid4
functions = { \
'+': (2, add), \
@@ -16,8 +17,20 @@
def get_tokens(code):
return code.split(' ')
+def generate_name():
+ return str(uuid4())
+
def parse_function(tokens):
- return 'test', (23, None), tokens[-1:]
+ name = ''
+ if tokens[0] != '(':
+ name = tokens[0]
+ tokens = tokens[1:]
+ else:
+ name = generate_name()
+ # cut the open parenthesis
+ tokens = tokens[1:]
+
+ return name, (23, None), tokens[-1:]
def evaluate(tokens):
name = tokens[0]
|
e9dae2ad4790aeb903723d095f9efc4614700b65
|
conda_concourse_ci/__main__.py
|
conda_concourse_ci/__main__.py
|
import sys
if __name__ == '__main__':
from conda_concourse_ci.cli import main
sys.exit(main())
|
import sys
if __name__ == '__main__':
from conda_concourse_ci.cli import main
sys.exit(main())
|
Fix indentation to multiple of 4
|
E111: Fix indentation to multiple of 4
|
Python
|
bsd-3-clause
|
conda/conda-concourse-ci,conda/conda-concourse-ci
|
---
+++
@@ -1,4 +1,4 @@
import sys
if __name__ == '__main__':
- from conda_concourse_ci.cli import main
- sys.exit(main())
+ from conda_concourse_ci.cli import main
+ sys.exit(main())
|
f46526a5a42ec324de4925a208c23a46c48658c9
|
pages/views.py
|
pages/views.py
|
from pages.models import Page, Language, Content
from pages.utils import auto_render
from django.contrib.admin.views.decorators import staff_member_required
from django import forms
from django.http import Http404
import settings
@auto_render
def details(request, page_id=None):
template = None
lang = Language.get_from_request(request)
pages = Page.objects.filter(parent__isnull=True).order_by("tree_id")
if len(pages) > 0:
if page_id:
try:
current_page = Page.objects.get(id=int(page_id), status=1)
except Page.DoesNotExist:
raise Http404
else:
# get the first root page
current_page = pages[0]
template = current_page.get_template()
else:
template = settings.DEFAULT_PAGE_TEMPLATE
return template, locals()
|
from pages.models import Page, Language, Content
from pages.utils import auto_render
from django.contrib.admin.views.decorators import staff_member_required
from django import forms
from django.http import Http404
import settings
@auto_render
def details(request, page_id=None):
template = None
lang = Language.get_from_request(request)
pages = Page.objects.filter(parent__isnull=True).order_by("tree_id")
if len(pages) > 0:
if page_id:
try:
current_page = Page.objects.get(id=int(page_id), status=1)
except Page.DoesNotExist:
raise Http404
else:
# get the first root page
current_page = pages[0]
template = current_page.get_template()
else:
current_page = None
template = settings.DEFAULT_PAGE_TEMPLATE
return template, locals()
|
Fix a bug with an empty database
|
Fix a bug with an empty database
|
Python
|
bsd-3-clause
|
pombreda/django-page-cms,google-code-export/django-page-cms,pombreda/django-page-cms,google-code-export/django-page-cms,google-code-export/django-page-cms,Alwnikrotikz/django-page-cms,odyaka341/django-page-cms,Alwnikrotikz/django-page-cms,Alwnikrotikz/django-page-cms,PiRSquared17/django-page-cms,pombreda/django-page-cms,odyaka341/django-page-cms,PiRSquared17/django-page-cms,odyaka341/django-page-cms,PiRSquared17/django-page-cms,pombreda/django-page-cms,google-code-export/django-page-cms,PiRSquared17/django-page-cms,odyaka341/django-page-cms,Alwnikrotikz/django-page-cms
|
---
+++
@@ -21,6 +21,7 @@
current_page = pages[0]
template = current_page.get_template()
else:
+ current_page = None
template = settings.DEFAULT_PAGE_TEMPLATE
return template, locals()
|
7e15c50628f5d0a03b5407923a1dc2db99932ba3
|
partner_company_group/models/res_partner.py
|
partner_company_group/models/res_partner.py
|
# Copyright 2019 Camptocamp SA
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
from odoo import fields, models
class Contact(models.Model):
_inherit = "res.partner"
company_group_id = fields.Many2one(
"res.partner", "Company group", domain=[("is_company", "=", True)]
)
def _commercial_fields(self):
return super()._commercial_fields() + ["company_group_id"]
|
# Copyright 2019 Camptocamp SA
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
from odoo import fields, models
class Contact(models.Model):
_inherit = "res.partner"
company_group_id = fields.Many2one(
"res.partner", "Company group", domain=[("is_company", "=", True)]
)
company_group_member_ids = fields.One2many(
comodel_name="res.partner",
inverse_name="company_group_id",
string="Company group members",
)
def _commercial_fields(self):
return super()._commercial_fields() + ["company_group_id"]
|
Add one2many counterpart for company_group_id TT34815
|
[IMP] partner_company_group: Add one2many counterpart for company_group_id
TT34815
|
Python
|
agpl-3.0
|
OCA/partner-contact,OCA/partner-contact
|
---
+++
@@ -10,6 +10,11 @@
company_group_id = fields.Many2one(
"res.partner", "Company group", domain=[("is_company", "=", True)]
)
+ company_group_member_ids = fields.One2many(
+ comodel_name="res.partner",
+ inverse_name="company_group_id",
+ string="Company group members",
+ )
def _commercial_fields(self):
return super()._commercial_fields() + ["company_group_id"]
|
2124c66d11e46878492970e73700e3e0028a3f1e
|
mopidy/internal/gi.py
|
mopidy/internal/gi.py
|
from __future__ import absolute_import, print_function, unicode_literals
import sys
import textwrap
try:
import gi
gi.require_version('Gst', '1.0')
from gi.repository import GLib, GObject, Gst
except ImportError:
print(textwrap.dedent("""
ERROR: A GObject Python package was not found.
Mopidy requires GStreamer to work. GStreamer is a C library with a
number of dependencies itself, and cannot be installed with the regular
Python tools like pip.
Please see http://docs.mopidy.com/en/latest/installation/ for
instructions on how to install the required dependencies.
"""))
raise
else:
Gst.init([])
gi.require_version('GstPbutils', '1.0')
from gi.repository import GstPbutils
REQUIRED_GST_VERSION = (1, 2, 3)
if Gst.version() < REQUIRED_GST_VERSION:
sys.exit(
'ERROR: Mopidy requires GStreamer >= %s, but found %s.' % (
'.'.join(map(str, REQUIRED_GST_VERSION)), Gst.version_string()))
__all__ = [
'GLib',
'GObject',
'Gst',
'GstPbutils',
'gi',
]
|
from __future__ import absolute_import, print_function, unicode_literals
import sys
import textwrap
try:
import gi
gi.require_version('Gst', '1.0')
from gi.repository import GLib, GObject, Gst
except ImportError:
print(textwrap.dedent("""
ERROR: A GObject Python package was not found.
Mopidy requires GStreamer to work. GStreamer is a C library with a
number of dependencies itself, and cannot be installed with the regular
Python tools like pip.
Please see http://docs.mopidy.com/en/latest/installation/ for
instructions on how to install the required dependencies.
"""))
raise
else:
Gst.init([])
gi.require_version('GstPbutils', '1.0')
from gi.repository import GstPbutils
GLib.set_prgname('mopidy')
GLib.set_application_name('Mopidy')
REQUIRED_GST_VERSION = (1, 2, 3)
if Gst.version() < REQUIRED_GST_VERSION:
sys.exit(
'ERROR: Mopidy requires GStreamer >= %s, but found %s.' % (
'.'.join(map(str, REQUIRED_GST_VERSION)), Gst.version_string()))
__all__ = [
'GLib',
'GObject',
'Gst',
'GstPbutils',
'gi',
]
|
Set GLib prgname and application name
|
Set GLib prgname and application name
This makes Mopidy properly show up in pulseaudio as "Mopidy" instead of
"python*"
|
Python
|
apache-2.0
|
adamcik/mopidy,kingosticks/mopidy,mopidy/mopidy,jodal/mopidy,mopidy/mopidy,kingosticks/mopidy,mopidy/mopidy,adamcik/mopidy,jcass77/mopidy,adamcik/mopidy,jcass77/mopidy,jodal/mopidy,kingosticks/mopidy,jodal/mopidy,jcass77/mopidy
|
---
+++
@@ -25,6 +25,8 @@
gi.require_version('GstPbutils', '1.0')
from gi.repository import GstPbutils
+GLib.set_prgname('mopidy')
+GLib.set_application_name('Mopidy')
REQUIRED_GST_VERSION = (1, 2, 3)
|
e7e043884244cc6bf38027db99a14e184cd1eda2
|
gapipy/resources/flights/flight_status.py
|
gapipy/resources/flights/flight_status.py
|
from ..base import Resource
from .flight_segment import FlightSegment
class FlightStatus(Resource):
_as_is_fields = [
'current_segment',
'departure_service_action',
'flags',
'href',
'id',
'internal',
'segments_order',
'state',
]
@property
def _resource_fields(self):
# Prevent Import Loop
from ..booking import (
DepartureService,
FlightService,
)
return [
('departure_service', DepartureService),
('flight_service', FlightService),
('next_status', 'FlightStatus'),
('previous_status', 'FlightStatus'),
]
@property
def _model_collection_fields(self):
from ..booking import Customer
return [
('customers', Customer),
('segments', FlightSegment),
]
|
from ..base import Resource
from .flight_segment import FlightSegment
class FlightStatus(Resource):
_resource_name = 'flight_statuses'
_as_is_fields = [
'current_segment',
'departure_service_action',
'flags',
'href',
'id',
'internal',
'segments_order',
'state',
]
@property
def _resource_fields(self):
# Prevent Import Loop
from ..booking import (
DepartureService,
FlightService,
)
return [
('departure_service', DepartureService),
('flight_service', FlightService),
('next_status', 'FlightStatus'),
('previous_status', 'FlightStatus'),
]
@property
def _model_collection_fields(self):
from ..booking import Customer
return [
('customers', Customer),
('segments', FlightSegment),
]
|
Add resource name to FlightStatus
|
Add resource name to FlightStatus
|
Python
|
mit
|
gadventures/gapipy
|
---
+++
@@ -4,6 +4,8 @@
class FlightStatus(Resource):
+ _resource_name = 'flight_statuses'
+
_as_is_fields = [
'current_segment',
'departure_service_action',
|
af010c5e924a779a37495905efc32aecdfd358ea
|
whalelinter/commands/common.py
|
whalelinter/commands/common.py
|
#!/usr/bin/env python3
import re
from whalelinter.app import App
from whalelinter.dispatcher import Dispatcher
from whalelinter.commands.command import ShellCommand
from whalelinter.commands.apt import Apt
@Dispatcher.register(token='run', command='cd')
class Cd(ShellCommand):
def __init__(self, **kwargs):
App._collecter.throw(2002, self.line)
return False
@Dispatcher.register(token='run', command='rm')
class Rm(ShellCommand):
def __init__(self, **kwargs):
rf_flags_regex = re.compile("(-.*[rRf].+-?[rRf]|-[rR]f|-f[rR])")
rf_flags = True if [i for i in kwargs.get('args') if rf_flags_regex.search(i)] else False
cache_path_regex = re.compile("/var/lib/apt/lists(\/\*?)?")
cache_path = True if [i for i in kwargs.get('args') if cache_path_regex.search(i)] else False
if rf_flags and cache_path:
if (int(Apt._has_been_used) < int(kwargs.get('lineno'))):
Apt._has_been_used = 0
|
#!/usr/bin/env python3
import re
from whalelinter.app import App
from whalelinter.dispatcher import Dispatcher
from whalelinter.commands.command import ShellCommand
from whalelinter.commands.apt import Apt
@Dispatcher.register(token='run', command='cd')
class Cd(ShellCommand):
def __init__(self, **kwargs):
App._collecter.throw(2002, kwargs.get('lineno'))
@Dispatcher.register(token='run', command='rm')
class Rm(ShellCommand):
def __init__(self, **kwargs):
rf_flags_regex = re.compile("(-.*[rRf].+-?[rRf]|-[rR]f|-f[rR])")
rf_flags = True if [i for i in kwargs.get('args') if rf_flags_regex.search(i)] else False
cache_path_regex = re.compile("/var/lib/apt/lists(\/\*?)?")
cache_path = True if [i for i in kwargs.get('args') if cache_path_regex.search(i)] else False
if rf_flags and cache_path:
if (int(Apt._has_been_used) < int(kwargs.get('lineno'))):
Apt._has_been_used = 0
|
Fix line addressing issue on 'cd' command
|
Fix line addressing issue on 'cd' command
|
Python
|
mit
|
jeromepin/whale-linter
|
---
+++
@@ -10,8 +10,7 @@
@Dispatcher.register(token='run', command='cd')
class Cd(ShellCommand):
def __init__(self, **kwargs):
- App._collecter.throw(2002, self.line)
- return False
+ App._collecter.throw(2002, kwargs.get('lineno'))
@Dispatcher.register(token='run', command='rm')
|
d327b6651234c33549f35d5d5411012d2419634b
|
anillo/middlewares/cors.py
|
anillo/middlewares/cors.py
|
import functools
DEFAULT_HEADERS = frozenset(["origin", "x-requested-with", "content-type", "accept"])):
def wrap_cors(func=None, *, allow_origin='*', allow_headers=DEFAULT_HEADERS):
"""
A middleware that allow CORS calls, by adding the
headers Access-Control-Allow-Origin and Access-Control-Allow-Headers.
This middlware accepts two optional parameters `allow_origin` and
`allow_headers` for customization of the headers values. By default
will be `*` and a set of `[Origin, X-Requested-With, Content-Type, Accept]`
respectively.
"""
_allow_headers = ", ".join(allow_headers)
@functools.wraps(func)
def wrapper(request, *args, **kwargs):
response = func(request, *args, **kwargs)
if not response.headers:
response.headers = {}
response.headers['Access-Control-Allow-Origin'] = allow_origin
response.headers['Access-Control-Allow-Headers'] = _allow_headers
return response
return wrapper
|
import functools
DEFAULT_HEADERS = frozenset(["origin", "x-requested-with", "content-type", "accept"])):
def wrap_cors(func=None, *, allow_origin='*', allow_headers=DEFAULT_HEADERS):
"""
A middleware that allow CORS calls, by adding the
headers Access-Control-Allow-Origin and Access-Control-Allow-Headers.
This middlware accepts two optional parameters `allow_origin` and
`allow_headers` for customization of the headers values. By default
will be `*` and a set of `[Origin, X-Requested-With, Content-Type, Accept]`
respectively.
"""
if func is None:
return functools.partial(wrap_cors,
allow_origin=allow_origin,
allow_headers=allow_headers)
_allow_headers = ", ".join(allow_headers)
@functools.wraps(func)
def wrapper(request, *args, **kwargs):
response = func(request, *args, **kwargs)
if not response.headers:
response.headers = {}
response.headers['Access-Control-Allow-Origin'] = allow_origin
response.headers['Access-Control-Allow-Headers'] = _allow_headers
return response
return wrapper
|
Add the ability to use the middleware decorator without arguments.
|
Add the ability to use the middleware decorator without arguments.
|
Python
|
bsd-2-clause
|
jespino/anillo,hirunatan/anillo,jespino/anillo,hirunatan/anillo
|
---
+++
@@ -11,6 +11,11 @@
will be `*` and a set of `[Origin, X-Requested-With, Content-Type, Accept]`
respectively.
"""
+
+ if func is None:
+ return functools.partial(wrap_cors,
+ allow_origin=allow_origin,
+ allow_headers=allow_headers)
_allow_headers = ", ".join(allow_headers)
|
298d9fc5264fc80089034c4770369d65e898e3e0
|
anillo/middlewares/cors.py
|
anillo/middlewares/cors.py
|
import functools
def wrap_cors(
func=None,
*,
allow_origin='*',
allow_headers=set(["Origin", "X-Requested-With", "Content-Type", "Accept"])):
"""
A middleware that allow CORS calls, by adding the
headers Access-Control-Allow-Origin and Access-Control-Allow-Headers.
This middlware accepts two optional parameters `allow_origin` and
`allow_headers` for customization of the headers values. By default
will be `*` and a set of `[Origin, X-Requested-With, Content-Type, Accept]`
respectively.
"""
@functools.wraps(func)
def wrapper(request, *args, **kwargs):
response = func(request, *args, **kwargs)
if not response.headers:
response.headers = {}
response.headers['Access-Control-Allow-Origin'] = allow_origin
response.headers['Access-Control-Allow-Headers'] = ', '.join(allow_headers)
return response
return wrapper
|
import functools
DEFAULT_HEADERS = frozenset(["origin", "x-requested-with", "content-type", "accept"])):
def wrap_cors(func=None, *, allow_origin='*', allow_headers=DEFAULT_HEADERS):
"""
A middleware that allow CORS calls, by adding the
headers Access-Control-Allow-Origin and Access-Control-Allow-Headers.
This middlware accepts two optional parameters `allow_origin` and
`allow_headers` for customization of the headers values. By default
will be `*` and a set of `[Origin, X-Requested-With, Content-Type, Accept]`
respectively.
"""
@functools.wraps(func)
def wrapper(request, *args, **kwargs):
response = func(request, *args, **kwargs)
if not response.headers:
response.headers = {}
response.headers['Access-Control-Allow-Origin'] = allow_origin
response.headers['Access-Control-Allow-Headers'] = ', '.join(allow_headers)
return response
return wrapper
|
Put default headers as constant and make it immutable.
|
Put default headers as constant and make it immutable.
With additional cosmetic fixes.
|
Python
|
bsd-2-clause
|
jespino/anillo,hirunatan/anillo,jespino/anillo,hirunatan/anillo
|
---
+++
@@ -1,10 +1,8 @@
import functools
-def wrap_cors(
- func=None,
- *,
- allow_origin='*',
- allow_headers=set(["Origin", "X-Requested-With", "Content-Type", "Accept"])):
+DEFAULT_HEADERS = frozenset(["origin", "x-requested-with", "content-type", "accept"])):
+
+def wrap_cors(func=None, *, allow_origin='*', allow_headers=DEFAULT_HEADERS):
"""
A middleware that allow CORS calls, by adding the
headers Access-Control-Allow-Origin and Access-Control-Allow-Headers.
|
1a75b9336b295502f4625f4edd11d86d2a2fe117
|
yahoo.py
|
yahoo.py
|
import time
from yahoo_finance import Share
nyt = Share('NYT')
ibm = Share('IBM')
google = Share('GOOG')
facebook = Share('FB')
linkedin = Share('LNKD')
for minute in range(30):
print "%s minutes" % minute
nyt.refresh()
print "The New York Times' stock price is $%s" % nyt.get_price()
ibm.refresh()
print "IBM's stock price is $%s" % ibm.get_price()
google.refresh()
print "Google's stock price is $%s" % google.get_price()
facebook.refresh()
print "Facebook's stock price is $%s" % facebook.get_price()
linkedin.refresh()
print "Linkedin's stock price is $%s" % linkedin.get_price()
time.sleep(10)
|
import time
from yahoo_finance import Share
nyt = Share('NYT')
ibm = Share('IBM')
google = Share('GOOG')
facebook = Share('FB')
linkedin = Share('LNKD')
for minute in range(30):
print "%s minutes" % minute
nyt.refresh()
print "The New York Times' stock price is $%s" % nyt.get_price()
ibm.refresh()
print "IBM's stock price is $%s" % ibm.get_price()
google.refresh()
print "Google's stock price is $%s" % google.get_price()
facebook.refresh()
print "Facebook's stock price is $%s" % facebook.get_price()
linkedin.refresh()
print "Linkedin's stock price is $%s" % linkedin.get_price()
time.sleep(60)
|
Change time sleep from 10 to 60
|
Change time sleep from 10 to 60
|
Python
|
mit
|
cathyq/yahoo-finance
|
---
+++
@@ -19,5 +19,5 @@
print "Facebook's stock price is $%s" % facebook.get_price()
linkedin.refresh()
print "Linkedin's stock price is $%s" % linkedin.get_price()
- time.sleep(10)
+ time.sleep(60)
|
7e7be00f696bd9fea2e9f18e126d27b6e9e1882d
|
jarn/mkrelease/python.py
|
jarn/mkrelease/python.py
|
import sys
from exit import err_exit
class Python(object):
"""Python interpreter abstraction."""
def __init__(self, python=None, version_info=None):
self.python = sys.executable
self.version_info = sys.version_info
if python is not None:
self.python = python
if version_info is not None:
self.version_info = version_info
def __str__(self):
return self.python
def is_valid_python(self):
return (self.version_info[:2] >= (2, 6) and
self.version_info[:2] < (3, 0))
def check_valid_python(self):
if not self.is_valid_python():
err_exit('Python 2.6 or 2.7 required')
|
import sys
from exit import err_exit
class Python(object):
"""Python interpreter abstraction."""
def __init__(self, python=None, version_info=None):
self.python = python or sys.executable
self.version_info = version_info or sys.version_info
def __str__(self):
return self.python
def is_valid_python(self):
return (self.version_info[:2] >= (2, 6) and
self.version_info[:2] < (3, 0))
def check_valid_python(self):
if not self.is_valid_python():
err_exit('Python 2.6 or 2.7 required')
|
Use terser idiom for initialization.
|
Use terser idiom for initialization.
|
Python
|
bsd-2-clause
|
Jarn/jarn.mkrelease
|
---
+++
@@ -7,12 +7,8 @@
"""Python interpreter abstraction."""
def __init__(self, python=None, version_info=None):
- self.python = sys.executable
- self.version_info = sys.version_info
- if python is not None:
- self.python = python
- if version_info is not None:
- self.version_info = version_info
+ self.python = python or sys.executable
+ self.version_info = version_info or sys.version_info
def __str__(self):
return self.python
@@ -24,3 +20,4 @@
def check_valid_python(self):
if not self.is_valid_python():
err_exit('Python 2.6 or 2.7 required')
+
|
012235fd93e77de19065a0e906554887e27580fd
|
kitsune/sumo/models.py
|
kitsune/sumo/models.py
|
from django.conf import settings
from django.db import models
class ModelBase(models.Model):
"""Base class for SUMO models.
* Adds objects_range class method.
* Adds update method.
"""
class Meta:
abstract = True
@classmethod
def objects_range(cls, before=None, after=None):
"""
Returns a QuerySet of rows updated before, after or between the supplied datetimes.
The `updated_column_name` property must be defined on a model using this,
as that will be used as the column to filter on.
"""
column_name = getattr(cls, "updated_column_name", None)
if not column_name:
raise NotImplementedError
queryset = cls._default_manager
if before:
queryset = queryset.filter(**{f"{column_name}__lt": before})
if after:
queryset = queryset.filter(**{f"{column_name}__gt": after})
return queryset
class LocaleField(models.CharField):
"""CharField with locale settings specific to SUMO defaults."""
def __init__(
self,
max_length=7,
default=settings.LANGUAGE_CODE,
choices=settings.LANGUAGE_CHOICES,
*args,
**kwargs,
):
return super(LocaleField, self).__init__(
max_length=max_length, default=default, choices=choices, *args, **kwargs
)
|
from django.conf import settings
from django.db import models
class ModelBase(models.Model):
"""Base class for SUMO models.
* Adds objects_range class method.
* Adds update method.
"""
class Meta:
abstract = True
@classmethod
def objects_range(cls, before=None, after=None):
"""
Returns a QuerySet of rows updated before, after or between the supplied datetimes.
The `updated_column_name` property must be defined on a model using this,
as that will be used as the column to filter on.
"""
column_name = getattr(cls, "updated_column_name", None)
if not column_name:
raise NotImplementedError
queryset = cls._default_manager
if before:
queryset = queryset.filter(**{f"{column_name}__lt": before})
if after:
queryset = queryset.filter(**{f"{column_name}__gt": after})
return queryset
def update(self, **kw):
"""Shortcicuit to the update method."""
self.__class__.objects.filter(pk=self.pk).update(**kw)
class LocaleField(models.CharField):
"""CharField with locale settings specific to SUMO defaults."""
def __init__(
self,
max_length=7,
default=settings.LANGUAGE_CODE,
choices=settings.LANGUAGE_CHOICES,
*args,
**kwargs,
):
return super(LocaleField, self).__init__(
max_length=max_length, default=default, choices=choices, *args, **kwargs
)
|
Use Django's default update method
|
Use Django's default update method
|
Python
|
bsd-3-clause
|
mozilla/kitsune,mozilla/kitsune,mozilla/kitsune,mozilla/kitsune
|
---
+++
@@ -32,6 +32,10 @@
return queryset
+ def update(self, **kw):
+ """Shortcicuit to the update method."""
+ self.__class__.objects.filter(pk=self.pk).update(**kw)
+
class LocaleField(models.CharField):
"""CharField with locale settings specific to SUMO defaults."""
|
be5ffde03bd08a613353c876fd91b35f8a38d76a
|
oidc_provider/urls.py
|
oidc_provider/urls.py
|
from django.conf.urls import patterns, include, url
from django.views.decorators.csrf import csrf_exempt
from oidc_provider.views import *
urlpatterns = patterns('',
url(r'^authorize/?$', AuthorizeView.as_view(), name='authorize'),
url(r'^token/?$', csrf_exempt(TokenView.as_view()), name='token'),
url(r'^userinfo/?$', csrf_exempt(userinfo), name='userinfo'),
url(r'^logout/?$', LogoutView.as_view(), name='logout'),
url(r'^\.well-known/openid-configuration/?$', ProviderInfoView.as_view(), name='provider_info'),
url(r'^jwks/?$', JwksView.as_view(), name='jwks'),
)
|
from django.conf.urls import patterns, include, url
from django.views.decorators.csrf import csrf_exempt
from oidc_provider.views import *
urlpatterns = [
url(r'^authorize/?$', AuthorizeView.as_view(), name='authorize'),
url(r'^token/?$', csrf_exempt(TokenView.as_view()), name='token'),
url(r'^userinfo/?$', csrf_exempt(userinfo), name='userinfo'),
url(r'^logout/?$', LogoutView.as_view(), name='logout'),
url(r'^\.well-known/openid-configuration/?$', ProviderInfoView.as_view(), name='provider_info'),
url(r'^jwks/?$', JwksView.as_view(), name='jwks'),
]
|
Remove patterns which will be deprecated in 1.10
|
Remove patterns which will be deprecated in 1.10
|
Python
|
mit
|
torreco/django-oidc-provider,ByteInternet/django-oidc-provider,wojtek-fliposports/django-oidc-provider,bunnyinc/django-oidc-provider,torreco/django-oidc-provider,bunnyinc/django-oidc-provider,juanifioren/django-oidc-provider,juanifioren/django-oidc-provider,ByteInternet/django-oidc-provider,wojtek-fliposports/django-oidc-provider
|
---
+++
@@ -3,7 +3,7 @@
from oidc_provider.views import *
-urlpatterns = patterns('',
+urlpatterns = [
url(r'^authorize/?$', AuthorizeView.as_view(), name='authorize'),
url(r'^token/?$', csrf_exempt(TokenView.as_view()), name='token'),
@@ -13,4 +13,4 @@
url(r'^\.well-known/openid-configuration/?$', ProviderInfoView.as_view(), name='provider_info'),
url(r'^jwks/?$', JwksView.as_view(), name='jwks'),
-)
+]
|
96d7a2a3a3250993084c1847436711ceaea988fc
|
app/database.py
|
app/database.py
|
from app import app
from flask.ext.sqlalchemy import SQLAlchemy
from flask.ext.script import Manager, prompt_bool
from datetime import datetime
db = SQLAlchemy(app)
manager = Manager(usage="Manage the database")
@manager.command
def create():
"Create the database"
db.create_all()
@manager.command
def drop():
"Empty the database"
if prompt_bool("Are you sure you want to drop all tables from the database?"):
db.drop_all()
@manager.command
def recreate():
"Recreate the database"
drop()
create()
class Urls(db.Model):
__tablename__ = 'urls'
id = db.Column(db.Integer, primary_key=True)
url = db.Column(db.Text, unique=True)
code = db.Column(db.Text, unique=True)
clicks = db.Column(db.Integer, default=0)
created = db.Column(db.DateTime(timezone=True), default=datetime.utcnow)
def __init__(self, url, code):
self.url = url
self.code = code
def __repr__(self):
return "<Url ('%r', '%r')>" % (self.url, self.code)
|
from app import app
from flask.ext.sqlalchemy import SQLAlchemy
from flask.ext.script import Manager, prompt_bool
from datetime import datetime
db = SQLAlchemy(app)
manager = Manager(usage="Manage the database")
@manager.command
def create():
"Create the database"
db.create_all()
@manager.command
def drop():
"Empty the database"
if prompt_bool("Are you sure you want to drop all tables from the database?"):
db.drop_all()
@manager.command
def recreate():
"Recreate the database"
drop()
create()
class Urls(db.Model):
__tablename__ = 'urls'
id = db.Column(db.Integer, primary_key=True)
url = db.Column(db.VARCHAR(length=255), unique=True)
code = db.Column(db.VARCHAR(length=255), unique=True)
clicks = db.Column(db.Integer, default=0)
created = db.Column(db.DateTime(timezone=True), default=datetime.utcnow)
def __init__(self, url, code):
self.url = url
self.code = code
def __repr__(self):
return "<Url ('%r', '%r')>" % (self.url, self.code)
|
Change unuique keys to MySQL varchar
|
Change unuique keys to MySQL varchar
|
Python
|
mit
|
taeram/idiocy,taeram/idiocy,taeram/idiocy
|
---
+++
@@ -28,8 +28,8 @@
__tablename__ = 'urls'
id = db.Column(db.Integer, primary_key=True)
- url = db.Column(db.Text, unique=True)
- code = db.Column(db.Text, unique=True)
+ url = db.Column(db.VARCHAR(length=255), unique=True)
+ code = db.Column(db.VARCHAR(length=255), unique=True)
clicks = db.Column(db.Integer, default=0)
created = db.Column(db.DateTime(timezone=True), default=datetime.utcnow)
|
9a0cab561ea76a3d54cd410bacbe13a4f5e9f35b
|
server/admin.py
|
server/admin.py
|
from django.contrib import admin
from server.models import *
class MachineGroupAdmin(admin.ModelAdmin):
readonly_fields = ('key',)
class MachineAdmin(admin.ModelAdmin):
list_display = ('hostname', 'serial')
admin.site.register(UserProfile)
admin.site.register(BusinessUnit)
admin.site.register(MachineGroup, MachineGroupAdmin)
admin.site.register(Machine, MachineAdmin)
admin.site.register(Fact)
admin.site.register(PluginScriptSubmission)
admin.site.register(PluginScriptRow)
admin.site.register(HistoricalFact)
admin.site.register(Condition)
admin.site.register(PendingUpdate)
admin.site.register(InstalledUpdate)
admin.site.register(PendingAppleUpdate)
admin.site.register(ApiKey)
admin.site.register(Plugin)
admin.site.register(Report)
# admin.site.register(OSQueryResult)
# admin.site.register(OSQueryColumn)
admin.site.register(SalSetting)
admin.site.register(UpdateHistory)
admin.site.register(UpdateHistoryItem)
admin.site.register(MachineDetailPlugin)
|
from django.contrib import admin
from server.models import *
class ApiKeyAdmin(admin.ModelAdmin):
list_display = ('name', 'public_key', 'private_key')
class MachineAdmin(admin.ModelAdmin):
list_display = ('hostname', 'serial')
class MachineGroupAdmin(admin.ModelAdmin):
readonly_fields = ('key',)
admin.site.register(ApiKey, ApiKeyAdmin)
admin.site.register(BusinessUnit)
admin.site.register(Condition)
admin.site.register(Fact)
admin.site.register(HistoricalFact)
admin.site.register(InstalledUpdate)
admin.site.register(Machine, MachineAdmin)
admin.site.register(MachineDetailPlugin)
admin.site.register(MachineGroup, MachineGroupAdmin)
# admin.site.register(OSQueryColumn)
# admin.site.register(OSQueryResult)
admin.site.register(PendingAppleUpdate)
admin.site.register(PendingUpdate)
admin.site.register(Plugin)
admin.site.register(PluginScriptRow)
admin.site.register(PluginScriptSubmission)
admin.site.register(Report)
admin.site.register(SalSetting)
admin.site.register(UpdateHistory)
admin.site.register(UpdateHistoryItem)
admin.site.register(UserProfile)
|
Sort registrations. Separate classes of imports. Add API key display.
|
Sort registrations. Separate classes of imports. Add API key display.
|
Python
|
apache-2.0
|
salopensource/sal,sheagcraig/sal,sheagcraig/sal,salopensource/sal,sheagcraig/sal,salopensource/sal,salopensource/sal,sheagcraig/sal
|
---
+++
@@ -1,33 +1,38 @@
from django.contrib import admin
+
from server.models import *
+
+
+class ApiKeyAdmin(admin.ModelAdmin):
+ list_display = ('name', 'public_key', 'private_key')
+
+
+class MachineAdmin(admin.ModelAdmin):
+ list_display = ('hostname', 'serial')
class MachineGroupAdmin(admin.ModelAdmin):
readonly_fields = ('key',)
-class MachineAdmin(admin.ModelAdmin):
- list_display = ('hostname', 'serial')
-
-
-admin.site.register(UserProfile)
+admin.site.register(ApiKey, ApiKeyAdmin)
admin.site.register(BusinessUnit)
+admin.site.register(Condition)
+admin.site.register(Fact)
+admin.site.register(HistoricalFact)
+admin.site.register(InstalledUpdate)
+admin.site.register(Machine, MachineAdmin)
+admin.site.register(MachineDetailPlugin)
admin.site.register(MachineGroup, MachineGroupAdmin)
-admin.site.register(Machine, MachineAdmin)
-admin.site.register(Fact)
+# admin.site.register(OSQueryColumn)
+# admin.site.register(OSQueryResult)
+admin.site.register(PendingAppleUpdate)
+admin.site.register(PendingUpdate)
+admin.site.register(Plugin)
+admin.site.register(PluginScriptRow)
admin.site.register(PluginScriptSubmission)
-admin.site.register(PluginScriptRow)
-admin.site.register(HistoricalFact)
-admin.site.register(Condition)
-admin.site.register(PendingUpdate)
-admin.site.register(InstalledUpdate)
-admin.site.register(PendingAppleUpdate)
-admin.site.register(ApiKey)
-admin.site.register(Plugin)
admin.site.register(Report)
-# admin.site.register(OSQueryResult)
-# admin.site.register(OSQueryColumn)
admin.site.register(SalSetting)
admin.site.register(UpdateHistory)
admin.site.register(UpdateHistoryItem)
-admin.site.register(MachineDetailPlugin)
+admin.site.register(UserProfile)
|
59c8c57884021f472bb98d00fc46fe7214c689d3
|
test/unbuffered_test.py
|
test/unbuffered_test.py
|
# Copyright (c) 2012 - 2014 Lars Hupfeldt Nielsen, Hupfeldt IT
# All rights reserved. This work is under a BSD license, see LICENSE.TXT.
import sys
from .framework import api_select
from jenkinsflow.flow import serial
from jenkinsflow.unbuffered import UnBuffered
def test_unbuffered():
sys.stdout = UnBuffered(sys.stdout)
with api_select.api(__file__) as api:
api.flow_job()
api.job('unbuf', exec_time=0.01, max_fails=0, expect_invocations=1, expect_order=1)
with serial(api, timeout=70, job_name_prefix=api.job_name_prefix) as ctrl:
ctrl.invoke('unbuf')
assert sys.stdout.writable() == True
|
# Copyright (c) 2012 - 2014 Lars Hupfeldt Nielsen, Hupfeldt IT
# All rights reserved. This work is under a BSD license, see LICENSE.TXT.
import sys
from .framework import api_select
from jenkinsflow.flow import serial
from jenkinsflow.unbuffered import UnBuffered
def test_unbuffered():
sys.stdout = UnBuffered(sys.stdout)
with api_select.api(__file__) as api:
api.flow_job()
api.job('unbuf', exec_time=0.01, max_fails=0, expect_invocations=1, expect_order=1)
with serial(api, timeout=70, job_name_prefix=api.job_name_prefix) as ctrl:
ctrl.invoke('unbuf')
# TODO test output
assert hasattr(sys.stdout, 'write') == True
|
Fix 'unbuffered' test that somehow got broken
|
Fix 'unbuffered' test that somehow got broken
|
Python
|
bsd-3-clause
|
lechat/jenkinsflow,lhupfeldt/jenkinsflow,lhupfeldt/jenkinsflow,lhupfeldt/jenkinsflow,lechat/jenkinsflow,lechat/jenkinsflow,lhupfeldt/jenkinsflow,lechat/jenkinsflow
|
---
+++
@@ -17,4 +17,5 @@
with serial(api, timeout=70, job_name_prefix=api.job_name_prefix) as ctrl:
ctrl.invoke('unbuf')
- assert sys.stdout.writable() == True
+ # TODO test output
+ assert hasattr(sys.stdout, 'write') == True
|
569cc559e32f31d3256ff2df3a491a55384e5c27
|
lib/pylprof/imports.py
|
lib/pylprof/imports.py
|
from line_profiler import LineProfiler
lp = LineProfiler()
profile = lp.runcall
|
from line_profiler import LineProfiler
lp = LineProfiler()
lp.enable_profile_all()
profile = lp.runcall
|
Use new version of line profiler
|
[pylprof] Use new version of line profiler
|
Python
|
mit
|
iddl/pprofile,iddl/pprofile
|
---
+++
@@ -1,3 +1,4 @@
from line_profiler import LineProfiler
lp = LineProfiler()
+lp.enable_profile_all()
profile = lp.runcall
|
86f3c9b12e46c34d38fbebdefb70380a45526fe3
|
tmaps/config/default.py
|
tmaps/config/default.py
|
import datetime
# Override this key with a secret one
SECRET_KEY = 'default_secret_key'
HASHIDS_SALT = 'default_secret_salt'
# This should be set to true in the production config when using NGINX
USE_X_SENDFILE = False
DEBUG = True
JWT_EXPIRATION_DELTA = datetime.timedelta(days=2)
JWT_NOT_BEFORE_DELTA = datetime.timedelta(seconds=0)
POSTGRES_DB_USER = None
POSTGRES_DB_PASSWORD = None
POSTGRES_DB_NAME = None
POSTGRES_DB_HOST = None
POSTGRES_DB_PORT = None
GC3PIE_SESSION_DIR = None
REDIS_URL = 'redis://localhost:6379'
SQLALCHEMY_TRACK_MODIFICATIONS = True
|
import datetime
# Override this key with a secret one
SECRET_KEY = 'default_secret_key'
HASHIDS_SALT = 'default_secret_salt'
# This should be set to true in the production config when using NGINX
USE_X_SENDFILE = False
DEBUG = True
JWT_EXPIRATION_DELTA = datetime.timedelta(days=2)
JWT_NOT_BEFORE_DELTA = datetime.timedelta(seconds=0)
POSTGRES_DB_USER = None
POSTGRES_DB_PASSWORD = None
POSTGRES_DB_NAME = None
POSTGRES_DB_HOST = None
POSTGRES_DB_PORT = None
REDIS_URL = 'redis://localhost:6379'
SQLALCHEMY_TRACK_MODIFICATIONS = True
|
Remove gc3pie session dir from config
|
Remove gc3pie session dir from config
|
Python
|
agpl-3.0
|
TissueMAPS/TmServer
|
---
+++
@@ -17,8 +17,6 @@
POSTGRES_DB_HOST = None
POSTGRES_DB_PORT = None
-GC3PIE_SESSION_DIR = None
-
REDIS_URL = 'redis://localhost:6379'
SQLALCHEMY_TRACK_MODIFICATIONS = True
|
236eaa669027199c2bc53e225b8ffcc6427e78cd
|
CodeFights/simpleComposition.py
|
CodeFights/simpleComposition.py
|
#!/usr/local/bin/python
# Code Fights Simple Composition Problem
from functools import reduce
import math
def compose(f, g):
return lambda x: f(g(x))
def simpleComposition(f, g, x):
return compose(eval(f), eval(g))(x)
# Generic composition of n functions:
def compose_n(*functions):
return reduce(lambda f, g: lambda x: f(g(x)), functions, lambda x: x)
def main():
tests = [
["math.log10", "abs", -100, 2],
["math.sin", "math.cos", 34.4, math.sin(math.cos(34.4))],
["int", "lambda x: 1.0 * x / 22", 1000, 45],
["math.exp", "lambda x: x ** 0", -1000, math.e],
["lambda z: z", "lambda y: y", 239, 239]
]
for t in tests:
res = simpleComposition(t[0], t[1], t[2])
ans = t[3]
if ans == res:
print("PASSED: simpleComposition({}, {}, {}) returned {}"
.format(t[0], t[1], t[2], res))
else:
print(("FAILED: simpleComposition({}, {}, {}) returned {},"
"answer: {}").format(t[0], t[1], t[2], res, ans))
if __name__ == '__main__':
main()
|
#!/usr/local/bin/python
# Code Fights Simple Composition Problem
import math
def compose(f, g):
return lambda x: f(g(x))
def simpleComposition(f, g, x):
return compose(eval(f), eval(g))(x)
def main():
tests = [
["math.log10", "abs", -100, 2],
["math.sin", "math.cos", 34.4, math.sin(math.cos(34.4))],
["int", "lambda x: 1.0 * x / 22", 1000, 45],
["math.exp", "lambda x: x ** 0", -1000, math.e],
["lambda z: z", "lambda y: y", 239, 239]
]
for t in tests:
res = simpleComposition(t[0], t[1], t[2])
ans = t[3]
if ans == res:
print("PASSED: simpleComposition({}, {}, {}) returned {}"
.format(t[0], t[1], t[2], res))
else:
print(("FAILED: simpleComposition({}, {}, {}) returned {},"
"answer: {}").format(t[0], t[1], t[2], res, ans))
if __name__ == '__main__':
main()
|
Remove generic function composition example - didn't work
|
Remove generic function composition example - didn't work
|
Python
|
mit
|
HKuz/Test_Code
|
---
+++
@@ -1,7 +1,6 @@
#!/usr/local/bin/python
# Code Fights Simple Composition Problem
-from functools import reduce
import math
@@ -11,11 +10,6 @@
def simpleComposition(f, g, x):
return compose(eval(f), eval(g))(x)
-
-
-# Generic composition of n functions:
-def compose_n(*functions):
- return reduce(lambda f, g: lambda x: f(g(x)), functions, lambda x: x)
def main():
|
d085f8de9d428d0c84d281ad6782d86f4bb0d242
|
photutils/conftest.py
|
photutils/conftest.py
|
# this contains imports plugins that configure py.test for astropy tests.
# by importing them here in conftest.py they are discoverable by py.test
# no matter how it is invoked within the source tree.
from astropy.tests.pytest_plugins import *
## Uncomment the following line to treat all DeprecationWarnings as
## exceptions
enable_deprecations_as_exceptions()
# Add scikit-image to test header information
try:
PYTEST_HEADER_MODULES['scikit-image'] = 'skimage'
except NameError: # astropy < 1.0
pass
|
# this contains imports plugins that configure py.test for astropy tests.
# by importing them here in conftest.py they are discoverable by py.test
# no matter how it is invoked within the source tree.
from astropy.tests.pytest_plugins import *
## Uncomment the following line to treat all DeprecationWarnings as
## exceptions
enable_deprecations_as_exceptions()
# Add scikit-image to test header information
try:
PYTEST_HEADER_MODULES['scikit-image'] = 'skimage'
del PYTEST_HEADER_MODULES['h5py']
except NameError: # astropy < 1.0
pass
|
Remove h5py from pytest header
|
Remove h5py from pytest header
|
Python
|
bsd-3-clause
|
larrybradley/photutils,astropy/photutils
|
---
+++
@@ -11,5 +11,7 @@
# Add scikit-image to test header information
try:
PYTEST_HEADER_MODULES['scikit-image'] = 'skimage'
+ del PYTEST_HEADER_MODULES['h5py']
+
except NameError: # astropy < 1.0
pass
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.