commit
stringlengths
40
40
old_file
stringlengths
4
118
new_file
stringlengths
4
118
old_contents
stringlengths
0
2.94k
new_contents
stringlengths
1
4.43k
subject
stringlengths
15
444
message
stringlengths
16
3.45k
lang
stringclasses
1 value
license
stringclasses
13 values
repos
stringlengths
5
43.2k
prompt
stringlengths
17
4.58k
response
stringlengths
1
4.43k
prompt_tagged
stringlengths
58
4.62k
response_tagged
stringlengths
1
4.43k
text
stringlengths
132
7.29k
text_tagged
stringlengths
173
7.33k
8dd08da1b7578dccee0d64c236da9a87b911ce84
setup.py
setup.py
from setuptools import setup, find_packages setup( name='mock-django', version='0.4.0', description='', license='Apache License 2.0', author='David Cramer', author_email='dcramer@gmail.com', url='http://github.com/dcramer/mock-django', packages=find_packages(), install_requires=[ ...
from setuptools import setup, find_packages setup( name='mock-django', version='0.4.0', description='', license='Apache License 2.0', author='David Cramer', author_email='dcramer@gmail.com', url='http://github.com/dcramer/mock-django', packages=find_packages(), install_requires=[ ...
Update reqs to not require mock==dev
Update reqs to not require mock==dev
Python
apache-2.0
bennylope/mock-django,dcramer/mock-django
from setuptools import setup, find_packages setup( name='mock-django', version='0.4.0', description='', license='Apache License 2.0', author='David Cramer', author_email='dcramer@gmail.com', url='http://github.com/dcramer/mock-django', packages=find_packages(), install_requires=[ ...
from setuptools import setup, find_packages setup( name='mock-django', version='0.4.0', description='', license='Apache License 2.0', author='David Cramer', author_email='dcramer@gmail.com', url='http://github.com/dcramer/mock-django', packages=find_packages(), install_requires=[ ...
<commit_before>from setuptools import setup, find_packages setup( name='mock-django', version='0.4.0', description='', license='Apache License 2.0', author='David Cramer', author_email='dcramer@gmail.com', url='http://github.com/dcramer/mock-django', packages=find_packages(), instal...
from setuptools import setup, find_packages setup( name='mock-django', version='0.4.0', description='', license='Apache License 2.0', author='David Cramer', author_email='dcramer@gmail.com', url='http://github.com/dcramer/mock-django', packages=find_packages(), install_requires=[ ...
from setuptools import setup, find_packages setup( name='mock-django', version='0.4.0', description='', license='Apache License 2.0', author='David Cramer', author_email='dcramer@gmail.com', url='http://github.com/dcramer/mock-django', packages=find_packages(), install_requires=[ ...
<commit_before>from setuptools import setup, find_packages setup( name='mock-django', version='0.4.0', description='', license='Apache License 2.0', author='David Cramer', author_email='dcramer@gmail.com', url='http://github.com/dcramer/mock-django', packages=find_packages(), instal...
bed95f0c0da7bc81eaf35aab24865bc35f01513b
setup.py
setup.py
#!/usr/bin/env python3 # publish on pypi # --------------- # $ python3 setup.py sdist # $ twine upload dist/imagecluster-x.y.z.tar.gz import os from setuptools import setup here = os.path.abspath(os.path.dirname(__file__)) with open(os.path.join(here, 'README.rst')) as fd: long_description = fd.read() setu...
#!/usr/bin/env python3 # publish on pypi # --------------- # $ python3 setup.py sdist # $ twine upload dist/imagecluster-x.y.z.tar.gz import os from setuptools import setup here = os.path.abspath(os.path.dirname(__file__)) with open(os.path.join(here, 'README.rst'), encoding='utf-8') as fd: long_description ...
Use utf-8 encoding when reading README.rst Avoid UnicodeDecodeErrors on some platforms that default to ascii encoding and fail to read the non-ascii characters.
MNT: Use utf-8 encoding when reading README.rst Avoid UnicodeDecodeErrors on some platforms that default to ascii encoding and fail to read the non-ascii characters.
Python
bsd-3-clause
elcorto/imagecluster
#!/usr/bin/env python3 # publish on pypi # --------------- # $ python3 setup.py sdist # $ twine upload dist/imagecluster-x.y.z.tar.gz import os from setuptools import setup here = os.path.abspath(os.path.dirname(__file__)) with open(os.path.join(here, 'README.rst')) as fd: long_description = fd.read() setu...
#!/usr/bin/env python3 # publish on pypi # --------------- # $ python3 setup.py sdist # $ twine upload dist/imagecluster-x.y.z.tar.gz import os from setuptools import setup here = os.path.abspath(os.path.dirname(__file__)) with open(os.path.join(here, 'README.rst'), encoding='utf-8') as fd: long_description ...
<commit_before>#!/usr/bin/env python3 # publish on pypi # --------------- # $ python3 setup.py sdist # $ twine upload dist/imagecluster-x.y.z.tar.gz import os from setuptools import setup here = os.path.abspath(os.path.dirname(__file__)) with open(os.path.join(here, 'README.rst')) as fd: long_description = f...
#!/usr/bin/env python3 # publish on pypi # --------------- # $ python3 setup.py sdist # $ twine upload dist/imagecluster-x.y.z.tar.gz import os from setuptools import setup here = os.path.abspath(os.path.dirname(__file__)) with open(os.path.join(here, 'README.rst'), encoding='utf-8') as fd: long_description ...
#!/usr/bin/env python3 # publish on pypi # --------------- # $ python3 setup.py sdist # $ twine upload dist/imagecluster-x.y.z.tar.gz import os from setuptools import setup here = os.path.abspath(os.path.dirname(__file__)) with open(os.path.join(here, 'README.rst')) as fd: long_description = fd.read() setu...
<commit_before>#!/usr/bin/env python3 # publish on pypi # --------------- # $ python3 setup.py sdist # $ twine upload dist/imagecluster-x.y.z.tar.gz import os from setuptools import setup here = os.path.abspath(os.path.dirname(__file__)) with open(os.path.join(here, 'README.rst')) as fd: long_description = f...
66ac5502e689a404cf4372a3a9add75caa2473a6
setup.py
setup.py
from setuptools import setup, find_packages setup( name="virgil-sdk", version="4.0.1b", packages=find_packages(), install_requires=[ 'virgil-crypto', ], author="Virgil Security", author_email="support@virgilsecurity.com", url="https://virgilsecurity.com/", classifiers=[ ...
from setuptools import setup, find_packages setup( name="virgil-sdk", version="4.1.0", packages=find_packages(), install_requires=[ 'virgil-crypto', ], author="Virgil Security", author_email="support@virgilsecurity.com", url="https://virgilsecurity.com/", classifiers=[ ...
Fix version for new release, change develpment status, add support for 3.3, 3.4, 3.5 version disabled early
Fix version for new release, change develpment status, add support for 3.3, 3.4, 3.5 version disabled early
Python
bsd-3-clause
VirgilSecurity/virgil-sdk-python
from setuptools import setup, find_packages setup( name="virgil-sdk", version="4.0.1b", packages=find_packages(), install_requires=[ 'virgil-crypto', ], author="Virgil Security", author_email="support@virgilsecurity.com", url="https://virgilsecurity.com/", classifiers=[ ...
from setuptools import setup, find_packages setup( name="virgil-sdk", version="4.1.0", packages=find_packages(), install_requires=[ 'virgil-crypto', ], author="Virgil Security", author_email="support@virgilsecurity.com", url="https://virgilsecurity.com/", classifiers=[ ...
<commit_before>from setuptools import setup, find_packages setup( name="virgil-sdk", version="4.0.1b", packages=find_packages(), install_requires=[ 'virgil-crypto', ], author="Virgil Security", author_email="support@virgilsecurity.com", url="https://virgilsecurity.com/", cla...
from setuptools import setup, find_packages setup( name="virgil-sdk", version="4.1.0", packages=find_packages(), install_requires=[ 'virgil-crypto', ], author="Virgil Security", author_email="support@virgilsecurity.com", url="https://virgilsecurity.com/", classifiers=[ ...
from setuptools import setup, find_packages setup( name="virgil-sdk", version="4.0.1b", packages=find_packages(), install_requires=[ 'virgil-crypto', ], author="Virgil Security", author_email="support@virgilsecurity.com", url="https://virgilsecurity.com/", classifiers=[ ...
<commit_before>from setuptools import setup, find_packages setup( name="virgil-sdk", version="4.0.1b", packages=find_packages(), install_requires=[ 'virgil-crypto', ], author="Virgil Security", author_email="support@virgilsecurity.com", url="https://virgilsecurity.com/", cla...
d5eff1a8770315a81c765f50a6d0cbe4ef0fced7
setup.py
setup.py
name, version = 'buildout.wheel', '0' install_requires = ['setuptools', 'wheel', 'humpty', 'six'] extras_require = dict(test=['manuel', 'mock', 'zope.testing']) entry_points = """ [zc.buildout.extension] wheel = buildout.wheel:load """ from setuptools import setup long_description = open('README.rst').read() + '\n'...
name = 'buildout.wheel' version = '0' install_requires = ['zc.buildout', 'setuptools', 'wheel', 'humpty', 'six'] extras_require = dict(test=[]) entry_points = """ [zc.buildout.extension] wheel = buildout.wheel:load """ from setuptools import setup long_description = open('README.rst').read() + '\n' + open('CHANGES....
Update meta data and no test deps
Update meta data and no test deps
Python
mit
buildout/buildout.wheel,leorochael/buildout.wheel,buildout/buildout.wheel,leorochael/buildout.wheel,buildout/wheel,buildout/wheel
name, version = 'buildout.wheel', '0' install_requires = ['setuptools', 'wheel', 'humpty', 'six'] extras_require = dict(test=['manuel', 'mock', 'zope.testing']) entry_points = """ [zc.buildout.extension] wheel = buildout.wheel:load """ from setuptools import setup long_description = open('README.rst').read() + '\n'...
name = 'buildout.wheel' version = '0' install_requires = ['zc.buildout', 'setuptools', 'wheel', 'humpty', 'six'] extras_require = dict(test=[]) entry_points = """ [zc.buildout.extension] wheel = buildout.wheel:load """ from setuptools import setup long_description = open('README.rst').read() + '\n' + open('CHANGES....
<commit_before>name, version = 'buildout.wheel', '0' install_requires = ['setuptools', 'wheel', 'humpty', 'six'] extras_require = dict(test=['manuel', 'mock', 'zope.testing']) entry_points = """ [zc.buildout.extension] wheel = buildout.wheel:load """ from setuptools import setup long_description = open('README.rst'...
name = 'buildout.wheel' version = '0' install_requires = ['zc.buildout', 'setuptools', 'wheel', 'humpty', 'six'] extras_require = dict(test=[]) entry_points = """ [zc.buildout.extension] wheel = buildout.wheel:load """ from setuptools import setup long_description = open('README.rst').read() + '\n' + open('CHANGES....
name, version = 'buildout.wheel', '0' install_requires = ['setuptools', 'wheel', 'humpty', 'six'] extras_require = dict(test=['manuel', 'mock', 'zope.testing']) entry_points = """ [zc.buildout.extension] wheel = buildout.wheel:load """ from setuptools import setup long_description = open('README.rst').read() + '\n'...
<commit_before>name, version = 'buildout.wheel', '0' install_requires = ['setuptools', 'wheel', 'humpty', 'six'] extras_require = dict(test=['manuel', 'mock', 'zope.testing']) entry_points = """ [zc.buildout.extension] wheel = buildout.wheel:load """ from setuptools import setup long_description = open('README.rst'...
c8609641a7cc0f7505b901eaa8e04e879b39b896
setup.py
setup.py
# -*- coding: utf-8 -*- from setuptools import setup, find_packages setup( name = "OpenFisca-Country-Template", version = "3.8.0", author = "OpenFisca Team", author_email = "contact@openfisca.org", classifiers=[ "Development Status :: 5 - Production/Stable", "License :: OSI Approve...
# -*- coding: utf-8 -*- from setuptools import setup, find_packages setup( name = "OpenFisca-Country-Template", version = "3.8.0", author = "OpenFisca Team", author_email = "contact@openfisca.org", classifiers=[ "Development Status :: 5 - Production/Stable", "License :: OSI Approve...
Update openfisca-core requirement from <28.0,>=27.0 to >=27.0,<32.0
Update openfisca-core requirement from <28.0,>=27.0 to >=27.0,<32.0 Updates the requirements on [openfisca-core](https://github.com/openfisca/openfisca-core) to permit the latest version. - [Release notes](https://github.com/openfisca/openfisca-core/releases) - [Changelog](https://github.com/openfisca/openfisca-core/b...
Python
agpl-3.0
openfisca/country-template,openfisca/country-template
# -*- coding: utf-8 -*- from setuptools import setup, find_packages setup( name = "OpenFisca-Country-Template", version = "3.8.0", author = "OpenFisca Team", author_email = "contact@openfisca.org", classifiers=[ "Development Status :: 5 - Production/Stable", "License :: OSI Approve...
# -*- coding: utf-8 -*- from setuptools import setup, find_packages setup( name = "OpenFisca-Country-Template", version = "3.8.0", author = "OpenFisca Team", author_email = "contact@openfisca.org", classifiers=[ "Development Status :: 5 - Production/Stable", "License :: OSI Approve...
<commit_before># -*- coding: utf-8 -*- from setuptools import setup, find_packages setup( name = "OpenFisca-Country-Template", version = "3.8.0", author = "OpenFisca Team", author_email = "contact@openfisca.org", classifiers=[ "Development Status :: 5 - Production/Stable", "License...
# -*- coding: utf-8 -*- from setuptools import setup, find_packages setup( name = "OpenFisca-Country-Template", version = "3.8.0", author = "OpenFisca Team", author_email = "contact@openfisca.org", classifiers=[ "Development Status :: 5 - Production/Stable", "License :: OSI Approve...
# -*- coding: utf-8 -*- from setuptools import setup, find_packages setup( name = "OpenFisca-Country-Template", version = "3.8.0", author = "OpenFisca Team", author_email = "contact@openfisca.org", classifiers=[ "Development Status :: 5 - Production/Stable", "License :: OSI Approve...
<commit_before># -*- coding: utf-8 -*- from setuptools import setup, find_packages setup( name = "OpenFisca-Country-Template", version = "3.8.0", author = "OpenFisca Team", author_email = "contact@openfisca.org", classifiers=[ "Development Status :: 5 - Production/Stable", "License...
fc1bbf6972d8660f24aba0fa073991ca5847829a
setup.py
setup.py
from distutils.core import setup from jeni import __version__ CLASSIFIERS = [ 'Development Status :: 4 - Beta', 'Intended Audience :: Developers', 'License :: OSI Approved :: BSD License', 'Operating System :: OS Independent', 'Programming Language :: Python', 'Programming Language :: Python'...
from distutils.core import setup from os import path from jeni import __version__ CLASSIFIERS = [ 'Development Status :: 4 - Beta', 'Intended Audience :: Developers', 'License :: OSI Approved :: BSD License', 'Operating System :: OS Independent', 'Programming Language :: Python', 'Programming...
Read long description from README.
Read long description from README.
Python
bsd-2-clause
rduplain/jeni-python,groner/jeni-python
from distutils.core import setup from jeni import __version__ CLASSIFIERS = [ 'Development Status :: 4 - Beta', 'Intended Audience :: Developers', 'License :: OSI Approved :: BSD License', 'Operating System :: OS Independent', 'Programming Language :: Python', 'Programming Language :: Python'...
from distutils.core import setup from os import path from jeni import __version__ CLASSIFIERS = [ 'Development Status :: 4 - Beta', 'Intended Audience :: Developers', 'License :: OSI Approved :: BSD License', 'Operating System :: OS Independent', 'Programming Language :: Python', 'Programming...
<commit_before>from distutils.core import setup from jeni import __version__ CLASSIFIERS = [ 'Development Status :: 4 - Beta', 'Intended Audience :: Developers', 'License :: OSI Approved :: BSD License', 'Operating System :: OS Independent', 'Programming Language :: Python', 'Programming Lang...
from distutils.core import setup from os import path from jeni import __version__ CLASSIFIERS = [ 'Development Status :: 4 - Beta', 'Intended Audience :: Developers', 'License :: OSI Approved :: BSD License', 'Operating System :: OS Independent', 'Programming Language :: Python', 'Programming...
from distutils.core import setup from jeni import __version__ CLASSIFIERS = [ 'Development Status :: 4 - Beta', 'Intended Audience :: Developers', 'License :: OSI Approved :: BSD License', 'Operating System :: OS Independent', 'Programming Language :: Python', 'Programming Language :: Python'...
<commit_before>from distutils.core import setup from jeni import __version__ CLASSIFIERS = [ 'Development Status :: 4 - Beta', 'Intended Audience :: Developers', 'License :: OSI Approved :: BSD License', 'Operating System :: OS Independent', 'Programming Language :: Python', 'Programming Lang...
dab5d49b71700d93b466dc9f9d377a08f7fe68db
setup.py
setup.py
#!/usr/bin/env python # Copyright 2011 Andrew Ryrie (amr66) from distutils.core import setup setup(name='django-pyroven', description='A Django authentication backend for Ucam-WebAuth / Raven', long_description=open('README.md').read(), url='https://github.com/pyroven/django-pyroven', version...
#!/usr/bin/env python # Copyright 2011 Andrew Ryrie (amr66) from distutils.core import setup setup(name='django-pyroven', description='A Django authentication backend for Ucam-WebAuth / Raven', long_description=open('README.md').read(), url='https://github.com/pyroven/django-pyroven', version...
Fix flake8 indentation issues with classifiers
Fix flake8 indentation issues with classifiers
Python
mit
pyroven/django-pyroven
#!/usr/bin/env python # Copyright 2011 Andrew Ryrie (amr66) from distutils.core import setup setup(name='django-pyroven', description='A Django authentication backend for Ucam-WebAuth / Raven', long_description=open('README.md').read(), url='https://github.com/pyroven/django-pyroven', version...
#!/usr/bin/env python # Copyright 2011 Andrew Ryrie (amr66) from distutils.core import setup setup(name='django-pyroven', description='A Django authentication backend for Ucam-WebAuth / Raven', long_description=open('README.md').read(), url='https://github.com/pyroven/django-pyroven', version...
<commit_before>#!/usr/bin/env python # Copyright 2011 Andrew Ryrie (amr66) from distutils.core import setup setup(name='django-pyroven', description='A Django authentication backend for Ucam-WebAuth / Raven', long_description=open('README.md').read(), url='https://github.com/pyroven/django-pyroven'...
#!/usr/bin/env python # Copyright 2011 Andrew Ryrie (amr66) from distutils.core import setup setup(name='django-pyroven', description='A Django authentication backend for Ucam-WebAuth / Raven', long_description=open('README.md').read(), url='https://github.com/pyroven/django-pyroven', version...
#!/usr/bin/env python # Copyright 2011 Andrew Ryrie (amr66) from distutils.core import setup setup(name='django-pyroven', description='A Django authentication backend for Ucam-WebAuth / Raven', long_description=open('README.md').read(), url='https://github.com/pyroven/django-pyroven', version...
<commit_before>#!/usr/bin/env python # Copyright 2011 Andrew Ryrie (amr66) from distutils.core import setup setup(name='django-pyroven', description='A Django authentication backend for Ucam-WebAuth / Raven', long_description=open('README.md').read(), url='https://github.com/pyroven/django-pyroven'...
6cefb1f71f05860ab1cf65fe29eb724a6349e493
setup.py
setup.py
from setuptools import setup url = "" version = "0.1.0" readme = open('README.rst').read() setup( name="dtool-create", packages=["dtool_create"], version=version, description="Dtool plugin for creating datasets and collections", long_description=readme, include_package_data=True, author="T...
from setuptools import setup url = "" version = "0.1.0" readme = open('README.rst').read() setup( name="dtool-create", packages=["dtool_create"], version=version, description="Dtool plugin for creating datasets and collections", long_description=readme, include_package_data=True, author="T...
Add click and click-plugins dependencies
Add click and click-plugins dependencies
Python
mit
jic-dtool/dtool-create
from setuptools import setup url = "" version = "0.1.0" readme = open('README.rst').read() setup( name="dtool-create", packages=["dtool_create"], version=version, description="Dtool plugin for creating datasets and collections", long_description=readme, include_package_data=True, author="T...
from setuptools import setup url = "" version = "0.1.0" readme = open('README.rst').read() setup( name="dtool-create", packages=["dtool_create"], version=version, description="Dtool plugin for creating datasets and collections", long_description=readme, include_package_data=True, author="T...
<commit_before>from setuptools import setup url = "" version = "0.1.0" readme = open('README.rst').read() setup( name="dtool-create", packages=["dtool_create"], version=version, description="Dtool plugin for creating datasets and collections", long_description=readme, include_package_data=True...
from setuptools import setup url = "" version = "0.1.0" readme = open('README.rst').read() setup( name="dtool-create", packages=["dtool_create"], version=version, description="Dtool plugin for creating datasets and collections", long_description=readme, include_package_data=True, author="T...
from setuptools import setup url = "" version = "0.1.0" readme = open('README.rst').read() setup( name="dtool-create", packages=["dtool_create"], version=version, description="Dtool plugin for creating datasets and collections", long_description=readme, include_package_data=True, author="T...
<commit_before>from setuptools import setup url = "" version = "0.1.0" readme = open('README.rst').read() setup( name="dtool-create", packages=["dtool_create"], version=version, description="Dtool plugin for creating datasets and collections", long_description=readme, include_package_data=True...
5ef6fe75ad8784381824d408a9178e076ddcc97e
setup.py
setup.py
from setuptools import setup, find_packages with open('requirements.txt') as f: required = f.read().splitlines() setup(name='hackr', version='0.1.1', url='https://github.com/pytorn/hackr', license='Apache 2.0', author='Ashwini Purohit', author_email='geek.ashwini@gmail.com', ...
from setuptools import setup, find_packages with open('requirements.txt') as f: required = f.read().splitlines() setup(name='hackr', version='0.1.2', url='https://github.com/pytorn/hackr', license='Apache 2.0', author='Ashwini Purohit', author_email='geek.ashwini@gmail.com', ...
Update package pip install hackr
Update package pip install hackr
Python
apache-2.0
pytorn/hackr
from setuptools import setup, find_packages with open('requirements.txt') as f: required = f.read().splitlines() setup(name='hackr', version='0.1.1', url='https://github.com/pytorn/hackr', license='Apache 2.0', author='Ashwini Purohit', author_email='geek.ashwini@gmail.com', ...
from setuptools import setup, find_packages with open('requirements.txt') as f: required = f.read().splitlines() setup(name='hackr', version='0.1.2', url='https://github.com/pytorn/hackr', license='Apache 2.0', author='Ashwini Purohit', author_email='geek.ashwini@gmail.com', ...
<commit_before>from setuptools import setup, find_packages with open('requirements.txt') as f: required = f.read().splitlines() setup(name='hackr', version='0.1.1', url='https://github.com/pytorn/hackr', license='Apache 2.0', author='Ashwini Purohit', author_email='geek.ashwini@...
from setuptools import setup, find_packages with open('requirements.txt') as f: required = f.read().splitlines() setup(name='hackr', version='0.1.2', url='https://github.com/pytorn/hackr', license='Apache 2.0', author='Ashwini Purohit', author_email='geek.ashwini@gmail.com', ...
from setuptools import setup, find_packages with open('requirements.txt') as f: required = f.read().splitlines() setup(name='hackr', version='0.1.1', url='https://github.com/pytorn/hackr', license='Apache 2.0', author='Ashwini Purohit', author_email='geek.ashwini@gmail.com', ...
<commit_before>from setuptools import setup, find_packages with open('requirements.txt') as f: required = f.read().splitlines() setup(name='hackr', version='0.1.1', url='https://github.com/pytorn/hackr', license='Apache 2.0', author='Ashwini Purohit', author_email='geek.ashwini@...
40a099f9f519f63695afb61a07a7c2d5b7f795af
setup.py
setup.py
#! /usr/bin/python from distutils.core import setup try: from distutils.command.build_py import build_py_2to3 as build_py except ImportError: # Python 2.x from distutils.command.build_py import build_py import photo import re DOCLINES = photo.__doc__.split("\n") DESCRIPTION = DOCLINES[0] LONG...
#! /usr/bin/python from distutils.core import setup try: from distutils.command.build_py import build_py_2to3 as build_py except ImportError: # Python 2.x from distutils.command.build_py import build_py import photo import re DOCLINES = photo.__doc__.split("\n") DESCRIPTION = DOCLINES[0] LONG...
Remove obsolete requirement of pyexiv2.
Remove obsolete requirement of pyexiv2.
Python
apache-2.0
RKrahl/photo-tools
#! /usr/bin/python from distutils.core import setup try: from distutils.command.build_py import build_py_2to3 as build_py except ImportError: # Python 2.x from distutils.command.build_py import build_py import photo import re DOCLINES = photo.__doc__.split("\n") DESCRIPTION = DOCLINES[0] LONG...
#! /usr/bin/python from distutils.core import setup try: from distutils.command.build_py import build_py_2to3 as build_py except ImportError: # Python 2.x from distutils.command.build_py import build_py import photo import re DOCLINES = photo.__doc__.split("\n") DESCRIPTION = DOCLINES[0] LONG...
<commit_before>#! /usr/bin/python from distutils.core import setup try: from distutils.command.build_py import build_py_2to3 as build_py except ImportError: # Python 2.x from distutils.command.build_py import build_py import photo import re DOCLINES = photo.__doc__.split("\n") DESCRIPTION = D...
#! /usr/bin/python from distutils.core import setup try: from distutils.command.build_py import build_py_2to3 as build_py except ImportError: # Python 2.x from distutils.command.build_py import build_py import photo import re DOCLINES = photo.__doc__.split("\n") DESCRIPTION = DOCLINES[0] LONG...
#! /usr/bin/python from distutils.core import setup try: from distutils.command.build_py import build_py_2to3 as build_py except ImportError: # Python 2.x from distutils.command.build_py import build_py import photo import re DOCLINES = photo.__doc__.split("\n") DESCRIPTION = DOCLINES[0] LONG...
<commit_before>#! /usr/bin/python from distutils.core import setup try: from distutils.command.build_py import build_py_2to3 as build_py except ImportError: # Python 2.x from distutils.command.build_py import build_py import photo import re DOCLINES = photo.__doc__.split("\n") DESCRIPTION = D...
42c064b71ebfce67bf83f4bc30cbf16cf8370ebb
setup.py
setup.py
import os import codecs #from distutils.core import setup from setuptools import setup def read(fname): return open(os.path.join(os.path.dirname(__file__), fname)).read() setup( name='django-messages-extends', version='0.6.1', description='A Django app for extends Django\'s messages framework, adds s...
import os import codecs #from distutils.core import setup from setuptools import setup def read(fname): return open(os.path.join(os.path.dirname(__file__), fname)).read() setup( name='django-messages-extends', version='0.6.1', description='A Django app for extends Django\'s messages framework, adds s...
Add python_Requires, per @davidfischer suggestion
Add python_Requires, per @davidfischer suggestion
Python
mit
AliLozano/django-messages-extends,AliLozano/django-messages-extends,AliLozano/django-messages-extends
import os import codecs #from distutils.core import setup from setuptools import setup def read(fname): return open(os.path.join(os.path.dirname(__file__), fname)).read() setup( name='django-messages-extends', version='0.6.1', description='A Django app for extends Django\'s messages framework, adds s...
import os import codecs #from distutils.core import setup from setuptools import setup def read(fname): return open(os.path.join(os.path.dirname(__file__), fname)).read() setup( name='django-messages-extends', version='0.6.1', description='A Django app for extends Django\'s messages framework, adds s...
<commit_before>import os import codecs #from distutils.core import setup from setuptools import setup def read(fname): return open(os.path.join(os.path.dirname(__file__), fname)).read() setup( name='django-messages-extends', version='0.6.1', description='A Django app for extends Django\'s messages fr...
import os import codecs #from distutils.core import setup from setuptools import setup def read(fname): return open(os.path.join(os.path.dirname(__file__), fname)).read() setup( name='django-messages-extends', version='0.6.1', description='A Django app for extends Django\'s messages framework, adds s...
import os import codecs #from distutils.core import setup from setuptools import setup def read(fname): return open(os.path.join(os.path.dirname(__file__), fname)).read() setup( name='django-messages-extends', version='0.6.1', description='A Django app for extends Django\'s messages framework, adds s...
<commit_before>import os import codecs #from distutils.core import setup from setuptools import setup def read(fname): return open(os.path.join(os.path.dirname(__file__), fname)).read() setup( name='django-messages-extends', version='0.6.1', description='A Django app for extends Django\'s messages fr...
f46e20c960ebd03eb8e8c194db649751407afb8b
setup.py
setup.py
from setuptools import setup setup( name='ploodood', version='0.1', description='Generates words that "sound like real words"', author = 'Matteo Giordano', author_email = 'ilmalteo@gmail.com', url = 'https://github.com/malteo/ploodood', download_url = 'https://github.com/malteo/ploodood/tar...
from setuptools import setup setup( name='ploodood', version='0.1', description='Generates words that "sound like real words"', author = 'Matteo Giordano', author_email = 'ilmalteo@gmail.com', url = 'https://github.com/malteo/ploodood', download_url = 'https://github.com/malteo/ploodood/tar...
Remove wrong directory and let it build
Remove wrong directory and let it build
Python
mit
malteo/ploodood
from setuptools import setup setup( name='ploodood', version='0.1', description='Generates words that "sound like real words"', author = 'Matteo Giordano', author_email = 'ilmalteo@gmail.com', url = 'https://github.com/malteo/ploodood', download_url = 'https://github.com/malteo/ploodood/tar...
from setuptools import setup setup( name='ploodood', version='0.1', description='Generates words that "sound like real words"', author = 'Matteo Giordano', author_email = 'ilmalteo@gmail.com', url = 'https://github.com/malteo/ploodood', download_url = 'https://github.com/malteo/ploodood/tar...
<commit_before>from setuptools import setup setup( name='ploodood', version='0.1', description='Generates words that "sound like real words"', author = 'Matteo Giordano', author_email = 'ilmalteo@gmail.com', url = 'https://github.com/malteo/ploodood', download_url = 'https://github.com/malt...
from setuptools import setup setup( name='ploodood', version='0.1', description='Generates words that "sound like real words"', author = 'Matteo Giordano', author_email = 'ilmalteo@gmail.com', url = 'https://github.com/malteo/ploodood', download_url = 'https://github.com/malteo/ploodood/tar...
from setuptools import setup setup( name='ploodood', version='0.1', description='Generates words that "sound like real words"', author = 'Matteo Giordano', author_email = 'ilmalteo@gmail.com', url = 'https://github.com/malteo/ploodood', download_url = 'https://github.com/malteo/ploodood/tar...
<commit_before>from setuptools import setup setup( name='ploodood', version='0.1', description='Generates words that "sound like real words"', author = 'Matteo Giordano', author_email = 'ilmalteo@gmail.com', url = 'https://github.com/malteo/ploodood', download_url = 'https://github.com/malt...
1dc919145219fde72e8b17e3dc93d675441d01e9
setup.py
setup.py
#!/usr/bin/python # -*-coding:UTF-8 -*- from setuptools import setup, find_packages from os import path import sys if sys.version_info[0] >= 3: install_requires = ["PyMySQL"] else: install_requires = ["MySQL-python"] here = path.abspath(path.dirname(__file__)) setup( name='dictmysqldb', version='0....
#!/usr/bin/python # -*-coding:UTF-8 -*- from setuptools import setup, find_packages from os import path import sys if sys.version_info[0] >= 3: install_requires = ["PyMySQL"] else: install_requires = ["MySQL-python"] here = path.abspath(path.dirname(__file__)) setup( name='dictmysqldb', version='0....
Fix the require Python version
Fix the require Python version
Python
mit
ligyxy/DictMySQLdb,ligyxy/DictMySQL
#!/usr/bin/python # -*-coding:UTF-8 -*- from setuptools import setup, find_packages from os import path import sys if sys.version_info[0] >= 3: install_requires = ["PyMySQL"] else: install_requires = ["MySQL-python"] here = path.abspath(path.dirname(__file__)) setup( name='dictmysqldb', version='0....
#!/usr/bin/python # -*-coding:UTF-8 -*- from setuptools import setup, find_packages from os import path import sys if sys.version_info[0] >= 3: install_requires = ["PyMySQL"] else: install_requires = ["MySQL-python"] here = path.abspath(path.dirname(__file__)) setup( name='dictmysqldb', version='0....
<commit_before>#!/usr/bin/python # -*-coding:UTF-8 -*- from setuptools import setup, find_packages from os import path import sys if sys.version_info[0] >= 3: install_requires = ["PyMySQL"] else: install_requires = ["MySQL-python"] here = path.abspath(path.dirname(__file__)) setup( name='dictmysqldb', ...
#!/usr/bin/python # -*-coding:UTF-8 -*- from setuptools import setup, find_packages from os import path import sys if sys.version_info[0] >= 3: install_requires = ["PyMySQL"] else: install_requires = ["MySQL-python"] here = path.abspath(path.dirname(__file__)) setup( name='dictmysqldb', version='0....
#!/usr/bin/python # -*-coding:UTF-8 -*- from setuptools import setup, find_packages from os import path import sys if sys.version_info[0] >= 3: install_requires = ["PyMySQL"] else: install_requires = ["MySQL-python"] here = path.abspath(path.dirname(__file__)) setup( name='dictmysqldb', version='0....
<commit_before>#!/usr/bin/python # -*-coding:UTF-8 -*- from setuptools import setup, find_packages from os import path import sys if sys.version_info[0] >= 3: install_requires = ["PyMySQL"] else: install_requires = ["MySQL-python"] here = path.abspath(path.dirname(__file__)) setup( name='dictmysqldb', ...
fd1826588031bfe165cef1cfa8d8cdc9123e25c5
setup.py
setup.py
#!/usr/bin/env python from setuptools import setup setup( name='asset_bender', version='0.1.5', description="A django runtime implementation for Asset Bender", long_description=open('Readme.md').read(), author='HubSpot Dev Team', author_email='devteam+asset_bender_django@hubspot.com', url='...
#!/usr/bin/env python from setuptools import setup, find_packages setup( name='asset_bender', version='0.1.6', description="A django runtime implementation for Asset Bender", long_description=open('Readme.md').read(), author='HubSpot Dev Team', author_email='devteam+asset_bender_django@hubspot....
Use find_packages instead of manually specifying modules.
Use find_packages instead of manually specifying modules.
Python
mit
HubSpot/asset_bender_django
#!/usr/bin/env python from setuptools import setup setup( name='asset_bender', version='0.1.5', description="A django runtime implementation for Asset Bender", long_description=open('Readme.md').read(), author='HubSpot Dev Team', author_email='devteam+asset_bender_django@hubspot.com', url='...
#!/usr/bin/env python from setuptools import setup, find_packages setup( name='asset_bender', version='0.1.6', description="A django runtime implementation for Asset Bender", long_description=open('Readme.md').read(), author='HubSpot Dev Team', author_email='devteam+asset_bender_django@hubspot....
<commit_before>#!/usr/bin/env python from setuptools import setup setup( name='asset_bender', version='0.1.5', description="A django runtime implementation for Asset Bender", long_description=open('Readme.md').read(), author='HubSpot Dev Team', author_email='devteam+asset_bender_django@hubspot....
#!/usr/bin/env python from setuptools import setup, find_packages setup( name='asset_bender', version='0.1.6', description="A django runtime implementation for Asset Bender", long_description=open('Readme.md').read(), author='HubSpot Dev Team', author_email='devteam+asset_bender_django@hubspot....
#!/usr/bin/env python from setuptools import setup setup( name='asset_bender', version='0.1.5', description="A django runtime implementation for Asset Bender", long_description=open('Readme.md').read(), author='HubSpot Dev Team', author_email='devteam+asset_bender_django@hubspot.com', url='...
<commit_before>#!/usr/bin/env python from setuptools import setup setup( name='asset_bender', version='0.1.5', description="A django runtime implementation for Asset Bender", long_description=open('Readme.md').read(), author='HubSpot Dev Team', author_email='devteam+asset_bender_django@hubspot....
9bc9232f2b2b95b7031afe3b0a8ec12f9d77384a
setup.py
setup.py
from setuptools import setup setup(name='biosignal', version='0.0.1', description='', url='http://github.com/EmlynC/python-biosignal', author='Emlyn Clay', author_email='eclay101@gmail.com', license='MIT', packages=['biosignal'], zip_safe=False)
from setuptools import setup setup(name='biosignal', version='0.0.2', description="""A library for processing and analysing physiological signals such as ECG, BP, EMG, EEG, Pulse and Sp02""", url='http://github.com/EmlynC/python-biosignal', author='Emlyn Clay', author_email='eclay10...
Add a description for PyPI
Add a description for PyPI
Python
mit
EmlynC/python-biosignal
from setuptools import setup setup(name='biosignal', version='0.0.1', description='', url='http://github.com/EmlynC/python-biosignal', author='Emlyn Clay', author_email='eclay101@gmail.com', license='MIT', packages=['biosignal'], zip_safe=False)Add a description for PyPI
from setuptools import setup setup(name='biosignal', version='0.0.2', description="""A library for processing and analysing physiological signals such as ECG, BP, EMG, EEG, Pulse and Sp02""", url='http://github.com/EmlynC/python-biosignal', author='Emlyn Clay', author_email='eclay10...
<commit_before>from setuptools import setup setup(name='biosignal', version='0.0.1', description='', url='http://github.com/EmlynC/python-biosignal', author='Emlyn Clay', author_email='eclay101@gmail.com', license='MIT', packages=['biosignal'], zip_safe=False)<commit_msg...
from setuptools import setup setup(name='biosignal', version='0.0.2', description="""A library for processing and analysing physiological signals such as ECG, BP, EMG, EEG, Pulse and Sp02""", url='http://github.com/EmlynC/python-biosignal', author='Emlyn Clay', author_email='eclay10...
from setuptools import setup setup(name='biosignal', version='0.0.1', description='', url='http://github.com/EmlynC/python-biosignal', author='Emlyn Clay', author_email='eclay101@gmail.com', license='MIT', packages=['biosignal'], zip_safe=False)Add a description for PyPI...
<commit_before>from setuptools import setup setup(name='biosignal', version='0.0.1', description='', url='http://github.com/EmlynC/python-biosignal', author='Emlyn Clay', author_email='eclay101@gmail.com', license='MIT', packages=['biosignal'], zip_safe=False)<commit_msg...
34de3e7f3959c0fc05bf746e1bc6882f366bfa56
setup.py
setup.py
"""Mailmerge build and install configuration.""" import os try: from setuptools import setup except ImportError: from distutils.core import setup with open(os.path.join(os.path.dirname(__file__), 'README.md')) as readme_file: README = readme_file.read() setup( name="mailmerge", description="A sim...
"""Mailmerge build and install configuration.""" import os try: from setuptools import setup except ImportError: from distutils.core import setup with open(os.path.join(os.path.dirname(__file__), 'README.md')) as readme_file: README = readme_file.read() setup( name="mailmerge", description="A sim...
Comment the new library requirement
Comment the new library requirement
Python
mit
awdeorio/mailmerge
"""Mailmerge build and install configuration.""" import os try: from setuptools import setup except ImportError: from distutils.core import setup with open(os.path.join(os.path.dirname(__file__), 'README.md')) as readme_file: README = readme_file.read() setup( name="mailmerge", description="A sim...
"""Mailmerge build and install configuration.""" import os try: from setuptools import setup except ImportError: from distutils.core import setup with open(os.path.join(os.path.dirname(__file__), 'README.md')) as readme_file: README = readme_file.read() setup( name="mailmerge", description="A sim...
<commit_before>"""Mailmerge build and install configuration.""" import os try: from setuptools import setup except ImportError: from distutils.core import setup with open(os.path.join(os.path.dirname(__file__), 'README.md')) as readme_file: README = readme_file.read() setup( name="mailmerge", des...
"""Mailmerge build and install configuration.""" import os try: from setuptools import setup except ImportError: from distutils.core import setup with open(os.path.join(os.path.dirname(__file__), 'README.md')) as readme_file: README = readme_file.read() setup( name="mailmerge", description="A sim...
"""Mailmerge build and install configuration.""" import os try: from setuptools import setup except ImportError: from distutils.core import setup with open(os.path.join(os.path.dirname(__file__), 'README.md')) as readme_file: README = readme_file.read() setup( name="mailmerge", description="A sim...
<commit_before>"""Mailmerge build and install configuration.""" import os try: from setuptools import setup except ImportError: from distutils.core import setup with open(os.path.join(os.path.dirname(__file__), 'README.md')) as readme_file: README = readme_file.read() setup( name="mailmerge", des...
19b9695ae4ec14d813ad95f782a0c3486a53100c
setup.py
setup.py
""" Flask-CacheControl ------------------ A light-weight library to conveniently set Cache-Control headers on the response. Decorate view functions with cache_for, cache, or dont_cache decorators. Makes use of Flask response.cache_control. This extension does not provide any caching of its own. Its sole purpose is to...
import ast import re from setuptools import setup _version_re = re.compile(r'__version__\s+=\s+(.*)') with open('src/flask_cachecontrol/__init__.py', 'rb') as f: version = str(ast.literal_eval(_version_re.search( f.read().decode('utf-8')).group(1))) setup( name='Flask-CacheControl', version=versi...
Use long description from README.md
Use long description from README.md
Python
bsd-3-clause
twiebe/Flask-CacheControl
""" Flask-CacheControl ------------------ A light-weight library to conveniently set Cache-Control headers on the response. Decorate view functions with cache_for, cache, or dont_cache decorators. Makes use of Flask response.cache_control. This extension does not provide any caching of its own. Its sole purpose is to...
import ast import re from setuptools import setup _version_re = re.compile(r'__version__\s+=\s+(.*)') with open('src/flask_cachecontrol/__init__.py', 'rb') as f: version = str(ast.literal_eval(_version_re.search( f.read().decode('utf-8')).group(1))) setup( name='Flask-CacheControl', version=versi...
<commit_before>""" Flask-CacheControl ------------------ A light-weight library to conveniently set Cache-Control headers on the response. Decorate view functions with cache_for, cache, or dont_cache decorators. Makes use of Flask response.cache_control. This extension does not provide any caching of its own. Its sol...
import ast import re from setuptools import setup _version_re = re.compile(r'__version__\s+=\s+(.*)') with open('src/flask_cachecontrol/__init__.py', 'rb') as f: version = str(ast.literal_eval(_version_re.search( f.read().decode('utf-8')).group(1))) setup( name='Flask-CacheControl', version=versi...
""" Flask-CacheControl ------------------ A light-weight library to conveniently set Cache-Control headers on the response. Decorate view functions with cache_for, cache, or dont_cache decorators. Makes use of Flask response.cache_control. This extension does not provide any caching of its own. Its sole purpose is to...
<commit_before>""" Flask-CacheControl ------------------ A light-weight library to conveniently set Cache-Control headers on the response. Decorate view functions with cache_for, cache, or dont_cache decorators. Makes use of Flask response.cache_control. This extension does not provide any caching of its own. Its sol...
9b745412a9b36dffe3ba5ad7304e202a500e77fb
tasks.py
tasks.py
from os import mkdir from os.path import join from shutil import rmtree, copytree from invoke import Collection, ctask as task from invocations.docs import docs, www from invocations.packaging import publish # Until we move to spec-based testing @task def test(ctx, coverage=False): runner = "python" if cover...
from os import mkdir from os.path import join from shutil import rmtree, copytree from invoke import Collection, ctask as task from invocations.docs import docs, www from invocations.packaging import publish # Until we move to spec-based testing @task def test(ctx, coverage=False, flags=""): if "--verbose" not i...
Allow specifying test.py flags in 'inv test'
Allow specifying test.py flags in 'inv test'
Python
lgpl-2.1
mirrorcoder/paramiko,jaraco/paramiko,dorianpula/paramiko,ameily/paramiko,paramiko/paramiko,reaperhulk/paramiko,SebastianDeiss/paramiko
from os import mkdir from os.path import join from shutil import rmtree, copytree from invoke import Collection, ctask as task from invocations.docs import docs, www from invocations.packaging import publish # Until we move to spec-based testing @task def test(ctx, coverage=False): runner = "python" if cover...
from os import mkdir from os.path import join from shutil import rmtree, copytree from invoke import Collection, ctask as task from invocations.docs import docs, www from invocations.packaging import publish # Until we move to spec-based testing @task def test(ctx, coverage=False, flags=""): if "--verbose" not i...
<commit_before>from os import mkdir from os.path import join from shutil import rmtree, copytree from invoke import Collection, ctask as task from invocations.docs import docs, www from invocations.packaging import publish # Until we move to spec-based testing @task def test(ctx, coverage=False): runner = "pytho...
from os import mkdir from os.path import join from shutil import rmtree, copytree from invoke import Collection, ctask as task from invocations.docs import docs, www from invocations.packaging import publish # Until we move to spec-based testing @task def test(ctx, coverage=False, flags=""): if "--verbose" not i...
from os import mkdir from os.path import join from shutil import rmtree, copytree from invoke import Collection, ctask as task from invocations.docs import docs, www from invocations.packaging import publish # Until we move to spec-based testing @task def test(ctx, coverage=False): runner = "python" if cover...
<commit_before>from os import mkdir from os.path import join from shutil import rmtree, copytree from invoke import Collection, ctask as task from invocations.docs import docs, www from invocations.packaging import publish # Until we move to spec-based testing @task def test(ctx, coverage=False): runner = "pytho...
96d2e3d47cf193046f68fef859244fd31be2ffa9
utils.py
utils.py
import vx def _expose(f=None, name=None): if name is None: name = f.__name__.lstrip('_') if getattr(vx, name, None) is not None: raise AttributeError("Cannot expose duplicate name: '{}'".format(name)) if f is None: def g(f): setattr(vx, name, f) return f ...
import vx from functools import partial def _expose(f=None, name=None): if f is None: return partial(_expose, name=name) if name is None: name = f.__name__.lstrip('_') if getattr(vx, name, None) is not None: raise AttributeError("Cannot expose duplicate name: '{}'".format(name)) ...
Fix vx.expose to not crash when None,None is passed
Fix vx.expose to not crash when None,None is passed Also reformat it using functools.partial
Python
mit
philipdexter/vx,philipdexter/vx
import vx def _expose(f=None, name=None): if name is None: name = f.__name__.lstrip('_') if getattr(vx, name, None) is not None: raise AttributeError("Cannot expose duplicate name: '{}'".format(name)) if f is None: def g(f): setattr(vx, name, f) return f ...
import vx from functools import partial def _expose(f=None, name=None): if f is None: return partial(_expose, name=name) if name is None: name = f.__name__.lstrip('_') if getattr(vx, name, None) is not None: raise AttributeError("Cannot expose duplicate name: '{}'".format(name)) ...
<commit_before>import vx def _expose(f=None, name=None): if name is None: name = f.__name__.lstrip('_') if getattr(vx, name, None) is not None: raise AttributeError("Cannot expose duplicate name: '{}'".format(name)) if f is None: def g(f): setattr(vx, name, f) ...
import vx from functools import partial def _expose(f=None, name=None): if f is None: return partial(_expose, name=name) if name is None: name = f.__name__.lstrip('_') if getattr(vx, name, None) is not None: raise AttributeError("Cannot expose duplicate name: '{}'".format(name)) ...
import vx def _expose(f=None, name=None): if name is None: name = f.__name__.lstrip('_') if getattr(vx, name, None) is not None: raise AttributeError("Cannot expose duplicate name: '{}'".format(name)) if f is None: def g(f): setattr(vx, name, f) return f ...
<commit_before>import vx def _expose(f=None, name=None): if name is None: name = f.__name__.lstrip('_') if getattr(vx, name, None) is not None: raise AttributeError("Cannot expose duplicate name: '{}'".format(name)) if f is None: def g(f): setattr(vx, name, f) ...
8cba7a1af5b590639dbba429a4e9eba3fb5898d8
Tools/bmtest.py
Tools/bmtest.py
import chessmoves # Source: https://github.com/kervinck/floyd.git import floyd as engine import sys def parseEpd(rawLine): # 4-field FEN line = rawLine.strip().split(' ', 4) pos = ' '.join(line[0:4]) # EPD fields operations = {'bm': '', 'am': ''} fields = [op for op i...
import chessmoves # Source: https://github.com/kervinck/chessmoves.git import floyd as engine import sys def parseEpd(rawLine): # 4-field FEN line = rawLine.strip().split(' ', 4) pos = ' '.join(line[0:4]) # EPD fields operations = {'bm': '', 'am': ''} fields = [op for...
Correct github URL for chessmoves module
Correct github URL for chessmoves module
Python
bsd-2-clause
kervinck/floyd,kervinck/floyd,kervinck/floyd,kervinck/floyd
import chessmoves # Source: https://github.com/kervinck/floyd.git import floyd as engine import sys def parseEpd(rawLine): # 4-field FEN line = rawLine.strip().split(' ', 4) pos = ' '.join(line[0:4]) # EPD fields operations = {'bm': '', 'am': ''} fields = [op for op i...
import chessmoves # Source: https://github.com/kervinck/chessmoves.git import floyd as engine import sys def parseEpd(rawLine): # 4-field FEN line = rawLine.strip().split(' ', 4) pos = ' '.join(line[0:4]) # EPD fields operations = {'bm': '', 'am': ''} fields = [op for...
<commit_before> import chessmoves # Source: https://github.com/kervinck/floyd.git import floyd as engine import sys def parseEpd(rawLine): # 4-field FEN line = rawLine.strip().split(' ', 4) pos = ' '.join(line[0:4]) # EPD fields operations = {'bm': '', 'am': ''} fields...
import chessmoves # Source: https://github.com/kervinck/chessmoves.git import floyd as engine import sys def parseEpd(rawLine): # 4-field FEN line = rawLine.strip().split(' ', 4) pos = ' '.join(line[0:4]) # EPD fields operations = {'bm': '', 'am': ''} fields = [op for...
import chessmoves # Source: https://github.com/kervinck/floyd.git import floyd as engine import sys def parseEpd(rawLine): # 4-field FEN line = rawLine.strip().split(' ', 4) pos = ' '.join(line[0:4]) # EPD fields operations = {'bm': '', 'am': ''} fields = [op for op i...
<commit_before> import chessmoves # Source: https://github.com/kervinck/floyd.git import floyd as engine import sys def parseEpd(rawLine): # 4-field FEN line = rawLine.strip().split(' ', 4) pos = ' '.join(line[0:4]) # EPD fields operations = {'bm': '', 'am': ''} fields...
f40f951a52c6c19108224d306f0e173465d0054d
scripts/pycodestyle_on_repo.py
scripts/pycodestyle_on_repo.py
# Copyright 2016 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
# Copyright 2016 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
Use 'diff_base' for pycodestyle check, if set.
Use 'diff_base' for pycodestyle check, if set. Speeds it up, plus reduces spew when testing locally.
Python
apache-2.0
jonparrott/google-cloud-python,googleapis/google-cloud-python,tswast/google-cloud-python,Fkawala/gcloud-python,googleapis/google-cloud-python,tartavull/google-cloud-python,tseaver/google-cloud-python,Fkawala/gcloud-python,dhermes/google-cloud-python,calpeyser/google-cloud-python,calpeyser/google-cloud-python,quom/googl...
# Copyright 2016 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
# Copyright 2016 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
<commit_before># Copyright 2016 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed ...
# Copyright 2016 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
# Copyright 2016 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
<commit_before># Copyright 2016 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed ...
24eb92088115a4cd583a3dc759083ff295db3135
website/jdpages/signals.py
website/jdpages/signals.py
import logging logger = logging.getLogger(__name__) from django.contrib.contenttypes.models import ContentType from django.db.models.signals import post_save from django.dispatch import receiver from mezzanine.blog.models import BlogCategory from website.jdpages.models import ColumnElement @receiver(post_save) def...
import logging logger = logging.getLogger(__name__) from django.contrib.contenttypes.models import ContentType from django.db.models.signals import post_save, pre_delete from django.dispatch import receiver from mezzanine.blog.models import BlogCategory from website.jdpages.models import ColumnElement @receiver(po...
Delete the related ColumnElement when a BlogCategory is deleted.
Delete the related ColumnElement when a BlogCategory is deleted.
Python
mit
jonge-democraten/website,jonge-democraten/website,jonge-democraten/website,jonge-democraten/website
import logging logger = logging.getLogger(__name__) from django.contrib.contenttypes.models import ContentType from django.db.models.signals import post_save from django.dispatch import receiver from mezzanine.blog.models import BlogCategory from website.jdpages.models import ColumnElement @receiver(post_save) def...
import logging logger = logging.getLogger(__name__) from django.contrib.contenttypes.models import ContentType from django.db.models.signals import post_save, pre_delete from django.dispatch import receiver from mezzanine.blog.models import BlogCategory from website.jdpages.models import ColumnElement @receiver(po...
<commit_before>import logging logger = logging.getLogger(__name__) from django.contrib.contenttypes.models import ContentType from django.db.models.signals import post_save from django.dispatch import receiver from mezzanine.blog.models import BlogCategory from website.jdpages.models import ColumnElement @receiver...
import logging logger = logging.getLogger(__name__) from django.contrib.contenttypes.models import ContentType from django.db.models.signals import post_save, pre_delete from django.dispatch import receiver from mezzanine.blog.models import BlogCategory from website.jdpages.models import ColumnElement @receiver(po...
import logging logger = logging.getLogger(__name__) from django.contrib.contenttypes.models import ContentType from django.db.models.signals import post_save from django.dispatch import receiver from mezzanine.blog.models import BlogCategory from website.jdpages.models import ColumnElement @receiver(post_save) def...
<commit_before>import logging logger = logging.getLogger(__name__) from django.contrib.contenttypes.models import ContentType from django.db.models.signals import post_save from django.dispatch import receiver from mezzanine.blog.models import BlogCategory from website.jdpages.models import ColumnElement @receiver...
9afa5b8b2fe2a5236337346a6f677a04863b82c7
salt/output/__init__.py
salt/output/__init__.py
''' Used to manage the outputter system. This package is the modular system used for managing outputters. ''' # Import salt utils import salt.loader def display_output(data, out, opts=None): ''' Print the passed data using the desired output ''' if opts is None: opts = {} if not 'color' i...
''' Used to manage the outputter system. This package is the modular system used for managing outputters. ''' # Import salt utils import salt.loader def display_output(data, out, opts=None): ''' Print the passed data using the desired output ''' get_printout(out, opts)(data) def get_printout(out, o...
Fix issue where interfaces pass in _out
Fix issue where interfaces pass in _out
Python
apache-2.0
saltstack/salt,saltstack/salt,saltstack/salt,saltstack/salt,saltstack/salt
''' Used to manage the outputter system. This package is the modular system used for managing outputters. ''' # Import salt utils import salt.loader def display_output(data, out, opts=None): ''' Print the passed data using the desired output ''' if opts is None: opts = {} if not 'color' i...
''' Used to manage the outputter system. This package is the modular system used for managing outputters. ''' # Import salt utils import salt.loader def display_output(data, out, opts=None): ''' Print the passed data using the desired output ''' get_printout(out, opts)(data) def get_printout(out, o...
<commit_before>''' Used to manage the outputter system. This package is the modular system used for managing outputters. ''' # Import salt utils import salt.loader def display_output(data, out, opts=None): ''' Print the passed data using the desired output ''' if opts is None: opts = {} i...
''' Used to manage the outputter system. This package is the modular system used for managing outputters. ''' # Import salt utils import salt.loader def display_output(data, out, opts=None): ''' Print the passed data using the desired output ''' get_printout(out, opts)(data) def get_printout(out, o...
''' Used to manage the outputter system. This package is the modular system used for managing outputters. ''' # Import salt utils import salt.loader def display_output(data, out, opts=None): ''' Print the passed data using the desired output ''' if opts is None: opts = {} if not 'color' i...
<commit_before>''' Used to manage the outputter system. This package is the modular system used for managing outputters. ''' # Import salt utils import salt.loader def display_output(data, out, opts=None): ''' Print the passed data using the desired output ''' if opts is None: opts = {} i...
64bd4ea8a4b04ce1c65375ad3c7776a1583b7294
crypto-square/crypto_square.py
crypto-square/crypto_square.py
import math def encode(s): s = list(filter(str.isalnum, s.lower())) size = math.ceil(math.sqrt(len(s))) s += "." * (size**2 - len(s)) parts = [s[i*size:(i+1)*size] for i in range(size)] return " ".join(map("".join, zip(*parts))).replace(".", "")
import math def encode(s): s = "".join(filter(str.isalnum, s.lower())) size = math.ceil(math.sqrt(len(s))) return " ".join(s[i::size] for i in range(size))
Use string slices with a stride
Use string slices with a stride
Python
agpl-3.0
CubicComet/exercism-python-solutions
import math def encode(s): s = list(filter(str.isalnum, s.lower())) size = math.ceil(math.sqrt(len(s))) s += "." * (size**2 - len(s)) parts = [s[i*size:(i+1)*size] for i in range(size)] return " ".join(map("".join, zip(*parts))).replace(".", "") Use string slices with a stride
import math def encode(s): s = "".join(filter(str.isalnum, s.lower())) size = math.ceil(math.sqrt(len(s))) return " ".join(s[i::size] for i in range(size))
<commit_before>import math def encode(s): s = list(filter(str.isalnum, s.lower())) size = math.ceil(math.sqrt(len(s))) s += "." * (size**2 - len(s)) parts = [s[i*size:(i+1)*size] for i in range(size)] return " ".join(map("".join, zip(*parts))).replace(".", "") <commit_msg>Use string slices with a ...
import math def encode(s): s = "".join(filter(str.isalnum, s.lower())) size = math.ceil(math.sqrt(len(s))) return " ".join(s[i::size] for i in range(size))
import math def encode(s): s = list(filter(str.isalnum, s.lower())) size = math.ceil(math.sqrt(len(s))) s += "." * (size**2 - len(s)) parts = [s[i*size:(i+1)*size] for i in range(size)] return " ".join(map("".join, zip(*parts))).replace(".", "") Use string slices with a strideimport math def enc...
<commit_before>import math def encode(s): s = list(filter(str.isalnum, s.lower())) size = math.ceil(math.sqrt(len(s))) s += "." * (size**2 - len(s)) parts = [s[i*size:(i+1)*size] for i in range(size)] return " ".join(map("".join, zip(*parts))).replace(".", "") <commit_msg>Use string slices with a ...
c4f0f13892f1a1af73a94e6cbea95d30e676203c
xorgauth/accounts/views.py
xorgauth/accounts/views.py
from django.contrib import messages from django.contrib.auth.decorators import login_required from django.contrib.auth.mixins import LoginRequiredMixin from django.shortcuts import render from django.views.generic import TemplateView from oidc_provider.models import UserConsent, Client @login_required def list_conse...
from django.contrib import messages from django.contrib.auth.decorators import login_required from django.contrib.auth.mixins import LoginRequiredMixin from django.shortcuts import render from django.views.generic import TemplateView from oidc_provider.models import UserConsent, Client @login_required def list_conse...
Fix access restriction to /accounts/profile/
Fix access restriction to /accounts/profile/ LoginRequiredMixin needs to come first for it to be applied. Otherwise, /accounts/profile/ is accessible even when the user is not authenticated.
Python
agpl-3.0
Polytechnique-org/xorgauth,Polytechnique-org/xorgauth
from django.contrib import messages from django.contrib.auth.decorators import login_required from django.contrib.auth.mixins import LoginRequiredMixin from django.shortcuts import render from django.views.generic import TemplateView from oidc_provider.models import UserConsent, Client @login_required def list_conse...
from django.contrib import messages from django.contrib.auth.decorators import login_required from django.contrib.auth.mixins import LoginRequiredMixin from django.shortcuts import render from django.views.generic import TemplateView from oidc_provider.models import UserConsent, Client @login_required def list_conse...
<commit_before>from django.contrib import messages from django.contrib.auth.decorators import login_required from django.contrib.auth.mixins import LoginRequiredMixin from django.shortcuts import render from django.views.generic import TemplateView from oidc_provider.models import UserConsent, Client @login_required...
from django.contrib import messages from django.contrib.auth.decorators import login_required from django.contrib.auth.mixins import LoginRequiredMixin from django.shortcuts import render from django.views.generic import TemplateView from oidc_provider.models import UserConsent, Client @login_required def list_conse...
from django.contrib import messages from django.contrib.auth.decorators import login_required from django.contrib.auth.mixins import LoginRequiredMixin from django.shortcuts import render from django.views.generic import TemplateView from oidc_provider.models import UserConsent, Client @login_required def list_conse...
<commit_before>from django.contrib import messages from django.contrib.auth.decorators import login_required from django.contrib.auth.mixins import LoginRequiredMixin from django.shortcuts import render from django.views.generic import TemplateView from oidc_provider.models import UserConsent, Client @login_required...
f0ceb7d9372766d9b1e55d619b8e05aee5950fb2
tests/matchers/test_boolean.py
tests/matchers/test_boolean.py
from robber import expect from robber.matchers.boolean import TrueMatcher, FalseMatcher class TestTrueMatcher: def test_matches(self): expect(TrueMatcher(True).matches()).to.eq(True) expect(TrueMatcher(False).matches()).to.eq(False) def test_failure_message(self): true = TrueMatcher(F...
from robber import expect from robber.matchers.boolean import TrueMatcher, FalseMatcher class TestTrueMatcher: def test_matches(self): expect(TrueMatcher(True).matches()).to.eq(True) expect(TrueMatcher(False).matches()).to.eq(False) def test_failure_message(self): true = TrueMatcher(F...
Add failure message test for not_to.be.true()
[f] Add failure message test for not_to.be.true()
Python
mit
vesln/robber.py
from robber import expect from robber.matchers.boolean import TrueMatcher, FalseMatcher class TestTrueMatcher: def test_matches(self): expect(TrueMatcher(True).matches()).to.eq(True) expect(TrueMatcher(False).matches()).to.eq(False) def test_failure_message(self): true = TrueMatcher(F...
from robber import expect from robber.matchers.boolean import TrueMatcher, FalseMatcher class TestTrueMatcher: def test_matches(self): expect(TrueMatcher(True).matches()).to.eq(True) expect(TrueMatcher(False).matches()).to.eq(False) def test_failure_message(self): true = TrueMatcher(F...
<commit_before>from robber import expect from robber.matchers.boolean import TrueMatcher, FalseMatcher class TestTrueMatcher: def test_matches(self): expect(TrueMatcher(True).matches()).to.eq(True) expect(TrueMatcher(False).matches()).to.eq(False) def test_failure_message(self): true ...
from robber import expect from robber.matchers.boolean import TrueMatcher, FalseMatcher class TestTrueMatcher: def test_matches(self): expect(TrueMatcher(True).matches()).to.eq(True) expect(TrueMatcher(False).matches()).to.eq(False) def test_failure_message(self): true = TrueMatcher(F...
from robber import expect from robber.matchers.boolean import TrueMatcher, FalseMatcher class TestTrueMatcher: def test_matches(self): expect(TrueMatcher(True).matches()).to.eq(True) expect(TrueMatcher(False).matches()).to.eq(False) def test_failure_message(self): true = TrueMatcher(F...
<commit_before>from robber import expect from robber.matchers.boolean import TrueMatcher, FalseMatcher class TestTrueMatcher: def test_matches(self): expect(TrueMatcher(True).matches()).to.eq(True) expect(TrueMatcher(False).matches()).to.eq(False) def test_failure_message(self): true ...
c65e2b3bb2d43a5d12d50cf79636e94a6a1f1dc5
Algo.py
Algo.py
# # Copyright (c) 2016, Gabriel Linder <linder.gabriel@gmail.com> # # Permission to use, copy, modify, and/or distribute this software for any # purpose with or without fee is hereby granted, provided that the above # copyright notice and this permission notice appear in all copies. # # THE SOFTWARE IS PROVIDED "AS IS"...
# # Copyright (c) 2016, Gabriel Linder <linder.gabriel@gmail.com> # # Permission to use, copy, modify, and/or distribute this software for any # purpose with or without fee is hereby granted, provided that the above # copyright notice and this permission notice appear in all copies. # # THE SOFTWARE IS PROVIDED "AS IS"...
Check that population_size is even, and set half_population_size.
Check that population_size is even, and set half_population_size. This will be used by genetic algorithms.
Python
isc
dargor/python-guess-random-color,dargor/python-guess-random-color
# # Copyright (c) 2016, Gabriel Linder <linder.gabriel@gmail.com> # # Permission to use, copy, modify, and/or distribute this software for any # purpose with or without fee is hereby granted, provided that the above # copyright notice and this permission notice appear in all copies. # # THE SOFTWARE IS PROVIDED "AS IS"...
# # Copyright (c) 2016, Gabriel Linder <linder.gabriel@gmail.com> # # Permission to use, copy, modify, and/or distribute this software for any # purpose with or without fee is hereby granted, provided that the above # copyright notice and this permission notice appear in all copies. # # THE SOFTWARE IS PROVIDED "AS IS"...
<commit_before># # Copyright (c) 2016, Gabriel Linder <linder.gabriel@gmail.com> # # Permission to use, copy, modify, and/or distribute this software for any # purpose with or without fee is hereby granted, provided that the above # copyright notice and this permission notice appear in all copies. # # THE SOFTWARE IS P...
# # Copyright (c) 2016, Gabriel Linder <linder.gabriel@gmail.com> # # Permission to use, copy, modify, and/or distribute this software for any # purpose with or without fee is hereby granted, provided that the above # copyright notice and this permission notice appear in all copies. # # THE SOFTWARE IS PROVIDED "AS IS"...
# # Copyright (c) 2016, Gabriel Linder <linder.gabriel@gmail.com> # # Permission to use, copy, modify, and/or distribute this software for any # purpose with or without fee is hereby granted, provided that the above # copyright notice and this permission notice appear in all copies. # # THE SOFTWARE IS PROVIDED "AS IS"...
<commit_before># # Copyright (c) 2016, Gabriel Linder <linder.gabriel@gmail.com> # # Permission to use, copy, modify, and/or distribute this software for any # purpose with or without fee is hereby granted, provided that the above # copyright notice and this permission notice appear in all copies. # # THE SOFTWARE IS P...
f80b9f42db599e0416bd4e28f69c81e0fda494d2
todoist/managers/generic.py
todoist/managers/generic.py
# -*- coding: utf-8 -*- class Manager(object): # should be re-defined in a subclass state_name = None object_type = None def __init__(self, api): self.api = api # shortcuts @property def state(self): return self.api.state @property def queue(self): return ...
# -*- coding: utf-8 -*- class Manager(object): # should be re-defined in a subclass state_name = None object_type = None def __init__(self, api): self.api = api # shortcuts @property def state(self): return self.api.state @property def queue(self): return ...
Fix the case of using `get_by_id` when there's not state
Fix the case of using `get_by_id` when there's not state Previous to this commit, if there's no state we would return raw data, which would break object chaining. Now we check the state one last time before giving up and returning the raw data because it may have been populated by methods like `get_by_id` (instead of ...
Python
mit
Doist/todoist-python
# -*- coding: utf-8 -*- class Manager(object): # should be re-defined in a subclass state_name = None object_type = None def __init__(self, api): self.api = api # shortcuts @property def state(self): return self.api.state @property def queue(self): return ...
# -*- coding: utf-8 -*- class Manager(object): # should be re-defined in a subclass state_name = None object_type = None def __init__(self, api): self.api = api # shortcuts @property def state(self): return self.api.state @property def queue(self): return ...
<commit_before># -*- coding: utf-8 -*- class Manager(object): # should be re-defined in a subclass state_name = None object_type = None def __init__(self, api): self.api = api # shortcuts @property def state(self): return self.api.state @property def queue(self): ...
# -*- coding: utf-8 -*- class Manager(object): # should be re-defined in a subclass state_name = None object_type = None def __init__(self, api): self.api = api # shortcuts @property def state(self): return self.api.state @property def queue(self): return ...
# -*- coding: utf-8 -*- class Manager(object): # should be re-defined in a subclass state_name = None object_type = None def __init__(self, api): self.api = api # shortcuts @property def state(self): return self.api.state @property def queue(self): return ...
<commit_before># -*- coding: utf-8 -*- class Manager(object): # should be re-defined in a subclass state_name = None object_type = None def __init__(self, api): self.api = api # shortcuts @property def state(self): return self.api.state @property def queue(self): ...
6a34e0adb5128e4a46be26e9afa08cc9cd691be7
actionizer.py
actionizer.py
#! /usr/bin/python import numpy as np import os from sklearn import datasets MESSAGES_DIR = "data/messages/" JUDGMENTS_PATH = "data/judgments/judgments.txt" def load_messages(): messages = [] for filename in os.listdir(MESSAGES_DIR): with open(MESSAGES_DIR + filename) as message_file: mes...
#! /usr/bin/python import numpy as np import os from sklearn import datasets from sklearn.naive_bayes import GaussianNB from sklearn.metrics import classification_report MESSAGES_DIR = "data/messages/" JUDGMENTS_PATH = "data/judgments/judgments.txt" def load_messages(): messages = [] for filename in os.listd...
Add bag of words representation and simple naive bayes classification
Add bag of words representation and simple naive bayes classification
Python
mit
chiubaka/actionizer
#! /usr/bin/python import numpy as np import os from sklearn import datasets MESSAGES_DIR = "data/messages/" JUDGMENTS_PATH = "data/judgments/judgments.txt" def load_messages(): messages = [] for filename in os.listdir(MESSAGES_DIR): with open(MESSAGES_DIR + filename) as message_file: mes...
#! /usr/bin/python import numpy as np import os from sklearn import datasets from sklearn.naive_bayes import GaussianNB from sklearn.metrics import classification_report MESSAGES_DIR = "data/messages/" JUDGMENTS_PATH = "data/judgments/judgments.txt" def load_messages(): messages = [] for filename in os.listd...
<commit_before>#! /usr/bin/python import numpy as np import os from sklearn import datasets MESSAGES_DIR = "data/messages/" JUDGMENTS_PATH = "data/judgments/judgments.txt" def load_messages(): messages = [] for filename in os.listdir(MESSAGES_DIR): with open(MESSAGES_DIR + filename) as message_file: ...
#! /usr/bin/python import numpy as np import os from sklearn import datasets from sklearn.naive_bayes import GaussianNB from sklearn.metrics import classification_report MESSAGES_DIR = "data/messages/" JUDGMENTS_PATH = "data/judgments/judgments.txt" def load_messages(): messages = [] for filename in os.listd...
#! /usr/bin/python import numpy as np import os from sklearn import datasets MESSAGES_DIR = "data/messages/" JUDGMENTS_PATH = "data/judgments/judgments.txt" def load_messages(): messages = [] for filename in os.listdir(MESSAGES_DIR): with open(MESSAGES_DIR + filename) as message_file: mes...
<commit_before>#! /usr/bin/python import numpy as np import os from sklearn import datasets MESSAGES_DIR = "data/messages/" JUDGMENTS_PATH = "data/judgments/judgments.txt" def load_messages(): messages = [] for filename in os.listdir(MESSAGES_DIR): with open(MESSAGES_DIR + filename) as message_file: ...
9c923b8a94ea534c5b18983e81add7301a1dfa66
waterbutler/core/streams/file.py
waterbutler/core/streams/file.py
import os from waterbutler.core.streams import BaseStream class FileStreamReader(BaseStream): def __init__(self, file_pointer): super().__init__() self.file_gen = None self.file_pointer = file_pointer self.read_size = None self.content_type = 'application/octet-stream' ...
import os # import asyncio from waterbutler.core.streams import BaseStream class FileStreamReader(BaseStream): def __init__(self, file_pointer): super().__init__() self.file_gen = None self.file_pointer = file_pointer self.read_size = None self.content_type = 'application...
Update FileStreamReader to use async generator
Update FileStreamReader to use async generator
Python
apache-2.0
RCOSDP/waterbutler,TomBaxter/waterbutler,rdhyee/waterbutler,CenterForOpenScience/waterbutler,felliott/waterbutler,Johnetordoff/waterbutler
import os from waterbutler.core.streams import BaseStream class FileStreamReader(BaseStream): def __init__(self, file_pointer): super().__init__() self.file_gen = None self.file_pointer = file_pointer self.read_size = None self.content_type = 'application/octet-stream' ...
import os # import asyncio from waterbutler.core.streams import BaseStream class FileStreamReader(BaseStream): def __init__(self, file_pointer): super().__init__() self.file_gen = None self.file_pointer = file_pointer self.read_size = None self.content_type = 'application...
<commit_before>import os from waterbutler.core.streams import BaseStream class FileStreamReader(BaseStream): def __init__(self, file_pointer): super().__init__() self.file_gen = None self.file_pointer = file_pointer self.read_size = None self.content_type = 'application/o...
import os # import asyncio from waterbutler.core.streams import BaseStream class FileStreamReader(BaseStream): def __init__(self, file_pointer): super().__init__() self.file_gen = None self.file_pointer = file_pointer self.read_size = None self.content_type = 'application...
import os from waterbutler.core.streams import BaseStream class FileStreamReader(BaseStream): def __init__(self, file_pointer): super().__init__() self.file_gen = None self.file_pointer = file_pointer self.read_size = None self.content_type = 'application/octet-stream' ...
<commit_before>import os from waterbutler.core.streams import BaseStream class FileStreamReader(BaseStream): def __init__(self, file_pointer): super().__init__() self.file_gen = None self.file_pointer = file_pointer self.read_size = None self.content_type = 'application/o...
26b9bed4148cd4085009884df66c7bf9bd09ec00
topaz/tools/make_release.py
topaz/tools/make_release.py
import os import sys import tarfile PROJECT_ROOT = os.path.join(os.path.dirname(__file__), os.path.pardir, os.path.pardir) def main(argv): target = argv[0] t = tarfile.open(target, mode="w") for name in [ "bin/topaz", "lib-ruby", "AUTHORS.rst", "LICENSE", "README....
import os import sys import tarfile PROJECT_ROOT = os.path.join(os.path.dirname(__file__), os.path.pardir, os.path.pardir) def main(argv): target = argv[0] t = tarfile.open(target, mode="w:bz2") for name in [ "bin/topaz", "lib-ruby", "AUTHORS.rst", "LICENSE", "REA...
Make a bz2 for the release.
Make a bz2 for the release.
Python
bsd-3-clause
topazproject/topaz,babelsberg/babelsberg-r,topazproject/topaz,topazproject/topaz,kachick/topaz,babelsberg/babelsberg-r,babelsberg/babelsberg-r,kachick/topaz,babelsberg/babelsberg-r,babelsberg/babelsberg-r,topazproject/topaz,kachick/topaz
import os import sys import tarfile PROJECT_ROOT = os.path.join(os.path.dirname(__file__), os.path.pardir, os.path.pardir) def main(argv): target = argv[0] t = tarfile.open(target, mode="w") for name in [ "bin/topaz", "lib-ruby", "AUTHORS.rst", "LICENSE", "README....
import os import sys import tarfile PROJECT_ROOT = os.path.join(os.path.dirname(__file__), os.path.pardir, os.path.pardir) def main(argv): target = argv[0] t = tarfile.open(target, mode="w:bz2") for name in [ "bin/topaz", "lib-ruby", "AUTHORS.rst", "LICENSE", "REA...
<commit_before>import os import sys import tarfile PROJECT_ROOT = os.path.join(os.path.dirname(__file__), os.path.pardir, os.path.pardir) def main(argv): target = argv[0] t = tarfile.open(target, mode="w") for name in [ "bin/topaz", "lib-ruby", "AUTHORS.rst", "LICENSE", ...
import os import sys import tarfile PROJECT_ROOT = os.path.join(os.path.dirname(__file__), os.path.pardir, os.path.pardir) def main(argv): target = argv[0] t = tarfile.open(target, mode="w:bz2") for name in [ "bin/topaz", "lib-ruby", "AUTHORS.rst", "LICENSE", "REA...
import os import sys import tarfile PROJECT_ROOT = os.path.join(os.path.dirname(__file__), os.path.pardir, os.path.pardir) def main(argv): target = argv[0] t = tarfile.open(target, mode="w") for name in [ "bin/topaz", "lib-ruby", "AUTHORS.rst", "LICENSE", "README....
<commit_before>import os import sys import tarfile PROJECT_ROOT = os.path.join(os.path.dirname(__file__), os.path.pardir, os.path.pardir) def main(argv): target = argv[0] t = tarfile.open(target, mode="w") for name in [ "bin/topaz", "lib-ruby", "AUTHORS.rst", "LICENSE", ...
cf89df9f0c45134b02879781223f9baff77c99d8
website/addons/forward/routes.py
website/addons/forward/routes.py
# -*- coding: utf-8 -*- """Forward addon routes.""" from framework.routing import Rule, json_renderer from website.routes import OsfWebRenderer from website.addons.forward import views api_routes = { 'rules': [ Rule( [ '/project/<pid>/forward/config/', '/proje...
# -*- coding: utf-8 -*- """Forward addon routes.""" from framework.routing import Rule, json_renderer from website.routes import OsfWebRenderer from website.addons.forward import views api_routes = { 'rules': [ Rule( [ '/project/<pid>/forward/config/', '/proje...
Add missing slash so that Forward config error is rendered properly
Add missing slash so that Forward config error is rendered properly Closes centerforopenscience/openscienceframework.org#941
Python
apache-2.0
baylee-d/osf.io,himanshuo/osf.io,baylee-d/osf.io,felliott/osf.io,MerlinZhang/osf.io,HarryRybacki/osf.io,hmoco/osf.io,brianjgeiger/osf.io,caseyrygt/osf.io,ckc6cz/osf.io,petermalcolm/osf.io,adlius/osf.io,RomanZWang/osf.io,himanshuo/osf.io,mluo613/osf.io,chennan47/osf.io,Nesiehr/osf.io,emetsger/osf.io,sloria/osf.io,aaxelb...
# -*- coding: utf-8 -*- """Forward addon routes.""" from framework.routing import Rule, json_renderer from website.routes import OsfWebRenderer from website.addons.forward import views api_routes = { 'rules': [ Rule( [ '/project/<pid>/forward/config/', '/proje...
# -*- coding: utf-8 -*- """Forward addon routes.""" from framework.routing import Rule, json_renderer from website.routes import OsfWebRenderer from website.addons.forward import views api_routes = { 'rules': [ Rule( [ '/project/<pid>/forward/config/', '/proje...
<commit_before># -*- coding: utf-8 -*- """Forward addon routes.""" from framework.routing import Rule, json_renderer from website.routes import OsfWebRenderer from website.addons.forward import views api_routes = { 'rules': [ Rule( [ '/project/<pid>/forward/config/', ...
# -*- coding: utf-8 -*- """Forward addon routes.""" from framework.routing import Rule, json_renderer from website.routes import OsfWebRenderer from website.addons.forward import views api_routes = { 'rules': [ Rule( [ '/project/<pid>/forward/config/', '/proje...
# -*- coding: utf-8 -*- """Forward addon routes.""" from framework.routing import Rule, json_renderer from website.routes import OsfWebRenderer from website.addons.forward import views api_routes = { 'rules': [ Rule( [ '/project/<pid>/forward/config/', '/proje...
<commit_before># -*- coding: utf-8 -*- """Forward addon routes.""" from framework.routing import Rule, json_renderer from website.routes import OsfWebRenderer from website.addons.forward import views api_routes = { 'rules': [ Rule( [ '/project/<pid>/forward/config/', ...
8e52298adf81e3ac718559a33f4db799e00e8d16
tests/test_scarplet.py
tests/test_scarplet.py
import unittest import dem import WindowedTemplate as wt import filecmp class TemplateMatchingTestCase(unittest.TestCase): def setUp(self): self.dem = dem.DEMGrid('tests/data/synthetic.tif') def test_match_template(self): test_amplitude = dem.BaseSpatialGrid('tests/...
Write test for template matching of synthetic scarp
Write test for template matching of synthetic scarp
Python
mit
stgl/scarplet,rmsare/scarplet
Write test for template matching of synthetic scarp
import unittest import dem import WindowedTemplate as wt import filecmp class TemplateMatchingTestCase(unittest.TestCase): def setUp(self): self.dem = dem.DEMGrid('tests/data/synthetic.tif') def test_match_template(self): test_amplitude = dem.BaseSpatialGrid('tests/...
<commit_before><commit_msg>Write test for template matching of synthetic scarp<commit_after>
import unittest import dem import WindowedTemplate as wt import filecmp class TemplateMatchingTestCase(unittest.TestCase): def setUp(self): self.dem = dem.DEMGrid('tests/data/synthetic.tif') def test_match_template(self): test_amplitude = dem.BaseSpatialGrid('tests/...
Write test for template matching of synthetic scarpimport unittest import dem import WindowedTemplate as wt import filecmp class TemplateMatchingTestCase(unittest.TestCase): def setUp(self): self.dem = dem.DEMGrid('tests/data/synthetic.tif') def test_match_template(self): ...
<commit_before><commit_msg>Write test for template matching of synthetic scarp<commit_after>import unittest import dem import WindowedTemplate as wt import filecmp class TemplateMatchingTestCase(unittest.TestCase): def setUp(self): self.dem = dem.DEMGrid('tests/data/synthetic.tif') ...
75c53cc811ae7f374df211b220c220f01d8b37e9
flocker/node/functional/test_script.py
flocker/node/functional/test_script.py
# Copyright Hybrid Logic Ltd. See LICENSE file for details. """ Functional tests for the ``flocker-changestate`` command line tool. """ from subprocess import check_output from unittest import skipUnless from twisted.python.procutils import which from twisted.trial.unittest import TestCase from ... import __version...
# Copyright Hybrid Logic Ltd. See LICENSE file for details. """ Functional tests for the ``flocker-changestate`` command line tool. """ from subprocess import check_output from unittest import skipUnless from twisted.python.procutils import which from twisted.trial.unittest import TestCase from ... import __version...
Fix the functional testcase name
Fix the functional testcase name
Python
apache-2.0
jml/flocker,agonzalezro/flocker,Azulinho/flocker,AndyHuu/flocker,adamtheturtle/flocker,wallnerryan/flocker-profiles,Azulinho/flocker,1d4Nf6/flocker,LaynePeng/flocker,beni55/flocker,LaynePeng/flocker,hackday-profilers/flocker,beni55/flocker,w4ngyi/flocker,runcom/flocker,jml/flocker,jml/flocker,mbrukman/flocker,hackday-p...
# Copyright Hybrid Logic Ltd. See LICENSE file for details. """ Functional tests for the ``flocker-changestate`` command line tool. """ from subprocess import check_output from unittest import skipUnless from twisted.python.procutils import which from twisted.trial.unittest import TestCase from ... import __version...
# Copyright Hybrid Logic Ltd. See LICENSE file for details. """ Functional tests for the ``flocker-changestate`` command line tool. """ from subprocess import check_output from unittest import skipUnless from twisted.python.procutils import which from twisted.trial.unittest import TestCase from ... import __version...
<commit_before># Copyright Hybrid Logic Ltd. See LICENSE file for details. """ Functional tests for the ``flocker-changestate`` command line tool. """ from subprocess import check_output from unittest import skipUnless from twisted.python.procutils import which from twisted.trial.unittest import TestCase from ... i...
# Copyright Hybrid Logic Ltd. See LICENSE file for details. """ Functional tests for the ``flocker-changestate`` command line tool. """ from subprocess import check_output from unittest import skipUnless from twisted.python.procutils import which from twisted.trial.unittest import TestCase from ... import __version...
# Copyright Hybrid Logic Ltd. See LICENSE file for details. """ Functional tests for the ``flocker-changestate`` command line tool. """ from subprocess import check_output from unittest import skipUnless from twisted.python.procutils import which from twisted.trial.unittest import TestCase from ... import __version...
<commit_before># Copyright Hybrid Logic Ltd. See LICENSE file for details. """ Functional tests for the ``flocker-changestate`` command line tool. """ from subprocess import check_output from unittest import skipUnless from twisted.python.procutils import which from twisted.trial.unittest import TestCase from ... i...
c61b08475d82d57dae4349e1c4aa3e58fd7d8256
src/sentry/api/serializers/models/grouptagvalue.py
src/sentry/api/serializers/models/grouptagvalue.py
from __future__ import absolute_import from sentry.api.serializers import Serializer, register from sentry.models import GroupTagValue @register(GroupTagValue) class GroupTagValueSerializer(Serializer): def serialize(self, obj, attrs, user): d = { 'key': obj.key, 'value': obj.valu...
from __future__ import absolute_import from sentry.api.serializers import Serializer, register from sentry.models import GroupTagValue, TagValue @register(GroupTagValue) class GroupTagValueSerializer(Serializer): def get_attrs(self, item_list, user): assert len(set(i.key for i in item_list)) < 2 ...
Implement labels on group tag values
Implement labels on group tag values
Python
bsd-3-clause
ngonzalvez/sentry,mvaled/sentry,daevaorn/sentry,kevinlondon/sentry,imankulov/sentry,gencer/sentry,korealerts1/sentry,Natim/sentry,felixbuenemann/sentry,JamesMura/sentry,JackDanger/sentry,fotinakis/sentry,JackDanger/sentry,jean/sentry,looker/sentry,gencer/sentry,looker/sentry,gencer/sentry,looker/sentry,ngonzalvez/sentr...
from __future__ import absolute_import from sentry.api.serializers import Serializer, register from sentry.models import GroupTagValue @register(GroupTagValue) class GroupTagValueSerializer(Serializer): def serialize(self, obj, attrs, user): d = { 'key': obj.key, 'value': obj.valu...
from __future__ import absolute_import from sentry.api.serializers import Serializer, register from sentry.models import GroupTagValue, TagValue @register(GroupTagValue) class GroupTagValueSerializer(Serializer): def get_attrs(self, item_list, user): assert len(set(i.key for i in item_list)) < 2 ...
<commit_before>from __future__ import absolute_import from sentry.api.serializers import Serializer, register from sentry.models import GroupTagValue @register(GroupTagValue) class GroupTagValueSerializer(Serializer): def serialize(self, obj, attrs, user): d = { 'key': obj.key, 'v...
from __future__ import absolute_import from sentry.api.serializers import Serializer, register from sentry.models import GroupTagValue, TagValue @register(GroupTagValue) class GroupTagValueSerializer(Serializer): def get_attrs(self, item_list, user): assert len(set(i.key for i in item_list)) < 2 ...
from __future__ import absolute_import from sentry.api.serializers import Serializer, register from sentry.models import GroupTagValue @register(GroupTagValue) class GroupTagValueSerializer(Serializer): def serialize(self, obj, attrs, user): d = { 'key': obj.key, 'value': obj.valu...
<commit_before>from __future__ import absolute_import from sentry.api.serializers import Serializer, register from sentry.models import GroupTagValue @register(GroupTagValue) class GroupTagValueSerializer(Serializer): def serialize(self, obj, attrs, user): d = { 'key': obj.key, 'v...
6d87ef7420cdb544739340eb432a3e2ee68e734e
wordonhd/Letter.py
wordonhd/Letter.py
class Letter(object): _values = { '#': 0, # Wildcard 'ENIOA': 1, 'SDTR': 2, 'MLKPBG': 3, 'ZVUFJH': 4, 'CW': 5, 'XY': 8, 'Q': 10 } def __init__(self, letter): self.letter = letter[-1] self.wordon = letter[0] == '!' self...
class Letter(object): _values = { '#': 0, # Wildcard 'ENIOA': 1, 'SDTR': 2, 'MLKPBG': 3, 'ZVUFJH': 4, 'CW': 5, 'XY': 8, 'Q': 10 } def __init__(self, letter): self.letter = letter[-1] self.wordon = letter[0] == '!' self...
Fix wordon filtering when calculating the value
Fix wordon filtering when calculating the value
Python
bsd-2-clause
Mechazawa/WordOn-HD-Bot
class Letter(object): _values = { '#': 0, # Wildcard 'ENIOA': 1, 'SDTR': 2, 'MLKPBG': 3, 'ZVUFJH': 4, 'CW': 5, 'XY': 8, 'Q': 10 } def __init__(self, letter): self.letter = letter[-1] self.wordon = letter[0] == '!' self...
class Letter(object): _values = { '#': 0, # Wildcard 'ENIOA': 1, 'SDTR': 2, 'MLKPBG': 3, 'ZVUFJH': 4, 'CW': 5, 'XY': 8, 'Q': 10 } def __init__(self, letter): self.letter = letter[-1] self.wordon = letter[0] == '!' self...
<commit_before>class Letter(object): _values = { '#': 0, # Wildcard 'ENIOA': 1, 'SDTR': 2, 'MLKPBG': 3, 'ZVUFJH': 4, 'CW': 5, 'XY': 8, 'Q': 10 } def __init__(self, letter): self.letter = letter[-1] self.wordon = letter[0] == '...
class Letter(object): _values = { '#': 0, # Wildcard 'ENIOA': 1, 'SDTR': 2, 'MLKPBG': 3, 'ZVUFJH': 4, 'CW': 5, 'XY': 8, 'Q': 10 } def __init__(self, letter): self.letter = letter[-1] self.wordon = letter[0] == '!' self...
class Letter(object): _values = { '#': 0, # Wildcard 'ENIOA': 1, 'SDTR': 2, 'MLKPBG': 3, 'ZVUFJH': 4, 'CW': 5, 'XY': 8, 'Q': 10 } def __init__(self, letter): self.letter = letter[-1] self.wordon = letter[0] == '!' self...
<commit_before>class Letter(object): _values = { '#': 0, # Wildcard 'ENIOA': 1, 'SDTR': 2, 'MLKPBG': 3, 'ZVUFJH': 4, 'CW': 5, 'XY': 8, 'Q': 10 } def __init__(self, letter): self.letter = letter[-1] self.wordon = letter[0] == '...
06ac40c2767e73890f9d68ddc2e5d3c7522118ae
levels/intro.py
levels/intro.py
import pyglet from pyglet.window.key import SPACE from .levels import Level class IntroScreen(Level): def __init__(self, window): self.welcome = pyglet.text.Label('WELCOME\n\tTO\nCLAIRE', x=100, y=window.height-80, width=window.width//2, f...
import pyglet from pyglet.window.key import SPACE from .levels import Level class IntroScreen(Level): def __init__(self, window): self.welcome = pyglet.text.Label('WELCOME\n\tTO\nCLAIRE', x=100, y=window.height-80, width=window.width//2, f...
Change formate of top 5 list
Change formate of top 5 list
Python
mit
simeonf/claire
import pyglet from pyglet.window.key import SPACE from .levels import Level class IntroScreen(Level): def __init__(self, window): self.welcome = pyglet.text.Label('WELCOME\n\tTO\nCLAIRE', x=100, y=window.height-80, width=window.width//2, f...
import pyglet from pyglet.window.key import SPACE from .levels import Level class IntroScreen(Level): def __init__(self, window): self.welcome = pyglet.text.Label('WELCOME\n\tTO\nCLAIRE', x=100, y=window.height-80, width=window.width//2, f...
<commit_before>import pyglet from pyglet.window.key import SPACE from .levels import Level class IntroScreen(Level): def __init__(self, window): self.welcome = pyglet.text.Label('WELCOME\n\tTO\nCLAIRE', x=100, y=window.height-80, width=window.width//2, ...
import pyglet from pyglet.window.key import SPACE from .levels import Level class IntroScreen(Level): def __init__(self, window): self.welcome = pyglet.text.Label('WELCOME\n\tTO\nCLAIRE', x=100, y=window.height-80, width=window.width//2, f...
import pyglet from pyglet.window.key import SPACE from .levels import Level class IntroScreen(Level): def __init__(self, window): self.welcome = pyglet.text.Label('WELCOME\n\tTO\nCLAIRE', x=100, y=window.height-80, width=window.width//2, f...
<commit_before>import pyglet from pyglet.window.key import SPACE from .levels import Level class IntroScreen(Level): def __init__(self, window): self.welcome = pyglet.text.Label('WELCOME\n\tTO\nCLAIRE', x=100, y=window.height-80, width=window.width//2, ...
c044c804633612608bbbf61621551d892483f179
yaspin/spinners.py
yaspin/spinners.py
# -*- coding: utf-8 -*- """ yaspin.spinners ~~~~~~~~~~~~~~~ A collection of cli spinners. """ import codecs import os from collections import namedtuple try: import simplejson as json except ImportError: import json THIS_DIR = os.path.dirname(os.path.realpath(__file__)) SPINNERS_PATH = os.path.join(THIS_D...
# -*- coding: utf-8 -*- """ yaspin.spinners ~~~~~~~~~~~~~~~ A collection of cli spinners. """ import codecs import pkgutil from collections import namedtuple try: import simplejson as json except ImportError: import json THIS_DIR = os.path.dirname(os.path.realpath(__file__)) SPINNERS_DATA = pkgutil.get_da...
Allow use inside zip bundled package
Allow use inside zip bundled package
Python
mit
pavdmyt/yaspin
# -*- coding: utf-8 -*- """ yaspin.spinners ~~~~~~~~~~~~~~~ A collection of cli spinners. """ import codecs import os from collections import namedtuple try: import simplejson as json except ImportError: import json THIS_DIR = os.path.dirname(os.path.realpath(__file__)) SPINNERS_PATH = os.path.join(THIS_D...
# -*- coding: utf-8 -*- """ yaspin.spinners ~~~~~~~~~~~~~~~ A collection of cli spinners. """ import codecs import pkgutil from collections import namedtuple try: import simplejson as json except ImportError: import json THIS_DIR = os.path.dirname(os.path.realpath(__file__)) SPINNERS_DATA = pkgutil.get_da...
<commit_before># -*- coding: utf-8 -*- """ yaspin.spinners ~~~~~~~~~~~~~~~ A collection of cli spinners. """ import codecs import os from collections import namedtuple try: import simplejson as json except ImportError: import json THIS_DIR = os.path.dirname(os.path.realpath(__file__)) SPINNERS_PATH = os.p...
# -*- coding: utf-8 -*- """ yaspin.spinners ~~~~~~~~~~~~~~~ A collection of cli spinners. """ import codecs import pkgutil from collections import namedtuple try: import simplejson as json except ImportError: import json THIS_DIR = os.path.dirname(os.path.realpath(__file__)) SPINNERS_DATA = pkgutil.get_da...
# -*- coding: utf-8 -*- """ yaspin.spinners ~~~~~~~~~~~~~~~ A collection of cli spinners. """ import codecs import os from collections import namedtuple try: import simplejson as json except ImportError: import json THIS_DIR = os.path.dirname(os.path.realpath(__file__)) SPINNERS_PATH = os.path.join(THIS_D...
<commit_before># -*- coding: utf-8 -*- """ yaspin.spinners ~~~~~~~~~~~~~~~ A collection of cli spinners. """ import codecs import os from collections import namedtuple try: import simplejson as json except ImportError: import json THIS_DIR = os.path.dirname(os.path.realpath(__file__)) SPINNERS_PATH = os.p...
01331f37c629f0738c5517527a6e78be55334e04
democracy/views/utils.py
democracy/views/utils.py
# -*- coding: utf-8 -*- from functools import lru_cache from rest_framework import serializers class AbstractFieldSerializer(serializers.RelatedField): parent_serializer_class = serializers.ModelSerializer def to_representation(self, image): return self.parent_serializer_class(image, context=self.co...
# -*- coding: utf-8 -*- from functools import lru_cache from rest_framework import serializers from rest_framework.relations import ManyRelatedField, MANY_RELATION_KWARGS class AbstractFieldSerializer(serializers.RelatedField): parent_serializer_class = serializers.ModelSerializer many_field_class = ManyRela...
Allow overriding the ManyRelatedField for image fields
Allow overriding the ManyRelatedField for image fields
Python
mit
City-of-Helsinki/kerrokantasi,stephawe/kerrokantasi,City-of-Helsinki/kerrokantasi,City-of-Helsinki/kerrokantasi,stephawe/kerrokantasi,vikoivun/kerrokantasi,vikoivun/kerrokantasi,vikoivun/kerrokantasi,stephawe/kerrokantasi,City-of-Helsinki/kerrokantasi
# -*- coding: utf-8 -*- from functools import lru_cache from rest_framework import serializers class AbstractFieldSerializer(serializers.RelatedField): parent_serializer_class = serializers.ModelSerializer def to_representation(self, image): return self.parent_serializer_class(image, context=self.co...
# -*- coding: utf-8 -*- from functools import lru_cache from rest_framework import serializers from rest_framework.relations import ManyRelatedField, MANY_RELATION_KWARGS class AbstractFieldSerializer(serializers.RelatedField): parent_serializer_class = serializers.ModelSerializer many_field_class = ManyRela...
<commit_before># -*- coding: utf-8 -*- from functools import lru_cache from rest_framework import serializers class AbstractFieldSerializer(serializers.RelatedField): parent_serializer_class = serializers.ModelSerializer def to_representation(self, image): return self.parent_serializer_class(image, ...
# -*- coding: utf-8 -*- from functools import lru_cache from rest_framework import serializers from rest_framework.relations import ManyRelatedField, MANY_RELATION_KWARGS class AbstractFieldSerializer(serializers.RelatedField): parent_serializer_class = serializers.ModelSerializer many_field_class = ManyRela...
# -*- coding: utf-8 -*- from functools import lru_cache from rest_framework import serializers class AbstractFieldSerializer(serializers.RelatedField): parent_serializer_class = serializers.ModelSerializer def to_representation(self, image): return self.parent_serializer_class(image, context=self.co...
<commit_before># -*- coding: utf-8 -*- from functools import lru_cache from rest_framework import serializers class AbstractFieldSerializer(serializers.RelatedField): parent_serializer_class = serializers.ModelSerializer def to_representation(self, image): return self.parent_serializer_class(image, ...
d240faeec0dea1b9dbefe080b479276ea19d2a0b
apps/explorer/tests/test_views.py
apps/explorer/tests/test_views.py
from django.core.urlresolvers import reverse from apps.core.factories import PIXELER_PASSWORD, PixelerFactory from apps.core.tests import CoreFixturesTestCase from apps.core.management.commands.make_development_fixtures import ( make_development_fixtures ) class PixelSetListViewTestCase(CoreFixturesTestCase): ...
from django.core.urlresolvers import reverse from apps.core.factories import PIXELER_PASSWORD, PixelerFactory from apps.core.tests import CoreFixturesTestCase from apps.core.management.commands.make_development_fixtures import ( make_development_fixtures ) class PixelSetListViewTestCase(CoreFixturesTestCase): ...
Fix empty pixel set list message
Fix empty pixel set list message
Python
bsd-3-clause
Candihub/pixel,Candihub/pixel,Candihub/pixel,Candihub/pixel,Candihub/pixel
from django.core.urlresolvers import reverse from apps.core.factories import PIXELER_PASSWORD, PixelerFactory from apps.core.tests import CoreFixturesTestCase from apps.core.management.commands.make_development_fixtures import ( make_development_fixtures ) class PixelSetListViewTestCase(CoreFixturesTestCase): ...
from django.core.urlresolvers import reverse from apps.core.factories import PIXELER_PASSWORD, PixelerFactory from apps.core.tests import CoreFixturesTestCase from apps.core.management.commands.make_development_fixtures import ( make_development_fixtures ) class PixelSetListViewTestCase(CoreFixturesTestCase): ...
<commit_before>from django.core.urlresolvers import reverse from apps.core.factories import PIXELER_PASSWORD, PixelerFactory from apps.core.tests import CoreFixturesTestCase from apps.core.management.commands.make_development_fixtures import ( make_development_fixtures ) class PixelSetListViewTestCase(CoreFixtur...
from django.core.urlresolvers import reverse from apps.core.factories import PIXELER_PASSWORD, PixelerFactory from apps.core.tests import CoreFixturesTestCase from apps.core.management.commands.make_development_fixtures import ( make_development_fixtures ) class PixelSetListViewTestCase(CoreFixturesTestCase): ...
from django.core.urlresolvers import reverse from apps.core.factories import PIXELER_PASSWORD, PixelerFactory from apps.core.tests import CoreFixturesTestCase from apps.core.management.commands.make_development_fixtures import ( make_development_fixtures ) class PixelSetListViewTestCase(CoreFixturesTestCase): ...
<commit_before>from django.core.urlresolvers import reverse from apps.core.factories import PIXELER_PASSWORD, PixelerFactory from apps.core.tests import CoreFixturesTestCase from apps.core.management.commands.make_development_fixtures import ( make_development_fixtures ) class PixelSetListViewTestCase(CoreFixtur...
e475fdcf1054d5942addd28ca2c543542fc8abc5
geoalchemy2/shape.py
geoalchemy2/shape.py
""" This module provides utility functions for integrating with Shapely. """ import shapely.wkb import shapely.wkt from .elements import WKBElement, WKTElement from .compat import buffer, bytes def to_shape(element): """ Function to convert a :class:`geoalchemy2.types.SpatialElement` to a Shapely geomet...
""" This module provides utility functions for integrating with Shapely. .. note:: As GeoAlchemy 2 itself has no dependency on `Shapely`, applications using functions of this module have to ensure that `Shapely` is available. """ import shapely.wkb import shapely.wkt from .elements import WKBElement, WKTEle...
Add note in docu about Shapely
Add note in docu about Shapely
Python
mit
geoalchemy/geoalchemy2
""" This module provides utility functions for integrating with Shapely. """ import shapely.wkb import shapely.wkt from .elements import WKBElement, WKTElement from .compat import buffer, bytes def to_shape(element): """ Function to convert a :class:`geoalchemy2.types.SpatialElement` to a Shapely geomet...
""" This module provides utility functions for integrating with Shapely. .. note:: As GeoAlchemy 2 itself has no dependency on `Shapely`, applications using functions of this module have to ensure that `Shapely` is available. """ import shapely.wkb import shapely.wkt from .elements import WKBElement, WKTEle...
<commit_before>""" This module provides utility functions for integrating with Shapely. """ import shapely.wkb import shapely.wkt from .elements import WKBElement, WKTElement from .compat import buffer, bytes def to_shape(element): """ Function to convert a :class:`geoalchemy2.types.SpatialElement` to a...
""" This module provides utility functions for integrating with Shapely. .. note:: As GeoAlchemy 2 itself has no dependency on `Shapely`, applications using functions of this module have to ensure that `Shapely` is available. """ import shapely.wkb import shapely.wkt from .elements import WKBElement, WKTEle...
""" This module provides utility functions for integrating with Shapely. """ import shapely.wkb import shapely.wkt from .elements import WKBElement, WKTElement from .compat import buffer, bytes def to_shape(element): """ Function to convert a :class:`geoalchemy2.types.SpatialElement` to a Shapely geomet...
<commit_before>""" This module provides utility functions for integrating with Shapely. """ import shapely.wkb import shapely.wkt from .elements import WKBElement, WKTElement from .compat import buffer, bytes def to_shape(element): """ Function to convert a :class:`geoalchemy2.types.SpatialElement` to a...
c656ac5231d85e5f6a07688d3d7c2f4f07b3e154
backstage/settings/development.py
backstage/settings/development.py
import os import dj_database_url from .base import * DATABASE_URL = os.environ.get('DATABASE_URL') DATABASES = { 'default': dj_database_url.config() } STATIC_ROOT = 'static_sources' STATIC_URL = '/static/' STATICFILES_DIRS = ( os.path.join(BASE_DIR, 'static'), )
import os import dj_database_url from .base import * DATABASE_URL = os.environ.get('DATABASE_URL') DATABASES = { 'default': dj_database_url.config() } # Media handling MEDIA_ROOT = BASE_DIR.child("media") # Static file handling STATIC_ROOT = 'static_sources' STATIC_URL = '/static/' STATICFILES_DIRS = ( ...
Add MEDIA_ROOT to dev settings
Add MEDIA_ROOT to dev settings
Python
mit
mhotwagner/backstage,mhotwagner/backstage,mhotwagner/backstage
import os import dj_database_url from .base import * DATABASE_URL = os.environ.get('DATABASE_URL') DATABASES = { 'default': dj_database_url.config() } STATIC_ROOT = 'static_sources' STATIC_URL = '/static/' STATICFILES_DIRS = ( os.path.join(BASE_DIR, 'static'), ) Add MEDIA_ROOT to dev settings
import os import dj_database_url from .base import * DATABASE_URL = os.environ.get('DATABASE_URL') DATABASES = { 'default': dj_database_url.config() } # Media handling MEDIA_ROOT = BASE_DIR.child("media") # Static file handling STATIC_ROOT = 'static_sources' STATIC_URL = '/static/' STATICFILES_DIRS = ( ...
<commit_before>import os import dj_database_url from .base import * DATABASE_URL = os.environ.get('DATABASE_URL') DATABASES = { 'default': dj_database_url.config() } STATIC_ROOT = 'static_sources' STATIC_URL = '/static/' STATICFILES_DIRS = ( os.path.join(BASE_DIR, 'static'), ) <commit_msg>Add MEDIA_ROOT ...
import os import dj_database_url from .base import * DATABASE_URL = os.environ.get('DATABASE_URL') DATABASES = { 'default': dj_database_url.config() } # Media handling MEDIA_ROOT = BASE_DIR.child("media") # Static file handling STATIC_ROOT = 'static_sources' STATIC_URL = '/static/' STATICFILES_DIRS = ( ...
import os import dj_database_url from .base import * DATABASE_URL = os.environ.get('DATABASE_URL') DATABASES = { 'default': dj_database_url.config() } STATIC_ROOT = 'static_sources' STATIC_URL = '/static/' STATICFILES_DIRS = ( os.path.join(BASE_DIR, 'static'), ) Add MEDIA_ROOT to dev settingsimport os i...
<commit_before>import os import dj_database_url from .base import * DATABASE_URL = os.environ.get('DATABASE_URL') DATABASES = { 'default': dj_database_url.config() } STATIC_ROOT = 'static_sources' STATIC_URL = '/static/' STATICFILES_DIRS = ( os.path.join(BASE_DIR, 'static'), ) <commit_msg>Add MEDIA_ROOT ...
76166f243b9f5f21582c95a843ddfa174ded8602
PyFVCOM/__init__.py
PyFVCOM/__init__.py
""" The FVCOM Python toolbox (PyFVCOM) """ __version__ = '1.6.2' __author__ = 'Pierre Cazenave' __credits__ = ['Pierre Cazenave'] __license__ = 'MIT' __maintainer__ = 'Pierre Cazenave' __email__ = 'pica@pml.ac.uk' import inspect from warnings import warn # Import everything! from PyFVCOM import buoy_tools from PyFV...
""" The FVCOM Python toolbox (PyFVCOM) """ __version__ = '1.6.2' __author__ = 'Pierre Cazenave' __credits__ = ['Pierre Cazenave'] __license__ = 'MIT' __maintainer__ = 'Pierre Cazenave' __email__ = 'pica@pml.ac.uk' import inspect from warnings import warn # Import everything! from PyFVCOM import buoy_tools from PyFV...
Put things in in alphabetical order.
Put things in in alphabetical order.
Python
mit
pwcazenave/PyFVCOM
""" The FVCOM Python toolbox (PyFVCOM) """ __version__ = '1.6.2' __author__ = 'Pierre Cazenave' __credits__ = ['Pierre Cazenave'] __license__ = 'MIT' __maintainer__ = 'Pierre Cazenave' __email__ = 'pica@pml.ac.uk' import inspect from warnings import warn # Import everything! from PyFVCOM import buoy_tools from PyFV...
""" The FVCOM Python toolbox (PyFVCOM) """ __version__ = '1.6.2' __author__ = 'Pierre Cazenave' __credits__ = ['Pierre Cazenave'] __license__ = 'MIT' __maintainer__ = 'Pierre Cazenave' __email__ = 'pica@pml.ac.uk' import inspect from warnings import warn # Import everything! from PyFVCOM import buoy_tools from PyFV...
<commit_before>""" The FVCOM Python toolbox (PyFVCOM) """ __version__ = '1.6.2' __author__ = 'Pierre Cazenave' __credits__ = ['Pierre Cazenave'] __license__ = 'MIT' __maintainer__ = 'Pierre Cazenave' __email__ = 'pica@pml.ac.uk' import inspect from warnings import warn # Import everything! from PyFVCOM import buoy_...
""" The FVCOM Python toolbox (PyFVCOM) """ __version__ = '1.6.2' __author__ = 'Pierre Cazenave' __credits__ = ['Pierre Cazenave'] __license__ = 'MIT' __maintainer__ = 'Pierre Cazenave' __email__ = 'pica@pml.ac.uk' import inspect from warnings import warn # Import everything! from PyFVCOM import buoy_tools from PyFV...
""" The FVCOM Python toolbox (PyFVCOM) """ __version__ = '1.6.2' __author__ = 'Pierre Cazenave' __credits__ = ['Pierre Cazenave'] __license__ = 'MIT' __maintainer__ = 'Pierre Cazenave' __email__ = 'pica@pml.ac.uk' import inspect from warnings import warn # Import everything! from PyFVCOM import buoy_tools from PyFV...
<commit_before>""" The FVCOM Python toolbox (PyFVCOM) """ __version__ = '1.6.2' __author__ = 'Pierre Cazenave' __credits__ = ['Pierre Cazenave'] __license__ = 'MIT' __maintainer__ = 'Pierre Cazenave' __email__ = 'pica@pml.ac.uk' import inspect from warnings import warn # Import everything! from PyFVCOM import buoy_...
b0a637ab19b3a5aca9e8c759fad2213ccde33e28
tests/chainer_tests/functions_tests/math_tests/test_sqrt.py
tests/chainer_tests/functions_tests/math_tests/test_sqrt.py
import unittest import numpy import chainer.functions as F from chainer import testing # # sqrt def make_data(shape, dtype): x = numpy.random.uniform(0.1, 5, shape).astype(dtype) gy = numpy.random.uniform(-1, 1, shape).astype(dtype) return x, gy @testing.unary_math_function_test(F.Sqrt(), make_data=m...
import unittest import numpy import chainer.functions as F from chainer import testing # sqrt def make_data(shape, dtype): x = numpy.random.uniform(0.1, 5, shape).astype(dtype) gy = numpy.random.uniform(-1, 1, shape).astype(dtype) return x, gy @testing.unary_math_function_test(F.Sqrt(), make_data=mak...
Remove empty lines in comments.
Remove empty lines in comments.
Python
mit
wkentaro/chainer,ysekky/chainer,chainer/chainer,hvy/chainer,okuta/chainer,chainer/chainer,keisuke-umezawa/chainer,wkentaro/chainer,wkentaro/chainer,cupy/cupy,kiyukuta/chainer,rezoo/chainer,ronekko/chainer,hvy/chainer,okuta/chainer,ktnyt/chainer,jnishi/chainer,niboshi/chainer,pfnet/chainer,cupy/cupy,kashif/chainer,cupy/...
import unittest import numpy import chainer.functions as F from chainer import testing # # sqrt def make_data(shape, dtype): x = numpy.random.uniform(0.1, 5, shape).astype(dtype) gy = numpy.random.uniform(-1, 1, shape).astype(dtype) return x, gy @testing.unary_math_function_test(F.Sqrt(), make_data=m...
import unittest import numpy import chainer.functions as F from chainer import testing # sqrt def make_data(shape, dtype): x = numpy.random.uniform(0.1, 5, shape).astype(dtype) gy = numpy.random.uniform(-1, 1, shape).astype(dtype) return x, gy @testing.unary_math_function_test(F.Sqrt(), make_data=mak...
<commit_before>import unittest import numpy import chainer.functions as F from chainer import testing # # sqrt def make_data(shape, dtype): x = numpy.random.uniform(0.1, 5, shape).astype(dtype) gy = numpy.random.uniform(-1, 1, shape).astype(dtype) return x, gy @testing.unary_math_function_test(F.Sqrt...
import unittest import numpy import chainer.functions as F from chainer import testing # sqrt def make_data(shape, dtype): x = numpy.random.uniform(0.1, 5, shape).astype(dtype) gy = numpy.random.uniform(-1, 1, shape).astype(dtype) return x, gy @testing.unary_math_function_test(F.Sqrt(), make_data=mak...
import unittest import numpy import chainer.functions as F from chainer import testing # # sqrt def make_data(shape, dtype): x = numpy.random.uniform(0.1, 5, shape).astype(dtype) gy = numpy.random.uniform(-1, 1, shape).astype(dtype) return x, gy @testing.unary_math_function_test(F.Sqrt(), make_data=m...
<commit_before>import unittest import numpy import chainer.functions as F from chainer import testing # # sqrt def make_data(shape, dtype): x = numpy.random.uniform(0.1, 5, shape).astype(dtype) gy = numpy.random.uniform(-1, 1, shape).astype(dtype) return x, gy @testing.unary_math_function_test(F.Sqrt...
3e6700e4bd7107c37cb706086ae93adec7164083
RealtimeInterval.py
RealtimeInterval.py
import time class RealtimeInterval: startTime = 0 interval = 0 def __init__(self, intervalInSeconds): self.startTime = time.time() self.interval = intervalInSeconds def start(self): self.startTime = time.time() def hasElapsed(self): timeNow =...
import time class RealtimeInterval: def __init__(self, intervalInSeconds, allowImmediate = True): self.interval = intervalInSeconds self.allowImmediate = allowImmediate self.reset() def reset(self): if self.allowImmediate: self.startTime = 0 else:...
Improve real time throttle so that it can start immediate the first time.
Improve real time throttle so that it can start immediate the first time.
Python
mit
AluminatiFRC/Vision2016,AluminatiFRC/Vision2016
import time class RealtimeInterval: startTime = 0 interval = 0 def __init__(self, intervalInSeconds): self.startTime = time.time() self.interval = intervalInSeconds def start(self): self.startTime = time.time() def hasElapsed(self): timeNow =...
import time class RealtimeInterval: def __init__(self, intervalInSeconds, allowImmediate = True): self.interval = intervalInSeconds self.allowImmediate = allowImmediate self.reset() def reset(self): if self.allowImmediate: self.startTime = 0 else:...
<commit_before>import time class RealtimeInterval: startTime = 0 interval = 0 def __init__(self, intervalInSeconds): self.startTime = time.time() self.interval = intervalInSeconds def start(self): self.startTime = time.time() def hasElapsed(self): ...
import time class RealtimeInterval: def __init__(self, intervalInSeconds, allowImmediate = True): self.interval = intervalInSeconds self.allowImmediate = allowImmediate self.reset() def reset(self): if self.allowImmediate: self.startTime = 0 else:...
import time class RealtimeInterval: startTime = 0 interval = 0 def __init__(self, intervalInSeconds): self.startTime = time.time() self.interval = intervalInSeconds def start(self): self.startTime = time.time() def hasElapsed(self): timeNow =...
<commit_before>import time class RealtimeInterval: startTime = 0 interval = 0 def __init__(self, intervalInSeconds): self.startTime = time.time() self.interval = intervalInSeconds def start(self): self.startTime = time.time() def hasElapsed(self): ...
4940a996a967608bb3c69659d1cc9f97fd2686c7
telepathy/server/properties.py
telepathy/server/properties.py
# telepathy-spec - Base classes defining the interfaces of the Telepathy framework # # Copyright (C) 2005,2006 Collabora Limited # Copyright (C) 2005,2006 Nokia Corporation # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as publish...
# telepathy-spec - Base classes defining the interfaces of the Telepathy framework # # Copyright (C) 2005,2006 Collabora Limited # Copyright (C) 2005,2006 Nokia Corporation # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as publish...
Fix import for renaming of Properties to Properties_INterface
Fix import for renaming of Properties to Properties_INterface 20070206124719-53eee-3edd233f30e8a6c5ae1cbaaa1a39a7bbdfb8373c.gz
Python
lgpl-2.1
freedesktop-unofficial-mirror/telepathy__telepathy-spec,TelepathyIM/telepathy-spec
# telepathy-spec - Base classes defining the interfaces of the Telepathy framework # # Copyright (C) 2005,2006 Collabora Limited # Copyright (C) 2005,2006 Nokia Corporation # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as publish...
# telepathy-spec - Base classes defining the interfaces of the Telepathy framework # # Copyright (C) 2005,2006 Collabora Limited # Copyright (C) 2005,2006 Nokia Corporation # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as publish...
<commit_before># telepathy-spec - Base classes defining the interfaces of the Telepathy framework # # Copyright (C) 2005,2006 Collabora Limited # Copyright (C) 2005,2006 Nokia Corporation # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # Lic...
# telepathy-spec - Base classes defining the interfaces of the Telepathy framework # # Copyright (C) 2005,2006 Collabora Limited # Copyright (C) 2005,2006 Nokia Corporation # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as publish...
# telepathy-spec - Base classes defining the interfaces of the Telepathy framework # # Copyright (C) 2005,2006 Collabora Limited # Copyright (C) 2005,2006 Nokia Corporation # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as publish...
<commit_before># telepathy-spec - Base classes defining the interfaces of the Telepathy framework # # Copyright (C) 2005,2006 Collabora Limited # Copyright (C) 2005,2006 Nokia Corporation # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # Lic...
377a0d4acd9a578146c0f02f518dbea502c8461f
arividam/siteconfig/apps.py
arividam/siteconfig/apps.py
from __future__ import unicode_literals from django.apps import AppConfig class SiteconfigConfig(AppConfig): name = 'siteconfig'
from __future__ import unicode_literals from django.apps import AppConfig from cms.cms_plugins import AliasPlugin from cms.plugin_pool import plugin_pool class SiteconfigConfig(AppConfig): name = 'siteconfig' verbose_name = "Site Configuration" def ready(self): def return_pass(self, r, p): ...
Disable AliasPlugin since it can accidentally
Disable AliasPlugin since it can accidentally cause problems if an alias is placed within itself
Python
mit
c4sc/arividam,c4sc/arividam,c4sc/arividam,c4sc/arividam
from __future__ import unicode_literals from django.apps import AppConfig class SiteconfigConfig(AppConfig): name = 'siteconfig' Disable AliasPlugin since it can accidentally cause problems if an alias is placed within itself
from __future__ import unicode_literals from django.apps import AppConfig from cms.cms_plugins import AliasPlugin from cms.plugin_pool import plugin_pool class SiteconfigConfig(AppConfig): name = 'siteconfig' verbose_name = "Site Configuration" def ready(self): def return_pass(self, r, p): ...
<commit_before>from __future__ import unicode_literals from django.apps import AppConfig class SiteconfigConfig(AppConfig): name = 'siteconfig' <commit_msg>Disable AliasPlugin since it can accidentally cause problems if an alias is placed within itself<commit_after>
from __future__ import unicode_literals from django.apps import AppConfig from cms.cms_plugins import AliasPlugin from cms.plugin_pool import plugin_pool class SiteconfigConfig(AppConfig): name = 'siteconfig' verbose_name = "Site Configuration" def ready(self): def return_pass(self, r, p): ...
from __future__ import unicode_literals from django.apps import AppConfig class SiteconfigConfig(AppConfig): name = 'siteconfig' Disable AliasPlugin since it can accidentally cause problems if an alias is placed within itselffrom __future__ import unicode_literals from django.apps import AppConfig from cms.cms...
<commit_before>from __future__ import unicode_literals from django.apps import AppConfig class SiteconfigConfig(AppConfig): name = 'siteconfig' <commit_msg>Disable AliasPlugin since it can accidentally cause problems if an alias is placed within itself<commit_after>from __future__ import unicode_literals from ...
f291bb4b5bbf711fa12980fa3a9c8ceb831c6104
frigg/authentication/models.py
frigg/authentication/models.py
# -*- coding: utf8 -*- from django.contrib.auth.models import AbstractUser from django.utils.functional import cached_property from social.apps.django_app.default.models import UserSocialAuth from frigg.helpers import github class User(AbstractUser): @cached_property def github_token(self): try: ...
# -*- coding: utf8 -*- from django.contrib.auth.models import AbstractUser from django.utils.functional import cached_property from social.apps.django_app.default.models import UserSocialAuth from frigg.helpers import github class User(AbstractUser): @cached_property def github_token(self): try: ...
Fix is new check in User.save()
Fix is new check in User.save()
Python
mit
frigg/frigg-hq,frigg/frigg-hq,frigg/frigg-hq
# -*- coding: utf8 -*- from django.contrib.auth.models import AbstractUser from django.utils.functional import cached_property from social.apps.django_app.default.models import UserSocialAuth from frigg.helpers import github class User(AbstractUser): @cached_property def github_token(self): try: ...
# -*- coding: utf8 -*- from django.contrib.auth.models import AbstractUser from django.utils.functional import cached_property from social.apps.django_app.default.models import UserSocialAuth from frigg.helpers import github class User(AbstractUser): @cached_property def github_token(self): try: ...
<commit_before># -*- coding: utf8 -*- from django.contrib.auth.models import AbstractUser from django.utils.functional import cached_property from social.apps.django_app.default.models import UserSocialAuth from frigg.helpers import github class User(AbstractUser): @cached_property def github_token(self): ...
# -*- coding: utf8 -*- from django.contrib.auth.models import AbstractUser from django.utils.functional import cached_property from social.apps.django_app.default.models import UserSocialAuth from frigg.helpers import github class User(AbstractUser): @cached_property def github_token(self): try: ...
# -*- coding: utf8 -*- from django.contrib.auth.models import AbstractUser from django.utils.functional import cached_property from social.apps.django_app.default.models import UserSocialAuth from frigg.helpers import github class User(AbstractUser): @cached_property def github_token(self): try: ...
<commit_before># -*- coding: utf8 -*- from django.contrib.auth.models import AbstractUser from django.utils.functional import cached_property from social.apps.django_app.default.models import UserSocialAuth from frigg.helpers import github class User(AbstractUser): @cached_property def github_token(self): ...
08de7924f56606225e1772320831a02f2ae4aabd
core/AppResources.py
core/AppResources.py
""" AppResources :Authors: Berend Klein Haneveld """ import os from AppVars import AppVars class AppResources(object): """ AppResources is a static class that can be used to find common resources easily. Just provide a name to the imageNamed() method and it will return the correct path. """ @staticmethod d...
""" AppResources :Authors: Berend Klein Haneveld """ import os from AppVars import AppVars from core.elastix.Transformation import Transformation class AppResources(object): """ AppResources is a static class that can be used to find common resources easily. Just provide a name to the imageNamed() method and it...
Add method for getting the default transformations.
Add method for getting the default transformations.
Python
mit
berendkleinhaneveld/Registrationshop,berendkleinhaneveld/Registrationshop
""" AppResources :Authors: Berend Klein Haneveld """ import os from AppVars import AppVars class AppResources(object): """ AppResources is a static class that can be used to find common resources easily. Just provide a name to the imageNamed() method and it will return the correct path. """ @staticmethod d...
""" AppResources :Authors: Berend Klein Haneveld """ import os from AppVars import AppVars from core.elastix.Transformation import Transformation class AppResources(object): """ AppResources is a static class that can be used to find common resources easily. Just provide a name to the imageNamed() method and it...
<commit_before>""" AppResources :Authors: Berend Klein Haneveld """ import os from AppVars import AppVars class AppResources(object): """ AppResources is a static class that can be used to find common resources easily. Just provide a name to the imageNamed() method and it will return the correct path. """ @...
""" AppResources :Authors: Berend Klein Haneveld """ import os from AppVars import AppVars from core.elastix.Transformation import Transformation class AppResources(object): """ AppResources is a static class that can be used to find common resources easily. Just provide a name to the imageNamed() method and it...
""" AppResources :Authors: Berend Klein Haneveld """ import os from AppVars import AppVars class AppResources(object): """ AppResources is a static class that can be used to find common resources easily. Just provide a name to the imageNamed() method and it will return the correct path. """ @staticmethod d...
<commit_before>""" AppResources :Authors: Berend Klein Haneveld """ import os from AppVars import AppVars class AppResources(object): """ AppResources is a static class that can be used to find common resources easily. Just provide a name to the imageNamed() method and it will return the correct path. """ @...
9f39c7740d23b115680c36968407cf110029dbee
Python/item14.py
Python/item14.py
#!/usr/local/bin/python def divide1(x,y): try: return True,x/y except Exception , e: print e return False,None x1=5 y1=0 x2=2 y2=1 success1,result1= divide1(x1,y1) if not success1: print "Error" else: print result1 success2,result2= divide1(x2,y2) if not success2: print "Error" else: print res...
#!/usr/local/bin/python #def divide1(x,y): # try: # return True,x/y # except Exception , e: # print e # return False,None # #x1=5 #y1=0 #x2=2 #y2=1 #success1,result1= divide1(x1,y1) #if not success1: # print "Error" #else: # print result1 # #success2,result2= divide1(x2,y2) #if not success2: # print "Erro...
Add another way to solve the problem.
Add another way to solve the problem.
Python
mit
Vayne-Lover/Effective
#!/usr/local/bin/python def divide1(x,y): try: return True,x/y except Exception , e: print e return False,None x1=5 y1=0 x2=2 y2=1 success1,result1= divide1(x1,y1) if not success1: print "Error" else: print result1 success2,result2= divide1(x2,y2) if not success2: print "Error" else: print res...
#!/usr/local/bin/python #def divide1(x,y): # try: # return True,x/y # except Exception , e: # print e # return False,None # #x1=5 #y1=0 #x2=2 #y2=1 #success1,result1= divide1(x1,y1) #if not success1: # print "Error" #else: # print result1 # #success2,result2= divide1(x2,y2) #if not success2: # print "Erro...
<commit_before>#!/usr/local/bin/python def divide1(x,y): try: return True,x/y except Exception , e: print e return False,None x1=5 y1=0 x2=2 y2=1 success1,result1= divide1(x1,y1) if not success1: print "Error" else: print result1 success2,result2= divide1(x2,y2) if not success2: print "Error" el...
#!/usr/local/bin/python #def divide1(x,y): # try: # return True,x/y # except Exception , e: # print e # return False,None # #x1=5 #y1=0 #x2=2 #y2=1 #success1,result1= divide1(x1,y1) #if not success1: # print "Error" #else: # print result1 # #success2,result2= divide1(x2,y2) #if not success2: # print "Erro...
#!/usr/local/bin/python def divide1(x,y): try: return True,x/y except Exception , e: print e return False,None x1=5 y1=0 x2=2 y2=1 success1,result1= divide1(x1,y1) if not success1: print "Error" else: print result1 success2,result2= divide1(x2,y2) if not success2: print "Error" else: print res...
<commit_before>#!/usr/local/bin/python def divide1(x,y): try: return True,x/y except Exception , e: print e return False,None x1=5 y1=0 x2=2 y2=1 success1,result1= divide1(x1,y1) if not success1: print "Error" else: print result1 success2,result2= divide1(x2,y2) if not success2: print "Error" el...
cf25aeb751fc681907b1684c2675fc6d38b537ed
tests/test_webdriver_chrome.py
tests/test_webdriver_chrome.py
# -*- coding: utf-8 -*- try: import unittest2 as unittest except ImportError: import unittest from splinter import Browser from fake_webapp import EXAMPLE_APP from base import WebDriverTests class ChromeBrowserTest(WebDriverTests, unittest.TestCase): @classmethod def setUpClass(cls): cls.br...
# -*- coding: utf-8 -*- try: import unittest2 as unittest except ImportError: import unittest from splinter import Browser from fake_webapp import EXAMPLE_APP from base import WebDriverTests class ChromeBrowserTest(WebDriverTests, unittest.TestCase): @classmethod def setUpClass(cls): cls.br...
Test for the chrome attach_file disallowance removed
Test for the chrome attach_file disallowance removed
Python
bsd-3-clause
objarni/splinter,underdogio/splinter,bubenkoff/splinter,underdogio/splinter,bmcculley/splinter,lrowe/splinter,bubenkoff/splinter,objarni/splinter,lrowe/splinter,drptbl/splinter,nikolas/splinter,cobrateam/splinter,underdogio/splinter,objarni/splinter,myself659/splinter,bmcculley/splinter,gjvis/splinter,drptbl/splinter,m...
# -*- coding: utf-8 -*- try: import unittest2 as unittest except ImportError: import unittest from splinter import Browser from fake_webapp import EXAMPLE_APP from base import WebDriverTests class ChromeBrowserTest(WebDriverTests, unittest.TestCase): @classmethod def setUpClass(cls): cls.br...
# -*- coding: utf-8 -*- try: import unittest2 as unittest except ImportError: import unittest from splinter import Browser from fake_webapp import EXAMPLE_APP from base import WebDriverTests class ChromeBrowserTest(WebDriverTests, unittest.TestCase): @classmethod def setUpClass(cls): cls.br...
<commit_before># -*- coding: utf-8 -*- try: import unittest2 as unittest except ImportError: import unittest from splinter import Browser from fake_webapp import EXAMPLE_APP from base import WebDriverTests class ChromeBrowserTest(WebDriverTests, unittest.TestCase): @classmethod def setUpClass(cls):...
# -*- coding: utf-8 -*- try: import unittest2 as unittest except ImportError: import unittest from splinter import Browser from fake_webapp import EXAMPLE_APP from base import WebDriverTests class ChromeBrowserTest(WebDriverTests, unittest.TestCase): @classmethod def setUpClass(cls): cls.br...
# -*- coding: utf-8 -*- try: import unittest2 as unittest except ImportError: import unittest from splinter import Browser from fake_webapp import EXAMPLE_APP from base import WebDriverTests class ChromeBrowserTest(WebDriverTests, unittest.TestCase): @classmethod def setUpClass(cls): cls.br...
<commit_before># -*- coding: utf-8 -*- try: import unittest2 as unittest except ImportError: import unittest from splinter import Browser from fake_webapp import EXAMPLE_APP from base import WebDriverTests class ChromeBrowserTest(WebDriverTests, unittest.TestCase): @classmethod def setUpClass(cls):...
ea40d0c1c51fbf0964cd5642b061bf0e3f3dbe71
classifier/utils/misc_utils.py
classifier/utils/misc_utils.py
#!/usr/bin/python3 from tensorflow.examples.tutorials.mnist import input_data import tensorflow as tf import numpy as np DATASET_PATH = 'data/fashion' def load_dataset(): """Loads fashion dataset Returns: Datasets object """ data = input_data.read_data_sets(DATASET_PATH, one_hot=True) r...
#!/usr/bin/python3 from tensorflow.examples.tutorials.mnist import input_data import tensorflow as tf import numpy as np DATASET_PATH = 'data/fashion' def load_dataset(): """Loads fashion dataset Returns: Datasets object """ data = input_data.read_data_sets(DATASET_PATH, one_hot=True) r...
Set default lambda value to 0
Set default lambda value to 0
Python
mit
vianasw/fashion-classifier
#!/usr/bin/python3 from tensorflow.examples.tutorials.mnist import input_data import tensorflow as tf import numpy as np DATASET_PATH = 'data/fashion' def load_dataset(): """Loads fashion dataset Returns: Datasets object """ data = input_data.read_data_sets(DATASET_PATH, one_hot=True) r...
#!/usr/bin/python3 from tensorflow.examples.tutorials.mnist import input_data import tensorflow as tf import numpy as np DATASET_PATH = 'data/fashion' def load_dataset(): """Loads fashion dataset Returns: Datasets object """ data = input_data.read_data_sets(DATASET_PATH, one_hot=True) r...
<commit_before>#!/usr/bin/python3 from tensorflow.examples.tutorials.mnist import input_data import tensorflow as tf import numpy as np DATASET_PATH = 'data/fashion' def load_dataset(): """Loads fashion dataset Returns: Datasets object """ data = input_data.read_data_sets(DATASET_PATH, one_...
#!/usr/bin/python3 from tensorflow.examples.tutorials.mnist import input_data import tensorflow as tf import numpy as np DATASET_PATH = 'data/fashion' def load_dataset(): """Loads fashion dataset Returns: Datasets object """ data = input_data.read_data_sets(DATASET_PATH, one_hot=True) r...
#!/usr/bin/python3 from tensorflow.examples.tutorials.mnist import input_data import tensorflow as tf import numpy as np DATASET_PATH = 'data/fashion' def load_dataset(): """Loads fashion dataset Returns: Datasets object """ data = input_data.read_data_sets(DATASET_PATH, one_hot=True) r...
<commit_before>#!/usr/bin/python3 from tensorflow.examples.tutorials.mnist import input_data import tensorflow as tf import numpy as np DATASET_PATH = 'data/fashion' def load_dataset(): """Loads fashion dataset Returns: Datasets object """ data = input_data.read_data_sets(DATASET_PATH, one_...
3c0d465dde4a93fe60b8b2ce897cb4c5745450ad
pysarus.py
pysarus.py
#!/usr/bin/python3 #Pysarus #A python wrapper for Big Huge Thesarus #Jacob Adams import urllib.request import json #where to save reteived defintions #if None than no files are saved savepath = "." #Your API key for Big Huge Thesarus APIkey = "" def thesarus(word): if(savepath): try: return json.load(savepath...
#!/usr/bin/python3 #Pysarus #A python wrapper for Big Huge Thesarus #Jacob Adams import urllib.request import json #where to save reteived defintions #if None than no files are saved savepath = "." #Your API key for Big Huge Thesarus APIkey = "" def thesarus(word): if(savepath): try: return json.load(savepath...
Use API key in URL
Use API key in URL
Python
mit
Tookmund/Pysarus
#!/usr/bin/python3 #Pysarus #A python wrapper for Big Huge Thesarus #Jacob Adams import urllib.request import json #where to save reteived defintions #if None than no files are saved savepath = "." #Your API key for Big Huge Thesarus APIkey = "" def thesarus(word): if(savepath): try: return json.load(savepath...
#!/usr/bin/python3 #Pysarus #A python wrapper for Big Huge Thesarus #Jacob Adams import urllib.request import json #where to save reteived defintions #if None than no files are saved savepath = "." #Your API key for Big Huge Thesarus APIkey = "" def thesarus(word): if(savepath): try: return json.load(savepath...
<commit_before>#!/usr/bin/python3 #Pysarus #A python wrapper for Big Huge Thesarus #Jacob Adams import urllib.request import json #where to save reteived defintions #if None than no files are saved savepath = "." #Your API key for Big Huge Thesarus APIkey = "" def thesarus(word): if(savepath): try: return jso...
#!/usr/bin/python3 #Pysarus #A python wrapper for Big Huge Thesarus #Jacob Adams import urllib.request import json #where to save reteived defintions #if None than no files are saved savepath = "." #Your API key for Big Huge Thesarus APIkey = "" def thesarus(word): if(savepath): try: return json.load(savepath...
#!/usr/bin/python3 #Pysarus #A python wrapper for Big Huge Thesarus #Jacob Adams import urllib.request import json #where to save reteived defintions #if None than no files are saved savepath = "." #Your API key for Big Huge Thesarus APIkey = "" def thesarus(word): if(savepath): try: return json.load(savepath...
<commit_before>#!/usr/bin/python3 #Pysarus #A python wrapper for Big Huge Thesarus #Jacob Adams import urllib.request import json #where to save reteived defintions #if None than no files are saved savepath = "." #Your API key for Big Huge Thesarus APIkey = "" def thesarus(word): if(savepath): try: return jso...
663f986ff516a401d1ae2c0136a6f6ab4253e9c5
importlib_metadata/__init__.py
importlib_metadata/__init__.py
import os import sys import glob class Distribution: def __init__(self, path): """ Construct a distribution from a path to the metadata dir """ self.path = path @classmethod def for_name(cls, name, path=sys.path): for path_item in path: glob_spec = os.p...
Add initial implementation of a Distribution class
Add initial implementation of a Distribution class
Python
apache-2.0
python/importlib_metadata
Add initial implementation of a Distribution class
import os import sys import glob class Distribution: def __init__(self, path): """ Construct a distribution from a path to the metadata dir """ self.path = path @classmethod def for_name(cls, name, path=sys.path): for path_item in path: glob_spec = os.p...
<commit_before><commit_msg>Add initial implementation of a Distribution class<commit_after>
import os import sys import glob class Distribution: def __init__(self, path): """ Construct a distribution from a path to the metadata dir """ self.path = path @classmethod def for_name(cls, name, path=sys.path): for path_item in path: glob_spec = os.p...
Add initial implementation of a Distribution classimport os import sys import glob class Distribution: def __init__(self, path): """ Construct a distribution from a path to the metadata dir """ self.path = path @classmethod def for_name(cls, name, path=sys.path): f...
<commit_before><commit_msg>Add initial implementation of a Distribution class<commit_after>import os import sys import glob class Distribution: def __init__(self, path): """ Construct a distribution from a path to the metadata dir """ self.path = path @classmethod def for_...
9ad660586832ea780b75e8b3f783fb6fd5cf40c4
csunplugged/utils/errors/Error.py
csunplugged/utils/errors/Error.py
"""Base error used to create custom errors for loaders.""" ERROR_TITLE_TEMPLATE = "****************************ERROR****************************\n" ERROR_FILENAME_TEMPLATE = "File: {filename}\n" ERROR_REFERENCE_TEMPLATE = "Referenced in: {reference}\n" ERROR_SUGGESTIONS_TEMPLATE = """ - Did you spell the name of the...
"""Base error used to create custom errors for loaders.""" ERROR_TITLE_TEMPLATE = "\n****************************ERROR****************************\n" ERROR_FILENAME_TEMPLATE = "File: {filename}\n" ERROR_REFERENCE_TEMPLATE = "Referenced in: {reference}\n" ERROR_SUGGESTIONS_TEMPLATE = """ - Did you spell the name of t...
Add newline before custom error header
Add newline before custom error header
Python
mit
uccser/cs-unplugged,uccser/cs-unplugged,uccser/cs-unplugged,uccser/cs-unplugged
"""Base error used to create custom errors for loaders.""" ERROR_TITLE_TEMPLATE = "****************************ERROR****************************\n" ERROR_FILENAME_TEMPLATE = "File: {filename}\n" ERROR_REFERENCE_TEMPLATE = "Referenced in: {reference}\n" ERROR_SUGGESTIONS_TEMPLATE = """ - Did you spell the name of the...
"""Base error used to create custom errors for loaders.""" ERROR_TITLE_TEMPLATE = "\n****************************ERROR****************************\n" ERROR_FILENAME_TEMPLATE = "File: {filename}\n" ERROR_REFERENCE_TEMPLATE = "Referenced in: {reference}\n" ERROR_SUGGESTIONS_TEMPLATE = """ - Did you spell the name of t...
<commit_before>"""Base error used to create custom errors for loaders.""" ERROR_TITLE_TEMPLATE = "****************************ERROR****************************\n" ERROR_FILENAME_TEMPLATE = "File: {filename}\n" ERROR_REFERENCE_TEMPLATE = "Referenced in: {reference}\n" ERROR_SUGGESTIONS_TEMPLATE = """ - Did you spell ...
"""Base error used to create custom errors for loaders.""" ERROR_TITLE_TEMPLATE = "\n****************************ERROR****************************\n" ERROR_FILENAME_TEMPLATE = "File: {filename}\n" ERROR_REFERENCE_TEMPLATE = "Referenced in: {reference}\n" ERROR_SUGGESTIONS_TEMPLATE = """ - Did you spell the name of t...
"""Base error used to create custom errors for loaders.""" ERROR_TITLE_TEMPLATE = "****************************ERROR****************************\n" ERROR_FILENAME_TEMPLATE = "File: {filename}\n" ERROR_REFERENCE_TEMPLATE = "Referenced in: {reference}\n" ERROR_SUGGESTIONS_TEMPLATE = """ - Did you spell the name of the...
<commit_before>"""Base error used to create custom errors for loaders.""" ERROR_TITLE_TEMPLATE = "****************************ERROR****************************\n" ERROR_FILENAME_TEMPLATE = "File: {filename}\n" ERROR_REFERENCE_TEMPLATE = "Referenced in: {reference}\n" ERROR_SUGGESTIONS_TEMPLATE = """ - Did you spell ...
7e0024878352ba544a8b40d2c8b5741aedf05a70
Code/login_proxy.py
Code/login_proxy.py
# Sarah M. - 2017 import sys import datetime from colors import farben def request(flow): now = datetime.datetime.now() content = flow.request.get_text() host = flow.request.pretty_host method = flow.request.method if method == "POST" and ("pass" in content) or ("password" in content) : wi...
# Sarah M. - 2017 import re import sys import datetime from colors import farben def request(flow): now = datetime.datetime.now() content = flow.request.get_text() host = flow.request.pretty_host method = flow.request.method if method == "POST" and ("pass" in content) or ("password" in content): ...
Add regex for parsing password url parameter
Add regex for parsing password url parameter
Python
apache-2.0
sarah314/SpyPi
# Sarah M. - 2017 import sys import datetime from colors import farben def request(flow): now = datetime.datetime.now() content = flow.request.get_text() host = flow.request.pretty_host method = flow.request.method if method == "POST" and ("pass" in content) or ("password" in content) : wi...
# Sarah M. - 2017 import re import sys import datetime from colors import farben def request(flow): now = datetime.datetime.now() content = flow.request.get_text() host = flow.request.pretty_host method = flow.request.method if method == "POST" and ("pass" in content) or ("password" in content): ...
<commit_before># Sarah M. - 2017 import sys import datetime from colors import farben def request(flow): now = datetime.datetime.now() content = flow.request.get_text() host = flow.request.pretty_host method = flow.request.method if method == "POST" and ("pass" in content) or ("password" in conten...
# Sarah M. - 2017 import re import sys import datetime from colors import farben def request(flow): now = datetime.datetime.now() content = flow.request.get_text() host = flow.request.pretty_host method = flow.request.method if method == "POST" and ("pass" in content) or ("password" in content): ...
# Sarah M. - 2017 import sys import datetime from colors import farben def request(flow): now = datetime.datetime.now() content = flow.request.get_text() host = flow.request.pretty_host method = flow.request.method if method == "POST" and ("pass" in content) or ("password" in content) : wi...
<commit_before># Sarah M. - 2017 import sys import datetime from colors import farben def request(flow): now = datetime.datetime.now() content = flow.request.get_text() host = flow.request.pretty_host method = flow.request.method if method == "POST" and ("pass" in content) or ("password" in conten...
d566444d584f644afc580ff9d3cf8e1adc7ccb30
examples/device/audio_test/src/plot_audio_samples.py
examples/device/audio_test/src/plot_audio_samples.py
import sounddevice as sd import matplotlib.pyplot as plt import numpy as np if __name__ == '__main__': # devList = sd.query_devices() # print(devList) fs = 48000 # Sample rate duration = 100e-3 # Duration of recording device = 'Microphone (MicNode) MME' # MME is needed since ...
import sounddevice as sd import matplotlib.pyplot as plt import numpy as np if __name__ == '__main__': # devList = sd.query_devices() # print(devList) fs = 48000 # Sample rate duration = 100e-3 # Duration of recording device = 'Microphone (MicNode) MME' # MME is needed since ...
Add new line at end of python script
Add new line at end of python script
Python
mit
hathach/tinyusb,hathach/tinyusb,hathach/tinyusb
import sounddevice as sd import matplotlib.pyplot as plt import numpy as np if __name__ == '__main__': # devList = sd.query_devices() # print(devList) fs = 48000 # Sample rate duration = 100e-3 # Duration of recording device = 'Microphone (MicNode) MME' # MME is needed since ...
import sounddevice as sd import matplotlib.pyplot as plt import numpy as np if __name__ == '__main__': # devList = sd.query_devices() # print(devList) fs = 48000 # Sample rate duration = 100e-3 # Duration of recording device = 'Microphone (MicNode) MME' # MME is needed since ...
<commit_before>import sounddevice as sd import matplotlib.pyplot as plt import numpy as np if __name__ == '__main__': # devList = sd.query_devices() # print(devList) fs = 48000 # Sample rate duration = 100e-3 # Duration of recording device = 'Microphone (MicNode) MME' # MME i...
import sounddevice as sd import matplotlib.pyplot as plt import numpy as np if __name__ == '__main__': # devList = sd.query_devices() # print(devList) fs = 48000 # Sample rate duration = 100e-3 # Duration of recording device = 'Microphone (MicNode) MME' # MME is needed since ...
import sounddevice as sd import matplotlib.pyplot as plt import numpy as np if __name__ == '__main__': # devList = sd.query_devices() # print(devList) fs = 48000 # Sample rate duration = 100e-3 # Duration of recording device = 'Microphone (MicNode) MME' # MME is needed since ...
<commit_before>import sounddevice as sd import matplotlib.pyplot as plt import numpy as np if __name__ == '__main__': # devList = sd.query_devices() # print(devList) fs = 48000 # Sample rate duration = 100e-3 # Duration of recording device = 'Microphone (MicNode) MME' # MME i...
3c4eb325424fad2f68cfb9360d417bd531106711
exercises/palindrome-products/palindrome_products.py
exercises/palindrome-products/palindrome_products.py
def largest_palindrome(): pass def smallest_palindrome(): pass
def largest_palindrome(max_factor, min_factor): pass def smallest_palindrome(max_factor, min_factor): pass
Add parameter to exercise placeholder
palindrome-product: Add parameter to exercise placeholder
Python
mit
mweb/python,smalley/python,jmluy/xpython,behrtam/xpython,jmluy/xpython,smalley/python,pheanex/xpython,exercism/xpython,N-Parsons/exercism-python,mweb/python,N-Parsons/exercism-python,behrtam/xpython,exercism/python,exercism/python,pheanex/xpython,exercism/xpython
def largest_palindrome(): pass def smallest_palindrome(): pass palindrome-product: Add parameter to exercise placeholder
def largest_palindrome(max_factor, min_factor): pass def smallest_palindrome(max_factor, min_factor): pass
<commit_before>def largest_palindrome(): pass def smallest_palindrome(): pass <commit_msg>palindrome-product: Add parameter to exercise placeholder<commit_after>
def largest_palindrome(max_factor, min_factor): pass def smallest_palindrome(max_factor, min_factor): pass
def largest_palindrome(): pass def smallest_palindrome(): pass palindrome-product: Add parameter to exercise placeholderdef largest_palindrome(max_factor, min_factor): pass def smallest_palindrome(max_factor, min_factor): pass
<commit_before>def largest_palindrome(): pass def smallest_palindrome(): pass <commit_msg>palindrome-product: Add parameter to exercise placeholder<commit_after>def largest_palindrome(max_factor, min_factor): pass def smallest_palindrome(max_factor, min_factor): pass
f15c623374f6ca955a37a90d3c90bd19fb781f00
dallinger/experiments/__init__.py
dallinger/experiments/__init__.py
"""A home for all Dallinger Experiments. Experiments should be registered with a ``setuptools`` ``entry_point`` for the ``dallinger.experiments`` group. """ import logging from pkg_resources import iter_entry_points from ..experiment import Experiment logger = logging.getLogger(__name__) logger.addHandler(logging.Null...
"""A home for all Dallinger Experiments. Experiments should be registered with a ``setuptools`` ``entry_point`` for the ``dallinger.experiments`` group. """ import logging from pkg_resources import iter_entry_points from ..config import get_config from ..experiment import Experiment config = get_config() config.load(...
Load config when loading dallinger.experiments
Load config when loading dallinger.experiments
Python
mit
Dallinger/Dallinger,Dallinger/Dallinger,Dallinger/Dallinger,jcpeterson/Dallinger,Dallinger/Dallinger,jcpeterson/Dallinger,Dallinger/Dallinger,jcpeterson/Dallinger,jcpeterson/Dallinger,jcpeterson/Dallinger
"""A home for all Dallinger Experiments. Experiments should be registered with a ``setuptools`` ``entry_point`` for the ``dallinger.experiments`` group. """ import logging from pkg_resources import iter_entry_points from ..experiment import Experiment logger = logging.getLogger(__name__) logger.addHandler(logging.Null...
"""A home for all Dallinger Experiments. Experiments should be registered with a ``setuptools`` ``entry_point`` for the ``dallinger.experiments`` group. """ import logging from pkg_resources import iter_entry_points from ..config import get_config from ..experiment import Experiment config = get_config() config.load(...
<commit_before>"""A home for all Dallinger Experiments. Experiments should be registered with a ``setuptools`` ``entry_point`` for the ``dallinger.experiments`` group. """ import logging from pkg_resources import iter_entry_points from ..experiment import Experiment logger = logging.getLogger(__name__) logger.addHandl...
"""A home for all Dallinger Experiments. Experiments should be registered with a ``setuptools`` ``entry_point`` for the ``dallinger.experiments`` group. """ import logging from pkg_resources import iter_entry_points from ..config import get_config from ..experiment import Experiment config = get_config() config.load(...
"""A home for all Dallinger Experiments. Experiments should be registered with a ``setuptools`` ``entry_point`` for the ``dallinger.experiments`` group. """ import logging from pkg_resources import iter_entry_points from ..experiment import Experiment logger = logging.getLogger(__name__) logger.addHandler(logging.Null...
<commit_before>"""A home for all Dallinger Experiments. Experiments should be registered with a ``setuptools`` ``entry_point`` for the ``dallinger.experiments`` group. """ import logging from pkg_resources import iter_entry_points from ..experiment import Experiment logger = logging.getLogger(__name__) logger.addHandl...
424aa401806ddf536b9bc75efb1493561a5c2a5b
product/views.py
product/views.py
from django.views.generic import DetailView, ListView from django.views.generic.edit import CreateView, UpdateView, DeleteView from django.urls import reverse_lazy from django.shortcuts import render from django.contrib.messages.views import SuccessMessageMixin from product.models import ProductCategory # Create your ...
from django.http import HttpResponseRedirect from django.views.generic import DetailView, ListView from django.views.generic.edit import CreateView, UpdateView, DeleteView from django.urls import reverse_lazy from django.shortcuts import render from django.contrib import messages from django.contrib.messages.views impo...
Make messages show in delete view.
Make messages show in delete view.
Python
mit
borderitsolutions/amadaa,borderitsolutions/amadaa,borderitsolutions/amadaa
from django.views.generic import DetailView, ListView from django.views.generic.edit import CreateView, UpdateView, DeleteView from django.urls import reverse_lazy from django.shortcuts import render from django.contrib.messages.views import SuccessMessageMixin from product.models import ProductCategory # Create your ...
from django.http import HttpResponseRedirect from django.views.generic import DetailView, ListView from django.views.generic.edit import CreateView, UpdateView, DeleteView from django.urls import reverse_lazy from django.shortcuts import render from django.contrib import messages from django.contrib.messages.views impo...
<commit_before>from django.views.generic import DetailView, ListView from django.views.generic.edit import CreateView, UpdateView, DeleteView from django.urls import reverse_lazy from django.shortcuts import render from django.contrib.messages.views import SuccessMessageMixin from product.models import ProductCategory ...
from django.http import HttpResponseRedirect from django.views.generic import DetailView, ListView from django.views.generic.edit import CreateView, UpdateView, DeleteView from django.urls import reverse_lazy from django.shortcuts import render from django.contrib import messages from django.contrib.messages.views impo...
from django.views.generic import DetailView, ListView from django.views.generic.edit import CreateView, UpdateView, DeleteView from django.urls import reverse_lazy from django.shortcuts import render from django.contrib.messages.views import SuccessMessageMixin from product.models import ProductCategory # Create your ...
<commit_before>from django.views.generic import DetailView, ListView from django.views.generic.edit import CreateView, UpdateView, DeleteView from django.urls import reverse_lazy from django.shortcuts import render from django.contrib.messages.views import SuccessMessageMixin from product.models import ProductCategory ...
a5926a3ef469c4b323f994dd026b55cac7fa1b2f
turbustat/tests/test_dendro.py
turbustat/tests/test_dendro.py
# Licensed under an MIT open source license - see LICENSE ''' Tests for Dendrogram statistics ''' from unittest import TestCase import numpy as np import numpy.testing as npt from ..statistics import Dendrogram_Stats, DendroDistance from ._testing_data import \ dataset1, dataset2, computed_data, computed_dista...
# Licensed under an MIT open source license - see LICENSE ''' Tests for Dendrogram statistics ''' import numpy as np import numpy.testing as npt from ..statistics import Dendrogram_Stats, DendroDistance from ._testing_data import \ dataset1, dataset2, computed_data, computed_distances min_deltas = np.logspace...
Update dendro tests and specify no periodic boundaries to be consistent w/ previous unit testing
Update dendro tests and specify no periodic boundaries to be consistent w/ previous unit testing
Python
mit
Astroua/TurbuStat,e-koch/TurbuStat
# Licensed under an MIT open source license - see LICENSE ''' Tests for Dendrogram statistics ''' from unittest import TestCase import numpy as np import numpy.testing as npt from ..statistics import Dendrogram_Stats, DendroDistance from ._testing_data import \ dataset1, dataset2, computed_data, computed_dista...
# Licensed under an MIT open source license - see LICENSE ''' Tests for Dendrogram statistics ''' import numpy as np import numpy.testing as npt from ..statistics import Dendrogram_Stats, DendroDistance from ._testing_data import \ dataset1, dataset2, computed_data, computed_distances min_deltas = np.logspace...
<commit_before># Licensed under an MIT open source license - see LICENSE ''' Tests for Dendrogram statistics ''' from unittest import TestCase import numpy as np import numpy.testing as npt from ..statistics import Dendrogram_Stats, DendroDistance from ._testing_data import \ dataset1, dataset2, computed_data,...
# Licensed under an MIT open source license - see LICENSE ''' Tests for Dendrogram statistics ''' import numpy as np import numpy.testing as npt from ..statistics import Dendrogram_Stats, DendroDistance from ._testing_data import \ dataset1, dataset2, computed_data, computed_distances min_deltas = np.logspace...
# Licensed under an MIT open source license - see LICENSE ''' Tests for Dendrogram statistics ''' from unittest import TestCase import numpy as np import numpy.testing as npt from ..statistics import Dendrogram_Stats, DendroDistance from ._testing_data import \ dataset1, dataset2, computed_data, computed_dista...
<commit_before># Licensed under an MIT open source license - see LICENSE ''' Tests for Dendrogram statistics ''' from unittest import TestCase import numpy as np import numpy.testing as npt from ..statistics import Dendrogram_Stats, DendroDistance from ._testing_data import \ dataset1, dataset2, computed_data,...
04069a5d5d6f5647394aba987ae5798629bf4a73
Ghidra/Features/Python/ghidra_scripts/ImportSymbolsScript.py
Ghidra/Features/Python/ghidra_scripts/ImportSymbolsScript.py
#Imports a file with lines in the form "symbolName 0xADDRESS" #@category Data #@author f = askFile("Give me a file to open", "Go baby go!") for line in file(f.absolutePath): # note, cannot use open(), since that is in GhidraScript pieces = line.split() address = toAddr(long(pieces[1], 16)) print "creat...
# Imports a file with lines in the form "symbolName 0xADDRESS function_or_label" where "f" indicates a function and "l" a label # @author unkown; edited by matedealer <git@matedealer.de> # @category Data # from ghidra.program.model.symbol.SourceType import * import string functionManager = currentProgram.getFunctionM...
Add optional 3 option to ImportSymbolScript.py to allow importing function names.
Add optional 3 option to ImportSymbolScript.py to allow importing function names. Add python script to import functions and labels Use print() instead of print Merge ImportSymbolsScript.py and ImportFunctionAndLabels.py Made third token optional
Python
apache-2.0
NationalSecurityAgency/ghidra,NationalSecurityAgency/ghidra,NationalSecurityAgency/ghidra,NationalSecurityAgency/ghidra,NationalSecurityAgency/ghidra,NationalSecurityAgency/ghidra,NationalSecurityAgency/ghidra
#Imports a file with lines in the form "symbolName 0xADDRESS" #@category Data #@author f = askFile("Give me a file to open", "Go baby go!") for line in file(f.absolutePath): # note, cannot use open(), since that is in GhidraScript pieces = line.split() address = toAddr(long(pieces[1], 16)) print "creat...
# Imports a file with lines in the form "symbolName 0xADDRESS function_or_label" where "f" indicates a function and "l" a label # @author unkown; edited by matedealer <git@matedealer.de> # @category Data # from ghidra.program.model.symbol.SourceType import * import string functionManager = currentProgram.getFunctionM...
<commit_before>#Imports a file with lines in the form "symbolName 0xADDRESS" #@category Data #@author f = askFile("Give me a file to open", "Go baby go!") for line in file(f.absolutePath): # note, cannot use open(), since that is in GhidraScript pieces = line.split() address = toAddr(long(pieces[1], 16)) ...
# Imports a file with lines in the form "symbolName 0xADDRESS function_or_label" where "f" indicates a function and "l" a label # @author unkown; edited by matedealer <git@matedealer.de> # @category Data # from ghidra.program.model.symbol.SourceType import * import string functionManager = currentProgram.getFunctionM...
#Imports a file with lines in the form "symbolName 0xADDRESS" #@category Data #@author f = askFile("Give me a file to open", "Go baby go!") for line in file(f.absolutePath): # note, cannot use open(), since that is in GhidraScript pieces = line.split() address = toAddr(long(pieces[1], 16)) print "creat...
<commit_before>#Imports a file with lines in the form "symbolName 0xADDRESS" #@category Data #@author f = askFile("Give me a file to open", "Go baby go!") for line in file(f.absolutePath): # note, cannot use open(), since that is in GhidraScript pieces = line.split() address = toAddr(long(pieces[1], 16)) ...
f844f9e153406577b844a864110bcc54fd6b01f3
nose2/tests/functional/support/scenario/expected_failures/expected_failures.py
nose2/tests/functional/support/scenario/expected_failures/expected_failures.py
import unittest class TestWithExpectedFailures(unittest.TestCase): @unittest.expectedFailure def test_should_fail(self): assert False @unittest.expectedFailure def test_should_pass(self): assert True def test_whatever(self): assert True def test_fails(sel...
from nose2.compat import unittest class TestWithExpectedFailures(unittest.TestCase): @unittest.expectedFailure def test_should_fail(self): assert False @unittest.expectedFailure def test_should_pass(self): assert True def test_whatever(self): assert True ...
Fix for py26 and expectedFailure
Fix for py26 and expectedFailure
Python
bsd-2-clause
ojengwa/nose2,little-dude/nose2,ptthiem/nose2,ezigman/nose2,ptthiem/nose2,ezigman/nose2,little-dude/nose2,ojengwa/nose2
import unittest class TestWithExpectedFailures(unittest.TestCase): @unittest.expectedFailure def test_should_fail(self): assert False @unittest.expectedFailure def test_should_pass(self): assert True def test_whatever(self): assert True def test_fails(sel...
from nose2.compat import unittest class TestWithExpectedFailures(unittest.TestCase): @unittest.expectedFailure def test_should_fail(self): assert False @unittest.expectedFailure def test_should_pass(self): assert True def test_whatever(self): assert True ...
<commit_before>import unittest class TestWithExpectedFailures(unittest.TestCase): @unittest.expectedFailure def test_should_fail(self): assert False @unittest.expectedFailure def test_should_pass(self): assert True def test_whatever(self): assert True def...
from nose2.compat import unittest class TestWithExpectedFailures(unittest.TestCase): @unittest.expectedFailure def test_should_fail(self): assert False @unittest.expectedFailure def test_should_pass(self): assert True def test_whatever(self): assert True ...
import unittest class TestWithExpectedFailures(unittest.TestCase): @unittest.expectedFailure def test_should_fail(self): assert False @unittest.expectedFailure def test_should_pass(self): assert True def test_whatever(self): assert True def test_fails(sel...
<commit_before>import unittest class TestWithExpectedFailures(unittest.TestCase): @unittest.expectedFailure def test_should_fail(self): assert False @unittest.expectedFailure def test_should_pass(self): assert True def test_whatever(self): assert True def...
d57a974acfd9054dafca692404f217788da22f01
allauth/socialaccount/providers/gitlab/provider.py
allauth/socialaccount/providers/gitlab/provider.py
# -*- coding: utf-8 -*- from allauth.socialaccount.providers.base import ProviderAccount from allauth.socialaccount.providers.oauth2.provider import OAuth2Provider class GitLabAccount(ProviderAccount): def get_profile_url(self): return self.account.extra_data.get('html_url') def get_avatar_url(self)...
# -*- coding: utf-8 -*- from allauth.socialaccount.providers.base import ProviderAccount from allauth.socialaccount.providers.oauth2.provider import OAuth2Provider class GitLabAccount(ProviderAccount): def get_profile_url(self): return self.account.extra_data.get('web_url') def get_avatar_url(self):...
Fix GitLab profile_url (html_url -> web_url)
Fix GitLab profile_url (html_url -> web_url)
Python
mit
spool/django-allauth,pztrick/django-allauth,bittner/django-allauth,pztrick/django-allauth,joshowen/django-allauth,pztrick/django-allauth,rsalmaso/django-allauth,bittner/django-allauth,rsalmaso/django-allauth,pennersr/django-allauth,bittner/django-allauth,AltSchool/django-allauth,lukeburden/django-allauth,lukeburden/dja...
# -*- coding: utf-8 -*- from allauth.socialaccount.providers.base import ProviderAccount from allauth.socialaccount.providers.oauth2.provider import OAuth2Provider class GitLabAccount(ProviderAccount): def get_profile_url(self): return self.account.extra_data.get('html_url') def get_avatar_url(self)...
# -*- coding: utf-8 -*- from allauth.socialaccount.providers.base import ProviderAccount from allauth.socialaccount.providers.oauth2.provider import OAuth2Provider class GitLabAccount(ProviderAccount): def get_profile_url(self): return self.account.extra_data.get('web_url') def get_avatar_url(self):...
<commit_before># -*- coding: utf-8 -*- from allauth.socialaccount.providers.base import ProviderAccount from allauth.socialaccount.providers.oauth2.provider import OAuth2Provider class GitLabAccount(ProviderAccount): def get_profile_url(self): return self.account.extra_data.get('html_url') def get_a...
# -*- coding: utf-8 -*- from allauth.socialaccount.providers.base import ProviderAccount from allauth.socialaccount.providers.oauth2.provider import OAuth2Provider class GitLabAccount(ProviderAccount): def get_profile_url(self): return self.account.extra_data.get('web_url') def get_avatar_url(self):...
# -*- coding: utf-8 -*- from allauth.socialaccount.providers.base import ProviderAccount from allauth.socialaccount.providers.oauth2.provider import OAuth2Provider class GitLabAccount(ProviderAccount): def get_profile_url(self): return self.account.extra_data.get('html_url') def get_avatar_url(self)...
<commit_before># -*- coding: utf-8 -*- from allauth.socialaccount.providers.base import ProviderAccount from allauth.socialaccount.providers.oauth2.provider import OAuth2Provider class GitLabAccount(ProviderAccount): def get_profile_url(self): return self.account.extra_data.get('html_url') def get_a...
8fd968028492f113a91358b87ee045f3f2b5d38b
core/templatetags/bootstrap.py
core/templatetags/bootstrap.py
# -*- coding: utf-8 -*- from django import template from django.utils.safestring import mark_safe register = template.Library() @register.filter() def bool_icon(value): """ Create a safe HTML version of True/False using Bootstrap styles. :param value: a boolean. :returns: a string of html for an icon...
# -*- coding: utf-8 -*- from django import template from django.utils.safestring import mark_safe register = template.Library() @register.filter() def bool_icon(value): """ Create a safe HTML version of True/False using Bootstrap styles. :param value: a boolean. :returns: a string of html for an icon...
Update existing test for icon class changes
Update existing test for icon class changes
Python
bsd-2-clause
cdubz/babybuddy,cdubz/babybuddy,cdubz/babybuddy
# -*- coding: utf-8 -*- from django import template from django.utils.safestring import mark_safe register = template.Library() @register.filter() def bool_icon(value): """ Create a safe HTML version of True/False using Bootstrap styles. :param value: a boolean. :returns: a string of html for an icon...
# -*- coding: utf-8 -*- from django import template from django.utils.safestring import mark_safe register = template.Library() @register.filter() def bool_icon(value): """ Create a safe HTML version of True/False using Bootstrap styles. :param value: a boolean. :returns: a string of html for an icon...
<commit_before># -*- coding: utf-8 -*- from django import template from django.utils.safestring import mark_safe register = template.Library() @register.filter() def bool_icon(value): """ Create a safe HTML version of True/False using Bootstrap styles. :param value: a boolean. :returns: a string of h...
# -*- coding: utf-8 -*- from django import template from django.utils.safestring import mark_safe register = template.Library() @register.filter() def bool_icon(value): """ Create a safe HTML version of True/False using Bootstrap styles. :param value: a boolean. :returns: a string of html for an icon...
# -*- coding: utf-8 -*- from django import template from django.utils.safestring import mark_safe register = template.Library() @register.filter() def bool_icon(value): """ Create a safe HTML version of True/False using Bootstrap styles. :param value: a boolean. :returns: a string of html for an icon...
<commit_before># -*- coding: utf-8 -*- from django import template from django.utils.safestring import mark_safe register = template.Library() @register.filter() def bool_icon(value): """ Create a safe HTML version of True/False using Bootstrap styles. :param value: a boolean. :returns: a string of h...
69f1f5f78477e6c89338661e71ecd9732a287673
datafilters/views.py
datafilters/views.py
from django.views.generic.list import MultipleObjectMixin __all__ = ('FilterFormMixin',) class FilterFormMixin(MultipleObjectMixin): """ Mixin that adds filtering behaviour for Class Based Views. Changed in a way that can play nicely with other CBV simply by overriding the get_queryset(self) and get_...
from django.views.generic.list import MultipleObjectMixin __all__ = ('FilterFormMixin',) class FilterFormMixin(MultipleObjectMixin): """ Mixin that adds filtering behaviour for Class Based Views. Changed in a way that can play nicely with other CBV simply by overriding the get_queryset(self) and get_...
Make context name for a filter form configurable
Make context name for a filter form configurable
Python
mit
zorainc/django-datafilters,freevoid/django-datafilters,zorainc/django-datafilters
from django.views.generic.list import MultipleObjectMixin __all__ = ('FilterFormMixin',) class FilterFormMixin(MultipleObjectMixin): """ Mixin that adds filtering behaviour for Class Based Views. Changed in a way that can play nicely with other CBV simply by overriding the get_queryset(self) and get_...
from django.views.generic.list import MultipleObjectMixin __all__ = ('FilterFormMixin',) class FilterFormMixin(MultipleObjectMixin): """ Mixin that adds filtering behaviour for Class Based Views. Changed in a way that can play nicely with other CBV simply by overriding the get_queryset(self) and get_...
<commit_before>from django.views.generic.list import MultipleObjectMixin __all__ = ('FilterFormMixin',) class FilterFormMixin(MultipleObjectMixin): """ Mixin that adds filtering behaviour for Class Based Views. Changed in a way that can play nicely with other CBV simply by overriding the get_queryset(sel...
from django.views.generic.list import MultipleObjectMixin __all__ = ('FilterFormMixin',) class FilterFormMixin(MultipleObjectMixin): """ Mixin that adds filtering behaviour for Class Based Views. Changed in a way that can play nicely with other CBV simply by overriding the get_queryset(self) and get_...
from django.views.generic.list import MultipleObjectMixin __all__ = ('FilterFormMixin',) class FilterFormMixin(MultipleObjectMixin): """ Mixin that adds filtering behaviour for Class Based Views. Changed in a way that can play nicely with other CBV simply by overriding the get_queryset(self) and get_...
<commit_before>from django.views.generic.list import MultipleObjectMixin __all__ = ('FilterFormMixin',) class FilterFormMixin(MultipleObjectMixin): """ Mixin that adds filtering behaviour for Class Based Views. Changed in a way that can play nicely with other CBV simply by overriding the get_queryset(sel...
c95d6e0f215cb81a00a0af869595bb6e89e887e7
test/lib/01-con-discon-success.py
test/lib/01-con-discon-success.py
#!/usr/bin/python # Test whether a client produces a correct connect and subsequent disconnect. import os import subprocess import socket import sys import time from struct import * rc = 1 keepalive = 60 connect_packet = pack('!BBH6sBBHH21s', 16, 12+2+21,6,"MQIsdp",3,2,keepalive,21,"01-con-discon-success") connack_p...
#!/usr/bin/python # Test whether a client produces a correct connect and subsequent disconnect. import os import subprocess import socket import sys import time from struct import * rc = 1 keepalive = 60 connect_packet = pack('!BBH6sBBHH21s', 16, 12+2+21,6,"MQIsdp",3,2,keepalive,21,"01-con-discon-success") connack_p...
Set SO_REUSEADDR in client test.
Set SO_REUSEADDR in client test.
Python
bsd-3-clause
zlargon/mosquitto,zlargon/mosquitto,zlargon/mosquitto,zlargon/mosquitto,zlargon/mosquitto
#!/usr/bin/python # Test whether a client produces a correct connect and subsequent disconnect. import os import subprocess import socket import sys import time from struct import * rc = 1 keepalive = 60 connect_packet = pack('!BBH6sBBHH21s', 16, 12+2+21,6,"MQIsdp",3,2,keepalive,21,"01-con-discon-success") connack_p...
#!/usr/bin/python # Test whether a client produces a correct connect and subsequent disconnect. import os import subprocess import socket import sys import time from struct import * rc = 1 keepalive = 60 connect_packet = pack('!BBH6sBBHH21s', 16, 12+2+21,6,"MQIsdp",3,2,keepalive,21,"01-con-discon-success") connack_p...
<commit_before>#!/usr/bin/python # Test whether a client produces a correct connect and subsequent disconnect. import os import subprocess import socket import sys import time from struct import * rc = 1 keepalive = 60 connect_packet = pack('!BBH6sBBHH21s', 16, 12+2+21,6,"MQIsdp",3,2,keepalive,21,"01-con-discon-succ...
#!/usr/bin/python # Test whether a client produces a correct connect and subsequent disconnect. import os import subprocess import socket import sys import time from struct import * rc = 1 keepalive = 60 connect_packet = pack('!BBH6sBBHH21s', 16, 12+2+21,6,"MQIsdp",3,2,keepalive,21,"01-con-discon-success") connack_p...
#!/usr/bin/python # Test whether a client produces a correct connect and subsequent disconnect. import os import subprocess import socket import sys import time from struct import * rc = 1 keepalive = 60 connect_packet = pack('!BBH6sBBHH21s', 16, 12+2+21,6,"MQIsdp",3,2,keepalive,21,"01-con-discon-success") connack_p...
<commit_before>#!/usr/bin/python # Test whether a client produces a correct connect and subsequent disconnect. import os import subprocess import socket import sys import time from struct import * rc = 1 keepalive = 60 connect_packet = pack('!BBH6sBBHH21s', 16, 12+2+21,6,"MQIsdp",3,2,keepalive,21,"01-con-discon-succ...
313a81093527c88631713f6b4ad8c652554edb50
l10n_br_base/migrations/12.0.1.0.0/post-migration.py
l10n_br_base/migrations/12.0.1.0.0/post-migration.py
# -*- coding: utf-8 -*- # Copyright 2018 KMEE INFORMATICA LTDA - Gabriel Cardoso de Faria # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html). from openupgradelib import openupgrade @openupgrade.migrate() def migrate(env, version): cr = env.cr cr.execute( '''INSERT INTO res_city(id, n...
# -*- coding: utf-8 -*- # Copyright 2018 KMEE INFORMATICA LTDA - Gabriel Cardoso de Faria # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html). from openupgradelib import openupgrade _model_renames = [ ('l10n_br_base.city', 'res.city'), ] _table_renames = [ ('l10n_br_base_city', 'res_city'), ...
Rename table _model_renames and _table_renames
[ADD] Rename table _model_renames and _table_renames Signed-off-by: Luis Felipe Mileo <c9a5b4d335634d99740001a1172b3e56e4fc5aa8@kmee.com.br>
Python
agpl-3.0
akretion/l10n-brazil,OCA/l10n-brazil,OCA/l10n-brazil,OCA/l10n-brazil,akretion/l10n-brazil,akretion/l10n-brazil
# -*- coding: utf-8 -*- # Copyright 2018 KMEE INFORMATICA LTDA - Gabriel Cardoso de Faria # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html). from openupgradelib import openupgrade @openupgrade.migrate() def migrate(env, version): cr = env.cr cr.execute( '''INSERT INTO res_city(id, n...
# -*- coding: utf-8 -*- # Copyright 2018 KMEE INFORMATICA LTDA - Gabriel Cardoso de Faria # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html). from openupgradelib import openupgrade _model_renames = [ ('l10n_br_base.city', 'res.city'), ] _table_renames = [ ('l10n_br_base_city', 'res_city'), ...
<commit_before># -*- coding: utf-8 -*- # Copyright 2018 KMEE INFORMATICA LTDA - Gabriel Cardoso de Faria # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html). from openupgradelib import openupgrade @openupgrade.migrate() def migrate(env, version): cr = env.cr cr.execute( '''INSERT INTO...
# -*- coding: utf-8 -*- # Copyright 2018 KMEE INFORMATICA LTDA - Gabriel Cardoso de Faria # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html). from openupgradelib import openupgrade _model_renames = [ ('l10n_br_base.city', 'res.city'), ] _table_renames = [ ('l10n_br_base_city', 'res_city'), ...
# -*- coding: utf-8 -*- # Copyright 2018 KMEE INFORMATICA LTDA - Gabriel Cardoso de Faria # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html). from openupgradelib import openupgrade @openupgrade.migrate() def migrate(env, version): cr = env.cr cr.execute( '''INSERT INTO res_city(id, n...
<commit_before># -*- coding: utf-8 -*- # Copyright 2018 KMEE INFORMATICA LTDA - Gabriel Cardoso de Faria # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html). from openupgradelib import openupgrade @openupgrade.migrate() def migrate(env, version): cr = env.cr cr.execute( '''INSERT INTO...
c38e9c886bf10f18db7ab182b231ef7a6fe53b8e
binder/jupyter_notebook_config.py
binder/jupyter_notebook_config.py
c.ServerProxy.servers = { 'lab-dev': { 'command': [ 'jupyter', 'lab', '--debug', '--no-browser', '--port={port}', '--NotebookApp.token=""', '--NotebookApp.base_url={base_url}lab-dev', ], 'absolute_url': True ...
c.ServerProxy.servers = { 'lab-dev': { 'command': [ 'jupyter', 'lab', '--debug', '--no-browser', '--port={port}', '--NotebookApp.token=""', '--NotebookApp.base_url={base_url}lab-dev', # Disable dns rebinding prot...
Disable dns rebinding protection for dev mode notebook
Disable dns rebinding protection for dev mode notebook
Python
bsd-3-clause
jupyter/jupyterlab,jupyter/jupyterlab,jupyter/jupyterlab,jupyter/jupyterlab,jupyter/jupyterlab
c.ServerProxy.servers = { 'lab-dev': { 'command': [ 'jupyter', 'lab', '--debug', '--no-browser', '--port={port}', '--NotebookApp.token=""', '--NotebookApp.base_url={base_url}lab-dev', ], 'absolute_url': True ...
c.ServerProxy.servers = { 'lab-dev': { 'command': [ 'jupyter', 'lab', '--debug', '--no-browser', '--port={port}', '--NotebookApp.token=""', '--NotebookApp.base_url={base_url}lab-dev', # Disable dns rebinding prot...
<commit_before>c.ServerProxy.servers = { 'lab-dev': { 'command': [ 'jupyter', 'lab', '--debug', '--no-browser', '--port={port}', '--NotebookApp.token=""', '--NotebookApp.base_url={base_url}lab-dev', ], 'absol...
c.ServerProxy.servers = { 'lab-dev': { 'command': [ 'jupyter', 'lab', '--debug', '--no-browser', '--port={port}', '--NotebookApp.token=""', '--NotebookApp.base_url={base_url}lab-dev', # Disable dns rebinding prot...
c.ServerProxy.servers = { 'lab-dev': { 'command': [ 'jupyter', 'lab', '--debug', '--no-browser', '--port={port}', '--NotebookApp.token=""', '--NotebookApp.base_url={base_url}lab-dev', ], 'absolute_url': True ...
<commit_before>c.ServerProxy.servers = { 'lab-dev': { 'command': [ 'jupyter', 'lab', '--debug', '--no-browser', '--port={port}', '--NotebookApp.token=""', '--NotebookApp.base_url={base_url}lab-dev', ], 'absol...
be3ee0a06ec350431e66efbcbcead28075056f55
django_extensions/tests/models.py
django_extensions/tests/models.py
from django.db import models try: from django_extensions.db.fields.encrypted import EncryptedTextField, EncryptedCharField except ImportError: class EncryptedCharField(): def __init__(self, **kwargs): pass; class EncryptedTextField(): def __init__(self, **kwargs): ...
from django.db import models try: from django_extensions.db.fields.encrypted import EncryptedTextField, EncryptedCharField except ImportError: class EncryptedCharField(): def __init__(self, **kwargs): pass class EncryptedTextField(): def __init__(self, **kwargs): ...
Remove bogus semicolons, thanks justinlilly
Remove bogus semicolons, thanks justinlilly
Python
mit
django-extensions/django-extensions,levic/django-extensions,linuxmaniac/django-extensions,kevgathuku/django-extensions,ewjoachim/django-extensions,joeyespo/django-extensions,Christophe31/django-extensions,Moulde/django-extensions,nikolas/django-extensions,barseghyanartur/django-extensions,atchariya/django-extensions,fr...
from django.db import models try: from django_extensions.db.fields.encrypted import EncryptedTextField, EncryptedCharField except ImportError: class EncryptedCharField(): def __init__(self, **kwargs): pass; class EncryptedTextField(): def __init__(self, **kwargs): ...
from django.db import models try: from django_extensions.db.fields.encrypted import EncryptedTextField, EncryptedCharField except ImportError: class EncryptedCharField(): def __init__(self, **kwargs): pass class EncryptedTextField(): def __init__(self, **kwargs): ...
<commit_before>from django.db import models try: from django_extensions.db.fields.encrypted import EncryptedTextField, EncryptedCharField except ImportError: class EncryptedCharField(): def __init__(self, **kwargs): pass; class EncryptedTextField(): def __init__(self, **kwa...
from django.db import models try: from django_extensions.db.fields.encrypted import EncryptedTextField, EncryptedCharField except ImportError: class EncryptedCharField(): def __init__(self, **kwargs): pass class EncryptedTextField(): def __init__(self, **kwargs): ...
from django.db import models try: from django_extensions.db.fields.encrypted import EncryptedTextField, EncryptedCharField except ImportError: class EncryptedCharField(): def __init__(self, **kwargs): pass; class EncryptedTextField(): def __init__(self, **kwargs): ...
<commit_before>from django.db import models try: from django_extensions.db.fields.encrypted import EncryptedTextField, EncryptedCharField except ImportError: class EncryptedCharField(): def __init__(self, **kwargs): pass; class EncryptedTextField(): def __init__(self, **kwa...
fb99c40fa0dcf59aaaf45a14b238a240a453bcaa
climlab/__init__.py
climlab/__init__.py
__version__ = '0.2.4' # This list defines all the modules that will be loaded if a user invokes # from climLab import * # totally out of date! #__all__ = ["constants", "thermo", "orbital_table", # "long_orbital_table", "insolation", "ebm", # "column", "convadj"] #from climlab import radiation...
__version__ = '0.2.5' # This list defines all the modules that will be loaded if a user invokes # from climLab import * # totally out of date! #__all__ = ["constants", "thermo", "orbital_table", # "long_orbital_table", "insolation", "ebm", # "column", "convadj"] #from climlab import radiation...
Increment version number to 0.2.5
Increment version number to 0.2.5
Python
mit
brian-rose/climlab,cjcardinale/climlab,cjcardinale/climlab,brian-rose/climlab,cjcardinale/climlab
__version__ = '0.2.4' # This list defines all the modules that will be loaded if a user invokes # from climLab import * # totally out of date! #__all__ = ["constants", "thermo", "orbital_table", # "long_orbital_table", "insolation", "ebm", # "column", "convadj"] #from climlab import radiation...
__version__ = '0.2.5' # This list defines all the modules that will be loaded if a user invokes # from climLab import * # totally out of date! #__all__ = ["constants", "thermo", "orbital_table", # "long_orbital_table", "insolation", "ebm", # "column", "convadj"] #from climlab import radiation...
<commit_before>__version__ = '0.2.4' # This list defines all the modules that will be loaded if a user invokes # from climLab import * # totally out of date! #__all__ = ["constants", "thermo", "orbital_table", # "long_orbital_table", "insolation", "ebm", # "column", "convadj"] #from climlab i...
__version__ = '0.2.5' # This list defines all the modules that will be loaded if a user invokes # from climLab import * # totally out of date! #__all__ = ["constants", "thermo", "orbital_table", # "long_orbital_table", "insolation", "ebm", # "column", "convadj"] #from climlab import radiation...
__version__ = '0.2.4' # This list defines all the modules that will be loaded if a user invokes # from climLab import * # totally out of date! #__all__ = ["constants", "thermo", "orbital_table", # "long_orbital_table", "insolation", "ebm", # "column", "convadj"] #from climlab import radiation...
<commit_before>__version__ = '0.2.4' # This list defines all the modules that will be loaded if a user invokes # from climLab import * # totally out of date! #__all__ = ["constants", "thermo", "orbital_table", # "long_orbital_table", "insolation", "ebm", # "column", "convadj"] #from climlab i...
ec33927709b1d9ce484e6f243068a334de389aa1
example/app/models.py
example/app/models.py
# Define a custom User class to work with django-social-auth from django.db import models class CustomUserManager(models.Manager): def create_user(self, username, email): return self.model._default_manager.create(username=username) class CustomUser(models.Model): username = models.CharField(max_leng...
# Define a custom User class to work with django-social-auth from django.db import models class CustomUserManager(models.Manager): def create_user(self, username, email): return self.model._default_manager.create(username=username) class CustomUser(models.Model): username = models.CharField(max_leng...
Clean signal handler from example app
Clean signal handler from example app
Python
bsd-3-clause
beswarm/django-social-auth,omab/django-social-auth,adw0rd/django-social-auth,gustavoam/django-social-auth,limdauto/django-social-auth,michael-borisov/django-social-auth,vuchau/django-social-auth,limdauto/django-social-auth,sk7/django-social-auth,caktus/django-social-auth,vxvinh1511/django-social-auth,duoduo369/django-s...
# Define a custom User class to work with django-social-auth from django.db import models class CustomUserManager(models.Manager): def create_user(self, username, email): return self.model._default_manager.create(username=username) class CustomUser(models.Model): username = models.CharField(max_leng...
# Define a custom User class to work with django-social-auth from django.db import models class CustomUserManager(models.Manager): def create_user(self, username, email): return self.model._default_manager.create(username=username) class CustomUser(models.Model): username = models.CharField(max_leng...
<commit_before># Define a custom User class to work with django-social-auth from django.db import models class CustomUserManager(models.Manager): def create_user(self, username, email): return self.model._default_manager.create(username=username) class CustomUser(models.Model): username = models.Cha...
# Define a custom User class to work with django-social-auth from django.db import models class CustomUserManager(models.Manager): def create_user(self, username, email): return self.model._default_manager.create(username=username) class CustomUser(models.Model): username = models.CharField(max_leng...
# Define a custom User class to work with django-social-auth from django.db import models class CustomUserManager(models.Manager): def create_user(self, username, email): return self.model._default_manager.create(username=username) class CustomUser(models.Model): username = models.CharField(max_leng...
<commit_before># Define a custom User class to work with django-social-auth from django.db import models class CustomUserManager(models.Manager): def create_user(self, username, email): return self.model._default_manager.create(username=username) class CustomUser(models.Model): username = models.Cha...
1eab43e1b1402a53c2dec53abe61bcae5f4b3026
robots/admin.py
robots/admin.py
from django.contrib import admin from django.utils.translation import ugettext_lazy as _ from robots.models import Url, Rule from robots.forms import RuleAdminForm class RuleAdmin(admin.ModelAdmin): form = RuleAdminForm fieldsets = ( (None, {'fields': ('robot', 'sites')}), (_('URL patterns'),...
from django.contrib import admin from django.utils.translation import ugettext_lazy as _ from robots.models import Url, Rule from robots.forms import RuleAdminForm class RuleAdmin(admin.ModelAdmin): form = RuleAdminForm fieldsets = ( (None, {'fields': ('robot', 'sites')}), (_('URL patterns'),...
Add filter_horizontal for for allowed and disallowed
Add filter_horizontal for for allowed and disallowed
Python
bsd-3-clause
jazzband/django-robots,jezdez/django-robots,jezdez/django-robots,jscott1971/django-robots,jscott1971/django-robots,jazzband/django-robots
from django.contrib import admin from django.utils.translation import ugettext_lazy as _ from robots.models import Url, Rule from robots.forms import RuleAdminForm class RuleAdmin(admin.ModelAdmin): form = RuleAdminForm fieldsets = ( (None, {'fields': ('robot', 'sites')}), (_('URL patterns'),...
from django.contrib import admin from django.utils.translation import ugettext_lazy as _ from robots.models import Url, Rule from robots.forms import RuleAdminForm class RuleAdmin(admin.ModelAdmin): form = RuleAdminForm fieldsets = ( (None, {'fields': ('robot', 'sites')}), (_('URL patterns'),...
<commit_before>from django.contrib import admin from django.utils.translation import ugettext_lazy as _ from robots.models import Url, Rule from robots.forms import RuleAdminForm class RuleAdmin(admin.ModelAdmin): form = RuleAdminForm fieldsets = ( (None, {'fields': ('robot', 'sites')}), (_('...
from django.contrib import admin from django.utils.translation import ugettext_lazy as _ from robots.models import Url, Rule from robots.forms import RuleAdminForm class RuleAdmin(admin.ModelAdmin): form = RuleAdminForm fieldsets = ( (None, {'fields': ('robot', 'sites')}), (_('URL patterns'),...
from django.contrib import admin from django.utils.translation import ugettext_lazy as _ from robots.models import Url, Rule from robots.forms import RuleAdminForm class RuleAdmin(admin.ModelAdmin): form = RuleAdminForm fieldsets = ( (None, {'fields': ('robot', 'sites')}), (_('URL patterns'),...
<commit_before>from django.contrib import admin from django.utils.translation import ugettext_lazy as _ from robots.models import Url, Rule from robots.forms import RuleAdminForm class RuleAdmin(admin.ModelAdmin): form = RuleAdminForm fieldsets = ( (None, {'fields': ('robot', 'sites')}), (_('...
4dc2bb7e2973f39dabb267fb8d6782fe61fe36a9
sample/utils.py
sample/utils.py
import os def open_lastrun_file(mode='r'): '''Open and return lastrun file.''' # path to data directory data_dir = os.path.join(os.path.dirname(os.path.dirname(__file__)), 'data') os.makedirs(data_dir, exist_ok=True) # path to lastrun file lastrun_path = os.path.join(data_dir, 'lastrun.txt')...
import os def open_lastrun_file(mode='r'): '''Open and return lastrun file.''' # path to data directory data_dir = os.path.expanduser('~/.local/share/classer/') os.makedirs(data_dir, exist_ok=True) # path to lastrun file lastrun_path = os.path.join(data_dir, 'lastrun.txt') return open(la...
Change data dir to ~/.local/share/classer
Change data dir to ~/.local/share/classer
Python
mit
lqmanh/classer
import os def open_lastrun_file(mode='r'): '''Open and return lastrun file.''' # path to data directory data_dir = os.path.join(os.path.dirname(os.path.dirname(__file__)), 'data') os.makedirs(data_dir, exist_ok=True) # path to lastrun file lastrun_path = os.path.join(data_dir, 'lastrun.txt')...
import os def open_lastrun_file(mode='r'): '''Open and return lastrun file.''' # path to data directory data_dir = os.path.expanduser('~/.local/share/classer/') os.makedirs(data_dir, exist_ok=True) # path to lastrun file lastrun_path = os.path.join(data_dir, 'lastrun.txt') return open(la...
<commit_before>import os def open_lastrun_file(mode='r'): '''Open and return lastrun file.''' # path to data directory data_dir = os.path.join(os.path.dirname(os.path.dirname(__file__)), 'data') os.makedirs(data_dir, exist_ok=True) # path to lastrun file lastrun_path = os.path.join(data_dir,...
import os def open_lastrun_file(mode='r'): '''Open and return lastrun file.''' # path to data directory data_dir = os.path.expanduser('~/.local/share/classer/') os.makedirs(data_dir, exist_ok=True) # path to lastrun file lastrun_path = os.path.join(data_dir, 'lastrun.txt') return open(la...
import os def open_lastrun_file(mode='r'): '''Open and return lastrun file.''' # path to data directory data_dir = os.path.join(os.path.dirname(os.path.dirname(__file__)), 'data') os.makedirs(data_dir, exist_ok=True) # path to lastrun file lastrun_path = os.path.join(data_dir, 'lastrun.txt')...
<commit_before>import os def open_lastrun_file(mode='r'): '''Open and return lastrun file.''' # path to data directory data_dir = os.path.join(os.path.dirname(os.path.dirname(__file__)), 'data') os.makedirs(data_dir, exist_ok=True) # path to lastrun file lastrun_path = os.path.join(data_dir,...
b95e6069a1faa849b1c5b31daf0dfd4dd4b5be23
electionleaflets/boundaries/models.py
electionleaflets/boundaries/models.py
from django.db import models from legacy.models import Constituency class Boundary(models.Model): id = models.IntegerField(primary_key=True) constituency_id = models.IntegerField() boundary = models.TextField() zoom = models.IntegerField() north = models.FloatField() south = models.FloatField()...
from django.db import models from legacy.models import Constituency class Boundary(models.Model): constituency = models.ForeignKey( Constituency ) boundary = models.TextField() zoom = models.IntegerField() north = models.FloatField() south = models.FloatField() east = models.FloatField() we...
Put the model back the way it was
Put the model back the way it was
Python
mit
JustinWingChungHui/electionleaflets,electionleaflets/electionleaflets,electionleaflets/electionleaflets,JustinWingChungHui/electionleaflets,DemocracyClub/electionleaflets,JustinWingChungHui/electionleaflets,DemocracyClub/electionleaflets,DemocracyClub/electionleaflets,JustinWingChungHui/electionleaflets
from django.db import models from legacy.models import Constituency class Boundary(models.Model): id = models.IntegerField(primary_key=True) constituency_id = models.IntegerField() boundary = models.TextField() zoom = models.IntegerField() north = models.FloatField() south = models.FloatField()...
from django.db import models from legacy.models import Constituency class Boundary(models.Model): constituency = models.ForeignKey( Constituency ) boundary = models.TextField() zoom = models.IntegerField() north = models.FloatField() south = models.FloatField() east = models.FloatField() we...
<commit_before>from django.db import models from legacy.models import Constituency class Boundary(models.Model): id = models.IntegerField(primary_key=True) constituency_id = models.IntegerField() boundary = models.TextField() zoom = models.IntegerField() north = models.FloatField() south = mode...
from django.db import models from legacy.models import Constituency class Boundary(models.Model): constituency = models.ForeignKey( Constituency ) boundary = models.TextField() zoom = models.IntegerField() north = models.FloatField() south = models.FloatField() east = models.FloatField() we...
from django.db import models from legacy.models import Constituency class Boundary(models.Model): id = models.IntegerField(primary_key=True) constituency_id = models.IntegerField() boundary = models.TextField() zoom = models.IntegerField() north = models.FloatField() south = models.FloatField()...
<commit_before>from django.db import models from legacy.models import Constituency class Boundary(models.Model): id = models.IntegerField(primary_key=True) constituency_id = models.IntegerField() boundary = models.TextField() zoom = models.IntegerField() north = models.FloatField() south = mode...
969ea8afcb111c68a145cc69791e531303807608
insight_reloaded/tests/test_api.py
insight_reloaded/tests/test_api.py
# -*- coding: utf-8 -*- import json from mock import MagicMock from tornado.testing import AsyncHTTPTestCase from insight_reloaded.api import application from insight_reloaded import __version__ as VERSION class InsightApiHTTPTest(AsyncHTTPTestCase): def get_app(self): return application def test_api...
# -*- coding: utf-8 -*- import json from mock import MagicMock from tornado.testing import AsyncHTTPTestCase from insight_reloaded.api import application from insight_reloaded import __version__ as VERSION from tornado import ioloop class InsightApiHTTPTest(AsyncHTTPTestCase): def get_new_ioloop(self): ...
Use global ioloop as we don't pass test ioloop to tornado redis
Use global ioloop as we don't pass test ioloop to tornado redis
Python
bsd-3-clause
novapost/insight-reloaded
# -*- coding: utf-8 -*- import json from mock import MagicMock from tornado.testing import AsyncHTTPTestCase from insight_reloaded.api import application from insight_reloaded import __version__ as VERSION class InsightApiHTTPTest(AsyncHTTPTestCase): def get_app(self): return application def test_api...
# -*- coding: utf-8 -*- import json from mock import MagicMock from tornado.testing import AsyncHTTPTestCase from insight_reloaded.api import application from insight_reloaded import __version__ as VERSION from tornado import ioloop class InsightApiHTTPTest(AsyncHTTPTestCase): def get_new_ioloop(self): ...
<commit_before># -*- coding: utf-8 -*- import json from mock import MagicMock from tornado.testing import AsyncHTTPTestCase from insight_reloaded.api import application from insight_reloaded import __version__ as VERSION class InsightApiHTTPTest(AsyncHTTPTestCase): def get_app(self): return application ...
# -*- coding: utf-8 -*- import json from mock import MagicMock from tornado.testing import AsyncHTTPTestCase from insight_reloaded.api import application from insight_reloaded import __version__ as VERSION from tornado import ioloop class InsightApiHTTPTest(AsyncHTTPTestCase): def get_new_ioloop(self): ...
# -*- coding: utf-8 -*- import json from mock import MagicMock from tornado.testing import AsyncHTTPTestCase from insight_reloaded.api import application from insight_reloaded import __version__ as VERSION class InsightApiHTTPTest(AsyncHTTPTestCase): def get_app(self): return application def test_api...
<commit_before># -*- coding: utf-8 -*- import json from mock import MagicMock from tornado.testing import AsyncHTTPTestCase from insight_reloaded.api import application from insight_reloaded import __version__ as VERSION class InsightApiHTTPTest(AsyncHTTPTestCase): def get_app(self): return application ...
a3a1ead4954500b29a1474b333336f90a95718db
thecodingloverss.py
thecodingloverss.py
import feedparser, sys, urllib2 from bs4 import BeautifulSoup as BS from feedgen.feed import FeedGenerator from flask import Flask app = Flask(__name__) @app.route('/') def index(): d = feedparser.parse('http://thecodinglove.com/rss') fg = FeedGenerator() fg.title('The coding love with images.') fg...
import feedparser, sys, urllib2 from bs4 import BeautifulSoup as BS from feedgen.feed import FeedGenerator from flask import Flask app = Flask(__name__) @app.route('/') def index(): d = feedparser.parse('http://thecodinglove.com/rss') fg = FeedGenerator() fg.title('The coding love with images.') fg...
Check that contributor exist in the source feed.
Check that contributor exist in the source feed. Otherwise things will break sooner or later.
Python
mit
chrillux/thecodingloverss
import feedparser, sys, urllib2 from bs4 import BeautifulSoup as BS from feedgen.feed import FeedGenerator from flask import Flask app = Flask(__name__) @app.route('/') def index(): d = feedparser.parse('http://thecodinglove.com/rss') fg = FeedGenerator() fg.title('The coding love with images.') fg...
import feedparser, sys, urllib2 from bs4 import BeautifulSoup as BS from feedgen.feed import FeedGenerator from flask import Flask app = Flask(__name__) @app.route('/') def index(): d = feedparser.parse('http://thecodinglove.com/rss') fg = FeedGenerator() fg.title('The coding love with images.') fg...
<commit_before>import feedparser, sys, urllib2 from bs4 import BeautifulSoup as BS from feedgen.feed import FeedGenerator from flask import Flask app = Flask(__name__) @app.route('/') def index(): d = feedparser.parse('http://thecodinglove.com/rss') fg = FeedGenerator() fg.title('The coding love with i...
import feedparser, sys, urllib2 from bs4 import BeautifulSoup as BS from feedgen.feed import FeedGenerator from flask import Flask app = Flask(__name__) @app.route('/') def index(): d = feedparser.parse('http://thecodinglove.com/rss') fg = FeedGenerator() fg.title('The coding love with images.') fg...
import feedparser, sys, urllib2 from bs4 import BeautifulSoup as BS from feedgen.feed import FeedGenerator from flask import Flask app = Flask(__name__) @app.route('/') def index(): d = feedparser.parse('http://thecodinglove.com/rss') fg = FeedGenerator() fg.title('The coding love with images.') fg...
<commit_before>import feedparser, sys, urllib2 from bs4 import BeautifulSoup as BS from feedgen.feed import FeedGenerator from flask import Flask app = Flask(__name__) @app.route('/') def index(): d = feedparser.parse('http://thecodinglove.com/rss') fg = FeedGenerator() fg.title('The coding love with i...
95234ec552c7157ed9020e90f19b2abd1f813735
backend/uclapi/gunicorn_config.py
backend/uclapi/gunicorn_config.py
import multiprocessing bind = "127.0.0.1:9000" # Run cores * 4 + 1 workers in gunicorn # This is set deliberately high in case of long Oracle transactions locking Django up workers = multiprocessing.cpu_count() * 4 + 1 threads = multiprocessing.cpu_count() * 4 # Using gaiohttp because of the long blocking c...
import multiprocessing bind = "127.0.0.1:9000" # Run cores * 4 + 1 workers in gunicorn # This is set deliberately high in case of long Oracle transactions locking Django up workers = multiprocessing.cpu_count() * 4 + 1 threads = multiprocessing.cpu_count() * 4 # Using gaiohttp because of the long blocking c...
Disable daemonised mode so that Supervisor can properly control gunicorn
Disable daemonised mode so that Supervisor can properly control gunicorn
Python
mit
uclapi/uclapi,uclapi/uclapi,uclapi/uclapi,uclapi/uclapi
import multiprocessing bind = "127.0.0.1:9000" # Run cores * 4 + 1 workers in gunicorn # This is set deliberately high in case of long Oracle transactions locking Django up workers = multiprocessing.cpu_count() * 4 + 1 threads = multiprocessing.cpu_count() * 4 # Using gaiohttp because of the long blocking c...
import multiprocessing bind = "127.0.0.1:9000" # Run cores * 4 + 1 workers in gunicorn # This is set deliberately high in case of long Oracle transactions locking Django up workers = multiprocessing.cpu_count() * 4 + 1 threads = multiprocessing.cpu_count() * 4 # Using gaiohttp because of the long blocking c...
<commit_before>import multiprocessing bind = "127.0.0.1:9000" # Run cores * 4 + 1 workers in gunicorn # This is set deliberately high in case of long Oracle transactions locking Django up workers = multiprocessing.cpu_count() * 4 + 1 threads = multiprocessing.cpu_count() * 4 # Using gaiohttp because of the ...
import multiprocessing bind = "127.0.0.1:9000" # Run cores * 4 + 1 workers in gunicorn # This is set deliberately high in case of long Oracle transactions locking Django up workers = multiprocessing.cpu_count() * 4 + 1 threads = multiprocessing.cpu_count() * 4 # Using gaiohttp because of the long blocking c...
import multiprocessing bind = "127.0.0.1:9000" # Run cores * 4 + 1 workers in gunicorn # This is set deliberately high in case of long Oracle transactions locking Django up workers = multiprocessing.cpu_count() * 4 + 1 threads = multiprocessing.cpu_count() * 4 # Using gaiohttp because of the long blocking c...
<commit_before>import multiprocessing bind = "127.0.0.1:9000" # Run cores * 4 + 1 workers in gunicorn # This is set deliberately high in case of long Oracle transactions locking Django up workers = multiprocessing.cpu_count() * 4 + 1 threads = multiprocessing.cpu_count() * 4 # Using gaiohttp because of the ...
d137f2cf16b088e2d9722568fce6dad89d950016
Cauldron/ext/expose/keywords.py
Cauldron/ext/expose/keywords.py
# -*- coding: utf-8 -*- """ An extension for keywords which expose pieces of native python objects. """ from __future__ import absolute_import from Cauldron.types import Integer, DispatcherKeywordType from Cauldron.exc import NoWriteNecessary __all__ = ['ExposeAttribute'] class ExposeAttribute(DispatcherKeywordType)...
# -*- coding: utf-8 -*- """ An extension for keywords which expose pieces of native python objects. """ from __future__ import absolute_import from Cauldron.types import Integer, DispatcherKeywordType from Cauldron.exc import NoWriteNecessary __all__ = ['ExposeAttribute'] class ExposeAttribute(DispatcherKeywordType)...
FIx a bug in exposed attribute keyword
FIx a bug in exposed attribute keyword
Python
bsd-3-clause
alexrudy/Cauldron
# -*- coding: utf-8 -*- """ An extension for keywords which expose pieces of native python objects. """ from __future__ import absolute_import from Cauldron.types import Integer, DispatcherKeywordType from Cauldron.exc import NoWriteNecessary __all__ = ['ExposeAttribute'] class ExposeAttribute(DispatcherKeywordType)...
# -*- coding: utf-8 -*- """ An extension for keywords which expose pieces of native python objects. """ from __future__ import absolute_import from Cauldron.types import Integer, DispatcherKeywordType from Cauldron.exc import NoWriteNecessary __all__ = ['ExposeAttribute'] class ExposeAttribute(DispatcherKeywordType)...
<commit_before># -*- coding: utf-8 -*- """ An extension for keywords which expose pieces of native python objects. """ from __future__ import absolute_import from Cauldron.types import Integer, DispatcherKeywordType from Cauldron.exc import NoWriteNecessary __all__ = ['ExposeAttribute'] class ExposeAttribute(Dispatc...
# -*- coding: utf-8 -*- """ An extension for keywords which expose pieces of native python objects. """ from __future__ import absolute_import from Cauldron.types import Integer, DispatcherKeywordType from Cauldron.exc import NoWriteNecessary __all__ = ['ExposeAttribute'] class ExposeAttribute(DispatcherKeywordType)...
# -*- coding: utf-8 -*- """ An extension for keywords which expose pieces of native python objects. """ from __future__ import absolute_import from Cauldron.types import Integer, DispatcherKeywordType from Cauldron.exc import NoWriteNecessary __all__ = ['ExposeAttribute'] class ExposeAttribute(DispatcherKeywordType)...
<commit_before># -*- coding: utf-8 -*- """ An extension for keywords which expose pieces of native python objects. """ from __future__ import absolute_import from Cauldron.types import Integer, DispatcherKeywordType from Cauldron.exc import NoWriteNecessary __all__ = ['ExposeAttribute'] class ExposeAttribute(Dispatc...
2a3ffa2e8bde58d4e3dec053ad437842eac80106
thing/middleware.py
thing/middleware.py
import datetime class LastSeenMiddleware(object): def process_request(self, request): if not request.user.is_authenticated(): return None profile = request.user.get_profile() profile.last_seen = datetime.datetime.now() profile.save() return None
import datetime class LastSeenMiddleware(object): def process_request(self, request): if not request.user.is_authenticated(): return None profile = request.user.get_profile() profile.last_seen = datetime.datetime.utcnow() profile.save() return None
Change LastSeenMiddleware to store last_seen as utcnow() instead of now()
Change LastSeenMiddleware to store last_seen as utcnow() instead of now()
Python
bsd-2-clause
cmptrgeekken/evething,Gillingham/evething,Gillingham/evething,madcowfred/evething,Gillingham/evething,madcowfred/evething,cmptrgeekken/evething,cmptrgeekken/evething,madcowfred/evething,Gillingham/evething,madcowfred/evething,cmptrgeekken/evething,cmptrgeekken/evething
import datetime class LastSeenMiddleware(object): def process_request(self, request): if not request.user.is_authenticated(): return None profile = request.user.get_profile() profile.last_seen = datetime.datetime.now() profile.save() return None Change LastSeen...
import datetime class LastSeenMiddleware(object): def process_request(self, request): if not request.user.is_authenticated(): return None profile = request.user.get_profile() profile.last_seen = datetime.datetime.utcnow() profile.save() return None
<commit_before>import datetime class LastSeenMiddleware(object): def process_request(self, request): if not request.user.is_authenticated(): return None profile = request.user.get_profile() profile.last_seen = datetime.datetime.now() profile.save() return None ...
import datetime class LastSeenMiddleware(object): def process_request(self, request): if not request.user.is_authenticated(): return None profile = request.user.get_profile() profile.last_seen = datetime.datetime.utcnow() profile.save() return None
import datetime class LastSeenMiddleware(object): def process_request(self, request): if not request.user.is_authenticated(): return None profile = request.user.get_profile() profile.last_seen = datetime.datetime.now() profile.save() return None Change LastSeen...
<commit_before>import datetime class LastSeenMiddleware(object): def process_request(self, request): if not request.user.is_authenticated(): return None profile = request.user.get_profile() profile.last_seen = datetime.datetime.now() profile.save() return None ...
75615b2328e521b6bb37321d1cd7dc75c4d3bfef
hecate/core/topology/border.py
hecate/core/topology/border.py
from hecate.core.topology.mixins import DimensionsMixin class Border(DimensionsMixin): """ Base class for all types of borders. """ def __init__(self): self.topology = None class TorusBorder(Border): supported_dimensions = list(range(1, 100)) def wrap_coords(self, coord_prefix): ...
from hecate.core.topology.mixins import DimensionsMixin class Border(DimensionsMixin): """ Base class for all types of borders. """ def __init__(self): self.topology = None class TorusBorder(Border): supported_dimensions = list(range(1, 100)) def wrap_coords(self, coord_prefix): ...
Fix incorrect TorusBorder wrapping in negative direction
Fix incorrect TorusBorder wrapping in negative direction
Python
mit
a5kin/hecate,a5kin/hecate
from hecate.core.topology.mixins import DimensionsMixin class Border(DimensionsMixin): """ Base class for all types of borders. """ def __init__(self): self.topology = None class TorusBorder(Border): supported_dimensions = list(range(1, 100)) def wrap_coords(self, coord_prefix): ...
from hecate.core.topology.mixins import DimensionsMixin class Border(DimensionsMixin): """ Base class for all types of borders. """ def __init__(self): self.topology = None class TorusBorder(Border): supported_dimensions = list(range(1, 100)) def wrap_coords(self, coord_prefix): ...
<commit_before>from hecate.core.topology.mixins import DimensionsMixin class Border(DimensionsMixin): """ Base class for all types of borders. """ def __init__(self): self.topology = None class TorusBorder(Border): supported_dimensions = list(range(1, 100)) def wrap_coords(self, co...
from hecate.core.topology.mixins import DimensionsMixin class Border(DimensionsMixin): """ Base class for all types of borders. """ def __init__(self): self.topology = None class TorusBorder(Border): supported_dimensions = list(range(1, 100)) def wrap_coords(self, coord_prefix): ...
from hecate.core.topology.mixins import DimensionsMixin class Border(DimensionsMixin): """ Base class for all types of borders. """ def __init__(self): self.topology = None class TorusBorder(Border): supported_dimensions = list(range(1, 100)) def wrap_coords(self, coord_prefix): ...
<commit_before>from hecate.core.topology.mixins import DimensionsMixin class Border(DimensionsMixin): """ Base class for all types of borders. """ def __init__(self): self.topology = None class TorusBorder(Border): supported_dimensions = list(range(1, 100)) def wrap_coords(self, co...
6189ded93330e9483e6d677e26b49319c649c9f0
test/handler_fixture.py
test/handler_fixture.py
import unittest import tempfile import shutil import groundstation.node import groundstation.transfer.response import groundstation.transfer.request from groundstation.station import Station class MockStream(list): def enqueue(self, *args, **kwargs): self.append(*args, **kwargs) def MockTERMINATE(): ...
import unittest import tempfile import shutil import uuid import groundstation.node import groundstation.transfer.response import groundstation.transfer.request from groundstation.station import Station class MockStream(list): def enqueue(self, *args, **kwargs): self.append(*args, **kwargs) def MockTER...
Implement an origin on MockStation
Implement an origin on MockStation
Python
mit
richo/groundstation,richo/groundstation,richo/groundstation,richo/groundstation,richo/groundstation
import unittest import tempfile import shutil import groundstation.node import groundstation.transfer.response import groundstation.transfer.request from groundstation.station import Station class MockStream(list): def enqueue(self, *args, **kwargs): self.append(*args, **kwargs) def MockTERMINATE(): ...
import unittest import tempfile import shutil import uuid import groundstation.node import groundstation.transfer.response import groundstation.transfer.request from groundstation.station import Station class MockStream(list): def enqueue(self, *args, **kwargs): self.append(*args, **kwargs) def MockTER...
<commit_before>import unittest import tempfile import shutil import groundstation.node import groundstation.transfer.response import groundstation.transfer.request from groundstation.station import Station class MockStream(list): def enqueue(self, *args, **kwargs): self.append(*args, **kwargs) def Mock...
import unittest import tempfile import shutil import uuid import groundstation.node import groundstation.transfer.response import groundstation.transfer.request from groundstation.station import Station class MockStream(list): def enqueue(self, *args, **kwargs): self.append(*args, **kwargs) def MockTER...
import unittest import tempfile import shutil import groundstation.node import groundstation.transfer.response import groundstation.transfer.request from groundstation.station import Station class MockStream(list): def enqueue(self, *args, **kwargs): self.append(*args, **kwargs) def MockTERMINATE(): ...
<commit_before>import unittest import tempfile import shutil import groundstation.node import groundstation.transfer.response import groundstation.transfer.request from groundstation.station import Station class MockStream(list): def enqueue(self, *args, **kwargs): self.append(*args, **kwargs) def Mock...
39b6868042e95a5a412d3d3b9fa5f735e35ddb2c
umodbus/__init__.py
umodbus/__init__.py
from logging import getLogger try: from logging import NullHandler # For Python 2.7 compatibility. except ImportError: from logging import Handler class NullHandler(Handler): def emit(self, record): pass log = getLogger('uModbus') log.addHandler(NullHandler()) from .server import get...
from logging import getLogger, NullHandler log = getLogger('uModbus') log.addHandler(NullHandler()) from .server import get_server # NOQA
Remove another piece of unreachable code.
Remove another piece of unreachable code.
Python
mpl-2.0
AdvancedClimateSystems/python-modbus,AdvancedClimateSystems/uModbus
from logging import getLogger try: from logging import NullHandler # For Python 2.7 compatibility. except ImportError: from logging import Handler class NullHandler(Handler): def emit(self, record): pass log = getLogger('uModbus') log.addHandler(NullHandler()) from .server import get...
from logging import getLogger, NullHandler log = getLogger('uModbus') log.addHandler(NullHandler()) from .server import get_server # NOQA
<commit_before>from logging import getLogger try: from logging import NullHandler # For Python 2.7 compatibility. except ImportError: from logging import Handler class NullHandler(Handler): def emit(self, record): pass log = getLogger('uModbus') log.addHandler(NullHandler()) from .se...
from logging import getLogger, NullHandler log = getLogger('uModbus') log.addHandler(NullHandler()) from .server import get_server # NOQA
from logging import getLogger try: from logging import NullHandler # For Python 2.7 compatibility. except ImportError: from logging import Handler class NullHandler(Handler): def emit(self, record): pass log = getLogger('uModbus') log.addHandler(NullHandler()) from .server import get...
<commit_before>from logging import getLogger try: from logging import NullHandler # For Python 2.7 compatibility. except ImportError: from logging import Handler class NullHandler(Handler): def emit(self, record): pass log = getLogger('uModbus') log.addHandler(NullHandler()) from .se...
bc8675b170748b51403fb31d03ed06399268cb7b
examples/test_deferred_asserts.py
examples/test_deferred_asserts.py
""" This test demonstrates the use of deferred asserts. Deferred asserts won't raise exceptions from failures until either process_deferred_asserts() is called, or the test reaches the tearDown() step. """ import pytest from seleniumbase import BaseCase class DeferredAssertTests(BaseCase): @pytest.mark.expected_f...
""" This test demonstrates the use of deferred asserts. Deferred asserts won't raise exceptions from failures until either process_deferred_asserts() is called, or the test reaches the tearDown() step. Requires version 2.1.6 or newer for the deferred_assert_exact_text() method. """ import pytest from seleniumbase impor...
Update an example test that uses deferred asserts
Update an example test that uses deferred asserts
Python
mit
mdmintz/SeleniumBase,mdmintz/SeleniumBase,seleniumbase/SeleniumBase,seleniumbase/SeleniumBase,seleniumbase/SeleniumBase,seleniumbase/SeleniumBase,mdmintz/SeleniumBase,mdmintz/SeleniumBase
""" This test demonstrates the use of deferred asserts. Deferred asserts won't raise exceptions from failures until either process_deferred_asserts() is called, or the test reaches the tearDown() step. """ import pytest from seleniumbase import BaseCase class DeferredAssertTests(BaseCase): @pytest.mark.expected_f...
""" This test demonstrates the use of deferred asserts. Deferred asserts won't raise exceptions from failures until either process_deferred_asserts() is called, or the test reaches the tearDown() step. Requires version 2.1.6 or newer for the deferred_assert_exact_text() method. """ import pytest from seleniumbase impor...
<commit_before>""" This test demonstrates the use of deferred asserts. Deferred asserts won't raise exceptions from failures until either process_deferred_asserts() is called, or the test reaches the tearDown() step. """ import pytest from seleniumbase import BaseCase class DeferredAssertTests(BaseCase): @pytest....
""" This test demonstrates the use of deferred asserts. Deferred asserts won't raise exceptions from failures until either process_deferred_asserts() is called, or the test reaches the tearDown() step. Requires version 2.1.6 or newer for the deferred_assert_exact_text() method. """ import pytest from seleniumbase impor...
""" This test demonstrates the use of deferred asserts. Deferred asserts won't raise exceptions from failures until either process_deferred_asserts() is called, or the test reaches the tearDown() step. """ import pytest from seleniumbase import BaseCase class DeferredAssertTests(BaseCase): @pytest.mark.expected_f...
<commit_before>""" This test demonstrates the use of deferred asserts. Deferred asserts won't raise exceptions from failures until either process_deferred_asserts() is called, or the test reaches the tearDown() step. """ import pytest from seleniumbase import BaseCase class DeferredAssertTests(BaseCase): @pytest....
f89d59d89af12473c609948bae518151a9adc64a
accelerator/migrations/0074_update_url_to_community.py
accelerator/migrations/0074_update_url_to_community.py
# Generated by Django 2.2.10 on 2021-11-05 12:29 from django.db import migrations from django.db.models.query_utils import Q def update_url_to_community(apps, schema_editor): people_url = "/people" mentor_url = "/directory" community_url = "/community" SiteRedirectPage = apps.get_model('accelerator', 'SiteRe...
# Generated by Django 2.2.10 on 2021-11-05 12:29 from django.db import migrations from django.db.models.query_utils import Q def update_url_to_community(apps, schema_editor): people_url = "/people" mentor_url = "/directory" community_url = "/community" SiteRedirectPage = apps.get_model('accelerator', 'SiteRe...
Fix the query for updating the people and mentor urls to community url
[AC-9046] Fix the query for updating the people and mentor urls to community url
Python
mit
masschallenge/django-accelerator,masschallenge/django-accelerator
# Generated by Django 2.2.10 on 2021-11-05 12:29 from django.db import migrations from django.db.models.query_utils import Q def update_url_to_community(apps, schema_editor): people_url = "/people" mentor_url = "/directory" community_url = "/community" SiteRedirectPage = apps.get_model('accelerator', 'SiteRe...
# Generated by Django 2.2.10 on 2021-11-05 12:29 from django.db import migrations from django.db.models.query_utils import Q def update_url_to_community(apps, schema_editor): people_url = "/people" mentor_url = "/directory" community_url = "/community" SiteRedirectPage = apps.get_model('accelerator', 'SiteRe...
<commit_before># Generated by Django 2.2.10 on 2021-11-05 12:29 from django.db import migrations from django.db.models.query_utils import Q def update_url_to_community(apps, schema_editor): people_url = "/people" mentor_url = "/directory" community_url = "/community" SiteRedirectPage = apps.get_model('accele...
# Generated by Django 2.2.10 on 2021-11-05 12:29 from django.db import migrations from django.db.models.query_utils import Q def update_url_to_community(apps, schema_editor): people_url = "/people" mentor_url = "/directory" community_url = "/community" SiteRedirectPage = apps.get_model('accelerator', 'SiteRe...
# Generated by Django 2.2.10 on 2021-11-05 12:29 from django.db import migrations from django.db.models.query_utils import Q def update_url_to_community(apps, schema_editor): people_url = "/people" mentor_url = "/directory" community_url = "/community" SiteRedirectPage = apps.get_model('accelerator', 'SiteRe...
<commit_before># Generated by Django 2.2.10 on 2021-11-05 12:29 from django.db import migrations from django.db.models.query_utils import Q def update_url_to_community(apps, schema_editor): people_url = "/people" mentor_url = "/directory" community_url = "/community" SiteRedirectPage = apps.get_model('accele...
672d491fc88683531e12e5576e10bc5e7d9a71bd
bindings/python/testsuite/test_timeline_file_source.py
bindings/python/testsuite/test_timeline_file_source.py
import gst from common import TestCase import ges class TimelineFileSource(TestCase): def testTimelineFileSource(self): src = ges.TimelineFileSource("blahblahblah") src.set_mute(True) src.set_max_duration(long(100)) src.set_supported_formats("video") assert (src.get_suppo...
import gst from common import TestCase import ges class TimelineFileSource(TestCase): def testTimelineFileSource(self): src = ges.TimelineFileSource("file://blahblahblah") src.set_mute(True) src.set_max_duration(long(100)) src.set_supported_formats("video") assert (src.ge...
Fix the timeline_file_source test suite
pyges: Fix the timeline_file_source test suite Can't create a GESTimelineFileSource if you don't have the protocol in the uri
Python
lgpl-2.1
cfoch/gst-editing-services,MathieuDuponchelle/PitiviGes,volodymyrrudyi/gst-editing-services,cfoch/ges,freesteph/gst-editing-services,cfoch/gst-editing-services,cfoch/ges,freesteph/gst-editing-services,cfoch/ges,pitivi/gst-editing-services,MathieuDuponchelle/PitiviGes,volodymyrrudyi/gst-editing-services,cfoch/ges,pitivi...
import gst from common import TestCase import ges class TimelineFileSource(TestCase): def testTimelineFileSource(self): src = ges.TimelineFileSource("blahblahblah") src.set_mute(True) src.set_max_duration(long(100)) src.set_supported_formats("video") assert (src.get_suppo...
import gst from common import TestCase import ges class TimelineFileSource(TestCase): def testTimelineFileSource(self): src = ges.TimelineFileSource("file://blahblahblah") src.set_mute(True) src.set_max_duration(long(100)) src.set_supported_formats("video") assert (src.ge...
<commit_before>import gst from common import TestCase import ges class TimelineFileSource(TestCase): def testTimelineFileSource(self): src = ges.TimelineFileSource("blahblahblah") src.set_mute(True) src.set_max_duration(long(100)) src.set_supported_formats("video") assert...
import gst from common import TestCase import ges class TimelineFileSource(TestCase): def testTimelineFileSource(self): src = ges.TimelineFileSource("file://blahblahblah") src.set_mute(True) src.set_max_duration(long(100)) src.set_supported_formats("video") assert (src.ge...
import gst from common import TestCase import ges class TimelineFileSource(TestCase): def testTimelineFileSource(self): src = ges.TimelineFileSource("blahblahblah") src.set_mute(True) src.set_max_duration(long(100)) src.set_supported_formats("video") assert (src.get_suppo...
<commit_before>import gst from common import TestCase import ges class TimelineFileSource(TestCase): def testTimelineFileSource(self): src = ges.TimelineFileSource("blahblahblah") src.set_mute(True) src.set_max_duration(long(100)) src.set_supported_formats("video") assert...
1456ebbf7621d257b7f67117a34bcf4c35de41d3
K2fov/tests/test_k2onsilicon.py
K2fov/tests/test_k2onsilicon.py
"""Test whether the K2onSilicon command-line tool works.""" import tempfile from ..K2onSilicon import K2onSilicon_main def test_K2onSilicon(): """Test the basics: does K2onSilicon run without error on a dummy file?""" csv = '0, 0, 0\n' with tempfile.NamedTemporaryFile() as temp: try: ...
"""Test whether the `K2onSilicon` command-line tool works.""" import tempfile import numpy as np from ..K2onSilicon import K2onSilicon_main def test_K2onSilicon(): """Test the basics: does K2onSilicon run without error on a dummy file?""" csv = '269.5, -28.5, 12\n0, 0, 20\n' with tempfile.NamedTemporaryF...
Make the K2onSilicon unit test more comprehensive
Make the K2onSilicon unit test more comprehensive
Python
mit
KeplerGO/K2fov,mrtommyb/K2fov
"""Test whether the K2onSilicon command-line tool works.""" import tempfile from ..K2onSilicon import K2onSilicon_main def test_K2onSilicon(): """Test the basics: does K2onSilicon run without error on a dummy file?""" csv = '0, 0, 0\n' with tempfile.NamedTemporaryFile() as temp: try: ...
"""Test whether the `K2onSilicon` command-line tool works.""" import tempfile import numpy as np from ..K2onSilicon import K2onSilicon_main def test_K2onSilicon(): """Test the basics: does K2onSilicon run without error on a dummy file?""" csv = '269.5, -28.5, 12\n0, 0, 20\n' with tempfile.NamedTemporaryF...
<commit_before>"""Test whether the K2onSilicon command-line tool works.""" import tempfile from ..K2onSilicon import K2onSilicon_main def test_K2onSilicon(): """Test the basics: does K2onSilicon run without error on a dummy file?""" csv = '0, 0, 0\n' with tempfile.NamedTemporaryFile() as temp: tr...
"""Test whether the `K2onSilicon` command-line tool works.""" import tempfile import numpy as np from ..K2onSilicon import K2onSilicon_main def test_K2onSilicon(): """Test the basics: does K2onSilicon run without error on a dummy file?""" csv = '269.5, -28.5, 12\n0, 0, 20\n' with tempfile.NamedTemporaryF...
"""Test whether the K2onSilicon command-line tool works.""" import tempfile from ..K2onSilicon import K2onSilicon_main def test_K2onSilicon(): """Test the basics: does K2onSilicon run without error on a dummy file?""" csv = '0, 0, 0\n' with tempfile.NamedTemporaryFile() as temp: try: ...
<commit_before>"""Test whether the K2onSilicon command-line tool works.""" import tempfile from ..K2onSilicon import K2onSilicon_main def test_K2onSilicon(): """Test the basics: does K2onSilicon run without error on a dummy file?""" csv = '0, 0, 0\n' with tempfile.NamedTemporaryFile() as temp: tr...
98f6a07188cc9a9aa9373c3795db49b1e576c2a8
iatidq/dqimportpublisherconditions.py
iatidq/dqimportpublisherconditions.py
# IATI Data Quality, tools for Data QA on IATI-formatted publications # by Mark Brough, Martin Keegan, Ben Webb and Jennifer Smith # # Copyright (C) 2013 Publish What You Fund # # This programme is free software; you may redistribute and/or modify # it under the terms of the GNU Affero General Public License v3...
# IATI Data Quality, tools for Data QA on IATI-formatted publications # by Mark Brough, Martin Keegan, Ben Webb and Jennifer Smith # # Copyright (C) 2013 Publish What You Fund # # This programme is free software; you may redistribute and/or modify # it under the terms of the GNU Affero General Public License v3...
Allow publisher conditions to be imported from text
Allow publisher conditions to be imported from text
Python
agpl-3.0
pwyf/IATI-Data-Quality,pwyf/IATI-Data-Quality,pwyf/IATI-Data-Quality,pwyf/IATI-Data-Quality
# IATI Data Quality, tools for Data QA on IATI-formatted publications # by Mark Brough, Martin Keegan, Ben Webb and Jennifer Smith # # Copyright (C) 2013 Publish What You Fund # # This programme is free software; you may redistribute and/or modify # it under the terms of the GNU Affero General Public License v3...
# IATI Data Quality, tools for Data QA on IATI-formatted publications # by Mark Brough, Martin Keegan, Ben Webb and Jennifer Smith # # Copyright (C) 2013 Publish What You Fund # # This programme is free software; you may redistribute and/or modify # it under the terms of the GNU Affero General Public License v3...
<commit_before> # IATI Data Quality, tools for Data QA on IATI-formatted publications # by Mark Brough, Martin Keegan, Ben Webb and Jennifer Smith # # Copyright (C) 2013 Publish What You Fund # # This programme is free software; you may redistribute and/or modify # it under the terms of the GNU Affero General Pu...
# IATI Data Quality, tools for Data QA on IATI-formatted publications # by Mark Brough, Martin Keegan, Ben Webb and Jennifer Smith # # Copyright (C) 2013 Publish What You Fund # # This programme is free software; you may redistribute and/or modify # it under the terms of the GNU Affero General Public License v3...
# IATI Data Quality, tools for Data QA on IATI-formatted publications # by Mark Brough, Martin Keegan, Ben Webb and Jennifer Smith # # Copyright (C) 2013 Publish What You Fund # # This programme is free software; you may redistribute and/or modify # it under the terms of the GNU Affero General Public License v3...
<commit_before> # IATI Data Quality, tools for Data QA on IATI-formatted publications # by Mark Brough, Martin Keegan, Ben Webb and Jennifer Smith # # Copyright (C) 2013 Publish What You Fund # # This programme is free software; you may redistribute and/or modify # it under the terms of the GNU Affero General Pu...
82c57b4fad49b171cd0833b38867474d6578220c
client/examples/followbot.py
client/examples/followbot.py
from botchallenge import * USERNAME = "" # Put your minecraft username here SERVER = "" # Put the address of the minecraft server here robot = Robot(USERNAME, SERVER) while True: me = robot.get_location() owner = robot.get_owner_location() print(me.distance(owner)) if me.distance(owner) > 4: ...
from botchallenge import * import time USERNAME = "" # Put your minecraft username here SERVER = "" # Put the address of the minecraft server here robot = Robot(USERNAME, SERVER) while True: me = robot.get_location() owner = robot.get_owner_location() print(me.distance(owner)) if me.distance(owner)...
Add timer to follow bot
Add timer to follow bot
Python
mit
Rafiot/botchallenge,Rafiot/botchallenge,Rafiot/botchallenge,Rafiot/botchallenge
from botchallenge import * USERNAME = "" # Put your minecraft username here SERVER = "" # Put the address of the minecraft server here robot = Robot(USERNAME, SERVER) while True: me = robot.get_location() owner = robot.get_owner_location() print(me.distance(owner)) if me.distance(owner) > 4: ...
from botchallenge import * import time USERNAME = "" # Put your minecraft username here SERVER = "" # Put the address of the minecraft server here robot = Robot(USERNAME, SERVER) while True: me = robot.get_location() owner = robot.get_owner_location() print(me.distance(owner)) if me.distance(owner)...
<commit_before> from botchallenge import * USERNAME = "" # Put your minecraft username here SERVER = "" # Put the address of the minecraft server here robot = Robot(USERNAME, SERVER) while True: me = robot.get_location() owner = robot.get_owner_location() print(me.distance(owner)) if me.distance(own...
from botchallenge import * import time USERNAME = "" # Put your minecraft username here SERVER = "" # Put the address of the minecraft server here robot = Robot(USERNAME, SERVER) while True: me = robot.get_location() owner = robot.get_owner_location() print(me.distance(owner)) if me.distance(owner)...
from botchallenge import * USERNAME = "" # Put your minecraft username here SERVER = "" # Put the address of the minecraft server here robot = Robot(USERNAME, SERVER) while True: me = robot.get_location() owner = robot.get_owner_location() print(me.distance(owner)) if me.distance(owner) > 4: ...
<commit_before> from botchallenge import * USERNAME = "" # Put your minecraft username here SERVER = "" # Put the address of the minecraft server here robot = Robot(USERNAME, SERVER) while True: me = robot.get_location() owner = robot.get_owner_location() print(me.distance(owner)) if me.distance(own...
dda641ad312fea5c0274618bea8025625083ea6c
utils/celery_worker.py
utils/celery_worker.py
import os import sys # Append .. to sys path sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) import multiscanner from celery import Celery from celery.contrib.batches import Batches app = Celery('celery_worker', broker='pyamqp://guest@localhost//') @app.task(base=Batches, flush_every=100...
import os import sys # Append .. to sys path sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) import multiscanner from celery import Celery app = Celery('celery_worker', broker='pyamqp://guest@localhost//') @app.task def multiscanner_celery(filelist, config=multiscanner.CONFIG): ''' ...
Remove batching code. (not in celery contrib)
Remove batching code. (not in celery contrib)
Python
mpl-2.0
MITRECND/multiscanner,MITRECND/multiscanner,awest1339/multiscanner,jmlong1027/multiscanner,jmlong1027/multiscanner,mitre/multiscanner,awest1339/multiscanner,mitre/multiscanner,mitre/multiscanner,jmlong1027/multiscanner,jmlong1027/multiscanner,awest1339/multiscanner,awest1339/multiscanner
import os import sys # Append .. to sys path sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) import multiscanner from celery import Celery from celery.contrib.batches import Batches app = Celery('celery_worker', broker='pyamqp://guest@localhost//') @app.task(base=Batches, flush_every=100...
import os import sys # Append .. to sys path sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) import multiscanner from celery import Celery app = Celery('celery_worker', broker='pyamqp://guest@localhost//') @app.task def multiscanner_celery(filelist, config=multiscanner.CONFIG): ''' ...
<commit_before>import os import sys # Append .. to sys path sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) import multiscanner from celery import Celery from celery.contrib.batches import Batches app = Celery('celery_worker', broker='pyamqp://guest@localhost//') @app.task(base=Batches, ...
import os import sys # Append .. to sys path sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) import multiscanner from celery import Celery app = Celery('celery_worker', broker='pyamqp://guest@localhost//') @app.task def multiscanner_celery(filelist, config=multiscanner.CONFIG): ''' ...
import os import sys # Append .. to sys path sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) import multiscanner from celery import Celery from celery.contrib.batches import Batches app = Celery('celery_worker', broker='pyamqp://guest@localhost//') @app.task(base=Batches, flush_every=100...
<commit_before>import os import sys # Append .. to sys path sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) import multiscanner from celery import Celery from celery.contrib.batches import Batches app = Celery('celery_worker', broker='pyamqp://guest@localhost//') @app.task(base=Batches, ...
2cadf977592bd1082f5914cf365849d3f9897b9c
admin/common_auth/models.py
admin/common_auth/models.py
from django.contrib.auth.models import ( AbstractBaseUser, PermissionsMixin, BaseUserManager, ) from django.db import models class MyUserManager(BaseUserManager): def create_user(self, email, password=None): if not email: raise ValueError('Users must have an email address') ...
from django.db import models class AdminProfile(models.Model): user = models.OneToOneField('osf.OSFUser', related_name='admin_profile') desk_token = models.CharField(max_length=45, blank=True) desk_token_secret = models.CharField(max_length=45, blank=True)
Remove MyUser in favor of AdminProfile and OSFUser
Remove MyUser in favor of AdminProfile and OSFUser Admin users are now the same as the OSFUser - AdminProfile gives access to a few extra fields related to desk keys. AdminProfile has a one to one relationship with a OSFUser.
Python
apache-2.0
mfraezz/osf.io,mattclark/osf.io,HalcyonChimera/osf.io,caneruguz/osf.io,Johnetordoff/osf.io,Nesiehr/osf.io,acshi/osf.io,chrisseto/osf.io,mattclark/osf.io,pattisdr/osf.io,CenterForOpenScience/osf.io,brianjgeiger/osf.io,Nesiehr/osf.io,crcresearch/osf.io,Nesiehr/osf.io,hmoco/osf.io,aaxelb/osf.io,brianjgeiger/osf.io,TomBaxt...
from django.contrib.auth.models import ( AbstractBaseUser, PermissionsMixin, BaseUserManager, ) from django.db import models class MyUserManager(BaseUserManager): def create_user(self, email, password=None): if not email: raise ValueError('Users must have an email address') ...
from django.db import models class AdminProfile(models.Model): user = models.OneToOneField('osf.OSFUser', related_name='admin_profile') desk_token = models.CharField(max_length=45, blank=True) desk_token_secret = models.CharField(max_length=45, blank=True)
<commit_before>from django.contrib.auth.models import ( AbstractBaseUser, PermissionsMixin, BaseUserManager, ) from django.db import models class MyUserManager(BaseUserManager): def create_user(self, email, password=None): if not email: raise ValueError('Users must have an email ad...
from django.db import models class AdminProfile(models.Model): user = models.OneToOneField('osf.OSFUser', related_name='admin_profile') desk_token = models.CharField(max_length=45, blank=True) desk_token_secret = models.CharField(max_length=45, blank=True)
from django.contrib.auth.models import ( AbstractBaseUser, PermissionsMixin, BaseUserManager, ) from django.db import models class MyUserManager(BaseUserManager): def create_user(self, email, password=None): if not email: raise ValueError('Users must have an email address') ...
<commit_before>from django.contrib.auth.models import ( AbstractBaseUser, PermissionsMixin, BaseUserManager, ) from django.db import models class MyUserManager(BaseUserManager): def create_user(self, email, password=None): if not email: raise ValueError('Users must have an email ad...
3072b6dd724255c3fba3bc6f837ec823d507e321
grammpy_transforms/contextfree.py
grammpy_transforms/contextfree.py
#!/usr/bin/env python """ :Author Patrik Valkovic :Created 10.08.2017 20:33 :Licence GNUv3 Part of grammpy-transforms """ from grammpy import Grammar from .NongeneratingSymbolsRemove import remove_nongenerating_symbols from .UnreachableSymbolsRemove import remove_unreachable_symbols class ContextFree: @staticme...
#!/usr/bin/env python """ :Author Patrik Valkovic :Created 10.08.2017 20:33 :Licence GNUv3 Part of grammpy-transforms """ from grammpy import Grammar from .NongeneratingSymbolsRemove import remove_nongenerating_symbols from .UnreachableSymbolsRemove import remove_unreachable_symbols class ContextFree: @staticme...
Implement alg to remove useless symbols
Implement alg to remove useless symbols
Python
mit
PatrikValkovic/grammpy
#!/usr/bin/env python """ :Author Patrik Valkovic :Created 10.08.2017 20:33 :Licence GNUv3 Part of grammpy-transforms """ from grammpy import Grammar from .NongeneratingSymbolsRemove import remove_nongenerating_symbols from .UnreachableSymbolsRemove import remove_unreachable_symbols class ContextFree: @staticme...
#!/usr/bin/env python """ :Author Patrik Valkovic :Created 10.08.2017 20:33 :Licence GNUv3 Part of grammpy-transforms """ from grammpy import Grammar from .NongeneratingSymbolsRemove import remove_nongenerating_symbols from .UnreachableSymbolsRemove import remove_unreachable_symbols class ContextFree: @staticme...
<commit_before>#!/usr/bin/env python """ :Author Patrik Valkovic :Created 10.08.2017 20:33 :Licence GNUv3 Part of grammpy-transforms """ from grammpy import Grammar from .NongeneratingSymbolsRemove import remove_nongenerating_symbols from .UnreachableSymbolsRemove import remove_unreachable_symbols class ContextFree...
#!/usr/bin/env python """ :Author Patrik Valkovic :Created 10.08.2017 20:33 :Licence GNUv3 Part of grammpy-transforms """ from grammpy import Grammar from .NongeneratingSymbolsRemove import remove_nongenerating_symbols from .UnreachableSymbolsRemove import remove_unreachable_symbols class ContextFree: @staticme...
#!/usr/bin/env python """ :Author Patrik Valkovic :Created 10.08.2017 20:33 :Licence GNUv3 Part of grammpy-transforms """ from grammpy import Grammar from .NongeneratingSymbolsRemove import remove_nongenerating_symbols from .UnreachableSymbolsRemove import remove_unreachable_symbols class ContextFree: @staticme...
<commit_before>#!/usr/bin/env python """ :Author Patrik Valkovic :Created 10.08.2017 20:33 :Licence GNUv3 Part of grammpy-transforms """ from grammpy import Grammar from .NongeneratingSymbolsRemove import remove_nongenerating_symbols from .UnreachableSymbolsRemove import remove_unreachable_symbols class ContextFree...
092bd3d506ec281a24adcecef6ca498443df5f59
kboard/board/urls.py
kboard/board/urls.py
# Created by JHJ on 2016. 10. 5. from django.conf.urls import url from . import views app_name = 'board' urlpatterns = [ url(r'^$', views.board_list, name='board_list'), url(r'^(?P<board_slug>[-a-z]+)/$', views.post_list, name='post_list'), url(r'^(?P<board_slug>[-a-z]+)/new/$', views.new_post, name='new...
# Created by JHJ on 2016. 10. 5. from django.conf.urls import url from . import views app_name = 'board' urlpatterns = [ url(r'^$', views.board_list, name='board_list'), url(r'^(?P<board_slug>[-a-z]+)/$', views.post_list, name='post_list'), url(r'^(?P<board_slug>[-a-z]+)/new/$', views.new_post, name='new...
Add 'comment_id' parameter in 'delete_comment' url
Add 'comment_id' parameter in 'delete_comment' url
Python
mit
hyesun03/k-board,guswnsxodlf/k-board,hyesun03/k-board,kboard/kboard,guswnsxodlf/k-board,kboard/kboard,guswnsxodlf/k-board,cjh5414/kboard,darjeeling/k-board,hyesun03/k-board,kboard/kboard,cjh5414/kboard,cjh5414/kboard
# Created by JHJ on 2016. 10. 5. from django.conf.urls import url from . import views app_name = 'board' urlpatterns = [ url(r'^$', views.board_list, name='board_list'), url(r'^(?P<board_slug>[-a-z]+)/$', views.post_list, name='post_list'), url(r'^(?P<board_slug>[-a-z]+)/new/$', views.new_post, name='new...
# Created by JHJ on 2016. 10. 5. from django.conf.urls import url from . import views app_name = 'board' urlpatterns = [ url(r'^$', views.board_list, name='board_list'), url(r'^(?P<board_slug>[-a-z]+)/$', views.post_list, name='post_list'), url(r'^(?P<board_slug>[-a-z]+)/new/$', views.new_post, name='new...
<commit_before># Created by JHJ on 2016. 10. 5. from django.conf.urls import url from . import views app_name = 'board' urlpatterns = [ url(r'^$', views.board_list, name='board_list'), url(r'^(?P<board_slug>[-a-z]+)/$', views.post_list, name='post_list'), url(r'^(?P<board_slug>[-a-z]+)/new/$', views.new_...
# Created by JHJ on 2016. 10. 5. from django.conf.urls import url from . import views app_name = 'board' urlpatterns = [ url(r'^$', views.board_list, name='board_list'), url(r'^(?P<board_slug>[-a-z]+)/$', views.post_list, name='post_list'), url(r'^(?P<board_slug>[-a-z]+)/new/$', views.new_post, name='new...
# Created by JHJ on 2016. 10. 5. from django.conf.urls import url from . import views app_name = 'board' urlpatterns = [ url(r'^$', views.board_list, name='board_list'), url(r'^(?P<board_slug>[-a-z]+)/$', views.post_list, name='post_list'), url(r'^(?P<board_slug>[-a-z]+)/new/$', views.new_post, name='new...
<commit_before># Created by JHJ on 2016. 10. 5. from django.conf.urls import url from . import views app_name = 'board' urlpatterns = [ url(r'^$', views.board_list, name='board_list'), url(r'^(?P<board_slug>[-a-z]+)/$', views.post_list, name='post_list'), url(r'^(?P<board_slug>[-a-z]+)/new/$', views.new_...
a2627a5e0fc68be04af50259e1fd504be389aeb1
kino/utils/config.py
kino/utils/config.py
from utils.data_handler import DataHandler class Config(object): class __Config: def __init__(self): self.data_handler = DataHandler() self.fname = "config.json" config = self.__read_config() self.kino = config["kino"] self.github = config["gith...
# -*- coding: utf-8 -*- from utils.data_handler import DataHandler class Config(object): class __Config: def __init__(self): self.data_handler = DataHandler() self.fname = "config.json" config = self.__read_config() self.kino = config["kino"] se...
Add Config weather - (DARKSKY API KEY, HOME, WORK_PLACE
Add Config weather - (DARKSKY API KEY, HOME, WORK_PLACE
Python
mit
DongjunLee/kino-bot
from utils.data_handler import DataHandler class Config(object): class __Config: def __init__(self): self.data_handler = DataHandler() self.fname = "config.json" config = self.__read_config() self.kino = config["kino"] self.github = config["gith...
# -*- coding: utf-8 -*- from utils.data_handler import DataHandler class Config(object): class __Config: def __init__(self): self.data_handler = DataHandler() self.fname = "config.json" config = self.__read_config() self.kino = config["kino"] se...
<commit_before> from utils.data_handler import DataHandler class Config(object): class __Config: def __init__(self): self.data_handler = DataHandler() self.fname = "config.json" config = self.__read_config() self.kino = config["kino"] self.github...
# -*- coding: utf-8 -*- from utils.data_handler import DataHandler class Config(object): class __Config: def __init__(self): self.data_handler = DataHandler() self.fname = "config.json" config = self.__read_config() self.kino = config["kino"] se...
from utils.data_handler import DataHandler class Config(object): class __Config: def __init__(self): self.data_handler = DataHandler() self.fname = "config.json" config = self.__read_config() self.kino = config["kino"] self.github = config["gith...
<commit_before> from utils.data_handler import DataHandler class Config(object): class __Config: def __init__(self): self.data_handler = DataHandler() self.fname = "config.json" config = self.__read_config() self.kino = config["kino"] self.github...
57f2a438845cd0d7263da6ac66142d5403e41d98
examples/markdown/build.py
examples/markdown/build.py
#!/usr/bin/env python3 # build.py import os # Markdown to HTML library # https://pypi.org/project/Markdown/ import markdown from staticjinja import Site markdowner = markdown.Markdown(output_format="html5") def md_context(template): with open(template.filename) as f: markdown_content = f.read() ...
#!/usr/bin/env python3 # build.py import os from pathlib import Path import markdown from staticjinja import Site markdowner = markdown.Markdown(output_format="html5") def md_context(template): markdown_content = Path(template.filename).read_text() return {"post_content_html": markdowner.convert(markdown_c...
Simplify markdown example using pathlib
example: Simplify markdown example using pathlib
Python
mit
Ceasar/staticjinja,Ceasar/staticjinja
#!/usr/bin/env python3 # build.py import os # Markdown to HTML library # https://pypi.org/project/Markdown/ import markdown from staticjinja import Site markdowner = markdown.Markdown(output_format="html5") def md_context(template): with open(template.filename) as f: markdown_content = f.read() ...
#!/usr/bin/env python3 # build.py import os from pathlib import Path import markdown from staticjinja import Site markdowner = markdown.Markdown(output_format="html5") def md_context(template): markdown_content = Path(template.filename).read_text() return {"post_content_html": markdowner.convert(markdown_c...
<commit_before>#!/usr/bin/env python3 # build.py import os # Markdown to HTML library # https://pypi.org/project/Markdown/ import markdown from staticjinja import Site markdowner = markdown.Markdown(output_format="html5") def md_context(template): with open(template.filename) as f: markdown_content = f...
#!/usr/bin/env python3 # build.py import os from pathlib import Path import markdown from staticjinja import Site markdowner = markdown.Markdown(output_format="html5") def md_context(template): markdown_content = Path(template.filename).read_text() return {"post_content_html": markdowner.convert(markdown_c...
#!/usr/bin/env python3 # build.py import os # Markdown to HTML library # https://pypi.org/project/Markdown/ import markdown from staticjinja import Site markdowner = markdown.Markdown(output_format="html5") def md_context(template): with open(template.filename) as f: markdown_content = f.read() ...
<commit_before>#!/usr/bin/env python3 # build.py import os # Markdown to HTML library # https://pypi.org/project/Markdown/ import markdown from staticjinja import Site markdowner = markdown.Markdown(output_format="html5") def md_context(template): with open(template.filename) as f: markdown_content = f...
986dc7064f1dfb651d6185c38a2b5070bf8926f8
examples/restore_alerts.py
examples/restore_alerts.py
#!/usr/bin/env python # # Restore Alerts of the format in a JSON dumpfile from the list_alerts.py example. # import os import sys import json sys.path.insert(0, os.path.join(os.path.dirname(os.path.realpath(sys.argv[0])), '..')) from sdcclient import SdcClient # # Parse arguments # if len(sys.argv) != 3: print 'u...
#!/usr/bin/env python # # Restore Alerts of the format in a JSON dumpfile from the list_alerts.py example. # import os import sys import json sys.path.insert(0, os.path.join(os.path.dirname(os.path.realpath(sys.argv[0])), '..')) from sdcclient import SdcClient # # Parse arguments # if len(sys.argv) != 3: print 'u...
Append note to Description indicating the Alert was created programmatically
Append note to Description indicating the Alert was created programmatically
Python
mit
draios/python-sdc-client,draios/python-sdc-client
#!/usr/bin/env python # # Restore Alerts of the format in a JSON dumpfile from the list_alerts.py example. # import os import sys import json sys.path.insert(0, os.path.join(os.path.dirname(os.path.realpath(sys.argv[0])), '..')) from sdcclient import SdcClient # # Parse arguments # if len(sys.argv) != 3: print 'u...
#!/usr/bin/env python # # Restore Alerts of the format in a JSON dumpfile from the list_alerts.py example. # import os import sys import json sys.path.insert(0, os.path.join(os.path.dirname(os.path.realpath(sys.argv[0])), '..')) from sdcclient import SdcClient # # Parse arguments # if len(sys.argv) != 3: print 'u...
<commit_before>#!/usr/bin/env python # # Restore Alerts of the format in a JSON dumpfile from the list_alerts.py example. # import os import sys import json sys.path.insert(0, os.path.join(os.path.dirname(os.path.realpath(sys.argv[0])), '..')) from sdcclient import SdcClient # # Parse arguments # if len(sys.argv) != ...
#!/usr/bin/env python # # Restore Alerts of the format in a JSON dumpfile from the list_alerts.py example. # import os import sys import json sys.path.insert(0, os.path.join(os.path.dirname(os.path.realpath(sys.argv[0])), '..')) from sdcclient import SdcClient # # Parse arguments # if len(sys.argv) != 3: print 'u...
#!/usr/bin/env python # # Restore Alerts of the format in a JSON dumpfile from the list_alerts.py example. # import os import sys import json sys.path.insert(0, os.path.join(os.path.dirname(os.path.realpath(sys.argv[0])), '..')) from sdcclient import SdcClient # # Parse arguments # if len(sys.argv) != 3: print 'u...
<commit_before>#!/usr/bin/env python # # Restore Alerts of the format in a JSON dumpfile from the list_alerts.py example. # import os import sys import json sys.path.insert(0, os.path.join(os.path.dirname(os.path.realpath(sys.argv[0])), '..')) from sdcclient import SdcClient # # Parse arguments # if len(sys.argv) != ...
eecde2e8fdd3b105e68a5bd4bab16bdfb9767546
eximhandler/eximhandler.py
eximhandler/eximhandler.py
import logging from subprocess import Popen, PIPE class EximHandler(logging.Handler): """ A handler class which sends an email using exim for each logging event. """ def __init__(self, toaddr, subject, exim_path="/usr/sbin/exim"): """ Initialize the handler. """ logging...
import logging from subprocess import Popen, PIPE class EximHandler(logging.Handler): """ A handler class which sends an email using exim for each logging event. """ def __init__(self, toaddr, subject, exim_path="/usr/sbin/exim"): """ Initialize the handler. """ logging...
Fix to allow overriding subject formatting
Fix to allow overriding subject formatting
Python
unlicense
danmichaelo/eximhandler
import logging from subprocess import Popen, PIPE class EximHandler(logging.Handler): """ A handler class which sends an email using exim for each logging event. """ def __init__(self, toaddr, subject, exim_path="/usr/sbin/exim"): """ Initialize the handler. """ logging...
import logging from subprocess import Popen, PIPE class EximHandler(logging.Handler): """ A handler class which sends an email using exim for each logging event. """ def __init__(self, toaddr, subject, exim_path="/usr/sbin/exim"): """ Initialize the handler. """ logging...
<commit_before>import logging from subprocess import Popen, PIPE class EximHandler(logging.Handler): """ A handler class which sends an email using exim for each logging event. """ def __init__(self, toaddr, subject, exim_path="/usr/sbin/exim"): """ Initialize the handler. """ ...
import logging from subprocess import Popen, PIPE class EximHandler(logging.Handler): """ A handler class which sends an email using exim for each logging event. """ def __init__(self, toaddr, subject, exim_path="/usr/sbin/exim"): """ Initialize the handler. """ logging...
import logging from subprocess import Popen, PIPE class EximHandler(logging.Handler): """ A handler class which sends an email using exim for each logging event. """ def __init__(self, toaddr, subject, exim_path="/usr/sbin/exim"): """ Initialize the handler. """ logging...
<commit_before>import logging from subprocess import Popen, PIPE class EximHandler(logging.Handler): """ A handler class which sends an email using exim for each logging event. """ def __init__(self, toaddr, subject, exim_path="/usr/sbin/exim"): """ Initialize the handler. """ ...
22b8e32cc350228b328f026ccf9e3e90ef9f2aed
manoseimas/settings/vagrant.py
manoseimas/settings/vagrant.py
from manoseimas.settings.base import * # noqa from manoseimas.settings.development import * # noqa INTERNAL_IPS = ( '127.0.0.1', '10.0.2.2', # Vagrant host IP in default config ) DATABASES = { 'default': { 'ENGINE': 'django.db.backends.mysql', 'OPTIONS': { 'init_command': 'S...
from manoseimas.settings.base import * # noqa from manoseimas.settings.development import * # noqa INTERNAL_IPS = ( '127.0.0.1', '10.0.2.2', # Vagrant host IP in default config ) DATABASES = { 'default': { 'ENGINE': 'django.db.backends.mysql', 'OPTIONS': { 'init_command': ('...
Set STRICT_ALL_TABLES on connection to prevent MySQL from silently truncating data.
Set STRICT_ALL_TABLES on connection to prevent MySQL from silently truncating data.
Python
agpl-3.0
ManoSeimas/manoseimas.lt,ManoSeimas/manoseimas.lt,ManoSeimas/manoseimas.lt,ManoSeimas/manoseimas.lt
from manoseimas.settings.base import * # noqa from manoseimas.settings.development import * # noqa INTERNAL_IPS = ( '127.0.0.1', '10.0.2.2', # Vagrant host IP in default config ) DATABASES = { 'default': { 'ENGINE': 'django.db.backends.mysql', 'OPTIONS': { 'init_command': 'S...
from manoseimas.settings.base import * # noqa from manoseimas.settings.development import * # noqa INTERNAL_IPS = ( '127.0.0.1', '10.0.2.2', # Vagrant host IP in default config ) DATABASES = { 'default': { 'ENGINE': 'django.db.backends.mysql', 'OPTIONS': { 'init_command': ('...
<commit_before>from manoseimas.settings.base import * # noqa from manoseimas.settings.development import * # noqa INTERNAL_IPS = ( '127.0.0.1', '10.0.2.2', # Vagrant host IP in default config ) DATABASES = { 'default': { 'ENGINE': 'django.db.backends.mysql', 'OPTIONS': { 'in...
from manoseimas.settings.base import * # noqa from manoseimas.settings.development import * # noqa INTERNAL_IPS = ( '127.0.0.1', '10.0.2.2', # Vagrant host IP in default config ) DATABASES = { 'default': { 'ENGINE': 'django.db.backends.mysql', 'OPTIONS': { 'init_command': ('...
from manoseimas.settings.base import * # noqa from manoseimas.settings.development import * # noqa INTERNAL_IPS = ( '127.0.0.1', '10.0.2.2', # Vagrant host IP in default config ) DATABASES = { 'default': { 'ENGINE': 'django.db.backends.mysql', 'OPTIONS': { 'init_command': 'S...
<commit_before>from manoseimas.settings.base import * # noqa from manoseimas.settings.development import * # noqa INTERNAL_IPS = ( '127.0.0.1', '10.0.2.2', # Vagrant host IP in default config ) DATABASES = { 'default': { 'ENGINE': 'django.db.backends.mysql', 'OPTIONS': { 'in...
7a94ef4efddc639a13c00669c4cf10f07e8aa290
mezzanine/pages/context_processors.py
mezzanine/pages/context_processors.py
from mezzanine.pages.models import Page def page(request): """ Adds the current page to the template context and runs its ``set_helper`` method. This was previously part of ``PageMiddleware``, but moved to a context processor so that we could assign these template context variables without the...
from mezzanine.pages.models import Page def page(request): """ Adds the current page to the template context and runs its ``set_helper`` method. This was previously part of ``PageMiddleware``, but moved to a context processor so that we could assign these template context variables without th...
Clean up page context processor check.
Clean up page context processor check.
Python
bsd-2-clause
wbtuomela/mezzanine,dsanders11/mezzanine,christianwgd/mezzanine,Cicero-Zhao/mezzanine,geodesign/mezzanine,promil23/mezzanine,sjdines/mezzanine,industrydive/mezzanine,sjuxax/mezzanine,dsanders11/mezzanine,christianwgd/mezzanine,ryneeverett/mezzanine,viaregio/mezzanine,geodesign/mezzanine,ryneeverett/mezzanine,vladir/mez...
from mezzanine.pages.models import Page def page(request): """ Adds the current page to the template context and runs its ``set_helper`` method. This was previously part of ``PageMiddleware``, but moved to a context processor so that we could assign these template context variables without the...
from mezzanine.pages.models import Page def page(request): """ Adds the current page to the template context and runs its ``set_helper`` method. This was previously part of ``PageMiddleware``, but moved to a context processor so that we could assign these template context variables without th...
<commit_before>from mezzanine.pages.models import Page def page(request): """ Adds the current page to the template context and runs its ``set_helper`` method. This was previously part of ``PageMiddleware``, but moved to a context processor so that we could assign these template context variables ...
from mezzanine.pages.models import Page def page(request): """ Adds the current page to the template context and runs its ``set_helper`` method. This was previously part of ``PageMiddleware``, but moved to a context processor so that we could assign these template context variables without th...
from mezzanine.pages.models import Page def page(request): """ Adds the current page to the template context and runs its ``set_helper`` method. This was previously part of ``PageMiddleware``, but moved to a context processor so that we could assign these template context variables without the...
<commit_before>from mezzanine.pages.models import Page def page(request): """ Adds the current page to the template context and runs its ``set_helper`` method. This was previously part of ``PageMiddleware``, but moved to a context processor so that we could assign these template context variables ...
61d455cbc2b4177fbb4640211679f5c1948042ff
configurator/__init__.py
configurator/__init__.py
# # Copyright 2015 Yasser Gonzalez Fernandez # # 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 # """Calculation of optimal configuration...
# # Copyright 2015 Yasser Gonzalez Fernandez # # 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 # """Calculation of optimal configuration...
Hide stderr output when calling get to get version
Hide stderr output when calling get to get version
Python
apache-2.0
yasserglez/configurator,yasserglez/configurator
# # Copyright 2015 Yasser Gonzalez Fernandez # # 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 # """Calculation of optimal configuration...
# # Copyright 2015 Yasser Gonzalez Fernandez # # 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 # """Calculation of optimal configuration...
<commit_before># # Copyright 2015 Yasser Gonzalez Fernandez # # 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 # """Calculation of optima...
# # Copyright 2015 Yasser Gonzalez Fernandez # # 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 # """Calculation of optimal configuration...
# # Copyright 2015 Yasser Gonzalez Fernandez # # 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 # """Calculation of optimal configuration...
<commit_before># # Copyright 2015 Yasser Gonzalez Fernandez # # 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 # """Calculation of optima...