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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
fbeb7b6d400f813c4ed9d293c5525a7c36b44d7d | setup.py | setup.py | #!/usr/bin/python
from setuptools import setup
from distutils.extension import Extension
from Pyrex.Distutils import build_ext
setup(
name="PyHesiod",
version="0.2.0",
description="PyHesiod - Python bindings for the Heisod naming library",
author="Evan Broder",
author_email="broder@mit.edu",
l... | #!/usr/bin/python
from setuptools import setup
from distutils.extension import Extension
from Pyrex.Distutils import build_ext
setup(
name="PyHesiod",
version="0.2.1",
description="PyHesiod - Python bindings for the Heisod naming library",
author="Evan Broder",
author_email="broder@mit.edu",
u... | Add a quick note about a homepage | Add a quick note about a homepage
| Python | mit | ebroder/python-hesiod | #!/usr/bin/python
from setuptools import setup
from distutils.extension import Extension
from Pyrex.Distutils import build_ext
setup(
name="PyHesiod",
version="0.2.0",
description="PyHesiod - Python bindings for the Heisod naming library",
author="Evan Broder",
author_email="broder@mit.edu",
l... | #!/usr/bin/python
from setuptools import setup
from distutils.extension import Extension
from Pyrex.Distutils import build_ext
setup(
name="PyHesiod",
version="0.2.1",
description="PyHesiod - Python bindings for the Heisod naming library",
author="Evan Broder",
author_email="broder@mit.edu",
u... | <commit_before>#!/usr/bin/python
from setuptools import setup
from distutils.extension import Extension
from Pyrex.Distutils import build_ext
setup(
name="PyHesiod",
version="0.2.0",
description="PyHesiod - Python bindings for the Heisod naming library",
author="Evan Broder",
author_email="broder@... | #!/usr/bin/python
from setuptools import setup
from distutils.extension import Extension
from Pyrex.Distutils import build_ext
setup(
name="PyHesiod",
version="0.2.1",
description="PyHesiod - Python bindings for the Heisod naming library",
author="Evan Broder",
author_email="broder@mit.edu",
u... | #!/usr/bin/python
from setuptools import setup
from distutils.extension import Extension
from Pyrex.Distutils import build_ext
setup(
name="PyHesiod",
version="0.2.0",
description="PyHesiod - Python bindings for the Heisod naming library",
author="Evan Broder",
author_email="broder@mit.edu",
l... | <commit_before>#!/usr/bin/python
from setuptools import setup
from distutils.extension import Extension
from Pyrex.Distutils import build_ext
setup(
name="PyHesiod",
version="0.2.0",
description="PyHesiod - Python bindings for the Heisod naming library",
author="Evan Broder",
author_email="broder@... |
9887e5fe0253f4e44acdb438bc769313985e1080 | setup.py | setup.py | #!/usr/bin/env python
from setuptools import setup
setup(
name="segfault",
version="0.0.1",
author="Sean Kelly",
author_email="sean.kelly.2992@gmail.com",
description="A library that makes the Python interpreter segfault.",
license="MIT",
keywords="segfault",
py_modules=['segfault', 'sat... | #!/usr/bin/env python
from setuptools import setup
setup(
name="segfault",
version="0.0.1",
author="Sean Kelly",
author_email="sean.kelly.2992@gmail.com",
description="A library that makes the Python interpreter segfault.",
license="MIT",
url='https://github.com/cbgbt/segfault',
download... | Add pypi url and download_url | Add pypi url and download_url
| Python | mit | cbgbt/segfault,cbgbt/segfault | #!/usr/bin/env python
from setuptools import setup
setup(
name="segfault",
version="0.0.1",
author="Sean Kelly",
author_email="sean.kelly.2992@gmail.com",
description="A library that makes the Python interpreter segfault.",
license="MIT",
keywords="segfault",
py_modules=['segfault', 'sat... | #!/usr/bin/env python
from setuptools import setup
setup(
name="segfault",
version="0.0.1",
author="Sean Kelly",
author_email="sean.kelly.2992@gmail.com",
description="A library that makes the Python interpreter segfault.",
license="MIT",
url='https://github.com/cbgbt/segfault',
download... | <commit_before>#!/usr/bin/env python
from setuptools import setup
setup(
name="segfault",
version="0.0.1",
author="Sean Kelly",
author_email="sean.kelly.2992@gmail.com",
description="A library that makes the Python interpreter segfault.",
license="MIT",
keywords="segfault",
py_modules=['... | #!/usr/bin/env python
from setuptools import setup
setup(
name="segfault",
version="0.0.1",
author="Sean Kelly",
author_email="sean.kelly.2992@gmail.com",
description="A library that makes the Python interpreter segfault.",
license="MIT",
url='https://github.com/cbgbt/segfault',
download... | #!/usr/bin/env python
from setuptools import setup
setup(
name="segfault",
version="0.0.1",
author="Sean Kelly",
author_email="sean.kelly.2992@gmail.com",
description="A library that makes the Python interpreter segfault.",
license="MIT",
keywords="segfault",
py_modules=['segfault', 'sat... | <commit_before>#!/usr/bin/env python
from setuptools import setup
setup(
name="segfault",
version="0.0.1",
author="Sean Kelly",
author_email="sean.kelly.2992@gmail.com",
description="A library that makes the Python interpreter segfault.",
license="MIT",
keywords="segfault",
py_modules=['... |
2aaa7e9a2c9ef40ad428293c2fa6a92711e75ee8 | setup.py | setup.py | #!/usr/bin/env python3
from setuptools import setup
setup(
name='botbot',
version='0.5.0',
description='A meta-bot for Euphoria.',
author='Rishov Sarkar',
url='https://github.com/ArkaneMoose/BotBot',
license='MIT',
packages=['botbot'],
package_dir={'botbot': 'source'},
install_requ... | #!/usr/bin/env python3
from setuptools import setup
setup(
name='botbot',
version='0.5.1',
description='A meta-bot for Euphoria.',
author='Rishov Sarkar',
url='https://github.com/ArkaneMoose/BotBot',
license='MIT',
packages=['botbot'],
package_dir={'botbot': 'source'},
install_requ... | Use latest version of EuPy | Use latest version of EuPy
The latest version of EuPy has better connection handling and improved
exponential backoff behavior.
| Python | mit | ArkaneMoose/BotBot | #!/usr/bin/env python3
from setuptools import setup
setup(
name='botbot',
version='0.5.0',
description='A meta-bot for Euphoria.',
author='Rishov Sarkar',
url='https://github.com/ArkaneMoose/BotBot',
license='MIT',
packages=['botbot'],
package_dir={'botbot': 'source'},
install_requ... | #!/usr/bin/env python3
from setuptools import setup
setup(
name='botbot',
version='0.5.1',
description='A meta-bot for Euphoria.',
author='Rishov Sarkar',
url='https://github.com/ArkaneMoose/BotBot',
license='MIT',
packages=['botbot'],
package_dir={'botbot': 'source'},
install_requ... | <commit_before>#!/usr/bin/env python3
from setuptools import setup
setup(
name='botbot',
version='0.5.0',
description='A meta-bot for Euphoria.',
author='Rishov Sarkar',
url='https://github.com/ArkaneMoose/BotBot',
license='MIT',
packages=['botbot'],
package_dir={'botbot': 'source'},
... | #!/usr/bin/env python3
from setuptools import setup
setup(
name='botbot',
version='0.5.1',
description='A meta-bot for Euphoria.',
author='Rishov Sarkar',
url='https://github.com/ArkaneMoose/BotBot',
license='MIT',
packages=['botbot'],
package_dir={'botbot': 'source'},
install_requ... | #!/usr/bin/env python3
from setuptools import setup
setup(
name='botbot',
version='0.5.0',
description='A meta-bot for Euphoria.',
author='Rishov Sarkar',
url='https://github.com/ArkaneMoose/BotBot',
license='MIT',
packages=['botbot'],
package_dir={'botbot': 'source'},
install_requ... | <commit_before>#!/usr/bin/env python3
from setuptools import setup
setup(
name='botbot',
version='0.5.0',
description='A meta-bot for Euphoria.',
author='Rishov Sarkar',
url='https://github.com/ArkaneMoose/BotBot',
license='MIT',
packages=['botbot'],
package_dir={'botbot': 'source'},
... |
26b1845419cd7ea55cf1f40f26812eb9c124299f | kolibri/core/content/signals.py | kolibri/core/content/signals.py | from django.db.models import F
from django.db.models.signals import pre_delete
from django.dispatch import receiver
from .models import ChannelMetadata
from .models import ContentNode
from kolibri.core.notifications.models import LearnerProgressNotification
@receiver(pre_delete, sender=ContentNode)
def cascade_delet... | from django.db.models import F
from django.db.models.signals import pre_delete
from django.dispatch import receiver
from .models import ChannelMetadata
from .models import ContentNode
from kolibri.core.notifications.models import LearnerProgressNotification
from kolibri.core.lessons.models import Lesson
@receiver(pr... | Add Channel deletion side-effect that updates affected lessons | Add Channel deletion side-effect that updates affected lessons
| Python | mit | learningequality/kolibri,lyw07/kolibri,mrpau/kolibri,learningequality/kolibri,indirectlylit/kolibri,lyw07/kolibri,mrpau/kolibri,mrpau/kolibri,indirectlylit/kolibri,indirectlylit/kolibri,learningequality/kolibri,indirectlylit/kolibri,lyw07/kolibri,learningequality/kolibri,lyw07/kolibri,mrpau/kolibri | from django.db.models import F
from django.db.models.signals import pre_delete
from django.dispatch import receiver
from .models import ChannelMetadata
from .models import ContentNode
from kolibri.core.notifications.models import LearnerProgressNotification
@receiver(pre_delete, sender=ContentNode)
def cascade_delet... | from django.db.models import F
from django.db.models.signals import pre_delete
from django.dispatch import receiver
from .models import ChannelMetadata
from .models import ContentNode
from kolibri.core.notifications.models import LearnerProgressNotification
from kolibri.core.lessons.models import Lesson
@receiver(pr... | <commit_before>from django.db.models import F
from django.db.models.signals import pre_delete
from django.dispatch import receiver
from .models import ChannelMetadata
from .models import ContentNode
from kolibri.core.notifications.models import LearnerProgressNotification
@receiver(pre_delete, sender=ContentNode)
de... | from django.db.models import F
from django.db.models.signals import pre_delete
from django.dispatch import receiver
from .models import ChannelMetadata
from .models import ContentNode
from kolibri.core.notifications.models import LearnerProgressNotification
from kolibri.core.lessons.models import Lesson
@receiver(pr... | from django.db.models import F
from django.db.models.signals import pre_delete
from django.dispatch import receiver
from .models import ChannelMetadata
from .models import ContentNode
from kolibri.core.notifications.models import LearnerProgressNotification
@receiver(pre_delete, sender=ContentNode)
def cascade_delet... | <commit_before>from django.db.models import F
from django.db.models.signals import pre_delete
from django.dispatch import receiver
from .models import ChannelMetadata
from .models import ContentNode
from kolibri.core.notifications.models import LearnerProgressNotification
@receiver(pre_delete, sender=ContentNode)
de... |
81bebd21d7f88f042e538b73332d1727cd5117e2 | setup.py | setup.py | import os
import re
from setuptools import setup
v = open(os.path.join(os.path.dirname(__file__), 'pynuodb', '__init__.py'))
VERSION = re.compile(r".*__version__ = '(.*?)'", re.S).match(v.read()).group(1)
v.close()
readme = os.path.join(os.path.dirname(__file__), 'README.rst')
setup(
name='pynuodb',
version... | import os
import re
from setuptools import setup
v = open(os.path.join(os.path.dirname(__file__), 'pynuodb', '__init__.py'))
VERSION = re.compile(r".*__version__ = '(.*?)'", re.S).match(v.read()).group(1)
v.close()
readme = os.path.join(os.path.dirname(__file__), 'README.rst')
setup(
name='pynuodb',
version... | Fix typo: licence to license | Fix typo: licence to license
| Python | bsd-3-clause | tvincentNuoDB/nuodb-python | import os
import re
from setuptools import setup
v = open(os.path.join(os.path.dirname(__file__), 'pynuodb', '__init__.py'))
VERSION = re.compile(r".*__version__ = '(.*?)'", re.S).match(v.read()).group(1)
v.close()
readme = os.path.join(os.path.dirname(__file__), 'README.rst')
setup(
name='pynuodb',
version... | import os
import re
from setuptools import setup
v = open(os.path.join(os.path.dirname(__file__), 'pynuodb', '__init__.py'))
VERSION = re.compile(r".*__version__ = '(.*?)'", re.S).match(v.read()).group(1)
v.close()
readme = os.path.join(os.path.dirname(__file__), 'README.rst')
setup(
name='pynuodb',
version... | <commit_before>import os
import re
from setuptools import setup
v = open(os.path.join(os.path.dirname(__file__), 'pynuodb', '__init__.py'))
VERSION = re.compile(r".*__version__ = '(.*?)'", re.S).match(v.read()).group(1)
v.close()
readme = os.path.join(os.path.dirname(__file__), 'README.rst')
setup(
name='pynuod... | import os
import re
from setuptools import setup
v = open(os.path.join(os.path.dirname(__file__), 'pynuodb', '__init__.py'))
VERSION = re.compile(r".*__version__ = '(.*?)'", re.S).match(v.read()).group(1)
v.close()
readme = os.path.join(os.path.dirname(__file__), 'README.rst')
setup(
name='pynuodb',
version... | import os
import re
from setuptools import setup
v = open(os.path.join(os.path.dirname(__file__), 'pynuodb', '__init__.py'))
VERSION = re.compile(r".*__version__ = '(.*?)'", re.S).match(v.read()).group(1)
v.close()
readme = os.path.join(os.path.dirname(__file__), 'README.rst')
setup(
name='pynuodb',
version... | <commit_before>import os
import re
from setuptools import setup
v = open(os.path.join(os.path.dirname(__file__), 'pynuodb', '__init__.py'))
VERSION = re.compile(r".*__version__ = '(.*?)'", re.S).match(v.read()).group(1)
v.close()
readme = os.path.join(os.path.dirname(__file__), 'README.rst')
setup(
name='pynuod... |
a9eb6f7c9b23b0434aacfa601e0acb7fc72cb29b | setup.py | setup.py | import sys
import os
from os.path import join
from setuptools import setup
# Also in twarc.py
__version__ = '1.4.0'
if sys.version_info[0] < 3:
dependencies = open(join('requirements', 'python2.txt')).read().split()
else:
dependencies = open(join('requirements', 'python3.txt')).read().split()
if __name__ ==... | import sys
import os
from os.path import join
from setuptools import setup
# Also in twarc.py
__version__ = '1.4.0'
if sys.version_info[0] < 3:
dependencies = open(join('requirements', 'python2.txt')).read().split()
else:
dependencies = open(join('requirements', 'python3.txt')).read().split()
if __name__ ==... | Add python_requires to help pip | Add python_requires to help pip
When old Python versions are dropped, this will help pip install the right version for people still running those old Python versions.
For more info on how this works:
* https://hackernoon.com/phasing-out-python-runtimes-gracefully-956f112f33c4
* https://github.com/pypa/python-pac... | Python | cc0-1.0 | remagio/twarc,hugovk/twarc,DocNow/twarc,remagio/twarc,edsu/twarc | import sys
import os
from os.path import join
from setuptools import setup
# Also in twarc.py
__version__ = '1.4.0'
if sys.version_info[0] < 3:
dependencies = open(join('requirements', 'python2.txt')).read().split()
else:
dependencies = open(join('requirements', 'python3.txt')).read().split()
if __name__ ==... | import sys
import os
from os.path import join
from setuptools import setup
# Also in twarc.py
__version__ = '1.4.0'
if sys.version_info[0] < 3:
dependencies = open(join('requirements', 'python2.txt')).read().split()
else:
dependencies = open(join('requirements', 'python3.txt')).read().split()
if __name__ ==... | <commit_before>import sys
import os
from os.path import join
from setuptools import setup
# Also in twarc.py
__version__ = '1.4.0'
if sys.version_info[0] < 3:
dependencies = open(join('requirements', 'python2.txt')).read().split()
else:
dependencies = open(join('requirements', 'python3.txt')).read().split()
... | import sys
import os
from os.path import join
from setuptools import setup
# Also in twarc.py
__version__ = '1.4.0'
if sys.version_info[0] < 3:
dependencies = open(join('requirements', 'python2.txt')).read().split()
else:
dependencies = open(join('requirements', 'python3.txt')).read().split()
if __name__ ==... | import sys
import os
from os.path import join
from setuptools import setup
# Also in twarc.py
__version__ = '1.4.0'
if sys.version_info[0] < 3:
dependencies = open(join('requirements', 'python2.txt')).read().split()
else:
dependencies = open(join('requirements', 'python3.txt')).read().split()
if __name__ ==... | <commit_before>import sys
import os
from os.path import join
from setuptools import setup
# Also in twarc.py
__version__ = '1.4.0'
if sys.version_info[0] < 3:
dependencies = open(join('requirements', 'python2.txt')).read().split()
else:
dependencies = open(join('requirements', 'python3.txt')).read().split()
... |
4e1fc34116003c431a2a5199f4620ffa07a3305e | setup.py | setup.py | #!/usr/bin/env python
import sys
from setuptools import setup, find_packages
if sys.version_info < (3, 3):
sys.exit('Sorry, Python < 3.3 is not supported')
setup(
name='pyecore',
version='0.5.5-dev',
description=('A Python(ic) Implementation of the Eclipse Modeling '
'Framework (EMF/... | #!/usr/bin/env python
import sys
from setuptools import setup, find_packages
if sys.version_info < (3, 3):
sys.exit('Sorry, Python < 3.3 is not supported')
setup(
name='pyecore',
version='0.5.5-dev',
description=('A Python(ic) Implementation of the Eclipse Modeling '
'Framework (EMF/... | Fix missing LICENCE in dist package | Fix missing LICENCE in dist package
| Python | bsd-3-clause | aranega/pyecore,pyecore/pyecore | #!/usr/bin/env python
import sys
from setuptools import setup, find_packages
if sys.version_info < (3, 3):
sys.exit('Sorry, Python < 3.3 is not supported')
setup(
name='pyecore',
version='0.5.5-dev',
description=('A Python(ic) Implementation of the Eclipse Modeling '
'Framework (EMF/... | #!/usr/bin/env python
import sys
from setuptools import setup, find_packages
if sys.version_info < (3, 3):
sys.exit('Sorry, Python < 3.3 is not supported')
setup(
name='pyecore',
version='0.5.5-dev',
description=('A Python(ic) Implementation of the Eclipse Modeling '
'Framework (EMF/... | <commit_before>#!/usr/bin/env python
import sys
from setuptools import setup, find_packages
if sys.version_info < (3, 3):
sys.exit('Sorry, Python < 3.3 is not supported')
setup(
name='pyecore',
version='0.5.5-dev',
description=('A Python(ic) Implementation of the Eclipse Modeling '
'... | #!/usr/bin/env python
import sys
from setuptools import setup, find_packages
if sys.version_info < (3, 3):
sys.exit('Sorry, Python < 3.3 is not supported')
setup(
name='pyecore',
version='0.5.5-dev',
description=('A Python(ic) Implementation of the Eclipse Modeling '
'Framework (EMF/... | #!/usr/bin/env python
import sys
from setuptools import setup, find_packages
if sys.version_info < (3, 3):
sys.exit('Sorry, Python < 3.3 is not supported')
setup(
name='pyecore',
version='0.5.5-dev',
description=('A Python(ic) Implementation of the Eclipse Modeling '
'Framework (EMF/... | <commit_before>#!/usr/bin/env python
import sys
from setuptools import setup, find_packages
if sys.version_info < (3, 3):
sys.exit('Sorry, Python < 3.3 is not supported')
setup(
name='pyecore',
version='0.5.5-dev',
description=('A Python(ic) Implementation of the Eclipse Modeling '
'... |
6132f11d70f5b0a694d9b36caa2fc23561fb7722 | setup.py | setup.py | import setuptools
import sys
requires = 'requires/python{0}.txt'.format(sys.version_info[0])
print(requires)
with open(requires) as handle:
requirements = [line.strip() for line in handle.readlines()]
setuptools.setup(
name='sprockets.mixins.avro-publisher',
version='1.0.0',
description='Mixin for pu... | import setuptools
import sys
requires = 'requires/python{0}.txt'.format(sys.version_info[0])
print(requires)
with open(requires) as handle:
requirements = [line.strip() for line in handle.readlines()]
setuptools.setup(
name='sprockets.mixins.avro-publisher',
version='1.0.0',
description='Mixin for pu... | Adjust development status -> beta. | Adjust development status -> beta.
| Python | bsd-3-clause | sprockets/sprockets.mixins.avro-publisher | import setuptools
import sys
requires = 'requires/python{0}.txt'.format(sys.version_info[0])
print(requires)
with open(requires) as handle:
requirements = [line.strip() for line in handle.readlines()]
setuptools.setup(
name='sprockets.mixins.avro-publisher',
version='1.0.0',
description='Mixin for pu... | import setuptools
import sys
requires = 'requires/python{0}.txt'.format(sys.version_info[0])
print(requires)
with open(requires) as handle:
requirements = [line.strip() for line in handle.readlines()]
setuptools.setup(
name='sprockets.mixins.avro-publisher',
version='1.0.0',
description='Mixin for pu... | <commit_before>import setuptools
import sys
requires = 'requires/python{0}.txt'.format(sys.version_info[0])
print(requires)
with open(requires) as handle:
requirements = [line.strip() for line in handle.readlines()]
setuptools.setup(
name='sprockets.mixins.avro-publisher',
version='1.0.0',
descriptio... | import setuptools
import sys
requires = 'requires/python{0}.txt'.format(sys.version_info[0])
print(requires)
with open(requires) as handle:
requirements = [line.strip() for line in handle.readlines()]
setuptools.setup(
name='sprockets.mixins.avro-publisher',
version='1.0.0',
description='Mixin for pu... | import setuptools
import sys
requires = 'requires/python{0}.txt'.format(sys.version_info[0])
print(requires)
with open(requires) as handle:
requirements = [line.strip() for line in handle.readlines()]
setuptools.setup(
name='sprockets.mixins.avro-publisher',
version='1.0.0',
description='Mixin for pu... | <commit_before>import setuptools
import sys
requires = 'requires/python{0}.txt'.format(sys.version_info[0])
print(requires)
with open(requires) as handle:
requirements = [line.strip() for line in handle.readlines()]
setuptools.setup(
name='sprockets.mixins.avro-publisher',
version='1.0.0',
descriptio... |
d35330e9949833b37bfd56007e61ba65c63d6fd9 | setup.py | setup.py | #!/usr/bin/python
# -*- coding: utf-8 -*-
from setuptools import setup
setup(name='githublabelscopy',
version='1.0.0',
description='A tool to copy labels between repositories using Github API',
url='http://github.com/fpietka/github-labels-copy',
author='François Pietka',
author_email='fr... | #!/usr/bin/python
# -*- coding: utf-8 -*-
from setuptools import setup
setup(name='githublabelscopy',
version='1.0.0',
description='A tool to copy labels between repositories using Github API',
url='http://github.com/fpietka/github-labels-copy',
author='François Pietka',
author_email='fr... | Add more python3 versions compatible | Add more python3 versions compatible
| Python | mit | fpietka/github-labels-copy | #!/usr/bin/python
# -*- coding: utf-8 -*-
from setuptools import setup
setup(name='githublabelscopy',
version='1.0.0',
description='A tool to copy labels between repositories using Github API',
url='http://github.com/fpietka/github-labels-copy',
author='François Pietka',
author_email='fr... | #!/usr/bin/python
# -*- coding: utf-8 -*-
from setuptools import setup
setup(name='githublabelscopy',
version='1.0.0',
description='A tool to copy labels between repositories using Github API',
url='http://github.com/fpietka/github-labels-copy',
author='François Pietka',
author_email='fr... | <commit_before>#!/usr/bin/python
# -*- coding: utf-8 -*-
from setuptools import setup
setup(name='githublabelscopy',
version='1.0.0',
description='A tool to copy labels between repositories using Github API',
url='http://github.com/fpietka/github-labels-copy',
author='François Pietka',
a... | #!/usr/bin/python
# -*- coding: utf-8 -*-
from setuptools import setup
setup(name='githublabelscopy',
version='1.0.0',
description='A tool to copy labels between repositories using Github API',
url='http://github.com/fpietka/github-labels-copy',
author='François Pietka',
author_email='fr... | #!/usr/bin/python
# -*- coding: utf-8 -*-
from setuptools import setup
setup(name='githublabelscopy',
version='1.0.0',
description='A tool to copy labels between repositories using Github API',
url='http://github.com/fpietka/github-labels-copy',
author='François Pietka',
author_email='fr... | <commit_before>#!/usr/bin/python
# -*- coding: utf-8 -*-
from setuptools import setup
setup(name='githublabelscopy',
version='1.0.0',
description='A tool to copy labels between repositories using Github API',
url='http://github.com/fpietka/github-labels-copy',
author='François Pietka',
a... |
11359d5b72af828635eb80e7c71e5a9bf92defd8 | setup.py | setup.py | # import multiprocessing to avoid this bug (http://bugs.python.org/issue15881#msg170215)
import multiprocessing
assert multiprocessing
import re
from setuptools import setup, find_packages
def get_version():
"""
Extracts the version number from the version.py file.
"""
VERSION_FILE = '{{ project_name ... | # import multiprocessing to avoid this bug (http://bugs.python.org/issue15881#msg170215)
import multiprocessing
assert multiprocessing
import re
from setuptools import setup, find_packages
def get_version():
"""
Extracts the version number from the version.py file.
"""
VERSION_FILE = '{{ project_name ... | Add mock to test requirements. | Add mock to test requirements.
| Python | mit | ambitioninc/django-app-template | # import multiprocessing to avoid this bug (http://bugs.python.org/issue15881#msg170215)
import multiprocessing
assert multiprocessing
import re
from setuptools import setup, find_packages
def get_version():
"""
Extracts the version number from the version.py file.
"""
VERSION_FILE = '{{ project_name ... | # import multiprocessing to avoid this bug (http://bugs.python.org/issue15881#msg170215)
import multiprocessing
assert multiprocessing
import re
from setuptools import setup, find_packages
def get_version():
"""
Extracts the version number from the version.py file.
"""
VERSION_FILE = '{{ project_name ... | <commit_before># import multiprocessing to avoid this bug (http://bugs.python.org/issue15881#msg170215)
import multiprocessing
assert multiprocessing
import re
from setuptools import setup, find_packages
def get_version():
"""
Extracts the version number from the version.py file.
"""
VERSION_FILE = '{... | # import multiprocessing to avoid this bug (http://bugs.python.org/issue15881#msg170215)
import multiprocessing
assert multiprocessing
import re
from setuptools import setup, find_packages
def get_version():
"""
Extracts the version number from the version.py file.
"""
VERSION_FILE = '{{ project_name ... | # import multiprocessing to avoid this bug (http://bugs.python.org/issue15881#msg170215)
import multiprocessing
assert multiprocessing
import re
from setuptools import setup, find_packages
def get_version():
"""
Extracts the version number from the version.py file.
"""
VERSION_FILE = '{{ project_name ... | <commit_before># import multiprocessing to avoid this bug (http://bugs.python.org/issue15881#msg170215)
import multiprocessing
assert multiprocessing
import re
from setuptools import setup, find_packages
def get_version():
"""
Extracts the version number from the version.py file.
"""
VERSION_FILE = '{... |
2a4c13d46cb7168482985af4ab7eeaf251042a09 | camera_filters.py | camera_filters.py | """ Apply different filters here """
import cv2 # import OpenCV 3 module
camera = cv2.VideoCapture(0) # get default camera
mode = 2 # default mode, apply Canny edge detection
while True:
ok, frame = camera.read() # read frame
if ok: # frame is read correctly
if mode == 2:
frame = cv2.... | """ Apply different filters here """
import cv2 # import OpenCV 3 module
camera = cv2.VideoCapture(0) # get default camera
mode = 2 # default mode, apply Canny edge detection
while True:
ok, frame = camera.read() # read frame
if ok: # frame is read correctly
if mode == 2:
frame = cv2.... | Apply Canny edge detection to grayscale. No big difference with colored Canny edge detection. | Apply Canny edge detection to grayscale. No big difference with colored Canny edge detection.
| Python | mit | foobar167/junkyard,foobar167/junkyard,foobar167/junkyard,foobar167/junkyard,foobar167/junkyard,foobar167/junkyard | """ Apply different filters here """
import cv2 # import OpenCV 3 module
camera = cv2.VideoCapture(0) # get default camera
mode = 2 # default mode, apply Canny edge detection
while True:
ok, frame = camera.read() # read frame
if ok: # frame is read correctly
if mode == 2:
frame = cv2.... | """ Apply different filters here """
import cv2 # import OpenCV 3 module
camera = cv2.VideoCapture(0) # get default camera
mode = 2 # default mode, apply Canny edge detection
while True:
ok, frame = camera.read() # read frame
if ok: # frame is read correctly
if mode == 2:
frame = cv2.... | <commit_before>""" Apply different filters here """
import cv2 # import OpenCV 3 module
camera = cv2.VideoCapture(0) # get default camera
mode = 2 # default mode, apply Canny edge detection
while True:
ok, frame = camera.read() # read frame
if ok: # frame is read correctly
if mode == 2:
... | """ Apply different filters here """
import cv2 # import OpenCV 3 module
camera = cv2.VideoCapture(0) # get default camera
mode = 2 # default mode, apply Canny edge detection
while True:
ok, frame = camera.read() # read frame
if ok: # frame is read correctly
if mode == 2:
frame = cv2.... | """ Apply different filters here """
import cv2 # import OpenCV 3 module
camera = cv2.VideoCapture(0) # get default camera
mode = 2 # default mode, apply Canny edge detection
while True:
ok, frame = camera.read() # read frame
if ok: # frame is read correctly
if mode == 2:
frame = cv2.... | <commit_before>""" Apply different filters here """
import cv2 # import OpenCV 3 module
camera = cv2.VideoCapture(0) # get default camera
mode = 2 # default mode, apply Canny edge detection
while True:
ok, frame = camera.read() # read frame
if ok: # frame is read correctly
if mode == 2:
... |
6571f2dab7ea94ffb86d054831b8b2abe21f861e | corehq/apps/accounting/migrations/0032_billingaccount_invoicing_plan.py | corehq/apps/accounting/migrations/0032_billingaccount_invoicing_plan.py | # -*- coding: utf-8 -*-
# Generated by Django 1.11.13 on 2018-06-27 18:30
from __future__ import unicode_literals
from __future__ import absolute_import
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('accounting', '0031_billingaccount_billing_admin_emai... | # -*- coding: utf-8 -*-
# Generated by Django 1.11.13 on 2018-06-27 18:30
from __future__ import unicode_literals
from __future__ import absolute_import
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('accounting', '0031_billingaccount_billing_admin_emai... | Add invoicing_plan with quarterly and yearly options | Add invoicing_plan with quarterly and yearly options
| Python | bsd-3-clause | dimagi/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq | # -*- coding: utf-8 -*-
# Generated by Django 1.11.13 on 2018-06-27 18:30
from __future__ import unicode_literals
from __future__ import absolute_import
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('accounting', '0031_billingaccount_billing_admin_emai... | # -*- coding: utf-8 -*-
# Generated by Django 1.11.13 on 2018-06-27 18:30
from __future__ import unicode_literals
from __future__ import absolute_import
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('accounting', '0031_billingaccount_billing_admin_emai... | <commit_before># -*- coding: utf-8 -*-
# Generated by Django 1.11.13 on 2018-06-27 18:30
from __future__ import unicode_literals
from __future__ import absolute_import
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('accounting', '0031_billingaccount_bil... | # -*- coding: utf-8 -*-
# Generated by Django 1.11.13 on 2018-06-27 18:30
from __future__ import unicode_literals
from __future__ import absolute_import
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('accounting', '0031_billingaccount_billing_admin_emai... | # -*- coding: utf-8 -*-
# Generated by Django 1.11.13 on 2018-06-27 18:30
from __future__ import unicode_literals
from __future__ import absolute_import
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('accounting', '0031_billingaccount_billing_admin_emai... | <commit_before># -*- coding: utf-8 -*-
# Generated by Django 1.11.13 on 2018-06-27 18:30
from __future__ import unicode_literals
from __future__ import absolute_import
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('accounting', '0031_billingaccount_bil... |
695043ff82e80fdc3b0186dea268dd0eff79d642 | webapp/tests/test_util.py | webapp/tests/test_util.py | from django.test import TestCase
from graphite import util
from graphite.wsgi import application # NOQA makes sure we have a working WSGI app
class UtilTest(TestCase):
def test_is_local_interface(self):
addresses = ['127.0.0.1', '127.0.0.1:8080', '8.8.8.8']
results = [ util.is_local_interface(a)... | from django.test import TestCase
from graphite import util
from graphite.wsgi import application # NOQA makes sure we have a working WSGI app
class UtilTest(TestCase):
def test_is_local_interface(self):
addresses = ['127.0.0.1', '127.0.0.1:8080', '8.8.8.8']
results = [ util.is_local_interface(a)... | Add coverage to util.py for IPv6 and make_index | Add coverage to util.py for IPv6 and make_index
| Python | apache-2.0 | brutasse/graphite-web,DanCech/graphite-web,obfuscurity/graphite-web,deniszh/graphite-web,drax68/graphite-web,cbowman0/graphite-web,mcoolive/graphite-web,drax68/graphite-web,atnak/graphite-web,krux/graphite-web,johnseekins/graphite-web,brutasse/graphite-web,krux/graphite-web,drax68/graphite-web,bmhatfield/graphite-web,c... | from django.test import TestCase
from graphite import util
from graphite.wsgi import application # NOQA makes sure we have a working WSGI app
class UtilTest(TestCase):
def test_is_local_interface(self):
addresses = ['127.0.0.1', '127.0.0.1:8080', '8.8.8.8']
results = [ util.is_local_interface(a)... | from django.test import TestCase
from graphite import util
from graphite.wsgi import application # NOQA makes sure we have a working WSGI app
class UtilTest(TestCase):
def test_is_local_interface(self):
addresses = ['127.0.0.1', '127.0.0.1:8080', '8.8.8.8']
results = [ util.is_local_interface(a)... | <commit_before>from django.test import TestCase
from graphite import util
from graphite.wsgi import application # NOQA makes sure we have a working WSGI app
class UtilTest(TestCase):
def test_is_local_interface(self):
addresses = ['127.0.0.1', '127.0.0.1:8080', '8.8.8.8']
results = [ util.is_loc... | from django.test import TestCase
from graphite import util
from graphite.wsgi import application # NOQA makes sure we have a working WSGI app
class UtilTest(TestCase):
def test_is_local_interface(self):
addresses = ['127.0.0.1', '127.0.0.1:8080', '8.8.8.8']
results = [ util.is_local_interface(a)... | from django.test import TestCase
from graphite import util
from graphite.wsgi import application # NOQA makes sure we have a working WSGI app
class UtilTest(TestCase):
def test_is_local_interface(self):
addresses = ['127.0.0.1', '127.0.0.1:8080', '8.8.8.8']
results = [ util.is_local_interface(a)... | <commit_before>from django.test import TestCase
from graphite import util
from graphite.wsgi import application # NOQA makes sure we have a working WSGI app
class UtilTest(TestCase):
def test_is_local_interface(self):
addresses = ['127.0.0.1', '127.0.0.1:8080', '8.8.8.8']
results = [ util.is_loc... |
c63391026fadc6f23ca7802e6ec706365ae4e117 | daemon/daemon.py | daemon/daemon.py | #!/usr/bin/env python
import json
from objects.album import Album
from spotify_crawler import SpotifyCrawler
if __name__ == "__main__":
crawler = SpotifyCrawler()
artist = crawler.searchArtist("Ed Sheeran")
if artist:
albums = crawler.getAlbumsByArtist(artist.getArtistId())
for album... | #!/usr/bin/env python
import json
from objects.album import Album
from spotify_crawler import SpotifyCrawler
if __name__ == "__main__":
crawler = SpotifyCrawler()
artist_name = "Ed Sheeran"
artist = crawler.searchArtist(artist_name)
if artist:
albums = crawler.getAlbumsByArtist(artist.get... | Add the error handle if artist doesn't exist.. | Add the error handle if artist doesn't exist..
| Python | apache-2.0 | rockers7414/xmusic,rockers7414/xmusic-crawler | #!/usr/bin/env python
import json
from objects.album import Album
from spotify_crawler import SpotifyCrawler
if __name__ == "__main__":
crawler = SpotifyCrawler()
artist = crawler.searchArtist("Ed Sheeran")
if artist:
albums = crawler.getAlbumsByArtist(artist.getArtistId())
for album... | #!/usr/bin/env python
import json
from objects.album import Album
from spotify_crawler import SpotifyCrawler
if __name__ == "__main__":
crawler = SpotifyCrawler()
artist_name = "Ed Sheeran"
artist = crawler.searchArtist(artist_name)
if artist:
albums = crawler.getAlbumsByArtist(artist.get... | <commit_before>#!/usr/bin/env python
import json
from objects.album import Album
from spotify_crawler import SpotifyCrawler
if __name__ == "__main__":
crawler = SpotifyCrawler()
artist = crawler.searchArtist("Ed Sheeran")
if artist:
albums = crawler.getAlbumsByArtist(artist.getArtistId())
... | #!/usr/bin/env python
import json
from objects.album import Album
from spotify_crawler import SpotifyCrawler
if __name__ == "__main__":
crawler = SpotifyCrawler()
artist_name = "Ed Sheeran"
artist = crawler.searchArtist(artist_name)
if artist:
albums = crawler.getAlbumsByArtist(artist.get... | #!/usr/bin/env python
import json
from objects.album import Album
from spotify_crawler import SpotifyCrawler
if __name__ == "__main__":
crawler = SpotifyCrawler()
artist = crawler.searchArtist("Ed Sheeran")
if artist:
albums = crawler.getAlbumsByArtist(artist.getArtistId())
for album... | <commit_before>#!/usr/bin/env python
import json
from objects.album import Album
from spotify_crawler import SpotifyCrawler
if __name__ == "__main__":
crawler = SpotifyCrawler()
artist = crawler.searchArtist("Ed Sheeran")
if artist:
albums = crawler.getAlbumsByArtist(artist.getArtistId())
... |
42bc233ca11e6d5283fa760fa736585a7716afac | cvdb/urls.py | cvdb/urls.py | """cvdb URL Configuration
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/1.11/topics/http/urls/
Examples:
Function views
1. Add an import: from my_app import views
2. Add a URL to urlpatterns: url(r'^$', views.home, name='home')
Class-based... | """cvdb URL Configuration
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/1.11/topics/http/urls/
Examples:
Function views
1. Add an import: from my_app import views
2. Add a URL to urlpatterns: url(r'^$', views.home, name='home')
Class-based... | Disable default Django authorization URLs | Disable default Django authorization URLs
| Python | mit | jarnoln/cvdb,jarnoln/cvdb | """cvdb URL Configuration
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/1.11/topics/http/urls/
Examples:
Function views
1. Add an import: from my_app import views
2. Add a URL to urlpatterns: url(r'^$', views.home, name='home')
Class-based... | """cvdb URL Configuration
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/1.11/topics/http/urls/
Examples:
Function views
1. Add an import: from my_app import views
2. Add a URL to urlpatterns: url(r'^$', views.home, name='home')
Class-based... | <commit_before>"""cvdb URL Configuration
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/1.11/topics/http/urls/
Examples:
Function views
1. Add an import: from my_app import views
2. Add a URL to urlpatterns: url(r'^$', views.home, name='hom... | """cvdb URL Configuration
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/1.11/topics/http/urls/
Examples:
Function views
1. Add an import: from my_app import views
2. Add a URL to urlpatterns: url(r'^$', views.home, name='home')
Class-based... | """cvdb URL Configuration
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/1.11/topics/http/urls/
Examples:
Function views
1. Add an import: from my_app import views
2. Add a URL to urlpatterns: url(r'^$', views.home, name='home')
Class-based... | <commit_before>"""cvdb URL Configuration
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/1.11/topics/http/urls/
Examples:
Function views
1. Add an import: from my_app import views
2. Add a URL to urlpatterns: url(r'^$', views.home, name='hom... |
f735cd9f9cfdcfba54005151fee3deb7741282c3 | show.py | show.py | import numpy as np
import scipy as sp
import matplotlib.pyplot as plt
def sweep(x, sweep_time, fs):
t = np.arange(0, sweep_time, 1 / fs)
p = 20 * np.log10(abs(sp.fft(x)))
f = np.linspace(0, fs / 2, len(p))
plt.figure(1)
plt.subplot(211)
plt.plot(t, x)
plt.grid()
plt.subplot(212)
p... | import numpy as np
import matplotlib.pyplot as plt
def sweep(x, sweep_time, fs):
plt.subplots_adjust(hspace=0.4)
t = np.arange(0, sweep_time, 1 / fs)
p = 20 * np.log10(abs(np.fft.rfft(x)))
f = np.linspace(0, fs / 2, len(p))
plt.figure(1)
plt.subplot(211)
plt.plot(t, x)
plt.grid()
... | Add axis label and change import | Add axis label and change import
| Python | mit | franzpl/sweep,spatialaudio/sweep | import numpy as np
import scipy as sp
import matplotlib.pyplot as plt
def sweep(x, sweep_time, fs):
t = np.arange(0, sweep_time, 1 / fs)
p = 20 * np.log10(abs(sp.fft(x)))
f = np.linspace(0, fs / 2, len(p))
plt.figure(1)
plt.subplot(211)
plt.plot(t, x)
plt.grid()
plt.subplot(212)
p... | import numpy as np
import matplotlib.pyplot as plt
def sweep(x, sweep_time, fs):
plt.subplots_adjust(hspace=0.4)
t = np.arange(0, sweep_time, 1 / fs)
p = 20 * np.log10(abs(np.fft.rfft(x)))
f = np.linspace(0, fs / 2, len(p))
plt.figure(1)
plt.subplot(211)
plt.plot(t, x)
plt.grid()
... | <commit_before>import numpy as np
import scipy as sp
import matplotlib.pyplot as plt
def sweep(x, sweep_time, fs):
t = np.arange(0, sweep_time, 1 / fs)
p = 20 * np.log10(abs(sp.fft(x)))
f = np.linspace(0, fs / 2, len(p))
plt.figure(1)
plt.subplot(211)
plt.plot(t, x)
plt.grid()
plt.sub... | import numpy as np
import matplotlib.pyplot as plt
def sweep(x, sweep_time, fs):
plt.subplots_adjust(hspace=0.4)
t = np.arange(0, sweep_time, 1 / fs)
p = 20 * np.log10(abs(np.fft.rfft(x)))
f = np.linspace(0, fs / 2, len(p))
plt.figure(1)
plt.subplot(211)
plt.plot(t, x)
plt.grid()
... | import numpy as np
import scipy as sp
import matplotlib.pyplot as plt
def sweep(x, sweep_time, fs):
t = np.arange(0, sweep_time, 1 / fs)
p = 20 * np.log10(abs(sp.fft(x)))
f = np.linspace(0, fs / 2, len(p))
plt.figure(1)
plt.subplot(211)
plt.plot(t, x)
plt.grid()
plt.subplot(212)
p... | <commit_before>import numpy as np
import scipy as sp
import matplotlib.pyplot as plt
def sweep(x, sweep_time, fs):
t = np.arange(0, sweep_time, 1 / fs)
p = 20 * np.log10(abs(sp.fft(x)))
f = np.linspace(0, fs / 2, len(p))
plt.figure(1)
plt.subplot(211)
plt.plot(t, x)
plt.grid()
plt.sub... |
8930337ef2402a9e5a6dfe3a336fc24b0ffbf87f | reviewboard/accounts/urls.py | reviewboard/accounts/urls.py | from __future__ import unicode_literals
from django.conf.urls import patterns, url
urlpatterns = patterns(
"reviewboard.accounts.views",
url(r'^register/$', 'account_register',
{'next_url': 'dashboard'}, name="register"),
url(r'^preferences/$', 'user_preferences', name="user-preferences"),
)
ur... | from __future__ import unicode_literals
from django.conf.urls import patterns, url
urlpatterns = patterns(
"reviewboard.accounts.views",
url(r'^register/$', 'account_register',
{'next_url': 'dashboard'}, name="register"),
url(r'^preferences/$', 'user_preferences', name="user-preferences"),
)
ur... | Fix internal server error at url /account/recover | Fix internal server error at url /account/recover
Fixed a 500 error at /account/recover when trying to reset password on the
login page.
Testing Done:
Verified that the server no longer returns a 500 error when loading the form.
Reviewed at https://reviews.reviewboard.org/r/5431/
| Python | mit | beol/reviewboard,davidt/reviewboard,beol/reviewboard,1tush/reviewboard,custode/reviewboard,reviewboard/reviewboard,KnowNo/reviewboard,KnowNo/reviewboard,1tush/reviewboard,beol/reviewboard,1tush/reviewboard,beol/reviewboard,brennie/reviewboard,sgallagher/reviewboard,reviewboard/reviewboard,bkochendorfer/reviewboard,cust... | from __future__ import unicode_literals
from django.conf.urls import patterns, url
urlpatterns = patterns(
"reviewboard.accounts.views",
url(r'^register/$', 'account_register',
{'next_url': 'dashboard'}, name="register"),
url(r'^preferences/$', 'user_preferences', name="user-preferences"),
)
ur... | from __future__ import unicode_literals
from django.conf.urls import patterns, url
urlpatterns = patterns(
"reviewboard.accounts.views",
url(r'^register/$', 'account_register',
{'next_url': 'dashboard'}, name="register"),
url(r'^preferences/$', 'user_preferences', name="user-preferences"),
)
ur... | <commit_before>from __future__ import unicode_literals
from django.conf.urls import patterns, url
urlpatterns = patterns(
"reviewboard.accounts.views",
url(r'^register/$', 'account_register',
{'next_url': 'dashboard'}, name="register"),
url(r'^preferences/$', 'user_preferences', name="user-prefe... | from __future__ import unicode_literals
from django.conf.urls import patterns, url
urlpatterns = patterns(
"reviewboard.accounts.views",
url(r'^register/$', 'account_register',
{'next_url': 'dashboard'}, name="register"),
url(r'^preferences/$', 'user_preferences', name="user-preferences"),
)
ur... | from __future__ import unicode_literals
from django.conf.urls import patterns, url
urlpatterns = patterns(
"reviewboard.accounts.views",
url(r'^register/$', 'account_register',
{'next_url': 'dashboard'}, name="register"),
url(r'^preferences/$', 'user_preferences', name="user-preferences"),
)
ur... | <commit_before>from __future__ import unicode_literals
from django.conf.urls import patterns, url
urlpatterns = patterns(
"reviewboard.accounts.views",
url(r'^register/$', 'account_register',
{'next_url': 'dashboard'}, name="register"),
url(r'^preferences/$', 'user_preferences', name="user-prefe... |
50199aa8e270ff68f8d1026f88519609e2c97229 | djgunicorn/config.py | djgunicorn/config.py | """Gunicorn configuration file used by gunserver's Gunicorn subprocess.
This module is not designed to be imported directly, but provided as
Gunicorn's configuration file.
"""
import os
import sys
import django
import gunicorn
# General configs.
bind = os.environ['DJANGO_ADDRPORT']
logger_class = 'djgunicorn.loggi... | """Gunicorn configuration file used by gunserver's Gunicorn subprocess.
This module is not designed to be imported directly, but provided as
Gunicorn's configuration file.
"""
import os
import sys
import django
import gunicorn
# General configs.
bind = os.environ['DJANGO_ADDRPORT']
logger_class = 'djgunicorn.loggi... | Use worker_int to avoid \n being printed too late | Use worker_int to avoid \n being printed too late
| Python | bsd-3-clause | uranusjr/django-gunicorn | """Gunicorn configuration file used by gunserver's Gunicorn subprocess.
This module is not designed to be imported directly, but provided as
Gunicorn's configuration file.
"""
import os
import sys
import django
import gunicorn
# General configs.
bind = os.environ['DJANGO_ADDRPORT']
logger_class = 'djgunicorn.loggi... | """Gunicorn configuration file used by gunserver's Gunicorn subprocess.
This module is not designed to be imported directly, but provided as
Gunicorn's configuration file.
"""
import os
import sys
import django
import gunicorn
# General configs.
bind = os.environ['DJANGO_ADDRPORT']
logger_class = 'djgunicorn.loggi... | <commit_before>"""Gunicorn configuration file used by gunserver's Gunicorn subprocess.
This module is not designed to be imported directly, but provided as
Gunicorn's configuration file.
"""
import os
import sys
import django
import gunicorn
# General configs.
bind = os.environ['DJANGO_ADDRPORT']
logger_class = 'd... | """Gunicorn configuration file used by gunserver's Gunicorn subprocess.
This module is not designed to be imported directly, but provided as
Gunicorn's configuration file.
"""
import os
import sys
import django
import gunicorn
# General configs.
bind = os.environ['DJANGO_ADDRPORT']
logger_class = 'djgunicorn.loggi... | """Gunicorn configuration file used by gunserver's Gunicorn subprocess.
This module is not designed to be imported directly, but provided as
Gunicorn's configuration file.
"""
import os
import sys
import django
import gunicorn
# General configs.
bind = os.environ['DJANGO_ADDRPORT']
logger_class = 'djgunicorn.loggi... | <commit_before>"""Gunicorn configuration file used by gunserver's Gunicorn subprocess.
This module is not designed to be imported directly, but provided as
Gunicorn's configuration file.
"""
import os
import sys
import django
import gunicorn
# General configs.
bind = os.environ['DJANGO_ADDRPORT']
logger_class = 'd... |
a47b7ecc10f7aeff7b5897e30b608a313029c20d | checkmeout.py | checkmeout.py | from flask import Flask, render_template
app = Flask(__name__)
@app.route('/')
def home():
return render_template('index.html')
if __name__ == '__main__':
app.run() | from flask import Flask, render_template
app = Flask(__name__)
@app.route('/')
def home():
return render_template('index.html')
if __name__ == '__main__':
app.run(debug=True)
| Change server to debug mode | Change server to debug mode
| Python | mit | tomshen/checkmeout,tomshen/checkmeout | from flask import Flask, render_template
app = Flask(__name__)
@app.route('/')
def home():
return render_template('index.html')
if __name__ == '__main__':
app.run()Change server to debug mode | from flask import Flask, render_template
app = Flask(__name__)
@app.route('/')
def home():
return render_template('index.html')
if __name__ == '__main__':
app.run(debug=True)
| <commit_before>from flask import Flask, render_template
app = Flask(__name__)
@app.route('/')
def home():
return render_template('index.html')
if __name__ == '__main__':
app.run()<commit_msg>Change server to debug mode<commit_after> | from flask import Flask, render_template
app = Flask(__name__)
@app.route('/')
def home():
return render_template('index.html')
if __name__ == '__main__':
app.run(debug=True)
| from flask import Flask, render_template
app = Flask(__name__)
@app.route('/')
def home():
return render_template('index.html')
if __name__ == '__main__':
app.run()Change server to debug modefrom flask import Flask, render_template
app = Flask(__name__)
@app.route('/')
def home():
return render_template('... | <commit_before>from flask import Flask, render_template
app = Flask(__name__)
@app.route('/')
def home():
return render_template('index.html')
if __name__ == '__main__':
app.run()<commit_msg>Change server to debug mode<commit_after>from flask import Flask, render_template
app = Flask(__name__)
@app.route('/')... |
8741c1887b3d04e4e2dd3ef9df49a78d97df1d1b | hypermap/aggregator/urls.py | hypermap/aggregator/urls.py | from django.conf import settings
from django.conf.urls import include, patterns, url
from . import views
urlpatterns = [
url(r'^$', views.index, name='index'),
url(r'^search', views.search, name='search'),
url(r'^service/(?P<service_id>\d+)/$', views.service_detail, name='service_detail'),
url(r'^serv... | from django.conf import settings
from django.conf.urls import include, patterns, url
from . import views
index = url(r'^', views.search, name='index')
if settings.SOLR_ENABLED:
index = url(r'^$', views.index, name='index')
urlpatterns = [
index,
url(r'^search', views.search, name='search'),
url(r'^s... | Use old index view when SOLR is disabled | Use old index view when SOLR is disabled
| Python | mit | cga-harvard/hypermap,cga-harvard/HHypermap,cga-harvard/HHypermap,cga-harvard/hypermap,jmwenda/hypermap,cga-harvard/HHypermap,jmwenda/hypermap,jmwenda/hypermap,cga-harvard/hypermap,jmwenda/hypermap,cga-harvard/hypermap,cga-harvard/HHypermap | from django.conf import settings
from django.conf.urls import include, patterns, url
from . import views
urlpatterns = [
url(r'^$', views.index, name='index'),
url(r'^search', views.search, name='search'),
url(r'^service/(?P<service_id>\d+)/$', views.service_detail, name='service_detail'),
url(r'^serv... | from django.conf import settings
from django.conf.urls import include, patterns, url
from . import views
index = url(r'^', views.search, name='index')
if settings.SOLR_ENABLED:
index = url(r'^$', views.index, name='index')
urlpatterns = [
index,
url(r'^search', views.search, name='search'),
url(r'^s... | <commit_before>from django.conf import settings
from django.conf.urls import include, patterns, url
from . import views
urlpatterns = [
url(r'^$', views.index, name='index'),
url(r'^search', views.search, name='search'),
url(r'^service/(?P<service_id>\d+)/$', views.service_detail, name='service_detail'),
... | from django.conf import settings
from django.conf.urls import include, patterns, url
from . import views
index = url(r'^', views.search, name='index')
if settings.SOLR_ENABLED:
index = url(r'^$', views.index, name='index')
urlpatterns = [
index,
url(r'^search', views.search, name='search'),
url(r'^s... | from django.conf import settings
from django.conf.urls import include, patterns, url
from . import views
urlpatterns = [
url(r'^$', views.index, name='index'),
url(r'^search', views.search, name='search'),
url(r'^service/(?P<service_id>\d+)/$', views.service_detail, name='service_detail'),
url(r'^serv... | <commit_before>from django.conf import settings
from django.conf.urls import include, patterns, url
from . import views
urlpatterns = [
url(r'^$', views.index, name='index'),
url(r'^search', views.search, name='search'),
url(r'^service/(?P<service_id>\d+)/$', views.service_detail, name='service_detail'),
... |
01c7a5657078bff2670ec2913ad0b884598dbcbb | cde/types.py | cde/types.py | """Types to make coding cde easier"""
import os
from pysyte.types import paths
from pysyte.types.lists import UniquelyTrues
class PossiblePaths(UniquelyTrues):
"""A unique list of possible paths"""
def predicate(self, item):
"""Exclude items which don't exist"""
return bool(item) and os.pat... | """Types to make coding cde easier"""
import os
from typing import List
from pysyte.types import paths
from pysyte.types.lists import UniquelyTrues
class PossiblePaths(UniquelyTrues):
"""A unique list of possible paths"""
def convert(self, item: str) -> paths.StringPath:
return paths.path(item)
... | Add Roots class to filter paths of children | Add Roots class to filter paths of children
Takes out python dirs like .../cde/cde
| Python | mit | jalanb/kd,jalanb/kd | """Types to make coding cde easier"""
import os
from pysyte.types import paths
from pysyte.types.lists import UniquelyTrues
class PossiblePaths(UniquelyTrues):
"""A unique list of possible paths"""
def predicate(self, item):
"""Exclude items which don't exist"""
return bool(item) and os.pat... | """Types to make coding cde easier"""
import os
from typing import List
from pysyte.types import paths
from pysyte.types.lists import UniquelyTrues
class PossiblePaths(UniquelyTrues):
"""A unique list of possible paths"""
def convert(self, item: str) -> paths.StringPath:
return paths.path(item)
... | <commit_before>"""Types to make coding cde easier"""
import os
from pysyte.types import paths
from pysyte.types.lists import UniquelyTrues
class PossiblePaths(UniquelyTrues):
"""A unique list of possible paths"""
def predicate(self, item):
"""Exclude items which don't exist"""
return bool(i... | """Types to make coding cde easier"""
import os
from typing import List
from pysyte.types import paths
from pysyte.types.lists import UniquelyTrues
class PossiblePaths(UniquelyTrues):
"""A unique list of possible paths"""
def convert(self, item: str) -> paths.StringPath:
return paths.path(item)
... | """Types to make coding cde easier"""
import os
from pysyte.types import paths
from pysyte.types.lists import UniquelyTrues
class PossiblePaths(UniquelyTrues):
"""A unique list of possible paths"""
def predicate(self, item):
"""Exclude items which don't exist"""
return bool(item) and os.pat... | <commit_before>"""Types to make coding cde easier"""
import os
from pysyte.types import paths
from pysyte.types.lists import UniquelyTrues
class PossiblePaths(UniquelyTrues):
"""A unique list of possible paths"""
def predicate(self, item):
"""Exclude items which don't exist"""
return bool(i... |
3d7ba9709b33982e6e65b24ee6f7d97cfa6ef22f | db/buyout.py | db/buyout.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from .common import Base, session_scope
from sqlalchemy import and_
class Buyout(Base):
__tablename__ = 'buyouts'
__autoload__ = True
STANDARD_ATTRS = [
'buyout_team_id', 'buyout_date', 'length', 'value',
'start_season', 'end_season'
... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from .common import Base, session_scope
class Buyout(Base):
__tablename__ = 'buyouts'
__autoload__ = True
STANDARD_ATTRS = [
'buyout_team_id', 'buyout_date', 'length', 'value',
'start_season', 'end_season'
]
def __init__(self, pl... | Add find, update and comparison methods | Add find, update and comparison methods
| Python | mit | leaffan/pynhldb | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from .common import Base, session_scope
from sqlalchemy import and_
class Buyout(Base):
__tablename__ = 'buyouts'
__autoload__ = True
STANDARD_ATTRS = [
'buyout_team_id', 'buyout_date', 'length', 'value',
'start_season', 'end_season'
... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from .common import Base, session_scope
class Buyout(Base):
__tablename__ = 'buyouts'
__autoload__ = True
STANDARD_ATTRS = [
'buyout_team_id', 'buyout_date', 'length', 'value',
'start_season', 'end_season'
]
def __init__(self, pl... | <commit_before>#!/usr/bin/env python
# -*- coding: utf-8 -*-
from .common import Base, session_scope
from sqlalchemy import and_
class Buyout(Base):
__tablename__ = 'buyouts'
__autoload__ = True
STANDARD_ATTRS = [
'buyout_team_id', 'buyout_date', 'length', 'value',
'start_season', 'end_... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from .common import Base, session_scope
class Buyout(Base):
__tablename__ = 'buyouts'
__autoload__ = True
STANDARD_ATTRS = [
'buyout_team_id', 'buyout_date', 'length', 'value',
'start_season', 'end_season'
]
def __init__(self, pl... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from .common import Base, session_scope
from sqlalchemy import and_
class Buyout(Base):
__tablename__ = 'buyouts'
__autoload__ = True
STANDARD_ATTRS = [
'buyout_team_id', 'buyout_date', 'length', 'value',
'start_season', 'end_season'
... | <commit_before>#!/usr/bin/env python
# -*- coding: utf-8 -*-
from .common import Base, session_scope
from sqlalchemy import and_
class Buyout(Base):
__tablename__ = 'buyouts'
__autoload__ = True
STANDARD_ATTRS = [
'buyout_team_id', 'buyout_date', 'length', 'value',
'start_season', 'end_... |
3feccc140c0371becccb3f80bef00d30b4bc15bf | corehq/sql_accessors/migrations/0056_add_hashlib_functions.py | corehq/sql_accessors/migrations/0056_add_hashlib_functions.py | # -*- coding: utf-8 -*-
# Generated by Django 1.11.6 on 2017-12-04 08:36
from __future__ import absolute_import, unicode_literals
from django.db import migrations
from django.conf import settings
from corehq.sql_db.operations import HqRunSQL, noop_migration
class Migration(migrations.Migration):
dependencies = ... | # -*- coding: utf-8 -*-
# Generated by Django 1.11.6 on 2017-12-04 08:36
from __future__ import absolute_import, unicode_literals
from django.db import migrations
from django.conf import settings
from corehq.sql_db.operations import HqRunSQL, noop_migration
class Migration(migrations.Migration):
dependencies = ... | Add comment about moving hashlib extention creation to test harness | Add comment about moving hashlib extention creation to test harness
| Python | bsd-3-clause | dimagi/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq | # -*- coding: utf-8 -*-
# Generated by Django 1.11.6 on 2017-12-04 08:36
from __future__ import absolute_import, unicode_literals
from django.db import migrations
from django.conf import settings
from corehq.sql_db.operations import HqRunSQL, noop_migration
class Migration(migrations.Migration):
dependencies = ... | # -*- coding: utf-8 -*-
# Generated by Django 1.11.6 on 2017-12-04 08:36
from __future__ import absolute_import, unicode_literals
from django.db import migrations
from django.conf import settings
from corehq.sql_db.operations import HqRunSQL, noop_migration
class Migration(migrations.Migration):
dependencies = ... | <commit_before># -*- coding: utf-8 -*-
# Generated by Django 1.11.6 on 2017-12-04 08:36
from __future__ import absolute_import, unicode_literals
from django.db import migrations
from django.conf import settings
from corehq.sql_db.operations import HqRunSQL, noop_migration
class Migration(migrations.Migration):
... | # -*- coding: utf-8 -*-
# Generated by Django 1.11.6 on 2017-12-04 08:36
from __future__ import absolute_import, unicode_literals
from django.db import migrations
from django.conf import settings
from corehq.sql_db.operations import HqRunSQL, noop_migration
class Migration(migrations.Migration):
dependencies = ... | # -*- coding: utf-8 -*-
# Generated by Django 1.11.6 on 2017-12-04 08:36
from __future__ import absolute_import, unicode_literals
from django.db import migrations
from django.conf import settings
from corehq.sql_db.operations import HqRunSQL, noop_migration
class Migration(migrations.Migration):
dependencies = ... | <commit_before># -*- coding: utf-8 -*-
# Generated by Django 1.11.6 on 2017-12-04 08:36
from __future__ import absolute_import, unicode_literals
from django.db import migrations
from django.conf import settings
from corehq.sql_db.operations import HqRunSQL, noop_migration
class Migration(migrations.Migration):
... |
f350e1dade6eff0aa82312dc9f66e98da19351eb | ec2_instance_types_list.py | ec2_instance_types_list.py | #!/usr/bin/env python
from bs4 import BeautifulSoup
import urllib
site_content = urllib.urlopen('https://aws.amazon.com/ec2/instance-types/').read()
soup = BeautifulSoup(site_content, 'lxml')
aws_tables = soup.find_all("div", {"class": "aws-table"});
for table_div in aws_tables:
trs = table_div.find('table').tbod... | #!/usr/bin/env python
from bs4 import BeautifulSoup
import urllib
import sys
import codecs
# Change encoding to fix a bug on windows
sys.stdout = codecs.getwriter("iso-8859-1")(sys.stdout, 'xmlcharrefreplace')
# Download a copy of the EC2 Instance Types from Amazon and scrape the content
site_content = urllib.urlopen... | Fix a unicode bug when printing EC2 instance types on Windows machines | Fix a unicode bug when printing EC2 instance types on Windows machines
| Python | mit | thinhpham/aws-tools | #!/usr/bin/env python
from bs4 import BeautifulSoup
import urllib
site_content = urllib.urlopen('https://aws.amazon.com/ec2/instance-types/').read()
soup = BeautifulSoup(site_content, 'lxml')
aws_tables = soup.find_all("div", {"class": "aws-table"});
for table_div in aws_tables:
trs = table_div.find('table').tbod... | #!/usr/bin/env python
from bs4 import BeautifulSoup
import urllib
import sys
import codecs
# Change encoding to fix a bug on windows
sys.stdout = codecs.getwriter("iso-8859-1")(sys.stdout, 'xmlcharrefreplace')
# Download a copy of the EC2 Instance Types from Amazon and scrape the content
site_content = urllib.urlopen... | <commit_before>#!/usr/bin/env python
from bs4 import BeautifulSoup
import urllib
site_content = urllib.urlopen('https://aws.amazon.com/ec2/instance-types/').read()
soup = BeautifulSoup(site_content, 'lxml')
aws_tables = soup.find_all("div", {"class": "aws-table"});
for table_div in aws_tables:
trs = table_div.fin... | #!/usr/bin/env python
from bs4 import BeautifulSoup
import urllib
import sys
import codecs
# Change encoding to fix a bug on windows
sys.stdout = codecs.getwriter("iso-8859-1")(sys.stdout, 'xmlcharrefreplace')
# Download a copy of the EC2 Instance Types from Amazon and scrape the content
site_content = urllib.urlopen... | #!/usr/bin/env python
from bs4 import BeautifulSoup
import urllib
site_content = urllib.urlopen('https://aws.amazon.com/ec2/instance-types/').read()
soup = BeautifulSoup(site_content, 'lxml')
aws_tables = soup.find_all("div", {"class": "aws-table"});
for table_div in aws_tables:
trs = table_div.find('table').tbod... | <commit_before>#!/usr/bin/env python
from bs4 import BeautifulSoup
import urllib
site_content = urllib.urlopen('https://aws.amazon.com/ec2/instance-types/').read()
soup = BeautifulSoup(site_content, 'lxml')
aws_tables = soup.find_all("div", {"class": "aws-table"});
for table_div in aws_tables:
trs = table_div.fin... |
3ca4a7334a3a759762d309bcff94ddde62d5a48b | accounts/management/__init__.py | accounts/management/__init__.py | from django.db.models.signals import post_syncdb
from accounts import models, names
def ensure_core_accounts_exists(sender, **kwargs):
# We only create core accounts the first time syncdb is run
if models.Account.objects.all().count() > 0:
return
# Create asset accounts
assets = models.Accou... | from accounts import models, names
def ensure_core_accounts_exists(sender, **kwargs):
# We only create core accounts the first time syncdb is run
if models.Account.objects.all().count() > 0:
return
# Create asset accounts
assets = models.AccountType.add_root(name='Assets')
assets.accounts... | Remove syncdb signal - will move to migration shortly | Remove syncdb signal - will move to migration shortly
| Python | bsd-3-clause | Jannes123/django-oscar-accounts,machtfit/django-oscar-accounts,michaelkuty/django-oscar-accounts,Mariana-Tek/django-oscar-accounts,amsys/django-account-balances,michaelkuty/django-oscar-accounts,Jannes123/django-oscar-accounts,carver/django-account-balances,Mariana-Tek/django-oscar-accounts,amsys/django-account-balance... | from django.db.models.signals import post_syncdb
from accounts import models, names
def ensure_core_accounts_exists(sender, **kwargs):
# We only create core accounts the first time syncdb is run
if models.Account.objects.all().count() > 0:
return
# Create asset accounts
assets = models.Accou... | from accounts import models, names
def ensure_core_accounts_exists(sender, **kwargs):
# We only create core accounts the first time syncdb is run
if models.Account.objects.all().count() > 0:
return
# Create asset accounts
assets = models.AccountType.add_root(name='Assets')
assets.accounts... | <commit_before>from django.db.models.signals import post_syncdb
from accounts import models, names
def ensure_core_accounts_exists(sender, **kwargs):
# We only create core accounts the first time syncdb is run
if models.Account.objects.all().count() > 0:
return
# Create asset accounts
assets... | from accounts import models, names
def ensure_core_accounts_exists(sender, **kwargs):
# We only create core accounts the first time syncdb is run
if models.Account.objects.all().count() > 0:
return
# Create asset accounts
assets = models.AccountType.add_root(name='Assets')
assets.accounts... | from django.db.models.signals import post_syncdb
from accounts import models, names
def ensure_core_accounts_exists(sender, **kwargs):
# We only create core accounts the first time syncdb is run
if models.Account.objects.all().count() > 0:
return
# Create asset accounts
assets = models.Accou... | <commit_before>from django.db.models.signals import post_syncdb
from accounts import models, names
def ensure_core_accounts_exists(sender, **kwargs):
# We only create core accounts the first time syncdb is run
if models.Account.objects.all().count() > 0:
return
# Create asset accounts
assets... |
a84c02b4369bf698c82be22b6231fe412ad67c63 | Cauldron/ext/click/__init__.py | Cauldron/ext/click/__init__.py | # -*- coding: utf-8 -*-
try:
import click
except ImportError:
raise ImportError("Cauldron.ext.click requires the click package.")
from ...api import use
__all__ = ['backend', 'service']
def select_backend(ctx, param, value):
"""Callback to set the Cauldron backend."""
if not value or ctx.resilient_p... | # -*- coding: utf-8 -*-
try:
import click
except ImportError:
raise ImportError("Cauldron.ext.click requires the click package.")
from ...api import use
__all__ = ['backend', 'service']
def select_backend(ctx, param, value):
"""Callback to set the Cauldron backend."""
if not value or ctx.resilient_p... | Fix a bug in Cauldron click extension | Fix a bug in Cauldron click extension
| Python | bsd-3-clause | alexrudy/Cauldron | # -*- coding: utf-8 -*-
try:
import click
except ImportError:
raise ImportError("Cauldron.ext.click requires the click package.")
from ...api import use
__all__ = ['backend', 'service']
def select_backend(ctx, param, value):
"""Callback to set the Cauldron backend."""
if not value or ctx.resilient_p... | # -*- coding: utf-8 -*-
try:
import click
except ImportError:
raise ImportError("Cauldron.ext.click requires the click package.")
from ...api import use
__all__ = ['backend', 'service']
def select_backend(ctx, param, value):
"""Callback to set the Cauldron backend."""
if not value or ctx.resilient_p... | <commit_before># -*- coding: utf-8 -*-
try:
import click
except ImportError:
raise ImportError("Cauldron.ext.click requires the click package.")
from ...api import use
__all__ = ['backend', 'service']
def select_backend(ctx, param, value):
"""Callback to set the Cauldron backend."""
if not value or ... | # -*- coding: utf-8 -*-
try:
import click
except ImportError:
raise ImportError("Cauldron.ext.click requires the click package.")
from ...api import use
__all__ = ['backend', 'service']
def select_backend(ctx, param, value):
"""Callback to set the Cauldron backend."""
if not value or ctx.resilient_p... | # -*- coding: utf-8 -*-
try:
import click
except ImportError:
raise ImportError("Cauldron.ext.click requires the click package.")
from ...api import use
__all__ = ['backend', 'service']
def select_backend(ctx, param, value):
"""Callback to set the Cauldron backend."""
if not value or ctx.resilient_p... | <commit_before># -*- coding: utf-8 -*-
try:
import click
except ImportError:
raise ImportError("Cauldron.ext.click requires the click package.")
from ...api import use
__all__ = ['backend', 'service']
def select_backend(ctx, param, value):
"""Callback to set the Cauldron backend."""
if not value or ... |
5547e59360126baa20e1684a22e7f88fdacb530a | s2v2.py | s2v2.py | from s2v1 import *
def number_of_records(data_sample):
return len(data_sample)
number_of_ties = number_of_records(data_from_csv) - 1 # minus header row
# print(number_of_ties, "ties in our data sample")
def number_of_records2(data_sample):
return data_sample.size
number_of_ties_my_csv = number_of_records2(my_csv... | from s2v1 import *
def number_of_records(data_sample):
return len(data_sample)
def number_of_records_ignore_header(data_sample, header=True):
if header:
return len(data_sample) - 1
else:
return len(data_sample)
number_of_ties = number_of_records(data_from_csv) - 1 # minus header row
# print(number_of_ties,... | Create new function for number of records and do a header check | Create new function for number of records and do a header check
| Python | mit | alexmilesyounger/ds_basics | from s2v1 import *
def number_of_records(data_sample):
return len(data_sample)
number_of_ties = number_of_records(data_from_csv) - 1 # minus header row
# print(number_of_ties, "ties in our data sample")
def number_of_records2(data_sample):
return data_sample.size
number_of_ties_my_csv = number_of_records2(my_csv... | from s2v1 import *
def number_of_records(data_sample):
return len(data_sample)
def number_of_records_ignore_header(data_sample, header=True):
if header:
return len(data_sample) - 1
else:
return len(data_sample)
number_of_ties = number_of_records(data_from_csv) - 1 # minus header row
# print(number_of_ties,... | <commit_before>from s2v1 import *
def number_of_records(data_sample):
return len(data_sample)
number_of_ties = number_of_records(data_from_csv) - 1 # minus header row
# print(number_of_ties, "ties in our data sample")
def number_of_records2(data_sample):
return data_sample.size
number_of_ties_my_csv = number_of_... | from s2v1 import *
def number_of_records(data_sample):
return len(data_sample)
def number_of_records_ignore_header(data_sample, header=True):
if header:
return len(data_sample) - 1
else:
return len(data_sample)
number_of_ties = number_of_records(data_from_csv) - 1 # minus header row
# print(number_of_ties,... | from s2v1 import *
def number_of_records(data_sample):
return len(data_sample)
number_of_ties = number_of_records(data_from_csv) - 1 # minus header row
# print(number_of_ties, "ties in our data sample")
def number_of_records2(data_sample):
return data_sample.size
number_of_ties_my_csv = number_of_records2(my_csv... | <commit_before>from s2v1 import *
def number_of_records(data_sample):
return len(data_sample)
number_of_ties = number_of_records(data_from_csv) - 1 # minus header row
# print(number_of_ties, "ties in our data sample")
def number_of_records2(data_sample):
return data_sample.size
number_of_ties_my_csv = number_of_... |
2b88f8f458781bd88f559f1a5a966fd5050414a0 | tests/merchandise/music/test_models.py | tests/merchandise/music/test_models.py | import pytest
from components.merchandise.music.models import Album, Single
from components.merchandise.music.factories import (AlbumFactory,
BaseFactory, SingleFactory)
@pytest.mark.django_db
class TestAlbums(object):
def test_album_factory(self):
album = AlbumFactory()
assert isinstance(alb... | import pytest
from components.merchandise.music.models import Album, Single
from components.merchandise.music.factories import (AlbumFactory,
BaseFactory, SingleFactory)
@pytest.mark.django_db
def test_album_factory():
factory = AlbumFactory()
assert isinstance(factory, Album)
assert 'album' in facto... | Remove the class surrounding the music tests. Staying strictly functional. | Remove the class surrounding the music tests. Staying strictly functional.
| Python | apache-2.0 | hello-base/web,hello-base/web,hello-base/web,hello-base/web | import pytest
from components.merchandise.music.models import Album, Single
from components.merchandise.music.factories import (AlbumFactory,
BaseFactory, SingleFactory)
@pytest.mark.django_db
class TestAlbums(object):
def test_album_factory(self):
album = AlbumFactory()
assert isinstance(alb... | import pytest
from components.merchandise.music.models import Album, Single
from components.merchandise.music.factories import (AlbumFactory,
BaseFactory, SingleFactory)
@pytest.mark.django_db
def test_album_factory():
factory = AlbumFactory()
assert isinstance(factory, Album)
assert 'album' in facto... | <commit_before>import pytest
from components.merchandise.music.models import Album, Single
from components.merchandise.music.factories import (AlbumFactory,
BaseFactory, SingleFactory)
@pytest.mark.django_db
class TestAlbums(object):
def test_album_factory(self):
album = AlbumFactory()
assert... | import pytest
from components.merchandise.music.models import Album, Single
from components.merchandise.music.factories import (AlbumFactory,
BaseFactory, SingleFactory)
@pytest.mark.django_db
def test_album_factory():
factory = AlbumFactory()
assert isinstance(factory, Album)
assert 'album' in facto... | import pytest
from components.merchandise.music.models import Album, Single
from components.merchandise.music.factories import (AlbumFactory,
BaseFactory, SingleFactory)
@pytest.mark.django_db
class TestAlbums(object):
def test_album_factory(self):
album = AlbumFactory()
assert isinstance(alb... | <commit_before>import pytest
from components.merchandise.music.models import Album, Single
from components.merchandise.music.factories import (AlbumFactory,
BaseFactory, SingleFactory)
@pytest.mark.django_db
class TestAlbums(object):
def test_album_factory(self):
album = AlbumFactory()
assert... |
b45193582f96853e0cb17a962a7e83aada529a10 | DataLogger/SQLiteLogger.py | DataLogger/SQLiteLogger.py | import sqlite3
import time
class SQLiteLogger:
def __init__(self, filename="test.db"):
self.filename = filename
self.connection = None
def __enter__(self):
try:
with open(self.filename):
self.connection = sqlite3.connect(self.filename)
except IOErro... | import sqlite3
import time
class SQLiteLogger:
def __init__(self, filename="test.db"):
self.filename = filename
self.connection = None
def __enter__(self):
try:
with open(self.filename):
self.connection = sqlite3.connect(self.filename)
except IOErro... | Allow log time to be passed into logger | Allow log time to be passed into logger
| Python | mit | thelonious/g2x,gizmo-cda/g2x,thelonious/g2x,gizmo-cda/g2x,gizmo-cda/g2x,gizmo-cda/g2x | import sqlite3
import time
class SQLiteLogger:
def __init__(self, filename="test.db"):
self.filename = filename
self.connection = None
def __enter__(self):
try:
with open(self.filename):
self.connection = sqlite3.connect(self.filename)
except IOErro... | import sqlite3
import time
class SQLiteLogger:
def __init__(self, filename="test.db"):
self.filename = filename
self.connection = None
def __enter__(self):
try:
with open(self.filename):
self.connection = sqlite3.connect(self.filename)
except IOErro... | <commit_before>import sqlite3
import time
class SQLiteLogger:
def __init__(self, filename="test.db"):
self.filename = filename
self.connection = None
def __enter__(self):
try:
with open(self.filename):
self.connection = sqlite3.connect(self.filename)
... | import sqlite3
import time
class SQLiteLogger:
def __init__(self, filename="test.db"):
self.filename = filename
self.connection = None
def __enter__(self):
try:
with open(self.filename):
self.connection = sqlite3.connect(self.filename)
except IOErro... | import sqlite3
import time
class SQLiteLogger:
def __init__(self, filename="test.db"):
self.filename = filename
self.connection = None
def __enter__(self):
try:
with open(self.filename):
self.connection = sqlite3.connect(self.filename)
except IOErro... | <commit_before>import sqlite3
import time
class SQLiteLogger:
def __init__(self, filename="test.db"):
self.filename = filename
self.connection = None
def __enter__(self):
try:
with open(self.filename):
self.connection = sqlite3.connect(self.filename)
... |
c5049b9bf465aee93d4c87b9cd62608d338ede7f | robokassa/migrations/0003_load_source_type.py | robokassa/migrations/0003_load_source_type.py | # -*- coding: utf-8 -*-
import datetime
from south.db import db
from south.v2 import DataMigration
from django.db import models
class Migration(DataMigration):
def forwards(self, orm):
pass
def backwards(self, orm):
pass
models = {
u'robokassa.successnotification': {
... | # -*- coding: utf-8 -*-
import datetime
from south.db import db
from south.v2 import DataMigration
from django.db import models
class Migration(DataMigration):
depends_on = (
('payment', '0003_auto__chg_field_sourcetype_code__add_unique_sourcetype_code'),
)
def forwards(self, orm):
orm['p... | Add the code that correctly adds the new payment source. | Add the code that correctly adds the new payment source.
| Python | mit | a-iv/django-oscar-robokassa | # -*- coding: utf-8 -*-
import datetime
from south.db import db
from south.v2 import DataMigration
from django.db import models
class Migration(DataMigration):
def forwards(self, orm):
pass
def backwards(self, orm):
pass
models = {
u'robokassa.successnotification': {
... | # -*- coding: utf-8 -*-
import datetime
from south.db import db
from south.v2 import DataMigration
from django.db import models
class Migration(DataMigration):
depends_on = (
('payment', '0003_auto__chg_field_sourcetype_code__add_unique_sourcetype_code'),
)
def forwards(self, orm):
orm['p... | <commit_before># -*- coding: utf-8 -*-
import datetime
from south.db import db
from south.v2 import DataMigration
from django.db import models
class Migration(DataMigration):
def forwards(self, orm):
pass
def backwards(self, orm):
pass
models = {
u'robokassa.successnotification':... | # -*- coding: utf-8 -*-
import datetime
from south.db import db
from south.v2 import DataMigration
from django.db import models
class Migration(DataMigration):
depends_on = (
('payment', '0003_auto__chg_field_sourcetype_code__add_unique_sourcetype_code'),
)
def forwards(self, orm):
orm['p... | # -*- coding: utf-8 -*-
import datetime
from south.db import db
from south.v2 import DataMigration
from django.db import models
class Migration(DataMigration):
def forwards(self, orm):
pass
def backwards(self, orm):
pass
models = {
u'robokassa.successnotification': {
... | <commit_before># -*- coding: utf-8 -*-
import datetime
from south.db import db
from south.v2 import DataMigration
from django.db import models
class Migration(DataMigration):
def forwards(self, orm):
pass
def backwards(self, orm):
pass
models = {
u'robokassa.successnotification':... |
c347b0ae40c39b5f48ca4c39abfa1e1491feec6d | core/urls.py | core/urls.py | from django.conf.urls import include, url
from django.contrib import admin
admin.site.site_header = 'Coworking space administration'
urlpatterns = [
url(r'^billjobs/', include('billjobs.urls')),
url(r'^admin/', include(admin.site.urls)),
]
| from django.conf.urls import include, url
from django.contrib import admin
from core import settings
admin.site.site_header = 'Coworking space administration'
urlpatterns = [
url(r'^billjobs/', include('billjobs.urls')),
url(r'^admin/', include(admin.site.urls)),
]
if settings.DEBUG:
import debug_toolbar
... | Add url pattern for debug toolbar | Add url pattern for debug toolbar
| Python | mit | ioO/billjobs | from django.conf.urls import include, url
from django.contrib import admin
admin.site.site_header = 'Coworking space administration'
urlpatterns = [
url(r'^billjobs/', include('billjobs.urls')),
url(r'^admin/', include(admin.site.urls)),
]
Add url pattern for debug toolbar | from django.conf.urls import include, url
from django.contrib import admin
from core import settings
admin.site.site_header = 'Coworking space administration'
urlpatterns = [
url(r'^billjobs/', include('billjobs.urls')),
url(r'^admin/', include(admin.site.urls)),
]
if settings.DEBUG:
import debug_toolbar
... | <commit_before>from django.conf.urls import include, url
from django.contrib import admin
admin.site.site_header = 'Coworking space administration'
urlpatterns = [
url(r'^billjobs/', include('billjobs.urls')),
url(r'^admin/', include(admin.site.urls)),
]
<commit_msg>Add url pattern for debug toolbar<commit_aft... | from django.conf.urls import include, url
from django.contrib import admin
from core import settings
admin.site.site_header = 'Coworking space administration'
urlpatterns = [
url(r'^billjobs/', include('billjobs.urls')),
url(r'^admin/', include(admin.site.urls)),
]
if settings.DEBUG:
import debug_toolbar
... | from django.conf.urls import include, url
from django.contrib import admin
admin.site.site_header = 'Coworking space administration'
urlpatterns = [
url(r'^billjobs/', include('billjobs.urls')),
url(r'^admin/', include(admin.site.urls)),
]
Add url pattern for debug toolbarfrom django.conf.urls import include, ... | <commit_before>from django.conf.urls import include, url
from django.contrib import admin
admin.site.site_header = 'Coworking space administration'
urlpatterns = [
url(r'^billjobs/', include('billjobs.urls')),
url(r'^admin/', include(admin.site.urls)),
]
<commit_msg>Add url pattern for debug toolbar<commit_aft... |
51c37e74da9fe2bfc068fd29a52422c84b13900d | froide/frontpage/models.py | froide/frontpage/models.py | from django.db import models
from django.utils.translation import ugettext as _
from django.contrib.auth.models import User
from django.contrib.sites.models import Site
from django.contrib.sites.managers import CurrentSiteManager
from foirequest.models import FoiRequest
class FeaturedRequestManager(CurrentSiteManage... | from django.db import models
from django.utils.translation import ugettext as _
from django.contrib.auth.models import User
from django.contrib.sites.models import Site
from django.contrib.sites.managers import CurrentSiteManager
from foirequest.models import FoiRequest
class FeaturedRequestManager(CurrentSiteManage... | Add meta class to FeaturedRequest model | Add meta class to FeaturedRequest model | Python | mit | ryankanno/froide,fin/froide,okfse/froide,catcosmo/froide,catcosmo/froide,okfse/froide,CodeforHawaii/froide,CodeforHawaii/froide,LilithWittmann/froide,LilithWittmann/froide,fin/froide,catcosmo/froide,ryankanno/froide,stefanw/froide,stefanw/froide,CodeforHawaii/froide,fin/froide,ryankanno/froide,ryankanno/froide,LilithWi... | from django.db import models
from django.utils.translation import ugettext as _
from django.contrib.auth.models import User
from django.contrib.sites.models import Site
from django.contrib.sites.managers import CurrentSiteManager
from foirequest.models import FoiRequest
class FeaturedRequestManager(CurrentSiteManage... | from django.db import models
from django.utils.translation import ugettext as _
from django.contrib.auth.models import User
from django.contrib.sites.models import Site
from django.contrib.sites.managers import CurrentSiteManager
from foirequest.models import FoiRequest
class FeaturedRequestManager(CurrentSiteManage... | <commit_before>from django.db import models
from django.utils.translation import ugettext as _
from django.contrib.auth.models import User
from django.contrib.sites.models import Site
from django.contrib.sites.managers import CurrentSiteManager
from foirequest.models import FoiRequest
class FeaturedRequestManager(Cu... | from django.db import models
from django.utils.translation import ugettext as _
from django.contrib.auth.models import User
from django.contrib.sites.models import Site
from django.contrib.sites.managers import CurrentSiteManager
from foirequest.models import FoiRequest
class FeaturedRequestManager(CurrentSiteManage... | from django.db import models
from django.utils.translation import ugettext as _
from django.contrib.auth.models import User
from django.contrib.sites.models import Site
from django.contrib.sites.managers import CurrentSiteManager
from foirequest.models import FoiRequest
class FeaturedRequestManager(CurrentSiteManage... | <commit_before>from django.db import models
from django.utils.translation import ugettext as _
from django.contrib.auth.models import User
from django.contrib.sites.models import Site
from django.contrib.sites.managers import CurrentSiteManager
from foirequest.models import FoiRequest
class FeaturedRequestManager(Cu... |
fa7bd3247302407da423c38690b07b0917fadb80 | core/urls.py | core/urls.py | from django.conf.urls import url
from . import views
urlpatterns = [
url(r'^$', views.index, name='index'),
]
| from django.conf.urls import url
from . import views
urlpatterns = [
url(r'^$', views.index, name='index'),
]
# Use GeoJSON api
from djgeojson.views import GeoJSONLayerView
from .models import BookLocation
# GeoJSON book locations hook. Returns object with all BookLocation elements.
urlpatterns += [
url(r'^ap... | Add a GeoJSON book locations hook | Add a GeoJSON book locations hook
Located at URL/api/bookLocs.geojson.
Returns all book locations. | Python | mit | edushifts/book-voyage,edushifts/book-voyage,edushifts/book-voyage,edushifts/book-voyage | from django.conf.urls import url
from . import views
urlpatterns = [
url(r'^$', views.index, name='index'),
]
Add a GeoJSON book locations hook
Located at URL/api/bookLocs.geojson.
Returns all book locations. | from django.conf.urls import url
from . import views
urlpatterns = [
url(r'^$', views.index, name='index'),
]
# Use GeoJSON api
from djgeojson.views import GeoJSONLayerView
from .models import BookLocation
# GeoJSON book locations hook. Returns object with all BookLocation elements.
urlpatterns += [
url(r'^ap... | <commit_before>from django.conf.urls import url
from . import views
urlpatterns = [
url(r'^$', views.index, name='index'),
]
<commit_msg>Add a GeoJSON book locations hook
Located at URL/api/bookLocs.geojson.
Returns all book locations.<commit_after> | from django.conf.urls import url
from . import views
urlpatterns = [
url(r'^$', views.index, name='index'),
]
# Use GeoJSON api
from djgeojson.views import GeoJSONLayerView
from .models import BookLocation
# GeoJSON book locations hook. Returns object with all BookLocation elements.
urlpatterns += [
url(r'^ap... | from django.conf.urls import url
from . import views
urlpatterns = [
url(r'^$', views.index, name='index'),
]
Add a GeoJSON book locations hook
Located at URL/api/bookLocs.geojson.
Returns all book locations.from django.conf.urls import url
from . import views
urlpatterns = [
url(r'^$', views.index, name... | <commit_before>from django.conf.urls import url
from . import views
urlpatterns = [
url(r'^$', views.index, name='index'),
]
<commit_msg>Add a GeoJSON book locations hook
Located at URL/api/bookLocs.geojson.
Returns all book locations.<commit_after>from django.conf.urls import url
from . import views
urlpatt... |
25458e3664391566cbe416eba2b9885809ae157e | server/server.py | server/server.py | from flask import Flask, url_for
app = Flask(__name__)
@app.route('/')
def api_root():
return 'Welcome'
# Deprecated
# @app.route('/toggle')
# def api_toggle():
# # Toggle the state of the player
# return 'state changed'
# @app.route('/volume/<volume_value>')
# def api_volume(volume_value):
# # Adjusts ... | from flask import Flask, url_for
app = Flask(__name__)
@app.route('/')
def api_root():
return 'Welcome'
# Deprecated
# @app.route('/toggle')
# def api_toggle():
# # Toggle the state of the player
# return 'state changed'
# @app.route('/volume/<volume_value>')
# def api_volume(volume_value):
# # Adjusts ... | Add methods to start and stop playing tone | Add methods to start and stop playing tone
| Python | artistic-2.0 | axay/eigen,axay/eigen | from flask import Flask, url_for
app = Flask(__name__)
@app.route('/')
def api_root():
return 'Welcome'
# Deprecated
# @app.route('/toggle')
# def api_toggle():
# # Toggle the state of the player
# return 'state changed'
# @app.route('/volume/<volume_value>')
# def api_volume(volume_value):
# # Adjusts ... | from flask import Flask, url_for
app = Flask(__name__)
@app.route('/')
def api_root():
return 'Welcome'
# Deprecated
# @app.route('/toggle')
# def api_toggle():
# # Toggle the state of the player
# return 'state changed'
# @app.route('/volume/<volume_value>')
# def api_volume(volume_value):
# # Adjusts ... | <commit_before>from flask import Flask, url_for
app = Flask(__name__)
@app.route('/')
def api_root():
return 'Welcome'
# Deprecated
# @app.route('/toggle')
# def api_toggle():
# # Toggle the state of the player
# return 'state changed'
# @app.route('/volume/<volume_value>')
# def api_volume(volume_value)... | from flask import Flask, url_for
app = Flask(__name__)
@app.route('/')
def api_root():
return 'Welcome'
# Deprecated
# @app.route('/toggle')
# def api_toggle():
# # Toggle the state of the player
# return 'state changed'
# @app.route('/volume/<volume_value>')
# def api_volume(volume_value):
# # Adjusts ... | from flask import Flask, url_for
app = Flask(__name__)
@app.route('/')
def api_root():
return 'Welcome'
# Deprecated
# @app.route('/toggle')
# def api_toggle():
# # Toggle the state of the player
# return 'state changed'
# @app.route('/volume/<volume_value>')
# def api_volume(volume_value):
# # Adjusts ... | <commit_before>from flask import Flask, url_for
app = Flask(__name__)
@app.route('/')
def api_root():
return 'Welcome'
# Deprecated
# @app.route('/toggle')
# def api_toggle():
# # Toggle the state of the player
# return 'state changed'
# @app.route('/volume/<volume_value>')
# def api_volume(volume_value)... |
2063235c55bf359e284b2bd0fe83a6736d5a3a91 | settings/prod.py | settings/prod.py | # -*- coding: utf-8 -*-
import os
import dj_database_url
from base import *
DEBUG = False
TEMPLATE_DEBUG = False
DATABASES = {
'default': dj_database_url.config()
}
BASE_DIR = os.path.dirname(os.path.abspath(__file__))
STATIC_ROOT = 'staticfiles'
STATIC_URL = '/static/'
STATICFILES_DIRS = (
os.path.join(BAS... | # -*- coding: utf-8 -*-
import os
import dj_database_url
from base import *
DEBUG = False
TEMPLATE_DEBUG = False
DATABASES = {
'default': dj_database_url.config()
}
BASE_DIR = os.path.dirname(os.path.abspath(__file__))
STATIC_ROOT = 'staticfiles'
STATIC_URL = '/static/'
STATICFILES_DIRS = (
os.path.join(BAS... | Revert "Adding conf for geodjango buildpack" | Revert "Adding conf for geodjango buildpack"
This reverts commit 6d2528e8eae37751d66d3138e52042111e42e239.
gendjango buildpack messes with gunicorn
| Python | agpl-3.0 | datea/datea-api,lafactura/datea-api,lafactura/datea-api,datea/datea-api,datea/datea-api,lafactura/datea-api | # -*- coding: utf-8 -*-
import os
import dj_database_url
from base import *
DEBUG = False
TEMPLATE_DEBUG = False
DATABASES = {
'default': dj_database_url.config()
}
BASE_DIR = os.path.dirname(os.path.abspath(__file__))
STATIC_ROOT = 'staticfiles'
STATIC_URL = '/static/'
STATICFILES_DIRS = (
os.path.join(BAS... | # -*- coding: utf-8 -*-
import os
import dj_database_url
from base import *
DEBUG = False
TEMPLATE_DEBUG = False
DATABASES = {
'default': dj_database_url.config()
}
BASE_DIR = os.path.dirname(os.path.abspath(__file__))
STATIC_ROOT = 'staticfiles'
STATIC_URL = '/static/'
STATICFILES_DIRS = (
os.path.join(BAS... | <commit_before># -*- coding: utf-8 -*-
import os
import dj_database_url
from base import *
DEBUG = False
TEMPLATE_DEBUG = False
DATABASES = {
'default': dj_database_url.config()
}
BASE_DIR = os.path.dirname(os.path.abspath(__file__))
STATIC_ROOT = 'staticfiles'
STATIC_URL = '/static/'
STATICFILES_DIRS = (
o... | # -*- coding: utf-8 -*-
import os
import dj_database_url
from base import *
DEBUG = False
TEMPLATE_DEBUG = False
DATABASES = {
'default': dj_database_url.config()
}
BASE_DIR = os.path.dirname(os.path.abspath(__file__))
STATIC_ROOT = 'staticfiles'
STATIC_URL = '/static/'
STATICFILES_DIRS = (
os.path.join(BAS... | # -*- coding: utf-8 -*-
import os
import dj_database_url
from base import *
DEBUG = False
TEMPLATE_DEBUG = False
DATABASES = {
'default': dj_database_url.config()
}
BASE_DIR = os.path.dirname(os.path.abspath(__file__))
STATIC_ROOT = 'staticfiles'
STATIC_URL = '/static/'
STATICFILES_DIRS = (
os.path.join(BAS... | <commit_before># -*- coding: utf-8 -*-
import os
import dj_database_url
from base import *
DEBUG = False
TEMPLATE_DEBUG = False
DATABASES = {
'default': dj_database_url.config()
}
BASE_DIR = os.path.dirname(os.path.abspath(__file__))
STATIC_ROOT = 'staticfiles'
STATIC_URL = '/static/'
STATICFILES_DIRS = (
o... |
461ea32b927e35975c04b6b01679f4898ea490b6 | shellReporter.py | shellReporter.py | #!/usr/bin/env python
class ShellReporter:
def send_status(self, timestamp, context, metric_value):
self._send(timestamp, context + '.STATUS', metric_value)
def send_duration(self, timestamp, context, metric_value):
self._send(timestamp, context + '.DURATION', metric_value)
def _send(self... | #!/usr/bin/env python
class ShellReporter:
def send_status(self, timestamp, context, metric_value):
self._send(timestamp, context + '.STATUS', metric_value + ' (%s)' % 'SUCCESS' if metric_value else 'FAILURE')
def send_duration(self, timestamp, context, metric_value):
self._send(timestamp, con... | Add SUCCESS/FAILURE when reporting duration to shell | Add SUCCESS/FAILURE when reporting duration to shell
| Python | mit | luigiberrettini/build-deploy-stats | #!/usr/bin/env python
class ShellReporter:
def send_status(self, timestamp, context, metric_value):
self._send(timestamp, context + '.STATUS', metric_value)
def send_duration(self, timestamp, context, metric_value):
self._send(timestamp, context + '.DURATION', metric_value)
def _send(self... | #!/usr/bin/env python
class ShellReporter:
def send_status(self, timestamp, context, metric_value):
self._send(timestamp, context + '.STATUS', metric_value + ' (%s)' % 'SUCCESS' if metric_value else 'FAILURE')
def send_duration(self, timestamp, context, metric_value):
self._send(timestamp, con... | <commit_before>#!/usr/bin/env python
class ShellReporter:
def send_status(self, timestamp, context, metric_value):
self._send(timestamp, context + '.STATUS', metric_value)
def send_duration(self, timestamp, context, metric_value):
self._send(timestamp, context + '.DURATION', metric_value)
... | #!/usr/bin/env python
class ShellReporter:
def send_status(self, timestamp, context, metric_value):
self._send(timestamp, context + '.STATUS', metric_value + ' (%s)' % 'SUCCESS' if metric_value else 'FAILURE')
def send_duration(self, timestamp, context, metric_value):
self._send(timestamp, con... | #!/usr/bin/env python
class ShellReporter:
def send_status(self, timestamp, context, metric_value):
self._send(timestamp, context + '.STATUS', metric_value)
def send_duration(self, timestamp, context, metric_value):
self._send(timestamp, context + '.DURATION', metric_value)
def _send(self... | <commit_before>#!/usr/bin/env python
class ShellReporter:
def send_status(self, timestamp, context, metric_value):
self._send(timestamp, context + '.STATUS', metric_value)
def send_duration(self, timestamp, context, metric_value):
self._send(timestamp, context + '.DURATION', metric_value)
... |
4e7b8e0b03951faa0a43ce8b216b31c5bc4543a4 | create_db.py | create_db.py | import os
import sys
import psycopg2
import sqlalchemy as sa
from psycopg2.extensions import ISOLATION_LEVEL_AUTOCOMMIT
def main():
database = 'postgres'
user = 'postgres'
url = sa.engine.url.URL('postgresql', host=os.environ['PGHOST'],
database=database, username=user)
d... | import os
import sys
import psycopg2
import sqlalchemy as sa
from psycopg2.extensions import ISOLATION_LEVEL_AUTOCOMMIT
def main():
database = 'postgres'
user = 'postgres'
url = sa.engine.url.URL(
'postgresql', host=os.environ['PGHOST'], database=database,
username=user, password=os.envi... | Add password envar for db creation. | Add password envar for db creation.
| Python | mit | portfoliome/pgawedge | import os
import sys
import psycopg2
import sqlalchemy as sa
from psycopg2.extensions import ISOLATION_LEVEL_AUTOCOMMIT
def main():
database = 'postgres'
user = 'postgres'
url = sa.engine.url.URL('postgresql', host=os.environ['PGHOST'],
database=database, username=user)
d... | import os
import sys
import psycopg2
import sqlalchemy as sa
from psycopg2.extensions import ISOLATION_LEVEL_AUTOCOMMIT
def main():
database = 'postgres'
user = 'postgres'
url = sa.engine.url.URL(
'postgresql', host=os.environ['PGHOST'], database=database,
username=user, password=os.envi... | <commit_before>import os
import sys
import psycopg2
import sqlalchemy as sa
from psycopg2.extensions import ISOLATION_LEVEL_AUTOCOMMIT
def main():
database = 'postgres'
user = 'postgres'
url = sa.engine.url.URL('postgresql', host=os.environ['PGHOST'],
database=database, usern... | import os
import sys
import psycopg2
import sqlalchemy as sa
from psycopg2.extensions import ISOLATION_LEVEL_AUTOCOMMIT
def main():
database = 'postgres'
user = 'postgres'
url = sa.engine.url.URL(
'postgresql', host=os.environ['PGHOST'], database=database,
username=user, password=os.envi... | import os
import sys
import psycopg2
import sqlalchemy as sa
from psycopg2.extensions import ISOLATION_LEVEL_AUTOCOMMIT
def main():
database = 'postgres'
user = 'postgres'
url = sa.engine.url.URL('postgresql', host=os.environ['PGHOST'],
database=database, username=user)
d... | <commit_before>import os
import sys
import psycopg2
import sqlalchemy as sa
from psycopg2.extensions import ISOLATION_LEVEL_AUTOCOMMIT
def main():
database = 'postgres'
user = 'postgres'
url = sa.engine.url.URL('postgresql', host=os.environ['PGHOST'],
database=database, usern... |
6f5e987b5a102b0c4b0bfcd88c17faab00655142 | ctypeslib/test/test_toolchain.py | ctypeslib/test/test_toolchain.py | import unittest
import sys
from ctypeslib import h2xml, xml2py
class ToolchainTest(unittest.TestCase):
if sys.platform == "win32":
def test(self):
h2xml.main(["h2xml", "-q",
"-D WIN32_LEAN_AND_MEAN",
"-D _UNICODE", "-D UNICODE",
... | import unittest
import sys
from ctypeslib import h2xml, xml2py
class ToolchainTest(unittest.TestCase):
if sys.platform == "win32":
def test_windows(self):
h2xml.main(["h2xml", "-q",
"-D WIN32_LEAN_AND_MEAN",
"-D _UNICODE", "-D UNICODE",
... | Add a test for stdio.h. | Add a test for stdio.h.
git-svn-id: ac2c3632cb6543e7ab5fafd132c7fe15057a1882@60472 6015fed2-1504-0410-9fe1-9d1591cc4771
| Python | mit | trolldbois/ctypeslib,luzfcb/ctypeslib,trolldbois/ctypeslib,luzfcb/ctypeslib,luzfcb/ctypeslib,trolldbois/ctypeslib | import unittest
import sys
from ctypeslib import h2xml, xml2py
class ToolchainTest(unittest.TestCase):
if sys.platform == "win32":
def test(self):
h2xml.main(["h2xml", "-q",
"-D WIN32_LEAN_AND_MEAN",
"-D _UNICODE", "-D UNICODE",
... | import unittest
import sys
from ctypeslib import h2xml, xml2py
class ToolchainTest(unittest.TestCase):
if sys.platform == "win32":
def test_windows(self):
h2xml.main(["h2xml", "-q",
"-D WIN32_LEAN_AND_MEAN",
"-D _UNICODE", "-D UNICODE",
... | <commit_before>import unittest
import sys
from ctypeslib import h2xml, xml2py
class ToolchainTest(unittest.TestCase):
if sys.platform == "win32":
def test(self):
h2xml.main(["h2xml", "-q",
"-D WIN32_LEAN_AND_MEAN",
"-D _UNICODE", "-D UNICODE",
... | import unittest
import sys
from ctypeslib import h2xml, xml2py
class ToolchainTest(unittest.TestCase):
if sys.platform == "win32":
def test_windows(self):
h2xml.main(["h2xml", "-q",
"-D WIN32_LEAN_AND_MEAN",
"-D _UNICODE", "-D UNICODE",
... | import unittest
import sys
from ctypeslib import h2xml, xml2py
class ToolchainTest(unittest.TestCase):
if sys.platform == "win32":
def test(self):
h2xml.main(["h2xml", "-q",
"-D WIN32_LEAN_AND_MEAN",
"-D _UNICODE", "-D UNICODE",
... | <commit_before>import unittest
import sys
from ctypeslib import h2xml, xml2py
class ToolchainTest(unittest.TestCase):
if sys.platform == "win32":
def test(self):
h2xml.main(["h2xml", "-q",
"-D WIN32_LEAN_AND_MEAN",
"-D _UNICODE", "-D UNICODE",
... |
73a9ba740d446e19c0428ffc29bf5bb5b033d7fe | PynamoDB/persistence_engine.py | PynamoDB/persistence_engine.py | """
persistence_engine.py
~~~~~~~~~~~~
Implements put, get, delete methods for PersistenceStage. Using an actual persistence engine (i.e. MySQL, BDB), one would implement the three methods themselves.
"""
class PersistenceEngine(object):
""" Basic persistence engine implemented as a regular Pytho... | """
persistence_engine.py
~~~~~~~~~~~~
Implements put, get, delete methods for PersistenceStage. Using an actual persistence engine (i.e. MySQL, BDB), one would implement the three methods themselves.
"""
class PersistenceEngine(object):
""" Basic persistence engine implemented as a regular Pytho... | Remove use of timestamped value. | Remove use of timestamped value.
Thought it was dumb/inelegant to have a Value() object floating around
with value and timestamp . Instead, now all messages are sent around
as json dicts.
The request enters the system as json, flows through to an endpoint
where it becomes a reply message, then flows back to the clie... | Python | mit | samuelwu90/PynamoDB | """
persistence_engine.py
~~~~~~~~~~~~
Implements put, get, delete methods for PersistenceStage. Using an actual persistence engine (i.e. MySQL, BDB), one would implement the three methods themselves.
"""
class PersistenceEngine(object):
""" Basic persistence engine implemented as a regular Pytho... | """
persistence_engine.py
~~~~~~~~~~~~
Implements put, get, delete methods for PersistenceStage. Using an actual persistence engine (i.e. MySQL, BDB), one would implement the three methods themselves.
"""
class PersistenceEngine(object):
""" Basic persistence engine implemented as a regular Pytho... | <commit_before>"""
persistence_engine.py
~~~~~~~~~~~~
Implements put, get, delete methods for PersistenceStage. Using an actual persistence engine (i.e. MySQL, BDB), one would implement the three methods themselves.
"""
class PersistenceEngine(object):
""" Basic persistence engine implemented as ... | """
persistence_engine.py
~~~~~~~~~~~~
Implements put, get, delete methods for PersistenceStage. Using an actual persistence engine (i.e. MySQL, BDB), one would implement the three methods themselves.
"""
class PersistenceEngine(object):
""" Basic persistence engine implemented as a regular Pytho... | """
persistence_engine.py
~~~~~~~~~~~~
Implements put, get, delete methods for PersistenceStage. Using an actual persistence engine (i.e. MySQL, BDB), one would implement the three methods themselves.
"""
class PersistenceEngine(object):
""" Basic persistence engine implemented as a regular Pytho... | <commit_before>"""
persistence_engine.py
~~~~~~~~~~~~
Implements put, get, delete methods for PersistenceStage. Using an actual persistence engine (i.e. MySQL, BDB), one would implement the three methods themselves.
"""
class PersistenceEngine(object):
""" Basic persistence engine implemented as ... |
dcd2972bee896ea3c7885b1d6a8a6e132329d66b | apps/persona/urls.py | apps/persona/urls.py | from django.conf.urls.defaults import *
from mozorg.util import page
import views
urlpatterns = patterns('',
page('', 'persona/persona.html'),
page('about', 'persona/about.html'),
page('privacy-policy', 'persona/privacy-policy.html'),
page('terms-of-service', 'persona/terms-of-service.html'),
page(... | from django.conf.urls.defaults import *
from mozorg.util import page
urlpatterns = patterns('',
page('', 'persona/persona.html'),
page('about', 'persona/about.html'),
page('privacy-policy', 'persona/privacy-policy.html'),
page('terms-of-service', 'persona/terms-of-service.html'),
page('developer-fa... | Remove unnecessary 'import views' line | Remove unnecessary 'import views' line
| Python | mpl-2.0 | jacshfr/mozilla-bedrock,marcoscaceres/bedrock,mmmavis/bedrock,sgarrity/bedrock,ericawright/bedrock,hoosteeno/bedrock,pascalchevrel/bedrock,schalkneethling/bedrock,alexgibson/bedrock,yglazko/bedrock,gauthierm/bedrock,sylvestre/bedrock,TheJJ100100/bedrock,dudepare/bedrock,davehunt/bedrock,bensternthal/bedrock,bensterntha... | from django.conf.urls.defaults import *
from mozorg.util import page
import views
urlpatterns = patterns('',
page('', 'persona/persona.html'),
page('about', 'persona/about.html'),
page('privacy-policy', 'persona/privacy-policy.html'),
page('terms-of-service', 'persona/terms-of-service.html'),
page(... | from django.conf.urls.defaults import *
from mozorg.util import page
urlpatterns = patterns('',
page('', 'persona/persona.html'),
page('about', 'persona/about.html'),
page('privacy-policy', 'persona/privacy-policy.html'),
page('terms-of-service', 'persona/terms-of-service.html'),
page('developer-fa... | <commit_before>from django.conf.urls.defaults import *
from mozorg.util import page
import views
urlpatterns = patterns('',
page('', 'persona/persona.html'),
page('about', 'persona/about.html'),
page('privacy-policy', 'persona/privacy-policy.html'),
page('terms-of-service', 'persona/terms-of-service.ht... | from django.conf.urls.defaults import *
from mozorg.util import page
urlpatterns = patterns('',
page('', 'persona/persona.html'),
page('about', 'persona/about.html'),
page('privacy-policy', 'persona/privacy-policy.html'),
page('terms-of-service', 'persona/terms-of-service.html'),
page('developer-fa... | from django.conf.urls.defaults import *
from mozorg.util import page
import views
urlpatterns = patterns('',
page('', 'persona/persona.html'),
page('about', 'persona/about.html'),
page('privacy-policy', 'persona/privacy-policy.html'),
page('terms-of-service', 'persona/terms-of-service.html'),
page(... | <commit_before>from django.conf.urls.defaults import *
from mozorg.util import page
import views
urlpatterns = patterns('',
page('', 'persona/persona.html'),
page('about', 'persona/about.html'),
page('privacy-policy', 'persona/privacy-policy.html'),
page('terms-of-service', 'persona/terms-of-service.ht... |
414c8fa0a5576645831d58c8fa1285c9aef3610d | conditional/blueprints/intro_evals.py | conditional/blueprints/intro_evals.py | from flask import Blueprint
from flask import render_template
from flask import request
intro_evals_bp = Blueprint('intro_evals_bp', __name__)
@intro_evals_bp.route('/intro_evals/')
def display_intro_evals():
# get user data
user_name = request.headers.get('x-webauth-user')
members = [
{... | from flask import Blueprint
from flask import render_template
from flask import request
intro_evals_bp = Blueprint('intro_evals_bp', __name__)
@intro_evals_bp.route('/intro_evals/')
def display_intro_evals():
# get user data
user_name = request.headers.get('x-webauth-user')
members = [
{... | Edit intro evals data route | Edit intro evals data route
| Python | mit | RamZallan/conditional,ComputerScienceHouse/conditional,RamZallan/conditional,RamZallan/conditional,ComputerScienceHouse/conditional,ComputerScienceHouse/conditional | from flask import Blueprint
from flask import render_template
from flask import request
intro_evals_bp = Blueprint('intro_evals_bp', __name__)
@intro_evals_bp.route('/intro_evals/')
def display_intro_evals():
# get user data
user_name = request.headers.get('x-webauth-user')
members = [
{... | from flask import Blueprint
from flask import render_template
from flask import request
intro_evals_bp = Blueprint('intro_evals_bp', __name__)
@intro_evals_bp.route('/intro_evals/')
def display_intro_evals():
# get user data
user_name = request.headers.get('x-webauth-user')
members = [
{... | <commit_before>from flask import Blueprint
from flask import render_template
from flask import request
intro_evals_bp = Blueprint('intro_evals_bp', __name__)
@intro_evals_bp.route('/intro_evals/')
def display_intro_evals():
# get user data
user_name = request.headers.get('x-webauth-user')
members = [
... | from flask import Blueprint
from flask import render_template
from flask import request
intro_evals_bp = Blueprint('intro_evals_bp', __name__)
@intro_evals_bp.route('/intro_evals/')
def display_intro_evals():
# get user data
user_name = request.headers.get('x-webauth-user')
members = [
{... | from flask import Blueprint
from flask import render_template
from flask import request
intro_evals_bp = Blueprint('intro_evals_bp', __name__)
@intro_evals_bp.route('/intro_evals/')
def display_intro_evals():
# get user data
user_name = request.headers.get('x-webauth-user')
members = [
{... | <commit_before>from flask import Blueprint
from flask import render_template
from flask import request
intro_evals_bp = Blueprint('intro_evals_bp', __name__)
@intro_evals_bp.route('/intro_evals/')
def display_intro_evals():
# get user data
user_name = request.headers.get('x-webauth-user')
members = [
... |
3345d3d3d94fea39d6a670c5f92d87a1faadd8d7 | tests/TestPluginManager.py | tests/TestPluginManager.py | import socket
import time
from threading import Event
from unittest import TestCase
from PluginManager import PluginManager
class TestPluginManager(TestCase):
def test_stop(self):
"""Test connecting to plugin's port, stopping PluginManager."""
class Plugin:
"""Mock plugin, uses random... | import socket
import time
from threading import Event
from unittest import TestCase
from honeypot.PluginManager import PluginManager
class TestPluginManager(TestCase):
def test_stop(self):
"""Test connecting to plugin's port, stopping PluginManager."""
class Plugin:
"""Mock plugin, us... | Fix imports in plugin manager test to work with nosetests | Fix imports in plugin manager test to work with nosetests
| Python | mit | theplue/honeypot,ckaz18/honeypot,coyle5280/honeypot,coyle5280/honeypot,laurenmalone/honeypot,theplue/honeypot,laurenmalone/honeypot,laurenmalone/honeypot,coyle5280/honeypot,theplue/honeypot,coyle5280/honeypot,ckaz18/honeypot,ckaz18/honeypot,laurenmalone/honeypot,theplue/honeypot,ckaz18/honeypot | import socket
import time
from threading import Event
from unittest import TestCase
from PluginManager import PluginManager
class TestPluginManager(TestCase):
def test_stop(self):
"""Test connecting to plugin's port, stopping PluginManager."""
class Plugin:
"""Mock plugin, uses random... | import socket
import time
from threading import Event
from unittest import TestCase
from honeypot.PluginManager import PluginManager
class TestPluginManager(TestCase):
def test_stop(self):
"""Test connecting to plugin's port, stopping PluginManager."""
class Plugin:
"""Mock plugin, us... | <commit_before>import socket
import time
from threading import Event
from unittest import TestCase
from PluginManager import PluginManager
class TestPluginManager(TestCase):
def test_stop(self):
"""Test connecting to plugin's port, stopping PluginManager."""
class Plugin:
"""Mock plug... | import socket
import time
from threading import Event
from unittest import TestCase
from honeypot.PluginManager import PluginManager
class TestPluginManager(TestCase):
def test_stop(self):
"""Test connecting to plugin's port, stopping PluginManager."""
class Plugin:
"""Mock plugin, us... | import socket
import time
from threading import Event
from unittest import TestCase
from PluginManager import PluginManager
class TestPluginManager(TestCase):
def test_stop(self):
"""Test connecting to plugin's port, stopping PluginManager."""
class Plugin:
"""Mock plugin, uses random... | <commit_before>import socket
import time
from threading import Event
from unittest import TestCase
from PluginManager import PluginManager
class TestPluginManager(TestCase):
def test_stop(self):
"""Test connecting to plugin's port, stopping PluginManager."""
class Plugin:
"""Mock plug... |
1be4fcb077d63155e6c0beed9e4138fa377fa067 | ColorHistograms-python/color_histogram.py | ColorHistograms-python/color_histogram.py | from color_histogram_cuda import histogram
print histogram('../data/spotted_ball_3500.png', 16) | import sys
from color_histogram_cuda import histogram
print histogram(sys.argv[1], 16)
| Read file name from command line in python wrapper | Read file name from command line in python wrapper
| Python | bsd-3-clause | kwadraterry/GPGPU-LUT,kwadraterry/GPGPU-LUT,kwadraterry/GPGPU-LUT,kwadraterry/GPGPU-LUT,kwadraterry/GPGPU-LUT | from color_histogram_cuda import histogram
print histogram('../data/spotted_ball_3500.png', 16)Read file name from command line in python wrapper | import sys
from color_histogram_cuda import histogram
print histogram(sys.argv[1], 16)
| <commit_before>from color_histogram_cuda import histogram
print histogram('../data/spotted_ball_3500.png', 16)<commit_msg>Read file name from command line in python wrapper<commit_after> | import sys
from color_histogram_cuda import histogram
print histogram(sys.argv[1], 16)
| from color_histogram_cuda import histogram
print histogram('../data/spotted_ball_3500.png', 16)Read file name from command line in python wrapperimport sys
from color_histogram_cuda import histogram
print histogram(sys.argv[1], 16)
| <commit_before>from color_histogram_cuda import histogram
print histogram('../data/spotted_ball_3500.png', 16)<commit_msg>Read file name from command line in python wrapper<commit_after>import sys
from color_histogram_cuda import histogram
print histogram(sys.argv[1], 16)
|
9faf0d224c19b888aa63267adf26a4937b9c60c3 | tempest/api/compute/servers/test_availability_zone.py | tempest/api/compute/servers/test_availability_zone.py | # Copyright 2014 NEC Corporation
# 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 2014 NEC Corporation
# 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 ... | Use assertGreater(len(x), 0) over assertTrue(len(x) > 0) | Use assertGreater(len(x), 0) over assertTrue(len(x) > 0)
assertGreater provides a nicer error message if it fails.
Change-Id: I2c13d28c54ae3a9ff562448e7a16ab54d71b29b5
| Python | apache-2.0 | masayukig/tempest,vedujoshi/tempest,cisco-openstack/tempest,Tesora/tesora-tempest,openstack/tempest,sebrandon1/tempest,Tesora/tesora-tempest,sebrandon1/tempest,Juniper/tempest,Juniper/tempest,cisco-openstack/tempest,vedujoshi/tempest,masayukig/tempest,openstack/tempest | # Copyright 2014 NEC Corporation
# 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 2014 NEC Corporation
# 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 ... | <commit_before># Copyright 2014 NEC Corporation
# 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
#
# U... | # Copyright 2014 NEC Corporation
# 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 2014 NEC Corporation
# 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 ... | <commit_before># Copyright 2014 NEC Corporation
# 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
#
# U... |
d1b28ef809dbe18c79f296e6fc17c4ee9b3d153b | docs/conf.py | docs/conf.py | # -*- coding: utf-8 -*-
#
# This file is execfile()d with the current directory set to its containing
# directory.
import sys, os
sys.path.append(os.path.join(os.path.abspath('.'), '_ext'))
sys.path.append(os.path.dirname(os.path.abspath('.')))
import analytical
# -- General configuration --------------------------... | # -*- coding: utf-8 -*-
#
# This file is execfile()d with the current directory set to its containing
# directory.
import sys, os
sys.path.append(os.path.join(os.path.abspath('.'), '_ext'))
sys.path.append(os.path.dirname(os.path.abspath('.')))
import analytical
# -- General configuration --------------------------... | Update intersphinx links to Django 1.7 | Update intersphinx links to Django 1.7
| Python | mit | apocquet/django-analytical,ChristosChristofidis/django-analytical,bittner/django-analytical,ericdwang/django-analytical,machtfit/django-analytical,jcassee/django-analytical,pjdelport/django-analytical | # -*- coding: utf-8 -*-
#
# This file is execfile()d with the current directory set to its containing
# directory.
import sys, os
sys.path.append(os.path.join(os.path.abspath('.'), '_ext'))
sys.path.append(os.path.dirname(os.path.abspath('.')))
import analytical
# -- General configuration --------------------------... | # -*- coding: utf-8 -*-
#
# This file is execfile()d with the current directory set to its containing
# directory.
import sys, os
sys.path.append(os.path.join(os.path.abspath('.'), '_ext'))
sys.path.append(os.path.dirname(os.path.abspath('.')))
import analytical
# -- General configuration --------------------------... | <commit_before># -*- coding: utf-8 -*-
#
# This file is execfile()d with the current directory set to its containing
# directory.
import sys, os
sys.path.append(os.path.join(os.path.abspath('.'), '_ext'))
sys.path.append(os.path.dirname(os.path.abspath('.')))
import analytical
# -- General configuration -----------... | # -*- coding: utf-8 -*-
#
# This file is execfile()d with the current directory set to its containing
# directory.
import sys, os
sys.path.append(os.path.join(os.path.abspath('.'), '_ext'))
sys.path.append(os.path.dirname(os.path.abspath('.')))
import analytical
# -- General configuration --------------------------... | # -*- coding: utf-8 -*-
#
# This file is execfile()d with the current directory set to its containing
# directory.
import sys, os
sys.path.append(os.path.join(os.path.abspath('.'), '_ext'))
sys.path.append(os.path.dirname(os.path.abspath('.')))
import analytical
# -- General configuration --------------------------... | <commit_before># -*- coding: utf-8 -*-
#
# This file is execfile()d with the current directory set to its containing
# directory.
import sys, os
sys.path.append(os.path.join(os.path.abspath('.'), '_ext'))
sys.path.append(os.path.dirname(os.path.abspath('.')))
import analytical
# -- General configuration -----------... |
a1c570001e4214d1e2e2c4d34e2ee74721ecb2d5 | xpserver_api/serializers.py | xpserver_api/serializers.py | from django.contrib.auth.models import User
from rest_framework import serializers, viewsets
class UserSerializer(serializers.HyperlinkedModelSerializer):
class Meta:
model = User
fields = ('url', 'email')
def create(self, validated_data):
user = User.objects.create(**validated_data)
... | from django.contrib.auth.models import User
from rest_framework import serializers, viewsets
from xpserver_api.services import generate_activation_code, EmailSender
from xpserver_web.models import Profile
class UserSerializer(serializers.HyperlinkedModelSerializer):
class Meta:
model = User
fields... | Add user profile when reg via api | Add user profile when reg via api
When user is registered via api it will create profile, activation link
and send it to given email just like a web registration flow.
| Python | mit | xp2017-hackergarden/server,xp2017-hackergarden/server,xp2017-hackergarden/server,xp2017-hackergarden/server | from django.contrib.auth.models import User
from rest_framework import serializers, viewsets
class UserSerializer(serializers.HyperlinkedModelSerializer):
class Meta:
model = User
fields = ('url', 'email')
def create(self, validated_data):
user = User.objects.create(**validated_data)
... | from django.contrib.auth.models import User
from rest_framework import serializers, viewsets
from xpserver_api.services import generate_activation_code, EmailSender
from xpserver_web.models import Profile
class UserSerializer(serializers.HyperlinkedModelSerializer):
class Meta:
model = User
fields... | <commit_before>from django.contrib.auth.models import User
from rest_framework import serializers, viewsets
class UserSerializer(serializers.HyperlinkedModelSerializer):
class Meta:
model = User
fields = ('url', 'email')
def create(self, validated_data):
user = User.objects.create(**v... | from django.contrib.auth.models import User
from rest_framework import serializers, viewsets
from xpserver_api.services import generate_activation_code, EmailSender
from xpserver_web.models import Profile
class UserSerializer(serializers.HyperlinkedModelSerializer):
class Meta:
model = User
fields... | from django.contrib.auth.models import User
from rest_framework import serializers, viewsets
class UserSerializer(serializers.HyperlinkedModelSerializer):
class Meta:
model = User
fields = ('url', 'email')
def create(self, validated_data):
user = User.objects.create(**validated_data)
... | <commit_before>from django.contrib.auth.models import User
from rest_framework import serializers, viewsets
class UserSerializer(serializers.HyperlinkedModelSerializer):
class Meta:
model = User
fields = ('url', 'email')
def create(self, validated_data):
user = User.objects.create(**v... |
0f497f4973317588c22044ea78da8a7147eeef19 | docs/conf.py | docs/conf.py | import guzzle_sphinx_theme
project = "argcomplete"
copyright = "Andrey Kislyuk"
author = "Andrey Kislyuk"
version = ""
release = ""
language = None
master_doc = "index"
extensions = ["sphinx.ext.autodoc", "sphinx.ext.viewcode"]
source_suffix = [".rst", ".md"]
exclude_patterns = ["_build", "Thumbs.db", ".DS_Store"]
pyg... | import guzzle_sphinx_theme
project = "argcomplete"
copyright = "Andrey Kislyuk and argcomplete contributors"
author = "Andrey Kislyuk"
version = ""
release = ""
language = None
master_doc = "index"
extensions = ["sphinx.ext.autodoc", "sphinx.ext.viewcode"]
source_suffix = [".rst", ".md"]
exclude_patterns = ["_build", ... | Adjust copyright line in docs | Adjust copyright line in docs
| Python | apache-2.0 | kislyuk/argcomplete,kislyuk/argcomplete | import guzzle_sphinx_theme
project = "argcomplete"
copyright = "Andrey Kislyuk"
author = "Andrey Kislyuk"
version = ""
release = ""
language = None
master_doc = "index"
extensions = ["sphinx.ext.autodoc", "sphinx.ext.viewcode"]
source_suffix = [".rst", ".md"]
exclude_patterns = ["_build", "Thumbs.db", ".DS_Store"]
pyg... | import guzzle_sphinx_theme
project = "argcomplete"
copyright = "Andrey Kislyuk and argcomplete contributors"
author = "Andrey Kislyuk"
version = ""
release = ""
language = None
master_doc = "index"
extensions = ["sphinx.ext.autodoc", "sphinx.ext.viewcode"]
source_suffix = [".rst", ".md"]
exclude_patterns = ["_build", ... | <commit_before>import guzzle_sphinx_theme
project = "argcomplete"
copyright = "Andrey Kislyuk"
author = "Andrey Kislyuk"
version = ""
release = ""
language = None
master_doc = "index"
extensions = ["sphinx.ext.autodoc", "sphinx.ext.viewcode"]
source_suffix = [".rst", ".md"]
exclude_patterns = ["_build", "Thumbs.db", "... | import guzzle_sphinx_theme
project = "argcomplete"
copyright = "Andrey Kislyuk and argcomplete contributors"
author = "Andrey Kislyuk"
version = ""
release = ""
language = None
master_doc = "index"
extensions = ["sphinx.ext.autodoc", "sphinx.ext.viewcode"]
source_suffix = [".rst", ".md"]
exclude_patterns = ["_build", ... | import guzzle_sphinx_theme
project = "argcomplete"
copyright = "Andrey Kislyuk"
author = "Andrey Kislyuk"
version = ""
release = ""
language = None
master_doc = "index"
extensions = ["sphinx.ext.autodoc", "sphinx.ext.viewcode"]
source_suffix = [".rst", ".md"]
exclude_patterns = ["_build", "Thumbs.db", ".DS_Store"]
pyg... | <commit_before>import guzzle_sphinx_theme
project = "argcomplete"
copyright = "Andrey Kislyuk"
author = "Andrey Kislyuk"
version = ""
release = ""
language = None
master_doc = "index"
extensions = ["sphinx.ext.autodoc", "sphinx.ext.viewcode"]
source_suffix = [".rst", ".md"]
exclude_patterns = ["_build", "Thumbs.db", "... |
a786079d5603eada9186180542096cc334d465f3 | tests/fixtures/postgres.py | tests/fixtures/postgres.py | import pytest
from sqlalchemy import text
from sqlalchemy.exc import ProgrammingError
from sqlalchemy.ext.asyncio import AsyncEngine, create_async_engine
from sqlalchemy.ext.asyncio import AsyncSession
from virtool.models import Base
@pytest.fixture(scope="function")
async def engine():
engine = create_async_en... | import pytest
from sqlalchemy import text
from sqlalchemy.exc import ProgrammingError
from sqlalchemy.ext.asyncio import AsyncEngine, create_async_engine
from sqlalchemy.ext.asyncio import AsyncSession
from virtool.models import Base
@pytest.fixture(scope="function")
async def engine():
engine = create_async_en... | Update Postgres test connection string | Update Postgres test connection string
| Python | mit | igboyes/virtool,virtool/virtool,igboyes/virtool,virtool/virtool | import pytest
from sqlalchemy import text
from sqlalchemy.exc import ProgrammingError
from sqlalchemy.ext.asyncio import AsyncEngine, create_async_engine
from sqlalchemy.ext.asyncio import AsyncSession
from virtool.models import Base
@pytest.fixture(scope="function")
async def engine():
engine = create_async_en... | import pytest
from sqlalchemy import text
from sqlalchemy.exc import ProgrammingError
from sqlalchemy.ext.asyncio import AsyncEngine, create_async_engine
from sqlalchemy.ext.asyncio import AsyncSession
from virtool.models import Base
@pytest.fixture(scope="function")
async def engine():
engine = create_async_en... | <commit_before>import pytest
from sqlalchemy import text
from sqlalchemy.exc import ProgrammingError
from sqlalchemy.ext.asyncio import AsyncEngine, create_async_engine
from sqlalchemy.ext.asyncio import AsyncSession
from virtool.models import Base
@pytest.fixture(scope="function")
async def engine():
engine = ... | import pytest
from sqlalchemy import text
from sqlalchemy.exc import ProgrammingError
from sqlalchemy.ext.asyncio import AsyncEngine, create_async_engine
from sqlalchemy.ext.asyncio import AsyncSession
from virtool.models import Base
@pytest.fixture(scope="function")
async def engine():
engine = create_async_en... | import pytest
from sqlalchemy import text
from sqlalchemy.exc import ProgrammingError
from sqlalchemy.ext.asyncio import AsyncEngine, create_async_engine
from sqlalchemy.ext.asyncio import AsyncSession
from virtool.models import Base
@pytest.fixture(scope="function")
async def engine():
engine = create_async_en... | <commit_before>import pytest
from sqlalchemy import text
from sqlalchemy.exc import ProgrammingError
from sqlalchemy.ext.asyncio import AsyncEngine, create_async_engine
from sqlalchemy.ext.asyncio import AsyncSession
from virtool.models import Base
@pytest.fixture(scope="function")
async def engine():
engine = ... |
2d9e6d9ca46cdd58f5b811082f3fc40d62f3ead8 | dev/__init__.py | dev/__init__.py | # coding: utf-8
from __future__ import unicode_literals, division, absolute_import, print_function
import os
package_name = "certbuilder"
other_packages = []
package_root = os.path.abspath(os.path.join(os.path.dirname(__file__), '..'))
build_root = os.path.abspath(os.path.join(package_root, '..'))
md_source_map =... | # coding: utf-8
from __future__ import unicode_literals, division, absolute_import, print_function
import os
package_name = "certbuilder"
other_packages = []
task_keyword_args = []
requires_oscrypto = True
has_tests_package = False
package_root = os.path.abspath(os.path.join(os.path.dirname(__file__), '..'))
bui... | Add missing dev config values | Add missing dev config values
| Python | mit | wbond/certbuilder | # coding: utf-8
from __future__ import unicode_literals, division, absolute_import, print_function
import os
package_name = "certbuilder"
other_packages = []
package_root = os.path.abspath(os.path.join(os.path.dirname(__file__), '..'))
build_root = os.path.abspath(os.path.join(package_root, '..'))
md_source_map =... | # coding: utf-8
from __future__ import unicode_literals, division, absolute_import, print_function
import os
package_name = "certbuilder"
other_packages = []
task_keyword_args = []
requires_oscrypto = True
has_tests_package = False
package_root = os.path.abspath(os.path.join(os.path.dirname(__file__), '..'))
bui... | <commit_before># coding: utf-8
from __future__ import unicode_literals, division, absolute_import, print_function
import os
package_name = "certbuilder"
other_packages = []
package_root = os.path.abspath(os.path.join(os.path.dirname(__file__), '..'))
build_root = os.path.abspath(os.path.join(package_root, '..'))
... | # coding: utf-8
from __future__ import unicode_literals, division, absolute_import, print_function
import os
package_name = "certbuilder"
other_packages = []
task_keyword_args = []
requires_oscrypto = True
has_tests_package = False
package_root = os.path.abspath(os.path.join(os.path.dirname(__file__), '..'))
bui... | # coding: utf-8
from __future__ import unicode_literals, division, absolute_import, print_function
import os
package_name = "certbuilder"
other_packages = []
package_root = os.path.abspath(os.path.join(os.path.dirname(__file__), '..'))
build_root = os.path.abspath(os.path.join(package_root, '..'))
md_source_map =... | <commit_before># coding: utf-8
from __future__ import unicode_literals, division, absolute_import, print_function
import os
package_name = "certbuilder"
other_packages = []
package_root = os.path.abspath(os.path.join(os.path.dirname(__file__), '..'))
build_root = os.path.abspath(os.path.join(package_root, '..'))
... |
1223726c081000ef42a580881c9f8d2002d91c0b | src/hireme/tasks/__init__.py | src/hireme/tasks/__init__.py | # -*- coding: utf-8 -*-
from flask import render_template
from flask import request
def render_task(func):
def rendered():
params = dict(title=func.__module__.split('.')[-1] or '')
if request.method == 'POST':
input_data = request.form.get('input')
params['input_data'] = i... | # -*- coding: utf-8 -*-
from flask import render_template
from flask import request
def render_task(func):
"""Decorator for task solving functions. Provides raw form data from the
request and expects a string formatted return value."""
def rendered():
params = dict(title=func.__module__.split('.... | Add docstring, fix template param name | Add docstring, fix template param name
| Python | bsd-2-clause | cutoffthetop/hireme | # -*- coding: utf-8 -*-
from flask import render_template
from flask import request
def render_task(func):
def rendered():
params = dict(title=func.__module__.split('.')[-1] or '')
if request.method == 'POST':
input_data = request.form.get('input')
params['input_data'] = i... | # -*- coding: utf-8 -*-
from flask import render_template
from flask import request
def render_task(func):
"""Decorator for task solving functions. Provides raw form data from the
request and expects a string formatted return value."""
def rendered():
params = dict(title=func.__module__.split('.... | <commit_before># -*- coding: utf-8 -*-
from flask import render_template
from flask import request
def render_task(func):
def rendered():
params = dict(title=func.__module__.split('.')[-1] or '')
if request.method == 'POST':
input_data = request.form.get('input')
params['i... | # -*- coding: utf-8 -*-
from flask import render_template
from flask import request
def render_task(func):
"""Decorator for task solving functions. Provides raw form data from the
request and expects a string formatted return value."""
def rendered():
params = dict(title=func.__module__.split('.... | # -*- coding: utf-8 -*-
from flask import render_template
from flask import request
def render_task(func):
def rendered():
params = dict(title=func.__module__.split('.')[-1] or '')
if request.method == 'POST':
input_data = request.form.get('input')
params['input_data'] = i... | <commit_before># -*- coding: utf-8 -*-
from flask import render_template
from flask import request
def render_task(func):
def rendered():
params = dict(title=func.__module__.split('.')[-1] or '')
if request.method == 'POST':
input_data = request.form.get('input')
params['i... |
814d5b97c1b5238cc9b046762781b9e604a82353 | dduplicated/fileManager.py | dduplicated/fileManager.py | #! /usr/bin/env python
import os
def managerFiles(paths, link):
first = True
src = ""
for path in paths:
if first:
first = False
src = path
print("PRESERVED: The file preserved is: \"" + path + "\"")
else:
os.remove(path)
print("DELETE: File deleted: \"" + path + "\"")
if link:
os.symlin... | #! /usr/bin/env python
import os
def managerFiles(paths, link):
first = True
src = ""
for path in paths:
if first:
first = False
src = path
print("PRESERVED: The file preserved is: \"" + path + "\"")
else:
os.remove(path)
print("DELETE: File deleted: \"" + path + "\"")
if link:
os.symlin... | Fix in action delete and not link | Fix in action delete and not link
Fix in case of user want only delete duplicates, the error is, when did they the delete only duplicates, the links was created anyway.
| Python | mit | messiasthi/dduplicated-cli | #! /usr/bin/env python
import os
def managerFiles(paths, link):
first = True
src = ""
for path in paths:
if first:
first = False
src = path
print("PRESERVED: The file preserved is: \"" + path + "\"")
else:
os.remove(path)
print("DELETE: File deleted: \"" + path + "\"")
if link:
os.symlin... | #! /usr/bin/env python
import os
def managerFiles(paths, link):
first = True
src = ""
for path in paths:
if first:
first = False
src = path
print("PRESERVED: The file preserved is: \"" + path + "\"")
else:
os.remove(path)
print("DELETE: File deleted: \"" + path + "\"")
if link:
os.symlin... | <commit_before>#! /usr/bin/env python
import os
def managerFiles(paths, link):
first = True
src = ""
for path in paths:
if first:
first = False
src = path
print("PRESERVED: The file preserved is: \"" + path + "\"")
else:
os.remove(path)
print("DELETE: File deleted: \"" + path + "\"")
if link... | #! /usr/bin/env python
import os
def managerFiles(paths, link):
first = True
src = ""
for path in paths:
if first:
first = False
src = path
print("PRESERVED: The file preserved is: \"" + path + "\"")
else:
os.remove(path)
print("DELETE: File deleted: \"" + path + "\"")
if link:
os.symlin... | #! /usr/bin/env python
import os
def managerFiles(paths, link):
first = True
src = ""
for path in paths:
if first:
first = False
src = path
print("PRESERVED: The file preserved is: \"" + path + "\"")
else:
os.remove(path)
print("DELETE: File deleted: \"" + path + "\"")
if link:
os.symlin... | <commit_before>#! /usr/bin/env python
import os
def managerFiles(paths, link):
first = True
src = ""
for path in paths:
if first:
first = False
src = path
print("PRESERVED: The file preserved is: \"" + path + "\"")
else:
os.remove(path)
print("DELETE: File deleted: \"" + path + "\"")
if link... |
d3a993b1f8ed7a682993c0472c362206fae2abcb | dodocs/profiles/remove.py | dodocs/profiles/remove.py | """Create the profile.
Copyright (c) 2015 Francesco Montesano
MIT Licence
"""
import shutil
import dodocs.logger as dlog
import dodocs.utils as dutils
def remove(args):
"""Remove profile(s)
Parameters
----------
args : namespace
parsed command line arguments
"""
log = dlog.getLogge... | """Remove the profiles.
Copyright (c) 2015 Francesco Montesano
MIT Licence
"""
import shutil
import dodocs.logger as dlog
import dodocs.utils as dutils
def remove(args):
"""Remove profile(s)
Parameters
----------
args : namespace
parsed command line arguments
"""
log = dlog.getLogg... | Adjust logging and fix module documentation | Adjust logging and fix module documentation
| Python | mit | montefra/dodocs | """Create the profile.
Copyright (c) 2015 Francesco Montesano
MIT Licence
"""
import shutil
import dodocs.logger as dlog
import dodocs.utils as dutils
def remove(args):
"""Remove profile(s)
Parameters
----------
args : namespace
parsed command line arguments
"""
log = dlog.getLogge... | """Remove the profiles.
Copyright (c) 2015 Francesco Montesano
MIT Licence
"""
import shutil
import dodocs.logger as dlog
import dodocs.utils as dutils
def remove(args):
"""Remove profile(s)
Parameters
----------
args : namespace
parsed command line arguments
"""
log = dlog.getLogg... | <commit_before>"""Create the profile.
Copyright (c) 2015 Francesco Montesano
MIT Licence
"""
import shutil
import dodocs.logger as dlog
import dodocs.utils as dutils
def remove(args):
"""Remove profile(s)
Parameters
----------
args : namespace
parsed command line arguments
"""
log ... | """Remove the profiles.
Copyright (c) 2015 Francesco Montesano
MIT Licence
"""
import shutil
import dodocs.logger as dlog
import dodocs.utils as dutils
def remove(args):
"""Remove profile(s)
Parameters
----------
args : namespace
parsed command line arguments
"""
log = dlog.getLogg... | """Create the profile.
Copyright (c) 2015 Francesco Montesano
MIT Licence
"""
import shutil
import dodocs.logger as dlog
import dodocs.utils as dutils
def remove(args):
"""Remove profile(s)
Parameters
----------
args : namespace
parsed command line arguments
"""
log = dlog.getLogge... | <commit_before>"""Create the profile.
Copyright (c) 2015 Francesco Montesano
MIT Licence
"""
import shutil
import dodocs.logger as dlog
import dodocs.utils as dutils
def remove(args):
"""Remove profile(s)
Parameters
----------
args : namespace
parsed command line arguments
"""
log ... |
1e76a9c7ee030875929a65d9f30194166dcd62ef | docs/reencode.py | docs/reencode.py | # Copyright 2021 Google LLC
#
# 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
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, ... | # Copyright 2021 Google LLC
#
# 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
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, ... | Add a comment about line endings in Stardoc files. | Add a comment about line endings in Stardoc files.
| Python | apache-2.0 | phst/rules_elisp,phst/rules_elisp,phst/rules_elisp,phst/rules_elisp,phst/rules_elisp | # Copyright 2021 Google LLC
#
# 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
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, ... | # Copyright 2021 Google LLC
#
# 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
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, ... | <commit_before># Copyright 2021 Google LLC
#
# 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
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed ... | # Copyright 2021 Google LLC
#
# 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
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, ... | # Copyright 2021 Google LLC
#
# 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
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, ... | <commit_before># Copyright 2021 Google LLC
#
# 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
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed ... |
95ce6f33cc095df6d0a5f239e075a610eefbe262 | docs/conf.py | docs/conf.py | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
extensions = ['sphinx.ext.autodoc', 'jaraco.packaging.sphinx', 'rst.linker']
master_doc = "index"
link_files = {
'../CHANGES.rst': dict(
using=dict(GH='https://github.com'),
replace=[
dict(
pattern=r'(Issue #|\B#)(?P<issue... | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
extensions = ['sphinx.ext.autodoc', 'jaraco.packaging.sphinx', 'rst.linker']
master_doc = "index"
link_files = {
'../CHANGES.rst': dict(
using=dict(GH='https://github.com'),
replace=[
dict(
pattern=r'(Issue #|\B#)(?P<issue... | Use inline flags with local scope. | Use inline flags with local scope.
| Python | mit | jaraco/jaraco.path,jaraco/hgtools,jazzband/inflect,yougov/pmxbot,jaraco/jaraco.classes,jaraco/jaraco.functools,jaraco/jaraco.collections,python/importlib_metadata,yougov/pmxbot,jaraco/irc,jaraco/jaraco.text,jaraco/tempora,jaraco/zipp,jaraco/portend,jaraco/backports.functools_lru_cache,jaraco/calendra,pwdyson/inflect.py... | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
extensions = ['sphinx.ext.autodoc', 'jaraco.packaging.sphinx', 'rst.linker']
master_doc = "index"
link_files = {
'../CHANGES.rst': dict(
using=dict(GH='https://github.com'),
replace=[
dict(
pattern=r'(Issue #|\B#)(?P<issue... | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
extensions = ['sphinx.ext.autodoc', 'jaraco.packaging.sphinx', 'rst.linker']
master_doc = "index"
link_files = {
'../CHANGES.rst': dict(
using=dict(GH='https://github.com'),
replace=[
dict(
pattern=r'(Issue #|\B#)(?P<issue... | <commit_before>#!/usr/bin/env python3
# -*- coding: utf-8 -*-
extensions = ['sphinx.ext.autodoc', 'jaraco.packaging.sphinx', 'rst.linker']
master_doc = "index"
link_files = {
'../CHANGES.rst': dict(
using=dict(GH='https://github.com'),
replace=[
dict(
pattern=r'(Issue ... | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
extensions = ['sphinx.ext.autodoc', 'jaraco.packaging.sphinx', 'rst.linker']
master_doc = "index"
link_files = {
'../CHANGES.rst': dict(
using=dict(GH='https://github.com'),
replace=[
dict(
pattern=r'(Issue #|\B#)(?P<issue... | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
extensions = ['sphinx.ext.autodoc', 'jaraco.packaging.sphinx', 'rst.linker']
master_doc = "index"
link_files = {
'../CHANGES.rst': dict(
using=dict(GH='https://github.com'),
replace=[
dict(
pattern=r'(Issue #|\B#)(?P<issue... | <commit_before>#!/usr/bin/env python3
# -*- coding: utf-8 -*-
extensions = ['sphinx.ext.autodoc', 'jaraco.packaging.sphinx', 'rst.linker']
master_doc = "index"
link_files = {
'../CHANGES.rst': dict(
using=dict(GH='https://github.com'),
replace=[
dict(
pattern=r'(Issue ... |
ab0ba3232c1a7a4b028abe6d371b3935ea0ab110 | eve_api/tasks.py | eve_api/tasks.py | from celery.decorators import task
from eve_api.api_puller.accounts import import_eve_account
from eve_api.app_defines import *
from sso.tasks import update_user_access
@task()
def import_apikey(api_userid, api_key, user=None, force_cache=False):
log = import_apikey.get_logger()
l.info("Importing %s/%s" % (ap... | from celery.decorators import task
from eve_api.api_puller.accounts import import_eve_account
from eve_api.app_defines import *
from sso.tasks import update_user_access
@task()
def import_apikey(api_userid, api_key, user=None, force_cache=False):
acc = import_eve_account(api_key, api_userid, force_cache=force_cach... | Fix error in the apikey import task | Fix error in the apikey import task
| Python | bsd-3-clause | nikdoof/test-auth | from celery.decorators import task
from eve_api.api_puller.accounts import import_eve_account
from eve_api.app_defines import *
from sso.tasks import update_user_access
@task()
def import_apikey(api_userid, api_key, user=None, force_cache=False):
log = import_apikey.get_logger()
l.info("Importing %s/%s" % (ap... | from celery.decorators import task
from eve_api.api_puller.accounts import import_eve_account
from eve_api.app_defines import *
from sso.tasks import update_user_access
@task()
def import_apikey(api_userid, api_key, user=None, force_cache=False):
acc = import_eve_account(api_key, api_userid, force_cache=force_cach... | <commit_before>from celery.decorators import task
from eve_api.api_puller.accounts import import_eve_account
from eve_api.app_defines import *
from sso.tasks import update_user_access
@task()
def import_apikey(api_userid, api_key, user=None, force_cache=False):
log = import_apikey.get_logger()
l.info("Importi... | from celery.decorators import task
from eve_api.api_puller.accounts import import_eve_account
from eve_api.app_defines import *
from sso.tasks import update_user_access
@task()
def import_apikey(api_userid, api_key, user=None, force_cache=False):
acc = import_eve_account(api_key, api_userid, force_cache=force_cach... | from celery.decorators import task
from eve_api.api_puller.accounts import import_eve_account
from eve_api.app_defines import *
from sso.tasks import update_user_access
@task()
def import_apikey(api_userid, api_key, user=None, force_cache=False):
log = import_apikey.get_logger()
l.info("Importing %s/%s" % (ap... | <commit_before>from celery.decorators import task
from eve_api.api_puller.accounts import import_eve_account
from eve_api.app_defines import *
from sso.tasks import update_user_access
@task()
def import_apikey(api_userid, api_key, user=None, force_cache=False):
log = import_apikey.get_logger()
l.info("Importi... |
fcde79c7743b621be31acc4bd4e5826b121d573d | nalaf/download_corpora.py | nalaf/download_corpora.py | """
Downloads the necessary NLTK corpora for nalaf.
Usage: ::
$ python -m nalaf.download_corpora
"""
if __name__ == '__main__':
import nltk
CORPORA = ['punkt']
for corpus in CORPORA:
nltk.download(corpus) | """
Downloads the necessary NLTK corpora for nalaf.
Usage: ::
$ python -m nalaf.download_corpora
"""
if __name__ == '__main__':
from nltk import download
CORPORA = ['punkt']
for corpus in CORPORA:
download(corpus)
| Fix a build for travis-CI | Fix a build for travis-CI
| Python | apache-2.0 | Rostlab/nalaf | """
Downloads the necessary NLTK corpora for nalaf.
Usage: ::
$ python -m nalaf.download_corpora
"""
if __name__ == '__main__':
import nltk
CORPORA = ['punkt']
for corpus in CORPORA:
nltk.download(corpus)Fix a build for travis-CI | """
Downloads the necessary NLTK corpora for nalaf.
Usage: ::
$ python -m nalaf.download_corpora
"""
if __name__ == '__main__':
from nltk import download
CORPORA = ['punkt']
for corpus in CORPORA:
download(corpus)
| <commit_before>"""
Downloads the necessary NLTK corpora for nalaf.
Usage: ::
$ python -m nalaf.download_corpora
"""
if __name__ == '__main__':
import nltk
CORPORA = ['punkt']
for corpus in CORPORA:
nltk.download(corpus)<commit_msg>Fix a build for travis-CI<commit_after> | """
Downloads the necessary NLTK corpora for nalaf.
Usage: ::
$ python -m nalaf.download_corpora
"""
if __name__ == '__main__':
from nltk import download
CORPORA = ['punkt']
for corpus in CORPORA:
download(corpus)
| """
Downloads the necessary NLTK corpora for nalaf.
Usage: ::
$ python -m nalaf.download_corpora
"""
if __name__ == '__main__':
import nltk
CORPORA = ['punkt']
for corpus in CORPORA:
nltk.download(corpus)Fix a build for travis-CI"""
Downloads the necessary NLTK corpora for nalaf.
Usage: ::... | <commit_before>"""
Downloads the necessary NLTK corpora for nalaf.
Usage: ::
$ python -m nalaf.download_corpora
"""
if __name__ == '__main__':
import nltk
CORPORA = ['punkt']
for corpus in CORPORA:
nltk.download(corpus)<commit_msg>Fix a build for travis-CI<commit_after>"""
Downloads the nec... |
84f17b192c97212c7fdd963208f41085c85f08a5 | examples/constant_liar.py | examples/constant_liar.py | """
Example for parallel optimization with skopt.
The points to evaluate in parallel are selected according to the "constant lie" approach.
"""
import numpy as np
from multiprocessing.pool import ThreadPool
from skopt.space import Real
from skopt.learning import GaussianProcessRegressor
from skopt import Optimizer
#... | """
Example for parallel optimization with skopt.
The points to evaluate in parallel are selected according to the "constant lie" approach.
"""
import numpy as np
from sklearn.externals.joblib import Parallel, delayed
from skopt.space import Real
from skopt.learning import GaussianProcessRegressor
from skopt import O... | Drop ThreadPool, use joblib instead | Drop ThreadPool, use joblib instead
| Python | bsd-3-clause | scikit-optimize/scikit-optimize,betatim/BlackBox,betatim/BlackBox,scikit-optimize/scikit-optimize | """
Example for parallel optimization with skopt.
The points to evaluate in parallel are selected according to the "constant lie" approach.
"""
import numpy as np
from multiprocessing.pool import ThreadPool
from skopt.space import Real
from skopt.learning import GaussianProcessRegressor
from skopt import Optimizer
#... | """
Example for parallel optimization with skopt.
The points to evaluate in parallel are selected according to the "constant lie" approach.
"""
import numpy as np
from sklearn.externals.joblib import Parallel, delayed
from skopt.space import Real
from skopt.learning import GaussianProcessRegressor
from skopt import O... | <commit_before>"""
Example for parallel optimization with skopt.
The points to evaluate in parallel are selected according to the "constant lie" approach.
"""
import numpy as np
from multiprocessing.pool import ThreadPool
from skopt.space import Real
from skopt.learning import GaussianProcessRegressor
from skopt impo... | """
Example for parallel optimization with skopt.
The points to evaluate in parallel are selected according to the "constant lie" approach.
"""
import numpy as np
from sklearn.externals.joblib import Parallel, delayed
from skopt.space import Real
from skopt.learning import GaussianProcessRegressor
from skopt import O... | """
Example for parallel optimization with skopt.
The points to evaluate in parallel are selected according to the "constant lie" approach.
"""
import numpy as np
from multiprocessing.pool import ThreadPool
from skopt.space import Real
from skopt.learning import GaussianProcessRegressor
from skopt import Optimizer
#... | <commit_before>"""
Example for parallel optimization with skopt.
The points to evaluate in parallel are selected according to the "constant lie" approach.
"""
import numpy as np
from multiprocessing.pool import ThreadPool
from skopt.space import Real
from skopt.learning import GaussianProcessRegressor
from skopt impo... |
4071adfe51a94376045fa31538f1ab94615ba962 | escalator.py | escalator.py | """Creates the escalator class"""
class Escalator:
"""
Each escalator is an instance of the escalator class.
Methods:
__init__: creates a new escalator
rate: calculates the rate people leave the escalator
"""
def __init__(self):
self.stand_time = None
self.stand_space = No... | """Creates the escalator class"""
class Escalator:
"""
Each escalator is an instance of the escalator class.
Methods:
__init__: creates a new escalator
rate: calculates the rate people leave the escalator
"""
def __init__(self):
self.stand_time = eval(input("Enter a standing escal... | Add input statements and edit parentheses in rate | Add input statements and edit parentheses in rate
Attempted to add some input functions into the elevator constructor.
Ref #25 #23 | Python | mit | ForestPride/rail-problem | """Creates the escalator class"""
class Escalator:
"""
Each escalator is an instance of the escalator class.
Methods:
__init__: creates a new escalator
rate: calculates the rate people leave the escalator
"""
def __init__(self):
self.stand_time = None
self.stand_space = No... | """Creates the escalator class"""
class Escalator:
"""
Each escalator is an instance of the escalator class.
Methods:
__init__: creates a new escalator
rate: calculates the rate people leave the escalator
"""
def __init__(self):
self.stand_time = eval(input("Enter a standing escal... | <commit_before>"""Creates the escalator class"""
class Escalator:
"""
Each escalator is an instance of the escalator class.
Methods:
__init__: creates a new escalator
rate: calculates the rate people leave the escalator
"""
def __init__(self):
self.stand_time = None
self.s... | """Creates the escalator class"""
class Escalator:
"""
Each escalator is an instance of the escalator class.
Methods:
__init__: creates a new escalator
rate: calculates the rate people leave the escalator
"""
def __init__(self):
self.stand_time = eval(input("Enter a standing escal... | """Creates the escalator class"""
class Escalator:
"""
Each escalator is an instance of the escalator class.
Methods:
__init__: creates a new escalator
rate: calculates the rate people leave the escalator
"""
def __init__(self):
self.stand_time = None
self.stand_space = No... | <commit_before>"""Creates the escalator class"""
class Escalator:
"""
Each escalator is an instance of the escalator class.
Methods:
__init__: creates a new escalator
rate: calculates the rate people leave the escalator
"""
def __init__(self):
self.stand_time = None
self.s... |
92e1803a4c9e38a8672e00afbcfe0807ea808565 | examples/reading/rtf15.py | examples/reading/rtf15.py | from pyth.plugins.rtf15.reader import Rtf15Reader
from pyth.plugins.xhtml.writer import XHTMLWriter
import sys
if len(sys.argv) > 1:
filename = sys.argv[1]
else:
filename = "sample.rtf"
doc = Rtf15Reader.read(open(filename))
print XHTMLWriter.write(doc, pretty=True).read()
| from pyth.plugins.rtf15.reader import Rtf15Reader
from pyth.plugins.xhtml.writer import XHTMLWriter
import sys
if len(sys.argv) > 1:
filename = sys.argv[1]
else:
filename = "sample.rtf"
doc = Rtf15Reader.read(open(filename, "rb"))
print XHTMLWriter.write(doc, pretty=True).read()
| Make RTF reader sample open in 'rb' mode explicitly | Make RTF reader sample open in 'rb' mode explicitly
| Python | mit | kippr/pyth,kippr/pyth,prechelt/pyth,eriol/pyth,brendonh/pyth,prechelt/pyth,sheepeatingtaz/pyth,pombredanne/pyth | from pyth.plugins.rtf15.reader import Rtf15Reader
from pyth.plugins.xhtml.writer import XHTMLWriter
import sys
if len(sys.argv) > 1:
filename = sys.argv[1]
else:
filename = "sample.rtf"
doc = Rtf15Reader.read(open(filename))
print XHTMLWriter.write(doc, pretty=True).read()
Make RTF reader sample open in '... | from pyth.plugins.rtf15.reader import Rtf15Reader
from pyth.plugins.xhtml.writer import XHTMLWriter
import sys
if len(sys.argv) > 1:
filename = sys.argv[1]
else:
filename = "sample.rtf"
doc = Rtf15Reader.read(open(filename, "rb"))
print XHTMLWriter.write(doc, pretty=True).read()
| <commit_before>from pyth.plugins.rtf15.reader import Rtf15Reader
from pyth.plugins.xhtml.writer import XHTMLWriter
import sys
if len(sys.argv) > 1:
filename = sys.argv[1]
else:
filename = "sample.rtf"
doc = Rtf15Reader.read(open(filename))
print XHTMLWriter.write(doc, pretty=True).read()
<commit_msg>Make ... | from pyth.plugins.rtf15.reader import Rtf15Reader
from pyth.plugins.xhtml.writer import XHTMLWriter
import sys
if len(sys.argv) > 1:
filename = sys.argv[1]
else:
filename = "sample.rtf"
doc = Rtf15Reader.read(open(filename, "rb"))
print XHTMLWriter.write(doc, pretty=True).read()
| from pyth.plugins.rtf15.reader import Rtf15Reader
from pyth.plugins.xhtml.writer import XHTMLWriter
import sys
if len(sys.argv) > 1:
filename = sys.argv[1]
else:
filename = "sample.rtf"
doc = Rtf15Reader.read(open(filename))
print XHTMLWriter.write(doc, pretty=True).read()
Make RTF reader sample open in '... | <commit_before>from pyth.plugins.rtf15.reader import Rtf15Reader
from pyth.plugins.xhtml.writer import XHTMLWriter
import sys
if len(sys.argv) > 1:
filename = sys.argv[1]
else:
filename = "sample.rtf"
doc = Rtf15Reader.read(open(filename))
print XHTMLWriter.write(doc, pretty=True).read()
<commit_msg>Make ... |
65b418b8eaa8f57fdd3c8207168451da20b452bf | src/python/rgplot/RgChart.py | src/python/rgplot/RgChart.py | import matplotlib.pyplot as plt
#class RgChart(object):
#__metaclass__ = ABCMeta
class RgChart(object):
def with_grids(self):
self._ax.xaxis.grid(True)
self._ax.yaxis.grid(True)
return self
def save_as(self, filename):
self._create_plot()
self._fig.savefig(fil... | import matplotlib.pyplot as plt
#class RgChart(object):
#__metaclass__ = ABCMeta
class RgChart(object):
TITLE_Y_OFFSET = 1.08
def with_grids(self):
self._ax.xaxis.grid(True)
self._ax.yaxis.grid(True)
return self
def save_as(self, filename):
self._create_plot()
... | Add y log option and title offset | Add y log option and title offset
| Python | mit | vjuranek/rg-offline-plotting,vjuranek/rg-offline-plotting | import matplotlib.pyplot as plt
#class RgChart(object):
#__metaclass__ = ABCMeta
class RgChart(object):
def with_grids(self):
self._ax.xaxis.grid(True)
self._ax.yaxis.grid(True)
return self
def save_as(self, filename):
self._create_plot()
self._fig.savefig(fil... | import matplotlib.pyplot as plt
#class RgChart(object):
#__metaclass__ = ABCMeta
class RgChart(object):
TITLE_Y_OFFSET = 1.08
def with_grids(self):
self._ax.xaxis.grid(True)
self._ax.yaxis.grid(True)
return self
def save_as(self, filename):
self._create_plot()
... | <commit_before>import matplotlib.pyplot as plt
#class RgChart(object):
#__metaclass__ = ABCMeta
class RgChart(object):
def with_grids(self):
self._ax.xaxis.grid(True)
self._ax.yaxis.grid(True)
return self
def save_as(self, filename):
self._create_plot()
self._... | import matplotlib.pyplot as plt
#class RgChart(object):
#__metaclass__ = ABCMeta
class RgChart(object):
TITLE_Y_OFFSET = 1.08
def with_grids(self):
self._ax.xaxis.grid(True)
self._ax.yaxis.grid(True)
return self
def save_as(self, filename):
self._create_plot()
... | import matplotlib.pyplot as plt
#class RgChart(object):
#__metaclass__ = ABCMeta
class RgChart(object):
def with_grids(self):
self._ax.xaxis.grid(True)
self._ax.yaxis.grid(True)
return self
def save_as(self, filename):
self._create_plot()
self._fig.savefig(fil... | <commit_before>import matplotlib.pyplot as plt
#class RgChart(object):
#__metaclass__ = ABCMeta
class RgChart(object):
def with_grids(self):
self._ax.xaxis.grid(True)
self._ax.yaxis.grid(True)
return self
def save_as(self, filename):
self._create_plot()
self._... |
164891392f9a68abb0fa29a74787ef127849d0c0 | benchexec/tools/avr.py | benchexec/tools/avr.py | # This file is part of BenchExec, a framework for reliable benchmarking:
# https://github.com/sosy-lab/benchexec
#
# SPDX-FileCopyrightText: 2007-2020 Dirk Beyer <https://www.sosy-lab.org>
#
# SPDX-License-Identifier: Apache-2.0
import benchexec.result as result
import benchexec.tools.template
class Tool(benchexec.t... | # This file is part of BenchExec, a framework for reliable benchmarking:
# https://github.com/sosy-lab/benchexec
#
# SPDX-FileCopyrightText: 2007-2020 Dirk Beyer <https://www.sosy-lab.org>
#
# SPDX-License-Identifier: Apache-2.0
import benchexec.result as result
import benchexec.tools.template
class Tool(benchexec.t... | Determine AVR's results more precisely | Determine AVR's results more precisely
| Python | apache-2.0 | sosy-lab/benchexec,sosy-lab/benchexec,sosy-lab/benchexec,sosy-lab/benchexec,sosy-lab/benchexec,sosy-lab/benchexec | # This file is part of BenchExec, a framework for reliable benchmarking:
# https://github.com/sosy-lab/benchexec
#
# SPDX-FileCopyrightText: 2007-2020 Dirk Beyer <https://www.sosy-lab.org>
#
# SPDX-License-Identifier: Apache-2.0
import benchexec.result as result
import benchexec.tools.template
class Tool(benchexec.t... | # This file is part of BenchExec, a framework for reliable benchmarking:
# https://github.com/sosy-lab/benchexec
#
# SPDX-FileCopyrightText: 2007-2020 Dirk Beyer <https://www.sosy-lab.org>
#
# SPDX-License-Identifier: Apache-2.0
import benchexec.result as result
import benchexec.tools.template
class Tool(benchexec.t... | <commit_before># This file is part of BenchExec, a framework for reliable benchmarking:
# https://github.com/sosy-lab/benchexec
#
# SPDX-FileCopyrightText: 2007-2020 Dirk Beyer <https://www.sosy-lab.org>
#
# SPDX-License-Identifier: Apache-2.0
import benchexec.result as result
import benchexec.tools.template
class T... | # This file is part of BenchExec, a framework for reliable benchmarking:
# https://github.com/sosy-lab/benchexec
#
# SPDX-FileCopyrightText: 2007-2020 Dirk Beyer <https://www.sosy-lab.org>
#
# SPDX-License-Identifier: Apache-2.0
import benchexec.result as result
import benchexec.tools.template
class Tool(benchexec.t... | # This file is part of BenchExec, a framework for reliable benchmarking:
# https://github.com/sosy-lab/benchexec
#
# SPDX-FileCopyrightText: 2007-2020 Dirk Beyer <https://www.sosy-lab.org>
#
# SPDX-License-Identifier: Apache-2.0
import benchexec.result as result
import benchexec.tools.template
class Tool(benchexec.t... | <commit_before># This file is part of BenchExec, a framework for reliable benchmarking:
# https://github.com/sosy-lab/benchexec
#
# SPDX-FileCopyrightText: 2007-2020 Dirk Beyer <https://www.sosy-lab.org>
#
# SPDX-License-Identifier: Apache-2.0
import benchexec.result as result
import benchexec.tools.template
class T... |
e493d5403de51d8ee448e532d60204041aa88c19 | jedihttp/handlers.py | jedihttp/handlers.py | import bottle
from bottle import response, request
import json
import jedi
import logging
app = bottle.Bottle( __name__ )
logger = logging.getLogger( __name__ )
@app.post( '/healthy' )
def healthy():
return _Json({})
@app.post( '/ready' )
def ready():
return _Json({})
@app.post( '/completions' )
def complet... | import bottle
from bottle import response, request
import json
import jedi
import logging
app = bottle.Bottle( __name__ )
logger = logging.getLogger( __name__ )
@app.post( '/healthy' )
def healthy():
return _Json({'healthy': True})
@app.post( '/ready' )
def ready():
return _Json({'ready': True})
@app.post( ... | Send descriptive responses for /ready and /healthy | Send descriptive responses for /ready and /healthy
| Python | apache-2.0 | vheon/JediHTTP,micbou/JediHTTP,micbou/JediHTTP,vheon/JediHTTP | import bottle
from bottle import response, request
import json
import jedi
import logging
app = bottle.Bottle( __name__ )
logger = logging.getLogger( __name__ )
@app.post( '/healthy' )
def healthy():
return _Json({})
@app.post( '/ready' )
def ready():
return _Json({})
@app.post( '/completions' )
def complet... | import bottle
from bottle import response, request
import json
import jedi
import logging
app = bottle.Bottle( __name__ )
logger = logging.getLogger( __name__ )
@app.post( '/healthy' )
def healthy():
return _Json({'healthy': True})
@app.post( '/ready' )
def ready():
return _Json({'ready': True})
@app.post( ... | <commit_before>import bottle
from bottle import response, request
import json
import jedi
import logging
app = bottle.Bottle( __name__ )
logger = logging.getLogger( __name__ )
@app.post( '/healthy' )
def healthy():
return _Json({})
@app.post( '/ready' )
def ready():
return _Json({})
@app.post( '/completions... | import bottle
from bottle import response, request
import json
import jedi
import logging
app = bottle.Bottle( __name__ )
logger = logging.getLogger( __name__ )
@app.post( '/healthy' )
def healthy():
return _Json({'healthy': True})
@app.post( '/ready' )
def ready():
return _Json({'ready': True})
@app.post( ... | import bottle
from bottle import response, request
import json
import jedi
import logging
app = bottle.Bottle( __name__ )
logger = logging.getLogger( __name__ )
@app.post( '/healthy' )
def healthy():
return _Json({})
@app.post( '/ready' )
def ready():
return _Json({})
@app.post( '/completions' )
def complet... | <commit_before>import bottle
from bottle import response, request
import json
import jedi
import logging
app = bottle.Bottle( __name__ )
logger = logging.getLogger( __name__ )
@app.post( '/healthy' )
def healthy():
return _Json({})
@app.post( '/ready' )
def ready():
return _Json({})
@app.post( '/completions... |
647bfbff75f7356a974fdf3bc98612c12c47a151 | angkot/geo/webapi/views.py | angkot/geo/webapi/views.py | from django.views.decorators.cache import cache_page
from ..models import Province, City
from angkot.common.decorators import wapi
def _province_to_dict(province):
data = dict(pid=province.id,
name=province.name,
code=province.code)
return (province.id, data)
def _city_to_dic... | from django.views.decorators.cache import cache_page
from ..models import Province, City
from angkot.common.decorators import wapi
def _province_to_dict(province):
return dict(pid=province.id,
name=province.name,
code=province.code)
def _city_to_dict(city):
data = dict(cid=ci... | Simplify the province list API | Simplify the province list API
It only contains province data as a list without the separate ordering
information. The order of the province data in the list is the order of
provinces.
| Python | agpl-3.0 | shirone/angkot,angkot/angkot,shirone/angkot,angkot/angkot,angkot/angkot,shirone/angkot,shirone/angkot,angkot/angkot | from django.views.decorators.cache import cache_page
from ..models import Province, City
from angkot.common.decorators import wapi
def _province_to_dict(province):
data = dict(pid=province.id,
name=province.name,
code=province.code)
return (province.id, data)
def _city_to_dic... | from django.views.decorators.cache import cache_page
from ..models import Province, City
from angkot.common.decorators import wapi
def _province_to_dict(province):
return dict(pid=province.id,
name=province.name,
code=province.code)
def _city_to_dict(city):
data = dict(cid=ci... | <commit_before>from django.views.decorators.cache import cache_page
from ..models import Province, City
from angkot.common.decorators import wapi
def _province_to_dict(province):
data = dict(pid=province.id,
name=province.name,
code=province.code)
return (province.id, data)
d... | from django.views.decorators.cache import cache_page
from ..models import Province, City
from angkot.common.decorators import wapi
def _province_to_dict(province):
return dict(pid=province.id,
name=province.name,
code=province.code)
def _city_to_dict(city):
data = dict(cid=ci... | from django.views.decorators.cache import cache_page
from ..models import Province, City
from angkot.common.decorators import wapi
def _province_to_dict(province):
data = dict(pid=province.id,
name=province.name,
code=province.code)
return (province.id, data)
def _city_to_dic... | <commit_before>from django.views.decorators.cache import cache_page
from ..models import Province, City
from angkot.common.decorators import wapi
def _province_to_dict(province):
data = dict(pid=province.id,
name=province.name,
code=province.code)
return (province.id, data)
d... |
60f05c64d60d7db6f05a53548dd0434437bd0719 | accelerator/migrations/0074_update_url_to_community.py | accelerator/migrations/0074_update_url_to_community.py | # Generated by Django 2.2.10 on 2021-11-05 12:29
from django.db import migrations
def update_url_to_community(apps, schema_editor):
people_url = "/people"
mentor_url = "/directory"
community_url = "/community"
SiteRedirectPage = apps.get_model('accelerator', 'SiteRedirectPage')
for siteredirectpage in Site... | # Generated by Django 2.2.10 on 2021-11-05 12:29
from django.db import migrations
from django.db.models.query_utils import Q
def update_url_to_community(apps, schema_editor):
people_url = "/people"
mentor_url = "/directory"
community_url = "/community"
SiteRedirectPage = apps.get_model('accelerator', 'SiteRe... | Fix filter for people and mentor urls | [AC-9046] Fix filter for people and mentor urls
| Python | mit | masschallenge/django-accelerator,masschallenge/django-accelerator | # Generated by Django 2.2.10 on 2021-11-05 12:29
from django.db import migrations
def update_url_to_community(apps, schema_editor):
people_url = "/people"
mentor_url = "/directory"
community_url = "/community"
SiteRedirectPage = apps.get_model('accelerator', 'SiteRedirectPage')
for siteredirectpage in Site... | # Generated by Django 2.2.10 on 2021-11-05 12:29
from django.db import migrations
from django.db.models.query_utils import Q
def update_url_to_community(apps, schema_editor):
people_url = "/people"
mentor_url = "/directory"
community_url = "/community"
SiteRedirectPage = apps.get_model('accelerator', 'SiteRe... | <commit_before># Generated by Django 2.2.10 on 2021-11-05 12:29
from django.db import migrations
def update_url_to_community(apps, schema_editor):
people_url = "/people"
mentor_url = "/directory"
community_url = "/community"
SiteRedirectPage = apps.get_model('accelerator', 'SiteRedirectPage')
for siteredir... | # Generated by Django 2.2.10 on 2021-11-05 12:29
from django.db import migrations
from django.db.models.query_utils import Q
def update_url_to_community(apps, schema_editor):
people_url = "/people"
mentor_url = "/directory"
community_url = "/community"
SiteRedirectPage = apps.get_model('accelerator', 'SiteRe... | # Generated by Django 2.2.10 on 2021-11-05 12:29
from django.db import migrations
def update_url_to_community(apps, schema_editor):
people_url = "/people"
mentor_url = "/directory"
community_url = "/community"
SiteRedirectPage = apps.get_model('accelerator', 'SiteRedirectPage')
for siteredirectpage in Site... | <commit_before># Generated by Django 2.2.10 on 2021-11-05 12:29
from django.db import migrations
def update_url_to_community(apps, schema_editor):
people_url = "/people"
mentor_url = "/directory"
community_url = "/community"
SiteRedirectPage = apps.get_model('accelerator', 'SiteRedirectPage')
for siteredir... |
6c2685fd6701600950d01b8f3ac3de08c0583ec9 | indico/core/extpoint/location.py | indico/core/extpoint/location.py | # -*- coding: utf-8 -*-
##
##
## This file is part of Indico.
## Copyright (C) 2002 - 2014 European Organization for Nuclear Research (CERN).
##
## Indico 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 Foundat... | # This file is part of Indico.
# Copyright (C) 2002 - 2015 European Organization for Nuclear Research (CERN).
#
# Indico is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License as
# published by the Free Software Foundation; either version 3 of the
# License, or (a... | Update header missed by the script | Update header missed by the script
Really, who puts spaces in front of the comments of a file header?!
| Python | mit | DirkHoffmann/indico,mic4ael/indico,DirkHoffmann/indico,ThiefMaster/indico,OmeGak/indico,indico/indico,mvidalgarcia/indico,indico/indico,DirkHoffmann/indico,mic4ael/indico,OmeGak/indico,pferreir/indico,pferreir/indico,mvidalgarcia/indico,indico/indico,indico/indico,ThiefMaster/indico,mvidalgarcia/indico,mic4ael/indico,p... | # -*- coding: utf-8 -*-
##
##
## This file is part of Indico.
## Copyright (C) 2002 - 2014 European Organization for Nuclear Research (CERN).
##
## Indico 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 Foundat... | # This file is part of Indico.
# Copyright (C) 2002 - 2015 European Organization for Nuclear Research (CERN).
#
# Indico is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License as
# published by the Free Software Foundation; either version 3 of the
# License, or (a... | <commit_before> # -*- coding: utf-8 -*-
##
##
## This file is part of Indico.
## Copyright (C) 2002 - 2014 European Organization for Nuclear Research (CERN).
##
## Indico 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 S... | # This file is part of Indico.
# Copyright (C) 2002 - 2015 European Organization for Nuclear Research (CERN).
#
# Indico is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License as
# published by the Free Software Foundation; either version 3 of the
# License, or (a... | # -*- coding: utf-8 -*-
##
##
## This file is part of Indico.
## Copyright (C) 2002 - 2014 European Organization for Nuclear Research (CERN).
##
## Indico 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 Foundat... | <commit_before> # -*- coding: utf-8 -*-
##
##
## This file is part of Indico.
## Copyright (C) 2002 - 2014 European Organization for Nuclear Research (CERN).
##
## Indico 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 S... |
3a2614034ba8b30d58b15f10947284fd487b3b61 | get_lexer.py | get_lexer.py | #!/usr/bin/python
from pygments.lexers import (get_all_lexers)
for lexname, aliases, _, mimetypes in get_all_lexers():
print "%s" % (lexname)
| #!/usr/bin/python
from pygments.lexers import (get_all_lexers)
for lexname, aliases, _, mimetypes in get_all_lexers():
print "%s" % (aliases[0])
| Use first alias as languagename | Use first alias as languagename
| Python | agpl-3.0 | formorer/paste.pl,shlomif/paste.debian.net-paste.pl,formorer/paste.pl,shlomif/paste.debian.net-paste.pl,formorer/paste.pl | #!/usr/bin/python
from pygments.lexers import (get_all_lexers)
for lexname, aliases, _, mimetypes in get_all_lexers():
print "%s" % (lexname)
Use first alias as languagename | #!/usr/bin/python
from pygments.lexers import (get_all_lexers)
for lexname, aliases, _, mimetypes in get_all_lexers():
print "%s" % (aliases[0])
| <commit_before>#!/usr/bin/python
from pygments.lexers import (get_all_lexers)
for lexname, aliases, _, mimetypes in get_all_lexers():
print "%s" % (lexname)
<commit_msg>Use first alias as languagename<commit_after> | #!/usr/bin/python
from pygments.lexers import (get_all_lexers)
for lexname, aliases, _, mimetypes in get_all_lexers():
print "%s" % (aliases[0])
| #!/usr/bin/python
from pygments.lexers import (get_all_lexers)
for lexname, aliases, _, mimetypes in get_all_lexers():
print "%s" % (lexname)
Use first alias as languagename#!/usr/bin/python
from pygments.lexers import (get_all_lexers)
for lexname, aliases, _, mimetypes in get_all_lexers():
print "%s" % (aliases... | <commit_before>#!/usr/bin/python
from pygments.lexers import (get_all_lexers)
for lexname, aliases, _, mimetypes in get_all_lexers():
print "%s" % (lexname)
<commit_msg>Use first alias as languagename<commit_after>#!/usr/bin/python
from pygments.lexers import (get_all_lexers)
for lexname, aliases, _, mimetypes in... |
4d95e5cb938c43cacd14085bf752485334ab6f1a | prf/tests/test_mongodb.py | prf/tests/test_mongodb.py | from prf.tests.prf_testcase import PrfTestCase
from prf.mongodb import get_document_cls
class TestMongoDB(PrfTestCase):
def setUp(self):
super(TestMongoDB, self).setUp()
self.drop_databases()
self.unload_documents()
def test_get_document_cls(self):
cls = self.create_collection... | import mock
from prf.tests.prf_testcase import PrfTestCase
from prf.mongodb import get_document_cls, connect_dataset_aliases
class TestMongoDB(PrfTestCase):
def setUp(self):
super(TestMongoDB, self).setUp()
self.drop_databases()
self.unload_documents()
def test_get_document_cls(self):... | Make sure no crashes happen when no namespaces are set | Make sure no crashes happen when no namespaces are set
| Python | mit | vahana/prf | from prf.tests.prf_testcase import PrfTestCase
from prf.mongodb import get_document_cls
class TestMongoDB(PrfTestCase):
def setUp(self):
super(TestMongoDB, self).setUp()
self.drop_databases()
self.unload_documents()
def test_get_document_cls(self):
cls = self.create_collection... | import mock
from prf.tests.prf_testcase import PrfTestCase
from prf.mongodb import get_document_cls, connect_dataset_aliases
class TestMongoDB(PrfTestCase):
def setUp(self):
super(TestMongoDB, self).setUp()
self.drop_databases()
self.unload_documents()
def test_get_document_cls(self):... | <commit_before>from prf.tests.prf_testcase import PrfTestCase
from prf.mongodb import get_document_cls
class TestMongoDB(PrfTestCase):
def setUp(self):
super(TestMongoDB, self).setUp()
self.drop_databases()
self.unload_documents()
def test_get_document_cls(self):
cls = self.cr... | import mock
from prf.tests.prf_testcase import PrfTestCase
from prf.mongodb import get_document_cls, connect_dataset_aliases
class TestMongoDB(PrfTestCase):
def setUp(self):
super(TestMongoDB, self).setUp()
self.drop_databases()
self.unload_documents()
def test_get_document_cls(self):... | from prf.tests.prf_testcase import PrfTestCase
from prf.mongodb import get_document_cls
class TestMongoDB(PrfTestCase):
def setUp(self):
super(TestMongoDB, self).setUp()
self.drop_databases()
self.unload_documents()
def test_get_document_cls(self):
cls = self.create_collection... | <commit_before>from prf.tests.prf_testcase import PrfTestCase
from prf.mongodb import get_document_cls
class TestMongoDB(PrfTestCase):
def setUp(self):
super(TestMongoDB, self).setUp()
self.drop_databases()
self.unload_documents()
def test_get_document_cls(self):
cls = self.cr... |
8143d0735bce0b542b369d84bf9be02d3e6582b6 | test_queue.py | test_queue.py | from queue import Queue
import pytest
def test_enqueue_first_item():
queue = Queue()
queue.enqueue("Bacon")
assert queue.last_item.data == "Bacon"
def test_enqueue_multi_last_item():
queue = Queue()
queue.enqueue("Bacon")
queue.enqueue("Steak")
queue.enqueue("Beer")
assert queue.firs... | from queue import Queue
import pytest
def test_enqueue_first_item():
queue = Queue()
queue.enqueue("Bacon")
assert queue.last_item.data == "Bacon"
def test_enqueue_multi_last_item():
queue = Queue()
queue.enqueue("Bacon")
queue.enqueue("Steak")
queue.enqueue("Beer")
assert queue.firs... | Add test for dequeue from empty list | Add test for dequeue from empty list
| Python | mit | jwarren116/data-structures | from queue import Queue
import pytest
def test_enqueue_first_item():
queue = Queue()
queue.enqueue("Bacon")
assert queue.last_item.data == "Bacon"
def test_enqueue_multi_last_item():
queue = Queue()
queue.enqueue("Bacon")
queue.enqueue("Steak")
queue.enqueue("Beer")
assert queue.firs... | from queue import Queue
import pytest
def test_enqueue_first_item():
queue = Queue()
queue.enqueue("Bacon")
assert queue.last_item.data == "Bacon"
def test_enqueue_multi_last_item():
queue = Queue()
queue.enqueue("Bacon")
queue.enqueue("Steak")
queue.enqueue("Beer")
assert queue.firs... | <commit_before>from queue import Queue
import pytest
def test_enqueue_first_item():
queue = Queue()
queue.enqueue("Bacon")
assert queue.last_item.data == "Bacon"
def test_enqueue_multi_last_item():
queue = Queue()
queue.enqueue("Bacon")
queue.enqueue("Steak")
queue.enqueue("Beer")
as... | from queue import Queue
import pytest
def test_enqueue_first_item():
queue = Queue()
queue.enqueue("Bacon")
assert queue.last_item.data == "Bacon"
def test_enqueue_multi_last_item():
queue = Queue()
queue.enqueue("Bacon")
queue.enqueue("Steak")
queue.enqueue("Beer")
assert queue.firs... | from queue import Queue
import pytest
def test_enqueue_first_item():
queue = Queue()
queue.enqueue("Bacon")
assert queue.last_item.data == "Bacon"
def test_enqueue_multi_last_item():
queue = Queue()
queue.enqueue("Bacon")
queue.enqueue("Steak")
queue.enqueue("Beer")
assert queue.firs... | <commit_before>from queue import Queue
import pytest
def test_enqueue_first_item():
queue = Queue()
queue.enqueue("Bacon")
assert queue.last_item.data == "Bacon"
def test_enqueue_multi_last_item():
queue = Queue()
queue.enqueue("Bacon")
queue.enqueue("Steak")
queue.enqueue("Beer")
as... |
60ac75f10f7e74aea5636651de05b7bedd4f2be2 | tests/main.py | tests/main.py | import json
import unittest
import requests
import validators
class DomainsTests(unittest.TestCase):
def test_json_is_valid(self):
with open("../world_universities_and_domains.json") as json_file:
valid_json = json.load(json_file)
for university in valid_json:
self.assertIn(... | import json
import unittest
import requests
import validators
class DomainsTests(unittest.TestCase):
def test_json_is_valid(self):
with open("../world_universities_and_domains.json") as json_file:
valid_json = json.load(json_file)
for university in valid_json:
self.assertIn(... | Remove URL test due to bad validator | Remove URL test due to bad validator
| Python | mit | Hipo/university-domains-list | import json
import unittest
import requests
import validators
class DomainsTests(unittest.TestCase):
def test_json_is_valid(self):
with open("../world_universities_and_domains.json") as json_file:
valid_json = json.load(json_file)
for university in valid_json:
self.assertIn(... | import json
import unittest
import requests
import validators
class DomainsTests(unittest.TestCase):
def test_json_is_valid(self):
with open("../world_universities_and_domains.json") as json_file:
valid_json = json.load(json_file)
for university in valid_json:
self.assertIn(... | <commit_before>import json
import unittest
import requests
import validators
class DomainsTests(unittest.TestCase):
def test_json_is_valid(self):
with open("../world_universities_and_domains.json") as json_file:
valid_json = json.load(json_file)
for university in valid_json:
... | import json
import unittest
import requests
import validators
class DomainsTests(unittest.TestCase):
def test_json_is_valid(self):
with open("../world_universities_and_domains.json") as json_file:
valid_json = json.load(json_file)
for university in valid_json:
self.assertIn(... | import json
import unittest
import requests
import validators
class DomainsTests(unittest.TestCase):
def test_json_is_valid(self):
with open("../world_universities_and_domains.json") as json_file:
valid_json = json.load(json_file)
for university in valid_json:
self.assertIn(... | <commit_before>import json
import unittest
import requests
import validators
class DomainsTests(unittest.TestCase):
def test_json_is_valid(self):
with open("../world_universities_and_domains.json") as json_file:
valid_json = json.load(json_file)
for university in valid_json:
... |
6a379b806dd1992ad3dd2b728878ed35e8d0ea3c | cdf/utils.py | cdf/utils.py | def get_major_dot_minor_version(version):
"""
Convert full VERSION Django tuple to
a dotted string containing MAJOR.MINOR.
For example, (1, 9, 3, 'final', 0) will result in '1.9'
"""
return '.'.join(version.split('.')[:2])
| def get_major_dot_minor_version(version):
"""
Convert full VERSION Django tuple to
a dotted string containing MAJOR.MINOR.
For example, (1, 9, 3, 'final', 0) will result in '1.9'
"""
return '.'.join([str(v) for v in version[:2]])
| Fix getting major.minor django version | Fix getting major.minor django version
| Python | mit | ana-balica/classy-django-forms,ana-balica/classy-django-forms,ana-balica/classy-django-forms | def get_major_dot_minor_version(version):
"""
Convert full VERSION Django tuple to
a dotted string containing MAJOR.MINOR.
For example, (1, 9, 3, 'final', 0) will result in '1.9'
"""
return '.'.join(version.split('.')[:2])
Fix getting major.minor django version | def get_major_dot_minor_version(version):
"""
Convert full VERSION Django tuple to
a dotted string containing MAJOR.MINOR.
For example, (1, 9, 3, 'final', 0) will result in '1.9'
"""
return '.'.join([str(v) for v in version[:2]])
| <commit_before>def get_major_dot_minor_version(version):
"""
Convert full VERSION Django tuple to
a dotted string containing MAJOR.MINOR.
For example, (1, 9, 3, 'final', 0) will result in '1.9'
"""
return '.'.join(version.split('.')[:2])
<commit_msg>Fix getting major.minor django version<commit... | def get_major_dot_minor_version(version):
"""
Convert full VERSION Django tuple to
a dotted string containing MAJOR.MINOR.
For example, (1, 9, 3, 'final', 0) will result in '1.9'
"""
return '.'.join([str(v) for v in version[:2]])
| def get_major_dot_minor_version(version):
"""
Convert full VERSION Django tuple to
a dotted string containing MAJOR.MINOR.
For example, (1, 9, 3, 'final', 0) will result in '1.9'
"""
return '.'.join(version.split('.')[:2])
Fix getting major.minor django versiondef get_major_dot_minor_version(ve... | <commit_before>def get_major_dot_minor_version(version):
"""
Convert full VERSION Django tuple to
a dotted string containing MAJOR.MINOR.
For example, (1, 9, 3, 'final', 0) will result in '1.9'
"""
return '.'.join(version.split('.')[:2])
<commit_msg>Fix getting major.minor django version<commit... |
8be84789d561c916b6d37e61537c4d957061a380 | diceserver.py | diceserver.py | #!/usr/bin/env python
import random
from twisted.protocols import amp
port = 1234
_rand = random.Random()
class RollDice(amp.Command):
arguments = [('sides', amp.Integer())]
response = [('result', amp.Integer())]
class Dice(amp.AMP):
def roll(self, sides=6):
"""Return a random integer from 1... | #!/usr/bin/env python
import random
from twisted.protocols import amp
from twisted.internet import reactor
from twisted.internet.protocol import Factory
from twisted.python import usage
port = 1234
_rand = random.Random()
class Options(usage.Options):
optParameters = [
["port", "p", port, "server port"... | Add command-line option to set port. | Add command-line option to set port.
| Python | mit | dripton/ampchat | #!/usr/bin/env python
import random
from twisted.protocols import amp
port = 1234
_rand = random.Random()
class RollDice(amp.Command):
arguments = [('sides', amp.Integer())]
response = [('result', amp.Integer())]
class Dice(amp.AMP):
def roll(self, sides=6):
"""Return a random integer from 1... | #!/usr/bin/env python
import random
from twisted.protocols import amp
from twisted.internet import reactor
from twisted.internet.protocol import Factory
from twisted.python import usage
port = 1234
_rand = random.Random()
class Options(usage.Options):
optParameters = [
["port", "p", port, "server port"... | <commit_before>#!/usr/bin/env python
import random
from twisted.protocols import amp
port = 1234
_rand = random.Random()
class RollDice(amp.Command):
arguments = [('sides', amp.Integer())]
response = [('result', amp.Integer())]
class Dice(amp.AMP):
def roll(self, sides=6):
"""Return a random... | #!/usr/bin/env python
import random
from twisted.protocols import amp
from twisted.internet import reactor
from twisted.internet.protocol import Factory
from twisted.python import usage
port = 1234
_rand = random.Random()
class Options(usage.Options):
optParameters = [
["port", "p", port, "server port"... | #!/usr/bin/env python
import random
from twisted.protocols import amp
port = 1234
_rand = random.Random()
class RollDice(amp.Command):
arguments = [('sides', amp.Integer())]
response = [('result', amp.Integer())]
class Dice(amp.AMP):
def roll(self, sides=6):
"""Return a random integer from 1... | <commit_before>#!/usr/bin/env python
import random
from twisted.protocols import amp
port = 1234
_rand = random.Random()
class RollDice(amp.Command):
arguments = [('sides', amp.Integer())]
response = [('result', amp.Integer())]
class Dice(amp.AMP):
def roll(self, sides=6):
"""Return a random... |
7ec36c81c6437bf83c498661c07802500e3acaa6 | gore/urls.py | gore/urls.py | import os
from django.conf.urls import include, url
from lepo.router import Router
from lepo.validate import validate_router
import gore.handlers.events
import gore.handlers.projects
import gore.handlers.store
router = Router.from_file(os.path.join(os.path.dirname(__file__), 'swagger.yaml'))
router.add_handlers(gore... | import os
from django.conf.urls import include, url
from lepo.decorators import csrf_exempt
from lepo.router import Router
from lepo.validate import validate_router
import gore.handlers.events
import gore.handlers.projects
import gore.handlers.store
router = Router.from_file(os.path.join(os.path.dirname(__file__), ... | Use Lepo 0.1.0's CSRF decorator | Gore: Use Lepo 0.1.0's CSRF decorator
| Python | mit | akx/gentry,akx/gentry,akx/gentry,akx/gentry | import os
from django.conf.urls import include, url
from lepo.router import Router
from lepo.validate import validate_router
import gore.handlers.events
import gore.handlers.projects
import gore.handlers.store
router = Router.from_file(os.path.join(os.path.dirname(__file__), 'swagger.yaml'))
router.add_handlers(gore... | import os
from django.conf.urls import include, url
from lepo.decorators import csrf_exempt
from lepo.router import Router
from lepo.validate import validate_router
import gore.handlers.events
import gore.handlers.projects
import gore.handlers.store
router = Router.from_file(os.path.join(os.path.dirname(__file__), ... | <commit_before>import os
from django.conf.urls import include, url
from lepo.router import Router
from lepo.validate import validate_router
import gore.handlers.events
import gore.handlers.projects
import gore.handlers.store
router = Router.from_file(os.path.join(os.path.dirname(__file__), 'swagger.yaml'))
router.ad... | import os
from django.conf.urls import include, url
from lepo.decorators import csrf_exempt
from lepo.router import Router
from lepo.validate import validate_router
import gore.handlers.events
import gore.handlers.projects
import gore.handlers.store
router = Router.from_file(os.path.join(os.path.dirname(__file__), ... | import os
from django.conf.urls import include, url
from lepo.router import Router
from lepo.validate import validate_router
import gore.handlers.events
import gore.handlers.projects
import gore.handlers.store
router = Router.from_file(os.path.join(os.path.dirname(__file__), 'swagger.yaml'))
router.add_handlers(gore... | <commit_before>import os
from django.conf.urls import include, url
from lepo.router import Router
from lepo.validate import validate_router
import gore.handlers.events
import gore.handlers.projects
import gore.handlers.store
router = Router.from_file(os.path.join(os.path.dirname(__file__), 'swagger.yaml'))
router.ad... |
50510c800e7510b0f918553f0c479a10b3a72deb | projections/simpleexpr.py | projections/simpleexpr.py |
import numpy as np
import numpy.ma as ma
import projections.r2py.reval as reval
import projections.r2py.rparser as rparser
class SimpleExpr():
def __init__(self, name, expr):
self.name = name
self.tree = reval.make_inputs(rparser.parse(expr))
lokals = {}
exec(reval.to_py(self.tree, name), lokals)
... |
import numpy as np
import numpy.ma as ma
import projections.r2py.reval as reval
import projections.r2py.rparser as rparser
class SimpleExpr():
def __init__(self, name, expr):
self.name = name
self.tree = reval.make_inputs(rparser.parse(expr))
lokals = {}
exec(reval.to_py(self.tree, name), lokals)
... | Revert "Improve determination of array shape for constant expressions" | Revert "Improve determination of array shape for constant expressions"
This reverts commit c8c9c42f14c742c6fcb180b7a3cc1bab1655ac46.
| Python | apache-2.0 | ricardog/raster-project,ricardog/raster-project,ricardog/raster-project,ricardog/raster-project,ricardog/raster-project |
import numpy as np
import numpy.ma as ma
import projections.r2py.reval as reval
import projections.r2py.rparser as rparser
class SimpleExpr():
def __init__(self, name, expr):
self.name = name
self.tree = reval.make_inputs(rparser.parse(expr))
lokals = {}
exec(reval.to_py(self.tree, name), lokals)
... |
import numpy as np
import numpy.ma as ma
import projections.r2py.reval as reval
import projections.r2py.rparser as rparser
class SimpleExpr():
def __init__(self, name, expr):
self.name = name
self.tree = reval.make_inputs(rparser.parse(expr))
lokals = {}
exec(reval.to_py(self.tree, name), lokals)
... | <commit_before>
import numpy as np
import numpy.ma as ma
import projections.r2py.reval as reval
import projections.r2py.rparser as rparser
class SimpleExpr():
def __init__(self, name, expr):
self.name = name
self.tree = reval.make_inputs(rparser.parse(expr))
lokals = {}
exec(reval.to_py(self.tree, n... |
import numpy as np
import numpy.ma as ma
import projections.r2py.reval as reval
import projections.r2py.rparser as rparser
class SimpleExpr():
def __init__(self, name, expr):
self.name = name
self.tree = reval.make_inputs(rparser.parse(expr))
lokals = {}
exec(reval.to_py(self.tree, name), lokals)
... |
import numpy as np
import numpy.ma as ma
import projections.r2py.reval as reval
import projections.r2py.rparser as rparser
class SimpleExpr():
def __init__(self, name, expr):
self.name = name
self.tree = reval.make_inputs(rparser.parse(expr))
lokals = {}
exec(reval.to_py(self.tree, name), lokals)
... | <commit_before>
import numpy as np
import numpy.ma as ma
import projections.r2py.reval as reval
import projections.r2py.rparser as rparser
class SimpleExpr():
def __init__(self, name, expr):
self.name = name
self.tree = reval.make_inputs(rparser.parse(expr))
lokals = {}
exec(reval.to_py(self.tree, n... |
cf170e9eb489680366d1608db8fd69d781ae65f5 | thinc/loss.py | thinc/loss.py | import numpy
def categorical_crossentropy(scores, labels):
target = numpy.zeros(scores.shape, dtype='float32')
loss = 0.
for i in range(len(labels)):
target[i, int(labels[i])] = 1.
loss += (1.0-scores[i, int(labels[i])])**2
return scores - target, loss
| import numpy
try:
from cupy import get_array_module
except ImportError:
def get_array_module(*a, **k):
return numpy
def categorical_crossentropy(scores, labels):
xp = get_array_module(scores)
target = xp.zeros(scores.shape, dtype='float32')
loss = 0.
for i in range(len(labels)):
... | Use one-hot representation in categorical cross-entropy | Use one-hot representation in categorical cross-entropy
| Python | mit | explosion/thinc,explosion/thinc,spacy-io/thinc,spacy-io/thinc,explosion/thinc,explosion/thinc,spacy-io/thinc | import numpy
def categorical_crossentropy(scores, labels):
target = numpy.zeros(scores.shape, dtype='float32')
loss = 0.
for i in range(len(labels)):
target[i, int(labels[i])] = 1.
loss += (1.0-scores[i, int(labels[i])])**2
return scores - target, loss
Use one-hot representation in cat... | import numpy
try:
from cupy import get_array_module
except ImportError:
def get_array_module(*a, **k):
return numpy
def categorical_crossentropy(scores, labels):
xp = get_array_module(scores)
target = xp.zeros(scores.shape, dtype='float32')
loss = 0.
for i in range(len(labels)):
... | <commit_before>import numpy
def categorical_crossentropy(scores, labels):
target = numpy.zeros(scores.shape, dtype='float32')
loss = 0.
for i in range(len(labels)):
target[i, int(labels[i])] = 1.
loss += (1.0-scores[i, int(labels[i])])**2
return scores - target, loss
<commit_msg>Use on... | import numpy
try:
from cupy import get_array_module
except ImportError:
def get_array_module(*a, **k):
return numpy
def categorical_crossentropy(scores, labels):
xp = get_array_module(scores)
target = xp.zeros(scores.shape, dtype='float32')
loss = 0.
for i in range(len(labels)):
... | import numpy
def categorical_crossentropy(scores, labels):
target = numpy.zeros(scores.shape, dtype='float32')
loss = 0.
for i in range(len(labels)):
target[i, int(labels[i])] = 1.
loss += (1.0-scores[i, int(labels[i])])**2
return scores - target, loss
Use one-hot representation in cat... | <commit_before>import numpy
def categorical_crossentropy(scores, labels):
target = numpy.zeros(scores.shape, dtype='float32')
loss = 0.
for i in range(len(labels)):
target[i, int(labels[i])] = 1.
loss += (1.0-scores[i, int(labels[i])])**2
return scores - target, loss
<commit_msg>Use on... |
81112afb181e88a87b3399b8f7a1f0462ab382cc | kparcel/constants.py | kparcel/constants.py | PARSER_REQUEST_HEADER_USER_AGENT = 'Mozilla/5.0 (Windows NT 6.1; WOW64; rv:2.0) Gecko/20100101 Firefox/4.0'
PARSER_RESULT_PARCEL = 'parcel'
PARSER_RESULT_TRACKS = 'tracks'
| PARSER_REQUEST_HEADER_USER_AGENT = 'Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; Trident/5.0)'
PARSER_RESULT_PARCEL = 'parcel'
PARSER_RESULT_TRACKS = 'tracks'
| Fix the default user-agent correctly | Constants: Fix the default user-agent correctly
| Python | bsd-2-clause | iBluemind/armatis | PARSER_REQUEST_HEADER_USER_AGENT = 'Mozilla/5.0 (Windows NT 6.1; WOW64; rv:2.0) Gecko/20100101 Firefox/4.0'
PARSER_RESULT_PARCEL = 'parcel'
PARSER_RESULT_TRACKS = 'tracks'
Constants: Fix the default user-agent correctly | PARSER_REQUEST_HEADER_USER_AGENT = 'Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; Trident/5.0)'
PARSER_RESULT_PARCEL = 'parcel'
PARSER_RESULT_TRACKS = 'tracks'
| <commit_before>PARSER_REQUEST_HEADER_USER_AGENT = 'Mozilla/5.0 (Windows NT 6.1; WOW64; rv:2.0) Gecko/20100101 Firefox/4.0'
PARSER_RESULT_PARCEL = 'parcel'
PARSER_RESULT_TRACKS = 'tracks'
<commit_msg>Constants: Fix the default user-agent correctly<commit_after> | PARSER_REQUEST_HEADER_USER_AGENT = 'Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; Trident/5.0)'
PARSER_RESULT_PARCEL = 'parcel'
PARSER_RESULT_TRACKS = 'tracks'
| PARSER_REQUEST_HEADER_USER_AGENT = 'Mozilla/5.0 (Windows NT 6.1; WOW64; rv:2.0) Gecko/20100101 Firefox/4.0'
PARSER_RESULT_PARCEL = 'parcel'
PARSER_RESULT_TRACKS = 'tracks'
Constants: Fix the default user-agent correctlyPARSER_REQUEST_HEADER_USER_AGENT = 'Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; Trident/5.0)'... | <commit_before>PARSER_REQUEST_HEADER_USER_AGENT = 'Mozilla/5.0 (Windows NT 6.1; WOW64; rv:2.0) Gecko/20100101 Firefox/4.0'
PARSER_RESULT_PARCEL = 'parcel'
PARSER_RESULT_TRACKS = 'tracks'
<commit_msg>Constants: Fix the default user-agent correctly<commit_after>PARSER_REQUEST_HEADER_USER_AGENT = 'Mozilla/5.0 (compatible... |
d81d17b3ef7819cf70c302f36afab32ae33e66a9 | asyncmongo/__init__.py | asyncmongo/__init__.py | #!/bin/env python
#
# Copyright 2010 bit.ly
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed... | #!/bin/env python
#
# Copyright 2010 bit.ly
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed... | Support Sort Order For TEXT Index | Support Sort Order For TEXT Index
| Python | apache-2.0 | RealGeeks/asyncmongo | #!/bin/env python
#
# Copyright 2010 bit.ly
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed... | #!/bin/env python
#
# Copyright 2010 bit.ly
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed... | <commit_before>#!/bin/env python
#
# Copyright 2010 bit.ly
#
# 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 applicabl... | #!/bin/env python
#
# Copyright 2010 bit.ly
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed... | #!/bin/env python
#
# Copyright 2010 bit.ly
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed... | <commit_before>#!/bin/env python
#
# Copyright 2010 bit.ly
#
# 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 applicabl... |
b73dbb1a352f06092d8d0a869363eb8ddc0922e5 | i3pystatus/updates/dnf.py | i3pystatus/updates/dnf.py | from i3pystatus.core.command import run_through_shell
from i3pystatus.updates import Backend
from re import split, sub
class Dnf(Backend):
"""
Gets updates for RPM-based distributions with `dnf check-update`.
The notification body consists of the status line followed by the package
name and version f... | from i3pystatus.core.command import run_through_shell
from i3pystatus.updates import Backend
from re import split, sub
class Dnf(Backend):
"""
Gets updates for RPM-based distributions with `dnf check-update`.
The notification body consists of the status line followed by the package
name and version f... | Return early if the check threw an error. | Return early if the check threw an error.
| Python | mit | Arvedui/i3pystatus,yang-ling/i3pystatus,m45t3r/i3pystatus,Arvedui/i3pystatus,yang-ling/i3pystatus,m45t3r/i3pystatus,teto/i3pystatus,drwahl/i3pystatus,fmarchenko/i3pystatus,facetoe/i3pystatus,schroeji/i3pystatus,ncoop/i3pystatus,drwahl/i3pystatus,richese/i3pystatus,richese/i3pystatus,schroeji/i3pystatus,teto/i3pystatus,... | from i3pystatus.core.command import run_through_shell
from i3pystatus.updates import Backend
from re import split, sub
class Dnf(Backend):
"""
Gets updates for RPM-based distributions with `dnf check-update`.
The notification body consists of the status line followed by the package
name and version f... | from i3pystatus.core.command import run_through_shell
from i3pystatus.updates import Backend
from re import split, sub
class Dnf(Backend):
"""
Gets updates for RPM-based distributions with `dnf check-update`.
The notification body consists of the status line followed by the package
name and version f... | <commit_before>from i3pystatus.core.command import run_through_shell
from i3pystatus.updates import Backend
from re import split, sub
class Dnf(Backend):
"""
Gets updates for RPM-based distributions with `dnf check-update`.
The notification body consists of the status line followed by the package
nam... | from i3pystatus.core.command import run_through_shell
from i3pystatus.updates import Backend
from re import split, sub
class Dnf(Backend):
"""
Gets updates for RPM-based distributions with `dnf check-update`.
The notification body consists of the status line followed by the package
name and version f... | from i3pystatus.core.command import run_through_shell
from i3pystatus.updates import Backend
from re import split, sub
class Dnf(Backend):
"""
Gets updates for RPM-based distributions with `dnf check-update`.
The notification body consists of the status line followed by the package
name and version f... | <commit_before>from i3pystatus.core.command import run_through_shell
from i3pystatus.updates import Backend
from re import split, sub
class Dnf(Backend):
"""
Gets updates for RPM-based distributions with `dnf check-update`.
The notification body consists of the status line followed by the package
nam... |
8571f61a20f9ef536040c3101e24c48640a72f6a | iss/admin.py | iss/admin.py | from django.contrib import admin
from .models import Organization
class OrganizationAdmin(admin.ModelAdmin):
list_display = ('account_num', 'org_name', 'city', 'state', 'country_iso')
search_fields = ('org_name', 'account_num')
admin.site.register(Organization, OrganizationAdmin)
| from django.contrib import admin
from .models import Organization
class OrganizationAdmin(admin.ModelAdmin):
list_display = ('membersuite_id', 'account_num', 'org_name', 'city',
'state', 'country_iso')
search_fields = ('org_name', 'membersuite_id', 'account_num')
admin.site.register(Organization, Organ... | Add membersuite ID to display and search | Add membersuite ID to display and search
| Python | mit | AASHE/iss | from django.contrib import admin
from .models import Organization
class OrganizationAdmin(admin.ModelAdmin):
list_display = ('account_num', 'org_name', 'city', 'state', 'country_iso')
search_fields = ('org_name', 'account_num')
admin.site.register(Organization, OrganizationAdmin)
Add membersuite ID to display ... | from django.contrib import admin
from .models import Organization
class OrganizationAdmin(admin.ModelAdmin):
list_display = ('membersuite_id', 'account_num', 'org_name', 'city',
'state', 'country_iso')
search_fields = ('org_name', 'membersuite_id', 'account_num')
admin.site.register(Organization, Organ... | <commit_before>from django.contrib import admin
from .models import Organization
class OrganizationAdmin(admin.ModelAdmin):
list_display = ('account_num', 'org_name', 'city', 'state', 'country_iso')
search_fields = ('org_name', 'account_num')
admin.site.register(Organization, OrganizationAdmin)
<commit_msg>Add... | from django.contrib import admin
from .models import Organization
class OrganizationAdmin(admin.ModelAdmin):
list_display = ('membersuite_id', 'account_num', 'org_name', 'city',
'state', 'country_iso')
search_fields = ('org_name', 'membersuite_id', 'account_num')
admin.site.register(Organization, Organ... | from django.contrib import admin
from .models import Organization
class OrganizationAdmin(admin.ModelAdmin):
list_display = ('account_num', 'org_name', 'city', 'state', 'country_iso')
search_fields = ('org_name', 'account_num')
admin.site.register(Organization, OrganizationAdmin)
Add membersuite ID to display ... | <commit_before>from django.contrib import admin
from .models import Organization
class OrganizationAdmin(admin.ModelAdmin):
list_display = ('account_num', 'org_name', 'city', 'state', 'country_iso')
search_fields = ('org_name', 'account_num')
admin.site.register(Organization, OrganizationAdmin)
<commit_msg>Add... |
e508bdfa034516cd3d9e530bc4a688c20cf65ea3 | test/conftest.py | test/conftest.py | from os.path import dirname, join
import sys
import django
import django.conf
def pytest_configure():
example_path = join(dirname(dirname(__file__)), 'example')
if example_path not in sys.path:
sys.path.insert(0, example_path)
settings = {
'DEBUG': True,
'MIDDLEWARE_CLASSES': [
... | from os.path import dirname, join
import sys
import django
import django.conf
def pytest_configure():
example_path = join(dirname(dirname(__file__)), 'example')
if example_path not in sys.path:
sys.path.insert(0, example_path)
settings = {
'ALLOWED_HOSTS': ['testserver'],
'DEBUG':... | Fix tests under Django >= 1.10.3 | Fix tests under Django >= 1.10.3
See "DNS rebinding vulnerability when DEBUG=True"
in Django 1.10.3 release notes:
https://docs.djangoproject.com/en/1.10/releases/1.10.3/
| Python | mit | vfaronov/django-httpolice,vfaronov/django-httpolice | from os.path import dirname, join
import sys
import django
import django.conf
def pytest_configure():
example_path = join(dirname(dirname(__file__)), 'example')
if example_path not in sys.path:
sys.path.insert(0, example_path)
settings = {
'DEBUG': True,
'MIDDLEWARE_CLASSES': [
... | from os.path import dirname, join
import sys
import django
import django.conf
def pytest_configure():
example_path = join(dirname(dirname(__file__)), 'example')
if example_path not in sys.path:
sys.path.insert(0, example_path)
settings = {
'ALLOWED_HOSTS': ['testserver'],
'DEBUG':... | <commit_before>from os.path import dirname, join
import sys
import django
import django.conf
def pytest_configure():
example_path = join(dirname(dirname(__file__)), 'example')
if example_path not in sys.path:
sys.path.insert(0, example_path)
settings = {
'DEBUG': True,
'MIDDLEWARE... | from os.path import dirname, join
import sys
import django
import django.conf
def pytest_configure():
example_path = join(dirname(dirname(__file__)), 'example')
if example_path not in sys.path:
sys.path.insert(0, example_path)
settings = {
'ALLOWED_HOSTS': ['testserver'],
'DEBUG':... | from os.path import dirname, join
import sys
import django
import django.conf
def pytest_configure():
example_path = join(dirname(dirname(__file__)), 'example')
if example_path not in sys.path:
sys.path.insert(0, example_path)
settings = {
'DEBUG': True,
'MIDDLEWARE_CLASSES': [
... | <commit_before>from os.path import dirname, join
import sys
import django
import django.conf
def pytest_configure():
example_path = join(dirname(dirname(__file__)), 'example')
if example_path not in sys.path:
sys.path.insert(0, example_path)
settings = {
'DEBUG': True,
'MIDDLEWARE... |
79ed8bdb4f328a0d9949e75f4aa5a4f60ab9305d | libqtile/widget/currentlayout.py | libqtile/widget/currentlayout.py | import base
from .. import manager, bar, hook
class CurrentLayout(base._TextBox):
defaults = manager.Defaults(
("font", "Arial", "Text font"),
("fontsize", None, "Font pixel size. Calculated if None."),
("padding", None, "Padding left and right. Calculated if None."),
("background"... | import base
from .. import manager, bar, hook
class CurrentLayout(base._TextBox):
defaults = manager.Defaults(
("font", "Arial", "Text font"),
("fontsize", None, "Font pixel size. Calculated if None."),
("padding", None, "Padding left and right. Calculated if None."),
("background"... | Add click support on layout widget | Add click support on layout widget
| Python | mit | w1ndy/qtile,kseistrup/qtile,soulchainer/qtile,jdowner/qtile,tych0/qtile,cortesi/qtile,kiniou/qtile,aniruddhkanojia/qtile,apinsard/qtile,de-vri-es/qtile,xplv/qtile,apinsard/qtile,jdowner/qtile,encukou/qtile,frostidaho/qtile,tych0/qtile,encukou/qtile,rxcomm/qtile,StephenBarnes/qtile,andrewyoung1991/qtile,rxcomm/qtile,ram... | import base
from .. import manager, bar, hook
class CurrentLayout(base._TextBox):
defaults = manager.Defaults(
("font", "Arial", "Text font"),
("fontsize", None, "Font pixel size. Calculated if None."),
("padding", None, "Padding left and right. Calculated if None."),
("background"... | import base
from .. import manager, bar, hook
class CurrentLayout(base._TextBox):
defaults = manager.Defaults(
("font", "Arial", "Text font"),
("fontsize", None, "Font pixel size. Calculated if None."),
("padding", None, "Padding left and right. Calculated if None."),
("background"... | <commit_before>import base
from .. import manager, bar, hook
class CurrentLayout(base._TextBox):
defaults = manager.Defaults(
("font", "Arial", "Text font"),
("fontsize", None, "Font pixel size. Calculated if None."),
("padding", None, "Padding left and right. Calculated if None."),
... | import base
from .. import manager, bar, hook
class CurrentLayout(base._TextBox):
defaults = manager.Defaults(
("font", "Arial", "Text font"),
("fontsize", None, "Font pixel size. Calculated if None."),
("padding", None, "Padding left and right. Calculated if None."),
("background"... | import base
from .. import manager, bar, hook
class CurrentLayout(base._TextBox):
defaults = manager.Defaults(
("font", "Arial", "Text font"),
("fontsize", None, "Font pixel size. Calculated if None."),
("padding", None, "Padding left and right. Calculated if None."),
("background"... | <commit_before>import base
from .. import manager, bar, hook
class CurrentLayout(base._TextBox):
defaults = manager.Defaults(
("font", "Arial", "Text font"),
("fontsize", None, "Font pixel size. Calculated if None."),
("padding", None, "Padding left and right. Calculated if None."),
... |
893e52b16ea7998db1418dab8a10467a1f891289 | forms.py | forms.py | from flask_wtf import Form
from flask_wtf.csrf import CsrfProtect
from wtforms import StringField, IntegerField, SelectField, BooleanField
csrf = CsrfProtect()
class Submission(Form):
submission = StringField('Submission URL')
comments = BooleanField('Include comments')
comments_style = SelectField('Comm... | from flask_wtf import FlaskForm
from flask_wtf.csrf import CsrfProtect
from wtforms import StringField, IntegerField, SelectField, BooleanField
csrf = CsrfProtect()
class Submission(FlaskForm):
submission = StringField('Submission URL')
comments = BooleanField('Include comments')
comments_style = SelectF... | Migrate from Form to FlaskForm | Migrate from Form to FlaskForm
| Python | mit | JamieMagee/reddit2kindle,JamieMagee/reddit2kindle | from flask_wtf import Form
from flask_wtf.csrf import CsrfProtect
from wtforms import StringField, IntegerField, SelectField, BooleanField
csrf = CsrfProtect()
class Submission(Form):
submission = StringField('Submission URL')
comments = BooleanField('Include comments')
comments_style = SelectField('Comm... | from flask_wtf import FlaskForm
from flask_wtf.csrf import CsrfProtect
from wtforms import StringField, IntegerField, SelectField, BooleanField
csrf = CsrfProtect()
class Submission(FlaskForm):
submission = StringField('Submission URL')
comments = BooleanField('Include comments')
comments_style = SelectF... | <commit_before>from flask_wtf import Form
from flask_wtf.csrf import CsrfProtect
from wtforms import StringField, IntegerField, SelectField, BooleanField
csrf = CsrfProtect()
class Submission(Form):
submission = StringField('Submission URL')
comments = BooleanField('Include comments')
comments_style = Se... | from flask_wtf import FlaskForm
from flask_wtf.csrf import CsrfProtect
from wtforms import StringField, IntegerField, SelectField, BooleanField
csrf = CsrfProtect()
class Submission(FlaskForm):
submission = StringField('Submission URL')
comments = BooleanField('Include comments')
comments_style = SelectF... | from flask_wtf import Form
from flask_wtf.csrf import CsrfProtect
from wtforms import StringField, IntegerField, SelectField, BooleanField
csrf = CsrfProtect()
class Submission(Form):
submission = StringField('Submission URL')
comments = BooleanField('Include comments')
comments_style = SelectField('Comm... | <commit_before>from flask_wtf import Form
from flask_wtf.csrf import CsrfProtect
from wtforms import StringField, IntegerField, SelectField, BooleanField
csrf = CsrfProtect()
class Submission(Form):
submission = StringField('Submission URL')
comments = BooleanField('Include comments')
comments_style = Se... |
18e3c3f716863b1cc259800592a07a89844d4bf8 | appvalidator/testcases/scripting.py | appvalidator/testcases/scripting.py | import javascript.traverser as traverser
from javascript.spidermonkey import get_tree
from appvalidator.constants import SPIDERMONKEY_INSTALLATION
from ..contextgenerator import ContextGenerator
def test_js_file(err, filename, data, line=0, context=None):
"Tests a JS file by parsing and analyzing its tokens"
... | import javascript.traverser as traverser
from javascript.spidermonkey import get_tree
from appvalidator.constants import SPIDERMONKEY_INSTALLATION
from ..contextgenerator import ContextGenerator
def test_js_file(err, filename, data, line=0, context=None):
"Tests a JS file by parsing and analyzing its tokens"
... | Add information about JS test status to metadata | Add information about JS test status to metadata | Python | bsd-3-clause | mozilla/app-validator,stasm/app-validator,diox/app-validator,eviljeff/app-validator,eviljeff/app-validator,diox/app-validator,mstriemer/app-validator,diox/app-validator,eviljeff/app-validator,mstriemer/app-validator,mozilla/app-validator,diox/app-validator,mozilla/app-validator,stasm/app-validator,stasm/app-validator,e... | import javascript.traverser as traverser
from javascript.spidermonkey import get_tree
from appvalidator.constants import SPIDERMONKEY_INSTALLATION
from ..contextgenerator import ContextGenerator
def test_js_file(err, filename, data, line=0, context=None):
"Tests a JS file by parsing and analyzing its tokens"
... | import javascript.traverser as traverser
from javascript.spidermonkey import get_tree
from appvalidator.constants import SPIDERMONKEY_INSTALLATION
from ..contextgenerator import ContextGenerator
def test_js_file(err, filename, data, line=0, context=None):
"Tests a JS file by parsing and analyzing its tokens"
... | <commit_before>import javascript.traverser as traverser
from javascript.spidermonkey import get_tree
from appvalidator.constants import SPIDERMONKEY_INSTALLATION
from ..contextgenerator import ContextGenerator
def test_js_file(err, filename, data, line=0, context=None):
"Tests a JS file by parsing and analyzing i... | import javascript.traverser as traverser
from javascript.spidermonkey import get_tree
from appvalidator.constants import SPIDERMONKEY_INSTALLATION
from ..contextgenerator import ContextGenerator
def test_js_file(err, filename, data, line=0, context=None):
"Tests a JS file by parsing and analyzing its tokens"
... | import javascript.traverser as traverser
from javascript.spidermonkey import get_tree
from appvalidator.constants import SPIDERMONKEY_INSTALLATION
from ..contextgenerator import ContextGenerator
def test_js_file(err, filename, data, line=0, context=None):
"Tests a JS file by parsing and analyzing its tokens"
... | <commit_before>import javascript.traverser as traverser
from javascript.spidermonkey import get_tree
from appvalidator.constants import SPIDERMONKEY_INSTALLATION
from ..contextgenerator import ContextGenerator
def test_js_file(err, filename, data, line=0, context=None):
"Tests a JS file by parsing and analyzing i... |
0c55c9cbcf9af918abeaff0f7ea612373f1cfbbe | test_trigrams.py | test_trigrams.py | # -*- coding: utf-8 -*-
"""Trigram tests."""
import pytest
text = "az"
text_with_punct = "a.,/-z"
def test_read_file():
"""Assert the file imported and was split into lines."""
from trigrams import read_file
assert len(read_file()) > 0
@pytest.mark.parametrize('text, text_res', text_with_punct, text)
... | # -*- coding: utf-8 -*-
"""Trigram tests."""
import pytest
text = "a z"
text_with_punct = "a.,/-z"
def test_read_file():
"""Assert the file imported and was split into lines."""
from trigrams import read_file
assert len(read_file()) > 0
def test_strip_punct():
"""Assert no punctuation exists in... | Remove paramatrize, edit test so it passes | Remove paramatrize, edit test so it passes
| Python | mit | bgarnaat/401_trigrams | # -*- coding: utf-8 -*-
"""Trigram tests."""
import pytest
text = "az"
text_with_punct = "a.,/-z"
def test_read_file():
"""Assert the file imported and was split into lines."""
from trigrams import read_file
assert len(read_file()) > 0
@pytest.mark.parametrize('text, text_res', text_with_punct, text)
... | # -*- coding: utf-8 -*-
"""Trigram tests."""
import pytest
text = "a z"
text_with_punct = "a.,/-z"
def test_read_file():
"""Assert the file imported and was split into lines."""
from trigrams import read_file
assert len(read_file()) > 0
def test_strip_punct():
"""Assert no punctuation exists in... | <commit_before># -*- coding: utf-8 -*-
"""Trigram tests."""
import pytest
text = "az"
text_with_punct = "a.,/-z"
def test_read_file():
"""Assert the file imported and was split into lines."""
from trigrams import read_file
assert len(read_file()) > 0
@pytest.mark.parametrize('text, text_res', text_wit... | # -*- coding: utf-8 -*-
"""Trigram tests."""
import pytest
text = "a z"
text_with_punct = "a.,/-z"
def test_read_file():
"""Assert the file imported and was split into lines."""
from trigrams import read_file
assert len(read_file()) > 0
def test_strip_punct():
"""Assert no punctuation exists in... | # -*- coding: utf-8 -*-
"""Trigram tests."""
import pytest
text = "az"
text_with_punct = "a.,/-z"
def test_read_file():
"""Assert the file imported and was split into lines."""
from trigrams import read_file
assert len(read_file()) > 0
@pytest.mark.parametrize('text, text_res', text_with_punct, text)
... | <commit_before># -*- coding: utf-8 -*-
"""Trigram tests."""
import pytest
text = "az"
text_with_punct = "a.,/-z"
def test_read_file():
"""Assert the file imported and was split into lines."""
from trigrams import read_file
assert len(read_file()) > 0
@pytest.mark.parametrize('text, text_res', text_wit... |
e53ecef685569dfad2c62cd38c53190a9b2012d0 | metpy/gridding/__init__.py | metpy/gridding/__init__.py | # Copyright (c) 2008-2015 MetPy Developers.
# Distributed under the terms of the BSD 3-Clause License.
# SPDX-License-Identifier: BSD-3-Clause
from .gridding_functions import * # noqa: F403
from .points import * # noqa: F403
from .triangles import * # noqa: F403
from .polygons import * # noqa: F403
from .interpola... | # Copyright (c) 2008-2015 MetPy Developers.
# Distributed under the terms of the BSD 3-Clause License.
# SPDX-License-Identifier: BSD-3-Clause
from .gridding_functions import * # noqa: F403
from .interpolation import * # noqa: F403
__all__ = gridding_functions.__all__[:] # pylint: disable=undefined-variable
__all_... | Remove some imported modules from gridding | MNT: Remove some imported modules from gridding
We never intended these to be part of the supported API. The fact that
these were available from metpy.gridding was revealed by the new
autosummary docs.
| Python | bsd-3-clause | ShawnMurd/MetPy,dopplershift/MetPy,ahaberlie/MetPy,jrleeman/MetPy,ahaberlie/MetPy,dopplershift/MetPy,Unidata/MetPy,jrleeman/MetPy,Unidata/MetPy | # Copyright (c) 2008-2015 MetPy Developers.
# Distributed under the terms of the BSD 3-Clause License.
# SPDX-License-Identifier: BSD-3-Clause
from .gridding_functions import * # noqa: F403
from .points import * # noqa: F403
from .triangles import * # noqa: F403
from .polygons import * # noqa: F403
from .interpola... | # Copyright (c) 2008-2015 MetPy Developers.
# Distributed under the terms of the BSD 3-Clause License.
# SPDX-License-Identifier: BSD-3-Clause
from .gridding_functions import * # noqa: F403
from .interpolation import * # noqa: F403
__all__ = gridding_functions.__all__[:] # pylint: disable=undefined-variable
__all_... | <commit_before># Copyright (c) 2008-2015 MetPy Developers.
# Distributed under the terms of the BSD 3-Clause License.
# SPDX-License-Identifier: BSD-3-Clause
from .gridding_functions import * # noqa: F403
from .points import * # noqa: F403
from .triangles import * # noqa: F403
from .polygons import * # noqa: F403
... | # Copyright (c) 2008-2015 MetPy Developers.
# Distributed under the terms of the BSD 3-Clause License.
# SPDX-License-Identifier: BSD-3-Clause
from .gridding_functions import * # noqa: F403
from .interpolation import * # noqa: F403
__all__ = gridding_functions.__all__[:] # pylint: disable=undefined-variable
__all_... | # Copyright (c) 2008-2015 MetPy Developers.
# Distributed under the terms of the BSD 3-Clause License.
# SPDX-License-Identifier: BSD-3-Clause
from .gridding_functions import * # noqa: F403
from .points import * # noqa: F403
from .triangles import * # noqa: F403
from .polygons import * # noqa: F403
from .interpola... | <commit_before># Copyright (c) 2008-2015 MetPy Developers.
# Distributed under the terms of the BSD 3-Clause License.
# SPDX-License-Identifier: BSD-3-Clause
from .gridding_functions import * # noqa: F403
from .points import * # noqa: F403
from .triangles import * # noqa: F403
from .polygons import * # noqa: F403
... |
62d22972e3440092d479727b6120789d4724c15e | examples/redirects.py | examples/redirects.py | """This example demonstrates how to perform different kinds of redirects using hug"""
import hug
@hug.get()
def sum_two_numbers(number_1: int, number_2: int):
"""I'll be redirecting to this using a variety of approaches below"""
return number_1 + number_2
@hug.post()
def internal_redirection_automatic(numbe... | """This example demonstrates how to perform different kinds of redirects using hug"""
import hug
@hug.get()
def sum_two_numbers(number_1: int, number_2: int):
"""I'll be redirecting to this using a variety of approaches below"""
return number_1 + number_2
@hug.post()
def internal_redirection_automatic(numbe... | Fix grammer within doc string example | Fix grammer within doc string example
| Python | mit | timothycrosley/hug,timothycrosley/hug,timothycrosley/hug | """This example demonstrates how to perform different kinds of redirects using hug"""
import hug
@hug.get()
def sum_two_numbers(number_1: int, number_2: int):
"""I'll be redirecting to this using a variety of approaches below"""
return number_1 + number_2
@hug.post()
def internal_redirection_automatic(numbe... | """This example demonstrates how to perform different kinds of redirects using hug"""
import hug
@hug.get()
def sum_two_numbers(number_1: int, number_2: int):
"""I'll be redirecting to this using a variety of approaches below"""
return number_1 + number_2
@hug.post()
def internal_redirection_automatic(numbe... | <commit_before>"""This example demonstrates how to perform different kinds of redirects using hug"""
import hug
@hug.get()
def sum_two_numbers(number_1: int, number_2: int):
"""I'll be redirecting to this using a variety of approaches below"""
return number_1 + number_2
@hug.post()
def internal_redirection_... | """This example demonstrates how to perform different kinds of redirects using hug"""
import hug
@hug.get()
def sum_two_numbers(number_1: int, number_2: int):
"""I'll be redirecting to this using a variety of approaches below"""
return number_1 + number_2
@hug.post()
def internal_redirection_automatic(numbe... | """This example demonstrates how to perform different kinds of redirects using hug"""
import hug
@hug.get()
def sum_two_numbers(number_1: int, number_2: int):
"""I'll be redirecting to this using a variety of approaches below"""
return number_1 + number_2
@hug.post()
def internal_redirection_automatic(numbe... | <commit_before>"""This example demonstrates how to perform different kinds of redirects using hug"""
import hug
@hug.get()
def sum_two_numbers(number_1: int, number_2: int):
"""I'll be redirecting to this using a variety of approaches below"""
return number_1 + number_2
@hug.post()
def internal_redirection_... |
16aa9d35715e32e8455356f6c22e00d07aeefa90 | jqsh/__main__.py | jqsh/__main__.py | #!/usr/bin/env python3
import sys
import jqsh.parser
import json
while True: # a simple repl
try:
for value in jqsh.parser.parse(input('jqsh> ')).start():
json.dump(value, sys.stdout, sort_keys=True, indent=4, separators=(',', ': '))
print() # add a newline because json.dump doesn... | #!/usr/bin/env python3
import sys
import jqsh.parser
import json
while True: # a simple repl
try:
for value in jqsh.parser.parse(input('jqsh> ')).start():
json.dump(value, sys.stdout, sort_keys=True, indent=2, separators=(',', ': '))
print() # add a newline because json.dump doesn... | Decrease indentation of JSON output | Decrease indentation of JSON output
| Python | mit | jq-shell/python-jqsh | #!/usr/bin/env python3
import sys
import jqsh.parser
import json
while True: # a simple repl
try:
for value in jqsh.parser.parse(input('jqsh> ')).start():
json.dump(value, sys.stdout, sort_keys=True, indent=4, separators=(',', ': '))
print() # add a newline because json.dump doesn... | #!/usr/bin/env python3
import sys
import jqsh.parser
import json
while True: # a simple repl
try:
for value in jqsh.parser.parse(input('jqsh> ')).start():
json.dump(value, sys.stdout, sort_keys=True, indent=2, separators=(',', ': '))
print() # add a newline because json.dump doesn... | <commit_before>#!/usr/bin/env python3
import sys
import jqsh.parser
import json
while True: # a simple repl
try:
for value in jqsh.parser.parse(input('jqsh> ')).start():
json.dump(value, sys.stdout, sort_keys=True, indent=4, separators=(',', ': '))
print() # add a newline because ... | #!/usr/bin/env python3
import sys
import jqsh.parser
import json
while True: # a simple repl
try:
for value in jqsh.parser.parse(input('jqsh> ')).start():
json.dump(value, sys.stdout, sort_keys=True, indent=2, separators=(',', ': '))
print() # add a newline because json.dump doesn... | #!/usr/bin/env python3
import sys
import jqsh.parser
import json
while True: # a simple repl
try:
for value in jqsh.parser.parse(input('jqsh> ')).start():
json.dump(value, sys.stdout, sort_keys=True, indent=4, separators=(',', ': '))
print() # add a newline because json.dump doesn... | <commit_before>#!/usr/bin/env python3
import sys
import jqsh.parser
import json
while True: # a simple repl
try:
for value in jqsh.parser.parse(input('jqsh> ')).start():
json.dump(value, sys.stdout, sort_keys=True, indent=4, separators=(',', ': '))
print() # add a newline because ... |
373297c6d7059344be67b44c7197998954db89b1 | inboxen/app/handlers/in.py | inboxen/app/handlers/in.py | import logging
from lamson.routing import route, route_like, stateless
from config.settings import queue
from lamson import view
@route("(address)@(host)", address=".+")
@stateless
@nolocking
def START(message, address=None, host=None):
queue.push(message)
| import logging
from lamson.routing import route, stateless, nolocking
from config.settings import accepted_queue
from lamson import view
@route("(address)@(host)", address=".+")
@stateless
@nolocking
def START(message, address=None, host=None):
accepted_queue.push(message)
| Make the IN service actually deliver mail to the accepted queue | Make the IN service actually deliver mail to the accepted queue
| Python | agpl-3.0 | Inboxen/Inboxen,Inboxen/router,Inboxen/Inboxen,Inboxen/Inboxen,Inboxen/Inboxen | import logging
from lamson.routing import route, route_like, stateless
from config.settings import queue
from lamson import view
@route("(address)@(host)", address=".+")
@stateless
@nolocking
def START(message, address=None, host=None):
queue.push(message)
Make the IN service actually deliver mail to the accepte... | import logging
from lamson.routing import route, stateless, nolocking
from config.settings import accepted_queue
from lamson import view
@route("(address)@(host)", address=".+")
@stateless
@nolocking
def START(message, address=None, host=None):
accepted_queue.push(message)
| <commit_before>import logging
from lamson.routing import route, route_like, stateless
from config.settings import queue
from lamson import view
@route("(address)@(host)", address=".+")
@stateless
@nolocking
def START(message, address=None, host=None):
queue.push(message)
<commit_msg>Make the IN service actually ... | import logging
from lamson.routing import route, stateless, nolocking
from config.settings import accepted_queue
from lamson import view
@route("(address)@(host)", address=".+")
@stateless
@nolocking
def START(message, address=None, host=None):
accepted_queue.push(message)
| import logging
from lamson.routing import route, route_like, stateless
from config.settings import queue
from lamson import view
@route("(address)@(host)", address=".+")
@stateless
@nolocking
def START(message, address=None, host=None):
queue.push(message)
Make the IN service actually deliver mail to the accepte... | <commit_before>import logging
from lamson.routing import route, route_like, stateless
from config.settings import queue
from lamson import view
@route("(address)@(host)", address=".+")
@stateless
@nolocking
def START(message, address=None, host=None):
queue.push(message)
<commit_msg>Make the IN service actually ... |
6028b113ed37489d51a68dc5f1ae6ec4c9a14540 | jsk_apc2016_common/node_scripts/visualize_pick_json.py | jsk_apc2016_common/node_scripts/visualize_pick_json.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import argparse
import cv_bridge
import rospy
from sensor_msgs.msg import Image
import jsk_apc2016_common
def publish_cb(event):
imgmsg.header.stamp = rospy.Time.now()
pub.publish(imgmsg)
if __name__ == '__main__':
rospy.init_node('visualize_pick_json')
... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import argparse
import matplotlib.pyplot as plt
import cv_bridge
import rospy
from sensor_msgs.msg import Image
import jsk_apc2016_common
def visualize_cb(event):
if pub.get_num_connections() > 0:
imgmsg.header.stamp = rospy.Time.now()
pub.publish(... | Add mode to display json with --display | Add mode to display json with --display
| Python | bsd-3-clause | pazeshun/jsk_apc,pazeshun/jsk_apc,pazeshun/jsk_apc,pazeshun/jsk_apc,pazeshun/jsk_apc | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import argparse
import cv_bridge
import rospy
from sensor_msgs.msg import Image
import jsk_apc2016_common
def publish_cb(event):
imgmsg.header.stamp = rospy.Time.now()
pub.publish(imgmsg)
if __name__ == '__main__':
rospy.init_node('visualize_pick_json')
... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import argparse
import matplotlib.pyplot as plt
import cv_bridge
import rospy
from sensor_msgs.msg import Image
import jsk_apc2016_common
def visualize_cb(event):
if pub.get_num_connections() > 0:
imgmsg.header.stamp = rospy.Time.now()
pub.publish(... | <commit_before>#!/usr/bin/env python
# -*- coding: utf-8 -*-
import argparse
import cv_bridge
import rospy
from sensor_msgs.msg import Image
import jsk_apc2016_common
def publish_cb(event):
imgmsg.header.stamp = rospy.Time.now()
pub.publish(imgmsg)
if __name__ == '__main__':
rospy.init_node('visualiz... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import argparse
import matplotlib.pyplot as plt
import cv_bridge
import rospy
from sensor_msgs.msg import Image
import jsk_apc2016_common
def visualize_cb(event):
if pub.get_num_connections() > 0:
imgmsg.header.stamp = rospy.Time.now()
pub.publish(... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import argparse
import cv_bridge
import rospy
from sensor_msgs.msg import Image
import jsk_apc2016_common
def publish_cb(event):
imgmsg.header.stamp = rospy.Time.now()
pub.publish(imgmsg)
if __name__ == '__main__':
rospy.init_node('visualize_pick_json')
... | <commit_before>#!/usr/bin/env python
# -*- coding: utf-8 -*-
import argparse
import cv_bridge
import rospy
from sensor_msgs.msg import Image
import jsk_apc2016_common
def publish_cb(event):
imgmsg.header.stamp = rospy.Time.now()
pub.publish(imgmsg)
if __name__ == '__main__':
rospy.init_node('visualiz... |
3d4a71f6bb84fe4e5c7f51b109a55a7560ebb673 | test/test_absolute_import.py | test/test_absolute_import.py | import jedi
from jedi.parsing import Parser
from . import base
def test_explicit_absolute_imports():
"""
Detect modules with ``from __future__ import absolute_import``.
"""
parser = Parser("from __future__ import absolute_import", "test.py")
assert parser.scope.explicit_absolute_import
def test_... | import jedi
from jedi.parsing import Parser
from . import base
def test_explicit_absolute_imports():
"""
Detect modules with ``from __future__ import absolute_import``.
"""
parser = Parser("from __future__ import absolute_import", "test.py")
assert parser.module.explicit_absolute_import
def test... | Use Parser.module instead of Parser.scope | Use Parser.module instead of Parser.scope
| Python | mit | jonashaag/jedi,WoLpH/jedi,tjwei/jedi,mfussenegger/jedi,dwillmer/jedi,tjwei/jedi,mfussenegger/jedi,WoLpH/jedi,jonashaag/jedi,flurischt/jedi,flurischt/jedi,dwillmer/jedi | import jedi
from jedi.parsing import Parser
from . import base
def test_explicit_absolute_imports():
"""
Detect modules with ``from __future__ import absolute_import``.
"""
parser = Parser("from __future__ import absolute_import", "test.py")
assert parser.scope.explicit_absolute_import
def test_... | import jedi
from jedi.parsing import Parser
from . import base
def test_explicit_absolute_imports():
"""
Detect modules with ``from __future__ import absolute_import``.
"""
parser = Parser("from __future__ import absolute_import", "test.py")
assert parser.module.explicit_absolute_import
def test... | <commit_before>import jedi
from jedi.parsing import Parser
from . import base
def test_explicit_absolute_imports():
"""
Detect modules with ``from __future__ import absolute_import``.
"""
parser = Parser("from __future__ import absolute_import", "test.py")
assert parser.scope.explicit_absolute_imp... | import jedi
from jedi.parsing import Parser
from . import base
def test_explicit_absolute_imports():
"""
Detect modules with ``from __future__ import absolute_import``.
"""
parser = Parser("from __future__ import absolute_import", "test.py")
assert parser.module.explicit_absolute_import
def test... | import jedi
from jedi.parsing import Parser
from . import base
def test_explicit_absolute_imports():
"""
Detect modules with ``from __future__ import absolute_import``.
"""
parser = Parser("from __future__ import absolute_import", "test.py")
assert parser.scope.explicit_absolute_import
def test_... | <commit_before>import jedi
from jedi.parsing import Parser
from . import base
def test_explicit_absolute_imports():
"""
Detect modules with ``from __future__ import absolute_import``.
"""
parser = Parser("from __future__ import absolute_import", "test.py")
assert parser.scope.explicit_absolute_imp... |
9968e526c00ee221940b30f435ecb866a4a1a608 | tests/core/test_validator.py | tests/core/test_validator.py | import pytest
import asyncio
from rasa.core.validator import Validator
from tests.core.conftest import DEFAULT_DOMAIN_PATH, DEFAULT_STORIES_FILE, DEFAULT_NLU_DATA
from rasa.core.domain import Domain
from rasa.nlu.training_data import load_data, TrainingData
from rasa.core.training.dsl import StoryFileReader
@pytest.fi... | import pytest
import asyncio
from rasa.core.validator import Validator
from tests.core.conftest import (
DEFAULT_DOMAIN_PATH,
DEFAULT_STORIES_FILE,
DEFAULT_NLU_DATA,
)
from rasa.core.domain import Domain
from rasa.nlu.training_data import load_data, TrainingData
from rasa.core.training.dsl import StoryFileR... | Refactor validator tests with black | Refactor validator tests with black
Signed-off-by: Gabriela Barrozo Guedes <ef39217ba926e49eaea73efc4d3c11e5daab460c@gmail.com>
| Python | apache-2.0 | RasaHQ/rasa_nlu,RasaHQ/rasa_nlu,RasaHQ/rasa_nlu | import pytest
import asyncio
from rasa.core.validator import Validator
from tests.core.conftest import DEFAULT_DOMAIN_PATH, DEFAULT_STORIES_FILE, DEFAULT_NLU_DATA
from rasa.core.domain import Domain
from rasa.nlu.training_data import load_data, TrainingData
from rasa.core.training.dsl import StoryFileReader
@pytest.fi... | import pytest
import asyncio
from rasa.core.validator import Validator
from tests.core.conftest import (
DEFAULT_DOMAIN_PATH,
DEFAULT_STORIES_FILE,
DEFAULT_NLU_DATA,
)
from rasa.core.domain import Domain
from rasa.nlu.training_data import load_data, TrainingData
from rasa.core.training.dsl import StoryFileR... | <commit_before>import pytest
import asyncio
from rasa.core.validator import Validator
from tests.core.conftest import DEFAULT_DOMAIN_PATH, DEFAULT_STORIES_FILE, DEFAULT_NLU_DATA
from rasa.core.domain import Domain
from rasa.nlu.training_data import load_data, TrainingData
from rasa.core.training.dsl import StoryFileRea... | import pytest
import asyncio
from rasa.core.validator import Validator
from tests.core.conftest import (
DEFAULT_DOMAIN_PATH,
DEFAULT_STORIES_FILE,
DEFAULT_NLU_DATA,
)
from rasa.core.domain import Domain
from rasa.nlu.training_data import load_data, TrainingData
from rasa.core.training.dsl import StoryFileR... | import pytest
import asyncio
from rasa.core.validator import Validator
from tests.core.conftest import DEFAULT_DOMAIN_PATH, DEFAULT_STORIES_FILE, DEFAULT_NLU_DATA
from rasa.core.domain import Domain
from rasa.nlu.training_data import load_data, TrainingData
from rasa.core.training.dsl import StoryFileReader
@pytest.fi... | <commit_before>import pytest
import asyncio
from rasa.core.validator import Validator
from tests.core.conftest import DEFAULT_DOMAIN_PATH, DEFAULT_STORIES_FILE, DEFAULT_NLU_DATA
from rasa.core.domain import Domain
from rasa.nlu.training_data import load_data, TrainingData
from rasa.core.training.dsl import StoryFileRea... |
37833caae3147f9c2f70b83f5b04becaa402a66e | httpDissec.py | httpDissec.py | # sudo apt-get install python-scapy
from scapy.all import *
# sudo pip install scapy_http
from scapy.layers import http
from scapy.layers.http import HTTPResponse
import sys
packets = rdpcap("task07_f1.pcap")
requests = {}
answers = {}
def has_http_header(packet):
return packet.haslayer(HTTPResponse)
for pkt in... | # sudo apt-get install python-scapy
from scapy.all import *
# sudo pip install scapy_http
from scapy.layers import http
from scapy.layers.http import HTTPResponse
import sys
packets = rdpcap("task07_f1.pcap")
requests = []
answers = []
def has_http_header(packet):
return packet.haslayer(HTTPResponse)
for pkt in... | Change from dic to list | Change from dic to list
| Python | mit | alexst07/http_dissector | # sudo apt-get install python-scapy
from scapy.all import *
# sudo pip install scapy_http
from scapy.layers import http
from scapy.layers.http import HTTPResponse
import sys
packets = rdpcap("task07_f1.pcap")
requests = {}
answers = {}
def has_http_header(packet):
return packet.haslayer(HTTPResponse)
for pkt in... | # sudo apt-get install python-scapy
from scapy.all import *
# sudo pip install scapy_http
from scapy.layers import http
from scapy.layers.http import HTTPResponse
import sys
packets = rdpcap("task07_f1.pcap")
requests = []
answers = []
def has_http_header(packet):
return packet.haslayer(HTTPResponse)
for pkt in... | <commit_before># sudo apt-get install python-scapy
from scapy.all import *
# sudo pip install scapy_http
from scapy.layers import http
from scapy.layers.http import HTTPResponse
import sys
packets = rdpcap("task07_f1.pcap")
requests = {}
answers = {}
def has_http_header(packet):
return packet.haslayer(HTTPRespon... | # sudo apt-get install python-scapy
from scapy.all import *
# sudo pip install scapy_http
from scapy.layers import http
from scapy.layers.http import HTTPResponse
import sys
packets = rdpcap("task07_f1.pcap")
requests = []
answers = []
def has_http_header(packet):
return packet.haslayer(HTTPResponse)
for pkt in... | # sudo apt-get install python-scapy
from scapy.all import *
# sudo pip install scapy_http
from scapy.layers import http
from scapy.layers.http import HTTPResponse
import sys
packets = rdpcap("task07_f1.pcap")
requests = {}
answers = {}
def has_http_header(packet):
return packet.haslayer(HTTPResponse)
for pkt in... | <commit_before># sudo apt-get install python-scapy
from scapy.all import *
# sudo pip install scapy_http
from scapy.layers import http
from scapy.layers.http import HTTPResponse
import sys
packets = rdpcap("task07_f1.pcap")
requests = {}
answers = {}
def has_http_header(packet):
return packet.haslayer(HTTPRespon... |
0fa817e3efee4e9a539432d6e308534f82448c60 | ReligiousPhraseMC/holy_twitter.py | ReligiousPhraseMC/holy_twitter.py | """Coordinates the twitter api with the markov chain models"""
def main():
"""The main event loop for the holy twitter bot
It watches for twitter events, and posts randomly generated holy text to twitter.
"""
pass
if __name__ == '__main__':
main()
| """Coordinates the twitter api with the markov chain models"""
from tweepy import Stream, OAuthHandler, API
from tweepy.streaming import StreamListener
from twitter_secrets import api_tokens as at
class HolyListener(StreamListener):
def __init__(self):
self.tweetCount = 0
def on_connect(self):
... | Add the twitter streaming solution as module | Add the twitter streaming solution as module
The streaming solution added here is the second one I tried in the
notebook. It seems like it will work well. Might mix them
| Python | mit | salvor7/MarkovChainBibleBot | """Coordinates the twitter api with the markov chain models"""
def main():
"""The main event loop for the holy twitter bot
It watches for twitter events, and posts randomly generated holy text to twitter.
"""
pass
if __name__ == '__main__':
main()
Add the twitter streaming solution as module
... | """Coordinates the twitter api with the markov chain models"""
from tweepy import Stream, OAuthHandler, API
from tweepy.streaming import StreamListener
from twitter_secrets import api_tokens as at
class HolyListener(StreamListener):
def __init__(self):
self.tweetCount = 0
def on_connect(self):
... | <commit_before>"""Coordinates the twitter api with the markov chain models"""
def main():
"""The main event loop for the holy twitter bot
It watches for twitter events, and posts randomly generated holy text to twitter.
"""
pass
if __name__ == '__main__':
main()
<commit_msg>Add the twitter str... | """Coordinates the twitter api with the markov chain models"""
from tweepy import Stream, OAuthHandler, API
from tweepy.streaming import StreamListener
from twitter_secrets import api_tokens as at
class HolyListener(StreamListener):
def __init__(self):
self.tweetCount = 0
def on_connect(self):
... | """Coordinates the twitter api with the markov chain models"""
def main():
"""The main event loop for the holy twitter bot
It watches for twitter events, and posts randomly generated holy text to twitter.
"""
pass
if __name__ == '__main__':
main()
Add the twitter streaming solution as module
... | <commit_before>"""Coordinates the twitter api with the markov chain models"""
def main():
"""The main event loop for the holy twitter bot
It watches for twitter events, and posts randomly generated holy text to twitter.
"""
pass
if __name__ == '__main__':
main()
<commit_msg>Add the twitter str... |
1b187ed85aede9ffe39ce52303694f852a8d02a2 | vantage/shell.py | vantage/shell.py | import sys
import subprocess
from vantage import utils
from vantage.exceptions import VantageException
def shell_cmd(env, cmd, *args):
utils.loquacious(f"Running system defined '{cmd}' inside env", env)
utils.loquacious(f" With args: {args}", env)
try:
cmd = utils.find_executable(cmd)
i... | import sys
import subprocess
from vantage import utils
from vantage.exceptions import VantageException
def shell_cmd(env, cmd, *args):
utils.loquacious(f"Running system defined '{cmd}' inside env", env)
utils.loquacious(f" With args: {args}", env)
try:
cmd_path = utils.find_executable(cmd)
... | Fix missing cmd name in error message | Fix missing cmd name in error message
| Python | mit | vantage-org/vantage,vantage-org/vantage | import sys
import subprocess
from vantage import utils
from vantage.exceptions import VantageException
def shell_cmd(env, cmd, *args):
utils.loquacious(f"Running system defined '{cmd}' inside env", env)
utils.loquacious(f" With args: {args}", env)
try:
cmd = utils.find_executable(cmd)
i... | import sys
import subprocess
from vantage import utils
from vantage.exceptions import VantageException
def shell_cmd(env, cmd, *args):
utils.loquacious(f"Running system defined '{cmd}' inside env", env)
utils.loquacious(f" With args: {args}", env)
try:
cmd_path = utils.find_executable(cmd)
... | <commit_before>import sys
import subprocess
from vantage import utils
from vantage.exceptions import VantageException
def shell_cmd(env, cmd, *args):
utils.loquacious(f"Running system defined '{cmd}' inside env", env)
utils.loquacious(f" With args: {args}", env)
try:
cmd = utils.find_executable... | import sys
import subprocess
from vantage import utils
from vantage.exceptions import VantageException
def shell_cmd(env, cmd, *args):
utils.loquacious(f"Running system defined '{cmd}' inside env", env)
utils.loquacious(f" With args: {args}", env)
try:
cmd_path = utils.find_executable(cmd)
... | import sys
import subprocess
from vantage import utils
from vantage.exceptions import VantageException
def shell_cmd(env, cmd, *args):
utils.loquacious(f"Running system defined '{cmd}' inside env", env)
utils.loquacious(f" With args: {args}", env)
try:
cmd = utils.find_executable(cmd)
i... | <commit_before>import sys
import subprocess
from vantage import utils
from vantage.exceptions import VantageException
def shell_cmd(env, cmd, *args):
utils.loquacious(f"Running system defined '{cmd}' inside env", env)
utils.loquacious(f" With args: {args}", env)
try:
cmd = utils.find_executable... |
c4109fadf0a66db5af0e579600a70e4b7e28493d | csdms/dakota/experiment.py | csdms/dakota/experiment.py | """A template for describing a Dakota experiment."""
import os
import importlib
import inspect
blocks = ['environment', 'method', 'variables', 'interface', 'responses']
class Experiment(object):
"""Describe parameters to create an input file for a Dakota experiment."""
def __init__(self,
... | """A template for describing a Dakota experiment."""
import os
import importlib
class Experiment(object):
"""Describe parameters to create an input file for a Dakota experiment."""
def __init__(self,
environment='environment',
method='vector_parameter_study',
... | Refactor init method with _blocks attribute | Refactor init method with _blocks attribute
| Python | mit | csdms/dakota,csdms/dakota | """A template for describing a Dakota experiment."""
import os
import importlib
import inspect
blocks = ['environment', 'method', 'variables', 'interface', 'responses']
class Experiment(object):
"""Describe parameters to create an input file for a Dakota experiment."""
def __init__(self,
... | """A template for describing a Dakota experiment."""
import os
import importlib
class Experiment(object):
"""Describe parameters to create an input file for a Dakota experiment."""
def __init__(self,
environment='environment',
method='vector_parameter_study',
... | <commit_before>"""A template for describing a Dakota experiment."""
import os
import importlib
import inspect
blocks = ['environment', 'method', 'variables', 'interface', 'responses']
class Experiment(object):
"""Describe parameters to create an input file for a Dakota experiment."""
def __init__(self,
... | """A template for describing a Dakota experiment."""
import os
import importlib
class Experiment(object):
"""Describe parameters to create an input file for a Dakota experiment."""
def __init__(self,
environment='environment',
method='vector_parameter_study',
... | """A template for describing a Dakota experiment."""
import os
import importlib
import inspect
blocks = ['environment', 'method', 'variables', 'interface', 'responses']
class Experiment(object):
"""Describe parameters to create an input file for a Dakota experiment."""
def __init__(self,
... | <commit_before>"""A template for describing a Dakota experiment."""
import os
import importlib
import inspect
blocks = ['environment', 'method', 'variables', 'interface', 'responses']
class Experiment(object):
"""Describe parameters to create an input file for a Dakota experiment."""
def __init__(self,
... |
71bba7197f1e9faaa99cb54dfde452a7c8b1ff0f | nupic/research/frameworks/sigopt/common_experiments.py | nupic/research/frameworks/sigopt/common_experiments.py | # ----------------------------------------------------------------------
# Numenta Platform for Intelligent Computing (NuPIC)
# Copyright (C) 2020, Numenta, Inc. Unless you have an agreement
# with Numenta, Inc., for a separate license for this software code, the
# following terms and conditions apply:
#
# This progra... | # ----------------------------------------------------------------------
# Numenta Platform for Intelligent Computing (NuPIC)
# Copyright (C) 2020, Numenta, Inc. Unless you have an agreement
# with Numenta, Inc., for a separate license for this software code, the
# following terms and conditions apply:
#
# This progra... | Add experiment classes for tuning hyper-parameters with SGD and either StepLR of OneCycleLR schedulers. | Add experiment classes for tuning hyper-parameters with SGD and either StepLR of OneCycleLR schedulers. | Python | agpl-3.0 | numenta/nupic.research,mrcslws/nupic.research,subutai/nupic.research,numenta/nupic.research,subutai/nupic.research,mrcslws/nupic.research | # ----------------------------------------------------------------------
# Numenta Platform for Intelligent Computing (NuPIC)
# Copyright (C) 2020, Numenta, Inc. Unless you have an agreement
# with Numenta, Inc., for a separate license for this software code, the
# following terms and conditions apply:
#
# This progra... | # ----------------------------------------------------------------------
# Numenta Platform for Intelligent Computing (NuPIC)
# Copyright (C) 2020, Numenta, Inc. Unless you have an agreement
# with Numenta, Inc., for a separate license for this software code, the
# following terms and conditions apply:
#
# This progra... | <commit_before># ----------------------------------------------------------------------
# Numenta Platform for Intelligent Computing (NuPIC)
# Copyright (C) 2020, Numenta, Inc. Unless you have an agreement
# with Numenta, Inc., for a separate license for this software code, the
# following terms and conditions apply:
... | # ----------------------------------------------------------------------
# Numenta Platform for Intelligent Computing (NuPIC)
# Copyright (C) 2020, Numenta, Inc. Unless you have an agreement
# with Numenta, Inc., for a separate license for this software code, the
# following terms and conditions apply:
#
# This progra... | # ----------------------------------------------------------------------
# Numenta Platform for Intelligent Computing (NuPIC)
# Copyright (C) 2020, Numenta, Inc. Unless you have an agreement
# with Numenta, Inc., for a separate license for this software code, the
# following terms and conditions apply:
#
# This progra... | <commit_before># ----------------------------------------------------------------------
# Numenta Platform for Intelligent Computing (NuPIC)
# Copyright (C) 2020, Numenta, Inc. Unless you have an agreement
# with Numenta, Inc., for a separate license for this software code, the
# following terms and conditions apply:
... |
c9ffe560879d6264eb4aed5b3dc96553f4ab2666 | xudd/tools.py | xudd/tools.py | import base64
import uuid
from xudd import PY2
def base64_uuid4():
"""
Return a base64 encoded uuid4
"""
base64_encoded = base64.urlsafe_b64encode(uuid.uuid4().bytes)
if not PY2:
base64_encoded = base64_encoded.decode("utf-8")
return base64_encoded.rstrip("=")
def is_qualified_id(a... | import base64
import uuid
from xudd import PY2
def base64_uuid4():
"""
Return a base64 encoded uuid4
"""
base64_encoded = base64.urlsafe_b64encode(uuid.uuid4().bytes)
if not PY2:
base64_encoded = base64_encoded.decode("utf-8")
return base64_encoded.rstrip("=")
def is_qualified_id(a... | Clarify that it's a-okay to use possibly_qualify_id to determine whether to declare an actor local. | Clarify that it's a-okay to use possibly_qualify_id to determine
whether to declare an actor local.
| Python | apache-2.0 | xudd/xudd | import base64
import uuid
from xudd import PY2
def base64_uuid4():
"""
Return a base64 encoded uuid4
"""
base64_encoded = base64.urlsafe_b64encode(uuid.uuid4().bytes)
if not PY2:
base64_encoded = base64_encoded.decode("utf-8")
return base64_encoded.rstrip("=")
def is_qualified_id(a... | import base64
import uuid
from xudd import PY2
def base64_uuid4():
"""
Return a base64 encoded uuid4
"""
base64_encoded = base64.urlsafe_b64encode(uuid.uuid4().bytes)
if not PY2:
base64_encoded = base64_encoded.decode("utf-8")
return base64_encoded.rstrip("=")
def is_qualified_id(a... | <commit_before>import base64
import uuid
from xudd import PY2
def base64_uuid4():
"""
Return a base64 encoded uuid4
"""
base64_encoded = base64.urlsafe_b64encode(uuid.uuid4().bytes)
if not PY2:
base64_encoded = base64_encoded.decode("utf-8")
return base64_encoded.rstrip("=")
def is... | import base64
import uuid
from xudd import PY2
def base64_uuid4():
"""
Return a base64 encoded uuid4
"""
base64_encoded = base64.urlsafe_b64encode(uuid.uuid4().bytes)
if not PY2:
base64_encoded = base64_encoded.decode("utf-8")
return base64_encoded.rstrip("=")
def is_qualified_id(a... | import base64
import uuid
from xudd import PY2
def base64_uuid4():
"""
Return a base64 encoded uuid4
"""
base64_encoded = base64.urlsafe_b64encode(uuid.uuid4().bytes)
if not PY2:
base64_encoded = base64_encoded.decode("utf-8")
return base64_encoded.rstrip("=")
def is_qualified_id(a... | <commit_before>import base64
import uuid
from xudd import PY2
def base64_uuid4():
"""
Return a base64 encoded uuid4
"""
base64_encoded = base64.urlsafe_b64encode(uuid.uuid4().bytes)
if not PY2:
base64_encoded = base64_encoded.decode("utf-8")
return base64_encoded.rstrip("=")
def is... |
8a4295876a4e1059f46f8fadaa1562062bfe877e | tests/test_edge_cases.py | tests/test_edge_cases.py | from __future__ import with_statement
import unittest
from flask import Flask
import flask_featureflags as feature_flags
class TestOutsideRequestContext(unittest.TestCase):
def test_checking_is_active_outside_request_context_returns_false(self):
self.assertFalse(feature_flags.is_active("BOGUS_FEATURE_FLAG")... | from __future__ import with_statement
import unittest
from flask import Flask
import flask_featureflags as feature_flags
class TestOutsideRequestContext(unittest.TestCase):
def test_checking_is_active_outside_request_context_returns_false(self):
self.assertFalse(feature_flags.is_active("BOGUS_FEATURE_FLAG")... | Fix test to support NoFeatureFlagFound. | Fix test to support NoFeatureFlagFound.
| Python | apache-2.0 | iromli/Flask-FeatureFlags,trustrachel/Flask-FeatureFlags,jskulski/Flask-FeatureFlags | from __future__ import with_statement
import unittest
from flask import Flask
import flask_featureflags as feature_flags
class TestOutsideRequestContext(unittest.TestCase):
def test_checking_is_active_outside_request_context_returns_false(self):
self.assertFalse(feature_flags.is_active("BOGUS_FEATURE_FLAG")... | from __future__ import with_statement
import unittest
from flask import Flask
import flask_featureflags as feature_flags
class TestOutsideRequestContext(unittest.TestCase):
def test_checking_is_active_outside_request_context_returns_false(self):
self.assertFalse(feature_flags.is_active("BOGUS_FEATURE_FLAG")... | <commit_before>from __future__ import with_statement
import unittest
from flask import Flask
import flask_featureflags as feature_flags
class TestOutsideRequestContext(unittest.TestCase):
def test_checking_is_active_outside_request_context_returns_false(self):
self.assertFalse(feature_flags.is_active("BOGUS... | from __future__ import with_statement
import unittest
from flask import Flask
import flask_featureflags as feature_flags
class TestOutsideRequestContext(unittest.TestCase):
def test_checking_is_active_outside_request_context_returns_false(self):
self.assertFalse(feature_flags.is_active("BOGUS_FEATURE_FLAG")... | from __future__ import with_statement
import unittest
from flask import Flask
import flask_featureflags as feature_flags
class TestOutsideRequestContext(unittest.TestCase):
def test_checking_is_active_outside_request_context_returns_false(self):
self.assertFalse(feature_flags.is_active("BOGUS_FEATURE_FLAG")... | <commit_before>from __future__ import with_statement
import unittest
from flask import Flask
import flask_featureflags as feature_flags
class TestOutsideRequestContext(unittest.TestCase):
def test_checking_is_active_outside_request_context_returns_false(self):
self.assertFalse(feature_flags.is_active("BOGUS... |
640d5de356d58b80f4d6ebb1c503ce88e144ea90 | core/models.py | core/models.py | from django.db import models
class Price(models.Model):
price = models.PositiveIntegerField()
datetime = models.DateTimeField()
| from django.db import models
class Price(models.Model):
price = models.PositiveIntegerField()
datetime = models.DateTimeField()
@property
def price_float(self):
return self.price / 1000.0
@price_float.setter
def price_float(self, price):
self.price = round(price * 1000)
| Add property for converting price float to integer | Add property for converting price float to integer
| Python | unlicense | kvikshaug/btc.kvikshaug.no,kvikshaug/btc.kvikshaug.no,kvikshaug/btc.kvikshaug.no,kvikshaug/btc.kvikshaug.no | from django.db import models
class Price(models.Model):
price = models.PositiveIntegerField()
datetime = models.DateTimeField()
Add property for converting price float to integer | from django.db import models
class Price(models.Model):
price = models.PositiveIntegerField()
datetime = models.DateTimeField()
@property
def price_float(self):
return self.price / 1000.0
@price_float.setter
def price_float(self, price):
self.price = round(price * 1000)
| <commit_before>from django.db import models
class Price(models.Model):
price = models.PositiveIntegerField()
datetime = models.DateTimeField()
<commit_msg>Add property for converting price float to integer<commit_after> | from django.db import models
class Price(models.Model):
price = models.PositiveIntegerField()
datetime = models.DateTimeField()
@property
def price_float(self):
return self.price / 1000.0
@price_float.setter
def price_float(self, price):
self.price = round(price * 1000)
| from django.db import models
class Price(models.Model):
price = models.PositiveIntegerField()
datetime = models.DateTimeField()
Add property for converting price float to integerfrom django.db import models
class Price(models.Model):
price = models.PositiveIntegerField()
datetime = models.DateTimeFiel... | <commit_before>from django.db import models
class Price(models.Model):
price = models.PositiveIntegerField()
datetime = models.DateTimeField()
<commit_msg>Add property for converting price float to integer<commit_after>from django.db import models
class Price(models.Model):
price = models.PositiveIntegerF... |
d720d58ef9e140460cad0dc90f7d43f384d031e1 | djangosaml2/urls.py | djangosaml2/urls.py | # Copyright (C) 2010-2012 Yaco Sistemas (http://www.yaco.es)
# Copyright (C) 2009 Lorenzo Gil Sanchez <lorenzo.gil.sanchez@gmail.com>
#
# 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
#
# ... | # Copyright (C) 2010-2012 Yaco Sistemas (http://www.yaco.es)
# Copyright (C) 2009 Lorenzo Gil Sanchez <lorenzo.gil.sanchez@gmail.com>
#
# 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
#
# ... | Fix imports for Django 1.6 and above | Fix imports for Django 1.6 and above
| Python | apache-2.0 | kradalby/djangosaml2,kradalby/djangosaml2 | # Copyright (C) 2010-2012 Yaco Sistemas (http://www.yaco.es)
# Copyright (C) 2009 Lorenzo Gil Sanchez <lorenzo.gil.sanchez@gmail.com>
#
# 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
#
# ... | # Copyright (C) 2010-2012 Yaco Sistemas (http://www.yaco.es)
# Copyright (C) 2009 Lorenzo Gil Sanchez <lorenzo.gil.sanchez@gmail.com>
#
# 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
#
# ... | <commit_before># Copyright (C) 2010-2012 Yaco Sistemas (http://www.yaco.es)
# Copyright (C) 2009 Lorenzo Gil Sanchez <lorenzo.gil.sanchez@gmail.com>
#
# 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 Licen... | # Copyright (C) 2010-2012 Yaco Sistemas (http://www.yaco.es)
# Copyright (C) 2009 Lorenzo Gil Sanchez <lorenzo.gil.sanchez@gmail.com>
#
# 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
#
# ... | # Copyright (C) 2010-2012 Yaco Sistemas (http://www.yaco.es)
# Copyright (C) 2009 Lorenzo Gil Sanchez <lorenzo.gil.sanchez@gmail.com>
#
# 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
#
# ... | <commit_before># Copyright (C) 2010-2012 Yaco Sistemas (http://www.yaco.es)
# Copyright (C) 2009 Lorenzo Gil Sanchez <lorenzo.gil.sanchez@gmail.com>
#
# 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 Licen... |
63bb771df22c73d2e45e6577a01bf4e4a7c60dc6 | bumblebee/modules/arch-update.py | bumblebee/modules/arch-update.py | """Check updates to Arch Linux."""
import subprocess
import bumblebee.input
import bumblebee.output
import bumblebee.engine
class Module(bumblebee.engine.Module):
def __init__(self, engine, config):
widget = bumblebee.output.Widget(full_text=self.utilization)
super(Module, self).__init__(engine,... | """Check updates to Arch Linux."""
import subprocess
import bumblebee.input
import bumblebee.output
import bumblebee.engine
class Module(bumblebee.engine.Module):
def __init__(self, engine, config):
widget = bumblebee.output.Widget(full_text=self.utilization)
super(Module, self).__init__(engine,... | Fix for previous versions of python | Fix for previous versions of python
| Python | mit | tobi-wan-kenobi/bumblebee-status,tobi-wan-kenobi/bumblebee-status | """Check updates to Arch Linux."""
import subprocess
import bumblebee.input
import bumblebee.output
import bumblebee.engine
class Module(bumblebee.engine.Module):
def __init__(self, engine, config):
widget = bumblebee.output.Widget(full_text=self.utilization)
super(Module, self).__init__(engine,... | """Check updates to Arch Linux."""
import subprocess
import bumblebee.input
import bumblebee.output
import bumblebee.engine
class Module(bumblebee.engine.Module):
def __init__(self, engine, config):
widget = bumblebee.output.Widget(full_text=self.utilization)
super(Module, self).__init__(engine,... | <commit_before>"""Check updates to Arch Linux."""
import subprocess
import bumblebee.input
import bumblebee.output
import bumblebee.engine
class Module(bumblebee.engine.Module):
def __init__(self, engine, config):
widget = bumblebee.output.Widget(full_text=self.utilization)
super(Module, self)._... | """Check updates to Arch Linux."""
import subprocess
import bumblebee.input
import bumblebee.output
import bumblebee.engine
class Module(bumblebee.engine.Module):
def __init__(self, engine, config):
widget = bumblebee.output.Widget(full_text=self.utilization)
super(Module, self).__init__(engine,... | """Check updates to Arch Linux."""
import subprocess
import bumblebee.input
import bumblebee.output
import bumblebee.engine
class Module(bumblebee.engine.Module):
def __init__(self, engine, config):
widget = bumblebee.output.Widget(full_text=self.utilization)
super(Module, self).__init__(engine,... | <commit_before>"""Check updates to Arch Linux."""
import subprocess
import bumblebee.input
import bumblebee.output
import bumblebee.engine
class Module(bumblebee.engine.Module):
def __init__(self, engine, config):
widget = bumblebee.output.Widget(full_text=self.utilization)
super(Module, self)._... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.