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
0135ce760bb3bf8f2fd828fdb195bcdc4e4c3117
Add sample.py
sample.py
sample.py
Python
0.000001
@@ -0,0 +1,777 @@ +from traitscli import TraitsCLIBase%0Afrom traits.api import Bool, Float, Int, Str, Enum, Event%0A%0A%0Aclass SampleCLI(TraitsCLIBase):%0A%0A %22%22%22Sample CLI using %60traitscli%60.%22%22%22%0A%0A not_configurable_from_cli = Bool%0A yes = Bool(config=True)%0A fnum = Float(config=True)%...
1706531082d75f7d6522b4f7d409df8d4fb2b3d7
Create __init__.py
plantcv/plantcv/visualize/eCDF/__init__.py
plantcv/plantcv/visualize/eCDF/__init__.py
Python
0.000429
@@ -0,0 +1,84 @@ +from plantcv.plantcv.visualize.eCDF.obj_size import obj_size%0A__all__ = %5B%22obj_size%22%5D%0A
eb0163fe87454d634cb5ff34f6dbdded9181003b
Add Šteins as a valid globe due to usage on Wikidata
pywikibot/families/wikidata_family.py
pywikibot/families/wikidata_family.py
# -*- coding: utf-8 -*- """Family module for Wikidata.""" # # (C) Pywikibot team, 2012-2016 # # Distributed under the terms of the MIT license. # from __future__ import absolute_import, unicode_literals __version__ = '$Id$' from pywikibot import config from pywikibot import family # The Wikidata family class Famil...
Python
0.000002
@@ -2907,24 +2907,88 @@ ty/Q15050',%0A + 'steins': 'http://www.wikidata.org/entity/Q150249',%0A
4d4120d6982a02a01b8dd2a4853eab47d7fe6f83
Create tests.py
polls/tests.py
polls/tests.py
Python
0.000001
@@ -0,0 +1,1320 @@ +import datetime%0A%0Afrom django.utils import timezone%0Afrom django.test import TestCase%0A%0Afrom .models import Question%0A%0A# Create your tests here.%0Aclass QuestionMethodTests(TestCase):%0A%0A def test_was_published_recently_with_future_question(self):%0A %22%22%22%0A was_pub...
15aa7efa3dfdade3001cdb6b5ac4c2f3c5cc2461
Test Commit
raspberry/asip/RelationSemanticTag.py
raspberry/asip/RelationSemanticTag.py
Python
0.000001
@@ -0,0 +1,32 @@ +from SemanticTag import *%0A%0A#Test
95c34b9ad7ca6c425853642353a2d56282cc94d1
add script
plugins/Scripts/Plugins/Convert_To_8bit.py
plugins/Scripts/Plugins/Convert_To_8bit.py
Python
0.000001
@@ -0,0 +1,434 @@ +# @DatasetIOService ds%0A# @ConvertService convert%0A# @UIService ui%0A%0Aimport os%0Afrom ij import IJ%0Afrom ij import ImagePlus%0A%0Ad = %22/home/hadim/Insync/Data/Microscopy/PSF/2016.04.12.T1/raw%22%0Afiles = os.listdir(d)%0A%0Afor fname in files:%0A fpath = os.path.join(d, fname)%0A print(...
0b058198539195b5520687c744b5cd1eebae3d18
predict all files in dir
predict_dir.py
predict_dir.py
Python
0.998316
@@ -0,0 +1,725 @@ +import argparse%0Aimport os%0A%0Afrom predict import main%0A%0A%0Adef run_dir(in_path, out_path):%0A for item in os.listdir(in_path):%0A if item.endswith('.wav'):%0A out_file_path = out_path + item.replace('.wav', '.TextGrid')%0A main(in_path + item, out_file_path)%0A%...
8cdbda5c0694f4137c1b8a92bafd7f33a6a84d78
solve pep_751
pe-solution/src/main/python/pep_751.py
pe-solution/src/main/python/pep_751.py
Python
0.999969
@@ -0,0 +1,822 @@ +from typing import Tuple%0Afrom decimal import Decimal, ROUND_FLOOR%0A%0A%0Adef b_a(b: Decimal) -%3E Tuple%5BDecimal, Decimal%5D:%0A a = b.to_integral_exact(ROUND_FLOOR)%0A b = a * (b %25 1 + 1)%0A return a, b%0A%0A%0Adef th_tau(th: Decimal, n: int) -%3E Decimal:%0A a1, b = b_a(th)%0A%0A ...
0428d4889b34568a5b5397532dfd0091029b64de
Create problem-10.py
problem-10.py
problem-10.py
Python
0.00049
@@ -0,0 +1,427 @@ +import math%0A%0Adef is_prime(next):%0A if n == 2:%0A return True%0A if n == 3:%0A return True%0A if n %25 2 == 0:%0A return False%0A if n %25 3 == 0:%0A return False%0A%0A i = 5%0A w = 2%0A%0A while math.pow(i, 2) %3C= n:%0A if n %25 i == 0:%0A...
4fe4cad49367b462c2201b98cce4382bff3a0206
Add a script which use the iterative parsing to process the map file and find out not only what tags are there, but also how many, to get the feeling on how much of which data you can expect to have in the map.
DataWrangling/CaseStudy/mapparser.py
DataWrangling/CaseStudy/mapparser.py
Python
0
@@ -0,0 +1,1192 @@ +#!/usr/bin/env python%0A# -*- coding: utf-8 -*-%0A%22%22%22%0AYour task is to use the iterative parsing to process the map file and%0Afind out not only what tags are there, but also how many, to get the%0Afeeling on how much of which data you can expect to have in the map.%0AFill out the count_tags ...
3d18f6e3ba3519422aa30bd25f3511f62361d5ca
Add test to ensure no mutable default arguments
tests/chainer_tests/test_chainer_objects.py
tests/chainer_tests/test_chainer_objects.py
Python
0
@@ -0,0 +1,2732 @@ +import importlib%0Aimport inspect%0Aimport pkgutil%0Aimport types%0A%0Aimport six%0Aimport unittest%0A%0Aimport chainer%0Afrom chainer import testing%0A%0A%0Adef walk_modules():%0A root = chainer.__path__%0A for loader, modname, ispkg in pkgutil.walk_packages(root, 'chainer.'):%0A # Ski...
fcb07c7cd94f96cd533c55d18a657673f9eeac7f
Move log related functions over to this file
SpicyTwitch/Log_tools.py
SpicyTwitch/Log_tools.py
Python
0
@@ -0,0 +1,1452 @@ +# Imports-----------------------------------------------------------------------%0Aimport logging%0Aimport os%0Afrom inspect import stack, getmodulename%0Afrom . import Storage%0A%0A%0A# Base setup--------------------------------------------------------------------%0Alog_to_stdout = True%0Alog_to_fi...
7ec36d0a1d0a757d0c914e4857ae06f4fece88f8
Add HexTerrain
problem/pop_map/hexagon/hex_terrain.py
problem/pop_map/hexagon/hex_terrain.py
Python
0.000012
@@ -0,0 +1,2123 @@ +#! /usr/bin/env python%0A%0A# Copyright 2020 John Hanley.%0A#%0A# Permission is hereby granted, free of charge, to any person obtaining a%0A# copy of this software and associated documentation files (the %22Software%22),%0A# to deal in the Software without restriction, including without limitation%0...
4061e5db7097a680405282e371ab3bf07758648a
Add simple unit tests to validate all configs
projects/DensePose/tests/test_setup.py
projects/DensePose/tests/test_setup.py
Python
0.000001
@@ -0,0 +1,1727 @@ +# Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.%0A%0Aimport os%0Aimport unittest%0A%0Afrom detectron2.config import get_cfg%0Afrom detectron2.engine import default_setup%0A%0Afrom densepose import add_densepose_config%0A%0A_CONFIG_DIR = %22configs%22%0A_QUICK_SCHEDULES_CONFIG...
d1bc6c3fd5741c5c8d3d6dd2ee5c5c28c2764ba3
add Tumblr.py
TumblrResource/Tumblr.py
TumblrResource/Tumblr.py
Python
0
@@ -0,0 +1,37 @@ +#!/usr/bin/env python%0A# coding:utf-8%0A
30bb73da2b75b5cfcaadf743762bccb119b2c147
First challenge converted to Python 3
set1/ch1/hextob64.py
set1/ch1/hextob64.py
Python
0.999736
@@ -0,0 +1,679 @@ +#!/usr/bin/python3%0A%0A%22%22%22%0A The string:%0A%0A49276d206b696c6c696e6720796f757220627261696e206c696b65206120706f69736f6e6f7573206d757368726f6f6d%0A%0AShould produce:%0A%0ASSdtIGtpbGxpbmcgeW91ciBicmFpbiBsaWtlIGEgcG9pc29ub3VzIG11c2hyb29t%0A%22%22%22%0A%0Aimport argparse%0Aimport base64%0Aimport s...
3129819c7d2ff3b35dd0270c0a27ef694a7e4d9e
Add regularizers.py
seya/regularizers.py
seya/regularizers.py
Python
0
@@ -0,0 +1,815 @@ +from keras.regularizers import Regularizer%0A%0A%0Aclass GaussianKL(Regularizer):%0A def set_param(self, p):%0A self.p = p%0A%0A def set_layer(self, layer):%0A self.layer = layer%0A%0A def __call__(self, loss):%0A # See Variational Auto-Encoding Bayes by Kingma and Welli...
0a47253307d427c6e668d7cdf3bdf186dfc93858
Fix the ConsolesController class doc string
nova/api/openstack/compute/contrib/consoles.py
nova/api/openstack/compute/contrib/consoles.py
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2012 OpenStack Foundation # # 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-...
Python
0.996907
@@ -1205,35 +1205,61 @@ %22%22%22Get -text console output +vnc connection information to access a server .%22%22%22%0A @@ -2186,27 +2186,55 @@ Get -text console output +spice connection information to access a server .%22%22%22
bdb75567519914386da7f1d598c6c7aaf96d8e02
Add sql solution for 561. Array Partition I
py/array-partition-i.py
py/array-partition-i.py
Python
0.999996
@@ -0,0 +1,170 @@ +class Solution(object):%0A def arrayPairSum(self, nums):%0A %22%22%22%0A :type nums: List%5Bint%5D%0A :rtype: int%0A %22%22%22%0A return sum(sorted(nums)%5B::2%5D)%0A
7275a50343cba5073dc2fa77e2e964daec002c38
move refactored OttTestCase to utils
ott/utils/tests/ott_test_case.py
ott/utils/tests/ott_test_case.py
Python
0.000001
@@ -0,0 +1,2121 @@ +import os%0Aimport sys%0Aimport unittest%0Aimport urllib%0Aimport contextlib%0A%0Afrom ott.utils import config_util%0Afrom ott.utils import file_utils%0A%0A%0Aclass OttTestCase(unittest.TestCase):%0A domain = %22localhost%22%0A port = %2233333%22%0A path = None%0A url_file = None%0A%0A ...
e07c699caf699852c98b3396150b343553a386c4
Add tests for language api
server/tests/api/test_language_api.py
server/tests/api/test_language_api.py
Python
0
@@ -0,0 +1,2275 @@ +import json%0Afrom server.tests.helpers import FlaskTestCase, fixtures%0A%0A%0Aclass TestLanguageAPI(FlaskTestCase):%0A%0A @fixtures('base.json')%0A def test_get_empty_languages(self):%0A %22%22%22Test GET /api/languages endpoint with no data%22%22%22%0A response, data = self.api...
6e736a48f8c49b8257305125742d89cb7f729fbc
index Ansible source versions
shotglass/make_ver_ansible.py
shotglass/make_ver_ansible.py
Python
0
@@ -0,0 +1,783 @@ +#!/usr/bin/env python%0A%0A'''%0Amake_versions -- index many versions of a project%0A%0AALPHA code, will need modification for general use.%0A'''%0A%0Aimport re%0Aimport subprocess%0Aimport sys%0A%0Aimport git%0A%0A%0ANAME = 'ansible'%0A%0Abad_tag_re = re.compile(r'(rc%7Cbeta%7Calpha)')%0Arepos = git...
24e6a8a21ef61edbe00e6af8a1aea274394a23ed
Add a snippet (python/pygtk).
python/pygtk/minimal.py
python/pygtk/minimal.py
Python
0.000036
@@ -0,0 +1,1361 @@ +#!/usr/bin/env python%0A# -*- coding: utf-8 -*-%0A%0A# Copyright (c) 2012 J%C3%A9r%C3%A9mie DECOCK (http://www.jdhp.org)%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 th...
08e4f449f0e871f996e9a265fd23a967a0377078
Add bfx example
quant/example/ex_bfx.py
quant/example/ex_bfx.py
Python
0
@@ -0,0 +1,601 @@ +#!/usr/bin/env python%0A# -*- coding: UTF-8 -*-%0Aimport time%0A%0Afrom quant import config%0Afrom quant.api.bitfinex import PrivateClient%0A%0Aclient = PrivateClient(key=config.Bitfinex_SUB_API_KEY, secret=config.Bitfinex_SUB_SECRET_TOKEN)%0A# client = PrivateClient(key=config.Bitfinex_API_KEY, secr...
800639fe381ec502e54a3fbd95241b460bd3e3c3
add tests for shannon.py
dit/algorithms/tests/test_shannon.py
dit/algorithms/tests/test_shannon.py
Python
0
@@ -0,0 +1,1417 @@ +from __future__ import division%0A%0Afrom nose.tools import *%0A%0Afrom dit import Distribution as D, ScalarDistribution as SD%0Afrom dit.algorithms import (entropy as H,%0A mutual_information as I,%0A conditional_entropy as CH)%0A%0Adef test_H1(...
8c1353537d0920d8137d5ea9d22843da67e41d9a
Add string_format pylint plugin.
test/sanity/pylint/plugins/string_format.py
test/sanity/pylint/plugins/string_format.py
Python
0
@@ -0,0 +1,2998 @@ +# (c) 2018, Matt Martz %3Cmatt@sivel.net%3E%0A# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)%0A# -*- coding: utf-8 -*-%0Afrom __future__ import (absolute_import, division, print_function)%0A__metaclass__ = type%0A%0Aimport sys%0A%0Aimport six%0A%0Aimport...
d6d21f6e7b8d2a44ff3406ddc9a050cc17372da8
Add analyze_nir_intensity tests module
tests/plantcv/test_analyze_nir_intensity.py
tests/plantcv/test_analyze_nir_intensity.py
Python
0.000001
@@ -0,0 +1,844 @@ +import cv2%0Aimport numpy as np%0Afrom plantcv.plantcv import analyze_nir_intensity, outputs%0A%0A%0Adef test_analyze_nir(test_data):%0A # Clear previous outputs%0A outputs.clear()%0A # Read in test data%0A img = cv2.imread(test_data.small_gray_img, -1)%0A mask = cv2.imread(test_data.s...
a9e387880dc8826bbe77decee7930d09b42ad59a
add private db uuid.
openerp/addons/base/ir/ir_config_parameter.py
openerp/addons/base/ir/ir_config_parameter.py
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2011 OpenERP SA (<http://www.openerp.com>). # # This program is free software: you can redistribute it and/or modify # it under the terms of the...
Python
0
@@ -1298,24 +1298,110 @@ ameters = %7B%0A + %22database.uuid.private%22: lambda: (str(uuid.uuid1()), %5B'base.group_erp_manager'%5D),%0A %22databas
9790fb109d59214ee016750307cd39b2f2780cf7
solve increment counter
algo/incrementcounter.py
algo/incrementcounter.py
Python
0.000124
@@ -0,0 +1,1003 @@ +from datetime import datetime, timedelta%0Afrom time import sleep%0A%0Asecond = timedelta(seconds=1)%0Aday = timedelta(days=1)%0A%0Aclass Increment:%0A def __init__(self):%0A self.last_second_count = 0%0A self.last_day_count = 0%0A self.seconds_now = datetime.now()%0A ...
aa2b788c4d0b148ed9881da86de97965311b9cb4
Add server.py
server.py
server.py
Python
0.000001
@@ -0,0 +1,506 @@ +import socket, sys%0Aimport datetime%0Aimport time, random%0ATCP_IP = '72.36.65.116'%0ATCP_PORT = 5005%0ABUFFER_SIZE = 1024%0A%0Aif len(sys.argv) %3C 2:%0A print (%22Enter the server id%22)%0A sys.exit(1)%0A%0Awhile True:%0A v = random.randint(1, 10)%0A ts = time.time()%0A MESSAGE = str(v) + %22;%...
287c659ad35f5036ba2687caf73009ef455c7239
update example
examples/plot_otda_linear_mapping.py
examples/plot_otda_linear_mapping.py
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Tue Mar 20 14:31:15 2018 @author: rflamary """ import numpy as np import pylab as pl import ot from scipy import ndimage ############################################################################## # Generate data # ------------- n = 1000 d = 2 sigma =...
Python
0.000001
@@ -1569,52 +1569,26 @@ #%0A# -Mapping Class between images%0A# ------------- +Load image data%0A# ----
dcca93fbb66e5cd8bf0e0500aca3f187922e8806
Add in team id spider
scrapy_espn/scrapy_espn/spiders/team_spider.py
scrapy_espn/scrapy_espn/spiders/team_spider.py
Python
0
@@ -0,0 +1,360 @@ +import scrapy%0A%0Aclass TeamSpider(scrapy.Spider):%0A%09name = %22team%22%0A%09start_urls = %5B%0A%09%09'http://www.espn.com/mens-college-basketball/teams',%0A%09%5D%0A%0A%09def parse(self, response):%0A%09%09for conf in response.css('ul'):%0A%09%09%09for team in conf.css('li'):%0A%09%09%09%09yield ...
4eb6c05df9b8faf4492b23db1ef0e2aee141d24b
test case for tpt
emma2/msm/analysis/api_test.py
emma2/msm/analysis/api_test.py
Python
0
@@ -0,0 +1,800 @@ +'''%0ACreated on 18.10.2013%0A%0A@author: marscher%0A'''%0Aimport unittest%0A%0Aimport emma2.msm.analysis.api as api%0Aimport numpy as np%0A%0Aclass Test(unittest.TestCase):%0A%0A def testTPT(self):%0A A = np.ndarray(%5B1, 2, 3%5D, dtype=int)%0A B = np.ndarray(%5B4, 2%5D, dtype=int)%...
458cf526a4ebb72b4fad84e8cd2b665e0f093c1b
Add functional test for cluster check recover
senlin/tests/functional/test_cluster_health.py
senlin/tests/functional/test_cluster_health.py
Python
0.000009
@@ -0,0 +1,2983 @@ +# 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/licenses/LICENSE-2.0%0A#%0A# Unless required by applicable law or agreed to in wri...
48c008b4ac08114e30f4bee7a208d5d3fb925296
Add partial simple greedy algorithm (baseline).
problem1/steiner-simplegreedy.py
problem1/steiner-simplegreedy.py
Python
0.000001
@@ -0,0 +1,1091 @@ +import networkx as nx%0D%0Afrom sys import argv%0D%0A%0D%0Adef main():%0D%0A # G = nx.read_gml(argv%5B1%5D)%0D%0A G = nx.read_gml(%22steiner-small.gml%22)%0D%0A%09%0D%0A T = %5B%5D # terminals%0D%0A for v,d in G.nodes_iter(data=True):%0D%0A if d%5B'T'%5D == 1:%0D%0A T.append(v)%0D%0A%0D%...
fca390e7dd0d806cd87fa3570ce23ad132d8c852
add new example
examples/lineWithFocusChart.py
examples/lineWithFocusChart.py
Python
0.000002
@@ -0,0 +1,1496 @@ +#!/usr/bin/python%0A# -*- coding: utf-8 -*-%0A%0A%22%22%22%0AExamples for Python-nvd3 is a Python wrapper for NVD3 graph library.%0ANVD3 is an attempt to build re-usable charts and chart components%0Afor d3.js without taking away the power that d3.js gives you.%0A%0AProject location : https://github...
0114173d508298d6e9f72fd7f344d9123e4a7e59
Create wtospark.py
sparkgw/wtospark.py
sparkgw/wtospark.py
Python
0
@@ -0,0 +1,1492 @@ +from flask import Flask, request, abort%0Aimport json%0Aimport urllib2%0A%0Aapp = Flask(__name__)%0A%0A#Secret provided by%0A# fbabottemp99%0A# MmQ3YTA0MGUtNGI1Zi00MTI3LTlmZTMtMjQxNGJhYmRjMTI0MzI2ZDFlYWYtYzhh%0A%0A# curl -X POST -H %22X-Device-Secret: 12345%22 http://localhost:8080/report?temp=32%0A...
5432dd2ee2e1d20494d0b4cf8d816b298e70067c
Add test script.
protogeni/test/ma/lookup_keys.py
protogeni/test/ma/lookup_keys.py
Python
0
@@ -0,0 +1,2085 @@ +#! /usr/bin/env python%0A#%0A# Copyright (c) 2012-2014 University of Utah and the Flux Group.%0A# %0A# %7B%7B%7BGENIPUBLIC-LICENSE%0A# %0A# GENI Public License%0A# %0A# Permission is hereby granted, free of charge, to any person obtaining%0A# a copy of this software and/or hardware specification (th...
d1edac38e3402ebe03f96597500c3d39e49f299d
add run_pylint.py
run_pylint.py
run_pylint.py
Python
0.000011
@@ -0,0 +1,1214 @@ +#!/usr/bin/python%0A#%0A# wrapper script for pylint which just shows the errors and changes the return value if there's problems%0A# (enforcing a minscore and/or maxerrors - defaults to perfection)%0A#%0Aimport sys, re, subprocess, os%0A%0AMINSCORE = 10.0%0AMAXERRORS = 0%0A %0Acommand = 'pylint -...
a96c25cf46cd82716b397ba61c2b67acb8b7c2d7
Add code reading.
micro.py
micro.py
Python
0
@@ -0,0 +1,137 @@ +#!/usr/bin/env python%0A%0Afrom sys import argv%0A%0Adef get_code():%0A%09return argv%5B1%5D%0A%0Aif __name__ == '__main__':%0A%09code = get_code()%0A%09print(code)%0A
084ebff19703c42c50621eb94ac070c6a471e983
Solve the most wanted letter problem.
Home/mostWantedLetter.py
Home/mostWantedLetter.py
Python
0.999816
@@ -0,0 +1,694 @@ +def checkio(word):%0A word = word.lower()%0A arr = dict()%0A for i in range(len(word)):%0A char = word%5Bi%5D%0A if not str.isalpha(char):%0A continue%0A if not arr.__contains__(char):%0A arr%5Bchar%5D = 0%0A arr%5Bchar%5D = arr%5Bchar%5D + 1...
d437f494db827c69da7aaec00a5acf1d133e16b2
Add basic slash command example
examples/app_commands/basic.py
examples/app_commands/basic.py
Python
0.009586
@@ -0,0 +1,2925 @@ +from typing import Optional%0A%0Aimport discord%0Afrom discord import app_commands%0A%0AMY_GUILD = discord.Object(id=0) # replace with your guild id%0A%0A%0Aclass MyClient(discord.Client):%0A def __init__(self, *, intents: discord.Intents, application_id: int):%0A super().__init__(intents...
235a7107ca0c6d586edd9f224b9ee9132111a842
remove debug trace
toflib.py
toflib.py
import random from datetime import datetime # those commands directly trigger cmd_* actions _simple_dispatch = set() # those commands directly trigger confcmd_* actions _simple_conf_dispatch = set() def cmd(expected_args): def deco(func): name = func.__name__[4:] _simple_dispatch.add(name) ...
Python
0.000004
@@ -36,16 +36,27 @@ datetime +, timedelta %0A%0A# thos @@ -3383,29 +3383,8 @@ ts:%0A - print ev%0A
8fb4df5367b5c03d2851532063f6fa781fe2f980
Add Fibonacci Series Using Recursion
Maths/fibonacciSeries.py
Maths/fibonacciSeries.py
Python
0.000003
@@ -0,0 +1,367 @@ +# Fibonacci Sequence Using Recursion%0A%0Adef recur_fibo(n):%0A if n %3C= 1:%0A return n%0A else:%0A return(recur_fibo(n-1) + recur_fibo(n-2))%0A %0Alimit = int(input(%22How many terms to include in fionacci series:%22))%0A%0Aif limit %3C= 0:%0A print(%22Plese enter a positive in...
5f8e01f976d75eca651e29ebdd379c865aa5bda9
update merge_two_binary_trees_617
Python/merge_two_binary_trees_617.py
Python/merge_two_binary_trees_617.py
Python
0.000004
@@ -0,0 +1,1644 @@ +# Given two binary trees and imagine that when you put one of them to cover the other, some nodes of the two trees are overlapped while the others are not.%0A%0A# You need to merge them into a new binary tree. The merge rule is that if two nodes overlap, then sum node values up as the new value of t...
8c6983656e550ebaf32ff714a3c22be276ba842b
Add ScribdDownloader.py
ScribdDownloader.py
ScribdDownloader.py
Python
0
@@ -0,0 +1,1497 @@ +#Scribd Downloader%0A#Adam Knuckey September 2015%0A%0Aprint (%22Starting Scribd Downloader%22)%0Aimport os%0Aimport re%0Aimport urllib, urllib2%0Aimport threading%0Afrom time import sleep%0A%0Adef download(link,destination):%0A%09#print link%0A%09urllib.urlretrieve(link,destination)%0A%0Aprint(%22E...
97ae80b08958646e0c937f65a1b396171bf61e72
Add a proper unit test for xreload.py.
Lib/test/test_xreload.py
Lib/test/test_xreload.py
Python
0
@@ -0,0 +1,1742 @@ +%22%22%22Doctests for module reloading.%0A%0A%3E%3E%3E from xreload import xreload%0A%3E%3E%3E from test.test_xreload import make_mod%0A%3E%3E%3E make_mod()%0A%3E%3E%3E import x%0A%3E%3E%3E C = x.C%0A%3E%3E%3E Cfoo = C.foo%0A%3E%3E%3E Cbar = C.bar%0A%3E%3E%3E Cstomp = C.stomp%0A%3E%3E%3E b = C()%0A%...
53e851f68f106bff919a591a3516f26d5b07c375
add unit test case for FedMsgContext.send_message
fedmsg/tests/test_core.py
fedmsg/tests/test_core.py
Python
0.000002
@@ -0,0 +1,1190 @@ +import unittest%0A%0Aimport mock%0Aimport warnings%0Afrom fedmsg.core import FedMsgContext%0Afrom common import load_config%0A%0A%0Aclass TestCore(unittest.TestCase):%0A def setUp(self):%0A config = load_config()%0A config%5B'io_threads'%5D = 1%0A self.ctx = FedMsgContext(**c...
7a7d597c771ba8100957b5ca00156d7147c695c5
Add clear_db_es_contents tests
src/encoded/tests/test_clear_db_es_contents.py
src/encoded/tests/test_clear_db_es_contents.py
Python
0.000002
@@ -0,0 +1,1393 @@ +import pytest%0Afrom encoded.commands.clear_db_es_contents import (%0A clear_db_tables,%0A run_clear_db_es%0A)%0A%0Apytestmark = %5Bpytest.mark.setone, pytest.mark.working%5D%0A%0A%0Adef test_clear_db_tables(app, testapp):%0A # post an item and make sure it's there%0A post_res = testapp....
28677132dbcacd7d348262007256b3e2a9e44da2
add gate client module
server/Mars/Client/GateClient.py
server/Mars/Client/GateClient.py
Python
0.000003
@@ -0,0 +1,2606 @@ +#!/usr/bin/env python%0A# -*- encoding: utf-8 -*-%0A#%0A# Copyright (c) 2016 ASMlover. 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%0A# are met:%0A#%0A# * Redistributions of sou...
36fdfa89230fd08b6c28501f3f277bff642e36e3
Create ipy_custom_action_button.py
pyside/pyside_basics/jamming/QAction/ipy_custom_action_button.py
pyside/pyside_basics/jamming/QAction/ipy_custom_action_button.py
Python
0.000004
@@ -0,0 +1,1201 @@ +from collections import OrderedDict%0Afrom functools import partial%0A%0Afrom PySide import QtCore%0Afrom PySide import QtGui%0A%0A##%0A%0Aclass CustomAction(QtGui.QAction):%0A def __init__(self, message, *args, **kwargs):%0A super(CustomAction, self).__init__(*args, **kwargs)%0A se...
c4625a3ea98da282d9cd77acc13bba996e9fa676
Add refresh url param to dashboard page to allow on demand worker cache updates
flower/views/dashboard.py
flower/views/dashboard.py
from __future__ import absolute_import import logging from functools import partial try: from collections import OrderedDict except ImportError: from ordereddict import OrderedDict from tornado import web from tornado import websocket from tornado.ioloop import PeriodicCallback from ..views import BaseHandl...
Python
0
@@ -209,16 +209,40 @@ ort web%0A +from tornado import gen%0A from tor @@ -340,16 +340,54 @@ Handler%0A +from ..api.workers import ListWorkers%0A %0A%0Alogger @@ -476,16 +476,35 @@ ticated%0A + @gen.coroutine%0A def @@ -506,32 +506,106 @@ def get(self):%0A + refresh = self.get_argument('refresh', ...
18f63b98bf7eefe3022dc4681e81ada9969d5228
Create guess-the-word.py
Python/guess-the-word.py
Python/guess-the-word.py
Python
0.999864
@@ -0,0 +1,2936 @@ +# Time: O(n%5E2)%0A# Space: O(n)%0A%0A# This problem is an interactive problem new to the LeetCode platform.%0A#%0A# We are given a word list of unique words, each word is 6 letters long,%0A# and one word in this list is chosen as secret.%0A#%0A# You may call master.guess(word) to guess a word.%0A#...
803a2702a1330be1f51428f8d7533cfee27c3f90
Add facebook_test_user support.
facepy/test.py
facepy/test.py
Python
0
@@ -0,0 +1,1381 @@ +import facepy%0A%0A%0Aclass FacebookTestUser(object):%0A def __init__(self, **kwargs):%0A fields = ('id', 'access_token', 'login_url', 'email', 'password')%0A for field in fields:%0A setattr(self, field, kwargs%5Bfield%5D)%0A self.graph = facepy.GraphAPI(self.acces...
332f1fc67481432f6e8dd7cd9a35b02b12c9b6f6
Create numpy.py
numpy.py
numpy.py
Python
0.000319
@@ -0,0 +1,152 @@ +# Best dimensions in each column of a matrix x.%0Afor i in range(x.shape%5B0%5D): %0A dims = x%5B:,i%5D.argsort()%5B-5:%5D%0A vals = x%5Bdims,i%5D%0A print dims, vals%0A
4d4904e69e030be3f2b0e30c957507626d58a50e
Teste nas listas
_Listas/sherlock.py
_Listas/sherlock.py
Python
0.000002
@@ -0,0 +1,639 @@ +# Quem %C3%A9 o culpado%0A%0Aperguntas = %5B%5D%0A%0Act = 0%0Apt = 0%0A%0Aquest = input(%22Voc%C3%AA telefonou a vitima: %22)%0Aperguntas.append(quest)%0Aquest = input(%22Voc%E1%BA%BD esteve no local do crime: %22)%0Aperguntas.append(quest)%0Aquest = input(%22Voc%C3%AA mora perto da vitima? %22)%0Ape...
47a0ebd7c5475f00299c967b9140b4025bba5f60
Fix an issue when sending some options via ipc to a running daemon. fix #2344
flexget/ipc.py
flexget/ipc.py
from __future__ import unicode_literals, division, absolute_import import logging import random import string import threading import rpyc from rpyc.utils.server import ThreadedServer from flexget.scheduler import BufferQueue from flexget.utils.tools import console log = logging.getLogger('ipc') # Allow some attrib...
Python
0
@@ -430,16 +430,73 @@ items'%5D) +%0Arpyc.core.protocol.DEFAULT_CONFIG%5B'allow_pickle'%5D = True %0A%0AIPC_VE @@ -1230,28 +1230,41 @@ s = -dict(options.items() +rpyc.utils.classic.obtain(options )%0A
ceef4d18b414583cb39b83782c0fa24648b294db
make getters/setters private
periphery/gpio.py
periphery/gpio.py
import os import select class GPIOException(IOError): pass class GPIO(object): def __init__(self, pin, direction): self._fd = None self._pin = None self._open(pin, direction) def __del__(self): self.close() def __enter__(self): pass def __exit__(self, t, ...
Python
0.000004
@@ -4296,24 +4296,25 @@ es%0A%0A def +_ get_directio @@ -4669,24 +4669,25 @@ ()%0A%0A def +_ set_directio @@ -5362,24 +5362,25 @@ = property( +_ get_directio @@ -5382,16 +5382,17 @@ ection, +_ set_dire @@ -5407,16 +5407,17 @@ def +_ get_edge @@ -5735,16 +5735,17 @@ def +_ set_edge @@ -63...
235bfc6db908b6701de77df11e00e89a307d738e
Create tinymongo.py
tinymongo/tinymongo.py
tinymongo/tinymongo.py
Python
0.000621
@@ -0,0 +1 @@ +%0A
b351e5106684b0af8b862bb6ba5375671c1f431d
include getcomments.py
getcomments.py
getcomments.py
Python
0.000001
@@ -0,0 +1,1276 @@ +import urllib2%0Aimport json%0Aimport datetime%0Aimport time%0Aimport pytz%0Aimport pandas as pd%0Afrom pandas import DataFrame%0A%0Ats = str(int(time.time()))%0Adf = DataFrame()%0AhitsPerPage = 1000%0Arequested_keys = %5B%22author%22, %22comment_text%22, %22created_at_i%22, %22objectID%22, %22point...
74ecac2dbca41d737f62325955fd4d0dc393ac16
Rename flots.py to plots.py
plots.py
plots.py
Python
0.999997
@@ -0,0 +1,417 @@ +import json%0Aimport re%0A%0Aclass plot(object):%0A%0A def get_data(self,fn,col1,col2):%0A y = ''%0A for line in open(fn, 'rU'):%0A # don't parse comments%0A if re.search(r'#',line): continue%0A x = line.split()%0A if not re.search(r'%5BA-Z...
f13da24b8fb4cf6d8fff91e88afb1507528c2c2a
Add `.ycm_extra_conf.py` for https://github.com/Valloric/ycmd
android/.ycm_extra_conf.py
android/.ycm_extra_conf.py
Python
0.000002
@@ -0,0 +1,954 @@ +import os%0A%0AbasePath = os.path.dirname(os.path.realpath(__file__))%0A%0Adef FlagsForFile(filename, **kwargs):%0A return %7B%0A 'flags': %5B%0A '-std=c++11',%0A '-DFOLLY_NO_CONFIG=1',%0A '-DFOLLY_USE_LIBCPP',%0A '-I' + basePath + '/ReactAndroid/../ReactCommon/cxxreact/..',%0...
0b51d460aab9a01135af9ba5279a5f321f0981f0
Fix missing power monitor call on FakePlatform
tools/perf/measurements/smoothness_unittest.py
tools/perf/measurements/smoothness_unittest.py
# 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 sys from measurements import smoothness from telemetry.core import wpr_modes from telemetry.page import page from telemetry.page import page_measureme...
Python
0.000573
@@ -473,16 +473,67 @@ n False%0A + def CanMonitorPowerAsync(self):%0A return False%0A %0A%0Aclass
654f21b39a68aa461b6457199403e7d89781cc79
add migration
students/migrations/0010_auto_20161010_1345.py
students/migrations/0010_auto_20161010_1345.py
Python
0.000001
@@ -0,0 +1,754 @@ +# -*- coding: utf-8 -*-%0A# Generated by Django 1.10.2 on 2016-10-10 11:45%0Afrom __future__ import unicode_literals%0A%0Afrom django.db import migrations, models%0A%0A%0Aclass Migration(migrations.Migration):%0A%0A dependencies = %5B%0A ('students', '0009_auto_20161005_1820'),%0A %5D%0A...
b90b43ceefb78e1a94ba898ed23443567786cf25
Add /monitoring/status handler
app/monitoring/handlers.py
app/monitoring/handlers.py
Python
0.000002
@@ -0,0 +1,928 @@ +from __future__ import unicode_literals, absolute_import, division%0Aimport json%0A%0Afrom structlog import get_logger%0A%0A%0Aclass StatusHandler:%0A def __init__(self):%0A self.logger = get_logger()%0A%0A def on_get(self, req, res):%0A %22%22%22%0A @type req: falcon.reque...
95c71727bf340f55e17a15d475aba54438eb0b8e
add solution for Partition List
src/partitionList.py
src/partitionList.py
Python
0
@@ -0,0 +1,750 @@ +# Definition for singly-linked list.%0A# class ListNode:%0A# def __init__(self, x):%0A# self.val = x%0A# self.next = None%0A%0A%0Aclass Solution:%0A # @param head, a ListNode%0A # @param x, an integer%0A # @return a ListNode%0A%0A def partition(self, head, x):%0A ...
5bff284204a1397dbc63e83363d865213a35efe6
add a new test file test_begin_end.py
tests/unit/selection/modules/test_begin_end.py
tests/unit/selection/modules/test_begin_end.py
Python
0.000016
@@ -0,0 +1,1339 @@ +# Tai Sakuma %3Ctai.sakuma@gmail.com%3E%0Aimport pytest%0A%0Atry:%0A import unittest.mock as mock%0Aexcept ImportError:%0A import mock%0A%0Afrom alphatwirl.selection.modules import Not, NotwCount%0A%0A##__________________________________________________________________%7C%7C%0Anot_classes = %5...
7655fe94decf2fc9c3a07104f8fa76cf39442ddb
implement rectified drive
rectifieddrive.py
rectifieddrive.py
Python
0.000001
@@ -0,0 +1,1210 @@ +import navx%0Aimport subsystems%0A%0A%0Aclass RectifiedDrive:%0A %22%22%22%0A This class implemented the rectifiedDrive function, which sets the motor outputs%0A given a desired power and angular velocity using the NavX and a PID controller.%0A %22%22%22%0A%0A def __init__(self, kp, k...
feed8beb23fa1b1b4703e86b147f8bff84dab87a
Version bump. This ought to be the latest before 2.1 final.
src/robot/version.py
src/robot/version.py
# Automatically generated by 'package.py' script. VERSION = 'trunk' RELEASE = '20090415' TIMESTAMP = '20090415-015729' def get_version(sep=' '): if RELEASE == 'final': return VERSION return VERSION + sep + RELEASE if __name__ == '__main__': import sys print get_version(*sys.argv[1:])
Python
0
@@ -80,17 +80,17 @@ '2009041 -5 +9 '%0ATIMEST @@ -107,16 +107,16 @@ 9041 -5-015729 +9-030634 '%0A%0Ad
dd1d0893823561efec203cdfbb927b8edac7a72a
Add a coupld tests to create exception classes from error code names
tests/unit/beanstalk/test_exception.py
tests/unit/beanstalk/test_exception.py
Python
0
@@ -0,0 +1,2084 @@ +# Copyright (c) 2014 Amazon.com, Inc. or its affiliates.%0A# All Rights Reserved%0A#%0A# Permission is hereby granted, free of charge, to any person obtaining a%0A# copy of this software and associated documentation files (the%0A# %22Software%22), to deal in the Software without restriction, includi...
de38b3e7b3d8458920b913316b06bb10b886df9f
Implement ArgumentSelector for overload disambiguation
thinglang/symbols/argument_selector.py
thinglang/symbols/argument_selector.py
Python
0
@@ -0,0 +1,1978 @@ +import collections%0Aimport copy%0A%0Afrom thinglang.compiler.errors import NoMatchingOverload%0Afrom thinglang.lexer.values.identifier import Identifier%0A%0ASymbolOption = collections.namedtuple('SymbolOption', %5B'symbol', 'remaining_arguments'%5D)%0A%0A%0Aclass ArgumentSelector(object):%0A %2...
609bd2a0712ee488dd76bb3619aef70343adb304
add test__doctests.py
greentest/test__doctests.py
greentest/test__doctests.py
Python
0.000009
@@ -0,0 +1,956 @@ +import os%0Aimport re%0Aimport doctest%0Aimport unittest%0Aimport eventlet%0A%0Abase = os.path.dirname(eventlet.__file__)%0Amodules = set()%0A%0Afor path, dirs, files in os.walk(base):%0A package = 'eventlet' + path.replace(base, '').replace('/', '.')%0A modules.add((package, os.path.join(path,...
2885adb781ba5179e0dcc7645644bcb182e7bfe7
Create hacks/eKoomerce/__init__.py
hacks/eKoomerce/__init__.py
hacks/eKoomerce/__init__.py
Python
0.000004
@@ -0,0 +1,11 @@ +import bs4%0A
d9cce6f06503f1527d56d40d3037f46344c517d4
Add PerUserData utility.
src/librement/utils/user_data.py
src/librement/utils/user_data.py
Python
0
@@ -0,0 +1,1803 @@ +from django.db import models%0Afrom django.db.models.signals import post_save, pre_delete%0Afrom django.contrib.auth.models import User%0A%0Adef PerUserData(related_name=None):%0A %22%22%22%0A Class factory that returns an abstract model attached to a %60%60User%60%60 object%0A that creates...
e58d30a64ae2ce2962dbaaf119e5e4c4ee33e4e7
Create pub.py
cloud/mqtt_server/pub.py
cloud/mqtt_server/pub.py
Python
0.000001
@@ -0,0 +1,726 @@ +#!/usr/bin/env python%0Aimport asyncio%0A%0Afrom hbmqtt.client import MQTTClient%0Afrom hbmqtt.mqtt.constants import QOS_0, QOS_1, QOS_2%0A%0Aasync def publish_test():%0A try:%0A C = MQTTClient()%0A ret = await C.connect('mqtt://192.168.0.4:1883/')%0A message = await C.publish('server', 'ME...
8551c56a9fea5d21ea9dc6761eff8e93d451f6b3
Add pip setup.py
setup.py
setup.py
Python
0.000002
@@ -0,0 +1,1749 @@ +%22%22%22Setup script for gin-config.%0A%0ASee:%0A%0Ahttps://github.com/google/gin-config%0A%0A%22%22%22%0A%0Aimport codecs%0Afrom os import path%0Afrom setuptools import find_packages%0Afrom setuptools import setup%0A%0Ahere = path.abspath(path.dirname(__file__))%0A%0A# Get the long description fro...
379c5e73d767753142a62ba57f5928acf754b508
Add simple setup.py for ease of system-installing
setup.py
setup.py
Python
0
@@ -0,0 +1,224 @@ +from setuptools import setup, find_packages%0A%0Asetup(%0A name=%22crow2%22,%0A version=%220.1.dev0%22,%0A packages=find_packages(),%0A scripts=%5B%22bin/crow2%22%5D,%0A install_requires=%5B%22twisted%22, %22zope.interface%22%5D%0A)%0A
c2d14b8c3beaee3cff498fc02106751fce8e8e1c
Add setup.py
setup.py
setup.py
Python
0.000001
@@ -0,0 +1,1100 @@ +import sys%0Afrom setuptools import setup, find_packages%0Afrom setuptools.command.test import test as TestCommand%0A%0Aimport pb2df%0A%0A%0Aclass PyTest(TestCommand):%0A user_options = %5B('pytest-args=', 'a', %22Arguments to pass to py.test%22)%5D%0A%0A def initialize_options(self):%0A ...
a7bf54f417576bfc355e1851258e711dadd73ad3
Add python trove classifiers
setup.py
setup.py
from setuptools import setup, find_packages from taggit import VERSION f = open('README.rst') readme = f.read() f.close() setup( name='django-taggit', version=".".join(map(str, VERSION)), description='django-taggit is a reusable Django application for simple tagging.', long_description=readme, a...
Python
0.000327
@@ -867,16 +867,254 @@ ython',%0A + 'Programming Language :: Python',%0A 'Programming Language :: Python :: 2.6',%0A 'Programming Language :: Python :: 2.7',%0A 'Programming Language :: Python :: 3.2',%0A 'Programming Language :: Python :: 3.3',%0A
b751598da9cb43b537ab5990a9c15995bba298df
Allow lxml 3.6
setup.py
setup.py
from setuptools import setup, find_packages from codecs import open import os import sys # Based on https://github.com/pypa/sampleproject/blob/master/setup.py # and https://python-packaging-user-guide.readthedocs.org/ here = os.path.abspath(os.path.dirname(__file__)) from mitmproxy import version with open(os.path....
Python
0
@@ -3346,25 +3346,25 @@ %3E=3.5.0, %3C3. -6 +7 %22,%0A %5D
2b1146a1741262a9c5acec9a56dfa3e45202f1df
set version 1.0
setup.py
setup.py
from setuptools import setup, find_packages setup( name='aleph', version='0.2', description="Document sifting web frontend", long_description="", classifiers=[ "Development Status :: 3 - Alpha", "Intended Audience :: Developers", "Operating System :: OS Independent", ...
Python
0.000002
@@ -80,11 +80,11 @@ on=' -0.2 +1.0 ',%0A
733289636661f3c0034a66eaa8763058ef43796d
update setup.py
setup.py
setup.py
#!/usr/bin/env python from distutils.core import setup from codecs import open setup(name='Open Tamil', version='0.1-dev', description='Tamil language text processing tools', author='Muthiah Annamalai', author_email='ezhillang@gmail.com', url='https://github.com/arcturusannamalai/open-ta...
Python
0.000001
@@ -90,17 +90,17 @@ me='Open - +- Tamil',%0A
d8aff370378d7af39797fc03e184f2572d52bfc6
Remove the restriction for pylons.
setup.py
setup.py
# -*- coding: utf-8 -*- try: from setuptools import setup, find_packages except ImportError: from ez_setup import use_setuptools use_setuptools() from setuptools import setup, find_packages import os import sys # Taken from kennethreitz/requests/setup.py package_directory = os.path.realpath(os.path.di...
Python
0
@@ -1339,120 +1339,8 @@ 4%22,%0A -%09# repoze.who is not compatible with the pylons 1.0.1 tests.%0A%09# it will run with 1.0.1 but the tests will fail!%0A @@ -1361,14 +1361,8 @@ .9.7 -,%3C=1.0 %22,%0A
231d050fe611adb201cd7ae55f52212d0b84caa1
Check for pandoc. add pyandoc to setup_requires
setup.py
setup.py
from setuptools import setup, find_packages, Command from setuptools.command.build_py import build_py as _build_py from distutils.spawn import find_executable import os.path import imp import pandoc.core pandoc.core.PANDOC_PATH = find_executable('pandoc') ROOT = os.path.abspath(os.path.dirname(__file__)) def read(fn...
Python
0
@@ -251,16 +251,205 @@ andoc')%0A +assert pandoc.core.PANDOC_PATH is not None, %5C%0A %22'pandoc' is a required system binary to generate documentation.%5Cn%22 %5C%0A %22Please install it somewhere in your PATH to run this command.%22%0A%0A ROOT = o @@ -1641,16 +1641,48 @@ res=%5B%5D,%0A + setup_requires=%5...
e458733b0aa1cbb142fc6818ae1f7cf84bef6518
Add setup
setup.py
setup.py
Python
0.000001
@@ -0,0 +1,1265 @@ +import setuptools%0A%0Aif __name__ == %22__main__%22:%0A setuptools.setup(%0A name='friendly_computing_machine',%0A version=%220.1.1%22,%0A description='A starting template for Python programs',%0A author='CHENXI CAI',%0A author_email='ccai28@emory.edu',%0A ...
bc17ea522b0120ec7308ba0309d87b18ba9163d9
Add setup.py
setup.py
setup.py
Python
0.000001
@@ -0,0 +1,731 @@ +import sys%0Afrom setuptools import setup%0A%0Asetup(%0A name='pingdombackup',%0A version=%220.1.0%22,%0A description='Backup Pingdom logs',%0A long_description='Backup Pingdom result logs to a SQLite database.',%0A author='Joel Verhagen',%0A author_email='joel.verhagen@gmail.com',%...
1dd8a34cba565f70a30a6c8ab4604a489377e752
Add template remove script
src/utils/remove_templates.py
src/utils/remove_templates.py
Python
0
@@ -0,0 +1,1353 @@ +def remove_templates(text):%0A %22%22%22Remove all text contained between '%7B%7B' and '%7D%7D', even in the case of%0A nested templates.%0A%0A Args:%0A text (str): Full text of a Wikipedia article as a single string.%0A%0A Returns:%0A str: The full text with all templates ...
ad714cbf92d2984c9cc855e99e31bf622c38a220
add setup file
setup.py
setup.py
Python
0.000001
@@ -0,0 +1,165 @@ +#!/usr/bin/env python%0Afrom distutils.core import setup%0A%0Asetup(%0A name = 's7n-menu',%0A version = %221a1%22,%0A packages = %5B's7n', 's7n.menu'%5D,%0A )%0A
e9832b7b3bb028170562cacde3dbb52f13adba85
Set version number
setup.py
setup.py
#!/usr/bin/env python # # Copyright (C) 2007 SIOS Technology, Inc. # Copyright (C) 2011 Umea Universitet, Sweden # # 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...
Python
0.000032
@@ -1550,19 +1550,23 @@ sion='1. -1 +2 .0 +beta ',%0A d
73d9b80d6fa1cf75dba73e396d1f5d3bd4963df6
Create setup.py
setup.py
setup.py
Python
0.000001
@@ -0,0 +1,541 @@ +from distutils.core import setup%0Asetup(%0A name = 'wthen',%0A packages = %5B'wthen'%5D, # this must be the same as the name above%0A version = '0.1',%0A description = 'A simple rule engine with YAML format',%0A author = 'Alex Yu',%0A author_email = 'mltest2000@aliyun.com',%0A url = 'https://...
62e126908e08544f8595be368d300b0abaca82d3
support old setuptools versions
setup.py
setup.py
#!/usr/bin/env python # -*- coding: utf-8 -*- import os import re import sys try: from setuptools import setup except ImportError: from distutils.core import setup # Get the version version_regex = r'__version__ = ["\']([^"\']*)["\']' with open('h2/__init__.py', 'r') as f: text = f.read() match = re.s...
Python
0
@@ -1802,13 +1802,17 @@ rame -~ +%3E =3.1 +, %3C4 ',%0A @@ -1828,13 +1828,17 @@ pack -~ +%3E =2.0 +, %3C3 ',%0A @@ -1892,13 +1892,43 @@ sion -%3C%223.4 + == %222.7%22 or python_version == %223.3 %22': @@ -1939,15 +1939,21 @@ um34 -~ +%3E =1.0.4 +, %3C1.1 '%5D,%0A
4d16ae6d1ad8b308c14c23e802349001b81ae461
Add Python-based opcode enum parser
thinglang/compiler/opcodes.py
thinglang/compiler/opcodes.py
Python
0.001332
@@ -0,0 +1,683 @@ +import os%0A%0Aimport re%0A%0ABASE_DIR = os.path.dirname(os.path.abspath(__file__))%0AENUM_PARSER = re.compile(r'(.*)%5Cs*?=%5Cs*?(%5Cd+)')%0A%0Adef read_opcodes():%0A with open(os.path.join(BASE_DIR, '..', '..', 'thingc', 'execution', 'Opcode.h')) as f:%0A for line in f:%0A if '...
ac823e61fd214f9818bb7a893a8ed52a3bfa3af4
Add utils for graph visualization.
neurokernel/conn_utils.py
neurokernel/conn_utils.py
Python
0
@@ -0,0 +1,1974 @@ +#!/usr/bin/env python%0A%0Aimport itertools%0Aimport os%0Aimport tempfile%0A%0Aimport conn%0Aimport matplotlib.pyplot as plt%0Aimport networkx as nx%0A%0Adef imdisp(f):%0A %22%22%22%0A Display the specified image file using matplotlib.%0A %22%22%22%0A %0A im = plt.imread(f)%0A plt....
e663394d1dc4de7b8e3a877f0c9870a804e804f2
Make tests runnable from lifelines.tests
lifelines/tests/__main__.py
lifelines/tests/__main__.py
Python
0.00001
@@ -0,0 +1,107 @@ +import unittest%0Afrom . import test_suite%0A%0A%0Aif __name__ == '__main__':%0A unittest.main(module=test_suite)%0A
525a8438bd601592c4f878ca5d42d3dab8943be0
Test that specific Failures are caught before parent Failures
ooni/tests/test_errors.py
ooni/tests/test_errors.py
Python
0.000001
@@ -0,0 +1,719 @@ +from twisted.trial import unittest%0A%0Aimport ooni.errors%0A%0Aclass TestErrors(unittest.TestCase):%0A%0A def test_catch_child_failures_before_parent_failures(self):%0A %22%22%22%0A Verify that more specific Failures are caught first by%0A handleAllFailures() and failureToStr...
90d079928eaf48e370d21417e4d6e649ec0f5f6f
Update tasks and evaluate viewports on saving
taskwiki/taskwiki.py
taskwiki/taskwiki.py
import sys import re import vim from tasklib.task import TaskWarrior, Task # Insert the taskwiki on the python path sys.path.insert(0, vim.eval("s:plugin_path") + '/taskwiki') from regexp import * from task import VimwikiTask from cache import TaskCache """ How this plugin works: 1.) On startup, it reads all t...
Python
0
@@ -999,32 +999,57 @@ e.load_buffer()%0A + cache.update_tasks()%0A cache.save_t @@ -1081,16 +1081,47 @@ uffer()%0A + cache.evaluate_viewports()%0A %0A%0Aif __n
f2e9f2adbc81a37847bbe27401dd852317243486
add a test for the session tables
test/sessionstest.py
test/sessionstest.py
Python
0
@@ -0,0 +1,1197 @@ +#!/usr/bin/python2.4%0A#%0A# Copyright (c) 2004-2005 rpath, Inc.%0A#%0A%0Aimport time%0Aimport testsuite%0Atestsuite.setup()%0A%0Aimport sqlite3%0Aimport rephelp %0Afrom mint_rephelp import MintRepositoryHelper%0A%0Afrom mint import dbversion%0Afrom mint import sessiondb%0A%0Aclass SessionTest(MintR...
eb71a3d3319480b3f99cb44f934a51bfb1b5bd67
Add abstract class for HAP channels
pyatv/auth/hap_channel.py
pyatv/auth/hap_channel.py
Python
0
@@ -0,0 +1,2522 @@ +%22%22%22Base class for HAP based channels (connections).%22%22%22%0Afrom abc import ABC, abstractmethod%0Aimport asyncio%0Aimport logging%0Afrom typing import Callable, Tuple, cast%0A%0Afrom pyatv.auth.hap_pairing import PairVerifyProcedure%0Afrom pyatv.auth.hap_session import HAPSession%0Afrom pya...
0089de0eccae27bf4cd5a2f9166e8418d64171c3
Create XOR.py
XOR.py
XOR.py
Python
0.000027
@@ -0,0 +1,334 @@ +'''%0AImplement XOR operation%0A'''%0A%0Adef XOR(a,b):%0A result = 0%0A power = 1%0A while a%3E0 or b%3E0:%0A m = a%252%0A n = b%252%0A if m+n==1:%0A result = result+power%0A %0A power *=2%0A a = a/2%0A b = b/2%0A %0A return re...
bd01797f18012927202b87872dc33caf685306c0
Add GDB plugin for printing ABC values
gdb.py
gdb.py
Python
0
@@ -0,0 +1,2385 @@ +deadbeef = 0xdeadbeefdeadbeef%0A%0Aabc_any = gdb.lookup_type(%22union any%22)%0A%0Adef color(s, c):%0A return %22%5Cx1b%5B%22 + str(c) + %22m%22 + s + %22%5Cx1b%5B0m%22%0A%0Adef gray(s):%0A return color(s, 90)%0A%0Adef red(s):%0A return color(s, %221;31%22)%0A%0Adef p(indent, tag, value):%0...