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 |
|---|---|---|---|---|---|---|---|---|---|---|
dec2d1ce9bf0be0fa8e00b004ee59bfb66d4444a | wordpaths.py | wordpaths.py |
import argparse
from wp.main import WordPath
def run(first_word, last_word):
word_path = WordPath()
word_path.load_word_list('tests/functional/misc/words', len(first_word))
chain = word_path.find(first_word, last_word)
print(' > '.join(chain))
if __name__ == '__main__':
parser = argparse.Argum... | #!/usr/bin/python
import argparse
from wp.main import WordPath
def run(first_word, last_word):
word_path = WordPath()
word_path.load_word_list('tests/functional/misc/words', len(first_word))
chain = word_path.find(first_word, last_word)
print(' > '.join(chain))
if __name__ == '__main__':
parse... | Add shebang to main python script | Add shebang to main python script
| Python | mit | reinaldons/word_paths,reinaldons/word_paths | ---
+++
@@ -1,3 +1,4 @@
+#!/usr/bin/python
import argparse
|
05c203f5ec79054c6616a8f822ff20f2db0ae07b | trigger.py | trigger.py | import datetime
import time
def trigger(updateq):
current_time = datetime.datetime.now()
delta = datetime.timedelta(seconds=10)
while True:
time.sleep(10)
current_time += delta
updateq.put("update")
| import datetime
import time
def trigger(updateq):
current_time = datetime.datetime.now()
delta = datetime.timedelta(hours=1)
while True:
time.sleep(10)
current_time += delta
updateq.put("update")
| Make update interval equal to 1 hour | Make update interval equal to 1 hour
| Python | mit | Zloool/manyfaced-honeypot | ---
+++
@@ -4,7 +4,7 @@
def trigger(updateq):
current_time = datetime.datetime.now()
- delta = datetime.timedelta(seconds=10)
+ delta = datetime.timedelta(hours=1)
while True:
time.sleep(10)
current_time += delta |
b55676c4cfb2d662c9a82d17504db091449e3992 | setup.py | setup.py | from setuptools import setup, find_packages
setup(name='scattertext',
version='0.0.2.22',
description='An NLP package to visualize interesting terms in text.',
url='https://github.com/JasonKessler/scattertext',
author='Jason Kessler',
author_email='jason.kessler@gmail.com',
license=... | from setuptools import setup, find_packages
setup(name='scattertext',
version='0.0.2.22',
description='An NLP package to visualize interesting terms in text.',
url='https://github.com/JasonKessler/scattertext',
author='Jason Kessler',
author_email='jason.kessler@gmail.com',
license=... | Replace `sklearn` dependency with `scikit-learn` | Replace `sklearn` dependency with `scikit-learn`
`sklearn` isn't the package you're looking for; as https://pypi.python.org/pypi/sklearn politely notes, you should "use scikit-learn instead": https://pypi.python.org/pypi/scikit-learn/
It's unfortunate that the names of Python packages have nothing to do with their ... | Python | apache-2.0 | JasonKessler/scattertext,JasonKessler/scattertext,JasonKessler/scattertext,JasonKessler/scattertext | ---
+++
@@ -11,7 +11,7 @@
install_requires=[
'numpy',
'scipy',
- 'sklearn',
+ 'scikit-learn',
'pandas',
#'spacy',
#'jieba', |
3c44db39295945d544ba5a9fc20b2c5dddf4346d | nodeconductor/core/mixins.py | nodeconductor/core/mixins.py | from __future__ import unicode_literals
from rest_framework import mixins
from nodeconductor.core.models import SynchronizableMixin, SynchronizationStates
from nodeconductor.core.exceptions import IncorrectStateException
class ListModelMixin(mixins.ListModelMixin):
def __init__(self, *args, **kwargs):
i... | from __future__ import unicode_literals
from rest_framework import mixins
from nodeconductor.core.models import SynchronizableMixin, SynchronizationStates
from nodeconductor.core.exceptions import IncorrectStateException
class ListModelMixin(mixins.ListModelMixin):
def __init__(self, *args, **kwargs):
i... | Allow delete operation in NEW state | Allow delete operation in NEW state
- nc-1148
| Python | mit | opennode/nodeconductor,opennode/nodeconductor,opennode/nodeconductor | ---
+++
@@ -25,10 +25,15 @@
"""
def initial(self, request, *args, **kwargs):
- if self.action in ('update', 'partial_update', 'destroy'):
+ acceptable_states = {
+ 'update': SynchronizationStates.STABLE_STATES,
+ 'partial_update': SynchronizationStates.STABLE_STATES,
+ ... |
b6ccc6b6ae6c5fab45f7a27dbecbda88cc8775b8 | SplitNavigation.py | SplitNavigation.py | import sublime, sublime_plugin
class SplitNavigationCommand(sublime_plugin.TextCommand):
def run(self, edit, direction):
win = self.view.window()
num = win.num_groups()
act = win.active_group()
if direction == "up":
act = act + 1
else:
act = act - 1
win.focus_group(act % num)
| import sublime, sublime_plugin
def focusNext(win):
act = win.active_group()
num = win.num_groups()
act += 1
if act >= num:
act = 0
win.focus_group(act)
if len(win.views_in_group(act)) == 0:
focusNext(win)
def focusPrev(win):
act = win.active_group()
num = win.num_groups()
act -= 1
if act < 0:
act... | Fix some weird action when user navigates between blank groups. | Fix some weird action when user navigates between blank groups.
| Python | mit | oleander/sublime-split-navigation,oleander/sublime-split-navigation | ---
+++
@@ -1,13 +1,37 @@
import sublime, sublime_plugin
+def focusNext(win):
+ act = win.active_group()
+ num = win.num_groups()
+ act += 1
+
+ if act >= num:
+ act = 0
+
+ win.focus_group(act)
+
+ if len(win.views_in_group(act)) == 0:
+ focusNext(win)
+
+def focusPrev(win):
+ act = win.active_group()
+ num = ... |
08edbb1b723880ac81b63e5d1ca31c331f79b0a8 | awx/api/pagination.py | awx/api/pagination.py | # Copyright (c) 2015 Ansible, Inc.
# All Rights Reserved.
# Django REST Framework
from rest_framework import pagination
from rest_framework.utils.urls import replace_query_param
class Pagination(pagination.PageNumberPagination):
page_size_query_param = 'page_size'
def get_next_link(self):
if not se... | # Copyright (c) 2015 Ansible, Inc.
# All Rights Reserved.
# Django REST Framework
from rest_framework import pagination
from rest_framework.utils.urls import replace_query_param
class Pagination(pagination.PageNumberPagination):
page_size_query_param = 'page_size'
max_page_size = 200
def get_next_link(... | Set an upper limit of 200 on the max page size | Set an upper limit of 200 on the max page size
| Python | apache-2.0 | snahelou/awx,wwitzel3/awx,snahelou/awx,wwitzel3/awx,snahelou/awx,snahelou/awx,wwitzel3/awx,wwitzel3/awx | ---
+++
@@ -9,6 +9,7 @@
class Pagination(pagination.PageNumberPagination):
page_size_query_param = 'page_size'
+ max_page_size = 200
def get_next_link(self):
if not self.page.has_next(): |
32a3ab4f677086916bdba6e7a8be41c9e62d7da0 | appengine_config.py | appengine_config.py | """Configuration."""
import logging
import os
import re
from google.appengine.ext.appstats import recording
logging.info('Loading %s from %s', __name__, __file__)
# Custom webapp middleware to add Appstats.
def webapp_add_wsgi_middleware(app):
app = recording.appstats_wsgi_middleware(app)
return app
# Custom A... | """Configuration."""
import logging
import os
import re
from google.appengine.ext.appstats import recording
logging.info('Loading %s from %s', __name__, __file__)
# Custom webapp middleware to add Appstats.
def webapp_add_wsgi_middleware(app):
app = recording.appstats_wsgi_middleware(app)
return app
# Custom A... | Improve custom appstats path normalization. | Improve custom appstats path normalization.
| Python | apache-2.0 | ligthyear/quick-check,ligthyear/quick-check | ---
+++
@@ -19,6 +19,12 @@
return '/user/X'
if path.startswith('/user_popup/'):
return '/user_popup/X'
+ if '/diff/' in path:
+ return '/X/diff/...'
+ if '/diff2/' in path:
+ return '/X/diff2/...'
+ if '/patch/' in path:
+ return '/X/patch/...'
if path.startswith('/... |
e5d31386cc8e37a4d2b7863865659dd3e956200f | setup.py | setup.py | import os
from setuptools import setup, find_packages
def read(filename):
return open(os.path.join(os.path.dirname(__file__), filename)).read()
setup(
name='gears-coffeescript',
version='0.1',
url='https://github.com/gears/gears-coffeescript',
license='ISC',
author='Mike Yumatov',
author... | import os
from setuptools import setup, find_packages
def read(filename):
return open(os.path.join(os.path.dirname(__file__), filename)).read()
setup(
name='gears-coffeescript',
version='0.1',
url='https://github.com/gears/gears-coffeescript',
license='ISC',
author='Mike Yumatov',
author... | Drop Python 2.5 support, add support for Python 3.2 | Drop Python 2.5 support, add support for Python 3.2
| Python | isc | gears/gears-coffeescript,gears/gears-coffeescript | ---
+++
@@ -23,8 +23,8 @@
'License :: OSI Approved :: ISC License (ISCL)',
'Operating System :: OS Independent',
'Programming Language :: Python',
- 'Programming Language :: Python :: 2.5',
'Programming Language :: Python :: 2.6',
'Programming Language :: Python :: ... |
905ddcef2652c53e39669d5d8e861924751fc802 | setup.py | setup.py |
from setuptools import setup
setup(name = 'OWSLib',
version = '0.1.0',
description = 'OGC Web Service utility library',
license = 'GPL',
keywords = 'gis ogc ows wfs wms capabilities metadata',
author = 'Sean Gillies',
author_email = 'sgillies@fri... |
from setuptools import setup
setup(name = 'OWSLib',
version = '0.2.0',
description = 'OGC Web Service utility library',
license = 'BSD',
keywords = 'gis ogc ows wfs wms capabilities metadata',
author = 'Sean Gillies',
author_email = 'sgillies@fri... | Change version and license for 0.2 | Change version and license for 0.2
| Python | bsd-3-clause | ocefpaf/OWSLib,bird-house/OWSLib,kwilcox/OWSLib,daf/OWSLib,jaygoldfinch/OWSLib,daf/OWSLib,QuLogic/OWSLib,datagovuk/OWSLib,Jenselme/OWSLib,dblodgett-usgs/OWSLib,datagovuk/OWSLib,tomkralidis/OWSLib,b-cube/OWSLib,menegon/OWSLib,kalxas/OWSLib,mbertrand/OWSLib,robmcmullen/OWSLib,geopython/OWSLib,gfusca/OWSLib,jachym/OWSLib,... | ---
+++
@@ -2,9 +2,9 @@
from setuptools import setup
setup(name = 'OWSLib',
- version = '0.1.0',
+ version = '0.2.0',
description = 'OGC Web Service utility library',
- license = 'GPL',
+ license = 'BSD',
keywords = 'gis ogc ows wfs wms cap... |
e76687949dd8b14a6e4f4f6168cfcbe49c763b5d | setup.py | setup.py | #!/usr/bin/env python
from setuptools import setup, find_packages
with open('requirements.txt') as fobj:
requirements = [l.strip() for l in fobj.readlines()]
setup(
name='cnns',
version='1.0',
description='Runs CNNs',
url='https://git.km3net.de/mmoser/OrcaNet',
author='Michael Moser',
auth... | #!/usr/bin/env python
from setuptools import setup, find_packages
with open('requirements.txt') as fobj:
requirements = [l.strip() for l in fobj.readlines()]
setup(
name='cnns',
version='1.0',
description='Runs Neural Networks for usage in the KM3NeT project',
url='https://git.km3net.de/mmoser/Orc... | Change description and add second mail address. | Change description and add second mail address.
| Python | agpl-3.0 | ViaFerrata/DL_pipeline_TauAppearance,ViaFerrata/DL_pipeline_TauAppearance | ---
+++
@@ -7,10 +7,10 @@
setup(
name='cnns',
version='1.0',
- description='Runs CNNs',
+ description='Runs Neural Networks for usage in the KM3NeT project',
url='https://git.km3net.de/mmoser/OrcaNet',
author='Michael Moser',
- author_email='mmoser@km3net.de',
+ author_email='mmoser@k... |
b3bfd60643a670ca1ab590f539d1c96e95e3623b | setup.py | setup.py | # This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
from setuptools import setup
import os
setup(
name='openhim-report-tasks',
version='0.1.0',
author='Jembi He... | # This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
from setuptools import setup
import os
setup(
name='openhim-report-tasks',
version='0.1.0',
author='Jembi He... | Set script permissions during install | Set script permissions during install
| Python | mpl-2.0 | jembi/openhim-report-tasks | ---
+++
@@ -23,3 +23,7 @@
# Setup /etc source conf files
with open('/etc/openhim-report-tasks.source', 'w') as src:
src.write(os.getcwd())
+
+# Cron script permissions
+os.chmod('/etc/cron.daily/openhim_reports.sh', 0755)
+os.chmod('/etc/cron.hourly/openhim_alerts.sh', 0755) |
ed3bc448cf3d9d9c4562df0d9dbe20de01e5f104 | setup.py | setup.py | from setuptools import setup
setup(
name='beets-alternatives',
version='0.8.3-dev',
description='beets plugin to manage multiple files',
long_description=open('README.md').read(),
author='Thomas Scholtes',
author_email='thomas-scholtes@gmx.de',
url='http://www.github.com/geigerzaehler/beets... | from setuptools import setup
setup(
name='beets-alternatives',
version='0.8.3-dev',
description='beets plugin to manage multiple files',
long_description=open('README.md').read(),
author='Thomas Scholtes',
author_email='thomas-scholtes@gmx.de',
url='http://www.github.com/geigerzaehler/beets... | Update classifiers; conditionally require `futures` on Python 2 | Update classifiers; conditionally require `futures` on Python 2
The `concurrent` library is part of Python 3 stdlib, by requiring
futures we would fetch the old py2 version which causes syntax errors on py3.
| Python | mit | geigerzaehler/beets-alternatives | ---
+++
@@ -17,7 +17,7 @@
install_requires=[
'beets>=1.4.7',
- 'futures',
+ 'futures; python_version<"3"',
],
classifiers=[
@@ -26,7 +26,11 @@
'License :: OSI Approved :: MIT License',
'Environment :: Console',
'Programming Language :: Python :: 2',... |
5bee4a276cdfa221345b88c80e29fcb4c68fe1cc | setup.py | setup.py | from setuptools import setup
setup(
name='tattle',
version='0.1.2',
packages=[
'tattle',
],
url='https://github.com/cloudify-cosmo/tattle',
author='Gigaspaces',
author_email='cosmo-admin@gigaspaces.com',
entry_points={
'console_scripts': [
'tattle = tattle.en... | from setuptools import setup
setup(
name='tattle',
version='0.1.2',
packages=[
'tattle',
],
url='https://github.com/cloudify-cosmo/tattle',
author='Gigaspaces',
author_email='cosmo-admin@gigaspaces.com',
entry_points={
'console_scripts': [
'tattle = tattle.en... | Change pyyaml requirement to >=3.10 | Change pyyaml requirement to >=3.10
| Python | apache-2.0 | cloudify-cosmo/tattle | ---
+++
@@ -16,6 +16,6 @@
},
install_requires=[
'requests>=2.5.4.1',
- 'pyyaml>=3.11'
+ 'pyyaml>=3.10'
],
) |
4a119842061152700f16fe24ba10c07cdf706d3a | setup.py | setup.py | try:
from setuptools import setup
except ImportError:
from distutils.core import setup
readme = open('README.rst').read()
requirements = {
"package": [
"PyYAML",
],
"test": [
"nose",
"mock",
"pytest",
"pytest-mock",
"pytest-pudb",
],
"setup":... | try:
from setuptools import setup
except ImportError:
from distutils.core import setup
readme = open('README.rst').read()
requirements = {
"package": [
"PyYAML",
],
"test": [
"nose",
"mock",
"pytest",
"pytest-mock",
"pytest-pudb",
],
"setup":... | Fix Missing Extension from package | Fix Missing Extension from package
| Python | mit | KyleJamesWalker/yamlsettings | ---
+++
@@ -25,13 +25,13 @@
setup(
name='yamlsettings',
- version='1.0.0',
+ version='1.0.1',
description='Yaml Settings Configuration Module',
long_description=readme,
author='Kyle James Walker',
author_email='KyleJamesWalker@gmail.com',
url='https://github.com/KyleJamesWalker/... |
db4214890b2f71c9bb7da760d726924a831eb609 | setup.py | setup.py | from setuptools import setup
setup(name='mypytools',
version='0.1.13',
description='A bundle of tools to make using mypy easier',
url='https://github.com/nylas/mypy-tools',
license='MIT',
install_requires=[
'click',
'findimports',
'typing',
'watchdo... | from setuptools import setup
setup(name='mypytools',
version='0.1.14',
description='A bundle of tools to make using mypy easier',
url='https://github.com/nylas/mypy-tools',
license='MIT',
install_requires=[
'click',
'findimports',
'typing',
'watchdo... | Bump package version to 0.1.14 | Bump package version to 0.1.14
| Python | mit | nylas/mypy-tools,nylas/mypy-tools | ---
+++
@@ -1,7 +1,7 @@
from setuptools import setup
setup(name='mypytools',
- version='0.1.13',
+ version='0.1.14',
description='A bundle of tools to make using mypy easier',
url='https://github.com/nylas/mypy-tools',
license='MIT', |
dfe29829fc64f07fb8c3c5fbf8739b9bdb89e721 | setup.py | setup.py | import os
from setuptools import setup, find_packages
import io
current_dir = os.path.dirname(os.path.abspath(__file__))
with io.open(os.path.join(current_dir, "README.rst"), "rt") as f:
long_desc = f.read()
setup(
name="monty",
packages=find_packages(),
version="2.0.1",
install_requires=["six"],... | import os
from setuptools import setup, find_packages
import io
current_dir = os.path.dirname(os.path.abspath(__file__))
with io.open(os.path.join(current_dir, "README.rst"), "rt") as f:
long_desc = f.read()
setup(
name="monty",
packages=find_packages(),
version="2.0.1",
install_requires=["six"],... | Add 3,7 and 3.8 to pytthon. | Add 3,7 and 3.8 to pytthon.
| Python | mit | davidwaroquiers/monty,materialsvirtuallab/monty,gmatteo/monty,davidwaroquiers/monty,materialsvirtuallab/monty,gmatteo/monty | ---
+++
@@ -30,6 +30,8 @@
"Programming Language :: Python :: 3.4",
"Programming Language :: Python :: 3.5",
"Programming Language :: Python :: 3.6",
+ "Programming Language :: Python :: 3.7",
+ "Programming Language :: Python :: 3.8",
"Development Status :: 4 - Beta",... |
0f7e40d28d932db7e87c40c32ddcbd0d59ae9edf | setup.py | setup.py | #!/usr/bin/env python
try:
from setuptools import setup
except ImportError:
from distutils.core import setup
readme = open('README.rst').read()
history = open('HISTORY.rst').read().replace('.. :changelog:', '')
setup(
name='binaryornot',
version='0.4.0',
description=(
'Ultra-lightweight ... | #!/usr/bin/env python
try:
from setuptools import setup
except ImportError:
from distutils.core import setup
with open('README.rst') as readme_file:
readme = readme_file.read()
with open('HISTORY.rst') as history_file:
history = history_file.read().replace('.. :changelog:', '')
setup(
name='bin... | Use context manager for file opening/reading. | Use context manager for file opening/reading.
| Python | bsd-3-clause | audreyr/binaryornot,audreyr/binaryornot,audreyr/binaryornot | ---
+++
@@ -6,8 +6,11 @@
from distutils.core import setup
-readme = open('README.rst').read()
-history = open('HISTORY.rst').read().replace('.. :changelog:', '')
+with open('README.rst') as readme_file:
+ readme = readme_file.read()
+
+with open('HISTORY.rst') as history_file:
+ history = history_file.... |
2b418376d455ec0645a16f5d6e8ed0e7da54d2b5 | setup.py | setup.py | #!/usr/bin/env python
from setuptools import setup
# pypi doesn't like markdown
# https://github.com/pypa/packaging-problems/issues/46
try:
import pypandoc
description = pypandoc.convert('README.md', 'rst')
except (IOError, ImportError):
description = ''
setup(
name='qbatch',
version='2.0.2',
... | #!/usr/bin/env python
from setuptools import setup
# pypi doesn't like markdown
# https://github.com/pypa/packaging-problems/issues/46
try:
import pypandoc
description = pypandoc.convert('README.md', 'rst')
except (IOError, ImportError):
description = ''
setup(
name='qbatch',
version='2.1',
d... | Add install depends, bump version number | Add install depends, bump version number
| Python | unlicense | gdevenyi/qbatch,pipitone/qbatch | ---
+++
@@ -12,7 +12,7 @@
setup(
name='qbatch',
- version='2.0.2',
+ version='2.1',
description='Execute shell command lines in parallel on Slurm, S(sun|on of) Grid Engine (SGE) and PBS/Torque clusters',
author="Jon Pipitone, Gabriel A. Devenyi",
author_email="jon@pipitone.ca, gdevenyi@gm... |
b17a248e0ffc3992cabd19552697d60ee34eac91 | setup.py | setup.py | from setuptools import setup
setup(
name='polygraph',
version='0.1.0',
description='Python library for defining GraphQL schemas',
url='https://github.com/yen223/polygraph/',
author='Wei Yen, Lee',
author_email='hello@weiyen.net',
license='MIT',
install_requires=[
'graphql-core>... | from setuptools import setup
setup(
name='polygraph',
version='0.1.0',
description='Python library for defining GraphQL schemas',
url='https://github.com/yen223/polygraph/',
author='Wei Yen, Lee',
author_email='hello@weiyen.net',
license='MIT',
install_requires=[
'graphql-core>... | Add twine as a dev dependency | Add twine as a dev dependency
For PyPI packaging
| Python | mit | polygraph-python/polygraph | ---
+++
@@ -18,6 +18,7 @@
'ipython',
'autopep8',
'isort',
+ 'twine==1.8.1',
]
}
) |
cbb72c027df55d2c9098eea7c89b756564d73b08 | setup.py | setup.py | import os
from setuptools import setup, find_packages
def read_file(filename):
"""Read a file into a string"""
path = os.path.abspath(os.path.dirname(__file__))
filepath = os.path.join(path, filename)
try:
return open(filepath).read()
except IOError:
return ''
setup(
name='dj... | import os
from setuptools import setup, find_packages
def read_file(filename):
"""Read a file into a string"""
path = os.path.abspath(os.path.dirname(__file__))
filepath = os.path.join(path, filename)
try:
return open(filepath).read()
except IOError:
return ''
setup(
name='dj... | Add more classifiers for PyPi | Add more classifiers for PyPi
| Python | mit | katylava/django-hijackemail,zhuyue1314/django-hijackemail | ---
+++
@@ -23,14 +23,17 @@
license='MIT',
description=u' '.join(__import__('hijackemail').__doc__.splitlines()).strip(),
classifiers=[
- 'Topic :: Internet :: WWW/HTTP :: Dynamic Content',
+ 'Development Status :: 5 - Production/Stable',
+ 'Framework :: Django',
'Intended... |
9f17c731fca8c5339c86ed03336cefa756c6c98a | setup.py | setup.py | """setup.py
.. codeauthor:: John Lane <jlane@fanthreesixty.com>
"""
from setuptools import setup
from pytest_needle import __author__, __email__, __license__, __version__
setup(name='pytest-needle',
version=__version__,
description='pytest plugin for visual testing websites using selenium',
autho... | """setup.py
.. codeauthor:: John Lane <jlane@fanthreesixty.com>
"""
from setuptools import setup
from pytest_needle import __author__, __email__, __license__, __version__
setup(name='pytest-needle',
version=__version__,
description='pytest plugin for visual testing websites using selenium',
autho... | Update requirements and development status | Update requirements and development status
| Python | mit | jlane9/pytest-needle,jlane9/pytest-needle | ---
+++
@@ -16,11 +16,11 @@
url=u'https://github.com/jlane9/pytest-needle',
packages=['pytest_needle'],
entry_points={'pytest11': ['needle = pytest_needle.plugin', ]},
- install_requires=['pytest>=2.7', 'needle'],
+ install_requires=['pytest>=3.0.0,<4.0.0', 'needle>=0.5.0,<0.6.0', 'pyte... |
dbdf844f97feb69d405618271af943d17c4363cb | setup.py | setup.py | # There is a conflict with older versions on EL 6
__requires__ = ['PasteDeploy>=1.5.0',
'WebOb>=1.2b3',
]
import os
from setuptools import setup, find_packages
here = os.path.abspath(os.path.dirname(__file__))
README = open(os.path.join(here, 'README')).read()
CHANGES = open(os.path.j... | # There is a conflict with older versions on EL 6
__requires__ = ['PasteDeploy>=1.5.0',
'WebOb>=1.2b3',
]
import os
from setuptools import setup, find_packages
here = os.path.abspath(os.path.dirname(__file__))
README = open(os.path.join(here, 'README')).read()
CHANGES = open(os.path.j... | Rename the DB initialization script | scripts: Rename the DB initialization script
We'll have other scripts, prefixing them all by the app name will be
nicer to admins.
| Python | agpl-3.0 | network-box/uptrack,network-box/uptrack | ---
+++
@@ -45,6 +45,6 @@
[paste.app_factory]
main = uptrack:main
[console_scripts]
- initialize_uptrack_db = uptrack.scripts.initializedb:main
+ uptrack-initdb = uptrack.scripts.initializedb:main
""",
) |
ec975fa105eb2238661d6e29e7cb004560a5ede7 | setup.py | setup.py | from setuptools import setup, find_packages
setup(
name = 'infosystem',
version = '0.1.13',
summary = 'Infosystem Framework',
url = 'https://github.com/samueldmq/infosystem',
author = 'Samuel de Medeiros Queiroz',
author_email = 'samueldmq@gmail.com',
license = 'Apache-2',
packages = f... | from setuptools import setup, find_packages
setup(
name = 'infosystem',
version = '0.1.14',
summary = 'Infosystem Framework',
url = 'https://github.com/samueldmq/infosystem',
author = 'Samuel de Medeiros Queiroz',
author_email = 'samueldmq@gmail.com',
license = 'Apache-2',
packages = f... | Update infosystem to version 0.1.14 | Update infosystem to version 0.1.14
| Python | apache-2.0 | samueldmq/infosystem | ---
+++
@@ -3,7 +3,7 @@
setup(
name = 'infosystem',
- version = '0.1.13',
+ version = '0.1.14',
summary = 'Infosystem Framework',
url = 'https://github.com/samueldmq/infosystem',
author = 'Samuel de Medeiros Queiroz', |
3b2247729d7079f885ac3cebcf6581c23f0d550b | setup.py | setup.py | #!/usr/bin/env python
from setuptools import setup
setup(
name='Pydm',
version='0.1.1',
description='Python Distributed Make',
author='Kiran Garimella',
author_email='kiran.garimella@gmail.com',
packages=['dmpy'],
)
| #!/usr/bin/env python
from setuptools import setup
setup(
name='dmpy',
version='0.1.1',
description='Python Distributed Make',
author='Kiran Garimella',
author_email='kiran.garimella@gmail.com',
packages=['dmpy'],
)
| Fix package name to dmpy | Fix package name to dmpy | Python | mit | kvg/dmpy | ---
+++
@@ -2,7 +2,7 @@
from setuptools import setup
setup(
- name='Pydm',
+ name='dmpy',
version='0.1.1',
description='Python Distributed Make',
author='Kiran Garimella', |
2fbead7ee90847a5c47d152f086d4a96f52733ce | LFI.TESTER.py | LFI.TESTER.py | import sys
import urllib2
import getopt
import time
target = ''
depth = 10
file = 'etc/passwd'
html = ''
prefix = ''
url = ''
def usage():
print "usage function"
try:
opts,args = getopt.getopt(sys.argv[1:],"ht:",["help","target="])
for opt, arg in opts:
if opt in("-h","--help"):
usage()
sys.exit()... | import sys
import urllib2
import getopt
import time
target = ''
depth = 6
file = 'etc/passwd'
html = ''
prefix = ''
url = ''
keyword='root'
def usage():
print "usage function"
try:
opts,args = getopt.getopt(sys.argv[1:],"ht:d:f:k:",["help","target=","depth=","file=","keyword="])
for opt, arg in opts:
if o... | Add Deepth File And KeyWord Options | Add Deepth File And KeyWord Options
| Python | apache-2.0 | KaiyiZhang/Secipt,KaiyiZhang/Secipt,KaiyiZhang/Secipt | ---
+++
@@ -4,19 +4,20 @@
import time
target = ''
-depth = 10
+depth = 6
file = 'etc/passwd'
html = ''
prefix = ''
url = ''
+keyword='root'
def usage():
print "usage function"
try:
- opts,args = getopt.getopt(sys.argv[1:],"ht:",["help","target="])
+ opts,args = getopt.getopt(sys.argv[1:],"ht:d:... |
0c2a7bfebbb6d427ffea66f4a8df534c5b8be974 | timed/subscription/admin.py | timed/subscription/admin.py | from django.contrib import admin
from . import models
@admin.register(models.Package)
class PackageAdmin(admin.ModelAdmin):
list_display = ['billing_type', 'duration', 'price']
| from django import forms
from django.contrib import admin
from django.utils.translation import ugettext_lazy as _
from timed.forms import DurationInHoursField
from . import models
class PackageForm(forms.ModelForm):
model = models.Package
duration = DurationInHoursField(
label=_('Duration in hours')... | Configure duration field on subscription package in hours | Configure duration field on subscription package in hours
| Python | agpl-3.0 | adfinis-sygroup/timed-backend,adfinis-sygroup/timed-backend,adfinis-sygroup/timed-backend | ---
+++
@@ -1,8 +1,21 @@
+from django import forms
from django.contrib import admin
+from django.utils.translation import ugettext_lazy as _
+
+from timed.forms import DurationInHoursField
from . import models
+
+
+class PackageForm(forms.ModelForm):
+ model = models.Package
+ duration = DurationInHoursFiel... |
c745a6807a26173033bdbea8387e9c10275bb88d | step_stool/content.py | step_stool/content.py | __author__ = 'Chris Krycho'
__copyright__ = '2013 Chris Krycho'
from logging import error
from os import path, walk
from sys import exit
try:
from markdown import Markdown
from mixins import DictAsMember
except ImportError as import_error:
error(import_error)
exit()
def convert_source(config):
... | __author__ = 'Chris Krycho'
__copyright__ = '2013 Chris Krycho'
from logging import error
from os import path, walk
from sys import exit
try:
from markdown import Markdown
from mixins import DictAsMember
except ImportError as import_error:
error(import_error)
exit()
def convert_source(config):
... | Call the reset() method in the Markdown object to clear extensions (e.g. metadata) between processing each file. | Call the reset() method in the Markdown object to clear extensions (e.g. metadata) between processing each file.
| Python | mit | chriskrycho/step-stool,chriskrycho/step-stool | ---
+++
@@ -31,5 +31,6 @@
md_text = file.read()
content = md.convert(md_text)
converted[plain_slug] = {'content': content, 'meta': md.Meta}
+ md.reset()
return DictAsMember(converted) |
77346899a001be6cee1f2bda50156647e6bca87a | deployer/views/util.py | deployer/views/util.py | import json
from flask import Response
def build_response(output, status=200, mimetype='application/json',
headers={}):
return Response(
json.dumps(output),
mimetype=mimetype
), status, headers
| import json
from flask import Response, jsonify
def build_response(output, status=200, mimetype='application/json',
headers={}):
resp = jsonify(output)
resp.mimetype = mimetype
return resp, status, headers
| Fix issue with datetime handling | Fix issue with datetime handling
| Python | mit | totem/cluster-deployer,totem/cluster-deployer,totem/cluster-deployer | ---
+++
@@ -1,10 +1,9 @@
import json
-from flask import Response
+from flask import Response, jsonify
def build_response(output, status=200, mimetype='application/json',
headers={}):
- return Response(
- json.dumps(output),
- mimetype=mimetype
- ), status, headers
+ re... |
10494456af67270f28853872dd8072f01872b6db | src/pipelines/views.py | src/pipelines/views.py | from django.contrib.auth.mixins import LoginRequiredMixin
from django.views.generic import CreateView
from .forms import AbstractPipelineCreateForm
class AbstractPipelineFormView(LoginRequiredMixin, CreateView):
form_class = AbstractPipelineCreateForm
template_name = None
def get_form_kwargs(self):
... | from django.contrib import messages
from django.contrib.auth.mixins import LoginRequiredMixin
from django.utils.translation import ugettext_lazy as _
from django.views.generic import CreateView
from .forms import AbstractPipelineCreateForm
class AbstractPipelineFormView(LoginRequiredMixin, CreateView):
form_cla... | Add message after successfully created an new analysis | Add message after successfully created an new analysis
| Python | mit | ccwang002/biocloud-server-kai,ccwang002/biocloud-server-kai,ccwang002/biocloud-server-kai | ---
+++
@@ -1,4 +1,6 @@
+from django.contrib import messages
from django.contrib.auth.mixins import LoginRequiredMixin
+from django.utils.translation import ugettext_lazy as _
from django.views.generic import CreateView
from .forms import AbstractPipelineCreateForm
@@ -14,3 +16,14 @@
kwargs = super().ge... |
d24cd893e3969eba6b23ee98ff0787622685f8c6 | bin/testconnection.py | bin/testconnection.py | #!/usr/bin/python
import psycopg2
import sys
import os
def parse_connection_uri():
here, _ = os.path.split(__file__)
with open(os.path.join(here, '../portal/application.cfg'), 'r') as fh:
conn_strings = [l for l in fh.readlines() if
l.startswith('SQLALCHEMY_DATABASE_URI')]
... | #!/usr/bin/env python
import psycopg2
import sys
import os
def parse_connection_uri():
here, _ = os.path.split(__file__)
with open(os.path.join(here, '../instance/application.cfg'), 'r') as fh:
conn_strings = [l for l in fh.readlines() if
l.startswith('SQLALCHEMY_DATABASE_URI')]... | Use virtualenv python & look for config file in new instance directory. | Use virtualenv python & look for config file in new instance directory.
| Python | bsd-3-clause | uwcirg/true_nth_usa_portal,uwcirg/true_nth_usa_portal,uwcirg/true_nth_usa_portal,uwcirg/true_nth_usa_portal | ---
+++
@@ -1,11 +1,11 @@
-#!/usr/bin/python
+#!/usr/bin/env python
import psycopg2
import sys
import os
def parse_connection_uri():
here, _ = os.path.split(__file__)
- with open(os.path.join(here, '../portal/application.cfg'), 'r') as fh:
+ with open(os.path.join(here, '../instance/application.cfg')... |
31a342983029923bedc8301210cea6fd8cd278fa | django_actions/urls.py | django_actions/urls.py | from django.conf.urls.defaults import patterns, include, url
urlpatterns = patterns('django_actions.views',
url(r'^(?P<app_n_model>[\w\.]+)/$', 'act', name='url_act'),
)
| from django.conf.urls.defaults import patterns, include, url
urlpatterns = patterns('django_actions.views',
url(r'^(?P<app_n_model>[\w\.]+)/$', 'act', name='action'),
)
| Change URL for something clearer | Change URL for something clearer
| Python | bsd-2-clause | qdqmedia/django-actions,qdqmedia/django-actions | ---
+++
@@ -1,5 +1,5 @@
from django.conf.urls.defaults import patterns, include, url
urlpatterns = patterns('django_actions.views',
- url(r'^(?P<app_n_model>[\w\.]+)/$', 'act', name='url_act'),
+ url(r'^(?P<app_n_model>[\w\.]+)/$', 'act', name='action'),
) |
f04109b352fc8a83696633d01eaae8ac4ce7dc5e | setup.py | setup.py | from distutils.core import setup
with open('requirements.txt') as f:
requirements = [l.strip() for l in f]
setup(
name='hamper-pizza',
version='0.1',
packages=['hamper-pizza'],
author='Dean Johnson',
author_email='deanjohnson222@gmail.com',
url='https://github.com/johnsdea/hamper-pizza',
... | from distutils.core import setup
with open('requirements.txt') as f:
requirements = [l.strip() for l in f]
setup(
name='hamper-pizza',
version='0.1',
packages=['hamper-pizza'],
author='Dean Johnson',
author_email='deanjohnson222@gmail.com',
url='https://github.com/dean/hamper-pizza',
i... | Update url with new Github username. | Update url with new Github username.
| Python | mpl-2.0 | dean/hamper-pizza | ---
+++
@@ -9,7 +9,7 @@
packages=['hamper-pizza'],
author='Dean Johnson',
author_email='deanjohnson222@gmail.com',
- url='https://github.com/johnsdea/hamper-pizza',
+ url='https://github.com/dean/hamper-pizza',
install_requires=requirements,
package_data={'hamper-pizza': ['requirements.... |
4eea07a5f0a23ff71729c5b24a4886a08bf7f6b5 | setup.py | setup.py | # Copyright 2015 Alburnum Ltd. This software is licensed under
# the GNU Affero General Public License version 3 (see LICENSE).
"""Distutils installer for alburnum-maas-client."""
from __future__ import (
absolute_import,
print_function,
unicode_literals,
)
__metaclass__ = type
from setuptools import (
... | # Copyright 2015 Alburnum Ltd. This software is licensed under
# the GNU Affero General Public License version 3 (see LICENSE).
"""Distutils installer for alburnum-maas-client."""
from __future__ import (
absolute_import,
print_function,
unicode_literals,
)
__metaclass__ = type
from setuptools import (
... | Declare dependency on httplib2, and bump version. | Declare dependency on httplib2, and bump version.
| Python | agpl-3.0 | blakerouse/python-libmaas,alburnum/alburnum-maas-client | ---
+++
@@ -22,7 +22,7 @@
author='Gavin Panella',
author_email='gavinpanella@gmail.com',
url='https://github.com/alburnum/alburnum-maas-client',
- version="0.1.1",
+ version="0.1.2",
classifiers=[
'Development Status :: 3 - Alpha',
'Intended Audience :: Developers',
@@ -32,... |
796eac9b38601214279debc8afaf4e82e9c5548d | setup.py | setup.py | #!/usr/bin/env python
from setuptools import setup
setup(
name="exec-wrappers",
version='1.0.3',
author="Guilherme Quentel Melo",
author_email="gqmelo@gmail.com",
url="https://github.com/gqmelo/exec-wrappers",
license="MIT",
classifiers=[
"Development Status :: 5 - Production/Stabl... | #!/usr/bin/env python
from setuptools import setup
setup(
name="exec-wrappers",
version='1.0.3',
author="Guilherme Quentel Melo",
author_email="gqmelo@gmail.com",
url="https://github.com/gqmelo/exec-wrappers",
license="MIT",
classifiers=[
"Development Status :: 5 - Production/Stabl... | Add Python 3.6 to classifiers | Add Python 3.6 to classifiers | Python | mit | gqmelo/exec-wrappers,gqmelo/exec-wrappers | ---
+++
@@ -19,6 +19,7 @@
"Programming Language :: Python :: 3.3",
"Programming Language :: Python :: 3.4",
"Programming Language :: Python :: 3.5",
+ "Programming Language :: Python :: 3.6",
],
description="wrappers for running commands that need some initial setup",
... |
2544f892f93ab2ddf95ef3634c39e7c3840fb03a | setup.py | setup.py | from setuptools import setup, find_packages
import sys, os
version = '1.5.2'
install_requires = [
# -*- Extra requirements: -*-
]
if sys.version_info < (2,6,):
install_requires.append("simplejson>=1.7.1")
setup(name='twitter3',
version=version,
description="An API and command-line toolset fo... | from setuptools import setup, find_packages
import sys, os
version = '1.5.2'
install_requires = [
# -*- Extra requirements: -*-
]
setup(name='twitter3',
version=version,
description="An API and command-line toolset for Twitter (twitter.com)",
long_description=open("./README", "r").read(),
... | Enable the twitterbot since dateutil requirement is now gone. | Enable the twitterbot since dateutil requirement is now gone.
| Python | mit | tytek2012/twitter,adonoho/twitter,durden/frappy,Adai0808/twitter,hugovk/twitter,miragshin/twitter,sixohsix/twitter,jessamynsmith/twitter | ---
+++
@@ -6,9 +6,6 @@
install_requires = [
# -*- Extra requirements: -*-
]
-
-if sys.version_info < (2,6,):
- install_requires.append("simplejson>=1.7.1")
setup(name='twitter3',
version=version,
@@ -40,5 +37,6 @@
# -*- Entry points: -*-
[console_scripts]
twitter=twitter.... |
b3453f31b0e7e4be117a4c0379202cd0a440ce60 | setup.py | setup.py | from setuptools import setup, find_packages
setup(
name='click-man',
version='0.2.1',
license='MIT',
description='Generate man pages for click based CLI applications',
author='Timo Furrer',
author_email='tuxtimo@gmail.com',
install_requires=[
'click'
],
packages=find_package... | from setuptools import setup, find_packages
setup(
name='click-man',
version='0.2.1',
license='MIT',
description='Generate man pages for click based CLI applications',
author='Timo Furrer',
author_email='tuxtimo@gmail.com',
install_requires=[
'click'
],
packages=find_package... | Exclude tests from installed packages | Exclude tests from installed packages
| Python | mit | click-contrib/click-man | ---
+++
@@ -10,7 +10,7 @@
install_requires=[
'click'
],
- packages=find_packages(),
+ packages=find_packages(exclude=('tests', )),
entry_points={
'console_scripts': [
'click-man = click_man.__main__:cli', |
cdefa2089cad46884d8cf9c3e4e5f475a1beed58 | setup.py | setup.py | from setuptools import setup, find_packages
with open('README.rst') as readme:
long_description = ''.join(readme).strip()
setup(
name='rsocks',
version='0.3.3',
author='Jiangge Zhang',
author_email='tonyseek@gmail.com',
description='A SOCKS reverse proxy server.',
long_description=long_d... | from setuptools import setup, find_packages
with open('README.rst') as readme:
long_description = ''.join(readme).strip()
setup(
name='rsocks',
version='0.3.3',
author='Jiangge Zhang',
author_email='tonyseek@gmail.com',
description='A SOCKS reverse proxy server.',
long_description=long_d... | Upgrade eventlet to fix CVE-2021-21419 | Upgrade eventlet to fix CVE-2021-21419
| Python | mit | tonyseek/rsocks,tonyseek/rsocks | ---
+++
@@ -28,7 +28,7 @@
platforms=['Any'],
install_requires=[
'PySocks>=1.5,<1.6',
- 'eventlet>=0.17,<0.18',
+ 'eventlet>=0.31,<0.34',
'click>=3.3,<3.4',
'toml.py>=0.1,<0.2',
'six', |
b9b046a9ad58406155a3005050f90b5184ba1758 | bpython/__init__.py | bpython/__init__.py | # The MIT License
#
# Copyright (c) 2008 Bob Farrell
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, mer... | # The MIT License
#
# Copyright (c) 2008 Bob Farrell
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, mer... | Set the version name for the default branch to mercurial so we can tell when we run from the repository | Set the version name for the default branch to mercurial so we can tell when we run from the repository
| Python | mit | 5monkeys/bpython | ---
+++
@@ -22,7 +22,7 @@
import os.path
-__version__ = '0.10'
+__version__ = 'mercurial'
package_dir = os.path.abspath(os.path.dirname(__file__))
|
c79c518c15be430aaf3da8d628096cd52c07c6bd | setup.py | setup.py | #!/usr/bin/env python
import os
from setuptools import setup
from beanstalkc import __version__ as version
pkg_version = version
git_version = os.popen('git describe --tags --abbrev=6').read().strip()[7:]
if git_version:
pkg_version += '.dev' + git_version
setup(
name='beanstalkc',
version=pkg_version,
... | #!/usr/bin/env python
import os
from distutils.spawn import find_executable
from setuptools import setup
from beanstalkc import __version__ as src_version
pkg_version = os.environ.get('BEANSTALKC_PKG_VERSION', src_version)
setup(
name='beanstalkc',
version=pkg_version,
py_modules=['beanstalkc'],
aut... | Remove Git-based package version detection | Remove Git-based package version detection
Instead, allow package version overriding by setting a
BEANSTALKC_PKG_VERSION environment variable.
| Python | apache-2.0 | yetone/beanstalkc,bcho/beanstalkc,earl/beanstalkc,seveas/beanstalkc | ---
+++
@@ -1,12 +1,11 @@
#!/usr/bin/env python
import os
+from distutils.spawn import find_executable
from setuptools import setup
-from beanstalkc import __version__ as version
-pkg_version = version
-git_version = os.popen('git describe --tags --abbrev=6').read().strip()[7:]
-if git_version:
- pkg_version ... |
6c3c0dd1e725583a8465b2e986ebfa1e363fb478 | setup.py | setup.py | import sys, os
try:
import Cython
except ImportError:
pass
from setuptools import setup
from pymantic import version
import setupinfo
setup(name='pymantic',
version=version,
description="Semantic Web and RDF library for Python",
long_description="""""",
classifiers=['Development Sta... | import sys, os
from setuptools import setup
from pymantic import version
setup(name='pymantic',
version=version,
description="Semantic Web and RDF library for Python",
long_description="""""",
classifiers=['Development Status :: 3 - Alpha',
'Intended Audience :: Developers'... | Remove imports from stupid C module. | Remove imports from stupid C module.
| Python | bsd-3-clause | SYSTAP/blazegraph-python,blazegraph/blazegraph-python,syapse/pymantic,igor-kim/blazegraph-python,SYSTAP/blazegraph-python,blazegraph/blazegraph-python,igor-kim/blazegraph-python | ---
+++
@@ -1,15 +1,8 @@
import sys, os
-
-try:
- import Cython
-except ImportError:
- pass
from setuptools import setup
from pymantic import version
-
-import setupinfo
setup(name='pymantic',
version=version,
@@ -45,7 +38,4 @@
scripts = [
'pymantic/scripts/named_graph_to_nqua... |
34af1fdb4f6c9c8b994cb710b97fe0ed9e1311a7 | setup.py | setup.py | import os
import glob
from numpy.distutils.core import setup, Extension
version = (os.popen('git config --get remote.origin.url').read() + ',' +
os.popen('git describe --always --tags --dirty').read())
scripts = []
setup(name='matscipy',
version=version,
description='Generic Python Materials S... | import os
import glob
from numpy.distutils.core import setup, Extension
version = (os.popen('git config --get remote.origin.url').read() + ',' +
os.popen('git describe --always --tags --dirty').read())
scripts = []
setup(name='matscipy',
version=version,
description='Generic Python Materials S... | Add matscipy.fracture_mechanics to packages list to install subpackage | Add matscipy.fracture_mechanics to packages list to install subpackage
| Python | lgpl-2.1 | libAtoms/matscipy,libAtoms/matscipy,libAtoms/matscipy,libAtoms/matscipy | ---
+++
@@ -14,7 +14,7 @@
maintainer_email='james.kermode@gmail.com',
license='LGPLv2.1+',
package_dir={'matscipy': 'matscipy'},
- packages=['matscipy'],
+ packages=['matscipy', 'matscipy.fracture_mechanics'],
scripts=scripts,
ext_modules=[
Extension( |
7ef4a4df9da3d14ddb0e813720999fbaaa9d45d6 | setup.py | setup.py | #!/usr/bin/env python
from setuptools import setup
import os
__version__ = '0.1.4'
def read(*paths):
"""Build a file path from *paths* and return the contents."""
with open(os.path.join(*paths), 'r') as f:
return f.read()
setup(name='ftpretty',
version=__version__,
description='Pretty FTP... | #!/usr/bin/env python
from setuptools import setup
import os
__version__ = '0.1.5'
def read(*paths):
"""Build a file path from *paths* and return the contents."""
with open(os.path.join(*paths), 'r') as f:
return f.read()
setup(name='ftpretty',
version=__version__,
description='Pretty FTP... | Bump to get everything back where it should be | Bump to get everything back where it should be
| Python | mit | codebynumbers/ftpretty | ---
+++
@@ -2,7 +2,7 @@
from setuptools import setup
import os
-__version__ = '0.1.4'
+__version__ = '0.1.5'
def read(*paths):
"""Build a file path from *paths* and return the contents.""" |
ab957908f578946fd748a28ff0a7fd1c49f53b9f | setup.py | setup.py | from setuptools import find_packages, setup
setup(
name='pyserializer',
version='0.9.1',
description='Simple python serialization library.',
author='LocalMed',
author_email='ecordell@localmed.com, pete@localmed.com, joeljames1985@gmail.com', # NOQA
url='',
license='MIT',
packages=find... | from setuptools import find_packages, setup
setup(
name='pyserializer',
version='0.9.1',
description='Simple python serialization library.',
author='LocalMed',
author_email='ecordell@localmed.com, pete@localmed.com, joeljames1985@gmail.com', # NOQA
url='',
license='MIT',
packages=find... | Upgrade six to the lastest | Upgrade six to the lastest
| Python | mit | localmed/pyserializer,localmed/pyserializer | ---
+++
@@ -12,7 +12,7 @@
packages=find_packages(exclude=['tests', 'tests.*']),
include_package_data=True,
install_requires=[
- 'six==1.8.0'
+ 'six==1.11.0'
],
classifiers=[
'Development Status :: 3 - Alpha', |
612006dbfdf05c120467c31319a9e089c82dbb86 | setup.py | setup.py | from setuptools import setup
setup(
name='pypardiso',
version="0.3.1",
packages=['pypardiso'],
install_requires=['mkl', 'mkl-service', 'numpy', 'scipy', 'psutil'],
author="Adrian Haas",
license=open('LICENSE.txt').read(),
url="https://github.com/haasad/PyPardisoProject",
long_descriptio... | from setuptools import setup
setup(
name='pypardiso',
version="0.3.1",
packages=['pypardiso'],
install_requires=['mkl-service', 'numpy', 'scipy', 'psutil'],
author="Adrian Haas",
license=open('LICENSE.txt').read(),
url="https://github.com/haasad/PyPardisoProject",
long_description=open(... | Remove mkl as direct dependency | Remove mkl as direct dependency
This breaks the conda-forge build, since the pip mkl and conda mkl
aren't the same packages, so `pip check` fails. mkl is a dependency of
mkl-service and will still be installed with pip install.
| Python | bsd-3-clause | haasad/PyPardisoProject | ---
+++
@@ -4,7 +4,7 @@
name='pypardiso',
version="0.3.1",
packages=['pypardiso'],
- install_requires=['mkl', 'mkl-service', 'numpy', 'scipy', 'psutil'],
+ install_requires=['mkl-service', 'numpy', 'scipy', 'psutil'],
author="Adrian Haas",
license=open('LICENSE.txt').read(),
url="h... |
2a294c70c4e1b94b185e1c58bd1868e1c9d675b6 | setup.py | setup.py | import os
try:
from setuptools import setup
except ImportError:
from distutils.core import setup
with open('README.md') as f:
readme = f.read()
setup(
name="pykwalify",
version="1.7.0",
description='Python lib/cli for JSON/YAML schema validation',
long_description=readme,
long_descript... | import os
try:
from setuptools import setup
except ImportError:
from distutils.core import setup
with open('README.md') as f:
readme = f.read()
setup(
name="pykwalify",
version="1.7.0",
description='Python lib/cli for JSON/YAML schema validation',
long_description=readme,
long_descript... | Fix missing comma in `install_requires` | Fix missing comma in `install_requires`
coincidentally, I [made a video about this today](https://www.youtube.com/watch?v=5Zto6VYsNsI) | Python | mit | grokzen/pykwalify | ---
+++
@@ -27,7 +27,7 @@
},
install_requires=[
'docopt>=0.6.2',
- "ruamel.yaml>=0.16.0"
+ "ruamel.yaml>=0.16.0",
'python-dateutil>=2.8.0',
],
classifiers=[ |
edbb4f1f86f1102ce93b9776cddc6aa83c28595e | setup.py | setup.py | #!/usr/bin/env python
from setuptools import setup, find_packages
__version__ = '0.50.1'
with open("README.md", "r") as fh:
long_description = fh.read()
setup(name='lcapy',
version=__version__,
author='Michael Hayes',
author_email='michael.hayes@canterbury.ac.nz',
description='Symbolic li... | #!/usr/bin/env python
from setuptools import setup, find_packages
__version__ = '0.50.1'
with open("README.md", "r") as fh:
long_description = fh.read()
setup(name='lcapy',
version=__version__,
author='Michael Hayes',
author_email='michael.hayes@canterbury.ac.nz',
description='Symbolic li... | Add wheel as a requirement | Add wheel as a requirement
| Python | lgpl-2.1 | mph-/lcapy | ---
+++
@@ -20,7 +20,8 @@
'numpy',
'sympy',
'networkx',
- 'setuptools'
+ 'setuptools',
+ 'wheel'
],
packages=find_packages(exclude=['dem... |
43211ec5368a119cf829bde926aa9b262c6dfef8 | setup.py | setup.py | from setuptools import setup
import marquise.marquise
extension = marquise.marquise.ffi.verifier.get_extension()
with open('VERSION', 'r') as f:
VERSION = f.readline().strip()
# These notes suggest that there's not yet any "correct" way to do packageable
# CFFI interfaces. For now I'm splitting the CFFI stuff from... | from setuptools import setup
import marquise.marquise
extension = marquise.marquise.ffi.verifier.get_extension()
with open('VERSION', 'r') as f:
VERSION = f.readline().strip()
# These notes suggest that there's not yet any "correct" way to do packageable
# CFFI interfaces. For now I'm splitting the CFFI stuff from... | Update packaging metadata for accuracy | Update packaging metadata for accuracy
| Python | mit | anchor/pymarquise,anchor/pymarquise | ---
+++
@@ -17,8 +17,8 @@
name="marquise",
version=VERSION,
description="Python bindings for libmarquise",
- author="Sharif Olorin",
- author_email="sio@tesser.org",
+ author="Barney Desmond",
+ author_email="engineering@anchor.net.au",
url="https://github.com/anchor/pymarquise",
... |
2a820e1ed31e601a6c5b72a1a83f290b351a31ec | setup.py | setup.py | from setuptools import setup
PACKAGE_VERSION = '0.1'
deps = []
setup(name='wptserve',
version=PACKAGE_VERSION,
description="Python webserver intended for in web browser testing",
long_description=open("README.md").read(),
classifiers=[], # Get strings from http://pypi.python.org/pypi?%3Aaction... | from setuptools import setup
PACKAGE_VERSION = '1.0'
deps = []
setup(name='wptserve',
version=PACKAGE_VERSION,
description="Python webserver intended for in web browser testing",
long_description=open("README.md").read(),
# Get strings from http://pypi.python.org/pypi?%3Aaction=list_classifier... | Update package version to 1.0 | Update package version to 1.0
| Python | bsd-3-clause | youennf/wptserve | ---
+++
@@ -1,13 +1,16 @@
from setuptools import setup
-PACKAGE_VERSION = '0.1'
+PACKAGE_VERSION = '1.0'
deps = []
setup(name='wptserve',
version=PACKAGE_VERSION,
description="Python webserver intended for in web browser testing",
long_description=open("README.md").read(),
- classifie... |
7c26bd1281a36b72d457fadb4c656661c5355c4e | setup.py | setup.py | #!/usr/bin/env python
"""Setup ACAPI package."""
import os
from setuptools import setup
with open(os.path.join(os.path.dirname(__name__), "README.md")) as f:
long_description = f.read()
setup(
name="acapi",
version="0.8.1",
description="Acquia Cloud API client.",
long_description=long_descriptio... | #!/usr/bin/env python
"""Setup ACAPI package."""
import os
from setuptools import setup
with open(os.path.join(os.path.dirname(__name__), "README.md")) as f:
long_description = f.read()
setup(
name="acapi",
version="0.8.1",
description="Acquia Cloud API client.",
long_description=long_descriptio... | Fix long description content type | Fix long description content type
| Python | mit | skwashd/python-acquia-cloud | ---
+++
@@ -13,6 +13,7 @@
version="0.8.1",
description="Acquia Cloud API client.",
long_description=long_description,
+ long_description_content_type="text/markdown",
author="Dave Hall",
author_email="me@davehall.com.au",
url="http://github.com/skwashd/python-acquia-cloud", |
7858a49b4544bdfde2d55f4ce401bf208eaea17e | setup.py | setup.py | import sys
try:
from setuptools import setup, find_packages
except ImportError:
from distutils.core import setup, find_packages
if sys.version_info <= (2, 5):
raise Exception('Requires Python Version 2.6 or above... exiting.')
REQUIREMENTS = [
'httplib2',
'oauth2client',
'protobuf >= 2.5.0... | import sys
try:
from setuptools import setup, find_packages
except ImportError:
from distutils.core import setup, find_packages
if sys.version_info <= (2, 5):
raise Exception('Requires Python Version 2.6 or above... exiting.')
REQUIREMENTS = [
'httplib2',
'oauth2client',
'protobuf >= 2.5.0... | Remove keys and update minor | Remove keys and update minor
| Python | apache-2.0 | jonparrott/gcloud-python,jbuberel/gcloud-python,googleapis/google-cloud-python,googleapis/google-cloud-python,jonparrott/gcloud-python,waprin/google-cloud-python,blowmage/gcloud-python,jgeewax/gcloud-python,jgeewax/gcloud-python,tseaver/gcloud-python,tseaver/google-cloud-python,GoogleCloudPlatform/gcloud-python,GoogleC... | ---
+++
@@ -23,7 +23,7 @@
setup(
name='gcloud',
- version='0.02.2',
+ version='0.3.0',
description='API Client library for Google Cloud',
author='JJ Geewax',
author_email='jj@geewax.org',
@@ -32,8 +32,6 @@
packages=find_packages(),
license='Apache 2.0',
platforms='Posix; Ma... |
09f96a8c3dd9fdf605c17cc85b4b7ab66af30aeb | setup.py | setup.py | #!/usr/bin/env python
from setuptools import setup
setup(
name='od',
version='2.0.0',
description='Shorthand syntax for building OrderedDicts',
license='MIT',
url='https://github.com/epsy/od',
author='Yann Kaiser',
author_email='kaiser.yann@gmail.com',
py_modules=('od', 'test_od'),
... | #!/usr/bin/env python
import pathlib
from setuptools import setup
here = pathlib.Path(__file__).parent.resolve()
long_description = (here / "README.rst").read_text(encoding='utf-8')
setup(
name='od',
version='2.0.1',
description='Shorthand syntax for building OrderedDicts',
long_description=long_de... | Fix long_description, bump to 2.0.1 | Fix long_description, bump to 2.0.1
| Python | mit | epsy/od | ---
+++
@@ -1,11 +1,19 @@
#!/usr/bin/env python
+import pathlib
from setuptools import setup
+
+here = pathlib.Path(__file__).parent.resolve()
+
+long_description = (here / "README.rst").read_text(encoding='utf-8')
+
setup(
name='od',
- version='2.0.0',
+ version='2.0.1',
description='Shorthand... |
51810ebc49b135a8b2fb0ae40555ab4d3419a4a4 | setup.py | setup.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import os
import codecs
from setuptools import setup
def read(fname):
file_path = os.path.join(os.path.dirname(__file__), fname)
return codecs.open(file_path, encoding='utf-8').read()
setup(
name='pytest-cookies',
version='0.1.0',
author='Raphael Pi... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import os
import codecs
from setuptools import setup
def read(fname):
file_path = os.path.join(os.path.dirname(__file__), fname)
return codecs.open(file_path, encoding='utf-8').read()
setup(
name='pytest-cookies',
version='0.1.0',
author='Raphael Pi... | Add Cookiecutter v1.1 to install requirements | Add Cookiecutter v1.1 to install requirements
| Python | mit | hackebrot/pytest-cookies | ---
+++
@@ -23,7 +23,10 @@
description='A Pytest plugin for your Cookiecutter templates',
long_description=read('README.rst'),
py_modules=['pytest_cookies'],
- install_requires=['pytest>=2.8.1'],
+ install_requires=[
+ 'pytest>=2.8.1',
+ 'cookiecutter>=1.1.0'
+ ],
classifier... |
3193abd844bae92159258a5cc80221e9a7d16b06 | setup.py | setup.py | #!/usr/bin/env python
from distutils.core import setup
from catkin_pkg.python_setup import generate_distutils_setup
d = generate_distutils_setup(
packages=['xacro'],
package_dir={'': 'src'},
scripts=['scripts/xacro.py']
)
setup(**d)
| #!/usr/bin/env python
from distutils.core import setup
from catkin_pkg.python_setup import generate_distutils_setup
d = generate_distutils_setup(
packages=['xacro'],
package_dir={'': 'src'}
)
setup(**d)
| Remove bin copy of xacro.py | Remove bin copy of xacro.py | Python | bsd-3-clause | ros/xacro,ros/xacro | ---
+++
@@ -5,8 +5,7 @@
d = generate_distutils_setup(
packages=['xacro'],
- package_dir={'': 'src'},
- scripts=['scripts/xacro.py']
+ package_dir={'': 'src'}
)
setup(**d) |
0069f97b940cf5d9ac128ad6dc87cdd3931219b5 | setup.py | setup.py | #!/usr/bin/env python
from fancypages import __version__
from setuptools import setup, find_packages
setup(
name='django-fancypages',
version=__version__,
url='https://github.com/tangentlabs/django-fancypages',
author="Sebastian Vetter",
author_email="sebastian.vetter@tangentsnowball.com.au",
... | #!/usr/bin/env python
from fancypages import __version__
from setuptools import setup, find_packages
setup(
name='django-fancypages',
version=__version__,
url='https://github.com/tangentlabs/django-fancypages',
author="Sebastian Vetter",
author_email="sebastian.vetter@tangentsnowball.com.au",
... | Update sorl-thumbnail to latest version | Update sorl-thumbnail to latest version
| Python | bsd-3-clause | tangentlabs/django-fancypages,tangentlabs/django-fancypages,tangentlabs/django-fancypages | ---
+++
@@ -31,7 +31,7 @@
# DRF 2.3+ so we are restricting the version here
'djangorestframework>=2.3.10',
'pillow',
- 'sorl-thumbnail>=11.12',
+ 'sorl-thumbnail>=11.12.1b',
],
# See http://pypi.python.org/pypi?%3Aaction=list_classifiers
classifiers=[ |
a0b2e2422ab1cf8ac6220b3bb12c94295e69961d | setup.py | setup.py | # coding: utf-8
from setuptools import setup, find_packages
import tom_lib
__author__ = "Adrien Guille, Pavel Soriano"
__email__ = "adrien.guille@univ-lyon2.fr"
version = tom_lib.__version__
setup(
name='tom_lib',
version=version,
packages=find_packages(),
author="Adrien Guille, Pavel Soriano",
au... | # coding: utf-8
from setuptools import setup, find_packages
import tom_lib
__author__ = "Adrien Guille, Pavel Soriano"
__email__ = "adrien.guille@univ-lyon2.fr"
version = tom_lib.__version__
setup(
name='tom_lib',
version=version,
packages=find_packages(),
author="Adrien Guille, Pavel Soriano",
au... | Correct project requirements (sklearn -> scikit-learn) | Correct project requirements (sklearn -> scikit-learn)
| Python | mit | AdrienGuille/TOM,AdrienGuille/TOM | ---
+++
@@ -24,6 +24,6 @@
'Programming Language :: Python :: 2.7',
'Topic :: Scientific/Engineering',
'Topic :: Text Processing'
- ], requires=['nltk', 'sklearn', 'networkx', 'pandas', 'scipy', 'gensim', 'numpy'])
+ ], requires=['nltk', 'scikit-learn', 'networkx', 'pandas', 'scipy', '... |
34b80fdca9387c05cf9000cd2c19b619aadff6e9 | app/blog/management/commands/check_posts_state.py | app/blog/management/commands/check_posts_state.py | import os
import logging
from django.core.management.base import BaseCommand
from blog.models import Post
logger = logging.getLogger('app')
class Command(BaseCommand):
help = 'Check posts state'
def handle(self, *args, **options):
checked = 0
for post in Post.objects.all():
try... | import os
import logging
from django.core.management.base import BaseCommand
from blog.models import Post
logger = logging.getLogger('app')
class Command(BaseCommand):
help = 'Check posts state'
def handle(self, *args, **options):
checked = 0
for post in Post.objects.all():
try... | Update check posts state command | Update check posts state command
| Python | bsd-3-clause | manti-by/M2MICRO,manti-by/M2MICRO,manti-by/M2-Blog-Engine,manti-by/M2-Blog-Engine,manti-by/M2MICRO,manti-by/M2-Blog-Engine,manti-by/m2,manti-by/m2,manti-by/m2,manti-by/M2MICRO,manti-by/M2-Blog-Engine,manti-by/m2 | ---
+++
@@ -23,6 +23,12 @@
post.ogg_preview_ready = os.path.exists(post.preview_ogg_file) \
and os.path.getsize(post.preview_ogg_file) > 0
+
+ self.stdout.write('Checked post #%d: %d %d %d' % (post.id,
+ ... |
fa1a08aed5bc6659304097d5ad7e653c553c1b11 | cactus/utils/file.py | cactus/utils/file.py | #coding:utf-8
import os
import cStringIO
import gzip
import hashlib
from cactus.utils.helpers import checksum
class FakeTime:
"""
Monkey-patch gzip.time to avoid changing files every time we deploy them.
"""
def time(self):
return 1111111111.111
def compressString(s):
"""Gzip a given st... | #coding:utf-8
import os
import cStringIO
import gzip
import hashlib
import subprocess
from cactus.utils.helpers import checksum
class FakeTime:
"""
Monkey-patch gzip.time to avoid changing files every time we deploy them.
"""
def time(self):
return 1111111111.111
def compressString(s):
... | Use terminal md5 for perf | Use terminal md5 for perf
| Python | bsd-3-clause | koenbok/Cactus,danielmorosan/Cactus,juvham/Cactus,dreadatour/Cactus,Bluetide/Cactus,chaudum/Cactus,koobs/Cactus,chaudum/Cactus,PegasusWang/Cactus,juvham/Cactus,eudicots/Cactus,Knownly/Cactus,danielmorosan/Cactus,page-io/Cactus,juvham/Cactus,fjxhkj/Cactus,koobs/Cactus,ibarria0/Cactus,PegasusWang/Cactus,danielmorosan/Cac... | ---
+++
@@ -3,6 +3,7 @@
import cStringIO
import gzip
import hashlib
+import subprocess
from cactus.utils.helpers import checksum
@@ -38,8 +39,11 @@
"""
Calculate the MD5 sum for a file (needs to fit in memory)
"""
- with open(path, 'rb') as f:
- return checksum(f.read())
+ # with o... |
09c0c2302460c6e32419f640b341c4b968d4227a | opendebates/tests/test_context_processors.py | opendebates/tests/test_context_processors.py | import urlparse
from django.test import TestCase, override_settings
from django.conf import settings
from mock import patch, Mock
from opendebates.context_processors import global_vars
from opendebates.tests.factories import SubmissionFactory
class NumberOfVotesTest(TestCase):
def test_number_of_votes(self):
... | import urlparse
from django.test import TestCase, override_settings
from django.conf import settings
from mock import patch, Mock
from opendebates.context_processors import global_vars
from opendebates.tests.factories import SubmissionFactory
class NumberOfVotesTest(TestCase):
def test_number_of_votes(self):
... | Fix type in overridden setting | Fix type in overridden setting
| Python | apache-2.0 | caktus/django-opendebates,ejucovy/django-opendebates,ejucovy/django-opendebates,caktus/django-opendebates,ejucovy/django-opendebates,caktus/django-opendebates,ejucovy/django-opendebates,caktus/django-opendebates | ---
+++
@@ -22,9 +22,8 @@
def setUp(self):
self.idea = SubmissionFactory()
- @override_settings(SITE_THEME={'HASHTAG': 'TestHastag'})
+ @override_settings(SITE_THEME={'HASHTAG': 'TestHashtag'})
def test_email_url(self):
- settings.SITE_THEME['HASHTAG'] = 'TestHashtag'
email_... |
d816c7207d21c2c379f9409eebc42f4feb88afd9 | attorch/constraints.py | attorch/constraints.py |
def positive(weight):
weight.data *= weight.data.ge(0).float()
def negative(weight):
weight.data *= weight.data.le(0).float()
def positive_except_self(weight):
pos = weight.data.ge(0).float()
if pos.size()[2] % 2 == 0 or pos.size()[3] % 2 == 0:
raise ValueError('kernel size must be odd')
... | from torch import nn
def constrain_all(self):
if hasattr(self, 'constrain'):
self.constrain()
for c in self.children():
c.constrain_all()
# extend torch nn.Module to have constrain_all function
nn.Module.constrain_all = constrain_all
def positive(weight, cache=None):
weight.data *= wei... | Add constraining extension to nn.Module | Add constraining extension to nn.Module
| Python | mit | fabiansinz/attorch,atlab/attorch,eywalker/attorch | ---
+++
@@ -1,11 +1,28 @@
+from torch import nn
-def positive(weight):
+
+def constrain_all(self):
+ if hasattr(self, 'constrain'):
+ self.constrain()
+
+ for c in self.children():
+ c.constrain_all()
+
+# extend torch nn.Module to have constrain_all function
+nn.Module.constrain_all = constrain... |
fa25c9c738376824a6d14fcf303d6ff867365588 | blogs/urls.py | blogs/urls.py | from django.conf.urls import patterns, include, url
from django.views.generic import TemplateView
from blogs.views import PostCreationView, PostDetailView, PostUpdateView, PostListView
urlpatterns = patterns('',
url(r'^new/?$', PostCreationView.as_view(), name='posts-create'),
url(r'^posts/?$', PostListView.a... | from django.conf.urls import patterns, include, url
from django.views.generic import TemplateView
from blogs.views import PostCreationView, PostDetailView, PostUpdateView, PostListView
urlpatterns = patterns('',
url(r'^new/?$', PostCreationView.as_view(), name='posts-create'),
url(r'^/?$', PostListView.as_vie... | Set root url to post list | Set root url to post list
| Python | mit | ericmok/djangosimpleblog,ericmok/djangosimpleblog,ericmok/djangosimpleblog | ---
+++
@@ -5,7 +5,7 @@
urlpatterns = patterns('',
url(r'^new/?$', PostCreationView.as_view(), name='posts-create'),
- url(r'^posts/?$', PostListView.as_view(), name='posts-list'),
- url(r'^posts/(?P<slug>.*?)/?$', PostDetailView.as_view(), name='posts-detail'),
+ url(r'^/?$', PostListView.as_view(),... |
133c6063e2da153c99512757b6771564d67ed28f | byterun/__main__.py | byterun/__main__.py | """A main program for Byterun."""
import argparse
import logging
from . import execfile
parser = argparse.ArgumentParser()
parser.add_argument('-m', dest='module', action='store_true')
parser.add_argument('-v', dest='verbose', action='store_true')
parser.add_argument('to_run')
parser.add_argument('arg', nargs=argpar... | """A main program for Byterun."""
import argparse
import logging
from . import execfile
parser = argparse.ArgumentParser(
prog="byterun",
description="Run Python programs with a Python bytecode interpreter.",
)
parser.add_argument(
'-m', dest='module', action='store_true',
help="prog is a module name... | Make the argument handling nicer. | Make the argument handling nicer.
| Python | mit | sukwon0709/byterun,sukwon0709/byterun,nedbat/byterun,sukwon0709/byterun,kostyll/byterun,sukwon0709/byterun,djhenderson/byterun,sukwon0709/byterun | ---
+++
@@ -5,11 +5,26 @@
from . import execfile
-parser = argparse.ArgumentParser()
-parser.add_argument('-m', dest='module', action='store_true')
-parser.add_argument('-v', dest='verbose', action='store_true')
-parser.add_argument('to_run')
-parser.add_argument('arg', nargs=argparse.REMAINDER)
+parser = argpar... |
e05093338c6c2fa155ea4ffe102bb6fa9a9b5e0e | __init__.py | __init__.py | import spyral.memoize
import spyral.point
import spyral.camera
import spyral.util
import spyral.sprite
import spyral.gui
import spyral.scene
import spyral._lib
import spyral.event
import pygame
director = scene.Director()
def init():
pygame.init()
pygame.font.init()
def quit():
pygame.quit()
spyr... | """
Spyral, an awesome library for making games.
"""
__version__ = '0.1'
__license__ = 'LGPLv2'
__author__ = 'Robert Deaton'
import spyral.memoize
import spyral.point
import spyral.camera
import spyral.util
import spyral.sprite
import spyral.gui
import spyral.scene
import spyral._lib
import spyral.event
import pygame... | Make this more like a real python module. | Make this more like a real python module.
| Python | lgpl-2.1 | platipy/spyral | ---
+++
@@ -1,3 +1,11 @@
+"""
+Spyral, an awesome library for making games.
+"""
+
+__version__ = '0.1'
+__license__ = 'LGPLv2'
+__author__ = 'Robert Deaton'
+
import spyral.memoize
import spyral.point
import spyral.camera |
7b1f62b9eb561680d73daa2c201040850352727b | __init__.py | __init__.py | import account
import account_move
import account_move_line
import partner
import account_voucher_line
import payment_selection
import wizard
import res_user
| import account
import account_move
import account_move_line
import partner
import account_voucher
import account_voucher_line
import payment_selection
import wizard
import res_user
| Fix bug when posting account_voucher in the case voucher line were in company currency Voucher computation considered a 100% exchange difference instead of ignoring the foreign amount computation. | Fix bug when posting account_voucher in the case voucher line were in company currency
Voucher computation considered a 100% exchange difference instead of ignoring the foreign
amount computation.
| Python | agpl-3.0 | xcgd/account_streamline | ---
+++
@@ -2,6 +2,7 @@
import account_move
import account_move_line
import partner
+import account_voucher
import account_voucher_line
import payment_selection
import wizard |
f1ac6853d9502023462b5d55dc16c45658733a4a | plugins/chrome_extensions.py | plugins/chrome_extensions.py | ###################################################################################################
#
# chrome_extensions.py
# Adds the name and description of each Chrome extension found in a URLItem to the Interpretation field
#
# Plugin Author: Ryan Benson (ryan@obsidianforensics.com)
#
###########################... | ###################################################################################################
#
# chrome_extensions.py
# Adds the name and description of each Chrome extension found in a URLItem to the Interpretation field
#
# Plugin Author: Ryan Benson (ryan@obsidianforensics.com)
#
###########################... | Update to work with new method of storing extension data. | Update to work with new method of storing extension data.
| Python | apache-2.0 | obsidianforensics/hindsight,obsidianforensics/hindsight | ---
+++
@@ -16,7 +16,7 @@
remoteLookups = 0
browser = "Chrome"
browserVersion = 1
-version = "20140813"
+version = "20150117"
parsedItems = 0
@@ -29,7 +29,7 @@
if item.interpretation is None:
m = re.search(extension_re, item.url)
if m:
- for ex... |
11ac44c41d9cd3431b7f2cc833656665c8a9947b | reddit_adzerk/adzerkads.py | reddit_adzerk/adzerkads.py | from urllib import quote
from pylons import c, g
from r2.lib.pages import Ads as BaseAds
class Ads(BaseAds):
def __init__(self):
BaseAds.__init__(self)
url_key = "adzerk_https_url" if c.secure else "adzerk_url"
site_name = getattr(c.site, "analytics_name", c.site.name)
self.ad_u... | from urllib import quote
from pylons import c, g
from r2.lib.pages import Ads as BaseAds
from r2.models.subreddit import DefaultSR
class Ads(BaseAds):
def __init__(self):
BaseAds.__init__(self)
url_key = "adzerk_https_url" if c.secure else "adzerk_url"
site_name = getattr(c.site, "analy... | Change frontpage keyword to "-reddit.com". | Change frontpage keyword to "-reddit.com".
| Python | bsd-3-clause | madbook/reddit-plugin-adzerk,madbook/reddit-plugin-adzerk,madbook/reddit-plugin-adzerk | ---
+++
@@ -3,6 +3,7 @@
from pylons import c, g
from r2.lib.pages import Ads as BaseAds
+from r2.models.subreddit import DefaultSR
class Ads(BaseAds):
@@ -11,6 +12,11 @@
url_key = "adzerk_https_url" if c.secure else "adzerk_url"
site_name = getattr(c.site, "analytics_name", c.site.name)
+... |
3b773f6b046215e8ef1a8cc701f9200bc7078964 | test_octave_kernel.py | test_octave_kernel.py | """Example use of jupyter_kernel_test, with tests for IPython."""
import unittest
import jupyter_kernel_test as jkt
class OctaveKernelTests(jkt.KernelTests):
kernel_name = "octave"
language_name = "octave"
code_hello_world = "disp('hello, world')"
completion_samples = [
{
'text... | """Example use of jupyter_kernel_test, with tests for IPython."""
import unittest
import jupyter_kernel_test as jkt
class OctaveKernelTests(jkt.KernelTests):
kernel_name = "octave"
language_name = "octave"
code_hello_world = "disp('hello, world')"
code_display_data = [
{'code': '%plot -f p... | Add plot handling to test | Add plot handling to test
| Python | bsd-3-clause | Calysto/octave_kernel,Calysto/octave_kernel | ---
+++
@@ -11,6 +11,11 @@
code_hello_world = "disp('hello, world')"
+ code_display_data = [
+ {'code': '%plot -f png\nplot([1,2,3])', 'mime': 'image/png'},
+ {'code': '%plot -f svg\nplot([1,2,3])', 'mime': 'image/svg+xml'}
+ ]
+
completion_samples = [
{
'text':... |
35b8dd77be54872bcf17b62e288cd4a2b5a37e5a | viper.py | viper.py | #!/usr/bin/env python3
from viper.interactive import *
from viper.lexer import lex_file
from viper.grammar import GRAMMAR
if __name__ == '__main__':
import argparse
parser = argparse.ArgumentParser()
parser.add_argument('-L', '--interactive-lexer', action='store_true', help='lexes input')
parser.add_... | #!/usr/bin/env python3
from viper.interactive import *
from viper.lexer import lex_file, NewLine
from viper.grammar import GRAMMAR
if __name__ == '__main__':
import argparse
parser = argparse.ArgumentParser()
parser.add_argument('-L', '--interactive-lexer', action='store_true', help='lexes input')
pa... | Add CLI option for outputting lexed files | Add CLI option for outputting lexed files
| Python | apache-2.0 | pdarragh/Viper | ---
+++
@@ -1,7 +1,7 @@
#!/usr/bin/env python3
from viper.interactive import *
-from viper.lexer import lex_file
+from viper.lexer import lex_file, NewLine
from viper.grammar import GRAMMAR
@@ -9,6 +9,7 @@
import argparse
parser = argparse.ArgumentParser()
parser.add_argument('-L', '--interact... |
f9cc9e73774f2d3f4a9525e174976b912ba2bbba | ci/release.py | ci/release.py | import os
import sys
import xmlrpclib
from shutil import rmtree
from subprocess import check_call
TEMP_DIR = 'tmp'
PROJECT_NAME = 'cctrl'
DIST_DIR = os.path.join(TEMP_DIR, 'dist')
def main():
if is_current_version():
sys.exit("Version is not updated. Aborting release.")
dist()
cleanup()
def i... | import os
import sys
import xmlrpclib
from shutil import rmtree
from subprocess import check_call
TEMP_DIR = 'tmp'
PROJECT_NAME = 'cctrl'
DIST_DIR = os.path.join(TEMP_DIR, 'dist')
def main():
if is_current_version():
sys.exit("Version is not updated. Aborting release.")
dist()
cleanup()
def i... | Exit with error if dist upload fails | ci: Exit with error if dist upload fails
| Python | apache-2.0 | cloudControl/cctrl,cloudControl/cctrl | ---
+++
@@ -32,7 +32,8 @@
'--formats=gztar',
'upload'])
except OSError as e:
- print e
+ cleanup()
+ sys.exit(e)
def cleanup(): |
7512f4b5fb5ebad5781e76ecd61c0e2d24b54f6c | projects/urls.py | projects/urls.py | from django.conf import settings
from django.conf.urls import include, url
from django.views.generic import TemplateView
# Uncomment the next two lines to enable the admin:
from django.contrib import admin
admin.autodiscover()
# Include any views
from . import views
urlpatterns = [
url(r'^$', views.index, name... | # This file is part of the FragDev Website.
#
# the FragDev Website is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# the FragDev W... | Add license statement, removed unused code, and set up the project URL mapping | Add license statement, removed unused code, and set up the project URL mapping
| Python | agpl-3.0 | lo-windigo/fragdev,lo-windigo/fragdev | ---
+++
@@ -1,25 +1,23 @@
-from django.conf import settings
-from django.conf.urls import include, url
-from django.views.generic import TemplateView
+# This file is part of the FragDev Website.
+#
+# the FragDev Website is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General... |
e336b9d7648a9705f525905ba994f0b3612189a6 | tests/test_convert.py | tests/test_convert.py | import pytest # type: ignore
from hypothesis import given
from ppb_vector import Vector2
from utils import vector_likes, vectors
class V(Vector2): pass
@pytest.mark.parametrize('vector_like', vector_likes(), ids=lambda x: type(x).__name__) # type: ignore
@pytest.mark.parametrize('cls', [Vector2, V]) # type: ignore
... | import pytest # type: ignore
from hypothesis import given
from ppb_vector import Vector2
from utils import vector_likes, vectors
class V(Vector2): pass
@pytest.mark.parametrize('vector_like', vector_likes(), ids=lambda x: type(x).__name__) # type: ignore
@pytest.mark.parametrize('cls', [Vector2, V]) # type: ignore
... | Add a round-trip test for tuple and list conversions | tests/convert: Add a round-trip test for tuple and list conversions
| Python | artistic-2.0 | ppb/ppb-vector,ppb/ppb-vector | ---
+++
@@ -21,3 +21,9 @@
@given(vector=vectors())
def test_convert_list(vector: Vector2):
assert vector == list(vector) == [vector.x, vector.y]
+
+
+@pytest.mark.parametrize('coerce', [tuple, list])
+@given(x=vectors())
+def test_convert_roundtrip(coerce, x: Vector2):
+ assert x == Vector2(coerce(x)) |
d71b2f3b8943465ebe04aa9926cba0159402da96 | tests/test_sorting.py | tests/test_sorting.py | import os
from textwrap import dedent
from autosort.sorting import sort_imports
def test_regular():
path = os.path.abspath('test.py')
rv = sort_imports(dedent('''
from tokenize import COMMENT, INDENT, ENDMARKER
from tokenize import (DEDENT, # noqa
NEWLINE, STRING,
... | import os
from textwrap import dedent
from autosort.sorting import sort_imports
def test_regular():
path = os.path.abspath('test.py')
rv = sort_imports(dedent('''\
from tokenize import COMMENT, INDENT, ENDMARKER
from tokenize import (DEDENT, # noqa
NEWLINE, STRING,
... | Remove leading empty line in multiline test | Remove leading empty line in multiline test
| Python | mit | fbergroth/autosort | ---
+++
@@ -6,7 +6,7 @@
def test_regular():
path = os.path.abspath('test.py')
- rv = sort_imports(dedent('''
+ rv = sort_imports(dedent('''\
from tokenize import COMMENT, INDENT, ENDMARKER
from tokenize import (DEDENT, # noqa
NEWLINE, STRING,
@@ -16,5 +16,4 @@
... |
42bd3f35445e5995b0affc61c4b5a4c226587ae4 | debugtools/__init__.py | debugtools/__init__.py | # following PEP 440
__version__ = "1.5"
VERSION = (1, 5)
import django
if django.VERSION < (1,9):
# Make sure the ``{% print %}`` is always available, even without a {% load debugtools_tags %} call.
# This feature is no longer available in Django 1.9, which adds an explicit configuration for it:
# see: ht... | # following PEP 440
__version__ = "1.5"
VERSION = (1, 5)
import django
if django.VERSION < (1,9):
# Make sure the ``{% print %}`` is always available, even without a {% load debugtools_tags %} call.
# This feature is no longer available in Django 1.9, which adds an explicit configuration for it:
# see: ht... | Fix own deprecation warning for django < 1.9 | Fix own deprecation warning for django < 1.9
| Python | apache-2.0 | edoburu/django-debugtools,edoburu/django-debugtools,edoburu/django-debugtools | ---
+++
@@ -13,4 +13,4 @@
# and not a tag that should remain permanently in your templates. Convenience is preferred here.
#
from django.template.base import add_to_builtins
- add_to_builtins("debugtools.templatetags.debug_tags")
+ add_to_builtins("debugtools.templatetags.debugtools_tags") |
8415776bb4d5b402aef43ab777072060420bd6b4 | cloudly/ccouchdb.py | cloudly/ccouchdb.py | import os
import couchdb
from cloudly.memoized import Memoized
import cloudly.logger as logger
log = logger.init(__name__)
@Memoized
def get_server(hostname=None, port=5984, username=None, password=None):
port = 5984
host = hostname or os.environ.get("COUCHDB_HOST", "127.0.0.1")
url = "http://{host}:{p... | import os
import yaml
import couchdb
from cloudly.memoized import Memoized
import cloudly.logger as logger
log = logger.init(__name__)
@Memoized
def get_server(hostname=None, port=None, username=None, password=None):
host = hostname or os.environ.get("COUCHDB_HOST", "127.0.0.1")
port = port or os.environ.g... | Add auth and a function to sync a design doc. | Add auth and a function to sync a design doc.
With environment variables COUCHDB_USERNAME and COUCHDB_PASSWORD defined, will
connect as that user.
Now uses COUCHDB_PORT if defined.
Add a function to save a design document defined as a YAML file. Why YAML?
Because it's very easy to add Javascript code with syntax hig... | Python | mit | ooda/cloudly,ooda/cloudly | ---
+++
@@ -1,4 +1,5 @@
import os
+import yaml
import couchdb
@@ -9,13 +10,11 @@
@Memoized
-def get_server(hostname=None, port=5984, username=None, password=None):
- port = 5984
+def get_server(hostname=None, port=None, username=None, password=None):
host = hostname or os.environ.get("COUCHDB_HOST"... |
f70e0ec9ac51928fbd5ff9159859a9116227c3b9 | pyglab/pyglab.py | pyglab/pyglab.py | _defaults = {
'api_url': 'api/v3',
}
from .apirequest import ApiRequest, RequestType
from .users import Users
class Pyglab(object):
def __init__(self, url, token, api_url=_defaults['api_url']):
self._base_url = url.rstrip('/') + '/' + api_url.strip()
self._token = token
self._user = No... | _defaults = {
'api_url': 'api/v3',
}
from .apirequest import ApiRequest, RequestType
from .users import Users
class Pyglab(object):
def __init__(self, url, token, api_url=_defaults['api_url']):
self._base_url = url.rstrip('/') + '/' + api_url.strip()
self._token = token
self._user = No... | Add capability to login through (name|email), password combination. | Add capability to login through (name|email), password combination.
| Python | mit | sloede/pyglab,sloede/pyglab | ---
+++
@@ -31,3 +31,15 @@
@property
def users(self):
return Users(self)
+
+ @staticmethod
+ def login(username, password, email=None):
+ if username is None and email is None:
+ raise ValueError('Cannot both be `None`: `username` and `email`')
+ params = {'password':... |
3764bd2303df873d93a2d75311b27c9c632409b4 | awx/wsgi.py | awx/wsgi.py | # Copyright (c) 2014 AnsibleWorks, Inc.
# All Rights Reserved.
"""
WSGI config for AWX project.
It exposes the WSGI callable as a module-level variable named ``application``.
For more information on this file, see
https://docs.djangoproject.com/en/dev/howto/deployment/wsgi/
"""
# Prepare the AWX environment.
from a... | # Copyright (c) 2014 AnsibleWorks, Inc.
# All Rights Reserved.
"""
WSGI config for AWX project.
It exposes the WSGI callable as a module-level variable named ``application``.
For more information on this file, see
https://docs.djangoproject.com/en/dev/howto/deployment/wsgi/
"""
# Prepare the AWX environment.
from a... | Reword errors when version metadata does not match or is absent | Reword errors when version metadata does not match or is absent
| Python | apache-2.0 | snahelou/awx,wwitzel3/awx,wwitzel3/awx,snahelou/awx,wwitzel3/awx,wwitzel3/awx,snahelou/awx,snahelou/awx | ---
+++
@@ -22,11 +22,10 @@
try:
fd = open("/var/lib/awx/.tower_version", "r")
if fd.read().strip() != tower_version:
- logger.error("Tower Versions don't match, potential invalid setup detected")
- raise Exception("Tower Versions don't match, potential invalid setup detected")
+ raise... |
75075e85ef82aabee2a261b6a58502b32c60d348 | tests/test_project/gallery/models.py | tests/test_project/gallery/models.py | from django.db import models
from pyuploadcare.dj.models import FileField, ImageField, ImageGroupField
class Gallery(models.Model):
title = models.CharField(max_length=255)
def __unicode__(self):
return self.title
class Photo(models.Model):
gallery = models.ForeignKey(Gallery)
title = mo... | from django.db import models
from pyuploadcare.dj.models import FileField, ImageField, ImageGroupField
class Gallery(models.Model):
title = models.CharField(max_length=255)
def __unicode__(self):
return self.title
class Photo(models.Model):
gallery = models.ForeignKey(Gallery, on_delete=mode... | Add `on_delete` argument for `Photo.gallery` field | Add `on_delete` argument for `Photo.gallery` field
| Python | mit | uploadcare/pyuploadcare | ---
+++
@@ -13,7 +13,7 @@
class Photo(models.Model):
- gallery = models.ForeignKey(Gallery)
+ gallery = models.ForeignKey(Gallery, on_delete=models.CASCADE)
title = models.CharField(max_length=255)
arbitrary_file = FileField(blank=True, null=True)
photo_2x3 = ImageField(manual_crop='2:3', bl... |
f49857658b992240eaf6627d153afb4808e366fb | warehouse/defaults.py | warehouse/defaults.py | from __future__ import absolute_import
from __future__ import division
from __future__ import unicode_literals
# The base domain name for this installation. Used to control linking to
# sub-domains.
SERVER_NAME = "warehouse.local:5000"
# The URI for our PostgreSQL database.
SQLALCHEMY_DATABASE_URI = "postgres://... | from __future__ import absolute_import
from __future__ import division
from __future__ import unicode_literals
# The base domain name for this installation. Used to control linking to
# sub-domains.
SERVER_NAME = "warehouse.local:5000"
# The URI for our PostgreSQL database.
SQLALCHEMY_DATABASE_URI = "postgres://... | Configure the default STORAGE_OPTION to enable a dummy url | Configure the default STORAGE_OPTION to enable a dummy url
| Python | bsd-2-clause | davidfischer/warehouse | ---
+++
@@ -19,6 +19,7 @@
STORAGE_OPTIONS = {
"location": "data",
"hash_algorithm": "md5",
+ "base_url": "https://files.warehouse.local:5000/",
}
# What type of hash to use when displaying a hashed uri for files |
e69b43a559044ecde0ffa79ea3ea4773aa527a88 | project/urls.py | project/urls.py | from django.conf.urls import patterns, url, include
from django.conf import settings
from django.contrib import admin
from django.core.urlresolvers import reverse_lazy
from django.views.generic.base import RedirectView
import competition
admin.autodiscover()
urlpatterns = patterns(
'',
url(r'^$', RedirectVi... | from django.conf.urls import patterns, url, include
from django.conf import settings
from django.contrib import admin
from django.core.urlresolvers import reverse_lazy
from django.views.generic.base import RedirectView
import competition
admin.autodiscover()
urlpatterns = patterns(
'',
url(r'^$', RedirectVi... | Set RedirectView.permanent to True to match old default settings | Set RedirectView.permanent to True to match old default settings
| Python | bsd-3-clause | michaelwisely/django-competition,michaelwisely/django-competition,michaelwisely/django-competition | ---
+++
@@ -11,7 +11,7 @@
urlpatterns = patterns(
'',
- url(r'^$', RedirectView.as_view(url=reverse_lazy('competition_list'))),
+ url(r'^$', RedirectView.as_view(permanent=True,url=reverse_lazy('competition_list'))),
url(r'', include(competition.urls)),
url(r'^admin/', include(admin.site.urls)... |
272ece1774cebaf8d6d6ae9e0dfb5fe0cce97083 | manage.py | manage.py | #!/usr/bin/env python
import os
import sys
if __name__ == '__main__':
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'conductor.settings.development')
if 'test' in sys.argv:
# For now, fake setting the environment for testing.
os.environ['DJANGO_SETTINGS_MODULE'] = 'conductor.settings.test'
... | #!/usr/bin/env python
import os
import sys
if __name__ == '__main__':
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'conductor.settings.development')
if 'test' in sys.argv:
# For now, fake setting the environment for testing.
os.environ['DJANGO_SETTINGS_MODULE'] = 'conductor.settings.test'
... | Add missing env variables for testing. | Add missing env variables for testing.
| Python | bsd-2-clause | mblayman/lcp,mblayman/lcp,mblayman/lcp | ---
+++
@@ -8,7 +8,9 @@
if 'test' in sys.argv:
# For now, fake setting the environment for testing.
os.environ['DJANGO_SETTINGS_MODULE'] = 'conductor.settings.test'
+ os.environ['CORS_ORIGIN_WHITELIST'] = 'localhost:4200'
os.environ['SECRET_KEY'] = 'asecrettoeverybody'
+ ... |
ae629597067817457db9e86121dde7f6ee3a2b7d | stagecraft/libs/request_logger/middleware.py | stagecraft/libs/request_logger/middleware.py | # encoding: utf-8
from __future__ import unicode_literals
import logging
import time
logger = logging.getLogger(__name__)
class RequestLoggerMiddleware(object):
def process_request(self, request):
self.request_time = time.time()
logger.info("{method} {path}".format(
method=request.m... | # encoding: utf-8
from __future__ import unicode_literals
import logging
import time
logger = logging.getLogger(__name__)
class RequestLoggerMiddleware(object):
def process_request(self, request):
request.start_request_time = time.time()
logger.info("{method} {path}".format(
method=... | Fix thread-safety issue in stagecraft | Fix thread-safety issue in stagecraft
Django middleware is not thread-safe. We should store this context on
the request object instance.
Django always calls `process_response`, but it is possible that
`process_request` has been skipped. So we have a guard checking that
it’s safe to log the response time.
See https:/... | Python | mit | alphagov/stagecraft,alphagov/stagecraft,alphagov/stagecraft,alphagov/stagecraft | ---
+++
@@ -10,7 +10,7 @@
class RequestLoggerMiddleware(object):
def process_request(self, request):
- self.request_time = time.time()
+ request.start_request_time = time.time()
logger.info("{method} {path}".format(
method=request.method,
path=request.get_full_... |
bd9fc1b2adea718be089b8370d2e82ea55af6539 | .gitlab/linters/check-cpp.py | .gitlab/linters/check-cpp.py | #!/usr/bin/env python3
# A linter to warn for ASSERT macros which are separated from their argument
# list by a space, which Clang's CPP barfs on
from linter import run_linters, RegexpLinter
linters = [
RegexpLinter(r'WARN\s+\(',
message='CPP macros should not have a space between the macro name... | #!/usr/bin/env python3
# A linter to warn for ASSERT macros which are separated from their argument
# list by a space, which Clang's CPP barfs on
from pathlib import Path
from linter import run_linters, RegexpLinter
linters = [
RegexpLinter(r'WARN\s+\(',
message='CPP macros should not have a spa... | Make CPP linter skip certain files | Make CPP linter skip certain files
- docs which document the lint and need to contain the unutterable
- vendored code which is outside our purview
| Python | bsd-3-clause | sdiehl/ghc,sdiehl/ghc,sdiehl/ghc,sdiehl/ghc,sdiehl/ghc,sdiehl/ghc,sdiehl/ghc | ---
+++
@@ -3,6 +3,7 @@
# A linter to warn for ASSERT macros which are separated from their argument
# list by a space, which Clang's CPP barfs on
+from pathlib import Path
from linter import run_linters, RegexpLinter
linters = [
@@ -20,5 +21,11 @@
message='`#if !defined(x)` is preferred to ... |
edc3a902a64c364168df6c10ebb825bd9e65a974 | basin/urls.py | basin/urls.py | from django.conf.urls import patterns, include, url
from django.contrib import admin
from basin.routers import api_router
admin.autodiscover()
urlpatterns = patterns('',
url(r'^$', 'basin.views.index'),
url(r'^display/', 'basin.views.display'),
url(r'^api/', include(api_router.urls)),
url(r'^admin/',... | from django.conf.urls import patterns, include, url
from django.contrib import admin
from basin.routers import api_router
admin.autodiscover()
urlpatterns = patterns('',
url(r'^$', 'basin.views.display'),
url(r'^backbone/', 'basin.views.index'),
url(r'^api/', include(api_router.urls)),
url(r'^admin/'... | Move static mockup to root | Move static mockup to root
| Python | mit | Pringley/basinweb,Pringley/basinweb | ---
+++
@@ -6,8 +6,8 @@
admin.autodiscover()
urlpatterns = patterns('',
- url(r'^$', 'basin.views.index'),
- url(r'^display/', 'basin.views.display'),
+ url(r'^$', 'basin.views.display'),
+ url(r'^backbone/', 'basin.views.index'),
url(r'^api/', include(api_router.urls)),
url(r'^admin/', incl... |
31f1685d2e2471cf272f7b249e59ef59829ed47f | doc/examples/pyglet_.py | doc/examples/pyglet_.py | # -*- coding: utf-8 -*-
from __future__ import absolute_import
import pyglet
from pyglet import gl
import imgui
from imgui.integrations.pyglet import PygletRenderer
def main():
window = pyglet.window.Window(width=800, height=600, resizable=True)
gl.glClearColor(1, 1, 1, 1)
renderer = PygletRenderer(win... | # -*- coding: utf-8 -*-
from __future__ import absolute_import
import pyglet
from pyglet import gl
import imgui
from imgui.integrations.pyglet import PygletRenderer
def main():
window = pyglet.window.Window(width=1280, height=720, resizable=True)
gl.glClearColor(1, 1, 1, 1)
renderer = PygletRenderer(wi... | Make the window in the pyglet example larger. | Make the window in the pyglet example larger.
| Python | bsd-3-clause | swistakm/pyimgui,swistakm/pyimgui,swistakm/pyimgui,swistakm/pyimgui | ---
+++
@@ -10,7 +10,7 @@
def main():
- window = pyglet.window.Window(width=800, height=600, resizable=True)
+ window = pyglet.window.Window(width=1280, height=720, resizable=True)
gl.glClearColor(1, 1, 1, 1)
renderer = PygletRenderer(window)
|
cec10f55b280311161033ad3c9457b20822f7353 | geotrek/outdoor/migrations/0003_auto_20201214_1408.py | geotrek/outdoor/migrations/0003_auto_20201214_1408.py | # Generated by Django 3.1.4 on 2020-12-14 14:08
from django.conf import settings
import django.contrib.gis.db.models.fields
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('outdoor', '0002_practice_sitepractice'),
]
... | # Generated by Django 3.1.4 on 2020-12-14 14:08
from django.conf import settings
import django.contrib.gis.db.models.fields
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('outdoor', '0002_practice_sitepractice'),
]
... | Fix migration Site geom to GeometryCollection | Fix migration Site geom to GeometryCollection
| Python | bsd-2-clause | GeotrekCE/Geotrek-admin,GeotrekCE/Geotrek-admin,makinacorpus/Geotrek,GeotrekCE/Geotrek-admin,makinacorpus/Geotrek,GeotrekCE/Geotrek-admin,makinacorpus/Geotrek,makinacorpus/Geotrek | ---
+++
@@ -17,10 +17,17 @@
name='site',
options={'ordering': ('name',), 'verbose_name': 'Outdoor site', 'verbose_name_plural': 'Outdoor sites'},
),
- migrations.AlterField(
- model_name='site',
- name='geom',
- field=django.contrib.gis.db.mod... |
e824d8ad284603b73df48f1a413b129280318937 | examples/annotation.py | examples/annotation.py | # encoding: utf-8
"""Basic class-based demonstration application.
Applications can be as simple or as complex and layered as your needs dictate.
"""
class Root(object):
def __init__(self, context):
self._ctx = context
def mul(self, a: int = None, b: int = None) -> 'json':
if not a and not b... | # encoding: utf-8
"""Basic class-based demonstration application.
Applications can be as simple or as complex and layered as your needs dictate.
"""
class Root(object):
def __init__(self, context):
self._ctx = context
def mul(self, a: int = None, b: int = None) -> 'json':
"""Multiply two va... | Split the HTTPServer line into multiple. | Split the HTTPServer line into multiple.
Also added comments and a docstring, since this is an example after all. | Python | mit | marrow/WebCore,marrow/WebCore | ---
+++
@@ -11,6 +11,27 @@
self._ctx = context
def mul(self, a: int = None, b: int = None) -> 'json':
+ """Multiply two values together and return the result via JSON.
+
+ Python 3 function annotations are used to ensure that the arguments are integers. This requires the
+ ... |
1c76ec9c600b6a85f7a9a48b72c1c6c4f447ec24 | capstone/player.py | capstone/player.py | import abc
import six
@six.add_metaclass(abc.ABCMeta)
class Player(object):
'''Interface for a Player of a Game'''
@abc.abstractmethod
def choose_move(self, move):
pass
| import abc
import six
@six.add_metaclass(abc.ABCMeta)
class Player(object):
'''Interface for a Player of a Game'''
@abc.abstractmethod
def choose_move(self, game):
'''Returns the chosen move from game.legal_moves().'''
pass
| Rename move parameter to game | Rename move parameter to game
| Python | mit | davidrobles/mlnd-capstone-code | ---
+++
@@ -7,5 +7,6 @@
'''Interface for a Player of a Game'''
@abc.abstractmethod
- def choose_move(self, move):
+ def choose_move(self, game):
+ '''Returns the chosen move from game.legal_moves().'''
pass |
ca321b449f16d966bccf3d30680819b6dafa00bc | normalize_data.py | normalize_data.py | import numpy as np
from sklearn import preprocessing as pp
print('normalization function imported')
#normalize data in respect with keys in dictionary
def normalize_data(data):
# get keys from original data
gestures = list(data)
# create empty dictionary to store normalized data with gestures
gda... | import numpy as np
from sklearn import preprocessing as pp
print('normalization function imported')
#normalize data in respect with keys in dictionary
def normalize_data(data):
# get keys from original data
gestures = list(data)
# create empty dictionary to store normalized data with gestures
gda... | Replace integer indices with ellipsis | Replace integer indices with ellipsis
| Python | mit | JustinShenk/sonic-face,JustinShenk/sonic-face | ---
+++
@@ -14,12 +14,12 @@
# get max/min of x/y across samples and frames
for gesture in gestures:
data_gesture = np.asarray(data[gesture])
- max_x = np.max(data_gesture[:,:,:,:,0])
- min_x = np.min(data_gesture[:,:,:,:,0])
- max_y = np.max(data_gesture[:,:,:,:,1])
- mi... |
1406d59a2588bc796404d8dde906f85e8169dc6f | xirvik/test/test_util.py | xirvik/test/test_util.py | import unittest
from bencodepy import encode as bencode
from xirvik.util import verify_torrent_contents, VerificationError
def create_torrent(path, save_to=None, piece_length=256):
pass
def create_random_data_file(path, size=2306867):
"""size is intentionally a non-power of 2"""
pass
class TestTorre... | import unittest
from bencodepy import encode as bencode
from xirvik.util import verify_torrent_contents, VerificationError
def create_torrent(path, save_to=None, piece_length=256):
pass
def create_random_data_file(path, size=2306867):
"""size is intentionally a non-power of 2"""
pass
class TestTorre... | Comment out unfinished test in util | Comment out unfinished test in util
| Python | mit | Tatsh/xirvik-tools | ---
+++
@@ -29,8 +29,8 @@
}
})
- def test_verify_torrent_contents(self):
- verify_torrent_contents()
+ #def test_verify_torrent_contents(self):
+ #verify_torrent_contents()
if __name__ == '__main__': |
b13a92bb9c7c2aa495a3f1dc1ddf10235868b068 | chinup/settings.py | chinup/settings.py | from __future__ import absolute_import, unicode_literals
APP_TOKEN = None
DEBUG = False
DEBUG_REQUESTS = DEBUG
DEBUG_HEADERS = False
TESTING = False
ETAGS = True
CACHE = None
try:
from django.conf import settings
except ImportError:
pass
else:
for name in dir(settings):
if name.startswith('CHINU... | from __future__ import absolute_import, unicode_literals
APP_TOKEN = None
DEBUG = False
DEBUG_REQUESTS = DEBUG
DEBUG_HEADERS = False
TESTING = False
ETAGS = True
CACHE = None
try:
from django.conf import settings
except ImportError:
pass
else:
for name in dir(settings):
if name.startswith('CHINU... | Fix RuntimeError: dictionary changed size during iteration | Fix RuntimeError: dictionary changed size during iteration
| Python | mit | pagepart/chinup | ---
+++
@@ -20,4 +20,4 @@
locals()[name[7:]] = getattr(settings, name)
-__all__ = [name for name in locals() if name.isupper()]
+__all__ = [name for name in locals().keys() if name.isupper()] |
a6702e839eec2b4d6d75f4126ed975456e9795dc | contacts/middleware.py | contacts/middleware.py | import logging
from django.http import Http404
from gargoyle import gargoyle
from contacts.models import Book
sentry = logging.getLogger('sentry')
class ContactBookMiddleware(object):
def process_view(self, request, view_func, view_args, view_kwargs):
if hasattr(request, 'user'):
if request.... | import logging
from django.http import Http404
from gargoyle import gargoyle
from contacts.models import Book
sentry = logging.getLogger('sentry')
class ContactBookMiddleware(object):
def process_view(self, request, view_func, view_args, view_kwargs):
# CONTRACT: At the end of this, if the user is authen... | Update ContactBook Middleware to obey contract | Update ContactBook Middleware to obey contract
| Python | mit | phildini/logtacts,phildini/logtacts,phildini/logtacts,phildini/logtacts,phildini/logtacts | ---
+++
@@ -8,28 +8,29 @@
class ContactBookMiddleware(object):
def process_view(self, request, view_func, view_args, view_kwargs):
-
+ # CONTRACT: At the end of this, if the user is authenticate,
+ # request.current_book _must_ be populated with a valid book, and
+ # request.books _must_... |
32410e639f3202c10d9c75083319a9ab81932b82 | client/api.py | client/api.py | # Client uses HTTP API
import os
import sys
import json
import urllib
import urllib2
import cookielib
sys.path.append((os.path.dirname(__file__) or ".") + "/../")
import config
cj = cookielib.CookieJar()
def callapi(action, postdata={}):
postdata.update({"action": action})
opener = urllib2.build_opener(urll... | # Client uses HTTP API
import os
import sys
import json
import urllib
import httplib
import urllib2
import cookielib
sys.path.append((os.path.dirname(__file__) or ".") + "/../")
import config
cj = cookielib.CookieJar()
class HTTPSClientAuthHandler(urllib2.HTTPSHandler):
def __init__(self, key):
urllib2.... | Use ssl client cert if given. | Use ssl client cert if given. | Python | agpl-3.0 | vincebusam/pyWebCash,vincebusam/pyWebCash,vincebusam/pyWebCash | ---
+++
@@ -3,6 +3,7 @@
import sys
import json
import urllib
+import httplib
import urllib2
import cookielib
@@ -12,9 +13,26 @@
cj = cookielib.CookieJar()
+class HTTPSClientAuthHandler(urllib2.HTTPSHandler):
+ def __init__(self, key):
+ urllib2.HTTPSHandler.__init__(self)
+ self.key = key... |
f13c08b2793b72f373785d2fa5b004ec79da93d6 | flask_boost/project/application/models/user.py | flask_boost/project/application/models/user.py | # coding: utf-8
from datetime import datetime
from werkzeug.security import generate_password_hash, check_password_hash
from ._base import db
class User(db.Model):
id = db.Column(db.Integer, primary_key=True)
name = db.Column(db.String(50), unique=True)
email = db.Column(db.String(50), unique=True)
av... | # coding: utf-8
from datetime import datetime
from werkzeug.security import generate_password_hash, check_password_hash
from ._base import db
from ..utils.uploadsets import avatars
class User(db.Model):
id = db.Column(db.Integer, primary_key=True)
name = db.Column(db.String(50), unique=True)
email = db.Co... | Add avatar_url property to User. | Add avatar_url property to User.
| Python | mit | 1045347128/Flask-Boost,hustlzp/Flask-Boost,hustlzp/Flask-Boost,1045347128/Flask-Boost,1045347128/Flask-Boost,1045347128/Flask-Boost,hustlzp/Flask-Boost,hustlzp/Flask-Boost | ---
+++
@@ -2,13 +2,14 @@
from datetime import datetime
from werkzeug.security import generate_password_hash, check_password_hash
from ._base import db
+from ..utils.uploadsets import avatars
class User(db.Model):
id = db.Column(db.Integer, primary_key=True)
name = db.Column(db.String(50), unique=Tr... |
4bf955998c6f25d79105de067ceaa74a5023385c | bot/action/standard/asynchronous.py | bot/action/standard/asynchronous.py | from bot.action.core.action import IntermediateAction
from bot.multithreading.work import Work
class AsynchronousAction(IntermediateAction):
def __init__(self, name: str, min_workers: int = 1, max_workers: int = 4, max_seconds_idle: int = 15):
super().__init__()
self.name = name
self.min_w... | from bot.action.core.action import IntermediateAction
from bot.multithreading.work import Work
class AsynchronousAction(IntermediateAction):
def __init__(self, name: str, min_workers: int = 0, max_workers: int = 4, max_seconds_idle: int = 60):
super().__init__()
self.name = name
self.min_w... | Update AsynchronousAction default values of min_workers to 0 and max_seconds_idle to 60 | Update AsynchronousAction default values of min_workers to 0 and max_seconds_idle to 60
| Python | agpl-3.0 | alvarogzp/telegram-bot,alvarogzp/telegram-bot | ---
+++
@@ -3,7 +3,7 @@
class AsynchronousAction(IntermediateAction):
- def __init__(self, name: str, min_workers: int = 1, max_workers: int = 4, max_seconds_idle: int = 15):
+ def __init__(self, name: str, min_workers: int = 0, max_workers: int = 4, max_seconds_idle: int = 60):
super().__init__()... |
41478d9ef0f8506ebe11ea5746450fe6dca02982 | uplink/clients/io/__init__.py | uplink/clients/io/__init__.py | from uplink.clients.io.interfaces import (
Client,
Executable,
IOStrategy,
RequestTemplate,
)
from uplink.clients.io.execution import RequestExecutionBuilder
from uplink.clients.io.templates import CompositeRequestTemplate
from uplink.clients.io.blocking_strategy import BlockingStrategy
from uplink.clie... | from uplink.clients.io.interfaces import (
Client,
Executable,
IOStrategy,
RequestTemplate,
)
from uplink.clients.io.execution import RequestExecutionBuilder
from uplink.clients.io.templates import CompositeRequestTemplate
from uplink.clients.io.blocking_strategy import BlockingStrategy
__all__ = [
... | Remove mandatory dependency on twisted | Remove mandatory dependency on twisted
| Python | mit | prkumar/uplink | ---
+++
@@ -7,7 +7,6 @@
from uplink.clients.io.execution import RequestExecutionBuilder
from uplink.clients.io.templates import CompositeRequestTemplate
from uplink.clients.io.blocking_strategy import BlockingStrategy
-from uplink.clients.io.twisted_strategy import TwistedStrategy
__all__ = [
"Client",
@@ ... |
e0f6dba294e062d0a93b7cdf8a6c8fc1557671a2 | cmsplugin_simple_markdown/models.py | cmsplugin_simple_markdown/models.py | from django.db import models
from django.utils.translation import ugettext_lazy as _
from cms.models.pluginmodel import CMSPlugin
class SimpleMarkdownPlugin(CMSPlugin):
markdown_text = models.TextField(verbose_name=_('text'))
def __unicode__(self):
return self.markdown_text
| import threading
from django.db import models
from django.utils.translation import ugettext_lazy as _
from cms.models.pluginmodel import CMSPlugin
from cmsplugin_simple_markdown import utils
localdata = threading.local()
localdata.TEMPLATE_CHOICES = utils.autodiscover_templates()
TEMPLATE_CHOICES = localdata.TEMPLATE... | Add template field to SimpleMarkdownPlugin model | Add template field to SimpleMarkdownPlugin model
| Python | bsd-3-clause | Alir3z4/cmsplugin-simple-markdown,Alir3z4/cmsplugin-simple-markdown | ---
+++
@@ -1,10 +1,24 @@
+import threading
from django.db import models
from django.utils.translation import ugettext_lazy as _
from cms.models.pluginmodel import CMSPlugin
+from cmsplugin_simple_markdown import utils
+
+
+localdata = threading.local()
+localdata.TEMPLATE_CHOICES = utils.autodiscover_templates()
... |
e288e8a52df0ac67a24271c40e23ae054e39fa52 | monascaclient/common/monasca_manager.py | monascaclient/common/monasca_manager.py | # (C) Copyright 2014 Hewlett Packard Enterprise Development Company LP
#
# 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... | # (C) Copyright 2014 Hewlett Packard Enterprise Development Company LP
#
# 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... | Fix metric dimensions having only key | Fix metric dimensions having only key
When metric dimensions have only key, query parameter will be ending with
':' delimiter. But api can not handle this query parameter.
So change to eliminate ':' delimiter when metric dimensions have only key.
Change-Id: I1327f8fe641fe98cf16c28911ef19908468d1bc0
| Python | apache-2.0 | openstack/python-monascaclient,stackforge/python-monascaclient,sapcc/python-monascaclient,sapcc/python-monascaclient,stackforge/python-monascaclient,openstack/python-monascaclient | ---
+++
@@ -31,6 +31,9 @@
# In case user specifies a dimension multiple times
if isinstance(v, (list, tuple)):
v = v[-1]
- dim_str = k + ':' + v
+ if v:
+ dim_str = k + ':' + v
+ else:
+ dim_str = k
... |
1991dc4c60a338c2a5c3548684160e6ff9e858a2 | examples/expl_google.py | examples/expl_google.py | import re
import mechanicalsoup
# Connect to Google
browser = mechanicalsoup.StatefulBrowser()
browser.open("https://www.google.com/")
# Fill-in the form
browser.select_form('form[action="/search"]')
browser["q"] = "MechanicalSoup"
browser.submit_selected(btnName="btnG")
# Display links
for link in browser.links():
... | import re
import mechanicalsoup
# Connect to Google
browser = mechanicalsoup.StatefulBrowser()
browser.open("https://www.google.com/")
# Fill-in the form
browser.select_form('form[action="/search"]')
browser["q"] = "MechanicalSoup"
# Note: the button name is btnK in the content served to actual
# browsers, but btnG f... | Add comment about button name on google example | Add comment about button name on google example
| Python | mit | MechanicalSoup/MechanicalSoup,hemberger/MechanicalSoup,hickford/MechanicalSoup | ---
+++
@@ -8,6 +8,8 @@
# Fill-in the form
browser.select_form('form[action="/search"]')
browser["q"] = "MechanicalSoup"
+# Note: the button name is btnK in the content served to actual
+# browsers, but btnG for bots.
browser.submit_selected(btnName="btnG")
# Display links |
3ff24c90c9f50c849ea22e7d2d0a5fa11d1e777a | examples/hello-world.py | examples/hello-world.py | # -----------------------------------------------------------------------------
# Copyright (c) 2009-2016 Nicolas P. Rougier. All rights reserved.
# Distributed under the (new) BSD License.
# -----------------------------------------------------------------------------
from glumpy import app, gl, gloo, glm, data, text
... | # -----------------------------------------------------------------------------
# Copyright (c) 2009-2016 Nicolas P. Rougier. All rights reserved.
# Distributed under the (new) BSD License.
# -----------------------------------------------------------------------------
from glumpy import app, gl, gloo, glm, data
from g... | Fix hello world example broken imports | Fix hello world example broken imports
| Python | bsd-3-clause | glumpy/glumpy,glumpy/glumpy | ---
+++
@@ -2,16 +2,25 @@
# Copyright (c) 2009-2016 Nicolas P. Rougier. All rights reserved.
# Distributed under the (new) BSD License.
# -----------------------------------------------------------------------------
-from glumpy import app, gl, gloo, glm, data, text
+from glumpy import app, gl, gloo, glm, data
+fr... |
8545faa94a95ddeabffc444bcaf65e764c0c8712 | fresque/lib/__init__.py | fresque/lib/__init__.py | # -*- coding: utf-8 -*-
'''
Internal library for the fresque application.
This module and all its files contains all the operations independant of the
framework and should be completely covered in unit-tests.
'''
import sqlalchemy as sa
import fresque.lib.database as db
| # -*- coding: utf-8 -*-
'''
Internal library for the fresque application.
This module and all its files contains all the operations independant of the
framework and should be completely covered in unit-tests.
'''
import sqlalchemy as sa
import fresque.lib.database as db
from sqlalchemy.orm import sessionmaker
from ... | Add method to create a database session in the internal library | Add method to create a database session in the internal library
| Python | agpl-3.0 | fedora-infra/fresque,whitel/fresque,rahulrrixe/fresque,whitel/fresque,fedora-infra/fresque,vivekanand1101/fresque,vivekanand1101/fresque,whitel/fresque,rahulrrixe/fresque,rahulrrixe/fresque,vivekanand1101/fresque,fedora-infra/fresque,fedora-infra/fresque,rahulrrixe/fresque,whitel/fresque,vivekanand1101/fresque | ---
+++
@@ -10,3 +10,28 @@
import sqlalchemy as sa
import fresque.lib.database as db
+from sqlalchemy.orm import sessionmaker
+from sqlalchemy.orm import scoped_session
+from sqlalchemy.orm.exc import NoResultFound
+from sqlalchemy.exc import SQLAlchemyError
+
+
+def create_session(db_url, debug=False, pool_recyc... |
fe362e1950e8cc6c993223d7b7236e285e7a368f | neurodsp/plts/utils.py | neurodsp/plts/utils.py | """Utility functions for NeuroDSP plots."""
import matplotlib.pyplot as plt
###################################################################################################
###################################################################################################
def check_ax(ax, figsize=None):
"""Ch... | """Utility functions for NeuroDSP plots."""
from functools import wraps
from os.path import join as pjoin
import matplotlib.pyplot as plt
###################################################################################################
###############################################################################... | Add decorator for saving plts | Add decorator for saving plts
| Python | apache-2.0 | voytekresearch/neurodsp,srcole/neurodsp,srcole/neurodsp | ---
+++
@@ -1,4 +1,7 @@
"""Utility functions for NeuroDSP plots."""
+
+from functools import wraps
+from os.path import join as pjoin
import matplotlib.pyplot as plt
@@ -23,3 +26,21 @@
_, ax = plt.subplots(figsize=figsize)
return ax
+
+
+def savefig(func):
+
+ @wraps(func)
+ def decorated(... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.