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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
13f1f2643c6f00a3f890d735e1ae2c8ac757fe75 | setup.py | setup.py | import sys
import codecs
from setuptools import setup, find_packages
from setuptools.command.test import test as TestCommand
import dmp
setup(
name='dmp',
version=dmp.__version__,
description='MuG DMP API',
url='http://www.multiscalegenomics.eu',
download_url='https://github.com/Multiscale-Genomi... | import sys
import codecs
from setuptools import setup, find_packages
from setuptools.command.test import test as TestCommand
import dmp
setup(
name='dmp',
version=dmp.__version__,
description='MuG DMP API',
url='http://www.multiscalegenomics.eu',
download_url='https://github.com/Multiscale-Genomi... | Fix to the name of the required module | Fix to the name of the required module
| Python | apache-2.0 | Multiscale-Genomics/mg-dm-api,Multiscale-Genomics/mg-dm-api | import sys
import codecs
from setuptools import setup, find_packages
from setuptools.command.test import test as TestCommand
import dmp
setup(
name='dmp',
version=dmp.__version__,
description='MuG DMP API',
url='http://www.multiscalegenomics.eu',
download_url='https://github.com/Multiscale-Genomi... | import sys
import codecs
from setuptools import setup, find_packages
from setuptools.command.test import test as TestCommand
import dmp
setup(
name='dmp',
version=dmp.__version__,
description='MuG DMP API',
url='http://www.multiscalegenomics.eu',
download_url='https://github.com/Multiscale-Genomi... | <commit_before>import sys
import codecs
from setuptools import setup, find_packages
from setuptools.command.test import test as TestCommand
import dmp
setup(
name='dmp',
version=dmp.__version__,
description='MuG DMP API',
url='http://www.multiscalegenomics.eu',
download_url='https://github.com/Mu... | import sys
import codecs
from setuptools import setup, find_packages
from setuptools.command.test import test as TestCommand
import dmp
setup(
name='dmp',
version=dmp.__version__,
description='MuG DMP API',
url='http://www.multiscalegenomics.eu',
download_url='https://github.com/Multiscale-Genomi... | import sys
import codecs
from setuptools import setup, find_packages
from setuptools.command.test import test as TestCommand
import dmp
setup(
name='dmp',
version=dmp.__version__,
description='MuG DMP API',
url='http://www.multiscalegenomics.eu',
download_url='https://github.com/Multiscale-Genomi... | <commit_before>import sys
import codecs
from setuptools import setup, find_packages
from setuptools.command.test import test as TestCommand
import dmp
setup(
name='dmp',
version=dmp.__version__,
description='MuG DMP API',
url='http://www.multiscalegenomics.eu',
download_url='https://github.com/Mu... |
1479e89d65c3d3c3b3ce3da9f81dae73e91b5ae3 | rororo/__init__.py | rororo/__init__.py | """
======
rororo
======
Collection of utilities, helpers, and principles for building Python backend
applications. Supports `aiohttp.web <http://aiohttp.readthedocs.org/>`_,
`Flask <http://flask.pocoo.org/>`_, and your web-framework.
"""
__author__ = 'Igor Davydenko'
__license__ = 'BSD'
__version__ = '1.0.dev0'
| """
======
rororo
======
Collection of utilities, helpers, and principles for building Python backend
applications. Supports `aiohttp.web <http://aiohttp.readthedocs.org/>`_,
`Flask <http://flask.pocoo.org/>`_, and your web-framework.
"""
__author__ = 'Igor Davydenko'
__license__ = 'BSD'
__version__ = '1.0.0.dev0'
| Use semantic versioning for rororo. | Use semantic versioning for rororo.
| Python | bsd-3-clause | playpauseandstop/rororo,playpauseandstop/rororo | """
======
rororo
======
Collection of utilities, helpers, and principles for building Python backend
applications. Supports `aiohttp.web <http://aiohttp.readthedocs.org/>`_,
`Flask <http://flask.pocoo.org/>`_, and your web-framework.
"""
__author__ = 'Igor Davydenko'
__license__ = 'BSD'
__version__ = '1.0.dev0'
Use... | """
======
rororo
======
Collection of utilities, helpers, and principles for building Python backend
applications. Supports `aiohttp.web <http://aiohttp.readthedocs.org/>`_,
`Flask <http://flask.pocoo.org/>`_, and your web-framework.
"""
__author__ = 'Igor Davydenko'
__license__ = 'BSD'
__version__ = '1.0.0.dev0'
| <commit_before>"""
======
rororo
======
Collection of utilities, helpers, and principles for building Python backend
applications. Supports `aiohttp.web <http://aiohttp.readthedocs.org/>`_,
`Flask <http://flask.pocoo.org/>`_, and your web-framework.
"""
__author__ = 'Igor Davydenko'
__license__ = 'BSD'
__version__ =... | """
======
rororo
======
Collection of utilities, helpers, and principles for building Python backend
applications. Supports `aiohttp.web <http://aiohttp.readthedocs.org/>`_,
`Flask <http://flask.pocoo.org/>`_, and your web-framework.
"""
__author__ = 'Igor Davydenko'
__license__ = 'BSD'
__version__ = '1.0.0.dev0'
| """
======
rororo
======
Collection of utilities, helpers, and principles for building Python backend
applications. Supports `aiohttp.web <http://aiohttp.readthedocs.org/>`_,
`Flask <http://flask.pocoo.org/>`_, and your web-framework.
"""
__author__ = 'Igor Davydenko'
__license__ = 'BSD'
__version__ = '1.0.dev0'
Use... | <commit_before>"""
======
rororo
======
Collection of utilities, helpers, and principles for building Python backend
applications. Supports `aiohttp.web <http://aiohttp.readthedocs.org/>`_,
`Flask <http://flask.pocoo.org/>`_, and your web-framework.
"""
__author__ = 'Igor Davydenko'
__license__ = 'BSD'
__version__ =... |
9967d14a10c0c53094b65e0946beb2d1c1200916 | python/helpers/pydev/pydevd_attach_to_process/linux/lldb_threads_settrace.py | python/helpers/pydev/pydevd_attach_to_process/linux/lldb_threads_settrace.py | # This file is meant to be run inside lldb as a command after
# the attach_linux.dylib dll has already been loaded to settrace for all threads.
def __lldb_init_module(debugger, internal_dict):
# Command Initialization code goes here
# print('Startup LLDB in Python!')
import lldb
try:
show_debug... | # This file is meant to be run inside lldb as a command after
# the attach_linux.dylib dll has already been loaded to settrace for all threads.
def __lldb_init_module(debugger, internal_dict):
# Command Initialization code goes here
# print('Startup LLDB in Python!')
import lldb
try:
show_debug... | Use timeout for lldb expr eval (PY-14252). | Use timeout for lldb expr eval (PY-14252).
| Python | apache-2.0 | fnouama/intellij-community,samthor/intellij-community,ftomassetti/intellij-community,idea4bsd/idea4bsd,dslomov/intellij-community,ThiagoGarciaAlves/intellij-community,izonder/intellij-community,fnouama/intellij-community,holmes/intellij-community,MER-GROUP/intellij-community,idea4bsd/idea4bsd,ivan-fedorov/intellij-comm... | # This file is meant to be run inside lldb as a command after
# the attach_linux.dylib dll has already been loaded to settrace for all threads.
def __lldb_init_module(debugger, internal_dict):
# Command Initialization code goes here
# print('Startup LLDB in Python!')
import lldb
try:
show_debug... | # This file is meant to be run inside lldb as a command after
# the attach_linux.dylib dll has already been loaded to settrace for all threads.
def __lldb_init_module(debugger, internal_dict):
# Command Initialization code goes here
# print('Startup LLDB in Python!')
import lldb
try:
show_debug... | <commit_before># This file is meant to be run inside lldb as a command after
# the attach_linux.dylib dll has already been loaded to settrace for all threads.
def __lldb_init_module(debugger, internal_dict):
# Command Initialization code goes here
# print('Startup LLDB in Python!')
import lldb
try:
... | # This file is meant to be run inside lldb as a command after
# the attach_linux.dylib dll has already been loaded to settrace for all threads.
def __lldb_init_module(debugger, internal_dict):
# Command Initialization code goes here
# print('Startup LLDB in Python!')
import lldb
try:
show_debug... | # This file is meant to be run inside lldb as a command after
# the attach_linux.dylib dll has already been loaded to settrace for all threads.
def __lldb_init_module(debugger, internal_dict):
# Command Initialization code goes here
# print('Startup LLDB in Python!')
import lldb
try:
show_debug... | <commit_before># This file is meant to be run inside lldb as a command after
# the attach_linux.dylib dll has already been loaded to settrace for all threads.
def __lldb_init_module(debugger, internal_dict):
# Command Initialization code goes here
# print('Startup LLDB in Python!')
import lldb
try:
... |
90012f9fb9a256e6086a0b421661fd74cd8ef880 | sedlex/AddCocoricoVoteVisitor.py | sedlex/AddCocoricoVoteVisitor.py | # -*- coding: utf-8 -*-
from AbstractVisitor import AbstractVisitor
from duralex.alinea_parser import *
import requests
class AddCocoricoVoteVisitor(AbstractVisitor):
def __init__(self, args):
self.url = 'https://local.cocorico.cc'
r = requests.post(
self.url + '/api/oauth/token',
... | # -*- coding: utf-8 -*-
from AbstractVisitor import AbstractVisitor
from duralex.alinea_parser import *
import requests
class AddCocoricoVoteVisitor(AbstractVisitor):
def __init__(self, args):
self.url = args.cocorico_url
if not self.url:
self.url = 'https://cocorico.cc'
r =... | Handle the --cocorico-url command line option. | Handle the --cocorico-url command line option.
| Python | agpl-3.0 | Legilibre/SedLex | # -*- coding: utf-8 -*-
from AbstractVisitor import AbstractVisitor
from duralex.alinea_parser import *
import requests
class AddCocoricoVoteVisitor(AbstractVisitor):
def __init__(self, args):
self.url = 'https://local.cocorico.cc'
r = requests.post(
self.url + '/api/oauth/token',
... | # -*- coding: utf-8 -*-
from AbstractVisitor import AbstractVisitor
from duralex.alinea_parser import *
import requests
class AddCocoricoVoteVisitor(AbstractVisitor):
def __init__(self, args):
self.url = args.cocorico_url
if not self.url:
self.url = 'https://cocorico.cc'
r =... | <commit_before># -*- coding: utf-8 -*-
from AbstractVisitor import AbstractVisitor
from duralex.alinea_parser import *
import requests
class AddCocoricoVoteVisitor(AbstractVisitor):
def __init__(self, args):
self.url = 'https://local.cocorico.cc'
r = requests.post(
self.url + '/api/... | # -*- coding: utf-8 -*-
from AbstractVisitor import AbstractVisitor
from duralex.alinea_parser import *
import requests
class AddCocoricoVoteVisitor(AbstractVisitor):
def __init__(self, args):
self.url = args.cocorico_url
if not self.url:
self.url = 'https://cocorico.cc'
r =... | # -*- coding: utf-8 -*-
from AbstractVisitor import AbstractVisitor
from duralex.alinea_parser import *
import requests
class AddCocoricoVoteVisitor(AbstractVisitor):
def __init__(self, args):
self.url = 'https://local.cocorico.cc'
r = requests.post(
self.url + '/api/oauth/token',
... | <commit_before># -*- coding: utf-8 -*-
from AbstractVisitor import AbstractVisitor
from duralex.alinea_parser import *
import requests
class AddCocoricoVoteVisitor(AbstractVisitor):
def __init__(self, args):
self.url = 'https://local.cocorico.cc'
r = requests.post(
self.url + '/api/... |
4c5cf98be65ee2564062cce2a43b7833eef1a6c9 | AFQ/utils/volume.py | AFQ/utils/volume.py | import scipy.ndimage as ndim
from skimage.filters import gaussian
def patch_up_roi(roi, sigma=0.5, truncate=2):
"""
After being non-linearly transformed, ROIs tend to have holes in them.
We perform a couple of computational geometry operations on the ROI to
fix that up.
Parameters
----------
... | import scipy.ndimage as ndim
from skimage.filters import gaussian
from skimage.morphology import convex_hull_image
def patch_up_roi(roi, sigma=0.5, truncate=2):
"""
After being non-linearly transformed, ROIs tend to have holes in them.
We perform a couple of computational geometry operations on the ROI to
... | Add a convex hull operation to really close this up. | Add a convex hull operation to really close this up.
| Python | bsd-2-clause | yeatmanlab/pyAFQ,arokem/pyAFQ,arokem/pyAFQ,yeatmanlab/pyAFQ | import scipy.ndimage as ndim
from skimage.filters import gaussian
def patch_up_roi(roi, sigma=0.5, truncate=2):
"""
After being non-linearly transformed, ROIs tend to have holes in them.
We perform a couple of computational geometry operations on the ROI to
fix that up.
Parameters
----------
... | import scipy.ndimage as ndim
from skimage.filters import gaussian
from skimage.morphology import convex_hull_image
def patch_up_roi(roi, sigma=0.5, truncate=2):
"""
After being non-linearly transformed, ROIs tend to have holes in them.
We perform a couple of computational geometry operations on the ROI to
... | <commit_before>import scipy.ndimage as ndim
from skimage.filters import gaussian
def patch_up_roi(roi, sigma=0.5, truncate=2):
"""
After being non-linearly transformed, ROIs tend to have holes in them.
We perform a couple of computational geometry operations on the ROI to
fix that up.
Parameters
... | import scipy.ndimage as ndim
from skimage.filters import gaussian
from skimage.morphology import convex_hull_image
def patch_up_roi(roi, sigma=0.5, truncate=2):
"""
After being non-linearly transformed, ROIs tend to have holes in them.
We perform a couple of computational geometry operations on the ROI to
... | import scipy.ndimage as ndim
from skimage.filters import gaussian
def patch_up_roi(roi, sigma=0.5, truncate=2):
"""
After being non-linearly transformed, ROIs tend to have holes in them.
We perform a couple of computational geometry operations on the ROI to
fix that up.
Parameters
----------
... | <commit_before>import scipy.ndimage as ndim
from skimage.filters import gaussian
def patch_up_roi(roi, sigma=0.5, truncate=2):
"""
After being non-linearly transformed, ROIs tend to have holes in them.
We perform a couple of computational geometry operations on the ROI to
fix that up.
Parameters
... |
788229f43eab992d6f4d79681604336e4d721b0c | gameserver/api/endpoints/players.py | gameserver/api/endpoints/players.py | import logging
from flask import request
from flask_restplus import Resource
from gameserver.game import Game
from gameserver.models import Player
from gameserver.api.restplus import api
from gameserver.api.serializers import player_get, player_post
from gameserver.database import db
db_session = db.session
log =... | import logging
from flask import request
from flask_restplus import Resource
from gameserver.game import Game
from gameserver.models import Player
from gameserver.api.restplus import api
from gameserver.api.serializers import player_get, player_post
from gameserver.database import db
db_session = db.session
log =... | Return json, not just a string id | Return json, not just a string id
| Python | apache-2.0 | hammertoe/didactic-spork,hammertoe/didactic-spork,hammertoe/didactic-spork,hammertoe/didactic-spork | import logging
from flask import request
from flask_restplus import Resource
from gameserver.game import Game
from gameserver.models import Player
from gameserver.api.restplus import api
from gameserver.api.serializers import player_get, player_post
from gameserver.database import db
db_session = db.session
log =... | import logging
from flask import request
from flask_restplus import Resource
from gameserver.game import Game
from gameserver.models import Player
from gameserver.api.restplus import api
from gameserver.api.serializers import player_get, player_post
from gameserver.database import db
db_session = db.session
log =... | <commit_before>import logging
from flask import request
from flask_restplus import Resource
from gameserver.game import Game
from gameserver.models import Player
from gameserver.api.restplus import api
from gameserver.api.serializers import player_get, player_post
from gameserver.database import db
db_session = db... | import logging
from flask import request
from flask_restplus import Resource
from gameserver.game import Game
from gameserver.models import Player
from gameserver.api.restplus import api
from gameserver.api.serializers import player_get, player_post
from gameserver.database import db
db_session = db.session
log =... | import logging
from flask import request
from flask_restplus import Resource
from gameserver.game import Game
from gameserver.models import Player
from gameserver.api.restplus import api
from gameserver.api.serializers import player_get, player_post
from gameserver.database import db
db_session = db.session
log =... | <commit_before>import logging
from flask import request
from flask_restplus import Resource
from gameserver.game import Game
from gameserver.models import Player
from gameserver.api.restplus import api
from gameserver.api.serializers import player_get, player_post
from gameserver.database import db
db_session = db... |
99e164e2e4cf732485e6692a67c732cb657a1c11 | test/util.py | test/util.py | '''Helper code for theanets unit tests.'''
import numpy as np
import skdata.mnist
class MNIST:
NUM_DIGITS = 100
DIGIT_SIZE = 784
def setUp(self):
np.random.seed(3)
mnist = skdata.mnist.dataset.MNIST()
mnist.meta # trigger download if needed.
def arr(n, dtype):
... | '''Helper code for theanets unit tests.'''
import numpy as np
import skdata.mnist
class MNIST(object):
NUM_DIGITS = 100
DIGIT_SIZE = 784
def setUp(self):
np.random.seed(3)
mnist = skdata.mnist.dataset.MNIST()
mnist.meta # trigger download if needed.
def arr(n, dtype):
... | Make MNIST inherit from object for py2k. | Make MNIST inherit from object for py2k.
| Python | mit | devdoer/theanets,chrinide/theanets,lmjohns3/theanets | '''Helper code for theanets unit tests.'''
import numpy as np
import skdata.mnist
class MNIST:
NUM_DIGITS = 100
DIGIT_SIZE = 784
def setUp(self):
np.random.seed(3)
mnist = skdata.mnist.dataset.MNIST()
mnist.meta # trigger download if needed.
def arr(n, dtype):
... | '''Helper code for theanets unit tests.'''
import numpy as np
import skdata.mnist
class MNIST(object):
NUM_DIGITS = 100
DIGIT_SIZE = 784
def setUp(self):
np.random.seed(3)
mnist = skdata.mnist.dataset.MNIST()
mnist.meta # trigger download if needed.
def arr(n, dtype):
... | <commit_before>'''Helper code for theanets unit tests.'''
import numpy as np
import skdata.mnist
class MNIST:
NUM_DIGITS = 100
DIGIT_SIZE = 784
def setUp(self):
np.random.seed(3)
mnist = skdata.mnist.dataset.MNIST()
mnist.meta # trigger download if needed.
def arr(n, dt... | '''Helper code for theanets unit tests.'''
import numpy as np
import skdata.mnist
class MNIST(object):
NUM_DIGITS = 100
DIGIT_SIZE = 784
def setUp(self):
np.random.seed(3)
mnist = skdata.mnist.dataset.MNIST()
mnist.meta # trigger download if needed.
def arr(n, dtype):
... | '''Helper code for theanets unit tests.'''
import numpy as np
import skdata.mnist
class MNIST:
NUM_DIGITS = 100
DIGIT_SIZE = 784
def setUp(self):
np.random.seed(3)
mnist = skdata.mnist.dataset.MNIST()
mnist.meta # trigger download if needed.
def arr(n, dtype):
... | <commit_before>'''Helper code for theanets unit tests.'''
import numpy as np
import skdata.mnist
class MNIST:
NUM_DIGITS = 100
DIGIT_SIZE = 784
def setUp(self):
np.random.seed(3)
mnist = skdata.mnist.dataset.MNIST()
mnist.meta # trigger download if needed.
def arr(n, dt... |
9e110d998532600a351ae35f79b0f46bce576c9f | humfrey/desc/rdf_processors.py | humfrey/desc/rdf_processors.py | import rdflib
from humfrey.utils.namespaces import NS
from humfrey.linkeddata.uri import doc_forwards
def formats(request, context):
graph, subject, doc_uri = context['graph'], context['subject'], context['doc_uri']
formats_for_context = []
for renderer in context['renderers']:
url = rdflib.URIRef... | import rdflib
from humfrey.utils.namespaces import NS
from humfrey.linkeddata.uri import doc_forwards
def formats(request, context):
graph, subject, doc_uri = context['graph'], context['subject'], context['doc_uri']
formats_for_context = []
for renderer in context['renderers']:
url = rdflib.URIRef... | Fix ascii-only bug when something's label contains non-ascii characters. | Fix ascii-only bug when something's label contains non-ascii characters.
| Python | bsd-3-clause | ox-it/humfrey,ox-it/humfrey,ox-it/humfrey | import rdflib
from humfrey.utils.namespaces import NS
from humfrey.linkeddata.uri import doc_forwards
def formats(request, context):
graph, subject, doc_uri = context['graph'], context['subject'], context['doc_uri']
formats_for_context = []
for renderer in context['renderers']:
url = rdflib.URIRef... | import rdflib
from humfrey.utils.namespaces import NS
from humfrey.linkeddata.uri import doc_forwards
def formats(request, context):
graph, subject, doc_uri = context['graph'], context['subject'], context['doc_uri']
formats_for_context = []
for renderer in context['renderers']:
url = rdflib.URIRef... | <commit_before>import rdflib
from humfrey.utils.namespaces import NS
from humfrey.linkeddata.uri import doc_forwards
def formats(request, context):
graph, subject, doc_uri = context['graph'], context['subject'], context['doc_uri']
formats_for_context = []
for renderer in context['renderers']:
url ... | import rdflib
from humfrey.utils.namespaces import NS
from humfrey.linkeddata.uri import doc_forwards
def formats(request, context):
graph, subject, doc_uri = context['graph'], context['subject'], context['doc_uri']
formats_for_context = []
for renderer in context['renderers']:
url = rdflib.URIRef... | import rdflib
from humfrey.utils.namespaces import NS
from humfrey.linkeddata.uri import doc_forwards
def formats(request, context):
graph, subject, doc_uri = context['graph'], context['subject'], context['doc_uri']
formats_for_context = []
for renderer in context['renderers']:
url = rdflib.URIRef... | <commit_before>import rdflib
from humfrey.utils.namespaces import NS
from humfrey.linkeddata.uri import doc_forwards
def formats(request, context):
graph, subject, doc_uri = context['graph'], context['subject'], context['doc_uri']
formats_for_context = []
for renderer in context['renderers']:
url ... |
a7e64e1594ffc1dba32e55f99779c79d85fd05b9 | app.py | app.py | from flask import Flask, render_template, flash
from flask_wtf import Form
from flask_wtf.file import FileField
from tools import s3_upload, store_locally
import json
app = Flask(__name__)
app.config.from_object('config')
class UploadForm(Form):
example = FileField('Example File')
@app.route('/'... | from os import environ
from flask import Flask, render_template, flash
from flask_wtf import Form
from flask_wtf.file import FileField
from tools import s3_upload, store_locally
import json
app = Flask(__name__)
app.config.from_object('config')
class UploadForm(Form):
example = FileField('Example Fi... | Use a production ready server; no disk polling | Use a production ready server; no disk polling
| Python | mit | Mouleshwar/Flask-S3-Uploader,themouli/Flask-S3-Uploader,themouli/Flask-S3-Uploader,Mouleshwar/Flask-S3-Uploader | from flask import Flask, render_template, flash
from flask_wtf import Form
from flask_wtf.file import FileField
from tools import s3_upload, store_locally
import json
app = Flask(__name__)
app.config.from_object('config')
class UploadForm(Form):
example = FileField('Example File')
@app.route('/'... | from os import environ
from flask import Flask, render_template, flash
from flask_wtf import Form
from flask_wtf.file import FileField
from tools import s3_upload, store_locally
import json
app = Flask(__name__)
app.config.from_object('config')
class UploadForm(Form):
example = FileField('Example Fi... | <commit_before>from flask import Flask, render_template, flash
from flask_wtf import Form
from flask_wtf.file import FileField
from tools import s3_upload, store_locally
import json
app = Flask(__name__)
app.config.from_object('config')
class UploadForm(Form):
example = FileField('Example File')
... | from os import environ
from flask import Flask, render_template, flash
from flask_wtf import Form
from flask_wtf.file import FileField
from tools import s3_upload, store_locally
import json
app = Flask(__name__)
app.config.from_object('config')
class UploadForm(Form):
example = FileField('Example Fi... | from flask import Flask, render_template, flash
from flask_wtf import Form
from flask_wtf.file import FileField
from tools import s3_upload, store_locally
import json
app = Flask(__name__)
app.config.from_object('config')
class UploadForm(Form):
example = FileField('Example File')
@app.route('/'... | <commit_before>from flask import Flask, render_template, flash
from flask_wtf import Form
from flask_wtf.file import FileField
from tools import s3_upload, store_locally
import json
app = Flask(__name__)
app.config.from_object('config')
class UploadForm(Form):
example = FileField('Example File')
... |
0dc84650b2929d31c054882ad67570fda6f1ffb9 | incuna_test_utils/testcases/urls.py | incuna_test_utils/testcases/urls.py | from django.core.urlresolvers import resolve, reverse
from django.test import TestCase
class URLsTestCase(TestCase):
"""A TestCase with a check_url helper method for testing urls"""
def check_url(self, view_class, url, url_name, url_args=None, url_kwargs=None):
"""
Assert a view's url is corr... | from django.core.urlresolvers import resolve, reverse
from django.test import TestCase
class URLsMixin(object):
"""A TestCase Mixin with a check_url helper method for testing urls"""
def check_url(self, view_class, expected_url, url_name,
url_args=None, url_kwargs=None):
"""
... | Rename url -> expected_url; Add URLsMixin | Rename url -> expected_url; Add URLsMixin
| Python | bsd-2-clause | incuna/incuna-test-utils,incuna/incuna-test-utils | from django.core.urlresolvers import resolve, reverse
from django.test import TestCase
class URLsTestCase(TestCase):
"""A TestCase with a check_url helper method for testing urls"""
def check_url(self, view_class, url, url_name, url_args=None, url_kwargs=None):
"""
Assert a view's url is corr... | from django.core.urlresolvers import resolve, reverse
from django.test import TestCase
class URLsMixin(object):
"""A TestCase Mixin with a check_url helper method for testing urls"""
def check_url(self, view_class, expected_url, url_name,
url_args=None, url_kwargs=None):
"""
... | <commit_before>from django.core.urlresolvers import resolve, reverse
from django.test import TestCase
class URLsTestCase(TestCase):
"""A TestCase with a check_url helper method for testing urls"""
def check_url(self, view_class, url, url_name, url_args=None, url_kwargs=None):
"""
Assert a vie... | from django.core.urlresolvers import resolve, reverse
from django.test import TestCase
class URLsMixin(object):
"""A TestCase Mixin with a check_url helper method for testing urls"""
def check_url(self, view_class, expected_url, url_name,
url_args=None, url_kwargs=None):
"""
... | from django.core.urlresolvers import resolve, reverse
from django.test import TestCase
class URLsTestCase(TestCase):
"""A TestCase with a check_url helper method for testing urls"""
def check_url(self, view_class, url, url_name, url_args=None, url_kwargs=None):
"""
Assert a view's url is corr... | <commit_before>from django.core.urlresolvers import resolve, reverse
from django.test import TestCase
class URLsTestCase(TestCase):
"""A TestCase with a check_url helper method for testing urls"""
def check_url(self, view_class, url, url_name, url_args=None, url_kwargs=None):
"""
Assert a vie... |
a0348f21ce7abb577b93913c6f1c805cc6ccc75f | knowit2019/13.py | knowit2019/13.py | import json
def navigate_maze_struct(strategy, f='input/MAZE.txt'):
rooms = json.load(open(f))
for row in rooms:
for room in row:
room['visited'] = False
queue = [(0, 0)]
while queue:
y, x = queue.pop()
room = rooms[y][x]
if room['visited']:
... | import json
def navigate_maze_struct(strategy, f='input/MAZE.txt'):
rooms = json.load(open(f))
for row in rooms:
for room in row:
room['visited'] = False
queue = [(0, 0)]
while queue:
y, x = queue.pop()
room = rooms[y][x]
if room['visited']:
... | Update strategy (was wrong way around before) | Update strategy (was wrong way around before)
| Python | mit | matslindh/codingchallenges,matslindh/codingchallenges | import json
def navigate_maze_struct(strategy, f='input/MAZE.txt'):
rooms = json.load(open(f))
for row in rooms:
for room in row:
room['visited'] = False
queue = [(0, 0)]
while queue:
y, x = queue.pop()
room = rooms[y][x]
if room['visited']:
... | import json
def navigate_maze_struct(strategy, f='input/MAZE.txt'):
rooms = json.load(open(f))
for row in rooms:
for room in row:
room['visited'] = False
queue = [(0, 0)]
while queue:
y, x = queue.pop()
room = rooms[y][x]
if room['visited']:
... | <commit_before>import json
def navigate_maze_struct(strategy, f='input/MAZE.txt'):
rooms = json.load(open(f))
for row in rooms:
for room in row:
room['visited'] = False
queue = [(0, 0)]
while queue:
y, x = queue.pop()
room = rooms[y][x]
if room['visited'... | import json
def navigate_maze_struct(strategy, f='input/MAZE.txt'):
rooms = json.load(open(f))
for row in rooms:
for room in row:
room['visited'] = False
queue = [(0, 0)]
while queue:
y, x = queue.pop()
room = rooms[y][x]
if room['visited']:
... | import json
def navigate_maze_struct(strategy, f='input/MAZE.txt'):
rooms = json.load(open(f))
for row in rooms:
for room in row:
room['visited'] = False
queue = [(0, 0)]
while queue:
y, x = queue.pop()
room = rooms[y][x]
if room['visited']:
... | <commit_before>import json
def navigate_maze_struct(strategy, f='input/MAZE.txt'):
rooms = json.load(open(f))
for row in rooms:
for room in row:
room['visited'] = False
queue = [(0, 0)]
while queue:
y, x = queue.pop()
room = rooms[y][x]
if room['visited'... |
a6a95afca2964756a7777ea43839da1709187a27 | planetstack/openstack_observer/backend.py | planetstack/openstack_observer/backend.py | import threading
import time
from observer.event_loop import PlanetStackObserver
from observer.event_manager import EventListener
from util.logger import Logger, logging
logger = Logger(level=logging.INFO)
class Backend:
def run(self):
try:
# start the openstack observer
obser... | import threading
import time
from observer.event_loop import PlanetStackObserver
from observer.event_manager import EventListener
from util.logger import Logger, logging
logger = Logger(level=logging.INFO)
class Backend:
def run(self):
# start the openstack observer
observer = PlanetS... | Drop try/catch that causes uncaught errors in the Observer to be silently ignored | Drop try/catch that causes uncaught errors in the Observer to be silently ignored
| Python | apache-2.0 | opencord/xos,opencord/xos,zdw/xos,open-cloud/xos,cboling/xos,zdw/xos,cboling/xos,opencord/xos,open-cloud/xos,zdw/xos,cboling/xos,cboling/xos,cboling/xos,open-cloud/xos,zdw/xos | import threading
import time
from observer.event_loop import PlanetStackObserver
from observer.event_manager import EventListener
from util.logger import Logger, logging
logger = Logger(level=logging.INFO)
class Backend:
def run(self):
try:
# start the openstack observer
obser... | import threading
import time
from observer.event_loop import PlanetStackObserver
from observer.event_manager import EventListener
from util.logger import Logger, logging
logger = Logger(level=logging.INFO)
class Backend:
def run(self):
# start the openstack observer
observer = PlanetS... | <commit_before>import threading
import time
from observer.event_loop import PlanetStackObserver
from observer.event_manager import EventListener
from util.logger import Logger, logging
logger = Logger(level=logging.INFO)
class Backend:
def run(self):
try:
# start the openstack observer
... | import threading
import time
from observer.event_loop import PlanetStackObserver
from observer.event_manager import EventListener
from util.logger import Logger, logging
logger = Logger(level=logging.INFO)
class Backend:
def run(self):
# start the openstack observer
observer = PlanetS... | import threading
import time
from observer.event_loop import PlanetStackObserver
from observer.event_manager import EventListener
from util.logger import Logger, logging
logger = Logger(level=logging.INFO)
class Backend:
def run(self):
try:
# start the openstack observer
obser... | <commit_before>import threading
import time
from observer.event_loop import PlanetStackObserver
from observer.event_manager import EventListener
from util.logger import Logger, logging
logger = Logger(level=logging.INFO)
class Backend:
def run(self):
try:
# start the openstack observer
... |
131a6d6a60b975b45cd551c1b52c059c857cf1e5 | user/views.py | user/views.py | # -*- coding: utf-8 -*-
from django.contrib.auth.decorators import login_required
from django.shortcuts import render_to_response
from django.template import RequestContext
from django.contrib.auth.models import User
from cronos.announcements.models import Id
if request.user.email[-21:] == 'notapplicablemail.com':
... | # -*- coding: utf-8 -*-
from django.contrib.auth.decorators import login_required
from django.shortcuts import render_to_response
from django.template import RequestContext
from django.contrib.auth.models import User
from cronos.announcements.models import Id
def getmail(request):
if request.user.email[-21:] == 'not... | Create functions getmail and getschool so they can be used in both sites user and settings | Create functions getmail and getschool so they can be used in both sites user and settings
| Python | agpl-3.0 | LinuxTeam-teilar/cronos.teilar.gr,LinuxTeam-teilar/cronos.teilar.gr,LinuxTeam-teilar/cronos.teilar.gr | # -*- coding: utf-8 -*-
from django.contrib.auth.decorators import login_required
from django.shortcuts import render_to_response
from django.template import RequestContext
from django.contrib.auth.models import User
from cronos.announcements.models import Id
if request.user.email[-21:] == 'notapplicablemail.com':
... | # -*- coding: utf-8 -*-
from django.contrib.auth.decorators import login_required
from django.shortcuts import render_to_response
from django.template import RequestContext
from django.contrib.auth.models import User
from cronos.announcements.models import Id
def getmail(request):
if request.user.email[-21:] == 'not... | <commit_before># -*- coding: utf-8 -*-
from django.contrib.auth.decorators import login_required
from django.shortcuts import render_to_response
from django.template import RequestContext
from django.contrib.auth.models import User
from cronos.announcements.models import Id
if request.user.email[-21:] == 'notapplica... | # -*- coding: utf-8 -*-
from django.contrib.auth.decorators import login_required
from django.shortcuts import render_to_response
from django.template import RequestContext
from django.contrib.auth.models import User
from cronos.announcements.models import Id
def getmail(request):
if request.user.email[-21:] == 'not... | # -*- coding: utf-8 -*-
from django.contrib.auth.decorators import login_required
from django.shortcuts import render_to_response
from django.template import RequestContext
from django.contrib.auth.models import User
from cronos.announcements.models import Id
if request.user.email[-21:] == 'notapplicablemail.com':
... | <commit_before># -*- coding: utf-8 -*-
from django.contrib.auth.decorators import login_required
from django.shortcuts import render_to_response
from django.template import RequestContext
from django.contrib.auth.models import User
from cronos.announcements.models import Id
if request.user.email[-21:] == 'notapplica... |
283ba7e4a08aeac07b030700b58e672f3f54ed12 | utils/migrate.py | utils/migrate.py | import settings
import os
import yoyo
import yoyo.connections
def path():
return os.path.join(os.path.dirname(__file__), 'migrations')
if __name__ == '__main__':
conn, paramstyle = yoyo.connections.connect(settings.DATABASE_PATH)
migrations = yoyo.read_migrations(conn, paramstyle, path())
migrations... | import os
import psycopg2
import yoyo
import yoyo.connections
import settings
def path():
return os.path.join(os.path.dirname(__file__), '..', 'migrations')
def run_migrations(dbconn=None, names=[]):
if dbconn is None:
dbconn, paramstyle = yoyo.connections.connect(settings.DATABASE_PATH)
else:
... | Make migrations runnable from external modules | Make migrations runnable from external modules
These will be used in tests to setup the database.
| Python | mit | Storj/accounts | import settings
import os
import yoyo
import yoyo.connections
def path():
return os.path.join(os.path.dirname(__file__), 'migrations')
if __name__ == '__main__':
conn, paramstyle = yoyo.connections.connect(settings.DATABASE_PATH)
migrations = yoyo.read_migrations(conn, paramstyle, path())
migrations... | import os
import psycopg2
import yoyo
import yoyo.connections
import settings
def path():
return os.path.join(os.path.dirname(__file__), '..', 'migrations')
def run_migrations(dbconn=None, names=[]):
if dbconn is None:
dbconn, paramstyle = yoyo.connections.connect(settings.DATABASE_PATH)
else:
... | <commit_before>import settings
import os
import yoyo
import yoyo.connections
def path():
return os.path.join(os.path.dirname(__file__), 'migrations')
if __name__ == '__main__':
conn, paramstyle = yoyo.connections.connect(settings.DATABASE_PATH)
migrations = yoyo.read_migrations(conn, paramstyle, path())... | import os
import psycopg2
import yoyo
import yoyo.connections
import settings
def path():
return os.path.join(os.path.dirname(__file__), '..', 'migrations')
def run_migrations(dbconn=None, names=[]):
if dbconn is None:
dbconn, paramstyle = yoyo.connections.connect(settings.DATABASE_PATH)
else:
... | import settings
import os
import yoyo
import yoyo.connections
def path():
return os.path.join(os.path.dirname(__file__), 'migrations')
if __name__ == '__main__':
conn, paramstyle = yoyo.connections.connect(settings.DATABASE_PATH)
migrations = yoyo.read_migrations(conn, paramstyle, path())
migrations... | <commit_before>import settings
import os
import yoyo
import yoyo.connections
def path():
return os.path.join(os.path.dirname(__file__), 'migrations')
if __name__ == '__main__':
conn, paramstyle = yoyo.connections.connect(settings.DATABASE_PATH)
migrations = yoyo.read_migrations(conn, paramstyle, path())... |
52c0b5d678e062384b6d4682b85b632bdc0ab093 | ktbs_bench/utils/decorators.py | ktbs_bench/utils/decorators.py | from functools import wraps
from inspect import getcallargs
from timer import Timer
def bench(f):
"""Times a function given specific arguments."""
timer = Timer(tick_now=False)
@wraps(f)
def wrapped(*args, **kwargs):
timer.start()
f(*args, **kwargs)
timer.stop()
res... | from functools import wraps
from inspect import getcallargs
from timer import Timer
def bench(f):
"""Times a function given specific arguments."""
timer = Timer(tick_now=False)
@wraps(f)
def wrapped(*args, **kwargs):
timer.start()
f(*args, **kwargs)
timer.stop()
res... | Change @bench to return a list, because there will never be more than 1 key in the dict | Change @bench to return a list, because there will never be more than 1 key in the dict
| Python | mit | ktbs/ktbs-bench,ktbs/ktbs-bench | from functools import wraps
from inspect import getcallargs
from timer import Timer
def bench(f):
"""Times a function given specific arguments."""
timer = Timer(tick_now=False)
@wraps(f)
def wrapped(*args, **kwargs):
timer.start()
f(*args, **kwargs)
timer.stop()
res... | from functools import wraps
from inspect import getcallargs
from timer import Timer
def bench(f):
"""Times a function given specific arguments."""
timer = Timer(tick_now=False)
@wraps(f)
def wrapped(*args, **kwargs):
timer.start()
f(*args, **kwargs)
timer.stop()
res... | <commit_before>from functools import wraps
from inspect import getcallargs
from timer import Timer
def bench(f):
"""Times a function given specific arguments."""
timer = Timer(tick_now=False)
@wraps(f)
def wrapped(*args, **kwargs):
timer.start()
f(*args, **kwargs)
timer.stop... | from functools import wraps
from inspect import getcallargs
from timer import Timer
def bench(f):
"""Times a function given specific arguments."""
timer = Timer(tick_now=False)
@wraps(f)
def wrapped(*args, **kwargs):
timer.start()
f(*args, **kwargs)
timer.stop()
res... | from functools import wraps
from inspect import getcallargs
from timer import Timer
def bench(f):
"""Times a function given specific arguments."""
timer = Timer(tick_now=False)
@wraps(f)
def wrapped(*args, **kwargs):
timer.start()
f(*args, **kwargs)
timer.stop()
res... | <commit_before>from functools import wraps
from inspect import getcallargs
from timer import Timer
def bench(f):
"""Times a function given specific arguments."""
timer = Timer(tick_now=False)
@wraps(f)
def wrapped(*args, **kwargs):
timer.start()
f(*args, **kwargs)
timer.stop... |
6520fde5be81eb3d1a91662edeef8bd2a1f6389c | stonemason/service/tileserver/helper.py | stonemason/service/tileserver/helper.py | # -*- encoding: utf-8 -*-
__author__ = 'ray'
__date__ = '4/4/15'
from stonemason.mason import Portrayal
from stonemason.mason.theme import Theme
def jsonify_portrayal(portrayal):
assert isinstance(portrayal, Portrayal)
template = {
'name': portrayal.name,
'metadata': {
'version':... | # -*- encoding: utf-8 -*-
__author__ = 'ray'
__date__ = '4/4/15'
from stonemason.mason import Portrayal
from stonemason.mason.theme import Theme
def jsonify_portrayal(portrayal):
assert isinstance(portrayal, Portrayal)
template = {
'name': portrayal.name,
'metadata': {
'title': p... | Add metadata title in portrayal view | FEATURE: Add metadata title in portrayal view
| Python | mit | Kotaimen/stonemason,Kotaimen/stonemason | # -*- encoding: utf-8 -*-
__author__ = 'ray'
__date__ = '4/4/15'
from stonemason.mason import Portrayal
from stonemason.mason.theme import Theme
def jsonify_portrayal(portrayal):
assert isinstance(portrayal, Portrayal)
template = {
'name': portrayal.name,
'metadata': {
'version':... | # -*- encoding: utf-8 -*-
__author__ = 'ray'
__date__ = '4/4/15'
from stonemason.mason import Portrayal
from stonemason.mason.theme import Theme
def jsonify_portrayal(portrayal):
assert isinstance(portrayal, Portrayal)
template = {
'name': portrayal.name,
'metadata': {
'title': p... | <commit_before># -*- encoding: utf-8 -*-
__author__ = 'ray'
__date__ = '4/4/15'
from stonemason.mason import Portrayal
from stonemason.mason.theme import Theme
def jsonify_portrayal(portrayal):
assert isinstance(portrayal, Portrayal)
template = {
'name': portrayal.name,
'metadata': {
... | # -*- encoding: utf-8 -*-
__author__ = 'ray'
__date__ = '4/4/15'
from stonemason.mason import Portrayal
from stonemason.mason.theme import Theme
def jsonify_portrayal(portrayal):
assert isinstance(portrayal, Portrayal)
template = {
'name': portrayal.name,
'metadata': {
'title': p... | # -*- encoding: utf-8 -*-
__author__ = 'ray'
__date__ = '4/4/15'
from stonemason.mason import Portrayal
from stonemason.mason.theme import Theme
def jsonify_portrayal(portrayal):
assert isinstance(portrayal, Portrayal)
template = {
'name': portrayal.name,
'metadata': {
'version':... | <commit_before># -*- encoding: utf-8 -*-
__author__ = 'ray'
__date__ = '4/4/15'
from stonemason.mason import Portrayal
from stonemason.mason.theme import Theme
def jsonify_portrayal(portrayal):
assert isinstance(portrayal, Portrayal)
template = {
'name': portrayal.name,
'metadata': {
... |
3785b2804c88215114e0bb21f1aab6dc0554b30c | django_react_templatetags/ssr/hypernova.py | django_react_templatetags/ssr/hypernova.py | import logging
import json
from django.conf import settings
import hypernova
from hypernova.plugins.dev_mode import DevModePlugin
logger = logging.getLogger(__name__)
class HypernovaService():
def load_or_empty(self, component, headers={}, ssr_context=None):
renderer = hypernova.Renderer(
s... | import logging
import json
from django.conf import settings
import hypernova
logger = logging.getLogger(__name__)
class HypernovaService():
def load_or_empty(self, component, headers={}, ssr_context=None):
# from hypernova.plugins.dev_mode import DevModePlugin
renderer = hypernova.Renderer(
... | Disable DevModePlugin until py3 fix is fixed upstream | Disable DevModePlugin until py3 fix is fixed upstream
| Python | mit | Frojd/django-react-templatetags,Frojd/django-react-templatetags,Frojd/django-react-templatetags | import logging
import json
from django.conf import settings
import hypernova
from hypernova.plugins.dev_mode import DevModePlugin
logger = logging.getLogger(__name__)
class HypernovaService():
def load_or_empty(self, component, headers={}, ssr_context=None):
renderer = hypernova.Renderer(
s... | import logging
import json
from django.conf import settings
import hypernova
logger = logging.getLogger(__name__)
class HypernovaService():
def load_or_empty(self, component, headers={}, ssr_context=None):
# from hypernova.plugins.dev_mode import DevModePlugin
renderer = hypernova.Renderer(
... | <commit_before>import logging
import json
from django.conf import settings
import hypernova
from hypernova.plugins.dev_mode import DevModePlugin
logger = logging.getLogger(__name__)
class HypernovaService():
def load_or_empty(self, component, headers={}, ssr_context=None):
renderer = hypernova.Renderer... | import logging
import json
from django.conf import settings
import hypernova
logger = logging.getLogger(__name__)
class HypernovaService():
def load_or_empty(self, component, headers={}, ssr_context=None):
# from hypernova.plugins.dev_mode import DevModePlugin
renderer = hypernova.Renderer(
... | import logging
import json
from django.conf import settings
import hypernova
from hypernova.plugins.dev_mode import DevModePlugin
logger = logging.getLogger(__name__)
class HypernovaService():
def load_or_empty(self, component, headers={}, ssr_context=None):
renderer = hypernova.Renderer(
s... | <commit_before>import logging
import json
from django.conf import settings
import hypernova
from hypernova.plugins.dev_mode import DevModePlugin
logger = logging.getLogger(__name__)
class HypernovaService():
def load_or_empty(self, component, headers={}, ssr_context=None):
renderer = hypernova.Renderer... |
d0c775dd7f7964db608dd56d1899aa4e3697cd1e | life/__main__.py | life/__main__.py | import pyglet
from life import WIDTH, HEIGHT, CELL_SIZE, DISPLAY_FPS, FULLSCREEN
from life.creator import Creator
from life.view import Field
creator = Creator(width=WIDTH, height=HEIGHT)
if FULLSCREEN:
window = pyglet.window.Window(fullscreen=True)
cell_size = min(window.width // WIDTH, window.height // HE... | import pyglet
from life import WIDTH, HEIGHT, CELL_SIZE, DISPLAY_FPS, FULLSCREEN
from life.creator import Creator
from life.view import Field
creator = Creator(width=WIDTH, height=HEIGHT)
if FULLSCREEN:
window = pyglet.window.Window(fullscreen=True)
cell_size = min(window.width // WIDTH, window.height // HE... | Use correct FPS display implementation. | Use correct FPS display implementation.
| Python | bsd-2-clause | lig/life | import pyglet
from life import WIDTH, HEIGHT, CELL_SIZE, DISPLAY_FPS, FULLSCREEN
from life.creator import Creator
from life.view import Field
creator = Creator(width=WIDTH, height=HEIGHT)
if FULLSCREEN:
window = pyglet.window.Window(fullscreen=True)
cell_size = min(window.width // WIDTH, window.height // HE... | import pyglet
from life import WIDTH, HEIGHT, CELL_SIZE, DISPLAY_FPS, FULLSCREEN
from life.creator import Creator
from life.view import Field
creator = Creator(width=WIDTH, height=HEIGHT)
if FULLSCREEN:
window = pyglet.window.Window(fullscreen=True)
cell_size = min(window.width // WIDTH, window.height // HE... | <commit_before>import pyglet
from life import WIDTH, HEIGHT, CELL_SIZE, DISPLAY_FPS, FULLSCREEN
from life.creator import Creator
from life.view import Field
creator = Creator(width=WIDTH, height=HEIGHT)
if FULLSCREEN:
window = pyglet.window.Window(fullscreen=True)
cell_size = min(window.width // WIDTH, wind... | import pyglet
from life import WIDTH, HEIGHT, CELL_SIZE, DISPLAY_FPS, FULLSCREEN
from life.creator import Creator
from life.view import Field
creator = Creator(width=WIDTH, height=HEIGHT)
if FULLSCREEN:
window = pyglet.window.Window(fullscreen=True)
cell_size = min(window.width // WIDTH, window.height // HE... | import pyglet
from life import WIDTH, HEIGHT, CELL_SIZE, DISPLAY_FPS, FULLSCREEN
from life.creator import Creator
from life.view import Field
creator = Creator(width=WIDTH, height=HEIGHT)
if FULLSCREEN:
window = pyglet.window.Window(fullscreen=True)
cell_size = min(window.width // WIDTH, window.height // HE... | <commit_before>import pyglet
from life import WIDTH, HEIGHT, CELL_SIZE, DISPLAY_FPS, FULLSCREEN
from life.creator import Creator
from life.view import Field
creator = Creator(width=WIDTH, height=HEIGHT)
if FULLSCREEN:
window = pyglet.window.Window(fullscreen=True)
cell_size = min(window.width // WIDTH, wind... |
69d22e9e7ff574d4f510269e589dafa45132047f | stdnum/br/__init__.py | stdnum/br/__init__.py | # __init__.py - collection of Brazilian numbers
# coding: utf-8
#
# Copyright (C) 2012 Arthur de Jong
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2.1 of the License... | # __init__.py - collection of Brazilian numbers
# coding: utf-8
#
# Copyright (C) 2012 Arthur de Jong
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2.1 of the License... | Add missing vat alias for Brazil | Add missing vat alias for Brazil
| Python | lgpl-2.1 | arthurdejong/python-stdnum,arthurdejong/python-stdnum,arthurdejong/python-stdnum | # __init__.py - collection of Brazilian numbers
# coding: utf-8
#
# Copyright (C) 2012 Arthur de Jong
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2.1 of the License... | # __init__.py - collection of Brazilian numbers
# coding: utf-8
#
# Copyright (C) 2012 Arthur de Jong
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2.1 of the License... | <commit_before># __init__.py - collection of Brazilian numbers
# coding: utf-8
#
# Copyright (C) 2012 Arthur de Jong
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2.1... | # __init__.py - collection of Brazilian numbers
# coding: utf-8
#
# Copyright (C) 2012 Arthur de Jong
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2.1 of the License... | # __init__.py - collection of Brazilian numbers
# coding: utf-8
#
# Copyright (C) 2012 Arthur de Jong
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2.1 of the License... | <commit_before># __init__.py - collection of Brazilian numbers
# coding: utf-8
#
# Copyright (C) 2012 Arthur de Jong
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2.1... |
c22894e1ac7071e19515321df8eaa639045c9ae5 | dlux/api.py | dlux/api.py | # Copyright 2014 Hewlett-Packard Development Company, L.P.
#
# Author: Endre Karlson <endre.karlson@hp.com>
#
# 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/lice... | # Copyright 2014 Hewlett-Packard Development Company, L.P.
#
# Author: Endre Karlson <endre.karlson@hp.com>
#
# 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/lice... | Update according to latest odlclient | Update according to latest odlclient
| Python | apache-2.0 | ekarlso/dlux-horizon,ekarlso/dlux-horizon,ekarlso/dlux-horizon | # Copyright 2014 Hewlett-Packard Development Company, L.P.
#
# Author: Endre Karlson <endre.karlson@hp.com>
#
# 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/lice... | # Copyright 2014 Hewlett-Packard Development Company, L.P.
#
# Author: Endre Karlson <endre.karlson@hp.com>
#
# 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/lice... | <commit_before># Copyright 2014 Hewlett-Packard Development Company, L.P.
#
# Author: Endre Karlson <endre.karlson@hp.com>
#
# 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.... | # Copyright 2014 Hewlett-Packard Development Company, L.P.
#
# Author: Endre Karlson <endre.karlson@hp.com>
#
# 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/lice... | # Copyright 2014 Hewlett-Packard Development Company, L.P.
#
# Author: Endre Karlson <endre.karlson@hp.com>
#
# 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/lice... | <commit_before># Copyright 2014 Hewlett-Packard Development Company, L.P.
#
# Author: Endre Karlson <endre.karlson@hp.com>
#
# 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.... |
ba499556cf3a1f09c55ba2631c1dbb988e95fb82 | web/test/test_web.py | web/test/test_web.py | def test_web(app):
client = app.test_client()
response = client.post(
'/user/sign-in?next=/',
follow_redirects=True,
data=dict(
username='test@test.com',
password='Password1'
)
)
response = client.get('/')
assert response.status_code == 200
... | def login(client):
response = client.post(
'/user/sign-in?next=/',
follow_redirects=True,
data=dict(
username='test@test.com',
password='Password1'
)
)
return response
def test_navigating_to_startpage(app):
client = app.test_client()
login(cli... | Refactor test to be more clear | Refactor test to be more clear
| Python | apache-2.0 | vinntreus/training_stats,vinntreus/training_stats | def test_web(app):
client = app.test_client()
response = client.post(
'/user/sign-in?next=/',
follow_redirects=True,
data=dict(
username='test@test.com',
password='Password1'
)
)
response = client.get('/')
assert response.status_code == 200
... | def login(client):
response = client.post(
'/user/sign-in?next=/',
follow_redirects=True,
data=dict(
username='test@test.com',
password='Password1'
)
)
return response
def test_navigating_to_startpage(app):
client = app.test_client()
login(cli... | <commit_before>def test_web(app):
client = app.test_client()
response = client.post(
'/user/sign-in?next=/',
follow_redirects=True,
data=dict(
username='test@test.com',
password='Password1'
)
)
response = client.get('/')
assert response.status_... | def login(client):
response = client.post(
'/user/sign-in?next=/',
follow_redirects=True,
data=dict(
username='test@test.com',
password='Password1'
)
)
return response
def test_navigating_to_startpage(app):
client = app.test_client()
login(cli... | def test_web(app):
client = app.test_client()
response = client.post(
'/user/sign-in?next=/',
follow_redirects=True,
data=dict(
username='test@test.com',
password='Password1'
)
)
response = client.get('/')
assert response.status_code == 200
... | <commit_before>def test_web(app):
client = app.test_client()
response = client.post(
'/user/sign-in?next=/',
follow_redirects=True,
data=dict(
username='test@test.com',
password='Password1'
)
)
response = client.get('/')
assert response.status_... |
d8168185aa0153fac55e3c59761a5e561a5b0137 | src/ocspdash/__init__.py | src/ocspdash/__init__.py | """A dashboard for the status of the top certificate authorities' OCSP responders."""
# metadata
__version__ = '0.1.0-dev'
__title__ = 'OCSPdash'
# keep the __description__ synchronized with the package docstring
__description__ = "A dashboard for the status of the top certificate authorities' OCSP responders."
__url_... | """A dashboard for the status of the top certificate authorities' OCSP responders."""
# metadata
__version__ = '0.1.0-dev'
__title__ = 'OCSPdash'
# keep the __description__ synchronized with the package docstring
__description__ = "A dashboard for the status of the top certificate authorities' OCSP responders."
__url_... | Add @cthoyt to package __copyright__ | Add @cthoyt to package __copyright__
| Python | mit | scolby33/OCSPdash,scolby33/OCSPdash,scolby33/OCSPdash | """A dashboard for the status of the top certificate authorities' OCSP responders."""
# metadata
__version__ = '0.1.0-dev'
__title__ = 'OCSPdash'
# keep the __description__ synchronized with the package docstring
__description__ = "A dashboard for the status of the top certificate authorities' OCSP responders."
__url_... | """A dashboard for the status of the top certificate authorities' OCSP responders."""
# metadata
__version__ = '0.1.0-dev'
__title__ = 'OCSPdash'
# keep the __description__ synchronized with the package docstring
__description__ = "A dashboard for the status of the top certificate authorities' OCSP responders."
__url_... | <commit_before>"""A dashboard for the status of the top certificate authorities' OCSP responders."""
# metadata
__version__ = '0.1.0-dev'
__title__ = 'OCSPdash'
# keep the __description__ synchronized with the package docstring
__description__ = "A dashboard for the status of the top certificate authorities' OCSP resp... | """A dashboard for the status of the top certificate authorities' OCSP responders."""
# metadata
__version__ = '0.1.0-dev'
__title__ = 'OCSPdash'
# keep the __description__ synchronized with the package docstring
__description__ = "A dashboard for the status of the top certificate authorities' OCSP responders."
__url_... | """A dashboard for the status of the top certificate authorities' OCSP responders."""
# metadata
__version__ = '0.1.0-dev'
__title__ = 'OCSPdash'
# keep the __description__ synchronized with the package docstring
__description__ = "A dashboard for the status of the top certificate authorities' OCSP responders."
__url_... | <commit_before>"""A dashboard for the status of the top certificate authorities' OCSP responders."""
# metadata
__version__ = '0.1.0-dev'
__title__ = 'OCSPdash'
# keep the __description__ synchronized with the package docstring
__description__ = "A dashboard for the status of the top certificate authorities' OCSP resp... |
9bc3c6ef95bd3b229b019dcd0d39aa9940528cf4 | config/development.py | config/development.py |
# Secret passphrase
# FIXME: Temporarily SECRET must have the same value as SECRET_KEYS
# due to the current spring boot implementation
SECRET = '/etc/keyczar/keys'
# Secret keyczar keys
SECRET_KEYS = '/etc/keyczar/keys'
# Fill as needed
DEBUG = True
IGNORE_AUTH = True
MESOS_FRAMEWORK_ENDPOINT = 'http://127.0.0... |
# Secret passphrase
# FIXME: Temporarily SECRET must have the same value as SECRET_KEYS
# due to the current spring boot implementation
SECRET = '/etc/keyczar/keys'
# Secret keyczar keys
SECRET_KEYS = '/etc/keyczar/keys'
# Fill as needed
DEBUG = True
IGNORE_AUTH = True
#MESOS_FRAMEWORK_ENDPOINT = 'http://127.0.... | Fix de mis endpoints que uso para desarrollo, disculpas T_T | Fix de mis endpoints que uso para desarrollo, disculpas T_T
| Python | apache-2.0 | bigdatacesga/paas-service,bigdatacesga/paas-service,bigdatacesga/paas-service |
# Secret passphrase
# FIXME: Temporarily SECRET must have the same value as SECRET_KEYS
# due to the current spring boot implementation
SECRET = '/etc/keyczar/keys'
# Secret keyczar keys
SECRET_KEYS = '/etc/keyczar/keys'
# Fill as needed
DEBUG = True
IGNORE_AUTH = True
MESOS_FRAMEWORK_ENDPOINT = 'http://127.0.0... |
# Secret passphrase
# FIXME: Temporarily SECRET must have the same value as SECRET_KEYS
# due to the current spring boot implementation
SECRET = '/etc/keyczar/keys'
# Secret keyczar keys
SECRET_KEYS = '/etc/keyczar/keys'
# Fill as needed
DEBUG = True
IGNORE_AUTH = True
#MESOS_FRAMEWORK_ENDPOINT = 'http://127.0.... | <commit_before>
# Secret passphrase
# FIXME: Temporarily SECRET must have the same value as SECRET_KEYS
# due to the current spring boot implementation
SECRET = '/etc/keyczar/keys'
# Secret keyczar keys
SECRET_KEYS = '/etc/keyczar/keys'
# Fill as needed
DEBUG = True
IGNORE_AUTH = True
MESOS_FRAMEWORK_ENDPOINT = ... |
# Secret passphrase
# FIXME: Temporarily SECRET must have the same value as SECRET_KEYS
# due to the current spring boot implementation
SECRET = '/etc/keyczar/keys'
# Secret keyczar keys
SECRET_KEYS = '/etc/keyczar/keys'
# Fill as needed
DEBUG = True
IGNORE_AUTH = True
#MESOS_FRAMEWORK_ENDPOINT = 'http://127.0.... |
# Secret passphrase
# FIXME: Temporarily SECRET must have the same value as SECRET_KEYS
# due to the current spring boot implementation
SECRET = '/etc/keyczar/keys'
# Secret keyczar keys
SECRET_KEYS = '/etc/keyczar/keys'
# Fill as needed
DEBUG = True
IGNORE_AUTH = True
MESOS_FRAMEWORK_ENDPOINT = 'http://127.0.0... | <commit_before>
# Secret passphrase
# FIXME: Temporarily SECRET must have the same value as SECRET_KEYS
# due to the current spring boot implementation
SECRET = '/etc/keyczar/keys'
# Secret keyczar keys
SECRET_KEYS = '/etc/keyczar/keys'
# Fill as needed
DEBUG = True
IGNORE_AUTH = True
MESOS_FRAMEWORK_ENDPOINT = ... |
00d835c3b4512b407033af280600d9428a155b22 | noah/noah.py | noah/noah.py | import json
import random
import pprint
class Noah(object):
def __init__(self, dictionary_file):
self.dictionary = json.load(dictionary_file)
def list(self):
return '\n'.join([entry['word'] for entry in self.dictionary])
def define(self, word):
return self.output(filter(lambda x: ... | import json
import random
import pprint
class Noah(object):
def __init__(self, dictionary_file):
self.dictionary = json.load(dictionary_file)
def list(self):
return '\n'.join([entry['word'] for entry in self.dictionary])
def define(self, word):
return self.output(filter(lambda x: ... | Remove unneeded block in define. | Remove unneeded block in define.
| Python | mit | maxdeviant/noah | import json
import random
import pprint
class Noah(object):
def __init__(self, dictionary_file):
self.dictionary = json.load(dictionary_file)
def list(self):
return '\n'.join([entry['word'] for entry in self.dictionary])
def define(self, word):
return self.output(filter(lambda x: ... | import json
import random
import pprint
class Noah(object):
def __init__(self, dictionary_file):
self.dictionary = json.load(dictionary_file)
def list(self):
return '\n'.join([entry['word'] for entry in self.dictionary])
def define(self, word):
return self.output(filter(lambda x: ... | <commit_before>import json
import random
import pprint
class Noah(object):
def __init__(self, dictionary_file):
self.dictionary = json.load(dictionary_file)
def list(self):
return '\n'.join([entry['word'] for entry in self.dictionary])
def define(self, word):
return self.output(fi... | import json
import random
import pprint
class Noah(object):
def __init__(self, dictionary_file):
self.dictionary = json.load(dictionary_file)
def list(self):
return '\n'.join([entry['word'] for entry in self.dictionary])
def define(self, word):
return self.output(filter(lambda x: ... | import json
import random
import pprint
class Noah(object):
def __init__(self, dictionary_file):
self.dictionary = json.load(dictionary_file)
def list(self):
return '\n'.join([entry['word'] for entry in self.dictionary])
def define(self, word):
return self.output(filter(lambda x: ... | <commit_before>import json
import random
import pprint
class Noah(object):
def __init__(self, dictionary_file):
self.dictionary = json.load(dictionary_file)
def list(self):
return '\n'.join([entry['word'] for entry in self.dictionary])
def define(self, word):
return self.output(fi... |
4bcf7f83351bc64ed47c5531cb66ccb20f762dd0 | pyMKL/__init__.py | pyMKL/__init__.py | from __future__ import absolute_import
from __future__ import unicode_literals
from __future__ import print_function
from __future__ import division
from future import standard_library
standard_library.install_aliases()
import numpy as np
import scipy.sparse as sp
from ctypes import CDLL, cdll, RTLD_GLOBAL
from ctypes... | from __future__ import absolute_import
from __future__ import unicode_literals
from __future__ import print_function
from __future__ import division
from future import standard_library
standard_library.install_aliases()
import platform
import numpy as np
import scipy.sparse as sp
from ctypes import CDLL, cdll, RTLD_GL... | Add experimental support for other OS versions. | Add experimental support for other OS versions.
| Python | mit | dwfmarchant/pyMKL | from __future__ import absolute_import
from __future__ import unicode_literals
from __future__ import print_function
from __future__ import division
from future import standard_library
standard_library.install_aliases()
import numpy as np
import scipy.sparse as sp
from ctypes import CDLL, cdll, RTLD_GLOBAL
from ctypes... | from __future__ import absolute_import
from __future__ import unicode_literals
from __future__ import print_function
from __future__ import division
from future import standard_library
standard_library.install_aliases()
import platform
import numpy as np
import scipy.sparse as sp
from ctypes import CDLL, cdll, RTLD_GL... | <commit_before>from __future__ import absolute_import
from __future__ import unicode_literals
from __future__ import print_function
from __future__ import division
from future import standard_library
standard_library.install_aliases()
import numpy as np
import scipy.sparse as sp
from ctypes import CDLL, cdll, RTLD_GLO... | from __future__ import absolute_import
from __future__ import unicode_literals
from __future__ import print_function
from __future__ import division
from future import standard_library
standard_library.install_aliases()
import platform
import numpy as np
import scipy.sparse as sp
from ctypes import CDLL, cdll, RTLD_GL... | from __future__ import absolute_import
from __future__ import unicode_literals
from __future__ import print_function
from __future__ import division
from future import standard_library
standard_library.install_aliases()
import numpy as np
import scipy.sparse as sp
from ctypes import CDLL, cdll, RTLD_GLOBAL
from ctypes... | <commit_before>from __future__ import absolute_import
from __future__ import unicode_literals
from __future__ import print_function
from __future__ import division
from future import standard_library
standard_library.install_aliases()
import numpy as np
import scipy.sparse as sp
from ctypes import CDLL, cdll, RTLD_GLO... |
6f1dc606b4c4f2702e0a5b48338488ac2eec197c | scripts/utils.py | scripts/utils.py | #!/usr/bin/env python3
# Touhou Community Reliant Automatic Patcher
# Scripts
#
# ----
#
"""Utility functions shared among all the scripts."""
from collections import OrderedDict
import json
import os
json_load_params = {
'object_pairs_hook': OrderedDict
}
def patch_files_filter(files):
"""Filters all file ... | #!/usr/bin/env python3
# Touhou Community Reliant Automatic Patcher
# Scripts
#
# ----
#
"""Utility functions shared among all the scripts."""
from collections import OrderedDict
import json
import os
json_load_params = {
'object_pairs_hook': OrderedDict
}
def patch_files_filter(files):
"""Filters all file ... | Enforce Unix newlines when writing JSON files. | scripts: Enforce Unix newlines when writing JSON files.
| Python | unlicense | VBChunguk/thcrap,thpatch/thcrap,thpatch/thcrap,thpatch/thcrap,VBChunguk/thcrap,VBChunguk/thcrap,thpatch/thcrap,thpatch/thcrap | #!/usr/bin/env python3
# Touhou Community Reliant Automatic Patcher
# Scripts
#
# ----
#
"""Utility functions shared among all the scripts."""
from collections import OrderedDict
import json
import os
json_load_params = {
'object_pairs_hook': OrderedDict
}
def patch_files_filter(files):
"""Filters all file ... | #!/usr/bin/env python3
# Touhou Community Reliant Automatic Patcher
# Scripts
#
# ----
#
"""Utility functions shared among all the scripts."""
from collections import OrderedDict
import json
import os
json_load_params = {
'object_pairs_hook': OrderedDict
}
def patch_files_filter(files):
"""Filters all file ... | <commit_before>#!/usr/bin/env python3
# Touhou Community Reliant Automatic Patcher
# Scripts
#
# ----
#
"""Utility functions shared among all the scripts."""
from collections import OrderedDict
import json
import os
json_load_params = {
'object_pairs_hook': OrderedDict
}
def patch_files_filter(files):
"""Fi... | #!/usr/bin/env python3
# Touhou Community Reliant Automatic Patcher
# Scripts
#
# ----
#
"""Utility functions shared among all the scripts."""
from collections import OrderedDict
import json
import os
json_load_params = {
'object_pairs_hook': OrderedDict
}
def patch_files_filter(files):
"""Filters all file ... | #!/usr/bin/env python3
# Touhou Community Reliant Automatic Patcher
# Scripts
#
# ----
#
"""Utility functions shared among all the scripts."""
from collections import OrderedDict
import json
import os
json_load_params = {
'object_pairs_hook': OrderedDict
}
def patch_files_filter(files):
"""Filters all file ... | <commit_before>#!/usr/bin/env python3
# Touhou Community Reliant Automatic Patcher
# Scripts
#
# ----
#
"""Utility functions shared among all the scripts."""
from collections import OrderedDict
import json
import os
json_load_params = {
'object_pairs_hook': OrderedDict
}
def patch_files_filter(files):
"""Fi... |
89929acbb2ee3c5617758966d8916139726d7b74 | app/state.py | app/state.py | import multiprocessing
import unicornhathd as unicornhat
import importlib
import sys
import os
import app.programs.hd
class State:
''' Handles the Unicorn HAT state'''
def __init__(self):
self._process = None
def start_program(self, name, params={}):
try:
program = getattr(a... | import multiprocessing
import unicornhathd as unicornhat
import importlib
import sys
import os
import app.programs.hd
class State:
''' Handles the Unicorn HAT state'''
def __init__(self):
self._process = None
def start_program(self, name, params={}):
try:
program = getattr(a... | Fix setting rotation to 0 | Fix setting rotation to 0
| Python | mit | njbbaer/unicorn-remote,njbbaer/unicorn-remote,njbbaer/unicorn-remote | import multiprocessing
import unicornhathd as unicornhat
import importlib
import sys
import os
import app.programs.hd
class State:
''' Handles the Unicorn HAT state'''
def __init__(self):
self._process = None
def start_program(self, name, params={}):
try:
program = getattr(a... | import multiprocessing
import unicornhathd as unicornhat
import importlib
import sys
import os
import app.programs.hd
class State:
''' Handles the Unicorn HAT state'''
def __init__(self):
self._process = None
def start_program(self, name, params={}):
try:
program = getattr(a... | <commit_before>import multiprocessing
import unicornhathd as unicornhat
import importlib
import sys
import os
import app.programs.hd
class State:
''' Handles the Unicorn HAT state'''
def __init__(self):
self._process = None
def start_program(self, name, params={}):
try:
prog... | import multiprocessing
import unicornhathd as unicornhat
import importlib
import sys
import os
import app.programs.hd
class State:
''' Handles the Unicorn HAT state'''
def __init__(self):
self._process = None
def start_program(self, name, params={}):
try:
program = getattr(a... | import multiprocessing
import unicornhathd as unicornhat
import importlib
import sys
import os
import app.programs.hd
class State:
''' Handles the Unicorn HAT state'''
def __init__(self):
self._process = None
def start_program(self, name, params={}):
try:
program = getattr(a... | <commit_before>import multiprocessing
import unicornhathd as unicornhat
import importlib
import sys
import os
import app.programs.hd
class State:
''' Handles the Unicorn HAT state'''
def __init__(self):
self._process = None
def start_program(self, name, params={}):
try:
prog... |
013ed651c3e8e7cfa4b8babefc2664644b928852 | pybtex/bibtex/exceptions.py | pybtex/bibtex/exceptions.py | # Copyright (C) 2006, 2007, 2008 Andrey Golovizin
#
# This file is part of pybtex.
#
# pybtex is free software; you can redistribute it and/or modify
# under the terms of the GNU General Public License as published by the
# Free Software Foundation; either version 2 of the License, or (at your
# option) any later vers... | # Copyright (C) 2006, 2007, 2008 Andrey Golovizin
#
# This file is part of pybtex.
#
# pybtex is free software; you can redistribute it and/or modify
# under the terms of the GNU General Public License as published by the
# Free Software Foundation; either version 2 of the License, or (at your
# option) any later vers... | Make BibTeXError a subclass of PybtexError. | Make BibTeXError a subclass of PybtexError.
| Python | mit | andreas-h/pybtex,chbrown/pybtex,andreas-h/pybtex,chbrown/pybtex | # Copyright (C) 2006, 2007, 2008 Andrey Golovizin
#
# This file is part of pybtex.
#
# pybtex is free software; you can redistribute it and/or modify
# under the terms of the GNU General Public License as published by the
# Free Software Foundation; either version 2 of the License, or (at your
# option) any later vers... | # Copyright (C) 2006, 2007, 2008 Andrey Golovizin
#
# This file is part of pybtex.
#
# pybtex is free software; you can redistribute it and/or modify
# under the terms of the GNU General Public License as published by the
# Free Software Foundation; either version 2 of the License, or (at your
# option) any later vers... | <commit_before># Copyright (C) 2006, 2007, 2008 Andrey Golovizin
#
# This file is part of pybtex.
#
# pybtex is free software; you can redistribute it and/or modify
# under the terms of the GNU General Public License as published by the
# Free Software Foundation; either version 2 of the License, or (at your
# option)... | # Copyright (C) 2006, 2007, 2008 Andrey Golovizin
#
# This file is part of pybtex.
#
# pybtex is free software; you can redistribute it and/or modify
# under the terms of the GNU General Public License as published by the
# Free Software Foundation; either version 2 of the License, or (at your
# option) any later vers... | # Copyright (C) 2006, 2007, 2008 Andrey Golovizin
#
# This file is part of pybtex.
#
# pybtex is free software; you can redistribute it and/or modify
# under the terms of the GNU General Public License as published by the
# Free Software Foundation; either version 2 of the License, or (at your
# option) any later vers... | <commit_before># Copyright (C) 2006, 2007, 2008 Andrey Golovizin
#
# This file is part of pybtex.
#
# pybtex is free software; you can redistribute it and/or modify
# under the terms of the GNU General Public License as published by the
# Free Software Foundation; either version 2 of the License, or (at your
# option)... |
e75e6ec300e1127f7010d36ef63343e522318f90 | sunpy/instr/iris/iris.py | sunpy/instr/iris/iris.py | """
Some very beta tools for IRIS
"""
import sunpy.io
import sunpy.time
import sunpy.map
__all__ = ['SJI_to_cube']
def SJI_to_cube(filename, start=0, stop=None):
"""
Read a SJI file and return a MapCube
..warning::
This function is a very early beta and is not stable. Further work is
... | """
Some very beta tools for IRIS
"""
import sunpy.io
import sunpy.time
import sunpy.map
__all__ = ['SJI_to_cube']
def SJI_to_cube(filename, start=0, stop=None, hdu=0):
"""
Read a SJI file and return a MapCube
..warning::
This function is a very early beta and is not stable. Further work is ... | Change hdu[0] to hdu for optional indexing | Change hdu[0] to hdu for optional indexing
| Python | bsd-2-clause | Alex-Ian-Hamilton/sunpy,dpshelio/sunpy,dpshelio/sunpy,dpshelio/sunpy,Alex-Ian-Hamilton/sunpy,Alex-Ian-Hamilton/sunpy | """
Some very beta tools for IRIS
"""
import sunpy.io
import sunpy.time
import sunpy.map
__all__ = ['SJI_to_cube']
def SJI_to_cube(filename, start=0, stop=None):
"""
Read a SJI file and return a MapCube
..warning::
This function is a very early beta and is not stable. Further work is
... | """
Some very beta tools for IRIS
"""
import sunpy.io
import sunpy.time
import sunpy.map
__all__ = ['SJI_to_cube']
def SJI_to_cube(filename, start=0, stop=None, hdu=0):
"""
Read a SJI file and return a MapCube
..warning::
This function is a very early beta and is not stable. Further work is ... | <commit_before>"""
Some very beta tools for IRIS
"""
import sunpy.io
import sunpy.time
import sunpy.map
__all__ = ['SJI_to_cube']
def SJI_to_cube(filename, start=0, stop=None):
"""
Read a SJI file and return a MapCube
..warning::
This function is a very early beta and is not stable. Further ... | """
Some very beta tools for IRIS
"""
import sunpy.io
import sunpy.time
import sunpy.map
__all__ = ['SJI_to_cube']
def SJI_to_cube(filename, start=0, stop=None, hdu=0):
"""
Read a SJI file and return a MapCube
..warning::
This function is a very early beta and is not stable. Further work is ... | """
Some very beta tools for IRIS
"""
import sunpy.io
import sunpy.time
import sunpy.map
__all__ = ['SJI_to_cube']
def SJI_to_cube(filename, start=0, stop=None):
"""
Read a SJI file and return a MapCube
..warning::
This function is a very early beta and is not stable. Further work is
... | <commit_before>"""
Some very beta tools for IRIS
"""
import sunpy.io
import sunpy.time
import sunpy.map
__all__ = ['SJI_to_cube']
def SJI_to_cube(filename, start=0, stop=None):
"""
Read a SJI file and return a MapCube
..warning::
This function is a very early beta and is not stable. Further ... |
230bb0a09146cd0b696b528b3ad6dd9ccf057113 | tests/test_checker.py | tests/test_checker.py | import pytest
import os, stat
from botbot import checker, problems
def test_fastq_checker():
assert checker.is_fastq("bad.fastq") == problems.PROB_FILE_IS_FASTQ
assert checker.is_fastq("good.py") == problems.PROB_NO_PROBLEM
assert checker.is_fastq("fastq.actually_ok_too") == problems.PROB_NO_PROBLEM
def ... | import pytest
import os, stat
from botbot import checker, problems
def test_fastq_checker_path_names():
assert checker.is_fastq("bad.fastq") == problems.PROB_FILE_IS_FASTQ
assert checker.is_fastq("good.py") == problems.PROB_NO_PROBLEM
assert checker.is_fastq("fastq.actually_ok_too") == problems.PROB_NO_PR... | Add test for symlink detection | Add test for symlink detection
| Python | mit | jackstanek/BotBot,jackstanek/BotBot | import pytest
import os, stat
from botbot import checker, problems
def test_fastq_checker():
assert checker.is_fastq("bad.fastq") == problems.PROB_FILE_IS_FASTQ
assert checker.is_fastq("good.py") == problems.PROB_NO_PROBLEM
assert checker.is_fastq("fastq.actually_ok_too") == problems.PROB_NO_PROBLEM
def ... | import pytest
import os, stat
from botbot import checker, problems
def test_fastq_checker_path_names():
assert checker.is_fastq("bad.fastq") == problems.PROB_FILE_IS_FASTQ
assert checker.is_fastq("good.py") == problems.PROB_NO_PROBLEM
assert checker.is_fastq("fastq.actually_ok_too") == problems.PROB_NO_PR... | <commit_before>import pytest
import os, stat
from botbot import checker, problems
def test_fastq_checker():
assert checker.is_fastq("bad.fastq") == problems.PROB_FILE_IS_FASTQ
assert checker.is_fastq("good.py") == problems.PROB_NO_PROBLEM
assert checker.is_fastq("fastq.actually_ok_too") == problems.PROB_N... | import pytest
import os, stat
from botbot import checker, problems
def test_fastq_checker_path_names():
assert checker.is_fastq("bad.fastq") == problems.PROB_FILE_IS_FASTQ
assert checker.is_fastq("good.py") == problems.PROB_NO_PROBLEM
assert checker.is_fastq("fastq.actually_ok_too") == problems.PROB_NO_PR... | import pytest
import os, stat
from botbot import checker, problems
def test_fastq_checker():
assert checker.is_fastq("bad.fastq") == problems.PROB_FILE_IS_FASTQ
assert checker.is_fastq("good.py") == problems.PROB_NO_PROBLEM
assert checker.is_fastq("fastq.actually_ok_too") == problems.PROB_NO_PROBLEM
def ... | <commit_before>import pytest
import os, stat
from botbot import checker, problems
def test_fastq_checker():
assert checker.is_fastq("bad.fastq") == problems.PROB_FILE_IS_FASTQ
assert checker.is_fastq("good.py") == problems.PROB_NO_PROBLEM
assert checker.is_fastq("fastq.actually_ok_too") == problems.PROB_N... |
faed82947209b34ccb4063e8244a9da019fa52a2 | bills/urls.py | bills/urls.py | from . import views
from django.conf.urls import url
urlpatterns = [
url(r'^by_topic/', views.bill_list_by_topic),
url(r'^by_location', views.bill_list_by_location),
url(r'^latest_activity/', views.latest_bill_activity),
url(r'^latest/', views.latest_bill_actions),
url(r'^detail/(?P<bill_session>(... | from . import views
from django.conf.urls import url
urlpatterns = [
url(r'^by_topic/', views.bill_list_by_topic),
url(r'^by_location', views.bill_list_by_location),
url(r'^current_session/', views.bill_list_current_session),
url(r'^latest_activity/', views.bill_list_latest),
url(r'^detail/(?P<bil... | Update bills added by current session | Update bills added by current session
| Python | mit | jamesturk/tot,jamesturk/tot,jamesturk/tot,jamesturk/tot,jamesturk/tot | from . import views
from django.conf.urls import url
urlpatterns = [
url(r'^by_topic/', views.bill_list_by_topic),
url(r'^by_location', views.bill_list_by_location),
url(r'^latest_activity/', views.latest_bill_activity),
url(r'^latest/', views.latest_bill_actions),
url(r'^detail/(?P<bill_session>(... | from . import views
from django.conf.urls import url
urlpatterns = [
url(r'^by_topic/', views.bill_list_by_topic),
url(r'^by_location', views.bill_list_by_location),
url(r'^current_session/', views.bill_list_current_session),
url(r'^latest_activity/', views.bill_list_latest),
url(r'^detail/(?P<bil... | <commit_before>from . import views
from django.conf.urls import url
urlpatterns = [
url(r'^by_topic/', views.bill_list_by_topic),
url(r'^by_location', views.bill_list_by_location),
url(r'^latest_activity/', views.latest_bill_activity),
url(r'^latest/', views.latest_bill_actions),
url(r'^detail/(?P... | from . import views
from django.conf.urls import url
urlpatterns = [
url(r'^by_topic/', views.bill_list_by_topic),
url(r'^by_location', views.bill_list_by_location),
url(r'^current_session/', views.bill_list_current_session),
url(r'^latest_activity/', views.bill_list_latest),
url(r'^detail/(?P<bil... | from . import views
from django.conf.urls import url
urlpatterns = [
url(r'^by_topic/', views.bill_list_by_topic),
url(r'^by_location', views.bill_list_by_location),
url(r'^latest_activity/', views.latest_bill_activity),
url(r'^latest/', views.latest_bill_actions),
url(r'^detail/(?P<bill_session>(... | <commit_before>from . import views
from django.conf.urls import url
urlpatterns = [
url(r'^by_topic/', views.bill_list_by_topic),
url(r'^by_location', views.bill_list_by_location),
url(r'^latest_activity/', views.latest_bill_activity),
url(r'^latest/', views.latest_bill_actions),
url(r'^detail/(?P... |
b631dadb54f90e4abb251f7680f883f2e3e0e914 | radar/radar/validation/patient_numbers.py | radar/radar/validation/patient_numbers.py | from radar.groups import is_radar_group
from radar.validation.core import Validation, pass_call, ValidationError, Field
from radar.validation.sources import RadarSourceValidationMixin
from radar.validation.meta import MetaValidationMixin
from radar.validation.patients import PatientValidationMixin
from radar.validation... | from radar.groups import is_radar_group, get_radar_group
from radar.validation.core import Validation, pass_call, ValidationError, Field
from radar.validation.sources import RadarSourceValidationMixin
from radar.validation.meta import MetaValidationMixin
from radar.validation.patients import PatientValidationMixin
from... | Check for duplicate patient numbers | Check for duplicate patient numbers
Fixes #286
| Python | agpl-3.0 | renalreg/radar,renalreg/radar,renalreg/radar,renalreg/radar | from radar.groups import is_radar_group
from radar.validation.core import Validation, pass_call, ValidationError, Field
from radar.validation.sources import RadarSourceValidationMixin
from radar.validation.meta import MetaValidationMixin
from radar.validation.patients import PatientValidationMixin
from radar.validation... | from radar.groups import is_radar_group, get_radar_group
from radar.validation.core import Validation, pass_call, ValidationError, Field
from radar.validation.sources import RadarSourceValidationMixin
from radar.validation.meta import MetaValidationMixin
from radar.validation.patients import PatientValidationMixin
from... | <commit_before>from radar.groups import is_radar_group
from radar.validation.core import Validation, pass_call, ValidationError, Field
from radar.validation.sources import RadarSourceValidationMixin
from radar.validation.meta import MetaValidationMixin
from radar.validation.patients import PatientValidationMixin
from r... | from radar.groups import is_radar_group, get_radar_group
from radar.validation.core import Validation, pass_call, ValidationError, Field
from radar.validation.sources import RadarSourceValidationMixin
from radar.validation.meta import MetaValidationMixin
from radar.validation.patients import PatientValidationMixin
from... | from radar.groups import is_radar_group
from radar.validation.core import Validation, pass_call, ValidationError, Field
from radar.validation.sources import RadarSourceValidationMixin
from radar.validation.meta import MetaValidationMixin
from radar.validation.patients import PatientValidationMixin
from radar.validation... | <commit_before>from radar.groups import is_radar_group
from radar.validation.core import Validation, pass_call, ValidationError, Field
from radar.validation.sources import RadarSourceValidationMixin
from radar.validation.meta import MetaValidationMixin
from radar.validation.patients import PatientValidationMixin
from r... |
6a01e99585db3ea38a8d8325dd4f826e78fc0f1d | test_project/settings.py | test_project/settings.py | import os
import sys
PROJECT_ROOT = os.path.abspath(os.path.dirname(__file__))
sys.path.insert(0, os.path.join(PROJECT_ROOT, '..'))
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.sqlite3',
}
}
INSTALLED_APPS = (
'djcelery_email',
'appconf',
'tester',
)
SECRET_KEY = 'unique sno... | import os
import sys
PROJECT_ROOT = os.path.abspath(os.path.dirname(__file__))
sys.path.insert(0, os.path.join(PROJECT_ROOT, '..'))
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.sqlite3',
}
}
INSTALLED_APPS = (
'djcelery_email',
'appconf',
'tester',
)
SECRET_KEY = 'unique sno... | Set MIDDLEWARE_CLASSES to stop Django 1.7 warnings. | Set MIDDLEWARE_CLASSES to stop Django 1.7 warnings.
| Python | bsd-3-clause | pmclanahan/django-celery-email,pmclanahan/django-celery-email | import os
import sys
PROJECT_ROOT = os.path.abspath(os.path.dirname(__file__))
sys.path.insert(0, os.path.join(PROJECT_ROOT, '..'))
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.sqlite3',
}
}
INSTALLED_APPS = (
'djcelery_email',
'appconf',
'tester',
)
SECRET_KEY = 'unique sno... | import os
import sys
PROJECT_ROOT = os.path.abspath(os.path.dirname(__file__))
sys.path.insert(0, os.path.join(PROJECT_ROOT, '..'))
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.sqlite3',
}
}
INSTALLED_APPS = (
'djcelery_email',
'appconf',
'tester',
)
SECRET_KEY = 'unique sno... | <commit_before>import os
import sys
PROJECT_ROOT = os.path.abspath(os.path.dirname(__file__))
sys.path.insert(0, os.path.join(PROJECT_ROOT, '..'))
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.sqlite3',
}
}
INSTALLED_APPS = (
'djcelery_email',
'appconf',
'tester',
)
SECRET_KE... | import os
import sys
PROJECT_ROOT = os.path.abspath(os.path.dirname(__file__))
sys.path.insert(0, os.path.join(PROJECT_ROOT, '..'))
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.sqlite3',
}
}
INSTALLED_APPS = (
'djcelery_email',
'appconf',
'tester',
)
SECRET_KEY = 'unique sno... | import os
import sys
PROJECT_ROOT = os.path.abspath(os.path.dirname(__file__))
sys.path.insert(0, os.path.join(PROJECT_ROOT, '..'))
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.sqlite3',
}
}
INSTALLED_APPS = (
'djcelery_email',
'appconf',
'tester',
)
SECRET_KEY = 'unique sno... | <commit_before>import os
import sys
PROJECT_ROOT = os.path.abspath(os.path.dirname(__file__))
sys.path.insert(0, os.path.join(PROJECT_ROOT, '..'))
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.sqlite3',
}
}
INSTALLED_APPS = (
'djcelery_email',
'appconf',
'tester',
)
SECRET_KE... |
f59b249cf2b149f96833d9e1025a98819bf5f62a | sharepa/search.py | sharepa/search.py | import json
import requests
from elasticsearch_dsl import Search
from elasticsearch_dsl.result import Response
class ShareSearch(Search):
BASE_URL = 'https://osf.io/api/v1/share/search/'
HEADERS = {'content-type': 'application/json'}
PARAMS = dict(raw=True)
def execute(self):
return Response... | import json
import requests
from elasticsearch_dsl import Search
from elasticsearch_dsl.result import Response
class ShareSearch(Search):
BASE_URL = 'http://localhost:8000/api/search/abstractcreativework/_search'
HEADERS = {'content-type': 'application/json'}
PARAMS = dict(raw=True)
def execute(self... | Fix count param, use local es for now | Fix count param, use local es for now
| Python | mit | CenterForOpenScience/sharepa,fabianvf/sharepa | import json
import requests
from elasticsearch_dsl import Search
from elasticsearch_dsl.result import Response
class ShareSearch(Search):
BASE_URL = 'https://osf.io/api/v1/share/search/'
HEADERS = {'content-type': 'application/json'}
PARAMS = dict(raw=True)
def execute(self):
return Response... | import json
import requests
from elasticsearch_dsl import Search
from elasticsearch_dsl.result import Response
class ShareSearch(Search):
BASE_URL = 'http://localhost:8000/api/search/abstractcreativework/_search'
HEADERS = {'content-type': 'application/json'}
PARAMS = dict(raw=True)
def execute(self... | <commit_before>import json
import requests
from elasticsearch_dsl import Search
from elasticsearch_dsl.result import Response
class ShareSearch(Search):
BASE_URL = 'https://osf.io/api/v1/share/search/'
HEADERS = {'content-type': 'application/json'}
PARAMS = dict(raw=True)
def execute(self):
... | import json
import requests
from elasticsearch_dsl import Search
from elasticsearch_dsl.result import Response
class ShareSearch(Search):
BASE_URL = 'http://localhost:8000/api/search/abstractcreativework/_search'
HEADERS = {'content-type': 'application/json'}
PARAMS = dict(raw=True)
def execute(self... | import json
import requests
from elasticsearch_dsl import Search
from elasticsearch_dsl.result import Response
class ShareSearch(Search):
BASE_URL = 'https://osf.io/api/v1/share/search/'
HEADERS = {'content-type': 'application/json'}
PARAMS = dict(raw=True)
def execute(self):
return Response... | <commit_before>import json
import requests
from elasticsearch_dsl import Search
from elasticsearch_dsl.result import Response
class ShareSearch(Search):
BASE_URL = 'https://osf.io/api/v1/share/search/'
HEADERS = {'content-type': 'application/json'}
PARAMS = dict(raw=True)
def execute(self):
... |
7e883fcfc539f18cd29c2babaf083583495f46d3 | migrations/versions/1f9c61031fa_.py | migrations/versions/1f9c61031fa_.py | """empty message
Revision ID: 1f9c61031fa
Revises: 1f872d11bbf
Create Date: 2016-01-24 17:46:54.879784
"""
# revision identifiers, used by Alembic.
revision = '1f9c61031fa'
down_revision = '1f872d11bbf'
from alembic import op
import sqlalchemy as sa
def upgrade():
### commands auto generated by Alembic - plea... | """empty message
Revision ID: 1f9c61031fa
Revises: 1f872d11bbf
Create Date: 2016-01-24 17:46:54.879784
"""
# revision identifiers, used by Alembic.
revision = '1f9c61031fa'
down_revision = '1f872d11bbf'
from alembic import op
import sqlalchemy as sa
def upgrade():
### commands auto generated by Alembic - plea... | Fix NOT NULL constraint on Setting name not being removed | Fix NOT NULL constraint on Setting name not being removed
| Python | mit | Encrylize/flask-blogger,Encrylize/flask-blogger,Encrylize/flask-blogger | """empty message
Revision ID: 1f9c61031fa
Revises: 1f872d11bbf
Create Date: 2016-01-24 17:46:54.879784
"""
# revision identifiers, used by Alembic.
revision = '1f9c61031fa'
down_revision = '1f872d11bbf'
from alembic import op
import sqlalchemy as sa
def upgrade():
### commands auto generated by Alembic - plea... | """empty message
Revision ID: 1f9c61031fa
Revises: 1f872d11bbf
Create Date: 2016-01-24 17:46:54.879784
"""
# revision identifiers, used by Alembic.
revision = '1f9c61031fa'
down_revision = '1f872d11bbf'
from alembic import op
import sqlalchemy as sa
def upgrade():
### commands auto generated by Alembic - plea... | <commit_before>"""empty message
Revision ID: 1f9c61031fa
Revises: 1f872d11bbf
Create Date: 2016-01-24 17:46:54.879784
"""
# revision identifiers, used by Alembic.
revision = '1f9c61031fa'
down_revision = '1f872d11bbf'
from alembic import op
import sqlalchemy as sa
def upgrade():
### commands auto generated by... | """empty message
Revision ID: 1f9c61031fa
Revises: 1f872d11bbf
Create Date: 2016-01-24 17:46:54.879784
"""
# revision identifiers, used by Alembic.
revision = '1f9c61031fa'
down_revision = '1f872d11bbf'
from alembic import op
import sqlalchemy as sa
def upgrade():
### commands auto generated by Alembic - plea... | """empty message
Revision ID: 1f9c61031fa
Revises: 1f872d11bbf
Create Date: 2016-01-24 17:46:54.879784
"""
# revision identifiers, used by Alembic.
revision = '1f9c61031fa'
down_revision = '1f872d11bbf'
from alembic import op
import sqlalchemy as sa
def upgrade():
### commands auto generated by Alembic - plea... | <commit_before>"""empty message
Revision ID: 1f9c61031fa
Revises: 1f872d11bbf
Create Date: 2016-01-24 17:46:54.879784
"""
# revision identifiers, used by Alembic.
revision = '1f9c61031fa'
down_revision = '1f872d11bbf'
from alembic import op
import sqlalchemy as sa
def upgrade():
### commands auto generated by... |
26c1daab6095c6110995104b94ad5b6260557c70 | aiortp/sdp.py | aiortp/sdp.py | class SDP:
def __init__(self, local_addr, ptime):
self.local_addr = local_addr
self.ptime = ptime
local_addr_desc = f'IN IP4 {self.local_addr[0]}'
self.payload = '\r\n'.join([
'v=0',
f'o=user1 53655765 2353687637 {local_addr_desc}',
's=-',
... | class SDP:
def __init__(self, local_addr, ptime):
self.local_addr = local_addr
self.ptime = ptime
local_addr_desc = 'IN IP4 {}'.format(self.local_addr[0])
self.payload = '\r\n'.join([
'v=0',
'o=user1 53655765 2353687637 {local_addr_desc}',
's=-',
... | Remove python 3.6 only format strings | Remove python 3.6 only format strings
| Python | apache-2.0 | vodik/aiortp | class SDP:
def __init__(self, local_addr, ptime):
self.local_addr = local_addr
self.ptime = ptime
local_addr_desc = f'IN IP4 {self.local_addr[0]}'
self.payload = '\r\n'.join([
'v=0',
f'o=user1 53655765 2353687637 {local_addr_desc}',
's=-',
... | class SDP:
def __init__(self, local_addr, ptime):
self.local_addr = local_addr
self.ptime = ptime
local_addr_desc = 'IN IP4 {}'.format(self.local_addr[0])
self.payload = '\r\n'.join([
'v=0',
'o=user1 53655765 2353687637 {local_addr_desc}',
's=-',
... | <commit_before>class SDP:
def __init__(self, local_addr, ptime):
self.local_addr = local_addr
self.ptime = ptime
local_addr_desc = f'IN IP4 {self.local_addr[0]}'
self.payload = '\r\n'.join([
'v=0',
f'o=user1 53655765 2353687637 {local_addr_desc}',
... | class SDP:
def __init__(self, local_addr, ptime):
self.local_addr = local_addr
self.ptime = ptime
local_addr_desc = 'IN IP4 {}'.format(self.local_addr[0])
self.payload = '\r\n'.join([
'v=0',
'o=user1 53655765 2353687637 {local_addr_desc}',
's=-',
... | class SDP:
def __init__(self, local_addr, ptime):
self.local_addr = local_addr
self.ptime = ptime
local_addr_desc = f'IN IP4 {self.local_addr[0]}'
self.payload = '\r\n'.join([
'v=0',
f'o=user1 53655765 2353687637 {local_addr_desc}',
's=-',
... | <commit_before>class SDP:
def __init__(self, local_addr, ptime):
self.local_addr = local_addr
self.ptime = ptime
local_addr_desc = f'IN IP4 {self.local_addr[0]}'
self.payload = '\r\n'.join([
'v=0',
f'o=user1 53655765 2353687637 {local_addr_desc}',
... |
e2ee9045c59e3f03c5342ee41d23e4adece43535 | weather/admin.py | weather/admin.py | from django.contrib.admin import ModelAdmin, register
from django.contrib.gis.admin import GeoModelAdmin
from weather.models import WeatherStation, Location
@register(Location)
class LocationAdmin(GeoModelAdmin):
pass
@register(WeatherStation)
class WeatherStationAdmin(ModelAdmin):
list_display = (
... | from django.contrib.admin import ModelAdmin, register
from django.contrib.gis.admin import GeoModelAdmin
from weather.models import WeatherStation, Location
@register(Location)
class LocationAdmin(GeoModelAdmin):
openlayers_url = '//static.dpaw.wa.gov.au/static/libs/openlayers/2.13.1/OpenLayers.js'
@register(We... | Define URL for OpenLayers.js to DPaW CDN. | Define URL for OpenLayers.js to DPaW CDN.
| Python | bsd-3-clause | parksandwildlife/resource_tracking,parksandwildlife/resource_tracking,ropable/resource_tracking,ropable/resource_tracking,ropable/resource_tracking,parksandwildlife/resource_tracking | from django.contrib.admin import ModelAdmin, register
from django.contrib.gis.admin import GeoModelAdmin
from weather.models import WeatherStation, Location
@register(Location)
class LocationAdmin(GeoModelAdmin):
pass
@register(WeatherStation)
class WeatherStationAdmin(ModelAdmin):
list_display = (
... | from django.contrib.admin import ModelAdmin, register
from django.contrib.gis.admin import GeoModelAdmin
from weather.models import WeatherStation, Location
@register(Location)
class LocationAdmin(GeoModelAdmin):
openlayers_url = '//static.dpaw.wa.gov.au/static/libs/openlayers/2.13.1/OpenLayers.js'
@register(We... | <commit_before>from django.contrib.admin import ModelAdmin, register
from django.contrib.gis.admin import GeoModelAdmin
from weather.models import WeatherStation, Location
@register(Location)
class LocationAdmin(GeoModelAdmin):
pass
@register(WeatherStation)
class WeatherStationAdmin(ModelAdmin):
list_displ... | from django.contrib.admin import ModelAdmin, register
from django.contrib.gis.admin import GeoModelAdmin
from weather.models import WeatherStation, Location
@register(Location)
class LocationAdmin(GeoModelAdmin):
openlayers_url = '//static.dpaw.wa.gov.au/static/libs/openlayers/2.13.1/OpenLayers.js'
@register(We... | from django.contrib.admin import ModelAdmin, register
from django.contrib.gis.admin import GeoModelAdmin
from weather.models import WeatherStation, Location
@register(Location)
class LocationAdmin(GeoModelAdmin):
pass
@register(WeatherStation)
class WeatherStationAdmin(ModelAdmin):
list_display = (
... | <commit_before>from django.contrib.admin import ModelAdmin, register
from django.contrib.gis.admin import GeoModelAdmin
from weather.models import WeatherStation, Location
@register(Location)
class LocationAdmin(GeoModelAdmin):
pass
@register(WeatherStation)
class WeatherStationAdmin(ModelAdmin):
list_displ... |
a6bd1cfc5f87d6f9a7ac846665fcab5b02c33c1d | tubular/scripts/hipchat/submit_hipchat_msg.py | tubular/scripts/hipchat/submit_hipchat_msg.py | import os
import sys
import requests
import click
HIPCHAT_API_URL = "http://api.hipchat.com"
NOTIFICATION_POST = "/v2/room/{}/notification"
AUTH_HEADER = "Authorization: Bearer {}"
@click.command()
@click.option('--auth_token_env_var', '-a',
help="Environment variable containing authentication token t... | import os
import sys
import requests
import click
HIPCHAT_API_URL = "http://api.hipchat.com"
NOTIFICATION_POST = "/v2/room/{}/notification"
AUTH_HEADER = "Authorization: Bearer {}"
@click.command()
@click.option('--auth_token_env_var', '-a',
help="Environment variable containing authentication token t... | Add ability to set HipChat message contents. | Add ability to set HipChat message contents.
| Python | agpl-3.0 | eltoncarr/tubular,eltoncarr/tubular | import os
import sys
import requests
import click
HIPCHAT_API_URL = "http://api.hipchat.com"
NOTIFICATION_POST = "/v2/room/{}/notification"
AUTH_HEADER = "Authorization: Bearer {}"
@click.command()
@click.option('--auth_token_env_var', '-a',
help="Environment variable containing authentication token t... | import os
import sys
import requests
import click
HIPCHAT_API_URL = "http://api.hipchat.com"
NOTIFICATION_POST = "/v2/room/{}/notification"
AUTH_HEADER = "Authorization: Bearer {}"
@click.command()
@click.option('--auth_token_env_var', '-a',
help="Environment variable containing authentication token t... | <commit_before>import os
import sys
import requests
import click
HIPCHAT_API_URL = "http://api.hipchat.com"
NOTIFICATION_POST = "/v2/room/{}/notification"
AUTH_HEADER = "Authorization: Bearer {}"
@click.command()
@click.option('--auth_token_env_var', '-a',
help="Environment variable containing authent... | import os
import sys
import requests
import click
HIPCHAT_API_URL = "http://api.hipchat.com"
NOTIFICATION_POST = "/v2/room/{}/notification"
AUTH_HEADER = "Authorization: Bearer {}"
@click.command()
@click.option('--auth_token_env_var', '-a',
help="Environment variable containing authentication token t... | import os
import sys
import requests
import click
HIPCHAT_API_URL = "http://api.hipchat.com"
NOTIFICATION_POST = "/v2/room/{}/notification"
AUTH_HEADER = "Authorization: Bearer {}"
@click.command()
@click.option('--auth_token_env_var', '-a',
help="Environment variable containing authentication token t... | <commit_before>import os
import sys
import requests
import click
HIPCHAT_API_URL = "http://api.hipchat.com"
NOTIFICATION_POST = "/v2/room/{}/notification"
AUTH_HEADER = "Authorization: Bearer {}"
@click.command()
@click.option('--auth_token_env_var', '-a',
help="Environment variable containing authent... |
e58e33fbce322ba94ce60afc053b3610ad5bf993 | opps/__init__.py | opps/__init__.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import pkg_resources
pkg_resources.declare_namespace(__name__)
VERSION = (0, 1, 4)
__version__ = ".".join(map(str, VERSION))
__status__ = "Development"
__description__ = u"Opps CMS websites magazines and high-traffic"
__author__ = u"Thiago Avelino"
__credits__ = []
__em... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import pkg_resources
pkg_resources.declare_namespace(__name__)
VERSION = (0, 1, 5)
__version__ = ".".join(map(str, VERSION))
__status__ = "Development"
__description__ = u"Opps CMS websites magazines and high-traffic"
__author__ = u"Thiago Avelino"
__credits__ = []
__em... | Upgrade version 0.1.4 to 0.1.5 | Upgrade version 0.1.4 to 0.1.5
| Python | mit | jeanmask/opps,YACOWS/opps,opps/opps,williamroot/opps,williamroot/opps,YACOWS/opps,opps/opps,williamroot/opps,williamroot/opps,jeanmask/opps,YACOWS/opps,jeanmask/opps,YACOWS/opps,jeanmask/opps,opps/opps,opps/opps | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import pkg_resources
pkg_resources.declare_namespace(__name__)
VERSION = (0, 1, 4)
__version__ = ".".join(map(str, VERSION))
__status__ = "Development"
__description__ = u"Opps CMS websites magazines and high-traffic"
__author__ = u"Thiago Avelino"
__credits__ = []
__em... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import pkg_resources
pkg_resources.declare_namespace(__name__)
VERSION = (0, 1, 5)
__version__ = ".".join(map(str, VERSION))
__status__ = "Development"
__description__ = u"Opps CMS websites magazines and high-traffic"
__author__ = u"Thiago Avelino"
__credits__ = []
__em... | <commit_before>#!/usr/bin/env python
# -*- coding: utf-8 -*-
import pkg_resources
pkg_resources.declare_namespace(__name__)
VERSION = (0, 1, 4)
__version__ = ".".join(map(str, VERSION))
__status__ = "Development"
__description__ = u"Opps CMS websites magazines and high-traffic"
__author__ = u"Thiago Avelino"
__cred... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import pkg_resources
pkg_resources.declare_namespace(__name__)
VERSION = (0, 1, 5)
__version__ = ".".join(map(str, VERSION))
__status__ = "Development"
__description__ = u"Opps CMS websites magazines and high-traffic"
__author__ = u"Thiago Avelino"
__credits__ = []
__em... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import pkg_resources
pkg_resources.declare_namespace(__name__)
VERSION = (0, 1, 4)
__version__ = ".".join(map(str, VERSION))
__status__ = "Development"
__description__ = u"Opps CMS websites magazines and high-traffic"
__author__ = u"Thiago Avelino"
__credits__ = []
__em... | <commit_before>#!/usr/bin/env python
# -*- coding: utf-8 -*-
import pkg_resources
pkg_resources.declare_namespace(__name__)
VERSION = (0, 1, 4)
__version__ = ".".join(map(str, VERSION))
__status__ = "Development"
__description__ = u"Opps CMS websites magazines and high-traffic"
__author__ = u"Thiago Avelino"
__cred... |
283f4d0dc1896b35e1c6be3458a99c87b9296659 | amaascore/asset_managers/enums.py | amaascore/asset_managers/enums.py | from __future__ import absolute_import, division, print_function, unicode_literals
ASSET_MANAGER_TYPES = {'Accredited Investor', 'Bank', 'Broker', 'Corporate Treasury', 'Family Office',
'Fund Administrator', 'Fund Manager', 'Hedge Fund', 'Private Equity', 'Retail',
'Ventu... | from __future__ import absolute_import, division, print_function, unicode_literals
ASSET_MANAGER_TYPES = {'Accredited Investor', 'Bank', 'Broker', 'Corporate Treasury', 'Family Office',
'Fund Administrator', 'Fund Manager', 'Hedge Fund', 'Individual', 'Private Equity',
'V... | Migrate “Retail” to “Individual” for clarity. AMAAS-764. | Migrate “Retail” to “Individual” for clarity. AMAAS-764.
| Python | apache-2.0 | paul-rs/amaas-core-sdk-python,amaas-fintech/amaas-core-sdk-python,nedlowe/amaas-core-sdk-python,nedlowe/amaas-core-sdk-python,amaas-fintech/amaas-core-sdk-python,paul-rs/amaas-core-sdk-python | from __future__ import absolute_import, division, print_function, unicode_literals
ASSET_MANAGER_TYPES = {'Accredited Investor', 'Bank', 'Broker', 'Corporate Treasury', 'Family Office',
'Fund Administrator', 'Fund Manager', 'Hedge Fund', 'Private Equity', 'Retail',
'Ventu... | from __future__ import absolute_import, division, print_function, unicode_literals
ASSET_MANAGER_TYPES = {'Accredited Investor', 'Bank', 'Broker', 'Corporate Treasury', 'Family Office',
'Fund Administrator', 'Fund Manager', 'Hedge Fund', 'Individual', 'Private Equity',
'V... | <commit_before>from __future__ import absolute_import, division, print_function, unicode_literals
ASSET_MANAGER_TYPES = {'Accredited Investor', 'Bank', 'Broker', 'Corporate Treasury', 'Family Office',
'Fund Administrator', 'Fund Manager', 'Hedge Fund', 'Private Equity', 'Retail',
... | from __future__ import absolute_import, division, print_function, unicode_literals
ASSET_MANAGER_TYPES = {'Accredited Investor', 'Bank', 'Broker', 'Corporate Treasury', 'Family Office',
'Fund Administrator', 'Fund Manager', 'Hedge Fund', 'Individual', 'Private Equity',
'V... | from __future__ import absolute_import, division, print_function, unicode_literals
ASSET_MANAGER_TYPES = {'Accredited Investor', 'Bank', 'Broker', 'Corporate Treasury', 'Family Office',
'Fund Administrator', 'Fund Manager', 'Hedge Fund', 'Private Equity', 'Retail',
'Ventu... | <commit_before>from __future__ import absolute_import, division, print_function, unicode_literals
ASSET_MANAGER_TYPES = {'Accredited Investor', 'Bank', 'Broker', 'Corporate Treasury', 'Family Office',
'Fund Administrator', 'Fund Manager', 'Hedge Fund', 'Private Equity', 'Retail',
... |
b17104be53389604b4b7f5f109895bdaa6389e43 | hic/flow.py | hic/flow.py | # -*- coding: utf-8 -*-
from __future__ import division
import numpy as np
import numexpr as ne
__all__ = 'qn', 'FlowCumulant'
def qn(n, phi):
return ne.evaluate('sum(exp(1j*n*phi))')
class FlowCumulant(object):
def __init__(self, multiplicities, qn):
self.multiplicities = np.asarray(multipliciti... | # -*- coding: utf-8 -*-
from __future__ import division
import numpy as np
import numexpr as ne
__all__ = 'qn', 'FlowCumulant'
# If a variable is only ever used by numexpr, flake8 will flag it as unused.
# The comment 'noqa' prevents this warning.
def qn(n, phi):
return ne.evaluate('sum(exp(1j*n*phi))')
cl... | Add note about flake8 ignore flag. | Add note about flake8 ignore flag.
| Python | mit | jbernhard/hic,Duke-QCD/hic | # -*- coding: utf-8 -*-
from __future__ import division
import numpy as np
import numexpr as ne
__all__ = 'qn', 'FlowCumulant'
def qn(n, phi):
return ne.evaluate('sum(exp(1j*n*phi))')
class FlowCumulant(object):
def __init__(self, multiplicities, qn):
self.multiplicities = np.asarray(multipliciti... | # -*- coding: utf-8 -*-
from __future__ import division
import numpy as np
import numexpr as ne
__all__ = 'qn', 'FlowCumulant'
# If a variable is only ever used by numexpr, flake8 will flag it as unused.
# The comment 'noqa' prevents this warning.
def qn(n, phi):
return ne.evaluate('sum(exp(1j*n*phi))')
cl... | <commit_before># -*- coding: utf-8 -*-
from __future__ import division
import numpy as np
import numexpr as ne
__all__ = 'qn', 'FlowCumulant'
def qn(n, phi):
return ne.evaluate('sum(exp(1j*n*phi))')
class FlowCumulant(object):
def __init__(self, multiplicities, qn):
self.multiplicities = np.asarr... | # -*- coding: utf-8 -*-
from __future__ import division
import numpy as np
import numexpr as ne
__all__ = 'qn', 'FlowCumulant'
# If a variable is only ever used by numexpr, flake8 will flag it as unused.
# The comment 'noqa' prevents this warning.
def qn(n, phi):
return ne.evaluate('sum(exp(1j*n*phi))')
cl... | # -*- coding: utf-8 -*-
from __future__ import division
import numpy as np
import numexpr as ne
__all__ = 'qn', 'FlowCumulant'
def qn(n, phi):
return ne.evaluate('sum(exp(1j*n*phi))')
class FlowCumulant(object):
def __init__(self, multiplicities, qn):
self.multiplicities = np.asarray(multipliciti... | <commit_before># -*- coding: utf-8 -*-
from __future__ import division
import numpy as np
import numexpr as ne
__all__ = 'qn', 'FlowCumulant'
def qn(n, phi):
return ne.evaluate('sum(exp(1j*n*phi))')
class FlowCumulant(object):
def __init__(self, multiplicities, qn):
self.multiplicities = np.asarr... |
bbd3190b31a3751d9173b81d6f53c937208969a7 | tests/main_test.py | tests/main_test.py | #!/usr/bin/env python3
from libpals.util import xor_find_singlechar_key, hamming_distance, fixed_xor
def test_xor_find_singlechar_key():
input = '1b37373331363f78151b7f2b783431333d78397828372d363c78373e783a393b3736'
ciphertext = bytes.fromhex(input)
result = xor_find_singlechar_key(ciphertext)
assert ... | #!/usr/bin/env python3
from libpals.util import (
xor_find_singlechar_key,
hamming_distance,
fixed_xor
)
def test_xor_find_singlechar_key():
input = '1b37373331363f78151b7f2b783431333d78397828372d363c78373e783a393b3736'
ciphertext = bytes.fromhex(input)
result = xor_find_singlechar_key(ciphert... | Change to multi-line imports in the test suite | Change to multi-line imports in the test suite
| Python | bsd-2-clause | cpach/cryptopals-python3 | #!/usr/bin/env python3
from libpals.util import xor_find_singlechar_key, hamming_distance, fixed_xor
def test_xor_find_singlechar_key():
input = '1b37373331363f78151b7f2b783431333d78397828372d363c78373e783a393b3736'
ciphertext = bytes.fromhex(input)
result = xor_find_singlechar_key(ciphertext)
assert ... | #!/usr/bin/env python3
from libpals.util import (
xor_find_singlechar_key,
hamming_distance,
fixed_xor
)
def test_xor_find_singlechar_key():
input = '1b37373331363f78151b7f2b783431333d78397828372d363c78373e783a393b3736'
ciphertext = bytes.fromhex(input)
result = xor_find_singlechar_key(ciphert... | <commit_before>#!/usr/bin/env python3
from libpals.util import xor_find_singlechar_key, hamming_distance, fixed_xor
def test_xor_find_singlechar_key():
input = '1b37373331363f78151b7f2b783431333d78397828372d363c78373e783a393b3736'
ciphertext = bytes.fromhex(input)
result = xor_find_singlechar_key(cipherte... | #!/usr/bin/env python3
from libpals.util import (
xor_find_singlechar_key,
hamming_distance,
fixed_xor
)
def test_xor_find_singlechar_key():
input = '1b37373331363f78151b7f2b783431333d78397828372d363c78373e783a393b3736'
ciphertext = bytes.fromhex(input)
result = xor_find_singlechar_key(ciphert... | #!/usr/bin/env python3
from libpals.util import xor_find_singlechar_key, hamming_distance, fixed_xor
def test_xor_find_singlechar_key():
input = '1b37373331363f78151b7f2b783431333d78397828372d363c78373e783a393b3736'
ciphertext = bytes.fromhex(input)
result = xor_find_singlechar_key(ciphertext)
assert ... | <commit_before>#!/usr/bin/env python3
from libpals.util import xor_find_singlechar_key, hamming_distance, fixed_xor
def test_xor_find_singlechar_key():
input = '1b37373331363f78151b7f2b783431333d78397828372d363c78373e783a393b3736'
ciphertext = bytes.fromhex(input)
result = xor_find_singlechar_key(cipherte... |
6a54876a30ec92c0243cf758b7ddf35d7ad3b926 | pgup/__init__.py | pgup/__init__.py | # -*- coding: utf-8 -*-
__version__ = "0.2.3"
from config import Config
from build_init import build_init
from build_diff import build_diff
| # -*- coding: utf-8 -*-
__version__ = "0.2.4"
from config import Config
from build_init import build_init
from build_diff import build_diff
| Add skiping not Table, Procedure files | Add skiping not Table, Procedure files
| Python | mit | stepan-perlov/pgup | # -*- coding: utf-8 -*-
__version__ = "0.2.3"
from config import Config
from build_init import build_init
from build_diff import build_diff
Add skiping not Table, Procedure files | # -*- coding: utf-8 -*-
__version__ = "0.2.4"
from config import Config
from build_init import build_init
from build_diff import build_diff
| <commit_before># -*- coding: utf-8 -*-
__version__ = "0.2.3"
from config import Config
from build_init import build_init
from build_diff import build_diff
<commit_msg>Add skiping not Table, Procedure files<commit_after> | # -*- coding: utf-8 -*-
__version__ = "0.2.4"
from config import Config
from build_init import build_init
from build_diff import build_diff
| # -*- coding: utf-8 -*-
__version__ = "0.2.3"
from config import Config
from build_init import build_init
from build_diff import build_diff
Add skiping not Table, Procedure files# -*- coding: utf-8 -*-
__version__ = "0.2.4"
from config import Config
from build_init import build_init
from build_diff import build_diff
| <commit_before># -*- coding: utf-8 -*-
__version__ = "0.2.3"
from config import Config
from build_init import build_init
from build_diff import build_diff
<commit_msg>Add skiping not Table, Procedure files<commit_after># -*- coding: utf-8 -*-
__version__ = "0.2.4"
from config import Config
from build_init import build_... |
e44eb0bd99b4dec1b78707c7343fc6d9b647c7bb | scripts/write_antenna_location_file.py | scripts/write_antenna_location_file.py | #! /usr/bin/env python
# -*- mode: python; coding: utf-8 -*-
# Copyright 2016 the HERA Collaboration
# Licensed under the 2-clause BSD license.
"""
Script to write out antenna locations for use in cal files.
"""
import pandas as pd
from hera_mc import mc, geo_handling
import datetime
parser = mc.get_mc_argument_parse... | #! /usr/bin/env python
# -*- mode: python; coding: utf-8 -*-
# Copyright 2016 the HERA Collaboration
# Licensed under the 2-clause BSD license.
"""
Script to write out antenna locations for use in cal files.
"""
import pandas as pd
from hera_mc import mc, geo_handling
import datetime
parser = mc.get_mc_argument_parse... | Add cofa information to antenna location files | Add cofa information to antenna location files
| Python | bsd-2-clause | HERA-Team/hera_mc,HERA-Team/Monitor_and_Control,HERA-Team/hera_mc | #! /usr/bin/env python
# -*- mode: python; coding: utf-8 -*-
# Copyright 2016 the HERA Collaboration
# Licensed under the 2-clause BSD license.
"""
Script to write out antenna locations for use in cal files.
"""
import pandas as pd
from hera_mc import mc, geo_handling
import datetime
parser = mc.get_mc_argument_parse... | #! /usr/bin/env python
# -*- mode: python; coding: utf-8 -*-
# Copyright 2016 the HERA Collaboration
# Licensed under the 2-clause BSD license.
"""
Script to write out antenna locations for use in cal files.
"""
import pandas as pd
from hera_mc import mc, geo_handling
import datetime
parser = mc.get_mc_argument_parse... | <commit_before>#! /usr/bin/env python
# -*- mode: python; coding: utf-8 -*-
# Copyright 2016 the HERA Collaboration
# Licensed under the 2-clause BSD license.
"""
Script to write out antenna locations for use in cal files.
"""
import pandas as pd
from hera_mc import mc, geo_handling
import datetime
parser = mc.get_mc... | #! /usr/bin/env python
# -*- mode: python; coding: utf-8 -*-
# Copyright 2016 the HERA Collaboration
# Licensed under the 2-clause BSD license.
"""
Script to write out antenna locations for use in cal files.
"""
import pandas as pd
from hera_mc import mc, geo_handling
import datetime
parser = mc.get_mc_argument_parse... | #! /usr/bin/env python
# -*- mode: python; coding: utf-8 -*-
# Copyright 2016 the HERA Collaboration
# Licensed under the 2-clause BSD license.
"""
Script to write out antenna locations for use in cal files.
"""
import pandas as pd
from hera_mc import mc, geo_handling
import datetime
parser = mc.get_mc_argument_parse... | <commit_before>#! /usr/bin/env python
# -*- mode: python; coding: utf-8 -*-
# Copyright 2016 the HERA Collaboration
# Licensed under the 2-clause BSD license.
"""
Script to write out antenna locations for use in cal files.
"""
import pandas as pd
from hera_mc import mc, geo_handling
import datetime
parser = mc.get_mc... |
6bbee1abf5e53c3e3ce9cc84f35820ee9fe11500 | dsub/_dsub_version.py | dsub/_dsub_version.py | # Copyright 2017 Google Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or a... | # Copyright 2017 Google Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or a... | Update dsub version to 0.3.9 | Update dsub version to 0.3.9
PiperOrigin-RevId: 319808345
| Python | apache-2.0 | DataBiosphere/dsub,DataBiosphere/dsub | # Copyright 2017 Google Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or a... | # Copyright 2017 Google Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or a... | <commit_before># Copyright 2017 Google Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by appl... | # Copyright 2017 Google Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or a... | # Copyright 2017 Google Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or a... | <commit_before># Copyright 2017 Google Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by appl... |
e3cba925ea106baa99951ac7b3ee72599ee7277d | demos/fs-demo/main.py | demos/fs-demo/main.py | import random
import os
from microbit import *
if 'messages.txt' in os.listdir():
with open('messages.txt') as message_file:
messages = message_file.read().split('\n')
while True:
if button_a.was_pressed():
display.scroll(random.choice(messages))
| import random
import os
import speech
from microbit import *
if 'messages.txt' in os.listdir():
with open('messages.txt') as message_file:
messages = message_file.read().split('\n')
while True:
if button_a.was_pressed():
speech.say(random.choice(messages))
| Change output in fs-demo to voice. | Change output in fs-demo to voice.
| Python | mit | mathisgerdes/microbit-macau | import random
import os
from microbit import *
if 'messages.txt' in os.listdir():
with open('messages.txt') as message_file:
messages = message_file.read().split('\n')
while True:
if button_a.was_pressed():
display.scroll(random.choice(messages))
Change output in fs-demo to voice... | import random
import os
import speech
from microbit import *
if 'messages.txt' in os.listdir():
with open('messages.txt') as message_file:
messages = message_file.read().split('\n')
while True:
if button_a.was_pressed():
speech.say(random.choice(messages))
| <commit_before>import random
import os
from microbit import *
if 'messages.txt' in os.listdir():
with open('messages.txt') as message_file:
messages = message_file.read().split('\n')
while True:
if button_a.was_pressed():
display.scroll(random.choice(messages))
<commit_msg>Change... | import random
import os
import speech
from microbit import *
if 'messages.txt' in os.listdir():
with open('messages.txt') as message_file:
messages = message_file.read().split('\n')
while True:
if button_a.was_pressed():
speech.say(random.choice(messages))
| import random
import os
from microbit import *
if 'messages.txt' in os.listdir():
with open('messages.txt') as message_file:
messages = message_file.read().split('\n')
while True:
if button_a.was_pressed():
display.scroll(random.choice(messages))
Change output in fs-demo to voice... | <commit_before>import random
import os
from microbit import *
if 'messages.txt' in os.listdir():
with open('messages.txt') as message_file:
messages = message_file.read().split('\n')
while True:
if button_a.was_pressed():
display.scroll(random.choice(messages))
<commit_msg>Change... |
4545d11c2462ccb6d7848d185f5fe358a51af5f6 | Trimmer.py | Trimmer.py | import sublime
import sublime_plugin
class TrimmerCommand(sublime_plugin.TextCommand):
def run(self, edit):
view = self.view
trailing_white_space = view.find_all("[\t ]+$")
trailing_white_space.reverse()
edit = view.begin_edit()
for r in trailing_white_space:
... | import sublime
import sublime_plugin
class TrimmerCommand(sublime_plugin.TextCommand):
def run(self, edit):
view = self.view
trailing_white_space = view.find_all("[\t ]+$")
trailing_white_space.reverse()
for r in trailing_white_space:
view.erase(edit, r)
subl... | Remove calls to begin, end edit object. | Remove calls to begin, end edit object.
| Python | mit | jonlabelle/Trimmer,jonlabelle/Trimmer | import sublime
import sublime_plugin
class TrimmerCommand(sublime_plugin.TextCommand):
def run(self, edit):
view = self.view
trailing_white_space = view.find_all("[\t ]+$")
trailing_white_space.reverse()
edit = view.begin_edit()
for r in trailing_white_space:
... | import sublime
import sublime_plugin
class TrimmerCommand(sublime_plugin.TextCommand):
def run(self, edit):
view = self.view
trailing_white_space = view.find_all("[\t ]+$")
trailing_white_space.reverse()
for r in trailing_white_space:
view.erase(edit, r)
subl... | <commit_before>import sublime
import sublime_plugin
class TrimmerCommand(sublime_plugin.TextCommand):
def run(self, edit):
view = self.view
trailing_white_space = view.find_all("[\t ]+$")
trailing_white_space.reverse()
edit = view.begin_edit()
for r in trailing_white_spa... | import sublime
import sublime_plugin
class TrimmerCommand(sublime_plugin.TextCommand):
def run(self, edit):
view = self.view
trailing_white_space = view.find_all("[\t ]+$")
trailing_white_space.reverse()
for r in trailing_white_space:
view.erase(edit, r)
subl... | import sublime
import sublime_plugin
class TrimmerCommand(sublime_plugin.TextCommand):
def run(self, edit):
view = self.view
trailing_white_space = view.find_all("[\t ]+$")
trailing_white_space.reverse()
edit = view.begin_edit()
for r in trailing_white_space:
... | <commit_before>import sublime
import sublime_plugin
class TrimmerCommand(sublime_plugin.TextCommand):
def run(self, edit):
view = self.view
trailing_white_space = view.find_all("[\t ]+$")
trailing_white_space.reverse()
edit = view.begin_edit()
for r in trailing_white_spa... |
ca6891f3b867fd691c0b682566ffec1fd7f0ac2a | pryvate/blueprints/simple/simple.py | pryvate/blueprints/simple/simple.py | """Simple blueprint."""
import os
from flask import Blueprint, current_app, make_response, render_template
blueprint = Blueprint('simple', __name__, url_prefix='/simple',
template_folder='templates')
@blueprint.route('', methods=['POST'])
def search_simple():
"""Handling pip search."""
re... | """Simple blueprint."""
import os
from flask import Blueprint, current_app, make_response, render_template
blueprint = Blueprint('simple', __name__, url_prefix='/simple',
template_folder='templates')
@blueprint.route('', methods=['POST'])
def search_simple():
"""Handling pip search."""
re... | Return 404 if package was not found instead of raising an exception | Return 404 if package was not found instead of raising an exception
| Python | mit | Dinoshauer/pryvate,Dinoshauer/pryvate | """Simple blueprint."""
import os
from flask import Blueprint, current_app, make_response, render_template
blueprint = Blueprint('simple', __name__, url_prefix='/simple',
template_folder='templates')
@blueprint.route('', methods=['POST'])
def search_simple():
"""Handling pip search."""
re... | """Simple blueprint."""
import os
from flask import Blueprint, current_app, make_response, render_template
blueprint = Blueprint('simple', __name__, url_prefix='/simple',
template_folder='templates')
@blueprint.route('', methods=['POST'])
def search_simple():
"""Handling pip search."""
re... | <commit_before>"""Simple blueprint."""
import os
from flask import Blueprint, current_app, make_response, render_template
blueprint = Blueprint('simple', __name__, url_prefix='/simple',
template_folder='templates')
@blueprint.route('', methods=['POST'])
def search_simple():
"""Handling pip se... | """Simple blueprint."""
import os
from flask import Blueprint, current_app, make_response, render_template
blueprint = Blueprint('simple', __name__, url_prefix='/simple',
template_folder='templates')
@blueprint.route('', methods=['POST'])
def search_simple():
"""Handling pip search."""
re... | """Simple blueprint."""
import os
from flask import Blueprint, current_app, make_response, render_template
blueprint = Blueprint('simple', __name__, url_prefix='/simple',
template_folder='templates')
@blueprint.route('', methods=['POST'])
def search_simple():
"""Handling pip search."""
re... | <commit_before>"""Simple blueprint."""
import os
from flask import Blueprint, current_app, make_response, render_template
blueprint = Blueprint('simple', __name__, url_prefix='/simple',
template_folder='templates')
@blueprint.route('', methods=['POST'])
def search_simple():
"""Handling pip se... |
37c08c15ecc31f90429b20ee2d4561c2886036c2 | pyaavso/utils.py | pyaavso/utils.py | from __future__ import unicode_literals
import logging
import requests
from .parsers import WebObsResultsParser
logger = logging.getLogger(__name__)
WEBOBS_RESULTS_URL = 'http://www.aavso.org/apps/webobs/results/'
def download_observations(observer_code):
"""
Downloads all variable star observations by ... | from __future__ import unicode_literals
import logging
import requests
from .parsers import WebObsResultsParser
logger = logging.getLogger(__name__)
WEBOBS_RESULTS_URL = 'http://www.aavso.org/apps/webobs/results/'
def download_observations(observer_code):
"""
Downloads all variable star observations by ... | Use response.text for automatic decoding. | Use response.text for automatic decoding.
| Python | mit | zsiciarz/pyaavso | from __future__ import unicode_literals
import logging
import requests
from .parsers import WebObsResultsParser
logger = logging.getLogger(__name__)
WEBOBS_RESULTS_URL = 'http://www.aavso.org/apps/webobs/results/'
def download_observations(observer_code):
"""
Downloads all variable star observations by ... | from __future__ import unicode_literals
import logging
import requests
from .parsers import WebObsResultsParser
logger = logging.getLogger(__name__)
WEBOBS_RESULTS_URL = 'http://www.aavso.org/apps/webobs/results/'
def download_observations(observer_code):
"""
Downloads all variable star observations by ... | <commit_before>from __future__ import unicode_literals
import logging
import requests
from .parsers import WebObsResultsParser
logger = logging.getLogger(__name__)
WEBOBS_RESULTS_URL = 'http://www.aavso.org/apps/webobs/results/'
def download_observations(observer_code):
"""
Downloads all variable star o... | from __future__ import unicode_literals
import logging
import requests
from .parsers import WebObsResultsParser
logger = logging.getLogger(__name__)
WEBOBS_RESULTS_URL = 'http://www.aavso.org/apps/webobs/results/'
def download_observations(observer_code):
"""
Downloads all variable star observations by ... | from __future__ import unicode_literals
import logging
import requests
from .parsers import WebObsResultsParser
logger = logging.getLogger(__name__)
WEBOBS_RESULTS_URL = 'http://www.aavso.org/apps/webobs/results/'
def download_observations(observer_code):
"""
Downloads all variable star observations by ... | <commit_before>from __future__ import unicode_literals
import logging
import requests
from .parsers import WebObsResultsParser
logger = logging.getLogger(__name__)
WEBOBS_RESULTS_URL = 'http://www.aavso.org/apps/webobs/results/'
def download_observations(observer_code):
"""
Downloads all variable star o... |
52e675ec6789d8ecaddae98a6b36bc8b0c3f6e1e | socketio/sdjango.py | socketio/sdjango.py | import logging
from socketio import socketio_manage
from django.conf.urls import patterns, url, include
from django.http import HttpResponse
SOCKETIO_NS = {}
class namespace(object):
def __init__(self, name=''):
self.name = name
def __call__(self, handler):
SOCKETIO_NS[self.name] = handler
... | import logging
from socketio import socketio_manage
from django.conf.urls import patterns, url, include
from django.http import HttpResponse
from django.views.decorators.csrf import csrf_exempt
SOCKETIO_NS = {}
class namespace(object):
def __init__(self, name=''):
self.name = name
def __call__(self... | Remove django CSRF protection for socket.io view | Remove django CSRF protection for socket.io view
| Python | bsd-3-clause | abourget/gevent-socketio,yacneyac/gevent-socketio,kazmiruk/gevent-socketio,kazmiruk/gevent-socketio,yacneyac/gevent-socketio,arnuschky/gevent-socketio,gutomaia/gevent-socketio,smurfix/gevent-socketio,arnuschky/gevent-socketio,hzruandd/gevent-socketio,theskumar-archive/gevent-socketio,abourget/gevent-socketio,gutomaia/g... | import logging
from socketio import socketio_manage
from django.conf.urls import patterns, url, include
from django.http import HttpResponse
SOCKETIO_NS = {}
class namespace(object):
def __init__(self, name=''):
self.name = name
def __call__(self, handler):
SOCKETIO_NS[self.name] = handler
... | import logging
from socketio import socketio_manage
from django.conf.urls import patterns, url, include
from django.http import HttpResponse
from django.views.decorators.csrf import csrf_exempt
SOCKETIO_NS = {}
class namespace(object):
def __init__(self, name=''):
self.name = name
def __call__(self... | <commit_before>import logging
from socketio import socketio_manage
from django.conf.urls import patterns, url, include
from django.http import HttpResponse
SOCKETIO_NS = {}
class namespace(object):
def __init__(self, name=''):
self.name = name
def __call__(self, handler):
SOCKETIO_NS[self.n... | import logging
from socketio import socketio_manage
from django.conf.urls import patterns, url, include
from django.http import HttpResponse
from django.views.decorators.csrf import csrf_exempt
SOCKETIO_NS = {}
class namespace(object):
def __init__(self, name=''):
self.name = name
def __call__(self... | import logging
from socketio import socketio_manage
from django.conf.urls import patterns, url, include
from django.http import HttpResponse
SOCKETIO_NS = {}
class namespace(object):
def __init__(self, name=''):
self.name = name
def __call__(self, handler):
SOCKETIO_NS[self.name] = handler
... | <commit_before>import logging
from socketio import socketio_manage
from django.conf.urls import patterns, url, include
from django.http import HttpResponse
SOCKETIO_NS = {}
class namespace(object):
def __init__(self, name=''):
self.name = name
def __call__(self, handler):
SOCKETIO_NS[self.n... |
1fdceb6b8072317eff901a8f2b74db60269ca373 | python/grade-school/grade_school.py | python/grade-school/grade_school.py | from collections import defaultdict
class School:
def __init__(self):
self.db = defaultdict(list)
def add_student(self, name, grade):
self.db[grade].append(name)
self.db[grade] = sorted(self.db[grade])
def roster(self):
all_student_names = []
for grade_number in so... | from collections import defaultdict
class School:
def __init__(self):
self.db = defaultdict(list)
def add_student(self, name, grade):
self.db[grade].append(name)
self.db[grade] = sorted(self.db[grade])
def roster(self):
all_student_names = []
for grade_number in s... | Add newline to fix lint warning | Add newline to fix lint warning
| Python | mit | rootulp/exercism,rootulp/exercism,rootulp/exercism,rootulp/exercism,rootulp/exercism,rootulp/exercism,rootulp/exercism,rootulp/exercism | from collections import defaultdict
class School:
def __init__(self):
self.db = defaultdict(list)
def add_student(self, name, grade):
self.db[grade].append(name)
self.db[grade] = sorted(self.db[grade])
def roster(self):
all_student_names = []
for grade_number in so... | from collections import defaultdict
class School:
def __init__(self):
self.db = defaultdict(list)
def add_student(self, name, grade):
self.db[grade].append(name)
self.db[grade] = sorted(self.db[grade])
def roster(self):
all_student_names = []
for grade_number in s... | <commit_before>from collections import defaultdict
class School:
def __init__(self):
self.db = defaultdict(list)
def add_student(self, name, grade):
self.db[grade].append(name)
self.db[grade] = sorted(self.db[grade])
def roster(self):
all_student_names = []
for gra... | from collections import defaultdict
class School:
def __init__(self):
self.db = defaultdict(list)
def add_student(self, name, grade):
self.db[grade].append(name)
self.db[grade] = sorted(self.db[grade])
def roster(self):
all_student_names = []
for grade_number in s... | from collections import defaultdict
class School:
def __init__(self):
self.db = defaultdict(list)
def add_student(self, name, grade):
self.db[grade].append(name)
self.db[grade] = sorted(self.db[grade])
def roster(self):
all_student_names = []
for grade_number in so... | <commit_before>from collections import defaultdict
class School:
def __init__(self):
self.db = defaultdict(list)
def add_student(self, name, grade):
self.db[grade].append(name)
self.db[grade] = sorted(self.db[grade])
def roster(self):
all_student_names = []
for gra... |
8ff8b9400adf24e082908befed7788099b01f328 | bench/pact-suite/scripts/opcount_merge.py | bench/pact-suite/scripts/opcount_merge.py | #!/usr/bin/env python2.7
import sys
files = sys.argv[1:]
keys = set()
fileVals = []
for file in files:
vals = {}
fileVals.append(vals)
try:
for line in open(file).readlines():
k, v = line.split()
vals[k] = v
keys.add(k)
except Exception, e:
print "Error in line \"%s\" of file %s" % (... | #!/usr/bin/env python2.7
import sys
files = sys.argv[1:]
keys = set()
fileVals = []
for file in files:
vals = {}
fileVals.append(vals)
try:
for line in open(file).readlines():
toks = line.split()
if len(toks) != 2:
print >> sys.stderr, "Bad line: %s" % repr(toks)
else:
k, v... | Add initial data for operations counts | Add initial data for operations counts
git-svn-id: 0c5512015aa96f7d3f5c3ad598bd98edc52008b1@12204 dc4e9af1-7f46-4ead-bba6-71afc04862de
| Python | apache-2.0 | basheersubei/swift-t,blue42u/swift-t,swift-lang/swift-t,JohnPJenkins/swift-t,swift-lang/swift-t,blue42u/swift-t,swift-lang/swift-t,swift-lang/swift-t,JohnPJenkins/swift-t,basheersubei/swift-t,JohnPJenkins/swift-t,JohnPJenkins/swift-t,JohnPJenkins/swift-t,basheersubei/swift-t,basheersubei/swift-t,basheersubei/swift-t,Jo... | #!/usr/bin/env python2.7
import sys
files = sys.argv[1:]
keys = set()
fileVals = []
for file in files:
vals = {}
fileVals.append(vals)
try:
for line in open(file).readlines():
k, v = line.split()
vals[k] = v
keys.add(k)
except Exception, e:
print "Error in line \"%s\" of file %s" % (... | #!/usr/bin/env python2.7
import sys
files = sys.argv[1:]
keys = set()
fileVals = []
for file in files:
vals = {}
fileVals.append(vals)
try:
for line in open(file).readlines():
toks = line.split()
if len(toks) != 2:
print >> sys.stderr, "Bad line: %s" % repr(toks)
else:
k, v... | <commit_before>#!/usr/bin/env python2.7
import sys
files = sys.argv[1:]
keys = set()
fileVals = []
for file in files:
vals = {}
fileVals.append(vals)
try:
for line in open(file).readlines():
k, v = line.split()
vals[k] = v
keys.add(k)
except Exception, e:
print "Error in line \"%s\" ... | #!/usr/bin/env python2.7
import sys
files = sys.argv[1:]
keys = set()
fileVals = []
for file in files:
vals = {}
fileVals.append(vals)
try:
for line in open(file).readlines():
toks = line.split()
if len(toks) != 2:
print >> sys.stderr, "Bad line: %s" % repr(toks)
else:
k, v... | #!/usr/bin/env python2.7
import sys
files = sys.argv[1:]
keys = set()
fileVals = []
for file in files:
vals = {}
fileVals.append(vals)
try:
for line in open(file).readlines():
k, v = line.split()
vals[k] = v
keys.add(k)
except Exception, e:
print "Error in line \"%s\" of file %s" % (... | <commit_before>#!/usr/bin/env python2.7
import sys
files = sys.argv[1:]
keys = set()
fileVals = []
for file in files:
vals = {}
fileVals.append(vals)
try:
for line in open(file).readlines():
k, v = line.split()
vals[k] = v
keys.add(k)
except Exception, e:
print "Error in line \"%s\" ... |
b6099b64efb6e74e754d0911bd64512b6b6b631b | quokka/modules/accounts/tests/test_model.py | quokka/modules/accounts/tests/test_model.py | # coding: utf-8
from flask.ext.testing import TestCase
from quokka import create_app
from flask.ext.security.utils import encrypt_password
from ..models import User
class TestAuthModels(TestCase):
def setUp(self):
self.db = self.app.extensions.get('mongoengine')
self.user_dict = {
'na... | # coding: utf-8
from flask.ext.testing import TestCase
from quokka import create_app
from flask.ext.security.utils import encrypt_password
from ..models import User
class TestAuthModels(TestCase):
def setUp(self):
self.user_dict = {
'name': u'Guybrush Treepwood',
'email': u'guybru... | Remove unused config on accounts tests | Remove unused config on accounts tests
| Python | mit | maurobaraldi/quokka,ChengChiongWah/quokka,wushuyi/quokka,cbeloni/quokka,alexandre/quokka,wushuyi/quokka,cbeloni/quokka,wushuyi/quokka,fdumpling/quokka,fdumpling/quokka,lnick/quokka,maurobaraldi/quokka,fdumpling/quokka,ChengChiongWah/quokka,romulocollopy/quokka,CoolCloud/quokka,romulocollopy/quokka,CoolCloud/quokka,Ckai... | # coding: utf-8
from flask.ext.testing import TestCase
from quokka import create_app
from flask.ext.security.utils import encrypt_password
from ..models import User
class TestAuthModels(TestCase):
def setUp(self):
self.db = self.app.extensions.get('mongoengine')
self.user_dict = {
'na... | # coding: utf-8
from flask.ext.testing import TestCase
from quokka import create_app
from flask.ext.security.utils import encrypt_password
from ..models import User
class TestAuthModels(TestCase):
def setUp(self):
self.user_dict = {
'name': u'Guybrush Treepwood',
'email': u'guybru... | <commit_before># coding: utf-8
from flask.ext.testing import TestCase
from quokka import create_app
from flask.ext.security.utils import encrypt_password
from ..models import User
class TestAuthModels(TestCase):
def setUp(self):
self.db = self.app.extensions.get('mongoengine')
self.user_dict = {
... | # coding: utf-8
from flask.ext.testing import TestCase
from quokka import create_app
from flask.ext.security.utils import encrypt_password
from ..models import User
class TestAuthModels(TestCase):
def setUp(self):
self.user_dict = {
'name': u'Guybrush Treepwood',
'email': u'guybru... | # coding: utf-8
from flask.ext.testing import TestCase
from quokka import create_app
from flask.ext.security.utils import encrypt_password
from ..models import User
class TestAuthModels(TestCase):
def setUp(self):
self.db = self.app.extensions.get('mongoengine')
self.user_dict = {
'na... | <commit_before># coding: utf-8
from flask.ext.testing import TestCase
from quokka import create_app
from flask.ext.security.utils import encrypt_password
from ..models import User
class TestAuthModels(TestCase):
def setUp(self):
self.db = self.app.extensions.get('mongoengine')
self.user_dict = {
... |
24e780dd0f30e4bf9696a6fd185d20fb297f0bd0 | rsk_mind/transformer/transformer.py | rsk_mind/transformer/transformer.py | class Transformer(object):
class Feats():
exclude = None
def __init__(self):
for field in self.get_feats():
getattr(self.Feats, field).bind(field, self)
def get_feats(self):
return [x for x in dir(self.Feats) if not (x.startswith('__') or x in ['exclude'])]
def get... | class Transformer(object):
"""
Base class for all transformer
"""
class Feats:
"""
Define feats on dataset
"""
exclude = None
def __init__(self):
for field in self.get_feats():
getattr(self.Feats, field).bind(field, self)
def get_fea... | Add documentation and some methods | Add documentation and some methods
| Python | mit | rsk-mind/rsk-mind-framework | class Transformer(object):
class Feats():
exclude = None
def __init__(self):
for field in self.get_feats():
getattr(self.Feats, field).bind(field, self)
def get_feats(self):
return [x for x in dir(self.Feats) if not (x.startswith('__') or x in ['exclude'])]
def get... | class Transformer(object):
"""
Base class for all transformer
"""
class Feats:
"""
Define feats on dataset
"""
exclude = None
def __init__(self):
for field in self.get_feats():
getattr(self.Feats, field).bind(field, self)
def get_fea... | <commit_before>class Transformer(object):
class Feats():
exclude = None
def __init__(self):
for field in self.get_feats():
getattr(self.Feats, field).bind(field, self)
def get_feats(self):
return [x for x in dir(self.Feats) if not (x.startswith('__') or x in ['exclude']... | class Transformer(object):
"""
Base class for all transformer
"""
class Feats:
"""
Define feats on dataset
"""
exclude = None
def __init__(self):
for field in self.get_feats():
getattr(self.Feats, field).bind(field, self)
def get_fea... | class Transformer(object):
class Feats():
exclude = None
def __init__(self):
for field in self.get_feats():
getattr(self.Feats, field).bind(field, self)
def get_feats(self):
return [x for x in dir(self.Feats) if not (x.startswith('__') or x in ['exclude'])]
def get... | <commit_before>class Transformer(object):
class Feats():
exclude = None
def __init__(self):
for field in self.get_feats():
getattr(self.Feats, field).bind(field, self)
def get_feats(self):
return [x for x in dir(self.Feats) if not (x.startswith('__') or x in ['exclude']... |
644c69a25d81ae4473d19bfe1faa6b7fe10e8afd | dsub/_dsub_version.py | dsub/_dsub_version.py | # Copyright 2017 Google Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or a... | # Copyright 2017 Google Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or a... | Update dsub version to 0.3.9.dev0 | Update dsub version to 0.3.9.dev0
PiperOrigin-RevId: 313432033
| Python | apache-2.0 | DataBiosphere/dsub,DataBiosphere/dsub | # Copyright 2017 Google Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or a... | # Copyright 2017 Google Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or a... | <commit_before># Copyright 2017 Google Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by appl... | # Copyright 2017 Google Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or a... | # Copyright 2017 Google Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or a... | <commit_before># Copyright 2017 Google Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by appl... |
a6ae4171de33dd77e9109523380c1330d4037f9f | gengine/app/tests/runner.py | gengine/app/tests/runner.py | from gengine.app.tests import db as db
from gengine.metadata import init_declarative_base, init_session
import unittest
import os
import pkgutil
import testing.redis
import logging
log = logging.getLogger(__name__)
init_session()
init_declarative_base()
__path__ = [x[0] for x in os.walk(os.path.dirname(__file__))]
... | from gengine.app.tests import db as db
from gengine.metadata import init_declarative_base, init_session
import unittest
import os
import pkgutil
import testing.redis
import logging
import sys
log = logging.getLogger(__name__)
init_session()
init_declarative_base()
__path__ = [x[0] for x in os.walk(os.path.dirname(__... | Add missing import for sys | Add missing import for sys | Python | mit | ActiDoo/gamification-engine,ActiDoo/gamification-engine,ActiDoo/gamification-engine,ActiDoo/gamification-engine | from gengine.app.tests import db as db
from gengine.metadata import init_declarative_base, init_session
import unittest
import os
import pkgutil
import testing.redis
import logging
log = logging.getLogger(__name__)
init_session()
init_declarative_base()
__path__ = [x[0] for x in os.walk(os.path.dirname(__file__))]
... | from gengine.app.tests import db as db
from gengine.metadata import init_declarative_base, init_session
import unittest
import os
import pkgutil
import testing.redis
import logging
import sys
log = logging.getLogger(__name__)
init_session()
init_declarative_base()
__path__ = [x[0] for x in os.walk(os.path.dirname(__... | <commit_before>from gengine.app.tests import db as db
from gengine.metadata import init_declarative_base, init_session
import unittest
import os
import pkgutil
import testing.redis
import logging
log = logging.getLogger(__name__)
init_session()
init_declarative_base()
__path__ = [x[0] for x in os.walk(os.path.dirnam... | from gengine.app.tests import db as db
from gengine.metadata import init_declarative_base, init_session
import unittest
import os
import pkgutil
import testing.redis
import logging
import sys
log = logging.getLogger(__name__)
init_session()
init_declarative_base()
__path__ = [x[0] for x in os.walk(os.path.dirname(__... | from gengine.app.tests import db as db
from gengine.metadata import init_declarative_base, init_session
import unittest
import os
import pkgutil
import testing.redis
import logging
log = logging.getLogger(__name__)
init_session()
init_declarative_base()
__path__ = [x[0] for x in os.walk(os.path.dirname(__file__))]
... | <commit_before>from gengine.app.tests import db as db
from gengine.metadata import init_declarative_base, init_session
import unittest
import os
import pkgutil
import testing.redis
import logging
log = logging.getLogger(__name__)
init_session()
init_declarative_base()
__path__ = [x[0] for x in os.walk(os.path.dirnam... |
2ebb667b38b3d74003948347f411f177ca584834 | boardinghouse/contrib/template/models.py | boardinghouse/contrib/template/models.py | from django.db import models
from django.utils import six
from boardinghouse.base import SharedSchemaMixin
from boardinghouse.schema import activate_schema, deactivate_schema
@six.python_2_unicode_compatible
class SchemaTemplate(SharedSchemaMixin, models.Model):
"""
A ``boardinghouse.contrib.template.models.... | from django.db import models
from django.utils import six
from django.utils.functional import lazy
from boardinghouse.base import SharedSchemaMixin
from boardinghouse.schema import activate_schema, deactivate_schema, get_schema_model
def verbose_name_plural():
return u'template {}'.format(get_schema_model()._met... | Use 'template ...' for the SchemaTemplate verbose_name* | Use 'template ...' for the SchemaTemplate verbose_name*
| Python | bsd-3-clause | schinckel/django-boardinghouse,schinckel/django-boardinghouse,schinckel/django-boardinghouse | from django.db import models
from django.utils import six
from boardinghouse.base import SharedSchemaMixin
from boardinghouse.schema import activate_schema, deactivate_schema
@six.python_2_unicode_compatible
class SchemaTemplate(SharedSchemaMixin, models.Model):
"""
A ``boardinghouse.contrib.template.models.... | from django.db import models
from django.utils import six
from django.utils.functional import lazy
from boardinghouse.base import SharedSchemaMixin
from boardinghouse.schema import activate_schema, deactivate_schema, get_schema_model
def verbose_name_plural():
return u'template {}'.format(get_schema_model()._met... | <commit_before>from django.db import models
from django.utils import six
from boardinghouse.base import SharedSchemaMixin
from boardinghouse.schema import activate_schema, deactivate_schema
@six.python_2_unicode_compatible
class SchemaTemplate(SharedSchemaMixin, models.Model):
"""
A ``boardinghouse.contrib.t... | from django.db import models
from django.utils import six
from django.utils.functional import lazy
from boardinghouse.base import SharedSchemaMixin
from boardinghouse.schema import activate_schema, deactivate_schema, get_schema_model
def verbose_name_plural():
return u'template {}'.format(get_schema_model()._met... | from django.db import models
from django.utils import six
from boardinghouse.base import SharedSchemaMixin
from boardinghouse.schema import activate_schema, deactivate_schema
@six.python_2_unicode_compatible
class SchemaTemplate(SharedSchemaMixin, models.Model):
"""
A ``boardinghouse.contrib.template.models.... | <commit_before>from django.db import models
from django.utils import six
from boardinghouse.base import SharedSchemaMixin
from boardinghouse.schema import activate_schema, deactivate_schema
@six.python_2_unicode_compatible
class SchemaTemplate(SharedSchemaMixin, models.Model):
"""
A ``boardinghouse.contrib.t... |
0ea4abe8b2e44bdd02308ad590ffb1e846201300 | terms/sitemaps.py | terms/sitemaps.py | from django.contrib.sitemaps import Sitemap
from .models import Term
class TermsSitemap(Sitemap):
changefreq = 'yearly'
priority = 0.1
def items(self):
return Term.objects.all()
| from django.contrib.sitemaps import Sitemap
from django.db.models import Q
from .models import Term
class TermsSitemap(Sitemap):
changefreq = 'yearly'
priority = 0.1
def items(self):
return Term.objects.filter(Q(url__startswith='/') | Q(url=''))
| Exclude external urls from the sitemap. | Exclude external urls from the sitemap.
| Python | bsd-3-clause | philippeowagner/django-terms,BertrandBordage/django-terms,philippeowagner/django-terms,BertrandBordage/django-terms | from django.contrib.sitemaps import Sitemap
from .models import Term
class TermsSitemap(Sitemap):
changefreq = 'yearly'
priority = 0.1
def items(self):
return Term.objects.all()
Exclude external urls from the sitemap. | from django.contrib.sitemaps import Sitemap
from django.db.models import Q
from .models import Term
class TermsSitemap(Sitemap):
changefreq = 'yearly'
priority = 0.1
def items(self):
return Term.objects.filter(Q(url__startswith='/') | Q(url=''))
| <commit_before>from django.contrib.sitemaps import Sitemap
from .models import Term
class TermsSitemap(Sitemap):
changefreq = 'yearly'
priority = 0.1
def items(self):
return Term.objects.all()
<commit_msg>Exclude external urls from the sitemap.<commit_after> | from django.contrib.sitemaps import Sitemap
from django.db.models import Q
from .models import Term
class TermsSitemap(Sitemap):
changefreq = 'yearly'
priority = 0.1
def items(self):
return Term.objects.filter(Q(url__startswith='/') | Q(url=''))
| from django.contrib.sitemaps import Sitemap
from .models import Term
class TermsSitemap(Sitemap):
changefreq = 'yearly'
priority = 0.1
def items(self):
return Term.objects.all()
Exclude external urls from the sitemap.from django.contrib.sitemaps import Sitemap
from django.db.models import Q
from ... | <commit_before>from django.contrib.sitemaps import Sitemap
from .models import Term
class TermsSitemap(Sitemap):
changefreq = 'yearly'
priority = 0.1
def items(self):
return Term.objects.all()
<commit_msg>Exclude external urls from the sitemap.<commit_after>from django.contrib.sitemaps import Sit... |
ddf2075228a8c250cf75ec85914801262cb73177 | zerver/migrations/0032_verify_all_medium_avatar_images.py | zerver/migrations/0032_verify_all_medium_avatar_images.py | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations
from django.db.backends.postgresql_psycopg2.schema import DatabaseSchemaEditor
from django.db.migrations.state import StateApps
from zerver.lib.upload import upload_backend
def verify_medium_avatar_image(apps, schema_ed... | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.conf import settings
from django.db import migrations
from django.db.backends.postgresql_psycopg2.schema import DatabaseSchemaEditor
from django.db.migrations.state import StateApps
from mock import patch
from zerver.lib.utils import make_saf... | Make migration 0032 use an old version of user_avatar_path. | Make migration 0032 use an old version of user_avatar_path.
This fixes upgrading from very old Zulip servers (e.g. 1.4.3) all the
way to current.
Fixes: #6516.
| Python | apache-2.0 | hackerkid/zulip,kou/zulip,amanharitsh123/zulip,brockwhittaker/zulip,showell/zulip,hackerkid/zulip,rishig/zulip,verma-varsha/zulip,synicalsyntax/zulip,zulip/zulip,amanharitsh123/zulip,showell/zulip,punchagan/zulip,amanharitsh123/zulip,punchagan/zulip,timabbott/zulip,rht/zulip,tommyip/zulip,eeshangarg/zulip,Galexrt/zulip... | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations
from django.db.backends.postgresql_psycopg2.schema import DatabaseSchemaEditor
from django.db.migrations.state import StateApps
from zerver.lib.upload import upload_backend
def verify_medium_avatar_image(apps, schema_ed... | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.conf import settings
from django.db import migrations
from django.db.backends.postgresql_psycopg2.schema import DatabaseSchemaEditor
from django.db.migrations.state import StateApps
from mock import patch
from zerver.lib.utils import make_saf... | <commit_before># -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations
from django.db.backends.postgresql_psycopg2.schema import DatabaseSchemaEditor
from django.db.migrations.state import StateApps
from zerver.lib.upload import upload_backend
def verify_medium_avatar_image(... | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.conf import settings
from django.db import migrations
from django.db.backends.postgresql_psycopg2.schema import DatabaseSchemaEditor
from django.db.migrations.state import StateApps
from mock import patch
from zerver.lib.utils import make_saf... | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations
from django.db.backends.postgresql_psycopg2.schema import DatabaseSchemaEditor
from django.db.migrations.state import StateApps
from zerver.lib.upload import upload_backend
def verify_medium_avatar_image(apps, schema_ed... | <commit_before># -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations
from django.db.backends.postgresql_psycopg2.schema import DatabaseSchemaEditor
from django.db.migrations.state import StateApps
from zerver.lib.upload import upload_backend
def verify_medium_avatar_image(... |
674dfb000cca79998674cd0b490ae6f3f992b313 | blazarclient/tests/__init__.py | blazarclient/tests/__init__.py |
# Copyright (c) 2014 Mirantis.
#
# 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... |
# Copyright (c) 2014 Mirantis.
#
# 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... | Use fixtures instead of deprecated mockpatch module | Use fixtures instead of deprecated mockpatch module
The mockpatch module of oslotest is deprecated since version 1.13
and may be removed in version 2.0. Use fixtures.Mock* classes instead.
Change-Id: I0ea834d41664efe84aa28ef2362467e2ad8b1928
| Python | apache-2.0 | openstack/python-blazarclient,ChameleonCloud/python-blazarclient,stackforge/python-blazarclient |
# Copyright (c) 2014 Mirantis.
#
# 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... |
# Copyright (c) 2014 Mirantis.
#
# 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... | <commit_before>
# Copyright (c) 2014 Mirantis.
#
# 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 agree... |
# Copyright (c) 2014 Mirantis.
#
# 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... |
# Copyright (c) 2014 Mirantis.
#
# 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... | <commit_before>
# Copyright (c) 2014 Mirantis.
#
# 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 agree... |
191d73fb6d30b691da8d9c55bfd36f055aea19d5 | backend/pokehelper.py | backend/pokehelper.py | import json
import os
class Pokehelper(object):
def __init__(self):
basepath = os.path.dirname(__file__)
filepath = os.path.abspath(os.path.join(basepath, 'data/pokemon.json' ))
with open(filepath) as pokejson:
self.pokelist = json.load(pokejson)
###
### LIST STARTS AT 0, EVE... | import json
import os
emptymon = {'moves1': [], 'family': 1, 'name': 'not-in-database', 'moves2': [], 'type2': 'nil', 'id': -1, 'candy': -1, 'type1': 'nil', 'stats': {'stamina': -1, 'attack': -1, 'defense': -1}}
class Pokehelper(object):
def __init__(self):
basepath = os.path.dirname(__file__)
... | Add fallback if pokemon_id > 151 | Add fallback if pokemon_id > 151
| Python | mit | Phaetec/pogo-cruncher,Phaetec/pogo-cruncher,Phaetec/pogo-cruncher | import json
import os
class Pokehelper(object):
def __init__(self):
basepath = os.path.dirname(__file__)
filepath = os.path.abspath(os.path.join(basepath, 'data/pokemon.json' ))
with open(filepath) as pokejson:
self.pokelist = json.load(pokejson)
###
### LIST STARTS AT 0, EVE... | import json
import os
emptymon = {'moves1': [], 'family': 1, 'name': 'not-in-database', 'moves2': [], 'type2': 'nil', 'id': -1, 'candy': -1, 'type1': 'nil', 'stats': {'stamina': -1, 'attack': -1, 'defense': -1}}
class Pokehelper(object):
def __init__(self):
basepath = os.path.dirname(__file__)
... | <commit_before>import json
import os
class Pokehelper(object):
def __init__(self):
basepath = os.path.dirname(__file__)
filepath = os.path.abspath(os.path.join(basepath, 'data/pokemon.json' ))
with open(filepath) as pokejson:
self.pokelist = json.load(pokejson)
###
### LIST S... | import json
import os
emptymon = {'moves1': [], 'family': 1, 'name': 'not-in-database', 'moves2': [], 'type2': 'nil', 'id': -1, 'candy': -1, 'type1': 'nil', 'stats': {'stamina': -1, 'attack': -1, 'defense': -1}}
class Pokehelper(object):
def __init__(self):
basepath = os.path.dirname(__file__)
... | import json
import os
class Pokehelper(object):
def __init__(self):
basepath = os.path.dirname(__file__)
filepath = os.path.abspath(os.path.join(basepath, 'data/pokemon.json' ))
with open(filepath) as pokejson:
self.pokelist = json.load(pokejson)
###
### LIST STARTS AT 0, EVE... | <commit_before>import json
import os
class Pokehelper(object):
def __init__(self):
basepath = os.path.dirname(__file__)
filepath = os.path.abspath(os.path.join(basepath, 'data/pokemon.json' ))
with open(filepath) as pokejson:
self.pokelist = json.load(pokejson)
###
### LIST S... |
4b3e2289dbf20c0e2a7e0f83c7bd5963f2aa311f | longshot.py | longshot.py |
HOME_URL = 'https://github.com/ftobia/longshot/blob/master/longshot.py'
def upgrade():
backup_self()
download_and_overwrite()
restart()
def backup_self():
import shutil
new_name = __file__ + '.bak'
shutil.copy(__file__, new_name)
def download_and_overwrite():
import urllib2
respo... |
HOME_URL = 'https://raw.githubusercontent.com/ftobia/longshot/develop/longshot.py'
def upgrade():
backup_self()
download_and_overwrite()
restart()
def backup_self():
import shutil
new_name = __file__ + '.bak'
shutil.copy(__file__, new_name)
def download_and_overwrite():
import urllib... | Use the right download URL. | Use the right download URL.
| Python | bsd-3-clause | ftobia/longshot |
HOME_URL = 'https://github.com/ftobia/longshot/blob/master/longshot.py'
def upgrade():
backup_self()
download_and_overwrite()
restart()
def backup_self():
import shutil
new_name = __file__ + '.bak'
shutil.copy(__file__, new_name)
def download_and_overwrite():
import urllib2
respo... |
HOME_URL = 'https://raw.githubusercontent.com/ftobia/longshot/develop/longshot.py'
def upgrade():
backup_self()
download_and_overwrite()
restart()
def backup_self():
import shutil
new_name = __file__ + '.bak'
shutil.copy(__file__, new_name)
def download_and_overwrite():
import urllib... | <commit_before>
HOME_URL = 'https://github.com/ftobia/longshot/blob/master/longshot.py'
def upgrade():
backup_self()
download_and_overwrite()
restart()
def backup_self():
import shutil
new_name = __file__ + '.bak'
shutil.copy(__file__, new_name)
def download_and_overwrite():
import ur... |
HOME_URL = 'https://raw.githubusercontent.com/ftobia/longshot/develop/longshot.py'
def upgrade():
backup_self()
download_and_overwrite()
restart()
def backup_self():
import shutil
new_name = __file__ + '.bak'
shutil.copy(__file__, new_name)
def download_and_overwrite():
import urllib... |
HOME_URL = 'https://github.com/ftobia/longshot/blob/master/longshot.py'
def upgrade():
backup_self()
download_and_overwrite()
restart()
def backup_self():
import shutil
new_name = __file__ + '.bak'
shutil.copy(__file__, new_name)
def download_and_overwrite():
import urllib2
respo... | <commit_before>
HOME_URL = 'https://github.com/ftobia/longshot/blob/master/longshot.py'
def upgrade():
backup_self()
download_and_overwrite()
restart()
def backup_self():
import shutil
new_name = __file__ + '.bak'
shutil.copy(__file__, new_name)
def download_and_overwrite():
import ur... |
7574528d839dc627ea53032b547e0e1c23a51f6b | rdioexport/_client/__init__.py | rdioexport/_client/__init__.py | import json
from ._base import get_base_rdio_client
class _RdioExportClient(object):
def __init__(self, base_client):
self.base_client = base_client
def get_current_user_key(self):
return self.base_client.call('currentUser')['key']
def get_collection_by_album(self, batch_size=100):
... | import json
from ._base import get_base_rdio_client
class _RdioExportClient(object):
def __init__(self, base_client):
self.base_client = base_client
def get_current_user_key(self):
return self.base_client.call('currentUser')['key']
def get_collection_by_album(self, batch_size=100):
... | Remove unused field from request. | Remove unused field from request.
| Python | isc | alexhanson/rdio-export | import json
from ._base import get_base_rdio_client
class _RdioExportClient(object):
def __init__(self, base_client):
self.base_client = base_client
def get_current_user_key(self):
return self.base_client.call('currentUser')['key']
def get_collection_by_album(self, batch_size=100):
... | import json
from ._base import get_base_rdio_client
class _RdioExportClient(object):
def __init__(self, base_client):
self.base_client = base_client
def get_current_user_key(self):
return self.base_client.call('currentUser')['key']
def get_collection_by_album(self, batch_size=100):
... | <commit_before>import json
from ._base import get_base_rdio_client
class _RdioExportClient(object):
def __init__(self, base_client):
self.base_client = base_client
def get_current_user_key(self):
return self.base_client.call('currentUser')['key']
def get_collection_by_album(self, batch_s... | import json
from ._base import get_base_rdio_client
class _RdioExportClient(object):
def __init__(self, base_client):
self.base_client = base_client
def get_current_user_key(self):
return self.base_client.call('currentUser')['key']
def get_collection_by_album(self, batch_size=100):
... | import json
from ._base import get_base_rdio_client
class _RdioExportClient(object):
def __init__(self, base_client):
self.base_client = base_client
def get_current_user_key(self):
return self.base_client.call('currentUser')['key']
def get_collection_by_album(self, batch_size=100):
... | <commit_before>import json
from ._base import get_base_rdio_client
class _RdioExportClient(object):
def __init__(self, base_client):
self.base_client = base_client
def get_current_user_key(self):
return self.base_client.call('currentUser')['key']
def get_collection_by_album(self, batch_s... |
e5d78dcfca7afffda7126e4e71944f40cdd9c272 | tests/__init__.py | tests/__init__.py | #
# For the license of this file, please consult the LICENSE file in the
# root directory of this distribution.
#
# All tests in the test suite.
__all__ = ( "bitfield_tests", "zscii_tests" )
| #
# For the license of this file, please consult the LICENSE file in the
# root directory of this distribution.
#
# All tests in the test suite.
__all__ = ( "bitfield_tests", "zscii_tests", "lexer_tests", "glk_tests" )
| Make run_tests run all tests if no arguments are provided. | Make run_tests run all tests if no arguments are provided.
| Python | bsd-3-clause | sussman/zvm,sussman/zvm | #
# For the license of this file, please consult the LICENSE file in the
# root directory of this distribution.
#
# All tests in the test suite.
__all__ = ( "bitfield_tests", "zscii_tests" )
Make run_tests run all tests if no arguments are provided. | #
# For the license of this file, please consult the LICENSE file in the
# root directory of this distribution.
#
# All tests in the test suite.
__all__ = ( "bitfield_tests", "zscii_tests", "lexer_tests", "glk_tests" )
| <commit_before>#
# For the license of this file, please consult the LICENSE file in the
# root directory of this distribution.
#
# All tests in the test suite.
__all__ = ( "bitfield_tests", "zscii_tests" )
<commit_msg>Make run_tests run all tests if no arguments are provided.<commit_after> | #
# For the license of this file, please consult the LICENSE file in the
# root directory of this distribution.
#
# All tests in the test suite.
__all__ = ( "bitfield_tests", "zscii_tests", "lexer_tests", "glk_tests" )
| #
# For the license of this file, please consult the LICENSE file in the
# root directory of this distribution.
#
# All tests in the test suite.
__all__ = ( "bitfield_tests", "zscii_tests" )
Make run_tests run all tests if no arguments are provided.#
# For the license of this file, please consult the LICENSE file in t... | <commit_before>#
# For the license of this file, please consult the LICENSE file in the
# root directory of this distribution.
#
# All tests in the test suite.
__all__ = ( "bitfield_tests", "zscii_tests" )
<commit_msg>Make run_tests run all tests if no arguments are provided.<commit_after>#
# For the license of this f... |
65cd819b73c4a28b67a30b46b264b330d9967582 | flicks/users/forms.py | flicks/users/forms.py | from django import forms
from tower import ugettext_lazy as _lazy
from flicks.base.util import country_choices
from flicks.users.models import UserProfile
class UserProfileForm(forms.ModelForm):
# L10n: Used in a choice field where users can choose between receiving
# L10n: HTML-based or Text-only newslette... | from django import forms
from tower import ugettext_lazy as _lazy
from flicks.base.util import country_choices
from flicks.users.models import UserProfile
class UserProfileForm(forms.ModelForm):
# L10n: Used in a choice field where users can choose between receiving
# L10n: HTML-based or Text-only newslette... | Make privacy checkbox on user form required via required attribute. | Make privacy checkbox on user form required via required attribute. | Python | bsd-3-clause | mozilla/firefox-flicks,mozilla/firefox-flicks,mozilla/firefox-flicks,mozilla/firefox-flicks | from django import forms
from tower import ugettext_lazy as _lazy
from flicks.base.util import country_choices
from flicks.users.models import UserProfile
class UserProfileForm(forms.ModelForm):
# L10n: Used in a choice field where users can choose between receiving
# L10n: HTML-based or Text-only newslette... | from django import forms
from tower import ugettext_lazy as _lazy
from flicks.base.util import country_choices
from flicks.users.models import UserProfile
class UserProfileForm(forms.ModelForm):
# L10n: Used in a choice field where users can choose between receiving
# L10n: HTML-based or Text-only newslette... | <commit_before>from django import forms
from tower import ugettext_lazy as _lazy
from flicks.base.util import country_choices
from flicks.users.models import UserProfile
class UserProfileForm(forms.ModelForm):
# L10n: Used in a choice field where users can choose between receiving
# L10n: HTML-based or Text... | from django import forms
from tower import ugettext_lazy as _lazy
from flicks.base.util import country_choices
from flicks.users.models import UserProfile
class UserProfileForm(forms.ModelForm):
# L10n: Used in a choice field where users can choose between receiving
# L10n: HTML-based or Text-only newslette... | from django import forms
from tower import ugettext_lazy as _lazy
from flicks.base.util import country_choices
from flicks.users.models import UserProfile
class UserProfileForm(forms.ModelForm):
# L10n: Used in a choice field where users can choose between receiving
# L10n: HTML-based or Text-only newslette... | <commit_before>from django import forms
from tower import ugettext_lazy as _lazy
from flicks.base.util import country_choices
from flicks.users.models import UserProfile
class UserProfileForm(forms.ModelForm):
# L10n: Used in a choice field where users can choose between receiving
# L10n: HTML-based or Text... |
1e6ccfe615ee5d3e873e341a3d38553c3b07a3a0 | athumb/validators.py | athumb/validators.py | from django.conf import settings
from django.core.validators import ValidationError
# A list of allowable thumbnail file extensions.
ALLOWABLE_THUMBNAIL_EXTENSIONS = getattr(
settings, 'ALLOWABLE_THUMBNAIL_EXTENSIONS', ['png', 'jpg', 'jpeg', 'gif'])
class ImageUploadExtensionValidator(object):
"""
Perform... | from django.conf import settings
from django.core.validators import ValidationError
# A list of allowable thumbnail file extensions.
ALLOWABLE_THUMBNAIL_EXTENSIONS = getattr(
settings, 'ALLOWABLE_THUMBNAIL_EXTENSIONS', ['png', 'jpg', 'jpeg', 'gif'])
class ImageUploadExtensionValidator(object):
"""
Perform... | Make ImageUploadExtensionValidator work with django 1.7 migrations | Make ImageUploadExtensionValidator work with django 1.7 migrations
| Python | bsd-3-clause | ligonier/django-athumb | from django.conf import settings
from django.core.validators import ValidationError
# A list of allowable thumbnail file extensions.
ALLOWABLE_THUMBNAIL_EXTENSIONS = getattr(
settings, 'ALLOWABLE_THUMBNAIL_EXTENSIONS', ['png', 'jpg', 'jpeg', 'gif'])
class ImageUploadExtensionValidator(object):
"""
Perform... | from django.conf import settings
from django.core.validators import ValidationError
# A list of allowable thumbnail file extensions.
ALLOWABLE_THUMBNAIL_EXTENSIONS = getattr(
settings, 'ALLOWABLE_THUMBNAIL_EXTENSIONS', ['png', 'jpg', 'jpeg', 'gif'])
class ImageUploadExtensionValidator(object):
"""
Perform... | <commit_before>from django.conf import settings
from django.core.validators import ValidationError
# A list of allowable thumbnail file extensions.
ALLOWABLE_THUMBNAIL_EXTENSIONS = getattr(
settings, 'ALLOWABLE_THUMBNAIL_EXTENSIONS', ['png', 'jpg', 'jpeg', 'gif'])
class ImageUploadExtensionValidator(object):
... | from django.conf import settings
from django.core.validators import ValidationError
# A list of allowable thumbnail file extensions.
ALLOWABLE_THUMBNAIL_EXTENSIONS = getattr(
settings, 'ALLOWABLE_THUMBNAIL_EXTENSIONS', ['png', 'jpg', 'jpeg', 'gif'])
class ImageUploadExtensionValidator(object):
"""
Perform... | from django.conf import settings
from django.core.validators import ValidationError
# A list of allowable thumbnail file extensions.
ALLOWABLE_THUMBNAIL_EXTENSIONS = getattr(
settings, 'ALLOWABLE_THUMBNAIL_EXTENSIONS', ['png', 'jpg', 'jpeg', 'gif'])
class ImageUploadExtensionValidator(object):
"""
Perform... | <commit_before>from django.conf import settings
from django.core.validators import ValidationError
# A list of allowable thumbnail file extensions.
ALLOWABLE_THUMBNAIL_EXTENSIONS = getattr(
settings, 'ALLOWABLE_THUMBNAIL_EXTENSIONS', ['png', 'jpg', 'jpeg', 'gif'])
class ImageUploadExtensionValidator(object):
... |
a5f3aa3d1098645f1b24539714bf22244141811c | src/pyprobe/sensors/system/sensor_uptime.py | src/pyprobe/sensors/system/sensor_uptime.py | # coding=utf-8
from datetime import datetime
import psutil
from pyprobe.sensors import *
__author__ = 'Dirk Dittert'
class UptimeSensor(BaseSensor):
KIND = u'uptime'
def define(self, configuration):
result = SensorDescription(u"Laufzeit", self.KIND)
result.description = u"Monitort die Lau... | # coding=utf-8
from datetime import datetime
import psutil
from pyprobe.sensors import *
__author__ = 'Dirk Dittert'
class UptimeSensor(BaseSensor):
KIND = u'uptime'
def define(self, configuration):
result = SensorDescription(u"Laufzeit", self.KIND)
result.description = u"Monitort die Lau... | Use proper method to determine system uptime. | Use proper method to determine system uptime.
Fixes https://github.com/dittert/pyprobe/issues/9
| Python | apache-2.0 | dittert/pyprobe,dittert/pyprobe | # coding=utf-8
from datetime import datetime
import psutil
from pyprobe.sensors import *
__author__ = 'Dirk Dittert'
class UptimeSensor(BaseSensor):
KIND = u'uptime'
def define(self, configuration):
result = SensorDescription(u"Laufzeit", self.KIND)
result.description = u"Monitort die Lau... | # coding=utf-8
from datetime import datetime
import psutil
from pyprobe.sensors import *
__author__ = 'Dirk Dittert'
class UptimeSensor(BaseSensor):
KIND = u'uptime'
def define(self, configuration):
result = SensorDescription(u"Laufzeit", self.KIND)
result.description = u"Monitort die Lau... | <commit_before># coding=utf-8
from datetime import datetime
import psutil
from pyprobe.sensors import *
__author__ = 'Dirk Dittert'
class UptimeSensor(BaseSensor):
KIND = u'uptime'
def define(self, configuration):
result = SensorDescription(u"Laufzeit", self.KIND)
result.description = u"M... | # coding=utf-8
from datetime import datetime
import psutil
from pyprobe.sensors import *
__author__ = 'Dirk Dittert'
class UptimeSensor(BaseSensor):
KIND = u'uptime'
def define(self, configuration):
result = SensorDescription(u"Laufzeit", self.KIND)
result.description = u"Monitort die Lau... | # coding=utf-8
from datetime import datetime
import psutil
from pyprobe.sensors import *
__author__ = 'Dirk Dittert'
class UptimeSensor(BaseSensor):
KIND = u'uptime'
def define(self, configuration):
result = SensorDescription(u"Laufzeit", self.KIND)
result.description = u"Monitort die Lau... | <commit_before># coding=utf-8
from datetime import datetime
import psutil
from pyprobe.sensors import *
__author__ = 'Dirk Dittert'
class UptimeSensor(BaseSensor):
KIND = u'uptime'
def define(self, configuration):
result = SensorDescription(u"Laufzeit", self.KIND)
result.description = u"M... |
bb575cfdf4a6781c878a12f80987fb3e62fe56d4 | chandl/model/posts.py | chandl/model/posts.py | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
class Posts(list):
"""
Represents a list of posts in a thread.
"""
def __init__(self, *args):
"""
Initialise a new posts list.
:param args: The list of posts.
"""
super(Posts, self).__init__(*arg... | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
class Posts(list):
"""
Represents a list of posts in a thread.
"""
def __init__(self, *args):
"""
Initialise a new posts list.
:param args: The list of posts.
"""
super(Posts, self).__init__(*arg... | Make post filtering and mapping more pythonic | Make post filtering and mapping more pythonic
| Python | mit | gebn/chandl,gebn/chandl | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
class Posts(list):
"""
Represents a list of posts in a thread.
"""
def __init__(self, *args):
"""
Initialise a new posts list.
:param args: The list of posts.
"""
super(Posts, self).__init__(*arg... | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
class Posts(list):
"""
Represents a list of posts in a thread.
"""
def __init__(self, *args):
"""
Initialise a new posts list.
:param args: The list of posts.
"""
super(Posts, self).__init__(*arg... | <commit_before># -*- coding: utf-8 -*-
from __future__ import unicode_literals
class Posts(list):
"""
Represents a list of posts in a thread.
"""
def __init__(self, *args):
"""
Initialise a new posts list.
:param args: The list of posts.
"""
super(Posts, self... | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
class Posts(list):
"""
Represents a list of posts in a thread.
"""
def __init__(self, *args):
"""
Initialise a new posts list.
:param args: The list of posts.
"""
super(Posts, self).__init__(*arg... | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
class Posts(list):
"""
Represents a list of posts in a thread.
"""
def __init__(self, *args):
"""
Initialise a new posts list.
:param args: The list of posts.
"""
super(Posts, self).__init__(*arg... | <commit_before># -*- coding: utf-8 -*-
from __future__ import unicode_literals
class Posts(list):
"""
Represents a list of posts in a thread.
"""
def __init__(self, *args):
"""
Initialise a new posts list.
:param args: The list of posts.
"""
super(Posts, self... |
1fa7fed7d63fc7819ae5378f9a9addf7439e9b92 | messages.py | messages.py | class Dispatched(object):
def __init__(self, w=None, cb=None):
self.w = w
self.cb = cb
self.retval = None
self.output = None
class DispatchInquiry(object):
def __init__(self, msg=None, payload=None, resp=None):
self.msg = msg
self.resp = resp
self.payload = payload
| class Dispatched(object):
def __init__(self, w=None, _id=None):
self.w = w
self.id = _id if _id != None else id(self)
class DispatchedState(object):
def __init__(self, retval=None, output=None, exc=None, _id=None):
self.retval = retval
self.output = output
self.exc = exc
self.id = _id if ... | Add DispatchedState, add target, add id | Add DispatchedState, add target, add id
| Python | mit | joushou/dispatch,joushou/dispatch | class Dispatched(object):
def __init__(self, w=None, cb=None):
self.w = w
self.cb = cb
self.retval = None
self.output = None
class DispatchInquiry(object):
def __init__(self, msg=None, payload=None, resp=None):
self.msg = msg
self.resp = resp
self.payload = payload
Add DispatchedState, ... | class Dispatched(object):
def __init__(self, w=None, _id=None):
self.w = w
self.id = _id if _id != None else id(self)
class DispatchedState(object):
def __init__(self, retval=None, output=None, exc=None, _id=None):
self.retval = retval
self.output = output
self.exc = exc
self.id = _id if ... | <commit_before>class Dispatched(object):
def __init__(self, w=None, cb=None):
self.w = w
self.cb = cb
self.retval = None
self.output = None
class DispatchInquiry(object):
def __init__(self, msg=None, payload=None, resp=None):
self.msg = msg
self.resp = resp
self.payload = payload
<commi... | class Dispatched(object):
def __init__(self, w=None, _id=None):
self.w = w
self.id = _id if _id != None else id(self)
class DispatchedState(object):
def __init__(self, retval=None, output=None, exc=None, _id=None):
self.retval = retval
self.output = output
self.exc = exc
self.id = _id if ... | class Dispatched(object):
def __init__(self, w=None, cb=None):
self.w = w
self.cb = cb
self.retval = None
self.output = None
class DispatchInquiry(object):
def __init__(self, msg=None, payload=None, resp=None):
self.msg = msg
self.resp = resp
self.payload = payload
Add DispatchedState, ... | <commit_before>class Dispatched(object):
def __init__(self, w=None, cb=None):
self.w = w
self.cb = cb
self.retval = None
self.output = None
class DispatchInquiry(object):
def __init__(self, msg=None, payload=None, resp=None):
self.msg = msg
self.resp = resp
self.payload = payload
<commi... |
074dcf9c822827c6609dc11c0047aa79dd8c1ad8 | tests/test_cli.py | tests/test_cli.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""Tests for `pyutrack` package."""
import unittest
from click.testing import CliRunner
from pyutrack import cli
class TestYoutrack_cli(unittest.TestCase):
def test_improt(self):
import pyutrack
def test_command_line_interface(self):
runner =... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""Tests for `pyutrack` package."""
import unittest
from click.testing import CliRunner
from pyutrack import cli
from tests import PyutrackTest
class TestYoutrack_cli(PyutrackTest):
def test_improt(self):
import pyutrack
def test_command_line_interface(... | Set cli tests to base test class | Set cli tests to base test class
| Python | mit | alisaifee/pyutrack,alisaifee/pyutrack | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""Tests for `pyutrack` package."""
import unittest
from click.testing import CliRunner
from pyutrack import cli
class TestYoutrack_cli(unittest.TestCase):
def test_improt(self):
import pyutrack
def test_command_line_interface(self):
runner =... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""Tests for `pyutrack` package."""
import unittest
from click.testing import CliRunner
from pyutrack import cli
from tests import PyutrackTest
class TestYoutrack_cli(PyutrackTest):
def test_improt(self):
import pyutrack
def test_command_line_interface(... | <commit_before>#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""Tests for `pyutrack` package."""
import unittest
from click.testing import CliRunner
from pyutrack import cli
class TestYoutrack_cli(unittest.TestCase):
def test_improt(self):
import pyutrack
def test_command_line_interface(self):
... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""Tests for `pyutrack` package."""
import unittest
from click.testing import CliRunner
from pyutrack import cli
from tests import PyutrackTest
class TestYoutrack_cli(PyutrackTest):
def test_improt(self):
import pyutrack
def test_command_line_interface(... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""Tests for `pyutrack` package."""
import unittest
from click.testing import CliRunner
from pyutrack import cli
class TestYoutrack_cli(unittest.TestCase):
def test_improt(self):
import pyutrack
def test_command_line_interface(self):
runner =... | <commit_before>#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""Tests for `pyutrack` package."""
import unittest
from click.testing import CliRunner
from pyutrack import cli
class TestYoutrack_cli(unittest.TestCase):
def test_improt(self):
import pyutrack
def test_command_line_interface(self):
... |
5bd56894f3f4bbb3fadc3430238c394660b249c4 | core/bootstrap.py | core/bootstrap.py | from __future__ import print_function
from tinydb import TinyDB
from core.models import Movie
TABLE_POPULAR = "popular"
TABLE_NAME_TO_ID = "name_to_id_mapping"
TABLE_MOVIES = "movies"
class Application(object):
def __init__(self, settings):
database = TinyDB(settings["DATABASE"])
self.Movie = Movi... | from __future__ import print_function
from tinydb import TinyDB
from core.models import Movie
TABLE_POPULAR = "popular"
TABLE_NAME_TO_ID = "name_to_id_mapping"
TABLE_MOVIES = "movies"
class Application(object):
def __init__(self, settings):
database = TinyDB(settings["DATABASE"], indent=4)
self.Mo... | Make the database JSON easier to read. | Make the database JSON easier to read.
| Python | mit | EmilStenstrom/nephele | from __future__ import print_function
from tinydb import TinyDB
from core.models import Movie
TABLE_POPULAR = "popular"
TABLE_NAME_TO_ID = "name_to_id_mapping"
TABLE_MOVIES = "movies"
class Application(object):
def __init__(self, settings):
database = TinyDB(settings["DATABASE"])
self.Movie = Movi... | from __future__ import print_function
from tinydb import TinyDB
from core.models import Movie
TABLE_POPULAR = "popular"
TABLE_NAME_TO_ID = "name_to_id_mapping"
TABLE_MOVIES = "movies"
class Application(object):
def __init__(self, settings):
database = TinyDB(settings["DATABASE"], indent=4)
self.Mo... | <commit_before>from __future__ import print_function
from tinydb import TinyDB
from core.models import Movie
TABLE_POPULAR = "popular"
TABLE_NAME_TO_ID = "name_to_id_mapping"
TABLE_MOVIES = "movies"
class Application(object):
def __init__(self, settings):
database = TinyDB(settings["DATABASE"])
se... | from __future__ import print_function
from tinydb import TinyDB
from core.models import Movie
TABLE_POPULAR = "popular"
TABLE_NAME_TO_ID = "name_to_id_mapping"
TABLE_MOVIES = "movies"
class Application(object):
def __init__(self, settings):
database = TinyDB(settings["DATABASE"], indent=4)
self.Mo... | from __future__ import print_function
from tinydb import TinyDB
from core.models import Movie
TABLE_POPULAR = "popular"
TABLE_NAME_TO_ID = "name_to_id_mapping"
TABLE_MOVIES = "movies"
class Application(object):
def __init__(self, settings):
database = TinyDB(settings["DATABASE"])
self.Movie = Movi... | <commit_before>from __future__ import print_function
from tinydb import TinyDB
from core.models import Movie
TABLE_POPULAR = "popular"
TABLE_NAME_TO_ID = "name_to_id_mapping"
TABLE_MOVIES = "movies"
class Application(object):
def __init__(self, settings):
database = TinyDB(settings["DATABASE"])
se... |
c9c0aace029dd07a96ceed4f14303d5f0eadee13 | blackjax/__init__.py | blackjax/__init__.py | from .mcmc import hmc, nuts, rmh
from .mcmc_adaptation import window_adaptation
__version__ = "0.3.0"
__all__ = [
"hmc",
"nuts",
"rmh",
"window_adaptation",
"adaptive_tempered_smc",
"tempered_smc",
"inference",
"adaptation",
"diagnostics",
]
| from .diagnostics import effective_sample_size as ess
from .diagnostics import potential_scale_reduction as rhat
from .mcmc import hmc, nuts, rmh
from .mcmc_adaptation import window_adaptation
__version__ = "0.3.0"
__all__ = [
"hmc",
"nuts",
"rmh",
"window_adaptation",
"adaptive_tempered_smc",
... | Add diagnostics to blackjax namespace | Add diagnostics to blackjax namespace
| Python | apache-2.0 | blackjax-devs/blackjax | from .mcmc import hmc, nuts, rmh
from .mcmc_adaptation import window_adaptation
__version__ = "0.3.0"
__all__ = [
"hmc",
"nuts",
"rmh",
"window_adaptation",
"adaptive_tempered_smc",
"tempered_smc",
"inference",
"adaptation",
"diagnostics",
]
Add diagnostics to blackjax namespace | from .diagnostics import effective_sample_size as ess
from .diagnostics import potential_scale_reduction as rhat
from .mcmc import hmc, nuts, rmh
from .mcmc_adaptation import window_adaptation
__version__ = "0.3.0"
__all__ = [
"hmc",
"nuts",
"rmh",
"window_adaptation",
"adaptive_tempered_smc",
... | <commit_before>from .mcmc import hmc, nuts, rmh
from .mcmc_adaptation import window_adaptation
__version__ = "0.3.0"
__all__ = [
"hmc",
"nuts",
"rmh",
"window_adaptation",
"adaptive_tempered_smc",
"tempered_smc",
"inference",
"adaptation",
"diagnostics",
]
<commit_msg>Add diagnosti... | from .diagnostics import effective_sample_size as ess
from .diagnostics import potential_scale_reduction as rhat
from .mcmc import hmc, nuts, rmh
from .mcmc_adaptation import window_adaptation
__version__ = "0.3.0"
__all__ = [
"hmc",
"nuts",
"rmh",
"window_adaptation",
"adaptive_tempered_smc",
... | from .mcmc import hmc, nuts, rmh
from .mcmc_adaptation import window_adaptation
__version__ = "0.3.0"
__all__ = [
"hmc",
"nuts",
"rmh",
"window_adaptation",
"adaptive_tempered_smc",
"tempered_smc",
"inference",
"adaptation",
"diagnostics",
]
Add diagnostics to blackjax namespacefro... | <commit_before>from .mcmc import hmc, nuts, rmh
from .mcmc_adaptation import window_adaptation
__version__ = "0.3.0"
__all__ = [
"hmc",
"nuts",
"rmh",
"window_adaptation",
"adaptive_tempered_smc",
"tempered_smc",
"inference",
"adaptation",
"diagnostics",
]
<commit_msg>Add diagnosti... |
d3992b1677a5186b8b4072c9fdf50e4cb44dc5ef | base_accounts/models.py | base_accounts/models.py | from django.db import models
from django.contrib.auth.models import AbstractUser
from django.utils.translation import ugettext_lazy as _
from django.template.defaultfilters import slugify
class BaseUser(AbstractUser):
slug = models.SlugField(_('slug'), max_length=255)
name = models.CharField(_('name'), max_le... | from django.db import models
from django.contrib.auth.models import AbstractUser
from django.utils.translation import ugettext_lazy as _
from django.template.defaultfilters import slugify
class BaseUser(AbstractUser):
slug = models.SlugField(_('slug'), max_length=255)
name = models.CharField(_('name'), max_le... | Fix name field for empty values | Fix name field for empty values
| Python | bsd-3-clause | Nomadblue/django-nomad-base-accounts,Nomadblue/django-nomad-base-accounts | from django.db import models
from django.contrib.auth.models import AbstractUser
from django.utils.translation import ugettext_lazy as _
from django.template.defaultfilters import slugify
class BaseUser(AbstractUser):
slug = models.SlugField(_('slug'), max_length=255)
name = models.CharField(_('name'), max_le... | from django.db import models
from django.contrib.auth.models import AbstractUser
from django.utils.translation import ugettext_lazy as _
from django.template.defaultfilters import slugify
class BaseUser(AbstractUser):
slug = models.SlugField(_('slug'), max_length=255)
name = models.CharField(_('name'), max_le... | <commit_before>from django.db import models
from django.contrib.auth.models import AbstractUser
from django.utils.translation import ugettext_lazy as _
from django.template.defaultfilters import slugify
class BaseUser(AbstractUser):
slug = models.SlugField(_('slug'), max_length=255)
name = models.CharField(_(... | from django.db import models
from django.contrib.auth.models import AbstractUser
from django.utils.translation import ugettext_lazy as _
from django.template.defaultfilters import slugify
class BaseUser(AbstractUser):
slug = models.SlugField(_('slug'), max_length=255)
name = models.CharField(_('name'), max_le... | from django.db import models
from django.contrib.auth.models import AbstractUser
from django.utils.translation import ugettext_lazy as _
from django.template.defaultfilters import slugify
class BaseUser(AbstractUser):
slug = models.SlugField(_('slug'), max_length=255)
name = models.CharField(_('name'), max_le... | <commit_before>from django.db import models
from django.contrib.auth.models import AbstractUser
from django.utils.translation import ugettext_lazy as _
from django.template.defaultfilters import slugify
class BaseUser(AbstractUser):
slug = models.SlugField(_('slug'), max_length=255)
name = models.CharField(_(... |
e1bfa7170d4cf6a78cd0f2ca9c3d5302e04323f5 | utensils/forms.py | utensils/forms.py | # encoding: utf-8
from django import forms
class SearchForm(forms.Form):
search = forms.CharField(
label='', required=False,
widget=forms.widgets.TextInput())
| # encoding: utf-8
from django import forms
from django.utils.functional import curry
class SearchForm(forms.Form):
search = forms.CharField(
label='', required=False,
widget=forms.widgets.TextInput())
class UniqueModelFieldsMixin(object):
"""
Mixin that enforces unique fields on ModelFor... | Add unique model fields form mixin. | Add unique model fields form mixin.
| Python | mit | code-kitchen/django-utensils,code-kitchen/django-utensils,code-kitchen/django-utensils | # encoding: utf-8
from django import forms
class SearchForm(forms.Form):
search = forms.CharField(
label='', required=False,
widget=forms.widgets.TextInput())
Add unique model fields form mixin. | # encoding: utf-8
from django import forms
from django.utils.functional import curry
class SearchForm(forms.Form):
search = forms.CharField(
label='', required=False,
widget=forms.widgets.TextInput())
class UniqueModelFieldsMixin(object):
"""
Mixin that enforces unique fields on ModelFor... | <commit_before># encoding: utf-8
from django import forms
class SearchForm(forms.Form):
search = forms.CharField(
label='', required=False,
widget=forms.widgets.TextInput())
<commit_msg>Add unique model fields form mixin.<commit_after> | # encoding: utf-8
from django import forms
from django.utils.functional import curry
class SearchForm(forms.Form):
search = forms.CharField(
label='', required=False,
widget=forms.widgets.TextInput())
class UniqueModelFieldsMixin(object):
"""
Mixin that enforces unique fields on ModelFor... | # encoding: utf-8
from django import forms
class SearchForm(forms.Form):
search = forms.CharField(
label='', required=False,
widget=forms.widgets.TextInput())
Add unique model fields form mixin.# encoding: utf-8
from django import forms
from django.utils.functional import curry
class SearchForm(... | <commit_before># encoding: utf-8
from django import forms
class SearchForm(forms.Form):
search = forms.CharField(
label='', required=False,
widget=forms.widgets.TextInput())
<commit_msg>Add unique model fields form mixin.<commit_after># encoding: utf-8
from django import forms
from django.utils.fu... |
3d84e8e871b1049102815136ef23e3e630461918 | connman_dispatcher/utils.py | connman_dispatcher/utils.py | import os
import subprocess
import logbook
logger = logbook.Logger('connman-dispatcher')
def execute_scripts_in_dirs(paths, state):
for path in sorted(paths):
if os.path.exists(path) and os.path.isdir(path):
execute_scripts_in_dir(path, state)
def execute_scripts_in_dir(path, state):
for ... | import os
import subprocess
import logbook
logger = logbook.Logger('connman-dispatcher')
def is_executable(path):
return all([os.path.isfile(path), os.access(path, os.X_OK)])
def execute_scripts_in_dirs(paths, state):
for path in sorted(paths):
if os.path.exists(path) and os.path.isdir(path):
... | Check if file is executable, before executing it | Check if file is executable, before executing it
| Python | isc | a-sk/connman-dispatcher | import os
import subprocess
import logbook
logger = logbook.Logger('connman-dispatcher')
def execute_scripts_in_dirs(paths, state):
for path in sorted(paths):
if os.path.exists(path) and os.path.isdir(path):
execute_scripts_in_dir(path, state)
def execute_scripts_in_dir(path, state):
for ... | import os
import subprocess
import logbook
logger = logbook.Logger('connman-dispatcher')
def is_executable(path):
return all([os.path.isfile(path), os.access(path, os.X_OK)])
def execute_scripts_in_dirs(paths, state):
for path in sorted(paths):
if os.path.exists(path) and os.path.isdir(path):
... | <commit_before>import os
import subprocess
import logbook
logger = logbook.Logger('connman-dispatcher')
def execute_scripts_in_dirs(paths, state):
for path in sorted(paths):
if os.path.exists(path) and os.path.isdir(path):
execute_scripts_in_dir(path, state)
def execute_scripts_in_dir(path, s... | import os
import subprocess
import logbook
logger = logbook.Logger('connman-dispatcher')
def is_executable(path):
return all([os.path.isfile(path), os.access(path, os.X_OK)])
def execute_scripts_in_dirs(paths, state):
for path in sorted(paths):
if os.path.exists(path) and os.path.isdir(path):
... | import os
import subprocess
import logbook
logger = logbook.Logger('connman-dispatcher')
def execute_scripts_in_dirs(paths, state):
for path in sorted(paths):
if os.path.exists(path) and os.path.isdir(path):
execute_scripts_in_dir(path, state)
def execute_scripts_in_dir(path, state):
for ... | <commit_before>import os
import subprocess
import logbook
logger = logbook.Logger('connman-dispatcher')
def execute_scripts_in_dirs(paths, state):
for path in sorted(paths):
if os.path.exists(path) and os.path.isdir(path):
execute_scripts_in_dir(path, state)
def execute_scripts_in_dir(path, s... |
7a901a8edd850dc5e2e75c89362444768722592c | svs_interface.py | svs_interface.py | #!/usr/bin/env python
import subprocess
from Tkinter import *
from tkFileDialog import *
import os
class GpgApp(object):
def __init__(self, master):
frame = Frame(master)
frame.pack()
self.text = Text()
self.text.pack()
menu = Menu(master)
root.config(menu=menu)
... | #!/usr/bin/env python
import subprocess
from Tkinter import *
from tkFileDialog import *
import os
GPG = 'gpg2'
SERVER_KEY = '' # replace with gpg key ID of server key
class GpgApp(object):
def __init__(self, master):
frame = Frame(master)
frame.pack()
self.text = Text()
self.tex... | Add method to encrypt files | Add method to encrypt files
| Python | agpl-3.0 | jeann2013/securedrop,pwplus/securedrop,chadmiller/securedrop,jrosco/securedrop,GabeIsman/securedrop,GabeIsman/securedrop,jaseg/securedrop,chadmiller/securedrop,jrosco/securedrop,micahflee/securedrop,jaseg/securedrop,conorsch/securedrop,kelcecil/securedrop,chadmiller/securedrop,pwplus/securedrop,jaseg/securedrop,ehartsu... | #!/usr/bin/env python
import subprocess
from Tkinter import *
from tkFileDialog import *
import os
class GpgApp(object):
def __init__(self, master):
frame = Frame(master)
frame.pack()
self.text = Text()
self.text.pack()
menu = Menu(master)
root.config(menu=menu)
... | #!/usr/bin/env python
import subprocess
from Tkinter import *
from tkFileDialog import *
import os
GPG = 'gpg2'
SERVER_KEY = '' # replace with gpg key ID of server key
class GpgApp(object):
def __init__(self, master):
frame = Frame(master)
frame.pack()
self.text = Text()
self.tex... | <commit_before>#!/usr/bin/env python
import subprocess
from Tkinter import *
from tkFileDialog import *
import os
class GpgApp(object):
def __init__(self, master):
frame = Frame(master)
frame.pack()
self.text = Text()
self.text.pack()
menu = Menu(master)
root.config... | #!/usr/bin/env python
import subprocess
from Tkinter import *
from tkFileDialog import *
import os
GPG = 'gpg2'
SERVER_KEY = '' # replace with gpg key ID of server key
class GpgApp(object):
def __init__(self, master):
frame = Frame(master)
frame.pack()
self.text = Text()
self.tex... | #!/usr/bin/env python
import subprocess
from Tkinter import *
from tkFileDialog import *
import os
class GpgApp(object):
def __init__(self, master):
frame = Frame(master)
frame.pack()
self.text = Text()
self.text.pack()
menu = Menu(master)
root.config(menu=menu)
... | <commit_before>#!/usr/bin/env python
import subprocess
from Tkinter import *
from tkFileDialog import *
import os
class GpgApp(object):
def __init__(self, master):
frame = Frame(master)
frame.pack()
self.text = Text()
self.text.pack()
menu = Menu(master)
root.config... |
f3cbe52e0d65e8d6647815b25c79a836db93fb41 | gitcd/Cli/Command.py | gitcd/Cli/Command.py | import subprocess
import string
class Command(object):
def execute(self, command: str):
cliArgs = self.parseCliArgs(command)
process = subprocess.Popen(cliArgs, stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
output, err = process.communicate()
if process.returncode != 0:
... | import subprocess
import string
from pprint import pprint
class Command(object):
def execute(self, command: str):
cliArgs = self.parseCliArgs(command)
pprint(cliArgs)
process = subprocess.Popen(cliArgs, stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
output, err = process.c... | Add some debug for debian box | Add some debug for debian box
| Python | apache-2.0 | claudio-walser/gitcd,claudio-walser/gitcd | import subprocess
import string
class Command(object):
def execute(self, command: str):
cliArgs = self.parseCliArgs(command)
process = subprocess.Popen(cliArgs, stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
output, err = process.communicate()
if process.returncode != 0:
... | import subprocess
import string
from pprint import pprint
class Command(object):
def execute(self, command: str):
cliArgs = self.parseCliArgs(command)
pprint(cliArgs)
process = subprocess.Popen(cliArgs, stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
output, err = process.c... | <commit_before>import subprocess
import string
class Command(object):
def execute(self, command: str):
cliArgs = self.parseCliArgs(command)
process = subprocess.Popen(cliArgs, stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
output, err = process.communicate()
if process.retur... | import subprocess
import string
from pprint import pprint
class Command(object):
def execute(self, command: str):
cliArgs = self.parseCliArgs(command)
pprint(cliArgs)
process = subprocess.Popen(cliArgs, stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
output, err = process.c... | import subprocess
import string
class Command(object):
def execute(self, command: str):
cliArgs = self.parseCliArgs(command)
process = subprocess.Popen(cliArgs, stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
output, err = process.communicate()
if process.returncode != 0:
... | <commit_before>import subprocess
import string
class Command(object):
def execute(self, command: str):
cliArgs = self.parseCliArgs(command)
process = subprocess.Popen(cliArgs, stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
output, err = process.communicate()
if process.retur... |
c72b712cf84e63dd2d72fdc6d64c50a65b8a88a0 | courant/core/search/urls.py | courant/core/search/urls.py | from django.conf.urls.defaults import *
from courant.core.search.views import *
from haystack.forms import ModelSearchForm
from haystack.query import SearchQuerySet
from haystack.views import SearchView
urlpatterns = patterns('',
url(r'', CourantSearchView(template='search/results_page.html',
... | from django.conf.urls.defaults import *
from courant.core.search.views import *
from haystack.forms import ModelSearchForm
from haystack.query import SearchQuerySet
from haystack.views import SearchView
urlpatterns = patterns('',
url(r'', SearchView(template='search/results_page.html',
... | Remove all Haystack customization of search view pending further investigations. | Remove all Haystack customization of search view pending further investigations.
| Python | bsd-3-clause | maxcutler/Courant-News,maxcutler/Courant-News | from django.conf.urls.defaults import *
from courant.core.search.views import *
from haystack.forms import ModelSearchForm
from haystack.query import SearchQuerySet
from haystack.views import SearchView
urlpatterns = patterns('',
url(r'', CourantSearchView(template='search/results_page.html',
... | from django.conf.urls.defaults import *
from courant.core.search.views import *
from haystack.forms import ModelSearchForm
from haystack.query import SearchQuerySet
from haystack.views import SearchView
urlpatterns = patterns('',
url(r'', SearchView(template='search/results_page.html',
... | <commit_before>from django.conf.urls.defaults import *
from courant.core.search.views import *
from haystack.forms import ModelSearchForm
from haystack.query import SearchQuerySet
from haystack.views import SearchView
urlpatterns = patterns('',
url(r'', CourantSearchView(template='search/results_page.html... | from django.conf.urls.defaults import *
from courant.core.search.views import *
from haystack.forms import ModelSearchForm
from haystack.query import SearchQuerySet
from haystack.views import SearchView
urlpatterns = patterns('',
url(r'', SearchView(template='search/results_page.html',
... | from django.conf.urls.defaults import *
from courant.core.search.views import *
from haystack.forms import ModelSearchForm
from haystack.query import SearchQuerySet
from haystack.views import SearchView
urlpatterns = patterns('',
url(r'', CourantSearchView(template='search/results_page.html',
... | <commit_before>from django.conf.urls.defaults import *
from courant.core.search.views import *
from haystack.forms import ModelSearchForm
from haystack.query import SearchQuerySet
from haystack.views import SearchView
urlpatterns = patterns('',
url(r'', CourantSearchView(template='search/results_page.html... |
1504710d748a86bbd4eed717b4bcc2f5d15ec1b7 | SatNOGS/base/management/commands/initialize.py | SatNOGS/base/management/commands/initialize.py | from orbit import satellite
from django.core.management.base import BaseCommand
from base.tests import ObservationFactory, StationFactory
from base.models import Satellite
class Command(BaseCommand):
help = 'Create initial fixtures'
def handle(self, *args, **options):
ObservationFactory.create_batc... | from orbit import satellite
from django.core.management.base import BaseCommand
from base.tests import ObservationFactory, StationFactory
from base.models import Satellite
class Command(BaseCommand):
help = 'Create initial fixtures'
def handle(self, *args, **options):
ObservationFactory.create_batc... | Use more sane numbers for initial data | Use more sane numbers for initial data
| Python | agpl-3.0 | cshields/satnogs-network,cshields/satnogs-network,cshields/satnogs-network,cshields/satnogs-network | from orbit import satellite
from django.core.management.base import BaseCommand
from base.tests import ObservationFactory, StationFactory
from base.models import Satellite
class Command(BaseCommand):
help = 'Create initial fixtures'
def handle(self, *args, **options):
ObservationFactory.create_batc... | from orbit import satellite
from django.core.management.base import BaseCommand
from base.tests import ObservationFactory, StationFactory
from base.models import Satellite
class Command(BaseCommand):
help = 'Create initial fixtures'
def handle(self, *args, **options):
ObservationFactory.create_batc... | <commit_before>from orbit import satellite
from django.core.management.base import BaseCommand
from base.tests import ObservationFactory, StationFactory
from base.models import Satellite
class Command(BaseCommand):
help = 'Create initial fixtures'
def handle(self, *args, **options):
ObservationFact... | from orbit import satellite
from django.core.management.base import BaseCommand
from base.tests import ObservationFactory, StationFactory
from base.models import Satellite
class Command(BaseCommand):
help = 'Create initial fixtures'
def handle(self, *args, **options):
ObservationFactory.create_batc... | from orbit import satellite
from django.core.management.base import BaseCommand
from base.tests import ObservationFactory, StationFactory
from base.models import Satellite
class Command(BaseCommand):
help = 'Create initial fixtures'
def handle(self, *args, **options):
ObservationFactory.create_batc... | <commit_before>from orbit import satellite
from django.core.management.base import BaseCommand
from base.tests import ObservationFactory, StationFactory
from base.models import Satellite
class Command(BaseCommand):
help = 'Create initial fixtures'
def handle(self, *args, **options):
ObservationFact... |
d413345197abe9092979e324498c766f7410d34b | bazaar/goods/utils.py | bazaar/goods/utils.py | from __future__ import unicode_literals
from .models import Product, PriceList
def create_product_for_good(good, price, quantity=1):
"""
Creates a product for the specified `good` with `quantity`. `price` is set to the default price list.
Returns the new product instance
"""
product = Product.ob... | from __future__ import unicode_literals
from .models import Product, PriceList
def create_product_for_good(good, price, quantity=1, name=None):
"""
Creates a product for the specified `good` with `quantity`. `price` is set to the default price list.
Returns the new product instance
"""
product_na... | Add name parameter to create_product_for_good which defaults to good.name | Add name parameter to create_product_for_good which defaults to good.name
| Python | bsd-2-clause | evonove/django-bazaar,evonove/django-bazaar,meghabhoj/NEWBAZAAR,evonove/django-bazaar,meghabhoj/NEWBAZAAR,meghabhoj/NEWBAZAAR | from __future__ import unicode_literals
from .models import Product, PriceList
def create_product_for_good(good, price, quantity=1):
"""
Creates a product for the specified `good` with `quantity`. `price` is set to the default price list.
Returns the new product instance
"""
product = Product.ob... | from __future__ import unicode_literals
from .models import Product, PriceList
def create_product_for_good(good, price, quantity=1, name=None):
"""
Creates a product for the specified `good` with `quantity`. `price` is set to the default price list.
Returns the new product instance
"""
product_na... | <commit_before>from __future__ import unicode_literals
from .models import Product, PriceList
def create_product_for_good(good, price, quantity=1):
"""
Creates a product for the specified `good` with `quantity`. `price` is set to the default price list.
Returns the new product instance
"""
produ... | from __future__ import unicode_literals
from .models import Product, PriceList
def create_product_for_good(good, price, quantity=1, name=None):
"""
Creates a product for the specified `good` with `quantity`. `price` is set to the default price list.
Returns the new product instance
"""
product_na... | from __future__ import unicode_literals
from .models import Product, PriceList
def create_product_for_good(good, price, quantity=1):
"""
Creates a product for the specified `good` with `quantity`. `price` is set to the default price list.
Returns the new product instance
"""
product = Product.ob... | <commit_before>from __future__ import unicode_literals
from .models import Product, PriceList
def create_product_for_good(good, price, quantity=1):
"""
Creates a product for the specified `good` with `quantity`. `price` is set to the default price list.
Returns the new product instance
"""
produ... |
f21da23d45c328acffaba69a6f2fbf2056ca326b | datapipe/denoising/__init__.py | datapipe/denoising/__init__.py | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
# Copyright (c) 2016 Jérémie DECOCK (http://www.jdhp.org)
# This script is provided under the terms and conditions of the MIT license:
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (th... | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
# Copyright (c) 2016 Jérémie DECOCK (http://www.jdhp.org)
# This script is provided under the terms and conditions of the MIT license:
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (th... | Add a module to the __all__ list. | Add a module to the __all__ list.
| Python | mit | jdhp-sap/sap-cta-data-pipeline,jdhp-sap/sap-cta-data-pipeline,jdhp-sap/data-pipeline-standalone-scripts,jdhp-sap/data-pipeline-standalone-scripts | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
# Copyright (c) 2016 Jérémie DECOCK (http://www.jdhp.org)
# This script is provided under the terms and conditions of the MIT license:
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (th... | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
# Copyright (c) 2016 Jérémie DECOCK (http://www.jdhp.org)
# This script is provided under the terms and conditions of the MIT license:
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (th... | <commit_before>#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# Copyright (c) 2016 Jérémie DECOCK (http://www.jdhp.org)
# This script is provided under the terms and conditions of the MIT license:
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated document... | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
# Copyright (c) 2016 Jérémie DECOCK (http://www.jdhp.org)
# This script is provided under the terms and conditions of the MIT license:
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (th... | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
# Copyright (c) 2016 Jérémie DECOCK (http://www.jdhp.org)
# This script is provided under the terms and conditions of the MIT license:
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (th... | <commit_before>#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# Copyright (c) 2016 Jérémie DECOCK (http://www.jdhp.org)
# This script is provided under the terms and conditions of the MIT license:
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated document... |
c6a56604562460b2a8a72b25b23ce2ff4958d184 | test/test_api.py | test/test_api.py | import unittest
import timevis
class TestAPIs(unittest.TestCase):
def setUp(self):
self.app = timevis.app.test_client()
def test_api(self):
resp = self.app.get('/api/v2/experiment')
self.assertIsNotNone(resp.data)
if __name__ == '__main__':
unittest.main()
| import unittest
import timevis
import os.path
import json
# The folder holding the test data
test_path = os.path.dirname(__file__)
class TestExperiment(unittest.TestCase):
def setUp(self):
self.app = timevis.app.test_client()
self.url = '/api/v2/experiment'
# TODO create test db
... | Add test case: Post method for experiment | Add test case: Post method for experiment
| Python | mit | gaoce/TimeVis,gaoce/TimeVis,gaoce/TimeVis | import unittest
import timevis
class TestAPIs(unittest.TestCase):
def setUp(self):
self.app = timevis.app.test_client()
def test_api(self):
resp = self.app.get('/api/v2/experiment')
self.assertIsNotNone(resp.data)
if __name__ == '__main__':
unittest.main()
Add test case: Post me... | import unittest
import timevis
import os.path
import json
# The folder holding the test data
test_path = os.path.dirname(__file__)
class TestExperiment(unittest.TestCase):
def setUp(self):
self.app = timevis.app.test_client()
self.url = '/api/v2/experiment'
# TODO create test db
... | <commit_before>import unittest
import timevis
class TestAPIs(unittest.TestCase):
def setUp(self):
self.app = timevis.app.test_client()
def test_api(self):
resp = self.app.get('/api/v2/experiment')
self.assertIsNotNone(resp.data)
if __name__ == '__main__':
unittest.main()
<commit... | import unittest
import timevis
import os.path
import json
# The folder holding the test data
test_path = os.path.dirname(__file__)
class TestExperiment(unittest.TestCase):
def setUp(self):
self.app = timevis.app.test_client()
self.url = '/api/v2/experiment'
# TODO create test db
... | import unittest
import timevis
class TestAPIs(unittest.TestCase):
def setUp(self):
self.app = timevis.app.test_client()
def test_api(self):
resp = self.app.get('/api/v2/experiment')
self.assertIsNotNone(resp.data)
if __name__ == '__main__':
unittest.main()
Add test case: Post me... | <commit_before>import unittest
import timevis
class TestAPIs(unittest.TestCase):
def setUp(self):
self.app = timevis.app.test_client()
def test_api(self):
resp = self.app.get('/api/v2/experiment')
self.assertIsNotNone(resp.data)
if __name__ == '__main__':
unittest.main()
<commit... |
c9b38972486b588790371ab41c961e68609e0b4b | fabfile.py | fabfile.py | from fabric.api import sudo, cd, env, run, local
env.hosts = ['ibadaw@sableamd2.cs.mcgill.ca']
DEPLOY_DIR = '/var/www/mcbench/mcbench'
def deploy():
with cd(DEPLOY_DIR):
run('git pull origin master')
restart()
def restart():
sudo('service httpd restart')
def test():
local('nosetests')
... | from fabric.api import sudo, cd, env, run, local
env.hosts = ['ibadaw@sableamd2.cs.mcgill.ca']
DEPLOY_DIR = '/var/www/mcbench/mcbench'
def deploy():
with cd(DEPLOY_DIR):
run('git pull origin master')
restart()
def restart():
sudo('service httpd restart')
def test():
local('nosetests')
... | Add command to bring up dev server. | Add command to bring up dev server.
| Python | mit | isbadawi/mcbench,isbadawi/mcbench | from fabric.api import sudo, cd, env, run, local
env.hosts = ['ibadaw@sableamd2.cs.mcgill.ca']
DEPLOY_DIR = '/var/www/mcbench/mcbench'
def deploy():
with cd(DEPLOY_DIR):
run('git pull origin master')
restart()
def restart():
sudo('service httpd restart')
def test():
local('nosetests')
... | from fabric.api import sudo, cd, env, run, local
env.hosts = ['ibadaw@sableamd2.cs.mcgill.ca']
DEPLOY_DIR = '/var/www/mcbench/mcbench'
def deploy():
with cd(DEPLOY_DIR):
run('git pull origin master')
restart()
def restart():
sudo('service httpd restart')
def test():
local('nosetests')
... | <commit_before>from fabric.api import sudo, cd, env, run, local
env.hosts = ['ibadaw@sableamd2.cs.mcgill.ca']
DEPLOY_DIR = '/var/www/mcbench/mcbench'
def deploy():
with cd(DEPLOY_DIR):
run('git pull origin master')
restart()
def restart():
sudo('service httpd restart')
def test():
local(... | from fabric.api import sudo, cd, env, run, local
env.hosts = ['ibadaw@sableamd2.cs.mcgill.ca']
DEPLOY_DIR = '/var/www/mcbench/mcbench'
def deploy():
with cd(DEPLOY_DIR):
run('git pull origin master')
restart()
def restart():
sudo('service httpd restart')
def test():
local('nosetests')
... | from fabric.api import sudo, cd, env, run, local
env.hosts = ['ibadaw@sableamd2.cs.mcgill.ca']
DEPLOY_DIR = '/var/www/mcbench/mcbench'
def deploy():
with cd(DEPLOY_DIR):
run('git pull origin master')
restart()
def restart():
sudo('service httpd restart')
def test():
local('nosetests')
... | <commit_before>from fabric.api import sudo, cd, env, run, local
env.hosts = ['ibadaw@sableamd2.cs.mcgill.ca']
DEPLOY_DIR = '/var/www/mcbench/mcbench'
def deploy():
with cd(DEPLOY_DIR):
run('git pull origin master')
restart()
def restart():
sudo('service httpd restart')
def test():
local(... |
0257d01e53a314b176f3a3b97259b46a271a08be | tests/test_tx.py | tests/test_tx.py | from __future__ import absolute_import, division, print_function
import pytest
pytest.importorskip("twisted")
from twisted.internet.defer import Deferred, succeed, fail
from prometheus_async import tx
class TestTime(object):
@pytest.inlineCallbacks
def test_decorator(self, fo, patch_timer):
"""
... | from __future__ import absolute_import, division, print_function
import pytest
pytest.importorskip("twisted")
from twisted.internet.defer import Deferred, succeed, fail
from prometheus_async import tx
class TestTime(object):
@pytest.inlineCallbacks
def test_decorator_sync(self, fo, patch_timer):
"... | Test sync return for Twisted too | Test sync return for Twisted too
| Python | apache-2.0 | hynek/prometheus_async | from __future__ import absolute_import, division, print_function
import pytest
pytest.importorskip("twisted")
from twisted.internet.defer import Deferred, succeed, fail
from prometheus_async import tx
class TestTime(object):
@pytest.inlineCallbacks
def test_decorator(self, fo, patch_timer):
"""
... | from __future__ import absolute_import, division, print_function
import pytest
pytest.importorskip("twisted")
from twisted.internet.defer import Deferred, succeed, fail
from prometheus_async import tx
class TestTime(object):
@pytest.inlineCallbacks
def test_decorator_sync(self, fo, patch_timer):
"... | <commit_before>from __future__ import absolute_import, division, print_function
import pytest
pytest.importorskip("twisted")
from twisted.internet.defer import Deferred, succeed, fail
from prometheus_async import tx
class TestTime(object):
@pytest.inlineCallbacks
def test_decorator(self, fo, patch_timer):... | from __future__ import absolute_import, division, print_function
import pytest
pytest.importorskip("twisted")
from twisted.internet.defer import Deferred, succeed, fail
from prometheus_async import tx
class TestTime(object):
@pytest.inlineCallbacks
def test_decorator_sync(self, fo, patch_timer):
"... | from __future__ import absolute_import, division, print_function
import pytest
pytest.importorskip("twisted")
from twisted.internet.defer import Deferred, succeed, fail
from prometheus_async import tx
class TestTime(object):
@pytest.inlineCallbacks
def test_decorator(self, fo, patch_timer):
"""
... | <commit_before>from __future__ import absolute_import, division, print_function
import pytest
pytest.importorskip("twisted")
from twisted.internet.defer import Deferred, succeed, fail
from prometheus_async import tx
class TestTime(object):
@pytest.inlineCallbacks
def test_decorator(self, fo, patch_timer):... |
7ef23761c64c1e1b1ac47c72a78d5109c36761d0 | tests/testing.py | tests/testing.py | import os
import os.path
import subprocess
class HelloWorld(object):
BUILD = r"""#!/bin/sh
set -e
cd $1
cat > hello << EOF
#!/bin/sh
echo Hello world!
EOF
chmod +x hello
"""
EXPECTED_OUTPUT = "Hello world!\n"
def write_package_source(package_dir, scripts):
whack_dir = os.path.join(package_dir, "wh... | import os
import os.path
import subprocess
from whack.files import write_file
class HelloWorld(object):
BUILD = r"""#!/bin/sh
set -e
cd $1
cat > hello << EOF
#!/bin/sh
echo Hello world!
EOF
chmod +x hello
"""
EXPECTED_OUTPUT = "Hello world!\n"
def write_package_source(package_dir, scripts):
whack... | Remove duplicate definition of write_file | Remove duplicate definition of write_file
| Python | bsd-2-clause | mwilliamson/whack | import os
import os.path
import subprocess
class HelloWorld(object):
BUILD = r"""#!/bin/sh
set -e
cd $1
cat > hello << EOF
#!/bin/sh
echo Hello world!
EOF
chmod +x hello
"""
EXPECTED_OUTPUT = "Hello world!\n"
def write_package_source(package_dir, scripts):
whack_dir = os.path.join(package_dir, "wh... | import os
import os.path
import subprocess
from whack.files import write_file
class HelloWorld(object):
BUILD = r"""#!/bin/sh
set -e
cd $1
cat > hello << EOF
#!/bin/sh
echo Hello world!
EOF
chmod +x hello
"""
EXPECTED_OUTPUT = "Hello world!\n"
def write_package_source(package_dir, scripts):
whack... | <commit_before>import os
import os.path
import subprocess
class HelloWorld(object):
BUILD = r"""#!/bin/sh
set -e
cd $1
cat > hello << EOF
#!/bin/sh
echo Hello world!
EOF
chmod +x hello
"""
EXPECTED_OUTPUT = "Hello world!\n"
def write_package_source(package_dir, scripts):
whack_dir = os.path.join(p... | import os
import os.path
import subprocess
from whack.files import write_file
class HelloWorld(object):
BUILD = r"""#!/bin/sh
set -e
cd $1
cat > hello << EOF
#!/bin/sh
echo Hello world!
EOF
chmod +x hello
"""
EXPECTED_OUTPUT = "Hello world!\n"
def write_package_source(package_dir, scripts):
whack... | import os
import os.path
import subprocess
class HelloWorld(object):
BUILD = r"""#!/bin/sh
set -e
cd $1
cat > hello << EOF
#!/bin/sh
echo Hello world!
EOF
chmod +x hello
"""
EXPECTED_OUTPUT = "Hello world!\n"
def write_package_source(package_dir, scripts):
whack_dir = os.path.join(package_dir, "wh... | <commit_before>import os
import os.path
import subprocess
class HelloWorld(object):
BUILD = r"""#!/bin/sh
set -e
cd $1
cat > hello << EOF
#!/bin/sh
echo Hello world!
EOF
chmod +x hello
"""
EXPECTED_OUTPUT = "Hello world!\n"
def write_package_source(package_dir, scripts):
whack_dir = os.path.join(p... |
d8444cec60f38baa75b89892dda6163bf63917af | todo/__init__.py | todo/__init__.py | """django todo"""
__version__ = '1.5.dev'
__author__ = 'Scot Hacker'
__email__ = 'shacker@birdhouse.org'
__url__ = 'https://github.com/shacker/django-todo'
__license__ = 'BSD License'
| """django todo"""
__version__ = '1.5'
__author__ = 'Scot Hacker'
__email__ = 'shacker@birdhouse.org'
__url__ = 'https://github.com/shacker/django-todo'
__license__ = 'BSD License'
| Bump version number for release 1.5 | Bump version number for release 1.5
| Python | bsd-3-clause | jwiltshire/django-todo,shacker/django-todo,jwiltshire/django-todo,shacker/django-todo,jwiltshire/django-todo,shacker/django-todo | """django todo"""
__version__ = '1.5.dev'
__author__ = 'Scot Hacker'
__email__ = 'shacker@birdhouse.org'
__url__ = 'https://github.com/shacker/django-todo'
__license__ = 'BSD License'
Bump version number for release 1.5 | """django todo"""
__version__ = '1.5'
__author__ = 'Scot Hacker'
__email__ = 'shacker@birdhouse.org'
__url__ = 'https://github.com/shacker/django-todo'
__license__ = 'BSD License'
| <commit_before>"""django todo"""
__version__ = '1.5.dev'
__author__ = 'Scot Hacker'
__email__ = 'shacker@birdhouse.org'
__url__ = 'https://github.com/shacker/django-todo'
__license__ = 'BSD License'
<commit_msg>Bump version number for release 1.5<commit_after> | """django todo"""
__version__ = '1.5'
__author__ = 'Scot Hacker'
__email__ = 'shacker@birdhouse.org'
__url__ = 'https://github.com/shacker/django-todo'
__license__ = 'BSD License'
| """django todo"""
__version__ = '1.5.dev'
__author__ = 'Scot Hacker'
__email__ = 'shacker@birdhouse.org'
__url__ = 'https://github.com/shacker/django-todo'
__license__ = 'BSD License'
Bump version number for release 1.5"""django todo"""
__version__ = '1.5'
__author__ = 'Scot Hacker'
__email__ = 'shacker@birdhouse.or... | <commit_before>"""django todo"""
__version__ = '1.5.dev'
__author__ = 'Scot Hacker'
__email__ = 'shacker@birdhouse.org'
__url__ = 'https://github.com/shacker/django-todo'
__license__ = 'BSD License'
<commit_msg>Bump version number for release 1.5<commit_after>"""django todo"""
__version__ = '1.5'
__author__ = 'Scot ... |
f5728e24ba6dec2d2d7c2eff7888137e91469094 | overlay/Data.py | overlay/Data.py | import time
class Data:
def __init__(self, secs_since_epoch, depth_chart, temperature_chart, frame_path):
# general settings
self.width = 1296
self.height = 972
self.padding = 5
self.frame_path = frame_path
# date/time settings
self.time = time.localtime(se... | import time
class Data:
def __init__(self, secs_since_epoch, depth_chart, temperature_chart, frame_path):
# general settings
self.width = 1296
self.height = 972
self.padding = 5
self.frame_path = frame_path
# date/time settings
local_time = time.localtime(s... | Remove unneeded properties from main data object | Remove unneeded properties from main data object
| Python | mit | thelonious/g2x,gizmo-cda/g2x,gizmo-cda/g2x,gizmo-cda/g2x,gizmo-cda/g2x,thelonious/g2x | import time
class Data:
def __init__(self, secs_since_epoch, depth_chart, temperature_chart, frame_path):
# general settings
self.width = 1296
self.height = 972
self.padding = 5
self.frame_path = frame_path
# date/time settings
self.time = time.localtime(se... | import time
class Data:
def __init__(self, secs_since_epoch, depth_chart, temperature_chart, frame_path):
# general settings
self.width = 1296
self.height = 972
self.padding = 5
self.frame_path = frame_path
# date/time settings
local_time = time.localtime(s... | <commit_before>import time
class Data:
def __init__(self, secs_since_epoch, depth_chart, temperature_chart, frame_path):
# general settings
self.width = 1296
self.height = 972
self.padding = 5
self.frame_path = frame_path
# date/time settings
self.time = ti... | import time
class Data:
def __init__(self, secs_since_epoch, depth_chart, temperature_chart, frame_path):
# general settings
self.width = 1296
self.height = 972
self.padding = 5
self.frame_path = frame_path
# date/time settings
local_time = time.localtime(s... | import time
class Data:
def __init__(self, secs_since_epoch, depth_chart, temperature_chart, frame_path):
# general settings
self.width = 1296
self.height = 972
self.padding = 5
self.frame_path = frame_path
# date/time settings
self.time = time.localtime(se... | <commit_before>import time
class Data:
def __init__(self, secs_since_epoch, depth_chart, temperature_chart, frame_path):
# general settings
self.width = 1296
self.height = 972
self.padding = 5
self.frame_path = frame_path
# date/time settings
self.time = ti... |
29f3bb4fc549f78771294f90f5168b20f9ea7b5e | sdi/corestick.py | sdi/corestick.py | def read(filename):
"""
Reads in a corestick file and returns a dictionary keyed by core_id.
Layer interface depths are positive and are relative to the lake bottom.
depths are returned in meters. Northing and Easting are typically in the
coordinate system used in the rest of the lake survey. We ign... | def read(filename):
"""
Reads in a corestick file and returns a dictionary keyed by core_id.
Layer interface depths are positive and are relative to the lake bottom.
depths are returned in meters. Northing and Easting are typically in the
coordinate system used in the rest of the lake survey. We ign... | Modify to read layer colors. | Modify to read layer colors.
| Python | bsd-3-clause | twdb/sdi | def read(filename):
"""
Reads in a corestick file and returns a dictionary keyed by core_id.
Layer interface depths are positive and are relative to the lake bottom.
depths are returned in meters. Northing and Easting are typically in the
coordinate system used in the rest of the lake survey. We ign... | def read(filename):
"""
Reads in a corestick file and returns a dictionary keyed by core_id.
Layer interface depths are positive and are relative to the lake bottom.
depths are returned in meters. Northing and Easting are typically in the
coordinate system used in the rest of the lake survey. We ign... | <commit_before>def read(filename):
"""
Reads in a corestick file and returns a dictionary keyed by core_id.
Layer interface depths are positive and are relative to the lake bottom.
depths are returned in meters. Northing and Easting are typically in the
coordinate system used in the rest of the lake... | def read(filename):
"""
Reads in a corestick file and returns a dictionary keyed by core_id.
Layer interface depths are positive and are relative to the lake bottom.
depths are returned in meters. Northing and Easting are typically in the
coordinate system used in the rest of the lake survey. We ign... | def read(filename):
"""
Reads in a corestick file and returns a dictionary keyed by core_id.
Layer interface depths are positive and are relative to the lake bottom.
depths are returned in meters. Northing and Easting are typically in the
coordinate system used in the rest of the lake survey. We ign... | <commit_before>def read(filename):
"""
Reads in a corestick file and returns a dictionary keyed by core_id.
Layer interface depths are positive and are relative to the lake bottom.
depths are returned in meters. Northing and Easting are typically in the
coordinate system used in the rest of the lake... |
51aaf9c19f92db4b3ad5d7aa646bf6ef8d5e62a6 | runtests.py | runtests.py | #!/usr/bin/env python
import sys
from optparse import OptionParser
from django.conf import settings
if not settings.configured:
settings.configure(
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.sqlite3',
'NAME': 'django_celery_rpc',
'U... | #!/usr/bin/env python
import sys
from optparse import OptionParser
from django.conf import settings
if not settings.configured:
settings.configure(
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.sqlite3',
'NAME': ':memory:',
'USER': '',... | Fix run tests with Celery | Fix run tests with Celery
| Python | unlicense | bourivouh/django-celery-rpc,ttyS15/django-celery-rpc,tumb1er/django-celery-rpc | #!/usr/bin/env python
import sys
from optparse import OptionParser
from django.conf import settings
if not settings.configured:
settings.configure(
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.sqlite3',
'NAME': 'django_celery_rpc',
'U... | #!/usr/bin/env python
import sys
from optparse import OptionParser
from django.conf import settings
if not settings.configured:
settings.configure(
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.sqlite3',
'NAME': ':memory:',
'USER': '',... | <commit_before>#!/usr/bin/env python
import sys
from optparse import OptionParser
from django.conf import settings
if not settings.configured:
settings.configure(
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.sqlite3',
'NAME': 'django_celery_rpc',
... | #!/usr/bin/env python
import sys
from optparse import OptionParser
from django.conf import settings
if not settings.configured:
settings.configure(
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.sqlite3',
'NAME': ':memory:',
'USER': '',... | #!/usr/bin/env python
import sys
from optparse import OptionParser
from django.conf import settings
if not settings.configured:
settings.configure(
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.sqlite3',
'NAME': 'django_celery_rpc',
'U... | <commit_before>#!/usr/bin/env python
import sys
from optparse import OptionParser
from django.conf import settings
if not settings.configured:
settings.configure(
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.sqlite3',
'NAME': 'django_celery_rpc',
... |
6290d72458a470947c5da651968cf20f8714c646 | fancypages/contrib/oscar_fancypages/views.py | fancypages/contrib/oscar_fancypages/views.py | from oscar.core.loading import load_class
from . import mixins
ProductCategoryView = load_class('catalogue.views', 'ProductCategoryView')
class FancyPageDetailView(mixins.OscarFancyPageMixin, ProductCategoryView):
pass
| from oscar.core.loading import get_class
from . import mixins
ProductCategoryView = get_class('catalogue.views', 'ProductCategoryView')
class FancyPageDetailView(mixins.OscarFancyPageMixin, ProductCategoryView):
pass
| Fix class loader called in Oscar contrib package | Fix class loader called in Oscar contrib package
| Python | bsd-3-clause | socradev/django-fancypages,socradev/django-fancypages,socradev/django-fancypages,tangentlabs/django-fancypages,tangentlabs/django-fancypages,tangentlabs/django-fancypages | from oscar.core.loading import load_class
from . import mixins
ProductCategoryView = load_class('catalogue.views', 'ProductCategoryView')
class FancyPageDetailView(mixins.OscarFancyPageMixin, ProductCategoryView):
pass
Fix class loader called in Oscar contrib package | from oscar.core.loading import get_class
from . import mixins
ProductCategoryView = get_class('catalogue.views', 'ProductCategoryView')
class FancyPageDetailView(mixins.OscarFancyPageMixin, ProductCategoryView):
pass
| <commit_before>from oscar.core.loading import load_class
from . import mixins
ProductCategoryView = load_class('catalogue.views', 'ProductCategoryView')
class FancyPageDetailView(mixins.OscarFancyPageMixin, ProductCategoryView):
pass
<commit_msg>Fix class loader called in Oscar contrib package<commit_after> | from oscar.core.loading import get_class
from . import mixins
ProductCategoryView = get_class('catalogue.views', 'ProductCategoryView')
class FancyPageDetailView(mixins.OscarFancyPageMixin, ProductCategoryView):
pass
| from oscar.core.loading import load_class
from . import mixins
ProductCategoryView = load_class('catalogue.views', 'ProductCategoryView')
class FancyPageDetailView(mixins.OscarFancyPageMixin, ProductCategoryView):
pass
Fix class loader called in Oscar contrib packagefrom oscar.core.loading import get_class
fr... | <commit_before>from oscar.core.loading import load_class
from . import mixins
ProductCategoryView = load_class('catalogue.views', 'ProductCategoryView')
class FancyPageDetailView(mixins.OscarFancyPageMixin, ProductCategoryView):
pass
<commit_msg>Fix class loader called in Oscar contrib package<commit_after>fro... |
9f5ed14f24aecdd46699e84e13e9fa1f90cbf793 | script/lib/config.py | script/lib/config.py | #!/usr/bin/env python
import platform
import sys
BASE_URL = 'http://gh-contractor-zcbenz.s3.amazonaws.com/libchromiumcontent'
LIBCHROMIUMCONTENT_COMMIT = '17a0e24666d0198810752284690bc2d0d87094d7'
ARCH = {
'cygwin': '32bit',
'darwin': '64bit',
'linux2': platform.architecture()[0],
'win32': '32bit',
}... | #!/usr/bin/env python
import platform
import sys
BASE_URL = 'http://gh-contractor-zcbenz.s3.amazonaws.com/libchromiumcontent'
LIBCHROMIUMCONTENT_COMMIT = '6300862b4b16bd171f00ae566b697098c29743f7'
ARCH = {
'cygwin': '32bit',
'darwin': '64bit',
'linux2': platform.architecture()[0],
'win32': '32bit',
}... | Upgrade libchromiumcontent to fix linking error | mac: Upgrade libchromiumcontent to fix linking error
| Python | mit | brave/muon,chriskdon/electron,Gerhut/electron,twolfson/electron,icattlecoder/electron,the-ress/electron,bruce/electron,soulteary/electron,nekuz0r/electron,tylergibson/electron,Zagorakiss/electron,tomashanacek/electron,chrisswk/electron,destan/electron,roadev/electron,simongregory/electron,gbn972/electron,jiaz/electron,... | #!/usr/bin/env python
import platform
import sys
BASE_URL = 'http://gh-contractor-zcbenz.s3.amazonaws.com/libchromiumcontent'
LIBCHROMIUMCONTENT_COMMIT = '17a0e24666d0198810752284690bc2d0d87094d7'
ARCH = {
'cygwin': '32bit',
'darwin': '64bit',
'linux2': platform.architecture()[0],
'win32': '32bit',
}... | #!/usr/bin/env python
import platform
import sys
BASE_URL = 'http://gh-contractor-zcbenz.s3.amazonaws.com/libchromiumcontent'
LIBCHROMIUMCONTENT_COMMIT = '6300862b4b16bd171f00ae566b697098c29743f7'
ARCH = {
'cygwin': '32bit',
'darwin': '64bit',
'linux2': platform.architecture()[0],
'win32': '32bit',
}... | <commit_before>#!/usr/bin/env python
import platform
import sys
BASE_URL = 'http://gh-contractor-zcbenz.s3.amazonaws.com/libchromiumcontent'
LIBCHROMIUMCONTENT_COMMIT = '17a0e24666d0198810752284690bc2d0d87094d7'
ARCH = {
'cygwin': '32bit',
'darwin': '64bit',
'linux2': platform.architecture()[0],
'win... | #!/usr/bin/env python
import platform
import sys
BASE_URL = 'http://gh-contractor-zcbenz.s3.amazonaws.com/libchromiumcontent'
LIBCHROMIUMCONTENT_COMMIT = '6300862b4b16bd171f00ae566b697098c29743f7'
ARCH = {
'cygwin': '32bit',
'darwin': '64bit',
'linux2': platform.architecture()[0],
'win32': '32bit',
}... | #!/usr/bin/env python
import platform
import sys
BASE_URL = 'http://gh-contractor-zcbenz.s3.amazonaws.com/libchromiumcontent'
LIBCHROMIUMCONTENT_COMMIT = '17a0e24666d0198810752284690bc2d0d87094d7'
ARCH = {
'cygwin': '32bit',
'darwin': '64bit',
'linux2': platform.architecture()[0],
'win32': '32bit',
}... | <commit_before>#!/usr/bin/env python
import platform
import sys
BASE_URL = 'http://gh-contractor-zcbenz.s3.amazonaws.com/libchromiumcontent'
LIBCHROMIUMCONTENT_COMMIT = '17a0e24666d0198810752284690bc2d0d87094d7'
ARCH = {
'cygwin': '32bit',
'darwin': '64bit',
'linux2': platform.architecture()[0],
'win... |
4146be648f04ed409eb82e43528bc700751ef03c | src/qtlayoutbuilder/builderror_test.py | src/qtlayoutbuilder/builderror_test.py | from unittest import TestCase
class TestBuildError(TestCase):
def test_push_message(self):
self.fail()
def test_format_as_single_string(self):
self.faildoo()
| from unittest import TestCase
from builderror import BuildError
class TestBuildError(TestCase):
def test_that_multiple_pushed_messages_are_formatted_properly_when_asked_for(self):
err = BuildError()
err.push_message('message about error details')
err.push_message('message about error cont... | Put in first proper tiny package class and unit test. | Put in first proper tiny package class and unit test.
| Python | mit | peterhoward42/qt-layout-gen | from unittest import TestCase
class TestBuildError(TestCase):
def test_push_message(self):
self.fail()
def test_format_as_single_string(self):
self.faildoo()
Put in first proper tiny package class and unit test. | from unittest import TestCase
from builderror import BuildError
class TestBuildError(TestCase):
def test_that_multiple_pushed_messages_are_formatted_properly_when_asked_for(self):
err = BuildError()
err.push_message('message about error details')
err.push_message('message about error cont... | <commit_before>from unittest import TestCase
class TestBuildError(TestCase):
def test_push_message(self):
self.fail()
def test_format_as_single_string(self):
self.faildoo()
<commit_msg>Put in first proper tiny package class and unit test.<commit_after> | from unittest import TestCase
from builderror import BuildError
class TestBuildError(TestCase):
def test_that_multiple_pushed_messages_are_formatted_properly_when_asked_for(self):
err = BuildError()
err.push_message('message about error details')
err.push_message('message about error cont... | from unittest import TestCase
class TestBuildError(TestCase):
def test_push_message(self):
self.fail()
def test_format_as_single_string(self):
self.faildoo()
Put in first proper tiny package class and unit test.from unittest import TestCase
from builderror import BuildError
class TestBuildE... | <commit_before>from unittest import TestCase
class TestBuildError(TestCase):
def test_push_message(self):
self.fail()
def test_format_as_single_string(self):
self.faildoo()
<commit_msg>Put in first proper tiny package class and unit test.<commit_after>from unittest import TestCase
from build... |
1713cf8553d7f21d1192ed58138ecf7875c4b181 | icebergsdk/front_modules.py | icebergsdk/front_modules.py | # -*- coding: utf-8 -*-
import logging
from icebergsdk.mixins.request_mixin import IcebergRequestBase
logger = logging.getLogger('icebergsdk.frontmodules')
class FrontModules(IcebergRequestBase):
cache_key = "icebergsdk:frontmodule:data"
cache_expire = 60*60 # one hour
def __init__(self, *args, **kwargs... | # -*- coding: utf-8 -*-
import logging
from icebergsdk.mixins.request_mixin import IcebergRequestBase
logger = logging.getLogger('icebergsdk.frontmodules')
class FrontModules(IcebergRequestBase):
cache_key = "icebergsdk:frontmodule:data"
cache_expire = 60*60 # one hour
def __init__(self, *args, **kwargs... | Add lang, enviro in request | Add lang, enviro in request
| Python | mit | izberg-marketplace/izberg-api-python,Iceberg-Marketplace/Iceberg-API-PYTHON | # -*- coding: utf-8 -*-
import logging
from icebergsdk.mixins.request_mixin import IcebergRequestBase
logger = logging.getLogger('icebergsdk.frontmodules')
class FrontModules(IcebergRequestBase):
cache_key = "icebergsdk:frontmodule:data"
cache_expire = 60*60 # one hour
def __init__(self, *args, **kwargs... | # -*- coding: utf-8 -*-
import logging
from icebergsdk.mixins.request_mixin import IcebergRequestBase
logger = logging.getLogger('icebergsdk.frontmodules')
class FrontModules(IcebergRequestBase):
cache_key = "icebergsdk:frontmodule:data"
cache_expire = 60*60 # one hour
def __init__(self, *args, **kwargs... | <commit_before># -*- coding: utf-8 -*-
import logging
from icebergsdk.mixins.request_mixin import IcebergRequestBase
logger = logging.getLogger('icebergsdk.frontmodules')
class FrontModules(IcebergRequestBase):
cache_key = "icebergsdk:frontmodule:data"
cache_expire = 60*60 # one hour
def __init__(self, ... | # -*- coding: utf-8 -*-
import logging
from icebergsdk.mixins.request_mixin import IcebergRequestBase
logger = logging.getLogger('icebergsdk.frontmodules')
class FrontModules(IcebergRequestBase):
cache_key = "icebergsdk:frontmodule:data"
cache_expire = 60*60 # one hour
def __init__(self, *args, **kwargs... | # -*- coding: utf-8 -*-
import logging
from icebergsdk.mixins.request_mixin import IcebergRequestBase
logger = logging.getLogger('icebergsdk.frontmodules')
class FrontModules(IcebergRequestBase):
cache_key = "icebergsdk:frontmodule:data"
cache_expire = 60*60 # one hour
def __init__(self, *args, **kwargs... | <commit_before># -*- coding: utf-8 -*-
import logging
from icebergsdk.mixins.request_mixin import IcebergRequestBase
logger = logging.getLogger('icebergsdk.frontmodules')
class FrontModules(IcebergRequestBase):
cache_key = "icebergsdk:frontmodule:data"
cache_expire = 60*60 # one hour
def __init__(self, ... |
adf747998641b1aeb75feada25470aa2a072bd37 | examples/test-mh/policies/participant_3.py | examples/test-mh/policies/participant_3.py | {
"inbound": [
{
"cookie": 1,
"match":
{
"tcp_dst": 4321
},
"action":
{
"fwd": 0
}
},
{
"cookie": 2,
"match":
{
"tcp_dst"... | {
"inbound": [
{
"cookie": 1,
"match":
{
"tcp_dst": 4321
},
"action":
{
"fwd": 0
}
},
{
"cookie": 2,
"match":
{
"tcp_dst"... | Add inbound drop policy for participant 3 based on eth_src of participant 1 | Add inbound drop policy for participant 3 based on eth_src of participant 1
| Python | apache-2.0 | h2020-endeavour/endeavour,h2020-endeavour/endeavour | {
"inbound": [
{
"cookie": 1,
"match":
{
"tcp_dst": 4321
},
"action":
{
"fwd": 0
}
},
{
"cookie": 2,
"match":
{
"tcp_dst"... | {
"inbound": [
{
"cookie": 1,
"match":
{
"tcp_dst": 4321
},
"action":
{
"fwd": 0
}
},
{
"cookie": 2,
"match":
{
"tcp_dst"... | <commit_before>{
"inbound": [
{
"cookie": 1,
"match":
{
"tcp_dst": 4321
},
"action":
{
"fwd": 0
}
},
{
"cookie": 2,
"match":
{
... | {
"inbound": [
{
"cookie": 1,
"match":
{
"tcp_dst": 4321
},
"action":
{
"fwd": 0
}
},
{
"cookie": 2,
"match":
{
"tcp_dst"... | {
"inbound": [
{
"cookie": 1,
"match":
{
"tcp_dst": 4321
},
"action":
{
"fwd": 0
}
},
{
"cookie": 2,
"match":
{
"tcp_dst"... | <commit_before>{
"inbound": [
{
"cookie": 1,
"match":
{
"tcp_dst": 4321
},
"action":
{
"fwd": 0
}
},
{
"cookie": 2,
"match":
{
... |
626345a10ee3d0aa90b7791e88c9b09544bdfa88 | daiquiri/files/views.py | daiquiri/files/views.py | import logging
from django.contrib.auth.views import redirect_to_login
from django.core.exceptions import PermissionDenied
from django.http import Http404
from django.views.generic import View
from .utils import file_exists, get_directory, render_with_layout, send_file
logger = logging.getLogger(__name__)
class Fi... | import logging
from django.contrib.auth.views import redirect_to_login
from django.core.exceptions import PermissionDenied
from django.http import Http404
from django.views.generic import View
from .utils import file_exists, get_directory, render_with_layout, send_file
logger = logging.getLogger(__name__)
class Fi... | Remove layout for non-html files | Remove layout for non-html files
| Python | apache-2.0 | aipescience/django-daiquiri,aipescience/django-daiquiri,aipescience/django-daiquiri | import logging
from django.contrib.auth.views import redirect_to_login
from django.core.exceptions import PermissionDenied
from django.http import Http404
from django.views.generic import View
from .utils import file_exists, get_directory, render_with_layout, send_file
logger = logging.getLogger(__name__)
class Fi... | import logging
from django.contrib.auth.views import redirect_to_login
from django.core.exceptions import PermissionDenied
from django.http import Http404
from django.views.generic import View
from .utils import file_exists, get_directory, render_with_layout, send_file
logger = logging.getLogger(__name__)
class Fi... | <commit_before>import logging
from django.contrib.auth.views import redirect_to_login
from django.core.exceptions import PermissionDenied
from django.http import Http404
from django.views.generic import View
from .utils import file_exists, get_directory, render_with_layout, send_file
logger = logging.getLogger(__nam... | import logging
from django.contrib.auth.views import redirect_to_login
from django.core.exceptions import PermissionDenied
from django.http import Http404
from django.views.generic import View
from .utils import file_exists, get_directory, render_with_layout, send_file
logger = logging.getLogger(__name__)
class Fi... | import logging
from django.contrib.auth.views import redirect_to_login
from django.core.exceptions import PermissionDenied
from django.http import Http404
from django.views.generic import View
from .utils import file_exists, get_directory, render_with_layout, send_file
logger = logging.getLogger(__name__)
class Fi... | <commit_before>import logging
from django.contrib.auth.views import redirect_to_login
from django.core.exceptions import PermissionDenied
from django.http import Http404
from django.views.generic import View
from .utils import file_exists, get_directory, render_with_layout, send_file
logger = logging.getLogger(__nam... |
b71f076bbb745764d6ed5724d494e878a8fbd785 | syncplay/__init__.py | syncplay/__init__.py | version = '1.6.5'
revision = ' development'
milestone = 'Yoitsu'
release_number = '85'
projectURL = 'https://syncplay.pl/'
| version = '1.6.5'
revision = ' release'
milestone = 'Yoitsu'
release_number = '86'
projectURL = 'https://syncplay.pl/'
| Mark build 86 and v1.6.5 release | Mark build 86 and v1.6.5 release | Python | apache-2.0 | Syncplay/syncplay,Syncplay/syncplay,alby128/syncplay,alby128/syncplay | version = '1.6.5'
revision = ' development'
milestone = 'Yoitsu'
release_number = '85'
projectURL = 'https://syncplay.pl/'
Mark build 86 and v1.6.5 release | version = '1.6.5'
revision = ' release'
milestone = 'Yoitsu'
release_number = '86'
projectURL = 'https://syncplay.pl/'
| <commit_before>version = '1.6.5'
revision = ' development'
milestone = 'Yoitsu'
release_number = '85'
projectURL = 'https://syncplay.pl/'
<commit_msg>Mark build 86 and v1.6.5 release<commit_after> | version = '1.6.5'
revision = ' release'
milestone = 'Yoitsu'
release_number = '86'
projectURL = 'https://syncplay.pl/'
| version = '1.6.5'
revision = ' development'
milestone = 'Yoitsu'
release_number = '85'
projectURL = 'https://syncplay.pl/'
Mark build 86 and v1.6.5 releaseversion = '1.6.5'
revision = ' release'
milestone = 'Yoitsu'
release_number = '86'
projectURL = 'https://syncplay.pl/'
| <commit_before>version = '1.6.5'
revision = ' development'
milestone = 'Yoitsu'
release_number = '85'
projectURL = 'https://syncplay.pl/'
<commit_msg>Mark build 86 and v1.6.5 release<commit_after>version = '1.6.5'
revision = ' release'
milestone = 'Yoitsu'
release_number = '86'
projectURL = 'https://syncplay.pl/'
|
b5206de1d6a99cd4a22f1ef5681e7964a7289b2e | debug_toolbar_multilang/pseudo/expander_pseudo_language.py | debug_toolbar_multilang/pseudo/expander_pseudo_language.py | from django.utils import six
from debug_toolbar_multilang.pseudo import STR_FORMAT_PATTERN, \
STR_FORMAT_NAMED_PATTERN
from debug_toolbar_multilang.pseudo.pseudo_language import PseudoLanguage
class ExpanderPseudoLanguage(PseudoLanguage):
"""
Pseudo Language for expanding the strings. This is useful
f... | from django.utils import six
from debug_toolbar_multilang.pseudo import STR_FORMAT_PATTERN, \
STR_FORMAT_NAMED_PATTERN
from debug_toolbar_multilang.pseudo.pseudo_language import PseudoLanguage
class ExpanderPseudoLanguage(PseudoLanguage):
"""
Pseudo Language for expanding the strings. This is useful
f... | Fix python 2 unicode issue. | Fix python 2 unicode issue.
| Python | mit | Matt3o12/django-debug-toolbar-multilang,Matt3o12/django-debug-toolbar-multilang | from django.utils import six
from debug_toolbar_multilang.pseudo import STR_FORMAT_PATTERN, \
STR_FORMAT_NAMED_PATTERN
from debug_toolbar_multilang.pseudo.pseudo_language import PseudoLanguage
class ExpanderPseudoLanguage(PseudoLanguage):
"""
Pseudo Language for expanding the strings. This is useful
f... | from django.utils import six
from debug_toolbar_multilang.pseudo import STR_FORMAT_PATTERN, \
STR_FORMAT_NAMED_PATTERN
from debug_toolbar_multilang.pseudo.pseudo_language import PseudoLanguage
class ExpanderPseudoLanguage(PseudoLanguage):
"""
Pseudo Language for expanding the strings. This is useful
f... | <commit_before>from django.utils import six
from debug_toolbar_multilang.pseudo import STR_FORMAT_PATTERN, \
STR_FORMAT_NAMED_PATTERN
from debug_toolbar_multilang.pseudo.pseudo_language import PseudoLanguage
class ExpanderPseudoLanguage(PseudoLanguage):
"""
Pseudo Language for expanding the strings. This ... | from django.utils import six
from debug_toolbar_multilang.pseudo import STR_FORMAT_PATTERN, \
STR_FORMAT_NAMED_PATTERN
from debug_toolbar_multilang.pseudo.pseudo_language import PseudoLanguage
class ExpanderPseudoLanguage(PseudoLanguage):
"""
Pseudo Language for expanding the strings. This is useful
f... | from django.utils import six
from debug_toolbar_multilang.pseudo import STR_FORMAT_PATTERN, \
STR_FORMAT_NAMED_PATTERN
from debug_toolbar_multilang.pseudo.pseudo_language import PseudoLanguage
class ExpanderPseudoLanguage(PseudoLanguage):
"""
Pseudo Language for expanding the strings. This is useful
f... | <commit_before>from django.utils import six
from debug_toolbar_multilang.pseudo import STR_FORMAT_PATTERN, \
STR_FORMAT_NAMED_PATTERN
from debug_toolbar_multilang.pseudo.pseudo_language import PseudoLanguage
class ExpanderPseudoLanguage(PseudoLanguage):
"""
Pseudo Language for expanding the strings. This ... |
c27010a3d5265d9eb783f627adca7cb0c25dcb9a | ctypeslib/test/stdio.py | ctypeslib/test/stdio.py | import os
from ctypeslib.dynamic_module import include
from ctypes import *
import logging
logging.basicConfig(level=logging.INFO)
if os.name == "nt":
_libc = CDLL("msvcrt")
else:
_libc = CDLL(None)
include("""\
#include <stdio.h>
#ifdef _MSC_VER
# include <fcntl.h>
#else
# include <sys/fcntl.h>
#endif
"""... | import os
from ctypeslib.dynamic_module import include
from ctypes import *
if os.name == "nt":
_libc = CDLL("msvcrt")
else:
_libc = CDLL(None)
include("""\
#include <stdio.h>
#ifdef _MSC_VER
# include <fcntl.h>
#else
# include <sys/fcntl.h>
#endif
""",
persist=False)
| Remove the logging setup call. | Remove the logging setup call. | Python | mit | sugarmanz/ctypeslib | import os
from ctypeslib.dynamic_module import include
from ctypes import *
import logging
logging.basicConfig(level=logging.INFO)
if os.name == "nt":
_libc = CDLL("msvcrt")
else:
_libc = CDLL(None)
include("""\
#include <stdio.h>
#ifdef _MSC_VER
# include <fcntl.h>
#else
# include <sys/fcntl.h>
#endif
"""... | import os
from ctypeslib.dynamic_module import include
from ctypes import *
if os.name == "nt":
_libc = CDLL("msvcrt")
else:
_libc = CDLL(None)
include("""\
#include <stdio.h>
#ifdef _MSC_VER
# include <fcntl.h>
#else
# include <sys/fcntl.h>
#endif
""",
persist=False)
| <commit_before>import os
from ctypeslib.dynamic_module import include
from ctypes import *
import logging
logging.basicConfig(level=logging.INFO)
if os.name == "nt":
_libc = CDLL("msvcrt")
else:
_libc = CDLL(None)
include("""\
#include <stdio.h>
#ifdef _MSC_VER
# include <fcntl.h>
#else
# include <sys/fcnt... | import os
from ctypeslib.dynamic_module import include
from ctypes import *
if os.name == "nt":
_libc = CDLL("msvcrt")
else:
_libc = CDLL(None)
include("""\
#include <stdio.h>
#ifdef _MSC_VER
# include <fcntl.h>
#else
# include <sys/fcntl.h>
#endif
""",
persist=False)
| import os
from ctypeslib.dynamic_module import include
from ctypes import *
import logging
logging.basicConfig(level=logging.INFO)
if os.name == "nt":
_libc = CDLL("msvcrt")
else:
_libc = CDLL(None)
include("""\
#include <stdio.h>
#ifdef _MSC_VER
# include <fcntl.h>
#else
# include <sys/fcntl.h>
#endif
"""... | <commit_before>import os
from ctypeslib.dynamic_module import include
from ctypes import *
import logging
logging.basicConfig(level=logging.INFO)
if os.name == "nt":
_libc = CDLL("msvcrt")
else:
_libc = CDLL(None)
include("""\
#include <stdio.h>
#ifdef _MSC_VER
# include <fcntl.h>
#else
# include <sys/fcnt... |
5d0541f5b5b8cc18b2e3f86b237c01ed915d5c0a | dhcp2nest/util.py | dhcp2nest/util.py | """
Utility functions for dhcp2nest
"""
from queue import Queue
from subprocess import Popen, PIPE
from threading import Thread
def follow_file(fn, max_lines=100):
"""
Return a Queue that is fed lines (up to max_lines) from the given file (fn)
continuously
The implementation given here was inspired b... | """
Utility functions for dhcp2nest
"""
from queue import Queue
from subprocess import Popen, PIPE
from threading import Thread
def follow_file(fn, max_lines=100):
"""
Return a Queue that is fed lines (up to max_lines) from the given file (fn)
continuously
The implementation given here was inspired b... | Make sure that follow-file decodes utf-8 from its input | Make sure that follow-file decodes utf-8 from its input
Signed-off-by: Jason Bernardino Alonso <f71c42a1353bbcdbe07e24c2a1c893f8ea1d05ee@hackorp.com>
| Python | mit | jbalonso/dhcp2nest | """
Utility functions for dhcp2nest
"""
from queue import Queue
from subprocess import Popen, PIPE
from threading import Thread
def follow_file(fn, max_lines=100):
"""
Return a Queue that is fed lines (up to max_lines) from the given file (fn)
continuously
The implementation given here was inspired b... | """
Utility functions for dhcp2nest
"""
from queue import Queue
from subprocess import Popen, PIPE
from threading import Thread
def follow_file(fn, max_lines=100):
"""
Return a Queue that is fed lines (up to max_lines) from the given file (fn)
continuously
The implementation given here was inspired b... | <commit_before>"""
Utility functions for dhcp2nest
"""
from queue import Queue
from subprocess import Popen, PIPE
from threading import Thread
def follow_file(fn, max_lines=100):
"""
Return a Queue that is fed lines (up to max_lines) from the given file (fn)
continuously
The implementation given here... | """
Utility functions for dhcp2nest
"""
from queue import Queue
from subprocess import Popen, PIPE
from threading import Thread
def follow_file(fn, max_lines=100):
"""
Return a Queue that is fed lines (up to max_lines) from the given file (fn)
continuously
The implementation given here was inspired b... | """
Utility functions for dhcp2nest
"""
from queue import Queue
from subprocess import Popen, PIPE
from threading import Thread
def follow_file(fn, max_lines=100):
"""
Return a Queue that is fed lines (up to max_lines) from the given file (fn)
continuously
The implementation given here was inspired b... | <commit_before>"""
Utility functions for dhcp2nest
"""
from queue import Queue
from subprocess import Popen, PIPE
from threading import Thread
def follow_file(fn, max_lines=100):
"""
Return a Queue that is fed lines (up to max_lines) from the given file (fn)
continuously
The implementation given here... |
cb75a7ad69b273a57d2b10378712388f179abca3 | pande_gas/features/tests/test_fingerprints.py | pande_gas/features/tests/test_fingerprints.py | """
Test topological fingerprints.
"""
import unittest
from rdkit import Chem
from pande_gas.features import fingerprints as fp
class TestCircularFingerprint(unittest.TestCase):
"""
Tests for CircularFingerprint.
"""
def setUp(self):
"""
Set up tests.
"""
smiles = 'CC... | """
Test topological fingerprints.
"""
import unittest
from rdkit import Chem
from pande_gas.features import fingerprints as fp
class TestCircularFingerprint(unittest.TestCase):
"""
Tests for CircularFingerprint.
"""
def setUp(self):
"""
Set up tests.
"""
smiles = 'CC... | Add test for fragment SMILES | Add test for fragment SMILES
| Python | bsd-3-clause | rbharath/pande-gas,rbharath/pande-gas | """
Test topological fingerprints.
"""
import unittest
from rdkit import Chem
from pande_gas.features import fingerprints as fp
class TestCircularFingerprint(unittest.TestCase):
"""
Tests for CircularFingerprint.
"""
def setUp(self):
"""
Set up tests.
"""
smiles = 'CC... | """
Test topological fingerprints.
"""
import unittest
from rdkit import Chem
from pande_gas.features import fingerprints as fp
class TestCircularFingerprint(unittest.TestCase):
"""
Tests for CircularFingerprint.
"""
def setUp(self):
"""
Set up tests.
"""
smiles = 'CC... | <commit_before>"""
Test topological fingerprints.
"""
import unittest
from rdkit import Chem
from pande_gas.features import fingerprints as fp
class TestCircularFingerprint(unittest.TestCase):
"""
Tests for CircularFingerprint.
"""
def setUp(self):
"""
Set up tests.
"""
... | """
Test topological fingerprints.
"""
import unittest
from rdkit import Chem
from pande_gas.features import fingerprints as fp
class TestCircularFingerprint(unittest.TestCase):
"""
Tests for CircularFingerprint.
"""
def setUp(self):
"""
Set up tests.
"""
smiles = 'CC... | """
Test topological fingerprints.
"""
import unittest
from rdkit import Chem
from pande_gas.features import fingerprints as fp
class TestCircularFingerprint(unittest.TestCase):
"""
Tests for CircularFingerprint.
"""
def setUp(self):
"""
Set up tests.
"""
smiles = 'CC... | <commit_before>"""
Test topological fingerprints.
"""
import unittest
from rdkit import Chem
from pande_gas.features import fingerprints as fp
class TestCircularFingerprint(unittest.TestCase):
"""
Tests for CircularFingerprint.
"""
def setUp(self):
"""
Set up tests.
"""
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.