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
e905334869af72025592de586b81650cb3468b8a
sentry/queue/client.py
sentry/queue/client.py
""" sentry.queue.client ~~~~~~~~~~~~~~~~~~~ :copyright: (c) 2010 by the Sentry Team, see AUTHORS for more details. :license: BSD, see LICENSE for more details. """ from kombu import BrokerConnection from kombu.common import maybe_declare from kombu.pools import producers from sentry.conf import settings from sentry.q...
""" sentry.queue.client ~~~~~~~~~~~~~~~~~~~ :copyright: (c) 2010 by the Sentry Team, see AUTHORS for more details. :license: BSD, see LICENSE for more details. """ from kombu import BrokerConnection from kombu.common import maybe_declare from kombu.pools import producers from sentry.conf import settings from sentry.q...
Declare queues when broker is instantiated
Declare queues when broker is instantiated
Python
bsd-3-clause
imankulov/sentry,BuildingLink/sentry,zenefits/sentry,korealerts1/sentry,kevinastone/sentry,fotinakis/sentry,fuziontech/sentry,ngonzalvez/sentry,mvaled/sentry,Kronuz/django-sentry,ngonzalvez/sentry,looker/sentry,felixbuenemann/sentry,ngonzalvez/sentry,nicholasserra/sentry,camilonova/sentry,jokey2k/sentry,llonchj/sentry,...
--- +++ @@ -16,6 +16,9 @@ class Broker(object): def __init__(self, config): self.connection = BrokerConnection(**config) + with producers[self.connection].acquire(block=False) as producer: + for queue in task_queues: + maybe_declare(queue, producer.channel) def d...
45fc612fdc5a354dbf0bacccd345b1aebcc73e59
tests/test_openweather.py
tests/test_openweather.py
# -*- coding: utf-8 -*- import bot_mock from pyfibot.modules import module_openweather from utils import check_re bot = bot_mock.BotMock() def test_weather(): regex = u'Lappeenranta, FI: Temperature: \d+.\d\xb0C, feels like: \d+.\d\xb0C, wind: \d+.\d m/s, humidity: \d+%, pressure: \d+ hPa, cloudiness: \d+%' ...
# -*- coding: utf-8 -*- import bot_mock from pyfibot.modules import module_openweather from utils import check_re bot = bot_mock.BotMock() def test_weather(): regex = u'Lappeenranta, FI: Temperature: \d+.\d\xb0C, feels like: \d+.\d\xb0C, wind: \d+.\d m/s, humidity: \d+%, pressure: \d+ hPa, cloudiness: \d+%' ...
Revert "Fix openweather unit tests"
Revert "Fix openweather unit tests" This reverts commit 36e100e649f0a337228a6d7375358d23afd544ff. Open Weather Map has reverted back to their old api or something like that...
Python
bsd-3-clause
rnyberg/pyfibot,EArmour/pyfibot,aapa/pyfibot,aapa/pyfibot,lepinkainen/pyfibot,rnyberg/pyfibot,lepinkainen/pyfibot,huqa/pyfibot,huqa/pyfibot,EArmour/pyfibot
--- +++ @@ -13,5 +13,5 @@ def test_forecast(): - regex = u'Lappeenranta, Finland: tomorrow: \d+.\d-\d+.\d \xb0C \(.*?\), in 2 days: \d+.\d-\d+.\d \xb0C \(.*?\), in 3 days: \d+.\d-\d+.\d \xb0C \(.*?\)' + regex = u'Lappeenranta, FI: tomorrow: \d+.\d-\d+.\d \xb0C \(.*?\), in 2 days: \d+.\d-\d+.\d \xb0C \(.*?\...
22faee82e1f070532c0dfe5777136e842233a1f0
src/dashboard/src/main/templatetags/percentage.py
src/dashboard/src/main/templatetags/percentage.py
from django.template import Node, Library register = Library() @register.filter('percentage') def percentage(value, total): try: percentage = int(value) / int(total) * 100 except ZeroDivisionError: percentage = 0 return '<abbr title="%s/%s">%s%%</abbr>' % (value, total, percentage)
from django.template import Node, Library register = Library() @register.filter('percentage') def percentage(value, total): try: percentage = float(value) / float(total) * 100 except ZeroDivisionError: percentage = 0 return '<abbr title="%s/%s">%s%%</abbr>' % (value, total, percentage)
Fix % only showing 0 or 100%, everything between goes to 0%.
Fix % only showing 0 or 100%, everything between goes to 0%. Autoconverted from SVN (revision:1548)
Python
agpl-3.0
artefactual/archivematica-history,artefactual/archivematica-history,artefactual/archivematica-history,artefactual/archivematica-history
--- +++ @@ -5,7 +5,7 @@ @register.filter('percentage') def percentage(value, total): try: - percentage = int(value) / int(total) * 100 + percentage = float(value) / float(total) * 100 except ZeroDivisionError: percentage = 0 return '<abbr title="%s/%s">%s%%</abbr>' % (value, total, percentage)
950ac9130bafe1fced578bf61d746b047830bfa0
automata/base/exceptions.py
automata/base/exceptions.py
#!/usr/bin/env python3 """Exception classes shared by all automata.""" class AutomatonException(Exception): """The base class for all automaton-related errors.""" pass class InvalidStateError(AutomatonException): """A state is not a valid state for this automaton.""" pass class InvalidSymbolErro...
#!/usr/bin/env python3 """Exception classes shared by all automata.""" class AutomatonException(Exception): """The base class for all automaton-related errors.""" pass class InvalidStateError(AutomatonException): """A state is not a valid state for this automaton.""" pass class InvalidSymbolErro...
Remove "validation" from RejectionException docstring
Remove "validation" from RejectionException docstring
Python
mit
caleb531/automata
--- +++ @@ -45,6 +45,6 @@ class RejectionException(AutomatonException): - """The input was rejected by the automaton after validation.""" + """The input was rejected by the automaton.""" pass
462ae981ed5b9cc9a8f46e97dfe7908c0827ea64
account_invoice_line_description/res_config.py
account_invoice_line_description/res_config.py
# -*- coding: utf-8 -*- ############################################################################## # # Copyright (C) 2015 Agile Business Group sagl # (<http://www.agilebg.com>) # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public ...
# -*- coding: utf-8 -*- ############################################################################## # # Copyright (C) 2015 Agile Business Group sagl # (<http://www.agilebg.com>) # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public ...
Fix implied_group, it still refers to the old module name
Fix implied_group, it still refers to the old module name
Python
agpl-3.0
Antiun/account-invoicing,hbrunn/account-invoicing,kittiu/account-invoicing,open-synergy/account-invoicing,raycarnes/account-invoicing,brain-tec/account-invoicing,charbeljc/account-invoicing,Noviat/account-invoicing,Endika/account-invoicing,eezee-it/account-invoicing,brain-tec/account-invoicing,kmee/account-invoicing,gu...
--- +++ @@ -29,7 +29,7 @@ 'group_use_product_description_per_inv_line': fields.boolean( """Allow using only the product description on the invoice order lines""", - implied_group="invoice_line_description." + implied_group="account_invoice_line_description." ...
f183b471bf92c03bb5353b02009e3287ffe06ae7
txircd/modules/umode_i.py
txircd/modules/umode_i.py
from txircd.modbase import Mode class InvisibleMode(Mode): def namesListEntry(self, recipient, channel, user, representation): if channel not in recipient.channels and "i" in user.mode: return "" return representation class Spawner(object): def __init__(self, ircd): self.ircd = ircd def spawn(self): r...
from txircd.modbase import Mode class InvisibleMode(Mode): def namesListEntry(self, recipient, channel, user, representation): if channel.name not in recipient.channels and "i" in user.mode: return "" return representation class Spawner(object): def __init__(self, ircd): self.ircd = ircd def spawn(self)...
Fix interpretation of parameters for names list modification
Fix interpretation of parameters for names list modification
Python
bsd-3-clause
ElementalAlchemist/txircd,DesertBus/txircd,Heufneutje/txircd
--- +++ @@ -2,7 +2,7 @@ class InvisibleMode(Mode): def namesListEntry(self, recipient, channel, user, representation): - if channel not in recipient.channels and "i" in user.mode: + if channel.name not in recipient.channels and "i" in user.mode: return "" return representation
c3f8860c717a139d396b0d902db989ab7b8369ba
stock_inventory_hierarchical/__openerp__.py
stock_inventory_hierarchical/__openerp__.py
# -*- coding: utf-8 -*- # © 2013-2016 Numérigraphe SARL # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). { "name": "Hierarchical Inventory adjustments", "summary": "Group several Inventory adjustments in a master inventory", "version": "8.0.2.0.0", "depends": ["stock"], "author"...
# -*- coding: utf-8 -*- # © 2013-2016 Numérigraphe SARL # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). { "name": "Hierarchical Inventory adjustments", "summary": "Group several Inventory adjustments in a master inventory", "version": "8.0.2.0.0", "depends": ["stock"], "author"...
Fix image path in manifest
Fix image path in manifest
Python
agpl-3.0
kmee/stock-logistics-warehouse,factorlibre/stock-logistics-warehouse,open-synergy/stock-logistics-warehouse,acsone/stock-logistics-warehouse,avoinsystems/stock-logistics-warehouse
--- +++ @@ -11,9 +11,9 @@ "category": "Warehouse Management", "data": ["views/stock_inventory_view.xml", "wizard/generate_inventory_view.xml"], - "images": ["inventory_form.png", - "inventory_form_actions.png", - "wizard.png"], + "images": ["images/inventory_f...
9e169348d95e29ad04942ecb00628f3d1f3a3a1c
partner_email_check/models/res_partner.py
partner_email_check/models/res_partner.py
# Copyright 2019 Komit <https://komit-consulting.com> # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). import logging from odoo import api, models, _ from odoo.exceptions import UserError _logger = logging.getLogger(__name__) try: from validate_email import validate_email except ImportError: ...
# Copyright 2019 Komit <https://komit-consulting.com> # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). import logging from odoo import api, models, _ from odoo.exceptions import UserError _logger = logging.getLogger(__name__) try: from validate_email import validate_email except ImportError: ...
Make debugger record a debug message instead of error when importing validate_email in partner_email_check
[FIX][11.0] Make debugger record a debug message instead of error when importing validate_email in partner_email_check
Python
agpl-3.0
BT-rmartin/partner-contact,OCA/partner-contact,OCA/partner-contact,BT-rmartin/partner-contact
--- +++ @@ -10,7 +10,7 @@ try: from validate_email import validate_email except ImportError: - _logger.error('Cannot import "validate_email".') + _logger.debug('Cannot import "validate_email".') def validate_email(email): _logger.warning(
cd56fb2c1a0f4b6dd40ce03545e57c6fd2e1c519
setup.py
setup.py
#!/usr/bin/env python from distutils.core import setup packages = [ 'upho', 'upho.phonon', 'upho.harmonic', 'upho.analysis', 'upho.structure', 'upho.irreps', 'upho.qpoints', 'group', ] scripts = [ 'scripts/upho_weights', 'scripts/upho_sf', 'scripts/upho_qpoints', 'script...
#!/usr/bin/env python from distutils.core import setup packages = [ 'upho', 'upho.phonon', 'upho.harmonic', 'upho.analysis', 'upho.structure', 'upho.irreps', 'upho.qpoints', 'group', ] scripts = [ 'scripts/upho_weights', 'scripts/upho_sf', 'scripts/upho_qpoints', 'script...
Modify the author email address
Modify the author email address
Python
mit
yuzie007/upho,yuzie007/ph_unfolder
--- +++ @@ -20,7 +20,7 @@ setup(name='upho', version='0.5.3', author="Yuji Ikeda", - author_email="ikeda.yuji.6m@kyoto-u.ac.jp", + author_email="y.ikeda@mpie.de", packages=packages, scripts=scripts, install_requires=['numpy', 'h5py', 'phonopy'])
db7bc89d03089ad3107a19220a94ee3fe3d230c3
setup.py
setup.py
from setuptools import setup, find_packages import sys, os version = '1.1.1' setup( name = 'daprot', version = version, description = "daprot is a data prototyper and mapper library.", packages = find_packages( exclude = [ 'ez_setup'] ), include_package_data = True, zip_safe = False, entr...
from setuptools import setup, find_packages import sys, os version = '1.1.2' setup( name = 'daprot', version = version, description = "daprot is a data prototyper and mapper library.", packages = find_packages( exclude = [ 'ez_setup'] ), include_package_data = True, zip_safe = False, entr...
Change the version of the package.
Change the version of the package.
Python
agpl-3.0
bfaludi/daprot
--- +++ @@ -2,7 +2,7 @@ from setuptools import setup, find_packages import sys, os -version = '1.1.1' +version = '1.1.2' setup( name = 'daprot',
4f133cb1c9bb389156175268eb1b989d76e4d280
setup.py
setup.py
try: from setuptools import setup from setuptools import find_packages packages = find_packages() except ImportError: from distutils.core import setup import os packages = [x.strip('./').replace('/','.') for x in os.popen('find -name "__init__.py" | xargs -n1 dirname').read().strip().split('\n')...
try: from setuptools import setup from setuptools import find_packages packages = find_packages() except ImportError: from distutils.core import setup import os packages = [x.strip('./').replace('/','.') for x in os.popen('find -name "__init__.py" | xargs -n1 dirname').read().strip().split('\n')...
Adjust minidump dependency to >= 0.0.10
Adjust minidump dependency to >= 0.0.10
Python
bsd-2-clause
angr/cle
--- +++ @@ -24,7 +24,7 @@ 'sortedcontainers>=2.0', ], extras_require={ - "minidump": ["minidump==0.0.10"], + "minidump": ["minidump>=0.0.10"], "xbe": ["pyxbe==0.0.2"], "ar": ["arpy==1.1.1"], }
fc8d9f995b0abd66da9b2db02dc3588f5e99e66a
setup.py
setup.py
from setuptools import setup, find_packages from os.path import join, dirname import sys if sys.version_info.major < 3: print("Sorry, currently only Python 3 is supported!") sys.exit(1) setup( name = 'CollectionBatchTool', version=__import__('collectionbatchtool').__version__, description = 'batch...
from setuptools import setup, find_packages from os.path import join, dirname import sys if sys.version_info.major < 3: print("Sorry, currently only Python 3 is supported!") sys.exit(1) setup( name = 'CollectionBatchTool', version=__import__('collectionbatchtool').__version__, description = 'bat...
Add utf-8 support for long description
Add utf-8 support for long description
Python
mit
jmenglund/CollectionBatchTool
--- +++ @@ -1,16 +1,19 @@ from setuptools import setup, find_packages from os.path import join, dirname import sys + if sys.version_info.major < 3: print("Sorry, currently only Python 3 is supported!") sys.exit(1) + setup( name = 'CollectionBatchTool', version=__import__('collectionbatcht...
a0e73b06e22be39d06c276a89e04f56452802fba
setup.py
setup.py
from setuptools import setup setup( name='scout', version=__import__('scout').__version__, description='scout', author='Charles Leifer', author_email='coleifer@gmail.com', url='http://github.com/coleifer/scout/', py_modules=['scout'], classifiers=[ 'Development Status :: 5 - Pro...
from setuptools import setup setup( name='scout', version=__import__('scout').__version__, description='scout', author='Charles Leifer', author_email='coleifer@gmail.com', url='http://github.com/coleifer/scout/', py_modules=['scout'], classifiers=[ 'Development Status :: 5 - Pro...
Add `scout.py` as a script.
Add `scout.py` as a script.
Python
mit
coleifer/scout
--- +++ @@ -15,5 +15,6 @@ 'Operating System :: OS Independent', 'Programming Language :: Python', ], + scripts=['scout.py'], test_suite='tests', )
6dc4cb5ec0f0e2373d364e93b7d342beaad6dc4b
setup.py
setup.py
# !/usr/bin/env python from setuptools import setup, find_packages setup(name='symbtrsynthesis', version='1.0.1-dev', description='An (adaptive) synthesizer for SymbTr-MusicXML scores', author='Hasan Sercan Atli', url='https://github.com/hsercanatli/symbtrsynthesis', packages=find_packag...
# !/usr/bin/env python from setuptools import setup, find_packages setup(name='symbtrsynthesis', version='1.0.1-dev', description='An (adaptive) synthesizer for SymbTr-MusicXML scores', author='Hasan Sercan Atli', url='https://github.com/hsercanatli/symbtrsynthesis', packages=find_packag...
Include data files in built package
Include data files in built package
Python
agpl-3.0
hsercanatli/adaptivetuning
--- +++ @@ -8,5 +8,6 @@ author='Hasan Sercan Atli', url='https://github.com/hsercanatli/symbtrsynthesis', packages=find_packages(), + package_data={'symbtrsynthesis': ['data/*.json']}, include_package_data=True, install_requires=['numpy'] )
340cdd0ea77c5edb9ae6f38cf380eec1772cee66
setup.py
setup.py
try: from setuptools import setup except ImportError: from distutils.core import setup config = { 'description': 'TRX', 'author': 'Kyle Maxwell, based on Paterva\'s library', 'url': 'https://github.com/krmaxwell/TRX', 'download_url': 'https://github.com/krmaxwell/TRX', 'author_email': 'krma...
try: from setuptools import setup except ImportError: from distutils.core import setup config = { 'description': 'TRX', 'author': 'Kyle Maxwell, based on Paterva\'s library', 'url': 'https://github.com/krmaxwell/TRX', 'download_url': 'https://github.com/krmaxwell/TRX', 'author_email': 'krma...
Increment minor version and set up for git flow
Increment minor version and set up for git flow
Python
apache-2.0
krmaxwell/TRX
--- +++ @@ -9,7 +9,7 @@ 'url': 'https://github.com/krmaxwell/TRX', 'download_url': 'https://github.com/krmaxwell/TRX', 'author_email': 'krmaxwell@gmail.com', - 'version': '0.1', + 'version': '0.2', 'install_requires': ['nose'], 'packages': ['TRX'], 'scripts': [],
08ccc7d676a0cb0c69d1cbd5096ff5c77e19c4ab
setup.py
setup.py
from os import path from setuptools import setup from hip_pocket.constants import VERSION def load(file_name): here = path.dirname(path.abspath(__file__)) return open(path.join(here, file_name), "r").read() setup( name="HipPocket", description="A wrapper around Flask to ease the development of large...
from os import path from setuptools import setup from hip_pocket.constants import VERSION def load(file_name): here = path.dirname(path.abspath(__file__)) return open(path.join(here, file_name), "r").read() setup( name="HipPocket", description="A wrapper around Flask to ease the development of large...
Add tests package and specify platforms
Add tests package and specify platforms
Python
mit
svieira/Flask-HipPocket,svieira/Flask-HipPocket
--- +++ @@ -13,7 +13,7 @@ description="A wrapper around Flask to ease the development of larger applications", long_description=load("README.rst"), version=VERSION, - packages=["hip_pocket"], + packages=["hip_pocket", "hip_pocket.tests"], url="https://github.com/svieira/HipPocket", auth...
78497a5ef492f18511c4a09b5ca62facafe9c302
setup.py
setup.py
"""Installation script.""" from os import path from setuptools import find_packages, setup HERE = path.abspath(path.dirname(__file__)) with open(path.join(HERE, 'README.rst')) as f: LONG_DESCRIPTION = f.read().strip() setup( name='fuel', version='0.1a1', # PEP 440 compliant description='Data pipelin...
"""Installation script.""" from os import path from setuptools import find_packages, setup HERE = path.abspath(path.dirname(__file__)) with open(path.join(HERE, 'README.rst')) as f: LONG_DESCRIPTION = f.read().strip() setup( name='fuel', version='0.1a1', # PEP 440 compliant description='Data pipelin...
Add fuel-download to installed scripts
Add fuel-download to installed scripts
Python
mit
capybaralet/fuel,glewis17/fuel,EderSantana/fuel,bouthilx/fuel,laurent-dinh/fuel,orhanf/fuel,mila-udem/fuel,rizar/fuel,codeaudit/fuel,udibr/fuel,glewis17/fuel,orhanf/fuel,ejls/fuel,capybaralet/fuel,dmitriy-serdyuk/fuel,markusnagel/fuel,ejls/fuel,dwf/fuel,janchorowski/fuel,laurent-dinh/fuel,dribnet/fuel,janchorowski/fuel...
--- +++ @@ -31,5 +31,5 @@ packages=find_packages(exclude=['tests']), install_requires=['six', 'picklable_itertools', 'toolz', 'pyyaml', 'h5py', 'tables'], - scripts=['bin/fuel-convert'] + scripts=['bin/fuel-convert', 'bin/fuel-download'] )
4bb6876b089375e228320162b7955bcdfa824f41
setup.py
setup.py
from setuptools import setup, find_packages setup( name='akanda-rug', version='0.1.5', description='Akanda Router Update Generator manages tenant routers', author='DreamHost', author_email='dev-community@dreamhost.com', url='http://github.com/dreamhost/akanda-rug', license='BSD', instal...
from setuptools import setup, find_packages setup( name='akanda-rug', version='0.1.5', description='Akanda Router Update Generator manages tenant routers', author='DreamHost', author_email='dev-community@dreamhost.com', url='http://github.com/dreamhost/akanda-rug', license='BSD', instal...
Update the startup command to use the new version of the rug
Update the startup command to use the new version of the rug Change-Id: Ie014dcfb0974b048025aeff96b16a868f672b84a Signed-off-by: Rosario Di Somma <73b2fe5f91895aea2b4d0e8942a5edf9f18fa897@dreamhost.com>
Python
apache-2.0
openstack/akanda-rug,markmcclain/astara,dreamhost/akanda-rug,openstack/akanda-rug,stackforge/akanda-rug,stackforge/akanda-rug
--- +++ @@ -21,8 +21,7 @@ zip_safe=False, entry_points={ 'console_scripts': [ - 'akanda-rug-service=akanda.rug.service:main', - 'akanda-rug-new=akanda.rug.main:main', + 'akanda-rug-service=akanda.rug.main:main', ] }, )
49ac4dc3e7506f35d2f3ad695afaf9c89f08720b
setup.py
setup.py
import os from setuptools import setup base_dir = os.path.dirname(__file__) with open(os.path.join(base_dir, "README.rst")) as f: long_description = f.read() setup( name="TxSNI", description="easy-to-use SNI endpoint for twisted", packages=[ "txsni", "twisted.plugins", ], in...
import os from setuptools import setup base_dir = os.path.dirname(__file__) with open(os.path.join(base_dir, "README.rst")) as f: long_description = f.read() setup( name="TxSNI", description="easy-to-use SNI endpoint for twisted", packages=[ "txsni", "txsni.test", "txsni.tes...
Install the tests and test utilities
Install the tests and test utilities
Python
mit
glyph/txsni
--- +++ @@ -13,6 +13,8 @@ description="easy-to-use SNI endpoint for twisted", packages=[ "txsni", + "txsni.test", + "txsni.test.certs", "twisted.plugins", ], install_requires=[
ae4ff7cffa1273338fff56eb531f2a6f5989de41
setup.py
setup.py
import os from setuptools import setup, find_packages VERSION = '1.4.5' setup( namespace_packages = ['tiddlywebplugins'], name = 'tiddlywebplugins.atom', version = VERSION, description = 'A TiddlyWeb plugin that provides an Atom feed of tiddler collections.', long_description...
import os from setuptools import setup, find_packages VERSION = '1.4.5' setup( namespace_packages = ['tiddlywebplugins'], name = 'tiddlywebplugins.atom', version = VERSION, description = 'A TiddlyWeb plugin that provides an Atom feed of tiddler collections.', long_description...
Use `open` instead of `file` for compatibility
Use `open` instead of `file` for compatibility
Python
bsd-3-clause
tiddlyweb/tiddlywebplugins.atom
--- +++ @@ -10,7 +10,7 @@ name = 'tiddlywebplugins.atom', version = VERSION, description = 'A TiddlyWeb plugin that provides an Atom feed of tiddler collections.', - long_description=file(os.path.join(os.path.dirname(__file__), 'README')).read(), + long_description=open(os.pat...
35e2d4791be9470c4a48e5b84e885f7b759ebd3d
setup.py
setup.py
from setuptools import setup import os def read(filename): with open(filename) as fin: return fin.read() setup( name='dictobj', version='0.2.5', author='William Grim', author_email='william@grimapps.com', url='https://github.com/grimwm/py-dictobj', classifiers = [ 'Development Status :: 4 - Beta...
from setuptools import setup import os def read(filename): with open(filename) as fin: return fin.read() setup( name='dictobj', version='0.2.5', author='William Grim', author_email='william@grimapps.com', url='https://github.com/grimwm/py-dictobj', classifiers = [ 'Development Status :: 5 - Prod...
Correct the description and update the dev status to stable.
Correct the description and update the dev status to stable.
Python
apache-2.0
grimwm/py-dictobj,grimwm/py-dictobj
--- +++ @@ -12,13 +12,13 @@ author_email='william@grimapps.com', url='https://github.com/grimwm/py-dictobj', classifiers = [ - 'Development Status :: 4 - Beta', + 'Development Status :: 5 - Production/Stable', 'License :: OSI Approved :: Apache Software License', 'Operating System :: OS Indep...
6b9f6ee4d4f00e988fb0419eedb81eaa56e3bbe7
setup.py
setup.py
from setuptools import setup with open('README.rst') as rdm: README = rdm.read() setup( name='qjobs', use_scm_version=True, description='Get a clean and flexible output from qstat', long_description=README, url='https://github.com/amorison/qjobs', author='Adrien Morison', author_ema...
from setuptools import setup with open('README.rst') as rdm: README = rdm.read() setup( name='qjobs', use_scm_version=True, description='Get a clean and flexible output from qstat', long_description=README, url='https://github.com/amorison/qjobs', author='Adrien Morison', author_ema...
Set 0.1.1 as minimum version of loam
Set 0.1.1 as minimum version of loam
Python
mit
amorison/qjobs
--- +++ @@ -32,5 +32,5 @@ 'console_scripts': ['qjobs = qjobs.__main__:main'] }, setup_requires=['setuptools_scm'], - install_requires=['setuptools_scm', 'loam'], + install_requires=['setuptools_scm', 'loam>=0.1.1'], )
be8d6400426fb96964a8447bd941d4ab777a867c
setup.py
setup.py
#!/usr/bin/env python from codecs import open from setuptools import find_packages, setup with open('README.rst', 'r', 'utf-8') as f: readme = f.read() setup( name='blanc-basic-pages', version='0.3.7', description='Blanc Basic Pages for Django', long_description=readme, url='https://github....
#!/usr/bin/env python from codecs import open from setuptools import find_packages, setup with open('README.rst', 'r', 'utf-8') as f: readme = f.read() setup( name='blanc-basic-pages', version='0.3.7', description='Blanc Basic Pages for Django', long_description=readme, url='https://github....
Update GitHub repos from blancltd to developersociety
Update GitHub repos from blancltd to developersociety
Python
bsd-3-clause
blancltd/blanc-basic-pages
--- +++ @@ -13,7 +13,7 @@ version='0.3.7', description='Blanc Basic Pages for Django', long_description=readme, - url='https://github.com/blancltd/blanc-basic-pages', + url='https://github.com/developersociety/blanc-basic-pages', maintainer='Blanc Ltd', maintainer_email='studio@blanc.lt...
644d24ad024f0d81f49b85417fecb154a6f259a9
setup.py
setup.py
import platform import sys from setuptools import setup install_requires = [ 'msgpack-python', ] if sys.version_info < (3, 4): # trollius is just a backport of 3.4 asyncio module install_requires.append('trollius') if not platform.python_implementation() == 'PyPy': # pypy already includes an impleme...
import platform import sys from setuptools import setup install_requires = [ 'msgpack-python>=0.4.0', ] if sys.version_info < (3, 4): # trollius is just a backport of 3.4 asyncio module install_requires.append('trollius') if not platform.python_implementation() == 'PyPy': # pypy already includes an ...
Include base version for msgpack, because 0.3 doesn't work
Include base version for msgpack, because 0.3 doesn't work If I import neovim with less than version 0.4 of msgpack installed, I get this stack trace: ``` Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/home/chartdev/venvs/chartio/local/lib/python2.7/site-packages/neovim/__init_...
Python
apache-2.0
zchee/python-client,neovim/python-client,zchee/python-client,0x90sled/python-client,bfredl/python-client,timeyyy/python-client,Shougo/python-client,bfredl/python-client,Shougo/python-client,traverseda/python-client,brcolow/python-client,neovim/python-client,starcraftman/python-client,timeyyy/python-client,meitham/pytho...
--- +++ @@ -4,7 +4,7 @@ from setuptools import setup install_requires = [ - 'msgpack-python', + 'msgpack-python>=0.4.0', ] if sys.version_info < (3, 4):
4f436f14cd1615175051910b38eb83a512fb26ff
setup.py
setup.py
from setuptools import setup, find_packages setup( name = 'django-globals', version = '0.2.1-rc1', description = 'Very simple application, that allow to define a thread specific global variables.', keywords = 'django apps', license = 'New BSD License', author = 'Alexander Artemenko', author_...
from setuptools import setup, find_packages setup( name = 'django-globals', version = '0.2.1', description = 'Very simple application, that allow to define a thread specific global variables.', keywords = 'django apps', license = 'New BSD License', author = 'Alexander Artemenko', author_emai...
Change the version to be the release version
Change the version to be the release version
Python
bsd-3-clause
CBitLabs/django-globals
--- +++ @@ -1,7 +1,7 @@ from setuptools import setup, find_packages setup( name = 'django-globals', - version = '0.2.1-rc1', + version = '0.2.1', description = 'Very simple application, that allow to define a thread specific global variables.', keywords = 'django apps', license = 'New BSD ...
cf69afe8f9e8151141e6040e9d0212b00edcbef1
setup.py
setup.py
from setuptools import setup, find_packages import sys, os version = '0.1' setup(name='ouimeaux', version=version, description="Python API to Belkin WeMo devices", long_description="""\ """, classifiers=[], # Get strings from http://pypi.python.org/pypi?%3Aaction=list_classifiers keyword...
from setuptools import setup, find_packages import sys, os version = '0.1' setup(name='ouimeaux', version=version, description="Python API to Belkin WeMo devices", long_description="""\ """, classifiers=[], # Get strings from http://pypi.python.org/pypi?%3Aaction=list_classifiers keyword...
Add gevent 1.0 as a dependency
Add gevent 1.0 as a dependency
Python
bsd-3-clause
rgardner/ouimeaux,iancmcc/ouimeaux,tomjmul/wemo,sstangle73/ouimeaux,fritz-fritz/ouimeaux,sstangle73/ouimeaux,aktur/ouimeaux,aktur/ouimeaux,drock371/ouimeaux,fritz-fritz/ouimeaux,sstangle73/ouimeaux,m-kiuchi/ouimeaux,iancmcc/ouimeaux,drock371/ouimeaux,fritz-fritz/ouimeaux,bennytheshap/ouimeaux,iancmcc/ouimeaux,aktur/oui...
--- +++ @@ -17,8 +17,11 @@ packages=find_packages(exclude=['ez_setup', 'examples', 'tests']), include_package_data=True, zip_safe=False, + dependency_links = [ + 'https://github.com/downloads/SiteSupport/gevent/gevent-1.0rc2.tar.gz#egg=gevent-1.0.rc2' + ], install_requir...
ee57052a6749459e2702b36a0341e03d6b5e448a
setup.py
setup.py
import sys try: from setuptools import setup except ImportError: from distutils.core import setup # typing library was introduced as a core module in version 3.5.0 requires = ["dirlistproc", "jsonasobj", "rdflib", "rdflib-jsonld"] if sys.version_info < (3, 5): requires.append("typing") setup( name='S...
import sys try: from setuptools import setup except ImportError: from distutils.core import setup # typing library was introduced as a core module in version 3.5.0 requires = ["dirlistproc", "jsonasobj", "rdflib", "rdflib-jsonld"] if sys.version_info < (3, 5): requires.append("typing") setup( name='S...
Change version number for new pypi image
Change version number for new pypi image
Python
apache-2.0
hsolbrig/SNOMEDToOWL,hsolbrig/SNOMEDToOWL,hsolbrig/SNOMEDToOWL
--- +++ @@ -12,7 +12,7 @@ setup( name='SNOMEDToOWL', - version='0.2.2', + version='0.2.3', packages=['SNOMEDCTToOWL', 'SNOMEDCTToOWL.RF2Files'], package_data={'SNOMEDCTToOWL' : ['conf/*.json']}, url='http://github.com/hsolbrig/SNOMEDToOWL',
8ff387b039a83d21eb4999d1bc1704a827b3c3a2
setup.py
setup.py
from setuptools import setup setup( name='opengithub', version='0.1.2', author='Kevin Schaul', author_email='kevin.schaul@gmail.com', url='http://www.kevinschaul.com', description='Open your project in GitHub from the command line.', long_description='Check out the project on GitHub for the...
from setuptools import setup setup( name='opengithub', version='0.1.3', author='Kevin Schaul', author_email='kevin.schaul@gmail.com', url='http://kevin.schaul.io', description='Open your project in GitHub from the command line.', long_description='Check out the project on GitHub for the lat...
Increment version number, fix homepage
Increment version number, fix homepage
Python
mit
kevinschaul/open-in-github
--- +++ @@ -2,10 +2,10 @@ setup( name='opengithub', - version='0.1.2', + version='0.1.3', author='Kevin Schaul', author_email='kevin.schaul@gmail.com', - url='http://www.kevinschaul.com', + url='http://kevin.schaul.io', description='Open your project in GitHub from the command line....
eb2cfa7578012f7312bdb655368ce543cb680a0d
setup.py
setup.py
from setuptools import setup setup( name='tangled.auth', version='0.1a4.dev0', description='Tangled auth integration', long_description=open('README.rst').read(), url='http://tangledframework.org/', download_url='https://github.com/TangledWeb/tangled.auth/tags', author='Wyatt Baldwin', ...
from setuptools import setup setup( name='tangled.auth', version='0.1a4.dev0', description='Tangled auth integration', long_description=open('README.rst').read(), url='http://tangledframework.org/', download_url='https://github.com/TangledWeb/tangled.auth/tags', author='Wyatt Baldwin', ...
Upgrade tangled.web from 0.1a5 to 0.1a9
Upgrade tangled.web from 0.1a5 to 0.1a9
Python
mit
TangledWeb/tangled.auth
--- +++ @@ -16,11 +16,11 @@ 'tangled.auth.tests', ], install_requires=[ - 'tangled.web>=0.1a5', + 'tangled.web>=0.1a9', ], extras_require={ 'dev': [ - 'tangled.web[dev]>=0.1a5', + 'tangled.web[dev]>=0.1a9', ], }, entry_points...
3187ff297b02eaf1c0b6debdb48d2f6396751947
setup.py
setup.py
__version__ = '0.1' import os from setuptools import setup, find_packages here = os.path.abspath(os.path.dirname(__file__)) README = open(os.path.join(here, 'README.rst')).read() CHANGES = open(os.path.join(here, 'CHANGES.rst')).read() setup(name='retools', version=__version__, description='Redis Tools'...
__version__ = '0.1' import os from setuptools import setup, find_packages here = os.path.abspath(os.path.dirname(__file__)) README = open(os.path.join(here, 'README.rst')).read() CHANGES = open(os.path.join(here, 'CHANGES.rst')).read() setup(name='retools', version=__version__, description='Redis Tools'...
Update deps for initial release
Update deps for initial release
Python
mit
bbangert/retools,0x1997/retools,mozilla-services/retools
--- +++ @@ -16,7 +16,7 @@ "Intended Audience :: Developers", "Programming Language :: Python", ], - keywords='cache redis queue', + keywords='cache redis queue lock', author="Ben Bangert", author_email="ben@groovie.org", url="", @@ -26,9 +26,9 @@ zip_sa...
c5a71b5e97657358f41fc7f96b1b674ceb37dfb1
setup.py
setup.py
# -*- coding: utf-8 -*- from setuptools import setup, find_packages from aldryn_faq import __version__ REQUIREMENTS = [ 'aldryn-apphooks-config', 'aldryn-reversion', 'aldryn-search', 'django-admin-sortable', 'django-admin-sortable2>=0.5.0', 'django-parler', 'django-sortedm2m', ] CLASSIFIER...
# -*- coding: utf-8 -*- from setuptools import setup, find_packages from aldryn_faq import __version__ REQUIREMENTS = [ 'aldryn-apphooks-config', 'aldryn-reversion', 'aldryn-search', # 'django-admin-sortable', 'django-admin-sortable2>=0.5.0', 'django-parler', 'django-sortedm2m', ] CLASSIFI...
Remove plain 'django-admin-sortable' from requirements
Remove plain 'django-admin-sortable' from requirements This is only required to test migrations, not for new installs.
Python
bsd-3-clause
czpython/aldryn-faq,czpython/aldryn-faq,czpython/aldryn-faq,czpython/aldryn-faq
--- +++ @@ -6,7 +6,7 @@ 'aldryn-apphooks-config', 'aldryn-reversion', 'aldryn-search', - 'django-admin-sortable', + # 'django-admin-sortable', 'django-admin-sortable2>=0.5.0', 'django-parler', 'django-sortedm2m',
70a642c0597fb2f929fc83d821c8b1f095ed1328
proxy/plugins/plugins.py
proxy/plugins/plugins.py
packetFunctions = {} commands = {} onStart = [] onConnection = [] onConnectionLoss = [] class packetHook(object): def __init__(self, pktType, pktSubtype): self.pktType = pktType self.pktSubtype = pktSubtype def __call__(self, f): global packetFunctions packetFunctions[(self.pktType, self.pktSubtype)] = f c...
packetFunctions = {} commands = {} onStart = [] onConnection = [] onConnectionLoss = [] class packetHook(object): def __init__(self, pktType, pktSubtype): self.pktType = pktType self.pktSubtype = pktSubtype def __call__(self, f): global packetFunctions if (self.pktType, self.pktSubtype) not in packetFunctio...
Allow mutiple hooks for packets
Allow mutiple hooks for packets
Python
agpl-3.0
alama/PSO2Proxy,alama/PSO2Proxy,flyergo/PSO2Proxy,alama/PSO2Proxy,cyberkitsune/PSO2Proxy,cyberkitsune/PSO2Proxy,flyergo/PSO2Proxy,cyberkitsune/PSO2Proxy
--- +++ @@ -11,7 +11,9 @@ def __call__(self, f): global packetFunctions - packetFunctions[(self.pktType, self.pktSubtype)] = f + if (self.pktType, self.pktSubtype) not in packetFunctions: + packetFunctions[(self.pktType, self.pktSubtype)] = [] + packetFunctions[(self.pktType, self.pktSubtype)].append(f) ...
44e31e2153f4eec2863f9d712ab60f0ef00d1779
mongo_connector/get_last_oplog_timestamp.py
mongo_connector/get_last_oplog_timestamp.py
#!/usr/bin/python import pymongo import bson import time import sys from mongo_connector import util mongo_url = 'mongodb://localhost:27017' if len(sys.argv) == 1: print "First argument is mongodb connection string, i.e. localhost:27017. Assuming localhost:27017..." if len(sys.argv) >= 2: mongo_url = sys.argv[1] ...
#!/usr/bin/python import pymongo import bson import time import sys from mongo_connector import util mongo_url = 'mongodb://localhost:27017' if len(sys.argv) == 1: print "First argument is mongodb connection string, i.e. localhost:27017. Assuming localhost:27017..." if len(sys.argv) >= 2: mongo_url = sys.argv[1] ...
Update for compatibility with python 3
Update for compatibility with python 3
Python
apache-2.0
10gen-labs/mongo-connector,ShaneHarvey/mongo-connector,mongodb-labs/mongo-connector,10gen-labs/mongo-connector,mongodb-labs/mongo-connector,ShaneHarvey/mongo-connector
--- +++ @@ -14,17 +14,17 @@ client = pymongo.MongoClient(mongo_url) rs_name = client.admin.command('ismaster')['setName'] -print 'Found Replica Set name: {}'.format(str(rs_name)) +print('Found Replica Set name: {}'.format(str(rs_name))) -print 'Now checking for the latest oplog entry...' +print('Now checking fo...
af91b7c2612fab598ba50c0c0256f7e552098d92
reportlab/docs/genAll.py
reportlab/docs/genAll.py
#!/bin/env python """Runs the three manual-building scripts""" if __name__=='__main__': import os, sys d = os.path.dirname(sys.argv[0]) #need a quiet mode for the test suite if '-s' in sys.argv: # 'silent quiet = '-s' else: quiet = '' if not d: d = '.' if not os...
#!/bin/env python import os def _genAll(d=None,quiet=''): if not d: d = '.' if not os.path.isabs(d): d = os.path.normpath(os.path.join(os.getcwd(),d)) for p in ('reference/genreference.py', 'userguide/genuserguide.py', 'graphguide/gengraphguide.py', '../tools/docco/graphdocpy.py'): os.chdir(d) o...
Allow for use in daily.py
Allow for use in daily.py
Python
bsd-3-clause
makinacorpus/reportlab-ecomobile,makinacorpus/reportlab-ecomobile,makinacorpus/reportlab-ecomobile,makinacorpus/reportlab-ecomobile,makinacorpus/reportlab-ecomobile
--- +++ @@ -1,22 +1,23 @@ #!/bin/env python -"""Runs the three manual-building scripts""" +import os +def _genAll(d=None,quiet=''): + if not d: d = '.' + if not os.path.isabs(d): + d = os.path.normpath(os.path.join(os.getcwd(),d)) + for p in ('reference/genreference.py', + 'userguide/genuserguide.py', + 'gr...
7c2a640d2c3ab9218d8334f4939d7c1af919c318
setup.py
setup.py
import os import sys from distutils.core import setup if sys.version_info < (3,): print('\nSorry, but Adventure can only be installed under Python 3.\n') sys.exit(1) README_PATH = os.path.join(os.path.dirname(__file__), 'adventure', 'README.txt') with open(README_PATH, encoding="utf-8") as f: README_TEXT ...
import os import sys from distutils.core import setup if sys.version_info < (3,): print('\nSorry, but Adventure can only be installed under Python 3.\n') sys.exit(1) README_PATH = os.path.join(os.path.dirname(__file__), 'adventure', 'README.txt') with open(README_PATH, encoding="utf-8") as f: README_TEXT ...
Update outdated link to repository, per @cknv
Update outdated link to repository, per @cknv
Python
apache-2.0
devinmcgloin/advent,devinmcgloin/advent
--- +++ @@ -17,7 +17,7 @@ long_description=README_TEXT, author='Brandon Craig Rhodes', author_email='brandon@rhodesmill.org', - url='https://bitbucket.org/brandon/adventure/overview', + url='https://github.com/brandon-rhodes/python-adventure', packages=['adventure', 'adventure/tests'], ...
3e4e44968412acb2ada2279b6fb4108eb66b02b2
setup.py
setup.py
from setuptools import setup setup( name='kf5py', py_modules = ['kf5py'], version='0.1.dev5', author='Chris Teplovs', author_email='dr.chris@problemshift.com', url='https://github.com/problemshift/kf5py', license='LICENSE.txt', description='Python-based utilities for KF5.', install_...
from setuptools import setup setup( name='kf5py', py_modules = ['kf5py'], version='0.1.0', author='Chris Teplovs', author_email='dr.chris@problemshift.com', url='http://problemshift.github.io/kf5py/', license='LICENSE.txt', description='Python-based utilities for KF5.', install_requ...
Remove dev indentifier; crank Development Status; updated URL to point to project page
Remove dev indentifier; crank Development Status; updated URL to point to project page
Python
mit
problemshift/kf5py
--- +++ @@ -3,10 +3,10 @@ setup( name='kf5py', py_modules = ['kf5py'], - version='0.1.dev5', + version='0.1.0', author='Chris Teplovs', author_email='dr.chris@problemshift.com', - url='https://github.com/problemshift/kf5py', + url='http://problemshift.github.io/kf5py/', license='...
913a102332e5d2caeab265f8a9980e2303f58550
setup.py
setup.py
from setuptools import setup version = "0.10.2" setup( name="setuptools-rust", version=version, author="Nikolay Kim", author_email="fafhrd91@gmail.com", url="https://github.com/PyO3/setuptools-rust", keywords="distutils setuptools rust", description="Setuptools rust extension plugin", ...
from setuptools import setup version = "0.10.2" setup( name="setuptools-rust", version=version, author="Nikolay Kim", author_email="fafhrd91@gmail.com", url="https://github.com/PyO3/setuptools-rust", keywords="distutils setuptools rust", description="Setuptools rust extension plugin", ...
Fix wrong path in readme
Fix wrong path in readme
Python
mit
PyO3/setuptools-rust,PyO3/setuptools-rust
--- +++ @@ -11,9 +11,7 @@ url="https://github.com/PyO3/setuptools-rust", keywords="distutils setuptools rust", description="Setuptools rust extension plugin", - long_description="\n\n".join( - (open("README.rst").read(), open("CHANGES.rst").read()) - ), + long_description=open("README.r...
aba2ccc48fdae23c1e04eab705402e319c97e76a
setup.py
setup.py
# Copyright 2013-2014 Massachusetts Open Cloud Contributors # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the # License. You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicab...
# Copyright 2013-2014 Massachusetts Open Cloud Contributors # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the # License. You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicab...
Change version number to 0.1
Change version number to 0.1 ...in preparation for the upcoming release.
Python
apache-2.0
apoorvemohan/haas,SahilTikale/switchHaaS,kylehogan/haas,henn/hil_sahil,henn/hil,kylehogan/hil,henn/hil,SahilTikale/haas,kylehogan/hil,meng-sun/hil,apoorvemohan/haas,CCI-MOC/haas,henn/hil_sahil,henn/haas,meng-sun/hil
--- +++ @@ -18,7 +18,7 @@ requirements = [str(r.req) for r in parse_requirements('requirements.txt')] setup(name='moc-rest', - version='1.0', + version='0.1', url='https://github.com/CCI-MOC/moc-rest', packages=find_packages(), install_requires=requirements,
6123ca57cac5d61de833e1102297b0cc9d7a3e0c
setup.py
setup.py
import os.path import re try: from setuptools import setup except ImportError: from distutils.core import setup def fpath(name): return os.path.join(os.path.dirname(__file__), name) def read(fname): return open(fpath(fname)).read() def grep(attrname): pattern = r"{0}\W*=\W*'([^']+)'".format(...
import os.path import re try: from setuptools import setup except ImportError: from distutils.core import setup def fpath(name): return os.path.join(os.path.dirname(__file__), name) def read(fname): return open(fpath(fname)).read() def grep(attrname): pattern = r"{0}\W*=\W*'([^']+)'".format(...
Use read() utility to open README.
Use read() utility to open README.
Python
apache-2.0
crsmithdev/arrow
--- +++ @@ -28,7 +28,7 @@ name='arrow', version=grep('__version__'), description='Better dates and times for Python', - long_description=open('README.rst').read(), + long_description=read(fpath('README.rst')), url='https://github.com/crsmithdev/arrow/', author='Chris Smith', author...
f1cba9b90d4b85a88b799a43a05807484e9b9910
setup.py
setup.py
#! /usr/bin/env python from setuptools import setup import re from os import path version = '' with open('cliff/__init__.py', 'r') as fd: version = re.search(r'^__version__\s*=\s*[\'"]([^\'"]*)[\'"]', fd.read(), re.MULTILINE).group(1) this_directory = path.abspath(path.dirname(__file__)) with open(path.join(this_...
#! /usr/bin/env python from setuptools import setup import re from os import path version = '' with open('cliff/__init__.py', 'r') as fd: version = re.search(r'^__version__\s*=\s*[\'"]([^\'"]*)[\'"]', fd.read(), re.MULTILINE).group(1) this_directory = path.abspath(path.dirname(__file__)) with open(path.join(this_...
Fix long description format to be markdown
Fix long description format to be markdown
Python
mit
c4fcm/CLIFF-API-Client
--- +++ @@ -15,6 +15,7 @@ version=version, description='Media Cloud CLIFF API Client Library', long_description=long_description, + long_description_content_type='text/markdown', author='Rahul Bhargava', author_email='rahulb@media.mit.edu', url='http://cliff.mediacloud.o...
a0325e9b29e41badf576c699163aef081df2ab32
setup.py
setup.py
from setuptools import setup import os # Get version without importing, which avoids dependency issues def get_version(): import re with open('imbox/version.py') as version_file: return re.search(r"""__version__\s+=\s+(['"])(?P<version>.+?)\1""", version_file.read()).group('ve...
from setuptools import setup import os # Get version without importing, which avoids dependency issues def get_version(): import re with open('imbox/version.py') as version_file: return re.search(r"""__version__\s+=\s+(['"])(?P<version>.+?)\1""", version_file.read()).group('ve...
Use context manager for open
Use context manager for open
Python
mit
martinrusev/imbox
--- +++ @@ -11,7 +11,8 @@ def read(filename): - return open(os.path.join(os.path.dirname(__file__), filename)).read() + with open(os.path.join(os.path.dirname(__file__), filename)) as f: + return f.read() setup(
9da7f07e2a6900b1df2cc0d8e0766409d4a41495
setup.py
setup.py
""" Favien ====== Network canvas community. """ from setuptools import setup setup( name='Favien', version='dev', url='https://github.com/limeburst/favien', author='Jihyeok Seo', author_email='me@limeburst.net', description='Network canvas community', long_description=__doc__, zip_sa...
""" Favien ====== Network canvas community. """ from setuptools import setup setup( name='Favien', version='dev', url='https://github.com/limeburst/favien', author='Jihyeok Seo', author_email='me@limeburst.net', description='Network canvas community', long_description=__doc__, zip_sa...
Include static subdirectories in package
Include static subdirectories in package
Python
agpl-3.0
favien/favien,favien/favien,favien/favien
--- +++ @@ -19,7 +19,8 @@ zip_safe=False, packages=['favien', 'favien.web'], package_data={ - 'favien.web': ['templates/*.*', 'templates/*/*.*', 'static/*.*', + 'favien.web': ['templates/*.*', 'templates/*/*.*', + 'static/*.*', 'static/*/*.*', ...
4523e55f7a7c5333b1087a037c6a96b6af30e111
setup.py
setup.py
#!/usr/bin/env python from subprocess import check_call, CalledProcessError from setuptools import setup def convert_readme(): try: check_call(["pandoc", "-f", "markdown_github", "-t", "rst", "-o", "README.rst", "README.md"]) except (OSError, CalledProcessError): return o...
#!/usr/bin/env python from subprocess import check_call, CalledProcessError from setuptools import setup import six requirements = ['setuptools', 'mongoengine>=0.10.0'] if six.PY3: requirements.append('django') else: requirements.append('django<2') def convert_readme(): try: check_call(["pand...
Install the proper version of Django
Install the proper version of Django
Python
bsd-3-clause
thomwiggers/django-mongodbforms
--- +++ @@ -3,6 +3,15 @@ from subprocess import check_call, CalledProcessError from setuptools import setup + +import six + + +requirements = ['setuptools', 'mongoengine>=0.10.0'] +if six.PY3: + requirements.append('django') +else: + requirements.append('django<2') def convert_readme(): @@ -38,7 +47,7 ...
bc4e66a5229ea6863b39ce62a35e19c7cca217aa
setup.py
setup.py
from setuptools import setup from setuptools import find_packages from yelp_kafka_tool import __version__ setup( name="yelp-kafka-tool", version=__version__, author="Distributed systems team", author_email="team-dist-sys@yelp.com", description="Kafka management tools", packages=find_packages(...
from setuptools import setup from setuptools import find_packages from yelp_kafka_tool import __version__ setup( name="yelp-kafka-tool", version=__version__, author="Distributed systems team", author_email="team-dist-sys@yelp.com", description="Kafka management tools", packages=find_packages(...
Include kafka-check, bump to v0.2.6
Include kafka-check, bump to v0.2.6
Python
apache-2.0
anthonysandrin/kafka-utils,Yelp/kafka-utils,anthonysandrin/kafka-utils,Yelp/kafka-utils
--- +++ @@ -21,6 +21,7 @@ "scripts/kafka-partition-manager", "scripts/kafka-consumer-manager", "scripts/yelpkafka", + "scripts/kafka-check", ], install_requires=[ "argcomplete",
4359912ce0898c6c4a8d54c7328fb11a7eb486c9
setup.py
setup.py
from setuptools import setup, Extension import numpy ext_modules=[ Extension( "heat_diffusion_experiment.cython_versions", ["heat_diffusion_experiment/cython_versions.pyx"], language='c++', extra_compile_args=['/openmp'], # extra_link_args=['/openmp'], ), ] ...
from setuptools import setup, Extension import numpy import sys if sys.platform == 'linux' extra_compile_args = ['-fopenmp' extra_link_args = ['-fopenmp'] else: extra_compile_args = ['-/openmp'] extra_link_args = ['-/openmp'] ext_modules=[ Extension( "heat_diffusion_experi...
Enable module to be compiled with msvc and gcc compilers
Enable module to be compiled with msvc and gcc compilers
Python
mit
dplucenio/heat_diffusion_experiment
--- +++ @@ -1,13 +1,23 @@ from setuptools import setup, Extension import numpy +import sys + +if sys.platform == 'linux' + extra_compile_args = ['-fopenmp' + extra_link_args = ['-fopenmp'] +else: + extra_compile_args = ['-/openmp'] + extra_link_args = ['-/openmp'] + + ext_modules=[ Extension( ...
9192fbad43b7df9153b63f04c444b3654626a9ec
setup.py
setup.py
from setuptools import setup, find_packages def main(): setup(name='bioagents', version='0.0.1', description='Biological Reasoning Agents', long_description='Biological Reasoning Agents', author='Benjamin Gyori', author_email='benjamin_gyori@hms.harvard.edu', ...
from setuptools import setup, find_packages def main(): setup(name='bioagents', version='0.0.1', description='Biological Reasoning Agents', long_description='Biological Reasoning Agents', author='Benjamin Gyori', author_email='benjamin_gyori@hms.harvard.edu', ...
Add pykqml dependency lower limit
Add pykqml dependency lower limit
Python
bsd-2-clause
bgyori/bioagents,sorgerlab/bioagents
--- +++ @@ -9,7 +9,7 @@ author_email='benjamin_gyori@hms.harvard.edu', url='http://github.com/sorgerlab/bioagents', packages=find_packages(), - install_requires=['indra', 'pykqml'], + install_requires=['indra', 'pykqml>=1.2'], include_package_data=True, ...
adfc532450699ac929dd08199abc2c0f751d982f
setup.py
setup.py
#!/usr/bin/python3 from distutils.core import setup setup( name='tq', version='0.2.0', description='comand line css selector', author='Pedro', author_email='pedroghcode@gmail.com', url='https://github.com/plainas/tq', packages= ['tq'], scripts=['bin/tq'], install_requires=["beautif...
#!/usr/bin/python3 from distutils.core import setup setup( name='tq', version='0.2.0', description='comand line css selector', author='Pedro', author_email='pedroghcode@gmail.com', url='https://github.com/plainas/tq', packages= ['tq'], scripts=['bin/tq'], install_requires=["beautif...
Allow this tool to be used with more recent versions of BeautifulSoup
Allow this tool to be used with more recent versions of BeautifulSoup This would allow the use of extra powerful selectors: https://www.crummy.com/software/BeautifulSoup/bs4/doc/#css-selectors
Python
mit
plainas/tq,plainas/tq,plainas/tq
--- +++ @@ -11,5 +11,5 @@ url='https://github.com/plainas/tq', packages= ['tq'], scripts=['bin/tq'], - install_requires=["beautifulsoup4==4.4.0"] + install_requires=["beautifulsoup4>=4.4.0"] )
35dc73f0149d83f2f7f0cae9e602b1aaa399f2c5
setup.py
setup.py
#!/usr/bin/env python # -*- coding: utf-8 -*- from setuptools import setup setup( name='robber', version='1.1.1', description='BDD / TDD assertion library for Python', author='Tao Liang', author_email='tao@synapse-ai.com', url='https://github.com/vesln/robber.py', packages=[ 'robber...
#!/usr/bin/env python # -*- coding: utf-8 -*- import os from setuptools import setup long_description = 'BDD / TDD assertion library for Python', if os.path.exists('README.rst'): long_description = open('README.rst').read() setup( name='robber', version='1.1.2', description='BDD / TDD assertion libra...
Deal with MD and RST doc
[c] Deal with MD and RST doc
Python
mit
vesln/robber.py
--- +++ @@ -1,11 +1,18 @@ #!/usr/bin/env python # -*- coding: utf-8 -*- +import os + from setuptools import setup + +long_description = 'BDD / TDD assertion library for Python', +if os.path.exists('README.rst'): + long_description = open('README.rst').read() setup( name='robber', - version='1.1.1', +...
597854eeaacaae71832833d41eea260ad5ef7279
setup.py
setup.py
#!/usr/bin/env python from setuptools import setup setup( name='Simon', version='0.7.0', description='Simple MongoDB Models', long_description=open('README.rst').read(), author='Andy Dirnberger', author_email='dirn@dirnonline.com', url='https://github.com/dirn/Simon', packages=['simon'...
#!/usr/bin/env python from setuptools import setup setup( name='Simon', version='0.7.0', description='Simple MongoDB Models', long_description=open('README.rst').read(), author='Andy Dirnberger', author_email='dirn@dirnonline.com', url='https://github.com/dirn/Simon', packages=['simon'...
Add Python 3 to supported languages
Add Python 3 to supported languages
Python
bsd-3-clause
dirn/Simon,dirn/Simon
--- +++ @@ -25,6 +25,7 @@ 'Programming Language :: Python', 'Programming Language :: Python :: 2.6', 'Programming Language :: Python :: 2.7', + 'Programming Language :: Python :: 3.3', 'Programming Language :: Python :: Implementation :: CPython', 'Programming Langu...
7bd045ce1157343b17318ce446185138400a5f75
setup.py
setup.py
from setuptools import setup setup( name='sandbox', version=open('VERSION').read().strip(), long_description=(open('README.rst').read() + '\n' + open('CHANGELOG.rst').read()), py_modules=[ 'sandbox', ], setup_requires=[ ], install_requires=[ 'aiohtt...
from setuptools import setup setup( name='sandbox', version=open('VERSION').read().strip(), long_description=(open('README.rst').read() + '\n' + open('CHANGELOG.rst').read()), py_modules=[ 'sandbox', ], setup_requires=[ ], install_requires=[ 'aiohtt...
Add transaction to project requirements
Add transaction to project requirements
Python
bsd-2-clause
plone/plone.server,plone/plone.server
--- +++ @@ -16,6 +16,7 @@ 'BTrees', 'cchardet', 'setuptools', + 'transaction', 'ZODB', ], tests_require=[
c972357a44640c7a5f803d79fc77ca597e1b22f0
setup.py
setup.py
from setuptools import setup with open("README.md", "r") as fh: long_description = fh.read() config = { 'name': 'timew-report', 'version': '1.0.0', 'description': 'An interface for TimeWarrior report data', 'long_description': long_description, 'long_description_content_type': 'text/markdown',...
from setuptools import setup with open("README.md", "r") as fh: long_description = fh.read() config = { 'name': 'timew-report', 'version': '1.0.0', 'description': 'An interface for TimeWarrior report data', 'long_description': long_description, 'long_description_content_type': 'text/markdown',...
Drop support for python 2.7
Drop support for python 2.7
Python
mit
lauft/timew-report
--- +++ @@ -18,7 +18,6 @@ 'Intended Audience :: Developers', 'Topic :: Utilities', 'License :: OSI Approved :: MIT License', - 'Programming Language :: Python :: 2.7', 'Programming Language :: Python :: 3.4', ], 'keywords': 'timewarrior taskwarrior time-tracking',
655ac367fde72d892eccfeece3ebf6719612d35b
setup.py
setup.py
from setuptools import setup, find_packages setup( name='amii-tf-nn', version='0.0.1', license='MIT', packages=find_packages(), install_requires=[ 'future == 0.15.2', 'setuptools >= 20.2.2', 'pyyaml == 3.12', # tensorflow or tensorflow-gpu ], tests_require=[...
from setuptools import setup, find_packages setup( name='amii-tf-nn', version='0.0.1', license='MIT', packages=find_packages(), install_requires=[ 'future == 0.15.2', 'setuptools >= 20.2.2', 'pyyaml == 3.12', # tensorflow or tensorflow-gpu v1.2 ], tests_requ...
Add version to tf library reminder.
Add version to tf library reminder.
Python
mit
AmiiThinks/amii-tf-nn
--- +++ @@ -10,7 +10,7 @@ 'future == 0.15.2', 'setuptools >= 20.2.2', 'pyyaml == 3.12', - # tensorflow or tensorflow-gpu + # tensorflow or tensorflow-gpu v1.2 ], tests_require=['pytest', 'pytest-cov'], setup_requires=['pytest-runner'],
eda2686d7a59acf5fc7f6d72b710ccc8b20801a9
setup.py
setup.py
# -*- coding: utf-8 -*- from distutils.core import setup long_description = open('README.rst').read() setup( name='django-tagging-autocomplete', version='0.4.2', description='Autocompletion for django-tagging', long_description=long_description, author='Ludwik Trammer', author_email='ludwik@gm...
# -*- coding: utf-8 -*- import os from distutils.core import setup from distutils.command.install import INSTALL_SCHEMES long_description = open('README.rst').read() # install data files where source files are installed for scheme in INSTALL_SCHEMES.values(): scheme['data'] = scheme['purelib'] def find_data_file...
Install static files with distutils.
Install static files with distutils.
Python
mit
ludwiktrammer/django-tagging-autocomplete
--- +++ @@ -1,7 +1,18 @@ # -*- coding: utf-8 -*- +import os from distutils.core import setup +from distutils.command.install import INSTALL_SCHEMES long_description = open('README.rst').read() + +# install data files where source files are installed +for scheme in INSTALL_SCHEMES.values(): + scheme['data'] = ...
06110d32be6bc52f05274318a0f5ff27828acf91
setup.py
setup.py
#!/usr/bin/env python # Support setuptools or distutils try: from setuptools import setup, find_packages except ImportError: from distutils.core import setup # Version info -- read without importing _locals = {} version_module = execfile('invocations/_version.py', _locals) version = _locals['__version__'] se...
#!/usr/bin/env python # Support setuptools or distutils try: from setuptools import setup, find_packages except ImportError: from distutils.core import setup # Version info -- read without importing _locals = {} with open('invocations/_version.py') as fp: exec(fp.read(), None, _locals) version = _locals['...
Switch to a Python3 Compataible open + read + exec vs execfile
Switch to a Python3 Compataible open + read + exec vs execfile
Python
bsd-2-clause
pyinvoke/invocations,alex/invocations,mrjmad/invocations,singingwolfboy/invocations
--- +++ @@ -8,7 +8,8 @@ # Version info -- read without importing _locals = {} -version_module = execfile('invocations/_version.py', _locals) +with open('invocations/_version.py') as fp: + exec(fp.read(), None, _locals) version = _locals['__version__'] setup(
e34969db596ff3dfa4bf78efb3f3ccfe771d9ef9
setup.py
setup.py
# Use setuptools if we can try: from setuptools.core import setup except ImportError: from distutils.core import setup PACKAGE = 'django_exceptional_middleware' VERSION = '0.2' data_files = [ ( 'exceptional_middleware/templates/http_responses', [ 'exceptional_middleware/templates/http_responses/de...
# Use setuptools if we can try: from setuptools.core import setup except ImportError: from distutils.core import setup PACKAGE = 'django_exceptional_middleware' VERSION = '0.4' package_data = { 'exceptional_middleware': [ 'templates/http_responses/*.html' ], } setup( name=PACKAGE, version=VERSION...
Fix templates install. Bump to version 0.4 in the process (which is really my laziness).
Fix templates install. Bump to version 0.4 in the process (which is really my laziness).
Python
mit
jaylett/django_exceptional_middleware
--- +++ @@ -5,19 +5,17 @@ from distutils.core import setup PACKAGE = 'django_exceptional_middleware' -VERSION = '0.2' +VERSION = '0.4' -data_files = [ - ( - 'exceptional_middleware/templates/http_responses', [ 'exceptional_middleware/templates/http_responses/default.html' ], - ), -] +package_da...
23981dd5908b423104bdf51e6882d043b3efdc6e
setup.py
setup.py
# -*- coding: utf-8 -*- from setuptools import setup setup( name='dj-queryset-manager', version='0.1.0', url='https://github.com/nosamanuel/dj-queryset-manager', license=open('LICENSE').read(), author='Noah Seger', author_email='nosamanuel@gmail.com.com', description='Stop writing Django q...
# -*- coding: utf-8 -*- from setuptools import setup setup( name='dj-queryset-manager', version='0.1.1', url='https://github.com/nosamanuel/dj-queryset-manager', license=open('LICENSE').read(), author='Noah Seger', author_email='nosamanuel@gmail.com.com', description='Stop writing Django q...
Include package data to fix bad install (v0.1.1)
Include package data to fix bad install (v0.1.1)
Python
bsd-3-clause
nosamanuel/dj-queryset-manager
--- +++ @@ -4,7 +4,7 @@ setup( name='dj-queryset-manager', - version='0.1.0', + version='0.1.1', url='https://github.com/nosamanuel/dj-queryset-manager', license=open('LICENSE').read(), author='Noah Seger', @@ -12,6 +12,8 @@ description='Stop writing Django querysets.', long_des...
c6265c2112ee9985af8b6b80fe0bee1811dc6abd
setup.py
setup.py
# -*- coding: utf-8 -*- from distutils.core import setup setup( name='oceanoptics', version='0.2.6', author='Andreas Poehlmann, Jose A. Jimenez-Berni, Ben Gamari, Simon Dickreuter', author_email='mail@andreaspoehlmann.de', packages=['oceanoptics', 'oceanoptics.spectrometers'], description='A Py...
# -*- coding: utf-8 -*- from distutils.core import setup setup( name='oceanoptics', version='0.2.7', author='Andreas Poehlmann, Jose A. Jimenez-Berni, Ben Gamari, Simon Dickreuter, Ian Ross Williams', author_email='mail@andreaspoehlmann.de', packages=['oceanoptics', 'oceanoptics.spectrometers'], ...
Add author and increase version number
Add author and increase version number
Python
mit
ap--/python-oceanoptics
--- +++ @@ -3,8 +3,8 @@ setup( name='oceanoptics', - version='0.2.6', - author='Andreas Poehlmann, Jose A. Jimenez-Berni, Ben Gamari, Simon Dickreuter', + version='0.2.7', + author='Andreas Poehlmann, Jose A. Jimenez-Berni, Ben Gamari, Simon Dickreuter, Ian Ross Williams', author_email='mail@...
e01697c5d5e5e45a0dd20870c71bb17399991ca1
setup.py
setup.py
import os from setuptools import setup, find_packages ROOT = os.path.abspath(os.path.dirname(__file__)) setup( name='django-nose', version='0.2', description='Django test runner that uses nose.', long_description=open(os.path.join(ROOT, 'README.rst')).read(), author='Jeff Balogh', author_email...
import os from setuptools import setup, find_packages ROOT = os.path.abspath(os.path.dirname(__file__)) setup( name='django-nose', version='0.2', description='Django test runner that uses nose.', long_description=open(os.path.join(ROOT, 'README.rst')).read(), author='Jeff Balogh', author_email...
Comment out entrypoint because it blows up django-nose in connection with tox. Ouch.
Comment out entrypoint because it blows up django-nose in connection with tox. Ouch.
Python
bsd-3-clause
millerdev/django-nose,millerdev/django-nose,harukaeru/django-nose,dgladkov/django-nose,sociateru/django-nose,360youlun/django-nose,mzdaniel/django-nose,brilliant-org/django-nose,sociateru/django-nose,dgladkov/django-nose,krinart/django-nose,fabiosantoscode/django-nose-123-fix,mzdaniel/django-nose,franciscoruiz/django-n...
--- +++ @@ -17,10 +17,16 @@ zip_safe=False, install_requires=['nose'], tests_require=['Django', 'south'], - entry_points=""" - [nose.plugins.0.10] - fixture_bundler = django_nose.fixture_bundling:FixtureBundlingPlugin - """, + # This blows up tox runs that install django-nose...
da10b6baa19c1ef3a5f875297187e7248b7460b1
setup.py
setup.py
#!/usr/bin/env python from setuptools import setup, find_packages import sys long_description = '' if 'upload' in sys.argv: with open('README.rst') as f: long_description = f.read() def extras_require(): return { 'test': [ 'tox>=2.0', 'pytest>=2.8.5', 'pyt...
#!/usr/bin/env python from setuptools import setup, find_packages import sys long_description = '' if 'upload' in sys.argv: with open('README.rst') as f: long_description = f.read() def extras_require(): return { 'test': [ 'tox>=2.0', 'pytest>=2.8.5', 'pyt...
Use PEP 508 version markers.
BLD: Use PEP 508 version markers. So that environment tooling, e.g. `pipenv` can use the python version markers when determining dependencies.
Python
apache-2.0
ssanderson/interface
--- +++ @@ -21,12 +21,11 @@ def install_requires(): - requires = ['six'] - if sys.version_info[:2] < (3, 5): - requires.append("typing>=3.5.2") - if sys.version_info[0] == 2: - requires.append("funcsigs>=1.0.2") - return requires + return [ + 'six', + 'typing>=3.5.2;pyt...
0458cc6e41b55bdd6e393c517492a5f6631a51c9
setup.py
setup.py
from setuptools import setup, find_packages import sys, os PACKAGE = 'mtdna' VERSION = open(os.path.join(os.path.dirname(os.path.realpath(__file__)),'oldowan', PACKAGE, 'VERSION')).read().strip() desc_lines = open('README', 'r').readlines() setup(name='oldowan.%s' % PACKAGE, version=VERSION, description...
from setuptools import setup, find_packages import sys, os PACKAGE = 'mtdna' VERSION = open(os.path.join(os.path.dirname(os.path.realpath(__file__)),'oldowan', PACKAGE, 'VERSION')).read().strip() desc_lines = open('README', 'r').readlines() setup(name='oldowan.%s' % PACKAGE, version=VERSION, description...
Fix package data so that VERSION file actually gets installed
Fix package data so that VERSION file actually gets installed
Python
mit
ryanraaum/oldowan.mtdna
--- +++ @@ -26,7 +26,7 @@ url='http://www.raaum.org/software/oldowan', license='MIT', packages=find_packages(exclude=['ez_setup', 'examples', 'tests']), - include_package_data=False, + include_package_data=True, namespace_packages = ['oldowan'], data_files=[("oldowan/%s" %...
0309dbd25b6d7603aba5f0cf686e9d049716b711
setup.py
setup.py
import os from setuptools import setup def read(fname): return open(os.path.join(os.path.dirname(__file__), fname)).read() setup( name="feedinlib", version="0.1.0dev", description="Creating time series from pv or wind power plants.", url="http://github.com/oemof/feedinlib", author="oemof dev...
import os from setuptools import setup def read(fname): return open(os.path.join(os.path.dirname(__file__), fname)).read() setup( name="feedinlib", version="0.1.0dev", description="Creating time series from pv or wind power plants.", url="http://github.com/oemof/feedinlib", author="oemof dev...
Add `"shapely"` dependency to extra requirements
Add `"shapely"` dependency to extra requirements Also, `"nbformat"` is a dependency of `"jupyter"` so we don't need to specify both.
Python
mit
oemof/feedinlib
--- +++ @@ -29,7 +29,7 @@ "xarray >= 0.12.0", ], extras_require={ - "dev": ["pytest", "jupyter", "sphinx_rtd_theme", "nbformat"], - "examples": ["jupyter"], + "dev": ["jupyter", "pytest", "shapely", "sphinx_rtd_theme"], + "examples": ["jupyter", "shapely"], }, )
b78c634069354565cf749ed139cade244415b5a4
setup.py
setup.py
import os from setuptools import setup longDesc = "" if os.path.exists("README.rst"): longDesc = open("README.rst").read().strip() setup( name = "pytesseract", version = "0.1.6", author = "Samuel Hoffstaetter", author_email="", maintainer = "Matthias Lee", maintainer_email = "pytesseract@mad...
import os from setuptools import setup longDesc = "" if os.path.exists("README.rst"): longDesc = open("README.rst").read().strip() setup( name = "pytesseract", version = "0.1.6", author = "Samuel Hoffstaetter", author_email="pytesseract@madmaze.net", maintainer = "Matthias Lee", maintainer_e...
Include author email since it's required info
Include author email since it's required info Same as maintainer email, because the author email is unknown
Python
apache-2.0
madmaze/pytesseract
--- +++ @@ -10,7 +10,7 @@ name = "pytesseract", version = "0.1.6", author = "Samuel Hoffstaetter", - author_email="", + author_email="pytesseract@madmaze.net", maintainer = "Matthias Lee", maintainer_email = "pytesseract@madmaze.net", description = ("Python-tesseract is a python wr...
ae1cf07cc703d85f3d3c77eab76c83baec17a74d
split.py
split.py
import re def split_string(string, seperator=' '): return string.split(seperator) def split_regex(string, seperator_pattern): return re.split(seperator_pattern, string) class FilterModule(object): ''' A filter to split a string into a list. ''' def filters(self): return { 'split'...
from ansible import errors import re def split_string(string, seperator=' '): try: return string.split(seperator) except Exception, e: raise errors.AnsibleFilterError('split plugin error: %s, string=%s' % str(e),str(string) ) def split_regex(string, seperator_pattern): try: return ...
Add standard Ansible exception handling
Add standard Ansible exception handling
Python
cc0-1.0
timraasveld/ansible-string-split-filter,ypid/ansible-string-split-filter
--- +++ @@ -1,10 +1,17 @@ +from ansible import errors import re def split_string(string, seperator=' '): - return string.split(seperator) + try: + return string.split(seperator) + except Exception, e: + raise errors.AnsibleFilterError('split plugin error: %s, string=%s' % str(e),str(string...
cfe77bd4fd40b58678fa56ec08b5f862d9f1781c
post.py
post.py
#!/usr/bin/env python # -*- coding: utf-8 -*- import cgi import sqlite3 import time import config def valid(qs): required_keys = ['title', 'comment', 'posted_by', 'localite', 'latitude', 'longitude'] return all([qs.has_key(k) for k in required_keys]) def post(title, comment, posted_by, localite, latitude, lo...
#!/usr/bin/env python # -*- coding: utf-8 -*- import cgi import sqlite3 import time import config def valid(qs): required_keys = ['title', 'comment', 'posted_by', 'localite', 'latitude', 'longitude'] return all([qs.has_key(k) for k in required_keys]) def post(title, comment, posted_by, localite, latitude, lo...
Modify created_at and updated_at to millisecond
Modify created_at and updated_at to millisecond
Python
mit
otknoy/michishiki_api_server
--- +++ @@ -12,7 +12,7 @@ def post(title, comment, posted_by, localite, latitude, longitude): rate = 0 - created_at = int(time.time()) + created_at = int(time.time()*1000) updated_at = created_at sql = u'insert into posts (id, title, comment, posted_by, localite, rate, latitude, longitude, c...
5bb9b2c9d5df410c85f4736c17224aeb2f05dd33
s2v3.py
s2v3.py
from s2v2 import * def calculate_sum(data_sample): total = 0 for row in data_sample[1:]: # slice to start at row two, but I think we should only skip row 1 if we're importing the full csv (data_from_csv), but if we use the data w/ the header (my_csv) we'll be skipping a row that we're not supposed to skip (the actu...
from s2v2 import * def calculate_sum(data_sample): total = 0 for row in data_sample[1:]: # slice to start at row two, but I think we should only skip row 1 if we're importing the full csv (data_from_csv), but if we use the data w/ the header (my_csv) we'll be skipping a row that we're not supposed to skip (the actu...
Update print result to use "," instead of "+" for context text
Update print result to use "," instead of "+" for context text
Python
mit
alexmilesyounger/ds_basics
--- +++ @@ -7,4 +7,4 @@ total += price return total -print('the sum total of prices for all ties in the dataset = ' + str(calculate_sum(data_from_csv))) # ok we're using the right import, but having two imports is confusing. +print('the sum total of prices for all ties in the dataset = ', calculate_sum(data_...
7b422b2432bc8db3034e39073d2efa0bd69ec35f
test.py
test.py
import time import urllib import RPi.GPIO as GPIO # GPIO input pin to use LPR_PIN = 3 # URL to get image from SOURCE = 'http://192.168.0.13:8080/photoaf.jpg' # Path to save image locally FILE = 'img.jpg' # Use GPIO pin numbers GPIO.setmode(GPIO.BCM) # Disable "Ports already in use" warning GPIO.setwarnings(False) # ...
import time import urllib import RPi.GPIO as GPIO # GPIO input pin to use LPR_PIN = 3 # URL to get image from SOURCE = 'http://192.168.0.13:8080/photoaf.jpg' # Path to save image locally FILE = 'img.jpg' # Use GPIO pin numbers GPIO.setmode(GPIO.BCM) # Disable "Ports already in use" warning GPIO.setwarnings(False) # ...
Add try statement to cleanup pins and invert pull/up down
Add try statement to cleanup pins and invert pull/up down
Python
mit
adampiskorski/lpr_poc
--- +++ @@ -15,23 +15,29 @@ # Disable "Ports already in use" warning GPIO.setwarnings(False) # Set the pin to be an input -GPIO.setup(LPR_PIN, GPIO.IN, pull_up_down=GPIO.PUD_DOWN) +GPIO.setup(LPR_PIN, GPIO.IN, pull_up_down=GPIO.PUD_UP) -# Only save the image once per gate opening -captured = False -# Main loop -...
75f6963082ed686f4d91ec8df3961048d9428c6b
test.py
test.py
import unittest from enigma import Enigma, Steckerbrett, Umkehrwalze, Walzen class RotorTestCase(unittest.TestCase): pass def run_tests(): runner = unittest.TextTestRunner() suite = unittest.TestLoader().loadTestsFromTestCase(RotorTestCase) runner.run(suite) if __name__ == '__main__': # pragma: ...
import unittest from enigma import Enigma, Steckerbrett, Umkehrwalze, Walzen class RotorTestCase(unittest.TestCase): def test_rotor_encoding(self): rotor = Walzen(wiring='EKMFLGDQVZNTOWYHXUSPAIBRCJ', notch='Q') self.assertEqual('E', rotor.encode('A')) def run_tests(): runner = unittest.Text...
Test if default rotor encodes forward properly
Test if default rotor encodes forward properly
Python
mit
ranisalt/enigma
--- +++ @@ -4,7 +4,9 @@ class RotorTestCase(unittest.TestCase): - pass + def test_rotor_encoding(self): + rotor = Walzen(wiring='EKMFLGDQVZNTOWYHXUSPAIBRCJ', notch='Q') + self.assertEqual('E', rotor.encode('A')) def run_tests():
3ba5b6491bf61e2d2919f05bbf5cef088a754aeb
molecule/default/tests/test_installation.py
molecule/default/tests/test_installation.py
""" Role tests """ import os import pytest from testinfra.utils.ansible_runner import AnsibleRunner testinfra_hosts = AnsibleRunner( os.environ['MOLECULE_INVENTORY_FILE']).get_hosts('all') @pytest.mark.parametrize('name', [ ('vsftpd'), ('db5.3-util'), ]) def test_installed_packages(host, name): """ ...
""" Role tests """ import os import pytest from testinfra.utils.ansible_runner import AnsibleRunner testinfra_hosts = AnsibleRunner( os.environ['MOLECULE_INVENTORY_FILE']).get_hosts('all') @pytest.mark.parametrize('name', [ ('vsftpd'), ('db5.3-util'), ]) def test_installed_packages(host, name): """ ...
Add nologin in expected user shell test
Add nologin in expected user shell test
Python
mit
infOpen/ansible-role-vsftpd
--- +++ @@ -62,4 +62,4 @@ ftp_user = host.user('ftp') assert ftp_user.exists - assert ftp_user.shell == '/bin/false' + assert ftp_user.shell in ['/usr/sbin/nologin', '/bin/false']
a8d873e178d45024db9c0ef6a25c6867424785f7
bindings/python/llvm/tests/base.py
bindings/python/llvm/tests/base.py
import os.path import unittest POSSIBLE_TEST_BINARIES = [ 'libreadline.so.5', 'libreadline.so.6', ] POSSIBLE_TEST_BINARY_PATHS = [ '/lib', '/usr/lib', '/usr/local/lib', ] class TestBase(unittest.TestCase): def get_test_binary(self): """Helper to obtain a test binary for object file te...
import os.path import unittest POSSIBLE_TEST_BINARIES = [ 'libreadline.so.5', 'libreadline.so.6', ] POSSIBLE_TEST_BINARY_PATHS = [ '/usr/lib/debug', '/lib', '/usr/lib', '/usr/local/lib', '/lib/i386-linux-gnu', ] class TestBase(unittest.TestCase): def get_test_binary(self): """...
Add some paths where to find test binary
[python] Add some paths where to find test binary Adds /usr/lib/debug early to list, as some systems (debian) have unstripped libs in there Adds /lib/i386-linux-gnu for systems that does multiarch (debian) git-svn-id: 0ff597fd157e6f4fc38580e8d64ab130330d2411@153174 91177308-0d34-0410-b5e6-96231b3b80d8
Python
bsd-2-clause
chubbymaggie/asap,chubbymaggie/asap,apple/swift-llvm,llvm-mirror/llvm,llvm-mirror/llvm,apple/swift-llvm,apple/swift-llvm,GPUOpen-Drivers/llvm,chubbymaggie/asap,GPUOpen-Drivers/llvm,dslab-epfl/asap,dslab-epfl/asap,dslab-epfl/asap,GPUOpen-Drivers/llvm,chubbymaggie/asap,apple/swift-llvm,llvm-mirror/llvm,dslab-epfl/asap,ch...
--- +++ @@ -7,9 +7,11 @@ ] POSSIBLE_TEST_BINARY_PATHS = [ + '/usr/lib/debug', '/lib', '/usr/lib', '/usr/local/lib', + '/lib/i386-linux-gnu', ] class TestBase(unittest.TestCase):
b15872bff28628c468d3d485eae2f79efba41160
worker/server/constants.py
worker/server/constants.py
#!/usr/bin/env python # -*- coding: utf-8 -*- ############################################################################### # Copyright Kitware Inc. # # Licensed under the Apache License, Version 2.0 ( the "License" ); # you may not use this file except in compliance with the License. # You may obtain a copy of ...
#!/usr/bin/env python # -*- coding: utf-8 -*- ############################################################################### # Copyright Kitware Inc. # # Licensed under the Apache License, Version 2.0 ( the "License" ); # you may not use this file except in compliance with the License. # You may obtain a copy of ...
Fix a misspelled variable name
Fix a misspelled variable name This appears to be unused anywhere in the source code.
Python
apache-2.0
girder/girder_worker,girder/girder_worker,girder/girder_worker
--- +++ @@ -21,7 +21,7 @@ DOCKER_DATA_VOLUME = '/mnt/girder_worker/data' # The path that will be mounted in docker containers for utility scripts -DOCKER_SCRIPTS_VOUME = '/mnt/girder_worker/scripts' +DOCKER_SCRIPTS_VOLUME = '/mnt/girder_worker/scripts' # Settings where plugin information is stored
b4c9b76d132668695b77d37d7db3071e629fcba7
makerscience_admin/models.py
makerscience_admin/models.py
# -*- coding: utf-8 -*- from django.db import models from solo.models import SingletonModel class MakerScienceStaticContent (SingletonModel): about = models.TextField(null=True, blank=True) about_team = models.TextField(null=True, blank=True) about_contact = models.TextField(null=True, blank=True) abou...
# -*- coding: utf-8 -*- from django.db import models from django.db.models.signals import post_delete from solo.models import SingletonModel from accounts.models import ObjectProfileLink from makerscience_forum.models import MakerSciencePost class MakerScienceStaticContent (SingletonModel): about = models.TextF...
Allow to clear useless instances
Allow to clear useless instances
Python
agpl-3.0
atiberghien/makerscience-server,atiberghien/makerscience-server
--- +++ @@ -1,6 +1,12 @@ # -*- coding: utf-8 -*- from django.db import models +from django.db.models.signals import post_delete + from solo.models import SingletonModel + +from accounts.models import ObjectProfileLink + +from makerscience_forum.models import MakerSciencePost class MakerScienceStaticContent (Sin...
9fa296bfad85b42c04c325f1dfdd1caaa31bbd1b
NSYSU.py
NSYSU.py
cast=["Cleese","Palin","Jones","Idle"] print(cast) cast.pop() print(cast) cast.extend(["Gillan","Chanpman"]) print(cast)
#test code cast=["Cleese","Palin","Jones","Idle"] print(cast) cast.pop() print(cast) cast.extend(["Gillan","Chanpman"]) print(cast)
Add modify code Google News Crawer
Add modify code Google News Crawer
Python
epl-1.0
KuChanTung/Python
--- +++ @@ -1,3 +1,4 @@ +#test code cast=["Cleese","Palin","Jones","Idle"] print(cast) cast.pop()
c3e81aee9852a94befdec9d9b2d3f9cd3d7914e2
dbaas/system/tasks.py
dbaas/system/tasks.py
# -*- coding: utf-8 -*- from dbaas.celery import app from util.decorators import only_one from models import CeleryHealthCheck #from celery.utils.log import get_task_logger #LOG = get_task_logger(__name__) import logging LOG = logging.getLogger(__name__) @app.task(bind=True) def set_celery_healthcheck_last_update...
# -*- coding: utf-8 -*- from dbaas.celery import app from util.decorators import only_one from models import CeleryHealthCheck from notification.models import TaskHistory import logging LOG = logging.getLogger(__name__) @app.task(bind=True) @only_one(key="celery_healthcheck_last_update", timeout=20) def set_celery_...
Change task to create a taskHistory object
Change task to create a taskHistory object
Python
bsd-3-clause
globocom/database-as-a-service,globocom/database-as-a-service,globocom/database-as-a-service,globocom/database-as-a-service
--- +++ @@ -1,11 +1,8 @@ # -*- coding: utf-8 -*- - from dbaas.celery import app from util.decorators import only_one from models import CeleryHealthCheck -#from celery.utils.log import get_task_logger - -#LOG = get_task_logger(__name__) +from notification.models import TaskHistory import logging LOG = logging...
c713273fe145418113d750579f8b135dc513c3b8
config.py
config.py
import os if os.environ.get('DATABASE_URL') is None: SQLALCHEMY_DATABASE_URI = 'sqlite:///meetup.db' else: SQLALCHEMY_DATABASE_URI = os.environ['DATABASE_URL'] SQLALCHEMY_TRACK_MODIFICATIONS = False # supress deprecation warning
import os SQLALCHEMY_DATABASE_URI = os.environ['DATABASE_URL'] SQLALCHEMY_TRACK_MODIFICATIONS = False # supress deprecation warning
Delete default case for SQLALCHEMY_DATABASE_URI
Delete default case for SQLALCHEMY_DATABASE_URI if user doesn't set it, he coud have some problems with SQLite
Python
mit
Stark-Mountain/meetup-facebook-bot,Stark-Mountain/meetup-facebook-bot
--- +++ @@ -1,9 +1,5 @@ import os -if os.environ.get('DATABASE_URL') is None: - SQLALCHEMY_DATABASE_URI = 'sqlite:///meetup.db' -else: - SQLALCHEMY_DATABASE_URI = os.environ['DATABASE_URL'] - +SQLALCHEMY_DATABASE_URI = os.environ['DATABASE_URL'] SQLALCHEMY_TRACK_MODIFICATIONS = False # supress deprecatio...
ac863c20ac4094168b07d6823241d55e985ba231
site.py
site.py
import sys from flask import Flask, render_template from flask_flatpages import FlatPages, flatpages from flask_frozen import Freezer DEBUG = True FLATPAGES_AUTO_RELOAD = DEBUG FLATPAGES_EXTENSION = '.md' FREEZER_DESTINATION = 'dist' app = Flask(__name__) app.config.from_object(__name__) pages = FlatPages(app) freez...
import sys from flask import Flask, render_template from flask_flatpages import FlatPages, flatpages from flask_frozen import Freezer DEBUG = True FLATPAGES_AUTO_RELOAD = DEBUG FLATPAGES_EXTENSION = '.md' FREEZER_DESTINATION = 'dist' app = Flask(__name__) app.config.from_object(__name__) pages = FlatPages(app) freez...
Create custom test for Jinja2
Create custom test for Jinja2
Python
mit
claudiopastorini/claudiopastorini.github.io,claudiopastorini/claudiopastorini.github.io,claudiopastorini/claudiopastorini.github.io
--- +++ @@ -39,6 +39,12 @@ page = pages.get_or_404("contatti") return render_template('page.html', page=page) + +@app.template_test("list") +def is_list(value): + return isinstance(value, list) + + if __name__ == '__main__': if len(sys.argv) > 1 and sys.argv[1] == "build": freezer.freeze...
c61d5e84863dd67b5b76ec8031e624642f4c957c
main.py
main.py
from .ide.command import plugin_unloaded from .ide.error import * from .ide.rebuild import * from .ide.server import * from .ide.settings import plugin_loaded from .ide.text_command import * from .ide.type_hints import * from .ide.utility import *
from .ide.auto_complete import * from .ide.command import plugin_unloaded from .ide.error import * from .ide.rebuild import * from .ide.server import * from .ide.settings import plugin_loaded from .ide.text_command import * from .ide.type_hints import *
Fix issue with wrong import
Fix issue with wrong import
Python
mit
b123400/purescript-ide-sublime
--- +++ @@ -1,3 +1,4 @@ +from .ide.auto_complete import * from .ide.command import plugin_unloaded from .ide.error import * from .ide.rebuild import * @@ -5,4 +6,3 @@ from .ide.settings import plugin_loaded from .ide.text_command import * from .ide.type_hints import * -from .ide.utility import *
a4013c7f33226915b3c1fb7863f3e96b24413591
main.py
main.py
# Copyright 2015, Google, Inc. # Licensed under the Apache License, Version 2.0 (the "License"); you may not use # this file except in compliance with the License. You may obtain a copy of the # License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable # law or agreed to in writing, software d...
# Copyright 2015, Google, Inc. # Licensed under the Apache License, Version 2.0 (the "License"); you may not use # this file except in compliance with the License. You may obtain a copy of the # License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable # law or agreed to in writing, software d...
Add Error Message To Server
Add Error Message To Server
Python
apache-2.0
bshaffer/appengine-python-vm-hello,googlearchive/appengine-python-vm-hello,bshaffer/appengine-python-vm-hello,googlearchive/appengine-python-vm-hello
--- +++ @@ -26,6 +26,7 @@ response = urllib2.urlopen(request) except urllib2.HTTPError, error: contents = error.read() + print ('Received error from Books API {}'.format(contents)) return str(contents) html = response.read() author = json.loads(html)['items'][0]['volum...
db136a4313c859495109e4ddaa0b715260526f63
webhooks/registry.py
webhooks/registry.py
import logging from django.conf import settings from django.utils.importlib import import_module __all__ = ('events', 'register', 'unregister') logger = logging.getLogger('webhooks') class AlreadyRegistered(Exception): pass class NotRegistered(Exception): pass class Events(dict): def register(self, eve...
import logging from django.conf import settings from django.utils.importlib import import_module __all__ = ('events', 'register', 'unregister') logger = logging.getLogger('webhooks') class AlreadyRegistered(Exception): pass class NotRegistered(Exception): pass class Events(dict): def register(self, eve...
Fix string formatting for NotRegistered exception
Fix string formatting for NotRegistered exception
Python
bsd-2-clause
chop-dbhi/django-webhooks,pombredanne/django-webhooks,pombredanne/django-webhooks,chop-dbhi/django-webhooks
--- +++ @@ -20,11 +20,10 @@ def unregister(self, event): if event not in self: - raise NotRegistered('event {0} not registered') + raise NotRegistered('event {0} not registered'.format(event)) del self[event] events = Events() - register = events.register unregister...
78be1f58d618077f42d04390baf97938d01df44f
models/analyze_pic_server.py
models/analyze_pic_server.py
# import analyze from analyze import check_blob_in_direct_path import os import sys sys.path.insert(0, os.getcwd()) from get_images_from_pi import get_image, get_image_x_times get_image() check_blob_in_direct_path(os.getcwd() + "/images/greg.jpg")
from analyze import check_blob_in_direct_path import os import sys sys.path.insert(0, os.getcwd()) from get_images_from_pi import get_image, get_image_x_times get_image() check_blob_in_direct_path(os.getcwd() + "/images/greg.jpg")
Delete line loading an unnecessary module
Delete line loading an unnecessary module
Python
mit
jwarshaw/RaspberryDrive
--- +++ @@ -1,4 +1,3 @@ -# import analyze from analyze import check_blob_in_direct_path import os import sys
4e75e742475236cf7358b4481a29a54eb607dd4d
spacy/tests/regression/test_issue850.py
spacy/tests/regression/test_issue850.py
''' Test Matcher matches with '*' operator and Boolean flag ''' from __future__ import unicode_literals import pytest from ...matcher import Matcher from ...vocab import Vocab from ...attrs import LOWER from ...tokens import Doc @pytest.mark.xfail def test_issue850(): matcher = Matcher(Vocab()) IS_ANY_TOKEN ...
''' Test Matcher matches with '*' operator and Boolean flag ''' from __future__ import unicode_literals from __future__ import print_function import pytest from ...matcher import Matcher from ...vocab import Vocab from ...attrs import LOWER from ...tokens import Doc def test_basic_case(): matcher = Matcher(Vocab...
Update regression test for variable-length pattern problem in the matcher.
Update regression test for variable-length pattern problem in the matcher.
Python
mit
aikramer2/spaCy,oroszgy/spaCy.hu,raphael0202/spaCy,spacy-io/spaCy,explosion/spaCy,oroszgy/spaCy.hu,oroszgy/spaCy.hu,explosion/spaCy,recognai/spaCy,raphael0202/spaCy,recognai/spaCy,honnibal/spaCy,raphael0202/spaCy,recognai/spaCy,honnibal/spaCy,aikramer2/spaCy,raphael0202/spaCy,explosion/spaCy,honnibal/spaCy,Gregory-Howa...
--- +++ @@ -2,6 +2,7 @@ Test Matcher matches with '*' operator and Boolean flag ''' from __future__ import unicode_literals +from __future__ import print_function import pytest from ...matcher import Matcher @@ -10,9 +11,30 @@ from ...tokens import Doc +def test_basic_case(): + matcher = Matcher(Vocab(...
aa8a54c765ace8f4aa3a88fd7a956d481b1484a2
scrapi/util/__init__.py
scrapi/util/__init__.py
import os import errno import importlib from scrapi import settings def import_consumer(consumer_name): # TODO Make suer that consumer_name will always import the correct module return importlib.import_module('scrapi.consumers.{}'.format(consumer_name)) def build_norm_dir(consumer_name, timestamp, norm_doc...
import os import errno import importlib from urllib2 import quote def import_consumer(consumer_name): # TODO Make suer that consumer_name will always import the correct module return importlib.import_module('scrapi.consumers.{}'.format(consumer_name)) # :: Str -> Str def doc_id_to_path(doc_id): replacem...
Move some functionality into the storage module
Move some functionality into the storage module
Python
apache-2.0
alexgarciac/scrapi,erinspace/scrapi,icereval/scrapi,mehanig/scrapi,erinspace/scrapi,mehanig/scrapi,jeffreyliu3230/scrapi,ostwald/scrapi,CenterForOpenScience/scrapi,felliott/scrapi,CenterForOpenScience/scrapi,fabianvf/scrapi,fabianvf/scrapi,felliott/scrapi
--- +++ @@ -1,8 +1,7 @@ import os import errno import importlib - -from scrapi import settings +from urllib2 import quote def import_consumer(consumer_name): @@ -10,17 +9,15 @@ return importlib.import_module('scrapi.consumers.{}'.format(consumer_name)) -def build_norm_dir(consumer_name, timestamp, no...
fa8783f3307582dafcf636f5c94a7e4cff05724b
bin/tree_print_fasta_names.py
bin/tree_print_fasta_names.py
#! /usr/bin/env python3 import os import shutil import datetime import sys import argparse from ete3 import Tree import logging DEFAULT_FORMAT = 1 class TreeIndex: def __init__(self,tree_newick_fn,format=DEFAULT_FORMAT): self.tree_newick_fn=tree_newick_fn self.tree=read_newick(tree_newick_fn,format=format) ...
#! /usr/bin/env python3 import os import shutil import datetime import sys from ete3 import Tree DEFAULT_FORMAT = 1 class TreeIndex: def __init__(self,tree_newick_fn,format=DEFAULT_FORMAT): self.tree_newick_fn=tree_newick_fn self.tree=Tree(tree_newick_fn,format=format) def process_node(self,node): if node...
Fix error in loading trees
Fix error in loading trees Former-commit-id: 6fda03a47c5fa2d65c143ebdd81e158ba5e1ccda
Python
mit
karel-brinda/prophyle,karel-brinda/prophyle,karel-brinda/prophyle,karel-brinda/prophyle
--- +++ @@ -4,11 +4,8 @@ import shutil import datetime import sys -import argparse from ete3 import Tree - -import logging DEFAULT_FORMAT = 1 @@ -16,7 +13,7 @@ def __init__(self,tree_newick_fn,format=DEFAULT_FORMAT): self.tree_newick_fn=tree_newick_fn - self.tree=read_newick(tree_newick_fn,format=f...
a20c6d072d70c535ed1f116fc04016c834ea9c14
doc/en/_getdoctarget.py
doc/en/_getdoctarget.py
#!/usr/bin/env python import py def get_version_string(): fn = py.path.local(__file__).join("..", "..", "..", "_pytest", "__init__.py") for line in fn.readlines(): if "version" in line: return eval(line.split("=")[-1]) def get_minor_version_string(): ...
#!/usr/bin/env python import py def get_version_string(): fn = py.path.local(__file__).join("..", "..", "..", "_pytest", "__init__.py") for line in fn.readlines(): if "version" in line and not line.strip().startswith('#'): return eval(line.split("=")[-...
Fix getdoctarget to ignore comment lines
Fix getdoctarget to ignore comment lines
Python
mit
etataurov/pytest,gabrielcnr/pytest,mbirtwell/pytest,vodik/pytest,The-Compiler/pytest,omarkohl/pytest,Bjwebb/pytest,davidszotten/pytest,gabrielcnr/pytest,mdboom/pytest,ionelmc/pytest,malinoff/pytest,hpk42/pytest,tareqalayan/pytest,userzimmermann/pytest,rouge8/pytest,tgoodlet/pytest,abusalimov/pytest,bukzor/pytest,icemac...
--- +++ @@ -6,7 +6,7 @@ fn = py.path.local(__file__).join("..", "..", "..", "_pytest", "__init__.py") for line in fn.readlines(): - if "version" in line: + if "version" in line and not line.strip().startswith('#'): return eval(line.split("=")...
efd6fad89131c4d3070c68013ace77f11647bd68
opal/core/search/__init__.py
opal/core/search/__init__.py
""" OPAL core search package """ from opal.core.search import urls from opal.core import plugins from opal.core import celery # NOQA class SearchPlugin(plugins.OpalPlugin): """ The plugin entrypoint for OPAL's core search functionality """ urls = urls.urlpatterns javascripts = { 'opal.s...
""" OPAL core search package """ from opal.core import celery # NOQA from opal.core.search import plugin
Move Opal.core.search plugin into a plugins.py ahead of full plugin 2.0 refactor
Move Opal.core.search plugin into a plugins.py ahead of full plugin 2.0 refactor
Python
agpl-3.0
khchine5/opal,khchine5/opal,khchine5/opal
--- +++ @@ -1,30 +1,5 @@ """ OPAL core search package """ -from opal.core.search import urls -from opal.core import plugins - - from opal.core import celery # NOQA - - -class SearchPlugin(plugins.OpalPlugin): - """ - The plugin entrypoint for OPAL's core search functionality - """ - urls = urls.urlpa...
56a8b900570200e63ee460dd7e2962cba2450b16
preparation/tools/build_assets.py
preparation/tools/build_assets.py
from copy import copy import argparse from preparation.resources.Resource import names_registered, resource_by_name from hb_res.storage import get_storage, ExplanationStorage def generate_asset(resource, out_storage: ExplanationStorage): out_storage.clear() for explanation in resource: r = copy(expla...
from copy import copy import argparse from preparation.resources.Resource import names_registered, resource_by_name from hb_res.storage import get_storage, ExplanationStorage def generate_asset(resource, out_storage: ExplanationStorage): out_storage.clear() for explanation in resource: r = copy(expla...
Fix bug with 'all' argument
Fix bug with 'all' argument
Python
mit
hatbot-team/hatbot_resources
--- +++ @@ -43,7 +43,9 @@ if not isinstance(args, argparse.Namespace): parser = make_argparser() args = parser.parse_args(args) - assert all not in args.resources or len(args.resources) == 1 + assert 'all' not in args.resources or len(args.resources) == 1 + if 'all' in args.resources: ...
aae01cdcbd239397dad46b2d5fac91eb4219479f
project/apps/forum/serializers.py
project/apps/forum/serializers.py
# -*- coding: utf-8 -*- from __future__ import unicode_literals from machina.core.db.models import get_model from rest_framework import serializers Forum = get_model('forum', 'Forum') class ForumSerializer(serializers.ModelSerializer): description = serializers.SerializerMethodField() class Meta: ...
# -*- coding: utf-8 -*- from __future__ import unicode_literals from machina.core.db.models import get_model from rest_framework import serializers Forum = get_model('forum', 'Forum') class ForumSerializer(serializers.ModelSerializer): description = serializers.SerializerMethodField() previous_sibling = se...
Add siblings to forum serializer
Add siblings to forum serializer
Python
mit
ellmetha/machina-singlepageapp,ellmetha/machina-singlepageapp
--- +++ @@ -10,6 +10,8 @@ class ForumSerializer(serializers.ModelSerializer): description = serializers.SerializerMethodField() + previous_sibling = serializers.SerializerMethodField() + next_sibling = serializers.SerializerMethodField() class Meta: model = Forum @@ -17,7 +19,16 @@ ...
6167215e4ed49e8a4300f327d5b4ed4540d1a420
numba/tests/npyufunc/test_parallel_env_variable.py
numba/tests/npyufunc/test_parallel_env_variable.py
from numba.np.ufunc.parallel import get_thread_count from os import environ as env from numba.core import config import unittest class TestParallelEnvVariable(unittest.TestCase): """ Tests environment variables related to the underlying "parallel" functions for npyufuncs. """ _numba_parallel_test...
from numba.np.ufunc.parallel import get_thread_count from os import environ as env from numba.core import config import unittest class TestParallelEnvVariable(unittest.TestCase): """ Tests environment variables related to the underlying "parallel" functions for npyufuncs. """ _numba_parallel_test...
Fix the parallel env variable test to reset the env correctly
Fix the parallel env variable test to reset the env correctly
Python
bsd-2-clause
seibert/numba,seibert/numba,stonebig/numba,cpcloud/numba,sklam/numba,gmarkall/numba,stuartarchibald/numba,numba/numba,stonebig/numba,seibert/numba,stuartarchibald/numba,sklam/numba,gmarkall/numba,sklam/numba,sklam/numba,stonebig/numba,IntelLabs/numba,IntelLabs/numba,stuartarchibald/numba,cpcloud/numba,numba/numba,stuar...
--- +++ @@ -26,13 +26,13 @@ # This test should fail if threads have already been launched self.assertIn("Cannot set NUMBA_NUM_THREADS", e.args[0]) else: - try: - self.assertEqual(threads, str(get_thread_count())) - self.assertEqual(threads, s...
3681660935d77d392a7ed470a8e85470e33aaca0
extract_options.py
extract_options.py
from pymongo import MongoClient def main(): client = MongoClient() db = client.cityhotspots db.drop_collection('dineroptions') diners_collection = db.diners doc = {} diner_options_collection = db.dineroptions doc['categories'] = diners_collection.distinct('category') doc['cuisines'] =...
from pymongo import MongoClient def main(): client = MongoClient() db = client.cityhotspots db.drop_collection('dineroptions') diners_collection = db.diners doc = {} diner_options_collection = db.dineroptions doc['categories'] = diners_collection.distinct('category') doc['cuisines'] =...
Add min_price and max_price fields
Add min_price and max_price fields
Python
mit
earlwlkr/POICrawler
--- +++ @@ -12,6 +12,22 @@ doc['categories'] = diners_collection.distinct('category') doc['cuisines'] = diners_collection.distinct('cuisine') doc['districts'] = diners_collection.distinct('address.district') + + doc['max_price'] = list(diners_collection.aggregate([{ + "$group": + {...
504205d02ef2f5b66da225390fdb34b8b736ce57
ideascube/migrations/0009_add_a_system_user.py
ideascube/migrations/0009_add_a_system_user.py
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.contrib.auth import get_user_model from django.db import migrations def add_user(*args): User = get_user_model() User(serial='__system__', full_name='System', password='!!').save() class Migration(migrations.Migration): depend...
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations def add_user(apps, *args): User = apps.get_model('ideascube', 'User') User(serial='__system__', full_name='System', password='!!').save() class Migration(migrations.Migration): dependencies = [ ('i...
Load user from migration registry when creating system user
Load user from migration registry when creating system user Always load models from the registry in migration files. I hate the idea of touching a migration already released, but this one prevents us from adding new properties to User. If we load the User directly (not from registry) when creating the user model, we'l...
Python
agpl-3.0
ideascube/ideascube,ideascube/ideascube,ideascube/ideascube,ideascube/ideascube
--- +++ @@ -1,12 +1,11 @@ # -*- coding: utf-8 -*- from __future__ import unicode_literals -from django.contrib.auth import get_user_model from django.db import migrations -def add_user(*args): - User = get_user_model() +def add_user(apps, *args): + User = apps.get_model('ideascube', 'User') User(s...
d8d2e4b763fbd7cedc42046f6f45395bf15caa79
samples/plugins/scenario/scenario_plugin.py
samples/plugins/scenario/scenario_plugin.py
# Copyright 2013: Mirantis Inc. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or ...
# Copyright 2013: Mirantis Inc. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or ...
Fix the scenario plugin sample
Fix the scenario plugin sample We forgot to fix scenario plugin sample when we were doing rally.task.scenario refactoring Change-Id: Iadbb960cf168bd3b9cd6c1881a5f7a8dffd7036f
Python
apache-2.0
group-policy/rally,eayunstack/rally,openstack/rally,amit0701/rally,paboldin/rally,eonpatapon/rally,cernops/rally,afaheem88/rally,yeming233/rally,vganapath/rally,gluke77/rally,aforalee/RRally,yeming233/rally,openstack/rally,gluke77/rally,gluke77/rally,eayunstack/rally,openstack/rally,aforalee/RRally,cernops/rally,group-...
--- +++ @@ -13,13 +13,14 @@ # License for the specific language governing permissions and limitations # under the License. -from rally.task.scenarios import base +from rally.plugins.openstack import scenario +from rally.task import atomic -class ScenarioPlugin(base.Scenario): +class ScenarioPlugin(scenario.Op...
68a621005c5a520b7a97c4cad462d43fb7f3aaed
paws/views.py
paws/views.py
from .request import Request from .response import Response, response import logging log = logging.getLogger() class View: def __call__(self, event, context): request = Request(event, context) resp = self.prepare(request) if resp: return resp kwargs = event.get('path...
from .request import Request from .response import Response, response import logging log = logging.getLogger() class View: def __call__(self, event, context): kwargs = event.get('pathParameters') or {} self.dispatch(request, **kwargs) def dispatch(self, request, **kwargs): func = g...
Break out dispatch, and drop prepare. Easier testing
Break out dispatch, and drop prepare. Easier testing
Python
bsd-3-clause
funkybob/paws
--- +++ @@ -9,11 +9,10 @@ class View: def __call__(self, event, context): - request = Request(event, context) - resp = self.prepare(request) - if resp: - return resp kwargs = event.get('pathParameters') or {} + self.dispatch(request, **kwargs) + + def dispatc...
af118bcc539b5db0b6daa9cf74777176df413e32
test/integration/022_bigquery_test/test_bigquery_adapter_specific.py
test/integration/022_bigquery_test/test_bigquery_adapter_specific.py
""""Test adapter specific config options.""" from test.integration.base import DBTIntegrationTest, use_profile import textwrap import yaml class TestBigqueryAdapterSpecific(DBTIntegrationTest): @property def schema(self): return "bigquery_test_022" @property def models(self): return ...
""""Test adapter specific config options.""" from test.integration.base import DBTIntegrationTest, use_profile import textwrap import yaml class TestBigqueryAdapterSpecific(DBTIntegrationTest): @property def schema(self): return "bigquery_test_022" @property def models(self): return ...
Check stdout with --debug for actual ddl
Check stdout with --debug for actual ddl
Python
apache-2.0
analyst-collective/dbt,analyst-collective/dbt
--- +++ @@ -31,8 +31,8 @@ @use_profile('bigquery') def test_bigquery_time_to_expiration(self): - results = self.run_dbt() + _, stdout = self.run_dbt_and_capture(['run', '--debug']) self.assertIn( 'expiration_timestamp: TIMESTAMP_ADD(CURRENT_TIMESTAMP(), INTERV...
901ebb52f82c518c11285e6a282e18ad6954cd96
python/scannerpy/stdlib/tensorflow.py
python/scannerpy/stdlib/tensorflow.py
from ..kernel import Kernel from scannerpy import DeviceType import tensorflow as tf class TensorFlowKernel(Kernel): def __init__(self, config): # If this is a CPU kernel, tell TF that it should not use # any GPUs for its graph operations cpu_only = True visible_device_list = [] ...
from ..kernel import Kernel from scannerpy import DeviceType import tensorflow as tf class TensorFlowKernel(Kernel): def __init__(self, config): # If this is a CPU kernel, tell TF that it should not use # any GPUs for its graph operations cpu_only = True visible_device_list = [] ...
Fix tf session not being set as default
Fix tf session not being set as default
Python
apache-2.0
scanner-research/scanner,scanner-research/scanner,scanner-research/scanner,scanner-research/scanner
--- +++ @@ -24,6 +24,7 @@ self.tf_config = tf_config self.graph = self.build_graph() self.sess = tf.Session(config=self.tf_config, graph=self.graph) + self.sess.as_default() self.protobufs = config.protobufs def close(self):
d4d448adff71b609d5efb269d1a9a2ea4aba3590
radio/templatetags/radio_js_config.py
radio/templatetags/radio_js_config.py
import random import json from django import template from django.conf import settings register = template.Library() # Build json value to pass as js config @register.simple_tag() def trunkplayer_js_config(user): js_settings = getattr(settings, 'JS_SETTINGS', None) js_json = {} if js_settings: fo...
import random import json from django import template from django.conf import settings from radio.models import SiteOption register = template.Library() # Build json value to pass as js config @register.simple_tag() def trunkplayer_js_config(user): js_settings = getattr(settings, 'JS_SETTINGS', None) js_jso...
Allow SiteOption to load into the JS
Allow SiteOption to load into the JS
Python
mit
ScanOC/trunk-player,ScanOC/trunk-player,ScanOC/trunk-player,ScanOC/trunk-player
--- +++ @@ -3,6 +3,8 @@ from django import template from django.conf import settings + +from radio.models import SiteOption register = template.Library() @@ -15,6 +17,8 @@ for setting in js_settings: set_val = getattr(settings, setting, '') js_json[setting] = set_va...
0a13a9a8a779102dbcb2beead7d8aa9143f4c79b
tests/pytests/unit/client/ssh/test_shell.py
tests/pytests/unit/client/ssh/test_shell.py
import os import subprocess import pytest import salt.client.ssh.shell as shell @pytest.fixture def keys(tmp_path): pub_key = tmp_path / "ssh" / "testkey.pub" priv_key = tmp_path / "ssh" / "testkey" yield {"pub_key": str(pub_key), "priv_key": str(priv_key)} @pytest.mark.skip_on_windows(reason="Windows ...
import subprocess import types import pytest import salt.client.ssh.shell as shell @pytest.fixture def keys(tmp_path): pub_key = tmp_path / "ssh" / "testkey.pub" priv_key = tmp_path / "ssh" / "testkey" return types.SimpleNamespace(pub_key=pub_key, priv_key=priv_key) @pytest.mark.skip_on_windows(reason=...
Use commit suggestion to use types
Use commit suggestion to use types Co-authored-by: Pedro Algarvio <4410d99cefe57ec2c2cdbd3f1d5cf862bb4fb6f8@algarvio.me>
Python
apache-2.0
saltstack/salt,saltstack/salt,saltstack/salt,saltstack/salt,saltstack/salt
--- +++ @@ -1,5 +1,5 @@ -import os import subprocess +import types import pytest import salt.client.ssh.shell as shell @@ -9,22 +9,20 @@ def keys(tmp_path): pub_key = tmp_path / "ssh" / "testkey.pub" priv_key = tmp_path / "ssh" / "testkey" - yield {"pub_key": str(pub_key), "priv_key": str(priv_key)...
09d780474d00f3a8f4c2295154d74dae2023c1d3
samples/storage_sample/storage/__init__.py
samples/storage_sample/storage/__init__.py
"""Common imports for generated storage client library.""" # pylint:disable=wildcard-import import pkgutil from apitools.base.py import * from storage_v1 import * from storage_v1_client import * from storage_v1_messages import * __path__ = pkgutil.extend_path(__path__, __name__)
"""Common imports for generated storage client library.""" # pylint:disable=wildcard-import import pkgutil from apitools.base.py import * from storage_v1_client import * from storage_v1_messages import * __path__ = pkgutil.extend_path(__path__, __name__)
Drop the CLI from the sample storage client imports.
Drop the CLI from the sample storage client imports.
Python
apache-2.0
cherba/apitools,craigcitro/apitools,b-daniels/apitools,betamos/apitools,kevinli7/apitools,houglum/apitools,pcostell/apitools,thobrla/apitools,google/apitools
--- +++ @@ -4,7 +4,6 @@ import pkgutil from apitools.base.py import * -from storage_v1 import * from storage_v1_client import * from storage_v1_messages import *
08d838e87bd92dacbbbfe31b19c628b9d3b271a8
src/plone.example/plone/example/todo.py
src/plone.example/plone/example/todo.py
# -*- encoding: utf-8 -*- from plone.dexterity.interfaces import IDexterityContent from plone.dexterity.interfaces import IFormFieldProvider from plone.server.api.service import Service from plone.supermodel import model from zope import schema from zope.component import adapter from zope.dublincore.annotatableadapter ...
# -*- encoding: utf-8 -*- from plone.dexterity.interfaces import IDexterityContent from plone.dexterity.interfaces import IFormFieldProvider from plone.server.api.service import Service from plone.supermodel import model from zope import schema from zope.component import adapter from zope.dublincore.annotatableadapter ...
Set default values for fields
Set default values for fields
Python
bsd-2-clause
plone/plone.server,plone/plone.server
--- +++ @@ -15,11 +15,13 @@ title=u"Title", required=False, description=u"It's a title", + default=u'' ) done = schema.Bool( title=u"Done", required=False, description=u"Has the task been completed?", + default=False )
9b5542836c85ba6c17be907ff3cb011b3e98b63a
basic.py
basic.py
import os; # needed for opening/compiling file import time; # needed for delay def getPath(allowCancel = True): """Ask the user for lilypond file path and return it as string. Takes one boolean argument as to whether message should say cancelling is allowed or not. Defaults to true, however this may not be suita...
import os; # needed for opening/compiling file import time; # needed for delay def getPath(allowCancel = True): """Ask the user for lilypond file path and return it as string. Takes one boolean argument as to whether message should say cancelling is allowed or not. Defaults to true, however this may not be suita...
Increase logwait to 10 instead of 5 secs
Increase logwait to 10 instead of 5 secs
Python
unlicense
RainCity471/lyCompiler
--- +++ @@ -11,7 +11,7 @@ path = raw_input(question); return path; -logwait = 5; # how long the program waits before opening the log +logwait = 10; # how long the program waits before opening the log answer = ""; path = ""; while path == "":
29a964a64230e26fca550e81a1ecba3dd782dfb1
python/vtd.py
python/vtd.py
import libvtd.trusted_system def UpdateTrustedSystem(file_name): """Make sure the TrustedSystem object is up to date.""" global my_system my_system = libvtd.trusted_system.TrustedSystem() my_system.AddFile(file_name)
import libvtd.trusted_system def UpdateTrustedSystem(file_name): """Make sure the TrustedSystem object is up to date.""" global my_system if 'my_system' not in globals(): my_system = libvtd.trusted_system.TrustedSystem() my_system.AddFile(file_name) my_system.Refresh()
Refresh system instead of clobbering it
Refresh system instead of clobbering it Otherwise, if we set the Contexts, they'll be gone before we can request the NextActions!
Python
apache-2.0
chiphogg/vim-vtd
--- +++ @@ -4,5 +4,7 @@ def UpdateTrustedSystem(file_name): """Make sure the TrustedSystem object is up to date.""" global my_system - my_system = libvtd.trusted_system.TrustedSystem() - my_system.AddFile(file_name) + if 'my_system' not in globals(): + my_system = libvtd.trusted_system.Trus...
b532ffff18e95b6014921d88b6df075e8ac2c4ec
problib/example1/__init__.py
problib/example1/__init__.py
from sympy import symbols, cos, sin, latex from mathdeck import rand, answer metadata = { 'author': 'Bob Hope', 'institution': 'University of Missouri', 'subject': 'algebra', 'minor subject': 'polynomial equations', 'tags': ['simplify','roots','intervals'] } r = rand.Random() # choose three random integers...
from sympy import symbols, cos, sin, latex from mathdeck import rand, answer metadata = { 'author': 'Bob Hope', 'institution': 'University of Missouri', 'subject': 'algebra', 'minor subject': 'polynomial equations', 'tags': ['simplify','roots','intervals'] } r = rand.Random() # choose three random integers...
Update mathdeck problib for new Answer refactoring
Update mathdeck problib for new Answer refactoring
Python
apache-2.0
patrickspencer/mathdeck,patrickspencer/mathdeck
--- +++ @@ -20,23 +20,20 @@ x = symbols('x') p = ((x-root1)*(x-root2)).expand(basic=True) -template_variables = { - 'p': latex(p), - } +func = cos(x)**2-sin(x)**2 -a1 = answer.Answer() -a1.value = cos(x)**2-sin(x)**2 -a1.type = 'function' -a1.variables = ['x'] -a1.domain = 'R' - -a2 = answer.Answer() -a2....