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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
f19471414a1517fad1bca015c9ba3aaa4e8e8fda | setup.py | setup.py | from setuptools import setup, find_packages
setup(
name = "gitoriouslib",
version = "0.1",
packages = find_packages(),
install_requires = ['httplib2>=0.7.2']
)
| from setuptools import setup, find_packages
setup(
name = "gitoriouslib",
version = "0.1",
packages = find_packages(),
install_requires = ['httplib2>=0.7.2'],
entry_points = {
'console_scripts': [
'glcreate = gitoriouslib.cmd:create_repo',
'gldelete = gitoriouslib.cmd... | Add entry point scripts for CLI create/delete | Add entry point scripts for CLI create/delete
| Python | apache-2.0 | locke105/gitoriouslib | from setuptools import setup, find_packages
setup(
name = "gitoriouslib",
version = "0.1",
packages = find_packages(),
install_requires = ['httplib2>=0.7.2']
)
Add entry point scripts for CLI create/delete | from setuptools import setup, find_packages
setup(
name = "gitoriouslib",
version = "0.1",
packages = find_packages(),
install_requires = ['httplib2>=0.7.2'],
entry_points = {
'console_scripts': [
'glcreate = gitoriouslib.cmd:create_repo',
'gldelete = gitoriouslib.cmd... | <commit_before>from setuptools import setup, find_packages
setup(
name = "gitoriouslib",
version = "0.1",
packages = find_packages(),
install_requires = ['httplib2>=0.7.2']
)
<commit_msg>Add entry point scripts for CLI create/delete<commit_after> | from setuptools import setup, find_packages
setup(
name = "gitoriouslib",
version = "0.1",
packages = find_packages(),
install_requires = ['httplib2>=0.7.2'],
entry_points = {
'console_scripts': [
'glcreate = gitoriouslib.cmd:create_repo',
'gldelete = gitoriouslib.cmd... | from setuptools import setup, find_packages
setup(
name = "gitoriouslib",
version = "0.1",
packages = find_packages(),
install_requires = ['httplib2>=0.7.2']
)
Add entry point scripts for CLI create/deletefrom setuptools import setup, find_packages
setup(
name = "gitoriouslib",
version = "0.1",
... | <commit_before>from setuptools import setup, find_packages
setup(
name = "gitoriouslib",
version = "0.1",
packages = find_packages(),
install_requires = ['httplib2>=0.7.2']
)
<commit_msg>Add entry point scripts for CLI create/delete<commit_after>from setuptools import setup, find_packages
setup(
nam... |
58faca0b65d2d64f1112f323bd843fc2b23fd086 | setup.py | setup.py | import subprocess
import sys
from setuptools import Command, setup
class RunTests(Command):
user_options = []
def initialize_options(self):
pass
def finalize_options(self):
pass
def run(self):
errno = subprocess.call([sys.executable, '-m', 'unittest', 'gis_metadata.tests.te... | import subprocess
import sys
from setuptools import Command, setup
class RunTests(Command):
user_options = []
def initialize_options(self):
pass
def finalize_options(self):
pass
def run(self):
errno = subprocess.call([sys.executable, '-m', 'unittest', 'gis_metadata.tests.te... | Increment version after fix to frozendict version | Increment version after fix to frozendict version | Python | bsd-3-clause | consbio/gis-metadata-parser | import subprocess
import sys
from setuptools import Command, setup
class RunTests(Command):
user_options = []
def initialize_options(self):
pass
def finalize_options(self):
pass
def run(self):
errno = subprocess.call([sys.executable, '-m', 'unittest', 'gis_metadata.tests.te... | import subprocess
import sys
from setuptools import Command, setup
class RunTests(Command):
user_options = []
def initialize_options(self):
pass
def finalize_options(self):
pass
def run(self):
errno = subprocess.call([sys.executable, '-m', 'unittest', 'gis_metadata.tests.te... | <commit_before>import subprocess
import sys
from setuptools import Command, setup
class RunTests(Command):
user_options = []
def initialize_options(self):
pass
def finalize_options(self):
pass
def run(self):
errno = subprocess.call([sys.executable, '-m', 'unittest', 'gis_me... | import subprocess
import sys
from setuptools import Command, setup
class RunTests(Command):
user_options = []
def initialize_options(self):
pass
def finalize_options(self):
pass
def run(self):
errno = subprocess.call([sys.executable, '-m', 'unittest', 'gis_metadata.tests.te... | import subprocess
import sys
from setuptools import Command, setup
class RunTests(Command):
user_options = []
def initialize_options(self):
pass
def finalize_options(self):
pass
def run(self):
errno = subprocess.call([sys.executable, '-m', 'unittest', 'gis_metadata.tests.te... | <commit_before>import subprocess
import sys
from setuptools import Command, setup
class RunTests(Command):
user_options = []
def initialize_options(self):
pass
def finalize_options(self):
pass
def run(self):
errno = subprocess.call([sys.executable, '-m', 'unittest', 'gis_me... |
4c95937d43f6ec769412b0cb8b58546ecb5617ec | setup.py | setup.py | from distutils.core import setup
setup(
name='jute',
packages=['jute'],
package_dir={'jute': 'python3/jute'},
version='0.1',
description='Yet another interface module for Python',
author='Jonathan Patrick Giddy',
author_email='[email protected]',
url='https://github.com/jongiddy/jute',
... | from distutils.core import setup
setup(
name='jute',
packages=['jute'],
package_dir={'jute': 'python3/jute'},
version='0.1.0',
description='An interface module that verifies both providers and callers',
author='Jonathan Patrick Giddy',
author_email='[email protected]',
url='https://gith... | Change the tagline for PyPI | Change the tagline for PyPI
| Python | mit | jongiddy/jute,jongiddy/jute | from distutils.core import setup
setup(
name='jute',
packages=['jute'],
package_dir={'jute': 'python3/jute'},
version='0.1',
description='Yet another interface module for Python',
author='Jonathan Patrick Giddy',
author_email='[email protected]',
url='https://github.com/jongiddy/jute',
... | from distutils.core import setup
setup(
name='jute',
packages=['jute'],
package_dir={'jute': 'python3/jute'},
version='0.1.0',
description='An interface module that verifies both providers and callers',
author='Jonathan Patrick Giddy',
author_email='[email protected]',
url='https://gith... | <commit_before>from distutils.core import setup
setup(
name='jute',
packages=['jute'],
package_dir={'jute': 'python3/jute'},
version='0.1',
description='Yet another interface module for Python',
author='Jonathan Patrick Giddy',
author_email='[email protected]',
url='https://github.com/j... | from distutils.core import setup
setup(
name='jute',
packages=['jute'],
package_dir={'jute': 'python3/jute'},
version='0.1.0',
description='An interface module that verifies both providers and callers',
author='Jonathan Patrick Giddy',
author_email='[email protected]',
url='https://gith... | from distutils.core import setup
setup(
name='jute',
packages=['jute'],
package_dir={'jute': 'python3/jute'},
version='0.1',
description='Yet another interface module for Python',
author='Jonathan Patrick Giddy',
author_email='[email protected]',
url='https://github.com/jongiddy/jute',
... | <commit_before>from distutils.core import setup
setup(
name='jute',
packages=['jute'],
package_dir={'jute': 'python3/jute'},
version='0.1',
description='Yet another interface module for Python',
author='Jonathan Patrick Giddy',
author_email='[email protected]',
url='https://github.com/j... |
4d1d4c6730c2d09ec387267f5eebbcc24f70ed38 | setup.py | setup.py | #!/usr/bin/env python
from setuptools import setup
setup(
name='requests-facebook',
version='0.3.0',
install_requires=['requests>=1.0.0'],
author='Mike Helmick',
author_email='[email protected]',
license='BSD',
url='https://github.com/michaelhelmick/requests-facebook/',
keywords='p... | #!/usr/bin/env python
from setuptools import setup
setup(
name='requests-facebook',
version='0.4.0',
install_requires=['requests>=1.0.0'],
author='Mike Helmick',
author_email='[email protected]',
license='BSD',
url='https://github.com/michaelhelmick/requests-facebook/',
keywords='p... | Upgrade requests-facebook version to 0.4.0 | Upgrade requests-facebook version to 0.4.0
| Python | bsd-2-clause | michaelhelmick/requests-facebook | #!/usr/bin/env python
from setuptools import setup
setup(
name='requests-facebook',
version='0.3.0',
install_requires=['requests>=1.0.0'],
author='Mike Helmick',
author_email='[email protected]',
license='BSD',
url='https://github.com/michaelhelmick/requests-facebook/',
keywords='p... | #!/usr/bin/env python
from setuptools import setup
setup(
name='requests-facebook',
version='0.4.0',
install_requires=['requests>=1.0.0'],
author='Mike Helmick',
author_email='[email protected]',
license='BSD',
url='https://github.com/michaelhelmick/requests-facebook/',
keywords='p... | <commit_before>#!/usr/bin/env python
from setuptools import setup
setup(
name='requests-facebook',
version='0.3.0',
install_requires=['requests>=1.0.0'],
author='Mike Helmick',
author_email='[email protected]',
license='BSD',
url='https://github.com/michaelhelmick/requests-facebook/',
... | #!/usr/bin/env python
from setuptools import setup
setup(
name='requests-facebook',
version='0.4.0',
install_requires=['requests>=1.0.0'],
author='Mike Helmick',
author_email='[email protected]',
license='BSD',
url='https://github.com/michaelhelmick/requests-facebook/',
keywords='p... | #!/usr/bin/env python
from setuptools import setup
setup(
name='requests-facebook',
version='0.3.0',
install_requires=['requests>=1.0.0'],
author='Mike Helmick',
author_email='[email protected]',
license='BSD',
url='https://github.com/michaelhelmick/requests-facebook/',
keywords='p... | <commit_before>#!/usr/bin/env python
from setuptools import setup
setup(
name='requests-facebook',
version='0.3.0',
install_requires=['requests>=1.0.0'],
author='Mike Helmick',
author_email='[email protected]',
license='BSD',
url='https://github.com/michaelhelmick/requests-facebook/',
... |
9b2a016c5652d65aa8f223c0554d1766721ac2a8 | setup.py | setup.py | import io
import os
import re
from setuptools import setup, find_packages
def find_version():
file_dir = os.path.dirname(__file__)
with io.open(os.path.join(file_dir, 'auth0', '__init__.py')) as f:
version = re.search(r'^__version__ = [\'"]([^\'"]*)[\'"]', f.read())
if version:
ret... | import io
import os
import re
from setuptools import setup, find_packages
def find_version():
file_dir = os.path.dirname(__file__)
with io.open(os.path.join(file_dir, 'auth0', '__init__.py')) as f:
version = re.search(r'^__version__ = [\'"]([^\'"]*)[\'"]', f.read())
if version:
ret... | Remove 3.1 and 3.2 from python_requires (and classifiers) to allow it to still install for those versions | Remove 3.1 and 3.2 from python_requires (and classifiers) to allow it to still install for those versions
| Python | mit | auth0/auth0-python,auth0/auth0-python | import io
import os
import re
from setuptools import setup, find_packages
def find_version():
file_dir = os.path.dirname(__file__)
with io.open(os.path.join(file_dir, 'auth0', '__init__.py')) as f:
version = re.search(r'^__version__ = [\'"]([^\'"]*)[\'"]', f.read())
if version:
ret... | import io
import os
import re
from setuptools import setup, find_packages
def find_version():
file_dir = os.path.dirname(__file__)
with io.open(os.path.join(file_dir, 'auth0', '__init__.py')) as f:
version = re.search(r'^__version__ = [\'"]([^\'"]*)[\'"]', f.read())
if version:
ret... | <commit_before>import io
import os
import re
from setuptools import setup, find_packages
def find_version():
file_dir = os.path.dirname(__file__)
with io.open(os.path.join(file_dir, 'auth0', '__init__.py')) as f:
version = re.search(r'^__version__ = [\'"]([^\'"]*)[\'"]', f.read())
if version:
... | import io
import os
import re
from setuptools import setup, find_packages
def find_version():
file_dir = os.path.dirname(__file__)
with io.open(os.path.join(file_dir, 'auth0', '__init__.py')) as f:
version = re.search(r'^__version__ = [\'"]([^\'"]*)[\'"]', f.read())
if version:
ret... | import io
import os
import re
from setuptools import setup, find_packages
def find_version():
file_dir = os.path.dirname(__file__)
with io.open(os.path.join(file_dir, 'auth0', '__init__.py')) as f:
version = re.search(r'^__version__ = [\'"]([^\'"]*)[\'"]', f.read())
if version:
ret... | <commit_before>import io
import os
import re
from setuptools import setup, find_packages
def find_version():
file_dir = os.path.dirname(__file__)
with io.open(os.path.join(file_dir, 'auth0', '__init__.py')) as f:
version = re.search(r'^__version__ = [\'"]([^\'"]*)[\'"]', f.read())
if version:
... |
44e88adcc2ba62892828e1ec98543dff9218524a | setup.py | setup.py | __author__ = 'katharine'
import sys
from setuptools import setup, find_packages
requires = [
'backports.ssl-match-hostname==3.4.0.2',
'gevent>=1.1b5',
'gevent-websocket==0.9.3',
'greenlet==0.4.9',
'peewee==2.4.7',
'pygeoip==0.3.2',
'pypng==0.0.17',
'python-dateutil==2.4.1',
'requests==2.5.0',
'sh=... | __author__ = 'katharine'
import sys
from setuptools import setup, find_packages
requires = [
'backports.ssl-match-hostname==3.4.0.2',
'gevent>=1.1b5',
'gevent-websocket==0.9.3',
'greenlet==0.4.9',
'peewee==2.4.7',
'pygeoip==0.3.2',
'pypng==0.0.17',
'python-dateutil==2.4.1',
'requests==2.5.0',
'sh=... | Address review comments, remove zip_safe=True because GeoIP | Address review comments, remove zip_safe=True because GeoIP
| Python | mit | pebble/pypkjs | __author__ = 'katharine'
import sys
from setuptools import setup, find_packages
requires = [
'backports.ssl-match-hostname==3.4.0.2',
'gevent>=1.1b5',
'gevent-websocket==0.9.3',
'greenlet==0.4.9',
'peewee==2.4.7',
'pygeoip==0.3.2',
'pypng==0.0.17',
'python-dateutil==2.4.1',
'requests==2.5.0',
'sh=... | __author__ = 'katharine'
import sys
from setuptools import setup, find_packages
requires = [
'backports.ssl-match-hostname==3.4.0.2',
'gevent>=1.1b5',
'gevent-websocket==0.9.3',
'greenlet==0.4.9',
'peewee==2.4.7',
'pygeoip==0.3.2',
'pypng==0.0.17',
'python-dateutil==2.4.1',
'requests==2.5.0',
'sh=... | <commit_before>__author__ = 'katharine'
import sys
from setuptools import setup, find_packages
requires = [
'backports.ssl-match-hostname==3.4.0.2',
'gevent>=1.1b5',
'gevent-websocket==0.9.3',
'greenlet==0.4.9',
'peewee==2.4.7',
'pygeoip==0.3.2',
'pypng==0.0.17',
'python-dateutil==2.4.1',
'requests=... | __author__ = 'katharine'
import sys
from setuptools import setup, find_packages
requires = [
'backports.ssl-match-hostname==3.4.0.2',
'gevent>=1.1b5',
'gevent-websocket==0.9.3',
'greenlet==0.4.9',
'peewee==2.4.7',
'pygeoip==0.3.2',
'pypng==0.0.17',
'python-dateutil==2.4.1',
'requests==2.5.0',
'sh=... | __author__ = 'katharine'
import sys
from setuptools import setup, find_packages
requires = [
'backports.ssl-match-hostname==3.4.0.2',
'gevent>=1.1b5',
'gevent-websocket==0.9.3',
'greenlet==0.4.9',
'peewee==2.4.7',
'pygeoip==0.3.2',
'pypng==0.0.17',
'python-dateutil==2.4.1',
'requests==2.5.0',
'sh=... | <commit_before>__author__ = 'katharine'
import sys
from setuptools import setup, find_packages
requires = [
'backports.ssl-match-hostname==3.4.0.2',
'gevent>=1.1b5',
'gevent-websocket==0.9.3',
'greenlet==0.4.9',
'peewee==2.4.7',
'pygeoip==0.3.2',
'pypng==0.0.17',
'python-dateutil==2.4.1',
'requests=... |
b1e5ed0fa032550395c18fbebab629144e5fed36 | setup.py | setup.py | import sys
from setuptools import setup
from setuptools.extension import Extension
#XXX gettid only works on Linux, don't bother else
if 'linux' in sys.platform:
exts = [Extension('_libgettid', sources=['_libgettid.c'])]
else:
exts = []
setup(
name='mmstats',
version='0.1',
license='BSD',
aut... | import sys
from setuptools import setup
from setuptools.extension import Extension
#XXX gettid only works on Linux, don't bother else
if 'linux' in sys.platform:
exts = [Extension('_libgettid', sources=['_libgettid.c'])]
else:
exts = []
setup(
name='mmstats',
version='0.1',
license='BSD',
aut... | Add missing libgettid to py_modules | Add missing libgettid to py_modules
| Python | bsd-3-clause | schmichael/mmstats,schmichael/mmstats,schmichael/mmstats,schmichael/mmstats | import sys
from setuptools import setup
from setuptools.extension import Extension
#XXX gettid only works on Linux, don't bother else
if 'linux' in sys.platform:
exts = [Extension('_libgettid', sources=['_libgettid.c'])]
else:
exts = []
setup(
name='mmstats',
version='0.1',
license='BSD',
aut... | import sys
from setuptools import setup
from setuptools.extension import Extension
#XXX gettid only works on Linux, don't bother else
if 'linux' in sys.platform:
exts = [Extension('_libgettid', sources=['_libgettid.c'])]
else:
exts = []
setup(
name='mmstats',
version='0.1',
license='BSD',
aut... | <commit_before>import sys
from setuptools import setup
from setuptools.extension import Extension
#XXX gettid only works on Linux, don't bother else
if 'linux' in sys.platform:
exts = [Extension('_libgettid', sources=['_libgettid.c'])]
else:
exts = []
setup(
name='mmstats',
version='0.1',
license... | import sys
from setuptools import setup
from setuptools.extension import Extension
#XXX gettid only works on Linux, don't bother else
if 'linux' in sys.platform:
exts = [Extension('_libgettid', sources=['_libgettid.c'])]
else:
exts = []
setup(
name='mmstats',
version='0.1',
license='BSD',
aut... | import sys
from setuptools import setup
from setuptools.extension import Extension
#XXX gettid only works on Linux, don't bother else
if 'linux' in sys.platform:
exts = [Extension('_libgettid', sources=['_libgettid.c'])]
else:
exts = []
setup(
name='mmstats',
version='0.1',
license='BSD',
aut... | <commit_before>import sys
from setuptools import setup
from setuptools.extension import Extension
#XXX gettid only works on Linux, don't bother else
if 'linux' in sys.platform:
exts = [Extension('_libgettid', sources=['_libgettid.c'])]
else:
exts = []
setup(
name='mmstats',
version='0.1',
license... |
556eada791fca84432e36c3e1fcf722ecf0580ff | setup.py | setup.py | from __future__ import absolute_import
from setuptools import setup, find_packages
long_desc = """
Transform Excel spreadsheets
"""
# See https://pypi.python.org/pypi?%3Aaction=list_classifiers for classifiers
conf = dict(
name='databaker',
version='1.2.1',
description="DataBaker, part of QuickCode for ON... | from setuptools import setup, find_packages
long_desc = """
Transform Excel spreadsheets
"""
# See https://pypi.python.org/pypi?%3Aaction=list_classifiers for classifiers
conf = dict(
name='databaker',
version='1.2.1',
description="DataBaker, part of QuickCode for ONS",
long_description=long_desc,
... | Remove an overlooked from __future__ import | Remove an overlooked from __future__ import
| Python | agpl-3.0 | scraperwiki/databaker,scraperwiki/databaker | from __future__ import absolute_import
from setuptools import setup, find_packages
long_desc = """
Transform Excel spreadsheets
"""
# See https://pypi.python.org/pypi?%3Aaction=list_classifiers for classifiers
conf = dict(
name='databaker',
version='1.2.1',
description="DataBaker, part of QuickCode for ON... | from setuptools import setup, find_packages
long_desc = """
Transform Excel spreadsheets
"""
# See https://pypi.python.org/pypi?%3Aaction=list_classifiers for classifiers
conf = dict(
name='databaker',
version='1.2.1',
description="DataBaker, part of QuickCode for ONS",
long_description=long_desc,
... | <commit_before>from __future__ import absolute_import
from setuptools import setup, find_packages
long_desc = """
Transform Excel spreadsheets
"""
# See https://pypi.python.org/pypi?%3Aaction=list_classifiers for classifiers
conf = dict(
name='databaker',
version='1.2.1',
description="DataBaker, part of Q... | from setuptools import setup, find_packages
long_desc = """
Transform Excel spreadsheets
"""
# See https://pypi.python.org/pypi?%3Aaction=list_classifiers for classifiers
conf = dict(
name='databaker',
version='1.2.1',
description="DataBaker, part of QuickCode for ONS",
long_description=long_desc,
... | from __future__ import absolute_import
from setuptools import setup, find_packages
long_desc = """
Transform Excel spreadsheets
"""
# See https://pypi.python.org/pypi?%3Aaction=list_classifiers for classifiers
conf = dict(
name='databaker',
version='1.2.1',
description="DataBaker, part of QuickCode for ON... | <commit_before>from __future__ import absolute_import
from setuptools import setup, find_packages
long_desc = """
Transform Excel spreadsheets
"""
# See https://pypi.python.org/pypi?%3Aaction=list_classifiers for classifiers
conf = dict(
name='databaker',
version='1.2.1',
description="DataBaker, part of Q... |
510b52357e6266faec6338abd8fed46102acceca | setup.py | setup.py | # Copyright (c) 2015 CaT Concepts and Training GmbH
try:
from setuptools import setup, find_packages, Command
except ImportError:
from ez_setup import use_setuptools
use_setuptools()
from setuptools import setup, find_packages, Command
import platform
import os
import subprocess
import sys
if platf... | # Copyright (c) 2015 CaT Concepts and Training GmbH
try:
from setuptools import setup, find_packages, Command
except ImportError:
from ez_setup import use_setuptools
use_setuptools()
from setuptools import setup, find_packages, Command
import platform
import os
import subprocess
import sys
if platf... | Bump version: 0.0.2 -> 0.0.3 | Bump version: 0.0.2 -> 0.0.3
PyPI won't let me delete the 0.0.2 release, so we have to issue a new one to add the project URL.
| Python | mit | jameshy/libtree,conceptsandtraining/libtree | # Copyright (c) 2015 CaT Concepts and Training GmbH
try:
from setuptools import setup, find_packages, Command
except ImportError:
from ez_setup import use_setuptools
use_setuptools()
from setuptools import setup, find_packages, Command
import platform
import os
import subprocess
import sys
if platf... | # Copyright (c) 2015 CaT Concepts and Training GmbH
try:
from setuptools import setup, find_packages, Command
except ImportError:
from ez_setup import use_setuptools
use_setuptools()
from setuptools import setup, find_packages, Command
import platform
import os
import subprocess
import sys
if platf... | <commit_before># Copyright (c) 2015 CaT Concepts and Training GmbH
try:
from setuptools import setup, find_packages, Command
except ImportError:
from ez_setup import use_setuptools
use_setuptools()
from setuptools import setup, find_packages, Command
import platform
import os
import subprocess
import... | # Copyright (c) 2015 CaT Concepts and Training GmbH
try:
from setuptools import setup, find_packages, Command
except ImportError:
from ez_setup import use_setuptools
use_setuptools()
from setuptools import setup, find_packages, Command
import platform
import os
import subprocess
import sys
if platf... | # Copyright (c) 2015 CaT Concepts and Training GmbH
try:
from setuptools import setup, find_packages, Command
except ImportError:
from ez_setup import use_setuptools
use_setuptools()
from setuptools import setup, find_packages, Command
import platform
import os
import subprocess
import sys
if platf... | <commit_before># Copyright (c) 2015 CaT Concepts and Training GmbH
try:
from setuptools import setup, find_packages, Command
except ImportError:
from ez_setup import use_setuptools
use_setuptools()
from setuptools import setup, find_packages, Command
import platform
import os
import subprocess
import... |
5d57e9a6a456a6919bb6c39bd34dad76a2a6356f | setup.py | setup.py | #!/usr/bin/env python
"""
setup.py file for helium-client-python
"""
from distutils.core import setup, Extension
sourcefiles = ['src/helium_client.c',
'src/helium-serial.c',
'src/helium-client/helium-client.c',
'src/helium-client/cauterize/atom_api.c',
'src... | #!/usr/bin/env python
"""
setup.py file for helium-client-python
"""
from distutils.core import setup, Extension
sourcefiles = ['src/helium_client.c',
'src/helium-serial.c',
'src/helium-client/helium-client.c',
'src/helium-client/cauterize/atom_api.c',
'src... | Add gnu99 build flag for linuxy builds | Add gnu99 build flag for linuxy builds
| Python | bsd-3-clause | helium/helium-client-python,helium/helium-client-python | #!/usr/bin/env python
"""
setup.py file for helium-client-python
"""
from distutils.core import setup, Extension
sourcefiles = ['src/helium_client.c',
'src/helium-serial.c',
'src/helium-client/helium-client.c',
'src/helium-client/cauterize/atom_api.c',
'src... | #!/usr/bin/env python
"""
setup.py file for helium-client-python
"""
from distutils.core import setup, Extension
sourcefiles = ['src/helium_client.c',
'src/helium-serial.c',
'src/helium-client/helium-client.c',
'src/helium-client/cauterize/atom_api.c',
'src... | <commit_before>#!/usr/bin/env python
"""
setup.py file for helium-client-python
"""
from distutils.core import setup, Extension
sourcefiles = ['src/helium_client.c',
'src/helium-serial.c',
'src/helium-client/helium-client.c',
'src/helium-client/cauterize/atom_api.c',
... | #!/usr/bin/env python
"""
setup.py file for helium-client-python
"""
from distutils.core import setup, Extension
sourcefiles = ['src/helium_client.c',
'src/helium-serial.c',
'src/helium-client/helium-client.c',
'src/helium-client/cauterize/atom_api.c',
'src... | #!/usr/bin/env python
"""
setup.py file for helium-client-python
"""
from distutils.core import setup, Extension
sourcefiles = ['src/helium_client.c',
'src/helium-serial.c',
'src/helium-client/helium-client.c',
'src/helium-client/cauterize/atom_api.c',
'src... | <commit_before>#!/usr/bin/env python
"""
setup.py file for helium-client-python
"""
from distutils.core import setup, Extension
sourcefiles = ['src/helium_client.c',
'src/helium-serial.c',
'src/helium-client/helium-client.c',
'src/helium-client/cauterize/atom_api.c',
... |
cb7d601f6e983df6a9633804f5483470f7dce27f | setup.py | setup.py | __author__ = 'mbach'
import multiprocessing # avoid crash on teardown
from setuptools import setup, find_packages
setup(
name = 'Brandon',
version = '0.1-dev',
packages = find_packages(exclude=['tests']),
author='Matthias Bach',
author_email='[email protected]',
description='Fill ... | __author__ = 'mbach'
import multiprocessing # avoid crash on teardown
from setuptools import setup, find_packages
setup(
name = 'Brandon',
version = '0.1-dev',
packages = find_packages(exclude=['tests']),
author='Matthias Bach',
author_email='[email protected]',
description='Fill ... | Make sure wheel is installed. | Make sure wheel is installed.
| Python | bsd-3-clause | tylerdave/devpi-builder | __author__ = 'mbach'
import multiprocessing # avoid crash on teardown
from setuptools import setup, find_packages
setup(
name = 'Brandon',
version = '0.1-dev',
packages = find_packages(exclude=['tests']),
author='Matthias Bach',
author_email='[email protected]',
description='Fill ... | __author__ = 'mbach'
import multiprocessing # avoid crash on teardown
from setuptools import setup, find_packages
setup(
name = 'Brandon',
version = '0.1-dev',
packages = find_packages(exclude=['tests']),
author='Matthias Bach',
author_email='[email protected]',
description='Fill ... | <commit_before>__author__ = 'mbach'
import multiprocessing # avoid crash on teardown
from setuptools import setup, find_packages
setup(
name = 'Brandon',
version = '0.1-dev',
packages = find_packages(exclude=['tests']),
author='Matthias Bach',
author_email='[email protected]',
des... | __author__ = 'mbach'
import multiprocessing # avoid crash on teardown
from setuptools import setup, find_packages
setup(
name = 'Brandon',
version = '0.1-dev',
packages = find_packages(exclude=['tests']),
author='Matthias Bach',
author_email='[email protected]',
description='Fill ... | __author__ = 'mbach'
import multiprocessing # avoid crash on teardown
from setuptools import setup, find_packages
setup(
name = 'Brandon',
version = '0.1-dev',
packages = find_packages(exclude=['tests']),
author='Matthias Bach',
author_email='[email protected]',
description='Fill ... | <commit_before>__author__ = 'mbach'
import multiprocessing # avoid crash on teardown
from setuptools import setup, find_packages
setup(
name = 'Brandon',
version = '0.1-dev',
packages = find_packages(exclude=['tests']),
author='Matthias Bach',
author_email='[email protected]',
des... |
c3c48bdeeb772a43491f73690215aede6d171516 | setup.py | setup.py | #!/usr/bin/env python
try:
from setuptools import setup
extra = dict(test_suite="tests.test.suite", include_package_data=True)
except ImportError:
from distutils.core import setup
extra = {}
long_description = \
'''
qav is a Python library for console-based question and answering, with the
ability to ... | #!/usr/bin/env python
try:
from setuptools import setup
extra = dict(test_suite="tests.test.suite", include_package_data=True)
except ImportError:
from distutils.core import setup
extra = {}
long_description = \
'''
qav is a Python library for console-based question and answering, with the
ability to ... | Revert "Added netaddr as an install-time requirement." | Revert "Added netaddr as an install-time requirement."
This reverts commit a0bf258c63ad71b7301b51dcc8e470d43b4a9c82.
| Python | lgpl-2.1 | raushan802/qav,UMIACS/qav | #!/usr/bin/env python
try:
from setuptools import setup
extra = dict(test_suite="tests.test.suite", include_package_data=True)
except ImportError:
from distutils.core import setup
extra = {}
long_description = \
'''
qav is a Python library for console-based question and answering, with the
ability to ... | #!/usr/bin/env python
try:
from setuptools import setup
extra = dict(test_suite="tests.test.suite", include_package_data=True)
except ImportError:
from distutils.core import setup
extra = {}
long_description = \
'''
qav is a Python library for console-based question and answering, with the
ability to ... | <commit_before>#!/usr/bin/env python
try:
from setuptools import setup
extra = dict(test_suite="tests.test.suite", include_package_data=True)
except ImportError:
from distutils.core import setup
extra = {}
long_description = \
'''
qav is a Python library for console-based question and answering, with ... | #!/usr/bin/env python
try:
from setuptools import setup
extra = dict(test_suite="tests.test.suite", include_package_data=True)
except ImportError:
from distutils.core import setup
extra = {}
long_description = \
'''
qav is a Python library for console-based question and answering, with the
ability to ... | #!/usr/bin/env python
try:
from setuptools import setup
extra = dict(test_suite="tests.test.suite", include_package_data=True)
except ImportError:
from distutils.core import setup
extra = {}
long_description = \
'''
qav is a Python library for console-based question and answering, with the
ability to ... | <commit_before>#!/usr/bin/env python
try:
from setuptools import setup
extra = dict(test_suite="tests.test.suite", include_package_data=True)
except ImportError:
from distutils.core import setup
extra = {}
long_description = \
'''
qav is a Python library for console-based question and answering, with ... |
a9cd9a95f387fd62058b9fbb5597ef64e1e8c422 | setup.py | setup.py | from setuptools import setup
from os import path
import codecs
here = path.abspath(path.dirname(__file__))
with codecs.open(path.join(here, 'README.rst'), encoding='utf-8') as f:
long_description = f.read()
setup(
name='data-tracking',
version='1.5.11',
zip_safe=False,
url='https://github.com/LRE... | from setuptools import setup
from os import path
import codecs
here = path.abspath(path.dirname(__file__))
with codecs.open(path.join(here, 'README.rst'), encoding='utf-8') as f:
long_description = f.read()
setup(
name='data-tracking',
version='1.5.11',
zip_safe=False,
url='https://github.com/LRE... | Update to Apache Airflow 1.8.1 | Update to Apache Airflow 1.8.1
| Python | apache-2.0 | LREN-CHUV/mri-meta-extract,LREN-CHUV/mri-meta-extract | from setuptools import setup
from os import path
import codecs
here = path.abspath(path.dirname(__file__))
with codecs.open(path.join(here, 'README.rst'), encoding='utf-8') as f:
long_description = f.read()
setup(
name='data-tracking',
version='1.5.11',
zip_safe=False,
url='https://github.com/LRE... | from setuptools import setup
from os import path
import codecs
here = path.abspath(path.dirname(__file__))
with codecs.open(path.join(here, 'README.rst'), encoding='utf-8') as f:
long_description = f.read()
setup(
name='data-tracking',
version='1.5.11',
zip_safe=False,
url='https://github.com/LRE... | <commit_before>from setuptools import setup
from os import path
import codecs
here = path.abspath(path.dirname(__file__))
with codecs.open(path.join(here, 'README.rst'), encoding='utf-8') as f:
long_description = f.read()
setup(
name='data-tracking',
version='1.5.11',
zip_safe=False,
url='https:/... | from setuptools import setup
from os import path
import codecs
here = path.abspath(path.dirname(__file__))
with codecs.open(path.join(here, 'README.rst'), encoding='utf-8') as f:
long_description = f.read()
setup(
name='data-tracking',
version='1.5.11',
zip_safe=False,
url='https://github.com/LRE... | from setuptools import setup
from os import path
import codecs
here = path.abspath(path.dirname(__file__))
with codecs.open(path.join(here, 'README.rst'), encoding='utf-8') as f:
long_description = f.read()
setup(
name='data-tracking',
version='1.5.11',
zip_safe=False,
url='https://github.com/LRE... | <commit_before>from setuptools import setup
from os import path
import codecs
here = path.abspath(path.dirname(__file__))
with codecs.open(path.join(here, 'README.rst'), encoding='utf-8') as f:
long_description = f.read()
setup(
name='data-tracking',
version='1.5.11',
zip_safe=False,
url='https:/... |
8954f0d63dd45e9eec1a7f935870ac7c7d2d0bf2 | setup.py | setup.py | from setuptools import setup
setup(
name="pytest-xdist",
use_scm_version={'write_to': 'xdist/_version.py'},
description='py.test xdist plugin for distributed testing'
' and loop-on-failing modes',
long_description=open('README.rst').read(),
license='MIT',
author='holger krekel a... | from setuptools import setup
setup(
name="pytest-xdist",
use_scm_version={'write_to': 'xdist/_version.py'},
description='py.test xdist plugin for distributed testing'
' and loop-on-failing modes',
long_description=open('README.rst').read(),
license='MIT',
author='holger krekel a... | Add Framework::Pytest to list of classifiers | Add Framework::Pytest to list of classifiers
| Python | mit | pytest-dev/pytest-xdist,nicoddemus/pytest-xdist,RonnyPfannschmidt/pytest-xdist | from setuptools import setup
setup(
name="pytest-xdist",
use_scm_version={'write_to': 'xdist/_version.py'},
description='py.test xdist plugin for distributed testing'
' and loop-on-failing modes',
long_description=open('README.rst').read(),
license='MIT',
author='holger krekel a... | from setuptools import setup
setup(
name="pytest-xdist",
use_scm_version={'write_to': 'xdist/_version.py'},
description='py.test xdist plugin for distributed testing'
' and loop-on-failing modes',
long_description=open('README.rst').read(),
license='MIT',
author='holger krekel a... | <commit_before>from setuptools import setup
setup(
name="pytest-xdist",
use_scm_version={'write_to': 'xdist/_version.py'},
description='py.test xdist plugin for distributed testing'
' and loop-on-failing modes',
long_description=open('README.rst').read(),
license='MIT',
author='... | from setuptools import setup
setup(
name="pytest-xdist",
use_scm_version={'write_to': 'xdist/_version.py'},
description='py.test xdist plugin for distributed testing'
' and loop-on-failing modes',
long_description=open('README.rst').read(),
license='MIT',
author='holger krekel a... | from setuptools import setup
setup(
name="pytest-xdist",
use_scm_version={'write_to': 'xdist/_version.py'},
description='py.test xdist plugin for distributed testing'
' and loop-on-failing modes',
long_description=open('README.rst').read(),
license='MIT',
author='holger krekel a... | <commit_before>from setuptools import setup
setup(
name="pytest-xdist",
use_scm_version={'write_to': 'xdist/_version.py'},
description='py.test xdist plugin for distributed testing'
' and loop-on-failing modes',
long_description=open('README.rst').read(),
license='MIT',
author='... |
8b41a38b50b1676f500aeacf9e4d0ee93a92b2d1 | sometimes/decorators.py | sometimes/decorators.py | import random
in_percentage = lambda x: random.randint(1,100) <= x
"""
They've done studies, you know. 50% of the time,
it works every time.
"""
def sometimes(fn):
def wrapped(*args, **kwargs):
wrapped.x += 1
if wrapped.x % 2 == 1:
return fn(*args, **kwargs)
return
... | import random
in_percentage = lambda x: random.randint(1,100) <= x
"""
They've done studies, you know. 50% of the time,
it works every time.
"""
def sometimes(fn):
def wrapped(*args, **kwargs):
wrapped.x += 1
if wrapped.x % 2 == 1:
return fn(*args, **kwargs)
wrapped.x =... | Add rarely, mostly and other alias | Add rarely, mostly and other alias
| Python | mit | aaronbassett/sometimes | import random
in_percentage = lambda x: random.randint(1,100) <= x
"""
They've done studies, you know. 50% of the time,
it works every time.
"""
def sometimes(fn):
def wrapped(*args, **kwargs):
wrapped.x += 1
if wrapped.x % 2 == 1:
return fn(*args, **kwargs)
return
... | import random
in_percentage = lambda x: random.randint(1,100) <= x
"""
They've done studies, you know. 50% of the time,
it works every time.
"""
def sometimes(fn):
def wrapped(*args, **kwargs):
wrapped.x += 1
if wrapped.x % 2 == 1:
return fn(*args, **kwargs)
wrapped.x =... | <commit_before>import random
in_percentage = lambda x: random.randint(1,100) <= x
"""
They've done studies, you know. 50% of the time,
it works every time.
"""
def sometimes(fn):
def wrapped(*args, **kwargs):
wrapped.x += 1
if wrapped.x % 2 == 1:
return fn(*args, **kwargs)
... | import random
in_percentage = lambda x: random.randint(1,100) <= x
"""
They've done studies, you know. 50% of the time,
it works every time.
"""
def sometimes(fn):
def wrapped(*args, **kwargs):
wrapped.x += 1
if wrapped.x % 2 == 1:
return fn(*args, **kwargs)
wrapped.x =... | import random
in_percentage = lambda x: random.randint(1,100) <= x
"""
They've done studies, you know. 50% of the time,
it works every time.
"""
def sometimes(fn):
def wrapped(*args, **kwargs):
wrapped.x += 1
if wrapped.x % 2 == 1:
return fn(*args, **kwargs)
return
... | <commit_before>import random
in_percentage = lambda x: random.randint(1,100) <= x
"""
They've done studies, you know. 50% of the time,
it works every time.
"""
def sometimes(fn):
def wrapped(*args, **kwargs):
wrapped.x += 1
if wrapped.x % 2 == 1:
return fn(*args, **kwargs)
... |
51d6e5f994d0a081b8f381f7c4fbd2b54b78bb02 | xos/xos/apps.py | xos/xos/apps.py | from suit.apps import DjangoSuitConfig
class MyDjangoSuitConfig(DjangoSuitConfig):
admin_name = 'XOS'
menu_position = 'vertical'
menu_open_first_child = False
menu = (
{'label': 'Deployments', 'icon':'icon-deployment', 'url': '/admin/core/deployment/'},
{'label': 'Sites', 'icon':'icon-site'... | from suit.apps import DjangoSuitConfig
class MyDjangoSuitConfig(DjangoSuitConfig):
admin_name = 'XOS'
menu_position = 'vertical'
menu_open_first_child = False
menu = (
{'label': 'Deployments', 'icon':'icon-deployment', 'url': '/admin/core/deployment/'},
{'label': 'Sites', 'icon':'icon-site'... | Revert service grid to tabular view | Revert service grid to tabular view
| Python | apache-2.0 | cboling/xos,cboling/xos,cboling/xos,cboling/xos,cboling/xos | from suit.apps import DjangoSuitConfig
class MyDjangoSuitConfig(DjangoSuitConfig):
admin_name = 'XOS'
menu_position = 'vertical'
menu_open_first_child = False
menu = (
{'label': 'Deployments', 'icon':'icon-deployment', 'url': '/admin/core/deployment/'},
{'label': 'Sites', 'icon':'icon-site'... | from suit.apps import DjangoSuitConfig
class MyDjangoSuitConfig(DjangoSuitConfig):
admin_name = 'XOS'
menu_position = 'vertical'
menu_open_first_child = False
menu = (
{'label': 'Deployments', 'icon':'icon-deployment', 'url': '/admin/core/deployment/'},
{'label': 'Sites', 'icon':'icon-site'... | <commit_before>from suit.apps import DjangoSuitConfig
class MyDjangoSuitConfig(DjangoSuitConfig):
admin_name = 'XOS'
menu_position = 'vertical'
menu_open_first_child = False
menu = (
{'label': 'Deployments', 'icon':'icon-deployment', 'url': '/admin/core/deployment/'},
{'label': 'Sites', 'ic... | from suit.apps import DjangoSuitConfig
class MyDjangoSuitConfig(DjangoSuitConfig):
admin_name = 'XOS'
menu_position = 'vertical'
menu_open_first_child = False
menu = (
{'label': 'Deployments', 'icon':'icon-deployment', 'url': '/admin/core/deployment/'},
{'label': 'Sites', 'icon':'icon-site'... | from suit.apps import DjangoSuitConfig
class MyDjangoSuitConfig(DjangoSuitConfig):
admin_name = 'XOS'
menu_position = 'vertical'
menu_open_first_child = False
menu = (
{'label': 'Deployments', 'icon':'icon-deployment', 'url': '/admin/core/deployment/'},
{'label': 'Sites', 'icon':'icon-site'... | <commit_before>from suit.apps import DjangoSuitConfig
class MyDjangoSuitConfig(DjangoSuitConfig):
admin_name = 'XOS'
menu_position = 'vertical'
menu_open_first_child = False
menu = (
{'label': 'Deployments', 'icon':'icon-deployment', 'url': '/admin/core/deployment/'},
{'label': 'Sites', 'ic... |
4d212e2f796bc6e473292dab7a56ce74d7c96e41 | moksha/api/widgets/containers/dashboardcontainer.py | moksha/api/widgets/containers/dashboardcontainer.py | from moksha.api.widgets.layout.layout import layout_js, layout_css, ui_core_js, ui_draggable_js, ui_droppable_js, ui_sortable_js
from tw.api import Widget
from tw.jquery import jquery_js
from moksha.lib.helpers import eval_app_config, ConfigWrapper
from tg import config
class AppListWidget(Widget):
template = 'ma... | from tg import config
from tw.api import Widget
from moksha.lib.helpers import eval_app_config, ConfigWrapper
class AppListWidget(Widget):
template = 'mako:moksha.api.widgets.containers.templates.layout_applist'
properties = ['category']
def update_params(self, d):
super(AppListWidget, self).upda... | Clean up some of our dashboard container imports | Clean up some of our dashboard container imports
| Python | apache-2.0 | lmacken/moksha,ralphbean/moksha,pombredanne/moksha,pombredanne/moksha,ralphbean/moksha,pombredanne/moksha,lmacken/moksha,mokshaproject/moksha,ralphbean/moksha,pombredanne/moksha,mokshaproject/moksha,mokshaproject/moksha,lmacken/moksha,mokshaproject/moksha | from moksha.api.widgets.layout.layout import layout_js, layout_css, ui_core_js, ui_draggable_js, ui_droppable_js, ui_sortable_js
from tw.api import Widget
from tw.jquery import jquery_js
from moksha.lib.helpers import eval_app_config, ConfigWrapper
from tg import config
class AppListWidget(Widget):
template = 'ma... | from tg import config
from tw.api import Widget
from moksha.lib.helpers import eval_app_config, ConfigWrapper
class AppListWidget(Widget):
template = 'mako:moksha.api.widgets.containers.templates.layout_applist'
properties = ['category']
def update_params(self, d):
super(AppListWidget, self).upda... | <commit_before>from moksha.api.widgets.layout.layout import layout_js, layout_css, ui_core_js, ui_draggable_js, ui_droppable_js, ui_sortable_js
from tw.api import Widget
from tw.jquery import jquery_js
from moksha.lib.helpers import eval_app_config, ConfigWrapper
from tg import config
class AppListWidget(Widget):
... | from tg import config
from tw.api import Widget
from moksha.lib.helpers import eval_app_config, ConfigWrapper
class AppListWidget(Widget):
template = 'mako:moksha.api.widgets.containers.templates.layout_applist'
properties = ['category']
def update_params(self, d):
super(AppListWidget, self).upda... | from moksha.api.widgets.layout.layout import layout_js, layout_css, ui_core_js, ui_draggable_js, ui_droppable_js, ui_sortable_js
from tw.api import Widget
from tw.jquery import jquery_js
from moksha.lib.helpers import eval_app_config, ConfigWrapper
from tg import config
class AppListWidget(Widget):
template = 'ma... | <commit_before>from moksha.api.widgets.layout.layout import layout_js, layout_css, ui_core_js, ui_draggable_js, ui_droppable_js, ui_sortable_js
from tw.api import Widget
from tw.jquery import jquery_js
from moksha.lib.helpers import eval_app_config, ConfigWrapper
from tg import config
class AppListWidget(Widget):
... |
545e573c9542d33e80dfe5e7e6bb17487835e053 | profile_collection/startup/00-startup.py | profile_collection/startup/00-startup.py | import sys
import logging
import matplotlib.pyplot as plt
import numpy as np
plt.ion()
handler = logging.StreamHandler(sys.stderr)
fmt = logging.Formatter("%(asctime)-15s [%(name)5s:%(levelname)s] %(message)s")
handler.setFormatter(fmt)
logging.getLogger('hxntools').addHandler(handler)
logging.getLogger('hxnfly').ad... | import sys
import logging
import matplotlib.pyplot as plt
import numpy as np
plt.ion()
handler = logging.StreamHandler(sys.stderr)
fmt = logging.Formatter("%(asctime)-15s [%(name)5s:%(levelname)s] %(message)s")
handler.setFormatter(fmt)
handler.setLevel(logging.INFO)
logging.getLogger('hxntools').addHandler(handler... | Tweak logging configuration - record debug info, display info level | Tweak logging configuration - record debug info, display info level
| Python | bsd-2-clause | NSLS-II-HXN/ipython_ophyd,NSLS-II-HXN/ipython_ophyd | import sys
import logging
import matplotlib.pyplot as plt
import numpy as np
plt.ion()
handler = logging.StreamHandler(sys.stderr)
fmt = logging.Formatter("%(asctime)-15s [%(name)5s:%(levelname)s] %(message)s")
handler.setFormatter(fmt)
logging.getLogger('hxntools').addHandler(handler)
logging.getLogger('hxnfly').ad... | import sys
import logging
import matplotlib.pyplot as plt
import numpy as np
plt.ion()
handler = logging.StreamHandler(sys.stderr)
fmt = logging.Formatter("%(asctime)-15s [%(name)5s:%(levelname)s] %(message)s")
handler.setFormatter(fmt)
handler.setLevel(logging.INFO)
logging.getLogger('hxntools').addHandler(handler... | <commit_before>import sys
import logging
import matplotlib.pyplot as plt
import numpy as np
plt.ion()
handler = logging.StreamHandler(sys.stderr)
fmt = logging.Formatter("%(asctime)-15s [%(name)5s:%(levelname)s] %(message)s")
handler.setFormatter(fmt)
logging.getLogger('hxntools').addHandler(handler)
logging.getLogg... | import sys
import logging
import matplotlib.pyplot as plt
import numpy as np
plt.ion()
handler = logging.StreamHandler(sys.stderr)
fmt = logging.Formatter("%(asctime)-15s [%(name)5s:%(levelname)s] %(message)s")
handler.setFormatter(fmt)
handler.setLevel(logging.INFO)
logging.getLogger('hxntools').addHandler(handler... | import sys
import logging
import matplotlib.pyplot as plt
import numpy as np
plt.ion()
handler = logging.StreamHandler(sys.stderr)
fmt = logging.Formatter("%(asctime)-15s [%(name)5s:%(levelname)s] %(message)s")
handler.setFormatter(fmt)
logging.getLogger('hxntools').addHandler(handler)
logging.getLogger('hxnfly').ad... | <commit_before>import sys
import logging
import matplotlib.pyplot as plt
import numpy as np
plt.ion()
handler = logging.StreamHandler(sys.stderr)
fmt = logging.Formatter("%(asctime)-15s [%(name)5s:%(levelname)s] %(message)s")
handler.setFormatter(fmt)
logging.getLogger('hxntools').addHandler(handler)
logging.getLogg... |
4bc8d4016954e82fb566d7cf43ec21825a0e89de | indra/tests/test_tsv_assembler.py | indra/tests/test_tsv_assembler.py | import os
from indra.assemblers.tsv_assembler import TsvAssembler
from indra.sources.signor import SignorProcessor
# Get some statements from Signor
sp = SignorProcessor()
stmts = sp.statements
def test_tsv_init():
ta = TsvAssembler(stmts)
ta.make_model('tsv_test')
def test_tsv_add_stmts():
ta = TsvAssem... | import os
from indra.sources import signor
from indra.assemblers.tsv_assembler import TsvAssembler
# Get some statements from Signor
from .test_signor import test_data_file, test_complexes_file
sp = signor.process_from_file(test_data_file, test_complexes_file)
stmts = sp.statements
def test_tsv_init():
ta = TsvAs... | Fix TSV Assembler reference to Signor files | Fix TSV Assembler reference to Signor files
| Python | bsd-2-clause | sorgerlab/belpy,sorgerlab/belpy,johnbachman/indra,pvtodorov/indra,pvtodorov/indra,pvtodorov/indra,johnbachman/indra,johnbachman/belpy,johnbachman/belpy,sorgerlab/indra,sorgerlab/indra,pvtodorov/indra,johnbachman/belpy,sorgerlab/belpy,johnbachman/indra,sorgerlab/indra,bgyori/indra,bgyori/indra,bgyori/indra | import os
from indra.assemblers.tsv_assembler import TsvAssembler
from indra.sources.signor import SignorProcessor
# Get some statements from Signor
sp = SignorProcessor()
stmts = sp.statements
def test_tsv_init():
ta = TsvAssembler(stmts)
ta.make_model('tsv_test')
def test_tsv_add_stmts():
ta = TsvAssem... | import os
from indra.sources import signor
from indra.assemblers.tsv_assembler import TsvAssembler
# Get some statements from Signor
from .test_signor import test_data_file, test_complexes_file
sp = signor.process_from_file(test_data_file, test_complexes_file)
stmts = sp.statements
def test_tsv_init():
ta = TsvAs... | <commit_before>import os
from indra.assemblers.tsv_assembler import TsvAssembler
from indra.sources.signor import SignorProcessor
# Get some statements from Signor
sp = SignorProcessor()
stmts = sp.statements
def test_tsv_init():
ta = TsvAssembler(stmts)
ta.make_model('tsv_test')
def test_tsv_add_stmts():
... | import os
from indra.sources import signor
from indra.assemblers.tsv_assembler import TsvAssembler
# Get some statements from Signor
from .test_signor import test_data_file, test_complexes_file
sp = signor.process_from_file(test_data_file, test_complexes_file)
stmts = sp.statements
def test_tsv_init():
ta = TsvAs... | import os
from indra.assemblers.tsv_assembler import TsvAssembler
from indra.sources.signor import SignorProcessor
# Get some statements from Signor
sp = SignorProcessor()
stmts = sp.statements
def test_tsv_init():
ta = TsvAssembler(stmts)
ta.make_model('tsv_test')
def test_tsv_add_stmts():
ta = TsvAssem... | <commit_before>import os
from indra.assemblers.tsv_assembler import TsvAssembler
from indra.sources.signor import SignorProcessor
# Get some statements from Signor
sp = SignorProcessor()
stmts = sp.statements
def test_tsv_init():
ta = TsvAssembler(stmts)
ta.make_model('tsv_test')
def test_tsv_add_stmts():
... |
37715104dec586ea67b253e4e7ed35795cb5ea8c | track.py | track.py | # from google_measurement_protocol import Event, report
import uuid
GENDERS = {
'female': 'Gender Female',
'male': 'Gender Male'
}
def log_fetch(count, gender):
label = GENDERS.get(gender, 'Gender Neutral')
client_id = uuid.uuid4()
# event = Event('API', 'Fetch', label=label, value=count)
# ... | from google_measurement_protocol import event, report
import uuid
GENDERS = {
'female': 'Gender Female',
'male': 'Gender Male'
}
def log_fetch(count, gender):
label = GENDERS.get(gender, 'Gender Neutral')
client_id = uuid.uuid4()
data = event('API', 'Fetch', label=label, value=count)
report(... | Add google measurement protocol back | Add google measurement protocol back
| Python | mit | reneepadgham/diverseui,reneepadgham/diverseui,reneepadgham/diverseui | # from google_measurement_protocol import Event, report
import uuid
GENDERS = {
'female': 'Gender Female',
'male': 'Gender Male'
}
def log_fetch(count, gender):
label = GENDERS.get(gender, 'Gender Neutral')
client_id = uuid.uuid4()
# event = Event('API', 'Fetch', label=label, value=count)
# ... | from google_measurement_protocol import event, report
import uuid
GENDERS = {
'female': 'Gender Female',
'male': 'Gender Male'
}
def log_fetch(count, gender):
label = GENDERS.get(gender, 'Gender Neutral')
client_id = uuid.uuid4()
data = event('API', 'Fetch', label=label, value=count)
report(... | <commit_before># from google_measurement_protocol import Event, report
import uuid
GENDERS = {
'female': 'Gender Female',
'male': 'Gender Male'
}
def log_fetch(count, gender):
label = GENDERS.get(gender, 'Gender Neutral')
client_id = uuid.uuid4()
# event = Event('API', 'Fetch', label=label, valu... | from google_measurement_protocol import event, report
import uuid
GENDERS = {
'female': 'Gender Female',
'male': 'Gender Male'
}
def log_fetch(count, gender):
label = GENDERS.get(gender, 'Gender Neutral')
client_id = uuid.uuid4()
data = event('API', 'Fetch', label=label, value=count)
report(... | # from google_measurement_protocol import Event, report
import uuid
GENDERS = {
'female': 'Gender Female',
'male': 'Gender Male'
}
def log_fetch(count, gender):
label = GENDERS.get(gender, 'Gender Neutral')
client_id = uuid.uuid4()
# event = Event('API', 'Fetch', label=label, value=count)
# ... | <commit_before># from google_measurement_protocol import Event, report
import uuid
GENDERS = {
'female': 'Gender Female',
'male': 'Gender Male'
}
def log_fetch(count, gender):
label = GENDERS.get(gender, 'Gender Neutral')
client_id = uuid.uuid4()
# event = Event('API', 'Fetch', label=label, valu... |
30fae197ff6561a58df33868b3379a41d6a9d9dd | settings_test.py | settings_test.py | SQLALCHEMY_DATABASE_TEST_URI = 'postgresql://postgres:@localhost/pybossa'
GOOGLE_CLIENT_ID = ''
GOOGLE_CLIENT_SECRET = ''
TWITTER_CONSUMER_KEY=''
TWITTER_CONSUMER_SECRET=''
FACEBOOK_APP_ID=''
FACEBOOK_APP_SECRET=''
TERMSOFUSE = 'http://okfn.org/terms-of-use/'
DATAUSE = 'http://opendatacommons.org/licenses/by/'
ITSDANGE... | SQLALCHEMY_DATABASE_TEST_URI = 'postgresql://postgres:@localhost/pybossa'
GOOGLE_CLIENT_ID = ''
GOOGLE_CLIENT_SECRET = ''
TWITTER_CONSUMER_KEY=''
TWITTER_CONSUMER_SECRET=''
FACEBOOK_APP_ID=''
FACEBOOK_APP_SECRET=''
TERMSOFUSE = 'http://okfn.org/terms-of-use/'
DATAUSE = 'http://opendatacommons.org/licenses/by/'
ITSDANGE... | Add ENFORCE_PRIVACY to Travis testing settings. | Add ENFORCE_PRIVACY to Travis testing settings.
| Python | agpl-3.0 | geotagx/geotagx-pybossa-archive,inteligencia-coletiva-lsd/pybossa,Scifabric/pybossa,geotagx/geotagx-pybossa-archive,jean/pybossa,CulturePlex/pybossa,PyBossa/pybossa,geotagx/geotagx-pybossa-archive,CulturePlex/pybossa,inteligencia-coletiva-lsd/pybossa,OpenNewsLabs/pybossa,PyBossa/pybossa,OpenNewsLabs/pybossa,proyectos-a... | SQLALCHEMY_DATABASE_TEST_URI = 'postgresql://postgres:@localhost/pybossa'
GOOGLE_CLIENT_ID = ''
GOOGLE_CLIENT_SECRET = ''
TWITTER_CONSUMER_KEY=''
TWITTER_CONSUMER_SECRET=''
FACEBOOK_APP_ID=''
FACEBOOK_APP_SECRET=''
TERMSOFUSE = 'http://okfn.org/terms-of-use/'
DATAUSE = 'http://opendatacommons.org/licenses/by/'
ITSDANGE... | SQLALCHEMY_DATABASE_TEST_URI = 'postgresql://postgres:@localhost/pybossa'
GOOGLE_CLIENT_ID = ''
GOOGLE_CLIENT_SECRET = ''
TWITTER_CONSUMER_KEY=''
TWITTER_CONSUMER_SECRET=''
FACEBOOK_APP_ID=''
FACEBOOK_APP_SECRET=''
TERMSOFUSE = 'http://okfn.org/terms-of-use/'
DATAUSE = 'http://opendatacommons.org/licenses/by/'
ITSDANGE... | <commit_before>SQLALCHEMY_DATABASE_TEST_URI = 'postgresql://postgres:@localhost/pybossa'
GOOGLE_CLIENT_ID = ''
GOOGLE_CLIENT_SECRET = ''
TWITTER_CONSUMER_KEY=''
TWITTER_CONSUMER_SECRET=''
FACEBOOK_APP_ID=''
FACEBOOK_APP_SECRET=''
TERMSOFUSE = 'http://okfn.org/terms-of-use/'
DATAUSE = 'http://opendatacommons.org/license... | SQLALCHEMY_DATABASE_TEST_URI = 'postgresql://postgres:@localhost/pybossa'
GOOGLE_CLIENT_ID = ''
GOOGLE_CLIENT_SECRET = ''
TWITTER_CONSUMER_KEY=''
TWITTER_CONSUMER_SECRET=''
FACEBOOK_APP_ID=''
FACEBOOK_APP_SECRET=''
TERMSOFUSE = 'http://okfn.org/terms-of-use/'
DATAUSE = 'http://opendatacommons.org/licenses/by/'
ITSDANGE... | SQLALCHEMY_DATABASE_TEST_URI = 'postgresql://postgres:@localhost/pybossa'
GOOGLE_CLIENT_ID = ''
GOOGLE_CLIENT_SECRET = ''
TWITTER_CONSUMER_KEY=''
TWITTER_CONSUMER_SECRET=''
FACEBOOK_APP_ID=''
FACEBOOK_APP_SECRET=''
TERMSOFUSE = 'http://okfn.org/terms-of-use/'
DATAUSE = 'http://opendatacommons.org/licenses/by/'
ITSDANGE... | <commit_before>SQLALCHEMY_DATABASE_TEST_URI = 'postgresql://postgres:@localhost/pybossa'
GOOGLE_CLIENT_ID = ''
GOOGLE_CLIENT_SECRET = ''
TWITTER_CONSUMER_KEY=''
TWITTER_CONSUMER_SECRET=''
FACEBOOK_APP_ID=''
FACEBOOK_APP_SECRET=''
TERMSOFUSE = 'http://okfn.org/terms-of-use/'
DATAUSE = 'http://opendatacommons.org/license... |
d1e64b8cf97f8a89d61ecd5d5bd7f9ba6f5ff6b8 | extruct/jsonld.py | extruct/jsonld.py | # -*- coding: utf-8 -*-
"""
JSON-LD extractor
"""
import json
import re
import lxml.etree
import lxml.html
HTML_OR_JS_COMMENTLINE = re.compile('^\s*(//.*|<!--.*-->)')
class JsonLdExtractor(object):
_xp_jsonld = lxml.etree.XPath('descendant-or-self::script[@type="application/ld+json"]')
def extract(self, ... | # -*- coding: utf-8 -*-
"""
JSON-LD extractor
"""
import json
import re
import lxml.etree
import lxml.html
HTML_OR_JS_COMMENTLINE = re.compile('^\s*(//.*|<!--.*-->)')
class JsonLdExtractor(object):
_xp_jsonld = lxml.etree.XPath('descendant-or-self::script[@type="application/ld+json"]')
def extract(self, ... | Remove leading comments and allow control characters directly. | Mod: Remove leading comments and allow control characters directly.
| Python | bsd-3-clause | scrapinghub/extruct | # -*- coding: utf-8 -*-
"""
JSON-LD extractor
"""
import json
import re
import lxml.etree
import lxml.html
HTML_OR_JS_COMMENTLINE = re.compile('^\s*(//.*|<!--.*-->)')
class JsonLdExtractor(object):
_xp_jsonld = lxml.etree.XPath('descendant-or-self::script[@type="application/ld+json"]')
def extract(self, ... | # -*- coding: utf-8 -*-
"""
JSON-LD extractor
"""
import json
import re
import lxml.etree
import lxml.html
HTML_OR_JS_COMMENTLINE = re.compile('^\s*(//.*|<!--.*-->)')
class JsonLdExtractor(object):
_xp_jsonld = lxml.etree.XPath('descendant-or-self::script[@type="application/ld+json"]')
def extract(self, ... | <commit_before># -*- coding: utf-8 -*-
"""
JSON-LD extractor
"""
import json
import re
import lxml.etree
import lxml.html
HTML_OR_JS_COMMENTLINE = re.compile('^\s*(//.*|<!--.*-->)')
class JsonLdExtractor(object):
_xp_jsonld = lxml.etree.XPath('descendant-or-self::script[@type="application/ld+json"]')
def... | # -*- coding: utf-8 -*-
"""
JSON-LD extractor
"""
import json
import re
import lxml.etree
import lxml.html
HTML_OR_JS_COMMENTLINE = re.compile('^\s*(//.*|<!--.*-->)')
class JsonLdExtractor(object):
_xp_jsonld = lxml.etree.XPath('descendant-or-self::script[@type="application/ld+json"]')
def extract(self, ... | # -*- coding: utf-8 -*-
"""
JSON-LD extractor
"""
import json
import re
import lxml.etree
import lxml.html
HTML_OR_JS_COMMENTLINE = re.compile('^\s*(//.*|<!--.*-->)')
class JsonLdExtractor(object):
_xp_jsonld = lxml.etree.XPath('descendant-or-self::script[@type="application/ld+json"]')
def extract(self, ... | <commit_before># -*- coding: utf-8 -*-
"""
JSON-LD extractor
"""
import json
import re
import lxml.etree
import lxml.html
HTML_OR_JS_COMMENTLINE = re.compile('^\s*(//.*|<!--.*-->)')
class JsonLdExtractor(object):
_xp_jsonld = lxml.etree.XPath('descendant-or-self::script[@type="application/ld+json"]')
def... |
9f02929673389884d4dd261964b7b1be6c959caa | vault.py | vault.py | import os
import urllib2
import json
import sys
from urlparse import urljoin
from ansible import utils, errors
from ansible.utils import template
class LookupModule(object):
def __init__(self, basedir=None, **kwargs):
self.basedir = basedir
def run(self, terms, inject=None, **kwargs):
try:
... | import os
import urllib2
import json
import sys
from urlparse import urljoin
from ansible.errors import AnsibleError
from ansible.plugins.lookup import LookupBase
class LookupModule(LookupBase):
def run(self, terms, variables, **kwargs):
key = terms[0]
url = os.getenv('VAULT_ADDR')
if n... | Update plugin for ansible 2.0 | Update plugin for ansible 2.0
| Python | bsd-3-clause | jhaals/ansible-vault,jhaals/ansible-vault,locationlabs/ansible-vault | import os
import urllib2
import json
import sys
from urlparse import urljoin
from ansible import utils, errors
from ansible.utils import template
class LookupModule(object):
def __init__(self, basedir=None, **kwargs):
self.basedir = basedir
def run(self, terms, inject=None, **kwargs):
try:
... | import os
import urllib2
import json
import sys
from urlparse import urljoin
from ansible.errors import AnsibleError
from ansible.plugins.lookup import LookupBase
class LookupModule(LookupBase):
def run(self, terms, variables, **kwargs):
key = terms[0]
url = os.getenv('VAULT_ADDR')
if n... | <commit_before>import os
import urllib2
import json
import sys
from urlparse import urljoin
from ansible import utils, errors
from ansible.utils import template
class LookupModule(object):
def __init__(self, basedir=None, **kwargs):
self.basedir = basedir
def run(self, terms, inject=None, **kwargs):... | import os
import urllib2
import json
import sys
from urlparse import urljoin
from ansible.errors import AnsibleError
from ansible.plugins.lookup import LookupBase
class LookupModule(LookupBase):
def run(self, terms, variables, **kwargs):
key = terms[0]
url = os.getenv('VAULT_ADDR')
if n... | import os
import urllib2
import json
import sys
from urlparse import urljoin
from ansible import utils, errors
from ansible.utils import template
class LookupModule(object):
def __init__(self, basedir=None, **kwargs):
self.basedir = basedir
def run(self, terms, inject=None, **kwargs):
try:
... | <commit_before>import os
import urllib2
import json
import sys
from urlparse import urljoin
from ansible import utils, errors
from ansible.utils import template
class LookupModule(object):
def __init__(self, basedir=None, **kwargs):
self.basedir = basedir
def run(self, terms, inject=None, **kwargs):... |
5f8d59646875d4e4aa75ec22a2ddc666c1802a23 | readthedocs/core/utils/tasks/__init__.py | readthedocs/core/utils/tasks/__init__.py | from .permission_checks import user_id_matches
from .public import permission_check
from .public import get_public_task_data
from .retrieve import TaskNotFound
from .retrieve import get_task_data
| from .permission_checks import user_id_matches
from .public import PublicTask
from .public import TaskNoPermission
from .public import permission_check
from .public import get_public_task_data
from .retrieve import TaskNotFound
from .retrieve import get_task_data
| Revert previous commit by adding missing imports | Revert previous commit by adding missing imports
| Python | mit | rtfd/readthedocs.org,tddv/readthedocs.org,rtfd/readthedocs.org,rtfd/readthedocs.org,davidfischer/readthedocs.org,davidfischer/readthedocs.org,pombredanne/readthedocs.org,pombredanne/readthedocs.org,pombredanne/readthedocs.org,safwanrahman/readthedocs.org,tddv/readthedocs.org,davidfischer/readthedocs.org,tddv/readthedoc... | from .permission_checks import user_id_matches
from .public import permission_check
from .public import get_public_task_data
from .retrieve import TaskNotFound
from .retrieve import get_task_data
Revert previous commit by adding missing imports | from .permission_checks import user_id_matches
from .public import PublicTask
from .public import TaskNoPermission
from .public import permission_check
from .public import get_public_task_data
from .retrieve import TaskNotFound
from .retrieve import get_task_data
| <commit_before>from .permission_checks import user_id_matches
from .public import permission_check
from .public import get_public_task_data
from .retrieve import TaskNotFound
from .retrieve import get_task_data
<commit_msg>Revert previous commit by adding missing imports<commit_after> | from .permission_checks import user_id_matches
from .public import PublicTask
from .public import TaskNoPermission
from .public import permission_check
from .public import get_public_task_data
from .retrieve import TaskNotFound
from .retrieve import get_task_data
| from .permission_checks import user_id_matches
from .public import permission_check
from .public import get_public_task_data
from .retrieve import TaskNotFound
from .retrieve import get_task_data
Revert previous commit by adding missing importsfrom .permission_checks import user_id_matches
from .public import PublicTas... | <commit_before>from .permission_checks import user_id_matches
from .public import permission_check
from .public import get_public_task_data
from .retrieve import TaskNotFound
from .retrieve import get_task_data
<commit_msg>Revert previous commit by adding missing imports<commit_after>from .permission_checks import user... |
1706472a183d50fb11513345b4c82ac201a00306 | me_api/configs.py | me_api/configs.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from __future__ import absolute_import, unicode_literals
import json
from os import path
class Config(object):
cwd = path.abspath(path.dirname(__file__))
with open(path.join(cwd, 'me.json')) as me:
me = json.load(me)
with open(path.join(cwd, 'modules... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from __future__ import absolute_import, unicode_literals
import json
from os import path
class Config(object):
CACHE_TYPE = 'simple'
cwd = path.abspath(path.dirname(__file__))
with open(path.join(cwd, 'me.json')) as me:
me = json.load(me)
with o... | Move CACHE_TYPE to Config; add TestingConfig | Move CACHE_TYPE to Config; add TestingConfig
| Python | mit | lord63/me-api | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from __future__ import absolute_import, unicode_literals
import json
from os import path
class Config(object):
cwd = path.abspath(path.dirname(__file__))
with open(path.join(cwd, 'me.json')) as me:
me = json.load(me)
with open(path.join(cwd, 'modules... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from __future__ import absolute_import, unicode_literals
import json
from os import path
class Config(object):
CACHE_TYPE = 'simple'
cwd = path.abspath(path.dirname(__file__))
with open(path.join(cwd, 'me.json')) as me:
me = json.load(me)
with o... | <commit_before>#!/usr/bin/env python
# -*- coding: utf-8 -*-
from __future__ import absolute_import, unicode_literals
import json
from os import path
class Config(object):
cwd = path.abspath(path.dirname(__file__))
with open(path.join(cwd, 'me.json')) as me:
me = json.load(me)
with open(path.joi... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from __future__ import absolute_import, unicode_literals
import json
from os import path
class Config(object):
CACHE_TYPE = 'simple'
cwd = path.abspath(path.dirname(__file__))
with open(path.join(cwd, 'me.json')) as me:
me = json.load(me)
with o... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from __future__ import absolute_import, unicode_literals
import json
from os import path
class Config(object):
cwd = path.abspath(path.dirname(__file__))
with open(path.join(cwd, 'me.json')) as me:
me = json.load(me)
with open(path.join(cwd, 'modules... | <commit_before>#!/usr/bin/env python
# -*- coding: utf-8 -*-
from __future__ import absolute_import, unicode_literals
import json
from os import path
class Config(object):
cwd = path.abspath(path.dirname(__file__))
with open(path.join(cwd, 'me.json')) as me:
me = json.load(me)
with open(path.joi... |
9467cfc4fa3f0bd2c269f3d7b61460ddc6851f9f | tests/test_dfw_uncomparables.py | tests/test_dfw_uncomparables.py | """Test dfw.uncomparables."""
from check import Check
from proselint.checks.wallace import uncomparables as chk
class TestCheck(Check):
"""The test class for dfw.uncomparables."""
__test__ = True
@property
def this_check(self):
"""Bolierplate."""
return chk
def test_sample_phr... | """Test dfw.uncomparables."""
from check import Check
from proselint.checks.wallace import uncomparables as chk
class TestCheck(Check):
"""The test class for dfw.uncomparables."""
__test__ = True
@property
def this_check(self):
"""Bolierplate."""
return chk
def test_sample_phr... | Add test for exception to uncomparable check | Add test for exception to uncomparable check
| Python | bsd-3-clause | jstewmon/proselint,amperser/proselint,jstewmon/proselint,amperser/proselint,jstewmon/proselint,amperser/proselint,amperser/proselint,amperser/proselint | """Test dfw.uncomparables."""
from check import Check
from proselint.checks.wallace import uncomparables as chk
class TestCheck(Check):
"""The test class for dfw.uncomparables."""
__test__ = True
@property
def this_check(self):
"""Bolierplate."""
return chk
def test_sample_phr... | """Test dfw.uncomparables."""
from check import Check
from proselint.checks.wallace import uncomparables as chk
class TestCheck(Check):
"""The test class for dfw.uncomparables."""
__test__ = True
@property
def this_check(self):
"""Bolierplate."""
return chk
def test_sample_phr... | <commit_before>"""Test dfw.uncomparables."""
from check import Check
from proselint.checks.wallace import uncomparables as chk
class TestCheck(Check):
"""The test class for dfw.uncomparables."""
__test__ = True
@property
def this_check(self):
"""Bolierplate."""
return chk
def ... | """Test dfw.uncomparables."""
from check import Check
from proselint.checks.wallace import uncomparables as chk
class TestCheck(Check):
"""The test class for dfw.uncomparables."""
__test__ = True
@property
def this_check(self):
"""Bolierplate."""
return chk
def test_sample_phr... | """Test dfw.uncomparables."""
from check import Check
from proselint.checks.wallace import uncomparables as chk
class TestCheck(Check):
"""The test class for dfw.uncomparables."""
__test__ = True
@property
def this_check(self):
"""Bolierplate."""
return chk
def test_sample_phr... | <commit_before>"""Test dfw.uncomparables."""
from check import Check
from proselint.checks.wallace import uncomparables as chk
class TestCheck(Check):
"""The test class for dfw.uncomparables."""
__test__ = True
@property
def this_check(self):
"""Bolierplate."""
return chk
def ... |
7e23d49dbd66fac972539326c81448e8439206e8 | PyGitUp/utils.py | PyGitUp/utils.py | # coding=utf-8
"""
Some simple, generic usefull methods.
"""
import subprocess
import sys
def find(seq, test):
""" Return first item in sequence where test(item) == True """
for item in seq:
if test(item):
return item
def uniq(seq):
""" Return a copy of seq without ... | # coding=utf-8
"""
Some simple, generic usefull methods.
"""
import subprocess
import sys
def find(seq, test):
""" Return first item in sequence where test(item) == True """
for item in seq:
if test(item):
return item
def uniq(seq):
""" Return a copy of seq without ... | Hide stderr messages when detecting git dir | Hide stderr messages when detecting git dir
| Python | mit | msiemens/PyGitUp | # coding=utf-8
"""
Some simple, generic usefull methods.
"""
import subprocess
import sys
def find(seq, test):
""" Return first item in sequence where test(item) == True """
for item in seq:
if test(item):
return item
def uniq(seq):
""" Return a copy of seq without ... | # coding=utf-8
"""
Some simple, generic usefull methods.
"""
import subprocess
import sys
def find(seq, test):
""" Return first item in sequence where test(item) == True """
for item in seq:
if test(item):
return item
def uniq(seq):
""" Return a copy of seq without ... | <commit_before># coding=utf-8
"""
Some simple, generic usefull methods.
"""
import subprocess
import sys
def find(seq, test):
""" Return first item in sequence where test(item) == True """
for item in seq:
if test(item):
return item
def uniq(seq):
""" Return a copy ... | # coding=utf-8
"""
Some simple, generic usefull methods.
"""
import subprocess
import sys
def find(seq, test):
""" Return first item in sequence where test(item) == True """
for item in seq:
if test(item):
return item
def uniq(seq):
""" Return a copy of seq without ... | # coding=utf-8
"""
Some simple, generic usefull methods.
"""
import subprocess
import sys
def find(seq, test):
""" Return first item in sequence where test(item) == True """
for item in seq:
if test(item):
return item
def uniq(seq):
""" Return a copy of seq without ... | <commit_before># coding=utf-8
"""
Some simple, generic usefull methods.
"""
import subprocess
import sys
def find(seq, test):
""" Return first item in sequence where test(item) == True """
for item in seq:
if test(item):
return item
def uniq(seq):
""" Return a copy ... |
8b2f251be2c5723e7825a38634e84dbb82b0d844 | sir/__main__.py | sir/__main__.py | # Copyright (c) 2014 Wieland Hoffmann
# License: MIT, see LICENSE for details
import argparse
import logging
from . import config
from .indexing import reindex
logger = logging.getLogger("sir")
def watch(args):
raise NotImplementedError
def main():
loghandler = logging.StreamHandler()
formatter = lo... | # Copyright (c) 2014 Wieland Hoffmann
# License: MIT, see LICENSE for details
import argparse
import logging
from . import config
from .indexing import reindex
logger = logging.getLogger("sir")
def watch(args):
raise NotImplementedError
def main():
loghandler = logging.StreamHandler()
formatter = lo... | Include timestamps in log messages | Include timestamps in log messages
| Python | mit | jeffweeksio/sir | # Copyright (c) 2014 Wieland Hoffmann
# License: MIT, see LICENSE for details
import argparse
import logging
from . import config
from .indexing import reindex
logger = logging.getLogger("sir")
def watch(args):
raise NotImplementedError
def main():
loghandler = logging.StreamHandler()
formatter = lo... | # Copyright (c) 2014 Wieland Hoffmann
# License: MIT, see LICENSE for details
import argparse
import logging
from . import config
from .indexing import reindex
logger = logging.getLogger("sir")
def watch(args):
raise NotImplementedError
def main():
loghandler = logging.StreamHandler()
formatter = lo... | <commit_before># Copyright (c) 2014 Wieland Hoffmann
# License: MIT, see LICENSE for details
import argparse
import logging
from . import config
from .indexing import reindex
logger = logging.getLogger("sir")
def watch(args):
raise NotImplementedError
def main():
loghandler = logging.StreamHandler()
... | # Copyright (c) 2014 Wieland Hoffmann
# License: MIT, see LICENSE for details
import argparse
import logging
from . import config
from .indexing import reindex
logger = logging.getLogger("sir")
def watch(args):
raise NotImplementedError
def main():
loghandler = logging.StreamHandler()
formatter = lo... | # Copyright (c) 2014 Wieland Hoffmann
# License: MIT, see LICENSE for details
import argparse
import logging
from . import config
from .indexing import reindex
logger = logging.getLogger("sir")
def watch(args):
raise NotImplementedError
def main():
loghandler = logging.StreamHandler()
formatter = lo... | <commit_before># Copyright (c) 2014 Wieland Hoffmann
# License: MIT, see LICENSE for details
import argparse
import logging
from . import config
from .indexing import reindex
logger = logging.getLogger("sir")
def watch(args):
raise NotImplementedError
def main():
loghandler = logging.StreamHandler()
... |
2156fbea296484d528a1fbd1a2f4e4ac76af970d | salt/states/disk.py | salt/states/disk.py | '''
Disk monitoring state
Monitor the state of disk resources
'''
def status(name, max=None, min=None):
'''
Return the current disk usage stats for the named device
'''
# Monitoring state, no changes will be made so no test interface needed
ret = {'name': name,
'result': False,
... | '''
Disk monitoring state
Monitor the state of disk resources
'''
def status(name, max=None, min=None):
'''
Return the current disk usage stats for the named device
'''
# Monitoring state, no changes will be made so no test interface needed
ret = {'name': name,
'result': False,
... | Fix bad ref, forgot the __salt__ :P | Fix bad ref, forgot the __salt__ :P
| Python | apache-2.0 | saltstack/salt,saltstack/salt,saltstack/salt,saltstack/salt,saltstack/salt | '''
Disk monitoring state
Monitor the state of disk resources
'''
def status(name, max=None, min=None):
'''
Return the current disk usage stats for the named device
'''
# Monitoring state, no changes will be made so no test interface needed
ret = {'name': name,
'result': False,
... | '''
Disk monitoring state
Monitor the state of disk resources
'''
def status(name, max=None, min=None):
'''
Return the current disk usage stats for the named device
'''
# Monitoring state, no changes will be made so no test interface needed
ret = {'name': name,
'result': False,
... | <commit_before>'''
Disk monitoring state
Monitor the state of disk resources
'''
def status(name, max=None, min=None):
'''
Return the current disk usage stats for the named device
'''
# Monitoring state, no changes will be made so no test interface needed
ret = {'name': name,
'result': ... | '''
Disk monitoring state
Monitor the state of disk resources
'''
def status(name, max=None, min=None):
'''
Return the current disk usage stats for the named device
'''
# Monitoring state, no changes will be made so no test interface needed
ret = {'name': name,
'result': False,
... | '''
Disk monitoring state
Monitor the state of disk resources
'''
def status(name, max=None, min=None):
'''
Return the current disk usage stats for the named device
'''
# Monitoring state, no changes will be made so no test interface needed
ret = {'name': name,
'result': False,
... | <commit_before>'''
Disk monitoring state
Monitor the state of disk resources
'''
def status(name, max=None, min=None):
'''
Return the current disk usage stats for the named device
'''
# Monitoring state, no changes will be made so no test interface needed
ret = {'name': name,
'result': ... |
27e2dcb42f4d485b09aa043a19dfc37a8d01c4c5 | test_package.py | test_package.py | import caniusepython3 as ciu
def main():
import sys
project = sys.argv[1]
result = ciu.check(projects=[project])
print(result)
if __name__ == '__main__':
main()
| from urllib.parse import urlparse
import caniusepython3 as ciu
def main():
import sys
project = sys.argv[1]
# check if there is github page
with ciu.pypi.pypi_client() as client:
releases = client.package_releases(project)
if not releases:
print('NO releases found for {}'... | Update the script to directly use pypi client | Update the script to directly use pypi client
* Faster to get to the data
| Python | mit | PythonCharmers/autoporter | import caniusepython3 as ciu
def main():
import sys
project = sys.argv[1]
result = ciu.check(projects=[project])
print(result)
if __name__ == '__main__':
main()
Update the script to directly use pypi client
* Faster to get to the data | from urllib.parse import urlparse
import caniusepython3 as ciu
def main():
import sys
project = sys.argv[1]
# check if there is github page
with ciu.pypi.pypi_client() as client:
releases = client.package_releases(project)
if not releases:
print('NO releases found for {}'... | <commit_before>import caniusepython3 as ciu
def main():
import sys
project = sys.argv[1]
result = ciu.check(projects=[project])
print(result)
if __name__ == '__main__':
main()
<commit_msg>Update the script to directly use pypi client
* Faster to get to the data<commit_after> | from urllib.parse import urlparse
import caniusepython3 as ciu
def main():
import sys
project = sys.argv[1]
# check if there is github page
with ciu.pypi.pypi_client() as client:
releases = client.package_releases(project)
if not releases:
print('NO releases found for {}'... | import caniusepython3 as ciu
def main():
import sys
project = sys.argv[1]
result = ciu.check(projects=[project])
print(result)
if __name__ == '__main__':
main()
Update the script to directly use pypi client
* Faster to get to the datafrom urllib.parse import urlparse
import caniusepython3 as c... | <commit_before>import caniusepython3 as ciu
def main():
import sys
project = sys.argv[1]
result = ciu.check(projects=[project])
print(result)
if __name__ == '__main__':
main()
<commit_msg>Update the script to directly use pypi client
* Faster to get to the data<commit_after>from urllib.parse im... |
696716ed9fb93f12bcb36d16611ea26bead0aafe | test_portend.py | test_portend.py | import socket
import pytest
import portend
def socket_infos():
"""
Generate addr infos for connections to localhost
"""
host = ''
port = portend.find_available_local_port()
infos = socket.getaddrinfo(host, port, socket.AF_UNSPEC, socket.SOCK_STREAM)
for info in infos:
yield host, port, info
@pytest.fixtu... | import socket
import pytest
import portend
def socket_infos():
"""
Generate addr infos for connections to localhost
"""
host = ''
port = portend.find_available_local_port()
return socket.getaddrinfo(host, port, socket.AF_UNSPEC, socket.SOCK_STREAM)
def id_for_info(info):
af, = info[:1]
return str(af)
def... | Refactor fixture to provide meaningful ids | Refactor fixture to provide meaningful ids
| Python | mit | jaraco/portend | import socket
import pytest
import portend
def socket_infos():
"""
Generate addr infos for connections to localhost
"""
host = ''
port = portend.find_available_local_port()
infos = socket.getaddrinfo(host, port, socket.AF_UNSPEC, socket.SOCK_STREAM)
for info in infos:
yield host, port, info
@pytest.fixtu... | import socket
import pytest
import portend
def socket_infos():
"""
Generate addr infos for connections to localhost
"""
host = ''
port = portend.find_available_local_port()
return socket.getaddrinfo(host, port, socket.AF_UNSPEC, socket.SOCK_STREAM)
def id_for_info(info):
af, = info[:1]
return str(af)
def... | <commit_before>import socket
import pytest
import portend
def socket_infos():
"""
Generate addr infos for connections to localhost
"""
host = ''
port = portend.find_available_local_port()
infos = socket.getaddrinfo(host, port, socket.AF_UNSPEC, socket.SOCK_STREAM)
for info in infos:
yield host, port, info
... | import socket
import pytest
import portend
def socket_infos():
"""
Generate addr infos for connections to localhost
"""
host = ''
port = portend.find_available_local_port()
return socket.getaddrinfo(host, port, socket.AF_UNSPEC, socket.SOCK_STREAM)
def id_for_info(info):
af, = info[:1]
return str(af)
def... | import socket
import pytest
import portend
def socket_infos():
"""
Generate addr infos for connections to localhost
"""
host = ''
port = portend.find_available_local_port()
infos = socket.getaddrinfo(host, port, socket.AF_UNSPEC, socket.SOCK_STREAM)
for info in infos:
yield host, port, info
@pytest.fixtu... | <commit_before>import socket
import pytest
import portend
def socket_infos():
"""
Generate addr infos for connections to localhost
"""
host = ''
port = portend.find_available_local_port()
infos = socket.getaddrinfo(host, port, socket.AF_UNSPEC, socket.SOCK_STREAM)
for info in infos:
yield host, port, info
... |
ce344bac2ca4ddb027a50f523e6bd8ce04de6ca8 | matrix.py | matrix.py | from __future__ import division
import itertools
def get_offsets(span):
"""
Get matrix offsets for a square of distance `span`.
"""
if span < 0:
raise ValueError('Cannot return neighbours for negative distance')
all_offsets = set(itertools.product([x for x in range(-span, span + 1)], rep... | from __future__ import division
import itertools
def get_offsets(span):
"""
Get matrix offsets for a square of distance `span`.
"""
if span < 0:
raise ValueError('Cannot return neighbours for negative distance')
all_offsets = set(itertools.product([x for x in range(-span, span + 1)], rep... | Fix find_neighbours_2D to ignore out of bounds points | Fix find_neighbours_2D to ignore out of bounds points
... rather than 'trim' the coords, which made no sense.
| Python | mit | supermitch/Island-Gen | from __future__ import division
import itertools
def get_offsets(span):
"""
Get matrix offsets for a square of distance `span`.
"""
if span < 0:
raise ValueError('Cannot return neighbours for negative distance')
all_offsets = set(itertools.product([x for x in range(-span, span + 1)], rep... | from __future__ import division
import itertools
def get_offsets(span):
"""
Get matrix offsets for a square of distance `span`.
"""
if span < 0:
raise ValueError('Cannot return neighbours for negative distance')
all_offsets = set(itertools.product([x for x in range(-span, span + 1)], rep... | <commit_before>from __future__ import division
import itertools
def get_offsets(span):
"""
Get matrix offsets for a square of distance `span`.
"""
if span < 0:
raise ValueError('Cannot return neighbours for negative distance')
all_offsets = set(itertools.product([x for x in range(-span, ... | from __future__ import division
import itertools
def get_offsets(span):
"""
Get matrix offsets for a square of distance `span`.
"""
if span < 0:
raise ValueError('Cannot return neighbours for negative distance')
all_offsets = set(itertools.product([x for x in range(-span, span + 1)], rep... | from __future__ import division
import itertools
def get_offsets(span):
"""
Get matrix offsets for a square of distance `span`.
"""
if span < 0:
raise ValueError('Cannot return neighbours for negative distance')
all_offsets = set(itertools.product([x for x in range(-span, span + 1)], rep... | <commit_before>from __future__ import division
import itertools
def get_offsets(span):
"""
Get matrix offsets for a square of distance `span`.
"""
if span < 0:
raise ValueError('Cannot return neighbours for negative distance')
all_offsets = set(itertools.product([x for x in range(-span, ... |
b7d8e70bf74be142f70bf12635a4bb1632d166ed | funnel/forms/label.py | funnel/forms/label.py | # -*- coding: utf-8 -*-
from baseframe import __
import baseframe.forms as forms
__all__ = ['LabelForm', 'LabelOptionForm']
class LabelForm(forms.Form):
name = forms.StringField(
"", widget=forms.HiddenInput(), validators=[forms.validators.Optional()]
)
title = forms.StringField(
__("Lab... | # -*- coding: utf-8 -*-
from baseframe import __
import baseframe.forms as forms
__all__ = ['LabelForm', 'LabelOptionForm']
class LabelForm(forms.Form):
name = forms.StringField(
"", widget=forms.HiddenInput(), validators=[forms.validators.Optional()]
)
title = forms.StringField(
__("Lab... | Add form validator for icon_emoji | Add form validator for icon_emoji | Python | agpl-3.0 | hasgeek/funnel,hasgeek/funnel,hasgeek/funnel,hasgeek/funnel,hasgeek/funnel | # -*- coding: utf-8 -*-
from baseframe import __
import baseframe.forms as forms
__all__ = ['LabelForm', 'LabelOptionForm']
class LabelForm(forms.Form):
name = forms.StringField(
"", widget=forms.HiddenInput(), validators=[forms.validators.Optional()]
)
title = forms.StringField(
__("Lab... | # -*- coding: utf-8 -*-
from baseframe import __
import baseframe.forms as forms
__all__ = ['LabelForm', 'LabelOptionForm']
class LabelForm(forms.Form):
name = forms.StringField(
"", widget=forms.HiddenInput(), validators=[forms.validators.Optional()]
)
title = forms.StringField(
__("Lab... | <commit_before># -*- coding: utf-8 -*-
from baseframe import __
import baseframe.forms as forms
__all__ = ['LabelForm', 'LabelOptionForm']
class LabelForm(forms.Form):
name = forms.StringField(
"", widget=forms.HiddenInput(), validators=[forms.validators.Optional()]
)
title = forms.StringField(
... | # -*- coding: utf-8 -*-
from baseframe import __
import baseframe.forms as forms
__all__ = ['LabelForm', 'LabelOptionForm']
class LabelForm(forms.Form):
name = forms.StringField(
"", widget=forms.HiddenInput(), validators=[forms.validators.Optional()]
)
title = forms.StringField(
__("Lab... | # -*- coding: utf-8 -*-
from baseframe import __
import baseframe.forms as forms
__all__ = ['LabelForm', 'LabelOptionForm']
class LabelForm(forms.Form):
name = forms.StringField(
"", widget=forms.HiddenInput(), validators=[forms.validators.Optional()]
)
title = forms.StringField(
__("Lab... | <commit_before># -*- coding: utf-8 -*-
from baseframe import __
import baseframe.forms as forms
__all__ = ['LabelForm', 'LabelOptionForm']
class LabelForm(forms.Form):
name = forms.StringField(
"", widget=forms.HiddenInput(), validators=[forms.validators.Optional()]
)
title = forms.StringField(
... |
eeb7b25b59d7ed28c76a288fd7e29c8953ac4503 | pluginsmanager/model/lv2/lv2_effect_builder.py | pluginsmanager/model/lv2/lv2_effect_builder.py | import os
import json
from pluginsmanager.model.lv2.lv2_plugin import Lv2Plugin
from pluginsmanager.model.lv2.lv2_effect import Lv2Effect
class Lv2EffectBuilder(object):
"""
Generates lv2 audio plugins instance (as :class:`Lv2Effect` object).
.. note::
In the current implementation, the data pl... | import os
import json
from pluginsmanager.model.lv2.lv2_plugin import Lv2Plugin
from pluginsmanager.model.lv2.lv2_effect import Lv2Effect
class Lv2EffectBuilder(object):
"""
Generates lv2 audio plugins instance (as :class:`Lv2Effect` object).
.. note::
In the current implementation, the data pl... | Fix lv2 effect builder for travis build | Fix lv2 effect builder for travis build
| Python | apache-2.0 | PedalPi/PluginsManager | import os
import json
from pluginsmanager.model.lv2.lv2_plugin import Lv2Plugin
from pluginsmanager.model.lv2.lv2_effect import Lv2Effect
class Lv2EffectBuilder(object):
"""
Generates lv2 audio plugins instance (as :class:`Lv2Effect` object).
.. note::
In the current implementation, the data pl... | import os
import json
from pluginsmanager.model.lv2.lv2_plugin import Lv2Plugin
from pluginsmanager.model.lv2.lv2_effect import Lv2Effect
class Lv2EffectBuilder(object):
"""
Generates lv2 audio plugins instance (as :class:`Lv2Effect` object).
.. note::
In the current implementation, the data pl... | <commit_before>import os
import json
from pluginsmanager.model.lv2.lv2_plugin import Lv2Plugin
from pluginsmanager.model.lv2.lv2_effect import Lv2Effect
class Lv2EffectBuilder(object):
"""
Generates lv2 audio plugins instance (as :class:`Lv2Effect` object).
.. note::
In the current implementati... | import os
import json
from pluginsmanager.model.lv2.lv2_plugin import Lv2Plugin
from pluginsmanager.model.lv2.lv2_effect import Lv2Effect
class Lv2EffectBuilder(object):
"""
Generates lv2 audio plugins instance (as :class:`Lv2Effect` object).
.. note::
In the current implementation, the data pl... | import os
import json
from pluginsmanager.model.lv2.lv2_plugin import Lv2Plugin
from pluginsmanager.model.lv2.lv2_effect import Lv2Effect
class Lv2EffectBuilder(object):
"""
Generates lv2 audio plugins instance (as :class:`Lv2Effect` object).
.. note::
In the current implementation, the data pl... | <commit_before>import os
import json
from pluginsmanager.model.lv2.lv2_plugin import Lv2Plugin
from pluginsmanager.model.lv2.lv2_effect import Lv2Effect
class Lv2EffectBuilder(object):
"""
Generates lv2 audio plugins instance (as :class:`Lv2Effect` object).
.. note::
In the current implementati... |
e1a61b1f286d7434f2b0d0740f10df8d4b441ec1 | cloudaux/__about__.py | cloudaux/__about__.py | __all__ = [
'__title__',
'__summary__',
'__uri__',
'__version__',
'__author__',
'__email__',
'__license__',
'__copyright__'
]
__title__ = 'cloudaux'
__summary__ = 'Cloud Auxiliary is a python wrapper and orchestration module for interacting with cloud providers'
__uri__ = 'https://githu... | __all__ = [
'__title__',
'__summary__',
'__uri__',
'__version__',
'__author__',
'__email__',
'__license__',
'__copyright__'
]
__title__ = 'cloudaux'
__summary__ = 'Cloud Auxiliary is a python wrapper and orchestration module for interacting with cloud providers'
__uri__ = 'https://githu... | Bump version to 1.4.16 for previous merge | Bump version to 1.4.16 for previous merge
| Python | apache-2.0 | Netflix-Skunkworks/cloudaux | __all__ = [
'__title__',
'__summary__',
'__uri__',
'__version__',
'__author__',
'__email__',
'__license__',
'__copyright__'
]
__title__ = 'cloudaux'
__summary__ = 'Cloud Auxiliary is a python wrapper and orchestration module for interacting with cloud providers'
__uri__ = 'https://githu... | __all__ = [
'__title__',
'__summary__',
'__uri__',
'__version__',
'__author__',
'__email__',
'__license__',
'__copyright__'
]
__title__ = 'cloudaux'
__summary__ = 'Cloud Auxiliary is a python wrapper and orchestration module for interacting with cloud providers'
__uri__ = 'https://githu... | <commit_before>__all__ = [
'__title__',
'__summary__',
'__uri__',
'__version__',
'__author__',
'__email__',
'__license__',
'__copyright__'
]
__title__ = 'cloudaux'
__summary__ = 'Cloud Auxiliary is a python wrapper and orchestration module for interacting with cloud providers'
__uri__ =... | __all__ = [
'__title__',
'__summary__',
'__uri__',
'__version__',
'__author__',
'__email__',
'__license__',
'__copyright__'
]
__title__ = 'cloudaux'
__summary__ = 'Cloud Auxiliary is a python wrapper and orchestration module for interacting with cloud providers'
__uri__ = 'https://githu... | __all__ = [
'__title__',
'__summary__',
'__uri__',
'__version__',
'__author__',
'__email__',
'__license__',
'__copyright__'
]
__title__ = 'cloudaux'
__summary__ = 'Cloud Auxiliary is a python wrapper and orchestration module for interacting with cloud providers'
__uri__ = 'https://githu... | <commit_before>__all__ = [
'__title__',
'__summary__',
'__uri__',
'__version__',
'__author__',
'__email__',
'__license__',
'__copyright__'
]
__title__ = 'cloudaux'
__summary__ = 'Cloud Auxiliary is a python wrapper and orchestration module for interacting with cloud providers'
__uri__ =... |
33f050ab022626846510a7cbcd4b299612f2ff85 | tvmaze/tests.py | tvmaze/tests.py | import unittest
from tvmazereader import main
class TestMethods(unittest.TestCase):
def test_readerMain(self):
data = main()
self.assertEqual(len(data),2)
if __name__ == '__main__':
unittest.main() | import unittest
from tvmazereader import main
class TestMethods(unittest.TestCase):
def test_readerMain(self):
data = main()
self.assertEqual(len(data),2)
if __name__ == '__main__':
unittest.main()
#python -m unittest discover -v | Add comment show test usage from console. | Add comment show test usage from console.
| Python | mit | LairdStreak/MyPyPlayGround,LairdStreak/MyPyPlayGround,LairdStreak/MyPyPlayGround | import unittest
from tvmazereader import main
class TestMethods(unittest.TestCase):
def test_readerMain(self):
data = main()
self.assertEqual(len(data),2)
if __name__ == '__main__':
unittest.main()Add comment show test usage from console. | import unittest
from tvmazereader import main
class TestMethods(unittest.TestCase):
def test_readerMain(self):
data = main()
self.assertEqual(len(data),2)
if __name__ == '__main__':
unittest.main()
#python -m unittest discover -v | <commit_before>import unittest
from tvmazereader import main
class TestMethods(unittest.TestCase):
def test_readerMain(self):
data = main()
self.assertEqual(len(data),2)
if __name__ == '__main__':
unittest.main()<commit_msg>Add comment show test usage from console.<commit_after> | import unittest
from tvmazereader import main
class TestMethods(unittest.TestCase):
def test_readerMain(self):
data = main()
self.assertEqual(len(data),2)
if __name__ == '__main__':
unittest.main()
#python -m unittest discover -v | import unittest
from tvmazereader import main
class TestMethods(unittest.TestCase):
def test_readerMain(self):
data = main()
self.assertEqual(len(data),2)
if __name__ == '__main__':
unittest.main()Add comment show test usage from console.import unittest
from tvmazereader import main
clas... | <commit_before>import unittest
from tvmazereader import main
class TestMethods(unittest.TestCase):
def test_readerMain(self):
data = main()
self.assertEqual(len(data),2)
if __name__ == '__main__':
unittest.main()<commit_msg>Add comment show test usage from console.<commit_after>import uni... |
61f162b7d5a8c9574261705b15b3f8deafffe7bc | froide/team/apps.py | froide/team/apps.py | from django.apps import AppConfig
from django.urls import reverse
from django.db import models
from django.utils.translation import ugettext_lazy as _
class TeamConfig(AppConfig):
name = 'froide.team'
verbose_name = _('Teams')
def ready(self):
from froide.account.menu import menu_registry, MenuIt... | import json
from django.apps import AppConfig
from django.urls import reverse
from django.db import models
from django.utils.translation import ugettext_lazy as _
class TeamConfig(AppConfig):
name = 'froide.team'
verbose_name = _('Teams')
def ready(self):
from froide.account.menu import menu_reg... | Add user data export for teams | Add user data export for teams | Python | mit | fin/froide,stefanw/froide,fin/froide,stefanw/froide,stefanw/froide,fin/froide,stefanw/froide,stefanw/froide,fin/froide | from django.apps import AppConfig
from django.urls import reverse
from django.db import models
from django.utils.translation import ugettext_lazy as _
class TeamConfig(AppConfig):
name = 'froide.team'
verbose_name = _('Teams')
def ready(self):
from froide.account.menu import menu_registry, MenuIt... | import json
from django.apps import AppConfig
from django.urls import reverse
from django.db import models
from django.utils.translation import ugettext_lazy as _
class TeamConfig(AppConfig):
name = 'froide.team'
verbose_name = _('Teams')
def ready(self):
from froide.account.menu import menu_reg... | <commit_before>from django.apps import AppConfig
from django.urls import reverse
from django.db import models
from django.utils.translation import ugettext_lazy as _
class TeamConfig(AppConfig):
name = 'froide.team'
verbose_name = _('Teams')
def ready(self):
from froide.account.menu import menu_r... | import json
from django.apps import AppConfig
from django.urls import reverse
from django.db import models
from django.utils.translation import ugettext_lazy as _
class TeamConfig(AppConfig):
name = 'froide.team'
verbose_name = _('Teams')
def ready(self):
from froide.account.menu import menu_reg... | from django.apps import AppConfig
from django.urls import reverse
from django.db import models
from django.utils.translation import ugettext_lazy as _
class TeamConfig(AppConfig):
name = 'froide.team'
verbose_name = _('Teams')
def ready(self):
from froide.account.menu import menu_registry, MenuIt... | <commit_before>from django.apps import AppConfig
from django.urls import reverse
from django.db import models
from django.utils.translation import ugettext_lazy as _
class TeamConfig(AppConfig):
name = 'froide.team'
verbose_name = _('Teams')
def ready(self):
from froide.account.menu import menu_r... |
0b7c27fec5b1b7ececfcf7556f415e8e53cf69b6 | v1.0/v1.0/search.py | v1.0/v1.0/search.py | #!/usr/bin/env python
# Toy program to search inverted index and print out each line the term
# appears.
import sys
mainfile = sys.argv[1]
indexfile = sys.argv[1] + ".idx1"
term = sys.argv[2]
main = open(mainfile)
index = open(indexfile)
st = term + ": "
for a in index:
if a.startswith(st):
n = [int(i... | #!/usr/bin/env python
# Toy program to search inverted index and print out each line the term
# appears.
from __future__ import print_function
import sys
mainfile = sys.argv[1]
indexfile = sys.argv[1] + ".idx1"
term = sys.argv[2]
main = open(mainfile)
index = open(indexfile)
st = term + ": "
for a in index:
... | Make conformance test 55 compatible with Python 3 | Make conformance test 55 compatible with Python 3
| Python | apache-2.0 | curoverse/common-workflow-language,curoverse/common-workflow-language,mr-c/common-workflow-language,common-workflow-language/common-workflow-language,mr-c/common-workflow-language,dleehr/common-workflow-language,dleehr/common-workflow-language,common-workflow-language/common-workflow-language,dleehr/common-workflow-lan... | #!/usr/bin/env python
# Toy program to search inverted index and print out each line the term
# appears.
import sys
mainfile = sys.argv[1]
indexfile = sys.argv[1] + ".idx1"
term = sys.argv[2]
main = open(mainfile)
index = open(indexfile)
st = term + ": "
for a in index:
if a.startswith(st):
n = [int(i... | #!/usr/bin/env python
# Toy program to search inverted index and print out each line the term
# appears.
from __future__ import print_function
import sys
mainfile = sys.argv[1]
indexfile = sys.argv[1] + ".idx1"
term = sys.argv[2]
main = open(mainfile)
index = open(indexfile)
st = term + ": "
for a in index:
... | <commit_before>#!/usr/bin/env python
# Toy program to search inverted index and print out each line the term
# appears.
import sys
mainfile = sys.argv[1]
indexfile = sys.argv[1] + ".idx1"
term = sys.argv[2]
main = open(mainfile)
index = open(indexfile)
st = term + ": "
for a in index:
if a.startswith(st):
... | #!/usr/bin/env python
# Toy program to search inverted index and print out each line the term
# appears.
from __future__ import print_function
import sys
mainfile = sys.argv[1]
indexfile = sys.argv[1] + ".idx1"
term = sys.argv[2]
main = open(mainfile)
index = open(indexfile)
st = term + ": "
for a in index:
... | #!/usr/bin/env python
# Toy program to search inverted index and print out each line the term
# appears.
import sys
mainfile = sys.argv[1]
indexfile = sys.argv[1] + ".idx1"
term = sys.argv[2]
main = open(mainfile)
index = open(indexfile)
st = term + ": "
for a in index:
if a.startswith(st):
n = [int(i... | <commit_before>#!/usr/bin/env python
# Toy program to search inverted index and print out each line the term
# appears.
import sys
mainfile = sys.argv[1]
indexfile = sys.argv[1] + ".idx1"
term = sys.argv[2]
main = open(mainfile)
index = open(indexfile)
st = term + ": "
for a in index:
if a.startswith(st):
... |
10246ab476980053131c9f2b852116793fd8e1cd | flask_mongorest/__init__.py | flask_mongorest/__init__.py | from flask import Blueprint
from functools import wraps
from flask_mongorest.methods import Create, Update, BulkUpdate, Fetch, List, Delete
class MongoRest(object):
def __init__(self, app, **kwargs):
self.app = app
self.url_prefix = kwargs.pop('url_prefix', '')
app.register_blueprint(Bluep... | from flask import Blueprint
from functools import wraps
from flask_mongorest.methods import Create, Update, BulkUpdate, Fetch, List, Delete
class MongoRest(object):
def __init__(self, app, **kwargs):
self.app = app
self.url_prefix = kwargs.pop('url_prefix', '')
app.register_blueprint(Bluep... | Allow passing extra kwargs into register decorator | Allow passing extra kwargs into register decorator
In order to support extra key-word arguments in add_url_rule method, e.g. subdomain. | Python | bsd-3-clause | elasticsales/flask-mongorest,DropD/flask-mongorest,elasticsales/flask-mongorest,DropD/flask-mongorest | from flask import Blueprint
from functools import wraps
from flask_mongorest.methods import Create, Update, BulkUpdate, Fetch, List, Delete
class MongoRest(object):
def __init__(self, app, **kwargs):
self.app = app
self.url_prefix = kwargs.pop('url_prefix', '')
app.register_blueprint(Bluep... | from flask import Blueprint
from functools import wraps
from flask_mongorest.methods import Create, Update, BulkUpdate, Fetch, List, Delete
class MongoRest(object):
def __init__(self, app, **kwargs):
self.app = app
self.url_prefix = kwargs.pop('url_prefix', '')
app.register_blueprint(Bluep... | <commit_before>from flask import Blueprint
from functools import wraps
from flask_mongorest.methods import Create, Update, BulkUpdate, Fetch, List, Delete
class MongoRest(object):
def __init__(self, app, **kwargs):
self.app = app
self.url_prefix = kwargs.pop('url_prefix', '')
app.register_... | from flask import Blueprint
from functools import wraps
from flask_mongorest.methods import Create, Update, BulkUpdate, Fetch, List, Delete
class MongoRest(object):
def __init__(self, app, **kwargs):
self.app = app
self.url_prefix = kwargs.pop('url_prefix', '')
app.register_blueprint(Bluep... | from flask import Blueprint
from functools import wraps
from flask_mongorest.methods import Create, Update, BulkUpdate, Fetch, List, Delete
class MongoRest(object):
def __init__(self, app, **kwargs):
self.app = app
self.url_prefix = kwargs.pop('url_prefix', '')
app.register_blueprint(Bluep... | <commit_before>from flask import Blueprint
from functools import wraps
from flask_mongorest.methods import Create, Update, BulkUpdate, Fetch, List, Delete
class MongoRest(object):
def __init__(self, app, **kwargs):
self.app = app
self.url_prefix = kwargs.pop('url_prefix', '')
app.register_... |
e1791d929bccd1f5e9382e45fb90bd8257ef597d | src/toil/version.py | src/toil/version.py | # Copyright (C) 2015 UCSC Computational Genomics Lab
#
# 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 o... | # Copyright (C) 2015 UCSC Computational Genomics Lab
#
# 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 o... | Prepare next development cycle 3.1.0a1 | Prepare next development cycle 3.1.0a1
| Python | apache-2.0 | BD2KGenomics/slugflow,BD2KGenomics/slugflow | # Copyright (C) 2015 UCSC Computational Genomics Lab
#
# 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 o... | # Copyright (C) 2015 UCSC Computational Genomics Lab
#
# 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 o... | <commit_before># Copyright (C) 2015 UCSC Computational Genomics Lab
#
# 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 a... | # Copyright (C) 2015 UCSC Computational Genomics Lab
#
# 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 o... | # Copyright (C) 2015 UCSC Computational Genomics Lab
#
# 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 o... | <commit_before># Copyright (C) 2015 UCSC Computational Genomics Lab
#
# 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 a... |
7024d3b36176ec11142ee10884936ff329aece49 | tests/test_cookiecutter_invocation.py | tests/test_cookiecutter_invocation.py | # -*- coding: utf-8 -*-
"""
test_cookiecutter_invocation
----------------------------
Tests to make sure that cookiecutter can be called from the cli without
using the entry point set up for the package.
"""
import os
import pytest
import subprocess
from cookiecutter import utils
def test_should_raise_error_witho... | # -*- coding: utf-8 -*-
"""
test_cookiecutter_invocation
----------------------------
Tests to make sure that cookiecutter can be called from the cli without
using the entry point set up for the package.
"""
import os
import pytest
import subprocess
import sys
from cookiecutter import utils
def test_should_raise_... | Set PYTHONPATH and use sys.executable | Set PYTHONPATH and use sys.executable
| Python | bsd-3-clause | agconti/cookiecutter,stevepiercy/cookiecutter,sp1rs/cookiecutter,Vauxoo/cookiecutter,hackebrot/cookiecutter,hackebrot/cookiecutter,ramiroluz/cookiecutter,kkujawinski/cookiecutter,pjbull/cookiecutter,ramiroluz/cookiecutter,cguardia/cookiecutter,cguardia/cookiecutter,sp1rs/cookiecutter,venumech/cookiecutter,Vauxoo/cookie... | # -*- coding: utf-8 -*-
"""
test_cookiecutter_invocation
----------------------------
Tests to make sure that cookiecutter can be called from the cli without
using the entry point set up for the package.
"""
import os
import pytest
import subprocess
from cookiecutter import utils
def test_should_raise_error_witho... | # -*- coding: utf-8 -*-
"""
test_cookiecutter_invocation
----------------------------
Tests to make sure that cookiecutter can be called from the cli without
using the entry point set up for the package.
"""
import os
import pytest
import subprocess
import sys
from cookiecutter import utils
def test_should_raise_... | <commit_before># -*- coding: utf-8 -*-
"""
test_cookiecutter_invocation
----------------------------
Tests to make sure that cookiecutter can be called from the cli without
using the entry point set up for the package.
"""
import os
import pytest
import subprocess
from cookiecutter import utils
def test_should_ra... | # -*- coding: utf-8 -*-
"""
test_cookiecutter_invocation
----------------------------
Tests to make sure that cookiecutter can be called from the cli without
using the entry point set up for the package.
"""
import os
import pytest
import subprocess
import sys
from cookiecutter import utils
def test_should_raise_... | # -*- coding: utf-8 -*-
"""
test_cookiecutter_invocation
----------------------------
Tests to make sure that cookiecutter can be called from the cli without
using the entry point set up for the package.
"""
import os
import pytest
import subprocess
from cookiecutter import utils
def test_should_raise_error_witho... | <commit_before># -*- coding: utf-8 -*-
"""
test_cookiecutter_invocation
----------------------------
Tests to make sure that cookiecutter can be called from the cli without
using the entry point set up for the package.
"""
import os
import pytest
import subprocess
from cookiecutter import utils
def test_should_ra... |
7127d138bacf507360b6b8c0386187d2e1be32a6 | ifilter/__init__.py | ifilter/__init__.py | import sys
import tempfile
import os
from subprocess import call
import argparse
guide = """# Remove or modify lines.
# Lines that are prefixed with the # character are filtered out.
# When you are done, save the file and exit.
"""
description = """Interactively filter lines in a pipe.
Example: Delete selected file... | import sys
import tempfile
import os
from subprocess import call
import argparse
guide = """# Remove or modify lines.
# Lines that are prefixed with the # character are filtered out.
# When you are done, save the file and exit.
"""
description = """Interactively filter lines in a pipe.
Example: Delete selected file... | Add finally block for deletion of temp file | Add finally block for deletion of temp file
| Python | apache-2.0 | stefan-hudelmaier/ifilter | import sys
import tempfile
import os
from subprocess import call
import argparse
guide = """# Remove or modify lines.
# Lines that are prefixed with the # character are filtered out.
# When you are done, save the file and exit.
"""
description = """Interactively filter lines in a pipe.
Example: Delete selected file... | import sys
import tempfile
import os
from subprocess import call
import argparse
guide = """# Remove or modify lines.
# Lines that are prefixed with the # character are filtered out.
# When you are done, save the file and exit.
"""
description = """Interactively filter lines in a pipe.
Example: Delete selected file... | <commit_before>import sys
import tempfile
import os
from subprocess import call
import argparse
guide = """# Remove or modify lines.
# Lines that are prefixed with the # character are filtered out.
# When you are done, save the file and exit.
"""
description = """Interactively filter lines in a pipe.
Example: Delet... | import sys
import tempfile
import os
from subprocess import call
import argparse
guide = """# Remove or modify lines.
# Lines that are prefixed with the # character are filtered out.
# When you are done, save the file and exit.
"""
description = """Interactively filter lines in a pipe.
Example: Delete selected file... | import sys
import tempfile
import os
from subprocess import call
import argparse
guide = """# Remove or modify lines.
# Lines that are prefixed with the # character are filtered out.
# When you are done, save the file and exit.
"""
description = """Interactively filter lines in a pipe.
Example: Delete selected file... | <commit_before>import sys
import tempfile
import os
from subprocess import call
import argparse
guide = """# Remove or modify lines.
# Lines that are prefixed with the # character are filtered out.
# When you are done, save the file and exit.
"""
description = """Interactively filter lines in a pipe.
Example: Delet... |
aed451bc41ee09a9ff11f350881c320557fea71b | bin/debug/load_timeline_for_day_and_user.py | bin/debug/load_timeline_for_day_and_user.py | import json
import bson.json_util as bju
import emission.core.get_database as edb
import sys
if __name__ == '__main__':
if len(sys.argv) != 2:
print "Usage: %s <filename>" % (sys.argv[0])
fn = sys.argv[1]
print "Loading file " + fn
entries = json.load(open(fn), object_hook = bju.object_hook)
... | import json
import bson.json_util as bju
import emission.core.get_database as edb
import sys
import argparse
import uuid
if __name__ == '__main__':
parser = argparse.ArgumentParser()
parser.add_argument("timeline_filename",
help="the name of the file that contains the json representation of the timelin... | Support loading with a specified username so that we can test more easily | Support loading with a specified username so that we can test more easily
Example timelines that can be used with the data are at:
https://github.com/shankari/data-collection-eval/tree/master/results_dec_2015/ucb.sdb.android.1/timeseries
Note that timeline dumps contain object IDS, so reloading the same timeline
with... | Python | bsd-3-clause | yw374cornell/e-mission-server,joshzarrabi/e-mission-server,sunil07t/e-mission-server,yw374cornell/e-mission-server,yw374cornell/e-mission-server,e-mission/e-mission-server,e-mission/e-mission-server,e-mission/e-mission-server,joshzarrabi/e-mission-server,shankari/e-mission-server,shankari/e-mission-server,sunil07t/e-mi... | import json
import bson.json_util as bju
import emission.core.get_database as edb
import sys
if __name__ == '__main__':
if len(sys.argv) != 2:
print "Usage: %s <filename>" % (sys.argv[0])
fn = sys.argv[1]
print "Loading file " + fn
entries = json.load(open(fn), object_hook = bju.object_hook)
... | import json
import bson.json_util as bju
import emission.core.get_database as edb
import sys
import argparse
import uuid
if __name__ == '__main__':
parser = argparse.ArgumentParser()
parser.add_argument("timeline_filename",
help="the name of the file that contains the json representation of the timelin... | <commit_before>import json
import bson.json_util as bju
import emission.core.get_database as edb
import sys
if __name__ == '__main__':
if len(sys.argv) != 2:
print "Usage: %s <filename>" % (sys.argv[0])
fn = sys.argv[1]
print "Loading file " + fn
entries = json.load(open(fn), object_hook = bju... | import json
import bson.json_util as bju
import emission.core.get_database as edb
import sys
import argparse
import uuid
if __name__ == '__main__':
parser = argparse.ArgumentParser()
parser.add_argument("timeline_filename",
help="the name of the file that contains the json representation of the timelin... | import json
import bson.json_util as bju
import emission.core.get_database as edb
import sys
if __name__ == '__main__':
if len(sys.argv) != 2:
print "Usage: %s <filename>" % (sys.argv[0])
fn = sys.argv[1]
print "Loading file " + fn
entries = json.load(open(fn), object_hook = bju.object_hook)
... | <commit_before>import json
import bson.json_util as bju
import emission.core.get_database as edb
import sys
if __name__ == '__main__':
if len(sys.argv) != 2:
print "Usage: %s <filename>" % (sys.argv[0])
fn = sys.argv[1]
print "Loading file " + fn
entries = json.load(open(fn), object_hook = bju... |
318cbaabb289034584cdfb82639c84ed91fc6e2e | tests/test_io.py | tests/test_io.py | import pytest
from pikepdf import Pdf
from io import BytesIO
@pytest.fixture
def sandwich(resources):
# Has XMP, docinfo, <?adobe-xap-filters esc="CRLF"?>, shorthand attribute XMP
return Pdf.open(resources / 'sandwich.pdf')
class LimitedBytesIO(BytesIO):
"""Version of BytesIO that only accepts small re... | import pytest
from pikepdf import Pdf
from pikepdf._cpphelpers import fspath
from io import BytesIO
from shutil import copy
import sys
@pytest.fixture
def sandwich(resources):
# Has XMP, docinfo, <?adobe-xap-filters esc="CRLF"?>, shorthand attribute XMP
return Pdf.open(resources / 'sandwich.pdf')
class Lim... | Add test to check that we do not overwrite input file | Add test to check that we do not overwrite input file
| Python | mpl-2.0 | pikepdf/pikepdf,pikepdf/pikepdf,pikepdf/pikepdf | import pytest
from pikepdf import Pdf
from io import BytesIO
@pytest.fixture
def sandwich(resources):
# Has XMP, docinfo, <?adobe-xap-filters esc="CRLF"?>, shorthand attribute XMP
return Pdf.open(resources / 'sandwich.pdf')
class LimitedBytesIO(BytesIO):
"""Version of BytesIO that only accepts small re... | import pytest
from pikepdf import Pdf
from pikepdf._cpphelpers import fspath
from io import BytesIO
from shutil import copy
import sys
@pytest.fixture
def sandwich(resources):
# Has XMP, docinfo, <?adobe-xap-filters esc="CRLF"?>, shorthand attribute XMP
return Pdf.open(resources / 'sandwich.pdf')
class Lim... | <commit_before>import pytest
from pikepdf import Pdf
from io import BytesIO
@pytest.fixture
def sandwich(resources):
# Has XMP, docinfo, <?adobe-xap-filters esc="CRLF"?>, shorthand attribute XMP
return Pdf.open(resources / 'sandwich.pdf')
class LimitedBytesIO(BytesIO):
"""Version of BytesIO that only a... | import pytest
from pikepdf import Pdf
from pikepdf._cpphelpers import fspath
from io import BytesIO
from shutil import copy
import sys
@pytest.fixture
def sandwich(resources):
# Has XMP, docinfo, <?adobe-xap-filters esc="CRLF"?>, shorthand attribute XMP
return Pdf.open(resources / 'sandwich.pdf')
class Lim... | import pytest
from pikepdf import Pdf
from io import BytesIO
@pytest.fixture
def sandwich(resources):
# Has XMP, docinfo, <?adobe-xap-filters esc="CRLF"?>, shorthand attribute XMP
return Pdf.open(resources / 'sandwich.pdf')
class LimitedBytesIO(BytesIO):
"""Version of BytesIO that only accepts small re... | <commit_before>import pytest
from pikepdf import Pdf
from io import BytesIO
@pytest.fixture
def sandwich(resources):
# Has XMP, docinfo, <?adobe-xap-filters esc="CRLF"?>, shorthand attribute XMP
return Pdf.open(resources / 'sandwich.pdf')
class LimitedBytesIO(BytesIO):
"""Version of BytesIO that only a... |
b8f6027f475025f1b04c26e1ff4e9c6ff659e362 | templates/button.py | templates/button.py | from copy import deepcopy as copy
from text import TextTemplate
TextTemplate.get_text = lambda self: self.get_message()['text']
TEXT_CHARACTER_LIMIT = 320
template = {
'template_type': 'button',
'value': {
'attachment': {
'type': 'template',
'payload': {
'templ... | from copy import deepcopy as copy
from text import TextTemplate
TextTemplate.get_text = lambda self: self.get_message()['text']
TEXT_CHARACTER_LIMIT = 640
template = {
'template_type': 'button',
'value': {
'attachment': {
'type': 'template',
'payload': {
'templ... | Update TEXT_CHARACTER_LIMIT from 320 to 640 in ButtonTemplate | Update TEXT_CHARACTER_LIMIT from 320 to 640 in ButtonTemplate
| Python | mit | jaskaransarkaria/JARVIS-on-Messenger,ZuZuD/JARVIS-on-Messenger,swapagarwal/JARVIS-on-Messenger,edadesd/JARVIS-on-Messenger | from copy import deepcopy as copy
from text import TextTemplate
TextTemplate.get_text = lambda self: self.get_message()['text']
TEXT_CHARACTER_LIMIT = 320
template = {
'template_type': 'button',
'value': {
'attachment': {
'type': 'template',
'payload': {
'templ... | from copy import deepcopy as copy
from text import TextTemplate
TextTemplate.get_text = lambda self: self.get_message()['text']
TEXT_CHARACTER_LIMIT = 640
template = {
'template_type': 'button',
'value': {
'attachment': {
'type': 'template',
'payload': {
'templ... | <commit_before>from copy import deepcopy as copy
from text import TextTemplate
TextTemplate.get_text = lambda self: self.get_message()['text']
TEXT_CHARACTER_LIMIT = 320
template = {
'template_type': 'button',
'value': {
'attachment': {
'type': 'template',
'payload': {
... | from copy import deepcopy as copy
from text import TextTemplate
TextTemplate.get_text = lambda self: self.get_message()['text']
TEXT_CHARACTER_LIMIT = 640
template = {
'template_type': 'button',
'value': {
'attachment': {
'type': 'template',
'payload': {
'templ... | from copy import deepcopy as copy
from text import TextTemplate
TextTemplate.get_text = lambda self: self.get_message()['text']
TEXT_CHARACTER_LIMIT = 320
template = {
'template_type': 'button',
'value': {
'attachment': {
'type': 'template',
'payload': {
'templ... | <commit_before>from copy import deepcopy as copy
from text import TextTemplate
TextTemplate.get_text = lambda self: self.get_message()['text']
TEXT_CHARACTER_LIMIT = 320
template = {
'template_type': 'button',
'value': {
'attachment': {
'type': 'template',
'payload': {
... |
2fa0c333cb92557b5ba39e91db41327ae381b6a7 | Tools/px4params/xmlout.py | Tools/px4params/xmlout.py | from xml.dom.minidom import getDOMImplementation
import codecs
class XMLOutput():
def __init__(self, groups):
impl = getDOMImplementation()
xml_document = impl.createDocument(None, "parameters", None)
xml_parameters = xml_document.documentElement
for group in groups:
xml... | from xml.dom.minidom import getDOMImplementation
import codecs
class XMLOutput():
def __init__(self, groups):
impl = getDOMImplementation()
xml_document = impl.createDocument(None, "parameters", None)
xml_parameters = xml_document.documentElement
xml_version = xml_document.createEle... | Add version number to parameter meta data | Add version number to parameter meta data
| Python | mit | darknight-007/Firmware,Aerotenna/Firmware,mcgill-robotics/Firmware,PX4/Firmware,PX4/Firmware,acfloria/Firmware,acfloria/Firmware,mcgill-robotics/Firmware,mcgill-robotics/Firmware,jlecoeur/Firmware,dagar/Firmware,PX4/Firmware,acfloria/Firmware,mje-nz/PX4-Firmware,dagar/Firmware,darknight-007/Firmware,PX4/Firmware,darkni... | from xml.dom.minidom import getDOMImplementation
import codecs
class XMLOutput():
def __init__(self, groups):
impl = getDOMImplementation()
xml_document = impl.createDocument(None, "parameters", None)
xml_parameters = xml_document.documentElement
for group in groups:
xml... | from xml.dom.minidom import getDOMImplementation
import codecs
class XMLOutput():
def __init__(self, groups):
impl = getDOMImplementation()
xml_document = impl.createDocument(None, "parameters", None)
xml_parameters = xml_document.documentElement
xml_version = xml_document.createEle... | <commit_before>from xml.dom.minidom import getDOMImplementation
import codecs
class XMLOutput():
def __init__(self, groups):
impl = getDOMImplementation()
xml_document = impl.createDocument(None, "parameters", None)
xml_parameters = xml_document.documentElement
for group in groups:
... | from xml.dom.minidom import getDOMImplementation
import codecs
class XMLOutput():
def __init__(self, groups):
impl = getDOMImplementation()
xml_document = impl.createDocument(None, "parameters", None)
xml_parameters = xml_document.documentElement
xml_version = xml_document.createEle... | from xml.dom.minidom import getDOMImplementation
import codecs
class XMLOutput():
def __init__(self, groups):
impl = getDOMImplementation()
xml_document = impl.createDocument(None, "parameters", None)
xml_parameters = xml_document.documentElement
for group in groups:
xml... | <commit_before>from xml.dom.minidom import getDOMImplementation
import codecs
class XMLOutput():
def __init__(self, groups):
impl = getDOMImplementation()
xml_document = impl.createDocument(None, "parameters", None)
xml_parameters = xml_document.documentElement
for group in groups:
... |
04703b3d13d512c1a4d1c24f6e8a02c6164f5d53 | tests/test_utils.py | tests/test_utils.py | import unittest
from app import create_app, db
from app.utils import get_or_create
from app.models import User
class TestUtils(unittest.TestCase):
def setUp(self):
self.app = create_app("testing")
self.app_ctx = self.app.app_context()
self.app_ctx.push()
db.create_all()
def t... | import unittest
from app import create_app, db
from app.utils import get_or_create
from app.models import User
class TestUtils(unittest.TestCase):
def setUp(self):
self.app = create_app("testing")
self.app_ctx = self.app.app_context()
self.app_ctx.push()
db.create_all()
def t... | Use class methods for unittests | Use class methods for unittests
| Python | mit | Encrylize/MyDictionary,Encrylize/MyDictionary,Encrylize/MyDictionary | import unittest
from app import create_app, db
from app.utils import get_or_create
from app.models import User
class TestUtils(unittest.TestCase):
def setUp(self):
self.app = create_app("testing")
self.app_ctx = self.app.app_context()
self.app_ctx.push()
db.create_all()
def t... | import unittest
from app import create_app, db
from app.utils import get_or_create
from app.models import User
class TestUtils(unittest.TestCase):
def setUp(self):
self.app = create_app("testing")
self.app_ctx = self.app.app_context()
self.app_ctx.push()
db.create_all()
def t... | <commit_before>import unittest
from app import create_app, db
from app.utils import get_or_create
from app.models import User
class TestUtils(unittest.TestCase):
def setUp(self):
self.app = create_app("testing")
self.app_ctx = self.app.app_context()
self.app_ctx.push()
db.create_a... | import unittest
from app import create_app, db
from app.utils import get_or_create
from app.models import User
class TestUtils(unittest.TestCase):
def setUp(self):
self.app = create_app("testing")
self.app_ctx = self.app.app_context()
self.app_ctx.push()
db.create_all()
def t... | import unittest
from app import create_app, db
from app.utils import get_or_create
from app.models import User
class TestUtils(unittest.TestCase):
def setUp(self):
self.app = create_app("testing")
self.app_ctx = self.app.app_context()
self.app_ctx.push()
db.create_all()
def t... | <commit_before>import unittest
from app import create_app, db
from app.utils import get_or_create
from app.models import User
class TestUtils(unittest.TestCase):
def setUp(self):
self.app = create_app("testing")
self.app_ctx = self.app.app_context()
self.app_ctx.push()
db.create_a... |
cadd4aa2bed67cad605937788d58e598ab1cdfc8 | tistory/__init__.py | tistory/__init__.py | #!/usr/bin/env python3
import json
import os
from shlex import quote as shlex_quote
from tistory.api import Tistory, TistoryError
from tistory.auth import TistoryOAuth2
def load_config(fname):
fname = shlex_quote(fname)
cf_path = os.path.dirname(os.path.realpath(__file__))
abspath = os.path.abspath(os.p... | #!/usr/bin/env python3
from tistory.api import Tistory, TistoryError
from tistory.auth import TistoryOAuth2
if __name__ == "__main__":
pass
| Remove load_config() from the tistory module | Remove load_config() from the tistory module
| Python | mit | kastden/tistory | #!/usr/bin/env python3
import json
import os
from shlex import quote as shlex_quote
from tistory.api import Tistory, TistoryError
from tistory.auth import TistoryOAuth2
def load_config(fname):
fname = shlex_quote(fname)
cf_path = os.path.dirname(os.path.realpath(__file__))
abspath = os.path.abspath(os.p... | #!/usr/bin/env python3
from tistory.api import Tistory, TistoryError
from tistory.auth import TistoryOAuth2
if __name__ == "__main__":
pass
| <commit_before>#!/usr/bin/env python3
import json
import os
from shlex import quote as shlex_quote
from tistory.api import Tistory, TistoryError
from tistory.auth import TistoryOAuth2
def load_config(fname):
fname = shlex_quote(fname)
cf_path = os.path.dirname(os.path.realpath(__file__))
abspath = os.pa... | #!/usr/bin/env python3
from tistory.api import Tistory, TistoryError
from tistory.auth import TistoryOAuth2
if __name__ == "__main__":
pass
| #!/usr/bin/env python3
import json
import os
from shlex import quote as shlex_quote
from tistory.api import Tistory, TistoryError
from tistory.auth import TistoryOAuth2
def load_config(fname):
fname = shlex_quote(fname)
cf_path = os.path.dirname(os.path.realpath(__file__))
abspath = os.path.abspath(os.p... | <commit_before>#!/usr/bin/env python3
import json
import os
from shlex import quote as shlex_quote
from tistory.api import Tistory, TistoryError
from tistory.auth import TistoryOAuth2
def load_config(fname):
fname = shlex_quote(fname)
cf_path = os.path.dirname(os.path.realpath(__file__))
abspath = os.pa... |
ec7e03b778c8f6b47af4647d440b4838221a4e33 | jose/constants.py | jose/constants.py | import hashlib
class Algorithms(object):
NONE = 'none'
HS256 = 'HS256'
HS384 = 'HS384'
HS512 = 'HS512'
RS256 = 'RS256'
RS384 = 'RS384'
RS512 = 'RS512'
ES256 = 'ES256'
ES384 = 'ES384'
ES512 = 'ES512'
HMAC = set([HS256, HS384, HS512])
RSA = set([RS256, RS384, RS512])
... | import hashlib
class Algorithms(object):
NONE = 'none'
HS256 = 'HS256'
HS384 = 'HS384'
HS512 = 'HS512'
RS256 = 'RS256'
RS384 = 'RS384'
RS512 = 'RS512'
ES256 = 'ES256'
ES384 = 'ES384'
ES512 = 'ES512'
HMAC = {HS256, HS384, HS512}
RSA = {RS256, RS384, RS512}
EC = {ES2... | Replace function calls with set literals | Replace function calls with set literals
| Python | mit | mpdavis/python-jose | import hashlib
class Algorithms(object):
NONE = 'none'
HS256 = 'HS256'
HS384 = 'HS384'
HS512 = 'HS512'
RS256 = 'RS256'
RS384 = 'RS384'
RS512 = 'RS512'
ES256 = 'ES256'
ES384 = 'ES384'
ES512 = 'ES512'
HMAC = set([HS256, HS384, HS512])
RSA = set([RS256, RS384, RS512])
... | import hashlib
class Algorithms(object):
NONE = 'none'
HS256 = 'HS256'
HS384 = 'HS384'
HS512 = 'HS512'
RS256 = 'RS256'
RS384 = 'RS384'
RS512 = 'RS512'
ES256 = 'ES256'
ES384 = 'ES384'
ES512 = 'ES512'
HMAC = {HS256, HS384, HS512}
RSA = {RS256, RS384, RS512}
EC = {ES2... | <commit_before>import hashlib
class Algorithms(object):
NONE = 'none'
HS256 = 'HS256'
HS384 = 'HS384'
HS512 = 'HS512'
RS256 = 'RS256'
RS384 = 'RS384'
RS512 = 'RS512'
ES256 = 'ES256'
ES384 = 'ES384'
ES512 = 'ES512'
HMAC = set([HS256, HS384, HS512])
RSA = set([RS256, RS3... | import hashlib
class Algorithms(object):
NONE = 'none'
HS256 = 'HS256'
HS384 = 'HS384'
HS512 = 'HS512'
RS256 = 'RS256'
RS384 = 'RS384'
RS512 = 'RS512'
ES256 = 'ES256'
ES384 = 'ES384'
ES512 = 'ES512'
HMAC = {HS256, HS384, HS512}
RSA = {RS256, RS384, RS512}
EC = {ES2... | import hashlib
class Algorithms(object):
NONE = 'none'
HS256 = 'HS256'
HS384 = 'HS384'
HS512 = 'HS512'
RS256 = 'RS256'
RS384 = 'RS384'
RS512 = 'RS512'
ES256 = 'ES256'
ES384 = 'ES384'
ES512 = 'ES512'
HMAC = set([HS256, HS384, HS512])
RSA = set([RS256, RS384, RS512])
... | <commit_before>import hashlib
class Algorithms(object):
NONE = 'none'
HS256 = 'HS256'
HS384 = 'HS384'
HS512 = 'HS512'
RS256 = 'RS256'
RS384 = 'RS384'
RS512 = 'RS512'
ES256 = 'ES256'
ES384 = 'ES384'
ES512 = 'ES512'
HMAC = set([HS256, HS384, HS512])
RSA = set([RS256, RS3... |
4db4eb6ce512b3356559fe3efc988627c3324838 | nonbias_weight_decay.py | nonbias_weight_decay.py | from __future__ import unicode_literals
from __future__ import print_function
from __future__ import division
from __future__ import absolute_import
from builtins import int
from future import standard_library
standard_library.install_aliases()
from chainer import cuda
class NonbiasWeightDecay(object):
"""Optimi... | # This caused an error in py2 because cupy expect non-unicode str
# from __future__ import unicode_literals
from __future__ import print_function
from __future__ import division
from __future__ import absolute_import
from builtins import int
from future import standard_library
standard_library.install_aliases()
from ch... | Fix an error of passing unicode literals to cupy | Fix an error of passing unicode literals to cupy
| Python | mit | toslunar/chainerrl,toslunar/chainerrl | from __future__ import unicode_literals
from __future__ import print_function
from __future__ import division
from __future__ import absolute_import
from builtins import int
from future import standard_library
standard_library.install_aliases()
from chainer import cuda
class NonbiasWeightDecay(object):
"""Optimi... | # This caused an error in py2 because cupy expect non-unicode str
# from __future__ import unicode_literals
from __future__ import print_function
from __future__ import division
from __future__ import absolute_import
from builtins import int
from future import standard_library
standard_library.install_aliases()
from ch... | <commit_before>from __future__ import unicode_literals
from __future__ import print_function
from __future__ import division
from __future__ import absolute_import
from builtins import int
from future import standard_library
standard_library.install_aliases()
from chainer import cuda
class NonbiasWeightDecay(object):... | # This caused an error in py2 because cupy expect non-unicode str
# from __future__ import unicode_literals
from __future__ import print_function
from __future__ import division
from __future__ import absolute_import
from builtins import int
from future import standard_library
standard_library.install_aliases()
from ch... | from __future__ import unicode_literals
from __future__ import print_function
from __future__ import division
from __future__ import absolute_import
from builtins import int
from future import standard_library
standard_library.install_aliases()
from chainer import cuda
class NonbiasWeightDecay(object):
"""Optimi... | <commit_before>from __future__ import unicode_literals
from __future__ import print_function
from __future__ import division
from __future__ import absolute_import
from builtins import int
from future import standard_library
standard_library.install_aliases()
from chainer import cuda
class NonbiasWeightDecay(object):... |
570a1468796c6afdcbd77052227d9a155601e710 | app/__init__.py | app/__init__.py | from flask import Flask
from flask_sqlalchemy import SQLAlchemy
from flask_login import LoginManager
from flask_oauthlib.client import OAuth
from config import config
db = SQLAlchemy()
oa = OAuth()
lm = LoginManager()
lm.login_view = "main.login"
from app.models import User
@lm.user_loader
def load_user(id):
r... | from flask import Flask
from flask_sqlalchemy import SQLAlchemy
from flask_login import LoginManager
from flask_oauthlib.client import OAuth
from config import config
db = SQLAlchemy()
oa = OAuth()
lm = LoginManager()
lm.login_view = "main.login"
from app.models import User
@lm.user_loader
def load_user(id):
r... | Add word class converter to URL map | Add word class converter to URL map
| Python | mit | Encrylize/MyDictionary,Encrylize/MyDictionary,Encrylize/MyDictionary | from flask import Flask
from flask_sqlalchemy import SQLAlchemy
from flask_login import LoginManager
from flask_oauthlib.client import OAuth
from config import config
db = SQLAlchemy()
oa = OAuth()
lm = LoginManager()
lm.login_view = "main.login"
from app.models import User
@lm.user_loader
def load_user(id):
r... | from flask import Flask
from flask_sqlalchemy import SQLAlchemy
from flask_login import LoginManager
from flask_oauthlib.client import OAuth
from config import config
db = SQLAlchemy()
oa = OAuth()
lm = LoginManager()
lm.login_view = "main.login"
from app.models import User
@lm.user_loader
def load_user(id):
r... | <commit_before>from flask import Flask
from flask_sqlalchemy import SQLAlchemy
from flask_login import LoginManager
from flask_oauthlib.client import OAuth
from config import config
db = SQLAlchemy()
oa = OAuth()
lm = LoginManager()
lm.login_view = "main.login"
from app.models import User
@lm.user_loader
def load_... | from flask import Flask
from flask_sqlalchemy import SQLAlchemy
from flask_login import LoginManager
from flask_oauthlib.client import OAuth
from config import config
db = SQLAlchemy()
oa = OAuth()
lm = LoginManager()
lm.login_view = "main.login"
from app.models import User
@lm.user_loader
def load_user(id):
r... | from flask import Flask
from flask_sqlalchemy import SQLAlchemy
from flask_login import LoginManager
from flask_oauthlib.client import OAuth
from config import config
db = SQLAlchemy()
oa = OAuth()
lm = LoginManager()
lm.login_view = "main.login"
from app.models import User
@lm.user_loader
def load_user(id):
r... | <commit_before>from flask import Flask
from flask_sqlalchemy import SQLAlchemy
from flask_login import LoginManager
from flask_oauthlib.client import OAuth
from config import config
db = SQLAlchemy()
oa = OAuth()
lm = LoginManager()
lm.login_view = "main.login"
from app.models import User
@lm.user_loader
def load_... |
4de5994b977ca7a0cb9086def22432d72fec0f34 | app/settings.py | app/settings.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Flask application default config:
# http://flask.pocoo.org/docs/config/#configuring-from-files
# https://github.com/mbr/flask-appconfig
project_name = u'Skeleton \u2620'
class Default(object):
DEBUG = False
TESTING = False
JS_LOG_LEVEL = 3 # log (1) < d... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Flask application default config:
# http://flask.pocoo.org/docs/config/#configuring-from-files
# https://github.com/mbr/flask-appconfig
project_name = u'Skeleton'
class Default(object):
DEBUG = False
TESTING = False
JS_LOG_LEVEL = 3 # log (1) < debug (2... | Drop the unicode skull-and-crossbones from the project name. Causes problems too easily. | Drop the unicode skull-and-crossbones from the project name. Causes problems too easily.
| Python | mit | peterhil/skeleton,peterhil/ninhursag,peterhil/skeleton,peterhil/ninhursag,peterhil/ninhursag,peterhil/skeleton,peterhil/ninhursag | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Flask application default config:
# http://flask.pocoo.org/docs/config/#configuring-from-files
# https://github.com/mbr/flask-appconfig
project_name = u'Skeleton \u2620'
class Default(object):
DEBUG = False
TESTING = False
JS_LOG_LEVEL = 3 # log (1) < d... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Flask application default config:
# http://flask.pocoo.org/docs/config/#configuring-from-files
# https://github.com/mbr/flask-appconfig
project_name = u'Skeleton'
class Default(object):
DEBUG = False
TESTING = False
JS_LOG_LEVEL = 3 # log (1) < debug (2... | <commit_before>#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Flask application default config:
# http://flask.pocoo.org/docs/config/#configuring-from-files
# https://github.com/mbr/flask-appconfig
project_name = u'Skeleton \u2620'
class Default(object):
DEBUG = False
TESTING = False
JS_LOG_LEVEL = 3... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Flask application default config:
# http://flask.pocoo.org/docs/config/#configuring-from-files
# https://github.com/mbr/flask-appconfig
project_name = u'Skeleton'
class Default(object):
DEBUG = False
TESTING = False
JS_LOG_LEVEL = 3 # log (1) < debug (2... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Flask application default config:
# http://flask.pocoo.org/docs/config/#configuring-from-files
# https://github.com/mbr/flask-appconfig
project_name = u'Skeleton \u2620'
class Default(object):
DEBUG = False
TESTING = False
JS_LOG_LEVEL = 3 # log (1) < d... | <commit_before>#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Flask application default config:
# http://flask.pocoo.org/docs/config/#configuring-from-files
# https://github.com/mbr/flask-appconfig
project_name = u'Skeleton \u2620'
class Default(object):
DEBUG = False
TESTING = False
JS_LOG_LEVEL = 3... |
2e8373019f76a51da482df6415bbecd8b2f821ac | zephyrus/message.py | zephyrus/message.py | import json
class Message:
def __init__(self, sender, message_type, content=None):
self.message = {
'sender': sender,
'type': message_type,
'content': content
}
def __str__(self):
return json.dumps(self.message)
def __repr__(self):
retu... | import json
class Message:
def __init__(self, sender, message_type, content=None):
self.message = {
'sender': sender,
'type': message_type,
'content': content
}
def __str__(self):
return json.dumps(self.message)
def __repr__(self):
retu... | Add object creation methods for Message | Add object creation methods for Message
| Python | mit | wairton/zephyrus-mas | import json
class Message:
def __init__(self, sender, message_type, content=None):
self.message = {
'sender': sender,
'type': message_type,
'content': content
}
def __str__(self):
return json.dumps(self.message)
def __repr__(self):
retu... | import json
class Message:
def __init__(self, sender, message_type, content=None):
self.message = {
'sender': sender,
'type': message_type,
'content': content
}
def __str__(self):
return json.dumps(self.message)
def __repr__(self):
retu... | <commit_before>import json
class Message:
def __init__(self, sender, message_type, content=None):
self.message = {
'sender': sender,
'type': message_type,
'content': content
}
def __str__(self):
return json.dumps(self.message)
def __repr__(self... | import json
class Message:
def __init__(self, sender, message_type, content=None):
self.message = {
'sender': sender,
'type': message_type,
'content': content
}
def __str__(self):
return json.dumps(self.message)
def __repr__(self):
retu... | import json
class Message:
def __init__(self, sender, message_type, content=None):
self.message = {
'sender': sender,
'type': message_type,
'content': content
}
def __str__(self):
return json.dumps(self.message)
def __repr__(self):
retu... | <commit_before>import json
class Message:
def __init__(self, sender, message_type, content=None):
self.message = {
'sender': sender,
'type': message_type,
'content': content
}
def __str__(self):
return json.dumps(self.message)
def __repr__(self... |
cabc7da28989f1cc000f7219845222992846631a | datasets/templatetags/general_templatetags.py | datasets/templatetags/general_templatetags.py | from django import template
from django.core import urlresolvers
import datetime
import time
register = template.Library()
# Adapted from: http://blog.scur.pl/2012/09/highlighting-current-active-page-django/
@register.simple_tag(takes_context=True)
def current(context, url_name, return_value=' current', **kwargs):
... | from django import template
from django.core import urlresolvers
import datetime
import time
register = template.Library()
# Adapted from: http://blog.scur.pl/2012/09/highlighting-current-active-page-django/
@register.simple_tag(takes_context=True)
def current(context, url_name, return_value=' current', **kwargs):
... | Fix bug with timestamp_to_datetime when value is not a number | Fix bug with timestamp_to_datetime when value is not a number
| Python | agpl-3.0 | MTG/freesound-datasets,MTG/freesound-datasets,MTG/freesound-datasets,MTG/freesound-datasets | from django import template
from django.core import urlresolvers
import datetime
import time
register = template.Library()
# Adapted from: http://blog.scur.pl/2012/09/highlighting-current-active-page-django/
@register.simple_tag(takes_context=True)
def current(context, url_name, return_value=' current', **kwargs):
... | from django import template
from django.core import urlresolvers
import datetime
import time
register = template.Library()
# Adapted from: http://blog.scur.pl/2012/09/highlighting-current-active-page-django/
@register.simple_tag(takes_context=True)
def current(context, url_name, return_value=' current', **kwargs):
... | <commit_before>from django import template
from django.core import urlresolvers
import datetime
import time
register = template.Library()
# Adapted from: http://blog.scur.pl/2012/09/highlighting-current-active-page-django/
@register.simple_tag(takes_context=True)
def current(context, url_name, return_value=' current... | from django import template
from django.core import urlresolvers
import datetime
import time
register = template.Library()
# Adapted from: http://blog.scur.pl/2012/09/highlighting-current-active-page-django/
@register.simple_tag(takes_context=True)
def current(context, url_name, return_value=' current', **kwargs):
... | from django import template
from django.core import urlresolvers
import datetime
import time
register = template.Library()
# Adapted from: http://blog.scur.pl/2012/09/highlighting-current-active-page-django/
@register.simple_tag(takes_context=True)
def current(context, url_name, return_value=' current', **kwargs):
... | <commit_before>from django import template
from django.core import urlresolvers
import datetime
import time
register = template.Library()
# Adapted from: http://blog.scur.pl/2012/09/highlighting-current-active-page-django/
@register.simple_tag(takes_context=True)
def current(context, url_name, return_value=' current... |
504045eb346fd8ff3ce968a3140520cff99165cc | ibmcnx/doc/DataSources.py | ibmcnx/doc/DataSources.py | ######
# Check ExId (GUID) by Email through JDBC
#
# Author: Christoph Stoettner
# Mail: [email protected]
# Documentation: http://scripting101.stoeps.de
#
# Version: 2.0
# Date: 2014-06-04
#
# License: Apache 2.0
#
# Check ExId of a User in all Connections Appli... | ######
# Check ExId (GUID) by Email through JDBC
#
# Author: Christoph Stoettner
# Mail: [email protected]
# Documentation: http://scripting101.stoeps.de
#
# Version: 2.0
# Date: 2014-06-04
#
# License: Apache 2.0
#
# Check ExId of a User in all Connections Appli... | Create documentation of DataSource Settings | 8: Create documentation of DataSource Settings
Task-Url: http://github.com/stoeps13/ibmcnx2/issues/issue/8 | Python | apache-2.0 | stoeps13/ibmcnx2,stoeps13/ibmcnx2 | ######
# Check ExId (GUID) by Email through JDBC
#
# Author: Christoph Stoettner
# Mail: [email protected]
# Documentation: http://scripting101.stoeps.de
#
# Version: 2.0
# Date: 2014-06-04
#
# License: Apache 2.0
#
# Check ExId of a User in all Connections Appli... | ######
# Check ExId (GUID) by Email through JDBC
#
# Author: Christoph Stoettner
# Mail: [email protected]
# Documentation: http://scripting101.stoeps.de
#
# Version: 2.0
# Date: 2014-06-04
#
# License: Apache 2.0
#
# Check ExId of a User in all Connections Appli... | <commit_before>######
# Check ExId (GUID) by Email through JDBC
#
# Author: Christoph Stoettner
# Mail: [email protected]
# Documentation: http://scripting101.stoeps.de
#
# Version: 2.0
# Date: 2014-06-04
#
# License: Apache 2.0
#
# Check ExId of a User in all Co... | ######
# Check ExId (GUID) by Email through JDBC
#
# Author: Christoph Stoettner
# Mail: [email protected]
# Documentation: http://scripting101.stoeps.de
#
# Version: 2.0
# Date: 2014-06-04
#
# License: Apache 2.0
#
# Check ExId of a User in all Connections Appli... | ######
# Check ExId (GUID) by Email through JDBC
#
# Author: Christoph Stoettner
# Mail: [email protected]
# Documentation: http://scripting101.stoeps.de
#
# Version: 2.0
# Date: 2014-06-04
#
# License: Apache 2.0
#
# Check ExId of a User in all Connections Appli... | <commit_before>######
# Check ExId (GUID) by Email through JDBC
#
# Author: Christoph Stoettner
# Mail: [email protected]
# Documentation: http://scripting101.stoeps.de
#
# Version: 2.0
# Date: 2014-06-04
#
# License: Apache 2.0
#
# Check ExId of a User in all Co... |
4c5855b53bd3c9f945ea55291c2abdd94d309201 | ibmcnx/doc/Documentation.py | ibmcnx/doc/Documentation.py | ######
# Create a file (html or markdown) with the output of
# - JVMHeap
# - LogFiles
# - Ports
# - Variables
#
# Author: Christoph Stoettner
# Mail: [email protected]
# Documentation: http://scripting101.stoeps.de
#
# Version: 2.0
# Date: 2014-06-08
... | ######
# Create a file (html or markdown) with the output of
# - JVMHeap
# - LogFiles
# - Ports
# - Variables
#
# Author: Christoph Stoettner
# Mail: [email protected]
# Documentation: http://scripting101.stoeps.de
#
# Version: 2.0
# Date: 2014-06-08
... | Create script to save documentation to a file | 4: Create script to save documentation to a file
Task-Url: http://github.com/stoeps13/ibmcnx2/issues/issue/4 | Python | apache-2.0 | stoeps13/ibmcnx2,stoeps13/ibmcnx2 | ######
# Create a file (html or markdown) with the output of
# - JVMHeap
# - LogFiles
# - Ports
# - Variables
#
# Author: Christoph Stoettner
# Mail: [email protected]
# Documentation: http://scripting101.stoeps.de
#
# Version: 2.0
# Date: 2014-06-08
... | ######
# Create a file (html or markdown) with the output of
# - JVMHeap
# - LogFiles
# - Ports
# - Variables
#
# Author: Christoph Stoettner
# Mail: [email protected]
# Documentation: http://scripting101.stoeps.de
#
# Version: 2.0
# Date: 2014-06-08
... | <commit_before>######
# Create a file (html or markdown) with the output of
# - JVMHeap
# - LogFiles
# - Ports
# - Variables
#
# Author: Christoph Stoettner
# Mail: [email protected]
# Documentation: http://scripting101.stoeps.de
#
# Version: 2.0
# Date: ... | ######
# Create a file (html or markdown) with the output of
# - JVMHeap
# - LogFiles
# - Ports
# - Variables
#
# Author: Christoph Stoettner
# Mail: [email protected]
# Documentation: http://scripting101.stoeps.de
#
# Version: 2.0
# Date: 2014-06-08
... | ######
# Create a file (html or markdown) with the output of
# - JVMHeap
# - LogFiles
# - Ports
# - Variables
#
# Author: Christoph Stoettner
# Mail: [email protected]
# Documentation: http://scripting101.stoeps.de
#
# Version: 2.0
# Date: 2014-06-08
... | <commit_before>######
# Create a file (html or markdown) with the output of
# - JVMHeap
# - LogFiles
# - Ports
# - Variables
#
# Author: Christoph Stoettner
# Mail: [email protected]
# Documentation: http://scripting101.stoeps.de
#
# Version: 2.0
# Date: ... |
ef93478a0bb4f4eaea470e96b740d55bf8b6f3b5 | python/ecep/portal/management/commands/populate_availability.py | python/ecep/portal/management/commands/populate_availability.py | import random
import csv
from django.core.management.base import BaseCommand, CommandError
from portal.models import Location
class Command(BaseCommand):
"""
"""
def handle(self, *args, **options):
"""
"""
with open('availability.csv', 'rb') as availability_file:
re... | import random
import csv
from django.core.management.base import BaseCommand, CommandError
from portal.models import Location
class Command(BaseCommand):
"""
"""
def handle(self, *args, **options):
"""
"""
with open('availability.csv', 'rb') as availability_file:
re... | Add logic for availability population | Add logic for availability population
| Python | mit | smartchicago/chicago-early-learning,smartchicago/chicago-early-learning,smartchicago/chicago-early-learning,smartchicago/chicago-early-learning | import random
import csv
from django.core.management.base import BaseCommand, CommandError
from portal.models import Location
class Command(BaseCommand):
"""
"""
def handle(self, *args, **options):
"""
"""
with open('availability.csv', 'rb') as availability_file:
re... | import random
import csv
from django.core.management.base import BaseCommand, CommandError
from portal.models import Location
class Command(BaseCommand):
"""
"""
def handle(self, *args, **options):
"""
"""
with open('availability.csv', 'rb') as availability_file:
re... | <commit_before>import random
import csv
from django.core.management.base import BaseCommand, CommandError
from portal.models import Location
class Command(BaseCommand):
"""
"""
def handle(self, *args, **options):
"""
"""
with open('availability.csv', 'rb') as availability_file:... | import random
import csv
from django.core.management.base import BaseCommand, CommandError
from portal.models import Location
class Command(BaseCommand):
"""
"""
def handle(self, *args, **options):
"""
"""
with open('availability.csv', 'rb') as availability_file:
re... | import random
import csv
from django.core.management.base import BaseCommand, CommandError
from portal.models import Location
class Command(BaseCommand):
"""
"""
def handle(self, *args, **options):
"""
"""
with open('availability.csv', 'rb') as availability_file:
re... | <commit_before>import random
import csv
from django.core.management.base import BaseCommand, CommandError
from portal.models import Location
class Command(BaseCommand):
"""
"""
def handle(self, *args, **options):
"""
"""
with open('availability.csv', 'rb') as availability_file:... |
afb4e0d036fd93ba5e2c02e5d935452ab1a22e4e | emission/core/wrapper/cleanedtrip.py | emission/core/wrapper/cleanedtrip.py | import emission.core.wrapper.trip as ecwt
import emission.core.wrapper.wrapperbase as ecwb
class Cleanedtrip(ecwt.Trip):
props = ecwt.Trip.props
props.update({"raw_trip": ecwb.WrapperBase.Access.WORM,
"distance": ecwb.WrapperBase.Access.WORM,
})
def _populateDependencie... | import emission.core.wrapper.trip as ecwt
import emission.core.wrapper.wrapperbase as ecwb
class Cleanedtrip(ecwt.Trip):
props = ecwt.Trip.props
props.update({"raw_trip": ecwb.WrapperBase.Access.WORM
})
def _populateDependencies(self):
super(Cleanedtrip, self)._populateDependenci... | Remove the distance from the cleaned trip | Remove the distance from the cleaned trip
Since it is already in the base class (trip) and has been there since the very
first wrapper class commit.
https://github.com/e-mission/e-mission-server/commit/c4251f5de5dc65f0ddd458dc909c111ddec67153
| Python | bsd-3-clause | shankari/e-mission-server,e-mission/e-mission-server,e-mission/e-mission-server,e-mission/e-mission-server,sunil07t/e-mission-server,sunil07t/e-mission-server,shankari/e-mission-server,e-mission/e-mission-server,sunil07t/e-mission-server,sunil07t/e-mission-server,shankari/e-mission-server,shankari/e-mission-server | import emission.core.wrapper.trip as ecwt
import emission.core.wrapper.wrapperbase as ecwb
class Cleanedtrip(ecwt.Trip):
props = ecwt.Trip.props
props.update({"raw_trip": ecwb.WrapperBase.Access.WORM,
"distance": ecwb.WrapperBase.Access.WORM,
})
def _populateDependencie... | import emission.core.wrapper.trip as ecwt
import emission.core.wrapper.wrapperbase as ecwb
class Cleanedtrip(ecwt.Trip):
props = ecwt.Trip.props
props.update({"raw_trip": ecwb.WrapperBase.Access.WORM
})
def _populateDependencies(self):
super(Cleanedtrip, self)._populateDependenci... | <commit_before>import emission.core.wrapper.trip as ecwt
import emission.core.wrapper.wrapperbase as ecwb
class Cleanedtrip(ecwt.Trip):
props = ecwt.Trip.props
props.update({"raw_trip": ecwb.WrapperBase.Access.WORM,
"distance": ecwb.WrapperBase.Access.WORM,
})
def _popu... | import emission.core.wrapper.trip as ecwt
import emission.core.wrapper.wrapperbase as ecwb
class Cleanedtrip(ecwt.Trip):
props = ecwt.Trip.props
props.update({"raw_trip": ecwb.WrapperBase.Access.WORM
})
def _populateDependencies(self):
super(Cleanedtrip, self)._populateDependenci... | import emission.core.wrapper.trip as ecwt
import emission.core.wrapper.wrapperbase as ecwb
class Cleanedtrip(ecwt.Trip):
props = ecwt.Trip.props
props.update({"raw_trip": ecwb.WrapperBase.Access.WORM,
"distance": ecwb.WrapperBase.Access.WORM,
})
def _populateDependencie... | <commit_before>import emission.core.wrapper.trip as ecwt
import emission.core.wrapper.wrapperbase as ecwb
class Cleanedtrip(ecwt.Trip):
props = ecwt.Trip.props
props.update({"raw_trip": ecwb.WrapperBase.Access.WORM,
"distance": ecwb.WrapperBase.Access.WORM,
})
def _popu... |
4f8a84171bdbe24701351a54230768069a5f27fc | deployments/prob140/image/ipython_config.py | deployments/prob140/image/ipython_config.py | # Disable history manager, we don't really use it
# and by default it puts an sqlite file on NFS, which is not something we wanna do
c.Historymanager.enabled = False
| # Disable history manager, we don't really use it
# and by default it puts an sqlite file on NFS, which is not something we wanna do
c.Historymanager.enabled = False
# Use memory for notebook notary file to workaround corrupted files on nfs
# https://www.sqlite.org/inmemorydb.html
# https://github.com/jupyter/jupyter/... | Use memory for notebook notary file. | Use memory for notebook notary file.
Workaround possible file integrity issues.
| Python | bsd-3-clause | ryanlovett/datahub,berkeley-dsep-infra/datahub,berkeley-dsep-infra/datahub,berkeley-dsep-infra/datahub,ryanlovett/datahub,ryanlovett/datahub | # Disable history manager, we don't really use it
# and by default it puts an sqlite file on NFS, which is not something we wanna do
c.Historymanager.enabled = False
Use memory for notebook notary file.
Workaround possible file integrity issues. | # Disable history manager, we don't really use it
# and by default it puts an sqlite file on NFS, which is not something we wanna do
c.Historymanager.enabled = False
# Use memory for notebook notary file to workaround corrupted files on nfs
# https://www.sqlite.org/inmemorydb.html
# https://github.com/jupyter/jupyter/... | <commit_before># Disable history manager, we don't really use it
# and by default it puts an sqlite file on NFS, which is not something we wanna do
c.Historymanager.enabled = False
<commit_msg>Use memory for notebook notary file.
Workaround possible file integrity issues.<commit_after> | # Disable history manager, we don't really use it
# and by default it puts an sqlite file on NFS, which is not something we wanna do
c.Historymanager.enabled = False
# Use memory for notebook notary file to workaround corrupted files on nfs
# https://www.sqlite.org/inmemorydb.html
# https://github.com/jupyter/jupyter/... | # Disable history manager, we don't really use it
# and by default it puts an sqlite file on NFS, which is not something we wanna do
c.Historymanager.enabled = False
Use memory for notebook notary file.
Workaround possible file integrity issues.# Disable history manager, we don't really use it
# and by default it puts... | <commit_before># Disable history manager, we don't really use it
# and by default it puts an sqlite file on NFS, which is not something we wanna do
c.Historymanager.enabled = False
<commit_msg>Use memory for notebook notary file.
Workaround possible file integrity issues.<commit_after># Disable history manager, we don... |
787c8a1f1f000b75095fab5cc6b3e8e5d4ef60d8 | usingnamespace/models/Domain.py | usingnamespace/models/Domain.py | # File: Domain.py
# Author: Bert JW Regeer <[email protected]>
# Created: 2013-09-02
from meta import Base
from sqlalchemy import (
Boolean,
Column,
ForeignKey,
Table,
Integer,
Unicode,
PrimaryKeyConstraint,
UniqueConstraint,
)
class Domain(Base... | # File: Domain.py
# Author: Bert JW Regeer <[email protected]>
# Created: 2013-09-02
from meta import Base
from sqlalchemy import (
Boolean,
Column,
ForeignKey,
Integer,
PrimaryKeyConstraint,
String,
Table,
Unicode,
UniqueConstraint,
)
c... | Change from unicode to string for domain | Change from unicode to string for domain
DNS entries won't contain unicode characters, and by default are ASCII.
| Python | isc | usingnamespace/usingnamespace | # File: Domain.py
# Author: Bert JW Regeer <[email protected]>
# Created: 2013-09-02
from meta import Base
from sqlalchemy import (
Boolean,
Column,
ForeignKey,
Table,
Integer,
Unicode,
PrimaryKeyConstraint,
UniqueConstraint,
)
class Domain(Base... | # File: Domain.py
# Author: Bert JW Regeer <[email protected]>
# Created: 2013-09-02
from meta import Base
from sqlalchemy import (
Boolean,
Column,
ForeignKey,
Integer,
PrimaryKeyConstraint,
String,
Table,
Unicode,
UniqueConstraint,
)
c... | <commit_before># File: Domain.py
# Author: Bert JW Regeer <[email protected]>
# Created: 2013-09-02
from meta import Base
from sqlalchemy import (
Boolean,
Column,
ForeignKey,
Table,
Integer,
Unicode,
PrimaryKeyConstraint,
UniqueConstraint,
)
cl... | # File: Domain.py
# Author: Bert JW Regeer <[email protected]>
# Created: 2013-09-02
from meta import Base
from sqlalchemy import (
Boolean,
Column,
ForeignKey,
Integer,
PrimaryKeyConstraint,
String,
Table,
Unicode,
UniqueConstraint,
)
c... | # File: Domain.py
# Author: Bert JW Regeer <[email protected]>
# Created: 2013-09-02
from meta import Base
from sqlalchemy import (
Boolean,
Column,
ForeignKey,
Table,
Integer,
Unicode,
PrimaryKeyConstraint,
UniqueConstraint,
)
class Domain(Base... | <commit_before># File: Domain.py
# Author: Bert JW Regeer <[email protected]>
# Created: 2013-09-02
from meta import Base
from sqlalchemy import (
Boolean,
Column,
ForeignKey,
Table,
Integer,
Unicode,
PrimaryKeyConstraint,
UniqueConstraint,
)
cl... |
f1d076b4e4fc834a4336141025387862b4decc5b | utest/libdoc/test_libdoc_api.py | utest/libdoc/test_libdoc_api.py | from io import StringIO
import sys
import tempfile
import unittest
from robot import libdoc
from robot.utils.asserts import assert_equal
class TestLibdoc(unittest.TestCase):
def setUp(self):
sys.stdout = StringIO()
def test_html(self):
output = tempfile.mkstemp(suffix='.html')[1]
li... | import sys
import tempfile
import unittest
from robot import libdoc
from robot.utils.asserts import assert_equal
from robot.utils import StringIO
class TestLibdoc(unittest.TestCase):
def setUp(self):
sys.stdout = StringIO()
def test_html(self):
output = tempfile.mkstemp(suffix='.html')[1]
... | Fix Libdoc API unit tests on Python 2 | Fix Libdoc API unit tests on Python 2
| Python | apache-2.0 | robotframework/robotframework,robotframework/robotframework,HelioGuilherme66/robotframework,HelioGuilherme66/robotframework,robotframework/robotframework,HelioGuilherme66/robotframework | from io import StringIO
import sys
import tempfile
import unittest
from robot import libdoc
from robot.utils.asserts import assert_equal
class TestLibdoc(unittest.TestCase):
def setUp(self):
sys.stdout = StringIO()
def test_html(self):
output = tempfile.mkstemp(suffix='.html')[1]
li... | import sys
import tempfile
import unittest
from robot import libdoc
from robot.utils.asserts import assert_equal
from robot.utils import StringIO
class TestLibdoc(unittest.TestCase):
def setUp(self):
sys.stdout = StringIO()
def test_html(self):
output = tempfile.mkstemp(suffix='.html')[1]
... | <commit_before>from io import StringIO
import sys
import tempfile
import unittest
from robot import libdoc
from robot.utils.asserts import assert_equal
class TestLibdoc(unittest.TestCase):
def setUp(self):
sys.stdout = StringIO()
def test_html(self):
output = tempfile.mkstemp(suffix='.html'... | import sys
import tempfile
import unittest
from robot import libdoc
from robot.utils.asserts import assert_equal
from robot.utils import StringIO
class TestLibdoc(unittest.TestCase):
def setUp(self):
sys.stdout = StringIO()
def test_html(self):
output = tempfile.mkstemp(suffix='.html')[1]
... | from io import StringIO
import sys
import tempfile
import unittest
from robot import libdoc
from robot.utils.asserts import assert_equal
class TestLibdoc(unittest.TestCase):
def setUp(self):
sys.stdout = StringIO()
def test_html(self):
output = tempfile.mkstemp(suffix='.html')[1]
li... | <commit_before>from io import StringIO
import sys
import tempfile
import unittest
from robot import libdoc
from robot.utils.asserts import assert_equal
class TestLibdoc(unittest.TestCase):
def setUp(self):
sys.stdout = StringIO()
def test_html(self):
output = tempfile.mkstemp(suffix='.html'... |
1a361002b974ee9fc4f728339ea6f4d63eeb9bf1 | binary.py | binary.py | #!/usr/bin/env python
# coding=utf-8
"""
Balanced ternary binary encoding
============
Tools for encoding balanced ternary data into binary formats and back again.
The encoded scheme used here uses 8-bit segments to represent 5-trit segments.
Each 5-trit segment is mapped to an 8-bit binary value which corresponds to... | #!/usr/bin/env python
# coding=utf-8
"""
Balanced ternary binary encoding
============
Tools for encoding balanced ternary data into binary formats and back again.
The encoded scheme used here uses 8-bit segments to represent 5-trit segments.
Each 5-trit segment is mapped to an 8-bit binary value which corresponds to... | Use 'range' rather than 'xrange' for Python 3 compatibility. | Use 'range' rather than 'xrange' for Python 3 compatibility.
| Python | bsd-2-clause | direvus/btern | #!/usr/bin/env python
# coding=utf-8
"""
Balanced ternary binary encoding
============
Tools for encoding balanced ternary data into binary formats and back again.
The encoded scheme used here uses 8-bit segments to represent 5-trit segments.
Each 5-trit segment is mapped to an 8-bit binary value which corresponds to... | #!/usr/bin/env python
# coding=utf-8
"""
Balanced ternary binary encoding
============
Tools for encoding balanced ternary data into binary formats and back again.
The encoded scheme used here uses 8-bit segments to represent 5-trit segments.
Each 5-trit segment is mapped to an 8-bit binary value which corresponds to... | <commit_before>#!/usr/bin/env python
# coding=utf-8
"""
Balanced ternary binary encoding
============
Tools for encoding balanced ternary data into binary formats and back again.
The encoded scheme used here uses 8-bit segments to represent 5-trit segments.
Each 5-trit segment is mapped to an 8-bit binary value which... | #!/usr/bin/env python
# coding=utf-8
"""
Balanced ternary binary encoding
============
Tools for encoding balanced ternary data into binary formats and back again.
The encoded scheme used here uses 8-bit segments to represent 5-trit segments.
Each 5-trit segment is mapped to an 8-bit binary value which corresponds to... | #!/usr/bin/env python
# coding=utf-8
"""
Balanced ternary binary encoding
============
Tools for encoding balanced ternary data into binary formats and back again.
The encoded scheme used here uses 8-bit segments to represent 5-trit segments.
Each 5-trit segment is mapped to an 8-bit binary value which corresponds to... | <commit_before>#!/usr/bin/env python
# coding=utf-8
"""
Balanced ternary binary encoding
============
Tools for encoding balanced ternary data into binary formats and back again.
The encoded scheme used here uses 8-bit segments to represent 5-trit segments.
Each 5-trit segment is mapped to an 8-bit binary value which... |
b52e32cba060e5a51f2f012d3cad7cddd7dde3cc | lc0345_reverse_vowels_of_a_string.py | lc0345_reverse_vowels_of_a_string.py | """Leetcode 345. Reverse Vowels of a String
Easy
URL: https://leetcode.com/problems/reverse-vowels-of-a-string/
Write a function that takes a string as input and reverse only the vowels of
a string.
Example 1:
Input: "hello"
Output: "holle"
Example 2:
Input: "leetcode"
Output: "leotcede"
Note:
The vowels does not ... | """Leetcode 345. Reverse Vowels of a String
Easy
URL: https://leetcode.com/problems/reverse-vowels-of-a-string/
Write a function that takes a string as input and reverse only the vowels of
a string.
Example 1:
Input: "hello"
Output: "holle"
Example 2:
Input: "leetcode"
Output: "leotcede"
Note:
The vowels does not ... | Complete reversed vowel pos sol | Complete reversed vowel pos sol
| Python | bsd-2-clause | bowen0701/algorithms_data_structures | """Leetcode 345. Reverse Vowels of a String
Easy
URL: https://leetcode.com/problems/reverse-vowels-of-a-string/
Write a function that takes a string as input and reverse only the vowels of
a string.
Example 1:
Input: "hello"
Output: "holle"
Example 2:
Input: "leetcode"
Output: "leotcede"
Note:
The vowels does not ... | """Leetcode 345. Reverse Vowels of a String
Easy
URL: https://leetcode.com/problems/reverse-vowels-of-a-string/
Write a function that takes a string as input and reverse only the vowels of
a string.
Example 1:
Input: "hello"
Output: "holle"
Example 2:
Input: "leetcode"
Output: "leotcede"
Note:
The vowels does not ... | <commit_before>"""Leetcode 345. Reverse Vowels of a String
Easy
URL: https://leetcode.com/problems/reverse-vowels-of-a-string/
Write a function that takes a string as input and reverse only the vowels of
a string.
Example 1:
Input: "hello"
Output: "holle"
Example 2:
Input: "leetcode"
Output: "leotcede"
Note:
The v... | """Leetcode 345. Reverse Vowels of a String
Easy
URL: https://leetcode.com/problems/reverse-vowels-of-a-string/
Write a function that takes a string as input and reverse only the vowels of
a string.
Example 1:
Input: "hello"
Output: "holle"
Example 2:
Input: "leetcode"
Output: "leotcede"
Note:
The vowels does not ... | """Leetcode 345. Reverse Vowels of a String
Easy
URL: https://leetcode.com/problems/reverse-vowels-of-a-string/
Write a function that takes a string as input and reverse only the vowels of
a string.
Example 1:
Input: "hello"
Output: "holle"
Example 2:
Input: "leetcode"
Output: "leotcede"
Note:
The vowels does not ... | <commit_before>"""Leetcode 345. Reverse Vowels of a String
Easy
URL: https://leetcode.com/problems/reverse-vowels-of-a-string/
Write a function that takes a string as input and reverse only the vowels of
a string.
Example 1:
Input: "hello"
Output: "holle"
Example 2:
Input: "leetcode"
Output: "leotcede"
Note:
The v... |
bda9bc3574b14ead6f51e1fb0f6864e07ccefd88 | Orange/classification/random_forest.py | Orange/classification/random_forest.py | # import numpy
from sklearn.ensemble import RandomForestClassifier as RandomForest
from sklearn.preprocessing import Imputer
from numpy import isnan
import Orange.data
import Orange.classification
def replace_nan(X, imp_model):
# Default scikit Imputer
# Use Orange imputer when implemented
if i... | import numbers
from sklearn.ensemble import RandomForestClassifier as RandomForest
from sklearn.preprocessing import Imputer
from numpy import isnan
import Orange.data
import Orange.classification
def replace_nan(X, imp_model):
# Default scikit Imputer
# Use Orange imputer when implemented
if isnan(X).s... | Fix an error when number of predictor columns is less than max_features. | Fix an error when number of predictor columns is less than max_features.
| Python | bsd-2-clause | marinkaz/orange3,marinkaz/orange3,kwikadi/orange3,marinkaz/orange3,qPCR4vir/orange3,kwikadi/orange3,cheral/orange3,kwikadi/orange3,marinkaz/orange3,cheral/orange3,qPCR4vir/orange3,qPCR4vir/orange3,qPCR4vir/orange3,kwikadi/orange3,cheral/orange3,marinkaz/orange3,qusp/orange3,cheral/orange3,qusp/orange3,kwikadi/orange3,q... | # import numpy
from sklearn.ensemble import RandomForestClassifier as RandomForest
from sklearn.preprocessing import Imputer
from numpy import isnan
import Orange.data
import Orange.classification
def replace_nan(X, imp_model):
# Default scikit Imputer
# Use Orange imputer when implemented
if i... | import numbers
from sklearn.ensemble import RandomForestClassifier as RandomForest
from sklearn.preprocessing import Imputer
from numpy import isnan
import Orange.data
import Orange.classification
def replace_nan(X, imp_model):
# Default scikit Imputer
# Use Orange imputer when implemented
if isnan(X).s... | <commit_before># import numpy
from sklearn.ensemble import RandomForestClassifier as RandomForest
from sklearn.preprocessing import Imputer
from numpy import isnan
import Orange.data
import Orange.classification
def replace_nan(X, imp_model):
# Default scikit Imputer
# Use Orange imputer when implement... | import numbers
from sklearn.ensemble import RandomForestClassifier as RandomForest
from sklearn.preprocessing import Imputer
from numpy import isnan
import Orange.data
import Orange.classification
def replace_nan(X, imp_model):
# Default scikit Imputer
# Use Orange imputer when implemented
if isnan(X).s... | # import numpy
from sklearn.ensemble import RandomForestClassifier as RandomForest
from sklearn.preprocessing import Imputer
from numpy import isnan
import Orange.data
import Orange.classification
def replace_nan(X, imp_model):
# Default scikit Imputer
# Use Orange imputer when implemented
if i... | <commit_before># import numpy
from sklearn.ensemble import RandomForestClassifier as RandomForest
from sklearn.preprocessing import Imputer
from numpy import isnan
import Orange.data
import Orange.classification
def replace_nan(X, imp_model):
# Default scikit Imputer
# Use Orange imputer when implement... |
83e0394dc837e55a3ed544e54f6e84954f9311b0 | onepercentclub/settings/travis.py | onepercentclub/settings/travis.py | # TODO: not sure why but we need to include the SECRET_KEY here - importing from the test_runner file doesn't work
SECRET_KEY = 'hbqnTEq+m7Tk61bvRV/TLANr3i0WZ6hgBXDh3aYpSU8m+E1iCtlU3Q=='
from .test_runner import *
# Use firefox for running tests on Travis
SELENIUM_WEBDRIVER = 'firefox'
ROOT_URLCONF = 'onepercentclu... | # TODO: not sure why but we need to include the SECRET_KEY here - importing from the test_runner file doesn't work
SECRET_KEY = 'hbqnTEq+m7Tk61bvRV/TLANr3i0WZ6hgBXDh3aYpSU8m+E1iCtlU3Q=='
from .test_runner import *
# Use firefox for running tests on Travis
SELENIUM_WEBDRIVER = 'remote'
SELENIUM_TESTS = False
ROOT_UR... | Disable front end tests on Travis for now. | Disable front end tests on Travis for now.
| Python | bsd-3-clause | onepercentclub/onepercentclub-site,onepercentclub/onepercentclub-site,onepercentclub/onepercentclub-site,onepercentclub/onepercentclub-site,onepercentclub/onepercentclub-site | # TODO: not sure why but we need to include the SECRET_KEY here - importing from the test_runner file doesn't work
SECRET_KEY = 'hbqnTEq+m7Tk61bvRV/TLANr3i0WZ6hgBXDh3aYpSU8m+E1iCtlU3Q=='
from .test_runner import *
# Use firefox for running tests on Travis
SELENIUM_WEBDRIVER = 'firefox'
ROOT_URLCONF = 'onepercentclu... | # TODO: not sure why but we need to include the SECRET_KEY here - importing from the test_runner file doesn't work
SECRET_KEY = 'hbqnTEq+m7Tk61bvRV/TLANr3i0WZ6hgBXDh3aYpSU8m+E1iCtlU3Q=='
from .test_runner import *
# Use firefox for running tests on Travis
SELENIUM_WEBDRIVER = 'remote'
SELENIUM_TESTS = False
ROOT_UR... | <commit_before># TODO: not sure why but we need to include the SECRET_KEY here - importing from the test_runner file doesn't work
SECRET_KEY = 'hbqnTEq+m7Tk61bvRV/TLANr3i0WZ6hgBXDh3aYpSU8m+E1iCtlU3Q=='
from .test_runner import *
# Use firefox for running tests on Travis
SELENIUM_WEBDRIVER = 'firefox'
ROOT_URLCONF =... | # TODO: not sure why but we need to include the SECRET_KEY here - importing from the test_runner file doesn't work
SECRET_KEY = 'hbqnTEq+m7Tk61bvRV/TLANr3i0WZ6hgBXDh3aYpSU8m+E1iCtlU3Q=='
from .test_runner import *
# Use firefox for running tests on Travis
SELENIUM_WEBDRIVER = 'remote'
SELENIUM_TESTS = False
ROOT_UR... | # TODO: not sure why but we need to include the SECRET_KEY here - importing from the test_runner file doesn't work
SECRET_KEY = 'hbqnTEq+m7Tk61bvRV/TLANr3i0WZ6hgBXDh3aYpSU8m+E1iCtlU3Q=='
from .test_runner import *
# Use firefox for running tests on Travis
SELENIUM_WEBDRIVER = 'firefox'
ROOT_URLCONF = 'onepercentclu... | <commit_before># TODO: not sure why but we need to include the SECRET_KEY here - importing from the test_runner file doesn't work
SECRET_KEY = 'hbqnTEq+m7Tk61bvRV/TLANr3i0WZ6hgBXDh3aYpSU8m+E1iCtlU3Q=='
from .test_runner import *
# Use firefox for running tests on Travis
SELENIUM_WEBDRIVER = 'firefox'
ROOT_URLCONF =... |
124aeb597db4f4a0aa1c6d6117fe8d2facb4aacd | linkatos/activities.py | linkatos/activities.py | import time
import linkatos.parser as parser
import linkatos.printer as printer
import linkatos.firebase as fb
import linkatos.reaction as react
def is_empty(events):
return ((events is None) or (len(events) == 0))
def is_url(url_message):
return url_message['type'] == 'url'
def event_consumer(expecting_u... | import time
import linkatos.parser as parser
import linkatos.printer as printer
import linkatos.firebase as fb
import linkatos.reaction as react
def is_empty(events):
return ((events is None) or (len(events) == 0))
def is_url(url_message):
return url_message['type'] == 'url'
def event_consumer(expecting_u... | Delete condition of type in event as it should always be true | feat: Delete condition of type in event as it should always be true
| Python | mit | iwi/linkatos,iwi/linkatos | import time
import linkatos.parser as parser
import linkatos.printer as printer
import linkatos.firebase as fb
import linkatos.reaction as react
def is_empty(events):
return ((events is None) or (len(events) == 0))
def is_url(url_message):
return url_message['type'] == 'url'
def event_consumer(expecting_u... | import time
import linkatos.parser as parser
import linkatos.printer as printer
import linkatos.firebase as fb
import linkatos.reaction as react
def is_empty(events):
return ((events is None) or (len(events) == 0))
def is_url(url_message):
return url_message['type'] == 'url'
def event_consumer(expecting_u... | <commit_before>import time
import linkatos.parser as parser
import linkatos.printer as printer
import linkatos.firebase as fb
import linkatos.reaction as react
def is_empty(events):
return ((events is None) or (len(events) == 0))
def is_url(url_message):
return url_message['type'] == 'url'
def event_consu... | import time
import linkatos.parser as parser
import linkatos.printer as printer
import linkatos.firebase as fb
import linkatos.reaction as react
def is_empty(events):
return ((events is None) or (len(events) == 0))
def is_url(url_message):
return url_message['type'] == 'url'
def event_consumer(expecting_u... | import time
import linkatos.parser as parser
import linkatos.printer as printer
import linkatos.firebase as fb
import linkatos.reaction as react
def is_empty(events):
return ((events is None) or (len(events) == 0))
def is_url(url_message):
return url_message['type'] == 'url'
def event_consumer(expecting_u... | <commit_before>import time
import linkatos.parser as parser
import linkatos.printer as printer
import linkatos.firebase as fb
import linkatos.reaction as react
def is_empty(events):
return ((events is None) or (len(events) == 0))
def is_url(url_message):
return url_message['type'] == 'url'
def event_consu... |
d830e9ebe103b94fd214477cb83ad824fd27e70f | mcbench/settings.py | mcbench/settings.py | import os
root = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
DB_PATH = os.path.join(root, 'mcbench.sqlite')
DATA_ROOT = os.path.expanduser('~/mcbench-benchmarks')
SECRET_KEY = ''
try:
from local_settings import *
except ImportError:
pass
| import os
root = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
DB_PATH = os.path.join(root, 'mcbench.sqlite')
DATA_ROOT = os.path.expanduser('~/mcbench-benchmarks')
SECRET_KEY = 'dummy'
try:
from local_settings import *
except ImportError:
pass
| Add dummy SECRET_KEY for development (and Travis). | Add dummy SECRET_KEY for development (and Travis).
| Python | mit | isbadawi/mcbench,isbadawi/mcbench | import os
root = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
DB_PATH = os.path.join(root, 'mcbench.sqlite')
DATA_ROOT = os.path.expanduser('~/mcbench-benchmarks')
SECRET_KEY = ''
try:
from local_settings import *
except ImportError:
pass
Add dummy SECRET_KEY for development (and Travis). | import os
root = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
DB_PATH = os.path.join(root, 'mcbench.sqlite')
DATA_ROOT = os.path.expanduser('~/mcbench-benchmarks')
SECRET_KEY = 'dummy'
try:
from local_settings import *
except ImportError:
pass
| <commit_before>import os
root = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
DB_PATH = os.path.join(root, 'mcbench.sqlite')
DATA_ROOT = os.path.expanduser('~/mcbench-benchmarks')
SECRET_KEY = ''
try:
from local_settings import *
except ImportError:
pass
<commit_msg>Add dummy SECRET_KEY for deve... | import os
root = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
DB_PATH = os.path.join(root, 'mcbench.sqlite')
DATA_ROOT = os.path.expanduser('~/mcbench-benchmarks')
SECRET_KEY = 'dummy'
try:
from local_settings import *
except ImportError:
pass
| import os
root = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
DB_PATH = os.path.join(root, 'mcbench.sqlite')
DATA_ROOT = os.path.expanduser('~/mcbench-benchmarks')
SECRET_KEY = ''
try:
from local_settings import *
except ImportError:
pass
Add dummy SECRET_KEY for development (and Travis).import... | <commit_before>import os
root = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
DB_PATH = os.path.join(root, 'mcbench.sqlite')
DATA_ROOT = os.path.expanduser('~/mcbench-benchmarks')
SECRET_KEY = ''
try:
from local_settings import *
except ImportError:
pass
<commit_msg>Add dummy SECRET_KEY for deve... |
7cb7a37206d4b729dc8708e3152f5423ddfa1b8a | wagtail/admin/forms/choosers.py | wagtail/admin/forms/choosers.py | from django import forms
from django.core import validators
from django.forms.widgets import TextInput
from django.utils.translation import ugettext_lazy
class URLOrAbsolutePathValidator(validators.URLValidator):
@staticmethod
def is_absolute_path(value):
return value.startswith('/')
def __call__... | from django import forms
from django.core import validators
from django.forms.widgets import TextInput
class URLOrAbsolutePathValidator(validators.URLValidator):
@staticmethod
def is_absolute_path(value):
return value.startswith('/')
def __call__(self, value):
if URLOrAbsolutePathValidato... | Remove redundant ugettext_lazy from non-text labels | Remove redundant ugettext_lazy from non-text labels
| Python | bsd-3-clause | thenewguy/wagtail,FlipperPA/wagtail,jnns/wagtail,mixxorz/wagtail,kaedroho/wagtail,jnns/wagtail,thenewguy/wagtail,torchbox/wagtail,timorieber/wagtail,takeflight/wagtail,thenewguy/wagtail,gasman/wagtail,kaedroho/wagtail,zerolab/wagtail,kaedroho/wagtail,kaedroho/wagtail,torchbox/wagtail,jnns/wagtail,wagtail/wagtail,mixxor... | from django import forms
from django.core import validators
from django.forms.widgets import TextInput
from django.utils.translation import ugettext_lazy
class URLOrAbsolutePathValidator(validators.URLValidator):
@staticmethod
def is_absolute_path(value):
return value.startswith('/')
def __call__... | from django import forms
from django.core import validators
from django.forms.widgets import TextInput
class URLOrAbsolutePathValidator(validators.URLValidator):
@staticmethod
def is_absolute_path(value):
return value.startswith('/')
def __call__(self, value):
if URLOrAbsolutePathValidato... | <commit_before>from django import forms
from django.core import validators
from django.forms.widgets import TextInput
from django.utils.translation import ugettext_lazy
class URLOrAbsolutePathValidator(validators.URLValidator):
@staticmethod
def is_absolute_path(value):
return value.startswith('/')
... | from django import forms
from django.core import validators
from django.forms.widgets import TextInput
class URLOrAbsolutePathValidator(validators.URLValidator):
@staticmethod
def is_absolute_path(value):
return value.startswith('/')
def __call__(self, value):
if URLOrAbsolutePathValidato... | from django import forms
from django.core import validators
from django.forms.widgets import TextInput
from django.utils.translation import ugettext_lazy
class URLOrAbsolutePathValidator(validators.URLValidator):
@staticmethod
def is_absolute_path(value):
return value.startswith('/')
def __call__... | <commit_before>from django import forms
from django.core import validators
from django.forms.widgets import TextInput
from django.utils.translation import ugettext_lazy
class URLOrAbsolutePathValidator(validators.URLValidator):
@staticmethod
def is_absolute_path(value):
return value.startswith('/')
... |
874ead2ed9de86eea20c4a67ce7b53cb2766c09e | erpnext/patches/v5_0/link_warehouse_with_account.py | erpnext/patches/v5_0/link_warehouse_with_account.py | # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
# License: GNU General Public License v3. See license.txt
from __future__ import unicode_literals
import frappe
def execute():
frappe.db.sql("""update tabAccount set warehouse=master_name
where ifnull(account_type, '') = 'Warehouse' and ifnull(ma... | # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
# License: GNU General Public License v3. See license.txt
from __future__ import unicode_literals
import frappe
def execute():
if "master_name" in frappe.db.get_table_columns("Account"):
frappe.db.sql("""update tabAccount set warehouse=master_na... | Update warehouse as per master_name if master_name exists | Update warehouse as per master_name if master_name exists
| Python | agpl-3.0 | indictranstech/fbd_erpnext,gangadharkadam/saloon_erp_install,mbauskar/helpdesk-erpnext,gmarke/erpnext,Tejal011089/paypal_erpnext,Tejal011089/trufil-erpnext,treejames/erpnext,indictranstech/reciphergroup-erpnext,pombredanne/erpnext,gangadharkadam/saloon_erp,gangadharkadam/vlinkerp,hatwar/buyback-erpnext,shft117/SteckerA... | # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
# License: GNU General Public License v3. See license.txt
from __future__ import unicode_literals
import frappe
def execute():
frappe.db.sql("""update tabAccount set warehouse=master_name
where ifnull(account_type, '') = 'Warehouse' and ifnull(ma... | # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
# License: GNU General Public License v3. See license.txt
from __future__ import unicode_literals
import frappe
def execute():
if "master_name" in frappe.db.get_table_columns("Account"):
frappe.db.sql("""update tabAccount set warehouse=master_na... | <commit_before># Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
# License: GNU General Public License v3. See license.txt
from __future__ import unicode_literals
import frappe
def execute():
frappe.db.sql("""update tabAccount set warehouse=master_name
where ifnull(account_type, '') = 'Warehouse... | # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
# License: GNU General Public License v3. See license.txt
from __future__ import unicode_literals
import frappe
def execute():
if "master_name" in frappe.db.get_table_columns("Account"):
frappe.db.sql("""update tabAccount set warehouse=master_na... | # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
# License: GNU General Public License v3. See license.txt
from __future__ import unicode_literals
import frappe
def execute():
frappe.db.sql("""update tabAccount set warehouse=master_name
where ifnull(account_type, '') = 'Warehouse' and ifnull(ma... | <commit_before># Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
# License: GNU General Public License v3. See license.txt
from __future__ import unicode_literals
import frappe
def execute():
frappe.db.sql("""update tabAccount set warehouse=master_name
where ifnull(account_type, '') = 'Warehouse... |
c8392e6c0210c9b308927c807c44449ebd31694e | enthought/traits/ui/editors/date_editor.py | enthought/traits/ui/editors/date_editor.py | #------------------------------------------------------------------------------
#
# Copyright (c) 2008, Enthought, Inc.
# All rights reserved.
#
# This software is provided without warranty under the terms of the BSD
# license included in enthought/LICENSE.txt and may be redistributed only
# under the conditions... | #------------------------------------------------------------------------------
#
# Copyright (c) 2008, Enthought, Inc.
# All rights reserved.
#
# This software is provided without warranty under the terms of the BSD
# license included in enthought/LICENSE.txt and may be redistributed only
# under the conditions... | Add multi_select in the DateEditor params for Custom editors. | Add multi_select in the DateEditor params for Custom editors.
| Python | bsd-3-clause | burnpanck/traits,burnpanck/traits | #------------------------------------------------------------------------------
#
# Copyright (c) 2008, Enthought, Inc.
# All rights reserved.
#
# This software is provided without warranty under the terms of the BSD
# license included in enthought/LICENSE.txt and may be redistributed only
# under the conditions... | #------------------------------------------------------------------------------
#
# Copyright (c) 2008, Enthought, Inc.
# All rights reserved.
#
# This software is provided without warranty under the terms of the BSD
# license included in enthought/LICENSE.txt and may be redistributed only
# under the conditions... | <commit_before>#------------------------------------------------------------------------------
#
# Copyright (c) 2008, Enthought, Inc.
# All rights reserved.
#
# This software is provided without warranty under the terms of the BSD
# license included in enthought/LICENSE.txt and may be redistributed only
# under... | #------------------------------------------------------------------------------
#
# Copyright (c) 2008, Enthought, Inc.
# All rights reserved.
#
# This software is provided without warranty under the terms of the BSD
# license included in enthought/LICENSE.txt and may be redistributed only
# under the conditions... | #------------------------------------------------------------------------------
#
# Copyright (c) 2008, Enthought, Inc.
# All rights reserved.
#
# This software is provided without warranty under the terms of the BSD
# license included in enthought/LICENSE.txt and may be redistributed only
# under the conditions... | <commit_before>#------------------------------------------------------------------------------
#
# Copyright (c) 2008, Enthought, Inc.
# All rights reserved.
#
# This software is provided without warranty under the terms of the BSD
# license included in enthought/LICENSE.txt and may be redistributed only
# under... |
d9d22ea370f794681e5a3e6e7683a83f4bbe356a | feature_extraction/measurements/texture_haralick.py | feature_extraction/measurements/texture_haralick.py | from . import Measurement
import feature_extraction.util.cleanup as cleanup
from skimage.morphology import binary_erosion, disk
class HaralickTexture(Measurement):
default_options = {
'clip_cell_borders': True,
'erode_cell': False,
'erode_cell_amount': False,
}
def __init__(self, options=None):
super(Harali... | from . import Measurement
import feature_extraction.util.cleanup as cleanup
from skimage.morphology import binary_erosion, disk
class HaralickTexture(Measurement):
default_options = {
'clip_cell_borders': True,
'erode_cell': False,
'erode_cell_amount': False,
}
def __init__(self, options=None):
super(Harali... | Fix the image masking in HaralickTexture | Fix the image masking in HaralickTexture
| Python | apache-2.0 | widoptimization-willett/feature-extraction | from . import Measurement
import feature_extraction.util.cleanup as cleanup
from skimage.morphology import binary_erosion, disk
class HaralickTexture(Measurement):
default_options = {
'clip_cell_borders': True,
'erode_cell': False,
'erode_cell_amount': False,
}
def __init__(self, options=None):
super(Harali... | from . import Measurement
import feature_extraction.util.cleanup as cleanup
from skimage.morphology import binary_erosion, disk
class HaralickTexture(Measurement):
default_options = {
'clip_cell_borders': True,
'erode_cell': False,
'erode_cell_amount': False,
}
def __init__(self, options=None):
super(Harali... | <commit_before>from . import Measurement
import feature_extraction.util.cleanup as cleanup
from skimage.morphology import binary_erosion, disk
class HaralickTexture(Measurement):
default_options = {
'clip_cell_borders': True,
'erode_cell': False,
'erode_cell_amount': False,
}
def __init__(self, options=None):... | from . import Measurement
import feature_extraction.util.cleanup as cleanup
from skimage.morphology import binary_erosion, disk
class HaralickTexture(Measurement):
default_options = {
'clip_cell_borders': True,
'erode_cell': False,
'erode_cell_amount': False,
}
def __init__(self, options=None):
super(Harali... | from . import Measurement
import feature_extraction.util.cleanup as cleanup
from skimage.morphology import binary_erosion, disk
class HaralickTexture(Measurement):
default_options = {
'clip_cell_borders': True,
'erode_cell': False,
'erode_cell_amount': False,
}
def __init__(self, options=None):
super(Harali... | <commit_before>from . import Measurement
import feature_extraction.util.cleanup as cleanup
from skimage.morphology import binary_erosion, disk
class HaralickTexture(Measurement):
default_options = {
'clip_cell_borders': True,
'erode_cell': False,
'erode_cell_amount': False,
}
def __init__(self, options=None):... |
edfbeabb802e64527094d46680f994a44ed7f0bd | froide_campaign/providers/amenity_local.py | froide_campaign/providers/amenity_local.py | from django.contrib.gis.measure import D
from django.contrib.gis.db.models.functions import Distance
from froide.publicbody.models import PublicBody
from .amenity import AmenityProvider
class AmenityLocalProvider(AmenityProvider):
'''
Like Amenity provider but tries to find the public body
for the amen... | from django.contrib.gis.measure import D
from django.contrib.gis.db.models.functions import Distance
from froide.publicbody.models import PublicBody
from .amenity import AmenityProvider
class AmenityLocalProvider(AmenityProvider):
'''
Like Amenity provider but tries to find the public body
for the amen... | Select popular pbs first instead of only closest | Select popular pbs first instead of only closest | Python | mit | okfde/froide-campaign,okfde/froide-campaign,okfde/froide-campaign | from django.contrib.gis.measure import D
from django.contrib.gis.db.models.functions import Distance
from froide.publicbody.models import PublicBody
from .amenity import AmenityProvider
class AmenityLocalProvider(AmenityProvider):
'''
Like Amenity provider but tries to find the public body
for the amen... | from django.contrib.gis.measure import D
from django.contrib.gis.db.models.functions import Distance
from froide.publicbody.models import PublicBody
from .amenity import AmenityProvider
class AmenityLocalProvider(AmenityProvider):
'''
Like Amenity provider but tries to find the public body
for the amen... | <commit_before>from django.contrib.gis.measure import D
from django.contrib.gis.db.models.functions import Distance
from froide.publicbody.models import PublicBody
from .amenity import AmenityProvider
class AmenityLocalProvider(AmenityProvider):
'''
Like Amenity provider but tries to find the public body
... | from django.contrib.gis.measure import D
from django.contrib.gis.db.models.functions import Distance
from froide.publicbody.models import PublicBody
from .amenity import AmenityProvider
class AmenityLocalProvider(AmenityProvider):
'''
Like Amenity provider but tries to find the public body
for the amen... | from django.contrib.gis.measure import D
from django.contrib.gis.db.models.functions import Distance
from froide.publicbody.models import PublicBody
from .amenity import AmenityProvider
class AmenityLocalProvider(AmenityProvider):
'''
Like Amenity provider but tries to find the public body
for the amen... | <commit_before>from django.contrib.gis.measure import D
from django.contrib.gis.db.models.functions import Distance
from froide.publicbody.models import PublicBody
from .amenity import AmenityProvider
class AmenityLocalProvider(AmenityProvider):
'''
Like Amenity provider but tries to find the public body
... |
39ea591073339ad86f77c22f7b29436efcf01a0e | egpackager/datamanager.py | egpackager/datamanager.py | import logging
from collections import OrderedDict
from egpackager.datasources import GspreadDataSource, RasterDataSource
class DataManager(object):
def __init__(self, debug=False):
# Set up logging
if debug:
logging.basicConfig(level=logging.DEBUG)
else:
logging.... | import logging
from collections import OrderedDict
from egpackager.datasources import GspreadDataSource, RasterDataSource
class DataManager(object):
def __init__(self, debug=False):
# Set up logging
if debug:
logging.basicConfig(level=logging.DEBUG)
else:
logging.... | Add metadata and resource distinction in DataManager | Add metadata and resource distinction in DataManager
| Python | mit | VUEG/egpackager | import logging
from collections import OrderedDict
from egpackager.datasources import GspreadDataSource, RasterDataSource
class DataManager(object):
def __init__(self, debug=False):
# Set up logging
if debug:
logging.basicConfig(level=logging.DEBUG)
else:
logging.... | import logging
from collections import OrderedDict
from egpackager.datasources import GspreadDataSource, RasterDataSource
class DataManager(object):
def __init__(self, debug=False):
# Set up logging
if debug:
logging.basicConfig(level=logging.DEBUG)
else:
logging.... | <commit_before>import logging
from collections import OrderedDict
from egpackager.datasources import GspreadDataSource, RasterDataSource
class DataManager(object):
def __init__(self, debug=False):
# Set up logging
if debug:
logging.basicConfig(level=logging.DEBUG)
else:
... | import logging
from collections import OrderedDict
from egpackager.datasources import GspreadDataSource, RasterDataSource
class DataManager(object):
def __init__(self, debug=False):
# Set up logging
if debug:
logging.basicConfig(level=logging.DEBUG)
else:
logging.... | import logging
from collections import OrderedDict
from egpackager.datasources import GspreadDataSource, RasterDataSource
class DataManager(object):
def __init__(self, debug=False):
# Set up logging
if debug:
logging.basicConfig(level=logging.DEBUG)
else:
logging.... | <commit_before>import logging
from collections import OrderedDict
from egpackager.datasources import GspreadDataSource, RasterDataSource
class DataManager(object):
def __init__(self, debug=False):
# Set up logging
if debug:
logging.basicConfig(level=logging.DEBUG)
else:
... |
e0d2ce09475e3ae07e2740cbf0e342f68c1564a8 | gn/standalone/toolchain/linux_find_llvm.py | gn/standalone/toolchain/linux_find_llvm.py | # Copyright (C) 2017 The Android Open Source Project
#
# 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 ... | # Copyright (C) 2017 The Android Open Source Project
#
# 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 ... | Fix issue with finding llvm when using python3 | gn: Fix issue with finding llvm when using python3
With python3, subprocess output is a byte sequence. This needs to be
decoded to string so that the string functions work. Fix it so we can
find LLVM when building perfetto.
Also fix 'print' operator which is a function in python3.
Bug: 147789115
Signed-off-by: Joel... | Python | apache-2.0 | google/perfetto,google/perfetto,google/perfetto,google/perfetto,google/perfetto,google/perfetto,google/perfetto,google/perfetto | # Copyright (C) 2017 The Android Open Source Project
#
# 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 ... | # Copyright (C) 2017 The Android Open Source Project
#
# 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 ... | <commit_before># Copyright (C) 2017 The Android Open Source Project
#
# 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 ... | # Copyright (C) 2017 The Android Open Source Project
#
# 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 ... | # Copyright (C) 2017 The Android Open Source Project
#
# 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 ... | <commit_before># Copyright (C) 2017 The Android Open Source Project
#
# 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 ... |
d3febefc0927968ca8e5040c74478a81aef31692 | ml_adv_logistic_reg/python_code/advanced_log_reg.py | ml_adv_logistic_reg/python_code/advanced_log_reg.py | from get_data_from_source import GetDataFromSource
from regularized_log_reg import RegularizedLogReg
import matplotlib.pyplot as plt
class AdvancedLogReg(RegularizedLogReg):
def test_something(self):
print self.m, self.n | from get_data_from_source import GetDataFromSource
from regularized_log_reg import RegularizedLogReg
import matplotlib.pyplot as plt
class AdvancedLogReg(RegularizedLogReg):
def test_something(self):
print self.m, self.n
print self.X
# def oneVsAll(self, theta_len, lambda_val): | Add preprocessing steps for mat input | Add preprocessing steps for mat input
| Python | mit | pmb311/Machine_Learning,pmb311/Machine_Learning,pmb311/Machine_Learning,pmb311/Machine_Learning | from get_data_from_source import GetDataFromSource
from regularized_log_reg import RegularizedLogReg
import matplotlib.pyplot as plt
class AdvancedLogReg(RegularizedLogReg):
def test_something(self):
print self.m, self.nAdd preprocessing steps for mat input | from get_data_from_source import GetDataFromSource
from regularized_log_reg import RegularizedLogReg
import matplotlib.pyplot as plt
class AdvancedLogReg(RegularizedLogReg):
def test_something(self):
print self.m, self.n
print self.X
# def oneVsAll(self, theta_len, lambda_val): | <commit_before>from get_data_from_source import GetDataFromSource
from regularized_log_reg import RegularizedLogReg
import matplotlib.pyplot as plt
class AdvancedLogReg(RegularizedLogReg):
def test_something(self):
print self.m, self.n<commit_msg>Add preprocessing steps for mat input<commit_after> | from get_data_from_source import GetDataFromSource
from regularized_log_reg import RegularizedLogReg
import matplotlib.pyplot as plt
class AdvancedLogReg(RegularizedLogReg):
def test_something(self):
print self.m, self.n
print self.X
# def oneVsAll(self, theta_len, lambda_val): | from get_data_from_source import GetDataFromSource
from regularized_log_reg import RegularizedLogReg
import matplotlib.pyplot as plt
class AdvancedLogReg(RegularizedLogReg):
def test_something(self):
print self.m, self.nAdd preprocessing steps for mat inputfrom get_data_from_source import GetDataFromSource
from reg... | <commit_before>from get_data_from_source import GetDataFromSource
from regularized_log_reg import RegularizedLogReg
import matplotlib.pyplot as plt
class AdvancedLogReg(RegularizedLogReg):
def test_something(self):
print self.m, self.n<commit_msg>Add preprocessing steps for mat input<commit_after>from get_data_from... |
db15dc066e238022dcf23559d882a29fbc42a90b | mxfield/validators.py | mxfield/validators.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import re
from django.core import validators
from django.utils.deconstruct import deconstructible
from django.utils.translation import ugettext_lazy as _
@deconstructible
class CURPValidator(validators.RegexValidator):
regex = re.compile(r'^([A-Z][A,E,I,O,U,X][A-Z]{2}[0... | Add class validator for CURP field | Add class validator for CURP field
| Python | mit | krescruz/django-mxfield | Add class validator for CURP field | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import re
from django.core import validators
from django.utils.deconstruct import deconstructible
from django.utils.translation import ugettext_lazy as _
@deconstructible
class CURPValidator(validators.RegexValidator):
regex = re.compile(r'^([A-Z][A,E,I,O,U,X][A-Z]{2}[0... | <commit_before><commit_msg>Add class validator for CURP field<commit_after> | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import re
from django.core import validators
from django.utils.deconstruct import deconstructible
from django.utils.translation import ugettext_lazy as _
@deconstructible
class CURPValidator(validators.RegexValidator):
regex = re.compile(r'^([A-Z][A,E,I,O,U,X][A-Z]{2}[0... | Add class validator for CURP field#!/usr/bin/env python
# -*- coding: utf-8 -*-
import re
from django.core import validators
from django.utils.deconstruct import deconstructible
from django.utils.translation import ugettext_lazy as _
@deconstructible
class CURPValidator(validators.RegexValidator):
regex = re.compil... | <commit_before><commit_msg>Add class validator for CURP field<commit_after>#!/usr/bin/env python
# -*- coding: utf-8 -*-
import re
from django.core import validators
from django.utils.deconstruct import deconstructible
from django.utils.translation import ugettext_lazy as _
@deconstructible
class CURPValidator(valid... | |
ab9ec5d7b2e8675cb9e7593a8adc0a0e9f0955bb | IPython/html/widgets/__init__.py | IPython/html/widgets/__init__.py | from .widget import Widget, DOMWidget, CallbackDispatcher, register
from .widget_bool import Checkbox, ToggleButton
from .widget_button import Button
from .widget_box import Box, Popup, FlexBox, HBox, VBox
from .widget_float import FloatText, BoundedFloatText, FloatSlider, FloatProgress, FloatRangeSlider
from .widget_... | from .widget import Widget, DOMWidget, CallbackDispatcher, register
from .widget_bool import Checkbox, ToggleButton
from .widget_button import Button
from .widget_box import Box, Popup, FlexBox, HBox, VBox
from .widget_float import FloatText, BoundedFloatText, FloatSlider, FloatProgress, FloatRangeSlider
from .widget_... | Make the widget error message shorter and more understandable. | Make the widget error message shorter and more understandable.
| Python | bsd-3-clause | ipython/ipython,ipython/ipython | from .widget import Widget, DOMWidget, CallbackDispatcher, register
from .widget_bool import Checkbox, ToggleButton
from .widget_button import Button
from .widget_box import Box, Popup, FlexBox, HBox, VBox
from .widget_float import FloatText, BoundedFloatText, FloatSlider, FloatProgress, FloatRangeSlider
from .widget_... | from .widget import Widget, DOMWidget, CallbackDispatcher, register
from .widget_bool import Checkbox, ToggleButton
from .widget_button import Button
from .widget_box import Box, Popup, FlexBox, HBox, VBox
from .widget_float import FloatText, BoundedFloatText, FloatSlider, FloatProgress, FloatRangeSlider
from .widget_... | <commit_before>from .widget import Widget, DOMWidget, CallbackDispatcher, register
from .widget_bool import Checkbox, ToggleButton
from .widget_button import Button
from .widget_box import Box, Popup, FlexBox, HBox, VBox
from .widget_float import FloatText, BoundedFloatText, FloatSlider, FloatProgress, FloatRangeSlide... | from .widget import Widget, DOMWidget, CallbackDispatcher, register
from .widget_bool import Checkbox, ToggleButton
from .widget_button import Button
from .widget_box import Box, Popup, FlexBox, HBox, VBox
from .widget_float import FloatText, BoundedFloatText, FloatSlider, FloatProgress, FloatRangeSlider
from .widget_... | from .widget import Widget, DOMWidget, CallbackDispatcher, register
from .widget_bool import Checkbox, ToggleButton
from .widget_button import Button
from .widget_box import Box, Popup, FlexBox, HBox, VBox
from .widget_float import FloatText, BoundedFloatText, FloatSlider, FloatProgress, FloatRangeSlider
from .widget_... | <commit_before>from .widget import Widget, DOMWidget, CallbackDispatcher, register
from .widget_bool import Checkbox, ToggleButton
from .widget_button import Button
from .widget_box import Box, Popup, FlexBox, HBox, VBox
from .widget_float import FloatText, BoundedFloatText, FloatSlider, FloatProgress, FloatRangeSlide... |
37f365449089e45dc68f32ff7dbd6db781ad3b9f | LiSE/LiSE/tests/test_examples.py | LiSE/LiSE/tests/test_examples.py | from LiSE.examples import college, kobold, polygons, sickle
def test_college(engy):
college.install(engy)
engy.turn = 10 # wake up the students
engy.next_turn()
def test_kobold(engy):
kobold.inittest(engy, shrubberies=20, kobold_sprint_chance=.9)
for i in range(10):
engy.next_turn()
d... | from LiSE.examples import college, kobold, polygons, sickle
def test_college(engy):
college.install(engy)
engy.turn = 10 # wake up the students
engy.next_turn()
def test_kobold(engy):
kobold.inittest(engy, shrubberies=20, kobold_sprint_chance=.9)
for i in range(10):
engy.next_turn()
d... | Use more turns in test_sickle | Use more turns in test_sickle
The weird bugs only showed up late
| Python | agpl-3.0 | LogicalDash/LiSE,LogicalDash/LiSE | from LiSE.examples import college, kobold, polygons, sickle
def test_college(engy):
college.install(engy)
engy.turn = 10 # wake up the students
engy.next_turn()
def test_kobold(engy):
kobold.inittest(engy, shrubberies=20, kobold_sprint_chance=.9)
for i in range(10):
engy.next_turn()
d... | from LiSE.examples import college, kobold, polygons, sickle
def test_college(engy):
college.install(engy)
engy.turn = 10 # wake up the students
engy.next_turn()
def test_kobold(engy):
kobold.inittest(engy, shrubberies=20, kobold_sprint_chance=.9)
for i in range(10):
engy.next_turn()
d... | <commit_before>from LiSE.examples import college, kobold, polygons, sickle
def test_college(engy):
college.install(engy)
engy.turn = 10 # wake up the students
engy.next_turn()
def test_kobold(engy):
kobold.inittest(engy, shrubberies=20, kobold_sprint_chance=.9)
for i in range(10):
engy.... | from LiSE.examples import college, kobold, polygons, sickle
def test_college(engy):
college.install(engy)
engy.turn = 10 # wake up the students
engy.next_turn()
def test_kobold(engy):
kobold.inittest(engy, shrubberies=20, kobold_sprint_chance=.9)
for i in range(10):
engy.next_turn()
d... | from LiSE.examples import college, kobold, polygons, sickle
def test_college(engy):
college.install(engy)
engy.turn = 10 # wake up the students
engy.next_turn()
def test_kobold(engy):
kobold.inittest(engy, shrubberies=20, kobold_sprint_chance=.9)
for i in range(10):
engy.next_turn()
d... | <commit_before>from LiSE.examples import college, kobold, polygons, sickle
def test_college(engy):
college.install(engy)
engy.turn = 10 # wake up the students
engy.next_turn()
def test_kobold(engy):
kobold.inittest(engy, shrubberies=20, kobold_sprint_chance=.9)
for i in range(10):
engy.... |
da6406d1c419f18bd128af4d2d4e2578142cd783 | zou/migrations/versions/5a291251823c_add_max_retake_parameter.py | zou/migrations/versions/5a291251823c_add_max_retake_parameter.py | """add max retake parameter
Revision ID: 5a291251823c
Revises: 4095103c7d01
Create Date: 2022-06-29 10:56:13.556495
"""
from alembic import op
import sqlalchemy as sa
import sqlalchemy_utils
# revision identifiers, used by Alembic.
revision = '5a291251823c'
down_revision = '4095103c7d01'
branch_labels = None
depend... | """add max retake parameter
Revision ID: 5a291251823c
Revises: 4095103c7d01
Create Date: 2022-06-29 10:56:13.556495
"""
from alembic import op
import sqlalchemy as sa
import sqlalchemy_utils
# revision identifiers, used by Alembic.
revision = '5a291251823c'
down_revision = '4095103c7d01'
branch_labels = None
depend... | Fix max retake migration file | [db] Fix max retake migration file
| Python | agpl-3.0 | cgwire/zou | """add max retake parameter
Revision ID: 5a291251823c
Revises: 4095103c7d01
Create Date: 2022-06-29 10:56:13.556495
"""
from alembic import op
import sqlalchemy as sa
import sqlalchemy_utils
# revision identifiers, used by Alembic.
revision = '5a291251823c'
down_revision = '4095103c7d01'
branch_labels = None
depend... | """add max retake parameter
Revision ID: 5a291251823c
Revises: 4095103c7d01
Create Date: 2022-06-29 10:56:13.556495
"""
from alembic import op
import sqlalchemy as sa
import sqlalchemy_utils
# revision identifiers, used by Alembic.
revision = '5a291251823c'
down_revision = '4095103c7d01'
branch_labels = None
depend... | <commit_before>"""add max retake parameter
Revision ID: 5a291251823c
Revises: 4095103c7d01
Create Date: 2022-06-29 10:56:13.556495
"""
from alembic import op
import sqlalchemy as sa
import sqlalchemy_utils
# revision identifiers, used by Alembic.
revision = '5a291251823c'
down_revision = '4095103c7d01'
branch_label... | """add max retake parameter
Revision ID: 5a291251823c
Revises: 4095103c7d01
Create Date: 2022-06-29 10:56:13.556495
"""
from alembic import op
import sqlalchemy as sa
import sqlalchemy_utils
# revision identifiers, used by Alembic.
revision = '5a291251823c'
down_revision = '4095103c7d01'
branch_labels = None
depend... | """add max retake parameter
Revision ID: 5a291251823c
Revises: 4095103c7d01
Create Date: 2022-06-29 10:56:13.556495
"""
from alembic import op
import sqlalchemy as sa
import sqlalchemy_utils
# revision identifiers, used by Alembic.
revision = '5a291251823c'
down_revision = '4095103c7d01'
branch_labels = None
depend... | <commit_before>"""add max retake parameter
Revision ID: 5a291251823c
Revises: 4095103c7d01
Create Date: 2022-06-29 10:56:13.556495
"""
from alembic import op
import sqlalchemy as sa
import sqlalchemy_utils
# revision identifiers, used by Alembic.
revision = '5a291251823c'
down_revision = '4095103c7d01'
branch_label... |
4d1a7b48b450ebcf06c90dd618622b0ddafcba03 | xorgauth/accounts/password_validators.py | xorgauth/accounts/password_validators.py | # -*- coding: utf-8 -*-
# Copyright (c) Polytechnique.org
# This code is distributed under the Affero General Public License version 3
import crypt
import sys
from django.core.exceptions import ObjectDoesNotExist
from django.utils.crypto import get_random_string
from . import models
class GoogleAppsPasswordValidato... | # -*- coding: utf-8 -*-
# Copyright (c) Polytechnique.org
# This code is distributed under the Affero General Public License version 3
import crypt
import sys
from django.core.exceptions import ObjectDoesNotExist
from django.utils.crypto import get_random_string
from . import models
class GoogleAppsPasswordValidato... | Add missing validate method to GoogleAppsPasswordValidator | Add missing validate method to GoogleAppsPasswordValidator
Django complains when updating the password:
'GoogleAppsPasswordValidator' object has no attribute 'validate'
| Python | agpl-3.0 | Polytechnique-org/xorgauth,Polytechnique-org/xorgauth | # -*- coding: utf-8 -*-
# Copyright (c) Polytechnique.org
# This code is distributed under the Affero General Public License version 3
import crypt
import sys
from django.core.exceptions import ObjectDoesNotExist
from django.utils.crypto import get_random_string
from . import models
class GoogleAppsPasswordValidato... | # -*- coding: utf-8 -*-
# Copyright (c) Polytechnique.org
# This code is distributed under the Affero General Public License version 3
import crypt
import sys
from django.core.exceptions import ObjectDoesNotExist
from django.utils.crypto import get_random_string
from . import models
class GoogleAppsPasswordValidato... | <commit_before># -*- coding: utf-8 -*-
# Copyright (c) Polytechnique.org
# This code is distributed under the Affero General Public License version 3
import crypt
import sys
from django.core.exceptions import ObjectDoesNotExist
from django.utils.crypto import get_random_string
from . import models
class GoogleAppsP... | # -*- coding: utf-8 -*-
# Copyright (c) Polytechnique.org
# This code is distributed under the Affero General Public License version 3
import crypt
import sys
from django.core.exceptions import ObjectDoesNotExist
from django.utils.crypto import get_random_string
from . import models
class GoogleAppsPasswordValidato... | # -*- coding: utf-8 -*-
# Copyright (c) Polytechnique.org
# This code is distributed under the Affero General Public License version 3
import crypt
import sys
from django.core.exceptions import ObjectDoesNotExist
from django.utils.crypto import get_random_string
from . import models
class GoogleAppsPasswordValidato... | <commit_before># -*- coding: utf-8 -*-
# Copyright (c) Polytechnique.org
# This code is distributed under the Affero General Public License version 3
import crypt
import sys
from django.core.exceptions import ObjectDoesNotExist
from django.utils.crypto import get_random_string
from . import models
class GoogleAppsP... |
d96dbe9f5688e469f34c7428569eda7d2c86f3d7 | tests/test_err.py | tests/test_err.py | # Testing use of cpl_errs
import pytest
import rasterio
from rasterio.errors import RasterioIOError
def test_io_error(tmpdir):
with pytest.raises(RasterioIOError) as exc_info:
rasterio.open(str(tmpdir.join('foo.tif')))
msg = exc_info.value.message
assert msg.startswith("'{0}'".format(tmpdir.join... | # Testing use of cpl_errs
import pytest
import rasterio
from rasterio.errors import RasterioIOError
def test_io_error(tmpdir):
with pytest.raises(RasterioIOError) as exc_info:
rasterio.open(str(tmpdir.join('foo.tif')))
msg = str(exc_info.value)
assert msg.startswith("'{0}'".format(tmpdir.join('f... | Test str repr of exception | Test str repr of exception
| Python | bsd-3-clause | kapadia/rasterio,brendan-ward/rasterio,brendan-ward/rasterio,brendan-ward/rasterio,kapadia/rasterio,kapadia/rasterio | # Testing use of cpl_errs
import pytest
import rasterio
from rasterio.errors import RasterioIOError
def test_io_error(tmpdir):
with pytest.raises(RasterioIOError) as exc_info:
rasterio.open(str(tmpdir.join('foo.tif')))
msg = exc_info.value.message
assert msg.startswith("'{0}'".format(tmpdir.join... | # Testing use of cpl_errs
import pytest
import rasterio
from rasterio.errors import RasterioIOError
def test_io_error(tmpdir):
with pytest.raises(RasterioIOError) as exc_info:
rasterio.open(str(tmpdir.join('foo.tif')))
msg = str(exc_info.value)
assert msg.startswith("'{0}'".format(tmpdir.join('f... | <commit_before># Testing use of cpl_errs
import pytest
import rasterio
from rasterio.errors import RasterioIOError
def test_io_error(tmpdir):
with pytest.raises(RasterioIOError) as exc_info:
rasterio.open(str(tmpdir.join('foo.tif')))
msg = exc_info.value.message
assert msg.startswith("'{0}'".for... | # Testing use of cpl_errs
import pytest
import rasterio
from rasterio.errors import RasterioIOError
def test_io_error(tmpdir):
with pytest.raises(RasterioIOError) as exc_info:
rasterio.open(str(tmpdir.join('foo.tif')))
msg = str(exc_info.value)
assert msg.startswith("'{0}'".format(tmpdir.join('f... | # Testing use of cpl_errs
import pytest
import rasterio
from rasterio.errors import RasterioIOError
def test_io_error(tmpdir):
with pytest.raises(RasterioIOError) as exc_info:
rasterio.open(str(tmpdir.join('foo.tif')))
msg = exc_info.value.message
assert msg.startswith("'{0}'".format(tmpdir.join... | <commit_before># Testing use of cpl_errs
import pytest
import rasterio
from rasterio.errors import RasterioIOError
def test_io_error(tmpdir):
with pytest.raises(RasterioIOError) as exc_info:
rasterio.open(str(tmpdir.join('foo.tif')))
msg = exc_info.value.message
assert msg.startswith("'{0}'".for... |
4b30bbcde1ae9cdb3b8fda242e32d44025ef1e0a | articles/migrations/0010_create_indepth_page.py | articles/migrations/0010_create_indepth_page.py | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django import VERSION as DJANGO_VERSION
from django.db import migrations
def create_indepth_page(apps, schema_editor):
Page = apps.get_model("wagtailcore", "Page")
InDepthListPage = apps.get_model("articles", "InDepthListPage")
home_pag... | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django import VERSION as DJANGO_VERSION
from django.contrib.contenttypes.management import update_contenttypes
from django.db import migrations
def create_indepth_page(apps, schema_editor):
update_contenttypes(apps.app_configs['articles'], inte... | Update the contenttypes before trying to access them. | Update the contenttypes before trying to access them.
| Python | mit | OpenCanada/website,albertoconnor/website,albertoconnor/website,OpenCanada/website,albertoconnor/website,OpenCanada/website,albertoconnor/website,OpenCanada/website | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django import VERSION as DJANGO_VERSION
from django.db import migrations
def create_indepth_page(apps, schema_editor):
Page = apps.get_model("wagtailcore", "Page")
InDepthListPage = apps.get_model("articles", "InDepthListPage")
home_pag... | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django import VERSION as DJANGO_VERSION
from django.contrib.contenttypes.management import update_contenttypes
from django.db import migrations
def create_indepth_page(apps, schema_editor):
update_contenttypes(apps.app_configs['articles'], inte... | <commit_before># -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django import VERSION as DJANGO_VERSION
from django.db import migrations
def create_indepth_page(apps, schema_editor):
Page = apps.get_model("wagtailcore", "Page")
InDepthListPage = apps.get_model("articles", "InDepthListPage... | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django import VERSION as DJANGO_VERSION
from django.contrib.contenttypes.management import update_contenttypes
from django.db import migrations
def create_indepth_page(apps, schema_editor):
update_contenttypes(apps.app_configs['articles'], inte... | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django import VERSION as DJANGO_VERSION
from django.db import migrations
def create_indepth_page(apps, schema_editor):
Page = apps.get_model("wagtailcore", "Page")
InDepthListPage = apps.get_model("articles", "InDepthListPage")
home_pag... | <commit_before># -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django import VERSION as DJANGO_VERSION
from django.db import migrations
def create_indepth_page(apps, schema_editor):
Page = apps.get_model("wagtailcore", "Page")
InDepthListPage = apps.get_model("articles", "InDepthListPage... |
c7550b21b8424bb11ad31b9755d910690e386b40 | salt/_beacons/default_network_interface_settings.py | salt/_beacons/default_network_interface_settings.py | # -*- coding: utf-8 -*-
'''
Beacon to monitor default network adapter setting changes on Linux
'''
from salt.beacons import network_settings
import logging
log = logging.getLogger(__name__)
__virtual_name__ = 'default_network_interface_settings'
def __virtual__():
if network_settings.__virtual__():
ret... | # -*- coding: utf-8 -*-
'''
Beacon to monitor default network adapter setting changes on Linux
'''
from salt.beacons import network_settings
import logging
log = logging.getLogger(__name__)
__virtual_name__ = 'default_network_interface_settings'
def __virtual__():
if network_settings.__virtual__():
ret... | Adjust network_settings config format for salt 2018.3.0. | Adjust network_settings config format for salt 2018.3.0.
Before this release the format did not use the 'interfaces' key.
| Python | apache-2.0 | ereslibre/salt,ereslibre/salt,kubic-project/salt,kubic-project/salt,ereslibre/salt,kubic-project/salt | # -*- coding: utf-8 -*-
'''
Beacon to monitor default network adapter setting changes on Linux
'''
from salt.beacons import network_settings
import logging
log = logging.getLogger(__name__)
__virtual_name__ = 'default_network_interface_settings'
def __virtual__():
if network_settings.__virtual__():
ret... | # -*- coding: utf-8 -*-
'''
Beacon to monitor default network adapter setting changes on Linux
'''
from salt.beacons import network_settings
import logging
log = logging.getLogger(__name__)
__virtual_name__ = 'default_network_interface_settings'
def __virtual__():
if network_settings.__virtual__():
ret... | <commit_before># -*- coding: utf-8 -*-
'''
Beacon to monitor default network adapter setting changes on Linux
'''
from salt.beacons import network_settings
import logging
log = logging.getLogger(__name__)
__virtual_name__ = 'default_network_interface_settings'
def __virtual__():
if network_settings.__virtual__... | # -*- coding: utf-8 -*-
'''
Beacon to monitor default network adapter setting changes on Linux
'''
from salt.beacons import network_settings
import logging
log = logging.getLogger(__name__)
__virtual_name__ = 'default_network_interface_settings'
def __virtual__():
if network_settings.__virtual__():
ret... | # -*- coding: utf-8 -*-
'''
Beacon to monitor default network adapter setting changes on Linux
'''
from salt.beacons import network_settings
import logging
log = logging.getLogger(__name__)
__virtual_name__ = 'default_network_interface_settings'
def __virtual__():
if network_settings.__virtual__():
ret... | <commit_before># -*- coding: utf-8 -*-
'''
Beacon to monitor default network adapter setting changes on Linux
'''
from salt.beacons import network_settings
import logging
log = logging.getLogger(__name__)
__virtual_name__ = 'default_network_interface_settings'
def __virtual__():
if network_settings.__virtual__... |
a3ebec3a7d5b47b008eb5c8bee51ad21188a8adf | testsuite/node_test.py | testsuite/node_test.py | #!/usr/bin/env python2
from testlib import *
set_port("80")
set_server("us.bittoll.com")
def test_page_error():
r = apicall("nonexistant", "hi")
assert "error" in r
assert r["error"] != ""
assert int(r["error_code"]) == 0
def test_login(login):
info = login
assert 'username' in info
asser... | #!/usr/bin/env python2
from testlib import *
set_port("80")
set_server("us.bittoll.com")
def test_page_error():
r = apicall("nonexistant", "hi")
assert "error" in r
assert r["error"] != ""
assert int(r["error_code"]) == 1
def test_login(login):
info = login
assert 'username' in info
asser... | Fix error code on non existent page | Fix error code on non existent page
| Python | mit | c00w/BitToll,c00w/BitToll,c00w/BitToll,c00w/BitToll | #!/usr/bin/env python2
from testlib import *
set_port("80")
set_server("us.bittoll.com")
def test_page_error():
r = apicall("nonexistant", "hi")
assert "error" in r
assert r["error"] != ""
assert int(r["error_code"]) == 0
def test_login(login):
info = login
assert 'username' in info
asser... | #!/usr/bin/env python2
from testlib import *
set_port("80")
set_server("us.bittoll.com")
def test_page_error():
r = apicall("nonexistant", "hi")
assert "error" in r
assert r["error"] != ""
assert int(r["error_code"]) == 1
def test_login(login):
info = login
assert 'username' in info
asser... | <commit_before>#!/usr/bin/env python2
from testlib import *
set_port("80")
set_server("us.bittoll.com")
def test_page_error():
r = apicall("nonexistant", "hi")
assert "error" in r
assert r["error"] != ""
assert int(r["error_code"]) == 0
def test_login(login):
info = login
assert 'username' in... | #!/usr/bin/env python2
from testlib import *
set_port("80")
set_server("us.bittoll.com")
def test_page_error():
r = apicall("nonexistant", "hi")
assert "error" in r
assert r["error"] != ""
assert int(r["error_code"]) == 1
def test_login(login):
info = login
assert 'username' in info
asser... | #!/usr/bin/env python2
from testlib import *
set_port("80")
set_server("us.bittoll.com")
def test_page_error():
r = apicall("nonexistant", "hi")
assert "error" in r
assert r["error"] != ""
assert int(r["error_code"]) == 0
def test_login(login):
info = login
assert 'username' in info
asser... | <commit_before>#!/usr/bin/env python2
from testlib import *
set_port("80")
set_server("us.bittoll.com")
def test_page_error():
r = apicall("nonexistant", "hi")
assert "error" in r
assert r["error"] != ""
assert int(r["error_code"]) == 0
def test_login(login):
info = login
assert 'username' in... |
90c816bd40a4971dda8bd96d865efb1dee131566 | files/install_workflow.py | files/install_workflow.py | #!/usr/bin/env python
import argparse
from bioblend import galaxy
import json
def main():
"""
This script uses bioblend to import .ga workflow files into a running instance of Galaxy
"""
parser = argparse.ArgumentParser()
parser.add_argument("-w", "--workflow_path", help='Path to workflow file... | #!/usr/bin/env python
import argparse
from bioblend import galaxy
import json
def main():
"""
This script uses bioblend to import .ga workflow files into a running instance of Galaxy
"""
parser = argparse.ArgumentParser()
parser.add_argument("-w", "--workflow_path", help='Path to workflow file... | Make sure the opened workflow file gets closed after it's been loaded | Make sure the opened workflow file gets closed after it's been loaded
| Python | mit | galaxyproject/ansible-galaxy-tools,galaxyproject/ansible-tools,nuwang/ansible-galaxy-tools,anmoljh/ansible-galaxy-tools | #!/usr/bin/env python
import argparse
from bioblend import galaxy
import json
def main():
"""
This script uses bioblend to import .ga workflow files into a running instance of Galaxy
"""
parser = argparse.ArgumentParser()
parser.add_argument("-w", "--workflow_path", help='Path to workflow file... | #!/usr/bin/env python
import argparse
from bioblend import galaxy
import json
def main():
"""
This script uses bioblend to import .ga workflow files into a running instance of Galaxy
"""
parser = argparse.ArgumentParser()
parser.add_argument("-w", "--workflow_path", help='Path to workflow file... | <commit_before>#!/usr/bin/env python
import argparse
from bioblend import galaxy
import json
def main():
"""
This script uses bioblend to import .ga workflow files into a running instance of Galaxy
"""
parser = argparse.ArgumentParser()
parser.add_argument("-w", "--workflow_path", help='Path t... | #!/usr/bin/env python
import argparse
from bioblend import galaxy
import json
def main():
"""
This script uses bioblend to import .ga workflow files into a running instance of Galaxy
"""
parser = argparse.ArgumentParser()
parser.add_argument("-w", "--workflow_path", help='Path to workflow file... | #!/usr/bin/env python
import argparse
from bioblend import galaxy
import json
def main():
"""
This script uses bioblend to import .ga workflow files into a running instance of Galaxy
"""
parser = argparse.ArgumentParser()
parser.add_argument("-w", "--workflow_path", help='Path to workflow file... | <commit_before>#!/usr/bin/env python
import argparse
from bioblend import galaxy
import json
def main():
"""
This script uses bioblend to import .ga workflow files into a running instance of Galaxy
"""
parser = argparse.ArgumentParser()
parser.add_argument("-w", "--workflow_path", help='Path t... |
c740a0118035023a3770334f35bba2cf4506dbdf | firecares/settings/production.py | firecares/settings/production.py | from firecares.settings.base import *
INSTALLED_APPS = (
'django_statsd',
) + INSTALLED_APPS
STATSD_HOST = 'stats.garnertb.com'
STATSD_PREFIX = 'firecares'
STATSD_PATCHES = [
'django_statsd.patches.db',
'django_statsd.patches.cache',
]
MIDDLEWARE_CLASSES = (
'django_statsd.middleware.GraphiteRequest... | from firecares.settings.base import *
INSTALLED_APPS = (
'django_statsd',
) + INSTALLED_APPS
STATSD_HOST = 'stats.garnertb.com'
STATSD_PREFIX = 'firecares'
STATSD_PATCHES = [
'django_statsd.patches.db',
'django_statsd.patches.cache',
]
MIDDLEWARE_CLASSES = (
'django_statsd.middleware.GraphiteRequest... | Disable query string auth for django compressor. | Disable query string auth for django compressor.
| Python | mit | acengic/firecares,acengic/firecares,acengic/firecares,acengic/firecares | from firecares.settings.base import *
INSTALLED_APPS = (
'django_statsd',
) + INSTALLED_APPS
STATSD_HOST = 'stats.garnertb.com'
STATSD_PREFIX = 'firecares'
STATSD_PATCHES = [
'django_statsd.patches.db',
'django_statsd.patches.cache',
]
MIDDLEWARE_CLASSES = (
'django_statsd.middleware.GraphiteRequest... | from firecares.settings.base import *
INSTALLED_APPS = (
'django_statsd',
) + INSTALLED_APPS
STATSD_HOST = 'stats.garnertb.com'
STATSD_PREFIX = 'firecares'
STATSD_PATCHES = [
'django_statsd.patches.db',
'django_statsd.patches.cache',
]
MIDDLEWARE_CLASSES = (
'django_statsd.middleware.GraphiteRequest... | <commit_before>from firecares.settings.base import *
INSTALLED_APPS = (
'django_statsd',
) + INSTALLED_APPS
STATSD_HOST = 'stats.garnertb.com'
STATSD_PREFIX = 'firecares'
STATSD_PATCHES = [
'django_statsd.patches.db',
'django_statsd.patches.cache',
]
MIDDLEWARE_CLASSES = (
'django_statsd.middleware.... | from firecares.settings.base import *
INSTALLED_APPS = (
'django_statsd',
) + INSTALLED_APPS
STATSD_HOST = 'stats.garnertb.com'
STATSD_PREFIX = 'firecares'
STATSD_PATCHES = [
'django_statsd.patches.db',
'django_statsd.patches.cache',
]
MIDDLEWARE_CLASSES = (
'django_statsd.middleware.GraphiteRequest... | from firecares.settings.base import *
INSTALLED_APPS = (
'django_statsd',
) + INSTALLED_APPS
STATSD_HOST = 'stats.garnertb.com'
STATSD_PREFIX = 'firecares'
STATSD_PATCHES = [
'django_statsd.patches.db',
'django_statsd.patches.cache',
]
MIDDLEWARE_CLASSES = (
'django_statsd.middleware.GraphiteRequest... | <commit_before>from firecares.settings.base import *
INSTALLED_APPS = (
'django_statsd',
) + INSTALLED_APPS
STATSD_HOST = 'stats.garnertb.com'
STATSD_PREFIX = 'firecares'
STATSD_PATCHES = [
'django_statsd.patches.db',
'django_statsd.patches.cache',
]
MIDDLEWARE_CLASSES = (
'django_statsd.middleware.... |
135ac2fa3aa978328ba72db6ca84920f3da0f39a | furikura/desktop/unity.py | furikura/desktop/unity.py | import gi
import time
gi.require_version('Unity', '7.0')
from gi.repository import Unity, GObject
def update_counter(count):
launcher = Unity.LauncherEntry.get_for_desktop_id("furikura.desktop")
launcher.set_property("count", count)
launcher.set_property("count_visible", True)
| import gi
gi.require_version('Unity', '7.0')
from gi.repository import Unity
def update_counter(count):
launcher = Unity.LauncherEntry.get_for_desktop_id("furikura.desktop")
launcher.set_property("count", count)
launcher.set_property("count_visible", True)
| Remove unnecessary imports for Unity module | Remove unnecessary imports for Unity module
| Python | mit | benjamindean/furi-kura,benjamindean/furi-kura | import gi
import time
gi.require_version('Unity', '7.0')
from gi.repository import Unity, GObject
def update_counter(count):
launcher = Unity.LauncherEntry.get_for_desktop_id("furikura.desktop")
launcher.set_property("count", count)
launcher.set_property("count_visible", True)
Remove unnecessary impor... | import gi
gi.require_version('Unity', '7.0')
from gi.repository import Unity
def update_counter(count):
launcher = Unity.LauncherEntry.get_for_desktop_id("furikura.desktop")
launcher.set_property("count", count)
launcher.set_property("count_visible", True)
| <commit_before>import gi
import time
gi.require_version('Unity', '7.0')
from gi.repository import Unity, GObject
def update_counter(count):
launcher = Unity.LauncherEntry.get_for_desktop_id("furikura.desktop")
launcher.set_property("count", count)
launcher.set_property("count_visible", True)
<commit_m... | import gi
gi.require_version('Unity', '7.0')
from gi.repository import Unity
def update_counter(count):
launcher = Unity.LauncherEntry.get_for_desktop_id("furikura.desktop")
launcher.set_property("count", count)
launcher.set_property("count_visible", True)
| import gi
import time
gi.require_version('Unity', '7.0')
from gi.repository import Unity, GObject
def update_counter(count):
launcher = Unity.LauncherEntry.get_for_desktop_id("furikura.desktop")
launcher.set_property("count", count)
launcher.set_property("count_visible", True)
Remove unnecessary impor... | <commit_before>import gi
import time
gi.require_version('Unity', '7.0')
from gi.repository import Unity, GObject
def update_counter(count):
launcher = Unity.LauncherEntry.get_for_desktop_id("furikura.desktop")
launcher.set_property("count", count)
launcher.set_property("count_visible", True)
<commit_m... |
2559a1bd8cb8c41df165022074d1b123d4a0345a | hecuba_py/tests/storage_api_tests.py | hecuba_py/tests/storage_api_tests.py | import unittest
from storage.api import getByID
from hecuba.hdict import StorageDict
class ApiTestSDict(StorageDict):
'''
@TypeSpec <<key:int>, value:double>
'''
class StorageApi_Tests(unittest.TestCase):
def setUp(self):
pass
def class_type_test(self):
base_dict = ApiTestSDict(... | import unittest
from storage.api import getByID
from hecuba import config, StorageDict
class ApiTestSDict(StorageDict):
'''
@TypeSpec <<key:int>, value:double>
'''
class StorageApi_Tests(unittest.TestCase):
def setUp(self):
config.reset(mock_cassandra=False)
def class_type_test(self):
... | Reset Hecuba config when setUp a test | Reset Hecuba config when setUp a test
| Python | apache-2.0 | bsc-dd/hecuba,bsc-dd/hecuba,bsc-dd/hecuba,bsc-dd/hecuba | import unittest
from storage.api import getByID
from hecuba.hdict import StorageDict
class ApiTestSDict(StorageDict):
'''
@TypeSpec <<key:int>, value:double>
'''
class StorageApi_Tests(unittest.TestCase):
def setUp(self):
pass
def class_type_test(self):
base_dict = ApiTestSDict(... | import unittest
from storage.api import getByID
from hecuba import config, StorageDict
class ApiTestSDict(StorageDict):
'''
@TypeSpec <<key:int>, value:double>
'''
class StorageApi_Tests(unittest.TestCase):
def setUp(self):
config.reset(mock_cassandra=False)
def class_type_test(self):
... | <commit_before>import unittest
from storage.api import getByID
from hecuba.hdict import StorageDict
class ApiTestSDict(StorageDict):
'''
@TypeSpec <<key:int>, value:double>
'''
class StorageApi_Tests(unittest.TestCase):
def setUp(self):
pass
def class_type_test(self):
base_dict ... | import unittest
from storage.api import getByID
from hecuba import config, StorageDict
class ApiTestSDict(StorageDict):
'''
@TypeSpec <<key:int>, value:double>
'''
class StorageApi_Tests(unittest.TestCase):
def setUp(self):
config.reset(mock_cassandra=False)
def class_type_test(self):
... | import unittest
from storage.api import getByID
from hecuba.hdict import StorageDict
class ApiTestSDict(StorageDict):
'''
@TypeSpec <<key:int>, value:double>
'''
class StorageApi_Tests(unittest.TestCase):
def setUp(self):
pass
def class_type_test(self):
base_dict = ApiTestSDict(... | <commit_before>import unittest
from storage.api import getByID
from hecuba.hdict import StorageDict
class ApiTestSDict(StorageDict):
'''
@TypeSpec <<key:int>, value:double>
'''
class StorageApi_Tests(unittest.TestCase):
def setUp(self):
pass
def class_type_test(self):
base_dict ... |
f6ce7485f18d3c5299b64a9b10af08f5da1c2335 | infrastructure/control/osimctrl/src/start-opensim.py | infrastructure/control/osimctrl/src/start-opensim.py | #!/usr/bin/python
import os.path
import re
import subprocess
import sys
### CONFIGURE THESE PATHS ###
binaryPath = "/home/opensim/opensim/opensim-current/bin"
pidPath = "/tmp/OpenSim.pid"
### END OF CONFIG ###
if os.path.exists(pidPath):
print >> sys.stderr, "ERROR: OpenSim PID file %s still present. Assuming Ope... | #!/usr/bin/python
import os.path
import re
import subprocess
import sys
### CONFIGURE THESE PATHS ###
binaryPath = "/home/opensim/opensim/opensim-current/bin"
pidPath = "/tmp/OpenSim.pid"
### END OF CONFIG ###
### FUNCTIONS ###
def execCmd(cmd):
print "Executing command: %s" % cmd
return subprocess.check_out... | Create execCmd function and use | Create execCmd function and use
| Python | bsd-3-clause | justinccdev/opensimulator-tools,justinccdev/opensimulator-tools,justinccdev/opensimulator-tools,justinccdev/opensimulator-tools | #!/usr/bin/python
import os.path
import re
import subprocess
import sys
### CONFIGURE THESE PATHS ###
binaryPath = "/home/opensim/opensim/opensim-current/bin"
pidPath = "/tmp/OpenSim.pid"
### END OF CONFIG ###
if os.path.exists(pidPath):
print >> sys.stderr, "ERROR: OpenSim PID file %s still present. Assuming Ope... | #!/usr/bin/python
import os.path
import re
import subprocess
import sys
### CONFIGURE THESE PATHS ###
binaryPath = "/home/opensim/opensim/opensim-current/bin"
pidPath = "/tmp/OpenSim.pid"
### END OF CONFIG ###
### FUNCTIONS ###
def execCmd(cmd):
print "Executing command: %s" % cmd
return subprocess.check_out... | <commit_before>#!/usr/bin/python
import os.path
import re
import subprocess
import sys
### CONFIGURE THESE PATHS ###
binaryPath = "/home/opensim/opensim/opensim-current/bin"
pidPath = "/tmp/OpenSim.pid"
### END OF CONFIG ###
if os.path.exists(pidPath):
print >> sys.stderr, "ERROR: OpenSim PID file %s still present... | #!/usr/bin/python
import os.path
import re
import subprocess
import sys
### CONFIGURE THESE PATHS ###
binaryPath = "/home/opensim/opensim/opensim-current/bin"
pidPath = "/tmp/OpenSim.pid"
### END OF CONFIG ###
### FUNCTIONS ###
def execCmd(cmd):
print "Executing command: %s" % cmd
return subprocess.check_out... | #!/usr/bin/python
import os.path
import re
import subprocess
import sys
### CONFIGURE THESE PATHS ###
binaryPath = "/home/opensim/opensim/opensim-current/bin"
pidPath = "/tmp/OpenSim.pid"
### END OF CONFIG ###
if os.path.exists(pidPath):
print >> sys.stderr, "ERROR: OpenSim PID file %s still present. Assuming Ope... | <commit_before>#!/usr/bin/python
import os.path
import re
import subprocess
import sys
### CONFIGURE THESE PATHS ###
binaryPath = "/home/opensim/opensim/opensim-current/bin"
pidPath = "/tmp/OpenSim.pid"
### END OF CONFIG ###
if os.path.exists(pidPath):
print >> sys.stderr, "ERROR: OpenSim PID file %s still present... |
ee401cae95fe5244314a8cb032623779ac7e4842 | aragog/routing/decorator.py | aragog/routing/decorator.py | #! /usr/bin/env python
"""
Aragog Router Decorator
-----------------------
Convert any function into a WSGI endpoint with a simple decorator.
"""
from aragog.wsgi import get_url
from aragog.routing.client_error import HTTP404
class Router(object):
"""
Router holds the mapping of routes to callables.
"""... | #! /usr/bin/env python
"""
Aragog Router Decorator
-----------------------
Convert any function into a WSGI endpoint with a simple decorator.
"""
from aragog.wsgi import get_url
from aragog.routing.client_error import HTTP404
class Router(object):
"""
Router holds the mapping of routes to callables.
"""... | Fix call to HTTP404 now it is a function. | Fix call to HTTP404 now it is a function.
| Python | apache-2.0 | bramwelt/aragog | #! /usr/bin/env python
"""
Aragog Router Decorator
-----------------------
Convert any function into a WSGI endpoint with a simple decorator.
"""
from aragog.wsgi import get_url
from aragog.routing.client_error import HTTP404
class Router(object):
"""
Router holds the mapping of routes to callables.
"""... | #! /usr/bin/env python
"""
Aragog Router Decorator
-----------------------
Convert any function into a WSGI endpoint with a simple decorator.
"""
from aragog.wsgi import get_url
from aragog.routing.client_error import HTTP404
class Router(object):
"""
Router holds the mapping of routes to callables.
"""... | <commit_before>#! /usr/bin/env python
"""
Aragog Router Decorator
-----------------------
Convert any function into a WSGI endpoint with a simple decorator.
"""
from aragog.wsgi import get_url
from aragog.routing.client_error import HTTP404
class Router(object):
"""
Router holds the mapping of routes to cal... | #! /usr/bin/env python
"""
Aragog Router Decorator
-----------------------
Convert any function into a WSGI endpoint with a simple decorator.
"""
from aragog.wsgi import get_url
from aragog.routing.client_error import HTTP404
class Router(object):
"""
Router holds the mapping of routes to callables.
"""... | #! /usr/bin/env python
"""
Aragog Router Decorator
-----------------------
Convert any function into a WSGI endpoint with a simple decorator.
"""
from aragog.wsgi import get_url
from aragog.routing.client_error import HTTP404
class Router(object):
"""
Router holds the mapping of routes to callables.
"""... | <commit_before>#! /usr/bin/env python
"""
Aragog Router Decorator
-----------------------
Convert any function into a WSGI endpoint with a simple decorator.
"""
from aragog.wsgi import get_url
from aragog.routing.client_error import HTTP404
class Router(object):
"""
Router holds the mapping of routes to cal... |
1ef76b4f4395c9b5e3c2338822947999d5581013 | labs/lab-3/ex-3-2.events.py | labs/lab-3/ex-3-2.events.py | #!/usr/bin/env python
#
# Copyright 2016 BMC Software, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicabl... | #!/usr/bin/env python
#
# Copyright 2016 BMC Software, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicabl... | Add type field to source | Add type field to source
| Python | apache-2.0 | jdgwartney/tsi-lab,boundary/tsi-lab,jdgwartney/tsi-lab,boundary/tsi-lab,boundary/tsi-lab,boundary/tsi-lab,jdgwartney/tsi-lab,jdgwartney/tsi-lab | #!/usr/bin/env python
#
# Copyright 2016 BMC Software, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicabl... | #!/usr/bin/env python
#
# Copyright 2016 BMC Software, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicabl... | <commit_before>#!/usr/bin/env python
#
# Copyright 2016 BMC Software, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless requir... | #!/usr/bin/env python
#
# Copyright 2016 BMC Software, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicabl... | #!/usr/bin/env python
#
# Copyright 2016 BMC Software, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicabl... | <commit_before>#!/usr/bin/env python
#
# Copyright 2016 BMC Software, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless requir... |
3aeae9c3cde1976b43667d0a42039b8dd9bf52d9 | bitHopper/Website/Worker_Page.py | bitHopper/Website/Worker_Page.py | from bitHopper.Website import app, flask
import btcnet_info
import bitHopper.Configuration.Workers
@app.route("/worker", methods=['POST', 'GET'])
def worker():
#Check if this is a form submission
handle_worker_post(flask.request.form)
#Get a list of currently configured workers
pools_workers ... | from bitHopper.Website import app, flask
import btcnet_info
import bitHopper.Configuration.Workers
@app.route("/worker", methods=['POST', 'GET'])
def worker():
#Check if this is a form submission
handle_worker_post(flask.request.form)
#Get a list of currently configured workers
pools_workers ... | Add some debugging for the worker generation | Add some debugging for the worker generation
| Python | mit | c00w/bitHopper,c00w/bitHopper | from bitHopper.Website import app, flask
import btcnet_info
import bitHopper.Configuration.Workers
@app.route("/worker", methods=['POST', 'GET'])
def worker():
#Check if this is a form submission
handle_worker_post(flask.request.form)
#Get a list of currently configured workers
pools_workers ... | from bitHopper.Website import app, flask
import btcnet_info
import bitHopper.Configuration.Workers
@app.route("/worker", methods=['POST', 'GET'])
def worker():
#Check if this is a form submission
handle_worker_post(flask.request.form)
#Get a list of currently configured workers
pools_workers ... | <commit_before>from bitHopper.Website import app, flask
import btcnet_info
import bitHopper.Configuration.Workers
@app.route("/worker", methods=['POST', 'GET'])
def worker():
#Check if this is a form submission
handle_worker_post(flask.request.form)
#Get a list of currently configured workers
... | from bitHopper.Website import app, flask
import btcnet_info
import bitHopper.Configuration.Workers
@app.route("/worker", methods=['POST', 'GET'])
def worker():
#Check if this is a form submission
handle_worker_post(flask.request.form)
#Get a list of currently configured workers
pools_workers ... | from bitHopper.Website import app, flask
import btcnet_info
import bitHopper.Configuration.Workers
@app.route("/worker", methods=['POST', 'GET'])
def worker():
#Check if this is a form submission
handle_worker_post(flask.request.form)
#Get a list of currently configured workers
pools_workers ... | <commit_before>from bitHopper.Website import app, flask
import btcnet_info
import bitHopper.Configuration.Workers
@app.route("/worker", methods=['POST', 'GET'])
def worker():
#Check if this is a form submission
handle_worker_post(flask.request.form)
#Get a list of currently configured workers
... |
d5747c8b0f1a82afecf68aadc6b42c77e586493c | tools/perf/benchmarks/rasterize_and_record_micro.py | tools/perf/benchmarks/rasterize_and_record_micro.py | # Copyright 2013 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
from measurements import rasterize_and_record_micro
from telemetry import test
@test.Disabled('android', 'linux')
class RasterizeAndRecordMicroTop25(test.T... | # Copyright 2013 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
from measurements import rasterize_and_record_micro
from telemetry import test
@test.Disabled('android', 'linux')
class RasterizeAndRecordMicroTop25(test.T... | Add rasterization microbenchmark for silk | Add rasterization microbenchmark for silk
Add rasterize_and_record_micro_key_silk_cases for keeping track of
rasterization and recording performance of silk content. This mirrors
the existing rasterize_and_record_key_silk_cases benchmark and will
potentially allow us to remove it if this microbenchmark produces less
n... | Python | bsd-3-clause | markYoungH/chromium.src,anirudhSK/chromium,ondra-novak/chromium.src,ltilve/chromium,jaruba/chromium.src,bright-sparks/chromium-spacewalk,PeterWangIntel/chromium-crosswalk,hgl888/chromium-crosswalk-efl,anirudhSK/chromium,markYoungH/chromium.src,dednal/chromium.src,ltilve/chromium,chuan9/chromium-crosswalk,axinging/chrom... | # Copyright 2013 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
from measurements import rasterize_and_record_micro
from telemetry import test
@test.Disabled('android', 'linux')
class RasterizeAndRecordMicroTop25(test.T... | # Copyright 2013 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
from measurements import rasterize_and_record_micro
from telemetry import test
@test.Disabled('android', 'linux')
class RasterizeAndRecordMicroTop25(test.T... | <commit_before># Copyright 2013 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
from measurements import rasterize_and_record_micro
from telemetry import test
@test.Disabled('android', 'linux')
class RasterizeAndRecordMi... | # Copyright 2013 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
from measurements import rasterize_and_record_micro
from telemetry import test
@test.Disabled('android', 'linux')
class RasterizeAndRecordMicroTop25(test.T... | # Copyright 2013 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
from measurements import rasterize_and_record_micro
from telemetry import test
@test.Disabled('android', 'linux')
class RasterizeAndRecordMicroTop25(test.T... | <commit_before># Copyright 2013 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
from measurements import rasterize_and_record_micro
from telemetry import test
@test.Disabled('android', 'linux')
class RasterizeAndRecordMi... |
a6837da2e52753745b07f888ce3797cf0d0efd70 | setup.py | setup.py | ########
# Copyright (c) 2016 GigaSpaces Technologies Ltd. All rights reserved
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless... | ########
# Copyright (c) 2016 GigaSpaces Technologies Ltd. All rights reserved
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless... | Set path.py to a fixed version | Set path.py to a fixed version | Python | apache-2.0 | dankilman/clash,dankilman/clash | ########
# Copyright (c) 2016 GigaSpaces Technologies Ltd. All rights reserved
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless... | ########
# Copyright (c) 2016 GigaSpaces Technologies Ltd. All rights reserved
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless... | <commit_before>########
# Copyright (c) 2016 GigaSpaces Technologies Ltd. All rights reserved
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE... | ########
# Copyright (c) 2016 GigaSpaces Technologies Ltd. All rights reserved
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless... | ########
# Copyright (c) 2016 GigaSpaces Technologies Ltd. All rights reserved
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless... | <commit_before>########
# Copyright (c) 2016 GigaSpaces Technologies Ltd. All rights reserved
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE... |
a15701a49c1fffedc30f939c231be4936d3ab790 | setup.py | setup.py | import setuptools
from valohai_yaml import __version__
dev_dependencies = [
'flake8',
'isort',
'pydocstyle',
'pytest-cov',
]
if __name__ == '__main__':
setuptools.setup(
name='valohai-yaml',
description='Valohai.yaml validation and parsing',
version=__version__,
ur... | import ast
import os
import re
import setuptools
with open(os.path.join(os.path.dirname(__file__), 'valohai_yaml', '__init__.py')) as infp:
version = ast.literal_eval(re.search('__version__ = (.+?)$', infp.read(), re.M).group(1))
dev_dependencies = [
'flake8',
'isort',
'pydocstyle',
'pytest-cov',
... | Read version without importing package | Read version without importing package
| Python | mit | valohai/valohai-yaml | import setuptools
from valohai_yaml import __version__
dev_dependencies = [
'flake8',
'isort',
'pydocstyle',
'pytest-cov',
]
if __name__ == '__main__':
setuptools.setup(
name='valohai-yaml',
description='Valohai.yaml validation and parsing',
version=__version__,
ur... | import ast
import os
import re
import setuptools
with open(os.path.join(os.path.dirname(__file__), 'valohai_yaml', '__init__.py')) as infp:
version = ast.literal_eval(re.search('__version__ = (.+?)$', infp.read(), re.M).group(1))
dev_dependencies = [
'flake8',
'isort',
'pydocstyle',
'pytest-cov',
... | <commit_before>import setuptools
from valohai_yaml import __version__
dev_dependencies = [
'flake8',
'isort',
'pydocstyle',
'pytest-cov',
]
if __name__ == '__main__':
setuptools.setup(
name='valohai-yaml',
description='Valohai.yaml validation and parsing',
version=__versio... | import ast
import os
import re
import setuptools
with open(os.path.join(os.path.dirname(__file__), 'valohai_yaml', '__init__.py')) as infp:
version = ast.literal_eval(re.search('__version__ = (.+?)$', infp.read(), re.M).group(1))
dev_dependencies = [
'flake8',
'isort',
'pydocstyle',
'pytest-cov',
... | import setuptools
from valohai_yaml import __version__
dev_dependencies = [
'flake8',
'isort',
'pydocstyle',
'pytest-cov',
]
if __name__ == '__main__':
setuptools.setup(
name='valohai-yaml',
description='Valohai.yaml validation and parsing',
version=__version__,
ur... | <commit_before>import setuptools
from valohai_yaml import __version__
dev_dependencies = [
'flake8',
'isort',
'pydocstyle',
'pytest-cov',
]
if __name__ == '__main__':
setuptools.setup(
name='valohai-yaml',
description='Valohai.yaml validation and parsing',
version=__versio... |
6a9d8a10d6fdf4f4cfdf8ae5af9b172d9b53e8e9 | drawer.py | drawer.py | import matplotlib.pyplot as plt
import numpy as np
def display_result(vectors, clusters):
colors = [np.random.rand(3, 1) for i in range(len(clusters))]
for cluster_index, (centroid, cluster) in enumerate(clusters.items()):
current_cluster = [vectors[i] for i in cluster]
xs = list(map(lambda x:... | import matplotlib.pyplot as plt
import numpy as np
def display_result(vectors, clusters):
colors = [np.random.rand(3, 1) for i in range(len(clusters))]
centroids_colors = [[1-x for x in color] for color in colors]
for cluster_index, (centroid, cluster) in enumerate(clusters.items()):
current_clust... | Add drawing centroids with inverted colors | Add drawing centroids with inverted colors
| Python | mit | vanashimko/k-means | import matplotlib.pyplot as plt
import numpy as np
def display_result(vectors, clusters):
colors = [np.random.rand(3, 1) for i in range(len(clusters))]
for cluster_index, (centroid, cluster) in enumerate(clusters.items()):
current_cluster = [vectors[i] for i in cluster]
xs = list(map(lambda x:... | import matplotlib.pyplot as plt
import numpy as np
def display_result(vectors, clusters):
colors = [np.random.rand(3, 1) for i in range(len(clusters))]
centroids_colors = [[1-x for x in color] for color in colors]
for cluster_index, (centroid, cluster) in enumerate(clusters.items()):
current_clust... | <commit_before>import matplotlib.pyplot as plt
import numpy as np
def display_result(vectors, clusters):
colors = [np.random.rand(3, 1) for i in range(len(clusters))]
for cluster_index, (centroid, cluster) in enumerate(clusters.items()):
current_cluster = [vectors[i] for i in cluster]
xs = lis... | import matplotlib.pyplot as plt
import numpy as np
def display_result(vectors, clusters):
colors = [np.random.rand(3, 1) for i in range(len(clusters))]
centroids_colors = [[1-x for x in color] for color in colors]
for cluster_index, (centroid, cluster) in enumerate(clusters.items()):
current_clust... | import matplotlib.pyplot as plt
import numpy as np
def display_result(vectors, clusters):
colors = [np.random.rand(3, 1) for i in range(len(clusters))]
for cluster_index, (centroid, cluster) in enumerate(clusters.items()):
current_cluster = [vectors[i] for i in cluster]
xs = list(map(lambda x:... | <commit_before>import matplotlib.pyplot as plt
import numpy as np
def display_result(vectors, clusters):
colors = [np.random.rand(3, 1) for i in range(len(clusters))]
for cluster_index, (centroid, cluster) in enumerate(clusters.items()):
current_cluster = [vectors[i] for i in cluster]
xs = lis... |
f82861e1698d101dc61ca8891b38e68f57262334 | chroma-manager/chroma_cli/commands/__init__.py | chroma-manager/chroma_cli/commands/__init__.py | #
# ========================================================
# Copyright (c) 2012 Whamcloud, Inc. All rights reserved.
# ========================================================
from chroma_cli.commands.dispatcher import CommandDispatcher
CommandDispatcher # stupid pyflakes
| #
# ========================================================
# Copyright (c) 2012 Whamcloud, Inc. All rights reserved.
# ========================================================
| Remove some cruft that was accidentally pushed | Remove some cruft that was accidentally pushed
Change-Id: If75577316398c9d02230882766463f00aa13efd9
| Python | mit | intel-hpdd/intel-manager-for-lustre,intel-hpdd/intel-manager-for-lustre,intel-hpdd/intel-manager-for-lustre | #
# ========================================================
# Copyright (c) 2012 Whamcloud, Inc. All rights reserved.
# ========================================================
from chroma_cli.commands.dispatcher import CommandDispatcher
CommandDispatcher # stupid pyflakes
Remove some cruft that was accidentally p... | #
# ========================================================
# Copyright (c) 2012 Whamcloud, Inc. All rights reserved.
# ========================================================
| <commit_before>#
# ========================================================
# Copyright (c) 2012 Whamcloud, Inc. All rights reserved.
# ========================================================
from chroma_cli.commands.dispatcher import CommandDispatcher
CommandDispatcher # stupid pyflakes
<commit_msg>Remove some cr... | #
# ========================================================
# Copyright (c) 2012 Whamcloud, Inc. All rights reserved.
# ========================================================
| #
# ========================================================
# Copyright (c) 2012 Whamcloud, Inc. All rights reserved.
# ========================================================
from chroma_cli.commands.dispatcher import CommandDispatcher
CommandDispatcher # stupid pyflakes
Remove some cruft that was accidentally p... | <commit_before>#
# ========================================================
# Copyright (c) 2012 Whamcloud, Inc. All rights reserved.
# ========================================================
from chroma_cli.commands.dispatcher import CommandDispatcher
CommandDispatcher # stupid pyflakes
<commit_msg>Remove some cr... |
b76a7c4a60fbe3ea367a14e5fa19283fee062870 | pinboard_linkrot.py | pinboard_linkrot.py | #!/usr/bin/env python
from __future__ import division
import requests
import json
import sys
from requests.exceptions import SSLError, InvalidSchema, ConnectionError
def get_link_status_code(link):
headers = {'User-agent':'Mozilla/5.0'}
try:
r = requests.head(link, headers=headers, allow_redirects=Tru... | #!/usr/bin/env python
from __future__ import division
import requests
import json
import sys
from requests.exceptions import SSLError, InvalidSchema, ConnectionError
def get_link_status_code(link):
headers = {'User-agent':'Mozilla/5.0'}
try:
r = requests.head(link, headers=headers, allow_redirects=Tru... | Return exception details when failing to load link | Return exception details when failing to load link
| Python | mit | edgauthier/pinboard_linkrot | #!/usr/bin/env python
from __future__ import division
import requests
import json
import sys
from requests.exceptions import SSLError, InvalidSchema, ConnectionError
def get_link_status_code(link):
headers = {'User-agent':'Mozilla/5.0'}
try:
r = requests.head(link, headers=headers, allow_redirects=Tru... | #!/usr/bin/env python
from __future__ import division
import requests
import json
import sys
from requests.exceptions import SSLError, InvalidSchema, ConnectionError
def get_link_status_code(link):
headers = {'User-agent':'Mozilla/5.0'}
try:
r = requests.head(link, headers=headers, allow_redirects=Tru... | <commit_before>#!/usr/bin/env python
from __future__ import division
import requests
import json
import sys
from requests.exceptions import SSLError, InvalidSchema, ConnectionError
def get_link_status_code(link):
headers = {'User-agent':'Mozilla/5.0'}
try:
r = requests.head(link, headers=headers, allo... | #!/usr/bin/env python
from __future__ import division
import requests
import json
import sys
from requests.exceptions import SSLError, InvalidSchema, ConnectionError
def get_link_status_code(link):
headers = {'User-agent':'Mozilla/5.0'}
try:
r = requests.head(link, headers=headers, allow_redirects=Tru... | #!/usr/bin/env python
from __future__ import division
import requests
import json
import sys
from requests.exceptions import SSLError, InvalidSchema, ConnectionError
def get_link_status_code(link):
headers = {'User-agent':'Mozilla/5.0'}
try:
r = requests.head(link, headers=headers, allow_redirects=Tru... | <commit_before>#!/usr/bin/env python
from __future__ import division
import requests
import json
import sys
from requests.exceptions import SSLError, InvalidSchema, ConnectionError
def get_link_status_code(link):
headers = {'User-agent':'Mozilla/5.0'}
try:
r = requests.head(link, headers=headers, allo... |
84396970c866ced0264c4a84b1300df23fede36a | bermann/spark_context_test.py | bermann/spark_context_test.py | import unittest
from bermann.spark_context import SparkContext
class TestSparkContext(unittest.TestCase):
def test_parallelize_with_list_input(self):
sc = SparkContext()
self.assertEqual([1, 2, 3], sc.parallelize([1, 2, 3]).collect())
def test_parallelize_with_generator_input(self):
... | import unittest
from bermann.spark_context import SparkContext
import bermann.rdd
class TestSparkContext(unittest.TestCase):
def test_parallelize_with_list_input(self):
sc = SparkContext()
self.assertEqual([1, 2, 3], sc.parallelize([1, 2, 3]).collect())
def test_parallelize_with_generator_i... | Add test case for SparkContext.emptyRDD() | Add test case for SparkContext.emptyRDD()
| Python | mit | oli-hall/bermann | import unittest
from bermann.spark_context import SparkContext
class TestSparkContext(unittest.TestCase):
def test_parallelize_with_list_input(self):
sc = SparkContext()
self.assertEqual([1, 2, 3], sc.parallelize([1, 2, 3]).collect())
def test_parallelize_with_generator_input(self):
... | import unittest
from bermann.spark_context import SparkContext
import bermann.rdd
class TestSparkContext(unittest.TestCase):
def test_parallelize_with_list_input(self):
sc = SparkContext()
self.assertEqual([1, 2, 3], sc.parallelize([1, 2, 3]).collect())
def test_parallelize_with_generator_i... | <commit_before>import unittest
from bermann.spark_context import SparkContext
class TestSparkContext(unittest.TestCase):
def test_parallelize_with_list_input(self):
sc = SparkContext()
self.assertEqual([1, 2, 3], sc.parallelize([1, 2, 3]).collect())
def test_parallelize_with_generator_inpu... | import unittest
from bermann.spark_context import SparkContext
import bermann.rdd
class TestSparkContext(unittest.TestCase):
def test_parallelize_with_list_input(self):
sc = SparkContext()
self.assertEqual([1, 2, 3], sc.parallelize([1, 2, 3]).collect())
def test_parallelize_with_generator_i... | import unittest
from bermann.spark_context import SparkContext
class TestSparkContext(unittest.TestCase):
def test_parallelize_with_list_input(self):
sc = SparkContext()
self.assertEqual([1, 2, 3], sc.parallelize([1, 2, 3]).collect())
def test_parallelize_with_generator_input(self):
... | <commit_before>import unittest
from bermann.spark_context import SparkContext
class TestSparkContext(unittest.TestCase):
def test_parallelize_with_list_input(self):
sc = SparkContext()
self.assertEqual([1, 2, 3], sc.parallelize([1, 2, 3]).collect())
def test_parallelize_with_generator_inpu... |
3452603d99d82c76e3119c2da77c2f4a63777611 | assisstant/keyboard/ui/components.py | assisstant/keyboard/ui/components.py | from PyQt5.QtWidgets import QOpenGLWidget
from PyQt5.QtCore import Qt
from PyQt5.QtGui import QPainter, QBrush
class FlashingBox(QOpenGLWidget):
def __init__(self, parent, freq, color):
super(FlashingBox, self).__init__(parent)
self.freq = freq
self.brushes = [QBrush(Qt.black), QBrush(color)]
self.i... | from PyQt5.QtWidgets import QOpenGLWidget
from PyQt5.QtCore import Qt
from PyQt5.QtGui import QPainter, QBrush
class FlashingBox(QOpenGLWidget):
def __init__(self, parent, freq=1, color=Qt.black):
super(FlashingBox, self).__init__(parent)
self.freq = freq
self.brushes = [QBrush(Qt.black), QBrush(color)]
... | Add setFreq/setColor methods for FlashingBox | Add setFreq/setColor methods for FlashingBox
| Python | apache-2.0 | brainbots/assistant | from PyQt5.QtWidgets import QOpenGLWidget
from PyQt5.QtCore import Qt
from PyQt5.QtGui import QPainter, QBrush
class FlashingBox(QOpenGLWidget):
def __init__(self, parent, freq, color):
super(FlashingBox, self).__init__(parent)
self.freq = freq
self.brushes = [QBrush(Qt.black), QBrush(color)]
self.i... | from PyQt5.QtWidgets import QOpenGLWidget
from PyQt5.QtCore import Qt
from PyQt5.QtGui import QPainter, QBrush
class FlashingBox(QOpenGLWidget):
def __init__(self, parent, freq=1, color=Qt.black):
super(FlashingBox, self).__init__(parent)
self.freq = freq
self.brushes = [QBrush(Qt.black), QBrush(color)]
... | <commit_before>from PyQt5.QtWidgets import QOpenGLWidget
from PyQt5.QtCore import Qt
from PyQt5.QtGui import QPainter, QBrush
class FlashingBox(QOpenGLWidget):
def __init__(self, parent, freq, color):
super(FlashingBox, self).__init__(parent)
self.freq = freq
self.brushes = [QBrush(Qt.black), QBrush(col... | from PyQt5.QtWidgets import QOpenGLWidget
from PyQt5.QtCore import Qt
from PyQt5.QtGui import QPainter, QBrush
class FlashingBox(QOpenGLWidget):
def __init__(self, parent, freq=1, color=Qt.black):
super(FlashingBox, self).__init__(parent)
self.freq = freq
self.brushes = [QBrush(Qt.black), QBrush(color)]
... | from PyQt5.QtWidgets import QOpenGLWidget
from PyQt5.QtCore import Qt
from PyQt5.QtGui import QPainter, QBrush
class FlashingBox(QOpenGLWidget):
def __init__(self, parent, freq, color):
super(FlashingBox, self).__init__(parent)
self.freq = freq
self.brushes = [QBrush(Qt.black), QBrush(color)]
self.i... | <commit_before>from PyQt5.QtWidgets import QOpenGLWidget
from PyQt5.QtCore import Qt
from PyQt5.QtGui import QPainter, QBrush
class FlashingBox(QOpenGLWidget):
def __init__(self, parent, freq, color):
super(FlashingBox, self).__init__(parent)
self.freq = freq
self.brushes = [QBrush(Qt.black), QBrush(col... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.