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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
979c56f882178ce49194850bd9e78c9dea4692dd | chardet/__init__.py | chardet/__init__.py | ######################## BEGIN LICENSE BLOCK ########################
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2.1 of the License, or (at your option) any later ve... | ######################## BEGIN LICENSE BLOCK ########################
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2.1 of the License, or (at your option) any later ve... | Remove unnecessary line from detect | Remove unnecessary line from detect
| Python | lgpl-2.1 | ddboline/chardet,chardet/chardet,chardet/chardet,ddboline/chardet | ######################## BEGIN LICENSE BLOCK ########################
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2.1 of the License, or (at your option) any later ve... | ######################## BEGIN LICENSE BLOCK ########################
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2.1 of the License, or (at your option) any later ve... | <commit_before>######################## BEGIN LICENSE BLOCK ########################
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2.1 of the License, or (at your optio... | ######################## BEGIN LICENSE BLOCK ########################
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2.1 of the License, or (at your option) any later ve... | ######################## BEGIN LICENSE BLOCK ########################
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2.1 of the License, or (at your option) any later ve... | <commit_before>######################## BEGIN LICENSE BLOCK ########################
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2.1 of the License, or (at your optio... |
e0989ff4c2292d0f2d053065bfa71124a3705559 | jarn/mkrelease/colors.py | jarn/mkrelease/colors.py | import os
import functools
import blessed
def color(func):
functools.wraps(func)
def wrapper(string):
if os.environ.get('JARN_NO_COLOR') == '1':
return string
return func(string)
return wrapper
term = blessed.Terminal()
bold = color(term.bold)
blue = color(term.bold_blue)
gr... | import os
import functools
import blessed
def color(func):
assignments = functools.WRAPPER_ASSIGNMENTS
if not hasattr(func, '__name__'):
assignments = [x for x in assignments if x != '__name__']
@functools.wraps(func, assignments)
def wrapper(string):
if os.environ.get('JARN_NO_COLOR'... | Fix wrapping in color decorator. | Fix wrapping in color decorator.
| Python | bsd-2-clause | Jarn/jarn.mkrelease | import os
import functools
import blessed
def color(func):
functools.wraps(func)
def wrapper(string):
if os.environ.get('JARN_NO_COLOR') == '1':
return string
return func(string)
return wrapper
term = blessed.Terminal()
bold = color(term.bold)
blue = color(term.bold_blue)
gr... | import os
import functools
import blessed
def color(func):
assignments = functools.WRAPPER_ASSIGNMENTS
if not hasattr(func, '__name__'):
assignments = [x for x in assignments if x != '__name__']
@functools.wraps(func, assignments)
def wrapper(string):
if os.environ.get('JARN_NO_COLOR'... | <commit_before>import os
import functools
import blessed
def color(func):
functools.wraps(func)
def wrapper(string):
if os.environ.get('JARN_NO_COLOR') == '1':
return string
return func(string)
return wrapper
term = blessed.Terminal()
bold = color(term.bold)
blue = color(ter... | import os
import functools
import blessed
def color(func):
assignments = functools.WRAPPER_ASSIGNMENTS
if not hasattr(func, '__name__'):
assignments = [x for x in assignments if x != '__name__']
@functools.wraps(func, assignments)
def wrapper(string):
if os.environ.get('JARN_NO_COLOR'... | import os
import functools
import blessed
def color(func):
functools.wraps(func)
def wrapper(string):
if os.environ.get('JARN_NO_COLOR') == '1':
return string
return func(string)
return wrapper
term = blessed.Terminal()
bold = color(term.bold)
blue = color(term.bold_blue)
gr... | <commit_before>import os
import functools
import blessed
def color(func):
functools.wraps(func)
def wrapper(string):
if os.environ.get('JARN_NO_COLOR') == '1':
return string
return func(string)
return wrapper
term = blessed.Terminal()
bold = color(term.bold)
blue = color(ter... |
f036e74a6d887a5267885ef09cfe9c3a4de7eea5 | config.py | config.py | import os
config = {
'DEBUG': not os.getenv('SERVER_SOFTWARE', '').startswith('Google App Engine/'),
'SECRET_KEY': 'Some big sentence',
} | import os
config = {
'DEBUG': True if os.getenv('SERVER_SOFTWARE', '').startswith('Development/') else False,
'SECRET_KEY': 'Some big sentence',
}
| Set DEBUG to true only when using Development server | Set DEBUG to true only when using Development server
| Python | mit | i2nes/app-engine-blog,i2nes/app-engine-blog,i2nes/app-engine-blog | import os
config = {
'DEBUG': not os.getenv('SERVER_SOFTWARE', '').startswith('Google App Engine/'),
'SECRET_KEY': 'Some big sentence',
}Set DEBUG to true only when using Development server | import os
config = {
'DEBUG': True if os.getenv('SERVER_SOFTWARE', '').startswith('Development/') else False,
'SECRET_KEY': 'Some big sentence',
}
| <commit_before>import os
config = {
'DEBUG': not os.getenv('SERVER_SOFTWARE', '').startswith('Google App Engine/'),
'SECRET_KEY': 'Some big sentence',
}<commit_msg>Set DEBUG to true only when using Development server<commit_after> | import os
config = {
'DEBUG': True if os.getenv('SERVER_SOFTWARE', '').startswith('Development/') else False,
'SECRET_KEY': 'Some big sentence',
}
| import os
config = {
'DEBUG': not os.getenv('SERVER_SOFTWARE', '').startswith('Google App Engine/'),
'SECRET_KEY': 'Some big sentence',
}Set DEBUG to true only when using Development serverimport os
config = {
'DEBUG': True if os.getenv('SERVER_SOFTWARE', '').startswith('Development/') else False,
'... | <commit_before>import os
config = {
'DEBUG': not os.getenv('SERVER_SOFTWARE', '').startswith('Google App Engine/'),
'SECRET_KEY': 'Some big sentence',
}<commit_msg>Set DEBUG to true only when using Development server<commit_after>import os
config = {
'DEBUG': True if os.getenv('SERVER_SOFTWARE', '').sta... |
70d2f182c09583802da2860994a99fd2bc9e39d5 | kimochiconsumer/views.py | kimochiconsumer/views.py | from pyramid.view import view_config
from pyramid.httpexceptions import (
HTTPNotFound,
)
@view_config(route_name='page', renderer='templates/page.mako')
@view_config(route_name='page_view', renderer='templates/page.mako')
def page_view(request):
if 'page_id' in request.matchdict:
data = request.kimoc... | from pyramid.view import view_config
from pyramid.httpexceptions import (
HTTPNotFound,
)
@view_config(route_name='page', renderer='templates/page.mako')
@view_config(route_name='page_view', renderer='templates/page.mako')
def page_view(request):
if 'page_id' in request.matchdict:
data = request.kimoc... | Use 'index' as the default page alias for lookups | Use 'index' as the default page alias for lookups
| Python | mit | matslindh/kimochi-consumer | from pyramid.view import view_config
from pyramid.httpexceptions import (
HTTPNotFound,
)
@view_config(route_name='page', renderer='templates/page.mako')
@view_config(route_name='page_view', renderer='templates/page.mako')
def page_view(request):
if 'page_id' in request.matchdict:
data = request.kimoc... | from pyramid.view import view_config
from pyramid.httpexceptions import (
HTTPNotFound,
)
@view_config(route_name='page', renderer='templates/page.mako')
@view_config(route_name='page_view', renderer='templates/page.mako')
def page_view(request):
if 'page_id' in request.matchdict:
data = request.kimoc... | <commit_before>from pyramid.view import view_config
from pyramid.httpexceptions import (
HTTPNotFound,
)
@view_config(route_name='page', renderer='templates/page.mako')
@view_config(route_name='page_view', renderer='templates/page.mako')
def page_view(request):
if 'page_id' in request.matchdict:
data ... | from pyramid.view import view_config
from pyramid.httpexceptions import (
HTTPNotFound,
)
@view_config(route_name='page', renderer='templates/page.mako')
@view_config(route_name='page_view', renderer='templates/page.mako')
def page_view(request):
if 'page_id' in request.matchdict:
data = request.kimoc... | from pyramid.view import view_config
from pyramid.httpexceptions import (
HTTPNotFound,
)
@view_config(route_name='page', renderer='templates/page.mako')
@view_config(route_name='page_view', renderer='templates/page.mako')
def page_view(request):
if 'page_id' in request.matchdict:
data = request.kimoc... | <commit_before>from pyramid.view import view_config
from pyramid.httpexceptions import (
HTTPNotFound,
)
@view_config(route_name='page', renderer='templates/page.mako')
@view_config(route_name='page_view', renderer='templates/page.mako')
def page_view(request):
if 'page_id' in request.matchdict:
data ... |
c537ec56660d6829c3297db9760fc75e2f6260b2 | setup.py | setup.py | #!/usr/bin/env python
from setuptools import setup
with open('README.md') as f:
long_description = f.read().strip()
setup(name='python-circuit',
version='0.1.6',
description='Simple implementation of the Circuit Breaker pattern',
long_description=long_description,
author='Edgeware',
... | #!/usr/bin/env python
from setuptools import setup
with open('README.md') as f:
long_description = f.read().strip()
setup(name='python-circuit',
version='0.1.6',
description='Simple implementation of the Circuit Breaker pattern',
long_description=long_description,
author='Edgeware',
... | Remove deprecated kwarg and undefined variable. | Remove deprecated kwarg and undefined variable.
| Python | apache-2.0 | edgeware/python-circuit | #!/usr/bin/env python
from setuptools import setup
with open('README.md') as f:
long_description = f.read().strip()
setup(name='python-circuit',
version='0.1.6',
description='Simple implementation of the Circuit Breaker pattern',
long_description=long_description,
author='Edgeware',
... | #!/usr/bin/env python
from setuptools import setup
with open('README.md') as f:
long_description = f.read().strip()
setup(name='python-circuit',
version='0.1.6',
description='Simple implementation of the Circuit Breaker pattern',
long_description=long_description,
author='Edgeware',
... | <commit_before>#!/usr/bin/env python
from setuptools import setup
with open('README.md') as f:
long_description = f.read().strip()
setup(name='python-circuit',
version='0.1.6',
description='Simple implementation of the Circuit Breaker pattern',
long_description=long_description,
author='Ed... | #!/usr/bin/env python
from setuptools import setup
with open('README.md') as f:
long_description = f.read().strip()
setup(name='python-circuit',
version='0.1.6',
description='Simple implementation of the Circuit Breaker pattern',
long_description=long_description,
author='Edgeware',
... | #!/usr/bin/env python
from setuptools import setup
with open('README.md') as f:
long_description = f.read().strip()
setup(name='python-circuit',
version='0.1.6',
description='Simple implementation of the Circuit Breaker pattern',
long_description=long_description,
author='Edgeware',
... | <commit_before>#!/usr/bin/env python
from setuptools import setup
with open('README.md') as f:
long_description = f.read().strip()
setup(name='python-circuit',
version='0.1.6',
description='Simple implementation of the Circuit Breaker pattern',
long_description=long_description,
author='Ed... |
db442d2300ee99f8b062432225291696f26448b7 | setup.py | setup.py | # -*- coding: utf-8 -*-
from setuptools import setup, find_packages
with open('README.rst') as f:
readme = f.read()
setup(
name='django-addendum',
version='0.0.1',
description='Simple template-based content swapping for CMS-less sites',
long_description=readme,
author='Ben Lopatin',
auth... | # -*- coding: utf-8 -*-
from setuptools import setup, find_packages
with open('README.rst') as f:
readme = f.read()
setup(
name='django-addendum',
version='0.0.2',
description='Simple template-based content swapping for CMS-less sites',
long_description=readme,
author='Ben Lopatin',
auth... | Fix version for migrations fix | Fix version for migrations fix
| Python | bsd-2-clause | adw0rd/django-addendum-inline,bennylope/django-addendum,bennylope/django-addendum,adw0rd/django-addendum-inline | # -*- coding: utf-8 -*-
from setuptools import setup, find_packages
with open('README.rst') as f:
readme = f.read()
setup(
name='django-addendum',
version='0.0.1',
description='Simple template-based content swapping for CMS-less sites',
long_description=readme,
author='Ben Lopatin',
auth... | # -*- coding: utf-8 -*-
from setuptools import setup, find_packages
with open('README.rst') as f:
readme = f.read()
setup(
name='django-addendum',
version='0.0.2',
description='Simple template-based content swapping for CMS-less sites',
long_description=readme,
author='Ben Lopatin',
auth... | <commit_before># -*- coding: utf-8 -*-
from setuptools import setup, find_packages
with open('README.rst') as f:
readme = f.read()
setup(
name='django-addendum',
version='0.0.1',
description='Simple template-based content swapping for CMS-less sites',
long_description=readme,
author='Ben Lop... | # -*- coding: utf-8 -*-
from setuptools import setup, find_packages
with open('README.rst') as f:
readme = f.read()
setup(
name='django-addendum',
version='0.0.2',
description='Simple template-based content swapping for CMS-less sites',
long_description=readme,
author='Ben Lopatin',
auth... | # -*- coding: utf-8 -*-
from setuptools import setup, find_packages
with open('README.rst') as f:
readme = f.read()
setup(
name='django-addendum',
version='0.0.1',
description='Simple template-based content swapping for CMS-less sites',
long_description=readme,
author='Ben Lopatin',
auth... | <commit_before># -*- coding: utf-8 -*-
from setuptools import setup, find_packages
with open('README.rst') as f:
readme = f.read()
setup(
name='django-addendum',
version='0.0.1',
description='Simple template-based content swapping for CMS-less sites',
long_description=readme,
author='Ben Lop... |
0dce3b4101b29ecb79d5743d2c86b40c22d0e7e9 | setup.py | setup.py | # -*- coding: utf-8 -*-
from setuptools import setup
with open('README.rst', 'r') as f:
long_desc = f.read().decode('utf-8')
setup(name='dmgbuild',
version='1.0.0',
description='Mac OS X command line utility to build disk images',
long_description=long_desc,
author='Alastair Houghton',
... | # -*- coding: utf-8 -*-
from setuptools import setup
with open('README.rst', 'r') as f:
long_desc = f.read().decode('utf-8')
setup(name='dmgbuild',
version='1.0.0',
description='Mac OS X command line utility to build disk images',
long_description=long_desc,
author='Alastair Houghton',
... | Add previously undeclared PyObjC Quartz dependency. | Add previously undeclared PyObjC Quartz dependency.
| Python | mit | al45tair/dmgbuild | # -*- coding: utf-8 -*-
from setuptools import setup
with open('README.rst', 'r') as f:
long_desc = f.read().decode('utf-8')
setup(name='dmgbuild',
version='1.0.0',
description='Mac OS X command line utility to build disk images',
long_description=long_desc,
author='Alastair Houghton',
... | # -*- coding: utf-8 -*-
from setuptools import setup
with open('README.rst', 'r') as f:
long_desc = f.read().decode('utf-8')
setup(name='dmgbuild',
version='1.0.0',
description='Mac OS X command line utility to build disk images',
long_description=long_desc,
author='Alastair Houghton',
... | <commit_before># -*- coding: utf-8 -*-
from setuptools import setup
with open('README.rst', 'r') as f:
long_desc = f.read().decode('utf-8')
setup(name='dmgbuild',
version='1.0.0',
description='Mac OS X command line utility to build disk images',
long_description=long_desc,
author='Alastair... | # -*- coding: utf-8 -*-
from setuptools import setup
with open('README.rst', 'r') as f:
long_desc = f.read().decode('utf-8')
setup(name='dmgbuild',
version='1.0.0',
description='Mac OS X command line utility to build disk images',
long_description=long_desc,
author='Alastair Houghton',
... | # -*- coding: utf-8 -*-
from setuptools import setup
with open('README.rst', 'r') as f:
long_desc = f.read().decode('utf-8')
setup(name='dmgbuild',
version='1.0.0',
description='Mac OS X command line utility to build disk images',
long_description=long_desc,
author='Alastair Houghton',
... | <commit_before># -*- coding: utf-8 -*-
from setuptools import setup
with open('README.rst', 'r') as f:
long_desc = f.read().decode('utf-8')
setup(name='dmgbuild',
version='1.0.0',
description='Mac OS X command line utility to build disk images',
long_description=long_desc,
author='Alastair... |
5ed223883a39c58af7db10d92829894407fba822 | setup.py | setup.py | #!/usr/bin/env python
from setuptools import setup
#from distutils.core import setup
setup(name='imagesize',
version='0.7.1',
description='Getting image size from png/jpeg/jpeg2000/gif file',
long_description='''
It parses image files' header and return image size.
* PNG
* JPEG
* JPEG2000
* GIF
Th... | #!/usr/bin/env python
from setuptools import setup
#from distutils.core import setup
setup(name='imagesize',
version='0.7.1',
description='Getting image size from png/jpeg/jpeg2000/gif file',
long_description='''
It parses image files' header and return image size.
* PNG
* JPEG
* JPEG2000
* GIF
Th... | Document project is stable and ready for use in production | Document project is stable and ready for use in production
| Python | mit | shibukawa/imagesize_py | #!/usr/bin/env python
from setuptools import setup
#from distutils.core import setup
setup(name='imagesize',
version='0.7.1',
description='Getting image size from png/jpeg/jpeg2000/gif file',
long_description='''
It parses image files' header and return image size.
* PNG
* JPEG
* JPEG2000
* GIF
Th... | #!/usr/bin/env python
from setuptools import setup
#from distutils.core import setup
setup(name='imagesize',
version='0.7.1',
description='Getting image size from png/jpeg/jpeg2000/gif file',
long_description='''
It parses image files' header and return image size.
* PNG
* JPEG
* JPEG2000
* GIF
Th... | <commit_before>#!/usr/bin/env python
from setuptools import setup
#from distutils.core import setup
setup(name='imagesize',
version='0.7.1',
description='Getting image size from png/jpeg/jpeg2000/gif file',
long_description='''
It parses image files' header and return image size.
* PNG
* JPEG
* JPE... | #!/usr/bin/env python
from setuptools import setup
#from distutils.core import setup
setup(name='imagesize',
version='0.7.1',
description='Getting image size from png/jpeg/jpeg2000/gif file',
long_description='''
It parses image files' header and return image size.
* PNG
* JPEG
* JPEG2000
* GIF
Th... | #!/usr/bin/env python
from setuptools import setup
#from distutils.core import setup
setup(name='imagesize',
version='0.7.1',
description='Getting image size from png/jpeg/jpeg2000/gif file',
long_description='''
It parses image files' header and return image size.
* PNG
* JPEG
* JPEG2000
* GIF
Th... | <commit_before>#!/usr/bin/env python
from setuptools import setup
#from distutils.core import setup
setup(name='imagesize',
version='0.7.1',
description='Getting image size from png/jpeg/jpeg2000/gif file',
long_description='''
It parses image files' header and return image size.
* PNG
* JPEG
* JPE... |
436fa5dd4ee955b35ef9d68a0f6b293f957e2ce0 | setup.py | setup.py | from distutils.core import setup
setup(
name = 'jsuite',
packages = ['jsuite'], # this must be the same as the name above
version = '0.3.0',
scripts=['bin/jsuite'],
install_requires = [
'lxml==3.6.4',
'clint==0.5.1'
],
description = 'Parsing and manipulation tools for JATS XML files.',
author... | from distutils.core import setup
setup(
name = 'jsuite',
packages = ['jsuite'], # this must be the same as the name above
version = '0.4.0',
scripts=['bin/jsuite'],
install_requires = [
'lxml==3.6.4',
'clint==0.5.1'
],
description = 'Parsing and manipulation tools for JATS XML files.',
author... | Add count function across entire document | v0.4.0: Add count function across entire document
| Python | mit | schatten/jsuite,TypesetIO/jsuite | from distutils.core import setup
setup(
name = 'jsuite',
packages = ['jsuite'], # this must be the same as the name above
version = '0.3.0',
scripts=['bin/jsuite'],
install_requires = [
'lxml==3.6.4',
'clint==0.5.1'
],
description = 'Parsing and manipulation tools for JATS XML files.',
author... | from distutils.core import setup
setup(
name = 'jsuite',
packages = ['jsuite'], # this must be the same as the name above
version = '0.4.0',
scripts=['bin/jsuite'],
install_requires = [
'lxml==3.6.4',
'clint==0.5.1'
],
description = 'Parsing and manipulation tools for JATS XML files.',
author... | <commit_before>from distutils.core import setup
setup(
name = 'jsuite',
packages = ['jsuite'], # this must be the same as the name above
version = '0.3.0',
scripts=['bin/jsuite'],
install_requires = [
'lxml==3.6.4',
'clint==0.5.1'
],
description = 'Parsing and manipulation tools for JATS XML fi... | from distutils.core import setup
setup(
name = 'jsuite',
packages = ['jsuite'], # this must be the same as the name above
version = '0.4.0',
scripts=['bin/jsuite'],
install_requires = [
'lxml==3.6.4',
'clint==0.5.1'
],
description = 'Parsing and manipulation tools for JATS XML files.',
author... | from distutils.core import setup
setup(
name = 'jsuite',
packages = ['jsuite'], # this must be the same as the name above
version = '0.3.0',
scripts=['bin/jsuite'],
install_requires = [
'lxml==3.6.4',
'clint==0.5.1'
],
description = 'Parsing and manipulation tools for JATS XML files.',
author... | <commit_before>from distutils.core import setup
setup(
name = 'jsuite',
packages = ['jsuite'], # this must be the same as the name above
version = '0.3.0',
scripts=['bin/jsuite'],
install_requires = [
'lxml==3.6.4',
'clint==0.5.1'
],
description = 'Parsing and manipulation tools for JATS XML fi... |
ad6c51fdbc0fbfa2993902b89a7dac04b62a244f | setup.py | setup.py | from setuptools import setup
import transip
setup(
name = transip.__name__,
version = transip.__version__,
author = transip.__author__,
author_email = transip.__email__,
license = transip.__license__,
description = transip.__doc__.splitlines()[0],
long_description = open('README.rst').read... | from setuptools import setup
import transip
setup(
name = transip.__name__,
version = transip.__version__,
author = transip.__author__,
author_email = transip.__email__,
license = transip.__license__,
description = transip.__doc__.splitlines()[0],
long_description = open('README.rst').read... | Add package transip.service or else this is not installed | Add package transip.service or else this is not installed
| Python | mit | benkonrath/transip-api,benkonrath/transip-api | from setuptools import setup
import transip
setup(
name = transip.__name__,
version = transip.__version__,
author = transip.__author__,
author_email = transip.__email__,
license = transip.__license__,
description = transip.__doc__.splitlines()[0],
long_description = open('README.rst').read... | from setuptools import setup
import transip
setup(
name = transip.__name__,
version = transip.__version__,
author = transip.__author__,
author_email = transip.__email__,
license = transip.__license__,
description = transip.__doc__.splitlines()[0],
long_description = open('README.rst').read... | <commit_before>from setuptools import setup
import transip
setup(
name = transip.__name__,
version = transip.__version__,
author = transip.__author__,
author_email = transip.__email__,
license = transip.__license__,
description = transip.__doc__.splitlines()[0],
long_description = open('RE... | from setuptools import setup
import transip
setup(
name = transip.__name__,
version = transip.__version__,
author = transip.__author__,
author_email = transip.__email__,
license = transip.__license__,
description = transip.__doc__.splitlines()[0],
long_description = open('README.rst').read... | from setuptools import setup
import transip
setup(
name = transip.__name__,
version = transip.__version__,
author = transip.__author__,
author_email = transip.__email__,
license = transip.__license__,
description = transip.__doc__.splitlines()[0],
long_description = open('README.rst').read... | <commit_before>from setuptools import setup
import transip
setup(
name = transip.__name__,
version = transip.__version__,
author = transip.__author__,
author_email = transip.__email__,
license = transip.__license__,
description = transip.__doc__.splitlines()[0],
long_description = open('RE... |
9ddc63eb0e1e3612ac4a1ea5b95e405ca0915b52 | setup.py | setup.py | #!/usr/bin/env python
from distutils.core import setup
setup(name="sysops-api",
version="1.0",
description="LinkedIn Redis / Cfengine API",
author = "Mike Svoboda",
author_email = "msvoboda@linkedin.com",
py_modules=['CacheExtractor', 'RedisFinder'],
data_files=[('/usr/local/bin', [... | #!/usr/bin/env python
from distutils.core import setup
setup(name="sysops-api",
version="1.0",
description="LinkedIn Redis / Cfengine API",
author="Mike Svoboda",
author_email="msvoboda@linkedin.com",
py_modules=['CacheExtractor', 'RedisFinder'],
scripts=['scripts/extract_sysops_cac... | Install scripts properly rather than as datafiles | Install scripts properly rather than as datafiles
- also fix whitespace
| Python | apache-2.0 | linkedin/sysops-api,linkedin/sysops-api,slietz/sysops-api,slietz/sysops-api | #!/usr/bin/env python
from distutils.core import setup
setup(name="sysops-api",
version="1.0",
description="LinkedIn Redis / Cfengine API",
author = "Mike Svoboda",
author_email = "msvoboda@linkedin.com",
py_modules=['CacheExtractor', 'RedisFinder'],
data_files=[('/usr/local/bin', [... | #!/usr/bin/env python
from distutils.core import setup
setup(name="sysops-api",
version="1.0",
description="LinkedIn Redis / Cfengine API",
author="Mike Svoboda",
author_email="msvoboda@linkedin.com",
py_modules=['CacheExtractor', 'RedisFinder'],
scripts=['scripts/extract_sysops_cac... | <commit_before>#!/usr/bin/env python
from distutils.core import setup
setup(name="sysops-api",
version="1.0",
description="LinkedIn Redis / Cfengine API",
author = "Mike Svoboda",
author_email = "msvoboda@linkedin.com",
py_modules=['CacheExtractor', 'RedisFinder'],
data_files=[('/us... | #!/usr/bin/env python
from distutils.core import setup
setup(name="sysops-api",
version="1.0",
description="LinkedIn Redis / Cfengine API",
author="Mike Svoboda",
author_email="msvoboda@linkedin.com",
py_modules=['CacheExtractor', 'RedisFinder'],
scripts=['scripts/extract_sysops_cac... | #!/usr/bin/env python
from distutils.core import setup
setup(name="sysops-api",
version="1.0",
description="LinkedIn Redis / Cfengine API",
author = "Mike Svoboda",
author_email = "msvoboda@linkedin.com",
py_modules=['CacheExtractor', 'RedisFinder'],
data_files=[('/usr/local/bin', [... | <commit_before>#!/usr/bin/env python
from distutils.core import setup
setup(name="sysops-api",
version="1.0",
description="LinkedIn Redis / Cfengine API",
author = "Mike Svoboda",
author_email = "msvoboda@linkedin.com",
py_modules=['CacheExtractor', 'RedisFinder'],
data_files=[('/us... |
a88452582e8d5ac01f9ccbdd3bf1736bf2209af2 | setup.py | setup.py | import sys
import os
from setuptools import setup
long_description = open('README.rst').read()
classifiers = [
'Development Status :: 4 - Beta',
'License :: OSI Approved :: BSD License',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.5',
]
setup_kwargs = dict(
name='... | import sys
import os
from setuptools import setup
long_description = open('README.rst').read()
classifiers = [
'Development Status :: 4 - Beta',
'License :: OSI Approved :: BSD License',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.5',
'Programming Language :: Pytho... | Update to depend on separate powershift-cli package. | Update to depend on separate powershift-cli package.
| Python | bsd-2-clause | getwarped/powershift-cluster,getwarped/powershift-cluster | import sys
import os
from setuptools import setup
long_description = open('README.rst').read()
classifiers = [
'Development Status :: 4 - Beta',
'License :: OSI Approved :: BSD License',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.5',
]
setup_kwargs = dict(
name='... | import sys
import os
from setuptools import setup
long_description = open('README.rst').read()
classifiers = [
'Development Status :: 4 - Beta',
'License :: OSI Approved :: BSD License',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.5',
'Programming Language :: Pytho... | <commit_before>import sys
import os
from setuptools import setup
long_description = open('README.rst').read()
classifiers = [
'Development Status :: 4 - Beta',
'License :: OSI Approved :: BSD License',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.5',
]
setup_kwargs = d... | import sys
import os
from setuptools import setup
long_description = open('README.rst').read()
classifiers = [
'Development Status :: 4 - Beta',
'License :: OSI Approved :: BSD License',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.5',
'Programming Language :: Pytho... | import sys
import os
from setuptools import setup
long_description = open('README.rst').read()
classifiers = [
'Development Status :: 4 - Beta',
'License :: OSI Approved :: BSD License',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.5',
]
setup_kwargs = dict(
name='... | <commit_before>import sys
import os
from setuptools import setup
long_description = open('README.rst').read()
classifiers = [
'Development Status :: 4 - Beta',
'License :: OSI Approved :: BSD License',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.5',
]
setup_kwargs = d... |
381c2a53b9aa11acb140d7807fc218c003e14f5b | setup.py | setup.py | from __future__ import unicode_literals
import re
from setuptools import setup
def get_version(filename):
content = open(filename).read()
metadata = dict(re.findall("__([a-z]+)__ = '([^']+)'", content))
return metadata['version']
setup(
name='Mopidy-Scrobbler',
version=get_version('mopidy_scrob... | from __future__ import unicode_literals
import re
from setuptools import setup
def get_version(filename):
content = open(filename).read()
metadata = dict(re.findall("__([a-z]+)__ = '([^']+)'", content))
return metadata['version']
setup(
name='Mopidy-Scrobbler',
version=get_version('mopidy_scrob... | Add dependency on pylast, update project URL | Add dependency on pylast, update project URL
| Python | apache-2.0 | mopidy/mopidy-scrobbler,mthssdrbrg/mopidy-scrobbler | from __future__ import unicode_literals
import re
from setuptools import setup
def get_version(filename):
content = open(filename).read()
metadata = dict(re.findall("__([a-z]+)__ = '([^']+)'", content))
return metadata['version']
setup(
name='Mopidy-Scrobbler',
version=get_version('mopidy_scrob... | from __future__ import unicode_literals
import re
from setuptools import setup
def get_version(filename):
content = open(filename).read()
metadata = dict(re.findall("__([a-z]+)__ = '([^']+)'", content))
return metadata['version']
setup(
name='Mopidy-Scrobbler',
version=get_version('mopidy_scrob... | <commit_before>from __future__ import unicode_literals
import re
from setuptools import setup
def get_version(filename):
content = open(filename).read()
metadata = dict(re.findall("__([a-z]+)__ = '([^']+)'", content))
return metadata['version']
setup(
name='Mopidy-Scrobbler',
version=get_versio... | from __future__ import unicode_literals
import re
from setuptools import setup
def get_version(filename):
content = open(filename).read()
metadata = dict(re.findall("__([a-z]+)__ = '([^']+)'", content))
return metadata['version']
setup(
name='Mopidy-Scrobbler',
version=get_version('mopidy_scrob... | from __future__ import unicode_literals
import re
from setuptools import setup
def get_version(filename):
content = open(filename).read()
metadata = dict(re.findall("__([a-z]+)__ = '([^']+)'", content))
return metadata['version']
setup(
name='Mopidy-Scrobbler',
version=get_version('mopidy_scrob... | <commit_before>from __future__ import unicode_literals
import re
from setuptools import setup
def get_version(filename):
content = open(filename).read()
metadata = dict(re.findall("__([a-z]+)__ = '([^']+)'", content))
return metadata['version']
setup(
name='Mopidy-Scrobbler',
version=get_versio... |
7ae590a0ba1b8fba8eb6643c9a44fe848fe9c5ee | setup.py | setup.py | from setuptools import setup, find_packages
install_requires = [
'prompt_toolkit',
'pathlib',
'python-keystoneclient'
]
test_requires = [
'mock'
]
setup(
name='contrail-api-cli',
version='0.1a2',
description="Simple CLI program to browse Contrail API server",
long_description=open('RE... | import sys
from setuptools import setup, find_packages
install_requires = [
'prompt_toolkit',
'python-keystoneclient'
]
test_requires = []
if sys.version_info[0] == 2:
install_requires.append('pathlib')
test_requires.append('mock')
setup(
name='contrail-api-cli',
version='0.1a2',
descri... | Install requirements depending on python version | Install requirements depending on python version
| Python | mit | eonpatapon/contrail-api-cli | from setuptools import setup, find_packages
install_requires = [
'prompt_toolkit',
'pathlib',
'python-keystoneclient'
]
test_requires = [
'mock'
]
setup(
name='contrail-api-cli',
version='0.1a2',
description="Simple CLI program to browse Contrail API server",
long_description=open('RE... | import sys
from setuptools import setup, find_packages
install_requires = [
'prompt_toolkit',
'python-keystoneclient'
]
test_requires = []
if sys.version_info[0] == 2:
install_requires.append('pathlib')
test_requires.append('mock')
setup(
name='contrail-api-cli',
version='0.1a2',
descri... | <commit_before>from setuptools import setup, find_packages
install_requires = [
'prompt_toolkit',
'pathlib',
'python-keystoneclient'
]
test_requires = [
'mock'
]
setup(
name='contrail-api-cli',
version='0.1a2',
description="Simple CLI program to browse Contrail API server",
long_descr... | import sys
from setuptools import setup, find_packages
install_requires = [
'prompt_toolkit',
'python-keystoneclient'
]
test_requires = []
if sys.version_info[0] == 2:
install_requires.append('pathlib')
test_requires.append('mock')
setup(
name='contrail-api-cli',
version='0.1a2',
descri... | from setuptools import setup, find_packages
install_requires = [
'prompt_toolkit',
'pathlib',
'python-keystoneclient'
]
test_requires = [
'mock'
]
setup(
name='contrail-api-cli',
version='0.1a2',
description="Simple CLI program to browse Contrail API server",
long_description=open('RE... | <commit_before>from setuptools import setup, find_packages
install_requires = [
'prompt_toolkit',
'pathlib',
'python-keystoneclient'
]
test_requires = [
'mock'
]
setup(
name='contrail-api-cli',
version='0.1a2',
description="Simple CLI program to browse Contrail API server",
long_descr... |
6dc434de2b23f4a8e93e5969d52eb6f641b9665f | setup.py | setup.py | #!/usr/bin/env python
import sys
import os
if "publish" in sys.argv[-1]:
os.system("python setup.py sdist upload")
sys.exit()
try:
from setuptools import setup
setup
except ImportError:
from distutils.core import setup
setup
# Command-line tools
entry_points = {'console_scripts': [
'K2on... | #!/usr/bin/env python
import sys
import os
if "publish" in sys.argv[-1]:
os.system("python setup.py sdist upload")
sys.exit()
try:
from setuptools import setup
setup
except ImportError:
from distutils.core import setup
setup
# Command-line tools
entry_points = {'console_scripts': [
'K2on... | Bump version to v3.0.0 - ready for release | Bump version to v3.0.0 - ready for release
| Python | mit | mrtommyb/K2fov,KeplerGO/K2fov | #!/usr/bin/env python
import sys
import os
if "publish" in sys.argv[-1]:
os.system("python setup.py sdist upload")
sys.exit()
try:
from setuptools import setup
setup
except ImportError:
from distutils.core import setup
setup
# Command-line tools
entry_points = {'console_scripts': [
'K2on... | #!/usr/bin/env python
import sys
import os
if "publish" in sys.argv[-1]:
os.system("python setup.py sdist upload")
sys.exit()
try:
from setuptools import setup
setup
except ImportError:
from distutils.core import setup
setup
# Command-line tools
entry_points = {'console_scripts': [
'K2on... | <commit_before>#!/usr/bin/env python
import sys
import os
if "publish" in sys.argv[-1]:
os.system("python setup.py sdist upload")
sys.exit()
try:
from setuptools import setup
setup
except ImportError:
from distutils.core import setup
setup
# Command-line tools
entry_points = {'console_script... | #!/usr/bin/env python
import sys
import os
if "publish" in sys.argv[-1]:
os.system("python setup.py sdist upload")
sys.exit()
try:
from setuptools import setup
setup
except ImportError:
from distutils.core import setup
setup
# Command-line tools
entry_points = {'console_scripts': [
'K2on... | #!/usr/bin/env python
import sys
import os
if "publish" in sys.argv[-1]:
os.system("python setup.py sdist upload")
sys.exit()
try:
from setuptools import setup
setup
except ImportError:
from distutils.core import setup
setup
# Command-line tools
entry_points = {'console_scripts': [
'K2on... | <commit_before>#!/usr/bin/env python
import sys
import os
if "publish" in sys.argv[-1]:
os.system("python setup.py sdist upload")
sys.exit()
try:
from setuptools import setup
setup
except ImportError:
from distutils.core import setup
setup
# Command-line tools
entry_points = {'console_script... |
1fe9117c57a947eb22a1f269220d21553a131f02 | setup.py | setup.py | #!/usr/bin/env python
from setuptools import setup, find_packages
setup(
name='django-yadt',
url='https://chris-lamb.co.uk/projects/django-yadt',
version='2.0.5',
description="Yet Another Django Thumbnailer",
author="Chris Lamb",
author_email='chris@chris-lamb.co.uk',
license='BSD',
... | #!/usr/bin/env python
from setuptools import setup, find_packages
setup(
name='django-yadt',
url='https://chris-lamb.co.uk/projects/django-yadt',
version='2.0.5',
description="Yet Another Django Thumbnailer",
author="Chris Lamb",
author_email='chris@chris-lamb.co.uk',
license='BSD',
... | Update Django requirement to latest LTS | Update Django requirement to latest LTS
| Python | bsd-3-clause | lamby/django-yadt | #!/usr/bin/env python
from setuptools import setup, find_packages
setup(
name='django-yadt',
url='https://chris-lamb.co.uk/projects/django-yadt',
version='2.0.5',
description="Yet Another Django Thumbnailer",
author="Chris Lamb",
author_email='chris@chris-lamb.co.uk',
license='BSD',
... | #!/usr/bin/env python
from setuptools import setup, find_packages
setup(
name='django-yadt',
url='https://chris-lamb.co.uk/projects/django-yadt',
version='2.0.5',
description="Yet Another Django Thumbnailer",
author="Chris Lamb",
author_email='chris@chris-lamb.co.uk',
license='BSD',
... | <commit_before>#!/usr/bin/env python
from setuptools import setup, find_packages
setup(
name='django-yadt',
url='https://chris-lamb.co.uk/projects/django-yadt',
version='2.0.5',
description="Yet Another Django Thumbnailer",
author="Chris Lamb",
author_email='chris@chris-lamb.co.uk',
lice... | #!/usr/bin/env python
from setuptools import setup, find_packages
setup(
name='django-yadt',
url='https://chris-lamb.co.uk/projects/django-yadt',
version='2.0.5',
description="Yet Another Django Thumbnailer",
author="Chris Lamb",
author_email='chris@chris-lamb.co.uk',
license='BSD',
... | #!/usr/bin/env python
from setuptools import setup, find_packages
setup(
name='django-yadt',
url='https://chris-lamb.co.uk/projects/django-yadt',
version='2.0.5',
description="Yet Another Django Thumbnailer",
author="Chris Lamb",
author_email='chris@chris-lamb.co.uk',
license='BSD',
... | <commit_before>#!/usr/bin/env python
from setuptools import setup, find_packages
setup(
name='django-yadt',
url='https://chris-lamb.co.uk/projects/django-yadt',
version='2.0.5',
description="Yet Another Django Thumbnailer",
author="Chris Lamb",
author_email='chris@chris-lamb.co.uk',
lice... |
b2e378a747f4cd1172c9c8bffecda327c3dd25cc | setup.py | setup.py | import os
from setuptools import setup, find_packages
# Utility function to read the README file.
# Used for the long_description. It's nice, because now 1) we have a top level
# README file and 2) it's easier to type in the README file than to put a raw
# string in below ...
def read(fname):
return open(os.path.... | import os
from setuptools import setup, find_packages
# Utility function to read the README file.
# Used for the long_description. It's nice, because now 1) we have a top level
# README file and 2) it's easier to type in the README file than to put a raw
# string in below ...
def read(fname):
return open(os.path.... | Install url from the right place. | Install url from the right place.
| Python | bsd-3-clause | sunlightlabs/nanospider | import os
from setuptools import setup, find_packages
# Utility function to read the README file.
# Used for the long_description. It's nice, because now 1) we have a top level
# README file and 2) it's easier to type in the README file than to put a raw
# string in below ...
def read(fname):
return open(os.path.... | import os
from setuptools import setup, find_packages
# Utility function to read the README file.
# Used for the long_description. It's nice, because now 1) we have a top level
# README file and 2) it's easier to type in the README file than to put a raw
# string in below ...
def read(fname):
return open(os.path.... | <commit_before>import os
from setuptools import setup, find_packages
# Utility function to read the README file.
# Used for the long_description. It's nice, because now 1) we have a top level
# README file and 2) it's easier to type in the README file than to put a raw
# string in below ...
def read(fname):
retur... | import os
from setuptools import setup, find_packages
# Utility function to read the README file.
# Used for the long_description. It's nice, because now 1) we have a top level
# README file and 2) it's easier to type in the README file than to put a raw
# string in below ...
def read(fname):
return open(os.path.... | import os
from setuptools import setup, find_packages
# Utility function to read the README file.
# Used for the long_description. It's nice, because now 1) we have a top level
# README file and 2) it's easier to type in the README file than to put a raw
# string in below ...
def read(fname):
return open(os.path.... | <commit_before>import os
from setuptools import setup, find_packages
# Utility function to read the README file.
# Used for the long_description. It's nice, because now 1) we have a top level
# README file and 2) it's easier to type in the README file than to put a raw
# string in below ...
def read(fname):
retur... |
9cb406e18cedf8995c31a1760968a1ee86423c5f | setup.py | setup.py | #!/usr/bin/env python3
from setuptools import setup, find_packages
# We want to restrict newer versions while we deal with upstream breaking changes.
discordpy_version = '==0.10.0'
# TODO read README(.rst? .md looks bad on pypi) for long_description.
# Could use pandoc, but the end user shouldn't need to do thi... | #!/usr/bin/env python3
from setuptools import setup, find_packages
# We want to restrict newer versions while we deal with upstream breaking changes.
discordpy_version = '==0.10.0'
# TODO read README(.rst? .md looks bad on pypi) for long_description.
# Could use pandoc, but the end user shouldn't need to do thi... | Tweak the package name, add a note | Tweak the package name, add a note
| Python | mit | TAOTheCrab/CrabBot | #!/usr/bin/env python3
from setuptools import setup, find_packages
# We want to restrict newer versions while we deal with upstream breaking changes.
discordpy_version = '==0.10.0'
# TODO read README(.rst? .md looks bad on pypi) for long_description.
# Could use pandoc, but the end user shouldn't need to do thi... | #!/usr/bin/env python3
from setuptools import setup, find_packages
# We want to restrict newer versions while we deal with upstream breaking changes.
discordpy_version = '==0.10.0'
# TODO read README(.rst? .md looks bad on pypi) for long_description.
# Could use pandoc, but the end user shouldn't need to do thi... | <commit_before>#!/usr/bin/env python3
from setuptools import setup, find_packages
# We want to restrict newer versions while we deal with upstream breaking changes.
discordpy_version = '==0.10.0'
# TODO read README(.rst? .md looks bad on pypi) for long_description.
# Could use pandoc, but the end user shouldn't... | #!/usr/bin/env python3
from setuptools import setup, find_packages
# We want to restrict newer versions while we deal with upstream breaking changes.
discordpy_version = '==0.10.0'
# TODO read README(.rst? .md looks bad on pypi) for long_description.
# Could use pandoc, but the end user shouldn't need to do thi... | #!/usr/bin/env python3
from setuptools import setup, find_packages
# We want to restrict newer versions while we deal with upstream breaking changes.
discordpy_version = '==0.10.0'
# TODO read README(.rst? .md looks bad on pypi) for long_description.
# Could use pandoc, but the end user shouldn't need to do thi... | <commit_before>#!/usr/bin/env python3
from setuptools import setup, find_packages
# We want to restrict newer versions while we deal with upstream breaking changes.
discordpy_version = '==0.10.0'
# TODO read README(.rst? .md looks bad on pypi) for long_description.
# Could use pandoc, but the end user shouldn't... |
5844d7203a2f17752bbeca57dd404b83cc8ad475 | setup.py | setup.py | from setuptools import setup
with open('README.md') as readme_file:
long_description = readme_file.read()
setup(
name="ipuz",
version="0.1.1",
license="MIT",
description="Python library for reading and writing ipuz puzzle files",
long_description=long_description,
author="Simeon Visser",... | from setuptools import setup
with open('README.md') as readme_file:
long_description = readme_file.read()
setup(
name="ipuz",
version="0.1.1",
license="MIT",
description="Python library for reading and writing ipuz puzzle files",
long_description=long_description,
author="Simeon Visser",... | Allow more flexibility in what six version is used | Allow more flexibility in what six version is used
| Python | mit | svisser/ipuz | from setuptools import setup
with open('README.md') as readme_file:
long_description = readme_file.read()
setup(
name="ipuz",
version="0.1.1",
license="MIT",
description="Python library for reading and writing ipuz puzzle files",
long_description=long_description,
author="Simeon Visser",... | from setuptools import setup
with open('README.md') as readme_file:
long_description = readme_file.read()
setup(
name="ipuz",
version="0.1.1",
license="MIT",
description="Python library for reading and writing ipuz puzzle files",
long_description=long_description,
author="Simeon Visser",... | <commit_before>from setuptools import setup
with open('README.md') as readme_file:
long_description = readme_file.read()
setup(
name="ipuz",
version="0.1.1",
license="MIT",
description="Python library for reading and writing ipuz puzzle files",
long_description=long_description,
author="... | from setuptools import setup
with open('README.md') as readme_file:
long_description = readme_file.read()
setup(
name="ipuz",
version="0.1.1",
license="MIT",
description="Python library for reading and writing ipuz puzzle files",
long_description=long_description,
author="Simeon Visser",... | from setuptools import setup
with open('README.md') as readme_file:
long_description = readme_file.read()
setup(
name="ipuz",
version="0.1.1",
license="MIT",
description="Python library for reading and writing ipuz puzzle files",
long_description=long_description,
author="Simeon Visser",... | <commit_before>from setuptools import setup
with open('README.md') as readme_file:
long_description = readme_file.read()
setup(
name="ipuz",
version="0.1.1",
license="MIT",
description="Python library for reading and writing ipuz puzzle files",
long_description=long_description,
author="... |
e693352b2c9787748cb1dcf2bfd6e134292bfa6a | setup.py | setup.py | import sys, os
from setuptools import setup, Extension, find_packages
import numpy
kws = {}
if not int(os.getenv( 'DISABLE_INSTALL_REQUIRES','0' )):
kws['install_requires'] = [
'numpy>=1.0.4',
]
setup(name="motmot.imops",
description="image format conversion (e.g. between MONO8, YUV422, and... | import sys, os
from setuptools import setup, Extension, find_packages
import numpy
# Note when building sdist package:
# Make sure to generate src/imops.c with "pyrexc src/imops.pyx".
kws = {}
if not int(os.getenv( 'DISABLE_INSTALL_REQUIRES','0' )):
kws['install_requires'] = [
'numpy>=1.0.4',
]
... | Add note about building sdist | Add note about building sdist
| Python | bsd-3-clause | motmot/imops,motmot/imops | import sys, os
from setuptools import setup, Extension, find_packages
import numpy
kws = {}
if not int(os.getenv( 'DISABLE_INSTALL_REQUIRES','0' )):
kws['install_requires'] = [
'numpy>=1.0.4',
]
setup(name="motmot.imops",
description="image format conversion (e.g. between MONO8, YUV422, and... | import sys, os
from setuptools import setup, Extension, find_packages
import numpy
# Note when building sdist package:
# Make sure to generate src/imops.c with "pyrexc src/imops.pyx".
kws = {}
if not int(os.getenv( 'DISABLE_INSTALL_REQUIRES','0' )):
kws['install_requires'] = [
'numpy>=1.0.4',
]
... | <commit_before>import sys, os
from setuptools import setup, Extension, find_packages
import numpy
kws = {}
if not int(os.getenv( 'DISABLE_INSTALL_REQUIRES','0' )):
kws['install_requires'] = [
'numpy>=1.0.4',
]
setup(name="motmot.imops",
description="image format conversion (e.g. between MON... | import sys, os
from setuptools import setup, Extension, find_packages
import numpy
# Note when building sdist package:
# Make sure to generate src/imops.c with "pyrexc src/imops.pyx".
kws = {}
if not int(os.getenv( 'DISABLE_INSTALL_REQUIRES','0' )):
kws['install_requires'] = [
'numpy>=1.0.4',
]
... | import sys, os
from setuptools import setup, Extension, find_packages
import numpy
kws = {}
if not int(os.getenv( 'DISABLE_INSTALL_REQUIRES','0' )):
kws['install_requires'] = [
'numpy>=1.0.4',
]
setup(name="motmot.imops",
description="image format conversion (e.g. between MONO8, YUV422, and... | <commit_before>import sys, os
from setuptools import setup, Extension, find_packages
import numpy
kws = {}
if not int(os.getenv( 'DISABLE_INSTALL_REQUIRES','0' )):
kws['install_requires'] = [
'numpy>=1.0.4',
]
setup(name="motmot.imops",
description="image format conversion (e.g. between MON... |
da58b6ec7b9b74867e7755667988d60218c9699a | setup.py | setup.py | from setuptools import setup
setup(name='mordecai',
version='2.0.0a1',
description='Full text geoparsing and event geocoding',
url='http://github.com/openeventdata/mordecai/',
author='Andy Halterman',
author_email='ahalterman0@gmail.com',
license='MIT',
packages=['mordecai'],
... | from setuptools import setup
setup(name='mordecai',
version='2.0.0a2',
description='Full text geoparsing and event geocoding',
url='http://github.com/openeventdata/mordecai/',
author='Andy Halterman',
author_email='ahalterman0@gmail.com',
license='MIT',
packages=['mordecai'],
... | Update README and fix typos | Update README and fix typos
| Python | mit | openeventdata/mordecai | from setuptools import setup
setup(name='mordecai',
version='2.0.0a1',
description='Full text geoparsing and event geocoding',
url='http://github.com/openeventdata/mordecai/',
author='Andy Halterman',
author_email='ahalterman0@gmail.com',
license='MIT',
packages=['mordecai'],
... | from setuptools import setup
setup(name='mordecai',
version='2.0.0a2',
description='Full text geoparsing and event geocoding',
url='http://github.com/openeventdata/mordecai/',
author='Andy Halterman',
author_email='ahalterman0@gmail.com',
license='MIT',
packages=['mordecai'],
... | <commit_before>from setuptools import setup
setup(name='mordecai',
version='2.0.0a1',
description='Full text geoparsing and event geocoding',
url='http://github.com/openeventdata/mordecai/',
author='Andy Halterman',
author_email='ahalterman0@gmail.com',
license='MIT',
packages... | from setuptools import setup
setup(name='mordecai',
version='2.0.0a2',
description='Full text geoparsing and event geocoding',
url='http://github.com/openeventdata/mordecai/',
author='Andy Halterman',
author_email='ahalterman0@gmail.com',
license='MIT',
packages=['mordecai'],
... | from setuptools import setup
setup(name='mordecai',
version='2.0.0a1',
description='Full text geoparsing and event geocoding',
url='http://github.com/openeventdata/mordecai/',
author='Andy Halterman',
author_email='ahalterman0@gmail.com',
license='MIT',
packages=['mordecai'],
... | <commit_before>from setuptools import setup
setup(name='mordecai',
version='2.0.0a1',
description='Full text geoparsing and event geocoding',
url='http://github.com/openeventdata/mordecai/',
author='Andy Halterman',
author_email='ahalterman0@gmail.com',
license='MIT',
packages... |
f61b8cfcbf98da826a847981834763198db42867 | setup.py | setup.py | from setuptools import setup, find_packages
setup(
name='ckanext-archiver',
version='0.1',
packages=find_packages(),
install_requires=[
'celery==2.4.5',
'kombu==1.5.1',
'kombu-sqlalchemy==1.1.0',
'SQLAlchemy>=0.6.6',
'requests==0.6.4',
'messytables>=0.1.4... | from setuptools import setup, find_packages
setup(
name='ckanext-archiver',
version='0.1',
packages=find_packages(),
install_requires=[
'celery==2.4.2',
'kombu==2.1.3',
'kombu-sqlalchemy==1.1.0',
'SQLAlchemy>=0.6.6',
'requests==0.6.4',
'messytables>=0.1.4... | Change celery and kombu requirements to match ckanext-datastorer | Change celery and kombu requirements to match ckanext-datastorer
| Python | mit | datagovuk/ckanext-archiver,DanePubliczneGovPl/ckanext-archiver,ckan/ckanext-archiver,DanePubliczneGovPl/ckanext-archiver,DanePubliczneGovPl/ckanext-archiver,datagovuk/ckanext-archiver,ckan/ckanext-archiver,datagovuk/ckanext-archiver,ckan/ckanext-archiver | from setuptools import setup, find_packages
setup(
name='ckanext-archiver',
version='0.1',
packages=find_packages(),
install_requires=[
'celery==2.4.5',
'kombu==1.5.1',
'kombu-sqlalchemy==1.1.0',
'SQLAlchemy>=0.6.6',
'requests==0.6.4',
'messytables>=0.1.4... | from setuptools import setup, find_packages
setup(
name='ckanext-archiver',
version='0.1',
packages=find_packages(),
install_requires=[
'celery==2.4.2',
'kombu==2.1.3',
'kombu-sqlalchemy==1.1.0',
'SQLAlchemy>=0.6.6',
'requests==0.6.4',
'messytables>=0.1.4... | <commit_before>from setuptools import setup, find_packages
setup(
name='ckanext-archiver',
version='0.1',
packages=find_packages(),
install_requires=[
'celery==2.4.5',
'kombu==1.5.1',
'kombu-sqlalchemy==1.1.0',
'SQLAlchemy>=0.6.6',
'requests==0.6.4',
'mes... | from setuptools import setup, find_packages
setup(
name='ckanext-archiver',
version='0.1',
packages=find_packages(),
install_requires=[
'celery==2.4.2',
'kombu==2.1.3',
'kombu-sqlalchemy==1.1.0',
'SQLAlchemy>=0.6.6',
'requests==0.6.4',
'messytables>=0.1.4... | from setuptools import setup, find_packages
setup(
name='ckanext-archiver',
version='0.1',
packages=find_packages(),
install_requires=[
'celery==2.4.5',
'kombu==1.5.1',
'kombu-sqlalchemy==1.1.0',
'SQLAlchemy>=0.6.6',
'requests==0.6.4',
'messytables>=0.1.4... | <commit_before>from setuptools import setup, find_packages
setup(
name='ckanext-archiver',
version='0.1',
packages=find_packages(),
install_requires=[
'celery==2.4.5',
'kombu==1.5.1',
'kombu-sqlalchemy==1.1.0',
'SQLAlchemy>=0.6.6',
'requests==0.6.4',
'mes... |
232eba0b7521d4fa7c005339f64690dd0b807cd2 | setup.py | setup.py | from distutils.core import setup
from setuptools import find_packages
import versioneer
with open("requirements.txt") as f:
requirements = f.read().splitlines()
setup(
name="s3contents",
version=versioneer.get_version(),
cmdclass=versioneer.get_cmdclass(),
description="A S3-backed ContentsManage... | import os
from distutils.core import setup
from setuptools import find_packages
import versioneer
def read_file(filename):
filepath = os.path.join(
os.path.dirname(os.path.dirname(__file__)), filename)
if os.path.exists(filepath):
return open(filepath).read()
else:
return ''
REQU... | Handle markdown long description for Pypi | Handle markdown long description for Pypi
| Python | apache-2.0 | danielfrg/s3contents | from distutils.core import setup
from setuptools import find_packages
import versioneer
with open("requirements.txt") as f:
requirements = f.read().splitlines()
setup(
name="s3contents",
version=versioneer.get_version(),
cmdclass=versioneer.get_cmdclass(),
description="A S3-backed ContentsManage... | import os
from distutils.core import setup
from setuptools import find_packages
import versioneer
def read_file(filename):
filepath = os.path.join(
os.path.dirname(os.path.dirname(__file__)), filename)
if os.path.exists(filepath):
return open(filepath).read()
else:
return ''
REQU... | <commit_before>from distutils.core import setup
from setuptools import find_packages
import versioneer
with open("requirements.txt") as f:
requirements = f.read().splitlines()
setup(
name="s3contents",
version=versioneer.get_version(),
cmdclass=versioneer.get_cmdclass(),
description="A S3-backed... | import os
from distutils.core import setup
from setuptools import find_packages
import versioneer
def read_file(filename):
filepath = os.path.join(
os.path.dirname(os.path.dirname(__file__)), filename)
if os.path.exists(filepath):
return open(filepath).read()
else:
return ''
REQU... | from distutils.core import setup
from setuptools import find_packages
import versioneer
with open("requirements.txt") as f:
requirements = f.read().splitlines()
setup(
name="s3contents",
version=versioneer.get_version(),
cmdclass=versioneer.get_cmdclass(),
description="A S3-backed ContentsManage... | <commit_before>from distutils.core import setup
from setuptools import find_packages
import versioneer
with open("requirements.txt") as f:
requirements = f.read().splitlines()
setup(
name="s3contents",
version=versioneer.get_version(),
cmdclass=versioneer.get_cmdclass(),
description="A S3-backed... |
f157ad4c971628c8fb0b1f94f6fd080c75413064 | setup.py | setup.py | from setuptools import setup, find_packages
setup(
name="xoxzo.logwatch",
version="0.4",
packages=find_packages(),
install_requires=[
'Baker==1.3',
'pytz==2016.3',
],
entry_points={
'console_scripts': [
'logwatch = xoxzo.logwatch.main:main',
],
},... | from setuptools import setup, find_packages
setup(
name="xoxzo.logwatch",
version="0.4",
packages=find_packages(),
install_requires=[
'Baker==1.3',
'pytz>=2016.3',
],
entry_points={
'console_scripts': [
'logwatch = xoxzo.logwatch.main:main',
],
},... | Set pytz version minimum 2016.3 | Set pytz version minimum 2016.3
| Python | mit | xoxzo/xoxzo.logwatch | from setuptools import setup, find_packages
setup(
name="xoxzo.logwatch",
version="0.4",
packages=find_packages(),
install_requires=[
'Baker==1.3',
'pytz==2016.3',
],
entry_points={
'console_scripts': [
'logwatch = xoxzo.logwatch.main:main',
],
},... | from setuptools import setup, find_packages
setup(
name="xoxzo.logwatch",
version="0.4",
packages=find_packages(),
install_requires=[
'Baker==1.3',
'pytz>=2016.3',
],
entry_points={
'console_scripts': [
'logwatch = xoxzo.logwatch.main:main',
],
},... | <commit_before>from setuptools import setup, find_packages
setup(
name="xoxzo.logwatch",
version="0.4",
packages=find_packages(),
install_requires=[
'Baker==1.3',
'pytz==2016.3',
],
entry_points={
'console_scripts': [
'logwatch = xoxzo.logwatch.main:main',
... | from setuptools import setup, find_packages
setup(
name="xoxzo.logwatch",
version="0.4",
packages=find_packages(),
install_requires=[
'Baker==1.3',
'pytz>=2016.3',
],
entry_points={
'console_scripts': [
'logwatch = xoxzo.logwatch.main:main',
],
},... | from setuptools import setup, find_packages
setup(
name="xoxzo.logwatch",
version="0.4",
packages=find_packages(),
install_requires=[
'Baker==1.3',
'pytz==2016.3',
],
entry_points={
'console_scripts': [
'logwatch = xoxzo.logwatch.main:main',
],
},... | <commit_before>from setuptools import setup, find_packages
setup(
name="xoxzo.logwatch",
version="0.4",
packages=find_packages(),
install_requires=[
'Baker==1.3',
'pytz==2016.3',
],
entry_points={
'console_scripts': [
'logwatch = xoxzo.logwatch.main:main',
... |
79a6177fa8366879fbb0ed1cb0961cca6b5ab89a | setup.py | setup.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from setuptools import setup, find_packages
import materializecssform
with open("README.md", "r") as fh:
long_description = fh.read()
setup(
name='django-materializecss-form',
version=materializecssform.__version__,
packages=find_packages(),
auth... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from setuptools import setup, find_packages
import materializecssform
with open("README.md", "r", encoding="utf-8") as fh:
long_description = fh.read()
setup(
name='django-materializecss-form',
version=materializecssform.__version__,
packages=find_pac... | Fix possible decoding problem when locale is set to C/ASCII | Fix possible decoding problem when locale is set to C/ASCII
| Python | mit | florent1933/django-materializecss-form,florent1933/django-materializecss-form | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from setuptools import setup, find_packages
import materializecssform
with open("README.md", "r") as fh:
long_description = fh.read()
setup(
name='django-materializecss-form',
version=materializecssform.__version__,
packages=find_packages(),
auth... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from setuptools import setup, find_packages
import materializecssform
with open("README.md", "r", encoding="utf-8") as fh:
long_description = fh.read()
setup(
name='django-materializecss-form',
version=materializecssform.__version__,
packages=find_pac... | <commit_before>#!/usr/bin/env python
# -*- coding: utf-8 -*-
from setuptools import setup, find_packages
import materializecssform
with open("README.md", "r") as fh:
long_description = fh.read()
setup(
name='django-materializecss-form',
version=materializecssform.__version__,
packages=find_packag... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from setuptools import setup, find_packages
import materializecssform
with open("README.md", "r", encoding="utf-8") as fh:
long_description = fh.read()
setup(
name='django-materializecss-form',
version=materializecssform.__version__,
packages=find_pac... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from setuptools import setup, find_packages
import materializecssform
with open("README.md", "r") as fh:
long_description = fh.read()
setup(
name='django-materializecss-form',
version=materializecssform.__version__,
packages=find_packages(),
auth... | <commit_before>#!/usr/bin/env python
# -*- coding: utf-8 -*-
from setuptools import setup, find_packages
import materializecssform
with open("README.md", "r") as fh:
long_description = fh.read()
setup(
name='django-materializecss-form',
version=materializecssform.__version__,
packages=find_packag... |
2727fccdb3672e1c7b28e4ba94ec743b53298f26 | src/main.py | src/main.py | '''
Created on Aug 12, 2017
@author: Aditya
This is the main file and will import other modules/codes written for python tkinter demonstration
'''
import program1 as p1
import program2 as p2
import program3 as p3
import program4 as p4
import program5 as p5
import program6 as p6
import program7 as p7
i... | '''
Created on Aug 12, 2017
@author: Aditya
This is the main file and will import other modules/codes written for python tkinter demonstration
'''
import program1 as p1
import program2 as p2
import program3 as p3
import program4 as p4
import program5 as p5
import program6 as p6
import program7 as p7
i... | Include Text App in Main | Include Text App in Main | Python | mit | deshadi/python-gui-demos | '''
Created on Aug 12, 2017
@author: Aditya
This is the main file and will import other modules/codes written for python tkinter demonstration
'''
import program1 as p1
import program2 as p2
import program3 as p3
import program4 as p4
import program5 as p5
import program6 as p6
import program7 as p7
i... | '''
Created on Aug 12, 2017
@author: Aditya
This is the main file and will import other modules/codes written for python tkinter demonstration
'''
import program1 as p1
import program2 as p2
import program3 as p3
import program4 as p4
import program5 as p5
import program6 as p6
import program7 as p7
i... | <commit_before>'''
Created on Aug 12, 2017
@author: Aditya
This is the main file and will import other modules/codes written for python tkinter demonstration
'''
import program1 as p1
import program2 as p2
import program3 as p3
import program4 as p4
import program5 as p5
import program6 as p6
import pr... | '''
Created on Aug 12, 2017
@author: Aditya
This is the main file and will import other modules/codes written for python tkinter demonstration
'''
import program1 as p1
import program2 as p2
import program3 as p3
import program4 as p4
import program5 as p5
import program6 as p6
import program7 as p7
i... | '''
Created on Aug 12, 2017
@author: Aditya
This is the main file and will import other modules/codes written for python tkinter demonstration
'''
import program1 as p1
import program2 as p2
import program3 as p3
import program4 as p4
import program5 as p5
import program6 as p6
import program7 as p7
i... | <commit_before>'''
Created on Aug 12, 2017
@author: Aditya
This is the main file and will import other modules/codes written for python tkinter demonstration
'''
import program1 as p1
import program2 as p2
import program3 as p3
import program4 as p4
import program5 as p5
import program6 as p6
import pr... |
ef1bd5c935d6fe814f2755dadff398929a5a23d6 | tasks.py | tasks.py | from datetime import timedelta
from celery import Celery
from celery.utils.log import get_task_logger
import settings
import client
celery = Celery('tasks', broker=settings.CELERY_BROKER, backend=settings.CELERY_RESULT_BACKEND)
@celery.task
def refresh_plows():
client.refresh_plows()
client.logger = get_task_lo... | from datetime import timedelta
from celery import Celery
from celery.utils.log import get_task_logger
import settings
import client
celery = Celery('tasks', broker=settings.CELERY_BROKER, backend=settings.CELERY_RESULT_BACKEND)
@celery.task
def refresh_plows():
client.refresh_plows()
client.logger = get_task_lo... | Update from upstream server every 10 secs | Update from upstream server every 10 secs
| Python | agpl-3.0 | City-of-Helsinki/aura,City-of-Helsinki/aura | from datetime import timedelta
from celery import Celery
from celery.utils.log import get_task_logger
import settings
import client
celery = Celery('tasks', broker=settings.CELERY_BROKER, backend=settings.CELERY_RESULT_BACKEND)
@celery.task
def refresh_plows():
client.refresh_plows()
client.logger = get_task_lo... | from datetime import timedelta
from celery import Celery
from celery.utils.log import get_task_logger
import settings
import client
celery = Celery('tasks', broker=settings.CELERY_BROKER, backend=settings.CELERY_RESULT_BACKEND)
@celery.task
def refresh_plows():
client.refresh_plows()
client.logger = get_task_lo... | <commit_before>from datetime import timedelta
from celery import Celery
from celery.utils.log import get_task_logger
import settings
import client
celery = Celery('tasks', broker=settings.CELERY_BROKER, backend=settings.CELERY_RESULT_BACKEND)
@celery.task
def refresh_plows():
client.refresh_plows()
client.logge... | from datetime import timedelta
from celery import Celery
from celery.utils.log import get_task_logger
import settings
import client
celery = Celery('tasks', broker=settings.CELERY_BROKER, backend=settings.CELERY_RESULT_BACKEND)
@celery.task
def refresh_plows():
client.refresh_plows()
client.logger = get_task_lo... | from datetime import timedelta
from celery import Celery
from celery.utils.log import get_task_logger
import settings
import client
celery = Celery('tasks', broker=settings.CELERY_BROKER, backend=settings.CELERY_RESULT_BACKEND)
@celery.task
def refresh_plows():
client.refresh_plows()
client.logger = get_task_lo... | <commit_before>from datetime import timedelta
from celery import Celery
from celery.utils.log import get_task_logger
import settings
import client
celery = Celery('tasks', broker=settings.CELERY_BROKER, backend=settings.CELERY_RESULT_BACKEND)
@celery.task
def refresh_plows():
client.refresh_plows()
client.logge... |
e3a2e65199c3d0db9576a25dc039f66e094171b6 | src/passgen.py | src/passgen.py | import string
import random
import argparse
def passgen(length=8):
"""Generate a strong password with *length* characters"""
pool = string.ascii_uppercase + string.ascii_lowercase + string.digits
return ''.join(random.SystemRandom().choice(pool) for _ in range(length))
def main():
parser = argparse.... | import string
import random
import argparse
def passgen(length=12):
"""Generate a strong password with *length* characters"""
pool = string.ascii_uppercase + string.ascii_lowercase + string.digits
return ''.join(random.SystemRandom().choice(pool) for _ in range(length))
def main():
parser = argparse... | Make length optional. Set up defaults. | Make length optional. Set up defaults.
| Python | mit | soslan/passgen | import string
import random
import argparse
def passgen(length=8):
"""Generate a strong password with *length* characters"""
pool = string.ascii_uppercase + string.ascii_lowercase + string.digits
return ''.join(random.SystemRandom().choice(pool) for _ in range(length))
def main():
parser = argparse.... | import string
import random
import argparse
def passgen(length=12):
"""Generate a strong password with *length* characters"""
pool = string.ascii_uppercase + string.ascii_lowercase + string.digits
return ''.join(random.SystemRandom().choice(pool) for _ in range(length))
def main():
parser = argparse... | <commit_before>import string
import random
import argparse
def passgen(length=8):
"""Generate a strong password with *length* characters"""
pool = string.ascii_uppercase + string.ascii_lowercase + string.digits
return ''.join(random.SystemRandom().choice(pool) for _ in range(length))
def main():
par... | import string
import random
import argparse
def passgen(length=12):
"""Generate a strong password with *length* characters"""
pool = string.ascii_uppercase + string.ascii_lowercase + string.digits
return ''.join(random.SystemRandom().choice(pool) for _ in range(length))
def main():
parser = argparse... | import string
import random
import argparse
def passgen(length=8):
"""Generate a strong password with *length* characters"""
pool = string.ascii_uppercase + string.ascii_lowercase + string.digits
return ''.join(random.SystemRandom().choice(pool) for _ in range(length))
def main():
parser = argparse.... | <commit_before>import string
import random
import argparse
def passgen(length=8):
"""Generate a strong password with *length* characters"""
pool = string.ascii_uppercase + string.ascii_lowercase + string.digits
return ''.join(random.SystemRandom().choice(pool) for _ in range(length))
def main():
par... |
1e327401d9c020bb7941b20ff51890ad1729973d | tests.py | tests.py | import pytest
from django.contrib.auth import get_user_model
from seleniumlogin import force_login
pytestmark = [pytest.mark.django_db(transaction=True)]
def test_non_authenticated_user_cannot_access_test_page(selenium, live_server):
selenium.get('{}/test/login_required/'.format(live_server.url))
assert 'fa... | import pytest
from django.contrib.auth import get_user_model
from seleniumlogin import force_login
pytestmark = [pytest.mark.django_db(transaction=True)]
def test_non_authenticated_user_cannot_access_test_page(selenium, live_server):
selenium.get('{}/test/login_required/'.format(live_server.url))
assert 'fa... | Rename test. The test tries to access a test page, not a blank page | Rename test. The test tries to access a test page, not a blank page
| Python | mit | feffe/django-selenium-login,feffe/django-selenium-login | import pytest
from django.contrib.auth import get_user_model
from seleniumlogin import force_login
pytestmark = [pytest.mark.django_db(transaction=True)]
def test_non_authenticated_user_cannot_access_test_page(selenium, live_server):
selenium.get('{}/test/login_required/'.format(live_server.url))
assert 'fa... | import pytest
from django.contrib.auth import get_user_model
from seleniumlogin import force_login
pytestmark = [pytest.mark.django_db(transaction=True)]
def test_non_authenticated_user_cannot_access_test_page(selenium, live_server):
selenium.get('{}/test/login_required/'.format(live_server.url))
assert 'fa... | <commit_before>import pytest
from django.contrib.auth import get_user_model
from seleniumlogin import force_login
pytestmark = [pytest.mark.django_db(transaction=True)]
def test_non_authenticated_user_cannot_access_test_page(selenium, live_server):
selenium.get('{}/test/login_required/'.format(live_server.url))... | import pytest
from django.contrib.auth import get_user_model
from seleniumlogin import force_login
pytestmark = [pytest.mark.django_db(transaction=True)]
def test_non_authenticated_user_cannot_access_test_page(selenium, live_server):
selenium.get('{}/test/login_required/'.format(live_server.url))
assert 'fa... | import pytest
from django.contrib.auth import get_user_model
from seleniumlogin import force_login
pytestmark = [pytest.mark.django_db(transaction=True)]
def test_non_authenticated_user_cannot_access_test_page(selenium, live_server):
selenium.get('{}/test/login_required/'.format(live_server.url))
assert 'fa... | <commit_before>import pytest
from django.contrib.auth import get_user_model
from seleniumlogin import force_login
pytestmark = [pytest.mark.django_db(transaction=True)]
def test_non_authenticated_user_cannot_access_test_page(selenium, live_server):
selenium.get('{}/test/login_required/'.format(live_server.url))... |
dfc6e7d9b6c415dc230b5ea4948e59a486e7364c | mysite/deployment_settings.py | mysite/deployment_settings.py | from settings import *
OHLOH_API_KEY='SXvLaGPJFaKXQC0VOocAg'
DEBUG=False
ADMINS=[
('All OH devs', 'devel@openhatch.org'),
]
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', 'devel@lists.openhatch.org'),
]
INVITE_MODE=True # Enabled on production site
INVITATIONS_PER_USER=20
TEMPLTE_DEBUG=False
| Use right email address for devel@ list | Use right email address for devel@ list
| Python | agpl-3.0 | ojengwa/oh-mainline,ojengwa/oh-mainline,campbe13/openhatch,mzdaniel/oh-mainline,willingc/oh-mainline,waseem18/oh-mainline,SnappleCap/oh-mainline,onceuponatimeforever/oh-mainline,mzdaniel/oh-mainline,sudheesh001/oh-mainline,eeshangarg/oh-mainline,vipul-sharma20/oh-mainline,jledbetter/openhatch,eeshangarg/oh-mainline,onc... | from settings import *
OHLOH_API_KEY='SXvLaGPJFaKXQC0VOocAg'
DEBUG=False
ADMINS=[
('All OH devs', 'devel@openhatch.org'),
]
INVITE_MODE=True # Enabled on production site
INVITATIONS_PER_USER=20
TEMPLTE_DEBUG=False
Use right email address for devel@ list | from settings import *
OHLOH_API_KEY='SXvLaGPJFaKXQC0VOocAg'
DEBUG=False
ADMINS=[
('All OH devs', 'devel@lists.openhatch.org'),
]
INVITE_MODE=True # Enabled on production site
INVITATIONS_PER_USER=20
TEMPLTE_DEBUG=False
| <commit_before>from settings import *
OHLOH_API_KEY='SXvLaGPJFaKXQC0VOocAg'
DEBUG=False
ADMINS=[
('All OH devs', 'devel@openhatch.org'),
]
INVITE_MODE=True # Enabled on production site
INVITATIONS_PER_USER=20
TEMPLTE_DEBUG=False
<commit_msg>Use right email address for devel@ list<commit_after> | from settings import *
OHLOH_API_KEY='SXvLaGPJFaKXQC0VOocAg'
DEBUG=False
ADMINS=[
('All OH devs', 'devel@lists.openhatch.org'),
]
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', 'devel@openhatch.org'),
]
INVITE_MODE=True # Enabled on production site
INVITATIONS_PER_USER=20
TEMPLTE_DEBUG=False
Use right email address for devel@ listfrom settings import *
OHLOH_API_KEY='SXvLaGPJFaKXQC0VOocAg... | <commit_before>from settings import *
OHLOH_API_KEY='SXvLaGPJFaKXQC0VOocAg'
DEBUG=False
ADMINS=[
('All OH devs', 'devel@openhatch.org'),
]
INVITE_MODE=True # Enabled on production site
INVITATIONS_PER_USER=20
TEMPLTE_DEBUG=False
<commit_msg>Use right email address for devel@ list<commit_after>from settings impor... |
741545dcf58fdfaf882d797d3ce4f7607ca0dad4 | kobo/client/commands/cmd_resubmit_tasks.py | kobo/client/commands/cmd_resubmit_tasks.py | # -*- coding: utf-8 -*-
from __future__ import print_function
import sys
from kobo.client.task_watcher import TaskWatcher
from kobo.client import ClientCommand
class Resubmit_Tasks(ClientCommand):
"""resubmit failed tasks"""
enabled = True
def options(self):
self.parser.usage = "%%prog %s tas... | # -*- coding: utf-8 -*-
from __future__ import print_function
import sys
from kobo.client.task_watcher import TaskWatcher
from kobo.client import ClientCommand
class Resubmit_Tasks(ClientCommand):
"""resubmit failed tasks"""
enabled = True
def options(self):
self.parser.usage = "%%prog %s tas... | Add --nowait option to resubmit-tasks cmd | Add --nowait option to resubmit-tasks cmd
In some use cases, waiting till the tasks finish is undesirable. Nowait
option should be provided.
| Python | lgpl-2.1 | release-engineering/kobo,release-engineering/kobo,release-engineering/kobo,release-engineering/kobo | # -*- coding: utf-8 -*-
from __future__ import print_function
import sys
from kobo.client.task_watcher import TaskWatcher
from kobo.client import ClientCommand
class Resubmit_Tasks(ClientCommand):
"""resubmit failed tasks"""
enabled = True
def options(self):
self.parser.usage = "%%prog %s tas... | # -*- coding: utf-8 -*-
from __future__ import print_function
import sys
from kobo.client.task_watcher import TaskWatcher
from kobo.client import ClientCommand
class Resubmit_Tasks(ClientCommand):
"""resubmit failed tasks"""
enabled = True
def options(self):
self.parser.usage = "%%prog %s tas... | <commit_before># -*- coding: utf-8 -*-
from __future__ import print_function
import sys
from kobo.client.task_watcher import TaskWatcher
from kobo.client import ClientCommand
class Resubmit_Tasks(ClientCommand):
"""resubmit failed tasks"""
enabled = True
def options(self):
self.parser.usage =... | # -*- coding: utf-8 -*-
from __future__ import print_function
import sys
from kobo.client.task_watcher import TaskWatcher
from kobo.client import ClientCommand
class Resubmit_Tasks(ClientCommand):
"""resubmit failed tasks"""
enabled = True
def options(self):
self.parser.usage = "%%prog %s tas... | # -*- coding: utf-8 -*-
from __future__ import print_function
import sys
from kobo.client.task_watcher import TaskWatcher
from kobo.client import ClientCommand
class Resubmit_Tasks(ClientCommand):
"""resubmit failed tasks"""
enabled = True
def options(self):
self.parser.usage = "%%prog %s tas... | <commit_before># -*- coding: utf-8 -*-
from __future__ import print_function
import sys
from kobo.client.task_watcher import TaskWatcher
from kobo.client import ClientCommand
class Resubmit_Tasks(ClientCommand):
"""resubmit failed tasks"""
enabled = True
def options(self):
self.parser.usage =... |
2e70450846fb0f40d6d0449093ddf121da7547a8 | tbmodels/__init__.py | tbmodels/__init__.py | # -*- coding: utf-8 -*-
# (c) 2015-2018, ETH Zurich, Institut fuer Theoretische Physik
# Author: Dominik Gresch <greschd@gmx.ch>
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 <greschd@gmx.ch>
r"""
TBmodels is a tool for creating / loading and manipulating tight-binding models.
"""
__version__ = '1.3.2'
# import order is important due to circular imports
from . import helpers
fr... | Remove 'alpha' designation from version number. | Remove 'alpha' designation from version number.
| Python | apache-2.0 | Z2PackDev/TBmodels,Z2PackDev/TBmodels | # -*- coding: utf-8 -*-
# (c) 2015-2018, ETH Zurich, Institut fuer Theoretische Physik
# Author: Dominik Gresch <greschd@gmx.ch>
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 <greschd@gmx.ch>
r"""
TBmodels is a tool for creating / loading and manipulating tight-binding models.
"""
__version__ = '1.3.2'
# 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 <greschd@gmx.ch>
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 . ... | # -*- coding: utf-8 -*-
# (c) 2015-2018, ETH Zurich, Institut fuer Theoretische Physik
# Author: Dominik Gresch <greschd@gmx.ch>
r"""
TBmodels is a tool for creating / loading and manipulating tight-binding models.
"""
__version__ = '1.3.2'
# 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 <greschd@gmx.ch>
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 <greschd@gmx.ch>
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 . ... |
8e7a92bce03ca472bc78bb9df5e2c9cf063c29b7 | temba/campaigns/tasks.py | temba/campaigns/tasks.py | from __future__ import unicode_literals
from datetime import datetime
from django.utils import timezone
from djcelery_transactions import task
from redis_cache import get_redis_connection
from .models import Campaign, EventFire
from django.conf import settings
import redis
from temba.msgs.models import HANDLER_QUEUE, ... | from __future__ import unicode_literals
from datetime import datetime
from django.utils import timezone
from djcelery_transactions import task
from redis_cache import get_redis_connection
from .models import Campaign, EventFire
from django.conf import settings
import redis
from temba.msgs.models import HANDLER_QUEUE, ... | Use correct field to get org from | Use correct field to get org from
| Python | agpl-3.0 | harrissoerja/rapidpro,pulilab/rapidpro,pulilab/rapidpro,reyrodrigues/EU-SMS,tsotetsi/textily-web,harrissoerja/rapidpro,tsotetsi/textily-web,pulilab/rapidpro,tsotetsi/textily-web,Thapelo-Tsotetsi/rapidpro,Thapelo-Tsotetsi/rapidpro,ewheeler/rapidpro,praekelt/rapidpro,harrissoerja/rapidpro,praekelt/rapidpro,reyrodrigues/E... | from __future__ import unicode_literals
from datetime import datetime
from django.utils import timezone
from djcelery_transactions import task
from redis_cache import get_redis_connection
from .models import Campaign, EventFire
from django.conf import settings
import redis
from temba.msgs.models import HANDLER_QUEUE, ... | from __future__ import unicode_literals
from datetime import datetime
from django.utils import timezone
from djcelery_transactions import task
from redis_cache import get_redis_connection
from .models import Campaign, EventFire
from django.conf import settings
import redis
from temba.msgs.models import HANDLER_QUEUE, ... | <commit_before>from __future__ import unicode_literals
from datetime import datetime
from django.utils import timezone
from djcelery_transactions import task
from redis_cache import get_redis_connection
from .models import Campaign, EventFire
from django.conf import settings
import redis
from temba.msgs.models import ... | from __future__ import unicode_literals
from datetime import datetime
from django.utils import timezone
from djcelery_transactions import task
from redis_cache import get_redis_connection
from .models import Campaign, EventFire
from django.conf import settings
import redis
from temba.msgs.models import HANDLER_QUEUE, ... | from __future__ import unicode_literals
from datetime import datetime
from django.utils import timezone
from djcelery_transactions import task
from redis_cache import get_redis_connection
from .models import Campaign, EventFire
from django.conf import settings
import redis
from temba.msgs.models import HANDLER_QUEUE, ... | <commit_before>from __future__ import unicode_literals
from datetime import datetime
from django.utils import timezone
from djcelery_transactions import task
from redis_cache import get_redis_connection
from .models import Campaign, EventFire
from django.conf import settings
import redis
from temba.msgs.models import ... |
1e2086b868861034d89138349c4da909f380f19e | feedback/views.py | feedback/views.py | from django.utils.decorators import method_decorator
from django.views.decorators.csrf import csrf_exempt
from rest_framework import serializers, status
from rest_framework.response import Response
from rest_framework.views import APIView
from .models import Feedback
class FeedbackSerializer(serializers.ModelSeriali... | from django.utils.decorators import method_decorator
from django.views.decorators.csrf import csrf_exempt
from rest_framework import serializers, status
from rest_framework.response import Response
from rest_framework.views import APIView
from .models import Feedback
class FeedbackSerializer(serializers.ModelSeriali... | Make feedback compatible with DRF >3.3.0 | Make feedback compatible with DRF >3.3.0
| Python | mit | City-of-Helsinki/digihel,City-of-Helsinki/digihel,City-of-Helsinki/digihel,City-of-Helsinki/digihel | from django.utils.decorators import method_decorator
from django.views.decorators.csrf import csrf_exempt
from rest_framework import serializers, status
from rest_framework.response import Response
from rest_framework.views import APIView
from .models import Feedback
class FeedbackSerializer(serializers.ModelSeriali... | from django.utils.decorators import method_decorator
from django.views.decorators.csrf import csrf_exempt
from rest_framework import serializers, status
from rest_framework.response import Response
from rest_framework.views import APIView
from .models import Feedback
class FeedbackSerializer(serializers.ModelSeriali... | <commit_before>from django.utils.decorators import method_decorator
from django.views.decorators.csrf import csrf_exempt
from rest_framework import serializers, status
from rest_framework.response import Response
from rest_framework.views import APIView
from .models import Feedback
class FeedbackSerializer(serialize... | from django.utils.decorators import method_decorator
from django.views.decorators.csrf import csrf_exempt
from rest_framework import serializers, status
from rest_framework.response import Response
from rest_framework.views import APIView
from .models import Feedback
class FeedbackSerializer(serializers.ModelSeriali... | from django.utils.decorators import method_decorator
from django.views.decorators.csrf import csrf_exempt
from rest_framework import serializers, status
from rest_framework.response import Response
from rest_framework.views import APIView
from .models import Feedback
class FeedbackSerializer(serializers.ModelSeriali... | <commit_before>from django.utils.decorators import method_decorator
from django.views.decorators.csrf import csrf_exempt
from rest_framework import serializers, status
from rest_framework.response import Response
from rest_framework.views import APIView
from .models import Feedback
class FeedbackSerializer(serialize... |
550ce00c5d2757287fee2d810543d3f17ad9ccff | Orange/tests/sql/test_naive_bayes_sql.py | Orange/tests/sql/test_naive_bayes_sql.py | import unittest
from numpy import array
import Orange.classification.naive_bayes as nb
from Orange import preprocess
from Orange.data.sql.table import SqlTable
from Orange.data import Domain
from Orange.data.variable import DiscreteVariable
from Orange.tests.sql.base import has_psycopg2
@unittest.skipIf(not has_psy... | import unittest
from numpy import array
import Orange.classification.naive_bayes as nb
from Orange import preprocess
from Orange.data.sql.table import SqlTable
from Orange.data import Domain
from Orange.data.variable import DiscreteVariable
from Orange.tests.sql.base import has_psycopg2
@unittest.skipIf(not has_psy... | Fix test of NaiveBayes on SQL table | Fix test of NaiveBayes on SQL table
| Python | bsd-2-clause | cheral/orange3,marinkaz/orange3,qusp/orange3,qPCR4vir/orange3,qusp/orange3,qusp/orange3,kwikadi/orange3,qPCR4vir/orange3,qPCR4vir/orange3,marinkaz/orange3,qPCR4vir/orange3,marinkaz/orange3,marinkaz/orange3,cheral/orange3,cheral/orange3,kwikadi/orange3,marinkaz/orange3,cheral/orange3,cheral/orange3,kwikadi/orange3,chera... | import unittest
from numpy import array
import Orange.classification.naive_bayes as nb
from Orange import preprocess
from Orange.data.sql.table import SqlTable
from Orange.data import Domain
from Orange.data.variable import DiscreteVariable
from Orange.tests.sql.base import has_psycopg2
@unittest.skipIf(not has_psy... | import unittest
from numpy import array
import Orange.classification.naive_bayes as nb
from Orange import preprocess
from Orange.data.sql.table import SqlTable
from Orange.data import Domain
from Orange.data.variable import DiscreteVariable
from Orange.tests.sql.base import has_psycopg2
@unittest.skipIf(not has_psy... | <commit_before>import unittest
from numpy import array
import Orange.classification.naive_bayes as nb
from Orange import preprocess
from Orange.data.sql.table import SqlTable
from Orange.data import Domain
from Orange.data.variable import DiscreteVariable
from Orange.tests.sql.base import has_psycopg2
@unittest.ski... | import unittest
from numpy import array
import Orange.classification.naive_bayes as nb
from Orange import preprocess
from Orange.data.sql.table import SqlTable
from Orange.data import Domain
from Orange.data.variable import DiscreteVariable
from Orange.tests.sql.base import has_psycopg2
@unittest.skipIf(not has_psy... | import unittest
from numpy import array
import Orange.classification.naive_bayes as nb
from Orange import preprocess
from Orange.data.sql.table import SqlTable
from Orange.data import Domain
from Orange.data.variable import DiscreteVariable
from Orange.tests.sql.base import has_psycopg2
@unittest.skipIf(not has_psy... | <commit_before>import unittest
from numpy import array
import Orange.classification.naive_bayes as nb
from Orange import preprocess
from Orange.data.sql.table import SqlTable
from Orange.data import Domain
from Orange.data.variable import DiscreteVariable
from Orange.tests.sql.base import has_psycopg2
@unittest.ski... |
4fc1cd3e3b225b981521cf321f8c4441f45c3252 | test/pytorch/test_cnn.py | test/pytorch/test_cnn.py | import logging
import unittest
from ..helpers import run_module
logging.basicConfig(level=logging.DEBUG)
class PytorchCNNTest(unittest.TestCase):
def setUp(self):
self.name = "benchmarker"
self.imgnet_args = [
"--framework=pytorch",
"--problem_size=4",
"--batc... | import logging
import unittest
from ..helpers import run_module
logging.basicConfig(level=logging.DEBUG)
class PytorchCNNTest(unittest.TestCase):
def setUp(self):
self.name = "benchmarker"
self.args = [
"--problem=cnn2d_toy",
"--framework=pytorch",
"--problem_... | Add training and inference test | Add training and inference test
| Python | mpl-2.0 | undertherain/benchmarker,undertherain/benchmarker,undertherain/benchmarker,undertherain/benchmarker | import logging
import unittest
from ..helpers import run_module
logging.basicConfig(level=logging.DEBUG)
class PytorchCNNTest(unittest.TestCase):
def setUp(self):
self.name = "benchmarker"
self.imgnet_args = [
"--framework=pytorch",
"--problem_size=4",
"--batc... | import logging
import unittest
from ..helpers import run_module
logging.basicConfig(level=logging.DEBUG)
class PytorchCNNTest(unittest.TestCase):
def setUp(self):
self.name = "benchmarker"
self.args = [
"--problem=cnn2d_toy",
"--framework=pytorch",
"--problem_... | <commit_before>import logging
import unittest
from ..helpers import run_module
logging.basicConfig(level=logging.DEBUG)
class PytorchCNNTest(unittest.TestCase):
def setUp(self):
self.name = "benchmarker"
self.imgnet_args = [
"--framework=pytorch",
"--problem_size=4",
... | import logging
import unittest
from ..helpers import run_module
logging.basicConfig(level=logging.DEBUG)
class PytorchCNNTest(unittest.TestCase):
def setUp(self):
self.name = "benchmarker"
self.args = [
"--problem=cnn2d_toy",
"--framework=pytorch",
"--problem_... | import logging
import unittest
from ..helpers import run_module
logging.basicConfig(level=logging.DEBUG)
class PytorchCNNTest(unittest.TestCase):
def setUp(self):
self.name = "benchmarker"
self.imgnet_args = [
"--framework=pytorch",
"--problem_size=4",
"--batc... | <commit_before>import logging
import unittest
from ..helpers import run_module
logging.basicConfig(level=logging.DEBUG)
class PytorchCNNTest(unittest.TestCase):
def setUp(self):
self.name = "benchmarker"
self.imgnet_args = [
"--framework=pytorch",
"--problem_size=4",
... |
90bdcad66a6f29c9e3d731b5b09b0a2ba477ae2f | tviit/urls.py | tviit/urls.py | from django.conf.urls import include, url
from django.contrib import admin
from . import views
urlpatterns = [
url(r'^', views.IndexView.as_view(), name='tviit_index'),
]
| from django.conf.urls import include, url
from django.contrib import admin
from . import views
urlpatterns = [
url(r'^$', views.IndexView.as_view(), name='tviit_index'),
url(r'create/$', views.create_tviit, name="create_tviit"),
]
| Create url-patterns for tviit creation | Create url-patterns for tviit creation
| Python | mit | DeWaster/Tviserrys,DeWaster/Tviserrys | from django.conf.urls import include, url
from django.contrib import admin
from . import views
urlpatterns = [
url(r'^', views.IndexView.as_view(), name='tviit_index'),
]
Create url-patterns for tviit creation | from django.conf.urls import include, url
from django.contrib import admin
from . import views
urlpatterns = [
url(r'^$', views.IndexView.as_view(), name='tviit_index'),
url(r'create/$', views.create_tviit, name="create_tviit"),
]
| <commit_before>from django.conf.urls import include, url
from django.contrib import admin
from . import views
urlpatterns = [
url(r'^', views.IndexView.as_view(), name='tviit_index'),
]
<commit_msg>Create url-patterns for tviit creation<commit_after> | from django.conf.urls import include, url
from django.contrib import admin
from . import views
urlpatterns = [
url(r'^$', views.IndexView.as_view(), name='tviit_index'),
url(r'create/$', views.create_tviit, name="create_tviit"),
]
| from django.conf.urls import include, url
from django.contrib import admin
from . import views
urlpatterns = [
url(r'^', views.IndexView.as_view(), name='tviit_index'),
]
Create url-patterns for tviit creationfrom django.conf.urls import include, url
from django.contrib import admin
from . import views
urlpatte... | <commit_before>from django.conf.urls import include, url
from django.contrib import admin
from . import views
urlpatterns = [
url(r'^', views.IndexView.as_view(), name='tviit_index'),
]
<commit_msg>Create url-patterns for tviit creation<commit_after>from django.conf.urls import include, url
from django.contrib im... |
881222a49c6b3e8792adf5754c61992bd12c7b28 | tests/test_conduction.py | tests/test_conduction.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""Test Mongo Conduction."""
import logging
import pymongo
from mockupdb import go
from pymongo.errors import OperationFailure
from conduction.server import get_mockup, main_loop
from tests import unittest # unittest2 on Python 2.6.
class ConductionTest(unittest.Test... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""Test Mongo Conduction."""
import logging
import pymongo
from mockupdb import go
from pymongo.errors import OperationFailure
from conduction.server import get_mockup, main_loop
from tests import unittest # unittest2 on Python 2.6.
class ConductionTest(unittest.Test... | Test root URI and 404s. | Test root URI and 404s.
| Python | apache-2.0 | ajdavis/mongo-conduction | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""Test Mongo Conduction."""
import logging
import pymongo
from mockupdb import go
from pymongo.errors import OperationFailure
from conduction.server import get_mockup, main_loop
from tests import unittest # unittest2 on Python 2.6.
class ConductionTest(unittest.Test... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""Test Mongo Conduction."""
import logging
import pymongo
from mockupdb import go
from pymongo.errors import OperationFailure
from conduction.server import get_mockup, main_loop
from tests import unittest # unittest2 on Python 2.6.
class ConductionTest(unittest.Test... | <commit_before>#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""Test Mongo Conduction."""
import logging
import pymongo
from mockupdb import go
from pymongo.errors import OperationFailure
from conduction.server import get_mockup, main_loop
from tests import unittest # unittest2 on Python 2.6.
class ConductionTes... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""Test Mongo Conduction."""
import logging
import pymongo
from mockupdb import go
from pymongo.errors import OperationFailure
from conduction.server import get_mockup, main_loop
from tests import unittest # unittest2 on Python 2.6.
class ConductionTest(unittest.Test... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""Test Mongo Conduction."""
import logging
import pymongo
from mockupdb import go
from pymongo.errors import OperationFailure
from conduction.server import get_mockup, main_loop
from tests import unittest # unittest2 on Python 2.6.
class ConductionTest(unittest.Test... | <commit_before>#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""Test Mongo Conduction."""
import logging
import pymongo
from mockupdb import go
from pymongo.errors import OperationFailure
from conduction.server import get_mockup, main_loop
from tests import unittest # unittest2 on Python 2.6.
class ConductionTes... |
86480f2a4948b58f458d686be5fba330abf9743f | rx/core/operators/delaysubscription.py | rx/core/operators/delaysubscription.py | from datetime import datetime
from typing import Union, Callable
from rx import empty, timer, operators as ops
from rx.core import Observable
def _delay_subscription(duetime: Union[datetime, int]) -> Callable[[Observable], Observable]:
"""Time shifts the observable sequence by delaying the subscription.
1 -... | from datetime import datetime
from typing import Union, Callable
from rx import empty, timer, operators as ops
from rx.core import Observable
def _delay_subscription(duetime: Union[datetime, int]) -> Callable[[Observable], Observable]:
"""Time shifts the observable sequence by delaying the subscription.
1 -... | Fix call to renamed function | Fix call to renamed function
| Python | mit | ReactiveX/RxPY,ReactiveX/RxPY | from datetime import datetime
from typing import Union, Callable
from rx import empty, timer, operators as ops
from rx.core import Observable
def _delay_subscription(duetime: Union[datetime, int]) -> Callable[[Observable], Observable]:
"""Time shifts the observable sequence by delaying the subscription.
1 -... | from datetime import datetime
from typing import Union, Callable
from rx import empty, timer, operators as ops
from rx.core import Observable
def _delay_subscription(duetime: Union[datetime, int]) -> Callable[[Observable], Observable]:
"""Time shifts the observable sequence by delaying the subscription.
1 -... | <commit_before>from datetime import datetime
from typing import Union, Callable
from rx import empty, timer, operators as ops
from rx.core import Observable
def _delay_subscription(duetime: Union[datetime, int]) -> Callable[[Observable], Observable]:
"""Time shifts the observable sequence by delaying the subscri... | from datetime import datetime
from typing import Union, Callable
from rx import empty, timer, operators as ops
from rx.core import Observable
def _delay_subscription(duetime: Union[datetime, int]) -> Callable[[Observable], Observable]:
"""Time shifts the observable sequence by delaying the subscription.
1 -... | from datetime import datetime
from typing import Union, Callable
from rx import empty, timer, operators as ops
from rx.core import Observable
def _delay_subscription(duetime: Union[datetime, int]) -> Callable[[Observable], Observable]:
"""Time shifts the observable sequence by delaying the subscription.
1 -... | <commit_before>from datetime import datetime
from typing import Union, Callable
from rx import empty, timer, operators as ops
from rx.core import Observable
def _delay_subscription(duetime: Union[datetime, int]) -> Callable[[Observable], Observable]:
"""Time shifts the observable sequence by delaying the subscri... |
e3b1a323921b8331d7fd84c013e80a89a5b21bde | haproxy_status.py | haproxy_status.py | #!/usr/bin/env python
from BaseHTTPServer import BaseHTTPRequestHandler
from helpers.etcd import Etcd
from helpers.postgresql import Postgresql
import sys, yaml, socket
f = open(sys.argv[1], "r")
config = yaml.load(f.read())
f.close()
etcd = Etcd(config["etcd"])
postgresql = Postgresql(config["postgresql"])
class S... | #!/usr/bin/env python
from BaseHTTPServer import BaseHTTPRequestHandler
from helpers.etcd import Etcd
from helpers.postgresql import Postgresql
import sys, yaml, socket
f = open(sys.argv[1], "r")
config = yaml.load(f.read())
f.close()
etcd = Etcd(config["etcd"])
postgresql = Postgresql(config["postgresql"])
class S... | Add the ability to query for the replica status of a PG instance | Add the ability to query for the replica status of a PG instance
| Python | mit | Tapjoy/governor | #!/usr/bin/env python
from BaseHTTPServer import BaseHTTPRequestHandler
from helpers.etcd import Etcd
from helpers.postgresql import Postgresql
import sys, yaml, socket
f = open(sys.argv[1], "r")
config = yaml.load(f.read())
f.close()
etcd = Etcd(config["etcd"])
postgresql = Postgresql(config["postgresql"])
class S... | #!/usr/bin/env python
from BaseHTTPServer import BaseHTTPRequestHandler
from helpers.etcd import Etcd
from helpers.postgresql import Postgresql
import sys, yaml, socket
f = open(sys.argv[1], "r")
config = yaml.load(f.read())
f.close()
etcd = Etcd(config["etcd"])
postgresql = Postgresql(config["postgresql"])
class S... | <commit_before>#!/usr/bin/env python
from BaseHTTPServer import BaseHTTPRequestHandler
from helpers.etcd import Etcd
from helpers.postgresql import Postgresql
import sys, yaml, socket
f = open(sys.argv[1], "r")
config = yaml.load(f.read())
f.close()
etcd = Etcd(config["etcd"])
postgresql = Postgresql(config["postgre... | #!/usr/bin/env python
from BaseHTTPServer import BaseHTTPRequestHandler
from helpers.etcd import Etcd
from helpers.postgresql import Postgresql
import sys, yaml, socket
f = open(sys.argv[1], "r")
config = yaml.load(f.read())
f.close()
etcd = Etcd(config["etcd"])
postgresql = Postgresql(config["postgresql"])
class S... | #!/usr/bin/env python
from BaseHTTPServer import BaseHTTPRequestHandler
from helpers.etcd import Etcd
from helpers.postgresql import Postgresql
import sys, yaml, socket
f = open(sys.argv[1], "r")
config = yaml.load(f.read())
f.close()
etcd = Etcd(config["etcd"])
postgresql = Postgresql(config["postgresql"])
class S... | <commit_before>#!/usr/bin/env python
from BaseHTTPServer import BaseHTTPRequestHandler
from helpers.etcd import Etcd
from helpers.postgresql import Postgresql
import sys, yaml, socket
f = open(sys.argv[1], "r")
config = yaml.load(f.read())
f.close()
etcd = Etcd(config["etcd"])
postgresql = Postgresql(config["postgre... |
d0191c43c784b229ce104700989dfb91c67ec490 | helper/windows.py | helper/windows.py | """
Windows platform support for running the application as a detached process.
"""
import multiprocessing
import subprocess
import sys
DETACHED_PROCESS = 8
class Daemon(object):
def __init__(self, controller, user=None, group=None,
pid_file=None, prevent_core=None, exception_log=None):
... | """
Windows platform support for running the application as a detached process.
"""
import subprocess
import sys
DETACHED_PROCESS = 8
class Daemon(object):
"""Daemonize the helper application, putting it in a forked background
process.
"""
def __init__(self, controller):
raise NotImplemente... | Raise a NotImplementedError for Windows | Raise a NotImplementedError for Windows
| Python | bsd-3-clause | gmr/helper,dave-shawley/helper,gmr/helper | """
Windows platform support for running the application as a detached process.
"""
import multiprocessing
import subprocess
import sys
DETACHED_PROCESS = 8
class Daemon(object):
def __init__(self, controller, user=None, group=None,
pid_file=None, prevent_core=None, exception_log=None):
... | """
Windows platform support for running the application as a detached process.
"""
import subprocess
import sys
DETACHED_PROCESS = 8
class Daemon(object):
"""Daemonize the helper application, putting it in a forked background
process.
"""
def __init__(self, controller):
raise NotImplemente... | <commit_before>"""
Windows platform support for running the application as a detached process.
"""
import multiprocessing
import subprocess
import sys
DETACHED_PROCESS = 8
class Daemon(object):
def __init__(self, controller, user=None, group=None,
pid_file=None, prevent_core=None, exception_lo... | """
Windows platform support for running the application as a detached process.
"""
import subprocess
import sys
DETACHED_PROCESS = 8
class Daemon(object):
"""Daemonize the helper application, putting it in a forked background
process.
"""
def __init__(self, controller):
raise NotImplemente... | """
Windows platform support for running the application as a detached process.
"""
import multiprocessing
import subprocess
import sys
DETACHED_PROCESS = 8
class Daemon(object):
def __init__(self, controller, user=None, group=None,
pid_file=None, prevent_core=None, exception_log=None):
... | <commit_before>"""
Windows platform support for running the application as a detached process.
"""
import multiprocessing
import subprocess
import sys
DETACHED_PROCESS = 8
class Daemon(object):
def __init__(self, controller, user=None, group=None,
pid_file=None, prevent_core=None, exception_lo... |
b8350e91d7bd1e3a775ed230820c96a180a2ad02 | tests/test_solver.py | tests/test_solver.py | from tinyik import Link, Joint, FKSolver
from .utils import x, y, z, theta, approx_eq
def test_forward_kinematics():
fk = FKSolver([
Joint('z'), Link([1., 0., 0.]), Joint('y'), Link([1., 0., 0.])
])
assert all(fk.solve([0., 0.]) == [2., 0., 0.])
assert approx_eq(fk.solve([theta, theta]), [x,... | from tinyik import Link, Joint, FKSolver, CCDFKSolver, CCDIKSolver
from .utils import x, y, z, theta, approx_eq
components = [Joint('z'), Link([1., 0., 0.]), Joint('y'), Link([1., 0., 0.])]
predicted = [2., 0., 0.]
def test_fk():
fk = FKSolver(components)
assert all(fk.solve([0., 0.]) == predicted)
as... | Add tests for CCD IK solver | Add tests for CCD IK solver
| Python | mit | lanius/tinyik | from tinyik import Link, Joint, FKSolver
from .utils import x, y, z, theta, approx_eq
def test_forward_kinematics():
fk = FKSolver([
Joint('z'), Link([1., 0., 0.]), Joint('y'), Link([1., 0., 0.])
])
assert all(fk.solve([0., 0.]) == [2., 0., 0.])
assert approx_eq(fk.solve([theta, theta]), [x,... | from tinyik import Link, Joint, FKSolver, CCDFKSolver, CCDIKSolver
from .utils import x, y, z, theta, approx_eq
components = [Joint('z'), Link([1., 0., 0.]), Joint('y'), Link([1., 0., 0.])]
predicted = [2., 0., 0.]
def test_fk():
fk = FKSolver(components)
assert all(fk.solve([0., 0.]) == predicted)
as... | <commit_before>from tinyik import Link, Joint, FKSolver
from .utils import x, y, z, theta, approx_eq
def test_forward_kinematics():
fk = FKSolver([
Joint('z'), Link([1., 0., 0.]), Joint('y'), Link([1., 0., 0.])
])
assert all(fk.solve([0., 0.]) == [2., 0., 0.])
assert approx_eq(fk.solve([thet... | from tinyik import Link, Joint, FKSolver, CCDFKSolver, CCDIKSolver
from .utils import x, y, z, theta, approx_eq
components = [Joint('z'), Link([1., 0., 0.]), Joint('y'), Link([1., 0., 0.])]
predicted = [2., 0., 0.]
def test_fk():
fk = FKSolver(components)
assert all(fk.solve([0., 0.]) == predicted)
as... | from tinyik import Link, Joint, FKSolver
from .utils import x, y, z, theta, approx_eq
def test_forward_kinematics():
fk = FKSolver([
Joint('z'), Link([1., 0., 0.]), Joint('y'), Link([1., 0., 0.])
])
assert all(fk.solve([0., 0.]) == [2., 0., 0.])
assert approx_eq(fk.solve([theta, theta]), [x,... | <commit_before>from tinyik import Link, Joint, FKSolver
from .utils import x, y, z, theta, approx_eq
def test_forward_kinematics():
fk = FKSolver([
Joint('z'), Link([1., 0., 0.]), Joint('y'), Link([1., 0., 0.])
])
assert all(fk.solve([0., 0.]) == [2., 0., 0.])
assert approx_eq(fk.solve([thet... |
2f63f134d2c9aa67044eb176a3f81857279f107d | troposphere/utils.py | troposphere/utils.py | import time
def get_events(conn, stackname):
"""Get the events in batches and return in chronological order"""
next = None
event_list = []
while 1:
events = conn.describe_stack_events(stackname, next)
event_list.append(events)
if events.next_token is None:
break
... | import time
def _tail_print(e):
print("%s %s %s" % (e.resource_status, e.resource_type, e.event_id))
def get_events(conn, stackname):
"""Get the events in batches and return in chronological order"""
next = None
event_list = []
while 1:
events = conn.describe_stack_events(stackname, next... | Support a custom logging function and sleep time within tail | Support a custom logging function and sleep time within tail
| Python | bsd-2-clause | mhahn/troposphere | import time
def get_events(conn, stackname):
"""Get the events in batches and return in chronological order"""
next = None
event_list = []
while 1:
events = conn.describe_stack_events(stackname, next)
event_list.append(events)
if events.next_token is None:
break
... | import time
def _tail_print(e):
print("%s %s %s" % (e.resource_status, e.resource_type, e.event_id))
def get_events(conn, stackname):
"""Get the events in batches and return in chronological order"""
next = None
event_list = []
while 1:
events = conn.describe_stack_events(stackname, next... | <commit_before>import time
def get_events(conn, stackname):
"""Get the events in batches and return in chronological order"""
next = None
event_list = []
while 1:
events = conn.describe_stack_events(stackname, next)
event_list.append(events)
if events.next_token is None:
... | import time
def _tail_print(e):
print("%s %s %s" % (e.resource_status, e.resource_type, e.event_id))
def get_events(conn, stackname):
"""Get the events in batches and return in chronological order"""
next = None
event_list = []
while 1:
events = conn.describe_stack_events(stackname, next... | import time
def get_events(conn, stackname):
"""Get the events in batches and return in chronological order"""
next = None
event_list = []
while 1:
events = conn.describe_stack_events(stackname, next)
event_list.append(events)
if events.next_token is None:
break
... | <commit_before>import time
def get_events(conn, stackname):
"""Get the events in batches and return in chronological order"""
next = None
event_list = []
while 1:
events = conn.describe_stack_events(stackname, next)
event_list.append(events)
if events.next_token is None:
... |
35594a4f8c549d507c7d7030141ae511aed57c09 | workflowmax/__init__.py | workflowmax/__init__.py | from .api import WorkflowMax # noqa
__version__ = "0.1.0"
| from .api import WorkflowMax # noqa
from .credentials import Credentials # noqa
__version__ = "0.1.0"
| Add Credentials to root namespace | Add Credentials to root namespace
| Python | bsd-3-clause | ABASystems/pyworkflowmax | from .api import WorkflowMax # noqa
__version__ = "0.1.0"
Add Credentials to root namespace | from .api import WorkflowMax # noqa
from .credentials import Credentials # noqa
__version__ = "0.1.0"
| <commit_before>from .api import WorkflowMax # noqa
__version__ = "0.1.0"
<commit_msg>Add Credentials to root namespace<commit_after> | from .api import WorkflowMax # noqa
from .credentials import Credentials # noqa
__version__ = "0.1.0"
| from .api import WorkflowMax # noqa
__version__ = "0.1.0"
Add Credentials to root namespacefrom .api import WorkflowMax # noqa
from .credentials import Credentials # noqa
__version__ = "0.1.0"
| <commit_before>from .api import WorkflowMax # noqa
__version__ = "0.1.0"
<commit_msg>Add Credentials to root namespace<commit_after>from .api import WorkflowMax # noqa
from .credentials import Credentials # noqa
__version__ = "0.1.0"
|
ab5aac0c9b0e075901c4cd8dd5d134e79f0e0110 | brasileirao/spiders/results_spider.py | brasileirao/spiders/results_spider.py | import scrapy
import scrapy.selector
from brasileirao.items import BrasileiraoItem
import hashlib
class ResultsSpider(scrapy.Spider):
name = "results"
start_urls = [
'https://esporte.uol.com.br/futebol/campeonatos/brasileirao/jogos/',
]
def parse(self, response):
actual_round = 0
... | # -*- coding: utf-8 -*-
import scrapy
import scrapy.selector
from brasileirao.items import BrasileiraoItem
import hashlib
class ResultsSpider(scrapy.Spider):
name = "results"
start_urls = [
'https://esporte.uol.com.br/futebol/campeonatos/brasileirao/jogos/',
]
def parse(self, response):
... | Set utf-8 as default encoding. | Set utf-8 as default encoding.
| Python | mit | pghilardi/live-football-client | import scrapy
import scrapy.selector
from brasileirao.items import BrasileiraoItem
import hashlib
class ResultsSpider(scrapy.Spider):
name = "results"
start_urls = [
'https://esporte.uol.com.br/futebol/campeonatos/brasileirao/jogos/',
]
def parse(self, response):
actual_round = 0
... | # -*- coding: utf-8 -*-
import scrapy
import scrapy.selector
from brasileirao.items import BrasileiraoItem
import hashlib
class ResultsSpider(scrapy.Spider):
name = "results"
start_urls = [
'https://esporte.uol.com.br/futebol/campeonatos/brasileirao/jogos/',
]
def parse(self, response):
... | <commit_before>import scrapy
import scrapy.selector
from brasileirao.items import BrasileiraoItem
import hashlib
class ResultsSpider(scrapy.Spider):
name = "results"
start_urls = [
'https://esporte.uol.com.br/futebol/campeonatos/brasileirao/jogos/',
]
def parse(self, response):
actua... | # -*- coding: utf-8 -*-
import scrapy
import scrapy.selector
from brasileirao.items import BrasileiraoItem
import hashlib
class ResultsSpider(scrapy.Spider):
name = "results"
start_urls = [
'https://esporte.uol.com.br/futebol/campeonatos/brasileirao/jogos/',
]
def parse(self, response):
... | import scrapy
import scrapy.selector
from brasileirao.items import BrasileiraoItem
import hashlib
class ResultsSpider(scrapy.Spider):
name = "results"
start_urls = [
'https://esporte.uol.com.br/futebol/campeonatos/brasileirao/jogos/',
]
def parse(self, response):
actual_round = 0
... | <commit_before>import scrapy
import scrapy.selector
from brasileirao.items import BrasileiraoItem
import hashlib
class ResultsSpider(scrapy.Spider):
name = "results"
start_urls = [
'https://esporte.uol.com.br/futebol/campeonatos/brasileirao/jogos/',
]
def parse(self, response):
actua... |
a3c1822dd2942de4b6bf5cac14039e6789babf85 | wafer/pages/admin.py | wafer/pages/admin.py | from django.contrib import admin
from wafer.pages.models import File, Page
class PageAdmin(admin.ModelAdmin):
prepopulated_fields = {"slug": ("name",)}
list_display = ('name', 'slug', 'get_people_display_names', 'get_in_schedule')
admin.site.register(Page, PageAdmin)
admin.site.register(File)
| from django.contrib import admin
from wafer.pages.models import File, Page
from reversion.admin import VersionAdmin
class PageAdmin(VersionAdmin, admin.ModelAdmin):
prepopulated_fields = {"slug": ("name",)}
list_display = ('name', 'slug', 'get_people_display_names', 'get_in_schedule')
admin.site.register(... | Add reversion support to Pages | Add reversion support to Pages
| Python | isc | CTPUG/wafer,CTPUG/wafer,CTPUG/wafer,CTPUG/wafer | from django.contrib import admin
from wafer.pages.models import File, Page
class PageAdmin(admin.ModelAdmin):
prepopulated_fields = {"slug": ("name",)}
list_display = ('name', 'slug', 'get_people_display_names', 'get_in_schedule')
admin.site.register(Page, PageAdmin)
admin.site.register(File)
Add reversion... | from django.contrib import admin
from wafer.pages.models import File, Page
from reversion.admin import VersionAdmin
class PageAdmin(VersionAdmin, admin.ModelAdmin):
prepopulated_fields = {"slug": ("name",)}
list_display = ('name', 'slug', 'get_people_display_names', 'get_in_schedule')
admin.site.register(... | <commit_before>from django.contrib import admin
from wafer.pages.models import File, Page
class PageAdmin(admin.ModelAdmin):
prepopulated_fields = {"slug": ("name",)}
list_display = ('name', 'slug', 'get_people_display_names', 'get_in_schedule')
admin.site.register(Page, PageAdmin)
admin.site.register(File... | from django.contrib import admin
from wafer.pages.models import File, Page
from reversion.admin import VersionAdmin
class PageAdmin(VersionAdmin, admin.ModelAdmin):
prepopulated_fields = {"slug": ("name",)}
list_display = ('name', 'slug', 'get_people_display_names', 'get_in_schedule')
admin.site.register(... | from django.contrib import admin
from wafer.pages.models import File, Page
class PageAdmin(admin.ModelAdmin):
prepopulated_fields = {"slug": ("name",)}
list_display = ('name', 'slug', 'get_people_display_names', 'get_in_schedule')
admin.site.register(Page, PageAdmin)
admin.site.register(File)
Add reversion... | <commit_before>from django.contrib import admin
from wafer.pages.models import File, Page
class PageAdmin(admin.ModelAdmin):
prepopulated_fields = {"slug": ("name",)}
list_display = ('name', 'slug', 'get_people_display_names', 'get_in_schedule')
admin.site.register(Page, PageAdmin)
admin.site.register(File... |
d30605d82d5f04e8478c785f1bb5086066e50878 | awx/wsgi.py | awx/wsgi.py | # Copyright (c) 2015 Ansible, Inc.
# All Rights Reserved.
import logging
from django.core.wsgi import get_wsgi_application
from awx import prepare_env
from awx import __version__ as tower_version
"""
WSGI config for AWX project.
It exposes the WSGI callable as a module-level variable named ``application``.
For more... | # Copyright (c) 2015 Ansible, Inc.
# All Rights Reserved.
import logging
from awx import __version__ as tower_version
# Prepare the AWX environment.
from awx import prepare_env
prepare_env()
from django.core.wsgi import get_wsgi_application
"""
WSGI config for AWX project.
It exposes the WSGI callable as a module-... | Fix import error by calling prepare_env first | Fix import error by calling prepare_env first
| Python | apache-2.0 | wwitzel3/awx,snahelou/awx,snahelou/awx,snahelou/awx,wwitzel3/awx,wwitzel3/awx,snahelou/awx,wwitzel3/awx | # Copyright (c) 2015 Ansible, Inc.
# All Rights Reserved.
import logging
from django.core.wsgi import get_wsgi_application
from awx import prepare_env
from awx import __version__ as tower_version
"""
WSGI config for AWX project.
It exposes the WSGI callable as a module-level variable named ``application``.
For more... | # Copyright (c) 2015 Ansible, Inc.
# All Rights Reserved.
import logging
from awx import __version__ as tower_version
# Prepare the AWX environment.
from awx import prepare_env
prepare_env()
from django.core.wsgi import get_wsgi_application
"""
WSGI config for AWX project.
It exposes the WSGI callable as a module-... | <commit_before># Copyright (c) 2015 Ansible, Inc.
# All Rights Reserved.
import logging
from django.core.wsgi import get_wsgi_application
from awx import prepare_env
from awx import __version__ as tower_version
"""
WSGI config for AWX project.
It exposes the WSGI callable as a module-level variable named ``applicati... | # Copyright (c) 2015 Ansible, Inc.
# All Rights Reserved.
import logging
from awx import __version__ as tower_version
# Prepare the AWX environment.
from awx import prepare_env
prepare_env()
from django.core.wsgi import get_wsgi_application
"""
WSGI config for AWX project.
It exposes the WSGI callable as a module-... | # Copyright (c) 2015 Ansible, Inc.
# All Rights Reserved.
import logging
from django.core.wsgi import get_wsgi_application
from awx import prepare_env
from awx import __version__ as tower_version
"""
WSGI config for AWX project.
It exposes the WSGI callable as a module-level variable named ``application``.
For more... | <commit_before># Copyright (c) 2015 Ansible, Inc.
# All Rights Reserved.
import logging
from django.core.wsgi import get_wsgi_application
from awx import prepare_env
from awx import __version__ as tower_version
"""
WSGI config for AWX project.
It exposes the WSGI callable as a module-level variable named ``applicati... |
4076fb322814848d802d1f925d163e90b3d629a9 | selenium_testcase/testcases/forms.py | selenium_testcase/testcases/forms.py | # -*- coding: utf-8 -*-
from __future__ import absolute_import
from selenium.webdriver.common.by import By
from .utils import wait_for
class FormTestMixin:
# default search element
form_search_list = (
(By.ID, '{}',),
(By.NAME, '{}',),
(By.XPATH, '//form[@action="{}"]',),
(... | # -*- coding: utf-8 -*-
from __future__ import absolute_import
from selenium.webdriver.common.by import By
from .utils import wait_for
class FormTestMixin:
# default search element
form_search_list = (
(By.ID, '{}',),
(By.NAME, '{}',),
(By.XPATH, '//form[@action="{}"]',),
(... | Split get_input from set_input in FormTestMixin. | Split get_input from set_input in FormTestMixin.
In order to reduce side-effects, this commit moves the @wait_for to
a get_input method and set_input operates immediately.
| Python | bsd-3-clause | nimbis/django-selenium-testcase,nimbis/django-selenium-testcase | # -*- coding: utf-8 -*-
from __future__ import absolute_import
from selenium.webdriver.common.by import By
from .utils import wait_for
class FormTestMixin:
# default search element
form_search_list = (
(By.ID, '{}',),
(By.NAME, '{}',),
(By.XPATH, '//form[@action="{}"]',),
(... | # -*- coding: utf-8 -*-
from __future__ import absolute_import
from selenium.webdriver.common.by import By
from .utils import wait_for
class FormTestMixin:
# default search element
form_search_list = (
(By.ID, '{}',),
(By.NAME, '{}',),
(By.XPATH, '//form[@action="{}"]',),
(... | <commit_before># -*- coding: utf-8 -*-
from __future__ import absolute_import
from selenium.webdriver.common.by import By
from .utils import wait_for
class FormTestMixin:
# default search element
form_search_list = (
(By.ID, '{}',),
(By.NAME, '{}',),
(By.XPATH, '//form[@action="{}"... | # -*- coding: utf-8 -*-
from __future__ import absolute_import
from selenium.webdriver.common.by import By
from .utils import wait_for
class FormTestMixin:
# default search element
form_search_list = (
(By.ID, '{}',),
(By.NAME, '{}',),
(By.XPATH, '//form[@action="{}"]',),
(... | # -*- coding: utf-8 -*-
from __future__ import absolute_import
from selenium.webdriver.common.by import By
from .utils import wait_for
class FormTestMixin:
# default search element
form_search_list = (
(By.ID, '{}',),
(By.NAME, '{}',),
(By.XPATH, '//form[@action="{}"]',),
(... | <commit_before># -*- coding: utf-8 -*-
from __future__ import absolute_import
from selenium.webdriver.common.by import By
from .utils import wait_for
class FormTestMixin:
# default search element
form_search_list = (
(By.ID, '{}',),
(By.NAME, '{}',),
(By.XPATH, '//form[@action="{}"... |
149a8091333766068cac445db770ea73055d8647 | simuvex/procedures/stubs/UserHook.py | simuvex/procedures/stubs/UserHook.py | import simuvex
class UserHook(simuvex.SimProcedure):
NO_RET = True
# pylint: disable=arguments-differ
def run(self, user_func=None, user_kwargs=None, default_return_addr=None):
result = user_func(self.state, **user_kwargs)
if result is None:
self.add_successor(self.state, defau... | import simuvex
class UserHook(simuvex.SimProcedure):
NO_RET = True
# pylint: disable=arguments-differ
def run(self, user_func=None, user_kwargs=None, default_return_addr=None, length=None):
result = user_func(self.state, **user_kwargs)
if result is None:
self.add_successor(self... | Make the userhook take the length arg b/c why not | Make the userhook take the length arg b/c why not
| Python | bsd-2-clause | axt/angr,schieb/angr,tyb0807/angr,chubbymaggie/angr,chubbymaggie/simuvex,chubbymaggie/angr,chubbymaggie/simuvex,f-prettyland/angr,axt/angr,angr/angr,f-prettyland/angr,tyb0807/angr,schieb/angr,axt/angr,chubbymaggie/angr,f-prettyland/angr,iamahuman/angr,tyb0807/angr,iamahuman/angr,angr/angr,iamahuman/angr,angr/angr,schie... | import simuvex
class UserHook(simuvex.SimProcedure):
NO_RET = True
# pylint: disable=arguments-differ
def run(self, user_func=None, user_kwargs=None, default_return_addr=None):
result = user_func(self.state, **user_kwargs)
if result is None:
self.add_successor(self.state, defau... | import simuvex
class UserHook(simuvex.SimProcedure):
NO_RET = True
# pylint: disable=arguments-differ
def run(self, user_func=None, user_kwargs=None, default_return_addr=None, length=None):
result = user_func(self.state, **user_kwargs)
if result is None:
self.add_successor(self... | <commit_before>import simuvex
class UserHook(simuvex.SimProcedure):
NO_RET = True
# pylint: disable=arguments-differ
def run(self, user_func=None, user_kwargs=None, default_return_addr=None):
result = user_func(self.state, **user_kwargs)
if result is None:
self.add_successor(se... | import simuvex
class UserHook(simuvex.SimProcedure):
NO_RET = True
# pylint: disable=arguments-differ
def run(self, user_func=None, user_kwargs=None, default_return_addr=None, length=None):
result = user_func(self.state, **user_kwargs)
if result is None:
self.add_successor(self... | import simuvex
class UserHook(simuvex.SimProcedure):
NO_RET = True
# pylint: disable=arguments-differ
def run(self, user_func=None, user_kwargs=None, default_return_addr=None):
result = user_func(self.state, **user_kwargs)
if result is None:
self.add_successor(self.state, defau... | <commit_before>import simuvex
class UserHook(simuvex.SimProcedure):
NO_RET = True
# pylint: disable=arguments-differ
def run(self, user_func=None, user_kwargs=None, default_return_addr=None):
result = user_func(self.state, **user_kwargs)
if result is None:
self.add_successor(se... |
8528beef5d10355af07f641b4987df3cd64a7b0f | sprockets/mixins/metrics/__init__.py | sprockets/mixins/metrics/__init__.py | from .influxdb import InfluxDBMixin
from .statsd import StatsdMixin
version_info = (1, 0, 0)
__version__ = '.'.join(str(v) for v in version_info)
__all__ = ['InfluxDBMixin', 'StatsdMixin']
| try:
from .influxdb import InfluxDBMixin
from .statsd import StatsdMixin
except ImportError as error:
def InfluxDBMixin(*args, **kwargs):
raise error
def StatsdMixin(*args, **kwargs):
raise error
version_info = (1, 0, 0)
__version__ = '.'.join(str(v) for v in version_info)
__all__ = ['... | Make it safe to import __version__. | Make it safe to import __version__.
| Python | bsd-3-clause | sprockets/sprockets.mixins.metrics | from .influxdb import InfluxDBMixin
from .statsd import StatsdMixin
version_info = (1, 0, 0)
__version__ = '.'.join(str(v) for v in version_info)
__all__ = ['InfluxDBMixin', 'StatsdMixin']
Make it safe to import __version__. | try:
from .influxdb import InfluxDBMixin
from .statsd import StatsdMixin
except ImportError as error:
def InfluxDBMixin(*args, **kwargs):
raise error
def StatsdMixin(*args, **kwargs):
raise error
version_info = (1, 0, 0)
__version__ = '.'.join(str(v) for v in version_info)
__all__ = ['... | <commit_before>from .influxdb import InfluxDBMixin
from .statsd import StatsdMixin
version_info = (1, 0, 0)
__version__ = '.'.join(str(v) for v in version_info)
__all__ = ['InfluxDBMixin', 'StatsdMixin']
<commit_msg>Make it safe to import __version__.<commit_after> | try:
from .influxdb import InfluxDBMixin
from .statsd import StatsdMixin
except ImportError as error:
def InfluxDBMixin(*args, **kwargs):
raise error
def StatsdMixin(*args, **kwargs):
raise error
version_info = (1, 0, 0)
__version__ = '.'.join(str(v) for v in version_info)
__all__ = ['... | from .influxdb import InfluxDBMixin
from .statsd import StatsdMixin
version_info = (1, 0, 0)
__version__ = '.'.join(str(v) for v in version_info)
__all__ = ['InfluxDBMixin', 'StatsdMixin']
Make it safe to import __version__.try:
from .influxdb import InfluxDBMixin
from .statsd import StatsdMixin
except ImportE... | <commit_before>from .influxdb import InfluxDBMixin
from .statsd import StatsdMixin
version_info = (1, 0, 0)
__version__ = '.'.join(str(v) for v in version_info)
__all__ = ['InfluxDBMixin', 'StatsdMixin']
<commit_msg>Make it safe to import __version__.<commit_after>try:
from .influxdb import InfluxDBMixin
from ... |
afa6687c317191b77949ba246f3dcc0909c435f5 | organizer/urls/tag.py | organizer/urls/tag.py | from django.conf.urls import url
from ..models import Tag
from ..utils import DetailView
from ..views import (
TagCreate, TagDelete, TagList, TagPageList,
TagUpdate)
urlpatterns = [
url(r'^$',
TagList.as_view(),
name='organizer_tag_list'),
url(r'^create/$',
TagCreate.as_view(),... | from django.conf.urls import url
from ..views import (
TagCreate, TagDelete, TagDetail, TagList,
TagPageList, TagUpdate)
urlpatterns = [
url(r'^$',
TagList.as_view(),
name='organizer_tag_list'),
url(r'^create/$',
TagCreate.as_view(),
name='organizer_tag_create'),
ur... | Revert to Tag Detail URL pattern. | Ch17: Revert to Tag Detail URL pattern.
| Python | bsd-2-clause | jambonrose/DjangoUnleashed-1.8,jambonrose/DjangoUnleashed-1.8 | from django.conf.urls import url
from ..models import Tag
from ..utils import DetailView
from ..views import (
TagCreate, TagDelete, TagList, TagPageList,
TagUpdate)
urlpatterns = [
url(r'^$',
TagList.as_view(),
name='organizer_tag_list'),
url(r'^create/$',
TagCreate.as_view(),... | from django.conf.urls import url
from ..views import (
TagCreate, TagDelete, TagDetail, TagList,
TagPageList, TagUpdate)
urlpatterns = [
url(r'^$',
TagList.as_view(),
name='organizer_tag_list'),
url(r'^create/$',
TagCreate.as_view(),
name='organizer_tag_create'),
ur... | <commit_before>from django.conf.urls import url
from ..models import Tag
from ..utils import DetailView
from ..views import (
TagCreate, TagDelete, TagList, TagPageList,
TagUpdate)
urlpatterns = [
url(r'^$',
TagList.as_view(),
name='organizer_tag_list'),
url(r'^create/$',
TagCr... | from django.conf.urls import url
from ..views import (
TagCreate, TagDelete, TagDetail, TagList,
TagPageList, TagUpdate)
urlpatterns = [
url(r'^$',
TagList.as_view(),
name='organizer_tag_list'),
url(r'^create/$',
TagCreate.as_view(),
name='organizer_tag_create'),
ur... | from django.conf.urls import url
from ..models import Tag
from ..utils import DetailView
from ..views import (
TagCreate, TagDelete, TagList, TagPageList,
TagUpdate)
urlpatterns = [
url(r'^$',
TagList.as_view(),
name='organizer_tag_list'),
url(r'^create/$',
TagCreate.as_view(),... | <commit_before>from django.conf.urls import url
from ..models import Tag
from ..utils import DetailView
from ..views import (
TagCreate, TagDelete, TagList, TagPageList,
TagUpdate)
urlpatterns = [
url(r'^$',
TagList.as_view(),
name='organizer_tag_list'),
url(r'^create/$',
TagCr... |
7b1d520278b8fe33b68103d26f9aa7bb945f6791 | cryptography/hazmat/backends/__init__.py | cryptography/hazmat/backends/__init__.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 the... | # 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 the... | Make the default backend be a multi-backend | Make the default backend be a multi-backend
| Python | bsd-3-clause | bwhmather/cryptography,Ayrx/cryptography,bwhmather/cryptography,Lukasa/cryptography,Ayrx/cryptography,bwhmather/cryptography,kimvais/cryptography,skeuomorf/cryptography,dstufft/cryptography,kimvais/cryptography,Lukasa/cryptography,dstufft/cryptography,Ayrx/cryptography,skeuomorf/cryptography,Lukasa/cryptography,sholsap... | # 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 the... | # 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 the... | <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
# distri... | # 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 the... | # 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 the... | <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
# distri... |
0f3b413b269f8b95b6f8073ba39d11f156ae632c | zwebtest.py | zwebtest.py | """ Multicast DNS Service Discovery for Python, v0.14-wmcbrine
Copyright 2003 Paul Scott-Murphy, 2014 William McBrine
This module provides a unit test suite for the Multicast DNS
Service Discovery for Python module.
This library is free software; you can redistribute it and/or
modify it under the ... | from zeroconf import *
import socket
desc = {'path': '/~paulsm/'}
info = ServiceInfo("_http._tcp.local.",
"Paul's Test Web Site._http._tcp.local.",
socket.inet_aton("10.0.1.2"), 80, 0, 0,
desc, "ash-2.local.")
r = Zeroconf()
print "Registration of a service...... | Allow graceful exit from announcement test. | Allow graceful exit from announcement test.
| Python | lgpl-2.1 | basilfx/python-zeroconf,daid/python-zeroconf,jstasiak/python-zeroconf,gbiddison/python-zeroconf,giupo/python-zeroconf,AndreaCensi/python-zeroconf,nameoftherose/python-zeroconf,balloob/python-zeroconf,wmcbrine/pyzeroconf,decabyte/python-zeroconf,jantman/python-zeroconf | """ Multicast DNS Service Discovery for Python, v0.14-wmcbrine
Copyright 2003 Paul Scott-Murphy, 2014 William McBrine
This module provides a unit test suite for the Multicast DNS
Service Discovery for Python module.
This library is free software; you can redistribute it and/or
modify it under the ... | from zeroconf import *
import socket
desc = {'path': '/~paulsm/'}
info = ServiceInfo("_http._tcp.local.",
"Paul's Test Web Site._http._tcp.local.",
socket.inet_aton("10.0.1.2"), 80, 0, 0,
desc, "ash-2.local.")
r = Zeroconf()
print "Registration of a service...... | <commit_before>""" Multicast DNS Service Discovery for Python, v0.14-wmcbrine
Copyright 2003 Paul Scott-Murphy, 2014 William McBrine
This module provides a unit test suite for the Multicast DNS
Service Discovery for Python module.
This library is free software; you can redistribute it and/or
modif... | from zeroconf import *
import socket
desc = {'path': '/~paulsm/'}
info = ServiceInfo("_http._tcp.local.",
"Paul's Test Web Site._http._tcp.local.",
socket.inet_aton("10.0.1.2"), 80, 0, 0,
desc, "ash-2.local.")
r = Zeroconf()
print "Registration of a service...... | """ Multicast DNS Service Discovery for Python, v0.14-wmcbrine
Copyright 2003 Paul Scott-Murphy, 2014 William McBrine
This module provides a unit test suite for the Multicast DNS
Service Discovery for Python module.
This library is free software; you can redistribute it and/or
modify it under the ... | <commit_before>""" Multicast DNS Service Discovery for Python, v0.14-wmcbrine
Copyright 2003 Paul Scott-Murphy, 2014 William McBrine
This module provides a unit test suite for the Multicast DNS
Service Discovery for Python module.
This library is free software; you can redistribute it and/or
modif... |
5957999c52f939691cbe6b8dd5aa929980a24501 | tests/unit/test_start.py | tests/unit/test_start.py | import pytest
from iwant_bot import start
def test_add():
assert start.add_numbers(0, 0) == 0
assert start.add_numbers(1, 1) == 2
| from iwant_bot import start
def test_add():
assert start.add_numbers(0, 0) == 0
assert start.add_numbers(1, 1) == 2
| Remove the unused pytest import | Remove the unused pytest import
| Python | mit | kiwicom/iwant-bot | import pytest
from iwant_bot import start
def test_add():
assert start.add_numbers(0, 0) == 0
assert start.add_numbers(1, 1) == 2
Remove the unused pytest import | from iwant_bot import start
def test_add():
assert start.add_numbers(0, 0) == 0
assert start.add_numbers(1, 1) == 2
| <commit_before>import pytest
from iwant_bot import start
def test_add():
assert start.add_numbers(0, 0) == 0
assert start.add_numbers(1, 1) == 2
<commit_msg>Remove the unused pytest import<commit_after> | from iwant_bot import start
def test_add():
assert start.add_numbers(0, 0) == 0
assert start.add_numbers(1, 1) == 2
| import pytest
from iwant_bot import start
def test_add():
assert start.add_numbers(0, 0) == 0
assert start.add_numbers(1, 1) == 2
Remove the unused pytest importfrom iwant_bot import start
def test_add():
assert start.add_numbers(0, 0) == 0
assert start.add_numbers(1, 1) == 2
| <commit_before>import pytest
from iwant_bot import start
def test_add():
assert start.add_numbers(0, 0) == 0
assert start.add_numbers(1, 1) == 2
<commit_msg>Remove the unused pytest import<commit_after>from iwant_bot import start
def test_add():
assert start.add_numbers(0, 0) == 0
assert start.add... |
f5d4da9fa71dbb59a9459e376fde8840037bf39a | account_banking_sepa_credit_transfer/__init__.py | account_banking_sepa_credit_transfer/__init__.py | # -*- encoding: utf-8 -*-
##############################################################################
#
# SEPA Credit Transfer module for OpenERP
# Copyright (C) 2010-2013 Akretion (http://www.akretion.com)
# @author: Alexis de Lattre <alexis.delattre@akretion.com>
#
# This program is free software: you ... | # -*- encoding: utf-8 -*-
##############################################################################
#
# SEPA Credit Transfer module for OpenERP
# Copyright (C) 2010-2013 Akretion (http://www.akretion.com)
# @author: Alexis de Lattre <alexis.delattre@akretion.com>
#
# This program is free software: you ... | Remove import models from init in sepa_credit_transfer | Remove import models from init in sepa_credit_transfer
| Python | agpl-3.0 | open-synergy/bank-payment,sergio-incaser/bank-payment,hbrunn/bank-payment,sergio-teruel/bank-payment,ndtran/bank-payment,David-Amaro/bank-payment,rlizana/bank-payment,sergiocorato/bank-payment,damdam-s/bank-payment,CompassionCH/bank-payment,CompassionCH/bank-payment,incaser/bank-payment,Antiun/bank-payment,sergio-terue... | # -*- encoding: utf-8 -*-
##############################################################################
#
# SEPA Credit Transfer module for OpenERP
# Copyright (C) 2010-2013 Akretion (http://www.akretion.com)
# @author: Alexis de Lattre <alexis.delattre@akretion.com>
#
# This program is free software: you ... | # -*- encoding: utf-8 -*-
##############################################################################
#
# SEPA Credit Transfer module for OpenERP
# Copyright (C) 2010-2013 Akretion (http://www.akretion.com)
# @author: Alexis de Lattre <alexis.delattre@akretion.com>
#
# This program is free software: you ... | <commit_before># -*- encoding: utf-8 -*-
##############################################################################
#
# SEPA Credit Transfer module for OpenERP
# Copyright (C) 2010-2013 Akretion (http://www.akretion.com)
# @author: Alexis de Lattre <alexis.delattre@akretion.com>
#
# This program is free... | # -*- encoding: utf-8 -*-
##############################################################################
#
# SEPA Credit Transfer module for OpenERP
# Copyright (C) 2010-2013 Akretion (http://www.akretion.com)
# @author: Alexis de Lattre <alexis.delattre@akretion.com>
#
# This program is free software: you ... | # -*- encoding: utf-8 -*-
##############################################################################
#
# SEPA Credit Transfer module for OpenERP
# Copyright (C) 2010-2013 Akretion (http://www.akretion.com)
# @author: Alexis de Lattre <alexis.delattre@akretion.com>
#
# This program is free software: you ... | <commit_before># -*- encoding: utf-8 -*-
##############################################################################
#
# SEPA Credit Transfer module for OpenERP
# Copyright (C) 2010-2013 Akretion (http://www.akretion.com)
# @author: Alexis de Lattre <alexis.delattre@akretion.com>
#
# This program is free... |
f1a1272bebcc4edf9063c75d3fe29fdcb9e277eb | rml/unitconversion.py | rml/unitconversion.py | import numpy as np
class UnitConversion():
def __init__(self, coef):
self.p = np.poly1d(coef)
def machine_to_physics(self, machine_value):
return self.p(machine_value)
def physics_to_machine(self, physics_value):
roots = (self.p - physics_value).roots
positive_roots = [ro... | import numpy as np
from scipy.interpolate import PchipInterpolator
class UnitConversion():
def __init__(self, coef):
self.p = np.poly1d(coef)
def machine_to_physics(self, machine_value):
return self.p(machine_value)
def physics_to_machine(self, physics_value):
roots = (self.p - p... | Add PPChipInterpolator unit conversion class | Add PPChipInterpolator unit conversion class
| Python | apache-2.0 | willrogers/pml,razvanvasile/RML,willrogers/pml | import numpy as np
class UnitConversion():
def __init__(self, coef):
self.p = np.poly1d(coef)
def machine_to_physics(self, machine_value):
return self.p(machine_value)
def physics_to_machine(self, physics_value):
roots = (self.p - physics_value).roots
positive_roots = [ro... | import numpy as np
from scipy.interpolate import PchipInterpolator
class UnitConversion():
def __init__(self, coef):
self.p = np.poly1d(coef)
def machine_to_physics(self, machine_value):
return self.p(machine_value)
def physics_to_machine(self, physics_value):
roots = (self.p - p... | <commit_before>import numpy as np
class UnitConversion():
def __init__(self, coef):
self.p = np.poly1d(coef)
def machine_to_physics(self, machine_value):
return self.p(machine_value)
def physics_to_machine(self, physics_value):
roots = (self.p - physics_value).roots
posit... | import numpy as np
from scipy.interpolate import PchipInterpolator
class UnitConversion():
def __init__(self, coef):
self.p = np.poly1d(coef)
def machine_to_physics(self, machine_value):
return self.p(machine_value)
def physics_to_machine(self, physics_value):
roots = (self.p - p... | import numpy as np
class UnitConversion():
def __init__(self, coef):
self.p = np.poly1d(coef)
def machine_to_physics(self, machine_value):
return self.p(machine_value)
def physics_to_machine(self, physics_value):
roots = (self.p - physics_value).roots
positive_roots = [ro... | <commit_before>import numpy as np
class UnitConversion():
def __init__(self, coef):
self.p = np.poly1d(coef)
def machine_to_physics(self, machine_value):
return self.p(machine_value)
def physics_to_machine(self, physics_value):
roots = (self.p - physics_value).roots
posit... |
00e4663940ed1d22e768b3de3d1c645c8649aecc | src/WhiteLibrary/keywords/items/textbox.py | src/WhiteLibrary/keywords/items/textbox.py | from TestStack.White.UIItems import TextBox
from WhiteLibrary.keywords.librarycomponent import LibraryComponent
from WhiteLibrary.keywords.robotlibcore import keyword
class TextBoxKeywords(LibraryComponent):
@keyword
def input_text_to_textbox(self, locator, input):
"""
Writes text to a textbox... | from TestStack.White.UIItems import TextBox
from WhiteLibrary.keywords.librarycomponent import LibraryComponent
from WhiteLibrary.keywords.robotlibcore import keyword
class TextBoxKeywords(LibraryComponent):
@keyword
def input_text_to_textbox(self, locator, input_value):
"""
Writes text to a t... | Change to better argument name | Change to better argument name
| Python | apache-2.0 | Omenia/robotframework-whitelibrary,Omenia/robotframework-whitelibrary | from TestStack.White.UIItems import TextBox
from WhiteLibrary.keywords.librarycomponent import LibraryComponent
from WhiteLibrary.keywords.robotlibcore import keyword
class TextBoxKeywords(LibraryComponent):
@keyword
def input_text_to_textbox(self, locator, input):
"""
Writes text to a textbox... | from TestStack.White.UIItems import TextBox
from WhiteLibrary.keywords.librarycomponent import LibraryComponent
from WhiteLibrary.keywords.robotlibcore import keyword
class TextBoxKeywords(LibraryComponent):
@keyword
def input_text_to_textbox(self, locator, input_value):
"""
Writes text to a t... | <commit_before>from TestStack.White.UIItems import TextBox
from WhiteLibrary.keywords.librarycomponent import LibraryComponent
from WhiteLibrary.keywords.robotlibcore import keyword
class TextBoxKeywords(LibraryComponent):
@keyword
def input_text_to_textbox(self, locator, input):
"""
Writes te... | from TestStack.White.UIItems import TextBox
from WhiteLibrary.keywords.librarycomponent import LibraryComponent
from WhiteLibrary.keywords.robotlibcore import keyword
class TextBoxKeywords(LibraryComponent):
@keyword
def input_text_to_textbox(self, locator, input_value):
"""
Writes text to a t... | from TestStack.White.UIItems import TextBox
from WhiteLibrary.keywords.librarycomponent import LibraryComponent
from WhiteLibrary.keywords.robotlibcore import keyword
class TextBoxKeywords(LibraryComponent):
@keyword
def input_text_to_textbox(self, locator, input):
"""
Writes text to a textbox... | <commit_before>from TestStack.White.UIItems import TextBox
from WhiteLibrary.keywords.librarycomponent import LibraryComponent
from WhiteLibrary.keywords.robotlibcore import keyword
class TextBoxKeywords(LibraryComponent):
@keyword
def input_text_to_textbox(self, locator, input):
"""
Writes te... |
23f32962e136dae32b3165f15f8ef7e2d5319530 | linter.py | linter.py | #
# linter.py
# Linter for SublimeLinter3, a code checking framework for Sublime Text 3
#
# regex below borrowed from https://github.com/roadhump/SublimeLinter-eslint
# and is MIT-licensed from roadhump.
#
# Written by andrewdeandrade
# Copyright (c) 2014 andrewdeandrade
#
# License: MIT
#
"""This module exports the... | #
# linter.py
# Linter for SublimeLinter3, a code checking framework for Sublime Text 3
#
# regex below borrowed from https://github.com/roadhump/SublimeLinter-eslint
# and is MIT-licensed from roadhump.
#
# Written by andrewdeandrade
# Copyright (c) 2014 andrewdeandrade
#
# License: MIT
#
"""This module exports the... | Set minimum lint-trap version to 0.4.0 | Set minimum lint-trap version to 0.4.0
| Python | mit | Raynos/SublimeLinter-contrib-lint-trap | #
# linter.py
# Linter for SublimeLinter3, a code checking framework for Sublime Text 3
#
# regex below borrowed from https://github.com/roadhump/SublimeLinter-eslint
# and is MIT-licensed from roadhump.
#
# Written by andrewdeandrade
# Copyright (c) 2014 andrewdeandrade
#
# License: MIT
#
"""This module exports the... | #
# linter.py
# Linter for SublimeLinter3, a code checking framework for Sublime Text 3
#
# regex below borrowed from https://github.com/roadhump/SublimeLinter-eslint
# and is MIT-licensed from roadhump.
#
# Written by andrewdeandrade
# Copyright (c) 2014 andrewdeandrade
#
# License: MIT
#
"""This module exports the... | <commit_before>#
# linter.py
# Linter for SublimeLinter3, a code checking framework for Sublime Text 3
#
# regex below borrowed from https://github.com/roadhump/SublimeLinter-eslint
# and is MIT-licensed from roadhump.
#
# Written by andrewdeandrade
# Copyright (c) 2014 andrewdeandrade
#
# License: MIT
#
"""This mod... | #
# linter.py
# Linter for SublimeLinter3, a code checking framework for Sublime Text 3
#
# regex below borrowed from https://github.com/roadhump/SublimeLinter-eslint
# and is MIT-licensed from roadhump.
#
# Written by andrewdeandrade
# Copyright (c) 2014 andrewdeandrade
#
# License: MIT
#
"""This module exports the... | #
# linter.py
# Linter for SublimeLinter3, a code checking framework for Sublime Text 3
#
# regex below borrowed from https://github.com/roadhump/SublimeLinter-eslint
# and is MIT-licensed from roadhump.
#
# Written by andrewdeandrade
# Copyright (c) 2014 andrewdeandrade
#
# License: MIT
#
"""This module exports the... | <commit_before>#
# linter.py
# Linter for SublimeLinter3, a code checking framework for Sublime Text 3
#
# regex below borrowed from https://github.com/roadhump/SublimeLinter-eslint
# and is MIT-licensed from roadhump.
#
# Written by andrewdeandrade
# Copyright (c) 2014 andrewdeandrade
#
# License: MIT
#
"""This mod... |
5cbae4953ea0bde97b0cf7cd914a3a5263fa74be | manage.py | manage.py | #!/usr/bin/env python
import os
import sys
import re
def read_env():
"""Pulled from Honcho code with minor updates, reads local default
environment variables from a .env file located in the project root
directory.
"""
try:
with open('.env') as f:
content = f.read()
except ... | #!/usr/bin/env python
import os
import sys
import re
def read_env():
"""Pulled from Honcho code with minor updates, reads local default
environment variables from a .env file located in the project root
directory.
"""
try:
with open('.env') as f:
content = f.read()
except ... | Make base module default DJANGO_SETTINGS_MODULE | Make base module default DJANGO_SETTINGS_MODULE | Python | mit | jpadilla/feedleap,jpadilla/feedleap | #!/usr/bin/env python
import os
import sys
import re
def read_env():
"""Pulled from Honcho code with minor updates, reads local default
environment variables from a .env file located in the project root
directory.
"""
try:
with open('.env') as f:
content = f.read()
except ... | #!/usr/bin/env python
import os
import sys
import re
def read_env():
"""Pulled from Honcho code with minor updates, reads local default
environment variables from a .env file located in the project root
directory.
"""
try:
with open('.env') as f:
content = f.read()
except ... | <commit_before>#!/usr/bin/env python
import os
import sys
import re
def read_env():
"""Pulled from Honcho code with minor updates, reads local default
environment variables from a .env file located in the project root
directory.
"""
try:
with open('.env') as f:
content = f.rea... | #!/usr/bin/env python
import os
import sys
import re
def read_env():
"""Pulled from Honcho code with minor updates, reads local default
environment variables from a .env file located in the project root
directory.
"""
try:
with open('.env') as f:
content = f.read()
except ... | #!/usr/bin/env python
import os
import sys
import re
def read_env():
"""Pulled from Honcho code with minor updates, reads local default
environment variables from a .env file located in the project root
directory.
"""
try:
with open('.env') as f:
content = f.read()
except ... | <commit_before>#!/usr/bin/env python
import os
import sys
import re
def read_env():
"""Pulled from Honcho code with minor updates, reads local default
environment variables from a .env file located in the project root
directory.
"""
try:
with open('.env') as f:
content = f.rea... |
39dbbac659e9ae9c1bbad8a979cc99ef6eafaeff | models.py | models.py | #!/usr/bin/env python
import os
from flask import Flask
from flask.ext.sqlalchemy import SQLAlchemy
app = Flask(__name__)
app.config['SQLALCHEMY_DATABASE_URI'] = os.environ.get('DATABASE_URL')
db = SQLAlchemy(app)
class FoodMenu(db.Model):
id = db.Column(db.Integer, primary_key=True)
result = db.Column(db.Text)
d... | #!/usr/bin/env python
import os
from flask import Flask
from flask.ext.sqlalchemy import SQLAlchemy
app = Flask(__name__)
app.config['SQLALCHEMY_DATABASE_URI'] = os.environ.get('DATABASE_URL')
db = SQLAlchemy(app)
class FoodMenu(db.Model):
id = db.Column(db.Integer, primary_key=True)
result = db.Column(db.Text)
d... | Include class name in model representations | Include class name in model representations
| Python | mit | alykhank/FoodMenu,alykhank/FoodMenu,alykhank/FoodMenu | #!/usr/bin/env python
import os
from flask import Flask
from flask.ext.sqlalchemy import SQLAlchemy
app = Flask(__name__)
app.config['SQLALCHEMY_DATABASE_URI'] = os.environ.get('DATABASE_URL')
db = SQLAlchemy(app)
class FoodMenu(db.Model):
id = db.Column(db.Integer, primary_key=True)
result = db.Column(db.Text)
d... | #!/usr/bin/env python
import os
from flask import Flask
from flask.ext.sqlalchemy import SQLAlchemy
app = Flask(__name__)
app.config['SQLALCHEMY_DATABASE_URI'] = os.environ.get('DATABASE_URL')
db = SQLAlchemy(app)
class FoodMenu(db.Model):
id = db.Column(db.Integer, primary_key=True)
result = db.Column(db.Text)
d... | <commit_before>#!/usr/bin/env python
import os
from flask import Flask
from flask.ext.sqlalchemy import SQLAlchemy
app = Flask(__name__)
app.config['SQLALCHEMY_DATABASE_URI'] = os.environ.get('DATABASE_URL')
db = SQLAlchemy(app)
class FoodMenu(db.Model):
id = db.Column(db.Integer, primary_key=True)
result = db.Colu... | #!/usr/bin/env python
import os
from flask import Flask
from flask.ext.sqlalchemy import SQLAlchemy
app = Flask(__name__)
app.config['SQLALCHEMY_DATABASE_URI'] = os.environ.get('DATABASE_URL')
db = SQLAlchemy(app)
class FoodMenu(db.Model):
id = db.Column(db.Integer, primary_key=True)
result = db.Column(db.Text)
d... | #!/usr/bin/env python
import os
from flask import Flask
from flask.ext.sqlalchemy import SQLAlchemy
app = Flask(__name__)
app.config['SQLALCHEMY_DATABASE_URI'] = os.environ.get('DATABASE_URL')
db = SQLAlchemy(app)
class FoodMenu(db.Model):
id = db.Column(db.Integer, primary_key=True)
result = db.Column(db.Text)
d... | <commit_before>#!/usr/bin/env python
import os
from flask import Flask
from flask.ext.sqlalchemy import SQLAlchemy
app = Flask(__name__)
app.config['SQLALCHEMY_DATABASE_URI'] = os.environ.get('DATABASE_URL')
db = SQLAlchemy(app)
class FoodMenu(db.Model):
id = db.Column(db.Integer, primary_key=True)
result = db.Colu... |
e16c65ec8c774cc27f9f7aa43e88521c3854b6b7 | ella/imports/management/commands/fetchimports.py | ella/imports/management/commands/fetchimports.py | from django.core.management.base import BaseCommand
from optparse import make_option
class Command(BaseCommand):
help = 'Fetch all registered imports'
def handle(self, *test_labels, **options):
from ella.imports.models import fetch_all
fetch_all()
| from django.core.management.base import NoArgsCommand
from optparse import make_option
import sys
class Command(NoArgsCommand):
help = 'Fetch all registered imports'
def handle(self, *test_labels, **options):
from ella.imports.models import fetch_all
errors = fetch_all()
if errors:
... | Return exit code (count of errors) | Return exit code (count of errors)
git-svn-id: 6ce22b13eace8fe533dbb322c2bb0986ea4cd3e6@520 2d143e24-0a30-0410-89d7-a2e95868dc81
| Python | bsd-3-clause | MichalMaM/ella,MichalMaM/ella,WhiskeyMedia/ella,whalerock/ella,ella/ella,whalerock/ella,WhiskeyMedia/ella,petrlosa/ella,petrlosa/ella,whalerock/ella | from django.core.management.base import BaseCommand
from optparse import make_option
class Command(BaseCommand):
help = 'Fetch all registered imports'
def handle(self, *test_labels, **options):
from ella.imports.models import fetch_all
fetch_all()
Return exit code (count of errors)
git-svn-id... | from django.core.management.base import NoArgsCommand
from optparse import make_option
import sys
class Command(NoArgsCommand):
help = 'Fetch all registered imports'
def handle(self, *test_labels, **options):
from ella.imports.models import fetch_all
errors = fetch_all()
if errors:
... | <commit_before>from django.core.management.base import BaseCommand
from optparse import make_option
class Command(BaseCommand):
help = 'Fetch all registered imports'
def handle(self, *test_labels, **options):
from ella.imports.models import fetch_all
fetch_all()
<commit_msg>Return exit code (co... | from django.core.management.base import NoArgsCommand
from optparse import make_option
import sys
class Command(NoArgsCommand):
help = 'Fetch all registered imports'
def handle(self, *test_labels, **options):
from ella.imports.models import fetch_all
errors = fetch_all()
if errors:
... | from django.core.management.base import BaseCommand
from optparse import make_option
class Command(BaseCommand):
help = 'Fetch all registered imports'
def handle(self, *test_labels, **options):
from ella.imports.models import fetch_all
fetch_all()
Return exit code (count of errors)
git-svn-id... | <commit_before>from django.core.management.base import BaseCommand
from optparse import make_option
class Command(BaseCommand):
help = 'Fetch all registered imports'
def handle(self, *test_labels, **options):
from ella.imports.models import fetch_all
fetch_all()
<commit_msg>Return exit code (co... |
45c400e02fbeb5b455e27fef81e47e45f274eaec | core/forms.py | core/forms.py |
from django import forms
class GameForm(forms.Form):
amount = forms.IntegerField()
def __init__(self, *args, **kwargs):
super(GameForm, self).__init__(*args, **kwargs)
for name, field in self.fields.items():
if isinstance(field, forms.IntegerField):
self.fields[n... |
from django import forms
class GameForm(forms.Form):
amount = forms.IntegerField(initial=100)
def __init__(self, *args, **kwargs):
super(GameForm, self).__init__(*args, **kwargs)
for name, field in self.fields.items():
if isinstance(field, forms.IntegerField):
se... | Add a default bet amount. | Add a default bet amount.
| Python | bsd-2-clause | stephenmcd/gamblor,stephenmcd/gamblor |
from django import forms
class GameForm(forms.Form):
amount = forms.IntegerField()
def __init__(self, *args, **kwargs):
super(GameForm, self).__init__(*args, **kwargs)
for name, field in self.fields.items():
if isinstance(field, forms.IntegerField):
self.fields[n... |
from django import forms
class GameForm(forms.Form):
amount = forms.IntegerField(initial=100)
def __init__(self, *args, **kwargs):
super(GameForm, self).__init__(*args, **kwargs)
for name, field in self.fields.items():
if isinstance(field, forms.IntegerField):
se... | <commit_before>
from django import forms
class GameForm(forms.Form):
amount = forms.IntegerField()
def __init__(self, *args, **kwargs):
super(GameForm, self).__init__(*args, **kwargs)
for name, field in self.fields.items():
if isinstance(field, forms.IntegerField):
... |
from django import forms
class GameForm(forms.Form):
amount = forms.IntegerField(initial=100)
def __init__(self, *args, **kwargs):
super(GameForm, self).__init__(*args, **kwargs)
for name, field in self.fields.items():
if isinstance(field, forms.IntegerField):
se... |
from django import forms
class GameForm(forms.Form):
amount = forms.IntegerField()
def __init__(self, *args, **kwargs):
super(GameForm, self).__init__(*args, **kwargs)
for name, field in self.fields.items():
if isinstance(field, forms.IntegerField):
self.fields[n... | <commit_before>
from django import forms
class GameForm(forms.Form):
amount = forms.IntegerField()
def __init__(self, *args, **kwargs):
super(GameForm, self).__init__(*args, **kwargs)
for name, field in self.fields.items():
if isinstance(field, forms.IntegerField):
... |
fcc571d2f4c35ac8f0e94e51e6ac94a0c051062d | src/rinoh/__init__.py | src/rinoh/__init__.py | # This file is part of rinohtype, the Python document preparation system.
#
# Copyright (c) Brecht Machiels.
#
# Use of this source code is subject to the terms of the GNU Affero General
# Public License v3. See the LICENSE file or http://www.gnu.org/licenses/.
"""rinohtype
"""
import os
import sys
from importlib ... | # This file is part of rinohtype, the Python document preparation system.
#
# Copyright (c) Brecht Machiels.
#
# Use of this source code is subject to the terms of the GNU Affero General
# Public License v3. See the LICENSE file or http://www.gnu.org/licenses/.
"""rinohtype
"""
import os
import sys
from importlib ... | Update the top-level rinoh package | Update the top-level rinoh package
Make all symbols and modules relevant to users available directly
from the rinoh package.
| Python | agpl-3.0 | brechtm/rinohtype,brechtm/rinohtype,brechtm/rinohtype | # This file is part of rinohtype, the Python document preparation system.
#
# Copyright (c) Brecht Machiels.
#
# Use of this source code is subject to the terms of the GNU Affero General
# Public License v3. See the LICENSE file or http://www.gnu.org/licenses/.
"""rinohtype
"""
import os
import sys
from importlib ... | # This file is part of rinohtype, the Python document preparation system.
#
# Copyright (c) Brecht Machiels.
#
# Use of this source code is subject to the terms of the GNU Affero General
# Public License v3. See the LICENSE file or http://www.gnu.org/licenses/.
"""rinohtype
"""
import os
import sys
from importlib ... | <commit_before># This file is part of rinohtype, the Python document preparation system.
#
# Copyright (c) Brecht Machiels.
#
# Use of this source code is subject to the terms of the GNU Affero General
# Public License v3. See the LICENSE file or http://www.gnu.org/licenses/.
"""rinohtype
"""
import os
import sys
... | # This file is part of rinohtype, the Python document preparation system.
#
# Copyright (c) Brecht Machiels.
#
# Use of this source code is subject to the terms of the GNU Affero General
# Public License v3. See the LICENSE file or http://www.gnu.org/licenses/.
"""rinohtype
"""
import os
import sys
from importlib ... | # This file is part of rinohtype, the Python document preparation system.
#
# Copyright (c) Brecht Machiels.
#
# Use of this source code is subject to the terms of the GNU Affero General
# Public License v3. See the LICENSE file or http://www.gnu.org/licenses/.
"""rinohtype
"""
import os
import sys
from importlib ... | <commit_before># This file is part of rinohtype, the Python document preparation system.
#
# Copyright (c) Brecht Machiels.
#
# Use of this source code is subject to the terms of the GNU Affero General
# Public License v3. See the LICENSE file or http://www.gnu.org/licenses/.
"""rinohtype
"""
import os
import sys
... |
f9293d838a21f495ea9b56cbe0f6f75533360aed | pyinfra/api/config.py | pyinfra/api/config.py | import six
from pyinfra import logger
class Config(object):
'''
The default/base configuration options for a pyinfra deploy.
'''
state = None
# % of hosts which have to fail for all operations to stop
FAIL_PERCENT = None
# Seconds to timeout SSH connections
CONNECT_TIMEOUT = 10
... | import six
class Config(object):
'''
The default/base configuration options for a pyinfra deploy.
'''
state = None
# % of hosts which have to fail for all operations to stop
FAIL_PERCENT = None
# Seconds to timeout SSH connections
CONNECT_TIMEOUT = 10
# Temporary directory (on ... | Remove support for deprecated `Config.TIMEOUT`. | Remove support for deprecated `Config.TIMEOUT`.
| Python | mit | Fizzadar/pyinfra,Fizzadar/pyinfra | import six
from pyinfra import logger
class Config(object):
'''
The default/base configuration options for a pyinfra deploy.
'''
state = None
# % of hosts which have to fail for all operations to stop
FAIL_PERCENT = None
# Seconds to timeout SSH connections
CONNECT_TIMEOUT = 10
... | import six
class Config(object):
'''
The default/base configuration options for a pyinfra deploy.
'''
state = None
# % of hosts which have to fail for all operations to stop
FAIL_PERCENT = None
# Seconds to timeout SSH connections
CONNECT_TIMEOUT = 10
# Temporary directory (on ... | <commit_before>import six
from pyinfra import logger
class Config(object):
'''
The default/base configuration options for a pyinfra deploy.
'''
state = None
# % of hosts which have to fail for all operations to stop
FAIL_PERCENT = None
# Seconds to timeout SSH connections
CONNECT_T... | import six
class Config(object):
'''
The default/base configuration options for a pyinfra deploy.
'''
state = None
# % of hosts which have to fail for all operations to stop
FAIL_PERCENT = None
# Seconds to timeout SSH connections
CONNECT_TIMEOUT = 10
# Temporary directory (on ... | import six
from pyinfra import logger
class Config(object):
'''
The default/base configuration options for a pyinfra deploy.
'''
state = None
# % of hosts which have to fail for all operations to stop
FAIL_PERCENT = None
# Seconds to timeout SSH connections
CONNECT_TIMEOUT = 10
... | <commit_before>import six
from pyinfra import logger
class Config(object):
'''
The default/base configuration options for a pyinfra deploy.
'''
state = None
# % of hosts which have to fail for all operations to stop
FAIL_PERCENT = None
# Seconds to timeout SSH connections
CONNECT_T... |
94596f036270f8958afd84eb9788ce2b15f5cbd4 | registration/admin.py | registration/admin.py | from django.contrib import admin
from registration.models import RegistrationProfile
class RegistrationAdmin(admin.ModelAdmin):
list_display = ('__unicode__', 'activation_key_expired')
search_fields = ('user__username', 'user__first_name')
admin.site.register(RegistrationProfile, RegistrationAdmin)
| from django.contrib import admin
from registration.models import RegistrationProfile
class RegistrationAdmin(admin.ModelAdmin):
list_display = ('__unicode__', 'activation_key_expired')
raw_id_fields = ['user']
search_fields = ('user__username', 'user__first_name')
admin.site.register(RegistrationProfil... | Use raw_id_fields for the relation from RegistrationProfile to User, for sites which have huge numbers of users. | Use raw_id_fields for the relation from RegistrationProfile to User, for sites which have huge numbers of users.
| Python | bsd-3-clause | rafaduran/django-pluggable-registration,rbarrois/django-registration,maraujop/django-registration,thedod/django-registration-hg-mirror,CoatedMoose/django-registration,AndrewLvov/django-registration,AndrewLvov/django-registration,aptivate/django-registration,fedenko/django-registration,CoatedMoose/django-registration,ch... | from django.contrib import admin
from registration.models import RegistrationProfile
class RegistrationAdmin(admin.ModelAdmin):
list_display = ('__unicode__', 'activation_key_expired')
search_fields = ('user__username', 'user__first_name')
admin.site.register(RegistrationProfile, RegistrationAdmin)
Use raw... | from django.contrib import admin
from registration.models import RegistrationProfile
class RegistrationAdmin(admin.ModelAdmin):
list_display = ('__unicode__', 'activation_key_expired')
raw_id_fields = ['user']
search_fields = ('user__username', 'user__first_name')
admin.site.register(RegistrationProfil... | <commit_before>from django.contrib import admin
from registration.models import RegistrationProfile
class RegistrationAdmin(admin.ModelAdmin):
list_display = ('__unicode__', 'activation_key_expired')
search_fields = ('user__username', 'user__first_name')
admin.site.register(RegistrationProfile, Registratio... | from django.contrib import admin
from registration.models import RegistrationProfile
class RegistrationAdmin(admin.ModelAdmin):
list_display = ('__unicode__', 'activation_key_expired')
raw_id_fields = ['user']
search_fields = ('user__username', 'user__first_name')
admin.site.register(RegistrationProfil... | from django.contrib import admin
from registration.models import RegistrationProfile
class RegistrationAdmin(admin.ModelAdmin):
list_display = ('__unicode__', 'activation_key_expired')
search_fields = ('user__username', 'user__first_name')
admin.site.register(RegistrationProfile, RegistrationAdmin)
Use raw... | <commit_before>from django.contrib import admin
from registration.models import RegistrationProfile
class RegistrationAdmin(admin.ModelAdmin):
list_display = ('__unicode__', 'activation_key_expired')
search_fields = ('user__username', 'user__first_name')
admin.site.register(RegistrationProfile, Registratio... |
4765a88535262df6373e4f8d2111032fc290da85 | atest/testdata/parsing/custom-lang.py | atest/testdata/parsing/custom-lang.py | from robot.conf import Language
class Fi(Language):
setting_headers = {'H 1'}
variable_headers = {'H 2'}
test_case_headers = {'H 3'}
task_headers = {'H 4'}
keyword_headers = {'H 5'}
comment_headers = {'H 6'}
library = 'L'
resource = 'R'
variables = 'V'
documentation = 'S 1'
... | from robot.conf import Language
class Custom(Language):
setting_headers = {'H 1'}
variable_headers = {'H 2'}
test_case_headers = {'H 3'}
task_headers = {'H 4'}
keyword_headers = {'H 5'}
comment_headers = {'H 6'}
library = 'L'
resource = 'R'
variables = 'V'
documentation = 'S 1'... | Fix class name in test file | Fix class name in test file
| Python | apache-2.0 | robotframework/robotframework,HelioGuilherme66/robotframework,HelioGuilherme66/robotframework,HelioGuilherme66/robotframework,robotframework/robotframework,robotframework/robotframework | from robot.conf import Language
class Fi(Language):
setting_headers = {'H 1'}
variable_headers = {'H 2'}
test_case_headers = {'H 3'}
task_headers = {'H 4'}
keyword_headers = {'H 5'}
comment_headers = {'H 6'}
library = 'L'
resource = 'R'
variables = 'V'
documentation = 'S 1'
... | from robot.conf import Language
class Custom(Language):
setting_headers = {'H 1'}
variable_headers = {'H 2'}
test_case_headers = {'H 3'}
task_headers = {'H 4'}
keyword_headers = {'H 5'}
comment_headers = {'H 6'}
library = 'L'
resource = 'R'
variables = 'V'
documentation = 'S 1'... | <commit_before>from robot.conf import Language
class Fi(Language):
setting_headers = {'H 1'}
variable_headers = {'H 2'}
test_case_headers = {'H 3'}
task_headers = {'H 4'}
keyword_headers = {'H 5'}
comment_headers = {'H 6'}
library = 'L'
resource = 'R'
variables = 'V'
documentat... | from robot.conf import Language
class Custom(Language):
setting_headers = {'H 1'}
variable_headers = {'H 2'}
test_case_headers = {'H 3'}
task_headers = {'H 4'}
keyword_headers = {'H 5'}
comment_headers = {'H 6'}
library = 'L'
resource = 'R'
variables = 'V'
documentation = 'S 1'... | from robot.conf import Language
class Fi(Language):
setting_headers = {'H 1'}
variable_headers = {'H 2'}
test_case_headers = {'H 3'}
task_headers = {'H 4'}
keyword_headers = {'H 5'}
comment_headers = {'H 6'}
library = 'L'
resource = 'R'
variables = 'V'
documentation = 'S 1'
... | <commit_before>from robot.conf import Language
class Fi(Language):
setting_headers = {'H 1'}
variable_headers = {'H 2'}
test_case_headers = {'H 3'}
task_headers = {'H 4'}
keyword_headers = {'H 5'}
comment_headers = {'H 6'}
library = 'L'
resource = 'R'
variables = 'V'
documentat... |
22f3d6d6fdc3e5f07ead782828b406c9a27d0199 | UDPSender.py | UDPSender.py | from can import Listener
import socket
class UDPSender(Listener):
dataConvert = {"0x600": {"String":"RPM:",
"Slot":0,
"Conversion":1},
"0x601": {"String":"OIL:",
"Slot":2,
"Convers... | from can import Listener
from socket import socket
class UDPSender(Listener):
dataConvert = {"0x600": {"String":"RPM:",
"Slot":0,
"Conversion":1},
"0x601": {"String":"OIL:",
"Slot":2,
... | Change of import of libraries. | Change of import of libraries.
Tried to fix issue displayed below.
[root@alarm BeagleDash]# python3.3 CANtoUDP.py
Traceback (most recent call last):
File "CANtoUDP.py", line 10, in <module>
listeners = [csv, UDPSender()]
TypeError: 'module' object is not callable
Exception AttributeError: "'super' object has no attri... | Python | mit | TAURacing/BeagleDash | from can import Listener
import socket
class UDPSender(Listener):
dataConvert = {"0x600": {"String":"RPM:",
"Slot":0,
"Conversion":1},
"0x601": {"String":"OIL:",
"Slot":2,
"Convers... | from can import Listener
from socket import socket
class UDPSender(Listener):
dataConvert = {"0x600": {"String":"RPM:",
"Slot":0,
"Conversion":1},
"0x601": {"String":"OIL:",
"Slot":2,
... | <commit_before>from can import Listener
import socket
class UDPSender(Listener):
dataConvert = {"0x600": {"String":"RPM:",
"Slot":0,
"Conversion":1},
"0x601": {"String":"OIL:",
"Slot":2,
... | from can import Listener
from socket import socket
class UDPSender(Listener):
dataConvert = {"0x600": {"String":"RPM:",
"Slot":0,
"Conversion":1},
"0x601": {"String":"OIL:",
"Slot":2,
... | from can import Listener
import socket
class UDPSender(Listener):
dataConvert = {"0x600": {"String":"RPM:",
"Slot":0,
"Conversion":1},
"0x601": {"String":"OIL:",
"Slot":2,
"Convers... | <commit_before>from can import Listener
import socket
class UDPSender(Listener):
dataConvert = {"0x600": {"String":"RPM:",
"Slot":0,
"Conversion":1},
"0x601": {"String":"OIL:",
"Slot":2,
... |
da5db320bd96ff881be23c91f8f5d69505d67946 | src/project_name/urls.py | src/project_name/urls.py | from django.conf import settings
from django.conf.urls import include, url
from django.conf.urls.static import static
from django.contrib import admin
from django.contrib.staticfiles.urls import staticfiles_urlpatterns
from django.views.generic.base import TemplateView
urlpatterns = [
url(r'^admin_tools/', includ... | from django.conf import settings
from django.conf.urls import include, url
from django.conf.urls.static import static
from django.contrib import admin
from django.contrib.staticfiles.urls import staticfiles_urlpatterns
from django.views.generic.base import TemplateView
urlpatterns = [
url(r'^admin_tools/', includ... | Add missing configuration for DjDT | Add missing configuration for DjDT
| Python | mit | Clarity-89/clarityv2,Clarity-89/clarityv2,Clarity-89/clarityv2,Clarity-89/clarityv2 | from django.conf import settings
from django.conf.urls import include, url
from django.conf.urls.static import static
from django.contrib import admin
from django.contrib.staticfiles.urls import staticfiles_urlpatterns
from django.views.generic.base import TemplateView
urlpatterns = [
url(r'^admin_tools/', includ... | from django.conf import settings
from django.conf.urls import include, url
from django.conf.urls.static import static
from django.contrib import admin
from django.contrib.staticfiles.urls import staticfiles_urlpatterns
from django.views.generic.base import TemplateView
urlpatterns = [
url(r'^admin_tools/', includ... | <commit_before>from django.conf import settings
from django.conf.urls import include, url
from django.conf.urls.static import static
from django.contrib import admin
from django.contrib.staticfiles.urls import staticfiles_urlpatterns
from django.views.generic.base import TemplateView
urlpatterns = [
url(r'^admin_... | from django.conf import settings
from django.conf.urls import include, url
from django.conf.urls.static import static
from django.contrib import admin
from django.contrib.staticfiles.urls import staticfiles_urlpatterns
from django.views.generic.base import TemplateView
urlpatterns = [
url(r'^admin_tools/', includ... | from django.conf import settings
from django.conf.urls import include, url
from django.conf.urls.static import static
from django.contrib import admin
from django.contrib.staticfiles.urls import staticfiles_urlpatterns
from django.views.generic.base import TemplateView
urlpatterns = [
url(r'^admin_tools/', includ... | <commit_before>from django.conf import settings
from django.conf.urls import include, url
from django.conf.urls.static import static
from django.contrib import admin
from django.contrib.staticfiles.urls import staticfiles_urlpatterns
from django.views.generic.base import TemplateView
urlpatterns = [
url(r'^admin_... |
8be2d6c735ebdca542063c34d1048cb70ba7f882 | bob/macro.py | bob/macro.py | #
# Copyright (c) 2008 rPath, Inc.
#
# All rights reserved.
#
'''
Mechanism for expanding macros from a trove context.
'''
import logging
def expand(raw, parent, trove=None):
'''Transform a raw string with available configuration data.'''
macros = {}
# Basic info
macros.update(parent.cfg.macro)
... | #
# Copyright (c) 2008 rPath, Inc.
#
# All rights reserved.
#
'''
Mechanism for expanding macros from a trove context.
'''
import logging
def expand(raw, parent, trove=None):
'''Transform a raw string with available configuration data.'''
macros = {}
# Basic info
macros.update(parent.cfg.macro)
... | Delete missed reference to tag config option | Delete missed reference to tag config option
| Python | apache-2.0 | sassoftware/bob,sassoftware/bob | #
# Copyright (c) 2008 rPath, Inc.
#
# All rights reserved.
#
'''
Mechanism for expanding macros from a trove context.
'''
import logging
def expand(raw, parent, trove=None):
'''Transform a raw string with available configuration data.'''
macros = {}
# Basic info
macros.update(parent.cfg.macro)
... | #
# Copyright (c) 2008 rPath, Inc.
#
# All rights reserved.
#
'''
Mechanism for expanding macros from a trove context.
'''
import logging
def expand(raw, parent, trove=None):
'''Transform a raw string with available configuration data.'''
macros = {}
# Basic info
macros.update(parent.cfg.macro)
... | <commit_before>#
# Copyright (c) 2008 rPath, Inc.
#
# All rights reserved.
#
'''
Mechanism for expanding macros from a trove context.
'''
import logging
def expand(raw, parent, trove=None):
'''Transform a raw string with available configuration data.'''
macros = {}
# Basic info
macros.update(parent.... | #
# Copyright (c) 2008 rPath, Inc.
#
# All rights reserved.
#
'''
Mechanism for expanding macros from a trove context.
'''
import logging
def expand(raw, parent, trove=None):
'''Transform a raw string with available configuration data.'''
macros = {}
# Basic info
macros.update(parent.cfg.macro)
... | #
# Copyright (c) 2008 rPath, Inc.
#
# All rights reserved.
#
'''
Mechanism for expanding macros from a trove context.
'''
import logging
def expand(raw, parent, trove=None):
'''Transform a raw string with available configuration data.'''
macros = {}
# Basic info
macros.update(parent.cfg.macro)
... | <commit_before>#
# Copyright (c) 2008 rPath, Inc.
#
# All rights reserved.
#
'''
Mechanism for expanding macros from a trove context.
'''
import logging
def expand(raw, parent, trove=None):
'''Transform a raw string with available configuration data.'''
macros = {}
# Basic info
macros.update(parent.... |
a3b108bdb03a74be5156a6b34219758f04b75fe8 | config.py | config.py | from os import getenv
class Config(object):
API_KEY = getenv('API_KEY')
DAEMON_SLEEP_INTERVAL = 6 # hours
MAIL_DEBUG = False
MAIL_DEFAULT_SENDER = getenv('SENDER_EMAIL', 'dynamite@example.com')
MAIL_PASSWORD = getenv('MAILGUN_SMTP_PASSWORD', None)
MAIL_PORT = getenv('MAILGUN_SMTP_PORT', 25)
... | from os import getenv
class Config(object):
API_KEY = getenv('API_KEY')
DAEMON_SLEEP_INTERVAL = 6 # hours
MAIL_DEBUG = False
MAIL_DEFAULT_SENDER = getenv('SENDER_EMAIL', 'dynamite@example.com')
MAIL_PASSWORD = getenv('MAILGUN_SMTP_PASSWORD', None)
MAIL_PORT = getenv('MAILGUN_SMTP_PORT', 25)
... | Simplify default database setting, but allow it to be overridden | Simplify default database setting, but allow it to be overridden
| Python | mit | taeram/dynamite,taeram/dynamite | from os import getenv
class Config(object):
API_KEY = getenv('API_KEY')
DAEMON_SLEEP_INTERVAL = 6 # hours
MAIL_DEBUG = False
MAIL_DEFAULT_SENDER = getenv('SENDER_EMAIL', 'dynamite@example.com')
MAIL_PASSWORD = getenv('MAILGUN_SMTP_PASSWORD', None)
MAIL_PORT = getenv('MAILGUN_SMTP_PORT', 25)
... | from os import getenv
class Config(object):
API_KEY = getenv('API_KEY')
DAEMON_SLEEP_INTERVAL = 6 # hours
MAIL_DEBUG = False
MAIL_DEFAULT_SENDER = getenv('SENDER_EMAIL', 'dynamite@example.com')
MAIL_PASSWORD = getenv('MAILGUN_SMTP_PASSWORD', None)
MAIL_PORT = getenv('MAILGUN_SMTP_PORT', 25)
... | <commit_before>from os import getenv
class Config(object):
API_KEY = getenv('API_KEY')
DAEMON_SLEEP_INTERVAL = 6 # hours
MAIL_DEBUG = False
MAIL_DEFAULT_SENDER = getenv('SENDER_EMAIL', 'dynamite@example.com')
MAIL_PASSWORD = getenv('MAILGUN_SMTP_PASSWORD', None)
MAIL_PORT = getenv('MAILGUN_SMTP... | from os import getenv
class Config(object):
API_KEY = getenv('API_KEY')
DAEMON_SLEEP_INTERVAL = 6 # hours
MAIL_DEBUG = False
MAIL_DEFAULT_SENDER = getenv('SENDER_EMAIL', 'dynamite@example.com')
MAIL_PASSWORD = getenv('MAILGUN_SMTP_PASSWORD', None)
MAIL_PORT = getenv('MAILGUN_SMTP_PORT', 25)
... | from os import getenv
class Config(object):
API_KEY = getenv('API_KEY')
DAEMON_SLEEP_INTERVAL = 6 # hours
MAIL_DEBUG = False
MAIL_DEFAULT_SENDER = getenv('SENDER_EMAIL', 'dynamite@example.com')
MAIL_PASSWORD = getenv('MAILGUN_SMTP_PASSWORD', None)
MAIL_PORT = getenv('MAILGUN_SMTP_PORT', 25)
... | <commit_before>from os import getenv
class Config(object):
API_KEY = getenv('API_KEY')
DAEMON_SLEEP_INTERVAL = 6 # hours
MAIL_DEBUG = False
MAIL_DEFAULT_SENDER = getenv('SENDER_EMAIL', 'dynamite@example.com')
MAIL_PASSWORD = getenv('MAILGUN_SMTP_PASSWORD', None)
MAIL_PORT = getenv('MAILGUN_SMTP... |
1da2c0e00d43c4fb9a7039e98401d333d387a057 | saleor/search/views.py | saleor/search/views.py | from __future__ import unicode_literals
from django.core.paginator import Paginator, InvalidPage
from django.conf import settings
from django.http import Http404
from django.shortcuts import render
from .forms import SearchForm
from ..product.utils import products_with_details
def paginate_results(results, get_data,... | from __future__ import unicode_literals
from django.core.paginator import Paginator, InvalidPage
from django.conf import settings
from django.http import Http404
from django.shortcuts import render
from .forms import SearchForm
from ..product.utils import products_with_details
def paginate_results(results, get_data,... | Fix empty search results logic | Fix empty search results logic
| Python | bsd-3-clause | mociepka/saleor,jreigel/saleor,itbabu/saleor,maferelo/saleor,KenMutemi/saleor,HyperManTT/ECommerceSaleor,HyperManTT/ECommerceSaleor,HyperManTT/ECommerceSaleor,KenMutemi/saleor,tfroehlich82/saleor,jreigel/saleor,KenMutemi/saleor,itbabu/saleor,car3oon/saleor,maferelo/saleor,car3oon/saleor,UITools/saleor,maferelo/saleor,i... | from __future__ import unicode_literals
from django.core.paginator import Paginator, InvalidPage
from django.conf import settings
from django.http import Http404
from django.shortcuts import render
from .forms import SearchForm
from ..product.utils import products_with_details
def paginate_results(results, get_data,... | from __future__ import unicode_literals
from django.core.paginator import Paginator, InvalidPage
from django.conf import settings
from django.http import Http404
from django.shortcuts import render
from .forms import SearchForm
from ..product.utils import products_with_details
def paginate_results(results, get_data,... | <commit_before>from __future__ import unicode_literals
from django.core.paginator import Paginator, InvalidPage
from django.conf import settings
from django.http import Http404
from django.shortcuts import render
from .forms import SearchForm
from ..product.utils import products_with_details
def paginate_results(res... | from __future__ import unicode_literals
from django.core.paginator import Paginator, InvalidPage
from django.conf import settings
from django.http import Http404
from django.shortcuts import render
from .forms import SearchForm
from ..product.utils import products_with_details
def paginate_results(results, get_data,... | from __future__ import unicode_literals
from django.core.paginator import Paginator, InvalidPage
from django.conf import settings
from django.http import Http404
from django.shortcuts import render
from .forms import SearchForm
from ..product.utils import products_with_details
def paginate_results(results, get_data,... | <commit_before>from __future__ import unicode_literals
from django.core.paginator import Paginator, InvalidPage
from django.conf import settings
from django.http import Http404
from django.shortcuts import render
from .forms import SearchForm
from ..product.utils import products_with_details
def paginate_results(res... |
6c9b0b0c7e78524ea889f8a89c2eba8acb57f782 | gaphor/ui/iconname.py | gaphor/ui/iconname.py | """
With `get_icon_name` you can retrieve an icon name
for a UML model element.
"""
from gaphor import UML
import re
from functools import singledispatch
TO_KEBAB = re.compile(r"([a-z])([A-Z]+)")
def to_kebab_case(s):
return TO_KEBAB.sub("\\1-\\2", s).lower()
@singledispatch
def get_icon_name(element):
"... | """
With `get_icon_name` you can retrieve an icon name
for a UML model element.
"""
from gaphor import UML
import re
from functools import singledispatch
TO_KEBAB = re.compile(r"([a-z])([A-Z]+)")
def to_kebab_case(s):
return TO_KEBAB.sub("\\1-\\2", s).lower()
@singledispatch
def get_icon_name(element):
"... | Fix stereotype icon in namespace view | Fix stereotype icon in namespace view
| Python | lgpl-2.1 | amolenaar/gaphor,amolenaar/gaphor | """
With `get_icon_name` you can retrieve an icon name
for a UML model element.
"""
from gaphor import UML
import re
from functools import singledispatch
TO_KEBAB = re.compile(r"([a-z])([A-Z]+)")
def to_kebab_case(s):
return TO_KEBAB.sub("\\1-\\2", s).lower()
@singledispatch
def get_icon_name(element):
"... | """
With `get_icon_name` you can retrieve an icon name
for a UML model element.
"""
from gaphor import UML
import re
from functools import singledispatch
TO_KEBAB = re.compile(r"([a-z])([A-Z]+)")
def to_kebab_case(s):
return TO_KEBAB.sub("\\1-\\2", s).lower()
@singledispatch
def get_icon_name(element):
"... | <commit_before>"""
With `get_icon_name` you can retrieve an icon name
for a UML model element.
"""
from gaphor import UML
import re
from functools import singledispatch
TO_KEBAB = re.compile(r"([a-z])([A-Z]+)")
def to_kebab_case(s):
return TO_KEBAB.sub("\\1-\\2", s).lower()
@singledispatch
def get_icon_name(... | """
With `get_icon_name` you can retrieve an icon name
for a UML model element.
"""
from gaphor import UML
import re
from functools import singledispatch
TO_KEBAB = re.compile(r"([a-z])([A-Z]+)")
def to_kebab_case(s):
return TO_KEBAB.sub("\\1-\\2", s).lower()
@singledispatch
def get_icon_name(element):
"... | """
With `get_icon_name` you can retrieve an icon name
for a UML model element.
"""
from gaphor import UML
import re
from functools import singledispatch
TO_KEBAB = re.compile(r"([a-z])([A-Z]+)")
def to_kebab_case(s):
return TO_KEBAB.sub("\\1-\\2", s).lower()
@singledispatch
def get_icon_name(element):
"... | <commit_before>"""
With `get_icon_name` you can retrieve an icon name
for a UML model element.
"""
from gaphor import UML
import re
from functools import singledispatch
TO_KEBAB = re.compile(r"([a-z])([A-Z]+)")
def to_kebab_case(s):
return TO_KEBAB.sub("\\1-\\2", s).lower()
@singledispatch
def get_icon_name(... |
7c02e103a0af86016500625e20a4d7667e568265 | script/jsonify-book.py | script/jsonify-book.py | import sys
from glob import glob
from os.path import basename
import json
book_dir, out_dir = sys.argv[1:3]
files = [basename(x).rstrip(".xhtml") for x in glob(f"{book_dir}/*.xhtml")]
json_data = {}
for path in files:
with open(f"{book_dir}/{path}.json", "r") as meta_part:
json_data = json.load(meta_par... | import sys
from glob import glob
from os.path import basename
import json
book_dir, out_dir = sys.argv[1:3]
files = [basename(x).rstrip(".xhtml") for x in glob(f"{book_dir}/*.xhtml")]
json_data = {}
for path in files:
with open(f"{book_dir}/{path}-metadata.json", "r") as meta_part:
json_data = json.load... | Add metadata to jsonify json input filename | Add metadata to jsonify json input filename
| Python | lgpl-2.1 | Connexions/cte,Connexions/cnx-rulesets,Connexions/cnx-recipes,Connexions/cte,Connexions/cnx-rulesets,Connexions/cnx-recipes,Connexions/cnx-recipes,Connexions/cnx-recipes,Connexions/cnx-recipes,Connexions/cnx-rulesets,Connexions/cnx-rulesets | import sys
from glob import glob
from os.path import basename
import json
book_dir, out_dir = sys.argv[1:3]
files = [basename(x).rstrip(".xhtml") for x in glob(f"{book_dir}/*.xhtml")]
json_data = {}
for path in files:
with open(f"{book_dir}/{path}.json", "r") as meta_part:
json_data = json.load(meta_par... | import sys
from glob import glob
from os.path import basename
import json
book_dir, out_dir = sys.argv[1:3]
files = [basename(x).rstrip(".xhtml") for x in glob(f"{book_dir}/*.xhtml")]
json_data = {}
for path in files:
with open(f"{book_dir}/{path}-metadata.json", "r") as meta_part:
json_data = json.load... | <commit_before>import sys
from glob import glob
from os.path import basename
import json
book_dir, out_dir = sys.argv[1:3]
files = [basename(x).rstrip(".xhtml") for x in glob(f"{book_dir}/*.xhtml")]
json_data = {}
for path in files:
with open(f"{book_dir}/{path}.json", "r") as meta_part:
json_data = jso... | import sys
from glob import glob
from os.path import basename
import json
book_dir, out_dir = sys.argv[1:3]
files = [basename(x).rstrip(".xhtml") for x in glob(f"{book_dir}/*.xhtml")]
json_data = {}
for path in files:
with open(f"{book_dir}/{path}-metadata.json", "r") as meta_part:
json_data = json.load... | import sys
from glob import glob
from os.path import basename
import json
book_dir, out_dir = sys.argv[1:3]
files = [basename(x).rstrip(".xhtml") for x in glob(f"{book_dir}/*.xhtml")]
json_data = {}
for path in files:
with open(f"{book_dir}/{path}.json", "r") as meta_part:
json_data = json.load(meta_par... | <commit_before>import sys
from glob import glob
from os.path import basename
import json
book_dir, out_dir = sys.argv[1:3]
files = [basename(x).rstrip(".xhtml") for x in glob(f"{book_dir}/*.xhtml")]
json_data = {}
for path in files:
with open(f"{book_dir}/{path}.json", "r") as meta_part:
json_data = jso... |
9a33ac3f563ad657129d64cb591f08f9fd2a00a2 | tests/test_command.py | tests/test_command.py | """Unittest of command entry point."""
# Copyright 2015 Masayuki Yamamoto
#
# 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 r... | """Unittest of command entry point."""
# Copyright 2015 Masayuki Yamamoto
#
# 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 r... | Add command test for '--version' option | Add command test for '--version' option
Check output that is program name, "version" and version number.
| Python | apache-2.0 | ma8ma/yanico | """Unittest of command entry point."""
# Copyright 2015 Masayuki Yamamoto
#
# 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 r... | """Unittest of command entry point."""
# Copyright 2015 Masayuki Yamamoto
#
# 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 r... | <commit_before>"""Unittest of command entry point."""
# Copyright 2015 Masayuki Yamamoto
#
# 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.... | """Unittest of command entry point."""
# Copyright 2015 Masayuki Yamamoto
#
# 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 r... | """Unittest of command entry point."""
# Copyright 2015 Masayuki Yamamoto
#
# 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 r... | <commit_before>"""Unittest of command entry point."""
# Copyright 2015 Masayuki Yamamoto
#
# 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.... |
9d23940c430a4f95ec11b33362141ec2ffc3f533 | src/tempel/models.py | src/tempel/models.py | from datetime import datetime, timedelta
from django.db import models
from django.conf import settings
from tempel import utils
def default_edit_expires():
return datetime.now() + timedelta(seconds=60*settings.TEMPEL_EDIT_AGE)
class Entry(models.Model):
content = models.TextField()
language = models.Cha... | from datetime import datetime, timedelta
from django.db import models
from django.conf import settings
from tempel import utils
def default_edit_expires():
return datetime.now() + timedelta(seconds=60*settings.TEMPEL_EDIT_AGE)
class Entry(models.Model):
content = models.TextField()
language = models.Cha... | Add is_editable and done_editable functions to Entry | Add is_editable and done_editable functions to Entry
| Python | agpl-3.0 | fajran/tempel | from datetime import datetime, timedelta
from django.db import models
from django.conf import settings
from tempel import utils
def default_edit_expires():
return datetime.now() + timedelta(seconds=60*settings.TEMPEL_EDIT_AGE)
class Entry(models.Model):
content = models.TextField()
language = models.Cha... | from datetime import datetime, timedelta
from django.db import models
from django.conf import settings
from tempel import utils
def default_edit_expires():
return datetime.now() + timedelta(seconds=60*settings.TEMPEL_EDIT_AGE)
class Entry(models.Model):
content = models.TextField()
language = models.Cha... | <commit_before>from datetime import datetime, timedelta
from django.db import models
from django.conf import settings
from tempel import utils
def default_edit_expires():
return datetime.now() + timedelta(seconds=60*settings.TEMPEL_EDIT_AGE)
class Entry(models.Model):
content = models.TextField()
langua... | from datetime import datetime, timedelta
from django.db import models
from django.conf import settings
from tempel import utils
def default_edit_expires():
return datetime.now() + timedelta(seconds=60*settings.TEMPEL_EDIT_AGE)
class Entry(models.Model):
content = models.TextField()
language = models.Cha... | from datetime import datetime, timedelta
from django.db import models
from django.conf import settings
from tempel import utils
def default_edit_expires():
return datetime.now() + timedelta(seconds=60*settings.TEMPEL_EDIT_AGE)
class Entry(models.Model):
content = models.TextField()
language = models.Cha... | <commit_before>from datetime import datetime, timedelta
from django.db import models
from django.conf import settings
from tempel import utils
def default_edit_expires():
return datetime.now() + timedelta(seconds=60*settings.TEMPEL_EDIT_AGE)
class Entry(models.Model):
content = models.TextField()
langua... |
02ca3946662fd996f77c30d9e61d8fc8d9243de7 | trac/upgrades/db20.py | trac/upgrades/db20.py | from trac.db import Table, Column, Index, DatabaseManager
from trac.core import TracError
from trac.versioncontrol.cache import CACHE_YOUNGEST_REV
def do_upgrade(env, ver, cursor):
"""Modify the repository cache scheme (if needed)
Now we use the 'youngest_rev' entry in the system table
to explicit... | from trac.db import Table, Column, Index, DatabaseManager
from trac.core import TracError
from trac.versioncontrol.cache import CACHE_YOUNGEST_REV
def do_upgrade(env, ver, cursor):
"""Modify the repository cache scheme (if needed)
Now we use the 'youngest_rev' entry in the system table
to explicitly store... | Make db upgrade step 20 more robust. | Make db upgrade step 20 more robust.
git-svn-id: f68c6b3b1dcd5d00a2560c384475aaef3bc99487@5815 af82e41b-90c4-0310-8c96-b1721e28e2e2
| Python | bsd-3-clause | exocad/exotrac,dokipen/trac,moreati/trac-gitsvn,exocad/exotrac,dokipen/trac,dafrito/trac-mirror,dafrito/trac-mirror,moreati/trac-gitsvn,dafrito/trac-mirror,dafrito/trac-mirror,exocad/exotrac,dokipen/trac,moreati/trac-gitsvn,exocad/exotrac,moreati/trac-gitsvn | from trac.db import Table, Column, Index, DatabaseManager
from trac.core import TracError
from trac.versioncontrol.cache import CACHE_YOUNGEST_REV
def do_upgrade(env, ver, cursor):
"""Modify the repository cache scheme (if needed)
Now we use the 'youngest_rev' entry in the system table
to explicit... | from trac.db import Table, Column, Index, DatabaseManager
from trac.core import TracError
from trac.versioncontrol.cache import CACHE_YOUNGEST_REV
def do_upgrade(env, ver, cursor):
"""Modify the repository cache scheme (if needed)
Now we use the 'youngest_rev' entry in the system table
to explicitly store... | <commit_before>from trac.db import Table, Column, Index, DatabaseManager
from trac.core import TracError
from trac.versioncontrol.cache import CACHE_YOUNGEST_REV
def do_upgrade(env, ver, cursor):
"""Modify the repository cache scheme (if needed)
Now we use the 'youngest_rev' entry in the system table
... | from trac.db import Table, Column, Index, DatabaseManager
from trac.core import TracError
from trac.versioncontrol.cache import CACHE_YOUNGEST_REV
def do_upgrade(env, ver, cursor):
"""Modify the repository cache scheme (if needed)
Now we use the 'youngest_rev' entry in the system table
to explicitly store... | from trac.db import Table, Column, Index, DatabaseManager
from trac.core import TracError
from trac.versioncontrol.cache import CACHE_YOUNGEST_REV
def do_upgrade(env, ver, cursor):
"""Modify the repository cache scheme (if needed)
Now we use the 'youngest_rev' entry in the system table
to explicit... | <commit_before>from trac.db import Table, Column, Index, DatabaseManager
from trac.core import TracError
from trac.versioncontrol.cache import CACHE_YOUNGEST_REV
def do_upgrade(env, ver, cursor):
"""Modify the repository cache scheme (if needed)
Now we use the 'youngest_rev' entry in the system table
... |
ceb75d6f58ab16e3afdf3c7b00de539012d790d5 | djangopeoplenet/manage.py | djangopeoplenet/manage.py | #!/usr/bin/env python
import sys
paths = (
'/home/simon/sites/djangopeople.net',
'/home/simon/sites/djangopeople.net/djangopeoplenet',
'/home/simon/sites/djangopeople.net/djangopeoplenet/djangopeople/lib',
)
for path in paths:
if not path in sys.path:
sys.path.insert(0, path)
from django.core.m... | #!/usr/bin/env python
import sys, os
root = os.path.dirname(__file__)
paths = (
os.path.join(root),
os.path.join(root, "djangopeople", "lib"),
)
for path in paths:
if not path in sys.path:
sys.path.insert(0, path)
from django.core.management import execute_manager
try:
import settings # Assume... | Make the lib imports work on other computers than Simon's | Make the lib imports work on other computers than Simon's
Signed-off-by: Simon Willison <088e16a1019277b15d58faf0541e11910eb756f6@simonwillison.net> | Python | mit | brutasse/djangopeople,django/djangopeople,polinom/djangopeople,brutasse/djangopeople,polinom/djangopeople,brutasse/djangopeople,polinom/djangopeople,django/djangopeople,polinom/djangopeople,django/djangopeople,brutasse/djangopeople | #!/usr/bin/env python
import sys
paths = (
'/home/simon/sites/djangopeople.net',
'/home/simon/sites/djangopeople.net/djangopeoplenet',
'/home/simon/sites/djangopeople.net/djangopeoplenet/djangopeople/lib',
)
for path in paths:
if not path in sys.path:
sys.path.insert(0, path)
from django.core.m... | #!/usr/bin/env python
import sys, os
root = os.path.dirname(__file__)
paths = (
os.path.join(root),
os.path.join(root, "djangopeople", "lib"),
)
for path in paths:
if not path in sys.path:
sys.path.insert(0, path)
from django.core.management import execute_manager
try:
import settings # Assume... | <commit_before>#!/usr/bin/env python
import sys
paths = (
'/home/simon/sites/djangopeople.net',
'/home/simon/sites/djangopeople.net/djangopeoplenet',
'/home/simon/sites/djangopeople.net/djangopeoplenet/djangopeople/lib',
)
for path in paths:
if not path in sys.path:
sys.path.insert(0, path)
fro... | #!/usr/bin/env python
import sys, os
root = os.path.dirname(__file__)
paths = (
os.path.join(root),
os.path.join(root, "djangopeople", "lib"),
)
for path in paths:
if not path in sys.path:
sys.path.insert(0, path)
from django.core.management import execute_manager
try:
import settings # Assume... | #!/usr/bin/env python
import sys
paths = (
'/home/simon/sites/djangopeople.net',
'/home/simon/sites/djangopeople.net/djangopeoplenet',
'/home/simon/sites/djangopeople.net/djangopeoplenet/djangopeople/lib',
)
for path in paths:
if not path in sys.path:
sys.path.insert(0, path)
from django.core.m... | <commit_before>#!/usr/bin/env python
import sys
paths = (
'/home/simon/sites/djangopeople.net',
'/home/simon/sites/djangopeople.net/djangopeoplenet',
'/home/simon/sites/djangopeople.net/djangopeoplenet/djangopeople/lib',
)
for path in paths:
if not path in sys.path:
sys.path.insert(0, path)
fro... |
bb34b21ebd2378f944498708ac4f13d16aa61aa1 | src/mist/io/tests/api/features/steps/backends.py | src/mist/io/tests/api/features/steps/backends.py | from behave import *
@given(u'"{text}" backend added')
def given_backend(context, text):
backends = context.client.list_backends()
for backend in backends:
if text in backend['title']:
return
@when(u'I list backends')
def list_backends(context):
context.backends = context.client.lis... | from behave import *
@given(u'"{text}" backend added through api')
def given_backend(context, text):
backends = context.client.list_backends()
for backend in backends:
if text in backend['title']:
return
@when(u'I list backends')
def list_backends(context):
context.backends = contex... | Rename Behave steps for api tests | Rename Behave steps for api tests
| Python | agpl-3.0 | johnnyWalnut/mist.io,DimensionDataCBUSydney/mist.io,zBMNForks/mist.io,afivos/mist.io,Lao-liu/mist.io,Lao-liu/mist.io,munkiat/mist.io,kelonye/mist.io,kelonye/mist.io,afivos/mist.io,Lao-liu/mist.io,Lao-liu/mist.io,DimensionDataCBUSydney/mist.io,johnnyWalnut/mist.io,zBMNForks/mist.io,DimensionDataCBUSydney/mist.io,Dimensi... | from behave import *
@given(u'"{text}" backend added')
def given_backend(context, text):
backends = context.client.list_backends()
for backend in backends:
if text in backend['title']:
return
@when(u'I list backends')
def list_backends(context):
context.backends = context.client.lis... | from behave import *
@given(u'"{text}" backend added through api')
def given_backend(context, text):
backends = context.client.list_backends()
for backend in backends:
if text in backend['title']:
return
@when(u'I list backends')
def list_backends(context):
context.backends = contex... | <commit_before>from behave import *
@given(u'"{text}" backend added')
def given_backend(context, text):
backends = context.client.list_backends()
for backend in backends:
if text in backend['title']:
return
@when(u'I list backends')
def list_backends(context):
context.backends = con... | from behave import *
@given(u'"{text}" backend added through api')
def given_backend(context, text):
backends = context.client.list_backends()
for backend in backends:
if text in backend['title']:
return
@when(u'I list backends')
def list_backends(context):
context.backends = contex... | from behave import *
@given(u'"{text}" backend added')
def given_backend(context, text):
backends = context.client.list_backends()
for backend in backends:
if text in backend['title']:
return
@when(u'I list backends')
def list_backends(context):
context.backends = context.client.lis... | <commit_before>from behave import *
@given(u'"{text}" backend added')
def given_backend(context, text):
backends = context.client.list_backends()
for backend in backends:
if text in backend['title']:
return
@when(u'I list backends')
def list_backends(context):
context.backends = con... |
6f42f03f950e4c3967eb1efd7feb9364c9fbaf1f | google.py | google.py | import os
from werkzeug.contrib.fixers import ProxyFix
from flask import Flask, redirect, url_for
from flask_dance.contrib.google import make_google_blueprint, google
from raven.contrib.flask import Sentry
app = Flask(__name__)
app.wsgi_app = ProxyFix(app.wsgi_app)
sentry = Sentry(app)
app.secret_key = os.environ.get(... | import os
from werkzeug.contrib.fixers import ProxyFix
from flask import Flask, redirect, url_for
from flask_dance.contrib.google import make_google_blueprint, google
from raven.contrib.flask import Sentry
app = Flask(__name__)
app.wsgi_app = ProxyFix(app.wsgi_app)
sentry = Sentry(app)
app.secret_key = os.environ.get(... | Use userinfo URI for user profile info | Use userinfo URI for user profile info
| Python | mit | singingwolfboy/flask-dance-google | import os
from werkzeug.contrib.fixers import ProxyFix
from flask import Flask, redirect, url_for
from flask_dance.contrib.google import make_google_blueprint, google
from raven.contrib.flask import Sentry
app = Flask(__name__)
app.wsgi_app = ProxyFix(app.wsgi_app)
sentry = Sentry(app)
app.secret_key = os.environ.get(... | import os
from werkzeug.contrib.fixers import ProxyFix
from flask import Flask, redirect, url_for
from flask_dance.contrib.google import make_google_blueprint, google
from raven.contrib.flask import Sentry
app = Flask(__name__)
app.wsgi_app = ProxyFix(app.wsgi_app)
sentry = Sentry(app)
app.secret_key = os.environ.get(... | <commit_before>import os
from werkzeug.contrib.fixers import ProxyFix
from flask import Flask, redirect, url_for
from flask_dance.contrib.google import make_google_blueprint, google
from raven.contrib.flask import Sentry
app = Flask(__name__)
app.wsgi_app = ProxyFix(app.wsgi_app)
sentry = Sentry(app)
app.secret_key = ... | import os
from werkzeug.contrib.fixers import ProxyFix
from flask import Flask, redirect, url_for
from flask_dance.contrib.google import make_google_blueprint, google
from raven.contrib.flask import Sentry
app = Flask(__name__)
app.wsgi_app = ProxyFix(app.wsgi_app)
sentry = Sentry(app)
app.secret_key = os.environ.get(... | import os
from werkzeug.contrib.fixers import ProxyFix
from flask import Flask, redirect, url_for
from flask_dance.contrib.google import make_google_blueprint, google
from raven.contrib.flask import Sentry
app = Flask(__name__)
app.wsgi_app = ProxyFix(app.wsgi_app)
sentry = Sentry(app)
app.secret_key = os.environ.get(... | <commit_before>import os
from werkzeug.contrib.fixers import ProxyFix
from flask import Flask, redirect, url_for
from flask_dance.contrib.google import make_google_blueprint, google
from raven.contrib.flask import Sentry
app = Flask(__name__)
app.wsgi_app = ProxyFix(app.wsgi_app)
sentry = Sentry(app)
app.secret_key = ... |
2bb8ee6ae30e233f28ea0ae0fb01c0e4a1f8d9f1 | tests/functional/test_warning.py | tests/functional/test_warning.py | import pytest
import textwrap
@pytest.fixture
def warnings_demo(tmpdir):
demo = tmpdir.joinpath('warnings_demo.py')
demo.write_text(textwrap.dedent('''
from logging import basicConfig
from pip._internal.utils import deprecation
deprecation.install_warning_logger()
basicConfig(... | import textwrap
import pytest
@pytest.fixture
def warnings_demo(tmpdir):
demo = tmpdir.joinpath('warnings_demo.py')
demo.write_text(textwrap.dedent('''
from logging import basicConfig
from pip._internal.utils import deprecation
deprecation.install_warning_logger()
basicConfig... | Sort imports for the greater good | Sort imports for the greater good
| Python | mit | xavfernandez/pip,sbidoul/pip,pypa/pip,rouge8/pip,rouge8/pip,pfmoore/pip,xavfernandez/pip,sbidoul/pip,pypa/pip,pradyunsg/pip,xavfernandez/pip,pradyunsg/pip,pfmoore/pip,rouge8/pip | import pytest
import textwrap
@pytest.fixture
def warnings_demo(tmpdir):
demo = tmpdir.joinpath('warnings_demo.py')
demo.write_text(textwrap.dedent('''
from logging import basicConfig
from pip._internal.utils import deprecation
deprecation.install_warning_logger()
basicConfig(... | import textwrap
import pytest
@pytest.fixture
def warnings_demo(tmpdir):
demo = tmpdir.joinpath('warnings_demo.py')
demo.write_text(textwrap.dedent('''
from logging import basicConfig
from pip._internal.utils import deprecation
deprecation.install_warning_logger()
basicConfig... | <commit_before>import pytest
import textwrap
@pytest.fixture
def warnings_demo(tmpdir):
demo = tmpdir.joinpath('warnings_demo.py')
demo.write_text(textwrap.dedent('''
from logging import basicConfig
from pip._internal.utils import deprecation
deprecation.install_warning_logger()
... | import textwrap
import pytest
@pytest.fixture
def warnings_demo(tmpdir):
demo = tmpdir.joinpath('warnings_demo.py')
demo.write_text(textwrap.dedent('''
from logging import basicConfig
from pip._internal.utils import deprecation
deprecation.install_warning_logger()
basicConfig... | import pytest
import textwrap
@pytest.fixture
def warnings_demo(tmpdir):
demo = tmpdir.joinpath('warnings_demo.py')
demo.write_text(textwrap.dedent('''
from logging import basicConfig
from pip._internal.utils import deprecation
deprecation.install_warning_logger()
basicConfig(... | <commit_before>import pytest
import textwrap
@pytest.fixture
def warnings_demo(tmpdir):
demo = tmpdir.joinpath('warnings_demo.py')
demo.write_text(textwrap.dedent('''
from logging import basicConfig
from pip._internal.utils import deprecation
deprecation.install_warning_logger()
... |
ad73789f74106a2d6014a2f737578494d2d21fbf | virtool/api/processes.py | virtool/api/processes.py | import virtool.http.routes
import virtool.utils
from virtool.api.utils import json_response
routes = virtool.http.routes.Routes()
@routes.get("/api/processes")
async def find(req):
db = req.app["db"]
documents = [virtool.utils.base_processor(d) async for d in db.processes.find()]
return json_response(d... | import virtool.http.routes
import virtool.utils
from virtool.api.utils import json_response
routes = virtool.http.routes.Routes()
@routes.get("/api/processes")
async def find(req):
db = req.app["db"]
documents = [virtool.utils.base_processor(d) async for d in db.processes.find()]
return json_response(d... | Remove specific process API GET endpoints | Remove specific process API GET endpoints | Python | mit | virtool/virtool,igboyes/virtool,virtool/virtool,igboyes/virtool | import virtool.http.routes
import virtool.utils
from virtool.api.utils import json_response
routes = virtool.http.routes.Routes()
@routes.get("/api/processes")
async def find(req):
db = req.app["db"]
documents = [virtool.utils.base_processor(d) async for d in db.processes.find()]
return json_response(d... | import virtool.http.routes
import virtool.utils
from virtool.api.utils import json_response
routes = virtool.http.routes.Routes()
@routes.get("/api/processes")
async def find(req):
db = req.app["db"]
documents = [virtool.utils.base_processor(d) async for d in db.processes.find()]
return json_response(d... | <commit_before>import virtool.http.routes
import virtool.utils
from virtool.api.utils import json_response
routes = virtool.http.routes.Routes()
@routes.get("/api/processes")
async def find(req):
db = req.app["db"]
documents = [virtool.utils.base_processor(d) async for d in db.processes.find()]
return ... | import virtool.http.routes
import virtool.utils
from virtool.api.utils import json_response
routes = virtool.http.routes.Routes()
@routes.get("/api/processes")
async def find(req):
db = req.app["db"]
documents = [virtool.utils.base_processor(d) async for d in db.processes.find()]
return json_response(d... | import virtool.http.routes
import virtool.utils
from virtool.api.utils import json_response
routes = virtool.http.routes.Routes()
@routes.get("/api/processes")
async def find(req):
db = req.app["db"]
documents = [virtool.utils.base_processor(d) async for d in db.processes.find()]
return json_response(d... | <commit_before>import virtool.http.routes
import virtool.utils
from virtool.api.utils import json_response
routes = virtool.http.routes.Routes()
@routes.get("/api/processes")
async def find(req):
db = req.app["db"]
documents = [virtool.utils.base_processor(d) async for d in db.processes.find()]
return ... |
c18b8b5e545032ae512bad505255c0f72390b633 | docs/conf.py | docs/conf.py | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
import hgtools.managers
# use hgtools to get the version
hg_mgr = hgtools.managers.RepoManager.get_first_valid_manager()
extensions = [
'sphinx.ext.autodoc',
]
# General information about the project.
project = 'pytest-runner'
copyright = '2015 Jason ... | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
import setuptools_scm
extensions = [
'sphinx.ext.autodoc',
]
# General information about the project.
project = 'pytest-runner'
copyright = '2015 Jason R. Coombs'
# The short X.Y version.
version = setuptools_scm.get_version()
# The full version, inc... | Use setuptools_scm in docs generation. | Use setuptools_scm in docs generation.
| Python | mit | pytest-dev/pytest-runner | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
import hgtools.managers
# use hgtools to get the version
hg_mgr = hgtools.managers.RepoManager.get_first_valid_manager()
extensions = [
'sphinx.ext.autodoc',
]
# General information about the project.
project = 'pytest-runner'
copyright = '2015 Jason ... | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
import setuptools_scm
extensions = [
'sphinx.ext.autodoc',
]
# General information about the project.
project = 'pytest-runner'
copyright = '2015 Jason R. Coombs'
# The short X.Y version.
version = setuptools_scm.get_version()
# The full version, inc... | <commit_before>#!/usr/bin/env python3
# -*- coding: utf-8 -*-
import hgtools.managers
# use hgtools to get the version
hg_mgr = hgtools.managers.RepoManager.get_first_valid_manager()
extensions = [
'sphinx.ext.autodoc',
]
# General information about the project.
project = 'pytest-runner'
copyright... | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
import setuptools_scm
extensions = [
'sphinx.ext.autodoc',
]
# General information about the project.
project = 'pytest-runner'
copyright = '2015 Jason R. Coombs'
# The short X.Y version.
version = setuptools_scm.get_version()
# The full version, inc... | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
import hgtools.managers
# use hgtools to get the version
hg_mgr = hgtools.managers.RepoManager.get_first_valid_manager()
extensions = [
'sphinx.ext.autodoc',
]
# General information about the project.
project = 'pytest-runner'
copyright = '2015 Jason ... | <commit_before>#!/usr/bin/env python3
# -*- coding: utf-8 -*-
import hgtools.managers
# use hgtools to get the version
hg_mgr = hgtools.managers.RepoManager.get_first_valid_manager()
extensions = [
'sphinx.ext.autodoc',
]
# General information about the project.
project = 'pytest-runner'
copyright... |
77ad68b04b66feb47116999cf79892f6630d9601 | thefuck/rules/ln_no_hard_link.py | thefuck/rules/ln_no_hard_link.py | """Suggest creating symbolic link if hard link is not allowed.
Example:
> ln barDir barLink
ln: ‘barDir’: hard link not allowed for directory
--> ln -s barDir barLink
"""
import re
from thefuck.specific.sudo import sudo_support
@sudo_support
def match(command):
return (command.stderr.endswith("hard link not al... | # -*- coding: utf-8 -*-
"""Suggest creating symbolic link if hard link is not allowed.
Example:
> ln barDir barLink
ln: ‘barDir’: hard link not allowed for directory
--> ln -s barDir barLink
"""
import re
from thefuck.specific.sudo import sudo_support
@sudo_support
def match(command):
return (command.stderr.en... | Fix encoding error in source file example | Fix encoding error in source file example
| Python | mit | lawrencebenson/thefuck,mlk/thefuck,nvbn/thefuck,PLNech/thefuck,scorphus/thefuck,nvbn/thefuck,SimenB/thefuck,Clpsplug/thefuck,SimenB/thefuck,mlk/thefuck,scorphus/thefuck,lawrencebenson/thefuck,Clpsplug/thefuck,PLNech/thefuck | """Suggest creating symbolic link if hard link is not allowed.
Example:
> ln barDir barLink
ln: ‘barDir’: hard link not allowed for directory
--> ln -s barDir barLink
"""
import re
from thefuck.specific.sudo import sudo_support
@sudo_support
def match(command):
return (command.stderr.endswith("hard link not al... | # -*- coding: utf-8 -*-
"""Suggest creating symbolic link if hard link is not allowed.
Example:
> ln barDir barLink
ln: ‘barDir’: hard link not allowed for directory
--> ln -s barDir barLink
"""
import re
from thefuck.specific.sudo import sudo_support
@sudo_support
def match(command):
return (command.stderr.en... | <commit_before>"""Suggest creating symbolic link if hard link is not allowed.
Example:
> ln barDir barLink
ln: ‘barDir’: hard link not allowed for directory
--> ln -s barDir barLink
"""
import re
from thefuck.specific.sudo import sudo_support
@sudo_support
def match(command):
return (command.stderr.endswith("h... | # -*- coding: utf-8 -*-
"""Suggest creating symbolic link if hard link is not allowed.
Example:
> ln barDir barLink
ln: ‘barDir’: hard link not allowed for directory
--> ln -s barDir barLink
"""
import re
from thefuck.specific.sudo import sudo_support
@sudo_support
def match(command):
return (command.stderr.en... | """Suggest creating symbolic link if hard link is not allowed.
Example:
> ln barDir barLink
ln: ‘barDir’: hard link not allowed for directory
--> ln -s barDir barLink
"""
import re
from thefuck.specific.sudo import sudo_support
@sudo_support
def match(command):
return (command.stderr.endswith("hard link not al... | <commit_before>"""Suggest creating symbolic link if hard link is not allowed.
Example:
> ln barDir barLink
ln: ‘barDir’: hard link not allowed for directory
--> ln -s barDir barLink
"""
import re
from thefuck.specific.sudo import sudo_support
@sudo_support
def match(command):
return (command.stderr.endswith("h... |
d7f3ea41bc3d252d786a339fc34337f01e1cc3eb | django_dbq/migrations/0001_initial.py | django_dbq/migrations/0001_initial.py | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
import jsonfield.fields
import uuid
try:
from django.db.models import UUIDField
except ImportError:
from django_dbq.fields import UUIDField
class Migration(migrations.Migration):
dependencies = [
... | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
import jsonfield.fields
import uuid
from django.db.models import UUIDField
class Migration(migrations.Migration):
dependencies = [
]
operations = [
migrations.CreateModel(
name=... | Remove reference to old UUIDfield in django migration | Remove reference to old UUIDfield in django migration
| Python | bsd-2-clause | dabapps/django-db-queue | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
import jsonfield.fields
import uuid
try:
from django.db.models import UUIDField
except ImportError:
from django_dbq.fields import UUIDField
class Migration(migrations.Migration):
dependencies = [
... | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
import jsonfield.fields
import uuid
from django.db.models import UUIDField
class Migration(migrations.Migration):
dependencies = [
]
operations = [
migrations.CreateModel(
name=... | <commit_before># -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
import jsonfield.fields
import uuid
try:
from django.db.models import UUIDField
except ImportError:
from django_dbq.fields import UUIDField
class Migration(migrations.Migration):
depe... | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
import jsonfield.fields
import uuid
from django.db.models import UUIDField
class Migration(migrations.Migration):
dependencies = [
]
operations = [
migrations.CreateModel(
name=... | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
import jsonfield.fields
import uuid
try:
from django.db.models import UUIDField
except ImportError:
from django_dbq.fields import UUIDField
class Migration(migrations.Migration):
dependencies = [
... | <commit_before># -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
import jsonfield.fields
import uuid
try:
from django.db.models import UUIDField
except ImportError:
from django_dbq.fields import UUIDField
class Migration(migrations.Migration):
depe... |
a5130e32bffa1dbc4d83f349fc3653b690154d71 | vumi/workers/vas2nets/workers.py | vumi/workers/vas2nets/workers.py | # -*- test-case-name: vumi.workers.vas2nets.test_vas2nets -*-
# -*- encoding: utf-8 -*-
from twisted.python import log
from twisted.internet.defer import inlineCallbacks, Deferred
from vumi.message import Message
from vumi.service import Worker
class EchoWorker(Worker):
@inlineCallbacks
def startWorker(sel... | # -*- test-case-name: vumi.workers.vas2nets.test_vas2nets -*-
# -*- encoding: utf-8 -*-
from twisted.python import log
from twisted.internet.defer import inlineCallbacks, Deferred
from vumi.message import Message
from vumi.service import Worker
class EchoWorker(Worker):
@inlineCallbacks
def startWorker(sel... | Add keyword to echo worker. | Add keyword to echo worker.
| Python | bsd-3-clause | TouK/vumi,vishwaprakashmishra/xmatrix,harrissoerja/vumi,TouK/vumi,vishwaprakashmishra/xmatrix,harrissoerja/vumi,vishwaprakashmishra/xmatrix,harrissoerja/vumi,TouK/vumi | # -*- test-case-name: vumi.workers.vas2nets.test_vas2nets -*-
# -*- encoding: utf-8 -*-
from twisted.python import log
from twisted.internet.defer import inlineCallbacks, Deferred
from vumi.message import Message
from vumi.service import Worker
class EchoWorker(Worker):
@inlineCallbacks
def startWorker(sel... | # -*- test-case-name: vumi.workers.vas2nets.test_vas2nets -*-
# -*- encoding: utf-8 -*-
from twisted.python import log
from twisted.internet.defer import inlineCallbacks, Deferred
from vumi.message import Message
from vumi.service import Worker
class EchoWorker(Worker):
@inlineCallbacks
def startWorker(sel... | <commit_before># -*- test-case-name: vumi.workers.vas2nets.test_vas2nets -*-
# -*- encoding: utf-8 -*-
from twisted.python import log
from twisted.internet.defer import inlineCallbacks, Deferred
from vumi.message import Message
from vumi.service import Worker
class EchoWorker(Worker):
@inlineCallbacks
def ... | # -*- test-case-name: vumi.workers.vas2nets.test_vas2nets -*-
# -*- encoding: utf-8 -*-
from twisted.python import log
from twisted.internet.defer import inlineCallbacks, Deferred
from vumi.message import Message
from vumi.service import Worker
class EchoWorker(Worker):
@inlineCallbacks
def startWorker(sel... | # -*- test-case-name: vumi.workers.vas2nets.test_vas2nets -*-
# -*- encoding: utf-8 -*-
from twisted.python import log
from twisted.internet.defer import inlineCallbacks, Deferred
from vumi.message import Message
from vumi.service import Worker
class EchoWorker(Worker):
@inlineCallbacks
def startWorker(sel... | <commit_before># -*- test-case-name: vumi.workers.vas2nets.test_vas2nets -*-
# -*- encoding: utf-8 -*-
from twisted.python import log
from twisted.internet.defer import inlineCallbacks, Deferred
from vumi.message import Message
from vumi.service import Worker
class EchoWorker(Worker):
@inlineCallbacks
def ... |
bbf22dc68202d81a8c7e94fbb8e61d819d808115 | wisely_project/pledges/models.py | wisely_project/pledges/models.py | from django.utils import timezone
from django.db import models
from users.models import Course, BaseModel, User
class Pledge(BaseModel):
user = models.ForeignKey(User)
course = models.ForeignKey(Course)
money = models.DecimalField(max_digits=8, decimal_places=2)
pledge_date = models.DateTimeField('da... | from django.utils import timezone
from django.db import models
from users.models import Course, BaseModel, UserProfile
class Pledge(BaseModel):
user = models.ForeignKey(UserProfile)
course = models.ForeignKey(Course)
money = models.DecimalField(max_digits=8, decimal_places=2)
pledge_date = models.Dat... | Make pledge foreignkey to userprofile | Make pledge foreignkey to userprofile
| Python | mit | TejasM/wisely,TejasM/wisely,TejasM/wisely | from django.utils import timezone
from django.db import models
from users.models import Course, BaseModel, User
class Pledge(BaseModel):
user = models.ForeignKey(User)
course = models.ForeignKey(Course)
money = models.DecimalField(max_digits=8, decimal_places=2)
pledge_date = models.DateTimeField('da... | from django.utils import timezone
from django.db import models
from users.models import Course, BaseModel, UserProfile
class Pledge(BaseModel):
user = models.ForeignKey(UserProfile)
course = models.ForeignKey(Course)
money = models.DecimalField(max_digits=8, decimal_places=2)
pledge_date = models.Dat... | <commit_before>from django.utils import timezone
from django.db import models
from users.models import Course, BaseModel, User
class Pledge(BaseModel):
user = models.ForeignKey(User)
course = models.ForeignKey(Course)
money = models.DecimalField(max_digits=8, decimal_places=2)
pledge_date = models.Da... | from django.utils import timezone
from django.db import models
from users.models import Course, BaseModel, UserProfile
class Pledge(BaseModel):
user = models.ForeignKey(UserProfile)
course = models.ForeignKey(Course)
money = models.DecimalField(max_digits=8, decimal_places=2)
pledge_date = models.Dat... | from django.utils import timezone
from django.db import models
from users.models import Course, BaseModel, User
class Pledge(BaseModel):
user = models.ForeignKey(User)
course = models.ForeignKey(Course)
money = models.DecimalField(max_digits=8, decimal_places=2)
pledge_date = models.DateTimeField('da... | <commit_before>from django.utils import timezone
from django.db import models
from users.models import Course, BaseModel, User
class Pledge(BaseModel):
user = models.ForeignKey(User)
course = models.ForeignKey(Course)
money = models.DecimalField(max_digits=8, decimal_places=2)
pledge_date = models.Da... |
8eca7b30865e4d02fd440f55ad3215dee6fab8a1 | gee_asset_manager/batch_remover.py | gee_asset_manager/batch_remover.py | import fnmatch
import logging
import sys
import ee
def delete(asset_path):
root = asset_path[:asset_path.rfind('/')]
all_assets_names = [e['id'] for e in ee.data.getList({'id': root})]
filtered_names = fnmatch.filter(all_assets_names, asset_path)
if not filtered_names:
logging.warning('Nothin... | import fnmatch
import logging
import sys
import ee
def delete(asset_path):
root_idx = asset_path.rfind('/')
if root_idx == -1:
logging.warning('Asset not found. Make sure you pass full asset name, e.g. users/pinkiepie/rainbow')
sys.exit(1)
root = asset_path[:root_idx]
all_assets_names... | Add warning when removing an asset without full path | Add warning when removing an asset without full path
| Python | apache-2.0 | tracek/gee_asset_manager | import fnmatch
import logging
import sys
import ee
def delete(asset_path):
root = asset_path[:asset_path.rfind('/')]
all_assets_names = [e['id'] for e in ee.data.getList({'id': root})]
filtered_names = fnmatch.filter(all_assets_names, asset_path)
if not filtered_names:
logging.warning('Nothin... | import fnmatch
import logging
import sys
import ee
def delete(asset_path):
root_idx = asset_path.rfind('/')
if root_idx == -1:
logging.warning('Asset not found. Make sure you pass full asset name, e.g. users/pinkiepie/rainbow')
sys.exit(1)
root = asset_path[:root_idx]
all_assets_names... | <commit_before>import fnmatch
import logging
import sys
import ee
def delete(asset_path):
root = asset_path[:asset_path.rfind('/')]
all_assets_names = [e['id'] for e in ee.data.getList({'id': root})]
filtered_names = fnmatch.filter(all_assets_names, asset_path)
if not filtered_names:
logging.... | import fnmatch
import logging
import sys
import ee
def delete(asset_path):
root_idx = asset_path.rfind('/')
if root_idx == -1:
logging.warning('Asset not found. Make sure you pass full asset name, e.g. users/pinkiepie/rainbow')
sys.exit(1)
root = asset_path[:root_idx]
all_assets_names... | import fnmatch
import logging
import sys
import ee
def delete(asset_path):
root = asset_path[:asset_path.rfind('/')]
all_assets_names = [e['id'] for e in ee.data.getList({'id': root})]
filtered_names = fnmatch.filter(all_assets_names, asset_path)
if not filtered_names:
logging.warning('Nothin... | <commit_before>import fnmatch
import logging
import sys
import ee
def delete(asset_path):
root = asset_path[:asset_path.rfind('/')]
all_assets_names = [e['id'] for e in ee.data.getList({'id': root})]
filtered_names = fnmatch.filter(all_assets_names, asset_path)
if not filtered_names:
logging.... |
0255a9cc22999d3111076155feab85ebe3198492 | impeller/tools/build_metal_library.py | impeller/tools/build_metal_library.py | # Copyright 2013 The Flutter Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import sys
import argparse
import errno
import os
import subprocess
def MakeDirectories(path):
try:
os.makedirs(path)
except OSError as exc:... | # Copyright 2013 The Flutter Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import sys
import argparse
import errno
import os
import subprocess
def MakeDirectories(path):
try:
os.makedirs(path)
except OSError as exc:... | Add FIXME to address removing debug information from generated shaders. | Add FIXME to address removing debug information from generated shaders.
| Python | bsd-3-clause | chinmaygarde/flutter_engine,rmacnak-google/engine,devoncarew/engine,devoncarew/engine,chinmaygarde/flutter_engine,devoncarew/engine,rmacnak-google/engine,rmacnak-google/engine,rmacnak-google/engine,flutter/engine,chinmaygarde/flutter_engine,chinmaygarde/flutter_engine,flutter/engine,chinmaygarde/flutter_engine,rmacnak-... | # Copyright 2013 The Flutter Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import sys
import argparse
import errno
import os
import subprocess
def MakeDirectories(path):
try:
os.makedirs(path)
except OSError as exc:... | # Copyright 2013 The Flutter Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import sys
import argparse
import errno
import os
import subprocess
def MakeDirectories(path):
try:
os.makedirs(path)
except OSError as exc:... | <commit_before># Copyright 2013 The Flutter Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import sys
import argparse
import errno
import os
import subprocess
def MakeDirectories(path):
try:
os.makedirs(path)
except ... | # Copyright 2013 The Flutter Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import sys
import argparse
import errno
import os
import subprocess
def MakeDirectories(path):
try:
os.makedirs(path)
except OSError as exc:... | # Copyright 2013 The Flutter Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import sys
import argparse
import errno
import os
import subprocess
def MakeDirectories(path):
try:
os.makedirs(path)
except OSError as exc:... | <commit_before># Copyright 2013 The Flutter Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import sys
import argparse
import errno
import os
import subprocess
def MakeDirectories(path):
try:
os.makedirs(path)
except ... |
18a874f312a57b4b9b7a5ce5cf9857585f0f0fef | truffe2/app/utils.py | truffe2/app/utils.py |
def add_current_unit(request):
"""Template context processor to add current unit"""
return {'CURRENT_UNIT': get_current_unit(request)}
def get_current_unit(request):
"""Return the current unit"""
from units.models import Unit
current_unit_pk = request.session.get('current_unit_pk', 1)
try... | from django.conf import settings
def add_current_unit(request):
"""Template context processor to add current unit"""
return {'CURRENT_UNIT': get_current_unit(request)}
def get_current_unit(request):
"""Return the current unit"""
from units.models import Unit
current_unit_pk = request.session.g... | Fix error if no units | Fix error if no units
| Python | bsd-2-clause | agepoly/truffe2,ArcaniteSolutions/truffe2,ArcaniteSolutions/truffe2,agepoly/truffe2,agepoly/truffe2,ArcaniteSolutions/truffe2,agepoly/truffe2,ArcaniteSolutions/truffe2 |
def add_current_unit(request):
"""Template context processor to add current unit"""
return {'CURRENT_UNIT': get_current_unit(request)}
def get_current_unit(request):
"""Return the current unit"""
from units.models import Unit
current_unit_pk = request.session.get('current_unit_pk', 1)
try... | from django.conf import settings
def add_current_unit(request):
"""Template context processor to add current unit"""
return {'CURRENT_UNIT': get_current_unit(request)}
def get_current_unit(request):
"""Return the current unit"""
from units.models import Unit
current_unit_pk = request.session.g... | <commit_before>
def add_current_unit(request):
"""Template context processor to add current unit"""
return {'CURRENT_UNIT': get_current_unit(request)}
def get_current_unit(request):
"""Return the current unit"""
from units.models import Unit
current_unit_pk = request.session.get('current_unit_p... | from django.conf import settings
def add_current_unit(request):
"""Template context processor to add current unit"""
return {'CURRENT_UNIT': get_current_unit(request)}
def get_current_unit(request):
"""Return the current unit"""
from units.models import Unit
current_unit_pk = request.session.g... |
def add_current_unit(request):
"""Template context processor to add current unit"""
return {'CURRENT_UNIT': get_current_unit(request)}
def get_current_unit(request):
"""Return the current unit"""
from units.models import Unit
current_unit_pk = request.session.get('current_unit_pk', 1)
try... | <commit_before>
def add_current_unit(request):
"""Template context processor to add current unit"""
return {'CURRENT_UNIT': get_current_unit(request)}
def get_current_unit(request):
"""Return the current unit"""
from units.models import Unit
current_unit_pk = request.session.get('current_unit_p... |
0a1358f27db3abb04032fac1b8a3da09d846d23e | oauth_provider/utils.py | oauth_provider/utils.py | import oauth.oauth as oauth
from django.conf import settings
from django.http import HttpResponse
from stores import DataStore
OAUTH_REALM_KEY_NAME = 'OAUTH_REALM_KEY_NAME'
def initialize_server_request(request):
"""Shortcut for initialization."""
oauth_request = oauth.OAuthRequest.from_request(request.meth... | import oauth.oauth as oauth
from django.conf import settings
from django.http import HttpResponse
from stores import DataStore
OAUTH_REALM_KEY_NAME = 'OAUTH_REALM_KEY_NAME'
def initialize_server_request(request):
"""Shortcut for initialization."""
# Django converts Authorization header in HTTP_AUTHORIZATION... | Fix a bug introduced in the latest revision, testing auth header in initialize_server_request now, thanks Chris McMichael for the report and patch | Fix a bug introduced in the latest revision, testing auth header in initialize_server_request now, thanks Chris McMichael for the report and patch
| Python | bsd-3-clause | e-loue/django-oauth-plus | import oauth.oauth as oauth
from django.conf import settings
from django.http import HttpResponse
from stores import DataStore
OAUTH_REALM_KEY_NAME = 'OAUTH_REALM_KEY_NAME'
def initialize_server_request(request):
"""Shortcut for initialization."""
oauth_request = oauth.OAuthRequest.from_request(request.meth... | import oauth.oauth as oauth
from django.conf import settings
from django.http import HttpResponse
from stores import DataStore
OAUTH_REALM_KEY_NAME = 'OAUTH_REALM_KEY_NAME'
def initialize_server_request(request):
"""Shortcut for initialization."""
# Django converts Authorization header in HTTP_AUTHORIZATION... | <commit_before>import oauth.oauth as oauth
from django.conf import settings
from django.http import HttpResponse
from stores import DataStore
OAUTH_REALM_KEY_NAME = 'OAUTH_REALM_KEY_NAME'
def initialize_server_request(request):
"""Shortcut for initialization."""
oauth_request = oauth.OAuthRequest.from_reque... | import oauth.oauth as oauth
from django.conf import settings
from django.http import HttpResponse
from stores import DataStore
OAUTH_REALM_KEY_NAME = 'OAUTH_REALM_KEY_NAME'
def initialize_server_request(request):
"""Shortcut for initialization."""
# Django converts Authorization header in HTTP_AUTHORIZATION... | import oauth.oauth as oauth
from django.conf import settings
from django.http import HttpResponse
from stores import DataStore
OAUTH_REALM_KEY_NAME = 'OAUTH_REALM_KEY_NAME'
def initialize_server_request(request):
"""Shortcut for initialization."""
oauth_request = oauth.OAuthRequest.from_request(request.meth... | <commit_before>import oauth.oauth as oauth
from django.conf import settings
from django.http import HttpResponse
from stores import DataStore
OAUTH_REALM_KEY_NAME = 'OAUTH_REALM_KEY_NAME'
def initialize_server_request(request):
"""Shortcut for initialization."""
oauth_request = oauth.OAuthRequest.from_reque... |
1fa0eb2c792b3cc89d27b322c80548f022b7fbb9 | api/base/exceptions.py | api/base/exceptions.py | from rest_framework.exceptions import APIException
from rest_framework import status
def jsonapi_exception_handler(exc, context):
"""
Custom exception handler that returns errors object as an array with a 'detail' member
"""
from rest_framework.views import exception_handler
response = exception_ha... |
from rest_framework import status
from rest_framework.exceptions import APIException
def json_api_exception_handler(exc, context):
"""
Custom exception handler that returns errors object as an array
"""
from rest_framework.views import exception_handler
response = exception_handler(exc, context)
... | Modify exception handler to cover multiple data types i.e. dict and list and handle when more than one error returned | Modify exception handler to cover multiple data types i.e. dict and list and handle when more than one error returned
| Python | apache-2.0 | monikagrabowska/osf.io,hmoco/osf.io,asanfilippo7/osf.io,njantrania/osf.io,sloria/osf.io,MerlinZhang/osf.io,acshi/osf.io,mluke93/osf.io,asanfilippo7/osf.io,Johnetordoff/osf.io,haoyuchen1992/osf.io,ckc6cz/osf.io,GageGaskins/osf.io,chrisseto/osf.io,ticklemepierce/osf.io,chennan47/osf.io,caseyrygt/osf.io,DanielSBrown/osf.i... | from rest_framework.exceptions import APIException
from rest_framework import status
def jsonapi_exception_handler(exc, context):
"""
Custom exception handler that returns errors object as an array with a 'detail' member
"""
from rest_framework.views import exception_handler
response = exception_ha... |
from rest_framework import status
from rest_framework.exceptions import APIException
def json_api_exception_handler(exc, context):
"""
Custom exception handler that returns errors object as an array
"""
from rest_framework.views import exception_handler
response = exception_handler(exc, context)
... | <commit_before>from rest_framework.exceptions import APIException
from rest_framework import status
def jsonapi_exception_handler(exc, context):
"""
Custom exception handler that returns errors object as an array with a 'detail' member
"""
from rest_framework.views import exception_handler
response... |
from rest_framework import status
from rest_framework.exceptions import APIException
def json_api_exception_handler(exc, context):
"""
Custom exception handler that returns errors object as an array
"""
from rest_framework.views import exception_handler
response = exception_handler(exc, context)
... | from rest_framework.exceptions import APIException
from rest_framework import status
def jsonapi_exception_handler(exc, context):
"""
Custom exception handler that returns errors object as an array with a 'detail' member
"""
from rest_framework.views import exception_handler
response = exception_ha... | <commit_before>from rest_framework.exceptions import APIException
from rest_framework import status
def jsonapi_exception_handler(exc, context):
"""
Custom exception handler that returns errors object as an array with a 'detail' member
"""
from rest_framework.views import exception_handler
response... |
4c1bf1757baa5beec50377724961c528f5985864 | ptest/screencapturer.py | ptest/screencapturer.py | import threading
import traceback
import plogger
__author__ = 'karl.gong'
def take_screen_shot():
current_thread = threading.currentThread()
active_browser = current_thread.get_property("browser")
if active_browser is not None:
while True:
try:
active_browser.switch... | import threading
import traceback
import StringIO
import plogger
try:
from PIL import ImageGrab
except ImportError:
PIL_installed = False
else:
PIL_installed = True
try:
import wx
except ImportError:
wxpython_installed = False
else:
wxpython_installed = True
__author__ = 'karl.gong'
def t... | Support capture screenshot for no-selenium test | Support capture screenshot for no-selenium test
| Python | apache-2.0 | KarlGong/ptest,KarlGong/ptest | import threading
import traceback
import plogger
__author__ = 'karl.gong'
def take_screen_shot():
current_thread = threading.currentThread()
active_browser = current_thread.get_property("browser")
if active_browser is not None:
while True:
try:
active_browser.switch... | import threading
import traceback
import StringIO
import plogger
try:
from PIL import ImageGrab
except ImportError:
PIL_installed = False
else:
PIL_installed = True
try:
import wx
except ImportError:
wxpython_installed = False
else:
wxpython_installed = True
__author__ = 'karl.gong'
def t... | <commit_before>import threading
import traceback
import plogger
__author__ = 'karl.gong'
def take_screen_shot():
current_thread = threading.currentThread()
active_browser = current_thread.get_property("browser")
if active_browser is not None:
while True:
try:
active... | import threading
import traceback
import StringIO
import plogger
try:
from PIL import ImageGrab
except ImportError:
PIL_installed = False
else:
PIL_installed = True
try:
import wx
except ImportError:
wxpython_installed = False
else:
wxpython_installed = True
__author__ = 'karl.gong'
def t... | import threading
import traceback
import plogger
__author__ = 'karl.gong'
def take_screen_shot():
current_thread = threading.currentThread()
active_browser = current_thread.get_property("browser")
if active_browser is not None:
while True:
try:
active_browser.switch... | <commit_before>import threading
import traceback
import plogger
__author__ = 'karl.gong'
def take_screen_shot():
current_thread = threading.currentThread()
active_browser = current_thread.get_property("browser")
if active_browser is not None:
while True:
try:
active... |
c82f0f10ea8b96377ebed8a6859ff3cd8ed4cd3f | python/turbodbc/exceptions.py | python/turbodbc/exceptions.py | from __future__ import absolute_import
from functools import wraps
from exceptions import StandardError
from turbodbc_intern import Error as InternError
class Error(StandardError):
pass
class InterfaceError(Error):
pass
class DatabaseError(Error):
pass
def translate_exceptions(f):
@wraps(f)
... | from __future__ import absolute_import
from functools import wraps
from turbodbc_intern import Error as InternError
# Python 2/3 compatibility
try:
from exceptions import StandardError as _BaseError
except ImportError:
_BaseError = Exception
class Error(_BaseError):
pass
class InterfaceError(Error):... | Fix Python 2/3 exception base class compatibility | Fix Python 2/3 exception base class compatibility
| Python | mit | blue-yonder/turbodbc,blue-yonder/turbodbc,blue-yonder/turbodbc,blue-yonder/turbodbc | from __future__ import absolute_import
from functools import wraps
from exceptions import StandardError
from turbodbc_intern import Error as InternError
class Error(StandardError):
pass
class InterfaceError(Error):
pass
class DatabaseError(Error):
pass
def translate_exceptions(f):
@wraps(f)
... | from __future__ import absolute_import
from functools import wraps
from turbodbc_intern import Error as InternError
# Python 2/3 compatibility
try:
from exceptions import StandardError as _BaseError
except ImportError:
_BaseError = Exception
class Error(_BaseError):
pass
class InterfaceError(Error):... | <commit_before>from __future__ import absolute_import
from functools import wraps
from exceptions import StandardError
from turbodbc_intern import Error as InternError
class Error(StandardError):
pass
class InterfaceError(Error):
pass
class DatabaseError(Error):
pass
def translate_exceptions(f):
... | from __future__ import absolute_import
from functools import wraps
from turbodbc_intern import Error as InternError
# Python 2/3 compatibility
try:
from exceptions import StandardError as _BaseError
except ImportError:
_BaseError = Exception
class Error(_BaseError):
pass
class InterfaceError(Error):... | from __future__ import absolute_import
from functools import wraps
from exceptions import StandardError
from turbodbc_intern import Error as InternError
class Error(StandardError):
pass
class InterfaceError(Error):
pass
class DatabaseError(Error):
pass
def translate_exceptions(f):
@wraps(f)
... | <commit_before>from __future__ import absolute_import
from functools import wraps
from exceptions import StandardError
from turbodbc_intern import Error as InternError
class Error(StandardError):
pass
class InterfaceError(Error):
pass
class DatabaseError(Error):
pass
def translate_exceptions(f):
... |
80f1ee23f85aee9a54e0c6cae7a30dddbe96541b | scorecard/tests/test_views.py | scorecard/tests/test_views.py | import json
from infrastructure.models import FinancialYear
from django.test import (
TransactionTestCase,
Client,
override_settings,
)
from . import (
import_data,
)
from .resources import (
GeographyResource,
MunicipalityProfileResource,
MedianGroupResource,
RatingCountGroupResource,... | import json
from django.test import (
TransactionTestCase,
Client,
override_settings,
)
@override_settings(
SITE_ID=2,
STATICFILES_STORAGE="django.contrib.staticfiles.storage.StaticFilesStorage",
)
class GeographyDetailViewTestCase(TransactionTestCase):
serialized_rollback = True
fixtures... | Use new fixtures for geography views test | Use new fixtures for geography views test
| Python | mit | Code4SA/municipal-data,Code4SA/municipal-data,Code4SA/municipal-data,Code4SA/municipal-data | import json
from infrastructure.models import FinancialYear
from django.test import (
TransactionTestCase,
Client,
override_settings,
)
from . import (
import_data,
)
from .resources import (
GeographyResource,
MunicipalityProfileResource,
MedianGroupResource,
RatingCountGroupResource,... | import json
from django.test import (
TransactionTestCase,
Client,
override_settings,
)
@override_settings(
SITE_ID=2,
STATICFILES_STORAGE="django.contrib.staticfiles.storage.StaticFilesStorage",
)
class GeographyDetailViewTestCase(TransactionTestCase):
serialized_rollback = True
fixtures... | <commit_before>import json
from infrastructure.models import FinancialYear
from django.test import (
TransactionTestCase,
Client,
override_settings,
)
from . import (
import_data,
)
from .resources import (
GeographyResource,
MunicipalityProfileResource,
MedianGroupResource,
RatingCoun... | import json
from django.test import (
TransactionTestCase,
Client,
override_settings,
)
@override_settings(
SITE_ID=2,
STATICFILES_STORAGE="django.contrib.staticfiles.storage.StaticFilesStorage",
)
class GeographyDetailViewTestCase(TransactionTestCase):
serialized_rollback = True
fixtures... | import json
from infrastructure.models import FinancialYear
from django.test import (
TransactionTestCase,
Client,
override_settings,
)
from . import (
import_data,
)
from .resources import (
GeographyResource,
MunicipalityProfileResource,
MedianGroupResource,
RatingCountGroupResource,... | <commit_before>import json
from infrastructure.models import FinancialYear
from django.test import (
TransactionTestCase,
Client,
override_settings,
)
from . import (
import_data,
)
from .resources import (
GeographyResource,
MunicipalityProfileResource,
MedianGroupResource,
RatingCoun... |
4666849791cad70ae1bb907a2dcc35ccfc0b7de4 | backend/populate_dimkarakostas.py | backend/populate_dimkarakostas.py | from string import ascii_lowercase
import django
import os
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'backend.settings')
django.setup()
from breach.models import Target, Victim
endpoint = 'https://dimkarakostas.com/rupture/test.php?ref=%s'
prefix = 'imper'
alphabet = ascii_lowercase
secretlength = 9
target_1 ... | from string import ascii_lowercase
import django
import os
import string
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'backend.settings')
django.setup()
from breach.models import Target, Victim
endpoint = 'https://dimkarakostas.com/rupture/test.php?ref=%s'
prefix = 'imper'
alphabet = ascii_lowercase
secretlength ... | Update dimkarakostas population with alignmentalphabet | Update dimkarakostas population with alignmentalphabet
| Python | mit | esarafianou/rupture,dionyziz/rupture,esarafianou/rupture,dionyziz/rupture,dimriou/rupture,dionyziz/rupture,dimriou/rupture,esarafianou/rupture,dionyziz/rupture,dimkarakostas/rupture,esarafianou/rupture,dimkarakostas/rupture,dionyziz/rupture,dimriou/rupture,dimkarakostas/rupture,dimkarakostas/rupture,dimkarakostas/ruptu... | from string import ascii_lowercase
import django
import os
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'backend.settings')
django.setup()
from breach.models import Target, Victim
endpoint = 'https://dimkarakostas.com/rupture/test.php?ref=%s'
prefix = 'imper'
alphabet = ascii_lowercase
secretlength = 9
target_1 ... | from string import ascii_lowercase
import django
import os
import string
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'backend.settings')
django.setup()
from breach.models import Target, Victim
endpoint = 'https://dimkarakostas.com/rupture/test.php?ref=%s'
prefix = 'imper'
alphabet = ascii_lowercase
secretlength ... | <commit_before>from string import ascii_lowercase
import django
import os
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'backend.settings')
django.setup()
from breach.models import Target, Victim
endpoint = 'https://dimkarakostas.com/rupture/test.php?ref=%s'
prefix = 'imper'
alphabet = ascii_lowercase
secretlength... | from string import ascii_lowercase
import django
import os
import string
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'backend.settings')
django.setup()
from breach.models import Target, Victim
endpoint = 'https://dimkarakostas.com/rupture/test.php?ref=%s'
prefix = 'imper'
alphabet = ascii_lowercase
secretlength ... | from string import ascii_lowercase
import django
import os
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'backend.settings')
django.setup()
from breach.models import Target, Victim
endpoint = 'https://dimkarakostas.com/rupture/test.php?ref=%s'
prefix = 'imper'
alphabet = ascii_lowercase
secretlength = 9
target_1 ... | <commit_before>from string import ascii_lowercase
import django
import os
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'backend.settings')
django.setup()
from breach.models import Target, Victim
endpoint = 'https://dimkarakostas.com/rupture/test.php?ref=%s'
prefix = 'imper'
alphabet = ascii_lowercase
secretlength... |
1b74dc0288d1f3349e5045f6791c8495435c961d | controlers/errors.py | controlers/errors.py | '''Copyright(C): Leaf Johnson 2011
This file is part of makeclub.
makeclub is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later versi... | '''Copyright(C): Leaf Johnson 2011
This file is part of makeclub.
makeclub is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later versi... | Fix bug - error page could display message now | Fix bug - error page could display message now
| Python | agpl-3.0 | cardmaster/makeclub,cardmaster/makeclub,cardmaster/makeclub | '''Copyright(C): Leaf Johnson 2011
This file is part of makeclub.
makeclub is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later versi... | '''Copyright(C): Leaf Johnson 2011
This file is part of makeclub.
makeclub is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later versi... | <commit_before>'''Copyright(C): Leaf Johnson 2011
This file is part of makeclub.
makeclub is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) ... | '''Copyright(C): Leaf Johnson 2011
This file is part of makeclub.
makeclub is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later versi... | '''Copyright(C): Leaf Johnson 2011
This file is part of makeclub.
makeclub is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later versi... | <commit_before>'''Copyright(C): Leaf Johnson 2011
This file is part of makeclub.
makeclub is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) ... |
8abdce9c60c9d2ead839e0065d35128ec16a82a1 | chatterbot/__main__.py | chatterbot/__main__.py | import sys
if __name__ == '__main__':
import chatterbot
if '--version' in sys.argv:
print(chatterbot.__version__)
if 'list_nltk_data' in sys.argv:
import nltk.data
print('\n'.join(nltk.data.path))
| import sys
if __name__ == '__main__':
import chatterbot
if '--version' in sys.argv:
print(chatterbot.__version__)
if 'list_nltk_data' in sys.argv:
import os
import nltk.data
data_directories = []
# Find each data directory in the NLTK path that has content
... | Add commad line utility to find NLTK data | Add commad line utility to find NLTK data
| Python | bsd-3-clause | gunthercox/ChatterBot,vkosuri/ChatterBot | import sys
if __name__ == '__main__':
import chatterbot
if '--version' in sys.argv:
print(chatterbot.__version__)
if 'list_nltk_data' in sys.argv:
import nltk.data
print('\n'.join(nltk.data.path))
Add commad line utility to find NLTK data | import sys
if __name__ == '__main__':
import chatterbot
if '--version' in sys.argv:
print(chatterbot.__version__)
if 'list_nltk_data' in sys.argv:
import os
import nltk.data
data_directories = []
# Find each data directory in the NLTK path that has content
... | <commit_before>import sys
if __name__ == '__main__':
import chatterbot
if '--version' in sys.argv:
print(chatterbot.__version__)
if 'list_nltk_data' in sys.argv:
import nltk.data
print('\n'.join(nltk.data.path))
<commit_msg>Add commad line utility to find NLTK data<commit_after> | import sys
if __name__ == '__main__':
import chatterbot
if '--version' in sys.argv:
print(chatterbot.__version__)
if 'list_nltk_data' in sys.argv:
import os
import nltk.data
data_directories = []
# Find each data directory in the NLTK path that has content
... | import sys
if __name__ == '__main__':
import chatterbot
if '--version' in sys.argv:
print(chatterbot.__version__)
if 'list_nltk_data' in sys.argv:
import nltk.data
print('\n'.join(nltk.data.path))
Add commad line utility to find NLTK dataimport sys
if __name__ == '__main__':
... | <commit_before>import sys
if __name__ == '__main__':
import chatterbot
if '--version' in sys.argv:
print(chatterbot.__version__)
if 'list_nltk_data' in sys.argv:
import nltk.data
print('\n'.join(nltk.data.path))
<commit_msg>Add commad line utility to find NLTK data<commit_after>... |
210c7b7fb421a7c083b9d292370b15c0ece17fa7 | source/bark/__init__.py | source/bark/__init__.py | # :coding: utf-8
# :copyright: Copyright (c) 2013 Martin Pengelly-Phillips
# :license: See LICENSE.txt.
from .handler.distribute import Distribute
#: Top level handler responsible for relaying all logs to other handlers.
handle = Distribute()
| # :coding: utf-8
# :copyright: Copyright (c) 2013 Martin Pengelly-Phillips
# :license: See LICENSE.txt.
from .handler.distribute import Distribute
#: Top level handler responsible for relaying all logs to other handlers.
handler = Distribute()
handlers = handler.handlers
handle = handler.handle
| Correct handler reference variable name and add convenient accessors. | Correct handler reference variable name and add convenient accessors.
| Python | apache-2.0 | 4degrees/mill,4degrees/sawmill | # :coding: utf-8
# :copyright: Copyright (c) 2013 Martin Pengelly-Phillips
# :license: See LICENSE.txt.
from .handler.distribute import Distribute
#: Top level handler responsible for relaying all logs to other handlers.
handle = Distribute()
Correct handler reference variable name and add convenient accessors. | # :coding: utf-8
# :copyright: Copyright (c) 2013 Martin Pengelly-Phillips
# :license: See LICENSE.txt.
from .handler.distribute import Distribute
#: Top level handler responsible for relaying all logs to other handlers.
handler = Distribute()
handlers = handler.handlers
handle = handler.handle
| <commit_before># :coding: utf-8
# :copyright: Copyright (c) 2013 Martin Pengelly-Phillips
# :license: See LICENSE.txt.
from .handler.distribute import Distribute
#: Top level handler responsible for relaying all logs to other handlers.
handle = Distribute()
<commit_msg>Correct handler reference variable name and add... | # :coding: utf-8
# :copyright: Copyright (c) 2013 Martin Pengelly-Phillips
# :license: See LICENSE.txt.
from .handler.distribute import Distribute
#: Top level handler responsible for relaying all logs to other handlers.
handler = Distribute()
handlers = handler.handlers
handle = handler.handle
| # :coding: utf-8
# :copyright: Copyright (c) 2013 Martin Pengelly-Phillips
# :license: See LICENSE.txt.
from .handler.distribute import Distribute
#: Top level handler responsible for relaying all logs to other handlers.
handle = Distribute()
Correct handler reference variable name and add convenient accessors.# :co... | <commit_before># :coding: utf-8
# :copyright: Copyright (c) 2013 Martin Pengelly-Phillips
# :license: See LICENSE.txt.
from .handler.distribute import Distribute
#: Top level handler responsible for relaying all logs to other handlers.
handle = Distribute()
<commit_msg>Correct handler reference variable name and add... |
c1f7544138990dc6dbb05090711d57e6fea36fb4 | pava/implementation/tests/__init__.py | pava/implementation/tests/__init__.py | import unittest
import arrays
ArrayTest = arrays.ArrayTest
class PavaTest(unittest.TestCase):
def test_general(self):
pass
if __name__ == "__main__":
unittest.main()
| Create all.py to run all tests | Create all.py to run all tests
| Python | mit | laffra/pava,laffra/pava | import unittest
import arrays
ArrayTest = arrays.ArrayTest
class PavaTest(unittest.TestCase):
def test_general(self):
pass
if __name__ == "__main__":
unittest.main()
Create all.py to run all tests | <commit_before>import unittest
import arrays
ArrayTest = arrays.ArrayTest
class PavaTest(unittest.TestCase):
def test_general(self):
pass
if __name__ == "__main__":
unittest.main()
<commit_msg>Create all.py to run all tests<commit_after> | import unittest
import arrays
ArrayTest = arrays.ArrayTest
class PavaTest(unittest.TestCase):
def test_general(self):
pass
if __name__ == "__main__":
unittest.main()
Create all.py to run all tests
| <commit_before>import unittest
import arrays
ArrayTest = arrays.ArrayTest
class PavaTest(unittest.TestCase):
def test_general(self):
pass
if __name__ == "__main__":
unittest.main()
<commit_msg>Create all.py to run all tests<commit_after>
| |||
696a79069ad1db1caee4d6da0c3c48dbd79f9157 | sqliteschema/_logger.py | sqliteschema/_logger.py | # encoding: utf-8
"""
.. codeauthor:: Tsuyoshi Hombashi <gogogo.vm@gmail.com>
"""
from __future__ import absolute_import
from __future__ import unicode_literals
import logbook
import pytablewriter
import simplesqlite
logger = logbook.Logger("sqliteschema")
logger.disable()
def set_logger(is_enable):
pytablew... | # encoding: utf-8
"""
.. codeauthor:: Tsuyoshi Hombashi <gogogo.vm@gmail.com>
"""
from __future__ import absolute_import
from __future__ import unicode_literals
import logbook
import pytablewriter
import simplesqlite
logger = logbook.Logger("sqliteschema")
logger.disable()
def set_logger(is_enable):
if is_en... | Modify to avoid excessive logger initialization | Modify to avoid excessive logger initialization
| Python | mit | thombashi/sqliteschema | # encoding: utf-8
"""
.. codeauthor:: Tsuyoshi Hombashi <gogogo.vm@gmail.com>
"""
from __future__ import absolute_import
from __future__ import unicode_literals
import logbook
import pytablewriter
import simplesqlite
logger = logbook.Logger("sqliteschema")
logger.disable()
def set_logger(is_enable):
pytablew... | # encoding: utf-8
"""
.. codeauthor:: Tsuyoshi Hombashi <gogogo.vm@gmail.com>
"""
from __future__ import absolute_import
from __future__ import unicode_literals
import logbook
import pytablewriter
import simplesqlite
logger = logbook.Logger("sqliteschema")
logger.disable()
def set_logger(is_enable):
if is_en... | <commit_before># encoding: utf-8
"""
.. codeauthor:: Tsuyoshi Hombashi <gogogo.vm@gmail.com>
"""
from __future__ import absolute_import
from __future__ import unicode_literals
import logbook
import pytablewriter
import simplesqlite
logger = logbook.Logger("sqliteschema")
logger.disable()
def set_logger(is_enable... | # encoding: utf-8
"""
.. codeauthor:: Tsuyoshi Hombashi <gogogo.vm@gmail.com>
"""
from __future__ import absolute_import
from __future__ import unicode_literals
import logbook
import pytablewriter
import simplesqlite
logger = logbook.Logger("sqliteschema")
logger.disable()
def set_logger(is_enable):
if is_en... | # encoding: utf-8
"""
.. codeauthor:: Tsuyoshi Hombashi <gogogo.vm@gmail.com>
"""
from __future__ import absolute_import
from __future__ import unicode_literals
import logbook
import pytablewriter
import simplesqlite
logger = logbook.Logger("sqliteschema")
logger.disable()
def set_logger(is_enable):
pytablew... | <commit_before># encoding: utf-8
"""
.. codeauthor:: Tsuyoshi Hombashi <gogogo.vm@gmail.com>
"""
from __future__ import absolute_import
from __future__ import unicode_literals
import logbook
import pytablewriter
import simplesqlite
logger = logbook.Logger("sqliteschema")
logger.disable()
def set_logger(is_enable... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.