commit
stringlengths
40
40
subject
stringlengths
1
3.25k
old_file
stringlengths
4
311
new_file
stringlengths
4
311
old_contents
stringlengths
0
26.3k
lang
stringclasses
3 values
proba
float64
0
1
diff
stringlengths
0
7.82k
666d9c467806782827edac4b2c0c13d494e41250
Add a test for the status server
jobmon/test/test_status_server.py
jobmon/test/test_status_server.py
Python
0.000001
@@ -0,0 +1,1189 @@ +import os%0Aimport select%0Aimport socket%0Aimport time%0Aimport unittest%0A%0Afrom jobmon.protocol import *%0Afrom jobmon import protocol, status_server, transport%0A%0APORT = 9999%0A%0Aclass StatusRecorder:%0A def __init__(self):%0A self.records = %5B%5D%0A%0A def process_start(self, ...
fd62cb27d848eea1c30928bfe7a727c88d7f3035
Fix Sphinx rendering for publisher client. (#5822)
pubsub/google/cloud/pubsub_v1/publisher/client.py
pubsub/google/cloud/pubsub_v1/publisher/client.py
# Copyright 2017, Google LLC All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or a...
Python
0
@@ -1124,40 +1124,8 @@ t):%0A - _batch_class = thread.Batch%0A @@ -1948,24 +1948,57 @@ ng.%0A %22%22%22%0A + _batch_class = thread.Batch%0A%0A def __in
09ea74a9b3b3f518c67f719c3525b14058b528af
add files
declination.py
declination.py
Python
0.000002
@@ -0,0 +1,1062 @@ +# -*- coding: utf-8 -*-%0D%0A%22%22%22%0D%0ACreated on Sun Jul 20 21:11:52 2014%0D%0A%0D%0A@author: SB%0D%0A%0D%0A%0D%0A###############################################################################%0D%0AThis function gets the declination using webservices hosted %0D%0Aby the National Oceanic and ...
1a9f379ed121945a79eff5c2fdd468c98f0381d7
add Jeu.py
Jeu.py
Jeu.py
Python
0.000001
@@ -0,0 +1,409 @@ +import pygame%0Aimport sys%0Afrom pygame.locals import *%0A%0Aclass Jeu:%0A%0A def Jeu(self):%0A self.__score = 0%0A print('Jeu creer')%0A%0A def augmenter_Score(self):%0A return 0%0A%0A def recup_score(self):%0A return 0%0A%0A def score(self):%0A return...
63d7639f6c0e470575820be2b51444f34aa4bf2d
add flask app
app.py
app.py
Python
0.000003
@@ -0,0 +1,686 @@ +import jinja2%0Afrom flask import Flask, jsonify, make_response%0A%0Afrom pdf_getter import main%0A%0A%0Aapp = Flask(__name__)%0A%0A%0A@app.route('/planning', methods=%5B'GET'%5D)%0Adef get_planning():%0A pdf_filename = main()%0A if pdf_filename:%0A binary_pdf = open(%22./planning.pdf%22...
ec78a2b7551838ab05dce6c2c93c8c42b76fc850
Add utility functions (1)
src/btc_utilities.py
src/btc_utilities.py
Python
0
@@ -0,0 +1,1823 @@ +# Brain Tumor Classification%0A# Script for Utility Functions%0A# Author: Qixun Qu%0A# Create on: 2017/10/11%0A# Modify on: 2017/10/11%0A%0A# ,,, ,,,%0A# ;%22 '; ;' %22,%0A# ; @.ss$$$$$$s.@ ;%0A# %60s$$$$$$$$$$$$$$$'%0A# $$$$$$$$$$$$$$$$$$%0A# $$$$P%22%22Y$$$Y%22%22W$$...
800df7bcaa57e0935c0836f1f49de6407c55c212
add tests for clock exercise
day2/clock_test.py
day2/clock_test.py
Python
0.000001
@@ -0,0 +1,1271 @@ +import unittest%0Aimport clock%0A%0Aclass ClockTest(unittest.TestCase):%0A%0A def test_on_the_hour(self):%0A self.assertEqual(%2208:00%22, Clock.at(8).__str__() )%0A self.assertEqual(%2209:00%22, Clock.at(9).__str__() )%0A%0A def test_past_the_hour(self):%0A self.assertEqual(%2211:09%22, ...
659af8d29ec1839217c74522d8fa5bcf61e48451
FIX category
l10n_it_CEE_balance/__openerp__.py
l10n_it_CEE_balance/__openerp__.py
# -*- encoding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2010 Italian OpenERP Community (<http://www.openerp-italia.com>) # # This program is free software: you can redistrib...
Python
0.000001
@@ -1379,16 +1379,22 @@ lisation +/Italy %22,%0A '
e920d0dc413dacd2b1084c2cdcacb4bae3bc3d8b
Create problem10.py
W2/L4/problem10.py
W2/L4/problem10.py
Python
0.000029
@@ -0,0 +1,245 @@ +#L4 PROBLEM 10 %0A%0Adef isVowel(char):%0A if char == 'a' or char == 'e' or char == 'i' or char == 'o' or char == 'u' or char == 'A' or char == 'E' or char == 'I' or char == 'O' or char == 'U':%0A return True %0A else: %0A return False %0A
799599e1b841db8c9eff9de4cdf7dbc5cb396c37
Create dml.py
dml.py
dml.py
Python
0.000003
@@ -0,0 +1,4 @@ +dml%0A
349e63385ea71d1a69e094aeee1268c44e951b53
Update code funny
Strings/funny-string.py
Strings/funny-string.py
Python
0.000001
@@ -0,0 +1,376 @@ +# Funny String%0A# Developer: Murillo Grubler%0A# Link: https://www.hackerrank.com/challenges/funny-string/problem%0A%0Aimport string%0A%0A# ca - xz%0A# xc - cx%0A# zx - ac%0A%0A#acxz - 3%0A#acxza%0A%0Adef funnyString(s):%0A str_inverted = s%5B::-1%5D%0A for i in range(len(s) - 1):%0A pr...
45b0e958aa377afed2c62bf1e6f7c4933ccde39b
Add a test for main
test/test_main.py
test/test_main.py
Python
0
@@ -0,0 +1,853 @@ +from git_lang_guesser import main%0Afrom git_lang_guesser import git_requester%0A%0A%0ALANGUAGE = %22language%22%0A%0Atest_username = %22TestUser%22%0Aexample_data = %5B%0A %7BLANGUAGE: %22HTML%22%7D,%0A %7BLANGUAGE: %22Java%22%7D,%0A %7BLANGUAGE: %22Python%22%7D,%0A %7BLANGUAGE: %22Pytho...
c80a015151fb6648aa34e7b79cd29f4cd2c97560
add a example
test_disco_job.py
test_disco_job.py
Python
0.000425
@@ -0,0 +1,1014 @@ +from DiscoJob import DiscoJob%0A%0A%0Aimport logging%0A%0Aconfig = %7B%0A %22split_size%22: 1, #MB%0A %22input_uri%22: %22mongodb://localhost/test.modforty%22,%0A %22create_input_splits%22: True,%0A %22split_key%22: %7B'_id' : 1%7D,%0A %22output_uri%22:%22mongodb:/...
ee78590d2a6f0a509b08bf1b59b3f27560375524
add conftest
tests/conftest.py
tests/conftest.py
Python
0.000001
@@ -0,0 +1,205 @@ +from __future__ import print_function%0Aimport numpy as np%0A%0A%0Adef pytest_runtest_setup(item):%0A seed = np.random.randint(1000)%0A print(%22Seed used in np.random.seed(): %25d%22 %25 seed)%0A np.random.seed(seed)%0A
854be3d354886a8459d0987b54ad65d509db8001
Fix format of external link for pypi page description
setup.py
setup.py
#!/usr/bin/env python # -*- coding: utf-8 -*- """ pytest-flask ============ A set of `py.test <http://pytest.org>`_ fixtures to test Flask extensions and applications. Features -------- Plugin provides some fixtures to simplify app testing: - ``client`` - an instance of ``app.test_client``, - ``client_class`` - ``c...
Python
0
@@ -512,16 +512,17 @@ hq.org%3E%60 +_ and oth
e8853997b7ba28da48e1620fd1466fbe8ca1d0c0
Add setup.py
setup.py
setup.py
Python
0
@@ -0,0 +1,989 @@ +#!/usr/bin/env python%0A%0Afrom distutils.core import setup%0A%0Afrom pyarrfs import pyarrfs%0A%0Aver = pyarrfs.__version__%0Along_desc = open(%22README%22).read()%0Ashort_desc = long_desc.split('%5Cn')%5B0%5D.split(' - ')%5B1%5D.strip()%0A%0Asetup(%0A name = 'pyarrfs',%0A version = pyarrfs.__v...
94cd57176b3251dd44a5e46346df5d9363b90f80
Bump version for next release
setup.py
setup.py
#!/usr/bin/env python """Installation script.""" import logging import os from setuptools import setup # inline: # import git NAME = 'tulip' VERSION_FILE = '{name}/_version.py'.format(name=NAME) MAJOR = 1 MINOR = 3 MICRO = 0 VERSION = '{major}.{minor}.{micro}'.format( major=MAJOR, minor=MINOR, micro=MICRO) VERSIO...
Python
0
@@ -218,17 +218,17 @@ MICRO = -0 +1 %0AVERSION
b0ada080d8c8890152a57168e6b7b449a5588f10
Add setup.py for PyPI
setup.py
setup.py
Python
0.000001
@@ -0,0 +1,784 @@ +#!/usr/bin/env python%0Afrom setuptools import setup, find_packages%0A%0Asetup(%0A name='clocktower',%0A version='0.1.0',%0A author='Kyle Conroy',%0A author_email='kyle@twilio.com',%0A url='https://github.com/derferman/clocktower',%0A description='Download websites from Wayback Mach...
9c6ba2717fb71755d31d8c7b7066730171be8b20
bump version, add missing dependency - Django
setup.py
setup.py
import os from setuptools import setup f = open(os.path.join(os.path.dirname(__file__), 'README.md')) readme = f.read() f.close() setup( name='django-ajaximage', version='0.1.16', description='Add ajax image upload functionality with a progress bar to file input fields within Django admin. Images are opti...
Python
0
@@ -180,16 +180,24 @@ ='0.1.16 +-rohanza ',%0A d @@ -589,30 +589,49 @@ es=%5B -'setuptools', 'p +%0A 'Django',%0A 'P illow' +,%0A %5D,%0A
fac7c76ea056179653574dffd297f927f76daa42
add setuptools routine
setup.py
setup.py
Python
0
@@ -0,0 +1,852 @@ +import os%0Afrom setuptools import setup%0A%0Asetup(%0A name = %22opti_ssr%22,%0A version = %220.0.4%22,%0A py_modules=%5B'opti_ssr', 'ssr_network', 'opti_network'%5D,%0A author = %22Felix Immohr, Fiete Winter%22,%0A author_email = %22test@te.st, fiete.winter@gmail.com%22,%0A descri...
230cae4f6cce8e064b5b74f87ec09181e41f57c2
Add MDR setup file
setup.py
setup.py
Python
0
@@ -0,0 +1,1764 @@ +#!/usr/bin/env python%0A# -*- coding: utf-8 -*-%0Afrom setuptools import setup, find_packages%0A%0Adef calculate_version():%0A initpy = open('mdr/_version.py').read().split('%5Cn')%0A version = list(filter(lambda x: '__version__' in x, initpy))%5B0%5D.split('%5C'')%5B1%5D%0A return version%...
612517b15a40af29fa57d3a5507ba778ff32fa51
Add setup.py
setup.py
setup.py
Python
0.000001
@@ -0,0 +1,506 @@ +from setuptools import setup%0A%0Asetup(name='pattern_finder_gpu',%0A version='1.0',%0A description='Brute force OpenCL based pattern localization in images that supports masking and weighting.',%0A url='https://github.com/HearSys/pattern_finder_gpu',%0A author='Samuel John (H%C3%...
380fb1e3b5b8fbde868f7fffbe0a6f22fc037e55
Remove download_url from setup.py
setup.py
setup.py
#!/usr/bin/env python # Licensed under a 3-clause BSD style license - see LICENSE.rst import ah_bootstrap import pkg_resources from setuptools import setup from astropy_helpers.setup_helpers import register_commands, get_package_info from astropy_helpers.version_helpers import generate_version_py NAME = 'astropy_help...
Python
0
@@ -372,79 +372,8 @@ SION -%0ADOWNLOAD_BASE_URL = 'http://pypi.io/packages/source/a/astropy-helpers' %0A%0Age @@ -1152,151 +1152,8 @@ (),%0A - download_url='%7B0%7D/astropy-helpers-%7B1%7D.tar.gz'.format(DOWNLOAD_BASE_URL,%0A VERSION),%0A
a9f0d310e967bea276f01cd558f48fc102ea24fc
add setup file for installation as module
setup.py
setup.py
Python
0
@@ -0,0 +1,439 @@ +from setuptools import setup%0A%0Asetup(name='minedatabase',%0A version='0.1',%0A description='Metabolic In silico Network Expansions',%0A url='http://github.com/JamesJeffryes/mine-database',%0A author='James Jeffryes',%0A author_email='jamesgjeffryes@gmail.com',%0A lice...
77700d265fbf3fafa21b335585b8060a0b025143
add setup.py
setup.py
setup.py
Python
0.000001
@@ -0,0 +1,1098 @@ +# Copyright 2010 Gregory Szorc%0A#%0A# Licensed under the Apache License, Version 2.0 (the %22License%22);%0A# you may not use this file except in compliance with the License.%0A# You may obtain a copy of the License at%0A#%0A# http://www.apache.org/licenses/LICENSE-2.0%0A#%0A# Unless requ...
092bf8bc2e558420ca51384a3dd1019ab1115ad2
Fix conditional dependencies when using wheels
setup.py
setup.py
#!/usr/bin/env python # -*- coding: utf-8 -*- from setuptools import setup from djangocms_link import __version__ INSTALL_REQUIRES = [ #'Django-Select2', ] CLASSIFIERS = [ 'Development Status :: 5 - Production/Stable', 'Environment :: Web Environment', 'Framework :: Django', 'Intended Audience ::...
Python
0.000266
@@ -113,55 +113,8 @@ _%0A%0A%0A -INSTALL_REQUIRES = %5B%0A #'Django-Select2',%0A%5D%0A%0A CLAS @@ -996,24 +996,262 @@ res= -INSTALL_REQUIRES +%5B%5D,%0A extras_require=%7B%0A %22:python_version=='3.3'%22: %5B'django-select2-py3'%5D,%0A %22:python_version=='3.4'%22: %5B'django-select2-py3'%5D,%0A ...
a9e2e225e083575c66c33986db06b496c1596449
Create setup.py
setup.py
setup.py
Python
0.000001
@@ -0,0 +1,326 @@ +from setuptools import setup, find_packages%0A%0Asetup(%0A name='wwsync',%0A version='1.0',%0A author='Matt Bachmann',%0A url='https://github.com/Bachmann1234/weight-watchers-sync',%0A description='Syncs Weight Watcher food log to Fitbit',%0A license='MIT',%0A packages=find_packages(),%...
265e1b6177552e13f332b1f39885433789f27d94
add setup.py
setup.py
setup.py
Python
0.000001
@@ -0,0 +1,1013 @@ +#!/usr/bin/env python%0A%0Afrom setuptools import setup%0Aimport re%0A%0Awith open('jook/__init__.py', 'r') as fobj:%0A version = re.search(r'%5E__version__%5Cs*=%5Cs*%5B%5C'%22%5D(%5B%5E%5C'%22%5D*)%5B%5C'%22%5D',%0A fobj.read(), re.MULTILINE).group(1)%0A%0Awith open('READ...
90faa98cf8d0a11e8cfd1ff1b91b505a43f956c5
Add setup.py
setup.py
setup.py
Python
0.000001
@@ -0,0 +1,1345 @@ +%22%22%22Module to prepare you python environment.%22%22%22%0Aimport importlib%0A%0A%0Adef run_package(package):%0A %22%22%22Try to run the package just installed.%22%22%22%0A try:%0A globals()%5Bpackage%5D = importlib.import_module(package)%0A print(%22==========================...
1bf649207f850b21e99eb6a9479ecdb1cb03a93d
Update version to 0.7.1
setup.py
setup.py
#!/usr/bin/env python from setuptools import setup install_requires = ['Django>=1.5'] try: from collections import OrderedDict except ImportError: install_requires.append('ordereddict>=1.1') setup( name='django-auth-policy', version='0.7', description='Enforces a couple of common authentication...
Python
0.000001
@@ -251,16 +251,18 @@ ion='0.7 +.1 ',%0A d
b37b2976398f52032379c916714e4b6360614e78
create packaging file
setup.py
setup.py
Python
0.000001
@@ -0,0 +1,550 @@ +#!/usr/bin/env python%0A%0Aimport os%0Aimport sys%0A%0Atry:%0A from setuptools import setup%0Aexcept ImportError:%0A from distutils.core import setup%0A%0Aif sys.argv%5B-1%5D == 'publish':%0A os.system('python setup.py sdist upload')%0A sys.exit()%0A%0Awith open('README.rst') as f:%0A ...
18688b67e2dfc36ff6b1c28a618a289f46cc494d
Add Slide class
slide.py
slide.py
Python
0
@@ -0,0 +1,151 @@ +class Slide:%0A %22%22%22 Stores data to be studied. %22%22%22%0A%0A def __init__(self, prompt, answer):%0A self.prompt = prompt%0A self.answer = answer%0A
b418ff779c79afd0eca85ed1479ba633f25ce73c
Fix variable referenced before assginment in vmwareapi code.
nova/tests/test_vmwareapi_vm_util.py
nova/tests/test_vmwareapi_vm_util.py
Python
0.000001
@@ -0,0 +1,1841 @@ +# vim: tabstop=4 shiftwidth=4 softtabstop=4%0A#%0A# Copyright 2013 Canonical Corp.%0A# All Rights Reserved.%0A#%0A# Licensed under the Apache License, Version 2.0 (the %22License%22); you may%0A# not use this file except in compliance with the License. You may obtain%0A# a copy of the Licen...
c3f1e723e13598deb53a8454787204f00841c34a
Add extension method type
numba/typesystem/exttypes/methods.py
numba/typesystem/exttypes/methods.py
Python
0.000001
@@ -0,0 +1,677 @@ +%0A%0Afrom numba.typesystem import *%0A%0A#------------------------------------------------------------------------%0A# Extension Method Types%0A#------------------------------------------------------------------------%0A%0Aclass ExtMethodType(NumbaType, minitypes.FunctionType):%0A %22%22%22%0A ...
7162926576b6136c17a4f1d889d7ecd2541a763c
Add examples_plot_features.py
examples/plot_features.py
examples/plot_features.py
Python
0
@@ -0,0 +1,3206 @@ +#!/usr/bin/env python%0A%0A# Copyright (c) 2015, Ecole Polytechnique Federale de Lausanne, Blue Brain Project%0A# All rights reserved.%0A#%0A# This file is part of NeuroM %3Chttps://github.com/BlueBrain/NeuroM%3E%0A#%0A# Redistribution and use in source and binary forms, with or without%0A# modifica...
ebceea82af38e4c7f11678841bfbce3635a66f7d
Add twitter_parser.py
newsman/scraper/twitter_parser.py
newsman/scraper/twitter_parser.py
Python
0.00285
@@ -0,0 +1,620 @@ +#!/usr/bin/env python %0A#-*- coding: utf-8 -*- %0A%0A%22%22%22%0ATwitter parser parses specific twitter account in real time%0A%22%22%22%0A# @author chengdujin%0A# @contact chengdujin@gmail.com%0A# @created Nov. 19, 2013%0A%0A%0Aimport sys %0Areload(sys) %0Asys.setdefaultencoding('UTF-8')%0A%0Aimpor...
3912e9ab49e10f2490da36b17e8525d2c97c1844
add fabric
fabfile.py
fabfile.py
Python
0.000001
@@ -0,0 +1,533 @@ +#!/usr/bin/env python3%0A# -*- coding: utf-8 -*-%0A%0A%0Afrom fabric.api import run, env, cd%0A%0A%0A# the user to use for the remote commands%0Aenv.user = 'answeror'%0A# the servers where the commands are executed%0Aenv.hosts = %5B'aip.io'%5D%0A%0A%0Adef deploy():%0A run('pyenv virtualenvwrapper'...
643b4867627feb2810257f99b0b7865b43bb6454
Add fabfile to deploy documentation
fabfile.py
fabfile.py
Python
0.000005
@@ -0,0 +1,849 @@ +# -*- coding: utf-8 -*-%0A%22%22%22%0A fabfile%0A%0A Fab file to build and push documentation to github%0A%0A :copyright: %C2%A9 2013-2014 by Openlabs Technologies & Consulting (P) Limited%0A :license: BSD, see LICENSE for more details.%0A%22%22%22%0Aimport time%0Aimport getpass%0A%0Aimpo...
b63f6a83f86808df0a2fea66b47478e3c5ec0994
Create neymanPearson2.py
scripts/neymanPearson2.py
scripts/neymanPearson2.py
Python
0.999614
@@ -0,0 +1,1325 @@ +# Convert Neyman-Pearson testing paradigm(Fig 5.15 (a)) to python/JAX%0A# Author: Garvit9000c%0A%0Aimport jax.scipy.stats.multivariate_normal as gaussprob%0Aimport jax.numpy as jnp%0Aimport matplotlib.pyplot as plt%0A%0A#constants%0Api=jnp.pi%0Asigma=1.5%0Axmin = -4%0Axmax = 8%0Aymin = 0%0Aymax = 0....
b0bcff5bf333d866982214a4621be5359d8ec69b
Version bump to 0.8.5
namebench.py
namebench.py
#!/usr/bin/env python # Copyright 2009 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required...
Python
0
@@ -1129,17 +1129,17 @@ = '0.8. -4 +5 '%0A%0Aif __
e7a41ed29f6ec097e19f4c9beec9821a2804585c
Add organizations.py
octokit/resources/organizations.py
octokit/resources/organizations.py
Python
0.000002
@@ -0,0 +1,97 @@ +# encoding: utf-8%0A%0A%22%22%22Methods for the Organizations API%0Ahttp://developer.github.com/v3/orgs/%0A%22%22%22%0A
337c48648f3a891642fc58c7161fdb48e705160f
add timer
timer.py
timer.py
Python
0.000008
@@ -0,0 +1,1922 @@ +# Copyright (c) 2015, Bartlomiej Puget %3Clarhard@gmail.com%3E%0A# All rights reserved.%0A#%0A# Redistribution and use in source and binary forms, with or without%0A# modification, are permitted provided that the following conditions are met:%0A#%0A# * Redistributions of source code must retain th...
cbde3323e790717fa593d75ca282e2875bb67dca
Add stacker ecs hook
stacker/hooks/ecs.py
stacker/hooks/ecs.py
Python
0
@@ -0,0 +1,1284 @@ +# A lot of this code exists to deal w/ the broken ECS connect_to_region%0A# function, and will be removed once this pull request is accepted:%0A# https://github.com/boto/boto/pull/3143%0Aimport logging%0A%0Alogger = logging.getLogger(__name__)%0A%0Afrom boto.regioninfo import get_regions%0Afrom bo...
421b99ffb0cf84a8ccea0c4c0fe2496f895603a0
Add migration
bluebottle/initiatives/migrations/0011_auto_20190522_0931.py
bluebottle/initiatives/migrations/0011_auto_20190522_0931.py
Python
0.000002
@@ -0,0 +1,562 @@ +# -*- coding: utf-8 -*-%0A# Generated by Django 1.11.15 on 2019-05-22 07:31%0Afrom __future__ import unicode_literals%0A%0Afrom django.db import migrations%0A%0A%0Aclass Migration(migrations.Migration):%0A%0A dependencies = %5B%0A ('initiatives', '0010_auto_20190521_0954'),%0A %5D%0A%0A ...
51e516f260858e699ee828ac6fc91af39c67254c
Add script for automatically updating schemas
update-schemas.py
update-schemas.py
Python
0
@@ -0,0 +1,1701 @@ +#!/usr/bin/env python%0A%0Aimport os%0Aimport re%0Aimport sys%0Aimport subprocess as sp%0A%0A%0Adef get_schemas(pattern):%0A%0A cmd = %5B'git', 'grep', '--name-only'%5D%0A output = sp.check_output(cmd + %5Bpattern, '--', 'schemas'%5D).decode('utf8')%0A names = output.split()%0A print(nam...
7e8ffcef7111fc3cd2f1d58831afb09741d9d8fc
Create my-calendar-i.py
Python/my-calendar-i.py
Python/my-calendar-i.py
Python
0.000177
@@ -0,0 +1,2013 @@ +# Time: O(n%5E2)%0A# Space: O(n)%0A%0A# Implement a MyCalendar class to store your events.%0A# A new event can be added if adding the event will not cause a double booking.%0A#%0A# Your class will have the method, book(int start, int end).%0A# Formally, this represents a booking on the half open in...
e1993d4d3c3199dce2be2b475a9236e95732a0f0
Verify computer executing the script is of OS X 10.6.1 or higher type
dodge.py
dodge.py
Python
0.000035
@@ -0,0 +1,1496 @@ +import platform%0A%0A%0Aclass OSXDodger(object):%0A allowed_version = %2210.12.1%22%0A%0A def __init__(self, applications_dir):%0A self.app_dir = applications_dir%0A%0A def load_applications(self):%0A %22%22%22%0A Read all applications in the %60/Applications/%60 dir%0A...
e965147ef7bc89e6c8885d1521d92305604de6f8
add problem
others/find_array_index_of_sum.py
others/find_array_index_of_sum.py
Python
0.044376
@@ -0,0 +1,626 @@ +%22%22%22%0A%E9%A2%98%E7%9B%AE%EF%BC%9A%E7%BB%99%E5%AE%9A%E4%B8%80%E4%B8%AA%E6%95%B4%E6%95%B0%E6%95%B0%E7%BB%84%E5%92%8C%E4%B8%80%E4%B8%AA%E6%95%B4%E6%95%B0%EF%BC%8C%E8%BF%94%E5%9B%9E%E4%B8%A4%E4%B8%AA%E6%95%B0%E7%BB%84%E7%9A%84%E7%B4%A2%E5%BC%95%EF%BC%8C%E8%BF%99%E4%B8%A4%E4%B8%AA%E7%B4%A2%E5%BC%95%...
ef8b909beb4de8435c20ed0b45bca9478d476ed8
Add python script to get coordinates from the csv
geocode.py
geocode.py
Python
0.000001
@@ -0,0 +1,984 @@ +#! /bin/python3%0A%0Aimport csv%0Aimport time%0Afrom geopy.geocoders.googlev3 import GoogleV3%0A%0Ageocoder = GoogleV3(api_key=%22AIzaSyAy6XiyZG-6u99q-qacOz-dtT9ILbYzb-4%22)%0Awith open(%22../ReadingBusesOrig.csv%22) as cf:%0A with open(%22../out.csv%22, %22a%22) as cw:%0A reader = csv.Dict...
bb928a0c0a4ddc11b05771e9eaa33f1058cc022a
Add pageset for ugamsolutions.com
tools/skp/page_sets/skia_ugamsolutions_desktop.py
tools/skp/page_sets/skia_ugamsolutions_desktop.py
Python
0
@@ -0,0 +1,1252 @@ +# Copyright 2014 The Chromium Authors. All rights reserved.%0A# Use of this source code is governed by a BSD-style license that can be%0A# found in the LICENSE file.%0A# pylint: disable=W0401,W0614%0A%0A%0Afrom telemetry.page import page as page_module%0Afrom telemetry.page import page_set as page_s...
68e5bdc3c3a8a59f820ea15e706e85e14f2a654b
Add mgmt cmd to fix bad loc-type references
corehq/apps/locations/management/commands/fix_loc_type_reference.py
corehq/apps/locations/management/commands/fix_loc_type_reference.py
Python
0
@@ -0,0 +1,2103 @@ +from optparse import make_option%0A%0Afrom django.core.management.base import BaseCommand%0A%0Afrom corehq.apps.locations.models import SQLLocation, LocationType%0A%0A%0Aclass Command(BaseCommand):%0A help = %22Make %22%0A%0A option_list = (%0A make_option('--dry_run',%0A act...
50216cbe96f5b24f7de03e47e7b567f5ed32541b
Update forward compatibility horizon to 2020-12-20
tensorflow/python/compat/compat.py
tensorflow/python/compat/compat.py
# Copyright 2018 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
Python
0
@@ -1449,10 +1449,10 @@ 12, -19 +20 )%0A_F
502c994fa469bcd40cf2216c169b827db220cb6b
Disable spaceport benchmark on linux.
tools/perf/benchmarks/spaceport.py
tools/perf/benchmarks/spaceport.py
# Copyright 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. """Runs spaceport.io's PerfMarks benchmark.""" import logging import os from telemetry import benchmark from telemetry import page as page_module from tele...
Python
0.000001
@@ -3907,16 +3907,70 @@ indows.%0A +# crbug.com/469224: Test is failing on linux as well.%0A @benchma @@ -3993,16 +3993,25 @@ ', 'win' +, 'linux' )%0Aclass
0ca7ec8da8fffbfe057038e832bb12a33384c07b
add date format to date column in ctable mapping
custom/apps/gsid/ctable_mappings.py
custom/apps/gsid/ctable_mappings.py
from ctable.fixtures import CtableMappingFixture from ctable.models import ColumnDef, KeyMatcher class PatientSummaryMapping(CtableMappingFixture): name = 'patient_summary' domains = ['gsid'] couch_view = 'gsid/patient_summary' schedule_active = True @property def columns(self): colum...
Python
0.000001
@@ -1167,16 +1167,40 @@ _index=8 +, date_format=%22%25Y-%25m-%25d%22 ),%0A
5d6dabcad4f2467f07765f1e28752b5cbba61d53
add xfailing test for #693
test/util/test_options.py
test/util/test_options.py
Python
0
@@ -0,0 +1,686 @@ +from __future__ import absolute_import, division, print_function%0A%0Aimport os%0Aimport pytest%0A%0Afrom dials.util.options import OptionParser%0Afrom dials.util.options import flatten_datablocks%0A%0Apytestmark = pytest.mark.skipif(%0A not os.access('/dls/i04/data/2019/cm23004-1/20190109/Eiger', o...
00bba22c2fb62b378efb40d86ff633881c55991d
Add tests
tests/test_commit_view.py
tests/test_commit_view.py
Python
0.000001
@@ -0,0 +1,2624 @@ +import os%0Afrom textwrap import dedent%0A%0Aimport sublime%0A%0Afrom unittesting import DeferrableTestCase%0Afrom GitSavvy.tests.mockito import unstub, when%0Afrom GitSavvy.tests.parameterized import parameterized as p%0A%0Afrom GitSavvy.core.commands.commit import extract_commit_message, GsCommitC...
c972873f6fd1c85776101ecca16fa8ae48c48c14
Fix movie_queue unit test again
tests/test_movie_queue.py
tests/test_movie_queue.py
from flexget.plugins.filter.movie_queue import queue_add, queue_get from tests import FlexGetBase class TestMovieQueue(FlexGetBase): __yaml__ = """ templates: global: mock: - {title: 'MovieInQueue', imdb_id: 'tt1931533', tmdb_id: 603, movie_name: MovieInQueue} ...
Python
0.000006
@@ -1908,13 +1908,11 @@ == -86838 +603 %0A
d1eac6f370f4a06151870be25cb362370d9ec53d
Add salt/utils/cli.py
salt/utils/cli.py
salt/utils/cli.py
Python
0
@@ -0,0 +1,2681 @@ +# -*- coding: utf-8 -*-%0A'''%0AFunctions used for CLI argument handling%0A'''%0A%0A# Import python libs%0Aimport re%0Aimport yaml%0A%0A# Import salt libs%0Afrom salt._compat import string_types, integer_types%0A%0A#KWARG_REGEX = re.compile(r'%5E(%5B%5E%5Cd%5CW%5D%5B%5Cw-%5D*)=(?!=)(.*)$', re.UNICOD...
13e6f6967298173d4979c1bc4eb9d7ec6b1f9354
add a wrapper, not finished yet
gpudb.py
gpudb.py
Python
0
@@ -0,0 +1,2353 @@ +#! /usr/bin/python%0A%0Aimport sys%0Aimport os%0Aimport shutil%0A%0Adef dbHelp():%0A print %22Command:%22%0A print %22%5Ctcreate DBName: create the database%22%0A print %22%5Ctdelete DBName: delete the database%22%0A print %22%5Ctlist: list the table infomation in the database%22%0A p...
3a14fa67e4d35fa2865d20e08c03272cff7fcd4e
test wechat post
hello.py
hello.py
Python
0
@@ -0,0 +1,284 @@ +from flask import Flask, request%0A%0Aapp = Flask(__name__)%0A%0A%0A@app.route('/')%0Adef index():%0A return '%3Ch1%3EHello World!%3C/h1%3E'%0A%0A@app.route('/kindle_push', methods=%5B'POST'%5D)%0Adef kindle_push():%0A print(request.data)%0A return 'success'%0A%0A%0Aif __name__ == '__main__'...
ffdcc9d523daa5a610de1534f3ed10f4d629aaf2
add 'inspect' filter
filter_plugins/inspect.py
filter_plugins/inspect.py
Python
0.000026
@@ -0,0 +1,377 @@ +class FilterModule(object):%0A ''' A comment '''%0A%0A def filters(self):%0A return %7B%0A 'inspect': self.inspect,%0A %7D%0A%0A def inspect(self, input_value, verbose=None):%0A if (type(input_value) is list) and verbose:%0A return %22%5B%7B%7D%5D%2...
737936b91a4a908a02338373b716161f487e44c9
add factories
skrill/tests/factories.py
skrill/tests/factories.py
Python
0.998819
@@ -0,0 +1,504 @@ +from decimal import Decimal%0Aimport random%0A%0Afrom django.contrib.auth.models import User%0A%0Aimport factory%0A%0Afrom skrill.models import PaymentRequest%0Afrom skrill.settings import ISO4217%0A%0A%0Aclass UserFactory(factory.Factory):%0A FACTORY_FOR = User%0A%0A username = factory.Sequenc...
5b54313e08ddf7176583f4776c804a482b111de1
add test
mysqlutil/test/test_privileges.py
mysqlutil/test/test_privileges.py
Python
0.000009
@@ -0,0 +1,2010 @@ +#!/usr/bin/env python%0A# coding: utf-8%0A%0Aimport logging%0Aimport unittest%0A%0Afrom pykit import mysqlutil%0Afrom pykit import ututil%0A%0Add = ututil.dd%0A%0Alogger = logging.getLogger(__name__)%0A%0A%0Aclass TestPrivileges(unittest.TestCase):%0A%0A def test_load_dump(self):%0A ks = (...
860580119cc6ae9241e866275eccc7d71ae95e8c
Build fis assets on deploy updated.
fapistrano/plugins/fis.py
fapistrano/plugins/fis.py
Python
0
@@ -0,0 +1,504 @@ +# -*- coding: utf-8 -*-%0A%0Afrom fabric.api import show, run, env, cd%0A%0Afrom .. import signal%0A%0Adef init():%0A signal.register('deploy.updated', build_fis_assets)%0A%0Adef build_fis_assets():%0A with show('output'):%0A run('''%0A fis release --file %25(releases_path)s/%25(...
471f5738e82fbb57c1028bdf2f1556edb0b074ed
Rename concurrent log handler
src/diamond/logging/handlers/concurrentloghandler.py
src/diamond/logging/handlers/concurrentloghandler.py
Python
0.000006
@@ -0,0 +1,384 @@ +# coding=utf-8%0A%0Afrom concurrent_log_handler import ConcurrentRotatingFileHandler as CRFH%0Aimport sys%0A%0A%0Aclass ConcurrentRotatingFileHandler(TRFH):%0A%0A def flush(self):%0A try:%0A super(ConcurrentRotatingFileHandler, self).flush()%0A except IOError:%0A ...
910fb34ec6ef8544d4de5d8baf52fbd1c2c48027
Create Hello World Example
hello.py
hello.py
Python
0.000077
@@ -0,0 +1,160 @@ +from flask import Flask%0Aapp = Flask(__name__)%0A%0A@app.route('/')%0Adef hello_world():%0A return '%3Ch1%3EHello 391 team!%3Ch1%3E'%0A%0Aif __name__ == '__main__':%0A app.run()
1290fc572bfc862ab7c8ee579257e00486a3c921
add a really tiny wsgi
hrf.wsgi
hrf.wsgi
Python
0.000175
@@ -0,0 +1,39 @@ +from hrf.hrf import app as application%0A
c242589075aa4fc9af0a17461f235348b53284a1
Add sample code decorator
decorator/cli-sample-decorator.py
decorator/cli-sample-decorator.py
Python
0
@@ -0,0 +1,392 @@ +#!/usr/bin/env python%0A%0Aclass Deco(object):%0A%0A def __init__(self, func):%0A self.func = func%0A%0A def __call__(self, *args, **kwargs):%0A result = self.func(*args, **kwargs)%0A # multiple it by itself%0A result = result * result%0A return result%0A%0A@D...
bf6cfcaa1ac20c1cb65d2d803f64f35026c099f3
Add Event class as well as connect and fire methods.
event.py
event.py
Python
0
@@ -0,0 +1,254 @@ +class Event:%0A def __init__(self):%0A self.listeners = %5B%5D%0A%0A def connect(self, listener):%0A self.listeners.append(listener)%0A%0A def fire(self, *args, **kwargs):%0A for listener in self.listeners:%0A listener(*args, **kwargs)
8d38a72548f3bfc62bac9f49d537fa2cdee7a6df
Add vanilla sequential face detection example.
face1.py
face1.py
Python
0
@@ -0,0 +1,1770 @@ +%22%22%22Sequential, vanilla face detection.%22%22%22%0A%0Aimport datetime%0Aimport sys%0Aimport cv2%0Aimport numpy as np%0A%0Aimport util%0Aimport cascade%0A%0ADEVICE = int(sys.argv%5B1%5D)%0AWIDTH = int(sys.argv%5B2%5D)%0AHEIGHT = int(sys.argv%5B3%5D)%0ADURATION = float(sys.argv%5B4%5D) # ...
78ce22e302d749e56352e6ec8f592dca4e2287f6
Add IATISerializer
akvo/api/serializers.py
akvo/api/serializers.py
Python
0
@@ -0,0 +1,990 @@ +# -*- coding: utf-8 -*-%0A%0A# Akvo RSR is covered by the GNU Affero General Public License.%0A# See more details in the license.txt file located at the root folder of the Akvo RSR module.%0A# For additional details on the GNU license please see %3C http://www.gnu.org/licenses/agpl.html %3E.%0Afrom l...
18934774b331dfc6ad6b12cab005a97621f042e8
redundant phrase in docstring
examples/bicluster/plot_bicluster_newsgroups.py
examples/bicluster/plot_bicluster_newsgroups.py
""" ================================================================ Biclustering documents with the Spectral Co-clustering algorithm ================================================================ This example demonstrates the Spectral Co-clustering algorithm on the twenty newsgroups dataset. The 'comp.os.ms-windows...
Python
0.998893
@@ -899,14 +899,8 @@ ure -score than @@ -917,17 +917,17 @@ found by -%0A + MiniBatc
6cbd414a670e4b25e8e1e8df9c0e32bee541478c
Create ember.py
ember.py
ember.py
Python
0.000002
@@ -0,0 +1,1057 @@ +from django import template%0A%0Aregister = template.Library()%0A%0A%0A@register.tag(name='linkto')%0Adef do_linkto(parser, token):%0A nodelist = parser.parse(('endlinkto',))%0A args = token.split_contents()%5B1:%5D%0A if not args:%0A raise template.TemplateSyntaxError(%22%7B0%7D tag...
6d80c414944bfdd6632b6068d98805a6f67353fb
add test script for interfaces
_examples/iface/test.py
_examples/iface/test.py
Python
0.000002
@@ -0,0 +1,401 @@ +# Copyright 2015 The go-python Authors. All rights reserved.%0A# Use of this source code is governed by a BSD-style%0A# license that can be found in the LICENSE file.%0A%0A## py2/py3 compat%0Afrom __future__ import print_function%0A%0Aimport iface%0A%0A### test docs%0Aprint(%22doc(iface): %25r%22 %2...
bb4f81f86d5b7bc5869da9f29cc5ea6013d4b4cf
Add plot speed analysis
analysis/plot_speeds.py
analysis/plot_speeds.py
Python
0.000002
@@ -0,0 +1,2246 @@ +%22%22%22Plots the speed readings.%22%22%22%0A%0A#from dateutil import parser as dateparser%0Afrom matplotlib import pyplot%0Aimport collections%0Aimport datetime%0Aimport json%0Aimport sys%0A%0A%0A%0Adef main():%0A %22%22%22Main function.%22%22%22%0A if sys.version_info.major %3C= 2:%0A ...
d19899981a77faa9c2017b6991c8e0c4ca4b7b97
Create db_migrate.py
fade/db_migrate.py
fade/db_migrate.py
Python
0.000003
@@ -0,0 +1,1007 @@ +#!flask/bin/python%0A%22%22%22%0A See LICENSE.txt file for copyright and license details.%0A%22%22%22%0A%0Aimport imp%0Afrom migrate.versioning import api%0Afrom app import db%0Afrom config import SQLALCHEMY_DATABASE_URI%0Afrom config import SQLALCHEMY_MIGRATE_REPO%0A%0Av = api.db_version(SQLALCH...
1646916ce204b51a2900fd9edd4626e145f0d873
Create objects_impl.py
CoreConceptsPy/objects_impl.py
CoreConceptsPy/objects_impl.py
Python
0.000048
@@ -0,0 +1,1173 @@ +from coreconcepts import AObjects%0Afrom osgeo import gdal, gdal_array%0Aimport ogr, os, osr%0Afrom gdalconst import *%0Aimport numpy as np%0A%0A%0Aclass ArcShpObjects(AObjects):%0A @staticmethod%0A def getBounds (obj):%0A #Get geometery%0A geom = obj.GetGeometryRef()%0A e...
fa1e8f21347d41712b03817e4fac5a07a1a991eb
Add `btheadphone.py` to find headphones' BTADDR
bin/btheadphone.py
bin/btheadphone.py
Python
0
@@ -0,0 +1,1857 @@ +#!/usr/bin/env python%0Aimport dbus%0Afrom xml.etree import ElementTree%0A%0Abluez_bus = 'org.bluez'%0Abluez_root = '/org/bluez'%0A%0Aintro_iface = 'org.freedesktop.DBus.Introspectable'%0Aprops_iface = 'org.freedesktop.DBus.Properties'%0Adev_iface = 'org.bluez.Device1'%0A%0Aa2dp_uuid = '0000110d-000...
e7b5f2a91cbf55666e29ec6ac4775e8cee1cc574
Add ob_atom class
maxwellbloch/ob_atom.py
maxwellbloch/ob_atom.py
Python
0.9994
@@ -0,0 +1,1547 @@ +# -*- coding: utf-8 -*-%0A%0Aimport json%0A%0Afrom maxwellbloch import ob_base%0A%0Aclass OBAtom(ob_base.OBBase):%0A%0A def __init__(self, num_states=0, energies=%5B%5D, decays=%5B%5D, fields=%5B%5D):%0A%0A self.num_states = num_states%0A self.energies = energies%0A self.deca...
e6b1a590a47a806e0a717d94c2dc112c7671bb2c
add script to merge Aaron's unWISE astrometric offsets into the WISE tile file
py/legacyanalysis/wise-offsets.py
py/legacyanalysis/wise-offsets.py
Python
0
@@ -0,0 +1,1179 @@ +from astrometry.util.fits import fits_table%0A%0A'''%0AThis is a little script for merging Aaron's astrometric offsets into our%0AWISE tile file.%0A'''%0A%0A#/project/projectdirs/cosmo/work/wise/outputs/merge/neo4/fulldepth/fulldepth_neo4_index.fits%0A%0AW = fits_table('legacypipe/data/wise-tiles.fi...
fbebb94cd621f0d7b37dbe46272fe9a09a9905a7
Add cram package.
var/spack/packages/cram/package.py
var/spack/packages/cram/package.py
Python
0
@@ -0,0 +1,439 @@ +from spack import *%0A%0Aclass Cram(Package):%0A %22%22%22Cram runs many small MPI jobs inside one large MPI job.%22%22%22%0A homepage = %22https://github.com/scalability-llnl/cram%22%0A url = %22http://github.com/scalability-llnl/cram/archive/v1.0.1.tar.gz%22%0A%0A version('1.0.1', ...
6b0aaaea18c755afee0bb3ccd16b27e74c18b3da
Make sure IPC is communicating in bytes
flexget/ipc.py
flexget/ipc.py
from __future__ import unicode_literals, division, absolute_import import argparse import contextlib import logging import socket import threading import time from flexget.scheduler import BufferQueue from flexget.utils import json from flexget.utils.tools import console log = logging.getLogger('ipc') def remote_ex...
Python
0.000002
@@ -737,16 +737,32 @@ le(line. +decode('utf-8'). rstrip() @@ -2868,16 +2868,32 @@ all(line +.encode('utf-8') )%0A
e7a5f511a87ce80b4db9939904163d19e58738c4
Add send game_version script
game_sent_game_version.py
game_sent_game_version.py
Python
0
@@ -0,0 +1,1669 @@ +#!/usr/bin/env python%0A#%0A# igcollect - Sent currently deployed game version.%0A#%0A# Copyright (c) 2016 InnoGames GmbH%0A#%0A%0Aimport os%0Aimport re%0Aimport socket%0A%0A# All possible revision files for all games.%0Arevision_file = %5B%0A '/www/ds/revision',%0A '/www/grepo/branch',%0A ...
cad82b50c8115cd92b6c1bbc1c18c9a825bad368
Add interactive graph with terms
graph.py
graph.py
Python
0
@@ -0,0 +1,1352 @@ +#!/usr/bin/env python%0A# -*- coding: utf-8 -*-%0A%0Aimport matplotlib%0Aimport matplotlib.pyplot as plt%0Afrom unicodecsv import UnicodeReader%0A%0ANEW_ANNOTATIONS = 'new_annotations.map'%0A%0A%0Adef graph():%0A readlist = %5B%5D%0A with open(NEW_ANNOTATIONS, 'r') as infile:%0A reader...
408af1320637063bacdd105cf00cdf71ef1ff9b2
Add labeled implementation
multi.py
multi.py
Python
0
@@ -0,0 +1,1112 @@ +from keras.layers import Input, LSTM, TimeDistributed, Dense, merge, Dropout%0Afrom keras.models import Model%0A%0Avocab_size = 200%0Aseq_len = 25%0Alabel_size = 10%0Abatch_size = 50%0Alstm_size = 512%0A%0Achar_input = Input(batch_shape=(batch_size, seq_len, vocab_size), name='char_input')%0Alabel_i...
51e06c31a722953f4aa7a1c0bb71b8ddd77a78d7
Switch to WeakKeyDict
pyqtgraph/tests/test_stability.py
pyqtgraph/tests/test_stability.py
""" PyQt/PySide stress test: Create lots of random widgets and graphics items, connect them together randomly, the tear them down repeatedly. The purpose of this is to attempt to generate segmentation faults. """ from pyqtgraph.Qt import QtTest import pyqtgraph as pg from random import seed, randint import sys, gc, ...
Python
0.000003
@@ -698,11 +698,21 @@ Weak -Set +KeyDictionary ()%0A%0A @@ -2360,20 +2360,22 @@ gets -.add( +%5B' widget -) +'%5D = 1 %0A
43fd2b8bd64e684ee47c91f582c8c2578e420105
Test check_visitors
test/plugins/test_common.py
test/plugins/test_common.py
Python
0
@@ -0,0 +1,820 @@ +%22%22%22Tests of edx_lint/pylint/common.py%22%22%22%0A%0Aimport pytest%0A%0Afrom edx_lint.pylint.common import check_visitors%0A%0A# pylint: disable=missing-docstring, unused-variable%0A%0Adef test_check_good_visitors():%0A @check_visitors%0A class ItsRight(object):%0A def visit_call(se...
c841fccb6099fb00b0a66a11c837bf2afd32e2f1
Create shell_cmd_test.py
shell_cmd_test.py
shell_cmd_test.py
Python
0.000013
@@ -0,0 +1,254 @@ +import subprocess%0A%0Asubprocess.call(%5B'say', ' Hello World from Python.'%5D)%0A%0Alisting_holder = subprocess.call(%5B'ls','-l'%5D)%0Aif listing_holder %3E 0:%0A%09print %22here the files listing resulting from the shell command ran from within python: %5Cn %25s%22 %25listing_holder%0A
6988dab0256ce6b6e0d5cbb4b3ac06727956ee37
Create a new file to calculate features from sets of points
emission/analysis/point_features.py
emission/analysis/point_features.py
Python
0
@@ -0,0 +1,761 @@ +# Standard imports%0Aimport math%0Aimport logging%0Aimport numpy as np%0Aimport emission.core.common as ec%0A%0Adef calSpeed(point1, point2):%0A distanceDelta = ec.calDistance(%5Bpoint1.mLongitude, point1.mLatitude%5D, %5Bpoint2.mLongitude, point2.mLatitude%5D)%0A timeDelta = point2.mTime - poi...
9033018854a29b09cdb7b6d9f01c371fced19e05
hello test
hello.py
hello.py
Python
0.999995
@@ -0,0 +1,428 @@ +# -*- coding: utf-8 -*-%0A%22%22%22%0ACreated on Sun Sep 27 11:16:02 2015%0A%0A@author: Nathan Ford%0A%22%22%22%0A%0A%0A%0A#%25%25%0A%0Adef later():%0A %22%22%22Print %22Laters World%22 and return None%22%22%22%0A print(%22Laters World%22)%0A%0A# main program starts here%0A%0Alater()%0A%0A%0A#%...
bef97246f77aaa1030b17e1213850c95786f51d7
Add state tests
app/tests/test_state.py
app/tests/test_state.py
Python
0.000002
@@ -0,0 +1,1429 @@ +import unittest%0Aimport time%0A%0Afrom app.state import state, ProgramNotFound%0A%0A%0Aclass TestState(unittest.TestCase):%0A%0A def tearDown(self):%0A if state._process is not None:%0A state._process.terminate()%0A%0A def test_start_all(self):%0A programs= %5B%22asci...
23f69eff15b189423e0c1f36d2f71f708e4522e7
Add missing sys import
rst2pdf/opt_imports.py
rst2pdf/opt_imports.py
# -*- coding: utf-8 -*- #$HeadURL$ #$LastChangedDate$ #$LastChangedRevision$ # See LICENSE.txt for licensing terms ''' opt_imports.py contains logic for handling optional imports. ''' import os from log import log PyHyphenHyphenator = None DCWHyphenator = None try: import wordaxe from wordaxe import vers...
Python
0.000059
@@ -191,16 +191,27 @@ mport os +%0Aimport sys %0A%0Afrom l
54033b438900e17d8e3e852222dc25c981cdb7e7
add model_helper, forgot to commit it previously
models/_model_helper.py
models/_model_helper.py
Python
0.000002
@@ -0,0 +1,767 @@ +%0Achebyshev2coeffs = %5B2., 0., -1.%5D%0Achebyshev4coeffs = %5B8., 0., -8., 0., 1.%5D%0Achebyshev6coeffs = %5B32., 0., -48., 0., 18., 0., -1.%5D%0Achebyshev8coeffs = %5B128., 0., -256., 0., 160., 0., -32., 0., 1.%5D%0Achebyshev16coeffs = %5B32768., 0., -131072., 0., 212992., 0., -180224., 0., 84480....
91bab4277a8875f7248af698773938d54e19724f
Create InputNeuronGroup_Liquid.py
examples/InputNeuronGroup_Liquid.py
examples/InputNeuronGroup_Liquid.py
Python
0
@@ -0,0 +1,1912 @@ +'''%0AExample of a spike generator (only outputs spikes)%0A%0AIn this example spikes are generated and sent through UDP packages. At the end of the simulation a raster plot of the %0Aspikes is created.%0A%0A'''%0A%0Afrom brian import *%0Aimport numpy%0A%0Afrom brian_multiprocess_udp import BrianConn...
a11d33f5e1df23f044cac709ebbbb5d369d0e6ca
Add first test for update_language_list function
tests/test_add_language/test_update_language_list.py
tests/test_add_language/test_update_language_list.py
Python
0
@@ -0,0 +1,909 @@ +# test_update_language_list%0A%0Afrom __future__ import unicode_literals%0A%0Aimport json%0Aimport os%0Aimport os.path%0A%0Aimport nose.tools as nose%0A%0Aimport yvs.shared as yvs%0Aimport utilities.add_language as add_lang%0Afrom tests.test_add_language import set_up, tear_down%0Afrom tests.test_add...
bd5fc565c5106d609a7dc65a663515920e29caa4
Add example of multi-layer chart
altair/vegalite/v2/examples/multiple_marks.py
altair/vegalite/v2/examples/multiple_marks.py
Python
0.000001
@@ -0,0 +1,382 @@ +%22%22%22%0AMultiple Marks%0A==============%0AThis example demonstrates creating a single chart with multiple markers%0Arepresenting the same data.%0A%22%22%22%0Aimport altair as alt%0Afrom vega_datasets import data%0A%0Astocks = data.stocks()%0A%0Achart = alt.LayerChart(stocks).encode(%0A x='date...
41acbf471edce3babeed4a59a7f5f2a923d6fed6
Create sampe_1.py
apps/mongodb/sampe_1.py
apps/mongodb/sampe_1.py
Python
0.000038
@@ -0,0 +1,170 @@ +import pandas as pd%0Aimport bson%0A%0AFILE=%22/folder/file.bson%22%0A%0Awith open(FILE,'rb') as f:%0A data = bson.decode_all(f.read())%0A%0Amain_df=pd.DataFrame(data)%0Amain_df.describe()%0A
e7c6a1d5ca6c6ebd85976698e8c00ca761747b59
ADD FEATURE : simple C/C++ compiler
apps/simple_compiler.py
apps/simple_compiler.py
Python
0
@@ -0,0 +1,1527 @@ +from apps.decorators import on_command%0Afrom apps.slackutils import cat_token%0Afrom subprocess import check_output, CalledProcessError, STDOUT%0Aimport os%0Aimport re%0A%0A%0A@on_command(%5B'!%EC%BB%B4%ED%8C%8C%EC%9D%BC'%5D)%0Adef run(robot, channel, tokens, user, command):%0A '''C, C++, Python...
ccae8514f184d612c515f1c17b8832b89b0982db
Create phylo.py
phylo.py
phylo.py
Python
0.001615
@@ -0,0 +1,1479 @@ +def phy_descend(parent, dictionary, out=%7B%7D):%0A if parent not in out:%0A out%5Bparent%5D = %7B%7D%0A for i in dictionary.keys():%0A if dictionary%5Bi%5D == parent: phy_descend(i, dictionary, out%5Bparent%5D)%0A return out%0A%0Adef phy_ancestry(child, dictionary, ou...
5bed3cf9ec4ccbc94529a4d7b37802f5340803a6
add utilities for unicode-friendly csv file reading & writing
dimagi/utils/csv.py
dimagi/utils/csv.py
Python
0
@@ -0,0 +1,1955 @@ +%22%22%22 %0Aextend csv.writer and csv.reader to support Unicode%0Afrom http://docs.python.org/library/csv.html%0A%22%22%22%0Afrom __future__ import absolute_import%0A%0Aimport csv%0Aimport codecs%0Aimport cStringIO%0A%0Aclass UTF8Recoder:%0A %22%22%22%0A Iterator that reads an encoded stream ...