commit
stringlengths 40
40
| old_file
stringlengths 4
236
| new_file
stringlengths 4
236
| old_contents
stringlengths 1
3.26k
| new_contents
stringlengths 16
4.43k
| subject
stringlengths 16
624
| message
stringlengths 17
3.29k
| lang
stringclasses 5
values | license
stringclasses 13
values | repos
stringlengths 5
91.5k
|
|---|---|---|---|---|---|---|---|---|---|
238494a1323d82a791b244a84af64eda3d9be750
|
tests/services/test_reverse_proxy.py
|
tests/services/test_reverse_proxy.py
|
from unittest.mock import Mock
from jupyterhub import orm
from remoteappmanager.services.reverse_proxy import ReverseProxy
from tornado import gen, testing
class TestReverseProxy(testing.AsyncTestCase):
@testing.gen_test
def test_reverse_proxy_operations(self):
coroutine_out = None
@gen.coroutine
def mock_api_request(self, *args, **kwargs):
nonlocal coroutine_out
yield gen.sleep(0.1)
coroutine_out = dict(args=args, kwargs=kwargs)
reverse_proxy = ReverseProxy("http://fake/api", "token")
reverse_proxy._reverse_proxy = Mock(spec=orm.Proxy)
reverse_proxy._reverse_proxy.api_request = mock_api_request
yield reverse_proxy.register("/hello/from/me/",
"http://localhost:12312/")
self.assertEqual(coroutine_out["kwargs"]["method"], "POST")
yield reverse_proxy.unregister("/hello/from/me/")
self.assertEqual(coroutine_out["kwargs"]["method"], "DELETE")
|
from unittest.mock import Mock
from jupyterhub import orm
from remoteappmanager.services.reverse_proxy import ReverseProxy
from tornado import gen, testing
class TestReverseProxy(testing.AsyncTestCase):
@testing.gen_test
def test_reverse_proxy_operations(self):
coroutine_out = None
@gen.coroutine
def mock_api_request(self, *args, **kwargs):
nonlocal coroutine_out
yield gen.sleep(0.1)
coroutine_out = dict(args=args, kwargs=kwargs)
reverse_proxy = ReverseProxy(
endpoint_url="http://fake/api",
auth_token="token")
reverse_proxy._reverse_proxy = Mock(spec=orm.Proxy)
reverse_proxy._reverse_proxy.api_request = mock_api_request
yield reverse_proxy.register("/hello/from/me/",
"http://localhost:12312/")
self.assertEqual(coroutine_out["kwargs"]["method"], "POST")
yield reverse_proxy.unregister("/hello/from/me/")
self.assertEqual(coroutine_out["kwargs"]["method"], "DELETE")
|
Solve deprecation warning from Traitlets
|
Solve deprecation warning from Traitlets
|
Python
|
bsd-3-clause
|
simphony/simphony-remote,simphony/simphony-remote,simphony/simphony-remote,simphony/simphony-remote
|
dac770314da39c5494ff6c1ccd46d507ff1b2540
|
tests/test_errorware.py
|
tests/test_errorware.py
|
from tg.error import ErrorReporter
def simple_app(environ, start_response):
status = '200 OK'
headers = [('Content-type', 'text/plain')]
start_response(status, headers)
return ['HELLO']
class TestErrorReporterConfig(object):
def test_disable_all(self):
app = ErrorReporter(simple_app, {})
reporters = [r.__class__.__name__ for r in app.reporters]
assert 'EmailReporter' not in reporters
assert 'SentryReporter' not in reporters
def test_enable_email(self):
app = ErrorReporter(simple_app, {}, error_email='user@somedomain.com')
reporters = [r.__class__.__name__ for r in app.reporters]
assert 'EmailReporter' in reporters
def test_enable_sentry(self):
app = ErrorReporter(simple_app, {}, sentry_dsn='http://public:secret@example.com/1')
reporters = [r.__class__.__name__ for r in app.reporters]
assert 'SentryReporter' in reporters
|
from tg.error import ErrorReporter
from tg.error import SlowReqsReporter
def simple_app(environ, start_response):
status = '200 OK'
headers = [('Content-type', 'text/plain')]
start_response(status, headers)
return ['HELLO']
class TestErrorReporterConfig(object):
def test_disable_all(self):
app = ErrorReporter(simple_app, {})
reporters = [r.__class__.__name__ for r in app.reporters]
assert 'EmailReporter' not in reporters
assert 'SentryReporter' not in reporters
def test_enable_email(self):
app = ErrorReporter(simple_app, {}, error_email='user@somedomain.com')
reporters = [r.__class__.__name__ for r in app.reporters]
assert 'EmailReporter' in reporters
def test_enable_sentry(self):
app = ErrorReporter(simple_app, {}, sentry_dsn='http://public:secret@example.com/1')
reporters = [r.__class__.__name__ for r in app.reporters]
assert 'SentryReporter' in reporters
class TestSlowReqsReporterConfig(object):
def test_disable_all(self):
app = SlowReqsReporter(simple_app, {})
reporters = [r.__class__.__name__ for r in app.reporters]
assert 'EmailReporter' not in reporters
assert 'SentryReporter' not in reporters
def test_enable_email(self):
app = SlowReqsReporter(simple_app, {}, error_email='user@somedomain.com')
reporters = [r.__class__.__name__ for r in app.reporters]
assert 'EmailReporter' in reporters
def test_enable_sentry(self):
app = SlowReqsReporter(simple_app, {}, sentry_dsn='http://public:secret@example.com/1')
reporters = [r.__class__.__name__ for r in app.reporters]
assert 'SentryReporter' in reporters
|
Add tests for slow requests reporting configuration
|
Add tests for slow requests reporting configuration
|
Python
|
mit
|
lucius-feng/tg2,lucius-feng/tg2
|
6b9cc519deaecd093087d5190888b97b7b7eaf02
|
icekit/project/settings/_production.py
|
icekit/project/settings/_production.py
|
from ._base import *
SITE_PUBLIC_PORT = None # Default: SITE_PORT
# DJANGO ######################################################################
CACHES['default'].update({
# 'BACKEND': 'django_redis.cache.RedisCache',
'BACKEND': 'redis_lock.django_cache.RedisCache',
'LOCATION': 'redis://redis:6379/1',
})
# EMAIL_HOST = ''
# EMAIL_HOST_USER = ''
LOGGING['handlers']['logfile']['backupCount'] = 100
# CELERY EMAIL ################################################################
CELERY_EMAIL_BACKEND = 'django.core.mail.backends.smtp.EmailBackend'
# STORAGES ####################################################################
# AWS_ACCESS_KEY_ID = ''
# AWS_STORAGE_BUCKET_NAME = ''
ENABLE_S3_MEDIA = True
|
from ._base import *
SITE_PUBLIC_PORT = None # Default: SITE_PORT
# DJANGO ######################################################################
CACHES['default'].update({
# 'BACKEND': 'django_redis.cache.RedisCache',
'BACKEND': 'redis_lock.django_cache.RedisCache',
'LOCATION': 'redis://redis:6379/1',
})
LOGGING['handlers']['logfile']['backupCount'] = 100
# CELERY EMAIL ################################################################
CELERY_EMAIL_BACKEND = 'django.core.mail.backends.smtp.EmailBackend'
# STORAGES ####################################################################
ENABLE_S3_MEDIA = True
|
Remove vestigial hard coded production settings. These should be defined in a dotenv file, now.
|
Remove vestigial hard coded production settings. These should be defined in a dotenv file, now.
|
Python
|
mit
|
ic-labs/django-icekit,ic-labs/django-icekit,ic-labs/django-icekit,ic-labs/django-icekit
|
96d798685c53f4568edaaf990b0bbe8e2e10e24a
|
tests_tf/test_mnist_tutorial_jsma.py
|
tests_tf/test_mnist_tutorial_jsma.py
|
import unittest
class TestMNISTTutorialJSMA(unittest.TestCase):
def test_mnist_tutorial_jsma(self):
from tutorials import mnist_tutorial_jsma
# Run the MNIST tutorial on a dataset of reduced size
# and disable visualization.
jsma_tutorial_args = {'train_start': 0,
'train_end': 10000,
'test_start': 0,
'test_end': 1666,
'viz_enabled': False,
'source_samples': 1,
'nb_epochs': 2}
report = mnist_tutorial_jsma.mnist_tutorial_jsma(**jsma_tutorial_args)
print(report.clean_train_adv_eval)
# Check accuracy values contained in the AccuracyReport object
self.assertTrue(report.clean_train_clean_eval > 0.75)
self.assertTrue(report.clean_train_adv_eval < 0.05)
# There is no adversarial training in the JSMA tutorial
self.assertTrue(report.adv_train_clean_eval == 0.)
self.assertTrue(report.adv_train_adv_eval == 0.)
if __name__ == '__main__':
unittest.main()
|
import unittest
class TestMNISTTutorialJSMA(unittest.TestCase):
def test_mnist_tutorial_jsma(self):
from tutorials import mnist_tutorial_jsma
# Run the MNIST tutorial on a dataset of reduced size
# and disable visualization.
jsma_tutorial_args = {'train_start': 0,
'train_end': 1000,
'test_start': 0,
'test_end': 1666,
'viz_enabled': False,
'source_samples': 1,
'nb_epochs': 2}
report = mnist_tutorial_jsma.mnist_tutorial_jsma(**jsma_tutorial_args)
# Check accuracy values contained in the AccuracyReport object
self.assertTrue(report.clean_train_clean_eval > 0.75)
self.assertTrue(report.clean_train_adv_eval < 0.05)
# There is no adversarial training in the JSMA tutorial
self.assertTrue(report.adv_train_clean_eval == 0.)
self.assertTrue(report.adv_train_adv_eval == 0.)
if __name__ == '__main__':
unittest.main()
|
Update JSMA test tutorial constant
|
Update JSMA test tutorial constant
|
Python
|
mit
|
cleverhans-lab/cleverhans,cleverhans-lab/cleverhans,openai/cleverhans,carlini/cleverhans,cihangxie/cleverhans,cleverhans-lab/cleverhans,carlini/cleverhans,fartashf/cleverhans
|
e19b11c8598fe7a7e68640638a3489c05002f968
|
tests/test_supercron.py
|
tests/test_supercron.py
|
#!/usr/bin/env python
import sys
import os
import unittest
from subprocess import Popen, PIPE
ROOT_DIR = os.path.join(os.path.dirname(__file__), "..")
sys.path.append(ROOT_DIR)
from supercron import SuperCron
class RunTests(unittest.TestCase):
"""class that tests supercron for behavior correctness"""
def setUp(self):
pass
def get_crontab(self):
p = Popen(["crontab", "-l"], stdout=PIPE)
crontab_out, crontab_err = p.communicate()
return crontab_out
def test_midnight(self):
entry1 = b"@daily ls # ls"
entry2 = b"0 0 * * * ls # ls"
SuperCron.add_job("ls", "ls", "midnight")
user_crontab = self.get_crontab()
self.assertTrue(entry1 in user_crontab or entry2 in user_crontab)
def test_every_x_minutes(self):
hour, minute = SuperCron.get_time_now()
entry = b"*/5 {} * * * ls # ls".format(hour)
SuperCron.add_job("ls", "ls", "once every 5 minutes")
user_crontab = self.get_crontab()
self.assertTrue(entry in user_crontab)
if __name__ == "__main__":
unittest.main()
|
#!/usr/bin/env python
import sys
import os
import unittest
from subprocess import Popen, PIPE
ROOT_DIR = os.path.join(os.path.dirname(__file__), "..")
sys.path.append(ROOT_DIR)
from supercron import SuperCron
class RunTests(unittest.TestCase):
"""class that tests supercron for behavior correctness"""
def setUp(self):
pass
def tearDown(self):
SuperCron.delete_job("ls")
def get_crontab(self):
p = Popen(["crontab", "-l"], stdout=PIPE, stderr=PIPE)
crontab_out, crontab_err = p.communicate()
return crontab_out
def test_midnight(self):
entry1 = b"@daily ls # ls"
entry2 = b"0 0 * * * ls # ls"
SuperCron.add_job("ls", "ls", "midnight")
user_crontab = self.get_crontab()
self.assertTrue(entry1 in user_crontab or entry2 in user_crontab)
def test_every_x_minutes(self):
hour, minute = SuperCron.get_time_now()
entry = b"*/5 {} * * * ls # ls".format(hour)
SuperCron.add_job("ls", "ls", "once every 5 minutes")
user_crontab = self.get_crontab()
self.assertTrue(entry in user_crontab)
if __name__ == "__main__":
unittest.main()
|
Delete the jobs in tearDown() in tests
|
Delete the jobs in tearDown() in tests
|
Python
|
bsd-3-clause
|
linostar/SuperCron
|
566fa441f3864be4f813673dbaf8ffff87d28e17
|
setup.py
|
setup.py
|
#!/usr/bin/env python
from distutils.core import setup, Extension
elp_srcs = ['src/periodic.c', 'src/prdic_math.c', \
'src/prdic_fd.c', \
'src/prdic_pfd.c', \
'src/prdic_main_fd.c', 'src/prdic_main_pfd.c', \
'src/prdic_main.c', \
'src/prdic_recfilter.c', 'src/prdic_shmtrig.c', \
'src/prdic_sign.c']
module1 = Extension('_elperiodic', sources = elp_srcs, \
extra_link_args = ['-Wl,--version-script=src/Symbol.map',])
kwargs = {'name':'ElPeriodic',
'version':'1.0',
'description':'Phase-locked userland scheduling library',
'author':'Maksym Sobolyev',
'author_email':'sobomax@gmail.com',
'url':'https://github.com/sobomax/libelperiodic',
'packages':['elperiodic',],
'package_dir':{'elperiodic':'python'},
'ext_modules': [module1]
}
if __name__ == '__main__':
setup(**kwargs)
|
#!/usr/bin/env python
from distutils.core import setup, Extension
import os
elp_srcs = ['src/periodic.c', 'src/prdic_math.c', \
'src/prdic_fd.c', \
'src/prdic_pfd.c', \
'src/prdic_main_fd.c', 'src/prdic_main_pfd.c', \
'src/prdic_main.c', \
'src/prdic_recfilter.c', 'src/prdic_shmtrig.c', \
'src/prdic_sign.c']
module1 = Extension('_elperiodic', sources = elp_srcs, \
extra_link_args = ['-Wl,--version-script=src/Symbol.map',])
def get_ex_mod():
if 'NO_PY_EXT' in os.environ:
return None
return [module1]
kwargs = {'name':'ElPeriodic',
'version':'1.0',
'description':'Phase-locked userland scheduling library',
'author':'Maksym Sobolyev',
'author_email':'sobomax@gmail.com',
'url':'https://github.com/sobomax/libelperiodic',
'packages':['elperiodic',],
'package_dir':{'elperiodic':'python'},
'ext_modules': get_ex_mod()
}
if __name__ == '__main__':
setup(**kwargs)
|
Add NO_PY_EXT environment variable to disable compilation of the C module, which is not working very well in cross-compile mode.
|
Add NO_PY_EXT environment variable to disable compilation of
the C module, which is not working very well in cross-compile
mode.
|
Python
|
bsd-2-clause
|
sobomax/libelperiodic,sobomax/libelperiodic,sobomax/libelperiodic,sobomax/libelperiodic
|
a6b13f81ce7e39462ec188fad998755a2b66d26c
|
setup.py
|
setup.py
|
#! /usr/bin/env python
from distutils.core import setup
from youtube_dl_gui import version
setup(name='Youtube-DLG',
version=version.__version__,
description='Youtube-dl GUI',
long_description='A cross platform front-end GUI of the popular youtube-dl written in wxPython.',
license='UNLICENSE',
platforms='cross-platform',
author='Sotiris Papadopoulos',
author_email='ytubedlg@gmail.com',
url='https://github.com/MrS0m30n3/youtube-dl-gui',
packages=['youtube_dl_gui'],
data_files=[('icons', ['youtube_dl_gui/icons/youtube-dl-gui.png'])])
|
#! /usr/bin/env python
from distutils.core import setup
from youtube_dl_gui import version
name = 'Youtube-DLG'
desc = 'Youtube-dl GUI'
ldesc = 'A cross platform front-end GUI of the popular youtube-dl written in wxPython'
license = 'UNLICENSE'
platform = 'Cross-Platform'
author = 'Sotiris Papadopoulos'
author_email = 'ytubedlg@gmail.com'
project_url = 'http://mrs0m30n3.github.io/youtube-dl-gui/'
packages = ['youtube_dl_gui']
data_files = [('lib/python2.7/site-packages/youtube_dl_gui/icons',
['youtube_dl_gui/icons/youtube-dl-gui.png'])]
setup(name=name,
version=version.__version__,
description=desc,
long_description=ldesc,
license=license,
platforms=platform,
author=author,
author_email=author_email,
url=project_url,
packages=packages,
data_files=data_files)
|
Add icons on package install
|
Add icons on package install
|
Python
|
unlicense
|
Sofronio/youtube-dl-gui,pr0d1r2/youtube-dl-gui,dstftw/youtube-dl-gui,dstftw/youtube-dl-gui,pr0d1r2/youtube-dl-gui,MrS0m30n3/youtube-dl-gui,Sofronio/youtube-dl-gui,ukazap/youtube-dl-gui,MrS0m30n3/youtube-dl-gui,ukazap/youtube-dl-gui
|
e7ea098a4700c6f338fc7ef223b696aaed448629
|
test/test_gn.py
|
test/test_gn.py
|
'''
GotoNewest tests
'''
import unittest
import sys
sys.path.append('../src/')
import gn
TEST_DIR = '/tmp/test'
class TestGotoNewest(unittest.TestCase):
''' Test class for GotoNewest
'''
def test_empty_base_dir(self):
''' If the base directory is empty, raise an
AttributeError
'''
self.assertRaises(AttributeError, gn.transfer, None)
def test_base_dir_with_no_subdirs(self):
''' If the base directory has no subdirectories,
raise an AttributeError
'''
self.assertRaises(AttributeError, gn.transfer, TEST_DIR)
if __name__ == '__main__':
unittest.main()
|
'''
GotoNewest tests
'''
import unittest
import sys
sys.path.append('../src/')
import gn
TEST_DIR = '/tmp/test'
class TestGotoNewest(unittest.TestCase):
''' Test class for GotoNewest
'''
def test_empty_base_dir(self):
''' If the base directory is empty, raise an
AttributeError
'''
self.assertRaises(AttributeError, gn.transfer, None)
def test_base_dir_with_no_subdirs(self):
''' If the base directory has no subdirectories,
raise an AttributeError
'''
self.assertRaises(AttributeError, gn.transfer, TEST_DIR)
def test_one_subdirectory(self):
''' If there is only one subdirectory in the base
directory, return the directory
'''
self.assertRaises('temp', gn.transfer, TEST_DIR)
if __name__ == '__main__':
unittest.main()
|
Add test for one subdirectory
|
Add test for one subdirectory
|
Python
|
bsd-2-clause
|
ambidextrousTx/GotoNewest
|
9e88d6eb6d6d97ea9046dbf842cdc0b5beb62b90
|
src/main.py
|
src/main.py
|
import tweepy, time, random
def main():
CONSUMER_KEY = 'your_consumer_key'
CONSUMER_SECRET = 'your_consumer_secret'
ACCESS_KEY = 'your_access_key'
ACCESS_SECRET = 'your_access_secret'
auth = tweepy.OAuthHandler(CONSUMER_KEY, CONSUMER_SECRET)
auth.set_access_token(ACCESS_KEY, ACCESS_SECRET)
api = tweepy.API(auth)
while True:
minion_tweets = api.search(q="minions")
answers_file = open('custom/answers/answers.txt', 'r')
minion_answers = answers_file.read().splitlines()
answers_file.close()
for minion_tweet in minion_tweets:
sn = minion_tweet.user.screen_name
minion_answer = "@%s %s" % (sn, random.choice(minion_answers))
api.update_status(status=minion_answer, in_reply_to_status_id=minion_tweet.id)
time.sleep(900)
if __name__ == '__main__':
main()
|
import tweepy, time, random
def main():
CONSUMER_KEY = 'your_consumer_key'
CONSUMER_SECRET = 'your_consumer_secret'
ACCESS_KEY = 'your_access_key'
ACCESS_SECRET = 'your_access_secret'
auth = tweepy.OAuthHandler(CONSUMER_KEY, CONSUMER_SECRET)
auth.set_access_token(ACCESS_KEY, ACCESS_SECRET)
api = tweepy.API(auth)
while True:
minion_tweets = api.search(q="minions")
try:
answers_file = open('custom/answers/answers.txt', 'r')
minion_answers = answers_file.read().splitlines()
answers_file.close()
except IOError:
print "Oops, something went wrong. Could not find answers.txt file."
for minion_tweet in minion_tweets:
sn = minion_tweet.user.screen_name
minion_answer = "@%s %s" % (sn, random.choice(minion_answers))
api.update_status(status=minion_answer, in_reply_to_status_id=minion_tweet.id)
time.sleep(900)
if __name__ == '__main__':
main()
|
Add better error support for answers file
|
Add better error support for answers file
|
Python
|
mit
|
djangokillen/minion-hate-bot
|
ab417052f3d41ee5b140e3044a6a925c3895d1ee
|
setup.py
|
setup.py
|
# -*- coding: utf-8 -*-
from distutils.core import setup
import ibei
setup(name = "ibei",
version = ibei.__version__,
author = "Joshua Ryan Smith",
author_email = "joshua.r.smith@gmail.com",
packages = ["ibei"],
url = "https://github.com/jrsmith3/ibei",
description = "Calculator for incomplete Bose-Einstein integral",
classifiers = ["Programming Language :: Python",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
"Development Status :: 3 - Alpha",
"Intended Audience :: Science/Research",
"Topic :: Scientific/Engineering :: Physics",
"Natural Language :: English",],
install_requires = ["numpy",
"sympy",
"astropy"],)
|
# -*- coding: utf-8 -*-
from distutils.core import setup
import ibei
setup(name = "ibei",
version = ibei.__version__,
author = "Joshua Ryan Smith",
author_email = "joshua.r.smith@gmail.com",
packages = ["ibei", "physicalproperty"],
url = "https://github.com/jrsmith3/ibei",
description = "Calculator for incomplete Bose-Einstein integral",
classifiers = ["Programming Language :: Python",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
"Development Status :: 3 - Alpha",
"Intended Audience :: Science/Research",
"Topic :: Scientific/Engineering :: Physics",
"Natural Language :: English",],
install_requires = ["numpy",
"sympy",
"astropy"],)
|
Add 'physicalproperty' to pkg list for install
|
Add 'physicalproperty' to pkg list for install
|
Python
|
mit
|
jrsmith3/ibei
|
db76777575162aab69aec9429455f2e7d841a605
|
lambdas/dynamo_to_sns/dynamo_to_sns.py
|
lambdas/dynamo_to_sns/dynamo_to_sns.py
|
#!/usr/bin/env python
# -*- encoding: utf-8 -*-
"""
"""
import json
import os
from sns_utils import publish_sns_message
def main(event, _):
print(f'Received event:\n{event}')
stream_topic_map = json.loads(os.environ["STREAM_TOPIC_MAP"])
new_image = event['Records'][0]['dynamodb']['NewImage']
topic_arn = stream_topic_map[event['Records'][0]['eventSourceARN']]
publish_sns_message(topic_arn,new_image)
|
#!/usr/bin/env python
# -*- encoding: utf-8 -*-
"""
"""
import os
from sns_utils import publish_sns_message
def main(event, _):
print(f'Received event:\n{event}')
stream_topic_map = os.environ["STREAM_TOPIC_MAP"]
new_image = event['Records'][0]['dynamodb']['NewImage']
topic_arn = stream_topic_map[event['Records'][0]['eventSourceARN']]
publish_sns_message(topic_arn,new_image)
|
Fix loading of map from environment variables
|
Fix loading of map from environment variables
|
Python
|
mit
|
wellcometrust/platform-api,wellcometrust/platform-api,wellcometrust/platform-api,wellcometrust/platform-api
|
270c9e61646f4fe45e01b06e45dde15ea0856106
|
setup.py
|
setup.py
|
from distutils.core import setup
version = __import__('shopify_auth').__version__
setup(
name = 'django-shopify-auth',
version = version,
description = 'An simple package for adding Shopify authentication to Django apps.',
long_description = open('README.md').read(),
author = 'Gavin Ballard',
author_email = 'gavin@discolabs.com',
url = 'https://github.com/discolabs/django-shopify-auth',
license = 'MIT',
packages = [
'shopify_auth'
],
package_dir = {
'shopify_auth': 'shopify_auth',
},
requires = [
'django',
'shopify',
],
install_requires = [
'django',
],
zip_safe = True,
classifiers = [],
)
|
from distutils.core import setup
version = __import__('shopify_auth').__version__
setup(
name = 'django-shopify-auth',
version = version,
description = 'An simple package for adding Shopify authentication to Django apps.',
long_description = open('README.md').read(),
author = 'Gavin Ballard',
author_email = 'gavin@discolabs.com',
url = 'https://github.com/discolabs/django-shopify-auth',
license = 'MIT',
packages = [
'shopify_auth'
],
package_dir = {
'shopify_auth': 'shopify_auth',
},
requires = [
'django',
'shopify',
],
install_requires = [
'django',
'shopify',
],
zip_safe = True,
classifiers = [],
)
|
Add the ShopifyAPI package as a dependency.
|
Add the ShopifyAPI package as a dependency.
|
Python
|
mit
|
discolabs/django-shopify-auth,funkybob/django-shopify-auth,discolabs/django-shopify-auth,RafaAguilar/django-shopify-auth,RafaAguilar/django-shopify-auth,funkybob/django-shopify-auth
|
2adfcea14f292bacfbae906a70d6395304acf607
|
addons/bestja_volunteer_pesel/models.py
|
addons/bestja_volunteer_pesel/models.py
|
# -*- coding: utf-8 -*-
from operator import mul
from openerp import models, fields, api, exceptions
class Volunteer(models.Model):
_inherit = 'res.users'
pesel = fields.Char(string=u"PESEL")
def __init__(self, pool, cr):
super(Volunteer, self).__init__(pool, cr)
self._add_permitted_fields(level='owner', fields={'pesel'})
@api.one
@api.constrains('pesel')
def _check_pesel(self):
if not self.pesel:
return
try:
digits = map(int, self.pesel)
except ValueError:
raise exceptions.ValidationError("Numer PESEL może składać się wyłącznie z cyfr!")
weights = (1, 3, 7, 9, 1, 3, 7, 9, 1, 3)
control_sum = -(sum(map(mul, digits[:-1], weights))) % 10
if len(digits) != 11 or control_sum != digits[-1]:
raise exceptions.ValidationError("Niepoprawny numer PESEL.")
|
# -*- coding: utf-8 -*-
from operator import mul
from openerp import models, fields, api, exceptions
class Volunteer(models.Model):
_inherit = 'res.users'
pesel = fields.Char(string=u"PESEL")
def __init__(self, pool, cr):
super(Volunteer, self).__init__(pool, cr)
self._add_permitted_fields(level='owner', fields={'pesel'})
@api.one
@api.constrains('pesel')
def _check_pesel(self):
if not self.pesel:
return
try:
digits = map(int, self.pesel)
except ValueError:
raise exceptions.ValidationError("Numer PESEL może składać się wyłącznie z cyfr!")
if len(digits) != 11:
raise exceptions.ValidationError("Numer PESEL musi składać się z 11 cyfr!")
weights = (1, 3, 7, 9, 1, 3, 7, 9, 1, 3)
control_sum = -(sum(map(mul, digits[:-1], weights))) % 10
if control_sum != digits[-1]:
raise exceptions.ValidationError("Niepoprawny numer PESEL.")
|
Fix a problem with PESEL validation
|
Fix a problem with PESEL validation
|
Python
|
agpl-3.0
|
KrzysiekJ/bestja,ludwiktrammer/bestja,EE/bestja,ludwiktrammer/bestja,EE/bestja,EE/bestja,KrzysiekJ/bestja,ludwiktrammer/bestja,KrzysiekJ/bestja
|
f6b818222d8e6eb9bb6ad3a0d8ab55513eb90673
|
gui/driver.py
|
gui/driver.py
|
from __future__ import print_function, division
from sys import argv, stderr
def run_gui():
'''Start the event loop to calucate spectra interactively'''
# Import Qt functions. Do so here to handle errors better
try:
from PyQt4.QtGui import QApplication
except ImportError:
print("Cannot find PyQt4", file=stderr)
print("You must install this to run the GUI", file=stderr)
return 1
# For good measure, try to find PyQwt5 now as a check
try:
import PyQt4.Qwt5
except ImportError:
print("Cannot find PyQwt5", file=stderr)
print("You must install this to run the GUI", file=stderr)
return 1
from mainwindow import MainWindow
# The actual event loop
app = QApplication(argv)
window = MainWindow()
window.show()
return app.exec_()
|
from __future__ import print_function, division
from sys import argv, stderr
def run_gui():
'''Start the event loop to calucate spectra interactively'''
# Import Qt functions. Do so here to handle errors better
try:
from PyQt4.QtGui import QApplication
except ImportError:
print("Cannot find PyQt4", file=stderr)
print("You must install this to run the GUI", file=stderr)
return 1
# For good measure, try to find PyQwt5 now as a check
try:
import PyQt4.Qwt5
except ImportError:
print("Cannot find PyQwt5", file=stderr)
print("You must install this to run the GUI", file=stderr)
return 1
from mainwindow import MainWindow
# The actual event loop
app = QApplication(argv)
window = MainWindow()
window.show()
window.raise_()
return app.exec_()
|
Raise window to focus on Mac
|
Raise window to focus on Mac
|
Python
|
mit
|
jensengrouppsu/rapid,jensengrouppsu/rapid
|
f8e800219ac2c2c76bb5ac10b2dfdac038edbb5d
|
circuits/tools/__init__.py
|
circuits/tools/__init__.py
|
# Module: __init__
# Date: 8th November 2008
# Author: James Mills, prologic at shortcircuit dot net dot au
"""Circuits Tools
circuits.tools contains a standard set of tools for circuits. These
tools are installed as executables with a prefix of "circuits."
"""
try:
from cStringIO import StringIO
except ImportError:
from StringIO import StringIO
def graph(x):
s = StringIO()
d = 0
i = 0
done = False
stack = []
visited = set()
children = list(x.components)
while not done:
if x not in visited:
if d:
s.write("%s%s\n" % (" " * d, "|"))
s.write("%s%s%s\n" % (" " * d, "|-", x))
else:
s.write(" .%s\n" % x)
if x.components:
d += 1
visited.add(x)
if i < len(children):
x = children[i]
i += 1
if x.components:
stack.append((i, d, children))
children = list(x.components)
i = 0
else:
if stack:
i, d, children = stack.pop()
else:
done = True
return s.getvalue()
|
# Module: __init__
# Date: 8th November 2008
# Author: James Mills, prologic at shortcircuit dot net dot au
"""Circuits Tools
circuits.tools contains a standard set of tools for circuits. These
tools are installed as executables with a prefix of "circuits."
"""
def graph(x):
s = []
d = 0
i = 0
done = False
stack = []
visited = set()
children = list(x.components)
while not done:
if x not in visited:
if d:
s.append("%s%s\n" % (" " * d, "|"))
s.append("%s%s%s\n" % (" " * d, "|-", x))
else:
s.append(" .%s\n" % x)
if x.components:
d += 1
visited.add(x)
if i < len(children):
x = children[i]
i += 1
if x.components:
stack.append((i, d, children))
children = list(x.components)
i = 0
else:
if stack:
i, d, children = stack.pop()
else:
done = True
return "".join(s)
|
Remove StringIO import. Use a simple list to build up the output and return .join(s)
|
tools: Remove StringIO import. Use a simple list to build up the output and return .join(s)
|
Python
|
mit
|
treemo/circuits,eriol/circuits,eriol/circuits,treemo/circuits,treemo/circuits,nizox/circuits,eriol/circuits
|
ec24e051e9d10b4cb24d135a3c08e9e9f87c6b8c
|
social/apps/django_app/utils.py
|
social/apps/django_app/utils.py
|
from functools import wraps
from django.conf import settings
from django.core.urlresolvers import reverse
from social.utils import setting_name, module_member
from social.strategies.utils import get_strategy
BACKENDS = settings.AUTHENTICATION_BACKENDS
STRATEGY = getattr(settings, setting_name('STRATEGY'),
'social.strategies.django_strategy.DjangoStrategy')
STORAGE = getattr(settings, setting_name('STORAGE'),
'social.apps.django_app.default.models.DjangoStorage')
Strategy = module_member(STRATEGY)
Storage = module_member(STORAGE)
def load_strategy(*args, **kwargs):
return get_strategy(BACKENDS, STRATEGY, STORAGE, *args, **kwargs)
def strategy(redirect_uri=None):
def decorator(func):
@wraps(func)
def wrapper(request, backend, *args, **kwargs):
uri = redirect_uri
if uri and not uri.startswith('/'):
uri = reverse(redirect_uri, args=(backend,))
request.strategy = load_strategy(request=request, backend=backend,
redirect_uri=uri, *args, **kwargs)
return func(request, backend, *args, **kwargs)
return wrapper
return decorator
def setting(name, default=None):
try:
return getattr(settings, setting_name(name))
except AttributeError:
return getattr(settings, name, default)
class BackendWrapper(object):
def get_user(self, user_id):
return Strategy(storage=Storage).get_user(user_id)
|
from functools import wraps
from django.conf import settings
from django.core.urlresolvers import reverse
from social.utils import setting_name, module_member
from social.strategies.utils import get_strategy
BACKENDS = settings.AUTHENTICATION_BACKENDS
STRATEGY = getattr(settings, setting_name('STRATEGY'),
'social.strategies.django_strategy.DjangoStrategy')
STORAGE = getattr(settings, setting_name('STORAGE'),
'social.apps.django_app.default.models.DjangoStorage')
Strategy = module_member(STRATEGY)
Storage = module_member(STORAGE)
def load_strategy(*args, **kwargs):
return get_strategy(BACKENDS, STRATEGY, STORAGE, *args, **kwargs)
def strategy(redirect_uri=None, load_strategy=load_strategy):
def decorator(func):
@wraps(func)
def wrapper(request, backend, *args, **kwargs):
uri = redirect_uri
if uri and not uri.startswith('/'):
uri = reverse(redirect_uri, args=(backend,))
request.strategy = load_strategy(request=request, backend=backend,
redirect_uri=uri, *args, **kwargs)
return func(request, backend, *args, **kwargs)
return wrapper
return decorator
def setting(name, default=None):
try:
return getattr(settings, setting_name(name))
except AttributeError:
return getattr(settings, name, default)
class BackendWrapper(object):
def get_user(self, user_id):
return Strategy(storage=Storage).get_user(user_id)
|
Allow to override strategy getter
|
Allow to override strategy getter
|
Python
|
bsd-3-clause
|
fearlessspider/python-social-auth,MSOpenTech/python-social-auth,clef/python-social-auth,JJediny/python-social-auth,firstjob/python-social-auth,muhammad-ammar/python-social-auth,henocdz/python-social-auth,ariestiyansyah/python-social-auth,python-social-auth/social-app-django,falcon1kr/python-social-auth,lamby/python-social-auth,joelstanner/python-social-auth,rsteca/python-social-auth,falcon1kr/python-social-auth,lneoe/python-social-auth,wildtetris/python-social-auth,mchdks/python-social-auth,ononeor12/python-social-auth,frankier/python-social-auth,michael-borisov/python-social-auth,ariestiyansyah/python-social-auth,jameslittle/python-social-auth,mark-adams/python-social-auth,wildtetris/python-social-auth,garrett-schlesinger/python-social-auth,jameslittle/python-social-auth,lamby/python-social-auth,jeyraof/python-social-auth,rsalmaso/python-social-auth,bjorand/python-social-auth,Andygmb/python-social-auth,mark-adams/python-social-auth,VishvajitP/python-social-auth,fearlessspider/python-social-auth,JerzySpendel/python-social-auth,garrett-schlesinger/python-social-auth,mathspace/python-social-auth,rsteca/python-social-auth,nirmalvp/python-social-auth,python-social-auth/social-core,henocdz/python-social-auth,lneoe/python-social-auth,S01780/python-social-auth,jneves/python-social-auth,barseghyanartur/python-social-auth,tobias47n9e/social-core,bjorand/python-social-auth,wildtetris/python-social-auth,msampathkumar/python-social-auth,bjorand/python-social-auth,yprez/python-social-auth,lawrence34/python-social-auth,daniula/python-social-auth,jeyraof/python-social-auth,JJediny/python-social-auth,Andygmb/python-social-auth,hsr-ba-fs15-dat/python-social-auth,MSOpenTech/python-social-auth,DhiaEddineSaidi/python-social-auth,hsr-ba-fs15-dat/python-social-auth,tutumcloud/python-social-auth,chandolia/python-social-auth,jameslittle/python-social-auth,noodle-learns-programming/python-social-auth,imsparsh/python-social-auth,mark-adams/python-social-auth,Andygmb/python-social-auth,lawrence34/python-social-auth,barseghyanartur/python-social-auth,daniula/python-social-auth,jeyraof/python-social-auth,falcon1kr/python-social-auth,tkajtoch/python-social-auth,mathspace/python-social-auth,contracode/python-social-auth,lawrence34/python-social-auth,mathspace/python-social-auth,ononeor12/python-social-auth,robbiet480/python-social-auth,iruga090/python-social-auth,fearlessspider/python-social-auth,webjunkie/python-social-auth,clef/python-social-auth,mrwags/python-social-auth,chandolia/python-social-auth,rsteca/python-social-auth,muhammad-ammar/python-social-auth,jneves/python-social-auth,SeanHayes/python-social-auth,S01780/python-social-auth,webjunkie/python-social-auth,ByteInternet/python-social-auth,nvbn/python-social-auth,ononeor12/python-social-auth,S01780/python-social-auth,merutak/python-social-auth,ByteInternet/python-social-auth,noodle-learns-programming/python-social-auth,JerzySpendel/python-social-auth,cmichal/python-social-auth,mchdks/python-social-auth,drxos/python-social-auth,JerzySpendel/python-social-auth,cmichal/python-social-auth,joelstanner/python-social-auth,python-social-auth/social-app-cherrypy,alrusdi/python-social-auth,mrwags/python-social-auth,python-social-auth/social-storage-sqlalchemy,cjltsod/python-social-auth,cjltsod/python-social-auth,degs098/python-social-auth,python-social-auth/social-app-django,contracode/python-social-auth,DhiaEddineSaidi/python-social-auth,imsparsh/python-social-auth,clef/python-social-auth,firstjob/python-social-auth,degs098/python-social-auth,michael-borisov/python-social-auth,lneoe/python-social-auth,nvbn/python-social-auth,drxos/python-social-auth,san-mate/python-social-auth,msampathkumar/python-social-auth,nirmalvp/python-social-auth,rsalmaso/python-social-auth,iruga090/python-social-auth,tkajtoch/python-social-auth,tutumcloud/python-social-auth,python-social-auth/social-core,degs098/python-social-auth,VishvajitP/python-social-auth,mrwags/python-social-auth,michael-borisov/python-social-auth,robbiet480/python-social-auth,henocdz/python-social-auth,barseghyanartur/python-social-auth,hsr-ba-fs15-dat/python-social-auth,ariestiyansyah/python-social-auth,frankier/python-social-auth,joelstanner/python-social-auth,MSOpenTech/python-social-auth,yprez/python-social-auth,yprez/python-social-auth,muhammad-ammar/python-social-auth,alrusdi/python-social-auth,VishvajitP/python-social-auth,webjunkie/python-social-auth,cmichal/python-social-auth,jneves/python-social-auth,tkajtoch/python-social-auth,JJediny/python-social-auth,nirmalvp/python-social-auth,noodle-learns-programming/python-social-auth,lamby/python-social-auth,iruga090/python-social-auth,alrusdi/python-social-auth,merutak/python-social-auth,mchdks/python-social-auth,SeanHayes/python-social-auth,drxos/python-social-auth,ByteInternet/python-social-auth,msampathkumar/python-social-auth,contracode/python-social-auth,daniula/python-social-auth,python-social-auth/social-docs,firstjob/python-social-auth,duoduo369/python-social-auth,san-mate/python-social-auth,robbiet480/python-social-auth,python-social-auth/social-app-django,imsparsh/python-social-auth,merutak/python-social-auth,duoduo369/python-social-auth,DhiaEddineSaidi/python-social-auth,chandolia/python-social-auth,san-mate/python-social-auth
|
04f7f28ef3123452d8eb06ab1f3cbfa6dded8be4
|
go_metrics/metrics/tests/test_dummy.py
|
go_metrics/metrics/tests/test_dummy.py
|
from twisted.trial.unittest import TestCase
from go_metrics.metrics.dummy import Fixtures, DummyMetrics, DummyBackend
DummyBackend, DummyMetrics
class TestFixtures(TestCase):
def test_add(self):
fixtures = Fixtures()
fixtures.add(foo='bar', result={'baz': 'quux'})
self.assertEqual(fixtures.items, [{
'foo': 'bar',
'result': {'baz': 'quux'}
}])
def test_add_no_result(self):
fixtures = Fixtures()
fixtures.add(foo='bar')
self.assertEqual(fixtures.items, [{
'foo': 'bar',
'result': {}
}])
def test_match(self):
fixtures = Fixtures()
fixtures.add(foo='bar', result={'baz': 'quux'})
fixtures.add(corge='grault', result={'garply': 'waldo'})
self.assertEqual(fixtures.match(foo='bar'), {'baz': 'quux'})
self.assertEqual(fixtures.match(corge='grault'), {'garply': 'waldo'})
self.assertEqual(fixtures.match(fred='xzyy'), {})
class TestDummyMetrics(TestCase):
def test_get(self):
backend = DummyBackend()
metrics = DummyMetrics(backend, 'owner-1')
backend.fixtures.add(foo='bar', result={'baz': 'quux'})
self.assertEqual(metrics.get(foo='bar'), {'baz': 'quux'})
class TestDummyBackend(TestCase):
pass
|
from twisted.trial.unittest import TestCase
from go_metrics.metrics.dummy import Fixtures, DummyMetrics, DummyBackend
class TestFixtures(TestCase):
def test_add(self):
fixtures = Fixtures()
fixtures.add(foo='bar', result={'baz': 'quux'})
self.assertEqual(fixtures.items, [{
'foo': 'bar',
'result': {'baz': 'quux'}
}])
def test_add_no_result(self):
fixtures = Fixtures()
fixtures.add(foo='bar')
self.assertEqual(fixtures.items, [{
'foo': 'bar',
'result': {}
}])
def test_match(self):
fixtures = Fixtures()
fixtures.add(foo='bar', result={'baz': 'quux'})
fixtures.add(corge='grault', result={'garply': 'waldo'})
self.assertEqual(fixtures.match(foo='bar'), {'baz': 'quux'})
self.assertEqual(fixtures.match(corge='grault'), {'garply': 'waldo'})
self.assertEqual(fixtures.match(fred='xzyy'), {})
class TestDummyMetrics(TestCase):
def test_get(self):
backend = DummyBackend()
metrics = DummyMetrics(backend, 'owner-1')
backend.fixtures.add(foo='bar', result={'baz': 'quux'})
self.assertEqual(metrics.get(foo='bar'), {'baz': 'quux'})
class TestDummyBackend(TestCase):
pass
|
Remove no longer needed references for keeping pep8 happy
|
Remove no longer needed references for keeping pep8 happy
|
Python
|
bsd-3-clause
|
praekelt/go-metrics-api,praekelt/go-metrics-api
|
823e767f52bc6e3bf78a91950e9407a1acf811d2
|
tests/test_server.py
|
tests/test_server.py
|
import os
import unittest
import tempfile
# Local modules
import library.server as server
class ServerTestCase(unittest.TestCase):
@classmethod
def setUp(self):
self.db_fd, server.app.config['DATABASE'] = tempfile.mkstemp()
server.app.config['TESTING'] = True
self.app = server.app.test_client()
with server.app.app_context():
server.init_db()
@classmethod
def tearDown(self):
os.close(self.db_fd)
os.unlink(server.app.config['DATABASE'])
def test_root(self):
rv = self.app.get('/')
self.assertEqual(rv.status_code, 200)
def test_book_post(self):
rv = self.app.put('/books', data={'isbn': 1234})
self.assertEqual(rv.status_code, 200)
rv = self.app.get('/books')
self.assertEqual(rv.data, '1234')
rv = self.app.put('/books', data={'isbn': 5678})
self.assertEqual(rv.status_code, 200)
rv = self.app.get('/books')
self.assertEqual(rv.data, '5678 1234')
def test_book_get(self):
rv = self.app.get('/books')
self.assertEqual(rv.status_code, 200)
if __name__ == '__main__':
unittest.main()
|
import os
import unittest
import tempfile
# Local modules
import library.server as server
class ServerTestCase(unittest.TestCase):
@classmethod
def setUp(self):
self.db_fd, server.app.config['DATABASE'] = tempfile.mkstemp()
server.app.config['TESTING'] = True
self.app = server.app.test_client()
with server.app.app_context():
server.init_db()
@classmethod
def tearDown(self):
os.close(self.db_fd)
os.unlink(server.app.config['DATABASE'])
class RootTestCase(ServerTestCase):
def test_root(self):
rv = self.app.get('/')
self.assertEqual(rv.status_code, 200)
class BookTestCase(ServerTestCase):
def test_book_post(self):
rv = self.app.put('/books', data={'isbn': 1234})
self.assertEqual(rv.status_code, 200)
rv = self.app.get('/books')
self.assertEqual(rv.data, '1234')
rv = self.app.put('/books', data={'isbn': 5678})
self.assertEqual(rv.status_code, 200)
rv = self.app.get('/books')
self.assertEqual(rv.data, '5678 1234')
def test_book_get(self):
rv = self.app.get('/books')
self.assertEqual(rv.status_code, 200)
if __name__ == '__main__':
unittest.main()
|
Refactor test case into two classes
|
Refactor test case into two classes
|
Python
|
mit
|
HoldYourBreath/Library,HoldYourBreath/Library,HoldYourBreath/Library,HoldYourBreath/Library
|
e5d88beba41de18ebab33e0770ddd8bb5174491e
|
pyfr/quadrules/__init__.py
|
pyfr/quadrules/__init__.py
|
# -*- coding: utf-8 -*-
import re
from pyfr.quadrules.base import BaseQuadRule, BaseTabulatedQuadRule
from pyfr.quadrules.line import BaseLineQuadRule
from pyfr.quadrules.tri import BaseTriQuadRule
from pyfr.util import subclass_map
def get_quadrule(basecls, rule, npts):
# See if rule looks like the name of a scheme
if re.match(r'[a-zA-Z0-9\-+_]+$', rule):
rule_map = subclass_map(basecls, 'name')
return rule_map[rule](npts)
# Otherwise see if it looks like a tabulation
elif 'PTS' in rule.upper():
# Create a suitable subclass
rulecls = type(basecls.eletype, (BaseTabulatedQuadRule, basecls), {})
# Instantiate and validate
r = rulecls(rule)
if len(r.points) != npts:
raise ValueError('Invalid number of points for quad rule')
return r
# Invalid
else:
raise ValueError('Invalid quadrature rule')
|
# -*- coding: utf-8 -*-
import re
from pyfr.quadrules.base import BaseQuadRule, BaseTabulatedQuadRule
from pyfr.quadrules.line import BaseLineQuadRule
from pyfr.util import subclass_map
def get_quadrule(basecls, rule, npts):
# See if rule looks like the name of a scheme
if re.match(r'[a-zA-Z0-9\-+_]+$', rule):
rule_map = subclass_map(basecls, 'name')
return rule_map[rule](npts)
# Otherwise see if it looks like a tabulation
elif 'PTS' in rule.upper():
# Create a suitable subclass
rulecls = type(basecls.eletype, (BaseTabulatedQuadRule, basecls), {})
# Instantiate and validate
r = rulecls(rule)
if len(r.points) != npts:
raise ValueError('Invalid number of points for quad rule')
return r
# Invalid
else:
raise ValueError('Invalid quadrature rule')
|
Fix a bug in the quadrules.
|
Fix a bug in the quadrules.
|
Python
|
bsd-3-clause
|
tjcorona/PyFR,tjcorona/PyFR,iyer-arvind/PyFR,BrianVermeire/PyFR,tjcorona/PyFR,Aerojspark/PyFR
|
010de29acb284250667b393f9e1ba7b34b53aaf5
|
pygametemplate/__init__.py
|
pygametemplate/__init__.py
|
"""pygametemplate module for making creating games with Pygame easier."""
from __future__ import absolute_import
__version__ = "0.2.0"
__author__ = "Andrew Dean"
from pygametemplate.game import Game
|
"""pygametemplate module for making creating games with Pygame easier."""
from __future__ import absolute_import
__version__ = "0.2.0"
__author__ = "Andrew Dean"
from pygametemplate.game import Game
from pygametemplate.view import View
|
Add View as a first class member of pygametemplate
|
Add View as a first class member of pygametemplate
|
Python
|
mit
|
AndyDeany/pygame-template
|
c39c60de325f5ce827de423abc646bd8662c80fb
|
pyp2rpmlib/package_data.py
|
pyp2rpmlib/package_data.py
|
class PackageData(object):
def __init__(self, local_file, name, version):
self.local_file = local_file
self.name = name
self.version = version
class PypiData(PackageData):
def __init__(self, local_file, name, version, md5, url):
super(PackageData, self).__init__(local_file, name, version)
self.md5 = md5
self.url = url
class LocalData(PackageData):
def __init__(self, local_file, name, version):
super(PackageData, self).__init__(local_file, name, version)
|
class PackageData(object):
def __init__(self, local_file, name, version):
self.local_file = local_file
self.name = name
self.version = version
def __getattr__(self, name):
if name in self.__dict__:
return self.__dict__[name]
return None
class PypiData(PackageData):
def __init__(self, local_file, name, version, md5, url):
super(PackageData, self).__init__(local_file, name, version)
self.md5 = md5
self.url = url
class LocalData(PackageData):
def __init__(self, local_file, name, version):
super(PackageData, self).__init__(local_file, name, version)
|
Package data objects should return None for missing attributes.
|
Package data objects should return None for missing attributes.
|
Python
|
mit
|
mcyprian/pyp2rpm,henrysher/spec4pypi,MichaelMraka/pyp2rpm,pombredanne/pyp2rpm,yuokada/pyp2rpm,fedora-python/pyp2rpm,joequant/pyp2rpm
|
7f38276fddc3d94f791d29d3bcbff4bfc9d4ee98
|
tests/chainer_tests/datasets_tests/test_tuple_dataset.py
|
tests/chainer_tests/datasets_tests/test_tuple_dataset.py
|
import unittest
import numpy
from chainer import cuda
from chainer import datasets
from chainer import testing
from chainer.testing import attr
class TestTupleDataset(unittest.TestCase):
def setUp(self):
self.x0 = numpy.random.rand(3, 4)
self.x1 = numpy.random.rand(3, 5)
def check_tuple_dataset(self, x0, x1):
td = datasets.TupleDataset(x0, x1)
self.assertEqual(len(td), len(x0))
for i in range(len(x0)):
example = td[i]
self.assertEqual(len(example), 2)
numpy.testing.assert_array_equal(
cuda.to_cpu(example[0]), cuda.to_cpu(x0[i]))
numpy.testing.assert_array_equal(
cuda.to_cpu(example[1]), cuda.to_cpu(x1[i]))
def test_tuple_dataset_cpu(self):
self.check_tuple_dataset(self.x0, self.x1)
@attr.gpu
def test_tuple_dataset_gpu(self):
self.check_tuple_dataset(cuda.to_gpu(self.x0), cuda.to_gpu(self.x1))
testing.run_module(__name__, __file__)
|
import unittest
import numpy
from chainer import cuda
from chainer import datasets
from chainer import testing
from chainer.testing import attr
class TestTupleDataset(unittest.TestCase):
def setUp(self):
self.x0 = numpy.random.rand(3, 4)
self.x1 = numpy.random.rand(3, 5)
self.z0 = numpy.random.rand(4, 4)
def check_tuple_dataset(self, x0, x1):
td = datasets.TupleDataset(x0, x1)
self.assertEqual(len(td), len(x0))
for i in range(len(x0)):
example = td[i]
self.assertEqual(len(example), 2)
numpy.testing.assert_array_equal(
cuda.to_cpu(example[0]), cuda.to_cpu(x0[i]))
numpy.testing.assert_array_equal(
cuda.to_cpu(example[1]), cuda.to_cpu(x1[i]))
def test_tuple_dataset_cpu(self):
self.check_tuple_dataset(self.x0, self.x1)
@attr.gpu
def test_tuple_dataset_gpu(self):
self.check_tuple_dataset(cuda.to_gpu(self.x0), cuda.to_gpu(self.x1))
def test_tuple_dataset_len_mismatch(self):
with self.assertRaises(ValueError):
datasets.TupleDataset(self.x0, self.z0)
def test_tuple_dataset_overrun(self):
td = datasets.TupleDataset(self.x0, self.x1)
with self.assertRaises(IndexError):
td[3]
testing.run_module(__name__, __file__)
|
Add exception test cases for TupleDataset
|
Add exception test cases for TupleDataset
|
Python
|
mit
|
okuta/chainer,cupy/cupy,hvy/chainer,keisuke-umezawa/chainer,niboshi/chainer,anaruse/chainer,ronekko/chainer,keisuke-umezawa/chainer,jnishi/chainer,chainer/chainer,hvy/chainer,keisuke-umezawa/chainer,ktnyt/chainer,kikusu/chainer,okuta/chainer,delta2323/chainer,niboshi/chainer,niboshi/chainer,rezoo/chainer,wkentaro/chainer,ktnyt/chainer,kiyukuta/chainer,wkentaro/chainer,ktnyt/chainer,okuta/chainer,chainer/chainer,keisuke-umezawa/chainer,cupy/cupy,jnishi/chainer,chainer/chainer,jnishi/chainer,jnishi/chainer,wkentaro/chainer,hvy/chainer,niboshi/chainer,pfnet/chainer,kikusu/chainer,cupy/cupy,cupy/cupy,chainer/chainer,hvy/chainer,aonotas/chainer,ktnyt/chainer,kashif/chainer,ysekky/chainer,wkentaro/chainer,tkerola/chainer,okuta/chainer
|
16091eebd0242782715600df9f6db9596f5797fe
|
tagging_autocomplete/urls.py
|
tagging_autocomplete/urls.py
|
from django.conf.urls import patterns, url
urlpatterns = patterns(
'tagging_autocomplete.views',
url(r'^list$', 'list_tags', name='tagging_autocomplete-list'),
)
|
from django.conf.urls import url
urlpatterns = [
'tagging_autocomplete.views',
url(r'^list$', 'list_tags', name='tagging_autocomplete-list'),
]
|
Drop the deprecated way of specifying url patterns
|
Drop the deprecated way of specifying url patterns
|
Python
|
mit
|
ludwiktrammer/django-tagging-autocomplete
|
397099cc8e2628a548c66957168dfab3de7f7f59
|
estudios_socioeconomicos/tests.py
|
estudios_socioeconomicos/tests.py
|
# from django.test import TestCase
# Create your tests here.
|
from django.test import TestCase
from .models import Pregunta, Seccion, Subseccion
from .load import load_data
class TestLoadPreguntas(TestCase):
""" Suite to test the script to load questions.
"""
def test_load_preguntas(self):
""" Test that the script to load questions works properly.
We assert that the number of objects inserted is the same as we
expect.
"""
load_data()
self.assertEqual(142, len(Pregunta.objects.all()))
self.assertEqual(7, len(Seccion.objects.all()))
self.assertEqual(18, len(Subseccion.objects.all()))
|
Add test for loading script.
|
Add test for loading script.
|
Python
|
mit
|
erikiado/jp2_online,erikiado/jp2_online,erikiado/jp2_online
|
5a764e0b91db628efd20d63d70c5ed688695f8b1
|
app/routes.py
|
app/routes.py
|
from app import app
from flask import redirect, render_template
@app.route('/')
def index():
return render_template('index.html')
# default 'catch all' route
@app.route('/', defaults={'path': ''})
@app.route('/<path:path>')
def catch_all(path):
return redirect('/')
|
from app import app
from app.models import Digit
from flask import redirect, render_template, request, jsonify
@app.route('/')
def index():
return render_template('index.html')
# api route
# parameters
#
# id: id to query, will return all otherwise
# select: one value per item in the query
# limit: limit, obviously.
@app.route('/api')
def api():
query_id = request.args.get('id') # get first id in query string
query_limit = request.args.get('limit') # get first limit in query string
query_select = request.args.getlist('select') # get all select params
if query_id is not None:
result = Digit.query.\
filter(Digit.id == query_id).\
all()
else:
result = Digit.query.limit(query_limit).all()
return jsonify(result=[r.as_dict(query_select) for r in result])
# default 'catch all' route
@app.route('/', defaults={'path': ''})
@app.route('/<path:path>')
def catch_all(path):
return redirect('/')
|
Add basic functional DB /api route
|
Add basic functional DB /api route
|
Python
|
mit
|
starcalibre/MNIST3D,starcalibre/MNIST3D,starcalibre/MNIST3D
|
e6d9524d6e29077cfb805cbafd99caf2b080a1c6
|
src/hyperloop/aero.py
|
src/hyperloop/aero.py
|
from openmdao.main.api import Component
from openmdao.lib.datatypes.api import Float
#put inside pod
class Aero(Component):
"""Place holder for real aerodynamic calculations of the capsule"""
#Inputs
coef_drag = Float(1, iotype="in", desc="capsule drag coefficient")
area_capsule = Float(18000, iotype="in", units="cm**2", desc="capsule frontal area")
velocity_capsule = Float(600, iotype="in", units="m/s", desc="capsule frontal area")
rho = Float(iotype="in", units="kg/m**3", desc="tube air density")
gross_thrust = Float(iotype="in", units="N", desc="nozzle gross thrust")
#Outputs
net_force = Float(iotype="out", desc="Net force with drag considerations", units="N")
drag = Float(iotype="out", units="N", desc="Drag Force")
def execute(self):
#Drag = 0.5*Cd*rho*Veloc*Area
self.drag = 0.5*self.coef_drag*self.rho*self.velocity_capsule*self.area_capsule
self.net_force = self.gross_thrust - self.drag
|
from openmdao.main.api import Component
from openmdao.lib.datatypes.api import Float
#put inside pod
class Aero(Component):
"""Place holder for real aerodynamic calculations of the capsule"""
#Inputs
coef_drag = Float(1, iotype="in", desc="capsule drag coefficient")
area_capsule = Float(18000, iotype="in", units="cm**2", desc="capsule frontal area")
velocity_capsule = Float(600, iotype="in", units="m/s", desc="capsule velocity")
rho = Float(iotype="in", units="kg/m**3", desc="tube air density")
gross_thrust = Float(iotype="in", units="N", desc="nozzle gross thrust")
#Outputs
net_force = Float(iotype="out", desc="Net force with drag considerations", units="N")
drag = Float(iotype="out", units="N", desc="Drag Force")
def execute(self):
#Drag = 0.5*Cd*rho*Veloc**2*Area
self.drag = 0.5*self.coef_drag*self.rho*self.velocity_capsule**2*self.area_capsule
self.net_force = self.gross_thrust - self.drag
|
Fix velocity_capsule description and drag formula
|
Fix velocity_capsule description and drag formula
Drag force should be quadratically dependent on speed instead of linearly dependent.
|
Python
|
apache-2.0
|
HyperloopTeam/Hyperloop,paulopperman/Hyperloop,whiplash01/Hyperloop,whiplash01/Hyperloop,UwHyperloop/Hyperloop,UwHyperloop/Hyperloop,HyperloopTeam/Hyperloop,paulopperman/Hyperloop,kishenr12/Hyperloop,kishenr12/Hyperloop
|
e6cf8c244cdffa08d67a45c3a44236c3b91aab78
|
examples/rmg/liquid_phase/input.py
|
examples/rmg/liquid_phase/input.py
|
# Data sources
database(
thermoLibraries = ['primaryThermoLibrary'],
reactionLibraries = [],
seedMechanisms = [],
kineticsDepositories = ['training'],
kineticsFamilies = 'default',
kineticsEstimator = 'rate rules',
)
# List of species
species(
label='octane',
reactive=True,
structure=SMILES("C(CCCCC)CC"),
)
species(
label='oxygen',
reactive=True,
structure=SMILES("[O][O]"),
)
# Reaction systems
liquidReactor(
temperature=(500,'K'),
initialConcentrations={
"octane": (6.154e-3,'mol/cm^3'),
"oxygen": (4.953e-6,'mol/cm^3')
},
terminationTime=(5,'s'),
)
solvation(
solvent='octane'
)
simulator(
atol=1e-16,
rtol=1e-8,
)
model(
toleranceKeepInEdge=1E-9,
toleranceMoveToCore=0.001,
toleranceInterruptSimulation=0.1,
maximumEdgeSpecies=100000
)
options(
units='si',
saveRestartPeriod=None,
drawMolecules=False,
generatePlots=False,
saveConcentrationProfiles=True,
)
|
# Data sources
database(
thermoLibraries = ['primaryThermoLibrary'],
reactionLibraries = [],
seedMechanisms = [],
kineticsDepositories = ['training'],
kineticsFamilies = 'default',
kineticsEstimator = 'rate rules',
)
# Constraints on generated species
generatedSpeciesConstraints(
maximumRadicalElectrons = 3,
)
# List of species
species(
label='octane',
multiplicity = 1,
reactive=True,
structure=SMILES("C(CCCCC)CC"),
)
species(
label='oxygen',
multiplicity = 3,
reactive=True,
structure=SMILES("[O][O]"),
)
# Reaction systems
liquidReactor(
temperature=(500,'K'),
initialConcentrations={
"octane": (6.154e-3,'mol/cm^3'),
"oxygen": (4.953e-6,'mol/cm^3')
},
terminationTime=(5,'s'),
)
solvation(
solvent='octane'
)
simulator(
atol=1e-16,
rtol=1e-8,
)
model(
toleranceKeepInEdge=1E-9,
toleranceMoveToCore=0.001,
toleranceInterruptSimulation=0.1,
maximumEdgeSpecies=100000
)
options(
units='si',
saveRestartPeriod=None,
drawMolecules=False,
generatePlots=False,
saveConcentrationProfiles=True,
)
|
Update RMG example liquid_phase with multiplicity label
|
Update RMG example liquid_phase with multiplicity label
|
Python
|
mit
|
chatelak/RMG-Py,pierrelb/RMG-Py,enochd/RMG-Py,comocheng/RMG-Py,chatelak/RMG-Py,nyee/RMG-Py,enochd/RMG-Py,nickvandewiele/RMG-Py,nyee/RMG-Py,pierrelb/RMG-Py,nickvandewiele/RMG-Py,comocheng/RMG-Py
|
9541fd723308d51f7c380649a81b4992074a1193
|
workout_manager/urls.py
|
workout_manager/urls.py
|
from django.conf.urls import patterns, include, url
from django.contrib import admin
admin.autodiscover()
urlpatterns = patterns('',
url(r'^admin/', include(admin.site.urls)),
url(r'^', include('manager.urls')),
url(r'exercise/', include('exercises.urls')),
url(r'weight/', include('weight.urls')),
url(r'nutrition/', include('nutrition.urls')),
url(r'^browserid/', include('django_browserid.urls')),
)
|
from django.conf.urls import patterns, include, url
from django.conf.urls.i18n import i18n_patterns
from django.contrib import admin
admin.autodiscover()
urlpatterns = i18n_patterns('',
url(r'^admin/', include(admin.site.urls)),
url(r'^', include('manager.urls')),
url(r'exercise/', include('exercises.urls')),
url(r'weight/', include('weight.urls')),
url(r'nutrition/', include('nutrition.urls')),
url(r'^browserid/', include('django_browserid.urls')),
)
|
Append the name of the current language to the URLs
|
Append the name of the current language to the URLs
--HG--
branch : 1.1-dev
|
Python
|
agpl-3.0
|
DeveloperMal/wger,petervanderdoes/wger,DeveloperMal/wger,kjagoo/wger_stark,petervanderdoes/wger,wger-project/wger,kjagoo/wger_stark,rolandgeider/wger,wger-project/wger,DeveloperMal/wger,kjagoo/wger_stark,DeveloperMal/wger,petervanderdoes/wger,wger-project/wger,rolandgeider/wger,rolandgeider/wger,kjagoo/wger_stark,petervanderdoes/wger,rolandgeider/wger,wger-project/wger
|
cca7dee87863219b382321ba563cb48b1e58a4fb
|
tests/chainer_tests/functions_tests/pooling_tests/test_pooling_nd_kernel.py
|
tests/chainer_tests/functions_tests/pooling_tests/test_pooling_nd_kernel.py
|
import unittest
import mock
import chainer
from chainer.functions.pooling import pooling_nd_kernel
from chainer import testing
from chainer.testing import attr
@testing.parameterize(*testing.product({
'ndim': [2, 3, 4],
}))
@attr.gpu
class TestPoolingNDKernelMemo(unittest.TestCase):
def setUp(self):
chainer.cuda.clear_memo()
def test_pooling_nd_kernel_forward_memo(self):
ndim = self.ndim
with mock.patch('chainer.functions.pooling.pooling_nd_kernel.'
'PoolingNDKernelForward._generate') as m:
pooling_nd_kernel.PoolingNDKernelForward.generate(ndim)
m.assert_called_once_with(ndim)
pooling_nd_kernel.PoolingNDKernelForward.generate(ndim)
m.assert_called_once_with(ndim)
def test_pooling_nd_kernel_backward_memo(self):
ndim = self.ndim
with mock.patch('chainer.functions.pooling.pooling_nd_kernel.'
'PoolingNDKernelBackward._generate') as m:
pooling_nd_kernel.PoolingNDKernelBackward.generate(ndim)
m.assert_called_once_with(ndim)
pooling_nd_kernel.PoolingNDKernelBackward.generate(ndim)
m.assert_called_once_with(ndim)
testing.run_module(__name__, __file__)
|
import unittest
import mock
import chainer
from chainer.functions.pooling import pooling_nd_kernel
from chainer import testing
from chainer.testing import attr
@testing.parameterize(*testing.product({
'ndim': [2, 3, 4],
}))
@attr.gpu
class TestPoolingNDKernelMemo(unittest.TestCase):
def setUp(self):
chainer.cuda.clear_memo()
def test_pooling_nd_kernel_forward_memo(self):
ndim = self.ndim
with mock.patch('chainer.functions.pooling.pooling_nd_kernel.'
'PoolingNDKernelForward._generate') as m:
pooling_nd_kernel.PoolingNDKernelForward.generate(ndim)
m.assert_called_once_with(ndim)
pooling_nd_kernel.PoolingNDKernelForward.generate(ndim)
# Check that the mocked _generate() function is called just once
# because the result of generate() function is cached.
m.assert_called_once_with(ndim)
def test_pooling_nd_kernel_backward_memo(self):
ndim = self.ndim
with mock.patch('chainer.functions.pooling.pooling_nd_kernel.'
'PoolingNDKernelBackward._generate') as m:
pooling_nd_kernel.PoolingNDKernelBackward.generate(ndim)
m.assert_called_once_with(ndim)
pooling_nd_kernel.PoolingNDKernelBackward.generate(ndim)
# Check that the mocked _generate() function is called just once
# because the result of generate() function is cached.
m.assert_called_once_with(ndim)
testing.run_module(__name__, __file__)
|
Add comments for tests of caching.
|
Add comments for tests of caching.
|
Python
|
mit
|
cupy/cupy,hvy/chainer,jnishi/chainer,ysekky/chainer,kashif/chainer,jnishi/chainer,delta2323/chainer,keisuke-umezawa/chainer,jnishi/chainer,niboshi/chainer,niboshi/chainer,hvy/chainer,keisuke-umezawa/chainer,okuta/chainer,wkentaro/chainer,wkentaro/chainer,tkerola/chainer,ronekko/chainer,ktnyt/chainer,chainer/chainer,keisuke-umezawa/chainer,wkentaro/chainer,niboshi/chainer,chainer/chainer,hvy/chainer,keisuke-umezawa/chainer,chainer/chainer,jnishi/chainer,hvy/chainer,niboshi/chainer,ktnyt/chainer,ktnyt/chainer,okuta/chainer,kiyukuta/chainer,okuta/chainer,cupy/cupy,wkentaro/chainer,cupy/cupy,okuta/chainer,chainer/chainer,anaruse/chainer,aonotas/chainer,ktnyt/chainer,rezoo/chainer,cupy/cupy,pfnet/chainer
|
5e4c12067ee2b1d9affceaea789405422f7233a1
|
ce/common.py
|
ce/common.py
|
#!/usr/bin/env python
# vim: set fileencoding=UTF-8 :
import inspect
class DynamicMethods(object):
def list_methods(self, predicate):
"""Find all transform methods within the class that satisfies the
predicate.
Returns:
A list of tuples containing method names and corresponding methods
that can be called with a tree as the argument for each method.
"""
methods = [member[0] for member in inspect.getmembers(
self.__class__, predicate=inspect.ismethod)]
return [getattr(self, method) for method in methods
if not method.startswith('_') and method != 'list_methods' and
predicate(method)]
class Comparable(object):
def __ne__(self, other):
return not self.__eq__(other)
def __ge__(self, other):
return not self.__lt__(other)
def __gt__(self, other):
return not self.__eq__(other) and not self.__lt__(other)
def __le__(self, other):
return not self.__gt__(other)
|
#!/usr/bin/env python
# vim: set fileencoding=UTF-8 :
import inspect
class DynamicMethods(object):
def list_methods(self, predicate):
"""Find all transform methods within the class that satisfies the
predicate.
Returns:
A list of tuples containing method names and corresponding methods
that can be called with a tree as the argument for each method.
"""
methods = [member[0] for member in inspect.getmembers(self,
predicate=inspect.ismethod)]
return [getattr(self, method) for method in methods
if not method.startswith('_') and method != 'list_methods' and
predicate(method)]
class Comparable(object):
def __ne__(self, other):
return not self.__eq__(other)
def __ge__(self, other):
return not self.__lt__(other)
def __gt__(self, other):
return not self.__eq__(other) and not self.__lt__(other)
def __le__(self, other):
return not self.__gt__(other)
|
Fix broken list_methods due to inspect behaviour
|
Fix broken list_methods due to inspect behaviour
|
Python
|
mit
|
admk/soap
|
012ab9bf79ae2f70079534ce6ab527f8e08a50f3
|
doc/tutorials/python/secure-msg-template.py
|
doc/tutorials/python/secure-msg-template.py
|
async def init():
me = input('Who are you? ').strip()
wallet_name = '%s-wallet' % me
# 1. Create Wallet and Get Wallet Handle
try:
await wallet.create_wallet(pool_name, wallet_name, None, None, None)
except:
pass
wallet_handle = await wallet.open_wallet(wallet_name, None, None)
print('wallet = %s' % wallet_handle)
(my_did, my_vk) = await did.create_and_store_my_did(wallet_handle, "{}")
print('my_did and verkey = %s %s' % (my_did, my_vk))
their = input("Other party's DID and verkey? ").strip().split(' ')
return wallet_handle, my_did, my_vk, their[0], their[1]
|
import asyncio
import time
import re
async def prep(wallet_handle, my_vk, their_vk, msg):
print('prepping %s' % msg)
async def init():
return None, None, None, None, None
async def read(wallet_handle, my_vk):
print('reading')
async def demo():
wallet_handle, my_did, my_vk, their_did, their_vk = await init()
while True:
argv = input('> ').strip().split(' ')
cmd = argv[0].lower()
rest = ' '.join(argv[1:])
if re.match(cmd, 'prep'):
await prep(wallet_handle, my_vk, their_vk, rest)
elif re.match(cmd, 'read'):
await read(wallet_handle, my_vk)
elif re.match(cmd, 'quit'):
break
else:
print('Huh?')
if __name__ == '__main__':
try:
loop = asyncio.get_event_loop()
loop.run_until_complete(demo())
time.sleep(1) # waiting for libindy thread complete
except KeyboardInterrupt:
print('')
|
Fix template that was accidentally overwritten
|
Fix template that was accidentally overwritten
|
Python
|
apache-2.0
|
anastasia-tarasova/indy-sdk,anastasia-tarasova/indy-sdk,Artemkaaas/indy-sdk,anastasia-tarasova/indy-sdk,srottem/indy-sdk,peacekeeper/indy-sdk,peacekeeper/indy-sdk,srottem/indy-sdk,srottem/indy-sdk,peacekeeper/indy-sdk,Artemkaaas/indy-sdk,srottem/indy-sdk,srottem/indy-sdk,srottem/indy-sdk,anastasia-tarasova/indy-sdk,Artemkaaas/indy-sdk,peacekeeper/indy-sdk,peacekeeper/indy-sdk,peacekeeper/indy-sdk,Artemkaaas/indy-sdk,Artemkaaas/indy-sdk,Artemkaaas/indy-sdk,peacekeeper/indy-sdk,srottem/indy-sdk,anastasia-tarasova/indy-sdk,anastasia-tarasova/indy-sdk,Artemkaaas/indy-sdk,anastasia-tarasova/indy-sdk,peacekeeper/indy-sdk,anastasia-tarasova/indy-sdk,Artemkaaas/indy-sdk,srottem/indy-sdk,anastasia-tarasova/indy-sdk,anastasia-tarasova/indy-sdk,Artemkaaas/indy-sdk,Artemkaaas/indy-sdk,peacekeeper/indy-sdk,srottem/indy-sdk,peacekeeper/indy-sdk,anastasia-tarasova/indy-sdk,srottem/indy-sdk,peacekeeper/indy-sdk,srottem/indy-sdk,Artemkaaas/indy-sdk,anastasia-tarasova/indy-sdk,anastasia-tarasova/indy-sdk,peacekeeper/indy-sdk,Artemkaaas/indy-sdk,srottem/indy-sdk,peacekeeper/indy-sdk,Artemkaaas/indy-sdk,srottem/indy-sdk
|
a118e2b7133cf4391c1df41d95f9e4329a0bf5e9
|
tests/__init__.py
|
tests/__init__.py
|
import logging
import unittest
import os
import shutil
from sqlalchemy import create_engine
from rtrss import config, database
logging.disable(logging.ERROR)
engine = create_engine(config.SQLALCHEMY_DATABASE_URI,
echo=False,
client_encoding='utf8')
# Reconfigure session factory to use our test schema
database.Session.configure(bind=engine)
class AttrDict(dict):
"""Class to make mock objects"""
def __init__(self, *args, **kwargs):
super(AttrDict, self).__init__(*args, **kwargs)
self.__dict__ = self
class RTRSSTestCase(unittest.TestCase):
@classmethod
def setUpClass(cls):
if os.path.isdir(config.DATA_DIR):
os.rmdir(config.DATA_DIR)
os.makedirs(config.DATA_DIR)
@classmethod
def tearDownClass(cls):
shutil.rmtree(config.DATA_DIR)
class RTRSSDataBaseTestCase(RTRSSTestCase):
def setUp(self):
database.clear(engine)
database.init(engine)
self.db = database.Session()
def tearDown(self):
database.clear(engine)
self.db.close()
|
import logging
import unittest
import os
import shutil
from sqlalchemy import create_engine
from rtrss import config, database
logging.disable(logging.ERROR)
engine = create_engine(config.SQLALCHEMY_DATABASE_URI,
echo=False,
client_encoding='utf8')
# Reconfigure session factory to use our test schema
database.Session.configure(bind=engine)
class AttrDict(dict):
"""Class to make mock objects"""
def __init__(self, *args, **kwargs):
super(AttrDict, self).__init__(*args, **kwargs)
self.__dict__ = self
class RTRSSTestCase(unittest.TestCase):
@classmethod
def setUpClass(cls):
if os.path.isdir(config.DATA_DIR):
shutil.rmtree(config.DATA_DIR)
os.makedirs(config.DATA_DIR)
@classmethod
def tearDownClass(cls):
shutil.rmtree(config.DATA_DIR)
class RTRSSDataBaseTestCase(RTRSSTestCase):
def setUp(self):
database.clear(engine)
database.init(engine)
self.db = database.Session()
def tearDown(self):
database.clear(engine)
self.db.close()
|
Remove test data folder with all contents during setUp
|
Remove test data folder with all contents during setUp
|
Python
|
apache-2.0
|
notapresent/rtrss,notapresent/rtrss,notapresent/rtrss,notapresent/rtrss
|
1de254b56eba45ecdc88d26272ab1f123e734e25
|
tests/test_dem.py
|
tests/test_dem.py
|
import unittest
import numpy as np
class CalculationMethodsTestCase(unittest.TestCase):
def setUp(self):
self.dem = DEMGrid()
def test_calculate_slope(self):
sx, sy = self.dem._calculate_slope()
def test_calculate_laplacian(self):
del2z = self.dem._calculate_lapalacian()
def test_calculate_directional_laplacian(self):
alpha = np.pi/4
del2z = self.dem._calculate_lapalacian(alpha)
def test_pad_boundary(self):
dx = 5
dy = 5
grid = self.dem._griddata
pad_x = np.zeros((self.ny, np.round(dx/2))
pad_y = np.zeros((self.nx + 2*np.round(dx/2), np.round(dy/2)))
padgrid = np.vstack([pad_y, np.hstack([pad_x, self.dem._griddata, pad_x]), pad_y]])
self.dem._pad_boundary(dx, dy)
assertEqual(self.dem.grid, padgrid, 'Grid padded incorrectly')
|
import unittest
import numpy as np
import filecmp
TESTDATA_FILENAME = os.path.join(os.path.dirname(__file__), 'data/big_basin.tif')
class CalculationMethodsTestCase(unittest.TestCase):
def setUp(self):
self.dem = DEMGrid(TESTDATA_FILENAME)
def test_calculate_slope(self):
sx, sy = self.dem._calculate_slope()
def test_calculate_laplacian(self):
del2z = self.dem._calculate_lapalacian()
def test_calculate_directional_laplacian(self):
alpha = np.pi/4
del2z = self.dem._calculate_lapalacian(alpha)
def test_pad_boundary(self):
dx = 5
dy = 5
grid = self.dem._griddata
pad_x = np.zeros((self.ny, np.round(dx/2))
pad_y = np.zeros((self.nx + 2*np.round(dx/2), np.round(dy/2)))
padgrid = np.vstack([pad_y, np.hstack([pad_x, self.dem._griddata, pad_x]), pad_y]])
self.dem._pad_boundary(dx, dy)
assertEqual(self.dem.grid, padgrid, 'Grid padded incorrectly')
class BaseSpatialGridTestCase(unittest.TestCase):
def setUp(self):
self.dem = BaseSpatialGrid(TESTDATA_FILENAME)
def test_save(self):
os.remove('test.tif')
self.save('test.tif')
this_file = os.path.join(os.path.dirname(__file__), 'test.tif')
test_file = TESTDATA_FILENAME
self.assertTrue(filecmp.cmp(this_file, test_file, shallow=False), 'GeoTIFF saved incorrectly')
|
Add test for writing spatial grid to file
|
Add test for writing spatial grid to file
|
Python
|
mit
|
stgl/scarplet,rmsare/scarplet
|
28f25bb7ca5a415bbc3ca2aabd7e290339140a9f
|
tests/test_dns.py
|
tests/test_dns.py
|
from .utils import TestCase, skipUnless
from dynsupdate import client
import os
class DnsTests(TestCase):
@skipUnless(os.getenv("SLOW"), "To slow")
def test_build_resolver(self):
domain = 'google-public-dns-a.google.com'
res = client.NameUpdate.build_resolver(domain)
self.assertListEqual(res.nameservers, ['8.8.8.8'])
|
from .utils import TestCase, skipUnless, mock
from dynsupdate import client
import os
class DnsTests(TestCase):
@skipUnless(os.getenv("SLOW"), "To slow")
def test_build_resolver(self):
domain = 'google-public-dns-a.google.com'
res = client.NameUpdate.build_resolver(domain)
self.assertListEqual(res.nameservers, ['8.8.8.8'])
@mock.patch('dns.resolver.query')
@mock.patch('dns.resolver.Resolver')
def test_build_resolver_fake(self, mock_resolver, mock_query):
mock_rdata = mock.Mock()
mock_rdata.address = "127.0.0.1"
mock_query.return_value = iter([mock_rdata])
res = client.NameUpdate.build_resolver("ns1.fake.com", port=999)
mock_query.assert_called_with("ns1.fake.com", "A")
print(mock_resolver.mock_calls)
mock_resolver.return_value.nameservers.append \
.assert_called_with("127.0.0.1")
self.assertEqual(res.port, 999)
|
Add mocked test of build_resolver
|
Add mocked test of build_resolver
|
Python
|
bsd-3-clause
|
bacher09/dynsupdate
|
7653f2c6e4f72e40eefee5d70d83ceafb8bc4282
|
lib/extend.py
|
lib/extend.py
|
from collections import OrderedDict
import ruamel.yaml
yaml = ruamel.yaml.YAML()
class Operation():
def __init__(self, extension):
self.extension = extension
class Merge(Operation):
def apply(self, base):
ret = base.copy()
for key, value in self.extension.items():
if key in base and isinstance(value, Operation):
ret[key] = value.apply(base[key])
else:
ret[key] = value
return ret
class Prepend(Operation):
def apply(self, base):
return self.extension + base
def merge(*items): return Merge(OrderedDict(items))
def prepend(*items): return Prepend(list(items))
def extend(*items):
extension = OrderedDict(items)
base = extension['_base']
del extension['_base']
syntax = yaml.load( open(base, 'r') )
return Merge(extension).apply(syntax)
|
from collections import OrderedDict
import ruamel.yaml
yaml = ruamel.yaml.YAML()
class Operation():
def __init__(self, extension):
self.extension = extension
class Merge(Operation):
def apply(self, base):
ret = base.copy()
for key, value in self.extension.items():
if key in base and isinstance(value, Operation):
ret[key] = value.apply(base[key])
else:
ret[key] = value
return ret
class Prepend(Operation):
def apply(self, base):
return self.extension + base
def merge(*items): return Merge(OrderedDict(items))
def prepend(*items): return Prepend(list(items))
def extend(*items):
extension = OrderedDict(items)
base = extension['_base']
del extension['_base']
with open(base, 'r') as base_file:
syntax = yaml.load(base_file)
return Merge(extension).apply(syntax)
|
Use context manager to read syntax file
|
Use context manager to read syntax file
|
Python
|
mit
|
Thom1729/YAML-Macros
|
616e542ee32b1ac83dd4d1977119ef670520c476
|
saleor/warehouse/models.py
|
saleor/warehouse/models.py
|
import uuid
from django.db import models
from django.utils.translation import pgettext_lazy
from ..account.models import Address
from ..shipping.models import ShippingZone
class WarehouseQueryset(models.QuerySet):
def prefetch_data(self):
return self.select_related("address").prefetch_related("shipping_zones")
class Warehouse(models.Model):
id = models.UUIDField(default=uuid.uuid4, primary_key=True)
name = models.CharField(
pgettext_lazy("Warehouse field description", "Warehouse name"), max_length=255
)
company_name = models.CharField(
pgettext_lazy("Warehouse field description", "Legal company name"),
blank=True,
max_length=255,
)
shipping_zones = models.ManyToManyField(ShippingZone, blank=True)
address = models.ForeignKey(Address, on_delete=models.CASCADE)
email = models.EmailField(
pgettext_lazy("Warehouse field description", "Email address"),
blank=True,
default="",
)
objects = WarehouseQueryset.as_manager()
class Meta:
ordering = ("-name",)
permissions = (
(
"manage_warehouses",
pgettext_lazy("Permission description", "Manage warehouses."),
),
)
def __str__(self):
return self.name
def delete(self, *args, **kwargs):
self.address.delete()
super().delete(*args, **kwargs)
|
import uuid
from typing import Set
from django.db import models
from django.utils.translation import pgettext_lazy
from ..account.models import Address
from ..shipping.models import ShippingZone
class WarehouseQueryset(models.QuerySet):
def prefetch_data(self):
return self.select_related("address").prefetch_related("shipping_zones")
class Warehouse(models.Model):
id = models.UUIDField(default=uuid.uuid4, primary_key=True)
name = models.CharField(
pgettext_lazy("Warehouse field description", "Warehouse name"), max_length=255
)
company_name = models.CharField(
pgettext_lazy("Warehouse field description", "Legal company name"),
blank=True,
max_length=255,
)
shipping_zones = models.ManyToManyField(ShippingZone, blank=True)
address = models.ForeignKey(Address, on_delete=models.CASCADE)
email = models.EmailField(
pgettext_lazy("Warehouse field description", "Email address"),
blank=True,
default="",
)
objects = WarehouseQueryset.as_manager()
class Meta:
ordering = ("-name",)
permissions = (
(
"manage_warehouses",
pgettext_lazy("Permission description", "Manage warehouses."),
),
)
def __str__(self):
return self.name
@property
def countries(self) -> Set[str]:
countries_zone = ",".join(
ShippingZone.objects.prefetch_related("warehouse_set")
.filter(warehouse=self)
.values_list("countries", flat=True)
)
return set(countries_zone.split(","))
def delete(self, *args, **kwargs):
self.address.delete()
super().delete(*args, **kwargs)
|
Simplify getting countries associated with warehouse
|
Simplify getting countries associated with warehouse
|
Python
|
bsd-3-clause
|
mociepka/saleor,mociepka/saleor,mociepka/saleor
|
b6d9e7c24b0185d6a715adee4fc457afda6078f4
|
src/waldur_core/core/migrations/0008_changeemailrequest_uuid.py
|
src/waldur_core/core/migrations/0008_changeemailrequest_uuid.py
|
from django.db import migrations
import waldur_core.core.fields
class Migration(migrations.Migration):
dependencies = [
('core', '0007_changeemailrequest'),
]
operations = [
migrations.AddField(
model_name='changeemailrequest',
name='uuid',
field=waldur_core.core.fields.UUIDField(null=True),
),
]
|
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('core', '0007_changeemailrequest'),
]
operations = [
migrations.AddField(
model_name='changeemailrequest', name='uuid', field=models.UUIDField(),
),
]
|
Fix UUID field migration for change email request model.
|
Fix UUID field migration for change email request model.
We should have been used builtin UUID field because our own field has uniqueness constraint.
|
Python
|
mit
|
opennode/nodeconductor-assembly-waldur,opennode/waldur-mastermind,opennode/nodeconductor-assembly-waldur,opennode/nodeconductor-assembly-waldur,opennode/waldur-mastermind,opennode/waldur-mastermind,opennode/waldur-mastermind
|
a06ca6899062bab407cb4c6884d0bf148a380b1f
|
netsecus/task.py
|
netsecus/task.py
|
from __future__ import unicode_literals
class Task(object):
def __init__(self, number, description, maxPoints):
self.number = number
self.description = description
self.maxPoints = maxPoints
|
from __future__ import unicode_literals
class Task(object):
def __init__(self, number, description, maxPoints, reachedPoints):
self.number = number
self.description = description
self.maxPoints = maxPoints
self.reachedPoints = reachedPoints
|
Add a variable to hold reached points
|
Add a variable to hold reached points
|
Python
|
mit
|
hhucn/netsec-uebungssystem,hhucn/netsec-uebungssystem,hhucn/netsec-uebungssystem
|
f5bbdea74c0f8a0cc8ac4331ea8adc45c3f266c8
|
converter.py
|
converter.py
|
#
# MIT License
# Copyright (c) 2017 Hampus Tågerud
#
# Permission is hereby granted, free of charge, to any person obtaining a
# copy of this software and associated documentation files
# (the "Software"), to deal in the Software without restriction,
# including without limitation the rights to use, copy, modify, merge,
# publish, distribute, sublicense, and/or sell copies of the Software,
# and to permit persons to whom the Software is furnished to do so,
# subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included
# in all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
# IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
# CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
# TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
# SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
def main():
command = ""
while command != "exit":
command = input("> ").strip()
if __name__ == "__main__":
main()
|
#
# MIT License
# Copyright (c) 2017 Hampus Tågerud
#
# Permission is hereby granted, free of charge, to any person obtaining a
# copy of this software and associated documentation files
# (the "Software"), to deal in the Software without restriction,
# including without limitation the rights to use, copy, modify, merge,
# publish, distribute, sublicense, and/or sell copies of the Software,
# and to permit persons to whom the Software is furnished to do so,
# subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included
# in all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
# IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
# CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
# TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
# SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
import sys
def main():
if len(sys.argv) > 1:
for i in range(1, len(sys.argv)):
with open(sys.argv[i]) as f:
lines = f.read().splitlines()
for line in lines:
evaluate(line);
command = ""
while command != "exit":
command = input("> ").strip()
def evaluate(string):
print(string)
if __name__ == "__main__":
main()
|
Read files defined as argument
|
Read files defined as argument
|
Python
|
mit
|
hampustagerud/colorconverter
|
33e88c063fedb11211e3786a9d722a9d12f72ce8
|
contrib/dn42_whoisd.py
|
contrib/dn42_whoisd.py
|
#!/bin/python
# coding: utf-8
import argparse
import asyncio
import lglass.dn42
import lglass.whois.engine
import lglass.whois.server
def create_database(db_path):
return lglass.dn42.DN42Database(db_path)
if __name__ == "__main__":
argparser = argparse.ArgumentParser(description="DN42 Whois server")
argparser.add_argument("--port", "-p", default=4343)
argparser.add_argument("--address", "-a", default="::1,127.0.0.1")
argparser.add_argument("database")
args = argparser.parse_args()
db = create_database(args.database)
engine = lglass.whois.engine.WhoisEngine(db)
server = lglass.whois.server.SimpleWhoisServer(engine)
loop = asyncio.get_event_loop()
coro = asyncio.start_server(server.handle, args.address.split(","),
args.port, loop=loop)
s = loop.run_until_complete(coro)
try:
loop.run_forever()
except KeyboardInterrupt:
pass
finally:
s.close()
loop.run_until_complete(s.wait_closed())
loop.close()
|
#!/bin/python
# coding: utf-8
import argparse
import asyncio
import lglass.dn42
import lglass.whois.engine
import lglass.whois.server
def create_database(db_path):
return lglass.dn42.DN42Database(db_path)
if __name__ == "__main__":
argparser = argparse.ArgumentParser(description="DN42 Whois server")
argparser.add_argument("--port", "-p", default=4343)
argparser.add_argument("--address", "-a", default="::1,127.0.0.1")
argparser.add_argument("database")
args = argparser.parse_args()
db = create_database(args.database)
engine = lglass.whois.engine.WhoisEngine(db)
engine.type_hints[r"[0-9A-Za-z]+-DN42$"] = {"role", "person"}
server = lglass.whois.server.SimpleWhoisServer(engine)
loop = asyncio.get_event_loop()
coro = asyncio.start_server(server.handle, args.address.split(","),
args.port, loop=loop)
s = loop.run_until_complete(coro)
try:
loop.run_forever()
except KeyboardInterrupt:
pass
finally:
s.close()
loop.run_until_complete(s.wait_closed())
loop.close()
|
Add type hint for -DN42
|
Add type hint for -DN42
|
Python
|
mit
|
fritz0705/lglass
|
56327baa67d5f05551bc52a1c0466e8d8b905797
|
metrics.py
|
metrics.py
|
"""The metrics module implements functions assessing prediction error for specific purposes."""
import numpy as np
def trapz(x, y):
"""Trapezoidal rule for integrating
the curve defined by x-y pairs.
Assume x and y are in the range [0,1]
"""
assert len(x) == len(y), 'x and y need to be of same length'
x = np.concatenate([x, array([0.0, 1.0])])
y = np.concatenate([y, array([0.0, 1.0])])
sort_idx = np.argsort(x)
sx = x[sort_idx]
sy = y[sort_idx]
area = 0.0
for ix in range(len(x)-1):
area += 0.5*(sx[ix+1]-sx[ix])*(sy[ix+1]+sy[ix])
return area
|
"""The metrics module implements functions assessing prediction error for specific purposes."""
import numpy as np
def trapz(x, y):
"""Trapezoidal rule for integrating
the curve defined by x-y pairs.
Assume x and y are in the range [0,1]
"""
assert len(x) == len(y), 'x and y need to be of same length'
x = np.concatenate([x, np.array([0.0, 1.0])])
y = np.concatenate([y, np.array([0.0, 1.0])])
sort_idx = np.argsort(x)
sx = x[sort_idx]
sy = y[sort_idx]
area = 0.0
for ix in range(len(x) - 1):
area += 0.5 * (sx[ix + 1] - sx[ix]) * (sy[ix + 1] + sy[ix])
return area
|
Add the missing 'np.' before 'array'
|
Add the missing 'np.' before 'array'
|
Python
|
mit
|
ceshine/isml15-wed
|
222628c6747bdc3574bcb7cf6257c785ffa6451d
|
inventory_control/database/sql.py
|
inventory_control/database/sql.py
|
"""
So this is where all the SQL commands live
"""
CREATE_SQL = """
CREATE TABLE component_type (
id INT PRIMARY KEY AUTO_INCREMENT,
type VARCHAR(255) UNIQUE
);
CREATE TABLE components (
id INT PRIMARY KEY AUTO_INCREMENT,
sku TEXT,
type INT,
status INT,
FOREIGN KEY (type) REFERENCES component_type(id)
);
CREATE TABLE projects (
id INT PRIMARY KEY AUTO_INCREMENT,
motherboard INT,
power_supply INT,
cpu INT,
hard_drive INT,
proj_case INT,
memory INT,
FOREIGN KEY (motherboard) REFERENCES components(id) ON DELETE CASCADE,
FOREIGN KEY (cpu) REFERENCES components(id) ON DELETE CASCADE,
FOREIGN KEY (power_supply) REFERENCES components(id) ON DELETE CASCADE,
FOREIGN KEY (hard_drive) REFERENCES components(id) ON DELETE CASCADE,
FOREIGN KEY (proj_case) REFERENCES components(id) ON DELETE CASCADE,
FOREIGN KEY (memory) REFERENCES components(id) ON DELETE CASCADE
);
"""
ADD_COMPONENT_TYPE = """INSERT IGNORE INTO component_type (type) VALUES ('{text}')
"""
GET_COMPONENT_TYPE="""SELECT * FROM component_type WHERE type='{text}'"""
DELETE_COMPONENT_TYPE = """DELETE FROM component_type WHERE type='{text}'
"""
SELECT_ALL_COMPONENTS = """
SELECT * FROM components INNER JOIN component_type
ON components.type = component_type.id;
"""
DROP_SQL = """
DROP TABLE projects;
DROP TABLE components;
DROP TABLE component_type;
"""
|
"""
So this is where all the SQL commands live
"""
CREATE_SQL = """
CREATE TABLE component_type (
id INT PRIMARY KEY AUTO_INCREMENT,
type VARCHAR(255) UNIQUE
);
CREATE TABLE components (
id INT PRIMARY KEY AUTO_INCREMENT,
serial_number VARCHAR(255),
sku TEXT,
type INT,
status INT,
FOREIGN KEY (type) REFERENCES component_type(id)
);
CREATE TABLE projects (
id INT PRIMARY KEY AUTO_INCREMENT,
product_number INT,
motherboard INT,
power_supply INT,
cpu INT,
hard_drive INT,
proj_case INT,
memory INT,
FOREIGN KEY (motherboard) REFERENCES components(id) ON DELETE CASCADE,
FOREIGN KEY (cpu) REFERENCES components(id) ON DELETE CASCADE,
FOREIGN KEY (power_supply) REFERENCES components(id) ON DELETE CASCADE,
FOREIGN KEY (hard_drive) REFERENCES components(id) ON DELETE CASCADE,
FOREIGN KEY (proj_case) REFERENCES components(id) ON DELETE CASCADE,
FOREIGN KEY (memory) REFERENCES components(id) ON DELETE CASCADE
);
"""
ADD_COMPONENT_TYPE = """INSERT IGNORE INTO component_type (type) VALUES ('{text}')
"""
GET_COMPONENT_TYPE="""SELECT * FROM component_type WHERE type='{text}'"""
DELETE_COMPONENT_TYPE = """DELETE FROM component_type WHERE type='{text}'
"""
SELECT_ALL_COMPONENTS = """
SELECT * FROM components INNER JOIN component_type
ON components.type = component_type.id;
"""
DROP_SQL = """
DROP TABLE projects;
DROP TABLE components;
DROP TABLE component_type;
"""
|
Add product_number and serial_number identifiers
|
Add product_number and serial_number identifiers
|
Python
|
mit
|
worldcomputerxchange/inventory-control,codeforsanjose/inventory-control
|
4a4a3eed7b959e342e3ff00dfc28f116158839d6
|
tests/test_result.py
|
tests/test_result.py
|
import unittest
from performance_testing.result import Result, File
import os
import shutil
class ResultTestCase(unittest.TestCase):
def setUp(self):
self.current_directory = os.path.dirname(os.path.abspath(__file__))
self.result_directory = os.path.join(self.current_directory, 'assets/test_result')
def test_result_init(self):
if os.path.exists(self.result_directory):
shutil.rmtree(self.result_directory)
self.assertFalse(os.path.exists(self.result_directory))
result = Result(directory=self.result_directory)
self.assertTrue(os.path.exists(self.result_directory))
self.assertTrue(os.path.exists(result.file.path))
|
import unittest
from performance_testing.result import Result, File
import os
import shutil
class ResultTestCase(unittest.TestCase):
def setUp(self):
self.current_directory = os.path.dirname(os.path.abspath(__file__))
self.result_directory = os.path.join(self.current_directory, 'assets/test_result')
def clear_result_dir(self):
if os.path.exists(self.result_directory):
shutil.rmtree(self.result_directory)
def test_result_init(self):
self.clear_result_dir()
self.assertFalse(os.path.exists(self.result_directory))
result = Result(directory=self.result_directory)
self.assertTrue(result.file.path)
def test_file_init(self):
self.clear_result_dir()
file_name = 'foo_bar'
self.assertFalse(os.path.exists(self.result_directory))
file = File(directory=self.result_directory, name=file_name)
self.assertTrue(os.path.exists(self.result_directory))
self.assertTrue(os.path.exists(os.path.join(self.result_directory, file_name)))
def tear_down(self):
self.clear_result_dir()
|
Split up tests for Result and File
|
Split up tests for Result and File
|
Python
|
mit
|
BakeCode/performance-testing,BakeCode/performance-testing
|
a2997b5f76c658ba8ddd933275aa6f37c1bedc50
|
promgen/util.py
|
promgen/util.py
|
# Copyright (c) 2017 LINE Corporation
# These sources are released under the terms of the MIT license: see LICENSE
import requests.sessions
from promgen.version import __version__
def post(url, **kwargs):
with requests.sessions.Session() as session:
session.headers['User-Agent'] = 'promgen/{}'.format(__version__)
return session.post(url, **kwargs)
def get(url, **kwargs):
with requests.sessions.Session() as session:
session.headers['User-Agent'] = 'promgen/{}'.format(__version__)
return session.get(url, **kwargs)
def delete(url, **kwargs):
with requests.sessions.Session() as session:
session.headers['User-Agent'] = 'promgen/{}'.format(__version__)
return session.delete(url, **kwargs)
|
# Copyright (c) 2017 LINE Corporation
# These sources are released under the terms of the MIT license: see LICENSE
import requests.sessions
from promgen.version import __version__
def post(url, *args, **kwargs):
with requests.sessions.Session() as session:
session.headers['User-Agent'] = 'promgen/{}'.format(__version__)
return session.post(url, *args, **kwargs)
def get(url, *args, **kwargs):
with requests.sessions.Session() as session:
session.headers['User-Agent'] = 'promgen/{}'.format(__version__)
return session.get(url, *args, **kwargs)
def delete(url, *args, **kwargs):
with requests.sessions.Session() as session:
session.headers['User-Agent'] = 'promgen/{}'.format(__version__)
return session.delete(url, *args, **kwargs)
|
Make sure we pass *args to the requests session object
|
Make sure we pass *args to the requests session object
|
Python
|
mit
|
kfdm/promgen,kfdm/promgen,kfdm/promgen,kfdm/promgen
|
aaf0d25cae834222f14303f33ab126be7ae29142
|
pambox/intelligibility_models/__init__.py
|
pambox/intelligibility_models/__init__.py
|
import sepsm
import sii
|
"""
The :mod:`pambox.intelligibility_modesl` module gather speech intelligibility
models.
"""
from .mrsepsm import MrSepsm
from .sepsm import Sepsm
from .sii import Sii
__all__ = ['Sepsm',
'MrSepsm',
'Sii']
|
Define __all__ in intelligibility_models package
|
Define __all__ in intelligibility_models package
Define to import all intelligibility models available if one imports
with *. Also, allows to import the models directly from
intelligibility_models, rather than having to import the modules.
|
Python
|
bsd-3-clause
|
achabotl/pambox
|
e90cc22226189b8950957cbf8637e49ee7798c4b
|
django_token/middleware.py
|
django_token/middleware.py
|
from django.http import HttpResponseBadRequest
from django.contrib import auth
class TokenMiddleware(object):
"""
Middleware that authenticates against a token in the http authorization header.
"""
def process_request(self, request):
auth_header = request.META.get('HTTP_AUTHORIZATION', b'').split()
if not auth_header or auth_header[0].lower() != b'token':
return None
# If they specified an invalid token, let them know.
if len(auth_header) != 2:
return HttpResponseBadRequest("Improperly formatted token")
user = auth.authenticate(token=auth_header[1])
if user:
request.user = user
|
from django.http import HttpResponseBadRequest
from django.contrib import auth
class TokenMiddleware(object):
"""
Middleware that authenticates against a token in the http authorization header.
"""
def process_request(self, request):
auth_header = request.META.get('HTTP_AUTHORIZATION', b'').partition(' ')
if auth_header[0].lower() != b'token':
return None
# If they specified an invalid token, let them know.
if not auth_header[2]:
return HttpResponseBadRequest("Improperly formatted token")
user = auth.authenticate(token=auth_header[2])
if user:
request.user = user
|
Use partition instead of split.
|
Use partition instead of split.
|
Python
|
mit
|
jasonbeverage/django-token
|
721be562a175227fa496789e9ce642416c5993b7
|
enactiveagents/controller/controller.py
|
enactiveagents/controller/controller.py
|
"""
Main world controller.
"""
from appstate import AppState
import pygame
import events
class Controller(events.EventListener):
"""
Controller class.
"""
def __init__(self):
pass
def _quit(self):
"""
Gracefully quit the simulator.
"""
quitEvent = events.QuitEvent()
AppState.get_state().get_event_manager().post_event(quitEvent)
def process_input(self):
"""
Process user input.
"""
for event in pygame.event.get():
if event.type == pygame.QUIT:
self._quit()
return
elif event.type == pygame.KEYDOWN:
if event.key == pygame.K_ESCAPE:
self._quit()
return
pygame.M
def notify(self, event):
if isinstance(event, events.TickEvent):
self.process_input()
|
"""
Main world controller.
"""
from appstate import AppState
import pygame
import events
class Controller(events.EventListener):
"""
Controller class.
"""
def __init__(self):
pass
def _quit(self):
"""
Gracefully quit the simulator.
"""
quitEvent = events.QuitEvent()
AppState.get_state().get_event_manager().post_event(quitEvent)
def process_input(self):
"""
Process user input.
"""
for event in pygame.event.get():
if event.type == pygame.QUIT:
self._quit()
return
elif event.type == pygame.KEYDOWN:
if event.key == pygame.K_ESCAPE:
self._quit()
return
def notify(self, event):
if isinstance(event, events.TickEvent):
self.process_input()
|
Fix bug crashing the experiment on a non-recognized keypress.
|
Fix bug crashing the experiment on a non-recognized keypress.
|
Python
|
mit
|
Beskhue/enactive-agents,Beskhue/enactive-agents,Beskhue/enactive-agents
|
53acdb65defa43db67f11a5c5a41c1353e9498f7
|
tests/test__utils.py
|
tests/test__utils.py
|
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
import pytest
import numpy as np
import dask.array as da
import dask.array.utils as dau
import dask_ndfourier._utils
@pytest.mark.parametrize(
"a, s, n, axis", [
(da.ones((3, 4), chunks=(3, 4)), da.ones((2,), chunks=(2,)), -1, -1),
]
)
def test_norm_args(a, s, n, axis):
s2, n2, axis2 = dask_ndfourier._utils._norm_args(a, s, n=n, axis=axis)
assert isinstance(s2, da.Array)
|
Test that `s` as a Dask Array is preserved
|
Test that `s` as a Dask Array is preserved
Ensure that if `s` is a Dask Array, it will still be a Dask Array after
type normalization is done on the input arguments of the Fourier
filters. This allows Fourier filters to construct a computation around
an unknown `s` in addition to an unknown input array.
|
Python
|
bsd-3-clause
|
dask-image/dask-ndfourier
|
a13829a0c2b95773832e68e6f0a1dc661a288ec4
|
tests/test_action.py
|
tests/test_action.py
|
import unittest
from unittest import mock
from action import PrintAction
@mock.patch("builtins.print")
class PrintActionTest(unittest.TestCase):
def test_executing_action_prints_message(self, mock_print):
action = PrintAction()
action.execute("GOOG > $10")
mock_print.assert_called_with("GOOG > $10")
|
import smtplib
import unittest
from unittest import mock
from action import PrintAction, EmailAction
@mock.patch("builtins.print")
class PrintActionTest(unittest.TestCase):
def test_executing_action_prints_message(self, mock_print):
action = PrintAction()
action.execute("GOOG > $10")
mock_print.assert_called_with("GOOG > $10")
@mock.patch("smtplib.SMTP")
class EmailActionTest(unittest.TestCase):
def setUp(self):
self.action = EmailAction(to="bsmukasa@gmail.com")
def test_email_is_sent_to_the_right_server(self, mock_smtp_class):
self.action.execute("MSFT has crossed $10 price level")
mock_smtp_class.assert_called_with("email.stocks.com")
|
Add EmailActionTest class and as well as a test to check if email is sent to the right server.
|
Add EmailActionTest class and as well as a test to check if email is sent to the right server.
|
Python
|
mit
|
bsmukasa/stock_alerter
|
ef27b615702d9ce84db9087898c1f66286e66cf2
|
PRESUBMIT.py
|
PRESUBMIT.py
|
# Copyright (c) 2011 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""Top-level presubmit script for GYP.
See http://dev.chromium.org/developers/how-tos/depottools/presubmit-scripts
for more details about the presubmit API built into gcl.
"""
def CheckChangeOnUpload(input_api, output_api):
report = []
report.extend(input_api.canned_checks.PanProjectChecks(
input_api, output_api))
return report
def CheckChangeOnCommit(input_api, output_api):
report = []
report.extend(input_api.canned_checks.PanProjectChecks(
input_api, output_api))
report.extend(input_api.canned_checks.CheckTreeIsOpen(
input_api, output_api,
'http://gyp-status.appspot.com/status',
'http://gyp-status.appspot.com/current'))
return report
def GetPreferredTrySlaves():
return ['gyp-win32', 'gyp-win64', 'gyp-linux', 'gyp-mac']
|
# Copyright (c) 2011 Google Inc. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""Top-level presubmit script for GYP.
See http://dev.chromium.org/developers/how-tos/depottools/presubmit-scripts
for more details about the presubmit API built into gcl.
"""
def CheckChangeOnUpload(input_api, output_api):
report = []
report.extend(input_api.canned_checks.PanProjectChecks(
input_api, output_api))
return report
def CheckChangeOnCommit(input_api, output_api):
report = []
license = (
r'.*? Copyright \(c\) %(year)s Google Inc\. All rights reserved\.\n'
r'.*? Use of this source code is governed by a BSD-style license that '
r'can be\n'
r'.*? found in the LICENSE file\.\n'
) % {
'year': input_api.time.strftime('%Y'),
}
report.extend(input_api.canned_checks.PanProjectChecks(
input_api, output_api, license_header=license))
report.extend(input_api.canned_checks.CheckTreeIsOpen(
input_api, output_api,
'http://gyp-status.appspot.com/status',
'http://gyp-status.appspot.com/current'))
return report
def GetPreferredTrySlaves():
return ['gyp-win32', 'gyp-win64', 'gyp-linux', 'gyp-mac']
|
Fix the license header regex.
|
Fix the license header regex.
Most of the files are attributed to Google Inc so I used this instead of
Chromium Authors.
R=mark@chromium.org
BUG=
TEST=
Review URL: http://codereview.chromium.org/7108074
|
Python
|
bsd-3-clause
|
csulmone/gyp,csulmone/gyp,csulmone/gyp,csulmone/gyp
|
0819957eda318205e17591dccd81482701eab25c
|
tests/test_sqlite.py
|
tests/test_sqlite.py
|
# This is an example test settings file for use with the Django test suite.
#
# The 'sqlite3' backend requires only the ENGINE setting (an in-
# memory database will be used). All other backends will require a
# NAME and potentially authentication information. See the
# following section in the docs for more information:
#
# https://docs.djangoproject.com/en/dev/internals/contributing/writing-code/unit-tests/
#
# The different databases that Django supports behave differently in certain
# situations, so it is recommended to run the test suite against as many
# database backends as possible. You may want to create a separate settings
# file for each of the backends you test against.
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.sqlite3'
},
'other': {
'ENGINE': 'django.db.backends.sqlite3',
}
}
SECRET_KEY = "django_tests_secret_key"
|
# This is an example test settings file for use with the Django test suite.
#
# The 'sqlite3' backend requires only the ENGINE setting (an in-
# memory database will be used). All other backends will require a
# NAME and potentially authentication information. See the
# following section in the docs for more information:
#
# https://docs.djangoproject.com/en/dev/internals/contributing/writing-code/unit-tests/
#
# The different databases that Django supports behave differently in certain
# situations, so it is recommended to run the test suite against as many
# database backends as possible. You may want to create a separate settings
# file for each of the backends you test against.
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.sqlite3'
},
'other': {
'ENGINE': 'django.db.backends.sqlite3',
}
}
SECRET_KEY = "django_tests_secret_key"
# To speed up tests under SQLite we use the MD5 hasher as the default one.
# This should not be needed under other databases, as the relative speedup
# is only marginal there.
PASSWORD_HASHERS = (
'django.contrib.auth.hashers.MD5PasswordHasher',
)
|
Use faster password hasher in sqlite tests
|
Use faster password hasher in sqlite tests
Fixed #18163
|
Python
|
bsd-3-clause
|
dbaxa/django,gunchleoc/django,varunnaganathan/django,yamila-moreno/django,dracos/django,savoirfairelinux/django,crazy-canux/django,mattseymour/django,charettes/django,MatthewWilkes/django,dsanders11/django,ccn-2m/django,beck/django,dgladkov/django,litchfield/django,MounirMesselmeni/django,jyotsna1820/django,ojake/django,hottwaj/django,irwinlove/django,oscaro/django,aroche/django,neiudemo1/django,ericfc/django,indevgr/django,SoftwareMaven/django,zanderle/django,frishberg/django,delinhabit/django,postrational/django,zulip/django,Beauhurst/django,RevelSystems/django,dracos/django,henryfjordan/django,blueyed/django,WillGuan105/django,wweiradio/django,Vixionar/django,denis-pitul/django,hunter007/django,frdb194/django,poiati/django,deployed/django,extremewaysback/django,leekchan/django_test,kswiat/django,MoritzS/django,Proggie02/TestRepo,lwiecek/django,shacker/django,epandurski/django,deployed/django,alexallah/django,aroche/django,jgoclawski/django,andela-ooladayo/django,syaiful6/django,rockneurotiko/django,wkschwartz/django,django/django,KokareIITP/django,Sonicbids/django,mshafiq9/django,waytai/django,TridevGuha/django,freakboy3742/django,adamchainz/django,wetneb/django,beckastar/django,JavML/django,ar45/django,dursk/django,willhardy/django,rsalmaso/django,YangSongzhou/django,arun6582/django,koniiiik/django,druuu/django,BMJHayward/django,liavkoren/djangoDev,takis/django,spisneha25/django,tbeadle/django,spisneha25/django,blindroot/django,marcelocure/django,jscn/django,pjdelport/django,hobarrera/django,treyhunner/django,dfdx2/django,arun6582/django,archen/django,rsalmaso/django,mcardillo55/django,djbaldey/django,wkschwartz/django,salamer/django,frePPLe/django,mammique/django,leeon/annotated-django,marckuz/django,jhg/django,jenalgit/django,tayfun/django,RevelSystems/django,solarissmoke/django,curtisstpierre/django,dhruvagarwal/django,daniponi/django,ulope/django,hunter007/django,Adnn/django,1013553207/django,divio/django,ivandevp/django,kaedroho/django,ulope/django,Vixionar/django,rapilabs/django,willharris/django,blaze33/django,frdb194/django,zanderle/django,darjeeling/django,benjaminjkraft/django,Y3K/django,spisneha25/django,redhat-openstack/django,willhardy/django,katrid/django,SebasSBM/django,andreif/django,erikr/django,wsmith323/django,kaedroho/django,lsqtongxin/django,jnovinger/django,tysonclugg/django,GhostThrone/django,jaywreddy/django,ivandevp/django,jarshwah/django,aidanlister/django,krisys/django,piquadrat/django,jenalgit/django,zhoulingjun/django,ABaldwinHunter/django-clone-classic,bak1an/django,rynomster/django,tomchristie/django,mojeto/django,sarthakmeh03/django,x111ong/django,xwolf12/django,Adnn/django,tuhangdi/django,elkingtonmcb/django,SebasSBM/django,kangfend/django,petecummings/django,takis/django,savoirfairelinux/django,uranusjr/django,carljm/django,rajsadho/django,avanov/django,rmboggs/django,ojengwa/django-1,RevelSystems/django,pquentin/django,haxoza/django,fenginx/django,archen/django,gannetson/django,frankvdp/django,davidharrigan/django,timgraham/django,apollo13/django,Nepherhotep/django,peterlauri/django,pipermerriam/django,shtouff/django,synasius/django,rockneurotiko/django,NullSoldier/django,kevintaw/django,yakky/django,hackerbot/DjangoDev,shownomercy/django,ebar0n/django,dsanders11/django,IRI-Research/django,JorgeCoock/django,saydulk/django,mitchelljkotler/django,shownomercy/django,cainmatt/django,shacker/django,alexallah/django,matiasb/django,mlavin/django,jallohm/django,megaumi/django,andela-ifageyinbo/django,Argon-Zhou/django,simone/django-gb,MounirMesselmeni/django,sbellem/django,drjeep/django,frankvdp/django,pquentin/django,elijah513/django,zulip/django,RossBrunton/django,payeldillip/django,alilotfi/django,jvkops/django,ericholscher/django,yask123/django,chrisfranzen/django,dbaxa/django,yewang15215/django,b-me/django,h4r5h1t/django-hauthy,marissazhou/django,riteshshrv/django,bitcity/django,rizumu/django,frdb194/django,areski/django,ABaldwinHunter/django-clone,delinhabit/django,Vixionar/django,varunnaganathan/django,mitchelljkotler/django,zhaodelong/django,rmboggs/django,lwiecek/django,DONIKAN/django,runekaagaard/django-contrib-locking,ticosax/django,hcsturix74/django,sjlehtin/django,theo-l/django,etos/django,knifenomad/django,sopier/django,jarshwah/django,kangfend/django,aidanlister/django,sam-tsai/django,aroche/django,indevgr/django,riteshshrv/django,andresgz/django,adrianholovaty/django,b-me/django,ojengwa/django-1,aleida/django,kholidfu/django,kutenai/django,adambrenecki/django,barbuza/django,solarissmoke/django,sopier/django,sarthakmeh03/django,deployed/django,MarcJoan/django,stevenewey/django,asser/django,ccn-2m/django,koniiiik/django,errx/django,pasqualguerrero/django,Argon-Zhou/django,yewang15215/django,mattseymour/django,wsmith323/django,craynot/django,Adnn/django,blighj/django,aleida/django,tysonclugg/django,zanderle/django,jylaxp/django,ArnossArnossi/django,ironbox360/django,vmarkovtsev/django,beni55/django,quamilek/django,kutenai/django,blighj/django,MikeAmy/django,akintoey/django,zedr/django,ryangallen/django,JorgeCoock/django,GitAngel/django,ivandevp/django,Leila20/django,mcrowson/django,weiawe/django,zerc/django,runekaagaard/django-contrib-locking,AlexHill/django,jpic/django,mcardillo55/django,waytai/django,alimony/django,areski/django,oinopion/django,ericholscher/django,varunnaganathan/django,myang321/django,h4r5h1t/django-hauthy,monetate/django,Beeblio/django,BlindHunter/django,takeshineshiro/django,jyotsna1820/django,mjtamlyn/django,eugena/django,darjeeling/django,vitaly4uk/django,z0by/django,ifduyue/django,yograterol/django,mmardini/django,mitar/django,jhg/django,poiati/django,shaib/django,hunter007/django,ericfc/django,stevenewey/django,jallohm/django,MoritzS/django,felixxm/django,avneesh91/django,schinckel/django,blueyed/django,mttr/django,stewartpark/django,gannetson/django,barbuza/django,taaviteska/django,mitya57/django,tayfun/django,sjlehtin/django,indevgr/django,monetate/django,litchfield/django,denys-duchier/django,katrid/django,koordinates/django,djbaldey/django,beni55/django,SoftwareMaven/django,akintoey/django,denis-pitul/django,nealtodd/django,phalt/django,aerophile/django,zsiciarz/django,doismellburning/django,darkryder/django,hnakamur/django,cainmatt/django,hnakamur/django,imtapps/django-imt-fork,twz915/django,elena/django,blindroot/django,vincepandolfo/django,Matt-Deacalion/django,hassanabidpk/django,gengue/django,aerophile/django,abomyi/django,sarvex/django,baylee/django,oscaro/django,sephii/django,zhoulingjun/django,tysonclugg/django,sarvex/django,manhhomienbienthuy/django,piquadrat/django,adamchainz/django,rsalmaso/django,Vixionar/django,cainmatt/django,archen/django,memtoko/django,rrrene/django,kcpawan/django,daniponi/django,jhg/django,scorphus/django,lsqtongxin/django,petecummings/django,myang321/django,neiudemo1/django,mlavin/django,delinhabit/django,erikr/django,huang4fstudio/django,jrrembert/django,ryanahall/django,AlexHill/django,andresgz/django,x111ong/django,HonzaKral/django,WSDC-NITWarangal/django,oscaro/django,chyeh727/django,guettli/django,jylaxp/django,marissazhou/django,dfunckt/django,Argon-Zhou/django,Anonymous-X6/django,tragiclifestories/django,Mixser/django,ebar0n/django,timgraham/django,tuhangdi/django,gdub/django,liavkoren/djangoDev,BlindHunter/django,areski/django,RaoUmer/django,mcella/django,django/django,vsajip/django,ataylor32/django,knifenomad/django,henryfjordan/django,irwinlove/django,hassanabidpk/django,gengue/django,wweiradio/django,rajsadho/django,dwightgunning/django,kangfend/django,labcodes/django,Proggie02/TestRepo,druuu/django,ASCrookes/django,coldmind/django,delhivery/django,dhruvagarwal/django,akintoey/django,tanmaythakur/django,adelton/django,anant-dev/django,gchp/django,nielsvanoch/django,YangSongzhou/django,jejimenez/django,asser/django,ytjiang/django,jvkops/django,xrmx/django,camilonova/django,eugena/django,Sonicbids/django,ASCrookes/django,irwinlove/django,AndrewGrossman/django,mitar/django,henryfjordan/django,ABaldwinHunter/django-clone,NullSoldier/django,extremewaysback/django,jrrembert/django,maxsocl/django,rsvip/Django,andreif/django,DrMeers/django,himleyb85/django,jyotsna1820/django,PolicyStat/django,andela-ifageyinbo/django,knifenomad/django,aroche/django,erikr/django,RevelSystems/django,github-account-because-they-want-it/django,frePPLe/django,robhudson/django,lmorchard/django,mattrobenolt/django,jnovinger/django,liuliwork/django,TimYi/django,hcsturix74/django,ataylor32/django,rsalmaso/django,z0by/django,gohin/django,gunchleoc/django,mmardini/django,MarcJoan/django,liu602348184/django,mcella/django,gcd0318/django,postrational/django,tuhangdi/django,pasqualguerrero/django,zulip/django,jasonwzhy/django,jenalgit/django,timgraham/django,ghickman/django,bobcyw/django,ecederstrand/django,bliti/django-nonrel-1.5,beck/django,apocquet/django,IRI-Research/django,jhoos/django,rmboggs/django,dursk/django,vitaly4uk/django,SebasSBM/django,fenginx/django,payeldillip/django,GitAngel/django,hybrideagle/django,jejimenez/django,ghedsouza/django,ataylor32/django,curtisstpierre/django,mattrobenolt/django,imtapps/django-imt-fork,ghickman/django,benspaulding/django,kevintaw/django,EmadMokhtar/Django,aspidites/django,NullSoldier/django,peterlauri/django,szopu/django,auvipy/django,jn7163/django,dgladkov/django,waytai/django,jscn/django,charettes/django,nielsvanoch/django,haxoza/django,ifduyue/django,TridevGuha/django,jpic/django,theo-l/django,redhat-openstack/django,Matt-Deacalion/django,camilonova/django,ghickman/django,jsoref/django,edmorley/django,salamer/django,fpy171/django,mitchelljkotler/django,chrisfranzen/django,supriyantomaftuh/django,feroda/django,frankvdp/django,denis-pitul/django,felixxm/django,felixjimenez/django,bobcyw/django,gannetson/django,rogerhu/django,edevil/django,edmorley/django,lunafeng/django,MikeAmy/django,github-account-because-they-want-it/django,mcrowson/django,kennethlove/django,BrotherPhil/django,lunafeng/django,EliotBerriot/django,huang4fstudio/django,EliotBerriot/django,yakky/django,asser/django,scorphus/django,stevenewey/django,mitya57/django,sergei-maertens/django,leeon/annotated-django,django-nonrel/django,yask123/django,dfunckt/django,adambrenecki/django,jvkops/django,wsmith323/django,willharris/django,Nepherhotep/django,ryanahall/django,harisibrahimkv/django,mjtamlyn/django,bliti/django-nonrel-1.5,pauloxnet/django,avneesh91/django,beck/django,seanwestfall/django,dwightgunning/django,indevgr/django,mcardillo55/django,jyotsna1820/django,vitan/django,mewtaylor/django,programadorjc/django,apollo13/django,yceruto/django,yewang15215/django,fafaman/django,adelton/django,bobcyw/django,anant-dev/django,liuliwork/django,andresgz/django,neiudemo1/django,divio/django,yograterol/django,vitaly4uk/django,alexallah/django,rajsadho/django,jscn/django,rhertzog/django,ziima/django,bikong2/django,feroda/django,denisenkom/django,gengue/django,djbaldey/django,mitya57/django,ericfc/django,koniiiik/django,sgzsh269/django,Leila20/django,digimarc/django,Beauhurst/django,curtisstpierre/django,taaviteska/django,jeezybrick/django,b-me/django,rmboggs/django,dudepare/django,claudep/django,marctc/django,sam-tsai/django,GaussDing/django,BlindHunter/django,EmadMokhtar/Django,liavkoren/djangoDev,kisna72/django,saydulk/django,yamila-moreno/django,mrfuxi/django,bspink/django,delhivery/django,alimony/django,saydulk/django,pauloxnet/django,rizumu/django,denisenkom/django,coldmind/django,iambibhas/django,petecummings/django,andreif/django,nealtodd/django,filias/django,maxsocl/django,anant-dev/django,matiasb/django,marckuz/django,piquadrat/django,pauloxnet/django,rynomster/django,baylee/django,felixjimenez/django,errx/django,elena/django,ziima/django,AndrewGrossman/django,solarissmoke/django,rrrene/django,MoritzS/django,SebasSBM/django,vsajip/django,jsoref/django,andrewsmedina/django,ptoraskar/django,syaiful6/django,mdj2/django,pauloxnet/django,liu602348184/django,sgzsh269/django,crazy-canux/django,aspidites/django,blueyed/django,kennethlove/django,roselleebarle04/django,dbaxa/django,gdi2290/django,alrifqi/django,mcardillo55/django,mattseymour/django,mitar/django,rockneurotiko/django,liuliwork/django,ghedsouza/django,etos/django,rtindru/django,ojake/django,henryfjordan/django,BrotherPhil/django,syphar/django,WSDC-NITWarangal/django,programadorjc/django,adambrenecki/django,vincepandolfo/django,schinckel/django,caotianwei/django,ghickman/django,phalt/django,jmcarp/django,ajoaoff/django,bspink/django,gdub/django,rizumu/django,tragiclifestories/django,Balachan27/django,denys-duchier/django,BrotherPhil/django,etos/django,solarissmoke/django,rapilabs/django,shownomercy/django,marctc/django,github-account-because-they-want-it/django,ericfc/django,roselleebarle04/django,mojeto/django,duqiao/django,digimarc/django,ccn-2m/django,evansd/django,adamchainz/django,risicle/django,dursk/django,fpy171/django,sbellem/django,gcd0318/django,sephii/django,ghedsouza/django,Matt-Deacalion/django,nju520/django,fafaman/django,craynot/django,zsiciarz/django,aspidites/django,Argon-Zhou/django,rsvip/Django,bitcity/django,gitaarik/django,quamilek/django,ebar0n/django,erikr/django,rwillmer/django,rhertzog/django,intgr/django,gengue/django,frishberg/django,alrifqi/django,pquentin/django,mshafiq9/django,zedr/django,Proggie02/TestRepo,ryangallen/django,alx-eu/django,AltSchool/django,programadorjc/django,twz915/django,postrational/django,Balachan27/django,cobalys/django,pipermerriam/django,rockneurotiko/django,elkingtonmcb/django,synasius/django,mrfuxi/django,z0by/django,adamchainz/django,memtoko/django,rynomster/django,aisipos/django,hybrideagle/django,Yong-Lee/django,TimBuckley/effective_django,divio/django,shaib/django,jnovinger/django,jn7163/django,shaib/django,kutenai/django,MikeAmy/django,frePPLe/django,github-account-because-they-want-it/django,salamer/django,benjaminjkraft/django,duqiao/django,daniponi/django,xrmx/django,vincepandolfo/django,hasadna/django,hottwaj/django,bak1an/django,auready/django,jmcarp/django,krisys/django,alimony/django,lwiecek/django,WillGuan105/django,phalt/django,doismellburning/django,ajaali/django,stewartpark/django,simonw/django,darkryder/django,eyohansa/django,hcsturix74/django,WSDC-NITWarangal/django,joequery/django,TimYi/django,elena/django,akaariai/django,ecederstrand/django,fafaman/django,follow99/django,sadaf2605/django,marissazhou/django,salamer/django,rlugojr/django,jgeskens/django,zhoulingjun/django,willharris/django,jgeskens/django,supriyantomaftuh/django,edevil/django,reinout/django,Yong-Lee/django,Korkki/django,litchfield/django,vmarkovtsev/django,MounirMesselmeni/django,webgeodatavore/django,akaihola/django,loic/django,TridevGuha/django,yceruto/django,peterlauri/django,chrisfranzen/django,scorphus/django,takis/django,tcwicklund/django,ojake/django,matiasb/django,adelton/django,roselleebarle04/django,AndrewGrossman/django,oberlin/django,dgladkov/django,rtindru/django,jaywreddy/django,andela-ifageyinbo/django,ABaldwinHunter/django-clone-classic,jejimenez/django,bak1an/django,joequery/django,andyzsf/django,takis/django,sbellem/django,alx-eu/django,django-nonrel/django,mdj2/django,treyhunner/django,dracos/django,googleinterns/django,karyon/django,kholidfu/django,claudep/django,willhardy/django,dbaxa/django,claudep/django,chyeh727/django,ajaali/django,caotianwei/django,hkchenhongyi/django,abomyi/django,GhostThrone/django,knifenomad/django,blindroot/django,dsanders11/django,dsanders11/django,jgoclawski/django,techdragon/django,alexallah/django,mshafiq9/django,marissazhou/django,double-y/django,koordinates/django,jgoclawski/django,zedr/django,wetneb/django,pelme/django,xwolf12/django,ytjiang/django,extremewaysback/django,digimarc/django,mammique/django,sergei-maertens/django,MarkusH/django,jallohm/django,bitcity/django,dudepare/django,supriyantomaftuh/django,mlavin/django,BlindHunter/django,joakim-hove/django,Endika/django,divio/django,RaoUmer/django,pipermerriam/django,AltSchool/django,raphaelmerx/django,myang321/django,avanov/django,chrisfranzen/django,SujaySKumar/django,mewtaylor/django,gitaarik/django,felixxm/django,RossBrunton/django,fenginx/django,Beeblio/django,hackerbot/DjangoDev,GaussDing/django,WillGuan105/django,jrrembert/django,DrMeers/django,hynekcer/django,donkirkby/django,shtouff/django,elkingtonmcb/django,Sonicbids/django,Leila20/django,auvipy/django,yograterol/django,blighj/django,jdelight/django,ojengwa/django-1,vsajip/django,akintoey/django,rlugojr/django,mattrobenolt/django,gdi2290/django,sam-tsai/django,GaussDing/django,hnakamur/django,taaviteska/django,bliti/django-nonrel-1.5,mitya57/django,guettli/django,nju520/django,shaistaansari/django,apocquet/django,aisipos/django,dydek/django,DasIch/django,robhudson/django,Yong-Lee/django,shaistaansari/django,wweiradio/django,lzw120/django,nhippenmeyer/django,ziima/django,sadaf2605/django,maxsocl/django,gcd0318/django,risicle/django,blighj/django,frdb194/django,benspaulding/django,abomyi/django,codepantry/django,uranusjr/django,lsqtongxin/django,dfunckt/django,follow99/django,t0in4/django,rrrene/django,fpy171/django,evansd/django,HousekeepLtd/django,hobarrera/django,krishna-pandey-git/django,tbeadle/django,jsoref/django,TimYi/django,zerc/django,akshatharaj/django,GitAngel/django,denis-pitul/django,akaariai/django,jhoos/django,rtindru/django,Matt-Deacalion/django,sam-tsai/django,gchp/django,mttr/django,jarshwah/django,mbox/django,akaariai/django,elky/django,haxoza/django,simonw/django,druuu/django,takeshineshiro/django,delinhabit/django,KokareIITP/django,jylaxp/django,mbox/django,ckirby/django,gcd0318/django,katrid/django,eugena/django,hackerbot/DjangoDev,zulip/django,marqueedev/django,kevintaw/django,theo-l/django,weiawe/django,mdj2/django,ajoaoff/django,jasonwzhy/django,rogerhu/django,MounirMesselmeni/django,fpy171/django,tbeadle/django,bak1an/django,ironbox360/django,georgemarshall/django,mlavin/django,loic/django,donkirkby/django,georgemarshall/django,ArnossArnossi/django,jn7163/django,schinckel/django,scorphus/django,feroda/django,bobcyw/django,googleinterns/django,tcwicklund/django,kisna72/django,dex4er/django,EliotBerriot/django,gdub/django,raphaelmerx/django,jnovinger/django,gunchleoc/django,delhivery/django,IRI-Research/django,donkirkby/django,simone/django-gb,quxiaolong1504/django,guettli/django,ar45/django,sdcooke/django,joakim-hove/django,elijah513/django,filias/django,rhertzog/django,filias/django,aidanlister/django,hellhovnd/django,ghedsouza/django,sgzsh269/django,ojengwa/django-1,davgibbs/django,payeldillip/django,redhat-openstack/django,dydek/django,koordinates/django,yigitguler/django,BrotherPhil/django,atul-bhouraskar/django,makinacorpus/django,1013553207/django,denys-duchier/django,frePPLe/django,wetneb/django,kamyu104/django,kosz85/django,follow99/django,whs/django,joakim-hove/django,hynekcer/django,syphar/django,vmarkovtsev/django,dwightgunning/django,akshatharaj/django,hottwaj/django,googleinterns/django,charettes/django,zhaodelong/django,double-y/django,daniponi/django,evansd/django,ticosax/django,dfdx2/django,denisenkom/django,helenst/django,mathspace/django,hybrideagle/django,hkchenhongyi/django,georgemarshall/django,ryanahall/django,avanov/django,tayfun/django,ifduyue/django,ckirby/django,shownomercy/django,gchp/django,Y3K/django,aspidites/django,BMJHayward/django,mathspace/django,dudepare/django,YYWen0o0/python-frame-django,mmardini/django,himleyb85/django,RaoUmer/django,simone/django-gb,joequery/django,mcella/django,claudep/django,SujaySKumar/django,codepantry/django,avanov/django,yamila-moreno/django,seanwestfall/django,ar45/django,mmardini/django,Y3K/django,hkchenhongyi/django,megaumi/django,davgibbs/django,stevenewey/django,ArnossArnossi/django,seocam/django,mrfuxi/django,lsqtongxin/django,extremewaysback/django,EliotBerriot/django,kangfend/django,MatthewWilkes/django,manhhomienbienthuy/django,elijah513/django,webgeodatavore/django,quamilek/django,nju520/django,davidharrigan/django,neiudemo1/django,sephii/django,kcpawan/django,WSDC-NITWarangal/django,sjlehtin/django,megaumi/django,mttr/django,Beauhurst/django,evansd/django,whs/django,kcpawan/django,whs/django,drjeep/django,nealtodd/django,hasadna/django,doismellburning/django,ajoaoff/django,pelme/django,mattseymour/django,tysonclugg/django,hassanabidpk/django,EmadMokhtar/Django,intgr/django,unaizalakain/django,taaviteska/django,TimBuckley/effective_django,dhruvagarwal/django,webgeodatavore/django,jasonbot/django,pasqualguerrero/django,chyeh727/django,ptoraskar/django,Yong-Lee/django,ironbox360/django,tbeadle/django,sdcooke/django,t0in4/django,twz915/django,iambibhas/django,aisipos/django,DONIKAN/django,bikong2/django,yewang15215/django,davgibbs/django,MarkusH/django,pipermerriam/django,ajaali/django,joequery/django,koordinates/django,t0in4/django,django/django,ataylor32/django,rizumu/django,Mixser/django,dydek/django,HonzaKral/django,seocam/django,fenginx/django,digimarc/django,szopu/django,zsiciarz/django,ptoraskar/django,ticosax/django,maxsocl/django,alexmorozov/django,kcpawan/django,atul-bhouraskar/django,benjaminjkraft/django,darkryder/django,georgemarshall/django,drjeep/django,tcwicklund/django,sarvex/django,beck/django,lmorchard/django,akaihola/django,t0in4/django,AndrewGrossman/django,GhostThrone/django,atul-bhouraskar/django,x111ong/django,shaib/django,shaistaansari/django,ticosax/django,liuliwork/django,b-me/django,follow99/django,ckirby/django,x111ong/django,moreati/django,iambibhas/django,kosz85/django,risicle/django,rhertzog/django,dwightgunning/django,oinopion/django,felixxm/django,mjtamlyn/django,hkchenhongyi/django,apocquet/django,poiati/django,hackerbot/DjangoDev,ajoaoff/django,freakboy3742/django,darjeeling/django,labcodes/django,dfdx2/django,ryangallen/django,mrbox/django,krishna-pandey-git/django,ericholscher/django,beckastar/django,denys-duchier/django,tanmaythakur/django,kswiat/django,liu602348184/django,alrifqi/django,dex4er/django,rrrene/django,YangSongzhou/django,mrbox/django,savoirfairelinux/django,sergei-maertens/django,himleyb85/django,megaumi/django,1013553207/django,curtisstpierre/django,ryanahall/django,webgeodatavore/django,alilotfi/django,tcwicklund/django,yigitguler/django,Korkki/django,gunchleoc/django,h4r5h1t/django-hauthy,gchp/django,hobarrera/django,JavML/django,myang321/django,risicle/django,oinopion/django,dfunckt/django,django-nonrel/django,rogerhu/django,imtapps/django-imt-fork,camilonova/django,phalt/django,jasonwzhy/django,apocquet/django,haxoza/django,Anonymous-X6/django,hnakamur/django,tomchristie/django,andela-ifageyinbo/django,lunafeng/django,Beauhurst/django,treyhunner/django,simonw/django,himleyb85/django,marqueedev/django,rwillmer/django,mcella/django,riteshshrv/django,MarcJoan/django,beckastar/django,arun6582/django,baylee/django,ivandevp/django,alexmorozov/django,timgraham/django,alexmorozov/django,bspink/django,hynekcer/django,hellhovnd/django,apollo13/django,jvkops/django,dpetzold/django,YYWen0o0/python-frame-django,TimYi/django,leeon/annotated-django,adrianholovaty/django,peterlauri/django,moreati/django,reinout/django,techdragon/django,apollo13/django,PolicyStat/django,sgzsh269/django,quxiaolong1504/django,zsiciarz/django,mcrowson/django,DasIch/django,guettli/django,sarvex/django,delhivery/django,oberlin/django,ASCrookes/django,robhudson/django,nhippenmeyer/django,kosz85/django,vitan/django,jaywreddy/django,shaistaansari/django,andela-ooladayo/django,DasIch/django,szopu/django,koniiiik/django,jrrembert/django,dursk/django,gohin/django,sjlehtin/django,jpic/django,yask123/django,kutenai/django,quxiaolong1504/django,Nepherhotep/django,huang4fstudio/django,areski/django,bitcity/django,jpic/django,mrbox/django,beckastar/django,loic/django,frishberg/django,rtindru/django,pjdelport/django,redhat-openstack/django,xadahiya/django,jejimenez/django,alilotfi/django,makinacorpus/django,asser/django,hassanabidpk/django,mttr/django,SujaySKumar/django,carljm/django,TimBuckley/effective_django,synasius/django,zhaodelong/django,kamyu104/django,dhruvagarwal/django,cainmatt/django,syaiful6/django,wetneb/django,drjeep/django,kosz85/django,barbuza/django,elky/django,MarkusH/django,mshafiq9/django,huang4fstudio/django,WillGuan105/django,devops2014/djangosite,tomchristie/django,devops2014/djangosite,RossBrunton/django,mrbox/django,marckuz/django,raphaelmerx/django,Endika/django,marcelocure/django,anant-dev/django,spisneha25/django,gohin/django,Korkki/django,lzw120/django,alx-eu/django,moreati/django,zerc/django,chyeh727/django,kennethlove/django,elky/django,mewtaylor/django,ziima/django,oberlin/django,zerc/django,wsmith323/django,nealtodd/django,aidanlister/django,GitAngel/django,druuu/django,benjaminjkraft/django,seocam/django,ptoraskar/django,double-y/django,JorgeCoock/django,crazy-canux/django,andrewsmedina/django,jdelight/django,mjtamlyn/django,rlugojr/django,SujaySKumar/django,alx-eu/django,bspink/django,stewartpark/django,unaizalakain/django,avneesh91/django,tanmaythakur/django,yamila-moreno/django,harisibrahimkv/django,akshatharaj/django,ABaldwinHunter/django-clone-classic,mammique/django,epandurski/django,vmarkovtsev/django,ulope/django,irwinlove/django,karyon/django,xrmx/django,Endika/django,jhoos/django,ebar0n/django,zanderle/django,mathspace/django,ojake/django,AltSchool/django,rapilabs/django,pjdelport/django,sergei-maertens/django,ccn-2m/django,mattrobenolt/django,blaze33/django,DONIKAN/django,pasqualguerrero/django,devops2014/djangosite,rlugojr/django,kisna72/django,DasIch/django,xadahiya/django,JorgeCoock/django,craynot/django,mathspace/django,programadorjc/django,eugena/django,takeshineshiro/django,aerophile/django,arun6582/django,coldmind/django,runekaagaard/django-contrib-locking,weiawe/django,twz915/django,akshatharaj/django,xrmx/django,SoftwareMaven/django,dgladkov/django,intgr/django,Beeblio/django,labcodes/django,AltSchool/django,harisibrahimkv/django,hottwaj/django,jgeskens/django,harisibrahimkv/django,jylaxp/django,techdragon/django,labcodes/django,baylee/django,alilotfi/django,alrifqi/django,simonw/django,darjeeling/django,marqueedev/django,ABaldwinHunter/django-clone-classic,syaiful6/django,BMJHayward/django,marcelocure/django,HonzaKral/django,freakboy3742/django,MatthewWilkes/django,dpetzold/django,reinout/django,lunafeng/django,krisys/django,MarcJoan/django,Balachan27/django,rwillmer/django,mbox/django,synasius/django,nhippenmeyer/django,leekchan/django_test,auready/django,yask123/django,yakky/django,PetrDlouhy/django,PetrDlouhy/django,carljm/django,PolicyStat/django,karyon/django,takeshineshiro/django,dex4er/django,tragiclifestories/django,DrMeers/django,sarthakmeh03/django,davgibbs/django,yceruto/django,willharris/django,varunnaganathan/django,feroda/django,vitan/django,YangSongzhou/django,Endika/django,olasitarska/django,rwillmer/django,aleida/django,karyon/django,manhhomienbienthuy/django,vitaly4uk/django,mewtaylor/django,matiasb/django,jallohm/django,oinopion/django,sdcooke/django,jenalgit/django,krishna-pandey-git/django,etos/django,kholidfu/django,jsoref/django,epandurski/django,schinckel/django,ifduyue/django,Y3K/django,double-y/django,RaoUmer/django,moreati/django,caotianwei/django,saydulk/django,elena/django,frishberg/django,HousekeepLtd/django,monetate/django,elkingtonmcb/django,duqiao/django,shtouff/django,lmorchard/django,hynekcer/django,zhaodelong/django,blaze33/django,sbellem/django,monetate/django,syphar/django,Korkki/django,xwolf12/django,kaedroho/django,mrfuxi/django,cobalys/django,kevintaw/django,vincepandolfo/django,andresgz/django,jgoclawski/django,yograterol/django,marqueedev/django,andela-ooladayo/django,jasonbot/django,shacker/django,dpetzold/django,SoftwareMaven/django,whs/django,gitaarik/django,coldmind/django,hcsturix74/django,alexmorozov/django,kisna72/django,YYWen0o0/python-frame-django,z0by/django,payeldillip/django,tragiclifestories/django,1013553207/django,wweiradio/django,ryangallen/django,nemesisdesign/django,ar45/django,xwolf12/django,benspaulding/django,sadaf2605/django,jasonbot/django,xadahiya/django,zhoulingjun/django,edmorley/django,mitchelljkotler/django,hellhovnd/django,ABaldwinHunter/django-clone,akaihola/django,jasonwzhy/django,MikeAmy/django,mojeto/django,h4r5h1t/django-hauthy,mcrowson/django,tanmaythakur/django,adrianholovaty/django,treyhunner/django,uranusjr/django,andela-ooladayo/django,errx/django,kamyu104/django,beni55/django,KokareIITP/django,GaussDing/django,auvipy/django,nielsvanoch/django,Anonymous-X6/django,wkschwartz/django,sarthakmeh03/django,fafaman/django,googleinterns/django,riteshshrv/django,willhardy/django,rapilabs/django,nemesisdesign/django,jasonbot/django,seanwestfall/django,unaizalakain/django,dydek/django,hasadna/django,piquadrat/django,dudepare/django,lzw120/django,shacker/django,MatthewWilkes/django,ytjiang/django,RossBrunton/django,ecederstrand/django,craynot/django,andreif/django,helenst/django,vitan/django,reinout/django,techdragon/django,gdub/django,Nepherhotep/django,yigitguler/django,oscaro/django,PetrDlouhy/django,Mixser/django,ironbox360/django,roselleebarle04/django,ASCrookes/django,jeezybrick/django,rsvip/Django,krishna-pandey-git/django,rajsadho/django,petecummings/django,HonzaKral/django,lmorchard/django,olasitarska/django,memtoko/django,bikong2/django,crazy-canux/django,leekchan/django_test,abomyi/django,seanwestfall/django,jmcarp/django,felixjimenez/django,dpetzold/django,duqiao/django,nemesisdesign/django,marctc/django,HousekeepLtd/django,Proggie02/TestRepo,sdcooke/django,PetrDlouhy/django,blindroot/django,ytjiang/django,intgr/django,katrid/django,jhg/django,weiawe/django,raphaelmerx/django,nhippenmeyer/django,felixjimenez/django,filias/django,blueyed/django,xadahiya/django,hybrideagle/django,djbaldey/django,ArnossArnossi/django,loic/django,ABaldwinHunter/django-clone,AlexHill/django,tomchristie/django,kswiat/django,gannetson/django,kamyu104/django,waytai/django,carljm/django,edevil/django,marckuz/django,andyzsf/django,tuhangdi/django,gdi2290/django,andyzsf/django,ajaali/django,aerophile/django,sopier/django,elijah513/django,django-nonrel/django,edmorley/django,auvipy/django,JavML/django,camilonova/django,unaizalakain/django,codepantry/django,auready/django,manhhomienbienthuy/django,jeezybrick/django,frankvdp/django,Anonymous-X6/django,bikong2/django,donkirkby/django,wkschwartz/django,robhudson/django,oberlin/django,quxiaolong1504/django,auready/django,ckirby/django,Leila20/django,hunter007/django,cobalys/django,dfdx2/django,poiati/django,codepantry/django,alimony/django,andrewsmedina/django,davidharrigan/django,joakim-hove/django,uranusjr/django,MoritzS/django,tayfun/django,jhoos/django,jn7163/django,ecederstrand/django,savoirfairelinux/django,jscn/django,jmcarp/django,davidharrigan/django,yakky/django,akaariai/django,caotianwei/django,jeezybrick/django,olasitarska/django,helenst/django,jaywreddy/django,MarkusH/django,hobarrera/django,Balachan27/django,Mixser/django,theo-l/django,mojeto/django,darkryder/django,rsvip/Django,sopier/django,eyohansa/django,Beeblio/django,litchfield/django,gitaarik/django,supriyantomaftuh/django,TridevGuha/django,krisys/django,BMJHayward/django,lwiecek/django,dracos/django,barbuza/django,eyohansa/django,NullSoldier/django,aisipos/django,rynomster/django,HousekeepLtd/django,adelton/django,gohin/django,pelme/django,epandurski/django,liu602348184/django,KokareIITP/django,quamilek/django,sadaf2605/django,avneesh91/django,elky/django,hellhovnd/django,eyohansa/django,shtouff/django,beni55/django,DONIKAN/django,nemesisdesign/django,stewartpark/django,Adnn/django,jarshwah/django,makinacorpus/django,nju520/django,jdelight/django,kholidfu/django,jdelight/django,syphar/django,GhostThrone/django,seocam/django,marcelocure/django,atul-bhouraskar/django,JavML/django,marctc/django,charettes/django,django/django
|
43b8e4de31d0659561ffedfeb0ab4a42f035eade
|
dev/test_all.py
|
dev/test_all.py
|
# Copyright 2021 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
"""Runs various tests in the repository."""
import argparse
import subprocess
import repo_util
def main(argv):
root = "//third_party/java_src/j2cl/"
cmd = ["blaze", "test", "--keep_going"]
cmd += [root + t + "/..." for t in argv.test_pattern] or [root + "..."]
cmd += repo_util.create_test_filter(argv.platforms)
subprocess.call(cmd)
def add_arguments(parser):
parser.add_argument(
"test_pattern",
metavar="<root>",
nargs="*",
help="test root(s). e.g. transpiler jre")
def run_for_presubmit():
argv = argparse.Namespace(test_pattern=[])
main(argv)
|
# Copyright 2021 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
"""Runs various tests in the repository."""
import argparse
import subprocess
import repo_util
def main(argv):
root = "//third_party/java_src/j2cl/"
cmd = ["blaze", "test", "--test_tag_filters=-chamber", "--keep_going"]
cmd += [root + t + "/..." for t in argv.test_pattern] or [root + "..."]
cmd += repo_util.create_test_filter(argv.platforms)
subprocess.call(cmd)
def add_arguments(parser):
parser.add_argument(
"test_pattern",
metavar="<root>",
nargs="*",
help="test root(s). e.g. transpiler jre")
def run_for_presubmit():
argv = argparse.Namespace(test_pattern=[])
main(argv)
|
Exclude chamber workflow from targets tested by j2 testall
|
Exclude chamber workflow from targets tested by j2 testall
PiperOrigin-RevId: 384424406
|
Python
|
apache-2.0
|
google/j2cl,google/j2cl,google/j2cl,google/j2cl,google/j2cl
|
a3c3c5f4cbbea80aada1358ca52c698cf13136cc
|
unittests/test_xmp.py
|
unittests/test_xmp.py
|
# Copyright (c) 2017 The Regents of the University of Michigan.
# All Rights Reserved. Licensed according to the terms of the Revised
# BSD License. See LICENSE.txt for details.
from hamcrest import *
import unittest
from .hamcrest import evaluates_to
from blister.xmp import XMP
class XMPTest (unittest.TestCase):
def test_degenerate (self):
xmp = XMP()
assert_that(xmp, evaluates_to(False))
assert_that(xmp, has_length(0))
assert_that(list(xmp), is_(equal_to([])))
def test_not_all_attrs_exist (self):
xmp = XMP()
assert_that(calling(getattr).with_args(xmp, "fake_namespace"),
raises(AttributeError))
assert_that(calling(getattr).with_args(xmp, "also_fake"),
raises(AttributeError))
def test_default_xmp_namespaces_exist (self):
xmp = XMP()
no_error = xmp.stRef
|
# Copyright (c) 2017 The Regents of the University of Michigan.
# All Rights Reserved. Licensed according to the terms of the Revised
# BSD License. See LICENSE.txt for details.
from hamcrest import *
import unittest
from .hamcrest import evaluates_to
from blister.xmp import XMP
class XMPTest (unittest.TestCase):
def setUp (self):
self.xmp = XMP()
def test_degenerate (self):
assert_that(self.xmp, evaluates_to(False))
assert_that(self.xmp, has_length(0))
assert_that(list(self.xmp), is_(equal_to([])))
def test_not_all_attrs_exist (self):
assert_that(calling(getattr).with_args(self.xmp,
"fake_namespace"),
raises(AttributeError))
assert_that(calling(getattr).with_args(self.xmp, "also_fake"),
raises(AttributeError))
def test_default_xmp_namespaces_exist (self):
no_error = self.xmp.stRef
|
Move XMP init into setUp()
|
Move XMP init into setUp()
|
Python
|
bsd-3-clause
|
daaang/blister
|
c5cf8df78106e15a81f976f99d26d361b036318a
|
indra/tools/reading/run_drum_reading.py
|
indra/tools/reading/run_drum_reading.py
|
import sys
import json
from indra.sources.trips.drum_reader import DrumReader
from indra.sources.trips import process_xml
def read_content(content):
sentences = []
for k, v in content.items():
sentences += v
dr = DrumReader(to_read=sentences)
try:
dr.start()
except SystemExit:
pass
statements = []
for extraction in dr.extractions:
statements += process_xml(extraction).statements
return statements
if __name__ == '__main__':
file_name = sys.argv[1]
with open(file_name, 'rt') as fh:
content = json.load(fh)
statements = read_content(content)
print(statements)
|
import sys
import json
import time
import pickle
from indra.sources.trips import process_xml
from indra.sources.trips.drum_reader import DrumReader
def set_pmid(statements, pmid):
for stmt in statements:
for evidence in stmt.evidence:
evidence.pmid = pmid
def read_content(content, host):
all_statements = []
for pmid, sentences in content.items():
print('================================')
print('Processing %d sentences for %s' % (len(sentences), pmid))
ts = time.time()
dr = DrumReader(to_read=sentences, host=host)
try:
dr.start()
except SystemExit:
pass
statements = []
for extraction in dr.extractions:
tp = process_xml(extraction)
statements += tp.statements
set_pmid(statements, pmid)
te = time.time()
print('Reading took %d seconds and produced %d Statements.' %
(te-ts, len(statements)))
all_statements += statements
return all_statements
def save_results(statements, out_fname):
with open(out_fname, 'wb') as fh:
pickle.dump(statements, fh)
if __name__ == '__main__':
host = sys.argv[1]
file_name = sys.argv[2]
with open(file_name, 'rt') as fh:
content = json.load(fh)
statements = read_content(content, host)
save_results(statements, 'results.pkl')
|
Improve batch Drum reading implementation
|
Improve batch Drum reading implementation
|
Python
|
bsd-2-clause
|
bgyori/indra,sorgerlab/indra,johnbachman/belpy,pvtodorov/indra,bgyori/indra,sorgerlab/indra,sorgerlab/indra,johnbachman/belpy,sorgerlab/belpy,johnbachman/indra,pvtodorov/indra,johnbachman/indra,sorgerlab/belpy,pvtodorov/indra,bgyori/indra,pvtodorov/indra,johnbachman/belpy,sorgerlab/belpy,johnbachman/indra
|
9942b7b6e550ec6f76def44a7470f747c47b13a8
|
utils/00-cinspect.py
|
utils/00-cinspect.py
|
""" A startup script for IPython to patch it to 'inspect' using cinspect. """
# Place this file in ~/.ipython/<PROFILE_DIR>/startup to patch your IPython to
# use cinspect for the code inspection.
import inspect
from cinspect import getsource, getfile
import IPython.core.oinspect as OI
from IPython.utils.py3compat import cast_unicode
old_find_file = OI.find_file
old_getsource = inspect.getsource
inspect.getsource = getsource
def patch_find_file(obj):
fname = old_find_file(obj)
if fname is None:
try:
fname = cast_unicode(getfile(obj))
except:
pass
return fname
OI.find_file = patch_find_file
|
""" A startup script for IPython to patch it to 'inspect' using cinspect. """
# Place this file in ~/.ipython/<PROFILE_DIR>/startup to patch your IPython to
# use cinspect for the code inspection.
import inspect
from cinspect import getsource, getfile
import IPython.core.oinspect as OI
from IPython.utils.py3compat import cast_unicode
old_find_file = OI.find_file
old_getsource = inspect.getsource
inspect.getsource = getsource
def patch_find_file(obj):
fname = old_find_file(obj)
if fname is None:
try:
fname = cast_unicode(getfile(obj))
except:
pass
return fname
OI.find_file = patch_find_file
ipy = get_ipython()
old_format = ipy.inspector.format
def c_format(raw, *args, **kwargs):
return raw
def my_format(raw, out = None, scheme = ''):
try:
output = old_format(raw, out, scheme)
except:
output = raw
return output
ipy.inspector.format = my_format
|
Patch the colorized formatter to not break for C modules.
|
Patch the colorized formatter to not break for C modules.
|
Python
|
bsd-3-clause
|
punchagan/cinspect,punchagan/cinspect
|
886539f4bd3d67938f90b6500ee625db470284a2
|
UM/View/CompositePass.py
|
UM/View/CompositePass.py
|
# Copyright (c) 2015 Ultimaker B.V.
# Cura is released under the terms of the AGPLv3 or higher.
from UM.Resources import Resources
from UM.View.RenderPass import RenderPass
from UM.View.GL.OpenGL import OpenGL
class CompositePass(RenderPass):
def __init__(self, name, width, height):
super().__init__(name, width, height)
self._shader = OpenGL.getInstance().createShaderProgram(Resources.getPath(Resources.Shaders, "composite.shader"))
self._gl = OpenGL.getInstance().getBindingsObject()
def setCompositeShader(self, shader):
self._shader = shader
def renderContents(self):
pass
def renderOutput(self):
self._shader.bind()
texture_unit = 0
for render_pass in renderer.getRenderPasses():
self._gl.glActiveTexture(texture_unit)
self._gl.glBindTexture(self._gl.GL_TEXTURE_2D, render_pass.getTextureId())
texture_unit += 1
self._shader.setUniformValue("u_layer_count", texture_unit + 1)
self._shader.setUniformValueArray("u_layers", [range(0, texture_unit)], texture_unit + 1)
self.renderQuad()
self._shader.release()
|
# Copyright (c) 2015 Ultimaker B.V.
# Cura is released under the terms of the AGPLv3 or higher.
from UM.Application import Application
from UM.Resources import Resources
from UM.Math.Matrix import Matrix
from UM.View.RenderPass import RenderPass
from UM.View.GL.OpenGL import OpenGL
class CompositePass(RenderPass):
def __init__(self, width, height):
super().__init__("composite", width, height)
self._shader = OpenGL.getInstance().createShaderProgram(Resources.getPath(Resources.Shaders, "composite.shader"))
self._gl = OpenGL.getInstance().getBindingsObject()
self._renderer = Application.getInstance().getRenderer()
def setCompositeShader(self, shader):
self._shader = shader
def renderContents(self):
pass
def renderOutput(self):
self._shader.bind()
texture_unit = 0
for render_pass in self._renderer.getRenderPasses():
self._gl.glActiveTexture(texture_unit)
self._gl.glBindTexture(self._gl.GL_TEXTURE_2D, render_pass.getTextureId())
texture_unit += 1
self._renderer.renderQuad(self._shader)
for i in range(texture_unit):
self._gl.glActiveTexture(texture_unit)
self._gl.glBindTexture(self._gl.GL_TEXTURE_2D, 0)
self._shader.release()
|
Make basic composite pass work
|
Make basic composite pass work
|
Python
|
agpl-3.0
|
onitake/Uranium,onitake/Uranium
|
a2e4e8593ec4c09d504b74544b134d27d1428ce3
|
emma2/msm/flux/__init__.py
|
emma2/msm/flux/__init__.py
|
from .api import *
|
r"""
===================================================================
flux - Reactive flux an transition pathways (:mod:`emma2.msm.flux`)
===================================================================
.. currentmodule:: emma2.msm.flux
This module contains functions to compute reactive flux networks and
find dominant reaction pathways in such networks.
TPT-object
==========
.. autosummary::
:toctree: generated/
tpt - ReactiveFlux object
Reactive flux
=============
.. autosummary::
:toctree: generated/
flux_matrix - TPT flux network
to_netflux - Netflux from gross flux
flux_production - Net flux-production for all states
flux_producers
flux_consumers
coarsegrain
Reaction rates and fluxes
=========================
.. autosummary::
:toctree: generated/
total_flux
rate
mfpt
Pathway decomposition
=====================
.. autosummary::
:toctree: generated/
pathways
"""
from .api import *
|
Include flux package in doc
|
[msm/flux] Include flux package in doc
|
Python
|
bsd-2-clause
|
arokem/PyEMMA,trendelkampschroer/PyEMMA,trendelkampschroer/PyEMMA,arokem/PyEMMA
|
5ae5c27f69cdfb1c53ada0a2aa90d76c4d3ce421
|
memcached.py
|
memcached.py
|
#!/usr/bin/env python
#
# igcollect - Memcached
#
# Copyright (c) 2016, InnoGames GmbH
#
import telnetlib
import sys
import socket
import time
def main(host='127.0.0.1', port='11211'):
hostname = socket.gethostname().replace('.', '_')
ts = str(int(time.time()))
template = 'servers.' + hostname + '.software.memcached.{1} {2} ' + ts
for line in command(host, port, 'stats').splitlines():
if line.startswith('STAT '):
header, key, value = line.split()
if key.replace('_', '').isalpha() and is_float(value):
print(template.format(hostname, key, value))
def command(host, port, cmd):
"""Write a command to telnet and return the response"""
client = telnetlib.Telnet(host, port)
client.write(cmd + '\n')
return client.read_until('END')
def is_float(value):
try:
float(value)
except ValueError:
return False
else:
return True
if __name__ == '__main__':
main(*sys.argv[1:])
|
#!/usr/bin/env python
#
# igcollect - Memcached
#
# Copyright (c) 2016, InnoGames GmbH
#
import telnetlib
import sys
import socket
import time
import re
def main(host='127.0.0.1', port='11211'):
hostname = socket.gethostname().replace('.', '_')
ts = str(int(time.time()))
template = 'servers.' + hostname + '.software.memcached.{1} {2} ' + ts
pattern = re.compile('STAT \w+ \d+(.\d+)?$')
for line in command(host, port, 'stats').splitlines():
if pattern.match(line):
header, key, value = line.split()
print(template.format(hostname, key, value))
def command(host, port, cmd):
"""Write a command to telnet and return the response"""
client = telnetlib.Telnet(host, port)
client.write(cmd + '\n')
return client.read_until('END')
def is_float(value):
try:
float(value)
except ValueError:
return False
else:
return True
if __name__ == '__main__':
main(*sys.argv[1:])
|
Use regexp for checking the line
|
Use regexp for checking the line
|
Python
|
mit
|
innogames/igcollect
|
9a791b9c5e79011edaa2a9d2f25bf92e0bf17543
|
client/libsinan/version_check_handler.py
|
client/libsinan/version_check_handler.py
|
import libsinan
from libsinan import handler, output, jsax
class VersionCheckTaskHandler(output.SimpleTaskHandler):
def object_end(self):
""" We only get one object per right now so
lets print it out when we get it """
if self.task == "version":
if self.event_type == 'info':
self.version = self.desc
return True
else:
return output.SimpleTaskHandler.object_end(self)
class VersionCheckHandler(handler.Handler):
def handles(self, task):
return task == "version"
def handle(self, largs):
self.do_request(largs, handle)
version = None
def handle(task, conn):
global version
if conn.status == 200:
try:
task_handler = VersionCheckTaskHandler()
jsax.parse(conn, task_handler)
version = task_handler.version
return 0
except ValueError, msg:
print "Got an error back from sinan. Check the logs at ~/.sinan/logs/kernel.log"
else:
return 1
|
import libsinan
from libsinan import handler, output, jsax
class VersionCheckTaskHandler(output.SimpleTaskHandler):
def __init__(self):
output.SimpleTaskHandler.__init__(self)
self.version = None
def object_end(self):
""" We only get one object per right now so
lets print it out when we get it """
if self.task == "version":
if self.event_type == 'info':
self.version = self.desc
return True
else:
return output.SimpleTaskHandler.object_end(self)
class VersionCheckHandler(handler.Handler):
def handles(self, task):
return task == "version"
def handle(self, largs):
self.do_request(largs, handle)
version = None
def handle(task, conn):
global version
if conn.status == 200:
try:
task_handler = VersionCheckTaskHandler()
jsax.parse(conn, task_handler)
version = task_handler.version
return 0
except ValueError, msg:
print "Got an error back from sinan. Check the logs at ~/.sinan/logs/kernel.log"
else:
return 1
|
Make sure version is initialized
|
Make sure version is initialized
|
Python
|
mit
|
erlware-deprecated/sinan,erlware-deprecated/sinan,ericbmerritt/sinan,ericbmerritt/sinan,erlware-deprecated/sinan,ericbmerritt/sinan
|
5abe9a29ae586907304649fe6682e3e8997da310
|
app/views.py
|
app/views.py
|
from index import app
from flask import render_template, request
from config import BASE_URL
from query import get_callout, get_billboard
SHEET_ID = 'tzE2PsqJoWRpENlMr-ZlS8A'
#SHEET_ID = 'tIk5itVcfOHUmakkmpjCcxw' # Demo sheet
#@app.route('/')
#def index():
# page_url = BASE_URL + request.path
# page_title = 'Audio Player'
# stream_name = "My Place"
#
# social = {
# 'title': "VPR Audio Player",
# 'subtitle': "",
# 'img': "static/img/logo/vpr-logo-share.jpg",
# 'description': "Listen to the live streams of VPR News, VPR Classical, the BBC, Jazz24 and My Place.",
# 'twitter_text': "News, Classical, the BBC and more. The VPR Audio Player:",
# 'twitter_hashtag': ""
# }
#
# return render_template('content.html',
# page_title=page_title,
# social=social,
# stream_name=stream_name,
# page_url=page_url)
#
@app.route('/billboard')
def billboard():
billboard = get_billboard(SHEET_ID)
return render_template('billboard.html', billboard=billboard)
@app.route('/callout')
def callout():
callout = get_callout(SHEET_ID)
return render_template('callout.html', callout=callout)
|
from index import app
from flask import render_template, request
from config import BASE_URL
from query import get_callout, get_billboard
SHEET_ID = 'tzE2PsqJoWRpENlMr-ZlS8A'
#SHEET_ID = 'tIk5itVcfOHUmakkmpjCcxw' # Demo sheet
@app.route('/')
def index():
page_url = BASE_URL + request.path
page_title = 'Audio Player'
stream_name = "Replay"
social = {
'title': "VPR Audio Player",
'subtitle': "",
'img': "static/img/logo/vpr-logo-share.jpg",
'description': "Listen to the live streams of VPR News, VPR Classical, the BBC, Jazz24 and My Place.",
'twitter_text': "News, Classical, the BBC and more. The VPR Audio Player:",
'twitter_hashtag': ""
}
return render_template('content.html',
page_title=page_title,
social=social,
stream_name=stream_name,
page_url=page_url)
@app.route('/billboard')
def billboard():
billboard = get_billboard(SHEET_ID)
return render_template('billboard.html', billboard=billboard)
@app.route('/callout')
def callout():
callout = get_callout(SHEET_ID)
return render_template('callout.html', callout=callout)
|
Update stream name to Replay
|
Update stream name to Replay
|
Python
|
apache-2.0
|
vprnet/audio-player,vprnet/audio-player,vprnet/audio-player
|
738b0e1344572d000f51e862000fb719c7035c2c
|
st2reactor/st2reactor/cmd/rulesengine.py
|
st2reactor/st2reactor/cmd/rulesengine.py
|
import os
from oslo.config import cfg
from st2common import log as logging
from st2common.models.db import db_setup
from st2common.models.db import db_teardown
from st2common.constants.logging import DEFAULT_LOGGING_CONF_PATH
from st2reactor.rules import config
from st2reactor.rules import worker
LOG = logging.getLogger('st2reactor.bin.rulesengine')
def _setup():
# Set up logger which logs everything which happens during and before config
# parsing to sys.stdout
logging.setup(DEFAULT_LOGGING_CONF_PATH)
# 1. parse config args
config.parse_args()
# 2. setup logging.
logging.setup(cfg.CONF.rulesengine.logging)
# 3. all other setup which requires config to be parsed and logging to
# be correctly setup.
username = cfg.CONF.database.username if hasattr(cfg.CONF.database, 'username') else None
password = cfg.CONF.database.password if hasattr(cfg.CONF.database, 'password') else None
db_setup(cfg.CONF.database.db_name, cfg.CONF.database.host, cfg.CONF.database.port,
username=username, password=password)
def _teardown():
db_teardown()
def main():
try:
_setup()
return worker.work()
except:
LOG.exception('(PID:%s) RulesEngine quit due to exception.', os.getpid())
return 1
finally:
_teardown()
|
import os
import sys
from oslo.config import cfg
from st2common import log as logging
from st2common.models.db import db_setup
from st2common.models.db import db_teardown
from st2common.constants.logging import DEFAULT_LOGGING_CONF_PATH
from st2reactor.rules import config
from st2reactor.rules import worker
LOG = logging.getLogger('st2reactor.bin.rulesengine')
def _setup():
# Set up logger which logs everything which happens during and before config
# parsing to sys.stdout
logging.setup(DEFAULT_LOGGING_CONF_PATH)
# 1. parse config args
config.parse_args()
# 2. setup logging.
logging.setup(cfg.CONF.rulesengine.logging)
# 3. all other setup which requires config to be parsed and logging to
# be correctly setup.
username = cfg.CONF.database.username if hasattr(cfg.CONF.database, 'username') else None
password = cfg.CONF.database.password if hasattr(cfg.CONF.database, 'password') else None
db_setup(cfg.CONF.database.db_name, cfg.CONF.database.host, cfg.CONF.database.port,
username=username, password=password)
def _teardown():
db_teardown()
def main():
try:
_setup()
return worker.work()
except SystemExit as exit_code:
sys.exit(exit_code)
except:
LOG.exception('(PID:%s) RulesEngine quit due to exception.', os.getpid())
return 1
finally:
_teardown()
|
Fix rules engine version reporting.
|
Fix rules engine version reporting.
|
Python
|
apache-2.0
|
Itxaka/st2,punalpatel/st2,grengojbo/st2,grengojbo/st2,jtopjian/st2,nzlosh/st2,lakshmi-kannan/st2,peak6/st2,jtopjian/st2,peak6/st2,alfasin/st2,jtopjian/st2,Itxaka/st2,Itxaka/st2,pinterb/st2,StackStorm/st2,punalpatel/st2,tonybaloney/st2,punalpatel/st2,pixelrebel/st2,StackStorm/st2,pixelrebel/st2,lakshmi-kannan/st2,StackStorm/st2,lakshmi-kannan/st2,alfasin/st2,grengojbo/st2,emedvedev/st2,emedvedev/st2,dennybaa/st2,Plexxi/st2,Plexxi/st2,dennybaa/st2,pinterb/st2,tonybaloney/st2,nzlosh/st2,armab/st2,armab/st2,alfasin/st2,peak6/st2,pixelrebel/st2,dennybaa/st2,Plexxi/st2,StackStorm/st2,nzlosh/st2,nzlosh/st2,tonybaloney/st2,emedvedev/st2,armab/st2,pinterb/st2,Plexxi/st2
|
77b5680794a7a60dedf687f4a199e48121f96955
|
tests/performance/benchmark_aggregator.py
|
tests/performance/benchmark_aggregator.py
|
"""
Performance tests for the agent/dogstatsd metrics aggregator.
"""
from aggregator import MetricsAggregator
class TestAggregatorPerf(object):
def test_aggregation_performance(self):
ma = MetricsAggregator('my.host')
flush_count = 10
loops_per_flush = 10000
metric_count = 5
for _ in xrange(flush_count):
for i in xrange(loops_per_flush):
# Counters
for j in xrange(metric_count):
ma.submit_packets('counter.%s:%s|c' % (j, i))
ma.submit_packets('gauge.%s:%s|g' % (j, i))
ma.submit_packets('histogram.%s:%s|h' % (j, i))
ma.flush()
if __name__ == '__main__':
t = TestAggregatorPerf()
t.test_aggregation_performance()
|
"""
Performance tests for the agent/dogstatsd metrics aggregator.
"""
from aggregator import MetricsAggregator
class TestAggregatorPerf(object):
def test_aggregation_performance(self):
ma = MetricsAggregator('my.host')
flush_count = 10
loops_per_flush = 10000
metric_count = 5
for _ in xrange(flush_count):
for i in xrange(loops_per_flush):
# Counters
for j in xrange(metric_count):
ma.submit_packets('counter.%s:%s|c' % (j, i))
ma.submit_packets('gauge.%s:%s|g' % (j, i))
ma.submit_packets('histogram.%s:%s|h' % (j, i))
ma.submit_packets('set.%s:%s|s' % (j, 1.0))
ma.flush()
if __name__ == '__main__':
t = TestAggregatorPerf()
t.test_aggregation_performance()
|
Add sets + a float value to the benchmark.
|
Add sets + a float value to the benchmark.
|
Python
|
bsd-3-clause
|
yuecong/dd-agent,darron/dd-agent,oneandoneis2/dd-agent,AniruddhaSAtre/dd-agent,packetloop/dd-agent,remh/dd-agent,guruxu/dd-agent,jyogi/purvar-agent,relateiq/dd-agent,JohnLZeller/dd-agent,citrusleaf/dd-agent,lookout/dd-agent,citrusleaf/dd-agent,zendesk/dd-agent,zendesk/dd-agent,JohnLZeller/dd-agent,oneandoneis2/dd-agent,relateiq/dd-agent,cberry777/dd-agent,zendesk/dd-agent,polynomial/dd-agent,jyogi/purvar-agent,manolama/dd-agent,darron/dd-agent,pfmooney/dd-agent,huhongbo/dd-agent,ess/dd-agent,tebriel/dd-agent,amalakar/dd-agent,guruxu/dd-agent,jvassev/dd-agent,Mashape/dd-agent,takus/dd-agent,Wattpad/dd-agent,jvassev/dd-agent,jraede/dd-agent,PagerDuty/dd-agent,GabrielNicolasAvellaneda/dd-agent,JohnLZeller/dd-agent,mderomph-coolblue/dd-agent,joelvanvelden/dd-agent,truthbk/dd-agent,tebriel/dd-agent,eeroniemi/dd-agent,joelvanvelden/dd-agent,cberry777/dd-agent,AniruddhaSAtre/dd-agent,indeedops/dd-agent,cberry777/dd-agent,pmav99/praktoras,gphat/dd-agent,amalakar/dd-agent,lookout/dd-agent,polynomial/dd-agent,huhongbo/dd-agent,Wattpad/dd-agent,truthbk/dd-agent,remh/dd-agent,pfmooney/dd-agent,takus/dd-agent,jyogi/purvar-agent,gphat/dd-agent,remh/dd-agent,tebriel/dd-agent,darron/dd-agent,amalakar/dd-agent,manolama/dd-agent,jshum/dd-agent,jamesandariese/dd-agent,Mashape/dd-agent,joelvanvelden/dd-agent,urosgruber/dd-agent,jshum/dd-agent,GabrielNicolasAvellaneda/dd-agent,truthbk/dd-agent,brettlangdon/dd-agent,gphat/dd-agent,polynomial/dd-agent,a20012251/dd-agent,darron/dd-agent,citrusleaf/dd-agent,Mashape/dd-agent,citrusleaf/dd-agent,pmav99/praktoras,mderomph-coolblue/dd-agent,benmccann/dd-agent,PagerDuty/dd-agent,cberry777/dd-agent,eeroniemi/dd-agent,brettlangdon/dd-agent,huhongbo/dd-agent,zendesk/dd-agent,eeroniemi/dd-agent,truthbk/dd-agent,packetloop/dd-agent,amalakar/dd-agent,darron/dd-agent,a20012251/dd-agent,jraede/dd-agent,jamesandariese/dd-agent,gphat/dd-agent,mderomph-coolblue/dd-agent,benmccann/dd-agent,a20012251/dd-agent,takus/dd-agent,polynomial/dd-agent,jamesandariese/dd-agent,ess/dd-agent,jraede/dd-agent,c960657/dd-agent,JohnLZeller/dd-agent,AntoCard/powerdns-recursor_check,oneandoneis2/dd-agent,ess/dd-agent,guruxu/dd-agent,indeedops/dd-agent,benmccann/dd-agent,manolama/dd-agent,Wattpad/dd-agent,manolama/dd-agent,a20012251/dd-agent,cberry777/dd-agent,AntoCard/powerdns-recursor_check,c960657/dd-agent,manolama/dd-agent,relateiq/dd-agent,benmccann/dd-agent,jvassev/dd-agent,jshum/dd-agent,jamesandariese/dd-agent,pfmooney/dd-agent,Wattpad/dd-agent,jshum/dd-agent,urosgruber/dd-agent,pmav99/praktoras,joelvanvelden/dd-agent,benmccann/dd-agent,jyogi/purvar-agent,relateiq/dd-agent,Shopify/dd-agent,AntoCard/powerdns-recursor_check,Shopify/dd-agent,AntoCard/powerdns-recursor_check,ess/dd-agent,Mashape/dd-agent,yuecong/dd-agent,jshum/dd-agent,indeedops/dd-agent,GabrielNicolasAvellaneda/dd-agent,gphat/dd-agent,oneandoneis2/dd-agent,brettlangdon/dd-agent,pfmooney/dd-agent,zendesk/dd-agent,brettlangdon/dd-agent,AntoCard/powerdns-recursor_check,c960657/dd-agent,polynomial/dd-agent,pmav99/praktoras,urosgruber/dd-agent,packetloop/dd-agent,oneandoneis2/dd-agent,pfmooney/dd-agent,guruxu/dd-agent,PagerDuty/dd-agent,GabrielNicolasAvellaneda/dd-agent,relateiq/dd-agent,AniruddhaSAtre/dd-agent,huhongbo/dd-agent,jvassev/dd-agent,c960657/dd-agent,GabrielNicolasAvellaneda/dd-agent,packetloop/dd-agent,lookout/dd-agent,tebriel/dd-agent,urosgruber/dd-agent,takus/dd-agent,AniruddhaSAtre/dd-agent,JohnLZeller/dd-agent,Mashape/dd-agent,c960657/dd-agent,jyogi/purvar-agent,citrusleaf/dd-agent,tebriel/dd-agent,yuecong/dd-agent,packetloop/dd-agent,huhongbo/dd-agent,PagerDuty/dd-agent,indeedops/dd-agent,mderomph-coolblue/dd-agent,jraede/dd-agent,indeedops/dd-agent,ess/dd-agent,jvassev/dd-agent,Wattpad/dd-agent,eeroniemi/dd-agent,lookout/dd-agent,Shopify/dd-agent,jraede/dd-agent,guruxu/dd-agent,yuecong/dd-agent,brettlangdon/dd-agent,PagerDuty/dd-agent,jamesandariese/dd-agent,a20012251/dd-agent,amalakar/dd-agent,Shopify/dd-agent,lookout/dd-agent,mderomph-coolblue/dd-agent,joelvanvelden/dd-agent,yuecong/dd-agent,AniruddhaSAtre/dd-agent,urosgruber/dd-agent,remh/dd-agent,pmav99/praktoras,eeroniemi/dd-agent,Shopify/dd-agent,remh/dd-agent,takus/dd-agent,truthbk/dd-agent
|
c9d1a3ad2c3c64f49ec83cf8d09cc6d35915990c
|
airtravel.py
|
airtravel.py
|
"""Model for aircraft flights"""
class Flight:
def __init__(self, number):
if not number[:4].isalpha():
raise ValueError("No airline code in '{}'".format(number))
if not number[:4].isupper():
raise ValueError("Invalid airline code'{}'".format(number))
if not (number[4:].isdigit() and int(number[4:]) <= 999999):
raise ValueError("Invalid route number '{}'".format(number))
self._number = number
def number(self):
return self._number
def airline(self):
return self._number[:4]
class Aircraft:
def __init__(self, registration, model, num_rows, num_seats_per_row):
self._registration = registration
self._model = model
self._num_rows = num_rows
self._num_seats_per_row = num_seats_per_row
def registration(self):
return self._registration
def model(self):
return self._model
def seating_plan(self):
return (range(1, self._num_rows + 1),
"ABCDEFGHJKLMNOP"[:self._num_seats_per_row])
|
"""Model for aircraft flights"""
class Flight:
"""A flight with a specific passenger aircraft."""
def __init__(self, number, aircraft):
if not number[:4].isalpha():
raise ValueError("No airline code in '{}'".format(number))
if not number[:4].isupper():
raise ValueError("Invalid airline code'{}'".format(number))
if not (number[4:].isdigit() and int(number[4:]) <= 999999):
raise ValueError("Invalid route number '{}'".format(number))
self._number = number
self._aircraft = aircraft
rows, seats = self._aircraft.seating_plan()
self._seating = [None] + [{letter: None for letter in seats} for _ in rows]
def number(self):
return self._number
def airline(self):
return self._number[:4]
def aircraft_model(self):
return self._aircraft.model()
class Aircraft:
def __init__(self, registration, model, num_rows, num_seats_per_row):
self._registration = registration
self._model = model
self._num_rows = num_rows
self._num_seats_per_row = num_seats_per_row
def registration(self):
return self._registration
def model(self):
return self._model
def seating_plan(self):
return (range(1, self._num_rows + 1),
"ABCDEFGHJKLMNOP"[:self._num_seats_per_row])
|
Add aircraft and seating arrangement to Flight
|
Add aircraft and seating arrangement to Flight
|
Python
|
mit
|
kentoj/python-fundamentals
|
adcb7af597c77d85eb9234d91e2c0bd8575630e1
|
fcm_django/api/__init__.py
|
fcm_django/api/__init__.py
|
from django.conf import settings
if "tastypie" in settings.INSTALLED_APPS:
# Tastypie resources are importable from the api package level (backwards compatibility)
from .tastypie import APNSDeviceResource, GCMDeviceResource, WNSDeviceResource, APNSDeviceAuthenticatedResource, \
GCMDeviceAuthenticatedResource, WNSDeviceAuthenticatedResource
__all__ = [
"APNSDeviceResource",
"GCMDeviceResource",
"WNSDeviceResource",
"APNSDeviceAuthenticatedResource",
"GCMDeviceAuthenticatedResource",
"WNSDeviceAuthenticatedResource",
]
|
from django.conf import settings
if "tastypie" in settings.INSTALLED_APPS:
# Tastypie resources are importable from the api package level (backwards compatibility)
from .tastypie import APNSDeviceAuthenticatedResource, FCMDeviceResource
__all__ = [
"APNSDeviceAuthenticatedResource",
"FCMDeviceResource",
]
|
Remove references to old resources
|
Remove references to old resources
|
Python
|
mit
|
xtrinch/fcm-django
|
0e5b2af3fe04bd12b95b15215db0416b79c25df6
|
fake_useragent/fake.py
|
fake_useragent/fake.py
|
import os
import random
try:
import json
except ImportError:
import simplejson as json
from fake_useragent import settings
from fake_useragent.build import build_db
class UserAgent(object):
def __init__(self):
super(UserAgent, self).__init__()
# check db json file exists
if not os.path.isfile(settings.DB):
build_db()
# no codecs\with for python 2.5
f = open(settings.DB, 'r')
self.data = json.loads(f.read())
f.close()
def __getattr__(self, attr):
attr = attr.replace(' ', '').replace('_', '').lower()
if attr == 'random':
attr = self.data['randomize'][
str(random.randint(0, self.data['max_random'] - 1))
]
elif attr == 'ie':
attr = 'internetexplorer'
elif attr == 'msie':
attr = 'internetexplorer'
elif attr == 'google':
attr = 'chrome'
elif attr == 'ff':
attr = 'firefox'
return self.data['browsers'][attr][
random.randint(0, settings.BROWSERS_COUNT_LIMIT - 1)
]
|
import os
import random
try:
import json
except ImportError:
import simplejson as json
from fake_useragent import settings
from fake_useragent.build import build_db
class UserAgent(object):
def __init__(self):
super(UserAgent, self).__init__()
# check db json file exists
if not os.path.isfile(settings.DB):
build_db()
# no codecs\with for python 2.5
f = open(settings.DB, 'r')
self.data = json.loads(f.read())
f.close()
def __getattr__(self, attr):
attr = attr.replace(' ', '').replace('_', '').lower()
if attr == 'random':
attr = self.data['randomize'][
str(random.randint(0, self.data['max_random'] - 1))
]
elif attr == 'ie':
attr = 'internetexplorer'
elif attr == 'msie':
attr = 'internetexplorer'
elif attr == 'google':
attr = 'chrome'
elif attr == 'ff':
attr = 'firefox'
try:
return self.data['browsers'][attr][
random.randint(0, settings.BROWSERS_COUNT_LIMIT - 1)
]
except KeyError:
return None
|
Fix non existing useragents shortcut
|
Fix non existing useragents shortcut
|
Python
|
apache-2.0
|
sebalas/fake-useragent,hellysmile/fake-useragent,hellysmile/fake-useragent,hellysmile/fake-useragent,mochawich/fake-useragent
|
13dc6443500d09432c6410b766c5c6eda05fdf7a
|
froide/publicbody/forms.py
|
froide/publicbody/forms.py
|
from django import forms
from django.utils.translation import ugettext_lazy as _
from froide.helper.form_utils import JSONMixin
from .models import PublicBody
from .widgets import PublicBodySelect
class PublicBodyForm(JSONMixin, forms.Form):
publicbody = forms.ModelChoiceField(
queryset=PublicBody.objects.all(),
widget=PublicBodySelect,
label=_("Search for a topic or a public body:")
)
is_multi = False
def as_data(self):
data = super(PublicBodyForm, self).as_data()
if self.is_bound and self.is_valid():
data['cleaned_data'] = self.cleaned_data
return data
def get_publicbodies(self):
if self.is_valid():
return [self.cleaned_data['publicbody']]
return []
class MultiplePublicBodyForm(JSONMixin, forms.Form):
publicbody = forms.ModelMultipleChoiceField(
queryset=PublicBody.objects.all(),
label=_("Search for a topic or a public body:")
)
is_multi = True
def get_publicbodies(self):
if self.is_valid():
return self.cleaned_data['publicbody']
return []
|
from django import forms
from django.utils.translation import ugettext_lazy as _
from froide.helper.form_utils import JSONMixin
from .models import PublicBody
from .widgets import PublicBodySelect
class PublicBodyForm(JSONMixin, forms.Form):
publicbody = forms.ModelChoiceField(
queryset=PublicBody.objects.all(),
widget=PublicBodySelect,
label=_("Search for a topic or a public body:")
)
is_multi = False
def as_data(self):
data = super(PublicBodyForm, self).as_data()
if self.is_bound and self.is_valid():
data['cleaned_data'] = self.cleaned_data
return data
def get_publicbodies(self):
if self.is_valid():
return [self.cleaned_data['publicbody']]
return []
class MultiplePublicBodyForm(PublicBodyForm):
publicbody = forms.ModelMultipleChoiceField(
queryset=PublicBody.objects.all(),
label=_("Search for a topic or a public body:")
)
is_multi = True
def get_publicbodies(self):
if self.is_valid():
return self.cleaned_data['publicbody']
return []
def as_data(self):
data = super(PublicBodyForm, self).as_data()
if self.is_bound and self.is_valid():
data['cleaned_data'] = {
'publicbody': [x.as_data() for x in
self.cleaned_data['publicbody']]
}
return data
|
Add as_data to multiple publicbody form
|
Add as_data to multiple publicbody form
|
Python
|
mit
|
stefanw/froide,fin/froide,stefanw/froide,fin/froide,fin/froide,stefanw/froide,stefanw/froide,fin/froide,stefanw/froide
|
96cbe6cd5b1d86663fe44c7fb4351fdb9bf7b2eb
|
metafunctions/map.py
|
metafunctions/map.py
|
import typing as tp
import itertools
from metafunctions.concurrent import FunctionMerge
from metafunctions.operators import concat
class MergeMap(FunctionMerge):
def __init__(self, function:tp.Callable, merge_function:tp.Callable=concat):
super().__init__(merge_function, (function, ))
def _get_call_iterators(self, args):
'''
Each element in args is an iterable.
'''
args_iter = zip(*args)
# Note that EVERY element in the func iter will be called, so we need to make sure the
# length of our iterator is the same as the shortest iterable we received.
shortest_arg = min(args, key=len)
func_iter = itertools.repeat(self.functions[0], len(shortest_arg))
return args_iter, func_iter
def _call_function(self, f, args:tuple, kwargs:dict):
'''In MergeMap, args will be a single element tuple containing the args for this function.
'''
return f(*args[0], **kwargs)
def __str__(self):
return f'mmap({self.functions[0]!s})'
def __repr__(self):
return f'{self.__class__.__name__}({self.functions[0]}, merge_function={self._merge_func})'
|
import typing as tp
import itertools
from metafunctions.concurrent import FunctionMerge
from metafunctions.operators import concat
class MergeMap(FunctionMerge):
def __init__(self, function:tp.Callable, merge_function:tp.Callable=concat):
'''
MergeMap is a FunctionMerge with only one function. When called, it behaves like the
builtin `map` function and calls its function once per item in the iterable(s) it receives.
'''
super().__init__(merge_function, (function, ))
def _get_call_iterators(self, args):
'''
Each element in args is an iterable.
'''
args_iter = zip(*args)
# Note that EVERY element in the func iter will be called, so we need to make sure the
# length of our iterator is the same as the shortest iterable we received.
shortest_arg = min(args, key=len)
func_iter = itertools.repeat(self.functions[0], len(shortest_arg))
return args_iter, func_iter
def _call_function(self, f, args:tuple, kwargs:dict):
'''In MergeMap, args will be a single element tuple containing the args for this function.
'''
return f(*args[0], **kwargs)
def __str__(self):
return f'mmap({self.functions[0]!s})'
def __repr__(self):
return f'{self.__class__.__name__}({self.functions[0]}, merge_function={self._merge_func})'
|
Add a docstring for MergeMap
|
Add a docstring for MergeMap
|
Python
|
mit
|
ForeverWintr/metafunctions
|
c465b1f0c995ac2cb7c6c8b4ad5f721f800e2864
|
argparams.py
|
argparams.py
|
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""ARG parameters class
"""
from __future__ import print_function, division
class ARGparams(object):
"""Class for ARG model parameters.
Attributes
----------
scale : float
rho : float
delta : float
Methods
-------
convert_to_theta
Convert parameters to the vector
"""
def __init__(self, scale=.001, rho=.9, delta=1.1, theta=None):
"""Initialize the class instance.
"""
if theta:
assert len(theta) == 3, "Wrong number of parameters in theta!"
[scale, rho, delta] = theta
self.scale = scale
self.rho = rho
self.delta = delta
assert scale > 0, "Scale must be greater than zero!"
self.beta = self.rho / self.scale
self.theta = [scale, rho, delta]
def __repr__(self):
"""This is what is shown when you interactively explore the instance.
"""
params = (self.scale, self.rho, self.delta)
string = "scale = %.2f, rho = %.2f, delta = %.2f" % params
return string
def __str__(self):
"""This is what is shown when you print() the instance.
"""
return self.__repr__()
|
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""ARG parameters class
"""
from __future__ import print_function, division
class ARGparams(object):
"""Class for ARG model parameters.
Attributes
----------
scale : float
rho : float
delta : float
beta : float
theta : list
Raises
------
AssertionError
"""
def __init__(self, scale=.001, rho=.9, delta=1.1, theta=None):
"""Initialize the class instance.
"""
if theta:
assert len(theta) == 3, "Wrong number of parameters in theta!"
[scale, rho, delta] = theta
self.scale = scale
self.rho = rho
self.delta = delta
assert scale > 0, "Scale must be greater than zero!"
self.beta = self.rho / self.scale
self.theta = [scale, rho, delta]
def __repr__(self):
"""This is what is shown when you interactively explore the instance.
"""
params = (self.scale, self.rho, self.delta)
string = "scale = %.2f, rho = %.2f, delta = %.2f" % params
return string
def __str__(self):
"""This is what is shown when you print() the instance.
"""
return self.__repr__()
|
Fix incorrect attributes in ARGparams class
|
Fix incorrect attributes in ARGparams class
|
Python
|
mit
|
khrapovs/argamma
|
c2598058722531662aab8831640fc367689d2a43
|
tests/utils/test_process_word_vectors.py
|
tests/utils/test_process_word_vectors.py
|
import inspect
import os
import pytest
import numpy as np
from subprocess import call
from utils.preprocess_text_word_vectors import txtvec2npy
def test_text_word2vec2npy():
# check whether files are present in folder
vectors_name = 'wiki.fiu_vro.vec'
path = os.path.dirname(inspect.getfile(inspect.currentframe()))
if not os.path.exists(path + '/' + vectors_name):
call(["wget https://s3-us-west-1.amazonaws.com/fasttext-vectors/" + vectors_name + " -O " +
path + "/" + vectors_name],
shell=True)
txtvec2npy(path + '/' + vectors_name, './', vectors_name[:-4])
vectors = np.load('./' + vectors_name[:-4] + '.npy').item()
assert len(list(vectors)) == 8769
assert vectors['kihlkunnan'].shape[0] == 300
if __name__ == '__main__':
pytest.main([__file__])
|
import inspect
import os
import pytest
import numpy as np
from subprocess import call
from utils.preprocess_text_word_vectors import txtvec2npy
def test_text_word2vec2npy():
# check whether files are present in folder
vectors_name = 'wiki.fiu_vro.vec'
path = os.path.dirname(inspect.getfile(inspect.currentframe()))
if not os.path.exists(path + '/' + vectors_name):
call(["wget https://dl.fbaipublicfiles.com/fasttext/vectors-wiki/" + vectors_name + " -O " +
path + "/" + vectors_name],
shell=True)
txtvec2npy(path + '/' + vectors_name, './', vectors_name[:-4])
vectors = np.load('./' + vectors_name[:-4] + '.npy').item()
assert len(list(vectors)) == 8769
assert vectors['kihlkunnan'].shape[0] == 300
if __name__ == '__main__':
pytest.main([__file__])
|
Update Fasttext pretrained vectors location
|
Update Fasttext pretrained vectors location
|
Python
|
mit
|
lvapeab/nmt-keras,lvapeab/nmt-keras
|
bca338a0f945e74c97b4d7dd044090ed3b3f5b11
|
aspen/tests/test_restarter.py
|
aspen/tests/test_restarter.py
|
from aspen import restarter
from aspen.tests.fsfix import attach_teardown
class Foo:
pass
def test_startup_basically_works():
website = Foo()
website.changes_kill = True
website.dotaspen = 'bar'
website.root = 'foo'
restarter.startup(website)
expected = []
actual = restarter.extras
assert actual == expected, actual
attach_teardown(globals())
|
from aspen.cli import restarter
from aspen.tests.fsfix import attach_teardown
class Foo:
pass
def test_startup_basically_works():
website = Foo()
website.changes_kill = True
website.dotaspen = 'bar'
website.root = 'foo'
restarter.install(website)
expected = []
actual = restarter.extras
assert actual == expected, actual
attach_teardown(globals())
|
Fix up test for recent changes to restarter.
|
Fix up test for recent changes to restarter.
|
Python
|
mit
|
gratipay/aspen.py,gratipay/aspen.py
|
dd39c73f9044815e82fa950f605b4b929d4f17f5
|
assistscraper/lxml_helpers.py
|
assistscraper/lxml_helpers.py
|
from lxml import html
def document(resource_name):
return html.parse("http://www.assist.org/web-assist/" + resource_name)
# TODO: catch IndexErrors in callers
def find_by_name(tag, name, *, parent):
return parent.xpath('//{tag}[@name="{name}"]'.format(tag=tag,
name=name))[0]
def find_select(name, *, parent):
return find_by_name("select", name, parent=parent)
def option_labels(select):
# Converting to list just because it makes the semantics cleaner, without
# performance impact
return list(select.itertext(tag="option", with_tail=False))
|
from lxml import html
def document(resource_name):
return html.parse("http://www.assist.org/web-assist/" + resource_name)
def find_by_name(tag, name, *, parent):
return parent.find('.//{tag}[@name="{name}"]'.format(tag=tag, name=name))
def find_select(name, *, parent):
return find_by_name("select", name, parent=parent)
def option_labels(select):
# Converting to list just because it makes the semantics cleaner, without
# performance impact
return list(select.itertext(tag="option", with_tail=False))
|
Return None instead of IndexError when there is no match!
|
Return None instead of IndexError when there is no match!
|
Python
|
mit
|
karinassuni/assistscraper
|
68f68a7c29dd49a9306445d02f5a7050aa84259e
|
openacademy/model/openacademy_course.py
|
openacademy/model/openacademy_course.py
|
from openerp import models, fields, api
'''
This module create model of Course
'''
class Course(models.Model):
'''
This class create model of Course
'''
_name = 'openacademy.course' # Model odoo name
name = fields.Char(string ='Title', required=True) # Field reserved to identified name rec
description = fields.Text(string='Description')
responsible_id = fields.Many2one('res.users',
ondelete='set null',
string="Responsible", index=True)
session_ids = fields.One2many(
'openacademy.session', 'course_id', string="Sessions")
_sql_constraints = [
('name_description_check',
'CHECK(name != description)',
"The title of the course should not be the description"),
('name_unique',
'UNIQUE(name)',
"The course title must be unique"),
]
|
from openerp import models, fields, api
'''
This module create model of Course
'''
class Course(models.Model):
'''
This class create model of Course
'''
_name = 'openacademy.course' # Model odoo name
name = fields.Char(string ='Title', required=True) # Field reserved to identified name rec
description = fields.Text(string='Description')
responsible_id = fields.Many2one('res.users',
ondelete='set null',
string="Responsible", index=True)
session_ids = fields.One2many(
'openacademy.session', 'course_id', string="Sessions")
_sql_constraints = [
('name_description_check',
'CHECK(name != description)',
"The title of the course should not be the description"),
('name_unique',
'UNIQUE(name)',
"The course title must be unique"),
]
@api.one # api.one send defaults params: cr, uid, id, context
def copy(self, default=None):
print "estoy pasando por la funcion heredada de copy en cursos"
# default['name'] = self.name + ' (copy)'
copied_count = self.search_count(
[('name', '=like', u"Copy of {}%".format(self.name))])
if not copied_count:
new_name = u"Copy of {}".format(self.name)
else:
new_name = u"Copy of {} ({})".format(self.name, copied_count)
default['name'] = new_name
return super(Course, self).copy(default)
|
Modify copy method into inherit
|
[REF] openacademy: Modify copy method into inherit
|
Python
|
apache-2.0
|
KarenKawaii/openacademy-project
|
6b5e0249374f1adc7e6eafb2e050cd6a2f03d1c9
|
examples/create_repository.py
|
examples/create_repository.py
|
from pyolite import Pyolite
# initial olite object
admin_repository = '~/presslabs/ansible-playbooks/gitolite-admin'
olite = Pyolite(admin_repository=admin_repository)
# create a repo
repo = olite.repos.get_or_create('awesome_name')
repo = olite.repos.get('awesome_name')
repo = olite.repos.create('awesome_name')
# add a new user to repo
repo.users.add('bob', permissions='RW+', path_key='~/.ssh/id_rsa.pub',
raw_key='my-awesome-key')
# add an existing user to repo
repo.users.add('alice')
# show users from repos
print repo.users.all()
# remove user
repo.users.delete('alice')
|
from pyolite import Pyolite
# initial olite object
admin_repository = '~/presslabs/ansible-playbooks/gitolite-admin'
olite = Pyolite(admin_repository=admin_repository)
# create a repo
repo = olite.repos.get_or_create('awesome_name')
repo = olite.repos.get('awesome_name')
repo = olite.repos.create('awesome_name')
# add a new user to repo
bob = repo.users.add('bob', permissions='RW+', key_path='~/.ssh/id_rsa.pub',
key='my-awesome-key')
# add an existing user to repo
repo.users.add('alice', permission='R')
repo.users.modify('alice', permission='W+')
# show users from repos
print repo.users.all()
# remove user
repo.users.delete('alice')
alice = olite.users.get_or_create('alice')
# alice.keys.append('key1')
# alice.repos => list
|
Change the api a little bit
|
Change the api a little bit
|
Python
|
bsd-2-clause
|
shawkinsl/pyolite,PressLabs/pyolite
|
840dce03718947498e72e561e7ddca22c4174915
|
django_olcc/olcc/context_processors.py
|
django_olcc/olcc/context_processors.py
|
from olcc.models import ImportRecord
"""
Inject the last import date into the request context.
"""
def last_updated(request):
record = ImportRecord.objects.latest()
if record:
return {
'last_updated': record.created_at
}
|
from olcc.models import ImportRecord
"""
Inject the last import date into the request context.
"""
def last_updated(request):
try:
return {
'last_updated': ImportRecord.objects.latest().created_at
}
except ImportRecord.DoesNotExist:
pass
|
Fix a DoesNotExist bug in the olcc context processor.
|
Fix a DoesNotExist bug in the olcc context processor.
|
Python
|
mit
|
twaddington/django-olcc,twaddington/django-olcc,twaddington/django-olcc
|
dfce2472c81c84a6e73315f288c41683ede92363
|
pydarkstar/auction/auctionbase.py
|
pydarkstar/auction/auctionbase.py
|
"""
.. moduleauthor:: Adam Gagorik <adam.gagorik@gmail.com>
"""
import pydarkstar.darkobject
import pydarkstar.database
class AuctionBase(pydarkstar.darkobject.DarkObject):
"""
Base class for Auction House objects.
:param db: database object
"""
def __init__(self, db, rollback=True, fail=False, *args, **kwargs):
super(AuctionBase, self).__init__(*args, **kwargs)
assert isinstance(db, pydarkstar.database.Database)
self._rollback = bool(rollback)
self._fail = bool(fail)
self._db = db
@property
def db(self):
return self._db
@property
def rollback(self):
return self._rollback
@rollback.setter
def rollback(self, value):
self._rollback = bool(value)
@property
def fail(self):
return self._fail
@fail.setter
def fail(self, value):
self._fail = bool(value)
if __name__ == '__main__':
pass
|
"""
.. moduleauthor:: Adam Gagorik <adam.gagorik@gmail.com>
"""
import pydarkstar.darkobject
import pydarkstar.database
import contextlib
class AuctionBase(pydarkstar.darkobject.DarkObject):
"""
Base class for Auction House objects.
:param db: database object
"""
def __init__(self, db, rollback=True, fail=False, *args, **kwargs):
super(AuctionBase, self).__init__(*args, **kwargs)
assert isinstance(db, pydarkstar.database.Database)
self._rollback = bool(rollback)
self._fail = bool(fail)
self._db = db
def session(self, *args, **kwargs):
"""
Create database session.
"""
return self._db.session(*args, **kwargs)
@contextlib.contextmanager
def scopped_session(self, **kwargs):
"""
Create scoped database session.
"""
_kwargs = dict(rollback=self.rollback, fail=self.fail)
_kwargs.update(**kwargs)
try:
with self._db.scoped_session(**_kwargs) as session:
yield session
finally:
pass
@property
def db(self):
return self._db
@property
def rollback(self):
return self._rollback
@rollback.setter
def rollback(self, value):
self._rollback = bool(value)
@property
def fail(self):
return self._fail
@fail.setter
def fail(self, value):
self._fail = bool(value)
if __name__ == '__main__':
pass
|
Add session and scoped session to AuctionBase.
|
Add session and scoped session to AuctionBase.
|
Python
|
mit
|
AdamGagorik/pydarkstar,LegionXI/pydarkstar
|
466b8a8fb2bdf7ca8f74316fac3e483c3ba763b5
|
net/data/websocket/protocol-test_wsh.py
|
net/data/websocket/protocol-test_wsh.py
|
# Copyright (c) 2012 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import cgi
from mod_pywebsocket import msgutil
def web_socket_do_extra_handshake(request):
r = request.ws_resource.split('?', 1)
if len(r) == 1:
return
param = cgi.parse_qs(r[1])
if 'protocol' in param:
request.ws_protocol = param['protocol'][0]
def web_socket_transfer_data(request):
msgutil.send_message(request, request.ws_protocol)
|
# Copyright (c) 2012 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import cgi
from mod_pywebsocket import msgutil
def web_socket_do_extra_handshake(request):
r = request.ws_resource.split('?', 1)
if len(r) == 1:
return
param = cgi.parse_qs(r[1])
if 'protocol' in param:
request.ws_protocol = param['protocol'][0]
def web_socket_transfer_data(request):
msgutil.send_message(request, request.ws_protocol)
# Wait for a close message.
unused = request.ws_stream.receive_message()
|
Make Pepper WebSocket UtilityGetProtocol test less flaky by making the wsh wait for close
|
Make Pepper WebSocket UtilityGetProtocol test less flaky by making the wsh wait for close
Attempt to fix the flakiness by making sure the server handler doesn't exit
before the client closes.
BUG=389084
R=jgraettinger,yhirano
Review URL: https://codereview.chromium.org/410383003
git-svn-id: de016e52bd170d2d4f2344f9bf92d50478b649e0@285500 0039d316-1c4b-4281-b951-d872f2087c98
|
Python
|
bsd-3-clause
|
TheTypoMaster/chromium-crosswalk,dednal/chromium.src,Pluto-tv/chromium-crosswalk,M4sse/chromium.src,bright-sparks/chromium-spacewalk,ondra-novak/chromium.src,chuan9/chromium-crosswalk,Jonekee/chromium.src,axinging/chromium-crosswalk,krieger-od/nwjs_chromium.src,chuan9/chromium-crosswalk,PeterWangIntel/chromium-crosswalk,Jonekee/chromium.src,crosswalk-project/chromium-crosswalk-efl,Fireblend/chromium-crosswalk,Fireblend/chromium-crosswalk,dushu1203/chromium.src,chuan9/chromium-crosswalk,krieger-od/nwjs_chromium.src,jaruba/chromium.src,krieger-od/nwjs_chromium.src,markYoungH/chromium.src,bright-sparks/chromium-spacewalk,dednal/chromium.src,Chilledheart/chromium,mohamed--abdel-maksoud/chromium.src,chuan9/chromium-crosswalk,Fireblend/chromium-crosswalk,chuan9/chromium-crosswalk,M4sse/chromium.src,M4sse/chromium.src,M4sse/chromium.src,krieger-od/nwjs_chromium.src,Just-D/chromium-1,markYoungH/chromium.src,markYoungH/chromium.src,ondra-novak/chromium.src,axinging/chromium-crosswalk,dushu1203/chromium.src,jaruba/chromium.src,axinging/chromium-crosswalk,PeterWangIntel/chromium-crosswalk,dushu1203/chromium.src,M4sse/chromium.src,Just-D/chromium-1,axinging/chromium-crosswalk,fujunwei/chromium-crosswalk,dushu1203/chromium.src,PeterWangIntel/chromium-crosswalk,mohamed--abdel-maksoud/chromium.src,bright-sparks/chromium-spacewalk,Pluto-tv/chromium-crosswalk,dednal/chromium.src,Just-D/chromium-1,mohamed--abdel-maksoud/chromium.src,littlstar/chromium.src,Jonekee/chromium.src,dushu1203/chromium.src,bright-sparks/chromium-spacewalk,crosswalk-project/chromium-crosswalk-efl,markYoungH/chromium.src,ltilve/chromium,dednal/chromium.src,Pluto-tv/chromium-crosswalk,mohamed--abdel-maksoud/chromium.src,dednal/chromium.src,PeterWangIntel/chromium-crosswalk,hgl888/chromium-crosswalk,dushu1203/chromium.src,hgl888/chromium-crosswalk,markYoungH/chromium.src,dednal/chromium.src,Fireblend/chromium-crosswalk,jaruba/chromium.src,hgl888/chromium-crosswalk-efl,hgl888/chromium-crosswalk-efl,fujunwei/chromium-crosswalk,dushu1203/chromium.src,littlstar/chromium.src,bright-sparks/chromium-spacewalk,bright-sparks/chromium-spacewalk,axinging/chromium-crosswalk,TheTypoMaster/chromium-crosswalk,krieger-od/nwjs_chromium.src,TheTypoMaster/chromium-crosswalk,Chilledheart/chromium,M4sse/chromium.src,hgl888/chromium-crosswalk-efl,ondra-novak/chromium.src,Jonekee/chromium.src,TheTypoMaster/chromium-crosswalk,ltilve/chromium,chuan9/chromium-crosswalk,krieger-od/nwjs_chromium.src,crosswalk-project/chromium-crosswalk-efl,crosswalk-project/chromium-crosswalk-efl,dushu1203/chromium.src,Chilledheart/chromium,M4sse/chromium.src,Jonekee/chromium.src,crosswalk-project/chromium-crosswalk-efl,krieger-od/nwjs_chromium.src,ondra-novak/chromium.src,Chilledheart/chromium,bright-sparks/chromium-spacewalk,Fireblend/chromium-crosswalk,PeterWangIntel/chromium-crosswalk,hgl888/chromium-crosswalk-efl,krieger-od/nwjs_chromium.src,crosswalk-project/chromium-crosswalk-efl,hgl888/chromium-crosswalk-efl,TheTypoMaster/chromium-crosswalk,Jonekee/chromium.src,Just-D/chromium-1,jaruba/chromium.src,bright-sparks/chromium-spacewalk,Chilledheart/chromium,littlstar/chromium.src,jaruba/chromium.src,mohamed--abdel-maksoud/chromium.src,mohamed--abdel-maksoud/chromium.src,krieger-od/nwjs_chromium.src,fujunwei/chromium-crosswalk,hgl888/chromium-crosswalk,ondra-novak/chromium.src,hgl888/chromium-crosswalk-efl,hgl888/chromium-crosswalk-efl,Fireblend/chromium-crosswalk,axinging/chromium-crosswalk,markYoungH/chromium.src,chuan9/chromium-crosswalk,markYoungH/chromium.src,PeterWangIntel/chromium-crosswalk,axinging/chromium-crosswalk,TheTypoMaster/chromium-crosswalk,hgl888/chromium-crosswalk-efl,Pluto-tv/chromium-crosswalk,ltilve/chromium,Jonekee/chromium.src,hgl888/chromium-crosswalk,hgl888/chromium-crosswalk-efl,Fireblend/chromium-crosswalk,ondra-novak/chromium.src,dednal/chromium.src,ltilve/chromium,fujunwei/chromium-crosswalk,krieger-od/nwjs_chromium.src,M4sse/chromium.src,jaruba/chromium.src,chuan9/chromium-crosswalk,PeterWangIntel/chromium-crosswalk,Chilledheart/chromium,ltilve/chromium,markYoungH/chromium.src,fujunwei/chromium-crosswalk,Chilledheart/chromium,ltilve/chromium,mohamed--abdel-maksoud/chromium.src,jaruba/chromium.src,Jonekee/chromium.src,hgl888/chromium-crosswalk,Pluto-tv/chromium-crosswalk,fujunwei/chromium-crosswalk,ondra-novak/chromium.src,ltilve/chromium,jaruba/chromium.src,littlstar/chromium.src,jaruba/chromium.src,Pluto-tv/chromium-crosswalk,Fireblend/chromium-crosswalk,Chilledheart/chromium,fujunwei/chromium-crosswalk,crosswalk-project/chromium-crosswalk-efl,mohamed--abdel-maksoud/chromium.src,hgl888/chromium-crosswalk,jaruba/chromium.src,dednal/chromium.src,dednal/chromium.src,hgl888/chromium-crosswalk,dushu1203/chromium.src,axinging/chromium-crosswalk,Jonekee/chromium.src,Jonekee/chromium.src,mohamed--abdel-maksoud/chromium.src,TheTypoMaster/chromium-crosswalk,hgl888/chromium-crosswalk,M4sse/chromium.src,crosswalk-project/chromium-crosswalk-efl,dednal/chromium.src,fujunwei/chromium-crosswalk,axinging/chromium-crosswalk,littlstar/chromium.src,bright-sparks/chromium-spacewalk,Fireblend/chromium-crosswalk,PeterWangIntel/chromium-crosswalk,M4sse/chromium.src,ltilve/chromium,ondra-novak/chromium.src,Just-D/chromium-1,PeterWangIntel/chromium-crosswalk,mohamed--abdel-maksoud/chromium.src,Pluto-tv/chromium-crosswalk,ltilve/chromium,axinging/chromium-crosswalk,axinging/chromium-crosswalk,TheTypoMaster/chromium-crosswalk,markYoungH/chromium.src,dushu1203/chromium.src,Just-D/chromium-1,mohamed--abdel-maksoud/chromium.src,markYoungH/chromium.src,Chilledheart/chromium,Pluto-tv/chromium-crosswalk,krieger-od/nwjs_chromium.src,TheTypoMaster/chromium-crosswalk,fujunwei/chromium-crosswalk,hgl888/chromium-crosswalk-efl,chuan9/chromium-crosswalk,dednal/chromium.src,M4sse/chromium.src,crosswalk-project/chromium-crosswalk-efl,jaruba/chromium.src,dushu1203/chromium.src,markYoungH/chromium.src,hgl888/chromium-crosswalk,littlstar/chromium.src,Just-D/chromium-1,littlstar/chromium.src,Just-D/chromium-1,Pluto-tv/chromium-crosswalk,ondra-novak/chromium.src,littlstar/chromium.src,Just-D/chromium-1,Jonekee/chromium.src
|
cd13ddd24df33e3a34cd5fc71c3ad0b352952f8b
|
police_api/exceptions.py
|
police_api/exceptions.py
|
from requests.exceptions import HTTPError
class BaseException(Exception):
pass
class APIError(BaseException, HTTPError):
"""
The API responded with a non-200 status code.
"""
def __init__(self, http_error):
self.message = getattr(http_error, 'message', None)
self.response = getattr(http_error, 'response', None)
class InvalidCategoryException(BaseException):
"""
The requested category was not found, or is unavailable for the given date.
"""
pass
|
from requests.exceptions import HTTPError
class BaseException(Exception):
pass
class APIError(BaseException, HTTPError):
"""
The API responded with a non-200 status code.
"""
def __init__(self, http_error):
self.message = getattr(http_error, 'message', None)
self.response = getattr(http_error, 'response', None)
def __str__(self):
return self.message or '<unknown error code>'
class InvalidCategoryException(BaseException):
"""
The requested category was not found, or is unavailable for the given date.
"""
pass
|
Add __str__ to APIError exception
|
Add __str__ to APIError exception
|
Python
|
mit
|
rkhleics/police-api-client-python
|
f525d04e978c35132db6ff77f455cf22b486482f
|
mod/httpserver.py
|
mod/httpserver.py
|
"""wrap SimpleHTTPServer and prevent Ctrl-C stack trace output"""
import SimpleHTTPServer
import SocketServer
import log
try :
log.colored(log.GREEN, 'serving on http://localhost:8000 (Ctrl-C to quit)')
httpd = SocketServer.TCPServer(('localhost', 8000), SimpleHTTPServer.SimpleHTTPRequestHandler)
httpd.serve_forever()
except KeyboardInterrupt:
log.colored(log.GREEN, '\nhttp server stopped')
exit(0)
|
"""wrap SimpleHTTPServer and prevent Ctrl-C stack trace output"""
import SimpleHTTPServer
import SocketServer
import log
try :
log.colored(log.GREEN, 'serving on http://localhost:8000 (Ctrl-C to quit)')
SocketServer.TCPServer.allow_reuse_address = True
httpd = SocketServer.TCPServer(('localhost', 8000), SimpleHTTPServer.SimpleHTTPRequestHandler)
httpd.serve_forever()
except KeyboardInterrupt:
httpd.shutdown()
httpd.server_close()
log.colored(log.GREEN, '\nhttp server stopped')
exit(0)
|
Allow resuse-addr at http server start
|
Allow resuse-addr at http server start
|
Python
|
mit
|
floooh/fips,floooh/fips,michaKFromParis/fips,floooh/fips,michaKFromParis/fips,anthraxx/fips,mgerhardy/fips,anthraxx/fips,mgerhardy/fips,code-disaster/fips,code-disaster/fips
|
ad6670874f37c52f4a15f30e1ab2682bd81f40f8
|
python/helpers/profiler/yappi_profiler.py
|
python/helpers/profiler/yappi_profiler.py
|
import yappi
class YappiProfile(object):
""" Wrapper class that represents Yappi profiling backend with API matching
the cProfile.
"""
def __init__(self):
self.stats = None
def runcall(self, func, *args, **kw):
self.enable()
try:
return func(*args, **kw)
finally:
self.disable()
def enable(self):
yappi.start()
def disable(self):
yappi.stop()
def create_stats(self):
self.stats = yappi.convert2pstats(yappi.get_func_stats()).stats
def getstats(self):
if self.stats is None:
self.create_stats()
return self.stats
def dump_stats(self, file):
import marshal
f = open(file, 'wb')
marshal.dump(self.getstats(), f)
f.close()
|
import yappi
class YappiProfile(object):
""" Wrapper class that represents Yappi profiling backend with API matching
the cProfile.
"""
def __init__(self):
self.stats = None
def runcall(self, func, *args, **kw):
self.enable()
try:
return func(*args, **kw)
finally:
self.disable()
def enable(self):
yappi.start()
def disable(self):
yappi.stop()
def create_stats(self):
self.stats = yappi.convert2pstats(yappi.get_func_stats()).stats
def getstats(self):
self.create_stats()
return self.stats
def dump_stats(self, file):
import marshal
f = open(file, 'wb')
marshal.dump(self.getstats(), f)
f.close()
|
Fix 2nd and more capturing snapshot (PY-15823).
|
Fix 2nd and more capturing snapshot (PY-15823).
|
Python
|
apache-2.0
|
adedayo/intellij-community,muntasirsyed/intellij-community,da1z/intellij-community,vvv1559/intellij-community,vvv1559/intellij-community,diorcety/intellij-community,da1z/intellij-community,asedunov/intellij-community,akosyakov/intellij-community,fitermay/intellij-community,orekyuu/intellij-community,ThiagoGarciaAlves/intellij-community,idea4bsd/idea4bsd,MER-GROUP/intellij-community,clumsy/intellij-community,fitermay/intellij-community,MichaelNedzelsky/intellij-community,kdwink/intellij-community,fitermay/intellij-community,diorcety/intellij-community,idea4bsd/idea4bsd,hurricup/intellij-community,ThiagoGarciaAlves/intellij-community,xfournet/intellij-community,orekyuu/intellij-community,ryano144/intellij-community,dslomov/intellij-community,suncycheng/intellij-community,mglukhikh/intellij-community,lucafavatella/intellij-community,SerCeMan/intellij-community,allotria/intellij-community,amith01994/intellij-community,nicolargo/intellij-community,ftomassetti/intellij-community,akosyakov/intellij-community,nicolargo/intellij-community,hurricup/intellij-community,amith01994/intellij-community,diorcety/intellij-community,vladmm/intellij-community,Distrotech/intellij-community,salguarnieri/intellij-community,MichaelNedzelsky/intellij-community,fengbaicanhe/intellij-community,xfournet/intellij-community,Distrotech/intellij-community,supersven/intellij-community,supersven/intellij-community,ibinti/intellij-community,petteyg/intellij-community,MER-GROUP/intellij-community,ftomassetti/intellij-community,youdonghai/intellij-community,alphafoobar/intellij-community,gnuhub/intellij-community,asedunov/intellij-community,salguarnieri/intellij-community,fnouama/intellij-community,supersven/intellij-community,asedunov/intellij-community,semonte/intellij-community,wreckJ/intellij-community,signed/intellij-community,adedayo/intellij-community,supersven/intellij-community,alphafoobar/intellij-community,holmes/intellij-community,jagguli/intellij-community,fengbaicanhe/intellij-community,lucafavatella/intellij-community,kdwink/intellij-community,wreckJ/intellij-community,samthor/intellij-community,jagguli/intellij-community,fitermay/intellij-community,youdonghai/intellij-community,alphafoobar/intellij-community,petteyg/intellij-community,caot/intellij-community,hurricup/intellij-community,retomerz/intellij-community,apixandru/intellij-community,allotria/intellij-community,amith01994/intellij-community,idea4bsd/idea4bsd,idea4bsd/idea4bsd,ivan-fedorov/intellij-community,MichaelNedzelsky/intellij-community,lucafavatella/intellij-community,vvv1559/intellij-community,kdwink/intellij-community,kdwink/intellij-community,petteyg/intellij-community,suncycheng/intellij-community,orekyuu/intellij-community,ol-loginov/intellij-community,samthor/intellij-community,SerCeMan/intellij-community,fitermay/intellij-community,michaelgallacher/intellij-community,blademainer/intellij-community,pwoodworth/intellij-community,orekyuu/intellij-community,signed/intellij-community,petteyg/intellij-community,ol-loginov/intellij-community,semonte/intellij-community,da1z/intellij-community,Distrotech/intellij-community,MER-GROUP/intellij-community,izonder/intellij-community,salguarnieri/intellij-community,jagguli/intellij-community,tmpgit/intellij-community,TangHao1987/intellij-community,apixandru/intellij-community,slisson/intellij-community,ryano144/intellij-community,petteyg/intellij-community,allotria/intellij-community,lucafavatella/intellij-community,ryano144/intellij-community,slisson/intellij-community,gnuhub/intellij-community,MichaelNedzelsky/intellij-community,retomerz/intellij-community,orekyuu/intellij-community,Distrotech/intellij-community,ryano144/intellij-community,wreckJ/intellij-community,allotria/intellij-community,lucafavatella/intellij-community,pwoodworth/intellij-community,allotria/intellij-community,idea4bsd/idea4bsd,kdwink/intellij-community,xfournet/intellij-community,holmes/intellij-community,fnouama/intellij-community,fnouama/intellij-community,signed/intellij-community,salguarnieri/intellij-community,kool79/intellij-community,MichaelNedzelsky/intellij-community,kool79/intellij-community,fengbaicanhe/intellij-community,izonder/intellij-community,signed/intellij-community,ftomassetti/intellij-community,samthor/intellij-community,idea4bsd/idea4bsd,asedunov/intellij-community,kool79/intellij-community,petteyg/intellij-community,alphafoobar/intellij-community,da1z/intellij-community,ahb0327/intellij-community,retomerz/intellij-community,muntasirsyed/intellij-community,ryano144/intellij-community,youdonghai/intellij-community,robovm/robovm-studio,diorcety/intellij-community,youdonghai/intellij-community,dslomov/intellij-community,jagguli/intellij-community,salguarnieri/intellij-community,jagguli/intellij-community,retomerz/intellij-community,diorcety/intellij-community,ahb0327/intellij-community,MichaelNedzelsky/intellij-community,wreckJ/intellij-community,diorcety/intellij-community,robovm/robovm-studio,da1z/intellij-community,retomerz/intellij-community,idea4bsd/idea4bsd,alphafoobar/intellij-community,apixandru/intellij-community,diorcety/intellij-community,pwoodworth/intellij-community,caot/intellij-community,diorcety/intellij-community,salguarnieri/intellij-community,asedunov/intellij-community,kool79/intellij-community,samthor/intellij-community,ryano144/intellij-community,petteyg/intellij-community,allotria/intellij-community,lucafavatella/intellij-community,ibinti/intellij-community,youdonghai/intellij-community,MichaelNedzelsky/intellij-community,retomerz/intellij-community,youdonghai/intellij-community,da1z/intellij-community,nicolargo/intellij-community,fengbaicanhe/intellij-community,izonder/intellij-community,samthor/intellij-community,wreckJ/intellij-community,gnuhub/intellij-community,FHannes/intellij-community,akosyakov/intellij-community,idea4bsd/idea4bsd,ivan-fedorov/intellij-community,petteyg/intellij-community,fnouama/intellij-community,ThiagoGarciaAlves/intellij-community,allotria/intellij-community,fengbaicanhe/intellij-community,amith01994/intellij-community,robovm/robovm-studio,youdonghai/intellij-community,izonder/intellij-community,asedunov/intellij-community,nicolargo/intellij-community,izonder/intellij-community,suncycheng/intellij-community,suncycheng/intellij-community,hurricup/intellij-community,Distrotech/intellij-community,ibinti/intellij-community,vvv1559/intellij-community,robovm/robovm-studio,blademainer/intellij-community,semonte/intellij-community,Distrotech/intellij-community,signed/intellij-community,izonder/intellij-community,kool79/intellij-community,lucafavatella/intellij-community,blademainer/intellij-community,holmes/intellij-community,fnouama/intellij-community,Lekanich/intellij-community,SerCeMan/intellij-community,signed/intellij-community,vladmm/intellij-community,ivan-fedorov/intellij-community,kool79/intellij-community,ivan-fedorov/intellij-community,xfournet/intellij-community,gnuhub/intellij-community,izonder/intellij-community,clumsy/intellij-community,ivan-fedorov/intellij-community,kdwink/intellij-community,wreckJ/intellij-community,vvv1559/intellij-community,ahb0327/intellij-community,robovm/robovm-studio,gnuhub/intellij-community,petteyg/intellij-community,pwoodworth/intellij-community,da1z/intellij-community,samthor/intellij-community,supersven/intellij-community,wreckJ/intellij-community,nicolargo/intellij-community,apixandru/intellij-community,slisson/intellij-community,adedayo/intellij-community,da1z/intellij-community,allotria/intellij-community,adedayo/intellij-community,holmes/intellij-community,tmpgit/intellij-community,clumsy/intellij-community,adedayo/intellij-community,Distrotech/intellij-community,Lekanich/intellij-community,ibinti/intellij-community,kdwink/intellij-community,tmpgit/intellij-community,michaelgallacher/intellij-community,gnuhub/intellij-community,hurricup/intellij-community,fitermay/intellij-community,ThiagoGarciaAlves/intellij-community,fitermay/intellij-community,vvv1559/intellij-community,samthor/intellij-community,blademainer/intellij-community,ryano144/intellij-community,fengbaicanhe/intellij-community,supersven/intellij-community,gnuhub/intellij-community,salguarnieri/intellij-community,slisson/intellij-community,samthor/intellij-community,TangHao1987/intellij-community,suncycheng/intellij-community,ahb0327/intellij-community,ivan-fedorov/intellij-community,dslomov/intellij-community,pwoodworth/intellij-community,alphafoobar/intellij-community,Distrotech/intellij-community,alphafoobar/intellij-community,dslomov/intellij-community,vladmm/intellij-community,ahb0327/intellij-community,tmpgit/intellij-community,lucafavatella/intellij-community,nicolargo/intellij-community,signed/intellij-community,Lekanich/intellij-community,SerCeMan/intellij-community,ftomassetti/intellij-community,suncycheng/intellij-community,fengbaicanhe/intellij-community,ol-loginov/intellij-community,retomerz/intellij-community,diorcety/intellij-community,xfournet/intellij-community,orekyuu/intellij-community,mglukhikh/intellij-community,fitermay/intellij-community,semonte/intellij-community,xfournet/intellij-community,robovm/robovm-studio,salguarnieri/intellij-community,ibinti/intellij-community,pwoodworth/intellij-community,fitermay/intellij-community,FHannes/intellij-community,blademainer/intellij-community,signed/intellij-community,caot/intellij-community,slisson/intellij-community,Lekanich/intellij-community,supersven/intellij-community,SerCeMan/intellij-community,xfournet/intellij-community,dslomov/intellij-community,Lekanich/intellij-community,vvv1559/intellij-community,clumsy/intellij-community,da1z/intellij-community,FHannes/intellij-community,ftomassetti/intellij-community,apixandru/intellij-community,amith01994/intellij-community,SerCeMan/intellij-community,muntasirsyed/intellij-community,muntasirsyed/intellij-community,kool79/intellij-community,ibinti/intellij-community,ftomassetti/intellij-community,ThiagoGarciaAlves/intellij-community,fnouama/intellij-community,holmes/intellij-community,caot/intellij-community,allotria/intellij-community,ftomassetti/intellij-community,salguarnieri/intellij-community,MER-GROUP/intellij-community,ivan-fedorov/intellij-community,samthor/intellij-community,ryano144/intellij-community,ivan-fedorov/intellij-community,orekyuu/intellij-community,SerCeMan/intellij-community,FHannes/intellij-community,SerCeMan/intellij-community,gnuhub/intellij-community,michaelgallacher/intellij-community,mglukhikh/intellij-community,robovm/robovm-studio,slisson/intellij-community,ivan-fedorov/intellij-community,suncycheng/intellij-community,fnouama/intellij-community,adedayo/intellij-community,Distrotech/intellij-community,blademainer/intellij-community,FHannes/intellij-community,amith01994/intellij-community,fnouama/intellij-community,dslomov/intellij-community,akosyakov/intellij-community,izonder/intellij-community,Lekanich/intellij-community,muntasirsyed/intellij-community,akosyakov/intellij-community,dslomov/intellij-community,asedunov/intellij-community,fnouama/intellij-community,hurricup/intellij-community,fengbaicanhe/intellij-community,vvv1559/intellij-community,ThiagoGarciaAlves/intellij-community,nicolargo/intellij-community,tmpgit/intellij-community,MichaelNedzelsky/intellij-community,clumsy/intellij-community,ol-loginov/intellij-community,adedayo/intellij-community,holmes/intellij-community,youdonghai/intellij-community,michaelgallacher/intellij-community,MER-GROUP/intellij-community,signed/intellij-community,youdonghai/intellij-community,pwoodworth/intellij-community,ol-loginov/intellij-community,fitermay/intellij-community,caot/intellij-community,TangHao1987/intellij-community,nicolargo/intellij-community,allotria/intellij-community,ivan-fedorov/intellij-community,TangHao1987/intellij-community,da1z/intellij-community,alphafoobar/intellij-community,idea4bsd/idea4bsd,blademainer/intellij-community,nicolargo/intellij-community,caot/intellij-community,blademainer/intellij-community,FHannes/intellij-community,apixandru/intellij-community,petteyg/intellij-community,akosyakov/intellij-community,jagguli/intellij-community,akosyakov/intellij-community,holmes/intellij-community,gnuhub/intellij-community,tmpgit/intellij-community,alphafoobar/intellij-community,blademainer/intellij-community,kdwink/intellij-community,semonte/intellij-community,michaelgallacher/intellij-community,slisson/intellij-community,Lekanich/intellij-community,kool79/intellij-community,clumsy/intellij-community,MER-GROUP/intellij-community,akosyakov/intellij-community,ryano144/intellij-community,allotria/intellij-community,pwoodworth/intellij-community,ibinti/intellij-community,orekyuu/intellij-community,retomerz/intellij-community,ahb0327/intellij-community,vladmm/intellij-community,vladmm/intellij-community,petteyg/intellij-community,signed/intellij-community,semonte/intellij-community,xfournet/intellij-community,kdwink/intellij-community,pwoodworth/intellij-community,izonder/intellij-community,fnouama/intellij-community,supersven/intellij-community,akosyakov/intellij-community,clumsy/intellij-community,lucafavatella/intellij-community,caot/intellij-community,suncycheng/intellij-community,suncycheng/intellij-community,allotria/intellij-community,asedunov/intellij-community,SerCeMan/intellij-community,supersven/intellij-community,muntasirsyed/intellij-community,Lekanich/intellij-community,apixandru/intellij-community,FHannes/intellij-community,youdonghai/intellij-community,hurricup/intellij-community,ibinti/intellij-community,amith01994/intellij-community,semonte/intellij-community,retomerz/intellij-community,holmes/intellij-community,signed/intellij-community,MichaelNedzelsky/intellij-community,Lekanich/intellij-community,vladmm/intellij-community,kdwink/intellij-community,kool79/intellij-community,ol-loginov/intellij-community,vladmm/intellij-community,dslomov/intellij-community,ThiagoGarciaAlves/intellij-community,vvv1559/intellij-community,MichaelNedzelsky/intellij-community,adedayo/intellij-community,semonte/intellij-community,xfournet/intellij-community,dslomov/intellij-community,MER-GROUP/intellij-community,supersven/intellij-community,vladmm/intellij-community,Distrotech/intellij-community,supersven/intellij-community,pwoodworth/intellij-community,fengbaicanhe/intellij-community,gnuhub/intellij-community,diorcety/intellij-community,muntasirsyed/intellij-community,retomerz/intellij-community,fitermay/intellij-community,ibinti/intellij-community,FHannes/intellij-community,fengbaicanhe/intellij-community,jagguli/intellij-community,retomerz/intellij-community,clumsy/intellij-community,vladmm/intellij-community,holmes/intellij-community,michaelgallacher/intellij-community,slisson/intellij-community,tmpgit/intellij-community,dslomov/intellij-community,retomerz/intellij-community,FHannes/intellij-community,hurricup/intellij-community,muntasirsyed/intellij-community,caot/intellij-community,blademainer/intellij-community,MER-GROUP/intellij-community,Lekanich/intellij-community,kool79/intellij-community,orekyuu/intellij-community,TangHao1987/intellij-community,ryano144/intellij-community,youdonghai/intellij-community,kdwink/intellij-community,MER-GROUP/intellij-community,tmpgit/intellij-community,xfournet/intellij-community,ol-loginov/intellij-community,suncycheng/intellij-community,dslomov/intellij-community,akosyakov/intellij-community,SerCeMan/intellij-community,ThiagoGarciaAlves/intellij-community,semonte/intellij-community,semonte/intellij-community,lucafavatella/intellij-community,alphafoobar/intellij-community,orekyuu/intellij-community,ahb0327/intellij-community,nicolargo/intellij-community,dslomov/intellij-community,ivan-fedorov/intellij-community,petteyg/intellij-community,blademainer/intellij-community,tmpgit/intellij-community,supersven/intellij-community,apixandru/intellij-community,slisson/intellij-community,apixandru/intellij-community,michaelgallacher/intellij-community,clumsy/intellij-community,adedayo/intellij-community,ahb0327/intellij-community,ThiagoGarciaAlves/intellij-community,michaelgallacher/intellij-community,retomerz/intellij-community,wreckJ/intellij-community,da1z/intellij-community,slisson/intellij-community,hurricup/intellij-community,robovm/robovm-studio,izonder/intellij-community,ahb0327/intellij-community,fitermay/intellij-community,michaelgallacher/intellij-community,gnuhub/intellij-community,adedayo/intellij-community,robovm/robovm-studio,michaelgallacher/intellij-community,ahb0327/intellij-community,kool79/intellij-community,allotria/intellij-community,robovm/robovm-studio,muntasirsyed/intellij-community,ftomassetti/intellij-community,ThiagoGarciaAlves/intellij-community,ibinti/intellij-community,gnuhub/intellij-community,amith01994/intellij-community,asedunov/intellij-community,mglukhikh/intellij-community,TangHao1987/intellij-community,adedayo/intellij-community,suncycheng/intellij-community,TangHao1987/intellij-community,mglukhikh/intellij-community,robovm/robovm-studio,youdonghai/intellij-community,akosyakov/intellij-community,alphafoobar/intellij-community,jagguli/intellij-community,nicolargo/intellij-community,clumsy/intellij-community,vvv1559/intellij-community,clumsy/intellij-community,adedayo/intellij-community,hurricup/intellij-community,ahb0327/intellij-community,idea4bsd/idea4bsd,wreckJ/intellij-community,nicolargo/intellij-community,michaelgallacher/intellij-community,caot/intellij-community,semonte/intellij-community,TangHao1987/intellij-community,mglukhikh/intellij-community,michaelgallacher/intellij-community,ryano144/intellij-community,clumsy/intellij-community,FHannes/intellij-community,FHannes/intellij-community,vladmm/intellij-community,samthor/intellij-community,salguarnieri/intellij-community,SerCeMan/intellij-community,semonte/intellij-community,vladmm/intellij-community,mglukhikh/intellij-community,mglukhikh/intellij-community,asedunov/intellij-community,ol-loginov/intellij-community,izonder/intellij-community,kool79/intellij-community,hurricup/intellij-community,jagguli/intellij-community,ryano144/intellij-community,MER-GROUP/intellij-community,ibinti/intellij-community,salguarnieri/intellij-community,MER-GROUP/intellij-community,da1z/intellij-community,idea4bsd/idea4bsd,alphafoobar/intellij-community,amith01994/intellij-community,SerCeMan/intellij-community,TangHao1987/intellij-community,mglukhikh/intellij-community,wreckJ/intellij-community,signed/intellij-community,muntasirsyed/intellij-community,xfournet/intellij-community,ol-loginov/intellij-community,orekyuu/intellij-community,mglukhikh/intellij-community,lucafavatella/intellij-community,Lekanich/intellij-community,jagguli/intellij-community,hurricup/intellij-community,Distrotech/intellij-community,MichaelNedzelsky/intellij-community,ftomassetti/intellij-community,da1z/intellij-community,ftomassetti/intellij-community,mglukhikh/intellij-community,kdwink/intellij-community,lucafavatella/intellij-community,FHannes/intellij-community,ibinti/intellij-community,ftomassetti/intellij-community,MichaelNedzelsky/intellij-community,xfournet/intellij-community,FHannes/intellij-community,lucafavatella/intellij-community,hurricup/intellij-community,vvv1559/intellij-community,ThiagoGarciaAlves/intellij-community,muntasirsyed/intellij-community,xfournet/intellij-community,vladmm/intellij-community,tmpgit/intellij-community,amith01994/intellij-community,suncycheng/intellij-community,fnouama/intellij-community,jagguli/intellij-community,holmes/intellij-community,pwoodworth/intellij-community,diorcety/intellij-community,akosyakov/intellij-community,ThiagoGarciaAlves/intellij-community,caot/intellij-community,asedunov/intellij-community,caot/intellij-community,muntasirsyed/intellij-community,idea4bsd/idea4bsd,mglukhikh/intellij-community,apixandru/intellij-community,robovm/robovm-studio,fengbaicanhe/intellij-community,wreckJ/intellij-community,ibinti/intellij-community,Distrotech/intellij-community,asedunov/intellij-community,slisson/intellij-community,izonder/intellij-community,amith01994/intellij-community,fitermay/intellij-community,vvv1559/intellij-community,apixandru/intellij-community,ol-loginov/intellij-community,TangHao1987/intellij-community,ahb0327/intellij-community,caot/intellij-community,ftomassetti/intellij-community,apixandru/intellij-community,fnouama/intellij-community,TangHao1987/intellij-community,tmpgit/intellij-community,pwoodworth/intellij-community,ol-loginov/intellij-community,orekyuu/intellij-community,ol-loginov/intellij-community,samthor/intellij-community,youdonghai/intellij-community,idea4bsd/idea4bsd,slisson/intellij-community,samthor/intellij-community,signed/intellij-community,fengbaicanhe/intellij-community,blademainer/intellij-community,asedunov/intellij-community,mglukhikh/intellij-community,apixandru/intellij-community,holmes/intellij-community,holmes/intellij-community,apixandru/intellij-community,amith01994/intellij-community,tmpgit/intellij-community,semonte/intellij-community,vvv1559/intellij-community,MER-GROUP/intellij-community,jagguli/intellij-community,wreckJ/intellij-community,ivan-fedorov/intellij-community,salguarnieri/intellij-community,diorcety/intellij-community,Lekanich/intellij-community,TangHao1987/intellij-community
|
9c762d01b6dafd48d227c0ef927b844a257ff1b9
|
joommf/energies/test_demag.py
|
joommf/energies/test_demag.py
|
from demag import Demag
def test_demag_mif():
demag = Demag()
mif_string = demag.get_mif()
assert 'Specify Oxs_Demag {}' in mif_string
def test_demag_formatting():
demag = Demag()
mif_string = demag.get_mif()
assert mif_string[0] == 'S'
assert mif_string[-1] == '\n'
assert mif_string[-2] == '\n'
|
from demag import Demag
def test_demag_mif():
demag = Demag()
mif_string = demag.get_mif()
assert 'Specify Oxs_Demag {}' in mif_string
assert demag.__repr__() == "This is the energy class of type Demag"
def test_demag_formatting():
demag = Demag()
mif_string = demag.get_mif()
assert mif_string[0] == 'S'
assert mif_string[-1] == '\n'
assert mif_string[-2] == '\n'
|
Increase test coverage for energy classes
|
Increase test coverage for energy classes
|
Python
|
bsd-2-clause
|
ryanpepper/oommf-python,ryanpepper/oommf-python,fangohr/oommf-python,ryanpepper/oommf-python,fangohr/oommf-python,ryanpepper/oommf-python,fangohr/oommf-python
|
3dce48f228caec9b317f263af3c5e7a71372f0be
|
project/members/tests/test_application.py
|
project/members/tests/test_application.py
|
# -*- coding: utf-8 -*-
import pytest
from members.tests.fixtures.memberlikes import MembershipApplicationFactory
from members.tests.fixtures.types import MemberTypeFactory
from members.models import Member
@pytest.mark.django_db
def test_application_approve():
mtypes = [MemberTypeFactory(label='Normal member')]
application = MembershipApplicationFactory()
email = application.email
application.approve(set_mtypes=mtypes)
Member.objects.get(email=email)
|
# -*- coding: utf-8 -*-
import pytest
from django.core.urlresolvers import reverse
from members.tests.fixtures.memberlikes import MembershipApplicationFactory
from members.tests.fixtures.types import MemberTypeFactory
from members.models import Member
@pytest.mark.django_db
def test_application_approve():
mtypes = [MemberTypeFactory(label='Normal member')]
application = MembershipApplicationFactory()
email = application.email
application.approve(set_mtypes=mtypes)
Member.objects.get(email=email)
@pytest.mark.django_db
def test_get_application_form(client):
response = client.get(reverse('members-apply'))
assert b'Apply for membership' in response.content
|
Test that we can get the application form
|
Test that we can get the application form
|
Python
|
mit
|
hacklab-fi/asylum,HelsinkiHacklab/asylum,rambo/asylum,jautero/asylum,hacklab-fi/asylum,HelsinkiHacklab/asylum,hacklab-fi/asylum,rambo/asylum,rambo/asylum,rambo/asylum,HelsinkiHacklab/asylum,jautero/asylum,hacklab-fi/asylum,jautero/asylum,jautero/asylum,HelsinkiHacklab/asylum
|
a233f685f6cb514420fd534388d51ee92459d886
|
src/diamond/__init__.py
|
src/diamond/__init__.py
|
# coding=utf-8
import os
import sys
import string
import logging
import time
import traceback
import configobj
import socket
import re
import os
import sys
import re
import logging
import time
import datetime
import random
import urllib2
import base64
import csv
import platform
import string
import traceback
import configobj
import socket
from urlparse import urlparse
|
# coding=utf-8
"""
Diamond module init code
"""
import os
import sys
import logging
import time
import traceback
import configobj
import socket
import re
import datetime
import random
import urllib2
import base64
import csv
import platform
from urlparse import urlparse
|
Remove duplicate imports and remove entirly unused string
|
Remove duplicate imports and remove entirly unused string
|
Python
|
mit
|
szibis/Diamond,russss/Diamond,TAKEALOT/Diamond,szibis/Diamond,signalfx/Diamond,dcsquared13/Diamond,python-diamond/Diamond,eMerzh/Diamond-1,jumping/Diamond,codepython/Diamond,socialwareinc/Diamond,actmd/Diamond,cannium/Diamond,Slach/Diamond,eMerzh/Diamond-1,saucelabs/Diamond,zoidbergwill/Diamond,disqus/Diamond,bmhatfield/Diamond,Slach/Diamond,cannium/Diamond,tusharmakkar08/Diamond,actmd/Diamond,saucelabs/Diamond,TAKEALOT/Diamond,jaingaurav/Diamond,MediaMath/Diamond,Ormod/Diamond,TAKEALOT/Diamond,Ssawa/Diamond,Nihn/Diamond-1,timchenxiaoyu/Diamond,bmhatfield/Diamond,mzupan/Diamond,CYBERBUGJR/Diamond,sebbrandt87/Diamond,Basis/Diamond,Netuitive/netuitive-diamond,tellapart/Diamond,gg7/diamond,hvnsweeting/Diamond,skbkontur/Diamond,actmd/Diamond,jriguera/Diamond,MediaMath/Diamond,stuartbfox/Diamond,Precis/Diamond,MichaelDoyle/Diamond,cannium/Diamond,stuartbfox/Diamond,Netuitive/Diamond,TinLe/Diamond,russss/Diamond,CYBERBUGJR/Diamond,dcsquared13/Diamond,TinLe/Diamond,zoidbergwill/Diamond,krbaker/Diamond,Nihn/Diamond-1,signalfx/Diamond,metamx/Diamond,Basis/Diamond,rtoma/Diamond,disqus/Diamond,saucelabs/Diamond,Ormod/Diamond,bmhatfield/Diamond,Ensighten/Diamond,jaingaurav/Diamond,TAKEALOT/Diamond,datafiniti/Diamond,datafiniti/Diamond,sebbrandt87/Diamond,actmd/Diamond,ceph/Diamond,timchenxiaoyu/Diamond,Precis/Diamond,jaingaurav/Diamond,anandbhoraskar/Diamond,Ensighten/Diamond,janisz/Diamond-1,metamx/Diamond,MediaMath/Diamond,acquia/Diamond,CYBERBUGJR/Diamond,Slach/Diamond,thardie/Diamond,signalfx/Diamond,signalfx/Diamond,Precis/Diamond,tusharmakkar08/Diamond,works-mobile/Diamond,tuenti/Diamond,rtoma/Diamond,joel-airspring/Diamond,CYBERBUGJR/Diamond,Ormod/Diamond,codepython/Diamond,joel-airspring/Diamond,Basis/Diamond,krbaker/Diamond,TinLe/Diamond,mfriedenhagen/Diamond,skbkontur/Diamond,eMerzh/Diamond-1,python-diamond/Diamond,krbaker/Diamond,disqus/Diamond,anandbhoraskar/Diamond,rtoma/Diamond,hvnsweeting/Diamond,janisz/Diamond-1,skbkontur/Diamond,hvnsweeting/Diamond,tuenti/Diamond,hamelg/Diamond,szibis/Diamond,stuartbfox/Diamond,janisz/Diamond-1,rtoma/Diamond,dcsquared13/Diamond,socialwareinc/Diamond,timchenxiaoyu/Diamond,sebbrandt87/Diamond,sebbrandt87/Diamond,acquia/Diamond,krbaker/Diamond,EzyInsights/Diamond,anandbhoraskar/Diamond,jumping/Diamond,tellapart/Diamond,EzyInsights/Diamond,thardie/Diamond,gg7/diamond,cannium/Diamond,Nihn/Diamond-1,socialwareinc/Diamond,Slach/Diamond,Basis/Diamond,skbkontur/Diamond,Ensighten/Diamond,janisz/Diamond-1,EzyInsights/Diamond,python-diamond/Diamond,codepython/Diamond,Clever/Diamond,hvnsweeting/Diamond,Ssawa/Diamond,ramjothikumar/Diamond,saucelabs/Diamond,EzyInsights/Diamond,Netuitive/netuitive-diamond,Netuitive/netuitive-diamond,szibis/Diamond,socialwareinc/Diamond,joel-airspring/Diamond,Ssawa/Diamond,gg7/diamond,Ensighten/Diamond,Clever/Diamond,h00dy/Diamond,gg7/diamond,MichaelDoyle/Diamond,bmhatfield/Diamond,Netuitive/netuitive-diamond,Precis/Diamond,joel-airspring/Diamond,ramjothikumar/Diamond,Netuitive/Diamond,MichaelDoyle/Diamond,timchenxiaoyu/Diamond,mfriedenhagen/Diamond,mzupan/Diamond,anandbhoraskar/Diamond,tellapart/Diamond,ramjothikumar/Diamond,datafiniti/Diamond,hamelg/Diamond,ramjothikumar/Diamond,codepython/Diamond,thardie/Diamond,jriguera/Diamond,h00dy/Diamond,h00dy/Diamond,jriguera/Diamond,Clever/Diamond,russss/Diamond,hamelg/Diamond,zoidbergwill/Diamond,mfriedenhagen/Diamond,jaingaurav/Diamond,hamelg/Diamond,Ssawa/Diamond,thardie/Diamond,mzupan/Diamond,tellapart/Diamond,ceph/Diamond,zoidbergwill/Diamond,datafiniti/Diamond,works-mobile/Diamond,Nihn/Diamond-1,tuenti/Diamond,acquia/Diamond,tusharmakkar08/Diamond,h00dy/Diamond,TinLe/Diamond,jriguera/Diamond,tuenti/Diamond,jumping/Diamond,Netuitive/Diamond,eMerzh/Diamond-1,works-mobile/Diamond,ceph/Diamond,MichaelDoyle/Diamond,Ormod/Diamond,jumping/Diamond,tusharmakkar08/Diamond,dcsquared13/Diamond,Clever/Diamond,ceph/Diamond,stuartbfox/Diamond,acquia/Diamond,works-mobile/Diamond,mfriedenhagen/Diamond,Netuitive/Diamond,metamx/Diamond,russss/Diamond,MediaMath/Diamond,mzupan/Diamond
|
6a08dc8ae70ebb7d759514991033a54e35ef0a93
|
bin/desi_make_bricks.py
|
bin/desi_make_bricks.py
|
#!/usr/bin/env python
#
# See top-level LICENSE file for Copyright information
#
# -*- coding: utf-8 -*-
import argparse
import desispec.io
def main():
parser = argparse.ArgumentParser(formatter_class=argparse.ArgumentDefaultsHelpFormatter)
parser.add_argument('--fibermap', default = None, metavar = 'FILE',
help = 'Filename containing fibermap to read.')
args = parser.parse_args()
if args.fibermap is None:
print 'Missing required fibermap argument.'
return -1
fibermap,hdr = desispec.io.read_fibermap(args.fibermap)
print fibermap.dtype
if __name__ == '__main__':
main()
|
#!/usr/bin/env python
#
# See top-level LICENSE file for Copyright information
#
# -*- coding: utf-8 -*-
import argparse
import os.path
import glob
import desispec.io
def main():
parser = argparse.ArgumentParser(formatter_class=argparse.ArgumentDefaultsHelpFormatter)
parser.add_argument('--verbose', action = 'store_true',
help = 'Provide verbose reporting of progress.')
parser.add_argument('--night', default = None, metavar = 'YYYYMMDD',
help = 'Night to process in the format YYYYMMDD')
args = parser.parse_args()
if args.night is None:
print 'Missing required night argument.'
return -1
try:
# Loop over exposures available for this night.
for exposure in desispec.io.get_exposures(args.night):
# Ignore exposures with no fibermap, assuming they are calibration data.
fibermap_path = desispec.io.findfile(filetype = 'fibermap', night = args.night,
expid = exposure)
print fibermap_path
if not os.path.exists(fibermap_path):
if args.verbose:
print 'Skipping exposure %d with no fibermap.' % exposure
continue
# Open the fibermap.
fibermap_data,fibermap_hdr = desispec.io.read_fibermap(fibermap_path)
print fibermap_data.dtype
# Look for cframes associated with this exposure.
cframe_path = desispec.io.findfile(filetype = 'cframe',night = args.night,
expid = exposure, camera = '*')
for entry in glob.glob(cframe_path):
print entry
except RuntimeError,e:
print str(e)
return -2
if __name__ == '__main__':
main()
|
Update brick maker to use new meta functionality
|
Update brick maker to use new meta functionality
|
Python
|
bsd-3-clause
|
profxj/desispec,timahutchinson/desispec,profxj/desispec,gdhungana/desispec,desihub/desispec,gdhungana/desispec,timahutchinson/desispec,desihub/desispec
|
69dd9057c1009d9c047f45908080a55ac3223e4c
|
examples/svm/plot_svm_regression.py
|
examples/svm/plot_svm_regression.py
|
"""Non linear regression with Support Vector Regression (SVR)
using RBF kernel
"""
###############################################################################
# Generate sample data
import numpy as np
X = np.sort(5*np.random.rand(40, 1), axis=0)
y = np.sin(X).ravel()
###############################################################################
# Add noise to targets
y[::5] += 3*(0.5 - np.random.rand(8))
###############################################################################
# Fit regression model
from scikits.learn.svm import SVR
svr_rbf = SVR(kernel='rbf', C=1e4, gamma=0.1)
svr_lin = SVR(kernel='linear', C=1e4)
svr_poly = SVR(kernel='poly', C=1e4, degree=2)
y_rbf = svr_rbf.fit(X, y).predict(X)
y_lin = svr_lin.fit(X, y).predict(X)
y_poly = svr_poly.fit(X, y).predict(X)
###############################################################################
# look at the results
pl.scatter(X, y, c='k', label='data')
pl.hold('on')
pl.plot(X, y_rbf, c='g', label='RBF model')
pl.plot(X, y_lin, c='r', label='Linear model')
pl.plot(X, y_poly, c='b', label='Polynomial model')
pl.xlabel('data')
pl.ylabel('target')
pl.title('Support Vector Regression')
pl.legend()
pl.show()
|
"""Non linear regression with Support Vector Regression (SVR)
using RBF kernel
"""
###############################################################################
# Generate sample data
import numpy as np
X = np.sort(5*np.random.rand(40, 1), axis=0)
y = np.sin(X).ravel()
###############################################################################
# Add noise to targets
y[::5] += 3*(0.5 - np.random.rand(8))
###############################################################################
# Fit regression model
from scikits.learn.svm import SVR
svr_rbf = SVR(kernel='rbf', C=1e4, gamma=0.1)
svr_lin = SVR(kernel='linear', C=1e4)
svr_poly = SVR(kernel='poly', C=1e4, degree=2)
y_rbf = svr_rbf.fit(X, y).predict(X)
y_lin = svr_lin.fit(X, y).predict(X)
y_poly = svr_poly.fit(X, y).predict(X)
###############################################################################
# look at the results
import pylab as pl
pl.scatter(X, y, c='k', label='data')
pl.hold('on')
pl.plot(X, y_rbf, c='g', label='RBF model')
pl.plot(X, y_lin, c='r', label='Linear model')
pl.plot(X, y_poly, c='b', label='Polynomial model')
pl.xlabel('data')
pl.ylabel('target')
pl.title('Support Vector Regression')
pl.legend()
pl.show()
|
Fix forgotten import in example
|
BUG: Fix forgotten import in example
|
Python
|
bsd-3-clause
|
NunoEdgarGub1/scikit-learn,f3r/scikit-learn,mehdidc/scikit-learn,icdishb/scikit-learn,xiaoxiamii/scikit-learn,MatthieuBizien/scikit-learn,Vimos/scikit-learn,walterreade/scikit-learn,lesteve/scikit-learn,hugobowne/scikit-learn,cauchycui/scikit-learn,joshloyal/scikit-learn,shangwuhencc/scikit-learn,mattilyra/scikit-learn,vermouthmjl/scikit-learn,mlyundin/scikit-learn,mugizico/scikit-learn,mhue/scikit-learn,fabioticconi/scikit-learn,chrsrds/scikit-learn,3manuek/scikit-learn,spallavolu/scikit-learn,CforED/Machine-Learning,OshynSong/scikit-learn,adamgreenhall/scikit-learn,henrykironde/scikit-learn,shyamalschandra/scikit-learn,billy-inn/scikit-learn,samuel1208/scikit-learn,HolgerPeters/scikit-learn,justincassidy/scikit-learn,rsivapr/scikit-learn,yonglehou/scikit-learn,rahuldhote/scikit-learn,fzalkow/scikit-learn,zuku1985/scikit-learn,smartscheduling/scikit-learn-categorical-tree,jpautom/scikit-learn,gclenaghan/scikit-learn,liangz0707/scikit-learn,ky822/scikit-learn,shikhardb/scikit-learn,quheng/scikit-learn,chrsrds/scikit-learn,dhruv13J/scikit-learn,AlexRobson/scikit-learn,nvoron23/scikit-learn,ky822/scikit-learn,mayblue9/scikit-learn,tomlof/scikit-learn,jmschrei/scikit-learn,alexeyum/scikit-learn,shikhardb/scikit-learn,hsuantien/scikit-learn,sumspr/scikit-learn,lazywei/scikit-learn,yunfeilu/scikit-learn,lesteve/scikit-learn,pkruskal/scikit-learn,beepee14/scikit-learn,ashhher3/scikit-learn,toastedcornflakes/scikit-learn,glouppe/scikit-learn,466152112/scikit-learn,gclenaghan/scikit-learn,rahul-c1/scikit-learn,nikitasingh981/scikit-learn,ivannz/scikit-learn,PrashntS/scikit-learn,ishanic/scikit-learn,mojoboss/scikit-learn,jaidevd/scikit-learn,nmayorov/scikit-learn,hugobowne/scikit-learn,mikebenfield/scikit-learn,pianomania/scikit-learn,zihua/scikit-learn,ahoyosid/scikit-learn,joshloyal/scikit-learn,Aasmi/scikit-learn,wlamond/scikit-learn,cybernet14/scikit-learn,sarahgrogan/scikit-learn,shangwuhencc/scikit-learn,PatrickChrist/scikit-learn,AIML/scikit-learn,aewhatley/scikit-learn,lenovor/scikit-learn,xavierwu/scikit-learn,terkkila/scikit-learn,henrykironde/scikit-learn,mjudsp/Tsallis,zaxtax/scikit-learn,RPGOne/scikit-learn,macks22/scikit-learn,procoder317/scikit-learn,PatrickChrist/scikit-learn,LiaoPan/scikit-learn,mehdidc/scikit-learn,plissonf/scikit-learn,deepesch/scikit-learn,nomadcube/scikit-learn,r-mart/scikit-learn,hainm/scikit-learn,maheshakya/scikit-learn,DonBeo/scikit-learn,LohithBlaze/scikit-learn,kjung/scikit-learn,xiaoxiamii/scikit-learn,zuku1985/scikit-learn,glennq/scikit-learn,spallavolu/scikit-learn,saiwing-yeung/scikit-learn,Aasmi/scikit-learn,wzbozon/scikit-learn,glennq/scikit-learn,simon-pepin/scikit-learn,etkirsch/scikit-learn,equialgo/scikit-learn,idlead/scikit-learn,arabenjamin/scikit-learn,Achuth17/scikit-learn,yunfeilu/scikit-learn,anntzer/scikit-learn,arjoly/scikit-learn,massmutual/scikit-learn,kagayakidan/scikit-learn,samuel1208/scikit-learn,ZENGXH/scikit-learn,pythonvietnam/scikit-learn,joernhees/scikit-learn,bigdataelephants/scikit-learn,jaidevd/scikit-learn,Titan-C/scikit-learn,mhue/scikit-learn,quheng/scikit-learn,heli522/scikit-learn,spallavolu/scikit-learn,dsullivan7/scikit-learn,untom/scikit-learn,pratapvardhan/scikit-learn,ahoyosid/scikit-learn,florian-f/sklearn,dsquareindia/scikit-learn,mxjl620/scikit-learn,roxyboy/scikit-learn,fyffyt/scikit-learn,abimannans/scikit-learn,shenzebang/scikit-learn,MartinDelzant/scikit-learn,moutai/scikit-learn,tmhm/scikit-learn,maheshakya/scikit-learn,Akshay0724/scikit-learn,LohithBlaze/scikit-learn,LiaoPan/scikit-learn,mrshu/scikit-learn,justincassidy/scikit-learn,alexsavio/scikit-learn,rsivapr/scikit-learn,f3r/scikit-learn,jmetzen/scikit-learn,cybernet14/scikit-learn,ngoix/OCRF,Srisai85/scikit-learn,treycausey/scikit-learn,bnaul/scikit-learn,hainm/scikit-learn,Windy-Ground/scikit-learn,RPGOne/scikit-learn,cl4rke/scikit-learn,bikong2/scikit-learn,cwu2011/scikit-learn,jseabold/scikit-learn,xuewei4d/scikit-learn,mehdidc/scikit-learn,akionakamura/scikit-learn,CforED/Machine-Learning,liangz0707/scikit-learn,phdowling/scikit-learn,pv/scikit-learn,hrjn/scikit-learn,abimannans/scikit-learn,anurag313/scikit-learn,andrewnc/scikit-learn,bikong2/scikit-learn,PrashntS/scikit-learn,voxlol/scikit-learn,tawsifkhan/scikit-learn,akionakamura/scikit-learn,Garrett-R/scikit-learn,jzt5132/scikit-learn,vibhorag/scikit-learn,wazeerzulfikar/scikit-learn,ephes/scikit-learn,rajat1994/scikit-learn,lin-credible/scikit-learn,thilbern/scikit-learn,victorbergelin/scikit-learn,MohammedWasim/scikit-learn,PrashntS/scikit-learn,jayflo/scikit-learn,sanketloke/scikit-learn,espg/scikit-learn,aflaxman/scikit-learn,shangwuhencc/scikit-learn,cauchycui/scikit-learn,meduz/scikit-learn,sumspr/scikit-learn,ningchi/scikit-learn,sinhrks/scikit-learn,shusenl/scikit-learn,UNR-AERIAL/scikit-learn,0asa/scikit-learn,poryfly/scikit-learn,xubenben/scikit-learn,xavierwu/scikit-learn,Sentient07/scikit-learn,Titan-C/scikit-learn,vshtanko/scikit-learn,RayMick/scikit-learn,cdegroc/scikit-learn,nikitasingh981/scikit-learn,mblondel/scikit-learn,plissonf/scikit-learn,ningchi/scikit-learn,rishikksh20/scikit-learn,mjudsp/Tsallis,dingocuster/scikit-learn,imaculate/scikit-learn,costypetrisor/scikit-learn,ycaihua/scikit-learn,fbagirov/scikit-learn,aetilley/scikit-learn,heli522/scikit-learn,poryfly/scikit-learn,clemkoa/scikit-learn,robin-lai/scikit-learn,LohithBlaze/scikit-learn,giorgiop/scikit-learn,arjoly/scikit-learn,MartinSavc/scikit-learn,trungnt13/scikit-learn,Nyker510/scikit-learn,ldirer/scikit-learn,costypetrisor/scikit-learn,pypot/scikit-learn,terkkila/scikit-learn,rohanp/scikit-learn,toastedcornflakes/scikit-learn,mwv/scikit-learn,yunfeilu/scikit-learn,zaxtax/scikit-learn,ashhher3/scikit-learn,maheshakya/scikit-learn,plissonf/scikit-learn,aflaxman/scikit-learn,aabadie/scikit-learn,NelisVerhoef/scikit-learn,beepee14/scikit-learn,kmike/scikit-learn,jakirkham/scikit-learn,tawsifkhan/scikit-learn,mugizico/scikit-learn,mattgiguere/scikit-learn,pkruskal/scikit-learn,thientu/scikit-learn,ycaihua/scikit-learn,Barmaley-exe/scikit-learn,fbagirov/scikit-learn,MechCoder/scikit-learn,NunoEdgarGub1/scikit-learn,frank-tancf/scikit-learn,cl4rke/scikit-learn,murali-munna/scikit-learn,anirudhjayaraman/scikit-learn,ivannz/scikit-learn,nelson-liu/scikit-learn,jjx02230808/project0223,larsmans/scikit-learn,sarahgrogan/scikit-learn,vinayak-mehta/scikit-learn,glemaitre/scikit-learn,RachitKansal/scikit-learn,UNR-AERIAL/scikit-learn,simon-pepin/scikit-learn,petosegan/scikit-learn,dsullivan7/scikit-learn,fredhusser/scikit-learn,khkaminska/scikit-learn,Adai0808/scikit-learn,yonglehou/scikit-learn,hsuantien/scikit-learn,cauchycui/scikit-learn,shahankhatch/scikit-learn,TomDLT/scikit-learn,ChanderG/scikit-learn,khkaminska/scikit-learn,nhejazi/scikit-learn,russel1237/scikit-learn,schets/scikit-learn,kmike/scikit-learn,RachitKansal/scikit-learn,kjung/scikit-learn,rrohan/scikit-learn,roxyboy/scikit-learn,schets/scikit-learn,nomadcube/scikit-learn,untom/scikit-learn,xuewei4d/scikit-learn,0asa/scikit-learn,IssamLaradji/scikit-learn,victorbergelin/scikit-learn,idlead/scikit-learn,vortex-ape/scikit-learn,andrewnc/scikit-learn,scikit-learn/scikit-learn,alvarofierroclavero/scikit-learn,procoder317/scikit-learn,Lawrence-Liu/scikit-learn,vigilv/scikit-learn,qifeigit/scikit-learn,nvoron23/scikit-learn,lucidfrontier45/scikit-learn,q1ang/scikit-learn,btabibian/scikit-learn,zorojean/scikit-learn,abhishekgahlot/scikit-learn,0x0all/scikit-learn,JPFrancoia/scikit-learn,aetilley/scikit-learn,pypot/scikit-learn,0asa/scikit-learn,icdishb/scikit-learn,pnedunuri/scikit-learn,AlexandreAbraham/scikit-learn,nrhine1/scikit-learn,kmike/scikit-learn,MechCoder/scikit-learn,andrewnc/scikit-learn,mojoboss/scikit-learn,voxlol/scikit-learn,AlexandreAbraham/scikit-learn,ClimbsRocks/scikit-learn,aminert/scikit-learn,lenovor/scikit-learn,gotomypc/scikit-learn,adamgreenhall/scikit-learn,Vimos/scikit-learn,rajat1994/scikit-learn,belltailjp/scikit-learn,devanshdalal/scikit-learn,jakobworldpeace/scikit-learn,aetilley/scikit-learn,abhishekgahlot/scikit-learn,Myasuka/scikit-learn,henrykironde/scikit-learn,murali-munna/scikit-learn,NunoEdgarGub1/scikit-learn,jorik041/scikit-learn,Achuth17/scikit-learn,ivannz/scikit-learn,Adai0808/scikit-learn,ngoix/OCRF,pkruskal/scikit-learn,mehdidc/scikit-learn,RomainBrault/scikit-learn,sinhrks/scikit-learn,jpautom/scikit-learn,bhargav/scikit-learn,massmutual/scikit-learn,ElDeveloper/scikit-learn,iismd17/scikit-learn,imaculate/scikit-learn,mikebenfield/scikit-learn,manashmndl/scikit-learn,simon-pepin/scikit-learn,bthirion/scikit-learn,sgenoud/scikit-learn,olologin/scikit-learn,ngoix/OCRF,glennq/scikit-learn,yyjiang/scikit-learn,jakirkham/scikit-learn,cwu2011/scikit-learn,huzq/scikit-learn,walterreade/scikit-learn,TomDLT/scikit-learn,untom/scikit-learn,xzh86/scikit-learn,etkirsch/scikit-learn,yyjiang/scikit-learn,B3AU/waveTree,kevin-intel/scikit-learn,shahankhatch/scikit-learn,waterponey/scikit-learn,hdmetor/scikit-learn,f3r/scikit-learn,r-mart/scikit-learn,pythonvietnam/scikit-learn,marcocaccin/scikit-learn,PatrickOReilly/scikit-learn,kylerbrown/scikit-learn,ankurankan/scikit-learn,eickenberg/scikit-learn,jmschrei/scikit-learn,akionakamura/scikit-learn,jayflo/scikit-learn,schets/scikit-learn,MechCoder/scikit-learn,glouppe/scikit-learn,icdishb/scikit-learn,Fireblend/scikit-learn,jm-begon/scikit-learn,mblondel/scikit-learn,xwolf12/scikit-learn,bhargav/scikit-learn,wzbozon/scikit-learn,0x0all/scikit-learn,jlegendary/scikit-learn,MatthieuBizien/scikit-learn,jblackburne/scikit-learn,PatrickOReilly/scikit-learn,abhishekgahlot/scikit-learn,depet/scikit-learn,sonnyhu/scikit-learn,mwv/scikit-learn,nikitasingh981/scikit-learn,tawsifkhan/scikit-learn,NelisVerhoef/scikit-learn,hsiaoyi0504/scikit-learn,vinayak-mehta/scikit-learn,UNR-AERIAL/scikit-learn,q1ang/scikit-learn,huobaowangxi/scikit-learn,luo66/scikit-learn,chrsrds/scikit-learn,mwv/scikit-learn,BiaDarkia/scikit-learn,marcocaccin/scikit-learn,luo66/scikit-learn,appapantula/scikit-learn,rsivapr/scikit-learn,OshynSong/scikit-learn,toastedcornflakes/scikit-learn,pompiduskus/scikit-learn,jereze/scikit-learn,depet/scikit-learn,0asa/scikit-learn,tomlof/scikit-learn,ndingwall/scikit-learn,altairpearl/scikit-learn,devanshdalal/scikit-learn,samuel1208/scikit-learn,zaxtax/scikit-learn,jorge2703/scikit-learn,Djabbz/scikit-learn,466152112/scikit-learn,Djabbz/scikit-learn,vermouthmjl/scikit-learn,fabioticconi/scikit-learn,jmetzen/scikit-learn,kevin-intel/scikit-learn,madjelan/scikit-learn,pianomania/scikit-learn,lazywei/scikit-learn,IndraVikas/scikit-learn,ChanderG/scikit-learn,jpautom/scikit-learn,alvarofierroclavero/scikit-learn,belltailjp/scikit-learn,mjgrav2001/scikit-learn,treycausey/scikit-learn,manashmndl/scikit-learn,herilalaina/scikit-learn,liangz0707/scikit-learn,Jimmy-Morzaria/scikit-learn,aminert/scikit-learn,theoryno3/scikit-learn,arahuja/scikit-learn,kmike/scikit-learn,loli/semisupervisedforests,gotomypc/scikit-learn,petosegan/scikit-learn,pythonvietnam/scikit-learn,henridwyer/scikit-learn,shyamalschandra/scikit-learn,hrjn/scikit-learn,sinhrks/scikit-learn,vibhorag/scikit-learn,ankurankan/scikit-learn,idlead/scikit-learn,anurag313/scikit-learn,liyu1990/sklearn,giorgiop/scikit-learn,maheshakya/scikit-learn,poryfly/scikit-learn,OshynSong/scikit-learn,hitszxp/scikit-learn,jereze/scikit-learn,siutanwong/scikit-learn,ycaihua/scikit-learn,xiaoxiamii/scikit-learn,belltailjp/scikit-learn,BiaDarkia/scikit-learn,hlin117/scikit-learn,ZENGXH/scikit-learn,pianomania/scikit-learn,trungnt13/scikit-learn,kaichogami/scikit-learn,bhargav/scikit-learn,jorik041/scikit-learn,henrykironde/scikit-learn,meduz/scikit-learn,equialgo/scikit-learn,florian-f/sklearn,fabioticconi/scikit-learn,andaag/scikit-learn,jayflo/scikit-learn,Myasuka/scikit-learn,larsmans/scikit-learn,adamgreenhall/scikit-learn,jakobworldpeace/scikit-learn,sanketloke/scikit-learn,tomlof/scikit-learn,depet/scikit-learn,abhishekkrthakur/scikit-learn,lucidfrontier45/scikit-learn,466152112/scikit-learn,jm-begon/scikit-learn,mikebenfield/scikit-learn,potash/scikit-learn,themrmax/scikit-learn,florian-f/sklearn,manhhomienbienthuy/scikit-learn,sinhrks/scikit-learn,zaxtax/scikit-learn,sgenoud/scikit-learn,tdhopper/scikit-learn,marcocaccin/scikit-learn,alexsavio/scikit-learn,nvoron23/scikit-learn,NelisVerhoef/scikit-learn,MohammedWasim/scikit-learn,cl4rke/scikit-learn,nesterione/scikit-learn,Sentient07/scikit-learn,ephes/scikit-learn,fabioticconi/scikit-learn,mikebenfield/scikit-learn,zhenv5/scikit-learn,rajat1994/scikit-learn,yask123/scikit-learn,shahankhatch/scikit-learn,nelson-liu/scikit-learn,PatrickOReilly/scikit-learn,beepee14/scikit-learn,BiaDarkia/scikit-learn,russel1237/scikit-learn,rvraghav93/scikit-learn,djgagne/scikit-learn,PrashntS/scikit-learn,ominux/scikit-learn,robin-lai/scikit-learn,robin-lai/scikit-learn,ltiao/scikit-learn,vivekmishra1991/scikit-learn,rahul-c1/scikit-learn,michigraber/scikit-learn,rvraghav93/scikit-learn,themrmax/scikit-learn,mattilyra/scikit-learn,0x0all/scikit-learn,elkingtonmcb/scikit-learn,rishikksh20/scikit-learn,yunfeilu/scikit-learn,scikit-learn/scikit-learn,ankurankan/scikit-learn,Lawrence-Liu/scikit-learn,rahul-c1/scikit-learn,vigilv/scikit-learn,hlin117/scikit-learn,h2educ/scikit-learn,pypot/scikit-learn,eickenberg/scikit-learn,xuewei4d/scikit-learn,AlexRobson/scikit-learn,heli522/scikit-learn,liyu1990/sklearn,harshaneelhg/scikit-learn,ningchi/scikit-learn,jseabold/scikit-learn,carrillo/scikit-learn,rohanp/scikit-learn,nomadcube/scikit-learn,0x0all/scikit-learn,zorroblue/scikit-learn,YinongLong/scikit-learn,rishikksh20/scikit-learn,luo66/scikit-learn,nvoron23/scikit-learn,glouppe/scikit-learn,xubenben/scikit-learn,fabianp/scikit-learn,sumspr/scikit-learn,betatim/scikit-learn,mattgiguere/scikit-learn,glennq/scikit-learn,vybstat/scikit-learn,shahankhatch/scikit-learn,Sentient07/scikit-learn,trankmichael/scikit-learn,aetilley/scikit-learn,trankmichael/scikit-learn,smartscheduling/scikit-learn-categorical-tree,JosmanPS/scikit-learn,jakobworldpeace/scikit-learn,amueller/scikit-learn,jzt5132/scikit-learn,cwu2011/scikit-learn,xuewei4d/scikit-learn,kevin-intel/scikit-learn,BiaDarkia/scikit-learn,mugizico/scikit-learn,rahuldhote/scikit-learn,ClimbsRocks/scikit-learn,kagayakidan/scikit-learn,manhhomienbienthuy/scikit-learn,andaag/scikit-learn,kjung/scikit-learn,Titan-C/scikit-learn,JPFrancoia/scikit-learn,rrohan/scikit-learn,Srisai85/scikit-learn,quheng/scikit-learn,potash/scikit-learn,murali-munna/scikit-learn,3manuek/scikit-learn,sonnyhu/scikit-learn,yyjiang/scikit-learn,zorojean/scikit-learn,ycaihua/scikit-learn,lucidfrontier45/scikit-learn,wlamond/scikit-learn,krez13/scikit-learn,JosmanPS/scikit-learn,mxjl620/scikit-learn,vivekmishra1991/scikit-learn,michigraber/scikit-learn,ZENGXH/scikit-learn,murali-munna/scikit-learn,ZenDevelopmentSystems/scikit-learn,aflaxman/scikit-learn,YinongLong/scikit-learn,CforED/Machine-Learning,jblackburne/scikit-learn,MartinDelzant/scikit-learn,aewhatley/scikit-learn,wazeerzulfikar/scikit-learn,thilbern/scikit-learn,jjx02230808/project0223,eickenberg/scikit-learn,mrshu/scikit-learn,stylianos-kampakis/scikit-learn,nhejazi/scikit-learn,aabadie/scikit-learn,mlyundin/scikit-learn,B3AU/waveTree,fyffyt/scikit-learn,ominux/scikit-learn,ZenDevelopmentSystems/scikit-learn,altairpearl/scikit-learn,ZenDevelopmentSystems/scikit-learn,xyguo/scikit-learn,cainiaocome/scikit-learn,RayMick/scikit-learn,terkkila/scikit-learn,Garrett-R/scikit-learn,MatthieuBizien/scikit-learn,eickenberg/scikit-learn,Barmaley-exe/scikit-learn,RPGOne/scikit-learn,hsuantien/scikit-learn,devanshdalal/scikit-learn,justincassidy/scikit-learn,JosmanPS/scikit-learn,vivekmishra1991/scikit-learn,tdhopper/scikit-learn,AIML/scikit-learn,ogrisel/scikit-learn,loli/sklearn-ensembletrees,JeanKossaifi/scikit-learn,yonglehou/scikit-learn,equialgo/scikit-learn,raghavrv/scikit-learn,vortex-ape/scikit-learn,fbagirov/scikit-learn,jpautom/scikit-learn,shikhardb/scikit-learn,loli/semisupervisedforests,dsullivan7/scikit-learn,liyu1990/sklearn,arahuja/scikit-learn,ZenDevelopmentSystems/scikit-learn,mfjb/scikit-learn,ky822/scikit-learn,pianomania/scikit-learn,AlexandreAbraham/scikit-learn,procoder317/scikit-learn,jblackburne/scikit-learn,idlead/scikit-learn,ilo10/scikit-learn,samzhang111/scikit-learn,florian-f/sklearn,robbymeals/scikit-learn,siutanwong/scikit-learn,giorgiop/scikit-learn,hsiaoyi0504/scikit-learn,depet/scikit-learn,abhishekgahlot/scikit-learn,maheshakya/scikit-learn,mwv/scikit-learn,Windy-Ground/scikit-learn,nrhine1/scikit-learn,sergeyf/scikit-learn,rvraghav93/scikit-learn,jereze/scikit-learn,dhruv13J/scikit-learn,Djabbz/scikit-learn,zuku1985/scikit-learn,0x0all/scikit-learn,kaichogami/scikit-learn,dsquareindia/scikit-learn,ankurankan/scikit-learn,abhishekgahlot/scikit-learn,Aasmi/scikit-learn,larsmans/scikit-learn,shyamalschandra/scikit-learn,fzalkow/scikit-learn,Obus/scikit-learn,khkaminska/scikit-learn,bigdataelephants/scikit-learn,IndraVikas/scikit-learn,costypetrisor/scikit-learn,bthirion/scikit-learn,hrjn/scikit-learn,ChanChiChoi/scikit-learn,aabadie/scikit-learn,xwolf12/scikit-learn,abhishekkrthakur/scikit-learn,TomDLT/scikit-learn,hlin117/scikit-learn,fabianp/scikit-learn,mojoboss/scikit-learn,hsiaoyi0504/scikit-learn,glemaitre/scikit-learn,3manuek/scikit-learn,lucidfrontier45/scikit-learn,nesterione/scikit-learn,waterponey/scikit-learn,Nyker510/scikit-learn,YinongLong/scikit-learn,andrewnc/scikit-learn,MartinSavc/scikit-learn,alvarofierroclavero/scikit-learn,rsivapr/scikit-learn,hsuantien/scikit-learn,mattilyra/scikit-learn,chrsrds/scikit-learn,macks22/scikit-learn,ilyes14/scikit-learn,mxjl620/scikit-learn,huobaowangxi/scikit-learn,dhruv13J/scikit-learn,florian-f/sklearn,IndraVikas/scikit-learn,evgchz/scikit-learn,jorge2703/scikit-learn,AlexRobson/scikit-learn,lin-credible/scikit-learn,ishanic/scikit-learn,wazeerzulfikar/scikit-learn,stylianos-kampakis/scikit-learn,mhdella/scikit-learn,raghavrv/scikit-learn,jaidevd/scikit-learn,bthirion/scikit-learn,kashif/scikit-learn,frank-tancf/scikit-learn,Lawrence-Liu/scikit-learn,jlegendary/scikit-learn,JeanKossaifi/scikit-learn,RomainBrault/scikit-learn,betatim/scikit-learn,mjudsp/Tsallis,ChanChiChoi/scikit-learn,andaag/scikit-learn,deepesch/scikit-learn,petosegan/scikit-learn,scikit-learn/scikit-learn,cainiaocome/scikit-learn,nmayorov/scikit-learn,DSLituiev/scikit-learn,eg-zhang/scikit-learn,moutai/scikit-learn,kaichogami/scikit-learn,mjudsp/Tsallis,dingocuster/scikit-learn,AlexRobson/scikit-learn,MohammedWasim/scikit-learn,vermouthmjl/scikit-learn,jorik041/scikit-learn,shenzebang/scikit-learn,kylerbrown/scikit-learn,ilo10/scikit-learn,Jimmy-Morzaria/scikit-learn,ssaeger/scikit-learn,cauchycui/scikit-learn,yonglehou/scikit-learn,h2educ/scikit-learn,lbishal/scikit-learn,cwu2011/scikit-learn,appapantula/scikit-learn,akionakamura/scikit-learn,bnaul/scikit-learn,anntzer/scikit-learn,pv/scikit-learn,treycausey/scikit-learn,Myasuka/scikit-learn,abimannans/scikit-learn,zhenv5/scikit-learn,sanketloke/scikit-learn,jakirkham/scikit-learn,herilalaina/scikit-learn,UNR-AERIAL/scikit-learn,poryfly/scikit-learn,frank-tancf/scikit-learn,r-mart/scikit-learn,Fireblend/scikit-learn,espg/scikit-learn,anirudhjayaraman/scikit-learn,glemaitre/scikit-learn,pompiduskus/scikit-learn,aminert/scikit-learn,qifeigit/scikit-learn,phdowling/scikit-learn,fengzhyuan/scikit-learn,rahuldhote/scikit-learn,massmutual/scikit-learn,xyguo/scikit-learn,3manuek/scikit-learn,arahuja/scikit-learn,potash/scikit-learn,ashhher3/scikit-learn,vermouthmjl/scikit-learn,Fireblend/scikit-learn,loli/sklearn-ensembletrees,alexsavio/scikit-learn,yanlend/scikit-learn,bnaul/scikit-learn,zorroblue/scikit-learn,jkarnows/scikit-learn,cdegroc/scikit-learn,pv/scikit-learn,davidgbe/scikit-learn,rohanp/scikit-learn,billy-inn/scikit-learn,beepee14/scikit-learn,AnasGhrab/scikit-learn,sonnyhu/scikit-learn,cdegroc/scikit-learn,eg-zhang/scikit-learn,kagayakidan/scikit-learn,chrisburr/scikit-learn,mrshu/scikit-learn,depet/scikit-learn,dsullivan7/scikit-learn,elkingtonmcb/scikit-learn,hainm/scikit-learn,michigraber/scikit-learn,abimannans/scikit-learn,stylianos-kampakis/scikit-learn,CforED/Machine-Learning,ltiao/scikit-learn,tosolveit/scikit-learn,qifeigit/scikit-learn,jorge2703/scikit-learn,clemkoa/scikit-learn,manhhomienbienthuy/scikit-learn,bigdataelephants/scikit-learn,jmschrei/scikit-learn,Obus/scikit-learn,nhejazi/scikit-learn,ahoyosid/scikit-learn,xyguo/scikit-learn,sanketloke/scikit-learn,ldirer/scikit-learn,herilalaina/scikit-learn,saiwing-yeung/scikit-learn,Garrett-R/scikit-learn,pompiduskus/scikit-learn,loli/sklearn-ensembletrees,Achuth17/scikit-learn,btabibian/scikit-learn,ahoyosid/scikit-learn,sumspr/scikit-learn,betatim/scikit-learn,saiwing-yeung/scikit-learn,siutanwong/scikit-learn,ClimbsRocks/scikit-learn,samzhang111/scikit-learn,fredhusser/scikit-learn,theoryno3/scikit-learn,aflaxman/scikit-learn,olologin/scikit-learn,mblondel/scikit-learn,liyu1990/sklearn,treycausey/scikit-learn,DonBeo/scikit-learn,ephes/scikit-learn,elkingtonmcb/scikit-learn,justincassidy/scikit-learn,alexeyum/scikit-learn,henridwyer/scikit-learn,MatthieuBizien/scikit-learn,arabenjamin/scikit-learn,carrillo/scikit-learn,xavierwu/scikit-learn,zorojean/scikit-learn,robbymeals/scikit-learn,tmhm/scikit-learn,jlegendary/scikit-learn,NelisVerhoef/scikit-learn,heli522/scikit-learn,vinayak-mehta/scikit-learn,ilo10/scikit-learn,pnedunuri/scikit-learn,iismd17/scikit-learn,petosegan/scikit-learn,yanlend/scikit-learn,chrisburr/scikit-learn,ElDeveloper/scikit-learn,Obus/scikit-learn,mlyundin/scikit-learn,henridwyer/scikit-learn,phdowling/scikit-learn,rahul-c1/scikit-learn,mjgrav2001/scikit-learn,sarahgrogan/scikit-learn,ominux/scikit-learn,xiaoxiamii/scikit-learn,mrshu/scikit-learn,Clyde-fare/scikit-learn,abhishekkrthakur/scikit-learn,lazywei/scikit-learn,wlamond/scikit-learn,IshankGulati/scikit-learn,DonBeo/scikit-learn,Djabbz/scikit-learn,hitszxp/scikit-learn,rexshihaoren/scikit-learn,lbishal/scikit-learn,ogrisel/scikit-learn,imaculate/scikit-learn,massmutual/scikit-learn,jmetzen/scikit-learn,harshaneelhg/scikit-learn,eg-zhang/scikit-learn,mhdella/scikit-learn,herilalaina/scikit-learn,billy-inn/scikit-learn,hdmetor/scikit-learn,ogrisel/scikit-learn,roxyboy/scikit-learn,macks22/scikit-learn,liberatorqjw/scikit-learn,Akshay0724/scikit-learn,loli/sklearn-ensembletrees,HolgerPeters/scikit-learn,fredhusser/scikit-learn,xzh86/scikit-learn,iismd17/scikit-learn,jzt5132/scikit-learn,AIML/scikit-learn,harshaneelhg/scikit-learn,Garrett-R/scikit-learn,nrhine1/scikit-learn,raghavrv/scikit-learn,huzq/scikit-learn,pnedunuri/scikit-learn,manashmndl/scikit-learn,etkirsch/scikit-learn,raghavrv/scikit-learn,meduz/scikit-learn,davidgbe/scikit-learn,ChanChiChoi/scikit-learn,pratapvardhan/scikit-learn,rishikksh20/scikit-learn,qifeigit/scikit-learn,LiaoPan/scikit-learn,terkkila/scikit-learn,fengzhyuan/scikit-learn,anntzer/scikit-learn,wanggang3333/scikit-learn,mjgrav2001/scikit-learn,ChanderG/scikit-learn,trungnt13/scikit-learn,procoder317/scikit-learn,CVML/scikit-learn,r-mart/scikit-learn,vortex-ape/scikit-learn,walterreade/scikit-learn,kylerbrown/scikit-learn,glemaitre/scikit-learn,mugizico/scikit-learn,stylianos-kampakis/scikit-learn,altairpearl/scikit-learn,mhue/scikit-learn,YinongLong/scikit-learn,hlin117/scikit-learn,cl4rke/scikit-learn,AlexanderFabisch/scikit-learn,pratapvardhan/scikit-learn,gotomypc/scikit-learn,MartinSavc/scikit-learn,olologin/scikit-learn,altairpearl/scikit-learn,jaidevd/scikit-learn,treycausey/scikit-learn,yask123/scikit-learn,amueller/scikit-learn,jmetzen/scikit-learn,marcocaccin/scikit-learn,RomainBrault/scikit-learn,ningchi/scikit-learn,khkaminska/scikit-learn,roxyboy/scikit-learn,kjung/scikit-learn,vibhorag/scikit-learn,gclenaghan/scikit-learn,CVML/scikit-learn,krez13/scikit-learn,plissonf/scikit-learn,ChanChiChoi/scikit-learn,anurag313/scikit-learn,jorge2703/scikit-learn,shyamalschandra/scikit-learn,ominux/scikit-learn,victorbergelin/scikit-learn,MechCoder/scikit-learn,mattilyra/scikit-learn,ElDeveloper/scikit-learn,zorroblue/scikit-learn,joernhees/scikit-learn,icdishb/scikit-learn,robbymeals/scikit-learn,ankurankan/scikit-learn,zihua/scikit-learn,PatrickOReilly/scikit-learn,IshankGulati/scikit-learn,mhdella/scikit-learn,nrhine1/scikit-learn,smartscheduling/scikit-learn-categorical-tree,MartinSavc/scikit-learn,Jimmy-Morzaria/scikit-learn,HolgerPeters/scikit-learn,vinayak-mehta/scikit-learn,nelson-liu/scikit-learn,glouppe/scikit-learn,vshtanko/scikit-learn,samuel1208/scikit-learn,evgchz/scikit-learn,shangwuhencc/scikit-learn,gotomypc/scikit-learn,OshynSong/scikit-learn,hdmetor/scikit-learn,mjudsp/Tsallis,russel1237/scikit-learn,ldirer/scikit-learn,bikong2/scikit-learn,ishanic/scikit-learn,ssaeger/scikit-learn,fengzhyuan/scikit-learn,lin-credible/scikit-learn,victorbergelin/scikit-learn,billy-inn/scikit-learn,nhejazi/scikit-learn,JsNoNo/scikit-learn,themrmax/scikit-learn,hsiaoyi0504/scikit-learn,alexeyum/scikit-learn,waterponey/scikit-learn,liberatorqjw/scikit-learn,dingocuster/scikit-learn,potash/scikit-learn,clemkoa/scikit-learn,PatrickChrist/scikit-learn,IssamLaradji/scikit-learn,aminert/scikit-learn,h2educ/scikit-learn,rexshihaoren/scikit-learn,fredhusser/scikit-learn,rohanp/scikit-learn,fyffyt/scikit-learn,wzbozon/scikit-learn,zorroblue/scikit-learn,schets/scikit-learn,IshankGulati/scikit-learn,hdmetor/scikit-learn,q1ang/scikit-learn,frank-tancf/scikit-learn,JsNoNo/scikit-learn,kashif/scikit-learn,nelson-liu/scikit-learn,arjoly/scikit-learn,robbymeals/scikit-learn,Windy-Ground/scikit-learn,ngoix/OCRF,rsivapr/scikit-learn,mfjb/scikit-learn,andaag/scikit-learn,mblondel/scikit-learn,ilyes14/scikit-learn,q1ang/scikit-learn,ilyes14/scikit-learn,shenzebang/scikit-learn,thientu/scikit-learn,AlexandreAbraham/scikit-learn,jzt5132/scikit-learn,ndingwall/scikit-learn,vshtanko/scikit-learn,JsNoNo/scikit-learn,sergeyf/scikit-learn,moutai/scikit-learn,toastedcornflakes/scikit-learn,pv/scikit-learn,JPFrancoia/scikit-learn,manashmndl/scikit-learn,nesterione/scikit-learn,kagayakidan/scikit-learn,kevin-intel/scikit-learn,saiwing-yeung/scikit-learn,abhishekkrthakur/scikit-learn,DSLituiev/scikit-learn,rrohan/scikit-learn,mrshu/scikit-learn,B3AU/waveTree,466152112/scikit-learn,wanggang3333/scikit-learn,B3AU/waveTree,bigdataelephants/scikit-learn,bthirion/scikit-learn,xzh86/scikit-learn,dingocuster/scikit-learn,manhhomienbienthuy/scikit-learn,tmhm/scikit-learn,Akshay0724/scikit-learn,xzh86/scikit-learn,aabadie/scikit-learn,betatim/scikit-learn,voxlol/scikit-learn,jblackburne/scikit-learn,Clyde-fare/scikit-learn,kashif/scikit-learn,dhruv13J/scikit-learn,RomainBrault/scikit-learn,thientu/scikit-learn,vybstat/scikit-learn,eickenberg/scikit-learn,djgagne/scikit-learn,krez13/scikit-learn,hitszxp/scikit-learn,ndingwall/scikit-learn,wlamond/scikit-learn,NunoEdgarGub1/scikit-learn,madjelan/scikit-learn,appapantula/scikit-learn,evgchz/scikit-learn,sergeyf/scikit-learn,hugobowne/scikit-learn,vybstat/scikit-learn,chrisburr/scikit-learn,mattgiguere/scikit-learn,ElDeveloper/scikit-learn,IndraVikas/scikit-learn,arabenjamin/scikit-learn,wzbozon/scikit-learn,rajat1994/scikit-learn,vybstat/scikit-learn,imaculate/scikit-learn,jkarnows/scikit-learn,tmhm/scikit-learn,RayMick/scikit-learn,mjgrav2001/scikit-learn,nmayorov/scikit-learn,macks22/scikit-learn,mayblue9/scikit-learn,davidgbe/scikit-learn,lbishal/scikit-learn,MohammedWasim/scikit-learn,mojoboss/scikit-learn,lenovor/scikit-learn,iismd17/scikit-learn,krez13/scikit-learn,jjx02230808/project0223,arabenjamin/scikit-learn,huzq/scikit-learn,ltiao/scikit-learn,mayblue9/scikit-learn,mattilyra/scikit-learn,jayflo/scikit-learn,xubenben/scikit-learn,pratapvardhan/scikit-learn,espg/scikit-learn,AlexanderFabisch/scikit-learn,Windy-Ground/scikit-learn,shikhardb/scikit-learn,ilyes14/scikit-learn,joshloyal/scikit-learn,pkruskal/scikit-learn,sergeyf/scikit-learn,madjelan/scikit-learn,JsNoNo/scikit-learn,trungnt13/scikit-learn,belltailjp/scikit-learn,Adai0808/scikit-learn,RayMick/scikit-learn,meduz/scikit-learn,Srisai85/scikit-learn,cdegroc/scikit-learn,shusenl/scikit-learn,ogrisel/scikit-learn,tdhopper/scikit-learn,quheng/scikit-learn,Jimmy-Morzaria/scikit-learn,bhargav/scikit-learn,etkirsch/scikit-learn,AnasGhrab/scikit-learn,ngoix/OCRF,vshtanko/scikit-learn,anirudhjayaraman/scikit-learn,cainiaocome/scikit-learn,kashif/scikit-learn,JeanKossaifi/scikit-learn,fengzhyuan/scikit-learn,yanlend/scikit-learn,ChanderG/scikit-learn,lbishal/scikit-learn,thilbern/scikit-learn,Fireblend/scikit-learn,mxjl620/scikit-learn,anirudhjayaraman/scikit-learn,trankmichael/scikit-learn,hainm/scikit-learn,hrjn/scikit-learn,lucidfrontier45/scikit-learn,Achuth17/scikit-learn,nmayorov/scikit-learn,vigilv/scikit-learn,zihua/scikit-learn,IssamLaradji/scikit-learn,luo66/scikit-learn,siutanwong/scikit-learn,zuku1985/scikit-learn,shusenl/scikit-learn,themrmax/scikit-learn,michigraber/scikit-learn,pythonvietnam/scikit-learn,untom/scikit-learn,Srisai85/scikit-learn,ssaeger/scikit-learn,ZENGXH/scikit-learn,Nyker510/scikit-learn,jmschrei/scikit-learn,Vimos/scikit-learn,MartinDelzant/scikit-learn,theoryno3/scikit-learn,dsquareindia/scikit-learn,rrohan/scikit-learn,yask123/scikit-learn,aewhatley/scikit-learn,amueller/scikit-learn,trankmichael/scikit-learn,equialgo/scikit-learn,liberatorqjw/scikit-learn,ishanic/scikit-learn,DSLituiev/scikit-learn,jereze/scikit-learn,ngoix/OCRF,0asa/scikit-learn,hitszxp/scikit-learn,scikit-learn/scikit-learn,Titan-C/scikit-learn,mlyundin/scikit-learn,Adai0808/scikit-learn,PatrickChrist/scikit-learn,bikong2/scikit-learn,ssaeger/scikit-learn,Myasuka/scikit-learn,ndingwall/scikit-learn,CVML/scikit-learn,mayblue9/scikit-learn,ltiao/scikit-learn,Clyde-fare/scikit-learn,lazywei/scikit-learn,ilo10/scikit-learn,mfjb/scikit-learn,joernhees/scikit-learn,carrillo/scikit-learn,jkarnows/scikit-learn,fzalkow/scikit-learn,Nyker510/scikit-learn,AIML/scikit-learn,HolgerPeters/scikit-learn,aewhatley/scikit-learn,vibhorag/scikit-learn,walterreade/scikit-learn,fyffyt/scikit-learn,ivannz/scikit-learn,anurag313/scikit-learn,chrisburr/scikit-learn,rvraghav93/scikit-learn,spallavolu/scikit-learn,davidgbe/scikit-learn,joshloyal/scikit-learn,waterponey/scikit-learn,jkarnows/scikit-learn,deepesch/scikit-learn,Aasmi/scikit-learn,cainiaocome/scikit-learn,tosolveit/scikit-learn,bnaul/scikit-learn,Vimos/scikit-learn,fabianp/scikit-learn,JeanKossaifi/scikit-learn,RachitKansal/scikit-learn,appapantula/scikit-learn,B3AU/waveTree,IshankGulati/scikit-learn,henridwyer/scikit-learn,robin-lai/scikit-learn,amueller/scikit-learn,Garrett-R/scikit-learn,yanlend/scikit-learn,tomlof/scikit-learn,Barmaley-exe/scikit-learn,pypot/scikit-learn,joernhees/scikit-learn,phdowling/scikit-learn,lesteve/scikit-learn,zhenv5/scikit-learn,mhue/scikit-learn,fzalkow/scikit-learn,loli/semisupervisedforests,xyguo/scikit-learn,xubenben/scikit-learn,madjelan/scikit-learn,sgenoud/scikit-learn,jorik041/scikit-learn,thilbern/scikit-learn,AnasGhrab/scikit-learn,Barmaley-exe/scikit-learn,thientu/scikit-learn,voxlol/scikit-learn,CVML/scikit-learn,clemkoa/scikit-learn,yask123/scikit-learn,carrillo/scikit-learn,nesterione/scikit-learn,JPFrancoia/scikit-learn,Lawrence-Liu/scikit-learn,huobaowangxi/scikit-learn,Clyde-fare/scikit-learn,ashhher3/scikit-learn,ClimbsRocks/scikit-learn,costypetrisor/scikit-learn,LohithBlaze/scikit-learn,AlexanderFabisch/scikit-learn,theoryno3/scikit-learn,kaichogami/scikit-learn,russel1237/scikit-learn,shenzebang/scikit-learn,simon-pepin/scikit-learn,sgenoud/scikit-learn,samzhang111/scikit-learn,AnasGhrab/scikit-learn,evgchz/scikit-learn,jakirkham/scikit-learn,wanggang3333/scikit-learn,ldirer/scikit-learn,Akshay0724/scikit-learn,anntzer/scikit-learn,nikitasingh981/scikit-learn,evgchz/scikit-learn,jseabold/scikit-learn,lin-credible/scikit-learn,ephes/scikit-learn,liangz0707/scikit-learn,olologin/scikit-learn,wazeerzulfikar/scikit-learn,larsmans/scikit-learn,eg-zhang/scikit-learn,mfjb/scikit-learn,jjx02230808/project0223,alexeyum/scikit-learn,vortex-ape/scikit-learn,Obus/scikit-learn,btabibian/scikit-learn,ky822/scikit-learn,gclenaghan/scikit-learn,h2educ/scikit-learn,cybernet14/scikit-learn,ycaihua/scikit-learn,mattgiguere/scikit-learn,DonBeo/scikit-learn,yyjiang/scikit-learn,rexshihaoren/scikit-learn,sgenoud/scikit-learn,DSLituiev/scikit-learn,rahuldhote/scikit-learn,mhdella/scikit-learn,espg/scikit-learn,samzhang111/scikit-learn,shusenl/scikit-learn,hugobowne/scikit-learn,MartinDelzant/scikit-learn,wanggang3333/scikit-learn,moutai/scikit-learn,Sentient07/scikit-learn,larsmans/scikit-learn,lesteve/scikit-learn,arjoly/scikit-learn,btabibian/scikit-learn,hitszxp/scikit-learn,jm-begon/scikit-learn,xwolf12/scikit-learn,jakobworldpeace/scikit-learn,dsquareindia/scikit-learn,arahuja/scikit-learn,zhenv5/scikit-learn,alvarofierroclavero/scikit-learn,smartscheduling/scikit-learn-categorical-tree,vivekmishra1991/scikit-learn,liberatorqjw/scikit-learn,LiaoPan/scikit-learn,giorgiop/scikit-learn,deepesch/scikit-learn,TomDLT/scikit-learn,devanshdalal/scikit-learn,tosolveit/scikit-learn,djgagne/scikit-learn,pnedunuri/scikit-learn,RPGOne/scikit-learn,xavierwu/scikit-learn,rexshihaoren/scikit-learn,loli/sklearn-ensembletrees,fabianp/scikit-learn,vigilv/scikit-learn,alexsavio/scikit-learn,fbagirov/scikit-learn,kmike/scikit-learn,jseabold/scikit-learn,xwolf12/scikit-learn,lenovor/scikit-learn,tosolveit/scikit-learn,djgagne/scikit-learn,zihua/scikit-learn,adamgreenhall/scikit-learn,IssamLaradji/scikit-learn,tawsifkhan/scikit-learn,loli/semisupervisedforests,kylerbrown/scikit-learn,pompiduskus/scikit-learn,JosmanPS/scikit-learn,f3r/scikit-learn,huzq/scikit-learn,huobaowangxi/scikit-learn,harshaneelhg/scikit-learn,sarahgrogan/scikit-learn,RachitKansal/scikit-learn,AlexanderFabisch/scikit-learn,elkingtonmcb/scikit-learn,nomadcube/scikit-learn,tdhopper/scikit-learn,zorojean/scikit-learn,sonnyhu/scikit-learn,cybernet14/scikit-learn,jm-begon/scikit-learn,jlegendary/scikit-learn
|
8905993c0daa140b10cb04dca1e7bed7b813ea7a
|
imagedownloader/libs/console.py
|
imagedownloader/libs/console.py
|
import sys
import pyttsx
import aspects
from datetime import datetime
engine = pyttsx.init()
def show(*objs):
begin = '' if '\r' in objs[0] or '\b' in objs[0] else '\n'
sys.stdout.write(begin)
for part in objs:
sys.stdout.write(str(part))
sys.stdout.flush()
def say(speech):
#NOT engine.startLoop()
show(speech)
engine.say(speech)
engine.runAndWait()
progress = ['/','-','\\','|']
def show_progress(i):
show('\b \b', progress[i % len(progress)])
def show_times(*args):
begin = datetime.now()
result = yield aspects.proceed(*args)
end = datetime.now()
say("\t[time consumed: %.2f seconds]\n" % (end - begin).total_seconds())
yield aspects.return_stop(result)
|
import sys
import pyttsx
import aspects
from datetime import datetime
engine = pyttsx.init()
def show(*objs):
begin = '' if '\r' in objs[0] or '\b' in objs[0] else '\n'
sys.stdout.write(begin)
for part in objs:
sys.stdout.write(str(part))
sys.stdout.flush()
def say(speech):
#NOT engine.startLoop()
show(speech)
engine.say(speech)
engine.runAndWait()
progress = ['/','-','\\','|']
def show_progress(i):
show('\b \b', progress[i % len(progress)])
def show_times(*args):
begin = datetime.utcnow().replace(tzinfo=pytz.UTC)
result = yield aspects.proceed(*args)
end = datetime.utcnow().replace(tzinfo=pytz.UTC)
say("\t[time consumed: %.2f seconds]\n" % (end - begin).total_seconds())
yield aspects.return_stop(result)
|
Add UTC timezone to datetimes in the libs folder.
|
Add UTC timezone to datetimes in the libs folder.
|
Python
|
mit
|
ahMarrone/solar_radiation_model,scottlittle/solar_radiation_model,gersolar/solar_radiation_model
|
41beca23fff6eab718550d0ce8d22769653c3109
|
sauce_test/test_suite.py
|
sauce_test/test_suite.py
|
# This contain a list of individual test and will be run from Jenkins.
import unittest
import access_dvn
# This is a list of testFileName.testClass
def suite():
return unittest.TestSuite((\
unittest.makeSuite(access_dvn.AccessDVN),
))
if __name__ == "__main__":
result = unittest.TextTestRunner(verbosity=2).run(suite())
# sys.exit(not result.wasSuccessful())
|
# This contain a list of individual test and will be run from Jenkins.
import unittest
import access_dvn
import test_dataverse
import test_dataset
# This is a list of testFileName.testClass
def suite():
return unittest.TestSuite((\
unittest.makeSuite(access_dvn.AccessDVN),
unittest.makeSuite(test_dataverse.TestDataverseFunctions),
unittest.makeSuite(test_dataset.TestDatasetFunctions),
))
if __name__ == "__main__":
result = unittest.TextTestRunner(verbosity=2).run(suite())
# sys.exit(not result.wasSuccessful())
|
Update test suite to include dataverse and dataset tests.
|
Update test suite to include dataverse and dataset tests.
|
Python
|
apache-2.0
|
ekoi/DANS-DVN-4.6.1,ekoi/DANS-DVN-4.6.1,quarian/dataverse,leeper/dataverse-1,leeper/dataverse-1,bmckinney/dataverse-canonical,bmckinney/dataverse-canonical,JayanthyChengan/dataverse,quarian/dataverse,quarian/dataverse,leeper/dataverse-1,leeper/dataverse-1,JayanthyChengan/dataverse,JayanthyChengan/dataverse,quarian/dataverse,majorseitan/dataverse,bmckinney/dataverse-canonical,JayanthyChengan/dataverse,ekoi/DANS-DVN-4.6.1,quarian/dataverse,majorseitan/dataverse,JayanthyChengan/dataverse,quarian/dataverse,majorseitan/dataverse,jacksonokuhn/dataverse,majorseitan/dataverse,ekoi/DANS-DVN-4.6.1,JayanthyChengan/dataverse,jacksonokuhn/dataverse,jacksonokuhn/dataverse,quarian/dataverse,ekoi/DANS-DVN-4.6.1,majorseitan/dataverse,jacksonokuhn/dataverse,leeper/dataverse-1,leeper/dataverse-1,bmckinney/dataverse-canonical,ekoi/DANS-DVN-4.6.1,jacksonokuhn/dataverse,jacksonokuhn/dataverse,JayanthyChengan/dataverse,bmckinney/dataverse-canonical,leeper/dataverse-1,majorseitan/dataverse,JayanthyChengan/dataverse,leeper/dataverse-1,majorseitan/dataverse,ekoi/DANS-DVN-4.6.1,bmckinney/dataverse-canonical,jacksonokuhn/dataverse,majorseitan/dataverse,bmckinney/dataverse-canonical,jacksonokuhn/dataverse,bmckinney/dataverse-canonical,ekoi/DANS-DVN-4.6.1,quarian/dataverse
|
5c1fad9e6a75ee43d3a3b7bce6c9249cf601b4b9
|
tendrl/commons/objects/cluster_tendrl_context/__init__.py
|
tendrl/commons/objects/cluster_tendrl_context/__init__.py
|
import json
import logging
import os
import socket
import uuid
from tendrl.commons.etcdobj import EtcdObj
from tendrl.commons.utils import cmd_utils
from tendrl.commons import objects
LOG = logging.getLogger(__name__)
class ClusterTendrlContext(objects.BaseObject):
def __init__(
self,
integration_id=None,
cluster_id=None,
cluster_name=None,
sds_name=None,
sds_version=None,
*args, **kwargs):
super(ClusterTendrlContext, self).__init__(*args, **kwargs)
self.value = 'clusters/%s/TendrlContext'
# integration_id is the Tendrl generated cluster UUID
self.integration_id = integration_id
self.cluster_id=cluster_id
self.cluster_name=cluster_name
self.sds_name=sds_name
self.sds_version=sds_version
self._etcd_cls = _ClusterTendrlContextEtcd
class _ClusterTendrlContextEtcd(EtcdObj):
"""A table of the cluster tendrl context, lazily updated
"""
__name__ = 'clusters/%s/TendrlContext'
_tendrl_cls = ClusterTendrlContext
def render(self):
self.__name__ = self.__name__ % NS.node_context.node_id
return super(_ClusterTendrlContextEtcd, self).render()
|
import json
import logging
import os
import socket
import uuid
from tendrl.commons.etcdobj import EtcdObj
from tendrl.commons.utils import cmd_utils
from tendrl.commons import objects
LOG = logging.getLogger(__name__)
class ClusterTendrlContext(objects.BaseObject):
def __init__(
self,
integration_id=None,
cluster_id=None,
cluster_name=None,
sds_name=None,
sds_version=None,
*args, **kwargs):
super(ClusterTendrlContext, self).__init__(*args, **kwargs)
self.value = 'clusters/%s/TendrlContext'
# integration_id is the Tendrl generated cluster UUID
self.integration_id = integration_id
self.cluster_id=cluster_id
self.cluster_name=cluster_name
self.sds_name=sds_name
self.sds_version=sds_version
self._etcd_cls = _ClusterTendrlContextEtcd
class _ClusterTendrlContextEtcd(EtcdObj):
"""A table of the cluster tendrl context, lazily updated
"""
__name__ = 'clusters/%s/TendrlContext'
_tendrl_cls = ClusterTendrlContext
def render(self):
self.__name__ = self.__name__ % NS.tendrl_context.integration_id
return super(_ClusterTendrlContextEtcd, self).render()
|
Write cluster_tendrl_context to proper location
|
Write cluster_tendrl_context to proper location
Currently it is written to clusters/<node-id>/TendrlContext
This is fixed in this PR
tendrl-bug-id: Tendrl/commons#302
Signed-off-by: nnDarshan <d2c6d450ab98b078f2f1942c995e6d92dd504bc8@gmail.com>
|
Python
|
lgpl-2.1
|
r0h4n/commons,Tendrl/commons,rishubhjain/commons
|
c6fbba9da9d1cf2a5a0007a56d192e267d19fcff
|
flexget/utils/database.py
|
flexget/utils/database.py
|
from flexget.manager import Session
def with_session(func):
""""Creates a session if one was not passed via keyword argument to the function"""
def wrapper(*args, **kwargs):
passed_session = kwargs.get('session')
if not passed_session:
session = Session(autoflush=True)
try:
return func(*args, session=session, **kwargs)
finally:
session.close()
else:
return func(*args, **kwargs)
return wrapper
|
from flexget.manager import Session
def with_session(func):
""""Creates a session if one was not passed via keyword argument to the function"""
def wrapper(*args, **kwargs):
if not kwargs.get('session'):
kwargs['session'] = Session(autoflush=True)
try:
return func(*args, **kwargs)
finally:
kwargs['session'].close()
else:
return func(*args, **kwargs)
return wrapper
|
Fix with_session decorator for python 2.5
|
Fix with_session decorator for python 2.5
git-svn-id: ad91b9aa7ba7638d69f912c9f5d012e3326e9f74@1957 3942dd89-8c5d-46d7-aeed-044bccf3e60c
|
Python
|
mit
|
vfrc2/Flexget,tobinjt/Flexget,Pretagonist/Flexget,oxc/Flexget,Danfocus/Flexget,jacobmetrick/Flexget,Flexget/Flexget,spencerjanssen/Flexget,ianstalk/Flexget,xfouloux/Flexget,malkavi/Flexget,asm0dey/Flexget,v17al/Flexget,camon/Flexget,ZefQ/Flexget,cvium/Flexget,jacobmetrick/Flexget,crawln45/Flexget,camon/Flexget,OmgOhnoes/Flexget,tvcsantos/Flexget,spencerjanssen/Flexget,JorisDeRieck/Flexget,gazpachoking/Flexget,LynxyssCZ/Flexget,jacobmetrick/Flexget,patsissons/Flexget,JorisDeRieck/Flexget,patsissons/Flexget,qvazzler/Flexget,lildadou/Flexget,xfouloux/Flexget,sean797/Flexget,patsissons/Flexget,gazpachoking/Flexget,JorisDeRieck/Flexget,lildadou/Flexget,offbyone/Flexget,malkavi/Flexget,drwyrm/Flexget,OmgOhnoes/Flexget,jawilson/Flexget,v17al/Flexget,dsemi/Flexget,poulpito/Flexget,sean797/Flexget,jawilson/Flexget,antivirtel/Flexget,asm0dey/Flexget,antivirtel/Flexget,poulpito/Flexget,ZefQ/Flexget,antivirtel/Flexget,ianstalk/Flexget,qk4l/Flexget,LynxyssCZ/Flexget,ratoaq2/Flexget,crawln45/Flexget,drwyrm/Flexget,drwyrm/Flexget,ibrahimkarahan/Flexget,ZefQ/Flexget,lildadou/Flexget,oxc/Flexget,sean797/Flexget,ianstalk/Flexget,tarzasai/Flexget,malkavi/Flexget,tarzasai/Flexget,vfrc2/Flexget,crawln45/Flexget,tsnoam/Flexget,voriux/Flexget,qvazzler/Flexget,xfouloux/Flexget,spencerjanssen/Flexget,malkavi/Flexget,qk4l/Flexget,Danfocus/Flexget,ibrahimkarahan/Flexget,tobinjt/Flexget,dsemi/Flexget,OmgOhnoes/Flexget,v17al/Flexget,qvazzler/Flexget,Flexget/Flexget,jawilson/Flexget,LynxyssCZ/Flexget,tsnoam/Flexget,dsemi/Flexget,tobinjt/Flexget,thalamus/Flexget,grrr2/Flexget,thalamus/Flexget,cvium/Flexget,tsnoam/Flexget,grrr2/Flexget,LynxyssCZ/Flexget,oxc/Flexget,Danfocus/Flexget,X-dark/Flexget,vfrc2/Flexget,tarzasai/Flexget,thalamus/Flexget,qk4l/Flexget,Pretagonist/Flexget,ratoaq2/Flexget,offbyone/Flexget,JorisDeRieck/Flexget,Flexget/Flexget,ibrahimkarahan/Flexget,cvium/Flexget,poulpito/Flexget,crawln45/Flexget,offbyone/Flexget,X-dark/Flexget,grrr2/Flexget,Flexget/Flexget,Pretagonist/Flexget,Danfocus/Flexget,X-dark/Flexget,voriux/Flexget,jawilson/Flexget,tvcsantos/Flexget,ratoaq2/Flexget,tobinjt/Flexget,asm0dey/Flexget
|
e0d631b4aab431c31689ccd7aa6ac92d95e32e80
|
tests/test_frontend.py
|
tests/test_frontend.py
|
import os
from tvrenamr.cli import helpers
from .base import BaseTest
class TestFrontEnd(BaseTest):
def setup(self):
super(TestFrontEnd, self).setup()
self.config = helpers.get_config()
def test_passing_current_dir_makes_file_list_a_list(self):
assert isinstance(helpers.build_file_list([self.files]), list)
def test_setting_recursive_adds_all_files_below_the_folder(self):
new_folders = ('herp', 'derp', 'test')
os.makedirs(os.path.join(self.files, *new_folders))
def build_folder(folder):
new_files = ('foo', 'bar', 'blah')
for fn in new_files:
with open(os.path.join(self.files, folder, fn), 'w') as f:
f.write('')
build_folder('herp')
build_folder('herp/derp')
build_folder('herp/derp/test')
file_list = helpers.build_file_list([self.files], recursive=True)
for root, dirs, files in os.walk(self.files):
for fn in files:
assert os.path.join(root, fn) in file_list
def test_ignoring_files(self):
ignore = self.random_files(self.files)
file_list = helpers.build_file_list([self.files], ignore_filelist=ignore)
assert all(fn not in file_list for fn in ignore)
|
import collections
import os
import sys
from tvrenamr.cli import helpers
from .utils import random_files
def test_passing_current_dir_makes_file_list_a_list(files):
file_list = helpers.build_file_list([files])
assert isinstance(file_list, collections.Iterable)
PY3 = sys.version_info[0] == 3
string_type = str if PY3 else basestring
text_type = str if PY3 else unicode
assert not isinstance(file_list, (string_type, text_type))
def test_setting_recursive_adds_all_files_below_the_folder(files):
new_folders = ('herp', 'derp', 'test')
os.makedirs(os.path.join(files, *new_folders))
def build_folder(folder):
new_files = ('foo', 'bar', 'blah')
for fn in new_files:
with open(os.path.join(files, folder, fn), 'w') as f:
f.write('')
build_folder('herp')
build_folder('herp/derp')
build_folder('herp/derp/test')
file_list = helpers.build_file_list([files], recursive=True)
for root, dirs, files in os.walk(files):
for fn in files:
assert (root, fn) in file_list
def test_ignoring_files(files):
ignore = random_files(files)
file_list = helpers.build_file_list([files], ignore_filelist=ignore)
assert all(fn not in file_list for fn in ignore)
|
Move to function only tests & fix test for generator based build_file_list
|
Move to function only tests & fix test for generator based build_file_list
build_file_list is a generator now so we need to make sure it returns an
iterable but not a string.
|
Python
|
mit
|
wintersandroid/tvrenamr,ghickman/tvrenamr
|
1d6c17e5adc3df4de86636ef77fc0a406bf065e9
|
scrapi/harvesters/dryad.py
|
scrapi/harvesters/dryad.py
|
'''
Harvester for Dryad for the SHARE project
Example API call: http://www.datadryad.org/oai/request?verb=ListRecords&metadataPrefix=oai_dc
'''
from __future__ import unicode_literals
from scrapi.base import OAIHarvester
class DryadHarvester(OAIHarvester):
short_name = 'dryad'
long_name = 'Dryad Data Repository'
url = 'http://www.datadryad.org/oai/request'
base_url = 'http://www.datadryad.org/oai/request'
property_list = ['rights', 'format', 'relation', 'date',
'identifier', 'type', 'setSpec']
timezone_granularity = True
|
'''
Harvester for Dryad for the SHARE project
Example API call: http://www.datadryad.org/oai/request?verb=ListRecords&metadataPrefix=oai_dc
'''
from __future__ import unicode_literals
from lxml import etree
import logging
from scrapi.base import OAIHarvester
logger = logging.getLogger(__name__)
class DryadHarvester(OAIHarvester):
short_name = 'dryad'
long_name = 'Dryad Data Repository'
url = 'http://www.datadryad.org/oai/request'
base_url = 'http://www.datadryad.org/oai/request'
property_list = ['rights', 'format', 'relation', 'date',
'identifier', 'type', 'setSpec']
timezone_granularity = True
def normalize(self, raw_doc):
str_result = raw_doc.get('doc')
result = etree.XML(str_result)
status = (result.xpath('ns0:header/@status', namespaces=self.namespaces) or [''])[0]
if status.lower() == 'deleted' or status.lower() == 'item is not available':
logger.info('Not normalizing record with ID {}, status {}'.format(raw_doc['docID'], status))
return None
return super(OAIHarvester, self).normalize(raw_doc)
|
Add custom normaluze function that will not get non existant items
|
Add custom normaluze function that will not get non existant items
|
Python
|
apache-2.0
|
icereval/scrapi,CenterForOpenScience/scrapi,fabianvf/scrapi,mehanig/scrapi,alexgarciac/scrapi,erinspace/scrapi,felliott/scrapi,felliott/scrapi,CenterForOpenScience/scrapi,erinspace/scrapi,ostwald/scrapi,fabianvf/scrapi,jeffreyliu3230/scrapi,mehanig/scrapi
|
63709e388ed86892e9771b86daad4a9ec3c0bd44
|
ibei/__init__.py
|
ibei/__init__.py
|
# -*- coding: utf-8 -*-
"""
Base Library (:mod:`ibei`)
==========================
.. currentmodule:: ibei
"""
from .version import __version__
from .uibei import uibei
from .sqsolarcell import SQSolarcell
from .devossolarcell import DeVosSolarcell
|
# -*- coding: utf-8 -*-
"""
Base Library (:mod:`ibei`)
==========================
.. currentmodule:: ibei
"""
from .version import __version__
from .uibei import uibei
|
Remove import of specific models
|
Remove import of specific models
|
Python
|
mit
|
jrsmith3/ibei
|
3ed70bcc0c699744fd4dc3259ca2f0b6ee7e5d6a
|
swampdragon/pubsub_providers/redis_sub_provider.py
|
swampdragon/pubsub_providers/redis_sub_provider.py
|
import json
import tornadoredis.pubsub
import tornadoredis
from .base_provider import BaseProvider
from .redis_settings import get_redis_host, get_redis_port, get_redis_db
class RedisSubProvider(BaseProvider):
def __init__(self):
self._subscriber = tornadoredis.pubsub.SockJSSubscriber(tornadoredis.Client(
host=get_redis_host(),
port=get_redis_port(),
selected_db=get_redis_db()
))
def close(self, broadcaster):
for channel in self._subscriber.subscribers:
if broadcaster in self._subscriber.subscribers[channel]:
self._subscriber.unsubscribe(channel, broadcaster)
def get_channel(self, base_channel, **channel_filter):
return self._construct_channel(base_channel, **channel_filter)
def subscribe(self, channels, broadcaster):
self._subscriber.subscribe(channels, broadcaster)
def unsubscribe(self, channels, broadcaster):
for channel in channels:
if broadcaster in self._subscriber.subscribers[channel]:
self._subscriber.subscribers[channel].pop(broadcaster)
def publish(self, channel, data):
if isinstance(data, dict):
data = json.dumps(data)
broadcasters = list(self._subscriber.subscribers[channel].keys())
if broadcasters:
for bc in broadcasters:
if not bc.session.is_closed:
bc.broadcast(broadcasters, data)
break
|
import json
import tornadoredis.pubsub
import tornadoredis
from .base_provider import BaseProvider
from .redis_settings import get_redis_host, get_redis_port, get_redis_db, get_redis_password
class RedisSubProvider(BaseProvider):
def __init__(self):
self._subscriber = tornadoredis.pubsub.SockJSSubscriber(tornadoredis.Client(
host=get_redis_host(),
port=get_redis_port(),
password=get_redis_password(),
selected_db=get_redis_db()
))
def close(self, broadcaster):
for channel in self._subscriber.subscribers:
if broadcaster in self._subscriber.subscribers[channel]:
self._subscriber.unsubscribe(channel, broadcaster)
def get_channel(self, base_channel, **channel_filter):
return self._construct_channel(base_channel, **channel_filter)
def subscribe(self, channels, broadcaster):
self._subscriber.subscribe(channels, broadcaster)
def unsubscribe(self, channels, broadcaster):
for channel in channels:
if broadcaster in self._subscriber.subscribers[channel]:
self._subscriber.subscribers[channel].pop(broadcaster)
def publish(self, channel, data):
if isinstance(data, dict):
data = json.dumps(data)
broadcasters = list(self._subscriber.subscribers[channel].keys())
if broadcasters:
for bc in broadcasters:
if not bc.session.is_closed:
bc.broadcast(broadcasters, data)
break
|
Add auth step to baseprovider for Redis connection pools
|
Add auth step to baseprovider for Redis connection pools
|
Python
|
bsd-3-clause
|
denizs/swampdragon,jonashagstedt/swampdragon,jonashagstedt/swampdragon,denizs/swampdragon,denizs/swampdragon,jonashagstedt/swampdragon
|
0c1a0a70154ddf107a6174d49793e369d28f1beb
|
openstack_dashboard/views.py
|
openstack_dashboard/views.py
|
# vim: tabstop=4 shiftwidth=4 softtabstop=4
# Copyright 2012 Nebula, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
from django import shortcuts
from django.views.decorators import vary
import horizon
from openstack_auth import views
def get_user_home(user):
if user.is_superuser:
return horizon.get_dashboard('admin').get_absolute_url()
return horizon.get_dashboard('project').get_absolute_url()
@vary.vary_on_cookie
def splash(request):
if request.user.is_authenticated():
return shortcuts.redirect(horizon.get_user_home(request.user))
form = views.Login(request)
request.session.clear()
request.session.set_test_cookie()
return shortcuts.render(request, 'splash.html', {'form': form})
|
# vim: tabstop=4 shiftwidth=4 softtabstop=4
# Copyright 2012 Nebula, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
from django import shortcuts
from django.views.decorators import vary
import horizon
from horizon import base
from openstack_auth import views
def get_user_home(user):
dashboard = None
if user.is_superuser:
try:
dashboard = horizon.get_dashboard('admin')
except base.NotRegistered:
pass
if dashboard is None:
dashboard = horizon.get_default_dashboard()
return dashboard.get_absolute_url()
@vary.vary_on_cookie
def splash(request):
if request.user.is_authenticated():
return shortcuts.redirect(horizon.get_user_home(request.user))
form = views.Login(request)
request.session.clear()
request.session.set_test_cookie()
return shortcuts.render(request, 'splash.html', {'form': form})
|
Fix default get_user_home with dynamic dashboards
|
Fix default get_user_home with dynamic dashboards
The existing get_user_home implementation expects both the 'admin'
and 'project' dashboards to exist and throws an exception if they
are missing. With the inclusion of configurable dashboard loading,
we can no longer count on certain dashboards being loaded.
Closes-Bug: #1293727
Change-Id: I4ee0b7b313f4e1b27c0daea829c8b38282fa78d9
|
Python
|
apache-2.0
|
bigswitch/horizon,tsufiev/horizon,froyobin/horizon,NeCTAR-RC/horizon,kfox1111/horizon,NeCTAR-RC/horizon,yjxtogo/horizon,RudoCris/horizon,watonyweng/horizon,philoniare/horizon,philoniare/horizon,noironetworks/horizon,eayunstack/horizon,CiscoSystems/avos,Dark-Hacker/horizon,zouyapeng/horizon,nvoron23/avos,mrunge/horizon,xinwu/horizon,agileblaze/OpenStackTwoFactorAuthentication,VaneCloud/horizon,mdavid/horizon,gerrive/horizon,mrunge/openstack_horizon,Daniex/horizon,openstack/horizon,orbitfp7/horizon,yeming233/horizon,kfox1111/horizon,Solinea/horizon,xinwu/horizon,damien-dg/horizon,tqtran7/horizon,mrunge/openstack_horizon,flochaz/horizon,tanglei528/horizon,doug-fish/horizon,Daniex/horizon,wolverineav/horizon,dan1/horizon-x509,saydulk/horizon,ChameleonCloud/horizon,Solinea/horizon,yeming233/horizon,anthonydillon/horizon,tellesnobrega/horizon,Tesora/tesora-horizon,wolverineav/horizon,VaneCloud/horizon,Mirantis/mos-horizon,henaras/horizon,pranavtendolkr/horizon,NCI-Cloud/horizon,eayunstack/horizon,blueboxgroup/horizon,yjxtogo/horizon,takeshineshiro/horizon,tellesnobrega/horizon,pranavtendolkr/horizon,endorphinl/horizon,tanglei528/horizon,davidcusatis/horizon,endorphinl/horizon,yjxtogo/horizon,endorphinl/horizon,anthonydillon/horizon,CiscoSystems/horizon,saydulk/horizon,Metaswitch/horizon,mrunge/openstack_horizon,mdavid/horizon,idjaw/horizon,watonyweng/horizon,sandvine/horizon,maestro-hybrid-cloud/horizon,django-leonardo/horizon,pranavtendolkr/horizon,VaneCloud/horizon,izadorozhna/dashboard_integration_tests,henaras/horizon,karthik-suresh/horizon,kfox1111/horizon,CiscoSystems/avos,saydulk/horizon,coreycb/horizon,eayunstack/horizon,dan1/horizon-x509,j4/horizon,maestro-hybrid-cloud/horizon,FNST-OpenStack/horizon,aaronorosen/horizon-congress,xinwu/horizon,VaneCloud/horizon,Hodorable/0602,mandeepdhami/horizon,newrocknj/horizon,NCI-Cloud/horizon,aaronorosen/horizon-congress,kfox1111/horizon,endorphinl/horizon-fork,redhat-cip/horizon,CiscoSystems/avos,j4/horizon,watonyweng/horizon,FNST-OpenStack/horizon,bac/horizon,NCI-Cloud/horizon,endorphinl/horizon,RudoCris/horizon,orbitfp7/horizon,coreycb/horizon,saydulk/horizon,luhanhan/horizon,dan1/horizon-proto,henaras/horizon,luhanhan/horizon,tqtran7/horizon,tellesnobrega/horizon,doug-fish/horizon,ging/horizon,mrunge/horizon_lib,vladryk/horizon,Dark-Hacker/horizon,Metaswitch/horizon,CiscoSystems/horizon,icloudrnd/automation_tools,sandvine/horizon,luhanhan/horizon,idjaw/horizon,flochaz/horizon,NCI-Cloud/horizon,JioCloud/horizon,damien-dg/horizon,django-leonardo/horizon,luhanhan/horizon,flochaz/horizon,wolverineav/horizon,FNST-OpenStack/horizon,takeshineshiro/horizon,Tesora/tesora-horizon,CiscoSystems/horizon,promptworks/horizon,xme1226/horizon,zouyapeng/horizon,django-leonardo/horizon,nvoron23/avos,Dark-Hacker/horizon,endorphinl/horizon-fork,BiznetGIO/horizon,mandeepdhami/horizon,Metaswitch/horizon,redhat-cip/horizon,coreycb/horizon,noironetworks/horizon,Daniex/horizon,Dark-Hacker/horizon,ChameleonCloud/horizon,mdavid/horizon,tsufiev/horizon,yeming233/horizon,CiscoSystems/horizon,JioCloud/horizon,xme1226/horizon,idjaw/horizon,bigswitch/horizon,ging/horizon,Metaswitch/horizon,BiznetGIO/horizon,karthik-suresh/horizon,mdavid/horizon,Daniex/horizon,philoniare/horizon,vladryk/horizon,froyobin/horizon,django-leonardo/horizon,agileblaze/OpenStackTwoFactorAuthentication,Solinea/horizon,mandeepdhami/horizon,newrocknj/horizon,wangxiangyu/horizon,philoniare/horizon,anthonydillon/horizon,gerrive/horizon,openstack/horizon,redhat-openstack/horizon,doug-fish/horizon,Mirantis/mos-horizon,nvoron23/avos,vladryk/horizon,endorphinl/horizon-fork,liyitest/rr,zouyapeng/horizon,openstack/horizon,icloudrnd/automation_tools,liyitest/rr,tqtran7/horizon,Mirantis/mos-horizon,j4/horizon,yjxtogo/horizon,wolverineav/horizon,ging/horizon,zouyapeng/horizon,henaras/horizon,promptworks/horizon,promptworks/horizon,endorphinl/horizon-fork,promptworks/horizon,blueboxgroup/horizon,blueboxgroup/horizon,tsufiev/horizon,blueboxgroup/horizon,BiznetGIO/horizon,ChameleonCloud/horizon,yeming233/horizon,Mirantis/mos-horizon,noironetworks/horizon,tqtran7/horizon,davidcusatis/horizon,bac/horizon,redhat-cip/horizon,froyobin/horizon,pranavtendolkr/horizon,liyitest/rr,newrocknj/horizon,redhat-openstack/horizon,tsufiev/horizon,Tesora/tesora-horizon,anthonydillon/horizon,wangxiangyu/horizon,dan1/horizon-x509,davidcusatis/horizon,bigswitch/horizon,redhat-openstack/horizon,dan1/horizon-proto,karthik-suresh/horizon,wangxiangyu/horizon,doug-fish/horizon,ging/horizon,JioCloud/horizon,watonyweng/horizon,takeshineshiro/horizon,sandvine/horizon,damien-dg/horizon,NeCTAR-RC/horizon,davidcusatis/horizon,mandeepdhami/horizon,bigswitch/horizon,aaronorosen/horizon-congress,karthik-suresh/horizon,idjaw/horizon,izadorozhna/dashboard_integration_tests,mrunge/horizon_lib,vladryk/horizon,Hodorable/0602,agileblaze/OpenStackTwoFactorAuthentication,xme1226/horizon,orbitfp7/horizon,BiznetGIO/horizon,mrunge/horizon_lib,noironetworks/horizon,gerrive/horizon,Hodorable/0602,agileblaze/OpenStackTwoFactorAuthentication,takeshineshiro/horizon,dan1/horizon-proto,maestro-hybrid-cloud/horizon,CiscoSystems/avos,damien-dg/horizon,sandvine/horizon,mrunge/horizon,FNST-OpenStack/horizon,wangxiangyu/horizon,Solinea/horizon,newrocknj/horizon,dan1/horizon-x509,j4/horizon,RudoCris/horizon,redhat-openstack/horizon,coreycb/horizon,orbitfp7/horizon,gerrive/horizon,mrunge/horizon,RudoCris/horizon,dan1/horizon-proto,tanglei528/horizon,openstack/horizon,icloudrnd/automation_tools,flochaz/horizon,nvoron23/avos,icloudrnd/automation_tools,NeCTAR-RC/horizon,bac/horizon,ChameleonCloud/horizon,redhat-cip/horizon,Hodorable/0602,maestro-hybrid-cloud/horizon,liyitest/rr,bac/horizon,Tesora/tesora-horizon,tellesnobrega/horizon,xinwu/horizon
|
da466b391470333492a56395569812653ed6658f
|
compose/cli/__init__.py
|
compose/cli/__init__.py
|
from __future__ import absolute_import
from __future__ import print_function
from __future__ import unicode_literals
import subprocess
import sys
# Attempt to detect https://github.com/docker/compose/issues/4344
try:
# We don't try importing pip because it messes with package imports
# on some Linux distros (Ubuntu, Fedora)
# https://github.com/docker/compose/issues/4425
# https://github.com/docker/compose/issues/4481
# https://github.com/pypa/pip/blob/master/pip/_vendor/__init__.py
s_cmd = subprocess.Popen(
['pip', 'freeze'], stderr=subprocess.PIPE, stdout=subprocess.PIPE
)
packages = s_cmd.communicate()[0].splitlines()
dockerpy_installed = len(
list(filter(lambda p: p.startswith(b'docker-py=='), packages))
) > 0
if dockerpy_installed:
from .colors import red
print(
red('ERROR:'),
"Dependency conflict: an older version of the 'docker-py' package "
"is polluting the namespace. "
"Run the following command to remedy the issue:\n"
"pip uninstall docker docker-py; pip install docker",
file=sys.stderr
)
sys.exit(1)
except OSError:
# pip command is not available, which indicates it's probably the binary
# distribution of Compose which is not affected
pass
|
from __future__ import absolute_import
from __future__ import print_function
from __future__ import unicode_literals
import subprocess
import sys
# Attempt to detect https://github.com/docker/compose/issues/4344
try:
# We don't try importing pip because it messes with package imports
# on some Linux distros (Ubuntu, Fedora)
# https://github.com/docker/compose/issues/4425
# https://github.com/docker/compose/issues/4481
# https://github.com/pypa/pip/blob/master/pip/_vendor/__init__.py
s_cmd = subprocess.Popen(
['pip', 'freeze'], stderr=subprocess.PIPE, stdout=subprocess.PIPE
)
packages = s_cmd.communicate()[0].splitlines()
dockerpy_installed = len(
list(filter(lambda p: p.startswith(b'docker-py=='), packages))
) > 0
if dockerpy_installed:
from .colors import yellow
print(
yellow('WARNING:'),
"Dependency conflict: an older version of the 'docker-py' package "
"may be polluting the namespace. "
"If you're experiencing crashes, run the following command to remedy the issue:\n"
"pip uninstall docker-py; pip uninstall docker; pip install docker",
file=sys.stderr
)
except OSError:
# pip command is not available, which indicates it's probably the binary
# distribution of Compose which is not affected
pass
|
Change docker-py dependency error to a warning, update fix command
|
Change docker-py dependency error to a warning, update fix command
Signed-off-by: Joffrey F <2e95f49799afcec0080c0aeb8813776d949e0768@docker.com>
|
Python
|
apache-2.0
|
thaJeztah/compose,shin-/compose,vdemeester/compose,sdurrheimer/compose,sdurrheimer/compose,schmunk42/compose,hoogenm/compose,jrabbit/compose,dnephin/compose,dnephin/compose,schmunk42/compose,swoopla/compose,funkyfuture/docker-compose,shin-/compose,thaJeztah/compose,hoogenm/compose,funkyfuture/docker-compose,jrabbit/compose,swoopla/compose,vdemeester/compose
|
74b31ba7fec330ec167c2e001f60695272da71b8
|
pages/views.py
|
pages/views.py
|
from django.views import generic
from django.contrib.auth.models import Group
from django_countries.fields import Country
from hosting.models import Profile, Place
from hosting.utils import sort_by_name
class AboutView(generic.TemplateView):
template_name = 'pages/about.html'
about = AboutView.as_view()
class TermsAndConditionsView(generic.TemplateView):
template_name = 'pages/terms_conditions.html'
terms_conditions = TermsAndConditionsView.as_view()
class SupervisorsView(generic.TemplateView):
template_name = 'pages/supervisors.html'
def countries(self):
places = Place.objects.filter(in_book=True)
groups = Group.objects.exclude(user=None)
countries = sort_by_name({p.country for p in places})
for country in countries:
try:
group = groups.get(name=str(country))
country.supervisors = sorted(user.profile for user in group.user_set.all())
except Group.DoesNotExist:
pass
country.place_count = places.filter(country=country).count()
return countries
supervisors = SupervisorsView.as_view()
class FaqView(generic.TemplateView):
template_name = 'pages/faq.html'
faq = FaqView.as_view()
|
from django.views import generic
from django.contrib.auth.models import Group
from hosting.models import Place
from hosting.utils import sort_by_name
class AboutView(generic.TemplateView):
template_name = 'pages/about.html'
about = AboutView.as_view()
class TermsAndConditionsView(generic.TemplateView):
template_name = 'pages/terms_conditions.html'
terms_conditions = TermsAndConditionsView.as_view()
class SupervisorsView(generic.TemplateView):
template_name = 'pages/supervisors.html'
def countries(self):
places = Place.available_objects.filter(in_book=True)
groups = Group.objects.exclude(user=None)
countries = sort_by_name({p.country for p in places})
for country in countries:
try:
group = groups.get(name=str(country))
country.supervisors = sorted(user.profile for user in group.user_set.all())
except Group.DoesNotExist:
pass
country.place_count = places.filter(country=country).count()
return countries
supervisors = SupervisorsView.as_view()
class FaqView(generic.TemplateView):
template_name = 'pages/faq.html'
faq = FaqView.as_view()
|
Fix numbers in LO list.
|
Fix numbers in LO list.
|
Python
|
agpl-3.0
|
batisteo/pasportaservo,tejo-esperanto/pasportaservo,tejo-esperanto/pasportaservo,tejo-esperanto/pasportaservo,tejo-esperanto/pasportaservo,batisteo/pasportaservo,batisteo/pasportaservo,batisteo/pasportaservo
|
1f947d6cfe05f32ffa6566714e5aeeb74543a932
|
osf/migrations/0095_migration_comments.py
|
osf/migrations/0095_migration_comments.py
|
from __future__ import unicode_literals
from django.db import migrations
import logging
logger = logging.getLogger(__file__)
def update_comment_root_target(state, *args, **kwargs):
Comment = state.get_model('osf', 'comment')
comments = Comment.objects.filter(is_deleted=False)
count = 0
for comment in comments:
if comment.root_target:
if hasattr(comment.root_target.referent, 'is_deleted') and comment.root_target.referent.is_deleted:
comment.root_target = None
comment.save()
count += 1
if hasattr(comment.root_target.referent, 'deleted') and comment.root_target.referent.deleted:
comment.root_target = None
comment.save()
count += 1
logger.info('Total download number of commnet migrated is {}.'.format(count))
class Migration(migrations.Migration):
dependencies = [
('osf', '0094_update_preprintprovider_group_auth'),
]
operations = [
migrations.RunPython(update_comment_root_target)
]
|
from __future__ import unicode_literals
import logging
from django.db import migrations
from django_bulk_update.helper import bulk_update
logger = logging.getLogger(__file__)
def update_comment_root_target(state, *args, **kwargs):
Comment = state.get_model('osf', 'comment')
comments = Comment.objects.exclude(is_deleted=True).select_related('root_target')
logger.info('{} comments to check'.format(comments.count()))
comments_to_update = []
for comment in comments:
if comment.root_target:
root_target_ctype = comment.root_target.content_type
root_target_model_cls = state.get_model(root_target_ctype.app_label, root_target_ctype.model)
root_target = root_target_model_cls.objects.get(pk=comment.root_target.object_id)
if hasattr(root_target, 'is_deleted') and root_target.is_deleted:
logger.info('{} is deleted. Setting Comment {} root_target to None'.format(root_target, comment.pk))
comment.root_target = None
comments_to_update.append(comment)
if hasattr(root_target, 'deleted') and root_target.deleted:
logger.info('{} is deleted. Setting Comment {} root_target to None'.format(root_target, comment.pk))
comment.root_target = None
comments_to_update.append(comment)
bulk_update(comments_to_update, update_fields=['root_target'])
logger.info('Total comments migrated: {}.'.format(len(comments_to_update)))
class Migration(migrations.Migration):
dependencies = [
('osf', '0094_update_preprintprovider_group_auth'),
]
operations = [
migrations.RunPython(update_comment_root_target)
]
|
Fix loading root_target in migration
|
Fix loading root_target in migration
Migrations don't allow accessing generic foreign keys, so we
need to load root_target manually.
Also:
* add more logging
* Bulk-update comments
|
Python
|
apache-2.0
|
caseyrollins/osf.io,pattisdr/osf.io,HalcyonChimera/osf.io,erinspace/osf.io,mfraezz/osf.io,mfraezz/osf.io,felliott/osf.io,sloria/osf.io,aaxelb/osf.io,icereval/osf.io,felliott/osf.io,mattclark/osf.io,baylee-d/osf.io,Johnetordoff/osf.io,erinspace/osf.io,pattisdr/osf.io,sloria/osf.io,Johnetordoff/osf.io,mfraezz/osf.io,icereval/osf.io,CenterForOpenScience/osf.io,mattclark/osf.io,brianjgeiger/osf.io,sloria/osf.io,CenterForOpenScience/osf.io,HalcyonChimera/osf.io,brianjgeiger/osf.io,icereval/osf.io,cslzchen/osf.io,adlius/osf.io,CenterForOpenScience/osf.io,caseyrollins/osf.io,adlius/osf.io,caseyrollins/osf.io,HalcyonChimera/osf.io,cslzchen/osf.io,mattclark/osf.io,Johnetordoff/osf.io,HalcyonChimera/osf.io,brianjgeiger/osf.io,felliott/osf.io,adlius/osf.io,adlius/osf.io,baylee-d/osf.io,cslzchen/osf.io,aaxelb/osf.io,baylee-d/osf.io,Johnetordoff/osf.io,saradbowman/osf.io,saradbowman/osf.io,aaxelb/osf.io,CenterForOpenScience/osf.io,aaxelb/osf.io,erinspace/osf.io,brianjgeiger/osf.io,pattisdr/osf.io,cslzchen/osf.io,mfraezz/osf.io,felliott/osf.io
|
98f37bb6fff90d9a4385ceea5454f0b5146e6dee
|
wagtail/wagtailimages/rich_text.py
|
wagtail/wagtailimages/rich_text.py
|
from wagtail.wagtailimages.models import get_image_model
from wagtail.wagtailimages.formats import get_image_format
class ImageEmbedHandler(object):
"""
ImageEmbedHandler will be invoked whenever we encounter an element in HTML content
with an attribute of data-embedtype="image". The resulting element in the database
representation will be:
<embed embedtype="image" id="42" format="thumb" alt="some custom alt text">
"""
@staticmethod
def get_db_attributes(tag):
"""
Given a tag that we've identified as an image embed (because it has a
data-embedtype="image" attribute), return a dict of the attributes we should
have on the resulting <embed> element.
"""
return {
'id': tag['data-id'],
'format': tag['data-format'],
'alt': tag['data-alt'],
}
@staticmethod
def expand_db_attributes(attrs, for_editor):
"""
Given a dict of attributes from the <embed> tag, return the real HTML
representation.
"""
Image = get_image_model()
try:
image = Image.objects.get(id=attrs['id'])
format = get_image_format(attrs['format'])
if for_editor:
try:
return format.image_to_editor_html(image, attrs['alt'])
except:
return ''
else:
return format.image_to_html(image, attrs['alt'])
except Image.DoesNotExist:
return "<img>"
|
from wagtail.wagtailimages.models import get_image_model
from wagtail.wagtailimages.formats import get_image_format
class ImageEmbedHandler(object):
"""
ImageEmbedHandler will be invoked whenever we encounter an element in HTML content
with an attribute of data-embedtype="image". The resulting element in the database
representation will be:
<embed embedtype="image" id="42" format="thumb" alt="some custom alt text">
"""
@staticmethod
def get_db_attributes(tag):
"""
Given a tag that we've identified as an image embed (because it has a
data-embedtype="image" attribute), return a dict of the attributes we should
have on the resulting <embed> element.
"""
return {
'id': tag['data-id'],
'format': tag['data-format'],
'alt': tag['data-alt'],
}
@staticmethod
def expand_db_attributes(attrs, for_editor):
"""
Given a dict of attributes from the <embed> tag, return the real HTML
representation.
"""
Image = get_image_model()
try:
image = Image.objects.get(id=attrs['id'])
except Image.DoesNotExist:
return "<img>"
format = get_image_format(attrs['format'])
if for_editor:
return format.image_to_editor_html(image, attrs['alt'])
else:
return format.image_to_html(image, attrs['alt'])
|
Remove bare except in unnecessary try block
|
Remove bare except in unnecessary try block
From a comment by @gasman on #1684:
> It appears the try/catch in ImageEmbedHandler was added here: 74b9f43
>
> Since the rest of the commit doesn't deal with images at all, and the
> commit makes it clear that the corresponding change to
> MediaEmbedHandler was intended to preserve the existing 'fail
> silently' behaviour in the light of the new exceptions added for media
> embeds - I think this try/catch is redundant. `Format.image_to_html`
> does its own catching of image IO errors, which seems to be
> sufficiently robust (if it wasn't, we'd be seeing errors on front-end
> page rendering), so I think this try/catch can reasonably be deleted.
https://github.com/torchbox/wagtail/pull/1684#issuecomment-140695060
|
Python
|
bsd-3-clause
|
mikedingjan/wagtail,Toshakins/wagtail,nutztherookie/wagtail,quru/wagtail,mayapurmedia/wagtail,iansprice/wagtail,mixxorz/wagtail,zerolab/wagtail,iansprice/wagtail,takeflight/wagtail,gogobook/wagtail,mixxorz/wagtail,hamsterbacke23/wagtail,FlipperPA/wagtail,kurtw/wagtail,davecranwell/wagtail,chrxr/wagtail,nrsimha/wagtail,kaedroho/wagtail,hanpama/wagtail,kurtw/wagtail,rsalmaso/wagtail,rsalmaso/wagtail,serzans/wagtail,nealtodd/wagtail,nealtodd/wagtail,mayapurmedia/wagtail,gasman/wagtail,gasman/wagtail,thenewguy/wagtail,mayapurmedia/wagtail,Toshakins/wagtail,wagtail/wagtail,timorieber/wagtail,gogobook/wagtail,davecranwell/wagtail,FlipperPA/wagtail,takeflight/wagtail,nilnvoid/wagtail,thenewguy/wagtail,gogobook/wagtail,torchbox/wagtail,hamsterbacke23/wagtail,iansprice/wagtail,Tivix/wagtail,davecranwell/wagtail,quru/wagtail,nimasmi/wagtail,thenewguy/wagtail,davecranwell/wagtail,kurtrwall/wagtail,takeflight/wagtail,nutztherookie/wagtail,gogobook/wagtail,serzans/wagtail,zerolab/wagtail,iansprice/wagtail,nrsimha/wagtail,nealtodd/wagtail,nutztherookie/wagtail,JoshBarr/wagtail,inonit/wagtail,kurtrwall/wagtail,torchbox/wagtail,FlipperPA/wagtail,JoshBarr/wagtail,wagtail/wagtail,chrxr/wagtail,torchbox/wagtail,nimasmi/wagtail,zerolab/wagtail,wagtail/wagtail,timorieber/wagtail,nimasmi/wagtail,FlipperPA/wagtail,Toshakins/wagtail,thenewguy/wagtail,timorieber/wagtail,mayapurmedia/wagtail,jnns/wagtail,rsalmaso/wagtail,inonit/wagtail,gasman/wagtail,kaedroho/wagtail,nrsimha/wagtail,Tivix/wagtail,rsalmaso/wagtail,Toshakins/wagtail,Tivix/wagtail,hanpama/wagtail,inonit/wagtail,kurtw/wagtail,kaedroho/wagtail,takeflight/wagtail,hanpama/wagtail,serzans/wagtail,chrxr/wagtail,mixxorz/wagtail,mikedingjan/wagtail,hamsterbacke23/wagtail,zerolab/wagtail,mikedingjan/wagtail,mixxorz/wagtail,wagtail/wagtail,kaedroho/wagtail,mikedingjan/wagtail,kaedroho/wagtail,zerolab/wagtail,nrsimha/wagtail,mixxorz/wagtail,kurtrwall/wagtail,JoshBarr/wagtail,inonit/wagtail,nealtodd/wagtail,quru/wagtail,nilnvoid/wagtail,timorieber/wagtail,nimasmi/wagtail,thenewguy/wagtail,hamsterbacke23/wagtail,gasman/wagtail,nilnvoid/wagtail,chrxr/wagtail,kurtrwall/wagtail,kurtw/wagtail,Tivix/wagtail,jnns/wagtail,torchbox/wagtail,nutztherookie/wagtail,hanpama/wagtail,jnns/wagtail,nilnvoid/wagtail,jnns/wagtail,JoshBarr/wagtail,wagtail/wagtail,quru/wagtail,rsalmaso/wagtail,serzans/wagtail,gasman/wagtail
|
87e8d128fcd944c265c06bc82d8947fcdbb2c360
|
pyconcz_2016/team/models.py
|
pyconcz_2016/team/models.py
|
from django.db import models
class Organizer(models.Model):
full_name = models.CharField(max_length=200)
email = models.EmailField(
default='', blank=True,
help_text="This is private")
twitter = models.CharField(max_length=255, blank=True)
github = models.CharField(max_length=255, blank=True)
photo = models.ImageField(upload_to='team/pyconcz2016/')
published = models.BooleanField(default=False)
|
from django.db import models
class Organizer(models.Model):
full_name = models.CharField(max_length=200)
email = models.EmailField(
default='', blank=True,
help_text="This is private")
twitter = models.CharField(max_length=255, blank=True)
github = models.CharField(max_length=255, blank=True)
photo = models.ImageField(upload_to='team/pyconcz2016/')
published = models.BooleanField(default=False)
def __str__(self):
return self.full_name
|
Revert "Revert "Add string representation of organizer object""
|
Revert "Revert "Add string representation of organizer object""
This reverts commit 36aff772ba6720acb8f629e89954162f98a932e3.
|
Python
|
mit
|
benabraham/cz.pycon.org-2017,pyvec/cz.pycon.org-2017,pyvec/cz.pycon.org-2016,benabraham/cz.pycon.org-2017,benabraham/cz.pycon.org-2017,pyvec/cz.pycon.org-2016,pyvec/cz.pycon.org-2016,pyvec/cz.pycon.org-2017,pyvec/cz.pycon.org-2017
|
81b1cf6973dde3ca23bbe5ac071d3decad81079a
|
pydsa/sleep_sort.py
|
pydsa/sleep_sort.py
|
from time import sleep
from threading import Timer
# Sleep Sort ;)
# Complexity: O(max(input)+n)
def sleep_sort(a):
"""
Sorts the list 'a' using Sleep sort algorithm
>>> from pydsa import sleep_sort
>>> a = [3, 4, 2]
>>> sleep_sort(a)
[2, 3, 4]
"""
sleep_sort.result = []
def add1(x):
sleep_sort.result.append(x)
mx = a[0]
for v in a:
if mx < v: mx = v
Timer(v, add1, [v]).start()
sleep(mx + 1)
return sleep_sort.result
|
from time import sleep
from threading import Timer
# Sleep Sort ;)
# Complexity: O(max(input)+n)
def sleep_sort(a):
"""
Sorts the list 'a' using Sleep sort algorithm
>>> from pydsa import sleep_sort
>>> a = [3, 4, 2]
>>> sleep_sort(a)
[2, 3, 4]
"""
sleep_sort.result = []
def add1(x):
sleep_sort.result.append(x)
mx = a[0]
for v in a:
if mx < v:
mx = v
Timer(v, add1, [v]).start()
sleep(mx + 1)
return sleep_sort.result
|
Format code according to PEP8
|
Format code according to PEP8
|
Python
|
bsd-3-clause
|
rehassachdeva/pydsa,aktech/pydsa
|
eca911a1b1623368f991dbf47002c0b59abc15db
|
script/lib/config.py
|
script/lib/config.py
|
#!/usr/bin/env python
NODE_VERSION = 'v0.11.10'
BASE_URL = 'https://gh-contractor-zcbenz.s3.amazonaws.com/libchromiumcontent'
LIBCHROMIUMCONTENT_COMMIT = '1df8e7cdac8aa74c91c19ae0691ce512d560ab3e'
|
#!/usr/bin/env python
NODE_VERSION = 'v0.11.10'
BASE_URL = 'https://gh-contractor-zcbenz.s3.amazonaws.com/libchromiumcontent'
LIBCHROMIUMCONTENT_COMMIT = 'aa4874a6bcc51fdd87ca7ae0928514ce83645988'
|
Update libchromiumcontent: Suppress CFAllocator warning.
|
Update libchromiumcontent: Suppress CFAllocator warning.
|
Python
|
mit
|
jjz/electron,Ivshti/electron,howmuchcomputer/electron,simonfork/electron,takashi/electron,SufianHassan/electron,micalan/electron,tylergibson/electron,Gerhut/electron,mattdesl/electron,edulan/electron,edulan/electron,d-salas/electron,gerhardberger/electron,micalan/electron,brenca/electron,stevekinney/electron,pandoraui/electron,rreimann/electron,Jacobichou/electron,SufianHassan/electron,bright-sparks/electron,sshiting/electron,dongjoon-hyun/electron,bpasero/electron,neutrous/electron,mattotodd/electron,shennushi/electron,SufianHassan/electron,dahal/electron,DivyaKMenon/electron,dongjoon-hyun/electron,roadev/electron,aichingm/electron,kokdemo/electron,coderhaoxin/electron,JussMee15/electron,Jonekee/electron,faizalpribadi/electron,pirafrank/electron,mjaniszew/electron,shiftkey/electron,mjaniszew/electron,felixrieseberg/electron,deepak1556/atom-shell,aliib/electron,RIAEvangelist/electron,wan-qy/electron,thingsinjars/electron,takashi/electron,vHanda/electron,cqqccqc/electron,kokdemo/electron,kikong/electron,natgolov/electron,darwin/electron,LadyNaggaga/electron,iftekeriba/electron,d-salas/electron,Zagorakiss/electron,jacksondc/electron,bpasero/electron,eric-seekas/electron,Ivshti/electron,ianscrivener/electron,eric-seekas/electron,farmisen/electron,tonyganch/electron,yalexx/electron,michaelchiche/electron,GoooIce/electron,kcrt/electron,DivyaKMenon/electron,aliib/electron,jtburke/electron,cos2004/electron,Neron-X5/electron,shaundunne/electron,systembugtj/electron,brave/muon,kazupon/electron,jacksondc/electron,coderhaoxin/electron,micalan/electron,kenmozi/electron,arusakov/electron,abhishekgahlot/electron,simonfork/electron,jjz/electron,deed02392/electron,natgolov/electron,gbn972/electron,arturts/electron,preco21/electron,JesselJohn/electron,natgolov/electron,mrwizard82d1/electron,kenmozi/electron,subblue/electron,beni55/electron,yalexx/electron,adcentury/electron,biblerule/UMCTelnetHub,mjaniszew/electron,astoilkov/electron,ervinb/electron,aliib/electron,christian-bromann/electron,astoilkov/electron,fffej/electron,seanchas116/electron,Floato/electron,thompsonemerson/electron,etiktin/electron,shennushi/electron,chrisswk/electron,adamjgray/electron,jjz/electron,iftekeriba/electron,thingsinjars/electron,simongregory/electron,christian-bromann/electron,seanchas116/electron,MaxWhere/electron,gabrielPeart/electron,MaxGraey/electron,trigrass2/electron,soulteary/electron,fabien-d/electron,bobwol/electron,vHanda/electron,neutrous/electron,beni55/electron,voidbridge/electron,miniak/electron,John-Lin/electron,saronwei/electron,brave/electron,jhen0409/electron,tomashanacek/electron,BionicClick/electron,matiasinsaurralde/electron,LadyNaggaga/electron,systembugtj/electron,webmechanicx/electron,micalan/electron,subblue/electron,rhencke/electron,abhishekgahlot/electron,leethomas/electron,abhishekgahlot/electron,vHanda/electron,howmuchcomputer/electron,destan/electron,mirrh/electron,trigrass2/electron,nicobot/electron,pombredanne/electron,jonatasfreitasv/electron,JussMee15/electron,iftekeriba/electron,ervinb/electron,neutrous/electron,takashi/electron,gabrielPeart/electron,preco21/electron,ankitaggarwal011/electron,xiruibing/electron,simongregory/electron,gabriel/electron,the-ress/electron,mjaniszew/electron,gamedevsam/electron,felixrieseberg/electron,bright-sparks/electron,nagyistoce/electron-atom-shell,seanchas116/electron,JussMee15/electron,minggo/electron,synaptek/electron,gerhardberger/electron,zhakui/electron,anko/electron,RobertJGabriel/electron,medixdev/electron,bpasero/electron,jjz/electron,lzpfmh/electron,pandoraui/electron,nicholasess/electron,evgenyzinoviev/electron,pirafrank/electron,mirrh/electron,vaginessa/electron,kcrt/electron,pandoraui/electron,timruffles/electron,aaron-goshine/electron,beni55/electron,GoooIce/electron,RobertJGabriel/electron,bitemyapp/electron,kazupon/electron,robinvandernoord/electron,eric-seekas/electron,eriser/electron,MaxWhere/electron,yalexx/electron,lrlna/electron,jannishuebl/electron,Evercoder/electron,natgolov/electron,cqqccqc/electron,digideskio/electron,kenmozi/electron,renaesop/electron,lrlna/electron,kostia/electron,tomashanacek/electron,jlord/electron,stevekinney/electron,joaomoreno/atom-shell,the-ress/electron,chriskdon/electron,farmisen/electron,jjz/electron,shaundunne/electron,vipulroxx/electron,jsutcodes/electron,sshiting/electron,christian-bromann/electron,simongregory/electron,miniak/electron,beni55/electron,christian-bromann/electron,bbondy/electron,tonyganch/electron,voidbridge/electron,setzer777/electron,icattlecoder/electron,kokdemo/electron,chriskdon/electron,jtburke/electron,carsonmcdonald/electron,joneit/electron,destan/electron,tonyganch/electron,twolfson/electron,felixrieseberg/electron,Faiz7412/electron,yalexx/electron,wan-qy/electron,aichingm/electron,jannishuebl/electron,leethomas/electron,sircharleswatson/electron,Jonekee/electron,nagyistoce/electron-atom-shell,miniak/electron,Faiz7412/electron,Andrey-Pavlov/electron,dahal/electron,arturts/electron,setzer777/electron,thompsonemerson/electron,d-salas/electron,evgenyzinoviev/electron,destan/electron,electron/electron,arusakov/electron,fabien-d/electron,matiasinsaurralde/electron,fabien-d/electron,Floato/electron,mrwizard82d1/electron,xiruibing/electron,ervinb/electron,mattotodd/electron,ianscrivener/electron,kikong/electron,nekuz0r/electron,gbn972/electron,medixdev/electron,Jacobichou/electron,tonyganch/electron,vHanda/electron,bright-sparks/electron,gerhardberger/electron,bbondy/electron,timruffles/electron,Gerhut/electron,tylergibson/electron,subblue/electron,nicobot/electron,gamedevsam/electron,posix4e/electron,sircharleswatson/electron,yan-foto/electron,nekuz0r/electron,setzer777/electron,bpasero/electron,brave/electron,pandoraui/electron,posix4e/electron,MaxWhere/electron,rreimann/electron,timruffles/electron,subblue/electron,jlhbaseball15/electron,sshiting/electron,twolfson/electron,gamedevsam/electron,ianscrivener/electron,Jonekee/electron,xfstudio/electron,tomashanacek/electron,evgenyzinoviev/electron,pirafrank/electron,nagyistoce/electron-atom-shell,jacksondc/electron,carsonmcdonald/electron,aichingm/electron,vaginessa/electron,bwiggs/electron,adcentury/electron,MaxWhere/electron,aliib/electron,dongjoon-hyun/electron,Faiz7412/electron,wan-qy/electron,mirrh/electron,subblue/electron,shockone/electron,bobwol/electron,electron/electron,roadev/electron,cqqccqc/electron,shiftkey/electron,edulan/electron,jlord/electron,deed02392/electron,John-Lin/electron,GoooIce/electron,noikiy/electron,digideskio/electron,timruffles/electron,MaxWhere/electron,rprichard/electron,trigrass2/electron,chrisswk/electron,ankitaggarwal011/electron,fabien-d/electron,jonatasfreitasv/electron,rhencke/electron,rreimann/electron,RIAEvangelist/electron,jiaz/electron,carsonmcdonald/electron,kokdemo/electron,webmechanicx/electron,lrlna/electron,yan-foto/electron,edulan/electron,wolfflow/electron,jhen0409/electron,the-ress/electron,edulan/electron,miniak/electron,smczk/electron,maxogden/atom-shell,fomojola/electron,brave/muon,RIAEvangelist/electron,jcblw/electron,jcblw/electron,nekuz0r/electron,Evercoder/electron,icattlecoder/electron,sky7sea/electron,gamedevsam/electron,fomojola/electron,fritx/electron,electron/electron,shockone/electron,bruce/electron,zhakui/electron,gerhardberger/electron,shennushi/electron,systembugtj/electron,adcentury/electron,arturts/electron,LadyNaggaga/electron,icattlecoder/electron,gamedevsam/electron,astoilkov/electron,gbn972/electron,bruce/electron,mattdesl/electron,mrwizard82d1/electron,brave/electron,mattotodd/electron,deepak1556/atom-shell,kcrt/electron,jlord/electron,rajatsingla28/electron,IonicaBizauKitchen/electron,bpasero/electron,tylergibson/electron,wolfflow/electron,pombredanne/electron,baiwyc119/electron,howmuchcomputer/electron,leolujuyi/electron,brenca/electron,Ivshti/electron,jonatasfreitasv/electron,jannishuebl/electron,jlhbaseball15/electron,synaptek/electron,dkfiresky/electron,greyhwndz/electron,bwiggs/electron,Andrey-Pavlov/electron,miniak/electron,iftekeriba/electron,medixdev/electron,bright-sparks/electron,nicobot/electron,noikiy/electron,Evercoder/electron,mubassirhayat/electron,bwiggs/electron,renaesop/electron,gabriel/electron,trankmichael/electron,soulteary/electron,felixrieseberg/electron,oiledCode/electron,mattotodd/electron,the-ress/electron,thingsinjars/electron,felixrieseberg/electron,tylergibson/electron,nicholasess/electron,minggo/electron,icattlecoder/electron,lrlna/electron,fireball-x/atom-shell,synaptek/electron,jsutcodes/electron,jjz/electron,shockone/electron,smczk/electron,fomojola/electron,yalexx/electron,tinydew4/electron,egoist/electron,mirrh/electron,meowlab/electron,wolfflow/electron,dahal/electron,sircharleswatson/electron,tincan24/electron,Gerhut/electron,voidbridge/electron,jlhbaseball15/electron,cos2004/electron,stevekinney/electron,neutrous/electron,preco21/electron,stevemao/electron,meowlab/electron,gabrielPeart/electron,kikong/electron,faizalpribadi/electron,arusakov/electron,Zagorakiss/electron,mattdesl/electron,tylergibson/electron,SufianHassan/electron,yan-foto/electron,dkfiresky/electron,mirrh/electron,LadyNaggaga/electron,cos2004/electron,kenmozi/electron,stevekinney/electron,RIAEvangelist/electron,brenca/electron,fritx/electron,astoilkov/electron,ianscrivener/electron,carsonmcdonald/electron,biblerule/UMCTelnetHub,Faiz7412/electron,farmisen/electron,arturts/electron,leolujuyi/electron,Neron-X5/electron,digideskio/electron,jtburke/electron,deed02392/electron,Rokt33r/electron,JesselJohn/electron,thompsonemerson/electron,neutrous/electron,yalexx/electron,coderhaoxin/electron,xiruibing/electron,bbondy/electron,the-ress/electron,jacksondc/electron,IonicaBizauKitchen/electron,renaesop/electron,BionicClick/electron,ianscrivener/electron,bpasero/electron,baiwyc119/electron,jannishuebl/electron,joneit/electron,thomsonreuters/electron,trankmichael/electron,eriser/electron,gerhardberger/electron,webmechanicx/electron,leftstick/electron,jaanus/electron,maxogden/atom-shell,Rokt33r/electron,MaxGraey/electron,rajatsingla28/electron,joaomoreno/atom-shell,eriser/electron,leolujuyi/electron,JesselJohn/electron,gamedevsam/electron,digideskio/electron,Jacobichou/electron,etiktin/electron,matiasinsaurralde/electron,robinvandernoord/electron,JussMee15/electron,greyhwndz/electron,rhencke/electron,minggo/electron,anko/electron,jsutcodes/electron,fffej/electron,jtburke/electron,deepak1556/atom-shell,jannishuebl/electron,bwiggs/electron,evgenyzinoviev/electron,tomashanacek/electron,noikiy/electron,vaginessa/electron,faizalpribadi/electron,DivyaKMenon/electron,davazp/electron,dongjoon-hyun/electron,davazp/electron,mattotodd/electron,jtburke/electron,deed02392/electron,fireball-x/atom-shell,RobertJGabriel/electron,Andrey-Pavlov/electron,stevekinney/electron,anko/electron,egoist/electron,takashi/electron,astoilkov/electron,sircharleswatson/electron,dahal/electron,mhkeller/electron,nekuz0r/electron,minggo/electron,coderhaoxin/electron,adamjgray/electron,gabrielPeart/electron,JussMee15/electron,aaron-goshine/electron,tincan24/electron,the-ress/electron,aaron-goshine/electron,jaanus/electron,LadyNaggaga/electron,jsutcodes/electron,stevekinney/electron,abhishekgahlot/electron,mattotodd/electron,Gerhut/electron,adamjgray/electron,tincan24/electron,preco21/electron,saronwei/electron,baiwyc119/electron,ankitaggarwal011/electron,wan-qy/electron,JesselJohn/electron,jsutcodes/electron,posix4e/electron,John-Lin/electron,wan-qy/electron,Andrey-Pavlov/electron,posix4e/electron,gstack/infinium-shell,pirafrank/electron,John-Lin/electron,aaron-goshine/electron,RobertJGabriel/electron,ankitaggarwal011/electron,synaptek/electron,electron/electron,arusakov/electron,leethomas/electron,shiftkey/electron,roadev/electron,miniak/electron,chriskdon/electron,shockone/electron,xfstudio/electron,seanchas116/electron,medixdev/electron,cos2004/electron,Jonekee/electron,rajatsingla28/electron,electron/electron,rsvip/electron,RIAEvangelist/electron,rreimann/electron,Evercoder/electron,gabriel/electron,carsonmcdonald/electron,fireball-x/atom-shell,posix4e/electron,Jacobichou/electron,pombredanne/electron,bruce/electron,DivyaKMenon/electron,brave/electron,smczk/electron,minggo/electron,shaundunne/electron,stevemao/electron,jtburke/electron,subblue/electron,jhen0409/electron,jonatasfreitasv/electron,jiaz/electron,fritx/electron,systembugtj/electron,oiledCode/electron,greyhwndz/electron,baiwyc119/electron,cos2004/electron,rsvip/electron,Floato/electron,mjaniszew/electron,jiaz/electron,Neron-X5/electron,hokein/atom-shell,IonicaBizauKitchen/electron,digideskio/electron,tinydew4/electron,adcentury/electron,fireball-x/atom-shell,sky7sea/electron,nicobot/electron,vipulroxx/electron,biblerule/UMCTelnetHub,nicholasess/electron,LadyNaggaga/electron,ervinb/electron,ankitaggarwal011/electron,biblerule/UMCTelnetHub,aliib/electron,darwin/electron,etiktin/electron,chriskdon/electron,webmechanicx/electron,michaelchiche/electron,MaxGraey/electron,lzpfmh/electron,bitemyapp/electron,iftekeriba/electron,MaxGraey/electron,edulan/electron,brenca/electron,baiwyc119/electron,gabriel/electron,Ivshti/electron,bruce/electron,tinydew4/electron,tinydew4/electron,IonicaBizauKitchen/electron,rhencke/electron,eriser/electron,kazupon/electron,kokdemo/electron,fritx/electron,joaomoreno/atom-shell,benweissmann/electron,bruce/electron,thompsonemerson/electron,fireball-x/atom-shell,fomojola/electron,lrlna/electron,voidbridge/electron,kostia/electron,leftstick/electron,mhkeller/electron,pandoraui/electron,ervinb/electron,meowlab/electron,fffej/electron,aecca/electron,webmechanicx/electron,Gerhut/electron,aaron-goshine/electron,nicobot/electron,sky7sea/electron,trankmichael/electron,tylergibson/electron,JussMee15/electron,mubassirhayat/electron,Floato/electron,rajatsingla28/electron,brave/muon,shennushi/electron,ianscrivener/electron,xfstudio/electron,shockone/electron,Gerhut/electron,coderhaoxin/electron,eric-seekas/electron,medixdev/electron,fritx/electron,meowlab/electron,lzpfmh/electron,davazp/electron,cqqccqc/electron,lzpfmh/electron,GoooIce/electron,sircharleswatson/electron,sshiting/electron,faizalpribadi/electron,egoist/electron,bright-sparks/electron,rreimann/electron,christian-bromann/electron,synaptek/electron,voidbridge/electron,stevemao/electron,stevemao/electron,yan-foto/electron,gabrielPeart/electron,timruffles/electron,michaelchiche/electron,vaginessa/electron,Zagorakiss/electron,trigrass2/electron,tincan24/electron,shennushi/electron,thomsonreuters/electron,icattlecoder/electron,tinydew4/electron,Rokt33r/electron,destan/electron,roadev/electron,rsvip/electron,xfstudio/electron,gbn972/electron,egoist/electron,jlhbaseball15/electron,systembugtj/electron,anko/electron,d-salas/electron,leolujuyi/electron,Evercoder/electron,kostia/electron,bobwol/electron,aecca/electron,deed02392/electron,GoooIce/electron,jlord/electron,systembugtj/electron,d-salas/electron,jiaz/electron,mjaniszew/electron,lzpfmh/electron,zhakui/electron,Jonekee/electron,rhencke/electron,howmuchcomputer/electron,vHanda/electron,jlhbaseball15/electron,electron/electron,seanchas116/electron,kikong/electron,kazupon/electron,MaxGraey/electron,shiftkey/electron,michaelchiche/electron,simonfork/electron,micalan/electron,leftstick/electron,voidbridge/electron,jiaz/electron,bobwol/electron,kostia/electron,bbondy/electron,GoooIce/electron,tinydew4/electron,cqqccqc/electron,chrisswk/electron,hokein/atom-shell,robinvandernoord/electron,robinvandernoord/electron,maxogden/atom-shell,John-Lin/electron,jaanus/electron,tincan24/electron,shiftkey/electron,natgolov/electron,astoilkov/electron,pandoraui/electron,mirrh/electron,michaelchiche/electron,rreimann/electron,oiledCode/electron,deed02392/electron,mhkeller/electron,thingsinjars/electron,mattdesl/electron,RobertJGabriel/electron,noikiy/electron,brave/electron,BionicClick/electron,beni55/electron,thomsonreuters/electron,renaesop/electron,matiasinsaurralde/electron,gabrielPeart/electron,simongregory/electron,greyhwndz/electron,dahal/electron,nicobot/electron,tomashanacek/electron,jacksondc/electron,Evercoder/electron,bitemyapp/electron,saronwei/electron,jhen0409/electron,brave/electron,vHanda/electron,benweissmann/electron,brenca/electron,wolfflow/electron,tonyganch/electron,Floato/electron,Ivshti/electron,smczk/electron,deepak1556/atom-shell,shiftkey/electron,hokein/atom-shell,mhkeller/electron,ervinb/electron,zhakui/electron,christian-bromann/electron,aecca/electron,jonatasfreitasv/electron,beni55/electron,yan-foto/electron,joneit/electron,adamjgray/electron,twolfson/electron,zhakui/electron,bruce/electron,digideskio/electron,trankmichael/electron,oiledCode/electron,saronwei/electron,Zagorakiss/electron,rajatsingla28/electron,rprichard/electron,seanchas116/electron,Rokt33r/electron,jacksondc/electron,arusakov/electron,nicholasess/electron,mubassirhayat/electron,nekuz0r/electron,shaundunne/electron,icattlecoder/electron,gstack/infinium-shell,fritx/electron,howmuchcomputer/electron,anko/electron,aliib/electron,leftstick/electron,bitemyapp/electron,wolfflow/electron,rprichard/electron,mrwizard82d1/electron,trigrass2/electron,twolfson/electron,dkfiresky/electron,nagyistoce/electron-atom-shell,shennushi/electron,nicholasess/electron,kikong/electron,kostia/electron,maxogden/atom-shell,natgolov/electron,brave/muon,gerhardberger/electron,arusakov/electron,rsvip/electron,benweissmann/electron,Jacobichou/electron,oiledCode/electron,bwiggs/electron,sshiting/electron,fabien-d/electron,soulteary/electron,the-ress/electron,egoist/electron,kcrt/electron,jhen0409/electron,rprichard/electron,d-salas/electron,fffej/electron,adamjgray/electron,meowlab/electron,darwin/electron,bobwol/electron,renaesop/electron,kostia/electron,adcentury/electron,jcblw/electron,etiktin/electron,saronwei/electron,Zagorakiss/electron,joaomoreno/atom-shell,davazp/electron,thomsonreuters/electron,lrlna/electron,posix4e/electron,joneit/electron,simongregory/electron,thompsonemerson/electron,faizalpribadi/electron,dkfiresky/electron,gstack/infinium-shell,jannishuebl/electron,bobwol/electron,pombredanne/electron,jcblw/electron,howmuchcomputer/electron,Jacobichou/electron,gbn972/electron,Neron-X5/electron,oiledCode/electron,wolfflow/electron,brave/muon,destan/electron,Floato/electron,benweissmann/electron,tincan24/electron,soulteary/electron,kcrt/electron,bitemyapp/electron,simonfork/electron,evgenyzinoviev/electron,trigrass2/electron,biblerule/UMCTelnetHub,coderhaoxin/electron,shockone/electron,iftekeriba/electron,thompsonemerson/electron,jaanus/electron,stevemao/electron,Jonekee/electron,farmisen/electron,medixdev/electron,mrwizard82d1/electron,BionicClick/electron,jaanus/electron,adamjgray/electron,baiwyc119/electron,Andrey-Pavlov/electron,matiasinsaurralde/electron,maxogden/atom-shell,setzer777/electron,benweissmann/electron,nicholasess/electron,electron/electron,MaxWhere/electron,twolfson/electron,biblerule/UMCTelnetHub,gabriel/electron,vaginessa/electron,DivyaKMenon/electron,robinvandernoord/electron,jhen0409/electron,dkfiresky/electron,setzer777/electron,leftstick/electron,vaginessa/electron,rajatsingla28/electron,deepak1556/atom-shell,vipulroxx/electron,bitemyapp/electron,aaron-goshine/electron,davazp/electron,jcblw/electron,mattdesl/electron,wan-qy/electron,trankmichael/electron,trankmichael/electron,farmisen/electron,rsvip/electron,vipulroxx/electron,aichingm/electron,eric-seekas/electron,jsutcodes/electron,micalan/electron,aecca/electron,thomsonreuters/electron,davazp/electron,ankitaggarwal011/electron,fffej/electron,mrwizard82d1/electron,webmechanicx/electron,xiruibing/electron,adcentury/electron,synaptek/electron,matiasinsaurralde/electron,lzpfmh/electron,DivyaKMenon/electron,soulteary/electron,kazupon/electron,RobertJGabriel/electron,sky7sea/electron,chrisswk/electron,IonicaBizauKitchen/electron,Neron-X5/electron,nekuz0r/electron,jonatasfreitasv/electron,michaelchiche/electron,gstack/infinium-shell,etiktin/electron,xfstudio/electron,mubassirhayat/electron,Andrey-Pavlov/electron,chrisswk/electron,nagyistoce/electron-atom-shell,fomojola/electron,smczk/electron,stevemao/electron,kenmozi/electron,carsonmcdonald/electron,eric-seekas/electron,neutrous/electron,thomsonreuters/electron,evgenyzinoviev/electron,simonfork/electron,leethomas/electron,vipulroxx/electron,takashi/electron,leethomas/electron,SufianHassan/electron,dahal/electron,JesselJohn/electron,joneit/electron,sky7sea/electron,jaanus/electron,darwin/electron,simonfork/electron,bpasero/electron,xfstudio/electron,greyhwndz/electron,twolfson/electron,leftstick/electron,aecca/electron,arturts/electron,jiaz/electron,chriskdon/electron,mhkeller/electron,roadev/electron,egoist/electron,sircharleswatson/electron,kazupon/electron,noikiy/electron,bbondy/electron,brenca/electron,joneit/electron,fomojola/electron,thingsinjars/electron,dongjoon-hyun/electron,minggo/electron,tomashanacek/electron,Neron-X5/electron,aecca/electron,dongjoon-hyun/electron,pirafrank/electron,zhakui/electron,greyhwndz/electron,yan-foto/electron,Rokt33r/electron,xiruibing/electron,xiruibing/electron,roadev/electron,soulteary/electron,mhkeller/electron,John-Lin/electron,leolujuyi/electron,gstack/infinium-shell,smczk/electron,destan/electron,setzer777/electron,Zagorakiss/electron,bbondy/electron,gerhardberger/electron,preco21/electron,chriskdon/electron,jcblw/electron,bright-sparks/electron,eriser/electron,Rokt33r/electron,gabriel/electron,leolujuyi/electron,fffej/electron,renaesop/electron,tonyganch/electron,meowlab/electron,aichingm/electron,sky7sea/electron,robinvandernoord/electron,sshiting/electron,vipulroxx/electron,leethomas/electron,benweissmann/electron,darwin/electron,thingsinjars/electron,preco21/electron,abhishekgahlot/electron,joaomoreno/atom-shell,mubassirhayat/electron,kokdemo/electron,farmisen/electron,bwiggs/electron,cos2004/electron,joaomoreno/atom-shell,shaundunne/electron,kcrt/electron,hokein/atom-shell,SufianHassan/electron,felixrieseberg/electron,Faiz7412/electron,eriser/electron,aichingm/electron,mattdesl/electron,RIAEvangelist/electron,gbn972/electron,dkfiresky/electron,takashi/electron,noikiy/electron,IonicaBizauKitchen/electron,jlord/electron,shaundunne/electron,JesselJohn/electron,pirafrank/electron,BionicClick/electron,anko/electron,pombredanne/electron,abhishekgahlot/electron,faizalpribadi/electron,simongregory/electron,rhencke/electron,arturts/electron,hokein/atom-shell,saronwei/electron,cqqccqc/electron,brave/muon,kenmozi/electron,etiktin/electron,pombredanne/electron,jlhbaseball15/electron,BionicClick/electron
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.