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
ac3d92025c033a77718467fe611d15055f87f1b7
add member.py (in models package)
Care4Care/C4CApplication/models/member.py
Care4Care/C4CApplication/models/member.py
Python
0
@@ -0,0 +1,696 @@ +from django.db import models%0A%0Aclass Member(models.Model): %0A mail = models.EmailField(primary_key=True)%0A first_name = models.CharField(max_length=20)%0A last_name = models.CharField(max_length=30)%0A picture = models.ImageField()%0A birthday = models.DateField()%0A tag = mode...
bea711b4560cf0373188f9e198fb2aa228227ee4
add python ver
mosquitogo.py
mosquitogo.py
Python
0.001076
@@ -0,0 +1,414 @@ +#!/usr/bin/env python3%0Aimport wave%0Afrom struct import pack%0Afrom math import sin, pi%0A%0ARATE=44100%0A%0A## GENERATE MONO FILE ##%0Awv = wave.open('mg.wav', 'w')%0Awv.setparams((1, 2, RATE, 0, 'NONE', 'not compressed'))%0AmaxVol=2**15-1.0 #maximum amplitude%0AwvData=b%22%22%0Afor i in range(0, ...
e7b85a4afc9f40073e59a51f9335a72afb543d87
Add flask service.
app/services/flask/service.py
app/services/flask/service.py
Python
0
@@ -0,0 +1,849 @@ +from .base import BaseService%0A%0A%0Adef configure_flask_logging(app):%0A for handler in logging.getLogger().handlers:%0A app.logger.addHandler(handler)%0A%0A%0Aclass FlaskServer(BaseService):%0A def __init__(self):%0A params = %7B%0A %22template_folder%22: %22../templ...
6b364f7f76fd897000d9e6f9140a2ad7794bc1ed
make it easier to create superuser
src/python/scripts/create-superuser.py
src/python/scripts/create-superuser.py
Python
0.000001
@@ -0,0 +1,901 @@ +'''%0ACreated on Jun 30, 2010%0A%0A@author: jnaous%0A'''%0A%0Adef run():%0A from django.contrib.auth.models import User%0A import os%0A %0A if %22SUPERUSER_PASSWD%22 not in os.environ:%0A print %22SUPERUSER_PASSWD environment is not set. Set this var to the%5C%0Apassword of the sup...
fac2449c5e1e5c3509ca39e7e40a75c4b1b0bfa9
Create items.py
items.py
items.py
Python
0.000001
@@ -0,0 +1,1454 @@ +# -*- coding: utf-8 -*-%0A%0A%0Afrom scrapy.item import Item,Field%0A%0A%0Aclass HuxiuItem(Item):%0A%0A huxiuNo = Field()%0A Name = Field()%0A Website = Field()%0A CompanyName = Field()%0A FoundDate = Field()%0A District = Field()%0A CompanyScale = Field()%0A FinancingStage =...
a66cfb92b119810d7220d017ea6d214d8476ca6e
Add Tester to _strategies.py
axelrod/strategies/_strategies.py
axelrod/strategies/_strategies.py
from alternator import * from appeaser import * from averagecopier import * from cooperator import * from darwin import * from defector import * from forgiver import * from geller import * from gobymajority import * from grudger import * from grumpy import * from hunter import * from inverse import * from mathematicalc...
Python
0.000001
@@ -1641,24 +1641,36 @@ sTitForTat,%0A + Tester,%0A TitFor2T
3c1c434d1b88cff110f84dac99db6465c6df2519
Add command line tool
lcfam.py
lcfam.py
Python
0.00002
@@ -0,0 +1,577 @@ +#!/usr/bin/env python%0A%0Aimport sys, warnings%0Afrom skimage import io, color, img_as_ubyte%0A%0Aif len(sys.argv) != 4:%0A print 'Usage: %25s %3Ccfam.png%3E %3Cfam.png%3E %3Coutfile.png%3E' %25 sys.argv%5B0%5D%0A sys.exit(1)%0A%0Afam = io.imread(sys.argv%5B2%5D)%0Afam_norm = fam.astype(float)...
0a0a9addea16d5adf4d9edb3d56e1d890b6214e5
Add tests for new complext date time field.
st2common/tests/unit/test_db_fields.py
st2common/tests/unit/test_db_fields.py
Python
0
@@ -0,0 +1,2331 @@ +# Licensed to the StackStorm, Inc ('StackStorm') under one or more%0A# contributor license agreements. See the NOTICE file distributed with%0A# this work for additional information regarding copyright ownership.%0A# The ASF licenses this file to You under the Apache License, Version 2.0%0A# (the %2...
1b6966cf0e90da0ac060a43349bbe4ce0f5fc365
Create a model-based form for whitelist requests
src/whitelist/whitelist_form.py
src/whitelist/whitelist_form.py
Python
0.000001
@@ -0,0 +1,250 @@ +from django.forms import ModelForm%0Afrom whitelist.models import Player%0A%0A%0Aclass WhitelistForm(ModelForm):%0A %22%22%22 Automatically generate a form based on the Player model%0A %22%22%22%0A class Meta:%0A model = Player%0A fields = ('ign', 'email')%0A
bf6ce0b61c1f66cbb88c3e5d12174242e04c9c87
Add PROJECT_CONSTANTS configuration file
static/neural-net/PROJECT_CONSTANTS.py
static/neural-net/PROJECT_CONSTANTS.py
Python
0
@@ -0,0 +1,92 @@ +import os%0A%0APGN_FILE_DIRECTORY = os.path.dirname(os.path.realpath(__file__)) + %22/game-files%22%0A
adfc4d376338a185c56ee3a1932801e6a8c26917
Add spectra making script
make_spectra.py
make_spectra.py
Python
0
@@ -0,0 +1,758 @@ +import halospectra as hs%0Aimport randspectra as rs%0Aimport sys%0A%0Asnapnum=sys.argv%5B1%5D%0Asim=sys.argv%5B2%5D%0A#base=%22/n/hernquistfs1/mvogelsberger/projects/GFM/Production/Cosmo/Cosmo%22+str(sim)+%22_V6/L25n512/output/%22%0A#savedir=%22/n/home11/spb/scratch/Cosmo/Cosmo%22+str(sim)+%22_V6_512...
5dc7b9e6d58ff0aee770cebd1c61f46827702ff9
add setup.py
setup.py
setup.py
Python
0.000001
@@ -0,0 +1,334 @@ +from setuptools import setup, find_packages%0A%0A%0A# You need to install https://github.com/Bachmann1234/CMS50Dplus%0Asetup(%0A name='heart-rate-hud',%0A version='1',%0A author='Matt Bachmann',%0A url='https://github.com/Bachmann1234/heart-rate-hud',%0A description='Tkinter window to ...
d493f295c9af0eff76710599da6f05946ba50ed1
Move test-only deps from REQUIRE_SETUP to REQUIRE_TEST.
setup.py
setup.py
#!/usr/bin/env python # # Copyright 2011 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 req...
Python
0.000005
@@ -16,17 +16,16 @@ python%0A# - %0A# Copyr @@ -68,17 +68,16 @@ erved.%0A# - %0A# Licen @@ -245,17 +245,16 @@ nse at%0A# - %0A# h @@ -296,17 +296,16 @@ SE-2.0%0A# - %0A# Unles @@ -1669,30 +1669,8 @@ 2',%0A - 'icalendar==1.2',%0A @@ -1730,171 +1730,178 @@ ils%0A - 'unittest2==0.5.1',%0A ...
5457fa3c39d5ebe016c9f171878aaf1580ee4730
add setup
setup.py
setup.py
Python
0
@@ -0,0 +1,1292 @@ +from setuptools import setup, find_packages%0Aimport warnings%0A%0ADESCRIPTION = %22rxn is software designed to assist in prediction of synthesis pathway%22%0A%0ALONG_DESCRIPTION = %22%22%22%0AThe rxn software package enables prediction of synthesis pathways%0Aand determination of pareto-optimal fro...
f52cba89474bf7ef4045a8dd12eef228b60a1555
Make it installable
setup.py
setup.py
Python
0.000028
@@ -0,0 +1,801 @@ +from setuptools import setup, find_packages%0A%0Asetup(%0A name='django-fsm',%0A version='0.0.1',%0A description='Unobtrusive test models creation for django.',%0A author='Mikhail Podgurskiy',%0A author_email='kmmbvnr@gmail.com',%0A url='http://github.com/kmmbvnr/django-any',%0A ...
a64f29d7c492a772474ff1c5a4855a368ed10d2d
Create setup.py file.
setup.py
setup.py
Python
0
@@ -0,0 +1,444 @@ +try:%0A from setuptools import setup%0Aexcept ImportError:%0A from distutils.core import setup%0A%0Asetup(%0A name=%22pygcui%22, version=%220.1-dev%22,%0A author=%22Erik Youngren%22, author_email=%22artanis.00@gmail.com%22,%0A url=%22https://github.com/Artanis/pygcui%22,%0A license=...
cf68f6488f7f1afff4f7e6532ecc4a7f89186688
Add setup.py
setup.py
setup.py
Python
0.000001
@@ -0,0 +1,1328 @@ +from setuptools import setup%0A%0Adef readme():%0A with open('README.rst') as readme_file:%0A return readme_file.read()%0A%0Aconfiguration = %7B%0A 'name' : 'hypergraph',%0A 'version' : '0.1',%0A 'description' : 'Hypergraph tools and algorithms',%0A 'long_description' : readme(...
48c5f707640fe0e216f1a454d6c52265d02de1e7
Add setup.py script.
setup.py
setup.py
Python
0
@@ -0,0 +1,953 @@ +#!/usr/bin/env python%0A# -*- coding: utf-8 -*-%0A#%0A# Copyright (C) 2011 Alexander Shorin%0A# All rights reserved.%0A#%0A# This software is licensed as described in the file COPYING, which%0A# you should have received as part of this distribution.%0A#%0A%0Atry:%0A from setuptools import setup%0A...
04c4652bd4caefc600df76a396e1ae81c86d3f75
version bump for OS X initial support
setup.py
setup.py
""" TermRecord ---------- TermRecord is a program that wraps the ``script`` command. It automagically detects your terminal size, records your session, and stores the output as either JSON, embeddable JavaScript, or a static HTML file. The HTML is completely self-contained, embedding all necessary dependencies in on...
Python
0
@@ -1171,11 +1171,11 @@ ='1. -0.1 +1.0 ',%0A
0a301924b9050580979f65af96e9b91a7ae2f746
Add setup.py so it is possible to pip install it from github
setup.py
setup.py
Python
0
@@ -0,0 +1,329 @@ +from setuptools import setup, find_packages%0A%0A%0Asetup(%0A name='txtulip',%0A version='0.0.1',%0A license='MIT',%0A description='Run Twisted on the Tulip/asyncio event loop',%0A url='https://github.com/itamarst/txtulip',%0A packages=find_packages(),%0A include_package_data=Tru...
ed55dbe5a3967d8a73bbb76f19df470b1ab90b2a
Create SpecialArray.py
Edabit/SpecialArray.py
Edabit/SpecialArray.py
Python
0.000001
@@ -0,0 +1,391 @@ +#!/usr/bin/env python3%0A'''%0AReturn True if every even index contains an even number and every odd index contains an odd number. Else return False %0A'''%0Adef is_special_array(lst):%0A%09a = %5Bi for i in lst%5B::2%5D if i %25 2 == 1%5D%0A%09b = %5Bi for i in lst%5B1::2%5D if i %25 2 == 0%5D%0A%09...
d38a838f58f17e514a554e4533313bf3f1f80178
Add factorial example
factorial.py
factorial.py
Python
0.99996
@@ -0,0 +1,624 @@ +import rt%0A%0Aclass Factorial(rt.Actor):%0A%0A def __init__(self):%0A super().__init__()%0A self.behavior = self.factorial_beh%0A%0A def factorial_beh(self, message):%0A customer, n = message%0A if n == 0:%0A customer(1)%0A else:%0A mult...
656dc608bea00c9cdaaef9354f8ddac956b2afc9
add setup.py
setup.py
setup.py
Python
0.000001
@@ -0,0 +1,160 @@ +#!/usr/bin/env python%0Afrom distutils.core import setup%0A%0Asetup(name='agithub',%0A version='1.3',%0A author='Jonathan Paugh',%0A py_modules=%5B'agithub'%5D)%0A
791cbbe340c2777310fad55889ab991086d9f31d
support py2.7.5
setup.py
setup.py
#!/usr/bin/env python import re from setuptools import setup, find_packages import sys #Only 2.6-2.7 are supported. if not ((2, 6, 0) <= sys.version_info[:3] <= (2, 7, 4)): sys.stderr.write('gmusicapi does not officially support this Python version.\n') #try to continue anyway dynamic_requires = [] if sys.v...
Python
0.000001
@@ -163,17 +163,17 @@ (2, 7, -4 +5 )):%0A @@ -1359,24 +1359,40 @@ y == 0.9.0', + # validation %0A 'de @@ -1409,16 +1409,28 @@ 3.3.2', + # keep %0A @@ -1448,16 +1448,29 @@ = 1.21', + # MM %0A @@ -1486,24 +1486,35 @@ f == 2.4.1', + # MM %0A 're @@ -1526,2...
4d3ad6b218726ec4a881a2a41740b44f1292ecfd
Add basic setup.py
setup.py
setup.py
Python
0.000002
@@ -0,0 +1,144 @@ +from setuptools import setup, find_packages%0A%0Asetup(%0A name = %22WCX Inventory Control%22,%0A version = %220.0.1%22,%0A packages = find_packages(),%0A)
5a3b4773b0e416101716443a9526b47cd47e21a7
Update version. v2.0.1
setup.py
setup.py
#! /usr/bin/env python # -*- coding: utf-8 -*- # Copyright (c) 2014, OneLogin, Inc. # All rights reserved. from setuptools import setup setup( name='python-saml', version='2.0.0', description='Onelogin Python Toolkit. Add SAML support to your Python software using this library', classifiers=[ ...
Python
0.99941
@@ -181,17 +181,17 @@ on='2.0. -0 +1 ',%0A d
8a24147d6043222f348690535cc1aa1bc9b7ffbb
Remove the requirement of flask version < 0.9
setup.py
setup.py
''' Nereid Nereid - Tryton as a web framework :copyright: (c) 2010-2013 by Openlabs Technologies & Consulting (P) Ltd. :license: GPLv3, see LICENSE for more details ''' import re from setuptools import setup, Command class RunTests(Command): description = "Run tests" user_options = [] ...
Python
0.000002
@@ -2004,18 +2004,8 @@ lask -%3E=0.8,%3C0.9 ',%0A
bcc2e85be21321e4f27ccc673513ce90e20ab1b3
Fix setup.py
setup.py
setup.py
import os from setuptools import setup, find_packages from Cython.Build import cythonize import numpy as np if os.path.exists('README.md'): long_description = open('README.md').read() else: long_description = "A Python library aimed at acousticians." setup( name='acoustics', version='0.0', d...
Python
0.000001
@@ -502,9 +502,8 @@ -# pack @@ -547,16 +547,17 @@ ,%0A +# py_modul @@ -692,9 +692,9 @@ 0.1 -3 +4 ',%0A @@ -762,16 +762,16 @@ ython',%0A - @@ -783,16 +783,40 @@ mexpr',%0A + 'setuptools',%0A
0c0ca6d4473669842a1caba9e3ec450e7969eebc
add setup.py
setup.py
setup.py
Python
0.000001
@@ -0,0 +1,287 @@ +from setuptools import setup, find_packages%0A%0Asetup(%0A name=%22simpcli%22,%0A description=%22Simple command line interfaces%22,%0A url=%22https://github.com/swstack/simpcli%22,%0A author=%22Stack, Stephen%22,%0A author_email=%22ss@stephenstack.com%22,%0A packages=find_packages()...
c6c2f49014e650a07d450d9b5dd2b532f38ac5a4
Create setup.py
setup.py
setup.py
Python
0.000001
@@ -0,0 +1,1446 @@ +#!/usr/bin/env python%0A# -*- coding: utf-8 -*-%0Afrom github_backup import __version__%0A%0Atry:%0A from setuptools import setup%0A setup # workaround for pyflakes issue #13%0Aexcept ImportError:%0A from distutils.core import setup%0A%0A# Hack to prevent stupid TypeError: 'NoneType' objec...
64192b2d13d2503b144f02d8fbc9bfdf02aca1d5
Create setup.py
setup.py
setup.py
Python
0.000001
@@ -0,0 +1,87 @@ +#!/usr/bin/env python%0A%0Afrom distutils.core import setup%0A%0A%0A%0A%0A%0Asetup(name='GWsky' )%0A
f09817a210d1f621c8ac714233bccbf14786c551
Add preprocessor
source/utils/preprocessor.py
source/utils/preprocessor.py
Python
0.000138
@@ -0,0 +1,1360 @@ +# -*- coding: utf-8 -*-%0Aimport re%0A%0A%0Aclass Preprocessor:%0A def __init__(self):%0A pass%0A%0A def __call__(self, string):%0A # add space%0A string += ' '%0A # eliminate '@' pattern%0A at_pattern = re.compile(u'@.*?%5Cs%7C@.*?(?m)', re.S)%0A stri...
267e539e927d97db0cfb22805569effdea964e37
Add setup.py
setup.py
setup.py
Python
0.000001
@@ -0,0 +1,1999 @@ +#!/usr/bin/env python%0A# -*- coding: utf-8 -*-%0A%0A%0Afrom setuptools import setup, find_packages%0Afrom setuptools.command.test import test%0A%0A%0AREQUIREMENTS = %5B%5D%0A%0A%0A# with open(%22README.rst%22, %22r%22) as resource:%0A# LONG_DESCRIPTION = resource.read()%0A%0A%0A# copypasted fro...
e78e93d5f2a3c35e92b03ba85f0cdad9a5f893d2
Add script for uploading bdists
affiliate-builder/upload_bdists.py
affiliate-builder/upload_bdists.py
Python
0
@@ -0,0 +1,2539 @@ +from __future__ import (division, print_function, absolute_import,%0A unicode_literals)%0A%0Aimport os%0Aimport glob%0A%0Afrom conda import config%0A#from conda_build.metadata import MetaData%0A%0Afrom binstar_client.inspect_package.conda import inspect_conda_package%0A%0Afrom...
cedc0ccda68b3b1bc84b2c19cb7dc010b16da5f6
Add setup.py
setup.py
setup.py
Python
0.000001
@@ -0,0 +1,1434 @@ +#!/usr/bin/python%0A#%0A# Copyright (c) 2009 James Bowes %3Cjbowes@dangerouslyinc.com%3E%0A#%0A# Permission is hereby granted, free of charge, to any person obtaining a copy%0A# of this software and associated documentation files (the %22Software%22), to deal%0A# in the Software without restriction,...
8171812c67d9189779aa39ba718f1d7cd8e7a045
Add a setup.py file for scattering.
setup.py
setup.py
Python
0
@@ -0,0 +1,869 @@ +from numpy.distutils.core import setup%0Afrom numpy.distutils.misc_util import Configuration%0Afrom numpy.distutils.system_info import get_info%0Afrom os.path import join%0A%0Aflags = %5B'-W', '-Wall', '-march=opteron', '-O3'%5D%0A%0Adef configuration(parent_package='', top_path=None):%0A config =...
952476575244cea3d0a4f8da4066b455a6b0ee4b
Add simple setup.py script
setup.py
setup.py
Python
0.000001
@@ -0,0 +1,459 @@ +#!/usr/bin/env python%0A%0A# Copyright (c) 2016, Michael Boyle%0A# See LICENSE file for details: %3Chttps://github.com/moble/h5py_cache/blob/master/LICENSE%3E%0A%0Afrom distutils.core import setup%0A%0Asetup(name='h5py_cache',%0A description='Create h5py File object with specified cache',%0A ...
7e3ad724cf2390e1cf7a7031834c880eaf6aecef
Add basic setup.py
setup.py
setup.py
Python
0.000002
@@ -0,0 +1,431 @@ +from setuptools import setup%0D%0A%0D%0Asetup(%0D%0A name='tamproxy',%0D%0A version='0.0.1',%0D%0A%0D%0A description='TAMProxy Python Host',%0D%0A url='https://github.com/mitchgu/TAMProxy-pyHost',%0D%0A%0D%0A classifiers=%5B%0D%0A 'Development Status :: 3 - Alpha',%0D%0A ...
bdb46f1e4181648202f37670e630b6584a760996
Create lists.py
lists.py
lists.py
Python
0.000002
@@ -0,0 +1,714 @@ +#!/usr/bin/env python2%0A%0A'''%0AGenerates automatically two arrays, a and b.%0AReturn an arrays containing common elements in arrays%0Aa and b.%0A'''%0A%0Aimport random%0A%0ASIZE_LIST_A = 10%0ASIZE_LIST_B = 20%0Aa = %5B%5D%0Ab = %5B%5D%0A%0A%0Adef populate_arrays():%0A for i in range(0, SIZE_LIST_...
73bbce4a13f2dae5d0a3c59ff2369e7140b59a79
fix #1, add setup.py
setup.py
setup.py
Python
0
@@ -0,0 +1,303 @@ +from setuptools import setup, find_packages%0A%0A%0Asetup(%0A name=%22rob%22,%0A version='0.1.0',%0A description='Make python objects persistent with Redis.',%0A url='http://github.com/relekang/rob',%0A author='Rolf Erik Lekang',%0A packages=find_packages(),%0A install_requires=%...
d2fd48e19316ecce3f529155a5d07160ba1318e5
add setup.py
setup.py
setup.py
Python
0.000001
@@ -0,0 +1,194 @@ +from distutils.core import setup%0A%0Aif __name__ == '__main__':%0A setup(%0A name='BrainNetworksInPython',%0A version='0.1dev',%0A packages=%5B'SCRIPTS','WRAPPERS'%5D,%0A license='MIT license',%0A)%0A
1fd28ba1488e8f7c49f20f7846f6e1b3bf1baaf3
add FocusPyJS.py
library/pyjamas/ui/platform/FocusPyJS.py
library/pyjamas/ui/platform/FocusPyJS.py
Python
0
@@ -0,0 +1,453 @@ +%0Adef blur(elem):%0A JS(%22%22%22%0A elem.blur();%0A %22%22%22)%0A%0Adef createFocusable():%0A JS(%22%22%22%0A var e = $doc.createElement(%22DIV%22);%0A e.tabIndex = 0;%0A return e;%0A %22%22%22)%0A%0Adef focus(elem):%0A JS(%22%22%22%0A elem.focus();%0A %22%22%22)%0A...
504e2321a001144d5466cb492c77f01e045c89d5
Add "dbm" to "python-imports" test
test/tests/python-imports/container.py
test/tests/python-imports/container.py
import curses import readline import bz2 assert(bz2.decompress(bz2.compress(b'IT WORKS IT WORKS IT WORKS')) == b'IT WORKS IT WORKS IT WORKS') import platform if platform.python_implementation() != 'PyPy' and platform.python_version_tuple()[0] != '2': # PyPy and Python 2 don't support lzma import lzma asse...
Python
0.000333
@@ -7,16 +7,27 @@ curses%0A +import dbm%0A import r
df10bd85bcf94aba9661e397960a1cd3b4dd090d
Test for ISO NC creator
POST_TEST.py
POST_TEST.py
Python
0
@@ -0,0 +1,246 @@ +from posts.nc import *%0D%0Aimport posts.iso%0D%0A%0D%0Aoutput('POST_TEST.txt')%0D%0A%0D%0Aprogram_begin(123, 'Test program')%0D%0Aabsolute()%0D%0Ametric()%0D%0Aset_plane(0)%0D%0A%0D%0Afeedrate(420)%0D%0Arapid(100,120)%0D%0Arapid(z=50)%0D%0Afeed(z=0)%0D%0Arapid(z=50)%0D%0A%0D%0Arapid_home()%0D%0A%0D%...
373b026c6ae0e1cae8236a0ba6d0bd8ce3ccab7c
Add missing module
backslash/compatibility.py
backslash/compatibility.py
Python
0.000016
@@ -0,0 +1,137 @@ +class Compatibility(object):%0A%0A def __init__(self, client):%0A super(Compatibility, self).__init__()%0A self.client = client%0A
eeff8a4e33a72b4efe5fb3a43bef2b60cd9b6752
add image processing
imgProc.py
imgProc.py
Python
0.000001
@@ -0,0 +1,1589 @@ +%22%22%22%0ACreated on Wed Dec 04 21:53:29 201%0A@author: Valerie%0A%22%22%22%0A%0Afrom skimage import io, morphology, exposure,util%0Afrom skimage.measure import regionprops%0A#import matplotlib.pyplot as plt%0Aimport numpy as np%0A%0Aclass imgProc:%0A def __init__():%0A %0A de...
7d9410b90f03355ad22e562b568ec50efdcc96f4
Create settings.py and add default path settings
settings.py
settings.py
Python
0
@@ -0,0 +1,167 @@ +import os%0A%0AAQBANKING_PATH = os.path.expanduser('~/.aqbanking/')%0ACACHE_PATH = os.path.join(AQBANKING_PATH, 'tmp')%0ABALANCE_PATH = os.path.join(CACHE_PATH, 'balance.ctx')
53af7a4c8750a6660e34fad476f64198ab97443e
add - settings
settings.py
settings.py
Python
0
@@ -0,0 +1,18 @@ +DECOMPRESS = True%0A
834a570a8073028fff86c91bd808ffc5ce6a835f
add settings to set constant ntulearn login url
settings.py
settings.py
Python
0
@@ -0,0 +1,60 @@ +NTULEARN_URL = %22https://ntulearn.ntu.edu.sg/webapps/login/%22%0A
53cb211fda4b46d38a10808893b8713cfb17d080
Create ShinyAppsApp
cms_shiny/cms_app.py
cms_shiny/cms_app.py
Python
0.000047
@@ -0,0 +1,380 @@ +# -*- coding: utf-8 -*-%0A%0Afrom django.utils.translation import ugettext_lazy as _%0A%0Afrom cms.app_base import CMSApp%0Afrom cms.apphook_pool import apphook_pool%0A%0Afrom cms_shiny.menu import ShinyAppsMenu%0A%0Aclass ShinyAppsApp(CMSApp):%0A name = _(%22Shiny Apps App%22)%0A urls = %5B%22...
48984b9ab60c14c5d47ee329ef906d47b35b8ade
Add common tests for query endpoint
biothings/tests/test_query.py
biothings/tests/test_query.py
Python
0.000004
@@ -0,0 +1,1170 @@ +'''%0D%0A Biothings Query Component Common Tests%0D%0A'''%0D%0A%0D%0Aimport os%0D%0A%0D%0Afrom nose.core import main%0D%0A%0D%0Afrom biothings.tests import BiothingsTestCase%0D%0A%0D%0A%0D%0Aclass QueryTests(BiothingsTestCase):%0D%0A ''' Test against server specified in environment variable BT...
fb41b16f95490b15190075403aa3d87fcfa34853
Create smash.py
smash.py
smash.py
Python
0.000019
@@ -0,0 +1,2002 @@ +import urllib, urllib2, json%0Afrom stravalib.client import Client%0Afrom stravalib import unithelper%0Aimport dateutil.parser as parser%0Afrom pytz import timezone%0A%0AactivityId = 321998419%0A%0Aclient = Client(access_token=%22%22)%0Aactivity = client.get_activity(activityId)%0A%0Alocaltz = timez...
8a39e7993bdf67c85d7f2e25ccf7fe3f82502479
Create Problem14.py
Problem14.py
Problem14.py
Python
0.000758
@@ -0,0 +1,277 @@ +import time%0Adef f(n):%0A if n%252==1 and n%3E1:%0A return f(3*n+1)+1%0A elif n%252==0:%0A return f(n/2)+1%0A return 1%0Am,value=0,0%0Abegin=time.time()%0Afor i in range(1,1000000):%0A tmp=f(i)%0A if tmp%3Em:%0A value=i%0A m=tmp%0Aprint time.time()-begin%0A...
2ef0b8700460da0a46af7b7963bddaf59e1d7518
Change image skip message in murano tests
fuel_health/tests/platform_tests/test_platform_murano_linux.py
fuel_health/tests/platform_tests/test_platform_murano_linux.py
# Copyright 2013 Mirantis, 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, s...
Python
0
@@ -1404,17 +1404,16 @@ tis Open - Stack an
1b36957858c5ceba018d23be19b04e730c231ff6
Implement timer to support Timer.Interval.* events
modder/timer.py
modder/timer.py
Python
0
@@ -0,0 +1,1103 @@ +# coding: utf-8%0Aimport threading%0Aimport time%0A%0A%0Aclass TimerThread(threading.Thread):%0A def __init__(self, queue, stop_event):%0A super(TimerThread, self).__init__()%0A self.__queue = queue%0A self.__stopped = stop_event%0A self.__wait = .5%0A%0A now = ...
638e2d7a33f522007d80d39e0a8e5bface654286
Add unit tests for utility methods.
test/test_scripts/test_utils.py
test/test_scripts/test_utils.py
Python
0
@@ -0,0 +1,814 @@ +from scripts.init import utils%0Aimport unittest%0A%0A%0Aclass TestUtils(unittest.TestCase):%0A @classmethod%0A def setUpClass(self):%0A pass%0A%0A def test_get_parameter(self):%0A api = utils.get_parameter('api')%0A url = utils.get_parameter('api', 'url')%0A%0A #...
c227eb585817cd7385486a4292814c1c6bbca3da
Add test_webcast_india_gov.py
tests/test_webcast_india_gov.py
tests/test_webcast_india_gov.py
Python
0.000007
@@ -0,0 +1,763 @@ +import unittest%0D%0A%0D%0Afrom streamlink.plugins.webcast_india_gov import WebcastIndiaGov%0D%0A%0D%0A%0D%0Aclass TestPluginWebcastIndiaGov(unittest.TestCase):%0D%0A def test_can_handle_url(self):%0D%0A # should match%0D%0A self.assertTrue(WebcastIndiaGov.can_handle_url(%22http://we...
3c9067381158e773936b4dc47f488b43044e7bf8
move file exceptions to resources folder
pagarme/resources/exceptions.py
pagarme/resources/exceptions.py
Python
0
@@ -0,0 +1,217 @@ +# encoding: utf-8%0A%0A%0Aclass PagarmeApiError(Exception): pass%0A%0A%0Aclass PagarmeTransactionError(Exception): pass%0Aclass NotPaidException(PagarmeTransactionError): pass%0Aclass NotBoundException(PagarmeTransactionError): pass%0A
f30c5daebc5e3b2f4cb5a636c5dbdbbbec682727
add migration for related name of association rules
app/migrations/0013_auto_20170705_2007.py
app/migrations/0013_auto_20170705_2007.py
Python
0
@@ -0,0 +1,857 @@ +# -*- coding: utf-8 -*-%0A# Generated by Django 1.10 on 2017-07-05 20:07%0Afrom __future__ import unicode_literals%0A%0Afrom django.db import migrations, models%0Aimport django.db.models.deletion%0A%0A%0Aclass Migration(migrations.Migration):%0A%0A dependencies = %5B%0A ('app', '0012_auto_2...
dde20ff437e2f9b9f0fb05de3f03c2c3b22bc563
add an invoke builder for project development
tasks.py
tasks.py
Python
0
@@ -0,0 +1,410 @@ +from invoke import run, task%0Aimport os%0A%0A@task%0Adef lint():%0A for src in os.listdir(%22pystorm%22):%0A if src.endswith(%22.py%22):%0A run(%22pyflakes pystorm/%7B%7D%22.format(src))%0A #run(%22pep8 pystorm/%7B%7D%22.format(src))%0A%0A@task%0Adef build(docs=False)...
0cd883c22f82e33d05f6177fa9b99e2adf7cc644
Add tasks file for use with Invoke
tasks.py
tasks.py
Python
0
@@ -0,0 +1,1337 @@ +# coding=utf-8%0A%0A%22%22%22Useful task commands for development and maintenance.%22%22%22%0A%0Afrom invoke import run, task%0A%0A%0A@task%0Adef build(clean):%0A%09%22%22%22Build sdist and bdist_wheel distributions.%22%22%22%0A%0A%09run('python setup.py sdist bdist_wheel')%0A%0A%0A@task(build)%0Ade...
bf9f053f4382fadba3901b3b5c247b3eaac22ea3
Add test/unit/modules/sfp_apple_itunes.py
test/unit/modules/sfp_apple_itunes.py
test/unit/modules/sfp_apple_itunes.py
Python
0.000001
@@ -0,0 +1,2978 @@ +# test_sfp_apple_items.py%0Aimport unittest%0A%0Afrom modules.sfp_apple_itunes import sfp_apple_itunes%0Afrom sflib import SpiderFoot%0Afrom spiderfoot import SpiderFootEvent, SpiderFootTarget%0A%0A%0Aclass TestModuleAppleItunes(unittest.TestCase):%0A %22%22%22%0A Test modules.sfp_apple_itunes...
5bab29cbdb1d5db9949a9379656cf1a925fcf20a
Add test suite for SettingFunction
tests/Settings/TestSettingFunction.py
tests/Settings/TestSettingFunction.py
Python
0
@@ -0,0 +1,2172 @@ +# Copyright (c) 2016 Ultimaker B.V.%0A# Uranium is released under the terms of the AGPLv3 or higher.%0A%0Aimport pytest%0A%0Aimport UM.Settings.SettingFunction%0A%0A## Individual test cases for the good setting functions.%0A#%0A# Each test will be executed with each of these functions. These func...
6ec58a6c14b4e89bdeb497386f61716b13669ba1
initializing uptime = 0
napalm/junos.py
napalm/junos.py
# Copyright 2015 Spotify AB. All rights reserved. # # The contents of this file are 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 requi...
Python
0.99998
@@ -2697,20 +2697,17 @@ ptime = -None +0 %0A
99d33908b6610385f9c9f83678533611a515f5aa
Create List_Slicing.py
Python/List_Slicing.py
Python/List_Slicing.py
Python
0
@@ -0,0 +1,1865 @@ +Array Slicing %0A%0Aa%5Bstart:end%5D # items start through end-1%0Aa%5Bstart:%5D # items start through the rest of the array%0Aa%5B:end%5D # items from the beginning through end-1%0Aa%5B:%5D # a copy of the whole array%0AThere is also the step value, which can be used with any of the...
2bf6f29195c2e2c6079c2f851b337341b1a74629
Add fabfile
fabfile.py
fabfile.py
Python
0.000003
@@ -0,0 +1,231 @@ +from fabric.api import local%0A%0A%0Adef deploy_staticfiles():%0A local('STATIC_S3=1 ./manage.py collectstatic --noinput')%0A%0A%0Adef deploy_heroku():%0A local('git push heroku')%0A%0A%0Adef deploy():%0A deploy_staticfiles()%0A deploy_heroku()%0A
e78a3ada15092873d2bd7f0cd6b6f987bb62a50a
Migrate User#verified
fandjango/migrations/0008_auto__del_field_user_verified.py
fandjango/migrations/0008_auto__del_field_user_verified.py
Python
0
@@ -0,0 +1,2371 @@ +# encoding: utf-8%0Aimport datetime%0Afrom south.db import db%0Afrom south.v2 import SchemaMigration%0Afrom django.db import models%0A%0Aclass Migration(SchemaMigration):%0A%0A def forwards(self, orm):%0A %0A # Deleting field 'User.verified'%0A db.delete_column('fandjango_use...
4ef9940a6f04dc37489e9deef164fb7c7edaf7f4
fix import
tests/support/tree/system/__init__.py
tests/support/tree/system/__init__.py
from fabric.api import task import debian @task def install_package(): pass
Python
0.000001
@@ -22,16 +22,41 @@ t task%0A%0A +from support.tree.system import d
b1d40448e1ad56e4fc055a45de1c935aaccc8c1a
use tempfile.mkdtemp
farmer/models.py
farmer/models.py
#coding=utf8 from __future__ import with_statement import os import sys import time import json import threading from datetime import datetime from django.db import models from django.utils import six from farmer.settings import WORKER_TIMEOUT, ANSIBLE_FORKS if six.PY3: from subprocess import getstatusoutput els...
Python
0.000002
@@ -107,16 +107,45 @@ reading%0A +from tempfile import mkdtemp%0A from dat @@ -1030,24 +1030,81 @@ k = False)%0A%0A + tmpdir = mkdtemp(prefix = 'ansible_', dir = '/tmp')%0A%0A @propert @@ -1311,88 +1311,8 @@ d)%0A%0A - @property%0A def tmpdir(self):%0A return '/tmp/ansible_%25s' %25 self.id%0A%...
5c7e096cb3847059d2212e5518852993e7ae4724
Add sample query count_all_persons.py
tools/sample_queries/count_all_persons.py
tools/sample_queries/count_all_persons.py
Python
0.000011
@@ -0,0 +1,437 @@ +# Sample query for counting all the Person entries between dates.%0A%0Aquery = Person.all(filter_expired=False).filter(%0A 'entry_date %3E=', datetime.datetime(2013, 1, 1, 0, 0, 0)).filter(%0A 'entry_date %3C', datetime.datetime(2014, 1, 1, 0, 0, 0))%0Acount = 0%0Awhile True:%0A current_coun...
61ded6588895c163fb3a37880b4de80bd8c3c85c
add new package (#27112)
var/spack/repos/builtin/packages/r-dtplyr/package.py
var/spack/repos/builtin/packages/r-dtplyr/package.py
Python
0
@@ -0,0 +1,1244 @@ +# Copyright 2013-2021 Lawrence Livermore National Security, LLC and other%0A# Spack Project Developers. See the top-level COPYRIGHT file for details.%0A#%0A# SPDX-License-Identifier: (Apache-2.0 OR MIT)%0A%0Afrom spack import *%0A%0A%0Aclass RDtplyr(RPackage):%0A %22%22%22Data Table Back-End for ...
2b1afecd6bcf6c06cdc941552aad2c0737fa89cb
Add githook.py, an analog to hghook.py.
githook.py
githook.py
Python
0.002756
@@ -0,0 +1,2847 @@ +#!/usr/bin/env python%0A%0A%22%22%22Commit hook for git that does lint testing.%0A%0AIt runs the lint checker (runlint.py) on all the open files in%0Athe current commit.%0A%0ATo install (for git %3E= 1.7.1), run the following:%0A %25 git config --global init.templatedir '~/.git_template'%0Aand the...
7f40103ff1803503e0348e4134b60b587456c56f
Revert changes to DATABASES formatting in settings.py
settings.py
settings.py
# Django settings for kitsune project. import os import logging DEBUG = True TEMPLATE_DEBUG = DEBUG LOG_LEVEL = logging.DEBUG ROOT = os.path.dirname(os.path.abspath(__file__)) path = lambda * a: os.path.join(ROOT, * a) ADMINS = ( # ('Your Name', 'your_email@domain.com'), ) MANAGERS = ADMINS DATABASES = { '...
Python
0
@@ -186,17 +186,16 @@ lambda * - a: os.pa @@ -209,17 +209,16 @@ (ROOT, * - a)%0A%0AADMI @@ -322,24 +322,66 @@ ault': %7B%0A + 'ENGINE': 'django.db.backends.mysql', # Add 'post @@ -457,48 +457,25 @@ ' -ENGINE': 'django.db.backends.mysql',%0A +NAME': 'kitsune', # O @@ -529,29 +529,18 @@ ' -NA...
86f41d5d57bc2fdfd91b18ee72efa7902d7bdc16
add a module for programmatically generating jinja2 templates
src/template.py
src/template.py
Python
0
@@ -0,0 +1,3022 @@ +# Copyright 2015 Curtis Sand%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 required by ...
43873584dbb28feced2fc28a0721521a1758e09d
Print hello world
print.py
print.py
Python
0.999999
@@ -0,0 +1,21 @@ +print('Hello World!')
5e13e3bc045d496232e5ced6b7dc314f14183257
Create a copy of the Netgen reader example and add some statistics calculation.
doc/examples/viennagrid_wrapper/io_stats.py
doc/examples/viennagrid_wrapper/io_stats.py
Python
0
@@ -0,0 +1,2204 @@ +#!/usr/bin/env python%0A# %0A# This example shows is like the readers and writers example ('io.py'),%0A# but this one also calculates some statistics on the elapsed time, the%0A# number of vertices an cells read, etc.%0A%0Afrom __future__ import print_function%0A%0A# In this example, we will set up ...
da5e4364c983bbabd0cc03393bb4be968b509ca2
Is valid Prentheses
isValid.py
isValid.py
Python
0.999984
@@ -0,0 +1,1159 @@ +class Solution:%0A # @param %7Bstring%7D s%0A # @return %7Bboolean%7D%0A def isValid(self, s):%0A if s is None or len(s) == 1:%0A return False%0A else:%0A stack = %5B%5D%0A for c in s:%0A if c == '(' or c == '%5B' or c == '%7B':%...
a40f0115892719d1a41e658fcdd20ec1473356f1
Add stub study ix
study.ix.py
study.ix.py
Python
0
@@ -0,0 +1,85 @@ +from pippi import dsp, tune%0Afrom hcj import fx%0A%0Aout = ''%0A%0Adsp.write(out, 'study.ix')%0A
e64e6327a156cfd72cf629fc05d480e45b2a6e57
Add __init__.py to page_sets
tools/skp/page_sets/__init__.py
tools/skp/page_sets/__init__.py
Python
0.000001
@@ -0,0 +1,162 @@ +# Copyright 2019 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
c0a408759b887006cd09f0ea9f366336b2322fe8
add new email API file
api/email.py
api/email.py
Python
0.000001
@@ -0,0 +1,3108 @@ +%22%22%22%0AAtmosphere api email%0A%22%22%22%0Afrom django.utils.timezone import datetime%0A%0Afrom rest_framework.views import APIView%0Afrom rest_framework.response import Response%0Afrom rest_framework import status%0A%0Afrom libcloud.common.types import InvalidCredsError%0A%0Afrom threepio impor...
6d36bc83b6214a0335289c11b653f2bc56ce1042
Make EXTRA_MODEL_FIELDS work in 1.8 again
mezzanine/boot/__init__.py
mezzanine/boot/__init__.py
""" An app that is forced to the top of the list in ``INSTALLED_APPS`` for the purpose of hooking into Django's ``class_prepared`` signal and adding custom fields as defined by the ``EXTRA_MODEL_FIELDS`` setting. Also patches ``django.contrib.admin.site`` to use ``LazyAdminSite`` that defers certains register/unregiste...
Python
0
@@ -543,16 +543,61 @@ ltdict%0A%0A +from django import VERSION as DJANGO_VERSION%0A from dja @@ -650,16 +650,49 @@ ettings%0A +from django.contrib import admin%0A from dja @@ -740,18 +740,16 @@ igured%0A%0A -# from mez @@ -792,16 +792,68 @@ minSite%0A +from django.db.models.signals import class_prepared%0A fro...
2805967f5bf36ee24362e20587eb394c7398753d
add impression call for python
modules/ui/app/resources/samplecode/python/impression.py
modules/ui/app/resources/samplecode/python/impression.py
Python
0
@@ -0,0 +1,1059 @@ +import requests%0Aimport json%0A%0Adef get_impression(application, experiment, user):%0A %22%22%22%0A Records an impression for the given user and experiment.%0A%0A Args:%0A application: the application the experiment runs in%0A experiment: the running experiment for which th...
355aabf2e975b50f552ff2599bb7909d8f63c614
Create machine.py
machine.py
machine.py
Python
0.000017
@@ -0,0 +1,201 @@ +def split_data(data, prob):%0A %22%22%22split data into fractions%5Bprob, 1 - prob%5D%22%22%22%0A results = %5B%5D, %5B%5D%0A for row in data:%0A results%5B0 if random.random() %3C prob else 1%5D. append(row)%0A return results %0A %0A %0A
7ae63bb0c00f852fd9f9c3df940faaad5cecda5d
Version 1.0.2
main_rp.py
main_rp.py
Python
0.000001
@@ -0,0 +1,231 @@ +# WSGI wrapper for standard reverse proxy setups%0A# http://flask.pocoo.org/docs/0.10/deploying/wsgi-standalone/#proxy-setups%0A%0Afrom werkzeug.contrib.fixers import ProxyFix%0Afrom main import app%0A%0A%0Aapp.wsgi_app = ProxyFix(app.wsgi_app)%0A
04312795ddc93b5e005d6c1615ff801534ba7457
Add test capturing failure. Ref #1697.
cherrypy/test/test_plugins.py
cherrypy/test/test_plugins.py
Python
0
@@ -0,0 +1,334 @@ +from cherrypy.process import plugins%0A%0A%0A__metaclass__ = type%0A%0A%0Aclass TestAutoreloader:%0A def test_file_for_file_module_when_None(self):%0A %22%22%22No error when module.__file__ is None.%0A %22%22%22%0A class test_module:%0A __file__ = None%0A%0A ...
e1bef44be34efd637bc2acdaf71f01b5d77deaec
Add demo case storage integration
edisgo/flex_opt/storage_integration.py
edisgo/flex_opt/storage_integration.py
Python
0
@@ -0,0 +1,2217 @@ +from edisgo.grid.components import Storage, Line%0Afrom edisgo.grid.tools import select_cable%0A%0Aimport logging%0A%0Adef integrate_storage(network, position, operation):%0A %22%22%22%0A Integrate storage units in the grid and specify its operational mode%0A%0A Parameters%0A ----------%...
e81e2f1f0a4fef0b767368981aceddbc03036be7
create template filters which return the download/view count for a LR ID
metashare/repository/templatetags/resource_access_stats.py
metashare/repository/templatetags/resource_access_stats.py
Python
0
@@ -0,0 +1,1048 @@ +%22%22%22%0AProject: META-SHARE%0A Author: Christian Spurk %3Ccspurk@dfki.de%3E%0A%22%22%22%0Afrom django import template%0A%0Afrom metashare.repository import model_utils%0Afrom metashare.stats.model_utils import DOWNLOAD_STAT, VIEW_STAT%0A%0A%0A# module level %22register%22 variable as required by...
830e8da8cb72f045baed75bd2d675728b6209fca
Use raw strings for javac colorize regexes
build/android/gyp/javac.py
build/android/gyp/javac.py
#!/usr/bin/env python # # Copyright 2013 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. import fnmatch import optparse import os import re import sys from util import build_utils from util import md5_check sys.path.appe...
Python
0.999903
@@ -411,16 +411,17 @@ refix = +r '(?P%3Cfil @@ -515,32 +515,33 @@ leline_prefix + +r '(?P%3Cfull_messag @@ -621,16 +621,17 @@ refix + +r '(?P%3Cful
ff9cbbac188f78ed33cb2f650a32777713911384
Add small demo for a monochrome GST pipeline
examples/python/monochrome_pipeline.py
examples/python/monochrome_pipeline.py
Python
0
@@ -0,0 +1,1945 @@ +import gst%0Aimport gobject%0Aimport os%0A%0AVIDEODEVICE = %22/dev/video1%22%0AWIDTH = 1280%0AHEIGHT = 960%0AFRAMERATE = %2215/1%22%0A%0Atry:%0A import psutil%0Aexcept ImportError:%0A psutil = None%0A%0Adef show_resources_cb (*args):%0A process = psutil.Process(os.getpid())%0A if getattr...
09dce2ed82269354c37947ce952f8b8f0e0ab2a2
Upgrade logging level for entrytols.
pymatgen/entries/entry_tools.py
pymatgen/entries/entry_tools.py
#!/usr/bin/env python ''' Created on Feb 24, 2012 ''' from __future__ import division __author__ = "Shyue Ping Ong" __copyright__ = "Copyright 2012, The Materials Project" __version__ = "0.1" __maintainer__ = "Shyue Ping Ong" __email__ = "shyue@mit.edu" __date__ = "Feb 24, 2012" import logging from pymatgen.core.s...
Python
0
@@ -1846,21 +1846,20 @@ logger. -debug +info (%0A @@ -2161,21 +2161,20 @@ logger. -debug +info (%22Refere @@ -2341,29 +2341,28 @@ logger. -debug +info (%22Testing ti @@ -2624,21 +2624,20 @@ logger. -debug +info (%22Test h @@ -3050,13 +3050,12 @@ ger. -debug +info (%22Fi @@ -3165,16 +3165,16 @@ ...
9b529bf49b7ffe25ba4d49a8a220ee9e99e67833
Fix return values of OAuth posts of mocks in test_associate.py.
tests/test_associate.py
tests/test_associate.py
from __future__ import division, print_function, unicode_literals import mock from gittip.testing import Harness, test_website as _test_website from gittip.testing.client import TestClient class Tests(Harness): def setUp(self): Harness.setUp(self) self.website = _test_website self.client...
Python
0
@@ -779,39 +779,43 @@ oken_secret=foo& -user_id +screen_name =foo%22%0A%0A g @@ -1590,39 +1590,43 @@ oken_secret=foo& -user_id +screen_name =foo%22%0A%0A g @@ -2628,39 +2628,43 @@ oken_secret=foo& -user_id +screen_name =foo%22%0A%0A g @@ -3665,23 +3665,27 @@ ret=foo& -user_id +screen_name =...
d488afb6416072f9d6557ab19a02487f3666c38c
Tidy up some python
python/footbawwlapi/__init__.py
python/footbawwlapi/__init__.py
import json import nflgame from footbawwlapi.game import Game def create_all_players(host, port, year, kind, game_weeks): games = [] for week in game_weeks: print year print week print kind for game in nflgame.games(year, week = week, kind = kind): games.append(Game(game, week)) if not ga...
Python
0.000309
@@ -160,53 +160,8 @@ ks:%0A - print year%0A print week%0A print kind%0A
bab230c0d6debd6b1ab2c521f21d133841c1a7f5
add a test for simple rnn
tests/keras/layers/test_simplernn.py
tests/keras/layers/test_simplernn.py
Python
0.00001
@@ -0,0 +1,2465 @@ +import theano%0Aimport unittest%0Afrom numpy.testing import assert_allclose%0Aimport numpy as np%0Afrom keras.layers.recurrent import SimpleRNN%0Afrom mock import Mock%0A%0AfloatX = theano.config.floatX%0A%0A__author__ = %22Jeff Ye%22%0A%0A%0Aclass TestSimpleRNN(unittest.TestCase):%0A left_paddin...
62b77547179fb7b480f433efed874731efa81ae7
Add to_video.py
to_video.py
to_video.py
Python
0.000001
@@ -0,0 +1,533 @@ +import os%0Aimport sys%0A%0Aimport cv2%0A%0A%0Adef to_video(ipath, ofn):%0A writer = None%0A ifns = os.listdir(ipath)%0A ifns.sort()%0A for ifn in ifns:%0A ifn = os.path.join(ipath, ifn)%0A frame = cv2.imread(ifn)%0A if not writer:%0A fourcc = cv2.VideoWrit...
d287286cd14752fd3f3feddfc8a4fb64f3b21872
Add migration
readthedocs/builds/migrations/0007_add-automation-rules.py
readthedocs/builds/migrations/0007_add-automation-rules.py
Python
0.000002
@@ -0,0 +1,2649 @@ +# -*- coding: utf-8 -*-%0A# Generated by Django 1.11.20 on 2019-02-28 16:10%0Afrom __future__ import unicode_literals%0A%0Afrom django.db import migrations, models%0Aimport django.db.models.deletion%0Aimport django_extensions.db.fields%0A%0A%0Aclass Migration(migrations.Migration):%0A%0A dependen...
5972c05015c96b1b4b9195a687cf09dab036363a
Add resources tests.
tests/test_resources.py
tests/test_resources.py
Python
0
@@ -0,0 +1,1120 @@ +#!/usr/bin/python3%0Aimport os%0Aimport sys%0Aimport unittest%0A%0ALIB_PATH = os.path.dirname(os.path.realpath(__file__)) + '/../'%0ACONFIG_PATH = os.path.join(LIB_PATH, 'grafcli.example.conf')%0A%0Asys.path.append(LIB_PATH)%0A%0Afrom grafcli.config import load_config%0Aload_config(CONFIG_PATH)%0A%0...
870ed1b76209b8850f300842a67416c4a69523e3
Update TFRT dependency to use revision http://github.com/tensorflow/runtime/commit/9e718d5cacc5ec4964120a626a851af2798c2322.
third_party/tf_runtime/workspace.bzl
third_party/tf_runtime/workspace.bzl
"""Provides the repository macro to import TFRT.""" load("//third_party:repo.bzl", "tf_http_archive", "tf_mirror_urls") def repo(): """Imports TFRT.""" # Attention: tools parse and update these lines. TFRT_COMMIT = "38f4f5c359ecb321cfd3a085f930dd71a7f620ab" TFRT_SHA256 = "0cf2a09389a0271a8433a6642b5a...
Python
0
@@ -228,133 +228,133 @@ = %22 -38f4f5c359ecb321cfd3a085f930dd71a7f620ab%22%0A TFRT_SHA256 = %220cf2a09389a0271a8433a6642b5aa327d4cbb86999938a2e7d77615a55635ac5 +9e718d5cacc5ec4964120a626a851af2798c2322%22%0A TFRT_SHA256 = %22aa53d5bec70c1d029b803b279995d41b41b957e516cec10bead250bb09ae9794 %22%0A%0A
dbf1c4d098ffa180c8fa6564f5ad909e198a03c3
Add servo lib
servo.py
servo.py
Python
0
@@ -0,0 +1,536 @@ +#################################################################%0A## SERVO LIB for SMART TOLLBOOTH PROJECT ##%0A#################################################################%0A%0Aimport RPi.GPIO as GPIO%0Aimport time%0A%0AGPIO.setmode(GPIO.BCM)%0A%0ASERVO = 17%0A%0AGPIO.se...
52e5cca3791977bbe922e9c564dd59f10cf7af57
add required fields
modularodm/fields/__init__.py
modularodm/fields/__init__.py
import weakref import collections import warnings import logging class List(collections.MutableSequence): def __init__(self, value=None, **kwargs): self._field_instance = kwargs.get('field_instance', None) self.data = [] if value is None: return # todo: where should...
Python
0
@@ -1684,21 +1684,26 @@ # -todo: +Validation %0A @@ -2131,17 +2131,16 @@ efault)%0A -%0A @@ -2183,25 +2183,24 @@ ry', False)%0A -%0A self @@ -2233,16 +2233,71 @@ , False) +%0A self._required = kwargs.get('required', False) %0A%0A de @@ -2311,24 +2311,30 @@ lidate(self, ...
251590eda4c373a4be2f6690633873392ce5c86c
implement a customized CLA model that can enable/disable TP/SP learning
sequence_prediction/continuous_sequence/clamodel_custom.py
sequence_prediction/continuous_sequence/clamodel_custom.py
Python
0
@@ -0,0 +1,2142 @@ +# ----------------------------------------------------------------------%0A# Numenta Platform for Intelligent Computing (NuPIC)%0A# Copyright (C) 2013, Numenta, Inc. Unless you have an agreement%0A# with Numenta, Inc., for a separate license for this software code, the%0A# following terms and condi...