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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
9c9757278b38ad9846752c32ca7153b3802d137f | setup.py | setup.py | #!/usr/bin/env python2
from setuptools import setup
import bayesian_changepoint_detection
setup(
name='bayesian_changepoint_detection',
version=bayesian_changepoint_detection.__version__,
description='Some Bayesian changepoint detection algorithms',
author='Johannes Kulick',
author_email='mail@jo... | #!/usr/bin/env python2
from setuptools import setup
import bayesian_changepoint_detection
setup(
name='bayescd',
version=bayesian_changepoint_detection.__version__,
description='Some Bayesian changepoint detection algorithms',
author='Johannes Kulick',
author_email='[email protected]',
... | Rename project since someone else created the pypi package | Rename project since someone else created the pypi package
| Python | mit | hildensia/bayesian_changepoint_detection | #!/usr/bin/env python2
from setuptools import setup
import bayesian_changepoint_detection
setup(
name='bayesian_changepoint_detection',
version=bayesian_changepoint_detection.__version__,
description='Some Bayesian changepoint detection algorithms',
author='Johannes Kulick',
author_email='mail@jo... | #!/usr/bin/env python2
from setuptools import setup
import bayesian_changepoint_detection
setup(
name='bayescd',
version=bayesian_changepoint_detection.__version__,
description='Some Bayesian changepoint detection algorithms',
author='Johannes Kulick',
author_email='[email protected]',
... | <commit_before>#!/usr/bin/env python2
from setuptools import setup
import bayesian_changepoint_detection
setup(
name='bayesian_changepoint_detection',
version=bayesian_changepoint_detection.__version__,
description='Some Bayesian changepoint detection algorithms',
author='Johannes Kulick',
author... | #!/usr/bin/env python2
from setuptools import setup
import bayesian_changepoint_detection
setup(
name='bayescd',
version=bayesian_changepoint_detection.__version__,
description='Some Bayesian changepoint detection algorithms',
author='Johannes Kulick',
author_email='[email protected]',
... | #!/usr/bin/env python2
from setuptools import setup
import bayesian_changepoint_detection
setup(
name='bayesian_changepoint_detection',
version=bayesian_changepoint_detection.__version__,
description='Some Bayesian changepoint detection algorithms',
author='Johannes Kulick',
author_email='mail@jo... | <commit_before>#!/usr/bin/env python2
from setuptools import setup
import bayesian_changepoint_detection
setup(
name='bayesian_changepoint_detection',
version=bayesian_changepoint_detection.__version__,
description='Some Bayesian changepoint detection algorithms',
author='Johannes Kulick',
author... |
264214426051617d47d94a74801c635ff6b428e3 | setup.py | setup.py | from setuptools import setup
with open('README.rst') as f:
long_description = f.read()
setup(
name='pytest-faulthandler',
version='1.3.0',
py_modules=['pytest_faulthandler'],
url='https://github.com/pytest-dev/pytest-faulthandler',
license='MIT',
install_requires=['pytest>=2.6'],
test... | from setuptools import setup
with open('README.rst') as f:
long_description = f.read()
setup(
name='pytest-faulthandler',
version='1.3.0',
py_modules=['pytest_faulthandler'],
url='https://github.com/pytest-dev/pytest-faulthandler',
license='MIT',
install_requires=['pytest>=2.6'],
test... | Add Framework::Pytest to list of classifiers | Add Framework::Pytest to list of classifiers
| Python | mit | pytest-dev/pytest-faulthandler | from setuptools import setup
with open('README.rst') as f:
long_description = f.read()
setup(
name='pytest-faulthandler',
version='1.3.0',
py_modules=['pytest_faulthandler'],
url='https://github.com/pytest-dev/pytest-faulthandler',
license='MIT',
install_requires=['pytest>=2.6'],
test... | from setuptools import setup
with open('README.rst') as f:
long_description = f.read()
setup(
name='pytest-faulthandler',
version='1.3.0',
py_modules=['pytest_faulthandler'],
url='https://github.com/pytest-dev/pytest-faulthandler',
license='MIT',
install_requires=['pytest>=2.6'],
test... | <commit_before>from setuptools import setup
with open('README.rst') as f:
long_description = f.read()
setup(
name='pytest-faulthandler',
version='1.3.0',
py_modules=['pytest_faulthandler'],
url='https://github.com/pytest-dev/pytest-faulthandler',
license='MIT',
install_requires=['pytest>=... | from setuptools import setup
with open('README.rst') as f:
long_description = f.read()
setup(
name='pytest-faulthandler',
version='1.3.0',
py_modules=['pytest_faulthandler'],
url='https://github.com/pytest-dev/pytest-faulthandler',
license='MIT',
install_requires=['pytest>=2.6'],
test... | from setuptools import setup
with open('README.rst') as f:
long_description = f.read()
setup(
name='pytest-faulthandler',
version='1.3.0',
py_modules=['pytest_faulthandler'],
url='https://github.com/pytest-dev/pytest-faulthandler',
license='MIT',
install_requires=['pytest>=2.6'],
test... | <commit_before>from setuptools import setup
with open('README.rst') as f:
long_description = f.read()
setup(
name='pytest-faulthandler',
version='1.3.0',
py_modules=['pytest_faulthandler'],
url='https://github.com/pytest-dev/pytest-faulthandler',
license='MIT',
install_requires=['pytest>=... |
6d03ab8ee75732778607cd6f575715a3aea0358a | setup.py | setup.py | import amazon
from setuptools import setup, find_packages
long_description = pypandoc.convert('README.md', 'rst')
setup(name='python-amazon-simple-product-api',
version=amazon.__version__,
description="A simple Python wrapper for the Amazon.com Product Advertising API",
long_description=long_desc... | import amazon
from setuptools import setup, find_packages
import pypandoc
long_description = pypandoc.convert('README.md', 'rst')
setup(name='python-amazon-simple-product-api',
version=amazon.__version__,
description="A simple Python wrapper for the Amazon.com Product Advertising API",
long_descr... | Debug travis to pypi deploy | Debug travis to pypi deploy
| Python | apache-2.0 | yoavaviram/python-amazon-simple-product-api | import amazon
from setuptools import setup, find_packages
long_description = pypandoc.convert('README.md', 'rst')
setup(name='python-amazon-simple-product-api',
version=amazon.__version__,
description="A simple Python wrapper for the Amazon.com Product Advertising API",
long_description=long_desc... | import amazon
from setuptools import setup, find_packages
import pypandoc
long_description = pypandoc.convert('README.md', 'rst')
setup(name='python-amazon-simple-product-api',
version=amazon.__version__,
description="A simple Python wrapper for the Amazon.com Product Advertising API",
long_descr... | <commit_before>import amazon
from setuptools import setup, find_packages
long_description = pypandoc.convert('README.md', 'rst')
setup(name='python-amazon-simple-product-api',
version=amazon.__version__,
description="A simple Python wrapper for the Amazon.com Product Advertising API",
long_descri... | import amazon
from setuptools import setup, find_packages
import pypandoc
long_description = pypandoc.convert('README.md', 'rst')
setup(name='python-amazon-simple-product-api',
version=amazon.__version__,
description="A simple Python wrapper for the Amazon.com Product Advertising API",
long_descr... | import amazon
from setuptools import setup, find_packages
long_description = pypandoc.convert('README.md', 'rst')
setup(name='python-amazon-simple-product-api',
version=amazon.__version__,
description="A simple Python wrapper for the Amazon.com Product Advertising API",
long_description=long_desc... | <commit_before>import amazon
from setuptools import setup, find_packages
long_description = pypandoc.convert('README.md', 'rst')
setup(name='python-amazon-simple-product-api',
version=amazon.__version__,
description="A simple Python wrapper for the Amazon.com Product Advertising API",
long_descri... |
af4ee10bbab0929719628560c2b6b13cb724c4cf | setup.py | setup.py | #!/usr/bin/env python
from setuptools import setup
conf = dict(name='magiclog',
version='1.0.0',
author = 'Jason Dusek',
author_email = '[email protected]',
url = 'https://github.com/drcloud/magiclog',
install_requires=[],
setup_requires=['p... | #!/usr/bin/env python
from setuptools import setup
conf = dict(name='magiclog',
version='1.0.1',
author='Jason Dusek',
author_email='[email protected]',
url='https://github.com/drcloud/magiclog',
install_requires=[],
setup_requires=['pytest-... | Fix version and format and rereleas | Fix version and format and rereleas
| Python | mit | drcloud/magiclog | #!/usr/bin/env python
from setuptools import setup
conf = dict(name='magiclog',
version='1.0.0',
author = 'Jason Dusek',
author_email = '[email protected]',
url = 'https://github.com/drcloud/magiclog',
install_requires=[],
setup_requires=['p... | #!/usr/bin/env python
from setuptools import setup
conf = dict(name='magiclog',
version='1.0.1',
author='Jason Dusek',
author_email='[email protected]',
url='https://github.com/drcloud/magiclog',
install_requires=[],
setup_requires=['pytest-... | <commit_before>#!/usr/bin/env python
from setuptools import setup
conf = dict(name='magiclog',
version='1.0.0',
author = 'Jason Dusek',
author_email = '[email protected]',
url = 'https://github.com/drcloud/magiclog',
install_requires=[],
set... | #!/usr/bin/env python
from setuptools import setup
conf = dict(name='magiclog',
version='1.0.1',
author='Jason Dusek',
author_email='[email protected]',
url='https://github.com/drcloud/magiclog',
install_requires=[],
setup_requires=['pytest-... | #!/usr/bin/env python
from setuptools import setup
conf = dict(name='magiclog',
version='1.0.0',
author = 'Jason Dusek',
author_email = '[email protected]',
url = 'https://github.com/drcloud/magiclog',
install_requires=[],
setup_requires=['p... | <commit_before>#!/usr/bin/env python
from setuptools import setup
conf = dict(name='magiclog',
version='1.0.0',
author = 'Jason Dusek',
author_email = '[email protected]',
url = 'https://github.com/drcloud/magiclog',
install_requires=[],
set... |
74ae1e2809b2c69db0617e1516f2efc30aba13bb | setup.py | setup.py | #!/usr/bin/env python
import os
import sys
try:
from setuptools import setup
except ImportError:
from distutils.core import setup
__version__ = '0.11.10'
packages = [
'lassie',
'lassie.filters',
'lassie.filters.oembed'
]
setup(
name='lassie',
version=__version__,
install_requires=op... | #!/usr/bin/env python
import os
import sys
try:
from setuptools import setup
except ImportError:
from distutils.core import setup
__version__ = '0.11.10'
packages = [
'lassie',
'lassie.filters',
'lassie.filters.oembed'
]
setup(
name='lassie',
version=__version__,
install_requires=op... | Remove long desc for now. | Remove long desc for now.
| Python | mit | michaelhelmick/lassie,michaelhelmick/lassie | #!/usr/bin/env python
import os
import sys
try:
from setuptools import setup
except ImportError:
from distutils.core import setup
__version__ = '0.11.10'
packages = [
'lassie',
'lassie.filters',
'lassie.filters.oembed'
]
setup(
name='lassie',
version=__version__,
install_requires=op... | #!/usr/bin/env python
import os
import sys
try:
from setuptools import setup
except ImportError:
from distutils.core import setup
__version__ = '0.11.10'
packages = [
'lassie',
'lassie.filters',
'lassie.filters.oembed'
]
setup(
name='lassie',
version=__version__,
install_requires=op... | <commit_before>#!/usr/bin/env python
import os
import sys
try:
from setuptools import setup
except ImportError:
from distutils.core import setup
__version__ = '0.11.10'
packages = [
'lassie',
'lassie.filters',
'lassie.filters.oembed'
]
setup(
name='lassie',
version=__version__,
inst... | #!/usr/bin/env python
import os
import sys
try:
from setuptools import setup
except ImportError:
from distutils.core import setup
__version__ = '0.11.10'
packages = [
'lassie',
'lassie.filters',
'lassie.filters.oembed'
]
setup(
name='lassie',
version=__version__,
install_requires=op... | #!/usr/bin/env python
import os
import sys
try:
from setuptools import setup
except ImportError:
from distutils.core import setup
__version__ = '0.11.10'
packages = [
'lassie',
'lassie.filters',
'lassie.filters.oembed'
]
setup(
name='lassie',
version=__version__,
install_requires=op... | <commit_before>#!/usr/bin/env python
import os
import sys
try:
from setuptools import setup
except ImportError:
from distutils.core import setup
__version__ = '0.11.10'
packages = [
'lassie',
'lassie.filters',
'lassie.filters.oembed'
]
setup(
name='lassie',
version=__version__,
inst... |
4c1a7c7d666b7cde77f26f7d373ed9792769592f | setup.py | setup.py | import os
from setuptools import setup
def read(fname):
return open(os.path.join(os.path.dirname(__file__), fname)).read()
setup(
name = 'xym',
version = '0.4',
description = ('A tool to fetch and extract YANG modules from IETF RFCs and Drafts'),
long_description = """xym is a simple tool for fetching and ex... | import os
from setuptools import setup
def read(fname):
return open(os.path.join(os.path.dirname(__file__), fname)).read()
setup(
name = 'xym',
version = '0.4.1',
description = ('A tool to fetch and extract YANG modules from IETF RFCs and Drafts'),
long_description = """xym is a simple tool for fetching and ... | Add support for missing .yang suffix check | Add support for missing .yang suffix check
| Python | bsd-3-clause | xym-tool/xym | import os
from setuptools import setup
def read(fname):
return open(os.path.join(os.path.dirname(__file__), fname)).read()
setup(
name = 'xym',
version = '0.4',
description = ('A tool to fetch and extract YANG modules from IETF RFCs and Drafts'),
long_description = """xym is a simple tool for fetching and ex... | import os
from setuptools import setup
def read(fname):
return open(os.path.join(os.path.dirname(__file__), fname)).read()
setup(
name = 'xym',
version = '0.4.1',
description = ('A tool to fetch and extract YANG modules from IETF RFCs and Drafts'),
long_description = """xym is a simple tool for fetching and ... | <commit_before>import os
from setuptools import setup
def read(fname):
return open(os.path.join(os.path.dirname(__file__), fname)).read()
setup(
name = 'xym',
version = '0.4',
description = ('A tool to fetch and extract YANG modules from IETF RFCs and Drafts'),
long_description = """xym is a simple tool for ... | import os
from setuptools import setup
def read(fname):
return open(os.path.join(os.path.dirname(__file__), fname)).read()
setup(
name = 'xym',
version = '0.4.1',
description = ('A tool to fetch and extract YANG modules from IETF RFCs and Drafts'),
long_description = """xym is a simple tool for fetching and ... | import os
from setuptools import setup
def read(fname):
return open(os.path.join(os.path.dirname(__file__), fname)).read()
setup(
name = 'xym',
version = '0.4',
description = ('A tool to fetch and extract YANG modules from IETF RFCs and Drafts'),
long_description = """xym is a simple tool for fetching and ex... | <commit_before>import os
from setuptools import setup
def read(fname):
return open(os.path.join(os.path.dirname(__file__), fname)).read()
setup(
name = 'xym',
version = '0.4',
description = ('A tool to fetch and extract YANG modules from IETF RFCs and Drafts'),
long_description = """xym is a simple tool for ... |
553d6d1a03afcf47f57821e055e058a662d951ca | setup.py | setup.py | #!/usr/bin/env python
# -*- coding: utf-8-*-
from setuptools import setup
setup(name='cmuclmtk',
version='0.1.3',
description='Wrapper library for accessing the language model tools for CMU Sphinx (CMUCLMTK).',
long_description=open('README.rst').read(),
author='Jan Holthuis',
author_emai... | #!/usr/bin/env python
# -*- coding: utf-8-*-
from setuptools import setup
setup(name='cmuclmtk',
version='0.1.3',
description='Wrapper library for accessing the language model tools for CMU Sphinx (CMUCLMTK).',
long_description=open('README.md').read(),
author='Jan Holthuis',
author_email... | Use README.md instead of README.rst | Use README.md instead of README.rst
| Python | bsd-3-clause | Holzhaus/python-cmuclmtk | #!/usr/bin/env python
# -*- coding: utf-8-*-
from setuptools import setup
setup(name='cmuclmtk',
version='0.1.3',
description='Wrapper library for accessing the language model tools for CMU Sphinx (CMUCLMTK).',
long_description=open('README.rst').read(),
author='Jan Holthuis',
author_emai... | #!/usr/bin/env python
# -*- coding: utf-8-*-
from setuptools import setup
setup(name='cmuclmtk',
version='0.1.3',
description='Wrapper library for accessing the language model tools for CMU Sphinx (CMUCLMTK).',
long_description=open('README.md').read(),
author='Jan Holthuis',
author_email... | <commit_before>#!/usr/bin/env python
# -*- coding: utf-8-*-
from setuptools import setup
setup(name='cmuclmtk',
version='0.1.3',
description='Wrapper library for accessing the language model tools for CMU Sphinx (CMUCLMTK).',
long_description=open('README.rst').read(),
author='Jan Holthuis',
... | #!/usr/bin/env python
# -*- coding: utf-8-*-
from setuptools import setup
setup(name='cmuclmtk',
version='0.1.3',
description='Wrapper library for accessing the language model tools for CMU Sphinx (CMUCLMTK).',
long_description=open('README.md').read(),
author='Jan Holthuis',
author_email... | #!/usr/bin/env python
# -*- coding: utf-8-*-
from setuptools import setup
setup(name='cmuclmtk',
version='0.1.3',
description='Wrapper library for accessing the language model tools for CMU Sphinx (CMUCLMTK).',
long_description=open('README.rst').read(),
author='Jan Holthuis',
author_emai... | <commit_before>#!/usr/bin/env python
# -*- coding: utf-8-*-
from setuptools import setup
setup(name='cmuclmtk',
version='0.1.3',
description='Wrapper library for accessing the language model tools for CMU Sphinx (CMUCLMTK).',
long_description=open('README.rst').read(),
author='Jan Holthuis',
... |
33337ee5bd50f73af07063fde5ee7d01874b9739 | setup.py | setup.py | """
django-gstorage
"""
import re
from setuptools import setup
version = ''
with open('gstorage/__init__.py', 'r') as fd:
version = re.search(r'^__version__\s*=\s*[\'"]([^\'"]*)[\'"]',
fd.read(), re.MULTILINE).group(1)
setup(
name='django-gstorage',
version=version,
description='Allow easy i... | """
django-gstorage
"""
import re
from setuptools import setup
version = ''
with open('gstorage/__init__.py', 'r') as fd:
version = re.search(r'^__version__\s*=\s*[\'"]([^\'"]*)[\'"]',
fd.read(), re.MULTILINE).group(1)
with open('README.rst', 'r', 'utf-8') as f:
readme = f.read()
with open('HISTORY.... | Fix readme to be able to build a wheel | Fix readme to be able to build a wheel
| Python | mit | fyndiq/django-gstorage | """
django-gstorage
"""
import re
from setuptools import setup
version = ''
with open('gstorage/__init__.py', 'r') as fd:
version = re.search(r'^__version__\s*=\s*[\'"]([^\'"]*)[\'"]',
fd.read(), re.MULTILINE).group(1)
setup(
name='django-gstorage',
version=version,
description='Allow easy i... | """
django-gstorage
"""
import re
from setuptools import setup
version = ''
with open('gstorage/__init__.py', 'r') as fd:
version = re.search(r'^__version__\s*=\s*[\'"]([^\'"]*)[\'"]',
fd.read(), re.MULTILINE).group(1)
with open('README.rst', 'r', 'utf-8') as f:
readme = f.read()
with open('HISTORY.... | <commit_before>"""
django-gstorage
"""
import re
from setuptools import setup
version = ''
with open('gstorage/__init__.py', 'r') as fd:
version = re.search(r'^__version__\s*=\s*[\'"]([^\'"]*)[\'"]',
fd.read(), re.MULTILINE).group(1)
setup(
name='django-gstorage',
version=version,
descriptio... | """
django-gstorage
"""
import re
from setuptools import setup
version = ''
with open('gstorage/__init__.py', 'r') as fd:
version = re.search(r'^__version__\s*=\s*[\'"]([^\'"]*)[\'"]',
fd.read(), re.MULTILINE).group(1)
with open('README.rst', 'r', 'utf-8') as f:
readme = f.read()
with open('HISTORY.... | """
django-gstorage
"""
import re
from setuptools import setup
version = ''
with open('gstorage/__init__.py', 'r') as fd:
version = re.search(r'^__version__\s*=\s*[\'"]([^\'"]*)[\'"]',
fd.read(), re.MULTILINE).group(1)
setup(
name='django-gstorage',
version=version,
description='Allow easy i... | <commit_before>"""
django-gstorage
"""
import re
from setuptools import setup
version = ''
with open('gstorage/__init__.py', 'r') as fd:
version = re.search(r'^__version__\s*=\s*[\'"]([^\'"]*)[\'"]',
fd.read(), re.MULTILINE).group(1)
setup(
name='django-gstorage',
version=version,
descriptio... |
81ea1101839059cbb57011f0d1af5b06ebe3d458 | setup.py | setup.py | from setuptools import setup
setup(
name='lektor-root-relative-path',
author=u'Atsushi Suga',
author_email='[email protected]',
version='0.1',
url='http://github.com/a2csuga/lektor-root-relative-path',
license='MIT',
packages=['lektor_root_relative_path'],
description='Ro... | from setuptools import setup
setup(
name='lektor-root-relative-path',
author=u'Atsushi Suga',
author_email='[email protected]',
version='0.1',
url='http://github.com/a2csuga/lektor-root-relative-path',
license='MIT',
install_requires=open('requirements.txt').read(),
packa... | Add dependency, so it gets auto installed when installing the plugin. | Add dependency, so it gets auto installed when installing the plugin.
| Python | mit | a2csuga/lektor-root-relative-path | from setuptools import setup
setup(
name='lektor-root-relative-path',
author=u'Atsushi Suga',
author_email='[email protected]',
version='0.1',
url='http://github.com/a2csuga/lektor-root-relative-path',
license='MIT',
packages=['lektor_root_relative_path'],
description='Ro... | from setuptools import setup
setup(
name='lektor-root-relative-path',
author=u'Atsushi Suga',
author_email='[email protected]',
version='0.1',
url='http://github.com/a2csuga/lektor-root-relative-path',
license='MIT',
install_requires=open('requirements.txt').read(),
packa... | <commit_before>from setuptools import setup
setup(
name='lektor-root-relative-path',
author=u'Atsushi Suga',
author_email='[email protected]',
version='0.1',
url='http://github.com/a2csuga/lektor-root-relative-path',
license='MIT',
packages=['lektor_root_relative_path'],
... | from setuptools import setup
setup(
name='lektor-root-relative-path',
author=u'Atsushi Suga',
author_email='[email protected]',
version='0.1',
url='http://github.com/a2csuga/lektor-root-relative-path',
license='MIT',
install_requires=open('requirements.txt').read(),
packa... | from setuptools import setup
setup(
name='lektor-root-relative-path',
author=u'Atsushi Suga',
author_email='[email protected]',
version='0.1',
url='http://github.com/a2csuga/lektor-root-relative-path',
license='MIT',
packages=['lektor_root_relative_path'],
description='Ro... | <commit_before>from setuptools import setup
setup(
name='lektor-root-relative-path',
author=u'Atsushi Suga',
author_email='[email protected]',
version='0.1',
url='http://github.com/a2csuga/lektor-root-relative-path',
license='MIT',
packages=['lektor_root_relative_path'],
... |
ece484b3beeae72543a3f3b139bc584200050d03 | setup.py | setup.py |
from setuptools import setup
setup(name = 'OWSLib',
version = '0.1.0',
description = 'OGC Web Service utility library',
license = 'GPL',
keywords = 'gis ogc ows wfs wms capabilities metadata',
author = 'Sean Gillies',
author_email = 'sgillies@fri... |
from setuptools import setup
setup(name = 'OWSLib',
version = '0.2.0',
description = 'OGC Web Service utility library',
license = 'BSD',
keywords = 'gis ogc ows wfs wms capabilities metadata',
author = 'Sean Gillies',
author_email = 'sgillies@fri... | Change version and license for 0.2 | Change version and license for 0.2
git-svn-id: 8e0fbe17d71f9a07a4f24b82f5b9fb44b438f95e@617 b426a367-1105-0410-b9ff-cdf4ab011145
| Python | bsd-3-clause | monoid/owslib,monoid/owslib,sabman/OWSLib |
from setuptools import setup
setup(name = 'OWSLib',
version = '0.1.0',
description = 'OGC Web Service utility library',
license = 'GPL',
keywords = 'gis ogc ows wfs wms capabilities metadata',
author = 'Sean Gillies',
author_email = 'sgillies@fri... |
from setuptools import setup
setup(name = 'OWSLib',
version = '0.2.0',
description = 'OGC Web Service utility library',
license = 'BSD',
keywords = 'gis ogc ows wfs wms capabilities metadata',
author = 'Sean Gillies',
author_email = 'sgillies@fri... | <commit_before>
from setuptools import setup
setup(name = 'OWSLib',
version = '0.1.0',
description = 'OGC Web Service utility library',
license = 'GPL',
keywords = 'gis ogc ows wfs wms capabilities metadata',
author = 'Sean Gillies',
author_email ... |
from setuptools import setup
setup(name = 'OWSLib',
version = '0.2.0',
description = 'OGC Web Service utility library',
license = 'BSD',
keywords = 'gis ogc ows wfs wms capabilities metadata',
author = 'Sean Gillies',
author_email = 'sgillies@fri... |
from setuptools import setup
setup(name = 'OWSLib',
version = '0.1.0',
description = 'OGC Web Service utility library',
license = 'GPL',
keywords = 'gis ogc ows wfs wms capabilities metadata',
author = 'Sean Gillies',
author_email = 'sgillies@fri... | <commit_before>
from setuptools import setup
setup(name = 'OWSLib',
version = '0.1.0',
description = 'OGC Web Service utility library',
license = 'GPL',
keywords = 'gis ogc ows wfs wms capabilities metadata',
author = 'Sean Gillies',
author_email ... |
69471b0b8bbc28e820c239a6e5bdef32f644d9e8 | setup.py | setup.py | from setuptools import setup
import django_jobvite
setup(
name='django-jobvite',
version=django_jobvite.__version__,
description='Simpler, JSON based interface to Jobvite',
long_description=open('README.rst').read(),
author='Paul Osman',
author_email='[email protected]',
url='htt... | from setuptools import setup, find_packages
import django_jobvite
setup(
name='django-jobvite',
version=django_jobvite.__version__,
description='Simpler, JSON based interface to Jobvite',
long_description=open('README.rst').read(),
author='Paul Osman',
author_email='[email protected]... | Use find_packages() to package all packages of module. | Use find_packages() to package all packages of module.
Current setup.py includes only the django_jobvite package and excludes all
the packages within the django_jobvite directory, like migrations,
management, etc. Long story short, if you install django_jobvite using
pip it doesn't work.
| Python | bsd-3-clause | mozilla/django-jobvite | from setuptools import setup
import django_jobvite
setup(
name='django-jobvite',
version=django_jobvite.__version__,
description='Simpler, JSON based interface to Jobvite',
long_description=open('README.rst').read(),
author='Paul Osman',
author_email='[email protected]',
url='htt... | from setuptools import setup, find_packages
import django_jobvite
setup(
name='django-jobvite',
version=django_jobvite.__version__,
description='Simpler, JSON based interface to Jobvite',
long_description=open('README.rst').read(),
author='Paul Osman',
author_email='[email protected]... | <commit_before>from setuptools import setup
import django_jobvite
setup(
name='django-jobvite',
version=django_jobvite.__version__,
description='Simpler, JSON based interface to Jobvite',
long_description=open('README.rst').read(),
author='Paul Osman',
author_email='[email protected]... | from setuptools import setup, find_packages
import django_jobvite
setup(
name='django-jobvite',
version=django_jobvite.__version__,
description='Simpler, JSON based interface to Jobvite',
long_description=open('README.rst').read(),
author='Paul Osman',
author_email='[email protected]... | from setuptools import setup
import django_jobvite
setup(
name='django-jobvite',
version=django_jobvite.__version__,
description='Simpler, JSON based interface to Jobvite',
long_description=open('README.rst').read(),
author='Paul Osman',
author_email='[email protected]',
url='htt... | <commit_before>from setuptools import setup
import django_jobvite
setup(
name='django-jobvite',
version=django_jobvite.__version__,
description='Simpler, JSON based interface to Jobvite',
long_description=open('README.rst').read(),
author='Paul Osman',
author_email='[email protected]... |
74f07511d810447f8c357aadebb810f6cb67ef55 | algoliasearch/__init__.py | algoliasearch/__init__.py | # -*- coding: utf-8 -*-
"""
Copyright (c) 2013 Algolia
http://www.algolia.com/
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, ... | # -*- coding: utf-8 -*-
"""
Copyright (c) 2013 Algolia
http://www.algolia.com/
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, ... | Make VERSION easier to access | Make VERSION easier to access
Until now `algoliasearch.version.VERSION` was needed to obtain the
current version. Only `algoliasearch.VERSION` is now needed.
The change is backward compatible: it is still possible to do
`algoliasearch.version.VERSION`.
| Python | mit | algolia/algoliasearch-client-python | # -*- coding: utf-8 -*-
"""
Copyright (c) 2013 Algolia
http://www.algolia.com/
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, ... | # -*- coding: utf-8 -*-
"""
Copyright (c) 2013 Algolia
http://www.algolia.com/
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, ... | <commit_before># -*- coding: utf-8 -*-
"""
Copyright (c) 2013 Algolia
http://www.algolia.com/
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the ... | # -*- coding: utf-8 -*-
"""
Copyright (c) 2013 Algolia
http://www.algolia.com/
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, ... | # -*- coding: utf-8 -*-
"""
Copyright (c) 2013 Algolia
http://www.algolia.com/
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, ... | <commit_before># -*- coding: utf-8 -*-
"""
Copyright (c) 2013 Algolia
http://www.algolia.com/
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the ... |
542daac6533b65f6a92e86987b913b5981d1638d | setup.py | setup.py | """Lusmu setup information
Copyright 2013 Eniram Ltd. See the LICENSE file at the top-level directory of
this distribution and at https://github.com/akaihola/lusmu/blob/master/LICENSE
"""
from setuptools import setup
setup(name='lusmu',
version='0.2.4.dev',
packages=['lusmu'],
author='Antti Kaih... | """Lusmu setup information
Copyright 2013 Eniram Ltd. See the LICENSE file at the top-level directory of
this distribution and at https://github.com/akaihola/lusmu/blob/master/LICENSE
"""
import os
from setuptools import setup
here = os.path.abspath(os.path.dirname(__file__))
with open(os.path.join(here, 'README.r... | Include README in PyPi release | Include README in PyPi release
| Python | bsd-3-clause | akaihola/lusmu | """Lusmu setup information
Copyright 2013 Eniram Ltd. See the LICENSE file at the top-level directory of
this distribution and at https://github.com/akaihola/lusmu/blob/master/LICENSE
"""
from setuptools import setup
setup(name='lusmu',
version='0.2.4.dev',
packages=['lusmu'],
author='Antti Kaih... | """Lusmu setup information
Copyright 2013 Eniram Ltd. See the LICENSE file at the top-level directory of
this distribution and at https://github.com/akaihola/lusmu/blob/master/LICENSE
"""
import os
from setuptools import setup
here = os.path.abspath(os.path.dirname(__file__))
with open(os.path.join(here, 'README.r... | <commit_before>"""Lusmu setup information
Copyright 2013 Eniram Ltd. See the LICENSE file at the top-level directory of
this distribution and at https://github.com/akaihola/lusmu/blob/master/LICENSE
"""
from setuptools import setup
setup(name='lusmu',
version='0.2.4.dev',
packages=['lusmu'],
aut... | """Lusmu setup information
Copyright 2013 Eniram Ltd. See the LICENSE file at the top-level directory of
this distribution and at https://github.com/akaihola/lusmu/blob/master/LICENSE
"""
import os
from setuptools import setup
here = os.path.abspath(os.path.dirname(__file__))
with open(os.path.join(here, 'README.r... | """Lusmu setup information
Copyright 2013 Eniram Ltd. See the LICENSE file at the top-level directory of
this distribution and at https://github.com/akaihola/lusmu/blob/master/LICENSE
"""
from setuptools import setup
setup(name='lusmu',
version='0.2.4.dev',
packages=['lusmu'],
author='Antti Kaih... | <commit_before>"""Lusmu setup information
Copyright 2013 Eniram Ltd. See the LICENSE file at the top-level directory of
this distribution and at https://github.com/akaihola/lusmu/blob/master/LICENSE
"""
from setuptools import setup
setup(name='lusmu',
version='0.2.4.dev',
packages=['lusmu'],
aut... |
35c023f78c2d2c735cba9f6acf504d62d5ac5c83 | setup.py | setup.py | import os
from setuptools import setup
with open(os.path.join(os.path.dirname(__file__), 'README.md')) as readme:
README = readme.read()
# allow setup.py to be run from any path
os.chdir(os.path.normpath(os.path.join(os.path.abspath(__file__), os.pardir)))
setup(
name='pybbm-private-messages',
version='0... | import os
from setuptools import setup, find_packages
with open(os.path.join(os.path.dirname(__file__), 'README.md')) as readme:
README = readme.read()
# allow setup.py to be run from any path
os.chdir(os.path.normpath(os.path.join(os.path.abspath(__file__), os.pardir)))
setup(
name='pybbm-private-messages',... | Include custom templatetags in package build. | Include custom templatetags in package build.
| Python | mit | skolsuper/pybbm_private_messages,skolsuper/pybbm_private_messages,skolsuper/pybbm_private_messages | import os
from setuptools import setup
with open(os.path.join(os.path.dirname(__file__), 'README.md')) as readme:
README = readme.read()
# allow setup.py to be run from any path
os.chdir(os.path.normpath(os.path.join(os.path.abspath(__file__), os.pardir)))
setup(
name='pybbm-private-messages',
version='0... | import os
from setuptools import setup, find_packages
with open(os.path.join(os.path.dirname(__file__), 'README.md')) as readme:
README = readme.read()
# allow setup.py to be run from any path
os.chdir(os.path.normpath(os.path.join(os.path.abspath(__file__), os.pardir)))
setup(
name='pybbm-private-messages',... | <commit_before>import os
from setuptools import setup
with open(os.path.join(os.path.dirname(__file__), 'README.md')) as readme:
README = readme.read()
# allow setup.py to be run from any path
os.chdir(os.path.normpath(os.path.join(os.path.abspath(__file__), os.pardir)))
setup(
name='pybbm-private-messages',... | import os
from setuptools import setup, find_packages
with open(os.path.join(os.path.dirname(__file__), 'README.md')) as readme:
README = readme.read()
# allow setup.py to be run from any path
os.chdir(os.path.normpath(os.path.join(os.path.abspath(__file__), os.pardir)))
setup(
name='pybbm-private-messages',... | import os
from setuptools import setup
with open(os.path.join(os.path.dirname(__file__), 'README.md')) as readme:
README = readme.read()
# allow setup.py to be run from any path
os.chdir(os.path.normpath(os.path.join(os.path.abspath(__file__), os.pardir)))
setup(
name='pybbm-private-messages',
version='0... | <commit_before>import os
from setuptools import setup
with open(os.path.join(os.path.dirname(__file__), 'README.md')) as readme:
README = readme.read()
# allow setup.py to be run from any path
os.chdir(os.path.normpath(os.path.join(os.path.abspath(__file__), os.pardir)))
setup(
name='pybbm-private-messages',... |
e09d2a22bd91b114d291f05131ed7a487370e438 | short.py | short.py | def ok(n):
s = n + 3
print 's = %d' % (s,)
return s
def ident(val):
return val
def main():
while False:
inside = 1
a = 1 + 2
ok(a)
if True:
print 'ok'
elif False:
print 'what'
else:
print 'no'
assert True, 'WHAT'
t = (1, 2)
c = None
... | def ok(n):
s = n + 3
print 's = %d' % (s,)
return s
def ident(val):
return val
Pair = DT('Pair', ('first', int), ('second', int))
Maybe, Just, Nothing = ADT('Maybe', 'Just', ('just', 'a'), 'Nothing')
def main():
while False:
inside = 1
a = 1 + 2
ok(a)
if True:
print 'ok'
... | Move data structures out of main | Move data structures out of main
| Python | mit | pshc/archipelago,pshc/archipelago,pshc/archipelago | def ok(n):
s = n + 3
print 's = %d' % (s,)
return s
def ident(val):
return val
def main():
while False:
inside = 1
a = 1 + 2
ok(a)
if True:
print 'ok'
elif False:
print 'what'
else:
print 'no'
assert True, 'WHAT'
t = (1, 2)
c = None
... | def ok(n):
s = n + 3
print 's = %d' % (s,)
return s
def ident(val):
return val
Pair = DT('Pair', ('first', int), ('second', int))
Maybe, Just, Nothing = ADT('Maybe', 'Just', ('just', 'a'), 'Nothing')
def main():
while False:
inside = 1
a = 1 + 2
ok(a)
if True:
print 'ok'
... | <commit_before>def ok(n):
s = n + 3
print 's = %d' % (s,)
return s
def ident(val):
return val
def main():
while False:
inside = 1
a = 1 + 2
ok(a)
if True:
print 'ok'
elif False:
print 'what'
else:
print 'no'
assert True, 'WHAT'
t = (1, 2)
... | def ok(n):
s = n + 3
print 's = %d' % (s,)
return s
def ident(val):
return val
Pair = DT('Pair', ('first', int), ('second', int))
Maybe, Just, Nothing = ADT('Maybe', 'Just', ('just', 'a'), 'Nothing')
def main():
while False:
inside = 1
a = 1 + 2
ok(a)
if True:
print 'ok'
... | def ok(n):
s = n + 3
print 's = %d' % (s,)
return s
def ident(val):
return val
def main():
while False:
inside = 1
a = 1 + 2
ok(a)
if True:
print 'ok'
elif False:
print 'what'
else:
print 'no'
assert True, 'WHAT'
t = (1, 2)
c = None
... | <commit_before>def ok(n):
s = n + 3
print 's = %d' % (s,)
return s
def ident(val):
return val
def main():
while False:
inside = 1
a = 1 + 2
ok(a)
if True:
print 'ok'
elif False:
print 'what'
else:
print 'no'
assert True, 'WHAT'
t = (1, 2)
... |
d0bcfebd2f85ec0ba17812ad4e98ef738dae1163 | menpo/shape/groupops.py | menpo/shape/groupops.py | from .pointcloud import PointCloud
import numpy as np
def mean_pointcloud(pointclouds):
r"""
Compute the mean of a `list` of :map:`PointCloud` objects.
Parameters
----------
pointclouds: `list` of :map:`PointCloud`
List of point cloud objects from which we want to compute the mean.
R... | from __future__ import division
from .pointcloud import PointCloud
def mean_pointcloud(pointclouds):
r"""
Compute the mean of a `list` of :map:`PointCloud` objects.
Parameters
----------
pointclouds: `list` of :map:`PointCloud`
List of point cloud objects from which we want to compute the... | Update mean_pointcloud to be faster | Update mean_pointcloud to be faster
This is actually faster than using numpy. It is also MUCH
faster if it gets jitted by something like pypy or numba.
| Python | bsd-3-clause | mozata/menpo,mozata/menpo,patricksnape/menpo,menpo/menpo,grigorisg9gr/menpo,mozata/menpo,yuxiang-zhou/menpo,menpo/menpo,mozata/menpo,grigorisg9gr/menpo,yuxiang-zhou/menpo,grigorisg9gr/menpo,patricksnape/menpo,menpo/menpo,patricksnape/menpo,yuxiang-zhou/menpo | from .pointcloud import PointCloud
import numpy as np
def mean_pointcloud(pointclouds):
r"""
Compute the mean of a `list` of :map:`PointCloud` objects.
Parameters
----------
pointclouds: `list` of :map:`PointCloud`
List of point cloud objects from which we want to compute the mean.
R... | from __future__ import division
from .pointcloud import PointCloud
def mean_pointcloud(pointclouds):
r"""
Compute the mean of a `list` of :map:`PointCloud` objects.
Parameters
----------
pointclouds: `list` of :map:`PointCloud`
List of point cloud objects from which we want to compute the... | <commit_before>from .pointcloud import PointCloud
import numpy as np
def mean_pointcloud(pointclouds):
r"""
Compute the mean of a `list` of :map:`PointCloud` objects.
Parameters
----------
pointclouds: `list` of :map:`PointCloud`
List of point cloud objects from which we want to compute t... | from __future__ import division
from .pointcloud import PointCloud
def mean_pointcloud(pointclouds):
r"""
Compute the mean of a `list` of :map:`PointCloud` objects.
Parameters
----------
pointclouds: `list` of :map:`PointCloud`
List of point cloud objects from which we want to compute the... | from .pointcloud import PointCloud
import numpy as np
def mean_pointcloud(pointclouds):
r"""
Compute the mean of a `list` of :map:`PointCloud` objects.
Parameters
----------
pointclouds: `list` of :map:`PointCloud`
List of point cloud objects from which we want to compute the mean.
R... | <commit_before>from .pointcloud import PointCloud
import numpy as np
def mean_pointcloud(pointclouds):
r"""
Compute the mean of a `list` of :map:`PointCloud` objects.
Parameters
----------
pointclouds: `list` of :map:`PointCloud`
List of point cloud objects from which we want to compute t... |
536b99916140f01216e2f9482086a83438250977 | web/mailman-web/urls.py | web/mailman-web/urls.py | # -*- coding: utf-8 -*-
# Copyright (C) 1998-2016 by the Free Software Foundation, Inc.
#
# This file is part of Postorius.
#
# Postorius is free software: you can redistribute it and/or modify it under
# the terms of the GNU General Public License as published by the Free
# Software Foundation, either version 3 of the... | # -*- coding: utf-8 -*-
# Copyright (C) 1998-2016 by the Free Software Foundation, Inc.
#
# This file is part of Postorius.
#
# Postorius is free software: you can redistribute it and/or modify it under
# the terms of the GNU General Public License as published by the Free
# Software Foundation, either version 3 of the... | Fix the admin url configuration. | Fix the admin url configuration.
| Python | mit | maxking/docker-mailman,maxking/docker-mailman | # -*- coding: utf-8 -*-
# Copyright (C) 1998-2016 by the Free Software Foundation, Inc.
#
# This file is part of Postorius.
#
# Postorius is free software: you can redistribute it and/or modify it under
# the terms of the GNU General Public License as published by the Free
# Software Foundation, either version 3 of the... | # -*- coding: utf-8 -*-
# Copyright (C) 1998-2016 by the Free Software Foundation, Inc.
#
# This file is part of Postorius.
#
# Postorius is free software: you can redistribute it and/or modify it under
# the terms of the GNU General Public License as published by the Free
# Software Foundation, either version 3 of the... | <commit_before># -*- coding: utf-8 -*-
# Copyright (C) 1998-2016 by the Free Software Foundation, Inc.
#
# This file is part of Postorius.
#
# Postorius is free software: you can redistribute it and/or modify it under
# the terms of the GNU General Public License as published by the Free
# Software Foundation, either v... | # -*- coding: utf-8 -*-
# Copyright (C) 1998-2016 by the Free Software Foundation, Inc.
#
# This file is part of Postorius.
#
# Postorius is free software: you can redistribute it and/or modify it under
# the terms of the GNU General Public License as published by the Free
# Software Foundation, either version 3 of the... | # -*- coding: utf-8 -*-
# Copyright (C) 1998-2016 by the Free Software Foundation, Inc.
#
# This file is part of Postorius.
#
# Postorius is free software: you can redistribute it and/or modify it under
# the terms of the GNU General Public License as published by the Free
# Software Foundation, either version 3 of the... | <commit_before># -*- coding: utf-8 -*-
# Copyright (C) 1998-2016 by the Free Software Foundation, Inc.
#
# This file is part of Postorius.
#
# Postorius is free software: you can redistribute it and/or modify it under
# the terms of the GNU General Public License as published by the Free
# Software Foundation, either v... |
8ea6176719cd0c167420e3a7332efc7ece947a0d | genderjobcheck/views.py | genderjobcheck/views.py | from django.views.decorators.csrf import csrf_exempt
from django.shortcuts import render
import assess
def home(request):
if request.method == 'GET':
return render(request, 'home.html', {})
@csrf_exempt
def assessJobAd(request):
if request.method == 'POST':
ad_text = request.POST["adtext"]
... | from django.views.decorators.csrf import csrf_exempt
from django.shortcuts import render
from django.shortcuts import redirect
import assess
def home(request):
if request.method == 'GET':
return render(request, 'home.html', {})
@csrf_exempt
def assessJobAd(request):
if request.method == 'POST':
... | Handle form submits without ad text | Handle form submits without ad text
| Python | mit | lovedaybrooke/gender-decoder,lovedaybrooke/gender-decoder | from django.views.decorators.csrf import csrf_exempt
from django.shortcuts import render
import assess
def home(request):
if request.method == 'GET':
return render(request, 'home.html', {})
@csrf_exempt
def assessJobAd(request):
if request.method == 'POST':
ad_text = request.POST["adtext"]
... | from django.views.decorators.csrf import csrf_exempt
from django.shortcuts import render
from django.shortcuts import redirect
import assess
def home(request):
if request.method == 'GET':
return render(request, 'home.html', {})
@csrf_exempt
def assessJobAd(request):
if request.method == 'POST':
... | <commit_before>from django.views.decorators.csrf import csrf_exempt
from django.shortcuts import render
import assess
def home(request):
if request.method == 'GET':
return render(request, 'home.html', {})
@csrf_exempt
def assessJobAd(request):
if request.method == 'POST':
ad_text = request.PO... | from django.views.decorators.csrf import csrf_exempt
from django.shortcuts import render
from django.shortcuts import redirect
import assess
def home(request):
if request.method == 'GET':
return render(request, 'home.html', {})
@csrf_exempt
def assessJobAd(request):
if request.method == 'POST':
... | from django.views.decorators.csrf import csrf_exempt
from django.shortcuts import render
import assess
def home(request):
if request.method == 'GET':
return render(request, 'home.html', {})
@csrf_exempt
def assessJobAd(request):
if request.method == 'POST':
ad_text = request.POST["adtext"]
... | <commit_before>from django.views.decorators.csrf import csrf_exempt
from django.shortcuts import render
import assess
def home(request):
if request.method == 'GET':
return render(request, 'home.html', {})
@csrf_exempt
def assessJobAd(request):
if request.method == 'POST':
ad_text = request.PO... |
d666c5c818fbfc00f642cfeb24cb90aab94035cd | keyring/devpi_client.py | keyring/devpi_client.py | import contextlib
import functools
import pluggy
import keyring
from keyring.errors import KeyringError
hookimpl = pluggy.HookimplMarker("devpiclient")
# https://github.com/jaraco/jaraco.context/blob/c3a9b739/jaraco/context.py#L205
suppress = type('suppress', (contextlib.suppress, contextlib.ContextDecorator), {}... | import contextlib
import functools
import pluggy
import keyring.errors
hookimpl = pluggy.HookimplMarker("devpiclient")
# https://github.com/jaraco/jaraco.context/blob/c3a9b739/jaraco/context.py#L205
suppress = type('suppress', (contextlib.suppress, contextlib.ContextDecorator), {})
def restore_signature(func):
... | Remove superfluous import by using the exception from the namespace. | Remove superfluous import by using the exception from the namespace.
| Python | mit | jaraco/keyring | import contextlib
import functools
import pluggy
import keyring
from keyring.errors import KeyringError
hookimpl = pluggy.HookimplMarker("devpiclient")
# https://github.com/jaraco/jaraco.context/blob/c3a9b739/jaraco/context.py#L205
suppress = type('suppress', (contextlib.suppress, contextlib.ContextDecorator), {}... | import contextlib
import functools
import pluggy
import keyring.errors
hookimpl = pluggy.HookimplMarker("devpiclient")
# https://github.com/jaraco/jaraco.context/blob/c3a9b739/jaraco/context.py#L205
suppress = type('suppress', (contextlib.suppress, contextlib.ContextDecorator), {})
def restore_signature(func):
... | <commit_before>import contextlib
import functools
import pluggy
import keyring
from keyring.errors import KeyringError
hookimpl = pluggy.HookimplMarker("devpiclient")
# https://github.com/jaraco/jaraco.context/blob/c3a9b739/jaraco/context.py#L205
suppress = type('suppress', (contextlib.suppress, contextlib.Contex... | import contextlib
import functools
import pluggy
import keyring.errors
hookimpl = pluggy.HookimplMarker("devpiclient")
# https://github.com/jaraco/jaraco.context/blob/c3a9b739/jaraco/context.py#L205
suppress = type('suppress', (contextlib.suppress, contextlib.ContextDecorator), {})
def restore_signature(func):
... | import contextlib
import functools
import pluggy
import keyring
from keyring.errors import KeyringError
hookimpl = pluggy.HookimplMarker("devpiclient")
# https://github.com/jaraco/jaraco.context/blob/c3a9b739/jaraco/context.py#L205
suppress = type('suppress', (contextlib.suppress, contextlib.ContextDecorator), {}... | <commit_before>import contextlib
import functools
import pluggy
import keyring
from keyring.errors import KeyringError
hookimpl = pluggy.HookimplMarker("devpiclient")
# https://github.com/jaraco/jaraco.context/blob/c3a9b739/jaraco/context.py#L205
suppress = type('suppress', (contextlib.suppress, contextlib.Contex... |
142de9e809a9bc82bca6d12eaf492c1ce12a618d | geotrek/authent/migrations/0002_auto_20181107_1620.py | geotrek/authent/migrations/0002_auto_20181107_1620.py | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations
import django.apps
from django.core.management import call_command
def add_permissions():
call_command('update_geotrek_permissions', verbosity=0)
UserModel = django.apps.apps.get_model('auth', 'User')
Permiss... | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations
from django.core.management import call_command
def add_permissions(apps, schema_editor):
call_command('update_geotrek_permissions', verbosity=0)
UserModel = apps.get_model('auth', 'User')
PermissionModel = a... | Change migrations lack of apps, schema_editor | Change migrations lack of apps, schema_editor
| Python | bsd-2-clause | GeotrekCE/Geotrek-admin,makinacorpus/Geotrek,GeotrekCE/Geotrek-admin,makinacorpus/Geotrek,makinacorpus/Geotrek,GeotrekCE/Geotrek-admin,GeotrekCE/Geotrek-admin,makinacorpus/Geotrek | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations
import django.apps
from django.core.management import call_command
def add_permissions():
call_command('update_geotrek_permissions', verbosity=0)
UserModel = django.apps.apps.get_model('auth', 'User')
Permiss... | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations
from django.core.management import call_command
def add_permissions(apps, schema_editor):
call_command('update_geotrek_permissions', verbosity=0)
UserModel = apps.get_model('auth', 'User')
PermissionModel = a... | <commit_before># -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations
import django.apps
from django.core.management import call_command
def add_permissions():
call_command('update_geotrek_permissions', verbosity=0)
UserModel = django.apps.apps.get_model('auth', 'Use... | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations
from django.core.management import call_command
def add_permissions(apps, schema_editor):
call_command('update_geotrek_permissions', verbosity=0)
UserModel = apps.get_model('auth', 'User')
PermissionModel = a... | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations
import django.apps
from django.core.management import call_command
def add_permissions():
call_command('update_geotrek_permissions', verbosity=0)
UserModel = django.apps.apps.get_model('auth', 'User')
Permiss... | <commit_before># -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations
import django.apps
from django.core.management import call_command
def add_permissions():
call_command('update_geotrek_permissions', verbosity=0)
UserModel = django.apps.apps.get_model('auth', 'Use... |
1d4aea091883ad464d1c7fcdf734b1916337b25e | zeus/utils/revisions.py | zeus/utils/revisions.py | from zeus.exceptions import UnknownRepositoryBackend
from zeus.models import Repository, Revision
from zeus.vcs.base import UnknownRevision
def identify_revision(repository: Repository, treeish: str):
"""
Attempt to transform a a commit-like reference into a valid revision.
"""
# try to find it from t... | from zeus.config import redis
from zeus.exceptions import UnknownRepositoryBackend
from zeus.models import Repository, Revision
from zeus.vcs.base import UnknownRevision
def identify_revision(repository: Repository, treeish: str):
"""
Attempt to transform a a commit-like reference into a valid revision.
"... | Add lock on identify_revision when revision is missing | ref: Add lock on identify_revision when revision is missing
| Python | apache-2.0 | getsentry/zeus,getsentry/zeus,getsentry/zeus,getsentry/zeus | from zeus.exceptions import UnknownRepositoryBackend
from zeus.models import Repository, Revision
from zeus.vcs.base import UnknownRevision
def identify_revision(repository: Repository, treeish: str):
"""
Attempt to transform a a commit-like reference into a valid revision.
"""
# try to find it from t... | from zeus.config import redis
from zeus.exceptions import UnknownRepositoryBackend
from zeus.models import Repository, Revision
from zeus.vcs.base import UnknownRevision
def identify_revision(repository: Repository, treeish: str):
"""
Attempt to transform a a commit-like reference into a valid revision.
"... | <commit_before>from zeus.exceptions import UnknownRepositoryBackend
from zeus.models import Repository, Revision
from zeus.vcs.base import UnknownRevision
def identify_revision(repository: Repository, treeish: str):
"""
Attempt to transform a a commit-like reference into a valid revision.
"""
# try to... | from zeus.config import redis
from zeus.exceptions import UnknownRepositoryBackend
from zeus.models import Repository, Revision
from zeus.vcs.base import UnknownRevision
def identify_revision(repository: Repository, treeish: str):
"""
Attempt to transform a a commit-like reference into a valid revision.
"... | from zeus.exceptions import UnknownRepositoryBackend
from zeus.models import Repository, Revision
from zeus.vcs.base import UnknownRevision
def identify_revision(repository: Repository, treeish: str):
"""
Attempt to transform a a commit-like reference into a valid revision.
"""
# try to find it from t... | <commit_before>from zeus.exceptions import UnknownRepositoryBackend
from zeus.models import Repository, Revision
from zeus.vcs.base import UnknownRevision
def identify_revision(repository: Repository, treeish: str):
"""
Attempt to transform a a commit-like reference into a valid revision.
"""
# try to... |
d5a3285b05d96ffc99049867256cdba87a5b420a | packages/mono_crypto.py | packages/mono_crypto.py | from mono_master import MonoMasterPackage
from bockbuild.util.util import *
class MonoMasterEncryptedPackage (MonoMasterPackage):
def __init__(self):
MonoMasterPackage.__init__ (self)
self.configure_flags.extend(['--enable-extension-module=crypto --enable-native-types'])
def prep(self):
... | from mono_master import MonoMasterPackage
from bockbuild.util.util import *
class MonoMasterEncryptedPackage (MonoMasterPackage):
def __init__(self):
MonoMasterPackage.__init__ (self)
self.configure_flags.extend(['--enable-extension-module=crypto --enable-native-types'])
def prep(self):
... | Fix mono-extensions checkout for PR branches ('origin/pull/N/merge') | Fix mono-extensions checkout for PR branches ('origin/pull/N/merge')
| Python | mit | mono/bockbuild,mono/bockbuild | from mono_master import MonoMasterPackage
from bockbuild.util.util import *
class MonoMasterEncryptedPackage (MonoMasterPackage):
def __init__(self):
MonoMasterPackage.__init__ (self)
self.configure_flags.extend(['--enable-extension-module=crypto --enable-native-types'])
def prep(self):
... | from mono_master import MonoMasterPackage
from bockbuild.util.util import *
class MonoMasterEncryptedPackage (MonoMasterPackage):
def __init__(self):
MonoMasterPackage.__init__ (self)
self.configure_flags.extend(['--enable-extension-module=crypto --enable-native-types'])
def prep(self):
... | <commit_before>from mono_master import MonoMasterPackage
from bockbuild.util.util import *
class MonoMasterEncryptedPackage (MonoMasterPackage):
def __init__(self):
MonoMasterPackage.__init__ (self)
self.configure_flags.extend(['--enable-extension-module=crypto --enable-native-types'])
d... | from mono_master import MonoMasterPackage
from bockbuild.util.util import *
class MonoMasterEncryptedPackage (MonoMasterPackage):
def __init__(self):
MonoMasterPackage.__init__ (self)
self.configure_flags.extend(['--enable-extension-module=crypto --enable-native-types'])
def prep(self):
... | from mono_master import MonoMasterPackage
from bockbuild.util.util import *
class MonoMasterEncryptedPackage (MonoMasterPackage):
def __init__(self):
MonoMasterPackage.__init__ (self)
self.configure_flags.extend(['--enable-extension-module=crypto --enable-native-types'])
def prep(self):
... | <commit_before>from mono_master import MonoMasterPackage
from bockbuild.util.util import *
class MonoMasterEncryptedPackage (MonoMasterPackage):
def __init__(self):
MonoMasterPackage.__init__ (self)
self.configure_flags.extend(['--enable-extension-module=crypto --enable-native-types'])
d... |
75bc100fb49588c057a6049975ce7c5803aa9145 | zvm/zcpu.py | zvm/zcpu.py | #
# A class which represents the CPU itself, the brain of the virtual
# machine. It ties all the systems together and runs the story.
#
# For the license of this file, please consult the LICENSE file in the
# root directory of this distribution.
#
class ZCpuError(Exception):
"General exception for Zcpu class"
... | #
# A class which represents the CPU itself, the brain of the virtual
# machine. It ties all the systems together and runs the story.
#
# For the license of this file, please consult the LICENSE file in the
# root directory of this distribution.
#
class ZCpuError(Exception):
"General exception for Zcpu class"
... | Make the CPU use lovely decorator syntax for registering opcode implementations. | Make the CPU use lovely decorator syntax for registering opcode implementations.
| Python | bsd-3-clause | BGCX262/zvm-hg-to-git,BGCX262/zvm-hg-to-git | #
# A class which represents the CPU itself, the brain of the virtual
# machine. It ties all the systems together and runs the story.
#
# For the license of this file, please consult the LICENSE file in the
# root directory of this distribution.
#
class ZCpuError(Exception):
"General exception for Zcpu class"
... | #
# A class which represents the CPU itself, the brain of the virtual
# machine. It ties all the systems together and runs the story.
#
# For the license of this file, please consult the LICENSE file in the
# root directory of this distribution.
#
class ZCpuError(Exception):
"General exception for Zcpu class"
... | <commit_before>#
# A class which represents the CPU itself, the brain of the virtual
# machine. It ties all the systems together and runs the story.
#
# For the license of this file, please consult the LICENSE file in the
# root directory of this distribution.
#
class ZCpuError(Exception):
"General exception for Z... | #
# A class which represents the CPU itself, the brain of the virtual
# machine. It ties all the systems together and runs the story.
#
# For the license of this file, please consult the LICENSE file in the
# root directory of this distribution.
#
class ZCpuError(Exception):
"General exception for Zcpu class"
... | #
# A class which represents the CPU itself, the brain of the virtual
# machine. It ties all the systems together and runs the story.
#
# For the license of this file, please consult the LICENSE file in the
# root directory of this distribution.
#
class ZCpuError(Exception):
"General exception for Zcpu class"
... | <commit_before>#
# A class which represents the CPU itself, the brain of the virtual
# machine. It ties all the systems together and runs the story.
#
# For the license of this file, please consult the LICENSE file in the
# root directory of this distribution.
#
class ZCpuError(Exception):
"General exception for Z... |
80a4c503675026c1274e2f1c20de6e3363cfb0f6 | utils.py | utils.py | import datetime
import time
def datetime_to_sec_since_epoch(dt):
'''Take a python datetime object and convert it to seconds since the unix epoch. Not timezone
aware'''
return time.mktime(dt.timetuple())
def sec_since_epoch_to_datetime(sec_since_epoch):
'''Take some number seconds since the epoch and conver... | import datetime
import time
def datetime_to_sec_since_epoch(dt):
'''Take a python datetime object and convert it to seconds since the unix epoch. Not timezone
aware'''
return int(time.mktime(dt.timetuple()))
def sec_since_epoch_to_datetime(sec_since_epoch):
'''Take some number seconds since the epoch and c... | Make datetime_to_sec_since_epoch return an int and fix epoch_sec_to_minutes_since_epoch | Make datetime_to_sec_since_epoch return an int and fix epoch_sec_to_minutes_since_epoch
| Python | bsd-2-clause | tofu702/varz_python_client | import datetime
import time
def datetime_to_sec_since_epoch(dt):
'''Take a python datetime object and convert it to seconds since the unix epoch. Not timezone
aware'''
return time.mktime(dt.timetuple())
def sec_since_epoch_to_datetime(sec_since_epoch):
'''Take some number seconds since the epoch and conver... | import datetime
import time
def datetime_to_sec_since_epoch(dt):
'''Take a python datetime object and convert it to seconds since the unix epoch. Not timezone
aware'''
return int(time.mktime(dt.timetuple()))
def sec_since_epoch_to_datetime(sec_since_epoch):
'''Take some number seconds since the epoch and c... | <commit_before>import datetime
import time
def datetime_to_sec_since_epoch(dt):
'''Take a python datetime object and convert it to seconds since the unix epoch. Not timezone
aware'''
return time.mktime(dt.timetuple())
def sec_since_epoch_to_datetime(sec_since_epoch):
'''Take some number seconds since the e... | import datetime
import time
def datetime_to_sec_since_epoch(dt):
'''Take a python datetime object and convert it to seconds since the unix epoch. Not timezone
aware'''
return int(time.mktime(dt.timetuple()))
def sec_since_epoch_to_datetime(sec_since_epoch):
'''Take some number seconds since the epoch and c... | import datetime
import time
def datetime_to_sec_since_epoch(dt):
'''Take a python datetime object and convert it to seconds since the unix epoch. Not timezone
aware'''
return time.mktime(dt.timetuple())
def sec_since_epoch_to_datetime(sec_since_epoch):
'''Take some number seconds since the epoch and conver... | <commit_before>import datetime
import time
def datetime_to_sec_since_epoch(dt):
'''Take a python datetime object and convert it to seconds since the unix epoch. Not timezone
aware'''
return time.mktime(dt.timetuple())
def sec_since_epoch_to_datetime(sec_since_epoch):
'''Take some number seconds since the e... |
33fcaf9b7a54dfb3cf065455eba75ee74fbb313b | pep8speaks/constants.py | pep8speaks/constants.py | import os
# HEADERS is deprecated, use AUTH only
HEADERS = {"Authorization": "token " + os.environ.setdefault("GITHUB_TOKEN", "")}
AUTH = (os.environ.setdefault("BOT_USERNAME", ""), os.environ.setdefault("BOT_PASSWORD", ""))
BASE_URL = 'https://api.github.com'
| import os
# HEADERS is deprecated, use AUTH only
HEADERS = {"Authorization": "token " + os.environ.setdefault("GITHUB_TOKEN", "")}
AUTH = (os.environ.setdefault("BOT_USERNAME", ""), os.environ.setdefault("GITHUB_TOKEN", ""))
BASE_URL = 'https://api.github.com'
| Use GITHUB_TOKEN instead of BOT_PASSWORD | Use GITHUB_TOKEN instead of BOT_PASSWORD
When using BOT_PASSWORD, the bot cannot have
two factor authentication enabled as GitHub expects
an additional header parameter that is the one time
2FA password: https://developer.github.com/v3/auth/#working-with-two-factor-authentication
GITHUB_TOKEN can be used in place of ... | Python | mit | OrkoHunter/pep8speaks | import os
# HEADERS is deprecated, use AUTH only
HEADERS = {"Authorization": "token " + os.environ.setdefault("GITHUB_TOKEN", "")}
AUTH = (os.environ.setdefault("BOT_USERNAME", ""), os.environ.setdefault("BOT_PASSWORD", ""))
BASE_URL = 'https://api.github.com'
Use GITHUB_TOKEN instead of BOT_PASSWORD
When using BOT_P... | import os
# HEADERS is deprecated, use AUTH only
HEADERS = {"Authorization": "token " + os.environ.setdefault("GITHUB_TOKEN", "")}
AUTH = (os.environ.setdefault("BOT_USERNAME", ""), os.environ.setdefault("GITHUB_TOKEN", ""))
BASE_URL = 'https://api.github.com'
| <commit_before>import os
# HEADERS is deprecated, use AUTH only
HEADERS = {"Authorization": "token " + os.environ.setdefault("GITHUB_TOKEN", "")}
AUTH = (os.environ.setdefault("BOT_USERNAME", ""), os.environ.setdefault("BOT_PASSWORD", ""))
BASE_URL = 'https://api.github.com'
<commit_msg>Use GITHUB_TOKEN instead of BOT... | import os
# HEADERS is deprecated, use AUTH only
HEADERS = {"Authorization": "token " + os.environ.setdefault("GITHUB_TOKEN", "")}
AUTH = (os.environ.setdefault("BOT_USERNAME", ""), os.environ.setdefault("GITHUB_TOKEN", ""))
BASE_URL = 'https://api.github.com'
| import os
# HEADERS is deprecated, use AUTH only
HEADERS = {"Authorization": "token " + os.environ.setdefault("GITHUB_TOKEN", "")}
AUTH = (os.environ.setdefault("BOT_USERNAME", ""), os.environ.setdefault("BOT_PASSWORD", ""))
BASE_URL = 'https://api.github.com'
Use GITHUB_TOKEN instead of BOT_PASSWORD
When using BOT_P... | <commit_before>import os
# HEADERS is deprecated, use AUTH only
HEADERS = {"Authorization": "token " + os.environ.setdefault("GITHUB_TOKEN", "")}
AUTH = (os.environ.setdefault("BOT_USERNAME", ""), os.environ.setdefault("BOT_PASSWORD", ""))
BASE_URL = 'https://api.github.com'
<commit_msg>Use GITHUB_TOKEN instead of BOT... |
4267ef9e8fc555a460b53fcfdee0f048bbdb84cf | accounts/tests/test_views.py | accounts/tests/test_views.py | """accounts app unittests for views
"""
from django.test import TestCase
from django.urls import reverse
class WelcomePageTest(TestCase):
"""Tests relating to the welcome_page view.
"""
def test_uses_welcome_template(self):
"""The root url should respond with the welcome page template.
... | """accounts app unittests for views
"""
from django.test import TestCase
from django.urls import reverse
class WelcomePageTest(TestCase):
"""Tests relating to the welcome_page view.
"""
def test_uses_welcome_template(self):
"""The root url should respond with the welcome page template.
... | Add test for denying get requests | Add test for denying get requests
| Python | mit | randomic/aniauth-tdd,randomic/aniauth-tdd | """accounts app unittests for views
"""
from django.test import TestCase
from django.urls import reverse
class WelcomePageTest(TestCase):
"""Tests relating to the welcome_page view.
"""
def test_uses_welcome_template(self):
"""The root url should respond with the welcome page template.
... | """accounts app unittests for views
"""
from django.test import TestCase
from django.urls import reverse
class WelcomePageTest(TestCase):
"""Tests relating to the welcome_page view.
"""
def test_uses_welcome_template(self):
"""The root url should respond with the welcome page template.
... | <commit_before>"""accounts app unittests for views
"""
from django.test import TestCase
from django.urls import reverse
class WelcomePageTest(TestCase):
"""Tests relating to the welcome_page view.
"""
def test_uses_welcome_template(self):
"""The root url should respond with the welcome page temp... | """accounts app unittests for views
"""
from django.test import TestCase
from django.urls import reverse
class WelcomePageTest(TestCase):
"""Tests relating to the welcome_page view.
"""
def test_uses_welcome_template(self):
"""The root url should respond with the welcome page template.
... | """accounts app unittests for views
"""
from django.test import TestCase
from django.urls import reverse
class WelcomePageTest(TestCase):
"""Tests relating to the welcome_page view.
"""
def test_uses_welcome_template(self):
"""The root url should respond with the welcome page template.
... | <commit_before>"""accounts app unittests for views
"""
from django.test import TestCase
from django.urls import reverse
class WelcomePageTest(TestCase):
"""Tests relating to the welcome_page view.
"""
def test_uses_welcome_template(self):
"""The root url should respond with the welcome page temp... |
8b7df2f297fde16525821a14755c870c290850af | salt/thorium/runner.py | salt/thorium/runner.py | # -*- coding: utf-8 -*-
'''
React by calling async runners
'''
# Import python libs
from __future__ import absolute_import, print_function, unicode_literals
# import salt libs
import salt.runner
def cmd(
name,
func=None,
arg=(),
**kwargs):
'''
Execute a runner asynchronous:
... | # -*- coding: utf-8 -*-
'''
React by calling async runners
'''
# Import python libs
from __future__ import absolute_import, print_function, unicode_literals
# import salt libs
import salt.runner
def cmd(
name,
func=None,
arg=(),
**kwargs):
'''
Execute a runner asynchronous:
... | Fix local opts from CLI | Fix local opts from CLI
| Python | apache-2.0 | saltstack/salt,saltstack/salt,saltstack/salt,saltstack/salt,saltstack/salt | # -*- coding: utf-8 -*-
'''
React by calling async runners
'''
# Import python libs
from __future__ import absolute_import, print_function, unicode_literals
# import salt libs
import salt.runner
def cmd(
name,
func=None,
arg=(),
**kwargs):
'''
Execute a runner asynchronous:
... | # -*- coding: utf-8 -*-
'''
React by calling async runners
'''
# Import python libs
from __future__ import absolute_import, print_function, unicode_literals
# import salt libs
import salt.runner
def cmd(
name,
func=None,
arg=(),
**kwargs):
'''
Execute a runner asynchronous:
... | <commit_before># -*- coding: utf-8 -*-
'''
React by calling async runners
'''
# Import python libs
from __future__ import absolute_import, print_function, unicode_literals
# import salt libs
import salt.runner
def cmd(
name,
func=None,
arg=(),
**kwargs):
'''
Execute a runner as... | # -*- coding: utf-8 -*-
'''
React by calling async runners
'''
# Import python libs
from __future__ import absolute_import, print_function, unicode_literals
# import salt libs
import salt.runner
def cmd(
name,
func=None,
arg=(),
**kwargs):
'''
Execute a runner asynchronous:
... | # -*- coding: utf-8 -*-
'''
React by calling async runners
'''
# Import python libs
from __future__ import absolute_import, print_function, unicode_literals
# import salt libs
import salt.runner
def cmd(
name,
func=None,
arg=(),
**kwargs):
'''
Execute a runner asynchronous:
... | <commit_before># -*- coding: utf-8 -*-
'''
React by calling async runners
'''
# Import python libs
from __future__ import absolute_import, print_function, unicode_literals
# import salt libs
import salt.runner
def cmd(
name,
func=None,
arg=(),
**kwargs):
'''
Execute a runner as... |
945195071418762de447dfdb8a73c386f3796e96 | backend/unichat/models/user.py | backend/unichat/models/user.py | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models
class User(models.Model):
MALE = -1
UNDEFINED = 0
FEMALE = 1
GENDER_CHOICES = (
(MALE, 'Male'),
(UNDEFINED, 'Undefined'),
(FEMALE, 'Female')
)
school = models.ForeignKey('unich... | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models
class User(models.Model):
MALE = -1
UNDEFINED = 0
FEMALE = 1
GENDER_CHOICES = (
(MALE, 'Male'),
(UNDEFINED, 'Undefined'),
(FEMALE, 'Female')
)
school = models.ForeignKey('unich... | Add password field to User model | Add password field to User model
| Python | mit | dimkarakostas/unimeet,dimkarakostas/unimeet,dimkarakostas/unimeet,dimkarakostas/unimeet | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models
class User(models.Model):
MALE = -1
UNDEFINED = 0
FEMALE = 1
GENDER_CHOICES = (
(MALE, 'Male'),
(UNDEFINED, 'Undefined'),
(FEMALE, 'Female')
)
school = models.ForeignKey('unich... | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models
class User(models.Model):
MALE = -1
UNDEFINED = 0
FEMALE = 1
GENDER_CHOICES = (
(MALE, 'Male'),
(UNDEFINED, 'Undefined'),
(FEMALE, 'Female')
)
school = models.ForeignKey('unich... | <commit_before># -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models
class User(models.Model):
MALE = -1
UNDEFINED = 0
FEMALE = 1
GENDER_CHOICES = (
(MALE, 'Male'),
(UNDEFINED, 'Undefined'),
(FEMALE, 'Female')
)
school = models.Fo... | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models
class User(models.Model):
MALE = -1
UNDEFINED = 0
FEMALE = 1
GENDER_CHOICES = (
(MALE, 'Male'),
(UNDEFINED, 'Undefined'),
(FEMALE, 'Female')
)
school = models.ForeignKey('unich... | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models
class User(models.Model):
MALE = -1
UNDEFINED = 0
FEMALE = 1
GENDER_CHOICES = (
(MALE, 'Male'),
(UNDEFINED, 'Undefined'),
(FEMALE, 'Female')
)
school = models.ForeignKey('unich... | <commit_before># -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models
class User(models.Model):
MALE = -1
UNDEFINED = 0
FEMALE = 1
GENDER_CHOICES = (
(MALE, 'Male'),
(UNDEFINED, 'Undefined'),
(FEMALE, 'Female')
)
school = models.Fo... |
9d339fa198738765a3f3a1a0202b2082c1d9919c | settings/dev.sample.py | settings/dev.sample.py | # Database
# https://docs.djangoproject.com/en/1.8/ref/settings/#databases
DEBUG = True
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.postgresql_psycopg2',
'NAME': "wye",
'USER': "",
'PASSWORD': "",
'HOST': "localhost",
'PORT': "5432",
}
}
| # Database
# https://docs.djangoproject.com/en/1.8/ref/settings/#databases
DEBUG = True
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.postgresql_psycopg2',
'NAME': "wye",
'USER': "",
'PASSWORD': "",
'HOST': "localhost",
'PORT': "5432",
}
}
# E-Mail S... | Add console as email backend | fix(settings): Add console as email backend
| Python | mit | DESHRAJ/wye,shankig/wye,shankig/wye,DESHRAJ/wye,DESHRAJ/wye,pythonindia/wye,harisibrahimkv/wye,pythonindia/wye,DESHRAJ/wye,harisibrahimkv/wye,shankisg/wye,shankisg/wye,shankisg/wye,pythonindia/wye,shankisg/wye,shankig/wye,harisibrahimkv/wye,shankig/wye,pythonindia/wye,harisibrahimkv/wye | # Database
# https://docs.djangoproject.com/en/1.8/ref/settings/#databases
DEBUG = True
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.postgresql_psycopg2',
'NAME': "wye",
'USER': "",
'PASSWORD': "",
'HOST': "localhost",
'PORT': "5432",
}
}
fix(setting... | # Database
# https://docs.djangoproject.com/en/1.8/ref/settings/#databases
DEBUG = True
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.postgresql_psycopg2',
'NAME': "wye",
'USER': "",
'PASSWORD': "",
'HOST': "localhost",
'PORT': "5432",
}
}
# E-Mail S... | <commit_before># Database
# https://docs.djangoproject.com/en/1.8/ref/settings/#databases
DEBUG = True
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.postgresql_psycopg2',
'NAME': "wye",
'USER': "",
'PASSWORD': "",
'HOST': "localhost",
'PORT': "5432",
... | # Database
# https://docs.djangoproject.com/en/1.8/ref/settings/#databases
DEBUG = True
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.postgresql_psycopg2',
'NAME': "wye",
'USER': "",
'PASSWORD': "",
'HOST': "localhost",
'PORT': "5432",
}
}
# E-Mail S... | # Database
# https://docs.djangoproject.com/en/1.8/ref/settings/#databases
DEBUG = True
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.postgresql_psycopg2',
'NAME': "wye",
'USER': "",
'PASSWORD': "",
'HOST': "localhost",
'PORT': "5432",
}
}
fix(setting... | <commit_before># Database
# https://docs.djangoproject.com/en/1.8/ref/settings/#databases
DEBUG = True
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.postgresql_psycopg2',
'NAME': "wye",
'USER': "",
'PASSWORD': "",
'HOST': "localhost",
'PORT': "5432",
... |
f8ea4266082fba1210be270d6ae7607717591978 | skimage/io/__init__.py | skimage/io/__init__.py | """Utilities to read and write images in various formats.
The following plug-ins are available:
"""
from ._plugins import *
from .sift import *
from .collection import *
from ._io import *
from ._image_stack import *
from .video import *
reset_plugins()
def _update_doc(doc):
"""Add a list of plugins to the ... | """Utilities to read and write images in various formats.
The following plug-ins are available:
"""
from ._plugins import *
from .sift import *
from .collection import *
from ._io import *
from ._image_stack import *
from .video import *
reset_plugins()
WRAP_LEN = 73
def _separator(char, lengths):
return [... | Refactor io doc building code | Refactor io doc building code
| Python | bsd-3-clause | youprofit/scikit-image,ofgulban/scikit-image,Hiyorimi/scikit-image,ofgulban/scikit-image,pratapvardhan/scikit-image,chintak/scikit-image,WarrenWeckesser/scikits-image,blink1073/scikit-image,SamHames/scikit-image,bsipocz/scikit-image,chriscrosscutler/scikit-image,vighneshbirodkar/scikit-image,dpshelio/scikit-image,Midaf... | """Utilities to read and write images in various formats.
The following plug-ins are available:
"""
from ._plugins import *
from .sift import *
from .collection import *
from ._io import *
from ._image_stack import *
from .video import *
reset_plugins()
def _update_doc(doc):
"""Add a list of plugins to the ... | """Utilities to read and write images in various formats.
The following plug-ins are available:
"""
from ._plugins import *
from .sift import *
from .collection import *
from ._io import *
from ._image_stack import *
from .video import *
reset_plugins()
WRAP_LEN = 73
def _separator(char, lengths):
return [... | <commit_before>"""Utilities to read and write images in various formats.
The following plug-ins are available:
"""
from ._plugins import *
from .sift import *
from .collection import *
from ._io import *
from ._image_stack import *
from .video import *
reset_plugins()
def _update_doc(doc):
"""Add a list of ... | """Utilities to read and write images in various formats.
The following plug-ins are available:
"""
from ._plugins import *
from .sift import *
from .collection import *
from ._io import *
from ._image_stack import *
from .video import *
reset_plugins()
WRAP_LEN = 73
def _separator(char, lengths):
return [... | """Utilities to read and write images in various formats.
The following plug-ins are available:
"""
from ._plugins import *
from .sift import *
from .collection import *
from ._io import *
from ._image_stack import *
from .video import *
reset_plugins()
def _update_doc(doc):
"""Add a list of plugins to the ... | <commit_before>"""Utilities to read and write images in various formats.
The following plug-ins are available:
"""
from ._plugins import *
from .sift import *
from .collection import *
from ._io import *
from ._image_stack import *
from .video import *
reset_plugins()
def _update_doc(doc):
"""Add a list of ... |
e31790412c9e869841b448f3e7f8bb4a965da81d | mygpo/web/templatetags/devices.py | mygpo/web/templatetags/devices.py | from django import template
from django.utils.safestring import mark_safe
from django.utils.translation import ugettext as _
from mygpo.api.models import DEVICE_TYPES
register = template.Library()
# Create a dictionary of device_type -> caption mappings
DEVICE_TYPES_DICT = dict(DEVICE_TYPES)
# This dictionary maps ... | from django import template
from django.utils.safestring import mark_safe
from django.utils.translation import ugettext as _
from mygpo.api.models import DEVICE_TYPES
register = template.Library()
# Create a dictionary of device_type -> caption mappings
DEVICE_TYPES_DICT = dict(DEVICE_TYPES)
# This dictionary maps ... | Fix problem with device icons | Fix problem with device icons
| Python | agpl-3.0 | gpodder/mygpo,gpodder/mygpo,gpodder/mygpo,gpodder/mygpo | from django import template
from django.utils.safestring import mark_safe
from django.utils.translation import ugettext as _
from mygpo.api.models import DEVICE_TYPES
register = template.Library()
# Create a dictionary of device_type -> caption mappings
DEVICE_TYPES_DICT = dict(DEVICE_TYPES)
# This dictionary maps ... | from django import template
from django.utils.safestring import mark_safe
from django.utils.translation import ugettext as _
from mygpo.api.models import DEVICE_TYPES
register = template.Library()
# Create a dictionary of device_type -> caption mappings
DEVICE_TYPES_DICT = dict(DEVICE_TYPES)
# This dictionary maps ... | <commit_before>from django import template
from django.utils.safestring import mark_safe
from django.utils.translation import ugettext as _
from mygpo.api.models import DEVICE_TYPES
register = template.Library()
# Create a dictionary of device_type -> caption mappings
DEVICE_TYPES_DICT = dict(DEVICE_TYPES)
# This d... | from django import template
from django.utils.safestring import mark_safe
from django.utils.translation import ugettext as _
from mygpo.api.models import DEVICE_TYPES
register = template.Library()
# Create a dictionary of device_type -> caption mappings
DEVICE_TYPES_DICT = dict(DEVICE_TYPES)
# This dictionary maps ... | from django import template
from django.utils.safestring import mark_safe
from django.utils.translation import ugettext as _
from mygpo.api.models import DEVICE_TYPES
register = template.Library()
# Create a dictionary of device_type -> caption mappings
DEVICE_TYPES_DICT = dict(DEVICE_TYPES)
# This dictionary maps ... | <commit_before>from django import template
from django.utils.safestring import mark_safe
from django.utils.translation import ugettext as _
from mygpo.api.models import DEVICE_TYPES
register = template.Library()
# Create a dictionary of device_type -> caption mappings
DEVICE_TYPES_DICT = dict(DEVICE_TYPES)
# This d... |
362d60b4ab982efa96a0ef255f5de97b80c0b569 | skan/test/test_pipe.py | skan/test/test_pipe.py | import os
import pytest
import pandas
from skan import pipe
@pytest.fixture
def image_filename():
rundir = os.path.abspath(os.path.dirname(__file__))
datadir = os.path.join(rundir, 'data')
return os.path.join(datadir, 'retic.tif')
def test_pipe(image_filename):
data = pipe.process_images([image_file... | import os
import pytest
import tempfile
import pandas
from skan import pipe
@pytest.fixture
def image_filename():
rundir = os.path.abspath(os.path.dirname(__file__))
datadir = os.path.join(rundir, 'data')
return os.path.join(datadir, 'retic.tif')
def test_pipe(image_filename):
data = pipe.process_im... | Add test for saving skeleton image | Add test for saving skeleton image
| Python | bsd-3-clause | jni/skan | import os
import pytest
import pandas
from skan import pipe
@pytest.fixture
def image_filename():
rundir = os.path.abspath(os.path.dirname(__file__))
datadir = os.path.join(rundir, 'data')
return os.path.join(datadir, 'retic.tif')
def test_pipe(image_filename):
data = pipe.process_images([image_file... | import os
import pytest
import tempfile
import pandas
from skan import pipe
@pytest.fixture
def image_filename():
rundir = os.path.abspath(os.path.dirname(__file__))
datadir = os.path.join(rundir, 'data')
return os.path.join(datadir, 'retic.tif')
def test_pipe(image_filename):
data = pipe.process_im... | <commit_before>import os
import pytest
import pandas
from skan import pipe
@pytest.fixture
def image_filename():
rundir = os.path.abspath(os.path.dirname(__file__))
datadir = os.path.join(rundir, 'data')
return os.path.join(datadir, 'retic.tif')
def test_pipe(image_filename):
data = pipe.process_ima... | import os
import pytest
import tempfile
import pandas
from skan import pipe
@pytest.fixture
def image_filename():
rundir = os.path.abspath(os.path.dirname(__file__))
datadir = os.path.join(rundir, 'data')
return os.path.join(datadir, 'retic.tif')
def test_pipe(image_filename):
data = pipe.process_im... | import os
import pytest
import pandas
from skan import pipe
@pytest.fixture
def image_filename():
rundir = os.path.abspath(os.path.dirname(__file__))
datadir = os.path.join(rundir, 'data')
return os.path.join(datadir, 'retic.tif')
def test_pipe(image_filename):
data = pipe.process_images([image_file... | <commit_before>import os
import pytest
import pandas
from skan import pipe
@pytest.fixture
def image_filename():
rundir = os.path.abspath(os.path.dirname(__file__))
datadir = os.path.join(rundir, 'data')
return os.path.join(datadir, 'retic.tif')
def test_pipe(image_filename):
data = pipe.process_ima... |
ada3d309541daaa8591a6bcb6ec42a2a2ff468db | catsnap/worker/tasks.py | catsnap/worker/tasks.py | from __future__ import unicode_literals, absolute_import
from boto.cloudfront.exception import CloudFrontServerError
from catsnap.worker import worker
from catsnap import Client
class Invalidate(worker.Task):
def run(self, filename):
config = Client().config()
try:
distro_id = config['... | from __future__ import unicode_literals, absolute_import
from boto.cloudfront.exception import CloudFrontServerError
from catsnap.worker import worker
from catsnap import Client
class Invalidate(worker.Task):
def run(self, filename):
config = Client().config()
try:
distro_id = config['... | Remove a line of debug output | Remove a line of debug output
| Python | mit | ErinCall/catsnap,ErinCall/catsnap,ErinCall/catsnap | from __future__ import unicode_literals, absolute_import
from boto.cloudfront.exception import CloudFrontServerError
from catsnap.worker import worker
from catsnap import Client
class Invalidate(worker.Task):
def run(self, filename):
config = Client().config()
try:
distro_id = config['... | from __future__ import unicode_literals, absolute_import
from boto.cloudfront.exception import CloudFrontServerError
from catsnap.worker import worker
from catsnap import Client
class Invalidate(worker.Task):
def run(self, filename):
config = Client().config()
try:
distro_id = config['... | <commit_before>from __future__ import unicode_literals, absolute_import
from boto.cloudfront.exception import CloudFrontServerError
from catsnap.worker import worker
from catsnap import Client
class Invalidate(worker.Task):
def run(self, filename):
config = Client().config()
try:
distr... | from __future__ import unicode_literals, absolute_import
from boto.cloudfront.exception import CloudFrontServerError
from catsnap.worker import worker
from catsnap import Client
class Invalidate(worker.Task):
def run(self, filename):
config = Client().config()
try:
distro_id = config['... | from __future__ import unicode_literals, absolute_import
from boto.cloudfront.exception import CloudFrontServerError
from catsnap.worker import worker
from catsnap import Client
class Invalidate(worker.Task):
def run(self, filename):
config = Client().config()
try:
distro_id = config['... | <commit_before>from __future__ import unicode_literals, absolute_import
from boto.cloudfront.exception import CloudFrontServerError
from catsnap.worker import worker
from catsnap import Client
class Invalidate(worker.Task):
def run(self, filename):
config = Client().config()
try:
distr... |
cc71d25b85d991801f2dc980ad37aa7bdbe7e2f3 | ocradmin/lib/nodetree/registry.py | ocradmin/lib/nodetree/registry.py | """
Registry class and global node registry.
"""
import inspect
class NotRegistered(KeyError):
pass
class NodeRegistry(dict):
NotRegistered = NotRegistered
def register(self, node):
"""Register a node class in the node registry."""
self[node.name] = inspect.isclass(node) and node or nod... | """
Registry class and global node registry.
This class was adapted from the Celery Project's task registry.
"""
import inspect
class NotRegistered(KeyError):
pass
class NodeRegistry(dict):
NotRegistered = NotRegistered
def register(self, node):
"""Register a node class in the node registry.""... | Add a note acknowledging the source of this class | Add a note acknowledging the source of this class
| Python | apache-2.0 | vitorio/ocropodium,vitorio/ocropodium,vitorio/ocropodium,vitorio/ocropodium | """
Registry class and global node registry.
"""
import inspect
class NotRegistered(KeyError):
pass
class NodeRegistry(dict):
NotRegistered = NotRegistered
def register(self, node):
"""Register a node class in the node registry."""
self[node.name] = inspect.isclass(node) and node or nod... | """
Registry class and global node registry.
This class was adapted from the Celery Project's task registry.
"""
import inspect
class NotRegistered(KeyError):
pass
class NodeRegistry(dict):
NotRegistered = NotRegistered
def register(self, node):
"""Register a node class in the node registry.""... | <commit_before>"""
Registry class and global node registry.
"""
import inspect
class NotRegistered(KeyError):
pass
class NodeRegistry(dict):
NotRegistered = NotRegistered
def register(self, node):
"""Register a node class in the node registry."""
self[node.name] = inspect.isclass(node) ... | """
Registry class and global node registry.
This class was adapted from the Celery Project's task registry.
"""
import inspect
class NotRegistered(KeyError):
pass
class NodeRegistry(dict):
NotRegistered = NotRegistered
def register(self, node):
"""Register a node class in the node registry.""... | """
Registry class and global node registry.
"""
import inspect
class NotRegistered(KeyError):
pass
class NodeRegistry(dict):
NotRegistered = NotRegistered
def register(self, node):
"""Register a node class in the node registry."""
self[node.name] = inspect.isclass(node) and node or nod... | <commit_before>"""
Registry class and global node registry.
"""
import inspect
class NotRegistered(KeyError):
pass
class NodeRegistry(dict):
NotRegistered = NotRegistered
def register(self, node):
"""Register a node class in the node registry."""
self[node.name] = inspect.isclass(node) ... |
58102d86c5c6165cc32f3f4f303cca2b0bc516f7 | dimod/package_info.py | dimod/package_info.py | # Copyright 2018 D-Wave Systems Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or... | # Copyright 2018 D-Wave Systems Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or... | Update version 0.7.0 -> 0.7.1 | Update version 0.7.0 -> 0.7.1 | Python | apache-2.0 | dwavesystems/dimod,dwavesystems/dimod | # Copyright 2018 D-Wave Systems Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or... | # Copyright 2018 D-Wave Systems Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or... | <commit_before># Copyright 2018 D-Wave Systems Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by ap... | # Copyright 2018 D-Wave Systems Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or... | # Copyright 2018 D-Wave Systems Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or... | <commit_before># Copyright 2018 D-Wave Systems Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by ap... |
279a7dfcdd854999d490164da3dc3790430e639a | membership/management/commands/public_memberlist.py | membership/management/commands/public_memberlist.py | # -*- encoding: utf-8 -*-
from django.db.models import Q
from django.core.management.base import NoArgsCommand
from django.template.loader import render_to_string
from django.conf import settings
from membership.models import *
from membership.public_memberlist import public_memberlist_data
class Command(NoArgsComma... | # -*- encoding: utf-8 -*-
from django.db.models import Q
from django.core.management.base import NoArgsCommand
from django.template.loader import render_to_string
from django.conf import settings
from membership.models import *
from membership.public_memberlist import public_memberlist_data
class Command(NoArgsComma... | Fix UnicodeDecodeError: Return text string, not bytes | Fix UnicodeDecodeError: Return text string, not bytes
| Python | mit | kapsiry/sikteeri,AriMartti/sikteeri,kapsiry/sikteeri,kapsiry/sikteeri,annttu/sikteeri,joneskoo/sikteeri,annttu/sikteeri,AriMartti/sikteeri,kapsiry/sikteeri,joneskoo/sikteeri,AriMartti/sikteeri,annttu/sikteeri,joneskoo/sikteeri,annttu/sikteeri,AriMartti/sikteeri,joneskoo/sikteeri | # -*- encoding: utf-8 -*-
from django.db.models import Q
from django.core.management.base import NoArgsCommand
from django.template.loader import render_to_string
from django.conf import settings
from membership.models import *
from membership.public_memberlist import public_memberlist_data
class Command(NoArgsComma... | # -*- encoding: utf-8 -*-
from django.db.models import Q
from django.core.management.base import NoArgsCommand
from django.template.loader import render_to_string
from django.conf import settings
from membership.models import *
from membership.public_memberlist import public_memberlist_data
class Command(NoArgsComma... | <commit_before># -*- encoding: utf-8 -*-
from django.db.models import Q
from django.core.management.base import NoArgsCommand
from django.template.loader import render_to_string
from django.conf import settings
from membership.models import *
from membership.public_memberlist import public_memberlist_data
class Comm... | # -*- encoding: utf-8 -*-
from django.db.models import Q
from django.core.management.base import NoArgsCommand
from django.template.loader import render_to_string
from django.conf import settings
from membership.models import *
from membership.public_memberlist import public_memberlist_data
class Command(NoArgsComma... | # -*- encoding: utf-8 -*-
from django.db.models import Q
from django.core.management.base import NoArgsCommand
from django.template.loader import render_to_string
from django.conf import settings
from membership.models import *
from membership.public_memberlist import public_memberlist_data
class Command(NoArgsComma... | <commit_before># -*- encoding: utf-8 -*-
from django.db.models import Q
from django.core.management.base import NoArgsCommand
from django.template.loader import render_to_string
from django.conf import settings
from membership.models import *
from membership.public_memberlist import public_memberlist_data
class Comm... |
763939db37e3b9f93f1201aada4e893bbe478249 | 17-createWallOfWoolWithRandomColour.py | 17-createWallOfWoolWithRandomColour.py | #import the needed modules fo communication with minecraft world
from mcpi.minecraft import *
# import needed block defintiions
from mcpi.block import *
# needed to slow down the wall building
from time import sleep
# needed to generate a random number for the colour of wool
from random import randint
if __name__ == "... | #import the needed modules fo communication with minecraft world
from mcpi.minecraft import *
# import needed block defintiions
from mcpi.block import WOOL
# needed to slow down the wall building
from time import sleep
# needed to generate a random number for the colour of wool
from random import randint
# create a fu... | Change to use function for block generation | Change to use function for block generation
Use a separate function for random block generation
move code from loop to the function
| Python | bsd-3-clause | hashbangstudio/Python-Minecraft-Examples | #import the needed modules fo communication with minecraft world
from mcpi.minecraft import *
# import needed block defintiions
from mcpi.block import *
# needed to slow down the wall building
from time import sleep
# needed to generate a random number for the colour of wool
from random import randint
if __name__ == "... | #import the needed modules fo communication with minecraft world
from mcpi.minecraft import *
# import needed block defintiions
from mcpi.block import WOOL
# needed to slow down the wall building
from time import sleep
# needed to generate a random number for the colour of wool
from random import randint
# create a fu... | <commit_before>#import the needed modules fo communication with minecraft world
from mcpi.minecraft import *
# import needed block defintiions
from mcpi.block import *
# needed to slow down the wall building
from time import sleep
# needed to generate a random number for the colour of wool
from random import randint
i... | #import the needed modules fo communication with minecraft world
from mcpi.minecraft import *
# import needed block defintiions
from mcpi.block import WOOL
# needed to slow down the wall building
from time import sleep
# needed to generate a random number for the colour of wool
from random import randint
# create a fu... | #import the needed modules fo communication with minecraft world
from mcpi.minecraft import *
# import needed block defintiions
from mcpi.block import *
# needed to slow down the wall building
from time import sleep
# needed to generate a random number for the colour of wool
from random import randint
if __name__ == "... | <commit_before>#import the needed modules fo communication with minecraft world
from mcpi.minecraft import *
# import needed block defintiions
from mcpi.block import *
# needed to slow down the wall building
from time import sleep
# needed to generate a random number for the colour of wool
from random import randint
i... |
1b95969110f97af397cb3314b59c30679911da48 | scripts/scrape-cdc-state-case-counts.py | scripts/scrape-cdc-state-case-counts.py | #!/usr/bin/env python
import requests
import lxml.html
import pandas as pd
import sys
URL = "http://www.cdc.gov/zika/geo/united-states.html"
INT_COLS = [ "travel_associated_cases", "locally_acquired_cases" ]
COLS = [ "state_or_territory" ] + INT_COLS
def scrape():
html = requests.get(URL).content
dom = lxml.... | #!/usr/bin/env python
import requests
import lxml.html
import pandas as pd
import re
import sys
URL = "http://www.cdc.gov/zika/geo/united-states.html"
INT_COLS = [ "travel_associated_cases", "locally_acquired_cases" ]
COLS = [ "state_or_territory" ] + INT_COLS
paren_pat = re.compile(r"\([^\)]+\)")
def parse_cell(t... | Update CDC scraper to handle new format | Update CDC scraper to handle new format
| Python | mit | BuzzFeedNews/zika-data | #!/usr/bin/env python
import requests
import lxml.html
import pandas as pd
import sys
URL = "http://www.cdc.gov/zika/geo/united-states.html"
INT_COLS = [ "travel_associated_cases", "locally_acquired_cases" ]
COLS = [ "state_or_territory" ] + INT_COLS
def scrape():
html = requests.get(URL).content
dom = lxml.... | #!/usr/bin/env python
import requests
import lxml.html
import pandas as pd
import re
import sys
URL = "http://www.cdc.gov/zika/geo/united-states.html"
INT_COLS = [ "travel_associated_cases", "locally_acquired_cases" ]
COLS = [ "state_or_territory" ] + INT_COLS
paren_pat = re.compile(r"\([^\)]+\)")
def parse_cell(t... | <commit_before>#!/usr/bin/env python
import requests
import lxml.html
import pandas as pd
import sys
URL = "http://www.cdc.gov/zika/geo/united-states.html"
INT_COLS = [ "travel_associated_cases", "locally_acquired_cases" ]
COLS = [ "state_or_territory" ] + INT_COLS
def scrape():
html = requests.get(URL).content
... | #!/usr/bin/env python
import requests
import lxml.html
import pandas as pd
import re
import sys
URL = "http://www.cdc.gov/zika/geo/united-states.html"
INT_COLS = [ "travel_associated_cases", "locally_acquired_cases" ]
COLS = [ "state_or_territory" ] + INT_COLS
paren_pat = re.compile(r"\([^\)]+\)")
def parse_cell(t... | #!/usr/bin/env python
import requests
import lxml.html
import pandas as pd
import sys
URL = "http://www.cdc.gov/zika/geo/united-states.html"
INT_COLS = [ "travel_associated_cases", "locally_acquired_cases" ]
COLS = [ "state_or_territory" ] + INT_COLS
def scrape():
html = requests.get(URL).content
dom = lxml.... | <commit_before>#!/usr/bin/env python
import requests
import lxml.html
import pandas as pd
import sys
URL = "http://www.cdc.gov/zika/geo/united-states.html"
INT_COLS = [ "travel_associated_cases", "locally_acquired_cases" ]
COLS = [ "state_or_territory" ] + INT_COLS
def scrape():
html = requests.get(URL).content
... |
697d30430fa908c6e2baf88285f0a464993d6636 | formapi/compat.py | formapi/compat.py | # coding=utf-8
# flake8: noqa
import sys
if sys.version_info[0] == 3:
from django.utils.encoding import smart_bytes as smart_b, force_str as force_u, smart_text as smart_u
# noinspection PyUnresolvedReferences
from urllib.parse import quote
ifilter = filter
b_str = bytes
u_str = str
iterite... | # coding=utf-8
# flake8: noqa
import sys
if sys.version_info[0] == 3:
from django.utils.encoding import smart_bytes as smart_b, force_str as force_u, smart_text as smart_u
# noinspection PyUnresolvedReferences
from urllib.parse import quote
ifilter = filter
b_str = bytes
u_str = str
iterite... | Fix smart_u for Django 1.3 | Fix smart_u for Django 1.3 | Python | mit | 5monkeys/django-formapi,andreif/django-formapi,5monkeys/django-formapi,andreif/django-formapi | # coding=utf-8
# flake8: noqa
import sys
if sys.version_info[0] == 3:
from django.utils.encoding import smart_bytes as smart_b, force_str as force_u, smart_text as smart_u
# noinspection PyUnresolvedReferences
from urllib.parse import quote
ifilter = filter
b_str = bytes
u_str = str
iterite... | # coding=utf-8
# flake8: noqa
import sys
if sys.version_info[0] == 3:
from django.utils.encoding import smart_bytes as smart_b, force_str as force_u, smart_text as smart_u
# noinspection PyUnresolvedReferences
from urllib.parse import quote
ifilter = filter
b_str = bytes
u_str = str
iterite... | <commit_before># coding=utf-8
# flake8: noqa
import sys
if sys.version_info[0] == 3:
from django.utils.encoding import smart_bytes as smart_b, force_str as force_u, smart_text as smart_u
# noinspection PyUnresolvedReferences
from urllib.parse import quote
ifilter = filter
b_str = bytes
u_str = ... | # coding=utf-8
# flake8: noqa
import sys
if sys.version_info[0] == 3:
from django.utils.encoding import smart_bytes as smart_b, force_str as force_u, smart_text as smart_u
# noinspection PyUnresolvedReferences
from urllib.parse import quote
ifilter = filter
b_str = bytes
u_str = str
iterite... | # coding=utf-8
# flake8: noqa
import sys
if sys.version_info[0] == 3:
from django.utils.encoding import smart_bytes as smart_b, force_str as force_u, smart_text as smart_u
# noinspection PyUnresolvedReferences
from urllib.parse import quote
ifilter = filter
b_str = bytes
u_str = str
iterite... | <commit_before># coding=utf-8
# flake8: noqa
import sys
if sys.version_info[0] == 3:
from django.utils.encoding import smart_bytes as smart_b, force_str as force_u, smart_text as smart_u
# noinspection PyUnresolvedReferences
from urllib.parse import quote
ifilter = filter
b_str = bytes
u_str = ... |
d3e13351c514581a5460097624f82aa696398f78 | iamhhb/views.py | iamhhb/views.py | from django.shortcuts import render
from django.contrib import admin, auth
# We don't need a user management
admin.site.unregister(auth.models.User)
admin.site.unregister(auth.models.Group)
def index(request):
return render(request, 'index.html')
def about_me(request):
return render(request, 'about-me.html... | from django.shortcuts import render
from django.contrib import admin, auth
# We don't need a user management
admin.site.unregister(auth.models.User)
admin.site.unregister(auth.models.Group)
def index(request):
return render(request, 'index.html')
def about_me(request):
return render(request, 'about-me.html... | Add travis-ci to `powerd by` page. | Add travis-ci to `powerd by` page.
| Python | mit | graycarl/iamhhb,graycarl/iamhhb,graycarl/iamhhb,graycarl/iamhhb | from django.shortcuts import render
from django.contrib import admin, auth
# We don't need a user management
admin.site.unregister(auth.models.User)
admin.site.unregister(auth.models.Group)
def index(request):
return render(request, 'index.html')
def about_me(request):
return render(request, 'about-me.html... | from django.shortcuts import render
from django.contrib import admin, auth
# We don't need a user management
admin.site.unregister(auth.models.User)
admin.site.unregister(auth.models.Group)
def index(request):
return render(request, 'index.html')
def about_me(request):
return render(request, 'about-me.html... | <commit_before>from django.shortcuts import render
from django.contrib import admin, auth
# We don't need a user management
admin.site.unregister(auth.models.User)
admin.site.unregister(auth.models.Group)
def index(request):
return render(request, 'index.html')
def about_me(request):
return render(request,... | from django.shortcuts import render
from django.contrib import admin, auth
# We don't need a user management
admin.site.unregister(auth.models.User)
admin.site.unregister(auth.models.Group)
def index(request):
return render(request, 'index.html')
def about_me(request):
return render(request, 'about-me.html... | from django.shortcuts import render
from django.contrib import admin, auth
# We don't need a user management
admin.site.unregister(auth.models.User)
admin.site.unregister(auth.models.Group)
def index(request):
return render(request, 'index.html')
def about_me(request):
return render(request, 'about-me.html... | <commit_before>from django.shortcuts import render
from django.contrib import admin, auth
# We don't need a user management
admin.site.unregister(auth.models.User)
admin.site.unregister(auth.models.Group)
def index(request):
return render(request, 'index.html')
def about_me(request):
return render(request,... |
b011ccf5c4ce5f93c7b02f938385432325012569 | tt/core/tt.py | tt/core/tt.py | # Here we import all necessary staff from external files
# tools
from .tools import matvec, col, kron, dot, mkron, concatenate, sum, reshape
from .tools import eye, diag, Toeplitz, qshift, qlaplace_dd, IpaS
from .tools import ones, rand, linspace, sin, cos, delta, stepfun, unit, xfun
# main classes
from .matrix impor... | # Here we import all necessary staff from external files
# main classes
from .matrix import matrix
from .vector import vector, tensor
# tools
from .tools import matvec, col, kron, dot, mkron, concatenate, sum, reshape
from .tools import eye, diag, Toeplitz, qshift, qlaplace_dd, IpaS
from .tools import ones, rand, li... | Revert "Import order changed to break tools dependency" | Revert "Import order changed to break tools dependency"
This reverts commit 3a75fd530b1ecb9e6466ac99532d06032ae3a049.
| Python | mit | uranix/ttpy,uranix/ttpy | # Here we import all necessary staff from external files
# tools
from .tools import matvec, col, kron, dot, mkron, concatenate, sum, reshape
from .tools import eye, diag, Toeplitz, qshift, qlaplace_dd, IpaS
from .tools import ones, rand, linspace, sin, cos, delta, stepfun, unit, xfun
# main classes
from .matrix impor... | # Here we import all necessary staff from external files
# main classes
from .matrix import matrix
from .vector import vector, tensor
# tools
from .tools import matvec, col, kron, dot, mkron, concatenate, sum, reshape
from .tools import eye, diag, Toeplitz, qshift, qlaplace_dd, IpaS
from .tools import ones, rand, li... | <commit_before># Here we import all necessary staff from external files
# tools
from .tools import matvec, col, kron, dot, mkron, concatenate, sum, reshape
from .tools import eye, diag, Toeplitz, qshift, qlaplace_dd, IpaS
from .tools import ones, rand, linspace, sin, cos, delta, stepfun, unit, xfun
# main classes
fro... | # Here we import all necessary staff from external files
# main classes
from .matrix import matrix
from .vector import vector, tensor
# tools
from .tools import matvec, col, kron, dot, mkron, concatenate, sum, reshape
from .tools import eye, diag, Toeplitz, qshift, qlaplace_dd, IpaS
from .tools import ones, rand, li... | # Here we import all necessary staff from external files
# tools
from .tools import matvec, col, kron, dot, mkron, concatenate, sum, reshape
from .tools import eye, diag, Toeplitz, qshift, qlaplace_dd, IpaS
from .tools import ones, rand, linspace, sin, cos, delta, stepfun, unit, xfun
# main classes
from .matrix impor... | <commit_before># Here we import all necessary staff from external files
# tools
from .tools import matvec, col, kron, dot, mkron, concatenate, sum, reshape
from .tools import eye, diag, Toeplitz, qshift, qlaplace_dd, IpaS
from .tools import ones, rand, linspace, sin, cos, delta, stepfun, unit, xfun
# main classes
fro... |
59fb7b9d1078a7b0199b9613a523f3d2fce80c13 | pombola_sayit/models.py | pombola_sayit/models.py | from django.db import models
from pombola.core.models import Person
from speeches.models import Speaker
from south.modelsinspector import add_introspection_rules
add_introspection_rules([], ["^instances\.fields\.DNSLabelField"])
class PombolaSayItJoin(models.Model):
"""This model provides a join table between ... | from django.db import models
from pombola.core.models import Person
from speeches.models import Speaker
class PombolaSayItJoin(models.Model):
"""This model provides a join table between Pombola and SsayIt people"""
pombola_person = models.OneToOneField(Person, related_name='sayit_link')
sayit_speaker =... | Remove the last reference to South - it can be pip uninstalled now | Remove the last reference to South - it can be pip uninstalled now
| Python | agpl-3.0 | mysociety/pombola,mysociety/pombola,mysociety/pombola,mysociety/pombola,mysociety/pombola,mysociety/pombola | from django.db import models
from pombola.core.models import Person
from speeches.models import Speaker
from south.modelsinspector import add_introspection_rules
add_introspection_rules([], ["^instances\.fields\.DNSLabelField"])
class PombolaSayItJoin(models.Model):
"""This model provides a join table between ... | from django.db import models
from pombola.core.models import Person
from speeches.models import Speaker
class PombolaSayItJoin(models.Model):
"""This model provides a join table between Pombola and SsayIt people"""
pombola_person = models.OneToOneField(Person, related_name='sayit_link')
sayit_speaker =... | <commit_before>from django.db import models
from pombola.core.models import Person
from speeches.models import Speaker
from south.modelsinspector import add_introspection_rules
add_introspection_rules([], ["^instances\.fields\.DNSLabelField"])
class PombolaSayItJoin(models.Model):
"""This model provides a join... | from django.db import models
from pombola.core.models import Person
from speeches.models import Speaker
class PombolaSayItJoin(models.Model):
"""This model provides a join table between Pombola and SsayIt people"""
pombola_person = models.OneToOneField(Person, related_name='sayit_link')
sayit_speaker =... | from django.db import models
from pombola.core.models import Person
from speeches.models import Speaker
from south.modelsinspector import add_introspection_rules
add_introspection_rules([], ["^instances\.fields\.DNSLabelField"])
class PombolaSayItJoin(models.Model):
"""This model provides a join table between ... | <commit_before>from django.db import models
from pombola.core.models import Person
from speeches.models import Speaker
from south.modelsinspector import add_introspection_rules
add_introspection_rules([], ["^instances\.fields\.DNSLabelField"])
class PombolaSayItJoin(models.Model):
"""This model provides a join... |
e73e237a5c712aea9866168c8bb0fb7c56c21d90 | gpytorch/kernels/white_noise_kernel.py | gpytorch/kernels/white_noise_kernel.py | import torch
from . import Kernel
from gpytorch.lazy import DiagLazyVariable, ZeroLazyVariable
class WhiteNoiseKernel(Kernel):
def __init__(self, variances):
super(WhiteNoiseKernel, self).__init__()
self.register_buffer("variances", variances)
def forward(self, x1, x2):
if self.traini... | from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from __future__ import unicode_literals
import torch
from . import Kernel
from gpytorch.lazy import DiagLazyVariable, ZeroLazyVariable
class WhiteNoiseKernel(Kernel):
def __init__(self, variances):
... | Add missing py2py3 compatibility imports | Add missing py2py3 compatibility imports
| Python | mit | jrg365/gpytorch,jrg365/gpytorch,jrg365/gpytorch | import torch
from . import Kernel
from gpytorch.lazy import DiagLazyVariable, ZeroLazyVariable
class WhiteNoiseKernel(Kernel):
def __init__(self, variances):
super(WhiteNoiseKernel, self).__init__()
self.register_buffer("variances", variances)
def forward(self, x1, x2):
if self.traini... | from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from __future__ import unicode_literals
import torch
from . import Kernel
from gpytorch.lazy import DiagLazyVariable, ZeroLazyVariable
class WhiteNoiseKernel(Kernel):
def __init__(self, variances):
... | <commit_before>import torch
from . import Kernel
from gpytorch.lazy import DiagLazyVariable, ZeroLazyVariable
class WhiteNoiseKernel(Kernel):
def __init__(self, variances):
super(WhiteNoiseKernel, self).__init__()
self.register_buffer("variances", variances)
def forward(self, x1, x2):
... | from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from __future__ import unicode_literals
import torch
from . import Kernel
from gpytorch.lazy import DiagLazyVariable, ZeroLazyVariable
class WhiteNoiseKernel(Kernel):
def __init__(self, variances):
... | import torch
from . import Kernel
from gpytorch.lazy import DiagLazyVariable, ZeroLazyVariable
class WhiteNoiseKernel(Kernel):
def __init__(self, variances):
super(WhiteNoiseKernel, self).__init__()
self.register_buffer("variances", variances)
def forward(self, x1, x2):
if self.traini... | <commit_before>import torch
from . import Kernel
from gpytorch.lazy import DiagLazyVariable, ZeroLazyVariable
class WhiteNoiseKernel(Kernel):
def __init__(self, variances):
super(WhiteNoiseKernel, self).__init__()
self.register_buffer("variances", variances)
def forward(self, x1, x2):
... |
20d7c4113a96c92f8353761da2c2a00ed7a35e0e | gym_ple/__init__.py | gym_ple/__init__.py | from gym.envs.registration import registry, register, make, spec
from gym_ple.ple_env import PLEEnv
# Pygame
# ----------------------------------------
for game in ['Catcher', 'MonsterKong', 'FlappyBird', 'PixelCopter', 'PuckWorld', 'RaycastMaze', 'Snake', 'WaterWorld']:
nondeterministic = False
register(
... | from gym.envs.registration import registry, register, make, spec
from gym_ple.ple_env import PLEEnv
# Pygame
# ----------------------------------------
for game in ['Catcher', 'MonsterKong', 'FlappyBird', 'PixelCopter', 'PuckWorld', 'RaycastMaze', 'Snake', 'WaterWorld']:
nondeterministic = False
register(
... | Replace the timestep_limit call with the new tags api. | Replace the timestep_limit call with the new tags api.
| Python | mit | lusob/gym-ple | from gym.envs.registration import registry, register, make, spec
from gym_ple.ple_env import PLEEnv
# Pygame
# ----------------------------------------
for game in ['Catcher', 'MonsterKong', 'FlappyBird', 'PixelCopter', 'PuckWorld', 'RaycastMaze', 'Snake', 'WaterWorld']:
nondeterministic = False
register(
... | from gym.envs.registration import registry, register, make, spec
from gym_ple.ple_env import PLEEnv
# Pygame
# ----------------------------------------
for game in ['Catcher', 'MonsterKong', 'FlappyBird', 'PixelCopter', 'PuckWorld', 'RaycastMaze', 'Snake', 'WaterWorld']:
nondeterministic = False
register(
... | <commit_before>from gym.envs.registration import registry, register, make, spec
from gym_ple.ple_env import PLEEnv
# Pygame
# ----------------------------------------
for game in ['Catcher', 'MonsterKong', 'FlappyBird', 'PixelCopter', 'PuckWorld', 'RaycastMaze', 'Snake', 'WaterWorld']:
nondeterministic = False
... | from gym.envs.registration import registry, register, make, spec
from gym_ple.ple_env import PLEEnv
# Pygame
# ----------------------------------------
for game in ['Catcher', 'MonsterKong', 'FlappyBird', 'PixelCopter', 'PuckWorld', 'RaycastMaze', 'Snake', 'WaterWorld']:
nondeterministic = False
register(
... | from gym.envs.registration import registry, register, make, spec
from gym_ple.ple_env import PLEEnv
# Pygame
# ----------------------------------------
for game in ['Catcher', 'MonsterKong', 'FlappyBird', 'PixelCopter', 'PuckWorld', 'RaycastMaze', 'Snake', 'WaterWorld']:
nondeterministic = False
register(
... | <commit_before>from gym.envs.registration import registry, register, make, spec
from gym_ple.ple_env import PLEEnv
# Pygame
# ----------------------------------------
for game in ['Catcher', 'MonsterKong', 'FlappyBird', 'PixelCopter', 'PuckWorld', 'RaycastMaze', 'Snake', 'WaterWorld']:
nondeterministic = False
... |
8aceb4bcfeef05874bbd6eec66eeb7b69f20f02e | pinax/blog/templatetags/pinax_blog_tags.py | pinax/blog/templatetags/pinax_blog_tags.py | from django import template
from ..models import Post, Section
register = template.Library()
@register.assignment_tag
def latest_blog_posts(scoper=None):
qs = Post.objects.current()
if scoper:
qs = qs.filter(scoper=scoper)
return qs[:5]
@register.assignment_tag
def latest_blog_post(scoper=Non... | from django import template
from ..models import Post, Section
register = template.Library()
@register.assignment_tag
def latest_blog_posts(scoper=None):
qs = Post.objects.current()
if scoper:
qs = qs.filter(blog__scoper=scoper)
return qs[:5]
@register.assignment_tag
def latest_blog_post(scop... | Fix small bug in templatetags | Fix small bug in templatetags
| Python | mit | pinax/pinax-blog,pinax/pinax-blog,pinax/pinax-blog | from django import template
from ..models import Post, Section
register = template.Library()
@register.assignment_tag
def latest_blog_posts(scoper=None):
qs = Post.objects.current()
if scoper:
qs = qs.filter(scoper=scoper)
return qs[:5]
@register.assignment_tag
def latest_blog_post(scoper=Non... | from django import template
from ..models import Post, Section
register = template.Library()
@register.assignment_tag
def latest_blog_posts(scoper=None):
qs = Post.objects.current()
if scoper:
qs = qs.filter(blog__scoper=scoper)
return qs[:5]
@register.assignment_tag
def latest_blog_post(scop... | <commit_before>from django import template
from ..models import Post, Section
register = template.Library()
@register.assignment_tag
def latest_blog_posts(scoper=None):
qs = Post.objects.current()
if scoper:
qs = qs.filter(scoper=scoper)
return qs[:5]
@register.assignment_tag
def latest_blog_... | from django import template
from ..models import Post, Section
register = template.Library()
@register.assignment_tag
def latest_blog_posts(scoper=None):
qs = Post.objects.current()
if scoper:
qs = qs.filter(blog__scoper=scoper)
return qs[:5]
@register.assignment_tag
def latest_blog_post(scop... | from django import template
from ..models import Post, Section
register = template.Library()
@register.assignment_tag
def latest_blog_posts(scoper=None):
qs = Post.objects.current()
if scoper:
qs = qs.filter(scoper=scoper)
return qs[:5]
@register.assignment_tag
def latest_blog_post(scoper=Non... | <commit_before>from django import template
from ..models import Post, Section
register = template.Library()
@register.assignment_tag
def latest_blog_posts(scoper=None):
qs = Post.objects.current()
if scoper:
qs = qs.filter(scoper=scoper)
return qs[:5]
@register.assignment_tag
def latest_blog_... |
c2d44c5b25b5827b12f4e4cd653c4f80f7289894 | hexfile/__init__.py | hexfile/__init__.py | __title__ = 'hexfile'
__version__ = '0.1.1'
__author__ = 'Ryan Sturmer'
__license__ = 'MIT'
__copyright__ = 'Copyright 2014 Ryan Sturmer'
__docformat__ = 'restructuredtext'
from core import load, HexFile, Segment
| __title__ = 'hexfile'
__version__ = '0.1.1'
__author__ = 'Ryan Sturmer'
__license__ = 'MIT'
__copyright__ = 'Copyright 2014 Ryan Sturmer'
__docformat__ = 'restructuredtext'
from .core import load, HexFile, Segment
| Use relative import to fix Python 3. | Use relative import to fix Python 3.
| Python | mit | ryansturmer/hexfile | __title__ = 'hexfile'
__version__ = '0.1.1'
__author__ = 'Ryan Sturmer'
__license__ = 'MIT'
__copyright__ = 'Copyright 2014 Ryan Sturmer'
__docformat__ = 'restructuredtext'
from core import load, HexFile, Segment
Use relative import to fix Python 3. | __title__ = 'hexfile'
__version__ = '0.1.1'
__author__ = 'Ryan Sturmer'
__license__ = 'MIT'
__copyright__ = 'Copyright 2014 Ryan Sturmer'
__docformat__ = 'restructuredtext'
from .core import load, HexFile, Segment
| <commit_before>__title__ = 'hexfile'
__version__ = '0.1.1'
__author__ = 'Ryan Sturmer'
__license__ = 'MIT'
__copyright__ = 'Copyright 2014 Ryan Sturmer'
__docformat__ = 'restructuredtext'
from core import load, HexFile, Segment
<commit_msg>Use relative import to fix Python 3.<commit_after> | __title__ = 'hexfile'
__version__ = '0.1.1'
__author__ = 'Ryan Sturmer'
__license__ = 'MIT'
__copyright__ = 'Copyright 2014 Ryan Sturmer'
__docformat__ = 'restructuredtext'
from .core import load, HexFile, Segment
| __title__ = 'hexfile'
__version__ = '0.1.1'
__author__ = 'Ryan Sturmer'
__license__ = 'MIT'
__copyright__ = 'Copyright 2014 Ryan Sturmer'
__docformat__ = 'restructuredtext'
from core import load, HexFile, Segment
Use relative import to fix Python 3.__title__ = 'hexfile'
__version__ = '0.1.1'
__author__ = 'Ryan Sturmer... | <commit_before>__title__ = 'hexfile'
__version__ = '0.1.1'
__author__ = 'Ryan Sturmer'
__license__ = 'MIT'
__copyright__ = 'Copyright 2014 Ryan Sturmer'
__docformat__ = 'restructuredtext'
from core import load, HexFile, Segment
<commit_msg>Use relative import to fix Python 3.<commit_after>__title__ = 'hexfile'
__versi... |
ac6c9f4ad35a8c2c8ede616366b50995afff6992 | hurricane/runner.py | hurricane/runner.py | #!/usr/bin/env python
import multiprocessing
import optparse
from django.core.exceptions import ImproperlyConfigured
from django.utils.importlib import import_module
from hurricane.utils import run_until_stopped
class ApplicationManager(object):
@run_until_stopped
def run(self):
parser = optparse.Op... | #!/usr/bin/env python
import multiprocessing
import optparse
from django.conf import settings as django_settings
from django.core.exceptions import ImproperlyConfigured
from django.utils.importlib import import_module
from hurricane.utils import run_until_stopped
class ApplicationManager(object):
@run_until_sto... | Configure django correctly when we setup our env | Configure django correctly when we setup our env
| Python | bsd-3-clause | ericflo/hurricane,ericflo/hurricane | #!/usr/bin/env python
import multiprocessing
import optparse
from django.core.exceptions import ImproperlyConfigured
from django.utils.importlib import import_module
from hurricane.utils import run_until_stopped
class ApplicationManager(object):
@run_until_stopped
def run(self):
parser = optparse.Op... | #!/usr/bin/env python
import multiprocessing
import optparse
from django.conf import settings as django_settings
from django.core.exceptions import ImproperlyConfigured
from django.utils.importlib import import_module
from hurricane.utils import run_until_stopped
class ApplicationManager(object):
@run_until_sto... | <commit_before>#!/usr/bin/env python
import multiprocessing
import optparse
from django.core.exceptions import ImproperlyConfigured
from django.utils.importlib import import_module
from hurricane.utils import run_until_stopped
class ApplicationManager(object):
@run_until_stopped
def run(self):
parse... | #!/usr/bin/env python
import multiprocessing
import optparse
from django.conf import settings as django_settings
from django.core.exceptions import ImproperlyConfigured
from django.utils.importlib import import_module
from hurricane.utils import run_until_stopped
class ApplicationManager(object):
@run_until_sto... | #!/usr/bin/env python
import multiprocessing
import optparse
from django.core.exceptions import ImproperlyConfigured
from django.utils.importlib import import_module
from hurricane.utils import run_until_stopped
class ApplicationManager(object):
@run_until_stopped
def run(self):
parser = optparse.Op... | <commit_before>#!/usr/bin/env python
import multiprocessing
import optparse
from django.core.exceptions import ImproperlyConfigured
from django.utils.importlib import import_module
from hurricane.utils import run_until_stopped
class ApplicationManager(object):
@run_until_stopped
def run(self):
parse... |
119025b231b0f3b9077445334fc08d1ad076abfc | generic_links/migrations/0001_initial.py | generic_links/migrations/0001_initial.py | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
from django.conf import settings
class Migration(migrations.Migration):
dependencies = [
('contenttypes', '0002_remove_content_type_name'),
migrations.swappable_dependency(settings.AUTH_USER_... | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
from django.conf import settings
class Migration(migrations.Migration):
dependencies = [
('contenttypes', '__first__'),
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
]
o... | Remove Django 1.8 dependency in initial migration | Remove Django 1.8 dependency in initial migration
The ('contenttypes', '0002_remove_content_type_name') migration was part of Django 1.8, replacing it with '__first__' allows the use of Django 1.7 | Python | bsd-3-clause | matagus/django-generic-links,matagus/django-generic-links | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
from django.conf import settings
class Migration(migrations.Migration):
dependencies = [
('contenttypes', '0002_remove_content_type_name'),
migrations.swappable_dependency(settings.AUTH_USER_... | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
from django.conf import settings
class Migration(migrations.Migration):
dependencies = [
('contenttypes', '__first__'),
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
]
o... | <commit_before># -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
from django.conf import settings
class Migration(migrations.Migration):
dependencies = [
('contenttypes', '0002_remove_content_type_name'),
migrations.swappable_dependency(sett... | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
from django.conf import settings
class Migration(migrations.Migration):
dependencies = [
('contenttypes', '__first__'),
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
]
o... | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
from django.conf import settings
class Migration(migrations.Migration):
dependencies = [
('contenttypes', '0002_remove_content_type_name'),
migrations.swappable_dependency(settings.AUTH_USER_... | <commit_before># -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
from django.conf import settings
class Migration(migrations.Migration):
dependencies = [
('contenttypes', '0002_remove_content_type_name'),
migrations.swappable_dependency(sett... |
c7941340336b3fe584dd192583c088eb1f1f972e | genomic_neuralnet/common/celeryconfig.py | genomic_neuralnet/common/celeryconfig.py |
# Wait up to 15 minutes for each iteration.
BROKER_TRANSPORT_OPTIONS = {'visibility_timeout': 3600} # Seconds = 1 hour.
# Do not pre-fetch work.
CELERYD_PREFETCH_MULTIPLIER = 1
# Do not ack messages until work is completed.
CELERY_ACKS_LATE = True
# Stop warning me about PICKLE.
CELERY_ACCEPT_CONTENT = ['pickle']
|
# Wait up to 15 minutes for each iteration.
BROKER_TRANSPORT_OPTIONS = {'visibility_timeout': 60*60} # 60*60 Seconds = 1 hour.
# Do not pre-fetch work.
CELERYD_PREFETCH_MULTIPLIER = 1
# Do not ack messages until work is completed.
CELERY_ACKS_LATE = True
# Stop warning me about PICKLE.
CELERY_ACCEPT_CONTENT = ['pickl... | Reduce result broker message timeout | Reduce result broker message timeout
| Python | mit | rileymcdowell/genomic-neuralnet,rileymcdowell/genomic-neuralnet,rileymcdowell/genomic-neuralnet |
# Wait up to 15 minutes for each iteration.
BROKER_TRANSPORT_OPTIONS = {'visibility_timeout': 3600} # Seconds = 1 hour.
# Do not pre-fetch work.
CELERYD_PREFETCH_MULTIPLIER = 1
# Do not ack messages until work is completed.
CELERY_ACKS_LATE = True
# Stop warning me about PICKLE.
CELERY_ACCEPT_CONTENT = ['pickle']
Re... |
# Wait up to 15 minutes for each iteration.
BROKER_TRANSPORT_OPTIONS = {'visibility_timeout': 60*60} # 60*60 Seconds = 1 hour.
# Do not pre-fetch work.
CELERYD_PREFETCH_MULTIPLIER = 1
# Do not ack messages until work is completed.
CELERY_ACKS_LATE = True
# Stop warning me about PICKLE.
CELERY_ACCEPT_CONTENT = ['pickl... | <commit_before>
# Wait up to 15 minutes for each iteration.
BROKER_TRANSPORT_OPTIONS = {'visibility_timeout': 3600} # Seconds = 1 hour.
# Do not pre-fetch work.
CELERYD_PREFETCH_MULTIPLIER = 1
# Do not ack messages until work is completed.
CELERY_ACKS_LATE = True
# Stop warning me about PICKLE.
CELERY_ACCEPT_CONTENT =... |
# Wait up to 15 minutes for each iteration.
BROKER_TRANSPORT_OPTIONS = {'visibility_timeout': 60*60} # 60*60 Seconds = 1 hour.
# Do not pre-fetch work.
CELERYD_PREFETCH_MULTIPLIER = 1
# Do not ack messages until work is completed.
CELERY_ACKS_LATE = True
# Stop warning me about PICKLE.
CELERY_ACCEPT_CONTENT = ['pickl... |
# Wait up to 15 minutes for each iteration.
BROKER_TRANSPORT_OPTIONS = {'visibility_timeout': 3600} # Seconds = 1 hour.
# Do not pre-fetch work.
CELERYD_PREFETCH_MULTIPLIER = 1
# Do not ack messages until work is completed.
CELERY_ACKS_LATE = True
# Stop warning me about PICKLE.
CELERY_ACCEPT_CONTENT = ['pickle']
Re... | <commit_before>
# Wait up to 15 minutes for each iteration.
BROKER_TRANSPORT_OPTIONS = {'visibility_timeout': 3600} # Seconds = 1 hour.
# Do not pre-fetch work.
CELERYD_PREFETCH_MULTIPLIER = 1
# Do not ack messages until work is completed.
CELERY_ACKS_LATE = True
# Stop warning me about PICKLE.
CELERY_ACCEPT_CONTENT =... |
2ae6974ee04a9c5d39ad18788fe14a432994f6bd | zou/event_stream.py | zou/event_stream.py | import os
from flask import Flask
from flask_sse import sse
app = Flask(__name__)
app.config["REDIS_URL"] = os.environ.get(
"REDIS_URL",
"redis://localhost/2"
)
app.register_blueprint(sse, url_prefix='/events')
| import os
from flask import Flask
from flask_sse import sse
app = Flask(__name__)
redis_host = os.environ.get("KV_HOST", "localhost")
redis_port = os.environ.get("KV_PORT", "5379")
redis_url = "redis://%s:%s/2" % (redis_host, redis_port)
app.config["REDIS_URL"] = redis_url
app.register_blueprint(sse, url_prefix='/... | Use right env variable to build redis url | Use right env variable to build redis url
It is for the events stream daemon.
| Python | agpl-3.0 | cgwire/zou | import os
from flask import Flask
from flask_sse import sse
app = Flask(__name__)
app.config["REDIS_URL"] = os.environ.get(
"REDIS_URL",
"redis://localhost/2"
)
app.register_blueprint(sse, url_prefix='/events')
Use right env variable to build redis url
It is for the events stream daemon. | import os
from flask import Flask
from flask_sse import sse
app = Flask(__name__)
redis_host = os.environ.get("KV_HOST", "localhost")
redis_port = os.environ.get("KV_PORT", "5379")
redis_url = "redis://%s:%s/2" % (redis_host, redis_port)
app.config["REDIS_URL"] = redis_url
app.register_blueprint(sse, url_prefix='/... | <commit_before>import os
from flask import Flask
from flask_sse import sse
app = Flask(__name__)
app.config["REDIS_URL"] = os.environ.get(
"REDIS_URL",
"redis://localhost/2"
)
app.register_blueprint(sse, url_prefix='/events')
<commit_msg>Use right env variable to build redis url
It is for the events stream d... | import os
from flask import Flask
from flask_sse import sse
app = Flask(__name__)
redis_host = os.environ.get("KV_HOST", "localhost")
redis_port = os.environ.get("KV_PORT", "5379")
redis_url = "redis://%s:%s/2" % (redis_host, redis_port)
app.config["REDIS_URL"] = redis_url
app.register_blueprint(sse, url_prefix='/... | import os
from flask import Flask
from flask_sse import sse
app = Flask(__name__)
app.config["REDIS_URL"] = os.environ.get(
"REDIS_URL",
"redis://localhost/2"
)
app.register_blueprint(sse, url_prefix='/events')
Use right env variable to build redis url
It is for the events stream daemon.import os
from flask... | <commit_before>import os
from flask import Flask
from flask_sse import sse
app = Flask(__name__)
app.config["REDIS_URL"] = os.environ.get(
"REDIS_URL",
"redis://localhost/2"
)
app.register_blueprint(sse, url_prefix='/events')
<commit_msg>Use right env variable to build redis url
It is for the events stream d... |
3fe67d3dc52919751217d6e73be436c3e291ab04 | soho/renderers/__init__.py | soho/renderers/__init__.py | import os
from soho.utils import register_plugin
registry = {}
def register_renderer(spec, *ext):
"""Register a renderer.
``spec``
a string that represents the full path to a class, for example
``'soho.renderers.zpt.ZPTRenderer'``. The class must implement
the same interface as :cl... | import os
from soho.utils import register_plugin
registry = {}
def register_renderer(spec, *ext):
"""Register a renderer.
``spec``
a string that represents the full path to a class, for example
``'soho.renderers.zpt.ZPTRenderer'``. The class must implement
the same interface as :cla... | Remove empty line. Add bland commit message. | Remove empty line. Add bland commit message.
| Python | bsd-3-clause | dbaty/soho,dbaty/soho | import os
from soho.utils import register_plugin
registry = {}
def register_renderer(spec, *ext):
"""Register a renderer.
``spec``
a string that represents the full path to a class, for example
``'soho.renderers.zpt.ZPTRenderer'``. The class must implement
the same interface as :cl... | import os
from soho.utils import register_plugin
registry = {}
def register_renderer(spec, *ext):
"""Register a renderer.
``spec``
a string that represents the full path to a class, for example
``'soho.renderers.zpt.ZPTRenderer'``. The class must implement
the same interface as :cla... | <commit_before>import os
from soho.utils import register_plugin
registry = {}
def register_renderer(spec, *ext):
"""Register a renderer.
``spec``
a string that represents the full path to a class, for example
``'soho.renderers.zpt.ZPTRenderer'``. The class must implement
the same i... | import os
from soho.utils import register_plugin
registry = {}
def register_renderer(spec, *ext):
"""Register a renderer.
``spec``
a string that represents the full path to a class, for example
``'soho.renderers.zpt.ZPTRenderer'``. The class must implement
the same interface as :cla... | import os
from soho.utils import register_plugin
registry = {}
def register_renderer(spec, *ext):
"""Register a renderer.
``spec``
a string that represents the full path to a class, for example
``'soho.renderers.zpt.ZPTRenderer'``. The class must implement
the same interface as :cl... | <commit_before>import os
from soho.utils import register_plugin
registry = {}
def register_renderer(spec, *ext):
"""Register a renderer.
``spec``
a string that represents the full path to a class, for example
``'soho.renderers.zpt.ZPTRenderer'``. The class must implement
the same i... |
a275611ff2ebea7865a182a398282ab678333a30 | tests/test_playalbumby/test_query.py | tests/test_playalbumby/test_query.py | #!/usr/bin/env python
# coding=utf-8
from __future__ import print_function, unicode_literals
import nose.tools as nose
from tests.utils import run_filter
def test_ignore_case():
"""should ignore case when querying albums by an artist"""
results = run_filter('playalbumby', 'survivor')
nose.assert_equal(... | #!/usr/bin/env python
# coding=utf-8
from __future__ import print_function, unicode_literals
import nose.tools as nose
from tests.utils import run_filter
def test_ignore_case():
"""should ignore case when querying albums by an artist"""
results = run_filter('playalbumby', 'SurVivor')
nose.assert_equal(... | Correct 'ignore case' playalbumby test | Correct 'ignore case' playalbumby test
| Python | mit | caleb531/play-song,caleb531/play-song | #!/usr/bin/env python
# coding=utf-8
from __future__ import print_function, unicode_literals
import nose.tools as nose
from tests.utils import run_filter
def test_ignore_case():
"""should ignore case when querying albums by an artist"""
results = run_filter('playalbumby', 'survivor')
nose.assert_equal(... | #!/usr/bin/env python
# coding=utf-8
from __future__ import print_function, unicode_literals
import nose.tools as nose
from tests.utils import run_filter
def test_ignore_case():
"""should ignore case when querying albums by an artist"""
results = run_filter('playalbumby', 'SurVivor')
nose.assert_equal(... | <commit_before>#!/usr/bin/env python
# coding=utf-8
from __future__ import print_function, unicode_literals
import nose.tools as nose
from tests.utils import run_filter
def test_ignore_case():
"""should ignore case when querying albums by an artist"""
results = run_filter('playalbumby', 'survivor')
nos... | #!/usr/bin/env python
# coding=utf-8
from __future__ import print_function, unicode_literals
import nose.tools as nose
from tests.utils import run_filter
def test_ignore_case():
"""should ignore case when querying albums by an artist"""
results = run_filter('playalbumby', 'SurVivor')
nose.assert_equal(... | #!/usr/bin/env python
# coding=utf-8
from __future__ import print_function, unicode_literals
import nose.tools as nose
from tests.utils import run_filter
def test_ignore_case():
"""should ignore case when querying albums by an artist"""
results = run_filter('playalbumby', 'survivor')
nose.assert_equal(... | <commit_before>#!/usr/bin/env python
# coding=utf-8
from __future__ import print_function, unicode_literals
import nose.tools as nose
from tests.utils import run_filter
def test_ignore_case():
"""should ignore case when querying albums by an artist"""
results = run_filter('playalbumby', 'survivor')
nos... |
8ffe293135c6ee80f185b6f6a8d6e9f096adc91c | knights/k_tags.py | knights/k_tags.py |
import ast
from .library import Library
register = Library()
@register.tag(name='block')
def block(parser, token):
token = token.strip()
parser.build_method(token, endnodes=['endblock'])
return ast.YieldFrom(
value=ast.Call(
func=ast.Attribute(
value=ast.Name(id='sel... |
import ast
from .library import Library
register = Library()
@register.tag(name='block')
def block(parser, token):
token = token.strip()
parser.build_method(token, endnodes=['endblock'])
return ast.Expr(value=ast.YieldFrom(
value=ast.Call(
func=ast.Attribute(
value=a... | Use ast.If not ast.IfExp for if tag | Use ast.If not ast.IfExp for if tag
| Python | mit | funkybob/knights-templater,funkybob/knights-templater |
import ast
from .library import Library
register = Library()
@register.tag(name='block')
def block(parser, token):
token = token.strip()
parser.build_method(token, endnodes=['endblock'])
return ast.YieldFrom(
value=ast.Call(
func=ast.Attribute(
value=ast.Name(id='sel... |
import ast
from .library import Library
register = Library()
@register.tag(name='block')
def block(parser, token):
token = token.strip()
parser.build_method(token, endnodes=['endblock'])
return ast.Expr(value=ast.YieldFrom(
value=ast.Call(
func=ast.Attribute(
value=a... | <commit_before>
import ast
from .library import Library
register = Library()
@register.tag(name='block')
def block(parser, token):
token = token.strip()
parser.build_method(token, endnodes=['endblock'])
return ast.YieldFrom(
value=ast.Call(
func=ast.Attribute(
value=a... |
import ast
from .library import Library
register = Library()
@register.tag(name='block')
def block(parser, token):
token = token.strip()
parser.build_method(token, endnodes=['endblock'])
return ast.Expr(value=ast.YieldFrom(
value=ast.Call(
func=ast.Attribute(
value=a... |
import ast
from .library import Library
register = Library()
@register.tag(name='block')
def block(parser, token):
token = token.strip()
parser.build_method(token, endnodes=['endblock'])
return ast.YieldFrom(
value=ast.Call(
func=ast.Attribute(
value=ast.Name(id='sel... | <commit_before>
import ast
from .library import Library
register = Library()
@register.tag(name='block')
def block(parser, token):
token = token.strip()
parser.build_method(token, endnodes=['endblock'])
return ast.YieldFrom(
value=ast.Call(
func=ast.Attribute(
value=a... |
22112e164005fcbf2c79a5f307d1e587d9146c95 | store/admin.py | store/admin.py | from django.contrib import admin
from .models import Image, Product, Review, Specification
class ImageInline(admin.StackedInline):
model = Image
class SpecificationInline(admin.StackedInline):
model = Specification
class ProductAdmin(admin.ModelAdmin):
list_display = (
'name',
'price'... | from django.contrib import admin
from .models import Image, Product, Review, Specification
class ImageInline(admin.StackedInline):
model = Image
class SpecificationInline(admin.StackedInline):
model = Specification
class ProductAdmin(admin.ModelAdmin):
list_display = (
'name',
'price'... | Add featured field to ProductAdmin | Add featured field to ProductAdmin
| Python | bsd-3-clause | kevgathuku/compshop,andela-kndungu/compshop,andela-kndungu/compshop,andela-kndungu/compshop,kevgathuku/compshop,andela-kndungu/compshop,kevgathuku/compshop,kevgathuku/compshop | from django.contrib import admin
from .models import Image, Product, Review, Specification
class ImageInline(admin.StackedInline):
model = Image
class SpecificationInline(admin.StackedInline):
model = Specification
class ProductAdmin(admin.ModelAdmin):
list_display = (
'name',
'price'... | from django.contrib import admin
from .models import Image, Product, Review, Specification
class ImageInline(admin.StackedInline):
model = Image
class SpecificationInline(admin.StackedInline):
model = Specification
class ProductAdmin(admin.ModelAdmin):
list_display = (
'name',
'price'... | <commit_before>from django.contrib import admin
from .models import Image, Product, Review, Specification
class ImageInline(admin.StackedInline):
model = Image
class SpecificationInline(admin.StackedInline):
model = Specification
class ProductAdmin(admin.ModelAdmin):
list_display = (
'name',
... | from django.contrib import admin
from .models import Image, Product, Review, Specification
class ImageInline(admin.StackedInline):
model = Image
class SpecificationInline(admin.StackedInline):
model = Specification
class ProductAdmin(admin.ModelAdmin):
list_display = (
'name',
'price'... | from django.contrib import admin
from .models import Image, Product, Review, Specification
class ImageInline(admin.StackedInline):
model = Image
class SpecificationInline(admin.StackedInline):
model = Specification
class ProductAdmin(admin.ModelAdmin):
list_display = (
'name',
'price'... | <commit_before>from django.contrib import admin
from .models import Image, Product, Review, Specification
class ImageInline(admin.StackedInline):
model = Image
class SpecificationInline(admin.StackedInline):
model = Specification
class ProductAdmin(admin.ModelAdmin):
list_display = (
'name',
... |
f52f1cb890a0a0105915e9406fb0c39332f6c101 | src/settings.py | src/settings.py | #!/usr/bin/python
#
# Copyright 2011 Friday Film Club. All Rights Reserved.
"""Main views of the Friday Film Club app."""
__author__ = '[email protected] (Adam McGrath)'
import os
DEBUG = os.environ.get('SERVER_SOFTWARE', '').startswith('Dev')
FMJ_EMAIL_SHORT = '[email protected]'
FMJ_EMAIL = 'Film Master... | #!/usr/bin/python
#
# Copyright 2011 Friday Film Club. All Rights Reserved.
"""Main views of the Friday Film Club app."""
__author__ = '[email protected] (Adam McGrath)'
import os
DEBUG = os.environ.get('SERVER_SOFTWARE', '').startswith('Dev')
FMJ_EMAIL_SHORT = '[email protected]'
FMJ_EMAIL = 'Film Master... | Fix auth issue, catch up devel --skip-ci | Fix auth issue, catch up devel --skip-ci
| Python | mpl-2.0 | adamjmcgrath/fridayfilmclub,adamjmcgrath/fridayfilmclub,adamjmcgrath/fridayfilmclub,adamjmcgrath/fridayfilmclub | #!/usr/bin/python
#
# Copyright 2011 Friday Film Club. All Rights Reserved.
"""Main views of the Friday Film Club app."""
__author__ = '[email protected] (Adam McGrath)'
import os
DEBUG = os.environ.get('SERVER_SOFTWARE', '').startswith('Dev')
FMJ_EMAIL_SHORT = '[email protected]'
FMJ_EMAIL = 'Film Master... | #!/usr/bin/python
#
# Copyright 2011 Friday Film Club. All Rights Reserved.
"""Main views of the Friday Film Club app."""
__author__ = '[email protected] (Adam McGrath)'
import os
DEBUG = os.environ.get('SERVER_SOFTWARE', '').startswith('Dev')
FMJ_EMAIL_SHORT = '[email protected]'
FMJ_EMAIL = 'Film Master... | <commit_before>#!/usr/bin/python
#
# Copyright 2011 Friday Film Club. All Rights Reserved.
"""Main views of the Friday Film Club app."""
__author__ = '[email protected] (Adam McGrath)'
import os
DEBUG = os.environ.get('SERVER_SOFTWARE', '').startswith('Dev')
FMJ_EMAIL_SHORT = '[email protected]'
FMJ_EMAIL... | #!/usr/bin/python
#
# Copyright 2011 Friday Film Club. All Rights Reserved.
"""Main views of the Friday Film Club app."""
__author__ = '[email protected] (Adam McGrath)'
import os
DEBUG = os.environ.get('SERVER_SOFTWARE', '').startswith('Dev')
FMJ_EMAIL_SHORT = '[email protected]'
FMJ_EMAIL = 'Film Master... | #!/usr/bin/python
#
# Copyright 2011 Friday Film Club. All Rights Reserved.
"""Main views of the Friday Film Club app."""
__author__ = '[email protected] (Adam McGrath)'
import os
DEBUG = os.environ.get('SERVER_SOFTWARE', '').startswith('Dev')
FMJ_EMAIL_SHORT = '[email protected]'
FMJ_EMAIL = 'Film Master... | <commit_before>#!/usr/bin/python
#
# Copyright 2011 Friday Film Club. All Rights Reserved.
"""Main views of the Friday Film Club app."""
__author__ = '[email protected] (Adam McGrath)'
import os
DEBUG = os.environ.get('SERVER_SOFTWARE', '').startswith('Dev')
FMJ_EMAIL_SHORT = '[email protected]'
FMJ_EMAIL... |
cf19d5a52237e6098dedc3c0bbfdaa3aedd180e0 | loginza/models.py | loginza/models.py | from django.contrib.auth.models import User
from django.db import models
from django.utils import simplejson as json
from .signals import post_associate
class IdentityManager(models.Manager):
def from_loginza_data(self, loginza_data):
data = json.dumps(loginza_data)
identity, created = self.get_... | from django.contrib.auth.models import User
from django.db import models
from django.utils import simplejson as json
from .signals import post_associate
class IdentityManager(models.Manager):
def from_loginza_data(self, loginza_data):
data = json.dumps(loginza_data)
identity, created = self.get_... | Fix user creation with unique username | Fix user creation with unique username
| Python | isc | xobb1t/django-loginza-auth | from django.contrib.auth.models import User
from django.db import models
from django.utils import simplejson as json
from .signals import post_associate
class IdentityManager(models.Manager):
def from_loginza_data(self, loginza_data):
data = json.dumps(loginza_data)
identity, created = self.get_... | from django.contrib.auth.models import User
from django.db import models
from django.utils import simplejson as json
from .signals import post_associate
class IdentityManager(models.Manager):
def from_loginza_data(self, loginza_data):
data = json.dumps(loginza_data)
identity, created = self.get_... | <commit_before>from django.contrib.auth.models import User
from django.db import models
from django.utils import simplejson as json
from .signals import post_associate
class IdentityManager(models.Manager):
def from_loginza_data(self, loginza_data):
data = json.dumps(loginza_data)
identity, crea... | from django.contrib.auth.models import User
from django.db import models
from django.utils import simplejson as json
from .signals import post_associate
class IdentityManager(models.Manager):
def from_loginza_data(self, loginza_data):
data = json.dumps(loginza_data)
identity, created = self.get_... | from django.contrib.auth.models import User
from django.db import models
from django.utils import simplejson as json
from .signals import post_associate
class IdentityManager(models.Manager):
def from_loginza_data(self, loginza_data):
data = json.dumps(loginza_data)
identity, created = self.get_... | <commit_before>from django.contrib.auth.models import User
from django.db import models
from django.utils import simplejson as json
from .signals import post_associate
class IdentityManager(models.Manager):
def from_loginza_data(self, loginza_data):
data = json.dumps(loginza_data)
identity, crea... |
7d2277685a125e4ee2b57ed7782bcae62f64464b | matrix/example.py | matrix/example.py | class Matrix(object):
def __init__(self, s):
self.rows = [[int(n) for n in row.split()]
for row in s.split('\n')]
@property
def columns(self):
return map(list, zip(*self.rows))
| class Matrix(object):
def __init__(self, s):
self.rows = [[int(n) for n in row.split()]
for row in s.split('\n')]
@property
def columns(self):
return [list(tup) for tup in zip(*self.rows)]
| Make matrix exercise compatible with Python3 | Make matrix exercise compatible with Python3
| Python | mit | exercism/python,pombredanne/xpython,outkaj/xpython,behrtam/xpython,smalley/python,orozcoadrian/xpython,orozcoadrian/xpython,exercism/xpython,ZacharyRSmith/xpython,de2Zotjes/xpython,oalbe/xpython,jmluy/xpython,N-Parsons/exercism-python,pheanex/xpython,behrtam/xpython,exercism/python,pombredanne/xpython,wobh/xpython,jmlu... | class Matrix(object):
def __init__(self, s):
self.rows = [[int(n) for n in row.split()]
for row in s.split('\n')]
@property
def columns(self):
return map(list, zip(*self.rows))
Make matrix exercise compatible with Python3 | class Matrix(object):
def __init__(self, s):
self.rows = [[int(n) for n in row.split()]
for row in s.split('\n')]
@property
def columns(self):
return [list(tup) for tup in zip(*self.rows)]
| <commit_before>class Matrix(object):
def __init__(self, s):
self.rows = [[int(n) for n in row.split()]
for row in s.split('\n')]
@property
def columns(self):
return map(list, zip(*self.rows))
<commit_msg>Make matrix exercise compatible with Python3<commit_after> | class Matrix(object):
def __init__(self, s):
self.rows = [[int(n) for n in row.split()]
for row in s.split('\n')]
@property
def columns(self):
return [list(tup) for tup in zip(*self.rows)]
| class Matrix(object):
def __init__(self, s):
self.rows = [[int(n) for n in row.split()]
for row in s.split('\n')]
@property
def columns(self):
return map(list, zip(*self.rows))
Make matrix exercise compatible with Python3class Matrix(object):
def __init__(self, s):
... | <commit_before>class Matrix(object):
def __init__(self, s):
self.rows = [[int(n) for n in row.split()]
for row in s.split('\n')]
@property
def columns(self):
return map(list, zip(*self.rows))
<commit_msg>Make matrix exercise compatible with Python3<commit_after>class Ma... |
bab2c322a9861e9869e92a3952a0d19f1559b099 | redis_commands/parse.py | redis_commands/parse.py | #!/usr/bin/python
# -*- coding: utf-8 -*-
import lxml.etree, lxml.html
import re
url = "http://redis.io"
output = "output.txt"
f = open(output, "w");
tree = lxml.html.parse("download/raw.dat").getroot()
commands = tree.find_class("command")
data = {}
for command in commands:
for row in command.findall('a'):
... | #!/usr/bin/python
# -*- coding: utf-8 -*-
import lxml.etree, lxml.html
import re
url = "http://redis.io"
output = "output.txt"
f = open(output, "w");
tree = lxml.html.parse("download/raw.dat").getroot()
commands = tree.find_class("command")
data = {}
for command in commands:
for row in command.findall('a'):
... | Use a synopsis for usage examples | redis_commands: Use a synopsis for usage examples
| Python | apache-2.0 | nikhilsingh291/zeroclickinfo-fathead,thinker3197/zeroclickinfo-fathead,p12tic/zeroclickinfo-fathead,p12tic/zeroclickinfo-fathead,thinker3197/zeroclickinfo-fathead,samskeller/zeroclickinfo-fathead,nikhilsingh291/zeroclickinfo-fathead,dankolbrs/zeroclickinfo-fathead,rasikapohankar/zeroclickinfo-fathead,p12tic/zeroclickin... | #!/usr/bin/python
# -*- coding: utf-8 -*-
import lxml.etree, lxml.html
import re
url = "http://redis.io"
output = "output.txt"
f = open(output, "w");
tree = lxml.html.parse("download/raw.dat").getroot()
commands = tree.find_class("command")
data = {}
for command in commands:
for row in command.findall('a'):
... | #!/usr/bin/python
# -*- coding: utf-8 -*-
import lxml.etree, lxml.html
import re
url = "http://redis.io"
output = "output.txt"
f = open(output, "w");
tree = lxml.html.parse("download/raw.dat").getroot()
commands = tree.find_class("command")
data = {}
for command in commands:
for row in command.findall('a'):
... | <commit_before>#!/usr/bin/python
# -*- coding: utf-8 -*-
import lxml.etree, lxml.html
import re
url = "http://redis.io"
output = "output.txt"
f = open(output, "w");
tree = lxml.html.parse("download/raw.dat").getroot()
commands = tree.find_class("command")
data = {}
for command in commands:
for row in command... | #!/usr/bin/python
# -*- coding: utf-8 -*-
import lxml.etree, lxml.html
import re
url = "http://redis.io"
output = "output.txt"
f = open(output, "w");
tree = lxml.html.parse("download/raw.dat").getroot()
commands = tree.find_class("command")
data = {}
for command in commands:
for row in command.findall('a'):
... | #!/usr/bin/python
# -*- coding: utf-8 -*-
import lxml.etree, lxml.html
import re
url = "http://redis.io"
output = "output.txt"
f = open(output, "w");
tree = lxml.html.parse("download/raw.dat").getroot()
commands = tree.find_class("command")
data = {}
for command in commands:
for row in command.findall('a'):
... | <commit_before>#!/usr/bin/python
# -*- coding: utf-8 -*-
import lxml.etree, lxml.html
import re
url = "http://redis.io"
output = "output.txt"
f = open(output, "w");
tree = lxml.html.parse("download/raw.dat").getroot()
commands = tree.find_class("command")
data = {}
for command in commands:
for row in command... |
db0aa94de30d73217f9091635c92f59b8af98ef7 | alg_sum_list.py | alg_sum_list.py | from __future__ import absolute_import
from __future__ import print_function
from __future__ import division
def sum_list_for(num_ls):
"""Sum number list by for loop."""
_sum = 0
for num in num_ls:
_sum += num
return _sum
def sum_list_recur(num_ls):
"""Sum number list by recursion."""
... | from __future__ import absolute_import
from __future__ import print_function
from __future__ import division
def sum_list_iter(num_ls):
"""Sum number list by for loop."""
_sum = 0
for num in num_ls:
_sum += num
return _sum
def sum_list_recur(num_ls):
"""Sum number list by recursion."""
... | Rename to sum_list_iter() and revise main()'s num_ls | Rename to sum_list_iter() and revise main()'s num_ls
| Python | bsd-2-clause | bowen0701/algorithms_data_structures | from __future__ import absolute_import
from __future__ import print_function
from __future__ import division
def sum_list_for(num_ls):
"""Sum number list by for loop."""
_sum = 0
for num in num_ls:
_sum += num
return _sum
def sum_list_recur(num_ls):
"""Sum number list by recursion."""
... | from __future__ import absolute_import
from __future__ import print_function
from __future__ import division
def sum_list_iter(num_ls):
"""Sum number list by for loop."""
_sum = 0
for num in num_ls:
_sum += num
return _sum
def sum_list_recur(num_ls):
"""Sum number list by recursion."""
... | <commit_before>from __future__ import absolute_import
from __future__ import print_function
from __future__ import division
def sum_list_for(num_ls):
"""Sum number list by for loop."""
_sum = 0
for num in num_ls:
_sum += num
return _sum
def sum_list_recur(num_ls):
"""Sum number list by r... | from __future__ import absolute_import
from __future__ import print_function
from __future__ import division
def sum_list_iter(num_ls):
"""Sum number list by for loop."""
_sum = 0
for num in num_ls:
_sum += num
return _sum
def sum_list_recur(num_ls):
"""Sum number list by recursion."""
... | from __future__ import absolute_import
from __future__ import print_function
from __future__ import division
def sum_list_for(num_ls):
"""Sum number list by for loop."""
_sum = 0
for num in num_ls:
_sum += num
return _sum
def sum_list_recur(num_ls):
"""Sum number list by recursion."""
... | <commit_before>from __future__ import absolute_import
from __future__ import print_function
from __future__ import division
def sum_list_for(num_ls):
"""Sum number list by for loop."""
_sum = 0
for num in num_ls:
_sum += num
return _sum
def sum_list_recur(num_ls):
"""Sum number list by r... |
03a803bb87478d79f67b20275bc45b56e7c8300f | tests/similarity/test_new_similarity.py | tests/similarity/test_new_similarity.py | import unittest
from similarity.nw_similarity import NWAlgorithm
class Test(unittest.TestCase):
def setUp(self):
pass
def tearDown(self):
pass
def test_nw_algorithm(self):
t = NWAlgorithm('abcdefghij', 'dgj')
t.print_matrix()
(a, b) = t.alignments()
prin... | import unittest
from similarity.nw_similarity import NWAlgorithm
class TestNewSimilarity(unittest.TestCase):
def setUp(self):
pass
def tearDown(self):
pass
def test_nw_algorithm(self):
t = NWAlgorithm('abcdefghij', 'dgj')
t.print_matrix()
(a, b) = t.alignments()... | Fix incorrect import reference to nw_similarity | Fix incorrect import reference to nw_similarity
| Python | mit | dpazel/tryinggithub | import unittest
from similarity.nw_similarity import NWAlgorithm
class Test(unittest.TestCase):
def setUp(self):
pass
def tearDown(self):
pass
def test_nw_algorithm(self):
t = NWAlgorithm('abcdefghij', 'dgj')
t.print_matrix()
(a, b) = t.alignments()
prin... | import unittest
from similarity.nw_similarity import NWAlgorithm
class TestNewSimilarity(unittest.TestCase):
def setUp(self):
pass
def tearDown(self):
pass
def test_nw_algorithm(self):
t = NWAlgorithm('abcdefghij', 'dgj')
t.print_matrix()
(a, b) = t.alignments()... | <commit_before>import unittest
from similarity.nw_similarity import NWAlgorithm
class Test(unittest.TestCase):
def setUp(self):
pass
def tearDown(self):
pass
def test_nw_algorithm(self):
t = NWAlgorithm('abcdefghij', 'dgj')
t.print_matrix()
(a, b) = t.alignments... | import unittest
from similarity.nw_similarity import NWAlgorithm
class TestNewSimilarity(unittest.TestCase):
def setUp(self):
pass
def tearDown(self):
pass
def test_nw_algorithm(self):
t = NWAlgorithm('abcdefghij', 'dgj')
t.print_matrix()
(a, b) = t.alignments()... | import unittest
from similarity.nw_similarity import NWAlgorithm
class Test(unittest.TestCase):
def setUp(self):
pass
def tearDown(self):
pass
def test_nw_algorithm(self):
t = NWAlgorithm('abcdefghij', 'dgj')
t.print_matrix()
(a, b) = t.alignments()
prin... | <commit_before>import unittest
from similarity.nw_similarity import NWAlgorithm
class Test(unittest.TestCase):
def setUp(self):
pass
def tearDown(self):
pass
def test_nw_algorithm(self):
t = NWAlgorithm('abcdefghij', 'dgj')
t.print_matrix()
(a, b) = t.alignments... |
d2367579b9c17bcb81a78108c0eda960346a79e1 | src/reduce_framerate.py | src/reduce_framerate.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# (C) 2015 Jean Nassar
# Released under BSD version 4
"""
Reduce /ardrone/image_raw framerate from 30 Hz to 2 Hz.
"""
import rospy
from sensor_msgs.msg import Image
class ImageFeature(object):
"""
A ROS image Publisher/Subscriber.
"""
def __init__(self)... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# (C) 2015 Jean Nassar
# Released under BSD version 4
"""
Reduce /ardrone/image_raw framerate from 30 Hz to 2 Hz.
"""
import rospy
from sensor_msgs.msg import Image
class ImageFeature(object):
"""
A ROS image Publisher/Subscriber.
"""
def __init__(self)... | Fix mistaken reference to image_callback. | Fix mistaken reference to image_callback.
| Python | mit | masasin/spirit,masasin/spirit | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# (C) 2015 Jean Nassar
# Released under BSD version 4
"""
Reduce /ardrone/image_raw framerate from 30 Hz to 2 Hz.
"""
import rospy
from sensor_msgs.msg import Image
class ImageFeature(object):
"""
A ROS image Publisher/Subscriber.
"""
def __init__(self)... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# (C) 2015 Jean Nassar
# Released under BSD version 4
"""
Reduce /ardrone/image_raw framerate from 30 Hz to 2 Hz.
"""
import rospy
from sensor_msgs.msg import Image
class ImageFeature(object):
"""
A ROS image Publisher/Subscriber.
"""
def __init__(self)... | <commit_before>#!/usr/bin/env python
# -*- coding: utf-8 -*-
# (C) 2015 Jean Nassar
# Released under BSD version 4
"""
Reduce /ardrone/image_raw framerate from 30 Hz to 2 Hz.
"""
import rospy
from sensor_msgs.msg import Image
class ImageFeature(object):
"""
A ROS image Publisher/Subscriber.
"""
def... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# (C) 2015 Jean Nassar
# Released under BSD version 4
"""
Reduce /ardrone/image_raw framerate from 30 Hz to 2 Hz.
"""
import rospy
from sensor_msgs.msg import Image
class ImageFeature(object):
"""
A ROS image Publisher/Subscriber.
"""
def __init__(self)... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# (C) 2015 Jean Nassar
# Released under BSD version 4
"""
Reduce /ardrone/image_raw framerate from 30 Hz to 2 Hz.
"""
import rospy
from sensor_msgs.msg import Image
class ImageFeature(object):
"""
A ROS image Publisher/Subscriber.
"""
def __init__(self)... | <commit_before>#!/usr/bin/env python
# -*- coding: utf-8 -*-
# (C) 2015 Jean Nassar
# Released under BSD version 4
"""
Reduce /ardrone/image_raw framerate from 30 Hz to 2 Hz.
"""
import rospy
from sensor_msgs.msg import Image
class ImageFeature(object):
"""
A ROS image Publisher/Subscriber.
"""
def... |
5a7c70a4e62598aad3c4d34af8d4ee45d3e51bc1 | fabfile.py | fabfile.py | """
Collection of utilities to automate the administration of Twisted's
infrastructure. Use this utility to install, update and start/stop/restart
services running on twistedmatrix.com.
"""
"""
This file is a simple entry point, nothing is final about it!
Just experimenting for now.
"""
from fabric.api import task, s... | """
Collection of utilities to automate the administration of Twisted's
infrastructure. Use this utility to install, update and start/stop/restart
services running on twistedmatrix.com.
"""
"""
This file is a simple entry point, nothing is final about it!
Just experimenting for now.
"""
from fabric.api import task, s... | Make trac related tasks available in fab | Make trac related tasks available in fab
| Python | mit | alex/braid,alex/braid | """
Collection of utilities to automate the administration of Twisted's
infrastructure. Use this utility to install, update and start/stop/restart
services running on twistedmatrix.com.
"""
"""
This file is a simple entry point, nothing is final about it!
Just experimenting for now.
"""
from fabric.api import task, s... | """
Collection of utilities to automate the administration of Twisted's
infrastructure. Use this utility to install, update and start/stop/restart
services running on twistedmatrix.com.
"""
"""
This file is a simple entry point, nothing is final about it!
Just experimenting for now.
"""
from fabric.api import task, s... | <commit_before>"""
Collection of utilities to automate the administration of Twisted's
infrastructure. Use this utility to install, update and start/stop/restart
services running on twistedmatrix.com.
"""
"""
This file is a simple entry point, nothing is final about it!
Just experimenting for now.
"""
from fabric.api... | """
Collection of utilities to automate the administration of Twisted's
infrastructure. Use this utility to install, update and start/stop/restart
services running on twistedmatrix.com.
"""
"""
This file is a simple entry point, nothing is final about it!
Just experimenting for now.
"""
from fabric.api import task, s... | """
Collection of utilities to automate the administration of Twisted's
infrastructure. Use this utility to install, update and start/stop/restart
services running on twistedmatrix.com.
"""
"""
This file is a simple entry point, nothing is final about it!
Just experimenting for now.
"""
from fabric.api import task, s... | <commit_before>"""
Collection of utilities to automate the administration of Twisted's
infrastructure. Use this utility to install, update and start/stop/restart
services running on twistedmatrix.com.
"""
"""
This file is a simple entry point, nothing is final about it!
Just experimenting for now.
"""
from fabric.api... |
edb1753fe1897de2a39a186c09fa2de390a63d65 | taggit/migrations/__init__.py | taggit/migrations/__init__.py | """
Django migrations for taggit app
This package does not contain South migrations. South migrations can be found
in the ``south_migrations`` package.
"""
SOUTH_ERROR_MESSAGE = """\n
For South support, customize the SOUTH_MIGRATION_MODULES setting like so:
SOUTH_MIGRATION_MODULES = {
'taggit': 'taggit.... | Raise error if taggit.migrations imported for Django <=1.6 | Raise error if taggit.migrations imported for Django <=1.6
Fixes gh-219.
| Python | bsd-3-clause | adrian-sgn/django-taggit,IRI-Research/django-taggit,doselect/django-taggit,benjaminrigaud/django-taggit,nealtodd/django-taggit,laanlabs/django-taggit,eugena/django-taggit,7kfpun/django-taggit,tamarmot/django-taggit,izquierdo/django-taggit,cimani/django-taggit,Eksmo/django-taggit,kaedroho/django-taggit,orbitvu/django-ta... | Raise error if taggit.migrations imported for Django <=1.6
Fixes gh-219. | """
Django migrations for taggit app
This package does not contain South migrations. South migrations can be found
in the ``south_migrations`` package.
"""
SOUTH_ERROR_MESSAGE = """\n
For South support, customize the SOUTH_MIGRATION_MODULES setting like so:
SOUTH_MIGRATION_MODULES = {
'taggit': 'taggit.... | <commit_before><commit_msg>Raise error if taggit.migrations imported for Django <=1.6
Fixes gh-219.<commit_after> | """
Django migrations for taggit app
This package does not contain South migrations. South migrations can be found
in the ``south_migrations`` package.
"""
SOUTH_ERROR_MESSAGE = """\n
For South support, customize the SOUTH_MIGRATION_MODULES setting like so:
SOUTH_MIGRATION_MODULES = {
'taggit': 'taggit.... | Raise error if taggit.migrations imported for Django <=1.6
Fixes gh-219."""
Django migrations for taggit app
This package does not contain South migrations. South migrations can be found
in the ``south_migrations`` package.
"""
SOUTH_ERROR_MESSAGE = """\n
For South support, customize the SOUTH_MIGRATION_MODULES set... | <commit_before><commit_msg>Raise error if taggit.migrations imported for Django <=1.6
Fixes gh-219.<commit_after>"""
Django migrations for taggit app
This package does not contain South migrations. South migrations can be found
in the ``south_migrations`` package.
"""
SOUTH_ERROR_MESSAGE = """\n
For South support, ... | |
47eecbb86e78d79666c6ae44efa47915f8807621 | doctor/utils.py | doctor/utils.py | from django.views.debug import cleanse_setting
def cleanse_dictionary(dictionary):
"""
Cleanse sensitive values in a dictionary.
"""
cleansed_dictionary = {}
for key, val in dictionary.iteritems():
cleansed_dictionary[key] = cleanse_setting(key, val)
return cleansed_dictionary
| from django.utils.datastructures import SortedDict
from django.views.debug import cleanse_setting
def cleanse_dictionary(dictionary):
"""
Cleanse sensitive values in a dictionary.
"""
cleansed_dictionary = SortedDict()
for key, val in dictionary.iteritems():
cleansed_dictionary[key] = cl... | Use sorted dictionary in cleanse_dictionary. | Use sorted dictionary in cleanse_dictionary.
| Python | bsd-3-clause | novapost/django-doctor,python-hospital/django-doctor,funkbit/django-doctor | from django.views.debug import cleanse_setting
def cleanse_dictionary(dictionary):
"""
Cleanse sensitive values in a dictionary.
"""
cleansed_dictionary = {}
for key, val in dictionary.iteritems():
cleansed_dictionary[key] = cleanse_setting(key, val)
return cleansed_dictionary
Use s... | from django.utils.datastructures import SortedDict
from django.views.debug import cleanse_setting
def cleanse_dictionary(dictionary):
"""
Cleanse sensitive values in a dictionary.
"""
cleansed_dictionary = SortedDict()
for key, val in dictionary.iteritems():
cleansed_dictionary[key] = cl... | <commit_before>from django.views.debug import cleanse_setting
def cleanse_dictionary(dictionary):
"""
Cleanse sensitive values in a dictionary.
"""
cleansed_dictionary = {}
for key, val in dictionary.iteritems():
cleansed_dictionary[key] = cleanse_setting(key, val)
return cleansed_d... | from django.utils.datastructures import SortedDict
from django.views.debug import cleanse_setting
def cleanse_dictionary(dictionary):
"""
Cleanse sensitive values in a dictionary.
"""
cleansed_dictionary = SortedDict()
for key, val in dictionary.iteritems():
cleansed_dictionary[key] = cl... | from django.views.debug import cleanse_setting
def cleanse_dictionary(dictionary):
"""
Cleanse sensitive values in a dictionary.
"""
cleansed_dictionary = {}
for key, val in dictionary.iteritems():
cleansed_dictionary[key] = cleanse_setting(key, val)
return cleansed_dictionary
Use s... | <commit_before>from django.views.debug import cleanse_setting
def cleanse_dictionary(dictionary):
"""
Cleanse sensitive values in a dictionary.
"""
cleansed_dictionary = {}
for key, val in dictionary.iteritems():
cleansed_dictionary[key] = cleanse_setting(key, val)
return cleansed_d... |
4c3786b0b1ad0969bad2865bb11b81be396b5f8d | CMake/vtkTestDriver.py | CMake/vtkTestDriver.py | r"""
This is a script that can be used to run tests that require multiple
executables to be run e.g. those client-server tests.
Usage:
python vtkTestDriver.py --process exe1 arg11 arg12 ...
--process exe2 arg21 arg22 ...
--process ...
"""
import sys
import subproc... | r"""
This is a script that can be used to run tests that require multiple
executables to be run e.g. those client-server tests.
Usage:
python vtkTestDriver.py --process exe1 arg11 arg12 ...
--process exe2 arg21 arg22 ...
--process ...
"""
import sys
import subproc... | Add a delay between process launches. | Add a delay between process launches.
It so happens that the client process was launched before the server causing
deadlocks in some cases. Fixed that by adding a small delay. In reality, we may
need to logic to vtkTestDriver to make it more featured and parse outputs from
processes to handle this correctly. We can do... | Python | bsd-3-clause | candy7393/VTK,sumedhasingla/VTK,mspark93/VTK,jmerkow/VTK,sankhesh/VTK,SimVascular/VTK,sankhesh/VTK,keithroe/vtkoptix,demarle/VTK,jmerkow/VTK,demarle/VTK,mspark93/VTK,jmerkow/VTK,candy7393/VTK,berendkleinhaneveld/VTK,mspark93/VTK,demarle/VTK,mspark93/VTK,sankhesh/VTK,hendradarwin/VTK,keithroe/vtkoptix,msmolens/VTK,johnk... | r"""
This is a script that can be used to run tests that require multiple
executables to be run e.g. those client-server tests.
Usage:
python vtkTestDriver.py --process exe1 arg11 arg12 ...
--process exe2 arg21 arg22 ...
--process ...
"""
import sys
import subproc... | r"""
This is a script that can be used to run tests that require multiple
executables to be run e.g. those client-server tests.
Usage:
python vtkTestDriver.py --process exe1 arg11 arg12 ...
--process exe2 arg21 arg22 ...
--process ...
"""
import sys
import subproc... | <commit_before>r"""
This is a script that can be used to run tests that require multiple
executables to be run e.g. those client-server tests.
Usage:
python vtkTestDriver.py --process exe1 arg11 arg12 ...
--process exe2 arg21 arg22 ...
--process ...
"""
import sys... | r"""
This is a script that can be used to run tests that require multiple
executables to be run e.g. those client-server tests.
Usage:
python vtkTestDriver.py --process exe1 arg11 arg12 ...
--process exe2 arg21 arg22 ...
--process ...
"""
import sys
import subproc... | r"""
This is a script that can be used to run tests that require multiple
executables to be run e.g. those client-server tests.
Usage:
python vtkTestDriver.py --process exe1 arg11 arg12 ...
--process exe2 arg21 arg22 ...
--process ...
"""
import sys
import subproc... | <commit_before>r"""
This is a script that can be used to run tests that require multiple
executables to be run e.g. those client-server tests.
Usage:
python vtkTestDriver.py --process exe1 arg11 arg12 ...
--process exe2 arg21 arg22 ...
--process ...
"""
import sys... |
18b8c8cafcfc61e0b6bb170438a405a7c0406da0 | mkdocs/gh_deploy.py | mkdocs/gh_deploy.py | import subprocess
import os
def gh_deploy(config):
if not os.path.exists('.git'):
print 'Cannot deploy - this directory does not appear to be a git repository'
return
print "Copying '%s' to `gh-pages` branch and pushing to GitHub." % config['site_dir']
try:
subprocess.check_call(['... | import subprocess
import os
def gh_deploy(config):
if not os.path.exists('.git'):
print 'Cannot deploy - this directory does not appear to be a git repository'
return
print "Copying '%s' to `gh-pages` branch and pushing to GitHub." % config['site_dir']
try:
subprocess.check_call(['... | Support both remote URL styles in gh-deploy. | Support both remote URL styles in gh-deploy.
| Python | bsd-2-clause | jpush/mkdocs,davidgillies/mkdocs,kubikusrubikus/mkdocs,mlzummo/mkdocs,d0ugal/mkdocs,mkdocs/mkdocs,ramramps/mkdocs,peter1000/mkdocs,williamjmorenor/mkdocs,vi4m/mkdocs,longjl/mkdocs,nicoddemus/mkdocs,xeechou/mkblogs,fujita-shintaro/mkdocs,jamesbeebop/mkdocs,lbenet/mkdocs,justinkinney/mkdocs,michaelmcandrew/mkdocs,xeechou... | import subprocess
import os
def gh_deploy(config):
if not os.path.exists('.git'):
print 'Cannot deploy - this directory does not appear to be a git repository'
return
print "Copying '%s' to `gh-pages` branch and pushing to GitHub." % config['site_dir']
try:
subprocess.check_call(['... | import subprocess
import os
def gh_deploy(config):
if not os.path.exists('.git'):
print 'Cannot deploy - this directory does not appear to be a git repository'
return
print "Copying '%s' to `gh-pages` branch and pushing to GitHub." % config['site_dir']
try:
subprocess.check_call(['... | <commit_before>import subprocess
import os
def gh_deploy(config):
if not os.path.exists('.git'):
print 'Cannot deploy - this directory does not appear to be a git repository'
return
print "Copying '%s' to `gh-pages` branch and pushing to GitHub." % config['site_dir']
try:
subproces... | import subprocess
import os
def gh_deploy(config):
if not os.path.exists('.git'):
print 'Cannot deploy - this directory does not appear to be a git repository'
return
print "Copying '%s' to `gh-pages` branch and pushing to GitHub." % config['site_dir']
try:
subprocess.check_call(['... | import subprocess
import os
def gh_deploy(config):
if not os.path.exists('.git'):
print 'Cannot deploy - this directory does not appear to be a git repository'
return
print "Copying '%s' to `gh-pages` branch and pushing to GitHub." % config['site_dir']
try:
subprocess.check_call(['... | <commit_before>import subprocess
import os
def gh_deploy(config):
if not os.path.exists('.git'):
print 'Cannot deploy - this directory does not appear to be a git repository'
return
print "Copying '%s' to `gh-pages` branch and pushing to GitHub." % config['site_dir']
try:
subproces... |
6358f3fb8a3ece53adeb71f9b59f96a5a3a9ca70 | examples/system/ulp_adc/example_test.py | examples/system/ulp_adc/example_test.py | from __future__ import unicode_literals
from tiny_test_fw import Utility
import re
import ttfw_idf
@ttfw_idf.idf_example_test(env_tag='Example_GENERIC')
def test_examples_ulp_adc(env, extra_data):
dut = env.get_dut('ulp_adc', 'examples/system/ulp_adc')
dut.start_app()
dut.expect_all('Not ULP wakeup',
... | from __future__ import unicode_literals
from tiny_test_fw import Utility
import re
import ttfw_idf
@ttfw_idf.idf_example_test(env_tag='Example_GENERIC')
def test_examples_ulp_adc(env, extra_data):
dut = env.get_dut('ulp_adc', 'examples/system/ulp_adc')
dut.start_app()
dut.expect_all('Not ULP wakeup',
... | Fix regex in ulp_adc example test | CI: Fix regex in ulp_adc example test
| Python | apache-2.0 | espressif/esp-idf,espressif/esp-idf,espressif/esp-idf,espressif/esp-idf | from __future__ import unicode_literals
from tiny_test_fw import Utility
import re
import ttfw_idf
@ttfw_idf.idf_example_test(env_tag='Example_GENERIC')
def test_examples_ulp_adc(env, extra_data):
dut = env.get_dut('ulp_adc', 'examples/system/ulp_adc')
dut.start_app()
dut.expect_all('Not ULP wakeup',
... | from __future__ import unicode_literals
from tiny_test_fw import Utility
import re
import ttfw_idf
@ttfw_idf.idf_example_test(env_tag='Example_GENERIC')
def test_examples_ulp_adc(env, extra_data):
dut = env.get_dut('ulp_adc', 'examples/system/ulp_adc')
dut.start_app()
dut.expect_all('Not ULP wakeup',
... | <commit_before>from __future__ import unicode_literals
from tiny_test_fw import Utility
import re
import ttfw_idf
@ttfw_idf.idf_example_test(env_tag='Example_GENERIC')
def test_examples_ulp_adc(env, extra_data):
dut = env.get_dut('ulp_adc', 'examples/system/ulp_adc')
dut.start_app()
dut.expect_all('Not ... | from __future__ import unicode_literals
from tiny_test_fw import Utility
import re
import ttfw_idf
@ttfw_idf.idf_example_test(env_tag='Example_GENERIC')
def test_examples_ulp_adc(env, extra_data):
dut = env.get_dut('ulp_adc', 'examples/system/ulp_adc')
dut.start_app()
dut.expect_all('Not ULP wakeup',
... | from __future__ import unicode_literals
from tiny_test_fw import Utility
import re
import ttfw_idf
@ttfw_idf.idf_example_test(env_tag='Example_GENERIC')
def test_examples_ulp_adc(env, extra_data):
dut = env.get_dut('ulp_adc', 'examples/system/ulp_adc')
dut.start_app()
dut.expect_all('Not ULP wakeup',
... | <commit_before>from __future__ import unicode_literals
from tiny_test_fw import Utility
import re
import ttfw_idf
@ttfw_idf.idf_example_test(env_tag='Example_GENERIC')
def test_examples_ulp_adc(env, extra_data):
dut = env.get_dut('ulp_adc', 'examples/system/ulp_adc')
dut.start_app()
dut.expect_all('Not ... |
f2d2706c7943108c26357bcd9b6dfd92229ae7ce | blo/__init__.py | blo/__init__.py | from .BloArticle import BloArticle
class Blo:
def __init__(self):
pass
if __name__ == '__main__':
# TODO: implement main routine of Blo.
# blo [-c config_file] markdown_file.md
# -- if no -c option then load config file from default path (current directory).
# ---- if no configuration fil... | import configparser
import optparse
from .BloArticle import BloArticle
class Blo:
def __init__(self):
pass
if __name__ == '__main__':
parser = optparse.OptionParser("usage: %prog [option] markdown_file.md")
parser.add_option("-c", "--config", dest="config_file",
default="./b... | Implement command line option parse program. | Implement command line option parse program.
| Python | mit | 10nin/blo,10nin/blo | from .BloArticle import BloArticle
class Blo:
def __init__(self):
pass
if __name__ == '__main__':
# TODO: implement main routine of Blo.
# blo [-c config_file] markdown_file.md
# -- if no -c option then load config file from default path (current directory).
# ---- if no configuration fil... | import configparser
import optparse
from .BloArticle import BloArticle
class Blo:
def __init__(self):
pass
if __name__ == '__main__':
parser = optparse.OptionParser("usage: %prog [option] markdown_file.md")
parser.add_option("-c", "--config", dest="config_file",
default="./b... | <commit_before>from .BloArticle import BloArticle
class Blo:
def __init__(self):
pass
if __name__ == '__main__':
# TODO: implement main routine of Blo.
# blo [-c config_file] markdown_file.md
# -- if no -c option then load config file from default path (current directory).
# ---- if no co... | import configparser
import optparse
from .BloArticle import BloArticle
class Blo:
def __init__(self):
pass
if __name__ == '__main__':
parser = optparse.OptionParser("usage: %prog [option] markdown_file.md")
parser.add_option("-c", "--config", dest="config_file",
default="./b... | from .BloArticle import BloArticle
class Blo:
def __init__(self):
pass
if __name__ == '__main__':
# TODO: implement main routine of Blo.
# blo [-c config_file] markdown_file.md
# -- if no -c option then load config file from default path (current directory).
# ---- if no configuration fil... | <commit_before>from .BloArticle import BloArticle
class Blo:
def __init__(self):
pass
if __name__ == '__main__':
# TODO: implement main routine of Blo.
# blo [-c config_file] markdown_file.md
# -- if no -c option then load config file from default path (current directory).
# ---- if no co... |
4a9e08b3ab73ce9b1d33c40f9d95d348b1bd8e6a | tests/test_sphere_manifold.py | tests/test_sphere_manifold.py | import unittest
import numpy as np
import numpy.linalg as la
import numpy.random as rnd
import numpy.testing as np_testing
from pymanopt.manifolds import Sphere
class TestSphereManifold(unittest.TestCase):
def setUp(self):
self.m = m = 100
self.n = n = 50
self.sphere = Sphere(m, n)
... | import unittest
import numpy as np
import numpy.linalg as la
import numpy.random as rnd
import numpy.testing as np_testing
from pymanopt.manifolds import Sphere
class TestSphereManifold(unittest.TestCase):
def setUp(self):
self.m = m = 100
self.n = n = 50
self.sphere = Sphere(m, n)
... | Fix typo in unit test class of the sphere manifold | Fix typo in unit test class of the sphere manifold
Signed-off-by: Niklas Koep <[email protected]>
| Python | bsd-3-clause | nkoep/pymanopt,pymanopt/pymanopt,nkoep/pymanopt,tingelst/pymanopt,pymanopt/pymanopt,nkoep/pymanopt,j-towns/pymanopt | import unittest
import numpy as np
import numpy.linalg as la
import numpy.random as rnd
import numpy.testing as np_testing
from pymanopt.manifolds import Sphere
class TestSphereManifold(unittest.TestCase):
def setUp(self):
self.m = m = 100
self.n = n = 50
self.sphere = Sphere(m, n)
... | import unittest
import numpy as np
import numpy.linalg as la
import numpy.random as rnd
import numpy.testing as np_testing
from pymanopt.manifolds import Sphere
class TestSphereManifold(unittest.TestCase):
def setUp(self):
self.m = m = 100
self.n = n = 50
self.sphere = Sphere(m, n)
... | <commit_before>import unittest
import numpy as np
import numpy.linalg as la
import numpy.random as rnd
import numpy.testing as np_testing
from pymanopt.manifolds import Sphere
class TestSphereManifold(unittest.TestCase):
def setUp(self):
self.m = m = 100
self.n = n = 50
self.sphere = Sph... | import unittest
import numpy as np
import numpy.linalg as la
import numpy.random as rnd
import numpy.testing as np_testing
from pymanopt.manifolds import Sphere
class TestSphereManifold(unittest.TestCase):
def setUp(self):
self.m = m = 100
self.n = n = 50
self.sphere = Sphere(m, n)
... | import unittest
import numpy as np
import numpy.linalg as la
import numpy.random as rnd
import numpy.testing as np_testing
from pymanopt.manifolds import Sphere
class TestSphereManifold(unittest.TestCase):
def setUp(self):
self.m = m = 100
self.n = n = 50
self.sphere = Sphere(m, n)
... | <commit_before>import unittest
import numpy as np
import numpy.linalg as la
import numpy.random as rnd
import numpy.testing as np_testing
from pymanopt.manifolds import Sphere
class TestSphereManifold(unittest.TestCase):
def setUp(self):
self.m = m = 100
self.n = n = 50
self.sphere = Sph... |
114f2e4c33a924dce32eef80f291c7a5d623de4c | tools/clang/scripts/update.py | tools/clang/scripts/update.py | #!/usr/bin/env python
# Copyright (c) 2011 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""Windows can't run .sh files, so this is a small python wrapper around
update.sh.
"""
import os
import subprocess
import sys
d... | #!/usr/bin/env python
# Copyright (c) 2012 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""Windows can't run .sh files, so this is a small python wrapper around
update.sh.
"""
import os
import subprocess
import sys
d... | Fix spurious '../llvm/configure: line 541: 0: Bad file descriptor' on clang roll try jobs. | clang: Fix spurious '../llvm/configure: line 541: 0: Bad file descriptor' on clang roll try jobs.
The subprocess module used to dup() stdin, but apparently that's no longer true. So dup it manually.
Patch from Jay Soffian <[email protected]>!
BUG=none
TEST=Put a new clang revision in tools/clang/scripts/update.sh,... | Python | bsd-3-clause | ropik/chromium,yitian134/chromium,adobe/chromium,gavinp/chromium,gavinp/chromium,ropik/chromium,gavinp/chromium,ropik/chromium,adobe/chromium,ropik/chromium,yitian134/chromium,gavinp/chromium,yitian134/chromium,adobe/chromium,gavinp/chromium,yitian134/chromium,adobe/chromium,adobe/chromium,gavinp/chromium,yitian134/chr... | #!/usr/bin/env python
# Copyright (c) 2011 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""Windows can't run .sh files, so this is a small python wrapper around
update.sh.
"""
import os
import subprocess
import sys
d... | #!/usr/bin/env python
# Copyright (c) 2012 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""Windows can't run .sh files, so this is a small python wrapper around
update.sh.
"""
import os
import subprocess
import sys
d... | <commit_before>#!/usr/bin/env python
# Copyright (c) 2011 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""Windows can't run .sh files, so this is a small python wrapper around
update.sh.
"""
import os
import subprocess... | #!/usr/bin/env python
# Copyright (c) 2012 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""Windows can't run .sh files, so this is a small python wrapper around
update.sh.
"""
import os
import subprocess
import sys
d... | #!/usr/bin/env python
# Copyright (c) 2011 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""Windows can't run .sh files, so this is a small python wrapper around
update.sh.
"""
import os
import subprocess
import sys
d... | <commit_before>#!/usr/bin/env python
# Copyright (c) 2011 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""Windows can't run .sh files, so this is a small python wrapper around
update.sh.
"""
import os
import subprocess... |
fae25cfe1a19de44d950e1a04fb6caa4f452b818 | test/test_pre_commit.py | test/test_pre_commit.py | import unittest
from mock import Mock, patch
from captainhook import pre_commit
class TestMain(unittest.TestCase):
@patch('captainhook.pre_commit.get_files')
@patch('captainhook.pre_commit.HookConfig')
@patch('captainhook.pre_commit.checks')
def test_calling_run_without_args(self, checks, HookConfi... | import unittest
from mock import Mock, patch
from captainhook import pre_commit
class TestMain(unittest.TestCase):
def setUp(self):
self.get_files_patch = patch('captainhook.pre_commit.get_files')
get_files = self.get_files_patch.start()
get_files.return_value = ['file_one']
se... | Replace pre-commit test patch decorators with setUp/tearDown patching. | Replace pre-commit test patch decorators with setUp/tearDown patching.
| Python | bsd-3-clause | Friz-zy/captainhook,alexcouper/captainhook,pczerkas/captainhook | import unittest
from mock import Mock, patch
from captainhook import pre_commit
class TestMain(unittest.TestCase):
@patch('captainhook.pre_commit.get_files')
@patch('captainhook.pre_commit.HookConfig')
@patch('captainhook.pre_commit.checks')
def test_calling_run_without_args(self, checks, HookConfi... | import unittest
from mock import Mock, patch
from captainhook import pre_commit
class TestMain(unittest.TestCase):
def setUp(self):
self.get_files_patch = patch('captainhook.pre_commit.get_files')
get_files = self.get_files_patch.start()
get_files.return_value = ['file_one']
se... | <commit_before>import unittest
from mock import Mock, patch
from captainhook import pre_commit
class TestMain(unittest.TestCase):
@patch('captainhook.pre_commit.get_files')
@patch('captainhook.pre_commit.HookConfig')
@patch('captainhook.pre_commit.checks')
def test_calling_run_without_args(self, ch... | import unittest
from mock import Mock, patch
from captainhook import pre_commit
class TestMain(unittest.TestCase):
def setUp(self):
self.get_files_patch = patch('captainhook.pre_commit.get_files')
get_files = self.get_files_patch.start()
get_files.return_value = ['file_one']
se... | import unittest
from mock import Mock, patch
from captainhook import pre_commit
class TestMain(unittest.TestCase):
@patch('captainhook.pre_commit.get_files')
@patch('captainhook.pre_commit.HookConfig')
@patch('captainhook.pre_commit.checks')
def test_calling_run_without_args(self, checks, HookConfi... | <commit_before>import unittest
from mock import Mock, patch
from captainhook import pre_commit
class TestMain(unittest.TestCase):
@patch('captainhook.pre_commit.get_files')
@patch('captainhook.pre_commit.HookConfig')
@patch('captainhook.pre_commit.checks')
def test_calling_run_without_args(self, ch... |
18ff5cc690fada5c437a1be8e99df57cd8edfaea | tests/extractor_test.py | tests/extractor_test.py | import numpy as np
from unittest import TestCase
from cartography.extractor import LibrosaFeatureExtractor
def gen_signal(dur, sr, freq):
return np.pi * 2 * freq * np.arange(dur * sr) / float(sr)
class TestLibrosaFeatureExtractor(TestCase):
@classmethod
def setUpClass(cls):
cls.test_dur = 2
cls.test_fr... | import numpy as np
from unittest import TestCase
from cartography.extractor import LibrosaFeatureExtractor
def gen_signal(dur, sr, freq):
return np.pi * 2 * freq * np.arange(dur * sr) / float(sr)
class TestLibrosaFeatureExtractor(TestCase):
@classmethod
def setUpClass(cls):
cls.test_dur = 2
... | Fix spacing. Update mfcc test to check columns | Fix spacing. Update mfcc test to check columns
| Python | mit | tingled/synthetic-cartography,tingled/synthetic-cartography | import numpy as np
from unittest import TestCase
from cartography.extractor import LibrosaFeatureExtractor
def gen_signal(dur, sr, freq):
return np.pi * 2 * freq * np.arange(dur * sr) / float(sr)
class TestLibrosaFeatureExtractor(TestCase):
@classmethod
def setUpClass(cls):
cls.test_dur = 2
cls.test_fr... | import numpy as np
from unittest import TestCase
from cartography.extractor import LibrosaFeatureExtractor
def gen_signal(dur, sr, freq):
return np.pi * 2 * freq * np.arange(dur * sr) / float(sr)
class TestLibrosaFeatureExtractor(TestCase):
@classmethod
def setUpClass(cls):
cls.test_dur = 2
... | <commit_before>import numpy as np
from unittest import TestCase
from cartography.extractor import LibrosaFeatureExtractor
def gen_signal(dur, sr, freq):
return np.pi * 2 * freq * np.arange(dur * sr) / float(sr)
class TestLibrosaFeatureExtractor(TestCase):
@classmethod
def setUpClass(cls):
cls.test_dur = 2
... | import numpy as np
from unittest import TestCase
from cartography.extractor import LibrosaFeatureExtractor
def gen_signal(dur, sr, freq):
return np.pi * 2 * freq * np.arange(dur * sr) / float(sr)
class TestLibrosaFeatureExtractor(TestCase):
@classmethod
def setUpClass(cls):
cls.test_dur = 2
... | import numpy as np
from unittest import TestCase
from cartography.extractor import LibrosaFeatureExtractor
def gen_signal(dur, sr, freq):
return np.pi * 2 * freq * np.arange(dur * sr) / float(sr)
class TestLibrosaFeatureExtractor(TestCase):
@classmethod
def setUpClass(cls):
cls.test_dur = 2
cls.test_fr... | <commit_before>import numpy as np
from unittest import TestCase
from cartography.extractor import LibrosaFeatureExtractor
def gen_signal(dur, sr, freq):
return np.pi * 2 * freq * np.arange(dur * sr) / float(sr)
class TestLibrosaFeatureExtractor(TestCase):
@classmethod
def setUpClass(cls):
cls.test_dur = 2
... |
8989258dab574cff0bc8001f1d59232983d15f68 | grammpy/Grammars/PrettyApiGrammar.py | grammpy/Grammars/PrettyApiGrammar.py | #!/usr/bin/env python
"""
:Author Patrik Valkovic
:Created 01.08.2017 07:33
:Licence GNUv3
Part of grammpy
"""
from .MultipleRulesGrammar import MultipleRulesGrammar as Grammar
class PrettyApiGrammar(Grammar):
def __init__(self,
terminals=None,
nonterminals=None,
... | #!/usr/bin/env python
"""
:Author Patrik Valkovic
:Created 01.08.2017 07:33
:Licence GNUv3
Part of grammpy
"""
from .MultipleRulesGrammar import MultipleRulesGrammar as Grammar
class PrettyApiGrammar(Grammar):
def __init__(self,
terminals=None,
nonterminals=None,
... | Add __copy__ method to grammar | Add __copy__ method to grammar
| Python | mit | PatrikValkovic/grammpy | #!/usr/bin/env python
"""
:Author Patrik Valkovic
:Created 01.08.2017 07:33
:Licence GNUv3
Part of grammpy
"""
from .MultipleRulesGrammar import MultipleRulesGrammar as Grammar
class PrettyApiGrammar(Grammar):
def __init__(self,
terminals=None,
nonterminals=None,
... | #!/usr/bin/env python
"""
:Author Patrik Valkovic
:Created 01.08.2017 07:33
:Licence GNUv3
Part of grammpy
"""
from .MultipleRulesGrammar import MultipleRulesGrammar as Grammar
class PrettyApiGrammar(Grammar):
def __init__(self,
terminals=None,
nonterminals=None,
... | <commit_before>#!/usr/bin/env python
"""
:Author Patrik Valkovic
:Created 01.08.2017 07:33
:Licence GNUv3
Part of grammpy
"""
from .MultipleRulesGrammar import MultipleRulesGrammar as Grammar
class PrettyApiGrammar(Grammar):
def __init__(self,
terminals=None,
nonterminals=None,... | #!/usr/bin/env python
"""
:Author Patrik Valkovic
:Created 01.08.2017 07:33
:Licence GNUv3
Part of grammpy
"""
from .MultipleRulesGrammar import MultipleRulesGrammar as Grammar
class PrettyApiGrammar(Grammar):
def __init__(self,
terminals=None,
nonterminals=None,
... | #!/usr/bin/env python
"""
:Author Patrik Valkovic
:Created 01.08.2017 07:33
:Licence GNUv3
Part of grammpy
"""
from .MultipleRulesGrammar import MultipleRulesGrammar as Grammar
class PrettyApiGrammar(Grammar):
def __init__(self,
terminals=None,
nonterminals=None,
... | <commit_before>#!/usr/bin/env python
"""
:Author Patrik Valkovic
:Created 01.08.2017 07:33
:Licence GNUv3
Part of grammpy
"""
from .MultipleRulesGrammar import MultipleRulesGrammar as Grammar
class PrettyApiGrammar(Grammar):
def __init__(self,
terminals=None,
nonterminals=None,... |
e4f7deee8c4154781c2e945bfc14cf2028586dc1 | hellopython/print_method/__init__.py | hellopython/print_method/__init__.py | import codecs
import io
import sys
from workshopper.problems import BaseProblem
class Problem(BaseProblem):
def test(self, file):
old_stdout = sys.stdout
sys.stdout = io.StringIO()
eval(codecs.open(file).read())
message = sys.stdout.getvalue()
sys.stdout = old_stdout
... | import codecs
import io
import sys
from workshopper.problems import BaseProblem
class Problem(BaseProblem):
title = 'Print method'
def test(self, file):
old_stdout = sys.stdout
sys.stdout = io.StringIO()
eval(codecs.open(file).read())
message = sys.stdout.getvalue()
s... | Add a title to the print_method problem | Add a title to the print_method problem
| Python | mit | pyschool/hipyschool | import codecs
import io
import sys
from workshopper.problems import BaseProblem
class Problem(BaseProblem):
def test(self, file):
old_stdout = sys.stdout
sys.stdout = io.StringIO()
eval(codecs.open(file).read())
message = sys.stdout.getvalue()
sys.stdout = old_stdout
... | import codecs
import io
import sys
from workshopper.problems import BaseProblem
class Problem(BaseProblem):
title = 'Print method'
def test(self, file):
old_stdout = sys.stdout
sys.stdout = io.StringIO()
eval(codecs.open(file).read())
message = sys.stdout.getvalue()
s... | <commit_before>import codecs
import io
import sys
from workshopper.problems import BaseProblem
class Problem(BaseProblem):
def test(self, file):
old_stdout = sys.stdout
sys.stdout = io.StringIO()
eval(codecs.open(file).read())
message = sys.stdout.getvalue()
sys.stdout = ... | import codecs
import io
import sys
from workshopper.problems import BaseProblem
class Problem(BaseProblem):
title = 'Print method'
def test(self, file):
old_stdout = sys.stdout
sys.stdout = io.StringIO()
eval(codecs.open(file).read())
message = sys.stdout.getvalue()
s... | import codecs
import io
import sys
from workshopper.problems import BaseProblem
class Problem(BaseProblem):
def test(self, file):
old_stdout = sys.stdout
sys.stdout = io.StringIO()
eval(codecs.open(file).read())
message = sys.stdout.getvalue()
sys.stdout = old_stdout
... | <commit_before>import codecs
import io
import sys
from workshopper.problems import BaseProblem
class Problem(BaseProblem):
def test(self, file):
old_stdout = sys.stdout
sys.stdout = io.StringIO()
eval(codecs.open(file).read())
message = sys.stdout.getvalue()
sys.stdout = ... |
debe3a250a04986583589b1192cb6111b8b6c228 | pydelhiconf/uix/screens/screenabout.py | pydelhiconf/uix/screens/screenabout.py | from kivy.uix.screenmanager import Screen
from kivy.lang import Builder
from kivy.factory import Factory
from functools import partial
import webbrowser
class ScreenAbout(Screen):
Builder.load_string('''
<ScreenAbout>
spacing: dp(9)
name: 'ScreenAbout'
ScrollView
id: scroll
ScrollGrid... | from kivy.uix.screenmanager import Screen
from kivy.lang import Builder
from kivy.factory import Factory
from functools import partial
import webbrowser
class ScreenAbout(Screen):
Builder.load_string('''
<ScreenAbout>
spacing: dp(9)
name: 'ScreenAbout'
ScrollView
id: scroll
ScrollGrid... | Add button that links to website | Add button that links to website
| Python | agpl-3.0 | pydelhi/pydelhi_mobile,shivan1b/pydelhi_mobile,samukasmk/pythonbrasil_mobile,akshayaurora/PyDelhiMobile | from kivy.uix.screenmanager import Screen
from kivy.lang import Builder
from kivy.factory import Factory
from functools import partial
import webbrowser
class ScreenAbout(Screen):
Builder.load_string('''
<ScreenAbout>
spacing: dp(9)
name: 'ScreenAbout'
ScrollView
id: scroll
ScrollGrid... | from kivy.uix.screenmanager import Screen
from kivy.lang import Builder
from kivy.factory import Factory
from functools import partial
import webbrowser
class ScreenAbout(Screen):
Builder.load_string('''
<ScreenAbout>
spacing: dp(9)
name: 'ScreenAbout'
ScrollView
id: scroll
ScrollGrid... | <commit_before>from kivy.uix.screenmanager import Screen
from kivy.lang import Builder
from kivy.factory import Factory
from functools import partial
import webbrowser
class ScreenAbout(Screen):
Builder.load_string('''
<ScreenAbout>
spacing: dp(9)
name: 'ScreenAbout'
ScrollView
id: scroll
... | from kivy.uix.screenmanager import Screen
from kivy.lang import Builder
from kivy.factory import Factory
from functools import partial
import webbrowser
class ScreenAbout(Screen):
Builder.load_string('''
<ScreenAbout>
spacing: dp(9)
name: 'ScreenAbout'
ScrollView
id: scroll
ScrollGrid... | from kivy.uix.screenmanager import Screen
from kivy.lang import Builder
from kivy.factory import Factory
from functools import partial
import webbrowser
class ScreenAbout(Screen):
Builder.load_string('''
<ScreenAbout>
spacing: dp(9)
name: 'ScreenAbout'
ScrollView
id: scroll
ScrollGrid... | <commit_before>from kivy.uix.screenmanager import Screen
from kivy.lang import Builder
from kivy.factory import Factory
from functools import partial
import webbrowser
class ScreenAbout(Screen):
Builder.load_string('''
<ScreenAbout>
spacing: dp(9)
name: 'ScreenAbout'
ScrollView
id: scroll
... |
46f10ffcf60166fe02e33a6cd686f272ae63674e | saleor/product/forms.py | saleor/product/forms.py | from django import forms
from django.utils.translation import pgettext_lazy
from ..cart.forms import AddToCartForm
from ..product.models import GenericProduct
class GenericProductForm(AddToCartForm):
variant = forms.ChoiceField()
def __init__(self, *args, **kwargs):
super(GenericProductForm, self)._... | from django import forms
from django.utils.translation import pgettext_lazy
from ..cart.forms import AddToCartForm
from ..product.models import GenericProduct
class GenericProductForm(AddToCartForm):
base_variant = forms.CharField(widget=forms.HiddenInput())
variant = forms.ChoiceField(required=False)
d... | Hide variants select input when product has no variants | Hide variants select input when product has no variants
| Python | bsd-3-clause | josesanch/saleor,HyperManTT/ECommerceSaleor,paweltin/saleor,josesanch/saleor,spartonia/saleor,car3oon/saleor,laosunhust/saleor,mociepka/saleor,arth-co/saleor,UITools/saleor,Drekscott/Motlaesaleor,KenMutemi/saleor,rodrigozn/CW-Shop,tfroehlich82/saleor,HyperManTT/ECommerceSaleor,rchav/vinerack,arth-co/saleor,rchav/vinera... | from django import forms
from django.utils.translation import pgettext_lazy
from ..cart.forms import AddToCartForm
from ..product.models import GenericProduct
class GenericProductForm(AddToCartForm):
variant = forms.ChoiceField()
def __init__(self, *args, **kwargs):
super(GenericProductForm, self)._... | from django import forms
from django.utils.translation import pgettext_lazy
from ..cart.forms import AddToCartForm
from ..product.models import GenericProduct
class GenericProductForm(AddToCartForm):
base_variant = forms.CharField(widget=forms.HiddenInput())
variant = forms.ChoiceField(required=False)
d... | <commit_before>from django import forms
from django.utils.translation import pgettext_lazy
from ..cart.forms import AddToCartForm
from ..product.models import GenericProduct
class GenericProductForm(AddToCartForm):
variant = forms.ChoiceField()
def __init__(self, *args, **kwargs):
super(GenericProdu... | from django import forms
from django.utils.translation import pgettext_lazy
from ..cart.forms import AddToCartForm
from ..product.models import GenericProduct
class GenericProductForm(AddToCartForm):
base_variant = forms.CharField(widget=forms.HiddenInput())
variant = forms.ChoiceField(required=False)
d... | from django import forms
from django.utils.translation import pgettext_lazy
from ..cart.forms import AddToCartForm
from ..product.models import GenericProduct
class GenericProductForm(AddToCartForm):
variant = forms.ChoiceField()
def __init__(self, *args, **kwargs):
super(GenericProductForm, self)._... | <commit_before>from django import forms
from django.utils.translation import pgettext_lazy
from ..cart.forms import AddToCartForm
from ..product.models import GenericProduct
class GenericProductForm(AddToCartForm):
variant = forms.ChoiceField()
def __init__(self, *args, **kwargs):
super(GenericProdu... |
3301f112eb1a8e8706fc17373cc71c2f02691382 | main.py | main.py | #!/usr/bin/env python3
# Pianette
# A command-line emulator of a PS2 Game Pad Controller
# that asynchronously listens to GPIO EDGE_RISING
# inputs from sensors and sends Serial commands to
# an ATMEGA328P acting as a fake SPI Slave for the Console.
# Written in Python 3.
import pianette.config
import sys
from p... | #!/usr/bin/env python3
# Pianette
# A command-line emulator of a PS2 Game Pad Controller
# that asynchronously listens to GPIO EDGE_RISING
# inputs from sensors and sends Serial commands to
# an ATMEGA328P acting as a fake SPI Slave for the Console.
# Written in Python 3.
import pianette.config
import sys
from p... | Prepare for config and command line arguments | Prepare for config and command line arguments
| Python | mit | tchapi/pianette,tchapi/pianette,tchapi/pianette,tchapi/pianette | #!/usr/bin/env python3
# Pianette
# A command-line emulator of a PS2 Game Pad Controller
# that asynchronously listens to GPIO EDGE_RISING
# inputs from sensors and sends Serial commands to
# an ATMEGA328P acting as a fake SPI Slave for the Console.
# Written in Python 3.
import pianette.config
import sys
from p... | #!/usr/bin/env python3
# Pianette
# A command-line emulator of a PS2 Game Pad Controller
# that asynchronously listens to GPIO EDGE_RISING
# inputs from sensors and sends Serial commands to
# an ATMEGA328P acting as a fake SPI Slave for the Console.
# Written in Python 3.
import pianette.config
import sys
from p... | <commit_before>#!/usr/bin/env python3
# Pianette
# A command-line emulator of a PS2 Game Pad Controller
# that asynchronously listens to GPIO EDGE_RISING
# inputs from sensors and sends Serial commands to
# an ATMEGA328P acting as a fake SPI Slave for the Console.
# Written in Python 3.
import pianette.config
imp... | #!/usr/bin/env python3
# Pianette
# A command-line emulator of a PS2 Game Pad Controller
# that asynchronously listens to GPIO EDGE_RISING
# inputs from sensors and sends Serial commands to
# an ATMEGA328P acting as a fake SPI Slave for the Console.
# Written in Python 3.
import pianette.config
import sys
from p... | #!/usr/bin/env python3
# Pianette
# A command-line emulator of a PS2 Game Pad Controller
# that asynchronously listens to GPIO EDGE_RISING
# inputs from sensors and sends Serial commands to
# an ATMEGA328P acting as a fake SPI Slave for the Console.
# Written in Python 3.
import pianette.config
import sys
from p... | <commit_before>#!/usr/bin/env python3
# Pianette
# A command-line emulator of a PS2 Game Pad Controller
# that asynchronously listens to GPIO EDGE_RISING
# inputs from sensors and sends Serial commands to
# an ATMEGA328P acting as a fake SPI Slave for the Console.
# Written in Python 3.
import pianette.config
imp... |
5beea76076aa0806f8ee2db5f2169846e7497ef1 | euler_python/problem55.py | euler_python/problem55.py | """
problem55.py
If we take 47, reverse and add, 47 + 74 = 121, which is palindromic. A number
that never forms a palindrome through the reverse and add process is called a
Lychrel number. How many Lychrel numbers are there below ten-thousand? (Only
consider fifty iterations)
"""
from toolset import iterate, quantify,... | """
problem55.py
If we take 47, reverse and add, 47 + 74 = 121, which is palindromic. A number
that never forms a palindrome through the reverse and add process is called a
Lychrel number. How many Lychrel numbers are there below ten-thousand? (Only
consider fifty iterations)
"""
from toolset import iterate, quantify,... | Simplify python solution to 55 | Simplify python solution to 55
| Python | mit | mjwestcott/projecteuler,mjwestcott/projecteuler,mjwestcott/projecteuler | """
problem55.py
If we take 47, reverse and add, 47 + 74 = 121, which is palindromic. A number
that never forms a palindrome through the reverse and add process is called a
Lychrel number. How many Lychrel numbers are there below ten-thousand? (Only
consider fifty iterations)
"""
from toolset import iterate, quantify,... | """
problem55.py
If we take 47, reverse and add, 47 + 74 = 121, which is palindromic. A number
that never forms a palindrome through the reverse and add process is called a
Lychrel number. How many Lychrel numbers are there below ten-thousand? (Only
consider fifty iterations)
"""
from toolset import iterate, quantify,... | <commit_before>"""
problem55.py
If we take 47, reverse and add, 47 + 74 = 121, which is palindromic. A number
that never forms a palindrome through the reverse and add process is called a
Lychrel number. How many Lychrel numbers are there below ten-thousand? (Only
consider fifty iterations)
"""
from toolset import ite... | """
problem55.py
If we take 47, reverse and add, 47 + 74 = 121, which is palindromic. A number
that never forms a palindrome through the reverse and add process is called a
Lychrel number. How many Lychrel numbers are there below ten-thousand? (Only
consider fifty iterations)
"""
from toolset import iterate, quantify,... | """
problem55.py
If we take 47, reverse and add, 47 + 74 = 121, which is palindromic. A number
that never forms a palindrome through the reverse and add process is called a
Lychrel number. How many Lychrel numbers are there below ten-thousand? (Only
consider fifty iterations)
"""
from toolset import iterate, quantify,... | <commit_before>"""
problem55.py
If we take 47, reverse and add, 47 + 74 = 121, which is palindromic. A number
that never forms a palindrome through the reverse and add process is called a
Lychrel number. How many Lychrel numbers are there below ten-thousand? (Only
consider fifty iterations)
"""
from toolset import ite... |
91dee60bb768a8ab80530cab79649b60afdf7daf | mbed.py | mbed.py | from utils.helpers import error, find_mbed_dir, is_mbed_dir
import sys, os
from utils import set_project_dir
from commands.set import CmdSet
from commands.get import CmdGet
from commands.clone import CmdClone
from commands.compile import CmdCompile
from commands.list import CmdList
###################################... | from utils.helpers import error, find_mbed_dir, is_mbed_dir
import sys, os
from utils import set_project_dir
from commands.set import CmdSet
from commands.get import CmdGet
from commands.clone import CmdClone
from commands.compile import CmdCompile
from commands.list import CmdList
###################################... | Fix Python module search path | Fix Python module search path
| Python | apache-2.0 | bogdanm/mbed-clt | from utils.helpers import error, find_mbed_dir, is_mbed_dir
import sys, os
from utils import set_project_dir
from commands.set import CmdSet
from commands.get import CmdGet
from commands.clone import CmdClone
from commands.compile import CmdCompile
from commands.list import CmdList
###################################... | from utils.helpers import error, find_mbed_dir, is_mbed_dir
import sys, os
from utils import set_project_dir
from commands.set import CmdSet
from commands.get import CmdGet
from commands.clone import CmdClone
from commands.compile import CmdCompile
from commands.list import CmdList
###################################... | <commit_before>from utils.helpers import error, find_mbed_dir, is_mbed_dir
import sys, os
from utils import set_project_dir
from commands.set import CmdSet
from commands.get import CmdGet
from commands.clone import CmdClone
from commands.compile import CmdCompile
from commands.list import CmdList
####################... | from utils.helpers import error, find_mbed_dir, is_mbed_dir
import sys, os
from utils import set_project_dir
from commands.set import CmdSet
from commands.get import CmdGet
from commands.clone import CmdClone
from commands.compile import CmdCompile
from commands.list import CmdList
###################################... | from utils.helpers import error, find_mbed_dir, is_mbed_dir
import sys, os
from utils import set_project_dir
from commands.set import CmdSet
from commands.get import CmdGet
from commands.clone import CmdClone
from commands.compile import CmdCompile
from commands.list import CmdList
###################################... | <commit_before>from utils.helpers import error, find_mbed_dir, is_mbed_dir
import sys, os
from utils import set_project_dir
from commands.set import CmdSet
from commands.get import CmdGet
from commands.clone import CmdClone
from commands.compile import CmdCompile
from commands.list import CmdList
####################... |
0f0da20d8bf270d9c9f329b4ed0bbba22de2d109 | moksha/api/streams/datastream.py | moksha/api/streams/datastream.py | import logging
from datetime import timedelta
from twisted.internet.task import LoopingCall
from moksha.hub.hub import MokshaHub
log = logging.getLogger('moksha.hub')
class DataStream(object):
""" The parent DataStream class. """
def __init__(self):
self.hub = MokshaHub()
def send_message(self... | import logging
from datetime import timedelta
from twisted.internet.task import LoopingCall
from moksha.hub.hub import MokshaHub
log = logging.getLogger('moksha.hub')
class DataStream(object):
""" The parent DataStream class. """
def __init__(self):
self.hub = MokshaHub()
def send_message(self... | Make our PollingDataStreamers start up right away | Make our PollingDataStreamers start up right away
| Python | apache-2.0 | pombredanne/moksha,ralphbean/moksha,mokshaproject/moksha,mokshaproject/moksha,pombredanne/moksha,lmacken/moksha,ralphbean/moksha,lmacken/moksha,lmacken/moksha,mokshaproject/moksha,ralphbean/moksha,mokshaproject/moksha,pombredanne/moksha,pombredanne/moksha | import logging
from datetime import timedelta
from twisted.internet.task import LoopingCall
from moksha.hub.hub import MokshaHub
log = logging.getLogger('moksha.hub')
class DataStream(object):
""" The parent DataStream class. """
def __init__(self):
self.hub = MokshaHub()
def send_message(self... | import logging
from datetime import timedelta
from twisted.internet.task import LoopingCall
from moksha.hub.hub import MokshaHub
log = logging.getLogger('moksha.hub')
class DataStream(object):
""" The parent DataStream class. """
def __init__(self):
self.hub = MokshaHub()
def send_message(self... | <commit_before>import logging
from datetime import timedelta
from twisted.internet.task import LoopingCall
from moksha.hub.hub import MokshaHub
log = logging.getLogger('moksha.hub')
class DataStream(object):
""" The parent DataStream class. """
def __init__(self):
self.hub = MokshaHub()
def se... | import logging
from datetime import timedelta
from twisted.internet.task import LoopingCall
from moksha.hub.hub import MokshaHub
log = logging.getLogger('moksha.hub')
class DataStream(object):
""" The parent DataStream class. """
def __init__(self):
self.hub = MokshaHub()
def send_message(self... | import logging
from datetime import timedelta
from twisted.internet.task import LoopingCall
from moksha.hub.hub import MokshaHub
log = logging.getLogger('moksha.hub')
class DataStream(object):
""" The parent DataStream class. """
def __init__(self):
self.hub = MokshaHub()
def send_message(self... | <commit_before>import logging
from datetime import timedelta
from twisted.internet.task import LoopingCall
from moksha.hub.hub import MokshaHub
log = logging.getLogger('moksha.hub')
class DataStream(object):
""" The parent DataStream class. """
def __init__(self):
self.hub = MokshaHub()
def se... |
8d7f4e549a2f83e93de9d440a7aa979b73cfba38 | examples/my_test_suite.py | examples/my_test_suite.py | ''' NOTE: This test suite contains 2 passing tests and 2 failing tests. '''
from seleniumbase import BaseCase
class MyTestSuite(BaseCase):
def test_1(self):
self.open("http://xkcd.com/1663/")
self.find_text("Garden", "div#ctitle", timeout=3)
for p in xrange(4):
self.click('a[... | ''' NOTE: This test suite contains 2 passing tests and 2 failing tests. '''
from seleniumbase import BaseCase
class MyTestSuite(BaseCase):
def test_1(self):
self.open("http://xkcd.com/1663/")
self.find_text("Garden", "div#ctitle", timeout=3)
for p in xrange(4):
self.click('a[... | Make it clear that a few example tests fail on purpose | Make it clear that a few example tests fail on purpose
| Python | mit | mdmintz/seleniumspot,possoumous/Watchers,mdmintz/SeleniumBase,seleniumbase/SeleniumBase,possoumous/Watchers,mdmintz/SeleniumBase,mdmintz/SeleniumBase,ktp420/SeleniumBase,ktp420/SeleniumBase,ktp420/SeleniumBase,mdmintz/SeleniumBase,possoumous/Watchers,mdmintz/seleniumspot,seleniumbase/SeleniumBase,seleniumbase/SeleniumB... | ''' NOTE: This test suite contains 2 passing tests and 2 failing tests. '''
from seleniumbase import BaseCase
class MyTestSuite(BaseCase):
def test_1(self):
self.open("http://xkcd.com/1663/")
self.find_text("Garden", "div#ctitle", timeout=3)
for p in xrange(4):
self.click('a[... | ''' NOTE: This test suite contains 2 passing tests and 2 failing tests. '''
from seleniumbase import BaseCase
class MyTestSuite(BaseCase):
def test_1(self):
self.open("http://xkcd.com/1663/")
self.find_text("Garden", "div#ctitle", timeout=3)
for p in xrange(4):
self.click('a[... | <commit_before>''' NOTE: This test suite contains 2 passing tests and 2 failing tests. '''
from seleniumbase import BaseCase
class MyTestSuite(BaseCase):
def test_1(self):
self.open("http://xkcd.com/1663/")
self.find_text("Garden", "div#ctitle", timeout=3)
for p in xrange(4):
... | ''' NOTE: This test suite contains 2 passing tests and 2 failing tests. '''
from seleniumbase import BaseCase
class MyTestSuite(BaseCase):
def test_1(self):
self.open("http://xkcd.com/1663/")
self.find_text("Garden", "div#ctitle", timeout=3)
for p in xrange(4):
self.click('a[... | ''' NOTE: This test suite contains 2 passing tests and 2 failing tests. '''
from seleniumbase import BaseCase
class MyTestSuite(BaseCase):
def test_1(self):
self.open("http://xkcd.com/1663/")
self.find_text("Garden", "div#ctitle", timeout=3)
for p in xrange(4):
self.click('a[... | <commit_before>''' NOTE: This test suite contains 2 passing tests and 2 failing tests. '''
from seleniumbase import BaseCase
class MyTestSuite(BaseCase):
def test_1(self):
self.open("http://xkcd.com/1663/")
self.find_text("Garden", "div#ctitle", timeout=3)
for p in xrange(4):
... |
ee61a63acce97ef878e761678a0069f8fa459ea8 | xbob/learn/linear/__init__.py | xbob/learn/linear/__init__.py | from ._library import *
from ._library import __version__, __api_version__
def get_include():
"""Returns the directory containing the C/C++ API include directives"""
return __import__('pkg_resources').resource_filename(__name__, 'include')
# gets sphinx autodoc done right - don't remove it
__all__ = [k for k in ... | from ._library import *
from ._library import __version__, __api_version__
def get_include():
"""Returns the directory containing the C/C++ API include directives"""
return __import__('pkg_resources').resource_filename(__name__, 'include')
# gets sphinx autodoc done right - don't remove it
__all__ = [_ for _ in ... | Fix python3 compatibility issues with doc fix | Fix python3 compatibility issues with doc fix
| Python | bsd-3-clause | tiagofrepereira2012/bob.learn.linear,tiagofrepereira2012/bob.learn.linear,tiagofrepereira2012/bob.learn.linear | from ._library import *
from ._library import __version__, __api_version__
def get_include():
"""Returns the directory containing the C/C++ API include directives"""
return __import__('pkg_resources').resource_filename(__name__, 'include')
# gets sphinx autodoc done right - don't remove it
__all__ = [k for k in ... | from ._library import *
from ._library import __version__, __api_version__
def get_include():
"""Returns the directory containing the C/C++ API include directives"""
return __import__('pkg_resources').resource_filename(__name__, 'include')
# gets sphinx autodoc done right - don't remove it
__all__ = [_ for _ in ... | <commit_before>from ._library import *
from ._library import __version__, __api_version__
def get_include():
"""Returns the directory containing the C/C++ API include directives"""
return __import__('pkg_resources').resource_filename(__name__, 'include')
# gets sphinx autodoc done right - don't remove it
__all__... | from ._library import *
from ._library import __version__, __api_version__
def get_include():
"""Returns the directory containing the C/C++ API include directives"""
return __import__('pkg_resources').resource_filename(__name__, 'include')
# gets sphinx autodoc done right - don't remove it
__all__ = [_ for _ in ... | from ._library import *
from ._library import __version__, __api_version__
def get_include():
"""Returns the directory containing the C/C++ API include directives"""
return __import__('pkg_resources').resource_filename(__name__, 'include')
# gets sphinx autodoc done right - don't remove it
__all__ = [k for k in ... | <commit_before>from ._library import *
from ._library import __version__, __api_version__
def get_include():
"""Returns the directory containing the C/C++ API include directives"""
return __import__('pkg_resources').resource_filename(__name__, 'include')
# gets sphinx autodoc done right - don't remove it
__all__... |
e0cbe4bef0376a361ae931b82de3502b31227a54 | examples/sponza/effect.py | examples/sponza/effect.py | import moderngl as mgl
from demosys.effects import effect
class SceneEffect(effect.Effect):
"""Generated default effect"""
def __init__(self):
self.scene = self.get_scene("Sponza/glTF/Sponza.gltf", local=True)
self.proj_mat = self.create_projection(fov=75.0, near=0.01, far=1000.0)
def dr... | import moderngl
from demosys.effects import effect
class SceneEffect(effect.Effect):
"""Generated default effect"""
def __init__(self):
self.scene = self.get_scene("Sponza/glTF/Sponza.gltf", local=True)
self.proj_mat = self.create_projection(fov=75.0, near=0.01, far=1000.0)
def draw(self... | Enable face culling in sponza example | Enable face culling in sponza example
| Python | isc | Contraz/demosys-py | import moderngl as mgl
from demosys.effects import effect
class SceneEffect(effect.Effect):
"""Generated default effect"""
def __init__(self):
self.scene = self.get_scene("Sponza/glTF/Sponza.gltf", local=True)
self.proj_mat = self.create_projection(fov=75.0, near=0.01, far=1000.0)
def dr... | import moderngl
from demosys.effects import effect
class SceneEffect(effect.Effect):
"""Generated default effect"""
def __init__(self):
self.scene = self.get_scene("Sponza/glTF/Sponza.gltf", local=True)
self.proj_mat = self.create_projection(fov=75.0, near=0.01, far=1000.0)
def draw(self... | <commit_before>import moderngl as mgl
from demosys.effects import effect
class SceneEffect(effect.Effect):
"""Generated default effect"""
def __init__(self):
self.scene = self.get_scene("Sponza/glTF/Sponza.gltf", local=True)
self.proj_mat = self.create_projection(fov=75.0, near=0.01, far=1000... | import moderngl
from demosys.effects import effect
class SceneEffect(effect.Effect):
"""Generated default effect"""
def __init__(self):
self.scene = self.get_scene("Sponza/glTF/Sponza.gltf", local=True)
self.proj_mat = self.create_projection(fov=75.0, near=0.01, far=1000.0)
def draw(self... | import moderngl as mgl
from demosys.effects import effect
class SceneEffect(effect.Effect):
"""Generated default effect"""
def __init__(self):
self.scene = self.get_scene("Sponza/glTF/Sponza.gltf", local=True)
self.proj_mat = self.create_projection(fov=75.0, near=0.01, far=1000.0)
def dr... | <commit_before>import moderngl as mgl
from demosys.effects import effect
class SceneEffect(effect.Effect):
"""Generated default effect"""
def __init__(self):
self.scene = self.get_scene("Sponza/glTF/Sponza.gltf", local=True)
self.proj_mat = self.create_projection(fov=75.0, near=0.01, far=1000... |
ee6941b15a66394d2683d5baeb0fe6ee61c2d0d3 | freight/http.py | freight/http.py | from __future__ import absolute_import
__all__ = ['build_session', 'delete', 'get', 'post', 'put']
import freight
import requests
USER_AGENT = 'freight/{}'.format(freight.VERSION),
def build_session():
session = requests.Session()
session.headers.update({'User-Agent': USER_AGENT})
return session
def ... | from __future__ import absolute_import
__all__ = ['build_session', 'delete', 'get', 'post', 'put']
import freight
import requests
USER_AGENT = 'freight/{version} (https://github.com/getsentry/freight)'.format(
version=freight.VERSION,
),
def build_session():
session = requests.Session()
session.headers... | Add url to user agent | Add url to user agent
| Python | apache-2.0 | klynton/freight,klynton/freight,rshk/freight,jkimbo/freight,rshk/freight,getsentry/freight,getsentry/freight,getsentry/freight,rshk/freight,jkimbo/freight,klynton/freight,jkimbo/freight,getsentry/freight,klynton/freight,jkimbo/freight,rshk/freight,getsentry/freight | from __future__ import absolute_import
__all__ = ['build_session', 'delete', 'get', 'post', 'put']
import freight
import requests
USER_AGENT = 'freight/{}'.format(freight.VERSION),
def build_session():
session = requests.Session()
session.headers.update({'User-Agent': USER_AGENT})
return session
def ... | from __future__ import absolute_import
__all__ = ['build_session', 'delete', 'get', 'post', 'put']
import freight
import requests
USER_AGENT = 'freight/{version} (https://github.com/getsentry/freight)'.format(
version=freight.VERSION,
),
def build_session():
session = requests.Session()
session.headers... | <commit_before>from __future__ import absolute_import
__all__ = ['build_session', 'delete', 'get', 'post', 'put']
import freight
import requests
USER_AGENT = 'freight/{}'.format(freight.VERSION),
def build_session():
session = requests.Session()
session.headers.update({'User-Agent': USER_AGENT})
return... | from __future__ import absolute_import
__all__ = ['build_session', 'delete', 'get', 'post', 'put']
import freight
import requests
USER_AGENT = 'freight/{version} (https://github.com/getsentry/freight)'.format(
version=freight.VERSION,
),
def build_session():
session = requests.Session()
session.headers... | from __future__ import absolute_import
__all__ = ['build_session', 'delete', 'get', 'post', 'put']
import freight
import requests
USER_AGENT = 'freight/{}'.format(freight.VERSION),
def build_session():
session = requests.Session()
session.headers.update({'User-Agent': USER_AGENT})
return session
def ... | <commit_before>from __future__ import absolute_import
__all__ = ['build_session', 'delete', 'get', 'post', 'put']
import freight
import requests
USER_AGENT = 'freight/{}'.format(freight.VERSION),
def build_session():
session = requests.Session()
session.headers.update({'User-Agent': USER_AGENT})
return... |
dbbf8a8de7a3212ac0c91a74a9fe5dd197272483 | VOIAnalyzer.py | VOIAnalyzer.py | #!/usr/bin/env python
# coding : utf-8
"""
Main module for VOI analyzer.
"""
import pandas as pd
import numpy as np
import argparse
import os
| #!/usr/bin/env python
# coding : utf-8
"""
Main module for VOI analyzer.
"""
import pandas as pd
import numpy as np
import argparse
import os
def _analysis(img_mat, voi_mat, voi_no, eps=1e-12):
""" Extract VOI statistices for each VOI.
"""
vec = img_mat[voi_mat == voi_no]
vec2 = vec[~np.isnan(vec)]
... | Implement basis for VOI analyzer. | Implement basis for VOI analyzer.
| Python | mit | spikefairway/VOIAnalyzer | #!/usr/bin/env python
# coding : utf-8
"""
Main module for VOI analyzer.
"""
import pandas as pd
import numpy as np
import argparse
import os
Implement basis for VOI analyzer. | #!/usr/bin/env python
# coding : utf-8
"""
Main module for VOI analyzer.
"""
import pandas as pd
import numpy as np
import argparse
import os
def _analysis(img_mat, voi_mat, voi_no, eps=1e-12):
""" Extract VOI statistices for each VOI.
"""
vec = img_mat[voi_mat == voi_no]
vec2 = vec[~np.isnan(vec)]
... | <commit_before>#!/usr/bin/env python
# coding : utf-8
"""
Main module for VOI analyzer.
"""
import pandas as pd
import numpy as np
import argparse
import os
<commit_msg>Implement basis for VOI analyzer.<commit_after> | #!/usr/bin/env python
# coding : utf-8
"""
Main module for VOI analyzer.
"""
import pandas as pd
import numpy as np
import argparse
import os
def _analysis(img_mat, voi_mat, voi_no, eps=1e-12):
""" Extract VOI statistices for each VOI.
"""
vec = img_mat[voi_mat == voi_no]
vec2 = vec[~np.isnan(vec)]
... | #!/usr/bin/env python
# coding : utf-8
"""
Main module for VOI analyzer.
"""
import pandas as pd
import numpy as np
import argparse
import os
Implement basis for VOI analyzer.#!/usr/bin/env python
# coding : utf-8
"""
Main module for VOI analyzer.
"""
import pandas as pd
import numpy as np
import argparse
import... | <commit_before>#!/usr/bin/env python
# coding : utf-8
"""
Main module for VOI analyzer.
"""
import pandas as pd
import numpy as np
import argparse
import os
<commit_msg>Implement basis for VOI analyzer.<commit_after>#!/usr/bin/env python
# coding : utf-8
"""
Main module for VOI analyzer.
"""
import pandas as pd
... |
0853d74c1ee15b28f308cba6c4145741c7937f50 | vcli/verror.py | vcli/verror.py | import re
RE_MESSAGE = re.compile(r'Message: (.+), Sqlstate:')
RE_SQLSTATE = re.compile(r'Sqlstate: (\d+)')
RE_POSITION = re.compile(r'Position: (\d+)')
def format_error(error):
msg = str(error)
if not hasattr(error, 'one_line_sql'):
return msg
result = ''
match = RE_SQLSTATE.search(msg)
... | import re
RE_MESSAGE = re.compile(r'Message: (.+), Sqlstate:')
RE_SQLSTATE = re.compile(r'Sqlstate: (\d+)')
RE_POSITION = re.compile(r'Position: (\d+)')
def format_error(error):
msg = str(error)
if not hasattr(error, 'one_line_sql'):
return msg
result = ''
match = RE_SQLSTATE.search(msg)
... | Format error message better in a long SQL | Format error message better in a long SQL
| Python | bsd-3-clause | dbcli/vcli,dbcli/vcli | import re
RE_MESSAGE = re.compile(r'Message: (.+), Sqlstate:')
RE_SQLSTATE = re.compile(r'Sqlstate: (\d+)')
RE_POSITION = re.compile(r'Position: (\d+)')
def format_error(error):
msg = str(error)
if not hasattr(error, 'one_line_sql'):
return msg
result = ''
match = RE_SQLSTATE.search(msg)
... | import re
RE_MESSAGE = re.compile(r'Message: (.+), Sqlstate:')
RE_SQLSTATE = re.compile(r'Sqlstate: (\d+)')
RE_POSITION = re.compile(r'Position: (\d+)')
def format_error(error):
msg = str(error)
if not hasattr(error, 'one_line_sql'):
return msg
result = ''
match = RE_SQLSTATE.search(msg)
... | <commit_before>import re
RE_MESSAGE = re.compile(r'Message: (.+), Sqlstate:')
RE_SQLSTATE = re.compile(r'Sqlstate: (\d+)')
RE_POSITION = re.compile(r'Position: (\d+)')
def format_error(error):
msg = str(error)
if not hasattr(error, 'one_line_sql'):
return msg
result = ''
match = RE_SQLSTAT... | import re
RE_MESSAGE = re.compile(r'Message: (.+), Sqlstate:')
RE_SQLSTATE = re.compile(r'Sqlstate: (\d+)')
RE_POSITION = re.compile(r'Position: (\d+)')
def format_error(error):
msg = str(error)
if not hasattr(error, 'one_line_sql'):
return msg
result = ''
match = RE_SQLSTATE.search(msg)
... | import re
RE_MESSAGE = re.compile(r'Message: (.+), Sqlstate:')
RE_SQLSTATE = re.compile(r'Sqlstate: (\d+)')
RE_POSITION = re.compile(r'Position: (\d+)')
def format_error(error):
msg = str(error)
if not hasattr(error, 'one_line_sql'):
return msg
result = ''
match = RE_SQLSTATE.search(msg)
... | <commit_before>import re
RE_MESSAGE = re.compile(r'Message: (.+), Sqlstate:')
RE_SQLSTATE = re.compile(r'Sqlstate: (\d+)')
RE_POSITION = re.compile(r'Position: (\d+)')
def format_error(error):
msg = str(error)
if not hasattr(error, 'one_line_sql'):
return msg
result = ''
match = RE_SQLSTAT... |
7821db4fb30bc013f8ae71c779faae5f6864da1d | falafel/__init__.py | falafel/__init__.py | import os
from .core import LogFileOutput, MapperOutput, computed # noqa: F401
from .core.plugins import mapper, reducer, make_response, make_metadata # noqa: F401
from .mappers import get_active_lines # noqa: F401
from .util import defaults, parse_table # noqa: F401
__here__ = os.path.dirname(os.path.abspath(__fi... | import os
from .core import LogFileOutput, MapperOutput, computed # noqa: F401
from .core.plugins import mapper, reducer, make_response, make_metadata # noqa: F401
from .mappers import get_active_lines # noqa: F401
from .util import defaults, parse_table # noqa: F401
__here__ = os.path.dirname(os.path.abspath(__fi... | Allow rule repos to provide version information | Allow rule repos to provide version information
Added a new method to the root package `add_status`.
Rule repos should use it during initialization:
import falafel
falafel.add_status(name="my_rule_repo", nvr="my-rules-1.0.0-1", commit="abcdef")
| Python | apache-2.0 | RedHatInsights/insights-core,RedHatInsights/insights-core | import os
from .core import LogFileOutput, MapperOutput, computed # noqa: F401
from .core.plugins import mapper, reducer, make_response, make_metadata # noqa: F401
from .mappers import get_active_lines # noqa: F401
from .util import defaults, parse_table # noqa: F401
__here__ = os.path.dirname(os.path.abspath(__fi... | import os
from .core import LogFileOutput, MapperOutput, computed # noqa: F401
from .core.plugins import mapper, reducer, make_response, make_metadata # noqa: F401
from .mappers import get_active_lines # noqa: F401
from .util import defaults, parse_table # noqa: F401
__here__ = os.path.dirname(os.path.abspath(__fi... | <commit_before>import os
from .core import LogFileOutput, MapperOutput, computed # noqa: F401
from .core.plugins import mapper, reducer, make_response, make_metadata # noqa: F401
from .mappers import get_active_lines # noqa: F401
from .util import defaults, parse_table # noqa: F401
__here__ = os.path.dirname(os.pa... | import os
from .core import LogFileOutput, MapperOutput, computed # noqa: F401
from .core.plugins import mapper, reducer, make_response, make_metadata # noqa: F401
from .mappers import get_active_lines # noqa: F401
from .util import defaults, parse_table # noqa: F401
__here__ = os.path.dirname(os.path.abspath(__fi... | import os
from .core import LogFileOutput, MapperOutput, computed # noqa: F401
from .core.plugins import mapper, reducer, make_response, make_metadata # noqa: F401
from .mappers import get_active_lines # noqa: F401
from .util import defaults, parse_table # noqa: F401
__here__ = os.path.dirname(os.path.abspath(__fi... | <commit_before>import os
from .core import LogFileOutput, MapperOutput, computed # noqa: F401
from .core.plugins import mapper, reducer, make_response, make_metadata # noqa: F401
from .mappers import get_active_lines # noqa: F401
from .util import defaults, parse_table # noqa: F401
__here__ = os.path.dirname(os.pa... |
9e87598ddaa19b565099685c2bdad636b29b3d4f | frappe/tests/test_boot.py | frappe/tests/test_boot.py | import unittest
import frappe
from frappe.boot import get_unseen_notes
from frappe.desk.doctype.note.note import mark_as_seen
class TestBootData(unittest.TestCase):
def test_get_unseen_notes(self):
frappe.db.delete("Note")
frappe.db.delete("Note Seen By")
note = frappe.get_doc(
{
"doctype": "Note",
... | import unittest
import frappe
from frappe.boot import get_unseen_notes
from frappe.desk.doctype.note.note import mark_as_seen
from frappe.tests.utils import FrappeTestCase
class TestBootData(FrappeTestCase):
def test_get_unseen_notes(self):
frappe.db.delete("Note")
frappe.db.delete("Note Seen By")
note = frap... | Use FrappeTestCase as it rolls back test data | refactor: Use FrappeTestCase as it rolls back test data
| Python | mit | frappe/frappe,StrellaGroup/frappe,frappe/frappe,StrellaGroup/frappe,StrellaGroup/frappe,frappe/frappe | import unittest
import frappe
from frappe.boot import get_unseen_notes
from frappe.desk.doctype.note.note import mark_as_seen
class TestBootData(unittest.TestCase):
def test_get_unseen_notes(self):
frappe.db.delete("Note")
frappe.db.delete("Note Seen By")
note = frappe.get_doc(
{
"doctype": "Note",
... | import unittest
import frappe
from frappe.boot import get_unseen_notes
from frappe.desk.doctype.note.note import mark_as_seen
from frappe.tests.utils import FrappeTestCase
class TestBootData(FrappeTestCase):
def test_get_unseen_notes(self):
frappe.db.delete("Note")
frappe.db.delete("Note Seen By")
note = frap... | <commit_before>import unittest
import frappe
from frappe.boot import get_unseen_notes
from frappe.desk.doctype.note.note import mark_as_seen
class TestBootData(unittest.TestCase):
def test_get_unseen_notes(self):
frappe.db.delete("Note")
frappe.db.delete("Note Seen By")
note = frappe.get_doc(
{
"doctyp... | import unittest
import frappe
from frappe.boot import get_unseen_notes
from frappe.desk.doctype.note.note import mark_as_seen
from frappe.tests.utils import FrappeTestCase
class TestBootData(FrappeTestCase):
def test_get_unseen_notes(self):
frappe.db.delete("Note")
frappe.db.delete("Note Seen By")
note = frap... | import unittest
import frappe
from frappe.boot import get_unseen_notes
from frappe.desk.doctype.note.note import mark_as_seen
class TestBootData(unittest.TestCase):
def test_get_unseen_notes(self):
frappe.db.delete("Note")
frappe.db.delete("Note Seen By")
note = frappe.get_doc(
{
"doctype": "Note",
... | <commit_before>import unittest
import frappe
from frappe.boot import get_unseen_notes
from frappe.desk.doctype.note.note import mark_as_seen
class TestBootData(unittest.TestCase):
def test_get_unseen_notes(self):
frappe.db.delete("Note")
frappe.db.delete("Note Seen By")
note = frappe.get_doc(
{
"doctyp... |
a5ddab3208992ca6ab655ddef9a4155d5fc6bc55 | tests/grammar_test.py | tests/grammar_test.py | import nose
from parser_tool import get_parser, parse
sentences = (
# N[s] V[i]
"Brad drives",
# N[s] V[t] N[p]
"Angela drives cars",
# N[s] V[t] Det N[s]
"Brad buys the house",
# Det[s] N[s] V[i]
"a dog walks"
)
grammar = get_parser("grammars/feat1.fcfg", trace=0)
def test_grammar()... | import nose
from parser_tool import get_parser, parse
sentences = (
# PN V[i]
"Brad drives",
# PN V[t] N[p]
"Angela drives cars",
# PN V[t] Det N[s]
"Brad buys the house",
# Det[s] N[s] V[i]
"a dog walks",
# Det[p] N[p] V[i]
"these dogs walk",
# Det[p] N[p] V[t] Det N[s]
... | Increase testing coverage of grammar | Increase testing coverage of grammar
* added some sample sentences with ajectives
| Python | mit | caninemwenja/marker,kmwenja/marker | import nose
from parser_tool import get_parser, parse
sentences = (
# N[s] V[i]
"Brad drives",
# N[s] V[t] N[p]
"Angela drives cars",
# N[s] V[t] Det N[s]
"Brad buys the house",
# Det[s] N[s] V[i]
"a dog walks"
)
grammar = get_parser("grammars/feat1.fcfg", trace=0)
def test_grammar()... | import nose
from parser_tool import get_parser, parse
sentences = (
# PN V[i]
"Brad drives",
# PN V[t] N[p]
"Angela drives cars",
# PN V[t] Det N[s]
"Brad buys the house",
# Det[s] N[s] V[i]
"a dog walks",
# Det[p] N[p] V[i]
"these dogs walk",
# Det[p] N[p] V[t] Det N[s]
... | <commit_before>import nose
from parser_tool import get_parser, parse
sentences = (
# N[s] V[i]
"Brad drives",
# N[s] V[t] N[p]
"Angela drives cars",
# N[s] V[t] Det N[s]
"Brad buys the house",
# Det[s] N[s] V[i]
"a dog walks"
)
grammar = get_parser("grammars/feat1.fcfg", trace=0)
def... | import nose
from parser_tool import get_parser, parse
sentences = (
# PN V[i]
"Brad drives",
# PN V[t] N[p]
"Angela drives cars",
# PN V[t] Det N[s]
"Brad buys the house",
# Det[s] N[s] V[i]
"a dog walks",
# Det[p] N[p] V[i]
"these dogs walk",
# Det[p] N[p] V[t] Det N[s]
... | import nose
from parser_tool import get_parser, parse
sentences = (
# N[s] V[i]
"Brad drives",
# N[s] V[t] N[p]
"Angela drives cars",
# N[s] V[t] Det N[s]
"Brad buys the house",
# Det[s] N[s] V[i]
"a dog walks"
)
grammar = get_parser("grammars/feat1.fcfg", trace=0)
def test_grammar()... | <commit_before>import nose
from parser_tool import get_parser, parse
sentences = (
# N[s] V[i]
"Brad drives",
# N[s] V[t] N[p]
"Angela drives cars",
# N[s] V[t] Det N[s]
"Brad buys the house",
# Det[s] N[s] V[i]
"a dog walks"
)
grammar = get_parser("grammars/feat1.fcfg", trace=0)
def... |
fff0087f82c3f79d5e60e32071a4e89478d8b85e | tests/test_element.py | tests/test_element.py | import pkg_resources
pkg_resources.require('cothread')
import cothread
import rml.element
def test_create_element():
e = rml.element.Element('BPM', 6.0)
assert e.get_type() == 'BPM'
assert e.get_length() == 6.0
def test_add_element_to_family():
e = rml.element.Element('dummy', 0.0)
e.add_to_fami... | import pkg_resources
pkg_resources.require('cothread')
import cothread
import rml
import rml.element
def test_create_element():
e = rml.element.Element('BPM', 6.0)
assert e.get_type() == 'BPM'
assert e.get_length() == 6.0
def test_add_element_to_family():
e = rml.element.Element('dummy', 0.0)
e.... | Make pvs in Element behave more realistically. | Make pvs in Element behave more realistically.
| Python | apache-2.0 | razvanvasile/RML,willrogers/pml,willrogers/pml | import pkg_resources
pkg_resources.require('cothread')
import cothread
import rml.element
def test_create_element():
e = rml.element.Element('BPM', 6.0)
assert e.get_type() == 'BPM'
assert e.get_length() == 6.0
def test_add_element_to_family():
e = rml.element.Element('dummy', 0.0)
e.add_to_fami... | import pkg_resources
pkg_resources.require('cothread')
import cothread
import rml
import rml.element
def test_create_element():
e = rml.element.Element('BPM', 6.0)
assert e.get_type() == 'BPM'
assert e.get_length() == 6.0
def test_add_element_to_family():
e = rml.element.Element('dummy', 0.0)
e.... | <commit_before>import pkg_resources
pkg_resources.require('cothread')
import cothread
import rml.element
def test_create_element():
e = rml.element.Element('BPM', 6.0)
assert e.get_type() == 'BPM'
assert e.get_length() == 6.0
def test_add_element_to_family():
e = rml.element.Element('dummy', 0.0)
... | import pkg_resources
pkg_resources.require('cothread')
import cothread
import rml
import rml.element
def test_create_element():
e = rml.element.Element('BPM', 6.0)
assert e.get_type() == 'BPM'
assert e.get_length() == 6.0
def test_add_element_to_family():
e = rml.element.Element('dummy', 0.0)
e.... | import pkg_resources
pkg_resources.require('cothread')
import cothread
import rml.element
def test_create_element():
e = rml.element.Element('BPM', 6.0)
assert e.get_type() == 'BPM'
assert e.get_length() == 6.0
def test_add_element_to_family():
e = rml.element.Element('dummy', 0.0)
e.add_to_fami... | <commit_before>import pkg_resources
pkg_resources.require('cothread')
import cothread
import rml.element
def test_create_element():
e = rml.element.Element('BPM', 6.0)
assert e.get_type() == 'BPM'
assert e.get_length() == 6.0
def test_add_element_to_family():
e = rml.element.Element('dummy', 0.0)
... |
9075603da0ac5993836001749c7999dec6498f95 | tests/test_process.py | tests/test_process.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
test_process
----------------------------------
Tests for process management.
"""
# system imports
import unittest
import os
from subprocess import check_output
from tempfile import NamedTemporaryFile
# project imports
from nrtest.process import source, execute, mon... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
test_process
----------------------------------
Tests for process management.
"""
# system imports
import unittest
import os
from subprocess import check_output
from tempfile import NamedTemporaryFile
# project imports
from nrtest.process import source, execute, mon... | Remove unreproducible test (sleep is too inaccurate) | Remove unreproducible test
(sleep is too inaccurate)
| Python | mit | davidchall/nrtest | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
test_process
----------------------------------
Tests for process management.
"""
# system imports
import unittest
import os
from subprocess import check_output
from tempfile import NamedTemporaryFile
# project imports
from nrtest.process import source, execute, mon... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
test_process
----------------------------------
Tests for process management.
"""
# system imports
import unittest
import os
from subprocess import check_output
from tempfile import NamedTemporaryFile
# project imports
from nrtest.process import source, execute, mon... | <commit_before>#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
test_process
----------------------------------
Tests for process management.
"""
# system imports
import unittest
import os
from subprocess import check_output
from tempfile import NamedTemporaryFile
# project imports
from nrtest.process import sourc... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
test_process
----------------------------------
Tests for process management.
"""
# system imports
import unittest
import os
from subprocess import check_output
from tempfile import NamedTemporaryFile
# project imports
from nrtest.process import source, execute, mon... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
test_process
----------------------------------
Tests for process management.
"""
# system imports
import unittest
import os
from subprocess import check_output
from tempfile import NamedTemporaryFile
# project imports
from nrtest.process import source, execute, mon... | <commit_before>#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
test_process
----------------------------------
Tests for process management.
"""
# system imports
import unittest
import os
from subprocess import check_output
from tempfile import NamedTemporaryFile
# project imports
from nrtest.process import sourc... |
34c0a728add7715a9420537f57f7c1a69176c57d | tests/serializer/abstract_test.py | tests/serializer/abstract_test.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
##
# hack for loading modules
#
import _path
_path.fix()
##
# python standard library
#
from functools import partial
import unittest
##
# pygrapes modules
#
from pygrapes.serializer import Base
class BaseSerializerTestCase(unittest.TestCase):
def test_method_dump... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
##
# hack for loading modules
#
import _path
_path.fix()
##
# python standard library
#
from functools import partial
import unittest
##
# pygrapes modules
#
from pygrapes.serializer.abstract import Abstract
class AbstractSerializerTestCase(unittest.TestCase):
def... | Use abstract.Abstract instead of Base alias when testing pygrapes.serializer.abstract.Abstract class | Use abstract.Abstract instead of Base alias when testing pygrapes.serializer.abstract.Abstract class
| Python | bsd-3-clause | michalbachowski/pygrapes,michalbachowski/pygrapes,michalbachowski/pygrapes | #!/usr/bin/env python
# -*- coding: utf-8 -*-
##
# hack for loading modules
#
import _path
_path.fix()
##
# python standard library
#
from functools import partial
import unittest
##
# pygrapes modules
#
from pygrapes.serializer import Base
class BaseSerializerTestCase(unittest.TestCase):
def test_method_dump... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
##
# hack for loading modules
#
import _path
_path.fix()
##
# python standard library
#
from functools import partial
import unittest
##
# pygrapes modules
#
from pygrapes.serializer.abstract import Abstract
class AbstractSerializerTestCase(unittest.TestCase):
def... | <commit_before>#!/usr/bin/env python
# -*- coding: utf-8 -*-
##
# hack for loading modules
#
import _path
_path.fix()
##
# python standard library
#
from functools import partial
import unittest
##
# pygrapes modules
#
from pygrapes.serializer import Base
class BaseSerializerTestCase(unittest.TestCase):
def t... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
##
# hack for loading modules
#
import _path
_path.fix()
##
# python standard library
#
from functools import partial
import unittest
##
# pygrapes modules
#
from pygrapes.serializer.abstract import Abstract
class AbstractSerializerTestCase(unittest.TestCase):
def... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
##
# hack for loading modules
#
import _path
_path.fix()
##
# python standard library
#
from functools import partial
import unittest
##
# pygrapes modules
#
from pygrapes.serializer import Base
class BaseSerializerTestCase(unittest.TestCase):
def test_method_dump... | <commit_before>#!/usr/bin/env python
# -*- coding: utf-8 -*-
##
# hack for loading modules
#
import _path
_path.fix()
##
# python standard library
#
from functools import partial
import unittest
##
# pygrapes modules
#
from pygrapes.serializer import Base
class BaseSerializerTestCase(unittest.TestCase):
def t... |
c174e7bffbfbbb2fe4a1d13d37d9c056d44d95d2 | project/apps.py | project/apps.py | #!/usr/bin/env python
"""
Project Core Application Classes
"""
__author__ = "Gavin M. Roy"
__email__ = "[email protected]"
__date__ = "2009-11-10"
__version__ = 0.1
import project.data
import project.handler
class Home(project.handler.RequestHandler):
def get(self):
foo
self.ren... | #!/usr/bin/env python
"""
Project Core Application Classes
"""
__author__ = "Gavin M. Roy"
__email__ = "[email protected]"
__date__ = "2009-11-10"
__version__ = 0.1
import project.data
import project.handler
class Home(project.handler.RequestHandler):
def get(self):
self.render('templat... | Remove the errror intentionally left for debugging | Remove the errror intentionally left for debugging
| Python | bsd-3-clause | lucius-feng/tinman,gmr/tinman,lucius-feng/tinman,lucius-feng/tinman,gmr/tinman | #!/usr/bin/env python
"""
Project Core Application Classes
"""
__author__ = "Gavin M. Roy"
__email__ = "[email protected]"
__date__ = "2009-11-10"
__version__ = 0.1
import project.data
import project.handler
class Home(project.handler.RequestHandler):
def get(self):
foo
self.ren... | #!/usr/bin/env python
"""
Project Core Application Classes
"""
__author__ = "Gavin M. Roy"
__email__ = "[email protected]"
__date__ = "2009-11-10"
__version__ = 0.1
import project.data
import project.handler
class Home(project.handler.RequestHandler):
def get(self):
self.render('templat... | <commit_before>#!/usr/bin/env python
"""
Project Core Application Classes
"""
__author__ = "Gavin M. Roy"
__email__ = "[email protected]"
__date__ = "2009-11-10"
__version__ = 0.1
import project.data
import project.handler
class Home(project.handler.RequestHandler):
def get(self):
foo
... | #!/usr/bin/env python
"""
Project Core Application Classes
"""
__author__ = "Gavin M. Roy"
__email__ = "[email protected]"
__date__ = "2009-11-10"
__version__ = 0.1
import project.data
import project.handler
class Home(project.handler.RequestHandler):
def get(self):
self.render('templat... | #!/usr/bin/env python
"""
Project Core Application Classes
"""
__author__ = "Gavin M. Roy"
__email__ = "[email protected]"
__date__ = "2009-11-10"
__version__ = 0.1
import project.data
import project.handler
class Home(project.handler.RequestHandler):
def get(self):
foo
self.ren... | <commit_before>#!/usr/bin/env python
"""
Project Core Application Classes
"""
__author__ = "Gavin M. Roy"
__email__ = "[email protected]"
__date__ = "2009-11-10"
__version__ = 0.1
import project.data
import project.handler
class Home(project.handler.RequestHandler):
def get(self):
foo
... |
d6b2c3fcae81ca30d406778f66c6f8b12cfb04d8 | tests/window/WINDOW_CAPTION.py | tests/window/WINDOW_CAPTION.py | #!/usr/bin/env python
'''Test that the window caption can be set.
Expected behaviour:
Two windows will be opened, one with the caption "Window caption 1"
counting up every second; the other with a Unicode string including
some non-ASCII characters.
Press escape or close either window to finished the ... | #!/usr/bin/env python
'''Test that the window caption can be set.
Expected behaviour:
Two windows will be opened, one with the caption "Window caption 1"
counting up every second; the other with a Unicode string including
some non-ASCII characters.
Press escape or close either window to finished the ... | Make windows bigger in this test so the captions can be read. | Make windows bigger in this test so the captions can be read.
Index: tests/window/WINDOW_CAPTION.py
===================================================================
--- tests/window/WINDOW_CAPTION.py (revision 777)
+++ tests/window/WINDOW_CAPTION.py (working copy)
@@ -19,8 +19,8 @@
class WINDOW_CAPTION(unittest.... | Python | bsd-3-clause | adamlwgriffiths/Pyglet,niklaskorz/pyglet,niklaskorz/pyglet,adamlwgriffiths/Pyglet,adamlwgriffiths/Pyglet,adamlwgriffiths/Pyglet,seeminglee/pyglet64,niklaskorz/pyglet,seeminglee/pyglet64,niklaskorz/pyglet,seeminglee/pyglet64 | #!/usr/bin/env python
'''Test that the window caption can be set.
Expected behaviour:
Two windows will be opened, one with the caption "Window caption 1"
counting up every second; the other with a Unicode string including
some non-ASCII characters.
Press escape or close either window to finished the ... | #!/usr/bin/env python
'''Test that the window caption can be set.
Expected behaviour:
Two windows will be opened, one with the caption "Window caption 1"
counting up every second; the other with a Unicode string including
some non-ASCII characters.
Press escape or close either window to finished the ... | <commit_before>#!/usr/bin/env python
'''Test that the window caption can be set.
Expected behaviour:
Two windows will be opened, one with the caption "Window caption 1"
counting up every second; the other with a Unicode string including
some non-ASCII characters.
Press escape or close either window t... | #!/usr/bin/env python
'''Test that the window caption can be set.
Expected behaviour:
Two windows will be opened, one with the caption "Window caption 1"
counting up every second; the other with a Unicode string including
some non-ASCII characters.
Press escape or close either window to finished the ... | #!/usr/bin/env python
'''Test that the window caption can be set.
Expected behaviour:
Two windows will be opened, one with the caption "Window caption 1"
counting up every second; the other with a Unicode string including
some non-ASCII characters.
Press escape or close either window to finished the ... | <commit_before>#!/usr/bin/env python
'''Test that the window caption can be set.
Expected behaviour:
Two windows will be opened, one with the caption "Window caption 1"
counting up every second; the other with a Unicode string including
some non-ASCII characters.
Press escape or close either window t... |
4070507e3357d36f2412cc5c68a63780ae1b814d | glance_api_local_check.py | glance_api_local_check.py | #!/usr/bin/env python
from maas_common import (get_auth_ref, get_glance_client, status_err,
status_ok, metric)
import sys
IMAGE_ENDPOINT = 'http://127.0.0.1:9292'
def check(token):
glance = get_glance_client(token, IMAGE_ENDPOINT)
if glance is None:
status_err('Unable to obt... | #!/usr/bin/env python
from maas_common import (status_ok, status_err, metric, get_keystone_client,
get_auth_ref)
from requests import Session
from requests import exceptions as exc
def check(auth_ref):
keystone = get_keystone_client(auth_ref)
tenant_id = keystone.tenant_id
auth_t... | Make a direct call to glance-api using requests | Make a direct call to glance-api using requests
This change makes this check no longer use the glanceclient tool so
we can craft a request that doesn't hit the glance-registry. The
reason for this is that the glance-registry itself is tested in a
different check and therefore we just need to ensure the glance-api
its... | Python | apache-2.0 | cfarquhar/rpc-openstack,stevelle/rpc-openstack,robb-romans/rpc-openstack,byronmccollum/rpc-openstack,cloudnull/rpc-maas,byronmccollum/rpc-openstack,mattt416/rpc-openstack,nrb/rpc-openstack,hughsaunders/rpc-openstack,darrenchan/rpc-openstack,byronmccollum/rpc-openstack,jacobwagner/rpc-openstack,jpmontez/rpc-openstack,br... | #!/usr/bin/env python
from maas_common import (get_auth_ref, get_glance_client, status_err,
status_ok, metric)
import sys
IMAGE_ENDPOINT = 'http://127.0.0.1:9292'
def check(token):
glance = get_glance_client(token, IMAGE_ENDPOINT)
if glance is None:
status_err('Unable to obt... | #!/usr/bin/env python
from maas_common import (status_ok, status_err, metric, get_keystone_client,
get_auth_ref)
from requests import Session
from requests import exceptions as exc
def check(auth_ref):
keystone = get_keystone_client(auth_ref)
tenant_id = keystone.tenant_id
auth_t... | <commit_before>#!/usr/bin/env python
from maas_common import (get_auth_ref, get_glance_client, status_err,
status_ok, metric)
import sys
IMAGE_ENDPOINT = 'http://127.0.0.1:9292'
def check(token):
glance = get_glance_client(token, IMAGE_ENDPOINT)
if glance is None:
status_err... | #!/usr/bin/env python
from maas_common import (status_ok, status_err, metric, get_keystone_client,
get_auth_ref)
from requests import Session
from requests import exceptions as exc
def check(auth_ref):
keystone = get_keystone_client(auth_ref)
tenant_id = keystone.tenant_id
auth_t... | #!/usr/bin/env python
from maas_common import (get_auth_ref, get_glance_client, status_err,
status_ok, metric)
import sys
IMAGE_ENDPOINT = 'http://127.0.0.1:9292'
def check(token):
glance = get_glance_client(token, IMAGE_ENDPOINT)
if glance is None:
status_err('Unable to obt... | <commit_before>#!/usr/bin/env python
from maas_common import (get_auth_ref, get_glance_client, status_err,
status_ok, metric)
import sys
IMAGE_ENDPOINT = 'http://127.0.0.1:9292'
def check(token):
glance = get_glance_client(token, IMAGE_ENDPOINT)
if glance is None:
status_err... |
f6491445d8811f0fcb5bf8937056a4e15ed985b4 | tests/acceptance/test_ensure_index.py | tests/acceptance/test_ensure_index.py | from tests.acceptance.base_acceptance_test import BaseAcceptanceTest
from scalymongo import Document
class IndexTestDocument(Document):
structure = {
'number': int,
'name': unicode,
'descending': int,
'ascending': int,
}
indexes = [
{'fields': 'number'},
{'f... | from tests.acceptance.base_acceptance_test import BaseAcceptanceTest
from scalymongo import Document
class IndexTestDocument(Document):
structure = {
'number': int,
'name': unicode,
'descending': int,
'ascending': int,
}
indexes = [
{'fields': 'number'},
{'f... | Fix acceptance test for MongoDB 2.0 | indexes: Fix acceptance test for MongoDB 2.0
There were some minor changes for the test to work properly
with 2.0:
- The index versions are now 1 instead of 0
Don't bother checking the version of index since scalymongo has no
control over it.
- The `unique` key is now only provided when ``True`` | Python | bsd-3-clause | allancaffee/scaly-mongo | from tests.acceptance.base_acceptance_test import BaseAcceptanceTest
from scalymongo import Document
class IndexTestDocument(Document):
structure = {
'number': int,
'name': unicode,
'descending': int,
'ascending': int,
}
indexes = [
{'fields': 'number'},
{'f... | from tests.acceptance.base_acceptance_test import BaseAcceptanceTest
from scalymongo import Document
class IndexTestDocument(Document):
structure = {
'number': int,
'name': unicode,
'descending': int,
'ascending': int,
}
indexes = [
{'fields': 'number'},
{'f... | <commit_before>from tests.acceptance.base_acceptance_test import BaseAcceptanceTest
from scalymongo import Document
class IndexTestDocument(Document):
structure = {
'number': int,
'name': unicode,
'descending': int,
'ascending': int,
}
indexes = [
{'fields': 'number... | from tests.acceptance.base_acceptance_test import BaseAcceptanceTest
from scalymongo import Document
class IndexTestDocument(Document):
structure = {
'number': int,
'name': unicode,
'descending': int,
'ascending': int,
}
indexes = [
{'fields': 'number'},
{'f... | from tests.acceptance.base_acceptance_test import BaseAcceptanceTest
from scalymongo import Document
class IndexTestDocument(Document):
structure = {
'number': int,
'name': unicode,
'descending': int,
'ascending': int,
}
indexes = [
{'fields': 'number'},
{'f... | <commit_before>from tests.acceptance.base_acceptance_test import BaseAcceptanceTest
from scalymongo import Document
class IndexTestDocument(Document):
structure = {
'number': int,
'name': unicode,
'descending': int,
'ascending': int,
}
indexes = [
{'fields': 'number... |
05b8ae37fccb152fcdd618b09984f3d1d8beae45 | fabfile.py | fabfile.py | import os
from fabric.api import *
base_path = os.path.dirname(__file__)
project_root = "~/Gather"
pip_path = os.path.join(project_root, "bin/pip")
python_path = os.path.join(project_root, "bin/python")
env.user = "gather"
env.hosts = ["gather.whouz.com"]
def update_from_github():
with cd(project_root):
... | import os
from fabric.api import *
base_path = os.path.dirname(__file__)
project_root = "~/Gather"
pip_path = os.path.join(project_root, "bin/pip")
python_path = os.path.join(project_root, "bin/python")
env.user = "gather"
env.hosts = ["gather.whouz.com"]
def update_from_github():
with cd(project_root):
... | Migrate database for small update | Migrate database for small update
| Python | mit | whtsky/Gather,whtsky/Gather | import os
from fabric.api import *
base_path = os.path.dirname(__file__)
project_root = "~/Gather"
pip_path = os.path.join(project_root, "bin/pip")
python_path = os.path.join(project_root, "bin/python")
env.user = "gather"
env.hosts = ["gather.whouz.com"]
def update_from_github():
with cd(project_root):
... | import os
from fabric.api import *
base_path = os.path.dirname(__file__)
project_root = "~/Gather"
pip_path = os.path.join(project_root, "bin/pip")
python_path = os.path.join(project_root, "bin/python")
env.user = "gather"
env.hosts = ["gather.whouz.com"]
def update_from_github():
with cd(project_root):
... | <commit_before>import os
from fabric.api import *
base_path = os.path.dirname(__file__)
project_root = "~/Gather"
pip_path = os.path.join(project_root, "bin/pip")
python_path = os.path.join(project_root, "bin/python")
env.user = "gather"
env.hosts = ["gather.whouz.com"]
def update_from_github():
with cd(proje... | import os
from fabric.api import *
base_path = os.path.dirname(__file__)
project_root = "~/Gather"
pip_path = os.path.join(project_root, "bin/pip")
python_path = os.path.join(project_root, "bin/python")
env.user = "gather"
env.hosts = ["gather.whouz.com"]
def update_from_github():
with cd(project_root):
... | import os
from fabric.api import *
base_path = os.path.dirname(__file__)
project_root = "~/Gather"
pip_path = os.path.join(project_root, "bin/pip")
python_path = os.path.join(project_root, "bin/python")
env.user = "gather"
env.hosts = ["gather.whouz.com"]
def update_from_github():
with cd(project_root):
... | <commit_before>import os
from fabric.api import *
base_path = os.path.dirname(__file__)
project_root = "~/Gather"
pip_path = os.path.join(project_root, "bin/pip")
python_path = os.path.join(project_root, "bin/python")
env.user = "gather"
env.hosts = ["gather.whouz.com"]
def update_from_github():
with cd(proje... |
9db8a4c37cb226f1606b711493ebec16573f3d46 | polyaxon/libs/spec_validation.py | polyaxon/libs/spec_validation.py | # -*- coding: utf-8 -*-
from __future__ import absolute_import, division, print_function
from django.core.exceptions import ValidationError
from polyaxon_schemas.exceptions import PolyaxonfileError, PolyaxonConfigurationError
from polyaxon_schemas.polyaxonfile.specification import GroupSpecification
def validate_spe... | # -*- coding: utf-8 -*-
from __future__ import absolute_import, division, print_function
from django.core.exceptions import ValidationError
from polyaxon_schemas.exceptions import PolyaxonfileError, PolyaxonConfigurationError
from polyaxon_schemas.polyaxonfile.specification import GroupSpecification, Specification
d... | Add tensorboard serializer * Add validation * Add tests | Add tensorboard serializer
* Add validation
* Add tests
| Python | apache-2.0 | polyaxon/polyaxon,polyaxon/polyaxon,polyaxon/polyaxon | # -*- coding: utf-8 -*-
from __future__ import absolute_import, division, print_function
from django.core.exceptions import ValidationError
from polyaxon_schemas.exceptions import PolyaxonfileError, PolyaxonConfigurationError
from polyaxon_schemas.polyaxonfile.specification import GroupSpecification
def validate_spe... | # -*- coding: utf-8 -*-
from __future__ import absolute_import, division, print_function
from django.core.exceptions import ValidationError
from polyaxon_schemas.exceptions import PolyaxonfileError, PolyaxonConfigurationError
from polyaxon_schemas.polyaxonfile.specification import GroupSpecification, Specification
d... | <commit_before># -*- coding: utf-8 -*-
from __future__ import absolute_import, division, print_function
from django.core.exceptions import ValidationError
from polyaxon_schemas.exceptions import PolyaxonfileError, PolyaxonConfigurationError
from polyaxon_schemas.polyaxonfile.specification import GroupSpecification
d... | # -*- coding: utf-8 -*-
from __future__ import absolute_import, division, print_function
from django.core.exceptions import ValidationError
from polyaxon_schemas.exceptions import PolyaxonfileError, PolyaxonConfigurationError
from polyaxon_schemas.polyaxonfile.specification import GroupSpecification, Specification
d... | # -*- coding: utf-8 -*-
from __future__ import absolute_import, division, print_function
from django.core.exceptions import ValidationError
from polyaxon_schemas.exceptions import PolyaxonfileError, PolyaxonConfigurationError
from polyaxon_schemas.polyaxonfile.specification import GroupSpecification
def validate_spe... | <commit_before># -*- coding: utf-8 -*-
from __future__ import absolute_import, division, print_function
from django.core.exceptions import ValidationError
from polyaxon_schemas.exceptions import PolyaxonfileError, PolyaxonConfigurationError
from polyaxon_schemas.polyaxonfile.specification import GroupSpecification
d... |
d1bd937f7db211cc536e594952899c44a21f7e5d | tunobase/blog/urls.py | tunobase/blog/urls.py | """
Blog App
This module provides generic django URL routing.
"""
from django.conf.urls import patterns, url
from tunobase.blog import views
urlpatterns = patterns('',
url(r'^list/$',
views.BlogList.as_view(
template_name='blog/blog_list.html'
),
name='blog_list'
),
... | """
Blog App
This module provides generic django URL routing.
"""
from django.conf.urls import patterns, url
from tunobase.blog import views
urlpatterns = patterns('',
url(r'^list/$',
views.BlogList.as_view(
template_name='blog/blog_list.html'
),
name='blog_list'
),
... | Increase the pagination amount for blog app | Increase the pagination amount for blog app
| Python | bsd-3-clause | unomena/tunobase,unomena/tunobase | """
Blog App
This module provides generic django URL routing.
"""
from django.conf.urls import patterns, url
from tunobase.blog import views
urlpatterns = patterns('',
url(r'^list/$',
views.BlogList.as_view(
template_name='blog/blog_list.html'
),
name='blog_list'
),
... | """
Blog App
This module provides generic django URL routing.
"""
from django.conf.urls import patterns, url
from tunobase.blog import views
urlpatterns = patterns('',
url(r'^list/$',
views.BlogList.as_view(
template_name='blog/blog_list.html'
),
name='blog_list'
),
... | <commit_before>"""
Blog App
This module provides generic django URL routing.
"""
from django.conf.urls import patterns, url
from tunobase.blog import views
urlpatterns = patterns('',
url(r'^list/$',
views.BlogList.as_view(
template_name='blog/blog_list.html'
),
name='blog_lis... | """
Blog App
This module provides generic django URL routing.
"""
from django.conf.urls import patterns, url
from tunobase.blog import views
urlpatterns = patterns('',
url(r'^list/$',
views.BlogList.as_view(
template_name='blog/blog_list.html'
),
name='blog_list'
),
... | """
Blog App
This module provides generic django URL routing.
"""
from django.conf.urls import patterns, url
from tunobase.blog import views
urlpatterns = patterns('',
url(r'^list/$',
views.BlogList.as_view(
template_name='blog/blog_list.html'
),
name='blog_list'
),
... | <commit_before>"""
Blog App
This module provides generic django URL routing.
"""
from django.conf.urls import patterns, url
from tunobase.blog import views
urlpatterns = patterns('',
url(r'^list/$',
views.BlogList.as_view(
template_name='blog/blog_list.html'
),
name='blog_lis... |
d96b6fa97272057f0fb67f2440f1b5b642b92bbe | src/python/tensorflow_cloud/core/tests/examples/multi_file_example/scale_model.py | src/python/tensorflow_cloud/core/tests/examples/multi_file_example/scale_model.py | # Copyright 2020 Google LLC. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable ... | # Copyright 2020 Google LLC. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable ... | Add storage bucket to run() call | Add storage bucket to run() call | Python | apache-2.0 | tensorflow/cloud,tensorflow/cloud | # Copyright 2020 Google LLC. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable ... | # Copyright 2020 Google LLC. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable ... | <commit_before># Copyright 2020 Google LLC. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required... | # Copyright 2020 Google LLC. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable ... | # Copyright 2020 Google LLC. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable ... | <commit_before># Copyright 2020 Google LLC. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.