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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
98ff82c3ad36ef6dbcc40005b6f88d9c0d569744 | setup.py | setup.py | #!/usr/bin/env python
import os
from setuptools import find_packages, setup
def read(filename):
with open(os.path.join(os.path.dirname(__file__), filename)) as f:
return f.read()
setup(
name="devsoc-contentfiles",
version="0.3a1",
description="DEV Content Files",
long_description=read("... | #!/usr/bin/env python
import os
from setuptools import find_packages, setup
def read(filename):
with open(os.path.join(os.path.dirname(__file__), filename)) as f:
return f.read()
setup(
name="devsoc-contentfiles",
version="0.3a1",
description="DEV Content Files",
long_description=read("... | Include package data specified in MANIFEST | Include package data specified in MANIFEST
Not really needed, but adding it incase we do bundle other things in future
| Python | bsd-3-clause | blancltd/blanc-contentfiles | #!/usr/bin/env python
import os
from setuptools import find_packages, setup
def read(filename):
with open(os.path.join(os.path.dirname(__file__), filename)) as f:
return f.read()
setup(
name="devsoc-contentfiles",
version="0.3a1",
description="DEV Content Files",
long_description=read("... | #!/usr/bin/env python
import os
from setuptools import find_packages, setup
def read(filename):
with open(os.path.join(os.path.dirname(__file__), filename)) as f:
return f.read()
setup(
name="devsoc-contentfiles",
version="0.3a1",
description="DEV Content Files",
long_description=read("... | <commit_before>#!/usr/bin/env python
import os
from setuptools import find_packages, setup
def read(filename):
with open(os.path.join(os.path.dirname(__file__), filename)) as f:
return f.read()
setup(
name="devsoc-contentfiles",
version="0.3a1",
description="DEV Content Files",
long_des... | #!/usr/bin/env python
import os
from setuptools import find_packages, setup
def read(filename):
with open(os.path.join(os.path.dirname(__file__), filename)) as f:
return f.read()
setup(
name="devsoc-contentfiles",
version="0.3a1",
description="DEV Content Files",
long_description=read("... | #!/usr/bin/env python
import os
from setuptools import find_packages, setup
def read(filename):
with open(os.path.join(os.path.dirname(__file__), filename)) as f:
return f.read()
setup(
name="devsoc-contentfiles",
version="0.3a1",
description="DEV Content Files",
long_description=read("... | <commit_before>#!/usr/bin/env python
import os
from setuptools import find_packages, setup
def read(filename):
with open(os.path.join(os.path.dirname(__file__), filename)) as f:
return f.read()
setup(
name="devsoc-contentfiles",
version="0.3a1",
description="DEV Content Files",
long_des... |
23f5297ab47328a7f9c881530a00cc24461b5d98 | setup.py | setup.py | from setuptools import setup
from sys import version
if version < '2.6.0':
raise Exception("This module doesn't support any version less than 2.6")
import sys
sys.path.append("./test")
with open('README.rst', 'r') as f:
long_description = f.read()
classifiers = [
'Development Status :: 4 - Beta',
'I... | from setuptools import setup
from sys import version
if version < '2.6.0':
raise Exception("This module doesn't support any version less than 2.6")
import sys
sys.path.append("./test")
with open('README.rst', 'r') as f:
long_description = f.read()
classifiers = [
'Development Status :: 4 - Beta',
'I... | Change version 0.1.5 to 0.1.6 | Change version 0.1.5 to 0.1.6
| Python | bsd-3-clause | keitaoouchi/seleniumwrapper | from setuptools import setup
from sys import version
if version < '2.6.0':
raise Exception("This module doesn't support any version less than 2.6")
import sys
sys.path.append("./test")
with open('README.rst', 'r') as f:
long_description = f.read()
classifiers = [
'Development Status :: 4 - Beta',
'I... | from setuptools import setup
from sys import version
if version < '2.6.0':
raise Exception("This module doesn't support any version less than 2.6")
import sys
sys.path.append("./test")
with open('README.rst', 'r') as f:
long_description = f.read()
classifiers = [
'Development Status :: 4 - Beta',
'I... | <commit_before>from setuptools import setup
from sys import version
if version < '2.6.0':
raise Exception("This module doesn't support any version less than 2.6")
import sys
sys.path.append("./test")
with open('README.rst', 'r') as f:
long_description = f.read()
classifiers = [
'Development Status :: 4 ... | from setuptools import setup
from sys import version
if version < '2.6.0':
raise Exception("This module doesn't support any version less than 2.6")
import sys
sys.path.append("./test")
with open('README.rst', 'r') as f:
long_description = f.read()
classifiers = [
'Development Status :: 4 - Beta',
'I... | from setuptools import setup
from sys import version
if version < '2.6.0':
raise Exception("This module doesn't support any version less than 2.6")
import sys
sys.path.append("./test")
with open('README.rst', 'r') as f:
long_description = f.read()
classifiers = [
'Development Status :: 4 - Beta',
'I... | <commit_before>from setuptools import setup
from sys import version
if version < '2.6.0':
raise Exception("This module doesn't support any version less than 2.6")
import sys
sys.path.append("./test")
with open('README.rst', 'r') as f:
long_description = f.read()
classifiers = [
'Development Status :: 4 ... |
62857c10b729177c1d6b3f8fd0fa4b475bc9b98f | testlog_etl/transforms/jscov_to_es.py | testlog_etl/transforms/jscov_to_es.py | # encoding: utf-8
#
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this file,
# You can obtain one at http://mozilla.org/MPL/2.0/.
#
# Author: Trung Do (chin.bimbo@gmail.com)
#
from __future__ import division
from __future__ import ... | # encoding: utf-8
#
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this file,
# You can obtain one at http://mozilla.org/MPL/2.0/.
#
# Author: Trung Do (chin.bimbo@gmail.com)
#
from __future__ import division
from __future__ import ... | Add the test name and change testUrl to just url | Add the test name and change testUrl to just url
| Python | mpl-2.0 | klahnakoski/ActiveData-ETL,klahnakoski/TestLog-ETL,klahnakoski/ActiveData-ETL,klahnakoski/TestLog-ETL | # encoding: utf-8
#
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this file,
# You can obtain one at http://mozilla.org/MPL/2.0/.
#
# Author: Trung Do (chin.bimbo@gmail.com)
#
from __future__ import division
from __future__ import ... | # encoding: utf-8
#
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this file,
# You can obtain one at http://mozilla.org/MPL/2.0/.
#
# Author: Trung Do (chin.bimbo@gmail.com)
#
from __future__ import division
from __future__ import ... | <commit_before># encoding: utf-8
#
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this file,
# You can obtain one at http://mozilla.org/MPL/2.0/.
#
# Author: Trung Do (chin.bimbo@gmail.com)
#
from __future__ import division
from __f... | # encoding: utf-8
#
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this file,
# You can obtain one at http://mozilla.org/MPL/2.0/.
#
# Author: Trung Do (chin.bimbo@gmail.com)
#
from __future__ import division
from __future__ import ... | # encoding: utf-8
#
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this file,
# You can obtain one at http://mozilla.org/MPL/2.0/.
#
# Author: Trung Do (chin.bimbo@gmail.com)
#
from __future__ import division
from __future__ import ... | <commit_before># encoding: utf-8
#
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this file,
# You can obtain one at http://mozilla.org/MPL/2.0/.
#
# Author: Trung Do (chin.bimbo@gmail.com)
#
from __future__ import division
from __f... |
0286126ef0f7876c3ae58a081d48964e49b3a093 | setup.py | setup.py | #!/usr/bin/env python
from setuptools import setup, find_packages
import conveyor
install_requires = [
"APScheduler",
"PyYAML",
"redis",
"slumber",
"xmlrpc2",
]
setup(
name="conveyor",
version=conveyor.__version__,
description="Warehouse and PyPI Synchronization",
long_descripti... | #!/usr/bin/env python
from setuptools import setup, find_packages
import conveyor
install_requires = [
"APScheduler",
"forklift",
"PyYAML",
"redis",
"xmlrpc2",
]
setup(
name="conveyor",
version=conveyor.__version__,
description="Warehouse and PyPI Synchronization",
long_descript... | Switch slumber out for forklift | Switch slumber out for forklift
| Python | bsd-2-clause | crateio/carrier | #!/usr/bin/env python
from setuptools import setup, find_packages
import conveyor
install_requires = [
"APScheduler",
"PyYAML",
"redis",
"slumber",
"xmlrpc2",
]
setup(
name="conveyor",
version=conveyor.__version__,
description="Warehouse and PyPI Synchronization",
long_descripti... | #!/usr/bin/env python
from setuptools import setup, find_packages
import conveyor
install_requires = [
"APScheduler",
"forklift",
"PyYAML",
"redis",
"xmlrpc2",
]
setup(
name="conveyor",
version=conveyor.__version__,
description="Warehouse and PyPI Synchronization",
long_descript... | <commit_before>#!/usr/bin/env python
from setuptools import setup, find_packages
import conveyor
install_requires = [
"APScheduler",
"PyYAML",
"redis",
"slumber",
"xmlrpc2",
]
setup(
name="conveyor",
version=conveyor.__version__,
description="Warehouse and PyPI Synchronization",
... | #!/usr/bin/env python
from setuptools import setup, find_packages
import conveyor
install_requires = [
"APScheduler",
"forklift",
"PyYAML",
"redis",
"xmlrpc2",
]
setup(
name="conveyor",
version=conveyor.__version__,
description="Warehouse and PyPI Synchronization",
long_descript... | #!/usr/bin/env python
from setuptools import setup, find_packages
import conveyor
install_requires = [
"APScheduler",
"PyYAML",
"redis",
"slumber",
"xmlrpc2",
]
setup(
name="conveyor",
version=conveyor.__version__,
description="Warehouse and PyPI Synchronization",
long_descripti... | <commit_before>#!/usr/bin/env python
from setuptools import setup, find_packages
import conveyor
install_requires = [
"APScheduler",
"PyYAML",
"redis",
"slumber",
"xmlrpc2",
]
setup(
name="conveyor",
version=conveyor.__version__,
description="Warehouse and PyPI Synchronization",
... |
d7f4294f7a218bac15d6ef1b59465203b26f650b | setup.py | setup.py | #!/usr/bin/env python
import os
from setuptools import setup
def readreq(filename):
result = []
with open(filename) as f:
for req in f:
req = req.partition('#')[0].strip()
if not req:
continue
result.append(req)
return result
def readfile(fil... | #!/usr/bin/env python
import os
from setuptools import setup
def readreq(filename):
result = []
with open(filename) as f:
for req in f:
req = req.partition('#')[0].strip()
if not req:
continue
result.append(req)
return result
def readfile(fil... | Bump version number for release. | Bump version number for release.
| Python | apache-2.0 | klmitch/cli_tools | #!/usr/bin/env python
import os
from setuptools import setup
def readreq(filename):
result = []
with open(filename) as f:
for req in f:
req = req.partition('#')[0].strip()
if not req:
continue
result.append(req)
return result
def readfile(fil... | #!/usr/bin/env python
import os
from setuptools import setup
def readreq(filename):
result = []
with open(filename) as f:
for req in f:
req = req.partition('#')[0].strip()
if not req:
continue
result.append(req)
return result
def readfile(fil... | <commit_before>#!/usr/bin/env python
import os
from setuptools import setup
def readreq(filename):
result = []
with open(filename) as f:
for req in f:
req = req.partition('#')[0].strip()
if not req:
continue
result.append(req)
return result
d... | #!/usr/bin/env python
import os
from setuptools import setup
def readreq(filename):
result = []
with open(filename) as f:
for req in f:
req = req.partition('#')[0].strip()
if not req:
continue
result.append(req)
return result
def readfile(fil... | #!/usr/bin/env python
import os
from setuptools import setup
def readreq(filename):
result = []
with open(filename) as f:
for req in f:
req = req.partition('#')[0].strip()
if not req:
continue
result.append(req)
return result
def readfile(fil... | <commit_before>#!/usr/bin/env python
import os
from setuptools import setup
def readreq(filename):
result = []
with open(filename) as f:
for req in f:
req = req.partition('#')[0].strip()
if not req:
continue
result.append(req)
return result
d... |
7f4d233c48bcdcd327286f3c2ce4f3e2942e6c3c | data_test.py | data_test.py | import data
from client import authentication_request_url, GoogleAPIClient
c = GoogleAPIClient()
if c.access_token is None:
print 'Open the following URL in your Web browser and grant access'
print authentication_request_url
print
print 'Enter the authorization code here:'
code = raw_input('> ')... | import data
from client import authentication_request_url, GoogleAPIClient
c = GoogleAPIClient()
if c.access_token is None:
print 'Open the following URL in your Web browser and grant access'
print authentication_request_url
print
print 'Enter the authorization code here:'
code = raw_input('> ')... | Test getting playlist videos, too | Test getting playlist videos, too
| Python | mit | drkitty/metatube,drkitty/metatube | import data
from client import authentication_request_url, GoogleAPIClient
c = GoogleAPIClient()
if c.access_token is None:
print 'Open the following URL in your Web browser and grant access'
print authentication_request_url
print
print 'Enter the authorization code here:'
code = raw_input('> ')... | import data
from client import authentication_request_url, GoogleAPIClient
c = GoogleAPIClient()
if c.access_token is None:
print 'Open the following URL in your Web browser and grant access'
print authentication_request_url
print
print 'Enter the authorization code here:'
code = raw_input('> ')... | <commit_before>import data
from client import authentication_request_url, GoogleAPIClient
c = GoogleAPIClient()
if c.access_token is None:
print 'Open the following URL in your Web browser and grant access'
print authentication_request_url
print
print 'Enter the authorization code here:'
code = ... | import data
from client import authentication_request_url, GoogleAPIClient
c = GoogleAPIClient()
if c.access_token is None:
print 'Open the following URL in your Web browser and grant access'
print authentication_request_url
print
print 'Enter the authorization code here:'
code = raw_input('> ')... | import data
from client import authentication_request_url, GoogleAPIClient
c = GoogleAPIClient()
if c.access_token is None:
print 'Open the following URL in your Web browser and grant access'
print authentication_request_url
print
print 'Enter the authorization code here:'
code = raw_input('> ')... | <commit_before>import data
from client import authentication_request_url, GoogleAPIClient
c = GoogleAPIClient()
if c.access_token is None:
print 'Open the following URL in your Web browser and grant access'
print authentication_request_url
print
print 'Enter the authorization code here:'
code = ... |
450a1f64a21afce008392e321fff2d268bb9fc41 | setup.py | setup.py | from distutils.core import setup
from distutils.extension import Extension
from Cython.Distutils import build_ext
import numpy
ALGPATH = "clusterpy/core/toolboxes/cluster/componentsAlg/"
ALGPKG = "clusterpy.core.toolboxes.cluster.componentsAlg."
CLUSPATH = "clusterpy/core/toolboxes/cluster/"
CLUSPKG = "clusterpy.cor... | from distutils.core import setup
from distutils.extension import Extension
setup(
name='clusterPy',
version='0.9.9',
description='Library of spatially constrained clustering algorithms',
long_description="""
clusterPy is a Python library with algorithms for spatially constrained... | Remove cython Extension builder and build_ext from Setup | Remove cython Extension builder and build_ext from Setup
| Python | bsd-3-clause | clusterpy/clusterpy,clusterpy/clusterpy | from distutils.core import setup
from distutils.extension import Extension
from Cython.Distutils import build_ext
import numpy
ALGPATH = "clusterpy/core/toolboxes/cluster/componentsAlg/"
ALGPKG = "clusterpy.core.toolboxes.cluster.componentsAlg."
CLUSPATH = "clusterpy/core/toolboxes/cluster/"
CLUSPKG = "clusterpy.cor... | from distutils.core import setup
from distutils.extension import Extension
setup(
name='clusterPy',
version='0.9.9',
description='Library of spatially constrained clustering algorithms',
long_description="""
clusterPy is a Python library with algorithms for spatially constrained... | <commit_before>from distutils.core import setup
from distutils.extension import Extension
from Cython.Distutils import build_ext
import numpy
ALGPATH = "clusterpy/core/toolboxes/cluster/componentsAlg/"
ALGPKG = "clusterpy.core.toolboxes.cluster.componentsAlg."
CLUSPATH = "clusterpy/core/toolboxes/cluster/"
CLUSPKG =... | from distutils.core import setup
from distutils.extension import Extension
setup(
name='clusterPy',
version='0.9.9',
description='Library of spatially constrained clustering algorithms',
long_description="""
clusterPy is a Python library with algorithms for spatially constrained... | from distutils.core import setup
from distutils.extension import Extension
from Cython.Distutils import build_ext
import numpy
ALGPATH = "clusterpy/core/toolboxes/cluster/componentsAlg/"
ALGPKG = "clusterpy.core.toolboxes.cluster.componentsAlg."
CLUSPATH = "clusterpy/core/toolboxes/cluster/"
CLUSPKG = "clusterpy.cor... | <commit_before>from distutils.core import setup
from distutils.extension import Extension
from Cython.Distutils import build_ext
import numpy
ALGPATH = "clusterpy/core/toolboxes/cluster/componentsAlg/"
ALGPKG = "clusterpy.core.toolboxes.cluster.componentsAlg."
CLUSPATH = "clusterpy/core/toolboxes/cluster/"
CLUSPKG =... |
39b58dadab6b223e7832c9c48e66d026303b243d | setup.py | setup.py | """
pybitcoin
==============
"""
from setuptools import setup, find_packages
setup(
name='pybitcoin',
version='0.9.8',
url='https://github.com/blockstack/pybitcoin',
license='MIT',
author='Blockstack Developers',
author_email='hello@onename.com',
description="""Library for Bitcoin & other... | """
pybitcoin
==============
"""
from setuptools import setup, find_packages
setup(
name='pybitcoin',
version='0.9.8',
url='https://github.com/blockstack/pybitcoin',
license='MIT',
author='Blockstack Developers',
author_email='hello@onename.com',
description="""Library for Bitcoin & other... | Remove pybitcointools in favor of bitcoin | Remove pybitcointools in favor of bitcoin
| Python | mit | blockstack/pybitcoin | """
pybitcoin
==============
"""
from setuptools import setup, find_packages
setup(
name='pybitcoin',
version='0.9.8',
url='https://github.com/blockstack/pybitcoin',
license='MIT',
author='Blockstack Developers',
author_email='hello@onename.com',
description="""Library for Bitcoin & other... | """
pybitcoin
==============
"""
from setuptools import setup, find_packages
setup(
name='pybitcoin',
version='0.9.8',
url='https://github.com/blockstack/pybitcoin',
license='MIT',
author='Blockstack Developers',
author_email='hello@onename.com',
description="""Library for Bitcoin & other... | <commit_before>"""
pybitcoin
==============
"""
from setuptools import setup, find_packages
setup(
name='pybitcoin',
version='0.9.8',
url='https://github.com/blockstack/pybitcoin',
license='MIT',
author='Blockstack Developers',
author_email='hello@onename.com',
description="""Library for ... | """
pybitcoin
==============
"""
from setuptools import setup, find_packages
setup(
name='pybitcoin',
version='0.9.8',
url='https://github.com/blockstack/pybitcoin',
license='MIT',
author='Blockstack Developers',
author_email='hello@onename.com',
description="""Library for Bitcoin & other... | """
pybitcoin
==============
"""
from setuptools import setup, find_packages
setup(
name='pybitcoin',
version='0.9.8',
url='https://github.com/blockstack/pybitcoin',
license='MIT',
author='Blockstack Developers',
author_email='hello@onename.com',
description="""Library for Bitcoin & other... | <commit_before>"""
pybitcoin
==============
"""
from setuptools import setup, find_packages
setup(
name='pybitcoin',
version='0.9.8',
url='https://github.com/blockstack/pybitcoin',
license='MIT',
author='Blockstack Developers',
author_email='hello@onename.com',
description="""Library for ... |
494d2a2cfcfa5dc9058f087588fb1371021174d4 | src/python/twitter/mesos/location.py | src/python/twitter/mesos/location.py | import re
import socket
class Location(object):
"""Determine which cluster the code is running in, or CORP if we are not in prod."""
PROD_SUFFIXES = [
'.corpdc.twitter.com',
'.prod.twitter.com',
]
@staticmethod
def is_corp():
"""
Returns true if this job is in corp and requires an ssh tun... | import re
import socket
class Location(object):
"""Determine which cluster the code is running in, or CORP if we are not in prod."""
PROD_SUFFIXES = [
'.corpdc.twitter.com',
'.prod.twitter.com',
'.devel.twitter.com'
]
@staticmethod
def is_corp():
"""
Returns true if this job is in cor... | Add devel.twitter.com to PROD suffixes | Add devel.twitter.com to PROD suffixes
| Python | apache-2.0 | rosmo/aurora,rosmo/aurora,kidaa/aurora,crashlytics/aurora,wfarner/aurora,kidaa/aurora,mkhutornenko/incubator-aurora,apache/aurora,kidaa/aurora,medallia/aurora,mschenck/aurora,wfarner/aurora,mschenck/aurora,apache/aurora,protochron/aurora,shahankhatch/aurora,crashlytics/aurora,shahankhatch/aurora,mkhutornenko/incubator-... | import re
import socket
class Location(object):
"""Determine which cluster the code is running in, or CORP if we are not in prod."""
PROD_SUFFIXES = [
'.corpdc.twitter.com',
'.prod.twitter.com',
]
@staticmethod
def is_corp():
"""
Returns true if this job is in corp and requires an ssh tun... | import re
import socket
class Location(object):
"""Determine which cluster the code is running in, or CORP if we are not in prod."""
PROD_SUFFIXES = [
'.corpdc.twitter.com',
'.prod.twitter.com',
'.devel.twitter.com'
]
@staticmethod
def is_corp():
"""
Returns true if this job is in cor... | <commit_before>import re
import socket
class Location(object):
"""Determine which cluster the code is running in, or CORP if we are not in prod."""
PROD_SUFFIXES = [
'.corpdc.twitter.com',
'.prod.twitter.com',
]
@staticmethod
def is_corp():
"""
Returns true if this job is in corp and requ... | import re
import socket
class Location(object):
"""Determine which cluster the code is running in, or CORP if we are not in prod."""
PROD_SUFFIXES = [
'.corpdc.twitter.com',
'.prod.twitter.com',
'.devel.twitter.com'
]
@staticmethod
def is_corp():
"""
Returns true if this job is in cor... | import re
import socket
class Location(object):
"""Determine which cluster the code is running in, or CORP if we are not in prod."""
PROD_SUFFIXES = [
'.corpdc.twitter.com',
'.prod.twitter.com',
]
@staticmethod
def is_corp():
"""
Returns true if this job is in corp and requires an ssh tun... | <commit_before>import re
import socket
class Location(object):
"""Determine which cluster the code is running in, or CORP if we are not in prod."""
PROD_SUFFIXES = [
'.corpdc.twitter.com',
'.prod.twitter.com',
]
@staticmethod
def is_corp():
"""
Returns true if this job is in corp and requ... |
f82a9994bfe782a575136af506b92c72fd6ac60e | src/python/twitter/mesos/location.py | src/python/twitter/mesos/location.py | import re
import socket
class Location(object):
" Determine which cluster the code is running in, or CORP if we are not in prod. "
CORP = "corp"
@staticmethod
def get_location():
hostname = socket.gethostname()
prod_matcher = re.match('^(\w{3}).*.twitter\.com$', hostname)
if re.search('.+\.local... | import re
import socket
class Location(object):
"""Determine which cluster the code is running in, or CORP if we are not in prod."""
CORP = "corp"
@staticmethod
def get_location():
hostname = socket.gethostname()
prod_matcher = re.match('^(\w{3}\d+).*\.twitter\.com$', hostname)
prod_host = prod_m... | Update Location determination to current hostname standards. | Update Location determination to current hostname standards.
| Python | apache-2.0 | apache/aurora,shahankhatch/aurora,kidaa/aurora,protochron/aurora,thinker0/aurora,medallia/aurora,apache/aurora,medallia/aurora,mkhutornenko/incubator-aurora,rosmo/aurora,crashlytics/aurora,thinker0/aurora,protochron/aurora,thinker0/aurora,mschenck/aurora,medallia/aurora,wfarner/aurora,wfarner/aurora,kidaa/aurora,kidaa/... | import re
import socket
class Location(object):
" Determine which cluster the code is running in, or CORP if we are not in prod. "
CORP = "corp"
@staticmethod
def get_location():
hostname = socket.gethostname()
prod_matcher = re.match('^(\w{3}).*.twitter\.com$', hostname)
if re.search('.+\.local... | import re
import socket
class Location(object):
"""Determine which cluster the code is running in, or CORP if we are not in prod."""
CORP = "corp"
@staticmethod
def get_location():
hostname = socket.gethostname()
prod_matcher = re.match('^(\w{3}\d+).*\.twitter\.com$', hostname)
prod_host = prod_m... | <commit_before>import re
import socket
class Location(object):
" Determine which cluster the code is running in, or CORP if we are not in prod. "
CORP = "corp"
@staticmethod
def get_location():
hostname = socket.gethostname()
prod_matcher = re.match('^(\w{3}).*.twitter\.com$', hostname)
if re.se... | import re
import socket
class Location(object):
"""Determine which cluster the code is running in, or CORP if we are not in prod."""
CORP = "corp"
@staticmethod
def get_location():
hostname = socket.gethostname()
prod_matcher = re.match('^(\w{3}\d+).*\.twitter\.com$', hostname)
prod_host = prod_m... | import re
import socket
class Location(object):
" Determine which cluster the code is running in, or CORP if we are not in prod. "
CORP = "corp"
@staticmethod
def get_location():
hostname = socket.gethostname()
prod_matcher = re.match('^(\w{3}).*.twitter\.com$', hostname)
if re.search('.+\.local... | <commit_before>import re
import socket
class Location(object):
" Determine which cluster the code is running in, or CORP if we are not in prod. "
CORP = "corp"
@staticmethod
def get_location():
hostname = socket.gethostname()
prod_matcher = re.match('^(\w{3}).*.twitter\.com$', hostname)
if re.se... |
238c6b73115f6493246f25d45268e7a675980397 | build/build.py | build/build.py | #
# Copyright (c) 2004 Specifix, Inc.
# All rights reserved
#
import os
import shutil
import util
class Make:
def doBuild(self, dir):
os.system("cd %s; make" % dir)
class MakeInstall:
def doInstall(self, dir, root):
os.system("cd %s; make %s=%s install" % (dir, self.rootVar, root))
def __init__(self,... | #
# Copyright (c) 2004 Specifix, Inc.
# All rights reserved
#
import os
import shutil
import util
class ManualConfigure:
def doBuild(self, dir):
os.system("cd %s; ./configure %s" % (dir, self.extraflags))
def __init__(self, extraflags=""):
self.extraflags = extraflags
class Configure:
def doBu... | Add classes to run ./configure | Add classes to run ./configure
| Python | apache-2.0 | sassoftware/conary,sassoftware/conary,sassoftware/conary,sassoftware/conary,sassoftware/conary | #
# Copyright (c) 2004 Specifix, Inc.
# All rights reserved
#
import os
import shutil
import util
class Make:
def doBuild(self, dir):
os.system("cd %s; make" % dir)
class MakeInstall:
def doInstall(self, dir, root):
os.system("cd %s; make %s=%s install" % (dir, self.rootVar, root))
def __init__(self,... | #
# Copyright (c) 2004 Specifix, Inc.
# All rights reserved
#
import os
import shutil
import util
class ManualConfigure:
def doBuild(self, dir):
os.system("cd %s; ./configure %s" % (dir, self.extraflags))
def __init__(self, extraflags=""):
self.extraflags = extraflags
class Configure:
def doBu... | <commit_before>#
# Copyright (c) 2004 Specifix, Inc.
# All rights reserved
#
import os
import shutil
import util
class Make:
def doBuild(self, dir):
os.system("cd %s; make" % dir)
class MakeInstall:
def doInstall(self, dir, root):
os.system("cd %s; make %s=%s install" % (dir, self.rootVar, root))
def... | #
# Copyright (c) 2004 Specifix, Inc.
# All rights reserved
#
import os
import shutil
import util
class ManualConfigure:
def doBuild(self, dir):
os.system("cd %s; ./configure %s" % (dir, self.extraflags))
def __init__(self, extraflags=""):
self.extraflags = extraflags
class Configure:
def doBu... | #
# Copyright (c) 2004 Specifix, Inc.
# All rights reserved
#
import os
import shutil
import util
class Make:
def doBuild(self, dir):
os.system("cd %s; make" % dir)
class MakeInstall:
def doInstall(self, dir, root):
os.system("cd %s; make %s=%s install" % (dir, self.rootVar, root))
def __init__(self,... | <commit_before>#
# Copyright (c) 2004 Specifix, Inc.
# All rights reserved
#
import os
import shutil
import util
class Make:
def doBuild(self, dir):
os.system("cd %s; make" % dir)
class MakeInstall:
def doInstall(self, dir, root):
os.system("cd %s; make %s=%s install" % (dir, self.rootVar, root))
def... |
7bc1f87b24abdfbcbf68f5fc6b3266fc3e6799f0 | setup.py | setup.py | from setuptools import setup, find_packages
setup(
name='prometheus-kafka-consumer-group-exporter',
version='0.5.0.dev1',
description='Kafka consumer group Prometheus exporter',
url='https://github.com/Braedon/prometheus-kafka-consumer-group-exporter',
author='Braedon Vickers',
author_email='br... | from setuptools import setup, find_packages
setup(
name='prometheus-kafka-consumer-group-exporter',
version='0.5.0.dev1',
description='Kafka consumer group Prometheus exporter',
url='https://github.com/Braedon/prometheus-kafka-consumer-group-exporter',
author='Braedon Vickers',
author_email='br... | Upgrade Prometheus client to fix memory leak with Python 3.7 | Upgrade Prometheus client to fix memory leak with Python 3.7
https://github.com/prometheus/client_python/issues/340
| Python | mit | braedon/prometheus-kafka-consumer-group-exporter | from setuptools import setup, find_packages
setup(
name='prometheus-kafka-consumer-group-exporter',
version='0.5.0.dev1',
description='Kafka consumer group Prometheus exporter',
url='https://github.com/Braedon/prometheus-kafka-consumer-group-exporter',
author='Braedon Vickers',
author_email='br... | from setuptools import setup, find_packages
setup(
name='prometheus-kafka-consumer-group-exporter',
version='0.5.0.dev1',
description='Kafka consumer group Prometheus exporter',
url='https://github.com/Braedon/prometheus-kafka-consumer-group-exporter',
author='Braedon Vickers',
author_email='br... | <commit_before>from setuptools import setup, find_packages
setup(
name='prometheus-kafka-consumer-group-exporter',
version='0.5.0.dev1',
description='Kafka consumer group Prometheus exporter',
url='https://github.com/Braedon/prometheus-kafka-consumer-group-exporter',
author='Braedon Vickers',
a... | from setuptools import setup, find_packages
setup(
name='prometheus-kafka-consumer-group-exporter',
version='0.5.0.dev1',
description='Kafka consumer group Prometheus exporter',
url='https://github.com/Braedon/prometheus-kafka-consumer-group-exporter',
author='Braedon Vickers',
author_email='br... | from setuptools import setup, find_packages
setup(
name='prometheus-kafka-consumer-group-exporter',
version='0.5.0.dev1',
description='Kafka consumer group Prometheus exporter',
url='https://github.com/Braedon/prometheus-kafka-consumer-group-exporter',
author='Braedon Vickers',
author_email='br... | <commit_before>from setuptools import setup, find_packages
setup(
name='prometheus-kafka-consumer-group-exporter',
version='0.5.0.dev1',
description='Kafka consumer group Prometheus exporter',
url='https://github.com/Braedon/prometheus-kafka-consumer-group-exporter',
author='Braedon Vickers',
a... |
f730137926b5a59671347e35ced1b43804393ec3 | setup.py | setup.py | import os
from setuptools import setup
def read(fname):
with open(os.path.join(os.path.dirname(__file__), fname)) as f:
return f.read()
setup(name='timy',
version='0.4.1',
description='Minimalist measurement of python code time',
long_description=read('README.md'),
url='https://g... | import os
from setuptools import setup
def read(fname):
with open(os.path.join(os.path.dirname(__file__), fname)) as f:
return f.read()
setup(name='timy',
version='0.4.1',
description='Minimalist measurement of python code time',
long_description=read('README.md'),
long_descripti... | Add long description content type | Add long description content type
| Python | mit | ramonsaraiva/timy | import os
from setuptools import setup
def read(fname):
with open(os.path.join(os.path.dirname(__file__), fname)) as f:
return f.read()
setup(name='timy',
version='0.4.1',
description='Minimalist measurement of python code time',
long_description=read('README.md'),
url='https://g... | import os
from setuptools import setup
def read(fname):
with open(os.path.join(os.path.dirname(__file__), fname)) as f:
return f.read()
setup(name='timy',
version='0.4.1',
description='Minimalist measurement of python code time',
long_description=read('README.md'),
long_descripti... | <commit_before>import os
from setuptools import setup
def read(fname):
with open(os.path.join(os.path.dirname(__file__), fname)) as f:
return f.read()
setup(name='timy',
version='0.4.1',
description='Minimalist measurement of python code time',
long_description=read('README.md'),
... | import os
from setuptools import setup
def read(fname):
with open(os.path.join(os.path.dirname(__file__), fname)) as f:
return f.read()
setup(name='timy',
version='0.4.1',
description='Minimalist measurement of python code time',
long_description=read('README.md'),
long_descripti... | import os
from setuptools import setup
def read(fname):
with open(os.path.join(os.path.dirname(__file__), fname)) as f:
return f.read()
setup(name='timy',
version='0.4.1',
description='Minimalist measurement of python code time',
long_description=read('README.md'),
url='https://g... | <commit_before>import os
from setuptools import setup
def read(fname):
with open(os.path.join(os.path.dirname(__file__), fname)) as f:
return f.read()
setup(name='timy',
version='0.4.1',
description='Minimalist measurement of python code time',
long_description=read('README.md'),
... |
24764af1c7dc0a016b8e36c9a7659e9ac516e026 | setup.py | setup.py | #!/usr/bin/env python
from setuptools import setup
import setuptools
with open("README.md", 'r') as f:
long_description = f.read()
setup(
name='chess_py',
version='2.8.0',
description='Python chess client',
long_description=long_description,
platforms='MacOS X, Windows, Linux',
classifier... | #!/usr/bin/env python
from setuptools import setup
import setuptools
with open("README.md", 'r') as f:
long_description = f.read()
setup(
name='chess_py',
version='2.8.1',
description='Python chess client',
long_description=long_description,
long_description_content_type='text/markdown',
... | Change README content type to markdown for pypi | Change README content type to markdown for pypi
| Python | mit | LordDarkula/chess_py | #!/usr/bin/env python
from setuptools import setup
import setuptools
with open("README.md", 'r') as f:
long_description = f.read()
setup(
name='chess_py',
version='2.8.0',
description='Python chess client',
long_description=long_description,
platforms='MacOS X, Windows, Linux',
classifier... | #!/usr/bin/env python
from setuptools import setup
import setuptools
with open("README.md", 'r') as f:
long_description = f.read()
setup(
name='chess_py',
version='2.8.1',
description='Python chess client',
long_description=long_description,
long_description_content_type='text/markdown',
... | <commit_before>#!/usr/bin/env python
from setuptools import setup
import setuptools
with open("README.md", 'r') as f:
long_description = f.read()
setup(
name='chess_py',
version='2.8.0',
description='Python chess client',
long_description=long_description,
platforms='MacOS X, Windows, Linux',... | #!/usr/bin/env python
from setuptools import setup
import setuptools
with open("README.md", 'r') as f:
long_description = f.read()
setup(
name='chess_py',
version='2.8.1',
description='Python chess client',
long_description=long_description,
long_description_content_type='text/markdown',
... | #!/usr/bin/env python
from setuptools import setup
import setuptools
with open("README.md", 'r') as f:
long_description = f.read()
setup(
name='chess_py',
version='2.8.0',
description='Python chess client',
long_description=long_description,
platforms='MacOS X, Windows, Linux',
classifier... | <commit_before>#!/usr/bin/env python
from setuptools import setup
import setuptools
with open("README.md", 'r') as f:
long_description = f.read()
setup(
name='chess_py',
version='2.8.0',
description='Python chess client',
long_description=long_description,
platforms='MacOS X, Windows, Linux',... |
bf0d12e6470d6fb8b453cf8b08910b4b88847134 | setup.py | setup.py | from setuptools import setup, find_packages
try:
# HACK: Avoid "TypeError: 'NoneType' object is not callable"
# Related to issue http://bugs.python.org/issue15881
# https://hg.python.org/cpython/rev/0a58fa8e9bac
import multiprocessing
except ImportError:
pass
setup(
name='di-py',
... | from setuptools import setup, find_packages
try:
# HACK: Avoid "TypeError: 'NoneType' object is not callable"
# Related to issue http://bugs.python.org/issue15881
# https://hg.python.org/cpython/rev/0a58fa8e9bac
import multiprocessing
except ImportError:
pass
setup(
name='di-py',
... | Revert "move temporally URL to juandebravo" | Revert "move temporally URL to juandebravo"
This reverts commit 9325f6884c5110cf57ab8becb26eb876c7deb59c.
| Python | apache-2.0 | telefonicaid/di-py | from setuptools import setup, find_packages
try:
# HACK: Avoid "TypeError: 'NoneType' object is not callable"
# Related to issue http://bugs.python.org/issue15881
# https://hg.python.org/cpython/rev/0a58fa8e9bac
import multiprocessing
except ImportError:
pass
setup(
name='di-py',
... | from setuptools import setup, find_packages
try:
# HACK: Avoid "TypeError: 'NoneType' object is not callable"
# Related to issue http://bugs.python.org/issue15881
# https://hg.python.org/cpython/rev/0a58fa8e9bac
import multiprocessing
except ImportError:
pass
setup(
name='di-py',
... | <commit_before>from setuptools import setup, find_packages
try:
# HACK: Avoid "TypeError: 'NoneType' object is not callable"
# Related to issue http://bugs.python.org/issue15881
# https://hg.python.org/cpython/rev/0a58fa8e9bac
import multiprocessing
except ImportError:
pass
setup(
na... | from setuptools import setup, find_packages
try:
# HACK: Avoid "TypeError: 'NoneType' object is not callable"
# Related to issue http://bugs.python.org/issue15881
# https://hg.python.org/cpython/rev/0a58fa8e9bac
import multiprocessing
except ImportError:
pass
setup(
name='di-py',
... | from setuptools import setup, find_packages
try:
# HACK: Avoid "TypeError: 'NoneType' object is not callable"
# Related to issue http://bugs.python.org/issue15881
# https://hg.python.org/cpython/rev/0a58fa8e9bac
import multiprocessing
except ImportError:
pass
setup(
name='di-py',
... | <commit_before>from setuptools import setup, find_packages
try:
# HACK: Avoid "TypeError: 'NoneType' object is not callable"
# Related to issue http://bugs.python.org/issue15881
# https://hg.python.org/cpython/rev/0a58fa8e9bac
import multiprocessing
except ImportError:
pass
setup(
na... |
719c6a851778107731ab3545242d52093eeb3b97 | setup.py | setup.py | #!/usr/bin/env python
from setuptools import setup, find_packages
setup(name='relengapi-mapper',
version='0.2.3',
description='hg to git mapper',
author='Chris AtLee',
author_email='chris@atlee.ca',
url='https://github.com/petemoore/mapper',
packages=find_packages(),
namespac... | #!/usr/bin/env python
from setuptools import setup, find_packages
setup(name='relengapi-mapper',
version='0.2.1',
description='hg to git mapper',
author='Chris AtLee',
author_email='chris@atlee.ca',
url='https://github.com/petemoore/mapper',
packages=find_packages(),
namespac... | Reset version number to 0.2.1 in preparation for making release 0.2.2 (release script bumps version number) | Reset version number to 0.2.1 in preparation for making release 0.2.2 (release script bumps version number)
| Python | mpl-2.0 | lundjordan/build-relengapi,garbas/mozilla-releng-services,lundjordan/services,hwine/build-relengapi,La0/mozilla-relengapi,djmitche/build-relengapi,mozilla/build-relengapi,mozilla/build-relengapi,mozilla-releng/services,lundjordan/services,La0/mozilla-relengapi,Callek/build-relengapi,Callek/build-relengapi,lundjordan/se... | #!/usr/bin/env python
from setuptools import setup, find_packages
setup(name='relengapi-mapper',
version='0.2.3',
description='hg to git mapper',
author='Chris AtLee',
author_email='chris@atlee.ca',
url='https://github.com/petemoore/mapper',
packages=find_packages(),
namespac... | #!/usr/bin/env python
from setuptools import setup, find_packages
setup(name='relengapi-mapper',
version='0.2.1',
description='hg to git mapper',
author='Chris AtLee',
author_email='chris@atlee.ca',
url='https://github.com/petemoore/mapper',
packages=find_packages(),
namespac... | <commit_before>#!/usr/bin/env python
from setuptools import setup, find_packages
setup(name='relengapi-mapper',
version='0.2.3',
description='hg to git mapper',
author='Chris AtLee',
author_email='chris@atlee.ca',
url='https://github.com/petemoore/mapper',
packages=find_packages(),... | #!/usr/bin/env python
from setuptools import setup, find_packages
setup(name='relengapi-mapper',
version='0.2.1',
description='hg to git mapper',
author='Chris AtLee',
author_email='chris@atlee.ca',
url='https://github.com/petemoore/mapper',
packages=find_packages(),
namespac... | #!/usr/bin/env python
from setuptools import setup, find_packages
setup(name='relengapi-mapper',
version='0.2.3',
description='hg to git mapper',
author='Chris AtLee',
author_email='chris@atlee.ca',
url='https://github.com/petemoore/mapper',
packages=find_packages(),
namespac... | <commit_before>#!/usr/bin/env python
from setuptools import setup, find_packages
setup(name='relengapi-mapper',
version='0.2.3',
description='hg to git mapper',
author='Chris AtLee',
author_email='chris@atlee.ca',
url='https://github.com/petemoore/mapper',
packages=find_packages(),... |
b363536d92a955150eef1b412c1e34cba66caeeb | setup.py | setup.py | #!/usr/bin/env python
from distutils.core import setup
setup(name='psycopg-nestedtransactions',
version='1.0',
description='Database transaction manager for psycopg2 database connections with seamless support for nested transactions.',
url='https://github.com/asqui/psycopg-nestedtransactions',
... | #!/usr/bin/env python
from distutils.core import setup
setup(name='psycopg-nestedtransactions',
version='1.0',
description='Database transaction manager for psycopg2 database connections with seamless support for nested transactions.',
url='https://github.com/asqui/psycopg-nestedtransactions',
... | Revert "Fix Python 2.7 build" and un-pin pg8000 version on Python 2 | Revert "Fix Python 2.7 build" and un-pin pg8000 version on Python 2
The underlying issue has been resolved in pg8000:
https://github.com/tlocke/pg8000/issues/7
This reverts commit f27e5a3f.
| Python | mit | asqui/psycopg-nestedtransactions | #!/usr/bin/env python
from distutils.core import setup
setup(name='psycopg-nestedtransactions',
version='1.0',
description='Database transaction manager for psycopg2 database connections with seamless support for nested transactions.',
url='https://github.com/asqui/psycopg-nestedtransactions',
... | #!/usr/bin/env python
from distutils.core import setup
setup(name='psycopg-nestedtransactions',
version='1.0',
description='Database transaction manager for psycopg2 database connections with seamless support for nested transactions.',
url='https://github.com/asqui/psycopg-nestedtransactions',
... | <commit_before>#!/usr/bin/env python
from distutils.core import setup
setup(name='psycopg-nestedtransactions',
version='1.0',
description='Database transaction manager for psycopg2 database connections with seamless support for nested transactions.',
url='https://github.com/asqui/psycopg-nestedtrans... | #!/usr/bin/env python
from distutils.core import setup
setup(name='psycopg-nestedtransactions',
version='1.0',
description='Database transaction manager for psycopg2 database connections with seamless support for nested transactions.',
url='https://github.com/asqui/psycopg-nestedtransactions',
... | #!/usr/bin/env python
from distutils.core import setup
setup(name='psycopg-nestedtransactions',
version='1.0',
description='Database transaction manager for psycopg2 database connections with seamless support for nested transactions.',
url='https://github.com/asqui/psycopg-nestedtransactions',
... | <commit_before>#!/usr/bin/env python
from distutils.core import setup
setup(name='psycopg-nestedtransactions',
version='1.0',
description='Database transaction manager for psycopg2 database connections with seamless support for nested transactions.',
url='https://github.com/asqui/psycopg-nestedtrans... |
fc4fa5d06ea0ca557d69112d1c8d0f10c8e594e0 | diet_gtfs.py | diet_gtfs.py | import csv
import sys
# agency.txt done
# feed_info.txt nothing to change
# calendar_dates.txt depends on service_id.
# routes.txt depends on agency.txt
# shapes.txt depends on trips.txt
# stops.txt depends on stop_times.txt
# stop_times.txt depends on trip_id.
# transfers.txt depends on stop_id from and to, routes.
... | import csv
import sys
# agency.txt done
# feed_info.txt nothing to change
# calendar_dates.txt depends on service_id.
# routes.txt depends on agency.txt
# shapes.txt depends on trips.txt
# stops.txt depends on stop_times.txt
# stop_times.txt depends on trip_id.
# transfers.txt depends on stop_id from and to, routes.
... | Create a complete filtered output agency.txt | Create a complete filtered output agency.txt
Filter based on arguments passed from shell.
| Python | bsd-2-clause | sensiblecodeio/diet-gtfs | import csv
import sys
# agency.txt done
# feed_info.txt nothing to change
# calendar_dates.txt depends on service_id.
# routes.txt depends on agency.txt
# shapes.txt depends on trips.txt
# stops.txt depends on stop_times.txt
# stop_times.txt depends on trip_id.
# transfers.txt depends on stop_id from and to, routes.
... | import csv
import sys
# agency.txt done
# feed_info.txt nothing to change
# calendar_dates.txt depends on service_id.
# routes.txt depends on agency.txt
# shapes.txt depends on trips.txt
# stops.txt depends on stop_times.txt
# stop_times.txt depends on trip_id.
# transfers.txt depends on stop_id from and to, routes.
... | <commit_before>import csv
import sys
# agency.txt done
# feed_info.txt nothing to change
# calendar_dates.txt depends on service_id.
# routes.txt depends on agency.txt
# shapes.txt depends on trips.txt
# stops.txt depends on stop_times.txt
# stop_times.txt depends on trip_id.
# transfers.txt depends on stop_id from a... | import csv
import sys
# agency.txt done
# feed_info.txt nothing to change
# calendar_dates.txt depends on service_id.
# routes.txt depends on agency.txt
# shapes.txt depends on trips.txt
# stops.txt depends on stop_times.txt
# stop_times.txt depends on trip_id.
# transfers.txt depends on stop_id from and to, routes.
... | import csv
import sys
# agency.txt done
# feed_info.txt nothing to change
# calendar_dates.txt depends on service_id.
# routes.txt depends on agency.txt
# shapes.txt depends on trips.txt
# stops.txt depends on stop_times.txt
# stop_times.txt depends on trip_id.
# transfers.txt depends on stop_id from and to, routes.
... | <commit_before>import csv
import sys
# agency.txt done
# feed_info.txt nothing to change
# calendar_dates.txt depends on service_id.
# routes.txt depends on agency.txt
# shapes.txt depends on trips.txt
# stops.txt depends on stop_times.txt
# stop_times.txt depends on trip_id.
# transfers.txt depends on stop_id from a... |
37f28dba866ffa3457a4f14a7d3e74e8e88a1dd0 | testing/get_value_test.py | testing/get_value_test.py | #!/usr/bin/env python
from __future__ import print_function
import sys
import numpy as np
from bmi import MyBMI
def print_var_values (bmi, var_name):
s = ', '.join ([str (x) for x in bmi.get_value (var_name)])
print ('%s' % s)
def run ():
bmi = MyBMI ()
bmi.initialize (None)
print ('%s' % bmi... | #!/usr/bin/env python
from __future__ import print_function
import sys
import numpy as np
from poisson import BmiPoisson
def main():
model = BmiPoisson()
model.initialize()
print('%s' % model.get_component_name ())
for i in xrange(10):
print('Time %d' % i)
np.savetxt(sys.stdout, ... | Update to use new bmi model. | Update to use new bmi model.
| Python | mit | mperignon/bmi-STM,mperignon/bmi-delta,mperignon/bmi-STM,mperignon/bmi-delta | #!/usr/bin/env python
from __future__ import print_function
import sys
import numpy as np
from bmi import MyBMI
def print_var_values (bmi, var_name):
s = ', '.join ([str (x) for x in bmi.get_value (var_name)])
print ('%s' % s)
def run ():
bmi = MyBMI ()
bmi.initialize (None)
print ('%s' % bmi... | #!/usr/bin/env python
from __future__ import print_function
import sys
import numpy as np
from poisson import BmiPoisson
def main():
model = BmiPoisson()
model.initialize()
print('%s' % model.get_component_name ())
for i in xrange(10):
print('Time %d' % i)
np.savetxt(sys.stdout, ... | <commit_before>#!/usr/bin/env python
from __future__ import print_function
import sys
import numpy as np
from bmi import MyBMI
def print_var_values (bmi, var_name):
s = ', '.join ([str (x) for x in bmi.get_value (var_name)])
print ('%s' % s)
def run ():
bmi = MyBMI ()
bmi.initialize (None)
pr... | #!/usr/bin/env python
from __future__ import print_function
import sys
import numpy as np
from poisson import BmiPoisson
def main():
model = BmiPoisson()
model.initialize()
print('%s' % model.get_component_name ())
for i in xrange(10):
print('Time %d' % i)
np.savetxt(sys.stdout, ... | #!/usr/bin/env python
from __future__ import print_function
import sys
import numpy as np
from bmi import MyBMI
def print_var_values (bmi, var_name):
s = ', '.join ([str (x) for x in bmi.get_value (var_name)])
print ('%s' % s)
def run ():
bmi = MyBMI ()
bmi.initialize (None)
print ('%s' % bmi... | <commit_before>#!/usr/bin/env python
from __future__ import print_function
import sys
import numpy as np
from bmi import MyBMI
def print_var_values (bmi, var_name):
s = ', '.join ([str (x) for x in bmi.get_value (var_name)])
print ('%s' % s)
def run ():
bmi = MyBMI ()
bmi.initialize (None)
pr... |
3fdc0db2608427ccb63b53b827e2a78aee40366a | tests/test_ui_elements.py | tests/test_ui_elements.py | import pytest
@pytest.fixture
def pyglui_ui_instance():
import glfw
from pyglui import cygl, ui
glfw.ERROR_REPORTING = "raise"
glfw_init_successful = glfw.init()
assert glfw_init_successful, "Failed to initialize GLFW"
glfw.window_hint(glfw.VISIBLE, glfw.FALSE)
try:
window = glfw... | import pytest
@pytest.fixture
def pyglui_ui_instance():
import glfw
from pyglui import cygl, ui
glfw.ERROR_REPORTING = "raise"
try:
glfw_init_successful = glfw.init()
assert glfw_init_successful, "Failed to initialize GLFW"
glfw.window_hint(glfw.VISIBLE, glfw.FALSE)
w... | Allow glfw.init() to fail on CI as well | Allow glfw.init() to fail on CI as well | Python | mit | pupil-labs/pyglui,pupil-labs/pyglui | import pytest
@pytest.fixture
def pyglui_ui_instance():
import glfw
from pyglui import cygl, ui
glfw.ERROR_REPORTING = "raise"
glfw_init_successful = glfw.init()
assert glfw_init_successful, "Failed to initialize GLFW"
glfw.window_hint(glfw.VISIBLE, glfw.FALSE)
try:
window = glfw... | import pytest
@pytest.fixture
def pyglui_ui_instance():
import glfw
from pyglui import cygl, ui
glfw.ERROR_REPORTING = "raise"
try:
glfw_init_successful = glfw.init()
assert glfw_init_successful, "Failed to initialize GLFW"
glfw.window_hint(glfw.VISIBLE, glfw.FALSE)
w... | <commit_before>import pytest
@pytest.fixture
def pyglui_ui_instance():
import glfw
from pyglui import cygl, ui
glfw.ERROR_REPORTING = "raise"
glfw_init_successful = glfw.init()
assert glfw_init_successful, "Failed to initialize GLFW"
glfw.window_hint(glfw.VISIBLE, glfw.FALSE)
try:
... | import pytest
@pytest.fixture
def pyglui_ui_instance():
import glfw
from pyglui import cygl, ui
glfw.ERROR_REPORTING = "raise"
try:
glfw_init_successful = glfw.init()
assert glfw_init_successful, "Failed to initialize GLFW"
glfw.window_hint(glfw.VISIBLE, glfw.FALSE)
w... | import pytest
@pytest.fixture
def pyglui_ui_instance():
import glfw
from pyglui import cygl, ui
glfw.ERROR_REPORTING = "raise"
glfw_init_successful = glfw.init()
assert glfw_init_successful, "Failed to initialize GLFW"
glfw.window_hint(glfw.VISIBLE, glfw.FALSE)
try:
window = glfw... | <commit_before>import pytest
@pytest.fixture
def pyglui_ui_instance():
import glfw
from pyglui import cygl, ui
glfw.ERROR_REPORTING = "raise"
glfw_init_successful = glfw.init()
assert glfw_init_successful, "Failed to initialize GLFW"
glfw.window_hint(glfw.VISIBLE, glfw.FALSE)
try:
... |
fcec71d285236dc3906611323ab74ecd89337081 | metakernel/magics/tests/test_edit_magic.py | metakernel/magics/tests/test_edit_magic.py |
from metakernel.tests.utils import (get_kernel, get_log_text,
clear_log_text, EvalKernel)
def test_edit_magic():
kernel = get_kernel(EvalKernel)
results = kernel.do_execute("%edit LICENSE.txt")
text = results["payload"][0]["text"]
assert '%%file LICENSE.txt\n\n# Co... |
from metakernel.tests.utils import (get_kernel, get_log_text,
clear_log_text, EvalKernel)
def test_edit_magic():
kernel = get_kernel(EvalKernel)
results = kernel.do_execute("%%edit %s" % __file__)
text = results["payload"][0]["text"]
assert text.startswith('%%file... | Fix test edit magic test | Fix test edit magic test
| Python | bsd-3-clause | Calysto/metakernel |
from metakernel.tests.utils import (get_kernel, get_log_text,
clear_log_text, EvalKernel)
def test_edit_magic():
kernel = get_kernel(EvalKernel)
results = kernel.do_execute("%edit LICENSE.txt")
text = results["payload"][0]["text"]
assert '%%file LICENSE.txt\n\n# Co... |
from metakernel.tests.utils import (get_kernel, get_log_text,
clear_log_text, EvalKernel)
def test_edit_magic():
kernel = get_kernel(EvalKernel)
results = kernel.do_execute("%%edit %s" % __file__)
text = results["payload"][0]["text"]
assert text.startswith('%%file... | <commit_before>
from metakernel.tests.utils import (get_kernel, get_log_text,
clear_log_text, EvalKernel)
def test_edit_magic():
kernel = get_kernel(EvalKernel)
results = kernel.do_execute("%edit LICENSE.txt")
text = results["payload"][0]["text"]
assert '%%file LICE... |
from metakernel.tests.utils import (get_kernel, get_log_text,
clear_log_text, EvalKernel)
def test_edit_magic():
kernel = get_kernel(EvalKernel)
results = kernel.do_execute("%%edit %s" % __file__)
text = results["payload"][0]["text"]
assert text.startswith('%%file... |
from metakernel.tests.utils import (get_kernel, get_log_text,
clear_log_text, EvalKernel)
def test_edit_magic():
kernel = get_kernel(EvalKernel)
results = kernel.do_execute("%edit LICENSE.txt")
text = results["payload"][0]["text"]
assert '%%file LICENSE.txt\n\n# Co... | <commit_before>
from metakernel.tests.utils import (get_kernel, get_log_text,
clear_log_text, EvalKernel)
def test_edit_magic():
kernel = get_kernel(EvalKernel)
results = kernel.do_execute("%edit LICENSE.txt")
text = results["payload"][0]["text"]
assert '%%file LICE... |
7a21d2bccbcff2eb6a8b7cfd00c38a28553c0bcd | gratipay/models/country.py | gratipay/models/country.py | from __future__ import absolute_import, division, print_function, unicode_literals
from postgres.orm import Model
class Country(Model):
"""Represent country records from our database (read-only).
:var int id: the record's primary key in our ``countries`` table
:var unicode code: the country's `ISO 3166-... | from __future__ import absolute_import, division, print_function, unicode_literals
from postgres.orm import Model
class Country(Model):
"""Represent country records from our database (read-only).
:var int id: the record's primary key in our ``countries`` table
:var unicode code: the country's `ISO 3166-... | Add a helper to Country; should go upstream prolly | Add a helper to Country; should go upstream prolly
| Python | mit | gratipay/gratipay.com,gratipay/gratipay.com,gratipay/gratipay.com,gratipay/gratipay.com | from __future__ import absolute_import, division, print_function, unicode_literals
from postgres.orm import Model
class Country(Model):
"""Represent country records from our database (read-only).
:var int id: the record's primary key in our ``countries`` table
:var unicode code: the country's `ISO 3166-... | from __future__ import absolute_import, division, print_function, unicode_literals
from postgres.orm import Model
class Country(Model):
"""Represent country records from our database (read-only).
:var int id: the record's primary key in our ``countries`` table
:var unicode code: the country's `ISO 3166-... | <commit_before>from __future__ import absolute_import, division, print_function, unicode_literals
from postgres.orm import Model
class Country(Model):
"""Represent country records from our database (read-only).
:var int id: the record's primary key in our ``countries`` table
:var unicode code: the count... | from __future__ import absolute_import, division, print_function, unicode_literals
from postgres.orm import Model
class Country(Model):
"""Represent country records from our database (read-only).
:var int id: the record's primary key in our ``countries`` table
:var unicode code: the country's `ISO 3166-... | from __future__ import absolute_import, division, print_function, unicode_literals
from postgres.orm import Model
class Country(Model):
"""Represent country records from our database (read-only).
:var int id: the record's primary key in our ``countries`` table
:var unicode code: the country's `ISO 3166-... | <commit_before>from __future__ import absolute_import, division, print_function, unicode_literals
from postgres.orm import Model
class Country(Model):
"""Represent country records from our database (read-only).
:var int id: the record's primary key in our ``countries`` table
:var unicode code: the count... |
90eafe038adfeddf5379e950b03ec0727d0c5d36 | ci/__init__.py | ci/__init__.py | from cisd import CISD
| from pyscf.ci import cisd
def CISD(mf, frozen=[], mo_coeff=None, mo_occ=None):
from pyscf import scf
if isinstance(mf, (scf.uhf.UHF, scf.rohf.ROHF)):
raise NotImplementedError('RO-CISD, UCISD are not available in this pyscf version')
return cisd.CISD(mf, frozen, mo_coeff, mo_occ)
| Improve error message for CISD | Improve error message for CISD
| Python | apache-2.0 | gkc1000/pyscf,sunqm/pyscf,sunqm/pyscf,sunqm/pyscf,gkc1000/pyscf,gkc1000/pyscf,gkc1000/pyscf,sunqm/pyscf,gkc1000/pyscf | from cisd import CISD
Improve error message for CISD | from pyscf.ci import cisd
def CISD(mf, frozen=[], mo_coeff=None, mo_occ=None):
from pyscf import scf
if isinstance(mf, (scf.uhf.UHF, scf.rohf.ROHF)):
raise NotImplementedError('RO-CISD, UCISD are not available in this pyscf version')
return cisd.CISD(mf, frozen, mo_coeff, mo_occ)
| <commit_before>from cisd import CISD
<commit_msg>Improve error message for CISD<commit_after> | from pyscf.ci import cisd
def CISD(mf, frozen=[], mo_coeff=None, mo_occ=None):
from pyscf import scf
if isinstance(mf, (scf.uhf.UHF, scf.rohf.ROHF)):
raise NotImplementedError('RO-CISD, UCISD are not available in this pyscf version')
return cisd.CISD(mf, frozen, mo_coeff, mo_occ)
| from cisd import CISD
Improve error message for CISDfrom pyscf.ci import cisd
def CISD(mf, frozen=[], mo_coeff=None, mo_occ=None):
from pyscf import scf
if isinstance(mf, (scf.uhf.UHF, scf.rohf.ROHF)):
raise NotImplementedError('RO-CISD, UCISD are not available in this pyscf version')
return cisd.C... | <commit_before>from cisd import CISD
<commit_msg>Improve error message for CISD<commit_after>from pyscf.ci import cisd
def CISD(mf, frozen=[], mo_coeff=None, mo_occ=None):
from pyscf import scf
if isinstance(mf, (scf.uhf.UHF, scf.rohf.ROHF)):
raise NotImplementedError('RO-CISD, UCISD are not available ... |
a19b043c910274277ce5a6a777f686030f6ef7d0 | media_manager/migrations/0001_initial.py | media_manager/migrations/0001_initial.py | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
class Migration(migrations.Migration):
dependencies = [
]
operations = [
migrations.CreateModel(
name='Course',
fields=[
('id', models.AutoField(verbo... | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
class Migration(migrations.Migration):
initial = True
dependencies = [
]
operations = [
migrations.CreateModel(
name='Course',
fields=[
('id', mod... | Mark initial migration so django knows to skip it. | Mark initial migration so django knows to skip it.
| Python | bsd-3-clause | Harvard-ATG/media_management_lti,Harvard-ATG/media_management_lti,Harvard-ATG/media_management_lti,Harvard-ATG/media_management_lti | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
class Migration(migrations.Migration):
dependencies = [
]
operations = [
migrations.CreateModel(
name='Course',
fields=[
('id', models.AutoField(verbo... | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
class Migration(migrations.Migration):
initial = True
dependencies = [
]
operations = [
migrations.CreateModel(
name='Course',
fields=[
('id', mod... | <commit_before># -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
class Migration(migrations.Migration):
dependencies = [
]
operations = [
migrations.CreateModel(
name='Course',
fields=[
('id', models.... | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
class Migration(migrations.Migration):
initial = True
dependencies = [
]
operations = [
migrations.CreateModel(
name='Course',
fields=[
('id', mod... | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
class Migration(migrations.Migration):
dependencies = [
]
operations = [
migrations.CreateModel(
name='Course',
fields=[
('id', models.AutoField(verbo... | <commit_before># -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
class Migration(migrations.Migration):
dependencies = [
]
operations = [
migrations.CreateModel(
name='Course',
fields=[
('id', models.... |
5e6f2828ec36a57a46f8220cc9263b643792573b | ereuse_devicehub/scripts/updates/snapshot_software.py | ereuse_devicehub/scripts/updates/snapshot_software.py | from pydash import find
from ereuse_devicehub.resources.device.domain import DeviceDomain
from ereuse_devicehub.resources.event.device import DeviceEventDomain
from ereuse_devicehub.scripts.updates.update import Update
class SnapshotSoftware(Update):
"""
Changes the values of SnapshotSoftware and adds it to ... | from pydash import find
from ereuse_devicehub.resources.device.domain import DeviceDomain
from ereuse_devicehub.resources.event.device import DeviceEventDomain
from ereuse_devicehub.scripts.updates.update import Update
class SnapshotSoftware(Update):
"""
Changes the values of SnapshotSoftware and adds it to ... | Fix getting snapshotsoftware on old snapshots | Fix getting snapshotsoftware on old snapshots
| Python | agpl-3.0 | eReuse/DeviceHub,eReuse/DeviceHub | from pydash import find
from ereuse_devicehub.resources.device.domain import DeviceDomain
from ereuse_devicehub.resources.event.device import DeviceEventDomain
from ereuse_devicehub.scripts.updates.update import Update
class SnapshotSoftware(Update):
"""
Changes the values of SnapshotSoftware and adds it to ... | from pydash import find
from ereuse_devicehub.resources.device.domain import DeviceDomain
from ereuse_devicehub.resources.event.device import DeviceEventDomain
from ereuse_devicehub.scripts.updates.update import Update
class SnapshotSoftware(Update):
"""
Changes the values of SnapshotSoftware and adds it to ... | <commit_before>from pydash import find
from ereuse_devicehub.resources.device.domain import DeviceDomain
from ereuse_devicehub.resources.event.device import DeviceEventDomain
from ereuse_devicehub.scripts.updates.update import Update
class SnapshotSoftware(Update):
"""
Changes the values of SnapshotSoftware ... | from pydash import find
from ereuse_devicehub.resources.device.domain import DeviceDomain
from ereuse_devicehub.resources.event.device import DeviceEventDomain
from ereuse_devicehub.scripts.updates.update import Update
class SnapshotSoftware(Update):
"""
Changes the values of SnapshotSoftware and adds it to ... | from pydash import find
from ereuse_devicehub.resources.device.domain import DeviceDomain
from ereuse_devicehub.resources.event.device import DeviceEventDomain
from ereuse_devicehub.scripts.updates.update import Update
class SnapshotSoftware(Update):
"""
Changes the values of SnapshotSoftware and adds it to ... | <commit_before>from pydash import find
from ereuse_devicehub.resources.device.domain import DeviceDomain
from ereuse_devicehub.resources.event.device import DeviceEventDomain
from ereuse_devicehub.scripts.updates.update import Update
class SnapshotSoftware(Update):
"""
Changes the values of SnapshotSoftware ... |
0612ea6aea5a10e5639a710500c321e3c9e02495 | interfaces/python/setup.py | interfaces/python/setup.py | #!/usr/bin/env python
"""
setup.py file for compiling Infomap module
"""
from distutils.core import setup, Extension
import fnmatch
import os
import re
cppSources = []
for root, dirnames, filenames in os.walk('.'):
if root == 'src': cppSources.append(os.path.join(root, 'Infomap.cpp'))
else:
for filen... | #!/usr/bin/env python
"""
setup.py file for compiling Infomap module
"""
from distutils.core import setup, Extension
from distutils.file_util import copy_file
import sysconfig
import fnmatch
import os
import re
cppSources = []
for root, dirnames, filenames in os.walk('.'):
if root == 'src': cppSources.append(os.... | Fix python library problem due to ABI tagged .so files | Fix python library problem due to ABI tagged .so files
| Python | agpl-3.0 | mapequation/infomap,mapequation/infomap,mapequation/infomap,mapequation/infomap | #!/usr/bin/env python
"""
setup.py file for compiling Infomap module
"""
from distutils.core import setup, Extension
import fnmatch
import os
import re
cppSources = []
for root, dirnames, filenames in os.walk('.'):
if root == 'src': cppSources.append(os.path.join(root, 'Infomap.cpp'))
else:
for filen... | #!/usr/bin/env python
"""
setup.py file for compiling Infomap module
"""
from distutils.core import setup, Extension
from distutils.file_util import copy_file
import sysconfig
import fnmatch
import os
import re
cppSources = []
for root, dirnames, filenames in os.walk('.'):
if root == 'src': cppSources.append(os.... | <commit_before>#!/usr/bin/env python
"""
setup.py file for compiling Infomap module
"""
from distutils.core import setup, Extension
import fnmatch
import os
import re
cppSources = []
for root, dirnames, filenames in os.walk('.'):
if root == 'src': cppSources.append(os.path.join(root, 'Infomap.cpp'))
else:
... | #!/usr/bin/env python
"""
setup.py file for compiling Infomap module
"""
from distutils.core import setup, Extension
from distutils.file_util import copy_file
import sysconfig
import fnmatch
import os
import re
cppSources = []
for root, dirnames, filenames in os.walk('.'):
if root == 'src': cppSources.append(os.... | #!/usr/bin/env python
"""
setup.py file for compiling Infomap module
"""
from distutils.core import setup, Extension
import fnmatch
import os
import re
cppSources = []
for root, dirnames, filenames in os.walk('.'):
if root == 'src': cppSources.append(os.path.join(root, 'Infomap.cpp'))
else:
for filen... | <commit_before>#!/usr/bin/env python
"""
setup.py file for compiling Infomap module
"""
from distutils.core import setup, Extension
import fnmatch
import os
import re
cppSources = []
for root, dirnames, filenames in os.walk('.'):
if root == 'src': cppSources.append(os.path.join(root, 'Infomap.cpp'))
else:
... |
c7030e461026e718c46b86dadecc9681d226c27c | cupy/util.py | cupy/util.py | import atexit
import functools
from cupy import cuda
_memoized_funcs = []
def memoize(for_each_device=False):
"""Makes a function memoizing the result for each argument and device.
This decorator provides automatic memoization of the function result.
Args:
for_each_device (bool): If True, it ... | import atexit
import functools
from cupy import cuda
_memos = []
def memoize(for_each_device=False):
"""Makes a function memoizing the result for each argument and device.
This decorator provides automatic memoization of the function result.
Args:
for_each_device (bool): If True, it memoizes ... | Fix unintended late finalization of memoized functions | Fix unintended late finalization of memoized functions
| Python | mit | ktnyt/chainer,niboshi/chainer,niboshi/chainer,laysakura/chainer,tscohen/chainer,benob/chainer,chainer/chainer,cupy/cupy,aonotas/chainer,cupy/cupy,jnishi/chainer,cupy/cupy,tkerola/chainer,cemoody/chainer,ktnyt/chainer,chainer/chainer,jnishi/chainer,jnishi/chainer,keisuke-umezawa/chainer,truongdq/chainer,kashif/chainer,w... | import atexit
import functools
from cupy import cuda
_memoized_funcs = []
def memoize(for_each_device=False):
"""Makes a function memoizing the result for each argument and device.
This decorator provides automatic memoization of the function result.
Args:
for_each_device (bool): If True, it ... | import atexit
import functools
from cupy import cuda
_memos = []
def memoize(for_each_device=False):
"""Makes a function memoizing the result for each argument and device.
This decorator provides automatic memoization of the function result.
Args:
for_each_device (bool): If True, it memoizes ... | <commit_before>import atexit
import functools
from cupy import cuda
_memoized_funcs = []
def memoize(for_each_device=False):
"""Makes a function memoizing the result for each argument and device.
This decorator provides automatic memoization of the function result.
Args:
for_each_device (bool... | import atexit
import functools
from cupy import cuda
_memos = []
def memoize(for_each_device=False):
"""Makes a function memoizing the result for each argument and device.
This decorator provides automatic memoization of the function result.
Args:
for_each_device (bool): If True, it memoizes ... | import atexit
import functools
from cupy import cuda
_memoized_funcs = []
def memoize(for_each_device=False):
"""Makes a function memoizing the result for each argument and device.
This decorator provides automatic memoization of the function result.
Args:
for_each_device (bool): If True, it ... | <commit_before>import atexit
import functools
from cupy import cuda
_memoized_funcs = []
def memoize(for_each_device=False):
"""Makes a function memoizing the result for each argument and device.
This decorator provides automatic memoization of the function result.
Args:
for_each_device (bool... |
4aec042f4a271725451825bf03d48beac000ec9c | core/urls.py | core/urls.py | from django.conf.urls import url
import core.views
urlpatterns = [
url(r'^u/(?P<slug>[\w-\.]+)/?$', core.views.run_fn, name="run_fn"),
]
| from django.conf.urls import url
import core.views
urlpatterns = [
url(r'^u/(?P<slug>[\w\-\+\.]+)/?$', core.views.run_fn, name="run_fn"),
]
| Add more patterns to be handled in the slug | Add more patterns to be handled in the slug
| Python | mit | theju/urlscript | from django.conf.urls import url
import core.views
urlpatterns = [
url(r'^u/(?P<slug>[\w-\.]+)/?$', core.views.run_fn, name="run_fn"),
]
Add more patterns to be handled in the slug | from django.conf.urls import url
import core.views
urlpatterns = [
url(r'^u/(?P<slug>[\w\-\+\.]+)/?$', core.views.run_fn, name="run_fn"),
]
| <commit_before>from django.conf.urls import url
import core.views
urlpatterns = [
url(r'^u/(?P<slug>[\w-\.]+)/?$', core.views.run_fn, name="run_fn"),
]
<commit_msg>Add more patterns to be handled in the slug<commit_after> | from django.conf.urls import url
import core.views
urlpatterns = [
url(r'^u/(?P<slug>[\w\-\+\.]+)/?$', core.views.run_fn, name="run_fn"),
]
| from django.conf.urls import url
import core.views
urlpatterns = [
url(r'^u/(?P<slug>[\w-\.]+)/?$', core.views.run_fn, name="run_fn"),
]
Add more patterns to be handled in the slugfrom django.conf.urls import url
import core.views
urlpatterns = [
url(r'^u/(?P<slug>[\w\-\+\.]+)/?$', core.views.run_fn, name="... | <commit_before>from django.conf.urls import url
import core.views
urlpatterns = [
url(r'^u/(?P<slug>[\w-\.]+)/?$', core.views.run_fn, name="run_fn"),
]
<commit_msg>Add more patterns to be handled in the slug<commit_after>from django.conf.urls import url
import core.views
urlpatterns = [
url(r'^u/(?P<slug>[\... |
b8a3fcac063436b4b6e402c9026c03f3e094c14a | docs/conf.py | docs/conf.py | # -*- coding: utf-8 -*-
from __future__ import absolute_import, unicode_literals
from sphinx_celery import conf
globals().update(conf.build_config(
'kombu', __file__,
project='Kombu',
version_dev='4.3',
version_stable='4.2',
canonical_url='https://kombu.readthedocs.io/',
webdomain='kombu.readt... | # -*- coding: utf-8 -*-
from __future__ import absolute_import, unicode_literals
from sphinx_celery import conf
globals().update(conf.build_config(
'kombu', __file__,
project='Kombu',
version_dev='4.4',
version_stable='4.3',
canonical_url='https://kombu.readthedocs.io/',
webdomain='kombu.readt... | Update version and copyright year. | Update version and copyright year.
| Python | bsd-3-clause | ZoranPavlovic/kombu,celery/kombu,ZoranPavlovic/kombu,urbn/kombu | # -*- coding: utf-8 -*-
from __future__ import absolute_import, unicode_literals
from sphinx_celery import conf
globals().update(conf.build_config(
'kombu', __file__,
project='Kombu',
version_dev='4.3',
version_stable='4.2',
canonical_url='https://kombu.readthedocs.io/',
webdomain='kombu.readt... | # -*- coding: utf-8 -*-
from __future__ import absolute_import, unicode_literals
from sphinx_celery import conf
globals().update(conf.build_config(
'kombu', __file__,
project='Kombu',
version_dev='4.4',
version_stable='4.3',
canonical_url='https://kombu.readthedocs.io/',
webdomain='kombu.readt... | <commit_before># -*- coding: utf-8 -*-
from __future__ import absolute_import, unicode_literals
from sphinx_celery import conf
globals().update(conf.build_config(
'kombu', __file__,
project='Kombu',
version_dev='4.3',
version_stable='4.2',
canonical_url='https://kombu.readthedocs.io/',
webdoma... | # -*- coding: utf-8 -*-
from __future__ import absolute_import, unicode_literals
from sphinx_celery import conf
globals().update(conf.build_config(
'kombu', __file__,
project='Kombu',
version_dev='4.4',
version_stable='4.3',
canonical_url='https://kombu.readthedocs.io/',
webdomain='kombu.readt... | # -*- coding: utf-8 -*-
from __future__ import absolute_import, unicode_literals
from sphinx_celery import conf
globals().update(conf.build_config(
'kombu', __file__,
project='Kombu',
version_dev='4.3',
version_stable='4.2',
canonical_url='https://kombu.readthedocs.io/',
webdomain='kombu.readt... | <commit_before># -*- coding: utf-8 -*-
from __future__ import absolute_import, unicode_literals
from sphinx_celery import conf
globals().update(conf.build_config(
'kombu', __file__,
project='Kombu',
version_dev='4.3',
version_stable='4.2',
canonical_url='https://kombu.readthedocs.io/',
webdoma... |
c4fc5e1f89d756cdd9a7fe19baa04aeae844a26c | sip/execution_control/master_controller/rest/tests/test.py | sip/execution_control/master_controller/rest/tests/test.py | # -*- coding: utf-8 -*-
"""Unit tests for the Master Controller REST variant.
- http://flask.pocoo.org/docs/0.12/testing/
"""
import unittest
import json
from app.app import APP
class MasterControllerTests(unittest.TestCase):
"""Tests of the Master Controller"""
def setUp(self):
"""Executed prior t... | # -*- coding: utf-8 -*-
"""Unit tests for the Master Controller REST variant.
- http://flask.pocoo.org/docs/0.12/testing/
"""
import unittest
import json
from app.app import APP
class MasterControllerTests(unittest.TestCase):
"""Tests of the Master Controller"""
def setUp(self):
"""Executed prior t... | Convert reply from bytes to string | Convert reply from bytes to string
The GET message reply is a byte string and it needs to be converted to
a string before being passed to the JSON parser.
| Python | bsd-3-clause | SKA-ScienceDataProcessor/integration-prototype,SKA-ScienceDataProcessor/integration-prototype,SKA-ScienceDataProcessor/integration-prototype,SKA-ScienceDataProcessor/integration-prototype | # -*- coding: utf-8 -*-
"""Unit tests for the Master Controller REST variant.
- http://flask.pocoo.org/docs/0.12/testing/
"""
import unittest
import json
from app.app import APP
class MasterControllerTests(unittest.TestCase):
"""Tests of the Master Controller"""
def setUp(self):
"""Executed prior t... | # -*- coding: utf-8 -*-
"""Unit tests for the Master Controller REST variant.
- http://flask.pocoo.org/docs/0.12/testing/
"""
import unittest
import json
from app.app import APP
class MasterControllerTests(unittest.TestCase):
"""Tests of the Master Controller"""
def setUp(self):
"""Executed prior t... | <commit_before># -*- coding: utf-8 -*-
"""Unit tests for the Master Controller REST variant.
- http://flask.pocoo.org/docs/0.12/testing/
"""
import unittest
import json
from app.app import APP
class MasterControllerTests(unittest.TestCase):
"""Tests of the Master Controller"""
def setUp(self):
"""E... | # -*- coding: utf-8 -*-
"""Unit tests for the Master Controller REST variant.
- http://flask.pocoo.org/docs/0.12/testing/
"""
import unittest
import json
from app.app import APP
class MasterControllerTests(unittest.TestCase):
"""Tests of the Master Controller"""
def setUp(self):
"""Executed prior t... | # -*- coding: utf-8 -*-
"""Unit tests for the Master Controller REST variant.
- http://flask.pocoo.org/docs/0.12/testing/
"""
import unittest
import json
from app.app import APP
class MasterControllerTests(unittest.TestCase):
"""Tests of the Master Controller"""
def setUp(self):
"""Executed prior t... | <commit_before># -*- coding: utf-8 -*-
"""Unit tests for the Master Controller REST variant.
- http://flask.pocoo.org/docs/0.12/testing/
"""
import unittest
import json
from app.app import APP
class MasterControllerTests(unittest.TestCase):
"""Tests of the Master Controller"""
def setUp(self):
"""E... |
fb8a70c16bb836405f2f811a203955db28f01d04 | tests/matchers/test_contain.py | tests/matchers/test_contain.py | import unittest
from robber import expect
from robber.matchers.contain import Contain
class TestAbove(unittest.TestCase):
def test_matches(self):
expect(Contain({'key': 'value'}, 'key').matches()) == True
expect(Contain([1, 2, 3], 2).matches()) == True
expect(Contain((1, 2, 3), 3).matches()... | import unittest
from robber import expect
from robber.matchers.contain import Contain
class TestAbove(unittest.TestCase):
def test_matches(self):
expect(Contain({'key': 'value'}, 'key').matches()) == True
expect(Contain([1, 2, 3], 2).matches()) == True
expect(Contain((1, 2, 3), 3).matches()... | Add number in string format For python 2.6 compatibility | Add number in string format
For python 2.6 compatibility | Python | mit | taoenator/robber.py,vesln/robber.py | import unittest
from robber import expect
from robber.matchers.contain import Contain
class TestAbove(unittest.TestCase):
def test_matches(self):
expect(Contain({'key': 'value'}, 'key').matches()) == True
expect(Contain([1, 2, 3], 2).matches()) == True
expect(Contain((1, 2, 3), 3).matches()... | import unittest
from robber import expect
from robber.matchers.contain import Contain
class TestAbove(unittest.TestCase):
def test_matches(self):
expect(Contain({'key': 'value'}, 'key').matches()) == True
expect(Contain([1, 2, 3], 2).matches()) == True
expect(Contain((1, 2, 3), 3).matches()... | <commit_before>import unittest
from robber import expect
from robber.matchers.contain import Contain
class TestAbove(unittest.TestCase):
def test_matches(self):
expect(Contain({'key': 'value'}, 'key').matches()) == True
expect(Contain([1, 2, 3], 2).matches()) == True
expect(Contain((1, 2, 3... | import unittest
from robber import expect
from robber.matchers.contain import Contain
class TestAbove(unittest.TestCase):
def test_matches(self):
expect(Contain({'key': 'value'}, 'key').matches()) == True
expect(Contain([1, 2, 3], 2).matches()) == True
expect(Contain((1, 2, 3), 3).matches()... | import unittest
from robber import expect
from robber.matchers.contain import Contain
class TestAbove(unittest.TestCase):
def test_matches(self):
expect(Contain({'key': 'value'}, 'key').matches()) == True
expect(Contain([1, 2, 3], 2).matches()) == True
expect(Contain((1, 2, 3), 3).matches()... | <commit_before>import unittest
from robber import expect
from robber.matchers.contain import Contain
class TestAbove(unittest.TestCase):
def test_matches(self):
expect(Contain({'key': 'value'}, 'key').matches()) == True
expect(Contain([1, 2, 3], 2).matches()) == True
expect(Contain((1, 2, 3... |
88e680302b6880c17111a678440156ac104507ed | aleph/authz.py | aleph/authz.py | from flask import request
from flask.ext.login import current_user
from werkzeug.exceptions import Forbidden
def request_collections(action):
try:
return request.collection_slugs.get(action)
except:
return []
def collection_read(name):
return name in request_collections('read')
def col... | from flask import request
from flask.ext.login import current_user
from werkzeug.exceptions import Forbidden
def request_collections(action):
try:
return request.collection_slugs.get(action) or []
except:
return []
def collection_read(name):
return name in request_collections('read')
d... | Return empty list for non-logged in users. | Return empty list for non-logged in users. | Python | mit | smmbllsm/aleph,gazeti/aleph,gazeti/aleph,nightsh/aleph,gazeti/aleph,Luthien123/aleph,gazeti/aleph,nightsh/aleph,OpenGazettes/aleph,mgax/aleph,smmbllsm/aleph,mgax/aleph,alephdata/aleph,alephdata/aleph,pudo/aleph,smmbllsm/aleph,alephdata/aleph,OpenGazettes/aleph,alephdata/aleph,OpenGazettes/aleph,Luthien123/aleph,pudo/al... | from flask import request
from flask.ext.login import current_user
from werkzeug.exceptions import Forbidden
def request_collections(action):
try:
return request.collection_slugs.get(action)
except:
return []
def collection_read(name):
return name in request_collections('read')
def col... | from flask import request
from flask.ext.login import current_user
from werkzeug.exceptions import Forbidden
def request_collections(action):
try:
return request.collection_slugs.get(action) or []
except:
return []
def collection_read(name):
return name in request_collections('read')
d... | <commit_before>from flask import request
from flask.ext.login import current_user
from werkzeug.exceptions import Forbidden
def request_collections(action):
try:
return request.collection_slugs.get(action)
except:
return []
def collection_read(name):
return name in request_collections('r... | from flask import request
from flask.ext.login import current_user
from werkzeug.exceptions import Forbidden
def request_collections(action):
try:
return request.collection_slugs.get(action) or []
except:
return []
def collection_read(name):
return name in request_collections('read')
d... | from flask import request
from flask.ext.login import current_user
from werkzeug.exceptions import Forbidden
def request_collections(action):
try:
return request.collection_slugs.get(action)
except:
return []
def collection_read(name):
return name in request_collections('read')
def col... | <commit_before>from flask import request
from flask.ext.login import current_user
from werkzeug.exceptions import Forbidden
def request_collections(action):
try:
return request.collection_slugs.get(action)
except:
return []
def collection_read(name):
return name in request_collections('r... |
447a9c82e229eb801df028d2531764d89b28c923 | genderbot.py | genderbot.py | import random
import re
from twitterbot import TwitterBot
import wikipedia
class Genderbot(TwitterBot):
boring_article_regex = (r"municipality|village|town|football|genus|family|"
"administrative|district|community|region|hamlet|"
"school|actor|mountain|basketba... | import re
from twitterbot import TwitterBot
import wikipedia
class Genderbot(TwitterBot):
boring_article_regex = (r"municipality|village|town|football|genus|family|"
"administrative|district|community|region|hamlet|"
"school|actor|mountain|basketball|city|specie... | Remove import random now that it's not being used | Remove import random now that it's not being used
| Python | mit | DanielleSucher/genderbot | import random
import re
from twitterbot import TwitterBot
import wikipedia
class Genderbot(TwitterBot):
boring_article_regex = (r"municipality|village|town|football|genus|family|"
"administrative|district|community|region|hamlet|"
"school|actor|mountain|basketba... | import re
from twitterbot import TwitterBot
import wikipedia
class Genderbot(TwitterBot):
boring_article_regex = (r"municipality|village|town|football|genus|family|"
"administrative|district|community|region|hamlet|"
"school|actor|mountain|basketball|city|specie... | <commit_before>import random
import re
from twitterbot import TwitterBot
import wikipedia
class Genderbot(TwitterBot):
boring_article_regex = (r"municipality|village|town|football|genus|family|"
"administrative|district|community|region|hamlet|"
"school|actor|mo... | import re
from twitterbot import TwitterBot
import wikipedia
class Genderbot(TwitterBot):
boring_article_regex = (r"municipality|village|town|football|genus|family|"
"administrative|district|community|region|hamlet|"
"school|actor|mountain|basketball|city|specie... | import random
import re
from twitterbot import TwitterBot
import wikipedia
class Genderbot(TwitterBot):
boring_article_regex = (r"municipality|village|town|football|genus|family|"
"administrative|district|community|region|hamlet|"
"school|actor|mountain|basketba... | <commit_before>import random
import re
from twitterbot import TwitterBot
import wikipedia
class Genderbot(TwitterBot):
boring_article_regex = (r"municipality|village|town|football|genus|family|"
"administrative|district|community|region|hamlet|"
"school|actor|mo... |
02b1611f26f5d6e572e4c818eab8ae4d9bcbcf2f | test/mac/gyptest-rebuild.py | test/mac/gyptest-rebuild.py | #!/usr/bin/env python
# Copyright (c) 2012 Google Inc. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""
Verifies that app bundles are rebuilt correctly.
"""
import TestGyp
import os
import sys
if sys.platform == 'darwin':
test = TestGy... | #!/usr/bin/env python
# Copyright (c) 2012 Google Inc. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""
Verifies that app bundles are rebuilt correctly.
"""
import TestGyp
import os
import sys
if sys.platform == 'darwin':
test = TestGy... | Use test.touch() instead of os.utime() in a test. | Use test.touch() instead of os.utime() in a test.
No intended functionality change.
TBR=evan
Review URL: https://chromiumcodereview.appspot.com/9234034 | Python | bsd-3-clause | witwall/gyp,witwall/gyp,witwall/gyp,witwall/gyp,witwall/gyp | #!/usr/bin/env python
# Copyright (c) 2012 Google Inc. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""
Verifies that app bundles are rebuilt correctly.
"""
import TestGyp
import os
import sys
if sys.platform == 'darwin':
test = TestGy... | #!/usr/bin/env python
# Copyright (c) 2012 Google Inc. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""
Verifies that app bundles are rebuilt correctly.
"""
import TestGyp
import os
import sys
if sys.platform == 'darwin':
test = TestGy... | <commit_before>#!/usr/bin/env python
# Copyright (c) 2012 Google Inc. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""
Verifies that app bundles are rebuilt correctly.
"""
import TestGyp
import os
import sys
if sys.platform == 'darwin':
... | #!/usr/bin/env python
# Copyright (c) 2012 Google Inc. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""
Verifies that app bundles are rebuilt correctly.
"""
import TestGyp
import os
import sys
if sys.platform == 'darwin':
test = TestGy... | #!/usr/bin/env python
# Copyright (c) 2012 Google Inc. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""
Verifies that app bundles are rebuilt correctly.
"""
import TestGyp
import os
import sys
if sys.platform == 'darwin':
test = TestGy... | <commit_before>#!/usr/bin/env python
# Copyright (c) 2012 Google Inc. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""
Verifies that app bundles are rebuilt correctly.
"""
import TestGyp
import os
import sys
if sys.platform == 'darwin':
... |
3c8d3bfea2ef1c82a62ef1b7455c29c044c7cfa3 | ensure_zero_padding_in_numbering_of_files.py | ensure_zero_padding_in_numbering_of_files.py | import argparse
import os
import re
import sys
def main(cmdline):
parser = argparse.ArgumentParser(
description='Ensure zero padding in numbering of files.')
parser.add_argument('path', type=str,
help='path to the directory containing the files')
args = parser.parse_args()
path = args.... | #!/usr/bin/env python3
import argparse
import os
import re
import sys
def main():
parser = argparse.ArgumentParser(
description='Ensure zero padding in numbering of files.')
parser.add_argument(
'path',
type=str,
help='path to the directory containing the files')
args = p... | Convert to py3, fix style issues (flake8, pylint). | Convert to py3, fix style issues (flake8, pylint).
| Python | mit | dwinston/cli-utils | import argparse
import os
import re
import sys
def main(cmdline):
parser = argparse.ArgumentParser(
description='Ensure zero padding in numbering of files.')
parser.add_argument('path', type=str,
help='path to the directory containing the files')
args = parser.parse_args()
path = args.... | #!/usr/bin/env python3
import argparse
import os
import re
import sys
def main():
parser = argparse.ArgumentParser(
description='Ensure zero padding in numbering of files.')
parser.add_argument(
'path',
type=str,
help='path to the directory containing the files')
args = p... | <commit_before>import argparse
import os
import re
import sys
def main(cmdline):
parser = argparse.ArgumentParser(
description='Ensure zero padding in numbering of files.')
parser.add_argument('path', type=str,
help='path to the directory containing the files')
args = parser.parse_args()
... | #!/usr/bin/env python3
import argparse
import os
import re
import sys
def main():
parser = argparse.ArgumentParser(
description='Ensure zero padding in numbering of files.')
parser.add_argument(
'path',
type=str,
help='path to the directory containing the files')
args = p... | import argparse
import os
import re
import sys
def main(cmdline):
parser = argparse.ArgumentParser(
description='Ensure zero padding in numbering of files.')
parser.add_argument('path', type=str,
help='path to the directory containing the files')
args = parser.parse_args()
path = args.... | <commit_before>import argparse
import os
import re
import sys
def main(cmdline):
parser = argparse.ArgumentParser(
description='Ensure zero padding in numbering of files.')
parser.add_argument('path', type=str,
help='path to the directory containing the files')
args = parser.parse_args()
... |
a3d528d58ca3f5df291400a808950661820feb05 | RPi/GPIO/definitions/functions/common.py | RPi/GPIO/definitions/functions/common.py | def cleanup(channel_or_chan_list):
pass
def gpio_function(pin):
pass
| def cleanup(channel_or_chan_list=None):
pass
def gpio_function(pin):
pass
| Make channel an optional parameter | Make channel an optional parameter
RPi.GPIO supports calling cleanup() without parameters to cleanup
all gpios used in the session. By adding "=None" warnings about
missing parameters are ignored.
| Python | mit | Def4l71diot/RPi.GPIO-def | def cleanup(channel_or_chan_list):
pass
def gpio_function(pin):
pass
Make channel an optional parameter
RPi.GPIO supports calling cleanup() without parameters to cleanup
all gpios used in the session. By adding "=None" warnings about
missing parameters are ignored. | def cleanup(channel_or_chan_list=None):
pass
def gpio_function(pin):
pass
| <commit_before>def cleanup(channel_or_chan_list):
pass
def gpio_function(pin):
pass
<commit_msg>Make channel an optional parameter
RPi.GPIO supports calling cleanup() without parameters to cleanup
all gpios used in the session. By adding "=None" warnings about
missing parameters are ignored.<commit_after> | def cleanup(channel_or_chan_list=None):
pass
def gpio_function(pin):
pass
| def cleanup(channel_or_chan_list):
pass
def gpio_function(pin):
pass
Make channel an optional parameter
RPi.GPIO supports calling cleanup() without parameters to cleanup
all gpios used in the session. By adding "=None" warnings about
missing parameters are ignored.def cleanup(channel_or_chan_list=None):
... | <commit_before>def cleanup(channel_or_chan_list):
pass
def gpio_function(pin):
pass
<commit_msg>Make channel an optional parameter
RPi.GPIO supports calling cleanup() without parameters to cleanup
all gpios used in the session. By adding "=None" warnings about
missing parameters are ignored.<commit_after>def... |
eadf481f352e4277001f3b9e83c7ffbbd58c789c | openstack/tests/functional/network/v2/test_service_provider.py | openstack/tests/functional/network/v2/test_service_provider.py | # Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under t... | # Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under t... | Fix the network service provider test | Fix the network service provider test
This test was pretty lame before since it just verified that
the result was a string. Now it verifies that at least one
service provider exists and I think I picked one that should
be aroudn for a while. The test failure message also prints
the list of providers now so it should... | Python | apache-2.0 | stackforge/python-openstacksdk,briancurtin/python-openstacksdk,dtroyer/python-openstacksdk,dtroyer/python-openstacksdk,stackforge/python-openstacksdk,openstack/python-openstacksdk,briancurtin/python-openstacksdk,openstack/python-openstacksdk | # Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under t... | # Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under t... | <commit_before># Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# dist... | # Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under t... | # Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under t... | <commit_before># Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# dist... |
644e4301d0a73756750a48226b9db00e51a9e46c | fmproject/urls.py | fmproject/urls.py | """ssoproject URL Configuration
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/1.9/topics/http/urls/
Examples:
Function views
1. Add an import: from my_app import views
2. Add a URL to urlpatterns: url(r'^$', views.home, name='home')
Class-... | """ssoproject URL Configuration
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/1.9/topics/http/urls/
Examples:
Function views
1. Add an import: from my_app import views
2. Add a URL to urlpatterns: url(r'^$', views.home, name='home')
Class-... | Add url mapping for github callback | Add url mapping for github callback
| Python | mit | favoritemedium/sso-prototype,favoritemedium/sso-prototype | """ssoproject URL Configuration
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/1.9/topics/http/urls/
Examples:
Function views
1. Add an import: from my_app import views
2. Add a URL to urlpatterns: url(r'^$', views.home, name='home')
Class-... | """ssoproject URL Configuration
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/1.9/topics/http/urls/
Examples:
Function views
1. Add an import: from my_app import views
2. Add a URL to urlpatterns: url(r'^$', views.home, name='home')
Class-... | <commit_before>"""ssoproject URL Configuration
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/1.9/topics/http/urls/
Examples:
Function views
1. Add an import: from my_app import views
2. Add a URL to urlpatterns: url(r'^$', views.home, name... | """ssoproject URL Configuration
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/1.9/topics/http/urls/
Examples:
Function views
1. Add an import: from my_app import views
2. Add a URL to urlpatterns: url(r'^$', views.home, name='home')
Class-... | """ssoproject URL Configuration
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/1.9/topics/http/urls/
Examples:
Function views
1. Add an import: from my_app import views
2. Add a URL to urlpatterns: url(r'^$', views.home, name='home')
Class-... | <commit_before>"""ssoproject URL Configuration
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/1.9/topics/http/urls/
Examples:
Function views
1. Add an import: from my_app import views
2. Add a URL to urlpatterns: url(r'^$', views.home, name... |
9275d654f7ce62cc3f9e7e6f9eea537bb295c608 | lily/contacts/urls.py | lily/contacts/urls.py | from django.conf.urls import patterns, url
from lily.contacts.views import (JsonContactListView, AddContactView, EditContactView, DetailContactView,
DeleteContactView, ListContactView, ExportContactView)
urlpatterns = patterns('',
url(r'^add/$', AddContactView.as_view(), n... | from django.conf.urls import patterns, url
from lily.contacts.views import (JsonContactListView, AddContactView, EditContactView, DetailContactView,
DeleteContactView, ListContactView, ExportContactView)
urlpatterns = patterns('',
url(r'^add/$', AddContactView.as_view(), n... | Fix not being able to delete contacts | Fix not being able to delete contacts
| Python | agpl-3.0 | HelloLily/hellolily,HelloLily/hellolily,HelloLily/hellolily,HelloLily/hellolily | from django.conf.urls import patterns, url
from lily.contacts.views import (JsonContactListView, AddContactView, EditContactView, DetailContactView,
DeleteContactView, ListContactView, ExportContactView)
urlpatterns = patterns('',
url(r'^add/$', AddContactView.as_view(), n... | from django.conf.urls import patterns, url
from lily.contacts.views import (JsonContactListView, AddContactView, EditContactView, DetailContactView,
DeleteContactView, ListContactView, ExportContactView)
urlpatterns = patterns('',
url(r'^add/$', AddContactView.as_view(), n... | <commit_before>from django.conf.urls import patterns, url
from lily.contacts.views import (JsonContactListView, AddContactView, EditContactView, DetailContactView,
DeleteContactView, ListContactView, ExportContactView)
urlpatterns = patterns('',
url(r'^add/$', AddContactVi... | from django.conf.urls import patterns, url
from lily.contacts.views import (JsonContactListView, AddContactView, EditContactView, DetailContactView,
DeleteContactView, ListContactView, ExportContactView)
urlpatterns = patterns('',
url(r'^add/$', AddContactView.as_view(), n... | from django.conf.urls import patterns, url
from lily.contacts.views import (JsonContactListView, AddContactView, EditContactView, DetailContactView,
DeleteContactView, ListContactView, ExportContactView)
urlpatterns = patterns('',
url(r'^add/$', AddContactView.as_view(), n... | <commit_before>from django.conf.urls import patterns, url
from lily.contacts.views import (JsonContactListView, AddContactView, EditContactView, DetailContactView,
DeleteContactView, ListContactView, ExportContactView)
urlpatterns = patterns('',
url(r'^add/$', AddContactVi... |
14762a73617007f0b65880e1d99cd5b47e03bfff | vimeo/auth/authorization_code.py | vimeo/auth/authorization_code.py | #! /usr/bin/env python
# encoding: utf-8
from __future__ import absolute_import
import urllib
from .base import AuthenticationMixinBase
from . import GrantFailed
class AuthorizationCodeMixin(AuthenticationMixinBase):
"""Implement helpers for the Authorization Code grant for OAuth2."""
def auth_url(self, sco... | #! /usr/bin/env python
# encoding: utf-8
from __future__ import absolute_import
import urllib
from .base import AuthenticationMixinBase
from . import GrantFailed
try:
basestring
except NameError:
basestring = str
class AuthorizationCodeMixin(AuthenticationMixinBase):
"""Implement helpers for the Authori... | Make basestring work in Python 3 | Make basestring work in Python 3
| Python | apache-2.0 | vimeo/vimeo.py,greedo/vimeo.py,blorenz/vimeo.py,gabrielgisoldo/vimeo.py | #! /usr/bin/env python
# encoding: utf-8
from __future__ import absolute_import
import urllib
from .base import AuthenticationMixinBase
from . import GrantFailed
class AuthorizationCodeMixin(AuthenticationMixinBase):
"""Implement helpers for the Authorization Code grant for OAuth2."""
def auth_url(self, sco... | #! /usr/bin/env python
# encoding: utf-8
from __future__ import absolute_import
import urllib
from .base import AuthenticationMixinBase
from . import GrantFailed
try:
basestring
except NameError:
basestring = str
class AuthorizationCodeMixin(AuthenticationMixinBase):
"""Implement helpers for the Authori... | <commit_before>#! /usr/bin/env python
# encoding: utf-8
from __future__ import absolute_import
import urllib
from .base import AuthenticationMixinBase
from . import GrantFailed
class AuthorizationCodeMixin(AuthenticationMixinBase):
"""Implement helpers for the Authorization Code grant for OAuth2."""
def aut... | #! /usr/bin/env python
# encoding: utf-8
from __future__ import absolute_import
import urllib
from .base import AuthenticationMixinBase
from . import GrantFailed
try:
basestring
except NameError:
basestring = str
class AuthorizationCodeMixin(AuthenticationMixinBase):
"""Implement helpers for the Authori... | #! /usr/bin/env python
# encoding: utf-8
from __future__ import absolute_import
import urllib
from .base import AuthenticationMixinBase
from . import GrantFailed
class AuthorizationCodeMixin(AuthenticationMixinBase):
"""Implement helpers for the Authorization Code grant for OAuth2."""
def auth_url(self, sco... | <commit_before>#! /usr/bin/env python
# encoding: utf-8
from __future__ import absolute_import
import urllib
from .base import AuthenticationMixinBase
from . import GrantFailed
class AuthorizationCodeMixin(AuthenticationMixinBase):
"""Implement helpers for the Authorization Code grant for OAuth2."""
def aut... |
fb5378d178f6c4104ac0464ebbf04ce84753c6e2 | conf_site/settings/dev.py | conf_site/settings/dev.py | # Top settings file for development
from .base import * # noqa: F403
from .secrets import * # noqa: F403
COMPRESS_ENABLED = False
DEBUG = True
TEMPLATE_DEBUG = DEBUG
SERVE_MEDIA = DEBUG
SITE_ID = 2
ALLOWED_HOSTS = ["localhost", "0.0.0.0"]
DATABASES = {
"default": DATABASES_DEFAULT, # noqa:... | # Top settings file for development
from .base import * # noqa: F403
from .secrets import * # noqa: F403
COMPRESS_ENABLED = False
DEBUG = True
TEMPLATE_DEBUG = DEBUG
SERVE_MEDIA = DEBUG
SITE_ID = 2
ALLOWED_HOSTS = ["localhost", "0.0.0.0"]
DATABASES = {
"default": DATABASES_DEFAULT, # noqa:... | Remove "versions" panel from django-debug-toolbar. | Remove "versions" panel from django-debug-toolbar.
The "Versions" panel of django-debug-toolbar is not compatible with
wagtailmenus (see
https://github.com/jazzband/django-debug-toolbar/issues/922 and
https://github.com/rkhleics/wagtailmenus/issues/115).
| Python | mit | pydata/conf_site,pydata/conf_site,pydata/conf_site | # Top settings file for development
from .base import * # noqa: F403
from .secrets import * # noqa: F403
COMPRESS_ENABLED = False
DEBUG = True
TEMPLATE_DEBUG = DEBUG
SERVE_MEDIA = DEBUG
SITE_ID = 2
ALLOWED_HOSTS = ["localhost", "0.0.0.0"]
DATABASES = {
"default": DATABASES_DEFAULT, # noqa:... | # Top settings file for development
from .base import * # noqa: F403
from .secrets import * # noqa: F403
COMPRESS_ENABLED = False
DEBUG = True
TEMPLATE_DEBUG = DEBUG
SERVE_MEDIA = DEBUG
SITE_ID = 2
ALLOWED_HOSTS = ["localhost", "0.0.0.0"]
DATABASES = {
"default": DATABASES_DEFAULT, # noqa:... | <commit_before># Top settings file for development
from .base import * # noqa: F403
from .secrets import * # noqa: F403
COMPRESS_ENABLED = False
DEBUG = True
TEMPLATE_DEBUG = DEBUG
SERVE_MEDIA = DEBUG
SITE_ID = 2
ALLOWED_HOSTS = ["localhost", "0.0.0.0"]
DATABASES = {
"default": DATABASES_DEFAULT, ... | # Top settings file for development
from .base import * # noqa: F403
from .secrets import * # noqa: F403
COMPRESS_ENABLED = False
DEBUG = True
TEMPLATE_DEBUG = DEBUG
SERVE_MEDIA = DEBUG
SITE_ID = 2
ALLOWED_HOSTS = ["localhost", "0.0.0.0"]
DATABASES = {
"default": DATABASES_DEFAULT, # noqa:... | # Top settings file for development
from .base import * # noqa: F403
from .secrets import * # noqa: F403
COMPRESS_ENABLED = False
DEBUG = True
TEMPLATE_DEBUG = DEBUG
SERVE_MEDIA = DEBUG
SITE_ID = 2
ALLOWED_HOSTS = ["localhost", "0.0.0.0"]
DATABASES = {
"default": DATABASES_DEFAULT, # noqa:... | <commit_before># Top settings file for development
from .base import * # noqa: F403
from .secrets import * # noqa: F403
COMPRESS_ENABLED = False
DEBUG = True
TEMPLATE_DEBUG = DEBUG
SERVE_MEDIA = DEBUG
SITE_ID = 2
ALLOWED_HOSTS = ["localhost", "0.0.0.0"]
DATABASES = {
"default": DATABASES_DEFAULT, ... |
bb1f2ded652c7ec58251112d42e61b8d1232887d | docs/conf.py | docs/conf.py | import sys
import os
import shlex
import subprocess
read_the_docs_build = os.environ.get('READTHEDOCS', None) == 'True'
if read_the_docs_build:
subprocess.call('doxygen', shell=True)
extensions = ['breathe']
breathe_projects = { 'Nanoshield_LoadCell': 'xml' }
breathe_default_project = "Nanoshield_LoadCell"
templ... | import sys
import os
import shlex
import subprocess
read_the_docs_build = os.environ.get('READTHEDOCS', None) == 'True'
if read_the_docs_build:
subprocess.call('doxygen', shell=True)
extensions = ['breathe']
breathe_projects = { 'Nanoshield_LoadCell': 'xml' }
breathe_default_project = "Nanoshield_LoadCell"
templ... | Fix library name in Latex. | Fix library name in Latex.
| Python | mit | circuitar/Nanoshield_LoadCell,circuitar/Nanoshield_LoadCell | import sys
import os
import shlex
import subprocess
read_the_docs_build = os.environ.get('READTHEDOCS', None) == 'True'
if read_the_docs_build:
subprocess.call('doxygen', shell=True)
extensions = ['breathe']
breathe_projects = { 'Nanoshield_LoadCell': 'xml' }
breathe_default_project = "Nanoshield_LoadCell"
templ... | import sys
import os
import shlex
import subprocess
read_the_docs_build = os.environ.get('READTHEDOCS', None) == 'True'
if read_the_docs_build:
subprocess.call('doxygen', shell=True)
extensions = ['breathe']
breathe_projects = { 'Nanoshield_LoadCell': 'xml' }
breathe_default_project = "Nanoshield_LoadCell"
templ... | <commit_before>import sys
import os
import shlex
import subprocess
read_the_docs_build = os.environ.get('READTHEDOCS', None) == 'True'
if read_the_docs_build:
subprocess.call('doxygen', shell=True)
extensions = ['breathe']
breathe_projects = { 'Nanoshield_LoadCell': 'xml' }
breathe_default_project = "Nanoshield_... | import sys
import os
import shlex
import subprocess
read_the_docs_build = os.environ.get('READTHEDOCS', None) == 'True'
if read_the_docs_build:
subprocess.call('doxygen', shell=True)
extensions = ['breathe']
breathe_projects = { 'Nanoshield_LoadCell': 'xml' }
breathe_default_project = "Nanoshield_LoadCell"
templ... | import sys
import os
import shlex
import subprocess
read_the_docs_build = os.environ.get('READTHEDOCS', None) == 'True'
if read_the_docs_build:
subprocess.call('doxygen', shell=True)
extensions = ['breathe']
breathe_projects = { 'Nanoshield_LoadCell': 'xml' }
breathe_default_project = "Nanoshield_LoadCell"
templ... | <commit_before>import sys
import os
import shlex
import subprocess
read_the_docs_build = os.environ.get('READTHEDOCS', None) == 'True'
if read_the_docs_build:
subprocess.call('doxygen', shell=True)
extensions = ['breathe']
breathe_projects = { 'Nanoshield_LoadCell': 'xml' }
breathe_default_project = "Nanoshield_... |
303d256bd6615bfef7d26a1b5dadf474dbbb26af | cortex/main.py | cortex/main.py | '''Main file for running experiments.
'''
import logging
from cortex._lib import (config, data, exp, optimizer, setup_cortex,
setup_experiment, train)
from cortex._lib.utils import print_section
import torch
__author__ = 'R Devon Hjelm'
__author_email__ = 'erroneus@gmail.com'
logger = l... | '''Main file for running experiments.
'''
import logging
from cortex._lib import (config, data, exp, optimizer, setup_cortex,
setup_experiment, train)
from cortex._lib.utils import print_section
import torch
__author__ = 'R Devon Hjelm'
__author_email__ = 'erroneus@gmail.com'
logger = l... | Terminate viz process at end of experiment. | Terminate viz process at end of experiment.
| Python | bsd-3-clause | rdevon/cortex,rdevon/cortex | '''Main file for running experiments.
'''
import logging
from cortex._lib import (config, data, exp, optimizer, setup_cortex,
setup_experiment, train)
from cortex._lib.utils import print_section
import torch
__author__ = 'R Devon Hjelm'
__author_email__ = 'erroneus@gmail.com'
logger = l... | '''Main file for running experiments.
'''
import logging
from cortex._lib import (config, data, exp, optimizer, setup_cortex,
setup_experiment, train)
from cortex._lib.utils import print_section
import torch
__author__ = 'R Devon Hjelm'
__author_email__ = 'erroneus@gmail.com'
logger = l... | <commit_before>'''Main file for running experiments.
'''
import logging
from cortex._lib import (config, data, exp, optimizer, setup_cortex,
setup_experiment, train)
from cortex._lib.utils import print_section
import torch
__author__ = 'R Devon Hjelm'
__author_email__ = 'erroneus@gmail.co... | '''Main file for running experiments.
'''
import logging
from cortex._lib import (config, data, exp, optimizer, setup_cortex,
setup_experiment, train)
from cortex._lib.utils import print_section
import torch
__author__ = 'R Devon Hjelm'
__author_email__ = 'erroneus@gmail.com'
logger = l... | '''Main file for running experiments.
'''
import logging
from cortex._lib import (config, data, exp, optimizer, setup_cortex,
setup_experiment, train)
from cortex._lib.utils import print_section
import torch
__author__ = 'R Devon Hjelm'
__author_email__ = 'erroneus@gmail.com'
logger = l... | <commit_before>'''Main file for running experiments.
'''
import logging
from cortex._lib import (config, data, exp, optimizer, setup_cortex,
setup_experiment, train)
from cortex._lib.utils import print_section
import torch
__author__ = 'R Devon Hjelm'
__author_email__ = 'erroneus@gmail.co... |
5b038b468af0f5a060eaea3bd2956ff85ad09071 | conman/redirects/views.py | conman/redirects/views.py | from django.views.generic import RedirectView
class RouteRedirectView(RedirectView):
"""Redirect to the target Route."""
permanent = False # Set to django 1.9's default to avoid RemovedInDjango19Warning
def get_redirect_url(self, *args, **kwargs):
"""
Return the route's target url.
... | from django.views.generic import RedirectView
class RouteRedirectView(RedirectView):
"""Redirect to the target Route."""
permanent = False # Set to django 1.9's default to avoid RemovedInDjango19Warning
def get_redirect_url(self, *args, route, **kwargs):
"""
Return the route's target url... | Use explicit kwarg over kwargs dictionary access | Use explicit kwarg over kwargs dictionary access
| Python | bsd-2-clause | meshy/django-conman,meshy/django-conman,Ian-Foote/django-conman | from django.views.generic import RedirectView
class RouteRedirectView(RedirectView):
"""Redirect to the target Route."""
permanent = False # Set to django 1.9's default to avoid RemovedInDjango19Warning
def get_redirect_url(self, *args, **kwargs):
"""
Return the route's target url.
... | from django.views.generic import RedirectView
class RouteRedirectView(RedirectView):
"""Redirect to the target Route."""
permanent = False # Set to django 1.9's default to avoid RemovedInDjango19Warning
def get_redirect_url(self, *args, route, **kwargs):
"""
Return the route's target url... | <commit_before>from django.views.generic import RedirectView
class RouteRedirectView(RedirectView):
"""Redirect to the target Route."""
permanent = False # Set to django 1.9's default to avoid RemovedInDjango19Warning
def get_redirect_url(self, *args, **kwargs):
"""
Return the route's ta... | from django.views.generic import RedirectView
class RouteRedirectView(RedirectView):
"""Redirect to the target Route."""
permanent = False # Set to django 1.9's default to avoid RemovedInDjango19Warning
def get_redirect_url(self, *args, route, **kwargs):
"""
Return the route's target url... | from django.views.generic import RedirectView
class RouteRedirectView(RedirectView):
"""Redirect to the target Route."""
permanent = False # Set to django 1.9's default to avoid RemovedInDjango19Warning
def get_redirect_url(self, *args, **kwargs):
"""
Return the route's target url.
... | <commit_before>from django.views.generic import RedirectView
class RouteRedirectView(RedirectView):
"""Redirect to the target Route."""
permanent = False # Set to django 1.9's default to avoid RemovedInDjango19Warning
def get_redirect_url(self, *args, **kwargs):
"""
Return the route's ta... |
780b84a2ed7aff91de8ab7b5505e496649d3ddfa | nlppln/wfgenerator.py | nlppln/wfgenerator.py | from scriptcwl import WorkflowGenerator as WFGenerator
from .utils import CWL_PATH
class WorkflowGenerator(WFGenerator):
def __init__(self, working_dir=None):
WFGenerator.__init__(self, steps_dir=CWL_PATH, working_dir=working_dir)
self.load(step_file='https://raw.githubusercontent.com/nlppln/'
... | from scriptcwl import WorkflowGenerator as WFGenerator
from .utils import CWL_PATH
class WorkflowGenerator(WFGenerator):
def __init__(self, working_dir=None):
WFGenerator.__init__(self, steps_dir=CWL_PATH, working_dir=working_dir)
self.load(step_file='https://raw.githubusercontent.com/nlppln/'
... | Make default saving option relative | Make default saving option relative
Saving workflows with wd=True only works when you use a working dir.
Since this is optional, it makes more sense to use relative paths
(and assume the user uses the nlppln CWL_PATH to save their workflows).
| Python | apache-2.0 | WhatWorksWhenForWhom/nlppln,WhatWorksWhenForWhom/nlppln,WhatWorksWhenForWhom/nlppln | from scriptcwl import WorkflowGenerator as WFGenerator
from .utils import CWL_PATH
class WorkflowGenerator(WFGenerator):
def __init__(self, working_dir=None):
WFGenerator.__init__(self, steps_dir=CWL_PATH, working_dir=working_dir)
self.load(step_file='https://raw.githubusercontent.com/nlppln/'
... | from scriptcwl import WorkflowGenerator as WFGenerator
from .utils import CWL_PATH
class WorkflowGenerator(WFGenerator):
def __init__(self, working_dir=None):
WFGenerator.__init__(self, steps_dir=CWL_PATH, working_dir=working_dir)
self.load(step_file='https://raw.githubusercontent.com/nlppln/'
... | <commit_before>from scriptcwl import WorkflowGenerator as WFGenerator
from .utils import CWL_PATH
class WorkflowGenerator(WFGenerator):
def __init__(self, working_dir=None):
WFGenerator.__init__(self, steps_dir=CWL_PATH, working_dir=working_dir)
self.load(step_file='https://raw.githubusercontent... | from scriptcwl import WorkflowGenerator as WFGenerator
from .utils import CWL_PATH
class WorkflowGenerator(WFGenerator):
def __init__(self, working_dir=None):
WFGenerator.__init__(self, steps_dir=CWL_PATH, working_dir=working_dir)
self.load(step_file='https://raw.githubusercontent.com/nlppln/'
... | from scriptcwl import WorkflowGenerator as WFGenerator
from .utils import CWL_PATH
class WorkflowGenerator(WFGenerator):
def __init__(self, working_dir=None):
WFGenerator.__init__(self, steps_dir=CWL_PATH, working_dir=working_dir)
self.load(step_file='https://raw.githubusercontent.com/nlppln/'
... | <commit_before>from scriptcwl import WorkflowGenerator as WFGenerator
from .utils import CWL_PATH
class WorkflowGenerator(WFGenerator):
def __init__(self, working_dir=None):
WFGenerator.__init__(self, steps_dir=CWL_PATH, working_dir=working_dir)
self.load(step_file='https://raw.githubusercontent... |
c6021a20cacea609398bd07adabfba3d7782b7ef | rovercode/drivers/grovepi_ultrasonic_ranger_binary.py | rovercode/drivers/grovepi_ultrasonic_ranger_binary.py | """
Class for communicating with the GrovePi ultrasonic ranger.
Here we treat it as a binary sensor.
"""
import logging
logging.basicConfig()
LOGGER = logging.getLogger(__name__)
LOGGER.setLevel(logging.getLevelName('INFO'))
try:
from grovepi import ultrasonicRead
except ImportError:
LOGGER.warning("GrovePi l... | """
Class for communicating with the GrovePi ultrasonic ranger.
Here we treat it as a binary sensor.
"""
import logging
logging.basicConfig()
LOGGER = logging.getLogger(__name__)
LOGGER.setLevel(logging.getLevelName('INFO'))
try:
from grovepi import ultrasonicRead
except ImportError:
LOGGER.warning("GrovePi l... | Fix sensor to be active high | Fix sensor to be active high
| Python | apache-2.0 | aninternetof/rover-code,aninternetof/rover-code,aninternetof/rover-code | """
Class for communicating with the GrovePi ultrasonic ranger.
Here we treat it as a binary sensor.
"""
import logging
logging.basicConfig()
LOGGER = logging.getLogger(__name__)
LOGGER.setLevel(logging.getLevelName('INFO'))
try:
from grovepi import ultrasonicRead
except ImportError:
LOGGER.warning("GrovePi l... | """
Class for communicating with the GrovePi ultrasonic ranger.
Here we treat it as a binary sensor.
"""
import logging
logging.basicConfig()
LOGGER = logging.getLogger(__name__)
LOGGER.setLevel(logging.getLevelName('INFO'))
try:
from grovepi import ultrasonicRead
except ImportError:
LOGGER.warning("GrovePi l... | <commit_before>"""
Class for communicating with the GrovePi ultrasonic ranger.
Here we treat it as a binary sensor.
"""
import logging
logging.basicConfig()
LOGGER = logging.getLogger(__name__)
LOGGER.setLevel(logging.getLevelName('INFO'))
try:
from grovepi import ultrasonicRead
except ImportError:
LOGGER.war... | """
Class for communicating with the GrovePi ultrasonic ranger.
Here we treat it as a binary sensor.
"""
import logging
logging.basicConfig()
LOGGER = logging.getLogger(__name__)
LOGGER.setLevel(logging.getLevelName('INFO'))
try:
from grovepi import ultrasonicRead
except ImportError:
LOGGER.warning("GrovePi l... | """
Class for communicating with the GrovePi ultrasonic ranger.
Here we treat it as a binary sensor.
"""
import logging
logging.basicConfig()
LOGGER = logging.getLogger(__name__)
LOGGER.setLevel(logging.getLevelName('INFO'))
try:
from grovepi import ultrasonicRead
except ImportError:
LOGGER.warning("GrovePi l... | <commit_before>"""
Class for communicating with the GrovePi ultrasonic ranger.
Here we treat it as a binary sensor.
"""
import logging
logging.basicConfig()
LOGGER = logging.getLogger(__name__)
LOGGER.setLevel(logging.getLevelName('INFO'))
try:
from grovepi import ultrasonicRead
except ImportError:
LOGGER.war... |
6e19ff22ea0e8c78e7faaa2ba58626de383dfee3 | djangae/contrib/mappers/urls.py | djangae/contrib/mappers/urls.py | from django.conf.urls import url
from djangae.utils import djangae_webapp
from django.views.decorators.csrf import csrf_exempt
try:
from mapreduce.main import create_handlers_map
wrapped_urls = [url(url_re.replace('.*/', '^', 1), csrf_exempt(djangae_webapp(func))) for url_re, func in create_handlers_map()]
ex... | from django.conf.urls import url
from djangae.utils import djangae_webapp
from django.views.decorators.csrf import csrf_exempt
# The Mapreduce status UI uses inline JS, which will fail If we have django-csp
# installed and are not allowing 'unsafe-inline' as a SCRIPT_SRC.
try:
from csp.decorators import csp_updat... | Allow the Mapreduce status UI to function when a CSP is enforced with django-csp. | Allow the Mapreduce status UI to function when a CSP is enforced with django-csp.
| Python | bsd-3-clause | potatolondon/djangae,grzes/djangae,grzes/djangae,kirberich/djangae,potatolondon/djangae,grzes/djangae,kirberich/djangae,kirberich/djangae | from django.conf.urls import url
from djangae.utils import djangae_webapp
from django.views.decorators.csrf import csrf_exempt
try:
from mapreduce.main import create_handlers_map
wrapped_urls = [url(url_re.replace('.*/', '^', 1), csrf_exempt(djangae_webapp(func))) for url_re, func in create_handlers_map()]
ex... | from django.conf.urls import url
from djangae.utils import djangae_webapp
from django.views.decorators.csrf import csrf_exempt
# The Mapreduce status UI uses inline JS, which will fail If we have django-csp
# installed and are not allowing 'unsafe-inline' as a SCRIPT_SRC.
try:
from csp.decorators import csp_updat... | <commit_before>from django.conf.urls import url
from djangae.utils import djangae_webapp
from django.views.decorators.csrf import csrf_exempt
try:
from mapreduce.main import create_handlers_map
wrapped_urls = [url(url_re.replace('.*/', '^', 1), csrf_exempt(djangae_webapp(func))) for url_re, func in create_han... | from django.conf.urls import url
from djangae.utils import djangae_webapp
from django.views.decorators.csrf import csrf_exempt
# The Mapreduce status UI uses inline JS, which will fail If we have django-csp
# installed and are not allowing 'unsafe-inline' as a SCRIPT_SRC.
try:
from csp.decorators import csp_updat... | from django.conf.urls import url
from djangae.utils import djangae_webapp
from django.views.decorators.csrf import csrf_exempt
try:
from mapreduce.main import create_handlers_map
wrapped_urls = [url(url_re.replace('.*/', '^', 1), csrf_exempt(djangae_webapp(func))) for url_re, func in create_handlers_map()]
ex... | <commit_before>from django.conf.urls import url
from djangae.utils import djangae_webapp
from django.views.decorators.csrf import csrf_exempt
try:
from mapreduce.main import create_handlers_map
wrapped_urls = [url(url_re.replace('.*/', '^', 1), csrf_exempt(djangae_webapp(func))) for url_re, func in create_han... |
92a5712bdb04ae265120a41d688b37b60507d9dd | opps/core/__init__.py | opps/core/__init__.py | # -*- coding: utf-8 -*-
from django.utils.translation import ugettext_lazy as _
from django.conf import settings
trans_app_label = _('Opps')
settings.INSTALLED_APPS += (
'opps.article',
'opps.image',
'opps.channel',
'opps.source',
'django.contrib.redirects',
'django_thumbor',
'googl',
... | # -*- coding: utf-8 -*-
from django.utils.translation import ugettext_lazy as _
from django.conf import settings
trans_app_label = _('Opps')
settings.INSTALLED_APPS += (
'opps.article',
'opps.image',
'opps.channel',
'opps.source',
'django.contrib.redirects',
'django_thumbor',
'googl',
... | Set class process site map | Set class process site map
| Python | mit | YACOWS/opps,jeanmask/opps,jeanmask/opps,opps/opps,jeanmask/opps,jeanmask/opps,williamroot/opps,williamroot/opps,williamroot/opps,YACOWS/opps,williamroot/opps,opps/opps,opps/opps,YACOWS/opps,opps/opps,YACOWS/opps | # -*- coding: utf-8 -*-
from django.utils.translation import ugettext_lazy as _
from django.conf import settings
trans_app_label = _('Opps')
settings.INSTALLED_APPS += (
'opps.article',
'opps.image',
'opps.channel',
'opps.source',
'django.contrib.redirects',
'django_thumbor',
'googl',
... | # -*- coding: utf-8 -*-
from django.utils.translation import ugettext_lazy as _
from django.conf import settings
trans_app_label = _('Opps')
settings.INSTALLED_APPS += (
'opps.article',
'opps.image',
'opps.channel',
'opps.source',
'django.contrib.redirects',
'django_thumbor',
'googl',
... | <commit_before># -*- coding: utf-8 -*-
from django.utils.translation import ugettext_lazy as _
from django.conf import settings
trans_app_label = _('Opps')
settings.INSTALLED_APPS += (
'opps.article',
'opps.image',
'opps.channel',
'opps.source',
'django.contrib.redirects',
'django_thumbor',
... | # -*- coding: utf-8 -*-
from django.utils.translation import ugettext_lazy as _
from django.conf import settings
trans_app_label = _('Opps')
settings.INSTALLED_APPS += (
'opps.article',
'opps.image',
'opps.channel',
'opps.source',
'django.contrib.redirects',
'django_thumbor',
'googl',
... | # -*- coding: utf-8 -*-
from django.utils.translation import ugettext_lazy as _
from django.conf import settings
trans_app_label = _('Opps')
settings.INSTALLED_APPS += (
'opps.article',
'opps.image',
'opps.channel',
'opps.source',
'django.contrib.redirects',
'django_thumbor',
'googl',
... | <commit_before># -*- coding: utf-8 -*-
from django.utils.translation import ugettext_lazy as _
from django.conf import settings
trans_app_label = _('Opps')
settings.INSTALLED_APPS += (
'opps.article',
'opps.image',
'opps.channel',
'opps.source',
'django.contrib.redirects',
'django_thumbor',
... |
f46226ed4b5a1c0bf2592692aba8481cc777414f | exp/views/dashboard.py | exp/views/dashboard.py |
from django.shortcuts import redirect
from django.urls import reverse_lazy
from django.views import generic
from exp.views.mixins import ExperimenterLoginRequiredMixin
class ExperimenterDashboardView(ExperimenterLoginRequiredMixin, generic.TemplateView):
'''
ExperimenterDashboard will show a customized view... |
from django.shortcuts import redirect
from django.urls import reverse_lazy
from django.views import generic
from exp.views.mixins import ExperimenterLoginRequiredMixin
class ExperimenterDashboardView(ExperimenterLoginRequiredMixin, generic.TemplateView):
'''
ExperimenterDashboard will show a customized view... | Check if user has is_researcher attribute before accessing it to accommodate AnonymousUser. | Check if user has is_researcher attribute before accessing it to accommodate AnonymousUser.
| Python | apache-2.0 | CenterForOpenScience/lookit-api,CenterForOpenScience/lookit-api,pattisdr/lookit-api,CenterForOpenScience/lookit-api,pattisdr/lookit-api,pattisdr/lookit-api |
from django.shortcuts import redirect
from django.urls import reverse_lazy
from django.views import generic
from exp.views.mixins import ExperimenterLoginRequiredMixin
class ExperimenterDashboardView(ExperimenterLoginRequiredMixin, generic.TemplateView):
'''
ExperimenterDashboard will show a customized view... |
from django.shortcuts import redirect
from django.urls import reverse_lazy
from django.views import generic
from exp.views.mixins import ExperimenterLoginRequiredMixin
class ExperimenterDashboardView(ExperimenterLoginRequiredMixin, generic.TemplateView):
'''
ExperimenterDashboard will show a customized view... | <commit_before>
from django.shortcuts import redirect
from django.urls import reverse_lazy
from django.views import generic
from exp.views.mixins import ExperimenterLoginRequiredMixin
class ExperimenterDashboardView(ExperimenterLoginRequiredMixin, generic.TemplateView):
'''
ExperimenterDashboard will show a ... |
from django.shortcuts import redirect
from django.urls import reverse_lazy
from django.views import generic
from exp.views.mixins import ExperimenterLoginRequiredMixin
class ExperimenterDashboardView(ExperimenterLoginRequiredMixin, generic.TemplateView):
'''
ExperimenterDashboard will show a customized view... |
from django.shortcuts import redirect
from django.urls import reverse_lazy
from django.views import generic
from exp.views.mixins import ExperimenterLoginRequiredMixin
class ExperimenterDashboardView(ExperimenterLoginRequiredMixin, generic.TemplateView):
'''
ExperimenterDashboard will show a customized view... | <commit_before>
from django.shortcuts import redirect
from django.urls import reverse_lazy
from django.views import generic
from exp.views.mixins import ExperimenterLoginRequiredMixin
class ExperimenterDashboardView(ExperimenterLoginRequiredMixin, generic.TemplateView):
'''
ExperimenterDashboard will show a ... |
2b3e165a5dbf34d8ed94eda1453b20099d88618f | BasicSequences/__init__.py | BasicSequences/__init__.py | from RabiAmp import RabiAmp
from Ramsey import Ramsey
from FlipFlop import FlipFlop
from SPAM import SPAM
from RB import SingleQubitRB, SingleQubitRB_AC, SingleQubitRBT | from RabiAmp import RabiAmp
from Ramsey import Ramsey
from FlipFlop import FlipFlop
from SPAM import SPAM
from RB import SingleQubitRB, SingleQubitRB_AC, SingleQubitRBT
from itertools import product
import operator
from ..PulsePrimitives import Id, X
def create_cal_seqs(qubits, numCals):
"""
Helper function to c... | Add a helper function to create calibration sequences. | Add a helper function to create calibration sequences.
| Python | apache-2.0 | BBN-Q/QGL,BBN-Q/QGL | from RabiAmp import RabiAmp
from Ramsey import Ramsey
from FlipFlop import FlipFlop
from SPAM import SPAM
from RB import SingleQubitRB, SingleQubitRB_AC, SingleQubitRBTAdd a helper function to create calibration sequences. | from RabiAmp import RabiAmp
from Ramsey import Ramsey
from FlipFlop import FlipFlop
from SPAM import SPAM
from RB import SingleQubitRB, SingleQubitRB_AC, SingleQubitRBT
from itertools import product
import operator
from ..PulsePrimitives import Id, X
def create_cal_seqs(qubits, numCals):
"""
Helper function to c... | <commit_before>from RabiAmp import RabiAmp
from Ramsey import Ramsey
from FlipFlop import FlipFlop
from SPAM import SPAM
from RB import SingleQubitRB, SingleQubitRB_AC, SingleQubitRBT<commit_msg>Add a helper function to create calibration sequences.<commit_after> | from RabiAmp import RabiAmp
from Ramsey import Ramsey
from FlipFlop import FlipFlop
from SPAM import SPAM
from RB import SingleQubitRB, SingleQubitRB_AC, SingleQubitRBT
from itertools import product
import operator
from ..PulsePrimitives import Id, X
def create_cal_seqs(qubits, numCals):
"""
Helper function to c... | from RabiAmp import RabiAmp
from Ramsey import Ramsey
from FlipFlop import FlipFlop
from SPAM import SPAM
from RB import SingleQubitRB, SingleQubitRB_AC, SingleQubitRBTAdd a helper function to create calibration sequences.from RabiAmp import RabiAmp
from Ramsey import Ramsey
from FlipFlop import FlipFlop
from SPAM impo... | <commit_before>from RabiAmp import RabiAmp
from Ramsey import Ramsey
from FlipFlop import FlipFlop
from SPAM import SPAM
from RB import SingleQubitRB, SingleQubitRB_AC, SingleQubitRBT<commit_msg>Add a helper function to create calibration sequences.<commit_after>from RabiAmp import RabiAmp
from Ramsey import Ramsey
fro... |
091f9daf8758e56c82dbe7a88a50489ab279f793 | adhocracy/lib/helpers/site_helper.py | adhocracy/lib/helpers/site_helper.py | from pylons import config, g
from pylons.i18n import _
def name():
return config.get('adhocracy.site.name', _("Adhocracy"))
def base_url(instance, path=None):
url = "%s://" % config.get('adhocracy.protocol', 'http').strip()
if instance is not None and g.single_instance is None:
url += instance.k... | from pylons import config, g
from pylons.i18n import _
def domain():
return config.get('adhocracy.domain').split(':')[0]
def name():
return config.get('adhocracy.site.name', _("Adhocracy"))
def base_url(instance, path=None):
url = "%s://" % config.get('adhocracy.protocol', 'http').strip()
if insta... | Add h.site.domain() to return the domian without the port | Add h.site.domain() to return the domian without the port
| Python | agpl-3.0 | DanielNeugebauer/adhocracy,liqd/adhocracy,alkadis/vcv,DanielNeugebauer/adhocracy,DanielNeugebauer/adhocracy,liqd/adhocracy,SysTheron/adhocracy,alkadis/vcv,phihag/adhocracy,alkadis/vcv,phihag/adhocracy,SysTheron/adhocracy,alkadis/vcv,DanielNeugebauer/adhocracy,liqd/adhocracy,liqd/adhocracy,alkadis/vcv,DanielNeugebauer/a... | from pylons import config, g
from pylons.i18n import _
def name():
return config.get('adhocracy.site.name', _("Adhocracy"))
def base_url(instance, path=None):
url = "%s://" % config.get('adhocracy.protocol', 'http').strip()
if instance is not None and g.single_instance is None:
url += instance.k... | from pylons import config, g
from pylons.i18n import _
def domain():
return config.get('adhocracy.domain').split(':')[0]
def name():
return config.get('adhocracy.site.name', _("Adhocracy"))
def base_url(instance, path=None):
url = "%s://" % config.get('adhocracy.protocol', 'http').strip()
if insta... | <commit_before>from pylons import config, g
from pylons.i18n import _
def name():
return config.get('adhocracy.site.name', _("Adhocracy"))
def base_url(instance, path=None):
url = "%s://" % config.get('adhocracy.protocol', 'http').strip()
if instance is not None and g.single_instance is None:
ur... | from pylons import config, g
from pylons.i18n import _
def domain():
return config.get('adhocracy.domain').split(':')[0]
def name():
return config.get('adhocracy.site.name', _("Adhocracy"))
def base_url(instance, path=None):
url = "%s://" % config.get('adhocracy.protocol', 'http').strip()
if insta... | from pylons import config, g
from pylons.i18n import _
def name():
return config.get('adhocracy.site.name', _("Adhocracy"))
def base_url(instance, path=None):
url = "%s://" % config.get('adhocracy.protocol', 'http').strip()
if instance is not None and g.single_instance is None:
url += instance.k... | <commit_before>from pylons import config, g
from pylons.i18n import _
def name():
return config.get('adhocracy.site.name', _("Adhocracy"))
def base_url(instance, path=None):
url = "%s://" % config.get('adhocracy.protocol', 'http').strip()
if instance is not None and g.single_instance is None:
ur... |
ede07cc5f2e410481b71bd7ba0cf1aa2fce26e08 | astroquery/simbad/tests/test_simbad.py | astroquery/simbad/tests/test_simbad.py | # Licensed under a 3-clause BSD style license - see LICENSE.rst
from ... import simbad
def test_simbad():
r = simbad.QueryAroundId('m31', radius='0.5s').execute()
print r.table
assert "M 31" in r.table["MAIN_ID"]
def test_multi():
result = simbad.QueryMulti(
[simbad.QueryId('m31'),
... | # Licensed under a 3-clause BSD style license - see LICENSE.rst
from ... import simbad
import sys
is_python3 = (sys.version_info >= (3,))
def test_simbad():
r = simbad.QueryAroundId('m31', radius='0.5s').execute()
print r.table
if is_python3:
m31 = b"M 31"
else:
m31 = "M 31"
asse... | Fix python3 tests for simbad. | Fix python3 tests for simbad.
| Python | bsd-3-clause | imbasimba/astroquery,ceb8/astroquery,ceb8/astroquery,imbasimba/astroquery | # Licensed under a 3-clause BSD style license - see LICENSE.rst
from ... import simbad
def test_simbad():
r = simbad.QueryAroundId('m31', radius='0.5s').execute()
print r.table
assert "M 31" in r.table["MAIN_ID"]
def test_multi():
result = simbad.QueryMulti(
[simbad.QueryId('m31'),
... | # Licensed under a 3-clause BSD style license - see LICENSE.rst
from ... import simbad
import sys
is_python3 = (sys.version_info >= (3,))
def test_simbad():
r = simbad.QueryAroundId('m31', radius='0.5s').execute()
print r.table
if is_python3:
m31 = b"M 31"
else:
m31 = "M 31"
asse... | <commit_before># Licensed under a 3-clause BSD style license - see LICENSE.rst
from ... import simbad
def test_simbad():
r = simbad.QueryAroundId('m31', radius='0.5s').execute()
print r.table
assert "M 31" in r.table["MAIN_ID"]
def test_multi():
result = simbad.QueryMulti(
[simbad.Query... | # Licensed under a 3-clause BSD style license - see LICENSE.rst
from ... import simbad
import sys
is_python3 = (sys.version_info >= (3,))
def test_simbad():
r = simbad.QueryAroundId('m31', radius='0.5s').execute()
print r.table
if is_python3:
m31 = b"M 31"
else:
m31 = "M 31"
asse... | # Licensed under a 3-clause BSD style license - see LICENSE.rst
from ... import simbad
def test_simbad():
r = simbad.QueryAroundId('m31', radius='0.5s').execute()
print r.table
assert "M 31" in r.table["MAIN_ID"]
def test_multi():
result = simbad.QueryMulti(
[simbad.QueryId('m31'),
... | <commit_before># Licensed under a 3-clause BSD style license - see LICENSE.rst
from ... import simbad
def test_simbad():
r = simbad.QueryAroundId('m31', radius='0.5s').execute()
print r.table
assert "M 31" in r.table["MAIN_ID"]
def test_multi():
result = simbad.QueryMulti(
[simbad.Query... |
034068e9d01f8087bf9061047fb3aa2550c31708 | cadnano/gui/views/sliceview/slicestyles.py | cadnano/gui/views/sliceview/slicestyles.py | from PyQt5.QtGui import QFont
from cadnano.gui.views.styles import BLUE_STROKE, GRAY_STROKE, THE_FONT
# Slice Sizing
SLICE_HELIX_RADIUS = 15.
SLICE_HELIX_STROKE_WIDTH = 0.5
SLICE_HELIX_MOD_HILIGHT_WIDTH = 1
EMPTY_HELIX_STROKE_WIDTH = 0.25
# Z values
# bottom
ZSLICEHELIX = 40
ZSELECTION = 50
ZDESELECTOR = 60
ZWEDGEGIZ... | from PyQt5.QtGui import QFont
from cadnano.gui.views.styles import BLUE_STROKE, GRAY_STROKE, THE_FONT
# Slice Sizing
SLICE_HELIX_RADIUS = 15.
SLICE_HELIX_STROKE_WIDTH = 0.5
SLICE_HELIX_MOD_HILIGHT_WIDTH = 1
EMPTY_HELIX_STROKE_WIDTH = 0.25
# Z values
# bottom
ZSLICEHELIX = 40
ZSELECTION = 50
ZDESELECTOR = 60
ZWEDGEGIZ... | Fix reset GridItem color for SPA preview | 2.5.1: Fix reset GridItem color for SPA preview
| Python | mit | scholer/cadnano2.5 | from PyQt5.QtGui import QFont
from cadnano.gui.views.styles import BLUE_STROKE, GRAY_STROKE, THE_FONT
# Slice Sizing
SLICE_HELIX_RADIUS = 15.
SLICE_HELIX_STROKE_WIDTH = 0.5
SLICE_HELIX_MOD_HILIGHT_WIDTH = 1
EMPTY_HELIX_STROKE_WIDTH = 0.25
# Z values
# bottom
ZSLICEHELIX = 40
ZSELECTION = 50
ZDESELECTOR = 60
ZWEDGEGIZ... | from PyQt5.QtGui import QFont
from cadnano.gui.views.styles import BLUE_STROKE, GRAY_STROKE, THE_FONT
# Slice Sizing
SLICE_HELIX_RADIUS = 15.
SLICE_HELIX_STROKE_WIDTH = 0.5
SLICE_HELIX_MOD_HILIGHT_WIDTH = 1
EMPTY_HELIX_STROKE_WIDTH = 0.25
# Z values
# bottom
ZSLICEHELIX = 40
ZSELECTION = 50
ZDESELECTOR = 60
ZWEDGEGIZ... | <commit_before>from PyQt5.QtGui import QFont
from cadnano.gui.views.styles import BLUE_STROKE, GRAY_STROKE, THE_FONT
# Slice Sizing
SLICE_HELIX_RADIUS = 15.
SLICE_HELIX_STROKE_WIDTH = 0.5
SLICE_HELIX_MOD_HILIGHT_WIDTH = 1
EMPTY_HELIX_STROKE_WIDTH = 0.25
# Z values
# bottom
ZSLICEHELIX = 40
ZSELECTION = 50
ZDESELECTOR... | from PyQt5.QtGui import QFont
from cadnano.gui.views.styles import BLUE_STROKE, GRAY_STROKE, THE_FONT
# Slice Sizing
SLICE_HELIX_RADIUS = 15.
SLICE_HELIX_STROKE_WIDTH = 0.5
SLICE_HELIX_MOD_HILIGHT_WIDTH = 1
EMPTY_HELIX_STROKE_WIDTH = 0.25
# Z values
# bottom
ZSLICEHELIX = 40
ZSELECTION = 50
ZDESELECTOR = 60
ZWEDGEGIZ... | from PyQt5.QtGui import QFont
from cadnano.gui.views.styles import BLUE_STROKE, GRAY_STROKE, THE_FONT
# Slice Sizing
SLICE_HELIX_RADIUS = 15.
SLICE_HELIX_STROKE_WIDTH = 0.5
SLICE_HELIX_MOD_HILIGHT_WIDTH = 1
EMPTY_HELIX_STROKE_WIDTH = 0.25
# Z values
# bottom
ZSLICEHELIX = 40
ZSELECTION = 50
ZDESELECTOR = 60
ZWEDGEGIZ... | <commit_before>from PyQt5.QtGui import QFont
from cadnano.gui.views.styles import BLUE_STROKE, GRAY_STROKE, THE_FONT
# Slice Sizing
SLICE_HELIX_RADIUS = 15.
SLICE_HELIX_STROKE_WIDTH = 0.5
SLICE_HELIX_MOD_HILIGHT_WIDTH = 1
EMPTY_HELIX_STROKE_WIDTH = 0.25
# Z values
# bottom
ZSLICEHELIX = 40
ZSELECTION = 50
ZDESELECTOR... |
095678fa910f78de1cac80bef46d0e29323a120c | camz/camera.py | camz/camera.py | import io
import picamera
class Camera(object):
def __init__(self):
self.camera = picamera.PiCamera()
self.camera.resolution = (800, 600)
self.camera.framerate = 30
self.camera.rotation = 180
self.camera.led = False
self.recording = False
self.loopStream = ... | import io
import picamera
class Camera(object):
def __init__(self):
self.camera = picamera.PiCamera()
self.camera.resolution = (640, 480)
self.camera.rotation = 180
self.camera.led = False
self.recording = False
self.loopStream = picamera.PiCameraCircularIO(self.ca... | Remove recording wait, works better | Remove recording wait, works better
| Python | mit | calston/pirnv | import io
import picamera
class Camera(object):
def __init__(self):
self.camera = picamera.PiCamera()
self.camera.resolution = (800, 600)
self.camera.framerate = 30
self.camera.rotation = 180
self.camera.led = False
self.recording = False
self.loopStream = ... | import io
import picamera
class Camera(object):
def __init__(self):
self.camera = picamera.PiCamera()
self.camera.resolution = (640, 480)
self.camera.rotation = 180
self.camera.led = False
self.recording = False
self.loopStream = picamera.PiCameraCircularIO(self.ca... | <commit_before>import io
import picamera
class Camera(object):
def __init__(self):
self.camera = picamera.PiCamera()
self.camera.resolution = (800, 600)
self.camera.framerate = 30
self.camera.rotation = 180
self.camera.led = False
self.recording = False
sel... | import io
import picamera
class Camera(object):
def __init__(self):
self.camera = picamera.PiCamera()
self.camera.resolution = (640, 480)
self.camera.rotation = 180
self.camera.led = False
self.recording = False
self.loopStream = picamera.PiCameraCircularIO(self.ca... | import io
import picamera
class Camera(object):
def __init__(self):
self.camera = picamera.PiCamera()
self.camera.resolution = (800, 600)
self.camera.framerate = 30
self.camera.rotation = 180
self.camera.led = False
self.recording = False
self.loopStream = ... | <commit_before>import io
import picamera
class Camera(object):
def __init__(self):
self.camera = picamera.PiCamera()
self.camera.resolution = (800, 600)
self.camera.framerate = 30
self.camera.rotation = 180
self.camera.led = False
self.recording = False
sel... |
4fa76c04a3455ebce6251b59aea54f5a769f3deb | invite/utils.py | invite/utils.py | from datetime import date, timedelta
def get_cutoff_date(days):
"""Calculate the cutoff date or return None if no time period was set."""
if days is None or type(days) != int:
return None
else:
if days >= 0:
return date.today() - timedelta(days=days)
else:
r... | from datetime import date, timedelta
def get_cutoff_date(days):
"""Calculate the cutoff date or return None if no time period was set."""
if days is None or type(days) != int:
return None
else:
if days > 0:
return date.today() - timedelta(days=days)
elif days == 0:
... | Make it so a cutoff of 0 leads to no invites/registrations being shown. | Make it so a cutoff of 0 leads to no invites/registrations being shown.
| Python | bsd-3-clause | unt-libraries/django-invite,unt-libraries/django-invite | from datetime import date, timedelta
def get_cutoff_date(days):
"""Calculate the cutoff date or return None if no time period was set."""
if days is None or type(days) != int:
return None
else:
if days >= 0:
return date.today() - timedelta(days=days)
else:
r... | from datetime import date, timedelta
def get_cutoff_date(days):
"""Calculate the cutoff date or return None if no time period was set."""
if days is None or type(days) != int:
return None
else:
if days > 0:
return date.today() - timedelta(days=days)
elif days == 0:
... | <commit_before>from datetime import date, timedelta
def get_cutoff_date(days):
"""Calculate the cutoff date or return None if no time period was set."""
if days is None or type(days) != int:
return None
else:
if days >= 0:
return date.today() - timedelta(days=days)
else... | from datetime import date, timedelta
def get_cutoff_date(days):
"""Calculate the cutoff date or return None if no time period was set."""
if days is None or type(days) != int:
return None
else:
if days > 0:
return date.today() - timedelta(days=days)
elif days == 0:
... | from datetime import date, timedelta
def get_cutoff_date(days):
"""Calculate the cutoff date or return None if no time period was set."""
if days is None or type(days) != int:
return None
else:
if days >= 0:
return date.today() - timedelta(days=days)
else:
r... | <commit_before>from datetime import date, timedelta
def get_cutoff_date(days):
"""Calculate the cutoff date or return None if no time period was set."""
if days is None or type(days) != int:
return None
else:
if days >= 0:
return date.today() - timedelta(days=days)
else... |
7206db27eb5fccde808f7a4e2b9bea974181bdbc | fluenttest/__init__.py | fluenttest/__init__.py | from fluenttest.class_based import ClassTester, lookup_class, the_class
from fluenttest.test_case import TestCase
__all__ = [
'ClassTester',
'TestCase',
'lookup_class',
'the_class',
]
| from fluenttest.class_based import ClassTester, lookup_class, the_class
from fluenttest.test_case import TestCase
version_info = (1, 1, 0)
__version__ = '.'.join(str(x) for x in version_info)
__all__ = [
'ClassTester',
'TestCase',
'lookup_class',
'the_class',
'__version__',
'version_info',
]
| Add __version__ attribute to fluenttest. | Add __version__ attribute to fluenttest.
The __version__ attribute is the public version identifier and is
server safe. The version_info tuple contains the full version.
| Python | bsd-2-clause | dave-shawley/fluent-test | from fluenttest.class_based import ClassTester, lookup_class, the_class
from fluenttest.test_case import TestCase
__all__ = [
'ClassTester',
'TestCase',
'lookup_class',
'the_class',
]
Add __version__ attribute to fluenttest.
The __version__ attribute is the public version identifier and is
server safe... | from fluenttest.class_based import ClassTester, lookup_class, the_class
from fluenttest.test_case import TestCase
version_info = (1, 1, 0)
__version__ = '.'.join(str(x) for x in version_info)
__all__ = [
'ClassTester',
'TestCase',
'lookup_class',
'the_class',
'__version__',
'version_info',
]
| <commit_before>from fluenttest.class_based import ClassTester, lookup_class, the_class
from fluenttest.test_case import TestCase
__all__ = [
'ClassTester',
'TestCase',
'lookup_class',
'the_class',
]
<commit_msg>Add __version__ attribute to fluenttest.
The __version__ attribute is the public version id... | from fluenttest.class_based import ClassTester, lookup_class, the_class
from fluenttest.test_case import TestCase
version_info = (1, 1, 0)
__version__ = '.'.join(str(x) for x in version_info)
__all__ = [
'ClassTester',
'TestCase',
'lookup_class',
'the_class',
'__version__',
'version_info',
]
| from fluenttest.class_based import ClassTester, lookup_class, the_class
from fluenttest.test_case import TestCase
__all__ = [
'ClassTester',
'TestCase',
'lookup_class',
'the_class',
]
Add __version__ attribute to fluenttest.
The __version__ attribute is the public version identifier and is
server safe... | <commit_before>from fluenttest.class_based import ClassTester, lookup_class, the_class
from fluenttest.test_case import TestCase
__all__ = [
'ClassTester',
'TestCase',
'lookup_class',
'the_class',
]
<commit_msg>Add __version__ attribute to fluenttest.
The __version__ attribute is the public version id... |
ae4f144ea9256b4b53fe497a656be38f32213277 | TwitterDataIngestSource.py | TwitterDataIngestSource.py | import sys
from itertools import ifilter
from requests_oauthlib import OAuth1Session
class TwitterDataIngestSource:
"""Ingest data from Twitter"""
def __init__(self, config):
self.config = config
def __iter__(self):
if 'track' in self.config:
self.track = self.config['track']
else:
self... | import sys
from itertools import ifilter
from requests_oauthlib import OAuth1Session
import json
class TwitterDataIngestSource:
"""Ingest data from Twitter"""
def __init__(self, config):
self.config = config
def __iter__(self):
if 'track' in self.config:
self.track = self.config['track']
else... | Fix tweet formatting issues when streaming from twitter | Fix tweet formatting issues when streaming from twitter
| Python | mit | W205-Social-Media/w205-data-ingest,abessou/w251-FinalProject,abessou/w251-FinalProject | import sys
from itertools import ifilter
from requests_oauthlib import OAuth1Session
class TwitterDataIngestSource:
"""Ingest data from Twitter"""
def __init__(self, config):
self.config = config
def __iter__(self):
if 'track' in self.config:
self.track = self.config['track']
else:
self... | import sys
from itertools import ifilter
from requests_oauthlib import OAuth1Session
import json
class TwitterDataIngestSource:
"""Ingest data from Twitter"""
def __init__(self, config):
self.config = config
def __iter__(self):
if 'track' in self.config:
self.track = self.config['track']
else... | <commit_before>import sys
from itertools import ifilter
from requests_oauthlib import OAuth1Session
class TwitterDataIngestSource:
"""Ingest data from Twitter"""
def __init__(self, config):
self.config = config
def __iter__(self):
if 'track' in self.config:
self.track = self.config['track']
e... | import sys
from itertools import ifilter
from requests_oauthlib import OAuth1Session
import json
class TwitterDataIngestSource:
"""Ingest data from Twitter"""
def __init__(self, config):
self.config = config
def __iter__(self):
if 'track' in self.config:
self.track = self.config['track']
else... | import sys
from itertools import ifilter
from requests_oauthlib import OAuth1Session
class TwitterDataIngestSource:
"""Ingest data from Twitter"""
def __init__(self, config):
self.config = config
def __iter__(self):
if 'track' in self.config:
self.track = self.config['track']
else:
self... | <commit_before>import sys
from itertools import ifilter
from requests_oauthlib import OAuth1Session
class TwitterDataIngestSource:
"""Ingest data from Twitter"""
def __init__(self, config):
self.config = config
def __iter__(self):
if 'track' in self.config:
self.track = self.config['track']
e... |
f50efcb65d794985185f5cc82c697673f50e4c47 | synapse/replication/slave/storage/keys.py | synapse/replication/slave/storage/keys.py | # -*- coding: utf-8 -*-
# Copyright 2015, 2016 OpenMarket Ltd
#
# 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 applica... | # -*- coding: utf-8 -*-
# Copyright 2015, 2016 OpenMarket Ltd
#
# 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 applica... | Replace SlavedKeyStore with a shim | Replace SlavedKeyStore with a shim
since we're pulling everything out of KeyStore anyway, we may as well simplify
it.
| Python | apache-2.0 | matrix-org/synapse,matrix-org/synapse,matrix-org/synapse,matrix-org/synapse,matrix-org/synapse,matrix-org/synapse | # -*- coding: utf-8 -*-
# Copyright 2015, 2016 OpenMarket Ltd
#
# 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 applica... | # -*- coding: utf-8 -*-
# Copyright 2015, 2016 OpenMarket Ltd
#
# 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 applica... | <commit_before># -*- coding: utf-8 -*-
# Copyright 2015, 2016 OpenMarket Ltd
#
# 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 requ... | # -*- coding: utf-8 -*-
# Copyright 2015, 2016 OpenMarket Ltd
#
# 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 applica... | # -*- coding: utf-8 -*-
# Copyright 2015, 2016 OpenMarket Ltd
#
# 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 applica... | <commit_before># -*- coding: utf-8 -*-
# Copyright 2015, 2016 OpenMarket Ltd
#
# 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 requ... |
62c9322cf1508eafa6bd3061d1f047ce42b95804 | byceps/blueprints/ticketing/views.py | byceps/blueprints/ticketing/views.py | """
byceps.blueprints.ticketing.views
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
:Copyright: 2006-2017 Jochen Kupperschmidt
:License: Modified BSD, see LICENSE for details.
"""
from flask import abort, g
from ...services.party import service as party_service
from ...services.ticketing import ticket_service
from ...util.frame... | """
byceps.blueprints.ticketing.views
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
:Copyright: 2006-2017 Jochen Kupperschmidt
:License: Modified BSD, see LICENSE for details.
"""
from flask import abort, g
from ...services.party import service as party_service
from ...services.ticketing import ticket_service
from ...util.frame... | Hide revoked tickets from user in personal ticket list | Hide revoked tickets from user in personal ticket list
| Python | bsd-3-clause | m-ober/byceps,m-ober/byceps,homeworkprod/byceps,homeworkprod/byceps,homeworkprod/byceps,m-ober/byceps | """
byceps.blueprints.ticketing.views
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
:Copyright: 2006-2017 Jochen Kupperschmidt
:License: Modified BSD, see LICENSE for details.
"""
from flask import abort, g
from ...services.party import service as party_service
from ...services.ticketing import ticket_service
from ...util.frame... | """
byceps.blueprints.ticketing.views
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
:Copyright: 2006-2017 Jochen Kupperschmidt
:License: Modified BSD, see LICENSE for details.
"""
from flask import abort, g
from ...services.party import service as party_service
from ...services.ticketing import ticket_service
from ...util.frame... | <commit_before>"""
byceps.blueprints.ticketing.views
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
:Copyright: 2006-2017 Jochen Kupperschmidt
:License: Modified BSD, see LICENSE for details.
"""
from flask import abort, g
from ...services.party import service as party_service
from ...services.ticketing import ticket_service
fro... | """
byceps.blueprints.ticketing.views
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
:Copyright: 2006-2017 Jochen Kupperschmidt
:License: Modified BSD, see LICENSE for details.
"""
from flask import abort, g
from ...services.party import service as party_service
from ...services.ticketing import ticket_service
from ...util.frame... | """
byceps.blueprints.ticketing.views
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
:Copyright: 2006-2017 Jochen Kupperschmidt
:License: Modified BSD, see LICENSE for details.
"""
from flask import abort, g
from ...services.party import service as party_service
from ...services.ticketing import ticket_service
from ...util.frame... | <commit_before>"""
byceps.blueprints.ticketing.views
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
:Copyright: 2006-2017 Jochen Kupperschmidt
:License: Modified BSD, see LICENSE for details.
"""
from flask import abort, g
from ...services.party import service as party_service
from ...services.ticketing import ticket_service
fro... |
2399fea4f3fa1c4d4df1bac06b6fb6e3e32f03e9 | exotica_python/tests/runtest.py | exotica_python/tests/runtest.py | #!/usr/bin/env python
# This is a workaround for liburdf.so throwing an exception and killing
# the process on exit in ROS Indigo.
import subprocess
import os
import sys
tests = ['core.py',
'valkyrie_com.py' #,
# 'valkyrie_collision_check_fcl_default.py',
# 'valkyrie_collision_check_fcl_lates... | #!/usr/bin/env python
# This is a workaround for liburdf.so throwing an exception and killing
# the process on exit in ROS Indigo.
import subprocess
import os
import sys
tests = ['core.py',
'valkyrie_com.py',
'valkyrie_collision_check_fcl_default.py',
'valkyrie_collision_check_fcl_latest.py... | Enable Valkyrie collision checking tests | exotica_python: Enable Valkyrie collision checking tests
| Python | bsd-3-clause | openhumanoids/exotica,openhumanoids/exotica,openhumanoids/exotica,openhumanoids/exotica | #!/usr/bin/env python
# This is a workaround for liburdf.so throwing an exception and killing
# the process on exit in ROS Indigo.
import subprocess
import os
import sys
tests = ['core.py',
'valkyrie_com.py' #,
# 'valkyrie_collision_check_fcl_default.py',
# 'valkyrie_collision_check_fcl_lates... | #!/usr/bin/env python
# This is a workaround for liburdf.so throwing an exception and killing
# the process on exit in ROS Indigo.
import subprocess
import os
import sys
tests = ['core.py',
'valkyrie_com.py',
'valkyrie_collision_check_fcl_default.py',
'valkyrie_collision_check_fcl_latest.py... | <commit_before>#!/usr/bin/env python
# This is a workaround for liburdf.so throwing an exception and killing
# the process on exit in ROS Indigo.
import subprocess
import os
import sys
tests = ['core.py',
'valkyrie_com.py' #,
# 'valkyrie_collision_check_fcl_default.py',
# 'valkyrie_collision_... | #!/usr/bin/env python
# This is a workaround for liburdf.so throwing an exception and killing
# the process on exit in ROS Indigo.
import subprocess
import os
import sys
tests = ['core.py',
'valkyrie_com.py',
'valkyrie_collision_check_fcl_default.py',
'valkyrie_collision_check_fcl_latest.py... | #!/usr/bin/env python
# This is a workaround for liburdf.so throwing an exception and killing
# the process on exit in ROS Indigo.
import subprocess
import os
import sys
tests = ['core.py',
'valkyrie_com.py' #,
# 'valkyrie_collision_check_fcl_default.py',
# 'valkyrie_collision_check_fcl_lates... | <commit_before>#!/usr/bin/env python
# This is a workaround for liburdf.so throwing an exception and killing
# the process on exit in ROS Indigo.
import subprocess
import os
import sys
tests = ['core.py',
'valkyrie_com.py' #,
# 'valkyrie_collision_check_fcl_default.py',
# 'valkyrie_collision_... |
3de1b3c8538a473c29189ef4df02f93e67e221ac | migrations/versions/420_dos_is_coming.py | migrations/versions/420_dos_is_coming.py | """DOS is coming
Revision ID: 420
Revises: 410_remove_empty_drafts
Create Date: 2015-11-16 14:10:35.814066
"""
# revision identifiers, used by Alembic.
revision = '420'
down_revision = '410_remove_empty_drafts'
from alembic import op
import sqlalchemy as sa
from app.models import Framework
def upgrade():
op.e... | """DOS is coming
Revision ID: 420
Revises: 410_remove_empty_drafts
Create Date: 2015-11-16 14:10:35.814066
"""
# revision identifiers, used by Alembic.
revision = '420'
down_revision = '410_remove_empty_drafts'
from alembic import op
def upgrade():
op.execute("COMMIT")
op.execute("ALTER TYPE framework_enu... | Use `op` instead of `app` so that `list_migrations` still works | Use `op` instead of `app` so that `list_migrations` still works
By importing `app` the `list_migrations.py` script broke because it doesn't have the `app` context.
| Python | mit | alphagov/digitalmarketplace-api,alphagov/digitalmarketplace-api,alphagov/digitalmarketplace-api | """DOS is coming
Revision ID: 420
Revises: 410_remove_empty_drafts
Create Date: 2015-11-16 14:10:35.814066
"""
# revision identifiers, used by Alembic.
revision = '420'
down_revision = '410_remove_empty_drafts'
from alembic import op
import sqlalchemy as sa
from app.models import Framework
def upgrade():
op.e... | """DOS is coming
Revision ID: 420
Revises: 410_remove_empty_drafts
Create Date: 2015-11-16 14:10:35.814066
"""
# revision identifiers, used by Alembic.
revision = '420'
down_revision = '410_remove_empty_drafts'
from alembic import op
def upgrade():
op.execute("COMMIT")
op.execute("ALTER TYPE framework_enu... | <commit_before>"""DOS is coming
Revision ID: 420
Revises: 410_remove_empty_drafts
Create Date: 2015-11-16 14:10:35.814066
"""
# revision identifiers, used by Alembic.
revision = '420'
down_revision = '410_remove_empty_drafts'
from alembic import op
import sqlalchemy as sa
from app.models import Framework
def upgr... | """DOS is coming
Revision ID: 420
Revises: 410_remove_empty_drafts
Create Date: 2015-11-16 14:10:35.814066
"""
# revision identifiers, used by Alembic.
revision = '420'
down_revision = '410_remove_empty_drafts'
from alembic import op
def upgrade():
op.execute("COMMIT")
op.execute("ALTER TYPE framework_enu... | """DOS is coming
Revision ID: 420
Revises: 410_remove_empty_drafts
Create Date: 2015-11-16 14:10:35.814066
"""
# revision identifiers, used by Alembic.
revision = '420'
down_revision = '410_remove_empty_drafts'
from alembic import op
import sqlalchemy as sa
from app.models import Framework
def upgrade():
op.e... | <commit_before>"""DOS is coming
Revision ID: 420
Revises: 410_remove_empty_drafts
Create Date: 2015-11-16 14:10:35.814066
"""
# revision identifiers, used by Alembic.
revision = '420'
down_revision = '410_remove_empty_drafts'
from alembic import op
import sqlalchemy as sa
from app.models import Framework
def upgr... |
bb18029c9ca75b420aa486e393b2f79e8f2e009b | examples/echobot.py | examples/echobot.py | # -*- coding: utf-8 -*-
from linepy import *
client = LineClient()
#client = LineClient(authToken='AUTHTOKEN')
client.log("Auth Token : " + str(client.authToken))
poll = LinePoll(client)
# Receive messages from LinePoll
def RECEIVE_MESSAGE(op):
msg = op.message
text = msg.text
msg_id = m... | # -*- coding: utf-8 -*-
from linepy import *
client = LineClient()
#client = LineClient(authToken='AUTHTOKEN')
client.log("Auth Token : " + str(client.authToken))
poll = LinePoll(client)
# Receive messages from LinePoll
def RECEIVE_MESSAGE(op):
msg = op.message
text = msg.text
msg_id = m... | Change receiver contact to sender | Change receiver contact to sender | Python | bsd-3-clause | fadhiilrachman/line-py | # -*- coding: utf-8 -*-
from linepy import *
client = LineClient()
#client = LineClient(authToken='AUTHTOKEN')
client.log("Auth Token : " + str(client.authToken))
poll = LinePoll(client)
# Receive messages from LinePoll
def RECEIVE_MESSAGE(op):
msg = op.message
text = msg.text
msg_id = m... | # -*- coding: utf-8 -*-
from linepy import *
client = LineClient()
#client = LineClient(authToken='AUTHTOKEN')
client.log("Auth Token : " + str(client.authToken))
poll = LinePoll(client)
# Receive messages from LinePoll
def RECEIVE_MESSAGE(op):
msg = op.message
text = msg.text
msg_id = m... | <commit_before># -*- coding: utf-8 -*-
from linepy import *
client = LineClient()
#client = LineClient(authToken='AUTHTOKEN')
client.log("Auth Token : " + str(client.authToken))
poll = LinePoll(client)
# Receive messages from LinePoll
def RECEIVE_MESSAGE(op):
msg = op.message
text = msg.text
... | # -*- coding: utf-8 -*-
from linepy import *
client = LineClient()
#client = LineClient(authToken='AUTHTOKEN')
client.log("Auth Token : " + str(client.authToken))
poll = LinePoll(client)
# Receive messages from LinePoll
def RECEIVE_MESSAGE(op):
msg = op.message
text = msg.text
msg_id = m... | # -*- coding: utf-8 -*-
from linepy import *
client = LineClient()
#client = LineClient(authToken='AUTHTOKEN')
client.log("Auth Token : " + str(client.authToken))
poll = LinePoll(client)
# Receive messages from LinePoll
def RECEIVE_MESSAGE(op):
msg = op.message
text = msg.text
msg_id = m... | <commit_before># -*- coding: utf-8 -*-
from linepy import *
client = LineClient()
#client = LineClient(authToken='AUTHTOKEN')
client.log("Auth Token : " + str(client.authToken))
poll = LinePoll(client)
# Receive messages from LinePoll
def RECEIVE_MESSAGE(op):
msg = op.message
text = msg.text
... |
0313743781fd046a587936545f030938beb71364 | dataset/dataset/spiders/dataset_spider.py | dataset/dataset/spiders/dataset_spider.py | from scrapy.contrib.spiders import CrawlSpider, Rule
from scrapy.contrib.linkextractors.sgml import SgmlLinkExtractor
from scrapy.selector import Selector
from .. import items
class DatasetSpider(CrawlSpider):
pages = 9466
name = 'dataset'
allowed_domains = ['data.gc.ca']
start_urls = []
for i in... | from scrapy.contrib.spiders import CrawlSpider, Rule
from scrapy.contrib.linkextractors.sgml import SgmlLinkExtractor
from scrapy.selector import Selector
from .. import items
class DatasetSpider(CrawlSpider):
pages = 9466
name = 'dataset'
allowed_domains = ['data.gc.ca']
start_urls = []
for i in... | Add regex to filter out tab/space/newline | Add regex to filter out tab/space/newline
| Python | mit | MaxLikelihood/CODE | from scrapy.contrib.spiders import CrawlSpider, Rule
from scrapy.contrib.linkextractors.sgml import SgmlLinkExtractor
from scrapy.selector import Selector
from .. import items
class DatasetSpider(CrawlSpider):
pages = 9466
name = 'dataset'
allowed_domains = ['data.gc.ca']
start_urls = []
for i in... | from scrapy.contrib.spiders import CrawlSpider, Rule
from scrapy.contrib.linkextractors.sgml import SgmlLinkExtractor
from scrapy.selector import Selector
from .. import items
class DatasetSpider(CrawlSpider):
pages = 9466
name = 'dataset'
allowed_domains = ['data.gc.ca']
start_urls = []
for i in... | <commit_before>from scrapy.contrib.spiders import CrawlSpider, Rule
from scrapy.contrib.linkextractors.sgml import SgmlLinkExtractor
from scrapy.selector import Selector
from .. import items
class DatasetSpider(CrawlSpider):
pages = 9466
name = 'dataset'
allowed_domains = ['data.gc.ca']
start_urls = [... | from scrapy.contrib.spiders import CrawlSpider, Rule
from scrapy.contrib.linkextractors.sgml import SgmlLinkExtractor
from scrapy.selector import Selector
from .. import items
class DatasetSpider(CrawlSpider):
pages = 9466
name = 'dataset'
allowed_domains = ['data.gc.ca']
start_urls = []
for i in... | from scrapy.contrib.spiders import CrawlSpider, Rule
from scrapy.contrib.linkextractors.sgml import SgmlLinkExtractor
from scrapy.selector import Selector
from .. import items
class DatasetSpider(CrawlSpider):
pages = 9466
name = 'dataset'
allowed_domains = ['data.gc.ca']
start_urls = []
for i in... | <commit_before>from scrapy.contrib.spiders import CrawlSpider, Rule
from scrapy.contrib.linkextractors.sgml import SgmlLinkExtractor
from scrapy.selector import Selector
from .. import items
class DatasetSpider(CrawlSpider):
pages = 9466
name = 'dataset'
allowed_domains = ['data.gc.ca']
start_urls = [... |
e24098fed631473671849ec920ebb88345b146bc | fastapp/__init__.py | fastapp/__init__.py | __version__ = "0.7.7"
import os
from django.core.exceptions import ImproperlyConfigured
# load plugins
from django.conf import settings
try:
plugins_config = getattr(settings, "FASTAPP_PLUGINS_CONFIG", {})
plugins = plugins_config.keys()
plugins = plugins + getattr(settings, "FASTAPP_PLUGINS", [])
fo... | __version__ = "0.7.8"
import os
from django.core.exceptions import ImproperlyConfigured
# load plugins
from django.conf import settings
try:
plugins_config = getattr(settings, "FASTAPP_PLUGINS_CONFIG", {})
plugins = plugins_config.keys()
plugins = plugins + getattr(settings, "FASTAPP_PLUGINS", [])
fo... | Update fastapp version to 0.7.8 | Update fastapp version to 0.7.8
| Python | mit | sahlinet/fastapp,sahlinet/fastapp,sahlinet/fastapp,sahlinet/fastapp | __version__ = "0.7.7"
import os
from django.core.exceptions import ImproperlyConfigured
# load plugins
from django.conf import settings
try:
plugins_config = getattr(settings, "FASTAPP_PLUGINS_CONFIG", {})
plugins = plugins_config.keys()
plugins = plugins + getattr(settings, "FASTAPP_PLUGINS", [])
fo... | __version__ = "0.7.8"
import os
from django.core.exceptions import ImproperlyConfigured
# load plugins
from django.conf import settings
try:
plugins_config = getattr(settings, "FASTAPP_PLUGINS_CONFIG", {})
plugins = plugins_config.keys()
plugins = plugins + getattr(settings, "FASTAPP_PLUGINS", [])
fo... | <commit_before>__version__ = "0.7.7"
import os
from django.core.exceptions import ImproperlyConfigured
# load plugins
from django.conf import settings
try:
plugins_config = getattr(settings, "FASTAPP_PLUGINS_CONFIG", {})
plugins = plugins_config.keys()
plugins = plugins + getattr(settings, "FASTAPP_PLUGI... | __version__ = "0.7.8"
import os
from django.core.exceptions import ImproperlyConfigured
# load plugins
from django.conf import settings
try:
plugins_config = getattr(settings, "FASTAPP_PLUGINS_CONFIG", {})
plugins = plugins_config.keys()
plugins = plugins + getattr(settings, "FASTAPP_PLUGINS", [])
fo... | __version__ = "0.7.7"
import os
from django.core.exceptions import ImproperlyConfigured
# load plugins
from django.conf import settings
try:
plugins_config = getattr(settings, "FASTAPP_PLUGINS_CONFIG", {})
plugins = plugins_config.keys()
plugins = plugins + getattr(settings, "FASTAPP_PLUGINS", [])
fo... | <commit_before>__version__ = "0.7.7"
import os
from django.core.exceptions import ImproperlyConfigured
# load plugins
from django.conf import settings
try:
plugins_config = getattr(settings, "FASTAPP_PLUGINS_CONFIG", {})
plugins = plugins_config.keys()
plugins = plugins + getattr(settings, "FASTAPP_PLUGI... |
92bac498d3ad8f2e49212ce73b7324d661620d63 | grako/ast.py | grako/ast.py | from collections import OrderedDict, Mapping
import json
class AST(Mapping):
def __init__(self, **kwargs):
self._elements = OrderedDict(**kwargs)
def add(self, key, value):
previous = self._elements.get(key, None)
if previous is None:
self._elements[key] = [value]
e... | from collections import OrderedDict, Mapping
import json
__all__ = ['AST']
class AST(Mapping):
def __init__(self, **kwargs):
self._elements = OrderedDict(**kwargs)
def add(self, key, value):
previous = self._elements.get(key, None)
if previous is None:
self._elements[key] ... | Allow to set items in AST. | Allow to set items in AST.
| Python | bsd-2-clause | swayf/grako,swayf/grako | from collections import OrderedDict, Mapping
import json
class AST(Mapping):
def __init__(self, **kwargs):
self._elements = OrderedDict(**kwargs)
def add(self, key, value):
previous = self._elements.get(key, None)
if previous is None:
self._elements[key] = [value]
e... | from collections import OrderedDict, Mapping
import json
__all__ = ['AST']
class AST(Mapping):
def __init__(self, **kwargs):
self._elements = OrderedDict(**kwargs)
def add(self, key, value):
previous = self._elements.get(key, None)
if previous is None:
self._elements[key] ... | <commit_before>from collections import OrderedDict, Mapping
import json
class AST(Mapping):
def __init__(self, **kwargs):
self._elements = OrderedDict(**kwargs)
def add(self, key, value):
previous = self._elements.get(key, None)
if previous is None:
self._elements[key] = [v... | from collections import OrderedDict, Mapping
import json
__all__ = ['AST']
class AST(Mapping):
def __init__(self, **kwargs):
self._elements = OrderedDict(**kwargs)
def add(self, key, value):
previous = self._elements.get(key, None)
if previous is None:
self._elements[key] ... | from collections import OrderedDict, Mapping
import json
class AST(Mapping):
def __init__(self, **kwargs):
self._elements = OrderedDict(**kwargs)
def add(self, key, value):
previous = self._elements.get(key, None)
if previous is None:
self._elements[key] = [value]
e... | <commit_before>from collections import OrderedDict, Mapping
import json
class AST(Mapping):
def __init__(self, **kwargs):
self._elements = OrderedDict(**kwargs)
def add(self, key, value):
previous = self._elements.get(key, None)
if previous is None:
self._elements[key] = [v... |
5b91e6ce3b66721df9943f996368e7d977a1e1c9 | footparse/_utils.py | footparse/_utils.py | import requests
class BasePage:
def __init__(self, data):
self.data = data
@classmethod
def from_file(cls, path):
with open(path) as f:
raw = f.read()
return cls(raw)
@classmethod
def from_url(cls, url):
res = requests.get(url)
return cls(res.... | import requests
class BasePage:
def __init__(self, data):
self.data = data
@classmethod
def from_file(cls, path):
with open(path) as f:
raw = f.read()
return cls(raw)
@classmethod
def from_url(cls, url):
res = requests.get(url)
res.raise_for_s... | Raise an exception when request fails. | Raise an exception when request fails.
In general, I think that it is safer to raise an exception when an HTTP
request used to fetch a page fails.
| Python | mit | kickoffai/footparse,kickoffai/footparse | import requests
class BasePage:
def __init__(self, data):
self.data = data
@classmethod
def from_file(cls, path):
with open(path) as f:
raw = f.read()
return cls(raw)
@classmethod
def from_url(cls, url):
res = requests.get(url)
return cls(res.... | import requests
class BasePage:
def __init__(self, data):
self.data = data
@classmethod
def from_file(cls, path):
with open(path) as f:
raw = f.read()
return cls(raw)
@classmethod
def from_url(cls, url):
res = requests.get(url)
res.raise_for_s... | <commit_before>import requests
class BasePage:
def __init__(self, data):
self.data = data
@classmethod
def from_file(cls, path):
with open(path) as f:
raw = f.read()
return cls(raw)
@classmethod
def from_url(cls, url):
res = requests.get(url)
... | import requests
class BasePage:
def __init__(self, data):
self.data = data
@classmethod
def from_file(cls, path):
with open(path) as f:
raw = f.read()
return cls(raw)
@classmethod
def from_url(cls, url):
res = requests.get(url)
res.raise_for_s... | import requests
class BasePage:
def __init__(self, data):
self.data = data
@classmethod
def from_file(cls, path):
with open(path) as f:
raw = f.read()
return cls(raw)
@classmethod
def from_url(cls, url):
res = requests.get(url)
return cls(res.... | <commit_before>import requests
class BasePage:
def __init__(self, data):
self.data = data
@classmethod
def from_file(cls, path):
with open(path) as f:
raw = f.read()
return cls(raw)
@classmethod
def from_url(cls, url):
res = requests.get(url)
... |
6d6e0b780c62bea5fec43eae1411db827f13fa17 | faker/providers/internet/uk_UA/__init__.py | faker/providers/internet/uk_UA/__init__.py | # coding=utf-8
from __future__ import unicode_literals
from .. import Provider as InternetProvider
class Provider(InternetProvider):
free_email_domains = [
'email.ua', 'gmail.com', 'gov.ua', 'i.ua', 'meta.ua', 'ukr.net'
]
tlds = ['com', 'info', 'net', 'org', 'ua', 'укр']
| # coding=utf-8
from __future__ import unicode_literals
from .. import Provider as InternetProvider
class Provider(InternetProvider):
free_email_domains = (
'email.ua', 'gmail.com', 'gov.ua', 'i.ua', 'meta.ua', 'ukr.net'
)
tlds = ('com', 'info', 'net', 'org', 'ua', 'укр')
replacements = (
... | Improve the Ukrainian Internet provider | Improve the Ukrainian Internet provider
Add `replacements`. Replace lists by tuples | Python | mit | joke2k/faker,trtd/faker,danhuss/faker,joke2k/faker | # coding=utf-8
from __future__ import unicode_literals
from .. import Provider as InternetProvider
class Provider(InternetProvider):
free_email_domains = [
'email.ua', 'gmail.com', 'gov.ua', 'i.ua', 'meta.ua', 'ukr.net'
]
tlds = ['com', 'info', 'net', 'org', 'ua', 'укр']
Improve the Ukrainian Int... | # coding=utf-8
from __future__ import unicode_literals
from .. import Provider as InternetProvider
class Provider(InternetProvider):
free_email_domains = (
'email.ua', 'gmail.com', 'gov.ua', 'i.ua', 'meta.ua', 'ukr.net'
)
tlds = ('com', 'info', 'net', 'org', 'ua', 'укр')
replacements = (
... | <commit_before># coding=utf-8
from __future__ import unicode_literals
from .. import Provider as InternetProvider
class Provider(InternetProvider):
free_email_domains = [
'email.ua', 'gmail.com', 'gov.ua', 'i.ua', 'meta.ua', 'ukr.net'
]
tlds = ['com', 'info', 'net', 'org', 'ua', 'укр']
<commit_ms... | # coding=utf-8
from __future__ import unicode_literals
from .. import Provider as InternetProvider
class Provider(InternetProvider):
free_email_domains = (
'email.ua', 'gmail.com', 'gov.ua', 'i.ua', 'meta.ua', 'ukr.net'
)
tlds = ('com', 'info', 'net', 'org', 'ua', 'укр')
replacements = (
... | # coding=utf-8
from __future__ import unicode_literals
from .. import Provider as InternetProvider
class Provider(InternetProvider):
free_email_domains = [
'email.ua', 'gmail.com', 'gov.ua', 'i.ua', 'meta.ua', 'ukr.net'
]
tlds = ['com', 'info', 'net', 'org', 'ua', 'укр']
Improve the Ukrainian Int... | <commit_before># coding=utf-8
from __future__ import unicode_literals
from .. import Provider as InternetProvider
class Provider(InternetProvider):
free_email_domains = [
'email.ua', 'gmail.com', 'gov.ua', 'i.ua', 'meta.ua', 'ukr.net'
]
tlds = ['com', 'info', 'net', 'org', 'ua', 'укр']
<commit_ms... |
364fde2dd6554760ca63c5b16e35222d5482999e | report/report_util.py | report/report_util.py | def compare_ledger_types(account, data, orm):
selected_ledger = data['form']['ledger_type']
account_ledgers = [ledger.id for ledger in account.ledger_types]
if not selected_ledger:
return account_ledgers == []
return selected_ledger in account_ledgers
def should_show_account(account, data):
... | def compare_ledger_types(account, data, orm):
if not hasattr(account, 'ledger_types'):
# Ignore this filter when alternate_ledger is not installed.
return True
selected_ledger = data['form']['ledger_type']
account_ledgers = [ledger.id for ledger in account.ledger_types]
if not selected... | Fix errors when alternate_ledger is not installed | Fix errors when alternate_ledger is not installed
| Python | agpl-3.0 | lithint/account_report_webkit,xcgd/account_report_webkit,xcgd/account_report_webkit,lithint/account_report_webkit | def compare_ledger_types(account, data, orm):
selected_ledger = data['form']['ledger_type']
account_ledgers = [ledger.id for ledger in account.ledger_types]
if not selected_ledger:
return account_ledgers == []
return selected_ledger in account_ledgers
def should_show_account(account, data):
... | def compare_ledger_types(account, data, orm):
if not hasattr(account, 'ledger_types'):
# Ignore this filter when alternate_ledger is not installed.
return True
selected_ledger = data['form']['ledger_type']
account_ledgers = [ledger.id for ledger in account.ledger_types]
if not selected... | <commit_before>def compare_ledger_types(account, data, orm):
selected_ledger = data['form']['ledger_type']
account_ledgers = [ledger.id for ledger in account.ledger_types]
if not selected_ledger:
return account_ledgers == []
return selected_ledger in account_ledgers
def should_show_account(a... | def compare_ledger_types(account, data, orm):
if not hasattr(account, 'ledger_types'):
# Ignore this filter when alternate_ledger is not installed.
return True
selected_ledger = data['form']['ledger_type']
account_ledgers = [ledger.id for ledger in account.ledger_types]
if not selected... | def compare_ledger_types(account, data, orm):
selected_ledger = data['form']['ledger_type']
account_ledgers = [ledger.id for ledger in account.ledger_types]
if not selected_ledger:
return account_ledgers == []
return selected_ledger in account_ledgers
def should_show_account(account, data):
... | <commit_before>def compare_ledger_types(account, data, orm):
selected_ledger = data['form']['ledger_type']
account_ledgers = [ledger.id for ledger in account.ledger_types]
if not selected_ledger:
return account_ledgers == []
return selected_ledger in account_ledgers
def should_show_account(a... |
51de7814ed881a7974f972aafc391584d0c2c517 | kuryr/server.py | kuryr/server.py | # Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under t... | # Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under t... | Remove app.debug as we do not use it any more. | Remove app.debug as we do not use it any more.
Change-Id: I61497ae95dd304e60240f8ac731e63950351782f
Closes-Bug: #1583663
| Python | apache-2.0 | openstack/kuryr,celebdor/kuryr-libnetwork,celebdor/kuryr-libnetwork,celebdor/kuryr,celebdor/kuryr,celebdor/kuryr-libnetwork,openstack/kuryr | # Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under t... | # Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under t... | <commit_before># Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# dist... | # Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under t... | # Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under t... | <commit_before># Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# dist... |
657d5b1a79811df660857b7488895143fd4106fc | openacademy/model/openacademy_session.py | openacademy/model/openacademy_session.py | # -*- coding: utf-8 -*-
from openerp import fields, models
class Session(models.Model):
_name = 'openacademy.session'
name = fields.Char(required=True)
start_date = fields.Date()
duration = fields.Float(digits=(6,2), help="Duration in days")
seats = fields.Integer(string="Number of seats")
in... | # -*- coding: utf-8 -*-
from openerp import fields, models
class Session(models.Model):
_name = 'openacademy.session'
name = fields.Char(required=True)
start_date = fields.Date()
duration = fields.Float(digits=(6,2), help="Duration in days")
seats = fields.Integer(string="Number of seats")
in... | Add domain | & ilike | [REF] openacademy: Add domain | & ilike
| Python | apache-2.0 | jorgescalona/openacademy-project | # -*- coding: utf-8 -*-
from openerp import fields, models
class Session(models.Model):
_name = 'openacademy.session'
name = fields.Char(required=True)
start_date = fields.Date()
duration = fields.Float(digits=(6,2), help="Duration in days")
seats = fields.Integer(string="Number of seats")
in... | # -*- coding: utf-8 -*-
from openerp import fields, models
class Session(models.Model):
_name = 'openacademy.session'
name = fields.Char(required=True)
start_date = fields.Date()
duration = fields.Float(digits=(6,2), help="Duration in days")
seats = fields.Integer(string="Number of seats")
in... | <commit_before># -*- coding: utf-8 -*-
from openerp import fields, models
class Session(models.Model):
_name = 'openacademy.session'
name = fields.Char(required=True)
start_date = fields.Date()
duration = fields.Float(digits=(6,2), help="Duration in days")
seats = fields.Integer(string="Number of... | # -*- coding: utf-8 -*-
from openerp import fields, models
class Session(models.Model):
_name = 'openacademy.session'
name = fields.Char(required=True)
start_date = fields.Date()
duration = fields.Float(digits=(6,2), help="Duration in days")
seats = fields.Integer(string="Number of seats")
in... | # -*- coding: utf-8 -*-
from openerp import fields, models
class Session(models.Model):
_name = 'openacademy.session'
name = fields.Char(required=True)
start_date = fields.Date()
duration = fields.Float(digits=(6,2), help="Duration in days")
seats = fields.Integer(string="Number of seats")
in... | <commit_before># -*- coding: utf-8 -*-
from openerp import fields, models
class Session(models.Model):
_name = 'openacademy.session'
name = fields.Char(required=True)
start_date = fields.Date()
duration = fields.Float(digits=(6,2), help="Duration in days")
seats = fields.Integer(string="Number of... |
fb986717d5016b1cb3c6b953020ff2aff037b3dc | call_server/extensions.py | call_server/extensions.py | # define flask extensions in separate file, to resolve import dependencies
from flask_sqlalchemy import SQLAlchemy
db = SQLAlchemy()
from flask_caching import Cache
cache = Cache()
from flask_assets import Environment
assets = Environment()
from flask_babel import Babel
babel = Babel()
from flask_mail import Mail
... | # define flask extensions in separate file, to resolve import dependencies
from flask_sqlalchemy import SQLAlchemy
db = SQLAlchemy()
from flask_caching import Cache
cache = Cache()
from flask_assets import Environment
assets = Environment()
from flask_babel import Babel
babel = Babel()
from flask_mail import Mail
... | Include script-src unsafe-eval to allow underscore templating Long term, we should pre-compile with webpack to avoid needing this | Include script-src unsafe-eval to allow underscore templating
Long term, we should pre-compile with webpack to avoid needing this
| Python | agpl-3.0 | OpenSourceActivismTech/call-power,spacedogXYZ/call-power,18mr/call-congress,spacedogXYZ/call-power,spacedogXYZ/call-power,18mr/call-congress,OpenSourceActivismTech/call-power,OpenSourceActivismTech/call-power,spacedogXYZ/call-power,OpenSourceActivismTech/call-power,18mr/call-congress,18mr/call-congress | # define flask extensions in separate file, to resolve import dependencies
from flask_sqlalchemy import SQLAlchemy
db = SQLAlchemy()
from flask_caching import Cache
cache = Cache()
from flask_assets import Environment
assets = Environment()
from flask_babel import Babel
babel = Babel()
from flask_mail import Mail
... | # define flask extensions in separate file, to resolve import dependencies
from flask_sqlalchemy import SQLAlchemy
db = SQLAlchemy()
from flask_caching import Cache
cache = Cache()
from flask_assets import Environment
assets = Environment()
from flask_babel import Babel
babel = Babel()
from flask_mail import Mail
... | <commit_before># define flask extensions in separate file, to resolve import dependencies
from flask_sqlalchemy import SQLAlchemy
db = SQLAlchemy()
from flask_caching import Cache
cache = Cache()
from flask_assets import Environment
assets = Environment()
from flask_babel import Babel
babel = Babel()
from flask_ma... | # define flask extensions in separate file, to resolve import dependencies
from flask_sqlalchemy import SQLAlchemy
db = SQLAlchemy()
from flask_caching import Cache
cache = Cache()
from flask_assets import Environment
assets = Environment()
from flask_babel import Babel
babel = Babel()
from flask_mail import Mail
... | # define flask extensions in separate file, to resolve import dependencies
from flask_sqlalchemy import SQLAlchemy
db = SQLAlchemy()
from flask_caching import Cache
cache = Cache()
from flask_assets import Environment
assets = Environment()
from flask_babel import Babel
babel = Babel()
from flask_mail import Mail
... | <commit_before># define flask extensions in separate file, to resolve import dependencies
from flask_sqlalchemy import SQLAlchemy
db = SQLAlchemy()
from flask_caching import Cache
cache = Cache()
from flask_assets import Environment
assets = Environment()
from flask_babel import Babel
babel = Babel()
from flask_ma... |
3ec333d8fc1ad7136b4324476001ed2279977356 | pyfibot/util/twitter_application_auth.py | pyfibot/util/twitter_application_auth.py | import requests
import base64
import sys
if len(sys.argv) < 3:
print "Usage: twitter_application_auth.py <consumer key> <consumer secret>"
sys.exit(1)
consumer_key = sys.argv[1]
consumer_secret = sys.argv[2]
token = consumer_key + ":" + consumer_secret
encoded_token = base64.b64encode(token)
payload = {'gran... | import requests
import base64
import sys
if len(sys.argv) < 3:
print "Usage: twitter_application_auth.py <consumer key> <consumer secret>"
sys.exit(1)
consumer_key = sys.argv[1]
consumer_secret = sys.argv[2]
token = consumer_key + ":" + consumer_secret
encoded_token = base64.b64encode(token)
payload = {'gran... | Improve the instructions on twitter application auth | Improve the instructions on twitter application auth
| Python | bsd-3-clause | aapa/pyfibot,lepinkainen/pyfibot,aapa/pyfibot,lepinkainen/pyfibot | import requests
import base64
import sys
if len(sys.argv) < 3:
print "Usage: twitter_application_auth.py <consumer key> <consumer secret>"
sys.exit(1)
consumer_key = sys.argv[1]
consumer_secret = sys.argv[2]
token = consumer_key + ":" + consumer_secret
encoded_token = base64.b64encode(token)
payload = {'gran... | import requests
import base64
import sys
if len(sys.argv) < 3:
print "Usage: twitter_application_auth.py <consumer key> <consumer secret>"
sys.exit(1)
consumer_key = sys.argv[1]
consumer_secret = sys.argv[2]
token = consumer_key + ":" + consumer_secret
encoded_token = base64.b64encode(token)
payload = {'gran... | <commit_before>import requests
import base64
import sys
if len(sys.argv) < 3:
print "Usage: twitter_application_auth.py <consumer key> <consumer secret>"
sys.exit(1)
consumer_key = sys.argv[1]
consumer_secret = sys.argv[2]
token = consumer_key + ":" + consumer_secret
encoded_token = base64.b64encode(token)
p... | import requests
import base64
import sys
if len(sys.argv) < 3:
print "Usage: twitter_application_auth.py <consumer key> <consumer secret>"
sys.exit(1)
consumer_key = sys.argv[1]
consumer_secret = sys.argv[2]
token = consumer_key + ":" + consumer_secret
encoded_token = base64.b64encode(token)
payload = {'gran... | import requests
import base64
import sys
if len(sys.argv) < 3:
print "Usage: twitter_application_auth.py <consumer key> <consumer secret>"
sys.exit(1)
consumer_key = sys.argv[1]
consumer_secret = sys.argv[2]
token = consumer_key + ":" + consumer_secret
encoded_token = base64.b64encode(token)
payload = {'gran... | <commit_before>import requests
import base64
import sys
if len(sys.argv) < 3:
print "Usage: twitter_application_auth.py <consumer key> <consumer secret>"
sys.exit(1)
consumer_key = sys.argv[1]
consumer_secret = sys.argv[2]
token = consumer_key + ":" + consumer_secret
encoded_token = base64.b64encode(token)
p... |
46cd1dad595aeba0e238a88de9485b1bcbfdab57 | txircd/modules/cmode_s.py | txircd/modules/cmode_s.py | from txircd.modbase import Mode
class SecretMode(Mode):
def listOutput(self, command, data):
if command != "LIST":
return data
cdata = data["cdata"]
if "s" in cdata["channel"].mode and cdata["channel"].name not in data["user"].channels:
data["cdata"].clear()
# other +s stuff is hiding in other modules.
... | from twisted.words.protocols import irc
from txircd.modbase import Mode
class SecretMode(Mode):
def checkPermission(self, user, cmd, data):
if cmd != "NAMES":
return data
remove = []
for chan in data["targetchan"]:
if "p" in chan.mode and chan.name not in user.channels:
user.sendMessage(irc.ERR_NOSUCH... | Hide secret channels from /NAMES users | Hide secret channels from /NAMES users
| Python | bsd-3-clause | Heufneutje/txircd,ElementalAlchemist/txircd,DesertBus/txircd | from txircd.modbase import Mode
class SecretMode(Mode):
def listOutput(self, command, data):
if command != "LIST":
return data
cdata = data["cdata"]
if "s" in cdata["channel"].mode and cdata["channel"].name not in data["user"].channels:
data["cdata"].clear()
# other +s stuff is hiding in other modules.
... | from twisted.words.protocols import irc
from txircd.modbase import Mode
class SecretMode(Mode):
def checkPermission(self, user, cmd, data):
if cmd != "NAMES":
return data
remove = []
for chan in data["targetchan"]:
if "p" in chan.mode and chan.name not in user.channels:
user.sendMessage(irc.ERR_NOSUCH... | <commit_before>from txircd.modbase import Mode
class SecretMode(Mode):
def listOutput(self, command, data):
if command != "LIST":
return data
cdata = data["cdata"]
if "s" in cdata["channel"].mode and cdata["channel"].name not in data["user"].channels:
data["cdata"].clear()
# other +s stuff is hiding in o... | from twisted.words.protocols import irc
from txircd.modbase import Mode
class SecretMode(Mode):
def checkPermission(self, user, cmd, data):
if cmd != "NAMES":
return data
remove = []
for chan in data["targetchan"]:
if "p" in chan.mode and chan.name not in user.channels:
user.sendMessage(irc.ERR_NOSUCH... | from txircd.modbase import Mode
class SecretMode(Mode):
def listOutput(self, command, data):
if command != "LIST":
return data
cdata = data["cdata"]
if "s" in cdata["channel"].mode and cdata["channel"].name not in data["user"].channels:
data["cdata"].clear()
# other +s stuff is hiding in other modules.
... | <commit_before>from txircd.modbase import Mode
class SecretMode(Mode):
def listOutput(self, command, data):
if command != "LIST":
return data
cdata = data["cdata"]
if "s" in cdata["channel"].mode and cdata["channel"].name not in data["user"].channels:
data["cdata"].clear()
# other +s stuff is hiding in o... |
3c0ce6a3e4e16ff3991a838009c42efa2f5b237d | tviit/admin.py | tviit/admin.py | from django.contrib import admin
from .models import Tviit
admin.site.register(Tviit) | from django.contrib import admin
from .models import Tviit
class TviitAdmin(admin.ModelAdmin):
readonly_fields=('uuid',)
admin.site.register(Tviit, TviitAdmin) | Add uuid to be readable in Admin-panel | Add uuid to be readable in Admin-panel
| Python | mit | DeWaster/Tviserrys,DeWaster/Tviserrys | from django.contrib import admin
from .models import Tviit
admin.site.register(Tviit)Add uuid to be readable in Admin-panel | from django.contrib import admin
from .models import Tviit
class TviitAdmin(admin.ModelAdmin):
readonly_fields=('uuid',)
admin.site.register(Tviit, TviitAdmin) | <commit_before>from django.contrib import admin
from .models import Tviit
admin.site.register(Tviit)<commit_msg>Add uuid to be readable in Admin-panel<commit_after> | from django.contrib import admin
from .models import Tviit
class TviitAdmin(admin.ModelAdmin):
readonly_fields=('uuid',)
admin.site.register(Tviit, TviitAdmin) | from django.contrib import admin
from .models import Tviit
admin.site.register(Tviit)Add uuid to be readable in Admin-panelfrom django.contrib import admin
from .models import Tviit
class TviitAdmin(admin.ModelAdmin):
readonly_fields=('uuid',)
admin.site.register(Tviit, TviitAdmin) | <commit_before>from django.contrib import admin
from .models import Tviit
admin.site.register(Tviit)<commit_msg>Add uuid to be readable in Admin-panel<commit_after>from django.contrib import admin
from .models import Tviit
class TviitAdmin(admin.ModelAdmin):
readonly_fields=('uuid',)
admin.site.register(Tviit, T... |
ab8af0f34c468103a092f2c9d751c6c51c5522f1 | bioconda_utils/__init__.py | bioconda_utils/__init__.py | """
Bioconda Utilities Package
.. rubric:: Subpackages
.. autosummary::
:toctree:
bioconda_utils.bot
bioconda_utils.lint
.. rubric:: Submodules
.. autosummary::
:toctree:
aiopipe
bioconductor_skeleton
build
circleci
cli
cran_skeleton
docker_utils
githandler
github_integratio... | """
Bioconda Utilities Package
.. rubric:: Subpackages
.. autosummary::
:toctree:
bioconda_utils.bot
bioconda_utils.lint
.. rubric:: Submodules
.. autosummary::
:toctree:
aiopipe
bioconductor_skeleton
build
circleci
cli
cran_skeleton
docker_utils
githandler
githubhandler
... | Fix leftover docs hook for github_integration module | Fix leftover docs hook for github_integration module
| Python | mit | bioconda/bioconda-utils,bioconda/bioconda-utils,bioconda/bioconda-utils | """
Bioconda Utilities Package
.. rubric:: Subpackages
.. autosummary::
:toctree:
bioconda_utils.bot
bioconda_utils.lint
.. rubric:: Submodules
.. autosummary::
:toctree:
aiopipe
bioconductor_skeleton
build
circleci
cli
cran_skeleton
docker_utils
githandler
github_integratio... | """
Bioconda Utilities Package
.. rubric:: Subpackages
.. autosummary::
:toctree:
bioconda_utils.bot
bioconda_utils.lint
.. rubric:: Submodules
.. autosummary::
:toctree:
aiopipe
bioconductor_skeleton
build
circleci
cli
cran_skeleton
docker_utils
githandler
githubhandler
... | <commit_before>"""
Bioconda Utilities Package
.. rubric:: Subpackages
.. autosummary::
:toctree:
bioconda_utils.bot
bioconda_utils.lint
.. rubric:: Submodules
.. autosummary::
:toctree:
aiopipe
bioconductor_skeleton
build
circleci
cli
cran_skeleton
docker_utils
githandler
gi... | """
Bioconda Utilities Package
.. rubric:: Subpackages
.. autosummary::
:toctree:
bioconda_utils.bot
bioconda_utils.lint
.. rubric:: Submodules
.. autosummary::
:toctree:
aiopipe
bioconductor_skeleton
build
circleci
cli
cran_skeleton
docker_utils
githandler
githubhandler
... | """
Bioconda Utilities Package
.. rubric:: Subpackages
.. autosummary::
:toctree:
bioconda_utils.bot
bioconda_utils.lint
.. rubric:: Submodules
.. autosummary::
:toctree:
aiopipe
bioconductor_skeleton
build
circleci
cli
cran_skeleton
docker_utils
githandler
github_integratio... | <commit_before>"""
Bioconda Utilities Package
.. rubric:: Subpackages
.. autosummary::
:toctree:
bioconda_utils.bot
bioconda_utils.lint
.. rubric:: Submodules
.. autosummary::
:toctree:
aiopipe
bioconductor_skeleton
build
circleci
cli
cran_skeleton
docker_utils
githandler
gi... |
575462ca4cf9f5345939026ce5571bdc7e8277ad | bonobo/execution/plugin.py | bonobo/execution/plugin.py | from bonobo.execution.base import LoopingExecutionContext, recoverable
class PluginExecutionContext(LoopingExecutionContext):
PERIOD = 0.5
def __init__(self, wrapped, parent):
# Instanciate plugin. This is not yet considered stable, as at some point we may need a way to configure
# plugins, f... | from bonobo.execution.base import LoopingExecutionContext, recoverable
class PluginExecutionContext(LoopingExecutionContext):
PERIOD = 0.5
def __init__(self, wrapped, parent):
# Instanciate plugin. This is not yet considered stable, as at some point we may need a way to configure
# plugins, f... | Check if PluginExecutionContext was started before shutting it down. | Check if PluginExecutionContext was started before shutting it down.
If a `PluginExecutionContext().shutdown()` is called _before_
`PluginExecutionContext().start()` was called,
this leads to an `AttributeError` exception since finalizer tries to
access to attributes which were never defined.
| Python | apache-2.0 | hartym/bonobo,python-bonobo/bonobo,hartym/bonobo,python-bonobo/bonobo,python-bonobo/bonobo,hartym/bonobo | from bonobo.execution.base import LoopingExecutionContext, recoverable
class PluginExecutionContext(LoopingExecutionContext):
PERIOD = 0.5
def __init__(self, wrapped, parent):
# Instanciate plugin. This is not yet considered stable, as at some point we may need a way to configure
# plugins, f... | from bonobo.execution.base import LoopingExecutionContext, recoverable
class PluginExecutionContext(LoopingExecutionContext):
PERIOD = 0.5
def __init__(self, wrapped, parent):
# Instanciate plugin. This is not yet considered stable, as at some point we may need a way to configure
# plugins, f... | <commit_before>from bonobo.execution.base import LoopingExecutionContext, recoverable
class PluginExecutionContext(LoopingExecutionContext):
PERIOD = 0.5
def __init__(self, wrapped, parent):
# Instanciate plugin. This is not yet considered stable, as at some point we may need a way to configure
... | from bonobo.execution.base import LoopingExecutionContext, recoverable
class PluginExecutionContext(LoopingExecutionContext):
PERIOD = 0.5
def __init__(self, wrapped, parent):
# Instanciate plugin. This is not yet considered stable, as at some point we may need a way to configure
# plugins, f... | from bonobo.execution.base import LoopingExecutionContext, recoverable
class PluginExecutionContext(LoopingExecutionContext):
PERIOD = 0.5
def __init__(self, wrapped, parent):
# Instanciate plugin. This is not yet considered stable, as at some point we may need a way to configure
# plugins, f... | <commit_before>from bonobo.execution.base import LoopingExecutionContext, recoverable
class PluginExecutionContext(LoopingExecutionContext):
PERIOD = 0.5
def __init__(self, wrapped, parent):
# Instanciate plugin. This is not yet considered stable, as at some point we may need a way to configure
... |
d7bce814c10ce13cf4c228fd87dcbdee75f8d0a1 | integration-test/1211-fix-null-network.py | integration-test/1211-fix-null-network.py | from . import OsmFixtureTest
class FixNullNetwork(OsmFixtureTest):
def test_routes_with_no_network(self):
# ref="N 4", route=road, but no network=*
# so we should get something that has no network, but a shield text of
# '4'
self.load_fixtures(['http://www.openstreetmap.org/relatio... | from . import OsmFixtureTest
class FixNullNetwork(OsmFixtureTest):
def test_routes_with_no_network(self):
# ref="N 4", route=road, but no network=*
# so we should get something that has no network, but a shield text of
# '4'
self.load_fixtures(
['http://www.openstreetma... | Add clip to reduce fixture size. | Add clip to reduce fixture size.
| Python | mit | mapzen/vector-datasource,mapzen/vector-datasource,mapzen/vector-datasource | from . import OsmFixtureTest
class FixNullNetwork(OsmFixtureTest):
def test_routes_with_no_network(self):
# ref="N 4", route=road, but no network=*
# so we should get something that has no network, but a shield text of
# '4'
self.load_fixtures(['http://www.openstreetmap.org/relatio... | from . import OsmFixtureTest
class FixNullNetwork(OsmFixtureTest):
def test_routes_with_no_network(self):
# ref="N 4", route=road, but no network=*
# so we should get something that has no network, but a shield text of
# '4'
self.load_fixtures(
['http://www.openstreetma... | <commit_before>from . import OsmFixtureTest
class FixNullNetwork(OsmFixtureTest):
def test_routes_with_no_network(self):
# ref="N 4", route=road, but no network=*
# so we should get something that has no network, but a shield text of
# '4'
self.load_fixtures(['http://www.openstreet... | from . import OsmFixtureTest
class FixNullNetwork(OsmFixtureTest):
def test_routes_with_no_network(self):
# ref="N 4", route=road, but no network=*
# so we should get something that has no network, but a shield text of
# '4'
self.load_fixtures(
['http://www.openstreetma... | from . import OsmFixtureTest
class FixNullNetwork(OsmFixtureTest):
def test_routes_with_no_network(self):
# ref="N 4", route=road, but no network=*
# so we should get something that has no network, but a shield text of
# '4'
self.load_fixtures(['http://www.openstreetmap.org/relatio... | <commit_before>from . import OsmFixtureTest
class FixNullNetwork(OsmFixtureTest):
def test_routes_with_no_network(self):
# ref="N 4", route=road, but no network=*
# so we should get something that has no network, but a shield text of
# '4'
self.load_fixtures(['http://www.openstreet... |
e3d1c8bbf238516d7a10e03aea0fbd378c4a4f6f | profile_collection/startup/99-bluesky.py | profile_collection/startup/99-bluesky.py |
def detselect(detector_object, suffix="_stats_total1"):
"""Switch the active detector and set some internal state"""
gs.DETS =[detector_object]
gs.PLOT_Y = detector_object.name + suffix
gs.TABLE_COLS = [gs.PLOT_Y]
|
def detselect(detector_object, suffix="_stats_total1"):
"""Switch the active detector and set some internal state"""
gs.DETS =[detector_object]
gs.PLOT_Y = detector_object.name + suffix
gs.TABLE_COLS = [gs.PLOT_Y]
def chx_plot_motor(scan):
fig = None
if gs.PLOTMODE == 1:
fig = plt.gcf... | Add 'better' plotting control for live plots | ENH: Add 'better' plotting control for live plots
| Python | bsd-2-clause | NSLS-II-CHX/ipython_ophyd,NSLS-II-CHX/ipython_ophyd |
def detselect(detector_object, suffix="_stats_total1"):
"""Switch the active detector and set some internal state"""
gs.DETS =[detector_object]
gs.PLOT_Y = detector_object.name + suffix
gs.TABLE_COLS = [gs.PLOT_Y]
ENH: Add 'better' plotting control for live plots |
def detselect(detector_object, suffix="_stats_total1"):
"""Switch the active detector and set some internal state"""
gs.DETS =[detector_object]
gs.PLOT_Y = detector_object.name + suffix
gs.TABLE_COLS = [gs.PLOT_Y]
def chx_plot_motor(scan):
fig = None
if gs.PLOTMODE == 1:
fig = plt.gcf... | <commit_before>
def detselect(detector_object, suffix="_stats_total1"):
"""Switch the active detector and set some internal state"""
gs.DETS =[detector_object]
gs.PLOT_Y = detector_object.name + suffix
gs.TABLE_COLS = [gs.PLOT_Y]
<commit_msg>ENH: Add 'better' plotting control for live plots<commit_aft... |
def detselect(detector_object, suffix="_stats_total1"):
"""Switch the active detector and set some internal state"""
gs.DETS =[detector_object]
gs.PLOT_Y = detector_object.name + suffix
gs.TABLE_COLS = [gs.PLOT_Y]
def chx_plot_motor(scan):
fig = None
if gs.PLOTMODE == 1:
fig = plt.gcf... |
def detselect(detector_object, suffix="_stats_total1"):
"""Switch the active detector and set some internal state"""
gs.DETS =[detector_object]
gs.PLOT_Y = detector_object.name + suffix
gs.TABLE_COLS = [gs.PLOT_Y]
ENH: Add 'better' plotting control for live plots
def detselect(detector_object, suffix... | <commit_before>
def detselect(detector_object, suffix="_stats_total1"):
"""Switch the active detector and set some internal state"""
gs.DETS =[detector_object]
gs.PLOT_Y = detector_object.name + suffix
gs.TABLE_COLS = [gs.PLOT_Y]
<commit_msg>ENH: Add 'better' plotting control for live plots<commit_aft... |
c64d35346ed8d7ae5b08bc8d5eb37f0c827da9f4 | jesusmtnez/python/kata/tests/test_game.py | jesusmtnez/python/kata/tests/test_game.py | import unittest
from game import Game
class BowlingGameTest(unittest.TestCase):
def setUp(self):
self.g = Game()
def tearDown(self):
self.g = None
def _roll_many(self, n, pins):
"Roll 'n' times a roll of 'pins' pins"
for i in range(n):
self.g.roll(pins)
d... | import unittest
from game import Game
class BowlingGameTest(unittest.TestCase):
def setUp(self):
self.g = Game()
def tearDown(self):
self.g = None
def _roll_many(self, n, pins):
"Roll 'n' times a roll of 'pins' pins"
for i in range(n):
self.g.roll(pins)
d... | Refactor rolling a spare in tests | [Python] Refactor rolling a spare in tests
| Python | mit | JesusMtnez/devexperto-challenge,JesusMtnez/devexperto-challenge | import unittest
from game import Game
class BowlingGameTest(unittest.TestCase):
def setUp(self):
self.g = Game()
def tearDown(self):
self.g = None
def _roll_many(self, n, pins):
"Roll 'n' times a roll of 'pins' pins"
for i in range(n):
self.g.roll(pins)
d... | import unittest
from game import Game
class BowlingGameTest(unittest.TestCase):
def setUp(self):
self.g = Game()
def tearDown(self):
self.g = None
def _roll_many(self, n, pins):
"Roll 'n' times a roll of 'pins' pins"
for i in range(n):
self.g.roll(pins)
d... | <commit_before>import unittest
from game import Game
class BowlingGameTest(unittest.TestCase):
def setUp(self):
self.g = Game()
def tearDown(self):
self.g = None
def _roll_many(self, n, pins):
"Roll 'n' times a roll of 'pins' pins"
for i in range(n):
self.g.ro... | import unittest
from game import Game
class BowlingGameTest(unittest.TestCase):
def setUp(self):
self.g = Game()
def tearDown(self):
self.g = None
def _roll_many(self, n, pins):
"Roll 'n' times a roll of 'pins' pins"
for i in range(n):
self.g.roll(pins)
d... | import unittest
from game import Game
class BowlingGameTest(unittest.TestCase):
def setUp(self):
self.g = Game()
def tearDown(self):
self.g = None
def _roll_many(self, n, pins):
"Roll 'n' times a roll of 'pins' pins"
for i in range(n):
self.g.roll(pins)
d... | <commit_before>import unittest
from game import Game
class BowlingGameTest(unittest.TestCase):
def setUp(self):
self.g = Game()
def tearDown(self):
self.g = None
def _roll_many(self, n, pins):
"Roll 'n' times a roll of 'pins' pins"
for i in range(n):
self.g.ro... |
dced68096d5c84c831866cf92e7430df6cf5f477 | src/nodeconductor_saltstack/sharepoint/cost_tracking.py | src/nodeconductor_saltstack/sharepoint/cost_tracking.py | from django.contrib.contenttypes.models import ContentType
from nodeconductor.cost_tracking import CostTrackingBackend
from nodeconductor.cost_tracking.models import DefaultPriceListItem
from .models import SharepointTenant
class Type(object):
USAGE = 'usage'
STORAGE = 'storage'
STORAGE_KEY = '1 MB'
... | from django.contrib.contenttypes.models import ContentType
from nodeconductor.cost_tracking import CostTrackingBackend
from nodeconductor.cost_tracking.models import DefaultPriceListItem
from .models import SharepointTenant
class Type(object):
USAGE = 'usage'
STORAGE = 'storage'
STORAGE_KEY = '1 MB'
... | Fix sharepoint tenant cost tracking | Fix sharepoint tenant cost tracking
- itacloud-6123
| Python | mit | opennode/nodeconductor-saltstack | from django.contrib.contenttypes.models import ContentType
from nodeconductor.cost_tracking import CostTrackingBackend
from nodeconductor.cost_tracking.models import DefaultPriceListItem
from .models import SharepointTenant
class Type(object):
USAGE = 'usage'
STORAGE = 'storage'
STORAGE_KEY = '1 MB'
... | from django.contrib.contenttypes.models import ContentType
from nodeconductor.cost_tracking import CostTrackingBackend
from nodeconductor.cost_tracking.models import DefaultPriceListItem
from .models import SharepointTenant
class Type(object):
USAGE = 'usage'
STORAGE = 'storage'
STORAGE_KEY = '1 MB'
... | <commit_before>from django.contrib.contenttypes.models import ContentType
from nodeconductor.cost_tracking import CostTrackingBackend
from nodeconductor.cost_tracking.models import DefaultPriceListItem
from .models import SharepointTenant
class Type(object):
USAGE = 'usage'
STORAGE = 'storage'
STORAGE_... | from django.contrib.contenttypes.models import ContentType
from nodeconductor.cost_tracking import CostTrackingBackend
from nodeconductor.cost_tracking.models import DefaultPriceListItem
from .models import SharepointTenant
class Type(object):
USAGE = 'usage'
STORAGE = 'storage'
STORAGE_KEY = '1 MB'
... | from django.contrib.contenttypes.models import ContentType
from nodeconductor.cost_tracking import CostTrackingBackend
from nodeconductor.cost_tracking.models import DefaultPriceListItem
from .models import SharepointTenant
class Type(object):
USAGE = 'usage'
STORAGE = 'storage'
STORAGE_KEY = '1 MB'
... | <commit_before>from django.contrib.contenttypes.models import ContentType
from nodeconductor.cost_tracking import CostTrackingBackend
from nodeconductor.cost_tracking.models import DefaultPriceListItem
from .models import SharepointTenant
class Type(object):
USAGE = 'usage'
STORAGE = 'storage'
STORAGE_... |
29fb910695eef3b5d10ffbb914b2d605ae7bf4e2 | setup.py | setup.py | """Package setup configuration.
To Install package, run:
>>> python setup.py install
To install package with a symlink, so that changes to the source files will be immediately available, run:
>>> python setup.py develop
"""
from __future__ import print_function
from setuptools import setup, find_packages
__... | """Package setup configuration.
To Install package, run:
>>> python setup.py install
To install package with a symlink, so that changes to the source files will be immediately available, run:
>>> python setup.py develop
"""
from __future__ import print_function
from setuptools import setup, find_packages
__... | Change the URL where the repository is hosted. | Change the URL where the repository is hosted.
| Python | mit | nicolasbessou/mutabletuple | """Package setup configuration.
To Install package, run:
>>> python setup.py install
To install package with a symlink, so that changes to the source files will be immediately available, run:
>>> python setup.py develop
"""
from __future__ import print_function
from setuptools import setup, find_packages
__... | """Package setup configuration.
To Install package, run:
>>> python setup.py install
To install package with a symlink, so that changes to the source files will be immediately available, run:
>>> python setup.py develop
"""
from __future__ import print_function
from setuptools import setup, find_packages
__... | <commit_before>"""Package setup configuration.
To Install package, run:
>>> python setup.py install
To install package with a symlink, so that changes to the source files will be immediately available, run:
>>> python setup.py develop
"""
from __future__ import print_function
from setuptools import setup, fi... | """Package setup configuration.
To Install package, run:
>>> python setup.py install
To install package with a symlink, so that changes to the source files will be immediately available, run:
>>> python setup.py develop
"""
from __future__ import print_function
from setuptools import setup, find_packages
__... | """Package setup configuration.
To Install package, run:
>>> python setup.py install
To install package with a symlink, so that changes to the source files will be immediately available, run:
>>> python setup.py develop
"""
from __future__ import print_function
from setuptools import setup, find_packages
__... | <commit_before>"""Package setup configuration.
To Install package, run:
>>> python setup.py install
To install package with a symlink, so that changes to the source files will be immediately available, run:
>>> python setup.py develop
"""
from __future__ import print_function
from setuptools import setup, fi... |
1aa2fb37239bb1f7045ad93b5362e90a12216517 | setup.py | setup.py | #!/usr/bin/python
# -*- coding: utf-8 -*-
from setuptools import setup
with open('README.rst') as stream:
long_description = stream.read().decode('utf-8')
setup(
name='pyudev',
version='0.3',
url='http://packages.python.org/pyudev',
author='Sebastian Wiesner',
author_email='lunaryorn@googl... | #!/usr/bin/python
# -*- coding: utf-8 -*-
from setuptools import setup
import udev
with open('README.rst') as stream:
long_description = stream.read().decode('utf-8')
setup(
name='pyudev',
version=udev.__version__,
url='http://packages.python.org/pyudev',
author='Sebastian Wiesner',
author... | Use version from udev module instead of declaring it manually | Use version from udev module instead of declaring it manually
| Python | lgpl-2.1 | mulkieran/pyudev,mulkieran/pyudev,deepakkapoor624/pyudev,deepakkapoor624/pyudev,pyudev/pyudev,mulkieran/pyudev | #!/usr/bin/python
# -*- coding: utf-8 -*-
from setuptools import setup
with open('README.rst') as stream:
long_description = stream.read().decode('utf-8')
setup(
name='pyudev',
version='0.3',
url='http://packages.python.org/pyudev',
author='Sebastian Wiesner',
author_email='lunaryorn@googl... | #!/usr/bin/python
# -*- coding: utf-8 -*-
from setuptools import setup
import udev
with open('README.rst') as stream:
long_description = stream.read().decode('utf-8')
setup(
name='pyudev',
version=udev.__version__,
url='http://packages.python.org/pyudev',
author='Sebastian Wiesner',
author... | <commit_before>#!/usr/bin/python
# -*- coding: utf-8 -*-
from setuptools import setup
with open('README.rst') as stream:
long_description = stream.read().decode('utf-8')
setup(
name='pyudev',
version='0.3',
url='http://packages.python.org/pyudev',
author='Sebastian Wiesner',
author_email='... | #!/usr/bin/python
# -*- coding: utf-8 -*-
from setuptools import setup
import udev
with open('README.rst') as stream:
long_description = stream.read().decode('utf-8')
setup(
name='pyudev',
version=udev.__version__,
url='http://packages.python.org/pyudev',
author='Sebastian Wiesner',
author... | #!/usr/bin/python
# -*- coding: utf-8 -*-
from setuptools import setup
with open('README.rst') as stream:
long_description = stream.read().decode('utf-8')
setup(
name='pyudev',
version='0.3',
url='http://packages.python.org/pyudev',
author='Sebastian Wiesner',
author_email='lunaryorn@googl... | <commit_before>#!/usr/bin/python
# -*- coding: utf-8 -*-
from setuptools import setup
with open('README.rst') as stream:
long_description = stream.read().decode('utf-8')
setup(
name='pyudev',
version='0.3',
url='http://packages.python.org/pyudev',
author='Sebastian Wiesner',
author_email='... |
d0ba20520b69bf561ef71255c526b34c5fd0d2be | setup.py | setup.py | # /setup.py
#
# Installation and setup script for parse-shebang
#
# See /LICENCE.md for Copyright information
"""Installation and setup script for parse-shebang."""
from setuptools import find_packages, setup
setup(name="parse-shebang",
version="0.0.12",
description="""Parse shebangs and return their comp... | # /setup.py
#
# Installation and setup script for parse-shebang
#
# See /LICENCE.md for Copyright information
"""Installation and setup script for parse-shebang."""
from setuptools import find_packages, setup
setup(name="parse-shebang",
version="0.0.13",
description="""Parse shebangs and return their comp... | Bump version: 0.0.12 -> 0.0.13 | Bump version: 0.0.12 -> 0.0.13
[ci skip]
| Python | mit | polysquare/python-parse-shebang | # /setup.py
#
# Installation and setup script for parse-shebang
#
# See /LICENCE.md for Copyright information
"""Installation and setup script for parse-shebang."""
from setuptools import find_packages, setup
setup(name="parse-shebang",
version="0.0.12",
description="""Parse shebangs and return their comp... | # /setup.py
#
# Installation and setup script for parse-shebang
#
# See /LICENCE.md for Copyright information
"""Installation and setup script for parse-shebang."""
from setuptools import find_packages, setup
setup(name="parse-shebang",
version="0.0.13",
description="""Parse shebangs and return their comp... | <commit_before># /setup.py
#
# Installation and setup script for parse-shebang
#
# See /LICENCE.md for Copyright information
"""Installation and setup script for parse-shebang."""
from setuptools import find_packages, setup
setup(name="parse-shebang",
version="0.0.12",
description="""Parse shebangs and re... | # /setup.py
#
# Installation and setup script for parse-shebang
#
# See /LICENCE.md for Copyright information
"""Installation and setup script for parse-shebang."""
from setuptools import find_packages, setup
setup(name="parse-shebang",
version="0.0.13",
description="""Parse shebangs and return their comp... | # /setup.py
#
# Installation and setup script for parse-shebang
#
# See /LICENCE.md for Copyright information
"""Installation and setup script for parse-shebang."""
from setuptools import find_packages, setup
setup(name="parse-shebang",
version="0.0.12",
description="""Parse shebangs and return their comp... | <commit_before># /setup.py
#
# Installation and setup script for parse-shebang
#
# See /LICENCE.md for Copyright information
"""Installation and setup script for parse-shebang."""
from setuptools import find_packages, setup
setup(name="parse-shebang",
version="0.0.12",
description="""Parse shebangs and re... |
691e25dbc258d94a80a729924d76aa10a693c08e | setup.py | setup.py | #!/usr/bin/env python
from setuptools import setup, find_packages
from dreambeam import __version__
setup(name='dreamBeam',
version=__version__,
description='Measurement equation framework for radio interferometry.',
author='Tobia D. Carozzi',
author_email='tobia.carozzi@chalmers.se',
pa... | #!/usr/bin/env python
from setuptools import setup, find_packages
from dreambeam import __version__
setup(name='dreamBeam',
version=__version__,
description='Measurement equation framework for radio interferometry.',
author='Tobia D. Carozzi',
author_email='tobia.carozzi@chalmers.se',
pa... | Include config files in the pip install | Include config files in the pip install
| Python | isc | 2baOrNot2ba/dreamBeam,2baOrNot2ba/dreamBeam | #!/usr/bin/env python
from setuptools import setup, find_packages
from dreambeam import __version__
setup(name='dreamBeam',
version=__version__,
description='Measurement equation framework for radio interferometry.',
author='Tobia D. Carozzi',
author_email='tobia.carozzi@chalmers.se',
pa... | #!/usr/bin/env python
from setuptools import setup, find_packages
from dreambeam import __version__
setup(name='dreamBeam',
version=__version__,
description='Measurement equation framework for radio interferometry.',
author='Tobia D. Carozzi',
author_email='tobia.carozzi@chalmers.se',
pa... | <commit_before>#!/usr/bin/env python
from setuptools import setup, find_packages
from dreambeam import __version__
setup(name='dreamBeam',
version=__version__,
description='Measurement equation framework for radio interferometry.',
author='Tobia D. Carozzi',
author_email='tobia.carozzi@chalmer... | #!/usr/bin/env python
from setuptools import setup, find_packages
from dreambeam import __version__
setup(name='dreamBeam',
version=__version__,
description='Measurement equation framework for radio interferometry.',
author='Tobia D. Carozzi',
author_email='tobia.carozzi@chalmers.se',
pa... | #!/usr/bin/env python
from setuptools import setup, find_packages
from dreambeam import __version__
setup(name='dreamBeam',
version=__version__,
description='Measurement equation framework for radio interferometry.',
author='Tobia D. Carozzi',
author_email='tobia.carozzi@chalmers.se',
pa... | <commit_before>#!/usr/bin/env python
from setuptools import setup, find_packages
from dreambeam import __version__
setup(name='dreamBeam',
version=__version__,
description='Measurement equation framework for radio interferometry.',
author='Tobia D. Carozzi',
author_email='tobia.carozzi@chalmer... |
cca830c874741df7456449a6901d367a48d79392 | setup.py | setup.py | from setuptools import setup, find_packages
install_requires = [
'dill==0.2.5',
'easydict==1.6',
'h5py==2.6.0',
'jsonpickle==0.9.3',
'Keras==1.2.0',
'nflgame==1.2.20',
'numpy==1.11.2',
'pandas==0.19.1',
'scikit-learn==0.18.1',
'scipy==0.18.1',
'tensorflow==0.12.0rc1',
'... | from setuptools import setup, find_packages
install_requires = [
'dill==0.2.5',
'easydict==1.6',
'h5py==2.6.0',
'jsonpickle==0.9.3',
'Keras==1.2.0',
'nflgame==1.2.20',
'numpy==1.11.2',
'pandas==0.19.1',
'scikit-learn==0.18.1',
'scipy==0.18.1',
'tensorflow==0.12.0rc1',
'... | Remove README from pypi descriptioj | Remove README from pypi descriptioj
| Python | mit | kahnjw/wincast | from setuptools import setup, find_packages
install_requires = [
'dill==0.2.5',
'easydict==1.6',
'h5py==2.6.0',
'jsonpickle==0.9.3',
'Keras==1.2.0',
'nflgame==1.2.20',
'numpy==1.11.2',
'pandas==0.19.1',
'scikit-learn==0.18.1',
'scipy==0.18.1',
'tensorflow==0.12.0rc1',
'... | from setuptools import setup, find_packages
install_requires = [
'dill==0.2.5',
'easydict==1.6',
'h5py==2.6.0',
'jsonpickle==0.9.3',
'Keras==1.2.0',
'nflgame==1.2.20',
'numpy==1.11.2',
'pandas==0.19.1',
'scikit-learn==0.18.1',
'scipy==0.18.1',
'tensorflow==0.12.0rc1',
'... | <commit_before>from setuptools import setup, find_packages
install_requires = [
'dill==0.2.5',
'easydict==1.6',
'h5py==2.6.0',
'jsonpickle==0.9.3',
'Keras==1.2.0',
'nflgame==1.2.20',
'numpy==1.11.2',
'pandas==0.19.1',
'scikit-learn==0.18.1',
'scipy==0.18.1',
'tensorflow==0.... | from setuptools import setup, find_packages
install_requires = [
'dill==0.2.5',
'easydict==1.6',
'h5py==2.6.0',
'jsonpickle==0.9.3',
'Keras==1.2.0',
'nflgame==1.2.20',
'numpy==1.11.2',
'pandas==0.19.1',
'scikit-learn==0.18.1',
'scipy==0.18.1',
'tensorflow==0.12.0rc1',
'... | from setuptools import setup, find_packages
install_requires = [
'dill==0.2.5',
'easydict==1.6',
'h5py==2.6.0',
'jsonpickle==0.9.3',
'Keras==1.2.0',
'nflgame==1.2.20',
'numpy==1.11.2',
'pandas==0.19.1',
'scikit-learn==0.18.1',
'scipy==0.18.1',
'tensorflow==0.12.0rc1',
'... | <commit_before>from setuptools import setup, find_packages
install_requires = [
'dill==0.2.5',
'easydict==1.6',
'h5py==2.6.0',
'jsonpickle==0.9.3',
'Keras==1.2.0',
'nflgame==1.2.20',
'numpy==1.11.2',
'pandas==0.19.1',
'scikit-learn==0.18.1',
'scipy==0.18.1',
'tensorflow==0.... |
9f744a84300bf9f7d88db952863005b4765528fd | setup.py | setup.py | from setuptools import setup, find_packages
import sys, os
here = os.path.abspath(os.path.dirname(__file__))
try:
README = open(os.path.join(here, 'README.rst')).read()
except IOError:
README = ''
version = "0.0.1"
setup(name='backlash',
version=version,
description="standalone version of the Wer... | from setuptools import setup, find_packages
import sys, os
here = os.path.abspath(os.path.dirname(__file__))
try:
README = open(os.path.join(here, 'README.rst')).read()
except IOError:
README = ''
version = "0.0.1a"
setup(name='backlash',
version=version,
description="Standalone WebOb port of the... | Prepare for making alpha release | Prepare for making alpha release
| Python | mit | TurboGears/backlash,TurboGears/backlash | from setuptools import setup, find_packages
import sys, os
here = os.path.abspath(os.path.dirname(__file__))
try:
README = open(os.path.join(here, 'README.rst')).read()
except IOError:
README = ''
version = "0.0.1"
setup(name='backlash',
version=version,
description="standalone version of the Wer... | from setuptools import setup, find_packages
import sys, os
here = os.path.abspath(os.path.dirname(__file__))
try:
README = open(os.path.join(here, 'README.rst')).read()
except IOError:
README = ''
version = "0.0.1a"
setup(name='backlash',
version=version,
description="Standalone WebOb port of the... | <commit_before>from setuptools import setup, find_packages
import sys, os
here = os.path.abspath(os.path.dirname(__file__))
try:
README = open(os.path.join(here, 'README.rst')).read()
except IOError:
README = ''
version = "0.0.1"
setup(name='backlash',
version=version,
description="standalone ver... | from setuptools import setup, find_packages
import sys, os
here = os.path.abspath(os.path.dirname(__file__))
try:
README = open(os.path.join(here, 'README.rst')).read()
except IOError:
README = ''
version = "0.0.1a"
setup(name='backlash',
version=version,
description="Standalone WebOb port of the... | from setuptools import setup, find_packages
import sys, os
here = os.path.abspath(os.path.dirname(__file__))
try:
README = open(os.path.join(here, 'README.rst')).read()
except IOError:
README = ''
version = "0.0.1"
setup(name='backlash',
version=version,
description="standalone version of the Wer... | <commit_before>from setuptools import setup, find_packages
import sys, os
here = os.path.abspath(os.path.dirname(__file__))
try:
README = open(os.path.join(here, 'README.rst')).read()
except IOError:
README = ''
version = "0.0.1"
setup(name='backlash',
version=version,
description="standalone ver... |
e78b832fe1ce10a682be836c0752c0674087b5c4 | setup.py | setup.py | #!/usr/bin/env python
"""Pygme: Python Gaussian ModElling - a python implementation of the Multi-Gaussian Expansion Method.
Fit MGE models, and Generate initial conditions for N body simulations
See Monnet et al. 1992 and Emsellem et al. 1994 for more details
"""
## Distribution for the PyMGE packag... | #!/usr/bin/env python
"""Pygme: Python Gaussian ModElling - a python implementation of the Multi-Gaussian Expansion Method.
Fit MGE models, and Generate initial conditions for N body simulations
See Monnet et al. 1992 and Emsellem et al. 1994 for more details
"""
## Distribution for the PyMGE packag... | Introduce PCC transformation plus adding new plotting options | Introduce PCC transformation plus adding new plotting options
| Python | bsd-3-clause | emsellem/pygme | #!/usr/bin/env python
"""Pygme: Python Gaussian ModElling - a python implementation of the Multi-Gaussian Expansion Method.
Fit MGE models, and Generate initial conditions for N body simulations
See Monnet et al. 1992 and Emsellem et al. 1994 for more details
"""
## Distribution for the PyMGE packag... | #!/usr/bin/env python
"""Pygme: Python Gaussian ModElling - a python implementation of the Multi-Gaussian Expansion Method.
Fit MGE models, and Generate initial conditions for N body simulations
See Monnet et al. 1992 and Emsellem et al. 1994 for more details
"""
## Distribution for the PyMGE packag... | <commit_before>#!/usr/bin/env python
"""Pygme: Python Gaussian ModElling - a python implementation of the Multi-Gaussian Expansion Method.
Fit MGE models, and Generate initial conditions for N body simulations
See Monnet et al. 1992 and Emsellem et al. 1994 for more details
"""
## Distribution for t... | #!/usr/bin/env python
"""Pygme: Python Gaussian ModElling - a python implementation of the Multi-Gaussian Expansion Method.
Fit MGE models, and Generate initial conditions for N body simulations
See Monnet et al. 1992 and Emsellem et al. 1994 for more details
"""
## Distribution for the PyMGE packag... | #!/usr/bin/env python
"""Pygme: Python Gaussian ModElling - a python implementation of the Multi-Gaussian Expansion Method.
Fit MGE models, and Generate initial conditions for N body simulations
See Monnet et al. 1992 and Emsellem et al. 1994 for more details
"""
## Distribution for the PyMGE packag... | <commit_before>#!/usr/bin/env python
"""Pygme: Python Gaussian ModElling - a python implementation of the Multi-Gaussian Expansion Method.
Fit MGE models, and Generate initial conditions for N body simulations
See Monnet et al. 1992 and Emsellem et al. 1994 for more details
"""
## Distribution for t... |
08347214e93d9cfe9ad53a528aea3428afeb49a0 | setup.py | setup.py | from setuptools import setup
setup(
name='pyretry',
version="0.9",
description='Separate your retry logic from your business logic',
author='Bob Renwick',
author_email='bob.renwick@gmail.com',
url='https://github.com/bobbyrenwick/pyretry',
packages=['pyretry'],
classifiers=(
'D... | from setuptools import setup
setup(
name='pyretry',
version="0.9",
description='Separate your retry logic from your business logic',
author='Bob Renwick',
author_email='bob.renwick@gmail.com',
url='https://github.com/bobbyrenwick/pyretry',
packages=['pyretry'],
tests_require=[
... | Add missing `tests_require` for `mock` | Add missing `tests_require` for `mock`
| Python | mit | bobbyrenwick/pyretry | from setuptools import setup
setup(
name='pyretry',
version="0.9",
description='Separate your retry logic from your business logic',
author='Bob Renwick',
author_email='bob.renwick@gmail.com',
url='https://github.com/bobbyrenwick/pyretry',
packages=['pyretry'],
classifiers=(
'D... | from setuptools import setup
setup(
name='pyretry',
version="0.9",
description='Separate your retry logic from your business logic',
author='Bob Renwick',
author_email='bob.renwick@gmail.com',
url='https://github.com/bobbyrenwick/pyretry',
packages=['pyretry'],
tests_require=[
... | <commit_before>from setuptools import setup
setup(
name='pyretry',
version="0.9",
description='Separate your retry logic from your business logic',
author='Bob Renwick',
author_email='bob.renwick@gmail.com',
url='https://github.com/bobbyrenwick/pyretry',
packages=['pyretry'],
classifie... | from setuptools import setup
setup(
name='pyretry',
version="0.9",
description='Separate your retry logic from your business logic',
author='Bob Renwick',
author_email='bob.renwick@gmail.com',
url='https://github.com/bobbyrenwick/pyretry',
packages=['pyretry'],
tests_require=[
... | from setuptools import setup
setup(
name='pyretry',
version="0.9",
description='Separate your retry logic from your business logic',
author='Bob Renwick',
author_email='bob.renwick@gmail.com',
url='https://github.com/bobbyrenwick/pyretry',
packages=['pyretry'],
classifiers=(
'D... | <commit_before>from setuptools import setup
setup(
name='pyretry',
version="0.9",
description='Separate your retry logic from your business logic',
author='Bob Renwick',
author_email='bob.renwick@gmail.com',
url='https://github.com/bobbyrenwick/pyretry',
packages=['pyretry'],
classifie... |
fe9a7c9bb597460062fdf9987b98a3a085b2ad48 | setup.py | setup.py | #!/usr/bin/env python
import os
from setuptools import setup
with open(os.path.join(os.path.dirname(__file__), 'README.rst'), "r") as readme_file:
readme = readme_file.read()
setup(
name = "outpan",
version = "0.1.3",
description = "Easily use Outpan.com API to get product info from their barcode",
... | #!/usr/bin/env python
import os
from setuptools import setup
with open(os.path.join(os.path.dirname(__file__), 'README.rst'), "r") as readme_file:
readme = readme_file.read()
setup(
name = "outpan",
version = "0.1.3",
description = "Easily use Outpan.com API to get product info from their barcode",
... | Make it possible to parse command line arguments directly | Make it possible to parse command line arguments directly
Using parse_this awesome module we can create the whole parser needed to
use the OutpanAPI class from the command line
| Python | mit | bertrandvidal/outpan_api | #!/usr/bin/env python
import os
from setuptools import setup
with open(os.path.join(os.path.dirname(__file__), 'README.rst'), "r") as readme_file:
readme = readme_file.read()
setup(
name = "outpan",
version = "0.1.3",
description = "Easily use Outpan.com API to get product info from their barcode",
... | #!/usr/bin/env python
import os
from setuptools import setup
with open(os.path.join(os.path.dirname(__file__), 'README.rst'), "r") as readme_file:
readme = readme_file.read()
setup(
name = "outpan",
version = "0.1.3",
description = "Easily use Outpan.com API to get product info from their barcode",
... | <commit_before>#!/usr/bin/env python
import os
from setuptools import setup
with open(os.path.join(os.path.dirname(__file__), 'README.rst'), "r") as readme_file:
readme = readme_file.read()
setup(
name = "outpan",
version = "0.1.3",
description = "Easily use Outpan.com API to get product info from the... | #!/usr/bin/env python
import os
from setuptools import setup
with open(os.path.join(os.path.dirname(__file__), 'README.rst'), "r") as readme_file:
readme = readme_file.read()
setup(
name = "outpan",
version = "0.1.3",
description = "Easily use Outpan.com API to get product info from their barcode",
... | #!/usr/bin/env python
import os
from setuptools import setup
with open(os.path.join(os.path.dirname(__file__), 'README.rst'), "r") as readme_file:
readme = readme_file.read()
setup(
name = "outpan",
version = "0.1.3",
description = "Easily use Outpan.com API to get product info from their barcode",
... | <commit_before>#!/usr/bin/env python
import os
from setuptools import setup
with open(os.path.join(os.path.dirname(__file__), 'README.rst'), "r") as readme_file:
readme = readme_file.read()
setup(
name = "outpan",
version = "0.1.3",
description = "Easily use Outpan.com API to get product info from the... |
aba7dce93a4e13bba9b6fed6b31bf2d370fd54bc | setup.py | setup.py | from setuptools import setup
from setuptools.command.test import test as TestCommand
from setuptools import setup
from hbite import VERSION as version
class Tox(TestCommand):
def finalize_options(self):
TestCommand.finalize_options(self)
self.test_args = []
self.test_suite = True
de... | import sys
from setuptools.command.test import test as TestCommand
from setuptools import setup
from hbite import VERSION as version
class Tox(TestCommand):
def finalize_options(self):
TestCommand.finalize_options(self)
self.test_args = []
self.test_suite = True
def run_tests(self):... | Fix flake8 and missing sys module | Fix flake8 and missing sys module
| Python | apache-2.0 | ravwojdyla/hbite,ravwojdyla/hbite | from setuptools import setup
from setuptools.command.test import test as TestCommand
from setuptools import setup
from hbite import VERSION as version
class Tox(TestCommand):
def finalize_options(self):
TestCommand.finalize_options(self)
self.test_args = []
self.test_suite = True
de... | import sys
from setuptools.command.test import test as TestCommand
from setuptools import setup
from hbite import VERSION as version
class Tox(TestCommand):
def finalize_options(self):
TestCommand.finalize_options(self)
self.test_args = []
self.test_suite = True
def run_tests(self):... | <commit_before>from setuptools import setup
from setuptools.command.test import test as TestCommand
from setuptools import setup
from hbite import VERSION as version
class Tox(TestCommand):
def finalize_options(self):
TestCommand.finalize_options(self)
self.test_args = []
self.test_suite... | import sys
from setuptools.command.test import test as TestCommand
from setuptools import setup
from hbite import VERSION as version
class Tox(TestCommand):
def finalize_options(self):
TestCommand.finalize_options(self)
self.test_args = []
self.test_suite = True
def run_tests(self):... | from setuptools import setup
from setuptools.command.test import test as TestCommand
from setuptools import setup
from hbite import VERSION as version
class Tox(TestCommand):
def finalize_options(self):
TestCommand.finalize_options(self)
self.test_args = []
self.test_suite = True
de... | <commit_before>from setuptools import setup
from setuptools.command.test import test as TestCommand
from setuptools import setup
from hbite import VERSION as version
class Tox(TestCommand):
def finalize_options(self):
TestCommand.finalize_options(self)
self.test_args = []
self.test_suite... |
259dab25fb2aceb3b5fa229eb41d3eacf8f1c71c | nanomon/scheduler/__init__.py | nanomon/scheduler/__init__.py | import base64
import json
import Queue
import time
import logging
from boto import sns
from boto import sqs
from boto.sqs.message import Message, RawMessage
from nanomon.utils import yaml_includes
from nanomon.message import NanoMessage
from nanomon.queue import QueueWorker
from nanomon.queue.backends.sns_sqs import ... | import base64
import json
import Queue
import time
import logging
from boto import sns
from boto import sqs
from boto.sqs.message import Message, RawMessage
from nanomon.utils import yaml_includes
from nanomon.message import NanoMessage
from nanomon.queue import QueueWorker
from nanomon.queue.backends.sns_sqs import ... | Update for new node definition syntax | Update for new node definition syntax
| Python | bsd-2-clause | cloudtools/nymms | import base64
import json
import Queue
import time
import logging
from boto import sns
from boto import sqs
from boto.sqs.message import Message, RawMessage
from nanomon.utils import yaml_includes
from nanomon.message import NanoMessage
from nanomon.queue import QueueWorker
from nanomon.queue.backends.sns_sqs import ... | import base64
import json
import Queue
import time
import logging
from boto import sns
from boto import sqs
from boto.sqs.message import Message, RawMessage
from nanomon.utils import yaml_includes
from nanomon.message import NanoMessage
from nanomon.queue import QueueWorker
from nanomon.queue.backends.sns_sqs import ... | <commit_before>import base64
import json
import Queue
import time
import logging
from boto import sns
from boto import sqs
from boto.sqs.message import Message, RawMessage
from nanomon.utils import yaml_includes
from nanomon.message import NanoMessage
from nanomon.queue import QueueWorker
from nanomon.queue.backends.... | import base64
import json
import Queue
import time
import logging
from boto import sns
from boto import sqs
from boto.sqs.message import Message, RawMessage
from nanomon.utils import yaml_includes
from nanomon.message import NanoMessage
from nanomon.queue import QueueWorker
from nanomon.queue.backends.sns_sqs import ... | import base64
import json
import Queue
import time
import logging
from boto import sns
from boto import sqs
from boto.sqs.message import Message, RawMessage
from nanomon.utils import yaml_includes
from nanomon.message import NanoMessage
from nanomon.queue import QueueWorker
from nanomon.queue.backends.sns_sqs import ... | <commit_before>import base64
import json
import Queue
import time
import logging
from boto import sns
from boto import sqs
from boto.sqs.message import Message, RawMessage
from nanomon.utils import yaml_includes
from nanomon.message import NanoMessage
from nanomon.queue import QueueWorker
from nanomon.queue.backends.... |
c22873e2f213ff81e9bd44b37aeb9d66418c5b90 | setup.py | setup.py | #!/usr/bin/env python
"""setup.py for get_user_headers"""
__author__ = "Stephan Sokolow (deitarion/SSokolow)"
__license__ = "MIT"
import sys
if __name__ == '__main__' and 'flake8' not in sys.modules:
# FIXME: Why does this segfault flake8 under PyPy?
from setuptools import setup
setup(
name="get... | #!/usr/bin/env python
"""setup.py for get_user_headers"""
__author__ = "Stephan Sokolow (deitarion/SSokolow)"
__license__ = "MIT"
import sys
if __name__ == '__main__' and 'flake8' not in sys.modules:
# FIXME: Why does this segfault flake8 under PyPy?
from setuptools import setup
setup(
name="get... | Adjust phrasing of PyPI long_description | Adjust phrasing of PyPI long_description
| Python | mit | ssokolow/get_user_headers | #!/usr/bin/env python
"""setup.py for get_user_headers"""
__author__ = "Stephan Sokolow (deitarion/SSokolow)"
__license__ = "MIT"
import sys
if __name__ == '__main__' and 'flake8' not in sys.modules:
# FIXME: Why does this segfault flake8 under PyPy?
from setuptools import setup
setup(
name="get... | #!/usr/bin/env python
"""setup.py for get_user_headers"""
__author__ = "Stephan Sokolow (deitarion/SSokolow)"
__license__ = "MIT"
import sys
if __name__ == '__main__' and 'flake8' not in sys.modules:
# FIXME: Why does this segfault flake8 under PyPy?
from setuptools import setup
setup(
name="get... | <commit_before>#!/usr/bin/env python
"""setup.py for get_user_headers"""
__author__ = "Stephan Sokolow (deitarion/SSokolow)"
__license__ = "MIT"
import sys
if __name__ == '__main__' and 'flake8' not in sys.modules:
# FIXME: Why does this segfault flake8 under PyPy?
from setuptools import setup
setup(
... | #!/usr/bin/env python
"""setup.py for get_user_headers"""
__author__ = "Stephan Sokolow (deitarion/SSokolow)"
__license__ = "MIT"
import sys
if __name__ == '__main__' and 'flake8' not in sys.modules:
# FIXME: Why does this segfault flake8 under PyPy?
from setuptools import setup
setup(
name="get... | #!/usr/bin/env python
"""setup.py for get_user_headers"""
__author__ = "Stephan Sokolow (deitarion/SSokolow)"
__license__ = "MIT"
import sys
if __name__ == '__main__' and 'flake8' not in sys.modules:
# FIXME: Why does this segfault flake8 under PyPy?
from setuptools import setup
setup(
name="get... | <commit_before>#!/usr/bin/env python
"""setup.py for get_user_headers"""
__author__ = "Stephan Sokolow (deitarion/SSokolow)"
__license__ = "MIT"
import sys
if __name__ == '__main__' and 'flake8' not in sys.modules:
# FIXME: Why does this segfault flake8 under PyPy?
from setuptools import setup
setup(
... |
38349308a5848883a58257c080f3563c806c3db0 | setup.py | setup.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from setuptools import setup, find_packages
import materializecssform
setup(
name='django-materializecss-form',
version=materializecssform.__version__,
packages=find_packages(),
author="Florent CLAPIÉ",
author_email="clapie.florent@gmail.... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from setuptools import setup, find_packages
import materializecssform
setup(
name='django-materializecss-form',
version=materializecssform.__version__,
packages=find_packages(),
author="Florent CLAPIÉ",
author_email="clapie.florent@gmail.... | Fix template loading when installed with easy_install | Fix template loading when installed with easy_install
If you install a package using `easy_install` or `setup.py install`, it will default to installing as a zipped egg. Django is by default unable to find templates inside zipped archives and even with an egg template loader enabled it's very slow as it involves unpac... | Python | mit | florent1933/django-materializecss-form,florent1933/django-materializecss-form | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from setuptools import setup, find_packages
import materializecssform
setup(
name='django-materializecss-form',
version=materializecssform.__version__,
packages=find_packages(),
author="Florent CLAPIÉ",
author_email="clapie.florent@gmail.... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from setuptools import setup, find_packages
import materializecssform
setup(
name='django-materializecss-form',
version=materializecssform.__version__,
packages=find_packages(),
author="Florent CLAPIÉ",
author_email="clapie.florent@gmail.... | <commit_before>#!/usr/bin/env python
# -*- coding: utf-8 -*-
from setuptools import setup, find_packages
import materializecssform
setup(
name='django-materializecss-form',
version=materializecssform.__version__,
packages=find_packages(),
author="Florent CLAPIÉ",
author_email="clapie... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from setuptools import setup, find_packages
import materializecssform
setup(
name='django-materializecss-form',
version=materializecssform.__version__,
packages=find_packages(),
author="Florent CLAPIÉ",
author_email="clapie.florent@gmail.... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from setuptools import setup, find_packages
import materializecssform
setup(
name='django-materializecss-form',
version=materializecssform.__version__,
packages=find_packages(),
author="Florent CLAPIÉ",
author_email="clapie.florent@gmail.... | <commit_before>#!/usr/bin/env python
# -*- coding: utf-8 -*-
from setuptools import setup, find_packages
import materializecssform
setup(
name='django-materializecss-form',
version=materializecssform.__version__,
packages=find_packages(),
author="Florent CLAPIÉ",
author_email="clapie... |
134bcc0a0f1fefb7afbcef1e54dfa7c1581f9193 | setup.py | setup.py | #!/usr/bin/env python
from setuptools import setup
setup(
name='django-longform',
version='0.1.1',
description='A Django application for longform blogging.',
author='Martey Dodoo',
author_email='django-longform@marteydodoo.com',
url='https://github.com/martey/django-longform',
license='MIT... | #!/usr/bin/env python
from setuptools import setup
setup(
name='django-longform',
version='0.1.2',
description='A Django application for longform blogging.',
author='Martey Dodoo',
author_email='django-longform@marteydodoo.com',
url='https://github.com/martey/django-longform',
license='MIT... | Make sure `longform` dir is properly installed. | Make sure `longform` dir is properly installed.
I am officially *the worst* at packaging.
| Python | mit | martey/django-longform | #!/usr/bin/env python
from setuptools import setup
setup(
name='django-longform',
version='0.1.1',
description='A Django application for longform blogging.',
author='Martey Dodoo',
author_email='django-longform@marteydodoo.com',
url='https://github.com/martey/django-longform',
license='MIT... | #!/usr/bin/env python
from setuptools import setup
setup(
name='django-longform',
version='0.1.2',
description='A Django application for longform blogging.',
author='Martey Dodoo',
author_email='django-longform@marteydodoo.com',
url='https://github.com/martey/django-longform',
license='MIT... | <commit_before>#!/usr/bin/env python
from setuptools import setup
setup(
name='django-longform',
version='0.1.1',
description='A Django application for longform blogging.',
author='Martey Dodoo',
author_email='django-longform@marteydodoo.com',
url='https://github.com/martey/django-longform',
... | #!/usr/bin/env python
from setuptools import setup
setup(
name='django-longform',
version='0.1.2',
description='A Django application for longform blogging.',
author='Martey Dodoo',
author_email='django-longform@marteydodoo.com',
url='https://github.com/martey/django-longform',
license='MIT... | #!/usr/bin/env python
from setuptools import setup
setup(
name='django-longform',
version='0.1.1',
description='A Django application for longform blogging.',
author='Martey Dodoo',
author_email='django-longform@marteydodoo.com',
url='https://github.com/martey/django-longform',
license='MIT... | <commit_before>#!/usr/bin/env python
from setuptools import setup
setup(
name='django-longform',
version='0.1.1',
description='A Django application for longform blogging.',
author='Martey Dodoo',
author_email='django-longform@marteydodoo.com',
url='https://github.com/martey/django-longform',
... |
e118e493122726239c0f610b5da1c2b9c0765cdb | setup.py | setup.py | from setuptools import setup, find_packages
setup(
name='Matador',
version='0.0.1',
author='Owen Campbell',
author_email='owen.campbell@empiria.co.uk',
entry_points={
'console_scripts': [
'matador = core.management:hello',
],
},
url='http://www.empiria.co.uk',
... | from setuptools import setup, find_packages
setup(
name='Matador',
version='0.0.1',
author='Owen Campbell',
author_email='owen.campbell@empiria.co.uk',
entry_points={
'console_scripts': [
'matador = core.management:execute_command',
],
},
url='http://www.empiria.... | Add correct function to script endpoint | Add correct function to script endpoint
| Python | mit | Empiria/matador | from setuptools import setup, find_packages
setup(
name='Matador',
version='0.0.1',
author='Owen Campbell',
author_email='owen.campbell@empiria.co.uk',
entry_points={
'console_scripts': [
'matador = core.management:hello',
],
},
url='http://www.empiria.co.uk',
... | from setuptools import setup, find_packages
setup(
name='Matador',
version='0.0.1',
author='Owen Campbell',
author_email='owen.campbell@empiria.co.uk',
entry_points={
'console_scripts': [
'matador = core.management:execute_command',
],
},
url='http://www.empiria.... | <commit_before>from setuptools import setup, find_packages
setup(
name='Matador',
version='0.0.1',
author='Owen Campbell',
author_email='owen.campbell@empiria.co.uk',
entry_points={
'console_scripts': [
'matador = core.management:hello',
],
},
url='http://www.emp... | from setuptools import setup, find_packages
setup(
name='Matador',
version='0.0.1',
author='Owen Campbell',
author_email='owen.campbell@empiria.co.uk',
entry_points={
'console_scripts': [
'matador = core.management:execute_command',
],
},
url='http://www.empiria.... | from setuptools import setup, find_packages
setup(
name='Matador',
version='0.0.1',
author='Owen Campbell',
author_email='owen.campbell@empiria.co.uk',
entry_points={
'console_scripts': [
'matador = core.management:hello',
],
},
url='http://www.empiria.co.uk',
... | <commit_before>from setuptools import setup, find_packages
setup(
name='Matador',
version='0.0.1',
author='Owen Campbell',
author_email='owen.campbell@empiria.co.uk',
entry_points={
'console_scripts': [
'matador = core.management:hello',
],
},
url='http://www.emp... |
ba9c55206b814d580965fb305c23fdb01c99af7d | setup.py | setup.py | from distutils.core import setup
setup(
name = 'dp2ppgen',
packages = ['dp2ppgen'], # this must be the same as the name above
version = '0.1',
description = 'Translates pgdp.org formatted text files into ppgen syntax.',
author = 'David Maranhao',
author_email = 'david.maranhao@gmail.com',
url = 'https://g... | from distutils.core import setup
setup(
name = 'dp2ppgen',
packages = ['dp2ppgen'], # this must be the same as the name above
version = '0.1',
description = 'Translates pgdp.org formatted text files into ppgen syntax.',
author = 'David Maranhao',
author_email = 'david.maranhao@gmail.com',
url = 'https://g... | Update keywords, add 0.1 tag | Update keywords, add 0.1 tag
| Python | mit | davem2/dp2ppgen | from distutils.core import setup
setup(
name = 'dp2ppgen',
packages = ['dp2ppgen'], # this must be the same as the name above
version = '0.1',
description = 'Translates pgdp.org formatted text files into ppgen syntax.',
author = 'David Maranhao',
author_email = 'david.maranhao@gmail.com',
url = 'https://g... | from distutils.core import setup
setup(
name = 'dp2ppgen',
packages = ['dp2ppgen'], # this must be the same as the name above
version = '0.1',
description = 'Translates pgdp.org formatted text files into ppgen syntax.',
author = 'David Maranhao',
author_email = 'david.maranhao@gmail.com',
url = 'https://g... | <commit_before>from distutils.core import setup
setup(
name = 'dp2ppgen',
packages = ['dp2ppgen'], # this must be the same as the name above
version = '0.1',
description = 'Translates pgdp.org formatted text files into ppgen syntax.',
author = 'David Maranhao',
author_email = 'david.maranhao@gmail.com',
u... | from distutils.core import setup
setup(
name = 'dp2ppgen',
packages = ['dp2ppgen'], # this must be the same as the name above
version = '0.1',
description = 'Translates pgdp.org formatted text files into ppgen syntax.',
author = 'David Maranhao',
author_email = 'david.maranhao@gmail.com',
url = 'https://g... | from distutils.core import setup
setup(
name = 'dp2ppgen',
packages = ['dp2ppgen'], # this must be the same as the name above
version = '0.1',
description = 'Translates pgdp.org formatted text files into ppgen syntax.',
author = 'David Maranhao',
author_email = 'david.maranhao@gmail.com',
url = 'https://g... | <commit_before>from distutils.core import setup
setup(
name = 'dp2ppgen',
packages = ['dp2ppgen'], # this must be the same as the name above
version = '0.1',
description = 'Translates pgdp.org formatted text files into ppgen syntax.',
author = 'David Maranhao',
author_email = 'david.maranhao@gmail.com',
u... |
d7688948f05366e278f67d72646a05f7985d4cfa | setup.py | setup.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
#
# Copyright 2012 ShopWiki
#
# 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 requ... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
#
# Copyright 2012 ShopWiki
#
# 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 requ... | Add all used packages to tests_requires (for Readthedocs) | Add all used packages to tests_requires (for Readthedocs)
| Python | apache-2.0 | patricklaw/clortho | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
#
# Copyright 2012 ShopWiki
#
# 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 requ... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
#
# Copyright 2012 ShopWiki
#
# 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 requ... | <commit_before>#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
#
# Copyright 2012 ShopWiki
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
#
# Copyright 2012 ShopWiki
#
# 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 requ... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
#
# Copyright 2012 ShopWiki
#
# 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 requ... | <commit_before>#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
#
# Copyright 2012 ShopWiki
#
# 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
... |
f7982e2194c096d0020426a02543fea70c69dce7 | tasks.py | tasks.py | import datetime
from google.cloud import storage
from invoke import task
import os
BUCKET_NAME = 'lekcije'
@task
def backup_mysql(ctx):
mysqldump = os.getenv('MYSQLDUMP')
if not mysqldump:
mysqldump = './bin/mysqldump'
user = os.getenv('MYSQL_USER')
password = os.getenv('MYSQL_PASSWORD')
... | import datetime
from google.cloud import storage
from invoke import task
import os
BUCKET_NAME = 'lekcije'
@task
def backup_mysql(ctx):
mysqldump = os.getenv('MYSQLDUMP')
if not mysqldump:
mysqldump = './bin/mysqldump'
user = os.getenv('MYSQL_USER')
password = os.getenv('MYSQL_PASSWORD')
... | Add --quick option to mysqldump | Add --quick option to mysqldump
| Python | mit | oinume/lekcije,oinume/lekcije,oinume/lekcije,oinume/lekcije,oinume/lekcije,oinume/lekcije | import datetime
from google.cloud import storage
from invoke import task
import os
BUCKET_NAME = 'lekcije'
@task
def backup_mysql(ctx):
mysqldump = os.getenv('MYSQLDUMP')
if not mysqldump:
mysqldump = './bin/mysqldump'
user = os.getenv('MYSQL_USER')
password = os.getenv('MYSQL_PASSWORD')
... | import datetime
from google.cloud import storage
from invoke import task
import os
BUCKET_NAME = 'lekcije'
@task
def backup_mysql(ctx):
mysqldump = os.getenv('MYSQLDUMP')
if not mysqldump:
mysqldump = './bin/mysqldump'
user = os.getenv('MYSQL_USER')
password = os.getenv('MYSQL_PASSWORD')
... | <commit_before>import datetime
from google.cloud import storage
from invoke import task
import os
BUCKET_NAME = 'lekcije'
@task
def backup_mysql(ctx):
mysqldump = os.getenv('MYSQLDUMP')
if not mysqldump:
mysqldump = './bin/mysqldump'
user = os.getenv('MYSQL_USER')
password = os.getenv('MYSQL_... | import datetime
from google.cloud import storage
from invoke import task
import os
BUCKET_NAME = 'lekcije'
@task
def backup_mysql(ctx):
mysqldump = os.getenv('MYSQLDUMP')
if not mysqldump:
mysqldump = './bin/mysqldump'
user = os.getenv('MYSQL_USER')
password = os.getenv('MYSQL_PASSWORD')
... | import datetime
from google.cloud import storage
from invoke import task
import os
BUCKET_NAME = 'lekcije'
@task
def backup_mysql(ctx):
mysqldump = os.getenv('MYSQLDUMP')
if not mysqldump:
mysqldump = './bin/mysqldump'
user = os.getenv('MYSQL_USER')
password = os.getenv('MYSQL_PASSWORD')
... | <commit_before>import datetime
from google.cloud import storage
from invoke import task
import os
BUCKET_NAME = 'lekcije'
@task
def backup_mysql(ctx):
mysqldump = os.getenv('MYSQLDUMP')
if not mysqldump:
mysqldump = './bin/mysqldump'
user = os.getenv('MYSQL_USER')
password = os.getenv('MYSQL_... |
893540d492b731b93a31f3c5158c99f4db9fc3e4 | tasks.py | tasks.py | import urlparse
import requests
def purge_fastly_tags(domain, api_key, service_id, tags, max_tries=25):
session = requests.session()
headers = {"X-Fastly-Key": api_key, "Accept": "application/json"}
all_tags = set(tags)
purges = {}
count = 0
while all_tags and not count > max_tries:
... | import urlparse
import requests
def purge_fastly_tags(domain, api_key, service_id, tags, max_tries=25):
session = requests.session()
headers = {"X-Fastly-Key": api_key, "Accept": "application/json"}
all_tags = set(tags)
purges = {}
count = 0
while all_tags and not count > max_tries:
... | Increase the count so we don't spin forever | Increase the count so we don't spin forever
| Python | bsd-3-clause | pydotorg/pypi,pydotorg/pypi,pydotorg/pypi,pydotorg/pypi | import urlparse
import requests
def purge_fastly_tags(domain, api_key, service_id, tags, max_tries=25):
session = requests.session()
headers = {"X-Fastly-Key": api_key, "Accept": "application/json"}
all_tags = set(tags)
purges = {}
count = 0
while all_tags and not count > max_tries:
... | import urlparse
import requests
def purge_fastly_tags(domain, api_key, service_id, tags, max_tries=25):
session = requests.session()
headers = {"X-Fastly-Key": api_key, "Accept": "application/json"}
all_tags = set(tags)
purges = {}
count = 0
while all_tags and not count > max_tries:
... | <commit_before>import urlparse
import requests
def purge_fastly_tags(domain, api_key, service_id, tags, max_tries=25):
session = requests.session()
headers = {"X-Fastly-Key": api_key, "Accept": "application/json"}
all_tags = set(tags)
purges = {}
count = 0
while all_tags and not count > ma... | import urlparse
import requests
def purge_fastly_tags(domain, api_key, service_id, tags, max_tries=25):
session = requests.session()
headers = {"X-Fastly-Key": api_key, "Accept": "application/json"}
all_tags = set(tags)
purges = {}
count = 0
while all_tags and not count > max_tries:
... | import urlparse
import requests
def purge_fastly_tags(domain, api_key, service_id, tags, max_tries=25):
session = requests.session()
headers = {"X-Fastly-Key": api_key, "Accept": "application/json"}
all_tags = set(tags)
purges = {}
count = 0
while all_tags and not count > max_tries:
... | <commit_before>import urlparse
import requests
def purge_fastly_tags(domain, api_key, service_id, tags, max_tries=25):
session = requests.session()
headers = {"X-Fastly-Key": api_key, "Accept": "application/json"}
all_tags = set(tags)
purges = {}
count = 0
while all_tags and not count > ma... |
e817f726c20ccf40cd43d4e6cf36235187a27c20 | objects/utils.py | objects/utils.py | """Utils module."""
from inspect import isclass
from .errors import Error
def is_provider(instance):
"""Check if instance is provider instance."""
return (not isclass(instance) and
hasattr(instance, '__IS_OBJECTS_PROVIDER__'))
def ensure_is_provider(instance):
"""Check if instance is provi... | """Utils module."""
from six import class_types
from .errors import Error
def is_provider(instance):
"""Check if instance is provider instance."""
return (not isinstance(instance, class_types) and
hasattr(instance, '__IS_OBJECTS_PROVIDER__'))
def ensure_is_provider(instance):
"""Check if i... | Fix of bug in Python 2.6 with failed isclass check in inspect module | Fix of bug in Python 2.6 with failed isclass check in inspect module
| Python | bsd-3-clause | rmk135/dependency_injector,ets-labs/dependency_injector,ets-labs/python-dependency-injector,rmk135/objects | """Utils module."""
from inspect import isclass
from .errors import Error
def is_provider(instance):
"""Check if instance is provider instance."""
return (not isclass(instance) and
hasattr(instance, '__IS_OBJECTS_PROVIDER__'))
def ensure_is_provider(instance):
"""Check if instance is provi... | """Utils module."""
from six import class_types
from .errors import Error
def is_provider(instance):
"""Check if instance is provider instance."""
return (not isinstance(instance, class_types) and
hasattr(instance, '__IS_OBJECTS_PROVIDER__'))
def ensure_is_provider(instance):
"""Check if i... | <commit_before>"""Utils module."""
from inspect import isclass
from .errors import Error
def is_provider(instance):
"""Check if instance is provider instance."""
return (not isclass(instance) and
hasattr(instance, '__IS_OBJECTS_PROVIDER__'))
def ensure_is_provider(instance):
"""Check if in... | """Utils module."""
from six import class_types
from .errors import Error
def is_provider(instance):
"""Check if instance is provider instance."""
return (not isinstance(instance, class_types) and
hasattr(instance, '__IS_OBJECTS_PROVIDER__'))
def ensure_is_provider(instance):
"""Check if i... | """Utils module."""
from inspect import isclass
from .errors import Error
def is_provider(instance):
"""Check if instance is provider instance."""
return (not isclass(instance) and
hasattr(instance, '__IS_OBJECTS_PROVIDER__'))
def ensure_is_provider(instance):
"""Check if instance is provi... | <commit_before>"""Utils module."""
from inspect import isclass
from .errors import Error
def is_provider(instance):
"""Check if instance is provider instance."""
return (not isclass(instance) and
hasattr(instance, '__IS_OBJECTS_PROVIDER__'))
def ensure_is_provider(instance):
"""Check if in... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.