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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
43338ffa4d9703585c78f6613ed1bd047c076748 | setup.py | setup.py | from codecs import open as codecs_open
from setuptools import setup, find_packages
# Get the long description from the relevant file
with codecs_open('README.rst', encoding='utf-8') as f:
long_description = f.read()
setup(name='tile-stitcher',
version='0.0.1',
description=u"Stitch image tiles into c... | from codecs import open as codecs_open
from setuptools import setup, find_packages
# Get the long description from the relevant file
with codecs_open('README.rst', encoding='utf-8') as f:
long_description = f.read()
setup(name='tile-stitcher',
version='0.0.1',
description=u"Stitch image tiles into c... | Add pytest-cov to test extras | Add pytest-cov to test extras
| Python | mit | mapbox/untiler | from codecs import open as codecs_open
from setuptools import setup, find_packages
# Get the long description from the relevant file
with codecs_open('README.rst', encoding='utf-8') as f:
long_description = f.read()
setup(name='tile-stitcher',
version='0.0.1',
description=u"Stitch image tiles into c... | from codecs import open as codecs_open
from setuptools import setup, find_packages
# Get the long description from the relevant file
with codecs_open('README.rst', encoding='utf-8') as f:
long_description = f.read()
setup(name='tile-stitcher',
version='0.0.1',
description=u"Stitch image tiles into c... | <commit_before>from codecs import open as codecs_open
from setuptools import setup, find_packages
# Get the long description from the relevant file
with codecs_open('README.rst', encoding='utf-8') as f:
long_description = f.read()
setup(name='tile-stitcher',
version='0.0.1',
description=u"Stitch ima... | from codecs import open as codecs_open
from setuptools import setup, find_packages
# Get the long description from the relevant file
with codecs_open('README.rst', encoding='utf-8') as f:
long_description = f.read()
setup(name='tile-stitcher',
version='0.0.1',
description=u"Stitch image tiles into c... | from codecs import open as codecs_open
from setuptools import setup, find_packages
# Get the long description from the relevant file
with codecs_open('README.rst', encoding='utf-8') as f:
long_description = f.read()
setup(name='tile-stitcher',
version='0.0.1',
description=u"Stitch image tiles into c... | <commit_before>from codecs import open as codecs_open
from setuptools import setup, find_packages
# Get the long description from the relevant file
with codecs_open('README.rst', encoding='utf-8') as f:
long_description = f.read()
setup(name='tile-stitcher',
version='0.0.1',
description=u"Stitch ima... |
f97ea075866cf67e873c072613e058be160d5340 | setup.py | setup.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from setuptools import setup
setup(
name='django-scheduler',
version='0.7.1',
description='A calendaring app for Django.',
author='Leonardo Lazzaro',
author_email='lazzaroleonardo@gmail.com',
url='https://github.com/llazzaro/django-scheduler',
... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from setuptools import setup
setup(
name='django-scheduler',
version='0.7.2',
description='A calendaring app for Django.',
author='Leonardo Lazzaro',
author_email='lazzaroleonardo@gmail.com',
url='https://github.com/llazzaro/django-scheduler',
... | Update scheduler version for fixing a broken pypi build | Update scheduler version for fixing a broken pypi build | Python | bsd-3-clause | GrahamDigital/django-scheduler,GrahamDigital/django-scheduler,rowbot-dev/django-scheduler,sprightco/django-scheduler,nharsch/django-scheduler,nwaxiomatic/django-scheduler,drodger/django-scheduler,drodger/django-scheduler,jrutila/django-scheduler,nharsch/django-scheduler,GrahamDigital/django-scheduler,jrutila/django-sch... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from setuptools import setup
setup(
name='django-scheduler',
version='0.7.1',
description='A calendaring app for Django.',
author='Leonardo Lazzaro',
author_email='lazzaroleonardo@gmail.com',
url='https://github.com/llazzaro/django-scheduler',
... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from setuptools import setup
setup(
name='django-scheduler',
version='0.7.2',
description='A calendaring app for Django.',
author='Leonardo Lazzaro',
author_email='lazzaroleonardo@gmail.com',
url='https://github.com/llazzaro/django-scheduler',
... | <commit_before>#!/usr/bin/env python
# -*- coding: utf-8 -*-
from setuptools import setup
setup(
name='django-scheduler',
version='0.7.1',
description='A calendaring app for Django.',
author='Leonardo Lazzaro',
author_email='lazzaroleonardo@gmail.com',
url='https://github.com/llazzaro/django-s... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from setuptools import setup
setup(
name='django-scheduler',
version='0.7.2',
description='A calendaring app for Django.',
author='Leonardo Lazzaro',
author_email='lazzaroleonardo@gmail.com',
url='https://github.com/llazzaro/django-scheduler',
... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from setuptools import setup
setup(
name='django-scheduler',
version='0.7.1',
description='A calendaring app for Django.',
author='Leonardo Lazzaro',
author_email='lazzaroleonardo@gmail.com',
url='https://github.com/llazzaro/django-scheduler',
... | <commit_before>#!/usr/bin/env python
# -*- coding: utf-8 -*-
from setuptools import setup
setup(
name='django-scheduler',
version='0.7.1',
description='A calendaring app for Django.',
author='Leonardo Lazzaro',
author_email='lazzaroleonardo@gmail.com',
url='https://github.com/llazzaro/django-s... |
21febe61699787a0a47bd0ee2ba5e58727d75c17 | setup.py | setup.py | """Mailmerge build and install configuration."""
from pathlib import Path
import setuptools
# Read the contents of README file
PROJECT_DIR = Path(__file__).parent
README = PROJECT_DIR/"README.md"
LONG_DESCRIPTION = README.open().read()
setuptools.setup(
name="mailmerge",
description="A simple, command line ... | """Mailmerge build and install configuration."""
from pathlib import Path
import setuptools
# Read the contents of README file
PROJECT_DIR = Path(__file__).parent
README = PROJECT_DIR/"README.md"
LONG_DESCRIPTION = README.open().read()
setuptools.setup(
name="mailmerge",
description="A simple, command line ... | Remove codecov dependency because it's now a github action | Remove codecov dependency because it's now a github action
| Python | mit | awdeorio/mailmerge | """Mailmerge build and install configuration."""
from pathlib import Path
import setuptools
# Read the contents of README file
PROJECT_DIR = Path(__file__).parent
README = PROJECT_DIR/"README.md"
LONG_DESCRIPTION = README.open().read()
setuptools.setup(
name="mailmerge",
description="A simple, command line ... | """Mailmerge build and install configuration."""
from pathlib import Path
import setuptools
# Read the contents of README file
PROJECT_DIR = Path(__file__).parent
README = PROJECT_DIR/"README.md"
LONG_DESCRIPTION = README.open().read()
setuptools.setup(
name="mailmerge",
description="A simple, command line ... | <commit_before>"""Mailmerge build and install configuration."""
from pathlib import Path
import setuptools
# Read the contents of README file
PROJECT_DIR = Path(__file__).parent
README = PROJECT_DIR/"README.md"
LONG_DESCRIPTION = README.open().read()
setuptools.setup(
name="mailmerge",
description="A simple... | """Mailmerge build and install configuration."""
from pathlib import Path
import setuptools
# Read the contents of README file
PROJECT_DIR = Path(__file__).parent
README = PROJECT_DIR/"README.md"
LONG_DESCRIPTION = README.open().read()
setuptools.setup(
name="mailmerge",
description="A simple, command line ... | """Mailmerge build and install configuration."""
from pathlib import Path
import setuptools
# Read the contents of README file
PROJECT_DIR = Path(__file__).parent
README = PROJECT_DIR/"README.md"
LONG_DESCRIPTION = README.open().read()
setuptools.setup(
name="mailmerge",
description="A simple, command line ... | <commit_before>"""Mailmerge build and install configuration."""
from pathlib import Path
import setuptools
# Read the contents of README file
PROJECT_DIR = Path(__file__).parent
README = PROJECT_DIR/"README.md"
LONG_DESCRIPTION = README.open().read()
setuptools.setup(
name="mailmerge",
description="A simple... |
2150f71c723d85d7ba2c5756f90c0174b3dc6666 | setup.py | setup.py | #!/usr/bin/env python
from setuptools import setup, find_packages
setup(
name='Flask-RESTful',
version='0.2.5',
url='https://www.github.com/twilio/flask-restful/',
author='Kyle Conroy',
author_email='help@twilio.com',
description='Simple framework for creating REST APIs',
packages=find_pac... | #!/usr/bin/env python
from setuptools import setup, find_packages
setup(
name='Flask-RESTful',
version='0.2.5',
url='https://www.github.com/twilio/flask-restful/',
author='Kyle Conroy',
author_email='help@twilio.com',
description='Simple framework for creating REST APIs',
packages=find_pac... | Fix for chaos security warning CVE-2019-1010083 | Fix for chaos security warning CVE-2019-1010083 | Python | bsd-3-clause | CanalTP/flask-restful | #!/usr/bin/env python
from setuptools import setup, find_packages
setup(
name='Flask-RESTful',
version='0.2.5',
url='https://www.github.com/twilio/flask-restful/',
author='Kyle Conroy',
author_email='help@twilio.com',
description='Simple framework for creating REST APIs',
packages=find_pac... | #!/usr/bin/env python
from setuptools import setup, find_packages
setup(
name='Flask-RESTful',
version='0.2.5',
url='https://www.github.com/twilio/flask-restful/',
author='Kyle Conroy',
author_email='help@twilio.com',
description='Simple framework for creating REST APIs',
packages=find_pac... | <commit_before>#!/usr/bin/env python
from setuptools import setup, find_packages
setup(
name='Flask-RESTful',
version='0.2.5',
url='https://www.github.com/twilio/flask-restful/',
author='Kyle Conroy',
author_email='help@twilio.com',
description='Simple framework for creating REST APIs',
pa... | #!/usr/bin/env python
from setuptools import setup, find_packages
setup(
name='Flask-RESTful',
version='0.2.5',
url='https://www.github.com/twilio/flask-restful/',
author='Kyle Conroy',
author_email='help@twilio.com',
description='Simple framework for creating REST APIs',
packages=find_pac... | #!/usr/bin/env python
from setuptools import setup, find_packages
setup(
name='Flask-RESTful',
version='0.2.5',
url='https://www.github.com/twilio/flask-restful/',
author='Kyle Conroy',
author_email='help@twilio.com',
description='Simple framework for creating REST APIs',
packages=find_pac... | <commit_before>#!/usr/bin/env python
from setuptools import setup, find_packages
setup(
name='Flask-RESTful',
version='0.2.5',
url='https://www.github.com/twilio/flask-restful/',
author='Kyle Conroy',
author_email='help@twilio.com',
description='Simple framework for creating REST APIs',
pa... |
40f40d442964d4eb5a03bbd7580959ecfc530f18 | setup.py | setup.py |
import setuptools
from distutils.core import setup
setup(
name='pydeps',
version='0.9.2',
packages=['pydeps'],
install_requires=[
'enum34'
],
entry_points={
'console_scripts': [
'py2dep = pydeps.py2depgraph:py2depgraph',
'dep2dot = pydeps.depgraph2dot:de... |
import setuptools
from setuptools import setup
#from distutils.core import setup
setup(
name='pydeps',
version='0.9.2',
packages=['pydeps'],
install_requires=[
'enum34'
],
entry_points={
'console_scripts': [
#'py2dep = pydeps.py2depgraph:py2depgraph',
#'... | Drop distutils and alternate entry points. | Drop distutils and alternate entry points.
| Python | bsd-2-clause | thebjorn/pydeps,thebjorn/pydeps |
import setuptools
from distutils.core import setup
setup(
name='pydeps',
version='0.9.2',
packages=['pydeps'],
install_requires=[
'enum34'
],
entry_points={
'console_scripts': [
'py2dep = pydeps.py2depgraph:py2depgraph',
'dep2dot = pydeps.depgraph2dot:de... |
import setuptools
from setuptools import setup
#from distutils.core import setup
setup(
name='pydeps',
version='0.9.2',
packages=['pydeps'],
install_requires=[
'enum34'
],
entry_points={
'console_scripts': [
#'py2dep = pydeps.py2depgraph:py2depgraph',
#'... | <commit_before>
import setuptools
from distutils.core import setup
setup(
name='pydeps',
version='0.9.2',
packages=['pydeps'],
install_requires=[
'enum34'
],
entry_points={
'console_scripts': [
'py2dep = pydeps.py2depgraph:py2depgraph',
'dep2dot = pydeps.... |
import setuptools
from setuptools import setup
#from distutils.core import setup
setup(
name='pydeps',
version='0.9.2',
packages=['pydeps'],
install_requires=[
'enum34'
],
entry_points={
'console_scripts': [
#'py2dep = pydeps.py2depgraph:py2depgraph',
#'... |
import setuptools
from distutils.core import setup
setup(
name='pydeps',
version='0.9.2',
packages=['pydeps'],
install_requires=[
'enum34'
],
entry_points={
'console_scripts': [
'py2dep = pydeps.py2depgraph:py2depgraph',
'dep2dot = pydeps.depgraph2dot:de... | <commit_before>
import setuptools
from distutils.core import setup
setup(
name='pydeps',
version='0.9.2',
packages=['pydeps'],
install_requires=[
'enum34'
],
entry_points={
'console_scripts': [
'py2dep = pydeps.py2depgraph:py2depgraph',
'dep2dot = pydeps.... |
9da7843cc9add30af30186aa83ebd157cfb5a1c0 | setup.py | setup.py | try:
from setuptools import setup
except ImportError:
from distutils.core import setup
from ansible_vault_diff import __version__ as version
config = {
'description': 'Tool used to display a diff of two ansible-vault encrypted repos',
'author': 'Brandon Myers',
'url': 'https://github.com/pwnbus/... | try:
from setuptools import setup
except ImportError:
from distutils.core import setup
from ansible_vault_diff import __version__ as version
config = {
'description': 'Tool used to display a diff of two ansible-vault encrypted repos',
'author': 'Brandon Myers',
'url': 'https://github.com/pwnbus/... | Add ansible as a dependency | Add ansible as a dependency
| Python | mit | pwnbus/ansible-vault-diff | try:
from setuptools import setup
except ImportError:
from distutils.core import setup
from ansible_vault_diff import __version__ as version
config = {
'description': 'Tool used to display a diff of two ansible-vault encrypted repos',
'author': 'Brandon Myers',
'url': 'https://github.com/pwnbus/... | try:
from setuptools import setup
except ImportError:
from distutils.core import setup
from ansible_vault_diff import __version__ as version
config = {
'description': 'Tool used to display a diff of two ansible-vault encrypted repos',
'author': 'Brandon Myers',
'url': 'https://github.com/pwnbus/... | <commit_before>try:
from setuptools import setup
except ImportError:
from distutils.core import setup
from ansible_vault_diff import __version__ as version
config = {
'description': 'Tool used to display a diff of two ansible-vault encrypted repos',
'author': 'Brandon Myers',
'url': 'https://git... | try:
from setuptools import setup
except ImportError:
from distutils.core import setup
from ansible_vault_diff import __version__ as version
config = {
'description': 'Tool used to display a diff of two ansible-vault encrypted repos',
'author': 'Brandon Myers',
'url': 'https://github.com/pwnbus/... | try:
from setuptools import setup
except ImportError:
from distutils.core import setup
from ansible_vault_diff import __version__ as version
config = {
'description': 'Tool used to display a diff of two ansible-vault encrypted repos',
'author': 'Brandon Myers',
'url': 'https://github.com/pwnbus/... | <commit_before>try:
from setuptools import setup
except ImportError:
from distutils.core import setup
from ansible_vault_diff import __version__ as version
config = {
'description': 'Tool used to display a diff of two ansible-vault encrypted repos',
'author': 'Brandon Myers',
'url': 'https://git... |
8fa28f4d78c4c2ffb23c8088a4983a77a41cd805 | setup.py | setup.py | from setuptools import setup, find_packages
setup(name='pyscores',
version='0.2',
description='Football (soccer) scores in your command line',
url='https://github.com/conormag94/pyscores',
author='Conor Maguire',
author_email='conormag94@gmail.com',
license='MIT',
packages=fin... | from setuptools import setup, find_packages
setup(name='pyscores',
version='0.2',
description='Football (soccer) scores in your command line',
url='https://github.com/conormag94/pyscores',
author='Conor Maguire',
author_email='conormag94@gmail.com',
license='MIT',
packages=fin... | Rename console entry point from __main__ to cli | Rename console entry point from __main__ to cli
| Python | mit | conormag94/pyscores | from setuptools import setup, find_packages
setup(name='pyscores',
version='0.2',
description='Football (soccer) scores in your command line',
url='https://github.com/conormag94/pyscores',
author='Conor Maguire',
author_email='conormag94@gmail.com',
license='MIT',
packages=fin... | from setuptools import setup, find_packages
setup(name='pyscores',
version='0.2',
description='Football (soccer) scores in your command line',
url='https://github.com/conormag94/pyscores',
author='Conor Maguire',
author_email='conormag94@gmail.com',
license='MIT',
packages=fin... | <commit_before>from setuptools import setup, find_packages
setup(name='pyscores',
version='0.2',
description='Football (soccer) scores in your command line',
url='https://github.com/conormag94/pyscores',
author='Conor Maguire',
author_email='conormag94@gmail.com',
license='MIT',
... | from setuptools import setup, find_packages
setup(name='pyscores',
version='0.2',
description='Football (soccer) scores in your command line',
url='https://github.com/conormag94/pyscores',
author='Conor Maguire',
author_email='conormag94@gmail.com',
license='MIT',
packages=fin... | from setuptools import setup, find_packages
setup(name='pyscores',
version='0.2',
description='Football (soccer) scores in your command line',
url='https://github.com/conormag94/pyscores',
author='Conor Maguire',
author_email='conormag94@gmail.com',
license='MIT',
packages=fin... | <commit_before>from setuptools import setup, find_packages
setup(name='pyscores',
version='0.2',
description='Football (soccer) scores in your command line',
url='https://github.com/conormag94/pyscores',
author='Conor Maguire',
author_email='conormag94@gmail.com',
license='MIT',
... |
62288de60f1407fa03dfa3e4605a8383b580f881 | setup.py | setup.py | from setuptools import setup
setup(
name='tangled.mako',
version='1.0a4.dev0',
description='Tangled Mako integration',
long_description=open('README.rst').read(),
url='http://tangledframework.org/',
download_url='https://github.com/TangledWeb/tangled.mako/tags',
author='Wyatt Baldwin',
... | from setuptools import setup
setup(
name='tangled.mako',
version='1.0a4.dev0',
description='Tangled Mako integration',
long_description=open('README.rst').read(),
url='http://tangledframework.org/',
download_url='https://github.com/TangledWeb/tangled.mako/tags',
author='Wyatt Baldwin',
... | Upgrade tangled.web 0.1a10 => 1.0a12 | Upgrade tangled.web 0.1a10 => 1.0a12
| Python | mit | TangledWeb/tangled.mako | from setuptools import setup
setup(
name='tangled.mako',
version='1.0a4.dev0',
description='Tangled Mako integration',
long_description=open('README.rst').read(),
url='http://tangledframework.org/',
download_url='https://github.com/TangledWeb/tangled.mako/tags',
author='Wyatt Baldwin',
... | from setuptools import setup
setup(
name='tangled.mako',
version='1.0a4.dev0',
description='Tangled Mako integration',
long_description=open('README.rst').read(),
url='http://tangledframework.org/',
download_url='https://github.com/TangledWeb/tangled.mako/tags',
author='Wyatt Baldwin',
... | <commit_before>from setuptools import setup
setup(
name='tangled.mako',
version='1.0a4.dev0',
description='Tangled Mako integration',
long_description=open('README.rst').read(),
url='http://tangledframework.org/',
download_url='https://github.com/TangledWeb/tangled.mako/tags',
author='Wyat... | from setuptools import setup
setup(
name='tangled.mako',
version='1.0a4.dev0',
description='Tangled Mako integration',
long_description=open('README.rst').read(),
url='http://tangledframework.org/',
download_url='https://github.com/TangledWeb/tangled.mako/tags',
author='Wyatt Baldwin',
... | from setuptools import setup
setup(
name='tangled.mako',
version='1.0a4.dev0',
description='Tangled Mako integration',
long_description=open('README.rst').read(),
url='http://tangledframework.org/',
download_url='https://github.com/TangledWeb/tangled.mako/tags',
author='Wyatt Baldwin',
... | <commit_before>from setuptools import setup
setup(
name='tangled.mako',
version='1.0a4.dev0',
description='Tangled Mako integration',
long_description=open('README.rst').read(),
url='http://tangledframework.org/',
download_url='https://github.com/TangledWeb/tangled.mako/tags',
author='Wyat... |
a50bc1908661daf0014ab7068488abbe1245d368 | setup.py | setup.py | #!/usr/bin/env python
import os
from distutils.core import setup
from setuptools import find_packages
from pip.req import parse_requirements
os.chdir('OIPA')
install_requirements = parse_requirements('requirements.txt', session=False)
requirements = [str(ir.req) for ir in install_requirements]
setup(name='OIPA',
... | #!/usr/bin/env python
from setuptools import setup, find_packages
from pip.req import parse_requirements
install_requirements = parse_requirements('OIPA/requirements.txt', session=False)
requirements = [str(ir.req) for ir in install_requirements]
setup(name='OIPA',
version='2.1.3',
author='Zimmerman & Zi... | Fix packaging to allow non-editable installation | Fix packaging to allow non-editable installation
| Python | agpl-3.0 | catalpainternational/OIPA,catalpainternational/OIPA,catalpainternational/OIPA,catalpainternational/OIPA | #!/usr/bin/env python
import os
from distutils.core import setup
from setuptools import find_packages
from pip.req import parse_requirements
os.chdir('OIPA')
install_requirements = parse_requirements('requirements.txt', session=False)
requirements = [str(ir.req) for ir in install_requirements]
setup(name='OIPA',
... | #!/usr/bin/env python
from setuptools import setup, find_packages
from pip.req import parse_requirements
install_requirements = parse_requirements('OIPA/requirements.txt', session=False)
requirements = [str(ir.req) for ir in install_requirements]
setup(name='OIPA',
version='2.1.3',
author='Zimmerman & Zi... | <commit_before>#!/usr/bin/env python
import os
from distutils.core import setup
from setuptools import find_packages
from pip.req import parse_requirements
os.chdir('OIPA')
install_requirements = parse_requirements('requirements.txt', session=False)
requirements = [str(ir.req) for ir in install_requirements]
setup(n... | #!/usr/bin/env python
from setuptools import setup, find_packages
from pip.req import parse_requirements
install_requirements = parse_requirements('OIPA/requirements.txt', session=False)
requirements = [str(ir.req) for ir in install_requirements]
setup(name='OIPA',
version='2.1.3',
author='Zimmerman & Zi... | #!/usr/bin/env python
import os
from distutils.core import setup
from setuptools import find_packages
from pip.req import parse_requirements
os.chdir('OIPA')
install_requirements = parse_requirements('requirements.txt', session=False)
requirements = [str(ir.req) for ir in install_requirements]
setup(name='OIPA',
... | <commit_before>#!/usr/bin/env python
import os
from distutils.core import setup
from setuptools import find_packages
from pip.req import parse_requirements
os.chdir('OIPA')
install_requirements = parse_requirements('requirements.txt', session=False)
requirements = [str(ir.req) for ir in install_requirements]
setup(n... |
e44821e50b4d8eb1aff8906703696ae2ae7fb889 | setup.py | setup.py | #!/usr/bin/env python
from setuptools import setup, find_packages
setup(
name='django-fsm-log',
version='1.2.1',
description='Logging for django-fsm',
author='Gizmag',
author_email='tech@gizmag.com',
url='https://github.com/gizmag/django-fsm-log',
packages=find_packages(),
install_requ... | #!/usr/bin/env python
from setuptools import setup, find_packages
setup(
name='django-fsm-log',
version='1.2.1',
description='Logging for django-fsm',
author='Gizmag',
author_email='tech@gizmag.com',
url='https://github.com/gizmag/django-fsm-log',
packages=find_packages(),
install_requ... | Add Django 1.9 to classifiers | Add Django 1.9 to classifiers
| Python | mit | gizmag/django-fsm-log,ticosax/django-fsm-log | #!/usr/bin/env python
from setuptools import setup, find_packages
setup(
name='django-fsm-log',
version='1.2.1',
description='Logging for django-fsm',
author='Gizmag',
author_email='tech@gizmag.com',
url='https://github.com/gizmag/django-fsm-log',
packages=find_packages(),
install_requ... | #!/usr/bin/env python
from setuptools import setup, find_packages
setup(
name='django-fsm-log',
version='1.2.1',
description='Logging for django-fsm',
author='Gizmag',
author_email='tech@gizmag.com',
url='https://github.com/gizmag/django-fsm-log',
packages=find_packages(),
install_requ... | <commit_before>#!/usr/bin/env python
from setuptools import setup, find_packages
setup(
name='django-fsm-log',
version='1.2.1',
description='Logging for django-fsm',
author='Gizmag',
author_email='tech@gizmag.com',
url='https://github.com/gizmag/django-fsm-log',
packages=find_packages(),
... | #!/usr/bin/env python
from setuptools import setup, find_packages
setup(
name='django-fsm-log',
version='1.2.1',
description='Logging for django-fsm',
author='Gizmag',
author_email='tech@gizmag.com',
url='https://github.com/gizmag/django-fsm-log',
packages=find_packages(),
install_requ... | #!/usr/bin/env python
from setuptools import setup, find_packages
setup(
name='django-fsm-log',
version='1.2.1',
description='Logging for django-fsm',
author='Gizmag',
author_email='tech@gizmag.com',
url='https://github.com/gizmag/django-fsm-log',
packages=find_packages(),
install_requ... | <commit_before>#!/usr/bin/env python
from setuptools import setup, find_packages
setup(
name='django-fsm-log',
version='1.2.1',
description='Logging for django-fsm',
author='Gizmag',
author_email='tech@gizmag.com',
url='https://github.com/gizmag/django-fsm-log',
packages=find_packages(),
... |
9d248a665c3dd17688e16253c484f9e05de4f1cb | setup.py | setup.py | import os
from setuptools import setup
README = open(os.path.join(os.path.dirname(__file__), 'README.md')).read()
# allow setup.py to be run from any path
os.chdir(os.path.normpath(os.path.join(os.path.abspath(__file__), os.pardir)))
setup(
name='mdot-rest',
version='0.1',
packages=['mdot_rest'],
inc... | import os
from setuptools import setup
README = open(os.path.join(os.path.dirname(__file__), 'README.md')).read()
# allow setup.py to be run from any path
os.chdir(os.path.normpath(os.path.join(os.path.abspath(__file__), os.pardir)))
setup(
name='mdot-rest',
version='0.1',
packages=['mdot_rest'],
inc... | Revert "<1.9 gets you 1.9rc1 >_>" | Revert "<1.9 gets you 1.9rc1 >_>"
This reverts commit 22c05944a233e245f7f013e4aa872c938f8a663f.
| Python | apache-2.0 | uw-it-aca/mdot-rest,uw-it-aca/mdot-rest | import os
from setuptools import setup
README = open(os.path.join(os.path.dirname(__file__), 'README.md')).read()
# allow setup.py to be run from any path
os.chdir(os.path.normpath(os.path.join(os.path.abspath(__file__), os.pardir)))
setup(
name='mdot-rest',
version='0.1',
packages=['mdot_rest'],
inc... | import os
from setuptools import setup
README = open(os.path.join(os.path.dirname(__file__), 'README.md')).read()
# allow setup.py to be run from any path
os.chdir(os.path.normpath(os.path.join(os.path.abspath(__file__), os.pardir)))
setup(
name='mdot-rest',
version='0.1',
packages=['mdot_rest'],
inc... | <commit_before>import os
from setuptools import setup
README = open(os.path.join(os.path.dirname(__file__), 'README.md')).read()
# allow setup.py to be run from any path
os.chdir(os.path.normpath(os.path.join(os.path.abspath(__file__), os.pardir)))
setup(
name='mdot-rest',
version='0.1',
packages=['mdot_... | import os
from setuptools import setup
README = open(os.path.join(os.path.dirname(__file__), 'README.md')).read()
# allow setup.py to be run from any path
os.chdir(os.path.normpath(os.path.join(os.path.abspath(__file__), os.pardir)))
setup(
name='mdot-rest',
version='0.1',
packages=['mdot_rest'],
inc... | import os
from setuptools import setup
README = open(os.path.join(os.path.dirname(__file__), 'README.md')).read()
# allow setup.py to be run from any path
os.chdir(os.path.normpath(os.path.join(os.path.abspath(__file__), os.pardir)))
setup(
name='mdot-rest',
version='0.1',
packages=['mdot_rest'],
inc... | <commit_before>import os
from setuptools import setup
README = open(os.path.join(os.path.dirname(__file__), 'README.md')).read()
# allow setup.py to be run from any path
os.chdir(os.path.normpath(os.path.join(os.path.abspath(__file__), os.pardir)))
setup(
name='mdot-rest',
version='0.1',
packages=['mdot_... |
f71b166523ee3772d2ff931f9e2a893303654cb4 | IPython/core/tests/test_imports.py | IPython/core/tests/test_imports.py | # encoding: utf-8
def test_import_completer():
from IPython.core import completer
def test_import_crashhandler():
from IPython.core import crashhandler
def test_import_debugger():
from IPython.core import debugger
def test_import_fakemodule():
from IPython.core import fakemodule
def test_import_exc... | # encoding: utf-8
def test_import_completer():
from IPython.core import completer
def test_import_crashhandler():
from IPython.core import crashhandler
def test_import_debugger():
from IPython.core import debugger
def test_import_excolors():
from IPython.core import excolors
def test_import_history... | Drop test for importing fakemodule | Drop test for importing fakemodule
| Python | bsd-3-clause | ipython/ipython,ipython/ipython | # encoding: utf-8
def test_import_completer():
from IPython.core import completer
def test_import_crashhandler():
from IPython.core import crashhandler
def test_import_debugger():
from IPython.core import debugger
def test_import_fakemodule():
from IPython.core import fakemodule
def test_import_exc... | # encoding: utf-8
def test_import_completer():
from IPython.core import completer
def test_import_crashhandler():
from IPython.core import crashhandler
def test_import_debugger():
from IPython.core import debugger
def test_import_excolors():
from IPython.core import excolors
def test_import_history... | <commit_before># encoding: utf-8
def test_import_completer():
from IPython.core import completer
def test_import_crashhandler():
from IPython.core import crashhandler
def test_import_debugger():
from IPython.core import debugger
def test_import_fakemodule():
from IPython.core import fakemodule
def ... | # encoding: utf-8
def test_import_completer():
from IPython.core import completer
def test_import_crashhandler():
from IPython.core import crashhandler
def test_import_debugger():
from IPython.core import debugger
def test_import_excolors():
from IPython.core import excolors
def test_import_history... | # encoding: utf-8
def test_import_completer():
from IPython.core import completer
def test_import_crashhandler():
from IPython.core import crashhandler
def test_import_debugger():
from IPython.core import debugger
def test_import_fakemodule():
from IPython.core import fakemodule
def test_import_exc... | <commit_before># encoding: utf-8
def test_import_completer():
from IPython.core import completer
def test_import_crashhandler():
from IPython.core import crashhandler
def test_import_debugger():
from IPython.core import debugger
def test_import_fakemodule():
from IPython.core import fakemodule
def ... |
902b2b0929dad116664d37a13ff325a10b67db7b | catalog/queue/sqs.py | catalog/queue/sqs.py | from Queue import Queue, Empty
import json
from .base import BaseQueue
sqs = None
def do_delayed_imports():
global sqs
from boto import sqs
class SQSQueue(BaseQueue):
_cache = Queue()
def __init__(self):
BaseQueue.__init__(self)
do_delayed_imports()
self.conn = sqs.connect_t... | from multiprocessing import Queue
from Queue import Empty
import json
from .base import BaseQueue
sqs = None
def do_delayed_imports():
global sqs
from boto import sqs
class SQSQueue(BaseQueue):
_cache = Queue()
def __init__(self):
BaseQueue.__init__(self)
do_delayed_imports()
... | Use queue from multiprocessing library instead of Queue | Use queue from multiprocessing library instead of Queue
| Python | mpl-2.0 | mozilla/structured-catalog | from Queue import Queue, Empty
import json
from .base import BaseQueue
sqs = None
def do_delayed_imports():
global sqs
from boto import sqs
class SQSQueue(BaseQueue):
_cache = Queue()
def __init__(self):
BaseQueue.__init__(self)
do_delayed_imports()
self.conn = sqs.connect_t... | from multiprocessing import Queue
from Queue import Empty
import json
from .base import BaseQueue
sqs = None
def do_delayed_imports():
global sqs
from boto import sqs
class SQSQueue(BaseQueue):
_cache = Queue()
def __init__(self):
BaseQueue.__init__(self)
do_delayed_imports()
... | <commit_before>from Queue import Queue, Empty
import json
from .base import BaseQueue
sqs = None
def do_delayed_imports():
global sqs
from boto import sqs
class SQSQueue(BaseQueue):
_cache = Queue()
def __init__(self):
BaseQueue.__init__(self)
do_delayed_imports()
self.conn ... | from multiprocessing import Queue
from Queue import Empty
import json
from .base import BaseQueue
sqs = None
def do_delayed_imports():
global sqs
from boto import sqs
class SQSQueue(BaseQueue):
_cache = Queue()
def __init__(self):
BaseQueue.__init__(self)
do_delayed_imports()
... | from Queue import Queue, Empty
import json
from .base import BaseQueue
sqs = None
def do_delayed_imports():
global sqs
from boto import sqs
class SQSQueue(BaseQueue):
_cache = Queue()
def __init__(self):
BaseQueue.__init__(self)
do_delayed_imports()
self.conn = sqs.connect_t... | <commit_before>from Queue import Queue, Empty
import json
from .base import BaseQueue
sqs = None
def do_delayed_imports():
global sqs
from boto import sqs
class SQSQueue(BaseQueue):
_cache = Queue()
def __init__(self):
BaseQueue.__init__(self)
do_delayed_imports()
self.conn ... |
37cb8d17871045b47af684e856e216d628c964f4 | src/mmw/apps/modeling/migrations/0024_fix_gwlfe_gis_data.py | src/mmw/apps/modeling/migrations/0024_fix_gwlfe_gis_data.py | # -*- coding: utf-8 -*-
from django.db import migrations
def fix_gis_data_serialization(apps, schema_editor):
"""
Release 1.20.0 introduced a change which let the project "gis_data"
field get updated by modifications on a scenario. This effectively
meant that modifications were being applied to all s... | # -*- coding: utf-8 -*-
from datetime import datetime
from django.db import migrations
from django.utils.timezone import make_aware
def fix_gis_data_serialization(apps, schema_editor):
"""
Release 1.20.0 introduced a change which let the project "gis_data"
field get updated by modifications on a scenario... | Update old migration with tz-aware dates | Update old migration with tz-aware dates
This won't have a real affect since this migration has been run
years ago. However, it was causing RuntimeWarnings in Django, saying
that a DateTimeField received a naive datetime.
By wrapping it in Django's make_aware, the correct timezone is
applied.
| Python | apache-2.0 | WikiWatershed/model-my-watershed,WikiWatershed/model-my-watershed,WikiWatershed/model-my-watershed,WikiWatershed/model-my-watershed,WikiWatershed/model-my-watershed | # -*- coding: utf-8 -*-
from django.db import migrations
def fix_gis_data_serialization(apps, schema_editor):
"""
Release 1.20.0 introduced a change which let the project "gis_data"
field get updated by modifications on a scenario. This effectively
meant that modifications were being applied to all s... | # -*- coding: utf-8 -*-
from datetime import datetime
from django.db import migrations
from django.utils.timezone import make_aware
def fix_gis_data_serialization(apps, schema_editor):
"""
Release 1.20.0 introduced a change which let the project "gis_data"
field get updated by modifications on a scenario... | <commit_before># -*- coding: utf-8 -*-
from django.db import migrations
def fix_gis_data_serialization(apps, schema_editor):
"""
Release 1.20.0 introduced a change which let the project "gis_data"
field get updated by modifications on a scenario. This effectively
meant that modifications were being a... | # -*- coding: utf-8 -*-
from datetime import datetime
from django.db import migrations
from django.utils.timezone import make_aware
def fix_gis_data_serialization(apps, schema_editor):
"""
Release 1.20.0 introduced a change which let the project "gis_data"
field get updated by modifications on a scenario... | # -*- coding: utf-8 -*-
from django.db import migrations
def fix_gis_data_serialization(apps, schema_editor):
"""
Release 1.20.0 introduced a change which let the project "gis_data"
field get updated by modifications on a scenario. This effectively
meant that modifications were being applied to all s... | <commit_before># -*- coding: utf-8 -*-
from django.db import migrations
def fix_gis_data_serialization(apps, schema_editor):
"""
Release 1.20.0 introduced a change which let the project "gis_data"
field get updated by modifications on a scenario. This effectively
meant that modifications were being a... |
15463168ed715761eaf483a1e53eb74d92b83e04 | tests.py | tests.py | import unittest
import fuckit_commit
class Fuckit_CommitTestCase(unittest.TestCase):
'''
Unit Test cases for fuckit_commit
'''
def setUp(self):
pass
def test_send_sms(self):
pass
def tearDown(self):
pass
if __name__ == '__main__':
unittest.main()
| import unittest
import json
from twilio.rest import TwilioRestClient
import fuckit_commit
class Fuckit_CommitTestCase(unittest.TestCase):
'''
Unit Test cases for fuckit_commit
'''
def setUp(self):
with open('configuration.json') as f:
self.config = json.load(f)
def test_send_sms(self):
cli... | Add test to send sms | Add test to send sms
| Python | mit | ueg1990/fuckit_commit | import unittest
import fuckit_commit
class Fuckit_CommitTestCase(unittest.TestCase):
'''
Unit Test cases for fuckit_commit
'''
def setUp(self):
pass
def test_send_sms(self):
pass
def tearDown(self):
pass
if __name__ == '__main__':
unittest.main()
Add test to send sms | import unittest
import json
from twilio.rest import TwilioRestClient
import fuckit_commit
class Fuckit_CommitTestCase(unittest.TestCase):
'''
Unit Test cases for fuckit_commit
'''
def setUp(self):
with open('configuration.json') as f:
self.config = json.load(f)
def test_send_sms(self):
cli... | <commit_before>import unittest
import fuckit_commit
class Fuckit_CommitTestCase(unittest.TestCase):
'''
Unit Test cases for fuckit_commit
'''
def setUp(self):
pass
def test_send_sms(self):
pass
def tearDown(self):
pass
if __name__ == '__main__':
unittest.main()
<commit_msg>Add ... | import unittest
import json
from twilio.rest import TwilioRestClient
import fuckit_commit
class Fuckit_CommitTestCase(unittest.TestCase):
'''
Unit Test cases for fuckit_commit
'''
def setUp(self):
with open('configuration.json') as f:
self.config = json.load(f)
def test_send_sms(self):
cli... | import unittest
import fuckit_commit
class Fuckit_CommitTestCase(unittest.TestCase):
'''
Unit Test cases for fuckit_commit
'''
def setUp(self):
pass
def test_send_sms(self):
pass
def tearDown(self):
pass
if __name__ == '__main__':
unittest.main()
Add test to send smsimport unit... | <commit_before>import unittest
import fuckit_commit
class Fuckit_CommitTestCase(unittest.TestCase):
'''
Unit Test cases for fuckit_commit
'''
def setUp(self):
pass
def test_send_sms(self):
pass
def tearDown(self):
pass
if __name__ == '__main__':
unittest.main()
<commit_msg>Add ... |
1902ed44f41eabf1c8207e47d5c31dd58471146f | pymunk/transform.py | pymunk/transform.py | from typing import NamedTuple
class Transform(NamedTuple):
"""Type used for 2x3 affine transforms.
See wikipedia for details:
http://en.wikipedia.org/wiki/Affine_transformation
The properties map to the matrix in this way:
= = ==
= = ==
a c tx
b d ty
= = ==
An instance can ... | import math
from typing import NamedTuple
class Transform(NamedTuple):
"""Type used for 2x3 affine transforms.
See wikipedia for details:
http://en.wikipedia.org/wiki/Affine_transformation
The properties map to the matrix in this way:
= = ==
= = ==
a c tx
b d ty
= = ==
An i... | Add some helper methods to create translate, scale and rotate Transforms. | Add some helper methods to create translate, scale and rotate Transforms.
| Python | mit | viblo/pymunk,viblo/pymunk | from typing import NamedTuple
class Transform(NamedTuple):
"""Type used for 2x3 affine transforms.
See wikipedia for details:
http://en.wikipedia.org/wiki/Affine_transformation
The properties map to the matrix in this way:
= = ==
= = ==
a c tx
b d ty
= = ==
An instance can ... | import math
from typing import NamedTuple
class Transform(NamedTuple):
"""Type used for 2x3 affine transforms.
See wikipedia for details:
http://en.wikipedia.org/wiki/Affine_transformation
The properties map to the matrix in this way:
= = ==
= = ==
a c tx
b d ty
= = ==
An i... | <commit_before>from typing import NamedTuple
class Transform(NamedTuple):
"""Type used for 2x3 affine transforms.
See wikipedia for details:
http://en.wikipedia.org/wiki/Affine_transformation
The properties map to the matrix in this way:
= = ==
= = ==
a c tx
b d ty
= = ==
A... | import math
from typing import NamedTuple
class Transform(NamedTuple):
"""Type used for 2x3 affine transforms.
See wikipedia for details:
http://en.wikipedia.org/wiki/Affine_transformation
The properties map to the matrix in this way:
= = ==
= = ==
a c tx
b d ty
= = ==
An i... | from typing import NamedTuple
class Transform(NamedTuple):
"""Type used for 2x3 affine transforms.
See wikipedia for details:
http://en.wikipedia.org/wiki/Affine_transformation
The properties map to the matrix in this way:
= = ==
= = ==
a c tx
b d ty
= = ==
An instance can ... | <commit_before>from typing import NamedTuple
class Transform(NamedTuple):
"""Type used for 2x3 affine transforms.
See wikipedia for details:
http://en.wikipedia.org/wiki/Affine_transformation
The properties map to the matrix in this way:
= = ==
= = ==
a c tx
b d ty
= = ==
A... |
feb88aa30b362e02671d51d8b3e03a7194d99646 | kobra/urls.py | kobra/urls.py | # -*- coding: utf-8 -*-
from django.conf.urls import include, url
from django.contrib import admin
from .views import web_client_view
urlpatterns = [
# url(r'^', include('kobra.api.v1.urls', namespace='legacy')),
url(r'^api/v1/', include('kobra.api.v1.urls', namespace='v1')),
url(r'^admin/', include(adm... | # -*- coding: utf-8 -*-
from django.conf.urls import include, url
from django.contrib import admin
from .views import web_client_view
urlpatterns = [
# url(r'^', include('kobra.api.v1.urls', namespace='legacy')),
url(r'^api/v1/', include('kobra.api.v1.urls', namespace='v1')),
url(r'^admin/', include(adm... | Fix for broken static file serving | Fix for broken static file serving
| Python | mit | karservice/kobra,karservice/kobra,karservice/kobra,karservice/kobra | # -*- coding: utf-8 -*-
from django.conf.urls import include, url
from django.contrib import admin
from .views import web_client_view
urlpatterns = [
# url(r'^', include('kobra.api.v1.urls', namespace='legacy')),
url(r'^api/v1/', include('kobra.api.v1.urls', namespace='v1')),
url(r'^admin/', include(adm... | # -*- coding: utf-8 -*-
from django.conf.urls import include, url
from django.contrib import admin
from .views import web_client_view
urlpatterns = [
# url(r'^', include('kobra.api.v1.urls', namespace='legacy')),
url(r'^api/v1/', include('kobra.api.v1.urls', namespace='v1')),
url(r'^admin/', include(adm... | <commit_before># -*- coding: utf-8 -*-
from django.conf.urls import include, url
from django.contrib import admin
from .views import web_client_view
urlpatterns = [
# url(r'^', include('kobra.api.v1.urls', namespace='legacy')),
url(r'^api/v1/', include('kobra.api.v1.urls', namespace='v1')),
url(r'^admin... | # -*- coding: utf-8 -*-
from django.conf.urls import include, url
from django.contrib import admin
from .views import web_client_view
urlpatterns = [
# url(r'^', include('kobra.api.v1.urls', namespace='legacy')),
url(r'^api/v1/', include('kobra.api.v1.urls', namespace='v1')),
url(r'^admin/', include(adm... | # -*- coding: utf-8 -*-
from django.conf.urls import include, url
from django.contrib import admin
from .views import web_client_view
urlpatterns = [
# url(r'^', include('kobra.api.v1.urls', namespace='legacy')),
url(r'^api/v1/', include('kobra.api.v1.urls', namespace='v1')),
url(r'^admin/', include(adm... | <commit_before># -*- coding: utf-8 -*-
from django.conf.urls import include, url
from django.contrib import admin
from .views import web_client_view
urlpatterns = [
# url(r'^', include('kobra.api.v1.urls', namespace='legacy')),
url(r'^api/v1/', include('kobra.api.v1.urls', namespace='v1')),
url(r'^admin... |
459916c800f09e7600ae7442bb34236b9f418f53 | feedhq/utils.py | feedhq/utils.py | # -*- coding: utf-8 -*-
from django.conf import settings
from django.core.validators import EmailValidator, ValidationError
import redis
def get_redis_connection():
"""
Helper used for obtain a raw redis client.
"""
from redis_cache.cache import pool
connection_pool = pool.get_connection_pool(
... | # -*- coding: utf-8 -*-
from django.conf import settings
from django.core.validators import EmailValidator, ValidationError
import redis
def get_redis_connection():
"""
Helper used for obtain a raw redis client.
"""
from redis_cache.cache import pool
client = redis.Redis(**settings.REDIS)
cli... | Update method of getting redis connection | Update method of getting redis connection
| Python | bsd-3-clause | feedhq/feedhq,rmoorman/feedhq,rmoorman/feedhq,rmoorman/feedhq,rmoorman/feedhq,feedhq/feedhq,feedhq/feedhq,feedhq/feedhq,feedhq/feedhq,rmoorman/feedhq | # -*- coding: utf-8 -*-
from django.conf import settings
from django.core.validators import EmailValidator, ValidationError
import redis
def get_redis_connection():
"""
Helper used for obtain a raw redis client.
"""
from redis_cache.cache import pool
connection_pool = pool.get_connection_pool(
... | # -*- coding: utf-8 -*-
from django.conf import settings
from django.core.validators import EmailValidator, ValidationError
import redis
def get_redis_connection():
"""
Helper used for obtain a raw redis client.
"""
from redis_cache.cache import pool
client = redis.Redis(**settings.REDIS)
cli... | <commit_before># -*- coding: utf-8 -*-
from django.conf import settings
from django.core.validators import EmailValidator, ValidationError
import redis
def get_redis_connection():
"""
Helper used for obtain a raw redis client.
"""
from redis_cache.cache import pool
connection_pool = pool.get_conn... | # -*- coding: utf-8 -*-
from django.conf import settings
from django.core.validators import EmailValidator, ValidationError
import redis
def get_redis_connection():
"""
Helper used for obtain a raw redis client.
"""
from redis_cache.cache import pool
client = redis.Redis(**settings.REDIS)
cli... | # -*- coding: utf-8 -*-
from django.conf import settings
from django.core.validators import EmailValidator, ValidationError
import redis
def get_redis_connection():
"""
Helper used for obtain a raw redis client.
"""
from redis_cache.cache import pool
connection_pool = pool.get_connection_pool(
... | <commit_before># -*- coding: utf-8 -*-
from django.conf import settings
from django.core.validators import EmailValidator, ValidationError
import redis
def get_redis_connection():
"""
Helper used for obtain a raw redis client.
"""
from redis_cache.cache import pool
connection_pool = pool.get_conn... |
9ad85436f2b47aa76246eccc8b9fc4361db86f4f | xmantissa/examples/autoapp.py | xmantissa/examples/autoapp.py |
from axiom.store import Store
from axiom.userbase import LoginSystem
from xmantissa.webadmin import DeveloperApplication, DONTUSETHISBenefactor
from xmantissa.webapp import PrivateApplication
from xmantissa.website import WebSite
from xmantissa.signup import FreeTicketSignup, TicketBooth
s = Store("test.axiom", debu... |
from axiom.store import Store
from axiom.userbase import LoginSystem
from xmantissa.webadmin import DeveloperSite, DeveloperApplication, DONTUSETHISBenefactor
from xmantissa.webapp import PrivateApplication
from xmantissa.website import WebSite
from xmantissa.signup import FreeTicketSignup, TicketBooth
s = Store("te... | Install DeveloperSite on the main store so the repl can workish | Install DeveloperSite on the main store so the repl can workish | Python | mit | twisted/mantissa,twisted/mantissa,twisted/mantissa |
from axiom.store import Store
from axiom.userbase import LoginSystem
from xmantissa.webadmin import DeveloperApplication, DONTUSETHISBenefactor
from xmantissa.webapp import PrivateApplication
from xmantissa.website import WebSite
from xmantissa.signup import FreeTicketSignup, TicketBooth
s = Store("test.axiom", debu... |
from axiom.store import Store
from axiom.userbase import LoginSystem
from xmantissa.webadmin import DeveloperSite, DeveloperApplication, DONTUSETHISBenefactor
from xmantissa.webapp import PrivateApplication
from xmantissa.website import WebSite
from xmantissa.signup import FreeTicketSignup, TicketBooth
s = Store("te... | <commit_before>
from axiom.store import Store
from axiom.userbase import LoginSystem
from xmantissa.webadmin import DeveloperApplication, DONTUSETHISBenefactor
from xmantissa.webapp import PrivateApplication
from xmantissa.website import WebSite
from xmantissa.signup import FreeTicketSignup, TicketBooth
s = Store("te... |
from axiom.store import Store
from axiom.userbase import LoginSystem
from xmantissa.webadmin import DeveloperSite, DeveloperApplication, DONTUSETHISBenefactor
from xmantissa.webapp import PrivateApplication
from xmantissa.website import WebSite
from xmantissa.signup import FreeTicketSignup, TicketBooth
s = Store("te... |
from axiom.store import Store
from axiom.userbase import LoginSystem
from xmantissa.webadmin import DeveloperApplication, DONTUSETHISBenefactor
from xmantissa.webapp import PrivateApplication
from xmantissa.website import WebSite
from xmantissa.signup import FreeTicketSignup, TicketBooth
s = Store("test.axiom", debu... | <commit_before>
from axiom.store import Store
from axiom.userbase import LoginSystem
from xmantissa.webadmin import DeveloperApplication, DONTUSETHISBenefactor
from xmantissa.webapp import PrivateApplication
from xmantissa.website import WebSite
from xmantissa.signup import FreeTicketSignup, TicketBooth
s = Store("te... |
cb30232b201934622efb2f972cca5087a1373cf7 | src/waldur_mastermind/marketplace_remote/extension.py | src/waldur_mastermind/marketplace_remote/extension.py | from waldur_core.core import WaldurExtension
class MarketplaceRemoteExtension(WaldurExtension):
@staticmethod
def django_app():
return 'waldur_mastermind.marketplace_remote'
@staticmethod
def is_assembly():
return True
@staticmethod
def django_urls():
from .urls impor... | from waldur_core.core import WaldurExtension
class MarketplaceRemoteExtension(WaldurExtension):
@staticmethod
def django_app():
return 'waldur_mastermind.marketplace_remote'
@staticmethod
def is_assembly():
return True
@staticmethod
def django_urls():
from .urls impor... | Increase frequency of order items pulling. | Increase frequency of order items pulling.
| Python | mit | opennode/waldur-mastermind,opennode/waldur-mastermind,opennode/waldur-mastermind,opennode/waldur-mastermind | from waldur_core.core import WaldurExtension
class MarketplaceRemoteExtension(WaldurExtension):
@staticmethod
def django_app():
return 'waldur_mastermind.marketplace_remote'
@staticmethod
def is_assembly():
return True
@staticmethod
def django_urls():
from .urls impor... | from waldur_core.core import WaldurExtension
class MarketplaceRemoteExtension(WaldurExtension):
@staticmethod
def django_app():
return 'waldur_mastermind.marketplace_remote'
@staticmethod
def is_assembly():
return True
@staticmethod
def django_urls():
from .urls impor... | <commit_before>from waldur_core.core import WaldurExtension
class MarketplaceRemoteExtension(WaldurExtension):
@staticmethod
def django_app():
return 'waldur_mastermind.marketplace_remote'
@staticmethod
def is_assembly():
return True
@staticmethod
def django_urls():
f... | from waldur_core.core import WaldurExtension
class MarketplaceRemoteExtension(WaldurExtension):
@staticmethod
def django_app():
return 'waldur_mastermind.marketplace_remote'
@staticmethod
def is_assembly():
return True
@staticmethod
def django_urls():
from .urls impor... | from waldur_core.core import WaldurExtension
class MarketplaceRemoteExtension(WaldurExtension):
@staticmethod
def django_app():
return 'waldur_mastermind.marketplace_remote'
@staticmethod
def is_assembly():
return True
@staticmethod
def django_urls():
from .urls impor... | <commit_before>from waldur_core.core import WaldurExtension
class MarketplaceRemoteExtension(WaldurExtension):
@staticmethod
def django_app():
return 'waldur_mastermind.marketplace_remote'
@staticmethod
def is_assembly():
return True
@staticmethod
def django_urls():
f... |
2c1282680bc9d84e37c40923e8ca288bf8547998 | fabfile/daemons.py | fabfile/daemons.py | #!/usr/bin/env python
from time import sleep, time
from fabric.api import execute, task, env
import app_config
import sys
import traceback
def safe_execute(*args, **kwargs):
try:
execute(*args, **kwargs)
except:
print "ERROR [timestamp: %d]: Here's the traceback" % time()
ex_type, ex,... | #!/usr/bin/env python
from time import sleep, time
from fabric.api import execute, task, env
import app_config
import sys
import traceback
def safe_execute(*args, **kwargs):
"""
Wrap execute() so that all exceptions are caught and logged.
"""
try:
execute(*args, **kwargs)
except:
... | Add comment to new safe_execute function | Add comment to new safe_execute function
| Python | mit | nprapps/elections14,nprapps/elections14,nprapps/elections14,nprapps/elections14 | #!/usr/bin/env python
from time import sleep, time
from fabric.api import execute, task, env
import app_config
import sys
import traceback
def safe_execute(*args, **kwargs):
try:
execute(*args, **kwargs)
except:
print "ERROR [timestamp: %d]: Here's the traceback" % time()
ex_type, ex,... | #!/usr/bin/env python
from time import sleep, time
from fabric.api import execute, task, env
import app_config
import sys
import traceback
def safe_execute(*args, **kwargs):
"""
Wrap execute() so that all exceptions are caught and logged.
"""
try:
execute(*args, **kwargs)
except:
... | <commit_before>#!/usr/bin/env python
from time import sleep, time
from fabric.api import execute, task, env
import app_config
import sys
import traceback
def safe_execute(*args, **kwargs):
try:
execute(*args, **kwargs)
except:
print "ERROR [timestamp: %d]: Here's the traceback" % time()
... | #!/usr/bin/env python
from time import sleep, time
from fabric.api import execute, task, env
import app_config
import sys
import traceback
def safe_execute(*args, **kwargs):
"""
Wrap execute() so that all exceptions are caught and logged.
"""
try:
execute(*args, **kwargs)
except:
... | #!/usr/bin/env python
from time import sleep, time
from fabric.api import execute, task, env
import app_config
import sys
import traceback
def safe_execute(*args, **kwargs):
try:
execute(*args, **kwargs)
except:
print "ERROR [timestamp: %d]: Here's the traceback" % time()
ex_type, ex,... | <commit_before>#!/usr/bin/env python
from time import sleep, time
from fabric.api import execute, task, env
import app_config
import sys
import traceback
def safe_execute(*args, **kwargs):
try:
execute(*args, **kwargs)
except:
print "ERROR [timestamp: %d]: Here's the traceback" % time()
... |
b89c94cb55db1d8252b75949b5cba919e0b69a6e | skeleton/website/jasyscript.py | skeleton/website/jasyscript.py | import konstrukteur.Konstrukteur
@task
def build(regenerate = False):
"""Generate source (development) version"""
konstrukteur.Konstrukteur.build(regenerate)
| import konstrukteur.Konstrukteur
@task
def build(regenerate = False):
"""Generate source (development) version"""
# Initialize assets
AssetManager.AssetManager(profile, session)
# Build static website
konstrukteur.Konstrukteur.build(regenerate)
| Fix asset loading in skeleton | Fix asset loading in skeleton
| Python | mit | fastner/konstrukteur,fastner/konstrukteur,fastner/konstrukteur | import konstrukteur.Konstrukteur
@task
def build(regenerate = False):
"""Generate source (development) version"""
konstrukteur.Konstrukteur.build(regenerate)
Fix asset loading in skeleton | import konstrukteur.Konstrukteur
@task
def build(regenerate = False):
"""Generate source (development) version"""
# Initialize assets
AssetManager.AssetManager(profile, session)
# Build static website
konstrukteur.Konstrukteur.build(regenerate)
| <commit_before>import konstrukteur.Konstrukteur
@task
def build(regenerate = False):
"""Generate source (development) version"""
konstrukteur.Konstrukteur.build(regenerate)
<commit_msg>Fix asset loading in skeleton<commit_after> | import konstrukteur.Konstrukteur
@task
def build(regenerate = False):
"""Generate source (development) version"""
# Initialize assets
AssetManager.AssetManager(profile, session)
# Build static website
konstrukteur.Konstrukteur.build(regenerate)
| import konstrukteur.Konstrukteur
@task
def build(regenerate = False):
"""Generate source (development) version"""
konstrukteur.Konstrukteur.build(regenerate)
Fix asset loading in skeletonimport konstrukteur.Konstrukteur
@task
def build(regenerate = False):
"""Generate source (development) version"""
# Initializ... | <commit_before>import konstrukteur.Konstrukteur
@task
def build(regenerate = False):
"""Generate source (development) version"""
konstrukteur.Konstrukteur.build(regenerate)
<commit_msg>Fix asset loading in skeleton<commit_after>import konstrukteur.Konstrukteur
@task
def build(regenerate = False):
"""Generate sour... |
909f36eecdf38f0915f945144966c892e09670ff | src/logger.py | src/logger.py | #
# License: MIT (doc/LICENSE)
# Author: Todd Gaunt
#
# File: imgfetch/fourchan.py
# This file contains the logging functions for writing to stdout stderr etc...
from sys import stderr
PROGRAM_NAME = "imgfetch: "
def error(level, msg):
global PROGRAM_NAME
if level < 0:
errmsg=PROGRAM_NAME + "error: i... | #
# License: MIT (doc/LICENSE)
# Author: Todd Gaunt
from sys import stderr
PROGRAM_NAME = "imgfetch: "
def error(level, msg):
global PROGRAM_NAME
if level < 0:
quit()
if level >= 0:
errmsg=PROGRAM_NAME + "error: " + msg
print(errmsg, file=stderr)
quit()
def warning(level, msg):
... | Update level checks to allow a verbosity level of 0 or greater | Update level checks to allow a verbosity level of 0 or greater
| Python | isc | toddgaunt/imgfetch | #
# License: MIT (doc/LICENSE)
# Author: Todd Gaunt
#
# File: imgfetch/fourchan.py
# This file contains the logging functions for writing to stdout stderr etc...
from sys import stderr
PROGRAM_NAME = "imgfetch: "
def error(level, msg):
global PROGRAM_NAME
if level < 0:
errmsg=PROGRAM_NAME + "error: i... | #
# License: MIT (doc/LICENSE)
# Author: Todd Gaunt
from sys import stderr
PROGRAM_NAME = "imgfetch: "
def error(level, msg):
global PROGRAM_NAME
if level < 0:
quit()
if level >= 0:
errmsg=PROGRAM_NAME + "error: " + msg
print(errmsg, file=stderr)
quit()
def warning(level, msg):
... | <commit_before>#
# License: MIT (doc/LICENSE)
# Author: Todd Gaunt
#
# File: imgfetch/fourchan.py
# This file contains the logging functions for writing to stdout stderr etc...
from sys import stderr
PROGRAM_NAME = "imgfetch: "
def error(level, msg):
global PROGRAM_NAME
if level < 0:
errmsg=PROGRAM_N... | #
# License: MIT (doc/LICENSE)
# Author: Todd Gaunt
from sys import stderr
PROGRAM_NAME = "imgfetch: "
def error(level, msg):
global PROGRAM_NAME
if level < 0:
quit()
if level >= 0:
errmsg=PROGRAM_NAME + "error: " + msg
print(errmsg, file=stderr)
quit()
def warning(level, msg):
... | #
# License: MIT (doc/LICENSE)
# Author: Todd Gaunt
#
# File: imgfetch/fourchan.py
# This file contains the logging functions for writing to stdout stderr etc...
from sys import stderr
PROGRAM_NAME = "imgfetch: "
def error(level, msg):
global PROGRAM_NAME
if level < 0:
errmsg=PROGRAM_NAME + "error: i... | <commit_before>#
# License: MIT (doc/LICENSE)
# Author: Todd Gaunt
#
# File: imgfetch/fourchan.py
# This file contains the logging functions for writing to stdout stderr etc...
from sys import stderr
PROGRAM_NAME = "imgfetch: "
def error(level, msg):
global PROGRAM_NAME
if level < 0:
errmsg=PROGRAM_N... |
3a571e45e0bb0e11d84f5e0013d5a5f0f2a568ec | c2corg_ui/views/index.py | c2corg_ui/views/index.py | from pyramid.view import view_config
class Pages(object):
def __init__(self, request):
self.request = request
self.settings = request.registry.settings
self.template_input = {
'debug': 'debug' in self.request.params,
'api_url': self.settings['api_url'],
... | from pyramid.view import view_config
from c2corg_ui.views import get_or_create_page
class Pages(object):
def __init__(self, request):
self.request = request
self.settings = request.registry.settings
self.debug = 'debug' in self.request.params
self.template_input = {
'... | Set up caching/etag for static pages | Set up caching/etag for static pages
| Python | agpl-3.0 | c2corg/v6_ui,Courgetteandratatouille/v6_ui,Courgetteandratatouille/v6_ui,Courgetteandratatouille/v6_ui,c2corg/v6_ui,Courgetteandratatouille/v6_ui,c2corg/v6_ui,c2corg/v6_ui,olaurendeau/v6_ui,olaurendeau/v6_ui,olaurendeau/v6_ui,olaurendeau/v6_ui | from pyramid.view import view_config
class Pages(object):
def __init__(self, request):
self.request = request
self.settings = request.registry.settings
self.template_input = {
'debug': 'debug' in self.request.params,
'api_url': self.settings['api_url'],
... | from pyramid.view import view_config
from c2corg_ui.views import get_or_create_page
class Pages(object):
def __init__(self, request):
self.request = request
self.settings = request.registry.settings
self.debug = 'debug' in self.request.params
self.template_input = {
'... | <commit_before>from pyramid.view import view_config
class Pages(object):
def __init__(self, request):
self.request = request
self.settings = request.registry.settings
self.template_input = {
'debug': 'debug' in self.request.params,
'api_url': self.settings['api_url... | from pyramid.view import view_config
from c2corg_ui.views import get_or_create_page
class Pages(object):
def __init__(self, request):
self.request = request
self.settings = request.registry.settings
self.debug = 'debug' in self.request.params
self.template_input = {
'... | from pyramid.view import view_config
class Pages(object):
def __init__(self, request):
self.request = request
self.settings = request.registry.settings
self.template_input = {
'debug': 'debug' in self.request.params,
'api_url': self.settings['api_url'],
... | <commit_before>from pyramid.view import view_config
class Pages(object):
def __init__(self, request):
self.request = request
self.settings = request.registry.settings
self.template_input = {
'debug': 'debug' in self.request.params,
'api_url': self.settings['api_url... |
8ab21dc5148c43a5ba9473c03e3fb5baaf686ed6 | tests/settings/test-sqlite.py | tests/settings/test-sqlite.py | # Test configuration for quick execution.
#
# This settings file will not work for tests against
# Django 1.6, as it does not support Auto incrementing primary
# keys in way required by django-name.
from .base import *
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.sqlite3',
'TEST_NAME':... | # Test configuration for quick execution.
#
# This settings file will not work for tests against
# Django 1.6, as it does not support Auto incrementing primary
# keys in way required by django-name.
from .base import *
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.sqlite3',
'NAME': ':me... | Change db name for django1.8. | Change db name for django1.8.
| Python | bsd-3-clause | damonkelley/django-name,unt-libraries/django-name,damonkelley/django-name,unt-libraries/django-name,damonkelley/django-name,unt-libraries/django-name | # Test configuration for quick execution.
#
# This settings file will not work for tests against
# Django 1.6, as it does not support Auto incrementing primary
# keys in way required by django-name.
from .base import *
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.sqlite3',
'TEST_NAME':... | # Test configuration for quick execution.
#
# This settings file will not work for tests against
# Django 1.6, as it does not support Auto incrementing primary
# keys in way required by django-name.
from .base import *
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.sqlite3',
'NAME': ':me... | <commit_before># Test configuration for quick execution.
#
# This settings file will not work for tests against
# Django 1.6, as it does not support Auto incrementing primary
# keys in way required by django-name.
from .base import *
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.sqlite3',
... | # Test configuration for quick execution.
#
# This settings file will not work for tests against
# Django 1.6, as it does not support Auto incrementing primary
# keys in way required by django-name.
from .base import *
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.sqlite3',
'NAME': ':me... | # Test configuration for quick execution.
#
# This settings file will not work for tests against
# Django 1.6, as it does not support Auto incrementing primary
# keys in way required by django-name.
from .base import *
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.sqlite3',
'TEST_NAME':... | <commit_before># Test configuration for quick execution.
#
# This settings file will not work for tests against
# Django 1.6, as it does not support Auto incrementing primary
# keys in way required by django-name.
from .base import *
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.sqlite3',
... |
d1628356c7981748e2446c7b43d33d21cdef7e02 | geoengine_partner/geo_partner.py | geoengine_partner/geo_partner.py | # -*- coding: utf-8 -*-
##############################################################################
#
# Author: Nicolas Bessi
# Copyright 2011-2012 Camptocamp SA
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# ... | # -*- coding: utf-8 -*-
##############################################################################
#
# Author: Nicolas Bessi
# Copyright 2011-2012 Camptocamp SA
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# ... | Use absolute imports on opnerp.addons | [FIX] Use absolute imports on opnerp.addons
| Python | agpl-3.0 | OCA/geospatial,OCA/geospatial,OCA/geospatial | # -*- coding: utf-8 -*-
##############################################################################
#
# Author: Nicolas Bessi
# Copyright 2011-2012 Camptocamp SA
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# ... | # -*- coding: utf-8 -*-
##############################################################################
#
# Author: Nicolas Bessi
# Copyright 2011-2012 Camptocamp SA
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# ... | <commit_before># -*- coding: utf-8 -*-
##############################################################################
#
# Author: Nicolas Bessi
# Copyright 2011-2012 Camptocamp SA
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public L... | # -*- coding: utf-8 -*-
##############################################################################
#
# Author: Nicolas Bessi
# Copyright 2011-2012 Camptocamp SA
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# ... | # -*- coding: utf-8 -*-
##############################################################################
#
# Author: Nicolas Bessi
# Copyright 2011-2012 Camptocamp SA
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# ... | <commit_before># -*- coding: utf-8 -*-
##############################################################################
#
# Author: Nicolas Bessi
# Copyright 2011-2012 Camptocamp SA
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public L... |
8f5849a90c63c82b036e21d36b9d77b20e1aa60b | src/pretix/testutils/settings.py | src/pretix/testutils/settings.py | import atexit
import os
import tempfile
tmpdir = tempfile.TemporaryDirectory()
os.environ.setdefault('DATA_DIR', tmpdir.name)
from pretix.settings import * # NOQA
DATA_DIR = tmpdir.name
LOG_DIR = os.path.join(DATA_DIR, 'logs')
MEDIA_ROOT = os.path.join(DATA_DIR, 'media')
atexit.register(tmpdir.cleanup)
EMAIL_BACK... | import atexit
import os
import tempfile
tmpdir = tempfile.TemporaryDirectory()
os.environ.setdefault('DATA_DIR', tmpdir.name)
from pretix.settings import * # NOQA
DATA_DIR = tmpdir.name
LOG_DIR = os.path.join(DATA_DIR, 'logs')
MEDIA_ROOT = os.path.join(DATA_DIR, 'media')
atexit.register(tmpdir.cleanup)
EMAIL_BACK... | Test on SQLite if not configured otherwise | Test on SQLite if not configured otherwise
| Python | apache-2.0 | Flamacue/pretix,Flamacue/pretix,Flamacue/pretix,Flamacue/pretix | import atexit
import os
import tempfile
tmpdir = tempfile.TemporaryDirectory()
os.environ.setdefault('DATA_DIR', tmpdir.name)
from pretix.settings import * # NOQA
DATA_DIR = tmpdir.name
LOG_DIR = os.path.join(DATA_DIR, 'logs')
MEDIA_ROOT = os.path.join(DATA_DIR, 'media')
atexit.register(tmpdir.cleanup)
EMAIL_BACK... | import atexit
import os
import tempfile
tmpdir = tempfile.TemporaryDirectory()
os.environ.setdefault('DATA_DIR', tmpdir.name)
from pretix.settings import * # NOQA
DATA_DIR = tmpdir.name
LOG_DIR = os.path.join(DATA_DIR, 'logs')
MEDIA_ROOT = os.path.join(DATA_DIR, 'media')
atexit.register(tmpdir.cleanup)
EMAIL_BACK... | <commit_before>import atexit
import os
import tempfile
tmpdir = tempfile.TemporaryDirectory()
os.environ.setdefault('DATA_DIR', tmpdir.name)
from pretix.settings import * # NOQA
DATA_DIR = tmpdir.name
LOG_DIR = os.path.join(DATA_DIR, 'logs')
MEDIA_ROOT = os.path.join(DATA_DIR, 'media')
atexit.register(tmpdir.clean... | import atexit
import os
import tempfile
tmpdir = tempfile.TemporaryDirectory()
os.environ.setdefault('DATA_DIR', tmpdir.name)
from pretix.settings import * # NOQA
DATA_DIR = tmpdir.name
LOG_DIR = os.path.join(DATA_DIR, 'logs')
MEDIA_ROOT = os.path.join(DATA_DIR, 'media')
atexit.register(tmpdir.cleanup)
EMAIL_BACK... | import atexit
import os
import tempfile
tmpdir = tempfile.TemporaryDirectory()
os.environ.setdefault('DATA_DIR', tmpdir.name)
from pretix.settings import * # NOQA
DATA_DIR = tmpdir.name
LOG_DIR = os.path.join(DATA_DIR, 'logs')
MEDIA_ROOT = os.path.join(DATA_DIR, 'media')
atexit.register(tmpdir.cleanup)
EMAIL_BACK... | <commit_before>import atexit
import os
import tempfile
tmpdir = tempfile.TemporaryDirectory()
os.environ.setdefault('DATA_DIR', tmpdir.name)
from pretix.settings import * # NOQA
DATA_DIR = tmpdir.name
LOG_DIR = os.path.join(DATA_DIR, 'logs')
MEDIA_ROOT = os.path.join(DATA_DIR, 'media')
atexit.register(tmpdir.clean... |
7d7209bbe92045c3becc770cee004bcdc9640098 | heltour/tournament/decorators.py | heltour/tournament/decorators.py | from cacheops.query import cached_as, \
cached_view_as as _cacheops_cached_view_as, \
install_cacheops
# TODO: This should be run automatically by django. I have no idea why it isn't.
install_cacheops()
# Modify the cacheops.cached_view_as decorator to take a "var... | from cacheops.query import cached_as, \
cached_view_as as _cacheops_cached_view_as, \
install_cacheops
from heltour import settings
# TODO: This should be run automatically by django. I have no idea why it isn't.
install_cacheops()
# Modify the cacheops.cached_vie... | Disable view caching during development | Disable view caching during development
Not ideal, but useful when you change the source code. Otherwise you
would have to run "manage.py invalidate all" for every change. | Python | mit | cyanfish/heltour,cyanfish/heltour,cyanfish/heltour,cyanfish/heltour | from cacheops.query import cached_as, \
cached_view_as as _cacheops_cached_view_as, \
install_cacheops
# TODO: This should be run automatically by django. I have no idea why it isn't.
install_cacheops()
# Modify the cacheops.cached_view_as decorator to take a "var... | from cacheops.query import cached_as, \
cached_view_as as _cacheops_cached_view_as, \
install_cacheops
from heltour import settings
# TODO: This should be run automatically by django. I have no idea why it isn't.
install_cacheops()
# Modify the cacheops.cached_vie... | <commit_before>from cacheops.query import cached_as, \
cached_view_as as _cacheops_cached_view_as, \
install_cacheops
# TODO: This should be run automatically by django. I have no idea why it isn't.
install_cacheops()
# Modify the cacheops.cached_view_as decorator... | from cacheops.query import cached_as, \
cached_view_as as _cacheops_cached_view_as, \
install_cacheops
from heltour import settings
# TODO: This should be run automatically by django. I have no idea why it isn't.
install_cacheops()
# Modify the cacheops.cached_vie... | from cacheops.query import cached_as, \
cached_view_as as _cacheops_cached_view_as, \
install_cacheops
# TODO: This should be run automatically by django. I have no idea why it isn't.
install_cacheops()
# Modify the cacheops.cached_view_as decorator to take a "var... | <commit_before>from cacheops.query import cached_as, \
cached_view_as as _cacheops_cached_view_as, \
install_cacheops
# TODO: This should be run automatically by django. I have no idea why it isn't.
install_cacheops()
# Modify the cacheops.cached_view_as decorator... |
2403cbe2aa8f515bdd8f575112478010389ee48b | conan/ConanServerToArtifactory/migrate.py | conan/ConanServerToArtifactory/migrate.py | import os
import subprocess
def run(cmd):
ret = os.system(cmd)
if ret != 0:
raise Exception("Command failed: %s" % cmd)
# Assuming local = conan_server and Artifactory remotes
output = subprocess.check_output("conan search -r=local --raw")
packages = output.splitlines()
for package in packages:
... | import os
import subprocess
def run(cmd):
ret = os.system(cmd)
if ret != 0:
raise Exception("Command failed: %s" % cmd)
# Assuming local = conan_server and Artifactory remotes
output = subprocess.check_output("conan search * --remote=local --raw")
packages = output.decode("utf-8").splitlines()
for p... | Update Conan server migration script | Update Conan server migration script
| Python | apache-2.0 | JFrogDev/artifactory-scripts,JFrogDev/artifactory-scripts,JFrogDev/artifactory-scripts,JFrogDev/artifactory-scripts,JFrogDev/artifactory-scripts,JFrogDev/artifactory-scripts | import os
import subprocess
def run(cmd):
ret = os.system(cmd)
if ret != 0:
raise Exception("Command failed: %s" % cmd)
# Assuming local = conan_server and Artifactory remotes
output = subprocess.check_output("conan search -r=local --raw")
packages = output.splitlines()
for package in packages:
... | import os
import subprocess
def run(cmd):
ret = os.system(cmd)
if ret != 0:
raise Exception("Command failed: %s" % cmd)
# Assuming local = conan_server and Artifactory remotes
output = subprocess.check_output("conan search * --remote=local --raw")
packages = output.decode("utf-8").splitlines()
for p... | <commit_before>import os
import subprocess
def run(cmd):
ret = os.system(cmd)
if ret != 0:
raise Exception("Command failed: %s" % cmd)
# Assuming local = conan_server and Artifactory remotes
output = subprocess.check_output("conan search -r=local --raw")
packages = output.splitlines()
for package in... | import os
import subprocess
def run(cmd):
ret = os.system(cmd)
if ret != 0:
raise Exception("Command failed: %s" % cmd)
# Assuming local = conan_server and Artifactory remotes
output = subprocess.check_output("conan search * --remote=local --raw")
packages = output.decode("utf-8").splitlines()
for p... | import os
import subprocess
def run(cmd):
ret = os.system(cmd)
if ret != 0:
raise Exception("Command failed: %s" % cmd)
# Assuming local = conan_server and Artifactory remotes
output = subprocess.check_output("conan search -r=local --raw")
packages = output.splitlines()
for package in packages:
... | <commit_before>import os
import subprocess
def run(cmd):
ret = os.system(cmd)
if ret != 0:
raise Exception("Command failed: %s" % cmd)
# Assuming local = conan_server and Artifactory remotes
output = subprocess.check_output("conan search -r=local --raw")
packages = output.splitlines()
for package in... |
fd77e3211e2298457b9778f409c56c70a36bf3db | farmers_api/farmers/views.py | farmers_api/farmers/views.py | from rest_framework import viewsets
from .models import Farmer
from .serializers import FarmerSerializer
class FarmerViewSet(viewsets.ReadOnlyModelViewSet):
queryset = Farmer.objects.all()
serializer_class = FarmerSerializer
filter_fields = ('town',)
| from rest_framework import viewsets, permissions
from .models import Farmer
from .serializers import FarmerSerializer
class FarmerViewSet(viewsets.ModelViewSet):
queryset = Farmer.objects.all()
serializer_class = FarmerSerializer
filter_fields = ('town',)
permissions = permissions.DjangoModelPermissi... | Add permission settings on FarmerViewSet | Add permission settings on FarmerViewSet
| Python | bsd-2-clause | tm-kn/farmers-api | from rest_framework import viewsets
from .models import Farmer
from .serializers import FarmerSerializer
class FarmerViewSet(viewsets.ReadOnlyModelViewSet):
queryset = Farmer.objects.all()
serializer_class = FarmerSerializer
filter_fields = ('town',)
Add permission settings on FarmerViewSet | from rest_framework import viewsets, permissions
from .models import Farmer
from .serializers import FarmerSerializer
class FarmerViewSet(viewsets.ModelViewSet):
queryset = Farmer.objects.all()
serializer_class = FarmerSerializer
filter_fields = ('town',)
permissions = permissions.DjangoModelPermissi... | <commit_before>from rest_framework import viewsets
from .models import Farmer
from .serializers import FarmerSerializer
class FarmerViewSet(viewsets.ReadOnlyModelViewSet):
queryset = Farmer.objects.all()
serializer_class = FarmerSerializer
filter_fields = ('town',)
<commit_msg>Add permission settings on ... | from rest_framework import viewsets, permissions
from .models import Farmer
from .serializers import FarmerSerializer
class FarmerViewSet(viewsets.ModelViewSet):
queryset = Farmer.objects.all()
serializer_class = FarmerSerializer
filter_fields = ('town',)
permissions = permissions.DjangoModelPermissi... | from rest_framework import viewsets
from .models import Farmer
from .serializers import FarmerSerializer
class FarmerViewSet(viewsets.ReadOnlyModelViewSet):
queryset = Farmer.objects.all()
serializer_class = FarmerSerializer
filter_fields = ('town',)
Add permission settings on FarmerViewSetfrom rest_fram... | <commit_before>from rest_framework import viewsets
from .models import Farmer
from .serializers import FarmerSerializer
class FarmerViewSet(viewsets.ReadOnlyModelViewSet):
queryset = Farmer.objects.all()
serializer_class = FarmerSerializer
filter_fields = ('town',)
<commit_msg>Add permission settings on ... |
4cec5250a3f9058fea5af5ef432a5b230ca94963 | images/singleuser/user-config.py | images/singleuser/user-config.py | import os
mylang = 'test'
family = 'wikipedia'
custom_path = os.path.expanduser('~/user-config.py')
if os.path.exists(custom_path):
with open(custom_path, 'rb') as f:
exec(compile(f.read(), custom_path, 'exec'), globals())
del f
# Clean up temp variables, since pwb issues a warning otherwise
# to he... | import os
mylang = 'test'
family = 'wikipedia'
custom_path = os.path.expanduser('~/user-config.py')
if os.path.exists(custom_path):
with open(custom_path, 'rb') as f:
exec(compile(f.read(), custom_path, 'exec'), globals())
del f
# Clean up temp variables, since pwb issues a warning otherwise
# to he... | Update to use newer oauth style | Update to use newer oauth style
| Python | mit | yuvipanda/paws,yuvipanda/paws | import os
mylang = 'test'
family = 'wikipedia'
custom_path = os.path.expanduser('~/user-config.py')
if os.path.exists(custom_path):
with open(custom_path, 'rb') as f:
exec(compile(f.read(), custom_path, 'exec'), globals())
del f
# Clean up temp variables, since pwb issues a warning otherwise
# to he... | import os
mylang = 'test'
family = 'wikipedia'
custom_path = os.path.expanduser('~/user-config.py')
if os.path.exists(custom_path):
with open(custom_path, 'rb') as f:
exec(compile(f.read(), custom_path, 'exec'), globals())
del f
# Clean up temp variables, since pwb issues a warning otherwise
# to he... | <commit_before>import os
mylang = 'test'
family = 'wikipedia'
custom_path = os.path.expanduser('~/user-config.py')
if os.path.exists(custom_path):
with open(custom_path, 'rb') as f:
exec(compile(f.read(), custom_path, 'exec'), globals())
del f
# Clean up temp variables, since pwb issues a warning ot... | import os
mylang = 'test'
family = 'wikipedia'
custom_path = os.path.expanduser('~/user-config.py')
if os.path.exists(custom_path):
with open(custom_path, 'rb') as f:
exec(compile(f.read(), custom_path, 'exec'), globals())
del f
# Clean up temp variables, since pwb issues a warning otherwise
# to he... | import os
mylang = 'test'
family = 'wikipedia'
custom_path = os.path.expanduser('~/user-config.py')
if os.path.exists(custom_path):
with open(custom_path, 'rb') as f:
exec(compile(f.read(), custom_path, 'exec'), globals())
del f
# Clean up temp variables, since pwb issues a warning otherwise
# to he... | <commit_before>import os
mylang = 'test'
family = 'wikipedia'
custom_path = os.path.expanduser('~/user-config.py')
if os.path.exists(custom_path):
with open(custom_path, 'rb') as f:
exec(compile(f.read(), custom_path, 'exec'), globals())
del f
# Clean up temp variables, since pwb issues a warning ot... |
3d3862b0c7ea872e690999f46de88be287598758 | lib/__init__.py | lib/__init__.py | import redis
import json
import time
class DHTStorage():
def __init__(self, key):
self.redis = redis.StrictRedis(host='localhost', port=6379, db=0)
self.key = key
def get_key(self, name):
return "%s:%s" % (self.key, name)
def send(self, name, data):
pushData = {'time': time.time(), 'value': data}
self.r... | import redis
import json
import time
class DHTStorage():
def __init__(self, key):
self.redis = redis.StrictRedis(host='localhost', port=6379, db=0)
self.key = key
def get_key(self, name):
return "%s:%s" % (self.key, name)
def send(self, name, data):
pushData = {'time': time.time(), 'value': data}
self.r... | Remove old entries (~2 months, keep 100000 entries) | Remove old entries (~2 months, keep 100000 entries)
| Python | mit | Ajnasz/pippo,Ajnasz/pippo,Ajnasz/pippo | import redis
import json
import time
class DHTStorage():
def __init__(self, key):
self.redis = redis.StrictRedis(host='localhost', port=6379, db=0)
self.key = key
def get_key(self, name):
return "%s:%s" % (self.key, name)
def send(self, name, data):
pushData = {'time': time.time(), 'value': data}
self.r... | import redis
import json
import time
class DHTStorage():
def __init__(self, key):
self.redis = redis.StrictRedis(host='localhost', port=6379, db=0)
self.key = key
def get_key(self, name):
return "%s:%s" % (self.key, name)
def send(self, name, data):
pushData = {'time': time.time(), 'value': data}
self.r... | <commit_before>import redis
import json
import time
class DHTStorage():
def __init__(self, key):
self.redis = redis.StrictRedis(host='localhost', port=6379, db=0)
self.key = key
def get_key(self, name):
return "%s:%s" % (self.key, name)
def send(self, name, data):
pushData = {'time': time.time(), 'value':... | import redis
import json
import time
class DHTStorage():
def __init__(self, key):
self.redis = redis.StrictRedis(host='localhost', port=6379, db=0)
self.key = key
def get_key(self, name):
return "%s:%s" % (self.key, name)
def send(self, name, data):
pushData = {'time': time.time(), 'value': data}
self.r... | import redis
import json
import time
class DHTStorage():
def __init__(self, key):
self.redis = redis.StrictRedis(host='localhost', port=6379, db=0)
self.key = key
def get_key(self, name):
return "%s:%s" % (self.key, name)
def send(self, name, data):
pushData = {'time': time.time(), 'value': data}
self.r... | <commit_before>import redis
import json
import time
class DHTStorage():
def __init__(self, key):
self.redis = redis.StrictRedis(host='localhost', port=6379, db=0)
self.key = key
def get_key(self, name):
return "%s:%s" % (self.key, name)
def send(self, name, data):
pushData = {'time': time.time(), 'value':... |
e676f59b445157d1cc247ada74e0b7b1fc1afced | demos/burgers_sim.py | demos/burgers_sim.py | from phi.flow import *
domain = Domain([64, 64], boundaries=PERIODIC)
world.add(BurgersVelocity(domain, velocity=lambda s: math.randfreq(s) * 2), physics=Burgers())
show(App('Burgers Equation in %dD' % len(domain.resolution), framerate=5))
| from phi.flow import *
domain = Domain([64, 64], boundaries=PERIODIC, box=box[0:100, 0:100])
world.add(BurgersVelocity(domain, velocity=Noise(channels=domain.rank) * 2), physics=Burgers())
show(App('Burgers Equation in %dD' % len(domain.resolution), framerate=5))
| Use Noise in Burgers demo | Use Noise in Burgers demo
| Python | mit | tum-pbs/PhiFlow,tum-pbs/PhiFlow | from phi.flow import *
domain = Domain([64, 64], boundaries=PERIODIC)
world.add(BurgersVelocity(domain, velocity=lambda s: math.randfreq(s) * 2), physics=Burgers())
show(App('Burgers Equation in %dD' % len(domain.resolution), framerate=5))
Use Noise in Burgers demo | from phi.flow import *
domain = Domain([64, 64], boundaries=PERIODIC, box=box[0:100, 0:100])
world.add(BurgersVelocity(domain, velocity=Noise(channels=domain.rank) * 2), physics=Burgers())
show(App('Burgers Equation in %dD' % len(domain.resolution), framerate=5))
| <commit_before>from phi.flow import *
domain = Domain([64, 64], boundaries=PERIODIC)
world.add(BurgersVelocity(domain, velocity=lambda s: math.randfreq(s) * 2), physics=Burgers())
show(App('Burgers Equation in %dD' % len(domain.resolution), framerate=5))
<commit_msg>Use Noise in Burgers demo<commit_after> | from phi.flow import *
domain = Domain([64, 64], boundaries=PERIODIC, box=box[0:100, 0:100])
world.add(BurgersVelocity(domain, velocity=Noise(channels=domain.rank) * 2), physics=Burgers())
show(App('Burgers Equation in %dD' % len(domain.resolution), framerate=5))
| from phi.flow import *
domain = Domain([64, 64], boundaries=PERIODIC)
world.add(BurgersVelocity(domain, velocity=lambda s: math.randfreq(s) * 2), physics=Burgers())
show(App('Burgers Equation in %dD' % len(domain.resolution), framerate=5))
Use Noise in Burgers demofrom phi.flow import *
domain = Domain([64, 64], bou... | <commit_before>from phi.flow import *
domain = Domain([64, 64], boundaries=PERIODIC)
world.add(BurgersVelocity(domain, velocity=lambda s: math.randfreq(s) * 2), physics=Burgers())
show(App('Burgers Equation in %dD' % len(domain.resolution), framerate=5))
<commit_msg>Use Noise in Burgers demo<commit_after>from phi.flo... |
d024177d3b060e6219074bf1500ebc6ae947ad1a | openassessment/fileupload/backends/__init__.py | openassessment/fileupload/backends/__init__.py | """ File Upload backends. """
from django.conf import settings
from . import django_storage, filesystem, s3, swift
def get_backend():
# .. setting_name: ORA2_FILEUPLOAD_BACKEND
# .. setting_default: s3
# .. setting_description: The backend used to upload the ora2 submissions attachments
# the s... | """ File Upload backends. """
from django.conf import settings
from . import django_storage, filesystem, s3, swift
def get_backend():
# .. setting_name: ORA2_FILEUPLOAD_BACKEND
# .. setting_default: 's3'
# .. setting_description: The backend used to upload the ora2 submissions attachments.
# Th... | Fix annotation: The default value should be a string | Fix annotation: The default value should be a string
| Python | agpl-3.0 | edx/edx-ora2,edx/edx-ora2,EDUlib/edx-ora2,EDUlib/edx-ora2,edx/edx-ora2,EDUlib/edx-ora2,EDUlib/edx-ora2,edx/edx-ora2 | """ File Upload backends. """
from django.conf import settings
from . import django_storage, filesystem, s3, swift
def get_backend():
# .. setting_name: ORA2_FILEUPLOAD_BACKEND
# .. setting_default: s3
# .. setting_description: The backend used to upload the ora2 submissions attachments
# the s... | """ File Upload backends. """
from django.conf import settings
from . import django_storage, filesystem, s3, swift
def get_backend():
# .. setting_name: ORA2_FILEUPLOAD_BACKEND
# .. setting_default: 's3'
# .. setting_description: The backend used to upload the ora2 submissions attachments.
# Th... | <commit_before>""" File Upload backends. """
from django.conf import settings
from . import django_storage, filesystem, s3, swift
def get_backend():
# .. setting_name: ORA2_FILEUPLOAD_BACKEND
# .. setting_default: s3
# .. setting_description: The backend used to upload the ora2 submissions attachments
... | """ File Upload backends. """
from django.conf import settings
from . import django_storage, filesystem, s3, swift
def get_backend():
# .. setting_name: ORA2_FILEUPLOAD_BACKEND
# .. setting_default: 's3'
# .. setting_description: The backend used to upload the ora2 submissions attachments.
# Th... | """ File Upload backends. """
from django.conf import settings
from . import django_storage, filesystem, s3, swift
def get_backend():
# .. setting_name: ORA2_FILEUPLOAD_BACKEND
# .. setting_default: s3
# .. setting_description: The backend used to upload the ora2 submissions attachments
# the s... | <commit_before>""" File Upload backends. """
from django.conf import settings
from . import django_storage, filesystem, s3, swift
def get_backend():
# .. setting_name: ORA2_FILEUPLOAD_BACKEND
# .. setting_default: s3
# .. setting_description: The backend used to upload the ora2 submissions attachments
... |
26b1d4f47c742f33c4ecdac68e88dbbc958e5756 | tests/create_minimal_image_test.py | tests/create_minimal_image_test.py | from unittest import TestCase
import create_minimal_image
from create_minimal_image import main
POPEN_COMMAND_LIST = ""
class CreateMinimalImageTest(TestCase):
def setUp(self):
global POPEN_COMMAND_LIST
POPEN_COMMAND_LIST = ""
create_minimal_image._run_popen_command = stubbed_run_popen_... | from unittest import TestCase
import create_minimal_image
from create_minimal_image import main
POPEN_COMMAND_LIST = []
class CreateMinimalImageTest(TestCase):
def setUp(self):
global POPEN_COMMAND_LIST
POPEN_COMMAND_LIST = []
create_minimal_image._run_popen_command = stubbed_run_popen_... | Revert "[TEST] refactor test to get it passing on Travis CI" | Revert "[TEST] refactor test to get it passing on Travis CI"
This reverts commit b92684d252e92a75115ce8617a15c107b5a34b09.
| Python | mit | williamsbdev/minimal-docker-image-maker,williamsbdev/minimal-docker-image-maker | from unittest import TestCase
import create_minimal_image
from create_minimal_image import main
POPEN_COMMAND_LIST = ""
class CreateMinimalImageTest(TestCase):
def setUp(self):
global POPEN_COMMAND_LIST
POPEN_COMMAND_LIST = ""
create_minimal_image._run_popen_command = stubbed_run_popen_... | from unittest import TestCase
import create_minimal_image
from create_minimal_image import main
POPEN_COMMAND_LIST = []
class CreateMinimalImageTest(TestCase):
def setUp(self):
global POPEN_COMMAND_LIST
POPEN_COMMAND_LIST = []
create_minimal_image._run_popen_command = stubbed_run_popen_... | <commit_before>from unittest import TestCase
import create_minimal_image
from create_minimal_image import main
POPEN_COMMAND_LIST = ""
class CreateMinimalImageTest(TestCase):
def setUp(self):
global POPEN_COMMAND_LIST
POPEN_COMMAND_LIST = ""
create_minimal_image._run_popen_command = stu... | from unittest import TestCase
import create_minimal_image
from create_minimal_image import main
POPEN_COMMAND_LIST = []
class CreateMinimalImageTest(TestCase):
def setUp(self):
global POPEN_COMMAND_LIST
POPEN_COMMAND_LIST = []
create_minimal_image._run_popen_command = stubbed_run_popen_... | from unittest import TestCase
import create_minimal_image
from create_minimal_image import main
POPEN_COMMAND_LIST = ""
class CreateMinimalImageTest(TestCase):
def setUp(self):
global POPEN_COMMAND_LIST
POPEN_COMMAND_LIST = ""
create_minimal_image._run_popen_command = stubbed_run_popen_... | <commit_before>from unittest import TestCase
import create_minimal_image
from create_minimal_image import main
POPEN_COMMAND_LIST = ""
class CreateMinimalImageTest(TestCase):
def setUp(self):
global POPEN_COMMAND_LIST
POPEN_COMMAND_LIST = ""
create_minimal_image._run_popen_command = stu... |
0ddaed24e0f011ca1bb777af49936f64684a7d4c | bin/scripts/contig_length_filter.py | bin/scripts/contig_length_filter.py | #!/usr/bin/env python
import sys
from Bio import SeqIO
from Bio.SeqRecord import SeqRecord
if len(sys.argv) < 5:
print("Usage: %s <length threshold> <contigs_file> <suffix> <output>" % sys.argv[0])
sys.exit(1)
f_n = sys.argv[2]
suffix = sys.argv[3]
input_seq_iterator = SeqIO.parse(open(f_n, "r"), "fasta")
... | #!/usr/bin/env python
import sys
from Bio import SeqIO
if len(sys.argv) < 4:
print("Usage: %s <length threshold> <contigs_file> <output>" % sys.argv[0])
sys.exit(1)
f_n = sys.argv[2]
input_seq_iterator = SeqIO.parse(open(f_n, "r"), "fasta")
filtered_iterator = (record for record in input_seq_iterator \
... | Revert "length filter script now adds provided suffix to contig names" | Revert "length filter script now adds provided suffix to contig names"
This reverts commit 4d3985f667465eb5564de4fada8820e23607a58b.
| Python | mit | tanaes/snakemake_assemble,tanaes/snakemake_assemble,tanaes/snakemake_assemble | #!/usr/bin/env python
import sys
from Bio import SeqIO
from Bio.SeqRecord import SeqRecord
if len(sys.argv) < 5:
print("Usage: %s <length threshold> <contigs_file> <suffix> <output>" % sys.argv[0])
sys.exit(1)
f_n = sys.argv[2]
suffix = sys.argv[3]
input_seq_iterator = SeqIO.parse(open(f_n, "r"), "fasta")
... | #!/usr/bin/env python
import sys
from Bio import SeqIO
if len(sys.argv) < 4:
print("Usage: %s <length threshold> <contigs_file> <output>" % sys.argv[0])
sys.exit(1)
f_n = sys.argv[2]
input_seq_iterator = SeqIO.parse(open(f_n, "r"), "fasta")
filtered_iterator = (record for record in input_seq_iterator \
... | <commit_before>#!/usr/bin/env python
import sys
from Bio import SeqIO
from Bio.SeqRecord import SeqRecord
if len(sys.argv) < 5:
print("Usage: %s <length threshold> <contigs_file> <suffix> <output>" % sys.argv[0])
sys.exit(1)
f_n = sys.argv[2]
suffix = sys.argv[3]
input_seq_iterator = SeqIO.parse(open(f_n, "... | #!/usr/bin/env python
import sys
from Bio import SeqIO
if len(sys.argv) < 4:
print("Usage: %s <length threshold> <contigs_file> <output>" % sys.argv[0])
sys.exit(1)
f_n = sys.argv[2]
input_seq_iterator = SeqIO.parse(open(f_n, "r"), "fasta")
filtered_iterator = (record for record in input_seq_iterator \
... | #!/usr/bin/env python
import sys
from Bio import SeqIO
from Bio.SeqRecord import SeqRecord
if len(sys.argv) < 5:
print("Usage: %s <length threshold> <contigs_file> <suffix> <output>" % sys.argv[0])
sys.exit(1)
f_n = sys.argv[2]
suffix = sys.argv[3]
input_seq_iterator = SeqIO.parse(open(f_n, "r"), "fasta")
... | <commit_before>#!/usr/bin/env python
import sys
from Bio import SeqIO
from Bio.SeqRecord import SeqRecord
if len(sys.argv) < 5:
print("Usage: %s <length threshold> <contigs_file> <suffix> <output>" % sys.argv[0])
sys.exit(1)
f_n = sys.argv[2]
suffix = sys.argv[3]
input_seq_iterator = SeqIO.parse(open(f_n, "... |
2dadeef44576ac5ecbb67b929c4190675c449c7f | devops/settings.py | devops/settings.py | DRIVER = 'devops.driver.libvirt.libvirt_driver'
DRIVER_PARAMETERS = {
'connection_string': 'qemu:///system',
}
INSTALLED_APPS = ['devops']
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.postgresql_psycopg2',
'NAME': 'postgres',
'USER': 'postgres',
'PASSWOR... | import os
DRIVER = 'devops.driver.libvirt.libvirt_driver'
DRIVER_PARAMETERS = {
'connection_string': os.environ.get('CONNECTION_STRING', 'qemu:///system'),
}
INSTALLED_APPS = ['devops']
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.postgresql_psycopg2',
'NAME': 'postgres',
... | Use environment variable for connection_string driver parameter | Use environment variable for connection_string driver parameter
| Python | apache-2.0 | stackforge/fuel-devops,stackforge/fuel-devops | DRIVER = 'devops.driver.libvirt.libvirt_driver'
DRIVER_PARAMETERS = {
'connection_string': 'qemu:///system',
}
INSTALLED_APPS = ['devops']
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.postgresql_psycopg2',
'NAME': 'postgres',
'USER': 'postgres',
'PASSWOR... | import os
DRIVER = 'devops.driver.libvirt.libvirt_driver'
DRIVER_PARAMETERS = {
'connection_string': os.environ.get('CONNECTION_STRING', 'qemu:///system'),
}
INSTALLED_APPS = ['devops']
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.postgresql_psycopg2',
'NAME': 'postgres',
... | <commit_before>DRIVER = 'devops.driver.libvirt.libvirt_driver'
DRIVER_PARAMETERS = {
'connection_string': 'qemu:///system',
}
INSTALLED_APPS = ['devops']
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.postgresql_psycopg2',
'NAME': 'postgres',
'USER': 'postgres',
... | import os
DRIVER = 'devops.driver.libvirt.libvirt_driver'
DRIVER_PARAMETERS = {
'connection_string': os.environ.get('CONNECTION_STRING', 'qemu:///system'),
}
INSTALLED_APPS = ['devops']
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.postgresql_psycopg2',
'NAME': 'postgres',
... | DRIVER = 'devops.driver.libvirt.libvirt_driver'
DRIVER_PARAMETERS = {
'connection_string': 'qemu:///system',
}
INSTALLED_APPS = ['devops']
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.postgresql_psycopg2',
'NAME': 'postgres',
'USER': 'postgres',
'PASSWOR... | <commit_before>DRIVER = 'devops.driver.libvirt.libvirt_driver'
DRIVER_PARAMETERS = {
'connection_string': 'qemu:///system',
}
INSTALLED_APPS = ['devops']
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.postgresql_psycopg2',
'NAME': 'postgres',
'USER': 'postgres',
... |
a7c447db15a0b07043b8973ffa318aed858c5ded | targets/pythoncard/basesource.py | targets/pythoncard/basesource.py | """The main form for the application"""
from PythonCard import model
# Allow importing of our custom controls
import PythonCard.resource
PythonCard.resource.APP_COMPONENTS_PACKAGE = "vb2py.targets.pythoncard.vbcontrols"
class Background(model.Background):
def __getattr__(self, name):
"""If a name was no... | """The main form for the application"""
from PythonCard import model
# Allow importing of our custom controls
import PythonCard.resource
PythonCard.resource.APP_COMPONENTS_PACKAGE = "vb2py.targets.pythoncard.vbcontrols"
class Background(model.Background):
def __getattr__(self, name):
"""If a name was no... | Fix base form source to use correct class name | Fix base form source to use correct class name
| Python | bsd-3-clause | mvz/vb2py,mvz/vb2py,mvz/vb2py | """The main form for the application"""
from PythonCard import model
# Allow importing of our custom controls
import PythonCard.resource
PythonCard.resource.APP_COMPONENTS_PACKAGE = "vb2py.targets.pythoncard.vbcontrols"
class Background(model.Background):
def __getattr__(self, name):
"""If a name was no... | """The main form for the application"""
from PythonCard import model
# Allow importing of our custom controls
import PythonCard.resource
PythonCard.resource.APP_COMPONENTS_PACKAGE = "vb2py.targets.pythoncard.vbcontrols"
class Background(model.Background):
def __getattr__(self, name):
"""If a name was no... | <commit_before>"""The main form for the application"""
from PythonCard import model
# Allow importing of our custom controls
import PythonCard.resource
PythonCard.resource.APP_COMPONENTS_PACKAGE = "vb2py.targets.pythoncard.vbcontrols"
class Background(model.Background):
def __getattr__(self, name):
"""I... | """The main form for the application"""
from PythonCard import model
# Allow importing of our custom controls
import PythonCard.resource
PythonCard.resource.APP_COMPONENTS_PACKAGE = "vb2py.targets.pythoncard.vbcontrols"
class Background(model.Background):
def __getattr__(self, name):
"""If a name was no... | """The main form for the application"""
from PythonCard import model
# Allow importing of our custom controls
import PythonCard.resource
PythonCard.resource.APP_COMPONENTS_PACKAGE = "vb2py.targets.pythoncard.vbcontrols"
class Background(model.Background):
def __getattr__(self, name):
"""If a name was no... | <commit_before>"""The main form for the application"""
from PythonCard import model
# Allow importing of our custom controls
import PythonCard.resource
PythonCard.resource.APP_COMPONENTS_PACKAGE = "vb2py.targets.pythoncard.vbcontrols"
class Background(model.Background):
def __getattr__(self, name):
"""I... |
0cb41062401670a3e423b610d1f128657a9ce623 | _tests/test_links.py | _tests/test_links.py | #!/usr/bin/env python
# -*- encoding: utf-8
import pytest
import requests
@pytest.mark.parametrize('path', [
# Check pagination is working correctly
'/page/2/', '/page/3/',
])
def test_pages_appear_correctly(path):
resp = requests.get(f'http://localhost:5757/{path}')
assert resp.status_code == 200
... | #!/usr/bin/env python
# -*- encoding: utf-8
import pytest
import requests
@pytest.mark.parametrize('path', [
# Check pagination is working correctly
'/page/2/', '/page/3/',
])
def test_pages_appear_correctly(path):
resp = requests.get(f'http://localhost:5757/{path}')
assert resp.status_code == 200
... | Add a couple of tests for the formatting pieces | Add a couple of tests for the formatting pieces
| Python | mit | alexwlchan/alexwlchan.net,alexwlchan/alexwlchan.net,alexwlchan/alexwlchan.net,alexwlchan/alexwlchan.net,alexwlchan/alexwlchan.net | #!/usr/bin/env python
# -*- encoding: utf-8
import pytest
import requests
@pytest.mark.parametrize('path', [
# Check pagination is working correctly
'/page/2/', '/page/3/',
])
def test_pages_appear_correctly(path):
resp = requests.get(f'http://localhost:5757/{path}')
assert resp.status_code == 200
... | #!/usr/bin/env python
# -*- encoding: utf-8
import pytest
import requests
@pytest.mark.parametrize('path', [
# Check pagination is working correctly
'/page/2/', '/page/3/',
])
def test_pages_appear_correctly(path):
resp = requests.get(f'http://localhost:5757/{path}')
assert resp.status_code == 200
... | <commit_before>#!/usr/bin/env python
# -*- encoding: utf-8
import pytest
import requests
@pytest.mark.parametrize('path', [
# Check pagination is working correctly
'/page/2/', '/page/3/',
])
def test_pages_appear_correctly(path):
resp = requests.get(f'http://localhost:5757/{path}')
assert resp.status... | #!/usr/bin/env python
# -*- encoding: utf-8
import pytest
import requests
@pytest.mark.parametrize('path', [
# Check pagination is working correctly
'/page/2/', '/page/3/',
])
def test_pages_appear_correctly(path):
resp = requests.get(f'http://localhost:5757/{path}')
assert resp.status_code == 200
... | #!/usr/bin/env python
# -*- encoding: utf-8
import pytest
import requests
@pytest.mark.parametrize('path', [
# Check pagination is working correctly
'/page/2/', '/page/3/',
])
def test_pages_appear_correctly(path):
resp = requests.get(f'http://localhost:5757/{path}')
assert resp.status_code == 200
... | <commit_before>#!/usr/bin/env python
# -*- encoding: utf-8
import pytest
import requests
@pytest.mark.parametrize('path', [
# Check pagination is working correctly
'/page/2/', '/page/3/',
])
def test_pages_appear_correctly(path):
resp = requests.get(f'http://localhost:5757/{path}')
assert resp.status... |
8362216a009763d4bf70c55819a74cc98c8e9ffe | _pytest/test_server.py | _pytest/test_server.py | from slackclient._user import User
from slackclient._server import Server, SlackLoginError
from slackclient._channel import Channel
import json
import pytest
@pytest.fixture
def login_data():
login_data = open('_pytest/data/rtm.start.json','r').read()
login_data = json.loads(login_data)
return login_data
... | from slackclient._user import User
from slackclient._server import Server, SlackLoginError
from slackclient._channel import Channel
import json
import pytest
@pytest.fixture
def login_data():
login_data = open('_pytest/data/rtm.start.json', 'r').read()
login_data = json.loads(login_data)
return login_data... | Fix PEP8 white spacing (space after comma) | Fix PEP8 white spacing (space after comma)
| Python | mit | slackhq/python-slackclient,slackapi/python-slackclient,slackapi/python-slackclient,slackapi/python-slackclient | from slackclient._user import User
from slackclient._server import Server, SlackLoginError
from slackclient._channel import Channel
import json
import pytest
@pytest.fixture
def login_data():
login_data = open('_pytest/data/rtm.start.json','r').read()
login_data = json.loads(login_data)
return login_data
... | from slackclient._user import User
from slackclient._server import Server, SlackLoginError
from slackclient._channel import Channel
import json
import pytest
@pytest.fixture
def login_data():
login_data = open('_pytest/data/rtm.start.json', 'r').read()
login_data = json.loads(login_data)
return login_data... | <commit_before>from slackclient._user import User
from slackclient._server import Server, SlackLoginError
from slackclient._channel import Channel
import json
import pytest
@pytest.fixture
def login_data():
login_data = open('_pytest/data/rtm.start.json','r').read()
login_data = json.loads(login_data)
ret... | from slackclient._user import User
from slackclient._server import Server, SlackLoginError
from slackclient._channel import Channel
import json
import pytest
@pytest.fixture
def login_data():
login_data = open('_pytest/data/rtm.start.json', 'r').read()
login_data = json.loads(login_data)
return login_data... | from slackclient._user import User
from slackclient._server import Server, SlackLoginError
from slackclient._channel import Channel
import json
import pytest
@pytest.fixture
def login_data():
login_data = open('_pytest/data/rtm.start.json','r').read()
login_data = json.loads(login_data)
return login_data
... | <commit_before>from slackclient._user import User
from slackclient._server import Server, SlackLoginError
from slackclient._channel import Channel
import json
import pytest
@pytest.fixture
def login_data():
login_data = open('_pytest/data/rtm.start.json','r').read()
login_data = json.loads(login_data)
ret... |
21af3dbed471c9f6c860db4d2ae84d1e0fed4077 | demo/option_example.py | demo/option_example.py | from sparts.tasks.periodic import PeriodicTask
from sparts.vservice import VService
from sparts.sparts import option
import socket
class HostCheckTask(PeriodicTask):
INTERVAL=5
check_name = option(default=socket.getfqdn(), type=str,
help='Name to check [%(default)s]')
def execute(se... | from sparts.tasks.periodic import PeriodicTask
from sparts.vservice import VService
from sparts.sparts import option, samples, SampleType
import socket
class HostCheckTask(PeriodicTask):
INTERVAL=5
check_name = option(default=socket.getfqdn(), type=str,
help='Name to check [%(default)s]... | Update option example to highlight samples as well | Update option example to highlight samples as well
And overriding samples
| Python | bsd-3-clause | facebook/sparts,fmoo/sparts,bboozzoo/sparts,djipko/sparts,pshuff/sparts,pshuff/sparts,fmoo/sparts,facebook/sparts,djipko/sparts,bboozzoo/sparts | from sparts.tasks.periodic import PeriodicTask
from sparts.vservice import VService
from sparts.sparts import option
import socket
class HostCheckTask(PeriodicTask):
INTERVAL=5
check_name = option(default=socket.getfqdn(), type=str,
help='Name to check [%(default)s]')
def execute(se... | from sparts.tasks.periodic import PeriodicTask
from sparts.vservice import VService
from sparts.sparts import option, samples, SampleType
import socket
class HostCheckTask(PeriodicTask):
INTERVAL=5
check_name = option(default=socket.getfqdn(), type=str,
help='Name to check [%(default)s]... | <commit_before>from sparts.tasks.periodic import PeriodicTask
from sparts.vservice import VService
from sparts.sparts import option
import socket
class HostCheckTask(PeriodicTask):
INTERVAL=5
check_name = option(default=socket.getfqdn(), type=str,
help='Name to check [%(default)s]')
... | from sparts.tasks.periodic import PeriodicTask
from sparts.vservice import VService
from sparts.sparts import option, samples, SampleType
import socket
class HostCheckTask(PeriodicTask):
INTERVAL=5
check_name = option(default=socket.getfqdn(), type=str,
help='Name to check [%(default)s]... | from sparts.tasks.periodic import PeriodicTask
from sparts.vservice import VService
from sparts.sparts import option
import socket
class HostCheckTask(PeriodicTask):
INTERVAL=5
check_name = option(default=socket.getfqdn(), type=str,
help='Name to check [%(default)s]')
def execute(se... | <commit_before>from sparts.tasks.periodic import PeriodicTask
from sparts.vservice import VService
from sparts.sparts import option
import socket
class HostCheckTask(PeriodicTask):
INTERVAL=5
check_name = option(default=socket.getfqdn(), type=str,
help='Name to check [%(default)s]')
... |
1661174b80e00ff04a2df245abf73b92825ec01a | libs/qr_tools.py | libs/qr_tools.py | #!/usr/bin/python3
import pyqrcode # sudo pip install pyqrcode
def getQRArray(text, errorCorrection):
""" Takes in text and errorCorrection (letter), returns 2D array of the QR code"""
# White is True (1)
# Black is False (0)
# ECC: L7, M15, Q25, H30
# Create the object
qr = pyqrcode.create(text, error=errorCo... | #!/usr/bin/python3
import pyqrcode # sudo pip install pyqrcode
def getQRArray(text, errorCorrection):
""" Takes in text and errorCorrection (letter), returns 2D array of the QR code"""
# White is True (1)
# Black is False (0)
# ECC: L7, M15, Q25, H30
# Create the object
qr = pyqrcode.create(text, error=errorCo... | Remove print of terminal output for debugging | Remove print of terminal output for debugging
| Python | mit | btcspry/3d-wallet-generator | #!/usr/bin/python3
import pyqrcode # sudo pip install pyqrcode
def getQRArray(text, errorCorrection):
""" Takes in text and errorCorrection (letter), returns 2D array of the QR code"""
# White is True (1)
# Black is False (0)
# ECC: L7, M15, Q25, H30
# Create the object
qr = pyqrcode.create(text, error=errorCo... | #!/usr/bin/python3
import pyqrcode # sudo pip install pyqrcode
def getQRArray(text, errorCorrection):
""" Takes in text and errorCorrection (letter), returns 2D array of the QR code"""
# White is True (1)
# Black is False (0)
# ECC: L7, M15, Q25, H30
# Create the object
qr = pyqrcode.create(text, error=errorCo... | <commit_before>#!/usr/bin/python3
import pyqrcode # sudo pip install pyqrcode
def getQRArray(text, errorCorrection):
""" Takes in text and errorCorrection (letter), returns 2D array of the QR code"""
# White is True (1)
# Black is False (0)
# ECC: L7, M15, Q25, H30
# Create the object
qr = pyqrcode.create(text... | #!/usr/bin/python3
import pyqrcode # sudo pip install pyqrcode
def getQRArray(text, errorCorrection):
""" Takes in text and errorCorrection (letter), returns 2D array of the QR code"""
# White is True (1)
# Black is False (0)
# ECC: L7, M15, Q25, H30
# Create the object
qr = pyqrcode.create(text, error=errorCo... | #!/usr/bin/python3
import pyqrcode # sudo pip install pyqrcode
def getQRArray(text, errorCorrection):
""" Takes in text and errorCorrection (letter), returns 2D array of the QR code"""
# White is True (1)
# Black is False (0)
# ECC: L7, M15, Q25, H30
# Create the object
qr = pyqrcode.create(text, error=errorCo... | <commit_before>#!/usr/bin/python3
import pyqrcode # sudo pip install pyqrcode
def getQRArray(text, errorCorrection):
""" Takes in text and errorCorrection (letter), returns 2D array of the QR code"""
# White is True (1)
# Black is False (0)
# ECC: L7, M15, Q25, H30
# Create the object
qr = pyqrcode.create(text... |
7bf6d13389391c1f3cbea7873cf12f345546d789 | tools/send-echo-to-worker.py | tools/send-echo-to-worker.py | #!/usr/bin/env python
# Copyright 2014 - Rackspace Hosting
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless require... | #!/usr/bin/env python
# Copyright 2014 - Rackspace Hosting
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless require... | Fix the accurate file to prevent import errors | Fix the accurate file to prevent import errors
Change-Id: I0e4d246518bbdd9745d61a06d6960b89cf9ed611
| Python | apache-2.0 | devdattakulkarni/test-solum,stackforge/solum,stackforge/solum,openstack/solum,openstack/solum,devdattakulkarni/test-solum | #!/usr/bin/env python
# Copyright 2014 - Rackspace Hosting
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless require... | #!/usr/bin/env python
# Copyright 2014 - Rackspace Hosting
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless require... | <commit_before>#!/usr/bin/env python
# Copyright 2014 - Rackspace Hosting
#
# 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
#
# ... | #!/usr/bin/env python
# Copyright 2014 - Rackspace Hosting
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless require... | #!/usr/bin/env python
# Copyright 2014 - Rackspace Hosting
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless require... | <commit_before>#!/usr/bin/env python
# Copyright 2014 - Rackspace Hosting
#
# 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
#
# ... |
898bd274329bf0f279565091f6ceee9073640bf6 | deactivate.py | deactivate.py | from activate import deactivate
"""
Script to deactivate LUFA for Arduino.
More info can be found in the activate.py script.
"""
if __name__ == '__main__':
deactivate() | from activate import deactivate
"""
Script to deactivate LUFA for Arduino.
More info can be found in the activate.py script.
"""
if __name__ == '__main__':
deactivate()
| Add final newline to make pylint happy | Add final newline to make pylint happy
| Python | mit | Palatis/Arduino-Lufa,Palatis/Arduino-Lufa,Palatis/Arduino-Lufa | from activate import deactivate
"""
Script to deactivate LUFA for Arduino.
More info can be found in the activate.py script.
"""
if __name__ == '__main__':
deactivate()Add final newline to make pylint happy | from activate import deactivate
"""
Script to deactivate LUFA for Arduino.
More info can be found in the activate.py script.
"""
if __name__ == '__main__':
deactivate()
| <commit_before>from activate import deactivate
"""
Script to deactivate LUFA for Arduino.
More info can be found in the activate.py script.
"""
if __name__ == '__main__':
deactivate()<commit_msg>Add final newline to make pylint happy<commit_after> | from activate import deactivate
"""
Script to deactivate LUFA for Arduino.
More info can be found in the activate.py script.
"""
if __name__ == '__main__':
deactivate()
| from activate import deactivate
"""
Script to deactivate LUFA for Arduino.
More info can be found in the activate.py script.
"""
if __name__ == '__main__':
deactivate()Add final newline to make pylint happyfrom activate import deactivate
"""
Script to deactivate LUFA for Arduino.
More info can be found in the acti... | <commit_before>from activate import deactivate
"""
Script to deactivate LUFA for Arduino.
More info can be found in the activate.py script.
"""
if __name__ == '__main__':
deactivate()<commit_msg>Add final newline to make pylint happy<commit_after>from activate import deactivate
"""
Script to deactivate LUFA for Ar... |
d4b3e03c91428ae4de2729991d2815153ec7ccb8 | cronos/accounts/models.py | cronos/accounts/models.py | from django.contrib.auth.models import User
from django.db import models
class UserProfile(models.Model):
user = models.ForeignKey(User, unique = True)
dionysos_username = models.CharField(max_length = 15, unique = True)
dionysos_password = models.CharField(max_length = 30)
eclass_username = models.Cha... | from django.contrib.auth.models import User
from django.db import models
class UserProfile(models.Model):
user = models.ForeignKey(User, unique = True)
dionysos_username = models.CharField(max_length = 15, unique = True)
dionysos_password = models.CharField(max_length = 30)
eclass_username = models.Cha... | Switch student model to unicode | Switch student model to unicode
| Python | agpl-3.0 | LinuxTeam-teilar/cronos.teilar.gr,LinuxTeam-teilar/cronos.teilar.gr,LinuxTeam-teilar/cronos.teilar.gr | from django.contrib.auth.models import User
from django.db import models
class UserProfile(models.Model):
user = models.ForeignKey(User, unique = True)
dionysos_username = models.CharField(max_length = 15, unique = True)
dionysos_password = models.CharField(max_length = 30)
eclass_username = models.Cha... | from django.contrib.auth.models import User
from django.db import models
class UserProfile(models.Model):
user = models.ForeignKey(User, unique = True)
dionysos_username = models.CharField(max_length = 15, unique = True)
dionysos_password = models.CharField(max_length = 30)
eclass_username = models.Cha... | <commit_before>from django.contrib.auth.models import User
from django.db import models
class UserProfile(models.Model):
user = models.ForeignKey(User, unique = True)
dionysos_username = models.CharField(max_length = 15, unique = True)
dionysos_password = models.CharField(max_length = 30)
eclass_userna... | from django.contrib.auth.models import User
from django.db import models
class UserProfile(models.Model):
user = models.ForeignKey(User, unique = True)
dionysos_username = models.CharField(max_length = 15, unique = True)
dionysos_password = models.CharField(max_length = 30)
eclass_username = models.Cha... | from django.contrib.auth.models import User
from django.db import models
class UserProfile(models.Model):
user = models.ForeignKey(User, unique = True)
dionysos_username = models.CharField(max_length = 15, unique = True)
dionysos_password = models.CharField(max_length = 30)
eclass_username = models.Cha... | <commit_before>from django.contrib.auth.models import User
from django.db import models
class UserProfile(models.Model):
user = models.ForeignKey(User, unique = True)
dionysos_username = models.CharField(max_length = 15, unique = True)
dionysos_password = models.CharField(max_length = 30)
eclass_userna... |
b0edec6bc9a4d77a1f0ea0f803ea892f35cc2f4f | text_field.py | text_field.py | # Created On: 2012/01/23
# Copyright 2011 Hardcoded Software (http://www.hardcoded.net)
#
# This software is licensed under the "BSD" License as described in the "LICENSE" file,
# which should be included with this package. The terms are also available at
# http://www.hardcoded.net/licenses/bsd_license
class TextFi... | # Created On: 2012/01/23
# Copyright 2011 Hardcoded Software (http://www.hardcoded.net)
#
# This software is licensed under the "BSD" License as described in the "LICENSE" file,
# which should be included with this package. The terms are also available at
# http://www.hardcoded.net/licenses/bsd_license
class TextFi... | Make TextField also work with a QLabel view, which doesn't allow editing. | Make TextField also work with a QLabel view, which doesn't allow editing.
| Python | bsd-3-clause | hsoft/qtlib | # Created On: 2012/01/23
# Copyright 2011 Hardcoded Software (http://www.hardcoded.net)
#
# This software is licensed under the "BSD" License as described in the "LICENSE" file,
# which should be included with this package. The terms are also available at
# http://www.hardcoded.net/licenses/bsd_license
class TextFi... | # Created On: 2012/01/23
# Copyright 2011 Hardcoded Software (http://www.hardcoded.net)
#
# This software is licensed under the "BSD" License as described in the "LICENSE" file,
# which should be included with this package. The terms are also available at
# http://www.hardcoded.net/licenses/bsd_license
class TextFi... | <commit_before># Created On: 2012/01/23
# Copyright 2011 Hardcoded Software (http://www.hardcoded.net)
#
# This software is licensed under the "BSD" License as described in the "LICENSE" file,
# which should be included with this package. The terms are also available at
# http://www.hardcoded.net/licenses/bsd_licens... | # Created On: 2012/01/23
# Copyright 2011 Hardcoded Software (http://www.hardcoded.net)
#
# This software is licensed under the "BSD" License as described in the "LICENSE" file,
# which should be included with this package. The terms are also available at
# http://www.hardcoded.net/licenses/bsd_license
class TextFi... | # Created On: 2012/01/23
# Copyright 2011 Hardcoded Software (http://www.hardcoded.net)
#
# This software is licensed under the "BSD" License as described in the "LICENSE" file,
# which should be included with this package. The terms are also available at
# http://www.hardcoded.net/licenses/bsd_license
class TextFi... | <commit_before># Created On: 2012/01/23
# Copyright 2011 Hardcoded Software (http://www.hardcoded.net)
#
# This software is licensed under the "BSD" License as described in the "LICENSE" file,
# which should be included with this package. The terms are also available at
# http://www.hardcoded.net/licenses/bsd_licens... |
b801df9acdc13460ecc5d36bcb6bd300f5de16c3 | flatten-array/flatten_array.py | flatten-array/flatten_array.py | def flatten(lst):
"""Completely flatten an arbitrarily-deep list"""
return [*_flatten(lst)]
def _flatten(lst):
"""Generator for flattening arbitrarily-deep lists"""
if isinstance(lst, (list, tuple)):
for item in lst:
if item is None:
continue
else:
... | def flatten(lst):
"""Completely flatten an arbitrarily-deep list"""
return [*_flatten(lst)]
def _flatten(lst):
"""Generator for flattening arbitrarily-deep lists"""
for item in lst:
if isinstance(item, (list, tuple)):
yield from _flatten(item)
elif item is not None:
... | Tidy and simplify generator code | Tidy and simplify generator code
| Python | agpl-3.0 | CubicComet/exercism-python-solutions | def flatten(lst):
"""Completely flatten an arbitrarily-deep list"""
return [*_flatten(lst)]
def _flatten(lst):
"""Generator for flattening arbitrarily-deep lists"""
if isinstance(lst, (list, tuple)):
for item in lst:
if item is None:
continue
else:
... | def flatten(lst):
"""Completely flatten an arbitrarily-deep list"""
return [*_flatten(lst)]
def _flatten(lst):
"""Generator for flattening arbitrarily-deep lists"""
for item in lst:
if isinstance(item, (list, tuple)):
yield from _flatten(item)
elif item is not None:
... | <commit_before>def flatten(lst):
"""Completely flatten an arbitrarily-deep list"""
return [*_flatten(lst)]
def _flatten(lst):
"""Generator for flattening arbitrarily-deep lists"""
if isinstance(lst, (list, tuple)):
for item in lst:
if item is None:
continue
... | def flatten(lst):
"""Completely flatten an arbitrarily-deep list"""
return [*_flatten(lst)]
def _flatten(lst):
"""Generator for flattening arbitrarily-deep lists"""
for item in lst:
if isinstance(item, (list, tuple)):
yield from _flatten(item)
elif item is not None:
... | def flatten(lst):
"""Completely flatten an arbitrarily-deep list"""
return [*_flatten(lst)]
def _flatten(lst):
"""Generator for flattening arbitrarily-deep lists"""
if isinstance(lst, (list, tuple)):
for item in lst:
if item is None:
continue
else:
... | <commit_before>def flatten(lst):
"""Completely flatten an arbitrarily-deep list"""
return [*_flatten(lst)]
def _flatten(lst):
"""Generator for flattening arbitrarily-deep lists"""
if isinstance(lst, (list, tuple)):
for item in lst:
if item is None:
continue
... |
58cbb8b3dbe8d1275743c3fd5d043cfa12914cb3 | data_structures/bitorrent/client.py | data_structures/bitorrent/client.py | from urlparse import urlparse
from torrent import Torrent
from trackers.udp import UDPTracker
class Client(object):
__TORRENTS = {}
@property
def torrents(self):
return self.__TORRENTS
@torrents.setter
def torrents(self, new_torrent):
self.__TORRENTS[new_torrent] = Torrent(new_torrent)
def dow... | import urllib
from random import randint
from urlparse import urlparse
from torrent import Torrent
from trackers.udp import UDPTracker
class Client(object):
__TORRENTS = {}
def __init__(self):
self.peer_id = urllib.quote("-AZ2470-" + "".join([str(randint(0, 9)) for i in xrange(12)]))
@property
def torr... | Use a separate method to get all peers of a torrent | Use a separate method to get all peers of a torrent
| Python | apache-2.0 | vtemian/university_projects,vtemian/university_projects,vtemian/university_projects | from urlparse import urlparse
from torrent import Torrent
from trackers.udp import UDPTracker
class Client(object):
__TORRENTS = {}
@property
def torrents(self):
return self.__TORRENTS
@torrents.setter
def torrents(self, new_torrent):
self.__TORRENTS[new_torrent] = Torrent(new_torrent)
def dow... | import urllib
from random import randint
from urlparse import urlparse
from torrent import Torrent
from trackers.udp import UDPTracker
class Client(object):
__TORRENTS = {}
def __init__(self):
self.peer_id = urllib.quote("-AZ2470-" + "".join([str(randint(0, 9)) for i in xrange(12)]))
@property
def torr... | <commit_before>from urlparse import urlparse
from torrent import Torrent
from trackers.udp import UDPTracker
class Client(object):
__TORRENTS = {}
@property
def torrents(self):
return self.__TORRENTS
@torrents.setter
def torrents(self, new_torrent):
self.__TORRENTS[new_torrent] = Torrent(new_torr... | import urllib
from random import randint
from urlparse import urlparse
from torrent import Torrent
from trackers.udp import UDPTracker
class Client(object):
__TORRENTS = {}
def __init__(self):
self.peer_id = urllib.quote("-AZ2470-" + "".join([str(randint(0, 9)) for i in xrange(12)]))
@property
def torr... | from urlparse import urlparse
from torrent import Torrent
from trackers.udp import UDPTracker
class Client(object):
__TORRENTS = {}
@property
def torrents(self):
return self.__TORRENTS
@torrents.setter
def torrents(self, new_torrent):
self.__TORRENTS[new_torrent] = Torrent(new_torrent)
def dow... | <commit_before>from urlparse import urlparse
from torrent import Torrent
from trackers.udp import UDPTracker
class Client(object):
__TORRENTS = {}
@property
def torrents(self):
return self.__TORRENTS
@torrents.setter
def torrents(self, new_torrent):
self.__TORRENTS[new_torrent] = Torrent(new_torr... |
848723c943cfb8995c6f2a68ea19b203c75e4aaa | tests/test_scan.py | tests/test_scan.py | #!/usr/bin/env python
# coding=utf-8
try:
import unittest.mock as mock
except ImportError:
import mock
import unittest
try:
from StringIO import StringIO
except ImportError:
from io import StringIO
from nessusapi.scan import Scan
from nessusapi.session import Session
class SessionTestCase(unittest.T... | # coding=utf-8
try:
import unittest.mock as mock
except ImportError:
import mock
import unittest
import nessusapi.scan
class TestScan(unittest.TestCase):
def test_init(self):
fake_nessus = mock.Mock(request_single=
mock.Mock(return_value='e3b4f63f-de03-ec8b'))
... | Update test scan to work for new model | Update test scan to work for new model
| Python | mit | sait-berkeley-infosec/pynessus-api | #!/usr/bin/env python
# coding=utf-8
try:
import unittest.mock as mock
except ImportError:
import mock
import unittest
try:
from StringIO import StringIO
except ImportError:
from io import StringIO
from nessusapi.scan import Scan
from nessusapi.session import Session
class SessionTestCase(unittest.T... | # coding=utf-8
try:
import unittest.mock as mock
except ImportError:
import mock
import unittest
import nessusapi.scan
class TestScan(unittest.TestCase):
def test_init(self):
fake_nessus = mock.Mock(request_single=
mock.Mock(return_value='e3b4f63f-de03-ec8b'))
... | <commit_before>#!/usr/bin/env python
# coding=utf-8
try:
import unittest.mock as mock
except ImportError:
import mock
import unittest
try:
from StringIO import StringIO
except ImportError:
from io import StringIO
from nessusapi.scan import Scan
from nessusapi.session import Session
class SessionTest... | # coding=utf-8
try:
import unittest.mock as mock
except ImportError:
import mock
import unittest
import nessusapi.scan
class TestScan(unittest.TestCase):
def test_init(self):
fake_nessus = mock.Mock(request_single=
mock.Mock(return_value='e3b4f63f-de03-ec8b'))
... | #!/usr/bin/env python
# coding=utf-8
try:
import unittest.mock as mock
except ImportError:
import mock
import unittest
try:
from StringIO import StringIO
except ImportError:
from io import StringIO
from nessusapi.scan import Scan
from nessusapi.session import Session
class SessionTestCase(unittest.T... | <commit_before>#!/usr/bin/env python
# coding=utf-8
try:
import unittest.mock as mock
except ImportError:
import mock
import unittest
try:
from StringIO import StringIO
except ImportError:
from io import StringIO
from nessusapi.scan import Scan
from nessusapi.session import Session
class SessionTest... |
1030381f6a22d38fa48222f44858a8396970494e | nucleus/urls.py | nucleus/urls.py | from django.conf import settings
from django.conf.urls import include, url
from django.contrib import admin
from django.http import HttpResponse
from watchman import views as watchman_views
admin.autodiscover() # Discover admin.py files for the admin interface.
urlpatterns = [
url(r'', include('nucleus.base.ur... | from django.conf import settings
from django.conf.urls import include, url
from django.contrib import admin
from django.http import HttpResponse
from watchman import views as watchman_views
admin.autodiscover() # Discover admin.py files for the admin interface.
admin.site.site_header = 'Release Notes Administration... | Customize admin site title and header | Customize admin site title and header
| Python | mpl-2.0 | mozilla/nucleus,mozilla/nucleus,mozilla/nucleus,mozilla/nucleus | from django.conf import settings
from django.conf.urls import include, url
from django.contrib import admin
from django.http import HttpResponse
from watchman import views as watchman_views
admin.autodiscover() # Discover admin.py files for the admin interface.
urlpatterns = [
url(r'', include('nucleus.base.ur... | from django.conf import settings
from django.conf.urls import include, url
from django.contrib import admin
from django.http import HttpResponse
from watchman import views as watchman_views
admin.autodiscover() # Discover admin.py files for the admin interface.
admin.site.site_header = 'Release Notes Administration... | <commit_before>from django.conf import settings
from django.conf.urls import include, url
from django.contrib import admin
from django.http import HttpResponse
from watchman import views as watchman_views
admin.autodiscover() # Discover admin.py files for the admin interface.
urlpatterns = [
url(r'', include('... | from django.conf import settings
from django.conf.urls import include, url
from django.contrib import admin
from django.http import HttpResponse
from watchman import views as watchman_views
admin.autodiscover() # Discover admin.py files for the admin interface.
admin.site.site_header = 'Release Notes Administration... | from django.conf import settings
from django.conf.urls import include, url
from django.contrib import admin
from django.http import HttpResponse
from watchman import views as watchman_views
admin.autodiscover() # Discover admin.py files for the admin interface.
urlpatterns = [
url(r'', include('nucleus.base.ur... | <commit_before>from django.conf import settings
from django.conf.urls import include, url
from django.contrib import admin
from django.http import HttpResponse
from watchman import views as watchman_views
admin.autodiscover() # Discover admin.py files for the admin interface.
urlpatterns = [
url(r'', include('... |
d017ca19b6d810387424e388656d5ff63244a1f7 | tests/engine/file_loader_test.py | tests/engine/file_loader_test.py | import unittest
from engine import file_loader
class FileLoaderTest(unittest.TestCase):
def test_load_units(self):
dicts = file_loader.read_and_parse_json('units')
self.assertIsInstance(dicts, list)
self.assertGreater(len(dicts), 0)
for dict_ in dicts:
self.assertIsIns... | import unittest
from engine import file_loader
class FileLoaderTest(unittest.TestCase):
def test_load_units(self):
dicts = file_loader.read_and_parse_json('units')
self.assertIsInstance(dicts, list)
self.assertGreater(len(dicts), 0)
for dict_ in dicts:
self.assertIsIns... | Include tests for file loading helpers | Include tests for file loading helpers
| Python | mit | Tactique/game_engine,Tactique/game_engine | import unittest
from engine import file_loader
class FileLoaderTest(unittest.TestCase):
def test_load_units(self):
dicts = file_loader.read_and_parse_json('units')
self.assertIsInstance(dicts, list)
self.assertGreater(len(dicts), 0)
for dict_ in dicts:
self.assertIsIns... | import unittest
from engine import file_loader
class FileLoaderTest(unittest.TestCase):
def test_load_units(self):
dicts = file_loader.read_and_parse_json('units')
self.assertIsInstance(dicts, list)
self.assertGreater(len(dicts), 0)
for dict_ in dicts:
self.assertIsIns... | <commit_before>import unittest
from engine import file_loader
class FileLoaderTest(unittest.TestCase):
def test_load_units(self):
dicts = file_loader.read_and_parse_json('units')
self.assertIsInstance(dicts, list)
self.assertGreater(len(dicts), 0)
for dict_ in dicts:
s... | import unittest
from engine import file_loader
class FileLoaderTest(unittest.TestCase):
def test_load_units(self):
dicts = file_loader.read_and_parse_json('units')
self.assertIsInstance(dicts, list)
self.assertGreater(len(dicts), 0)
for dict_ in dicts:
self.assertIsIns... | import unittest
from engine import file_loader
class FileLoaderTest(unittest.TestCase):
def test_load_units(self):
dicts = file_loader.read_and_parse_json('units')
self.assertIsInstance(dicts, list)
self.assertGreater(len(dicts), 0)
for dict_ in dicts:
self.assertIsIns... | <commit_before>import unittest
from engine import file_loader
class FileLoaderTest(unittest.TestCase):
def test_load_units(self):
dicts = file_loader.read_and_parse_json('units')
self.assertIsInstance(dicts, list)
self.assertGreater(len(dicts), 0)
for dict_ in dicts:
s... |
4f6400e9ecf9bbc1cee62567673c619f9a975f95 | lib/python/opendiamond/bundle.py | lib/python/opendiamond/bundle.py | #
# The OpenDiamond Platform for Interactive Search
# Version 5
#
# Copyright (c) 2011 Carnegie Mellon University
# All rights reserved.
#
# This software is distributed under the terms of the Eclipse Public
# License, Version 1.0 which can be found in the file named LICENSE.
# ANY USE, REPRODUCTION OR DISTRIBUT... | #
# The OpenDiamond Platform for Interactive Search
# Version 5
#
# Copyright (c) 2011 Carnegie Mellon University
# All rights reserved.
#
# This software is distributed under the terms of the Eclipse Public
# License, Version 1.0 which can be found in the file named LICENSE.
# ANY USE, REPRODUCTION OR DISTRIBUT... | Allow make_zipfile() to clobber the destination file | Allow make_zipfile() to clobber the destination file
| Python | epl-1.0 | cmusatyalab/opendiamond,cmusatyalab/opendiamond,cmusatyalab/opendiamond,cmusatyalab/opendiamond,cmusatyalab/opendiamond | #
# The OpenDiamond Platform for Interactive Search
# Version 5
#
# Copyright (c) 2011 Carnegie Mellon University
# All rights reserved.
#
# This software is distributed under the terms of the Eclipse Public
# License, Version 1.0 which can be found in the file named LICENSE.
# ANY USE, REPRODUCTION OR DISTRIBUT... | #
# The OpenDiamond Platform for Interactive Search
# Version 5
#
# Copyright (c) 2011 Carnegie Mellon University
# All rights reserved.
#
# This software is distributed under the terms of the Eclipse Public
# License, Version 1.0 which can be found in the file named LICENSE.
# ANY USE, REPRODUCTION OR DISTRIBUT... | <commit_before>#
# The OpenDiamond Platform for Interactive Search
# Version 5
#
# Copyright (c) 2011 Carnegie Mellon University
# All rights reserved.
#
# This software is distributed under the terms of the Eclipse Public
# License, Version 1.0 which can be found in the file named LICENSE.
# ANY USE, REPRODUCTI... | #
# The OpenDiamond Platform for Interactive Search
# Version 5
#
# Copyright (c) 2011 Carnegie Mellon University
# All rights reserved.
#
# This software is distributed under the terms of the Eclipse Public
# License, Version 1.0 which can be found in the file named LICENSE.
# ANY USE, REPRODUCTION OR DISTRIBUT... | #
# The OpenDiamond Platform for Interactive Search
# Version 5
#
# Copyright (c) 2011 Carnegie Mellon University
# All rights reserved.
#
# This software is distributed under the terms of the Eclipse Public
# License, Version 1.0 which can be found in the file named LICENSE.
# ANY USE, REPRODUCTION OR DISTRIBUT... | <commit_before>#
# The OpenDiamond Platform for Interactive Search
# Version 5
#
# Copyright (c) 2011 Carnegie Mellon University
# All rights reserved.
#
# This software is distributed under the terms of the Eclipse Public
# License, Version 1.0 which can be found in the file named LICENSE.
# ANY USE, REPRODUCTI... |
5bb6cc3ffb92736515df94b62d7d1981eadd7c44 | tilequeue/postgresql.py | tilequeue/postgresql.py | from itertools import cycle
from psycopg2.extras import register_hstore, register_json
import psycopg2
import threading
import ujson
class DBAffinityConnectionsNoLimit(object):
# Similar to the db affinity pool, but without keeping track of
# the connections. It's the caller's responsibility to call us
#... | from itertools import cycle
from psycopg2.extras import register_hstore, register_json
import psycopg2
import threading
import ujson
class DBAffinityConnectionsNoLimit(object):
# Similar to the db affinity pool, but without keeping track of
# the connections. It's the caller's responsibility to call us
#... | Use cycle instead of counting an index ourselves | Use cycle instead of counting an index ourselves
| Python | mit | tilezen/tilequeue,mapzen/tilequeue | from itertools import cycle
from psycopg2.extras import register_hstore, register_json
import psycopg2
import threading
import ujson
class DBAffinityConnectionsNoLimit(object):
# Similar to the db affinity pool, but without keeping track of
# the connections. It's the caller's responsibility to call us
#... | from itertools import cycle
from psycopg2.extras import register_hstore, register_json
import psycopg2
import threading
import ujson
class DBAffinityConnectionsNoLimit(object):
# Similar to the db affinity pool, but without keeping track of
# the connections. It's the caller's responsibility to call us
#... | <commit_before>from itertools import cycle
from psycopg2.extras import register_hstore, register_json
import psycopg2
import threading
import ujson
class DBAffinityConnectionsNoLimit(object):
# Similar to the db affinity pool, but without keeping track of
# the connections. It's the caller's responsibility t... | from itertools import cycle
from psycopg2.extras import register_hstore, register_json
import psycopg2
import threading
import ujson
class DBAffinityConnectionsNoLimit(object):
# Similar to the db affinity pool, but without keeping track of
# the connections. It's the caller's responsibility to call us
#... | from itertools import cycle
from psycopg2.extras import register_hstore, register_json
import psycopg2
import threading
import ujson
class DBAffinityConnectionsNoLimit(object):
# Similar to the db affinity pool, but without keeping track of
# the connections. It's the caller's responsibility to call us
#... | <commit_before>from itertools import cycle
from psycopg2.extras import register_hstore, register_json
import psycopg2
import threading
import ujson
class DBAffinityConnectionsNoLimit(object):
# Similar to the db affinity pool, but without keeping track of
# the connections. It's the caller's responsibility t... |
b3ed7ade10d18e8ecd9bfc64d056bdbb2a1501f6 | tests/periph_rtt/tests/01-run.py | tests/periph_rtt/tests/01-run.py | #!/usr/bin/env python3
# Copyright (C) 2019 Inria
#
# This file is subject to the terms and conditions of the GNU Lesser
# General Public License v2.1. See the file LICENSE in the top level
# directory for more details.
import sys
import time
from testrunner import run
PRECISION = 0.05 # 5%
MAX_HELLOS = 5
def te... | #!/usr/bin/env python3
# Copyright (C) 2019 Inria
#
# This file is subject to the terms and conditions of the GNU Lesser
# General Public License v2.1. See the file LICENSE in the top level
# directory for more details.
import sys
import time
from testrunner import run
PRECISION = 0.05 # 5%
MAX_HELLOS = 5
def te... | Correct the test script syntax | tests/periph_rtt: Correct the test script syntax
Previously the test was failing due to apparently incorrect Python syntax in
the testrunner script. This fix corrects this and the test now passes.
| Python | lgpl-2.1 | OlegHahm/RIOT,RIOT-OS/RIOT,OlegHahm/RIOT,jasonatran/RIOT,mfrey/RIOT,x3ro/RIOT,aeneby/RIOT,rfuentess/RIOT,josephnoir/RIOT,toonst/RIOT,ant9000/RIOT,kYc0o/RIOT,jasonatran/RIOT,cladmi/RIOT,josephnoir/RIOT,cladmi/RIOT,mtausig/RIOT,toonst/RIOT,OTAkeys/RIOT,toonst/RIOT,yogo1212/RIOT,smlng/RIOT,miri64/RIOT,mfrey/RIOT,rfuentess... | #!/usr/bin/env python3
# Copyright (C) 2019 Inria
#
# This file is subject to the terms and conditions of the GNU Lesser
# General Public License v2.1. See the file LICENSE in the top level
# directory for more details.
import sys
import time
from testrunner import run
PRECISION = 0.05 # 5%
MAX_HELLOS = 5
def te... | #!/usr/bin/env python3
# Copyright (C) 2019 Inria
#
# This file is subject to the terms and conditions of the GNU Lesser
# General Public License v2.1. See the file LICENSE in the top level
# directory for more details.
import sys
import time
from testrunner import run
PRECISION = 0.05 # 5%
MAX_HELLOS = 5
def te... | <commit_before>#!/usr/bin/env python3
# Copyright (C) 2019 Inria
#
# This file is subject to the terms and conditions of the GNU Lesser
# General Public License v2.1. See the file LICENSE in the top level
# directory for more details.
import sys
import time
from testrunner import run
PRECISION = 0.05 # 5%
MAX_HELL... | #!/usr/bin/env python3
# Copyright (C) 2019 Inria
#
# This file is subject to the terms and conditions of the GNU Lesser
# General Public License v2.1. See the file LICENSE in the top level
# directory for more details.
import sys
import time
from testrunner import run
PRECISION = 0.05 # 5%
MAX_HELLOS = 5
def te... | #!/usr/bin/env python3
# Copyright (C) 2019 Inria
#
# This file is subject to the terms and conditions of the GNU Lesser
# General Public License v2.1. See the file LICENSE in the top level
# directory for more details.
import sys
import time
from testrunner import run
PRECISION = 0.05 # 5%
MAX_HELLOS = 5
def te... | <commit_before>#!/usr/bin/env python3
# Copyright (C) 2019 Inria
#
# This file is subject to the terms and conditions of the GNU Lesser
# General Public License v2.1. See the file LICENSE in the top level
# directory for more details.
import sys
import time
from testrunner import run
PRECISION = 0.05 # 5%
MAX_HELL... |
648189583d78efef9ec8f65e861e1321c397c1a6 | app/views/main_view.py | app/views/main_view.py | from flask import render_template
from flask_classy import FlaskView
from ..models import PostModel
class Main(FlaskView):
""" Main page view. """
route_base = "/"
def index(self):
posts = PostModel.fetch()
return render_template("index.html", posts=posts)
| from flask import render_template
from flask_classy import FlaskView
from ..models import PostModel
class Main(FlaskView):
""" Main page view. """
route_base = "/"
def index(self):
PostModel.set_query()
PostModel.query.order = ['-updated', 'title']
posts = PostModel.fetch()
... | Set index main view to return post ordered by updated and title field | Set index main view to return post ordered by updated and title field
| Python | mit | oldani/nanodegree-blog,oldani/nanodegree-blog,oldani/nanodegree-blog | from flask import render_template
from flask_classy import FlaskView
from ..models import PostModel
class Main(FlaskView):
""" Main page view. """
route_base = "/"
def index(self):
posts = PostModel.fetch()
return render_template("index.html", posts=posts)
Set index main view to return p... | from flask import render_template
from flask_classy import FlaskView
from ..models import PostModel
class Main(FlaskView):
""" Main page view. """
route_base = "/"
def index(self):
PostModel.set_query()
PostModel.query.order = ['-updated', 'title']
posts = PostModel.fetch()
... | <commit_before>from flask import render_template
from flask_classy import FlaskView
from ..models import PostModel
class Main(FlaskView):
""" Main page view. """
route_base = "/"
def index(self):
posts = PostModel.fetch()
return render_template("index.html", posts=posts)
<commit_msg>Set ... | from flask import render_template
from flask_classy import FlaskView
from ..models import PostModel
class Main(FlaskView):
""" Main page view. """
route_base = "/"
def index(self):
PostModel.set_query()
PostModel.query.order = ['-updated', 'title']
posts = PostModel.fetch()
... | from flask import render_template
from flask_classy import FlaskView
from ..models import PostModel
class Main(FlaskView):
""" Main page view. """
route_base = "/"
def index(self):
posts = PostModel.fetch()
return render_template("index.html", posts=posts)
Set index main view to return p... | <commit_before>from flask import render_template
from flask_classy import FlaskView
from ..models import PostModel
class Main(FlaskView):
""" Main page view. """
route_base = "/"
def index(self):
posts = PostModel.fetch()
return render_template("index.html", posts=posts)
<commit_msg>Set ... |
e0e53c594569c24eee4e4b58f567f6d9099806df | tests/test_replay.py | tests/test_replay.py | import pytest
# Successful retrieval
# Accurate retrieval
# Comprehensive retrieval of sub-resources
@pytest.mark.skip(reason='not implemented')
def test_retrieveWARCRecord_fromIPFSHash():
pass
@pytest.mark.skip(reason='not implemented')
def test_retrieveWARCRecord_fromCDXJFile():
pass
@pytest.mark.skip(... | import pytest
# Successful retrieval
# Accurate retrieval
# Comprehensive retrieval of sub-resources
@pytest.mark.skip(reason='not implemented')
def test_retrieveWARCRecord_fromIPFSHash():
pass
@pytest.mark.skip(reason='not implemented')
def test_retrieveWARCRecord_fromLocalCDXJFile():
pass
@pytest.mark.... | Add more tests to be written | Add more tests to be written
| Python | mit | oduwsdl/ipwb,oduwsdl/ipwb,oduwsdl/ipwb,oduwsdl/ipwb | import pytest
# Successful retrieval
# Accurate retrieval
# Comprehensive retrieval of sub-resources
@pytest.mark.skip(reason='not implemented')
def test_retrieveWARCRecord_fromIPFSHash():
pass
@pytest.mark.skip(reason='not implemented')
def test_retrieveWARCRecord_fromCDXJFile():
pass
@pytest.mark.skip(... | import pytest
# Successful retrieval
# Accurate retrieval
# Comprehensive retrieval of sub-resources
@pytest.mark.skip(reason='not implemented')
def test_retrieveWARCRecord_fromIPFSHash():
pass
@pytest.mark.skip(reason='not implemented')
def test_retrieveWARCRecord_fromLocalCDXJFile():
pass
@pytest.mark.... | <commit_before>import pytest
# Successful retrieval
# Accurate retrieval
# Comprehensive retrieval of sub-resources
@pytest.mark.skip(reason='not implemented')
def test_retrieveWARCRecord_fromIPFSHash():
pass
@pytest.mark.skip(reason='not implemented')
def test_retrieveWARCRecord_fromCDXJFile():
pass
@py... | import pytest
# Successful retrieval
# Accurate retrieval
# Comprehensive retrieval of sub-resources
@pytest.mark.skip(reason='not implemented')
def test_retrieveWARCRecord_fromIPFSHash():
pass
@pytest.mark.skip(reason='not implemented')
def test_retrieveWARCRecord_fromLocalCDXJFile():
pass
@pytest.mark.... | import pytest
# Successful retrieval
# Accurate retrieval
# Comprehensive retrieval of sub-resources
@pytest.mark.skip(reason='not implemented')
def test_retrieveWARCRecord_fromIPFSHash():
pass
@pytest.mark.skip(reason='not implemented')
def test_retrieveWARCRecord_fromCDXJFile():
pass
@pytest.mark.skip(... | <commit_before>import pytest
# Successful retrieval
# Accurate retrieval
# Comprehensive retrieval of sub-resources
@pytest.mark.skip(reason='not implemented')
def test_retrieveWARCRecord_fromIPFSHash():
pass
@pytest.mark.skip(reason='not implemented')
def test_retrieveWARCRecord_fromCDXJFile():
pass
@py... |
b103c02815a7819e9cb4f1cc0061202cfcfd0fa6 | bidb/api/views.py | bidb/api/views.py | from django.conf import settings
from django.http import HttpResponse, HttpResponseBadRequest
from django.views.decorators.csrf import csrf_exempt
from django.views.decorators.http import require_http_methods
from .utils import parse_submission, InvalidSubmission
@csrf_exempt
@require_http_methods(['PUT'])
def submi... | from django.conf import settings
from django.http import HttpResponse, HttpResponseBadRequest
from django.views.decorators.csrf import csrf_exempt
from django.views.decorators.http import require_http_methods
from .utils import parse_submission, InvalidSubmission
@csrf_exempt
@require_http_methods(['PUT'])
def submi... | Make it clearer that we are rejecting the submission. | Make it clearer that we are rejecting the submission.
| Python | agpl-3.0 | lamby/buildinfo.debian.net,lamby/buildinfo.debian.net | from django.conf import settings
from django.http import HttpResponse, HttpResponseBadRequest
from django.views.decorators.csrf import csrf_exempt
from django.views.decorators.http import require_http_methods
from .utils import parse_submission, InvalidSubmission
@csrf_exempt
@require_http_methods(['PUT'])
def submi... | from django.conf import settings
from django.http import HttpResponse, HttpResponseBadRequest
from django.views.decorators.csrf import csrf_exempt
from django.views.decorators.http import require_http_methods
from .utils import parse_submission, InvalidSubmission
@csrf_exempt
@require_http_methods(['PUT'])
def submi... | <commit_before>from django.conf import settings
from django.http import HttpResponse, HttpResponseBadRequest
from django.views.decorators.csrf import csrf_exempt
from django.views.decorators.http import require_http_methods
from .utils import parse_submission, InvalidSubmission
@csrf_exempt
@require_http_methods(['P... | from django.conf import settings
from django.http import HttpResponse, HttpResponseBadRequest
from django.views.decorators.csrf import csrf_exempt
from django.views.decorators.http import require_http_methods
from .utils import parse_submission, InvalidSubmission
@csrf_exempt
@require_http_methods(['PUT'])
def submi... | from django.conf import settings
from django.http import HttpResponse, HttpResponseBadRequest
from django.views.decorators.csrf import csrf_exempt
from django.views.decorators.http import require_http_methods
from .utils import parse_submission, InvalidSubmission
@csrf_exempt
@require_http_methods(['PUT'])
def submi... | <commit_before>from django.conf import settings
from django.http import HttpResponse, HttpResponseBadRequest
from django.views.decorators.csrf import csrf_exempt
from django.views.decorators.http import require_http_methods
from .utils import parse_submission, InvalidSubmission
@csrf_exempt
@require_http_methods(['P... |
e5e61e4d2575a39d585b3c51c082b2b53bade7bb | django_sphinx_db/backend/sphinx/base.py | django_sphinx_db/backend/sphinx/base.py | from django.db.backends.mysql.base import DatabaseWrapper as MySQLDatabaseWrapper
from django.db.backends.mysql.base import DatabaseOperations as MySQLDatabaseOperations
from django.db.backends.mysql.creation import DatabaseCreation as MySQLDatabaseCreation
class SphinxOperations(MySQLDatabaseOperations):
compile... | from django.db.backends.mysql.base import DatabaseWrapper as MySQLDatabaseWrapper
from django.db.backends.mysql.base import DatabaseOperations as MySQLDatabaseOperations
from django.db.backends.mysql.creation import DatabaseCreation as MySQLDatabaseCreation
class SphinxOperations(MySQLDatabaseOperations):
compile... | Speed up unit tests when Sphinx DB is configured | Speed up unit tests when Sphinx DB is configured
| Python | bsd-3-clause | smartfile/django-sphinx-db,rutube/django-sphinx-db,anatoliy-larin/django-sphinx-db,jnormore/django-sphinx-db,petekalo/django-sphinx-db | from django.db.backends.mysql.base import DatabaseWrapper as MySQLDatabaseWrapper
from django.db.backends.mysql.base import DatabaseOperations as MySQLDatabaseOperations
from django.db.backends.mysql.creation import DatabaseCreation as MySQLDatabaseCreation
class SphinxOperations(MySQLDatabaseOperations):
compile... | from django.db.backends.mysql.base import DatabaseWrapper as MySQLDatabaseWrapper
from django.db.backends.mysql.base import DatabaseOperations as MySQLDatabaseOperations
from django.db.backends.mysql.creation import DatabaseCreation as MySQLDatabaseCreation
class SphinxOperations(MySQLDatabaseOperations):
compile... | <commit_before>from django.db.backends.mysql.base import DatabaseWrapper as MySQLDatabaseWrapper
from django.db.backends.mysql.base import DatabaseOperations as MySQLDatabaseOperations
from django.db.backends.mysql.creation import DatabaseCreation as MySQLDatabaseCreation
class SphinxOperations(MySQLDatabaseOperation... | from django.db.backends.mysql.base import DatabaseWrapper as MySQLDatabaseWrapper
from django.db.backends.mysql.base import DatabaseOperations as MySQLDatabaseOperations
from django.db.backends.mysql.creation import DatabaseCreation as MySQLDatabaseCreation
class SphinxOperations(MySQLDatabaseOperations):
compile... | from django.db.backends.mysql.base import DatabaseWrapper as MySQLDatabaseWrapper
from django.db.backends.mysql.base import DatabaseOperations as MySQLDatabaseOperations
from django.db.backends.mysql.creation import DatabaseCreation as MySQLDatabaseCreation
class SphinxOperations(MySQLDatabaseOperations):
compile... | <commit_before>from django.db.backends.mysql.base import DatabaseWrapper as MySQLDatabaseWrapper
from django.db.backends.mysql.base import DatabaseOperations as MySQLDatabaseOperations
from django.db.backends.mysql.creation import DatabaseCreation as MySQLDatabaseCreation
class SphinxOperations(MySQLDatabaseOperation... |
88f0c284b01bf5b4545fe63bdd1fde7cc66ad937 | us_ignite/apps/admin.py | us_ignite/apps/admin.py | from django.contrib import admin
from us_ignite.apps.models import (Application, ApplicationURL,
ApplicationImage, Domain, Feature)
class ApplicationURLInline(admin.TabularInline):
model = ApplicationURL
class ApplicationImageInline(admin.TabularInline):
model = Applicati... | from django.contrib import admin
from us_ignite.apps.models import (Application, ApplicationURL,
ApplicationImage, Domain, Feature,
Page, PageApplication)
class ApplicationURLInline(admin.TabularInline):
model = ApplicationURL
class Applicat... | Add admi to add Applications to the Pages. | Add admi to add Applications to the Pages.
https://github.com/madewithbytes/us_ignite/issues/79
The applications can be added to a page and ordered
in the admin.
| Python | bsd-3-clause | us-ignite/us_ignite,us-ignite/us_ignite,us-ignite/us_ignite,us-ignite/us_ignite,us-ignite/us_ignite | from django.contrib import admin
from us_ignite.apps.models import (Application, ApplicationURL,
ApplicationImage, Domain, Feature)
class ApplicationURLInline(admin.TabularInline):
model = ApplicationURL
class ApplicationImageInline(admin.TabularInline):
model = Applicati... | from django.contrib import admin
from us_ignite.apps.models import (Application, ApplicationURL,
ApplicationImage, Domain, Feature,
Page, PageApplication)
class ApplicationURLInline(admin.TabularInline):
model = ApplicationURL
class Applicat... | <commit_before>from django.contrib import admin
from us_ignite.apps.models import (Application, ApplicationURL,
ApplicationImage, Domain, Feature)
class ApplicationURLInline(admin.TabularInline):
model = ApplicationURL
class ApplicationImageInline(admin.TabularInline):
mo... | from django.contrib import admin
from us_ignite.apps.models import (Application, ApplicationURL,
ApplicationImage, Domain, Feature,
Page, PageApplication)
class ApplicationURLInline(admin.TabularInline):
model = ApplicationURL
class Applicat... | from django.contrib import admin
from us_ignite.apps.models import (Application, ApplicationURL,
ApplicationImage, Domain, Feature)
class ApplicationURLInline(admin.TabularInline):
model = ApplicationURL
class ApplicationImageInline(admin.TabularInline):
model = Applicati... | <commit_before>from django.contrib import admin
from us_ignite.apps.models import (Application, ApplicationURL,
ApplicationImage, Domain, Feature)
class ApplicationURLInline(admin.TabularInline):
model = ApplicationURL
class ApplicationImageInline(admin.TabularInline):
mo... |
a9bb32b91e2b742705b6292bd52fc869a8130766 | dymport/import_file.py | dymport/import_file.py | """
Various functions to dynamically import (abitrary names from) arbitrary files.
To import a file like it is a module, use `import_file`.
"""
from importlib.util import module_from_spec, spec_from_file_location
def import_file(name, file):
"""
Import `file` as a module with _name_.
Raises an ImportEr... | """
Various functions to dynamically import (abitrary names from) arbitrary files.
To import a file like it is a module, use `import_file`.
"""
from sys import version_info
def import_file(name, file):
"""
Import `file` as a module with _name_.
Raises an ImportError if it could not be imported.
"""... | Add check for supported Python versions | Add check for supported Python versions
Not all Python versions are supported by this package, because the import
mechanism changes in the different Python versions.
If an unsupported Python version is used, an ImportError is raised.
| Python | mit | ErwinJanssen/dymport.py | """
Various functions to dynamically import (abitrary names from) arbitrary files.
To import a file like it is a module, use `import_file`.
"""
from importlib.util import module_from_spec, spec_from_file_location
def import_file(name, file):
"""
Import `file` as a module with _name_.
Raises an ImportEr... | """
Various functions to dynamically import (abitrary names from) arbitrary files.
To import a file like it is a module, use `import_file`.
"""
from sys import version_info
def import_file(name, file):
"""
Import `file` as a module with _name_.
Raises an ImportError if it could not be imported.
"""... | <commit_before>"""
Various functions to dynamically import (abitrary names from) arbitrary files.
To import a file like it is a module, use `import_file`.
"""
from importlib.util import module_from_spec, spec_from_file_location
def import_file(name, file):
"""
Import `file` as a module with _name_.
Rai... | """
Various functions to dynamically import (abitrary names from) arbitrary files.
To import a file like it is a module, use `import_file`.
"""
from sys import version_info
def import_file(name, file):
"""
Import `file` as a module with _name_.
Raises an ImportError if it could not be imported.
"""... | """
Various functions to dynamically import (abitrary names from) arbitrary files.
To import a file like it is a module, use `import_file`.
"""
from importlib.util import module_from_spec, spec_from_file_location
def import_file(name, file):
"""
Import `file` as a module with _name_.
Raises an ImportEr... | <commit_before>"""
Various functions to dynamically import (abitrary names from) arbitrary files.
To import a file like it is a module, use `import_file`.
"""
from importlib.util import module_from_spec, spec_from_file_location
def import_file(name, file):
"""
Import `file` as a module with _name_.
Rai... |
bf5532f405df8869b4869c2d839e6093ebf963bc | wisp/utils.py | wisp/utils.py | import importlib
import importlib.machinery
import sys
from module import Module
import json
def message_to_function(raw_message):
"""
converting json formatted string to a executable module.
Args:
raw_message (str): json formatted.
Returns:
None if raw_message is in wrong format, ... | import importlib
import importlib.machinery
import sys
from module import Module
import json
def message_to_function(raw_message):
"""
converting json formatted string to a executable module.
Args:
raw_message (str): json formatted.
Returns:
None if raw_message is in wrong format, ... | Fix errors cause by key error in sys.modules and wrong type error by uFid. | Fix errors cause by key error in sys.modules and wrong type error by uFid.
| Python | apache-2.0 | hoonkim/rune,hoonkim/rune,hoonkim/rune | import importlib
import importlib.machinery
import sys
from module import Module
import json
def message_to_function(raw_message):
"""
converting json formatted string to a executable module.
Args:
raw_message (str): json formatted.
Returns:
None if raw_message is in wrong format, ... | import importlib
import importlib.machinery
import sys
from module import Module
import json
def message_to_function(raw_message):
"""
converting json formatted string to a executable module.
Args:
raw_message (str): json formatted.
Returns:
None if raw_message is in wrong format, ... | <commit_before>import importlib
import importlib.machinery
import sys
from module import Module
import json
def message_to_function(raw_message):
"""
converting json formatted string to a executable module.
Args:
raw_message (str): json formatted.
Returns:
None if raw_message is in... | import importlib
import importlib.machinery
import sys
from module import Module
import json
def message_to_function(raw_message):
"""
converting json formatted string to a executable module.
Args:
raw_message (str): json formatted.
Returns:
None if raw_message is in wrong format, ... | import importlib
import importlib.machinery
import sys
from module import Module
import json
def message_to_function(raw_message):
"""
converting json formatted string to a executable module.
Args:
raw_message (str): json formatted.
Returns:
None if raw_message is in wrong format, ... | <commit_before>import importlib
import importlib.machinery
import sys
from module import Module
import json
def message_to_function(raw_message):
"""
converting json formatted string to a executable module.
Args:
raw_message (str): json formatted.
Returns:
None if raw_message is in... |
4a5e798fe23d720315a7cab60824b70ce0983f8e | Kane1985/Chapter2/Ex4.1.py | Kane1985/Chapter2/Ex4.1.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""Exercise 4.1 from Kane 1985"""
from sympy.physics.mechanics import dot, dynamicsymbols, MechanicsStrPrinter
from sympy.physics.mechanics import ReferenceFrame, Point
from sympy import solve, symbols, pi
from sympy.simplify.simplify import trigsimp
def msprint(expr):
... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""Exercise 4.1 from Kane 1985"""
from sympy.physics.mechanics import dot, dynamicsymbols, MechanicsStrPrinter
from sympy.physics.mechanics import ReferenceFrame, Point
from sympy import solve, symbols, pi, sin, cos
from sympy.simplify.simplify import trigsimp
def msprint... | Simplify formulation and change from print() to assert() | Simplify formulation and change from print() to assert()
| Python | bsd-3-clause | jcrist/pydy,Shekharrajak/pydy,oliverlee/pydy,jcrist/pydy,jcrist/pydy,oliverlee/pydy,jcrist/pydy,Shekharrajak/pydy,oliverlee/pydy,jcrist/pydy,Shekharrajak/pydy,jcrist/pydy,skidzo/pydy,Shekharrajak/pydy,skidzo/pydy,skidzo/pydy,jcrist/pydy,skidzo/pydy | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""Exercise 4.1 from Kane 1985"""
from sympy.physics.mechanics import dot, dynamicsymbols, MechanicsStrPrinter
from sympy.physics.mechanics import ReferenceFrame, Point
from sympy import solve, symbols, pi
from sympy.simplify.simplify import trigsimp
def msprint(expr):
... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""Exercise 4.1 from Kane 1985"""
from sympy.physics.mechanics import dot, dynamicsymbols, MechanicsStrPrinter
from sympy.physics.mechanics import ReferenceFrame, Point
from sympy import solve, symbols, pi, sin, cos
from sympy.simplify.simplify import trigsimp
def msprint... | <commit_before>#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""Exercise 4.1 from Kane 1985"""
from sympy.physics.mechanics import dot, dynamicsymbols, MechanicsStrPrinter
from sympy.physics.mechanics import ReferenceFrame, Point
from sympy import solve, symbols, pi
from sympy.simplify.simplify import trigsimp
def ms... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""Exercise 4.1 from Kane 1985"""
from sympy.physics.mechanics import dot, dynamicsymbols, MechanicsStrPrinter
from sympy.physics.mechanics import ReferenceFrame, Point
from sympy import solve, symbols, pi, sin, cos
from sympy.simplify.simplify import trigsimp
def msprint... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""Exercise 4.1 from Kane 1985"""
from sympy.physics.mechanics import dot, dynamicsymbols, MechanicsStrPrinter
from sympy.physics.mechanics import ReferenceFrame, Point
from sympy import solve, symbols, pi
from sympy.simplify.simplify import trigsimp
def msprint(expr):
... | <commit_before>#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""Exercise 4.1 from Kane 1985"""
from sympy.physics.mechanics import dot, dynamicsymbols, MechanicsStrPrinter
from sympy.physics.mechanics import ReferenceFrame, Point
from sympy import solve, symbols, pi
from sympy.simplify.simplify import trigsimp
def ms... |
82954c638aa013a037125e0c9f167045f38da504 | genes/docker/main.py | genes/docker/main.py | from genes.apt import commands as apt
from genes.brew import commands as brew
from genes import debian
from genes.debian.traits import is_debian
from genes.ubuntu.traits import is_ubuntu
from genes.mac.traits import is_osx
def main():
if is_debian() or is_ubuntu():
repo = debian.traits.distribution.lower(... | from genes.apt import commands as apt
from genes.brew import commands as brew
from genes.debian.traits import is_debian, get_distro, get_codename
from genes.ubuntu.traits import is_ubuntu
from genes.mac.traits import is_osx
def main():
if is_debian() or is_ubuntu():
repo = get_distro().lower() + '-' + \
... | Migrate docker to new debian semantics | Migrate docker to new debian semantics
| Python | mit | hatchery/genepool,hatchery/Genepool2 | from genes.apt import commands as apt
from genes.brew import commands as brew
from genes import debian
from genes.debian.traits import is_debian
from genes.ubuntu.traits import is_ubuntu
from genes.mac.traits import is_osx
def main():
if is_debian() or is_ubuntu():
repo = debian.traits.distribution.lower(... | from genes.apt import commands as apt
from genes.brew import commands as brew
from genes.debian.traits import is_debian, get_distro, get_codename
from genes.ubuntu.traits import is_ubuntu
from genes.mac.traits import is_osx
def main():
if is_debian() or is_ubuntu():
repo = get_distro().lower() + '-' + \
... | <commit_before>from genes.apt import commands as apt
from genes.brew import commands as brew
from genes import debian
from genes.debian.traits import is_debian
from genes.ubuntu.traits import is_ubuntu
from genes.mac.traits import is_osx
def main():
if is_debian() or is_ubuntu():
repo = debian.traits.dist... | from genes.apt import commands as apt
from genes.brew import commands as brew
from genes.debian.traits import is_debian, get_distro, get_codename
from genes.ubuntu.traits import is_ubuntu
from genes.mac.traits import is_osx
def main():
if is_debian() or is_ubuntu():
repo = get_distro().lower() + '-' + \
... | from genes.apt import commands as apt
from genes.brew import commands as brew
from genes import debian
from genes.debian.traits import is_debian
from genes.ubuntu.traits import is_ubuntu
from genes.mac.traits import is_osx
def main():
if is_debian() or is_ubuntu():
repo = debian.traits.distribution.lower(... | <commit_before>from genes.apt import commands as apt
from genes.brew import commands as brew
from genes import debian
from genes.debian.traits import is_debian
from genes.ubuntu.traits import is_ubuntu
from genes.mac.traits import is_osx
def main():
if is_debian() or is_ubuntu():
repo = debian.traits.dist... |
4130c082ae3008365c854ad65c4510cb04dfbf27 | webcrawler.py | webcrawler.py | import requests
from bs4 import BeautifulSoup
def parse_html(html, **kwargs):
parsed_html = BeautifulSoup(html, 'lxml')
headline = parsed_html.body.find('h1')
paragraph = None
# Parse Paragraph
content_container = parsed_html.body.find(
'div',
attrs={'id': 'bodyContent'}
)
... | import re
import requests
from bs4 import BeautifulSoup
def parse_html(html, **kwargs):
is_wikipedia_page = kwargs.get('is_wikipedia_page')
parsed_html = BeautifulSoup(html, 'html.parser')
headline = parsed_html.body.find('h1')
paragraph = None
if is_wikipedia_page:
# Parse Paragraph
... | Add support for generic pages | Add support for generic pages
| Python | mit | alamasfu10/webcrawler | import requests
from bs4 import BeautifulSoup
def parse_html(html, **kwargs):
parsed_html = BeautifulSoup(html, 'lxml')
headline = parsed_html.body.find('h1')
paragraph = None
# Parse Paragraph
content_container = parsed_html.body.find(
'div',
attrs={'id': 'bodyContent'}
)
... | import re
import requests
from bs4 import BeautifulSoup
def parse_html(html, **kwargs):
is_wikipedia_page = kwargs.get('is_wikipedia_page')
parsed_html = BeautifulSoup(html, 'html.parser')
headline = parsed_html.body.find('h1')
paragraph = None
if is_wikipedia_page:
# Parse Paragraph
... | <commit_before>import requests
from bs4 import BeautifulSoup
def parse_html(html, **kwargs):
parsed_html = BeautifulSoup(html, 'lxml')
headline = parsed_html.body.find('h1')
paragraph = None
# Parse Paragraph
content_container = parsed_html.body.find(
'div',
attrs={'id': 'bodyCo... | import re
import requests
from bs4 import BeautifulSoup
def parse_html(html, **kwargs):
is_wikipedia_page = kwargs.get('is_wikipedia_page')
parsed_html = BeautifulSoup(html, 'html.parser')
headline = parsed_html.body.find('h1')
paragraph = None
if is_wikipedia_page:
# Parse Paragraph
... | import requests
from bs4 import BeautifulSoup
def parse_html(html, **kwargs):
parsed_html = BeautifulSoup(html, 'lxml')
headline = parsed_html.body.find('h1')
paragraph = None
# Parse Paragraph
content_container = parsed_html.body.find(
'div',
attrs={'id': 'bodyContent'}
)
... | <commit_before>import requests
from bs4 import BeautifulSoup
def parse_html(html, **kwargs):
parsed_html = BeautifulSoup(html, 'lxml')
headline = parsed_html.body.find('h1')
paragraph = None
# Parse Paragraph
content_container = parsed_html.body.find(
'div',
attrs={'id': 'bodyCo... |
d4e3609cf6f749d6ac95bc8332844f63b61b41b1 | oslo/__init__.py | oslo/__init__.py | # vim: tabstop=4 shiftwidth=4 softtabstop=4
# 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... | # Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# d... | Remove extraneous vim editor configuration comments | Remove extraneous vim editor configuration comments
Change-Id: I173c838765efd527b3bc652d9b8c32ac89c756b6
Partial-Bug: #1229324
| Python | apache-2.0 | varunarya10/oslo.serialization,openstack/oslo.serialization | # vim: tabstop=4 shiftwidth=4 softtabstop=4
# 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... | # Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# d... | <commit_before># vim: tabstop=4 shiftwidth=4 softtabstop=4
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless require... | # Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# d... | # vim: tabstop=4 shiftwidth=4 softtabstop=4
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable... | <commit_before># vim: tabstop=4 shiftwidth=4 softtabstop=4
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless require... |
d961c644f74d83150e3f5a3ea9599af0d2b839ae | hash_table.py | hash_table.py | #!/usr/bin/env python
'''Implementation of a simple hash table.
The table has `hash`, `get` and `set` methods.
The hash function uses a very basic hash algorithm to insert the value
into the table.
'''
class HashItem(object):
def __init__(self):
pass
class Hash(object):
def __init__(self):
... | #!/usr/bin/env python
'''Implementation of a simple hash table.
The table has `hash`, `get` and `set` methods.
The hash function uses a very basic hash algorithm to insert the value
into the table.
'''
class HashItem(object):
def __init__(self):
pass
class Hash(object):
def __init__(self, size=1024... | Build out init function of hash table class | Build out init function of hash table class
| Python | mit | jwarren116/data-structures-deux | #!/usr/bin/env python
'''Implementation of a simple hash table.
The table has `hash`, `get` and `set` methods.
The hash function uses a very basic hash algorithm to insert the value
into the table.
'''
class HashItem(object):
def __init__(self):
pass
class Hash(object):
def __init__(self):
... | #!/usr/bin/env python
'''Implementation of a simple hash table.
The table has `hash`, `get` and `set` methods.
The hash function uses a very basic hash algorithm to insert the value
into the table.
'''
class HashItem(object):
def __init__(self):
pass
class Hash(object):
def __init__(self, size=1024... | <commit_before>#!/usr/bin/env python
'''Implementation of a simple hash table.
The table has `hash`, `get` and `set` methods.
The hash function uses a very basic hash algorithm to insert the value
into the table.
'''
class HashItem(object):
def __init__(self):
pass
class Hash(object):
def __init__... | #!/usr/bin/env python
'''Implementation of a simple hash table.
The table has `hash`, `get` and `set` methods.
The hash function uses a very basic hash algorithm to insert the value
into the table.
'''
class HashItem(object):
def __init__(self):
pass
class Hash(object):
def __init__(self, size=1024... | #!/usr/bin/env python
'''Implementation of a simple hash table.
The table has `hash`, `get` and `set` methods.
The hash function uses a very basic hash algorithm to insert the value
into the table.
'''
class HashItem(object):
def __init__(self):
pass
class Hash(object):
def __init__(self):
... | <commit_before>#!/usr/bin/env python
'''Implementation of a simple hash table.
The table has `hash`, `get` and `set` methods.
The hash function uses a very basic hash algorithm to insert the value
into the table.
'''
class HashItem(object):
def __init__(self):
pass
class Hash(object):
def __init__... |
0b41bdf6897bb070fc3d90aa5d90228e744dee60 | sunpy/util/map_manager.py | sunpy/util/map_manager.py | import weakref
import sunpy
class MapManager(weakref.WeakSet):
"""Weak referenced set of maps created using functions decorated by manage_maps."""
def __repr__(self):
return str(self.data)
def manage_maps(fn):
"""Maps returned by functions decorated with manage_maps (eg. sunpy.make_map)
will ... | import weakref
import sunpy
class MapManager(weakref.WeakSet):
"""Weak referenced set of maps created using functions decorated by manage_maps."""
pass
def manage_maps(fn):
"""Maps returned by functions decorated with manage_maps (eg. sunpy.make_map)
will be registered in the sunpy.map_manager list.""... | Remove manager repr (user should not need to view contents) | Remove manager repr (user should not need to view contents)
| Python | bsd-2-clause | mjm159/sunpy,dpshelio/sunpy,dpshelio/sunpy,Alex-Ian-Hamilton/sunpy,dpshelio/sunpy,Alex-Ian-Hamilton/sunpy,Alex-Ian-Hamilton/sunpy,mjm159/sunpy | import weakref
import sunpy
class MapManager(weakref.WeakSet):
"""Weak referenced set of maps created using functions decorated by manage_maps."""
def __repr__(self):
return str(self.data)
def manage_maps(fn):
"""Maps returned by functions decorated with manage_maps (eg. sunpy.make_map)
will ... | import weakref
import sunpy
class MapManager(weakref.WeakSet):
"""Weak referenced set of maps created using functions decorated by manage_maps."""
pass
def manage_maps(fn):
"""Maps returned by functions decorated with manage_maps (eg. sunpy.make_map)
will be registered in the sunpy.map_manager list.""... | <commit_before>import weakref
import sunpy
class MapManager(weakref.WeakSet):
"""Weak referenced set of maps created using functions decorated by manage_maps."""
def __repr__(self):
return str(self.data)
def manage_maps(fn):
"""Maps returned by functions decorated with manage_maps (eg. sunpy.make... | import weakref
import sunpy
class MapManager(weakref.WeakSet):
"""Weak referenced set of maps created using functions decorated by manage_maps."""
pass
def manage_maps(fn):
"""Maps returned by functions decorated with manage_maps (eg. sunpy.make_map)
will be registered in the sunpy.map_manager list.""... | import weakref
import sunpy
class MapManager(weakref.WeakSet):
"""Weak referenced set of maps created using functions decorated by manage_maps."""
def __repr__(self):
return str(self.data)
def manage_maps(fn):
"""Maps returned by functions decorated with manage_maps (eg. sunpy.make_map)
will ... | <commit_before>import weakref
import sunpy
class MapManager(weakref.WeakSet):
"""Weak referenced set of maps created using functions decorated by manage_maps."""
def __repr__(self):
return str(self.data)
def manage_maps(fn):
"""Maps returned by functions decorated with manage_maps (eg. sunpy.make... |
c4dd6502bc7b9d5970a659c57e6aa2d25cc00fe5 | catwatch/lib/util_datetime.py | catwatch/lib/util_datetime.py | import datetime
def timedelta_months(months, compare_date=None):
"""
Return a JSON response.
:param months: Amount of months to offset
:type months: int
:param compare_date: Date to compare at
:type compare_date: date
:return: Flask response
"""
if compare_date is None:
co... | import datetime
def timedelta_months(months, compare_date=None):
"""
Return a new datetime with a month offset applied.
:param months: Amount of months to offset
:type months: int
:param compare_date: Date to compare at
:type compare_date: date
:return: datetime
"""
if compare_dat... | Update timedelta_months docstring to be accurate | Update timedelta_months docstring to be accurate
| Python | mit | z123/build-a-saas-app-with-flask,nickjj/build-a-saas-app-with-flask,z123/build-a-saas-app-with-flask,nickjj/build-a-saas-app-with-flask,nickjj/build-a-saas-app-with-flask,z123/build-a-saas-app-with-flask,nickjj/build-a-saas-app-with-flask | import datetime
def timedelta_months(months, compare_date=None):
"""
Return a JSON response.
:param months: Amount of months to offset
:type months: int
:param compare_date: Date to compare at
:type compare_date: date
:return: Flask response
"""
if compare_date is None:
co... | import datetime
def timedelta_months(months, compare_date=None):
"""
Return a new datetime with a month offset applied.
:param months: Amount of months to offset
:type months: int
:param compare_date: Date to compare at
:type compare_date: date
:return: datetime
"""
if compare_dat... | <commit_before>import datetime
def timedelta_months(months, compare_date=None):
"""
Return a JSON response.
:param months: Amount of months to offset
:type months: int
:param compare_date: Date to compare at
:type compare_date: date
:return: Flask response
"""
if compare_date is N... | import datetime
def timedelta_months(months, compare_date=None):
"""
Return a new datetime with a month offset applied.
:param months: Amount of months to offset
:type months: int
:param compare_date: Date to compare at
:type compare_date: date
:return: datetime
"""
if compare_dat... | import datetime
def timedelta_months(months, compare_date=None):
"""
Return a JSON response.
:param months: Amount of months to offset
:type months: int
:param compare_date: Date to compare at
:type compare_date: date
:return: Flask response
"""
if compare_date is None:
co... | <commit_before>import datetime
def timedelta_months(months, compare_date=None):
"""
Return a JSON response.
:param months: Amount of months to offset
:type months: int
:param compare_date: Date to compare at
:type compare_date: date
:return: Flask response
"""
if compare_date is N... |
4a528978e9a783b9fb4f25d31a32a2ca524d7ce1 | infosystem/subsystem/domain/resource.py | infosystem/subsystem/domain/resource.py | from infosystem.database import db
from infosystem.common.subsystem import entity
class Domain(entity.Entity, db.Model):
attributes = ['name', 'parent_id']
attributes += entity.Entity.attributes
name = db.Column(db.String(60), nullable=False, unique=True)
parent_id = db.Column(
db.CHAR(32), ... | from infosystem.database import db
from infosystem.common.subsystem import entity
class Domain(entity.Entity, db.Model):
attributes = ['name', 'parent_id']
attributes += entity.Entity.attributes
name = db.Column(db.String(60), nullable=False, unique=True)
parent_id = db.Column(
db.CHAR(32), ... | Change attributes order on constructor | Change attributes order on constructor
| Python | apache-2.0 | samueldmq/infosystem | from infosystem.database import db
from infosystem.common.subsystem import entity
class Domain(entity.Entity, db.Model):
attributes = ['name', 'parent_id']
attributes += entity.Entity.attributes
name = db.Column(db.String(60), nullable=False, unique=True)
parent_id = db.Column(
db.CHAR(32), ... | from infosystem.database import db
from infosystem.common.subsystem import entity
class Domain(entity.Entity, db.Model):
attributes = ['name', 'parent_id']
attributes += entity.Entity.attributes
name = db.Column(db.String(60), nullable=False, unique=True)
parent_id = db.Column(
db.CHAR(32), ... | <commit_before>from infosystem.database import db
from infosystem.common.subsystem import entity
class Domain(entity.Entity, db.Model):
attributes = ['name', 'parent_id']
attributes += entity.Entity.attributes
name = db.Column(db.String(60), nullable=False, unique=True)
parent_id = db.Column(
... | from infosystem.database import db
from infosystem.common.subsystem import entity
class Domain(entity.Entity, db.Model):
attributes = ['name', 'parent_id']
attributes += entity.Entity.attributes
name = db.Column(db.String(60), nullable=False, unique=True)
parent_id = db.Column(
db.CHAR(32), ... | from infosystem.database import db
from infosystem.common.subsystem import entity
class Domain(entity.Entity, db.Model):
attributes = ['name', 'parent_id']
attributes += entity.Entity.attributes
name = db.Column(db.String(60), nullable=False, unique=True)
parent_id = db.Column(
db.CHAR(32), ... | <commit_before>from infosystem.database import db
from infosystem.common.subsystem import entity
class Domain(entity.Entity, db.Model):
attributes = ['name', 'parent_id']
attributes += entity.Entity.attributes
name = db.Column(db.String(60), nullable=False, unique=True)
parent_id = db.Column(
... |
cffa73ae51f63ec5e107d9df98b1eb5b44fa64b8 | backend/catalogue/serializers.py | backend/catalogue/serializers.py | from rest_framework import serializers
from .models import Release, Track, Comment
class CommentSerializer(serializers.ModelSerializer):
class Meta:
model = Comment
fields = ('id', 'comment')
class TrackSerializer(serializers.ModelSerializer):
cdid = serializers.StringRelatedField(
re... | from rest_framework import serializers
from .models import Release, Track, Comment
class CommentSerializer(serializers.ModelSerializer):
class Meta:
model = Comment
fields = ('id', 'comment')
class TrackSerializer(serializers.ModelSerializer):
cdid = serializers.StringRelatedField(
re... | Add country field to release serializer. | Add country field to release serializer.
| Python | mit | ThreeDRadio/playlists,ThreeDRadio/playlists,ThreeDRadio/playlists | from rest_framework import serializers
from .models import Release, Track, Comment
class CommentSerializer(serializers.ModelSerializer):
class Meta:
model = Comment
fields = ('id', 'comment')
class TrackSerializer(serializers.ModelSerializer):
cdid = serializers.StringRelatedField(
re... | from rest_framework import serializers
from .models import Release, Track, Comment
class CommentSerializer(serializers.ModelSerializer):
class Meta:
model = Comment
fields = ('id', 'comment')
class TrackSerializer(serializers.ModelSerializer):
cdid = serializers.StringRelatedField(
re... | <commit_before>from rest_framework import serializers
from .models import Release, Track, Comment
class CommentSerializer(serializers.ModelSerializer):
class Meta:
model = Comment
fields = ('id', 'comment')
class TrackSerializer(serializers.ModelSerializer):
cdid = serializers.StringRelatedFi... | from rest_framework import serializers
from .models import Release, Track, Comment
class CommentSerializer(serializers.ModelSerializer):
class Meta:
model = Comment
fields = ('id', 'comment')
class TrackSerializer(serializers.ModelSerializer):
cdid = serializers.StringRelatedField(
re... | from rest_framework import serializers
from .models import Release, Track, Comment
class CommentSerializer(serializers.ModelSerializer):
class Meta:
model = Comment
fields = ('id', 'comment')
class TrackSerializer(serializers.ModelSerializer):
cdid = serializers.StringRelatedField(
re... | <commit_before>from rest_framework import serializers
from .models import Release, Track, Comment
class CommentSerializer(serializers.ModelSerializer):
class Meta:
model = Comment
fields = ('id', 'comment')
class TrackSerializer(serializers.ModelSerializer):
cdid = serializers.StringRelatedFi... |
3ee00fad1965dae23f83da870d7df1cb37727c7a | structlog/migrations/0001_initial.py | structlog/migrations/0001_initial.py | # -*- coding: utf-8 -*-
# Generated by Django 1.9.5 on 2016-04-10 14:33
from __future__ import unicode_literals
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
]
operations = [
]
| # -*- coding: utf-8 -*-
# Generated by Django 1.9.5 on 2016-04-10 14:33
from __future__ import unicode_literals
from django.db import migrations
from django.contrib.postgres.operations import HStoreExtension
class Migration(migrations.Migration):
dependencies = [
]
operations = [
HStoreExten... | Add HStore extension to initial migration. | Add HStore extension to initial migration.
| Python | bsd-2-clause | carlohamalainen/django-struct-log | # -*- coding: utf-8 -*-
# Generated by Django 1.9.5 on 2016-04-10 14:33
from __future__ import unicode_literals
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
]
operations = [
]
Add HStore extension to initial migration. | # -*- coding: utf-8 -*-
# Generated by Django 1.9.5 on 2016-04-10 14:33
from __future__ import unicode_literals
from django.db import migrations
from django.contrib.postgres.operations import HStoreExtension
class Migration(migrations.Migration):
dependencies = [
]
operations = [
HStoreExten... | <commit_before># -*- coding: utf-8 -*-
# Generated by Django 1.9.5 on 2016-04-10 14:33
from __future__ import unicode_literals
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
]
operations = [
]
<commit_msg>Add HStore extension to initial migration.<commit_af... | # -*- coding: utf-8 -*-
# Generated by Django 1.9.5 on 2016-04-10 14:33
from __future__ import unicode_literals
from django.db import migrations
from django.contrib.postgres.operations import HStoreExtension
class Migration(migrations.Migration):
dependencies = [
]
operations = [
HStoreExten... | # -*- coding: utf-8 -*-
# Generated by Django 1.9.5 on 2016-04-10 14:33
from __future__ import unicode_literals
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
]
operations = [
]
Add HStore extension to initial migration.# -*- coding: utf-8 -*-
# Generated b... | <commit_before># -*- coding: utf-8 -*-
# Generated by Django 1.9.5 on 2016-04-10 14:33
from __future__ import unicode_literals
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
]
operations = [
]
<commit_msg>Add HStore extension to initial migration.<commit_af... |
8ecf9d95cf7f085b0245b07422ccda007937a5c6 | visu3d/array_dataclass.py | visu3d/array_dataclass.py | # Copyright 2022 The visu3d Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in w... | # Copyright 2022 The visu3d Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in w... | Add `@dca.dataclass_array` decorator to customize dca params. Change default values | Add `@dca.dataclass_array` decorator to customize dca params. Change default values
PiperOrigin-RevId: 475563717
| Python | apache-2.0 | google-research/visu3d | # Copyright 2022 The visu3d Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in w... | # Copyright 2022 The visu3d Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in w... | <commit_before># Copyright 2022 The visu3d Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or... | # Copyright 2022 The visu3d Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in w... | # Copyright 2022 The visu3d Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in w... | <commit_before># Copyright 2022 The visu3d Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or... |
fb10e4b8ae37f1442bdb643c27ea0b984da6a374 | cherrypy/test/test_httputil.py | cherrypy/test/test_httputil.py | """Tests for cherrypy/lib/httputil.py."""
import unittest
from cherrypy.lib import httputil
class UtilityTests(unittest.TestCase):
def test_urljoin(self):
# Test all slash+atom combinations for SCRIPT_NAME and PATH_INFO
self.assertEqual(httputil.urljoin('/sn/', '/pi/'), '/sn/pi/')
self.a... | """Tests for ``cherrypy.lib.httputil``."""
import pytest
from cherrypy.lib import httputil
class TestUtility(object):
@pytest.mark.parametrize(
'script_name,path_info,expected_url',
[
('/sn/', '/pi/', '/sn/pi/'),
('/sn/', '/pi', '/sn/pi'),
('/sn/', '/', '/sn/')... | Rewrite httputil test module via pytest | Rewrite httputil test module via pytest
| Python | bsd-3-clause | cherrypy/cherrypy,Safihre/cherrypy,Safihre/cherrypy,cherrypy/cherrypy | """Tests for cherrypy/lib/httputil.py."""
import unittest
from cherrypy.lib import httputil
class UtilityTests(unittest.TestCase):
def test_urljoin(self):
# Test all slash+atom combinations for SCRIPT_NAME and PATH_INFO
self.assertEqual(httputil.urljoin('/sn/', '/pi/'), '/sn/pi/')
self.a... | """Tests for ``cherrypy.lib.httputil``."""
import pytest
from cherrypy.lib import httputil
class TestUtility(object):
@pytest.mark.parametrize(
'script_name,path_info,expected_url',
[
('/sn/', '/pi/', '/sn/pi/'),
('/sn/', '/pi', '/sn/pi'),
('/sn/', '/', '/sn/')... | <commit_before>"""Tests for cherrypy/lib/httputil.py."""
import unittest
from cherrypy.lib import httputil
class UtilityTests(unittest.TestCase):
def test_urljoin(self):
# Test all slash+atom combinations for SCRIPT_NAME and PATH_INFO
self.assertEqual(httputil.urljoin('/sn/', '/pi/'), '/sn/pi/')... | """Tests for ``cherrypy.lib.httputil``."""
import pytest
from cherrypy.lib import httputil
class TestUtility(object):
@pytest.mark.parametrize(
'script_name,path_info,expected_url',
[
('/sn/', '/pi/', '/sn/pi/'),
('/sn/', '/pi', '/sn/pi'),
('/sn/', '/', '/sn/')... | """Tests for cherrypy/lib/httputil.py."""
import unittest
from cherrypy.lib import httputil
class UtilityTests(unittest.TestCase):
def test_urljoin(self):
# Test all slash+atom combinations for SCRIPT_NAME and PATH_INFO
self.assertEqual(httputil.urljoin('/sn/', '/pi/'), '/sn/pi/')
self.a... | <commit_before>"""Tests for cherrypy/lib/httputil.py."""
import unittest
from cherrypy.lib import httputil
class UtilityTests(unittest.TestCase):
def test_urljoin(self):
# Test all slash+atom combinations for SCRIPT_NAME and PATH_INFO
self.assertEqual(httputil.urljoin('/sn/', '/pi/'), '/sn/pi/')... |
638d7f38a0e22f72680437372b873d69ead973b1 | config/run_distutils/__init__.py | config/run_distutils/__init__.py | from SCons.Script import *
def generate(env):
env.SetDefault(RUN_DISTUTILS = 'python')
env.SetDefault(RUN_DISTUTILSOPTS = 'build')
env['RUN_DISTUTILS'] = 'python'
env['RUN_DISTUTILSOPTS'] = 'build'
bld = Builder(action = '$RUN_DISTUTILS $SOURCE $RUN_DISTUTILSOPTS')
env.Append(BUILDERS = {'Ru... | from SCons.Script import *
import os
def generate(env):
env.SetDefault(RUN_DISTUTILS = 'python')
env.SetDefault(RUN_DISTUTILSOPTS = 'build')
if 'RUN_DISTUTILS' in os.environ:
env['RUN_DISTUTILS'] = os.environ['RUN_DISTUTILS']
if 'RUN_DISTUTILSOPTS' in os.environ:
env['RUN_DISTUTILSOPT... | Allow env vars for RUN_DISTUTILS | Allow env vars for RUN_DISTUTILS
Allow use of env vars RUN_DISTUTILS, RUN_DISTUTILOPTS as defaults.
With this, on macos, macports doesn't need to be in PATH to build FAHControl. One just needs
export RUN_DISTUTILS="/opt/local/bin/python"
or the equivalent in dockbot.json env.
| Python | lgpl-2.1 | CauldronDevelopmentLLC/cbang,CauldronDevelopmentLLC/cbang,CauldronDevelopmentLLC/cbang,CauldronDevelopmentLLC/cbang | from SCons.Script import *
def generate(env):
env.SetDefault(RUN_DISTUTILS = 'python')
env.SetDefault(RUN_DISTUTILSOPTS = 'build')
env['RUN_DISTUTILS'] = 'python'
env['RUN_DISTUTILSOPTS'] = 'build'
bld = Builder(action = '$RUN_DISTUTILS $SOURCE $RUN_DISTUTILSOPTS')
env.Append(BUILDERS = {'Ru... | from SCons.Script import *
import os
def generate(env):
env.SetDefault(RUN_DISTUTILS = 'python')
env.SetDefault(RUN_DISTUTILSOPTS = 'build')
if 'RUN_DISTUTILS' in os.environ:
env['RUN_DISTUTILS'] = os.environ['RUN_DISTUTILS']
if 'RUN_DISTUTILSOPTS' in os.environ:
env['RUN_DISTUTILSOPT... | <commit_before>from SCons.Script import *
def generate(env):
env.SetDefault(RUN_DISTUTILS = 'python')
env.SetDefault(RUN_DISTUTILSOPTS = 'build')
env['RUN_DISTUTILS'] = 'python'
env['RUN_DISTUTILSOPTS'] = 'build'
bld = Builder(action = '$RUN_DISTUTILS $SOURCE $RUN_DISTUTILSOPTS')
env.Append(... | from SCons.Script import *
import os
def generate(env):
env.SetDefault(RUN_DISTUTILS = 'python')
env.SetDefault(RUN_DISTUTILSOPTS = 'build')
if 'RUN_DISTUTILS' in os.environ:
env['RUN_DISTUTILS'] = os.environ['RUN_DISTUTILS']
if 'RUN_DISTUTILSOPTS' in os.environ:
env['RUN_DISTUTILSOPT... | from SCons.Script import *
def generate(env):
env.SetDefault(RUN_DISTUTILS = 'python')
env.SetDefault(RUN_DISTUTILSOPTS = 'build')
env['RUN_DISTUTILS'] = 'python'
env['RUN_DISTUTILSOPTS'] = 'build'
bld = Builder(action = '$RUN_DISTUTILS $SOURCE $RUN_DISTUTILSOPTS')
env.Append(BUILDERS = {'Ru... | <commit_before>from SCons.Script import *
def generate(env):
env.SetDefault(RUN_DISTUTILS = 'python')
env.SetDefault(RUN_DISTUTILSOPTS = 'build')
env['RUN_DISTUTILS'] = 'python'
env['RUN_DISTUTILSOPTS'] = 'build'
bld = Builder(action = '$RUN_DISTUTILS $SOURCE $RUN_DISTUTILSOPTS')
env.Append(... |
4da79cbec5880da6fb16b5a474786247a820d09c | nowplaying.py | nowplaying.py | #!/usr/bin/env python
from termcolor import colored
from appscript import *
from track import Track
def main():
print(get_song())
def get_song():
itunes_open = bool(app('System Events').processes[its.name == 'iTunes'].count())
if itunes_open: # check if application open
itunes = app('iTunes')
... | #!/usr/bin/env python
from termcolor import colored
from appscript import *
from track import Track
def main():
print(get_song())
def get_song():
itunes_open = bool(app('System Events').processes[its.name == 'iTunes'].count())
if itunes_open: # check if application open
itunes = app('iTunes')
... | Return error instead of if/else | Return error instead of if/else
| Python | mit | kshvmdn/nowplaying | #!/usr/bin/env python
from termcolor import colored
from appscript import *
from track import Track
def main():
print(get_song())
def get_song():
itunes_open = bool(app('System Events').processes[its.name == 'iTunes'].count())
if itunes_open: # check if application open
itunes = app('iTunes')
... | #!/usr/bin/env python
from termcolor import colored
from appscript import *
from track import Track
def main():
print(get_song())
def get_song():
itunes_open = bool(app('System Events').processes[its.name == 'iTunes'].count())
if itunes_open: # check if application open
itunes = app('iTunes')
... | <commit_before>#!/usr/bin/env python
from termcolor import colored
from appscript import *
from track import Track
def main():
print(get_song())
def get_song():
itunes_open = bool(app('System Events').processes[its.name == 'iTunes'].count())
if itunes_open: # check if application open
itunes =... | #!/usr/bin/env python
from termcolor import colored
from appscript import *
from track import Track
def main():
print(get_song())
def get_song():
itunes_open = bool(app('System Events').processes[its.name == 'iTunes'].count())
if itunes_open: # check if application open
itunes = app('iTunes')
... | #!/usr/bin/env python
from termcolor import colored
from appscript import *
from track import Track
def main():
print(get_song())
def get_song():
itunes_open = bool(app('System Events').processes[its.name == 'iTunes'].count())
if itunes_open: # check if application open
itunes = app('iTunes')
... | <commit_before>#!/usr/bin/env python
from termcolor import colored
from appscript import *
from track import Track
def main():
print(get_song())
def get_song():
itunes_open = bool(app('System Events').processes[its.name == 'iTunes'].count())
if itunes_open: # check if application open
itunes =... |
b570dc035110ca8b27af30fde78d2bb6e364417f | test/basic.py | test/basic.py | import unittest
from anser import Anser, Client
class BasicAnserTest(unittest.TestCase):
def test_creation(self):
server = Anser(__file__)
self.assertEquals(server.name, __file__)
def test_creation_explicit_no_debug(self):
server = Anser(__file__, debug=False)
self.assertFals... | import unittest
from anser import Anser, Client
class BasicAnserTest(unittest.TestCase):
def test_creation(self):
server = Anser(__file__)
self.assertEqual(server.name, __file__)
def test_creation_explicit_no_debug(self):
server = Anser(__file__, debug=False)
self.assertFalse... | Use assertEqual instead of assertEquals | Use assertEqual instead of assertEquals
| Python | mit | iconpin/anser | import unittest
from anser import Anser, Client
class BasicAnserTest(unittest.TestCase):
def test_creation(self):
server = Anser(__file__)
self.assertEquals(server.name, __file__)
def test_creation_explicit_no_debug(self):
server = Anser(__file__, debug=False)
self.assertFals... | import unittest
from anser import Anser, Client
class BasicAnserTest(unittest.TestCase):
def test_creation(self):
server = Anser(__file__)
self.assertEqual(server.name, __file__)
def test_creation_explicit_no_debug(self):
server = Anser(__file__, debug=False)
self.assertFalse... | <commit_before>import unittest
from anser import Anser, Client
class BasicAnserTest(unittest.TestCase):
def test_creation(self):
server = Anser(__file__)
self.assertEquals(server.name, __file__)
def test_creation_explicit_no_debug(self):
server = Anser(__file__, debug=False)
... | import unittest
from anser import Anser, Client
class BasicAnserTest(unittest.TestCase):
def test_creation(self):
server = Anser(__file__)
self.assertEqual(server.name, __file__)
def test_creation_explicit_no_debug(self):
server = Anser(__file__, debug=False)
self.assertFalse... | import unittest
from anser import Anser, Client
class BasicAnserTest(unittest.TestCase):
def test_creation(self):
server = Anser(__file__)
self.assertEquals(server.name, __file__)
def test_creation_explicit_no_debug(self):
server = Anser(__file__, debug=False)
self.assertFals... | <commit_before>import unittest
from anser import Anser, Client
class BasicAnserTest(unittest.TestCase):
def test_creation(self):
server = Anser(__file__)
self.assertEquals(server.name, __file__)
def test_creation_explicit_no_debug(self):
server = Anser(__file__, debug=False)
... |
54cfb9864256b27b9f4cd411f170cc12d47727e5 | appengine/components/components/machine_provider/dimensions.py | appengine/components/components/machine_provider/dimensions.py | # Copyright 2015 The LUCI Authors. All rights reserved.
# Use of this source code is governed by the Apache v2.0 license that can be
# found in the LICENSE file.
"""Dimensions for the Machine Provider."""
from protorpc import messages
class Backend(messages.Enum):
"""Lists valid backends."""
DUMMY = 0
GCE = 1... | # Copyright 2015 The LUCI Authors. All rights reserved.
# Use of this source code is governed by the Apache v2.0 license that can be
# found in the LICENSE file.
"""Dimensions for the Machine Provider."""
from protorpc import messages
class Backend(messages.Enum):
"""Lists valid backends."""
DUMMY = 0
GCE = 1... | Add enum field for vSphere backend | Add enum field for vSphere backend
Review-Url: https://codereview.chromium.org/1997903002
| Python | apache-2.0 | luci/luci-py,luci/luci-py,luci/luci-py,luci/luci-py | # Copyright 2015 The LUCI Authors. All rights reserved.
# Use of this source code is governed by the Apache v2.0 license that can be
# found in the LICENSE file.
"""Dimensions for the Machine Provider."""
from protorpc import messages
class Backend(messages.Enum):
"""Lists valid backends."""
DUMMY = 0
GCE = 1... | # Copyright 2015 The LUCI Authors. All rights reserved.
# Use of this source code is governed by the Apache v2.0 license that can be
# found in the LICENSE file.
"""Dimensions for the Machine Provider."""
from protorpc import messages
class Backend(messages.Enum):
"""Lists valid backends."""
DUMMY = 0
GCE = 1... | <commit_before># Copyright 2015 The LUCI Authors. All rights reserved.
# Use of this source code is governed by the Apache v2.0 license that can be
# found in the LICENSE file.
"""Dimensions for the Machine Provider."""
from protorpc import messages
class Backend(messages.Enum):
"""Lists valid backends."""
DUMM... | # Copyright 2015 The LUCI Authors. All rights reserved.
# Use of this source code is governed by the Apache v2.0 license that can be
# found in the LICENSE file.
"""Dimensions for the Machine Provider."""
from protorpc import messages
class Backend(messages.Enum):
"""Lists valid backends."""
DUMMY = 0
GCE = 1... | # Copyright 2015 The LUCI Authors. All rights reserved.
# Use of this source code is governed by the Apache v2.0 license that can be
# found in the LICENSE file.
"""Dimensions for the Machine Provider."""
from protorpc import messages
class Backend(messages.Enum):
"""Lists valid backends."""
DUMMY = 0
GCE = 1... | <commit_before># Copyright 2015 The LUCI Authors. All rights reserved.
# Use of this source code is governed by the Apache v2.0 license that can be
# found in the LICENSE file.
"""Dimensions for the Machine Provider."""
from protorpc import messages
class Backend(messages.Enum):
"""Lists valid backends."""
DUMM... |
020b2518efce2d973093a366e0a9abfadbd602fd | main/forms.py | main/forms.py | from django import forms
class IndexForm(forms.Form):
usos_auth_pin = forms.IntegerField(label='USOS Authorization PIN')
id_list = forms.CharField(
widget=forms.Textarea, label='ID List',
help_text='List of students IDs to query, one per line.')
student_id_regex = forms.CharField(
... | from django import forms
class IndexForm(forms.Form):
usos_auth_pin = forms.IntegerField(
label='USOS Authorization PIN',
help_text='If not filled out, then only the cache is used. Note that '
'this means that some IDs may fail to be looked up.',
required=False)
id_li... | Add help_text and required=False to the PIN field | Add help_text and required=False to the PIN field
| Python | mit | m4tx/usos-id-mapper,m4tx/usos-id-mapper | from django import forms
class IndexForm(forms.Form):
usos_auth_pin = forms.IntegerField(label='USOS Authorization PIN')
id_list = forms.CharField(
widget=forms.Textarea, label='ID List',
help_text='List of students IDs to query, one per line.')
student_id_regex = forms.CharField(
... | from django import forms
class IndexForm(forms.Form):
usos_auth_pin = forms.IntegerField(
label='USOS Authorization PIN',
help_text='If not filled out, then only the cache is used. Note that '
'this means that some IDs may fail to be looked up.',
required=False)
id_li... | <commit_before>from django import forms
class IndexForm(forms.Form):
usos_auth_pin = forms.IntegerField(label='USOS Authorization PIN')
id_list = forms.CharField(
widget=forms.Textarea, label='ID List',
help_text='List of students IDs to query, one per line.')
student_id_regex = forms.Char... | from django import forms
class IndexForm(forms.Form):
usos_auth_pin = forms.IntegerField(
label='USOS Authorization PIN',
help_text='If not filled out, then only the cache is used. Note that '
'this means that some IDs may fail to be looked up.',
required=False)
id_li... | from django import forms
class IndexForm(forms.Form):
usos_auth_pin = forms.IntegerField(label='USOS Authorization PIN')
id_list = forms.CharField(
widget=forms.Textarea, label='ID List',
help_text='List of students IDs to query, one per line.')
student_id_regex = forms.CharField(
... | <commit_before>from django import forms
class IndexForm(forms.Form):
usos_auth_pin = forms.IntegerField(label='USOS Authorization PIN')
id_list = forms.CharField(
widget=forms.Textarea, label='ID List',
help_text='List of students IDs to query, one per line.')
student_id_regex = forms.Char... |
3e1408affa823af2ed95decf52b002614d060a26 | pombola/core/tests/test_templatetags.py | pombola/core/tests/test_templatetags.py |
from django.test import TestCase
from ..templatetags.breadcrumbs import breadcrumbs
class BreadcrumbTest(TestCase):
def test_breadcrumbs(self):
"""Check that the breadcrumbs are generated as expected"""
home_li = '<li><a href="/" title="Breadcrumb link to the homepage.">Home</a> <span class="... |
from django.test import TestCase
from ..templatetags.breadcrumbs import breadcrumbs
from ..templatetags.active_class import active_class
class BreadcrumbTest(TestCase):
def test_breadcrumbs(self):
"""Check that the breadcrumbs are generated as expected"""
home_li = '<li><a href="/" title="Bre... | Add tests for active_class templatetag | Add tests for active_class templatetag
| Python | agpl-3.0 | hzj123/56th,geoffkilpin/pombola,hzj123/56th,geoffkilpin/pombola,mysociety/pombola,hzj123/56th,mysociety/pombola,hzj123/56th,geoffkilpin/pombola,hzj123/56th,patricmutwiri/pombola,patricmutwiri/pombola,mysociety/pombola,geoffkilpin/pombola,patricmutwiri/pombola,ken-muturi/pombola,ken-muturi/pombola,mysociety/pombola,ken-... |
from django.test import TestCase
from ..templatetags.breadcrumbs import breadcrumbs
class BreadcrumbTest(TestCase):
def test_breadcrumbs(self):
"""Check that the breadcrumbs are generated as expected"""
home_li = '<li><a href="/" title="Breadcrumb link to the homepage.">Home</a> <span class="... |
from django.test import TestCase
from ..templatetags.breadcrumbs import breadcrumbs
from ..templatetags.active_class import active_class
class BreadcrumbTest(TestCase):
def test_breadcrumbs(self):
"""Check that the breadcrumbs are generated as expected"""
home_li = '<li><a href="/" title="Bre... | <commit_before>
from django.test import TestCase
from ..templatetags.breadcrumbs import breadcrumbs
class BreadcrumbTest(TestCase):
def test_breadcrumbs(self):
"""Check that the breadcrumbs are generated as expected"""
home_li = '<li><a href="/" title="Breadcrumb link to the homepage.">Home</a>... |
from django.test import TestCase
from ..templatetags.breadcrumbs import breadcrumbs
from ..templatetags.active_class import active_class
class BreadcrumbTest(TestCase):
def test_breadcrumbs(self):
"""Check that the breadcrumbs are generated as expected"""
home_li = '<li><a href="/" title="Bre... |
from django.test import TestCase
from ..templatetags.breadcrumbs import breadcrumbs
class BreadcrumbTest(TestCase):
def test_breadcrumbs(self):
"""Check that the breadcrumbs are generated as expected"""
home_li = '<li><a href="/" title="Breadcrumb link to the homepage.">Home</a> <span class="... | <commit_before>
from django.test import TestCase
from ..templatetags.breadcrumbs import breadcrumbs
class BreadcrumbTest(TestCase):
def test_breadcrumbs(self):
"""Check that the breadcrumbs are generated as expected"""
home_li = '<li><a href="/" title="Breadcrumb link to the homepage.">Home</a>... |
1421dd89b74bf753cf0b52a5e6fe200d221922b5 | pirx/utils.py | pirx/utils.py | import os
def setting(name):
return name.upper()
def path(subpath):
project_root = os.path.dirname(os.path.realpath(__file__))
return os.path.join(project_root, subpath)
| import os
def setting(name):
return name.upper()
def path(subpath):
import __main__
project_root = os.path.dirname(os.path.realpath(__main__.__file__))
return os.path.join(project_root, subpath)
| Fix 'path' function: use main's file as project root | Fix 'path' function: use main's file as project root
| Python | mit | piotrekw/pirx | import os
def setting(name):
return name.upper()
def path(subpath):
project_root = os.path.dirname(os.path.realpath(__file__))
return os.path.join(project_root, subpath)
Fix 'path' function: use main's file as project root | import os
def setting(name):
return name.upper()
def path(subpath):
import __main__
project_root = os.path.dirname(os.path.realpath(__main__.__file__))
return os.path.join(project_root, subpath)
| <commit_before>import os
def setting(name):
return name.upper()
def path(subpath):
project_root = os.path.dirname(os.path.realpath(__file__))
return os.path.join(project_root, subpath)
<commit_msg>Fix 'path' function: use main's file as project root<commit_after> | import os
def setting(name):
return name.upper()
def path(subpath):
import __main__
project_root = os.path.dirname(os.path.realpath(__main__.__file__))
return os.path.join(project_root, subpath)
| import os
def setting(name):
return name.upper()
def path(subpath):
project_root = os.path.dirname(os.path.realpath(__file__))
return os.path.join(project_root, subpath)
Fix 'path' function: use main's file as project rootimport os
def setting(name):
return name.upper()
def path(subpath):
imp... | <commit_before>import os
def setting(name):
return name.upper()
def path(subpath):
project_root = os.path.dirname(os.path.realpath(__file__))
return os.path.join(project_root, subpath)
<commit_msg>Fix 'path' function: use main's file as project root<commit_after>import os
def setting(name):
return... |
04541918979c02b6dcd07d2c960cd24b9a745d10 | mailgun/db.py | mailgun/db.py | from django.db import models
class MailgunLog(models.Model):
log_hash = models.CharField(max_length=64, unique=True)
data = models.TextField()
timestamp = models.DateTime()
| from django.db import models
class MailgunLog(models.Model):
log_hash = models.CharField(max_length=64, unique=True)
data = models.TextField()
timestamp = models.DateTimeField()
| Fix incorrect models field name for MailgunLog | Fix incorrect models field name for MailgunLog
| Python | mit | p2pu/mechanical-mooc,p2pu/mechanical-mooc,p2pu/mechanical-mooc,p2pu/mechanical-mooc | from django.db import models
class MailgunLog(models.Model):
log_hash = models.CharField(max_length=64, unique=True)
data = models.TextField()
timestamp = models.DateTime()
Fix incorrect models field name for MailgunLog | from django.db import models
class MailgunLog(models.Model):
log_hash = models.CharField(max_length=64, unique=True)
data = models.TextField()
timestamp = models.DateTimeField()
| <commit_before>from django.db import models
class MailgunLog(models.Model):
log_hash = models.CharField(max_length=64, unique=True)
data = models.TextField()
timestamp = models.DateTime()
<commit_msg>Fix incorrect models field name for MailgunLog<commit_after> | from django.db import models
class MailgunLog(models.Model):
log_hash = models.CharField(max_length=64, unique=True)
data = models.TextField()
timestamp = models.DateTimeField()
| from django.db import models
class MailgunLog(models.Model):
log_hash = models.CharField(max_length=64, unique=True)
data = models.TextField()
timestamp = models.DateTime()
Fix incorrect models field name for MailgunLogfrom django.db import models
class MailgunLog(models.Model):
log_hash = models.Char... | <commit_before>from django.db import models
class MailgunLog(models.Model):
log_hash = models.CharField(max_length=64, unique=True)
data = models.TextField()
timestamp = models.DateTime()
<commit_msg>Fix incorrect models field name for MailgunLog<commit_after>from django.db import models
class MailgunLog(... |
662046497abfa6f7f6553aeb266a261637ba6407 | numba/postpasses.py | numba/postpasses.py | # -*- coding: utf-8 -*-
"""
Postpasses over the LLVM IR.
The signature of each postpass is postpass(env, ee, lmod, lfunc) -> lfunc
"""
from __future__ import print_function, division, absolute_import
from numba.support.math_support import math_support, libs
default_postpasses = {}
def register_default(name):
d... | # -*- coding: utf-8 -*-
"""
Postpasses over the LLVM IR.
The signature of each postpass is postpass(env, ee, lmod, lfunc) -> lfunc
"""
from __future__ import print_function, division, absolute_import
from numba.support.math_support import linking, libs
default_postpasses = {}
def register_default(name):
def de... | Clean up old test, pass all tests | Clean up old test, pass all tests
| Python | bsd-2-clause | jriehl/numba,jriehl/numba,stefanseefeld/numba,seibert/numba,gdementen/numba,sklam/numba,pitrou/numba,stefanseefeld/numba,stuartarchibald/numba,stonebig/numba,numba/numba,GaZ3ll3/numba,ssarangi/numba,sklam/numba,cpcloud/numba,sklam/numba,ssarangi/numba,stonebig/numba,gdementen/numba,pombredanne/numba,GaZ3ll3/numba,seibe... | # -*- coding: utf-8 -*-
"""
Postpasses over the LLVM IR.
The signature of each postpass is postpass(env, ee, lmod, lfunc) -> lfunc
"""
from __future__ import print_function, division, absolute_import
from numba.support.math_support import math_support, libs
default_postpasses = {}
def register_default(name):
d... | # -*- coding: utf-8 -*-
"""
Postpasses over the LLVM IR.
The signature of each postpass is postpass(env, ee, lmod, lfunc) -> lfunc
"""
from __future__ import print_function, division, absolute_import
from numba.support.math_support import linking, libs
default_postpasses = {}
def register_default(name):
def de... | <commit_before># -*- coding: utf-8 -*-
"""
Postpasses over the LLVM IR.
The signature of each postpass is postpass(env, ee, lmod, lfunc) -> lfunc
"""
from __future__ import print_function, division, absolute_import
from numba.support.math_support import math_support, libs
default_postpasses = {}
def register_defau... | # -*- coding: utf-8 -*-
"""
Postpasses over the LLVM IR.
The signature of each postpass is postpass(env, ee, lmod, lfunc) -> lfunc
"""
from __future__ import print_function, division, absolute_import
from numba.support.math_support import linking, libs
default_postpasses = {}
def register_default(name):
def de... | # -*- coding: utf-8 -*-
"""
Postpasses over the LLVM IR.
The signature of each postpass is postpass(env, ee, lmod, lfunc) -> lfunc
"""
from __future__ import print_function, division, absolute_import
from numba.support.math_support import math_support, libs
default_postpasses = {}
def register_default(name):
d... | <commit_before># -*- coding: utf-8 -*-
"""
Postpasses over the LLVM IR.
The signature of each postpass is postpass(env, ee, lmod, lfunc) -> lfunc
"""
from __future__ import print_function, division, absolute_import
from numba.support.math_support import math_support, libs
default_postpasses = {}
def register_defau... |
b44b0f68a2dd00df1ec074cf39a66ce81cd0dae2 | nowplaying.py | nowplaying.py | #!/usr/bin/env python
from termcolor import colored
from appscript import *
from track import Track
def main():
print(get_song())
def get_song():
itunes_open = bool(app('System Events').processes[its.name == 'iTunes'].count())
if itunes_open: # check if application open
itunes = app('iTunes')
... | #!/usr/bin/env python
from termcolor import colored
from appscript import *
from track import Track
def main():
print(get_song())
def get_song():
itunes_open = bool(app('System Events').processes[its.name == 'iTunes'].count())
if itunes_open: # check if application open
itunes = app('iTunes')
... | Update error output for app not open/song not playing | Update error output for app not open/song not playing
| Python | mit | kshvmdn/nowplaying | #!/usr/bin/env python
from termcolor import colored
from appscript import *
from track import Track
def main():
print(get_song())
def get_song():
itunes_open = bool(app('System Events').processes[its.name == 'iTunes'].count())
if itunes_open: # check if application open
itunes = app('iTunes')
... | #!/usr/bin/env python
from termcolor import colored
from appscript import *
from track import Track
def main():
print(get_song())
def get_song():
itunes_open = bool(app('System Events').processes[its.name == 'iTunes'].count())
if itunes_open: # check if application open
itunes = app('iTunes')
... | <commit_before>#!/usr/bin/env python
from termcolor import colored
from appscript import *
from track import Track
def main():
print(get_song())
def get_song():
itunes_open = bool(app('System Events').processes[its.name == 'iTunes'].count())
if itunes_open: # check if application open
itunes =... | #!/usr/bin/env python
from termcolor import colored
from appscript import *
from track import Track
def main():
print(get_song())
def get_song():
itunes_open = bool(app('System Events').processes[its.name == 'iTunes'].count())
if itunes_open: # check if application open
itunes = app('iTunes')
... | #!/usr/bin/env python
from termcolor import colored
from appscript import *
from track import Track
def main():
print(get_song())
def get_song():
itunes_open = bool(app('System Events').processes[its.name == 'iTunes'].count())
if itunes_open: # check if application open
itunes = app('iTunes')
... | <commit_before>#!/usr/bin/env python
from termcolor import colored
from appscript import *
from track import Track
def main():
print(get_song())
def get_song():
itunes_open = bool(app('System Events').processes[its.name == 'iTunes'].count())
if itunes_open: # check if application open
itunes =... |
5fef15285060b384ec2fd56b328e9848a63d1be0 | dbaas/integrations/monitoring/manager.py | dbaas/integrations/monitoring/manager.py | from dbaas_dbmonitor.provider import DBMonitorProvider
from dbaas_zabbix.provider import ZabbixProvider
import logging
LOG = logging.getLogger(__name__)
class MonitoringManager():
@classmethod
def create_monitoring(cls, databaseinfra):
try:
LOG.info("Creating monitoring...")
... | from dbaas_dbmonitor.provider import DBMonitorProvider
from dbaas_zabbix.provider import ZabbixProvider
import logging
LOG = logging.getLogger(__name__)
class MonitoringManager():
@classmethod
def create_monitoring(cls, databaseinfra):
try:
LOG.info("Creating monitoring...")
... | Remove comment from zabbix integration | Remove comment from zabbix integration
| Python | bsd-3-clause | globocom/database-as-a-service,globocom/database-as-a-service,globocom/database-as-a-service,globocom/database-as-a-service | from dbaas_dbmonitor.provider import DBMonitorProvider
from dbaas_zabbix.provider import ZabbixProvider
import logging
LOG = logging.getLogger(__name__)
class MonitoringManager():
@classmethod
def create_monitoring(cls, databaseinfra):
try:
LOG.info("Creating monitoring...")
... | from dbaas_dbmonitor.provider import DBMonitorProvider
from dbaas_zabbix.provider import ZabbixProvider
import logging
LOG = logging.getLogger(__name__)
class MonitoringManager():
@classmethod
def create_monitoring(cls, databaseinfra):
try:
LOG.info("Creating monitoring...")
... | <commit_before>from dbaas_dbmonitor.provider import DBMonitorProvider
from dbaas_zabbix.provider import ZabbixProvider
import logging
LOG = logging.getLogger(__name__)
class MonitoringManager():
@classmethod
def create_monitoring(cls, databaseinfra):
try:
LOG.info("Creating monitoring... | from dbaas_dbmonitor.provider import DBMonitorProvider
from dbaas_zabbix.provider import ZabbixProvider
import logging
LOG = logging.getLogger(__name__)
class MonitoringManager():
@classmethod
def create_monitoring(cls, databaseinfra):
try:
LOG.info("Creating monitoring...")
... | from dbaas_dbmonitor.provider import DBMonitorProvider
from dbaas_zabbix.provider import ZabbixProvider
import logging
LOG = logging.getLogger(__name__)
class MonitoringManager():
@classmethod
def create_monitoring(cls, databaseinfra):
try:
LOG.info("Creating monitoring...")
... | <commit_before>from dbaas_dbmonitor.provider import DBMonitorProvider
from dbaas_zabbix.provider import ZabbixProvider
import logging
LOG = logging.getLogger(__name__)
class MonitoringManager():
@classmethod
def create_monitoring(cls, databaseinfra):
try:
LOG.info("Creating monitoring... |
3c8067a1b8fb3463fa4c45a6f03c8dc0fbf918b3 | organizer/models.py | organizer/models.py | from django.db import models
# Model Field Reference
# https://docs.djangoproject.com/en/1.8/ref/models/fields/
class Tag(models.Model):
name = models.CharField(
max_length=31, unique=True)
slug = models.SlugField(
max_length=31,
unique=True,
help_text='A label for URL config... | from django.db import models
# Model Field Reference
# https://docs.djangoproject.com/en/1.8/ref/models/fields/
class Tag(models.Model):
name = models.CharField(
max_length=31, unique=True)
slug = models.SlugField(
max_length=31,
unique=True,
help_text='A label for URL config... | Declare Meta class in Tag model. | Ch03: Declare Meta class in Tag model. [skip ci]
| Python | bsd-2-clause | jambonrose/DjangoUnleashed-1.8,jambonrose/DjangoUnleashed-1.8 | from django.db import models
# Model Field Reference
# https://docs.djangoproject.com/en/1.8/ref/models/fields/
class Tag(models.Model):
name = models.CharField(
max_length=31, unique=True)
slug = models.SlugField(
max_length=31,
unique=True,
help_text='A label for URL config... | from django.db import models
# Model Field Reference
# https://docs.djangoproject.com/en/1.8/ref/models/fields/
class Tag(models.Model):
name = models.CharField(
max_length=31, unique=True)
slug = models.SlugField(
max_length=31,
unique=True,
help_text='A label for URL config... | <commit_before>from django.db import models
# Model Field Reference
# https://docs.djangoproject.com/en/1.8/ref/models/fields/
class Tag(models.Model):
name = models.CharField(
max_length=31, unique=True)
slug = models.SlugField(
max_length=31,
unique=True,
help_text='A label... | from django.db import models
# Model Field Reference
# https://docs.djangoproject.com/en/1.8/ref/models/fields/
class Tag(models.Model):
name = models.CharField(
max_length=31, unique=True)
slug = models.SlugField(
max_length=31,
unique=True,
help_text='A label for URL config... | from django.db import models
# Model Field Reference
# https://docs.djangoproject.com/en/1.8/ref/models/fields/
class Tag(models.Model):
name = models.CharField(
max_length=31, unique=True)
slug = models.SlugField(
max_length=31,
unique=True,
help_text='A label for URL config... | <commit_before>from django.db import models
# Model Field Reference
# https://docs.djangoproject.com/en/1.8/ref/models/fields/
class Tag(models.Model):
name = models.CharField(
max_length=31, unique=True)
slug = models.SlugField(
max_length=31,
unique=True,
help_text='A label... |
f02fe06dad6760bb7ba88fbbf1e32b90f2c1d22e | src/waldur_openstack/openstack_tenant/utils.py | src/waldur_openstack/openstack_tenant/utils.py | from django.contrib.contenttypes.models import ContentType
from waldur_core.cost_tracking import ConsumableItem
from waldur_core.cost_tracking.models import DefaultPriceListItem
from . import models, PriceItemTypes
def get_consumable_item(flavor_name):
return ConsumableItem(item_type=PriceItemTypes.FLAVOR, key=... | from django.contrib.contenttypes.models import ContentType
from waldur_core.cost_tracking import ConsumableItem
from waldur_core.cost_tracking.models import DefaultPriceListItem
from . import models, PriceItemTypes
def get_consumable_item(flavor_name):
return ConsumableItem(item_type=PriceItemTypes.FLAVOR, key=... | Fix default price list item synchronization for OpenStack flavor [SENTRY-2030] Previously invalid resource content type has been used. | Fix default price list item synchronization for OpenStack flavor [SENTRY-2030]
Previously invalid resource content type has been used.
| Python | mit | opennode/nodeconductor-openstack | from django.contrib.contenttypes.models import ContentType
from waldur_core.cost_tracking import ConsumableItem
from waldur_core.cost_tracking.models import DefaultPriceListItem
from . import models, PriceItemTypes
def get_consumable_item(flavor_name):
return ConsumableItem(item_type=PriceItemTypes.FLAVOR, key=... | from django.contrib.contenttypes.models import ContentType
from waldur_core.cost_tracking import ConsumableItem
from waldur_core.cost_tracking.models import DefaultPriceListItem
from . import models, PriceItemTypes
def get_consumable_item(flavor_name):
return ConsumableItem(item_type=PriceItemTypes.FLAVOR, key=... | <commit_before>from django.contrib.contenttypes.models import ContentType
from waldur_core.cost_tracking import ConsumableItem
from waldur_core.cost_tracking.models import DefaultPriceListItem
from . import models, PriceItemTypes
def get_consumable_item(flavor_name):
return ConsumableItem(item_type=PriceItemTyp... | from django.contrib.contenttypes.models import ContentType
from waldur_core.cost_tracking import ConsumableItem
from waldur_core.cost_tracking.models import DefaultPriceListItem
from . import models, PriceItemTypes
def get_consumable_item(flavor_name):
return ConsumableItem(item_type=PriceItemTypes.FLAVOR, key=... | from django.contrib.contenttypes.models import ContentType
from waldur_core.cost_tracking import ConsumableItem
from waldur_core.cost_tracking.models import DefaultPriceListItem
from . import models, PriceItemTypes
def get_consumable_item(flavor_name):
return ConsumableItem(item_type=PriceItemTypes.FLAVOR, key=... | <commit_before>from django.contrib.contenttypes.models import ContentType
from waldur_core.cost_tracking import ConsumableItem
from waldur_core.cost_tracking.models import DefaultPriceListItem
from . import models, PriceItemTypes
def get_consumable_item(flavor_name):
return ConsumableItem(item_type=PriceItemTyp... |
776d5a686445712c6b3b1a4da72c45f2a1664e64 | tests/matchers/test_contain.py | tests/matchers/test_contain.py | import unittest
from robber import expect
from robber.matchers.contain import Contain
class TestAbove(unittest.TestCase):
def test_matches(self):
expect(Contain({'key': 'value'}, 'key').matches()) == True
expect(Contain([1, 2, 3], 2).matches()) == True
expect(Contain((1, 2, 3), 3).matches()... | import unittest
from robber import expect
from robber.matchers.contain import Contain
class TestContain(unittest.TestCase):
def test_matches(self):
expect(Contain({'key': 'value'}, 'key').matches()) == True
expect(Contain([1, 2, 3], 2).matches()) == True
expect(Contain((1, 2, 3), 3).matches... | Rename the 'contain' TestCase to TestContain | Rename the 'contain' TestCase to TestContain
| Python | mit | taoenator/robber.py,vesln/robber.py | import unittest
from robber import expect
from robber.matchers.contain import Contain
class TestAbove(unittest.TestCase):
def test_matches(self):
expect(Contain({'key': 'value'}, 'key').matches()) == True
expect(Contain([1, 2, 3], 2).matches()) == True
expect(Contain((1, 2, 3), 3).matches()... | import unittest
from robber import expect
from robber.matchers.contain import Contain
class TestContain(unittest.TestCase):
def test_matches(self):
expect(Contain({'key': 'value'}, 'key').matches()) == True
expect(Contain([1, 2, 3], 2).matches()) == True
expect(Contain((1, 2, 3), 3).matches... | <commit_before>import unittest
from robber import expect
from robber.matchers.contain import Contain
class TestAbove(unittest.TestCase):
def test_matches(self):
expect(Contain({'key': 'value'}, 'key').matches()) == True
expect(Contain([1, 2, 3], 2).matches()) == True
expect(Contain((1, 2, 3... | import unittest
from robber import expect
from robber.matchers.contain import Contain
class TestContain(unittest.TestCase):
def test_matches(self):
expect(Contain({'key': 'value'}, 'key').matches()) == True
expect(Contain([1, 2, 3], 2).matches()) == True
expect(Contain((1, 2, 3), 3).matches... | import unittest
from robber import expect
from robber.matchers.contain import Contain
class TestAbove(unittest.TestCase):
def test_matches(self):
expect(Contain({'key': 'value'}, 'key').matches()) == True
expect(Contain([1, 2, 3], 2).matches()) == True
expect(Contain((1, 2, 3), 3).matches()... | <commit_before>import unittest
from robber import expect
from robber.matchers.contain import Contain
class TestAbove(unittest.TestCase):
def test_matches(self):
expect(Contain({'key': 'value'}, 'key').matches()) == True
expect(Contain([1, 2, 3], 2).matches()) == True
expect(Contain((1, 2, 3... |
8791ddc33037f4ab3d93ae834fbbb9d551ab0837 | genes/debian/traits.py | genes/debian/traits.py | from functools import wraps
import platform
def is_debian(versions=None, distro_name='Debian'):
operating_system = platform.system()
distribution, version, codename = platform.linux_distribution()
is_version = True
if versions:
is_version = version in versions or codename in versions
retu... | from functools import wraps
import platform
# FIXME: had to duplicate this for package level imports. this is a bad design
operating_system = platform.system()
distribution, version, codename = platform.linux_distribution()
def is_debian(versions=None, distro_name='Debian'):
# FIXME: this is duplicated above. F... | Add global level vars for other packages | Add global level vars for other packages | Python | mit | hatchery/Genepool2,hatchery/genepool | from functools import wraps
import platform
def is_debian(versions=None, distro_name='Debian'):
operating_system = platform.system()
distribution, version, codename = platform.linux_distribution()
is_version = True
if versions:
is_version = version in versions or codename in versions
retu... | from functools import wraps
import platform
# FIXME: had to duplicate this for package level imports. this is a bad design
operating_system = platform.system()
distribution, version, codename = platform.linux_distribution()
def is_debian(versions=None, distro_name='Debian'):
# FIXME: this is duplicated above. F... | <commit_before>from functools import wraps
import platform
def is_debian(versions=None, distro_name='Debian'):
operating_system = platform.system()
distribution, version, codename = platform.linux_distribution()
is_version = True
if versions:
is_version = version in versions or codename in ve... | from functools import wraps
import platform
# FIXME: had to duplicate this for package level imports. this is a bad design
operating_system = platform.system()
distribution, version, codename = platform.linux_distribution()
def is_debian(versions=None, distro_name='Debian'):
# FIXME: this is duplicated above. F... | from functools import wraps
import platform
def is_debian(versions=None, distro_name='Debian'):
operating_system = platform.system()
distribution, version, codename = platform.linux_distribution()
is_version = True
if versions:
is_version = version in versions or codename in versions
retu... | <commit_before>from functools import wraps
import platform
def is_debian(versions=None, distro_name='Debian'):
operating_system = platform.system()
distribution, version, codename = platform.linux_distribution()
is_version = True
if versions:
is_version = version in versions or codename in ve... |
a8f9f1dffc9dd345504005427f9f02ae8e1e07a4 | froide/foirequest/search_indexes.py | froide/foirequest/search_indexes.py | from haystack import indexes
from celery_haystack.indexes import CelerySearchIndex
from .models import FoiRequest
class FoiRequestIndex(CelerySearchIndex, indexes.Indexable):
text = indexes.EdgeNgramField(document=True, use_template=True)
title = indexes.CharField(model_attr='title')
description = index... | from haystack import indexes
from celery_haystack.indexes import CelerySearchIndex
from .models import FoiRequest
class FoiRequestIndex(CelerySearchIndex, indexes.Indexable):
text = indexes.EdgeNgramField(document=True, use_template=True)
title = indexes.CharField(model_attr='title')
description = index... | Fix mistake in search index update check | Fix mistake in search index update check
| Python | mit | ryankanno/froide,CodeforHawaii/froide,fin/froide,LilithWittmann/froide,ryankanno/froide,stefanw/froide,ryankanno/froide,okfse/froide,CodeforHawaii/froide,okfse/froide,okfse/froide,catcosmo/froide,stefanw/froide,LilithWittmann/froide,ryankanno/froide,fin/froide,ryankanno/froide,catcosmo/froide,catcosmo/froide,LilithWitt... | from haystack import indexes
from celery_haystack.indexes import CelerySearchIndex
from .models import FoiRequest
class FoiRequestIndex(CelerySearchIndex, indexes.Indexable):
text = indexes.EdgeNgramField(document=True, use_template=True)
title = indexes.CharField(model_attr='title')
description = index... | from haystack import indexes
from celery_haystack.indexes import CelerySearchIndex
from .models import FoiRequest
class FoiRequestIndex(CelerySearchIndex, indexes.Indexable):
text = indexes.EdgeNgramField(document=True, use_template=True)
title = indexes.CharField(model_attr='title')
description = index... | <commit_before>from haystack import indexes
from celery_haystack.indexes import CelerySearchIndex
from .models import FoiRequest
class FoiRequestIndex(CelerySearchIndex, indexes.Indexable):
text = indexes.EdgeNgramField(document=True, use_template=True)
title = indexes.CharField(model_attr='title')
desc... | from haystack import indexes
from celery_haystack.indexes import CelerySearchIndex
from .models import FoiRequest
class FoiRequestIndex(CelerySearchIndex, indexes.Indexable):
text = indexes.EdgeNgramField(document=True, use_template=True)
title = indexes.CharField(model_attr='title')
description = index... | from haystack import indexes
from celery_haystack.indexes import CelerySearchIndex
from .models import FoiRequest
class FoiRequestIndex(CelerySearchIndex, indexes.Indexable):
text = indexes.EdgeNgramField(document=True, use_template=True)
title = indexes.CharField(model_attr='title')
description = index... | <commit_before>from haystack import indexes
from celery_haystack.indexes import CelerySearchIndex
from .models import FoiRequest
class FoiRequestIndex(CelerySearchIndex, indexes.Indexable):
text = indexes.EdgeNgramField(document=True, use_template=True)
title = indexes.CharField(model_attr='title')
desc... |
4858a17940ec4b4425f743813c0c1ecef391d967 | tests/test_file_handling.py | tests/test_file_handling.py | # -*- coding: utf-8 -*-
"""
format-sql
Copyright (c) 2014, Friedrich Paetzke (paetzke@fastmail.fm)
All rights reserved.
"""
import os
from format_sql.file_handling import format_file, load_from_file, main
def get_test_file(filename):
test_data = os.path.dirname(os.path.abspath(os.path.dirname(__file__)))
f... | # -*- coding: utf-8 -*-
"""
format-sql
Copyright (c) 2014, Friedrich Paetzke (paetzke@fastmail.fm)
All rights reserved.
"""
import os
import sys
from format_sql.file_handling import format_file, load_from_file, main
try:
from unittest.mock import patch
except ImportError:
from mock import patch
def get_te... | Add test for file iteration | Add test for file iteration
| Python | bsd-2-clause | paetzke/format-sql | # -*- coding: utf-8 -*-
"""
format-sql
Copyright (c) 2014, Friedrich Paetzke (paetzke@fastmail.fm)
All rights reserved.
"""
import os
from format_sql.file_handling import format_file, load_from_file, main
def get_test_file(filename):
test_data = os.path.dirname(os.path.abspath(os.path.dirname(__file__)))
f... | # -*- coding: utf-8 -*-
"""
format-sql
Copyright (c) 2014, Friedrich Paetzke (paetzke@fastmail.fm)
All rights reserved.
"""
import os
import sys
from format_sql.file_handling import format_file, load_from_file, main
try:
from unittest.mock import patch
except ImportError:
from mock import patch
def get_te... | <commit_before># -*- coding: utf-8 -*-
"""
format-sql
Copyright (c) 2014, Friedrich Paetzke (paetzke@fastmail.fm)
All rights reserved.
"""
import os
from format_sql.file_handling import format_file, load_from_file, main
def get_test_file(filename):
test_data = os.path.dirname(os.path.abspath(os.path.dirname(__... | # -*- coding: utf-8 -*-
"""
format-sql
Copyright (c) 2014, Friedrich Paetzke (paetzke@fastmail.fm)
All rights reserved.
"""
import os
import sys
from format_sql.file_handling import format_file, load_from_file, main
try:
from unittest.mock import patch
except ImportError:
from mock import patch
def get_te... | # -*- coding: utf-8 -*-
"""
format-sql
Copyright (c) 2014, Friedrich Paetzke (paetzke@fastmail.fm)
All rights reserved.
"""
import os
from format_sql.file_handling import format_file, load_from_file, main
def get_test_file(filename):
test_data = os.path.dirname(os.path.abspath(os.path.dirname(__file__)))
f... | <commit_before># -*- coding: utf-8 -*-
"""
format-sql
Copyright (c) 2014, Friedrich Paetzke (paetzke@fastmail.fm)
All rights reserved.
"""
import os
from format_sql.file_handling import format_file, load_from_file, main
def get_test_file(filename):
test_data = os.path.dirname(os.path.abspath(os.path.dirname(__... |
16214545b301aaba4847ffae5efe67782abe993d | toolz/tests/test_curried.py | toolz/tests/test_curried.py | import toolz
import toolz.curried
from toolz.curried import take, first, second, sorted, merge_with, reduce
from operator import add
def test_take():
assert list(take(2)([1, 2, 3])) == [1, 2]
def test_first():
assert first is toolz.itertoolz.first
def test_merge_with():
assert merge_with(sum)({1: 1}, ... | import toolz
import toolz.curried
from toolz.curried import (take, first, second, sorted, merge_with, reduce,
merge)
from collections import defaultdict
from operator import add
def test_take():
assert list(take(2)([1, 2, 3])) == [1, 2]
def test_first():
assert first is toolz.iter... | Add tests for curried merge | Add tests for curried merge
| Python | bsd-3-clause | machinelearningdeveloper/toolz,llllllllll/toolz,jdmcbr/toolz,llllllllll/toolz,pombredanne/toolz,machinelearningdeveloper/toolz,simudream/toolz,jcrist/toolz,cpcloud/toolz,quantopian/toolz,jcrist/toolz,jdmcbr/toolz,pombredanne/toolz,cpcloud/toolz,simudream/toolz,quantopian/toolz | import toolz
import toolz.curried
from toolz.curried import take, first, second, sorted, merge_with, reduce
from operator import add
def test_take():
assert list(take(2)([1, 2, 3])) == [1, 2]
def test_first():
assert first is toolz.itertoolz.first
def test_merge_with():
assert merge_with(sum)({1: 1}, ... | import toolz
import toolz.curried
from toolz.curried import (take, first, second, sorted, merge_with, reduce,
merge)
from collections import defaultdict
from operator import add
def test_take():
assert list(take(2)([1, 2, 3])) == [1, 2]
def test_first():
assert first is toolz.iter... | <commit_before>import toolz
import toolz.curried
from toolz.curried import take, first, second, sorted, merge_with, reduce
from operator import add
def test_take():
assert list(take(2)([1, 2, 3])) == [1, 2]
def test_first():
assert first is toolz.itertoolz.first
def test_merge_with():
assert merge_wit... | import toolz
import toolz.curried
from toolz.curried import (take, first, second, sorted, merge_with, reduce,
merge)
from collections import defaultdict
from operator import add
def test_take():
assert list(take(2)([1, 2, 3])) == [1, 2]
def test_first():
assert first is toolz.iter... | import toolz
import toolz.curried
from toolz.curried import take, first, second, sorted, merge_with, reduce
from operator import add
def test_take():
assert list(take(2)([1, 2, 3])) == [1, 2]
def test_first():
assert first is toolz.itertoolz.first
def test_merge_with():
assert merge_with(sum)({1: 1}, ... | <commit_before>import toolz
import toolz.curried
from toolz.curried import take, first, second, sorted, merge_with, reduce
from operator import add
def test_take():
assert list(take(2)([1, 2, 3])) == [1, 2]
def test_first():
assert first is toolz.itertoolz.first
def test_merge_with():
assert merge_wit... |
1a8095e71e81eff716524fa75eb9f07615ee61d2 | pre_commit/languages/python.py | pre_commit/languages/python.py |
from plumbum import local
import subprocess
PY_ENV = 'py_env'
def install_environment():
assert local.path('setup.py').exists()
# Return immediately if we already have a virtualenv
if local.path(PY_ENV).exists():
return
# Install a virtualenv
local['virtualenv'][PY_ENV]()
local['bas... |
from plumbum import local
import subprocess
PY_ENV = 'py_env'
def install_environment():
assert local.path('setup.py').exists()
# Return immediately if we already have a virtualenv
if local.path(PY_ENV).exists():
return
# Install a virtualenv
local['virtualenv'][PY_ENV]()
local['bas... | Return the actual return code | Return the actual return code
| Python | mit | chriskuehl/pre-commit,philipgian/pre-commit,chriskuehl/pre-commit,Teino1978-Corp/pre-commit,pre-commit/pre-commit,dnephin/pre-commit,beni55/pre-commit,beni55/pre-commit,philipgian/pre-commit,pre-commit/pre-commit,Lucas-C/pre-commit,barrysteyn/pre-commit,pre-commit/pre-commit,chriskuehl/pre-commit-1,barrysteyn/pre-commi... |
from plumbum import local
import subprocess
PY_ENV = 'py_env'
def install_environment():
assert local.path('setup.py').exists()
# Return immediately if we already have a virtualenv
if local.path(PY_ENV).exists():
return
# Install a virtualenv
local['virtualenv'][PY_ENV]()
local['bas... |
from plumbum import local
import subprocess
PY_ENV = 'py_env'
def install_environment():
assert local.path('setup.py').exists()
# Return immediately if we already have a virtualenv
if local.path(PY_ENV).exists():
return
# Install a virtualenv
local['virtualenv'][PY_ENV]()
local['bas... | <commit_before>
from plumbum import local
import subprocess
PY_ENV = 'py_env'
def install_environment():
assert local.path('setup.py').exists()
# Return immediately if we already have a virtualenv
if local.path(PY_ENV).exists():
return
# Install a virtualenv
local['virtualenv'][PY_ENV]()... |
from plumbum import local
import subprocess
PY_ENV = 'py_env'
def install_environment():
assert local.path('setup.py').exists()
# Return immediately if we already have a virtualenv
if local.path(PY_ENV).exists():
return
# Install a virtualenv
local['virtualenv'][PY_ENV]()
local['bas... |
from plumbum import local
import subprocess
PY_ENV = 'py_env'
def install_environment():
assert local.path('setup.py').exists()
# Return immediately if we already have a virtualenv
if local.path(PY_ENV).exists():
return
# Install a virtualenv
local['virtualenv'][PY_ENV]()
local['bas... | <commit_before>
from plumbum import local
import subprocess
PY_ENV = 'py_env'
def install_environment():
assert local.path('setup.py').exists()
# Return immediately if we already have a virtualenv
if local.path(PY_ENV).exists():
return
# Install a virtualenv
local['virtualenv'][PY_ENV]()... |
5d1a3ffedcb451a6a52b5e3492a56ef7663438d3 | packages/Python/lldbsuite/test/repl/po_repl_type/TestREPLPOReplType.py | packages/Python/lldbsuite/test/repl/po_repl_type/TestREPLPOReplType.py | # TestREPLPOReplType.py
#
# This source file is part of the Swift.org open source project
#
# Copyright (c) 2014 - 2015 Apple Inc. and the Swift project authors
# Licensed under Apache License v2.0 with Runtime Library Exception
#
# See http://swift.org/LICENSE.txt for license information
# See http://swift.org/CONTRIB... | # TestREPLPOReplType.py
#
# This source file is part of the Swift.org open source project
#
# Copyright (c) 2014 - 2015 Apple Inc. and the Swift project authors
# Licensed under Apache License v2.0 with Runtime Library Exception
#
# See http://swift.org/LICENSE.txt for license information
# See http://swift.org/CONTRIB... | Mark this test as a known failure to return the bots to blue | Mark this test as a known failure to return the bots to blue
| Python | apache-2.0 | apple/swift-lldb,apple/swift-lldb,apple/swift-lldb,apple/swift-lldb,apple/swift-lldb,apple/swift-lldb | # TestREPLPOReplType.py
#
# This source file is part of the Swift.org open source project
#
# Copyright (c) 2014 - 2015 Apple Inc. and the Swift project authors
# Licensed under Apache License v2.0 with Runtime Library Exception
#
# See http://swift.org/LICENSE.txt for license information
# See http://swift.org/CONTRIB... | # TestREPLPOReplType.py
#
# This source file is part of the Swift.org open source project
#
# Copyright (c) 2014 - 2015 Apple Inc. and the Swift project authors
# Licensed under Apache License v2.0 with Runtime Library Exception
#
# See http://swift.org/LICENSE.txt for license information
# See http://swift.org/CONTRIB... | <commit_before># TestREPLPOReplType.py
#
# This source file is part of the Swift.org open source project
#
# Copyright (c) 2014 - 2015 Apple Inc. and the Swift project authors
# Licensed under Apache License v2.0 with Runtime Library Exception
#
# See http://swift.org/LICENSE.txt for license information
# See http://sw... | # TestREPLPOReplType.py
#
# This source file is part of the Swift.org open source project
#
# Copyright (c) 2014 - 2015 Apple Inc. and the Swift project authors
# Licensed under Apache License v2.0 with Runtime Library Exception
#
# See http://swift.org/LICENSE.txt for license information
# See http://swift.org/CONTRIB... | # TestREPLPOReplType.py
#
# This source file is part of the Swift.org open source project
#
# Copyright (c) 2014 - 2015 Apple Inc. and the Swift project authors
# Licensed under Apache License v2.0 with Runtime Library Exception
#
# See http://swift.org/LICENSE.txt for license information
# See http://swift.org/CONTRIB... | <commit_before># TestREPLPOReplType.py
#
# This source file is part of the Swift.org open source project
#
# Copyright (c) 2014 - 2015 Apple Inc. and the Swift project authors
# Licensed under Apache License v2.0 with Runtime Library Exception
#
# See http://swift.org/LICENSE.txt for license information
# See http://sw... |
43d4b6a3ccf49b3a0307da98344b0fe8f61acaf1 | brew/rest.py | brew/rest.py | import json
import time
import jsonschema
from pkg_resources import resource_string
from flask import request, jsonify
from brew import app, controller, machine, mongo
@app.route('/api/recipe', methods=['POST'])
def create_recipe():
schema = resource_string(__name__, 'data/recipe.schema.json').decode('utf-8')
... | import json
import time
import jsonschema
from pkg_resources import resource_string
from flask import request, jsonify
from brew import app, controller, machine, mongo
@app.route('/api/recipe', methods=['POST'])
def create_recipe():
schema = resource_string(__name__, 'data/recipe.schema.json').decode('utf-8')
... | Save malts for future reference | Save malts for future reference
| Python | mit | brewpeople/brewmeister,brewpeople/brewmeister,brewpeople/brewmeister | import json
import time
import jsonschema
from pkg_resources import resource_string
from flask import request, jsonify
from brew import app, controller, machine, mongo
@app.route('/api/recipe', methods=['POST'])
def create_recipe():
schema = resource_string(__name__, 'data/recipe.schema.json').decode('utf-8')
... | import json
import time
import jsonschema
from pkg_resources import resource_string
from flask import request, jsonify
from brew import app, controller, machine, mongo
@app.route('/api/recipe', methods=['POST'])
def create_recipe():
schema = resource_string(__name__, 'data/recipe.schema.json').decode('utf-8')
... | <commit_before>import json
import time
import jsonschema
from pkg_resources import resource_string
from flask import request, jsonify
from brew import app, controller, machine, mongo
@app.route('/api/recipe', methods=['POST'])
def create_recipe():
schema = resource_string(__name__, 'data/recipe.schema.json').deco... | import json
import time
import jsonschema
from pkg_resources import resource_string
from flask import request, jsonify
from brew import app, controller, machine, mongo
@app.route('/api/recipe', methods=['POST'])
def create_recipe():
schema = resource_string(__name__, 'data/recipe.schema.json').decode('utf-8')
... | import json
import time
import jsonschema
from pkg_resources import resource_string
from flask import request, jsonify
from brew import app, controller, machine, mongo
@app.route('/api/recipe', methods=['POST'])
def create_recipe():
schema = resource_string(__name__, 'data/recipe.schema.json').decode('utf-8')
... | <commit_before>import json
import time
import jsonschema
from pkg_resources import resource_string
from flask import request, jsonify
from brew import app, controller, machine, mongo
@app.route('/api/recipe', methods=['POST'])
def create_recipe():
schema = resource_string(__name__, 'data/recipe.schema.json').deco... |
344457b498f12dfceb8e687b326ba68064d6bda6 | run-tests.py | run-tests.py |
import os
PROJECT_DIR = os.path.abspath(os.path.dirname( __file__ ))
SRC_DIR = os.path.join(PROJECT_DIR, "src")
TEST_DIR = os.path.join(PROJECT_DIR, "test")
def runtestdir(subdir):
#cwd = os.getcwd()
#subdir = os.path.join(cwd, subdir)
entries = os.listdir(subdir)
total = 0
errs = 0
... |
import os, sys
PROJECT_DIR = os.path.abspath(os.path.dirname( __file__ ))
SRC_DIR = os.path.join(PROJECT_DIR, "src")
TEST_DIR = os.path.join(PROJECT_DIR, "test")
def runtestdir(subdir):
entries = os.listdir(subdir)
total = 0
errs = 0
for f in entries:
if not f.endswith(".py"):
... | Test runner uses current python | Test runner uses current python | Python | mit | divtxt/binder |
import os
PROJECT_DIR = os.path.abspath(os.path.dirname( __file__ ))
SRC_DIR = os.path.join(PROJECT_DIR, "src")
TEST_DIR = os.path.join(PROJECT_DIR, "test")
def runtestdir(subdir):
#cwd = os.getcwd()
#subdir = os.path.join(cwd, subdir)
entries = os.listdir(subdir)
total = 0
errs = 0
... |
import os, sys
PROJECT_DIR = os.path.abspath(os.path.dirname( __file__ ))
SRC_DIR = os.path.join(PROJECT_DIR, "src")
TEST_DIR = os.path.join(PROJECT_DIR, "test")
def runtestdir(subdir):
entries = os.listdir(subdir)
total = 0
errs = 0
for f in entries:
if not f.endswith(".py"):
... | <commit_before>
import os
PROJECT_DIR = os.path.abspath(os.path.dirname( __file__ ))
SRC_DIR = os.path.join(PROJECT_DIR, "src")
TEST_DIR = os.path.join(PROJECT_DIR, "test")
def runtestdir(subdir):
#cwd = os.getcwd()
#subdir = os.path.join(cwd, subdir)
entries = os.listdir(subdir)
total = 0
... |
import os, sys
PROJECT_DIR = os.path.abspath(os.path.dirname( __file__ ))
SRC_DIR = os.path.join(PROJECT_DIR, "src")
TEST_DIR = os.path.join(PROJECT_DIR, "test")
def runtestdir(subdir):
entries = os.listdir(subdir)
total = 0
errs = 0
for f in entries:
if not f.endswith(".py"):
... |
import os
PROJECT_DIR = os.path.abspath(os.path.dirname( __file__ ))
SRC_DIR = os.path.join(PROJECT_DIR, "src")
TEST_DIR = os.path.join(PROJECT_DIR, "test")
def runtestdir(subdir):
#cwd = os.getcwd()
#subdir = os.path.join(cwd, subdir)
entries = os.listdir(subdir)
total = 0
errs = 0
... | <commit_before>
import os
PROJECT_DIR = os.path.abspath(os.path.dirname( __file__ ))
SRC_DIR = os.path.join(PROJECT_DIR, "src")
TEST_DIR = os.path.join(PROJECT_DIR, "test")
def runtestdir(subdir):
#cwd = os.getcwd()
#subdir = os.path.join(cwd, subdir)
entries = os.listdir(subdir)
total = 0
... |
2e9d4d4b43a59b65dde1bb9196786f88eeb6edf0 | lib/game_states/select_state_sfx.py | lib/game_states/select_state_sfx.py | from pygame.mixer import Sound
class SelectStateSFX(object):
"""Plays sound effects that are used by both the Character Select
State and the Stage Select State.
Class Constants:
SCROLL_PATH: A String for the file path to the scroll items
sound effect.
CONFIRM_PATH: A String for... | from pygame.mixer import Sound
class SelectStateSFX(object):
"""Plays sound effects that are used by both the Character Select
State and the Stage Select State.
Class Constants:
SCROLL_PATH: A String for the file path to the scroll items
sound effect.
CONFIRM_PATH: A String fo... | Add space between import and class declaration | Add space between import and class declaration
All heil PEP.
| Python | unlicense | MarquisLP/Sidewalk-Champion | from pygame.mixer import Sound
class SelectStateSFX(object):
"""Plays sound effects that are used by both the Character Select
State and the Stage Select State.
Class Constants:
SCROLL_PATH: A String for the file path to the scroll items
sound effect.
CONFIRM_PATH: A String for... | from pygame.mixer import Sound
class SelectStateSFX(object):
"""Plays sound effects that are used by both the Character Select
State and the Stage Select State.
Class Constants:
SCROLL_PATH: A String for the file path to the scroll items
sound effect.
CONFIRM_PATH: A String fo... | <commit_before>from pygame.mixer import Sound
class SelectStateSFX(object):
"""Plays sound effects that are used by both the Character Select
State and the Stage Select State.
Class Constants:
SCROLL_PATH: A String for the file path to the scroll items
sound effect.
CONFIRM_PAT... | from pygame.mixer import Sound
class SelectStateSFX(object):
"""Plays sound effects that are used by both the Character Select
State and the Stage Select State.
Class Constants:
SCROLL_PATH: A String for the file path to the scroll items
sound effect.
CONFIRM_PATH: A String fo... | from pygame.mixer import Sound
class SelectStateSFX(object):
"""Plays sound effects that are used by both the Character Select
State and the Stage Select State.
Class Constants:
SCROLL_PATH: A String for the file path to the scroll items
sound effect.
CONFIRM_PATH: A String for... | <commit_before>from pygame.mixer import Sound
class SelectStateSFX(object):
"""Plays sound effects that are used by both the Character Select
State and the Stage Select State.
Class Constants:
SCROLL_PATH: A String for the file path to the scroll items
sound effect.
CONFIRM_PAT... |
e5f00a6a5e71d8f5fe98547732f4c9e15a3efc1e | src/nodeconductor_paas_oracle/apps.py | src/nodeconductor_paas_oracle/apps.py | from django.apps import AppConfig
class OracleConfig(AppConfig):
name = 'nodeconductor_paas_oracle'
verbose_name = 'Oracle'
service_name = 'Oracle'
def ready(self):
from nodeconductor.structure import SupportedServices
from .backend import OracleBackend
SupportedServices.regis... | from django.apps import AppConfig
class OracleConfig(AppConfig):
name = 'nodeconductor_paas_oracle'
verbose_name = 'Oracle'
service_name = 'Oracle'
def ready(self):
from nodeconductor.structure import SupportedServices
from nodeconductor.cost_tracking import CostTrackingRegister
... | Add registration to cost tracking | Add registration to cost tracking
| Python | mit | opennode/nodeconductor-paas-oracle | from django.apps import AppConfig
class OracleConfig(AppConfig):
name = 'nodeconductor_paas_oracle'
verbose_name = 'Oracle'
service_name = 'Oracle'
def ready(self):
from nodeconductor.structure import SupportedServices
from .backend import OracleBackend
SupportedServices.regis... | from django.apps import AppConfig
class OracleConfig(AppConfig):
name = 'nodeconductor_paas_oracle'
verbose_name = 'Oracle'
service_name = 'Oracle'
def ready(self):
from nodeconductor.structure import SupportedServices
from nodeconductor.cost_tracking import CostTrackingRegister
... | <commit_before>from django.apps import AppConfig
class OracleConfig(AppConfig):
name = 'nodeconductor_paas_oracle'
verbose_name = 'Oracle'
service_name = 'Oracle'
def ready(self):
from nodeconductor.structure import SupportedServices
from .backend import OracleBackend
Supporte... | from django.apps import AppConfig
class OracleConfig(AppConfig):
name = 'nodeconductor_paas_oracle'
verbose_name = 'Oracle'
service_name = 'Oracle'
def ready(self):
from nodeconductor.structure import SupportedServices
from nodeconductor.cost_tracking import CostTrackingRegister
... | from django.apps import AppConfig
class OracleConfig(AppConfig):
name = 'nodeconductor_paas_oracle'
verbose_name = 'Oracle'
service_name = 'Oracle'
def ready(self):
from nodeconductor.structure import SupportedServices
from .backend import OracleBackend
SupportedServices.regis... | <commit_before>from django.apps import AppConfig
class OracleConfig(AppConfig):
name = 'nodeconductor_paas_oracle'
verbose_name = 'Oracle'
service_name = 'Oracle'
def ready(self):
from nodeconductor.structure import SupportedServices
from .backend import OracleBackend
Supporte... |
bf88702b9a4d76fd3fc0cd3dbcf43d71d7259957 | sweettooth/auth/context_processors.py | sweettooth/auth/context_processors.py |
from auth import forms
def login_form(request):
if request.user.is_authenticated():
return dict()
return dict(login_popup_form=forms.InlineAuthenticationForm)
|
from auth import forms
def login_form(request):
if request.user.is_authenticated():
return dict()
return dict(login_popup_form=forms.InlineAuthenticationForm())
| Fix a silly typo in the login popup form | Fix a silly typo in the login popup form
I have no idea why Django was OK with this...
| Python | agpl-3.0 | magcius/sweettooth,GNOME/extensions-web,GNOME/extensions-web,GNOME/extensions-web,magcius/sweettooth,GNOME/extensions-web |
from auth import forms
def login_form(request):
if request.user.is_authenticated():
return dict()
return dict(login_popup_form=forms.InlineAuthenticationForm)
Fix a silly typo in the login popup form
I have no idea why Django was OK with this... |
from auth import forms
def login_form(request):
if request.user.is_authenticated():
return dict()
return dict(login_popup_form=forms.InlineAuthenticationForm())
| <commit_before>
from auth import forms
def login_form(request):
if request.user.is_authenticated():
return dict()
return dict(login_popup_form=forms.InlineAuthenticationForm)
<commit_msg>Fix a silly typo in the login popup form
I have no idea why Django was OK with this...<commit_after> |
from auth import forms
def login_form(request):
if request.user.is_authenticated():
return dict()
return dict(login_popup_form=forms.InlineAuthenticationForm())
|
from auth import forms
def login_form(request):
if request.user.is_authenticated():
return dict()
return dict(login_popup_form=forms.InlineAuthenticationForm)
Fix a silly typo in the login popup form
I have no idea why Django was OK with this...
from auth import forms
def login_form(request):
i... | <commit_before>
from auth import forms
def login_form(request):
if request.user.is_authenticated():
return dict()
return dict(login_popup_form=forms.InlineAuthenticationForm)
<commit_msg>Fix a silly typo in the login popup form
I have no idea why Django was OK with this...<commit_after>
from auth imp... |
d3438e85ab4158d769b0662729a8aff7d143971a | csv_ical/tests/test_convert.py | csv_ical/tests/test_convert.py | import unittest
from csv_ical import convert
class TestConvert(unittest.TestCase):
def setUp(self):
self.convert = convert.Convert()
def test_generate_configs(self):
self.convert._generate_configs_from_default()
| import datetime
import os
import tempfile
import unittest
from syspath import get_git_root
from csv_ical import convert
EXAMPLE_ICS = os.path.join(get_git_root(), 'examples', 'arrive.ics')
EXAMPLE_CSV = os.path.join(get_git_root(), 'examples', 'BostonCruiseTerminalSchedule.csv')
CSV_CONFIGS = {
'HEADER_COLUMNS_T... | Add tests for all methods | Add tests for all methods
| Python | mit | albertyw/csv-to-ical | import unittest
from csv_ical import convert
class TestConvert(unittest.TestCase):
def setUp(self):
self.convert = convert.Convert()
def test_generate_configs(self):
self.convert._generate_configs_from_default()
Add tests for all methods | import datetime
import os
import tempfile
import unittest
from syspath import get_git_root
from csv_ical import convert
EXAMPLE_ICS = os.path.join(get_git_root(), 'examples', 'arrive.ics')
EXAMPLE_CSV = os.path.join(get_git_root(), 'examples', 'BostonCruiseTerminalSchedule.csv')
CSV_CONFIGS = {
'HEADER_COLUMNS_T... | <commit_before>import unittest
from csv_ical import convert
class TestConvert(unittest.TestCase):
def setUp(self):
self.convert = convert.Convert()
def test_generate_configs(self):
self.convert._generate_configs_from_default()
<commit_msg>Add tests for all methods<commit_after> | import datetime
import os
import tempfile
import unittest
from syspath import get_git_root
from csv_ical import convert
EXAMPLE_ICS = os.path.join(get_git_root(), 'examples', 'arrive.ics')
EXAMPLE_CSV = os.path.join(get_git_root(), 'examples', 'BostonCruiseTerminalSchedule.csv')
CSV_CONFIGS = {
'HEADER_COLUMNS_T... | import unittest
from csv_ical import convert
class TestConvert(unittest.TestCase):
def setUp(self):
self.convert = convert.Convert()
def test_generate_configs(self):
self.convert._generate_configs_from_default()
Add tests for all methodsimport datetime
import os
import tempfile
import unitte... | <commit_before>import unittest
from csv_ical import convert
class TestConvert(unittest.TestCase):
def setUp(self):
self.convert = convert.Convert()
def test_generate_configs(self):
self.convert._generate_configs_from_default()
<commit_msg>Add tests for all methods<commit_after>import datetim... |
f5fd74dac54f657cc64fdaa0b838b00b72ce5ee6 | dev/make-release-notes.py | dev/make-release-notes.py | #! /usr/bin/env python3
import re
import sys
_, VERSION, CHANGELOG, LIST = sys.argv
HEADER_REGEX = fr"# {VERSION} \(\d\d\d\d-\d\d-\d\d\)\n"
notes_list = []
def add_to_release_notes(line):
assert line.endswith("."), line
notes_list.append(f"* {line}\n")
with open(CHANGELOG) as f:
first_line = next(f)
... | #! /usr/bin/env python3
import re
import sys
_, VERSION, CHANGELOG, LIST = sys.argv
HEADER_REGEX = fr"# {VERSION} \(\d\d\d\d-\d\d-\d\d\)\n"
notes_list = []
def add_to_release_notes(line):
assert line.endswith("."), line
with open(CHANGELOG) as f:
first_line = next(f)
if not re.match(HEADER_REGEX, fi... | Allow line breaks in changelog. | Allow line breaks in changelog.
| Python | mit | jendrikseipp/vulture,jendrikseipp/vulture | #! /usr/bin/env python3
import re
import sys
_, VERSION, CHANGELOG, LIST = sys.argv
HEADER_REGEX = fr"# {VERSION} \(\d\d\d\d-\d\d-\d\d\)\n"
notes_list = []
def add_to_release_notes(line):
assert line.endswith("."), line
notes_list.append(f"* {line}\n")
with open(CHANGELOG) as f:
first_line = next(f)
... | #! /usr/bin/env python3
import re
import sys
_, VERSION, CHANGELOG, LIST = sys.argv
HEADER_REGEX = fr"# {VERSION} \(\d\d\d\d-\d\d-\d\d\)\n"
notes_list = []
def add_to_release_notes(line):
assert line.endswith("."), line
with open(CHANGELOG) as f:
first_line = next(f)
if not re.match(HEADER_REGEX, fi... | <commit_before>#! /usr/bin/env python3
import re
import sys
_, VERSION, CHANGELOG, LIST = sys.argv
HEADER_REGEX = fr"# {VERSION} \(\d\d\d\d-\d\d-\d\d\)\n"
notes_list = []
def add_to_release_notes(line):
assert line.endswith("."), line
notes_list.append(f"* {line}\n")
with open(CHANGELOG) as f:
first_... | #! /usr/bin/env python3
import re
import sys
_, VERSION, CHANGELOG, LIST = sys.argv
HEADER_REGEX = fr"# {VERSION} \(\d\d\d\d-\d\d-\d\d\)\n"
notes_list = []
def add_to_release_notes(line):
assert line.endswith("."), line
with open(CHANGELOG) as f:
first_line = next(f)
if not re.match(HEADER_REGEX, fi... | #! /usr/bin/env python3
import re
import sys
_, VERSION, CHANGELOG, LIST = sys.argv
HEADER_REGEX = fr"# {VERSION} \(\d\d\d\d-\d\d-\d\d\)\n"
notes_list = []
def add_to_release_notes(line):
assert line.endswith("."), line
notes_list.append(f"* {line}\n")
with open(CHANGELOG) as f:
first_line = next(f)
... | <commit_before>#! /usr/bin/env python3
import re
import sys
_, VERSION, CHANGELOG, LIST = sys.argv
HEADER_REGEX = fr"# {VERSION} \(\d\d\d\d-\d\d-\d\d\)\n"
notes_list = []
def add_to_release_notes(line):
assert line.endswith("."), line
notes_list.append(f"* {line}\n")
with open(CHANGELOG) as f:
first_... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.