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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
ec35b758d76bd2501f407819451306a20800f874 | setup.py | setup.py | from setuptools import setup, find_packages
setup(
name="cybox",
version="1.0b1",
author="CybOX Project, MITRE Corporation",
author_email="[email protected]",
description="An API for parsing and generating CybOX content.",
url="http://cybox.mitre.org",
packages=find_packages(),
install_re... | from setuptools import setup, find_packages
setup(
name="cybox",
version="1.0.0b1",
author="CybOX Project, MITRE Corporation",
author_email="[email protected]",
description="A Python library for parsing and generating CybOX content.",
url="http://cybox.mitre.org",
packages=find_packages(),
... | Prepare to release on PyPI | Prepare to release on PyPI
[ci skip]
| Python | bsd-3-clause | CybOXProject/python-cybox | from setuptools import setup, find_packages
setup(
name="cybox",
version="1.0b1",
author="CybOX Project, MITRE Corporation",
author_email="[email protected]",
description="An API for parsing and generating CybOX content.",
url="http://cybox.mitre.org",
packages=find_packages(),
install_re... | from setuptools import setup, find_packages
setup(
name="cybox",
version="1.0.0b1",
author="CybOX Project, MITRE Corporation",
author_email="[email protected]",
description="A Python library for parsing and generating CybOX content.",
url="http://cybox.mitre.org",
packages=find_packages(),
... | <commit_before>from setuptools import setup, find_packages
setup(
name="cybox",
version="1.0b1",
author="CybOX Project, MITRE Corporation",
author_email="[email protected]",
description="An API for parsing and generating CybOX content.",
url="http://cybox.mitre.org",
packages=find_packages(),... | from setuptools import setup, find_packages
setup(
name="cybox",
version="1.0.0b1",
author="CybOX Project, MITRE Corporation",
author_email="[email protected]",
description="A Python library for parsing and generating CybOX content.",
url="http://cybox.mitre.org",
packages=find_packages(),
... | from setuptools import setup, find_packages
setup(
name="cybox",
version="1.0b1",
author="CybOX Project, MITRE Corporation",
author_email="[email protected]",
description="An API for parsing and generating CybOX content.",
url="http://cybox.mitre.org",
packages=find_packages(),
install_re... | <commit_before>from setuptools import setup, find_packages
setup(
name="cybox",
version="1.0b1",
author="CybOX Project, MITRE Corporation",
author_email="[email protected]",
description="An API for parsing and generating CybOX content.",
url="http://cybox.mitre.org",
packages=find_packages(),... |
9382715f276e91e9ad08de1aef1c1be5cc434359 | setup.py | setup.py | from setuptools import setup, find_packages
setup(
name="taxii-client",
version="0.0.2",
url="https://github.com/Intelworks/taxii-client/",
author="Intelworks",
author_email="[email protected]",
packages=find_packages(),
scripts=[
'bin/taxii-collections',
'bin/taxii... | import os
from setuptools import setup, find_packages
def here(*path):
return os.path.join(os.path.dirname(__file__), *path)
with open(here('README.rst')) as fp:
long_description = fp.read()
setup(
name="taxii-client",
description="Client for interacting with TAXII servers",
long_description=lon... | Include description and long description (README) in package metadata | Include description and long description (README) in package metadata
| Python | bsd-3-clause | Intelworks/cabby | from setuptools import setup, find_packages
setup(
name="taxii-client",
version="0.0.2",
url="https://github.com/Intelworks/taxii-client/",
author="Intelworks",
author_email="[email protected]",
packages=find_packages(),
scripts=[
'bin/taxii-collections',
'bin/taxii... | import os
from setuptools import setup, find_packages
def here(*path):
return os.path.join(os.path.dirname(__file__), *path)
with open(here('README.rst')) as fp:
long_description = fp.read()
setup(
name="taxii-client",
description="Client for interacting with TAXII servers",
long_description=lon... | <commit_before>from setuptools import setup, find_packages
setup(
name="taxii-client",
version="0.0.2",
url="https://github.com/Intelworks/taxii-client/",
author="Intelworks",
author_email="[email protected]",
packages=find_packages(),
scripts=[
'bin/taxii-collections',
... | import os
from setuptools import setup, find_packages
def here(*path):
return os.path.join(os.path.dirname(__file__), *path)
with open(here('README.rst')) as fp:
long_description = fp.read()
setup(
name="taxii-client",
description="Client for interacting with TAXII servers",
long_description=lon... | from setuptools import setup, find_packages
setup(
name="taxii-client",
version="0.0.2",
url="https://github.com/Intelworks/taxii-client/",
author="Intelworks",
author_email="[email protected]",
packages=find_packages(),
scripts=[
'bin/taxii-collections',
'bin/taxii... | <commit_before>from setuptools import setup, find_packages
setup(
name="taxii-client",
version="0.0.2",
url="https://github.com/Intelworks/taxii-client/",
author="Intelworks",
author_email="[email protected]",
packages=find_packages(),
scripts=[
'bin/taxii-collections',
... |
361fa65dbbec06bd7147a01329b0c783e69824be | setup.py | setup.py | from __future__ import print_function
import sys
from setuptools import setup
if sys.version_info < (3, 2):
print('ERROR: jump-consistent-hash requires Python version 3.2 or newer.',
file=sys.stderr)
sys.exit(1)
setup(name='jump_consistent_hash',
version='1.0.3',
description='Impleme... | from __future__ import print_function
import sys
from setuptools import setup
if sys.version_info < (3, 2):
print('ERROR: jump-consistent-hash requires Python version 3.2 or newer.',
file=sys.stderr)
sys.exit(1)
setup(name='jump_consistent_hash',
version='1.0.3',
description='Impleme... | Add 'jump consistent hash' keyword. | Add 'jump consistent hash' keyword.
| Python | mit | renstrom/python-jump-consistent-hash,renstrom/python-jump-consistent-hash,renstrom/python-jump-consistent-hash | from __future__ import print_function
import sys
from setuptools import setup
if sys.version_info < (3, 2):
print('ERROR: jump-consistent-hash requires Python version 3.2 or newer.',
file=sys.stderr)
sys.exit(1)
setup(name='jump_consistent_hash',
version='1.0.3',
description='Impleme... | from __future__ import print_function
import sys
from setuptools import setup
if sys.version_info < (3, 2):
print('ERROR: jump-consistent-hash requires Python version 3.2 or newer.',
file=sys.stderr)
sys.exit(1)
setup(name='jump_consistent_hash',
version='1.0.3',
description='Impleme... | <commit_before>from __future__ import print_function
import sys
from setuptools import setup
if sys.version_info < (3, 2):
print('ERROR: jump-consistent-hash requires Python version 3.2 or newer.',
file=sys.stderr)
sys.exit(1)
setup(name='jump_consistent_hash',
version='1.0.3',
descr... | from __future__ import print_function
import sys
from setuptools import setup
if sys.version_info < (3, 2):
print('ERROR: jump-consistent-hash requires Python version 3.2 or newer.',
file=sys.stderr)
sys.exit(1)
setup(name='jump_consistent_hash',
version='1.0.3',
description='Impleme... | from __future__ import print_function
import sys
from setuptools import setup
if sys.version_info < (3, 2):
print('ERROR: jump-consistent-hash requires Python version 3.2 or newer.',
file=sys.stderr)
sys.exit(1)
setup(name='jump_consistent_hash',
version='1.0.3',
description='Impleme... | <commit_before>from __future__ import print_function
import sys
from setuptools import setup
if sys.version_info < (3, 2):
print('ERROR: jump-consistent-hash requires Python version 3.2 or newer.',
file=sys.stderr)
sys.exit(1)
setup(name='jump_consistent_hash',
version='1.0.3',
descr... |
110340c911b84594358a68f7a5a8fb4e9cb16c51 | setup.py | setup.py | #!/usr/bin/env python
from setuptools import setup, find_packages
required_modules = [
"simplejson",
"web.py",
]
readme = """
Web.py Helpers
"""
setup(
name="webpy_helpers",
version="0.0.2",
description="",
author="Christopher H. Casebeer",
author_email="",
url="https://github.com/casebeer/webpy_helpers",... | #!/usr/bin/env python
from setuptools import setup, find_packages
required_modules = [
"simplejson",
"web.py",
]
readme = """
Web.py Helpers
"""
setup(
name="webpy_helpers",
version="0.0.2",
description="",
author="Christopher H. Casebeer",
author_email="",
url="https://github.com/casebeer/webpy_helpers",... | Add paste requirement for testing (for web.py) | Add paste requirement for testing (for web.py)
| Python | bsd-2-clause | casebeer/webpy_helpers | #!/usr/bin/env python
from setuptools import setup, find_packages
required_modules = [
"simplejson",
"web.py",
]
readme = """
Web.py Helpers
"""
setup(
name="webpy_helpers",
version="0.0.2",
description="",
author="Christopher H. Casebeer",
author_email="",
url="https://github.com/casebeer/webpy_helpers",... | #!/usr/bin/env python
from setuptools import setup, find_packages
required_modules = [
"simplejson",
"web.py",
]
readme = """
Web.py Helpers
"""
setup(
name="webpy_helpers",
version="0.0.2",
description="",
author="Christopher H. Casebeer",
author_email="",
url="https://github.com/casebeer/webpy_helpers",... | <commit_before>#!/usr/bin/env python
from setuptools import setup, find_packages
required_modules = [
"simplejson",
"web.py",
]
readme = """
Web.py Helpers
"""
setup(
name="webpy_helpers",
version="0.0.2",
description="",
author="Christopher H. Casebeer",
author_email="",
url="https://github.com/casebeer/... | #!/usr/bin/env python
from setuptools import setup, find_packages
required_modules = [
"simplejson",
"web.py",
]
readme = """
Web.py Helpers
"""
setup(
name="webpy_helpers",
version="0.0.2",
description="",
author="Christopher H. Casebeer",
author_email="",
url="https://github.com/casebeer/webpy_helpers",... | #!/usr/bin/env python
from setuptools import setup, find_packages
required_modules = [
"simplejson",
"web.py",
]
readme = """
Web.py Helpers
"""
setup(
name="webpy_helpers",
version="0.0.2",
description="",
author="Christopher H. Casebeer",
author_email="",
url="https://github.com/casebeer/webpy_helpers",... | <commit_before>#!/usr/bin/env python
from setuptools import setup, find_packages
required_modules = [
"simplejson",
"web.py",
]
readme = """
Web.py Helpers
"""
setup(
name="webpy_helpers",
version="0.0.2",
description="",
author="Christopher H. Casebeer",
author_email="",
url="https://github.com/casebeer/... |
f47e7790c0b61f6191615a4e4a341bc0a172b388 | setup.py | setup.py | # -*- coding: utf-8 -*-
import io
from setuptools import setup, find_packages
setup(
name='django-pipeline',
version='1.5.2',
description='Pipeline is an asset packaging library for Django.',
long_description=io.open('README.rst', encoding='utf-8').read() + '\n\n' +
io.open('HISTORY.rst', enc... | # -*- coding: utf-8 -*-
import io
from setuptools import setup, find_packages
install_requires = []
try:
from concurrent import futures
except ImportError:
futures = None
install_requires.append('futures>=2.1.3')
setup(
name='django-pipeline',
version='1.5.2',
description='Pipeline is an asset... | Remove useless requirement on Python 3.2+ | Remove useless requirement on Python 3.2+
| Python | mit | d9pouces/django-pipeline,d9pouces/django-pipeline,d9pouces/django-pipeline | # -*- coding: utf-8 -*-
import io
from setuptools import setup, find_packages
setup(
name='django-pipeline',
version='1.5.2',
description='Pipeline is an asset packaging library for Django.',
long_description=io.open('README.rst', encoding='utf-8').read() + '\n\n' +
io.open('HISTORY.rst', enc... | # -*- coding: utf-8 -*-
import io
from setuptools import setup, find_packages
install_requires = []
try:
from concurrent import futures
except ImportError:
futures = None
install_requires.append('futures>=2.1.3')
setup(
name='django-pipeline',
version='1.5.2',
description='Pipeline is an asset... | <commit_before># -*- coding: utf-8 -*-
import io
from setuptools import setup, find_packages
setup(
name='django-pipeline',
version='1.5.2',
description='Pipeline is an asset packaging library for Django.',
long_description=io.open('README.rst', encoding='utf-8').read() + '\n\n' +
io.open('HI... | # -*- coding: utf-8 -*-
import io
from setuptools import setup, find_packages
install_requires = []
try:
from concurrent import futures
except ImportError:
futures = None
install_requires.append('futures>=2.1.3')
setup(
name='django-pipeline',
version='1.5.2',
description='Pipeline is an asset... | # -*- coding: utf-8 -*-
import io
from setuptools import setup, find_packages
setup(
name='django-pipeline',
version='1.5.2',
description='Pipeline is an asset packaging library for Django.',
long_description=io.open('README.rst', encoding='utf-8').read() + '\n\n' +
io.open('HISTORY.rst', enc... | <commit_before># -*- coding: utf-8 -*-
import io
from setuptools import setup, find_packages
setup(
name='django-pipeline',
version='1.5.2',
description='Pipeline is an asset packaging library for Django.',
long_description=io.open('README.rst', encoding='utf-8').read() + '\n\n' +
io.open('HI... |
1ee442e79df7c7a79076460dea930bbd7d87b00a | setup.py | setup.py | from distutils.core import setup
# Keeping all Python code for package in src directory
setup(name='quantitation',
url='http://www.awblocker.com',
version='0.1',
description='Absolute quantitation for LC/MSMS proteomics via MCMC',
author='Alexander W Blocker',
author_email='ablocker@gmai... | from distutils.core import setup
# Keeping all Python code for package in src directory
setup(name='quantitation',
url='http://www.awblocker.com',
version='0.1',
description='Absolute quantitation for LC/MSMS proteomics via MCMC',
author='Alexander W Blocker',
author_email='ablocker@gmai... | Add requires for development use, at least | Add requires for development use, at least
| Python | bsd-3-clause | awblocker/quantitation,awblocker/quantitation,awblocker/quantitation | from distutils.core import setup
# Keeping all Python code for package in src directory
setup(name='quantitation',
url='http://www.awblocker.com',
version='0.1',
description='Absolute quantitation for LC/MSMS proteomics via MCMC',
author='Alexander W Blocker',
author_email='ablocker@gmai... | from distutils.core import setup
# Keeping all Python code for package in src directory
setup(name='quantitation',
url='http://www.awblocker.com',
version='0.1',
description='Absolute quantitation for LC/MSMS proteomics via MCMC',
author='Alexander W Blocker',
author_email='ablocker@gmai... | <commit_before>from distutils.core import setup
# Keeping all Python code for package in src directory
setup(name='quantitation',
url='http://www.awblocker.com',
version='0.1',
description='Absolute quantitation for LC/MSMS proteomics via MCMC',
author='Alexander W Blocker',
author_email... | from distutils.core import setup
# Keeping all Python code for package in src directory
setup(name='quantitation',
url='http://www.awblocker.com',
version='0.1',
description='Absolute quantitation for LC/MSMS proteomics via MCMC',
author='Alexander W Blocker',
author_email='ablocker@gmai... | from distutils.core import setup
# Keeping all Python code for package in src directory
setup(name='quantitation',
url='http://www.awblocker.com',
version='0.1',
description='Absolute quantitation for LC/MSMS proteomics via MCMC',
author='Alexander W Blocker',
author_email='ablocker@gmai... | <commit_before>from distutils.core import setup
# Keeping all Python code for package in src directory
setup(name='quantitation',
url='http://www.awblocker.com',
version='0.1',
description='Absolute quantitation for LC/MSMS proteomics via MCMC',
author='Alexander W Blocker',
author_email... |
fbcc9b1332b9977a790b82b8cf29a4c241de9650 | setup.py | setup.py | from setuptools import setup
setup(
name='flaws',
version='0.0.1',
author='Alexander Schepanovski',
author_email='[email protected]',
description='Finds flaws in your python code',
long_description=open('README.rst').read(),
url='http://github.com/Suor/flaws',
license='BSD',
py_m... | from setuptools import setup
setup(
name='flaws',
version='0.0.1',
author='Alexander Schepanovski',
author_email='[email protected]',
description='Finds flaws in your python code',
long_description=open('README.rst').read(),
url='http://github.com/Suor/flaws',
license='BSD',
pack... | Remove astpp from installation modules | Remove astpp from installation modules
| Python | bsd-2-clause | Suor/flaws | from setuptools import setup
setup(
name='flaws',
version='0.0.1',
author='Alexander Schepanovski',
author_email='[email protected]',
description='Finds flaws in your python code',
long_description=open('README.rst').read(),
url='http://github.com/Suor/flaws',
license='BSD',
py_m... | from setuptools import setup
setup(
name='flaws',
version='0.0.1',
author='Alexander Schepanovski',
author_email='[email protected]',
description='Finds flaws in your python code',
long_description=open('README.rst').read(),
url='http://github.com/Suor/flaws',
license='BSD',
pack... | <commit_before>from setuptools import setup
setup(
name='flaws',
version='0.0.1',
author='Alexander Schepanovski',
author_email='[email protected]',
description='Finds flaws in your python code',
long_description=open('README.rst').read(),
url='http://github.com/Suor/flaws',
license='... | from setuptools import setup
setup(
name='flaws',
version='0.0.1',
author='Alexander Schepanovski',
author_email='[email protected]',
description='Finds flaws in your python code',
long_description=open('README.rst').read(),
url='http://github.com/Suor/flaws',
license='BSD',
pack... | from setuptools import setup
setup(
name='flaws',
version='0.0.1',
author='Alexander Schepanovski',
author_email='[email protected]',
description='Finds flaws in your python code',
long_description=open('README.rst').read(),
url='http://github.com/Suor/flaws',
license='BSD',
py_m... | <commit_before>from setuptools import setup
setup(
name='flaws',
version='0.0.1',
author='Alexander Schepanovski',
author_email='[email protected]',
description='Finds flaws in your python code',
long_description=open('README.rst').read(),
url='http://github.com/Suor/flaws',
license='... |
7f20f67d70ef4351d838621191b3447893b604d3 | simplemooc/courses/decorators.py | simplemooc/courses/decorators.py | from django.shortcuts import redirect, get_object_or_404
from django.contrib import messages
from .models import Course, Enrollment
def enrollment_required(view_func):
def _wrapper(request, *args, **kwargs):
slug = kwargs['slug']
course = get_object_or_404(Course, slug=slug)
has_permissio... | from django.shortcuts import redirect
from django.contrib import messages
from django.contrib.contenttypes.models import ContentType
from .models import Course, CourseTRB, Enrollment
from .utils import get_course_by_instance
def enrollment_required(view_func):
def _wrapper(request, *args, **kwargs):
slug... | Update decorator to work with content_type relation | Update decorator to work with content_type relation
| Python | mit | mazulo/simplemooc,mazulo/simplemooc | from django.shortcuts import redirect, get_object_or_404
from django.contrib import messages
from .models import Course, Enrollment
def enrollment_required(view_func):
def _wrapper(request, *args, **kwargs):
slug = kwargs['slug']
course = get_object_or_404(Course, slug=slug)
has_permissio... | from django.shortcuts import redirect
from django.contrib import messages
from django.contrib.contenttypes.models import ContentType
from .models import Course, CourseTRB, Enrollment
from .utils import get_course_by_instance
def enrollment_required(view_func):
def _wrapper(request, *args, **kwargs):
slug... | <commit_before>from django.shortcuts import redirect, get_object_or_404
from django.contrib import messages
from .models import Course, Enrollment
def enrollment_required(view_func):
def _wrapper(request, *args, **kwargs):
slug = kwargs['slug']
course = get_object_or_404(Course, slug=slug)
... | from django.shortcuts import redirect
from django.contrib import messages
from django.contrib.contenttypes.models import ContentType
from .models import Course, CourseTRB, Enrollment
from .utils import get_course_by_instance
def enrollment_required(view_func):
def _wrapper(request, *args, **kwargs):
slug... | from django.shortcuts import redirect, get_object_or_404
from django.contrib import messages
from .models import Course, Enrollment
def enrollment_required(view_func):
def _wrapper(request, *args, **kwargs):
slug = kwargs['slug']
course = get_object_or_404(Course, slug=slug)
has_permissio... | <commit_before>from django.shortcuts import redirect, get_object_or_404
from django.contrib import messages
from .models import Course, Enrollment
def enrollment_required(view_func):
def _wrapper(request, *args, **kwargs):
slug = kwargs['slug']
course = get_object_or_404(Course, slug=slug)
... |
7c4b19fee9a50804921fc1084655d05ea3b7e89b | setup.py | setup.py | from distutils.core import setup
setup(
name='django-robots',
version=__import__('robots').__version__,
description='Robots exclusion application for Django, complementing Sitemaps.',
long_description=open('docs/overview.txt').read(),
author='Jannis Leidel',
author_email='[email protected]',
... | from distutils.core import setup
setup(
name='django-robots',
version=__import__('robots').__version__,
description='Robots exclusion application for Django, complementing Sitemaps.',
long_description=open('docs/overview.txt').read(),
author='Jannis Leidel',
author_email='[email protected]',
... | Remove download URL since Github doesn't get his act together. Damnit | Remove download URL since Github doesn't get his act together. Damnit
committer: Jannis Leidel <[email protected]>
--HG--
extra : convert_revision : 410200249f2c4981c9e0e8e5cf9334b0e17ec3d4
| Python | bsd-3-clause | amitu/django-robots,amitu/django-robots,jscott1971/django-robots,jazzband/django-robots,freakboy3742/django-robots,philippeowagner/django-robots,freakboy3742/django-robots,pbs/django-robots,pbs/django-robots,jscott1971/django-robots,pbs/django-robots,jezdez/django-robots,philippeowagner/django-robots,jezdez/django-robo... | from distutils.core import setup
setup(
name='django-robots',
version=__import__('robots').__version__,
description='Robots exclusion application for Django, complementing Sitemaps.',
long_description=open('docs/overview.txt').read(),
author='Jannis Leidel',
author_email='[email protected]',
... | from distutils.core import setup
setup(
name='django-robots',
version=__import__('robots').__version__,
description='Robots exclusion application for Django, complementing Sitemaps.',
long_description=open('docs/overview.txt').read(),
author='Jannis Leidel',
author_email='[email protected]',
... | <commit_before>from distutils.core import setup
setup(
name='django-robots',
version=__import__('robots').__version__,
description='Robots exclusion application for Django, complementing Sitemaps.',
long_description=open('docs/overview.txt').read(),
author='Jannis Leidel',
author_email='jannis@... | from distutils.core import setup
setup(
name='django-robots',
version=__import__('robots').__version__,
description='Robots exclusion application for Django, complementing Sitemaps.',
long_description=open('docs/overview.txt').read(),
author='Jannis Leidel',
author_email='[email protected]',
... | from distutils.core import setup
setup(
name='django-robots',
version=__import__('robots').__version__,
description='Robots exclusion application for Django, complementing Sitemaps.',
long_description=open('docs/overview.txt').read(),
author='Jannis Leidel',
author_email='[email protected]',
... | <commit_before>from distutils.core import setup
setup(
name='django-robots',
version=__import__('robots').__version__,
description='Robots exclusion application for Django, complementing Sitemaps.',
long_description=open('docs/overview.txt').read(),
author='Jannis Leidel',
author_email='jannis@... |
c22c6c3a0927f224cb9a396173292ec2a332a74e | setup.py | setup.py | from setuptools import setup
setup(
name='polygraph',
version='0.1.0',
description='Python library for defining GraphQL schemas',
url='https://github.com/yen223/polygraph/',
author='Wei Yen, Lee',
author_email='[email protected]',
license='MIT',
install_requires=[
'marshmallow>=... | from setuptools import setup
setup(
name='polygraph',
version='0.1.0',
description='Python library for defining GraphQL schemas',
url='https://github.com/yen223/polygraph/',
author='Wei Yen, Lee',
author_email='[email protected]',
license='MIT',
install_requires=[
'marshmallow>=... | Add isort as a development requirement | Add isort as a development requirement
| Python | mit | polygraph-python/polygraph | from setuptools import setup
setup(
name='polygraph',
version='0.1.0',
description='Python library for defining GraphQL schemas',
url='https://github.com/yen223/polygraph/',
author='Wei Yen, Lee',
author_email='[email protected]',
license='MIT',
install_requires=[
'marshmallow>=... | from setuptools import setup
setup(
name='polygraph',
version='0.1.0',
description='Python library for defining GraphQL schemas',
url='https://github.com/yen223/polygraph/',
author='Wei Yen, Lee',
author_email='[email protected]',
license='MIT',
install_requires=[
'marshmallow>=... | <commit_before>from setuptools import setup
setup(
name='polygraph',
version='0.1.0',
description='Python library for defining GraphQL schemas',
url='https://github.com/yen223/polygraph/',
author='Wei Yen, Lee',
author_email='[email protected]',
license='MIT',
install_requires=[
... | from setuptools import setup
setup(
name='polygraph',
version='0.1.0',
description='Python library for defining GraphQL schemas',
url='https://github.com/yen223/polygraph/',
author='Wei Yen, Lee',
author_email='[email protected]',
license='MIT',
install_requires=[
'marshmallow>=... | from setuptools import setup
setup(
name='polygraph',
version='0.1.0',
description='Python library for defining GraphQL schemas',
url='https://github.com/yen223/polygraph/',
author='Wei Yen, Lee',
author_email='[email protected]',
license='MIT',
install_requires=[
'marshmallow>=... | <commit_before>from setuptools import setup
setup(
name='polygraph',
version='0.1.0',
description='Python library for defining GraphQL schemas',
url='https://github.com/yen223/polygraph/',
author='Wei Yen, Lee',
author_email='[email protected]',
license='MIT',
install_requires=[
... |
72d9e19dfc4d0ad7ec2074f45ec16b54b3c8379a | setup.py | setup.py | #!/usr/bin/env python3
from setuptools import setup, find_packages
setup(
name='ppp_cas',
version='0.3.2',
description='CAS plugin for PPP',
url='https://github.com/ProjetPP',
author='Projet Pensées Profondes',
author_email='[email protected]',
license='MIT',
classifiers=[
... | #!/usr/bin/env python3
from setuptools import setup, find_packages
setup(
name='ppp_cas',
version='0.3.2',
description='CAS plugin for PPP',
url='https://github.com/ProjetPP',
author='Projet Pensées Profondes',
author_email='[email protected]',
license='MIT',
classifiers=[
... | Add PLY as a dependency. | Add PLY as a dependency.
| Python | mit | ProjetPP/PPP-CAS,iScienceLuvr/PPP-CAS,ProjetPP/PPP-CAS,iScienceLuvr/PPP-CAS | #!/usr/bin/env python3
from setuptools import setup, find_packages
setup(
name='ppp_cas',
version='0.3.2',
description='CAS plugin for PPP',
url='https://github.com/ProjetPP',
author='Projet Pensées Profondes',
author_email='[email protected]',
license='MIT',
classifiers=[
... | #!/usr/bin/env python3
from setuptools import setup, find_packages
setup(
name='ppp_cas',
version='0.3.2',
description='CAS plugin for PPP',
url='https://github.com/ProjetPP',
author='Projet Pensées Profondes',
author_email='[email protected]',
license='MIT',
classifiers=[
... | <commit_before>#!/usr/bin/env python3
from setuptools import setup, find_packages
setup(
name='ppp_cas',
version='0.3.2',
description='CAS plugin for PPP',
url='https://github.com/ProjetPP',
author='Projet Pensées Profondes',
author_email='[email protected]',
license='MIT',
c... | #!/usr/bin/env python3
from setuptools import setup, find_packages
setup(
name='ppp_cas',
version='0.3.2',
description='CAS plugin for PPP',
url='https://github.com/ProjetPP',
author='Projet Pensées Profondes',
author_email='[email protected]',
license='MIT',
classifiers=[
... | #!/usr/bin/env python3
from setuptools import setup, find_packages
setup(
name='ppp_cas',
version='0.3.2',
description='CAS plugin for PPP',
url='https://github.com/ProjetPP',
author='Projet Pensées Profondes',
author_email='[email protected]',
license='MIT',
classifiers=[
... | <commit_before>#!/usr/bin/env python3
from setuptools import setup, find_packages
setup(
name='ppp_cas',
version='0.3.2',
description='CAS plugin for PPP',
url='https://github.com/ProjetPP',
author='Projet Pensées Profondes',
author_email='[email protected]',
license='MIT',
c... |
e6e819b6c08751ae84921687e3e93a4888fb2d5e | setup.py | setup.py | import os
from setuptools import setup
from withtool import __version__
def read(fname):
path = os.path.join(os.path.dirname(__file__), fname)
with open(path, encoding='utf-8') as f:
return f.read()
setup(
name='with',
version=__version__,
description='A shell context manager',
long_... | import os
from setuptools import setup
from withtool import __version__
def read(fname):
path = os.path.join(os.path.dirname(__file__), fname)
with open(path, encoding='utf-8') as f:
return f.read()
setup(
name='with',
version=__version__,
description='A shell context manager',
long_... | Upgrade dependency prompt-toolkit to ==1.0 | Upgrade dependency prompt-toolkit to ==1.0
| Python | mit | renanivo/with | import os
from setuptools import setup
from withtool import __version__
def read(fname):
path = os.path.join(os.path.dirname(__file__), fname)
with open(path, encoding='utf-8') as f:
return f.read()
setup(
name='with',
version=__version__,
description='A shell context manager',
long_... | import os
from setuptools import setup
from withtool import __version__
def read(fname):
path = os.path.join(os.path.dirname(__file__), fname)
with open(path, encoding='utf-8') as f:
return f.read()
setup(
name='with',
version=__version__,
description='A shell context manager',
long_... | <commit_before>import os
from setuptools import setup
from withtool import __version__
def read(fname):
path = os.path.join(os.path.dirname(__file__), fname)
with open(path, encoding='utf-8') as f:
return f.read()
setup(
name='with',
version=__version__,
description='A shell context mana... | import os
from setuptools import setup
from withtool import __version__
def read(fname):
path = os.path.join(os.path.dirname(__file__), fname)
with open(path, encoding='utf-8') as f:
return f.read()
setup(
name='with',
version=__version__,
description='A shell context manager',
long_... | import os
from setuptools import setup
from withtool import __version__
def read(fname):
path = os.path.join(os.path.dirname(__file__), fname)
with open(path, encoding='utf-8') as f:
return f.read()
setup(
name='with',
version=__version__,
description='A shell context manager',
long_... | <commit_before>import os
from setuptools import setup
from withtool import __version__
def read(fname):
path = os.path.join(os.path.dirname(__file__), fname)
with open(path, encoding='utf-8') as f:
return f.read()
setup(
name='with',
version=__version__,
description='A shell context mana... |
ab54955caef852c2a73789b09c8f37e81591e98f | setup.py | setup.py | import multiprocessing
from setuptools import setup, find_packages
requirements = []
with open('requirements.txt', 'r') as in_:
requirements = in_.readlines()
setup(
name='myfitnesspal',
version='1.2.2',
url='http://github.com/coddingtonbear/python-myfitnesspal/',
description='Access health and f... | import multiprocessing
from setuptools import setup, find_packages
requirements = []
with open('requirements.txt', 'r') as in_:
requirements = in_.readlines()
setup(
name='myfitnesspal',
version='1.2.2',
url='http://github.com/coddingtonbear/python-myfitnesspal/',
description='Access health and f... | Use the redistribution of (now discontinued) mimic as gmcquillan-mimic. | Use the redistribution of (now discontinued) mimic as gmcquillan-mimic.
| Python | mit | tomn46037/python-myfitnesspal,rbelzile/python-myfitnesspal,coddingtonbear/python-myfitnesspal,tomn46037/python-myfitnesspal,rbelzile/python-myfitnesspal | import multiprocessing
from setuptools import setup, find_packages
requirements = []
with open('requirements.txt', 'r') as in_:
requirements = in_.readlines()
setup(
name='myfitnesspal',
version='1.2.2',
url='http://github.com/coddingtonbear/python-myfitnesspal/',
description='Access health and f... | import multiprocessing
from setuptools import setup, find_packages
requirements = []
with open('requirements.txt', 'r') as in_:
requirements = in_.readlines()
setup(
name='myfitnesspal',
version='1.2.2',
url='http://github.com/coddingtonbear/python-myfitnesspal/',
description='Access health and f... | <commit_before>import multiprocessing
from setuptools import setup, find_packages
requirements = []
with open('requirements.txt', 'r') as in_:
requirements = in_.readlines()
setup(
name='myfitnesspal',
version='1.2.2',
url='http://github.com/coddingtonbear/python-myfitnesspal/',
description='Acce... | import multiprocessing
from setuptools import setup, find_packages
requirements = []
with open('requirements.txt', 'r') as in_:
requirements = in_.readlines()
setup(
name='myfitnesspal',
version='1.2.2',
url='http://github.com/coddingtonbear/python-myfitnesspal/',
description='Access health and f... | import multiprocessing
from setuptools import setup, find_packages
requirements = []
with open('requirements.txt', 'r') as in_:
requirements = in_.readlines()
setup(
name='myfitnesspal',
version='1.2.2',
url='http://github.com/coddingtonbear/python-myfitnesspal/',
description='Access health and f... | <commit_before>import multiprocessing
from setuptools import setup, find_packages
requirements = []
with open('requirements.txt', 'r') as in_:
requirements = in_.readlines()
setup(
name='myfitnesspal',
version='1.2.2',
url='http://github.com/coddingtonbear/python-myfitnesspal/',
description='Acce... |
15b2054454ff41d743c06e231f64585ea7219d92 | setup.py | setup.py | '''
XBMC Addon Manager
------------------
A CLI utility for searching and listing XBMC Addon Repositories.
Setup
`````
::
$ pip install xam
$ xam --help
Links
`````
* `website <http://github.com/jbeluch/xam/>`_
'''
from setuptools import setup
def get_requires():
'''If python > 2.7, argparse and Ord... | '''
XBMC Addon Manager
------------------
A CLI utility for searching and listing XBMC Addon Repositories.
Setup
`````
::
$ pip install xam
$ xam --help
Links
`````
* `website <http://github.com/jbeluch/xam/>`_
'''
from setuptools import setup
def get_requires():
'''If python > 2.7, argparse and Ord... | Prepare for development of next release | Prepare for development of next release
| Python | bsd-3-clause | jbeluch/xam | '''
XBMC Addon Manager
------------------
A CLI utility for searching and listing XBMC Addon Repositories.
Setup
`````
::
$ pip install xam
$ xam --help
Links
`````
* `website <http://github.com/jbeluch/xam/>`_
'''
from setuptools import setup
def get_requires():
'''If python > 2.7, argparse and Ord... | '''
XBMC Addon Manager
------------------
A CLI utility for searching and listing XBMC Addon Repositories.
Setup
`````
::
$ pip install xam
$ xam --help
Links
`````
* `website <http://github.com/jbeluch/xam/>`_
'''
from setuptools import setup
def get_requires():
'''If python > 2.7, argparse and Ord... | <commit_before>'''
XBMC Addon Manager
------------------
A CLI utility for searching and listing XBMC Addon Repositories.
Setup
`````
::
$ pip install xam
$ xam --help
Links
`````
* `website <http://github.com/jbeluch/xam/>`_
'''
from setuptools import setup
def get_requires():
'''If python > 2.7, a... | '''
XBMC Addon Manager
------------------
A CLI utility for searching and listing XBMC Addon Repositories.
Setup
`````
::
$ pip install xam
$ xam --help
Links
`````
* `website <http://github.com/jbeluch/xam/>`_
'''
from setuptools import setup
def get_requires():
'''If python > 2.7, argparse and Ord... | '''
XBMC Addon Manager
------------------
A CLI utility for searching and listing XBMC Addon Repositories.
Setup
`````
::
$ pip install xam
$ xam --help
Links
`````
* `website <http://github.com/jbeluch/xam/>`_
'''
from setuptools import setup
def get_requires():
'''If python > 2.7, argparse and Ord... | <commit_before>'''
XBMC Addon Manager
------------------
A CLI utility for searching and listing XBMC Addon Repositories.
Setup
`````
::
$ pip install xam
$ xam --help
Links
`````
* `website <http://github.com/jbeluch/xam/>`_
'''
from setuptools import setup
def get_requires():
'''If python > 2.7, a... |
50b2343f8a8c60b647fe254f79a05a5599d97862 | setup.py | setup.py | from setuptools import setup, find_packages
import unittest
import doctest
# Read in the version number
exec(open('src/nash/version.py', 'r').read())
requirements = ["numpy==1.11.2"]
test_requirements = ['hypothesis>=3.6.0']
def test_suite():
"""Discover all tests in the tests dir"""
test_loader = unittest.... | from setuptools import setup, find_packages
import unittest
import doctest
# Read in the version number
exec(open('src/nash/version.py', 'r').read())
requirements = ["numpy==1.11.2"]
def test_suite():
"""Discover all tests in the tests dir"""
test_loader = unittest.TestLoader()
# Read in unit tests
t... | Revert "Add hypothesis as test requirement." | Revert "Add hypothesis as test requirement."
This reverts commit 7e340017f4bb0a8a99219f3896071ab07a017f4f.
| Python | mit | drvinceknight/Nashpy | from setuptools import setup, find_packages
import unittest
import doctest
# Read in the version number
exec(open('src/nash/version.py', 'r').read())
requirements = ["numpy==1.11.2"]
test_requirements = ['hypothesis>=3.6.0']
def test_suite():
"""Discover all tests in the tests dir"""
test_loader = unittest.... | from setuptools import setup, find_packages
import unittest
import doctest
# Read in the version number
exec(open('src/nash/version.py', 'r').read())
requirements = ["numpy==1.11.2"]
def test_suite():
"""Discover all tests in the tests dir"""
test_loader = unittest.TestLoader()
# Read in unit tests
t... | <commit_before>from setuptools import setup, find_packages
import unittest
import doctest
# Read in the version number
exec(open('src/nash/version.py', 'r').read())
requirements = ["numpy==1.11.2"]
test_requirements = ['hypothesis>=3.6.0']
def test_suite():
"""Discover all tests in the tests dir"""
test_loa... | from setuptools import setup, find_packages
import unittest
import doctest
# Read in the version number
exec(open('src/nash/version.py', 'r').read())
requirements = ["numpy==1.11.2"]
def test_suite():
"""Discover all tests in the tests dir"""
test_loader = unittest.TestLoader()
# Read in unit tests
t... | from setuptools import setup, find_packages
import unittest
import doctest
# Read in the version number
exec(open('src/nash/version.py', 'r').read())
requirements = ["numpy==1.11.2"]
test_requirements = ['hypothesis>=3.6.0']
def test_suite():
"""Discover all tests in the tests dir"""
test_loader = unittest.... | <commit_before>from setuptools import setup, find_packages
import unittest
import doctest
# Read in the version number
exec(open('src/nash/version.py', 'r').read())
requirements = ["numpy==1.11.2"]
test_requirements = ['hypothesis>=3.6.0']
def test_suite():
"""Discover all tests in the tests dir"""
test_loa... |
9a5c17781178e8c97a4749e49374c3b4449c7387 | tests/test_models.py | tests/test_models.py | from unittest import TestCase
import unittest.mock
from molecupy.structures import Model, AtomicStructure, SmallMolecule
class ModelTest(TestCase):
def setUp(self):
self.small_molecule1 = unittest.mock.Mock(spec=SmallMolecule)
self.small_molecule2 = unittest.mock.Mock(spec=SmallMolecule)
class ... | from unittest import TestCase
import unittest.mock
from molecupy.structures import Model, AtomicStructure, SmallMolecule
class ModelTest(TestCase):
def setUp(self):
self.small_molecule1 = unittest.mock.Mock(spec=SmallMolecule)
self.small_molecule2 = unittest.mock.Mock(spec=SmallMolecule)
class ... | Make small molecules read only | Make small molecules read only
| Python | mit | samirelanduk/atomium,samirelanduk/atomium,samirelanduk/molecupy | from unittest import TestCase
import unittest.mock
from molecupy.structures import Model, AtomicStructure, SmallMolecule
class ModelTest(TestCase):
def setUp(self):
self.small_molecule1 = unittest.mock.Mock(spec=SmallMolecule)
self.small_molecule2 = unittest.mock.Mock(spec=SmallMolecule)
class ... | from unittest import TestCase
import unittest.mock
from molecupy.structures import Model, AtomicStructure, SmallMolecule
class ModelTest(TestCase):
def setUp(self):
self.small_molecule1 = unittest.mock.Mock(spec=SmallMolecule)
self.small_molecule2 = unittest.mock.Mock(spec=SmallMolecule)
class ... | <commit_before>from unittest import TestCase
import unittest.mock
from molecupy.structures import Model, AtomicStructure, SmallMolecule
class ModelTest(TestCase):
def setUp(self):
self.small_molecule1 = unittest.mock.Mock(spec=SmallMolecule)
self.small_molecule2 = unittest.mock.Mock(spec=SmallMole... | from unittest import TestCase
import unittest.mock
from molecupy.structures import Model, AtomicStructure, SmallMolecule
class ModelTest(TestCase):
def setUp(self):
self.small_molecule1 = unittest.mock.Mock(spec=SmallMolecule)
self.small_molecule2 = unittest.mock.Mock(spec=SmallMolecule)
class ... | from unittest import TestCase
import unittest.mock
from molecupy.structures import Model, AtomicStructure, SmallMolecule
class ModelTest(TestCase):
def setUp(self):
self.small_molecule1 = unittest.mock.Mock(spec=SmallMolecule)
self.small_molecule2 = unittest.mock.Mock(spec=SmallMolecule)
class ... | <commit_before>from unittest import TestCase
import unittest.mock
from molecupy.structures import Model, AtomicStructure, SmallMolecule
class ModelTest(TestCase):
def setUp(self):
self.small_molecule1 = unittest.mock.Mock(spec=SmallMolecule)
self.small_molecule2 = unittest.mock.Mock(spec=SmallMole... |
2eca3cd6e0065a65ed65b3ce13fc7f7d9caf1717 | AAA.py | AAA.py | import os
import sys
try: # ST3
from .Lib.sublime_lib.path import get_package_name, get_package_path
PLUGIN_NAME = get_package_name()
libpath = os.path.join(get_package_path(), "Lib")
except ValueError: # ST2
# For some reason the import does only work when RELOADING the plugin, not
# ... | import os
import sys
try: # ST3
from .Lib.sublime_lib.path import get_package_name
PLUGIN_NAME = get_package_name()
path = os.path.dirname(__file__)
libpath = os.path.join(path, "Lib")
except ValueError: # ST2
# For some reason the import does only work when RELOADING the plugin, not
... | Make imports work when in .sublime-package | Make imports work when in .sublime-package
| Python | mit | SublimeText/AAAPackageDev,SublimeText/AAAPackageDev,SublimeText/PackageDev | import os
import sys
try: # ST3
from .Lib.sublime_lib.path import get_package_name, get_package_path
PLUGIN_NAME = get_package_name()
libpath = os.path.join(get_package_path(), "Lib")
except ValueError: # ST2
# For some reason the import does only work when RELOADING the plugin, not
# ... | import os
import sys
try: # ST3
from .Lib.sublime_lib.path import get_package_name
PLUGIN_NAME = get_package_name()
path = os.path.dirname(__file__)
libpath = os.path.join(path, "Lib")
except ValueError: # ST2
# For some reason the import does only work when RELOADING the plugin, not
... | <commit_before>import os
import sys
try: # ST3
from .Lib.sublime_lib.path import get_package_name, get_package_path
PLUGIN_NAME = get_package_name()
libpath = os.path.join(get_package_path(), "Lib")
except ValueError: # ST2
# For some reason the import does only work when RELOADING the plug... | import os
import sys
try: # ST3
from .Lib.sublime_lib.path import get_package_name
PLUGIN_NAME = get_package_name()
path = os.path.dirname(__file__)
libpath = os.path.join(path, "Lib")
except ValueError: # ST2
# For some reason the import does only work when RELOADING the plugin, not
... | import os
import sys
try: # ST3
from .Lib.sublime_lib.path import get_package_name, get_package_path
PLUGIN_NAME = get_package_name()
libpath = os.path.join(get_package_path(), "Lib")
except ValueError: # ST2
# For some reason the import does only work when RELOADING the plugin, not
# ... | <commit_before>import os
import sys
try: # ST3
from .Lib.sublime_lib.path import get_package_name, get_package_path
PLUGIN_NAME = get_package_name()
libpath = os.path.join(get_package_path(), "Lib")
except ValueError: # ST2
# For some reason the import does only work when RELOADING the plug... |
ed201c4cb78dd9fe1bbc9563f8219f9127cbfe1e | app.py | app.py | # !/usr/bin/python3
# -*- coding: utf-8 -*-
# Copyright (c) 2017-2020 Rhilip <[email protected]>
import pymysql
from flask import Flask
from flaskext.mysql import MySQL
from flask_cors import CORS
from flask_cache import Cache
app = Flask(__name__, instance_relative_config=True)
app.config.from_object('config')
a... | # !/usr/bin/python3
# -*- coding: utf-8 -*-
# Copyright (c) 2017-2020 Rhilip <[email protected]>
import pymysql
from flask import Flask
from flaskext.mysql import MySQL
from flask_cors import CORS
from flask_caching import Cache
app = Flask(__name__, instance_relative_config=True)
app.config.from_object('config')... | Change Cache Provider Since Flask upgraded | :alien: Change Cache Provider Since Flask upgraded
See: https://github.com/thadeusb/flask-cache/issues/188
| Python | mit | Rhilip/PT-help-server | # !/usr/bin/python3
# -*- coding: utf-8 -*-
# Copyright (c) 2017-2020 Rhilip <[email protected]>
import pymysql
from flask import Flask
from flaskext.mysql import MySQL
from flask_cors import CORS
from flask_cache import Cache
app = Flask(__name__, instance_relative_config=True)
app.config.from_object('config')
a... | # !/usr/bin/python3
# -*- coding: utf-8 -*-
# Copyright (c) 2017-2020 Rhilip <[email protected]>
import pymysql
from flask import Flask
from flaskext.mysql import MySQL
from flask_cors import CORS
from flask_caching import Cache
app = Flask(__name__, instance_relative_config=True)
app.config.from_object('config')... | <commit_before># !/usr/bin/python3
# -*- coding: utf-8 -*-
# Copyright (c) 2017-2020 Rhilip <[email protected]>
import pymysql
from flask import Flask
from flaskext.mysql import MySQL
from flask_cors import CORS
from flask_cache import Cache
app = Flask(__name__, instance_relative_config=True)
app.config.from_obj... | # !/usr/bin/python3
# -*- coding: utf-8 -*-
# Copyright (c) 2017-2020 Rhilip <[email protected]>
import pymysql
from flask import Flask
from flaskext.mysql import MySQL
from flask_cors import CORS
from flask_caching import Cache
app = Flask(__name__, instance_relative_config=True)
app.config.from_object('config')... | # !/usr/bin/python3
# -*- coding: utf-8 -*-
# Copyright (c) 2017-2020 Rhilip <[email protected]>
import pymysql
from flask import Flask
from flaskext.mysql import MySQL
from flask_cors import CORS
from flask_cache import Cache
app = Flask(__name__, instance_relative_config=True)
app.config.from_object('config')
a... | <commit_before># !/usr/bin/python3
# -*- coding: utf-8 -*-
# Copyright (c) 2017-2020 Rhilip <[email protected]>
import pymysql
from flask import Flask
from flaskext.mysql import MySQL
from flask_cors import CORS
from flask_cache import Cache
app = Flask(__name__, instance_relative_config=True)
app.config.from_obj... |
4f9bb7a81f52b5ee46be338e5c699411286f1401 | tasks.py | tasks.py | from invocations import docs
from invocations.testing import test
from invocations.packaging import release
from invoke import Collection
from invoke import run
from invoke import task
@task(help={
'pty': "Whether to run tests under a pseudo-tty",
})
def integration_tests(pty=True):
"""Runs integration tests... | from invocations import docs
from invocations.testing import test
from invocations.packaging import release
from invoke import Collection
from invoke import run
from invoke import task
@task(help={
'pty': "Whether to run tests under a pseudo-tty",
})
def integration(pty=True):
"""Runs integration tests."""
... | Rename integration tests task for consistency w/ other projs | Rename integration tests task for consistency w/ other projs
| Python | bsd-2-clause | bitprophet/releases | from invocations import docs
from invocations.testing import test
from invocations.packaging import release
from invoke import Collection
from invoke import run
from invoke import task
@task(help={
'pty': "Whether to run tests under a pseudo-tty",
})
def integration_tests(pty=True):
"""Runs integration tests... | from invocations import docs
from invocations.testing import test
from invocations.packaging import release
from invoke import Collection
from invoke import run
from invoke import task
@task(help={
'pty': "Whether to run tests under a pseudo-tty",
})
def integration(pty=True):
"""Runs integration tests."""
... | <commit_before>from invocations import docs
from invocations.testing import test
from invocations.packaging import release
from invoke import Collection
from invoke import run
from invoke import task
@task(help={
'pty': "Whether to run tests under a pseudo-tty",
})
def integration_tests(pty=True):
"""Runs in... | from invocations import docs
from invocations.testing import test
from invocations.packaging import release
from invoke import Collection
from invoke import run
from invoke import task
@task(help={
'pty': "Whether to run tests under a pseudo-tty",
})
def integration(pty=True):
"""Runs integration tests."""
... | from invocations import docs
from invocations.testing import test
from invocations.packaging import release
from invoke import Collection
from invoke import run
from invoke import task
@task(help={
'pty': "Whether to run tests under a pseudo-tty",
})
def integration_tests(pty=True):
"""Runs integration tests... | <commit_before>from invocations import docs
from invocations.testing import test
from invocations.packaging import release
from invoke import Collection
from invoke import run
from invoke import task
@task(help={
'pty': "Whether to run tests under a pseudo-tty",
})
def integration_tests(pty=True):
"""Runs in... |
3ca0007970056e665b28c62d39ed6073309a97cd | kovfig.py | kovfig.py | #! /usr/bin/env python
# coding:utf-8
# the number of loop for train IBM Model 2
loop_count = 10
phrase_model_file = "./phrase.model"
bigram_model_file = "./bigram.model"
if __name__ == '__main__':
pass
| #! /usr/bin/env python
# coding:utf-8
from os import path
# the number of loop for train IBM Model 2
loop_count = 10
phrase_model_file = path.join(
path.abspath(path.dirname(__file__)),
"phrase.model"
)
bigram_model_file = path.join(
path.abspath(path.dirname(__file__)),
"bigram.model"
)
if __name__... | Modify path to use __file__ | Modify path to use __file__
| Python | mit | kenkov/kovlive | #! /usr/bin/env python
# coding:utf-8
# the number of loop for train IBM Model 2
loop_count = 10
phrase_model_file = "./phrase.model"
bigram_model_file = "./bigram.model"
if __name__ == '__main__':
pass
Modify path to use __file__ | #! /usr/bin/env python
# coding:utf-8
from os import path
# the number of loop for train IBM Model 2
loop_count = 10
phrase_model_file = path.join(
path.abspath(path.dirname(__file__)),
"phrase.model"
)
bigram_model_file = path.join(
path.abspath(path.dirname(__file__)),
"bigram.model"
)
if __name__... | <commit_before>#! /usr/bin/env python
# coding:utf-8
# the number of loop for train IBM Model 2
loop_count = 10
phrase_model_file = "./phrase.model"
bigram_model_file = "./bigram.model"
if __name__ == '__main__':
pass
<commit_msg>Modify path to use __file__<commit_after> | #! /usr/bin/env python
# coding:utf-8
from os import path
# the number of loop for train IBM Model 2
loop_count = 10
phrase_model_file = path.join(
path.abspath(path.dirname(__file__)),
"phrase.model"
)
bigram_model_file = path.join(
path.abspath(path.dirname(__file__)),
"bigram.model"
)
if __name__... | #! /usr/bin/env python
# coding:utf-8
# the number of loop for train IBM Model 2
loop_count = 10
phrase_model_file = "./phrase.model"
bigram_model_file = "./bigram.model"
if __name__ == '__main__':
pass
Modify path to use __file__#! /usr/bin/env python
# coding:utf-8
from os import path
# the number of loop f... | <commit_before>#! /usr/bin/env python
# coding:utf-8
# the number of loop for train IBM Model 2
loop_count = 10
phrase_model_file = "./phrase.model"
bigram_model_file = "./bigram.model"
if __name__ == '__main__':
pass
<commit_msg>Modify path to use __file__<commit_after>#! /usr/bin/env python
# coding:utf-8
fro... |
01cea97dad211746d2d5ba4ae5c03aa06121a544 | tests/test_geocode.py | tests/test_geocode.py | import unittest
import fiona
from shapely.geometry import Point
import geopandas as gpd
from geopandas.geocode import geocode, _prepare_geocode_result
class TestGeocode(unittest.TestCase):
def test_prepare_result(self):
# Calls _prepare_result with sample results from the geocoder call
# loop
... | import unittest
import fiona
from shapely.geometry import Point
import geopandas as gpd
from geopandas.geocode import geocode, _prepare_geocode_result
class TestGeocode(unittest.TestCase):
def test_prepare_result(self):
# Calls _prepare_result with sample results from the geocoder call
# loop
... | Change assertIn to assert_ for python 2.6 support | Change assertIn to assert_ for python 2.6 support
| Python | bsd-3-clause | koldunovn/geopandas,geopandas/geopandas,urschrei/geopandas,geopandas/geopandas,maxalbert/geopandas,jorisvandenbossche/geopandas,ozak/geopandas,IamJeffG/geopandas,micahcochran/geopandas,fonnesbeck/geopandas,scw/geopandas,jorisvandenbossche/geopandas,micahcochran/geopandas,geopandas/geopandas,kwinkunks/geopandas,jdmcbr/g... | import unittest
import fiona
from shapely.geometry import Point
import geopandas as gpd
from geopandas.geocode import geocode, _prepare_geocode_result
class TestGeocode(unittest.TestCase):
def test_prepare_result(self):
# Calls _prepare_result with sample results from the geocoder call
# loop
... | import unittest
import fiona
from shapely.geometry import Point
import geopandas as gpd
from geopandas.geocode import geocode, _prepare_geocode_result
class TestGeocode(unittest.TestCase):
def test_prepare_result(self):
# Calls _prepare_result with sample results from the geocoder call
# loop
... | <commit_before>import unittest
import fiona
from shapely.geometry import Point
import geopandas as gpd
from geopandas.geocode import geocode, _prepare_geocode_result
class TestGeocode(unittest.TestCase):
def test_prepare_result(self):
# Calls _prepare_result with sample results from the geocoder call
... | import unittest
import fiona
from shapely.geometry import Point
import geopandas as gpd
from geopandas.geocode import geocode, _prepare_geocode_result
class TestGeocode(unittest.TestCase):
def test_prepare_result(self):
# Calls _prepare_result with sample results from the geocoder call
# loop
... | import unittest
import fiona
from shapely.geometry import Point
import geopandas as gpd
from geopandas.geocode import geocode, _prepare_geocode_result
class TestGeocode(unittest.TestCase):
def test_prepare_result(self):
# Calls _prepare_result with sample results from the geocoder call
# loop
... | <commit_before>import unittest
import fiona
from shapely.geometry import Point
import geopandas as gpd
from geopandas.geocode import geocode, _prepare_geocode_result
class TestGeocode(unittest.TestCase):
def test_prepare_result(self):
# Calls _prepare_result with sample results from the geocoder call
... |
e9eb29d300d4072a32d824d4f588ff76a905bb89 | gunicorn_settings.py | gunicorn_settings.py | bind = '127.0.0.1:8001'
workers = 2
worker_class = 'gevent'
timeout = 30
keepalive = 2
errorlog = '-'
| workers = 2
worker_class = 'gevent'
timeout = 30
keepalive = 2
errorlog = '-'
| Use IP and PORT environment variables if set | Use IP and PORT environment variables if set
| Python | apache-2.0 | notapresent/rbm2m,notapresent/rbm2m | bind = '127.0.0.1:8001'
workers = 2
worker_class = 'gevent'
timeout = 30
keepalive = 2
errorlog = '-'
Use IP and PORT environment variables if set | workers = 2
worker_class = 'gevent'
timeout = 30
keepalive = 2
errorlog = '-'
| <commit_before>bind = '127.0.0.1:8001'
workers = 2
worker_class = 'gevent'
timeout = 30
keepalive = 2
errorlog = '-'
<commit_msg>Use IP and PORT environment variables if set<commit_after> | workers = 2
worker_class = 'gevent'
timeout = 30
keepalive = 2
errorlog = '-'
| bind = '127.0.0.1:8001'
workers = 2
worker_class = 'gevent'
timeout = 30
keepalive = 2
errorlog = '-'
Use IP and PORT environment variables if setworkers = 2
worker_class = 'gevent'
timeout = 30
keepalive = 2
errorlog = '-'
| <commit_before>bind = '127.0.0.1:8001'
workers = 2
worker_class = 'gevent'
timeout = 30
keepalive = 2
errorlog = '-'
<commit_msg>Use IP and PORT environment variables if set<commit_after>workers = 2
worker_class = 'gevent'
timeout = 30
keepalive = 2
errorlog = '-'
|
da9bfba9f8111fa62ff4b0387e3b2faf8f367855 | perpendicular-least-squares.py | perpendicular-least-squares.py | __author__ = 'Jacob Bieker'
import os, sys
import numpy
from multiprocessing import Pool
| __author__ = 'Jacob Bieker'
import os, sys
import numpy
from multiprocessing import Pool
def line_solve():
# TODO: Find the Least Squares for a line
return 0
def plane_solve():
# TODO: Find the least Squares for a plane
return 0
def read_clusters():
# TODO: Read in the files containing the clu... | Create stub functions and skeleton of program | Create stub functions and skeleton of program
| Python | mit | jacobbieker/GCP-perpendicular-least-squares,jacobbieker/GCP-perpendicular-least-squares,jacobbieker/GCP-perpendicular-least-squares | __author__ = 'Jacob Bieker'
import os, sys
import numpy
from multiprocessing import Pool
Create stub functions and skeleton of program | __author__ = 'Jacob Bieker'
import os, sys
import numpy
from multiprocessing import Pool
def line_solve():
# TODO: Find the Least Squares for a line
return 0
def plane_solve():
# TODO: Find the least Squares for a plane
return 0
def read_clusters():
# TODO: Read in the files containing the clu... | <commit_before>__author__ = 'Jacob Bieker'
import os, sys
import numpy
from multiprocessing import Pool
<commit_msg>Create stub functions and skeleton of program<commit_after> | __author__ = 'Jacob Bieker'
import os, sys
import numpy
from multiprocessing import Pool
def line_solve():
# TODO: Find the Least Squares for a line
return 0
def plane_solve():
# TODO: Find the least Squares for a plane
return 0
def read_clusters():
# TODO: Read in the files containing the clu... | __author__ = 'Jacob Bieker'
import os, sys
import numpy
from multiprocessing import Pool
Create stub functions and skeleton of program__author__ = 'Jacob Bieker'
import os, sys
import numpy
from multiprocessing import Pool
def line_solve():
# TODO: Find the Least Squares for a line
return 0
def plane_solve... | <commit_before>__author__ = 'Jacob Bieker'
import os, sys
import numpy
from multiprocessing import Pool
<commit_msg>Create stub functions and skeleton of program<commit_after>__author__ = 'Jacob Bieker'
import os, sys
import numpy
from multiprocessing import Pool
def line_solve():
# TODO: Find the Least Squares ... |
1aa8344177a6e336075134ea802b14e14b8e2f03 | utils.py | utils.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
def fix_str(value):
try:
return unicode(value)
except UnicodeDecodeError:
return unicode(value.decode('latin1'))
def pandas_to_dict(df):
return [{colname: (fix_str(row[i]) if type(row[i]) is str else row[i])
for i, colname in enume... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from pandas import tslib
def fix_render(value):
if type(value) is str:
try:
return unicode(value)
except UnicodeDecodeError:
return unicode(value.decode('latin1'))
elif type(value) is tslib.Timestamp:
return value.strf... | Fix date format on fix render | Fix date format on fix render
| Python | mit | mlgruby/mining,chrisdamba/mining,mining/mining,jgabriellima/mining,AndrzejR/mining,chrisdamba/mining,mlgruby/mining,seagoat/mining,AndrzejR/mining,mining/mining,jgabriellima/mining,seagoat/mining,avelino/mining,avelino/mining,mlgruby/mining | #!/usr/bin/env python
# -*- coding: utf-8 -*-
def fix_str(value):
try:
return unicode(value)
except UnicodeDecodeError:
return unicode(value.decode('latin1'))
def pandas_to_dict(df):
return [{colname: (fix_str(row[i]) if type(row[i]) is str else row[i])
for i, colname in enume... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from pandas import tslib
def fix_render(value):
if type(value) is str:
try:
return unicode(value)
except UnicodeDecodeError:
return unicode(value.decode('latin1'))
elif type(value) is tslib.Timestamp:
return value.strf... | <commit_before>#!/usr/bin/env python
# -*- coding: utf-8 -*-
def fix_str(value):
try:
return unicode(value)
except UnicodeDecodeError:
return unicode(value.decode('latin1'))
def pandas_to_dict(df):
return [{colname: (fix_str(row[i]) if type(row[i]) is str else row[i])
for i, c... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from pandas import tslib
def fix_render(value):
if type(value) is str:
try:
return unicode(value)
except UnicodeDecodeError:
return unicode(value.decode('latin1'))
elif type(value) is tslib.Timestamp:
return value.strf... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
def fix_str(value):
try:
return unicode(value)
except UnicodeDecodeError:
return unicode(value.decode('latin1'))
def pandas_to_dict(df):
return [{colname: (fix_str(row[i]) if type(row[i]) is str else row[i])
for i, colname in enume... | <commit_before>#!/usr/bin/env python
# -*- coding: utf-8 -*-
def fix_str(value):
try:
return unicode(value)
except UnicodeDecodeError:
return unicode(value.decode('latin1'))
def pandas_to_dict(df):
return [{colname: (fix_str(row[i]) if type(row[i]) is str else row[i])
for i, c... |
b7f3ee836cb73d274bfd7dc415bb43e2fa743e12 | httpserverhandler.py | httpserverhandler.py | #!/usr/bin/python
# -*-coding: utf8 -*-
from BaseHTTPServer import BaseHTTPRequestHandler
import mimetypes
from os import curdir, sep
import os
class HttpServerHandler(BaseHTTPRequestHandler):
allowed_extensions = ['.html', '.jpg', '.gif', '.js', '.css', '.tff', '.woff']
def has_permission_to_reply(self, f... | #!/usr/bin/python
# -*-coding: utf8 -*-
from BaseHTTPServer import BaseHTTPRequestHandler
import mimetypes
from os import curdir, sep
import os
class HttpServerHandler(BaseHTTPRequestHandler):
allowed_extensions = ['.html', '.jpg', '.gif', '.ico', '.js', '.css', '.tff', '.woff']
def has_permission_to_reply... | Add .ico to the allowed extension list. | Add .ico to the allowed extension list.
| Python | apache-2.0 | gearlles/planb-client,gearlles/planb-client,gearlles/planb-client | #!/usr/bin/python
# -*-coding: utf8 -*-
from BaseHTTPServer import BaseHTTPRequestHandler
import mimetypes
from os import curdir, sep
import os
class HttpServerHandler(BaseHTTPRequestHandler):
allowed_extensions = ['.html', '.jpg', '.gif', '.js', '.css', '.tff', '.woff']
def has_permission_to_reply(self, f... | #!/usr/bin/python
# -*-coding: utf8 -*-
from BaseHTTPServer import BaseHTTPRequestHandler
import mimetypes
from os import curdir, sep
import os
class HttpServerHandler(BaseHTTPRequestHandler):
allowed_extensions = ['.html', '.jpg', '.gif', '.ico', '.js', '.css', '.tff', '.woff']
def has_permission_to_reply... | <commit_before>#!/usr/bin/python
# -*-coding: utf8 -*-
from BaseHTTPServer import BaseHTTPRequestHandler
import mimetypes
from os import curdir, sep
import os
class HttpServerHandler(BaseHTTPRequestHandler):
allowed_extensions = ['.html', '.jpg', '.gif', '.js', '.css', '.tff', '.woff']
def has_permission_t... | #!/usr/bin/python
# -*-coding: utf8 -*-
from BaseHTTPServer import BaseHTTPRequestHandler
import mimetypes
from os import curdir, sep
import os
class HttpServerHandler(BaseHTTPRequestHandler):
allowed_extensions = ['.html', '.jpg', '.gif', '.ico', '.js', '.css', '.tff', '.woff']
def has_permission_to_reply... | #!/usr/bin/python
# -*-coding: utf8 -*-
from BaseHTTPServer import BaseHTTPRequestHandler
import mimetypes
from os import curdir, sep
import os
class HttpServerHandler(BaseHTTPRequestHandler):
allowed_extensions = ['.html', '.jpg', '.gif', '.js', '.css', '.tff', '.woff']
def has_permission_to_reply(self, f... | <commit_before>#!/usr/bin/python
# -*-coding: utf8 -*-
from BaseHTTPServer import BaseHTTPRequestHandler
import mimetypes
from os import curdir, sep
import os
class HttpServerHandler(BaseHTTPRequestHandler):
allowed_extensions = ['.html', '.jpg', '.gif', '.js', '.css', '.tff', '.woff']
def has_permission_t... |
f3cb8becb4f243d9f9a955aa3cafe53f3bf1e548 | examples/rRaman.py | examples/rRaman.py | # -*- coding: utf-8 -*-
"""
Resonance Raman
==========
A Resonance Raman plot.
"""
import WrightTools as wt
from WrightTools import datasets
p = datasets.BrunoldrRaman.LDS821_514nm_80mW
data = wt.data.from_BrunoldrRaman(p)
trash_pixels = 56
data = data.split(0, 843.0)[1]
data.convert('wn', verbose=False)
artist = ... | # -*- coding: utf-8 -*-
"""
Resonance Raman
===============
A Resonance Raman plot.
"""
import WrightTools as wt
from WrightTools import datasets
p = datasets.BrunoldrRaman.LDS821_514nm_80mW
data = wt.data.from_BrunoldrRaman(p)
trash_pixels = 56
data = data.split(0, 843.0)[1]
data.convert('wn', verbose=False)
arti... | Fix rST formatting in example | Fix rST formatting in example
| Python | mit | wright-group/WrightTools,wright-group/WrightTools | # -*- coding: utf-8 -*-
"""
Resonance Raman
==========
A Resonance Raman plot.
"""
import WrightTools as wt
from WrightTools import datasets
p = datasets.BrunoldrRaman.LDS821_514nm_80mW
data = wt.data.from_BrunoldrRaman(p)
trash_pixels = 56
data = data.split(0, 843.0)[1]
data.convert('wn', verbose=False)
artist = ... | # -*- coding: utf-8 -*-
"""
Resonance Raman
===============
A Resonance Raman plot.
"""
import WrightTools as wt
from WrightTools import datasets
p = datasets.BrunoldrRaman.LDS821_514nm_80mW
data = wt.data.from_BrunoldrRaman(p)
trash_pixels = 56
data = data.split(0, 843.0)[1]
data.convert('wn', verbose=False)
arti... | <commit_before># -*- coding: utf-8 -*-
"""
Resonance Raman
==========
A Resonance Raman plot.
"""
import WrightTools as wt
from WrightTools import datasets
p = datasets.BrunoldrRaman.LDS821_514nm_80mW
data = wt.data.from_BrunoldrRaman(p)
trash_pixels = 56
data = data.split(0, 843.0)[1]
data.convert('wn', verbose=Fa... | # -*- coding: utf-8 -*-
"""
Resonance Raman
===============
A Resonance Raman plot.
"""
import WrightTools as wt
from WrightTools import datasets
p = datasets.BrunoldrRaman.LDS821_514nm_80mW
data = wt.data.from_BrunoldrRaman(p)
trash_pixels = 56
data = data.split(0, 843.0)[1]
data.convert('wn', verbose=False)
arti... | # -*- coding: utf-8 -*-
"""
Resonance Raman
==========
A Resonance Raman plot.
"""
import WrightTools as wt
from WrightTools import datasets
p = datasets.BrunoldrRaman.LDS821_514nm_80mW
data = wt.data.from_BrunoldrRaman(p)
trash_pixels = 56
data = data.split(0, 843.0)[1]
data.convert('wn', verbose=False)
artist = ... | <commit_before># -*- coding: utf-8 -*-
"""
Resonance Raman
==========
A Resonance Raman plot.
"""
import WrightTools as wt
from WrightTools import datasets
p = datasets.BrunoldrRaman.LDS821_514nm_80mW
data = wt.data.from_BrunoldrRaman(p)
trash_pixels = 56
data = data.split(0, 843.0)[1]
data.convert('wn', verbose=Fa... |
1a4994e86c01b33878d022574782df88b2f4016a | fuzzinator/call/file_reader_decorator.py | fuzzinator/call/file_reader_decorator.py | # Copyright (c) 2017 Renata Hodovan, Akos Kiss.
#
# Licensed under the BSD 3-Clause License
# <LICENSE.rst or https://opensource.org/licenses/BSD-3-Clause>.
# This file may not be copied, modified, or distributed except
# according to those terms.
import os
from . import CallableDecorator
class FileReaderDecorator(... | # Copyright (c) 2017-2018 Renata Hodovan, Akos Kiss.
#
# Licensed under the BSD 3-Clause License
# <LICENSE.rst or https://opensource.org/licenses/BSD-3-Clause>.
# This file may not be copied, modified, or distributed except
# according to those terms.
import os
from . import CallableDecorator
class FileReaderDecor... | Fix test extraction in FileReaderDecorator. | Fix test extraction in FileReaderDecorator.
| Python | bsd-3-clause | renatahodovan/fuzzinator,akosthekiss/fuzzinator,renatahodovan/fuzzinator,akosthekiss/fuzzinator,akosthekiss/fuzzinator,renatahodovan/fuzzinator,akosthekiss/fuzzinator,renatahodovan/fuzzinator | # Copyright (c) 2017 Renata Hodovan, Akos Kiss.
#
# Licensed under the BSD 3-Clause License
# <LICENSE.rst or https://opensource.org/licenses/BSD-3-Clause>.
# This file may not be copied, modified, or distributed except
# according to those terms.
import os
from . import CallableDecorator
class FileReaderDecorator(... | # Copyright (c) 2017-2018 Renata Hodovan, Akos Kiss.
#
# Licensed under the BSD 3-Clause License
# <LICENSE.rst or https://opensource.org/licenses/BSD-3-Clause>.
# This file may not be copied, modified, or distributed except
# according to those terms.
import os
from . import CallableDecorator
class FileReaderDecor... | <commit_before># Copyright (c) 2017 Renata Hodovan, Akos Kiss.
#
# Licensed under the BSD 3-Clause License
# <LICENSE.rst or https://opensource.org/licenses/BSD-3-Clause>.
# This file may not be copied, modified, or distributed except
# according to those terms.
import os
from . import CallableDecorator
class FileR... | # Copyright (c) 2017-2018 Renata Hodovan, Akos Kiss.
#
# Licensed under the BSD 3-Clause License
# <LICENSE.rst or https://opensource.org/licenses/BSD-3-Clause>.
# This file may not be copied, modified, or distributed except
# according to those terms.
import os
from . import CallableDecorator
class FileReaderDecor... | # Copyright (c) 2017 Renata Hodovan, Akos Kiss.
#
# Licensed under the BSD 3-Clause License
# <LICENSE.rst or https://opensource.org/licenses/BSD-3-Clause>.
# This file may not be copied, modified, or distributed except
# according to those terms.
import os
from . import CallableDecorator
class FileReaderDecorator(... | <commit_before># Copyright (c) 2017 Renata Hodovan, Akos Kiss.
#
# Licensed under the BSD 3-Clause License
# <LICENSE.rst or https://opensource.org/licenses/BSD-3-Clause>.
# This file may not be copied, modified, or distributed except
# according to those terms.
import os
from . import CallableDecorator
class FileR... |
1e7349bc3e7282f6103d6d67949da60045d1f06c | libs/utils/utils.py | libs/utils/utils.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""The package that contains groups all the functions needed by other scripts."""
import os.path
import sys
sys.path.insert(0, '../')
import logging
import json
import configparser
def get_configuration():
"""Get global configuration from service.cfg"""
config... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""The package that contains groups all the functions needed by other scripts."""
import os.path
import sys
sys.path.insert(0, '../')
import logging
import json
import configparser
def get_configuration():
"""Get global configuration from service.cfg"""
config... | Enable testing with other subscriber files | Enable testing with other subscriber files
`load_subscribers_json("json/test_subscribers.json")` is now possible. | Python | mit | UnivaqTelegramBot/UnivaqInformaticaBot,giacomocerquone/UnivaqBot | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""The package that contains groups all the functions needed by other scripts."""
import os.path
import sys
sys.path.insert(0, '../')
import logging
import json
import configparser
def get_configuration():
"""Get global configuration from service.cfg"""
config... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""The package that contains groups all the functions needed by other scripts."""
import os.path
import sys
sys.path.insert(0, '../')
import logging
import json
import configparser
def get_configuration():
"""Get global configuration from service.cfg"""
config... | <commit_before>#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""The package that contains groups all the functions needed by other scripts."""
import os.path
import sys
sys.path.insert(0, '../')
import logging
import json
import configparser
def get_configuration():
"""Get global configuration from service.cfg... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""The package that contains groups all the functions needed by other scripts."""
import os.path
import sys
sys.path.insert(0, '../')
import logging
import json
import configparser
def get_configuration():
"""Get global configuration from service.cfg"""
config... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""The package that contains groups all the functions needed by other scripts."""
import os.path
import sys
sys.path.insert(0, '../')
import logging
import json
import configparser
def get_configuration():
"""Get global configuration from service.cfg"""
config... | <commit_before>#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""The package that contains groups all the functions needed by other scripts."""
import os.path
import sys
sys.path.insert(0, '../')
import logging
import json
import configparser
def get_configuration():
"""Get global configuration from service.cfg... |
2fbd90a9995e8552e818e53d3b213e4cfef470de | molly/installer/dbcreate.py | molly/installer/dbcreate.py | """
Creates a database for Molly, and appropriate users, once given login
information as super user, or by running as root.
"""
from molly.installer.utils import quiet_exec, CommandFailed
def create(dba_user, dba_pass, username, password, database):
creds = []
if dba_user:
creds += ['-U', dba_use... | """
Creates a database for Molly, and appropriate users, once given login
information as super user, or by running as root.
"""
import os
from molly.installer.utils import quiet_exec, CommandFailed
def create(dba_user, dba_pass, username, password, database):
creds = []
if dba_user:
creds += ['-... | Fix broken setting of postgres password | Fix broken setting of postgres password
| Python | apache-2.0 | mollyproject/mollyproject,mollyproject/mollyproject,mollyproject/mollyproject | """
Creates a database for Molly, and appropriate users, once given login
information as super user, or by running as root.
"""
from molly.installer.utils import quiet_exec, CommandFailed
def create(dba_user, dba_pass, username, password, database):
creds = []
if dba_user:
creds += ['-U', dba_use... | """
Creates a database for Molly, and appropriate users, once given login
information as super user, or by running as root.
"""
import os
from molly.installer.utils import quiet_exec, CommandFailed
def create(dba_user, dba_pass, username, password, database):
creds = []
if dba_user:
creds += ['-... | <commit_before>"""
Creates a database for Molly, and appropriate users, once given login
information as super user, or by running as root.
"""
from molly.installer.utils import quiet_exec, CommandFailed
def create(dba_user, dba_pass, username, password, database):
creds = []
if dba_user:
creds +=... | """
Creates a database for Molly, and appropriate users, once given login
information as super user, or by running as root.
"""
import os
from molly.installer.utils import quiet_exec, CommandFailed
def create(dba_user, dba_pass, username, password, database):
creds = []
if dba_user:
creds += ['-... | """
Creates a database for Molly, and appropriate users, once given login
information as super user, or by running as root.
"""
from molly.installer.utils import quiet_exec, CommandFailed
def create(dba_user, dba_pass, username, password, database):
creds = []
if dba_user:
creds += ['-U', dba_use... | <commit_before>"""
Creates a database for Molly, and appropriate users, once given login
information as super user, or by running as root.
"""
from molly.installer.utils import quiet_exec, CommandFailed
def create(dba_user, dba_pass, username, password, database):
creds = []
if dba_user:
creds +=... |
a7da562df18dc0ad22425d516ed48c93c3211f05 | userena/contrib/umessages/urls.py | userena/contrib/umessages/urls.py | from django.conf.urls import *
from userena.contrib.umessages import views as messages_views
from django.contrib.auth.decorators import login_required
urlpatterns = patterns('',
url(r'^compose/$',
messages_views.message_compose,
name='userena_umessages_compose'),
url(r'^compose/(?P<recipients>... | from django.conf.urls import *
from userena.contrib.umessages import views as messages_views
from django.contrib.auth.decorators import login_required
urlpatterns = patterns('',
url(r'^compose/$',
messages_views.message_compose,
name='userena_umessages_compose'),
url(r'^compose/(?P<recipients>... | Allow @ and - in usernames also in umessages. | Allow @ and - in usernames also in umessages.
| Python | bsd-3-clause | ugoertz/django-userena,ugoertz/django-userena,ugoertz/django-userena | from django.conf.urls import *
from userena.contrib.umessages import views as messages_views
from django.contrib.auth.decorators import login_required
urlpatterns = patterns('',
url(r'^compose/$',
messages_views.message_compose,
name='userena_umessages_compose'),
url(r'^compose/(?P<recipients>... | from django.conf.urls import *
from userena.contrib.umessages import views as messages_views
from django.contrib.auth.decorators import login_required
urlpatterns = patterns('',
url(r'^compose/$',
messages_views.message_compose,
name='userena_umessages_compose'),
url(r'^compose/(?P<recipients>... | <commit_before>from django.conf.urls import *
from userena.contrib.umessages import views as messages_views
from django.contrib.auth.decorators import login_required
urlpatterns = patterns('',
url(r'^compose/$',
messages_views.message_compose,
name='userena_umessages_compose'),
url(r'^compose/... | from django.conf.urls import *
from userena.contrib.umessages import views as messages_views
from django.contrib.auth.decorators import login_required
urlpatterns = patterns('',
url(r'^compose/$',
messages_views.message_compose,
name='userena_umessages_compose'),
url(r'^compose/(?P<recipients>... | from django.conf.urls import *
from userena.contrib.umessages import views as messages_views
from django.contrib.auth.decorators import login_required
urlpatterns = patterns('',
url(r'^compose/$',
messages_views.message_compose,
name='userena_umessages_compose'),
url(r'^compose/(?P<recipients>... | <commit_before>from django.conf.urls import *
from userena.contrib.umessages import views as messages_views
from django.contrib.auth.decorators import login_required
urlpatterns = patterns('',
url(r'^compose/$',
messages_views.message_compose,
name='userena_umessages_compose'),
url(r'^compose/... |
dcbc6c0579871ce3f9b813b0d92f3b7642c750a1 | linter.py | linter.py | from SublimeLinter.lint import Linter, util
class CSSLint(Linter):
cmd = 'csslint --format=compact'
regex = r'''(?xi)
^.+:\s* # filename
# csslint emits errors that pertain to the code as a whole,
# in which case there is no line/col information, so that
# part is optional.
... | from SublimeLinter.lint import Linter, util
class CSSLint(Linter):
cmd = 'csslint --format=compact ${temp_file}'
regex = r'''(?xi)
^.+:\s* # filename
# csslint emits errors that pertain to the code as a whole,
# in which case there is no line/col information, so that
# part ... | Add `${temp_file}` marker to `cmd` | Add `${temp_file}` marker to `cmd`
Implicit adding of the `${temp_file}` by the framework has been deprecated and SublimeLinter also logs about it. | Python | mit | SublimeLinter/SublimeLinter-csslint | from SublimeLinter.lint import Linter, util
class CSSLint(Linter):
cmd = 'csslint --format=compact'
regex = r'''(?xi)
^.+:\s* # filename
# csslint emits errors that pertain to the code as a whole,
# in which case there is no line/col information, so that
# part is optional.
... | from SublimeLinter.lint import Linter, util
class CSSLint(Linter):
cmd = 'csslint --format=compact ${temp_file}'
regex = r'''(?xi)
^.+:\s* # filename
# csslint emits errors that pertain to the code as a whole,
# in which case there is no line/col information, so that
# part ... | <commit_before>from SublimeLinter.lint import Linter, util
class CSSLint(Linter):
cmd = 'csslint --format=compact'
regex = r'''(?xi)
^.+:\s* # filename
# csslint emits errors that pertain to the code as a whole,
# in which case there is no line/col information, so that
# par... | from SublimeLinter.lint import Linter, util
class CSSLint(Linter):
cmd = 'csslint --format=compact ${temp_file}'
regex = r'''(?xi)
^.+:\s* # filename
# csslint emits errors that pertain to the code as a whole,
# in which case there is no line/col information, so that
# part ... | from SublimeLinter.lint import Linter, util
class CSSLint(Linter):
cmd = 'csslint --format=compact'
regex = r'''(?xi)
^.+:\s* # filename
# csslint emits errors that pertain to the code as a whole,
# in which case there is no line/col information, so that
# part is optional.
... | <commit_before>from SublimeLinter.lint import Linter, util
class CSSLint(Linter):
cmd = 'csslint --format=compact'
regex = r'''(?xi)
^.+:\s* # filename
# csslint emits errors that pertain to the code as a whole,
# in which case there is no line/col information, so that
# par... |
64f2720507067d10f298aa50245fa3b7b57a5bd4 | dabuildsys/srcname.py | dabuildsys/srcname.py | #!/usr/bin/python
"""
Code to normalize the source package name specifier into the actual packages.
Returns the package checkouts.
"""
from common import BuildError
import apt
import config
import checkout
def expand_srcname_spec(spec):
"""Parse a list of source packages on which the operation is to be performed... | #!/usr/bin/python
"""
Code to normalize the source package name specifier into the actual packages.
Returns the package checkouts.
"""
from common import BuildError
import apt
import config
import checkout
def expand_srcname_spec(spec):
"""Parse a list of source packages on which the operation is to be performed... | Implement '*' package for all packages in Git | Implement '*' package for all packages in Git
| Python | mit | mit-athena/build-system | #!/usr/bin/python
"""
Code to normalize the source package name specifier into the actual packages.
Returns the package checkouts.
"""
from common import BuildError
import apt
import config
import checkout
def expand_srcname_spec(spec):
"""Parse a list of source packages on which the operation is to be performed... | #!/usr/bin/python
"""
Code to normalize the source package name specifier into the actual packages.
Returns the package checkouts.
"""
from common import BuildError
import apt
import config
import checkout
def expand_srcname_spec(spec):
"""Parse a list of source packages on which the operation is to be performed... | <commit_before>#!/usr/bin/python
"""
Code to normalize the source package name specifier into the actual packages.
Returns the package checkouts.
"""
from common import BuildError
import apt
import config
import checkout
def expand_srcname_spec(spec):
"""Parse a list of source packages on which the operation is ... | #!/usr/bin/python
"""
Code to normalize the source package name specifier into the actual packages.
Returns the package checkouts.
"""
from common import BuildError
import apt
import config
import checkout
def expand_srcname_spec(spec):
"""Parse a list of source packages on which the operation is to be performed... | #!/usr/bin/python
"""
Code to normalize the source package name specifier into the actual packages.
Returns the package checkouts.
"""
from common import BuildError
import apt
import config
import checkout
def expand_srcname_spec(spec):
"""Parse a list of source packages on which the operation is to be performed... | <commit_before>#!/usr/bin/python
"""
Code to normalize the source package name specifier into the actual packages.
Returns the package checkouts.
"""
from common import BuildError
import apt
import config
import checkout
def expand_srcname_spec(spec):
"""Parse a list of source packages on which the operation is ... |
98f26daf7c2c062d3bd72352413641e0df111871 | src/ansible/forms.py | src/ansible/forms.py | from django import forms
from django.conf import settings
from django.forms import ModelForm
from ansible.models import Playbook
class AnsibleForm1(ModelForm):
class Meta:
model = Playbook
fields = ['repository', 'username']
class AnsibleForm2(ModelForm):
class Meta:
model = Playbook
... | from django import forms
from django.core.validators import ValidationError
from django.conf import settings
from django.forms import ModelForm
from ansible.models import Playbook
import utils.playbook as playbook_utils
import os
class AnsibleForm1(ModelForm):
class Meta:
model = Playbook
fields = ... | Use clean_filename to validate if filename is already used | Use clean_filename to validate if filename is already used
| Python | bsd-3-clause | lozadaOmr/ansible-admin,lozadaOmr/ansible-admin,lozadaOmr/ansible-admin | from django import forms
from django.conf import settings
from django.forms import ModelForm
from ansible.models import Playbook
class AnsibleForm1(ModelForm):
class Meta:
model = Playbook
fields = ['repository', 'username']
class AnsibleForm2(ModelForm):
class Meta:
model = Playbook
... | from django import forms
from django.core.validators import ValidationError
from django.conf import settings
from django.forms import ModelForm
from ansible.models import Playbook
import utils.playbook as playbook_utils
import os
class AnsibleForm1(ModelForm):
class Meta:
model = Playbook
fields = ... | <commit_before>from django import forms
from django.conf import settings
from django.forms import ModelForm
from ansible.models import Playbook
class AnsibleForm1(ModelForm):
class Meta:
model = Playbook
fields = ['repository', 'username']
class AnsibleForm2(ModelForm):
class Meta:
mo... | from django import forms
from django.core.validators import ValidationError
from django.conf import settings
from django.forms import ModelForm
from ansible.models import Playbook
import utils.playbook as playbook_utils
import os
class AnsibleForm1(ModelForm):
class Meta:
model = Playbook
fields = ... | from django import forms
from django.conf import settings
from django.forms import ModelForm
from ansible.models import Playbook
class AnsibleForm1(ModelForm):
class Meta:
model = Playbook
fields = ['repository', 'username']
class AnsibleForm2(ModelForm):
class Meta:
model = Playbook
... | <commit_before>from django import forms
from django.conf import settings
from django.forms import ModelForm
from ansible.models import Playbook
class AnsibleForm1(ModelForm):
class Meta:
model = Playbook
fields = ['repository', 'username']
class AnsibleForm2(ModelForm):
class Meta:
mo... |
9fed4624f457f7643ff2aa83921409cb7e580039 | moviealert/forms.py | moviealert/forms.py | from django import forms
from django.conf import settings
from moviealert.base.widgets import CalendarWidget
from .models import TaskList, RegionData
class MovieForm(forms.ModelForm):
def __init__(self, *args, **kwargs):
super(MovieForm, self).__init__(*args, **kwargs)
self.fields['movie_date'] =... | from django import forms
from django.conf import settings
from moviealert.base.widgets import CalendarWidget
from .models import TaskList, RegionData
class MovieForm(forms.ModelForm):
def __init__(self, *args, **kwargs):
super(MovieForm, self).__init__(*args, **kwargs)
self.fields['movie_date'] =... | Disable manual input of date. | Disable manual input of date.
Made the input field read-only to prevent input of date manually. | Python | mit | iAmMrinal0/django_moviealert,iAmMrinal0/django_moviealert,iAmMrinal0/django_moviealert | from django import forms
from django.conf import settings
from moviealert.base.widgets import CalendarWidget
from .models import TaskList, RegionData
class MovieForm(forms.ModelForm):
def __init__(self, *args, **kwargs):
super(MovieForm, self).__init__(*args, **kwargs)
self.fields['movie_date'] =... | from django import forms
from django.conf import settings
from moviealert.base.widgets import CalendarWidget
from .models import TaskList, RegionData
class MovieForm(forms.ModelForm):
def __init__(self, *args, **kwargs):
super(MovieForm, self).__init__(*args, **kwargs)
self.fields['movie_date'] =... | <commit_before>from django import forms
from django.conf import settings
from moviealert.base.widgets import CalendarWidget
from .models import TaskList, RegionData
class MovieForm(forms.ModelForm):
def __init__(self, *args, **kwargs):
super(MovieForm, self).__init__(*args, **kwargs)
self.fields[... | from django import forms
from django.conf import settings
from moviealert.base.widgets import CalendarWidget
from .models import TaskList, RegionData
class MovieForm(forms.ModelForm):
def __init__(self, *args, **kwargs):
super(MovieForm, self).__init__(*args, **kwargs)
self.fields['movie_date'] =... | from django import forms
from django.conf import settings
from moviealert.base.widgets import CalendarWidget
from .models import TaskList, RegionData
class MovieForm(forms.ModelForm):
def __init__(self, *args, **kwargs):
super(MovieForm, self).__init__(*args, **kwargs)
self.fields['movie_date'] =... | <commit_before>from django import forms
from django.conf import settings
from moviealert.base.widgets import CalendarWidget
from .models import TaskList, RegionData
class MovieForm(forms.ModelForm):
def __init__(self, *args, **kwargs):
super(MovieForm, self).__init__(*args, **kwargs)
self.fields[... |
ddb3665a1450e8a1eeee57bbe4b5c0eb7f3f05b1 | molly/utils/management/commands/generate_cache_manifest.py | molly/utils/management/commands/generate_cache_manifest.py | import os
import os.path
from django.core.management.base import NoArgsCommand
from django.conf import settings
class Command(NoArgsCommand):
can_import_settings = True
def handle_noargs(self, **options):
cache_manifest_path = os.path.join(settings.STATIC_ROOT,
... | import os
import os.path
from django.core.management.base import NoArgsCommand
from django.conf import settings
class Command(NoArgsCommand):
can_import_settings = True
def handle_noargs(self, **options):
cache_manifest_path = os.path.join(settings.STATIC_ROOT,
... | Fix cache.manifest generation when desktop app isn't loaded, also don't include unnecessary touchmaplite files (MOLLY-113) | Fix cache.manifest generation when desktop app isn't loaded, also don't include unnecessary touchmaplite files (MOLLY-113)
| Python | apache-2.0 | mollyproject/mollyproject,mollyproject/mollyproject,mollyproject/mollyproject | import os
import os.path
from django.core.management.base import NoArgsCommand
from django.conf import settings
class Command(NoArgsCommand):
can_import_settings = True
def handle_noargs(self, **options):
cache_manifest_path = os.path.join(settings.STATIC_ROOT,
... | import os
import os.path
from django.core.management.base import NoArgsCommand
from django.conf import settings
class Command(NoArgsCommand):
can_import_settings = True
def handle_noargs(self, **options):
cache_manifest_path = os.path.join(settings.STATIC_ROOT,
... | <commit_before>import os
import os.path
from django.core.management.base import NoArgsCommand
from django.conf import settings
class Command(NoArgsCommand):
can_import_settings = True
def handle_noargs(self, **options):
cache_manifest_path = os.path.join(settings.STATIC_ROOT,
... | import os
import os.path
from django.core.management.base import NoArgsCommand
from django.conf import settings
class Command(NoArgsCommand):
can_import_settings = True
def handle_noargs(self, **options):
cache_manifest_path = os.path.join(settings.STATIC_ROOT,
... | import os
import os.path
from django.core.management.base import NoArgsCommand
from django.conf import settings
class Command(NoArgsCommand):
can_import_settings = True
def handle_noargs(self, **options):
cache_manifest_path = os.path.join(settings.STATIC_ROOT,
... | <commit_before>import os
import os.path
from django.core.management.base import NoArgsCommand
from django.conf import settings
class Command(NoArgsCommand):
can_import_settings = True
def handle_noargs(self, **options):
cache_manifest_path = os.path.join(settings.STATIC_ROOT,
... |
e50682cfd285c5de42118245ba8a30f559ef1f20 | rst2pdf/utils.py | rst2pdf/utils.py | #$HeadURL$
#$LastChangedDate$
#$LastChangedRevision$
import sys
from reportlab.platypus import PageBreak, Spacer
from flowables import *
import shlex
from log import log
def parseRaw (data):
'''Parse and process a simple DSL to handle creation of flowables.
Supported (can add others on request):
... | # -*- coding: utf-8 -*-
#$HeadURL$
#$LastChangedDate$
#$LastChangedRevision$
import sys
from reportlab.platypus import PageBreak, Spacer
from flowables import *
import shlex
from log import log
def parseRaw (data):
'''Parse and process a simple DSL to handle creation of flowables.
Supported (can... | Fix encoding (thanks to Yasushi Masuda) | Fix encoding (thanks to Yasushi Masuda)
| Python | mit | thomaspurchas/rst2pdf,thomaspurchas/rst2pdf | #$HeadURL$
#$LastChangedDate$
#$LastChangedRevision$
import sys
from reportlab.platypus import PageBreak, Spacer
from flowables import *
import shlex
from log import log
def parseRaw (data):
'''Parse and process a simple DSL to handle creation of flowables.
Supported (can add others on request):
... | # -*- coding: utf-8 -*-
#$HeadURL$
#$LastChangedDate$
#$LastChangedRevision$
import sys
from reportlab.platypus import PageBreak, Spacer
from flowables import *
import shlex
from log import log
def parseRaw (data):
'''Parse and process a simple DSL to handle creation of flowables.
Supported (can... | <commit_before>#$HeadURL$
#$LastChangedDate$
#$LastChangedRevision$
import sys
from reportlab.platypus import PageBreak, Spacer
from flowables import *
import shlex
from log import log
def parseRaw (data):
'''Parse and process a simple DSL to handle creation of flowables.
Supported (can add others... | # -*- coding: utf-8 -*-
#$HeadURL$
#$LastChangedDate$
#$LastChangedRevision$
import sys
from reportlab.platypus import PageBreak, Spacer
from flowables import *
import shlex
from log import log
def parseRaw (data):
'''Parse and process a simple DSL to handle creation of flowables.
Supported (can... | #$HeadURL$
#$LastChangedDate$
#$LastChangedRevision$
import sys
from reportlab.platypus import PageBreak, Spacer
from flowables import *
import shlex
from log import log
def parseRaw (data):
'''Parse and process a simple DSL to handle creation of flowables.
Supported (can add others on request):
... | <commit_before>#$HeadURL$
#$LastChangedDate$
#$LastChangedRevision$
import sys
from reportlab.platypus import PageBreak, Spacer
from flowables import *
import shlex
from log import log
def parseRaw (data):
'''Parse and process a simple DSL to handle creation of flowables.
Supported (can add others... |
5111a3ec4822598d5c2bf009e26bb0eec49b7743 | sample_config.py | sample_config.py | # Database connection config
# The URI most scrapers will use to access the DB
DB_URI = 'sqlite:///db/data.sqlite'
# The read-only URI the server will use to access the DB
DB_URI_READ_ONLY = 'file:db/data.sqlite?mode=ro'
# Server performance config
# Max time an SQL query can take before it's killed
QUERY_TIMEOUT_SECS... | # Database connection config
# The URI most scrapers will use to access the DB
DB_URI = 'sqlite:///db/data.sqlite'
# The read-only URI the server will use to access the DB
DB_URI_READ_ONLY = 'file:db/data.sqlite?mode=ro'
# Server performance config
# Max time an SQL query can take before it's killed
QUERY_TIMEOUT_SECS... | Add server port to sample config | Add server port to sample config
| Python | mit | mplewis/narcissa | # Database connection config
# The URI most scrapers will use to access the DB
DB_URI = 'sqlite:///db/data.sqlite'
# The read-only URI the server will use to access the DB
DB_URI_READ_ONLY = 'file:db/data.sqlite?mode=ro'
# Server performance config
# Max time an SQL query can take before it's killed
QUERY_TIMEOUT_SECS... | # Database connection config
# The URI most scrapers will use to access the DB
DB_URI = 'sqlite:///db/data.sqlite'
# The read-only URI the server will use to access the DB
DB_URI_READ_ONLY = 'file:db/data.sqlite?mode=ro'
# Server performance config
# Max time an SQL query can take before it's killed
QUERY_TIMEOUT_SECS... | <commit_before># Database connection config
# The URI most scrapers will use to access the DB
DB_URI = 'sqlite:///db/data.sqlite'
# The read-only URI the server will use to access the DB
DB_URI_READ_ONLY = 'file:db/data.sqlite?mode=ro'
# Server performance config
# Max time an SQL query can take before it's killed
QUE... | # Database connection config
# The URI most scrapers will use to access the DB
DB_URI = 'sqlite:///db/data.sqlite'
# The read-only URI the server will use to access the DB
DB_URI_READ_ONLY = 'file:db/data.sqlite?mode=ro'
# Server performance config
# Max time an SQL query can take before it's killed
QUERY_TIMEOUT_SECS... | # Database connection config
# The URI most scrapers will use to access the DB
DB_URI = 'sqlite:///db/data.sqlite'
# The read-only URI the server will use to access the DB
DB_URI_READ_ONLY = 'file:db/data.sqlite?mode=ro'
# Server performance config
# Max time an SQL query can take before it's killed
QUERY_TIMEOUT_SECS... | <commit_before># Database connection config
# The URI most scrapers will use to access the DB
DB_URI = 'sqlite:///db/data.sqlite'
# The read-only URI the server will use to access the DB
DB_URI_READ_ONLY = 'file:db/data.sqlite?mode=ro'
# Server performance config
# Max time an SQL query can take before it's killed
QUE... |
ba3c7e6e2c7fff7ed0c2b51a129b9d7c85eefc6f | helios/__init__.py | helios/__init__.py |
from django.conf import settings
from django.core.urlresolvers import reverse
from helios.views import election_shortcut
TEMPLATE_BASE = settings.HELIOS_TEMPLATE_BASE or "helios/templates/base.html"
# a setting to ensure that only admins can create an election
ADMIN_ONLY = settings.HELIOS_ADMIN_ONLY
# allow upload ... | from django.conf import settings
from django.core.urlresolvers import reverse
TEMPLATE_BASE = settings.HELIOS_TEMPLATE_BASE or "helios/templates/base.html"
# a setting to ensure that only admins can create an election
ADMIN_ONLY = settings.HELIOS_ADMIN_ONLY
# allow upload of voters via CSV?
VOTERS_UPLOAD = settings.... | Remove unused import causing deprecation warning | Remove unused import causing deprecation warning
Warning in the form:
RemovedInDjango19Warning: "ModelXYZ" doesn't declare an explicit app_label
Apparently this happens because it tries to import models before app
configuration runs
| Python | apache-2.0 | shirlei/helios-server,benadida/helios-server,shirlei/helios-server,benadida/helios-server,shirlei/helios-server,benadida/helios-server,benadida/helios-server,benadida/helios-server,shirlei/helios-server,shirlei/helios-server |
from django.conf import settings
from django.core.urlresolvers import reverse
from helios.views import election_shortcut
TEMPLATE_BASE = settings.HELIOS_TEMPLATE_BASE or "helios/templates/base.html"
# a setting to ensure that only admins can create an election
ADMIN_ONLY = settings.HELIOS_ADMIN_ONLY
# allow upload ... | from django.conf import settings
from django.core.urlresolvers import reverse
TEMPLATE_BASE = settings.HELIOS_TEMPLATE_BASE or "helios/templates/base.html"
# a setting to ensure that only admins can create an election
ADMIN_ONLY = settings.HELIOS_ADMIN_ONLY
# allow upload of voters via CSV?
VOTERS_UPLOAD = settings.... | <commit_before>
from django.conf import settings
from django.core.urlresolvers import reverse
from helios.views import election_shortcut
TEMPLATE_BASE = settings.HELIOS_TEMPLATE_BASE or "helios/templates/base.html"
# a setting to ensure that only admins can create an election
ADMIN_ONLY = settings.HELIOS_ADMIN_ONLY
... | from django.conf import settings
from django.core.urlresolvers import reverse
TEMPLATE_BASE = settings.HELIOS_TEMPLATE_BASE or "helios/templates/base.html"
# a setting to ensure that only admins can create an election
ADMIN_ONLY = settings.HELIOS_ADMIN_ONLY
# allow upload of voters via CSV?
VOTERS_UPLOAD = settings.... |
from django.conf import settings
from django.core.urlresolvers import reverse
from helios.views import election_shortcut
TEMPLATE_BASE = settings.HELIOS_TEMPLATE_BASE or "helios/templates/base.html"
# a setting to ensure that only admins can create an election
ADMIN_ONLY = settings.HELIOS_ADMIN_ONLY
# allow upload ... | <commit_before>
from django.conf import settings
from django.core.urlresolvers import reverse
from helios.views import election_shortcut
TEMPLATE_BASE = settings.HELIOS_TEMPLATE_BASE or "helios/templates/base.html"
# a setting to ensure that only admins can create an election
ADMIN_ONLY = settings.HELIOS_ADMIN_ONLY
... |
2a1f1ca653fcd0a8fbaa465ba664da0a1ede6306 | simuvex/s_run.py | simuvex/s_run.py | #!/usr/bin/env python
from .s_ref import RefTypes
import s_options as o
class SimRun:
def __init__(self, options = None, mode = None):
# the options and mode
if options is None:
options = o.default_options[mode]
self.options = options
self.mode = mode
self._exits = [ ]
self._refs = { }
self.option... | #!/usr/bin/env python
from .s_ref import RefTypes
import s_options as o
class SimRun(object):
def __init__(self, options = None, mode = None):
# the options and mode
if options is None:
options = o.default_options[mode]
self.options = options
self.mode = mode
self._exits = [ ]
self._refs = { }
sel... | Make SimRun a new-style Python class. | Make SimRun a new-style Python class.
| Python | bsd-2-clause | chubbymaggie/simuvex,iamahuman/angr,chubbymaggie/angr,chubbymaggie/simuvex,angr/angr,zhuyue1314/simuvex,schieb/angr,iamahuman/angr,angr/angr,tyb0807/angr,f-prettyland/angr,axt/angr,tyb0807/angr,f-prettyland/angr,chubbymaggie/angr,angr/angr,schieb/angr,iamahuman/angr,schieb/angr,tyb0807/angr,angr/simuvex,axt/angr,chubby... | #!/usr/bin/env python
from .s_ref import RefTypes
import s_options as o
class SimRun:
def __init__(self, options = None, mode = None):
# the options and mode
if options is None:
options = o.default_options[mode]
self.options = options
self.mode = mode
self._exits = [ ]
self._refs = { }
self.option... | #!/usr/bin/env python
from .s_ref import RefTypes
import s_options as o
class SimRun(object):
def __init__(self, options = None, mode = None):
# the options and mode
if options is None:
options = o.default_options[mode]
self.options = options
self.mode = mode
self._exits = [ ]
self._refs = { }
sel... | <commit_before>#!/usr/bin/env python
from .s_ref import RefTypes
import s_options as o
class SimRun:
def __init__(self, options = None, mode = None):
# the options and mode
if options is None:
options = o.default_options[mode]
self.options = options
self.mode = mode
self._exits = [ ]
self._refs = { ... | #!/usr/bin/env python
from .s_ref import RefTypes
import s_options as o
class SimRun(object):
def __init__(self, options = None, mode = None):
# the options and mode
if options is None:
options = o.default_options[mode]
self.options = options
self.mode = mode
self._exits = [ ]
self._refs = { }
sel... | #!/usr/bin/env python
from .s_ref import RefTypes
import s_options as o
class SimRun:
def __init__(self, options = None, mode = None):
# the options and mode
if options is None:
options = o.default_options[mode]
self.options = options
self.mode = mode
self._exits = [ ]
self._refs = { }
self.option... | <commit_before>#!/usr/bin/env python
from .s_ref import RefTypes
import s_options as o
class SimRun:
def __init__(self, options = None, mode = None):
# the options and mode
if options is None:
options = o.default_options[mode]
self.options = options
self.mode = mode
self._exits = [ ]
self._refs = { ... |
146e6caf7d47e7ea0bedf057ec9c129818942c07 | mixmind/__init__.py | mixmind/__init__.py | # mixmind/__init__.py
import logging
log = logging.getLogger(__name__)
from flask import Flask
from flask_uploads import UploadSet, DATA, configure_uploads
app = Flask(__name__, instance_relative_config=True)
app.config.from_object('config')
app.config.from_pyfile('config.py')
with open('local_secret') as fp: # TO... | # mixmind/__init__.py
import logging
log = logging.getLogger(__name__)
from flask import Flask
from flask_uploads import UploadSet, DATA, configure_uploads
app = Flask(__name__, instance_relative_config=True)
app.config.from_object('config')
app.config.from_pyfile('config.py')
# flask-uploads
app.config['UPLOADS_D... | Remove other secret lookups from init | Remove other secret lookups from init
| Python | apache-2.0 | twschum/mix-mind,twschum/mix-mind,twschum/mix-mind,twschum/mix-mind | # mixmind/__init__.py
import logging
log = logging.getLogger(__name__)
from flask import Flask
from flask_uploads import UploadSet, DATA, configure_uploads
app = Flask(__name__, instance_relative_config=True)
app.config.from_object('config')
app.config.from_pyfile('config.py')
with open('local_secret') as fp: # TO... | # mixmind/__init__.py
import logging
log = logging.getLogger(__name__)
from flask import Flask
from flask_uploads import UploadSet, DATA, configure_uploads
app = Flask(__name__, instance_relative_config=True)
app.config.from_object('config')
app.config.from_pyfile('config.py')
# flask-uploads
app.config['UPLOADS_D... | <commit_before># mixmind/__init__.py
import logging
log = logging.getLogger(__name__)
from flask import Flask
from flask_uploads import UploadSet, DATA, configure_uploads
app = Flask(__name__, instance_relative_config=True)
app.config.from_object('config')
app.config.from_pyfile('config.py')
with open('local_secre... | # mixmind/__init__.py
import logging
log = logging.getLogger(__name__)
from flask import Flask
from flask_uploads import UploadSet, DATA, configure_uploads
app = Flask(__name__, instance_relative_config=True)
app.config.from_object('config')
app.config.from_pyfile('config.py')
# flask-uploads
app.config['UPLOADS_D... | # mixmind/__init__.py
import logging
log = logging.getLogger(__name__)
from flask import Flask
from flask_uploads import UploadSet, DATA, configure_uploads
app = Flask(__name__, instance_relative_config=True)
app.config.from_object('config')
app.config.from_pyfile('config.py')
with open('local_secret') as fp: # TO... | <commit_before># mixmind/__init__.py
import logging
log = logging.getLogger(__name__)
from flask import Flask
from flask_uploads import UploadSet, DATA, configure_uploads
app = Flask(__name__, instance_relative_config=True)
app.config.from_object('config')
app.config.from_pyfile('config.py')
with open('local_secre... |
0696e73342e994093b887c731eedc20a6d7a82ac | concurrency/test_get_websites.py | concurrency/test_get_websites.py | import unittest
from requests import Request
from unittest.mock import patch, MagicMock
from concurrency.get_websites import load_url as load_url
class MockResponse():
def __init__(self):
self.text = "foo"
self.status_code = 200
class TestGetWebsites(unittest.TestCase):
@patch('concurrency.g... | import unittest
from requests import Request
from unittest.mock import patch, MagicMock
from concurrency.get_websites import load_url as load_url
class MockResponse():
def __init__(self):
self.text = "foo"
self.status_code = 200
class TestGetWebsites(unittest.TestCase):
@patch('concurrency.g... | Fix some typos in concurrency test | Fix some typos in concurrency test
| Python | mit | b-ritter/python-notes,b-ritter/python-notes | import unittest
from requests import Request
from unittest.mock import patch, MagicMock
from concurrency.get_websites import load_url as load_url
class MockResponse():
def __init__(self):
self.text = "foo"
self.status_code = 200
class TestGetWebsites(unittest.TestCase):
@patch('concurrency.g... | import unittest
from requests import Request
from unittest.mock import patch, MagicMock
from concurrency.get_websites import load_url as load_url
class MockResponse():
def __init__(self):
self.text = "foo"
self.status_code = 200
class TestGetWebsites(unittest.TestCase):
@patch('concurrency.g... | <commit_before>import unittest
from requests import Request
from unittest.mock import patch, MagicMock
from concurrency.get_websites import load_url as load_url
class MockResponse():
def __init__(self):
self.text = "foo"
self.status_code = 200
class TestGetWebsites(unittest.TestCase):
@patch... | import unittest
from requests import Request
from unittest.mock import patch, MagicMock
from concurrency.get_websites import load_url as load_url
class MockResponse():
def __init__(self):
self.text = "foo"
self.status_code = 200
class TestGetWebsites(unittest.TestCase):
@patch('concurrency.g... | import unittest
from requests import Request
from unittest.mock import patch, MagicMock
from concurrency.get_websites import load_url as load_url
class MockResponse():
def __init__(self):
self.text = "foo"
self.status_code = 200
class TestGetWebsites(unittest.TestCase):
@patch('concurrency.g... | <commit_before>import unittest
from requests import Request
from unittest.mock import patch, MagicMock
from concurrency.get_websites import load_url as load_url
class MockResponse():
def __init__(self):
self.text = "foo"
self.status_code = 200
class TestGetWebsites(unittest.TestCase):
@patch... |
899882be398f8a31e706a590c0a7e297c1589c25 | threat_intel/util/error_messages.py | threat_intel/util/error_messages.py | # -*- coding: utf-8 -*-
#
# A set of simple methods for writing messages to stderr
#
import sys
from traceback import extract_tb
from traceback import format_list
def write_exception(e):
exc_type, __, exc_traceback = sys.exc_info()
sys.stderr.write('[ERROR] {0} {1}\n'.format(exc_type.__name__, e.message if e.... | # -*- coding: utf-8 -*-
#
# A set of simple methods for writing messages to stderr
#
import sys
from traceback import extract_tb
from traceback import format_list
def write_exception(e):
exc_type, __, exc_traceback = sys.exc_info()
sys.stderr.write('[ERROR] {0} {1}\n'.format(exc_type.__name__, str(e)))
fo... | Fix deprecation warning interfering with tests | Fix deprecation warning interfering with tests
| Python | mit | Yelp/threat_intel,megancarney/threat_intel,SYNchroACK/threat_intel | # -*- coding: utf-8 -*-
#
# A set of simple methods for writing messages to stderr
#
import sys
from traceback import extract_tb
from traceback import format_list
def write_exception(e):
exc_type, __, exc_traceback = sys.exc_info()
sys.stderr.write('[ERROR] {0} {1}\n'.format(exc_type.__name__, e.message if e.... | # -*- coding: utf-8 -*-
#
# A set of simple methods for writing messages to stderr
#
import sys
from traceback import extract_tb
from traceback import format_list
def write_exception(e):
exc_type, __, exc_traceback = sys.exc_info()
sys.stderr.write('[ERROR] {0} {1}\n'.format(exc_type.__name__, str(e)))
fo... | <commit_before># -*- coding: utf-8 -*-
#
# A set of simple methods for writing messages to stderr
#
import sys
from traceback import extract_tb
from traceback import format_list
def write_exception(e):
exc_type, __, exc_traceback = sys.exc_info()
sys.stderr.write('[ERROR] {0} {1}\n'.format(exc_type.__name__, ... | # -*- coding: utf-8 -*-
#
# A set of simple methods for writing messages to stderr
#
import sys
from traceback import extract_tb
from traceback import format_list
def write_exception(e):
exc_type, __, exc_traceback = sys.exc_info()
sys.stderr.write('[ERROR] {0} {1}\n'.format(exc_type.__name__, str(e)))
fo... | # -*- coding: utf-8 -*-
#
# A set of simple methods for writing messages to stderr
#
import sys
from traceback import extract_tb
from traceback import format_list
def write_exception(e):
exc_type, __, exc_traceback = sys.exc_info()
sys.stderr.write('[ERROR] {0} {1}\n'.format(exc_type.__name__, e.message if e.... | <commit_before># -*- coding: utf-8 -*-
#
# A set of simple methods for writing messages to stderr
#
import sys
from traceback import extract_tb
from traceback import format_list
def write_exception(e):
exc_type, __, exc_traceback = sys.exc_info()
sys.stderr.write('[ERROR] {0} {1}\n'.format(exc_type.__name__, ... |
8e41709078885313b12f3b6e619573851a21be19 | scripts/check_env.py | scripts/check_env.py | #!/usr/bin/env python
"""Computational environment check script for 2014 SciPy Conference Tutorial:
Reproducible Research: Walking the Walk.
https://github.com/reproducible-research/scipy-tutorial-2014
"""
import sys
import subprocess
return_value = 0
required_packages = ['numpy', 'scipy', 'matplotlib', 'SimpleIT... | #!/usr/bin/env python
"""Computational environment check script for 2014 SciPy Conference Tutorial:
Reproducible Research: Walking the Walk.
https://github.com/reproducible-research/scipy-tutorial-2014
"""
import sys
import subprocess
return_value = 0
required_packages = ['numpy', 'scipy', 'matplotlib', 'SimpleIT... | Add ffmpeg to the required environment. | Add ffmpeg to the required environment.
| Python | apache-2.0 | 5x5x5x5/ReproTutorial,5x5x5x5/ReproTutorial,reproducible-research/scipy-tutorial-2014,reproducible-research/scipy-tutorial-2014,5x5x5x5/ReproTutorial,reproducible-research/scipy-tutorial-2014 | #!/usr/bin/env python
"""Computational environment check script for 2014 SciPy Conference Tutorial:
Reproducible Research: Walking the Walk.
https://github.com/reproducible-research/scipy-tutorial-2014
"""
import sys
import subprocess
return_value = 0
required_packages = ['numpy', 'scipy', 'matplotlib', 'SimpleIT... | #!/usr/bin/env python
"""Computational environment check script for 2014 SciPy Conference Tutorial:
Reproducible Research: Walking the Walk.
https://github.com/reproducible-research/scipy-tutorial-2014
"""
import sys
import subprocess
return_value = 0
required_packages = ['numpy', 'scipy', 'matplotlib', 'SimpleIT... | <commit_before>#!/usr/bin/env python
"""Computational environment check script for 2014 SciPy Conference Tutorial:
Reproducible Research: Walking the Walk.
https://github.com/reproducible-research/scipy-tutorial-2014
"""
import sys
import subprocess
return_value = 0
required_packages = ['numpy', 'scipy', 'matplot... | #!/usr/bin/env python
"""Computational environment check script for 2014 SciPy Conference Tutorial:
Reproducible Research: Walking the Walk.
https://github.com/reproducible-research/scipy-tutorial-2014
"""
import sys
import subprocess
return_value = 0
required_packages = ['numpy', 'scipy', 'matplotlib', 'SimpleIT... | #!/usr/bin/env python
"""Computational environment check script for 2014 SciPy Conference Tutorial:
Reproducible Research: Walking the Walk.
https://github.com/reproducible-research/scipy-tutorial-2014
"""
import sys
import subprocess
return_value = 0
required_packages = ['numpy', 'scipy', 'matplotlib', 'SimpleIT... | <commit_before>#!/usr/bin/env python
"""Computational environment check script for 2014 SciPy Conference Tutorial:
Reproducible Research: Walking the Walk.
https://github.com/reproducible-research/scipy-tutorial-2014
"""
import sys
import subprocess
return_value = 0
required_packages = ['numpy', 'scipy', 'matplot... |
62c87379d0f4fa7cf6fc9619426fef484c918a27 | fp/fp/urls.py | fp/fp/urls.py | from __future__ import unicode_literals
from django.conf.urls import patterns, include, url
from django.contrib import admin
admin.autodiscover()
urlpatterns = patterns('',
# Examples:
# url(r'^$', 'fp.views.home', name='home'),
# url(r'^blog/', include('blog.urls')),
url(r'^admin/', include(admin... | from __future__ import unicode_literals
from django.conf import settings
from django.conf.urls import patterns, include, url
from django.conf.urls.static import static
from django.contrib import admin
from django.contrib.staticfiles.urls import staticfiles_urlpatterns
admin.autodiscover()
urlpatterns = patterns(''... | Add django media file serving in debug mode | Add django media file serving in debug mode
| Python | mit | j7nn7k/www.flashpacker.io | from __future__ import unicode_literals
from django.conf.urls import patterns, include, url
from django.contrib import admin
admin.autodiscover()
urlpatterns = patterns('',
# Examples:
# url(r'^$', 'fp.views.home', name='home'),
# url(r'^blog/', include('blog.urls')),
url(r'^admin/', include(admin... | from __future__ import unicode_literals
from django.conf import settings
from django.conf.urls import patterns, include, url
from django.conf.urls.static import static
from django.contrib import admin
from django.contrib.staticfiles.urls import staticfiles_urlpatterns
admin.autodiscover()
urlpatterns = patterns(''... | <commit_before>from __future__ import unicode_literals
from django.conf.urls import patterns, include, url
from django.contrib import admin
admin.autodiscover()
urlpatterns = patterns('',
# Examples:
# url(r'^$', 'fp.views.home', name='home'),
# url(r'^blog/', include('blog.urls')),
url(r'^admin/'... | from __future__ import unicode_literals
from django.conf import settings
from django.conf.urls import patterns, include, url
from django.conf.urls.static import static
from django.contrib import admin
from django.contrib.staticfiles.urls import staticfiles_urlpatterns
admin.autodiscover()
urlpatterns = patterns(''... | from __future__ import unicode_literals
from django.conf.urls import patterns, include, url
from django.contrib import admin
admin.autodiscover()
urlpatterns = patterns('',
# Examples:
# url(r'^$', 'fp.views.home', name='home'),
# url(r'^blog/', include('blog.urls')),
url(r'^admin/', include(admin... | <commit_before>from __future__ import unicode_literals
from django.conf.urls import patterns, include, url
from django.contrib import admin
admin.autodiscover()
urlpatterns = patterns('',
# Examples:
# url(r'^$', 'fp.views.home', name='home'),
# url(r'^blog/', include('blog.urls')),
url(r'^admin/'... |
062c39492a9a7965c94930479f721b321bff051b | tbmodels/__init__.py | tbmodels/__init__.py | # -*- coding: utf-8 -*-
# (c) 2015-2018, ETH Zurich, Institut fuer Theoretische Physik
# Author: Dominik Gresch <[email protected]>
r"""
TBmodels is a tool for creating / loading and manipulating tight-binding models.
"""
__version__ = '1.3.1'
# import order is important due to circular imports
from . import helpers
fr... | # -*- coding: utf-8 -*-
# (c) 2015-2018, ETH Zurich, Institut fuer Theoretische Physik
# Author: Dominik Gresch <[email protected]>
r"""
TBmodels is a tool for creating / loading and manipulating tight-binding models.
"""
__version__ = '1.3.2a1'
# import order is important due to circular imports
from . import helpers
... | Change version number to 1.3.2a1 | Change version number to 1.3.2a1
| Python | apache-2.0 | Z2PackDev/TBmodels,Z2PackDev/TBmodels | # -*- coding: utf-8 -*-
# (c) 2015-2018, ETH Zurich, Institut fuer Theoretische Physik
# Author: Dominik Gresch <[email protected]>
r"""
TBmodels is a tool for creating / loading and manipulating tight-binding models.
"""
__version__ = '1.3.1'
# import order is important due to circular imports
from . import helpers
fr... | # -*- coding: utf-8 -*-
# (c) 2015-2018, ETH Zurich, Institut fuer Theoretische Physik
# Author: Dominik Gresch <[email protected]>
r"""
TBmodels is a tool for creating / loading and manipulating tight-binding models.
"""
__version__ = '1.3.2a1'
# import order is important due to circular imports
from . import helpers
... | <commit_before># -*- coding: utf-8 -*-
# (c) 2015-2018, ETH Zurich, Institut fuer Theoretische Physik
# Author: Dominik Gresch <[email protected]>
r"""
TBmodels is a tool for creating / loading and manipulating tight-binding models.
"""
__version__ = '1.3.1'
# import order is important due to circular imports
from . im... | # -*- coding: utf-8 -*-
# (c) 2015-2018, ETH Zurich, Institut fuer Theoretische Physik
# Author: Dominik Gresch <[email protected]>
r"""
TBmodels is a tool for creating / loading and manipulating tight-binding models.
"""
__version__ = '1.3.2a1'
# import order is important due to circular imports
from . import helpers
... | # -*- coding: utf-8 -*-
# (c) 2015-2018, ETH Zurich, Institut fuer Theoretische Physik
# Author: Dominik Gresch <[email protected]>
r"""
TBmodels is a tool for creating / loading and manipulating tight-binding models.
"""
__version__ = '1.3.1'
# import order is important due to circular imports
from . import helpers
fr... | <commit_before># -*- coding: utf-8 -*-
# (c) 2015-2018, ETH Zurich, Institut fuer Theoretische Physik
# Author: Dominik Gresch <[email protected]>
r"""
TBmodels is a tool for creating / loading and manipulating tight-binding models.
"""
__version__ = '1.3.1'
# import order is important due to circular imports
from . im... |
b7514ff97118f3bd0a22d620659d307226e0d1fd | apps/domain/src/main/core/node.py | apps/domain/src/main/core/node.py | from syft.core.node.domain.domain import Domain
node = Domain(name="om-domain")
| from syft.grid.grid_client import connect
from syft.core.node.domain.domain import Domain
from syft.core.node.device.client import DeviceClient
from syft.grid.connections.http_connection import HTTPConnection
from syft.grid.services.worker_management_service import CreateWorkerService
node = Domain(name="om-domain")
n... | ADD a new worker connection | ADD a new worker connection
| Python | apache-2.0 | OpenMined/PySyft,OpenMined/PySyft,OpenMined/PySyft,OpenMined/PySyft | from syft.core.node.domain.domain import Domain
node = Domain(name="om-domain")
ADD a new worker connection | from syft.grid.grid_client import connect
from syft.core.node.domain.domain import Domain
from syft.core.node.device.client import DeviceClient
from syft.grid.connections.http_connection import HTTPConnection
from syft.grid.services.worker_management_service import CreateWorkerService
node = Domain(name="om-domain")
n... | <commit_before>from syft.core.node.domain.domain import Domain
node = Domain(name="om-domain")
<commit_msg>ADD a new worker connection<commit_after> | from syft.grid.grid_client import connect
from syft.core.node.domain.domain import Domain
from syft.core.node.device.client import DeviceClient
from syft.grid.connections.http_connection import HTTPConnection
from syft.grid.services.worker_management_service import CreateWorkerService
node = Domain(name="om-domain")
n... | from syft.core.node.domain.domain import Domain
node = Domain(name="om-domain")
ADD a new worker connectionfrom syft.grid.grid_client import connect
from syft.core.node.domain.domain import Domain
from syft.core.node.device.client import DeviceClient
from syft.grid.connections.http_connection import HTTPConnection
fro... | <commit_before>from syft.core.node.domain.domain import Domain
node = Domain(name="om-domain")
<commit_msg>ADD a new worker connection<commit_after>from syft.grid.grid_client import connect
from syft.core.node.domain.domain import Domain
from syft.core.node.device.client import DeviceClient
from syft.grid.connections.... |
bcd7df79484fa7ca5b6a2d09b6496522dcfcd608 | laikia_core/runme.py | laikia_core/runme.py | from ship import ship
from event import event
from character import character
from item import item
def main():
#Build ship
laika = ship("Laika", 100.0, 100.0, 100.0)
character_list = []
event_solar_flare = event("Solar Flare", "Solar Flare hit, damaging com system", -10, 0, 0)
event_oxyg... | from ship import ship
from event import event
from character import character
from item import item
def main():
#Build ship
laika = ship("Laika", 100.0, 100.0, 100.0)
character_list = []
event_list = []
item_list = []
#TODO load these from a file
event_list.append(event("Solar Flare",... | Build event and item lists | Build event and item lists
| Python | mit | jtdressel/laika | from ship import ship
from event import event
from character import character
from item import item
def main():
#Build ship
laika = ship("Laika", 100.0, 100.0, 100.0)
character_list = []
event_solar_flare = event("Solar Flare", "Solar Flare hit, damaging com system", -10, 0, 0)
event_oxyg... | from ship import ship
from event import event
from character import character
from item import item
def main():
#Build ship
laika = ship("Laika", 100.0, 100.0, 100.0)
character_list = []
event_list = []
item_list = []
#TODO load these from a file
event_list.append(event("Solar Flare",... | <commit_before>from ship import ship
from event import event
from character import character
from item import item
def main():
#Build ship
laika = ship("Laika", 100.0, 100.0, 100.0)
character_list = []
event_solar_flare = event("Solar Flare", "Solar Flare hit, damaging com system", -10, 0, 0)... | from ship import ship
from event import event
from character import character
from item import item
def main():
#Build ship
laika = ship("Laika", 100.0, 100.0, 100.0)
character_list = []
event_list = []
item_list = []
#TODO load these from a file
event_list.append(event("Solar Flare",... | from ship import ship
from event import event
from character import character
from item import item
def main():
#Build ship
laika = ship("Laika", 100.0, 100.0, 100.0)
character_list = []
event_solar_flare = event("Solar Flare", "Solar Flare hit, damaging com system", -10, 0, 0)
event_oxyg... | <commit_before>from ship import ship
from event import event
from character import character
from item import item
def main():
#Build ship
laika = ship("Laika", 100.0, 100.0, 100.0)
character_list = []
event_solar_flare = event("Solar Flare", "Solar Flare hit, damaging com system", -10, 0, 0)... |
2fc65f543ba1b2d0bd52152ddaf78feb5e7594c4 | test/test_product.py | test/test_product.py | from polypy.base import x
def test_call():
f = 2 * x
assert f(2) == 4
f = 3 * x ** 2
assert f(3) == 27
def test_str():
f = 2 * x
assert str(f) == "2x"
f = x * 2
assert str(f) == "2x"
def test_square():
f = x
assert f * x == x ** 2
f = 3 * x
assert f ** 2 == 9 * x... | from polypy.base import x
def test_call():
f = 2 * x
assert f(2) == 4
f = 3 * x ** 2
assert f(3) == 27
def test_str():
f = 2 * x
assert str(f) == "2x"
f = x * 2
assert str(f) == "2x"
def test_square():
f = x
assert f * x == x ** 2
f = 3 * x
assert f ** 2 == 9 * x... | Add test for multiplying linear terms | Add test for multiplying linear terms
| Python | mit | LordDarkula/polypy | from polypy.base import x
def test_call():
f = 2 * x
assert f(2) == 4
f = 3 * x ** 2
assert f(3) == 27
def test_str():
f = 2 * x
assert str(f) == "2x"
f = x * 2
assert str(f) == "2x"
def test_square():
f = x
assert f * x == x ** 2
f = 3 * x
assert f ** 2 == 9 * x... | from polypy.base import x
def test_call():
f = 2 * x
assert f(2) == 4
f = 3 * x ** 2
assert f(3) == 27
def test_str():
f = 2 * x
assert str(f) == "2x"
f = x * 2
assert str(f) == "2x"
def test_square():
f = x
assert f * x == x ** 2
f = 3 * x
assert f ** 2 == 9 * x... | <commit_before>from polypy.base import x
def test_call():
f = 2 * x
assert f(2) == 4
f = 3 * x ** 2
assert f(3) == 27
def test_str():
f = 2 * x
assert str(f) == "2x"
f = x * 2
assert str(f) == "2x"
def test_square():
f = x
assert f * x == x ** 2
f = 3 * x
assert ... | from polypy.base import x
def test_call():
f = 2 * x
assert f(2) == 4
f = 3 * x ** 2
assert f(3) == 27
def test_str():
f = 2 * x
assert str(f) == "2x"
f = x * 2
assert str(f) == "2x"
def test_square():
f = x
assert f * x == x ** 2
f = 3 * x
assert f ** 2 == 9 * x... | from polypy.base import x
def test_call():
f = 2 * x
assert f(2) == 4
f = 3 * x ** 2
assert f(3) == 27
def test_str():
f = 2 * x
assert str(f) == "2x"
f = x * 2
assert str(f) == "2x"
def test_square():
f = x
assert f * x == x ** 2
f = 3 * x
assert f ** 2 == 9 * x... | <commit_before>from polypy.base import x
def test_call():
f = 2 * x
assert f(2) == 4
f = 3 * x ** 2
assert f(3) == 27
def test_str():
f = 2 * x
assert str(f) == "2x"
f = x * 2
assert str(f) == "2x"
def test_square():
f = x
assert f * x == x ** 2
f = 3 * x
assert ... |
974cd48f1954f78be4b1766445ed9b91d391cd64 | slackclient/_util.py | slackclient/_util.py | class SearchList(list):
def find(self, name):
items = []
for child in self:
if child.__class__ == self.__class__:
items += child.find(name)
else:
if child == name:
items.append(child)
if len(items) == 1:
... | class SearchList(list):
def find(self, name):
items = []
for child in self:
if child.__class__ == self.__class__:
items += child.find(name)
else:
if child == name:
items.append(child)
if len(items) == 1:
... | Simplify expression, add explicit return value | Simplify expression, add explicit return value
| Python | mit | slackhq/python-slackclient,slackapi/python-slackclient,slackapi/python-slackclient,slackapi/python-slackclient | class SearchList(list):
def find(self, name):
items = []
for child in self:
if child.__class__ == self.__class__:
items += child.find(name)
else:
if child == name:
items.append(child)
if len(items) == 1:
... | class SearchList(list):
def find(self, name):
items = []
for child in self:
if child.__class__ == self.__class__:
items += child.find(name)
else:
if child == name:
items.append(child)
if len(items) == 1:
... | <commit_before>class SearchList(list):
def find(self, name):
items = []
for child in self:
if child.__class__ == self.__class__:
items += child.find(name)
else:
if child == name:
items.append(child)
if len(items) =... | class SearchList(list):
def find(self, name):
items = []
for child in self:
if child.__class__ == self.__class__:
items += child.find(name)
else:
if child == name:
items.append(child)
if len(items) == 1:
... | class SearchList(list):
def find(self, name):
items = []
for child in self:
if child.__class__ == self.__class__:
items += child.find(name)
else:
if child == name:
items.append(child)
if len(items) == 1:
... | <commit_before>class SearchList(list):
def find(self, name):
items = []
for child in self:
if child.__class__ == self.__class__:
items += child.find(name)
else:
if child == name:
items.append(child)
if len(items) =... |
19c1e83d3de979495fe12d3034fe4853a181039c | spacy/it/__init__.py | spacy/it/__init__.py | from __future__ import unicode_literals, print_function
from os import path
from ..language import Language
class Italian(Language):
pass
| from __future__ import unicode_literals, print_function
from os import path
from ..language import Language
from ..attrs import LANG
from . import language_data
class German(Language):
lang = 'it'
class Defaults(Language.Defaults):
tokenizer_exceptions = dict(language_data.TOKENIZER_EXCEPTIONS)... | Work on draft Italian tokenizer | Work on draft Italian tokenizer
| Python | mit | explosion/spaCy,banglakit/spaCy,aikramer2/spaCy,raphael0202/spaCy,explosion/spaCy,explosion/spaCy,honnibal/spaCy,spacy-io/spaCy,oroszgy/spaCy.hu,oroszgy/spaCy.hu,aikramer2/spaCy,spacy-io/spaCy,raphael0202/spaCy,Gregory-Howard/spaCy,recognai/spaCy,Gregory-Howard/spaCy,Gregory-Howard/spaCy,aikramer2/spaCy,recognai/spaCy,... | from __future__ import unicode_literals, print_function
from os import path
from ..language import Language
class Italian(Language):
pass
Work on draft Italian tokenizer | from __future__ import unicode_literals, print_function
from os import path
from ..language import Language
from ..attrs import LANG
from . import language_data
class German(Language):
lang = 'it'
class Defaults(Language.Defaults):
tokenizer_exceptions = dict(language_data.TOKENIZER_EXCEPTIONS)... | <commit_before>from __future__ import unicode_literals, print_function
from os import path
from ..language import Language
class Italian(Language):
pass
<commit_msg>Work on draft Italian tokenizer<commit_after> | from __future__ import unicode_literals, print_function
from os import path
from ..language import Language
from ..attrs import LANG
from . import language_data
class German(Language):
lang = 'it'
class Defaults(Language.Defaults):
tokenizer_exceptions = dict(language_data.TOKENIZER_EXCEPTIONS)... | from __future__ import unicode_literals, print_function
from os import path
from ..language import Language
class Italian(Language):
pass
Work on draft Italian tokenizerfrom __future__ import unicode_literals, print_function
from os import path
from ..language import Language
from ..attrs import LANG
from . i... | <commit_before>from __future__ import unicode_literals, print_function
from os import path
from ..language import Language
class Italian(Language):
pass
<commit_msg>Work on draft Italian tokenizer<commit_after>from __future__ import unicode_literals, print_function
from os import path
from ..language import L... |
81dd1c4792bca93c9df8d7acd3042c99877bff9b | spyonweb/spyonweb.py | spyonweb/spyonweb.py | import os
import requests
class spyonweb(object):
def __init__(self, token, url=None):
self.token = token
if url:
self.url = url
else:
self.url = "https://api.spyonweb.com/v1/"
def summary(self, domain_name):
data = requests.get(self.url + "summary/" ... | import os
from argparse import ArgumentParser
import requests
class spyonweb(object):
def __init__(self, token, url=None):
self.token = token
if url:
self.url = url
else:
self.url = "https://api.spyonweb.com/v1/"
def summary(self, domain_name):
data =... | Implement basic command line parsing | Implement basic command line parsing
| Python | apache-2.0 | krmaxwell/spyonweb | import os
import requests
class spyonweb(object):
def __init__(self, token, url=None):
self.token = token
if url:
self.url = url
else:
self.url = "https://api.spyonweb.com/v1/"
def summary(self, domain_name):
data = requests.get(self.url + "summary/" ... | import os
from argparse import ArgumentParser
import requests
class spyonweb(object):
def __init__(self, token, url=None):
self.token = token
if url:
self.url = url
else:
self.url = "https://api.spyonweb.com/v1/"
def summary(self, domain_name):
data =... | <commit_before>import os
import requests
class spyonweb(object):
def __init__(self, token, url=None):
self.token = token
if url:
self.url = url
else:
self.url = "https://api.spyonweb.com/v1/"
def summary(self, domain_name):
data = requests.get(self.ur... | import os
from argparse import ArgumentParser
import requests
class spyonweb(object):
def __init__(self, token, url=None):
self.token = token
if url:
self.url = url
else:
self.url = "https://api.spyonweb.com/v1/"
def summary(self, domain_name):
data =... | import os
import requests
class spyonweb(object):
def __init__(self, token, url=None):
self.token = token
if url:
self.url = url
else:
self.url = "https://api.spyonweb.com/v1/"
def summary(self, domain_name):
data = requests.get(self.url + "summary/" ... | <commit_before>import os
import requests
class spyonweb(object):
def __init__(self, token, url=None):
self.token = token
if url:
self.url = url
else:
self.url = "https://api.spyonweb.com/v1/"
def summary(self, domain_name):
data = requests.get(self.ur... |
72f4dc35375ba001c2b1dbaca4d0914dc2c4de9d | tests/test_compat.py | tests/test_compat.py | import pytest
from django.test import TestCase
from rest_framework.request import Request
from rest_framework.test import APIRequestFactory
from rest_framework.parsers import JSONParser
from rest_framework.exceptions import ParseError
from rest_framework_jwt.compat import get_request_data
class CompatTests(TestCase)... | import pytest
from django.test import TestCase
from rest_framework.request import Request
from rest_framework.test import APIRequestFactory
from rest_framework.parsers import JSONParser
from rest_framework.exceptions import ParseError
from rest_framework_jwt.compat import get_request_data
class CompatTests(TestCase)... | Add test empty json post data | Add test empty json post data
| Python | mit | shanemgrey/django-rest-framework-jwt,GetBlimp/django-rest-framework-jwt,ArabellaTech/django-rest-framework-jwt,orf/django-rest-framework-jwt,blaklites/django-rest-framework-jwt,plentific/django-rest-framework-jwt | import pytest
from django.test import TestCase
from rest_framework.request import Request
from rest_framework.test import APIRequestFactory
from rest_framework.parsers import JSONParser
from rest_framework.exceptions import ParseError
from rest_framework_jwt.compat import get_request_data
class CompatTests(TestCase)... | import pytest
from django.test import TestCase
from rest_framework.request import Request
from rest_framework.test import APIRequestFactory
from rest_framework.parsers import JSONParser
from rest_framework.exceptions import ParseError
from rest_framework_jwt.compat import get_request_data
class CompatTests(TestCase)... | <commit_before>import pytest
from django.test import TestCase
from rest_framework.request import Request
from rest_framework.test import APIRequestFactory
from rest_framework.parsers import JSONParser
from rest_framework.exceptions import ParseError
from rest_framework_jwt.compat import get_request_data
class Compat... | import pytest
from django.test import TestCase
from rest_framework.request import Request
from rest_framework.test import APIRequestFactory
from rest_framework.parsers import JSONParser
from rest_framework.exceptions import ParseError
from rest_framework_jwt.compat import get_request_data
class CompatTests(TestCase)... | import pytest
from django.test import TestCase
from rest_framework.request import Request
from rest_framework.test import APIRequestFactory
from rest_framework.parsers import JSONParser
from rest_framework.exceptions import ParseError
from rest_framework_jwt.compat import get_request_data
class CompatTests(TestCase)... | <commit_before>import pytest
from django.test import TestCase
from rest_framework.request import Request
from rest_framework.test import APIRequestFactory
from rest_framework.parsers import JSONParser
from rest_framework.exceptions import ParseError
from rest_framework_jwt.compat import get_request_data
class Compat... |
a2084c42850a29c417f2a9caf9dc1c56a7945e6b | backend/scripts/create_training_demos.py | backend/scripts/create_training_demos.py | #!/usr/bin/env python
import rethinkdb as r
import os
if __name__ == "__main__":
conn = r.connect('localhost', 30815, db='materialscommons')
apikeys = r.table('users').pluck('apikey', 'id').run(conn)
for k in apikeys:
command = "curl -XPUT http://mctest.localhost/api/v2/users/%s/create_demo_project... | #!/usr/bin/env python
import rethinkdb as r
import os
if __name__ == "__main__":
conn = r.connect('localhost', 30815, db='materialscommons')
apikeys = r.table('users').pluck('apikey', 'id').run(conn)
for k in apikeys:
command = "curl -k -XPUT https://test.materialscommons.org/api/v2/users/%s/create... | Change url to test and add -k flag to ignore certificate | Change url to test and add -k flag to ignore certificate
| Python | mit | materials-commons/materialscommons.org,materials-commons/materialscommons.org,materials-commons/materialscommons.org,materials-commons/materialscommons.org,materials-commons/materialscommons.org | #!/usr/bin/env python
import rethinkdb as r
import os
if __name__ == "__main__":
conn = r.connect('localhost', 30815, db='materialscommons')
apikeys = r.table('users').pluck('apikey', 'id').run(conn)
for k in apikeys:
command = "curl -XPUT http://mctest.localhost/api/v2/users/%s/create_demo_project... | #!/usr/bin/env python
import rethinkdb as r
import os
if __name__ == "__main__":
conn = r.connect('localhost', 30815, db='materialscommons')
apikeys = r.table('users').pluck('apikey', 'id').run(conn)
for k in apikeys:
command = "curl -k -XPUT https://test.materialscommons.org/api/v2/users/%s/create... | <commit_before>#!/usr/bin/env python
import rethinkdb as r
import os
if __name__ == "__main__":
conn = r.connect('localhost', 30815, db='materialscommons')
apikeys = r.table('users').pluck('apikey', 'id').run(conn)
for k in apikeys:
command = "curl -XPUT http://mctest.localhost/api/v2/users/%s/crea... | #!/usr/bin/env python
import rethinkdb as r
import os
if __name__ == "__main__":
conn = r.connect('localhost', 30815, db='materialscommons')
apikeys = r.table('users').pluck('apikey', 'id').run(conn)
for k in apikeys:
command = "curl -k -XPUT https://test.materialscommons.org/api/v2/users/%s/create... | #!/usr/bin/env python
import rethinkdb as r
import os
if __name__ == "__main__":
conn = r.connect('localhost', 30815, db='materialscommons')
apikeys = r.table('users').pluck('apikey', 'id').run(conn)
for k in apikeys:
command = "curl -XPUT http://mctest.localhost/api/v2/users/%s/create_demo_project... | <commit_before>#!/usr/bin/env python
import rethinkdb as r
import os
if __name__ == "__main__":
conn = r.connect('localhost', 30815, db='materialscommons')
apikeys = r.table('users').pluck('apikey', 'id').run(conn)
for k in apikeys:
command = "curl -XPUT http://mctest.localhost/api/v2/users/%s/crea... |
0ae513c9ea37e04deb3c72d0c61ca480a8c62266 | lpthw/ex24.py | lpthw/ex24.py | print "Let's practice everything."
print "You\'d need to know \'bout escapes with \\ that do \n newlines and \t tabs."
poem = """
\t the lovely world
wtih logic so firmly planted
cannot discern \n the needs of love
nor comprehend passion from intuition
and requires an explanation
\n\t\twhere there is none.
"""
print ... | print "Let's practice everything."
print "You\'d need to know \'bout escapes with \\ that do \n newlines and \t tabs."
poem = """
\t the lovely world
wtih logic so firmly planted
cannot discern \n the needs of love
nor comprehend passion from intuition
and requires an explanation
\n\t\twhere there is none.
"""
print ... | Comment for a slick little trick. | Comment for a slick little trick.
| Python | mit | jaredmanning/learning,jaredmanning/learning | print "Let's practice everything."
print "You\'d need to know \'bout escapes with \\ that do \n newlines and \t tabs."
poem = """
\t the lovely world
wtih logic so firmly planted
cannot discern \n the needs of love
nor comprehend passion from intuition
and requires an explanation
\n\t\twhere there is none.
"""
print ... | print "Let's practice everything."
print "You\'d need to know \'bout escapes with \\ that do \n newlines and \t tabs."
poem = """
\t the lovely world
wtih logic so firmly planted
cannot discern \n the needs of love
nor comprehend passion from intuition
and requires an explanation
\n\t\twhere there is none.
"""
print ... | <commit_before>print "Let's practice everything."
print "You\'d need to know \'bout escapes with \\ that do \n newlines and \t tabs."
poem = """
\t the lovely world
wtih logic so firmly planted
cannot discern \n the needs of love
nor comprehend passion from intuition
and requires an explanation
\n\t\twhere there is no... | print "Let's practice everything."
print "You\'d need to know \'bout escapes with \\ that do \n newlines and \t tabs."
poem = """
\t the lovely world
wtih logic so firmly planted
cannot discern \n the needs of love
nor comprehend passion from intuition
and requires an explanation
\n\t\twhere there is none.
"""
print ... | print "Let's practice everything."
print "You\'d need to know \'bout escapes with \\ that do \n newlines and \t tabs."
poem = """
\t the lovely world
wtih logic so firmly planted
cannot discern \n the needs of love
nor comprehend passion from intuition
and requires an explanation
\n\t\twhere there is none.
"""
print ... | <commit_before>print "Let's practice everything."
print "You\'d need to know \'bout escapes with \\ that do \n newlines and \t tabs."
poem = """
\t the lovely world
wtih logic so firmly planted
cannot discern \n the needs of love
nor comprehend passion from intuition
and requires an explanation
\n\t\twhere there is no... |
fcc4546a736fd6adacf6f7fe0261a1c6304c931c | src/ipf/ipfblock/connection.py | src/ipf/ipfblock/connection.py | # -*- coding: utf-8 -*-
import ioport
class Connection(object):
""" Connection class for IPFBlock
Connection binding OPort and IPort of some IPFBlocks
"""
def __init__(self, oport, iport):
# Check port compatibility and free of input port
if ioport.is_connect_allowed(oport,... | # -*- coding: utf-8 -*-
import ioport
import weakref
class Connection(object):
""" Connection class for IPFBlock
Connection binding OPort and IPort of some IPFBlocks
"""
def __init__(self, oport, iport):
# Check port compatibility and free of input port
if ioport.is_connect... | Change _oport and _iport to weakref for prevention of loop references | Change _oport and _iport to weakref for prevention of loop references
| Python | lgpl-2.1 | anton-golubkov/Garland,anton-golubkov/Garland | # -*- coding: utf-8 -*-
import ioport
class Connection(object):
""" Connection class for IPFBlock
Connection binding OPort and IPort of some IPFBlocks
"""
def __init__(self, oport, iport):
# Check port compatibility and free of input port
if ioport.is_connect_allowed(oport,... | # -*- coding: utf-8 -*-
import ioport
import weakref
class Connection(object):
""" Connection class for IPFBlock
Connection binding OPort and IPort of some IPFBlocks
"""
def __init__(self, oport, iport):
# Check port compatibility and free of input port
if ioport.is_connect... | <commit_before># -*- coding: utf-8 -*-
import ioport
class Connection(object):
""" Connection class for IPFBlock
Connection binding OPort and IPort of some IPFBlocks
"""
def __init__(self, oport, iport):
# Check port compatibility and free of input port
if ioport.is_connect... | # -*- coding: utf-8 -*-
import ioport
import weakref
class Connection(object):
""" Connection class for IPFBlock
Connection binding OPort and IPort of some IPFBlocks
"""
def __init__(self, oport, iport):
# Check port compatibility and free of input port
if ioport.is_connect... | # -*- coding: utf-8 -*-
import ioport
class Connection(object):
""" Connection class for IPFBlock
Connection binding OPort and IPort of some IPFBlocks
"""
def __init__(self, oport, iport):
# Check port compatibility and free of input port
if ioport.is_connect_allowed(oport,... | <commit_before># -*- coding: utf-8 -*-
import ioport
class Connection(object):
""" Connection class for IPFBlock
Connection binding OPort and IPort of some IPFBlocks
"""
def __init__(self, oport, iport):
# Check port compatibility and free of input port
if ioport.is_connect... |
a4a5ca393ffc553202b266bdea790768a119f8f8 | django_pin_auth/auth_backend.py | django_pin_auth/auth_backend.py | from django.contrib.auth import get_user_model
from .models import SingleUseToken
class PinBackend(object):
"""Authentication backend based on pin value."""
def authenticate(self, request, email=None, pin=None):
"""Authenticate user based on valid pin."""
user_model = get_user_model()
... | from django.contrib.auth import get_user_model
from .models import SingleUseToken
class PinBackend(object):
"""Authentication backend based on pin value."""
def authenticate(self, request, email=None, pin=None):
"""Authenticate user based on valid pin."""
try:
token = self._get_tok... | Refactor to query straight for user | refactor(verification): Refactor to query straight for user
- Implement get_user
- Change to make a single query to find the token, using a join to the
user's email
| Python | mit | redapesolutions/django-pin-auth,redapesolutions/django-pin-auth,redapesolutions/django-pin-auth | from django.contrib.auth import get_user_model
from .models import SingleUseToken
class PinBackend(object):
"""Authentication backend based on pin value."""
def authenticate(self, request, email=None, pin=None):
"""Authenticate user based on valid pin."""
user_model = get_user_model()
... | from django.contrib.auth import get_user_model
from .models import SingleUseToken
class PinBackend(object):
"""Authentication backend based on pin value."""
def authenticate(self, request, email=None, pin=None):
"""Authenticate user based on valid pin."""
try:
token = self._get_tok... | <commit_before>from django.contrib.auth import get_user_model
from .models import SingleUseToken
class PinBackend(object):
"""Authentication backend based on pin value."""
def authenticate(self, request, email=None, pin=None):
"""Authenticate user based on valid pin."""
user_model = get_user_m... | from django.contrib.auth import get_user_model
from .models import SingleUseToken
class PinBackend(object):
"""Authentication backend based on pin value."""
def authenticate(self, request, email=None, pin=None):
"""Authenticate user based on valid pin."""
try:
token = self._get_tok... | from django.contrib.auth import get_user_model
from .models import SingleUseToken
class PinBackend(object):
"""Authentication backend based on pin value."""
def authenticate(self, request, email=None, pin=None):
"""Authenticate user based on valid pin."""
user_model = get_user_model()
... | <commit_before>from django.contrib.auth import get_user_model
from .models import SingleUseToken
class PinBackend(object):
"""Authentication backend based on pin value."""
def authenticate(self, request, email=None, pin=None):
"""Authenticate user based on valid pin."""
user_model = get_user_m... |
75ee8c74af18c2ac9b3f4975d79a5d799ccc46da | pylatex/graphics.py | pylatex/graphics.py | # -*- coding: utf-8 -*-
"""
pylatex.graphics
~~~~~~~~~~~~~~~~
This module implements the class that deals with graphics.
:copyright: (c) 2014 by Jelte Fennema.
:license: MIT, see License for more details.
"""
from .utils import fix_filename
from .base_classes import BaseLaTeXNamedContainer
from .... | # -*- coding: utf-8 -*-
"""
pylatex.graphics
~~~~~~~~~~~~~~~~
This module implements the class that deals with graphics.
:copyright: (c) 2014 by Jelte Fennema.
:license: MIT, see License for more details.
"""
from .utils import fix_filename
from .base_classes import BaseLaTeXNamedContainer
from .... | Make figure a bit better | Make figure a bit better
| Python | mit | jendas1/PyLaTeX,bjodah/PyLaTeX,bjodah/PyLaTeX,ovaskevich/PyLaTeX,votti/PyLaTeX,JelteF/PyLaTeX,votti/PyLaTeX,jendas1/PyLaTeX,sebastianhaas/PyLaTeX,JelteF/PyLaTeX,ovaskevich/PyLaTeX,sebastianhaas/PyLaTeX | # -*- coding: utf-8 -*-
"""
pylatex.graphics
~~~~~~~~~~~~~~~~
This module implements the class that deals with graphics.
:copyright: (c) 2014 by Jelte Fennema.
:license: MIT, see License for more details.
"""
from .utils import fix_filename
from .base_classes import BaseLaTeXNamedContainer
from .... | # -*- coding: utf-8 -*-
"""
pylatex.graphics
~~~~~~~~~~~~~~~~
This module implements the class that deals with graphics.
:copyright: (c) 2014 by Jelte Fennema.
:license: MIT, see License for more details.
"""
from .utils import fix_filename
from .base_classes import BaseLaTeXNamedContainer
from .... | <commit_before># -*- coding: utf-8 -*-
"""
pylatex.graphics
~~~~~~~~~~~~~~~~
This module implements the class that deals with graphics.
:copyright: (c) 2014 by Jelte Fennema.
:license: MIT, see License for more details.
"""
from .utils import fix_filename
from .base_classes import BaseLaTeXNamedC... | # -*- coding: utf-8 -*-
"""
pylatex.graphics
~~~~~~~~~~~~~~~~
This module implements the class that deals with graphics.
:copyright: (c) 2014 by Jelte Fennema.
:license: MIT, see License for more details.
"""
from .utils import fix_filename
from .base_classes import BaseLaTeXNamedContainer
from .... | # -*- coding: utf-8 -*-
"""
pylatex.graphics
~~~~~~~~~~~~~~~~
This module implements the class that deals with graphics.
:copyright: (c) 2014 by Jelte Fennema.
:license: MIT, see License for more details.
"""
from .utils import fix_filename
from .base_classes import BaseLaTeXNamedContainer
from .... | <commit_before># -*- coding: utf-8 -*-
"""
pylatex.graphics
~~~~~~~~~~~~~~~~
This module implements the class that deals with graphics.
:copyright: (c) 2014 by Jelte Fennema.
:license: MIT, see License for more details.
"""
from .utils import fix_filename
from .base_classes import BaseLaTeXNamedC... |
4dea81f345de76ec4b1c9e1976ccb56639757ca7 | django/contrib/comments/feeds.py | django/contrib/comments/feeds.py | from django.conf import settings
from django.contrib.syndication.feeds import Feed
from django.contrib.sites.models import Site
from django.contrib import comments
class LatestCommentFeed(Feed):
"""Feed of latest comments on the current site."""
def title(self):
if not hasattr(self, '_site'):
... | from django.conf import settings
from django.contrib.syndication.feeds import Feed
from django.contrib.sites.models import Site
from django.contrib import comments
class LatestCommentFeed(Feed):
"""Feed of latest comments on the current site."""
def title(self):
if not hasattr(self, '_site'):
... | Use correct m2m join table name in LatestCommentsFeed | Use correct m2m join table name in LatestCommentsFeed
git-svn-id: http://code.djangoproject.com/svn/django/trunk@9089 bcc190cf-cafb-0310-a4f2-bffc1f526a37
--HG--
extra : convert_revision : 9ea8b1f1f4ccc068b460e76127f288742d25088e
| Python | bsd-3-clause | adieu/django-nonrel,adieu/django-nonrel,adieu/django-nonrel,heracek/django-nonrel,heracek/django-nonrel,heracek/django-nonrel | from django.conf import settings
from django.contrib.syndication.feeds import Feed
from django.contrib.sites.models import Site
from django.contrib import comments
class LatestCommentFeed(Feed):
"""Feed of latest comments on the current site."""
def title(self):
if not hasattr(self, '_site'):
... | from django.conf import settings
from django.contrib.syndication.feeds import Feed
from django.contrib.sites.models import Site
from django.contrib import comments
class LatestCommentFeed(Feed):
"""Feed of latest comments on the current site."""
def title(self):
if not hasattr(self, '_site'):
... | <commit_before>from django.conf import settings
from django.contrib.syndication.feeds import Feed
from django.contrib.sites.models import Site
from django.contrib import comments
class LatestCommentFeed(Feed):
"""Feed of latest comments on the current site."""
def title(self):
if not hasattr(self, '_s... | from django.conf import settings
from django.contrib.syndication.feeds import Feed
from django.contrib.sites.models import Site
from django.contrib import comments
class LatestCommentFeed(Feed):
"""Feed of latest comments on the current site."""
def title(self):
if not hasattr(self, '_site'):
... | from django.conf import settings
from django.contrib.syndication.feeds import Feed
from django.contrib.sites.models import Site
from django.contrib import comments
class LatestCommentFeed(Feed):
"""Feed of latest comments on the current site."""
def title(self):
if not hasattr(self, '_site'):
... | <commit_before>from django.conf import settings
from django.contrib.syndication.feeds import Feed
from django.contrib.sites.models import Site
from django.contrib import comments
class LatestCommentFeed(Feed):
"""Feed of latest comments on the current site."""
def title(self):
if not hasattr(self, '_s... |
2c1b049e1e2af8feaf1dd5c2f173d8868ee29499 | api/docs_resource.py | api/docs_resource.py | from string import Template
doc_template = Template(open("api/views/index.html", "r").read())
class DocsResource(object):
def on_get(self, request, response):
response.set_header("Strict-Transport-Security", "max-age=31536000")
response.content_type = "text/html"
response.body = doc_templa... | from string import Template
doc_template = Template(open("api/views/index.html", "r").read())
class DocsResource(object):
def on_get(self, request, response):
response.set_header("Strict-Transport-Security", "max-age=31536000")
response.content_type = "text/html"
response.body = doc_templa... | Use correct property for falcon 2.0. | Use correct property for falcon 2.0.
| Python | mit | EmilStenstrom/json-tagger,EmilStenstrom/json-tagger,EmilStenstrom/json-tagger,EmilStenstrom/json-tagger,EmilStenstrom/json-tagger | from string import Template
doc_template = Template(open("api/views/index.html", "r").read())
class DocsResource(object):
def on_get(self, request, response):
response.set_header("Strict-Transport-Security", "max-age=31536000")
response.content_type = "text/html"
response.body = doc_templa... | from string import Template
doc_template = Template(open("api/views/index.html", "r").read())
class DocsResource(object):
def on_get(self, request, response):
response.set_header("Strict-Transport-Security", "max-age=31536000")
response.content_type = "text/html"
response.body = doc_templa... | <commit_before>from string import Template
doc_template = Template(open("api/views/index.html", "r").read())
class DocsResource(object):
def on_get(self, request, response):
response.set_header("Strict-Transport-Security", "max-age=31536000")
response.content_type = "text/html"
response.bo... | from string import Template
doc_template = Template(open("api/views/index.html", "r").read())
class DocsResource(object):
def on_get(self, request, response):
response.set_header("Strict-Transport-Security", "max-age=31536000")
response.content_type = "text/html"
response.body = doc_templa... | from string import Template
doc_template = Template(open("api/views/index.html", "r").read())
class DocsResource(object):
def on_get(self, request, response):
response.set_header("Strict-Transport-Security", "max-age=31536000")
response.content_type = "text/html"
response.body = doc_templa... | <commit_before>from string import Template
doc_template = Template(open("api/views/index.html", "r").read())
class DocsResource(object):
def on_get(self, request, response):
response.set_header("Strict-Transport-Security", "max-age=31536000")
response.content_type = "text/html"
response.bo... |
3ceba413c57eec2034fb02e8a5557e69cf54a415 | litslist/commands.py | litslist/commands.py | """
Includes execution logic for the commands
"""
import os
import csv
import random
def run_create(count):
file_list = [filename for filename in os.listdir('.') if os.path.isfile(filename)]
sets = {}
for filename in file_list:
content = open(os.path.join(os.curdir, filename)).read().split('\n')
random.shuffle... | """
Includes execution logic for the commands
"""
import os
import csv
import random
def run_create(count):
file_list = [filename for filename in os.listdir('.') if os.path.isfile(filename)]
sets = {}
for filename in file_list:
content = open(os.path.join(os.curdir, filename)).read().split('\n')
random.shuffle... | Set up creating files for unused items | Set up creating files for unused items
| Python | mit | AlexMathew/litslist | """
Includes execution logic for the commands
"""
import os
import csv
import random
def run_create(count):
file_list = [filename for filename in os.listdir('.') if os.path.isfile(filename)]
sets = {}
for filename in file_list:
content = open(os.path.join(os.curdir, filename)).read().split('\n')
random.shuffle... | """
Includes execution logic for the commands
"""
import os
import csv
import random
def run_create(count):
file_list = [filename for filename in os.listdir('.') if os.path.isfile(filename)]
sets = {}
for filename in file_list:
content = open(os.path.join(os.curdir, filename)).read().split('\n')
random.shuffle... | <commit_before>"""
Includes execution logic for the commands
"""
import os
import csv
import random
def run_create(count):
file_list = [filename for filename in os.listdir('.') if os.path.isfile(filename)]
sets = {}
for filename in file_list:
content = open(os.path.join(os.curdir, filename)).read().split('\n')
... | """
Includes execution logic for the commands
"""
import os
import csv
import random
def run_create(count):
file_list = [filename for filename in os.listdir('.') if os.path.isfile(filename)]
sets = {}
for filename in file_list:
content = open(os.path.join(os.curdir, filename)).read().split('\n')
random.shuffle... | """
Includes execution logic for the commands
"""
import os
import csv
import random
def run_create(count):
file_list = [filename for filename in os.listdir('.') if os.path.isfile(filename)]
sets = {}
for filename in file_list:
content = open(os.path.join(os.curdir, filename)).read().split('\n')
random.shuffle... | <commit_before>"""
Includes execution logic for the commands
"""
import os
import csv
import random
def run_create(count):
file_list = [filename for filename in os.listdir('.') if os.path.isfile(filename)]
sets = {}
for filename in file_list:
content = open(os.path.join(os.curdir, filename)).read().split('\n')
... |
4468827795606ae57c5a7d62f5b2f08d93387f39 | virustotal/server.py | virustotal/server.py | #!/usr/bin/env python
from contextlib import closing
from sqlite3 import connect
from bottle import template, route, run
@route('/virustotal/<db>')
def virus(db):
with connect(db, timeout=10) as connection:
with closing(connection.cursor()) as cursor:
cursor.execute('SELECT detected, count(*) ... | #!/usr/bin/env python
from contextlib import closing
from sqlite3 import connect
from bottle import request, template, route, run
@route('/virustotal/<db>')
def virus(db):
with connect(db, timeout=10) as connection:
with closing(connection.cursor()) as cursor:
cursor.execute('SELECT detected, ... | Use refresh only if required in parameters (?refresh=something) | Use refresh only if required in parameters (?refresh=something)
| Python | mit | enricobacis/playscraper | #!/usr/bin/env python
from contextlib import closing
from sqlite3 import connect
from bottle import template, route, run
@route('/virustotal/<db>')
def virus(db):
with connect(db, timeout=10) as connection:
with closing(connection.cursor()) as cursor:
cursor.execute('SELECT detected, count(*) ... | #!/usr/bin/env python
from contextlib import closing
from sqlite3 import connect
from bottle import request, template, route, run
@route('/virustotal/<db>')
def virus(db):
with connect(db, timeout=10) as connection:
with closing(connection.cursor()) as cursor:
cursor.execute('SELECT detected, ... | <commit_before>#!/usr/bin/env python
from contextlib import closing
from sqlite3 import connect
from bottle import template, route, run
@route('/virustotal/<db>')
def virus(db):
with connect(db, timeout=10) as connection:
with closing(connection.cursor()) as cursor:
cursor.execute('SELECT dete... | #!/usr/bin/env python
from contextlib import closing
from sqlite3 import connect
from bottle import request, template, route, run
@route('/virustotal/<db>')
def virus(db):
with connect(db, timeout=10) as connection:
with closing(connection.cursor()) as cursor:
cursor.execute('SELECT detected, ... | #!/usr/bin/env python
from contextlib import closing
from sqlite3 import connect
from bottle import template, route, run
@route('/virustotal/<db>')
def virus(db):
with connect(db, timeout=10) as connection:
with closing(connection.cursor()) as cursor:
cursor.execute('SELECT detected, count(*) ... | <commit_before>#!/usr/bin/env python
from contextlib import closing
from sqlite3 import connect
from bottle import template, route, run
@route('/virustotal/<db>')
def virus(db):
with connect(db, timeout=10) as connection:
with closing(connection.cursor()) as cursor:
cursor.execute('SELECT dete... |
0c04f8cac3e1cbe24a5e4ed699e7c743b962e945 | pygotham/filters.py | pygotham/filters.py | """Template filters for use across apps."""
import bleach
from docutils import core
__all__ = 'rst_to_html'
_ALLOWED_TAGS = bleach.ALLOWED_TAGS + ['h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'p']
def rst_to_html(value):
"""Return HTML generated from reStructuredText."""
parts = core.publish_parts(source=value, wri... | """Template filters for use across apps."""
import bleach
from docutils import core
__all__ = 'rst_to_html'
_ALLOWED_TAGS = bleach.ALLOWED_TAGS + [
'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'p', 'dl', 'dt', 'dd', 'cite',
]
def rst_to_html(value):
"""Return HTML generated from reStructuredText."""
parts = cor... | Add additional HTML tags to reST filter | Add additional HTML tags to reST filter
| Python | bsd-3-clause | djds23/pygotham-1,djds23/pygotham-1,PyGotham/pygotham,djds23/pygotham-1,djds23/pygotham-1,pathunstrom/pygotham,pathunstrom/pygotham,PyGotham/pygotham,PyGotham/pygotham,pathunstrom/pygotham,pathunstrom/pygotham,djds23/pygotham-1,PyGotham/pygotham,pathunstrom/pygotham,PyGotham/pygotham | """Template filters for use across apps."""
import bleach
from docutils import core
__all__ = 'rst_to_html'
_ALLOWED_TAGS = bleach.ALLOWED_TAGS + ['h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'p']
def rst_to_html(value):
"""Return HTML generated from reStructuredText."""
parts = core.publish_parts(source=value, wri... | """Template filters for use across apps."""
import bleach
from docutils import core
__all__ = 'rst_to_html'
_ALLOWED_TAGS = bleach.ALLOWED_TAGS + [
'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'p', 'dl', 'dt', 'dd', 'cite',
]
def rst_to_html(value):
"""Return HTML generated from reStructuredText."""
parts = cor... | <commit_before>"""Template filters for use across apps."""
import bleach
from docutils import core
__all__ = 'rst_to_html'
_ALLOWED_TAGS = bleach.ALLOWED_TAGS + ['h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'p']
def rst_to_html(value):
"""Return HTML generated from reStructuredText."""
parts = core.publish_parts(so... | """Template filters for use across apps."""
import bleach
from docutils import core
__all__ = 'rst_to_html'
_ALLOWED_TAGS = bleach.ALLOWED_TAGS + [
'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'p', 'dl', 'dt', 'dd', 'cite',
]
def rst_to_html(value):
"""Return HTML generated from reStructuredText."""
parts = cor... | """Template filters for use across apps."""
import bleach
from docutils import core
__all__ = 'rst_to_html'
_ALLOWED_TAGS = bleach.ALLOWED_TAGS + ['h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'p']
def rst_to_html(value):
"""Return HTML generated from reStructuredText."""
parts = core.publish_parts(source=value, wri... | <commit_before>"""Template filters for use across apps."""
import bleach
from docutils import core
__all__ = 'rst_to_html'
_ALLOWED_TAGS = bleach.ALLOWED_TAGS + ['h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'p']
def rst_to_html(value):
"""Return HTML generated from reStructuredText."""
parts = core.publish_parts(so... |
6a36f0cef03af2c61dbc0c5dfd4fc47496ae1f05 | moss/plots.py | moss/plots.py | import os.path as op
import numpy as np
import nibabel as nib
import matplotlib.pyplot as plt
import seaborn as sns
def plot_mask_distribution(fname, ax=None, hist=False):
"""Plot the distribution of voxel coordinates in a mask file.
Parameters
----------
fname : string
path to binary mask fil... | import numpy as np
import nibabel as nib
import matplotlib.pyplot as plt
import seaborn as sns
def plot_mask_distribution(mask_img, hist=False):
"""Plot the distribution of voxel coordinates in a mask image or file.
Parameters
----------
fname : string or nibabel image
path to binary mask file... | Allow plot_mask to take nibabel image | Allow plot_mask to take nibabel image
| Python | bsd-3-clause | mwaskom/moss,mwaskom/moss | import os.path as op
import numpy as np
import nibabel as nib
import matplotlib.pyplot as plt
import seaborn as sns
def plot_mask_distribution(fname, ax=None, hist=False):
"""Plot the distribution of voxel coordinates in a mask file.
Parameters
----------
fname : string
path to binary mask fil... | import numpy as np
import nibabel as nib
import matplotlib.pyplot as plt
import seaborn as sns
def plot_mask_distribution(mask_img, hist=False):
"""Plot the distribution of voxel coordinates in a mask image or file.
Parameters
----------
fname : string or nibabel image
path to binary mask file... | <commit_before>import os.path as op
import numpy as np
import nibabel as nib
import matplotlib.pyplot as plt
import seaborn as sns
def plot_mask_distribution(fname, ax=None, hist=False):
"""Plot the distribution of voxel coordinates in a mask file.
Parameters
----------
fname : string
path to ... | import numpy as np
import nibabel as nib
import matplotlib.pyplot as plt
import seaborn as sns
def plot_mask_distribution(mask_img, hist=False):
"""Plot the distribution of voxel coordinates in a mask image or file.
Parameters
----------
fname : string or nibabel image
path to binary mask file... | import os.path as op
import numpy as np
import nibabel as nib
import matplotlib.pyplot as plt
import seaborn as sns
def plot_mask_distribution(fname, ax=None, hist=False):
"""Plot the distribution of voxel coordinates in a mask file.
Parameters
----------
fname : string
path to binary mask fil... | <commit_before>import os.path as op
import numpy as np
import nibabel as nib
import matplotlib.pyplot as plt
import seaborn as sns
def plot_mask_distribution(fname, ax=None, hist=False):
"""Plot the distribution of voxel coordinates in a mask file.
Parameters
----------
fname : string
path to ... |
9171c9afe54c63c450ba661bcc21d83546f4de50 | bpython/__init__.py | bpython/__init__.py | # The MIT License
#
# Copyright (c) 2008 Bob Farrell
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, mer... | # The MIT License
#
# Copyright (c) 2008 Bob Farrell
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, mer... | Set the version name for the default branch to mercurial so we can tell when we run from the repository | Set the version name for the default branch to mercurial so we can tell when we run from the repository
| Python | mit | thomasballinger/old-bpython-with-hy-support,hirochachacha/apython,myint-archive/bpython | # The MIT License
#
# Copyright (c) 2008 Bob Farrell
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, mer... | # The MIT License
#
# Copyright (c) 2008 Bob Farrell
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, mer... | <commit_before># The MIT License
#
# Copyright (c) 2008 Bob Farrell
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, co... | # The MIT License
#
# Copyright (c) 2008 Bob Farrell
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, mer... | # The MIT License
#
# Copyright (c) 2008 Bob Farrell
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, mer... | <commit_before># The MIT License
#
# Copyright (c) 2008 Bob Farrell
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, co... |
b2662ad0031d5ecbb322feb105e362f5d80f4392 | favicon/templatetags/favtags.py | favicon/templatetags/favtags.py | from django import template
from django.utils.safestring import mark_safe
from favicon.models import Favicon, config
register = template.Library()
@register.simple_tag(takes_context=True)
def placeFavicon(context):
"""
Gets Favicon-URL for the Model.
Template Syntax:
{% placeFavicon %}
""... | from django import template
from django.utils.safestring import mark_safe
from favicon.models import Favicon, config
register = template.Library()
@register.simple_tag(takes_context=True)
def placeFavicon(context):
"""
Gets Favicon-URL for the Model.
Template Syntax:
{% placeFavicon %}
""... | Set propper link attribute 'sizes' in templatetag | Set propper link attribute 'sizes' in templatetag
There seems to be a typo in the templatetag generator on lines 26 and 30.
The attribute 'sizes=' written as 'size ='. This break w3c tests as that attribute is not available in the link tag. | Python | mit | arteria/django-favicon-plus | from django import template
from django.utils.safestring import mark_safe
from favicon.models import Favicon, config
register = template.Library()
@register.simple_tag(takes_context=True)
def placeFavicon(context):
"""
Gets Favicon-URL for the Model.
Template Syntax:
{% placeFavicon %}
""... | from django import template
from django.utils.safestring import mark_safe
from favicon.models import Favicon, config
register = template.Library()
@register.simple_tag(takes_context=True)
def placeFavicon(context):
"""
Gets Favicon-URL for the Model.
Template Syntax:
{% placeFavicon %}
""... | <commit_before>from django import template
from django.utils.safestring import mark_safe
from favicon.models import Favicon, config
register = template.Library()
@register.simple_tag(takes_context=True)
def placeFavicon(context):
"""
Gets Favicon-URL for the Model.
Template Syntax:
{% placeFav... | from django import template
from django.utils.safestring import mark_safe
from favicon.models import Favicon, config
register = template.Library()
@register.simple_tag(takes_context=True)
def placeFavicon(context):
"""
Gets Favicon-URL for the Model.
Template Syntax:
{% placeFavicon %}
""... | from django import template
from django.utils.safestring import mark_safe
from favicon.models import Favicon, config
register = template.Library()
@register.simple_tag(takes_context=True)
def placeFavicon(context):
"""
Gets Favicon-URL for the Model.
Template Syntax:
{% placeFavicon %}
""... | <commit_before>from django import template
from django.utils.safestring import mark_safe
from favicon.models import Favicon, config
register = template.Library()
@register.simple_tag(takes_context=True)
def placeFavicon(context):
"""
Gets Favicon-URL for the Model.
Template Syntax:
{% placeFav... |
ad61975377b8d8733049054809350003be6dbff3 | feder/virus_scan/engine/base.py | feder/virus_scan/engine/base.py | from django.contrib.sites.shortcuts import get_current_site
from django.urls import reverse
from django.core.signing import TimestampSigner
class BaseEngine:
def __init__(self):
self.signer = TimestampSigner()
def get_webhook_url(self):
return "{}://{}/{}?token={}".format(
"https"... | from django.contrib.sites.shortcuts import get_current_site
from django.urls import reverse
from django.core.signing import TimestampSigner
class BaseEngine:
def __init__(self):
self.signer = TimestampSigner()
def get_webhook_url(self):
return "{}://{}{}?token={}".format(
"https",... | Remove duplicated slash in virus_scan | Remove duplicated slash in virus_scan | Python | mit | watchdogpolska/feder,watchdogpolska/feder,watchdogpolska/feder,watchdogpolska/feder | from django.contrib.sites.shortcuts import get_current_site
from django.urls import reverse
from django.core.signing import TimestampSigner
class BaseEngine:
def __init__(self):
self.signer = TimestampSigner()
def get_webhook_url(self):
return "{}://{}/{}?token={}".format(
"https"... | from django.contrib.sites.shortcuts import get_current_site
from django.urls import reverse
from django.core.signing import TimestampSigner
class BaseEngine:
def __init__(self):
self.signer = TimestampSigner()
def get_webhook_url(self):
return "{}://{}{}?token={}".format(
"https",... | <commit_before>from django.contrib.sites.shortcuts import get_current_site
from django.urls import reverse
from django.core.signing import TimestampSigner
class BaseEngine:
def __init__(self):
self.signer = TimestampSigner()
def get_webhook_url(self):
return "{}://{}/{}?token={}".format(
... | from django.contrib.sites.shortcuts import get_current_site
from django.urls import reverse
from django.core.signing import TimestampSigner
class BaseEngine:
def __init__(self):
self.signer = TimestampSigner()
def get_webhook_url(self):
return "{}://{}{}?token={}".format(
"https",... | from django.contrib.sites.shortcuts import get_current_site
from django.urls import reverse
from django.core.signing import TimestampSigner
class BaseEngine:
def __init__(self):
self.signer = TimestampSigner()
def get_webhook_url(self):
return "{}://{}/{}?token={}".format(
"https"... | <commit_before>from django.contrib.sites.shortcuts import get_current_site
from django.urls import reverse
from django.core.signing import TimestampSigner
class BaseEngine:
def __init__(self):
self.signer = TimestampSigner()
def get_webhook_url(self):
return "{}://{}/{}?token={}".format(
... |
67e2567b7a7d01e3225675376f189f551c42410b | modules/bitcoin.py | modules/bitcoin.py | """Bitccoin ticker module for ppbot.
@package ppbot
Displays the current bitcoin pricing from mtgox
@syntax btc
"""
import requests
import string
import json
from xml.dom.minidom import parseString
from modules import *
class Bitcoin(Module):
def __init__(self, *args, **kwargs):
"""Constructor"""
... | """Bitccoin ticker module for ppbot.
@package ppbot
Displays the current bitcoin pricing from mtgox
@syntax btc
"""
import requests
import string
import json
from xml.dom.minidom import parseString
from modules import *
class Bitcoin(Module):
def __init__(self, *args, **kwargs):
"""Constructor"""
... | Update mtgox api endpoint to use SSL | Update mtgox api endpoint to use SSL
| Python | mit | billyvg/piebot | """Bitccoin ticker module for ppbot.
@package ppbot
Displays the current bitcoin pricing from mtgox
@syntax btc
"""
import requests
import string
import json
from xml.dom.minidom import parseString
from modules import *
class Bitcoin(Module):
def __init__(self, *args, **kwargs):
"""Constructor"""
... | """Bitccoin ticker module for ppbot.
@package ppbot
Displays the current bitcoin pricing from mtgox
@syntax btc
"""
import requests
import string
import json
from xml.dom.minidom import parseString
from modules import *
class Bitcoin(Module):
def __init__(self, *args, **kwargs):
"""Constructor"""
... | <commit_before>"""Bitccoin ticker module for ppbot.
@package ppbot
Displays the current bitcoin pricing from mtgox
@syntax btc
"""
import requests
import string
import json
from xml.dom.minidom import parseString
from modules import *
class Bitcoin(Module):
def __init__(self, *args, **kwargs):
"""Cons... | """Bitccoin ticker module for ppbot.
@package ppbot
Displays the current bitcoin pricing from mtgox
@syntax btc
"""
import requests
import string
import json
from xml.dom.minidom import parseString
from modules import *
class Bitcoin(Module):
def __init__(self, *args, **kwargs):
"""Constructor"""
... | """Bitccoin ticker module for ppbot.
@package ppbot
Displays the current bitcoin pricing from mtgox
@syntax btc
"""
import requests
import string
import json
from xml.dom.minidom import parseString
from modules import *
class Bitcoin(Module):
def __init__(self, *args, **kwargs):
"""Constructor"""
... | <commit_before>"""Bitccoin ticker module for ppbot.
@package ppbot
Displays the current bitcoin pricing from mtgox
@syntax btc
"""
import requests
import string
import json
from xml.dom.minidom import parseString
from modules import *
class Bitcoin(Module):
def __init__(self, *args, **kwargs):
"""Cons... |
7ffea5f365c7b21b43eee00646f560b04c8e17e0 | molly/conf/urls.py | molly/conf/urls.py | from django.conf.urls.defaults import RegexURLPattern
def url(pattern, name=None, extra={}):
def url_annotator(view):
view.pattern = RegexURLPattern(pattern, view, extra, name)
return view
return url_annotator
| from django.core.urlresolvers import RegexURLPattern
def url(pattern, name=None, extra={}):
def url_annotator(view):
view.pattern = RegexURLPattern(pattern, view, extra, name)
return view
return url_annotator
| Make new URL tag forward compatible | Make new URL tag forward compatible
| Python | apache-2.0 | mollyproject/mollyproject,mollyproject/mollyproject,mollyproject/mollyproject | from django.conf.urls.defaults import RegexURLPattern
def url(pattern, name=None, extra={}):
def url_annotator(view):
view.pattern = RegexURLPattern(pattern, view, extra, name)
return view
return url_annotator
Make new URL tag forward compatible | from django.core.urlresolvers import RegexURLPattern
def url(pattern, name=None, extra={}):
def url_annotator(view):
view.pattern = RegexURLPattern(pattern, view, extra, name)
return view
return url_annotator
| <commit_before>from django.conf.urls.defaults import RegexURLPattern
def url(pattern, name=None, extra={}):
def url_annotator(view):
view.pattern = RegexURLPattern(pattern, view, extra, name)
return view
return url_annotator
<commit_msg>Make new URL tag forward compatible<commit_after... | from django.core.urlresolvers import RegexURLPattern
def url(pattern, name=None, extra={}):
def url_annotator(view):
view.pattern = RegexURLPattern(pattern, view, extra, name)
return view
return url_annotator
| from django.conf.urls.defaults import RegexURLPattern
def url(pattern, name=None, extra={}):
def url_annotator(view):
view.pattern = RegexURLPattern(pattern, view, extra, name)
return view
return url_annotator
Make new URL tag forward compatiblefrom django.core.urlresolvers import Reg... | <commit_before>from django.conf.urls.defaults import RegexURLPattern
def url(pattern, name=None, extra={}):
def url_annotator(view):
view.pattern = RegexURLPattern(pattern, view, extra, name)
return view
return url_annotator
<commit_msg>Make new URL tag forward compatible<commit_after... |
09d3f9167edf3230117db3b5369a10b4df774195 | scripts/schedule.py | scripts/schedule.py | import docopt
import teuthology.misc
import teuthology.schedule
doc = """
usage: teuthology-schedule -h
teuthology-schedule [options] <conf_file> [<conf_file> ...]
Schedule ceph integration tests
positional arguments:
<conf_file> Config file to read
optional arguments:
-h, --hel... | import docopt
import teuthology.misc
import teuthology.schedule
doc = """
usage: teuthology-schedule -h
teuthology-schedule [options] [--] <conf_file> [<conf_file> ...]
Schedule ceph integration tests
positional arguments:
<conf_file> Config file to read
optional arguments:
-h, ... | Add [--] to usage statement | Add [--] to usage statement
Signed-off-by: Zack Cerza <[email protected]>
| Python | mit | tchaikov/teuthology,michaelsevilla/teuthology,ceph/teuthology,yghannam/teuthology,SUSE/teuthology,caibo2014/teuthology,t-miyamae/teuthology,robbat2/teuthology,dmick/teuthology,ivotron/teuthology,zhouyuan/teuthology,ktdreyer/teuthology,dmick/teuthology,SUSE/teuthology,dreamhost/teuthology,yghannam/teuthology,tchaikov/te... | import docopt
import teuthology.misc
import teuthology.schedule
doc = """
usage: teuthology-schedule -h
teuthology-schedule [options] <conf_file> [<conf_file> ...]
Schedule ceph integration tests
positional arguments:
<conf_file> Config file to read
optional arguments:
-h, --hel... | import docopt
import teuthology.misc
import teuthology.schedule
doc = """
usage: teuthology-schedule -h
teuthology-schedule [options] [--] <conf_file> [<conf_file> ...]
Schedule ceph integration tests
positional arguments:
<conf_file> Config file to read
optional arguments:
-h, ... | <commit_before>import docopt
import teuthology.misc
import teuthology.schedule
doc = """
usage: teuthology-schedule -h
teuthology-schedule [options] <conf_file> [<conf_file> ...]
Schedule ceph integration tests
positional arguments:
<conf_file> Config file to read
optional argumen... | import docopt
import teuthology.misc
import teuthology.schedule
doc = """
usage: teuthology-schedule -h
teuthology-schedule [options] [--] <conf_file> [<conf_file> ...]
Schedule ceph integration tests
positional arguments:
<conf_file> Config file to read
optional arguments:
-h, ... | import docopt
import teuthology.misc
import teuthology.schedule
doc = """
usage: teuthology-schedule -h
teuthology-schedule [options] <conf_file> [<conf_file> ...]
Schedule ceph integration tests
positional arguments:
<conf_file> Config file to read
optional arguments:
-h, --hel... | <commit_before>import docopt
import teuthology.misc
import teuthology.schedule
doc = """
usage: teuthology-schedule -h
teuthology-schedule [options] <conf_file> [<conf_file> ...]
Schedule ceph integration tests
positional arguments:
<conf_file> Config file to read
optional argumen... |
ec52fee0fbefaa8fe2df1f38aab000456fb44c45 | website/admin.py | website/admin.py | from django.contrib import admin
from .models import Card, FaqQuestion, Banner, Rule
admin.site.register(Card)
admin.site.register(FaqQuestion)
admin.site.register(Rule)
admin.site.register(Banner)
| from django.contrib import admin
from django.contrib.admin import EmptyFieldListFilter
from django.contrib.auth.admin import UserAdmin
from django.contrib.auth.models import User
from .models import Card, FaqQuestion, Banner, Rule
class WatchlistFilter(EmptyFieldListFilter):
def __init__(self, field, request, pa... | Add filter for users on watchlist | Add filter for users on watchlist
| Python | mit | hackerspace-ntnu/website,hackerspace-ntnu/website,hackerspace-ntnu/website | from django.contrib import admin
from .models import Card, FaqQuestion, Banner, Rule
admin.site.register(Card)
admin.site.register(FaqQuestion)
admin.site.register(Rule)
admin.site.register(Banner)
Add filter for users on watchlist | from django.contrib import admin
from django.contrib.admin import EmptyFieldListFilter
from django.contrib.auth.admin import UserAdmin
from django.contrib.auth.models import User
from .models import Card, FaqQuestion, Banner, Rule
class WatchlistFilter(EmptyFieldListFilter):
def __init__(self, field, request, pa... | <commit_before>from django.contrib import admin
from .models import Card, FaqQuestion, Banner, Rule
admin.site.register(Card)
admin.site.register(FaqQuestion)
admin.site.register(Rule)
admin.site.register(Banner)
<commit_msg>Add filter for users on watchlist<commit_after> | from django.contrib import admin
from django.contrib.admin import EmptyFieldListFilter
from django.contrib.auth.admin import UserAdmin
from django.contrib.auth.models import User
from .models import Card, FaqQuestion, Banner, Rule
class WatchlistFilter(EmptyFieldListFilter):
def __init__(self, field, request, pa... | from django.contrib import admin
from .models import Card, FaqQuestion, Banner, Rule
admin.site.register(Card)
admin.site.register(FaqQuestion)
admin.site.register(Rule)
admin.site.register(Banner)
Add filter for users on watchlistfrom django.contrib import admin
from django.contrib.admin import EmptyFieldListFilter
f... | <commit_before>from django.contrib import admin
from .models import Card, FaqQuestion, Banner, Rule
admin.site.register(Card)
admin.site.register(FaqQuestion)
admin.site.register(Rule)
admin.site.register(Banner)
<commit_msg>Add filter for users on watchlist<commit_after>from django.contrib import admin
from django.co... |
9293a72faf8cd41dc68bb1f2220e10459bbe09ff | pycom/oslo_i18n.py | pycom/oslo_i18n.py | # coding: utf-8
import oslo_i18n
def reset_i18n(domain="app", localedir=None):
global _translators, _, _C, _P, _LI, _LW, _LE, _LC
# Enable lazy translation
oslo_i18n.enable_lazy()
_translators = oslo_i18n.TranslatorFactory(domain=domain, localedir=localedir)
# The primary translation function u... | # coding: utf-8
import oslo_i18n
def reset_i18n(domain="app", localedir=None, lazy=True):
global _translators, _, _C, _P, _LI, _LW, _LE, _LC
# Enable lazy translation
if lazy:
oslo_i18n.enable_lazy()
_translators = oslo_i18n.TranslatorFactory(domain=domain, localedir=localedir)
# The pr... | Add a argument and fix a error. | Add a argument and fix a error.
| Python | mit | xgfone/pycom,xgfone/xutils | # coding: utf-8
import oslo_i18n
def reset_i18n(domain="app", localedir=None):
global _translators, _, _C, _P, _LI, _LW, _LE, _LC
# Enable lazy translation
oslo_i18n.enable_lazy()
_translators = oslo_i18n.TranslatorFactory(domain=domain, localedir=localedir)
# The primary translation function u... | # coding: utf-8
import oslo_i18n
def reset_i18n(domain="app", localedir=None, lazy=True):
global _translators, _, _C, _P, _LI, _LW, _LE, _LC
# Enable lazy translation
if lazy:
oslo_i18n.enable_lazy()
_translators = oslo_i18n.TranslatorFactory(domain=domain, localedir=localedir)
# The pr... | <commit_before># coding: utf-8
import oslo_i18n
def reset_i18n(domain="app", localedir=None):
global _translators, _, _C, _P, _LI, _LW, _LE, _LC
# Enable lazy translation
oslo_i18n.enable_lazy()
_translators = oslo_i18n.TranslatorFactory(domain=domain, localedir=localedir)
# The primary transla... | # coding: utf-8
import oslo_i18n
def reset_i18n(domain="app", localedir=None, lazy=True):
global _translators, _, _C, _P, _LI, _LW, _LE, _LC
# Enable lazy translation
if lazy:
oslo_i18n.enable_lazy()
_translators = oslo_i18n.TranslatorFactory(domain=domain, localedir=localedir)
# The pr... | # coding: utf-8
import oslo_i18n
def reset_i18n(domain="app", localedir=None):
global _translators, _, _C, _P, _LI, _LW, _LE, _LC
# Enable lazy translation
oslo_i18n.enable_lazy()
_translators = oslo_i18n.TranslatorFactory(domain=domain, localedir=localedir)
# The primary translation function u... | <commit_before># coding: utf-8
import oslo_i18n
def reset_i18n(domain="app", localedir=None):
global _translators, _, _C, _P, _LI, _LW, _LE, _LC
# Enable lazy translation
oslo_i18n.enable_lazy()
_translators = oslo_i18n.TranslatorFactory(domain=domain, localedir=localedir)
# The primary transla... |
b43fd1f4451f11f63b8657594c089b309cb140dd | pyfr/ctypesutil.py | pyfr/ctypesutil.py | # -*- coding: utf-8 -*-
import ctypes
import ctypes.util
import os
import sys
def find_libc():
if sys.platform == 'win32':
return ctypes.util.find_msvcrt()
else:
return ctypes.util.find_library('c')
def load_library(name):
lname = platform_libname(name)
sdirs = platform_libdirs()
... | # -*- coding: utf-8 -*-
import ctypes
import ctypes.util
import os
import sys
def find_libc():
if sys.platform == 'win32':
return ctypes.util.find_msvcrt()
else:
return ctypes.util.find_library('c')
def load_library(name):
lname = platform_libname(name)
sdirs = platform_libdirs()
... | Fix how we check for Windows in platform_libname. | Fix how we check for Windows in platform_libname.
| Python | bsd-3-clause | BrianVermeire/PyFR | # -*- coding: utf-8 -*-
import ctypes
import ctypes.util
import os
import sys
def find_libc():
if sys.platform == 'win32':
return ctypes.util.find_msvcrt()
else:
return ctypes.util.find_library('c')
def load_library(name):
lname = platform_libname(name)
sdirs = platform_libdirs()
... | # -*- coding: utf-8 -*-
import ctypes
import ctypes.util
import os
import sys
def find_libc():
if sys.platform == 'win32':
return ctypes.util.find_msvcrt()
else:
return ctypes.util.find_library('c')
def load_library(name):
lname = platform_libname(name)
sdirs = platform_libdirs()
... | <commit_before># -*- coding: utf-8 -*-
import ctypes
import ctypes.util
import os
import sys
def find_libc():
if sys.platform == 'win32':
return ctypes.util.find_msvcrt()
else:
return ctypes.util.find_library('c')
def load_library(name):
lname = platform_libname(name)
sdirs = platfo... | # -*- coding: utf-8 -*-
import ctypes
import ctypes.util
import os
import sys
def find_libc():
if sys.platform == 'win32':
return ctypes.util.find_msvcrt()
else:
return ctypes.util.find_library('c')
def load_library(name):
lname = platform_libname(name)
sdirs = platform_libdirs()
... | # -*- coding: utf-8 -*-
import ctypes
import ctypes.util
import os
import sys
def find_libc():
if sys.platform == 'win32':
return ctypes.util.find_msvcrt()
else:
return ctypes.util.find_library('c')
def load_library(name):
lname = platform_libname(name)
sdirs = platform_libdirs()
... | <commit_before># -*- coding: utf-8 -*-
import ctypes
import ctypes.util
import os
import sys
def find_libc():
if sys.platform == 'win32':
return ctypes.util.find_msvcrt()
else:
return ctypes.util.find_library('c')
def load_library(name):
lname = platform_libname(name)
sdirs = platfo... |
82b65fee35960a1f47f92aac1d8031bb0b57b2e7 | jsonapiquery/drivers/__init__.py | jsonapiquery/drivers/__init__.py | from abc import ABCMeta, abstractmethod
class DriverBase(metaclass=ABCMeta):
def __init__(self, obj):
self.obj = obj
def __repr__(self):
return '{}(type={})'.format(self.__class__.__name__, self.obj)
def parse(self, item):
"""Return a new, typed item instance."""
obj = s... | from abc import ABCMeta, abstractmethod
class DriverBase(metaclass=ABCMeta):
def __init__(self, obj):
self.obj = obj
def __repr__(self):
return '{}(type={})'.format(self.__class__.__name__, self.obj)
def init_type(self, type, **init_kwargs):
"""Initialize a new type.
:p... | Move type initialization to its own method | Move type initialization to its own method
| Python | apache-2.0 | caxiam/sqlalchemy-jsonapi-collections | from abc import ABCMeta, abstractmethod
class DriverBase(metaclass=ABCMeta):
def __init__(self, obj):
self.obj = obj
def __repr__(self):
return '{}(type={})'.format(self.__class__.__name__, self.obj)
def parse(self, item):
"""Return a new, typed item instance."""
obj = s... | from abc import ABCMeta, abstractmethod
class DriverBase(metaclass=ABCMeta):
def __init__(self, obj):
self.obj = obj
def __repr__(self):
return '{}(type={})'.format(self.__class__.__name__, self.obj)
def init_type(self, type, **init_kwargs):
"""Initialize a new type.
:p... | <commit_before>from abc import ABCMeta, abstractmethod
class DriverBase(metaclass=ABCMeta):
def __init__(self, obj):
self.obj = obj
def __repr__(self):
return '{}(type={})'.format(self.__class__.__name__, self.obj)
def parse(self, item):
"""Return a new, typed item instance."""
... | from abc import ABCMeta, abstractmethod
class DriverBase(metaclass=ABCMeta):
def __init__(self, obj):
self.obj = obj
def __repr__(self):
return '{}(type={})'.format(self.__class__.__name__, self.obj)
def init_type(self, type, **init_kwargs):
"""Initialize a new type.
:p... | from abc import ABCMeta, abstractmethod
class DriverBase(metaclass=ABCMeta):
def __init__(self, obj):
self.obj = obj
def __repr__(self):
return '{}(type={})'.format(self.__class__.__name__, self.obj)
def parse(self, item):
"""Return a new, typed item instance."""
obj = s... | <commit_before>from abc import ABCMeta, abstractmethod
class DriverBase(metaclass=ABCMeta):
def __init__(self, obj):
self.obj = obj
def __repr__(self):
return '{}(type={})'.format(self.__class__.__name__, self.obj)
def parse(self, item):
"""Return a new, typed item instance."""
... |
45c4f2455b453ee361cbb38ed1add996012b1c5e | datahelper.py | datahelper.py | """
Just some useful Flask stuff for ndb.
"""
from google.appengine.ext import ndb
from flask import g
from app import app
def put_later(*objs):
"""
Any ndb model instances passed to this method will be put after the flask request has been processed.
"""
for obj in objs:
if obj not in g.dirty... | """
Just some useful Flask stuff for ndb.
"""
from google.appengine.ext import ndb
from flask import g
from app import app
def put_later(*objs):
"""
Any ndb model instances passed to this method will be put after the flask request has been processed.
"""
for obj in objs:
if obj not in g.dirty... | Fix bug where dirty_ndb was silently failing. | Fix bug where dirty_ndb was silently failing.
| Python | apache-2.0 | kkinder/GAEStarterKit,kkinder/GAEStarterKit,kkinder/GAEStarterKit | """
Just some useful Flask stuff for ndb.
"""
from google.appengine.ext import ndb
from flask import g
from app import app
def put_later(*objs):
"""
Any ndb model instances passed to this method will be put after the flask request has been processed.
"""
for obj in objs:
if obj not in g.dirty... | """
Just some useful Flask stuff for ndb.
"""
from google.appengine.ext import ndb
from flask import g
from app import app
def put_later(*objs):
"""
Any ndb model instances passed to this method will be put after the flask request has been processed.
"""
for obj in objs:
if obj not in g.dirty... | <commit_before>"""
Just some useful Flask stuff for ndb.
"""
from google.appengine.ext import ndb
from flask import g
from app import app
def put_later(*objs):
"""
Any ndb model instances passed to this method will be put after the flask request has been processed.
"""
for obj in objs:
if obj... | """
Just some useful Flask stuff for ndb.
"""
from google.appengine.ext import ndb
from flask import g
from app import app
def put_later(*objs):
"""
Any ndb model instances passed to this method will be put after the flask request has been processed.
"""
for obj in objs:
if obj not in g.dirty... | """
Just some useful Flask stuff for ndb.
"""
from google.appengine.ext import ndb
from flask import g
from app import app
def put_later(*objs):
"""
Any ndb model instances passed to this method will be put after the flask request has been processed.
"""
for obj in objs:
if obj not in g.dirty... | <commit_before>"""
Just some useful Flask stuff for ndb.
"""
from google.appengine.ext import ndb
from flask import g
from app import app
def put_later(*objs):
"""
Any ndb model instances passed to this method will be put after the flask request has been processed.
"""
for obj in objs:
if obj... |
545fef9216559d08f58f7e20082b36352203a8cf | python/decorators.py | python/decorators.py | def passive(cls):
passive_note = '''
.. note:: This object is a "passive" object. Any changes you make to it will not be reflected in the core and vice-versa. If you wish to update a core version of this object you should use the appropriate API.
'''
if hasattr(cls, "__doc__") and cls.__doc__:
cls.__doc__ += pas... | def passive(cls):
passive_note = '''
.. note:: This object is a "passive" object. Any changes you make to it will not be reflected in the core and vice-versa. If you wish to update a core version of this object you should use the appropriate API.
'''
if hasattr(cls, "__doc__") and cls.__doc__:
cls.__doc__ += pas... | Add documentaiton decorator for Enterprise. | Add documentaiton decorator for Enterprise.
| Python | mit | Vector35/binaryninja-api,Vector35/binaryninja-api,Vector35/binaryninja-api,Vector35/binaryninja-api,Vector35/binaryninja-api,Vector35/binaryninja-api,Vector35/binaryninja-api | def passive(cls):
passive_note = '''
.. note:: This object is a "passive" object. Any changes you make to it will not be reflected in the core and vice-versa. If you wish to update a core version of this object you should use the appropriate API.
'''
if hasattr(cls, "__doc__") and cls.__doc__:
cls.__doc__ += pas... | def passive(cls):
passive_note = '''
.. note:: This object is a "passive" object. Any changes you make to it will not be reflected in the core and vice-versa. If you wish to update a core version of this object you should use the appropriate API.
'''
if hasattr(cls, "__doc__") and cls.__doc__:
cls.__doc__ += pas... | <commit_before>def passive(cls):
passive_note = '''
.. note:: This object is a "passive" object. Any changes you make to it will not be reflected in the core and vice-versa. If you wish to update a core version of this object you should use the appropriate API.
'''
if hasattr(cls, "__doc__") and cls.__doc__:
cls... | def passive(cls):
passive_note = '''
.. note:: This object is a "passive" object. Any changes you make to it will not be reflected in the core and vice-versa. If you wish to update a core version of this object you should use the appropriate API.
'''
if hasattr(cls, "__doc__") and cls.__doc__:
cls.__doc__ += pas... | def passive(cls):
passive_note = '''
.. note:: This object is a "passive" object. Any changes you make to it will not be reflected in the core and vice-versa. If you wish to update a core version of this object you should use the appropriate API.
'''
if hasattr(cls, "__doc__") and cls.__doc__:
cls.__doc__ += pas... | <commit_before>def passive(cls):
passive_note = '''
.. note:: This object is a "passive" object. Any changes you make to it will not be reflected in the core and vice-versa. If you wish to update a core version of this object you should use the appropriate API.
'''
if hasattr(cls, "__doc__") and cls.__doc__:
cls... |
73e15928a8427eb5a6e4a886660b9493e50cd699 | currencies/models.py | currencies/models.py | from django.db import models
from django.utils.translation import gettext_lazy as _
class Currency(models.Model):
code = models.CharField(_('code'), max_length=3)
name = models.CharField(_('name'), max_length=35)
symbol = models.CharField(_('symbol'), max_length=1, blank=True)
factor = models.DecimalF... | from django.db import models
from django.utils.translation import gettext_lazy as _
class Currency(models.Model):
code = models.CharField(_('code'), max_length=3)
name = models.CharField(_('name'), max_length=35)
symbol = models.CharField(_('symbol'), max_length=1, blank=True)
factor = models.DecimalF... | Add a Currency.is_base field (currently unused) | Add a Currency.is_base field (currently unused)
| Python | bsd-3-clause | pathakamit88/django-currencies,panosl/django-currencies,ydaniv/django-currencies,mysociety/django-currencies,panosl/django-currencies,barseghyanartur/django-currencies,bashu/django-simple-currencies,pathakamit88/django-currencies,ydaniv/django-currencies,marcosalcazar/django-currencies,jmp0xf/django-currencies,racitup/... | from django.db import models
from django.utils.translation import gettext_lazy as _
class Currency(models.Model):
code = models.CharField(_('code'), max_length=3)
name = models.CharField(_('name'), max_length=35)
symbol = models.CharField(_('symbol'), max_length=1, blank=True)
factor = models.DecimalF... | from django.db import models
from django.utils.translation import gettext_lazy as _
class Currency(models.Model):
code = models.CharField(_('code'), max_length=3)
name = models.CharField(_('name'), max_length=35)
symbol = models.CharField(_('symbol'), max_length=1, blank=True)
factor = models.DecimalF... | <commit_before>from django.db import models
from django.utils.translation import gettext_lazy as _
class Currency(models.Model):
code = models.CharField(_('code'), max_length=3)
name = models.CharField(_('name'), max_length=35)
symbol = models.CharField(_('symbol'), max_length=1, blank=True)
factor = ... | from django.db import models
from django.utils.translation import gettext_lazy as _
class Currency(models.Model):
code = models.CharField(_('code'), max_length=3)
name = models.CharField(_('name'), max_length=35)
symbol = models.CharField(_('symbol'), max_length=1, blank=True)
factor = models.DecimalF... | from django.db import models
from django.utils.translation import gettext_lazy as _
class Currency(models.Model):
code = models.CharField(_('code'), max_length=3)
name = models.CharField(_('name'), max_length=35)
symbol = models.CharField(_('symbol'), max_length=1, blank=True)
factor = models.DecimalF... | <commit_before>from django.db import models
from django.utils.translation import gettext_lazy as _
class Currency(models.Model):
code = models.CharField(_('code'), max_length=3)
name = models.CharField(_('name'), max_length=35)
symbol = models.CharField(_('symbol'), max_length=1, blank=True)
factor = ... |
e7ecb09238d35974f90fdc2d974ebbebecc5ef17 | quijy/misc.py | quijy/misc.py | """
Misc. functions not quantum related.
"""
import matplotlib.pyplot as plt
from matplotlib import cm
from numpy import (atleast_2d, squeeze, array, shape, argwhere, linspace)
def ezplot(x, y_i, fignum=1, xlog=False, ylog=False, **kwargs):
"""
Function for automatically plotting multiple sets of data
""... | """
Misc. functions not quantum related.
"""
import matplotlib.pyplot as plt
from matplotlib import cm
from numpy import (atleast_2d, squeeze, array, shape, argwhere, linspace)
def ezplot(x, y_i, fignum=1, xlog=False, ylog=False, **kwargs):
"""
Function for automatically plotting multiple sets of data
""... | Change default colormap in ezplot | Change default colormap in ezplot
From 'jet' to 'viridis'
| Python | mit | jcmgray/quijy | """
Misc. functions not quantum related.
"""
import matplotlib.pyplot as plt
from matplotlib import cm
from numpy import (atleast_2d, squeeze, array, shape, argwhere, linspace)
def ezplot(x, y_i, fignum=1, xlog=False, ylog=False, **kwargs):
"""
Function for automatically plotting multiple sets of data
""... | """
Misc. functions not quantum related.
"""
import matplotlib.pyplot as plt
from matplotlib import cm
from numpy import (atleast_2d, squeeze, array, shape, argwhere, linspace)
def ezplot(x, y_i, fignum=1, xlog=False, ylog=False, **kwargs):
"""
Function for automatically plotting multiple sets of data
""... | <commit_before>"""
Misc. functions not quantum related.
"""
import matplotlib.pyplot as plt
from matplotlib import cm
from numpy import (atleast_2d, squeeze, array, shape, argwhere, linspace)
def ezplot(x, y_i, fignum=1, xlog=False, ylog=False, **kwargs):
"""
Function for automatically plotting multiple sets... | """
Misc. functions not quantum related.
"""
import matplotlib.pyplot as plt
from matplotlib import cm
from numpy import (atleast_2d, squeeze, array, shape, argwhere, linspace)
def ezplot(x, y_i, fignum=1, xlog=False, ylog=False, **kwargs):
"""
Function for automatically plotting multiple sets of data
""... | """
Misc. functions not quantum related.
"""
import matplotlib.pyplot as plt
from matplotlib import cm
from numpy import (atleast_2d, squeeze, array, shape, argwhere, linspace)
def ezplot(x, y_i, fignum=1, xlog=False, ylog=False, **kwargs):
"""
Function for automatically plotting multiple sets of data
""... | <commit_before>"""
Misc. functions not quantum related.
"""
import matplotlib.pyplot as plt
from matplotlib import cm
from numpy import (atleast_2d, squeeze, array, shape, argwhere, linspace)
def ezplot(x, y_i, fignum=1, xlog=False, ylog=False, **kwargs):
"""
Function for automatically plotting multiple sets... |
d6a020778343567e671a671ca9fd5b40eed1ee9c | rename-pdf.py | rename-pdf.py | #!/usr/bin/env python
__author__ = 'Jacob Bieker'
import os
DATA_DIRECTORY = os.path.join("test_file")
DATA = os.listdir(DATA_DIRECTORY)
file_name_dict = {}
for file_name in DATA:
split_name = file_name.split("_")
print split_name
file_name_dict.setdefault(split_name[0], [])
# Name has the extra _NUM e... | #!/usr/bin/env python
__author__ = 'Jacob Bieker'
import os
DATA_DIRECTORY = os.path.join("test_file")
DATA = os.listdir(DATA_DIRECTORY)
file_name_dict = {}
for file_name in DATA:
split_name = file_name.split("_")
print split_name
file_name_dict.setdefault(split_name[0], [])
# Name has the extra _NUM e... | Add renaming file to correct file name | Add renaming file to correct file name | Python | apache-2.0 | UO-SPUR/misc | #!/usr/bin/env python
__author__ = 'Jacob Bieker'
import os
DATA_DIRECTORY = os.path.join("test_file")
DATA = os.listdir(DATA_DIRECTORY)
file_name_dict = {}
for file_name in DATA:
split_name = file_name.split("_")
print split_name
file_name_dict.setdefault(split_name[0], [])
# Name has the extra _NUM e... | #!/usr/bin/env python
__author__ = 'Jacob Bieker'
import os
DATA_DIRECTORY = os.path.join("test_file")
DATA = os.listdir(DATA_DIRECTORY)
file_name_dict = {}
for file_name in DATA:
split_name = file_name.split("_")
print split_name
file_name_dict.setdefault(split_name[0], [])
# Name has the extra _NUM e... | <commit_before>#!/usr/bin/env python
__author__ = 'Jacob Bieker'
import os
DATA_DIRECTORY = os.path.join("test_file")
DATA = os.listdir(DATA_DIRECTORY)
file_name_dict = {}
for file_name in DATA:
split_name = file_name.split("_")
print split_name
file_name_dict.setdefault(split_name[0], [])
# Name has t... | #!/usr/bin/env python
__author__ = 'Jacob Bieker'
import os
DATA_DIRECTORY = os.path.join("test_file")
DATA = os.listdir(DATA_DIRECTORY)
file_name_dict = {}
for file_name in DATA:
split_name = file_name.split("_")
print split_name
file_name_dict.setdefault(split_name[0], [])
# Name has the extra _NUM e... | #!/usr/bin/env python
__author__ = 'Jacob Bieker'
import os
DATA_DIRECTORY = os.path.join("test_file")
DATA = os.listdir(DATA_DIRECTORY)
file_name_dict = {}
for file_name in DATA:
split_name = file_name.split("_")
print split_name
file_name_dict.setdefault(split_name[0], [])
# Name has the extra _NUM e... | <commit_before>#!/usr/bin/env python
__author__ = 'Jacob Bieker'
import os
DATA_DIRECTORY = os.path.join("test_file")
DATA = os.listdir(DATA_DIRECTORY)
file_name_dict = {}
for file_name in DATA:
split_name = file_name.split("_")
print split_name
file_name_dict.setdefault(split_name[0], [])
# Name has t... |
512e6aac47e1fc73837a16b24024081e1407220b | kolla/common/task.py | kolla/common/task.py | # 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
# distributed under th... | # 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
# distributed under th... | Replace abc.abstractproperty with property and abc.abstractmethod | Replace abc.abstractproperty with property and abc.abstractmethod
Replace abc.abstractproperty with property and abc.abstractmethod,
as abc.abstractproperty has been deprecated since python3.3[1]
[1]https://docs.python.org/3.8/whatsnew/3.3.html?highlight=deprecated#abc
Change-Id: Ibb048b879fa58b5e144ae228628b3ffaeae... | Python | apache-2.0 | openstack/kolla,openstack/kolla | # 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
# distributed under th... | # 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
# distributed under th... | <commit_before># 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
# distr... | # 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
# distributed under th... | # 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
# distributed under th... | <commit_before># 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
# distr... |
f1a2991ed8ff463255ad6a254fe049ffd1cbc46e | workshopvenues/venues/models.py | workshopvenues/venues/models.py | from django.db import models
class Facility(models.Model):
name = models.CharField(max_length=30)
def __unicode__(self):
return self.name
class Address(models.Model):
street = models.CharField(max_length=200)
town = models.CharField(max_length=30)
postcode = models.CharField(max_length=10... | from django.db import models
class Facility(models.Model):
name = models.CharField(max_length=30)
def __unicode__(self):
return self.name
class Address(models.Model):
street = models.CharField(max_length=200)
town = models.CharField(max_length=30)
postcode = models.CharField(max_length=10... | Add migration for new fields in Venue | Add migration for new fields in Venue
| Python | bsd-3-clause | andreagrandi/workshopvenues | from django.db import models
class Facility(models.Model):
name = models.CharField(max_length=30)
def __unicode__(self):
return self.name
class Address(models.Model):
street = models.CharField(max_length=200)
town = models.CharField(max_length=30)
postcode = models.CharField(max_length=10... | from django.db import models
class Facility(models.Model):
name = models.CharField(max_length=30)
def __unicode__(self):
return self.name
class Address(models.Model):
street = models.CharField(max_length=200)
town = models.CharField(max_length=30)
postcode = models.CharField(max_length=10... | <commit_before>from django.db import models
class Facility(models.Model):
name = models.CharField(max_length=30)
def __unicode__(self):
return self.name
class Address(models.Model):
street = models.CharField(max_length=200)
town = models.CharField(max_length=30)
postcode = models.CharFiel... | from django.db import models
class Facility(models.Model):
name = models.CharField(max_length=30)
def __unicode__(self):
return self.name
class Address(models.Model):
street = models.CharField(max_length=200)
town = models.CharField(max_length=30)
postcode = models.CharField(max_length=10... | from django.db import models
class Facility(models.Model):
name = models.CharField(max_length=30)
def __unicode__(self):
return self.name
class Address(models.Model):
street = models.CharField(max_length=200)
town = models.CharField(max_length=30)
postcode = models.CharField(max_length=10... | <commit_before>from django.db import models
class Facility(models.Model):
name = models.CharField(max_length=30)
def __unicode__(self):
return self.name
class Address(models.Model):
street = models.CharField(max_length=200)
town = models.CharField(max_length=30)
postcode = models.CharFiel... |
6e6993f95a2e99830dd697a83a20353bcded6102 | makerbase/__init__.py | makerbase/__init__.py | from flask import Flask
app = Flask(__name__)
import makerbase.tags
import makerbase.views
| from flask import Flask
app = Flask(__name__)
app.debug_log_format = '%(asctime)-8s %(levelname)-8s %(name)-15s %(message)s'
import makerbase.tags
import makerbase.views
| Use less stupid debug log format | Use less stupid debug log format
| Python | mit | markpasc/makerbase,markpasc/makerbase | from flask import Flask
app = Flask(__name__)
import makerbase.tags
import makerbase.views
Use less stupid debug log format | from flask import Flask
app = Flask(__name__)
app.debug_log_format = '%(asctime)-8s %(levelname)-8s %(name)-15s %(message)s'
import makerbase.tags
import makerbase.views
| <commit_before>from flask import Flask
app = Flask(__name__)
import makerbase.tags
import makerbase.views
<commit_msg>Use less stupid debug log format<commit_after> | from flask import Flask
app = Flask(__name__)
app.debug_log_format = '%(asctime)-8s %(levelname)-8s %(name)-15s %(message)s'
import makerbase.tags
import makerbase.views
| from flask import Flask
app = Flask(__name__)
import makerbase.tags
import makerbase.views
Use less stupid debug log formatfrom flask import Flask
app = Flask(__name__)
app.debug_log_format = '%(asctime)-8s %(levelname)-8s %(name)-15s %(message)s'
import makerbase.tags
import makerbase.views
| <commit_before>from flask import Flask
app = Flask(__name__)
import makerbase.tags
import makerbase.views
<commit_msg>Use less stupid debug log format<commit_after>from flask import Flask
app = Flask(__name__)
app.debug_log_format = '%(asctime)-8s %(levelname)-8s %(name)-15s %(message)s'
import makerbase.tags
... |
fae33cf7d42559384deb7a9949f47b0881b0a29b | Cython/Tests/TestCythonUtils.py | Cython/Tests/TestCythonUtils.py | import unittest
from ..Utils import build_hex_version
class TestCythonUtils(unittest.TestCase):
def test_build_hex_version(self):
self.assertEqual('0x001D00A1', build_hex_version('0.29a1'))
self.assertEqual('0x001D00A1', build_hex_version('0.29a1'))
self.assertEqual('0x001D03C4', build_hex... | import unittest
from ..Utils import build_hex_version
class TestCythonUtils(unittest.TestCase):
def test_build_hex_version(self):
self.assertEqual('0x001D00A1', build_hex_version('0.29a1'))
self.assertEqual('0x001D03C4', build_hex_version('0.29.3rc4'))
self.assertEqual('0x001D00F0', build_... | Remove accidentally duplicated test code. | Remove accidentally duplicated test code.
| Python | apache-2.0 | da-woods/cython,scoder/cython,da-woods/cython,cython/cython,scoder/cython,scoder/cython,da-woods/cython,cython/cython,scoder/cython,cython/cython,da-woods/cython,cython/cython | import unittest
from ..Utils import build_hex_version
class TestCythonUtils(unittest.TestCase):
def test_build_hex_version(self):
self.assertEqual('0x001D00A1', build_hex_version('0.29a1'))
self.assertEqual('0x001D00A1', build_hex_version('0.29a1'))
self.assertEqual('0x001D03C4', build_hex... | import unittest
from ..Utils import build_hex_version
class TestCythonUtils(unittest.TestCase):
def test_build_hex_version(self):
self.assertEqual('0x001D00A1', build_hex_version('0.29a1'))
self.assertEqual('0x001D03C4', build_hex_version('0.29.3rc4'))
self.assertEqual('0x001D00F0', build_... | <commit_before>import unittest
from ..Utils import build_hex_version
class TestCythonUtils(unittest.TestCase):
def test_build_hex_version(self):
self.assertEqual('0x001D00A1', build_hex_version('0.29a1'))
self.assertEqual('0x001D00A1', build_hex_version('0.29a1'))
self.assertEqual('0x001D0... | import unittest
from ..Utils import build_hex_version
class TestCythonUtils(unittest.TestCase):
def test_build_hex_version(self):
self.assertEqual('0x001D00A1', build_hex_version('0.29a1'))
self.assertEqual('0x001D03C4', build_hex_version('0.29.3rc4'))
self.assertEqual('0x001D00F0', build_... | import unittest
from ..Utils import build_hex_version
class TestCythonUtils(unittest.TestCase):
def test_build_hex_version(self):
self.assertEqual('0x001D00A1', build_hex_version('0.29a1'))
self.assertEqual('0x001D00A1', build_hex_version('0.29a1'))
self.assertEqual('0x001D03C4', build_hex... | <commit_before>import unittest
from ..Utils import build_hex_version
class TestCythonUtils(unittest.TestCase):
def test_build_hex_version(self):
self.assertEqual('0x001D00A1', build_hex_version('0.29a1'))
self.assertEqual('0x001D00A1', build_hex_version('0.29a1'))
self.assertEqual('0x001D0... |
3417c9260e5718c76978af8c276bea6b0b1cf126 | oj_helper/__init__.py | oj_helper/__init__.py | import json
import logging
import re
import requests
__all__ = ['config', 'session', 'submit', 'SubmitInfo', 'username']
logging.basicConfig(format='%(asctime)s %(levelname)s:%(name)s:%(message)s', level=logging.INFO)
logger = logging.getLogger(__name__)
# Import config
config = json.load(open('config.json'))
logger... | import json
import logging
import re
import requests
__all__ = ['config', 'session', 'submit', 'SubmitInfo', 'username']
logging.basicConfig(format='%(asctime)s %(levelname)s:%(name)s:%(message)s',
level=logging.WARNING)
logger = logging.getLogger(__name__)
# Import config
config = json.load(open... | Set logging level to WARNING for incoming release | Set logging level to WARNING for incoming release
| Python | mit | ThomasLee969/oj-helper | import json
import logging
import re
import requests
__all__ = ['config', 'session', 'submit', 'SubmitInfo', 'username']
logging.basicConfig(format='%(asctime)s %(levelname)s:%(name)s:%(message)s', level=logging.INFO)
logger = logging.getLogger(__name__)
# Import config
config = json.load(open('config.json'))
logger... | import json
import logging
import re
import requests
__all__ = ['config', 'session', 'submit', 'SubmitInfo', 'username']
logging.basicConfig(format='%(asctime)s %(levelname)s:%(name)s:%(message)s',
level=logging.WARNING)
logger = logging.getLogger(__name__)
# Import config
config = json.load(open... | <commit_before>import json
import logging
import re
import requests
__all__ = ['config', 'session', 'submit', 'SubmitInfo', 'username']
logging.basicConfig(format='%(asctime)s %(levelname)s:%(name)s:%(message)s', level=logging.INFO)
logger = logging.getLogger(__name__)
# Import config
config = json.load(open('config... | import json
import logging
import re
import requests
__all__ = ['config', 'session', 'submit', 'SubmitInfo', 'username']
logging.basicConfig(format='%(asctime)s %(levelname)s:%(name)s:%(message)s',
level=logging.WARNING)
logger = logging.getLogger(__name__)
# Import config
config = json.load(open... | import json
import logging
import re
import requests
__all__ = ['config', 'session', 'submit', 'SubmitInfo', 'username']
logging.basicConfig(format='%(asctime)s %(levelname)s:%(name)s:%(message)s', level=logging.INFO)
logger = logging.getLogger(__name__)
# Import config
config = json.load(open('config.json'))
logger... | <commit_before>import json
import logging
import re
import requests
__all__ = ['config', 'session', 'submit', 'SubmitInfo', 'username']
logging.basicConfig(format='%(asctime)s %(levelname)s:%(name)s:%(message)s', level=logging.INFO)
logger = logging.getLogger(__name__)
# Import config
config = json.load(open('config... |
c1de1a5406de7e36b3a36f5591aa16f315b1e368 | opps/images/models.py | opps/images/models.py | # -*- coding: utf-8 -*-
import uuid
import os
from datetime import datetime
from django.db import models
from django.utils.translation import ugettext_lazy as _
from django.utils import timezone
from taggit.managers import TaggableManager
from opps.core.models import Publishable
def get_file_path(instance, filenam... | # -*- coding: utf-8 -*-
import uuid
import os
from datetime import datetime
from django.db import models
from django.utils.translation import ugettext_lazy as _
from django.utils import timezone
from taggit.models import TaggedItemBase
from taggit.managers import TaggableManager
from opps.core.models import Publisha... | Create TaggedImage, unique marker for image | Create TaggedImage, unique marker for image
| Python | mit | YACOWS/opps,williamroot/opps,YACOWS/opps,opps/opps,jeanmask/opps,williamroot/opps,opps/opps,jeanmask/opps,opps/opps,williamroot/opps,opps/opps,williamroot/opps,jeanmask/opps,jeanmask/opps,YACOWS/opps,YACOWS/opps | # -*- coding: utf-8 -*-
import uuid
import os
from datetime import datetime
from django.db import models
from django.utils.translation import ugettext_lazy as _
from django.utils import timezone
from taggit.managers import TaggableManager
from opps.core.models import Publishable
def get_file_path(instance, filenam... | # -*- coding: utf-8 -*-
import uuid
import os
from datetime import datetime
from django.db import models
from django.utils.translation import ugettext_lazy as _
from django.utils import timezone
from taggit.models import TaggedItemBase
from taggit.managers import TaggableManager
from opps.core.models import Publisha... | <commit_before># -*- coding: utf-8 -*-
import uuid
import os
from datetime import datetime
from django.db import models
from django.utils.translation import ugettext_lazy as _
from django.utils import timezone
from taggit.managers import TaggableManager
from opps.core.models import Publishable
def get_file_path(in... | # -*- coding: utf-8 -*-
import uuid
import os
from datetime import datetime
from django.db import models
from django.utils.translation import ugettext_lazy as _
from django.utils import timezone
from taggit.models import TaggedItemBase
from taggit.managers import TaggableManager
from opps.core.models import Publisha... | # -*- coding: utf-8 -*-
import uuid
import os
from datetime import datetime
from django.db import models
from django.utils.translation import ugettext_lazy as _
from django.utils import timezone
from taggit.managers import TaggableManager
from opps.core.models import Publishable
def get_file_path(instance, filenam... | <commit_before># -*- coding: utf-8 -*-
import uuid
import os
from datetime import datetime
from django.db import models
from django.utils.translation import ugettext_lazy as _
from django.utils import timezone
from taggit.managers import TaggableManager
from opps.core.models import Publishable
def get_file_path(in... |
143ad06a39a4ee971f3f65e58cf17fbf8ebc81cd | app/decorators.py | app/decorators.py | # -*- coding: utf-8 -*-
from functools import wraps
from flask import abort
def admin_required(f):
@wraps(f)
def decorated_function(*args, **kwargs):
from flask_login import current_user
if not current_user.is_authenticated and not current_user.is_admin:
abort(403)
return ... | # -*- coding: utf-8 -*-
from functools import wraps
from flask import abort
def admin_required(f):
@wraps(f)
def decorated_function(*args, **kwargs):
from flask_login import current_user
if not current_user.is_authenticated or not current_user.is_admin:
abort(403)
return f... | Abort when user is not authenticated or not an admin | Abort when user is not authenticated or not an admin
| Python | mit | 0xfoo/flask-todolist,rtzll/flask-todolist,polyfunc/flask-todolist,polyfunc/flask-todolist,rtzll/flask-todolist,polyfunc/flask-todolist,0xfoo/flask-todolist,0xfoo/flask-todolist,rtzll/flask-todolist,rtzll/flask-todolist | # -*- coding: utf-8 -*-
from functools import wraps
from flask import abort
def admin_required(f):
@wraps(f)
def decorated_function(*args, **kwargs):
from flask_login import current_user
if not current_user.is_authenticated and not current_user.is_admin:
abort(403)
return ... | # -*- coding: utf-8 -*-
from functools import wraps
from flask import abort
def admin_required(f):
@wraps(f)
def decorated_function(*args, **kwargs):
from flask_login import current_user
if not current_user.is_authenticated or not current_user.is_admin:
abort(403)
return f... | <commit_before># -*- coding: utf-8 -*-
from functools import wraps
from flask import abort
def admin_required(f):
@wraps(f)
def decorated_function(*args, **kwargs):
from flask_login import current_user
if not current_user.is_authenticated and not current_user.is_admin:
abort(403)
... | # -*- coding: utf-8 -*-
from functools import wraps
from flask import abort
def admin_required(f):
@wraps(f)
def decorated_function(*args, **kwargs):
from flask_login import current_user
if not current_user.is_authenticated or not current_user.is_admin:
abort(403)
return f... | # -*- coding: utf-8 -*-
from functools import wraps
from flask import abort
def admin_required(f):
@wraps(f)
def decorated_function(*args, **kwargs):
from flask_login import current_user
if not current_user.is_authenticated and not current_user.is_admin:
abort(403)
return ... | <commit_before># -*- coding: utf-8 -*-
from functools import wraps
from flask import abort
def admin_required(f):
@wraps(f)
def decorated_function(*args, **kwargs):
from flask_login import current_user
if not current_user.is_authenticated and not current_user.is_admin:
abort(403)
... |
d91d6951c146ba4611d1b3869cbc08d396facd54 | collections/set.py | collections/set.py | # Set
#Removes the duplicates from the given group of values to create the set.
flight_set = {500,520,600,345,520,634,600,500,200,200}
print("Flight Set : ", flight_set)
# Converting List into Set
passengers_list=["George", "Annie", "Jack", "Annie", "Henry", "Helen", "Maria", "George", "Jack", "Remo"]
unique_passenger... | # Set
#Removes the duplicates from the given group of values to create the set.
flight_set = {500,520,600,345,520,634,600,500,200,200}
print("Flight Set : ", flight_set)
# Converting List into Set
passengers_list=["George", "Annie", "Jack", "Annie", "Henry", "Helen", "Maria", "George", "Jack", "Remo"]
unique_passenger... | Set with add, update, discard, remove, union, intersection, difference | Set with add, update, discard, remove, union, intersection, difference
| Python | mit | pk-python/basics | # Set
#Removes the duplicates from the given group of values to create the set.
flight_set = {500,520,600,345,520,634,600,500,200,200}
print("Flight Set : ", flight_set)
# Converting List into Set
passengers_list=["George", "Annie", "Jack", "Annie", "Henry", "Helen", "Maria", "George", "Jack", "Remo"]
unique_passenger... | # Set
#Removes the duplicates from the given group of values to create the set.
flight_set = {500,520,600,345,520,634,600,500,200,200}
print("Flight Set : ", flight_set)
# Converting List into Set
passengers_list=["George", "Annie", "Jack", "Annie", "Henry", "Helen", "Maria", "George", "Jack", "Remo"]
unique_passenger... | <commit_before># Set
#Removes the duplicates from the given group of values to create the set.
flight_set = {500,520,600,345,520,634,600,500,200,200}
print("Flight Set : ", flight_set)
# Converting List into Set
passengers_list=["George", "Annie", "Jack", "Annie", "Henry", "Helen", "Maria", "George", "Jack", "Remo"]
u... | # Set
#Removes the duplicates from the given group of values to create the set.
flight_set = {500,520,600,345,520,634,600,500,200,200}
print("Flight Set : ", flight_set)
# Converting List into Set
passengers_list=["George", "Annie", "Jack", "Annie", "Henry", "Helen", "Maria", "George", "Jack", "Remo"]
unique_passenger... | # Set
#Removes the duplicates from the given group of values to create the set.
flight_set = {500,520,600,345,520,634,600,500,200,200}
print("Flight Set : ", flight_set)
# Converting List into Set
passengers_list=["George", "Annie", "Jack", "Annie", "Henry", "Helen", "Maria", "George", "Jack", "Remo"]
unique_passenger... | <commit_before># Set
#Removes the duplicates from the given group of values to create the set.
flight_set = {500,520,600,345,520,634,600,500,200,200}
print("Flight Set : ", flight_set)
# Converting List into Set
passengers_list=["George", "Annie", "Jack", "Annie", "Henry", "Helen", "Maria", "George", "Jack", "Remo"]
u... |
51caae36a10cf5616982c78506c5dcec593259a3 | test_suite.py | test_suite.py | import os
os.environ['DJANGO_SETTINGS_MODULE'] = 'tests.settings'
from django.core import management
apps = [
'test',
'core',
'exporting',
'formatters',
'lexicon',
'events',
'history',
'models',
'query',
'sets',
'stats',
'search',
'subcommands',
'validation',
]... | import os
import sys
os.environ['DJANGO_SETTINGS_MODULE'] = 'tests.settings'
from django.core import management
apps = sys.argv[1:]
if not apps:
apps = [
'core',
'exporting',
'formatters',
'lexicon',
'events',
'history',
'models',
'query',
... | Allow apps to be specified from the command line | Allow apps to be specified from the command line
| Python | bsd-2-clause | murphyke/avocado,murphyke/avocado,murphyke/avocado,murphyke/avocado | import os
os.environ['DJANGO_SETTINGS_MODULE'] = 'tests.settings'
from django.core import management
apps = [
'test',
'core',
'exporting',
'formatters',
'lexicon',
'events',
'history',
'models',
'query',
'sets',
'stats',
'search',
'subcommands',
'validation',
]... | import os
import sys
os.environ['DJANGO_SETTINGS_MODULE'] = 'tests.settings'
from django.core import management
apps = sys.argv[1:]
if not apps:
apps = [
'core',
'exporting',
'formatters',
'lexicon',
'events',
'history',
'models',
'query',
... | <commit_before>import os
os.environ['DJANGO_SETTINGS_MODULE'] = 'tests.settings'
from django.core import management
apps = [
'test',
'core',
'exporting',
'formatters',
'lexicon',
'events',
'history',
'models',
'query',
'sets',
'stats',
'search',
'subcommands',
... | import os
import sys
os.environ['DJANGO_SETTINGS_MODULE'] = 'tests.settings'
from django.core import management
apps = sys.argv[1:]
if not apps:
apps = [
'core',
'exporting',
'formatters',
'lexicon',
'events',
'history',
'models',
'query',
... | import os
os.environ['DJANGO_SETTINGS_MODULE'] = 'tests.settings'
from django.core import management
apps = [
'test',
'core',
'exporting',
'formatters',
'lexicon',
'events',
'history',
'models',
'query',
'sets',
'stats',
'search',
'subcommands',
'validation',
]... | <commit_before>import os
os.environ['DJANGO_SETTINGS_MODULE'] = 'tests.settings'
from django.core import management
apps = [
'test',
'core',
'exporting',
'formatters',
'lexicon',
'events',
'history',
'models',
'query',
'sets',
'stats',
'search',
'subcommands',
... |
7e29758c43e6448d06f96d1d79777364560a7393 | bugzilla/bugsy.py | bugzilla/bugsy.py | import requests
from bug import Bug
class BugsyException(Exception):
"""If trying to do something to a Bug this will be thrown"""
def __init__(self, msg):
self.msg = msg
def __str__(self):
return "Message: %s" % self.msg
class Bugsy(object):
"""docstring for Bugsy"""
def __init__(... | import requests
from bug import Bug
class BugsyException(Exception):
"""If trying to do something to a Bug this will be thrown"""
def __init__(self, msg):
self.msg = msg
def __str__(self):
return "Message: %s" % self.msg
class Bugsy(object):
"""docstring for Bugsy"""
def __init__(... | Check if the result from Bugzilla has an error when trying to get a token | Check if the result from Bugzilla has an error when trying to get a token
| Python | apache-2.0 | parkouss/Bugsy,AutomatedTester/Bugsy,indygreg/Bugsy | import requests
from bug import Bug
class BugsyException(Exception):
"""If trying to do something to a Bug this will be thrown"""
def __init__(self, msg):
self.msg = msg
def __str__(self):
return "Message: %s" % self.msg
class Bugsy(object):
"""docstring for Bugsy"""
def __init__(... | import requests
from bug import Bug
class BugsyException(Exception):
"""If trying to do something to a Bug this will be thrown"""
def __init__(self, msg):
self.msg = msg
def __str__(self):
return "Message: %s" % self.msg
class Bugsy(object):
"""docstring for Bugsy"""
def __init__(... | <commit_before>import requests
from bug import Bug
class BugsyException(Exception):
"""If trying to do something to a Bug this will be thrown"""
def __init__(self, msg):
self.msg = msg
def __str__(self):
return "Message: %s" % self.msg
class Bugsy(object):
"""docstring for Bugsy"""
... | import requests
from bug import Bug
class BugsyException(Exception):
"""If trying to do something to a Bug this will be thrown"""
def __init__(self, msg):
self.msg = msg
def __str__(self):
return "Message: %s" % self.msg
class Bugsy(object):
"""docstring for Bugsy"""
def __init__(... | import requests
from bug import Bug
class BugsyException(Exception):
"""If trying to do something to a Bug this will be thrown"""
def __init__(self, msg):
self.msg = msg
def __str__(self):
return "Message: %s" % self.msg
class Bugsy(object):
"""docstring for Bugsy"""
def __init__(... | <commit_before>import requests
from bug import Bug
class BugsyException(Exception):
"""If trying to do something to a Bug this will be thrown"""
def __init__(self, msg):
self.msg = msg
def __str__(self):
return "Message: %s" % self.msg
class Bugsy(object):
"""docstring for Bugsy"""
... |
6776041c66a17fab0ad81799b44c3722e202dddf | builder/states.py | builder/states.py | # State identifiers (begin and end).
NO_STATE = -1
BIND_START = 0
BIND_END = BIND_START + 1
INTER_SSH_START = 10
INTER_SSH_END = INTER_SSH_START + 1
GIT_SETUP_START = 20
GIT_SETUP_END = GIT_SETUP_START + 1
UPLOAD_REPO_START = 30
UPLOAD_REPO_END = UPLOAD_REPO_START + 1
INSTALL_PKG_START = 40
INSTALL_PKG_END = INST... | # State identifiers (begin and end).
NO_STATE = -1
BIND_START = 0
BIND_END = BIND_START + 1
INTER_SSH_START = 10
INTER_SSH_END = INTER_SSH_START + 1
GIT_SETUP_START = 20
GIT_SETUP_END = GIT_SETUP_START + 1
UPLOAD_REPO_START = 30
UPLOAD_REPO_END = UPLOAD_REPO_START + 1
INSTALL_PKG_START = 40
INSTALL_PKG_END = INST... | Fix old variable STACK_START name (not used anymore) | Fix old variable STACK_START name (not used anymore)
| Python | apache-2.0 | harlowja/multi-devstack,harlowja/multi-devstack | # State identifiers (begin and end).
NO_STATE = -1
BIND_START = 0
BIND_END = BIND_START + 1
INTER_SSH_START = 10
INTER_SSH_END = INTER_SSH_START + 1
GIT_SETUP_START = 20
GIT_SETUP_END = GIT_SETUP_START + 1
UPLOAD_REPO_START = 30
UPLOAD_REPO_END = UPLOAD_REPO_START + 1
INSTALL_PKG_START = 40
INSTALL_PKG_END = INST... | # State identifiers (begin and end).
NO_STATE = -1
BIND_START = 0
BIND_END = BIND_START + 1
INTER_SSH_START = 10
INTER_SSH_END = INTER_SSH_START + 1
GIT_SETUP_START = 20
GIT_SETUP_END = GIT_SETUP_START + 1
UPLOAD_REPO_START = 30
UPLOAD_REPO_END = UPLOAD_REPO_START + 1
INSTALL_PKG_START = 40
INSTALL_PKG_END = INST... | <commit_before># State identifiers (begin and end).
NO_STATE = -1
BIND_START = 0
BIND_END = BIND_START + 1
INTER_SSH_START = 10
INTER_SSH_END = INTER_SSH_START + 1
GIT_SETUP_START = 20
GIT_SETUP_END = GIT_SETUP_START + 1
UPLOAD_REPO_START = 30
UPLOAD_REPO_END = UPLOAD_REPO_START + 1
INSTALL_PKG_START = 40
INSTALL... | # State identifiers (begin and end).
NO_STATE = -1
BIND_START = 0
BIND_END = BIND_START + 1
INTER_SSH_START = 10
INTER_SSH_END = INTER_SSH_START + 1
GIT_SETUP_START = 20
GIT_SETUP_END = GIT_SETUP_START + 1
UPLOAD_REPO_START = 30
UPLOAD_REPO_END = UPLOAD_REPO_START + 1
INSTALL_PKG_START = 40
INSTALL_PKG_END = INST... | # State identifiers (begin and end).
NO_STATE = -1
BIND_START = 0
BIND_END = BIND_START + 1
INTER_SSH_START = 10
INTER_SSH_END = INTER_SSH_START + 1
GIT_SETUP_START = 20
GIT_SETUP_END = GIT_SETUP_START + 1
UPLOAD_REPO_START = 30
UPLOAD_REPO_END = UPLOAD_REPO_START + 1
INSTALL_PKG_START = 40
INSTALL_PKG_END = INST... | <commit_before># State identifiers (begin and end).
NO_STATE = -1
BIND_START = 0
BIND_END = BIND_START + 1
INTER_SSH_START = 10
INTER_SSH_END = INTER_SSH_START + 1
GIT_SETUP_START = 20
GIT_SETUP_END = GIT_SETUP_START + 1
UPLOAD_REPO_START = 30
UPLOAD_REPO_END = UPLOAD_REPO_START + 1
INSTALL_PKG_START = 40
INSTALL... |
74af1019c7a21b69586ee55af2fa4ded6fe2eb03 | refmanage/__init__.py | refmanage/__init__.py | # -*- coding: utf-8 -*-
"""
===============================
Base Library (:mod:`refmanage`)
===============================
.. currentmodule:: refmanage
"""
from version import __version__
from fs_utils import *
| # -*- coding: utf-8 -*-
"""
===============================
Base Library (:mod:`refmanage`)
===============================
.. currentmodule:: refmanage
"""
from version import __version__
import fs_utils
| Fix import into refmanage namespace | Fix import into refmanage namespace
| Python | mit | jrsmith3/refmanage | # -*- coding: utf-8 -*-
"""
===============================
Base Library (:mod:`refmanage`)
===============================
.. currentmodule:: refmanage
"""
from version import __version__
from fs_utils import *
Fix import into refmanage namespace | # -*- coding: utf-8 -*-
"""
===============================
Base Library (:mod:`refmanage`)
===============================
.. currentmodule:: refmanage
"""
from version import __version__
import fs_utils
| <commit_before># -*- coding: utf-8 -*-
"""
===============================
Base Library (:mod:`refmanage`)
===============================
.. currentmodule:: refmanage
"""
from version import __version__
from fs_utils import *
<commit_msg>Fix import into refmanage namespace<commit_after> | # -*- coding: utf-8 -*-
"""
===============================
Base Library (:mod:`refmanage`)
===============================
.. currentmodule:: refmanage
"""
from version import __version__
import fs_utils
| # -*- coding: utf-8 -*-
"""
===============================
Base Library (:mod:`refmanage`)
===============================
.. currentmodule:: refmanage
"""
from version import __version__
from fs_utils import *
Fix import into refmanage namespace# -*- coding: utf-8 -*-
"""
===============================
Base Librar... | <commit_before># -*- coding: utf-8 -*-
"""
===============================
Base Library (:mod:`refmanage`)
===============================
.. currentmodule:: refmanage
"""
from version import __version__
from fs_utils import *
<commit_msg>Fix import into refmanage namespace<commit_after># -*- coding: utf-8 -*-
"""
==... |
9b8d18d52ef6ddd5009a448bcaf003435b387e72 | wake/views.py | wake/views.py | from been.couch import CouchStore
from flask import render_template
from wake import app
store = CouchStore().load()
@app.route('/')
def wake():
return render_template('stream.html', events=store.collapsed_events())
| from been.couch import CouchStore
from flask import render_template, abort
from wake import app
store = CouchStore().load()
@app.route('/')
def wake():
return render_template('stream.html', events=store.collapsed_events())
@app.route('/<slug>')
def by_slug(slug):
events = list(store.events_by_slug(slug))
... | Add by_slug view for single events. | Add by_slug view for single events.
| Python | bsd-3-clause | chromakode/wake | from been.couch import CouchStore
from flask import render_template
from wake import app
store = CouchStore().load()
@app.route('/')
def wake():
return render_template('stream.html', events=store.collapsed_events())
Add by_slug view for single events. | from been.couch import CouchStore
from flask import render_template, abort
from wake import app
store = CouchStore().load()
@app.route('/')
def wake():
return render_template('stream.html', events=store.collapsed_events())
@app.route('/<slug>')
def by_slug(slug):
events = list(store.events_by_slug(slug))
... | <commit_before>from been.couch import CouchStore
from flask import render_template
from wake import app
store = CouchStore().load()
@app.route('/')
def wake():
return render_template('stream.html', events=store.collapsed_events())
<commit_msg>Add by_slug view for single events.<commit_after> | from been.couch import CouchStore
from flask import render_template, abort
from wake import app
store = CouchStore().load()
@app.route('/')
def wake():
return render_template('stream.html', events=store.collapsed_events())
@app.route('/<slug>')
def by_slug(slug):
events = list(store.events_by_slug(slug))
... | from been.couch import CouchStore
from flask import render_template
from wake import app
store = CouchStore().load()
@app.route('/')
def wake():
return render_template('stream.html', events=store.collapsed_events())
Add by_slug view for single events.from been.couch import CouchStore
from flask import render_temp... | <commit_before>from been.couch import CouchStore
from flask import render_template
from wake import app
store = CouchStore().load()
@app.route('/')
def wake():
return render_template('stream.html', events=store.collapsed_events())
<commit_msg>Add by_slug view for single events.<commit_after>from been.couch import... |
76c9b7e8e8e6836ad73c81610a82ee2098cea026 | tests/main/views/test_status.py | tests/main/views/test_status.py | from tests.bases import BaseApplicationTest
class TestStatus(BaseApplicationTest):
def test_should_return_200_from_elb_status_check(self):
status_response = self.client.get('/_status?ignore-dependencies')
assert status_response.status_code == 200
| from tests.bases import BaseApplicationTest
from sqlalchemy.exc import SQLAlchemyError
import mock
class TestStatus(BaseApplicationTest):
def test_should_return_200_from_elb_status_check(self):
status_response = self.client.get('/_status?ignore-dependencies')
assert status_response.status_code ==... | Test coverage for SQLAlchemyError handling in status view | Test coverage for SQLAlchemyError handling in status view
| Python | mit | alphagov/digitalmarketplace-api,alphagov/digitalmarketplace-api,alphagov/digitalmarketplace-api | from tests.bases import BaseApplicationTest
class TestStatus(BaseApplicationTest):
def test_should_return_200_from_elb_status_check(self):
status_response = self.client.get('/_status?ignore-dependencies')
assert status_response.status_code == 200
Test coverage for SQLAlchemyError handling in stat... | from tests.bases import BaseApplicationTest
from sqlalchemy.exc import SQLAlchemyError
import mock
class TestStatus(BaseApplicationTest):
def test_should_return_200_from_elb_status_check(self):
status_response = self.client.get('/_status?ignore-dependencies')
assert status_response.status_code ==... | <commit_before>from tests.bases import BaseApplicationTest
class TestStatus(BaseApplicationTest):
def test_should_return_200_from_elb_status_check(self):
status_response = self.client.get('/_status?ignore-dependencies')
assert status_response.status_code == 200
<commit_msg>Test coverage for SQLAl... | from tests.bases import BaseApplicationTest
from sqlalchemy.exc import SQLAlchemyError
import mock
class TestStatus(BaseApplicationTest):
def test_should_return_200_from_elb_status_check(self):
status_response = self.client.get('/_status?ignore-dependencies')
assert status_response.status_code ==... | from tests.bases import BaseApplicationTest
class TestStatus(BaseApplicationTest):
def test_should_return_200_from_elb_status_check(self):
status_response = self.client.get('/_status?ignore-dependencies')
assert status_response.status_code == 200
Test coverage for SQLAlchemyError handling in stat... | <commit_before>from tests.bases import BaseApplicationTest
class TestStatus(BaseApplicationTest):
def test_should_return_200_from_elb_status_check(self):
status_response = self.client.get('/_status?ignore-dependencies')
assert status_response.status_code == 200
<commit_msg>Test coverage for SQLAl... |
47044ea3f5ec426358de8a7c735da70f72a9738e | tests/test_compute_abundance.py | tests/test_compute_abundance.py | import os
import sys
import tempfile
CURRENT_DIR = os.path.dirname(os.path.abspath(__file__))
SCRIPTS_DIR = os.path.join(CURRENT_DIR, '..', 'scripts')
sys.path.append(SCRIPTS_DIR)
SAMPLE_DIR = os.path.join(CURRENT_DIR, 'sample')
from compute_abundance import abundance_calculation
import pytest
@pytest.mark.paramet... | import os
import sys
import tempfile
CURRENT_DIR = os.path.dirname(os.path.abspath(__file__))
SCRIPTS_DIR = os.path.join(CURRENT_DIR, '..', 'scripts')
sys.path.append(SCRIPTS_DIR)
SAMPLE_DIR = os.path.join(CURRENT_DIR, 'sample')
from compute_abundance import abundance_calculation
import pytest
@pytest.mark.paramet... | Update unittest to be complient with a newer version of pytest | Update unittest to be complient with a newer version of pytest
| Python | agpl-3.0 | bonsai-team/matam,ppericard/matamog,bonsai-team/matam,ppericard/matam,ppericard/matamog,ppericard/matamog,ppericard/matamog,ppericard/matam,bonsai-team/matam,ppericard/matam,bonsai-team/matam | import os
import sys
import tempfile
CURRENT_DIR = os.path.dirname(os.path.abspath(__file__))
SCRIPTS_DIR = os.path.join(CURRENT_DIR, '..', 'scripts')
sys.path.append(SCRIPTS_DIR)
SAMPLE_DIR = os.path.join(CURRENT_DIR, 'sample')
from compute_abundance import abundance_calculation
import pytest
@pytest.mark.paramet... | import os
import sys
import tempfile
CURRENT_DIR = os.path.dirname(os.path.abspath(__file__))
SCRIPTS_DIR = os.path.join(CURRENT_DIR, '..', 'scripts')
sys.path.append(SCRIPTS_DIR)
SAMPLE_DIR = os.path.join(CURRENT_DIR, 'sample')
from compute_abundance import abundance_calculation
import pytest
@pytest.mark.paramet... | <commit_before>import os
import sys
import tempfile
CURRENT_DIR = os.path.dirname(os.path.abspath(__file__))
SCRIPTS_DIR = os.path.join(CURRENT_DIR, '..', 'scripts')
sys.path.append(SCRIPTS_DIR)
SAMPLE_DIR = os.path.join(CURRENT_DIR, 'sample')
from compute_abundance import abundance_calculation
import pytest
@pyte... | import os
import sys
import tempfile
CURRENT_DIR = os.path.dirname(os.path.abspath(__file__))
SCRIPTS_DIR = os.path.join(CURRENT_DIR, '..', 'scripts')
sys.path.append(SCRIPTS_DIR)
SAMPLE_DIR = os.path.join(CURRENT_DIR, 'sample')
from compute_abundance import abundance_calculation
import pytest
@pytest.mark.paramet... | import os
import sys
import tempfile
CURRENT_DIR = os.path.dirname(os.path.abspath(__file__))
SCRIPTS_DIR = os.path.join(CURRENT_DIR, '..', 'scripts')
sys.path.append(SCRIPTS_DIR)
SAMPLE_DIR = os.path.join(CURRENT_DIR, 'sample')
from compute_abundance import abundance_calculation
import pytest
@pytest.mark.paramet... | <commit_before>import os
import sys
import tempfile
CURRENT_DIR = os.path.dirname(os.path.abspath(__file__))
SCRIPTS_DIR = os.path.join(CURRENT_DIR, '..', 'scripts')
sys.path.append(SCRIPTS_DIR)
SAMPLE_DIR = os.path.join(CURRENT_DIR, 'sample')
from compute_abundance import abundance_calculation
import pytest
@pyte... |
5514450bbc72ad9ed181a79ffc546ba8015b5fd0 | vcs/models.py | vcs/models.py | from django.db import models
class Activity(models.Model):
group = models.CharField(max_length=4)
grouptype = models.TextField()
groupdetail = models.TextField()
details = models.TextField()
disabled = models.BooleanField()
time = models.DecimalField(decimal_places=2, max_digits=10)
unique_... | from django.db import models
class Activity(models.Model):
group = models.CharField(max_length=4)
grouptype = models.TextField()
groupdetail = models.TextField()
details = models.TextField()
disabled = models.BooleanField()
time = models.DecimalField(decimal_places=2, max_digits=10)
unique_... | Use a OneToMany field for the activity joiner. | Use a OneToMany field for the activity joiner.
| Python | bsd-3-clause | AeroNotix/django-timetracker,AeroNotix/django-timetracker,AeroNotix/django-timetracker | from django.db import models
class Activity(models.Model):
group = models.CharField(max_length=4)
grouptype = models.TextField()
groupdetail = models.TextField()
details = models.TextField()
disabled = models.BooleanField()
time = models.DecimalField(decimal_places=2, max_digits=10)
unique_... | from django.db import models
class Activity(models.Model):
group = models.CharField(max_length=4)
grouptype = models.TextField()
groupdetail = models.TextField()
details = models.TextField()
disabled = models.BooleanField()
time = models.DecimalField(decimal_places=2, max_digits=10)
unique_... | <commit_before>from django.db import models
class Activity(models.Model):
group = models.CharField(max_length=4)
grouptype = models.TextField()
groupdetail = models.TextField()
details = models.TextField()
disabled = models.BooleanField()
time = models.DecimalField(decimal_places=2, max_digits=... | from django.db import models
class Activity(models.Model):
group = models.CharField(max_length=4)
grouptype = models.TextField()
groupdetail = models.TextField()
details = models.TextField()
disabled = models.BooleanField()
time = models.DecimalField(decimal_places=2, max_digits=10)
unique_... | from django.db import models
class Activity(models.Model):
group = models.CharField(max_length=4)
grouptype = models.TextField()
groupdetail = models.TextField()
details = models.TextField()
disabled = models.BooleanField()
time = models.DecimalField(decimal_places=2, max_digits=10)
unique_... | <commit_before>from django.db import models
class Activity(models.Model):
group = models.CharField(max_length=4)
grouptype = models.TextField()
groupdetail = models.TextField()
details = models.TextField()
disabled = models.BooleanField()
time = models.DecimalField(decimal_places=2, max_digits=... |
8c68e23dc95bd77b1ccf9e8c989caa4673620fab | wallace/db.py | wallace/db.py | """Create a connection to the database."""
from sqlalchemy import create_engine
from sqlalchemy.orm import sessionmaker, scoped_session
from sqlalchemy.ext.declarative import declarative_base
import os
db_url = os.environ.get("DATABASE_URL", "postgresql://postgres@localhost/wallace")
engine = create_engine(db_url)
Se... | """Create a connection to the database."""
from sqlalchemy import create_engine
from sqlalchemy.orm import sessionmaker, scoped_session
from sqlalchemy.ext.declarative import declarative_base
import os
db_url = os.environ.get("DATABASE_URL", "postgresql://postgres@localhost/wallace")
engine = create_engine(db_url, po... | Allow a pool size of 100 | Allow a pool size of 100
| Python | mit | berkeley-cocosci/Wallace,Dallinger/Dallinger,Dallinger/Dallinger,jcpeterson/Dallinger,jcpeterson/Dallinger,berkeley-cocosci/Wallace,Dallinger/Dallinger,berkeley-cocosci/Wallace,Dallinger/Dallinger,jcpeterson/Dallinger,suchow/Wallace,jcpeterson/Dallinger,jcpeterson/Dallinger,Dallinger/Dallinger,suchow/Wallace,suchow/Wal... | """Create a connection to the database."""
from sqlalchemy import create_engine
from sqlalchemy.orm import sessionmaker, scoped_session
from sqlalchemy.ext.declarative import declarative_base
import os
db_url = os.environ.get("DATABASE_URL", "postgresql://postgres@localhost/wallace")
engine = create_engine(db_url)
Se... | """Create a connection to the database."""
from sqlalchemy import create_engine
from sqlalchemy.orm import sessionmaker, scoped_session
from sqlalchemy.ext.declarative import declarative_base
import os
db_url = os.environ.get("DATABASE_URL", "postgresql://postgres@localhost/wallace")
engine = create_engine(db_url, po... | <commit_before>"""Create a connection to the database."""
from sqlalchemy import create_engine
from sqlalchemy.orm import sessionmaker, scoped_session
from sqlalchemy.ext.declarative import declarative_base
import os
db_url = os.environ.get("DATABASE_URL", "postgresql://postgres@localhost/wallace")
engine = create_en... | """Create a connection to the database."""
from sqlalchemy import create_engine
from sqlalchemy.orm import sessionmaker, scoped_session
from sqlalchemy.ext.declarative import declarative_base
import os
db_url = os.environ.get("DATABASE_URL", "postgresql://postgres@localhost/wallace")
engine = create_engine(db_url, po... | """Create a connection to the database."""
from sqlalchemy import create_engine
from sqlalchemy.orm import sessionmaker, scoped_session
from sqlalchemy.ext.declarative import declarative_base
import os
db_url = os.environ.get("DATABASE_URL", "postgresql://postgres@localhost/wallace")
engine = create_engine(db_url)
Se... | <commit_before>"""Create a connection to the database."""
from sqlalchemy import create_engine
from sqlalchemy.orm import sessionmaker, scoped_session
from sqlalchemy.ext.declarative import declarative_base
import os
db_url = os.environ.get("DATABASE_URL", "postgresql://postgres@localhost/wallace")
engine = create_en... |
c3fc313964676aec079b826fd4868fe27a27c54b | mollie/api/objects/capture.py | mollie/api/objects/capture.py | from .base import Base
class Capture(Base):
@classmethod
def get_resource_class(cls, client):
from ..resources.captures import Captures
return Captures(client)
@property
def id(self):
return self._get_property('id')
@property
def mode(self):
return self._get_p... | from .base import Base
class Capture(Base):
@classmethod
def get_resource_class(cls, client):
from ..resources.captures import Captures
return Captures(client)
@property
def id(self):
return self._get_property('id')
@property
def mode(self):
return self._get_p... | Fix docstring, return the settlement | Fix docstring, return the settlement
| Python | bsd-2-clause | mollie/mollie-api-python | from .base import Base
class Capture(Base):
@classmethod
def get_resource_class(cls, client):
from ..resources.captures import Captures
return Captures(client)
@property
def id(self):
return self._get_property('id')
@property
def mode(self):
return self._get_p... | from .base import Base
class Capture(Base):
@classmethod
def get_resource_class(cls, client):
from ..resources.captures import Captures
return Captures(client)
@property
def id(self):
return self._get_property('id')
@property
def mode(self):
return self._get_p... | <commit_before>from .base import Base
class Capture(Base):
@classmethod
def get_resource_class(cls, client):
from ..resources.captures import Captures
return Captures(client)
@property
def id(self):
return self._get_property('id')
@property
def mode(self):
ret... | from .base import Base
class Capture(Base):
@classmethod
def get_resource_class(cls, client):
from ..resources.captures import Captures
return Captures(client)
@property
def id(self):
return self._get_property('id')
@property
def mode(self):
return self._get_p... | from .base import Base
class Capture(Base):
@classmethod
def get_resource_class(cls, client):
from ..resources.captures import Captures
return Captures(client)
@property
def id(self):
return self._get_property('id')
@property
def mode(self):
return self._get_p... | <commit_before>from .base import Base
class Capture(Base):
@classmethod
def get_resource_class(cls, client):
from ..resources.captures import Captures
return Captures(client)
@property
def id(self):
return self._get_property('id')
@property
def mode(self):
ret... |
baab2698f4dda3190eb62896ccbc7c174dd63113 | mysite/deployment_settings.py | mysite/deployment_settings.py | from settings import *
OHLOH_API_KEY='SXvLaGPJFaKXQC0VOocAg'
DEBUG=False
ADMINS=[
('All OH devs', '[email protected]'),
]
INVITE_MODE=True # Enabled on production site
INVITATIONS_PER_USER=20
TEMPLTE_DEBUG=False
| from settings import *
OHLOH_API_KEY='SXvLaGPJFaKXQC0VOocAg'
DEBUG=False
ADMINS=[
('All OH devs', '[email protected]'),
]
INVITE_MODE=True # Enabled on production site
INVITATIONS_PER_USER=20
TEMPLTE_DEBUG=False
EMAIL_SUBJECT_PREFIX='[Kaboom@OH] '
SEND_BROKEN_LINK_EMAILS=True
MANAGERS=ADMINS
SERVER_EMA... | Send broken link emails out; send them from mr_website | Send broken link emails out; send them from mr_website
| Python | agpl-3.0 | eeshangarg/oh-mainline,SnappleCap/oh-mainline,mzdaniel/oh-mainline,Changaco/oh-mainline,jledbetter/openhatch,mzdaniel/oh-mainline,vipul-sharma20/oh-mainline,heeraj123/oh-mainline,willingc/oh-mainline,eeshangarg/oh-mainline,eeshangarg/oh-mainline,openhatch/oh-mainline,Changaco/oh-mainline,campbe13/openhatch,eeshangarg/o... | from settings import *
OHLOH_API_KEY='SXvLaGPJFaKXQC0VOocAg'
DEBUG=False
ADMINS=[
('All OH devs', '[email protected]'),
]
INVITE_MODE=True # Enabled on production site
INVITATIONS_PER_USER=20
TEMPLTE_DEBUG=False
Send broken link emails out; send them from mr_website | from settings import *
OHLOH_API_KEY='SXvLaGPJFaKXQC0VOocAg'
DEBUG=False
ADMINS=[
('All OH devs', '[email protected]'),
]
INVITE_MODE=True # Enabled on production site
INVITATIONS_PER_USER=20
TEMPLTE_DEBUG=False
EMAIL_SUBJECT_PREFIX='[Kaboom@OH] '
SEND_BROKEN_LINK_EMAILS=True
MANAGERS=ADMINS
SERVER_EMA... | <commit_before>from settings import *
OHLOH_API_KEY='SXvLaGPJFaKXQC0VOocAg'
DEBUG=False
ADMINS=[
('All OH devs', '[email protected]'),
]
INVITE_MODE=True # Enabled on production site
INVITATIONS_PER_USER=20
TEMPLTE_DEBUG=False
<commit_msg>Send broken link emails out; send them from mr_website<commit_afte... | from settings import *
OHLOH_API_KEY='SXvLaGPJFaKXQC0VOocAg'
DEBUG=False
ADMINS=[
('All OH devs', '[email protected]'),
]
INVITE_MODE=True # Enabled on production site
INVITATIONS_PER_USER=20
TEMPLTE_DEBUG=False
EMAIL_SUBJECT_PREFIX='[Kaboom@OH] '
SEND_BROKEN_LINK_EMAILS=True
MANAGERS=ADMINS
SERVER_EMA... | from settings import *
OHLOH_API_KEY='SXvLaGPJFaKXQC0VOocAg'
DEBUG=False
ADMINS=[
('All OH devs', '[email protected]'),
]
INVITE_MODE=True # Enabled on production site
INVITATIONS_PER_USER=20
TEMPLTE_DEBUG=False
Send broken link emails out; send them from mr_websitefrom settings import *
OHLOH_API_KEY='... | <commit_before>from settings import *
OHLOH_API_KEY='SXvLaGPJFaKXQC0VOocAg'
DEBUG=False
ADMINS=[
('All OH devs', '[email protected]'),
]
INVITE_MODE=True # Enabled on production site
INVITATIONS_PER_USER=20
TEMPLTE_DEBUG=False
<commit_msg>Send broken link emails out; send them from mr_website<commit_afte... |
52731e9eb254b77b54f1434b44d73ecd8f9f437d | src/parser/banner.py | src/parser/banner.py | """(c) All rights reserved. ECOLE POLYTECHNIQUE FEDERALE DE LAUSANNE, Switzerland, VPSI, 2018"""
from bs4 import BeautifulSoup
import re
class Banner:
""" To store website banner information. """
# FIXME: extend class with more information if html content is not enough to handle banner
def __init__(sel... | """(c) All rights reserved. ECOLE POLYTECHNIQUE FEDERALE DE LAUSANNE, Switzerland, VPSI, 2018"""
class Banner:
""" To store website banner information. """
# FIXME: extend class with more information if html content is not enough to handle banner
def __init__(self, content):
""" Constructor
... | Remove images URL cleaning because will be done later during parsing | Remove images URL cleaning because will be done later during parsing
| Python | mit | epfl-idevelop/jahia2wp,epfl-idevelop/jahia2wp,epfl-idevelop/jahia2wp,epfl-idevelop/jahia2wp | """(c) All rights reserved. ECOLE POLYTECHNIQUE FEDERALE DE LAUSANNE, Switzerland, VPSI, 2018"""
from bs4 import BeautifulSoup
import re
class Banner:
""" To store website banner information. """
# FIXME: extend class with more information if html content is not enough to handle banner
def __init__(sel... | """(c) All rights reserved. ECOLE POLYTECHNIQUE FEDERALE DE LAUSANNE, Switzerland, VPSI, 2018"""
class Banner:
""" To store website banner information. """
# FIXME: extend class with more information if html content is not enough to handle banner
def __init__(self, content):
""" Constructor
... | <commit_before>"""(c) All rights reserved. ECOLE POLYTECHNIQUE FEDERALE DE LAUSANNE, Switzerland, VPSI, 2018"""
from bs4 import BeautifulSoup
import re
class Banner:
""" To store website banner information. """
# FIXME: extend class with more information if html content is not enough to handle banner
d... | """(c) All rights reserved. ECOLE POLYTECHNIQUE FEDERALE DE LAUSANNE, Switzerland, VPSI, 2018"""
class Banner:
""" To store website banner information. """
# FIXME: extend class with more information if html content is not enough to handle banner
def __init__(self, content):
""" Constructor
... | """(c) All rights reserved. ECOLE POLYTECHNIQUE FEDERALE DE LAUSANNE, Switzerland, VPSI, 2018"""
from bs4 import BeautifulSoup
import re
class Banner:
""" To store website banner information. """
# FIXME: extend class with more information if html content is not enough to handle banner
def __init__(sel... | <commit_before>"""(c) All rights reserved. ECOLE POLYTECHNIQUE FEDERALE DE LAUSANNE, Switzerland, VPSI, 2018"""
from bs4 import BeautifulSoup
import re
class Banner:
""" To store website banner information. """
# FIXME: extend class with more information if html content is not enough to handle banner
d... |
515e3b4da9d8c793c57e8cb8deeda93e42aa3871 | nereid/ctx.py | nereid/ctx.py | #This file is part of Tryton & Nereid. The COPYRIGHT file at the top level of
#this repository contains the full copyright notices and license terms.
from flask.ctx import RequestContext as RequestContextBase
from flask.ctx import has_request_context # noqa
class RequestContext(RequestContextBase):
"""
The r... | #This file is part of Tryton & Nereid. The COPYRIGHT file at the top level of
#this repository contains the full copyright notices and license terms.
from flask.ctx import RequestContext as RequestContextBase
from flask.ctx import has_request_context # noqa
class RequestContext(RequestContextBase):
"""
The r... | Add request argument for RequestContext | Add request argument for RequestContext
See: cb2055bbcb345e367b6bdfe177a407546286695c@097353695e3178a38403b204ae4889c8a32bf997
| Python | bsd-3-clause | riteshshrv/nereid,fulfilio/nereid,riteshshrv/nereid,fulfilio/nereid,usudaysingh/nereid,prakashpp/nereid,usudaysingh/nereid,prakashpp/nereid | #This file is part of Tryton & Nereid. The COPYRIGHT file at the top level of
#this repository contains the full copyright notices and license terms.
from flask.ctx import RequestContext as RequestContextBase
from flask.ctx import has_request_context # noqa
class RequestContext(RequestContextBase):
"""
The r... | #This file is part of Tryton & Nereid. The COPYRIGHT file at the top level of
#this repository contains the full copyright notices and license terms.
from flask.ctx import RequestContext as RequestContextBase
from flask.ctx import has_request_context # noqa
class RequestContext(RequestContextBase):
"""
The r... | <commit_before>#This file is part of Tryton & Nereid. The COPYRIGHT file at the top level of
#this repository contains the full copyright notices and license terms.
from flask.ctx import RequestContext as RequestContextBase
from flask.ctx import has_request_context # noqa
class RequestContext(RequestContextBase):
... | #This file is part of Tryton & Nereid. The COPYRIGHT file at the top level of
#this repository contains the full copyright notices and license terms.
from flask.ctx import RequestContext as RequestContextBase
from flask.ctx import has_request_context # noqa
class RequestContext(RequestContextBase):
"""
The r... | #This file is part of Tryton & Nereid. The COPYRIGHT file at the top level of
#this repository contains the full copyright notices and license terms.
from flask.ctx import RequestContext as RequestContextBase
from flask.ctx import has_request_context # noqa
class RequestContext(RequestContextBase):
"""
The r... | <commit_before>#This file is part of Tryton & Nereid. The COPYRIGHT file at the top level of
#this repository contains the full copyright notices and license terms.
from flask.ctx import RequestContext as RequestContextBase
from flask.ctx import has_request_context # noqa
class RequestContext(RequestContextBase):
... |
d5bca737d19f7bfd34fd37d00f1210f8bc777c76 | crmapp/accounts/views.py | crmapp/accounts/views.py | from django.shortcuts import render
# Create your views here.
| from django.views.generic import ListView
from django.contrib.auth.decorators import login_required
from django.utils.decorators import method_decorator
from .models import Account
class AccountList(ListView):
model = Account
template_name = 'accounts/account_list.html'
context_object_name = 'accounts'
... | Create the Account List > List Accounts - Create View | Create the Account List > List Accounts - Create View
| Python | mit | tabdon/crmeasyapp,tabdon/crmeasyapp,deenaariff/Django | from django.shortcuts import render
# Create your views here.
Create the Account List > List Accounts - Create View | from django.views.generic import ListView
from django.contrib.auth.decorators import login_required
from django.utils.decorators import method_decorator
from .models import Account
class AccountList(ListView):
model = Account
template_name = 'accounts/account_list.html'
context_object_name = 'accounts'
... | <commit_before>from django.shortcuts import render
# Create your views here.
<commit_msg>Create the Account List > List Accounts - Create View<commit_after> | from django.views.generic import ListView
from django.contrib.auth.decorators import login_required
from django.utils.decorators import method_decorator
from .models import Account
class AccountList(ListView):
model = Account
template_name = 'accounts/account_list.html'
context_object_name = 'accounts'
... | from django.shortcuts import render
# Create your views here.
Create the Account List > List Accounts - Create Viewfrom django.views.generic import ListView
from django.contrib.auth.decorators import login_required
from django.utils.decorators import method_decorator
from .models import Account
class AccountList(Lis... | <commit_before>from django.shortcuts import render
# Create your views here.
<commit_msg>Create the Account List > List Accounts - Create View<commit_after>from django.views.generic import ListView
from django.contrib.auth.decorators import login_required
from django.utils.decorators import method_decorator
from .mod... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.