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 |
|---|---|---|---|---|---|---|---|---|---|---|
e743bcddbc53d51142f3e1277919a3f65afaad90 | tests/conftest.py | tests/conftest.py | import base64
import betamax
import os
credentials = [os.environ.get('GH_USER', 'foo').encode(),
os.environ.get('GH_PASSWORD', 'bar').encode()]
with betamax.Betamax.configure() as config:
config.cassette_library_dir = 'tests/cassettes'
record_mode = 'never' if os.environ.get('TRAVIS_GH3') else... | import base64
import betamax
import os
credentials = [os.environ.get('GH_USER', 'foo').encode(),
os.environ.get('GH_PASSWORD', 'bar').encode()]
with betamax.Betamax.configure() as config:
config.cassette_library_dir = 'tests/cassettes'
record_mode = 'never' if os.environ.get('TRAVIS_GH3') else... | Revert "For travis, let us print the mode" | Revert "For travis, let us print the mode"
This reverts commit 0c8e9c36219214cf08b33c0ff1812e6cefa53353.
| Python | bsd-3-clause | sigmavirus24/github3.py,agamdua/github3.py,christophelec/github3.py,jim-minter/github3.py,ueg1990/github3.py,degustaf/github3.py,balloob/github3.py,h4ck3rm1k3/github3.py,icio/github3.py,wbrefvem/github3.py,krxsky/github3.py,itsmemattchung/github3.py | ---
+++
@@ -9,7 +9,6 @@
config.cassette_library_dir = 'tests/cassettes'
record_mode = 'never' if os.environ.get('TRAVIS_GH3') else 'once'
- print('Record mode: {0}'.format(record_mode))
config.default_cassette_options['record_mode'] = record_mode
|
166ca44e70221e35a8e0bd36b5b21ba51f7032ca | FAUSTPy/__init__.py | FAUSTPy/__init__.py | """
A set of classes used to dynamically wrap FAUST DSP programs in Python.
This package defines three types:
- PythonUI is an implementation of the UIGlue C struct.
- FAUSTDsp wraps the DSP struct.
- FAUST integrates the other two, sets up the CFFI environment (defines the
data types and API) and compiles the FAUST... | #/usr/bin/env python
"""
A set of classes used to dynamically wrap FAUST DSP programs in Python.
This package defines three types:
- PythonUI is an implementation of the UIGlue C struct.
- FAUSTDsp wraps the DSP struct.
- FAUST integrates the other two, sets up the CFFI environment (defines the
data types and API) ... | Add shebang line to package init file. | Add shebang line to package init file.
| Python | mit | marcecj/faust_python | ---
+++
@@ -1,3 +1,5 @@
+#/usr/bin/env python
+
"""
A set of classes used to dynamically wrap FAUST DSP programs in Python.
|
63a23acabd83cbf32c85ad667da0aed9ae0599e6 | unitTestUtils/parseXML.py | unitTestUtils/parseXML.py | #!/usr/bin/python
# -*- coding: utf-8 -*-
from __future__ import print_function
from xml.etree.ElementTree import ParseError
import xml.etree.ElementTree as ET
import glob
import sys
def eprint(*args, **kwargs):
print(*args, file=sys.stderr, **kwargs)
def parse():
for infile in glob.glob('*.xml'):
tr... | #!/usr/bin/python
# -*- coding: utf-8 -*-
from __future__ import print_function
from xml.etree.ElementTree import ParseError
import xml.etree.ElementTree as ET
import glob
import sys
def eprint(*args, **kwargs):
print(*args, file=sys.stderr, **kwargs)
def parse():
for infile in glob.glob('*.xml'):
tr... | Add more verbose error to reporte on Travis parserXML.py | Add more verbose error to reporte on Travis parserXML.py
| Python | apache-2.0 | wkrzemien/j-pet-framework,wkrzemien/j-pet-framework,wkrzemien/j-pet-framework,wkrzemien/j-pet-framework,wkrzemien/j-pet-framework | ---
+++
@@ -16,8 +16,10 @@
tree = ET.parse(infile)
root = tree.getroot()
if root.findall('.//FatalError'):
+ element=root.findall('.//FatalError')[0]
eprint("Error detected")
print(infile)
+ print(element.text)
... |
1916d1effbad1a26b95594b909c30b3732df3580 | polling_stations/apps/data_collection/management/commands/import_shape_shape.py | polling_stations/apps/data_collection/management/commands/import_shape_shape.py | """
Import COUNCIL
"""
import sys
from data_collection.management.commands import BaseShpShpImporter
class Command(BaseShpShpImporter):
"""
Imports the Polling Station data from COUNCIL
"""
council_id = 'your_councilid'
districts_name = 'name_without_.shp'
stations_name = 'your.shp'
... | """
Import COUNCIL
"""
import sys
from data_collection.management.commands import BaseShpShpImporter
class Command(BaseShpShpImporter):
"""
Imports the Polling Station data from COUNCIL
"""
council_id = 'your_councilid'
districts_name = 'name_without_.shp'
stations_name = 'your.shp'
... | Update Shape&Shape importer - shapes don't have named fields! | Update Shape&Shape importer - shapes don't have named fields!
| Python | bsd-3-clause | DemocracyClub/UK-Polling-Stations,chris48s/UK-Polling-Stations,chris48s/UK-Polling-Stations,andylolz/UK-Polling-Stations,chris48s/UK-Polling-Stations,DemocracyClub/UK-Polling-Stations,andylolz/UK-Polling-Stations,DemocracyClub/UK-Polling-Stations,andylolz/UK-Polling-Stations | ---
+++
@@ -25,8 +25,8 @@
print 'Station', record
sys.exit(1)
return {
- 'internal_council_id': record.internal_id,
- 'postcode' : record.address.split(',')[-1],
- 'address' : "\n".join(record.address.split(',')[:-1]),
+ 'inte... |
cea8c101c64a33b2daedc9b8561a7d8e38f0b958 | setup.py | setup.py | from setuptools import setup, find_packages
setup(
name='WsgiService',
version='0.2',
description="A lean WSGI framework for easy creation of REST services",
author="Patrice Neff",
url='http://github.com/pneff/wsgiservice/tree/master',
packages=find_packages(),
install_requires=[
'de... | from setuptools import setup, find_packages
setup(
name='WsgiService',
version='0.2.1',
description="A lean WSGI framework for easy creation of REST services",
author="Patrice Neff",
url='http://github.com/pneff/wsgiservice/tree/master',
packages=find_packages(),
install_requires=[
'... | Increment version to 0.2.1 (unreleased) for all further changes. | Increment version to 0.2.1 (unreleased) for all further changes.
| Python | bsd-2-clause | pneff/wsgiservice,beekpr/wsgiservice | ---
+++
@@ -1,7 +1,7 @@
from setuptools import setup, find_packages
setup(
name='WsgiService',
- version='0.2',
+ version='0.2.1',
description="A lean WSGI framework for easy creation of REST services",
author="Patrice Neff",
url='http://github.com/pneff/wsgiservice/tree/master', |
680e8472416e71da5fff41032db49398f62e52d7 | setup.py | setup.py | import sys
import os
from setuptools import setup
long_description = open('README.rst').read()
classifiers = [
'Development Status :: 4 - Beta',
'License :: OSI Approved :: BSD License',
'Programming Language :: Python :: 2',
'Programming Language :: Python :: 2.7',
'Programming Language :: Pytho... | import sys
import os
from setuptools import setup
long_description = open('README.rst').read()
classifiers = [
'Development Status :: 4 - Beta',
'License :: OSI Approved :: BSD License',
'Programming Language :: Python :: 2',
'Programming Language :: Python :: 2.7',
'Programming Language :: Pytho... | Add 'all' option for extra packages, which will install all available rather than listing individually. | Add 'all' option for extra packages, which will install all available rather than listing individually.
| Python | bsd-2-clause | getwarped/powershift-cli,getwarped/powershift-cli | ---
+++
@@ -33,7 +33,8 @@
package_data={'powershift.cli': ['completion-bash.sh']},
entry_points = {'console_scripts':['powershift = powershift.cli:main']},
install_requires=['click'],
- extras_require={'cluster': ['powershift-cluster>=1.1.1']},
+ extras_require={'all':['powershift-cluster>=1.1.1'... |
071d8df8a985c77397c5b2caf27722101aaefea1 | setup.py | setup.py | #!/usr/bin/python3
from setuptools import setup, find_packages
from codecs import open
from os import path
here = path.abspath(path.dirname(__file__))
with open(path.join(here, 'README.rst'), encoding='utf-8') as f:
long_description = f.read()
setup(
name='gorynych',
version='0.0.1',
description='... | #!/usr/bin/python3
from setuptools import setup, find_packages
from codecs import open
from os import path
here = path.abspath(path.dirname(__file__))
with open(path.join(here, 'README.rst'), encoding='utf-8') as f:
long_description = f.read()
setup(
name='gorynych',
version='0.0.1',
description='... | Add missed 'schedule' package to install_requires | Add missed 'schedule' package to install_requires
| Python | apache-2.0 | vurmux/gorynych | ---
+++
@@ -29,7 +29,7 @@
],
keywords='scraping nlp',
packages=find_packages(exclude=['docs', 'img']),
- install_requires=['beautifulsoup4', 'requests', 'nltk'],
+ install_requires=['beautifulsoup4', 'requests', 'nltk', 'schedule'],
extras_require={
'dev': [],
'test': ['cov... |
2ceb5601a98b825276d6199a140277c18c2e4c5d | setup.py | setup.py | from distutils.core import setup
setup(
name='planet_alignment',
version='1.0.0',
packages=['planet_alignment', 'planet_alignment.test'],
url='https://github.com/paulfanelli/planet_alignment.git',
license='MIT',
author='Paul Fanelli',
author_email='paul.fanelli@gmail.com',
description='... | from distutils.core import setup
setup(
name='planet_alignment',
version='1.0.0',
packages=['planet_alignment', 'planet_alignment.test'],
url='https://github.com/paulfanelli/planet_alignment.git',
license='MIT',
author='Paul Fanelli',
author_email='paul.fanelli@gmail.com',
description='... | Change the console script name to the same name as the project. | Change the console script name to the same name as the project.
| Python | mit | paulfanelli/planet_alignment | ---
+++
@@ -13,7 +13,7 @@
tests_require=['pytest'],
entry_points={
'console_scripts': [
- 'alignment = planet_alignment.__main__:main'
+ 'planet_alignment = planet_alignment.__main__:main'
]
}
) |
8e24be46bfcb59dc8a4a9ba8d73f21aa32d18683 | setup.py | setup.py | from setuptools import find_packages
from setuptools import setup
with open('requirements.txt') as fobj:
install_requires = [line.strip() for line in fobj]
with open('README.rst') as fobj:
long_description = fobj.read()
with open('version.txt') as fobj:
version = fobj.read().strip()
packages = find_... | from setuptools import find_packages
from setuptools import setup
with open('requirements.txt') as fobj:
install_requires = [line.strip() for line in fobj]
with open('README.rst') as fobj:
long_description = fobj.read()
with open('version.txt') as fobj:
version = fobj.read().strip()
packages = find_... | Add some PyPI tags to package | Add some PyPI tags to package
| Python | apache-2.0 | ascoderu/opwen-cloudserver,ascoderu/opwen-cloudserver | ---
+++
@@ -28,9 +28,16 @@
author_email='clemens.wolff+pypi@gmail.com',
packages=packages,
url='https://github.com/ascoderu/opwen-cloudserver',
- license='License :: OSI Approved :: Apache Software License',
+ license='Apache Software License',
description='Email server for the Opwen project... |
6463ae4da70e27d85a6036d5094548679742a2fe | setup.py | setup.py | from os import path
from setuptools import setup, find_packages
here = path.abspath(path.dirname(__file__))
# with open(path.join(here, 'README.rst'), encoding='utf-8') as f:
# long_description = f.read()
setup(
name='ETLT',
version='0.0.18',
description='Extract Transform Load Transform ',
# l... | from os import path
from setuptools import setup, find_packages
here = path.abspath(path.dirname(__file__))
with open(path.join(here, 'README.rst'), encoding='utf-8') as f:
long_description = f.read()
setup(
name='ETLT',
version='0.0.18',
description='Extract Transform Load - but not in that stric... | Update long description of package. | Update long description of package.
| Python | mit | SetBased/py-etlt | ---
+++
@@ -4,16 +4,16 @@
here = path.abspath(path.dirname(__file__))
-# with open(path.join(here, 'README.rst'), encoding='utf-8') as f:
-# long_description = f.read()
+with open(path.join(here, 'README.rst'), encoding='utf-8') as f:
+ long_description = f.read()
setup(
name='ETLT',
version... |
15c7cc3cf1599efa65896e7138f3015e68ae5998 | setup.py | setup.py | #!/usr/bin/env python
import sys
from setuptools import setup, find_packages
requires = ['six']
if sys.version_info[0] == 2:
requires += ['python-dateutil>=1.0, <2.0, >=2.1']
else:
# Py3k
requires += ['python-dateutil>=2.0']
setup(
name='freezegun',
version='0.2.2',
description='Let your Pyt... | #!/usr/bin/env python
import sys
from setuptools import setup, find_packages
requires = ['six']
if sys.version_info[0] == 2:
requires += ['python-dateutil>=1.0, != 2.0']
else:
# Py3k
requires += ['python-dateutil>=2.0']
setup(
name='freezegun',
version='0.2.2',
description='Let your Python t... | Use a saner requirements for python-dateutil | Use a saner requirements for python-dateutil
The requirement >=1.0, <2.0, >=2.1 doesn't make a lot of logical sense and it
will break in the future. There is no version that is >= 1.0, and < 2.0, and
>= 2.1 becasue these versions are mutually exclusive. Even if you interpret
the , as OR it still doesn't make sense ... | Python | apache-2.0 | spulec/freezegun,Affirm/freezegun,adamchainz/freezegun,Sun77789/freezegun | ---
+++
@@ -6,7 +6,7 @@
requires = ['six']
if sys.version_info[0] == 2:
- requires += ['python-dateutil>=1.0, <2.0, >=2.1']
+ requires += ['python-dateutil>=1.0, != 2.0']
else:
# Py3k
requires += ['python-dateutil>=2.0'] |
f1474d683b068356567e316c7a1fa177404ae7ab | setup.py | setup.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import codecs
from setuptools import setup, find_packages
from axes import get_version
setup(
name='django-axes',
version=get_version(),
description="Keep track of failed login attempts in Django-powered sites.",
long_description=(
codecs.open("REA... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import codecs
from setuptools import setup, find_packages
from axes import get_version
setup(
name='django-axes',
version=get_version(),
description="Keep track of failed login attempts in Django-powered sites.",
long_description=(
codecs.open("REA... | Remove support for python 2.x | Remove support for python 2.x
| Python | mit | django-pci/django-axes,jazzband/django-axes | ---
+++
@@ -32,7 +32,6 @@
'License :: OSI Approved :: MIT License',
'Operating System :: OS Independent',
'Programming Language :: Python',
- 'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3',
'Topic :: Internet :: Log Analysis',
... |
22cb266fcec5c0b3b299a3a974e79810d5ecdbaf | setup.py | setup.py | from setuptools import setup, find_packages
setup(
name='wagtailcodeblock',
version="0.2.2",
description='Wagtail Code Block provides PrismJS syntax highlighting in Wagtail.',
long_description='A work-in-progress alpha of a Wagtail Streamfield block for source code with real-time syntax highlighting.',
... | from setuptools import setup, find_packages
setup(
name='wagtailcodeblock',
version="0.2.3",
description='Wagtail Code Block provides PrismJS syntax highlighting in Wagtail.',
long_description='A work-in-progress alpha of a Wagtail Streamfield block for source code with real-time syntax highlighting.',
... | Switch to local JS/CSS assets - bump version. | Switch to local JS/CSS assets - bump version.
| Python | bsd-3-clause | FlipperPA/wagtailcodeblock,FlipperPA/wagtailcodeblock,FlipperPA/wagtailcodeblock | ---
+++
@@ -1,7 +1,7 @@
from setuptools import setup, find_packages
setup(
name='wagtailcodeblock',
- version="0.2.2",
+ version="0.2.3",
description='Wagtail Code Block provides PrismJS syntax highlighting in Wagtail.',
long_description='A work-in-progress alpha of a Wagtail Streamfield block ... |
2320fba5befcca313626fac1572b5245f454d675 | setup.py | setup.py | #!/usr/bin/env python
import os
from setuptools import setup, find_packages
from oscar_support import get_version
def location(path):
return os.path.join(os.path.dirname(__file__))
setup(
name='django-oscar-support',
version=get_version(),
url='https://github.com/tangentlabs/django-oscar-support',... | #!/usr/bin/env python
from setuptools import setup, find_packages
from oscar_support import get_version
setup(
name='django-oscar-support',
version=get_version(),
url='https://github.com/tangentlabs/django-oscar-support',
author="Sebastian Vetter",
author_email="sebastian.vetter@tangentsnowball.c... | Fix long description in README | Fix long description in README
| Python | bsd-3-clause | snowball-one/django-oscar-support,snowball-one/django-oscar-support,snowball-one/django-oscar-support | ---
+++
@@ -1,13 +1,7 @@
#!/usr/bin/env python
-import os
-
from setuptools import setup, find_packages
from oscar_support import get_version
-
-
-def location(path):
- return os.path.join(os.path.dirname(__file__))
setup(
@@ -17,7 +11,7 @@
author="Sebastian Vetter",
author_email="sebastian.vet... |
518fdf73b0d009f8bbe46054154f293ba209a544 | setup.py | setup.py | from setuptools import find_packages, setup
import os
import re
def read(*parts):
here = os.path.abspath(os.path.dirname(__file__))
with open(os.path.join(here, *parts)) as f:
return f.read()
VERSION = re.search(
"^__version__ = '(.*)'$",
read('src', 'http_crawler', '__init__.py'),
re.MU... | from setuptools import find_packages, setup
import os
import re
def read(*parts):
here = os.path.abspath(os.path.dirname(__file__))
with open(os.path.join(here, *parts)) as f:
return f.read()
VERSION = re.search(
"^__version__ = '(.*)'$",
read('src', 'http_crawler', '__init__.py'),
re.M... | Add line to make flake8 happy | Add line to make flake8 happy | Python | mit | inglesp/http-crawler,inglesp/http-crawler,inglesp/http-crawler | ---
+++
@@ -8,6 +8,7 @@
here = os.path.abspath(os.path.dirname(__file__))
with open(os.path.join(here, *parts)) as f:
return f.read()
+
VERSION = re.search(
"^__version__ = '(.*)'$", |
146aedd8b65c1fb110f16579bd812d7adad3cc1f | setup.py | setup.py | # -*- encoding: utf-8 -*-
from setuptools import setup
description = """
Simple, powerfull and nonobstructive django email middleware.
"""
setup(
name="djmail",
url="https://github.com/niwibe/djmail",
author="Andrey Antukh",
author_email="niwi@niwi.be",
version="0.8",
packages=[
"djma... | # -*- encoding: utf-8 -*-
from setuptools import find_packages, setup
description = """
Simple, powerfull and nonobstructive django email middleware.
"""
setup(
name="djmail",
url="https://github.com/niwibe/djmail",
author="Andrey Antukh",
author_email="niwi@niwi.be",
version="0.8",
packages=... | Replace hardcoded packages by find_packages | Replace hardcoded packages by find_packages
| Python | bsd-3-clause | CloudNcodeInc/djmail,CloudNcodeInc/djmail,CloudNcodeInc/djmail | ---
+++
@@ -1,6 +1,6 @@
# -*- encoding: utf-8 -*-
-from setuptools import setup
+from setuptools import find_packages, setup
description = """
Simple, powerfull and nonobstructive django email middleware.
@@ -12,12 +12,7 @@
author="Andrey Antukh",
author_email="niwi@niwi.be",
version="0.8",
- ... |
2b5a13a32dce747d9dc9f5611aadf40969239cf0 | setup.py | setup.py | from setuptools import setup, find_packages
import sys, os
setup(name='cc.license',
version='0.01',
description="License selection based on ccREL-based metadata.",
classifiers=[],
keywords='',
author='Creative Commons',
author_email='software@creativecommons.org',
url='http://... | from setuptools import setup, find_packages
import sys, os
setup(name='cc.license',
version='0.01',
description="License selection based on ccREL-based metadata.",
classifiers=[],
keywords='',
author='Creative Commons',
author_email='software@creativecommons.org',
url='http://... | Solve RuntimeWarning that arose without knowing why. | Solve RuntimeWarning that arose without knowing why.
| Python | mit | creativecommons/cc.license,creativecommons/cc.license | ---
+++
@@ -24,9 +24,12 @@
'zope.interface',
'nose',
'Genshi',
+ 'pylons', # XXX why does nose throw a RuntimeWarning without this?
],
setup_requires=['setuptools-git',],
entry_points="""
# -*- Entry points: -*-
+ [nose.plugins]
+ pylons = pylons... |
8684e06ed7056171d86ccdb5943bdf28c518c589 | setup.py | setup.py | from setuptools import setup
setup(
name='jobcli',
version='0.1.a1',
py_modules=['jobcli'],
install_requires=['click', 'requests',],
entry_points={'console_scripts':['jobcli=jobcli:cli',]},
url='https://www.jobcli.com',
author='Stephan Goergen',
author_email='stephan.goergen@gmail.com',... | from setuptools import setup
setup(
name='jobcli',
version='0.1.a1',
py_modules=['jobcli'],
install_requires=['click', 'requests',],
entry_points={'console_scripts':['jobcli=jobcli:cli',]},
url='https://www.jobcli.com',
author='Stephan Goergen',
author_email='stephan.goergen@gmail.com',... | Add missing comma in classifiers. | Add missing comma in classifiers.
| Python | mit | jobcli/jobcli-app,jobcli/jobcli-app | ---
+++
@@ -15,22 +15,22 @@
include_package_data=False,
keywords='board job search command line career developer engineer',
classifiers=[
- 'License :: OSI Approved :: MIT License',
- 'Development Status :: 3 - Alpha',
- 'Environment :: Console',
- 'Operating System :: OS In... |
c1eafa32f9fafa859a0fcaf047f4a80b9bc52969 | setup.py | setup.py | #!/usr/bin/env python
import os
from glob import glob
from distutils.core import setup
setup(
name='whisper',
version='0.9.10',
url='https://launchpad.net/graphite',
author='Chris Davis',
author_email='chrismd@gmail.com',
license='Apache Software License 2.0',
description='Fixed size round-robin style ... | #!/usr/bin/env python
import os
from glob import glob
from distutils.core import setup
setup(
name='whisper',
version='0.9.10',
url='https://launchpad.net/graphite',
author='Chris Davis',
author_email='chrismd@gmail.com',
license='Apache Software License 2.0',
description='Fixed size round-robin style ... | Add PyPI classifiers for python versions | Add PyPI classifiers for python versions
| Python | apache-2.0 | penpen/whisper,deniszh/whisper,graphite-server/whisper,alexandreboisvert/whisper,akbooer/whisper,graphite-project/whisper,cbowman0/whisper,piotr1212/whisper,kerlandsson/whisper,obfuscurity/whisper | ---
+++
@@ -15,4 +15,12 @@
description='Fixed size round-robin style database',
py_modules=['whisper'],
scripts=glob('bin/*'),
+ classifiers=[
+ 'Programming Language :: Python :: 2',
+ 'Programming Language :: Python :: 2.6',
+ 'Programming Language :: Python :: 2.7',
+ 'Programming Language ::... |
b99fa752feceded0ff6ea1e46e1966ceb76abff2 | setup.py | setup.py | import os
from setuptools import find_packages
from setuptools import setup
cur_dir = os.path.dirname(__file__)
readme = os.path.join(cur_dir, 'README.md')
if os.path.exists(readme):
with open(readme) as fh:
long_description = fh.read()
else:
long_description = ''
setup(
name='walrus',
versi... | import os
from setuptools import find_packages
from setuptools import setup
cur_dir = os.path.dirname(__file__)
readme = os.path.join(cur_dir, 'README.md')
if os.path.exists(readme):
with open(readme) as fh:
long_description = fh.read()
else:
long_description = ''
setup(
name='walrus',
versi... | Add Python specific Trove classifiers. | Add Python specific Trove classifiers.
| Python | mit | coleifer/walrus | ---
+++
@@ -34,6 +34,12 @@
'License :: OSI Approved :: MIT License',
'Operating System :: OS Independent',
'Programming Language :: Python',
+ 'Programming Language :: Python :: 2',
+ 'Programming Language :: Python :: 2.7',
+ 'Programming Language :: Python :: 3',
+ ... |
f891dbeca1b9c3cd23bcb1b70ebad149a8f57d4b | setup.py | setup.py | from setuptools import setup, find_packages
setup(
name='gears-coffeescript',
version='0.1.dev',
url='https://github.com/gears/gears',
license='ISC',
author='Mike Yumatov',
author_email='mike@yumatov.org',
description='CoffeeScript compiler for Gears',
packages=find_packages(),
inc... | 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.dev',
url='https://github.com/gears/gears',
license='ISC',
author='Mike Yumatov',
author_email='m... | Read package long description from readme | Read package long description from readme
| Python | isc | gears/gears-coffeescript,gears/gears-coffeescript | ---
+++
@@ -1,4 +1,9 @@
+import os
from setuptools import setup, find_packages
+
+
+def read(filename):
+ return open(os.path.join(os.path.dirname(__file__), filename)).read()
setup(
@@ -9,6 +14,7 @@
author='Mike Yumatov',
author_email='mike@yumatov.org',
description='CoffeeScript compiler for... |
56cd2b9804718caeb8728c3b01fb6f0bc0f2d0d4 | setup.py | setup.py | # -*- coding: utf-8 -*-
import os
from setuptools import setup
def read(fname):
try:
return open(os.path.join(os.path.dirname(__file__), fname)).read()
except:
return ''
setup(
name='todoist-python',
version='7.0.8',
packages=['todoist', 'todoist.managers'],
author='Doist Team'... | # -*- coding: utf-8 -*-
import os
from setuptools import setup
def read(fname):
try:
return open(os.path.join(os.path.dirname(__file__), fname)).read()
except:
return ''
setup(
name='todoist-python',
version='7.0.9',
packages=['todoist', 'todoist.managers'],
author='Doist Team'... | Update the PyPI version to 7.0.9. | Update the PyPI version to 7.0.9.
| Python | mit | Doist/todoist-python | ---
+++
@@ -10,7 +10,7 @@
setup(
name='todoist-python',
- version='7.0.8',
+ version='7.0.9',
packages=['todoist', 'todoist.managers'],
author='Doist Team',
author_email='info@todoist.com', |
1f5183c345444f35891927014d92510b66b96f5b | setup.py | setup.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from distutils.core import setup
import pypandoc
long_description = pypandoc.convert('README.md', 'rst')
setup(
name='robber',
version='1.0.0',
description='BDD / TDD assertion library for Python',
long_description=long_description,
author='Tao Liang',... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from distutils.core import setup
setup(
name='robber',
version='1.0.1',
description='BDD / TDD assertion library for Python',
author='Tao Liang',
author_email='tao@synapse-ai.com',
url='https://github.com/vesln/robber.py',
packages=[
'ro... | Remove the dependency on pypandoc. It's unfortunate but we don't want to add dependency just for readability on pypi. | Remove the dependency on pypandoc. It's unfortunate but we don't want to add dependency just for readability on pypi.
| Python | mit | vesln/robber.py,taoenator/robber.py | ---
+++
@@ -1,15 +1,11 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-
from distutils.core import setup
-import pypandoc
-
-long_description = pypandoc.convert('README.md', 'rst')
setup(
name='robber',
- version='1.0.0',
+ version='1.0.1',
description='BDD / TDD assertion library for Python',
-... |
efaeb8fe4458cd6b214896ad72f3d41c25c23313 | misc/python/botan/__init__.py | misc/python/botan/__init__.py | from _botan import *
init = LibraryInitializer()
class SymmetricKey(OctetString):
pass
class InitializationVector(OctetString):
pass
def Filter(name, key = None, iv = None, dir = None):
if key != None and iv != None and dir != None:
return make_filter(name, key, iv, dir)
elif key != None and... | from _botan import *
# Initialize the library when the module is imported
init = LibraryInitializer()
class SymmetricKey(OctetString):
pass
class InitializationVector(OctetString):
pass
def Filter(name, key = None, iv = None, dir = None):
if key != None and iv != None and dir != None:
return mak... | Remove an old version of the Filter() wrapper function | Remove an old version of the Filter() wrapper function
| Python | bsd-2-clause | Rohde-Schwarz-Cybersecurity/botan,webmaster128/botan,Rohde-Schwarz-Cybersecurity/botan,randombit/botan,webmaster128/botan,randombit/botan,Rohde-Schwarz-Cybersecurity/botan,Rohde-Schwarz-Cybersecurity/botan,webmaster128/botan,randombit/botan,webmaster128/botan,webmaster128/botan,Rohde-Schwarz-Cybersecurity/botan,randomb... | ---
+++
@@ -1,5 +1,6 @@
from _botan import *
+# Initialize the library when the module is imported
init = LibraryInitializer()
class SymmetricKey(OctetString):
@@ -24,6 +25,3 @@
if filter:
pipe.append(filter)
return pipe
-
-#def Filter(name, key):
-# return make_filter(name, key) |
22ea99b8183f11c3fc9f39810892256a2989ced5 | setup.py | setup.py | """
Flask-Twilio
-------------
Make Twilio voice/SMS calls with Flask
"""
from setuptools import setup
exec(open('flask_twilio.py').readline())
setup(
name='Flask-Twilio',
version=__version__,
url='http://example.com/flask-twilio/',
license='BSD',
author='Leo Singer',
author_email='leo.singer... | """
Flask-Twilio
-------------
Make Twilio voice/SMS calls with Flask
"""
from setuptools import setup
exec(open('flask_twilio.py').readline())
setup(
name='Flask-Twilio',
version=__version__,
url='http://example.com/flask-twilio/',
license='BSD',
author='Leo Singer',
author_email='leo.singer... | Add classifiers to document Python version support | Add classifiers to document Python version support
| Python | bsd-3-clause | lpsinger/flask-twilio | ---
+++
@@ -39,6 +39,10 @@
'License :: OSI Approved :: BSD License',
'Operating System :: OS Independent',
'Programming Language :: Python',
+ 'Programming Language :: Python :: 2.6',
+ 'Programming Language :: Python :: 2.7',
+ 'Programming Language :: Python :: 3.3',
... |
27a9d12b7547c7a14f30c2c06c52e311a960f3ac | setup.py | setup.py | from setuptools import setup, find_packages
setup(
name='gdcdatamodel',
packages=find_packages(),
install_requires=[
'pytz==2016.4',
'graphviz==0.4.2',
'jsonschema==2.5.1',
'psqlgraph',
'gdcdictionary',
'cdisutils',
'python-dateutil==2.4.2',
],
... | from setuptools import setup, find_packages
setup(
name='gdcdatamodel',
packages=find_packages(),
install_requires=[
'pytz==2016.4',
'graphviz==0.4.2',
'jsonschema==2.5.1',
'psqlgraph',
'gdcdictionary',
'cdisutils',
'python-dateutil==2.4.2',
],
... | Update pins for dictionary to release tag | chore(pins): Update pins for dictionary to release tag
- Update pins for dictionary to release tag
| Python | apache-2.0 | NCI-GDC/gdcdatamodel,NCI-GDC/gdcdatamodel | ---
+++
@@ -20,7 +20,7 @@
dependency_links=[
'git+https://github.com/NCI-GDC/cdisutils.git@4a75cc05c7ba2174e70cca9c9ea7e93947f7a868#egg=cdisutils',
'git+https://github.com/NCI-GDC/psqlgraph.git@7b5de7d56aa3159a9526940eb273579ddbf084ca#egg=psqlgraph',
- 'git+https://github.com/NCI-GDC/gdc... |
203cb874331a5df40d297ed6143b75ddbf8cda1e | setup.py | setup.py | from setuptools import setup
import os
import imbox
version = imbox.__version__
def read(filename):
return open(os.path.join(os.path.dirname(__file__), filename)).read()
setup(
name='imbox',
version=version,
description="Python IMAP for Human beings",
long_description=read('README.rst'),
ke... | from setuptools import setup
import os
import imbox
version = imbox.__version__
def read(filename):
return open(os.path.join(os.path.dirname(__file__), filename)).read()
setup(
name='imbox',
version=version,
description="Python IMAP for Human beings",
long_description=read('README.rst'),
k... | Add chardet as a dependency | Add chardet as a dependency
| Python | mit | martinrusev/imbox | ---
+++
@@ -8,6 +8,7 @@
def read(filename):
return open(os.path.join(os.path.dirname(__file__), filename)).read()
+
setup(
name='imbox',
@@ -21,6 +22,9 @@
license='MIT',
packages=['imbox', 'imbox.vendors'],
package_dir={'imbox': 'imbox'},
+ install_requires=[
+ 'chardet',
+ ... |
04e111ff36d1c2769bca74d4271cbaa996dd2bae | plugins/shutup_slackbot.py | plugins/shutup_slackbot.py | from rtmbot.core import Plugin
class ShutupSlackbot(Plugin):
def process_message(self, data):
if data["text"] in ["Bpye Berg Nyberg"]:
self.outputs.append([data["channel"], "Hold kjeft, slackbot..."])
| from rtmbot.core import Plugin
class ShutupSlackbotPlugin(Plugin):
def process_message(self, data):
if data["text"] in ["Bpye Berg Nyberg"]:
self.outputs.append([data["channel"], "Hold kjeft, slackbot..."])
| Fix mising Plugin in class name | Fix mising Plugin in class name
| Python | mit | RadioRevolt/SlackBot | ---
+++
@@ -1,7 +1,7 @@
from rtmbot.core import Plugin
-class ShutupSlackbot(Plugin):
+class ShutupSlackbotPlugin(Plugin):
def process_message(self, data):
if data["text"] in ["Bpye Berg Nyberg"]:
self.outputs.append([data["channel"], "Hold kjeft, slackbot..."]) |
3a37211f09c000f0fcb41ca076cb98b90bfae030 | eb_sqs/urls.py | eb_sqs/urls.py | from __future__ import absolute_import, unicode_literals
from django.conf.urls import url
from eb_sqs.views import process_task
app_name = 'eb_sqs'
urlpatterns = [
url(r'^process$', process_task, name='process_task'),
]
| from __future__ import absolute_import, unicode_literals
from django.conf.urls import url
from eb_sqs.views import process_task
urlpatterns = [
url(r'^process$', process_task, name='process_task'),
]
| Remove unnecessary global variable assignment | Remove unnecessary global variable assignment
| Python | mit | cuda-networks/django-eb-sqs,cuda-networks/django-eb-sqs | ---
+++
@@ -4,7 +4,6 @@
from eb_sqs.views import process_task
-app_name = 'eb_sqs'
urlpatterns = [
url(r'^process$', process_task, name='process_task'),
] |
5edc89f4ba516ba497f2b171bba865487116bbe0 | camoco/__init__.py | camoco/__init__.py | """
Camoco Library - CoAnalysis of Molecular Components
CacheMoneyCorn
"""
__license__ = """
Creative Commons Non-Commercial 4.0 Generic
http://creativecommons.org/licenses/by-nc/4.0/
"""
__version__ = '0.3.0'
import sys
import os
import numpy
import pyximport
pyximport.install(setup_args={
"include_... | """
Camoco Library - CoAnalysis of Molecular Components
CacheMoneyCorn
"""
__license__ = """
Creative Commons Non-Commercial 4.0 Generic
http://creativecommons.org/licenses/by-nc/4.0/
"""
__version__ = '0.3.0-dev'
import sys
import os
import numpy
import pyximport
pyximport.install(setup_args={
"incl... | Add dev option to version string | Add dev option to version string
| Python | mit | schae234/Camoco,schae234/Camoco | ---
+++
@@ -11,7 +11,7 @@
http://creativecommons.org/licenses/by-nc/4.0/
"""
-__version__ = '0.3.0'
+__version__ = '0.3.0-dev'
import sys
import os |
1270c31dcf35c17a26a282605d2e04ffd2e8d985 | tests/test_ftp.py | tests/test_ftp.py | from wex.url import URL
expected_lines = [
b"FTP/1.0 200 OK\r\n",
b"X-wex-url: ftp://anonymous:me@ftp.kernel.org/pub/site/README\r\n",
b"\r\n",
b"This directory contains files related to the operation of the\n",
]
expected_content = b''.join(expected_lines)
url = 'ftp://anonymous:me@ftp.kernel.org/pub... | from wex.url import URL
url = 'ftp://anonymous:me@speedtest.tele2.net/1KB.zip'
expected_lines = [
b"FTP/1.0 200 OK\r\n",
b"X-wex-url: " + url + "\r\n",
b"\r\n",
]
expected_content = b''.join(expected_lines)
def test_ftp_read():
readables = list(URL(url).get())
assert len(readables) == 1
r0 =... | Switch ftp server now ftp.kernel.org closed | Switch ftp server now ftp.kernel.org closed
| Python | bsd-3-clause | eBay/wextracto,gilessbrown/wextracto,gilessbrown/wextracto,eBay/wextracto | ---
+++
@@ -1,14 +1,13 @@
from wex.url import URL
+
+url = 'ftp://anonymous:me@speedtest.tele2.net/1KB.zip'
expected_lines = [
b"FTP/1.0 200 OK\r\n",
- b"X-wex-url: ftp://anonymous:me@ftp.kernel.org/pub/site/README\r\n",
+ b"X-wex-url: " + url + "\r\n",
b"\r\n",
- b"This directory contains file... |
749c1254a240053d2ca2abb1cc88d5eb7ae284eb | tests/test_tcv.py | tests/test_tcv.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Test for the tcv module
"""
| #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Test for the tcv module
"""
def test_placeholder():
""" Write real tests... """
assert True
| Add an empty placeholder tests. | Add an empty placeholder tests.
| Python | isc | wagdav/tcvpy | ---
+++
@@ -4,3 +4,8 @@
"""
Test for the tcv module
"""
+
+
+def test_placeholder():
+ """ Write real tests... """
+ assert True |
d1c1d257a3fb54c6acef4c66c8ed639f48a0c426 | bibliopixel/control/artnet.py | bibliopixel/control/artnet.py | import collections, copy, queue
from . import control
from .. util import artnet_message, log, server_cache, udp
QUEUE_TIMEOUT = 0.1
class ArtNet(control.ExtractedControl):
def __init__(self, *args, ip_address, port=artnet_message.UDP_PORT, **kwds):
super().__init__(*args, **kwds)
self.address = ... | import collections, copy, queue
from . import control
from .. util import artnet_message, log, server_cache, udp
QUEUE_TIMEOUT = 0.1
class ArtNet(control.ExtractedControl):
def __init__(self, *args, ip_address, port=artnet_message.UDP_PORT, **kwds):
super().__init__(*args, **kwds)
self.address = ... | Remove test that crashes ArtNet receiver | Remove test that crashes ArtNet receiver
| Python | mit | rec/BiblioPixel,ManiacalLabs/BiblioPixel,rec/BiblioPixel,ManiacalLabs/BiblioPixel,rec/BiblioPixel,ManiacalLabs/BiblioPixel,rec/BiblioPixel,ManiacalLabs/BiblioPixel | ---
+++
@@ -12,7 +12,6 @@
def _convert(self, msg):
msg = artnet_message.bytes_to_message(msg)
- assert any(i for i in msg.data)
msg = collections.OrderedDict((
('type', 'dmx'),
('net', msg.net), |
5cd66754dc4a53bf9e0631733541c2ed5e4be06e | pvextractor/tests/test_gui.py | pvextractor/tests/test_gui.py | import pytest
from distutils.version import LooseVersion
import matplotlib as mpl
from ..gui import PVSlicer
from .test_slicer import make_test_hdu
try:
import PyQt5
PYQT5OK = True
except ImportError:
PYQT5OK = False
if LooseVersion(mpl.__version__) < LooseVersion('2'):
MPLOK = True
else:
MPLO... | import numpy as np
from ..gui import PVSlicer
from .test_slicer import make_test_hdu
def test_gui():
hdu = make_test_hdu()
pv = PVSlicer(hdu, clim=(-0.02, 2))
pv.show(block=False)
xy_data = np.array([[0.0, 0.1, 0.5, 1.0, 0.5],
[0.0, 0.3, 0.4, 0.9, 1.4]]).T
x, y = pv.ax... | Make GUI test more robust to HiDPI displays | Make GUI test more robust to HiDPI displays | Python | bsd-3-clause | radio-astro-tools/pvextractor,keflavich/pvextractor | ---
+++
@@ -1,42 +1,28 @@
-import pytest
-from distutils.version import LooseVersion
-import matplotlib as mpl
-
-
+import numpy as np
from ..gui import PVSlicer
from .test_slicer import make_test_hdu
-try:
- import PyQt5
- PYQT5OK = True
-except ImportError:
- PYQT5OK = False
+def test_gui():
-if ... |
72a5d74496d8cfd3d2216ac9b5f5ef2d4b054ed0 | backend/loader/model/datafile.py | backend/loader/model/datafile.py | from dataitem import DataItem
class DataFile(DataItem):
def __init__(self, name, access, owner):
super(DataFile, self).__init__(name, access, owner, "datafile")
self.checksum = ""
self.size = 0
self.location = ""
self.mediatype = ""
self.conditions = []
self.... | from dataitem import DataItem
class DataFile(DataItem):
def __init__(self, name, access, owner):
super(DataFile, self).__init__(name, access, owner, "datafile")
self.checksum = ""
self.size = 0
self.location = ""
self.mediatype = ""
self.conditions = []
self.... | Add parent so we can track versions. | Add parent so we can track versions.
| Python | mit | materials-commons/materialscommons.org,materials-commons/materialscommons.org,materials-commons/materialscommons.org,materials-commons/materialscommons.org,materials-commons/materialscommons.org | ---
+++
@@ -11,3 +11,4 @@
self.text = ""
self.metatags = []
self.datadirs = []
+ self.parent = "" |
c37f7705856bd82f5416cef4bb82e1786c3f508c | tests/__init__.py | tests/__init__.py | # Copyright 2013-2014 DataStax, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writi... | # Copyright 2013-2014 DataStax, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writi... | Add test logger if not added by nose | Add test logger if not added by nose
| Python | apache-2.0 | thobbs/python-driver,mobify/python-driver,yi719/python-driver,datastax/python-driver,mobify/python-driver,markflorisson/python-driver,mambocab/python-driver,sontek/python-driver,bbirand/python-driver,mike-tr-adamson/python-driver,kracekumar/python-driver,beobal/python-driver,mike-tr-adamson/python-driver,yi719/python-d... | ---
+++
@@ -16,3 +16,8 @@
log = logging.getLogger()
log.setLevel('DEBUG')
+# if nose didn't already attach a log handler, add one here
+if not log.handlers:
+ handler = logging.StreamHandler()
+ handler.setFormatter(logging.Formatter('%(asctime)s %(levelname)s [%(module)s:%(lineno)s]: %(message)s'))
+ lo... |
90d933a957509da4189b8f793e27ac563b73264b | reddit_adzerk/adzerkads.py | reddit_adzerk/adzerkads.py | from pylons import c, g
from r2.lib.pages import Ads as BaseAds
class Ads(BaseAds):
def __init__(self):
BaseAds.__init__(self)
adzerk_test_srs = g.live_config.get("adzerk_test_srs")
if adzerk_test_srs and c.site.name in adzerk_test_srs:
if c.secure:
self.ad_url... | from pylons import c, g
from r2.lib.pages import Ads as BaseAds
class Ads(BaseAds):
def __init__(self):
BaseAds.__init__(self)
adzerk_test_srs = g.live_config.get("adzerk_test_srs")
if adzerk_test_srs and c.site.name in adzerk_test_srs:
url_key = "adzerk_https_url" if c.secure... | Use c.request_origin for frame origin. | Use c.request_origin for frame origin.
| Python | bsd-3-clause | madbook/reddit-plugin-adzerk,madbook/reddit-plugin-adzerk,madbook/reddit-plugin-adzerk | ---
+++
@@ -8,10 +8,8 @@
BaseAds.__init__(self)
adzerk_test_srs = g.live_config.get("adzerk_test_srs")
if adzerk_test_srs and c.site.name in adzerk_test_srs:
- if c.secure:
- self.ad_url = g.config["adzerk_https_url"].format(
- origin... |
7aa1875f9e542ae539729730cf9457e78d8b775b | walker/main.py | walker/main.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import os
import subprocess
import sys
def execute_command(target):
os.chdir(target)
command = sys.argv[1:]
try:
subprocess.check_call(command)
except Exception as e:
print "ERROR in %s: %s" % (target, e)
def main():
base = os.getcwdu()... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import os
import subprocess
import sys
def execute_command(target):
os.chdir(target)
command = sys.argv[1:]
try:
subprocess.check_call(command)
except Exception as e:
print "ERROR in %s: %s" % (target, e)
def main():
base = os.getcwdu()... | Add a new line before displaying the current dir | Add a new line before displaying the current dir
This makes it easier for my brain to read.
| Python | bsd-3-clause | darylyu/walker,darylyu/walker | ---
+++
@@ -24,7 +24,7 @@
# Traverse through the directories.
for target in sorted(targets, key=lambda s: s.lower()):
target_full_path = base + target
- print "walker: in %s" % target_full_path
+ print "\nwalker: in %s" % target_full_path
execute_command(target_full_path)
... |
059b5db0768048d4e11fc012e1720213ba365538 | disco_aws_automation/disco_logging.py | disco_aws_automation/disco_logging.py | '''Utility function for logging'''
import logging
import sys
def configure_logging(debug, silent=False):
'''Sets the default logger and the boto logger to appropriate levels of chattiness.'''
logger = logging.getLogger('')
boto_logger = logging.getLogger('boto')
botocore_logger = logging.getLogger('bo... | '''Utility function for logging'''
import logging
import logging.handlers as handlers
import sys
def configure_logging(debug, silent=False):
'''Sets the default logger and the boto logger to appropriate levels of chattiness.'''
logger = logging.getLogger('')
boto_logger = logging.getLogger('boto')
bot... | Add file handler for debug logs | Add file handler for debug logs
| Python | bsd-2-clause | amplifylitco/asiaq,amplifylitco/asiaq,amplifylitco/asiaq | ---
+++
@@ -1,5 +1,6 @@
'''Utility function for logging'''
import logging
+import logging.handlers as handlers
import sys
@@ -8,6 +9,11 @@
logger = logging.getLogger('')
boto_logger = logging.getLogger('boto')
botocore_logger = logging.getLogger('botocore')
+
+ # If there are any handlers on ... |
d1c5e7971814d5aeedec11bb7610680a4c5a0000 | text_processor.py | text_processor.py | from urllib.request import urlopen
def fetch_words():
with urlopen('http://sixty-north.com/c/t.txt') as story:
story_words = []
for line in story:
line_words = line.decode('utf-8').split()
for word in line_words:
story_words.append(word)
return story... | """Retrieve and print words from a URL.
Usage:
python3 text_processor.py <URL>
"""
import sys
from urllib.request import urlopen
def fetch_words(url):
"""Fetch a list of words from a URL.
Args:
url: The URL of a UTF-8 text document.
Returns:
A UTF-8-decoded list of strings contain... | Document module with docstrings (Google format) | Document module with docstrings (Google format)
| Python | mit | kentoj/python-fundamentals | ---
+++
@@ -1,8 +1,25 @@
+"""Retrieve and print words from a URL.
+
+Usage:
+
+ python3 text_processor.py <URL>
+"""
+
+import sys
from urllib.request import urlopen
-def fetch_words():
- with urlopen('http://sixty-north.com/c/t.txt') as story:
+def fetch_words(url):
+ """Fetch a list of words from a UR... |
de6dbe4fa15691cb1a7ec4077e6aaf0eca4e1d48 | PRESUBMIT.py | PRESUBMIT.py | # Copyright (c) 2011 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""Top-level presubmit script for GYP.
See http://dev.chromium.org/developers/how-tos/depottools/presubmit-scripts
for more details about the presubmit... | # Copyright (c) 2011 Google Inc. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""Top-level presubmit script for GYP.
See http://dev.chromium.org/developers/how-tos/depottools/presubmit-scripts
for more details about the presubmit API built... | Fix the license header regex. | Fix the license header regex.
Most of the files are attributed to Google Inc so I used this instead of
Chromium Authors.
R=mark@chromium.org
BUG=
TEST=
Review URL: http://codereview.chromium.org/7108074 | Python | bsd-3-clause | witwall/gyp,witwall/gyp,witwall/gyp,witwall/gyp,witwall/gyp | ---
+++
@@ -1,4 +1,4 @@
-# Copyright (c) 2011 The Chromium Authors. All rights reserved.
+# Copyright (c) 2011 Google Inc. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
@@ -19,8 +19,17 @@
def CheckChangeOnCommit(input_api, output_api)... |
52a95cb48d0829d864d25b5e8c380c0e58d51b16 | coaster/docflow.py | coaster/docflow.py | # -*- coding: utf-8 -*-
from __future__ import absolute_import
import docflow
from werkzeug.exceptions import Forbidden
__all__ = ['WorkflowStateException', 'WorkflowTransitionException',
'WorkflowPermissionException', 'WorkflowState', 'WorkflowStateGroup',
'DocumentWorkflow']
class WorkflowStateException(d... | # -*- coding: utf-8 -*-
from __future__ import absolute_import
from flask import g
import docflow
from werkzeug.exceptions import Forbidden
__all__ = ['WorkflowStateException', 'WorkflowTransitionException',
'WorkflowPermissionException', 'WorkflowState', 'WorkflowStateGroup',
'InteractiveTransition', 'Docume... | Update for Docflow 0.3.2 and PermissionMixin | Update for Docflow 0.3.2 and PermissionMixin
| Python | bsd-2-clause | hasgeek/coaster | ---
+++
@@ -1,12 +1,13 @@
# -*- coding: utf-8 -*-
from __future__ import absolute_import
+from flask import g
import docflow
from werkzeug.exceptions import Forbidden
__all__ = ['WorkflowStateException', 'WorkflowTransitionException',
'WorkflowPermissionException', 'WorkflowState', 'WorkflowStateGroup',... |
293a1f63b7a3011c36a0cba71874b92be460e1aa | app/views.py | app/views.py | from app import app
from app.models import Post
from flask import render_template
@app.route('/')
@app.route('/page/<int:page>')
def blog(page=1):
"""View the blog."""
posts = Post.query.filter_by(visible=True) \
.order_by(Post.published.desc())
if posts:
pagination = posts.p... | from flask import render_template, send_file
from app import app
from app.models import Post
@app.route('/')
@app.route('/page/<int:page>')
def blog(page=1):
"""View the blog."""
posts = Post.query.filter_by(visible=True) \
.order_by(Post.published.desc())
if posts:
paginati... | Add route for admin panel | Add route for admin panel
| Python | mit | thebitstick/Flask-Blog,thebitstick/Flask-Blog | ---
+++
@@ -1,6 +1,7 @@
+from flask import render_template, send_file
+
from app import app
from app.models import Post
-from flask import render_template
@app.route('/')
@@ -28,3 +29,8 @@
post = Post.query.filter_by(visible=True, slug=slug) \
.first_or_404()
return render_templ... |
cd1edf946fcf8b22b5f78f4a1db393b777951527 | website/files/utils.py | website/files/utils.py | from osf.models.base import generate_object_id
def copy_files(src, target_node, parent=None, name=None):
"""Copy the files from src to the target node
:param Folder src: The source to copy children from
:param Node target_node: The node to copy files to
:param Folder parent: The parent of to attach th... |
def copy_files(src, target_node, parent=None, name=None):
"""Copy the files from src to the target node
:param Folder src: The source to copy children from
:param Node target_node: The node to copy files to
:param Folder parent: The parent of to attach the clone of src to, if applicable
"""
ass... | Use clone() method from BaseModel to copy most recent fileversion | Use clone() method from BaseModel to copy most recent fileversion
| Python | apache-2.0 | adlius/osf.io,felliott/osf.io,HalcyonChimera/osf.io,mattclark/osf.io,HalcyonChimera/osf.io,pattisdr/osf.io,mfraezz/osf.io,cslzchen/osf.io,caseyrollins/osf.io,mfraezz/osf.io,saradbowman/osf.io,pattisdr/osf.io,aaxelb/osf.io,aaxelb/osf.io,adlius/osf.io,brianjgeiger/osf.io,aaxelb/osf.io,cslzchen/osf.io,cslzchen/osf.io,case... | ---
+++
@@ -1,5 +1,3 @@
-from osf.models.base import generate_object_id
-
def copy_files(src, target_node, parent=None, name=None):
"""Copy the files from src to the target node
@@ -23,12 +21,11 @@
if most_recent_fileversion.region != target_node.osfstorage_region:
# add all original ver... |
659036918e2c90b47c83c640eef62eaeec42b35a | opps/contrib/notifications/models.py | opps/contrib/notifications/models.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import json
from django.db import models
from django.utils.translation import ugettext_lazy as _
from opps.core.models import Publishable
from opps.db import Db
NOTIFICATION_TYPE = (
(u'json', _(u'JSON')),
(u'text', _(u'Text')),
(u'html', _(u'HTML')),
)
cla... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import json
from django.db import models
from django.utils.translation import ugettext_lazy as _
from opps.core.models import Publishable
from opps.db import Db
NOTIFICATION_TYPE = (
(u'json', _(u'JSON')),
(u'text', _(u'Text')),
(u'html', _(u'HTML')),
)
cla... | Update save Notification, save in nosql database | Update save Notification, save in nosql database
| Python | mit | williamroot/opps,opps/opps,jeanmask/opps,jeanmask/opps,YACOWS/opps,williamroot/opps,YACOWS/opps,YACOWS/opps,opps/opps,jeanmask/opps,williamroot/opps,williamroot/opps,opps/opps,jeanmask/opps,opps/opps,YACOWS/opps | ---
+++
@@ -24,21 +24,12 @@
type='json')
message = models.TextField(_('Message'))
- def add(self, container, message, action='message', _type='json',
- **attrs):
- notification = Notification.objects.create(
- container=container,
- action... |
632470cad13b7bfe88c52d4aafd9cbf9fff37b07 | rasterio/tool.py | rasterio/tool.py |
import code
import collections
import logging
import sys
import numpy
import rasterio
logger = logging.getLogger('rasterio')
Stats = collections.namedtuple('Stats', ['min', 'max', 'mean'])
def main(banner, dataset):
def show(source):
"""Show a raster using matplotlib.
The raster may be eith... |
import code
import collections
import logging
import sys
import numpy
import rasterio
logger = logging.getLogger('rasterio')
Stats = collections.namedtuple('Stats', ['min', 'max', 'mean'])
def main(banner, dataset):
def show(source, cmap='gray'):
"""Show a raster using matplotlib.
The raste... | Add colormap option to show(). | Add colormap option to show().
| Python | bsd-3-clause | perrygeo/rasterio,perrygeo/rasterio,clembou/rasterio,johanvdw/rasterio,njwilson23/rasterio,clembou/rasterio,clembou/rasterio,johanvdw/rasterio,njwilson23/rasterio,snorfalorpagus/rasterio,brendan-ward/rasterio,kapadia/rasterio,youngpm/rasterio,kapadia/rasterio,sgillies/rasterio,kapadia/rasterio,brendan-ward/rasterio,joh... | ---
+++
@@ -15,7 +15,7 @@
def main(banner, dataset):
- def show(source):
+ def show(source, cmap='gray'):
"""Show a raster using matplotlib.
The raster may be either an ndarray or a (dataset, bidx)
@@ -26,8 +26,7 @@
arr = source[0].read_band(source[1])
else:
... |
841d89ea9199bfad94c74b75f2bab5ae2690ede4 | numba/tests/broken_issues/test_closure_modulo.py | numba/tests/broken_issues/test_closure_modulo.py | from numba import autojit
import numpy as np
print np.zeros(10).dtype
@autojit
def closure_modulo(a, b):
c = np.zeros(10)
@jit('f8[:]()')
def foo():
c[0] = a % b
return c
return foo()
print closure_modulo(100, 48)
| from numba import autojit
@autojit
def closure_modulo(a, b):
@jit('int32()')
def foo():
return a % b
return foo()
print closure_modulo(100, 48)
| Simplify and cleanup previous commit. | Simplify and cleanup previous commit.
| Python | bsd-2-clause | ssarangi/numba,stefanseefeld/numba,pitrou/numba,pombredanne/numba,cpcloud/numba,stefanseefeld/numba,gdementen/numba,seibert/numba,sklam/numba,pombredanne/numba,IntelLabs/numba,IntelLabs/numba,numba/numba,gdementen/numba,ssarangi/numba,pombredanne/numba,shiquanwang/numba,stuartarchibald/numba,stonebig/numba,IntelLabs/nu... | ---
+++
@@ -1,15 +1,10 @@
from numba import autojit
-import numpy as np
-print np.zeros(10).dtype
-
@autojit
def closure_modulo(a, b):
- c = np.zeros(10)
- @jit('f8[:]()')
+ @jit('int32()')
def foo():
- c[0] = a % b
- return c
+ return a % b
return foo()
print closure_m... |
845fe88451dfc8e3505d4481e8160344942d3fdf | telethon/tl/patched/__init__.py | telethon/tl/patched/__init__.py | from .. import types, alltlobjects
from ..custom.message import Message as _Message
class MessageEmpty(_Message, types.MessageEmpty):
pass
types.MessageEmpty = MessageEmpty
alltlobjects.tlobjects[MessageEmpty.CONSTRUCTOR_ID] = MessageEmpty
class MessageService(_Message, types.MessageService):
pass
types.Mes... | from .. import types, alltlobjects
from ..custom.message import Message as _Message
class MessageEmpty(_Message, types.MessageEmpty):
pass
types.MessageEmpty = MessageEmpty
alltlobjects.tlobjects[MessageEmpty.CONSTRUCTOR_ID] = MessageEmpty
class MessageService(_Message, types.MessageService):
pass
types.Mes... | Fix definition typo in patched module | Fix definition typo in patched module
| Python | mit | LonamiWebs/Telethon,LonamiWebs/Telethon,LonamiWebs/Telethon,LonamiWebs/Telethon | ---
+++
@@ -13,8 +13,8 @@
types.MessageService = MessageService
alltlobjects.tlobjects[MessageService.CONSTRUCTOR_ID] = MessageService
-class _Message(_Message, types.Message):
+class Message(_Message, types.Message):
pass
-Message = _Message
types.Message = Message
+alltlobjects.tlobjects[Message.CONSTRU... |
f2d972831733fc77fef93d7d665750a55bbd4c33 | cli_tcdel.py | cli_tcdel.py | #!/usr/bin/env python
# encoding: utf-8
"""
.. codeauthor:: Tsuyoshi Hombashi <tsuyoshi.hombashi@gmail.com>
"""
import sys
from tcconfig.tcshow import main
if __name__ == '__main__':
sys.exit(main())
| #!/usr/bin/env python
# encoding: utf-8
"""
.. codeauthor:: Tsuyoshi Hombashi <tsuyoshi.hombashi@gmail.com>
"""
import sys
from tcconfig.tcdel import main
if __name__ == '__main__':
sys.exit(main())
| Fix tcdel for the deb package | Fix tcdel for the deb package
| Python | mit | thombashi/tcconfig,thombashi/tcconfig | ---
+++
@@ -7,7 +7,7 @@
import sys
-from tcconfig.tcshow import main
+from tcconfig.tcdel import main
if __name__ == '__main__': |
7906153b4718f34ed31c193a8e80b171e567209c | go/routers/keyword/view_definition.py | go/routers/keyword/view_definition.py | from django import forms
from go.router.view_definition import RouterViewDefinitionBase, EditRouterView
class KeywordForm(forms.Form):
keyword = forms.CharField()
target_endpoint = forms.CharField()
class BaseKeywordFormSet(forms.formsets.BaseFormSet):
@staticmethod
def initial_from_config(data):
... | from django import forms
from go.router.view_definition import RouterViewDefinitionBase, EditRouterView
class KeywordForm(forms.Form):
keyword = forms.CharField()
target_endpoint = forms.CharField()
class BaseKeywordFormSet(forms.formsets.BaseFormSet):
@staticmethod
def initial_from_config(data):
... | Remove unnecessary and broken DELETE check. | Remove unnecessary and broken DELETE check.
| Python | bsd-3-clause | praekelt/vumi-go,praekelt/vumi-go,praekelt/vumi-go,praekelt/vumi-go | ---
+++
@@ -17,7 +17,7 @@
def to_config(self):
keyword_endpoint_mapping = {}
for form in self:
- if (not form.is_valid()) or form.cleaned_data['DELETE']:
+ if not form.is_valid():
continue
keyword = form.cleaned_data['keyword']
ta... |
25ec9d2ee99437d0b68f53c9a4f1f5bc72ecf71f | app/utils.py | app/utils.py | def get_or_create(model, **kwargs):
""" Returns an instance of model and whether or not it already existed in a tuple. """
instance = model.query.filter_by(**kwargs).first()
if instance:
return instance, False
else:
instance = model(**kwargs)
return instance, True | from urllib.parse import urlparse, urljoin
from flask import request
def get_or_create(model, **kwargs):
""" Returns an instance of model and whether or not it already existed in a tuple. """
instance = model.query.filter_by(**kwargs).first()
if instance:
return instance, False
else:
in... | Add utility function for checking URL safety | Add utility function for checking URL safety
| Python | mit | Encrylize/MyDictionary,Encrylize/MyDictionary,Encrylize/MyDictionary | ---
+++
@@ -1,3 +1,6 @@
+from urllib.parse import urlparse, urljoin
+from flask import request
+
def get_or_create(model, **kwargs):
""" Returns an instance of model and whether or not it already existed in a tuple. """
instance = model.query.filter_by(**kwargs).first()
@@ -6,3 +9,9 @@
else:
... |
7d761d538c501cefb5e6acf62d3f0e945584b5ec | src/django_integration.py | src/django_integration.py | # -*- coding: utf-8 -*-
# Libraries
from datetime import datetime
# Django stuff
from Instanssi.kompomaatti.misc.events import get_upcoming
from Instanssi.screenshow.models import IRCMessage
from Instanssi.kompomaatti.models import Event
def django_get_event(event_id):
try:
return Event.objects.get(pk=e... | # -*- coding: utf-8 -*-
# Libraries
from django.utils import timezone
# Django stuff
from Instanssi.kompomaatti.misc.events import get_upcoming
from Instanssi.screenshow.models import IRCMessage
from Instanssi.kompomaatti.models import Event
def django_get_event(event_id):
try:
return Event.objects.get(... | Use timezone library for dates | Use timezone library for dates
| Python | mit | Instanssi/KompomaattiBot | ---
+++
@@ -1,7 +1,7 @@
# -*- coding: utf-8 -*-
# Libraries
-from datetime import datetime
+from django.utils import timezone
# Django stuff
from Instanssi.kompomaatti.misc.events import get_upcoming
@@ -37,7 +37,7 @@
try:
message = IRCMessage()
message.event_id = event_id
- mess... |
91d6021fb0db6052570f1a0305a141e1af13b6e3 | localeurl/models.py | localeurl/models.py | from django.conf import settings
from django.core import urlresolvers
from django.utils import translation
from localeurl import utils
def reverse(*args, **kwargs):
reverse_kwargs = kwargs.get('kwargs', {})
locale = utils.supported_language(reverse_kwargs.pop('locale',
translation.get_language()))
... | from django.conf import settings
from django.core import urlresolvers
from django.utils import translation
from localeurl import utils
def reverse(*args, **kwargs):
reverse_kwargs = kwargs.get('kwargs', {})
if reverse_kwargs!=None:
locale = utils.supported_language(reverse_kwargs.pop('locale',
... | Handle situation when kwargs is None | Handle situation when kwargs is None
| Python | mit | carljm/django-localeurl,gonnado/django-localeurl,extertioner/django-localeurl | ---
+++
@@ -5,8 +5,11 @@
def reverse(*args, **kwargs):
reverse_kwargs = kwargs.get('kwargs', {})
- locale = utils.supported_language(reverse_kwargs.pop('locale',
- translation.get_language()))
+ if reverse_kwargs!=None:
+ locale = utils.supported_language(reverse_kwargs.pop('locale',
+... |
d367f32d6b8269d402305714eb95fe708f8e2b0d | junction/conferences/serializers.py | junction/conferences/serializers.py | from rest_framework import serializers
from .models import Conference, ConferenceVenue, Room
class ConferenceSerializer(serializers.HyperlinkedModelSerializer):
status = serializers.CharField(source='get_status_display')
class Meta:
model = Conference
fields = ('id', 'name', 'slug', 'descrip... | from rest_framework import serializers
from .models import Conference, ConferenceVenue, Room
class ConferenceSerializer(serializers.HyperlinkedModelSerializer):
status = serializers.CharField(source='get_status_display')
class Meta:
model = Conference
fields = ('id', 'name', 'slug', 'descrip... | Add latitude and longitude in api | Add latitude and longitude in api
| Python | mit | ChillarAnand/junction,praba230890/junction,nava45/junction,pythonindia/junction,ChillarAnand/junction,ChillarAnand/junction,pythonindia/junction,nava45/junction,nava45/junction,farhaanbukhsh/junction,nava45/junction,praba230890/junction,farhaanbukhsh/junction,pythonindia/junction,ChillarAnand/junction,pythonindia/junct... | ---
+++
@@ -15,7 +15,7 @@
class VenueSerializer(serializers.HyperlinkedModelSerializer):
class Meta:
model = ConferenceVenue
- fields = ('name', 'address')
+ fields = ('name', 'address', 'latitude', 'longitudes')
class RoomSerializer(serializers.HyperlinkedModelSerializer): |
101784851bf8c7add95bba7dbb4277114b7a3098 | refugeedata/mailings/tasks.py | refugeedata/mailings/tasks.py | from django_rq import job
from .. import utils
@job
def send_sms(to, body):
utils.send_sms(to=to, body=body)
| from django_rq import job
from .. import utils
@job
def send_sms(to, body):
for number in to:
send_single_sms.delay([to], body)
@job
def send_single_sms(to, body):
utils.send_sms(to=to, body=body)
| Split SMS sending into multiple jobs (to get around Heroku timeout) | Split SMS sending into multiple jobs (to get around Heroku timeout)
| Python | mit | ukch/refugeedata,ukch/refugeedata,ukch/refugeedata,ukch/refugeedata | ---
+++
@@ -5,4 +5,10 @@
@job
def send_sms(to, body):
+ for number in to:
+ send_single_sms.delay([to], body)
+
+
+@job
+def send_single_sms(to, body):
utils.send_sms(to=to, body=body) |
03c62fd2676918524a8cef469028d41f1b74d2f4 | python/ql/test/experimental/library-tests/frameworks/django/SqlExecution.py | python/ql/test/experimental/library-tests/frameworks/django/SqlExecution.py | from django.db import connection, models
from django.db.models.expressions import RawSQL
def test_plain():
cursor = connection.cursor()
cursor.execute("some sql") # $getSql="some sql"
def test_context():
with connection.cursor() as cursor:
cursor.execute("some sql") # $getSql="some sql"
... | from django.db import connection, models
from django.db.models.expressions import RawSQL
def test_plain():
cursor = connection.cursor()
cursor.execute("some sql") # $getSql="some sql"
def test_context():
with connection.cursor() as cursor:
cursor.execute("some sql") # $getSql="some sql"
... | Fix typo in test case | Python: Fix typo in test case
| Python | mit | github/codeql,github/codeql,github/codeql,github/codeql,github/codeql,github/codeql,github/codeql,github/codeql,github/codeql,github/codeql,github/codeql,github/codeql,github/codeql,github/codeql,github/codeql | ---
+++
@@ -25,4 +25,4 @@
User.objects.extra(select="select", where="where", tables="tables", order_by="order_by") # $getSql="select" $getSql="where" $getSql="tables" $getSql="order_by"
raw = RawSQL("so raw")
- Users.objects.annotate(val=raw) # $f-:getSql="so raw"
+ User.objects.annotate(val=raw) ... |
7ffe4749d1c8f5315775a50a9f7b6eb632c6a258 | scorecard/tests/test_views.py | scorecard/tests/test_views.py | import json
from django.test import (
TransactionTestCase,
Client,
override_settings,
)
from . import (
import_data,
)
from .resources import (
GeographyResource,
MunicipalityProfileResource,
MedianGroupResource,
RatingCountGroupResource,
)
@override_settings(
SITE_ID=2,
STAT... | import json
from infrastructure.models import FinancialYear
from django.test import (
TransactionTestCase,
Client,
override_settings,
)
from . import (
import_data,
)
from .resources import (
GeographyResource,
MunicipalityProfileResource,
MedianGroupResource,
RatingCountGroupResource,... | Create a financial year to test with | Create a financial year to test with
| Python | mit | Code4SA/municipal-data,Code4SA/municipal-data,Code4SA/municipal-data,Code4SA/municipal-data | ---
+++
@@ -1,4 +1,5 @@
import json
+from infrastructure.models import FinancialYear
from django.test import (
TransactionTestCase,
@@ -42,6 +43,9 @@
RatingCountGroupResource,
"views/rating_count_group.csv",
)
+
+ fy = FinancialYear.objects.create(budget_year="2019/2... |
54d88ef6ebfacbb2924ca9bc94935ed81fc90244 | migrations/versions/1815829d365_.py | migrations/versions/1815829d365_.py | """empty message
Revision ID: 1815829d365
Revises: 3fcddd64a72
Create Date: 2016-02-09 17:58:47.362133
"""
# revision identifiers, used by Alembic.
revision = '1815829d365'
down_revision = '3fcddd64a72'
from alembic import op
import sqlalchemy as sa
def upgrade():
### commands auto generated by Alembic - plea... | """empty message
Revision ID: 1815829d365
Revises: 3fcddd64a72
Create Date: 2016-02-09 17:58:47.362133
"""
# revision identifiers, used by Alembic.
revision = '1815829d365'
down_revision = '3fcddd64a72'
from alembic import op
import sqlalchemy as sa
def upgrade():
### commands auto generated by Alembic - plea... | Fix index for title without geo abr | Fix index for title without geo abr | Python | mit | LandRegistry/system-of-record,LandRegistry/system-of-record | ---
+++
@@ -18,7 +18,7 @@
### commands auto generated by Alembic - please adjust! ###
# create new unique index to include geometry_application_ref
op.execute("DROP INDEX title_abr_idx")
- op.execute("CREATE UNIQUE INDEX title_abr_geo_idx ON records((record->'data'->>'title_number'),(record->'data'-... |
acb9cd566f259c37c0c943465c324fedb252df9a | tools/grit/grit/extern/FP.py | tools/grit/grit/extern/FP.py | #!/usr/bin/python2.2
# Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import md5
"""64-bit fingerprint support for strings.
Usage:
from extern import FP
print 'Fingerprint is %ld' % FP.Fi... | #!/usr/bin/python
# Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import md5
"""64-bit fingerprint support for strings.
Usage:
from extern import FP
print 'Fingerprint is %ld' % FP.Finge... | Remove version number from Python shebang. | Remove version number from Python shebang.
On special request from someone trying to purge python2.2 from code indexed
internally at Google.
git-svn-id: de016e52bd170d2d4f2344f9bf92d50478b649e0@7071 0039d316-1c4b-4281-b951-d872f2087c98
| Python | bsd-3-clause | yitian134/chromium,gavinp/chromium,adobe/chromium,yitian134/chromium,adobe/chromium,adobe/chromium,Crystalnix/house-of-life-chromium,yitian134/chromium,adobe/chromium,Crystalnix/house-of-life-chromium,Crystalnix/house-of-life-chromium,adobe/chromium,gavinp/chromium,adobe/chromium,yitian134/chromium,ropik/chromium,ropik... | ---
+++
@@ -1,4 +1,4 @@
-#!/usr/bin/python2.2
+#!/usr/bin/python
# Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file. |
c87f75334aa7253ad209bdd4d88c2429723e51d1 | admin/desk/urls.py | admin/desk/urls.py | from django.conf.urls import url
from admin.desk import views
urlpatterns = [
url(r'^$', views.DeskCaseList.as_view(), name='cases'),
url(r'^customer/(?P<user_id>[a-z0-9]+)/$', views.DeskCustomer.as_view(),
name='customer'),
url(r'^cases/(?P<user_id>[a-z0-9]+)/$', views.DeskCaseList.as_view(),
... | from django.conf.urls import url
from admin.desk import views
urlpatterns = [
url(r'^customer/(?P<user_id>[a-z0-9]+)/$', views.DeskCustomer.as_view(),
name='customer'),
url(r'^cases/(?P<user_id>[a-z0-9]+)/$', views.DeskCaseList.as_view(),
name='user_cases'),
]
| Remove unused bare desk URL | Remove unused bare desk URL
| Python | apache-2.0 | hmoco/osf.io,aaxelb/osf.io,laurenrevere/osf.io,pattisdr/osf.io,caneruguz/osf.io,CenterForOpenScience/osf.io,baylee-d/osf.io,HalcyonChimera/osf.io,brianjgeiger/osf.io,saradbowman/osf.io,chrisseto/osf.io,cwisecarver/osf.io,mfraezz/osf.io,monikagrabowska/osf.io,leb2dg/osf.io,acshi/osf.io,crcresearch/osf.io,alexschiller/os... | ---
+++
@@ -3,7 +3,6 @@
from admin.desk import views
urlpatterns = [
- url(r'^$', views.DeskCaseList.as_view(), name='cases'),
url(r'^customer/(?P<user_id>[a-z0-9]+)/$', views.DeskCustomer.as_view(),
name='customer'),
url(r'^cases/(?P<user_id>[a-z0-9]+)/$', views.DeskCaseList.as_view(), |
ad1c654422413b90c78614f66af61c1410cc1a77 | dsub/_dsub_version.py | dsub/_dsub_version.py | # Copyright 2017 Google Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or a... | # Copyright 2017 Google Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or a... | Update dsub version to 0.4.5 | Update dsub version to 0.4.5
PiperOrigin-RevId: 393155372
| Python | apache-2.0 | DataBiosphere/dsub,DataBiosphere/dsub | ---
+++
@@ -26,4 +26,4 @@
0.1.3.dev0 -> 0.1.3 -> 0.1.4.dev0 -> ...
"""
-DSUB_VERSION = '0.4.5.dev0'
+DSUB_VERSION = '0.4.5' |
a2e63f05d7992058b09a3d8e72b91e022cb94ef1 | core/urls.py | core/urls.py | from django.conf.urls import include, url
from django.views.generic import TemplateView
from tastypie.api import Api
from .api import ImageResource, ThumbnailResource, PinResource, UserResource
v1_api = Api(api_name='v1')
v1_api.register(ImageResource())
v1_api.register(ThumbnailResource())
v1_api.register(PinResour... | from django.conf.urls import include, url
from django.views.generic import TemplateView
from tastypie.api import Api
from .api import ImageResource, ThumbnailResource, PinResource, UserResource
v1_api = Api(api_name='v1')
v1_api.register(ImageResource())
v1_api.register(ThumbnailResource())
v1_api.register(PinResour... | Correct the name for specified pin | Fix: Correct the name for specified pin
| Python | bsd-2-clause | pinry/pinry,lapo-luchini/pinry,lapo-luchini/pinry,pinry/pinry,pinry/pinry,pinry/pinry,lapo-luchini/pinry,lapo-luchini/pinry | ---
+++
@@ -22,7 +22,7 @@
url(r'^pins/users/(?P<user>(\w|-)+)/$', TemplateView.as_view(template_name='core/pins.html'),
name='user-pins'),
url(r'^(?P<pin>[0-9]+)/$', TemplateView.as_view(template_name='core/pins.html'),
- name='recent-pins'),
+ name='pin-detail'),
url(r'^$', Temp... |
755d8f6438ac8f7c3da6c5959e54915e7835b483 | run.py | run.py | #!venv/bin/python
from app import telomere
telomere.run(host='0.0.0.0', debug=True)
| #!/usr/bin/env python
from app import telomere
telomere.run(host='0.0.0.0', debug=True)
| Change to a better shebang | Change to a better shebang
| Python | mit | rabramley/telomere,rabramley/telomere,rabramley/telomere | ---
+++
@@ -1,4 +1,4 @@
-#!venv/bin/python
+#!/usr/bin/env python
from app import telomere
telomere.run(host='0.0.0.0', debug=True)
|
9a5dc452f181fac45a8c0efcd3f70e116efefc2a | erpnext/patches/v7_0/setup_account_table_for_expense_claim_type_if_exists.py | erpnext/patches/v7_0/setup_account_table_for_expense_claim_type_if_exists.py | from __future__ import unicode_literals
import frappe
def execute():
frappe.reload_doc("hr", "doctype", "expense_claim_type")
for expense_claim_type in frappe.get_all("Expense Claim Type", fields=["name", "default_account"]):
if expense_claim_type.default_account:
doc = frappe.get_doc("Expense Claim Type", ex... | from __future__ import unicode_literals
import frappe
def execute():
frappe.reload_doc("hr", "doctype", "expense_claim_type")
frappe.reload_doc("hr", "doctype", "expense_claim_account")
for expense_claim_type in frappe.get_all("Expense Claim Type", fields=["name", "default_account"]):
if expense_claim_type.defa... | Patch fixed for expense claim type | Patch fixed for expense claim type
| Python | agpl-3.0 | njmube/erpnext,indictranstech/erpnext,geekroot/erpnext,geekroot/erpnext,gsnbng/erpnext,Aptitudetech/ERPNext,indictranstech/erpnext,njmube/erpnext,indictranstech/erpnext,njmube/erpnext,geekroot/erpnext,geekroot/erpnext,indictranstech/erpnext,njmube/erpnext,gsnbng/erpnext,gsnbng/erpnext,gsnbng/erpnext | ---
+++
@@ -3,6 +3,7 @@
def execute():
frappe.reload_doc("hr", "doctype", "expense_claim_type")
+ frappe.reload_doc("hr", "doctype", "expense_claim_account")
for expense_claim_type in frappe.get_all("Expense Claim Type", fields=["name", "default_account"]):
if expense_claim_type.default_account: |
d4f8746f6423c528009f02a4bdc193b311ccfd23 | Discord/tree.py | Discord/tree.py |
from discord import app_commands
from discord.ext import commands
import logging
import sys
import traceback
import sentry_sdk
class CommandTree(app_commands.CommandTree):
async def on_error(self, interaction, error):
if (
isinstance(error, app_commands.TransformerError) and
is... |
from discord import app_commands
from discord.ext import commands
import logging
import sys
import traceback
import sentry_sdk
class CommandTree(app_commands.CommandTree):
async def on_error(self, interaction, error):
# Command Invoke Error
if isinstance(error, app_commands.CommandInvokeError)... | Handle bot missing permissions for app commands | [Discord] Handle bot missing permissions for app commands
| Python | mit | Harmon758/Harmonbot,Harmon758/Harmonbot | ---
+++
@@ -12,6 +12,25 @@
class CommandTree(app_commands.CommandTree):
async def on_error(self, interaction, error):
+ # Command Invoke Error
+ if isinstance(error, app_commands.CommandInvokeError):
+ # Bot missing permissions
+ if isinstance(error.original, commands.BotMi... |
b89982f7b66b46f4338ff2758219d7419e36d6ba | lms/djangoapps/api_manager/management/commands/migrate_orgdata.py | lms/djangoapps/api_manager/management/commands/migrate_orgdata.py | import json
from django.contrib.auth.models import Group
from django.core.management.base import BaseCommand
from api_manager.models import GroupProfile, Organization
class Command(BaseCommand):
"""
Migrates legacy organization data and user relationships from older Group model approach to newer concrete Org... | import json
from django.contrib.auth.models import Group
from django.core.management.base import BaseCommand
from api_manager.models import GroupProfile, Organization
class Command(BaseCommand):
"""
Migrates legacy organization data and user relationships from older Group model approach to newer concrete Org... | Tweak to migration in order to accomodate old names for data fields and allow for if data fields were not present | Tweak to migration in order to accomodate old names for data fields and allow for if data fields were not present
| Python | agpl-3.0 | edx-solutions/edx-platform,edx-solutions/edx-platform,edx-solutions/edx-platform,edx-solutions/edx-platform | ---
+++
@@ -16,12 +16,23 @@
for org in org_groups:
data = json.loads(org.data)
+
+ name = org.name
+ display_name = data.get('display_name', name)
+ contact_name = data.get('contact_name', None)
+ contact_email = data.get('email', None)
+ ... |
abe1f4fbc846b51f1069f3e7da48524876f2caf6 | blackbelt/slack.py | blackbelt/slack.py | from slacker import Slacker
from blackbelt.config import config
class Slack(object):
def __init__(self, token=None):
if not token:
token = config['slack']['access_token']
slack = Slacker(token)
self.slack = slack
if not token:
raise ValueError("Can't ... | from slacker import Slacker
from blackbelt.config import config
class Slack(object):
def __init__(self, token=None):
if not token:
token = config['slack']['access_token']
slack = Slacker(token)
self.slack = slack
if not token:
raise ValueError("Can't ... | Add custom emoji for blackbelt | Add custom emoji for blackbelt
| Python | mit | apiaryio/black-belt | ---
+++
@@ -16,7 +16,7 @@
return self.slack.auth.test().body['user_id']
def post_message(self, message, room):
- return self.slack.chat.post_message(room, message, username = "Black Belt", icon_emoji = ":black_joker:")
+ return self.slack.chat.post_message(room, message, username = "Blac... |
3d1edf98284979ae8eade5804e44fb312bece1b0 | sir/schema/__init__.py | sir/schema/__init__.py | # Copyright (c) 2014 Wieland Hoffmann
# License: MIT, see LICENSE for details
from mbdata import models
from . import modelext
from .searchentities import SearchEntity as E, SearchField as F
SearchRecording = E(modelext.CustomRecording, [
F("mbid", "gid"),
F("recording", "name"),
F("arid", "artist_credit.... | # Copyright (c) 2014 Wieland Hoffmann
# License: MIT, see LICENSE for details
from mbdata import models
from . import modelext
from .searchentities import SearchEntity as E, SearchField as F
SearchRecording = E(modelext.CustomRecording, [
F("mbid", "gid"),
F("recording", "name"),
F("arid", "artist_credit.... | Add missing release group fields | schema: Add missing release group fields
| Python | mit | jeffweeksio/sir | ---
+++
@@ -23,6 +23,8 @@
F("release-group", "name"),
# F("release", "releases.name"),
F("reid", "releases.gid"),
+ F("releases", "releases.gid", transformfunc=len),
+ F("credit-name", "artist_credit.artists.artist.name")
])
|
3141b73ddeb14184062ab5ff4436ebb87de02253 | dayonetools/services/__init__.py | dayonetools/services/__init__.py | """Common services code"""
from datetime import datetime
import importlib
AVAILABLE_SERVICES = ['habit_list', 'idonethis', 'nikeplus']
SERVICES_PKG = 'dayonetools.services'
def get_service_module(service_name):
"""Import given service from dayonetools.services package"""
module = '%s.%s' % (SERVICES_PKG, s... | """Common services code"""
AVAILABLE_SERVICES = ['habit_list', 'idonethis', 'nikeplus']
def get_service_module(service_name):
"""Import given service from dayonetools.services package"""
import importlib
services_pkg = 'dayonetools.services'
module = '%s.%s' % (services_pkg, service_name)
retur... | Move some imports internal so importing services package is not so cluttered | Move some imports internal so importing services package is not so cluttered
| Python | mit | durden/dayonetools | ---
+++
@@ -1,16 +1,15 @@
"""Common services code"""
+AVAILABLE_SERVICES = ['habit_list', 'idonethis', 'nikeplus']
-from datetime import datetime
-import importlib
-
-AVAILABLE_SERVICES = ['habit_list', 'idonethis', 'nikeplus']
-SERVICES_PKG = 'dayonetools.services'
def get_service_module(service_name):
... |
8a966a2cf96009d078ee0ba6fa020e2de782ae7a | brewdata/__init__.py | brewdata/__init__.py | #!/usr/bin/env python
import os
def where():
"""
Return the installation location of BrewData
"""
f = os.path.split(__file__)[0]
return os.path.abspath(f)
def cereals():
return(os.path.join(where(), 'cereals'))
def hops():
return(os.path.join(where(), 'hops'))
def yeast():
retur... | #!/usr/bin/env python
import os
def where():
"""
Return the installation location of BrewData
"""
f = os.path.split(__file__)[0]
return os.path.abspath(f)
def cereals():
return(os.path.join(where(), b'cereals'))
def hops():
return(os.path.join(where(), b'hops'))
def yeast():
ret... | Set path names to be byte strings | Set path names to be byte strings
| Python | mit | chrisgilmerproj/brewdata,chrisgilmerproj/brewdata | ---
+++
@@ -12,15 +12,15 @@
def cereals():
- return(os.path.join(where(), 'cereals'))
+ return(os.path.join(where(), b'cereals'))
def hops():
- return(os.path.join(where(), 'hops'))
+ return(os.path.join(where(), b'hops'))
def yeast():
- return(os.path.join(where(), 'yeast'))
+ return... |
93ea521678c283d8211aed9ca88db6c5dc068362 | process_pic.py | process_pic.py | from pic import Picture
from path import Path
import argparse, json
parser = argparse.ArgumentParser(
description=
"Process the picture or the directory, given the json config file")
parser.add_argument("path", help="Path for the picture or the directory")
parser.add_argument(
"-n",
"--nb_faces",
ty... | from pic import Picture
from path import Path
import argparse
parser = argparse.ArgumentParser(
description=
"Process the picture or the directory, given the json config file")
parser.add_argument("path", help="Path for the picture or the directory")
parser.add_argument(
"-n",
"--nb_faces",
type=int... | Add a function to read json config files | Add a function to read json config files
| Python | mit | Dixneuf19/fuzzy-octo-disco | ---
+++
@@ -1,6 +1,6 @@
from pic import Picture
from path import Path
-import argparse, json
+import argparse
parser = argparse.ArgumentParser(
description=
"Process the picture or the directory, given the json config file")
@@ -12,13 +12,42 @@
help=
"0 | 1 | n to don't search for any face | se... |
4218d2a4d711f5a516423b1f4aa2685fc5a456b3 | app/brain/user_management/account_updater.py | app/brain/user_management/account_updater.py | from flask_login import current_user
from app.brain.user_management.change_password_result import ChangePasswordResult
from app.brain.utilities import hash_password
class AccountUpdater(object):
@staticmethod
def change_password(old_password, new_password, confirm_password):
if new_password != confir... | from flask_login import current_user
from app.brain.user_management.change_password_result import ChangePasswordResult
from app.brain.utilities import hash_password
from app.service import UsersService
class AccountUpdater(object):
@staticmethod
def change_password(old_password, new_password, confirm_passwor... | Put in call to to UsersService to actually change password | Put in call to to UsersService to actually change password
| Python | mit | pbraunstein/trackercise,pbraunstein/trackercise,pbraunstein/trackercise,pbraunstein/trackercise,pbraunstein/trackercise | ---
+++
@@ -2,6 +2,7 @@
from app.brain.user_management.change_password_result import ChangePasswordResult
from app.brain.utilities import hash_password
+from app.service import UsersService
class AccountUpdater(object):
@@ -16,5 +17,4 @@
return ChangePasswordResult.CURRENT_PASSWORD_INCORRECT
... |
88238ca8a0c3169e9350434ecd517eafdb118b88 | pybinding/greens.py | pybinding/greens.py | import numpy as np
import _pybinding
from .results import LDOSpoint
__all__ = ['Greens', 'make_kpm']
class Greens:
def __init__(self, impl: _pybinding.Greens):
self.impl = impl
def calc_ldos(self, energy: np.ndarray, broadening: float, position: tuple, sublattice: int=-1):
return LDOSpoint(... | import numpy as np
import _pybinding
from .results import LDOSpoint
__all__ = ['Greens', 'make_kpm']
class Greens:
def __init__(self, impl: _pybinding.Greens):
self.impl = impl
def report(self, shortform=False):
return self.impl.report(shortform)
def calc_ldos(self, energy: np.ndarray,... | Add report() method to Greens | Add report() method to Greens
| Python | bsd-2-clause | dean0x7d/pybinding,MAndelkovic/pybinding,MAndelkovic/pybinding,dean0x7d/pybinding,MAndelkovic/pybinding,dean0x7d/pybinding | ---
+++
@@ -10,6 +10,9 @@
def __init__(self, impl: _pybinding.Greens):
self.impl = impl
+ def report(self, shortform=False):
+ return self.impl.report(shortform)
+
def calc_ldos(self, energy: np.ndarray, broadening: float, position: tuple, sublattice: int=-1):
return LDOSpoint(... |
63cf6f6228490c9944711106cd134254eafac3ca | regressors/plots.py | regressors/plots.py | # -*- coding: utf-8 -*-
"""This module contains functions for making plots relevant to regressors."""
from __future__ import print_function
from __future__ import division
from __future__ import absolute_import
from __future__ import unicode_literals
| # -*- coding: utf-8 -*-
"""This module contains functions for making plots relevant to regressors."""
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from __future__ import unicode_literals
import matplotlib.pyplot as plt
import seaborn.apionly as sns
from ... | Add function to make residuals plot | Add function to make residuals plot
| Python | isc | nsh87/regressors | ---
+++
@@ -1,9 +1,69 @@
# -*- coding: utf-8 -*-
"""This module contains functions for making plots relevant to regressors."""
+from __future__ import absolute_import
+from __future__ import division
from __future__ import print_function
-from __future__ import division
-from __future__ import absolute_import
f... |
46d2b85e7df1b8e247a9ab09ea390de15cc84fb6 | CodeFights/sumUpNumbers.py | CodeFights/sumUpNumbers.py | #!/usr/local/bin/python
# Code Fights Sum Up Problem
import re
def sumUpNumbers(inputString):
return sum([int(n) for n in re.findall(r'\d+', inputString)])
def main():
tests = [
["2 apples, 12 oranges", 14],
["123450", 123450],
["Your payment method is invalid", 0]
]
for t ... | #!/usr/local/bin/python
# Code Fights Sum Up Numbers Problem
import re
def sumUpNumbers(inputString):
return sum([int(n) for n in re.findall(r'\d+', inputString)])
def main():
tests = [
["2 apples, 12 oranges", 14],
["123450", 123450],
["Your payment method is invalid", 0]
]
... | Fix missing word in sum up numbers problem | Fix missing word in sum up numbers problem
| Python | mit | HKuz/Test_Code | ---
+++
@@ -1,5 +1,5 @@
#!/usr/local/bin/python
-# Code Fights Sum Up Problem
+# Code Fights Sum Up Numbers Problem
import re
|
61cebe12c001bb42350d8e9e99a7fa7d26fc7667 | openedx/stanford/lms/lib/courseware_search/lms_filter_generator.py | openedx/stanford/lms/lib/courseware_search/lms_filter_generator.py | """
Custom override of SearchFilterGenerator to use course tiles for
discovery search.
"""
from search.filter_generator import SearchFilterGenerator
from branding_stanford.models import TileConfiguration
from lms.lib.courseware_search.lms_filter_generator import LmsSearchFilterGenerator
class TileSearchFilterGenerat... | """
Custom override of SearchFilterGenerator to use course tiles for
discovery search.
"""
from search.filter_generator import SearchFilterGenerator
from branding_stanford.models import TileConfiguration
from lms.lib.courseware_search.lms_filter_generator import LmsSearchFilterGenerator
class TileSearchFilterGenerat... | Use stanford search logic only if configured | Use stanford search logic only if configured
| Python | agpl-3.0 | Stanford-Online/edx-platform,Stanford-Online/edx-platform,Stanford-Online/edx-platform,Stanford-Online/edx-platform | ---
+++
@@ -23,5 +23,7 @@
course_tiles_ids = TileConfiguration.objects.filter(
enabled=True,
).values_list('course_id', flat=True).order_by('-change_date')
- field_dictionary['course'] = list(course_tiles_ids)
+ courses = list(course_tiles_ids)
+ ... |
7e71e011fc4266b1edf21a0028cf878a71ab23fe | PyOpenWorm/plot.py | PyOpenWorm/plot.py | from PyOpenWorm import *
class Plot(DataObject):
"""
Object for storing plot data in PyOpenWorm.
Must be instantiated with a 2D list of coordinates.
"""
def __init__(self, data=False, *args, **kwargs):
DataObject.__init__(self, **kwargs)
Plot.DatatypeProperty('_data_string', self... | from PyOpenWorm import *
class Plot(DataObject):
"""
Object for storing plot data in PyOpenWorm.
Must be instantiated with a 2D list of coordinates.
"""
def __init__(self, data=False, *args, **kwargs):
DataObject.__init__(self, **kwargs)
Plot.DatatypeProperty('_data_string', self... | Add data setter and getter for Plot | Add data setter and getter for Plot
| Python | mit | gsarma/PyOpenWorm,openworm/PyOpenWorm,openworm/PyOpenWorm,gsarma/PyOpenWorm | ---
+++
@@ -12,13 +12,9 @@
DataObject.__init__(self, **kwargs)
Plot.DatatypeProperty('_data_string', self, multiple=False)
- if (isinstance(data, list)) and (isinstance(data[0], list)):
- # data is user-facing, _data_string is for db
- self._data_string(self._to_string... |
d080871e248cdf457fd1ff0023b5a651456d5b0b | openfisca_senegal/survey_scenarios.py | openfisca_senegal/survey_scenarios.py | # -*- coding: utf-8 -*-
from openfisca_senegal import CountryTaxBenefitSystem as SenegalTaxBenefitSystem
from openfisca_survey_manager.scenarios import AbstractSurveyScenario
class SenegalSurveyScenario(AbstractSurveyScenario):
id_variable_by_entity_key = dict(
famille = 'id_famille',
)
role... | # -*- coding: utf-8 -*-
from openfisca_senegal import CountryTaxBenefitSystem as SenegalTaxBenefitSystem
from openfisca_survey_manager.scenarios import AbstractSurveyScenario
class SenegalSurveyScenario(AbstractSurveyScenario):
id_variable_by_entity_key = dict(
famille = 'id_famille',
)
role... | Fix survey_scenario (use core v20 syntax) | Fix survey_scenario (use core v20 syntax)
| Python | agpl-3.0 | openfisca/senegal | ---
+++
@@ -14,7 +14,7 @@
)
def __init__(self, input_data_frame = None, tax_benefit_system = None,
- reference_tax_benefit_system = None, year = None):
+ baseline_tax_benefit_system = None, year = None):
super(SenegalSurveyScenario, self).__init__()
assert input... |
6059bff12c159fbe43e789c4b55fe5eb012517e9 | src/checker/plugin/filters/depth.py | src/checker/plugin/filters/depth.py | from filter import FilterException
from common import PluginType
from yapsy.IPlugin import IPlugin
import logging
class DepthFilter(IPlugin):
category = PluginType.FILTER
id = "depth"
def __init__(self):
self.__log = logging.getLogger(__name__)
self.__conf = None
def setConf(self, c... | from filter import FilterException
from common import PluginType
from yapsy.IPlugin import IPlugin
import logging
class DepthFilter(IPlugin):
category = PluginType.FILTER
id = "depth"
def __init__(self):
self.__log = logging.getLogger(__name__)
self.__conf = None
def setConf(self, c... | Add default value on property | Add default value on property
| Python | mit | eghuro/crawlcheck | ---
+++
@@ -20,7 +20,7 @@
pass
def filter(self, transaction):
- maxDepth = self.__conf.getProperty("maxDepth")
+ maxDepth = self.__conf.getProperty("maxDepth", 0)
if maxDepth == 0:
return # unlimited
if transaction.depth > maxDepth: |
d7b89cf5e8a0102034b0d9ed7f28fbe7fb0bc167 | cartoframes/viz/helpers/color_category_layer.py | cartoframes/viz/helpers/color_category_layer.py | from __future__ import absolute_import
from ..layer import Layer
def color_category_layer(source, value, top=11, palette='bold', title='', othersLabel='Others'):
return Layer(
source,
style={
'point': {
'color': 'ramp(top(${0}, {1}), {2})'.format(value, top, palette)
... | from __future__ import absolute_import
from ..layer import Layer
def color_category_layer(source, value, top=11, palette='bold', title=''):
return Layer(
source,
style={
'point': {
'color': 'ramp(top(${0}, {1}), {2})'.format(value, top, palette)
},
... | Use fixed value in the helper | Use fixed value in the helper
| Python | bsd-3-clause | CartoDB/cartoframes,CartoDB/cartoframes | ---
+++
@@ -3,7 +3,7 @@
from ..layer import Layer
-def color_category_layer(source, value, top=11, palette='bold', title='', othersLabel='Others'):
+def color_category_layer(source, value, top=11, palette='bold', title=''):
return Layer(
source,
style={
@@ -14,7 +14,7 @@
'... |
c39e824119498fb6d669367fb53249b609edbaf2 | main.py | main.py | import requests
import os
import shutil
client_id = '' # Imgur application Client ID, fill this in.
directory_name = 'Imgur Albums\\' # Directory for the images to be stored
def scrape(album_id):
''' (str) -> list of str
Given an Imgur album ID, scrapes all the images within the album into a
folder. Re... | import requests
import os
import shutil
client_id = '' # Imgur application Client ID, fill this in.
directory_name = 'Imgur Albums\\' # Directory for the images to be stored
def scrape(album_id):
''' (str) -> list of str
Given an Imgur album ID, scrapes all the images within the album into a
folder. Re... | Raise exception instead of returnning it | Raise exception instead of returnning it
| Python | mit | kevinleung987/Imgur-Album-Scraper | ---
+++
@@ -17,11 +17,12 @@
os.makedirs(directory) # Creates the full directory for the album
imageList = []
print('Loading Album: '+album_id)
+ # Loading the album with Requests
link = 'https://api.imgur.com/3/album/' + album_id
header = {'Authorization': 'Client-Id '+client_id}
... |
8f84ce069159cb7d0dfb95a2a28f992a8a4f3556 | client.py | client.py | import threading
import select
class Client(object):
def __init__(self, sock, address, host):
self.socket = sock
self.server = host
self.address = address
self.connected = True
self.exit_request = False
self.thread = ClientThread(self)
self.thread.start()
... | import threading
import select
class Client(object):
def __init__(self, sock, address, host):
self.socket = sock
self.server = host
self.address = address
self.connected = True
self.exit_request = False
self.thread = ClientThread(self)
self.thread.start()
... | Add on_receive and send methods. | Add on_receive and send methods.
on_receive method is called when a new data is got.
send method is used to send data to the client.
| Python | mit | Mariusz-v7/WebSocketServer-Python- | ---
+++
@@ -14,6 +14,12 @@
self.thread.start()
self.socket.setblocking(0)
+
+ def on_receive(self, data):
+ pass
+
+ def send(self, data):
+ self.socket.sendall(data)
def disconnect(self):
self.exit_request = True
@@ -34,7 +40,7 @@
data = self.paren... |
2dde683b0a43a6339e446e37aab2726aaca65d83 | config.py | config.py | # Screen size
WIDTH = 320
HEIGHT = 240
SCREEN_SIZE = (WIDTH, HEIGHT)
# Update delay in ms
DELAY = 100
ALIVE_IMG_PATH="data/alive.png"
DEAD_IMG_PATH="data/dead.png"
CURSOR_DEAD_IMG_PATH="data/cursor.png"
CURSOR_ALIVE_IMG_PATH="data/cursor_alive.png"
ALIVE_IMG = None
DEAD_IMG = None
| # Screen size
WIDTH = 320
HEIGHT = 240
SCREEN_SIZE = (WIDTH, HEIGHT)
# Update delay in ms
# On ETN it's already pretty slow
DELAY = 0
ALIVE_IMG_PATH="data/alive.png"
DEAD_IMG_PATH="data/dead.png"
CURSOR_DEAD_IMG_PATH="data/cursor.png"
CURSOR_ALIVE_IMG_PATH="data/cursor_alive.png"
ALIVE_IMG = None
DEAD_IMG = None
| Set delay to 0, because ETN is slow. | Set delay to 0, because ETN is slow.
| Python | mit | dzeban/PyGameOfLife | ---
+++
@@ -4,7 +4,8 @@
SCREEN_SIZE = (WIDTH, HEIGHT)
# Update delay in ms
-DELAY = 100
+# On ETN it's already pretty slow
+DELAY = 0
ALIVE_IMG_PATH="data/alive.png"
DEAD_IMG_PATH="data/dead.png" |
dfca6054fd32c0904bc027dcddb347c378adf954 | dumper/file_uploader.py | dumper/file_uploader.py | import ftplib
import ntpath
import logging
import urllib.parse
import win32clipboard
class FileUploader:
def __init__(self, config):
self._host = config['Server']['host']
self._user = config['Server']['user']
self._passwd = config['Server']['password']
self._path =... | import ftplib
import ntpath
import logging
import urllib.parse
import win32clipboard
class FileUploader:
def __init__(self, config):
self._host = config['Server']['host']
self._user = config['Server']['user']
self._passwd = config['Server']['password']
self._path =... | Add copy url to clipboard setting | Add copy url to clipboard setting
| Python | mit | yschua/dumper | ---
+++
@@ -12,6 +12,7 @@
self._passwd = config['Server']['password']
self._path = config['Server']['remote_path']
self._url = config['Server']['url']
+ self._copy_url = config.getboolean('Settings', 'copy_url_to_clipboard')
# test ftp login
@@ -24,12 +25,13 @@
... |
93b1f8e67b1154fd595a938ca41877eb76c7e995 | lcd.py | lcd.py | from telnetlib import Telnet
import time
tn = Telnet('192.168.1.15', 13666, None)
#tn.interact()
tn.write("hello\n")
tn.write("screen_add s1\n")
tn.write("screen_set s1 -priority 1\n")
tn.write("widget_add s1 w1 string\n")
tn.write("widget_add s1 w2 string\n")
tn.write("widget_set s1 w1 1 1 {It is a truth u}\n")
tn.w... | #!/usr/bin/env python
from telnetlib import Telnet
import time
import sys
tn = Telnet('192.168.1.15', 13666, None)
pipe_contents = sys.stdin.read()
pipe_contents = pipe_contents.replace('\n', ' ')
tn.write("hello\n")
tn.write("screen_add s1\n")
tn.write("screen_set s1 -priority 1\n")
tn.write("widget_add s1 w1 strin... | Read standard input instead of hard-coded strings. | Read standard input instead of hard-coded strings.
| Python | mit | zimolzak/Raspberry-Pi-newbie,zimolzak/Raspberry-Pi-newbie,zimolzak/Raspberry-Pi-newbie,zimolzak/Raspberry-Pi-newbie,zimolzak/Raspberry-Pi-newbie | ---
+++
@@ -1,20 +1,20 @@
+#!/usr/bin/env python
+
from telnetlib import Telnet
import time
+import sys
+
tn = Telnet('192.168.1.15', 13666, None)
-
-#tn.interact()
+pipe_contents = sys.stdin.read()
+pipe_contents = pipe_contents.replace('\n', ' ')
tn.write("hello\n")
tn.write("screen_add s1\n")
tn.write("scr... |
b4cefb5f1a5541b9b7312878790f6fe65412e010 | rst2pdf/utils.py | rst2pdf/utils.py | #$HeadURL$
#$LastChangedDate$
#$LastChangedRevision$
import sys
from reportlab.platypus import PageBreak, Spacer
from flowables import *
import shlex
from log import log
def parseRaw (data):
'''Parse and process a simple DSL to handle creation of flowables.
Supported (can add others on request):
... | # -*- coding: utf-8 -*-
#$HeadURL$
#$LastChangedDate$
#$LastChangedRevision$
import sys
from reportlab.platypus import PageBreak, Spacer
from flowables import *
import shlex
from log import log
def parseRaw (data):
'''Parse and process a simple DSL to handle creation of flowables.
Supported (can... | Fix encoding (thanks to Yasushi Masuda) | Fix encoding (thanks to Yasushi Masuda)
| Python | mit | rafaelmartins/rst2pdf,rafaelmartins/rst2pdf | ---
+++
@@ -1,3 +1,4 @@
+# -*- coding: utf-8 -*-
#$HeadURL$
#$LastChangedDate$
#$LastChangedRevision$ |
61c6c2687af9de1d5ccded1f1cb866a7638d8c31 | tests/test_director.py | tests/test_director.py | from pydirections.director import Director
from unittest import TestCase
class TestModeValidity(TestCase):
def test_invalid_mode(self):
"""
Tests the is_valid_mode function for an invalid input
"""
default_error_message = "The mode: {0} is invalid"
invalid_mode = "flying"
self.assertFalse(Director.is_... | from pydirections.director import Director
from unittest import TestCase
import re
class TestModeValidity(TestCase):
def test_invalid_mode(self):
"""
Tests the is_valid_mode function for an invalid input
"""
default_error_message = "The mode: {0} is invalid"
invalid_mode = "flying"
self.assertFalse(Di... | Add tests for data pre-processing in fetch_directions | Add tests for data pre-processing in fetch_directions
| Python | apache-2.0 | apranav19/pydirections | ---
+++
@@ -1,5 +1,6 @@
from pydirections.director import Director
from unittest import TestCase
+import re
class TestModeValidity(TestCase):
def test_invalid_mode(self):
@@ -9,3 +10,24 @@
default_error_message = "The mode: {0} is invalid"
invalid_mode = "flying"
self.assertFalse(Director.is_valid_mod... |
a3330105ca36ec758723e2f456ed56e107afec9e | textblob/exceptions.py | textblob/exceptions.py | # -*- coding: utf-8 -*-
MISSING_CORPUS_MESSAGE = """
Looks like you are missing some required data for this feature.
To download the necessary data, simply run
curl https://raw.github.com/sloria/TextBlob/master/download_corpora.py | python
Or use the NLTK downloader to download the missing data: http://nltk.org... | # -*- coding: utf-8 -*-
MISSING_CORPUS_MESSAGE = """
Looks like you are missing some required data for this feature.
To download the necessary data, simply run
python -m textblob.download_corpora
Or use the NLTK downloader to download the missing data: http://nltk.org/data.html
If this doesn't fix the problem, ... | Fix download command in error message | Fix download command in error message
| Python | mit | adelq/TextBlob,IrisSteenhout/TextBlob,freakynit/TextBlob,beni55/TextBlob,dipeshtech/TextBlob,sloria/TextBlob,nvoron23/TextBlob,jonmcoe/TextBlob,sargam111/python,jcalbert/TextBlob,Windy-Ground/TextBlob,laugustyniak/TextBlob | ---
+++
@@ -5,7 +5,7 @@
To download the necessary data, simply run
- curl https://raw.github.com/sloria/TextBlob/master/download_corpora.py | python
+ python -m textblob.download_corpora
Or use the NLTK downloader to download the missing data: http://nltk.org/data.html
If this doesn't fix the problem, ... |
f43248112a867bc819ced274901db25cebe397b7 | roledb/serializers.py | roledb/serializers.py |
from rest_framework import serializers
from roledb.models import User
class UserSerializer(serializers.ModelSerializer):
roles = serializers.SerializerMethodField('role_data')
attributes = serializers.SerializerMethodField('attribute_data')
class Meta:
model = User
fields = ('username', 'roles', 'attr... |
from rest_framework import serializers
from roledb.models import User
class UserSerializer(serializers.ModelSerializer):
roles = serializers.SerializerMethodField('role_data')
attributes = serializers.SerializerMethodField('attribute_data')
class Meta:
model = User
fields = ('username','first_name','l... | Send first_name and last_name in JSON. | Send first_name and last_name in JSON.
| Python | mit | educloudalliance/eca-auth-data,educloudalliance/eca-auth-data | ---
+++
@@ -9,7 +9,7 @@
class Meta:
model = User
- fields = ('username', 'roles', 'attributes')
+ fields = ('username','first_name','last_name','roles','attributes')
def role_data(self, obj):
data = [] |
be1e23f068fbc34587caa0a796e259e42ed6f7c6 | utils.py | utils.py | import re
import textwrap
import html2text
text_maker = html2text.HTML2Text()
text_maker.body_width = 0
def strip_html_tags(text):
return re.sub('<[^<]+?>', '', text)
def html_to_md(string, strip_html=True, markdown=False):
if strip_html:
string = strip_html_tags(string)
if markdown:
s... | import re
import textwrap
import html2text
text_maker = html2text.HTML2Text()
text_maker.body_width = 0
def strip_html_tags(text):
return re.sub('<[^<]+?>', '', text)
def html_to_md(string, strip_html=True, markdown=False):
if not string:
return 'No Description Found'
if strip_html:
st... | Handle Nonetype values in `html_to_md` | Handle Nonetype values in `html_to_md`
| Python | mit | avinassh/Laozi,avinassh/Laozi | ---
+++
@@ -12,6 +12,8 @@
def html_to_md(string, strip_html=True, markdown=False):
+ if not string:
+ return 'No Description Found'
if strip_html:
string = strip_html_tags(string)
if markdown: |
529e2b54ed90ab215facb8d8c35d708253b0a6d4 | src/livestreamer/plugins/dmcloud.py | src/livestreamer/plugins/dmcloud.py | from livestreamer.exceptions import NoStreamsError
from livestreamer.plugin import Plugin
from livestreamer.stream import HLSStream
from livestreamer.utils import urlget, parse_json
import re
class DMCloud(Plugin):
@classmethod
def can_handle_url(self, url):
return "api.dmcloud.net" in url
def _... | from livestreamer.exceptions import NoStreamsError
from livestreamer.plugin import Plugin
from livestreamer.stream import RTMPStream, HLSStream
from livestreamer.utils import parse_json, rtmpparse, swfdecompress, urlget
import re
class DMCloud(Plugin):
@classmethod
def can_handle_url(self, url):
retu... | Add Support For RTMP Streams | DMCloud: Add Support For RTMP Streams
| Python | bsd-2-clause | flijloku/livestreamer,gtmanfred/livestreamer,blxd/livestreamer,beardypig/streamlink,back-to/streamlink,lyhiving/livestreamer,Dobatymo/livestreamer,Saturn/livestreamer,bastimeyer/streamlink,derrod/livestreamer,hmit/livestreamer,chhe/livestreamer,wolftankk/livestreamer,sbstp/streamlink,wlerin/streamlink,bastimeyer/stream... | ---
+++
@@ -1,7 +1,7 @@
from livestreamer.exceptions import NoStreamsError
from livestreamer.plugin import Plugin
-from livestreamer.stream import HLSStream
-from livestreamer.utils import urlget, parse_json
+from livestreamer.stream import RTMPStream, HLSStream
+from livestreamer.utils import parse_json, rtmpparse... |
9299b8216c809e795af5f22457fe7c9b615195bb | search/searchers/__init__.py | search/searchers/__init__.py | from search.searchers.instagram import MediaSearchInstagram
from search.searchers.vkontakte import MediaSearchVK
from search.searchers.youtube import MediaSearchYouTube
from search.searchers.podacisearcher import DocumentSearchPodaci
from search.searchers.datatracker import DocumentSearchDataTracker
from search.searche... | from search.searchers.instagram import MediaSearchInstagram
from search.searchers.vkontakte import MediaSearchVK
# from search.searchers.youtube import MediaSearchYouTube
from search.searchers.podacisearcher import DocumentSearchPodaci
from search.searchers.datatracker import DocumentSearchDataTracker
from search.searc... | Disable youtube searcher as key has been revoked. | Disable youtube searcher as key has been revoked. | Python | mit | occrp/id-backend | ---
+++
@@ -1,10 +1,10 @@
from search.searchers.instagram import MediaSearchInstagram
from search.searchers.vkontakte import MediaSearchVK
-from search.searchers.youtube import MediaSearchYouTube
+# from search.searchers.youtube import MediaSearchYouTube
from search.searchers.podacisearcher import DocumentSearchPo... |
f56ee0bd67652d22de75989cfd7a752641aee91e | ex11+12.py | ex11+12.py | # Upper is ex11, lower part is ex 12
# Both print out are same, but ex11 needs 8 lines,
# ex 12 just need it for 4 lines.
print "How old are you?", # Becasue can't use print and value in same line
age = raw_input() # That's why need two lines to do so.
print "How tall are you?",
height = raw_input()
print "Ho... | # Upper is ex11, lower part is ex 12
# Both print out are same, but ex11 needs 8 lines,
# ex 12 just need it for 4 lines.
print "How old are you?", #Becasue can't use print and value in same line
age = raw_input() # That's why need two lines to do so.
print "How tall are you?",
height = raw_input()
print "Ho... | Revert "Review ex11 and ex12" | Revert "Review ex11 and ex12"
This reverts commit e5fe21acd40e9ebeae548e906747702783058d06.
| Python | mpl-2.0 | joievoyage/LPTHW_EXsss,vanzaj/LPTHW_EXsss | ---
+++
@@ -3,20 +3,21 @@
# ex 12 just need it for 4 lines.
-print "How old are you?", # Becasue can't use print and value in same line
-age = raw_input() # That's why need two lines to do so.
+print "How old are you?", #Becasue can't use print and value in same line
+age = raw_input() # That's ... |
94ec32865674f9f9b0dcecafec73d1e2930ccfdb | runtime/__init__.py | runtime/__init__.py | import builtins
import operator
import functools
from ..compile import varary
builtins.__dict__.update({
# Runtime counterparts of some stuff in `Compiler.builtins`.
'$': lambda f, *xs: f(*xs)
, ':': lambda f, *xs: f(*xs)
, ',': lambda a, *xs: (a,) + xs
, '<': operator.lt
, '<=': operator.le
, '=... | import builtins
import operator
import functools
from ..compile import varary
builtins.__dict__.update({
# Runtime counterparts of some stuff in `Compiler.builtins`.
'$': lambda f, *xs: f(*xs)
, ':': lambda f, *xs: f(*xs)
, ',': lambda a, *xs: (a,) + xs
, '<': operator.lt
, '<=': operator.le
, '=... | Add a runtime version of if. | Add a runtime version of if.
elif/else can't have runtime versions 'cause they are purely syntactic.
| Python | mit | pyos/dg | ---
+++
@@ -39,4 +39,7 @@
# Useful stuff.
, 'foldl': functools.reduce
, '~:': functools.partial
+
+ # Not so useful stuff.
+ , 'if': lambda cond, then, else_=None: then if cond else else_
}) |
3bade9d6258fb8df849b32f68de6343cfdd83720 | saltapi/__init__.py | saltapi/__init__.py | '''
Make api awesomeness
'''
# Import python libs
#
# Import Salt libs
import salt.utils
import salt.client
import salt.runner
class API(object):
'''
'''
def __init__(self, opts):
self.opts = opts
self.local = salt.client.LocalClient(opts['conf_file'])
def run(self, low):
'''
... | Add API wrapper to saltapi | Add API wrapper to saltapi
| Python | apache-2.0 | saltstack/salt,saltstack/salt,saltstack/salt,saltstack/salt,saltstack/salt | ---
+++
@@ -0,0 +1,57 @@
+'''
+Make api awesomeness
+'''
+
+# Import python libs
+#
+# Import Salt libs
+import salt.utils
+import salt.client
+import salt.runner
+
+class API(object):
+ '''
+ '''
+ def __init__(self, opts):
+ self.opts = opts
+ self.local = salt.client.LocalClient(opts['conf_f... | |
ceef52c348bb3f4477c3d031d024c89eb7379039 | ooni/resources/cli.py | ooni/resources/cli.py | import sys
from twisted.python import usage
from ooni.resources import __version__
from ooni.resources import update
class Options(usage.Options):
synopsis = """%s"""
optParameters = []
def opt_version(self):
print("ooniresources version: %s" % __version__)
sys.exit(0)
def run():
... | import sys
from twisted.python import usage
from ooni.resources import __version__
from ooni.resources import update
class Options(usage.Options):
synopsis = """%s"""
optFlags = [
["update-inputs", None, "Update the resources needed for inputs"]
]
optParameters = []
def opt_version(sel... | Make the update-inputs command an option | Make the update-inputs command an option
| Python | bsd-2-clause | Karthikeyan-kkk/ooni-probe,lordappsec/ooni-probe,0xPoly/ooni-probe,kdmurray91/ooni-probe,Karthikeyan-kkk/ooni-probe,0xPoly/ooni-probe,lordappsec/ooni-probe,lordappsec/ooni-probe,juga0/ooni-probe,juga0/ooni-probe,kdmurray91/ooni-probe,kdmurray91/ooni-probe,juga0/ooni-probe,Karthikeyan-kkk/ooni-probe,juga0/ooni-probe,lor... | ---
+++
@@ -9,6 +9,9 @@
class Options(usage.Options):
synopsis = """%s"""
+ optFlags = [
+ ["update-inputs", None, "Update the resources needed for inputs"]
+ ]
optParameters = []
def opt_version(self):
@@ -25,4 +28,9 @@
print "%s: Try --help for usage details." % (sys.argv[0... |
a9b225d033d0462f47e4adecef2ef90fc0bf2318 | docs/conf.py | docs/conf.py | # Configuration file for the Sphinx documentation builder.
#
# For the full list of built-in configuration values, see the documentation:
# https://www.sphinx-doc.org/en/master/usage/configuration.html
# -- Project information -----------------------------------------------------
# https://www.sphinx-doc.org/en/master... | # Configuration file for the Sphinx documentation builder.
#
# For the full list of built-in configuration values, see the documentation:
# https://www.sphinx-doc.org/en/master/usage/configuration.html
# -- Project information -----------------------------------------------------
# https://www.sphinx-doc.org/en/master... | Correct path to parent dir | Correct path to parent dir
| Python | mit | galaxyproject/gravity | ---
+++
@@ -8,7 +8,7 @@
import os
import sys
-sys.path.insert(0, os.path.dirname(__file__))
+sys.path.insert(0, os.path.dirname(os.path.dirname(__file__)))
from gravity import __version__ # noqa: E402
|
8dd41fab9a43ef43d5f2dc27e11bdbda3c23bc56 | soapbox/tests/urls.py | soapbox/tests/urls.py | from django.conf.urls import patterns, url
from django.views.generic import TemplateView
urlpatterns = patterns(
'',
url(r'^$',
TemplateView.as_view(
template_name='soapboxtest/test_success.html')),
url(r'^foo/$',
TemplateView.as_view(
template_name='soapboxtest/tes... | from django.conf.urls import url
from django.views.generic import TemplateView
urlpatterns = [
url(r'^$',
TemplateView.as_view(
template_name='soapboxtest/test_success.html')),
url(r'^foo/$',
TemplateView.as_view(
template_name='soapboxtest/test_success.html')),
url... | Stop using patterns() in the test URLs. | Stop using patterns() in the test URLs.
| Python | bsd-3-clause | ubernostrum/django-soapbox,ubernostrum/django-soapbox | ---
+++
@@ -1,9 +1,8 @@
-from django.conf.urls import patterns, url
+from django.conf.urls import url
from django.views.generic import TemplateView
-urlpatterns = patterns(
- '',
+urlpatterns = [
url(r'^$',
TemplateView.as_view(
template_name='soapboxtest/test_success.html')),
@@ -2... |
4418a08553572ca18187472cc32e5044229333f2 | django/applications/catmaid/management/commands/catmaid_set_user_profiles_to_default.py | django/applications/catmaid/management/commands/catmaid_set_user_profiles_to_default.py | from django.conf import settings
from django.contrib.auth.models import User
from django.core.management.base import NoArgsCommand, CommandError
class Command(NoArgsCommand):
help = "Set the user profile settings of every user to the defaults"
def handle_noargs(self, **options):
for u in User.objects.... | from django.conf import settings
from django.contrib.auth.models import User
from django.core.management.base import NoArgsCommand, CommandError
from optparse import make_option
class Command(NoArgsCommand):
help = "Set the user profile settings of every user to the defaults"
option_list = NoArgsCommand.opti... | Add explicit anonymous user update parameter to user profile command | Add explicit anonymous user update parameter to user profile command
The set_user_profiles_to_default management command should only update
the anonymous user if explicitely stated. This commit adds the
'--update-anon-user' switch to do let the user state that also the
anonymous user's profile should be updated with t... | Python | agpl-3.0 | fzadow/CATMAID,htem/CATMAID,htem/CATMAID,fzadow/CATMAID,fzadow/CATMAID,fzadow/CATMAID,htem/CATMAID,htem/CATMAID | ---
+++
@@ -2,11 +2,23 @@
from django.contrib.auth.models import User
from django.core.management.base import NoArgsCommand, CommandError
+from optparse import make_option
+
class Command(NoArgsCommand):
help = "Set the user profile settings of every user to the defaults"
+ option_list = NoArgsCommand.... |
69e6db7a4a28ff1f50bd4f12f550a2b65f05eb38 | utils/dusk/__init__.py | utils/dusk/__init__.py | """
'Dusk' command system for Amethyst.
Based loosely (heh) off of discord.py's ext command system.
TODO: refactor arg parsing probably.
"""
from .context import Context # NOQA
from .command import * # NOQA
from .command_holder import CommandHolder # NOQA
from .constants import * # NOQA
| """
'Dusk' command system for Amethyst.
Based loosely (heh) off of discord.py's ext command system.
"""
from .context import Context # NOQA
from .command import * # NOQA
from .command_holder import CommandHolder # NOQA
from .constants import * # NOQA
__version__ = "1.0.0" | Remove obsolete TODO and add version | Remove obsolete TODO and add version
| Python | mit | awau/Amethyst,HexadecimalPython/Xeili | ---
+++
@@ -1,11 +1,11 @@
"""
'Dusk' command system for Amethyst.
Based loosely (heh) off of discord.py's ext command system.
-
-TODO: refactor arg parsing probably.
"""
from .context import Context # NOQA
from .command import * # NOQA
from .command_holder import CommandHolder # NOQA
from .constants impo... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.