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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
e8caf759d9e120b08a2c7ec456c16245b1caf235 | setup.py | setup.py | #!/usr/bin/env python
import os
import sys
import skosprovider
try:
from setuptools import setup
except ImportError:
from distutils.core import setup
packages = [
'skosprovider',
]
requires = [
'language-tags',
'rfc3987',
'pyld',
'html5lib'
]
setup(
name='skosprovider',
version... | #!/usr/bin/env python
import os
import sys
import skosprovider
try:
from setuptools import setup
except ImportError:
from distutils.core import setup
packages = [
'skosprovider',
]
requires = [
'language-tags',
'rfc3987',
'pyld',
'html5lib'
]
setup(
name='skosprovider',
version... | Add long description content type. | Add long description content type.
| Python | mit | koenedaele/skosprovider | #!/usr/bin/env python
import os
import sys
import skosprovider
try:
from setuptools import setup
except ImportError:
from distutils.core import setup
packages = [
'skosprovider',
]
requires = [
'language-tags',
'rfc3987',
'pyld',
'html5lib'
]
setup(
name='skosprovider',
version... | #!/usr/bin/env python
import os
import sys
import skosprovider
try:
from setuptools import setup
except ImportError:
from distutils.core import setup
packages = [
'skosprovider',
]
requires = [
'language-tags',
'rfc3987',
'pyld',
'html5lib'
]
setup(
name='skosprovider',
version... | <commit_before>#!/usr/bin/env python
import os
import sys
import skosprovider
try:
from setuptools import setup
except ImportError:
from distutils.core import setup
packages = [
'skosprovider',
]
requires = [
'language-tags',
'rfc3987',
'pyld',
'html5lib'
]
setup(
name='skosprovide... | #!/usr/bin/env python
import os
import sys
import skosprovider
try:
from setuptools import setup
except ImportError:
from distutils.core import setup
packages = [
'skosprovider',
]
requires = [
'language-tags',
'rfc3987',
'pyld',
'html5lib'
]
setup(
name='skosprovider',
version... | #!/usr/bin/env python
import os
import sys
import skosprovider
try:
from setuptools import setup
except ImportError:
from distutils.core import setup
packages = [
'skosprovider',
]
requires = [
'language-tags',
'rfc3987',
'pyld',
'html5lib'
]
setup(
name='skosprovider',
version... | <commit_before>#!/usr/bin/env python
import os
import sys
import skosprovider
try:
from setuptools import setup
except ImportError:
from distutils.core import setup
packages = [
'skosprovider',
]
requires = [
'language-tags',
'rfc3987',
'pyld',
'html5lib'
]
setup(
name='skosprovide... |
3016fa866ee2a3b9c9ba6ce6fcaf4d83e22c4ffe | setup.py | setup.py | from distutils.core import setup
with open('requirements.txt') as req_file:
requirements = req_file.read().splitlines()
setup(
name='fleet-py',
install_requires=requirements,
version='0.1.0',
description='Fleet SDK Wrapper for Python',
author='Sukrit Khera',
author_email='',
url='https... | from distutils.core import setup
with open('requirements.txt') as req_file:
requirements = req_file.read().splitlines()
setup(
name='fleet-py',
install_requires=requirements,
version='0.1.1',
description='Fleet SDK Wrapper for Python',
author='Sukrit Khera',
author_email='',
url='https... | Bump up version to 0.1.1 | Bump up version to 0.1.1
| Python | mit | totem/fleet-py | from distutils.core import setup
with open('requirements.txt') as req_file:
requirements = req_file.read().splitlines()
setup(
name='fleet-py',
install_requires=requirements,
version='0.1.0',
description='Fleet SDK Wrapper for Python',
author='Sukrit Khera',
author_email='',
url='https... | from distutils.core import setup
with open('requirements.txt') as req_file:
requirements = req_file.read().splitlines()
setup(
name='fleet-py',
install_requires=requirements,
version='0.1.1',
description='Fleet SDK Wrapper for Python',
author='Sukrit Khera',
author_email='',
url='https... | <commit_before>from distutils.core import setup
with open('requirements.txt') as req_file:
requirements = req_file.read().splitlines()
setup(
name='fleet-py',
install_requires=requirements,
version='0.1.0',
description='Fleet SDK Wrapper for Python',
author='Sukrit Khera',
author_email='',... | from distutils.core import setup
with open('requirements.txt') as req_file:
requirements = req_file.read().splitlines()
setup(
name='fleet-py',
install_requires=requirements,
version='0.1.1',
description='Fleet SDK Wrapper for Python',
author='Sukrit Khera',
author_email='',
url='https... | from distutils.core import setup
with open('requirements.txt') as req_file:
requirements = req_file.read().splitlines()
setup(
name='fleet-py',
install_requires=requirements,
version='0.1.0',
description='Fleet SDK Wrapper for Python',
author='Sukrit Khera',
author_email='',
url='https... | <commit_before>from distutils.core import setup
with open('requirements.txt') as req_file:
requirements = req_file.read().splitlines()
setup(
name='fleet-py',
install_requires=requirements,
version='0.1.0',
description='Fleet SDK Wrapper for Python',
author='Sukrit Khera',
author_email='',... |
13eb0661c9025eed45d02dea93c622b87366b0c8 | setup.py | setup.py | # -*- coding: utf-8 -*-
"""installer script for pywikibot 2.0 framework"""
#
# (C) Pywikipedia team, 2009-2012
#
__version__ = '$Id$'
#
# Distributed under the terms of the MIT license.
#
import sys
from distribute_setup import use_setuptools
use_setuptools()
from setuptools import setup, find_packages
if sys.versi... | # -*- coding: utf-8 -*-
"""installer script for pywikibot 2.0 framework"""
#
# (C) Pywikipedia team, 2009-2012
#
__version__ = '$Id$'
#
# Distributed under the terms of the MIT license.
#
import sys
from distribute_setup import use_setuptools
use_setuptools()
from setuptools import setup, find_packages
if sys.versi... | Add simplejson as a required module | Add simplejson as a required module
git-svn-id: 9a050473c2aca1e14f53d73349e19b938c2cf203@11666 6a7f98fc-eeb0-4dc1-a6e2-c2c589a08aa6
| Python | mit | legoktm/pywikipedia-rewrite | # -*- coding: utf-8 -*-
"""installer script for pywikibot 2.0 framework"""
#
# (C) Pywikipedia team, 2009-2012
#
__version__ = '$Id$'
#
# Distributed under the terms of the MIT license.
#
import sys
from distribute_setup import use_setuptools
use_setuptools()
from setuptools import setup, find_packages
if sys.versi... | # -*- coding: utf-8 -*-
"""installer script for pywikibot 2.0 framework"""
#
# (C) Pywikipedia team, 2009-2012
#
__version__ = '$Id$'
#
# Distributed under the terms of the MIT license.
#
import sys
from distribute_setup import use_setuptools
use_setuptools()
from setuptools import setup, find_packages
if sys.versi... | <commit_before># -*- coding: utf-8 -*-
"""installer script for pywikibot 2.0 framework"""
#
# (C) Pywikipedia team, 2009-2012
#
__version__ = '$Id$'
#
# Distributed under the terms of the MIT license.
#
import sys
from distribute_setup import use_setuptools
use_setuptools()
from setuptools import setup, find_package... | # -*- coding: utf-8 -*-
"""installer script for pywikibot 2.0 framework"""
#
# (C) Pywikipedia team, 2009-2012
#
__version__ = '$Id$'
#
# Distributed under the terms of the MIT license.
#
import sys
from distribute_setup import use_setuptools
use_setuptools()
from setuptools import setup, find_packages
if sys.versi... | # -*- coding: utf-8 -*-
"""installer script for pywikibot 2.0 framework"""
#
# (C) Pywikipedia team, 2009-2012
#
__version__ = '$Id$'
#
# Distributed under the terms of the MIT license.
#
import sys
from distribute_setup import use_setuptools
use_setuptools()
from setuptools import setup, find_packages
if sys.versi... | <commit_before># -*- coding: utf-8 -*-
"""installer script for pywikibot 2.0 framework"""
#
# (C) Pywikipedia team, 2009-2012
#
__version__ = '$Id$'
#
# Distributed under the terms of the MIT license.
#
import sys
from distribute_setup import use_setuptools
use_setuptools()
from setuptools import setup, find_package... |
d9ed64e66486905b53b020c0ae75cd3cffd232d2 | setup.py | setup.py | from setuptools import find_packages, setup
from virtualenvapi import __version__
setup(
name='virtualenv-api',
version=__version__,
license='BSD',
author='Sam Kingston and AUTHORS',
author_email='[email protected]',
description='An API for virtualenv/pip',
long_description=open('README.rst... | from setuptools import find_packages, setup
from virtualenvapi import __version__
setup(
name='virtualenv-api',
version=__version__,
license='BSD',
author='Sam Kingston and AUTHORS',
author_email='[email protected]',
description='An API for virtualenv/pip',
long_description=open('README.rst... | Add 3.6 to trove classifiers | Add 3.6 to trove classifiers [skipci]
| Python | bsd-2-clause | sjkingo/virtualenv-api | from setuptools import find_packages, setup
from virtualenvapi import __version__
setup(
name='virtualenv-api',
version=__version__,
license='BSD',
author='Sam Kingston and AUTHORS',
author_email='[email protected]',
description='An API for virtualenv/pip',
long_description=open('README.rst... | from setuptools import find_packages, setup
from virtualenvapi import __version__
setup(
name='virtualenv-api',
version=__version__,
license='BSD',
author='Sam Kingston and AUTHORS',
author_email='[email protected]',
description='An API for virtualenv/pip',
long_description=open('README.rst... | <commit_before>from setuptools import find_packages, setup
from virtualenvapi import __version__
setup(
name='virtualenv-api',
version=__version__,
license='BSD',
author='Sam Kingston and AUTHORS',
author_email='[email protected]',
description='An API for virtualenv/pip',
long_description=o... | from setuptools import find_packages, setup
from virtualenvapi import __version__
setup(
name='virtualenv-api',
version=__version__,
license='BSD',
author='Sam Kingston and AUTHORS',
author_email='[email protected]',
description='An API for virtualenv/pip',
long_description=open('README.rst... | from setuptools import find_packages, setup
from virtualenvapi import __version__
setup(
name='virtualenv-api',
version=__version__,
license='BSD',
author='Sam Kingston and AUTHORS',
author_email='[email protected]',
description='An API for virtualenv/pip',
long_description=open('README.rst... | <commit_before>from setuptools import find_packages, setup
from virtualenvapi import __version__
setup(
name='virtualenv-api',
version=__version__,
license='BSD',
author='Sam Kingston and AUTHORS',
author_email='[email protected]',
description='An API for virtualenv/pip',
long_description=o... |
98e88294f1648776f053985d445a16649bc41b6f | setup.py | setup.py | from setuptools import setup
with open("README.rst") as f:
readme = f.read()
setup(
name="rply",
description="A pure Python Lex/Yacc that works with RPython",
long_description=readme,
version="0.7.1",
author="Alex Gaynor",
author_email="[email protected]",
packages=["rply"],
)
| from setuptools import setup
with open("README.rst") as f:
readme = f.read()
setup(
name="rply",
description="A pure Python Lex/Yacc that works with RPython",
long_description=readme,
version="0.7.2",
author="Alex Gaynor",
author_email="[email protected]",
packages=["rply"],
)
| Bump version number for release | Bump version number for release
| Python | bsd-3-clause | agamdua/rply,agamdua/rply | from setuptools import setup
with open("README.rst") as f:
readme = f.read()
setup(
name="rply",
description="A pure Python Lex/Yacc that works with RPython",
long_description=readme,
version="0.7.1",
author="Alex Gaynor",
author_email="[email protected]",
packages=["rply"],
)
Bum... | from setuptools import setup
with open("README.rst") as f:
readme = f.read()
setup(
name="rply",
description="A pure Python Lex/Yacc that works with RPython",
long_description=readme,
version="0.7.2",
author="Alex Gaynor",
author_email="[email protected]",
packages=["rply"],
)
| <commit_before>from setuptools import setup
with open("README.rst") as f:
readme = f.read()
setup(
name="rply",
description="A pure Python Lex/Yacc that works with RPython",
long_description=readme,
version="0.7.1",
author="Alex Gaynor",
author_email="[email protected]",
packages=... | from setuptools import setup
with open("README.rst") as f:
readme = f.read()
setup(
name="rply",
description="A pure Python Lex/Yacc that works with RPython",
long_description=readme,
version="0.7.2",
author="Alex Gaynor",
author_email="[email protected]",
packages=["rply"],
)
| from setuptools import setup
with open("README.rst") as f:
readme = f.read()
setup(
name="rply",
description="A pure Python Lex/Yacc that works with RPython",
long_description=readme,
version="0.7.1",
author="Alex Gaynor",
author_email="[email protected]",
packages=["rply"],
)
Bum... | <commit_before>from setuptools import setup
with open("README.rst") as f:
readme = f.read()
setup(
name="rply",
description="A pure Python Lex/Yacc that works with RPython",
long_description=readme,
version="0.7.1",
author="Alex Gaynor",
author_email="[email protected]",
packages=... |
c8aec8f354cc1166e2f9e6d8e1fc9be454708c36 | setup.py | setup.py | #!/usr/bin/env python
from os.path import exists
from setuptools import setup
setup(name='cachey',
version='0.2.0',
description='Caching mindful of computation/storage costs',
classifiers=[
"Development Status :: 4 - Beta",
"Intended Audience :: Developers",
"Intended Audie... | #!/usr/bin/env python
from os.path import exists
from setuptools import setup
setup(name='cachey',
version='0.2.0',
description='Caching mindful of computation/storage costs',
classifiers=[
"Development Status :: 4 - Beta",
"Intended Audience :: Developers",
"Intended Audie... | Update content type for description | DOC: Update content type for description
PyPI rejects uploads that fail to render.
| Python | bsd-3-clause | blaze/cachey | #!/usr/bin/env python
from os.path import exists
from setuptools import setup
setup(name='cachey',
version='0.2.0',
description='Caching mindful of computation/storage costs',
classifiers=[
"Development Status :: 4 - Beta",
"Intended Audience :: Developers",
"Intended Audie... | #!/usr/bin/env python
from os.path import exists
from setuptools import setup
setup(name='cachey',
version='0.2.0',
description='Caching mindful of computation/storage costs',
classifiers=[
"Development Status :: 4 - Beta",
"Intended Audience :: Developers",
"Intended Audie... | <commit_before>#!/usr/bin/env python
from os.path import exists
from setuptools import setup
setup(name='cachey',
version='0.2.0',
description='Caching mindful of computation/storage costs',
classifiers=[
"Development Status :: 4 - Beta",
"Intended Audience :: Developers",
... | #!/usr/bin/env python
from os.path import exists
from setuptools import setup
setup(name='cachey',
version='0.2.0',
description='Caching mindful of computation/storage costs',
classifiers=[
"Development Status :: 4 - Beta",
"Intended Audience :: Developers",
"Intended Audie... | #!/usr/bin/env python
from os.path import exists
from setuptools import setup
setup(name='cachey',
version='0.2.0',
description='Caching mindful of computation/storage costs',
classifiers=[
"Development Status :: 4 - Beta",
"Intended Audience :: Developers",
"Intended Audie... | <commit_before>#!/usr/bin/env python
from os.path import exists
from setuptools import setup
setup(name='cachey',
version='0.2.0',
description='Caching mindful of computation/storage costs',
classifiers=[
"Development Status :: 4 - Beta",
"Intended Audience :: Developers",
... |
e4a13b635367ed0100281be5f024f44588eb3a0b | setup.py | setup.py | from setuptools import setup, find_packages
__version__ = "0.0.13"
setup(
# package name in pypi
name='django-oscar-api',
# extract version from module.
version=__version__,
description="REST API module for django-oscar",
long_description=open('README.rst').read(),
classifiers=[
... | from setuptools import setup, find_packages
__version__ = "0.0.13"
setup(
# package name in pypi
name='django-oscar-api',
# extract version from module.
version=__version__,
description="REST API module for django-oscar",
long_description=open('README.rst').read(),
classifiers=[
... | Use django rest framework > 3.1 | Use django rest framework > 3.1
| Python | bsd-3-clause | regulusweb/django-oscar-api,crgwbr/django-oscar-api | from setuptools import setup, find_packages
__version__ = "0.0.13"
setup(
# package name in pypi
name='django-oscar-api',
# extract version from module.
version=__version__,
description="REST API module for django-oscar",
long_description=open('README.rst').read(),
classifiers=[
... | from setuptools import setup, find_packages
__version__ = "0.0.13"
setup(
# package name in pypi
name='django-oscar-api',
# extract version from module.
version=__version__,
description="REST API module for django-oscar",
long_description=open('README.rst').read(),
classifiers=[
... | <commit_before>from setuptools import setup, find_packages
__version__ = "0.0.13"
setup(
# package name in pypi
name='django-oscar-api',
# extract version from module.
version=__version__,
description="REST API module for django-oscar",
long_description=open('README.rst').read(),
classif... | from setuptools import setup, find_packages
__version__ = "0.0.13"
setup(
# package name in pypi
name='django-oscar-api',
# extract version from module.
version=__version__,
description="REST API module for django-oscar",
long_description=open('README.rst').read(),
classifiers=[
... | from setuptools import setup, find_packages
__version__ = "0.0.13"
setup(
# package name in pypi
name='django-oscar-api',
# extract version from module.
version=__version__,
description="REST API module for django-oscar",
long_description=open('README.rst').read(),
classifiers=[
... | <commit_before>from setuptools import setup, find_packages
__version__ = "0.0.13"
setup(
# package name in pypi
name='django-oscar-api',
# extract version from module.
version=__version__,
description="REST API module for django-oscar",
long_description=open('README.rst').read(),
classif... |
77dc80e60b252833940dc6b2a1c512684ed8decd | doc/conf.py | doc/conf.py | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
# Use sphinx-quickstart to create your own conf.py file!
# After that, you have to edit a few things. See below.
# Select nbsphinx and, if needed, add a math extension (mathjax or pngmath):
extensions = [
'nbsphinx',
'sphinx.ext.mathjax',
]
# Exclude build dire... | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
# Use sphinx-quickstart to create your own conf.py file!
# After that, you have to edit a few things. See below.
# Select nbsphinx and, if needed, add a math extension (mathjax or pngmath):
extensions = [
'nbsphinx',
'sphinx.ext.mathjax',
]
# Exclude build dire... | Set default syntax highlighting language to 'none' | DOC: Set default syntax highlighting language to 'none'
| Python | mit | spatialaudio/nbsphinx,spatialaudio/nbsphinx,spatialaudio/nbsphinx | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
# Use sphinx-quickstart to create your own conf.py file!
# After that, you have to edit a few things. See below.
# Select nbsphinx and, if needed, add a math extension (mathjax or pngmath):
extensions = [
'nbsphinx',
'sphinx.ext.mathjax',
]
# Exclude build dire... | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
# Use sphinx-quickstart to create your own conf.py file!
# After that, you have to edit a few things. See below.
# Select nbsphinx and, if needed, add a math extension (mathjax or pngmath):
extensions = [
'nbsphinx',
'sphinx.ext.mathjax',
]
# Exclude build dire... | <commit_before>#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# Use sphinx-quickstart to create your own conf.py file!
# After that, you have to edit a few things. See below.
# Select nbsphinx and, if needed, add a math extension (mathjax or pngmath):
extensions = [
'nbsphinx',
'sphinx.ext.mathjax',
]
# Exc... | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
# Use sphinx-quickstart to create your own conf.py file!
# After that, you have to edit a few things. See below.
# Select nbsphinx and, if needed, add a math extension (mathjax or pngmath):
extensions = [
'nbsphinx',
'sphinx.ext.mathjax',
]
# Exclude build dire... | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
# Use sphinx-quickstart to create your own conf.py file!
# After that, you have to edit a few things. See below.
# Select nbsphinx and, if needed, add a math extension (mathjax or pngmath):
extensions = [
'nbsphinx',
'sphinx.ext.mathjax',
]
# Exclude build dire... | <commit_before>#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# Use sphinx-quickstart to create your own conf.py file!
# After that, you have to edit a few things. See below.
# Select nbsphinx and, if needed, add a math extension (mathjax or pngmath):
extensions = [
'nbsphinx',
'sphinx.ext.mathjax',
]
# Exc... |
ca81dead53e199bc69fe6a5d0ffbaaa735a4367b | setup.py | setup.py | #!/usr/bin/env python
"""
Raven
======
Raven is a Python client for `Sentry <http://aboutsentry.com/>`_. It provides
full out-of-the-box support for many of the popular frameworks, including
Django, and Flask. Raven also includes drop-in support for any WSGI-compatible
web application.
"""
from setuptools import setu... | #!/usr/bin/env python
"""
Raven
======
Raven is a Python client for `Sentry <http://aboutsentry.com/>`_. It provides
full out-of-the-box support for many of the popular frameworks, including
Django, and Flask. Raven also includes drop-in support for any WSGI-compatible
web application.
"""
from setuptools import setu... | Drop alpha tag from package | Drop alpha tag from package
| Python | bsd-3-clause | smarkets/raven-python,beniwohli/apm-agent-python,tarkatronic/opbeat_python,daikeren/opbeat_python,alex/raven,jmp0xf/raven-python,hzy/raven-python,nikolas/raven-python,beniwohli/apm-agent-python,inspirehep/raven-python,johansteffner/raven-python,someonehan/raven-python,smarkets/raven-python,recht/raven-python,smarkets/r... | #!/usr/bin/env python
"""
Raven
======
Raven is a Python client for `Sentry <http://aboutsentry.com/>`_. It provides
full out-of-the-box support for many of the popular frameworks, including
Django, and Flask. Raven also includes drop-in support for any WSGI-compatible
web application.
"""
from setuptools import setu... | #!/usr/bin/env python
"""
Raven
======
Raven is a Python client for `Sentry <http://aboutsentry.com/>`_. It provides
full out-of-the-box support for many of the popular frameworks, including
Django, and Flask. Raven also includes drop-in support for any WSGI-compatible
web application.
"""
from setuptools import setu... | <commit_before>#!/usr/bin/env python
"""
Raven
======
Raven is a Python client for `Sentry <http://aboutsentry.com/>`_. It provides
full out-of-the-box support for many of the popular frameworks, including
Django, and Flask. Raven also includes drop-in support for any WSGI-compatible
web application.
"""
from setupto... | #!/usr/bin/env python
"""
Raven
======
Raven is a Python client for `Sentry <http://aboutsentry.com/>`_. It provides
full out-of-the-box support for many of the popular frameworks, including
Django, and Flask. Raven also includes drop-in support for any WSGI-compatible
web application.
"""
from setuptools import setu... | #!/usr/bin/env python
"""
Raven
======
Raven is a Python client for `Sentry <http://aboutsentry.com/>`_. It provides
full out-of-the-box support for many of the popular frameworks, including
Django, and Flask. Raven also includes drop-in support for any WSGI-compatible
web application.
"""
from setuptools import setu... | <commit_before>#!/usr/bin/env python
"""
Raven
======
Raven is a Python client for `Sentry <http://aboutsentry.com/>`_. It provides
full out-of-the-box support for many of the popular frameworks, including
Django, and Flask. Raven also includes drop-in support for any WSGI-compatible
web application.
"""
from setupto... |
3803eae05013c04b4cf4516f40a851da048d939f | setup.py | setup.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import os
import sys
try:
from setuptools import setup
except ImportError:
from distutils.core import setup
if sys.argv[-1] == 'publish':
os.system('python setup.py sdist upload')
sys.exit()
requires = ['pyrax==1.4.7',
'ipython==0.13.2',
... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import os
import sys
try:
from setuptools import setup
except ImportError:
from distutils.core import setup
if sys.argv[-1] == 'publish':
os.system('python setup.py sdist upload')
sys.exit()
requires = ['pyrax==1.4.7',
'ipython==0.13.2',
... | Add pyzmq. Note: this package doesn't need it but IPython notebook does | Add pyzmq. Note: this package doesn't need it but IPython notebook does
| Python | apache-2.0 | rgbkrk/bookstore | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import os
import sys
try:
from setuptools import setup
except ImportError:
from distutils.core import setup
if sys.argv[-1] == 'publish':
os.system('python setup.py sdist upload')
sys.exit()
requires = ['pyrax==1.4.7',
'ipython==0.13.2',
... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import os
import sys
try:
from setuptools import setup
except ImportError:
from distutils.core import setup
if sys.argv[-1] == 'publish':
os.system('python setup.py sdist upload')
sys.exit()
requires = ['pyrax==1.4.7',
'ipython==0.13.2',
... | <commit_before>#!/usr/bin/env python
# -*- coding: utf-8 -*-
import os
import sys
try:
from setuptools import setup
except ImportError:
from distutils.core import setup
if sys.argv[-1] == 'publish':
os.system('python setup.py sdist upload')
sys.exit()
requires = ['pyrax==1.4.7',
'ipytho... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import os
import sys
try:
from setuptools import setup
except ImportError:
from distutils.core import setup
if sys.argv[-1] == 'publish':
os.system('python setup.py sdist upload')
sys.exit()
requires = ['pyrax==1.4.7',
'ipython==0.13.2',
... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import os
import sys
try:
from setuptools import setup
except ImportError:
from distutils.core import setup
if sys.argv[-1] == 'publish':
os.system('python setup.py sdist upload')
sys.exit()
requires = ['pyrax==1.4.7',
'ipython==0.13.2',
... | <commit_before>#!/usr/bin/env python
# -*- coding: utf-8 -*-
import os
import sys
try:
from setuptools import setup
except ImportError:
from distutils.core import setup
if sys.argv[-1] == 'publish':
os.system('python setup.py sdist upload')
sys.exit()
requires = ['pyrax==1.4.7',
'ipytho... |
8da759ff201c9cc61783663edf4cd3cb8e5c694d | setup.py | setup.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from setuptools import setup
import glob
from spec_cleaner import __version__
test_requires = [
'mock',
'nose',
]
setup(
name='spec_cleaner',
description = 'RPM .spec files cleaner',
long_description = 'Command-line tool for cleaning various formattin... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from setuptools import setup
import glob
from spec_cleaner import __version__
test_requires = [
'mock',
'nose',
]
setup(
name='spec_cleaner',
description = 'RPM .spec files cleaner',
long_description = 'Command-line tool for cleaning various formattin... | Install the data files correctly too. | Install the data files correctly too.
| Python | bsd-3-clause | plusky/spec-cleaner,plusky/spec-cleaner,plusky/spec-cleaner,plusky/spec-cleaner,plusky/spec-cleaner,pombredanne/spec-cleaner,pombredanne/spec-cleaner | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from setuptools import setup
import glob
from spec_cleaner import __version__
test_requires = [
'mock',
'nose',
]
setup(
name='spec_cleaner',
description = 'RPM .spec files cleaner',
long_description = 'Command-line tool for cleaning various formattin... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from setuptools import setup
import glob
from spec_cleaner import __version__
test_requires = [
'mock',
'nose',
]
setup(
name='spec_cleaner',
description = 'RPM .spec files cleaner',
long_description = 'Command-line tool for cleaning various formattin... | <commit_before>#!/usr/bin/env python
# -*- coding: utf-8 -*-
from setuptools import setup
import glob
from spec_cleaner import __version__
test_requires = [
'mock',
'nose',
]
setup(
name='spec_cleaner',
description = 'RPM .spec files cleaner',
long_description = 'Command-line tool for cleaning va... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from setuptools import setup
import glob
from spec_cleaner import __version__
test_requires = [
'mock',
'nose',
]
setup(
name='spec_cleaner',
description = 'RPM .spec files cleaner',
long_description = 'Command-line tool for cleaning various formattin... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from setuptools import setup
import glob
from spec_cleaner import __version__
test_requires = [
'mock',
'nose',
]
setup(
name='spec_cleaner',
description = 'RPM .spec files cleaner',
long_description = 'Command-line tool for cleaning various formattin... | <commit_before>#!/usr/bin/env python
# -*- coding: utf-8 -*-
from setuptools import setup
import glob
from spec_cleaner import __version__
test_requires = [
'mock',
'nose',
]
setup(
name='spec_cleaner',
description = 'RPM .spec files cleaner',
long_description = 'Command-line tool for cleaning va... |
09474810b671f65ec4ce829bd345ddc94d038a63 | setup.py | setup.py | from setuptools import setup
setup(
name='trac-github',
version='2.1.5',
author='Aymeric Augustin',
author_email='[email protected]',
url='https://github.com/trac-hacks/trac-github',
description='Trac - GitHub integration',
download_url='http://pypi.python.org/pypi/trac-github',
... | from setuptools import setup
setup(
name='trac-github',
version='2.1.5',
author='Aymeric Augustin',
author_email='[email protected]',
url='https://github.com/trac-hacks/trac-github',
description='Trac - GitHub integration',
download_url='https://pypi.python.org/pypi/trac-github',
... | Use HTTPS in download URL | Use HTTPS in download URL
It appears that PyPI is now HTTPS-only. | Python | bsd-3-clause | trac-hacks/trac-github | from setuptools import setup
setup(
name='trac-github',
version='2.1.5',
author='Aymeric Augustin',
author_email='[email protected]',
url='https://github.com/trac-hacks/trac-github',
description='Trac - GitHub integration',
download_url='http://pypi.python.org/pypi/trac-github',
... | from setuptools import setup
setup(
name='trac-github',
version='2.1.5',
author='Aymeric Augustin',
author_email='[email protected]',
url='https://github.com/trac-hacks/trac-github',
description='Trac - GitHub integration',
download_url='https://pypi.python.org/pypi/trac-github',
... | <commit_before>from setuptools import setup
setup(
name='trac-github',
version='2.1.5',
author='Aymeric Augustin',
author_email='[email protected]',
url='https://github.com/trac-hacks/trac-github',
description='Trac - GitHub integration',
download_url='http://pypi.python.org/pypi/tra... | from setuptools import setup
setup(
name='trac-github',
version='2.1.5',
author='Aymeric Augustin',
author_email='[email protected]',
url='https://github.com/trac-hacks/trac-github',
description='Trac - GitHub integration',
download_url='https://pypi.python.org/pypi/trac-github',
... | from setuptools import setup
setup(
name='trac-github',
version='2.1.5',
author='Aymeric Augustin',
author_email='[email protected]',
url='https://github.com/trac-hacks/trac-github',
description='Trac - GitHub integration',
download_url='http://pypi.python.org/pypi/trac-github',
... | <commit_before>from setuptools import setup
setup(
name='trac-github',
version='2.1.5',
author='Aymeric Augustin',
author_email='[email protected]',
url='https://github.com/trac-hacks/trac-github',
description='Trac - GitHub integration',
download_url='http://pypi.python.org/pypi/tra... |
b254afaea67e08d83611423a3a1ec7afcee849b3 | setup.py | setup.py | """Install Wallace as a command line utility."""
from setuptools import setup
setup_args = dict(
name='wallace-platform',
packages=['wallace'],
version="0.11.2",
description='Wallace, a platform for experimental cultural evolution',
url='http://github.com/berkeley-cocosci/Wallace',
author='Ber... | """Install Wallace as a command line utility."""
from setuptools import setup
setup_args = dict(
name='wallace-platform',
packages=['wallace'],
version="0.11.2",
description='Wallace, a platform for experimental cultural evolution',
url='http://github.com/berkeley-cocosci/Wallace',
author='Ber... | Add custom psiTurk as dependency link | Add custom psiTurk as dependency link
| Python | mit | jcpeterson/Dallinger,jcpeterson/Dallinger,berkeley-cocosci/Wallace,Dallinger/Dallinger,jcpeterson/Dallinger,suchow/Wallace,Dallinger/Dallinger,suchow/Wallace,Dallinger/Dallinger,berkeley-cocosci/Wallace,jcpeterson/Dallinger,Dallinger/Dallinger,suchow/Wallace,jcpeterson/Dallinger,Dallinger/Dallinger,berkeley-cocosci/Wal... | """Install Wallace as a command line utility."""
from setuptools import setup
setup_args = dict(
name='wallace-platform',
packages=['wallace'],
version="0.11.2",
description='Wallace, a platform for experimental cultural evolution',
url='http://github.com/berkeley-cocosci/Wallace',
author='Ber... | """Install Wallace as a command line utility."""
from setuptools import setup
setup_args = dict(
name='wallace-platform',
packages=['wallace'],
version="0.11.2",
description='Wallace, a platform for experimental cultural evolution',
url='http://github.com/berkeley-cocosci/Wallace',
author='Ber... | <commit_before>"""Install Wallace as a command line utility."""
from setuptools import setup
setup_args = dict(
name='wallace-platform',
packages=['wallace'],
version="0.11.2",
description='Wallace, a platform for experimental cultural evolution',
url='http://github.com/berkeley-cocosci/Wallace',
... | """Install Wallace as a command line utility."""
from setuptools import setup
setup_args = dict(
name='wallace-platform',
packages=['wallace'],
version="0.11.2",
description='Wallace, a platform for experimental cultural evolution',
url='http://github.com/berkeley-cocosci/Wallace',
author='Ber... | """Install Wallace as a command line utility."""
from setuptools import setup
setup_args = dict(
name='wallace-platform',
packages=['wallace'],
version="0.11.2",
description='Wallace, a platform for experimental cultural evolution',
url='http://github.com/berkeley-cocosci/Wallace',
author='Ber... | <commit_before>"""Install Wallace as a command line utility."""
from setuptools import setup
setup_args = dict(
name='wallace-platform',
packages=['wallace'],
version="0.11.2",
description='Wallace, a platform for experimental cultural evolution',
url='http://github.com/berkeley-cocosci/Wallace',
... |
c0b2afcac4279f97bc110813549c389b125ca900 | setup.py | setup.py | # -*- coding: utf-8 -*-
from setuptools import setup
setup(
name="mailroom",
description="The mailroom implementation tracks donations and send thank you letters.",
version='0.1.0',
author="Zach Rickert, Steven Than, David Smith",
author_email="[email protected], [email protected], dbsmith... | # -*- coding: utf-8 -*-
from setuptools import setup
setup(
name="mailroom",
description="The mailroom implementation tracks donations and send thank you letters.",
version='0.1.0',
author="Zach Rickert, Steven Than, David Smith",
author_email="[email protected], [email protected], dbsmith... | Add entry point to run mailroom from command line. | Add entry point to run mailroom from command line.
| Python | mit | zachrickert/mailroom | # -*- coding: utf-8 -*-
from setuptools import setup
setup(
name="mailroom",
description="The mailroom implementation tracks donations and send thank you letters.",
version='0.1.0',
author="Zach Rickert, Steven Than, David Smith",
author_email="[email protected], [email protected], dbsmith... | # -*- coding: utf-8 -*-
from setuptools import setup
setup(
name="mailroom",
description="The mailroom implementation tracks donations and send thank you letters.",
version='0.1.0',
author="Zach Rickert, Steven Than, David Smith",
author_email="[email protected], [email protected], dbsmith... | <commit_before># -*- coding: utf-8 -*-
from setuptools import setup
setup(
name="mailroom",
description="The mailroom implementation tracks donations and send thank you letters.",
version='0.1.0',
author="Zach Rickert, Steven Than, David Smith",
author_email="[email protected], steventhan11@gma... | # -*- coding: utf-8 -*-
from setuptools import setup
setup(
name="mailroom",
description="The mailroom implementation tracks donations and send thank you letters.",
version='0.1.0',
author="Zach Rickert, Steven Than, David Smith",
author_email="[email protected], [email protected], dbsmith... | # -*- coding: utf-8 -*-
from setuptools import setup
setup(
name="mailroom",
description="The mailroom implementation tracks donations and send thank you letters.",
version='0.1.0',
author="Zach Rickert, Steven Than, David Smith",
author_email="[email protected], [email protected], dbsmith... | <commit_before># -*- coding: utf-8 -*-
from setuptools import setup
setup(
name="mailroom",
description="The mailroom implementation tracks donations and send thank you letters.",
version='0.1.0',
author="Zach Rickert, Steven Than, David Smith",
author_email="[email protected], steventhan11@gma... |
3064dd0fbddd24c5ca30bd39a90187991c3e0861 | setup.py | setup.py | #!/usr/bin/env python
import io
from os import path
from setuptools import setup, find_packages
from pywind import __version__
# Get the long description from the relevant file
here = path.abspath(path.dirname(__file__))
with io.open(path.join(here, 'README.md'), encoding='utf-8') as f:
long_description = f.read(... | #!/usr/bin/env python
import io
from os import path
from setuptools import setup, find_packages
from pywind import __version__
# Get the long description from the relevant file
here = path.abspath(path.dirname(__file__))
with io.open(path.join(here, 'README.md'), encoding='utf-8') as f:
long_description = f.read(... | Add requests as a requirement. | Add requests as a requirement.
| Python | unlicense | zathras777/pywind,zathras777/pywind | #!/usr/bin/env python
import io
from os import path
from setuptools import setup, find_packages
from pywind import __version__
# Get the long description from the relevant file
here = path.abspath(path.dirname(__file__))
with io.open(path.join(here, 'README.md'), encoding='utf-8') as f:
long_description = f.read(... | #!/usr/bin/env python
import io
from os import path
from setuptools import setup, find_packages
from pywind import __version__
# Get the long description from the relevant file
here = path.abspath(path.dirname(__file__))
with io.open(path.join(here, 'README.md'), encoding='utf-8') as f:
long_description = f.read(... | <commit_before>#!/usr/bin/env python
import io
from os import path
from setuptools import setup, find_packages
from pywind import __version__
# Get the long description from the relevant file
here = path.abspath(path.dirname(__file__))
with io.open(path.join(here, 'README.md'), encoding='utf-8') as f:
long_descri... | #!/usr/bin/env python
import io
from os import path
from setuptools import setup, find_packages
from pywind import __version__
# Get the long description from the relevant file
here = path.abspath(path.dirname(__file__))
with io.open(path.join(here, 'README.md'), encoding='utf-8') as f:
long_description = f.read(... | #!/usr/bin/env python
import io
from os import path
from setuptools import setup, find_packages
from pywind import __version__
# Get the long description from the relevant file
here = path.abspath(path.dirname(__file__))
with io.open(path.join(here, 'README.md'), encoding='utf-8') as f:
long_description = f.read(... | <commit_before>#!/usr/bin/env python
import io
from os import path
from setuptools import setup, find_packages
from pywind import __version__
# Get the long description from the relevant file
here = path.abspath(path.dirname(__file__))
with io.open(path.join(here, 'README.md'), encoding='utf-8') as f:
long_descri... |
b2ff1296b4e82da8dd8f8cf495ad4e837bf92b94 | setup.py | setup.py | from setuptools import setup, find_packages
setup(
name='primestg',
version='1.1.0',
packages=find_packages(),
url='https://github.com/gisce/primestg',
license='GNU Affero General Public License v3',
author='GISCE-TI, S.L.',
author_email='[email protected]',
install_requires=[
'l... | from setuptools import setup, find_packages
setup(
name='primestg',
version='1.1.0',
packages=find_packages(),
url='https://github.com/gisce/primestg',
license='GNU Affero General Public License v3',
author='GISCE-TI, S.L.',
author_email='[email protected]',
install_requires=[
'l... | Add zeep library as requirement | Add zeep library as requirement
| Python | agpl-3.0 | gisce/primestg | from setuptools import setup, find_packages
setup(
name='primestg',
version='1.1.0',
packages=find_packages(),
url='https://github.com/gisce/primestg',
license='GNU Affero General Public License v3',
author='GISCE-TI, S.L.',
author_email='[email protected]',
install_requires=[
'l... | from setuptools import setup, find_packages
setup(
name='primestg',
version='1.1.0',
packages=find_packages(),
url='https://github.com/gisce/primestg',
license='GNU Affero General Public License v3',
author='GISCE-TI, S.L.',
author_email='[email protected]',
install_requires=[
'l... | <commit_before>from setuptools import setup, find_packages
setup(
name='primestg',
version='1.1.0',
packages=find_packages(),
url='https://github.com/gisce/primestg',
license='GNU Affero General Public License v3',
author='GISCE-TI, S.L.',
author_email='[email protected]',
install_requir... | from setuptools import setup, find_packages
setup(
name='primestg',
version='1.1.0',
packages=find_packages(),
url='https://github.com/gisce/primestg',
license='GNU Affero General Public License v3',
author='GISCE-TI, S.L.',
author_email='[email protected]',
install_requires=[
'l... | from setuptools import setup, find_packages
setup(
name='primestg',
version='1.1.0',
packages=find_packages(),
url='https://github.com/gisce/primestg',
license='GNU Affero General Public License v3',
author='GISCE-TI, S.L.',
author_email='[email protected]',
install_requires=[
'l... | <commit_before>from setuptools import setup, find_packages
setup(
name='primestg',
version='1.1.0',
packages=find_packages(),
url='https://github.com/gisce/primestg',
license='GNU Affero General Public License v3',
author='GISCE-TI, S.L.',
author_email='[email protected]',
install_requir... |
e36c4a3f2fa54be390f8b0ae00f9151f95c49ed4 | sqlobject/tests/test_schema.py | sqlobject/tests/test_schema.py | from sqlobject import *
from sqlobject.tests.dbtest import *
########################################
## Schema per connection
########################################
class Test(SQLObject):
foo = UnicodeCol(length=200)
def test_connection_schema():
if not supports('schema'):
return
conn = getCon... | from sqlobject import *
from sqlobject.tests.dbtest import *
########################################
## Schema per connection
########################################
class Test(SQLObject):
foo = UnicodeCol(length=200)
def test_connection_schema():
if not supports('schema'):
return
conn = getCon... | Allow the test to be run without 'schema=' parameter in the DB URI. | Allow the test to be run without 'schema=' parameter in the DB URI.
git-svn-id: 07e5abd2c6e244bc465bf007dc23a4c6bc1bee58@3524 95a46c32-92d2-0310-94a5-8d71aeb3d4b3
| Python | lgpl-2.1 | drnlm/sqlobject,drnlm/sqlobject,sqlobject/sqlobject,sqlobject/sqlobject | from sqlobject import *
from sqlobject.tests.dbtest import *
########################################
## Schema per connection
########################################
class Test(SQLObject):
foo = UnicodeCol(length=200)
def test_connection_schema():
if not supports('schema'):
return
conn = getCon... | from sqlobject import *
from sqlobject.tests.dbtest import *
########################################
## Schema per connection
########################################
class Test(SQLObject):
foo = UnicodeCol(length=200)
def test_connection_schema():
if not supports('schema'):
return
conn = getCon... | <commit_before>from sqlobject import *
from sqlobject.tests.dbtest import *
########################################
## Schema per connection
########################################
class Test(SQLObject):
foo = UnicodeCol(length=200)
def test_connection_schema():
if not supports('schema'):
return
... | from sqlobject import *
from sqlobject.tests.dbtest import *
########################################
## Schema per connection
########################################
class Test(SQLObject):
foo = UnicodeCol(length=200)
def test_connection_schema():
if not supports('schema'):
return
conn = getCon... | from sqlobject import *
from sqlobject.tests.dbtest import *
########################################
## Schema per connection
########################################
class Test(SQLObject):
foo = UnicodeCol(length=200)
def test_connection_schema():
if not supports('schema'):
return
conn = getCon... | <commit_before>from sqlobject import *
from sqlobject.tests.dbtest import *
########################################
## Schema per connection
########################################
class Test(SQLObject):
foo = UnicodeCol(length=200)
def test_connection_schema():
if not supports('schema'):
return
... |
07c768ec9363a99ff2017ba8e2cccca42239e537 | setup.py | setup.py | from setuptools import setup, find_packages
setup(
name='gdcdatamodel',
packages=find_packages(),
install_requires=[
'pytz==2016.4',
'graphviz==0.4.2',
'jsonschema==2.5.1',
'python-dateutil==2.4.2',
'psqlgraph',
'gdcdictionary',
'dictionaryutils>=2.0.... | from setuptools import setup, find_packages
setup(
name='gdcdatamodel',
packages=find_packages(),
install_requires=[
'pytz==2016.4',
'graphviz==0.4.2',
'jsonschema==2.5.1',
'python-dateutil==2.4.2',
'psqlgraph',
'gdcdictionary',
'dictionaryutils>=2.0.... | Update dictionaryutils pins to get latest | chore(pins): Update dictionaryutils pins to get latest
- Update dictionaryutils pins to get version with data release
changes
| Python | apache-2.0 | NCI-GDC/gdcdatamodel,NCI-GDC/gdcdatamodel | from setuptools import setup, find_packages
setup(
name='gdcdatamodel',
packages=find_packages(),
install_requires=[
'pytz==2016.4',
'graphviz==0.4.2',
'jsonschema==2.5.1',
'python-dateutil==2.4.2',
'psqlgraph',
'gdcdictionary',
'dictionaryutils>=2.0.... | from setuptools import setup, find_packages
setup(
name='gdcdatamodel',
packages=find_packages(),
install_requires=[
'pytz==2016.4',
'graphviz==0.4.2',
'jsonschema==2.5.1',
'python-dateutil==2.4.2',
'psqlgraph',
'gdcdictionary',
'dictionaryutils>=2.0.... | <commit_before>from setuptools import setup, find_packages
setup(
name='gdcdatamodel',
packages=find_packages(),
install_requires=[
'pytz==2016.4',
'graphviz==0.4.2',
'jsonschema==2.5.1',
'python-dateutil==2.4.2',
'psqlgraph',
'gdcdictionary',
'dictio... | from setuptools import setup, find_packages
setup(
name='gdcdatamodel',
packages=find_packages(),
install_requires=[
'pytz==2016.4',
'graphviz==0.4.2',
'jsonschema==2.5.1',
'python-dateutil==2.4.2',
'psqlgraph',
'gdcdictionary',
'dictionaryutils>=2.0.... | from setuptools import setup, find_packages
setup(
name='gdcdatamodel',
packages=find_packages(),
install_requires=[
'pytz==2016.4',
'graphviz==0.4.2',
'jsonschema==2.5.1',
'python-dateutil==2.4.2',
'psqlgraph',
'gdcdictionary',
'dictionaryutils>=2.0.... | <commit_before>from setuptools import setup, find_packages
setup(
name='gdcdatamodel',
packages=find_packages(),
install_requires=[
'pytz==2016.4',
'graphviz==0.4.2',
'jsonschema==2.5.1',
'python-dateutil==2.4.2',
'psqlgraph',
'gdcdictionary',
'dictio... |
5709acf3c2effcdeef10323bbc956860c15f7ece | tasks.py | tasks.py | from arctasks import lint # noqa
from arctasks.release import * # noqa
| from arctasks import lint # noqa
from arctasks.python import show_upgraded_packages # noqa
from arctasks.release import * # noqa
| Include show_upgraded_packages task from ARCTasks | Include show_upgraded_packages task from ARCTasks
| Python | mit | wylee/django-arcutils,PSU-OIT-ARC/django-arcutils,wylee/django-arcutils,PSU-OIT-ARC/django-arcutils | from arctasks import lint # noqa
from arctasks.release import * # noqa
Include show_upgraded_packages task from ARCTasks | from arctasks import lint # noqa
from arctasks.python import show_upgraded_packages # noqa
from arctasks.release import * # noqa
| <commit_before>from arctasks import lint # noqa
from arctasks.release import * # noqa
<commit_msg>Include show_upgraded_packages task from ARCTasks<commit_after> | from arctasks import lint # noqa
from arctasks.python import show_upgraded_packages # noqa
from arctasks.release import * # noqa
| from arctasks import lint # noqa
from arctasks.release import * # noqa
Include show_upgraded_packages task from ARCTasksfrom arctasks import lint # noqa
from arctasks.python import show_upgraded_packages # noqa
from arctasks.release import * # noqa
| <commit_before>from arctasks import lint # noqa
from arctasks.release import * # noqa
<commit_msg>Include show_upgraded_packages task from ARCTasks<commit_after>from arctasks import lint # noqa
from arctasks.python import show_upgraded_packages # noqa
from arctasks.release import * # noqa
|
0c20b2194cd608551b1792f036de347bf7a36ddf | packages/QtInventor/__init__.py | packages/QtInventor/__init__.py | """
Helper classes for creating 3D applications with PySide.
PySide is a binding to the Qt cross-platform application framework. This
package contains helper classes that integrate Open Inventor / Coin3D
into PySide based applications, namely:
- QIVWidget: Viewport widget for rendering and interacting with scene
gra... | """
Helper classes for creating 3D applications with PySide.
PySide is a binding to the Qt cross-platform application framework. This
package contains helper classes that integrate Open Inventor / Coin3D
into PySide based applications, namely:
- QIVWidget: Viewport widget for rendering and interacting with scene
gra... | Load extensions given in IV_LIBS variable. | Load extensions given in IV_LIBS variable.
| Python | bsd-3-clause | TheHubbit/PyInventor,TheHubbit/PyInventor | """
Helper classes for creating 3D applications with PySide.
PySide is a binding to the Qt cross-platform application framework. This
package contains helper classes that integrate Open Inventor / Coin3D
into PySide based applications, namely:
- QIVWidget: Viewport widget for rendering and interacting with scene
gra... | """
Helper classes for creating 3D applications with PySide.
PySide is a binding to the Qt cross-platform application framework. This
package contains helper classes that integrate Open Inventor / Coin3D
into PySide based applications, namely:
- QIVWidget: Viewport widget for rendering and interacting with scene
gra... | <commit_before>"""
Helper classes for creating 3D applications with PySide.
PySide is a binding to the Qt cross-platform application framework. This
package contains helper classes that integrate Open Inventor / Coin3D
into PySide based applications, namely:
- QIVWidget: Viewport widget for rendering and interacting w... | """
Helper classes for creating 3D applications with PySide.
PySide is a binding to the Qt cross-platform application framework. This
package contains helper classes that integrate Open Inventor / Coin3D
into PySide based applications, namely:
- QIVWidget: Viewport widget for rendering and interacting with scene
gra... | """
Helper classes for creating 3D applications with PySide.
PySide is a binding to the Qt cross-platform application framework. This
package contains helper classes that integrate Open Inventor / Coin3D
into PySide based applications, namely:
- QIVWidget: Viewport widget for rendering and interacting with scene
gra... | <commit_before>"""
Helper classes for creating 3D applications with PySide.
PySide is a binding to the Qt cross-platform application framework. This
package contains helper classes that integrate Open Inventor / Coin3D
into PySide based applications, namely:
- QIVWidget: Viewport widget for rendering and interacting w... |
93228db226ce9082d5d3bf0e0b7de64ee8b07ca5 | utils.py | utils.py | import os
import sys
import hashlib
def e(s):
if type(s) == str:
return str
return s.encode('utf-8')
def d(s):
if type(s) == unicode:
return s
return unicode(s, 'utf-8')
def mkid(s):
return hashlib.sha1(e(s)).hexdigest()[:2*4]
def running_in_tools_labs():
return os.path.exist... | import os
import sys
import hashlib
def e(s):
if type(s) == str:
return s
return s.encode('utf-8')
def d(s):
if type(s) == unicode:
return s
return unicode(s, 'utf-8')
def mkid(s):
return hashlib.sha1(e(s)).hexdigest()[:2*4]
def running_in_tools_labs():
return os.path.exists(... | Fix string encoding when the argument is already a str(). | Fix string encoding when the argument is already a str().
Former-commit-id: 812fd79675590659b3dc4251ed998f84c4bf2395 | Python | mit | eggpi/citationhunt,eggpi/citationhunt,guilherme-pg/citationhunt,eggpi/citationhunt,guilherme-pg/citationhunt,guilherme-pg/citationhunt,guilherme-pg/citationhunt,eggpi/citationhunt | import os
import sys
import hashlib
def e(s):
if type(s) == str:
return str
return s.encode('utf-8')
def d(s):
if type(s) == unicode:
return s
return unicode(s, 'utf-8')
def mkid(s):
return hashlib.sha1(e(s)).hexdigest()[:2*4]
def running_in_tools_labs():
return os.path.exist... | import os
import sys
import hashlib
def e(s):
if type(s) == str:
return s
return s.encode('utf-8')
def d(s):
if type(s) == unicode:
return s
return unicode(s, 'utf-8')
def mkid(s):
return hashlib.sha1(e(s)).hexdigest()[:2*4]
def running_in_tools_labs():
return os.path.exists(... | <commit_before>import os
import sys
import hashlib
def e(s):
if type(s) == str:
return str
return s.encode('utf-8')
def d(s):
if type(s) == unicode:
return s
return unicode(s, 'utf-8')
def mkid(s):
return hashlib.sha1(e(s)).hexdigest()[:2*4]
def running_in_tools_labs():
retur... | import os
import sys
import hashlib
def e(s):
if type(s) == str:
return s
return s.encode('utf-8')
def d(s):
if type(s) == unicode:
return s
return unicode(s, 'utf-8')
def mkid(s):
return hashlib.sha1(e(s)).hexdigest()[:2*4]
def running_in_tools_labs():
return os.path.exists(... | import os
import sys
import hashlib
def e(s):
if type(s) == str:
return str
return s.encode('utf-8')
def d(s):
if type(s) == unicode:
return s
return unicode(s, 'utf-8')
def mkid(s):
return hashlib.sha1(e(s)).hexdigest()[:2*4]
def running_in_tools_labs():
return os.path.exist... | <commit_before>import os
import sys
import hashlib
def e(s):
if type(s) == str:
return str
return s.encode('utf-8')
def d(s):
if type(s) == unicode:
return s
return unicode(s, 'utf-8')
def mkid(s):
return hashlib.sha1(e(s)).hexdigest()[:2*4]
def running_in_tools_labs():
retur... |
e1b2b35e36566e92bf789c4d5ab7c668d520f492 | taca/illumina/NextSeq_Runs.py | taca/illumina/NextSeq_Runs.py | import os
import re
import csv
import glob
import shutil
import gzip
import operator
import subprocess
from datetime import datetime
from taca.utils.filesystem import chdir, control_fastq_filename
from taca.illumina.Runs import Run
from taca.illumina.HiSeqX_Runs import HiSeqX_Run
from taca.utils import misc
from flowce... | import os
import re
import csv
import glob
import shutil
import gzip
import operator
import subprocess
from datetime import datetime
from taca.utils.filesystem import chdir, control_fastq_filename
from taca.illumina.Runs import Run
from taca.illumina.HiSeqX_Runs import HiSeqX_Run
from taca.utils import misc
import log... | Clear samplesheet parser from header | Clear samplesheet parser from header
| Python | mit | SciLifeLab/TACA,SciLifeLab/TACA,SciLifeLab/TACA | import os
import re
import csv
import glob
import shutil
import gzip
import operator
import subprocess
from datetime import datetime
from taca.utils.filesystem import chdir, control_fastq_filename
from taca.illumina.Runs import Run
from taca.illumina.HiSeqX_Runs import HiSeqX_Run
from taca.utils import misc
from flowce... | import os
import re
import csv
import glob
import shutil
import gzip
import operator
import subprocess
from datetime import datetime
from taca.utils.filesystem import chdir, control_fastq_filename
from taca.illumina.Runs import Run
from taca.illumina.HiSeqX_Runs import HiSeqX_Run
from taca.utils import misc
import log... | <commit_before>import os
import re
import csv
import glob
import shutil
import gzip
import operator
import subprocess
from datetime import datetime
from taca.utils.filesystem import chdir, control_fastq_filename
from taca.illumina.Runs import Run
from taca.illumina.HiSeqX_Runs import HiSeqX_Run
from taca.utils import m... | import os
import re
import csv
import glob
import shutil
import gzip
import operator
import subprocess
from datetime import datetime
from taca.utils.filesystem import chdir, control_fastq_filename
from taca.illumina.Runs import Run
from taca.illumina.HiSeqX_Runs import HiSeqX_Run
from taca.utils import misc
import log... | import os
import re
import csv
import glob
import shutil
import gzip
import operator
import subprocess
from datetime import datetime
from taca.utils.filesystem import chdir, control_fastq_filename
from taca.illumina.Runs import Run
from taca.illumina.HiSeqX_Runs import HiSeqX_Run
from taca.utils import misc
from flowce... | <commit_before>import os
import re
import csv
import glob
import shutil
import gzip
import operator
import subprocess
from datetime import datetime
from taca.utils.filesystem import chdir, control_fastq_filename
from taca.illumina.Runs import Run
from taca.illumina.HiSeqX_Runs import HiSeqX_Run
from taca.utils import m... |
e17fab647a7840bbe56f5c37fbe32c73557d98b2 | workers/subscriptions.py | workers/subscriptions.py | import os
import telegram
from leonard import Leonard
if __name__ == '__main__':
os.chdir('../')
telegram_client = telegram.Bot(os.environ['BOT_TOKEN'])
bot = Leonard(telegram_client)
i = 0
while True:
if i % 10 == 0:
bot.collect_plugins()
for name, check, send in bot.... | import os
import time
import telegram
from leonard import Leonard
if __name__ == '__main__':
os.chdir('../')
telegram_client = telegram.Bot(os.environ['BOT_TOKEN'])
bot = Leonard(telegram_client)
bot.collect_plugins()
while True:
for name, check, send in bot.subscriptions:
sen... | Remove collecting plugins every second | Remove collecting plugins every second
| Python | mit | sevazhidkov/leonard | import os
import telegram
from leonard import Leonard
if __name__ == '__main__':
os.chdir('../')
telegram_client = telegram.Bot(os.environ['BOT_TOKEN'])
bot = Leonard(telegram_client)
i = 0
while True:
if i % 10 == 0:
bot.collect_plugins()
for name, check, send in bot.... | import os
import time
import telegram
from leonard import Leonard
if __name__ == '__main__':
os.chdir('../')
telegram_client = telegram.Bot(os.environ['BOT_TOKEN'])
bot = Leonard(telegram_client)
bot.collect_plugins()
while True:
for name, check, send in bot.subscriptions:
sen... | <commit_before>import os
import telegram
from leonard import Leonard
if __name__ == '__main__':
os.chdir('../')
telegram_client = telegram.Bot(os.environ['BOT_TOKEN'])
bot = Leonard(telegram_client)
i = 0
while True:
if i % 10 == 0:
bot.collect_plugins()
for name, chec... | import os
import time
import telegram
from leonard import Leonard
if __name__ == '__main__':
os.chdir('../')
telegram_client = telegram.Bot(os.environ['BOT_TOKEN'])
bot = Leonard(telegram_client)
bot.collect_plugins()
while True:
for name, check, send in bot.subscriptions:
sen... | import os
import telegram
from leonard import Leonard
if __name__ == '__main__':
os.chdir('../')
telegram_client = telegram.Bot(os.environ['BOT_TOKEN'])
bot = Leonard(telegram_client)
i = 0
while True:
if i % 10 == 0:
bot.collect_plugins()
for name, check, send in bot.... | <commit_before>import os
import telegram
from leonard import Leonard
if __name__ == '__main__':
os.chdir('../')
telegram_client = telegram.Bot(os.environ['BOT_TOKEN'])
bot = Leonard(telegram_client)
i = 0
while True:
if i % 10 == 0:
bot.collect_plugins()
for name, chec... |
657f88cb6e65731ca1d39067094cbe0f5d18e2fc | sample-functions/SentimentAnalysis/handler.py | sample-functions/SentimentAnalysis/handler.py | import sys
import json
from textblob import TextBlob
# set default encoding to UTF-8 to eliminate decoding errors
reload(sys)
sys.setdefaultencoding('utf8')
def get_stdin():
buf = ""
for line in sys.stdin:
buf = buf + line
return buf
if(__name__ == "__main__"):
st = get_stdin()
blob =... | import sys
import json
from textblob import TextBlob
# Set encoding to UTF-8 (vs ASCII to eliminate potential errors).
reload(sys)
sys.setdefaultencoding('utf8')
def get_stdin():
buf = ""
for line in sys.stdin:
buf = buf + line
return buf
if(__name__ == "__main__"):
st = get_stdin()
blob ... | Correct identation error in sample. | Correct identation error in sample.
| Python | mit | openfaas/faas,rgee0/faas,alexellis/faas,rgee0/faas,alexellis/faas,alexellis/faas,haru01/faas,openfaas/faas,haru01/faas,rgee0/faas,alexellis/faas,haru01/faas,rgee0/faas,rgee0/faas,haru01/faas,haru01/faas,alexellis/faas,rgee0/faas,rgee0/faas,rgee0/faas,openfaas/faas,alexellis/faas,alexellis/faas,haru01/faas,rgee0/faas,ha... | import sys
import json
from textblob import TextBlob
# set default encoding to UTF-8 to eliminate decoding errors
reload(sys)
sys.setdefaultencoding('utf8')
def get_stdin():
buf = ""
for line in sys.stdin:
buf = buf + line
return buf
if(__name__ == "__main__"):
st = get_stdin()
blob =... | import sys
import json
from textblob import TextBlob
# Set encoding to UTF-8 (vs ASCII to eliminate potential errors).
reload(sys)
sys.setdefaultencoding('utf8')
def get_stdin():
buf = ""
for line in sys.stdin:
buf = buf + line
return buf
if(__name__ == "__main__"):
st = get_stdin()
blob ... | <commit_before>import sys
import json
from textblob import TextBlob
# set default encoding to UTF-8 to eliminate decoding errors
reload(sys)
sys.setdefaultencoding('utf8')
def get_stdin():
buf = ""
for line in sys.stdin:
buf = buf + line
return buf
if(__name__ == "__main__"):
st = get_std... | import sys
import json
from textblob import TextBlob
# Set encoding to UTF-8 (vs ASCII to eliminate potential errors).
reload(sys)
sys.setdefaultencoding('utf8')
def get_stdin():
buf = ""
for line in sys.stdin:
buf = buf + line
return buf
if(__name__ == "__main__"):
st = get_stdin()
blob ... | import sys
import json
from textblob import TextBlob
# set default encoding to UTF-8 to eliminate decoding errors
reload(sys)
sys.setdefaultencoding('utf8')
def get_stdin():
buf = ""
for line in sys.stdin:
buf = buf + line
return buf
if(__name__ == "__main__"):
st = get_stdin()
blob =... | <commit_before>import sys
import json
from textblob import TextBlob
# set default encoding to UTF-8 to eliminate decoding errors
reload(sys)
sys.setdefaultencoding('utf8')
def get_stdin():
buf = ""
for line in sys.stdin:
buf = buf + line
return buf
if(__name__ == "__main__"):
st = get_std... |
b60f9f22703d97cfaeaa69e36fe283d1ef5d2f5d | download_data.py | download_data.py | import bz2
import urllib.request
OPEN_CORPORA_URL = 'http://opencorpora.org/files/export/annot/annot.opcorpora.no_ambig.xml.bz2'
OPEN_CORPORA_DEST_FILE = 'data/annot.opcorpora.no_ambig.xml'
CHUNK = 16 * 1024
def download_and_unbzip(url, dest_file):
source = urllib.request.urlopen(url)
decompressor ... | import bz2
import urllib.request
import os
import os.path
DATA_DIR = 'data'
OPEN_CORPORA_URL = 'http://opencorpora.org/files/export/annot/annot.opcorpora.no_ambig.xml.bz2'
OPEN_CORPORA_DEST_FILE = 'data/annot.opcorpora.no_ambig.xml'
CHUNK = 16 * 1024
def download_and_unbzip(url, dest_file):
source = ... | Create dir before data downloading | Create dir before data downloading
| Python | mit | Nizametdinov/cnn-pos-tagger | import bz2
import urllib.request
OPEN_CORPORA_URL = 'http://opencorpora.org/files/export/annot/annot.opcorpora.no_ambig.xml.bz2'
OPEN_CORPORA_DEST_FILE = 'data/annot.opcorpora.no_ambig.xml'
CHUNK = 16 * 1024
def download_and_unbzip(url, dest_file):
source = urllib.request.urlopen(url)
decompressor ... | import bz2
import urllib.request
import os
import os.path
DATA_DIR = 'data'
OPEN_CORPORA_URL = 'http://opencorpora.org/files/export/annot/annot.opcorpora.no_ambig.xml.bz2'
OPEN_CORPORA_DEST_FILE = 'data/annot.opcorpora.no_ambig.xml'
CHUNK = 16 * 1024
def download_and_unbzip(url, dest_file):
source = ... | <commit_before>import bz2
import urllib.request
OPEN_CORPORA_URL = 'http://opencorpora.org/files/export/annot/annot.opcorpora.no_ambig.xml.bz2'
OPEN_CORPORA_DEST_FILE = 'data/annot.opcorpora.no_ambig.xml'
CHUNK = 16 * 1024
def download_and_unbzip(url, dest_file):
source = urllib.request.urlopen(url)
... | import bz2
import urllib.request
import os
import os.path
DATA_DIR = 'data'
OPEN_CORPORA_URL = 'http://opencorpora.org/files/export/annot/annot.opcorpora.no_ambig.xml.bz2'
OPEN_CORPORA_DEST_FILE = 'data/annot.opcorpora.no_ambig.xml'
CHUNK = 16 * 1024
def download_and_unbzip(url, dest_file):
source = ... | import bz2
import urllib.request
OPEN_CORPORA_URL = 'http://opencorpora.org/files/export/annot/annot.opcorpora.no_ambig.xml.bz2'
OPEN_CORPORA_DEST_FILE = 'data/annot.opcorpora.no_ambig.xml'
CHUNK = 16 * 1024
def download_and_unbzip(url, dest_file):
source = urllib.request.urlopen(url)
decompressor ... | <commit_before>import bz2
import urllib.request
OPEN_CORPORA_URL = 'http://opencorpora.org/files/export/annot/annot.opcorpora.no_ambig.xml.bz2'
OPEN_CORPORA_DEST_FILE = 'data/annot.opcorpora.no_ambig.xml'
CHUNK = 16 * 1024
def download_and_unbzip(url, dest_file):
source = urllib.request.urlopen(url)
... |
19a9ccb0b896c87ba04b47081c6b796cb37bd022 | test/test_cypher.py | test/test_cypher.py | from neomodel import StructuredNode, StringProperty, CypherException
class User2(StructuredNode):
email = StringProperty()
def test_start_cypher():
jim = User2(email='[email protected]').save()
email = jim.start_cypher("RETURN a.email")[0][0][0]
assert email == '[email protected]'
def test_cypher():
jim... | from neomodel import StructuredNode, StringProperty, CypherException
class User2(StructuredNode):
email = StringProperty()
def test_cypher():
jim = User2(email='[email protected]').save()
email = jim.cypher("START a=node({self}) RETURN a.email")[0][0][0]
assert email == '[email protected]'
def test_cypher... | Remove test of deprecated method | Remove test of deprecated method
| Python | mit | bleib1dj/neomodel,robinedwards/neomodel,cristigociu/neomodel_dh,fpieper/neomodel,andrefsp/neomodel,wcooley/neomodel,robinedwards/neomodel,bleib1dj/neomodel,pombredanne/neomodel | from neomodel import StructuredNode, StringProperty, CypherException
class User2(StructuredNode):
email = StringProperty()
def test_start_cypher():
jim = User2(email='[email protected]').save()
email = jim.start_cypher("RETURN a.email")[0][0][0]
assert email == '[email protected]'
def test_cypher():
jim... | from neomodel import StructuredNode, StringProperty, CypherException
class User2(StructuredNode):
email = StringProperty()
def test_cypher():
jim = User2(email='[email protected]').save()
email = jim.cypher("START a=node({self}) RETURN a.email")[0][0][0]
assert email == '[email protected]'
def test_cypher... | <commit_before>from neomodel import StructuredNode, StringProperty, CypherException
class User2(StructuredNode):
email = StringProperty()
def test_start_cypher():
jim = User2(email='[email protected]').save()
email = jim.start_cypher("RETURN a.email")[0][0][0]
assert email == '[email protected]'
def test_cy... | from neomodel import StructuredNode, StringProperty, CypherException
class User2(StructuredNode):
email = StringProperty()
def test_cypher():
jim = User2(email='[email protected]').save()
email = jim.cypher("START a=node({self}) RETURN a.email")[0][0][0]
assert email == '[email protected]'
def test_cypher... | from neomodel import StructuredNode, StringProperty, CypherException
class User2(StructuredNode):
email = StringProperty()
def test_start_cypher():
jim = User2(email='[email protected]').save()
email = jim.start_cypher("RETURN a.email")[0][0][0]
assert email == '[email protected]'
def test_cypher():
jim... | <commit_before>from neomodel import StructuredNode, StringProperty, CypherException
class User2(StructuredNode):
email = StringProperty()
def test_start_cypher():
jim = User2(email='[email protected]').save()
email = jim.start_cypher("RETURN a.email")[0][0][0]
assert email == '[email protected]'
def test_cy... |
7dc239db20a5a0cb507644f1650e2d0fb752608a | migrations/versions/88d46e8e73ef_industry_index_remove_date.py | migrations/versions/88d46e8e73ef_industry_index_remove_date.py | """industry index remove date
Revision ID: 88d46e8e73ef
Revises: 6543398f0773
Create Date: 2016-03-08 19:51:18.026000
"""
# revision identifiers, used by Alembic.
revision = '88d46e8e73ef'
down_revision = '6543398f0773'
import sqlalchemy as sa
from alembic import op
from sqlalchemy.dialects import mysql
def upgra... | """industry index remove date
Revision ID: 88d46e8e73ef
Revises: 6543398f0773
Create Date: 2016-03-08 19:51:18.026000
"""
# revision identifiers, used by Alembic.
revision = '88d46e8e73ef'
down_revision = '6543398f0773'
import sqlalchemy as sa
from alembic import op
from sqlalchemy.dialects import mysql
def upgr... | Fix migration file that didn't work correctly | Fix migration file that didn't work correctly
| Python | bsd-3-clause | Kyria/LazyBlacksmith,Kyria/LazyBlacksmith,Kyria/LazyBlacksmith,Kyria/LazyBlacksmith | """industry index remove date
Revision ID: 88d46e8e73ef
Revises: 6543398f0773
Create Date: 2016-03-08 19:51:18.026000
"""
# revision identifiers, used by Alembic.
revision = '88d46e8e73ef'
down_revision = '6543398f0773'
import sqlalchemy as sa
from alembic import op
from sqlalchemy.dialects import mysql
def upgra... | """industry index remove date
Revision ID: 88d46e8e73ef
Revises: 6543398f0773
Create Date: 2016-03-08 19:51:18.026000
"""
# revision identifiers, used by Alembic.
revision = '88d46e8e73ef'
down_revision = '6543398f0773'
import sqlalchemy as sa
from alembic import op
from sqlalchemy.dialects import mysql
def upgr... | <commit_before>"""industry index remove date
Revision ID: 88d46e8e73ef
Revises: 6543398f0773
Create Date: 2016-03-08 19:51:18.026000
"""
# revision identifiers, used by Alembic.
revision = '88d46e8e73ef'
down_revision = '6543398f0773'
import sqlalchemy as sa
from alembic import op
from sqlalchemy.dialects import m... | """industry index remove date
Revision ID: 88d46e8e73ef
Revises: 6543398f0773
Create Date: 2016-03-08 19:51:18.026000
"""
# revision identifiers, used by Alembic.
revision = '88d46e8e73ef'
down_revision = '6543398f0773'
import sqlalchemy as sa
from alembic import op
from sqlalchemy.dialects import mysql
def upgr... | """industry index remove date
Revision ID: 88d46e8e73ef
Revises: 6543398f0773
Create Date: 2016-03-08 19:51:18.026000
"""
# revision identifiers, used by Alembic.
revision = '88d46e8e73ef'
down_revision = '6543398f0773'
import sqlalchemy as sa
from alembic import op
from sqlalchemy.dialects import mysql
def upgra... | <commit_before>"""industry index remove date
Revision ID: 88d46e8e73ef
Revises: 6543398f0773
Create Date: 2016-03-08 19:51:18.026000
"""
# revision identifiers, used by Alembic.
revision = '88d46e8e73ef'
down_revision = '6543398f0773'
import sqlalchemy as sa
from alembic import op
from sqlalchemy.dialects import m... |
62ca16d355716c3baaf7a661269e54a517fef25d | tests/test_hooks.py | tests/test_hooks.py | from io import BytesIO
from unittest.mock import MagicMock, patch
from isort import hooks
def test_git_hook():
"""Simple smoke level testing of git hooks"""
# Ensure correct subprocess command is called
with patch("subprocess.run", MagicMock()) as run_mock:
hooks.git_hook()
assert run_mo... | from io import BytesIO
from unittest.mock import MagicMock, patch
from isort import hooks
def test_git_hook():
"""Simple smoke level testing of git hooks"""
# Ensure correct subprocess command is called
with patch("subprocess.run", MagicMock()) as run_mock:
hooks.git_hook()
assert run_mo... | Fix mock statement for new API | Fix mock statement for new API
| Python | mit | PyCQA/isort,PyCQA/isort | from io import BytesIO
from unittest.mock import MagicMock, patch
from isort import hooks
def test_git_hook():
"""Simple smoke level testing of git hooks"""
# Ensure correct subprocess command is called
with patch("subprocess.run", MagicMock()) as run_mock:
hooks.git_hook()
assert run_mo... | from io import BytesIO
from unittest.mock import MagicMock, patch
from isort import hooks
def test_git_hook():
"""Simple smoke level testing of git hooks"""
# Ensure correct subprocess command is called
with patch("subprocess.run", MagicMock()) as run_mock:
hooks.git_hook()
assert run_mo... | <commit_before>from io import BytesIO
from unittest.mock import MagicMock, patch
from isort import hooks
def test_git_hook():
"""Simple smoke level testing of git hooks"""
# Ensure correct subprocess command is called
with patch("subprocess.run", MagicMock()) as run_mock:
hooks.git_hook()
... | from io import BytesIO
from unittest.mock import MagicMock, patch
from isort import hooks
def test_git_hook():
"""Simple smoke level testing of git hooks"""
# Ensure correct subprocess command is called
with patch("subprocess.run", MagicMock()) as run_mock:
hooks.git_hook()
assert run_mo... | from io import BytesIO
from unittest.mock import MagicMock, patch
from isort import hooks
def test_git_hook():
"""Simple smoke level testing of git hooks"""
# Ensure correct subprocess command is called
with patch("subprocess.run", MagicMock()) as run_mock:
hooks.git_hook()
assert run_mo... | <commit_before>from io import BytesIO
from unittest.mock import MagicMock, patch
from isort import hooks
def test_git_hook():
"""Simple smoke level testing of git hooks"""
# Ensure correct subprocess command is called
with patch("subprocess.run", MagicMock()) as run_mock:
hooks.git_hook()
... |
c70b6717ec69fbf235b89d34c668686ecf9b8c26 | tests/test_utils.py | tests/test_utils.py | #!/usr/bin/python2.5
#
# Copyright 2008 the Melange authors.
#
# 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... | #!/usr/bin/python2.5
#
# Copyright 2008 the Melange authors.
#
# 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... | Add a start and end method to MockRequest | Add a start and end method to MockRequest
| Python | apache-2.0 | rhyolight/nupic.son,rhyolight/nupic.son,rhyolight/nupic.son | #!/usr/bin/python2.5
#
# Copyright 2008 the Melange authors.
#
# 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... | #!/usr/bin/python2.5
#
# Copyright 2008 the Melange authors.
#
# 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... | <commit_before>#!/usr/bin/python2.5
#
# Copyright 2008 the Melange authors.
#
# 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 require... | #!/usr/bin/python2.5
#
# Copyright 2008 the Melange authors.
#
# 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... | #!/usr/bin/python2.5
#
# Copyright 2008 the Melange authors.
#
# 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... | <commit_before>#!/usr/bin/python2.5
#
# Copyright 2008 the Melange authors.
#
# 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 require... |
118bbc7363dc83947bc74f94f720ef8ecb1705d2 | quickstart/python/understand/example-2/create_joke_task.6.x.py | quickstart/python/understand/example-2/create_joke_task.6.x.py | # Download the helper library from https://www.twilio.com/docs/python/install
from twilio.rest import Client
# Your Account Sid and Auth Token from twilio.com/console
account_sid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'
auth_token = 'your_auth_token'
client = Client(account_sid, auth_token)
# Create a new task named 't... | # Download the helper library from https://www.twilio.com/docs/python/install
from twilio.rest import Client
# Your Account Sid and Auth Token from twilio.com/console
account_sid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'
auth_token = 'your_auth_token'
client = Client(account_sid, auth_token)
# Create a new task named 't... | Print task SID in output | Print task SID in output | Python | mit | TwilioDevEd/api-snippets,TwilioDevEd/api-snippets,TwilioDevEd/api-snippets,TwilioDevEd/api-snippets,TwilioDevEd/api-snippets,TwilioDevEd/api-snippets,TwilioDevEd/api-snippets,TwilioDevEd/api-snippets,TwilioDevEd/api-snippets,TwilioDevEd/api-snippets,TwilioDevEd/api-snippets,TwilioDevEd/api-snippets | # Download the helper library from https://www.twilio.com/docs/python/install
from twilio.rest import Client
# Your Account Sid and Auth Token from twilio.com/console
account_sid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'
auth_token = 'your_auth_token'
client = Client(account_sid, auth_token)
# Create a new task named 't... | # Download the helper library from https://www.twilio.com/docs/python/install
from twilio.rest import Client
# Your Account Sid and Auth Token from twilio.com/console
account_sid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'
auth_token = 'your_auth_token'
client = Client(account_sid, auth_token)
# Create a new task named 't... | <commit_before># Download the helper library from https://www.twilio.com/docs/python/install
from twilio.rest import Client
# Your Account Sid and Auth Token from twilio.com/console
account_sid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'
auth_token = 'your_auth_token'
client = Client(account_sid, auth_token)
# Create a ne... | # Download the helper library from https://www.twilio.com/docs/python/install
from twilio.rest import Client
# Your Account Sid and Auth Token from twilio.com/console
account_sid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'
auth_token = 'your_auth_token'
client = Client(account_sid, auth_token)
# Create a new task named 't... | # Download the helper library from https://www.twilio.com/docs/python/install
from twilio.rest import Client
# Your Account Sid and Auth Token from twilio.com/console
account_sid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'
auth_token = 'your_auth_token'
client = Client(account_sid, auth_token)
# Create a new task named 't... | <commit_before># Download the helper library from https://www.twilio.com/docs/python/install
from twilio.rest import Client
# Your Account Sid and Auth Token from twilio.com/console
account_sid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'
auth_token = 'your_auth_token'
client = Client(account_sid, auth_token)
# Create a ne... |
55f787d653f1ee7b923a460f892a27a4143ec408 | providers/moviedata/provider.py | providers/moviedata/provider.py | from __future__ import print_function
from providers.provider import BaseProvider
# Subclasses implement a way to get movie data for from a search string
#
# To implement a MoviedataProvider:
# - Create a new file in moviedata/ and call it provider_[your name].py
# - Add the path to your file in settings.py, under... | from __future__ import print_function
from providers.provider import BaseProvider
# Subclasses implement a way to get movie data for from a search string
#
# To implement a MoviedataProvider:
# - Create a new file in moviedata/ and call it provider_[your name].py
# - Add the path to your file in settings.py, under... | Add docs for add transform_data helper method. | Add docs for add transform_data helper method.
| Python | mit | EmilStenstrom/nephele | from __future__ import print_function
from providers.provider import BaseProvider
# Subclasses implement a way to get movie data for from a search string
#
# To implement a MoviedataProvider:
# - Create a new file in moviedata/ and call it provider_[your name].py
# - Add the path to your file in settings.py, under... | from __future__ import print_function
from providers.provider import BaseProvider
# Subclasses implement a way to get movie data for from a search string
#
# To implement a MoviedataProvider:
# - Create a new file in moviedata/ and call it provider_[your name].py
# - Add the path to your file in settings.py, under... | <commit_before>from __future__ import print_function
from providers.provider import BaseProvider
# Subclasses implement a way to get movie data for from a search string
#
# To implement a MoviedataProvider:
# - Create a new file in moviedata/ and call it provider_[your name].py
# - Add the path to your file in set... | from __future__ import print_function
from providers.provider import BaseProvider
# Subclasses implement a way to get movie data for from a search string
#
# To implement a MoviedataProvider:
# - Create a new file in moviedata/ and call it provider_[your name].py
# - Add the path to your file in settings.py, under... | from __future__ import print_function
from providers.provider import BaseProvider
# Subclasses implement a way to get movie data for from a search string
#
# To implement a MoviedataProvider:
# - Create a new file in moviedata/ and call it provider_[your name].py
# - Add the path to your file in settings.py, under... | <commit_before>from __future__ import print_function
from providers.provider import BaseProvider
# Subclasses implement a way to get movie data for from a search string
#
# To implement a MoviedataProvider:
# - Create a new file in moviedata/ and call it provider_[your name].py
# - Add the path to your file in set... |
458fb9b764cae3419b6513dcc1fedf2ea8949829 | networkx/generators/tests/test_stochastic.py | networkx/generators/tests/test_stochastic.py | from nose.tools import assert_true, assert_equal,assert_raises
import networkx as nx
def test_stochastic():
G=nx.DiGraph()
G.add_edge(0,1)
G.add_edge(0,2)
S=nx.stochastic_graph(G)
assert_true(nx.is_isomorphic(G,S))
assert_equal(sorted(S.edges(data=True)),
[(0, 1, {'weight': 0.5... | from nose.tools import assert_true, assert_equal,assert_raises
import networkx as nx
def test_stochastic():
G=nx.DiGraph()
G.add_edge(0,1)
G.add_edge(0,2)
S=nx.stochastic_graph(G)
assert_true(nx.is_isomorphic(G,S))
assert_equal(sorted(S.edges(data=True)),
[(0, 1, {'weight': 0.5... | Test stochstic graph with ints | Test stochstic graph with ints
| Python | bsd-3-clause | blublud/networkx,dhimmel/networkx,nathania/networkx,goulu/networkx,ltiao/networkx,ionanrozenfeld/networkx,bzero/networkx,dmoliveira/networkx,aureooms/networkx,yashu-seth/networkx,ghdk/networkx,ionanrozenfeld/networkx,nathania/networkx,harlowja/networkx,michaelpacer/networkx,ionanrozenfeld/networkx,aureooms/networkx,har... | from nose.tools import assert_true, assert_equal,assert_raises
import networkx as nx
def test_stochastic():
G=nx.DiGraph()
G.add_edge(0,1)
G.add_edge(0,2)
S=nx.stochastic_graph(G)
assert_true(nx.is_isomorphic(G,S))
assert_equal(sorted(S.edges(data=True)),
[(0, 1, {'weight': 0.5... | from nose.tools import assert_true, assert_equal,assert_raises
import networkx as nx
def test_stochastic():
G=nx.DiGraph()
G.add_edge(0,1)
G.add_edge(0,2)
S=nx.stochastic_graph(G)
assert_true(nx.is_isomorphic(G,S))
assert_equal(sorted(S.edges(data=True)),
[(0, 1, {'weight': 0.5... | <commit_before>from nose.tools import assert_true, assert_equal,assert_raises
import networkx as nx
def test_stochastic():
G=nx.DiGraph()
G.add_edge(0,1)
G.add_edge(0,2)
S=nx.stochastic_graph(G)
assert_true(nx.is_isomorphic(G,S))
assert_equal(sorted(S.edges(data=True)),
[(0, 1,... | from nose.tools import assert_true, assert_equal,assert_raises
import networkx as nx
def test_stochastic():
G=nx.DiGraph()
G.add_edge(0,1)
G.add_edge(0,2)
S=nx.stochastic_graph(G)
assert_true(nx.is_isomorphic(G,S))
assert_equal(sorted(S.edges(data=True)),
[(0, 1, {'weight': 0.5... | from nose.tools import assert_true, assert_equal,assert_raises
import networkx as nx
def test_stochastic():
G=nx.DiGraph()
G.add_edge(0,1)
G.add_edge(0,2)
S=nx.stochastic_graph(G)
assert_true(nx.is_isomorphic(G,S))
assert_equal(sorted(S.edges(data=True)),
[(0, 1, {'weight': 0.5... | <commit_before>from nose.tools import assert_true, assert_equal,assert_raises
import networkx as nx
def test_stochastic():
G=nx.DiGraph()
G.add_edge(0,1)
G.add_edge(0,2)
S=nx.stochastic_graph(G)
assert_true(nx.is_isomorphic(G,S))
assert_equal(sorted(S.edges(data=True)),
[(0, 1,... |
60cfe690ef44b87b0824fe33255abcd09806ae20 | nn-patterns/utils/tests/networks/__init__.py | nn-patterns/utils/tests/networks/__init__.py | # Begin: Python 2/3 compatibility header small
# Get Python 3 functionality:
from __future__ import\
absolute_import, print_function, division, unicode_literals
from future.utils import raise_with_traceback, raise_from
# catch exception with: except Exception as e
from builtins import range, map, zip, filter
from i... | # Begin: Python 2/3 compatibility header small
# Get Python 3 functionality:
from __future__ import\
absolute_import, print_function, division, unicode_literals
from future.utils import raise_with_traceback, raise_from
# catch exception with: except Exception as e
from builtins import range, map, zip, filter
from i... | Add filter to customize which networks to test. | Add filter to customize which networks to test.
| Python | mit | pikinder/nn-patterns | # Begin: Python 2/3 compatibility header small
# Get Python 3 functionality:
from __future__ import\
absolute_import, print_function, division, unicode_literals
from future.utils import raise_with_traceback, raise_from
# catch exception with: except Exception as e
from builtins import range, map, zip, filter
from i... | # Begin: Python 2/3 compatibility header small
# Get Python 3 functionality:
from __future__ import\
absolute_import, print_function, division, unicode_literals
from future.utils import raise_with_traceback, raise_from
# catch exception with: except Exception as e
from builtins import range, map, zip, filter
from i... | <commit_before># Begin: Python 2/3 compatibility header small
# Get Python 3 functionality:
from __future__ import\
absolute_import, print_function, division, unicode_literals
from future.utils import raise_with_traceback, raise_from
# catch exception with: except Exception as e
from builtins import range, map, zip... | # Begin: Python 2/3 compatibility header small
# Get Python 3 functionality:
from __future__ import\
absolute_import, print_function, division, unicode_literals
from future.utils import raise_with_traceback, raise_from
# catch exception with: except Exception as e
from builtins import range, map, zip, filter
from i... | # Begin: Python 2/3 compatibility header small
# Get Python 3 functionality:
from __future__ import\
absolute_import, print_function, division, unicode_literals
from future.utils import raise_with_traceback, raise_from
# catch exception with: except Exception as e
from builtins import range, map, zip, filter
from i... | <commit_before># Begin: Python 2/3 compatibility header small
# Get Python 3 functionality:
from __future__ import\
absolute_import, print_function, division, unicode_literals
from future.utils import raise_with_traceback, raise_from
# catch exception with: except Exception as e
from builtins import range, map, zip... |
69d856b5b6ec9f87b55174ebbd414d9960bb626d | tests/offline/test_pricing.py | tests/offline/test_pricing.py | #! /usr/bin/env python
# -*- coding: utf-8 -*-
# vim:fenc=utf-8
#
# Copyright © 2016 <>
#
# Distributed under terms of the MIT license.
# Python modules
from __future__ import unicode_literals
# Third-party modules
import pytest
# Project modules
from fnapy.exceptions import FnapyPricingError
from tests import make... | #! /usr/bin/env python
# -*- coding: utf-8 -*-
# vim:fenc=utf-8
#
# Copyright © 2016 <>
#
# Distributed under terms of the MIT license.
# Python modules
from __future__ import unicode_literals
# Third-party modules
import pytest
# Project modules
from fnapy.exceptions import FnapyPricingError
from tests import make... | Update the tests for query_pricing | Update the tests for query_pricing
| Python | mit | alexandriagroup/fnapy,alexandriagroup/fnapy | #! /usr/bin/env python
# -*- coding: utf-8 -*-
# vim:fenc=utf-8
#
# Copyright © 2016 <>
#
# Distributed under terms of the MIT license.
# Python modules
from __future__ import unicode_literals
# Third-party modules
import pytest
# Project modules
from fnapy.exceptions import FnapyPricingError
from tests import make... | #! /usr/bin/env python
# -*- coding: utf-8 -*-
# vim:fenc=utf-8
#
# Copyright © 2016 <>
#
# Distributed under terms of the MIT license.
# Python modules
from __future__ import unicode_literals
# Third-party modules
import pytest
# Project modules
from fnapy.exceptions import FnapyPricingError
from tests import make... | <commit_before>#! /usr/bin/env python
# -*- coding: utf-8 -*-
# vim:fenc=utf-8
#
# Copyright © 2016 <>
#
# Distributed under terms of the MIT license.
# Python modules
from __future__ import unicode_literals
# Third-party modules
import pytest
# Project modules
from fnapy.exceptions import FnapyPricingError
from te... | #! /usr/bin/env python
# -*- coding: utf-8 -*-
# vim:fenc=utf-8
#
# Copyright © 2016 <>
#
# Distributed under terms of the MIT license.
# Python modules
from __future__ import unicode_literals
# Third-party modules
import pytest
# Project modules
from fnapy.exceptions import FnapyPricingError
from tests import make... | #! /usr/bin/env python
# -*- coding: utf-8 -*-
# vim:fenc=utf-8
#
# Copyright © 2016 <>
#
# Distributed under terms of the MIT license.
# Python modules
from __future__ import unicode_literals
# Third-party modules
import pytest
# Project modules
from fnapy.exceptions import FnapyPricingError
from tests import make... | <commit_before>#! /usr/bin/env python
# -*- coding: utf-8 -*-
# vim:fenc=utf-8
#
# Copyright © 2016 <>
#
# Distributed under terms of the MIT license.
# Python modules
from __future__ import unicode_literals
# Third-party modules
import pytest
# Project modules
from fnapy.exceptions import FnapyPricingError
from te... |
7d0f1c9cea6e71d5cc515ae3790226ae6badda79 | Logger.py | Logger.py | import time
class Logger():
def __init__(self, name = "defaultLogFile"):
timestamp = time.strftime('%Y_%m_%d-%H_%M_%S')
self.name = "Logs/" + timestamp + "_" + name + ".txt"
try:
self.logfile = open(self.name, 'w')
self.opened = True
except:
self.... | import time
class Logger():
def __init__(self, name = "defaultLogFile"):
timestamp = time.strftime('%Y_%m_%d-%H_%M_%S')
self.name = "Logs/" + timestamp + "_" + name + ".txt"
try:
self.logfile = open(self.name, 'w')
self.opened = True
except:
self.... | Correct and simplify calculation of miliseconds | Correct and simplify calculation of miliseconds
Signed-off-by: TeaPackCZ <[email protected]>
| Python | mit | TeaPackCZ/RobotZed,TeaPackCZ/RobotZed | import time
class Logger():
def __init__(self, name = "defaultLogFile"):
timestamp = time.strftime('%Y_%m_%d-%H_%M_%S')
self.name = "Logs/" + timestamp + "_" + name + ".txt"
try:
self.logfile = open(self.name, 'w')
self.opened = True
except:
self.... | import time
class Logger():
def __init__(self, name = "defaultLogFile"):
timestamp = time.strftime('%Y_%m_%d-%H_%M_%S')
self.name = "Logs/" + timestamp + "_" + name + ".txt"
try:
self.logfile = open(self.name, 'w')
self.opened = True
except:
self.... | <commit_before>import time
class Logger():
def __init__(self, name = "defaultLogFile"):
timestamp = time.strftime('%Y_%m_%d-%H_%M_%S')
self.name = "Logs/" + timestamp + "_" + name + ".txt"
try:
self.logfile = open(self.name, 'w')
self.opened = True
except:
... | import time
class Logger():
def __init__(self, name = "defaultLogFile"):
timestamp = time.strftime('%Y_%m_%d-%H_%M_%S')
self.name = "Logs/" + timestamp + "_" + name + ".txt"
try:
self.logfile = open(self.name, 'w')
self.opened = True
except:
self.... | import time
class Logger():
def __init__(self, name = "defaultLogFile"):
timestamp = time.strftime('%Y_%m_%d-%H_%M_%S')
self.name = "Logs/" + timestamp + "_" + name + ".txt"
try:
self.logfile = open(self.name, 'w')
self.opened = True
except:
self.... | <commit_before>import time
class Logger():
def __init__(self, name = "defaultLogFile"):
timestamp = time.strftime('%Y_%m_%d-%H_%M_%S')
self.name = "Logs/" + timestamp + "_" + name + ".txt"
try:
self.logfile = open(self.name, 'w')
self.opened = True
except:
... |
fc636b5ae0db4190e0499c6bec58d40ad0d0afe4 | cms/management/commands/subcommands/moderator.py | cms/management/commands/subcommands/moderator.py | # -*- coding: utf-8 -*-
from cms.management.commands.subcommands.base import SubcommandsCommand
from cms.models import CMSPlugin
from cms.models.pagemodel import Page
from django.core.management.base import NoArgsCommand
class ModeratorOnCommand(NoArgsCommand):
help = 'Turn moderation on, run AFTER upgrading to 2... | # -*- coding: utf-8 -*-
from cms.management.commands.subcommands.base import SubcommandsCommand
from cms.models import CMSPlugin
from cms.models.pagemodel import Page
from django.core.management.base import NoArgsCommand
class ModeratorOnCommand(NoArgsCommand):
help = 'Turn moderation on, run AFTER upgrading to 2... | Apply revert to the draft page. | Apply revert to the draft page.
| Python | bsd-3-clause | keimlink/django-cms,mkoistinen/django-cms,foobacca/django-cms,FinalAngel/django-cms,nimbis/django-cms,Jaccorot/django-cms,memnonila/django-cms,nostalgiaz/django-cms,jproffitt/django-cms,adaptivelogic/django-cms,Livefyre/django-cms,sznekol/django-cms,MagicSolutions/django-cms,benzkji/django-cms,iddqd1/django-cms,SinnerS... | # -*- coding: utf-8 -*-
from cms.management.commands.subcommands.base import SubcommandsCommand
from cms.models import CMSPlugin
from cms.models.pagemodel import Page
from django.core.management.base import NoArgsCommand
class ModeratorOnCommand(NoArgsCommand):
help = 'Turn moderation on, run AFTER upgrading to 2... | # -*- coding: utf-8 -*-
from cms.management.commands.subcommands.base import SubcommandsCommand
from cms.models import CMSPlugin
from cms.models.pagemodel import Page
from django.core.management.base import NoArgsCommand
class ModeratorOnCommand(NoArgsCommand):
help = 'Turn moderation on, run AFTER upgrading to 2... | <commit_before># -*- coding: utf-8 -*-
from cms.management.commands.subcommands.base import SubcommandsCommand
from cms.models import CMSPlugin
from cms.models.pagemodel import Page
from django.core.management.base import NoArgsCommand
class ModeratorOnCommand(NoArgsCommand):
help = 'Turn moderation on, run AFTER... | # -*- coding: utf-8 -*-
from cms.management.commands.subcommands.base import SubcommandsCommand
from cms.models import CMSPlugin
from cms.models.pagemodel import Page
from django.core.management.base import NoArgsCommand
class ModeratorOnCommand(NoArgsCommand):
help = 'Turn moderation on, run AFTER upgrading to 2... | # -*- coding: utf-8 -*-
from cms.management.commands.subcommands.base import SubcommandsCommand
from cms.models import CMSPlugin
from cms.models.pagemodel import Page
from django.core.management.base import NoArgsCommand
class ModeratorOnCommand(NoArgsCommand):
help = 'Turn moderation on, run AFTER upgrading to 2... | <commit_before># -*- coding: utf-8 -*-
from cms.management.commands.subcommands.base import SubcommandsCommand
from cms.models import CMSPlugin
from cms.models.pagemodel import Page
from django.core.management.base import NoArgsCommand
class ModeratorOnCommand(NoArgsCommand):
help = 'Turn moderation on, run AFTER... |
0fdaff5b0715722de7590aa2b57266291bafd000 | umibukela/models.py | umibukela/models.py | import os
from django.db import models
# ------------------------------------------------------------------------------
# General utilities
# ------------------------------------------------------------------------------
def image_filename(instance, filename):
""" Make S3 image filenames
"""
return 'ima... | import os
import uuid
from django.db import models
# ------------------------------------------------------------------------------
# General utilities
# ------------------------------------------------------------------------------
def image_filename(instance, filename):
""" Make image filenames
"""
re... | Remove image name dependency on object ID | Remove image name dependency on object ID
| Python | mit | Code4SA/umibukela,Code4SA/umibukela,Code4SA/umibukela,Code4SA/umibukela | import os
from django.db import models
# ------------------------------------------------------------------------------
# General utilities
# ------------------------------------------------------------------------------
def image_filename(instance, filename):
""" Make S3 image filenames
"""
return 'ima... | import os
import uuid
from django.db import models
# ------------------------------------------------------------------------------
# General utilities
# ------------------------------------------------------------------------------
def image_filename(instance, filename):
""" Make image filenames
"""
re... | <commit_before>import os
from django.db import models
# ------------------------------------------------------------------------------
# General utilities
# ------------------------------------------------------------------------------
def image_filename(instance, filename):
""" Make S3 image filenames
"""
... | import os
import uuid
from django.db import models
# ------------------------------------------------------------------------------
# General utilities
# ------------------------------------------------------------------------------
def image_filename(instance, filename):
""" Make image filenames
"""
re... | import os
from django.db import models
# ------------------------------------------------------------------------------
# General utilities
# ------------------------------------------------------------------------------
def image_filename(instance, filename):
""" Make S3 image filenames
"""
return 'ima... | <commit_before>import os
from django.db import models
# ------------------------------------------------------------------------------
# General utilities
# ------------------------------------------------------------------------------
def image_filename(instance, filename):
""" Make S3 image filenames
"""
... |
5afe329b801d6442d3d645f8ba2e591a71e63f85 | 04.py | 04.py | #! /usr/bin/env python3
def main():
pass
if __name__ == '__main__':
main() | #! /usr/bin/env python3
def main():
pass
if __name__ == '__main__':
main()
| Test commit to see if commit signing on Windows works. | Test commit to see if commit signing on Windows works.
| Python | mit | janhenke/project-euler | #! /usr/bin/env python3
def main():
pass
if __name__ == '__main__':
main()Test commit to see if commit signing on Windows works. | #! /usr/bin/env python3
def main():
pass
if __name__ == '__main__':
main()
| <commit_before>#! /usr/bin/env python3
def main():
pass
if __name__ == '__main__':
main()<commit_msg>Test commit to see if commit signing on Windows works.<commit_after> | #! /usr/bin/env python3
def main():
pass
if __name__ == '__main__':
main()
| #! /usr/bin/env python3
def main():
pass
if __name__ == '__main__':
main()Test commit to see if commit signing on Windows works.#! /usr/bin/env python3
def main():
pass
if __name__ == '__main__':
main()
| <commit_before>#! /usr/bin/env python3
def main():
pass
if __name__ == '__main__':
main()<commit_msg>Test commit to see if commit signing on Windows works.<commit_after>#! /usr/bin/env python3
def main():
pass
if __name__ == '__main__':
main()
|
8897defe3b11a6518d3ad1148a5ee9321bfa176c | froniusLogger.py | froniusLogger.py | """
Logs key data from a Fronius inverter to a CSV file for later analysis.
[email protected]
"""
import requests
import json
import datetime
import time
# Set this to the IP address of your inverter
host = "192.168.0.112"
sample_seconds = 60 # how many seconds between samples
def main():
print("started")
... | """
Logs key data from a Fronius inverter to a CSV file for later analysis.
[email protected]
"""
import requests
import json
import datetime
import time
# Set this to the IP address of your inverter
host = "192.168.0.112"
sample_seconds = 60 # how many seconds between samples, set to zero to run once and exit
... | Make the timestamp more sane. Add the ability to run once and exit for use with cron. | Make the timestamp more sane.
Add the ability to run once and exit for use with cron.
| Python | apache-2.0 | peterbmarks/froniusLogger,peterbmarks/froniusLogger | """
Logs key data from a Fronius inverter to a CSV file for later analysis.
[email protected]
"""
import requests
import json
import datetime
import time
# Set this to the IP address of your inverter
host = "192.168.0.112"
sample_seconds = 60 # how many seconds between samples
def main():
print("started")
... | """
Logs key data from a Fronius inverter to a CSV file for later analysis.
[email protected]
"""
import requests
import json
import datetime
import time
# Set this to the IP address of your inverter
host = "192.168.0.112"
sample_seconds = 60 # how many seconds between samples, set to zero to run once and exit
... | <commit_before>"""
Logs key data from a Fronius inverter to a CSV file for later analysis.
[email protected]
"""
import requests
import json
import datetime
import time
# Set this to the IP address of your inverter
host = "192.168.0.112"
sample_seconds = 60 # how many seconds between samples
def main():
pr... | """
Logs key data from a Fronius inverter to a CSV file for later analysis.
[email protected]
"""
import requests
import json
import datetime
import time
# Set this to the IP address of your inverter
host = "192.168.0.112"
sample_seconds = 60 # how many seconds between samples, set to zero to run once and exit
... | """
Logs key data from a Fronius inverter to a CSV file for later analysis.
[email protected]
"""
import requests
import json
import datetime
import time
# Set this to the IP address of your inverter
host = "192.168.0.112"
sample_seconds = 60 # how many seconds between samples
def main():
print("started")
... | <commit_before>"""
Logs key data from a Fronius inverter to a CSV file for later analysis.
[email protected]
"""
import requests
import json
import datetime
import time
# Set this to the IP address of your inverter
host = "192.168.0.112"
sample_seconds = 60 # how many seconds between samples
def main():
pr... |
ce644b55ee72790d111435b81fb76a2ea15913c5 | gabbi/fixture.py | gabbi/fixture.py | """Manage fixtures for gabbi at the test file level."""
def start_fixture(fixture_class):
"""Create the fixture class and start it."""
fixture = fixture_class()
fixture.start()
def stop_fixture(fixture_class):
"""Create the fixture class and stop it."""
fixture = fixture_class()
fixture.stop... | """Manage fixtures for gabbi at the test file level."""
def start_fixture(fixture_class):
"""Create the fixture class and start it."""
fixture = fixture_class()
fixture.start()
def stop_fixture(fixture_class):
"""Re-Create the fixture class and stop it."""
fixture = fixture_class()
fixture.s... | Add some docs to GabbiFixture | Add some docs to GabbiFixture
| Python | apache-2.0 | FND/gabbi,jasonamyers/gabbi,jasonamyers/gabbi,FND/gabbi | """Manage fixtures for gabbi at the test file level."""
def start_fixture(fixture_class):
"""Create the fixture class and start it."""
fixture = fixture_class()
fixture.start()
def stop_fixture(fixture_class):
"""Create the fixture class and stop it."""
fixture = fixture_class()
fixture.stop... | """Manage fixtures for gabbi at the test file level."""
def start_fixture(fixture_class):
"""Create the fixture class and start it."""
fixture = fixture_class()
fixture.start()
def stop_fixture(fixture_class):
"""Re-Create the fixture class and stop it."""
fixture = fixture_class()
fixture.s... | <commit_before>"""Manage fixtures for gabbi at the test file level."""
def start_fixture(fixture_class):
"""Create the fixture class and start it."""
fixture = fixture_class()
fixture.start()
def stop_fixture(fixture_class):
"""Create the fixture class and stop it."""
fixture = fixture_class()
... | """Manage fixtures for gabbi at the test file level."""
def start_fixture(fixture_class):
"""Create the fixture class and start it."""
fixture = fixture_class()
fixture.start()
def stop_fixture(fixture_class):
"""Re-Create the fixture class and stop it."""
fixture = fixture_class()
fixture.s... | """Manage fixtures for gabbi at the test file level."""
def start_fixture(fixture_class):
"""Create the fixture class and start it."""
fixture = fixture_class()
fixture.start()
def stop_fixture(fixture_class):
"""Create the fixture class and stop it."""
fixture = fixture_class()
fixture.stop... | <commit_before>"""Manage fixtures for gabbi at the test file level."""
def start_fixture(fixture_class):
"""Create the fixture class and start it."""
fixture = fixture_class()
fixture.start()
def stop_fixture(fixture_class):
"""Create the fixture class and stop it."""
fixture = fixture_class()
... |
02dec2f8fd426f5d01565bd358dd807e4d1c2d02 | genes/apt/get.py | genes/apt/get.py | import os
from subprocess import call
from functools import partial
#TODO: stop using sudo or ensure it exists
#TODOE: specify user to run as
#TODO: utilize functools partial to handle some of the above functionality
class Config:
APT_GET = ['sudo', '-E', 'apt-get']
ENV = os.environ.copy()
ENV['DEBIAN_FRO... | import os
from subprocess import call
from functools import partial
#TODO: stop using sudo or ensure it exists
#TODOE: specify user to run as
#TODO: utilize functools partial to handle some of the above functionality
class Config:
APT_GET = ['sudo', '-E', 'apt-get']
ENV = os.environ.copy()
ENV['DEBIAN_FRO... | Add recv_keys and add_repo to apt | Add recv_keys and add_repo to apt | Python | mit | hatchery/Genepool2,hatchery/genepool | import os
from subprocess import call
from functools import partial
#TODO: stop using sudo or ensure it exists
#TODOE: specify user to run as
#TODO: utilize functools partial to handle some of the above functionality
class Config:
APT_GET = ['sudo', '-E', 'apt-get']
ENV = os.environ.copy()
ENV['DEBIAN_FRO... | import os
from subprocess import call
from functools import partial
#TODO: stop using sudo or ensure it exists
#TODOE: specify user to run as
#TODO: utilize functools partial to handle some of the above functionality
class Config:
APT_GET = ['sudo', '-E', 'apt-get']
ENV = os.environ.copy()
ENV['DEBIAN_FRO... | <commit_before>import os
from subprocess import call
from functools import partial
#TODO: stop using sudo or ensure it exists
#TODOE: specify user to run as
#TODO: utilize functools partial to handle some of the above functionality
class Config:
APT_GET = ['sudo', '-E', 'apt-get']
ENV = os.environ.copy()
... | import os
from subprocess import call
from functools import partial
#TODO: stop using sudo or ensure it exists
#TODOE: specify user to run as
#TODO: utilize functools partial to handle some of the above functionality
class Config:
APT_GET = ['sudo', '-E', 'apt-get']
ENV = os.environ.copy()
ENV['DEBIAN_FRO... | import os
from subprocess import call
from functools import partial
#TODO: stop using sudo or ensure it exists
#TODOE: specify user to run as
#TODO: utilize functools partial to handle some of the above functionality
class Config:
APT_GET = ['sudo', '-E', 'apt-get']
ENV = os.environ.copy()
ENV['DEBIAN_FRO... | <commit_before>import os
from subprocess import call
from functools import partial
#TODO: stop using sudo or ensure it exists
#TODOE: specify user to run as
#TODO: utilize functools partial to handle some of the above functionality
class Config:
APT_GET = ['sudo', '-E', 'apt-get']
ENV = os.environ.copy()
... |
186eaeb5b5e8d7c7f06305566729bf36424c6e77 | grab/__init__.py | grab/__init__.py | from base import (GrabError, DataNotFound, GrabNetworkError,
GrabMisuseError, UploadContent, UploadFile,
GrabTimeoutError)
from transport.curl import GrabCurl
#from transport.urllib import GrabUrllib
from transport.selenium import GrabSelenium
from transport.requests import GrabReque... | from base import (GrabError, DataNotFound, GrabNetworkError,
GrabMisuseError, UploadContent, UploadFile,
GrabTimeoutError)
from transport.curl import GrabCurl
#from transport.urllib import GrabUrllib
from transport.selenium import GrabSelenium
from transport.requests import GrabReque... | Add default_logging function to package namespace | Add default_logging function to package namespace
| Python | mit | DDShadoww/grab,maurobaraldi/grab,DDShadoww/grab,liorvh/grab,SpaceAppsXploration/grab,huiyi1990/grab,subeax/grab,lorien/grab,pombredanne/grab-1,giserh/grab,alihalabyah/grab,kevinlondon/grab,shaunstanislaus/grab,subeax/grab,maurobaraldi/grab,kevinlondon/grab,SpaceAppsXploration/grab,shaunstanislaus/grab,pombredanne/grab-... | from base import (GrabError, DataNotFound, GrabNetworkError,
GrabMisuseError, UploadContent, UploadFile,
GrabTimeoutError)
from transport.curl import GrabCurl
#from transport.urllib import GrabUrllib
from transport.selenium import GrabSelenium
from transport.requests import GrabReque... | from base import (GrabError, DataNotFound, GrabNetworkError,
GrabMisuseError, UploadContent, UploadFile,
GrabTimeoutError)
from transport.curl import GrabCurl
#from transport.urllib import GrabUrllib
from transport.selenium import GrabSelenium
from transport.requests import GrabReque... | <commit_before>from base import (GrabError, DataNotFound, GrabNetworkError,
GrabMisuseError, UploadContent, UploadFile,
GrabTimeoutError)
from transport.curl import GrabCurl
#from transport.urllib import GrabUrllib
from transport.selenium import GrabSelenium
from transport.requests i... | from base import (GrabError, DataNotFound, GrabNetworkError,
GrabMisuseError, UploadContent, UploadFile,
GrabTimeoutError)
from transport.curl import GrabCurl
#from transport.urllib import GrabUrllib
from transport.selenium import GrabSelenium
from transport.requests import GrabReque... | from base import (GrabError, DataNotFound, GrabNetworkError,
GrabMisuseError, UploadContent, UploadFile,
GrabTimeoutError)
from transport.curl import GrabCurl
#from transport.urllib import GrabUrllib
from transport.selenium import GrabSelenium
from transport.requests import GrabReque... | <commit_before>from base import (GrabError, DataNotFound, GrabNetworkError,
GrabMisuseError, UploadContent, UploadFile,
GrabTimeoutError)
from transport.curl import GrabCurl
#from transport.urllib import GrabUrllib
from transport.selenium import GrabSelenium
from transport.requests i... |
1736fd6ec8a227adfeae6f6b0dbcb3c6af59377c | bokeh/sampledata/us_marriages_divorces.py | bokeh/sampledata/us_marriages_divorces.py | '''
This module provides U.S. marriage and divorce statistics between 1867 and 2014
Data from the CDC's National Center for Health Statistics (http://www.cdc.gov/nchs/) (NCHS) database
Data organized by Randal S. Olson (http://www.randalolson.com)
'''
from __future__ import absolute_import
from os.path import dirna... | '''
This module provides U.S. marriage and divorce statistics between 1867 and 2014
Data from the CDC's National Center for Health Statistics (http://www.cdc.gov/nchs/) (NCHS) database
Data organized by Randal S. Olson (http://www.randalolson.com)
'''
from __future__ import absolute_import
from os.path import dirna... | Fix reference to `md_data` in sample data | Fix reference to `md_data` in sample data
| Python | bsd-3-clause | roxyboy/bokeh,josherick/bokeh,schoolie/bokeh,deeplook/bokeh,matbra/bokeh,htygithub/bokeh,ericmjl/bokeh,clairetang6/bokeh,rhiever/bokeh,xguse/bokeh,gpfreitas/bokeh,KasperPRasmussen/bokeh,philippjfr/bokeh,justacec/bokeh,gpfreitas/bokeh,timsnyder/bokeh,rothnic/bokeh,xguse/bokeh,matbra/bokeh,bokeh/bokeh,ptitjano/bokeh,muku... | '''
This module provides U.S. marriage and divorce statistics between 1867 and 2014
Data from the CDC's National Center for Health Statistics (http://www.cdc.gov/nchs/) (NCHS) database
Data organized by Randal S. Olson (http://www.randalolson.com)
'''
from __future__ import absolute_import
from os.path import dirna... | '''
This module provides U.S. marriage and divorce statistics between 1867 and 2014
Data from the CDC's National Center for Health Statistics (http://www.cdc.gov/nchs/) (NCHS) database
Data organized by Randal S. Olson (http://www.randalolson.com)
'''
from __future__ import absolute_import
from os.path import dirna... | <commit_before>'''
This module provides U.S. marriage and divorce statistics between 1867 and 2014
Data from the CDC's National Center for Health Statistics (http://www.cdc.gov/nchs/) (NCHS) database
Data organized by Randal S. Olson (http://www.randalolson.com)
'''
from __future__ import absolute_import
from os.pa... | '''
This module provides U.S. marriage and divorce statistics between 1867 and 2014
Data from the CDC's National Center for Health Statistics (http://www.cdc.gov/nchs/) (NCHS) database
Data organized by Randal S. Olson (http://www.randalolson.com)
'''
from __future__ import absolute_import
from os.path import dirna... | '''
This module provides U.S. marriage and divorce statistics between 1867 and 2014
Data from the CDC's National Center for Health Statistics (http://www.cdc.gov/nchs/) (NCHS) database
Data organized by Randal S. Olson (http://www.randalolson.com)
'''
from __future__ import absolute_import
from os.path import dirna... | <commit_before>'''
This module provides U.S. marriage and divorce statistics between 1867 and 2014
Data from the CDC's National Center for Health Statistics (http://www.cdc.gov/nchs/) (NCHS) database
Data organized by Randal S. Olson (http://www.randalolson.com)
'''
from __future__ import absolute_import
from os.pa... |
b3ef68f209e014b624b8de26e53af5933e20aa9c | grako/rendering.py | grako/rendering.py | # -*- coding: utf-8 -*-
"""
The Renderer class provides the infrastructure for generating template-based
code. It's used by the .grammars module for parser generation.
"""
from __future__ import print_function, division, absolute_import, unicode_literals
import itertools
from .util import trim
def render(item, **field... | # -*- coding: utf-8 -*-
"""
The Renderer class provides the infrastructure for generating template-based
code. It's used by the .grammars module for parser generation.
"""
from __future__ import print_function, division, absolute_import, unicode_literals
import itertools
from .util import trim
def render(item, **field... | Use 'fields' instead of 'kwargs' to document intent. | Use 'fields' instead of 'kwargs' to document intent.
| Python | bsd-2-clause | swayf/grako,swayf/grako | # -*- coding: utf-8 -*-
"""
The Renderer class provides the infrastructure for generating template-based
code. It's used by the .grammars module for parser generation.
"""
from __future__ import print_function, division, absolute_import, unicode_literals
import itertools
from .util import trim
def render(item, **field... | # -*- coding: utf-8 -*-
"""
The Renderer class provides the infrastructure for generating template-based
code. It's used by the .grammars module for parser generation.
"""
from __future__ import print_function, division, absolute_import, unicode_literals
import itertools
from .util import trim
def render(item, **field... | <commit_before># -*- coding: utf-8 -*-
"""
The Renderer class provides the infrastructure for generating template-based
code. It's used by the .grammars module for parser generation.
"""
from __future__ import print_function, division, absolute_import, unicode_literals
import itertools
from .util import trim
def rende... | # -*- coding: utf-8 -*-
"""
The Renderer class provides the infrastructure for generating template-based
code. It's used by the .grammars module for parser generation.
"""
from __future__ import print_function, division, absolute_import, unicode_literals
import itertools
from .util import trim
def render(item, **field... | # -*- coding: utf-8 -*-
"""
The Renderer class provides the infrastructure for generating template-based
code. It's used by the .grammars module for parser generation.
"""
from __future__ import print_function, division, absolute_import, unicode_literals
import itertools
from .util import trim
def render(item, **field... | <commit_before># -*- coding: utf-8 -*-
"""
The Renderer class provides the infrastructure for generating template-based
code. It's used by the .grammars module for parser generation.
"""
from __future__ import print_function, division, absolute_import, unicode_literals
import itertools
from .util import trim
def rende... |
2277e8412fbd92c26cd822f389ecb7e099519da4 | .conda/merge_dups.py | .conda/merge_dups.py | #!/usr/bin/env python
import yaml
linux = yaml.load(open('data_linux-64.yml'))
res = yaml.load(open('data_osx-.yml'))
res.extend(linux)
# Remove duplicates
unique_packages = {}
for package in res:
# This information is the unique portion, so we key on that
key = '|'.join([package[x] for x in ('url', 'version... | #!/usr/bin/env python
import yaml
linux = yaml.load(open('data_linux-64.yml', 'r'))
res = yaml.load(open('data_osx-.yml', 'r'))
res.extend(linux)
# Remove duplicates
unique_packages = {}
for package in res:
# This information is the unique portion, so we key on that
key_data = [
package['version'],
... | Handle lists of URLs like in r-ada | Handle lists of URLs like in r-ada
| Python | mit | galaxyproject/cargo-port,galaxyproject/cargo-port,erasche/community-package-cache,erasche/community-package-cache,erasche/community-package-cache | #!/usr/bin/env python
import yaml
linux = yaml.load(open('data_linux-64.yml'))
res = yaml.load(open('data_osx-.yml'))
res.extend(linux)
# Remove duplicates
unique_packages = {}
for package in res:
# This information is the unique portion, so we key on that
key = '|'.join([package[x] for x in ('url', 'version... | #!/usr/bin/env python
import yaml
linux = yaml.load(open('data_linux-64.yml', 'r'))
res = yaml.load(open('data_osx-.yml', 'r'))
res.extend(linux)
# Remove duplicates
unique_packages = {}
for package in res:
# This information is the unique portion, so we key on that
key_data = [
package['version'],
... | <commit_before>#!/usr/bin/env python
import yaml
linux = yaml.load(open('data_linux-64.yml'))
res = yaml.load(open('data_osx-.yml'))
res.extend(linux)
# Remove duplicates
unique_packages = {}
for package in res:
# This information is the unique portion, so we key on that
key = '|'.join([package[x] for x in (... | #!/usr/bin/env python
import yaml
linux = yaml.load(open('data_linux-64.yml', 'r'))
res = yaml.load(open('data_osx-.yml', 'r'))
res.extend(linux)
# Remove duplicates
unique_packages = {}
for package in res:
# This information is the unique portion, so we key on that
key_data = [
package['version'],
... | #!/usr/bin/env python
import yaml
linux = yaml.load(open('data_linux-64.yml'))
res = yaml.load(open('data_osx-.yml'))
res.extend(linux)
# Remove duplicates
unique_packages = {}
for package in res:
# This information is the unique portion, so we key on that
key = '|'.join([package[x] for x in ('url', 'version... | <commit_before>#!/usr/bin/env python
import yaml
linux = yaml.load(open('data_linux-64.yml'))
res = yaml.load(open('data_osx-.yml'))
res.extend(linux)
# Remove duplicates
unique_packages = {}
for package in res:
# This information is the unique portion, so we key on that
key = '|'.join([package[x] for x in (... |
c3852dbfc14f5109a5b4ff399953142e4ea9c758 | application.py | application.py | from flask import Flask
application = Flask(__name__)
@application.route('/')
def hello_world():
return 'Hello, World!'
if __name__ == "__main__":
application.debug = True
application.run() | from flask import Flask
application = Flask(__name__)
@application.route('/')
def hello_world():
return 'Please use /api to use the DataNorth API.'
@application.route('/api')
def api_intro():
intro = \
"""
<h2> Welcome to the DataNorth API! </h2>
<h4> The following endpoints are available: </h... | Add /api endpoint and basic HTML | Add /api endpoint and basic HTML
| Python | mit | data-north/datanorth-api | from flask import Flask
application = Flask(__name__)
@application.route('/')
def hello_world():
return 'Hello, World!'
if __name__ == "__main__":
application.debug = True
application.run()Add /api endpoint and basic HTML | from flask import Flask
application = Flask(__name__)
@application.route('/')
def hello_world():
return 'Please use /api to use the DataNorth API.'
@application.route('/api')
def api_intro():
intro = \
"""
<h2> Welcome to the DataNorth API! </h2>
<h4> The following endpoints are available: </h... | <commit_before>from flask import Flask
application = Flask(__name__)
@application.route('/')
def hello_world():
return 'Hello, World!'
if __name__ == "__main__":
application.debug = True
application.run()<commit_msg>Add /api endpoint and basic HTML<commit_after> | from flask import Flask
application = Flask(__name__)
@application.route('/')
def hello_world():
return 'Please use /api to use the DataNorth API.'
@application.route('/api')
def api_intro():
intro = \
"""
<h2> Welcome to the DataNorth API! </h2>
<h4> The following endpoints are available: </h... | from flask import Flask
application = Flask(__name__)
@application.route('/')
def hello_world():
return 'Hello, World!'
if __name__ == "__main__":
application.debug = True
application.run()Add /api endpoint and basic HTMLfrom flask import Flask
application = Flask(__name__)
@application.route('/')
def ... | <commit_before>from flask import Flask
application = Flask(__name__)
@application.route('/')
def hello_world():
return 'Hello, World!'
if __name__ == "__main__":
application.debug = True
application.run()<commit_msg>Add /api endpoint and basic HTML<commit_after>from flask import Flask
application = Flask... |
8cc88e1f6e09e91f2ffc5bbf43b58b2d129a12c9 | bnc.py | bnc.py | import nltk.corpus.reader.bnc
| import nltk.corpus.reader.bnc
import time
start_time = time.perf_counter()
BNC_data = nltk.corpus.reader.bnc.BNCCorpusReader(root='/home/ubuntu/ug-d/bncbaby/',
fileids=r'aca/\w*\.xml', # r'aca/\w*\.xml', # r'[a-z]{3}/\w*\.xml')
la... | Load BNC into memory and time process. | Load BNC into memory and time process.
| Python | mit | albertomh/ug-dissertation | import nltk.corpus.reader.bnc
Load BNC into memory and time process. | import nltk.corpus.reader.bnc
import time
start_time = time.perf_counter()
BNC_data = nltk.corpus.reader.bnc.BNCCorpusReader(root='/home/ubuntu/ug-d/bncbaby/',
fileids=r'aca/\w*\.xml', # r'aca/\w*\.xml', # r'[a-z]{3}/\w*\.xml')
la... | <commit_before>import nltk.corpus.reader.bnc
<commit_msg>Load BNC into memory and time process.<commit_after> | import nltk.corpus.reader.bnc
import time
start_time = time.perf_counter()
BNC_data = nltk.corpus.reader.bnc.BNCCorpusReader(root='/home/ubuntu/ug-d/bncbaby/',
fileids=r'aca/\w*\.xml', # r'aca/\w*\.xml', # r'[a-z]{3}/\w*\.xml')
la... | import nltk.corpus.reader.bnc
Load BNC into memory and time process.import nltk.corpus.reader.bnc
import time
start_time = time.perf_counter()
BNC_data = nltk.corpus.reader.bnc.BNCCorpusReader(root='/home/ubuntu/ug-d/bncbaby/',
fileids=r'aca/\w*\.xml', # r'aca/\w*\.xml', # ... | <commit_before>import nltk.corpus.reader.bnc
<commit_msg>Load BNC into memory and time process.<commit_after>import nltk.corpus.reader.bnc
import time
start_time = time.perf_counter()
BNC_data = nltk.corpus.reader.bnc.BNCCorpusReader(root='/home/ubuntu/ug-d/bncbaby/',
filei... |
bf155290d958e15cc16dc0093a570e33c038b397 | bot.py | bot.py | #!/usr/bin/env python2.7
# coding: utf-8
import inspect
import logging
logging.basicConfig(level=logging.DEBUG)
import os
import time
import uuid
from comicsbot import ComicsBot
from dokuwiki import DokuWiki
from roomlogger import RoomLogger
execfile("config.py")
w = DokuWiki()
if w.dokuwiki.login(config["dokuwiki"... | #!/usr/bin/env python2.7
# coding: utf-8
import inspect
import logging
logging.basicConfig(level=logging.DEBUG)
import os
import time
import uuid
from comicsbot import ComicsBot
from dokuwiki import DokuWiki
from roomlogger import RoomLogger
execfile("config.py")
w = DokuWiki()
if w.dokuwiki.login(config["dokuwiki"... | Use constant resource to be replaced on reconnect | Use constant resource to be replaced on reconnect
Network failures may leave the "ghost" bot in the MUC, and unless
it receives a MUC stanza while a replacement is offline, it may
hang in the room forever. Messages are sent to the new resource in
that case.
https://xmpp.org/extensions/xep-0045.html#impl-service-ghost... | Python | mit | dotdoom/comicsbot,dotdoom/comicsbot | #!/usr/bin/env python2.7
# coding: utf-8
import inspect
import logging
logging.basicConfig(level=logging.DEBUG)
import os
import time
import uuid
from comicsbot import ComicsBot
from dokuwiki import DokuWiki
from roomlogger import RoomLogger
execfile("config.py")
w = DokuWiki()
if w.dokuwiki.login(config["dokuwiki"... | #!/usr/bin/env python2.7
# coding: utf-8
import inspect
import logging
logging.basicConfig(level=logging.DEBUG)
import os
import time
import uuid
from comicsbot import ComicsBot
from dokuwiki import DokuWiki
from roomlogger import RoomLogger
execfile("config.py")
w = DokuWiki()
if w.dokuwiki.login(config["dokuwiki"... | <commit_before>#!/usr/bin/env python2.7
# coding: utf-8
import inspect
import logging
logging.basicConfig(level=logging.DEBUG)
import os
import time
import uuid
from comicsbot import ComicsBot
from dokuwiki import DokuWiki
from roomlogger import RoomLogger
execfile("config.py")
w = DokuWiki()
if w.dokuwiki.login(co... | #!/usr/bin/env python2.7
# coding: utf-8
import inspect
import logging
logging.basicConfig(level=logging.DEBUG)
import os
import time
import uuid
from comicsbot import ComicsBot
from dokuwiki import DokuWiki
from roomlogger import RoomLogger
execfile("config.py")
w = DokuWiki()
if w.dokuwiki.login(config["dokuwiki"... | #!/usr/bin/env python2.7
# coding: utf-8
import inspect
import logging
logging.basicConfig(level=logging.DEBUG)
import os
import time
import uuid
from comicsbot import ComicsBot
from dokuwiki import DokuWiki
from roomlogger import RoomLogger
execfile("config.py")
w = DokuWiki()
if w.dokuwiki.login(config["dokuwiki"... | <commit_before>#!/usr/bin/env python2.7
# coding: utf-8
import inspect
import logging
logging.basicConfig(level=logging.DEBUG)
import os
import time
import uuid
from comicsbot import ComicsBot
from dokuwiki import DokuWiki
from roomlogger import RoomLogger
execfile("config.py")
w = DokuWiki()
if w.dokuwiki.login(co... |
396c9128aa4d3bc7b31f5fb00363a7f52dba7476 | indra/java_vm.py | indra/java_vm.py | """Handles all imports from jnius to prevent conflicts resulting from attempts
to set JVM options while the VM is already running."""
import os
import warnings
import jnius_config
if '-Xmx4g' not in jnius_config.get_options():
if not jnius_config.vm_running:
jnius_config.add_options('-Xmx4g')
else:
... | """Handles all imports from jnius to prevent conflicts resulting from attempts
to set JVM options while the VM is already running."""
import os
import warnings
import jnius_config
if '-Xmx4g' not in jnius_config.get_options():
if not jnius_config.vm_running:
jnius_config.add_options('-Xmx4g')
else:
... | Fix java VM starting when there is not classpath set | Fix java VM starting when there is not classpath set
| Python | bsd-2-clause | johnbachman/belpy,sorgerlab/belpy,sorgerlab/belpy,bgyori/indra,johnbachman/belpy,johnbachman/indra,jmuhlich/indra,sorgerlab/indra,bgyori/indra,jmuhlich/indra,sorgerlab/indra,jmuhlich/indra,johnbachman/indra,sorgerlab/indra,bgyori/indra,pvtodorov/indra,johnbachman/belpy,sorgerlab/belpy,pvtodorov/indra,johnbachman/indra,... | """Handles all imports from jnius to prevent conflicts resulting from attempts
to set JVM options while the VM is already running."""
import os
import warnings
import jnius_config
if '-Xmx4g' not in jnius_config.get_options():
if not jnius_config.vm_running:
jnius_config.add_options('-Xmx4g')
else:
... | """Handles all imports from jnius to prevent conflicts resulting from attempts
to set JVM options while the VM is already running."""
import os
import warnings
import jnius_config
if '-Xmx4g' not in jnius_config.get_options():
if not jnius_config.vm_running:
jnius_config.add_options('-Xmx4g')
else:
... | <commit_before>"""Handles all imports from jnius to prevent conflicts resulting from attempts
to set JVM options while the VM is already running."""
import os
import warnings
import jnius_config
if '-Xmx4g' not in jnius_config.get_options():
if not jnius_config.vm_running:
jnius_config.add_options('-Xmx4g... | """Handles all imports from jnius to prevent conflicts resulting from attempts
to set JVM options while the VM is already running."""
import os
import warnings
import jnius_config
if '-Xmx4g' not in jnius_config.get_options():
if not jnius_config.vm_running:
jnius_config.add_options('-Xmx4g')
else:
... | """Handles all imports from jnius to prevent conflicts resulting from attempts
to set JVM options while the VM is already running."""
import os
import warnings
import jnius_config
if '-Xmx4g' not in jnius_config.get_options():
if not jnius_config.vm_running:
jnius_config.add_options('-Xmx4g')
else:
... | <commit_before>"""Handles all imports from jnius to prevent conflicts resulting from attempts
to set JVM options while the VM is already running."""
import os
import warnings
import jnius_config
if '-Xmx4g' not in jnius_config.get_options():
if not jnius_config.vm_running:
jnius_config.add_options('-Xmx4g... |
dce014bc1b12bda7eb261b194acebe308ae7ff1b | pyQuantuccia/setup.py | pyQuantuccia/setup.py | import setuptools
qu_ext = setuptools.Extension(
'quantuccia',
sources=['src/pyQuantuccia.cpp']
)
setuptools.setup(
name='pyQuantuccia',
version='0.1.0',
packages=['pyQuantuccia'],
ext_modules=[qu_ext]
)
| import setuptools
qu_ext = setuptools.Extension(
'quantuccia',
libraries=['ql'],
library_dirs=['src/Quantuccia'],
sources=['src/pyQuantuccia.cpp']
)
setuptools.setup(
name='pyQuantuccia',
version='0.1.0',
packages=['pyQuantuccia'],
ext_modules=[qu_ext]
)
| Add the location of the ql library. | Add the location of the ql library.
| Python | bsd-3-clause | jwg4/pyQuantuccia,jwg4/pyQuantuccia | import setuptools
qu_ext = setuptools.Extension(
'quantuccia',
sources=['src/pyQuantuccia.cpp']
)
setuptools.setup(
name='pyQuantuccia',
version='0.1.0',
packages=['pyQuantuccia'],
ext_modules=[qu_ext]
)
Add the location of the ql library. | import setuptools
qu_ext = setuptools.Extension(
'quantuccia',
libraries=['ql'],
library_dirs=['src/Quantuccia'],
sources=['src/pyQuantuccia.cpp']
)
setuptools.setup(
name='pyQuantuccia',
version='0.1.0',
packages=['pyQuantuccia'],
ext_modules=[qu_ext]
)
| <commit_before>import setuptools
qu_ext = setuptools.Extension(
'quantuccia',
sources=['src/pyQuantuccia.cpp']
)
setuptools.setup(
name='pyQuantuccia',
version='0.1.0',
packages=['pyQuantuccia'],
ext_modules=[qu_ext]
)
<commit_msg>Add the location of the ql library.<commit_after> | import setuptools
qu_ext = setuptools.Extension(
'quantuccia',
libraries=['ql'],
library_dirs=['src/Quantuccia'],
sources=['src/pyQuantuccia.cpp']
)
setuptools.setup(
name='pyQuantuccia',
version='0.1.0',
packages=['pyQuantuccia'],
ext_modules=[qu_ext]
)
| import setuptools
qu_ext = setuptools.Extension(
'quantuccia',
sources=['src/pyQuantuccia.cpp']
)
setuptools.setup(
name='pyQuantuccia',
version='0.1.0',
packages=['pyQuantuccia'],
ext_modules=[qu_ext]
)
Add the location of the ql library.import setuptools
qu_ext = setuptools.Extension(
'... | <commit_before>import setuptools
qu_ext = setuptools.Extension(
'quantuccia',
sources=['src/pyQuantuccia.cpp']
)
setuptools.setup(
name='pyQuantuccia',
version='0.1.0',
packages=['pyQuantuccia'],
ext_modules=[qu_ext]
)
<commit_msg>Add the location of the ql library.<commit_after>import setupto... |
da2e17366f83ebb1b95b80296e5d6376bc21b4eb | pyinapp/googleplay.py | pyinapp/googleplay.py | from pyinapp.errors import InAppValidationError
from pyinapp.purchase import Purchase
import base64
import json
import rsa
purchase_state_ok = 0
def make_pem(public_key):
return '\n'.join((
'-----BEGIN PUBLIC KEY-----',
'\n'.join(public_key[i:i+64] for i in range(0, len(public_key), 64)),
... | from pyinapp.errors import InAppValidationError
from pyinapp.purchase import Purchase
import base64
import json
import rsa
purchase_state_ok = 0
def make_pem(public_key):
return '\n'.join((
'-----BEGIN PUBLIC KEY-----',
'\n'.join(public_key[i:i+64] for i in range(0, len(public_key), 64)),
... | Add extra validation for Google Play signature | Add extra validation for Google Play signature
| Python | mit | keeprocking/pyinapp | from pyinapp.errors import InAppValidationError
from pyinapp.purchase import Purchase
import base64
import json
import rsa
purchase_state_ok = 0
def make_pem(public_key):
return '\n'.join((
'-----BEGIN PUBLIC KEY-----',
'\n'.join(public_key[i:i+64] for i in range(0, len(public_key), 64)),
... | from pyinapp.errors import InAppValidationError
from pyinapp.purchase import Purchase
import base64
import json
import rsa
purchase_state_ok = 0
def make_pem(public_key):
return '\n'.join((
'-----BEGIN PUBLIC KEY-----',
'\n'.join(public_key[i:i+64] for i in range(0, len(public_key), 64)),
... | <commit_before>from pyinapp.errors import InAppValidationError
from pyinapp.purchase import Purchase
import base64
import json
import rsa
purchase_state_ok = 0
def make_pem(public_key):
return '\n'.join((
'-----BEGIN PUBLIC KEY-----',
'\n'.join(public_key[i:i+64] for i in range(0, len(public_key... | from pyinapp.errors import InAppValidationError
from pyinapp.purchase import Purchase
import base64
import json
import rsa
purchase_state_ok = 0
def make_pem(public_key):
return '\n'.join((
'-----BEGIN PUBLIC KEY-----',
'\n'.join(public_key[i:i+64] for i in range(0, len(public_key), 64)),
... | from pyinapp.errors import InAppValidationError
from pyinapp.purchase import Purchase
import base64
import json
import rsa
purchase_state_ok = 0
def make_pem(public_key):
return '\n'.join((
'-----BEGIN PUBLIC KEY-----',
'\n'.join(public_key[i:i+64] for i in range(0, len(public_key), 64)),
... | <commit_before>from pyinapp.errors import InAppValidationError
from pyinapp.purchase import Purchase
import base64
import json
import rsa
purchase_state_ok = 0
def make_pem(public_key):
return '\n'.join((
'-----BEGIN PUBLIC KEY-----',
'\n'.join(public_key[i:i+64] for i in range(0, len(public_key... |
0eec6519a54d066f253b2c62b2317962733de53d | rapidsms/log/tests.py | rapidsms/log/tests.py | #!/usr/bin/env python
# vim: ai ts=4 sts=4 et sw=4
from nose.tools import assert_equals, assert_raises
from ..log.mixin import LoggerMixin
class LoggableStub(object, LoggerMixin):
pass
def test_logger_mixin():
obj = LoggableStub()
from logging.handlers import MemoryHandler
import logging
log... | #!/usr/bin/env python
# vim: ai ts=4 sts=4 et sw=4
from nose.tools import assert_equals, assert_raises
from ..log.mixin import LoggerMixin
class LoggableStub(object, LoggerMixin):
pass
def test_logger_mixin():
obj = LoggableStub()
from logging.handlers import MemoryHandler
import logging
log... | Fix LoggerMixin test Branch: feature/bulk-messaging-api | Fix LoggerMixin test
Branch: feature/bulk-messaging-api
| Python | bsd-3-clause | ehealthafrica-ci/rapidsms,eHealthAfrica/rapidsms,peterayeni/rapidsms,peterayeni/rapidsms,eHealthAfrica/rapidsms,ehealthafrica-ci/rapidsms,peterayeni/rapidsms,lsgunth/rapidsms,caktus/rapidsms,lsgunth/rapidsms,caktus/rapidsms,catalpainternational/rapidsms,ehealthafrica-ci/rapidsms,catalpainternational/rapidsms,lsgunth/ra... | #!/usr/bin/env python
# vim: ai ts=4 sts=4 et sw=4
from nose.tools import assert_equals, assert_raises
from ..log.mixin import LoggerMixin
class LoggableStub(object, LoggerMixin):
pass
def test_logger_mixin():
obj = LoggableStub()
from logging.handlers import MemoryHandler
import logging
log... | #!/usr/bin/env python
# vim: ai ts=4 sts=4 et sw=4
from nose.tools import assert_equals, assert_raises
from ..log.mixin import LoggerMixin
class LoggableStub(object, LoggerMixin):
pass
def test_logger_mixin():
obj = LoggableStub()
from logging.handlers import MemoryHandler
import logging
log... | <commit_before>#!/usr/bin/env python
# vim: ai ts=4 sts=4 et sw=4
from nose.tools import assert_equals, assert_raises
from ..log.mixin import LoggerMixin
class LoggableStub(object, LoggerMixin):
pass
def test_logger_mixin():
obj = LoggableStub()
from logging.handlers import MemoryHandler
import l... | #!/usr/bin/env python
# vim: ai ts=4 sts=4 et sw=4
from nose.tools import assert_equals, assert_raises
from ..log.mixin import LoggerMixin
class LoggableStub(object, LoggerMixin):
pass
def test_logger_mixin():
obj = LoggableStub()
from logging.handlers import MemoryHandler
import logging
log... | #!/usr/bin/env python
# vim: ai ts=4 sts=4 et sw=4
from nose.tools import assert_equals, assert_raises
from ..log.mixin import LoggerMixin
class LoggableStub(object, LoggerMixin):
pass
def test_logger_mixin():
obj = LoggableStub()
from logging.handlers import MemoryHandler
import logging
log... | <commit_before>#!/usr/bin/env python
# vim: ai ts=4 sts=4 et sw=4
from nose.tools import assert_equals, assert_raises
from ..log.mixin import LoggerMixin
class LoggableStub(object, LoggerMixin):
pass
def test_logger_mixin():
obj = LoggableStub()
from logging.handlers import MemoryHandler
import l... |
cdfdfd7418f33cc38aa7db3e42e0050d4189ab77 | webserver/utility/templatetags/active_tags.py | webserver/utility/templatetags/active_tags.py | import re
from django import template
from django.conf import settings
register = template.Library()
@register.simple_tag(takes_context=True)
def active(context, pattern):
print pattern
request = context['request']
if re.search(pattern, request.path):
return 'active'
return ''
| import re
from django import template
from django.conf import settings
from django.template import Context, Template
register = template.Library()
@register.simple_tag(takes_context=True)
def active(context, pattern):
request = context['request']
template = Template(pattern)
context = Context(context)
... | Update active templatetag to accept more complex strings | Update active templatetag to accept more complex strings
| Python | bsd-3-clause | siggame/webserver,siggame/webserver,siggame/webserver | import re
from django import template
from django.conf import settings
register = template.Library()
@register.simple_tag(takes_context=True)
def active(context, pattern):
print pattern
request = context['request']
if re.search(pattern, request.path):
return 'active'
return ''
Update active t... | import re
from django import template
from django.conf import settings
from django.template import Context, Template
register = template.Library()
@register.simple_tag(takes_context=True)
def active(context, pattern):
request = context['request']
template = Template(pattern)
context = Context(context)
... | <commit_before>import re
from django import template
from django.conf import settings
register = template.Library()
@register.simple_tag(takes_context=True)
def active(context, pattern):
print pattern
request = context['request']
if re.search(pattern, request.path):
return 'active'
return ''
... | import re
from django import template
from django.conf import settings
from django.template import Context, Template
register = template.Library()
@register.simple_tag(takes_context=True)
def active(context, pattern):
request = context['request']
template = Template(pattern)
context = Context(context)
... | import re
from django import template
from django.conf import settings
register = template.Library()
@register.simple_tag(takes_context=True)
def active(context, pattern):
print pattern
request = context['request']
if re.search(pattern, request.path):
return 'active'
return ''
Update active t... | <commit_before>import re
from django import template
from django.conf import settings
register = template.Library()
@register.simple_tag(takes_context=True)
def active(context, pattern):
print pattern
request = context['request']
if re.search(pattern, request.path):
return 'active'
return ''
... |
fc6db503809e3e350081637ccb7b0f7e8eb67619 | account_verification_flask/config/local.py | account_verification_flask/config/local.py | SECRET_KEY = '%^!@@*!&$8xdfdirunb52438#(&^874@#^&*($@*(@&^@)(&*)Y_)((+'
AUTHY_KEY = 'your_authy_key'
TWILIO_ACCOUNT_SID = 'your_twilio_account_sid'
TWILIO_AUTH_TOKEN = 'your_twilio_auth_token'
TWILIO_NUMBER = 'your_twilio_phone_number'
SQLALCHEMY_DATABASE_URI = 'sqlite:////Work/account_verification.db'
SQLALCHEMY_EC... | SECRET_KEY = '%^!@@*!&$8xdfdirunb52438#(&^874@#^&*($@*(@&^@)(&*)Y_)((+'
AUTHY_KEY = 'your_authy_key'
TWILIO_ACCOUNT_SID = 'your_twilio_account_sid'
TWILIO_AUTH_TOKEN = 'your_twilio_auth_token'
TWILIO_NUMBER = 'your_twilio_phone_number'
SQLALCHEMY_DATABASE_URI = 'sqlite://'
SQLALCHEMY_ECHO = True | Switch the default config to use in memory sqlite | Switch the default config to use in memory sqlite
| Python | mit | TwilioDevEd/account-verification-flask,TwilioDevEd/account-verification-flask,TwilioDevEd/account-verification-flask | SECRET_KEY = '%^!@@*!&$8xdfdirunb52438#(&^874@#^&*($@*(@&^@)(&*)Y_)((+'
AUTHY_KEY = 'your_authy_key'
TWILIO_ACCOUNT_SID = 'your_twilio_account_sid'
TWILIO_AUTH_TOKEN = 'your_twilio_auth_token'
TWILIO_NUMBER = 'your_twilio_phone_number'
SQLALCHEMY_DATABASE_URI = 'sqlite:////Work/account_verification.db'
SQLALCHEMY_EC... | SECRET_KEY = '%^!@@*!&$8xdfdirunb52438#(&^874@#^&*($@*(@&^@)(&*)Y_)((+'
AUTHY_KEY = 'your_authy_key'
TWILIO_ACCOUNT_SID = 'your_twilio_account_sid'
TWILIO_AUTH_TOKEN = 'your_twilio_auth_token'
TWILIO_NUMBER = 'your_twilio_phone_number'
SQLALCHEMY_DATABASE_URI = 'sqlite://'
SQLALCHEMY_ECHO = True | <commit_before>SECRET_KEY = '%^!@@*!&$8xdfdirunb52438#(&^874@#^&*($@*(@&^@)(&*)Y_)((+'
AUTHY_KEY = 'your_authy_key'
TWILIO_ACCOUNT_SID = 'your_twilio_account_sid'
TWILIO_AUTH_TOKEN = 'your_twilio_auth_token'
TWILIO_NUMBER = 'your_twilio_phone_number'
SQLALCHEMY_DATABASE_URI = 'sqlite:////Work/account_verification.db... | SECRET_KEY = '%^!@@*!&$8xdfdirunb52438#(&^874@#^&*($@*(@&^@)(&*)Y_)((+'
AUTHY_KEY = 'your_authy_key'
TWILIO_ACCOUNT_SID = 'your_twilio_account_sid'
TWILIO_AUTH_TOKEN = 'your_twilio_auth_token'
TWILIO_NUMBER = 'your_twilio_phone_number'
SQLALCHEMY_DATABASE_URI = 'sqlite://'
SQLALCHEMY_ECHO = True | SECRET_KEY = '%^!@@*!&$8xdfdirunb52438#(&^874@#^&*($@*(@&^@)(&*)Y_)((+'
AUTHY_KEY = 'your_authy_key'
TWILIO_ACCOUNT_SID = 'your_twilio_account_sid'
TWILIO_AUTH_TOKEN = 'your_twilio_auth_token'
TWILIO_NUMBER = 'your_twilio_phone_number'
SQLALCHEMY_DATABASE_URI = 'sqlite:////Work/account_verification.db'
SQLALCHEMY_EC... | <commit_before>SECRET_KEY = '%^!@@*!&$8xdfdirunb52438#(&^874@#^&*($@*(@&^@)(&*)Y_)((+'
AUTHY_KEY = 'your_authy_key'
TWILIO_ACCOUNT_SID = 'your_twilio_account_sid'
TWILIO_AUTH_TOKEN = 'your_twilio_auth_token'
TWILIO_NUMBER = 'your_twilio_phone_number'
SQLALCHEMY_DATABASE_URI = 'sqlite:////Work/account_verification.db... |
4ee8cef54d21316c9490f49ee2b3f2f16ffdcfbb | python_scripts/solr_query_fetch_all.py | python_scripts/solr_query_fetch_all.py | #!/usr/bin/python
import requests
import ipdb
import time
import csv
import sys
import pysolr
def fetch_all( solr, query ) :
documents = []
num_matching_documents = solr.search( query ).hits
start = 0
rows = num_matching_documents
sys.stderr.write( ' starting fetch for ' + query )
while ( le... | #!/usr/bin/python
import requests
import ipdb
import time
import csv
import sys
import pysolr
def fetch_all( solr, query ) :
documents = []
num_matching_documents = solr.search( query ).hits
start = 0
rows = num_matching_documents
sys.stderr.write( ' starting fetch for ' + query )
sys.stderr... | Save word counts to file. | Save word counts to file.
| Python | agpl-3.0 | AchyuthIIIT/mediacloud,AchyuthIIIT/mediacloud,berkmancenter/mediacloud,berkmancenter/mediacloud,AchyuthIIIT/mediacloud,AchyuthIIIT/mediacloud,berkmancenter/mediacloud,AchyuthIIIT/mediacloud,berkmancenter/mediacloud,AchyuthIIIT/mediacloud,AchyuthIIIT/mediacloud,AchyuthIIIT/mediacloud,berkmancenter/mediacloud,AchyuthIIIT... | #!/usr/bin/python
import requests
import ipdb
import time
import csv
import sys
import pysolr
def fetch_all( solr, query ) :
documents = []
num_matching_documents = solr.search( query ).hits
start = 0
rows = num_matching_documents
sys.stderr.write( ' starting fetch for ' + query )
while ( le... | #!/usr/bin/python
import requests
import ipdb
import time
import csv
import sys
import pysolr
def fetch_all( solr, query ) :
documents = []
num_matching_documents = solr.search( query ).hits
start = 0
rows = num_matching_documents
sys.stderr.write( ' starting fetch for ' + query )
sys.stderr... | <commit_before>#!/usr/bin/python
import requests
import ipdb
import time
import csv
import sys
import pysolr
def fetch_all( solr, query ) :
documents = []
num_matching_documents = solr.search( query ).hits
start = 0
rows = num_matching_documents
sys.stderr.write( ' starting fetch for ' + query )... | #!/usr/bin/python
import requests
import ipdb
import time
import csv
import sys
import pysolr
def fetch_all( solr, query ) :
documents = []
num_matching_documents = solr.search( query ).hits
start = 0
rows = num_matching_documents
sys.stderr.write( ' starting fetch for ' + query )
sys.stderr... | #!/usr/bin/python
import requests
import ipdb
import time
import csv
import sys
import pysolr
def fetch_all( solr, query ) :
documents = []
num_matching_documents = solr.search( query ).hits
start = 0
rows = num_matching_documents
sys.stderr.write( ' starting fetch for ' + query )
while ( le... | <commit_before>#!/usr/bin/python
import requests
import ipdb
import time
import csv
import sys
import pysolr
def fetch_all( solr, query ) :
documents = []
num_matching_documents = solr.search( query ).hits
start = 0
rows = num_matching_documents
sys.stderr.write( ' starting fetch for ' + query )... |
bc02af25e3bbcb97de838eff1fc130f52258db2d | grammar/automator.py | grammar/automator.py | import os
class Automator:
def __init__(self, real = True):
self.xdo_list = []
self.real = real
def xdo(self, xdo):
self.xdo_list.append(xdo)
def flush(self):
if len(self.xdo_list) == 0: return
command = '/usr/bin/xdotool' + ' '
command += ' '.join(self.xd... | import os
class Automator:
def __init__(self, real = True):
self.xdo_list = []
self.real = real
def xdo(self, xdo):
self.xdo_list.append(xdo)
def flush(self):
if len(self.xdo_list) == 0: return
command = '/usr/bin/xdotool' + ' '
command += ' '.join(self.xd... | Support apostrophe and period in dictation (and minus, just in case). | Support apostrophe and period in dictation (and minus, just in case).
Example: "phrase don't like x. rays".
| Python | bsd-2-clause | dwks/silvius,dwks/silvius | import os
class Automator:
def __init__(self, real = True):
self.xdo_list = []
self.real = real
def xdo(self, xdo):
self.xdo_list.append(xdo)
def flush(self):
if len(self.xdo_list) == 0: return
command = '/usr/bin/xdotool' + ' '
command += ' '.join(self.xd... | import os
class Automator:
def __init__(self, real = True):
self.xdo_list = []
self.real = real
def xdo(self, xdo):
self.xdo_list.append(xdo)
def flush(self):
if len(self.xdo_list) == 0: return
command = '/usr/bin/xdotool' + ' '
command += ' '.join(self.xd... | <commit_before>import os
class Automator:
def __init__(self, real = True):
self.xdo_list = []
self.real = real
def xdo(self, xdo):
self.xdo_list.append(xdo)
def flush(self):
if len(self.xdo_list) == 0: return
command = '/usr/bin/xdotool' + ' '
command += '... | import os
class Automator:
def __init__(self, real = True):
self.xdo_list = []
self.real = real
def xdo(self, xdo):
self.xdo_list.append(xdo)
def flush(self):
if len(self.xdo_list) == 0: return
command = '/usr/bin/xdotool' + ' '
command += ' '.join(self.xd... | import os
class Automator:
def __init__(self, real = True):
self.xdo_list = []
self.real = real
def xdo(self, xdo):
self.xdo_list.append(xdo)
def flush(self):
if len(self.xdo_list) == 0: return
command = '/usr/bin/xdotool' + ' '
command += ' '.join(self.xd... | <commit_before>import os
class Automator:
def __init__(self, real = True):
self.xdo_list = []
self.real = real
def xdo(self, xdo):
self.xdo_list.append(xdo)
def flush(self):
if len(self.xdo_list) == 0: return
command = '/usr/bin/xdotool' + ' '
command += '... |
5f935bb952a616c3fe9ca24fa862621dfc1bda24 | guv/hubs/watchers.py | guv/hubs/watchers.py | from guv.hubs.abc import AbstractListener
class FdListener(AbstractListener):
"""Default implementation of :cls:`AbstractListener`
"""
pass
class PollFdListener(AbstractListener):
def __init__(self, evtype, fd, cb):
"""
:param cb: Callable
:param args: tuple of arguments to b... | from guv.hubs.abc import AbstractListener
class PollFdListener(AbstractListener):
def __init__(self, evtype, fd, cb):
"""
:param cb: Callable
:param args: tuple of arguments to be passed to cb
"""
super().__init__(evtype, fd)
self.cb = cb
class UvFdListener(Abstra... | Remove unneeded default Listener implementation | Remove unneeded default Listener implementation
| Python | mit | veegee/guv,veegee/guv | from guv.hubs.abc import AbstractListener
class FdListener(AbstractListener):
"""Default implementation of :cls:`AbstractListener`
"""
pass
class PollFdListener(AbstractListener):
def __init__(self, evtype, fd, cb):
"""
:param cb: Callable
:param args: tuple of arguments to b... | from guv.hubs.abc import AbstractListener
class PollFdListener(AbstractListener):
def __init__(self, evtype, fd, cb):
"""
:param cb: Callable
:param args: tuple of arguments to be passed to cb
"""
super().__init__(evtype, fd)
self.cb = cb
class UvFdListener(Abstra... | <commit_before>from guv.hubs.abc import AbstractListener
class FdListener(AbstractListener):
"""Default implementation of :cls:`AbstractListener`
"""
pass
class PollFdListener(AbstractListener):
def __init__(self, evtype, fd, cb):
"""
:param cb: Callable
:param args: tuple of... | from guv.hubs.abc import AbstractListener
class PollFdListener(AbstractListener):
def __init__(self, evtype, fd, cb):
"""
:param cb: Callable
:param args: tuple of arguments to be passed to cb
"""
super().__init__(evtype, fd)
self.cb = cb
class UvFdListener(Abstra... | from guv.hubs.abc import AbstractListener
class FdListener(AbstractListener):
"""Default implementation of :cls:`AbstractListener`
"""
pass
class PollFdListener(AbstractListener):
def __init__(self, evtype, fd, cb):
"""
:param cb: Callable
:param args: tuple of arguments to b... | <commit_before>from guv.hubs.abc import AbstractListener
class FdListener(AbstractListener):
"""Default implementation of :cls:`AbstractListener`
"""
pass
class PollFdListener(AbstractListener):
def __init__(self, evtype, fd, cb):
"""
:param cb: Callable
:param args: tuple of... |
93cebc0f0a99677f33005502217d83964de48478 | notifications/templatetags/notifications_tags.py | notifications/templatetags/notifications_tags.py | # -*- coding: utf-8 -*-
from django.template import Library
from django.template.base import TemplateSyntaxError
from notifications.models import Notification
from django.template import Node
register = Library()
# TODO: Simplify this: it's a really simple tag!
class InboxCountNode(Node):
"For use in the notific... | # -*- coding: utf-8 -*-
from django.template import Library
from django.template.base import TemplateSyntaxError
from django.template import Node
register = Library()
@register.simple_tag(takes_context=True)
def notifications_unread(context):
if 'user' not in context:
return ''
user = context['us... | Simplify the notification tag. No longer can store the value in a variable. | Simplify the notification tag.
No longer can store the value in a variable.
| Python | bsd-3-clause | iberben/django-notifications,django-notifications/django-notifications,iberben/django-notifications,Evidlo/django-notifications,iberben/django-notifications,brandonberney/basic-django-notifications,alazaro/django-notifications,Natgeoed/django-notifications,brandonberney/basic-django-notifications,philroche/django-notif... | # -*- coding: utf-8 -*-
from django.template import Library
from django.template.base import TemplateSyntaxError
from notifications.models import Notification
from django.template import Node
register = Library()
# TODO: Simplify this: it's a really simple tag!
class InboxCountNode(Node):
"For use in the notific... | # -*- coding: utf-8 -*-
from django.template import Library
from django.template.base import TemplateSyntaxError
from django.template import Node
register = Library()
@register.simple_tag(takes_context=True)
def notifications_unread(context):
if 'user' not in context:
return ''
user = context['us... | <commit_before># -*- coding: utf-8 -*-
from django.template import Library
from django.template.base import TemplateSyntaxError
from notifications.models import Notification
from django.template import Node
register = Library()
# TODO: Simplify this: it's a really simple tag!
class InboxCountNode(Node):
"For use... | # -*- coding: utf-8 -*-
from django.template import Library
from django.template.base import TemplateSyntaxError
from django.template import Node
register = Library()
@register.simple_tag(takes_context=True)
def notifications_unread(context):
if 'user' not in context:
return ''
user = context['us... | # -*- coding: utf-8 -*-
from django.template import Library
from django.template.base import TemplateSyntaxError
from notifications.models import Notification
from django.template import Node
register = Library()
# TODO: Simplify this: it's a really simple tag!
class InboxCountNode(Node):
"For use in the notific... | <commit_before># -*- coding: utf-8 -*-
from django.template import Library
from django.template.base import TemplateSyntaxError
from notifications.models import Notification
from django.template import Node
register = Library()
# TODO: Simplify this: it's a really simple tag!
class InboxCountNode(Node):
"For use... |
4d8b0fefa420efd60da0c6a29968f2fd441b9e09 | openbox/configuration_builder/transformations.py | openbox/configuration_builder/transformations.py | def to_int(value):
return int(value)
def identity(value):
return value | def to_int(value, num=None):
return int(value)
def to_float(value, num=None):
return float(value)
def identity(value, num=None):
return value | Add to_float function and add num keyword | Transformations: Add to_float function and add num keyword
| Python | apache-2.0 | DeepnessLab/obsi,OpenBoxProject/obsi,DeepnessLab/obsi,pavel-lazar/obsi,pavel-lazar/obsi,OpenBoxProject/obsi,DeepnessLab/obsi,pavel-lazar/obsi,DeepnessLab/obsi,pavel-lazar/obsi,OpenBoxProject/obsi,OpenBoxProject/obsi | def to_int(value):
return int(value)
def identity(value):
return valueTransformations: Add to_float function and add num keyword | def to_int(value, num=None):
return int(value)
def to_float(value, num=None):
return float(value)
def identity(value, num=None):
return value | <commit_before>def to_int(value):
return int(value)
def identity(value):
return value<commit_msg>Transformations: Add to_float function and add num keyword<commit_after> | def to_int(value, num=None):
return int(value)
def to_float(value, num=None):
return float(value)
def identity(value, num=None):
return value | def to_int(value):
return int(value)
def identity(value):
return valueTransformations: Add to_float function and add num keyworddef to_int(value, num=None):
return int(value)
def to_float(value, num=None):
return float(value)
def identity(value, num=None):
return value | <commit_before>def to_int(value):
return int(value)
def identity(value):
return value<commit_msg>Transformations: Add to_float function and add num keyword<commit_after>def to_int(value, num=None):
return int(value)
def to_float(value, num=None):
return float(value)
def identity(value, num=None):
... |
aaf8ebb7b1b12b15ab96c2cd1d7cb053154e8d64 | tests/lib/query_models/test_query_string_match.py | tests/lib/query_models/test_query_string_match.py | from positive_test_suite import PositiveTestSuite
from negative_test_suite import NegativeTestSuite
import os
import sys
sys.path.append(os.path.join(os.path.dirname(__file__), "../../lib"))
from query_models import QueryStringMatch
class TestQueryStringMatchPositiveTestSuite(PositiveTestSuite):
def query_tests(... | from positive_test_suite import PositiveTestSuite
from negative_test_suite import NegativeTestSuite
import os
import sys
sys.path.append(os.path.join(os.path.dirname(__file__), "../../lib"))
from query_models import QueryStringMatch
hostname_test_regex = 'hostname: /(.*\.)*(sub|bus)+(\..*)*\.abc(\..*)*\.company\.com... | Add extra tests to query string query model | Add extra tests to query string query model
| Python | mpl-2.0 | ameihm0912/MozDef,jeffbryner/MozDef,mpurzynski/MozDef,gdestuynder/MozDef,jeffbryner/MozDef,ameihm0912/MozDef,mpurzynski/MozDef,Phrozyn/MozDef,Phrozyn/MozDef,mpurzynski/MozDef,Phrozyn/MozDef,gdestuynder/MozDef,ameihm0912/MozDef,Phrozyn/MozDef,mozilla/MozDef,jeffbryner/MozDef,ameihm0912/MozDef,jeffbryner/MozDef,gdestuynd... | from positive_test_suite import PositiveTestSuite
from negative_test_suite import NegativeTestSuite
import os
import sys
sys.path.append(os.path.join(os.path.dirname(__file__), "../../lib"))
from query_models import QueryStringMatch
class TestQueryStringMatchPositiveTestSuite(PositiveTestSuite):
def query_tests(... | from positive_test_suite import PositiveTestSuite
from negative_test_suite import NegativeTestSuite
import os
import sys
sys.path.append(os.path.join(os.path.dirname(__file__), "../../lib"))
from query_models import QueryStringMatch
hostname_test_regex = 'hostname: /(.*\.)*(sub|bus)+(\..*)*\.abc(\..*)*\.company\.com... | <commit_before>from positive_test_suite import PositiveTestSuite
from negative_test_suite import NegativeTestSuite
import os
import sys
sys.path.append(os.path.join(os.path.dirname(__file__), "../../lib"))
from query_models import QueryStringMatch
class TestQueryStringMatchPositiveTestSuite(PositiveTestSuite):
d... | from positive_test_suite import PositiveTestSuite
from negative_test_suite import NegativeTestSuite
import os
import sys
sys.path.append(os.path.join(os.path.dirname(__file__), "../../lib"))
from query_models import QueryStringMatch
hostname_test_regex = 'hostname: /(.*\.)*(sub|bus)+(\..*)*\.abc(\..*)*\.company\.com... | from positive_test_suite import PositiveTestSuite
from negative_test_suite import NegativeTestSuite
import os
import sys
sys.path.append(os.path.join(os.path.dirname(__file__), "../../lib"))
from query_models import QueryStringMatch
class TestQueryStringMatchPositiveTestSuite(PositiveTestSuite):
def query_tests(... | <commit_before>from positive_test_suite import PositiveTestSuite
from negative_test_suite import NegativeTestSuite
import os
import sys
sys.path.append(os.path.join(os.path.dirname(__file__), "../../lib"))
from query_models import QueryStringMatch
class TestQueryStringMatchPositiveTestSuite(PositiveTestSuite):
d... |
ff2bf51f003fc5af1f62fc1aa181ca11a766c8f6 | fs/archive/__init__.py | fs/archive/__init__.py | # coding: utf-8
from __future__ import absolute_import
from __future__ import unicode_literals
import contextlib
@contextlib.contextmanager
def open_archive(fs_url, archive):
from pkg_resources import iter_entry_points
from ..opener import open_fs
from ..opener._errors import Unsupported
it = iter_en... | # coding: utf-8
from __future__ import absolute_import
from __future__ import unicode_literals
import contextlib
@contextlib.contextmanager
def open_archive(fs_url, archive):
from pkg_resources import iter_entry_points
from ..opener import open_fs
from ..opener._errors import Unsupported
it = iter_en... | Make sure files and FS are properly closed in open_archive | Make sure files and FS are properly closed in open_archive
| Python | mit | althonos/fs.archive | # coding: utf-8
from __future__ import absolute_import
from __future__ import unicode_literals
import contextlib
@contextlib.contextmanager
def open_archive(fs_url, archive):
from pkg_resources import iter_entry_points
from ..opener import open_fs
from ..opener._errors import Unsupported
it = iter_en... | # coding: utf-8
from __future__ import absolute_import
from __future__ import unicode_literals
import contextlib
@contextlib.contextmanager
def open_archive(fs_url, archive):
from pkg_resources import iter_entry_points
from ..opener import open_fs
from ..opener._errors import Unsupported
it = iter_en... | <commit_before># coding: utf-8
from __future__ import absolute_import
from __future__ import unicode_literals
import contextlib
@contextlib.contextmanager
def open_archive(fs_url, archive):
from pkg_resources import iter_entry_points
from ..opener import open_fs
from ..opener._errors import Unsupported
... | # coding: utf-8
from __future__ import absolute_import
from __future__ import unicode_literals
import contextlib
@contextlib.contextmanager
def open_archive(fs_url, archive):
from pkg_resources import iter_entry_points
from ..opener import open_fs
from ..opener._errors import Unsupported
it = iter_en... | # coding: utf-8
from __future__ import absolute_import
from __future__ import unicode_literals
import contextlib
@contextlib.contextmanager
def open_archive(fs_url, archive):
from pkg_resources import iter_entry_points
from ..opener import open_fs
from ..opener._errors import Unsupported
it = iter_en... | <commit_before># coding: utf-8
from __future__ import absolute_import
from __future__ import unicode_literals
import contextlib
@contextlib.contextmanager
def open_archive(fs_url, archive):
from pkg_resources import iter_entry_points
from ..opener import open_fs
from ..opener._errors import Unsupported
... |
12c1ee81843e3e163756a39b68671cf5c1842df2 | scrapi/harvesters/mason_archival.py | scrapi/harvesters/mason_archival.py | """
Harvester for Mason Archival Repository Service for the SHARE NS
"""
from __future__ import unicode_literals
from scrapi.base import OAIHarvester
class MasonArchival(OAIHarvester):
short_name = 'mason'
long_name = 'Mason Archival Repository Service'
url = 'http://mars.gmu.edu/'
base_url = 'http:... | """
Harvester for Mason Archival Repository Service for the SHARE NS
"""
from __future__ import unicode_literals
from scrapi.base import OAIHarvester
class MasonArchival(OAIHarvester):
short_name = 'mason'
long_name = 'Mason Archival Repository Service'
url = 'http://mars.gmu.edu/'
base_url = 'http:... | Add approved set to gmu | Add approved set to gmu
| Python | apache-2.0 | CenterForOpenScience/scrapi,fabianvf/scrapi,CenterForOpenScience/scrapi,fabianvf/scrapi,erinspace/scrapi,erinspace/scrapi | """
Harvester for Mason Archival Repository Service for the SHARE NS
"""
from __future__ import unicode_literals
from scrapi.base import OAIHarvester
class MasonArchival(OAIHarvester):
short_name = 'mason'
long_name = 'Mason Archival Repository Service'
url = 'http://mars.gmu.edu/'
base_url = 'http:... | """
Harvester for Mason Archival Repository Service for the SHARE NS
"""
from __future__ import unicode_literals
from scrapi.base import OAIHarvester
class MasonArchival(OAIHarvester):
short_name = 'mason'
long_name = 'Mason Archival Repository Service'
url = 'http://mars.gmu.edu/'
base_url = 'http:... | <commit_before>"""
Harvester for Mason Archival Repository Service for the SHARE NS
"""
from __future__ import unicode_literals
from scrapi.base import OAIHarvester
class MasonArchival(OAIHarvester):
short_name = 'mason'
long_name = 'Mason Archival Repository Service'
url = 'http://mars.gmu.edu/'
ba... | """
Harvester for Mason Archival Repository Service for the SHARE NS
"""
from __future__ import unicode_literals
from scrapi.base import OAIHarvester
class MasonArchival(OAIHarvester):
short_name = 'mason'
long_name = 'Mason Archival Repository Service'
url = 'http://mars.gmu.edu/'
base_url = 'http:... | """
Harvester for Mason Archival Repository Service for the SHARE NS
"""
from __future__ import unicode_literals
from scrapi.base import OAIHarvester
class MasonArchival(OAIHarvester):
short_name = 'mason'
long_name = 'Mason Archival Repository Service'
url = 'http://mars.gmu.edu/'
base_url = 'http:... | <commit_before>"""
Harvester for Mason Archival Repository Service for the SHARE NS
"""
from __future__ import unicode_literals
from scrapi.base import OAIHarvester
class MasonArchival(OAIHarvester):
short_name = 'mason'
long_name = 'Mason Archival Repository Service'
url = 'http://mars.gmu.edu/'
ba... |
82bca5898d753638536abdd965c799bd947163e5 | scipy/ndimage/tests/test_regression.py | scipy/ndimage/tests/test_regression.py | import numpy as np
from numpy.testing import *
import scipy.ndimage as ndimage
def test_byte_order_median():
"""Regression test for #413: median_filter does not handle bytes orders."""
a = np.arange(9, dtype='<f4').reshape(3, 3)
ref = ndimage.filters.median_filter(a,(3, 3))
b = np.arange(9, dtype='>f4... | import numpy as np
from numpy.testing import *
import scipy.ndimage as ndimage
def test_byte_order_median():
"""Regression test for #413: median_filter does not handle bytes orders."""
a = np.arange(9, dtype='<f4').reshape(3, 3)
ref = ndimage.filters.median_filter(a,(3, 3))
b = np.arange(9, dtype='>f4... | Use run_module_suite instead of deprecated NumpyTest. | Use run_module_suite instead of deprecated NumpyTest.
| Python | bsd-3-clause | teoliphant/scipy,gef756/scipy,ChanderG/scipy,raoulbq/scipy,petebachant/scipy,dch312/scipy,zaxliu/scipy,gertingold/scipy,ndchorley/scipy,zxsted/scipy,sonnyhu/scipy,ortylp/scipy,jsilter/scipy,rgommers/scipy,jseabold/scipy,surhudm/scipy,vhaasteren/scipy,jamestwebber/scipy,piyush0609/scipy,ales-erjavec/scipy,WillieMaddox/s... | import numpy as np
from numpy.testing import *
import scipy.ndimage as ndimage
def test_byte_order_median():
"""Regression test for #413: median_filter does not handle bytes orders."""
a = np.arange(9, dtype='<f4').reshape(3, 3)
ref = ndimage.filters.median_filter(a,(3, 3))
b = np.arange(9, dtype='>f4... | import numpy as np
from numpy.testing import *
import scipy.ndimage as ndimage
def test_byte_order_median():
"""Regression test for #413: median_filter does not handle bytes orders."""
a = np.arange(9, dtype='<f4').reshape(3, 3)
ref = ndimage.filters.median_filter(a,(3, 3))
b = np.arange(9, dtype='>f4... | <commit_before>import numpy as np
from numpy.testing import *
import scipy.ndimage as ndimage
def test_byte_order_median():
"""Regression test for #413: median_filter does not handle bytes orders."""
a = np.arange(9, dtype='<f4').reshape(3, 3)
ref = ndimage.filters.median_filter(a,(3, 3))
b = np.arang... | import numpy as np
from numpy.testing import *
import scipy.ndimage as ndimage
def test_byte_order_median():
"""Regression test for #413: median_filter does not handle bytes orders."""
a = np.arange(9, dtype='<f4').reshape(3, 3)
ref = ndimage.filters.median_filter(a,(3, 3))
b = np.arange(9, dtype='>f4... | import numpy as np
from numpy.testing import *
import scipy.ndimage as ndimage
def test_byte_order_median():
"""Regression test for #413: median_filter does not handle bytes orders."""
a = np.arange(9, dtype='<f4').reshape(3, 3)
ref = ndimage.filters.median_filter(a,(3, 3))
b = np.arange(9, dtype='>f4... | <commit_before>import numpy as np
from numpy.testing import *
import scipy.ndimage as ndimage
def test_byte_order_median():
"""Regression test for #413: median_filter does not handle bytes orders."""
a = np.arange(9, dtype='<f4').reshape(3, 3)
ref = ndimage.filters.median_filter(a,(3, 3))
b = np.arang... |
596b435e57275714b3d37529cc342cacc15a86bf | moto/s3/utils.py | moto/s3/utils.py | import re
import urllib2
import urlparse
bucket_name_regex = re.compile("(.+).s3.amazonaws.com")
def bucket_name_from_url(url):
domain = urlparse.urlparse(url).netloc
# If 'www' prefixed, strip it.
domain = domain.lstrip("www.")
if 'amazonaws.com' in domain:
bucket_result = bucket_name_rege... | import re
import urllib2
import urlparse
bucket_name_regex = re.compile("(.+).s3.amazonaws.com")
def bucket_name_from_url(url):
domain = urlparse.urlparse(url).netloc
# If 'www' prefixed, strip it.
domain = domain.replace("www.", "")
if 'amazonaws.com' in domain:
bucket_result = bucket_name... | Fix the 'www.' strip changing the lstrip method by the replace | Fix the 'www.' strip changing the lstrip method by the replace
| Python | apache-2.0 | okomestudio/moto,william-richard/moto,araines/moto,william-richard/moto,whummer/moto,Affirm/moto,Brett55/moto,EarthmanT/moto,rocky4570/moto,andresriancho/moto,jszwedko/moto,riccardomc/moto,braintreeps/moto,ImmobilienScout24/moto,heddle317/moto,william-richard/moto,whummer/moto,heddle317/moto,heddle317/moto,ZuluPro/moto... | import re
import urllib2
import urlparse
bucket_name_regex = re.compile("(.+).s3.amazonaws.com")
def bucket_name_from_url(url):
domain = urlparse.urlparse(url).netloc
# If 'www' prefixed, strip it.
domain = domain.lstrip("www.")
if 'amazonaws.com' in domain:
bucket_result = bucket_name_rege... | import re
import urllib2
import urlparse
bucket_name_regex = re.compile("(.+).s3.amazonaws.com")
def bucket_name_from_url(url):
domain = urlparse.urlparse(url).netloc
# If 'www' prefixed, strip it.
domain = domain.replace("www.", "")
if 'amazonaws.com' in domain:
bucket_result = bucket_name... | <commit_before>import re
import urllib2
import urlparse
bucket_name_regex = re.compile("(.+).s3.amazonaws.com")
def bucket_name_from_url(url):
domain = urlparse.urlparse(url).netloc
# If 'www' prefixed, strip it.
domain = domain.lstrip("www.")
if 'amazonaws.com' in domain:
bucket_result = b... | import re
import urllib2
import urlparse
bucket_name_regex = re.compile("(.+).s3.amazonaws.com")
def bucket_name_from_url(url):
domain = urlparse.urlparse(url).netloc
# If 'www' prefixed, strip it.
domain = domain.replace("www.", "")
if 'amazonaws.com' in domain:
bucket_result = bucket_name... | import re
import urllib2
import urlparse
bucket_name_regex = re.compile("(.+).s3.amazonaws.com")
def bucket_name_from_url(url):
domain = urlparse.urlparse(url).netloc
# If 'www' prefixed, strip it.
domain = domain.lstrip("www.")
if 'amazonaws.com' in domain:
bucket_result = bucket_name_rege... | <commit_before>import re
import urllib2
import urlparse
bucket_name_regex = re.compile("(.+).s3.amazonaws.com")
def bucket_name_from_url(url):
domain = urlparse.urlparse(url).netloc
# If 'www' prefixed, strip it.
domain = domain.lstrip("www.")
if 'amazonaws.com' in domain:
bucket_result = b... |
7fc5d07932587c87e8484190c84b6936a2b7247e | cms_genome_browser/urls.py | cms_genome_browser/urls.py | from django.conf.urls import patterns, url
from cms_genome_browser.views import BrowserListView, BrowserDetailView
urlpatterns = patterns('',
url(r'^$', BrowserListView.as_view(), name='browser_list'),
url(r'^(?P<slug>[^/]+)$', BrowserDetailView.as_view(), name='browser_detail'),
)
| from django.conf.urls import patterns, url
from cms_genome_browser.views import BrowserListView, BrowserDetailView
urlpatterns = patterns('',
url(r'^$', BrowserListView.as_view(), name='browser_list'),
url(r'^(?P<slug>[^/]+)/$', BrowserDetailView.as_view(), name='browser_detail'),
)
| Append trailing slash to detail URL | Append trailing slash to detail URL
| Python | bsd-3-clause | mfcovington/djangocms-genome-browser,mfcovington/djangocms-genome-browser,mfcovington/djangocms-genome-browser | from django.conf.urls import patterns, url
from cms_genome_browser.views import BrowserListView, BrowserDetailView
urlpatterns = patterns('',
url(r'^$', BrowserListView.as_view(), name='browser_list'),
url(r'^(?P<slug>[^/]+)$', BrowserDetailView.as_view(), name='browser_detail'),
)
Append trailing slash to det... | from django.conf.urls import patterns, url
from cms_genome_browser.views import BrowserListView, BrowserDetailView
urlpatterns = patterns('',
url(r'^$', BrowserListView.as_view(), name='browser_list'),
url(r'^(?P<slug>[^/]+)/$', BrowserDetailView.as_view(), name='browser_detail'),
)
| <commit_before>from django.conf.urls import patterns, url
from cms_genome_browser.views import BrowserListView, BrowserDetailView
urlpatterns = patterns('',
url(r'^$', BrowserListView.as_view(), name='browser_list'),
url(r'^(?P<slug>[^/]+)$', BrowserDetailView.as_view(), name='browser_detail'),
)
<commit_msg>A... | from django.conf.urls import patterns, url
from cms_genome_browser.views import BrowserListView, BrowserDetailView
urlpatterns = patterns('',
url(r'^$', BrowserListView.as_view(), name='browser_list'),
url(r'^(?P<slug>[^/]+)/$', BrowserDetailView.as_view(), name='browser_detail'),
)
| from django.conf.urls import patterns, url
from cms_genome_browser.views import BrowserListView, BrowserDetailView
urlpatterns = patterns('',
url(r'^$', BrowserListView.as_view(), name='browser_list'),
url(r'^(?P<slug>[^/]+)$', BrowserDetailView.as_view(), name='browser_detail'),
)
Append trailing slash to det... | <commit_before>from django.conf.urls import patterns, url
from cms_genome_browser.views import BrowserListView, BrowserDetailView
urlpatterns = patterns('',
url(r'^$', BrowserListView.as_view(), name='browser_list'),
url(r'^(?P<slug>[^/]+)$', BrowserDetailView.as_view(), name='browser_detail'),
)
<commit_msg>A... |
316dac037b8cef3086f5bdf6b9fd2afa0b2bfbd3 | mama_cas/urls.py | mama_cas/urls.py | """
URLconf for CAS server URIs as described in the CAS protocol.
"""
from django.conf.urls import patterns
from django.conf.urls import url
from mama_cas.views import LoginView
from mama_cas.views import LogoutView
from mama_cas.views import ValidateView
from mama_cas.views import ServiceValidateView
from mama_cas.v... | """
(2) CAS server URIs as described in the CAS protocol.
"""
from django.conf.urls import patterns
from django.conf.urls import url
from mama_cas.views import LoginView
from mama_cas.views import LogoutView
from mama_cas.views import ValidateView
from mama_cas.views import ServiceValidateView
from mama_cas.views imp... | Add CAS 3.0 specific endpoints | Add CAS 3.0 specific endpoints
| Python | bsd-3-clause | jbittel/django-mama-cas,jbittel/django-mama-cas,orbitvu/django-mama-cas,orbitvu/django-mama-cas | """
URLconf for CAS server URIs as described in the CAS protocol.
"""
from django.conf.urls import patterns
from django.conf.urls import url
from mama_cas.views import LoginView
from mama_cas.views import LogoutView
from mama_cas.views import ValidateView
from mama_cas.views import ServiceValidateView
from mama_cas.v... | """
(2) CAS server URIs as described in the CAS protocol.
"""
from django.conf.urls import patterns
from django.conf.urls import url
from mama_cas.views import LoginView
from mama_cas.views import LogoutView
from mama_cas.views import ValidateView
from mama_cas.views import ServiceValidateView
from mama_cas.views imp... | <commit_before>"""
URLconf for CAS server URIs as described in the CAS protocol.
"""
from django.conf.urls import patterns
from django.conf.urls import url
from mama_cas.views import LoginView
from mama_cas.views import LogoutView
from mama_cas.views import ValidateView
from mama_cas.views import ServiceValidateView
... | """
(2) CAS server URIs as described in the CAS protocol.
"""
from django.conf.urls import patterns
from django.conf.urls import url
from mama_cas.views import LoginView
from mama_cas.views import LogoutView
from mama_cas.views import ValidateView
from mama_cas.views import ServiceValidateView
from mama_cas.views imp... | """
URLconf for CAS server URIs as described in the CAS protocol.
"""
from django.conf.urls import patterns
from django.conf.urls import url
from mama_cas.views import LoginView
from mama_cas.views import LogoutView
from mama_cas.views import ValidateView
from mama_cas.views import ServiceValidateView
from mama_cas.v... | <commit_before>"""
URLconf for CAS server URIs as described in the CAS protocol.
"""
from django.conf.urls import patterns
from django.conf.urls import url
from mama_cas.views import LoginView
from mama_cas.views import LogoutView
from mama_cas.views import ValidateView
from mama_cas.views import ServiceValidateView
... |
308f9d8e1d4083bb7cc6bca0cf021118502d141b | marble/common.py | marble/common.py | # -*- coding: utf-8 -*-
"""common.py
Contains basic functions that are shared thoughout the module
"""
def compute_totals(distribution, classes):
"Compute the number of individuals per class, per unit and in total"
N_unit = {au:sum([distribution[au][cl] for cl in classes]) for au in distribution}
N_class... | # -*- coding: utf-8 -*-
"""common.py
Contains basic functions that are shared throughout the module
"""
def compute_totals(distribution, classes):
"Compute the number of individuals per class, per unit and in total"
N_unit = {au:sum([distribution[au][cl] for cl in classes]) for au in distribution}
N_clas... | Raise exception if faulty definition of classes inserted | Raise exception if faulty definition of classes inserted
| Python | bsd-3-clause | scities/marble,walkerke/marble | # -*- coding: utf-8 -*-
"""common.py
Contains basic functions that are shared thoughout the module
"""
def compute_totals(distribution, classes):
"Compute the number of individuals per class, per unit and in total"
N_unit = {au:sum([distribution[au][cl] for cl in classes]) for au in distribution}
N_class... | # -*- coding: utf-8 -*-
"""common.py
Contains basic functions that are shared throughout the module
"""
def compute_totals(distribution, classes):
"Compute the number of individuals per class, per unit and in total"
N_unit = {au:sum([distribution[au][cl] for cl in classes]) for au in distribution}
N_clas... | <commit_before># -*- coding: utf-8 -*-
"""common.py
Contains basic functions that are shared thoughout the module
"""
def compute_totals(distribution, classes):
"Compute the number of individuals per class, per unit and in total"
N_unit = {au:sum([distribution[au][cl] for cl in classes]) for au in distributi... | # -*- coding: utf-8 -*-
"""common.py
Contains basic functions that are shared throughout the module
"""
def compute_totals(distribution, classes):
"Compute the number of individuals per class, per unit and in total"
N_unit = {au:sum([distribution[au][cl] for cl in classes]) for au in distribution}
N_clas... | # -*- coding: utf-8 -*-
"""common.py
Contains basic functions that are shared thoughout the module
"""
def compute_totals(distribution, classes):
"Compute the number of individuals per class, per unit and in total"
N_unit = {au:sum([distribution[au][cl] for cl in classes]) for au in distribution}
N_class... | <commit_before># -*- coding: utf-8 -*-
"""common.py
Contains basic functions that are shared thoughout the module
"""
def compute_totals(distribution, classes):
"Compute the number of individuals per class, per unit and in total"
N_unit = {au:sum([distribution[au][cl] for cl in classes]) for au in distributi... |
5bf441e34b672a5a369ad7e42cdc2fc7f7699476 | publishers/base_publisher.py | publishers/base_publisher.py | from shared.base_component import BaseComponent
class BasePublisher(BaseComponent):
def __init__(self, conf):
BaseComponent.__init__(self, conf)
def publish(self, message):
pass
def __call__(self, message):
if self.query.match(message):
message = self.project.transform... | from shared.base_component import BaseComponent
class BasePublisher(BaseComponent):
def __init__(self, conf):
BaseComponent.__init__(self, conf)
def publish(self, message):
pass
def __call__(self, message):
if self.query.match(message):
message = self.project.transform... | Discard None values in projections in publishers | Discard None values in projections in publishers
| Python | mit | weapp/miner | from shared.base_component import BaseComponent
class BasePublisher(BaseComponent):
def __init__(self, conf):
BaseComponent.__init__(self, conf)
def publish(self, message):
pass
def __call__(self, message):
if self.query.match(message):
message = self.project.transform... | from shared.base_component import BaseComponent
class BasePublisher(BaseComponent):
def __init__(self, conf):
BaseComponent.__init__(self, conf)
def publish(self, message):
pass
def __call__(self, message):
if self.query.match(message):
message = self.project.transform... | <commit_before>from shared.base_component import BaseComponent
class BasePublisher(BaseComponent):
def __init__(self, conf):
BaseComponent.__init__(self, conf)
def publish(self, message):
pass
def __call__(self, message):
if self.query.match(message):
message = self.pr... | from shared.base_component import BaseComponent
class BasePublisher(BaseComponent):
def __init__(self, conf):
BaseComponent.__init__(self, conf)
def publish(self, message):
pass
def __call__(self, message):
if self.query.match(message):
message = self.project.transform... | from shared.base_component import BaseComponent
class BasePublisher(BaseComponent):
def __init__(self, conf):
BaseComponent.__init__(self, conf)
def publish(self, message):
pass
def __call__(self, message):
if self.query.match(message):
message = self.project.transform... | <commit_before>from shared.base_component import BaseComponent
class BasePublisher(BaseComponent):
def __init__(self, conf):
BaseComponent.__init__(self, conf)
def publish(self, message):
pass
def __call__(self, message):
if self.query.match(message):
message = self.pr... |
14447e99f550d4b41ccee474fa89382bb0744eb3 | bookmarks/forms.py | bookmarks/forms.py | from flask_wtf import FlaskForm
from wtforms import StringField, PasswordField, BooleanField
from wtforms.validators import (DataRequired, Length, EqualTo, Email, Regexp,
URL)
class BookmarkForm(FlaskForm):
b_id = StringField('Bookmark ID', [
Length(min=6,
ma... | from flask_wtf import FlaskForm
from wtforms import StringField, PasswordField, BooleanField
from wtforms.validators import (DataRequired, Length, EqualTo, Email, Regexp,
URL)
class BookmarkForm(FlaskForm):
b_id = StringField('Bookmark ID', [
Length(min=6,
ma... | Add regex password validation to register form | Add regex password validation to register form
Checks for password complexity on registartion
| Python | apache-2.0 | byanofsky/bookmarks,byanofsky/bookmarks,byanofsky/bookmarks | from flask_wtf import FlaskForm
from wtforms import StringField, PasswordField, BooleanField
from wtforms.validators import (DataRequired, Length, EqualTo, Email, Regexp,
URL)
class BookmarkForm(FlaskForm):
b_id = StringField('Bookmark ID', [
Length(min=6,
ma... | from flask_wtf import FlaskForm
from wtforms import StringField, PasswordField, BooleanField
from wtforms.validators import (DataRequired, Length, EqualTo, Email, Regexp,
URL)
class BookmarkForm(FlaskForm):
b_id = StringField('Bookmark ID', [
Length(min=6,
ma... | <commit_before>from flask_wtf import FlaskForm
from wtforms import StringField, PasswordField, BooleanField
from wtforms.validators import (DataRequired, Length, EqualTo, Email, Regexp,
URL)
class BookmarkForm(FlaskForm):
b_id = StringField('Bookmark ID', [
Length(min=6,
... | from flask_wtf import FlaskForm
from wtforms import StringField, PasswordField, BooleanField
from wtforms.validators import (DataRequired, Length, EqualTo, Email, Regexp,
URL)
class BookmarkForm(FlaskForm):
b_id = StringField('Bookmark ID', [
Length(min=6,
ma... | from flask_wtf import FlaskForm
from wtforms import StringField, PasswordField, BooleanField
from wtforms.validators import (DataRequired, Length, EqualTo, Email, Regexp,
URL)
class BookmarkForm(FlaskForm):
b_id = StringField('Bookmark ID', [
Length(min=6,
ma... | <commit_before>from flask_wtf import FlaskForm
from wtforms import StringField, PasswordField, BooleanField
from wtforms.validators import (DataRequired, Length, EqualTo, Email, Regexp,
URL)
class BookmarkForm(FlaskForm):
b_id = StringField('Bookmark ID', [
Length(min=6,
... |
c41115875ce46be3eacc1ec7c539010b430b0374 | kegg_adapter/kegg.py | kegg_adapter/kegg.py | import urllib2
import json
#response = urllib2.urlopen('http://rest.kegg.jp/list/pathway/ath')
#html = response.read()
#lines = html.split('\n');
#data = {};
#for line in lines:
# parts = line.split('\t');
# if len(parts) >= 2:
# data[parts[0]] = parts[1]
#json_data = json.dumps(data)
#print json_data
... | import urllib2
import json
#response = urllib2.urlopen('http://rest.kegg.jp/list/pathway/ath')
#html = response.read()
#lines = html.split('\n');
#data = {};
#for line in lines:
# parts = line.split('\t');
# if len(parts) >= 2:
# data[parts[0]] = parts[1]
#json_data = json.dumps(data)
#print json_data
... | Remove debugging print statements changed exit status from 1 to 0 | Remove debugging print statements
changed exit status from 1 to 0
| Python | artistic-2.0 | Arabidopsis-Information-Portal/Intern-Hello-World,Arabidopsis-Information-Portal/KEGG-Pathway-API | import urllib2
import json
#response = urllib2.urlopen('http://rest.kegg.jp/list/pathway/ath')
#html = response.read()
#lines = html.split('\n');
#data = {};
#for line in lines:
# parts = line.split('\t');
# if len(parts) >= 2:
# data[parts[0]] = parts[1]
#json_data = json.dumps(data)
#print json_data
... | import urllib2
import json
#response = urllib2.urlopen('http://rest.kegg.jp/list/pathway/ath')
#html = response.read()
#lines = html.split('\n');
#data = {};
#for line in lines:
# parts = line.split('\t');
# if len(parts) >= 2:
# data[parts[0]] = parts[1]
#json_data = json.dumps(data)
#print json_data
... | <commit_before>import urllib2
import json
#response = urllib2.urlopen('http://rest.kegg.jp/list/pathway/ath')
#html = response.read()
#lines = html.split('\n');
#data = {};
#for line in lines:
# parts = line.split('\t');
# if len(parts) >= 2:
# data[parts[0]] = parts[1]
#json_data = json.dumps(data)
#pr... | import urllib2
import json
#response = urllib2.urlopen('http://rest.kegg.jp/list/pathway/ath')
#html = response.read()
#lines = html.split('\n');
#data = {};
#for line in lines:
# parts = line.split('\t');
# if len(parts) >= 2:
# data[parts[0]] = parts[1]
#json_data = json.dumps(data)
#print json_data
... | import urllib2
import json
#response = urllib2.urlopen('http://rest.kegg.jp/list/pathway/ath')
#html = response.read()
#lines = html.split('\n');
#data = {};
#for line in lines:
# parts = line.split('\t');
# if len(parts) >= 2:
# data[parts[0]] = parts[1]
#json_data = json.dumps(data)
#print json_data
... | <commit_before>import urllib2
import json
#response = urllib2.urlopen('http://rest.kegg.jp/list/pathway/ath')
#html = response.read()
#lines = html.split('\n');
#data = {};
#for line in lines:
# parts = line.split('\t');
# if len(parts) >= 2:
# data[parts[0]] = parts[1]
#json_data = json.dumps(data)
#pr... |
b1c8ce6ac2658264a97983b185ebef31c0952b33 | depot/tests.py | depot/tests.py | from django.test import TestCase
from .models import Depot
class DepotTestCase(TestCase):
def test_str(self):
depot = Depot(1, "My depot")
self.assertEqual(depot.__str__(), "Depot My depot")
| from django.test import TestCase
from .models import Depot, Item
class DepotTestCase(TestCase):
def test_str(self):
depot = Depot(1, "My depot")
self.assertEqual(depot.__str__(), "Depot My depot")
class ItemTestCase(TestCase):
def test_str(self):
depot = Depot(2, "My depot")
... | Add test case for Item __str__ function | Add test case for Item __str__ function
| Python | agpl-3.0 | verleihtool/verleihtool,verleihtool/verleihtool,verleihtool/verleihtool,verleihtool/verleihtool | from django.test import TestCase
from .models import Depot
class DepotTestCase(TestCase):
def test_str(self):
depot = Depot(1, "My depot")
self.assertEqual(depot.__str__(), "Depot My depot")
Add test case for Item __str__ function | from django.test import TestCase
from .models import Depot, Item
class DepotTestCase(TestCase):
def test_str(self):
depot = Depot(1, "My depot")
self.assertEqual(depot.__str__(), "Depot My depot")
class ItemTestCase(TestCase):
def test_str(self):
depot = Depot(2, "My depot")
... | <commit_before>from django.test import TestCase
from .models import Depot
class DepotTestCase(TestCase):
def test_str(self):
depot = Depot(1, "My depot")
self.assertEqual(depot.__str__(), "Depot My depot")
<commit_msg>Add test case for Item __str__ function<commit_after> | from django.test import TestCase
from .models import Depot, Item
class DepotTestCase(TestCase):
def test_str(self):
depot = Depot(1, "My depot")
self.assertEqual(depot.__str__(), "Depot My depot")
class ItemTestCase(TestCase):
def test_str(self):
depot = Depot(2, "My depot")
... | from django.test import TestCase
from .models import Depot
class DepotTestCase(TestCase):
def test_str(self):
depot = Depot(1, "My depot")
self.assertEqual(depot.__str__(), "Depot My depot")
Add test case for Item __str__ functionfrom django.test import TestCase
from .models import Depot, Item
cl... | <commit_before>from django.test import TestCase
from .models import Depot
class DepotTestCase(TestCase):
def test_str(self):
depot = Depot(1, "My depot")
self.assertEqual(depot.__str__(), "Depot My depot")
<commit_msg>Add test case for Item __str__ function<commit_after>from django.test import Tes... |
c6e23473520a3b055896524663779fa582189763 | datacats/tests/test_cli_pull.py | datacats/tests/test_cli_pull.py | from datacats.cli.pull import _retry_func
from datacats.error import DatacatsError
from unittest import TestCase
def raise_an_error(_):
raise DatacatsError('Hi')
class TestPullCli(TestCase):
def test_cli_pull_retry(self):
def count(*dummy, **_):
count.counter += 1
count.counter =... | from datacats.cli.pull import _retry_func
from datacats.error import DatacatsError
from unittest import TestCase
def raise_an_error(_):
raise DatacatsError('Hi')
class TestPullCli(TestCase):
def test_cli_pull_retry(self):
def count(*dummy, **_):
count.counter += 1
count.counter =... | Move around assertions as Ian talked about | Move around assertions as Ian talked about
| Python | agpl-3.0 | datawagovau/datacats,JJediny/datacats,JackMc/datacats,reneenoble/datacats,wardi/datacats,deniszgonjanin/datacats,poguez/datacats,datawagovau/datacats,wardi/datacats,datacats/datacats,reneenoble/datacats,JackMc/datacats,poguez/datacats,deniszgonjanin/datacats,JJediny/datacats,datacats/datacats | from datacats.cli.pull import _retry_func
from datacats.error import DatacatsError
from unittest import TestCase
def raise_an_error(_):
raise DatacatsError('Hi')
class TestPullCli(TestCase):
def test_cli_pull_retry(self):
def count(*dummy, **_):
count.counter += 1
count.counter =... | from datacats.cli.pull import _retry_func
from datacats.error import DatacatsError
from unittest import TestCase
def raise_an_error(_):
raise DatacatsError('Hi')
class TestPullCli(TestCase):
def test_cli_pull_retry(self):
def count(*dummy, **_):
count.counter += 1
count.counter =... | <commit_before>from datacats.cli.pull import _retry_func
from datacats.error import DatacatsError
from unittest import TestCase
def raise_an_error(_):
raise DatacatsError('Hi')
class TestPullCli(TestCase):
def test_cli_pull_retry(self):
def count(*dummy, **_):
count.counter += 1
... | from datacats.cli.pull import _retry_func
from datacats.error import DatacatsError
from unittest import TestCase
def raise_an_error(_):
raise DatacatsError('Hi')
class TestPullCli(TestCase):
def test_cli_pull_retry(self):
def count(*dummy, **_):
count.counter += 1
count.counter =... | from datacats.cli.pull import _retry_func
from datacats.error import DatacatsError
from unittest import TestCase
def raise_an_error(_):
raise DatacatsError('Hi')
class TestPullCli(TestCase):
def test_cli_pull_retry(self):
def count(*dummy, **_):
count.counter += 1
count.counter =... | <commit_before>from datacats.cli.pull import _retry_func
from datacats.error import DatacatsError
from unittest import TestCase
def raise_an_error(_):
raise DatacatsError('Hi')
class TestPullCli(TestCase):
def test_cli_pull_retry(self):
def count(*dummy, **_):
count.counter += 1
... |
2a550df5d9200deb6700fca4270526633811d592 | osfclient/cli.py | osfclient/cli.py | """Command line interface to the OSF"""
import os
from .api import OSF
CHUNK_SIZE = int(5e6)
def _setup_osf(args):
# command line argument overrides environment variable
username = os.getenv("OSF_USERNAME")
if args.username is not None:
username = args.username
password = os.getenv("OSF_PA... | """Command line interface to the OSF"""
import os
from .api import OSF
CHUNK_SIZE = int(5e6)
def _setup_osf(args):
# command line argument overrides environment variable
username = os.getenv("OSF_USERNAME")
if args.username is not None:
username = args.username
password = None
if usern... | Stop grabbing password when there is no username | Stop grabbing password when there is no username
| Python | bsd-3-clause | betatim/osf-cli,betatim/osf-cli | """Command line interface to the OSF"""
import os
from .api import OSF
CHUNK_SIZE = int(5e6)
def _setup_osf(args):
# command line argument overrides environment variable
username = os.getenv("OSF_USERNAME")
if args.username is not None:
username = args.username
password = os.getenv("OSF_PA... | """Command line interface to the OSF"""
import os
from .api import OSF
CHUNK_SIZE = int(5e6)
def _setup_osf(args):
# command line argument overrides environment variable
username = os.getenv("OSF_USERNAME")
if args.username is not None:
username = args.username
password = None
if usern... | <commit_before>"""Command line interface to the OSF"""
import os
from .api import OSF
CHUNK_SIZE = int(5e6)
def _setup_osf(args):
# command line argument overrides environment variable
username = os.getenv("OSF_USERNAME")
if args.username is not None:
username = args.username
password = os... | """Command line interface to the OSF"""
import os
from .api import OSF
CHUNK_SIZE = int(5e6)
def _setup_osf(args):
# command line argument overrides environment variable
username = os.getenv("OSF_USERNAME")
if args.username is not None:
username = args.username
password = None
if usern... | """Command line interface to the OSF"""
import os
from .api import OSF
CHUNK_SIZE = int(5e6)
def _setup_osf(args):
# command line argument overrides environment variable
username = os.getenv("OSF_USERNAME")
if args.username is not None:
username = args.username
password = os.getenv("OSF_PA... | <commit_before>"""Command line interface to the OSF"""
import os
from .api import OSF
CHUNK_SIZE = int(5e6)
def _setup_osf(args):
# command line argument overrides environment variable
username = os.getenv("OSF_USERNAME")
if args.username is not None:
username = args.username
password = os... |
11906213015f03cfdb3f247a6dbcab0619be61e3 | comrade/core/decorators.py | comrade/core/decorators.py | from django.shortcuts import get_object_or_404
from django.utils.decorators import available_attrs
from django.utils.http import urlquote
from django.http import HttpResponse
from django.template import loader, RequestContext
from functools import wraps
def singleton(cls):
instances = {}
def getinstance():
... | from django.shortcuts import get_object_or_404
from django.utils.decorators import available_attrs
from comrade.views.simple import direct_to_template
from functools import wraps
def singleton(cls):
instances = {}
def getinstance():
if cls not in instances:
instances[cls] = cls()
... | Use our own code, when possible. | Use our own code, when possible.
| Python | mit | bueda/django-comrade | from django.shortcuts import get_object_or_404
from django.utils.decorators import available_attrs
from django.utils.http import urlquote
from django.http import HttpResponse
from django.template import loader, RequestContext
from functools import wraps
def singleton(cls):
instances = {}
def getinstance():
... | from django.shortcuts import get_object_or_404
from django.utils.decorators import available_attrs
from comrade.views.simple import direct_to_template
from functools import wraps
def singleton(cls):
instances = {}
def getinstance():
if cls not in instances:
instances[cls] = cls()
... | <commit_before>from django.shortcuts import get_object_or_404
from django.utils.decorators import available_attrs
from django.utils.http import urlquote
from django.http import HttpResponse
from django.template import loader, RequestContext
from functools import wraps
def singleton(cls):
instances = {}
def ge... | from django.shortcuts import get_object_or_404
from django.utils.decorators import available_attrs
from comrade.views.simple import direct_to_template
from functools import wraps
def singleton(cls):
instances = {}
def getinstance():
if cls not in instances:
instances[cls] = cls()
... | from django.shortcuts import get_object_or_404
from django.utils.decorators import available_attrs
from django.utils.http import urlquote
from django.http import HttpResponse
from django.template import loader, RequestContext
from functools import wraps
def singleton(cls):
instances = {}
def getinstance():
... | <commit_before>from django.shortcuts import get_object_or_404
from django.utils.decorators import available_attrs
from django.utils.http import urlquote
from django.http import HttpResponse
from django.template import loader, RequestContext
from functools import wraps
def singleton(cls):
instances = {}
def ge... |
03421e8eb4206299e869faa45e59d4c815965e6a | meshio/_files.py | meshio/_files.py | import os
import sys
from contextlib import contextmanager
def is_buffer(obj, mode):
return ("r" in mode and hasattr(obj, "read")) or (
"w" in mode and hasattr(obj, "write")
)
@contextmanager
def open_file(path_or_buf, mode="r"):
if is_buffer(path_or_buf, mode):
yield path_or_buf
eli... | import os
import sys
from contextlib import contextmanager
def is_buffer(obj, mode):
return ("r" in mode and hasattr(obj, "read")) or (
"w" in mode and hasattr(obj, "write")
)
@contextmanager
def open_file(path_or_buf, mode="r"):
if is_buffer(path_or_buf, mode):
yield path_or_buf
eli... | Add more details to py35 EoL changes | Add more details to py35 EoL changes
| Python | mit | nschloe/meshio | import os
import sys
from contextlib import contextmanager
def is_buffer(obj, mode):
return ("r" in mode and hasattr(obj, "read")) or (
"w" in mode and hasattr(obj, "write")
)
@contextmanager
def open_file(path_or_buf, mode="r"):
if is_buffer(path_or_buf, mode):
yield path_or_buf
eli... | import os
import sys
from contextlib import contextmanager
def is_buffer(obj, mode):
return ("r" in mode and hasattr(obj, "read")) or (
"w" in mode and hasattr(obj, "write")
)
@contextmanager
def open_file(path_or_buf, mode="r"):
if is_buffer(path_or_buf, mode):
yield path_or_buf
eli... | <commit_before>import os
import sys
from contextlib import contextmanager
def is_buffer(obj, mode):
return ("r" in mode and hasattr(obj, "read")) or (
"w" in mode and hasattr(obj, "write")
)
@contextmanager
def open_file(path_or_buf, mode="r"):
if is_buffer(path_or_buf, mode):
yield path... | import os
import sys
from contextlib import contextmanager
def is_buffer(obj, mode):
return ("r" in mode and hasattr(obj, "read")) or (
"w" in mode and hasattr(obj, "write")
)
@contextmanager
def open_file(path_or_buf, mode="r"):
if is_buffer(path_or_buf, mode):
yield path_or_buf
eli... | import os
import sys
from contextlib import contextmanager
def is_buffer(obj, mode):
return ("r" in mode and hasattr(obj, "read")) or (
"w" in mode and hasattr(obj, "write")
)
@contextmanager
def open_file(path_or_buf, mode="r"):
if is_buffer(path_or_buf, mode):
yield path_or_buf
eli... | <commit_before>import os
import sys
from contextlib import contextmanager
def is_buffer(obj, mode):
return ("r" in mode and hasattr(obj, "read")) or (
"w" in mode and hasattr(obj, "write")
)
@contextmanager
def open_file(path_or_buf, mode="r"):
if is_buffer(path_or_buf, mode):
yield path... |
6eee384ef75d119f5fbb3c6ff91fd2c49f9a5630 | lib/authenticator.py | lib/authenticator.py | #
# HamperAuthenticator is the class to handle the authentication part of the provisioning portal.
# Instantiate with the email and password you want, it'll pass back the cookie jar if successful,
# or an error message on failure
#
from selenium import webdriver
from selenium.webdriver.common.keys import Keys
class H... | #
# HamperAuthenticator is the class to handle the authentication part of the provisioning portal.
# Instantiate with the email and password you want, it'll pass back the cookie jar if successful,
# or an error message on failure
#
from selenium import webdriver
from selenium.webdriver.common.keys import Keys
class H... | Use parameter to pass Webdriver object to share execution | Use parameter to pass Webdriver object to share execution
| Python | mit | MobileXLabs/hamper | #
# HamperAuthenticator is the class to handle the authentication part of the provisioning portal.
# Instantiate with the email and password you want, it'll pass back the cookie jar if successful,
# or an error message on failure
#
from selenium import webdriver
from selenium.webdriver.common.keys import Keys
class H... | #
# HamperAuthenticator is the class to handle the authentication part of the provisioning portal.
# Instantiate with the email and password you want, it'll pass back the cookie jar if successful,
# or an error message on failure
#
from selenium import webdriver
from selenium.webdriver.common.keys import Keys
class H... | <commit_before>#
# HamperAuthenticator is the class to handle the authentication part of the provisioning portal.
# Instantiate with the email and password you want, it'll pass back the cookie jar if successful,
# or an error message on failure
#
from selenium import webdriver
from selenium.webdriver.common.keys impor... | #
# HamperAuthenticator is the class to handle the authentication part of the provisioning portal.
# Instantiate with the email and password you want, it'll pass back the cookie jar if successful,
# or an error message on failure
#
from selenium import webdriver
from selenium.webdriver.common.keys import Keys
class H... | #
# HamperAuthenticator is the class to handle the authentication part of the provisioning portal.
# Instantiate with the email and password you want, it'll pass back the cookie jar if successful,
# or an error message on failure
#
from selenium import webdriver
from selenium.webdriver.common.keys import Keys
class H... | <commit_before>#
# HamperAuthenticator is the class to handle the authentication part of the provisioning portal.
# Instantiate with the email and password you want, it'll pass back the cookie jar if successful,
# or an error message on failure
#
from selenium import webdriver
from selenium.webdriver.common.keys impor... |
14230758fbdc0ab293f0179267768baf067dc33b | npc/__version__.py | npc/__version__.py | """Current version string for NPC"""
__version__ = "1.3.1 beta 2"
| """Current version string for NPC"""
__version__ = "1.3.1 beta 3"
| Bump version to beta 3 | Bump version to beta 3
| Python | mit | aurule/npc,aurule/npc | """Current version string for NPC"""
__version__ = "1.3.1 beta 2"
Bump version to beta 3 | """Current version string for NPC"""
__version__ = "1.3.1 beta 3"
| <commit_before>"""Current version string for NPC"""
__version__ = "1.3.1 beta 2"
<commit_msg>Bump version to beta 3<commit_after> | """Current version string for NPC"""
__version__ = "1.3.1 beta 3"
| """Current version string for NPC"""
__version__ = "1.3.1 beta 2"
Bump version to beta 3"""Current version string for NPC"""
__version__ = "1.3.1 beta 3"
| <commit_before>"""Current version string for NPC"""
__version__ = "1.3.1 beta 2"
<commit_msg>Bump version to beta 3<commit_after>"""Current version string for NPC"""
__version__ = "1.3.1 beta 3"
|
48b38ea71a79eaed81a4f83a46bf8bf3db8cfa18 | txircd/modules/extra/listmodules.py | txircd/modules/extra/listmodules.py | from twisted.plugin import IPlugin
from txircd.module_interface import IModuleData, ModuleData
from zope.interface import implements
class ModulesCommand(ModuleData):
implements(IPlugin, IModuleData)
name = "ModulesCommand"
def actions(self):
return [ ("statsruntype-modules", 1, self.listModules) ]
def lis... | from twisted.plugin import IPlugin
from txircd.module_interface import IModuleData, ModuleData
from zope.interface import implements
class ModulesList(ModuleData):
implements(IPlugin, IModuleData)
name = "ModulesList"
def actions(self):
return [ ("statsruntype-modules", 1, self.listModules) ]
def listModul... | Rename ModulesCommand to be more appropriate | Rename ModulesCommand to be more appropriate
| Python | bsd-3-clause | Heufneutje/txircd | from twisted.plugin import IPlugin
from txircd.module_interface import IModuleData, ModuleData
from zope.interface import implements
class ModulesCommand(ModuleData):
implements(IPlugin, IModuleData)
name = "ModulesCommand"
def actions(self):
return [ ("statsruntype-modules", 1, self.listModules) ]
def lis... | from twisted.plugin import IPlugin
from txircd.module_interface import IModuleData, ModuleData
from zope.interface import implements
class ModulesList(ModuleData):
implements(IPlugin, IModuleData)
name = "ModulesList"
def actions(self):
return [ ("statsruntype-modules", 1, self.listModules) ]
def listModul... | <commit_before>from twisted.plugin import IPlugin
from txircd.module_interface import IModuleData, ModuleData
from zope.interface import implements
class ModulesCommand(ModuleData):
implements(IPlugin, IModuleData)
name = "ModulesCommand"
def actions(self):
return [ ("statsruntype-modules", 1, self.listModule... | from twisted.plugin import IPlugin
from txircd.module_interface import IModuleData, ModuleData
from zope.interface import implements
class ModulesList(ModuleData):
implements(IPlugin, IModuleData)
name = "ModulesList"
def actions(self):
return [ ("statsruntype-modules", 1, self.listModules) ]
def listModul... | from twisted.plugin import IPlugin
from txircd.module_interface import IModuleData, ModuleData
from zope.interface import implements
class ModulesCommand(ModuleData):
implements(IPlugin, IModuleData)
name = "ModulesCommand"
def actions(self):
return [ ("statsruntype-modules", 1, self.listModules) ]
def lis... | <commit_before>from twisted.plugin import IPlugin
from txircd.module_interface import IModuleData, ModuleData
from zope.interface import implements
class ModulesCommand(ModuleData):
implements(IPlugin, IModuleData)
name = "ModulesCommand"
def actions(self):
return [ ("statsruntype-modules", 1, self.listModule... |
d7fa7d2bacd45a50f14e4e1aeae57cfc56a315db | __init__.py | __init__.py | from openedoo_project import db
from openedoo.core.libs import Blueprint
from .controllers.employee import EmployeeLogin, EmployeeLogout, AddEmployee, \
AssignEmployeeAsTeacher, EmployeeDashboard, EditEmployee, DeleteEmployee, \
SearchEmployee, AddSubject
module_employee = Blueprint('module_employee', __name_... | from openedoo_project import db
from openedoo.core.libs import Blueprint
from .controllers.employee import EmployeeLogin, EmployeeLogout, AddEmployee, \
AssignEmployeeAsTeacher, EmployeeDashboard, EditEmployee, DeleteEmployee, \
SearchEmployee, AddSubject
module_employee = Blueprint('module_employee', __name_... | Make dashboard route become admin's default | Make dashboard route become admin's default
| Python | mit | openedoo/module_employee,openedoo/module_employee,openedoo/module_employee | from openedoo_project import db
from openedoo.core.libs import Blueprint
from .controllers.employee import EmployeeLogin, EmployeeLogout, AddEmployee, \
AssignEmployeeAsTeacher, EmployeeDashboard, EditEmployee, DeleteEmployee, \
SearchEmployee, AddSubject
module_employee = Blueprint('module_employee', __name_... | from openedoo_project import db
from openedoo.core.libs import Blueprint
from .controllers.employee import EmployeeLogin, EmployeeLogout, AddEmployee, \
AssignEmployeeAsTeacher, EmployeeDashboard, EditEmployee, DeleteEmployee, \
SearchEmployee, AddSubject
module_employee = Blueprint('module_employee', __name_... | <commit_before>from openedoo_project import db
from openedoo.core.libs import Blueprint
from .controllers.employee import EmployeeLogin, EmployeeLogout, AddEmployee, \
AssignEmployeeAsTeacher, EmployeeDashboard, EditEmployee, DeleteEmployee, \
SearchEmployee, AddSubject
module_employee = Blueprint('module_emp... | from openedoo_project import db
from openedoo.core.libs import Blueprint
from .controllers.employee import EmployeeLogin, EmployeeLogout, AddEmployee, \
AssignEmployeeAsTeacher, EmployeeDashboard, EditEmployee, DeleteEmployee, \
SearchEmployee, AddSubject
module_employee = Blueprint('module_employee', __name_... | from openedoo_project import db
from openedoo.core.libs import Blueprint
from .controllers.employee import EmployeeLogin, EmployeeLogout, AddEmployee, \
AssignEmployeeAsTeacher, EmployeeDashboard, EditEmployee, DeleteEmployee, \
SearchEmployee, AddSubject
module_employee = Blueprint('module_employee', __name_... | <commit_before>from openedoo_project import db
from openedoo.core.libs import Blueprint
from .controllers.employee import EmployeeLogin, EmployeeLogout, AddEmployee, \
AssignEmployeeAsTeacher, EmployeeDashboard, EditEmployee, DeleteEmployee, \
SearchEmployee, AddSubject
module_employee = Blueprint('module_emp... |
64d75740c485b8e3ac3108b916cdf72ad41b0611 | nacl/__init__.py | nacl/__init__.py | from . import hash # pylint: disable=W0622
| from . import __about__
from . import hash # pylint: disable=W0622
__all__ = ["hash"] + __about__.__all__
# - Meta Information -
# This is pretty ugly
for attr in __about__.__all__:
if hasattr(__about__, attr):
globals()[attr] = getattr(__about__, attr)
# - End Meta Information -
| Add meta information to the nacl package | Add meta information to the nacl package
| Python | mit | dstufft/pynacl,ucoin-bot/cutecoin,hoffmabc/pynacl,Insoleet/cutecoin,xueyumusic/pynacl,scholarly/pynacl,ucoin-io/cutecoin,dstufft/pynacl,lmctv/pynacl,JackWink/pynacl,JackWink/pynacl,xueyumusic/pynacl,pyca/pynacl,reaperhulk/pynacl,scholarly/pynacl,lmctv/pynacl,ucoin-io/cutecoin,alex/pynacl,pyca/pynacl,xueyumusic/pynacl,a... | from . import hash # pylint: disable=W0622
Add meta information to the nacl package | from . import __about__
from . import hash # pylint: disable=W0622
__all__ = ["hash"] + __about__.__all__
# - Meta Information -
# This is pretty ugly
for attr in __about__.__all__:
if hasattr(__about__, attr):
globals()[attr] = getattr(__about__, attr)
# - End Meta Information -
| <commit_before>from . import hash # pylint: disable=W0622
<commit_msg>Add meta information to the nacl package<commit_after> | from . import __about__
from . import hash # pylint: disable=W0622
__all__ = ["hash"] + __about__.__all__
# - Meta Information -
# This is pretty ugly
for attr in __about__.__all__:
if hasattr(__about__, attr):
globals()[attr] = getattr(__about__, attr)
# - End Meta Information -
| from . import hash # pylint: disable=W0622
Add meta information to the nacl packagefrom . import __about__
from . import hash # pylint: disable=W0622
__all__ = ["hash"] + __about__.__all__
# - Meta Information -
# This is pretty ugly
for attr in __about__.__all__:
if hasattr(__about__, attr):
globals(... | <commit_before>from . import hash # pylint: disable=W0622
<commit_msg>Add meta information to the nacl package<commit_after>from . import __about__
from . import hash # pylint: disable=W0622
__all__ = ["hash"] + __about__.__all__
# - Meta Information -
# This is pretty ugly
for attr in __about__.__all__:
if h... |
69ff671582bb343bd2ac9515964a3913e29f3d72 | oabutton/wsgi.py | oabutton/wsgi.py | """
WSGI config for oabutton project.
This module contains the WSGI application used by Django's development server
and any production WSGI deployments. It should expose a module-level variable
named ``application``. Django's ``runserver`` and ``runfcgi`` commands discover
this application via the ``WSGI_APPLICATION``... | """
WSGI config for oabutton project.
This module contains the WSGI application used by Django's development server
and any production WSGI deployments. It should expose a module-level variable
named ``application``. Django's ``runserver`` and ``runfcgi`` commands discover
this application via the ``WSGI_APPLICATION``... | Enable Django secure mode in WSGI module | Enable Django secure mode in WSGI module
| Python | mit | OAButton/OAButton_old,OAButton/OAButton_old,OAButton/OAButton_old | """
WSGI config for oabutton project.
This module contains the WSGI application used by Django's development server
and any production WSGI deployments. It should expose a module-level variable
named ``application``. Django's ``runserver`` and ``runfcgi`` commands discover
this application via the ``WSGI_APPLICATION``... | """
WSGI config for oabutton project.
This module contains the WSGI application used by Django's development server
and any production WSGI deployments. It should expose a module-level variable
named ``application``. Django's ``runserver`` and ``runfcgi`` commands discover
this application via the ``WSGI_APPLICATION``... | <commit_before>"""
WSGI config for oabutton project.
This module contains the WSGI application used by Django's development server
and any production WSGI deployments. It should expose a module-level variable
named ``application``. Django's ``runserver`` and ``runfcgi`` commands discover
this application via the ``WSG... | """
WSGI config for oabutton project.
This module contains the WSGI application used by Django's development server
and any production WSGI deployments. It should expose a module-level variable
named ``application``. Django's ``runserver`` and ``runfcgi`` commands discover
this application via the ``WSGI_APPLICATION``... | """
WSGI config for oabutton project.
This module contains the WSGI application used by Django's development server
and any production WSGI deployments. It should expose a module-level variable
named ``application``. Django's ``runserver`` and ``runfcgi`` commands discover
this application via the ``WSGI_APPLICATION``... | <commit_before>"""
WSGI config for oabutton project.
This module contains the WSGI application used by Django's development server
and any production WSGI deployments. It should expose a module-level variable
named ``application``. Django's ``runserver`` and ``runfcgi`` commands discover
this application via the ``WSG... |
65ef07040e8b0e34ce6dae42850789bdd8f4806a | cmsplugin_filer_file/models.py | cmsplugin_filer_file/models.py | from posixpath import exists
from cms.models import CMSPlugin
from django.db import models
from django.utils.translation import ugettext_lazy as _
from filer.fields.file import FilerFileField
from cmsplugin_filer_utils import FilerPluginManager
class FilerFile(CMSPlugin):
"""
Plugin for storing any type of ... | from cms.models import CMSPlugin
from django.db import models
from django.utils.translation import ugettext_lazy as _
from filer.fields.file import FilerFileField
from cmsplugin_filer_utils import FilerPluginManager
class FilerFile(CMSPlugin):
"""
Plugin for storing any type of file.
Default template di... | Use the file's storage to determine whether the file exists or not. The existing implementation that uses posixpath.exists only works if the storage backend is the default FileSystemStorage | Use the file's storage to determine whether the file exists or not.
The existing implementation that uses posixpath.exists only works if the storage backend is the default FileSystemStorage
| Python | bsd-3-clause | nephila/cmsplugin-filer,stefanfoulis/cmsplugin-filer,centralniak/cmsplugin-filer,creimers/cmsplugin-filer,stefanfoulis/cmsplugin-filer,yvess/cmsplugin-filer,alsoicode/cmsplugin-filer,yvess/cmsplugin-filer,jrutila/cmsplugin-filer,brightinteractive/cmsplugin-filer,wlanslovenija/cmsplugin-filer,sephii/cmsplugin-filer,elia... | from posixpath import exists
from cms.models import CMSPlugin
from django.db import models
from django.utils.translation import ugettext_lazy as _
from filer.fields.file import FilerFileField
from cmsplugin_filer_utils import FilerPluginManager
class FilerFile(CMSPlugin):
"""
Plugin for storing any type of ... | from cms.models import CMSPlugin
from django.db import models
from django.utils.translation import ugettext_lazy as _
from filer.fields.file import FilerFileField
from cmsplugin_filer_utils import FilerPluginManager
class FilerFile(CMSPlugin):
"""
Plugin for storing any type of file.
Default template di... | <commit_before>from posixpath import exists
from cms.models import CMSPlugin
from django.db import models
from django.utils.translation import ugettext_lazy as _
from filer.fields.file import FilerFileField
from cmsplugin_filer_utils import FilerPluginManager
class FilerFile(CMSPlugin):
"""
Plugin for stori... | from cms.models import CMSPlugin
from django.db import models
from django.utils.translation import ugettext_lazy as _
from filer.fields.file import FilerFileField
from cmsplugin_filer_utils import FilerPluginManager
class FilerFile(CMSPlugin):
"""
Plugin for storing any type of file.
Default template di... | from posixpath import exists
from cms.models import CMSPlugin
from django.db import models
from django.utils.translation import ugettext_lazy as _
from filer.fields.file import FilerFileField
from cmsplugin_filer_utils import FilerPluginManager
class FilerFile(CMSPlugin):
"""
Plugin for storing any type of ... | <commit_before>from posixpath import exists
from cms.models import CMSPlugin
from django.db import models
from django.utils.translation import ugettext_lazy as _
from filer.fields.file import FilerFileField
from cmsplugin_filer_utils import FilerPluginManager
class FilerFile(CMSPlugin):
"""
Plugin for stori... |
7b3f1edc1e9ba120a2718d0001135aa45c7a6753 | personnel/views.py | personnel/views.py | '''This app contains the views for the personnel app.
'''
from django.views.generic.list import ListView
from django.views.generic.detail import DetailView
from personnel.models import Person, JobPosting
class LaboratoryPersonnelList(ListView):
'''This class generates the view for current laboratory person... | '''This app contains the views for the personnel app.
'''
from django.views.generic.list import ListView
from django.views.generic.detail import DetailView
from personnel.models import Person, JobPosting
class LaboratoryPersonnelList(ListView):
'''This class generates the view for current laboratory person... | Reset personnel page back to ordering by creation date. | Reset personnel page back to ordering by creation date.
| Python | mit | davebridges/Lab-Website,davebridges/Lab-Website,davebridges/Lab-Website | '''This app contains the views for the personnel app.
'''
from django.views.generic.list import ListView
from django.views.generic.detail import DetailView
from personnel.models import Person, JobPosting
class LaboratoryPersonnelList(ListView):
'''This class generates the view for current laboratory person... | '''This app contains the views for the personnel app.
'''
from django.views.generic.list import ListView
from django.views.generic.detail import DetailView
from personnel.models import Person, JobPosting
class LaboratoryPersonnelList(ListView):
'''This class generates the view for current laboratory person... | <commit_before>'''This app contains the views for the personnel app.
'''
from django.views.generic.list import ListView
from django.views.generic.detail import DetailView
from personnel.models import Person, JobPosting
class LaboratoryPersonnelList(ListView):
'''This class generates the view for current la... | '''This app contains the views for the personnel app.
'''
from django.views.generic.list import ListView
from django.views.generic.detail import DetailView
from personnel.models import Person, JobPosting
class LaboratoryPersonnelList(ListView):
'''This class generates the view for current laboratory person... | '''This app contains the views for the personnel app.
'''
from django.views.generic.list import ListView
from django.views.generic.detail import DetailView
from personnel.models import Person, JobPosting
class LaboratoryPersonnelList(ListView):
'''This class generates the view for current laboratory person... | <commit_before>'''This app contains the views for the personnel app.
'''
from django.views.generic.list import ListView
from django.views.generic.detail import DetailView
from personnel.models import Person, JobPosting
class LaboratoryPersonnelList(ListView):
'''This class generates the view for current la... |
39d67ed57d5c944afb06da1db4a18320e9ebd758 | bids/ext/__init__.py | bids/ext/__init__.py | __path__ = __import__('pkgutil').extend_path(__path__, __name__)
| """
The PyBIDS extension namespace package
``bids.ext`` is reserved as a namespace for extensions to install into.
To write such an extension, the following things are needed:
1) Create a new package with the following structure (assuming setuptools)::
package/
bids/
ext/
__init__.py
... | Add an explanation of how to set up a namespace package | DOC: Add an explanation of how to set up a namespace package
| Python | mit | INCF/pybids | __path__ = __import__('pkgutil').extend_path(__path__, __name__)
DOC: Add an explanation of how to set up a namespace package | """
The PyBIDS extension namespace package
``bids.ext`` is reserved as a namespace for extensions to install into.
To write such an extension, the following things are needed:
1) Create a new package with the following structure (assuming setuptools)::
package/
bids/
ext/
__init__.py
... | <commit_before>__path__ = __import__('pkgutil').extend_path(__path__, __name__)
<commit_msg>DOC: Add an explanation of how to set up a namespace package<commit_after> | """
The PyBIDS extension namespace package
``bids.ext`` is reserved as a namespace for extensions to install into.
To write such an extension, the following things are needed:
1) Create a new package with the following structure (assuming setuptools)::
package/
bids/
ext/
__init__.py
... | __path__ = __import__('pkgutil').extend_path(__path__, __name__)
DOC: Add an explanation of how to set up a namespace package"""
The PyBIDS extension namespace package
``bids.ext`` is reserved as a namespace for extensions to install into.
To write such an extension, the following things are needed:
1) Create a new p... | <commit_before>__path__ = __import__('pkgutil').extend_path(__path__, __name__)
<commit_msg>DOC: Add an explanation of how to set up a namespace package<commit_after>"""
The PyBIDS extension namespace package
``bids.ext`` is reserved as a namespace for extensions to install into.
To write such an extension, the follow... |
5d15ae493663b23d1554f4f285cf3d2044134878 | pybossa_analyst/zip_builder.py | pybossa_analyst/zip_builder.py | # -*- coding: utf8 -*-
"""Zip builder module for pybossa-analyst."""
import requests
import zipstream
def _download(url):
"""Download data from a URL."""
yield requests.get(url).content
def _generate_zip(tasks, fn_key, url_key):
"""Generate a zip containing downloaded task data."""
z = zipstream.Zi... | # -*- coding: utf8 -*-
"""Zip builder module for pybossa-analyst."""
import requests
import zipstream
def _download(url):
"""Download data from a URL."""
yield requests.get(url).content
def _generate_zip(tasks, fn_key, url_key):
"""Generate a zip containing downloaded task data."""
z = zipstream.Zi... | Add jpg link for flickr downloads | Add jpg link for flickr downloads
| Python | unknown | alexandermendes/pybossa-analyst,alexandermendes/pybossa-analyst,alexandermendes/pybossa-analyst,LibCrowds/libcrowds-analyst | # -*- coding: utf8 -*-
"""Zip builder module for pybossa-analyst."""
import requests
import zipstream
def _download(url):
"""Download data from a URL."""
yield requests.get(url).content
def _generate_zip(tasks, fn_key, url_key):
"""Generate a zip containing downloaded task data."""
z = zipstream.Zi... | # -*- coding: utf8 -*-
"""Zip builder module for pybossa-analyst."""
import requests
import zipstream
def _download(url):
"""Download data from a URL."""
yield requests.get(url).content
def _generate_zip(tasks, fn_key, url_key):
"""Generate a zip containing downloaded task data."""
z = zipstream.Zi... | <commit_before># -*- coding: utf8 -*-
"""Zip builder module for pybossa-analyst."""
import requests
import zipstream
def _download(url):
"""Download data from a URL."""
yield requests.get(url).content
def _generate_zip(tasks, fn_key, url_key):
"""Generate a zip containing downloaded task data."""
z... | # -*- coding: utf8 -*-
"""Zip builder module for pybossa-analyst."""
import requests
import zipstream
def _download(url):
"""Download data from a URL."""
yield requests.get(url).content
def _generate_zip(tasks, fn_key, url_key):
"""Generate a zip containing downloaded task data."""
z = zipstream.Zi... | # -*- coding: utf8 -*-
"""Zip builder module for pybossa-analyst."""
import requests
import zipstream
def _download(url):
"""Download data from a URL."""
yield requests.get(url).content
def _generate_zip(tasks, fn_key, url_key):
"""Generate a zip containing downloaded task data."""
z = zipstream.Zi... | <commit_before># -*- coding: utf8 -*-
"""Zip builder module for pybossa-analyst."""
import requests
import zipstream
def _download(url):
"""Download data from a URL."""
yield requests.get(url).content
def _generate_zip(tasks, fn_key, url_key):
"""Generate a zip containing downloaded task data."""
z... |
662f245ca6c3dbe50d92a73549715af7ec46015e | chainerrl/explorers/additive_gaussian.py | chainerrl/explorers/additive_gaussian.py | from __future__ import division
from __future__ import unicode_literals
from __future__ import print_function
from __future__ import absolute_import
from builtins import * # NOQA
from future import standard_library
standard_library.install_aliases() # NOQA
import numpy as np
from chainerrl import explorer
class A... | from __future__ import division
from __future__ import unicode_literals
from __future__ import print_function
from __future__ import absolute_import
from builtins import * # NOQA
from future import standard_library
standard_library.install_aliases() # NOQA
import numpy as np
from chainerrl import explorer
class A... | Add low and high options to AdditiveGaussian | Add low and high options to AdditiveGaussian
| Python | mit | toslunar/chainerrl,toslunar/chainerrl | from __future__ import division
from __future__ import unicode_literals
from __future__ import print_function
from __future__ import absolute_import
from builtins import * # NOQA
from future import standard_library
standard_library.install_aliases() # NOQA
import numpy as np
from chainerrl import explorer
class A... | from __future__ import division
from __future__ import unicode_literals
from __future__ import print_function
from __future__ import absolute_import
from builtins import * # NOQA
from future import standard_library
standard_library.install_aliases() # NOQA
import numpy as np
from chainerrl import explorer
class A... | <commit_before>from __future__ import division
from __future__ import unicode_literals
from __future__ import print_function
from __future__ import absolute_import
from builtins import * # NOQA
from future import standard_library
standard_library.install_aliases() # NOQA
import numpy as np
from chainerrl import exp... | from __future__ import division
from __future__ import unicode_literals
from __future__ import print_function
from __future__ import absolute_import
from builtins import * # NOQA
from future import standard_library
standard_library.install_aliases() # NOQA
import numpy as np
from chainerrl import explorer
class A... | from __future__ import division
from __future__ import unicode_literals
from __future__ import print_function
from __future__ import absolute_import
from builtins import * # NOQA
from future import standard_library
standard_library.install_aliases() # NOQA
import numpy as np
from chainerrl import explorer
class A... | <commit_before>from __future__ import division
from __future__ import unicode_literals
from __future__ import print_function
from __future__ import absolute_import
from builtins import * # NOQA
from future import standard_library
standard_library.install_aliases() # NOQA
import numpy as np
from chainerrl import exp... |
9e9d25aaebc22f47e93f688bf5025378b2102b45 | dss/storage.py | dss/storage.py |
import pymongo
from .config import config
from .tools import show
client = pymongo.MongoClient()
conf = config['database']
database_name = conf['name']
_db = client[database_name]
class KeyValueStorage(object):
def __init__(self, database_name):
self.__dict__['_db'] = _db[database_name]
def __geta... |
import pymongo
from .config import config
from .tools import show
client = pymongo.MongoClient()
conf = config['database']
database_name = conf['name']
_db = client[database_name]
class KeyValueStorage(object):
def __init__(self, database_name, db=_db):
self.__dict__['_db'] = db[database_name]
def... | Enable external database (non dss) suport for KeyValueStorage | Enable external database (non dss) suport for KeyValueStorage | Python | bsd-3-clause | terabit-software/dynamic-stream-server,terabit-software/dynamic-stream-server,hmoraes/dynamic-stream-server,hmoraes/dynamic-stream-server,terabit-software/dynamic-stream-server,terabit-software/dynamic-stream-server,hmoraes/dynamic-stream-server,hmoraes/dynamic-stream-server |
import pymongo
from .config import config
from .tools import show
client = pymongo.MongoClient()
conf = config['database']
database_name = conf['name']
_db = client[database_name]
class KeyValueStorage(object):
def __init__(self, database_name):
self.__dict__['_db'] = _db[database_name]
def __geta... |
import pymongo
from .config import config
from .tools import show
client = pymongo.MongoClient()
conf = config['database']
database_name = conf['name']
_db = client[database_name]
class KeyValueStorage(object):
def __init__(self, database_name, db=_db):
self.__dict__['_db'] = db[database_name]
def... | <commit_before>
import pymongo
from .config import config
from .tools import show
client = pymongo.MongoClient()
conf = config['database']
database_name = conf['name']
_db = client[database_name]
class KeyValueStorage(object):
def __init__(self, database_name):
self.__dict__['_db'] = _db[database_name]
... |
import pymongo
from .config import config
from .tools import show
client = pymongo.MongoClient()
conf = config['database']
database_name = conf['name']
_db = client[database_name]
class KeyValueStorage(object):
def __init__(self, database_name, db=_db):
self.__dict__['_db'] = db[database_name]
def... |
import pymongo
from .config import config
from .tools import show
client = pymongo.MongoClient()
conf = config['database']
database_name = conf['name']
_db = client[database_name]
class KeyValueStorage(object):
def __init__(self, database_name):
self.__dict__['_db'] = _db[database_name]
def __geta... | <commit_before>
import pymongo
from .config import config
from .tools import show
client = pymongo.MongoClient()
conf = config['database']
database_name = conf['name']
_db = client[database_name]
class KeyValueStorage(object):
def __init__(self, database_name):
self.__dict__['_db'] = _db[database_name]
... |
bc6a7ddca30093fa469800c32690d77c4f443018 | tests/unit/test_notes.py | tests/unit/test_notes.py | import unittest
import requests_mock
from alertaclient.api import Client
class NotesTestCase(unittest.TestCase):
def setUp(self):
self.client = Client()
self.note = """
{
"status": "ok"
}
"""
@requests_mock.mock()
def test_add_note(self, m... | import unittest
import requests_mock
from alertaclient.api import Client
class NotesTestCase(unittest.TestCase):
def setUp(self):
self.client = Client()
self.note = """
{
"id": "62b62c6c-fca3-4329-b517-fc47c2371e63",
"note": {
"at... | Fix unit tests for notes | Fix unit tests for notes
| Python | apache-2.0 | alerta/python-alerta,alerta/python-alerta-client,alerta/python-alerta-client | import unittest
import requests_mock
from alertaclient.api import Client
class NotesTestCase(unittest.TestCase):
def setUp(self):
self.client = Client()
self.note = """
{
"status": "ok"
}
"""
@requests_mock.mock()
def test_add_note(self, m... | import unittest
import requests_mock
from alertaclient.api import Client
class NotesTestCase(unittest.TestCase):
def setUp(self):
self.client = Client()
self.note = """
{
"id": "62b62c6c-fca3-4329-b517-fc47c2371e63",
"note": {
"at... | <commit_before>import unittest
import requests_mock
from alertaclient.api import Client
class NotesTestCase(unittest.TestCase):
def setUp(self):
self.client = Client()
self.note = """
{
"status": "ok"
}
"""
@requests_mock.mock()
def test_a... | import unittest
import requests_mock
from alertaclient.api import Client
class NotesTestCase(unittest.TestCase):
def setUp(self):
self.client = Client()
self.note = """
{
"id": "62b62c6c-fca3-4329-b517-fc47c2371e63",
"note": {
"at... | import unittest
import requests_mock
from alertaclient.api import Client
class NotesTestCase(unittest.TestCase):
def setUp(self):
self.client = Client()
self.note = """
{
"status": "ok"
}
"""
@requests_mock.mock()
def test_add_note(self, m... | <commit_before>import unittest
import requests_mock
from alertaclient.api import Client
class NotesTestCase(unittest.TestCase):
def setUp(self):
self.client = Client()
self.note = """
{
"status": "ok"
}
"""
@requests_mock.mock()
def test_a... |
4520360a0bbf223805cc963d58409626be2bd728 | capstone/mdp/fixed_game_mdp.py | capstone/mdp/fixed_game_mdp.py | from .mdp import MDP
from .game_mdp import GameMDP
from ..utils import utility
class FixedGameMDP(GameMDP):
def __init__(self, game, opp_player, opp_idx):
'''
opp_player: the opponent player
opp_idx: the idx of the opponent player in the game
'''
self._game = game
... | from .mdp import MDP
from .game_mdp import GameMDP
from ..utils import utility
class FixedGameMDP(GameMDP):
def __init__(self, game, opp_player, opp_idx):
'''
opp_player: the opponent player
opp_idx: the idx of the opponent player in the game
'''
super(FixedGameMDP, self).... | Call super __init__ in GameMDP | Call super __init__ in GameMDP
| Python | mit | davidrobles/mlnd-capstone-code | from .mdp import MDP
from .game_mdp import GameMDP
from ..utils import utility
class FixedGameMDP(GameMDP):
def __init__(self, game, opp_player, opp_idx):
'''
opp_player: the opponent player
opp_idx: the idx of the opponent player in the game
'''
self._game = game
... | from .mdp import MDP
from .game_mdp import GameMDP
from ..utils import utility
class FixedGameMDP(GameMDP):
def __init__(self, game, opp_player, opp_idx):
'''
opp_player: the opponent player
opp_idx: the idx of the opponent player in the game
'''
super(FixedGameMDP, self).... | <commit_before>from .mdp import MDP
from .game_mdp import GameMDP
from ..utils import utility
class FixedGameMDP(GameMDP):
def __init__(self, game, opp_player, opp_idx):
'''
opp_player: the opponent player
opp_idx: the idx of the opponent player in the game
'''
self._game ... | from .mdp import MDP
from .game_mdp import GameMDP
from ..utils import utility
class FixedGameMDP(GameMDP):
def __init__(self, game, opp_player, opp_idx):
'''
opp_player: the opponent player
opp_idx: the idx of the opponent player in the game
'''
super(FixedGameMDP, self).... | from .mdp import MDP
from .game_mdp import GameMDP
from ..utils import utility
class FixedGameMDP(GameMDP):
def __init__(self, game, opp_player, opp_idx):
'''
opp_player: the opponent player
opp_idx: the idx of the opponent player in the game
'''
self._game = game
... | <commit_before>from .mdp import MDP
from .game_mdp import GameMDP
from ..utils import utility
class FixedGameMDP(GameMDP):
def __init__(self, game, opp_player, opp_idx):
'''
opp_player: the opponent player
opp_idx: the idx of the opponent player in the game
'''
self._game ... |
cf1aa4c0e07e4049f6f41b43898047fb5a0893b2 | towel/templatetags/modelview_detail.py | towel/templatetags/modelview_detail.py | from django import template
from django.db import models
from django.utils.safestring import mark_safe
register = template.Library()
@register.filter
def model_details(instance):
"""
Returns a stream of ``verbose_name``, ``value`` pairs for the specified
model instance::
<table>
{% for ... | from django import template
from django.db import models
from django.utils.safestring import mark_safe
register = template.Library()
@register.filter
def model_details(instance, fields=None):
"""
Returns a stream of ``verbose_name``, ``value`` pairs for the specified
model instance::
<table>
... | Allow specifying fields for model_details | Allow specifying fields for model_details
| Python | bsd-3-clause | matthiask/towel,matthiask/towel,matthiask/towel,matthiask/towel | from django import template
from django.db import models
from django.utils.safestring import mark_safe
register = template.Library()
@register.filter
def model_details(instance):
"""
Returns a stream of ``verbose_name``, ``value`` pairs for the specified
model instance::
<table>
{% for ... | from django import template
from django.db import models
from django.utils.safestring import mark_safe
register = template.Library()
@register.filter
def model_details(instance, fields=None):
"""
Returns a stream of ``verbose_name``, ``value`` pairs for the specified
model instance::
<table>
... | <commit_before>from django import template
from django.db import models
from django.utils.safestring import mark_safe
register = template.Library()
@register.filter
def model_details(instance):
"""
Returns a stream of ``verbose_name``, ``value`` pairs for the specified
model instance::
<table>
... | from django import template
from django.db import models
from django.utils.safestring import mark_safe
register = template.Library()
@register.filter
def model_details(instance, fields=None):
"""
Returns a stream of ``verbose_name``, ``value`` pairs for the specified
model instance::
<table>
... | from django import template
from django.db import models
from django.utils.safestring import mark_safe
register = template.Library()
@register.filter
def model_details(instance):
"""
Returns a stream of ``verbose_name``, ``value`` pairs for the specified
model instance::
<table>
{% for ... | <commit_before>from django import template
from django.db import models
from django.utils.safestring import mark_safe
register = template.Library()
@register.filter
def model_details(instance):
"""
Returns a stream of ``verbose_name``, ``value`` pairs for the specified
model instance::
<table>
... |
d150299c4e3165dbaf83867ac9944f03611cd63b | tornado_json/__init__.py | tornado_json/__init__.py | __version__='0.01'
| # As setup.py imports this module to get the version, try not to do anything
# with dependencies for the project here. If that happens, setup.py
# should not import tornado_json and instead use this find_version
# thing: https://github.com/jezdez/envdir/blob/a062497e4339d5eb11e8a95dc6186dea6231aeb1/setup.py#L24
#... | Add warning about setup.py import | Add warning about setup.py import
| Python | mit | ktalik/tornado-json,hfaran/Tornado-JSON,Tarsbot/Tornado-JSON | __version__='0.01'
Add warning about setup.py import | # As setup.py imports this module to get the version, try not to do anything
# with dependencies for the project here. If that happens, setup.py
# should not import tornado_json and instead use this find_version
# thing: https://github.com/jezdez/envdir/blob/a062497e4339d5eb11e8a95dc6186dea6231aeb1/setup.py#L24
#... | <commit_before>__version__='0.01'
<commit_msg>Add warning about setup.py import<commit_after> | # As setup.py imports this module to get the version, try not to do anything
# with dependencies for the project here. If that happens, setup.py
# should not import tornado_json and instead use this find_version
# thing: https://github.com/jezdez/envdir/blob/a062497e4339d5eb11e8a95dc6186dea6231aeb1/setup.py#L24
#... | __version__='0.01'
Add warning about setup.py import# As setup.py imports this module to get the version, try not to do anything
# with dependencies for the project here. If that happens, setup.py
# should not import tornado_json and instead use this find_version
# thing: https://github.com/jezdez/envdir/blob/a06... | <commit_before>__version__='0.01'
<commit_msg>Add warning about setup.py import<commit_after># As setup.py imports this module to get the version, try not to do anything
# with dependencies for the project here. If that happens, setup.py
# should not import tornado_json and instead use this find_version
# thing: ... |
ca214643b2a93bd9362182134624a8641b44aba2 | tree_stars/tree_stars.py | tree_stars/tree_stars.py | """Output a tree of stars like so:
*
***
*
***
*****
*
***
*****
*******
Input argument is the number of levels to the tree (3 in this example)
"""
from sys import argv
def main(levels):
for level in xrange(levels):
for sub_level in xrange(level+2):
spaces = (levels... | """Output a tree of stars like so:
*
***
*
***
*****
*
***
*****
*******
Input argument is the number of levels to the tree (3 in this example)
"""
from sys import argv
def main(levels):
for level in xrange(levels):
for sub_level in xrange(level+2):
stars = ((2 * su... | Add solution using format method for centering. | Add solution using format method for centering.
| Python | mit | bm5w/codeeval | """Output a tree of stars like so:
*
***
*
***
*****
*
***
*****
*******
Input argument is the number of levels to the tree (3 in this example)
"""
from sys import argv
def main(levels):
for level in xrange(levels):
for sub_level in xrange(level+2):
spaces = (levels... | """Output a tree of stars like so:
*
***
*
***
*****
*
***
*****
*******
Input argument is the number of levels to the tree (3 in this example)
"""
from sys import argv
def main(levels):
for level in xrange(levels):
for sub_level in xrange(level+2):
stars = ((2 * su... | <commit_before>"""Output a tree of stars like so:
*
***
*
***
*****
*
***
*****
*******
Input argument is the number of levels to the tree (3 in this example)
"""
from sys import argv
def main(levels):
for level in xrange(levels):
for sub_level in xrange(level+2):
s... | """Output a tree of stars like so:
*
***
*
***
*****
*
***
*****
*******
Input argument is the number of levels to the tree (3 in this example)
"""
from sys import argv
def main(levels):
for level in xrange(levels):
for sub_level in xrange(level+2):
stars = ((2 * su... | """Output a tree of stars like so:
*
***
*
***
*****
*
***
*****
*******
Input argument is the number of levels to the tree (3 in this example)
"""
from sys import argv
def main(levels):
for level in xrange(levels):
for sub_level in xrange(level+2):
spaces = (levels... | <commit_before>"""Output a tree of stars like so:
*
***
*
***
*****
*
***
*****
*******
Input argument is the number of levels to the tree (3 in this example)
"""
from sys import argv
def main(levels):
for level in xrange(levels):
for sub_level in xrange(level+2):
s... |
9068a532bfc7ff2b6d6fb276efda669a5cd60b36 | example.py | example.py | import os
import mmstats
import libgettid
class MyStats(mmstats.BaseMmStats):
pid = mmstats.StaticUIntField(label="sys.pid", value=os.getpid)
tid = mmstats.StaticInt64Field(label="sys.tid", value=libgettid.gettid)
uid = mmstats.StaticUInt64Field(label="sys.uid", value=os.getuid)
gid = mmstats.StaticUIn... | import os
import mmstats
import libgettid
class MyStats(mmstats.BaseMmStats):
pid = mmstats.StaticUIntField(label="sys.pid", value=os.getpid)
tid = mmstats.StaticInt64Field(label="sys.tid", value=libgettid.gettid)
uid = mmstats.StaticUInt64Field(label="sys.uid", value=os.getuid)
gid = mmstats.StaticUIn... | Make it more obvious that values initialize at 0 | Make it more obvious that values initialize at 0
| Python | bsd-3-clause | schmichael/mmstats,schmichael/mmstats,schmichael/mmstats,schmichael/mmstats | import os
import mmstats
import libgettid
class MyStats(mmstats.BaseMmStats):
pid = mmstats.StaticUIntField(label="sys.pid", value=os.getpid)
tid = mmstats.StaticInt64Field(label="sys.tid", value=libgettid.gettid)
uid = mmstats.StaticUInt64Field(label="sys.uid", value=os.getuid)
gid = mmstats.StaticUIn... | import os
import mmstats
import libgettid
class MyStats(mmstats.BaseMmStats):
pid = mmstats.StaticUIntField(label="sys.pid", value=os.getpid)
tid = mmstats.StaticInt64Field(label="sys.tid", value=libgettid.gettid)
uid = mmstats.StaticUInt64Field(label="sys.uid", value=os.getuid)
gid = mmstats.StaticUIn... | <commit_before>import os
import mmstats
import libgettid
class MyStats(mmstats.BaseMmStats):
pid = mmstats.StaticUIntField(label="sys.pid", value=os.getpid)
tid = mmstats.StaticInt64Field(label="sys.tid", value=libgettid.gettid)
uid = mmstats.StaticUInt64Field(label="sys.uid", value=os.getuid)
gid = mm... | import os
import mmstats
import libgettid
class MyStats(mmstats.BaseMmStats):
pid = mmstats.StaticUIntField(label="sys.pid", value=os.getpid)
tid = mmstats.StaticInt64Field(label="sys.tid", value=libgettid.gettid)
uid = mmstats.StaticUInt64Field(label="sys.uid", value=os.getuid)
gid = mmstats.StaticUIn... | import os
import mmstats
import libgettid
class MyStats(mmstats.BaseMmStats):
pid = mmstats.StaticUIntField(label="sys.pid", value=os.getpid)
tid = mmstats.StaticInt64Field(label="sys.tid", value=libgettid.gettid)
uid = mmstats.StaticUInt64Field(label="sys.uid", value=os.getuid)
gid = mmstats.StaticUIn... | <commit_before>import os
import mmstats
import libgettid
class MyStats(mmstats.BaseMmStats):
pid = mmstats.StaticUIntField(label="sys.pid", value=os.getpid)
tid = mmstats.StaticInt64Field(label="sys.tid", value=libgettid.gettid)
uid = mmstats.StaticUInt64Field(label="sys.uid", value=os.getuid)
gid = mm... |
906a5ee2b6e20b09b12d36d61271cd63cac49418 | py2pack/utils.py | py2pack/utils.py | # -*- coding: utf-8 -*-
#
# Copyright (c) 2016, Thomas Bechtold <[email protected]>
#
# 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
#
# Unle... | # -*- coding: utf-8 -*-
#
# Copyright (c) 2016, Thomas Bechtold <[email protected]>
#
# 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
#
# Unle... | Raise a ValueError from _get_archive_filelist instead of Exception | Raise a ValueError from _get_archive_filelist instead of Exception
Raising the Exception base class is considered bad style, as the more
specialized child classes carry more information about the kind of error that
occurred. And often no-one actually tries to catch the Exception class.
| Python | apache-2.0 | saschpe/py2pack | # -*- coding: utf-8 -*-
#
# Copyright (c) 2016, Thomas Bechtold <[email protected]>
#
# 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
#
# Unle... | # -*- coding: utf-8 -*-
#
# Copyright (c) 2016, Thomas Bechtold <[email protected]>
#
# 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
#
# Unle... | <commit_before># -*- coding: utf-8 -*-
#
# Copyright (c) 2016, Thomas Bechtold <[email protected]>
#
# 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/LICEN... | # -*- coding: utf-8 -*-
#
# Copyright (c) 2016, Thomas Bechtold <[email protected]>
#
# 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
#
# Unle... | # -*- coding: utf-8 -*-
#
# Copyright (c) 2016, Thomas Bechtold <[email protected]>
#
# 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
#
# Unle... | <commit_before># -*- coding: utf-8 -*-
#
# Copyright (c) 2016, Thomas Bechtold <[email protected]>
#
# 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/LICEN... |
e26e3572a81e7ea3fd9ac4b3fd7f7739aa6c5779 | pymt/__init__.py | pymt/__init__.py | from ._version import get_versions
__version__ = get_versions()['version']
del get_versions
| from ._version import get_versions
__version__ = get_versions()['version']
del get_versions
# See https://github.com/numpy/numpy/blob/master/doc/release/1.14.0-notes.rst#many-changes-to-array-printing-disableable-with-the-new-legacy-printing-mode
import numpy as np
np.set_printoptions(legacy='1.13')
| Use legacy docstrings with numpy 1.14 | Use legacy docstrings with numpy 1.14
For an explanation, see https://github.com/numpy/numpy/blob/master/doc/release/1.14.0-notes.rst#many-changes-to-array-printing-disableable-with-the-new-legacy-printing-mode.
| Python | mit | csdms/pymt,csdms/coupling,csdms/coupling | from ._version import get_versions
__version__ = get_versions()['version']
del get_versions
Use legacy docstrings with numpy 1.14
For an explanation, see https://github.com/numpy/numpy/blob/master/doc/release/1.14.0-notes.rst#many-changes-to-array-printing-disableable-with-the-new-legacy-printing-mode. | from ._version import get_versions
__version__ = get_versions()['version']
del get_versions
# See https://github.com/numpy/numpy/blob/master/doc/release/1.14.0-notes.rst#many-changes-to-array-printing-disableable-with-the-new-legacy-printing-mode
import numpy as np
np.set_printoptions(legacy='1.13')
| <commit_before>from ._version import get_versions
__version__ = get_versions()['version']
del get_versions
<commit_msg>Use legacy docstrings with numpy 1.14
For an explanation, see https://github.com/numpy/numpy/blob/master/doc/release/1.14.0-notes.rst#many-changes-to-array-printing-disableable-with-the-new-legacy-pri... | from ._version import get_versions
__version__ = get_versions()['version']
del get_versions
# See https://github.com/numpy/numpy/blob/master/doc/release/1.14.0-notes.rst#many-changes-to-array-printing-disableable-with-the-new-legacy-printing-mode
import numpy as np
np.set_printoptions(legacy='1.13')
| from ._version import get_versions
__version__ = get_versions()['version']
del get_versions
Use legacy docstrings with numpy 1.14
For an explanation, see https://github.com/numpy/numpy/blob/master/doc/release/1.14.0-notes.rst#many-changes-to-array-printing-disableable-with-the-new-legacy-printing-mode.from ._version i... | <commit_before>from ._version import get_versions
__version__ = get_versions()['version']
del get_versions
<commit_msg>Use legacy docstrings with numpy 1.14
For an explanation, see https://github.com/numpy/numpy/blob/master/doc/release/1.14.0-notes.rst#many-changes-to-array-printing-disableable-with-the-new-legacy-pri... |
53aa7104616944f6206f8e2cd3684b0084158a11 | fabfile.py | fabfile.py | from fabric.api import env, cd, run, shell_env, sudo
env.hosts = ['134.213.147.235']
env.user = 'root'
env.key_filename = '~/.ssh/id_di'
env.forward_agent = True
def deploy():
with cd('/srv/venv/mysite'):
run('git pull')
with cd('mysite'), shell_env(DJANGO_CONFIGURATION='Production'):
... | from fabric.api import env, cd, run, shell_env, sudo
env.hosts = ['134.213.147.235']
env.user = 'root'
env.key_filename = '~/.ssh/id_di'
env.forward_agent = True
def deploy():
with cd('/srv/venv/mysite'):
run('git pull')
with cd('mysite'), shell_env(DJANGO_CONFIGURATION='Production'):
... | Add fab task to rebuild production database | Add fab task to rebuild production database
| Python | bsd-3-clause | Kvoti/ditto,Kvoti/ditto,Kvoti/ditto,Kvoti/ditto,Kvoti/ditto | from fabric.api import env, cd, run, shell_env, sudo
env.hosts = ['134.213.147.235']
env.user = 'root'
env.key_filename = '~/.ssh/id_di'
env.forward_agent = True
def deploy():
with cd('/srv/venv/mysite'):
run('git pull')
with cd('mysite'), shell_env(DJANGO_CONFIGURATION='Production'):
... | from fabric.api import env, cd, run, shell_env, sudo
env.hosts = ['134.213.147.235']
env.user = 'root'
env.key_filename = '~/.ssh/id_di'
env.forward_agent = True
def deploy():
with cd('/srv/venv/mysite'):
run('git pull')
with cd('mysite'), shell_env(DJANGO_CONFIGURATION='Production'):
... | <commit_before>from fabric.api import env, cd, run, shell_env, sudo
env.hosts = ['134.213.147.235']
env.user = 'root'
env.key_filename = '~/.ssh/id_di'
env.forward_agent = True
def deploy():
with cd('/srv/venv/mysite'):
run('git pull')
with cd('mysite'), shell_env(DJANGO_CONFIGURATION='Production... | from fabric.api import env, cd, run, shell_env, sudo
env.hosts = ['134.213.147.235']
env.user = 'root'
env.key_filename = '~/.ssh/id_di'
env.forward_agent = True
def deploy():
with cd('/srv/venv/mysite'):
run('git pull')
with cd('mysite'), shell_env(DJANGO_CONFIGURATION='Production'):
... | from fabric.api import env, cd, run, shell_env, sudo
env.hosts = ['134.213.147.235']
env.user = 'root'
env.key_filename = '~/.ssh/id_di'
env.forward_agent = True
def deploy():
with cd('/srv/venv/mysite'):
run('git pull')
with cd('mysite'), shell_env(DJANGO_CONFIGURATION='Production'):
... | <commit_before>from fabric.api import env, cd, run, shell_env, sudo
env.hosts = ['134.213.147.235']
env.user = 'root'
env.key_filename = '~/.ssh/id_di'
env.forward_agent = True
def deploy():
with cd('/srv/venv/mysite'):
run('git pull')
with cd('mysite'), shell_env(DJANGO_CONFIGURATION='Production... |
8dcf5b2c85430a09502649bb3bb95c7b56312c03 | pysearch/urls.py | pysearch/urls.py | from django.conf.urls import patterns, include, url
from django.contrib import admin
admin.autodiscover()
urlpatterns = patterns('',
# Examples:
# url(r'^$', 'pysearch.views.home', name='home'),
# url(r'^blog/', include('blog.urls')),
url(r'^admin/', include(admin.site.urls)),
)
| from django.conf.urls import patterns, include, url
from django.contrib import admin
admin.autodiscover()
urlpatterns = patterns('',
# Examples:
# url(r'^$', 'pysearch.views.home', name='home'),
# url(r'^blog/', include('blog.urls')),
url(r'^admin/', include(admin.site.urls)),
url(r'^search/', inclu... | Connect search route to app | Connect search route to app
| Python | mit | nh0815/PySearch,nh0815/PySearch | from django.conf.urls import patterns, include, url
from django.contrib import admin
admin.autodiscover()
urlpatterns = patterns('',
# Examples:
# url(r'^$', 'pysearch.views.home', name='home'),
# url(r'^blog/', include('blog.urls')),
url(r'^admin/', include(admin.site.urls)),
)
Connect search route ... | from django.conf.urls import patterns, include, url
from django.contrib import admin
admin.autodiscover()
urlpatterns = patterns('',
# Examples:
# url(r'^$', 'pysearch.views.home', name='home'),
# url(r'^blog/', include('blog.urls')),
url(r'^admin/', include(admin.site.urls)),
url(r'^search/', inclu... | <commit_before>from django.conf.urls import patterns, include, url
from django.contrib import admin
admin.autodiscover()
urlpatterns = patterns('',
# Examples:
# url(r'^$', 'pysearch.views.home', name='home'),
# url(r'^blog/', include('blog.urls')),
url(r'^admin/', include(admin.site.urls)),
)
<commi... | from django.conf.urls import patterns, include, url
from django.contrib import admin
admin.autodiscover()
urlpatterns = patterns('',
# Examples:
# url(r'^$', 'pysearch.views.home', name='home'),
# url(r'^blog/', include('blog.urls')),
url(r'^admin/', include(admin.site.urls)),
url(r'^search/', inclu... | from django.conf.urls import patterns, include, url
from django.contrib import admin
admin.autodiscover()
urlpatterns = patterns('',
# Examples:
# url(r'^$', 'pysearch.views.home', name='home'),
# url(r'^blog/', include('blog.urls')),
url(r'^admin/', include(admin.site.urls)),
)
Connect search route ... | <commit_before>from django.conf.urls import patterns, include, url
from django.contrib import admin
admin.autodiscover()
urlpatterns = patterns('',
# Examples:
# url(r'^$', 'pysearch.views.home', name='home'),
# url(r'^blog/', include('blog.urls')),
url(r'^admin/', include(admin.site.urls)),
)
<commi... |
8025b6cad403ace01eb71af05d284d5fa0fa4ff7 | pandoc-figref.py | pandoc-figref.py | #! /usr/bin/env python3
"""Pandoc filter that replaces labels of format {#?:???}, where ? is a
single lower case character defining the type and ??? is an alphanumeric
label, with numbers. Different types are counted separately.
"""
from pandocfilters import toJSONFilter, Str
import re
REF_PAT = re.compile('(.*)\{#(... | #! /usr/bin/env python3
"""Pandoc filter that replaces labels of format {#?:???}, where ? is a
single lower case character defining the type and ??? is an alphanumeric
label, with numbers. Different types are counted separately.
"""
from pandocfilters import toJSONFilter, Str
import re
REF_PAT = re.compile('(.*)\{#(... | Fix issue with missing space after replacement | Fix issue with missing space after replacement
| Python | mit | scotthartley/pandoc-figref | #! /usr/bin/env python3
"""Pandoc filter that replaces labels of format {#?:???}, where ? is a
single lower case character defining the type and ??? is an alphanumeric
label, with numbers. Different types are counted separately.
"""
from pandocfilters import toJSONFilter, Str
import re
REF_PAT = re.compile('(.*)\{#(... | #! /usr/bin/env python3
"""Pandoc filter that replaces labels of format {#?:???}, where ? is a
single lower case character defining the type and ??? is an alphanumeric
label, with numbers. Different types are counted separately.
"""
from pandocfilters import toJSONFilter, Str
import re
REF_PAT = re.compile('(.*)\{#(... | <commit_before>#! /usr/bin/env python3
"""Pandoc filter that replaces labels of format {#?:???}, where ? is a
single lower case character defining the type and ??? is an alphanumeric
label, with numbers. Different types are counted separately.
"""
from pandocfilters import toJSONFilter, Str
import re
REF_PAT = re.co... | #! /usr/bin/env python3
"""Pandoc filter that replaces labels of format {#?:???}, where ? is a
single lower case character defining the type and ??? is an alphanumeric
label, with numbers. Different types are counted separately.
"""
from pandocfilters import toJSONFilter, Str
import re
REF_PAT = re.compile('(.*)\{#(... | #! /usr/bin/env python3
"""Pandoc filter that replaces labels of format {#?:???}, where ? is a
single lower case character defining the type and ??? is an alphanumeric
label, with numbers. Different types are counted separately.
"""
from pandocfilters import toJSONFilter, Str
import re
REF_PAT = re.compile('(.*)\{#(... | <commit_before>#! /usr/bin/env python3
"""Pandoc filter that replaces labels of format {#?:???}, where ? is a
single lower case character defining the type and ??? is an alphanumeric
label, with numbers. Different types are counted separately.
"""
from pandocfilters import toJSONFilter, Str
import re
REF_PAT = re.co... |
43612c86a3040de857e73bcc8ba7d24bde5a6a43 | pgcli/pgstyle.py | pgcli/pgstyle.py | from pygments.token import Token
from pygments.style import Style
from pygments.util import ClassNotFound
from prompt_toolkit.styles import default_style_extensions
import pygments.styles
def style_factory(name):
try:
style = pygments.styles.get_style_by_name(name)
except ClassNotFound:
style ... | from pygments.token import Token
from pygments.style import Style
from pygments.util import ClassNotFound
from prompt_toolkit.styles import default_style_extensions
import pygments.styles
def style_factory(name):
try:
style = pygments.styles.get_style_by_name(name)
except ClassNotFound:
style ... | Set completions meta-text styling to match | Set completions meta-text styling to match
| Python | bsd-3-clause | nosun/pgcli,TamasNo1/pgcli,zhiyuanshi/pgcli,dbcli/pgcli,nosun/pgcli,lk1ngaa7/pgcli,d33tah/pgcli,joewalnes/pgcli,joewalnes/pgcli,dbcli/vcli,janusnic/pgcli,suzukaze/pgcli,n-someya/pgcli,zhiyuanshi/pgcli,w4ngyi/pgcli,darikg/pgcli,d33tah/pgcli,janusnic/pgcli,w4ngyi/pgcli,koljonen/pgcli,koljonen/pgcli,suzukaze/pgcli,n-somey... | from pygments.token import Token
from pygments.style import Style
from pygments.util import ClassNotFound
from prompt_toolkit.styles import default_style_extensions
import pygments.styles
def style_factory(name):
try:
style = pygments.styles.get_style_by_name(name)
except ClassNotFound:
style ... | from pygments.token import Token
from pygments.style import Style
from pygments.util import ClassNotFound
from prompt_toolkit.styles import default_style_extensions
import pygments.styles
def style_factory(name):
try:
style = pygments.styles.get_style_by_name(name)
except ClassNotFound:
style ... | <commit_before>from pygments.token import Token
from pygments.style import Style
from pygments.util import ClassNotFound
from prompt_toolkit.styles import default_style_extensions
import pygments.styles
def style_factory(name):
try:
style = pygments.styles.get_style_by_name(name)
except ClassNotFound:... | from pygments.token import Token
from pygments.style import Style
from pygments.util import ClassNotFound
from prompt_toolkit.styles import default_style_extensions
import pygments.styles
def style_factory(name):
try:
style = pygments.styles.get_style_by_name(name)
except ClassNotFound:
style ... | from pygments.token import Token
from pygments.style import Style
from pygments.util import ClassNotFound
from prompt_toolkit.styles import default_style_extensions
import pygments.styles
def style_factory(name):
try:
style = pygments.styles.get_style_by_name(name)
except ClassNotFound:
style ... | <commit_before>from pygments.token import Token
from pygments.style import Style
from pygments.util import ClassNotFound
from prompt_toolkit.styles import default_style_extensions
import pygments.styles
def style_factory(name):
try:
style = pygments.styles.get_style_by_name(name)
except ClassNotFound:... |
8b33e63ab84e2da2168259d8ce17c8afac964500 | cacheops/management/commands/cleanfilecache.py | cacheops/management/commands/cleanfilecache.py | import os
from django.core.management.base import BaseCommand
from cacheops.conf import settings
class Command(BaseCommand):
help = 'Clean filebased cache'
def handle(self, **options):
os.system('find %s -type f \! -iname "\." -mmin +0 -delete' % settings.FILE_CACHE_DIR)
| import os
from django.core.management.base import BaseCommand
from cacheops.conf import settings
class Command(BaseCommand):
help = 'Clean filebased cache'
def add_arguments(self, parser):
parser.add_argument('path', nargs='*', default=['default'])
def handle(self, **options):
for path... | Allow cleaning file cache in non default place | Allow cleaning file cache in non default place
| Python | bsd-3-clause | LPgenerator/django-cacheops,Suor/django-cacheops | import os
from django.core.management.base import BaseCommand
from cacheops.conf import settings
class Command(BaseCommand):
help = 'Clean filebased cache'
def handle(self, **options):
os.system('find %s -type f \! -iname "\." -mmin +0 -delete' % settings.FILE_CACHE_DIR)
Allow cleaning file cache i... | import os
from django.core.management.base import BaseCommand
from cacheops.conf import settings
class Command(BaseCommand):
help = 'Clean filebased cache'
def add_arguments(self, parser):
parser.add_argument('path', nargs='*', default=['default'])
def handle(self, **options):
for path... | <commit_before>import os
from django.core.management.base import BaseCommand
from cacheops.conf import settings
class Command(BaseCommand):
help = 'Clean filebased cache'
def handle(self, **options):
os.system('find %s -type f \! -iname "\." -mmin +0 -delete' % settings.FILE_CACHE_DIR)
<commit_msg>... | import os
from django.core.management.base import BaseCommand
from cacheops.conf import settings
class Command(BaseCommand):
help = 'Clean filebased cache'
def add_arguments(self, parser):
parser.add_argument('path', nargs='*', default=['default'])
def handle(self, **options):
for path... | import os
from django.core.management.base import BaseCommand
from cacheops.conf import settings
class Command(BaseCommand):
help = 'Clean filebased cache'
def handle(self, **options):
os.system('find %s -type f \! -iname "\." -mmin +0 -delete' % settings.FILE_CACHE_DIR)
Allow cleaning file cache i... | <commit_before>import os
from django.core.management.base import BaseCommand
from cacheops.conf import settings
class Command(BaseCommand):
help = 'Clean filebased cache'
def handle(self, **options):
os.system('find %s -type f \! -iname "\." -mmin +0 -delete' % settings.FILE_CACHE_DIR)
<commit_msg>... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.