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
7284de859a6f0cc500e079bd5daf60748006cabf
Make --transformed a required argument, otherwise bad things happen.
msmbuilder/commands/featurizer.py
msmbuilder/commands/featurizer.py
from __future__ import print_function, absolute_import import os import warnings import numpy as np import mdtraj as md from ..utils.progressbar import ProgressBar, Percentage, Bar, ETA from ..utils import verbosedump from ..cmdline import NumpydocClassCommand, argument, exttype, stripquotestype from ..dataset import...
Python
0.000907
@@ -1298,16 +1298,31 @@ ype('/') +, required=True )%0A st
ffa67682628e0140e43ae3e886cd022aedfb9750
Fix lint warnings in api_helper.py
src/tests/ggrc/api_helper.py
src/tests/ggrc/api_helper.py
# Copyright (C) 2015 Google Inc., authors, and contributors <see AUTHORS file> # Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file> # Created By: miha@reciprocitylabs.com # Maintained By: miha@reciprocitylabs.com from ggrc.app import app from ggrc.services.common import Resource from ggrc imp...
Python
0.00013
@@ -373,64 +373,8 @@ ing%0A -from sqlalchemy.orm.collections import InstrumentedList%0A %0A%0A# @@ -1128,17 +1128,16 @@ %7D%0A -%0A else @@ -1781,17 +1781,16 @@ sponse%0A%0A -%0A def se @@ -2272,32 +2272,34 @@ aders = %7B%0A + %22If-Match%22: resp @@ -2316,32 +2316,34 @@ rs.get(%22Etag%22)...
1696d6b1f240f8403819e3d817ae8e387ab5d08c
Add FFT checkers.
numscons/checkers/fft_checkers.py
numscons/checkers/fft_checkers.py
Python
0
@@ -0,0 +1,1525 @@ +#! /usr/bin/env python%0A# Last Change: Tue Dec 04 03:00 PM 2007 J%0A%0A# Module for custom, common checkers for numpy (and scipy)%0Aimport sys%0Aimport os.path%0Afrom copy import deepcopy%0Afrom distutils.util import get_platform%0A%0A# from numpy.distutils.scons.core.libinfo import get_config_from...
88e87392204884102b17a92581c5d5b29a258bb7
add ftpsync
openprocurement/search/ftpsync.py
openprocurement/search/ftpsync.py
Python
0
@@ -0,0 +1,2140 @@ +# -*- coding: utf-8 -*-%0Aimport os%0Aimport sys%0Aimport signal%0Aimport os.path%0Aimport logging%0Aimport logging.config%0A%0Afrom ftplib import FTP%0Afrom ConfigParser import ConfigParser%0A%0Alogger = logging.getLogger(__name__)%0A%0A%0Aclass FTPSyncApp(object):%0A config = %7B%0A 'hos...
eb4294f95cb05337ef432840d9538de1275b22b4
Add routes.
web2py/routes.py
web2py/routes.py
Python
0
@@ -0,0 +1,50 @@ +routes_in = %5B%0A%09('/', '/addrest/default/index'),%0A%5D%0A
e3757b20ca74e070e57dd251bf60f691922999fe
add new test file
test/test_collection.py
test/test_collection.py
Python
0.000001
@@ -0,0 +1,532 @@ +import unittest%0Afrom solr_instance import SolrInstance%0Afrom solrcloudpy import Connection%0A%0Aclass TestCollection(unittest.TestCase):%0A def setUp(self):%0A self.solrprocess = SolrInstance(%22solr2%22)%0A self.solrprocess.start()%0A self.solrprocess.wait_ready()%0A ...
40dd078b5e176ae5039bf20dcb50350e8f065808
Create python script to scroll error messages
recognition/scrollError.py
recognition/scrollError.py
Python
0.000001
@@ -0,0 +1,142 @@ +from sense_hat import SenseHat%0Aimport sys%0A%0Asense = SenseHat()%0Asense.show_message(sys.stdin.read(), scroll_speed=.08, text_colour=%5B255, 0, 0%5D)%0A
d6a53b1b8acbddc16006c0c8752b44f176aecb12
add ntuple analyser
PyAnalysisTools/AnalysisTools/NTupleAnalyser.py
PyAnalysisTools/AnalysisTools/NTupleAnalyser.py
Python
0
@@ -0,0 +1,2741 @@ +import os%0Afrom PyAnalysisTools.base import InvalidInputError%0Afrom PyAnalysisTools.base.YAMLHandle import YAMLLoader%0Afrom PyAnalysisTools.ROOTUtils.FileHandle import FileHandle%0Aimport pathos.multiprocessing as mp%0Atry:%0A import pyAMI.client%0Aexcept Exception as e:%0A _logger.error(%2...
67d1382c5c36e4476c56a9cd5c2e841131b07e6c
add classMulInherit.py
classMulInherit.py
classMulInherit.py
Python
0.000001
@@ -0,0 +1,1070 @@ +class A(object):%0A def __init__(self):%0A self.a = 1%0A def x(self):%0A print %22A.x%22%0A def y(self):%0A print %22A.y%22%0A def z(self):%0A print %22A.z%22%0A%0Aclass B(A):%0A def __init__(self):%0A A.__init__(self)%0A self.a = 2%0A ...
555dc74ad29b99fd4cf4c3ba97b7edfdaf8e485f
Create next-greater-element-i.py
Python/next-greater-element-i.py
Python/next-greater-element-i.py
Python
0.999265
@@ -0,0 +1,1686 @@ +# Time: O(m + n)%0A# Space: O(m + n)%0A%0A# You are given two arrays (without duplicates) nums1 and nums2 where nums1%E2%80%99s elements are subset of nums2.%0A# Find all the next greater numbers for nums1's elements in the corresponding places of nums2.%0A#%0A# The Next Greater Number of a number ...
b0c03b86d606c85dd1cab1ad9e9678e1057d0ae1
Add pen which draws to TrueType glyphs.
Lib/fontTools/pens/ttGlyphPen.py
Lib/fontTools/pens/ttGlyphPen.py
Python
0
@@ -0,0 +1,2358 @@ +from __future__ import print_function, division, absolute_import%0Afrom array import array%0A%0Afrom fontTools.misc.py23 import *%0Afrom fontTools.pens.basePen import AbstractPen%0Afrom fontTools.ttLib.tables import ttProgram%0Afrom fontTools.ttLib.tables._g_l_y_f import Glyph%0Afrom fontTools.ttLib...
95e2e9af124595aae4801fc9813ee1c294d404cd
Change invalidtxrequest to use BitcoinTestFramework
test/functional/p2p_invalid_tx.py
test/functional/p2p_invalid_tx.py
#!/usr/bin/env python3 # Copyright (c) 2015-2017 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """Test node responses to invalid transactions. In this test we connect to one node over p2p, and test tx...
Python
0
@@ -331,21 +331,8 @@ %22%22%22%0A -import time%0A%0A from @@ -419,84 +419,8 @@ ion%0A -from test_framework.comptool import RejectResult, TestInstance, TestManager%0A from @@ -512,16 +512,30 @@ ad_start +, P2PDataStore %0Afrom te @@ -569,25 +569,22 @@ import -Compariso +Bitcoi nTestFra @@ -622,17 +622,14 @@ e...
08447fa344e21d6d704c6f195ad2b7405fa8f916
Add test for total property
saleor/order/test_order.py
saleor/order/test_order.py
Python
0
@@ -0,0 +1,200 @@ +from .models import Order%0A%0A%0Adef test_total_property():%0A order = Order(total_net=20, total_tax=5)%0A assert order.total.gross == 25%0A assert order.total.tax == 5%0A assert order.total.net == 20%0A
2b09a8d75e0d59bba41467210b7d0588eb4a09d5
add migration for junebug channel type
temba/channels/migrations/0050_add_junebug_channel_type.py
temba/channels/migrations/0050_add_junebug_channel_type.py
Python
0
@@ -0,0 +1,1297 @@ +# -*- coding: utf-8 -*-%0A# Generated by Django 1.9.12 on 2017-01-26 15:56%0Afrom __future__ import unicode_literals%0A%0Afrom django.db import migrations, models%0A%0A%0Aclass Migration(migrations.Migration):%0A%0A dependencies = %5B%0A ('channels', '0049_auto_20170106_0910'),%0A %5D%0...
ace26ab5e713fabd02f4f481956c47640f50b166
Add unit test for volume limits client
tempest/tests/lib/services/volume/v2/test_limits_client.py
tempest/tests/lib/services/volume/v2/test_limits_client.py
Python
0
@@ -0,0 +1,2146 @@ +# Copyright 2017 FiberHome Telecommunication Technologies CO.,LTD%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 License at%0A#%0A# ...
29c268db2cbb3b4787d3e925f925a49f0df68c46
add cache UT
test/test_cache.py
test/test_cache.py
Python
0.000001
@@ -0,0 +1,1925 @@ +#!/usr/bin/env python%0A# -*- coding: utf-8 -*-%0A%22%22%22Logger Class%0A Simple encapsulation on logging functions.%0A - Console printing%0A - File handler and the mapping for multithreading file handlers are under design yet.%0A%0A .. moduleauthor:: Max Wu %3Chttp://maxwu.me%3E%0A .. References::...
e4b9c43d53121d2b21c4b864fcc74674b0b6dfc1
Create class to interpolate values between indexes
scratchpad/Interpolator.py
scratchpad/Interpolator.py
Python
0
@@ -0,0 +1,956 @@ +class Interpolator:%0A def __init__(self):%0A self.data = %5B%5D%0A%0A def addIndexValue(self, index, value):%0A self.data.append((index, value))%0A%0A def valueAtIndex(self, target_index):%0A if target_index %3C self.data%5B0%5D%5B0%5D:%0A return None%0A ...
c3de9ebfa84fd93572d0a4ac991272609a593328
Create af_renameSG.py
scripts/af_renameSG.py
scripts/af_renameSG.py
Python
0.000002
@@ -0,0 +1,365 @@ +# rename shading group name to material name but with SG ended%0Aimport pymel.core as pm%0Aimport re%0AselSG = pm.ls(sl=True,fl=True)%0Afor SG in selSG:%0A curMat = pm.listConnections(SG,d=1)%0A for mat in curMat:%0A if pm.nodeType(mat) == 'blinn' or pm.nodeType(mat) == 'lambert':%0A ...
b8777453cf03b212f2b06ca0afeef6c780e39f51
add face_classifier.py
scripts/face_classifier.py
scripts/face_classifier.py
Python
0.000009
@@ -0,0 +1,1307 @@ +#!/usr/bin/env python%0A# -*- coding: utf-8 -*-%0A# face_classifier.py%0A# author: Kentaro Wada %3Cwww.kentaro.wada@gmail.com%3E%0A%0Aimport os%0Aimport sys%0Aimport collections%0A%0Afrom sklearn import svm%0Aimport cv2%0A%0A%0Aclass FaceClassifier(object):%0A def __init__(self, data_dir):%0A ...
ef7abdab7681e496cebd1e4655a63cafcb9163db
add gafton's migration script to scripts/
scripts/migrate-dbstore.py
scripts/migrate-dbstore.py
Python
0
@@ -0,0 +1,2488 @@ +#!/usr/bin/python%0A%0Aimport sys%0Aimport os%0Aif 'CONARY_PATH' in os.environ:%0A sys.path.insert(0, os.environ%5B'CONARY_PATH'%5D)%0A%0Afrom conary import dbstore%0Afrom conary.dbstore import sqlerrors%0Afrom conary.repository.netrepos import schema%0A%0Aif len(sys.argv) != 3:%0A print %22Us...
36781fb1b04a3d2fd3162ea88969244faab22a60
Convert GML to EWKT, via PostGIS
open511/utils/postgis.py
open511/utils/postgis.py
Python
0.002223
@@ -0,0 +1,327 @@ +from django.db import connection%0A%0Adef gml_to_ewkt(gml_string, force_2D=False):%0A cursor = connection.cursor()%0A if force_2D:%0A sql = 'SELECT ST_AsEWKT(ST_Force_2D(ST_GeomFromGML(%25s)))'%0A else:%0A sql = 'SELECT ST_AsEWKT(ST_GeomFromGML(%25s))'%0A cursor.execute(sql,...
aa320244cc03fe299aa33057c8b92a6c2352a5fd
Add tracer for sqlalchemy
osprofiler/sqlalchemy.py
osprofiler/sqlalchemy.py
Python
0.000063
@@ -0,0 +1,1611 @@ +# Copyright 2013 OpenStack Foundation.%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 License at%0A#%0A# http://www.apache.org/...
eefef8a5917243b75065441d46db19cbd65a7f1d
Create debounce decorator
mopidy_headless/decorator.py
mopidy_headless/decorator.py
Python
0
@@ -0,0 +1,474 @@ +import time%0A%0Adef debounce(wait):%0A %22%22%22%0A Wait before calling a function again, discarding any calls in between%0A %22%22%22%0A def decorator(fn):%0A def wrapped(*args, **kwargs):%0A now = time.time()%0A if wrapped.last is not None:%0A ...
b2e059ce247de4b083c059d1ffe925983c262183
add test cases
tests/test_fast.py
tests/test_fast.py
Python
0.003542
@@ -0,0 +1,651 @@ +from unittest import TestCase%0A%0Aimport numpy as np%0A%0A%0Aclass TestFast(TestCase):%0A def test_clip_grad(self):%0A from vlgp import fast%0A np.random.seed(0)%0A n = 100%0A x = np.random.randn(n)%0A x_clipped = fast.clip_grad(x, bound=1.0)%0A%0A self.a...
3fc118da6cdc29f4867dc33319ca56f4f3731346
add leetcode 121
leetcode/121.py
leetcode/121.py
Python
0.000137
@@ -0,0 +1,1115 @@ +#!/usr/bin/env python%0A%22%22%22%0ASay you have an array for which the ith element is the price of a given stock on day i.%0A%0AIf you were only permitted to complete at most one transaction %0A(ie, buy one and sell one share of the stock), design an algorithm to find the maximum profit.%0A%22%22%2...
16ad7991c22b4d9834a5db57912789d825a0cefb
Add unit tests
tests/test_util.py
tests/test_util.py
Python
0.000001
@@ -0,0 +1,471 @@ +import util%0A%0Afrom nose.tools import assert_equal%0A%0A%0Aclass TestPick():%0A def check(self, filenames, expected, k, randomized):%0A result = util.pick(filenames, k, randomized)%0A assert_equal(result, expected)%0A%0A def test_all_sequential(self):%0A filenames = %5B'a...
fcc92760db0d1dc56aca70aff69b34a29c9e8e6c
Add unit tests for the methods in util
tests/test_util.py
tests/test_util.py
Python
0
@@ -0,0 +1,985 @@ +from lib import util%0A%0A%0Adef test_cachedproperty():%0A class Target:%0A def __init__(self):%0A self.call_count = 0%0A%0A @util.cachedproperty%0A def prop(self):%0A self.call_count += 1%0A return self.call_count%0A%0A t = Target()%0A a...
a1fc7311ddc50eb43f43fc51d3290f2c91fd4fa1
Update cheapest-flights-within-k-stops.py
Python/cheapest-flights-within-k-stops.py
Python/cheapest-flights-within-k-stops.py
# Time: O((|E| + |V|) * log|V|) = O(|E| * log|V|) # Space: O(|E| + |V|) # There are n cities connected by m flights. Each fight starts from city u and arrives at v with a price w. # # Now given all the cities and fights, together with starting city src and the destination dst, # your task is to find the cheapest pric...
Python
0
@@ -65,16 +65,25 @@ %7C + %7CV%7C) + = O(%7CE%7C) %0A%0A# Ther
33bcc472fdc780154403eb1616114957ce9e2b21
refactor app creation/run so tests can spin up an instance
dataactbroker/app.py
dataactbroker/app.py
import os import sys import inspect import traceback import json from flask.ext.cors import CORS from flask.ext.bcrypt import Bcrypt from flask import Flask from dataactcore.utils.cloudLogger import CloudLogger from dataactcore.utils.jsonResponse import JsonResponse from dataactbroker.handlers.aws.sesEmail import sesEm...
Python
0.000001
@@ -629,32 +629,227 @@ def -runApp():%0A try :%0A +getAppConfiguration(app) :%0A %22%22%22gets the web_api_configuration JSON%22%22%22%0A configFile = %22%22.join(%5Bapp.instance_path, %22/web_api_configuration.json%22%5D)%0A return json.loads(open(configFile,%22r%22).read())%0A%0Adef createApp():%0A ...
1c41bc4d06ad2209ddd6fe79621cabd210b94589
Add __init__
demcoreg/__init__.py
demcoreg/__init__.py
Python
0.000917
@@ -0,0 +1,23 @@ +#! /usr/bin/env python%0A
97671650987d74c6281e56f3f4e1950f2d996d5b
upgrade version...
setup.py
setup.py
#!/usr/bin/python # Copyright (c) 2010 OpenStack, LLC. # # 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 ...
Python
0
@@ -1244,17 +1244,20 @@ = '0.1. -1 +3pre '%0A%0Asetup
e123f31a2a863491bb6353336038e7d324475bc9
Add setuptools for install
setup.py
setup.py
Python
0
@@ -0,0 +1,621 @@ +from setuptools import setup%0A%0Asetup(%0A name='netbyte',%0A version='0.4',%0A url='http://www.sc0tfree.com',%0A license='MIT License',%0A author='sc0tfree',%0A author_email='henry@sc0tfree.com',%0A description='Netbyte is a Netcat-style tool that facilitates probing proprietar...
6e805995a165f923c1c4f71c163c64a245f9a3d5
Add simple distutils script for modules
setup.py
setup.py
Python
0
@@ -0,0 +1,922 @@ +from distutils.core import setup%0A%0Asetup(name='dimreducer',%0A version='1.0',%0A description='Dimension reduction methods',%0A py_modules=%5B'dimreducer'%5D,%0A )%0A%0Asetup(name='multiphenotype_utils',%0A version='1.0',%0A description='Utility functions for all method...
914b7cd2c94bddd1a68eb2293364633a9325506f
add a unit test
_unittests/ut_td_1a/test_diff.py
_unittests/ut_td_1a/test_diff.py
Python
0.000001
@@ -0,0 +1,2751 @@ +%22%22%22%0A@brief test log(time=1s)%0A%0AYou should indicate a time in seconds. The program %60%60run_unittests.py%60%60%0Awill sort all test files by increasing time and run them.%0A%22%22%22%0A%0A%0Aimport sys%0Aimport os%0Aimport unittest%0Afrom difflib import SequenceMatcher%0A%0A%0Atry:%0...
c03411020db80b703260314236d96cc409398545
Create variable.py
introduction/variable.py
introduction/variable.py
Python
0.000008
@@ -0,0 +1,32 @@ +a = 10%0AA = 10%0Aprint(a)%0Aprint(A)%0A
3314f5d6ffb843a58e61856e726bd47e426538aa
Add spec_cleaner/__main__.py to allow running spec-cleaner without installing it.
spec_cleaner/__main__.py
spec_cleaner/__main__.py
Python
0
@@ -0,0 +1,572 @@ +from __future__ import absolute_import%0A%0Aimport os%0Aimport sys%0A%0A# If we are running from a wheel, add the wheel to sys.path.%0Aif __package__ == '':%0A # __file__ is spec-cleaner-*.whl/spec_cleaner/__main__.py.%0A # First dirname call strips of '/__main__.py', second strips off '/spec_c...
6f8db8eddb7b55a3854ac2570e7e4b2df0a89036
Add coveralls dep
setup.py
setup.py
#!/usr/bin/env python """ Sentry ====== Sentry is a realtime event logging and aggregation platform. It specializes in monitoring errors and extracting all the information needed to do a proper post-mortem without any of the hassle of the standard user feedback loop. Sentry is a Server ------------------ The Sentry ...
Python
0.000001
@@ -1383,24 +1383,48 @@ t-timeout',%0A + 'python-coveralls',%0A 'nydus',
c54623d673d03d841d330e80d414a687770cc2a1
Add setup.py
setup.py
setup.py
Python
0.000001
@@ -0,0 +1,864 @@ +import setuptools%0A%0Awith open(%22README%22, %22r%22, encoding=%22utf-8%22) as fh:%0A long_description = fh.read()%0A%0Asetuptools.setup(%0A name=%22zvm%22, # Replace with your own username%0A version=%221.0.0%22,%0A author=%22Ben Collins-Sussman%22,%0A author_email=%22sussman@gmail....
ce5883c6a7a0c8c8f79c941f66288ce748b1b405
Add setup.py
setup.py
setup.py
Python
0.000001
@@ -0,0 +1,1170 @@ +from setuptools import setup%0A%0Asetup(%0A name = 'brunnhilde',%0A version = '1.4.0',%0A url = 'https://github.com/timothyryanwalsh/brunnhilde',%0A author = 'Tim Walsh',%0A author_email = 'timothyryanwalsh@gmail.com',%0A py_modules = %5B'brunnhilde'%5D,%0A scripts = %5B'brunnhi...
73e0bd62ac7a2d8b8322e21130ee7ec0659dc3cc
add setup.py
setup.py
setup.py
Python
0.000001
@@ -0,0 +1,630 @@ +#!/usr/bin/env python%0A# -*- coding: utf-8 -*-%0A%0Afrom distutils.core import setup%0A%0A%0Asetup(%0A name = %22jsroot%22,%0A version = %220.0.0%22,%0A description = %22VISPA ROOT Browser - Inspect contents of root files.%22,%0A author = %22VISPA Proj...
8e8678c2bc915e671f50bb6ea91288662053c280
add setup file
setup.py
setup.py
Python
0.000001
@@ -0,0 +1,400 @@ +#!/usr/bin/env python%0A# encoding: utf-8%0A%0Afrom setuptools import setup, find_packages%0A%0Asetup(%0A name = 'yard',%0A version = '0.1.0',%0A author = %22Diogo Laginha%22,%0A url = 'https://github.com/laginha/yard',%0A description = ...
dd1810ddf1f85312c7a8b5ec23d4844b5ca63a13
add data_filtering.py
code/data_filtering.py
code/data_filtering.py
Python
0.000003
@@ -0,0 +1,2475 @@ +import numpy as np%0Aimport matplotlib.pyplot as plt%0Aimport os%0Aimport sys%0Aimport nitime%0A%0A# Import the time-series objects:%0Afrom nitime.timeseries import TimeSeries%0A%0A# Import the analysis objects:%0Afrom nitime.analysis import SpectralAnalyzer, FilterAnalyzer, NormalizationAnalyzer%0A...
e0fbd1d0e5e9b845ebfa6aa1739937a9974cbc87
Add setup.py
setup.py
setup.py
Python
0.000001
@@ -0,0 +1,358 @@ +#!/usr/bin/env python%0A%0Afrom distutils.core import setup%0A%0Asetup(%0A name='iroha-ya-cli',%0A version='0.7',%0A description='Cli for hyperledger/iroha',%0A author='Sonoko Mizuki',%0A author_email='mizuki.sonoko@gmail.com',%0A packages=%5B'src'%5D,%0A entry_poin...
2484c0f9415694c99e5b1ac15ee4b64f12e839b6
add migration to reflect schema updates to wagtailforms
demo/migrations/0005_auto_20160531_1736.py
demo/migrations/0005_auto_20160531_1736.py
Python
0
@@ -0,0 +1,2571 @@ +# -*- coding: utf-8 -*-%0Afrom __future__ import unicode_literals%0A%0Afrom django.db import migrations, models%0A%0A%0Aclass Migration(migrations.Migration):%0A%0A dependencies = %5B%0A ('demo', '0004_auto_20151019_1351'),%0A %5D%0A%0A operations = %5B%0A migrations.AlterFiel...
38c16264147501d56b36f9b3259652759ae70464
Version 1.15.8
setup.py
setup.py
""" The setup package to install SeleniumBase dependencies and plugins (Uses selenium 3.x and is compatible with Python 2.7+ and Python 3.6+) """ from setuptools import setup, find_packages # noqa from os import path this_directory = path.abspath(path.dirname(__file__)) long_description = None try: with open(pa...
Python
0
@@ -562,17 +562,17 @@ n='1.15. -7 +8 ',%0A d
97d96097122ca50e84fcadd3a5c21ae51ccc8bf7
Create Polarity_classifier.py
src/Polarity_classifier.py
src/Polarity_classifier.py
Python
0.000008
@@ -0,0 +1,1670 @@ +import pickle%0Aimport itertools%0Afrom nltk.collocations import BigramCollocationFinder%0Afrom nltk.metrics import BigramAssocMeasures%0Afrom nltk.corpus import stopwords%0A%0Aclass Polarity_classifier:%0A%0A def __init__(self):%0A pass%0A%0A def bigram_word_feats(self, words, score_fn...
2c39bc6e1586dcacc1d23d9be643d1f27f035eac
Add wsgi file
agendadulibre/agendadulibre.wsgi
agendadulibre/agendadulibre.wsgi
Python
0.000001
@@ -0,0 +1,273 @@ +import sys%0Asys.path.insert(0, '/var/www/agendadulibre/agendadulibre')%0A%0A#sys.path.insert(0, os.curdir)%0A%0Aactivate_this = '/home/numahell/.virtualenvs/flask/local/bin/activate_this.py'%0Aexecfile(activate_this, dict(__file__=activate_this))%0A%0A%0Afrom app import app as application%0A
f9c68d3c250e3a83ab1d0ed9e0760c0631dca869
add setup.py
setup.py
setup.py
Python
0.000001
@@ -0,0 +1,412 @@ +#!/usr/bin/env python%0Afrom setuptools import find_packages, setup%0Afrom fabliip import __version__%0A%0Asetup(%0A name='fabliip',%0A version=__version__,%0A packages=find_packages(),%0A description='Set of Fabric functions to help deploying websites.',%0A author='Sylvain Fankhauser'...
054be2f9a06c0da3b7fcf5d40985ce8055f3f447
add setup.py
setup.py
setup.py
Python
0.000001
@@ -0,0 +1,1231 @@ +from setuptools import setup, find_packages%0A%0Asetup(%0A name='bark',%0A version='1.0',%0A url='https://github.com/battleroid/bark',%0A description='Single file static site generator.',%0A license='MIT License',%0A keywords='bark static site generator jinj...
c6c6594cda35aaa15f1efb9f336548671b0028c5
Add generic serializer tool for plugins to use
rmake/lib/twisted_extras/tools.py
rmake/lib/twisted_extras/tools.py
Python
0
@@ -0,0 +1,1281 @@ +#%0A# Copyright (c) rPath, Inc.%0A#%0A# This program is free software: you can redistribute it and/or modify%0A# it under the terms of the GNU General Public License as published by%0A# the Free Software Foundation, either version 3 of the License, or%0A# (at your option) any later version.%0A#%0A# ...
b4f5b5da5e7a7266e7f908b6ffc975ea3f1f0657
Add setup.py
setup.py
setup.py
Python
0.000001
@@ -0,0 +1,233 @@ +from distutils.core import setup%0A%0Asetup(name='MathLibPy',%0A version='0.0.0',%0A description='Math library for Python',%0A author='Jack Romo',%0A author_email='sharrackor@gmail.com',%0A packages=%5B'mathlibpy'%5D,%0A )%0A
49178742953cc63b066d2142d9e2b3f0f2e20e17
Tweak setup.py so that it may run even when fired from different locations, as suggested by Maarten Damen.
setup.py
setup.py
#!/usr/bin/python from os.path import isfile, join import glob import os import re from setuptools import setup if isfile("MANIFEST"): os.unlink("MANIFEST") VERSION = re.search('__version__ = "([^"]+)"', open("dateutil/__init__.py").read()).group(1) setup(name="python-dateutil", ver...
Python
0
@@ -159,16 +159,58 @@ EST%22)%0A%0A%0A +TOPDIR = os.path.dirname(__file__) or %22.%22%0A VERSION @@ -273,17 +273,27 @@ open( -%22 +TOPDIR + %22/ dateutil
ba9235b758fe44279e3bd55bfb785308febb8685
Add padding between layout and children (#1980)
kivy/uix/anchorlayout.py
kivy/uix/anchorlayout.py
''' Anchor Layout ============= .. only:: html .. image:: images/anchorlayout.gif :align: right .. only:: latex .. image:: images/anchorlayout.png :align: right The :class:`AnchorLayout` aligns children to a border (top, bottom, left, right) or center. To draw a button in the lower-right ...
Python
0
@@ -2199,16 +2199,17 @@ w = +( c.size_h @@ -2218,24 +2218,41 @@ t%5B0%5D * width +) - (2 * padding) %0A @@ -2371,24 +2371,25 @@ h = +( c.size_hint%5B @@ -2395,24 +2395,41 @@ %5B1%5D * height +) - (2 * padding) %0A
65c9335775688a15b344be4762ee7c75bd66bdb2
Add a setup.py file
setup.py
setup.py
Python
0.000002
@@ -0,0 +1,695 @@ +import os%0Aimport codecs%0Afrom setuptools import setup, find_packages%0A%0A%0Adef read(fname):%0A file_path = os.path.join(os.path.dirname(__file__), fname)%0A return codecs.open(file_path, encoding='utf-8').read()%0A%0A%0Asetup(%0A name='cities',%0A version='0.0.1',%0A description='...
f57605c4f37fb29a93f06d165b9eb69fee2771b9
Add fake setup.py (#1620)
setup.py
setup.py
Python
0
@@ -0,0 +1,679 @@ +import sys%0A%0Afrom setuptools import setup%0A%0Asys.stderr.write(%0A %22%22%22%0A===============================%0AUnsupported installation method%0A===============================%0Ahttpx no longer supports installation with %60python setup.py install%60.%0APlease use %60python -m pip install ....
7c863017bd687a06c63a5c60c53c6efca80d6b0e
Add setup script
setup.py
setup.py
Python
0.000001
@@ -0,0 +1,241 @@ +from setuptools import setup%0A%0Asetup(%0A name='discord-toastlogger',%0A version='0.1.0',%0A scripts=%5B'toastbot'%5D,%0A url='https://github.com/mdegreg/discord-toastlogger',%0A license='MIT',%0A install_requires=%5B%0A 'discord'%0A %5D%0A)
1b0b91e9445e080e790571a00e767f31f5035fd1
Add setup.py
setup.py
setup.py
Python
0.000001
@@ -0,0 +1,1624 @@ +#!/usr/bin/env python3%0A#%0A# The MIT License (MIT)%0A#%0A# Copyright (c) 2014 Philippe Proulx %3Ceepp.ca%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...
c40a65c46b075881222f5c9ccebccfb0c627aa51
Create setup.py
setup.py
setup.py
Python
0.000001
@@ -0,0 +1 @@ +%0A
e87d736c83d89129f4a152163993cb5c173dddd4
Add setup
setup.py
setup.py
Python
0.000001
@@ -0,0 +1,189 @@ +from setuptools import setup%0A%0A%0Asetup(name='Kamanian',%0A version='1.00',%0A packages=%5B'dzdy'%5D,%0A install_requires=%5B'pandas', 'numpy', 'scipy', 'pcore', 'matplotlib', 'networkx'%5D)%0A
05477b14e19d1e2d0483405bf3558f7d80fb9b60
Switch to setuptools.
setup.py
setup.py
# setup.py - distutils configuration for esm and esmre modules # Copyright (C) 2007 Tideway Systems Limited. # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; either # version 2.1 of the...
Python
0.000007
@@ -846,22 +846,18 @@ rom -distutils.core +setuptools imp @@ -1481,16 +1481,514 @@ lit()),%0A + classifiers = %5B%0A 'Development Status :: 4 - Beta',%0A 'Intended Audience :: Developers',%0A 'License :: OSI Approved ::',%0A 'GNU Library or Lesser General Public License (LGPL)...
ed3c7942e5717d187c922c8e6169def414562886
Allow higher version of flask-login. Why is this capped?
setup.py
setup.py
from setuptools import setup, find_packages from setuptools.command.test import test as TestCommand import sys # Kept manually in sync with airflow.__version__ version = '1.5.1' class Tox(TestCommand): user_options = [('tox-args=', None, "Arguments to pass to tox")] def initialize_options(self): Test...
Python
0
@@ -2072,25 +2072,25 @@ =0.2.11, %3C0. -3 +5 ',%0A '
44bdeb2d5bf8c7877eb1e92cda65f6c844a93642
add models.
contentpacks/models.py
contentpacks/models.py
Python
0
@@ -0,0 +1,1114 @@ +from peewee import Model, SqliteDatabase, CharField, TextField, BooleanField,%5C%0A ForeignKeyField, PrimaryKeyField, Using, IntegerField, %5C%0A OperationalError%0A%0A%0Aclass Item(Model):%0A title = CharField()%0A description = TextField()%0A available = BooleanField()%0A files_c...
d72f9f06afcf5d1c177afa418a7c4bf60af8fb75
Support mm:ss.
since.py
since.py
Python
0
@@ -0,0 +1,602 @@ +#!/usr/bin/env python3%0A%0Aimport datetime%0Aimport re%0Aimport sys%0A%0A%0Adef main(strTime):%0A now = datetime.datetime.now()%0A pattern = r'(%5Cd%5Cd):(%5Cd%5Cd)'%0A match = re.match(pattern, strTime)%0A time = datetime.datetime(%0A now.year,%0A now.month,%0A now....
6a364f620f73a3bff2b2cc11113778d75202f37f
fix bug with putting the unknown users doc to ES
corehq/pillows/user.py
corehq/pillows/user.py
from corehq.apps.groups.models import Group from corehq.apps.users.models import CommCareUser, CouchUser from corehq.apps.users.util import WEIRD_USER_IDS from corehq.elastic import es_query, ES_URLS, stream_es_query, get_es from corehq.pillows.mappings.user_mapping import USER_MAPPING, USER_INDEX from couchforms.model...
Python
0
@@ -5579,62 +5579,8 @@ d):%0A - print %22adding unknown user: %25s%22 %25 user_id%0A @@ -5929,36 +5929,27 @@ er_id, data= -%7B%22 doc -%22: doc%7D )%0A%0A def c
38a5b5a74ec68027b30560c5a8c1087e5b49d5e6
criada query tira_lote para deendereçar lote
src/cd/queries/lote.py
src/cd/queries/lote.py
Python
0.999826
@@ -0,0 +1,319 @@ +from pprint import pprint%0A%0Afrom utils.functions.queries import debug_cursor_execute%0A%0A%0Adef tira_lote(cursor, lote):%0A sql = f%22%22%22%0A DELETE FROM SYSTEXTIL.ENDR_014%0A WHERE ORDEM_CONFECCAO = '%7Blote%7D'%0A %22%22%22%0A try:%0A debug_cursor_execute(cursor,...
1d25676049994db266129b1a1c98cec3acbba0ca
Add missing file on last merge
goodtablesio/models/subscription.py
goodtablesio/models/subscription.py
Python
0.000001
@@ -0,0 +1,813 @@ +import logging%0Aimport datetime%0A%0Afrom sqlalchemy import (%0A Column, Unicode, DateTime, Boolean, ForeignKey)%0Afrom sqlalchemy.orm import relationship%0A%0Afrom goodtablesio.models.base import Base, BaseModelMixin, make_uuid%0A%0A%0Alog = logging.getLogger(__name__)%0A%0A%0Aclass Subscription...
9b0278530c2c4f32dd2a751fb4f8b93c8c34a3ea
add arch tool for waf backend.
bento/backends/waf_tools/arch.py
bento/backends/waf_tools/arch.py
Python
0
@@ -0,0 +1,2364 @@ +import re%0A%0Afrom waflib.Tools.c_config import SNIP_EMPTY_PROGRAM%0Afrom waflib.Configure import conf%0A%0AARCHS = %5B%22i386%22, %22x86_64%22, %22ppc%22, %22ppc64%22%5D%0A%0AFILE_MACHO_RE = re.compile(%22Mach-O.*object (%5Ba-zA-Z_0-9%5D+)%22)%0A%0A@conf%0Adef check_cc_arch(conf):%0A env = conf...
856f855e10588ddbe2ad5053cc5d7366c76459a8
Implement basic perception
percept/perceptron.py
percept/perceptron.py
Python
0.000149
@@ -0,0 +1,1306 @@ +import random%0A%0A%0Adef rand_w():%0A '''%0A Generate a random weight.%0A '''%0A return round(random.uniform(-1, 1), 3)%0A%0A%0Aclass Perceptron:%0A def __init__(%0A self, w0=rand_w(), w1=rand_w(), w2=rand_w(), learning_rate=0.1):%0A self.w0, self.w1, self.w2 = w0, w1, ...
e5f82b794ee2e6054deb15433c7dc7261146f181
Add merge migration
osf/migrations/0112_merge_20180614_1454.py
osf/migrations/0112_merge_20180614_1454.py
Python
0.000001
@@ -0,0 +1,332 @@ +# -*- coding: utf-8 -*-%0A# Generated by Django 1.11.13 on 2018-06-14 19:54%0Afrom __future__ import unicode_literals%0A%0Afrom django.db import migrations%0A%0A%0Aclass Migration(migrations.Migration):%0A%0A dependencies = %5B%0A ('osf', '0107_merge_20180604_1232'),%0A ('osf', '0111...
5f051f2ae1b105d6cc58d1cac760cb5d20908c3b
Support rudimentary translation service from IIT Bombay via web API.
valai/translate.py
valai/translate.py
Python
0.000607
@@ -0,0 +1,880 @@ +# * coding: utf8 *%0A#%0A# (C) 2020 Muthiah Annamalai %3Cezhillang@gmail.com%3E%0A#%0A# Uses the IIT-Bombay service on the web.%0A#%0A%0Aimport json%0Aimport requests%0Afrom urllib.parse import quote%0Afrom functools import lru_cache%0A%0A%0A@lru_cache(1024,str)%0Adef en2ta(text):%0A %22%22%22tra...
25056e74093f01d68af14277da6089903b617ee6
Create Career.py
Career.py
Career.py
Python
0
@@ -0,0 +1,379 @@ +class Career:%0A def __init__(career_name, advances, skills_to_take, talents_to_take, career_trappings, race_dependent)%0A self.career_name = career_name%0A self.advances = advances%0A self.skills_to_take = skills_to_take%0A self.talents_to_take = talents_to_take%0A ...
64ab32daba1ddbe7e8b56850188dab3f8ca42286
Add TCP check
sauna/plugins/ext/tcp.py
sauna/plugins/ext/tcp.py
Python
0.000001
@@ -0,0 +1,821 @@ +import socket%0A%0Afrom sauna.plugins import (Plugin, PluginRegister)%0A%0Amy_plugin = PluginRegister('TCP')%0A%0A%0A@my_plugin.plugin()%0Aclass Tcp(Plugin):%0A%0A @my_plugin.check()%0A def request(self, check_config):%0A try:%0A with socket.create_connection((check_config%5B'...
d95ce2570989e1b18c313efb1f95f611a9a2cc80
add color_histogram_matcher for objects
jsk_2015_05_baxter_apc/node_scripts/color_histogram_matcher.py
jsk_2015_05_baxter_apc/node_scripts/color_histogram_matcher.py
Python
0.000009
@@ -0,0 +1,2986 @@ +#!/usr/bin/env python%0A# -*- coding: utf-8 -*-%0A#%0Afrom __future__ import division%0Aimport rospy%0Aimport cv2%0Aimport numpy as np%0A%0Afrom sensor_msgs.msg import Image%0Afrom jsk_2014_picking_challenge.srv import ObjectMatch, ObjectMatchResponse%0Afrom jsk_recognition_msgs.msg import ColorHist...
74197adab35815bc1168f661d6f5cf5c829afc99
Add example
example/serialize.py
example/serialize.py
Python
0.000003
@@ -0,0 +1,306 @@ +from pykt import KyotoTycoon, set_serializer, set_deserializer%0Afrom cPickle import dumps, loads%0A%0Aset_serializer(dumps)%0Aset_deserializer(loads)%0A%0Akey = %22A%22 * 12%0Aval = %22B%22 * 1024 %0A%0Ad = dict(name=%22John%22, no=1)%0A%0Adb = KyotoTycoon()%0Adb.open()%0Aprint db.set(key, d)%0Aret...
9c0a74194e6546eac6dbaec000599a623d525909
Create drivers.py
chips/digital/pca9698/drivers.py
chips/digital/pca9698/drivers.py
Python
0.000001
@@ -0,0 +1,37 @@ +%0A%0ADRIVERS%5B%22pca9698%22 %5D = %5B%22PCA9698%22%5D%0A%0A
d6492629e3c837374082cac71034a7bad36291bc
Test of commit
Parser.py
Parser.py
Python
0
@@ -0,0 +1,34 @@ +if __name__ == '__main__':%0A main()
bef69c38103e8ef937fea41a0a58c934b34f4281
add yaml syntax checker script
bosi/rhosp_resources/yamls/yaml_syntax_check.py
bosi/rhosp_resources/yamls/yaml_syntax_check.py
Python
0.000003
@@ -0,0 +1,1411 @@ +#!/usr/bin/env python%0A%0Aimport os%0Aimport sys%0Aimport yaml%0A%0AEXIT_ERROR = -1%0AYAML_FILE_EXT = %22.yaml%22%0A%0A%0Adef help():%0A %22%22%22 Print how to use the script %22%22%22%0A print %22Usage: %25s %3Cdirectory%3E%22 %25 sys.argv%5B0%5D%0A%0A%0Adef check_yaml_syntax(f):%0A %22%2...
f09c45cde66dd8da07511e1105af14ffd41799b0
add a command to trigger a bulk sync
crate_project/apps/crate/management/commands/trigger_bulk_sync.py
crate_project/apps/crate/management/commands/trigger_bulk_sync.py
Python
0.000001
@@ -0,0 +1,240 @@ +from django.core.management.base import BaseCommand%0A%0Afrom pypi.tasks import bulk_synchronize%0A%0A%0Aclass Command(BaseCommand):%0A%0A def handle(self, *args, **options):%0A bulk_synchronize.delay()%0A print %22Bulk Synchronize Triggered%22%0A
27ed68923579c5afff0c70b025deb8b73d448aa8
Set calculation type of all indicators to Number
indicators/migrations/0013_set_all_calculation_type_to_numeric.py
indicators/migrations/0013_set_all_calculation_type_to_numeric.py
Python
0.000003
@@ -0,0 +1,515 @@ +# -*- coding: utf-8 -*-%0A# Generated by Django 1.11.3 on 2018-07-04 09:56%0Afrom __future__ import unicode_literals%0A%0Afrom django.db import migrations%0Afrom ..models import Indicator%0A%0A%0Adef set_calculation_type(apps, schema_editor):%0A Indicator.objects.all().update(%0A calculatio...
834516acf7b5cfbbb0f728f8b725bea120b5f5b3
Add python version of the post-receive hook
post_receive.py
post_receive.py
Python
0.000001
@@ -0,0 +1,1303 @@ +import re%0Aimport os%0Aimport sys%0Aimport os%0Aimport json%0Afrom subprocess import Popen, PIPE%0Afrom httplib2 import Http%0A%0ApostURL = %22http://localhost:2069/json%22%0A%0Apwd = os.getcwd()%0Aif len(sys.argv) %3C= 3:%0A print(%22Usage: post-receive %5Bold%5D %5Bnew%5D %5Bref%5D%22)%0A e...
6e28da4e1a1d8ad794f12d9782b0e2dd54119dc4
add mysql module
db_mysql_module.py
db_mysql_module.py
Python
0.000001
@@ -0,0 +1,2471 @@ +__author__ = 'root'%0Aimport pymysql;%0Aimport sqlalchemy;%0Aimport threading;%0Afrom time import clock;%0Aclass SQLiteWraper(object):%0A def __init__(self):%0A # self.lock = threading.RLock()%0A self.engine = sqlalchemy.create_engine('mysql+pymysql://developer:developer@172.28.217....
11d0d641adf32a7e976bf9df8c4dc9ba19bba3b4
Binary graph algorithms to find height of binary tree and to check whether the given binary tree is full binary or not
binary_tree/basic_binary_tree.py
binary_tree/basic_binary_tree.py
Python
0.996305
@@ -0,0 +1,1130 @@ +class Node:%0A def __init__(self, data):%0A self.data = data%0A self.left = None%0A self.right = None%0A%0A%0Adef depth_of_tree(tree):%0A if tree is None:%0A return 0%0A else:%0A depth_l_tree = depth_of_tree(tree.left)%0A depth_r_tree = depth_of_tre...
35748678aaea24355d5207ae26d10dd455a47820
implement HostTestsSuite
src/test/hosttestssuite.py
src/test/hosttestssuite.py
Python
0
@@ -0,0 +1,1144 @@ +%0Afrom src.test.abstractovirttestssuite import AbstractOvirtTestsSuite%0Afrom ovirtsdk.xml import params%0Afrom src.infrastructure.annotations import conflicts%0Afrom src.resource.hostresourcemanager import HostResourceManager%0A%0A%0Aclass HostTestsSuite(AbstractOvirtTestsSuite):%0A%0A __hostRe...
cef6f559f20d8aace00cbed8621b16339aa6e0c6
hello world, first problem in python
problems/1/1.py
problems/1/1.py
Python
0.999367
@@ -0,0 +1,888 @@ +# coding: utf-8%0A%0A%22%22%22%0ATo run:%0A python2.7 1.py%0A%0AProblem:%0A If we list all the natural numbers below 10 that are multiples of 3 or 5,%0A we get 3, 5, 6 and 9. The sum of these multiples is 23.%0A%0A Find the sum of all the multiples of 3 or 5 below 1000.%0A%22%22%22%0A%0Ai...
264f4a827e39d55259aaa53bde967dae6befc606
Complete Programming Experience: polysum
pset2/grader.py
pset2/grader.py
Python
0
@@ -0,0 +1,770 @@ +# Grader%0A# 10.0 points possible (ungraded)%0A# A regular polygon has n number of sides. Each side has length s.%0A%0A# The area of a regular polygon is: 0.25%E2%88%97n%E2%88%97s2tan(%CF%80/n)%0A# The perimeter of a polygon is: length of the boundary of the polygon%0A# Write a function called polysu...
e8170b2f446f23771bd746747493bebbd0dc9288
add velocity filter
nodes/velocity_filter.py
nodes/velocity_filter.py
Python
0.000001
@@ -0,0 +1,2807 @@ +#! /usr/bin/env python%0A%0Aimport rospy%0Aimport roslib%0Aroslib.load_manifest(%22otl_diff_drive%22)%0A%0Afrom otl_diff_drive import twist_velocities%0A%0Afrom geometry_msgs.msg import Twist%0A%0Adef isStopVelocity(twist):%0A VERY_SMALL = 0.0001%0A return abs(twist.linear.x) %3C VERY_SMALL an...
18ed0900c22fa2ed646f08adf66e1917a6a04b43
add collect_impression
amimoto_alexa/collect_message.py
amimoto_alexa/collect_message.py
Python
0.000002
@@ -0,0 +1,715 @@ +#!/usr/bin/env python%0A# -*- coding: utf-8 -*-%0A%22%22%22%0A for amimoto_alexa%0A%22%22%22%0A%0A%0Aimport lamvery%0Afrom helpers import *%0Afrom debugger import *%0A%0A%0Adef collect_impression(intent, session):%0A %22%22%22Collect impression and finalize session%0A %22%22%22%0A session_at...
aec48fe807e4589344a9f04e13b8f0b651110917
add package installer.
python/setup.py
python/setup.py
Python
0
@@ -0,0 +1,341 @@ +from setuptools import setup%0A%0Aimport epidb_client%0Aversion = epidb_client.__version__%0A%0Asetup(%0A name = %22epidb-client%22,%0A version = version,%0A url = 'http://www.epiwork.eu/',%0A description = 'EPIWork Database - Client Code',%0A author = 'Fajran Iman Rusadi',%0A packa...
437431289b25418c5acd9890b86350aa62ae0668
add updated script with changes from @fransua
transposon_annotation/transposon_annotation_ecolopy_scripts/ecolopy.py
transposon_annotation/transposon_annotation_ecolopy_scripts/ecolopy.py
Python
0
@@ -0,0 +1,2373 @@ +import matplotlib %0Amatplotlib.use('Agg') %0Afrom ecolopy_dev import Community%0Afrom ecolopy_dev.utils import draw_shannon_distrib%0A%0Acom = Community('test_log_abund.txt')%0Aprint com%0A%0Acom.fit_model('ewens')%0Acom.set_current_model('ewens')%0Aewens_model = com.get_model('ewens')%0Aprint ...
c7c3ab0a4013df99b928351040f1156b07ba6767
Add some tests for the tokens
tests/unit/utils/test_tokens.py
tests/unit/utils/test_tokens.py
Python
0.000001
@@ -0,0 +1,1627 @@ +from flask import current_app%0Afrom itsdangerous import TimedJSONWebSignatureSerializer%0Afrom flaskbb.utils.tokens import make_token, get_token_status%0A%0A%0Adef test_make_token(user):%0A token = make_token(user, %22test%22)%0A s = TimedJSONWebSignatureSerializer(current_app.config%5B'SECRE...
0848197b3c9ff8d09575b85b5e3a2ca1aac6f6c5
Put split and merge in own module too
app/drivers/pycolator/splitmerge.py
app/drivers/pycolator/splitmerge.py
Python
0
@@ -0,0 +1,2394 @@ +from app.drivers.basedrivers import PycolatorDriver%0Afrom app.preparation import pycolator as preparation%0Afrom app.readers import pycolator as readers%0A%0A%0Aclass SplitDriver(PycolatorDriver):%0A def __init__(self, **kwargs):%0A super(SplitDriver, self).__init__(**kwargs)%0A se...
4bf5d21402d5394f36eec006fd3ba03354bb8523
Add dashboard url route
dashboard/urls.py
dashboard/urls.py
Python
0.000001
@@ -0,0 +1,281 @@ +from django.conf.urls import patterns, url%0Afrom dashboard import views%0A%0Aurlpatterns = patterns('dashboard.views',%0A url(r'%5E$', views.dashboard, name = 'dashboard'),%0A url(r'%5Elogin/$', views.enter_gate, name = 'login'),%0A url(r'%5Elogout/$', views.exit_gate, name = 'logout'),%0A)...
5dd9cc55368e9f5bd8c79f74f3c7c1fc84a6bd8b
Add common migration (unrelated to branch)
common/migrations/0010_auto_20200529_0514.py
common/migrations/0010_auto_20200529_0514.py
Python
0
@@ -0,0 +1,421 @@ +# Generated by Django 2.2.12 on 2020-05-29 05:14%0A%0Afrom django.db import migrations, models%0A%0A%0Aclass Migration(migrations.Migration):%0A%0A dependencies = %5B%0A ('common', '0009_upload_hosting'),%0A %5D%0A%0A operations = %5B%0A migrations.AlterField(%0A mod...
f53488e3c797afb4f47f005e078d53a3bea14715
add solution for Combination Sum III
algorithms/combinationSumIII/combinationSumIII.py
algorithms/combinationSumIII/combinationSumIII.py
Python
0.000007
@@ -0,0 +1,323 @@ +class Solution:%0A # @param %7Binteger%7D k%0A # @param %7Binteger%7D n%0A # @return %7Binteger%5B%5D%5B%5D%7D%0A%0A def combinationSum3(self, k, n):%0A return %5Barr for arr in (%5Bj+1 for j in xrange(10) if i & (1 %3C%3C j)%5D%0A for i in xrange(1, ...
fedb80cf8ee5859e1d8f5caccc7a67ae979e743e
Remove unnecessary grit_out_dir variable from component_strings.gyp.
components/component_strings.gyp
components/component_strings.gyp
# 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. { 'variables': { 'grit_out_dir': '<(SHARED_INTERMEDIATE_DIR)/components', }, 'targets': [ { 'target_name': 'component_strings', ...
Python
0.000166
@@ -166,91 +166,8 @@ %0A%0A%7B%0A - 'variables': %7B%0A 'grit_out_dir': '%3C(SHARED_INTERMEDIATE_DIR)/components',%0A %7D,%0A 't
6307a8a813062b3faad6b0f393d1886d4ad9bed8
add initial date for committees
application/migrations/0019_auto_20150316_2009.py
application/migrations/0019_auto_20150316_2009.py
Python
0.000011
@@ -0,0 +1,713 @@ +# -*- coding: utf-8 -*-%0Afrom __future__ import unicode_literals%0A%0Afrom django.db import models, migrations%0Afrom application.models import Committee%0A%0Adef add_committees(apps, schema_editor):%0A committees = %5B%0A 'Fundraising and Social Action',%0A 'Membership',%0A ...
fa0afad07f34f350233ae2a4f1654faef9bc1814
Add a python version for the phonebook benchmark
utils/benchmark/Strings/PySort.py
utils/benchmark/Strings/PySort.py
Python
0.000001
@@ -0,0 +1,1595 @@ +%0Awords=%5B%0A u%22James%22, u%22John%22, u%22Robert%22, u%22Michael%22, u%22William%22, u%22David%22, u%22Richard%22, u%22Joseph%22,%0A u%22Charles%22, u%22Thomas%22, u%22Christopher%22, u%22Daniel%22, u%22Matthew%22, u%22Donald%22, u%22Anthony%22,%0A u%22Paul%22, u%22Mark%22, u%22George%22, u%22S...
5c063b06a35fef646a45b52f0d414c818b1d0993
Remove the dependency to dbus-glib from device.gyp.
device/device.gyp
device/device.gyp
# 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. { 'variables': { }, 'targets': [ { 'target_name': 'device_bluetooth', 'type': '<(library)', 'dependencies': [ '../c...
Python
0.000064
@@ -1866,37 +1866,32 @@ /system.gyp:dbus --glib ',%0A ' @@ -3579,13 +3579,8 @@ dbus --glib ',%0A
6b76a0dc048e91137d432c697ebc8865b968a793
fix tests to be compatible with timestamp-based export checkpoints
corehq/apps/reports/tests/test_export_api.py
corehq/apps/reports/tests/test_export_api.py
from django.test.client import Client from django.test import TestCase from receiver.util import spoof_submission import uuid from corehq.apps.receiverwrapper.util import get_submit_url from corehq.apps.domain.shortcuts import create_domain from django.core.urlresolvers import reverse from corehq.apps.users.models impo...
Python
0
@@ -418,16 +418,28 @@ guration +%0Aimport time %0A%0AFORM_T @@ -2344,32 +2344,134 @@ submit_form() +%0A%0A # now that this is time based we have to sleep first. this is annoying%0A time.sleep(2) %0A resp = @@ -2852,32 +2852,24 @@ tatus_code)%0A - %0A sub @@ -2871,32 +2871,5...
22e3933f6a9ff6c424d1a1f6d225f32c234359c5
add leetcode Pascal's Triangle II
leetcode/PascalTriangleII/solution.py
leetcode/PascalTriangleII/solution.py
Python
0.001927
@@ -0,0 +1,437 @@ +# -*- coding:utf-8 -*-%0Aclass Solution:%0A # @return a list of integers%0A def getRow(self, rowIndex):%0A if rowIndex == 0:%0A return %5B1%5D%0A ret = %5B1%5D%0A begin = 1%0A while rowIndex %3E 0:%0A ret.append(ret%5B-1%5D * rowIndex / begin)%0...